From f1940818f75402e0865309f2cdd03f92528f648b Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Fri, 31 May 2024 23:57:45 -0500 Subject: [PATCH] Re-add skilltreetest --- site/public/skilltreetest/asset-manifest.json | 276 ++++++++++++++++++ site/public/skilltreetest/favicon.ico | Bin 0 -> 15406 bytes site/public/skilltreetest/index.html | 1 + site/public/skilltreetest/logo192.png | Bin 0 -> 50725 bytes site/public/skilltreetest/logo512.png | Bin 0 -> 266388 bytes site/public/skilltreetest/manifest.json | 25 ++ site/public/skilltreetest/robots.txt | 3 + .../static/css/main.a3da64f4.chunk.css | 2 + .../static/css/main.a3da64f4.chunk.css.map | 1 + .../static/js/2.ec28d3dc.chunk.js | 3 + .../static/js/2.ec28d3dc.chunk.js.LICENSE.txt | 229 +++++++++++++++ .../static/js/2.ec28d3dc.chunk.js.map | 1 + .../static/js/3.fd51bca7.chunk.js | 2 + .../static/js/3.fd51bca7.chunk.js.map | 1 + .../static/js/main.1eb94fec.chunk.js | 2 + .../static/js/main.1eb94fec.chunk.js.map | 1 + .../static/js/runtime-main.3a446403.js | 2 + .../static/js/runtime-main.3a446403.js.map | 1 + .../static/media/addon_01.c0fb4483.png | Bin 0 -> 65367 bytes .../static/media/addon_02.1820823d.png | Bin 0 -> 74591 bytes .../static/media/addon_03.957f9cec.png | Bin 0 -> 56969 bytes .../static/media/addon_04.59c7b27c.png | Bin 0 -> 48324 bytes .../static/media/addon_05.a5fa4d3d.png | Bin 0 -> 73824 bytes .../static/media/addon_06.3e032369.png | Bin 0 -> 42433 bytes .../static/media/addon_07.a5f60c44.png | Bin 0 -> 73596 bytes .../static/media/addon_08.df88bdd1.png | Bin 0 -> 79590 bytes .../static/media/addon_09.549f774b.png | Bin 0 -> 61719 bytes .../static/media/addon_10.5e8c8874.png | Bin 0 -> 64774 bytes .../static/media/addon_11.219de378.png | Bin 0 -> 70984 bytes .../static/media/addon_12.03083e78.png | Bin 0 -> 69258 bytes .../static/media/addon_13.6c02e64c.png | Bin 0 -> 66594 bytes .../static/media/addon_14.9b1504c4.png | Bin 0 -> 92451 bytes .../static/media/addon_15.24b04aa9.png | Bin 0 -> 72963 bytes .../static/media/addon_16.15205adc.png | Bin 0 -> 63813 bytes .../static/media/addon_17.79373ccc.png | Bin 0 -> 74115 bytes .../static/media/addon_18.95e04587.png | Bin 0 -> 67004 bytes .../static/media/addon_19.0b59d26c.png | Bin 0 -> 74475 bytes .../static/media/addon_20.dbe4a50f.png | Bin 0 -> 222064 bytes .../static/media/addon_21.fa4d0c68.png | Bin 0 -> 71084 bytes .../static/media/addon_22.1ce9a9f9.png | Bin 0 -> 73617 bytes .../static/media/addon_23.d4aaf44e.png | Bin 0 -> 73917 bytes .../static/media/addon_24.7c97c4d0.png | Bin 0 -> 52463 bytes .../static/media/addon_25.9b240051.png | Bin 0 -> 76941 bytes .../static/media/addon_26.6bcd0248.png | Bin 0 -> 50708 bytes .../static/media/addon_27.3f0ff707.png | Bin 0 -> 65170 bytes .../static/media/addon_28.79ed1ce5.png | Bin 0 -> 55474 bytes .../static/media/addon_29.260a95d1.png | Bin 0 -> 79646 bytes .../static/media/addon_30.2428312f.png | Bin 0 -> 60675 bytes .../static/media/addon_31.0081f0a8.png | Bin 0 -> 77442 bytes .../static/media/addon_32.a900406d.png | Bin 0 -> 64525 bytes .../static/media/addon_33.55427c57.png | Bin 0 -> 83748 bytes .../static/media/addon_34.d258d29e.png | Bin 0 -> 56863 bytes .../static/media/addon_35.1ab26f09.png | Bin 0 -> 64131 bytes .../static/media/addon_36.64a8f972.png | Bin 0 -> 70655 bytes .../static/media/addon_37.b00f80ab.png | Bin 0 -> 60890 bytes .../static/media/addon_38.bb5721d9.png | Bin 0 -> 60642 bytes .../static/media/addon_39.77f8c546.png | Bin 0 -> 68365 bytes .../static/media/addon_40.8a910314.png | Bin 0 -> 74008 bytes .../static/media/blue_01.f249673b.png | Bin 0 -> 64741 bytes .../static/media/blue_02.feeaa190.png | Bin 0 -> 77752 bytes .../static/media/blue_03.71a425f1.png | Bin 0 -> 53496 bytes .../static/media/blue_04.d0469dbf.png | Bin 0 -> 67821 bytes .../static/media/blue_05.5389d340.png | Bin 0 -> 83570 bytes .../static/media/blue_06.7f9ac9e8.png | Bin 0 -> 71977 bytes .../static/media/blue_07.63287773.png | Bin 0 -> 56923 bytes .../static/media/blue_08.d638e98c.png | Bin 0 -> 76259 bytes .../static/media/blue_09.b9489a4d.png | Bin 0 -> 54407 bytes .../static/media/blue_10.4a204cff.png | Bin 0 -> 60820 bytes .../static/media/blue_11.4bd671bf.png | Bin 0 -> 59149 bytes .../static/media/blue_12.4d37ca4b.png | Bin 0 -> 97580 bytes .../static/media/blue_13.d2e7ad62.png | Bin 0 -> 64295 bytes .../static/media/blue_14.58373a83.png | Bin 0 -> 70865 bytes .../static/media/blue_15.0ced42d9.png | Bin 0 -> 106770 bytes .../static/media/blue_16.0aef057a.png | Bin 0 -> 86691 bytes .../static/media/blue_17.536a3b0e.png | Bin 0 -> 93162 bytes .../static/media/blue_18.021af490.png | Bin 0 -> 77511 bytes .../static/media/blue_19.16140c7f.png | Bin 0 -> 89787 bytes .../static/media/blue_20.36e2dd3b.png | Bin 0 -> 71525 bytes .../static/media/blue_21.2732f20e.png | Bin 0 -> 76912 bytes .../static/media/blue_22.296a31d2.png | Bin 0 -> 72995 bytes .../static/media/blue_23.0a4afb91.png | Bin 0 -> 59642 bytes .../static/media/blue_24.fa45421a.png | Bin 0 -> 79244 bytes .../static/media/blue_25.2732a560.png | Bin 0 -> 81750 bytes .../static/media/blue_26.2a348698.png | Bin 0 -> 62330 bytes .../static/media/blue_27.40085641.png | Bin 0 -> 88907 bytes .../static/media/blue_28.7740ccfe.png | Bin 0 -> 61921 bytes .../static/media/blue_29.88240e02.png | Bin 0 -> 67496 bytes .../static/media/blue_30.84ca6b4c.png | Bin 0 -> 75124 bytes .../static/media/blue_31.3e389d47.png | Bin 0 -> 62508 bytes .../static/media/blue_32.3707de47.png | Bin 0 -> 48740 bytes .../static/media/blue_33.78252c5e.png | Bin 0 -> 56664 bytes .../static/media/blue_34.ce6ff7fb.png | Bin 0 -> 50324 bytes .../static/media/blue_35.e391e6b6.png | Bin 0 -> 66256 bytes .../static/media/blue_36.068c4005.png | Bin 0 -> 89780 bytes .../static/media/blue_37.b397a661.png | Bin 0 -> 62708 bytes .../static/media/blue_38.94557b05.png | Bin 0 -> 68418 bytes .../static/media/blue_39.15b22ce1.png | Bin 0 -> 55254 bytes .../static/media/blue_40.5e4c7ed5.png | Bin 0 -> 62476 bytes .../static/media/blue_41.b2568b39.png | Bin 0 -> 76779 bytes .../static/media/blue_42.9352aea9.png | Bin 0 -> 59347 bytes .../static/media/emerald_01.327fbff4.png | Bin 0 -> 51637 bytes .../static/media/emerald_02.0c9afb4d.png | Bin 0 -> 85791 bytes .../static/media/emerald_03.e4e90739.png | Bin 0 -> 58743 bytes .../static/media/emerald_04.4ed4be50.png | Bin 0 -> 73819 bytes .../static/media/emerald_05.dc6c5451.png | Bin 0 -> 106175 bytes .../static/media/emerald_06.73847e5d.png | Bin 0 -> 69137 bytes .../static/media/emerald_07.7da7d8ef.png | Bin 0 -> 83588 bytes .../static/media/emerald_08.0c96e2aa.png | Bin 0 -> 72085 bytes .../static/media/emerald_09.c6d31cb2.png | Bin 0 -> 53420 bytes .../static/media/emerald_10.1bbadb04.png | Bin 0 -> 80847 bytes .../static/media/emerald_11.950d1f9c.png | Bin 0 -> 73998 bytes .../static/media/emerald_12.55d372a1.png | Bin 0 -> 45076 bytes .../static/media/emerald_13.a24a319c.png | Bin 0 -> 57237 bytes .../static/media/gray_01.091b532a.png | Bin 0 -> 73109 bytes .../static/media/gray_02.1b6a7131.png | Bin 0 -> 71362 bytes .../static/media/gray_03.4be0bb4f.png | Bin 0 -> 65371 bytes .../static/media/gray_04.058058b9.png | Bin 0 -> 39240 bytes .../static/media/gray_05.1e58fa31.png | Bin 0 -> 62411 bytes .../static/media/gray_06.c14f7e68.png | Bin 0 -> 49090 bytes .../static/media/gray_07.f37528de.png | Bin 0 -> 63619 bytes .../static/media/gray_08.bdeb3898.png | Bin 0 -> 42737 bytes .../static/media/gray_09.70af4e05.png | Bin 0 -> 41896 bytes .../static/media/gray_10.6f13ff42.png | Bin 0 -> 66174 bytes .../static/media/gray_11.3641f5e2.png | Bin 0 -> 70810 bytes .../static/media/gray_12.813ff61b.png | Bin 0 -> 36441 bytes .../static/media/green_01.5f60edde.png | Bin 0 -> 67287 bytes .../static/media/green_02.5894ec05.png | Bin 0 -> 57441 bytes .../static/media/green_03.f5c861ec.png | Bin 0 -> 53690 bytes .../static/media/green_04.18f915f0.png | Bin 0 -> 89678 bytes .../static/media/green_05.5a4b9323.png | Bin 0 -> 46227 bytes .../static/media/green_06.ea3d65f1.png | Bin 0 -> 40129 bytes .../static/media/green_07.af910d0e.png | Bin 0 -> 95513 bytes .../static/media/green_08.5c7092e5.png | Bin 0 -> 88893 bytes .../static/media/green_09.098d33fc.png | Bin 0 -> 59132 bytes .../static/media/green_10.5990df85.png | Bin 0 -> 56346 bytes .../static/media/green_11.a1fc6779.png | Bin 0 -> 66071 bytes .../static/media/green_12.fcc6bbe3.png | Bin 0 -> 56862 bytes .../static/media/green_13.e9437560.png | Bin 0 -> 67625 bytes .../static/media/green_14.b7a76185.png | Bin 0 -> 69312 bytes .../static/media/green_15.d157d698.png | Bin 0 -> 81341 bytes .../static/media/green_16.ba637e3d.png | Bin 0 -> 71573 bytes .../static/media/green_17.91c2378d.png | Bin 0 -> 100666 bytes .../static/media/green_18.27033642.png | Bin 0 -> 77706 bytes .../static/media/green_19.b8bf5a31.png | Bin 0 -> 48942 bytes .../static/media/green_20.26e0c4cb.png | Bin 0 -> 53808 bytes .../static/media/green_21.67d6da45.png | Bin 0 -> 47945 bytes .../static/media/green_22.b2dc8c57.png | Bin 0 -> 57464 bytes .../static/media/green_23.9300db09.png | Bin 0 -> 57125 bytes .../static/media/green_24.9cec35c1.png | Bin 0 -> 73707 bytes .../static/media/green_25.173b2a2a.png | Bin 0 -> 46323 bytes .../static/media/green_26.647f6a5d.png | Bin 0 -> 60179 bytes .../static/media/green_27.f4a332a9.png | Bin 0 -> 45633 bytes .../static/media/green_28.1903b8fc.png | Bin 0 -> 56636 bytes .../static/media/green_29.75dfb869.png | Bin 0 -> 50867 bytes .../static/media/green_30.eb5eb24d.png | Bin 0 -> 42267 bytes .../static/media/green_31.b394f682.png | Bin 0 -> 54379 bytes .../static/media/green_32.8690e84b.png | Bin 0 -> 78677 bytes .../static/media/green_33.9359ac46.png | Bin 0 -> 53592 bytes .../static/media/red_01.25ebdff4.png | Bin 0 -> 57930 bytes .../static/media/red_02.f2164a8b.png | Bin 0 -> 49885 bytes .../static/media/red_03.9c2425b1.png | Bin 0 -> 59544 bytes .../static/media/red_04.544fef54.png | Bin 0 -> 84861 bytes .../static/media/red_05.ae881830.png | Bin 0 -> 83604 bytes .../static/media/red_06.f1ecc539.png | Bin 0 -> 80057 bytes .../static/media/red_07.3880e6ac.png | Bin 0 -> 80872 bytes .../static/media/red_08.6a999964.png | Bin 0 -> 82204 bytes .../static/media/red_09.4a4b91d3.png | Bin 0 -> 97603 bytes .../static/media/red_10.7589b5cd.png | Bin 0 -> 52948 bytes .../static/media/red_11.97ce76dd.png | Bin 0 -> 84772 bytes .../static/media/red_12.3c0fdb6f.png | Bin 0 -> 79461 bytes .../static/media/red_13.a44808fd.png | Bin 0 -> 70953 bytes .../static/media/red_14.b5107b5d.png | Bin 0 -> 77181 bytes .../static/media/red_15.fcd091f8.png | Bin 0 -> 81931 bytes .../static/media/red_16.c47a89cd.png | Bin 0 -> 61300 bytes .../static/media/red_17.30fc6fc7.png | Bin 0 -> 62856 bytes .../static/media/red_18.5bf380ff.png | Bin 0 -> 90830 bytes .../static/media/red_19.be80608c.png | Bin 0 -> 52455 bytes .../static/media/red_20.90abbaa2.png | Bin 0 -> 77581 bytes .../static/media/red_21.c74257cd.png | Bin 0 -> 41527 bytes .../static/media/red_22.74cdd3f9.png | Bin 0 -> 70398 bytes .../static/media/red_23.2d2cb928.png | Bin 0 -> 78035 bytes .../static/media/red_24.8e35e9c3.png | Bin 0 -> 87333 bytes .../static/media/red_25.854590ee.png | Bin 0 -> 60051 bytes .../static/media/red_26.fa8db215.png | Bin 0 -> 74110 bytes .../static/media/red_27.30e7f9ef.png | Bin 0 -> 75098 bytes .../static/media/red_28.9b56d25a.png | Bin 0 -> 56387 bytes .../static/media/red_29.4384f010.png | Bin 0 -> 84070 bytes .../static/media/red_30.ed419aa6.png | Bin 0 -> 83927 bytes .../static/media/red_31.02763f37.png | Bin 0 -> 74890 bytes .../static/media/red_32.08b393ad.png | Bin 0 -> 56834 bytes .../static/media/red_33.a2ad693f.png | Bin 0 -> 50893 bytes .../static/media/red_34.7c56fcba.png | Bin 0 -> 62721 bytes .../static/media/red_35.6b1e5001.png | Bin 0 -> 60779 bytes .../static/media/red_36.d86cc29d.png | Bin 0 -> 51960 bytes .../static/media/red_37.ac42dd59.png | Bin 0 -> 71660 bytes .../static/media/skillBorder.dea18ced.png | Bin 0 -> 61229 bytes .../static/media/violet_01.9ae00b5d.png | Bin 0 -> 68224 bytes .../static/media/violet_02.f5313a21.png | Bin 0 -> 64638 bytes .../static/media/violet_03.308da286.png | Bin 0 -> 60814 bytes .../static/media/violet_04.070a8d91.png | Bin 0 -> 90381 bytes .../static/media/violet_05.89afdbd6.png | Bin 0 -> 101932 bytes .../static/media/violet_06.1bfca3da.png | Bin 0 -> 84680 bytes .../static/media/violet_07.99f7c00e.png | Bin 0 -> 70497 bytes .../static/media/violet_08.d4c7b46e.png | Bin 0 -> 64373 bytes .../static/media/violet_09.303cb3ce.png | Bin 0 -> 72486 bytes .../static/media/violet_10.b002e470.png | Bin 0 -> 67428 bytes .../static/media/violet_11.5094730d.png | Bin 0 -> 84298 bytes .../static/media/violet_12.6ead0d7c.png | Bin 0 -> 73315 bytes .../static/media/violet_13.dc895a3c.png | Bin 0 -> 57170 bytes .../static/media/violet_14.a4cd5200.png | Bin 0 -> 96470 bytes .../static/media/violet_15.6d264bd2.png | Bin 0 -> 96840 bytes .../static/media/violet_16.86179f9b.png | Bin 0 -> 73675 bytes .../static/media/violet_17.2cc51915.png | Bin 0 -> 75420 bytes .../static/media/violet_18.0689d355.png | Bin 0 -> 85230 bytes .../static/media/violet_19.ece511f3.png | Bin 0 -> 77119 bytes .../static/media/violet_20.0fd1896a.png | Bin 0 -> 74624 bytes .../static/media/violet_21.3de7d1d8.png | Bin 0 -> 80432 bytes .../static/media/violet_22.feb64214.png | Bin 0 -> 58126 bytes .../static/media/violet_23.dfcac389.png | Bin 0 -> 50732 bytes .../static/media/violet_24.b98dd1aa.png | Bin 0 -> 63067 bytes .../static/media/violet_25.e078fc45.png | Bin 0 -> 54996 bytes .../static/media/violet_26.646a8021.png | Bin 0 -> 70578 bytes .../static/media/violet_27.a2bee080.png | Bin 0 -> 93101 bytes .../static/media/violet_28.ee9c9db3.png | Bin 0 -> 53147 bytes .../static/media/violet_29.b8303692.png | Bin 0 -> 66533 bytes .../static/media/yellow_01.ee28dc27.png | Bin 0 -> 66741 bytes .../static/media/yellow_02.58f7cfa4.png | Bin 0 -> 52323 bytes .../static/media/yellow_03.8577308e.png | Bin 0 -> 57218 bytes .../static/media/yellow_04.cbd7b379.png | Bin 0 -> 49316 bytes .../static/media/yellow_05.9442193b.png | Bin 0 -> 60787 bytes .../static/media/yellow_06.87b39368.png | Bin 0 -> 57631 bytes .../static/media/yellow_07.ec8f1751.png | Bin 0 -> 79526 bytes .../static/media/yellow_08.9c6b3885.png | Bin 0 -> 71388 bytes .../static/media/yellow_09.7fffc61d.png | Bin 0 -> 60990 bytes .../static/media/yellow_10.b0544b31.png | Bin 0 -> 81201 bytes .../static/media/yellow_11.545d015e.png | Bin 0 -> 76283 bytes .../static/media/yellow_12.e9257578.png | Bin 0 -> 69712 bytes .../static/media/yellow_13.255a608a.png | Bin 0 -> 57168 bytes .../static/media/yellow_14.c893b448.png | Bin 0 -> 57063 bytes .../static/media/yellow_15.dac8e54e.png | Bin 0 -> 61311 bytes .../static/media/yellow_16.b7a5766e.png | Bin 0 -> 50428 bytes .../static/media/yellow_17.4a4082a2.png | Bin 0 -> 78509 bytes .../static/media/yellow_18.2ab8f357.png | Bin 0 -> 76577 bytes .../static/media/yellow_19.9d4c2764.png | Bin 0 -> 90166 bytes .../static/media/yellow_20.df55a929.png | Bin 0 -> 58576 bytes .../static/media/yellow_21.436e068c.png | Bin 0 -> 67597 bytes .../static/media/yellow_22.9d7c6b0a.png | Bin 0 -> 65496 bytes .../static/media/yellow_23.9356bb71.png | Bin 0 -> 62071 bytes .../static/media/yellow_24.6b3d0de7.png | Bin 0 -> 81341 bytes .../static/media/yellow_25.c80682a1.png | Bin 0 -> 52738 bytes .../static/media/yellow_26.9515fed8.png | Bin 0 -> 76183 bytes .../static/media/yellow_27.39f40077.png | Bin 0 -> 44267 bytes .../static/media/yellow_28.62c928e0.png | Bin 0 -> 53510 bytes .../static/media/yellow_29.814e1ae9.png | Bin 0 -> 74636 bytes .../static/media/yellow_30.da6807ab.png | Bin 0 -> 67687 bytes .../static/media/yellow_31.6711c35a.png | Bin 0 -> 68677 bytes .../static/media/yellow_32.69e6297b.png | Bin 0 -> 45839 bytes .../static/media/yellow_33.09617a47.png | Bin 0 -> 52091 bytes .../static/media/yellow_34.3d4a6cf3.png | Bin 0 -> 68864 bytes .../static/media/yellow_35.fb698be9.png | Bin 0 -> 54684 bytes .../static/media/yellow_36.5f0064ba.png | Bin 0 -> 69667 bytes .../static/media/yellow_37.97ab7233.png | Bin 0 -> 49700 bytes .../static/media/yellow_38.db9671f2.png | Bin 0 -> 45715 bytes .../static/media/yellow_39.4e3eccdb.png | Bin 0 -> 76354 bytes .../static/media/yellow_40.fd420ba5.png | Bin 0 -> 47125 bytes .../static/media/yellow_41.16f96e17.png | Bin 0 -> 89225 bytes .../static/media/yellow_42.28f9d562.png | Bin 0 -> 76662 bytes .../static/media/yellow_43.70a3f7f9.png | Bin 0 -> 45511 bytes .../static/media/yellow_44.dd555793.png | Bin 0 -> 75784 bytes .../static/media/yellow_45.dabe7deb.png | Bin 0 -> 83232 bytes .../static/media/yellow_46.c7df1bd4.png | Bin 0 -> 82073 bytes .../static/media/yellow_47.4dfe7e69.png | Bin 0 -> 81193 bytes 272 files changed, 550 insertions(+) create mode 100644 site/public/skilltreetest/asset-manifest.json create mode 100644 site/public/skilltreetest/favicon.ico create mode 100644 site/public/skilltreetest/index.html create mode 100644 site/public/skilltreetest/logo192.png create mode 100644 site/public/skilltreetest/logo512.png create mode 100644 site/public/skilltreetest/manifest.json create mode 100644 site/public/skilltreetest/robots.txt create mode 100644 site/public/skilltreetest/static/css/main.a3da64f4.chunk.css create mode 100644 site/public/skilltreetest/static/css/main.a3da64f4.chunk.css.map create mode 100644 site/public/skilltreetest/static/js/2.ec28d3dc.chunk.js create mode 100644 site/public/skilltreetest/static/js/2.ec28d3dc.chunk.js.LICENSE.txt create mode 100644 site/public/skilltreetest/static/js/2.ec28d3dc.chunk.js.map create mode 100644 site/public/skilltreetest/static/js/3.fd51bca7.chunk.js create mode 100644 site/public/skilltreetest/static/js/3.fd51bca7.chunk.js.map create mode 100644 site/public/skilltreetest/static/js/main.1eb94fec.chunk.js create mode 100644 site/public/skilltreetest/static/js/main.1eb94fec.chunk.js.map create mode 100644 site/public/skilltreetest/static/js/runtime-main.3a446403.js create mode 100644 site/public/skilltreetest/static/js/runtime-main.3a446403.js.map create mode 100644 site/public/skilltreetest/static/media/addon_01.c0fb4483.png create mode 100644 site/public/skilltreetest/static/media/addon_02.1820823d.png create mode 100644 site/public/skilltreetest/static/media/addon_03.957f9cec.png create mode 100644 site/public/skilltreetest/static/media/addon_04.59c7b27c.png create mode 100644 site/public/skilltreetest/static/media/addon_05.a5fa4d3d.png create mode 100644 site/public/skilltreetest/static/media/addon_06.3e032369.png create mode 100644 site/public/skilltreetest/static/media/addon_07.a5f60c44.png create mode 100644 site/public/skilltreetest/static/media/addon_08.df88bdd1.png create mode 100644 site/public/skilltreetest/static/media/addon_09.549f774b.png create mode 100644 site/public/skilltreetest/static/media/addon_10.5e8c8874.png create mode 100644 site/public/skilltreetest/static/media/addon_11.219de378.png create mode 100644 site/public/skilltreetest/static/media/addon_12.03083e78.png create mode 100644 site/public/skilltreetest/static/media/addon_13.6c02e64c.png create mode 100644 site/public/skilltreetest/static/media/addon_14.9b1504c4.png create mode 100644 site/public/skilltreetest/static/media/addon_15.24b04aa9.png create mode 100644 site/public/skilltreetest/static/media/addon_16.15205adc.png create mode 100644 site/public/skilltreetest/static/media/addon_17.79373ccc.png create mode 100644 site/public/skilltreetest/static/media/addon_18.95e04587.png create mode 100644 site/public/skilltreetest/static/media/addon_19.0b59d26c.png create mode 100644 site/public/skilltreetest/static/media/addon_20.dbe4a50f.png create mode 100644 site/public/skilltreetest/static/media/addon_21.fa4d0c68.png create mode 100644 site/public/skilltreetest/static/media/addon_22.1ce9a9f9.png create mode 100644 site/public/skilltreetest/static/media/addon_23.d4aaf44e.png create mode 100644 site/public/skilltreetest/static/media/addon_24.7c97c4d0.png create mode 100644 site/public/skilltreetest/static/media/addon_25.9b240051.png create mode 100644 site/public/skilltreetest/static/media/addon_26.6bcd0248.png create mode 100644 site/public/skilltreetest/static/media/addon_27.3f0ff707.png create mode 100644 site/public/skilltreetest/static/media/addon_28.79ed1ce5.png create mode 100644 site/public/skilltreetest/static/media/addon_29.260a95d1.png create mode 100644 site/public/skilltreetest/static/media/addon_30.2428312f.png create mode 100644 site/public/skilltreetest/static/media/addon_31.0081f0a8.png create mode 100644 site/public/skilltreetest/static/media/addon_32.a900406d.png create mode 100644 site/public/skilltreetest/static/media/addon_33.55427c57.png create mode 100644 site/public/skilltreetest/static/media/addon_34.d258d29e.png create mode 100644 site/public/skilltreetest/static/media/addon_35.1ab26f09.png create mode 100644 site/public/skilltreetest/static/media/addon_36.64a8f972.png create mode 100644 site/public/skilltreetest/static/media/addon_37.b00f80ab.png create mode 100644 site/public/skilltreetest/static/media/addon_38.bb5721d9.png create mode 100644 site/public/skilltreetest/static/media/addon_39.77f8c546.png create mode 100644 site/public/skilltreetest/static/media/addon_40.8a910314.png create mode 100644 site/public/skilltreetest/static/media/blue_01.f249673b.png create mode 100644 site/public/skilltreetest/static/media/blue_02.feeaa190.png create mode 100644 site/public/skilltreetest/static/media/blue_03.71a425f1.png create mode 100644 site/public/skilltreetest/static/media/blue_04.d0469dbf.png create mode 100644 site/public/skilltreetest/static/media/blue_05.5389d340.png create mode 100644 site/public/skilltreetest/static/media/blue_06.7f9ac9e8.png create mode 100644 site/public/skilltreetest/static/media/blue_07.63287773.png create mode 100644 site/public/skilltreetest/static/media/blue_08.d638e98c.png create mode 100644 site/public/skilltreetest/static/media/blue_09.b9489a4d.png create mode 100644 site/public/skilltreetest/static/media/blue_10.4a204cff.png create mode 100644 site/public/skilltreetest/static/media/blue_11.4bd671bf.png create mode 100644 site/public/skilltreetest/static/media/blue_12.4d37ca4b.png create mode 100644 site/public/skilltreetest/static/media/blue_13.d2e7ad62.png create mode 100644 site/public/skilltreetest/static/media/blue_14.58373a83.png create mode 100644 site/public/skilltreetest/static/media/blue_15.0ced42d9.png create mode 100644 site/public/skilltreetest/static/media/blue_16.0aef057a.png create mode 100644 site/public/skilltreetest/static/media/blue_17.536a3b0e.png create mode 100644 site/public/skilltreetest/static/media/blue_18.021af490.png create mode 100644 site/public/skilltreetest/static/media/blue_19.16140c7f.png create mode 100644 site/public/skilltreetest/static/media/blue_20.36e2dd3b.png create mode 100644 site/public/skilltreetest/static/media/blue_21.2732f20e.png create mode 100644 site/public/skilltreetest/static/media/blue_22.296a31d2.png create mode 100644 site/public/skilltreetest/static/media/blue_23.0a4afb91.png create mode 100644 site/public/skilltreetest/static/media/blue_24.fa45421a.png create mode 100644 site/public/skilltreetest/static/media/blue_25.2732a560.png create mode 100644 site/public/skilltreetest/static/media/blue_26.2a348698.png create mode 100644 site/public/skilltreetest/static/media/blue_27.40085641.png create mode 100644 site/public/skilltreetest/static/media/blue_28.7740ccfe.png create mode 100644 site/public/skilltreetest/static/media/blue_29.88240e02.png create mode 100644 site/public/skilltreetest/static/media/blue_30.84ca6b4c.png create mode 100644 site/public/skilltreetest/static/media/blue_31.3e389d47.png create mode 100644 site/public/skilltreetest/static/media/blue_32.3707de47.png create mode 100644 site/public/skilltreetest/static/media/blue_33.78252c5e.png create mode 100644 site/public/skilltreetest/static/media/blue_34.ce6ff7fb.png create mode 100644 site/public/skilltreetest/static/media/blue_35.e391e6b6.png create mode 100644 site/public/skilltreetest/static/media/blue_36.068c4005.png create mode 100644 site/public/skilltreetest/static/media/blue_37.b397a661.png create mode 100644 site/public/skilltreetest/static/media/blue_38.94557b05.png create mode 100644 site/public/skilltreetest/static/media/blue_39.15b22ce1.png create mode 100644 site/public/skilltreetest/static/media/blue_40.5e4c7ed5.png create mode 100644 site/public/skilltreetest/static/media/blue_41.b2568b39.png create mode 100644 site/public/skilltreetest/static/media/blue_42.9352aea9.png create mode 100644 site/public/skilltreetest/static/media/emerald_01.327fbff4.png create mode 100644 site/public/skilltreetest/static/media/emerald_02.0c9afb4d.png create mode 100644 site/public/skilltreetest/static/media/emerald_03.e4e90739.png create mode 100644 site/public/skilltreetest/static/media/emerald_04.4ed4be50.png create mode 100644 site/public/skilltreetest/static/media/emerald_05.dc6c5451.png create mode 100644 site/public/skilltreetest/static/media/emerald_06.73847e5d.png create mode 100644 site/public/skilltreetest/static/media/emerald_07.7da7d8ef.png create mode 100644 site/public/skilltreetest/static/media/emerald_08.0c96e2aa.png create mode 100644 site/public/skilltreetest/static/media/emerald_09.c6d31cb2.png create mode 100644 site/public/skilltreetest/static/media/emerald_10.1bbadb04.png create mode 100644 site/public/skilltreetest/static/media/emerald_11.950d1f9c.png create mode 100644 site/public/skilltreetest/static/media/emerald_12.55d372a1.png create mode 100644 site/public/skilltreetest/static/media/emerald_13.a24a319c.png create mode 100644 site/public/skilltreetest/static/media/gray_01.091b532a.png create mode 100644 site/public/skilltreetest/static/media/gray_02.1b6a7131.png create mode 100644 site/public/skilltreetest/static/media/gray_03.4be0bb4f.png create mode 100644 site/public/skilltreetest/static/media/gray_04.058058b9.png create mode 100644 site/public/skilltreetest/static/media/gray_05.1e58fa31.png create mode 100644 site/public/skilltreetest/static/media/gray_06.c14f7e68.png create mode 100644 site/public/skilltreetest/static/media/gray_07.f37528de.png create mode 100644 site/public/skilltreetest/static/media/gray_08.bdeb3898.png create mode 100644 site/public/skilltreetest/static/media/gray_09.70af4e05.png create mode 100644 site/public/skilltreetest/static/media/gray_10.6f13ff42.png create mode 100644 site/public/skilltreetest/static/media/gray_11.3641f5e2.png create mode 100644 site/public/skilltreetest/static/media/gray_12.813ff61b.png create mode 100644 site/public/skilltreetest/static/media/green_01.5f60edde.png create mode 100644 site/public/skilltreetest/static/media/green_02.5894ec05.png create mode 100644 site/public/skilltreetest/static/media/green_03.f5c861ec.png create mode 100644 site/public/skilltreetest/static/media/green_04.18f915f0.png create mode 100644 site/public/skilltreetest/static/media/green_05.5a4b9323.png create mode 100644 site/public/skilltreetest/static/media/green_06.ea3d65f1.png create mode 100644 site/public/skilltreetest/static/media/green_07.af910d0e.png create mode 100644 site/public/skilltreetest/static/media/green_08.5c7092e5.png create mode 100644 site/public/skilltreetest/static/media/green_09.098d33fc.png create mode 100644 site/public/skilltreetest/static/media/green_10.5990df85.png create mode 100644 site/public/skilltreetest/static/media/green_11.a1fc6779.png create mode 100644 site/public/skilltreetest/static/media/green_12.fcc6bbe3.png create mode 100644 site/public/skilltreetest/static/media/green_13.e9437560.png create mode 100644 site/public/skilltreetest/static/media/green_14.b7a76185.png create mode 100644 site/public/skilltreetest/static/media/green_15.d157d698.png create mode 100644 site/public/skilltreetest/static/media/green_16.ba637e3d.png create mode 100644 site/public/skilltreetest/static/media/green_17.91c2378d.png create mode 100644 site/public/skilltreetest/static/media/green_18.27033642.png create mode 100644 site/public/skilltreetest/static/media/green_19.b8bf5a31.png create mode 100644 site/public/skilltreetest/static/media/green_20.26e0c4cb.png create mode 100644 site/public/skilltreetest/static/media/green_21.67d6da45.png create mode 100644 site/public/skilltreetest/static/media/green_22.b2dc8c57.png create mode 100644 site/public/skilltreetest/static/media/green_23.9300db09.png create mode 100644 site/public/skilltreetest/static/media/green_24.9cec35c1.png create mode 100644 site/public/skilltreetest/static/media/green_25.173b2a2a.png create mode 100644 site/public/skilltreetest/static/media/green_26.647f6a5d.png create mode 100644 site/public/skilltreetest/static/media/green_27.f4a332a9.png create mode 100644 site/public/skilltreetest/static/media/green_28.1903b8fc.png create mode 100644 site/public/skilltreetest/static/media/green_29.75dfb869.png create mode 100644 site/public/skilltreetest/static/media/green_30.eb5eb24d.png create mode 100644 site/public/skilltreetest/static/media/green_31.b394f682.png create mode 100644 site/public/skilltreetest/static/media/green_32.8690e84b.png create mode 100644 site/public/skilltreetest/static/media/green_33.9359ac46.png create mode 100644 site/public/skilltreetest/static/media/red_01.25ebdff4.png create mode 100644 site/public/skilltreetest/static/media/red_02.f2164a8b.png create mode 100644 site/public/skilltreetest/static/media/red_03.9c2425b1.png create mode 100644 site/public/skilltreetest/static/media/red_04.544fef54.png create mode 100644 site/public/skilltreetest/static/media/red_05.ae881830.png create mode 100644 site/public/skilltreetest/static/media/red_06.f1ecc539.png create mode 100644 site/public/skilltreetest/static/media/red_07.3880e6ac.png create mode 100644 site/public/skilltreetest/static/media/red_08.6a999964.png create mode 100644 site/public/skilltreetest/static/media/red_09.4a4b91d3.png create mode 100644 site/public/skilltreetest/static/media/red_10.7589b5cd.png create mode 100644 site/public/skilltreetest/static/media/red_11.97ce76dd.png create mode 100644 site/public/skilltreetest/static/media/red_12.3c0fdb6f.png create mode 100644 site/public/skilltreetest/static/media/red_13.a44808fd.png create mode 100644 site/public/skilltreetest/static/media/red_14.b5107b5d.png create mode 100644 site/public/skilltreetest/static/media/red_15.fcd091f8.png create mode 100644 site/public/skilltreetest/static/media/red_16.c47a89cd.png create mode 100644 site/public/skilltreetest/static/media/red_17.30fc6fc7.png create mode 100644 site/public/skilltreetest/static/media/red_18.5bf380ff.png create mode 100644 site/public/skilltreetest/static/media/red_19.be80608c.png create mode 100644 site/public/skilltreetest/static/media/red_20.90abbaa2.png create mode 100644 site/public/skilltreetest/static/media/red_21.c74257cd.png create mode 100644 site/public/skilltreetest/static/media/red_22.74cdd3f9.png create mode 100644 site/public/skilltreetest/static/media/red_23.2d2cb928.png create mode 100644 site/public/skilltreetest/static/media/red_24.8e35e9c3.png create mode 100644 site/public/skilltreetest/static/media/red_25.854590ee.png create mode 100644 site/public/skilltreetest/static/media/red_26.fa8db215.png create mode 100644 site/public/skilltreetest/static/media/red_27.30e7f9ef.png create mode 100644 site/public/skilltreetest/static/media/red_28.9b56d25a.png create mode 100644 site/public/skilltreetest/static/media/red_29.4384f010.png create mode 100644 site/public/skilltreetest/static/media/red_30.ed419aa6.png create mode 100644 site/public/skilltreetest/static/media/red_31.02763f37.png create mode 100644 site/public/skilltreetest/static/media/red_32.08b393ad.png create mode 100644 site/public/skilltreetest/static/media/red_33.a2ad693f.png create mode 100644 site/public/skilltreetest/static/media/red_34.7c56fcba.png create mode 100644 site/public/skilltreetest/static/media/red_35.6b1e5001.png create mode 100644 site/public/skilltreetest/static/media/red_36.d86cc29d.png create mode 100644 site/public/skilltreetest/static/media/red_37.ac42dd59.png create mode 100644 site/public/skilltreetest/static/media/skillBorder.dea18ced.png create mode 100644 site/public/skilltreetest/static/media/violet_01.9ae00b5d.png create mode 100644 site/public/skilltreetest/static/media/violet_02.f5313a21.png create mode 100644 site/public/skilltreetest/static/media/violet_03.308da286.png create mode 100644 site/public/skilltreetest/static/media/violet_04.070a8d91.png create mode 100644 site/public/skilltreetest/static/media/violet_05.89afdbd6.png create mode 100644 site/public/skilltreetest/static/media/violet_06.1bfca3da.png create mode 100644 site/public/skilltreetest/static/media/violet_07.99f7c00e.png create mode 100644 site/public/skilltreetest/static/media/violet_08.d4c7b46e.png create mode 100644 site/public/skilltreetest/static/media/violet_09.303cb3ce.png create mode 100644 site/public/skilltreetest/static/media/violet_10.b002e470.png create mode 100644 site/public/skilltreetest/static/media/violet_11.5094730d.png create mode 100644 site/public/skilltreetest/static/media/violet_12.6ead0d7c.png create mode 100644 site/public/skilltreetest/static/media/violet_13.dc895a3c.png create mode 100644 site/public/skilltreetest/static/media/violet_14.a4cd5200.png create mode 100644 site/public/skilltreetest/static/media/violet_15.6d264bd2.png create mode 100644 site/public/skilltreetest/static/media/violet_16.86179f9b.png create mode 100644 site/public/skilltreetest/static/media/violet_17.2cc51915.png create mode 100644 site/public/skilltreetest/static/media/violet_18.0689d355.png create mode 100644 site/public/skilltreetest/static/media/violet_19.ece511f3.png create mode 100644 site/public/skilltreetest/static/media/violet_20.0fd1896a.png create mode 100644 site/public/skilltreetest/static/media/violet_21.3de7d1d8.png create mode 100644 site/public/skilltreetest/static/media/violet_22.feb64214.png create mode 100644 site/public/skilltreetest/static/media/violet_23.dfcac389.png create mode 100644 site/public/skilltreetest/static/media/violet_24.b98dd1aa.png create mode 100644 site/public/skilltreetest/static/media/violet_25.e078fc45.png create mode 100644 site/public/skilltreetest/static/media/violet_26.646a8021.png create mode 100644 site/public/skilltreetest/static/media/violet_27.a2bee080.png create mode 100644 site/public/skilltreetest/static/media/violet_28.ee9c9db3.png create mode 100644 site/public/skilltreetest/static/media/violet_29.b8303692.png create mode 100644 site/public/skilltreetest/static/media/yellow_01.ee28dc27.png create mode 100644 site/public/skilltreetest/static/media/yellow_02.58f7cfa4.png create mode 100644 site/public/skilltreetest/static/media/yellow_03.8577308e.png create mode 100644 site/public/skilltreetest/static/media/yellow_04.cbd7b379.png create mode 100644 site/public/skilltreetest/static/media/yellow_05.9442193b.png create mode 100644 site/public/skilltreetest/static/media/yellow_06.87b39368.png create mode 100644 site/public/skilltreetest/static/media/yellow_07.ec8f1751.png create mode 100644 site/public/skilltreetest/static/media/yellow_08.9c6b3885.png create mode 100644 site/public/skilltreetest/static/media/yellow_09.7fffc61d.png create mode 100644 site/public/skilltreetest/static/media/yellow_10.b0544b31.png create mode 100644 site/public/skilltreetest/static/media/yellow_11.545d015e.png create mode 100644 site/public/skilltreetest/static/media/yellow_12.e9257578.png create mode 100644 site/public/skilltreetest/static/media/yellow_13.255a608a.png create mode 100644 site/public/skilltreetest/static/media/yellow_14.c893b448.png create mode 100644 site/public/skilltreetest/static/media/yellow_15.dac8e54e.png create mode 100644 site/public/skilltreetest/static/media/yellow_16.b7a5766e.png create mode 100644 site/public/skilltreetest/static/media/yellow_17.4a4082a2.png create mode 100644 site/public/skilltreetest/static/media/yellow_18.2ab8f357.png create mode 100644 site/public/skilltreetest/static/media/yellow_19.9d4c2764.png create mode 100644 site/public/skilltreetest/static/media/yellow_20.df55a929.png create mode 100644 site/public/skilltreetest/static/media/yellow_21.436e068c.png create mode 100644 site/public/skilltreetest/static/media/yellow_22.9d7c6b0a.png create mode 100644 site/public/skilltreetest/static/media/yellow_23.9356bb71.png create mode 100644 site/public/skilltreetest/static/media/yellow_24.6b3d0de7.png create mode 100644 site/public/skilltreetest/static/media/yellow_25.c80682a1.png create mode 100644 site/public/skilltreetest/static/media/yellow_26.9515fed8.png create mode 100644 site/public/skilltreetest/static/media/yellow_27.39f40077.png create mode 100644 site/public/skilltreetest/static/media/yellow_28.62c928e0.png create mode 100644 site/public/skilltreetest/static/media/yellow_29.814e1ae9.png create mode 100644 site/public/skilltreetest/static/media/yellow_30.da6807ab.png create mode 100644 site/public/skilltreetest/static/media/yellow_31.6711c35a.png create mode 100644 site/public/skilltreetest/static/media/yellow_32.69e6297b.png create mode 100644 site/public/skilltreetest/static/media/yellow_33.09617a47.png create mode 100644 site/public/skilltreetest/static/media/yellow_34.3d4a6cf3.png create mode 100644 site/public/skilltreetest/static/media/yellow_35.fb698be9.png create mode 100644 site/public/skilltreetest/static/media/yellow_36.5f0064ba.png create mode 100644 site/public/skilltreetest/static/media/yellow_37.97ab7233.png create mode 100644 site/public/skilltreetest/static/media/yellow_38.db9671f2.png create mode 100644 site/public/skilltreetest/static/media/yellow_39.4e3eccdb.png create mode 100644 site/public/skilltreetest/static/media/yellow_40.fd420ba5.png create mode 100644 site/public/skilltreetest/static/media/yellow_41.16f96e17.png create mode 100644 site/public/skilltreetest/static/media/yellow_42.28f9d562.png create mode 100644 site/public/skilltreetest/static/media/yellow_43.70a3f7f9.png create mode 100644 site/public/skilltreetest/static/media/yellow_44.dd555793.png create mode 100644 site/public/skilltreetest/static/media/yellow_45.dabe7deb.png create mode 100644 site/public/skilltreetest/static/media/yellow_46.c7df1bd4.png create mode 100644 site/public/skilltreetest/static/media/yellow_47.4dfe7e69.png diff --git a/site/public/skilltreetest/asset-manifest.json b/site/public/skilltreetest/asset-manifest.json new file mode 100644 index 00000000..4837f5f9 --- /dev/null +++ b/site/public/skilltreetest/asset-manifest.json @@ -0,0 +1,276 @@ +{ + "files": { + "main.css": "/skilltreetest/static/css/main.a3da64f4.chunk.css", + "main.js": "/skilltreetest/static/js/main.1eb94fec.chunk.js", + "main.js.map": "/skilltreetest/static/js/main.1eb94fec.chunk.js.map", + "runtime-main.js": "/skilltreetest/static/js/runtime-main.3a446403.js", + "runtime-main.js.map": "/skilltreetest/static/js/runtime-main.3a446403.js.map", + "static/js/2.ec28d3dc.chunk.js": "/skilltreetest/static/js/2.ec28d3dc.chunk.js", + "static/js/2.ec28d3dc.chunk.js.map": "/skilltreetest/static/js/2.ec28d3dc.chunk.js.map", + "static/js/3.fd51bca7.chunk.js": "/skilltreetest/static/js/3.fd51bca7.chunk.js", + "static/js/3.fd51bca7.chunk.js.map": "/skilltreetest/static/js/3.fd51bca7.chunk.js.map", + "index.html": "/skilltreetest/index.html", + "static/css/main.a3da64f4.chunk.css.map": "/skilltreetest/static/css/main.a3da64f4.chunk.css.map", + "static/js/2.ec28d3dc.chunk.js.LICENSE.txt": "/skilltreetest/static/js/2.ec28d3dc.chunk.js.LICENSE.txt", + "static/media/addon_01.c0fb4483.png": "/skilltreetest/static/media/addon_01.c0fb4483.png", + "static/media/addon_02.1820823d.png": "/skilltreetest/static/media/addon_02.1820823d.png", + "static/media/addon_03.957f9cec.png": "/skilltreetest/static/media/addon_03.957f9cec.png", + "static/media/addon_04.59c7b27c.png": "/skilltreetest/static/media/addon_04.59c7b27c.png", + "static/media/addon_05.a5fa4d3d.png": "/skilltreetest/static/media/addon_05.a5fa4d3d.png", + "static/media/addon_06.3e032369.png": "/skilltreetest/static/media/addon_06.3e032369.png", + "static/media/addon_07.a5f60c44.png": "/skilltreetest/static/media/addon_07.a5f60c44.png", + "static/media/addon_08.df88bdd1.png": "/skilltreetest/static/media/addon_08.df88bdd1.png", + "static/media/addon_09.549f774b.png": "/skilltreetest/static/media/addon_09.549f774b.png", + "static/media/addon_10.5e8c8874.png": "/skilltreetest/static/media/addon_10.5e8c8874.png", + "static/media/addon_11.219de378.png": "/skilltreetest/static/media/addon_11.219de378.png", + "static/media/addon_12.03083e78.png": "/skilltreetest/static/media/addon_12.03083e78.png", + "static/media/addon_13.6c02e64c.png": "/skilltreetest/static/media/addon_13.6c02e64c.png", + "static/media/addon_14.9b1504c4.png": "/skilltreetest/static/media/addon_14.9b1504c4.png", + "static/media/addon_15.24b04aa9.png": "/skilltreetest/static/media/addon_15.24b04aa9.png", + "static/media/addon_16.15205adc.png": "/skilltreetest/static/media/addon_16.15205adc.png", + "static/media/addon_17.79373ccc.png": "/skilltreetest/static/media/addon_17.79373ccc.png", + "static/media/addon_18.95e04587.png": "/skilltreetest/static/media/addon_18.95e04587.png", + "static/media/addon_19.0b59d26c.png": "/skilltreetest/static/media/addon_19.0b59d26c.png", + "static/media/addon_20.dbe4a50f.png": "/skilltreetest/static/media/addon_20.dbe4a50f.png", + "static/media/addon_21.fa4d0c68.png": "/skilltreetest/static/media/addon_21.fa4d0c68.png", + "static/media/addon_22.1ce9a9f9.png": "/skilltreetest/static/media/addon_22.1ce9a9f9.png", + "static/media/addon_23.d4aaf44e.png": "/skilltreetest/static/media/addon_23.d4aaf44e.png", + "static/media/addon_24.7c97c4d0.png": "/skilltreetest/static/media/addon_24.7c97c4d0.png", + "static/media/addon_25.9b240051.png": "/skilltreetest/static/media/addon_25.9b240051.png", + "static/media/addon_26.6bcd0248.png": "/skilltreetest/static/media/addon_26.6bcd0248.png", + "static/media/addon_27.3f0ff707.png": "/skilltreetest/static/media/addon_27.3f0ff707.png", + "static/media/addon_28.79ed1ce5.png": "/skilltreetest/static/media/addon_28.79ed1ce5.png", + "static/media/addon_29.260a95d1.png": "/skilltreetest/static/media/addon_29.260a95d1.png", + "static/media/addon_30.2428312f.png": "/skilltreetest/static/media/addon_30.2428312f.png", + "static/media/addon_31.0081f0a8.png": "/skilltreetest/static/media/addon_31.0081f0a8.png", + "static/media/addon_32.a900406d.png": "/skilltreetest/static/media/addon_32.a900406d.png", + "static/media/addon_33.55427c57.png": "/skilltreetest/static/media/addon_33.55427c57.png", + "static/media/addon_34.d258d29e.png": "/skilltreetest/static/media/addon_34.d258d29e.png", + "static/media/addon_35.1ab26f09.png": "/skilltreetest/static/media/addon_35.1ab26f09.png", + "static/media/addon_36.64a8f972.png": "/skilltreetest/static/media/addon_36.64a8f972.png", + "static/media/addon_37.b00f80ab.png": "/skilltreetest/static/media/addon_37.b00f80ab.png", + "static/media/addon_38.bb5721d9.png": "/skilltreetest/static/media/addon_38.bb5721d9.png", + "static/media/addon_39.77f8c546.png": "/skilltreetest/static/media/addon_39.77f8c546.png", + "static/media/addon_40.8a910314.png": "/skilltreetest/static/media/addon_40.8a910314.png", + "static/media/blue_01.f249673b.png": "/skilltreetest/static/media/blue_01.f249673b.png", + "static/media/blue_02.feeaa190.png": "/skilltreetest/static/media/blue_02.feeaa190.png", + "static/media/blue_03.71a425f1.png": "/skilltreetest/static/media/blue_03.71a425f1.png", + "static/media/blue_04.d0469dbf.png": "/skilltreetest/static/media/blue_04.d0469dbf.png", + "static/media/blue_05.5389d340.png": "/skilltreetest/static/media/blue_05.5389d340.png", + "static/media/blue_06.7f9ac9e8.png": "/skilltreetest/static/media/blue_06.7f9ac9e8.png", + "static/media/blue_07.63287773.png": "/skilltreetest/static/media/blue_07.63287773.png", + "static/media/blue_08.d638e98c.png": "/skilltreetest/static/media/blue_08.d638e98c.png", + "static/media/blue_09.b9489a4d.png": "/skilltreetest/static/media/blue_09.b9489a4d.png", + "static/media/blue_10.4a204cff.png": "/skilltreetest/static/media/blue_10.4a204cff.png", + "static/media/blue_11.4bd671bf.png": "/skilltreetest/static/media/blue_11.4bd671bf.png", + "static/media/blue_12.4d37ca4b.png": "/skilltreetest/static/media/blue_12.4d37ca4b.png", + "static/media/blue_13.d2e7ad62.png": "/skilltreetest/static/media/blue_13.d2e7ad62.png", + "static/media/blue_14.58373a83.png": "/skilltreetest/static/media/blue_14.58373a83.png", + "static/media/blue_15.0ced42d9.png": "/skilltreetest/static/media/blue_15.0ced42d9.png", + "static/media/blue_16.0aef057a.png": "/skilltreetest/static/media/blue_16.0aef057a.png", + "static/media/blue_17.536a3b0e.png": "/skilltreetest/static/media/blue_17.536a3b0e.png", + "static/media/blue_18.021af490.png": "/skilltreetest/static/media/blue_18.021af490.png", + "static/media/blue_19.16140c7f.png": "/skilltreetest/static/media/blue_19.16140c7f.png", + "static/media/blue_20.36e2dd3b.png": "/skilltreetest/static/media/blue_20.36e2dd3b.png", + "static/media/blue_21.2732f20e.png": "/skilltreetest/static/media/blue_21.2732f20e.png", + "static/media/blue_22.296a31d2.png": "/skilltreetest/static/media/blue_22.296a31d2.png", + "static/media/blue_23.0a4afb91.png": "/skilltreetest/static/media/blue_23.0a4afb91.png", + "static/media/blue_24.fa45421a.png": "/skilltreetest/static/media/blue_24.fa45421a.png", + "static/media/blue_25.2732a560.png": "/skilltreetest/static/media/blue_25.2732a560.png", + "static/media/blue_26.2a348698.png": "/skilltreetest/static/media/blue_26.2a348698.png", + "static/media/blue_27.40085641.png": "/skilltreetest/static/media/blue_27.40085641.png", + "static/media/blue_28.7740ccfe.png": "/skilltreetest/static/media/blue_28.7740ccfe.png", + "static/media/blue_29.88240e02.png": "/skilltreetest/static/media/blue_29.88240e02.png", + "static/media/blue_30.84ca6b4c.png": "/skilltreetest/static/media/blue_30.84ca6b4c.png", + "static/media/blue_31.3e389d47.png": "/skilltreetest/static/media/blue_31.3e389d47.png", + "static/media/blue_32.3707de47.png": "/skilltreetest/static/media/blue_32.3707de47.png", + "static/media/blue_33.78252c5e.png": "/skilltreetest/static/media/blue_33.78252c5e.png", + "static/media/blue_34.ce6ff7fb.png": "/skilltreetest/static/media/blue_34.ce6ff7fb.png", + "static/media/blue_35.e391e6b6.png": "/skilltreetest/static/media/blue_35.e391e6b6.png", + "static/media/blue_36.068c4005.png": "/skilltreetest/static/media/blue_36.068c4005.png", + "static/media/blue_37.b397a661.png": "/skilltreetest/static/media/blue_37.b397a661.png", + "static/media/blue_38.94557b05.png": "/skilltreetest/static/media/blue_38.94557b05.png", + "static/media/blue_39.15b22ce1.png": "/skilltreetest/static/media/blue_39.15b22ce1.png", + "static/media/blue_40.5e4c7ed5.png": "/skilltreetest/static/media/blue_40.5e4c7ed5.png", + "static/media/blue_41.b2568b39.png": "/skilltreetest/static/media/blue_41.b2568b39.png", + "static/media/blue_42.9352aea9.png": "/skilltreetest/static/media/blue_42.9352aea9.png", + "static/media/emerald_01.327fbff4.png": "/skilltreetest/static/media/emerald_01.327fbff4.png", + "static/media/emerald_02.0c9afb4d.png": "/skilltreetest/static/media/emerald_02.0c9afb4d.png", + "static/media/emerald_03.e4e90739.png": "/skilltreetest/static/media/emerald_03.e4e90739.png", + "static/media/emerald_04.4ed4be50.png": "/skilltreetest/static/media/emerald_04.4ed4be50.png", + "static/media/emerald_05.dc6c5451.png": "/skilltreetest/static/media/emerald_05.dc6c5451.png", + "static/media/emerald_06.73847e5d.png": "/skilltreetest/static/media/emerald_06.73847e5d.png", + "static/media/emerald_07.7da7d8ef.png": "/skilltreetest/static/media/emerald_07.7da7d8ef.png", + "static/media/emerald_08.0c96e2aa.png": "/skilltreetest/static/media/emerald_08.0c96e2aa.png", + "static/media/emerald_09.c6d31cb2.png": "/skilltreetest/static/media/emerald_09.c6d31cb2.png", + "static/media/emerald_10.1bbadb04.png": "/skilltreetest/static/media/emerald_10.1bbadb04.png", + "static/media/emerald_11.950d1f9c.png": "/skilltreetest/static/media/emerald_11.950d1f9c.png", + "static/media/emerald_12.55d372a1.png": "/skilltreetest/static/media/emerald_12.55d372a1.png", + "static/media/emerald_13.a24a319c.png": "/skilltreetest/static/media/emerald_13.a24a319c.png", + "static/media/gray_01.091b532a.png": "/skilltreetest/static/media/gray_01.091b532a.png", + "static/media/gray_02.1b6a7131.png": "/skilltreetest/static/media/gray_02.1b6a7131.png", + "static/media/gray_03.4be0bb4f.png": "/skilltreetest/static/media/gray_03.4be0bb4f.png", + "static/media/gray_04.058058b9.png": "/skilltreetest/static/media/gray_04.058058b9.png", + "static/media/gray_05.1e58fa31.png": "/skilltreetest/static/media/gray_05.1e58fa31.png", + "static/media/gray_06.c14f7e68.png": "/skilltreetest/static/media/gray_06.c14f7e68.png", + "static/media/gray_07.f37528de.png": "/skilltreetest/static/media/gray_07.f37528de.png", + "static/media/gray_08.bdeb3898.png": "/skilltreetest/static/media/gray_08.bdeb3898.png", + "static/media/gray_09.70af4e05.png": "/skilltreetest/static/media/gray_09.70af4e05.png", + "static/media/gray_10.6f13ff42.png": "/skilltreetest/static/media/gray_10.6f13ff42.png", + "static/media/gray_11.3641f5e2.png": "/skilltreetest/static/media/gray_11.3641f5e2.png", + "static/media/gray_12.813ff61b.png": "/skilltreetest/static/media/gray_12.813ff61b.png", + "static/media/green_01.5f60edde.png": "/skilltreetest/static/media/green_01.5f60edde.png", + "static/media/green_02.5894ec05.png": "/skilltreetest/static/media/green_02.5894ec05.png", + "static/media/green_03.f5c861ec.png": "/skilltreetest/static/media/green_03.f5c861ec.png", + "static/media/green_04.18f915f0.png": "/skilltreetest/static/media/green_04.18f915f0.png", + "static/media/green_05.5a4b9323.png": "/skilltreetest/static/media/green_05.5a4b9323.png", + "static/media/green_06.ea3d65f1.png": "/skilltreetest/static/media/green_06.ea3d65f1.png", + "static/media/green_07.af910d0e.png": "/skilltreetest/static/media/green_07.af910d0e.png", + "static/media/green_08.5c7092e5.png": "/skilltreetest/static/media/green_08.5c7092e5.png", + "static/media/green_09.098d33fc.png": "/skilltreetest/static/media/green_09.098d33fc.png", + "static/media/green_10.5990df85.png": "/skilltreetest/static/media/green_10.5990df85.png", + "static/media/green_11.a1fc6779.png": "/skilltreetest/static/media/green_11.a1fc6779.png", + "static/media/green_12.fcc6bbe3.png": "/skilltreetest/static/media/green_12.fcc6bbe3.png", + "static/media/green_13.e9437560.png": "/skilltreetest/static/media/green_13.e9437560.png", + "static/media/green_14.b7a76185.png": "/skilltreetest/static/media/green_14.b7a76185.png", + "static/media/green_15.d157d698.png": "/skilltreetest/static/media/green_15.d157d698.png", + "static/media/green_16.ba637e3d.png": "/skilltreetest/static/media/green_16.ba637e3d.png", + "static/media/green_17.91c2378d.png": "/skilltreetest/static/media/green_17.91c2378d.png", + "static/media/green_18.27033642.png": "/skilltreetest/static/media/green_18.27033642.png", + "static/media/green_19.b8bf5a31.png": "/skilltreetest/static/media/green_19.b8bf5a31.png", + "static/media/green_20.26e0c4cb.png": "/skilltreetest/static/media/green_20.26e0c4cb.png", + "static/media/green_21.67d6da45.png": "/skilltreetest/static/media/green_21.67d6da45.png", + "static/media/green_22.b2dc8c57.png": "/skilltreetest/static/media/green_22.b2dc8c57.png", + "static/media/green_23.9300db09.png": "/skilltreetest/static/media/green_23.9300db09.png", + "static/media/green_24.9cec35c1.png": "/skilltreetest/static/media/green_24.9cec35c1.png", + "static/media/green_25.173b2a2a.png": "/skilltreetest/static/media/green_25.173b2a2a.png", + "static/media/green_26.647f6a5d.png": "/skilltreetest/static/media/green_26.647f6a5d.png", + "static/media/green_27.f4a332a9.png": "/skilltreetest/static/media/green_27.f4a332a9.png", + "static/media/green_28.1903b8fc.png": "/skilltreetest/static/media/green_28.1903b8fc.png", + "static/media/green_29.75dfb869.png": "/skilltreetest/static/media/green_29.75dfb869.png", + "static/media/green_30.eb5eb24d.png": "/skilltreetest/static/media/green_30.eb5eb24d.png", + "static/media/green_31.b394f682.png": "/skilltreetest/static/media/green_31.b394f682.png", + "static/media/green_32.8690e84b.png": "/skilltreetest/static/media/green_32.8690e84b.png", + "static/media/green_33.9359ac46.png": "/skilltreetest/static/media/green_33.9359ac46.png", + "static/media/red_01.25ebdff4.png": "/skilltreetest/static/media/red_01.25ebdff4.png", + "static/media/red_02.f2164a8b.png": "/skilltreetest/static/media/red_02.f2164a8b.png", + "static/media/red_03.9c2425b1.png": "/skilltreetest/static/media/red_03.9c2425b1.png", + "static/media/red_04.544fef54.png": "/skilltreetest/static/media/red_04.544fef54.png", + "static/media/red_05.ae881830.png": "/skilltreetest/static/media/red_05.ae881830.png", + "static/media/red_06.f1ecc539.png": "/skilltreetest/static/media/red_06.f1ecc539.png", + "static/media/red_07.3880e6ac.png": "/skilltreetest/static/media/red_07.3880e6ac.png", + "static/media/red_08.6a999964.png": "/skilltreetest/static/media/red_08.6a999964.png", + "static/media/red_09.4a4b91d3.png": "/skilltreetest/static/media/red_09.4a4b91d3.png", + "static/media/red_10.7589b5cd.png": "/skilltreetest/static/media/red_10.7589b5cd.png", + "static/media/red_11.97ce76dd.png": "/skilltreetest/static/media/red_11.97ce76dd.png", + "static/media/red_12.3c0fdb6f.png": "/skilltreetest/static/media/red_12.3c0fdb6f.png", + "static/media/red_13.a44808fd.png": "/skilltreetest/static/media/red_13.a44808fd.png", + "static/media/red_14.b5107b5d.png": "/skilltreetest/static/media/red_14.b5107b5d.png", + "static/media/red_15.fcd091f8.png": "/skilltreetest/static/media/red_15.fcd091f8.png", + "static/media/red_16.c47a89cd.png": "/skilltreetest/static/media/red_16.c47a89cd.png", + "static/media/red_17.30fc6fc7.png": "/skilltreetest/static/media/red_17.30fc6fc7.png", + "static/media/red_18.5bf380ff.png": "/skilltreetest/static/media/red_18.5bf380ff.png", + "static/media/red_19.be80608c.png": "/skilltreetest/static/media/red_19.be80608c.png", + "static/media/red_20.90abbaa2.png": "/skilltreetest/static/media/red_20.90abbaa2.png", + "static/media/red_21.c74257cd.png": "/skilltreetest/static/media/red_21.c74257cd.png", + "static/media/red_22.74cdd3f9.png": "/skilltreetest/static/media/red_22.74cdd3f9.png", + "static/media/red_23.2d2cb928.png": "/skilltreetest/static/media/red_23.2d2cb928.png", + "static/media/red_24.8e35e9c3.png": "/skilltreetest/static/media/red_24.8e35e9c3.png", + "static/media/red_25.854590ee.png": "/skilltreetest/static/media/red_25.854590ee.png", + "static/media/red_26.fa8db215.png": "/skilltreetest/static/media/red_26.fa8db215.png", + "static/media/red_27.30e7f9ef.png": "/skilltreetest/static/media/red_27.30e7f9ef.png", + "static/media/red_28.9b56d25a.png": "/skilltreetest/static/media/red_28.9b56d25a.png", + "static/media/red_29.4384f010.png": "/skilltreetest/static/media/red_29.4384f010.png", + "static/media/red_30.ed419aa6.png": "/skilltreetest/static/media/red_30.ed419aa6.png", + "static/media/red_31.02763f37.png": "/skilltreetest/static/media/red_31.02763f37.png", + "static/media/red_32.08b393ad.png": "/skilltreetest/static/media/red_32.08b393ad.png", + "static/media/red_33.a2ad693f.png": "/skilltreetest/static/media/red_33.a2ad693f.png", + "static/media/red_34.7c56fcba.png": "/skilltreetest/static/media/red_34.7c56fcba.png", + "static/media/red_35.6b1e5001.png": "/skilltreetest/static/media/red_35.6b1e5001.png", + "static/media/red_36.d86cc29d.png": "/skilltreetest/static/media/red_36.d86cc29d.png", + "static/media/red_37.ac42dd59.png": "/skilltreetest/static/media/red_37.ac42dd59.png", + "static/media/skillBorder.dea18ced.png": "/skilltreetest/static/media/skillBorder.dea18ced.png", + "static/media/violet_01.9ae00b5d.png": "/skilltreetest/static/media/violet_01.9ae00b5d.png", + "static/media/violet_02.f5313a21.png": "/skilltreetest/static/media/violet_02.f5313a21.png", + "static/media/violet_03.308da286.png": "/skilltreetest/static/media/violet_03.308da286.png", + "static/media/violet_04.070a8d91.png": "/skilltreetest/static/media/violet_04.070a8d91.png", + "static/media/violet_05.89afdbd6.png": "/skilltreetest/static/media/violet_05.89afdbd6.png", + "static/media/violet_06.1bfca3da.png": "/skilltreetest/static/media/violet_06.1bfca3da.png", + "static/media/violet_07.99f7c00e.png": "/skilltreetest/static/media/violet_07.99f7c00e.png", + "static/media/violet_08.d4c7b46e.png": "/skilltreetest/static/media/violet_08.d4c7b46e.png", + "static/media/violet_09.303cb3ce.png": "/skilltreetest/static/media/violet_09.303cb3ce.png", + "static/media/violet_10.b002e470.png": "/skilltreetest/static/media/violet_10.b002e470.png", + "static/media/violet_11.5094730d.png": "/skilltreetest/static/media/violet_11.5094730d.png", + "static/media/violet_12.6ead0d7c.png": "/skilltreetest/static/media/violet_12.6ead0d7c.png", + "static/media/violet_13.dc895a3c.png": "/skilltreetest/static/media/violet_13.dc895a3c.png", + "static/media/violet_14.a4cd5200.png": "/skilltreetest/static/media/violet_14.a4cd5200.png", + "static/media/violet_15.6d264bd2.png": "/skilltreetest/static/media/violet_15.6d264bd2.png", + "static/media/violet_16.86179f9b.png": "/skilltreetest/static/media/violet_16.86179f9b.png", + "static/media/violet_17.2cc51915.png": "/skilltreetest/static/media/violet_17.2cc51915.png", + "static/media/violet_18.0689d355.png": "/skilltreetest/static/media/violet_18.0689d355.png", + "static/media/violet_19.ece511f3.png": "/skilltreetest/static/media/violet_19.ece511f3.png", + "static/media/violet_20.0fd1896a.png": "/skilltreetest/static/media/violet_20.0fd1896a.png", + "static/media/violet_21.3de7d1d8.png": "/skilltreetest/static/media/violet_21.3de7d1d8.png", + "static/media/violet_22.feb64214.png": "/skilltreetest/static/media/violet_22.feb64214.png", + "static/media/violet_23.dfcac389.png": "/skilltreetest/static/media/violet_23.dfcac389.png", + "static/media/violet_24.b98dd1aa.png": "/skilltreetest/static/media/violet_24.b98dd1aa.png", + "static/media/violet_25.e078fc45.png": "/skilltreetest/static/media/violet_25.e078fc45.png", + "static/media/violet_26.646a8021.png": "/skilltreetest/static/media/violet_26.646a8021.png", + "static/media/violet_27.a2bee080.png": "/skilltreetest/static/media/violet_27.a2bee080.png", + "static/media/violet_28.ee9c9db3.png": "/skilltreetest/static/media/violet_28.ee9c9db3.png", + "static/media/violet_29.b8303692.png": "/skilltreetest/static/media/violet_29.b8303692.png", + "static/media/yellow_01.ee28dc27.png": "/skilltreetest/static/media/yellow_01.ee28dc27.png", + "static/media/yellow_02.58f7cfa4.png": "/skilltreetest/static/media/yellow_02.58f7cfa4.png", + "static/media/yellow_03.8577308e.png": "/skilltreetest/static/media/yellow_03.8577308e.png", + "static/media/yellow_04.cbd7b379.png": "/skilltreetest/static/media/yellow_04.cbd7b379.png", + "static/media/yellow_05.9442193b.png": "/skilltreetest/static/media/yellow_05.9442193b.png", + "static/media/yellow_06.87b39368.png": "/skilltreetest/static/media/yellow_06.87b39368.png", + "static/media/yellow_07.ec8f1751.png": "/skilltreetest/static/media/yellow_07.ec8f1751.png", + "static/media/yellow_08.9c6b3885.png": "/skilltreetest/static/media/yellow_08.9c6b3885.png", + "static/media/yellow_09.7fffc61d.png": "/skilltreetest/static/media/yellow_09.7fffc61d.png", + "static/media/yellow_10.b0544b31.png": "/skilltreetest/static/media/yellow_10.b0544b31.png", + "static/media/yellow_11.545d015e.png": "/skilltreetest/static/media/yellow_11.545d015e.png", + "static/media/yellow_12.e9257578.png": "/skilltreetest/static/media/yellow_12.e9257578.png", + "static/media/yellow_13.255a608a.png": "/skilltreetest/static/media/yellow_13.255a608a.png", + "static/media/yellow_14.c893b448.png": "/skilltreetest/static/media/yellow_14.c893b448.png", + "static/media/yellow_15.dac8e54e.png": "/skilltreetest/static/media/yellow_15.dac8e54e.png", + "static/media/yellow_16.b7a5766e.png": "/skilltreetest/static/media/yellow_16.b7a5766e.png", + "static/media/yellow_17.4a4082a2.png": "/skilltreetest/static/media/yellow_17.4a4082a2.png", + "static/media/yellow_18.2ab8f357.png": "/skilltreetest/static/media/yellow_18.2ab8f357.png", + "static/media/yellow_19.9d4c2764.png": "/skilltreetest/static/media/yellow_19.9d4c2764.png", + "static/media/yellow_20.df55a929.png": "/skilltreetest/static/media/yellow_20.df55a929.png", + "static/media/yellow_21.436e068c.png": "/skilltreetest/static/media/yellow_21.436e068c.png", + "static/media/yellow_22.9d7c6b0a.png": "/skilltreetest/static/media/yellow_22.9d7c6b0a.png", + "static/media/yellow_23.9356bb71.png": "/skilltreetest/static/media/yellow_23.9356bb71.png", + "static/media/yellow_24.6b3d0de7.png": "/skilltreetest/static/media/yellow_24.6b3d0de7.png", + "static/media/yellow_25.c80682a1.png": "/skilltreetest/static/media/yellow_25.c80682a1.png", + "static/media/yellow_26.9515fed8.png": "/skilltreetest/static/media/yellow_26.9515fed8.png", + "static/media/yellow_27.39f40077.png": "/skilltreetest/static/media/yellow_27.39f40077.png", + "static/media/yellow_28.62c928e0.png": "/skilltreetest/static/media/yellow_28.62c928e0.png", + "static/media/yellow_29.814e1ae9.png": "/skilltreetest/static/media/yellow_29.814e1ae9.png", + "static/media/yellow_30.da6807ab.png": "/skilltreetest/static/media/yellow_30.da6807ab.png", + "static/media/yellow_31.6711c35a.png": "/skilltreetest/static/media/yellow_31.6711c35a.png", + "static/media/yellow_32.69e6297b.png": "/skilltreetest/static/media/yellow_32.69e6297b.png", + "static/media/yellow_33.09617a47.png": "/skilltreetest/static/media/yellow_33.09617a47.png", + "static/media/yellow_34.3d4a6cf3.png": "/skilltreetest/static/media/yellow_34.3d4a6cf3.png", + "static/media/yellow_35.fb698be9.png": "/skilltreetest/static/media/yellow_35.fb698be9.png", + "static/media/yellow_36.5f0064ba.png": "/skilltreetest/static/media/yellow_36.5f0064ba.png", + "static/media/yellow_37.97ab7233.png": "/skilltreetest/static/media/yellow_37.97ab7233.png", + "static/media/yellow_38.db9671f2.png": "/skilltreetest/static/media/yellow_38.db9671f2.png", + "static/media/yellow_39.4e3eccdb.png": "/skilltreetest/static/media/yellow_39.4e3eccdb.png", + "static/media/yellow_40.fd420ba5.png": "/skilltreetest/static/media/yellow_40.fd420ba5.png", + "static/media/yellow_41.16f96e17.png": "/skilltreetest/static/media/yellow_41.16f96e17.png", + "static/media/yellow_42.28f9d562.png": "/skilltreetest/static/media/yellow_42.28f9d562.png", + "static/media/yellow_43.70a3f7f9.png": "/skilltreetest/static/media/yellow_43.70a3f7f9.png", + "static/media/yellow_44.dd555793.png": "/skilltreetest/static/media/yellow_44.dd555793.png", + "static/media/yellow_45.dabe7deb.png": "/skilltreetest/static/media/yellow_45.dabe7deb.png", + "static/media/yellow_46.c7df1bd4.png": "/skilltreetest/static/media/yellow_46.c7df1bd4.png", + "static/media/yellow_47.4dfe7e69.png": "/skilltreetest/static/media/yellow_47.4dfe7e69.png" + }, + "entrypoints": [ + "static/js/runtime-main.3a446403.js", + "static/js/2.ec28d3dc.chunk.js", + "static/css/main.a3da64f4.chunk.css", + "static/js/main.1eb94fec.chunk.js" + ] +} \ No newline at end of file diff --git a/site/public/skilltreetest/favicon.ico b/site/public/skilltreetest/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..53dff0bf94b9feca885e94f102bd680807b3b230 GIT binary patch literal 15406 zcmeHOS$CYraYat@1DuDv>m`nzlVj0ZY&nu0#g?r#j#iqHY;CknOR*)A;x3uHs8A$9 z5+DI$B|z*TFu)9E-vFjz>CAVCt~Cdsm$Us1WYs(UbU?3|Ol#yF==fAcNfx2mhF zyKgmWYW||;FKfQ^r5cp?)coSFYHGewQ&V%#J@)%6e_d14j(cm?xaVK4sVV(UP0d&E z4nDybb|1wb{fl(BNVL06BHgVL?P*hqXxT2&-m?;;^mRzI@2vjjy|J!V8EQW*eP?PV zg6jys??LImbM-`ftPWpKq_-XKv`ZN82Ra(1ueny@{hdzENqpd(Bp_^0+wDc^u2~oB zXIo>yI@;MJgKhPa9_f?JNWV%t&?l*3N{=LmdL(teTats_k{IlgSU>Bf4rm|s1iP9Q zLoPfdx$v;b7_Pm9&Pz5pAlcCY$plgVXuqUTe^Tr2Mtz;Ar(MS5K}bl(W21WA-_a_E z_8*jBf43CztQa5FGK)6&PCml6hEV5#Bv98>CL*P@Nuak|8k){YGCw89PqoSR_Ycap zUHfF?d+*De8#c>(+jdJX8kC9Tn6||_r?c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gDFP0U`H%Sqal0|>$}&rc`Izazdpx`1`-ak9)Y!Z>#;EF%o+C7-N{t-g*|t`G>_Au5&n70XNRA zRQBx&zi!|eol)>zI49%rJ3Hxl9kk1~bnIa+F#8!EKTmLM+BqrqgT|eZBRO}J6y<#7cG`L?oJ7)8j?`NH> zs^&=5L-lbs1unHEOJc+`)^i$bh6DTdX`fZkxi&t5S+T>W%IDZxfOFAA)tMlRFPvk! zKE_(#iLEzzHp|XOWs##ufk)IBp>v?&u=NP8E9(RHyBEVvyu@8{^S_;GO6%Flruurd zyUwSGi<2&ftG_UQINK7ponx|+SXagNCI!rej5Cat#BDwwlnnfa|I5U4M)Y-ybB4+0 zaf`)_b(~vtT|~^zuhjOc17joJ#Wm-eT{wF=*n|JkgKlNUbljUnETO+}pHT5_p2ebl vosDfTLVKI=Tol(fSkill Tree Test
\ No newline at end of file diff --git a/site/public/skilltreetest/logo192.png b/site/public/skilltreetest/logo192.png new file mode 100644 index 0000000000000000000000000000000000000000..858b86dabeaf36c12d22156c58f0eab1fcec2e97 GIT binary patch literal 50725 zcmV)HK)t_-P)o==?JzV|=X}H7D?IC2VOMs%_)51@sfb8Lx?PcO zw=303MLO+{R4ZMnR%_B~cLbji`*)=)`a!XO=|5HcyWQPB2p9oWu+q3 zN>w^tTubkxfB0{`XSG_jpXr}Yr-NsyR;AkQ*tPBA-L6#hfBK9ay@NheO}cthdjY>d z6~DLV<^B8;_T36Tis#Ym*j1(55q)Cm+Ot%pTdhg8+m>pjBUP!$^vs+*_|Sv$=Ibv@ zqh6J3uDM2Tzv~|9>+6@cJ~N(3y1FR#Us$(}zc1fU-_4%6(-mD>T^s$GK2N8j?BpsB>B@QMUm!of_ZKocI_eveu7XWeVQ>Qj#W3*|eF=LfE~Bjjo(G!>u~)@_q?$%Z zyWP$&pQWcDe0396y>>QIkZylpe>?8G88rWc@8G$*Rh0`dp|d^bhvJs`-l?Hd1u;bo z*Gm`X`l_^bAv5uh-V^o>3dLu)$F5egDd|AT+(c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ition:right .2s;display:flex;flex-direction:column}.sidepanel-toggles button{background:#242a33;padding:10px;border-radius:2px;box-shadow:3px 4px 5px #000;color:#ffab40;cursor:pointer;white-space:nowrap}.sidepanel.open~.sidepanel-toggles{right:calc(33vw + 26px)}.sidepanel .spacer{flex-grow:1}.sidepanel ul{padding:0;display:inline;font-weight:700;list-style:none;text-align:center}.sidepanel ul:not(.browser-default){padding-left:0;list-style-type:none}.sidepanel ul:not(.browser-default) li{list-style-type:none}.sidepanel ul li{vertical-align:middle;white-space:nowrap;padding-right:8px;padding-left:8px;display:inline}:root{--foreground:#b4bdcb;--background:#242a33;--far-background:#111924;--raised:#2a323d;--highlight:#333c4a;--focus:#a3c9ef;--inactive:#697a96;--disabled:grey;--warning:#71262f}html{background-color:#111924;background-color:var(--far-background);color:#b4bdcb;color:var(--foreground);font-family:"Roboto",sans-serif;-webkit-user-select:none;-ms-user-select:none;user-select:none}body,html{height:100%}body{background:transparent;margin:0;padding:0;overflow:hidden}a{color:#ffab40;cursor:pointer;text-decoration:none}a:focus{outline:none}.checkbox-label,input{margin-bottom:8px;margin-top:8px;font-size:16px}input[type=number],input[type=password],input[type=search],input[type=text],select{background:none;border:none;border-bottom:2px solid #697a96;border-bottom:2px solid var(--inactive);color:#b4bdcb;color:var(--foreground);transition:border .3s;width:100%}input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=text]:focus,select:focus{border-bottom:2px solid #b4bdcb;border-bottom:2px solid var(--foreground);outline:none}input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none;height:10px;width:10px;margin-bottom:3px;padding:1px;background:-webkit-linear-gradient(-45deg,transparent,transparent 45%,var(--foreground) 0,var(--foreground) 56%,transparent 0,transparent),-webkit-linear-gradient(45deg,transparent,transparent 45%,var(--foreground) 0,var(--foreground) 56%,transparent 0,transparent);cursor:pointer}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:4px;background:#111924;background:var(--far-background);outline:none;border-radius:4px;min-width:40px}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:12px;height:12px;cursor:pointer;background:#242a33;background:var(--background);border:2px solid #111924;border:2px solid var(--far-background);border-radius:50%}input[type=range]::-webkit-slider-thumb:hover{background:#333c4a;background:var(--highlight)}input[type=color]{-webkit-appearance:none;border:2px solid #697a96;border:2px solid var(--inactive);outline:none;padding:0}input[type=color]:focus{border-color:#b4bdcb;border-color:var(--foreground)}input[type=color]:disabled{border-color:grey;border-color:var(--disabled)}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:none}button{background:#333c4a;background:var(--highlight);border:none;color:#ffab40;cursor:pointer;font-size:16px;margin:10px;text-align:left;transition:background-color .1s ease-in;border-radius:10px}button:focus{color:#a3c9ef;color:var(--focus);outline:none}button:hover{background-color:#2a323d;background-color:var(--raised)}select option{color:#000}button:disabled,input:disabled,select:disabled{color:grey;color:var(--disabled)}h4{border-bottom:solid #b4bdcb;border-bottom:solid var(--foreground);text-align:center;width:50%;margin:.25em auto .5em}textarea{font-family:sans-serif;font-size:16px;resize:none;background:none;border:none;border-bottom:2px solid #969696;color:#b4bdcb;color:var(--foreground);transition:border .3s}textarea:focus{border-bottom:2px solid #c9c9c9;outline:none}img{position:relative;overflow:hidden;background-color:#242a33;background-color:var(--background)}img:after{background-color:inherit;display:block;position:absolute;z-index:2;top:0;left:0;width:100%;height:100%;content:""}::-webkit-scrollbar{height:28px;width:14px}::-webkit-scrollbar-thumb{border:8px solid transparent;background-clip:padding-box;-webkit-border-radius:20px;background-color:rgba(0,0,0,.6)}#root,.App{width:100%;height:100%}.App{display:flex} +/*# sourceMappingURL=main.a3da64f4.chunk.css.map */ \ No newline at end of file diff --git a/site/public/skilltreetest/static/css/main.a3da64f4.chunk.css.map b/site/public/skilltreetest/static/css/main.a3da64f4.chunk.css.map new file mode 100644 index 00000000..19b9dba4 --- /dev/null +++ b/site/public/skilltreetest/static/css/main.a3da64f4.chunk.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://D:/projects/kronos/src/components/ui/tooltip.css","webpack://D:/projects/kronos/src/components/skills/skills.css","webpack://D:/projects/kronos/src/components/sidepanel/editor.css","webpack://D:/projects/kronos/src/components/sidepanel/sidepanel.css","webpack://D:/projects/kronos/src/index.css"],"names":[],"mappings":"AAAA,SACC,iBAAkB,CACf,eAAiB,CACjB,SAAU,CACV,4CAA8C,CAC9C,eAAgB,CAChB,iBAAkB,CAClB,SAAU,CACV,mEAA4E,CAC5E,mBAAoB,CACpB,cACJ,CAEA,gBACI,SAAU,CACV,WACJ,CAEA,gBACI,UAAW,CACX,aAAc,CACd,OAAQ,CACR,QAAS,CACT,iBAAkB,CAClB,kCAAmC,CACnC,mCAAoC,CACpC,0BAA4B,CAC5B,qBAAsB,CACtB,QACJ,CC7BA,gBACI,iBAAkB,CAClB,WAAY,CACZ,QAAS,CACT,0BAA2B,CAC3B,kBAAmB,CACnB,kBAAmB,CACnB,YAAa,CACb,iBAAkB,CAClB,2BACJ,CCVA,yBACI,mBAAoB,CACpB,kBAAmB,CACnB,WAAY,CACZ,cACJ,CAEA,8BACI,WAAY,CACZ,uBAAgB,CAAhB,mBAAgB,CAAhB,eACJ,CAEA,6BACI,4BAAyB,CAAzB,wBAAyB,CACzB,UAAW,CACX,WACJ,CAEA,iBACI,kBAAmB,CACnB,iBAAkB,CAClB,iBAAkB,CAClB,cAAe,CACf,yBACJ,CAEA,eACI,WAAY,CACZ,iBAAkB,CAClB,aACJ,CC9BA,WACI,wBAAyB,CACzB,iBAAkB,CAClB,kBAAmB,CACnB,WAAY,CACZ,oCAAsC,CACtC,QAAW,CACX,kBAAmB,CACnB,iBAAkB,CAClB,YAAa,CACb,qBACJ,CAEA,gBACI,eAAgB,CAChB,QACJ,CAEA,aACI,uBACJ,CAEA,mBACI,iBAAkB,CAClB,QAAS,CACT,UAAW,CACX,WAAY,CACZ,oBAAqB,CACrB,YAAa,CACb,qBACJ,CAEA,0BACI,kBAAmB,CACnB,YAAa,CACb,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C,sCAAuC,CACvC,iBACJ,CAEA,8CACI,kBAA4B,CAA5B,2BACJ,CAEA,kBACI,uBAAwB,CACxB,wBAAiC,CAAjC,gCAAiC,CACjC,YAAa,CACb,SACJ,CAEA,wBACI,oBAA+B,CAA/B,8BACJ,CAEA,2BACI,iBAA6B,CAA7B,4BACJ,CAEA,gDACI,SACJ,CAEA,wCACI,WACJ,CAEA,OACI,kBAA4B,CAA5B,2BAA4B,CAC5B,WAAY,CACZ,aAAc,CACd,cAAe,CACf,cAAe,CACf,WAAY,CACZ,eAAgB,CAChB,uCAAwC,CACxC,kBACJ,CAEA,aACI,aAAmB,CAAnB,kBAAmB,CACnB,YACJ,CAEA,aACI,wBAA+B,CAA/B,8BACJ,CAEA,cACI,UACJ,CAEA,+CACI,UAAsB,CAAtB,qBACJ,CAEA,GACI,2BAAsC,CAAtC,qCAAsC,CACtC,iBAAkB,CAClB,SAAU,CACV,sBACJ,CAEA,SACI,sBAAuB,CACvB,cAAe,CACf,WAAY,CACZ,eAAgB,CAEhB,WAAgC,CAAhC,+BAAgC,CAChC,aAAwB,CAAxB,uBAAwB,CACxB,qBACJ,CAEA,eACI,+BAAgC,CAChC,YACJ,CAEA,IACI,iBAAkB,CAClB,eAAgB,CAChB,wBAAmC,CAAnC,kCACJ,CAEA,UACI,wBAAyB,CACzB,aAAc,CACd,iBAAkB,CAClB,SAAU,CACV,KAAM,CACN,MAAO,CACP,UAAW,CACX,WAAY,CACZ,UACJ,CAEA,oBACI,WAAY,CACZ,UACJ,CAEA,0BACI,4BAAkC,CAClC,2BAA4B,CAC5B,0BAA2B,CAC3B,+BACJ,CAEA,WACC,UAAW,CACX,WACD,CAEA,KACI,YACJ","file":"main.a3da64f4.chunk.css","sourcesContent":[".tooltip {\r\n\tposition: absolute;\r\n background: black;\r\n padding: 0;\r\n transform: translate(-50%, calc(-100% - 12px));\r\n font-size: large;\r\n border-radius: 8px;\r\n opacity: 0;\r\n transition: opacity 0.25s, padding .25s cubic-bezier(0.68, -0.55, 0.27, 2.5);\r\n pointer-events: none;\r\n min-width: 40px;\r\n}\r\n\r\n.tooltip.active {\r\n opacity: 1;\r\n padding: 8px;\r\n}\r\n\r\n.tooltip::before {\r\n content: '';\r\n display: block;\r\n width: 0;\r\n height: 0;\r\n position: absolute;\r\n border-left: 12px solid transparent;\r\n border-right: 12px solid transparent;\r\n border-top: 12px solid black;\r\n left: calc(50% - 12px);\r\n top: 100%;\r\n}\r\n",".points-display {\r\n position: absolute;\r\n bottom: 20px;\r\n left: 50%;\r\n transform: translateX(-50%);\r\n font-size: xx-large;\r\n background: #242a33;\r\n padding: 10px;\r\n border-radius: 2px;\r\n box-shadow: 3px 4px 5px black;\r\n}\r\n",".editor .texture-preview {\r\n display: inline-flex;\r\n align-items: center;\r\n width: 150px;\r\n margin-top: 8px;\r\n}\r\n\r\n.editor .texture-preview span {\r\n flex-grow: 1;\r\n user-select: all;\r\n}\r\n\r\n.editor .texture-preview img {\r\n background-color: initial;\r\n width: 60px;\r\n height: 60px;\r\n}\r\n\r\n.editor textarea {\r\n background: #242a33;\r\n border-radius: 4px;\r\n flex-grow: 1000000;\r\n min-height: 50%;\r\n font-family: \"Roboto Mono\";\r\n}\r\n\r\n.editor button {\r\n padding: 8px;\r\n text-align: center;\r\n margin: 10px 0;\r\n}\r\n",".sidepanel {\r\n height: calc(100% - 16px);\r\n position: relative;\r\n background: #333c4a;\r\n padding: 8px;\r\n transition: flex-basis .2s, margin .2s;\r\n flex: 0 0 0;\r\n margin-right: -20px;\r\n overflow-x: hidden;\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\n.sidepanel.open {\r\n flex-basis: 33vw;\r\n margin: 0;\r\n}\r\n\r\n.sidepanel > * {\r\n width: calc(33vw - 16px);\r\n}\r\n\r\n.sidepanel-toggles {\r\n position: absolute;\r\n top: 10px;\r\n right: 10px;\r\n width: unset;\r\n transition: right .2s;\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\n.sidepanel-toggles button {\r\n background: #242a33;\r\n padding: 10px;\r\n border-radius: 2px;\r\n box-shadow: 3px 4px 5px black;\r\n color: #ffab40;\r\n cursor: pointer;\r\n white-space: nowrap;\r\n}\r\n\r\n.sidepanel.open ~ .sidepanel-toggles {\r\n right: calc(33vw + 16px + 10px);\r\n}\r\n\r\n.sidepanel .spacer {\r\n flex-grow: 1;\r\n}\r\n\r\n.sidepanel ul {\r\n padding: 0;\r\n display: inline;\r\n font-weight: bold;\r\n list-style: none;\r\n text-align: center;\r\n}\r\n\r\n.sidepanel ul:not(.browser-default) {\r\n padding-left: 0;\r\n list-style-type: none;\r\n}\r\n\r\n.sidepanel ul:not(.browser-default) li {\r\n list-style-type: none;\r\n}\r\n\r\n.sidepanel ul li {\r\n vertical-align: middle;\r\n white-space: nowrap;\r\n padding-right: 8px;\r\n padding-left: 8px;\r\n display: inline;\r\n}\r\n",":root {\n --foreground: #b4bdcb;\n --background: #242a33;\n --far-background: #111924;\n --raised: #2a323d;\n --highlight: #333c4a;\n --focus: #a3c9ef;\n --inactive: #697a96;\n --disabled: #808080;\n --warning: #71262f;\n}\n\nhtml {\n background-color: var(--far-background);\n color: var(--foreground);\n\tfont-family: 'Roboto', sans-serif;\n height: 100%;\n user-select: none;\n}\n\nbody {\n background: transparent;\n height: 100%;\n margin: 0;\n padding: 0;\n overflow: hidden;\n}\n\na {\n color: #ffab40;\n cursor: pointer;\n text-decoration: none;\n}\n\na:focus {\n outline: none;\n}\n\ninput, .checkbox-label {\n margin-bottom: 8px;\n margin-top: 8px;\n font-size: 16px;\n}\n\ninput[type=\"text\"], input[type=\"password\"], input[type=\"number\"], input[type=\"search\"], select {\n background: none;\n border: none;\n border-bottom: solid 2px var(--inactive);\n color: var(--foreground);\n transition: border 0.3s;\n width: 100%;\n}\n\ninput[type=\"text\"]:focus, input[type=\"password\"]:focus, input[type=\"number\"]:focus, input[type=\"search\"]:focus, select:focus {\n border-bottom: solid 2px var(--foreground);\n outline: none;\n}\n\ninput[type=\"search\"]::-webkit-search-cancel-button {\n -webkit-appearance: none;\n height: 10px;\n width: 10px;\n margin-bottom: 3px;\n padding: 1px;\n background: -webkit-linear-gradient(-45deg, transparent 0%, transparent 45%, var(--foreground) 45%, var(--foreground) 56%,transparent 55%, transparent 100%), -webkit-linear-gradient(45deg, transparent 0%, transparent 45%, var(--foreground) 45%, var(--foreground) 56%,transparent 56%, transparent 100%);\n cursor: pointer;\n}\n\ninput[type=\"range\"] {\n appearance: none;\n height: 4px;\n background: var(--far-background);\n outline: none;\n border-radius: 4px;\n min-width: 40px;\n}\n\ninput[type=\"range\"]::-webkit-slider-thumb {\n appearance: none;\n width: 12px;\n height: 12px;\n cursor: pointer;\n background: var(--background);\n border: solid 2px var(--far-background);\n border-radius: 50%;\n}\n\ninput[type=\"range\"]::-webkit-slider-thumb:hover {\n background: var(--highlight);\n}\n\ninput[type=\"color\"] {\n -webkit-appearance: none;\n border: solid 2px var(--inactive);\n outline: none;\n padding: 0;\n}\n\ninput[type=\"color\"]:focus {\n border-color: var(--foreground);\n}\n\ninput[type=\"color\"]:disabled {\n border-color: var(--disabled);\n}\n\ninput[type=\"color\"]::-webkit-color-swatch-wrapper {\n padding: 0;\n}\n\ninput[type=\"color\"]::-webkit-color-swatch {\n border: none;\n}\n\nbutton {\n background: var(--highlight);\n border: none;\n color: #ffab40;\n cursor: pointer;\n font-size: 16px;\n margin: 10px;\n text-align: left;\n transition: background-color .1s ease-in;\n border-radius: 10px;\n}\n\nbutton:focus {\n color: var(--focus);\n outline: none;\n}\n\nbutton:hover {\n background-color: var(--raised);\n}\n\nselect option {\n color: #000;\n}\n\nbutton:disabled, select:disabled, input:disabled {\n color: var(--disabled);\n}\n\nh4 {\n border-bottom: solid var(--foreground);\n text-align: center;\n width: 50%;\n margin: .25em auto .5em auto;\n}\n\ntextarea { \n font-family: sans-serif;\n font-size: 16px;\n resize: none;\n background: none;\n border: none;\n border-bottom: solid 2px #969696;\n color: var(--foreground);\n transition: border 0.3s;\n}\n\ntextarea:focus {\n border-bottom: solid 2px #c9c9c9;\n outline: none;\n}\n\nimg {\n position: relative;\n overflow: hidden;\n background-color: var(--background);\n}\n\nimg:after {\n background-color: inherit;\n display: block;\n position: absolute;\n z-index: 2;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n content: \"\";\n}\n\n::-webkit-scrollbar {\n height: 28px;\n width: 14px;\n}\n\n::-webkit-scrollbar-thumb {\n border: 8px solid rgba(0, 0, 0, 0);\n background-clip: padding-box;\n -webkit-border-radius: 20px;\n background-color: rgba(0, 0, 0, 0.6);\n}\n\n#root, .App {\n\twidth: 100%;\n\theight: 100%;\n}\n\n.App {\n display: flex;\n}\n"]} \ No newline at end of file diff --git a/site/public/skilltreetest/static/js/2.ec28d3dc.chunk.js b/site/public/skilltreetest/static/js/2.ec28d3dc.chunk.js new file mode 100644 index 00000000..ac55e295 --- /dev/null +++ b/site/public/skilltreetest/static/js/2.ec28d3dc.chunk.js @@ -0,0 +1,3 @@ +/*! For license information please see 2.ec28d3dc.chunk.js.LICENSE.txt */ +(this.webpackJsonpkronos=this.webpackJsonpkronos||[]).push([[2],[function(t,e,n){"use strict";n.r(e),n.d(e,"utils",(function(){return r})),n.d(e,"AccessibilityManager",(function(){return de})),n.d(e,"accessibleTarget",(function(){return fe})),n.d(e,"InteractionData",(function(){return ge})),n.d(e,"InteractionEvent",(function(){return be})),n.d(e,"InteractionManager",(function(){return Se})),n.d(e,"InteractionTrackingData",(function(){return xe})),n.d(e,"interactiveTarget",(function(){return Te})),n.d(e,"Application",(function(){return jr})),n.d(e,"AbstractBatchRenderer",(function(){return Mr})),n.d(e,"AbstractRenderer",(function(){return Er})),n.d(e,"Attribute",(function(){return en})),n.d(e,"BaseRenderTexture",(function(){return qe})),n.d(e,"BaseTexture",(function(){return De})),n.d(e,"BatchDrawCall",(function(){return Ir})),n.d(e,"BatchGeometry",(function(){return Dr})),n.d(e,"BatchPluginFactory",(function(){return Fr})),n.d(e,"BatchRenderer",(function(){return Ur})),n.d(e,"BatchShaderGenerator",(function(){return Rr})),n.d(e,"BatchTextureArray",(function(){return Ar})),n.d(e,"Buffer",(function(){return rn})),n.d(e,"Filter",(function(){return tr})),n.d(e,"FilterState",(function(){return mn})),n.d(e,"Framebuffer",(function(){return Ye})),n.d(e,"GLFramebuffer",(function(){return xn})),n.d(e,"GLProgram",(function(){return dr})),n.d(e,"GLTexture",(function(){return br})),n.d(e,"Geometry",(function(){return cn})),n.d(e,"IGLUniformData",(function(){return pr})),n.d(e,"MaskData",(function(){return On})),n.d(e,"ObjectRenderer",(function(){return yn})),n.d(e,"Program",(function(){return $n})),n.d(e,"Quad",(function(){return hn})),n.d(e,"QuadUv",(function(){return fn})),n.d(e,"RenderTexture",(function(){return Je})),n.d(e,"RenderTexturePool",(function(){return tn})),n.d(e,"Renderer",(function(){return Sr})),n.d(e,"Shader",(function(){return Zn})),n.d(e,"SpriteMaskFilter",(function(){return rr})),n.d(e,"State",(function(){return Jn})),n.d(e,"System",(function(){return Ge})),n.d(e,"Texture",(function(){return $e})),n.d(e,"TextureMatrix",(function(){return nr})),n.d(e,"TextureUvs",(function(){return Ke})),n.d(e,"UniformGroup",(function(){return dn})),n.d(e,"ViewableBuffer",(function(){return kr})),n.d(e,"autoDetectRenderer",(function(){return Pr})),n.d(e,"checkMaxIfStatementsInShader",(function(){return qn})),n.d(e,"defaultFilterVertex",(function(){return Cr})),n.d(e,"defaultVertex",(function(){return Or})),n.d(e,"resources",(function(){return We})),n.d(e,"systems",(function(){return wr})),n.d(e,"uniformParsers",(function(){return Hn})),n.d(e,"Extract",(function(){return Hr})),n.d(e,"AppLoaderPlugin",(function(){return di})),n.d(e,"Loader",(function(){return pi})),n.d(e,"LoaderResource",(function(){return ci})),n.d(e,"TextureLoader",(function(){return fi})),n.d(e,"ParticleContainer",(function(){return _i})),n.d(e,"ParticleRenderer",(function(){return xi})),n.d(e,"BasePrepare",(function(){return So})),n.d(e,"CountLimiter",(function(){return yo})),n.d(e,"Prepare",(function(){return Io})),n.d(e,"TimeLimiter",(function(){return Ao})),n.d(e,"Spritesheet",(function(){return ko})),n.d(e,"SpritesheetLoader",(function(){return Mo})),n.d(e,"TilingSprite",(function(){return Lo})),n.d(e,"TilingSpriteRenderer",(function(){return jo})),n.d(e,"BitmapFont",(function(){return ta})),n.d(e,"BitmapFontData",(function(){return Ko})),n.d(e,"BitmapFontLoader",(function(){return ia})),n.d(e,"BitmapText",(function(){return ra})),n.d(e,"Ticker",(function(){return ve})),n.d(e,"TickerPlugin",(function(){return ye})),n.d(e,"UPDATE_PRIORITY",(function(){return pe})),n.d(e,"ALPHA_MODES",(function(){return B})),n.d(e,"BLEND_MODES",(function(){return M})),n.d(e,"BUFFER_BITS",(function(){return k})),n.d(e,"CLEAR_MODES",(function(){return z})),n.d(e,"DRAW_MODES",(function(){return R})),n.d(e,"ENV",(function(){return I})),n.d(e,"FORMATS",(function(){return D})),n.d(e,"GC_MODES",(function(){return H})),n.d(e,"MASK_TYPES",(function(){return W})),n.d(e,"MIPMAP_MODES",(function(){return j})),n.d(e,"MSAA_QUALITY",(function(){return G})),n.d(e,"PRECISION",(function(){return X})),n.d(e,"RENDERER_TYPE",(function(){return A})),n.d(e,"SCALE_MODES",(function(){return F})),n.d(e,"TARGETS",(function(){return N})),n.d(e,"TYPES",(function(){return L})),n.d(e,"WRAP_MODES",(function(){return U})),n.d(e,"Bounds",(function(){return oe})),n.d(e,"Container",(function(){return he})),n.d(e,"DisplayObject",(function(){return ue})),n.d(e,"TemporaryDisplayObject",(function(){return le})),n.d(e,"FillStyle",(function(){return Ti})),n.d(e,"GRAPHICS_CURVES",(function(){return wi})),n.d(e,"Graphics",(function(){return Zi})),n.d(e,"GraphicsData",(function(){return Gi})),n.d(e,"GraphicsGeometry",(function(){return qi})),n.d(e,"LINE_CAP",(function(){return gi})),n.d(e,"LINE_JOIN",(function(){return yi})),n.d(e,"LineStyle",(function(){return Ki})),n.d(e,"graphicsUtils",(function(){return Wi})),n.d(e,"Circle",(function(){return Xt})),n.d(e,"DEG_TO_RAD",(function(){return zt})),n.d(e,"Ellipse",(function(){return Wt})),n.d(e,"Matrix",(function(){return Kt})),n.d(e,"ObservablePoint",(function(){return qt})),n.d(e,"PI_2",(function(){return jt})),n.d(e,"Point",(function(){return Yt})),n.d(e,"Polygon",(function(){return Gt})),n.d(e,"RAD_TO_DEG",(function(){return Bt})),n.d(e,"Rectangle",(function(){return Ht})),n.d(e,"RoundedRectangle",(function(){return Vt})),n.d(e,"SHAPES",(function(){return Ut})),n.d(e,"Transform",(function(){return ie})),n.d(e,"groupD8",(function(){return re})),n.d(e,"Mesh",(function(){return Go})),n.d(e,"MeshBatchUvs",(function(){return Ho})),n.d(e,"MeshGeometry",(function(){return Yo})),n.d(e,"MeshMaterial",(function(){return Vo})),n.d(e,"NineSlicePlane",(function(){return Ya})),n.d(e,"PlaneGeometry",(function(){return Ha})),n.d(e,"RopeGeometry",(function(){return Xa})),n.d(e,"SimpleMesh",(function(){return Va})),n.d(e,"SimplePlane",(function(){return Ga})),n.d(e,"SimpleRope",(function(){return Wa})),n.d(e,"Runner",(function(){return Pe})),n.d(e,"Sprite",(function(){return ro})),n.d(e,"AnimatedSprite",(function(){return Ka})),n.d(e,"TEXT_GRADIENT",(function(){return to})),n.d(e,"Text",(function(){return mo})),n.d(e,"TextMetrics",(function(){return ho})),n.d(e,"TextStyle",(function(){return so})),n.d(e,"isMobile",(function(){return C})),n.d(e,"settings",(function(){return V})),n.d(e,"VERSION",(function(){return ts})),n.d(e,"filters",(function(){return es})),n.d(e,"useDeprecated",(function(){return Ja}));var r={};n.r(r),n.d(r,"isMobile",(function(){return C})),n.d(r,"EventEmitter",(function(){return q.a})),n.d(r,"earcut",(function(){return Q.a})),n.d(r,"url",(function(){return Z.a})),n.d(r,"BaseTextureCache",(function(){return Ct})),n.d(r,"CanvasRenderTarget",(function(){return kt})),n.d(r,"DATA_URI",(function(){return Dt})),n.d(r,"ProgramCache",(function(){return Pt})),n.d(r,"TextureCache",(function(){return Ot})),n.d(r,"clearTextureCache",(function(){return At})),n.d(r,"correctBlendMode",(function(){return lt})),n.d(r,"createIndicesForQuads",(function(){return pt})),n.d(r,"decomposeDataUri",(function(){return Nt})),n.d(r,"deprecation",(function(){return St})),n.d(r,"destroyTextureCache",(function(){return It})),n.d(r,"determineCrossOrigin",(function(){return Lt})),n.d(r,"getBufferType",(function(){return dt})),n.d(r,"getResolutionOfUrl",(function(){return Ft})),n.d(r,"hex2rgb",(function(){return it})),n.d(r,"hex2string",(function(){return ot})),n.d(r,"interleaveTypedArrays",(function(){return vt})),n.d(r,"isPow2",(function(){return gt})),n.d(r,"isWebGLSupported",(function(){return rt})),n.d(r,"log2",(function(){return _t})),n.d(r,"nextPow2",(function(){return yt})),n.d(r,"premultiplyBlendMode",(function(){return ut})),n.d(r,"premultiplyRgba",(function(){return ct})),n.d(r,"premultiplyTint",(function(){return ht})),n.d(r,"premultiplyTintToRgba",(function(){return ft})),n.d(r,"removeItems",(function(){return bt})),n.d(r,"rgb2hex",(function(){return st})),n.d(r,"sayHello",(function(){return nt})),n.d(r,"sign",(function(){return xt})),n.d(r,"skipHello",(function(){return et})),n.d(r,"string2hex",(function(){return at})),n.d(r,"trimCanvas",(function(){return Mt})),n.d(r,"uid",(function(){return Tt}));var i=n(45),o=n(21),a=n.n(o);window.Promise||(window.Promise=i.Polyfill),Object.assign||(Object.assign=a.a);if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!window.performance||!window.performance.now){var s=Date.now();window.performance||(window.performance={}),window.performance.now=function(){return Date.now()-s}}for(var u=Date.now(),l=["ms","moz","webkit","o"],c=0;c0?1:-1}),Number.isInteger||(Number.isInteger=function(t){return"number"===typeof t&&isFinite(t)&&Math.floor(t)===t}),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array),window.Uint8Array||(window.Uint8Array=Array),window.Int32Array||(window.Int32Array=Array);var f=/iPhone/i,p=/iPod/i,d=/iPad/i,m=/\biOS-universal(?:.+)Mac\b/i,v=/\bAndroid(?:.+)Mobile\b/i,y=/Android/i,g=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,_=/Silk/i,b=/Windows Phone/i,x=/\bWindows(?:.+)ARM\b/i,w=/BlackBerry/i,T=/BB10/i,E=/Opera Mini/i,S=/\b(CriOS|Chrome)(?:.+)Mobile/i,P=/Mobile(?:.+)Firefox\b/i,O=function(t){return"undefined"!==typeof t&&"MacIntel"===t.platform&&"number"===typeof t.maxTouchPoints&&t.maxTouchPoints>1&&"undefined"===typeof MSStream};var C=function(t){var e={userAgent:"",platform:"",maxTouchPoints:0};t||"undefined"===typeof navigator?"string"===typeof t?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0}):e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var n=e.userAgent,r=n.split("[FBAN");"undefined"!==typeof r[1]&&(n=r[0]),"undefined"!==typeof(r=n.split("Twitter"))[1]&&(n=r[0]);var i=function(t){return function(e){return e.test(t)}}(n),o={apple:{phone:i(f)&&!i(b),ipod:i(p),tablet:!i(f)&&(i(d)||O(e))&&!i(b),universal:i(m),device:(i(f)||i(p)||i(d)||i(m)||O(e))&&!i(b)},amazon:{phone:i(g),tablet:!i(g)&&i(_),device:i(g)||i(_)},android:{phone:!i(b)&&i(g)||!i(b)&&i(v),tablet:!i(b)&&!i(g)&&!i(v)&&(i(_)||i(y)),device:!i(b)&&(i(g)||i(_)||i(v)||i(y))||i(/\bokhttp\b/i)},windows:{phone:i(b),tablet:i(x),device:i(b)||i(x)},other:{blackberry:i(w),blackberry10:i(T),opera:i(E),firefox:i(P),chrome:i(S),device:i(w)||i(T)||i(E)||i(P)||i(S)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}(window.navigator);var I,A,k,M,R,D,N,L,F,U,j,B,z,H,X,W,G,V={MIPMAP_TEXTURES:1,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:function(t){var e=!0;if(C.tablet||C.phone){var n;if(C.apple.device)if(n=navigator.userAgent.match(/OS (\d+)_(\d+)?/))parseInt(n[1],10)<11&&(e=!1);if(C.android.device)if(n=navigator.userAgent.match(/Android\s([0-9.]*)/))parseInt(n[1],10)<7&&(e=!1)}return e?t:4}(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,autoDensity:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:0,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:33071,SCALE_MODE:1,PRECISION_VERTEX:"highp",PRECISION_FRAGMENT:C.apple.device?"highp":"mediump",CAN_UPLOAD_SAME_BUFFER:!C.apple.device,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},Y=n(37),q=n.n(Y),K=n(38),Q=n.n(K),$=n(22),Z=n.n($);!function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"}(I||(I={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(A||(A={})),function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"}(k||(k={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"}(M||(M={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(R||(R={})),function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(D||(D={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(N||(N={})),function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.FLOAT=5126]="FLOAT",t[t.HALF_FLOAT=36193]="HALF_FLOAT"}(L||(L={})),function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(F||(F={})),function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(U||(U={})),function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON"}(j||(j={})),function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA"}(B||(B={})),function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"}(z||(z={})),function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"}(H||(H={})),function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"}(X||(X={})),function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"}(W||(W={})),function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"}(G||(G={})),V.RETINA_PREFIX=/@([0-9\.]+)x/,V.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!0;var J,tt=!1;function et(){tt=!0}function nt(t){var e;if(!tt){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var n=["\n %c %c %c PixiJS 5.3.3 - \u2730 "+t+" \u2730 %c %c http://www.pixijs.com/ %c %c \u2665%c\u2665%c\u2665 \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(e=window.console).log.apply(e,n)}else window.console&&window.console.log("PixiJS 5.3.3 - "+t+" - http://www.pixijs.com/");tt=!0}}function rt(){return"undefined"===typeof J&&(J=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:V.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),n=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),r=!(!n||!n.getContextAttributes().stencil);if(n){var i=n.getExtension("WEBGL_lose_context");i&&i.loseContext()}return n=null,r}catch(o){return!1}}()),J}function it(t,e){return void 0===e&&(e=[]),e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e}function ot(t){var e=t.toString(16);return"#"+(e="000000".substr(0,6-e.length)+e)}function at(t){return"string"===typeof t&&"#"===t[0]&&(t=t.substr(1)),parseInt(t,16)}function st(t){return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)}var ut=function(){for(var t=[],e=[],n=0;n<32;n++)t[n]=n,e[n]=n;t[M.NORMAL_NPM]=M.NORMAL,t[M.ADD_NPM]=M.ADD,t[M.SCREEN_NPM]=M.SCREEN,e[M.NORMAL]=M.NORMAL_NPM,e[M.ADD]=M.ADD_NPM,e[M.SCREEN]=M.SCREEN_NPM;var r=[];return r.push(e),r.push(t),r}();function lt(t,e){return ut[e?1:0][t]}function ct(t,e,n,r){return n=n||new Float32Array(4),r||void 0===r?(n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e):(n[0]=t[0],n[1]=t[1],n[2]=t[2]),n[3]=e,n}function ht(t,e){if(1===e)return(255*e<<24)+t;if(0===e)return 0;var n=t>>16&255,r=t>>8&255,i=255&t;return(255*e<<24)+((n=n*e+.5|0)<<16)+((r=r*e+.5|0)<<8)+(i=i*e+.5|0)}function ft(t,e,n,r){return(n=n||new Float32Array(4))[0]=(t>>16&255)/255,n[1]=(t>>8&255)/255,n[2]=(255&t)/255,(r||void 0===r)&&(n[0]*=e,n[1]*=e,n[2]*=e),n[3]=e,n}function pt(t,e){void 0===e&&(e=null);var n=6*t;if((e=e||new Uint16Array(n)).length!==n)throw new Error("Out buffer length is incorrect, got "+e.length+" and expected "+n);for(var r=0,i=0;r>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1}function gt(t){return!(t&t-1)&&!!t}function _t(t){var e=(t>65535?1:0)<<4,n=((t>>>=e)>255?1:0)<<3;return e|=n,e|=n=((t>>>=n)>15?1:0)<<2,(e|=n=((t>>>=n)>3?1:0)<<1)|(t>>>=n)>>1}function bt(t,e,n){var r,i=t.length;if(!(e>=i||0===n)){var o=i-(n=e+n>i?i-e:n);for(r=e;r=this.x&&t=this.y&&ee!==l>e&&t<(e-s)/(l-s)*(u-a)+a&&(n=!n)}return n},t}(),Vt=function(){function t(t,e,n,r,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=20),this.x=t,this.y=e,this.width=n,this.height=r,this.radius=i,this.type=Ut.RREC}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height,this.radius)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){if(e>=this.y+this.radius&&e<=this.y+this.height-this.radius||t>=this.x+this.radius&&t<=this.x+this.width-this.radius)return!0;var n=t-(this.x+this.radius),r=e-(this.y+this.radius),i=this.radius*this.radius;if(n*n+r*r<=i)return!0;if((n=t-(this.x+this.width-this.radius))*n+r*r<=i)return!0;if(n*n+(r=e-(this.y+this.height-this.radius))*r<=i)return!0;if((n=t-(this.x+this.radius))*n+r*r<=i)return!0}return!1},t}(),Yt=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){return this.set(t.x,t.y),this},t.prototype.copyTo=function(t){return t.set(this.x,this.y),t},t.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},t.prototype.set=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this},t}(),qt=function(){function t(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),this._x=n,this._y=r,this.cb=t,this.scope=e}return t.prototype.clone=function(e,n){return void 0===e&&(e=this.cb),void 0===n&&(n=this.scope),new t(e,n,this._x,this._y)},t.prototype.set=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this._x===t&&this._y===e||(this._x=t,this._y=e,this.cb.call(this.scope)),this},t.prototype.copyFrom=function(t){return this._x===t.x&&this._y===t.y||(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this},t.prototype.copyTo=function(t){return t.set(this._x,this._y),t},t.prototype.equals=function(t){return t.x===this._x&&t.y===this._y},Object.defineProperty(t.prototype,"x",{get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),t}(),Kt=function(){function t(t,e,n,r,i,o){void 0===t&&(t=1),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=1),void 0===i&&(i=0),void 0===o&&(o=0),this.array=null,this.a=t,this.b=e,this.c=n,this.d=r,this.tx=i,this.ty=o}return t.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},t.prototype.set=function(t,e,n,r,i,o){return this.a=t,this.b=e,this.c=n,this.d=r,this.tx=i,this.ty=o,this},t.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var n=e||this.array;return t?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n},t.prototype.apply=function(t,e){e=e||new Yt;var n=t.x,r=t.y;return e.x=this.a*n+this.c*r+this.tx,e.y=this.b*n+this.d*r+this.ty,e},t.prototype.applyInverse=function(t,e){e=e||new Yt;var n=1/(this.a*this.d+this.c*-this.b),r=t.x,i=t.y;return e.x=this.d*n*r+-this.c*n*i+(this.ty*this.c-this.tx*this.d)*n,e.y=this.a*n*i+-this.b*n*r+(-this.ty*this.a+this.tx*this.b)*n,e},t.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},t.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},t.prototype.rotate=function(t){var e=Math.cos(t),n=Math.sin(t),r=this.a,i=this.c,o=this.tx;return this.a=r*e-this.b*n,this.b=r*n+this.b*e,this.c=i*e-this.d*n,this.d=i*n+this.d*e,this.tx=o*e-this.ty*n,this.ty=o*n+this.ty*e,this},t.prototype.append=function(t){var e=this.a,n=this.b,r=this.c,i=this.d;return this.a=t.a*e+t.b*r,this.b=t.a*n+t.b*i,this.c=t.c*e+t.d*r,this.d=t.c*n+t.d*i,this.tx=t.tx*e+t.ty*r+this.tx,this.ty=t.tx*n+t.ty*i+this.ty,this},t.prototype.setTransform=function(t,e,n,r,i,o,a,s,u){return this.a=Math.cos(a+u)*i,this.b=Math.sin(a+u)*i,this.c=-Math.sin(a-s)*o,this.d=Math.cos(a-s)*o,this.tx=t-(n*this.a+r*this.c),this.ty=e-(n*this.b+r*this.d),this},t.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var n=this.a,r=this.c;this.a=n*t.a+this.b*t.c,this.b=n*t.b+this.b*t.d,this.c=r*t.a+this.d*t.c,this.d=r*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},t.prototype.decompose=function(t){var e=this.a,n=this.b,r=this.c,i=this.d,o=-Math.atan2(-r,i),a=Math.atan2(n,e),s=Math.abs(o+a);return s<1e-5||Math.abs(jt-s)<1e-5?(t.rotation=a,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=o,t.skew.y=a),t.scale.x=Math.sqrt(e*e+n*n),t.scale.y=Math.sqrt(r*r+i*i),t.position.x=this.tx,t.position.y=this.ty,t},t.prototype.invert=function(){var t=this.a,e=this.b,n=this.c,r=this.d,i=this.tx,o=t*r-e*n;return this.a=r/o,this.b=-e/o,this.c=-n/o,this.d=t/o,this.tx=(n*this.ty-r*i)/o,this.ty=-(t*this.ty-e*i)/o,this},t.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},t.prototype.clone=function(){var e=new t;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},t.prototype.copyTo=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},t.prototype.copyFrom=function(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this},Object.defineProperty(t,"IDENTITY",{get:function(){return new t},enumerable:!1,configurable:!0}),Object.defineProperty(t,"TEMP_MATRIX",{get:function(){return new t},enumerable:!1,configurable:!0}),t}(),Qt=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],$t=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Zt=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Jt=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],te=[],ee=[],ne=Math.sign;!function(){for(var t=0;t<16;t++){var e=[];te.push(e);for(var n=0;n<16;n++)for(var r=ne(Qt[t]*Qt[n]+Zt[t]*$t[n]),i=ne($t[t]*Qt[n]+Jt[t]*$t[n]),o=ne(Qt[t]*Zt[n]+Zt[t]*Jt[n]),a=ne($t[t]*Zt[n]+Jt[t]*Jt[n]),s=0;s<16;s++)if(Qt[s]===r&&$t[s]===i&&Zt[s]===o&&Jt[s]===a){e.push(s);break}}for(t=0;t<16;t++){var u=new Kt;u.set(Qt[t],$t[t],Zt[t],Jt[t],0,0),ee.push(u)}}();var re={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(t){return Qt[t]},uY:function(t){return $t[t]},vX:function(t){return Zt[t]},vY:function(t){return Jt[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return te[t][e]},sub:function(t,e){return te[t][re.inv(e)]},rotate180:function(t){return 4^t},isVertical:function(t){return 2===(3&t)},byDirection:function(t,e){return 2*Math.abs(t)<=Math.abs(e)?e>=0?re.S:re.N:2*Math.abs(e)<=Math.abs(t)?t>0?re.E:re.W:e>0?t>0?re.SE:re.SW:t>0?re.NE:re.NW},matrixAppendRotationInv:function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var i=ee[re.inv(e)];i.tx=n,i.ty=r,t.append(i)}},ie=function(){function t(){this.worldTransform=new Kt,this.localTransform=new Kt,this.position=new qt(this.onChange,this,0,0),this.scale=new qt(this.onChange,this,1,1),this.pivot=new qt(this.onChange,this,0,0),this.skew=new qt(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return t.prototype.onChange=function(){this._localID++},t.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},t.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},t.prototype.updateTransform=function(t){var e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var n=t.worldTransform,r=this.worldTransform;r.a=e.a*n.a+e.b*n.c,r.b=e.a*n.b+e.b*n.d,r.c=e.c*n.a+e.d*n.c,r.d=e.c*n.b+e.d*n.d,r.tx=e.tx*n.a+e.ty*n.c+n.tx,r.ty=e.tx*n.b+e.ty*n.d+n.ty,this._parentID=t._worldID,this._worldID++}},t.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},Object.defineProperty(t.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())},enumerable:!1,configurable:!0}),t.IDENTITY=new t,t}();V.SORTABLE_CHILDREN=!1;var oe=function(){function t(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?Ht.EMPTY:((t=t||new Ht(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addQuad=function(t){var e=this.minX,n=this.minY,r=this.maxX,i=this.maxY,o=t[0],a=t[1];e=or?o:r,i=a>i?a:i,e=(o=t[2])r?o:r,i=a>i?a:i,e=(o=t[4])r?o:r,i=a>i?a:i,e=(o=t[6])r?o:r,i=a>i?a:i,this.minX=e,this.minY=n,this.maxX=r,this.maxY=i},t.prototype.addFrame=function(t,e,n,r,i){this.addFrameMatrix(t.worldTransform,e,n,r,i)},t.prototype.addFrameMatrix=function(t,e,n,r,i){var o=t.a,a=t.b,s=t.c,u=t.d,l=t.tx,c=t.ty,h=this.minX,f=this.minY,p=this.maxX,d=this.maxY,m=o*e+s*n+l,v=a*e+u*n+c;h=mp?m:p,d=v>d?v:d,h=(m=o*r+s*n+l)p?m:p,d=v>d?v:d,h=(m=o*e+s*i+l)p?m:p,d=v>d?v:d,h=(m=o*r+s*i+l)p?m:p,d=v>d?v:d,this.minX=h,this.minY=f,this.maxX=p,this.maxY=d},t.prototype.addVertexData=function(t,e,n){for(var r=this.minX,i=this.minY,o=this.maxX,a=this.maxY,s=e;so?u:o,a=l>a?l:a}this.minX=r,this.minY=i,this.maxX=o,this.maxY=a},t.prototype.addVertices=function(t,e,n,r){this.addVerticesMatrix(t.worldTransform,e,n,r)},t.prototype.addVerticesMatrix=function(t,e,n,r,i,o){void 0===i&&(i=0),void 0===o&&(o=i);for(var a=t.a,s=t.b,u=t.c,l=t.d,c=t.tx,h=t.ty,f=this.minX,p=this.minY,d=this.maxX,m=this.maxY,v=n;vr?t.maxX:r,this.maxY=t.maxY>i?t.maxY:i},t.prototype.addBoundsMask=function(t,e){var n=t.minX>e.minX?t.minX:e.minX,r=t.minY>e.minY?t.minY:e.minY,i=t.maxXu?i:u,this.maxY=o>l?o:l}},t.prototype.addBoundsMatrix=function(t,e){this.addFrameMatrix(e,t.minX,t.minY,t.maxX,t.maxY)},t.prototype.addBoundsArea=function(t,e){var n=t.minX>e.x?t.minX:e.x,r=t.minY>e.y?t.minY:e.y,i=t.maxXu?i:u,this.maxY=o>l?o:l}},t.prototype.pad=function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e)},t.prototype.addFramePad=function(t,e,n,r,i,o){t-=i,e-=o,n+=i,r+=o,this.minX=this.minXn?this.maxX:n,this.minY=this.minYr?this.maxY:r},t}(),ae=function(t,e){return(ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function se(t,e){function n(){this.constructor=t}ae(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ue=function(t){function e(){var e=t.call(this)||this;return e.tempDisplayObjectParent=null,e.transform=new ie,e.alpha=1,e.visible=!0,e.renderable=!0,e.parent=null,e.worldAlpha=1,e._lastSortedIndex=0,e._zIndex=0,e.filterArea=null,e.filters=null,e._enabledFilters=null,e._bounds=new oe,e._localBounds=null,e._boundsID=0,e._boundsRect=null,e._localBoundsRect=null,e._mask=null,e._destroyed=!1,e.isSprite=!1,e.isMask=!1,e}return se(e,t),e.mixin=function(t){for(var n=Object.keys(t),r=0;r1)for(var r=0;rthis.children.length)throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),this.emit("childAdded",t,this,e),t},e.prototype.swapChildren=function(t,e){if(t!==e){var n=this.getChildIndex(t),r=this.getChildIndex(e);this.children[n]=e,this.children[r]=t,this.onChildrenChange(n=this.children.length)throw new Error("The index "+e+" supplied is out of bounds "+this.children.length);var n=this.getChildIndex(t);bt(this.children,n,1),this.children.splice(e,0,t),this.onChildrenChange(e)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},e.prototype.removeChild=function(){for(var t=arguments,e=[],n=0;n1)for(var r=0;r0&&i<=e){n=this.children.splice(r,i);for(var o=0;o1&&this.children.sort(ce),this.sortDirty=!1},e.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t title : "+t.title+"
tabIndex: "+t.tabIndex},t.prototype.capHitArea=function(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0),t.x+t.width>this.renderer.width&&(t.width=this.renderer.width-t.x),t.y+t.height>this.renderer.height&&(t.height=this.renderer.height-t.y)},t.prototype.addChild=function(t){var e=this.pool.pop();e||((e=document.createElement("button")).style.width="100px",e.style.height="100px",e.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=2..toString(),e.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?e.setAttribute("aria-live","off"):e.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?e.setAttribute("aria-relevant","additions"):e.setAttribute("aria-relevant","text"),e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),e.style.pointerEvents=t.accessiblePointerEvents,e.type=t.accessibleType,t.accessibleTitle&&null!==t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleHint&&null!==t.accessibleHint||(e.title="displayObject "+t.tabIndex),t.accessibleHint&&null!==t.accessibleHint&&e.setAttribute("aria-label",t.accessibleHint),this.debug&&this.updateDebugHTML(e),t._accessibleActive=!0,t._accessibleDiv=e,e.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},t.prototype._onClick=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"click",e.eventData),e.dispatchEvent(t.target.displayObject,"pointertap",e.eventData),e.dispatchEvent(t.target.displayObject,"tap",e.eventData)},t.prototype._onFocus=function(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","assertive");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},t.prototype._onFocusOut=function(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","polite");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseout",e.eventData)},t.prototype._onKeyDown=function(t){9===t.keyCode&&this.activate()},t.prototype._onMouseMove=function(t){0===t.movementX&&0===t.movementY||this.deactivate()},t.prototype.destroy=function(){this.destroyTouchHook(),this.div=null,window.document.removeEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},t}();V.TARGET_FPMS=.06,function(t){t[t.INTERACTION=50]="INTERACTION",t[t.HIGH=25]="HIGH",t[t.NORMAL=0]="NORMAL",t[t.LOW=-25]="LOW",t[t.UTILITY=-50]="UTILITY"}(pe||(pe={}));var me=function(){function t(t,e,n,r){void 0===e&&(e=null),void 0===n&&(n=0),void 0===r&&(r=!1),this.fn=t,this.context=e,this.priority=n,this.once=r,this.next=null,this.previous=null,this._destroyed=!1}return t.prototype.match=function(t,e){return void 0===e&&(e=null),this.fn===t&&this.context===e},t.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},t.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},t.prototype.destroy=function(t){void 0===t&&(t=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.next;return this.next=t?null:e,this.previous=null,e},t}(),ve=function(){function t(){var t=this;this._head=new me(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this.autoStart=!1,this.deltaTime=1,this.deltaMS=1/V.TARGET_FPMS,this.elapsedMS=1/V.TARGET_FPMS,this.lastTime=-1,this.speed=1,this.started=!1,this._protected=!1,this._lastFrame=-1,this._tick=function(e){t._requestId=null,t.started&&(t.update(e),t.started&&null===t._requestId&&t._head.next&&(t._requestId=requestAnimationFrame(t._tick)))}}return t.prototype._requestIfNeeded=function(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},t.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},t.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},t.prototype.add=function(t,e,n){return void 0===n&&(n=pe.NORMAL),this._addListener(new me(t,e,n))},t.prototype.addOnce=function(t,e,n){return void 0===n&&(n=pe.NORMAL),this._addListener(new me(t,e,n,!0))},t.prototype._addListener=function(t){var e=this._head.next,n=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(n);break}n=e,e=e.next}t.previous||t.connect(n)}else t.connect(n);return this._startIfPossible(),this},t.prototype.remove=function(t,e){for(var n=this._head.next;n;)n=n.match(t,e)?n.destroy():n.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(t.prototype,"count",{get:function(){if(!this._head)return 0;for(var t=0,e=this._head;e=e.next;)t++;return t},enumerable:!1,configurable:!0}),t.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},t.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},t.prototype.destroy=function(){if(!this._protected){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}},t.prototype.update=function(t){var e;if(void 0===t&&(t=performance.now()),t>this.lastTime){if((e=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){var n=t-this._lastFrame|0;if(n=0;c--){var h=l[c],f=this.recursiveFindHit(t,h,n,r,s);if(f){if(!h.parent)continue;s=!1,f&&(t.target&&(r=!1),a=!0)}}return i&&(r&&!t.target&&!e.hitArea&&e.containsPoint&&e.containsPoint(o)&&(a=!0),e.interactive&&(a&&!t.target&&(t.target=e),n&&n(t,e,!!a))),a},t.prototype.findHit=function(t,e,n,r){this.recursiveFindHit(t,e,n,r,!1)},t}(),Te={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return"pointer"===this.cursor},set buttonMode(t){t?this.cursor="pointer":"pointer"===this.cursor&&(this.cursor=null)},cursor:null,get trackedPointers(){return void 0===this._trackedPointers&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};ue.mixin(Te);var Ee={target:null,data:{global:null}},Se=function(t){function e(e,n){var r=t.call(this)||this;return n=n||{},r.renderer=e,r.autoPreventDefault=void 0===n.autoPreventDefault||n.autoPreventDefault,r.interactionFrequency=n.interactionFrequency||10,r.mouse=new ge,r.mouse.identifier=1,r.mouse.global.set(-999999),r.activeInteractionData={},r.activeInteractionData[1]=r.mouse,r.interactionDataPool=[],r.eventData=new be,r.interactionDOMElement=null,r.moveWhenInside=!1,r.eventsAdded=!1,r.tickerAdded=!1,r.mouseOverRenderer=!1,r.supportsTouchEvents="ontouchstart"in window,r.supportsPointerEvents=!!window.PointerEvent,r.onPointerUp=r.onPointerUp.bind(r),r.processPointerUp=r.processPointerUp.bind(r),r.onPointerCancel=r.onPointerCancel.bind(r),r.processPointerCancel=r.processPointerCancel.bind(r),r.onPointerDown=r.onPointerDown.bind(r),r.processPointerDown=r.processPointerDown.bind(r),r.onPointerMove=r.onPointerMove.bind(r),r.processPointerMove=r.processPointerMove.bind(r),r.onPointerOut=r.onPointerOut.bind(r),r.processPointerOverOut=r.processPointerOverOut.bind(r),r.onPointerOver=r.onPointerOver.bind(r),r.cursorStyles={default:"inherit",pointer:"pointer"},r.currentCursorMode=null,r.cursor=null,r.resolution=1,r.delayedEvents=[],r.search=new we,r._tempDisplayObject=new le,r._useSystemTicker=void 0===n.useSystemTicker||n.useSystemTicker,r.setTargetElement(r.renderer.view,r.renderer.resolution),r}return function(t,e){function n(){this.constructor=t}_e(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),Object.defineProperty(e.prototype,"useSystemTicker",{get:function(){return this._useSystemTicker},set:function(t){this._useSystemTicker=t,t?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastObjectRendered",{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),e.prototype.hitTest=function(t,e){return Ee.target=null,Ee.data.global=t,e||(e=this.lastObjectRendered),this.processInteractive(Ee,e,null,!0),Ee.target},e.prototype.setTargetElement=function(t,e){void 0===e&&(e=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=t,this.resolution=e,this.addEvents(),this.addTickerListener()},e.prototype.addTickerListener=function(){!this.tickerAdded&&this.interactionDOMElement&&this._useSystemTicker&&(ve.system.add(this.tickerUpdate,this,pe.INTERACTION),this.tickerAdded=!0)},e.prototype.removeTickerListener=function(){this.tickerAdded&&(ve.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},e.prototype.addEvents=function(){if(!this.eventsAdded&&this.interactionDOMElement){var t=this.interactionDOMElement.style;window.navigator.msPointerEnabled?(t.msContentZooming="none",t.msTouchAction="none"):this.supportsPointerEvents&&(t.touchAction="none"),this.supportsPointerEvents?(window.document.addEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,!0),window.addEventListener("pointercancel",this.onPointerCancel,!0),window.addEventListener("pointerup",this.onPointerUp,!0)):(window.document.addEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,!0),window.addEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,!0)),this.eventsAdded=!0}},e.prototype.removeEvents=function(){if(this.eventsAdded&&this.interactionDOMElement){var t=this.interactionDOMElement.style;window.navigator.msPointerEnabled?(t.msContentZooming="",t.msTouchAction=""):this.supportsPointerEvents&&(t.touchAction=""),this.supportsPointerEvents?(window.document.removeEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,!0),window.removeEventListener("pointercancel",this.onPointerCancel,!0),window.removeEventListener("pointerup",this.onPointerUp,!0)):(window.document.removeEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,!0),window.removeEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.interactionDOMElement=null,this.eventsAdded=!1}},e.prototype.tickerUpdate=function(t){this._deltaTime+=t,this._deltaTime8)throw new Error("max arguments reached");var u=this,l=u.name,c=u.items;this._aliasCount++;for(var h=0,f=c.length;h0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},t.prototype.add=function(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this},t.prototype.remove=function(t){var e=this.items.indexOf(t);return-1!==e&&(this.ensureNonAliasedItems(),this.items.splice(e,1)),this},t.prototype.contains=function(t){return-1!==this.items.indexOf(t)},t.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},t.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(t.prototype,"empty",{get:function(){return 0===this.items.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),t}();Object.defineProperties(Pe.prototype,{dispatch:{value:Pe.prototype.emit},run:{value:Pe.prototype.emit}}),V.PREFER_ENV=C.any?I.WEBGL:I.WEBGL2,V.STRICT_TEXTURE_CACHE=!1;var Oe=[];function Ce(t,e){if(!t)return null;var n="";if("string"===typeof t){var r=/\.(\w{3,4})(?:$|\?|#)/i.exec(t);r&&(n=r[1].toLowerCase())}for(var i=Oe.length-1;i>=0;--i){var o=Oe[i];if(o.test&&o.test(t,n))return new o(t,e)}throw new Error("Unrecognized source type to auto-detect Resource")}var Ie=function(t,e){return(Ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function Ae(t,e){function n(){this.constructor=t}Ie(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ke=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this._width=t,this._height=e,this.destroyed=!1,this.internal=!1,this.onResize=new Pe("setRealSize"),this.onUpdate=new Pe("update"),this.onError=new Pe("onError")}return t.prototype.bind=function(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)},t.prototype.unbind=function(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)},t.prototype.resize=function(t,e){t===this._width&&e===this._height||(this._width=t,this._height=e,this.onResize.emit(t,e))},Object.defineProperty(t.prototype,"valid",{get:function(){return!!this._width&&!!this._height},enumerable:!1,configurable:!0}),t.prototype.update=function(){this.destroyed||this.onUpdate.emit()},t.prototype.load=function(){return Promise.resolve(this)},Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),t.prototype.style=function(t,e,n){return!1},t.prototype.dispose=function(){},t.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)},t.test=function(t,e){return!1},t}(),Me=function(t){function e(e,n){var r=this,i=n||{},o=i.width,a=i.height;if(!o||!a)throw new Error("BufferResource width or height invalid");return(r=t.call(this,o,a)||this).data=e,r}return Ae(e,t),e.prototype.upload=function(t,e,n){var r=t.gl;return r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===B.UNPACK),n.width===e.width&&n.height===e.height?r.texSubImage2D(e.target,0,0,0,e.width,e.height,e.format,e.type,this.data):(n.width=e.width,n.height=e.height,r.texImage2D(e.target,0,n.internalFormat,e.width,e.height,0,e.format,n.type,this.data)),!0},e.prototype.dispose=function(){this.data=null},e.test=function(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array},e}(ke),Re={scaleMode:F.NEAREST,format:D.RGBA,alphaMode:B.NPM},De=function(t){function e(e,n){void 0===e&&(e=null),void 0===n&&(n=null);var r=t.call(this)||this,i=(n=n||{}).alphaMode,o=n.mipmap,a=n.anisotropicLevel,s=n.scaleMode,u=n.width,l=n.height,c=n.wrapMode,h=n.format,f=n.type,p=n.target,d=n.resolution,m=n.resourceOptions;return!e||e instanceof ke||((e=Ce(e,m)).internal=!0),r.width=u||0,r.height=l||0,r.resolution=d||V.RESOLUTION,r.mipmap=void 0!==o?o:V.MIPMAP_TEXTURES,r.anisotropicLevel=void 0!==a?a:V.ANISOTROPIC_LEVEL,r.wrapMode=c||V.WRAP_MODE,r.scaleMode=void 0!==s?s:V.SCALE_MODE,r.format=h||D.RGBA,r.type=f||L.UNSIGNED_BYTE,r.target=p||N.TEXTURE_2D,r.alphaMode=void 0!==i?i:B.UNPACK,void 0!==n.premultiplyAlpha&&(r.premultiplyAlpha=n.premultiplyAlpha),r.uid=Tt(),r.touched=0,r.isPowerOfTwo=!1,r._refreshPOT(),r._glTextures={},r.dirtyId=0,r.dirtyStyleId=0,r.cacheId=null,r.valid=u>0&&l>0,r.textureCacheIds=[],r.destroyed=!1,r.resource=null,r._batchEnabled=0,r._batchLocation=0,r.parentTextureArray=null,r.setResource(e),r}return Ae(e,t),Object.defineProperty(e.prototype,"realWidth",{get:function(){return Math.ceil(this.width*this.resolution-1e-4)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"realHeight",{get:function(){return Math.ceil(this.height*this.resolution-1e-4)},enumerable:!1,configurable:!0}),e.prototype.setStyle=function(t,e){var n;return void 0!==t&&t!==this.scaleMode&&(this.scaleMode=t,n=!0),void 0!==e&&e!==this.mipmap&&(this.mipmap=e,n=!0),n&&this.dirtyStyleId++,this},e.prototype.setSize=function(t,e,n){return this.resolution=n||this.resolution,this.width=t,this.height=e,this._refreshPOT(),this.update(),this},e.prototype.setRealSize=function(t,e,n){return this.resolution=n||this.resolution,this.width=t/this.resolution,this.height=e/this.resolution,this._refreshPOT(),this.update(),this},e.prototype._refreshPOT=function(){this.isPowerOfTwo=gt(this.realWidth)&>(this.realHeight)},e.prototype.setResolution=function(t){var e=this.resolution;return e===t||(this.resolution=t,this.valid&&(this.width=this.width*e/t,this.height=this.height*e/t,this.emit("update",this)),this._refreshPOT()),this},e.prototype.setResource=function(t){if(this.resource===t)return this;if(this.resource)throw new Error("Resource can be set only once");return t.bind(this),this.resource=t,this},e.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))},e.prototype.onError=function(t){this.emit("error",this,t)},e.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Ct[this.cacheId],delete Ot[this.cacheId],this.cacheId=null),this.dispose(),e.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},e.prototype.dispose=function(){this.emit("dispose",this)},e.prototype.castToBaseTexture=function(){return this},e.from=function(t,n,r){void 0===r&&(r=V.STRICT_TEXTURE_CACHE);var i="string"===typeof t,o=null;i?o=t:(t._pixiId||(t._pixiId="pixiid_"+Tt()),o=t._pixiId);var a=Ct[o];if(i&&r&&!a)throw new Error('The cacheId "'+o+'" does not exist in BaseTextureCache.');return a||((a=new e(t,n)).cacheId=o,e.addToCache(a,o)),a},e.fromBuffer=function(t,n,r,i){t=t||new Float32Array(n*r*4);var o=new Me(t,{width:n,height:r}),a=t instanceof Float32Array?L.FLOAT:L.UNSIGNED_BYTE;return new e(o,Object.assign(Re,i||{width:n,height:r,type:a}))},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),Ct[e]&&console.warn("BaseTexture added to the cache with an id ["+e+"] that already had an entry"),Ct[e]=t)},e.removeFromCache=function(t){if("string"===typeof t){var e=Ct[t];if(e){var n=e.textureCacheIds.indexOf(t);return n>-1&&e.textureCacheIds.splice(n,1),delete Ct[t],e}}else if(t&&t.textureCacheIds){for(var r=0;r0){if(!t.resource)throw new Error("CubeResource does not support copying of renderTexture.");this.addResourceAt(t.resource,e)}else t.target=N.TEXTURE_CUBE_MAP_POSITIVE_X+e,t.parentTextureArray=this.baseTexture,this.items[e]=t;return t.valid&&!this.valid&&this.resize(t.realWidth,t.realHeight),this.items[e]=t,this},e.prototype.upload=function(t,n,r){for(var i=this.itemDirtyIds,o=0;o]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,e}(Fe),He=function(t){function e(n,r){var i=this;if(r=r||{},!(n instanceof HTMLVideoElement)){var o=document.createElement("video");o.setAttribute("preload","auto"),o.setAttribute("webkit-playsinline",""),o.setAttribute("playsinline",""),"string"===typeof n&&(n=[n]);var a=n[0].src||n[0];Fe.crossOrigin(o,a,r.crossorigin);for(var s=0;s0&&!1===t.paused&&!1===t.ended&&t.readyState>2},e.prototype._isSourceReady=function(){var t=this.source;return 3===t.readyState||4===t.readyState},e.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(ve.shared.add(this.update,this),this._isConnectedToTicker=!0)},e.prototype._onPlayStop=function(){this._isConnectedToTicker&&(ve.shared.remove(this.update,this),this._isConnectedToTicker=!1)},e.prototype._onCanPlay=function(){var t=this.source;t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay);var e=this.valid;this.resize(t.videoWidth,t.videoHeight),!e&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&t.play()},e.prototype.dispose=function(){this._isConnectedToTicker&&ve.shared.remove(this.update,this);var e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(ve.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(ve.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(t){t!==this._updateFPS&&(this._updateFPS=t)},enumerable:!1,configurable:!0}),e.test=function(t,n){return t instanceof HTMLVideoElement||e.TYPES.indexOf(n)>-1},e.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],e.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},e}(Fe),Xe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ae(e,t),e.test=function(t){return!!window.createImageBitmap&&t instanceof ImageBitmap},e}(Fe);Oe.push(Be,Xe,Ue,He,ze,Me,je,Le);var We={Resource:ke,BaseImageResource:Fe,INSTALLED:Oe,autoDetectResource:Ce,AbstractMultiResource:Ne,ArrayResource:Le,BufferResource:Me,CanvasResource:Ue,CubeResource:je,ImageResource:Be,SVGResource:ze,VideoResource:He,ImageBitmapResource:Xe},Ge=function(){function t(t){this.renderer=t}return t.prototype.destroy=function(){this.renderer=null},t}(),Ve=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ae(e,t),e.prototype.upload=function(t,e,n){var r=t.gl;return r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===B.UNPACK),n.width===e.width&&n.height===e.height?r.texSubImage2D(e.target,0,0,0,e.width,e.height,e.format,e.type,this.data):(n.width=e.width,n.height=e.height,r.texImage2D(e.target,0,1===t.context.webGLVersion?r.DEPTH_COMPONENT:r.DEPTH_COMPONENT16,e.width,e.height,0,e.format,e.type,this.data)),!0},e}(Me),Ye=function(){function t(t,e){this.width=Math.ceil(t||100),this.height=Math.ceil(e||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new Pe("disposeFramebuffer"),this.multisample=G.NONE}return Object.defineProperty(t.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),t.prototype.addColorTexture=function(t,e){return void 0===t&&(t=0),this.colorTextures[t]=e||new De(null,{scaleMode:F.NEAREST,resolution:1,mipmap:j.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.addDepthTexture=function(t){return this.depthTexture=t||new De(new Ve(null,{width:this.width,height:this.height}),{scaleMode:F.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:j.OFF,format:D.DEPTH_COMPONENT,type:L.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},t.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},t.prototype.resize=function(t,e){if(t=Math.ceil(t),e=Math.ceil(e),t!==this.width||e!==this.height){this.width=t,this.height=e,this.dirtyId++,this.dirtySize++;for(var n=0;n-1&&e.textureCacheIds.splice(n,1),delete Ot[t],e}}else if(t&&t.textureCacheIds){for(var r=0;rthis.baseTexture.width,a=n+i>this.baseTexture.height;if(o||a){var s=o&&a?"and":"or",u="X: "+e+" + "+r+" = "+(e+r)+" > "+this.baseTexture.width,l="Y: "+n+" + "+i+" = "+(n+i)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+u+" "+s+" "+l)}this.valid=r&&i&&this.baseTexture.valid,this.trim||this.rotate||(this.orig=t),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotate",{get:function(){return this._rotate},set:function(t){this._rotate=t,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),e.prototype.castToBaseTexture=function(){return this.baseTexture},e}(q.a);function Ze(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}$e.EMPTY=new $e(new De),Ze($e.EMPTY),Ze($e.EMPTY.baseTexture),$e.WHITE=function(){var t=document.createElement("canvas");t.width=16,t.height=16;var e=t.getContext("2d");return e.fillStyle="white",e.fillRect(0,0,16,16),new $e(new De(new Ue(t)))}(),Ze($e.WHITE),Ze($e.WHITE.baseTexture);var Je=function(t){function e(e,n){var r=this,i=null;if(!(e instanceof qe)){var o=arguments[1],a=arguments[2],s=arguments[3],u=arguments[4];console.warn("Please use RenderTexture.create("+o+", "+a+") instead of the ctor directly."),i=arguments[0],n=null,e=new qe({width:o,height:a,scaleMode:s,resolution:u})}return(r=t.call(this,e,n)||this).legacyRenderer=i,r.valid=!0,r.filterFrame=null,r.filterPoolKey=null,r.updateUvs(),r}return Ae(e,t),Object.defineProperty(e.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),e.prototype.resize=function(t,e,n){void 0===n&&(n=!0),t=Math.ceil(t),e=Math.ceil(e),this.valid=t>0&&e>0,this._frame.width=this.orig.width=t,this._frame.height=this.orig.height=e,n&&this.baseTexture.resize(t,e),this.updateUvs()},e.prototype.setResolution=function(t){var e=this.baseTexture;e.resolution!==t&&(e.setResolution(t),this.resize(e.width,e.height,!1))},e.create=function(t){return"number"===typeof t&&(t={width:t,height:arguments[1],scaleMode:arguments[2],resolution:arguments[3]}),new e(new qe(t))},e}($e),tn=function(){function t(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}return t.prototype.createTexture=function(t,e){var n=new qe(Object.assign({width:t,height:e,resolution:1},this.textureOptions));return new Je(n)},t.prototype.getOptimalTexture=function(e,n,r){void 0===r&&(r=1);var i=t.SCREEN_KEY;e*=r,n*=r,this.enableFullScreen&&e===this._pixelsWidth&&n===this._pixelsHeight||(i=(65535&(e=yt(e)))<<16|65535&(n=yt(n))),this.texturePool[i]||(this.texturePool[i]=[]);var o=this.texturePool[i].pop();return o||(o=this.createTexture(e,n)),o.filterPoolKey=i,o.setResolution(r),o},t.prototype.getFilterTexture=function(t,e){var n=this.getOptimalTexture(t.width,t.height,e||t.resolution);return n.filterFrame=t.filterFrame,n},t.prototype.returnTexture=function(t){var e=t.filterPoolKey;t.filterFrame=null,this.texturePool[e].push(t)},t.prototype.returnFilterTexture=function(t){this.returnTexture(t)},t.prototype.clear=function(t){if(t=!1!==t)for(var e in this.texturePool){var n=this.texturePool[e];if(n)for(var r=0;r0&&e.height>0,r)for(var i=0;i1){for(var l=0;l1&&this.renderer.framebuffer.blit(),1===n.length)n[0].apply(this,e.renderTexture,u.renderTexture,z.BLEND,e),this.returnFilterTexture(e.renderTexture);else{var l=e.renderTexture,c=this.getOptimalFilterTexture(l.width,l.height,e.resolution);c.filterFrame=l.filterFrame;var h=0;for(h=0;h=0;--r)t[r]=n[r]||null,t[r]&&(t[r]._batchLocation=r)},e.prototype.boundArray=function(t,e,n,r){for(var i=t.elements,o=t.ids,a=t.count,s=0,u=0;u=0&&c=I.WEBGL2&&(n=t.getContext("webgl2",e)),n)this.webGLVersion=2;else if(this.webGLVersion=1,!(n=t.getContext("webgl",e)||t.getContext("experimental-webgl",e)))throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl},e.prototype.getExtensions=function(){var t=this.gl;1===this.webGLVersion?Object.assign(this.extensions,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),loseContext:t.getExtension("WEBGL_lose_context"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):2===this.webGLVersion&&Object.assign(this.extensions,{anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),colorBufferFloat:t.getExtension("EXT_color_buffer_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear")})},e.prototype.handleContextLost=function(t){t.preventDefault()},e.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},e.prototype.destroy=function(){var t=this.renderer.view;t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},e.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},e.prototype.validateContext=function(t){t.getContextAttributes().stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");var e="WebGL2RenderingContext"in window&&t instanceof window.WebGL2RenderingContext||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=e,e||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")},e}(Ge),xn=function(t){this.framebuffer=t,this.stencil=null,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.multisample=G.NONE,this.msaaBuffer=null,this.blitFramebuffer=null},wn=new Ht,Tn=function(t){function e(e){var n=t.call(this,e)||this;return n.managedFramebuffers=[],n.unknownFramebuffer=new Ye(10,10),n.msaaSamples=null,n}return Ae(e,t),e.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Ht,this.hasMRT=!0,this.writeDepthTexture=!0,this.disposeAll(!0),1===this.renderer.context.webGLVersion){var e=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;V.PREFER_ENV===I.WEBGL_LEGACY&&(e=null,n=null),e?t.drawBuffers=function(t){return e.drawBuffersWEBGL(t)}:(this.hasMRT=!1,t.drawBuffers=function(){}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)},e.prototype.bind=function(t,e){var n=this.gl;if(t){var r=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,n.bindFramebuffer(n.FRAMEBUFFER,r.framebuffer)),r.dirtyId!==t.dirtyId&&(r.dirtyId=t.dirtyId,r.dirtyFormat!==t.dirtyFormat?(r.dirtyFormat=t.dirtyFormat,this.updateFramebuffer(t)):r.dirtySize!==t.dirtySize&&(r.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(var i=0;i1&&(n.msaaBuffer=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,n.msaaBuffer),e.renderbufferStorageMultisample(e.RENDERBUFFER,n.multisample,e.RGBA8,t.width,t.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.RENDERBUFFER,n.msaaBuffer));for(var i=[],o=0;o1)){var a=t.colorTextures[o],s=a.parentTextureArray||a;this.renderer.texture.bind(s,0),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+o,a.target,s._glTextures[this.CONTEXT_UID].texture,0),i.push(e.COLOR_ATTACHMENT0+o)}if((i.length>1&&e.drawBuffers(i),t.depthTexture)&&this.writeDepthTexture){var u=t.depthTexture;this.renderer.texture.bind(u,0),e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,u._glTextures[this.CONTEXT_UID].texture,0)}n.stencil||!t.stencil&&!t.depth||(n.stencil=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,n.stencil),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.width,t.height),t.depthTexture||e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,n.stencil))},e.prototype.detectSamples=function(t){var e=this.msaaSamples,n=G.NONE;if(t<=1||null===e)return n;for(var r=0;r=0&&this.managedFramebuffers.splice(i,1),t.disposeRunner.remove(this),e||(r.deleteFramebuffer(n.framebuffer),n.stencil&&r.deleteRenderbuffer(n.stencil))}},e.prototype.disposeAll=function(t){var e=this.managedFramebuffers;this.managedFramebuffers=[];for(var n=0;n=r.data.byteLength)e.bufferSubData(o,0,r.data);else{var a=r.static?e.STATIC_DRAW:e.DYNAMIC_DRAW;i.byteLength=r.data.byteLength,e.bufferData(o,r.data,a)}}}},e.prototype.checkCompatibility=function(t,e){var n=t.attributes,r=e.attributeData;for(var i in r)if(!n[i])throw new Error('shader and geometry incompatible, geometry missing the "'+i+'" attribute')},e.prototype.getSignature=function(t,e){var n=t.attributes,r=e.attributeData,i=["g",t.id];for(var o in n)r[o]&&i.push(o);return i.join("-")},e.prototype.initGeometryVao=function(t,e){this.checkCompatibility(t,e);var n=this.gl,r=this.CONTEXT_UID,i=this.getSignature(t,e),o=t.glVertexArrayObjects[this.CONTEXT_UID],a=o[i];if(a)return o[e.id]=a,a;var s=t.buffers,u=t.attributes,l={},c={};for(var h in s)l[h]=0,c[h]=0;for(var h in u)!u[h].size&&e.attributeData[h]?u[h].size=e.attributeData[h].size:u[h].size||console.warn("PIXI Geometry attribute '"+h+"' size cannot be determined (likely the bound shader does not have the attribute)"),l[u[h].buffer]+=u[h].size*Sn[u[h].type];for(var h in u){var f=u[h],p=f.size;void 0===f.stride&&(l[f.buffer]===p*Sn[f.type]?f.stride=0:f.stride=l[f.buffer]),void 0===f.start&&(f.start=c[f.buffer],c[f.buffer]+=p*Sn[f.type])}a=n.createVertexArray(),n.bindVertexArray(a);for(var d=0;d=I.WEBGL2&&(e=t.getContext("webgl2",{})),e||((e=t.getContext("webgl",{})||t.getContext("experimental-webgl",{}))?e.getExtension("WEBGL_draw_buffers"):e=null),Dn=e}return Dn}function Ln(t,e,n){if("precision"!==t.substring(0,9)){var r=e;return e===X.HIGH&&n!==X.HIGH&&(r=X.MEDIUM),"precision "+r+" float;\n"+t}return n!==X.HIGH&&"precision highp"===t.substring(0,15)?t.replace("precision highp","precision mediump"):t}var Fn={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function Un(t){return Fn[t]}var jn=null,Bn={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function zn(t,e){if(!jn){var n=Object.keys(Bn);jn={};for(var r=0;r0&&(e+="\nelse "),ne.name?1:-1}));for(o=0;o0?this._useCurrent():t.disable(t.SCISSOR_TEST)},e.prototype._useCurrent=function(){var t=this.maskStack[this.maskStack.length-1]._scissorRect,e=this.renderer.renderTexture.current,n=this.renderer.projection,r=n.transform,i=n.sourceFrame,o=n.destinationFrame,a=e?e.resolution:this.renderer.resolution,s=(t.x-i.x)*a+o.x,u=(t.y-i.y)*a+o.y,l=t.width*a,c=t.height*a;r&&(s+=r.tx*a,u+=r.ty*a),e||(u=this.renderer.height-c-u),this.renderer.gl.scissor(s,u,l,c)},e}(or),sr=function(t){function e(e){var n=t.call(this,e)||this;return n.glConst=WebGLRenderingContext.STENCIL_TEST,n}return Ae(e,t),e.prototype.getStackLength=function(){var t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0},e.prototype.push=function(t){var e=t.maskObject,n=this.renderer.gl,r=t._stencilCounter;0===r&&(this.renderer.framebuffer.forceStencil(),n.enable(n.STENCIL_TEST)),t._stencilCounter++,n.colorMask(!1,!1,!1,!1),n.stencilFunc(n.EQUAL,r,this._getBitwiseMask()),n.stencilOp(n.KEEP,n.KEEP,n.INCR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,this._useCurrent()},e.prototype.pop=function(t){var e=this.renderer.gl;0===this.getStackLength()?(e.disable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),e.clearStencil(0)):(e.colorMask(!1,!1,!1,!1),e.stencilOp(e.KEEP,e.KEEP,e.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,this._useCurrent())},e.prototype._useCurrent=function(){var t=this.renderer.gl;t.colorMask(!0,!0,!0,!0),t.stencilFunc(t.EQUAL,this.getStackLength(),this._getBitwiseMask()),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)},e.prototype._getBitwiseMask=function(){return(1<>=1,n++;this.stateId=t.data}for(n=0;nthis.checkCountMax&&(this.checkCount=0,this.run())))},e.prototype.run=function(){for(var t=this.renderer.texture,e=t.managedTextures,n=!1,r=0;rthis.maxIdle&&(t.destroyTexture(i,!0),e[r]=null,n=!0)}if(n){var o=0;for(r=0;r=0;r--)this.unload(t.children[r])},e}(Ge),br=function(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=6408,this.internalFormat=5121},xr=function(t){function e(e){var n=t.call(this,e)||this;return n.boundTextures=[],n.currentLocation=-1,n.managedTextures=[],n._unknownBoundTextures=!1,n.unknownTexture=new De,n}return Ae(e,t),e.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion;var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=e;for(var n=0;n=1:e.mipmap=!1,2===this.webGLVersion||t.isPowerOfTwo?e.wrapMode=t.wrapMode:e.wrapMode=U.CLAMP,t.resource&&t.resource.style(this.renderer,t,e)||this.setStyle(t,e),e.dirtyStyleId=t.dirtyStyleId)},e.prototype.setStyle=function(t,e){var n=this.gl;if(e.mipmap&&n.generateMipmap(t.target),n.texParameteri(t.target,n.TEXTURE_WRAP_S,e.wrapMode),n.texParameteri(t.target,n.TEXTURE_WRAP_T,e.wrapMode),e.mipmap){n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===F.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);var r=this.renderer.context.extensions.anisotropicFiltering;if(r&&t.anisotropicLevel>0&&t.scaleMode===F.LINEAR){var i=Math.min(t.anisotropicLevel,n.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(t.target,r.TEXTURE_MAX_ANISOTROPY_EXT,i)}}else n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===F.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(t.target,n.TEXTURE_MAG_FILTER,t.scaleMode===F.LINEAR?n.LINEAR:n.NEAREST)},e}(Ge),wr={FilterSystem:vn,BatchSystem:gn,ContextSystem:bn,FramebufferSystem:Tn,GeometrySystem:Pn,MaskSystem:ir,ScissorSystem:ar,StencilSystem:sr,ProjectionSystem:ur,RenderTextureSystem:fr,ShaderSystem:yr,StateSystem:gr,TextureGCSystem:_r,TextureSystem:xr},Tr=new Kt,Er=function(t){function e(e,n){void 0===e&&(e=A.UNKNOWN);var r=t.call(this)||this;return(n=Object.assign({},V.RENDER_OPTIONS,n)).roundPixels&&(V.ROUND_PIXELS=n.roundPixels,St("5.0.0","Renderer roundPixels option is deprecated, please use PIXI.settings.ROUND_PIXELS",2)),r.options=n,r.type=e,r.screen=new Ht(0,0,n.width,n.height),r.view=n.view||document.createElement("canvas"),r.resolution=n.resolution||V.RESOLUTION,r.transparent=n.transparent,r.autoDensity=n.autoDensity||n.autoResize||!1,r.preserveDrawingBuffer=n.preserveDrawingBuffer,r.clearBeforeRender=n.clearBeforeRender,r._backgroundColor=0,r._backgroundColorRgba=[0,0,0,0],r._backgroundColorString="#000000",r.backgroundColor=n.backgroundColor||r._backgroundColor,r._lastObjectRendered=null,r.plugins={},r}return Ae(e,t),e.prototype.initPlugins=function(t){for(var e in t)this.plugins[e]=new t[e](this)},Object.defineProperty(e.prototype,"width",{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.view.height},enumerable:!1,configurable:!0}),e.prototype.resize=function(t,e){this.screen.width=t,this.screen.height=e,this.view.width=t*this.resolution,this.view.height=e*this.resolution,this.autoDensity&&(this.view.style.width=t+"px",this.view.style.height=e+"px"),this.emit("resize",t,e)},e.prototype.generateTexture=function(t,e,n,r){0===(r=r||t.getLocalBounds(null,!0)).width&&(r.width=1),0===r.height&&(r.height=1);var i=Je.create({width:0|r.width,height:0|r.height,scaleMode:e,resolution:n});return Tr.tx=-r.x,Tr.ty=-r.y,this.render(t,i,!1,Tr,!!t.parent),i},e.prototype.destroy=function(t){for(var e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null;t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);var n=this;n.plugins=null,n.type=A.UNKNOWN,n.view=null,n.screen=null,n._tempDisplayObjectParent=null,n.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._backgroundColorString=ot(t),it(t,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),e}(q.a),Sr=function(t){function e(n){var r=t.call(this,A.WEBGL,n)||this;return n=r.options,r.gl=null,r.CONTEXT_UID=0,r.runners={destroy:new Pe("destroy"),contextChange:new Pe("contextChange"),reset:new Pe("reset"),update:new Pe("update"),postrender:new Pe("postrender"),prerender:new Pe("prerender"),resize:new Pe("resize")},r.globalUniforms=new dn({projectionMatrix:new Kt},!0),r.addSystem(ir,"mask").addSystem(bn,"context").addSystem(gr,"state").addSystem(yr,"shader").addSystem(xr,"texture").addSystem(Pn,"geometry").addSystem(Tn,"framebuffer").addSystem(ar,"scissor").addSystem(sr,"stencil").addSystem(ur,"projection").addSystem(_r,"textureGC").addSystem(vn,"filter").addSystem(fr,"renderTexture").addSystem(gn,"batch"),r.initPlugins(e.__plugins),n.context?r.context.initFromContext(n.context):r.context.initFromOptions({alpha:!!r.transparent,antialias:n.antialias,premultipliedAlpha:r.transparent&&"notMultiplied"!==r.transparent,stencil:!0,preserveDrawingBuffer:n.preserveDrawingBuffer,powerPreference:r.options.powerPreference}),r.renderingToScreen=!0,nt(2===r.context.webGLVersion?"WebGL 2":"WebGL 1"),r.resize(r.options.width,r.options.height),r}return Ae(e,t),e.create=function(t){if(rt())return new e(t);throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.')},e.prototype.addSystem=function(t,e){e||(e=t.name);var n=new t(this);if(this[e])throw new Error('Whoops! The name "'+e+'" is already in use');for(var r in this[e]=n,this.runners)this.runners[r].add(n);return this},e.prototype.render=function(t,e,n,r,i){if(this.renderingToScreen=!e,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=r,!this.context.isLost){if(e||(this._lastObjectRendered=t),!i){var o=t.enableTempParent();t.updateTransform(),t.disableTempParent(o)}this.renderTexture.bind(e),this.batch.currentRenderer.start(),(void 0!==n?n:this.clearBeforeRender)&&this.renderTexture.clear(),t.render(this),this.batch.currentRenderer.flush(),e&&e.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},e.prototype.resize=function(e,n){t.prototype.resize.call(this,e,n),this.runners.resize.emit(e,n)},e.prototype.reset=function(){return this.runners.reset.emit(),this},e.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},e.prototype.destroy=function(e){for(var n in this.runners.destroy.emit(),this.runners)this.runners[n].destroy();t.prototype.destroy.call(this,e),this.gl=null},e.registerPlugin=function(t,n){e.__plugins=e.__plugins||{},e.__plugins[t]=n},e}(Er);function Pr(t){return Sr.create(t)}var Or="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",Cr="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n",Ir=function(){this.texArray=null,this.blend=0,this.type=R.TRIANGLES,this.start=0,this.size=0,this.data=null},Ar=function(){function t(){this.elements=[],this.ids=[],this.count=0}return t.prototype.clear=function(){for(var t=0;tthis.size&&this.flush(),this._vertexCount+=t.vertexData.length/2,this._indexCount+=t.indices.length,this._bufferedTextures[this._bufferSize]=t._texture.baseTexture,this._bufferedElements[this._bufferSize++]=t)},e.prototype.buildTexturesAndDrawCalls=function(){var t=this._bufferedTextures,n=this.MAX_TEXTURES,r=e._textureArrayPool,i=this.renderer.batch,o=this._tempBoundTextures,a=this.renderer.textureGC.count,s=++De._globalBatch,u=0,l=r[0],c=0;i.copyBoundTextures(o,n);for(var h=0;h=n&&(i.boundArray(l,o,s,n),this.buildDrawCalls(l,c,h),c=h,l=r[++u],++s),f._batchEnabled=s,f.touched=a,l.elements[l.count++]=f)}l.count>0&&(i.boundArray(l,o,s,n),this.buildDrawCalls(l,c,this._bufferSize),++u,++s);for(h=0;h0&&(e+="\nelse "),n0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?r=200:1223===r&&(r=204),2===(r/100|0)){if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=n,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(n),this.type=t.TYPE.JSON}catch(a){return void this.abort("Error trying to parse loaded json: "+a)}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var i=new DOMParser;this.data=i.parseFromString(n,"text/xml")}else{var o=document.createElement("div");o.innerHTML=n,this.data=o}this.type=t.TYPE.XML}catch(a){return void this.abort("Error trying to parse loaded xml: "+a)}else this.data=e.response||n;this.complete()}else this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL)},e._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";if(window.origin!==window.location.origin)return"anonymous";e=e||window.location,ei||(ei=document.createElement("a")),ei.href=t;var n=!(t=Wr()(ei.href,{strictMode:!0})).port&&""===e.port||t.port===e.port,r=t.protocol?t.protocol+":":"";return t.host===e.hostname&&n&&r===e.protocol?"":"anonymous"},e._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},e._determineLoadType=function(){return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},e._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var n=t.indexOf("/");e=t.substring(n+1,t.indexOf(";",n))}else{var r=t.indexOf("?"),i=t.indexOf("#"),o=Math.min(r>-1?r:t.length,i>-1?i:t.length);e=(t=t.substring(0,o)).substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},e._getMimeFromXhrType=function(e){switch(e){case t.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case t.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case t.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case t.XHR_RESPONSE_TYPE.JSON:return"application/json";case t.XHR_RESPONSE_TYPE.DEFAULT:case t.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},Jr(t,[{key:"isDataUrl",get:function(){return this._hasFlag(t.STATUS_FLAGS.DATA_URL)}},{key:"isComplete",get:function(){return this._hasFlag(t.STATUS_FLAGS.COMPLETE)}},{key:"isLoading",get:function(){return this._hasFlag(t.STATUS_FLAGS.LOADING)}}]),t}();function ii(t,e,n){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=n)}function oi(t){return t.toString().replace("object ","")}ri.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},ri.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},ri.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},ri.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},ri._loadTypeMap={gif:ri.LOAD_TYPE.IMAGE,png:ri.LOAD_TYPE.IMAGE,bmp:ri.LOAD_TYPE.IMAGE,jpg:ri.LOAD_TYPE.IMAGE,jpeg:ri.LOAD_TYPE.IMAGE,tif:ri.LOAD_TYPE.IMAGE,tiff:ri.LOAD_TYPE.IMAGE,webp:ri.LOAD_TYPE.IMAGE,tga:ri.LOAD_TYPE.IMAGE,svg:ri.LOAD_TYPE.IMAGE,"svg+xml":ri.LOAD_TYPE.IMAGE,mp3:ri.LOAD_TYPE.AUDIO,ogg:ri.LOAD_TYPE.AUDIO,wav:ri.LOAD_TYPE.AUDIO,mp4:ri.LOAD_TYPE.VIDEO,webm:ri.LOAD_TYPE.VIDEO},ri._xhrTypeMap={xhtml:ri.XHR_RESPONSE_TYPE.DOCUMENT,html:ri.XHR_RESPONSE_TYPE.DOCUMENT,htm:ri.XHR_RESPONSE_TYPE.DOCUMENT,xml:ri.XHR_RESPONSE_TYPE.DOCUMENT,tmx:ri.XHR_RESPONSE_TYPE.DOCUMENT,svg:ri.XHR_RESPONSE_TYPE.DOCUMENT,tsx:ri.XHR_RESPONSE_TYPE.DOCUMENT,gif:ri.XHR_RESPONSE_TYPE.BLOB,png:ri.XHR_RESPONSE_TYPE.BLOB,bmp:ri.XHR_RESPONSE_TYPE.BLOB,jpg:ri.XHR_RESPONSE_TYPE.BLOB,jpeg:ri.XHR_RESPONSE_TYPE.BLOB,tif:ri.XHR_RESPONSE_TYPE.BLOB,tiff:ri.XHR_RESPONSE_TYPE.BLOB,webp:ri.XHR_RESPONSE_TYPE.BLOB,tga:ri.XHR_RESPONSE_TYPE.BLOB,json:ri.XHR_RESPONSE_TYPE.JSON,text:ri.XHR_RESPONSE_TYPE.TEXT,txt:ri.XHR_RESPONSE_TYPE.TEXT,ttf:ri.XHR_RESPONSE_TYPE.BUFFER,otf:ri.XHR_RESPONSE_TYPE.BUFFER},ri.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";var ai=window.URL||window.webkitURL;var si={caching:function(t,e){var n=this;$r[t.url]?(t.data=$r[t.url],t.complete()):t.onComplete.once((function(){return $r[n.url]=n.data})),e()},parsing:function(t,e){if(t.data){if(t.xhr&&t.xhrType===ri.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!==typeof t.data){if(0===t.data.type.indexOf("image")){var n=ai.createObjectURL(t.data);return t.blob=t.data,t.data=new Image,t.data.src=n,t.type=ri.TYPE.IMAGE,void(t.data.onload=function(){ai.revokeObjectURL(n),t.data.onload=null,e()})}}else{var r=t.xhr.getResponseHeader("content-type");if(r&&0===r.indexOf("image"))return t.data=new Image,t.data.src="data:"+r+";base64,"+function(t){for(var e="",n=0;n>2,i[1]=(3&r[0])<<4|r[1]>>4,i[2]=(15&r[1])<<2|r[2]>>6,i[3]=63&r[2],n-(t.length-1)){case 2:i[3]=64,i[2]=64;break;case 1:i[3]=64}for(var a=0;a16384&&(r=16384),o._properties=[!1,!0,!1,!1,!1],o._maxSize=e,o._batchSize=r,o._buffers=null,o._bufferUpdateIDs=[],o._updateID=0,o.interactiveChildren=!1,o.blendMode=M.NORMAL,o.autoResize=i,o.roundPixels=!0,o.baseTexture=null,o.setProperties(n),o._tint=0,o.tintRgb=new Float32Array(4),o.tint=16777215,o}return vi(e,t),e.prototype.setProperties=function(t){t&&(this._properties[0]="vertices"in t||"scale"in t?!!t.vertices||!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="tint"in t||"alpha"in t?!!t.tint||!!t.alpha:this._properties[4])},e.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(t){this._tint=t,it(t,this.tintRgb)},enumerable:!1,configurable:!0}),e.prototype.render=function(t){var e=this;this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",(function(){return e.onChildrenChange(0)}))),t.batch.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},e.prototype.onChildrenChange=function(t){for(var e=Math.floor(t/this._batchSize);this._bufferUpdateIDs.lengthn&&!t.autoResize&&(o=n);var a=t._buffers;a||(a=t._buffers=this.generateBuffers(t));var s=e[0]._texture.baseTexture;this.state.blendMode=lt(t.blendMode,s.alphaMode),i.state.set(this.state);var u=i.gl,l=t.worldTransform.copyTo(this.tempMatrix);l.prepend(i.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=l.toArray(!0),this.shader.uniforms.uColor=ct(t.tintRgb,t.worldAlpha,this.shader.uniforms.uColor,s.alphaMode),this.shader.uniforms.uSampler=s,this.renderer.shader.bind(this.shader);for(var c=!1,h=0,f=0;hr&&(p=r),f>=a.length&&a.push(this._generateOneMoreBuffer(t));var d=a[f];d.uploadDynamic(e,h,p);var m=t._bufferUpdateIDs[f]||0;(c=c||d._updateID0,l=s.alpha,c=l<1&&u?ht(s._tintRGB,l):s._tintRGB+(255*l<<24);r[o]=c,r[o+i]=c,r[o+2*i]=c,r[o+3*i]=c,o+=4*i}},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},e}(yn);!function(t){t.MITER="miter",t.BEVEL="bevel",t.ROUND="round"}(yi||(yi={})),function(t){t.BUTT="butt",t.ROUND="round",t.SQUARE="square"}(gi||(gi={}));var wi={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount:function(t,e){if(void 0===e&&(e=20),!this.adaptive||!t||isNaN(t))return e;var n=Math.ceil(t/this.maxLength);return nthis.maxSegments&&(n=this.maxSegments),n}},Ti=function(){function t(){this.color=16777215,this.alpha=1,this.texture=$e.WHITE,this.matrix=null,this.visible=!1,this.reset()}return t.prototype.clone=function(){var e=new t;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e},t.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=$e.WHITE,this.matrix=null,this.visible=!1},t.prototype.destroy=function(){this.texture=null,this.matrix=null},t}(),Ei=function(t,e){return(Ei=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function Si(t,e){function n(){this.constructor=t}Ei(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var Pi={build:function(t){t.points=t.shape.points.slice()},triangulate:function(t,e){var n=t.points,r=t.holes,i=e.points,o=e.indices;if(n.length>=6){for(var a=[],s=0;sh&&(h+=2*Math.PI);var f=c,p=h-c,d=Math.abs(p),m=Math.sqrt(u*u+l*l),v=1+(15*d*Math.sqrt(m)/Math.PI>>0),y=p/v;if(f+=y,s){a.push(t,e),a.push(n,r);for(var g=1,_=f;gg?(j?(f.push(G,V),f.push(x+S*M,w+P*M),f.push(G,V),f.push(x+O*M,w+C*M)):(f.push(x-S*k,w-P*k),f.push(Y,q),f.push(x-O*k,w-C*k),f.push(Y,q)),d+=2):o.join===yi.ROUND?j?(f.push(G,V),f.push(x+S*M,w+P*M),d+=Ri(x,w,x+S*M,w+P*M,x+O*M,w+C*M,f,!0)+4,f.push(G,V),f.push(x+O*M,w+C*M)):(f.push(x-S*k,w-P*k),f.push(Y,q),d+=Ri(x,w,x-S*k,w-P*k,x-O*k,w-C*k,f,!1)+4,f.push(x-O*k,w-C*k),f.push(Y,q)):(f.push(G,V),f.push(Y,q))}}_=r[2*(p-2)],b=r[2*(p-2)+1],x=r[2*(p-1)],S=-(b-(w=r[2*(p-1)+1])),P=_-x,S/=I=Math.sqrt(S*S+P*P),P/=I,S*=v,P*=v,f.push(x-S*k,w-P*k),f.push(x+S*M,w+P*M),u||(o.cap===gi.ROUND?d+=Ri(x-S*(k-M)*.5,w-P*(k-M)*.5,x-S*k,w-P*k,x+S*M,w+P*M,f,!1)+2:o.cap===gi.SQUARE&&(d+=Mi(x,w,S,P,k,M,!1,f)));var K=e.indices,Q=wi.epsilon*wi.epsilon;for(R=m;Rc*s}},t.arc=function(t,e,n,r,i,o,a,s,u){for(var l=a-o,c=wi._segmentsCount(Math.abs(l)*i,40*Math.ceil(Math.abs(l)/jt)),h=l/(2*c),f=2*h,p=Math.cos(h),d=Math.sin(h),m=c-1,v=m%1/m,y=0;y<=m;++y){var g=h+o+f*(y+v*y),_=Math.cos(g),b=-Math.sin(g);u.push((p*_+d*b)*i+n,(p*-b+d*_)*i+r)}},t}(),Ui=function(){function t(){}return t.curveLength=function(t,e,n,r,i,o,a,s){for(var u=0,l=0,c=0,h=0,f=0,p=0,d=0,m=0,v=0,y=0,g=0,_=t,b=e,x=1;x<=10;++x)y=_-(m=(d=(p=(f=1-(l=x/10))*f)*f)*t+3*p*l*n+3*f*(c=l*l)*i+(h=c*l)*a),g=b-(v=d*e+3*p*l*r+3*f*c*o+h*s),_=m,b=v,u+=Math.sqrt(y*y+g*g);return u},t.curveTo=function(e,n,r,i,o,a,s){var u=s[s.length-2],l=s[s.length-1];s.length-=2;var c=wi._segmentsCount(t.curveLength(u,l,e,n,r,i,o,a)),h=0,f=0,p=0,d=0,m=0;s.push(u,l);for(var v=1,y=0;v<=c;++v)p=(f=(h=1-(y=v/c))*h)*h,m=(d=y*y)*y,s.push(p*u+3*f*y*e+3*h*d*r+m*o,p*l+3*f*y*n+3*h*d*i+m*a)},t}(),ji=function(){function t(){}return t.curveLength=function(t,e,n,r,i,o){var a=t-2*n+i,s=e-2*r+o,u=2*n-2*t,l=2*r-2*e,c=4*(a*a+s*s),h=4*(a*u+s*l),f=u*u+l*l,p=2*Math.sqrt(c+h+f),d=Math.sqrt(c),m=2*c*d,v=2*Math.sqrt(f),y=h/d;return(m*p+d*h*(p-v)+(4*f*c-h*h)*Math.log((2*d+y+p)/(y+v)))/(4*m)},t.curveTo=function(e,n,r,i,o){for(var a=o[o.length-2],s=o[o.length-1],u=wi._segmentsCount(t.curveLength(a,s,e,n,r,i)),l=0,c=0,h=1;h<=u;++h){var f=h/u;l=a+(e-a)*f,c=s+(n-s)*f,o.push(l+(e+(r-e)*f-l)*f,c+(n+(i-n)*f-c)*f)}},t}(),Bi=function(){function t(){this.reset()}return t.prototype.begin=function(t,e,n){this.reset(),this.style=t,this.start=e,this.attribStart=n},t.prototype.end=function(t,e){this.attribSize=e-this.attribStart,this.size=t-this.start},t.prototype.reset=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0},t}(),zi=((Ni={})[Ut.POLY]=Pi,Ni[Ut.CIRC]=Oi,Ni[Ut.ELIP]=Oi,Ni[Ut.RECT]=Ci,Ni[Ut.RREC]=ki,Ni),Hi=[],Xi=[],Wi={buildPoly:Pi,buildCircle:Oi,buildRectangle:Ci,buildRoundedRectangle:ki,FILL_COMMANDS:zi,BATCH_POOL:Hi,DRAW_CALL_POOL:Xi,buildLine:Di,Star:Li,ArcUtils:Fi,BezierUtils:Ui,QuadraticUtils:ji,BatchPart:Bi},Gi=function(){function t(t,e,n,r){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),this.shape=t,this.lineStyle=n,this.fillStyle=e,this.matrix=r,this.type=t.type,this.points=[],this.holes=[]}return t.prototype.clone=function(){return new t(this.shape,this.fillStyle,this.lineStyle,this.matrix)},t.prototype.destroy=function(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null},t}(),Vi=new Yt,Yi=new oe,qi=function(t){function e(){var e=t.call(this)||this;return e.uvsFloat32=null,e.indicesUint16=null,e.points=[],e.colors=[],e.uvs=[],e.indices=[],e.textureIds=[],e.graphicsData=[],e.dirty=0,e.batchDirty=-1,e.cacheDirty=-1,e.clearDirty=0,e.drawCalls=[],e.batches=[],e.shapeIndex=0,e._bounds=new oe,e.boundsDirty=-1,e.boundsPadding=0,e.batchable=!1,e.indicesUint16=null,e.uvsFloat32=null,e.closePointEps=1e-4,e}return Si(e,t),Object.defineProperty(e.prototype,"bounds",{get:function(){return this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},enumerable:!1,configurable:!0}),e.prototype.invalidate=function(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(var t=0;t0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},e.prototype.drawShape=function(t,e,n,r){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null);var i=new Gi(t,e,n,r);return this.graphicsData.push(i),this.dirty++,this},e.prototype.drawHole=function(t,e){if(void 0===e&&(e=null),!this.graphicsData.length)return null;var n=new Gi(t,null,null,e),r=this.graphicsData[this.graphicsData.length-1];return n.lineStyle=r.lineStyle,r.holes.push(n),this.dirty++,this},e.prototype.destroy=function(){t.prototype.destroy.call(this);for(var e=0;e0&&(i=(r=this.batches[this.batches.length-1]).style);for(var o=this.shapeIndex;o65535&&t;this.indicesUint16=y?new Uint32Array(this.indices):new Uint16Array(this.indices)}this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}else this.batchable=!0}}else this.batchable=!0},e.prototype._compareStyles=function(t,e){return!(!t||!e)&&(t.texture.baseTexture===e.texture.baseTexture&&(t.color+t.alpha===e.color+e.alpha&&!!t.native===!!e.native))},e.prototype.validateBatching=function(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(var t=0,e=this.graphicsData.length;t131070)return!1;for(var t=this.batches,n=0;n0&&((i=Xi.pop())||((i=new Ir).texArray=new Ar),this.drawCalls.push(i)),i.start=c,i.size=0,i.texArray.count=0,i.type=l),p.touched=1,p._batchEnabled=t,p._batchLocation=o,p.wrapMode=10497,i.texArray.elements[i.texArray.count++]=p,o++)),i.size+=h.size,c+=h.size,s=p._batchLocation,this.addColors(n,f.color,f.alpha,h.attribSize),this.addTextureIds(r,s,h.attribSize)}De._globalBatch=t,this.packAttributes()},e.prototype.packAttributes=function(){for(var t=this.points,e=this.uvs,n=this.colors,r=this.textureIds,i=new ArrayBuffer(3*t.length*4),o=new Float32Array(i),a=new Uint32Array(i),s=0,u=0;u>16)+(65280&e)+((255&e)<<16),n);r-- >0;)t.push(i)},e.prototype.addTextureIds=function(t,e,n){for(;n-- >0;)t.push(e)},e.prototype.addUvs=function(t,e,n,r,i,o){void 0===o&&(o=null);for(var a=0,s=e.length,u=n.frame;a0&&t.alpha>0;return l?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._lineStyle,{visible:l},t)):this._lineStyle.reset(),this},e.prototype.startPoly=function(){if(this.currentPath){var t=this.currentPath.points,e=this.currentPath.points.length;e>2&&(this.drawShape(this.currentPath),this.currentPath=new Gt,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[e-2],t[e-1]))}else this.currentPath=new Gt,this.currentPath.closeStroke=!1},e.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},e.prototype.moveTo=function(t,e){return this.startPoly(),this.currentPath.points[0]=t,this.currentPath.points[1]=e,this},e.prototype.lineTo=function(t,e){this.currentPath||this.moveTo(0,0);var n=this.currentPath.points,r=n[n.length-2],i=n[n.length-1];return r===t&&i===e||n.push(t,e),this},e.prototype._initCurve=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.currentPath?0===this.currentPath.points.length&&(this.currentPath.points=[t,e]):this.moveTo(t,e)},e.prototype.quadraticCurveTo=function(t,e,n,r){this._initCurve();var i=this.currentPath.points;return 0===i.length&&this.moveTo(0,0),ji.curveTo(t,e,n,r,i),this},e.prototype.bezierCurveTo=function(t,e,n,r,i,o){return this._initCurve(),Ui.curveTo(t,e,n,r,i,o,this.currentPath.points),this},e.prototype.arcTo=function(t,e,n,r,i){this._initCurve(t,e);var o=this.currentPath.points,a=Fi.curveTo(t,e,n,r,i,o);if(a){var s=a.cx,u=a.cy,l=a.radius,c=a.startAngle,h=a.endAngle,f=a.anticlockwise;this.arc(s,u,l,c,h,f)}return this},e.prototype.arc=function(t,e,n,r,i,o){if(void 0===o&&(o=!1),r===i)return this;if(!o&&i<=r?i+=jt:o&&r<=i&&(r+=jt),0===i-r)return this;var a=t+Math.cos(r)*n,s=e+Math.sin(r)*n,u=this._geometry.closePointEps,l=this.currentPath?this.currentPath.points:null;if(l){var c=Math.abs(l[l.length-2]-a),h=Math.abs(l[l.length-1]-s);c0;return a?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._fillStyle,{visible:a},t)):this._fillStyle.reset(),this},e.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},e.prototype.drawRect=function(t,e,n,r){return this.drawShape(new Ht(t,e,n,r))},e.prototype.drawRoundedRect=function(t,e,n,r,i){return this.drawShape(new Vt(t,e,n,r,i))},e.prototype.drawCircle=function(t,e,n){return this.drawShape(new Xt(t,e,n))},e.prototype.drawEllipse=function(t,e,n,r){return this.drawShape(new Wt(t,e,n,r))},e.prototype.drawPolygon=function(){for(var t,e=arguments,n=[],r=0;r>16&255)/255*i,o.tint[1]=(r>>8&255)/255*i,o.tint[2]=(255&r)/255*i,o.tint[3]=i,t.shader.bind(e),t.geometry.bind(n,e),t.state.set(this.state);for(var s=0,u=a.length;s>16)+(65280&i)+((255&i)<<16)}}},e.prototype.calculateVertices=function(){var t=this.transform._worldID;if(this._transformID!==t){this._transformID=t;for(var e=this.transform.worldTransform,n=e.a,r=e.b,i=e.c,o=e.d,a=e.tx,s=e.ty,u=this._geometry.points,l=this.vertexData,c=0,h=0;h=r&&eo.x=i&&eo.y>16)+(65280&t)+((255&t)<<16)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=t||$e.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.valid?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))},enumerable:!1,configurable:!0}),e}(he),io=function(t,e){return(io=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};!function(t){t[t.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",t[t.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL"}(to||(to={}));var oo={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:to.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},ao=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],so=function(){function t(t){this.styleID=0,this.reset(),co(this,t,t)}return t.prototype.clone=function(){var e={};return co(e,this,oo),new t(e)},t.prototype.reset=function(){co(this,oo,oo)},Object.defineProperty(t.prototype,"align",{get:function(){return this._align},set:function(t){this._align!==t&&(this._align=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"breakWords",{get:function(){return this._breakWords},set:function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadow",{get:function(){return this._dropShadow},set:function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAlpha",{get:function(){return this._dropShadowAlpha},set:function(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAngle",{get:function(){return this._dropShadowAngle},set:function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowBlur",{get:function(){return this._dropShadowBlur},set:function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowColor",{get:function(){return this._dropShadowColor},set:function(t){var e=lo(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowDistance",{get:function(){return this._dropShadowDistance},set:function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fill",{get:function(){return this._fill},set:function(t){var e=lo(t);this._fill!==e&&(this._fill=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientType",{get:function(){return this._fillGradientType},set:function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientStops",{get:function(){return this._fillGradientStops},set:function(t){(function(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(var n=0;n=0;n--){var r=e[n].trim();!/([\"\'])[^\'\"]+\1/.test(r)&&ao.indexOf(r)<0&&(r='"'+r+'"'),e[n]=r}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+e.join(",")},t}();function uo(t){return"number"===typeof t?ot(t):("string"===typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function lo(t){if(Array.isArray(t)){for(var e=0;ed)if(""!==a&&(s+=t.addLine(a),a="",o=0),t.canBreakWords(y,n.breakWords))for(var x=t.wordWrapSplit(y),w=0;wd&&(s+=t.addLine(a),p=!1,a="",o=0),a+=T,o+=O}else{a.length>0&&(s+=t.addLine(a),a="",o=0);var C=v===m.length-1;s+=t.addLine(y,!C),p=!1,a="",o=0}else b+o>d&&(p=!1,s+=t.addLine(a),a="",o=0),(a.length>0||!t.isBreakingSpace(y)||p)&&(a+=y,o+=b)}return s+=t.addLine(a,!1)},t.addLine=function(e,n){return void 0===n&&(n=!0),e=t.trimRight(e),e=n?e+"\n":e},t.getFromCache=function(t,e,n,r){var i=n[t];if(void 0===i){var o=t.length*e;i=r.measureText(t).width+o,n[t]=i}return i},t.collapseSpaces=function(t){return"normal"===t||"pre-line"===t},t.collapseNewlines=function(t){return"normal"===t},t.trimRight=function(e){if("string"!==typeof e)return"";for(var n=e.length-1;n>=0;n--){var r=e[n];if(!t.isBreakingSpace(r))break;e=e.slice(0,-1)}return e},t.isNewline=function(e){return"string"===typeof e&&t._newlines.indexOf(e.charCodeAt(0))>=0},t.isBreakingSpace=function(e){return"string"===typeof e&&t._breakingSpaces.indexOf(e.charCodeAt(0))>=0},t.tokenize=function(e){var n=[],r="";if("string"!==typeof e)return n;for(var i=0;is;--f){for(m=0;m0},t}();function go(t,e){var n=!1;if(t&&t._textures&&t._textures.length)for(var r=0;r=0;e--)this.add(t.children[e]);return this},t.prototype.destroy=function(){this.ticking&&ve.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},t}();function Po(t,e){return e instanceof De&&(e._glTextures[t.CONTEXT_UID]||t.texture.bind(e),!0)}function Oo(t,e){if(!(e instanceof Zi))return!1;var n=e.geometry;e.finishPoly(),n.updateBatches();for(var r=n.batches,i=0;i=r&&No.x=i&&No.y>16)+(65280&t)+((255&t)<<16),this._colorDirty=!0)},enumerable:!1,configurable:!0}),e.prototype.update=function(){if(this._colorDirty){this._colorDirty=!1;var t=this.texture.baseTexture;ft(this._tint,this._alpha,this.uniforms.uColor,t.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},e}(Zn),Yo=function(t){function e(e,n,r){var i=t.call(this)||this,o=new rn(e),a=new rn(n,!0),s=new rn(r,!0,!0);return i.addAttribute("aVertexPosition",o,2,!1,L.FLOAT).addAttribute("aTextureCoord",a,2,!1,L.FLOAT).addIndex(s),i._updateId=-1,i}return zo(e,t),Object.defineProperty(e.prototype,"vertexDirtyId",{get:function(){return this.buffers[0]._updateID},enumerable:!1,configurable:!0}),e}(cn),qo=function(t,e){return(qo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var Ko=function(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[]},Qo=[function(){function t(){}return t.test=function(t){return"string"===typeof t&&0===t.indexOf("info face=")},t.parse=function(t){var e=t.match(/^[a-z]+\s+.+$/gm),n={info:[],common:[],page:[],char:[],chars:[],kerning:[]};for(var r in e){var i=e[r].match(/^[a-z]+/gm)[0],o=e[r].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),a={};for(var s in o){var u=o[s].split("="),l=u[0],c=u[1].replace(/"/gm,""),h=parseFloat(c),f=isNaN(h)?c:h;a[l]=f}n[i].push(a)}var p=new Ko;return n.info.forEach((function(t){return p.info.push({face:t.face,size:parseInt(t.size,10)})})),n.common.forEach((function(t){return p.common.push({lineHeight:parseInt(t.lineHeight,10)})})),n.page.forEach((function(t){return p.page.push({id:parseInt(t.id,10),file:t.file})})),n.char.forEach((function(t){return p.char.push({id:parseInt(t.id,10),page:parseInt(t.page,10),x:parseInt(t.x,10),y:parseInt(t.y,10),width:parseInt(t.width,10),height:parseInt(t.height,10),xoffset:parseInt(t.xoffset,10),yoffset:parseInt(t.yoffset,10),xadvance:parseInt(t.xadvance,10)})})),n.kerning.forEach((function(t){return p.kerning.push({first:parseInt(t.first,10),second:parseInt(t.second,10),amount:parseInt(t.amount,10)})})),p},t}(),function(){function t(){}return t.test=function(t){return t instanceof XMLDocument&&t.getElementsByTagName("page").length&&null!==t.getElementsByTagName("info")[0].getAttribute("face")},t.parse=function(t){for(var e=new Ko,n=t.getElementsByTagName("info"),r=t.getElementsByTagName("common"),i=t.getElementsByTagName("page"),o=t.getElementsByTagName("char"),a=t.getElementsByTagName("kerning"),s=0;s=l-E*s){if(0===g)throw new Error("[BitmapFont] textureHeight "+l+"px is too small for "+h.fontSize+"px fonts");--x,d=null,m=null,v=null,g=0,y=0,_=0}else if(_=Math.max(E+w.fontProperties.descent,_),S*s+y>=f)--x,g+=_*s,g=Math.ceil(g),y=0,_=0;else{Jo(d,m,w,y,g,s,h);var P=w.text.charCodeAt(0);p.char.push({id:P,page:b.length-1,x:y/s,y:g/s,width:S,height:E,xoffset:0,yoffset:0,xadvance:Math.ceil(T-(h.dropShadow?h.dropShadowDistance:0)-(h.stroke?h.strokeThickness:0))}),y+=(S+2*a)*s,y=Math.ceil(y)}}var O=new t(p,b);return void 0!==t.available[e]&&t.uninstall(e),t.available[e]=O,O},t.ALPHA=[["a","z"],["A","Z"]," "],t.NUMERIC=[["0","9"]],t.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],t.ASCII=[[" ","~"]],t.defaultOptions={resolution:1,textureWidth:512,textureHeight:512,padding:4,chars:t.ALPHANUMERIC},t.available={},t}(),ea=[],na=[],ra=function(t){function e(n,r){void 0===r&&(r={});var i=t.call(this)||this;i._tint=16777215,r.font&&(St("5.3.0","PIXI.BitmapText constructor style.font property is deprecated."),i._upgradeStyle(r));var o=Object.assign({},e.styleDefaults,r),a=o.align,s=o.tint,u=o.maxWidth,l=o.letterSpacing,c=o.fontName,h=o.fontSize;if(!ta.available[c])throw new Error('Missing BitmapFont "'+c+'"');return i._activePagesMeshData=[],i._textWidth=0,i._textHeight=0,i._align=a,i._tint=s,i._fontName=c,i._fontSize=h||ta.available[c].size,i._text=n,i._maxWidth=u,i._maxLineHeight=0,i._letterSpacing=l,i._anchor=new qt((function(){i.dirty=!0}),i,0,0),i.roundPixels=V.ROUND_PIXELS,i.dirty=!0,i}return function(t,e){function n(){this.constructor=t}qo(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.updateText=function(){for(var t,e=ta.available[this._fontName],n=this._fontSize/e.size,r=new Yt,i=[],o=[],a=this._text.replace(/(?:\r\n|\r)/g,"\n")||" ",s=a.length,u=this._maxWidth*e.size/this._fontSize,l=null,c=0,h=0,f=0,p=-1,d=0,m=0,v=0,y=0;y0&&r.x>u&&(bt(i,1+p-++m,1+y-p),y=p,p=-1,o.push(d),h=Math.max(h,d),f++,r.x=0,r.y+=e.lineHeight,l=null)}}else o.push(c),h=Math.max(h,c),++f,++m,r.x=0,r.y+=e.lineHeight,l=null}var w=a.charAt(a.length-1);"\r"!==w&&"\n"!==w&&(/(?:\s)/.test(w)&&(c=d),o.push(c),h=Math.max(h,c));var T=[];for(y=0;y<=f;y++){var E=0;"right"===this._align?E=h-o[y]:"center"===this._align&&(E=(h-o[y])/2),T.push(E)}var S=i.length,P={},O=[],C=this._activePagesMeshData;for(y=0;y6*M&&!(B.vertices.length<2*Go.BATCHABLE_SIZE)||(B.vertices=new Float32Array(8*M),B.uvs=new Float32Array(8*M),B.indices=new Uint16Array(6*M)),B.mesh.size=6*M}for(y=0;y=2&&(t.fontSize=parseInt(e[0],10))}else t.fontName=t.font.name,t.fontSize="number"===typeof t.font.size?t.font.size:parseInt(t.font.size,10)},e.registerFont=function(t,e){return St("5.3.0","PIXI.BitmapText.registerFont is deprecated, use PIXI.BitmapFont.install"),ta.install(t,e)},Object.defineProperty(e,"fonts",{get:function(){return St("5.3.0","PIXI.BitmapText.fonts is deprecated, use PIXI.BitmapFont.available"),ta.available},enumerable:!1,configurable:!0}),e.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0},e}(he),ia=function(){function t(){}return t.add=function(){ci.setExtensionXhrType("fnt",ci.XHR_RESPONSE_TYPE.DOCUMENT)},t.use=function(e,n){var r=$o(e.data);if(r)for(var i=t.getBaseUrl(this,e),o=r.parse(e.data),a={},s=function(t){a[t.metadata.pageFile]=t.texture,Object.keys(a).length===o.page.length&&(e.bitmapFont=ta.install(o,a),n())},u=0;u=r&&(e=t-a-1),o+=s=s.replace("%value%",n[e].toString()),o+="\n"}return(i=i.replace("%blur%",o)).replace("%size%",t.toString())}(o);return(a=t.call(this,s,u)||this).horizontal=e,a.resolution=i,a._quality=0,a.quality=r,a.blur=n,a}return ua(e,t),e.prototype.apply=function(t,e,n,r){if(n?this.horizontal?this.uniforms.strength=1/n.width*(n.width/e.width):this.uniforms.strength=1/n.height*(n.height/e.height):this.horizontal?this.uniforms.strength=1/t.renderer.width*(t.renderer.width/e.width):this.uniforms.strength=1/t.renderer.height*(t.renderer.height/e.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,n,r);else{var i=t.getFilterTexture(),o=t.renderer,a=e,s=i;this.state.blend=!1,t.applyFilter(this,a,s,xa.CLEAR);for(var u=1;u 0.0) {\n c.rgb /= c.a;\n }\n\n vec4 result;\n\n result.r = (m[0] * c.r);\n result.r += (m[1] * c.g);\n result.r += (m[2] * c.b);\n result.r += (m[3] * c.a);\n result.r += m[4];\n\n result.g = (m[5] * c.r);\n result.g += (m[6] * c.g);\n result.g += (m[7] * c.b);\n result.g += (m[8] * c.a);\n result.g += m[9];\n\n result.b = (m[10] * c.r);\n result.b += (m[11] * c.g);\n result.b += (m[12] * c.b);\n result.b += (m[13] * c.a);\n result.b += m[14];\n\n result.a = (m[15] * c.r);\n result.a += (m[16] * c.g);\n result.a += (m[17] * c.b);\n result.a += (m[18] * c.a);\n result.a += m[19];\n\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n // Premultiply alpha again.\n rgb *= result.a;\n\n gl_FragColor = vec4(rgb, result.a);\n}\n",n)||this).alpha=1,e}return function(t,e){function n(){this.constructor=t}Aa(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype._loadMatrix=function(t,e){void 0===e&&(e=!1);var n=t;e&&(this._multiply(n,this.uniforms.m,t),n=this._colorMatrix(n)),this.uniforms.m=n},e.prototype._multiply=function(t,e,n){return t[0]=e[0]*n[0]+e[1]*n[5]+e[2]*n[10]+e[3]*n[15],t[1]=e[0]*n[1]+e[1]*n[6]+e[2]*n[11]+e[3]*n[16],t[2]=e[0]*n[2]+e[1]*n[7]+e[2]*n[12]+e[3]*n[17],t[3]=e[0]*n[3]+e[1]*n[8]+e[2]*n[13]+e[3]*n[18],t[4]=e[0]*n[4]+e[1]*n[9]+e[2]*n[14]+e[3]*n[19]+e[4],t[5]=e[5]*n[0]+e[6]*n[5]+e[7]*n[10]+e[8]*n[15],t[6]=e[5]*n[1]+e[6]*n[6]+e[7]*n[11]+e[8]*n[16],t[7]=e[5]*n[2]+e[6]*n[7]+e[7]*n[12]+e[8]*n[17],t[8]=e[5]*n[3]+e[6]*n[8]+e[7]*n[13]+e[8]*n[18],t[9]=e[5]*n[4]+e[6]*n[9]+e[7]*n[14]+e[8]*n[19]+e[9],t[10]=e[10]*n[0]+e[11]*n[5]+e[12]*n[10]+e[13]*n[15],t[11]=e[10]*n[1]+e[11]*n[6]+e[12]*n[11]+e[13]*n[16],t[12]=e[10]*n[2]+e[11]*n[7]+e[12]*n[12]+e[13]*n[17],t[13]=e[10]*n[3]+e[11]*n[8]+e[12]*n[13]+e[13]*n[18],t[14]=e[10]*n[4]+e[11]*n[9]+e[12]*n[14]+e[13]*n[19]+e[14],t[15]=e[15]*n[0]+e[16]*n[5]+e[17]*n[10]+e[18]*n[15],t[16]=e[15]*n[1]+e[16]*n[6]+e[17]*n[11]+e[18]*n[16],t[17]=e[15]*n[2]+e[16]*n[7]+e[17]*n[12]+e[18]*n[17],t[18]=e[15]*n[3]+e[16]*n[8]+e[17]*n[13]+e[18]*n[18],t[19]=e[15]*n[4]+e[16]*n[9]+e[17]*n[14]+e[18]*n[19]+e[19],t},e.prototype._colorMatrix=function(t){var e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e},e.prototype.brightness=function(t,e){var n=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.greyscale=function(t,e){var n=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.blackAndWhite=function(t){this._loadMatrix([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t)},e.prototype.hue=function(t,e){t=(t||0)/180*Math.PI;var n=Math.cos(t),r=Math.sin(t),i=1/3,o=(0,Math.sqrt)(i),a=[n+(1-n)*i,i*(1-n)-o*r,i*(1-n)+o*r,0,0,i*(1-n)+o*r,n+i*(1-n),i*(1-n)-o*r,0,0,i*(1-n)-o*r,i*(1-n)+o*r,n+i*(1-n),0,0,0,0,0,1,0];this._loadMatrix(a,e)},e.prototype.contrast=function(t,e){var n=(t||0)+1,r=-.5*(n-1),i=[n,0,0,0,r,0,n,0,0,r,0,0,n,0,r,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.saturate=function(t,e){void 0===t&&(t=0);var n=2*t/3+1,r=-.5*(n-1),i=[n,r,r,0,0,r,n,r,0,0,r,r,n,0,0,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.desaturate=function(){this.saturate(-1)},e.prototype.negative=function(t){this._loadMatrix([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],t)},e.prototype.sepia=function(t){this._loadMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t)},e.prototype.technicolor=function(t){this._loadMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],t)},e.prototype.polaroid=function(t){this._loadMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t)},e.prototype.toBGR=function(t){this._loadMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t)},e.prototype.kodachrome=function(t){this._loadMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],t)},e.prototype.browni=function(t){this._loadMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t)},e.prototype.vintage=function(t){this._loadMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t)},e.prototype.colorTone=function(t,e,n,r,i){var o=((n=n||16770432)>>16&255)/255,a=(n>>8&255)/255,s=(255&n)/255,u=((r=r||3375104)>>16&255)/255,l=(r>>8&255)/255,c=(255&r)/255,h=[.3,.59,.11,0,0,o,a,s,t=t||.2,0,u,l,c,e=e||.15,0,o-u,a-l,s-c,0,0];this._loadMatrix(h,i)},e.prototype.night=function(t,e){var n=[-2*(t=t||.1),-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.predator=function(t,e){var n=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.lsd=function(t){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},e.prototype.reset=function(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)},Object.defineProperty(e.prototype,"matrix",{get:function(){return this.uniforms.m},set:function(t){this.uniforms.m=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t},enumerable:!1,configurable:!0}),e}(tr);ka.prototype.grayscale=ka.prototype.greyscale;var Ma=function(t,e){return(Ma=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var Ra=function(t){function e(e,n){var r=this,i=new Kt;return e.renderable=!1,(r=t.call(this,"attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n\tgl_Position = filterVertexPosition();\n\tvTextureCoord = filterTextureCoord();\n\tvFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy;\n}\n","varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\nuniform mat2 rotation;\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform highp vec4 inputSize;\nuniform vec4 inputClamp;\n\nvoid main(void)\n{\n vec4 map = texture2D(mapSampler, vFilterCoord);\n\n map -= 0.5;\n map.xy = scale * inputSize.zw * (rotation * map.xy);\n\n gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));\n}\n",{mapSampler:e._texture,filterMatrix:i,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])})||this).maskSprite=e,r.maskMatrix=i,null!==n&&void 0!==n||(n=20),r.scale=new Yt(n,n),r}return function(t,e){function n(){this.constructor=t}Ma(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.apply=function(t,e,n,r){this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;var i=this.maskSprite.worldTransform,o=Math.sqrt(i.a*i.a+i.b*i.b),a=Math.sqrt(i.c*i.c+i.d*i.d);0!==o&&0!==a&&(this.uniforms.rotation[0]=i.a/o,this.uniforms.rotation[1]=i.b/o,this.uniforms.rotation[2]=i.c/a,this.uniforms.rotation[3]=i.d/a),t.applyFilter(this,e,n,r)},Object.defineProperty(e.prototype,"map",{get:function(){return this.uniforms.mapSampler},set:function(t){this.uniforms.mapSampler=t},enumerable:!1,configurable:!0}),e}(tr),Da=function(t,e){return(Da=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var Na=function(t){function e(){return t.call(this,"\nattribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\n\nuniform vec4 inputPixel;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvoid texcoords(vec2 fragCoord, vec2 inverseVP,\n out vec2 v_rgbNW, out vec2 v_rgbNE,\n out vec2 v_rgbSW, out vec2 v_rgbSE,\n out vec2 v_rgbM) {\n v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n gl_Position = filterVertexPosition();\n\n vFragCoord = aVertexPosition * outputFrame.zw;\n\n texcoords(vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}\n",'varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\nuniform sampler2D uSampler;\nuniform highp vec4 inputPixel;\n\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n\n --\n\n From:\n https://github.com/mitsuhiko/webgl-meincraft\n\n Copyright (c) 2011 by Armin Ronacher.\n\n Some rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n\n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX 8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP,\n vec2 v_rgbNW, vec2 v_rgbNE,\n vec2 v_rgbSW, vec2 v_rgbSE,\n vec2 v_rgbM) {\n vec4 color;\n vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n vec4 texColor = texture2D(tex, v_rgbM);\n vec3 rgbM = texColor.xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n mediump vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n\n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n\n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, texColor.a);\n else\n color = vec4(rgbB, texColor.a);\n return color;\n}\n\nvoid main() {\n\n vec4 color;\n\n color = fxaa(uSampler, vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n')||this}return function(t,e){function n(){this.constructor=t}Da(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e}(tr),La=function(t,e){return(La=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var Fa=function(t){function e(e,n){void 0===e&&(e=.5),void 0===n&&(n=Math.random());var r=t.call(this,Cr,"precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float randomValue = rand(gl_FragCoord.xy * uSeed);\n float diff = (randomValue - 0.5) * uNoise;\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (color.a > 0.0) {\n color.rgb /= color.a;\n }\n\n color.r += diff;\n color.g += diff;\n color.b += diff;\n\n // Premultiply alpha again.\n color.rgb *= color.a;\n\n gl_FragColor = color;\n}\n",{uNoise:0,uSeed:0})||this;return r.noise=e,r.seed=n,r}return function(t,e){function n(){this.constructor=t}La(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),Object.defineProperty(e.prototype,"noise",{get:function(){return this.uniforms.uNoise},set:function(t){this.uniforms.uNoise=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seed",{get:function(){return this.uniforms.uSeed},set:function(t){this.uniforms.uSeed=t},enumerable:!1,configurable:!0}),e}(tr),Ua=new Kt;ue.prototype._cacheAsBitmap=!1,ue.prototype._cacheData=null;var ja=function(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null};Object.defineProperties(ue.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){var e;this._cacheAsBitmap!==t&&(this._cacheAsBitmap=t,t?(this._cacheData||(this._cacheData=new ja),(e=this._cacheData).originalRender=this.render,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this.calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((e=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.render=e.originalRender,this.renderCanvas=e.originalRenderCanvas,this.calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea))}}}),ue.prototype._renderCached=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(t))},ue.prototype._initCachedDisplayObject=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.alpha;this.alpha=1,t.batch.flush();var n=this.getLocalBounds(null,!0).clone();if(this.filters){var r=this.filters[0].padding;n.pad(r)}n.ceil(V.RESOLUTION);var i=t.renderTexture.current,o=t.renderTexture.sourceFrame.clone(),a=t.projection.transform,s=Je.create({width:n.width,height:n.height}),u="cacheAsBitmap_"+Tt();this._cacheData.textureCacheId=u,De.addToCache(s.baseTexture,u),$e.addToCache(s,u);var l=this.transform.localTransform.copyTo(Ua).invert().translate(-n.x,-n.y);this.render=this._cacheData.originalRender,t.render(this,s,!0,l,!1),t.projection.transform=a,t.renderTexture.bind(i,o),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var c=new ro(s);c.transform.worldTransform=this.transform.worldTransform,c.anchor.x=-n.x/n.width,c.anchor.y=-n.y/n.height,c.alpha=e,c._bounds=this._bounds,this._cacheData.sprite=c,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=c.containsPoint.bind(c)}},ue.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(t))},ue.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.getLocalBounds(null,!0),n=this.alpha;this.alpha=1;var r=t.context,i=t._projTransform;e.ceil(V.RESOLUTION);var o=Je.create({width:e.width,height:e.height}),a="cacheAsBitmap_"+Tt();this._cacheData.textureCacheId=a,De.addToCache(o.baseTexture,a),$e.addToCache(o,a);var s=Ua;this.transform.localTransform.copyTo(s),s.invert(),s.tx-=e.x,s.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,o,!0,s,!1),t.context=r,t._projTransform=i,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var u=new ro(o);u.transform.worldTransform=this.transform.worldTransform,u.anchor.x=-e.x/e.width,u.anchor.y=-e.y/e.height,u.alpha=n,u._bounds=this._bounds,this._cacheData.sprite=u,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=u.containsPoint.bind(u)}},ue.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID},ue.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)},ue.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,De.removeFromCache(this._cacheData.textureCacheId),$e.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},ue.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)},ue.prototype.name=null,he.prototype.getChildByName=function(t,e){for(var n=0,r=this.children.length;n0){var f=s.x-t[c].x,p=s.y-t[c].y,d=Math.sqrt(f*f+p*p);s=t[c],a+=d/u}else a=c/(l-1);i[h]=a,i[h+1]=0,i[h+2]=a,i[h+3]=1}var m=0;for(c=0;c0?this.textureScale*this._width/2:this._width/2;r/=c,i/=c,r*=h,i*=h,o[l]=u.x+r,o[l+1]=u.y+i,o[l+2]=u.x-r,o[l+3]=u.y-i,n=u}this.buffers[0].update()}},e.prototype.update=function(){this.textureScale>0?this.build():this.updateVertices()},e}(Yo),Wa=function(t){function e(e,n,r){void 0===r&&(r=0);var i=this,o=new Xa(e.height,n,r),a=new Vo(e);return r>0&&(e.baseTexture.wrapMode=U.REPEAT),(i=t.call(this,o,a)||this).autoUpdate=!0,i}return za(e,t),e.prototype._render=function(e){var n=this.geometry;(this.autoUpdate||n._width!==this.shader.texture.height)&&(n._width=this.shader.texture.height,n.update()),t.prototype._render.call(this,e)},e}(Go),Ga=function(t){function e(e,n,r){var i=this,o=new Ha(e.width,e.height,n,r),a=new Vo($e.WHITE);return(i=t.call(this,o,a)||this).texture=e,i}return za(e,t),e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID;var t=this.geometry;t.width=this.shader.texture.width,t.height=this.shader.texture.height,t.build()},Object.defineProperty(e.prototype,"texture",{get:function(){return this.shader.texture},set:function(t){this.shader.texture!==t&&(this.shader.texture=t,this._textureID=-1,t.baseTexture.valid?this.textureUpdated():t.once("update",this.textureUpdated,this))},enumerable:!1,configurable:!0}),e.prototype._render=function(e){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),t.prototype._render.call(this,e)},e}(Go),Va=function(t){function e(e,n,r,i,o){void 0===e&&(e=$e.EMPTY);var a=this,s=new Yo(n,r,i);s.getBuffer("aVertexPosition").static=!1;var u=new Vo(e);return(a=t.call(this,s,u,null,o)||this).autoUpdate=!0,a}return za(e,t),Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(t){this.geometry.getBuffer("aVertexPosition").data=t},enumerable:!1,configurable:!0}),e.prototype._render=function(e){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),t.prototype._render.call(this,e)},e}(Go),Ya=function(t){function e(e,n,r,i,o){void 0===n&&(n=10),void 0===r&&(r=10),void 0===i&&(i=10),void 0===o&&(o=10);var a=t.call(this,$e.WHITE,4,4)||this;return a._origWidth=e.orig.width,a._origHeight=e.orig.height,a._width=a._origWidth,a._height=a._origHeight,a._leftWidth=n,a._rightWidth=i,a._topHeight=r,a._bottomHeight=o,a.texture=e,a}return za(e,t),e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this._refresh()},Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(t){this.geometry.getBuffer("aVertexPosition").data=t},enumerable:!1,configurable:!0}),e.prototype.updateHorizontalVertices=function(){var t=this.vertices,e=this._getMinScale();t[9]=t[11]=t[13]=t[15]=this._topHeight*e,t[17]=t[19]=t[21]=t[23]=this._height-this._bottomHeight*e,t[25]=t[27]=t[29]=t[31]=this._height},e.prototype.updateVerticalVertices=function(){var t=this.vertices,e=this._getMinScale();t[2]=t[10]=t[18]=t[26]=this._leftWidth*e,t[4]=t[12]=t[20]=t[28]=this._width-this._rightWidth*e,t[6]=t[14]=t[22]=t[30]=this._width},e.prototype._getMinScale=function(){var t=this._leftWidth+this._rightWidth,e=this._width>t?1:this._width/t,n=this._topHeight+this._bottomHeight,r=this._height>n?1:this._height/n;return Math.min(e,r)},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leftWidth",{get:function(){return this._leftWidth},set:function(t){this._leftWidth=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rightWidth",{get:function(){return this._rightWidth},set:function(t){this._rightWidth=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topHeight",{get:function(){return this._topHeight},set:function(t){this._topHeight=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottomHeight",{get:function(){return this._bottomHeight},set:function(t){this._bottomHeight=t,this._refresh()},enumerable:!1,configurable:!0}),e.prototype._refresh=function(){var t=this.texture,e=this.geometry.buffers[1].data;this._origWidth=t.orig.width,this._origHeight=t.orig.height;var n=1/this._origWidth,r=1/this._origHeight;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1,e[2]=e[10]=e[18]=e[26]=n*this._leftWidth,e[4]=e[12]=e[20]=e[28]=1-n*this._rightWidth,e[9]=e[11]=e[13]=e[15]=r*this._topHeight,e[17]=e[19]=e[21]=e[23]=1-r*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()},e}(Ga),qa=function(t,e){return(qa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var Ka=function(t){function e(e,n){void 0===n&&(n=!0);var r=t.call(this,e[0]instanceof $e?e[0]:e[0].texture)||this;return r._textures=null,r._durations=null,r._autoUpdate=n,r._isConnectedToTicker=!1,r.animationSpeed=1,r.loop=!0,r.updateAnchor=!1,r.onComplete=null,r.onFrameChange=null,r.onLoop=null,r._currentTime=0,r._playing=!1,r._previousFrame=null,r.textures=e,r}return function(t,e){function n(){this.constructor=t}qa(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.stop=function(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(ve.shared.remove(this.update,this),this._isConnectedToTicker=!1))},e.prototype.play=function(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(ve.shared.add(this.update,this,pe.HIGH),this._isConnectedToTicker=!0))},e.prototype.gotoAndStop=function(t){this.stop();var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()},e.prototype.gotoAndPlay=function(t){var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture(),this.play()},e.prototype.update=function(t){var e=this.animationSpeed*t,n=this.currentFrame;if(null!==this._durations){var r=this._currentTime%1*this._durations[this.currentFrame];for(r+=e/60*1e3;r<0;)this._currentTime--,r+=this._durations[this.currentFrame];var i=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);r>=this._durations[this.currentFrame];)r-=this._durations[this.currentFrame]*i,this._currentTime+=i;this._currentTime+=r/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):n!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramen)&&this.onLoop(),this.updateTexture())},e.prototype.updateTexture=function(){var t=this.currentFrame;this._previousFrame!==t&&(this._previousFrame=t,this._texture=this._textures[t],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))},e.prototype.destroy=function(e){this.stop(),t.prototype.destroy.call(this,e),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},e.fromFrames=function(t){for(var n=[],r=0;r=0||(i[n]=t[n]);return i}var p=n(31),d=n.n(p),m=n(29),v="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?r.useLayoutEffect:r.useEffect,y=[],g=[null,null];function _(t,e){var n=t[1];return[e.payload,n+1]}function b(t,e,n){v((function(){return t.apply(void 0,e)}),n)}function x(t,e,n,r,i,o,a){t.current=r,e.current=i,n.current=!1,o.current&&(o.current=null,a())}function w(t,e,n,r,i,o,a,s,u,l){if(t){var c=!1,h=null,f=function(){if(!c){var t,n,f=e.getState();try{t=r(f,i.current)}catch(p){n=p,h=p}n||(h=null),t===o.current?a.current||u():(o.current=t,s.current=t,a.current=!0,l({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=f,n.trySubscribe(),f();return function(){if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,h)throw h}}}var T=function(){return[null,0]};function E(t,e){void 0===e&&(e={});var n=e,a=n.getDisplayName,s=void 0===a?function(t){return"ConnectAdvanced("+t+")"}:a,u=n.methodName,c=void 0===u?"connectAdvanced":u,p=n.renderCountProp,v=void 0===p?void 0:p,E=n.shouldHandleStateChanges,S=void 0===E||E,P=n.storeKey,O=void 0===P?"store":P,C=(n.withRef,n.forwardRef),I=void 0!==C&&C,A=n.context,k=void 0===A?o:A,M=f(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),R=k;return function(e){var n=e.displayName||e.name||"Component",o=s(n),a=h({},M,{getDisplayName:s,methodName:c,renderCountProp:v,shouldHandleStateChanges:S,storeKey:O,displayName:o,wrappedComponentName:n,WrappedComponent:e}),u=M.pure;var p=u?r.useMemo:function(t){return t()};function E(n){var o=Object(r.useMemo)((function(){var t=n.reactReduxForwardedRef,e=f(n,["reactReduxForwardedRef"]);return[n.context,t,e]}),[n]),s=o[0],u=o[1],c=o[2],d=Object(r.useMemo)((function(){return s&&s.Consumer&&Object(m.isContextConsumer)(i.a.createElement(s.Consumer,null))?s:R}),[s,R]),v=Object(r.useContext)(d),E=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(v)&&Boolean(v.store);var P=E?n.store:v.store,O=Object(r.useMemo)((function(){return function(e){return t(e.dispatch,a)}(P)}),[P]),C=Object(r.useMemo)((function(){if(!S)return g;var t=new l(P,E?null:v.subscription),e=t.notifyNestedSubs.bind(t);return[t,e]}),[P,E,v]),I=C[0],A=C[1],k=Object(r.useMemo)((function(){return E?v:h({},v,{subscription:I})}),[E,v,I]),M=Object(r.useReducer)(_,y,T),D=M[0][0],N=M[1];if(D&&D.error)throw D.error;var L=Object(r.useRef)(),F=Object(r.useRef)(c),U=Object(r.useRef)(),j=Object(r.useRef)(!1),B=p((function(){return U.current&&c===F.current?U.current:O(P.getState(),c)}),[P,D,c]);b(x,[F,L,j,c,B,U,A]),b(w,[S,P,I,O,F,L,j,U,A,N],[P,I,O]);var z=Object(r.useMemo)((function(){return i.a.createElement(e,h({},B,{ref:u}))}),[u,e,B]);return Object(r.useMemo)((function(){return S?i.a.createElement(d.Provider,{value:k},z):z}),[d,z,k])}var P=u?i.a.memo(E):E;if(P.WrappedComponent=e,P.displayName=o,I){var C=i.a.forwardRef((function(t,e){return i.a.createElement(P,h({},t,{reactReduxForwardedRef:e}))}));return C.displayName=o,C.WrappedComponent=e,d()(C,e)}return d()(P,e)}}function S(t,e){return t===e?0!==t||0!==e||1/t===1/e:t!==t&&e!==e}function P(t,e){if(S(t,e))return!0;if("object"!==typeof t||null===t||"object"!==typeof e||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var i=0;i=0;r--){var i=e[r](t);if(i)return i}return function(e,r){throw new Error("Invalid value of type "+typeof t+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function j(t,e){return t===e}function B(t){var e=void 0===t?{}:t,n=e.connectHOC,r=void 0===n?E:n,i=e.mapStateToPropsFactories,o=void 0===i?M:i,a=e.mapDispatchToPropsFactories,s=void 0===a?k:a,u=e.mergePropsFactories,l=void 0===u?D:u,c=e.selectorFactory,p=void 0===c?F:c;return function(t,e,n,i){void 0===i&&(i={});var a=i,u=a.pure,c=void 0===u||u,d=a.areStatesEqual,m=void 0===d?j:d,v=a.areOwnPropsEqual,y=void 0===v?P:v,g=a.areStatePropsEqual,_=void 0===g?P:g,b=a.areMergedPropsEqual,x=void 0===b?P:b,w=f(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),T=U(t,o,"mapStateToProps"),E=U(e,s,"mapDispatchToProps"),S=U(n,l,"mergeProps");return r(p,h({methodName:"connect",getDisplayName:function(t){return"Connect("+t+")"},shouldHandleStateChanges:Boolean(t),initMapStateToProps:T,initMapDispatchToProps:E,initMergeProps:S,pure:c,areStatesEqual:m,areOwnPropsEqual:y,areStatePropsEqual:_,areMergedPropsEqual:x},w))}}var z=B();var H,X=n(13);H=X.unstable_batchedUpdates,a=H},function(t,e,n){"use strict";n.r(e),n.d(e,"version",(function(){return yr})),n.d(e,"Collection",(function(){return T})),n.d(e,"Iterable",(function(){return _r})),n.d(e,"Seq",(function(){return V})),n.d(e,"Map",(function(){return Ae})),n.d(e,"OrderedMap",(function(){return mn})),n.d(e,"List",(function(){return tn})),n.d(e,"Stack",(function(){return xn})),n.d(e,"Set",(function(){return Mn})),n.d(e,"OrderedSet",(function(){return er})),n.d(e,"Record",(function(){return ar})),n.d(e,"Range",(function(){return jn})),n.d(e,"Repeat",(function(){return pr})),n.d(e,"is",(function(){return ut})),n.d(e,"fromJS",(function(){return dr})),n.d(e,"hash",(function(){return ft})),n.d(e,"isImmutable",(function(){return k})),n.d(e,"isCollection",(function(){return y})),n.d(e,"isKeyed",(function(){return _})),n.d(e,"isIndexed",(function(){return x})),n.d(e,"isAssociative",(function(){return w})),n.d(e,"isOrdered",(function(){return R})),n.d(e,"isValueObject",(function(){return st})),n.d(e,"get",(function(){return te})),n.d(e,"getIn",(function(){return Bn})),n.d(e,"has",(function(){return Jt})),n.d(e,"hasIn",(function(){return Hn})),n.d(e,"merge",(function(){return ve})),n.d(e,"mergeDeep",(function(){return ge})),n.d(e,"mergeWith",(function(){return ye})),n.d(e,"mergeDeepWith",(function(){return _e})),n.d(e,"remove",(function(){return ne})),n.d(e,"removeIn",(function(){return ue})),n.d(e,"set",(function(){return re})),n.d(e,"setIn",(function(){return ae})),n.d(e,"update",(function(){return ce})),n.d(e,"updateIn",(function(){return ie}));var r=32,i=31,o={};function a(t){t&&(t.value=!0)}function s(){}function u(t){return void 0===t.size&&(t.size=t.__iterate(c)),t.size}function l(t,e){if("number"!==typeof e){var n=e>>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?u(t)+e:e}function c(){return!0}function h(t,e,n){return(0===t&&!m(t)||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function f(t,e){return d(t,e,0)}function p(t,e){return d(t,e,e)}function d(t,e,n){return void 0===t?n:m(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function m(t){return t<0||0===t&&1/t===-1/0}var v="@@__IMMUTABLE_ITERABLE__@@";function y(t){return Boolean(t&&t[v])}var g="@@__IMMUTABLE_KEYED__@@";function _(t){return Boolean(t&&t[g])}var b="@@__IMMUTABLE_INDEXED__@@";function x(t){return Boolean(t&&t[b])}function w(t){return _(t)||x(t)}var T=function(t){return y(t)?t:V(t)},E=function(t){function e(t){return _(t)?t:Y(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(T),S=function(t){function e(t){return x(t)?t:q(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(T),P=function(t){function e(t){return y(t)&&!w(t)?t:K(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(T);T.Keyed=E,T.Indexed=S,T.Set=P;var O="@@__IMMUTABLE_SEQ__@@";function C(t){return Boolean(t&&t[O])}var I="@@__IMMUTABLE_RECORD__@@";function A(t){return Boolean(t&&t[I])}function k(t){return y(t)||A(t)}var M="@@__IMMUTABLE_ORDERED__@@";function R(t){return Boolean(t&&t[M])}var D="function"===typeof Symbol&&Symbol.iterator,N="@@iterator",L=D||N,F=function(t){this.next=t};function U(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function j(){return{value:void 0,done:!0}}function B(t){return!!X(t)}function z(t){return t&&"function"===typeof t.next}function H(t){var e=X(t);return e&&e.call(t)}function X(t){var e=t&&(D&&t[D]||t["@@iterator"]);if("function"===typeof e)return e}F.prototype.toString=function(){return"[Iterator]"},F.KEYS=0,F.VALUES=1,F.ENTRIES=2,F.prototype.inspect=F.prototype.toSource=function(){return this.toString()},F.prototype[L]=function(){return this};var W=Object.prototype.hasOwnProperty;function G(t){return!(!Array.isArray(t)&&"string"!==typeof t)||t&&"object"===typeof t&&Number.isInteger(t.length)&&t.length>=0&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}var V=function(t){function e(t){return null===t||void 0===t?tt():k(t)?t.toSeq():function(t){var e=rt(t);if(e)return e;if("object"===typeof t)return new $(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(t,e){var n=this._cache;if(n){for(var r=n.length,i=0;i!==r;){var o=n[e?r-++i:i++];if(!1===t(o[1],o[0],this))break}return i}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(t,e){var n=this._cache;if(n){var r=n.length,i=0;return new F((function(){if(i===r)return{value:void 0,done:!0};var o=n[e?r-++i:i++];return U(t,o[0],o[1])}))}return this.__iteratorUncached(t,e)},e}(T),Y=function(t){function e(t){return null===t||void 0===t?tt().toKeyedSeq():y(t)?_(t)?t.toSeq():t.fromEntrySeq():A(t)?t.toSeq():et(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(V),q=function(t){function e(t){return null===t||void 0===t?tt():y(t)?_(t)?t.entrySeq():t.toIndexedSeq():A(t)?t.toSeq().entrySeq():nt(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(V),K=function(t){function e(t){return(y(t)&&!w(t)?t:q(t)).toSetSeq()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(V);V.isSeq=C,V.Keyed=Y,V.Set=K,V.Indexed=q,V.prototype[O]=!0;var Q=function(t){function e(t){this._array=t,this.size=t.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this.has(t)?this._array[l(this,t)]:e},e.prototype.__iterate=function(t,e){for(var n=this._array,r=n.length,i=0;i!==r;){var o=e?r-++i:i++;if(!1===t(n[o],o,this))break}return i},e.prototype.__iterator=function(t,e){var n=this._array,r=n.length,i=0;return new F((function(){if(i===r)return{value:void 0,done:!0};var o=e?r-++i:i++;return U(t,o,n[o])}))},e}(q),$=function(t){function e(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},e.prototype.has=function(t){return W.call(this._object,t)},e.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length,o=0;o!==i;){var a=r[e?i-++o:o++];if(!1===t(n[a],a,this))break}return o},e.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length,o=0;return new F((function(){if(o===i)return{value:void 0,done:!0};var a=r[e?i-++o:o++];return U(t,a,n[a])}))},e}(Y);$.prototype[M]=!0;var Z,J=function(t){function e(t){this._collection=t,this.size=t.length||t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=H(this._collection),r=0;if(z(n))for(var i;!(i=n.next()).done&&!1!==t(i.value,r++,this););return r},e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=H(this._collection);if(!z(n))return new F(j);var r=0;return new F((function(){var e=n.next();return e.done?e:U(t,r++,e.value)}))},e}(q);function tt(){return Z||(Z=new Q([]))}function et(t){var e=Array.isArray(t)?new Q(t):B(t)?new J(t):void 0;if(e)return e.fromEntrySeq();if("object"===typeof t)return new $(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function nt(t){var e=rt(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function rt(t){return G(t)?new Q(t):B(t)?new J(t):void 0}var it="@@__IMMUTABLE_MAP__@@";function ot(t){return Boolean(t&&t[it])}function at(t){return ot(t)&&R(t)}function st(t){return Boolean(t&&"function"===typeof t.equals&&"function"===typeof t.hashCode)}function ut(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"===typeof t.valueOf&&"function"===typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!!(st(t)&&st(e)&&t.equals(e))}var lt="function"===typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var n=65535&(t|=0),r=65535&(e|=0);return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0};function ct(t){return t>>>1&1073741824|3221225471&t}var ht=Object.prototype.valueOf;function ft(t){switch(typeof t){case"boolean":return t?1108378657:1108378656;case"number":return function(t){if(t!==t||t===1/0)return 0;var e=0|t;e!==t&&(e^=4294967295*t);for(;t>4294967295;)e^=t/=4294967295;return ct(e)}(t);case"string":return t.length>bt?function(t){var e=Tt[t];void 0===e&&(e=pt(t),wt===xt&&(wt=0,Tt={}),wt++,Tt[t]=e);return e}(t):pt(t);case"object":case"function":return null===t?1108378658:"function"===typeof t.hashCode?ct(t.hashCode(t)):(t.valueOf!==ht&&"function"===typeof t.valueOf&&(t=t.valueOf(t)),function(t){var e;if(yt&&void 0!==(e=vt.get(t)))return e;if(void 0!==(e=t[_t]))return e;if(!mt){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[_t]))return e;if(void 0!==(e=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}e=++gt,1073741824>&&(gt=0);if(yt)vt.set(t,e);else{if(void 0!==dt&&!1===dt(t))throw new Error("Non-extensible objects are not allowed as keys.");if(mt)Object.defineProperty(t,_t,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[_t]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[_t]=e}}return e}(t));case"undefined":return 1108378659;default:if("function"===typeof t.toString)return pt(t.toString());throw new Error("Value type "+typeof t+" cannot be hashed.")}}function pt(t){for(var e=0,n=0;n=0&&(c.get=function(e,n){return(e=l(this,e))>=0&&es)return{value:void 0,done:!0};var t=i.next();return r||1===e||t.done?t:U(e,u-1,0===e?void 0:t.value[1],t)}))},c}function Rt(t,e,n,r){var i=Xt(t);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return t.__iterate((function(t,o,l){if(!s||!(s=e.call(n,t,o,l)))return u++,i(t,r?o:u-1,a)})),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(2,o),u=!0,l=0;return new F((function(){var t,o,c;do{if((t=s.next()).done)return r||1===i?t:U(i,l++,0===i?void 0:t.value[1],t);var h=t.value;o=h[0],c=h[1],u&&(u=e.call(n,c,o,a))}while(u);return 2===i?t:U(i,o,c,t)}))},i}function Dt(t,e){var n=_(t),r=[t].concat(e).map((function(t){return y(t)?n&&(t=E(t)):t=n?et(t):nt(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===r.length)return t;if(1===r.length){var i=r[0];if(i===t||n&&_(i)||x(t)&&x(i))return i}var o=new Q(r);return n?o=o.toKeyedSeq():x(t)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=r.reduce((function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}}),0),o}function Nt(t,e,n){var r=Xt(t);return r.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var a=0,s=!1;return function t(u,l){u.__iterate((function(o,u){return(!e||l0}function jt(t,e,n,r){var i=Xt(t),o=new Q(n).map((function(t){return t.size}));return i.size=r?o.max():o.min(),i.__iterate=function(t,e){for(var n,r=this.__iterator(1,e),i=0;!(n=r.next()).done&&!1!==t(n.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=n.map((function(t){return t=T(t),H(i?t.reverse():t)})),a=0,s=!1;return new F((function(){var n;return s||(n=o.map((function(t){return t.next()})),s=r?n.every((function(t){return t.done})):n.some((function(t){return t.done}))),s?{value:void 0,done:!0}:U(t,a++,e.apply(null,n.map((function(t){return t.value}))))}))},i}function Bt(t,e){return t===e?t:C(t)?e:t.constructor(e)}function zt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Ht(t){return _(t)?E:x(t)?S:P}function Xt(t){return Object.create((_(t)?Y:x(t)?q:K).prototype)}function Wt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):V.prototype.cacheResult.call(this)}function Gt(t,e){return void 0===t&&void 0===e?0:void 0===t?1:void 0===e?-1:t>e?1:t0;)e[n]=arguments[n+1];if("function"!==typeof t)throw new TypeError("Invalid merger function: "+t);return me(this,e,t)}function me(t,e,n){for(var r=[],i=0;i0;)e[n]=arguments[n+1];return xe(t,e)}function ye(t,e){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return xe(e,n,t)}function ge(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return be(t,e)}function _e(t,e){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return be(e,n,t)}function be(t,e,n){return xe(t,e,function(t){function e(n,r,i){return $t(n)&&$t(r)?xe(n,[r],e):t?t(n,r,i):r}return e}(n))}function xe(t,e,n){if(!$t(t))throw new TypeError("Cannot merge into non-data-structure value: "+t);if(k(t))return"function"===typeof n&&t.mergeWith?t.mergeWith.apply(t,[n].concat(e)):t.merge?t.merge.apply(t,e):t.concat.apply(t,e);for(var r=Array.isArray(t),i=t,o=r?S:E,a=r?function(e){i===t&&(i=ee(i)),i.push(e)}:function(e,r){var o=W.call(i,r),a=o&&n?n(i[r],e,r):e;o&&a===i[r]||(i===t&&(i=ee(i)),i[r]=a)},s=0;s0;)e[n]=arguments[n+1];return be(this,e,t)}function Ee(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return ie(this,t,He(),(function(t){return xe(t,e)}))}function Se(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return ie(this,t,He(),(function(t){return be(t,e)}))}function Pe(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}function Oe(){return this.__ownerID?this:this.__ensureOwner(new s)}function Ce(){return this.__ensureOwner()}function Ie(){return this.__altered}St.prototype.cacheResult=Et.prototype.cacheResult=Pt.prototype.cacheResult=Ot.prototype.cacheResult=Wt;var Ae=function(t){function e(e){return null===e||void 0===e?He():ot(e)&&!R(e)?e:He().withMutations((function(n){var r=t(e);qt(r.size),r.forEach((function(t,e){return n.set(e,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return He().withMutations((function(e){for(var n=0;n=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}}))},e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},e.prototype.set=function(t,e){return Xe(this,t,e)},e.prototype.remove=function(t){return Xe(this,t,o)},e.prototype.deleteAll=function(t){var e=T(t);return 0===e.size?this:this.withMutations((function(t){e.forEach((function(e){return t.remove(e)}))}))},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):He()},e.prototype.sort=function(t){return mn(Lt(this,t))},e.prototype.sortBy=function(t,e){return mn(Lt(this,e,t))},e.prototype.map=function(t,e){return this.withMutations((function(n){n.forEach((function(r,i){n.set(i,t.call(e,r,i,n))}))}))},e.prototype.__iterator=function(t,e){return new Ue(this,t,e)},e.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate((function(e){return r++,t(e[1],e[0],n)}),e),r},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?ze(this.size,this._root,t,this.__hash):0===this.size?He():(this.__ownerID=t,this.__altered=!1,this)},e}(E);Ae.isMap=ot;var ke=Ae.prototype;ke[it]=!0,ke.delete=ke.remove,ke.removeAll=ke.deleteAll,ke.setIn=se,ke.removeIn=ke.deleteIn=le,ke.update=he,ke.updateIn=fe,ke.merge=ke.concat=pe,ke.mergeWith=de,ke.mergeDeep=we,ke.mergeDeepWith=Te,ke.mergeIn=Ee,ke.mergeDeepIn=Se,ke.withMutations=Pe,ke.wasAltered=Ie,ke.asImmutable=Ce,ke["@@transducer/init"]=ke.asMutable=Oe,ke["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])},ke["@@transducer/result"]=function(t){return t.asImmutable()};var Me=function(t,e){this.ownerID=t,this.entries=e};Me.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,a=i.length;o=Ke)return function(t,e,n,r){t||(t=new s);for(var i=new Le(t,ft(n),[n,r]),o=0;o>>t)&i),a=this.bitmap;return 0===(a&o)?r:this.nodes[Ye(a&o-1)].get(t+5,e,n,r)},Re.prototype.update=function(t,e,n,a,s,u,l){void 0===n&&(n=ft(a));var c=(0===e?n:n>>>e)&i,h=1<=Qe)return function(t,e,n,i,o){for(var a=0,s=new Array(r),u=0;0!==n;u++,n>>>=1)s[u]=1&n?e[a++]:void 0;return s[i]=o,new De(t,a+1,s)}(t,m,f,c,y);if(p&&!y&&2===m.length&&Ge(m[1^d]))return m[1^d];if(p&&y&&1===m.length&&Ge(y))return y;var g=t&&t===this.ownerID,_=p?y?f:f^h:f|h,b=p?y?qe(m,d,y,g):function(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var i=new Array(r),o=0,a=0;a>>t)&i,a=this.nodes[o];return a?a.get(t+5,e,n,r):r},De.prototype.update=function(t,e,n,r,a,s,u){void 0===n&&(n=ft(r));var l=(0===e?n:n>>>e)&i,c=a===o,h=this.nodes,f=h[l];if(c&&!f)return this;var p=We(f,t,e+5,n,r,a,s,u);if(p===f)return this;var d=this.count;if(f){if(!p&&--d<$e)return function(t,e,n,r){for(var i=0,o=0,a=new Array(n),s=0,u=1,l=e.length;s>>n)&i,u=(0===n?r:r>>>n)&i,l=s===u?[Ve(t,e,n+5,r,o)]:(a=new Le(e,r,o),s>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function qe(t,e,n,r){var i=r?t:Vt(t);return i[e]=n,i}var Ke=8,Qe=16,$e=8,Ze="@@__IMMUTABLE_LIST__@@";function Je(t){return Boolean(t&&t[Ze])}var tn=function(t){function e(e){var n=un();if(null===e||void 0===e)return n;if(Je(e))return e;var i=t(e),o=i.size;return 0===o?n:(qt(o),o>0&&o=0&&t=t.size||e<0)return t.withMutations((function(t){e<0?fn(t,e).set(0,n):fn(t,0,e+1).set(e,n)}));e+=t._origin;var r=t._tail,i=t._root,o={value:!1};e>=pn(t._capacity)?r=ln(r,t.__ownerID,0,e,n,o):i=ln(i,t.__ownerID,t._level,e,n,o);if(!o.value)return t;if(t.__ownerID)return t._root=i,t._tail=r,t.__hash=void 0,t.__altered=!0,t;return sn(t._origin,t._capacity,t._level,i,r)}(this,t,e)},e.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},e.prototype.insert=function(t,e){return this.splice(t,0,e)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):un()},e.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(n){fn(n,0,e+t.length);for(var r=0;r>>e&i;if(r>=this.array.length)return new nn([],t);var o,a=0===r;if(e>0){var s=this.array[r];if((o=s&&s.removeBefore(t,e-5,n))===s&&a)return this}if(a&&!o)return this;var u=cn(this,t);if(!a)for(var l=0;l>>e&i;if(o>=this.array.length)return this;if(e>0){var a=this.array[o];if((r=a&&a.removeAfter(t,e-5,n))===a&&o===this.array.length-1)return this}var s=cn(this,t);return s.array.splice(o+1),r&&(s.array[o]=r),s};var rn,on={};function an(t,e){var n=t._origin,i=t._capacity,o=pn(i),a=t._tail;return s(t._root,t._level,0);function s(t,u,l){return 0===u?function(t,s){var u=s===o?a&&a.array:t&&t.array,l=s>n?0:n-s,c=i-s;c>r&&(c=r);return function(){if(l===c)return on;var t=e?--c:l++;return u&&u[t]}}(t,l):function(t,o,a){var u,l=t&&t.array,c=a>n?0:n-a>>o,h=1+(i-a>>o);h>r&&(h=r);return function(){for(;;){if(u){var t=u();if(t!==on)return t;u=null}if(c===h)return on;var n=e?--h:c++;u=s(l&&l[n],o-5,a+(n<>>n&i,c=t&&l0){var h=t&&t.array[l],f=ln(h,e,n-5,r,o,s);return f===h?t:((u=cn(t,e)).array[l]=f,u)}return c&&t.array[l]===o?t:(s&&a(s),u=cn(t,e),void 0===o&&l===u.array.length-1?u.array.pop():u.array[l]=o,u)}function cn(t,e){return e&&t&&e===t.ownerID?t:new nn(t?t.array.slice():[],e)}function hn(t,e){if(e>=pn(t._capacity))return t._tail;if(e<1<0;)n=n.array[e>>>r&i],r-=5;return n}}function fn(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var r=t.__ownerID||new s,o=t._origin,a=t._capacity,u=o+e,l=void 0===n?a:n<0?a+n:o+n;if(u===o&&l===a)return t;if(u>=l)return t.clear();for(var c=t._level,h=t._root,f=0;u+f<0;)h=new nn(h&&h.array.length?[void 0,h]:[],r),f+=1<<(c+=5);f&&(u+=f,o+=f,l+=f,a+=f);for(var p=pn(a),d=pn(l);d>=1<p?new nn([],r):m;if(m&&d>p&&u5;g-=5){var _=p>>>g&i;y=y.array[_]=cn(y.array[_],r)}y.array[p>>>5&i]=m}if(l=d)u-=d,l-=d,c=5,h=null,v=v&&v.removeBefore(r,0,u);else if(u>o||d>>c&i;if(b!==d>>>c&i)break;b&&(f+=(1<o&&(h=h.removeBefore(r,c,u-f)),h&&d>>5<<5}var dn,mn=function(t){function e(t){return null===t||void 0===t?yn():at(t)?t:yn().withMutations((function(e){var n=E(t);qt(n.size),n.forEach((function(t,n){return e.set(n,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("OrderedMap {","}")},e.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):yn()},e.prototype.set=function(t,e){return gn(this,t,e)},e.prototype.remove=function(t){return gn(this,t,o)},e.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},e.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate((function(e){return e&&t(e[1],e[0],n)}),e)},e.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?vn(e,n,t,this.__hash):0===this.size?yn():(this.__ownerID=t,this._map=e,this._list=n,this)},e}(Ae);function vn(t,e,n,r){var i=Object.create(mn.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=n,i.__hash=r,i}function yn(){return dn||(dn=vn(He(),un()))}function gn(t,e,n){var i,a,s=t._map,u=t._list,l=s.get(e),c=void 0!==l;if(n===o){if(!c)return t;u.size>=r&&u.size>=2*s.size?(i=(a=u.filter((function(t,e){return void 0!==t&&l!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(i.__ownerID=a.__ownerID=t.__ownerID)):(i=s.remove(e),a=l===u.size-1?u.pop():u.set(l,void 0))}else if(c){if(n===u.get(l)[1])return t;i=s,a=u.set(l,[e,n])}else i=s.set(e,u.size),a=u.set(u.size,[e,n]);return t.__ownerID?(t.size=i.size,t._map=i,t._list=a,t.__hash=void 0,t):vn(i,a)}mn.isOrderedMap=at,mn.prototype[M]=!0,mn.prototype.delete=mn.prototype.remove;var _n="@@__IMMUTABLE_STACK__@@";function bn(t){return Boolean(t&&t[_n])}var xn=function(t){function e(t){return null===t||void 0===t?Sn():bn(t)?t:Sn().pushAll(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(t,e){var n=this._head;for(t=l(this,t);n&&t--;)n=n.next;return n?n.value:e},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var e=this.size+arguments.length,n=this._head,r=arguments.length-1;r>=0;r--)n={value:t[r],next:n};return this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):En(e,n)},e.prototype.pushAll=function(e){if(0===(e=t(e)).size)return this;if(0===this.size&&bn(e))return e;qt(e.size);var n=this.size,r=this._head;return e.__iterate((function(t){n++,r={value:t,next:r}}),!0),this.__ownerID?(this.size=n,this._head=r,this.__hash=void 0,this.__altered=!0,this):En(n,r)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Sn()},e.prototype.slice=function(e,n){if(h(e,n,this.size))return this;var r=f(e,this.size);if(p(n,this.size)!==this.size)return t.prototype.slice.call(this,e,n);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):En(i,o)},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?En(this.size,this._head,t,this.__hash):0===this.size?Sn():(this.__ownerID=t,this.__altered=!1,this)},e.prototype.__iterate=function(t,e){var n=this;if(e)return new Q(this.toArray()).__iterate((function(e,r){return t(e,r,n)}),e);for(var r=0,i=this._head;i&&!1!==t(i.value,r++,this);)i=i.next;return r},e.prototype.__iterator=function(t,e){if(e)return new Q(this.toArray()).__iterator(t,e);var n=0,r=this._head;return new F((function(){if(r){var e=r.value;return r=r.next,U(t,n++,e)}return{value:void 0,done:!0}}))},e}(S);xn.isStack=bn;var wn,Tn=xn.prototype;function En(t,e,n,r){var i=Object.create(Tn);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Sn(){return wn||(wn=En(0))}Tn[_n]=!0,Tn.shift=Tn.pop,Tn.unshift=Tn.push,Tn.unshiftAll=Tn.pushAll,Tn.withMutations=Pe,Tn.wasAltered=Ie,Tn.asImmutable=Ce,Tn["@@transducer/init"]=Tn.asMutable=Oe,Tn["@@transducer/step"]=function(t,e){return t.unshift(e)},Tn["@@transducer/result"]=function(t){return t.asImmutable()};var Pn="@@__IMMUTABLE_SET__@@";function On(t){return Boolean(t&&t[Pn])}function Cn(t){return On(t)&&R(t)}function In(t,e){if(t===e)return!0;if(!y(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||_(t)!==_(e)||x(t)!==x(e)||R(t)!==R(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!w(t);if(R(t)){var r=t.entries();return e.every((function(t,e){var i=r.next().value;return i&&ut(i[1],t)&&(n||ut(i[0],e))}))&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"===typeof t.cacheResult&&t.cacheResult();else{i=!0;var a=t;t=e,e=a}var s=!0,u=e.__iterate((function(e,r){if(n?!t.has(e):i?!ut(e,t.get(r,o)):!ut(t.get(r,o),e))return s=!1,!1}));return s&&t.size===u}function An(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function kn(t){if(!t||"object"!==typeof t)return t;if(!y(t)){if(!$t(t))return t;t=V(t)}if(_(t)){var e={};return t.__iterate((function(t,n){e[n]=kn(t)})),e}var n=[];return t.__iterate((function(t){n.push(kn(t))})),n}var Mn=function(t){function e(e){return null===e||void 0===e?Fn():On(e)&&!R(e)?e:Fn().withMutations((function(n){var r=t(e);qt(r.size),r.forEach((function(t){return n.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(E(t).keySeq())},e.intersect=function(t){return(t=T(t).toArray()).length?Dn.intersect.apply(e(t.pop()),t):Fn()},e.union=function(t){return(t=T(t).toArray()).length?Dn.union.apply(e(t.pop()),t):Fn()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return Nn(this,this._map.set(t,t))},e.prototype.remove=function(t){return Nn(this,this._map.remove(t))},e.prototype.clear=function(){return Nn(this,this._map.clear())},e.prototype.map=function(t,e){var n=this,r=[],i=[];return this.forEach((function(o){var a=t.call(e,o,o,n);a!==o&&(r.push(o),i.push(a))})),this.withMutations((function(t){r.forEach((function(e){return t.remove(e)})),i.forEach((function(e){return t.add(e)}))}))},e.prototype.union=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(n){for(var r=0;r=0&&e=0&&n>>-15,461845907),e=lt(e<<13|e>>>-13,5),e=lt((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=ct((e=lt(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(n?e?function(t,e){r=31*r+tr(ft(t),ft(e))|0}:function(t,e){r=r+tr(ft(t),ft(e))|0}:e?function(t){r=31*r+ft(t)|0}:function(t){r=r+ft(t)|0}),r)}(this))}});var Wn=T.prototype;Wn[v]=!0,Wn[L]=Wn.values,Wn.toJSON=Wn.toArray,Wn.__toStringMapper=Zt,Wn.inspect=Wn.toSource=function(){return this.toString()},Wn.chain=Wn.flatMap,Wn.contains=Wn.includes,An(E,{flip:function(){return Bt(this,Ct(this))},mapEntries:function(t,e){var n=this,r=0;return Bt(this,this.toSeq().map((function(i,o){return t.call(e,[o,i],r++,n)})).fromEntrySeq())},mapKeys:function(t,e){var n=this;return Bt(this,this.toSeq().flip().map((function(r,i){return t.call(e,r,i,n)})).flip())}});var Gn=E.prototype;Gn[g]=!0,Gn[L]=Wn.entries,Gn.toJSON=Xn,Gn.__toStringMapper=function(t,e){return Zt(e)+": "+Zt(t)},An(S,{toKeyedSeq:function(){return new Et(this,!1)},filter:function(t,e){return Bt(this,kt(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return Bt(this,At(this,!1))},slice:function(t,e){return Bt(this,Mt(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(e||0,0),0===n||2===n&&!e)return this;t=f(t,t<0?this.count():this.size);var r=this.slice(0,t);return Bt(this,1===n?r:r.concat(Vt(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.findLastEntry(t,e);return n?n[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return Bt(this,Nt(this,t,!1))},get:function(t,e){return(t=l(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find((function(e,n){return n===t}),void 0,e)},has:function(t){return(t=l(this,t))>=0&&(void 0!==this.size?this.size===1/0||te?-1:0}function tr(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}Vn[b]=!0,Vn[M]=!0,An(P,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),P.prototype.has=Wn.includes,P.prototype.contains=P.prototype.includes,An(Y,E.prototype),An(q,S.prototype),An(K,P.prototype);var er=function(t){function e(t){return null===t||void 0===t?or():Cn(t)?t:or().withMutations((function(e){var n=P(t);qt(n.size),n.forEach((function(t){return e.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(E(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(Mn);er.isOrderedSet=Cn;var nr,rr=er.prototype;function ir(t,e){var n=Object.create(rr);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function or(){return nr||(nr=ir(yn()))}rr[M]=!0,rr.zip=Vn.zip,rr.zipWith=Vn.zipWith,rr.__empty=or,rr.__make=ir;var ar=function(t,e){var n,r=function(o){var a=this;if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var s=Object.keys(t),u=i._indices={};i._name=e,i._keys=s,i._defaultValues=t;for(var l=0;l2?[]:void 0,{"":t})}function mr(t,e,n,r,i,o){var a=Array.isArray(n)?q:Qt(n)?Y:null;if(a){if(~t.indexOf(n))throw new TypeError("Cannot convert circular structure to Immutable");t.push(n),i&&""!==r&&i.push(r);var s=e.call(o,r,a(n).map((function(r,o){return mr(t,e,r,o,i,n)})),i&&i.slice());return t.pop(),i&&i.pop(),s}return n}function vr(t,e){return _(e)?e.toMap():e.toList()}var yr="4.0.0-rc.11",gr={version:yr,Collection:T,Iterable:T,Seq:V,Map:Ae,OrderedMap:mn,List:tn,Stack:xn,Set:Mn,OrderedSet:er,Record:ar,Range:jn,Repeat:pr,is:ut,fromJS:dr,hash:ft,isImmutable:k,isCollection:y,isKeyed:_,isIndexed:x,isAssociative:w,isOrdered:R,isValueObject:st,isSeq:C,isList:Je,isMap:ot,isOrderedMap:at,isStack:bn,isSet:On,isOrderedSet:Cn,isRecord:A,get:te,getIn:Bn,has:Jt,hasIn:Hn,merge:ve,mergeDeep:ge,mergeWith:ye,mergeDeepWith:_e,remove:ne,removeIn:ue,set:re,setIn:ae,update:ce,updateIn:ie},_r=T;e.default=gr},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(23);function i(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=Object(r.a)(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(l),h=["%","/","?",";","#"].concat(c),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=n(68);function _(t,e,n){if(t&&i.isObject(t)&&t instanceof o)return t;var r=new o;return r.parse(t,e,n),r}o.prototype.parse=function(t,e,n){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),s=-1!==o&&o127?R+="x":R+=M[D];if(!R.match(p)){var L=A.slice(0,O),F=A.slice(O+1),U=M.match(d);U&&(L.push(U[1]),F.unshift(U[2])),F.length&&(_="/"+F.join(".")+_),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=r.toASCII(this.hostname));var j=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+j,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==_[0]&&(_="/"+_))}if(!m[w])for(O=0,k=c.length;O0)&&n.host.split("@"))&&(n.auth=I.shift(),n.host=n.hostname=I.shift());return n.search=t.search,n.query=t.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!T.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var S=T.slice(-1)[0],P=(n.host||t.host||T.length>1)&&("."===S||".."===S)||""===S,O=0,C=T.length;C>=0;C--)"."===(S=T[C])?T.splice(C,1):".."===S?(T.splice(C,1),O++):O&&(T.splice(C,1),O--);if(!x&&!w)for(;O--;O)T.unshift("..");!x||""===T[0]||T[0]&&"/"===T[0].charAt(0)||T.unshift(""),P&&"/"!==T.join("/").substr(-1)&&T.push("");var I,A=""===T[0]||T[0]&&"/"===T[0].charAt(0);E&&(n.hostname=n.host=A?"":T.length?T.shift():"",(I=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=I.shift(),n.host=n.hostname=I.shift()));return(x=x||n.host&&T.length)&&!A&&T.unshift(""),T.length?n.pathname=T.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(19);function i(t,e){if(t){if("string"===typeof t)return Object(r.a)(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(t,e):void 0}}},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.combineReducers=void 0;var r,i=n(75),o=(r=i)&&r.__esModule?r:{default:r};e.combineReducers=o.default},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(14);function i(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Object(r.a)(t)););return t}},function(t,e,n){"use strict";function r(t,e){if(t.length!==e.length)return!1;for(var n=0;n=e||n<0||v&&t-d>=c}function x(){var t=i();if(b(t))return w(t);f=setTimeout(x,function(t){var n=e-(t-p);return v?s(n,c-(t-d)):n}(t))}function w(t){return f=void 0,y&&u?g(t):(u=l=void 0,h)}function T(){var t=i(),n=b(t);if(u=arguments,l=this,p=t,n){if(void 0===f)return _(p);if(v)return clearTimeout(f),f=setTimeout(x,e),g(p)}return void 0===f&&(f=setTimeout(x,e)),h}return e=o(e)||0,r(n)&&(m=!!n.leading,c=(v="maxWait"in n)?a(o(n.maxWait)||0,e):c,y="trailing"in n?!!n.trailing:y),T.cancel=function(){void 0!==f&&clearTimeout(f),d=0,u=p=l=f=void 0},T.flush=function(){return void 0===f?h:w(i())},T}},function(t,e,n){"use strict";var r=n(29),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(t){return r.isMemo(t)?a:s[t.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,c=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,n,r){if("string"!==typeof n){if(d){var i=p(n);i&&i!==d&&t(e,i,r)}var a=c(n);h&&(a=a.concat(h(n)));for(var s=u(e),m=u(n),v=0;v2||2===n.length&&n[1].value!==a)for(var l=1;l=0;)t=t.replace(" ","_");return o.BLEND_MODES[t]||o.BLEND_MODES.NORMAL},t.createSteppedGradient=function(e,n){void 0===n&&(n=10),("number"!==typeof n||n<=0)&&(n=10);var r=new a(t.hexToRGB(e[0].value),e[0].time);r.isStepped=!0;for(var i=r,o=e[0],s=1,u=e[s],l=1;lu.time;)o=u,u=e[++s];c=(c-o.time)/(u.time-o.time);var h=t.hexToRGB(o.value),f=t.hexToRGB(u.value),p={r:(f.r-h.r)*c+h.r,g:(f.g-h.g)*c+h.g,b:(f.b-h.b)*c+h.b};i.next=new a(p,l/n),i=i.next}return r}}(i||(i={}));var l=function(t,e){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function c(t,e){function n(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function h(t){return this.ease&&(t=this.ease(t)),(this.next.value-this.current.value)*t+this.current.value}function f(t){this.ease&&(t=this.ease(t));var e=this.current.value,n=this.next.value,r=(n.r-e.r)*t+e.r,o=(n.g-e.g)*t+e.g,a=(n.b-e.b)*t+e.b;return i.combineRGBComponents(r,o,a)}function p(t){for(this.ease&&(t=this.ease(t));t>this.next.time;)this.current=this.next,this.next=this.next.next;return t=(t-this.current.time)/(this.next.time-this.current.time),(this.next.value-this.current.value)*t+this.current.value}function d(t){for(this.ease&&(t=this.ease(t));t>this.next.time;)this.current=this.next,this.next=this.next.next;t=(t-this.current.time)/(this.next.time-this.current.time);var e=this.current.value,n=this.next.value,r=(n.r-e.r)*t+e.r,o=(n.g-e.g)*t+e.g,a=(n.b-e.b)*t+e.b;return i.combineRGBComponents(r,o,a)}function m(t){for(this.ease&&(t=this.ease(t));this.next&&t>this.next.time;)this.current=this.next,this.next=this.next.next;return this.current.value}function v(t){for(this.ease&&(t=this.ease(t));this.next&&t>this.next.time;)this.current=this.next,this.next=this.next.next;var e=this.current.value;return i.combineRGBComponents(e.r,e.g,e.b)}var y,g=function(){function t(t){void 0===t&&(t=!1),this.current=null,this.next=null,this.isColor=!!t,this.interpolate=null,this.ease=null}return t.prototype.reset=function(t){this.current=t,this.next=t.next,this.next&&this.next.time>=1?this.interpolate=this.isColor?f:h:t.isStepped?this.interpolate=this.isColor?v:m:this.interpolate=this.isColor?d:p,this.ease=this.current.ease},t}(),_=function(t){function e(n){var r=t.call(this)||this;return r.prevChild=r.nextChild=null,r.emitter=n,r.anchor.x=r.anchor.y=.5,r.velocity=new o.Point,r.rotationSpeed=0,r.rotationAcceleration=0,r.maxLife=0,r.age=0,r.ease=null,r.extraData=null,r.alphaList=new g,r.speedList=new g,r.speedMultiplier=1,r.acceleration=new o.Point,r.maxSpeed=NaN,r.scaleList=new g,r.scaleMultiplier=1,r.colorList=new g(!0),r._doAlpha=!1,r._doScale=!1,r._doSpeed=!1,r._doAcceleration=!1,r._doColor=!1,r._doNormalMovement=!1,r._oneOverLife=0,r.next=null,r.prev=null,r.init=r.init,r.Particle_init=e.prototype.init,r.update=r.update,r.Particle_update=e.prototype.update,r.Sprite_destroy=t.prototype.destroy,r.Particle_destroy=e.prototype.destroy,r.applyArt=r.applyArt,r.kill=r.kill,r}return c(e,t),e.prototype.init=function(){this.age=0,this.velocity.x=this.speedList.current.value*this.speedMultiplier,this.velocity.y=0,i.rotatePoint(this.rotation,this.velocity),this.noRotation?this.rotation=0:this.rotation*=i.DEG_TO_RADS,this.rotationSpeed*=i.DEG_TO_RADS,this.rotationAcceleration*=i.DEG_TO_RADS,this.alpha=this.alphaList.current.value,this.scale.x=this.scale.y=this.scaleList.current.value,this._doAlpha=!!this.alphaList.current.next,this._doSpeed=!!this.speedList.current.next,this._doScale=!!this.scaleList.current.next,this._doColor=!!this.colorList.current.next,this._doAcceleration=0!==this.acceleration.x||0!==this.acceleration.y,this._doNormalMovement=this._doSpeed||0!==this.speedList.current.value||this._doAcceleration,this._oneOverLife=1/this.maxLife;var t=this.colorList.current.value;this.tint=i.combineRGBComponents(t.r,t.g,t.b),this.visible=!0},e.prototype.applyArt=function(t){this.texture=t||o.Texture.EMPTY},e.prototype.update=function(t){if(this.age+=t,this.age>=this.maxLife||this.age<0)return this.kill(),-1;var e=this.age*this._oneOverLife;if(this.ease&&(e=4===this.ease.length?this.ease(e,0,1,1):this.ease(e)),this._doAlpha&&(this.alpha=this.alphaList.interpolate(e)),this._doScale){var n=this.scaleList.interpolate(e)*this.scaleMultiplier;this.scale.x=this.scale.y=n}if(this._doNormalMovement){var r=void 0,o=void 0;if(this._doSpeed){var a=this.speedList.interpolate(e)*this.speedMultiplier;i.normalize(this.velocity),i.scaleBy(this.velocity,a),r=this.velocity.x*t,o=this.velocity.y*t}else if(this._doAcceleration){var s=this.velocity.x,u=this.velocity.y;if(this.velocity.x+=this.acceleration.x*t,this.velocity.y+=this.acceleration.y*t,this.maxSpeed){var l=i.length(this.velocity);l>this.maxSpeed&&i.scaleBy(this.velocity,this.maxSpeed/l)}r=(s+this.velocity.x)/2*t,o=(u+this.velocity.y)/2*t}else r=this.velocity.x*t,o=this.velocity.y*t;this.position.x+=r,this.position.y+=o}if(this._doColor&&(this.tint=this.colorList.interpolate(e)),0!==this.rotationAcceleration){var c=this.rotationSpeed+this.rotationAcceleration*t;this.rotation+=(this.rotationSpeed+c)/2*t,this.rotationSpeed=c}else 0!==this.rotationSpeed?this.rotation+=this.rotationSpeed*t:this.acceleration&&!this.noRotation&&(this.rotation=Math.atan2(this.velocity.y,this.velocity.x));return e},e.prototype.kill=function(){this.emitter.recycle(this)},e.prototype.destroy=function(){this.parent&&this.parent.removeChild(this),this.Sprite_destroy(),this.emitter=this.velocity=this.colorList=this.scaleList=this.alphaList=this.speedList=this.ease=this.next=this.prev=null},e.parseArt=function(t){var e;for(e=t.length;e>=0;--e)"string"===typeof t[e]&&(t[e]=u(t[e]));if(i.verbose)for(e=t.length-1;e>0;--e)if(t[e].baseTexture!==t[e-1].baseTexture){window.console&&console.warn("PixiParticles: using particle textures from different images may hinder performance in WebGL");break}return t},e.parseData=function(t){return t},e}(o.Sprite),b=function(){function t(t){this.segments=[],this.countingLengths=[],this.totalLength=0,this.init(t)}return t.prototype.init=function(t){if(t&&t.length)if(Array.isArray(t[0]))for(var e=0;e0?t:1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"particleConstructor",{get:function(){return this._particleConstructor},set:function(t){if(t!==this._particleConstructor){this._particleConstructor=t,this.cleanup();for(var e=this._poolFirst;e;e=e.next)e.destroy();this._poolFirst=null,this._origConfig&&this._origArt&&this.init(this._origArt,this._origConfig)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},set:function(t){this.cleanup(),this._parent=t},enumerable:!0,configurable:!0}),t.prototype.init=function(t,e){if(t&&e){this.cleanup(),this._origConfig=e,this._origArt=t,t=Array.isArray(t)?t.slice():[t];var n=this._particleConstructor;this.particleImages=n.parseArt?n.parseArt(t):t,e.alpha?this.startAlpha=a.createList(e.alpha):this.startAlpha=new a(1,0),e.speed?(this.startSpeed=a.createList(e.speed),this.minimumSpeedMultiplier=("minimumSpeedMultiplier"in e?e.minimumSpeedMultiplier:e.speed.minimumSpeedMultiplier)||1):(this.minimumSpeedMultiplier=1,this.startSpeed=new a(0,0));var r=e.acceleration;r&&(r.x||r.y)?(this.startSpeed.next=null,this.acceleration=new o.Point(r.x,r.y),this.maxSpeed=e.maxSpeed||NaN):this.acceleration=new o.Point,e.scale?(this.startScale=a.createList(e.scale),this.minimumScaleMultiplier=("minimumScaleMultiplier"in e?e.minimumScaleMultiplier:e.scale.minimumScaleMultiplier)||1):(this.startScale=new a(1,0),this.minimumScaleMultiplier=1),e.color?this.startColor=a.createList(e.color):this.startColor=new a({r:255,g:255,b:255},0),e.startRotation?(this.minStartRotation=e.startRotation.min,this.maxStartRotation=e.startRotation.max):this.minStartRotation=this.maxStartRotation=0,e.noRotation&&(this.minStartRotation||this.maxStartRotation)?this.noRotation=!!e.noRotation:this.noRotation=!1,e.rotationSpeed?(this.minRotationSpeed=e.rotationSpeed.min,this.maxRotationSpeed=e.rotationSpeed.max):this.minRotationSpeed=this.maxRotationSpeed=0,this.rotationAcceleration=e.rotationAcceleration||0,this.minLifetime=e.lifetime.min,this.maxLifetime=e.lifetime.max,this.particleBlendMode=i.getBlendMode(e.blendMode),e.ease?this.customEase="function"===typeof e.ease?e.ease:i.generateEase(e.ease):this.customEase=null,n.parseData?this.extraData=n.parseData(e.extraData):this.extraData=e.extraData||null,this.spawnRect=this.spawnCircle=null,this.particlesPerWave=1,e.particlesPerWave&&e.particlesPerWave>1&&(this.particlesPerWave=e.particlesPerWave),this.particleSpacing=0,this.angleStart=0,this.parseSpawnType(e),this.frequency=e.frequency,this.spawnChance="number"===typeof e.spawnChance&&e.spawnChance>0?e.spawnChance:1,this.emitterLifetime=e.emitterLifetime||-1,this.maxParticles=e.maxParticles>0?e.maxParticles:1e3,this.addAtBack=!!e.addAtBack,this.rotation=0,this.ownerPos=new o.Point,this.spawnPos=new o.Point(e.pos.x,e.pos.y),this.initAdditional(t,e),this._prevEmitterPos=this.spawnPos.clone(),this._prevPosIsValid=!1,this._spawnTimer=0,this.emit=void 0===e.emit||!!e.emit,this.autoUpdate=!!e.autoUpdate,this.orderedArt=!!e.orderedArt}},t.prototype.initAdditional=function(t,e){},t.prototype.parseSpawnType=function(t){var e;switch(t.spawnType){case"rect":this.spawnType="rect",this._spawnFunc=this._spawnRect;var n=t.spawnRect;this.spawnRect=new o.Rectangle(n.x,n.y,n.w,n.h);break;case"circle":this.spawnType="circle",this._spawnFunc=this._spawnCircle,e=t.spawnCircle,this.spawnCircle=new o.Circle(e.x,e.y,e.r);break;case"ring":this.spawnType="ring",this._spawnFunc=this._spawnRing,e=t.spawnCircle,this.spawnCircle=new o.Circle(e.x,e.y,e.r),this.spawnCircle.minRadius=e.minR;break;case"burst":this.spawnType="burst",this._spawnFunc=this._spawnBurst,this.particleSpacing=t.particleSpacing,this.angleStart=t.angleStart?t.angleStart:0;break;case"point":this.spawnType="point",this._spawnFunc=this._spawnPoint;break;case"polygonalChain":this.spawnType="polygonalChain",this._spawnFunc=this._spawnPolygonalChain,this.spawnPolygonalChain=new b(t.spawnPolygon);break;default:this.spawnType="point",this._spawnFunc=this._spawnPoint}},t.prototype.recycle=function(t){t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next),t===this._activeParticlesLast&&(this._activeParticlesLast=t.prev),t===this._activeParticlesFirst&&(this._activeParticlesFirst=t.next),t.prev=null,t.next=this._poolFirst,this._poolFirst=t,t.parent&&t.parent.removeChild(t),--this.particleCount},t.prototype.rotate=function(t){if(this.rotation!==t){var e=t-this.rotation;this.rotation=t,i.rotatePoint(e,this.spawnPos),this._posChanged=!0}},t.prototype.updateSpawnPos=function(t,e){this._posChanged=!0,this.spawnPos.x=t,this.spawnPos.y=e},t.prototype.updateOwnerPos=function(t,e){this._posChanged=!0,this.ownerPos.x=t,this.ownerPos.y=e},t.prototype.resetPositionTracking=function(){this._prevPosIsValid=!1},Object.defineProperty(t.prototype,"emit",{get:function(){return this._emit},set:function(t){this._emit=!!t,this._emitterLife=this.emitterLifetime},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(t){this._autoUpdate&&!t?y.remove(this.update,this):!this._autoUpdate&&t&&y.add(this.update,this),this._autoUpdate=!!t},enumerable:!0,configurable:!0}),t.prototype.playOnceAndDestroy=function(t){this.autoUpdate=!0,this.emit=!0,this._destroyWhenComplete=!0,this._completeCallback=t},t.prototype.playOnce=function(t){this.emit=!0,this._completeCallback=t},t.prototype.update=function(t){if(this._autoUpdate&&(t=t/o.settings.TARGET_FPMS/1e3),this._parent){var e,n,r,i,a;for(n=this._activeParticlesFirst;n;n=r)r=n.next,n.update(t);this._prevPosIsValid&&(i=this._prevEmitterPos.x,a=this._prevEmitterPos.y);var s=this.ownerPos.x+this.spawnPos.x,u=this.ownerPos.y+this.spawnPos.y;if(this._emit)for(this._spawnTimer-=t<0?0:t;this._spawnTimer<=0;){if(this._emitterLife>=0&&(this._emitterLife-=this._frequency,this._emitterLife<=0)){this._spawnTimer=0,this._emitterLife=0,this.emit=!1;break}if(this.particleCount>=this.maxParticles)this._spawnTimer+=this._frequency;else{var l=void 0;if(l=this.minLifetime===this.maxLifetime?this.minLifetime:Math.random()*(this.maxLifetime-this.minLifetime)+this.minLifetime,-this._spawnTimer=this.spawnChance)){var d=void 0;this._poolFirst?(d=this._poolFirst,this._poolFirst=this._poolFirst.next,d.next=null):d=new this.particleConstructor(this),this.particleImages.length>1?-1!==this._currentImageIndex?(d.applyArt(this.particleImages[this._currentImageIndex++]),(this._currentImageIndex<0||this._currentImageIndex>=this.particleImages.length)&&(this._currentImageIndex=0)):d.applyArt(this.particleImages[Math.floor(Math.random()*this.particleImages.length)]):d.applyArt(this.particleImages[0]),d.alphaList.reset(this.startAlpha),1!==this.minimumSpeedMultiplier&&(d.speedMultiplier=Math.random()*(1-this.minimumSpeedMultiplier)+this.minimumSpeedMultiplier),d.speedList.reset(this.startSpeed),d.acceleration.x=this.acceleration.x,d.acceleration.y=this.acceleration.y,d.maxSpeed=this.maxSpeed,1!==this.minimumScaleMultiplier&&(d.scaleMultiplier=Math.random()*(1-this.minimumScaleMultiplier)+this.minimumScaleMultiplier),d.scaleList.reset(this.startScale),d.colorList.reset(this.startColor),this.minRotationSpeed===this.maxRotationSpeed?d.rotationSpeed=this.minRotationSpeed:d.rotationSpeed=Math.random()*(this.maxRotationSpeed-this.minRotationSpeed)+this.minRotationSpeed,d.rotationAcceleration=this.rotationAcceleration,d.noRotation=this.noRotation,d.maxLife=l,d.blendMode=this.particleBlendMode,d.ease=this.customEase,d.extraData=this.extraData,this.applyAdditionalProperties(d),this._spawnFunc(d,c,h,e),d.init(),this.addAtBack?this._parent.addChildAt(d,0):this._parent.addChild(d),this._activeParticlesLast?(this._activeParticlesLast.next=d,d.prev=this._activeParticlesLast,this._activeParticlesLast=d):this._activeParticlesLast=this._activeParticlesFirst=d,++this.particleCount,d.update(-this._spawnTimer)}}this._spawnTimer+=this._frequency}}if(this._posChanged&&(this._prevEmitterPos.x=s,this._prevEmitterPos.y=u,this._prevPosIsValid=!0,this._posChanged=!1),!this._emit&&!this._activeParticlesFirst){if(this._completeCallback){var m=this._completeCallback;this._completeCallback=null,m()}this._destroyWhenComplete&&this.destroy()}}},t.prototype.applyAdditionalProperties=function(t){},t.prototype._spawnPoint=function(t,e,n){this.minStartRotation===this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,t.position.x=e,t.position.y=n},t.prototype._spawnRect=function(t,e,n){this.minStartRotation===this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,w.x=Math.random()*this.spawnRect.width+this.spawnRect.x,w.y=Math.random()*this.spawnRect.height+this.spawnRect.y,0!==this.rotation&&i.rotatePoint(this.rotation,w),t.position.x=e+w.x,t.position.y=n+w.y},t.prototype._spawnCircle=function(t,e,n){this.minStartRotation===this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,w.x=Math.random()*this.spawnCircle.radius,w.y=0,i.rotatePoint(360*Math.random(),w),w.x+=this.spawnCircle.x,w.y+=this.spawnCircle.y,0!==this.rotation&&i.rotatePoint(this.rotation,w),t.position.x=e+w.x,t.position.y=n+w.y},t.prototype._spawnRing=function(t,e,n){var r=this.spawnCircle;this.minStartRotation===this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,r.minRadius!==r.radius?w.x=Math.random()*(r.radius-r.minRadius)+r.minRadius:w.x=r.radius,w.y=0;var o=360*Math.random();t.rotation+=o,i.rotatePoint(o,w),w.x+=this.spawnCircle.x,w.y+=this.spawnCircle.y,0!==this.rotation&&i.rotatePoint(this.rotation,w),t.position.x=e+w.x,t.position.y=n+w.y},t.prototype._spawnPolygonalChain=function(t,e,n){this.minStartRotation===this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,this.spawnPolygonalChain.getRandomPoint(w),0!==this.rotation&&i.rotatePoint(this.rotation,w),t.position.x=e+w.x,t.position.y=n+w.y},t.prototype._spawnBurst=function(t,e,n,r){0===this.particleSpacing?t.rotation=360*Math.random():t.rotation=this.angleStart+this.particleSpacing*r+this.rotation,t.position.x=e,t.position.y=n},t.prototype.cleanup=function(){var t,e;for(t=this._activeParticlesFirst;t;t=e)e=t.next,this.recycle(t),t.parent&&t.parent.removeChild(t);this._activeParticlesFirst=this._activeParticlesLast=null,this.particleCount=0},t.prototype.destroy=function(){var t;this.autoUpdate=!1,this.cleanup();for(var e=this._poolFirst;e;e=t)t=e.next,e.destroy();this._poolFirst=this._parent=this.particleImages=this.spawnPos=this.ownerPos=this.startColor=this.startScale=this.startAlpha=this.startSpeed=this.customEase=this._completeCallback=null},t}(),E=new o.Point,S=["pow","sqrt","abs","floor","round","ceil","E","PI","sin","cos","tan","asin","acos","atan","atan2","log"],P=new RegExp(["[01234567890\\.\\*\\-\\+\\/\\(\\)x ,]"].concat(S).join("|"),"g");(function(t){function e(e){var n=t.call(this,e)||this;return n.path=null,n.initialRotation=0,n.initialPosition=new o.Point,n.movement=0,n}c(e,t),e.prototype.init=function(){this.initialRotation=this.rotation,this.Particle_init(),this.path=this.extraData.path,this._doNormalMovement=!this.path,this.movement=0,this.initialPosition.x=this.position.x,this.initialPosition.y=this.position.y},e.prototype.update=function(t){var e=this.Particle_update(t);if(e>=0&&this.path){if(this._doSpeed){var n=this.speedList.interpolate(e)*this.speedMultiplier;this.movement+=n*t}else{n=this.speedList.current.value*this.speedMultiplier;this.movement+=n*t}E.x=this.movement,E.y=this.path(this.movement),i.rotatePoint(this.initialRotation,E),this.position.x=this.initialPosition.x+E.x,this.position.y=this.initialPosition.y+E.y}return e},e.prototype.destroy=function(){this.Particle_destroy(),this.path=this.initialPosition=null},e.parseArt=function(t){return _.parseArt(t)},e.parseData=function(t){var e={};if(t&&t.path)try{e.path=function(t){for(var e=t.match(P),n=e.length-1;n>=0;--n)S.indexOf(e[n])>=0&&(e[n]="Math."+e[n]);return t=e.join(""),new Function("x","return "+t+";")}(t.path)}catch(n){i.verbose&&console.error("PathParticle: error in parsing path expression"),e.path=null}else i.verbose&&console.error("PathParticle requires a path string in extraData!"),e.path=null;return e}})(_),function(t){function e(e){var n=t.call(this,e)||this;return n.textures=null,n.duration=0,n.framerate=0,n.elapsed=0,n.loop=!1,n}c(e,t),e.prototype.init=function(){this.Particle_init(),this.elapsed=0,this.framerate<0&&(this.duration=this.maxLife,this.framerate=this.textures.length/this.duration)},e.prototype.applyArt=function(t){this.textures=t.textures,this.framerate=t.framerate,this.duration=t.duration,this.loop=t.loop},e.prototype.update=function(t){var e=this.Particle_update(t);if(e>=0){this.elapsed+=t,this.elapsed>this.duration&&(this.loop?this.elapsed=this.elapsed%this.duration:this.elapsed=this.duration-1e-6);var n=this.elapsed*this.framerate+1e-7|0;this.texture=this.textures[n]||o.Texture.EMPTY}return e},e.prototype.destroy=function(){this.Particle_destroy(),this.textures=null},e.parseArt=function(t){for(var e=[],n=0;n0;--h)a.push(c)}}"matchLife"===r.framerate?(i.framerate=-1,i.duration=0,i.loop=!1):(i.loop=!!r.loop,i.framerate=r.framerate>0?r.framerate:60,i.duration=a.length/i.framerate)}return e}}(_);var O=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._firstChild=null,e._lastChild=null,e._childCount=0,e}return c(e,t),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this._firstChild},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this._lastChild},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"childCount",{get:function(){return this._childCount},enumerable:!0,configurable:!0}),e.prototype.addChild=function(){for(var t=[],e=0;e1)for(var n=0;nthis._childCount)throw new Error("addChildAt: The index "+e+" supplied is out of bounds "+this._childCount);t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1;var n=t;if(this._firstChild)if(0===e)this._firstChild.prevChild=n,n.nextChild=this._firstChild,this._firstChild=n;else if(e===this._childCount)this._lastChild.nextChild=n,n.prevChild=this._lastChild,this._lastChild=n;else{for(var r=0,i=this._firstChild;r=this._childCount)throw new Error("The index "+e+" supplied is out of bounds "+this._childCount);if(t.parent!==this)throw new Error("The supplied DisplayObject must be a child of the caller");if(t.nextChild&&(t.nextChild.prevChild=t.prevChild),t.prevChild&&(t.prevChild.nextChild=t.nextChild),this._firstChild===t&&(this._firstChild=t.nextChild),this._lastChild===t&&(this._lastChild=t.prevChild),t.nextChild=null,t.prevChild=null,this._firstChild)if(0===e)this._firstChild.prevChild=t,t.nextChild=this._firstChild,this._firstChild=t;else if(e===this._childCount)this._lastChild.nextChild=t,t.prevChild=this._lastChild,this._lastChild=t;else{for(var n=0,r=this._firstChild;n1)for(var n=0;n=this._childCount)throw new Error("getChildAt: Index ("+t+") does not exist.");if(0===t)return this._firstChild;if(t===this._childCount)return this._lastChild;for(var e=0,n=this._firstChild;e0&&i<=r){for(var o=[],a=this._firstChild,s=0;s<=r&&a;++s,a=a.nextChild)s>=n&&o.push(a);var u=o[0].prevChild,l=o[o.length-1].nextChild;l?l.prevChild=u:this._lastChild=u,u?u.nextChild=l:this._firstChild=l;for(s=0;s80*n){r=u=t[0],s=l=t[1];for(var b=n;bu&&(u=c),p>l&&(l=p);d=0!==(d=Math.max(u-r,l-s))?1/d:0}return a(g,_,n,r,s,d),_}function i(t,e,n,r,i){var o,a;if(i===C(t,e,n,r)>0)for(o=e;o=e;o-=r)a=S(o,t[o],t[o+1],a);return a&&_(a,a.next)&&(P(a),a=a.next),a}function o(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!_(r,r.next)&&0!==g(r.prev,r,r.next))r=r.next;else{if(P(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function a(t,e,n,r,i,h,f){if(t){!f&&h&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=d(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,u,l=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,l*=2}while(a>1)}(i)}(t,r,i,h);for(var p,m,v=t;t.prev!==t.next;)if(p=t.prev,m=t.next,h?u(t,r,i,h):s(t))e.push(p.i/n),e.push(t.i/n),e.push(m.i/n),P(t),t=m.next,v=m.next;else if((t=m)===v){f?1===f?a(t=l(o(t),e,n),e,n,r,i,h,2):2===f&&c(t,e,n,r,i,h):a(o(t),e,n,r,i,h,1);break}}}function s(t){var e=t.prev,n=t,r=t.next;if(g(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(v(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&g(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function u(t,e,n,r){var i=t.prev,o=t,a=t.next;if(g(i,o,a)>=0)return!1;for(var s=i.xo.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=d(s,u,e,n,r),f=d(l,c,e,n,r),p=t.prevZ,m=t.nextZ;p&&p.z>=h&&m&&m.z<=f;){if(p!==t.prev&&p!==t.next&&v(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&g(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,m!==t.prev&&m!==t.next&&v(i.x,i.y,o.x,o.y,a.x,a.y,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;p&&p.z>=h;){if(p!==t.prev&&p!==t.next&&v(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&g(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;m&&m.z<=f;){if(m!==t.prev&&m!==t.next&&v(i.x,i.y,o.x,o.y,a.x,a.y,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function l(t,e,n){var r=t;do{var i=r.prev,a=r.next.next;!_(i,a)&&b(i,r,r.next,a)&&T(i,a)&&T(a,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(a.i/n),P(r),P(r.next),r=t=a),r=r.next}while(r!==t);return o(r)}function c(t,e,n,r,i,s){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&y(u,l)){var c=E(u,l);return u=o(u,u.next),c=o(c,c.next),a(u,e,n,r,i,s),void a(c,e,n,r,i,s)}l=l.next}u=u.next}while(u!==t)}function h(t,e){return t.x-e.x}function f(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x=r.x&&r.x>=c&&i!==r.x&&v(on.x||r.x===n.x&&p(n,r)))&&(n=r,f=u)),r=r.next}while(r!==l);return n}(t,e)){var n=E(e,t);o(e,e.next),o(n,n.next)}}function p(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function d(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function m(t){var e=t,n=t;do{(e.x=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function y(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&b(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(T(t,e)&&T(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!==n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||_(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function _(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,n,r){var i=w(g(t,e,n)),o=w(g(t,e,r)),a=w(g(n,r,t)),s=w(g(n,r,e));return i!==o&&a!==s||(!(0!==i||!x(t,n,e))||(!(0!==o||!x(t,r,e))||(!(0!==a||!x(n,t,r))||!(0!==s||!x(n,e,r)))))}function x(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function w(t){return t>0?1:t<0?-1:0}function T(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function E(t,e){var n=new O(t.i,t.x,t.y),r=new O(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function S(t,e,n,r){var i=new O(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function P(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function O(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function C(t,e,n,r){for(var i=0,o=e,a=n-r;o0&&(r+=t[i-1].length,n.holes.push(r))}return n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return t&&"@@redux/INIT"===t.type?"initialState argument passed to createStore":"previous state received by the reducer"},t.exports=e.default},function(t,e,n){var r=n(80),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e,n){var r=n(40).Symbol;t.exports=r},function(t,e,n){"use strict";function r(t){var e,n=t.Symbol;return"function"===typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t){return function(e){var n=e.dispatch,r=e.getState;return function(e){return function(i){return"function"===typeof i?i(n,r,t):e(i)}}}}var i=r();i.withExtraArgument=r,e.a=i},function(t,e,n){"use strict";e.__esModule=!0;var r=Object.assign||function(t){for(var e=1;e=this.viewport.threshold}},{key:"move",value:function(t){if(!this.viewport.pause&&this.viewport.worldVisible){var e=this.viewport.plugins.move(t);if(this.clickedAvailable){var n=t.data.global.x-this.last.x,r=t.data.global.y-this.last.y;(this.checkThreshold(n)||this.checkThreshold(r))&&(this.clickedAvailable=!1)}e&&this.viewport.options.stopPropagation&&t.stopPropagation()}}},{key:"up",value:function(t){if(!this.viewport.pause&&this.viewport.worldVisible){"mouse"===t.data.pointerType&&(this.isMouseDown=!1),"mouse"!==t.data.pointerType&&this.remove(t.data.pointerId);var e=this.viewport.plugins.up(t);this.clickedAvailable&&0===this.count()&&(this.viewport.emit("clicked",{event:t,screen:this.last,world:this.viewport.toWorld(this.last),viewport:this}),this.clickedAvailable=!1),e&&this.viewport.options.stopPropagation&&t.stopPropagation()}}},{key:"getPointerPosition",value:function(t){var e=new f.Point;return this.viewport.options.interaction?this.viewport.options.interaction.mapPositionToPoint(e,t.clientX,t.clientY):(e.x=t.clientX,e.y=t.clientY),e}},{key:"handleWheel",value:function(t){if(!this.viewport.pause&&this.viewport.worldVisible){var e=this.viewport.toLocal(this.getPointerPosition(t));if(this.viewport.left<=e.x&&e.x<=this.viewport.right&&this.viewport.top<=e.y&&e.y<=this.viewport.bottom)this.viewport.plugins.wheel(t)&&!this.viewport.options.passiveWheel&&t.preventDefault()}}},{key:"pause",value:function(){this.touches=[],this.isMouseDown=!1}},{key:"get",value:function(t){var e,n=Object(l.a)(this.touches);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.id===t)return r}}catch(i){n.e(i)}finally{n.f()}return null}},{key:"remove",value:function(t){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:d.length;this.plugins[t]=e;var r=d.indexOf(t);-1!==r&&d.splice(r,1),d.splice(n,0,t),this.sort()}},{key:"get",value:function(t,e){return e&&"undefined"!==typeof this.plugins[t]&&this.plugins[t].paused?null:this.plugins[t]}},{key:"update",value:function(t){var e,n=Object(l.a)(this.list);try{for(n.s();!(e=n.n()).done;){e.value.update(t)}}catch(r){n.e(r)}finally{n.f()}}},{key:"resize",value:function(){var t,e=Object(l.a)(this.list);try{for(e.s();!(t=e.n()).done;){t.value.resize()}}catch(n){e.e(n)}finally{e.f()}}},{key:"reset",value:function(){var t,e=Object(l.a)(this.list);try{for(e.s();!(t=e.n()).done;){t.value.reset()}}catch(n){e.e(n)}finally{e.f()}}},{key:"remove",value:function(t){this.plugins[t]&&(this.plugins[t]=null,this.viewport.emit(t+"-remove"),this.sort())}},{key:"pause",value:function(t){this.plugins[t]&&this.plugins[t].pause()}},{key:"resume",value:function(t){this.plugins[t]&&this.plugins[t].resume()}},{key:"sort",value:function(){this.list=[];var t,e=Object(l.a)(d);try{for(e.s();!(t=e.n()).done;){var n=t.value;this.plugins[n]&&this.list.push(this.plugins[n])}}catch(r){e.e(r)}finally{e.f()}}},{key:"down",value:function(t){var e,n=!1,r=Object(l.a)(this.list);try{for(r.s();!(e=r.n()).done;){e.value.down(t)&&(n=!0)}}catch(i){r.e(i)}finally{r.f()}return n}},{key:"move",value:function(t){var e,n=!1,r=Object(l.a)(this.viewport.plugins.list);try{for(r.s();!(e=r.n()).done;){e.value.move(t)&&(n=!0)}}catch(i){r.e(i)}finally{r.f()}return n}},{key:"up",value:function(t){var e,n=!1,r=Object(l.a)(this.list);try{for(r.s();!(e=r.n()).done;){e.value.up(t)&&(n=!0)}}catch(i){r.e(i)}finally{r.f()}return n}},{key:"wheel",value:function(t){var e,n=!1,r=Object(l.a)(this.list);try{for(r.s();!(e=r.n()).done;){e.value.wheel(t)&&(n=!0)}}catch(i){r.e(i)}finally{r.f()}return n}}]),t}(),v=function(){function t(e){Object(c.a)(this,t),this.parent=e,this.paused=!1}return Object(h.a)(t,[{key:"destroy",value:function(){}},{key:"down",value:function(){return!1}},{key:"move",value:function(){return!1}},{key:"up",value:function(){return!1}},{key:"wheel",value:function(){return!1}},{key:"update",value:function(){}},{key:"resize",value:function(){}},{key:"reset",value:function(){}},{key:"pause",value:function(){this.paused=!0}},{key:"resume",value:function(){this.paused=!1}}]),t}(),y={direction:"all",pressDrag:!0,wheel:!0,wheelScroll:1,reverse:!1,clampWheel:!1,underflow:"center",factor:1,mouseButtons:"all",keyToPress:null,ignoreKeyToPressOnTouch:!1},g=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},y,i),r.moved=!1,r.reverse=r.options.reverse?1:-1,r.xDirection=!r.options.direction||"all"===r.options.direction||"x"===r.options.direction,r.yDirection=!r.options.direction||"all"===r.options.direction||"y"===r.options.direction,r.keyIsPressed=!1,r.parseUnderflow(),r.mouseButtons(r.options.mouseButtons),r.options.keyToPress&&r.handleKeyPresses(r.options.keyToPress),r}return Object(h.a)(n,[{key:"handleKeyPresses",value:function(t){var e=this;parent.addEventListener("keydown",(function(n){t.includes(n.code)&&(e.keyIsPressed=!0)})),parent.addEventListener("keyup",(function(n){t.includes(n.code)&&(e.keyIsPressed=!1)}))}},{key:"mouseButtons",value:function(t){this.mouse=t&&"all"!==t?[-1!==t.indexOf("left"),-1!==t.indexOf("middle"),-1!==t.indexOf("right")]:[!0,!0,!0]}},{key:"parseUnderflow",value:function(){var t=this.options.underflow.toLowerCase();"center"===t?(this.underflowX=0,this.underflowY=0):(this.underflowX=-1!==t.indexOf("left")?-1:-1!==t.indexOf("right")?1:0,this.underflowY=-1!==t.indexOf("top")?-1:-1!==t.indexOf("bottom")?1:0)}},{key:"checkButtons",value:function(t){var e="mouse"===t.data.pointerType,n=this.parent.input.count();return!(!(1===n||n>1&&!this.parent.plugins.get("pinch",!0))||e&&!this.mouse[t.data.button])}},{key:"checkKeyPress",value:function(t){return!!(!this.options.keyToPress||this.keyIsPressed||this.options.ignoreKeyToPressOnTouch&&"touch"===t.data.pointerType)}},{key:"down",value:function(t){if(!this.paused&&this.options.pressDrag)return this.checkButtons(t)&&this.checkKeyPress(t)?(this.last={x:t.data.global.x,y:t.data.global.y},this.current=t.data.pointerId,!0):void(this.last=null)}},{key:"move",value:function(t){if(!this.paused&&this.options.pressDrag&&this.last&&this.current===t.data.pointerId){var e=t.data.global.x,n=t.data.global.y,r=this.parent.input.count();if(1===r||r>1&&!this.parent.plugins.get("pinch",!0)){var i=e-this.last.x,o=n-this.last.y;if(this.moved||this.xDirection&&this.parent.input.checkThreshold(i)||this.yDirection&&this.parent.input.checkThreshold(o)){var a={x:e,y:n};return this.xDirection&&(this.parent.x+=(a.x-this.last.x)*this.options.factor),this.yDirection&&(this.parent.y+=(a.y-this.last.y)*this.options.factor),this.last=a,this.moved||this.parent.emit("drag-start",{event:t,screen:new f.Point(this.last.x,this.last.y),world:this.parent.toWorld(new f.Point(this.last.x,this.last.y)),viewport:this.parent}),this.moved=!0,this.parent.emit("moved",{viewport:this.parent,type:"drag"}),!0}}else this.moved=!1}}},{key:"up",value:function(t){if(!this.paused){var e=this.parent.input.touches;if(1===e.length){var n=e[0];return n.last&&(this.last={x:n.last.x,y:n.last.y},this.current=n.id),this.moved=!1,!0}if(this.last&&this.moved){var r=new f.Point(this.last.x,this.last.y);return this.parent.emit("drag-end",{event:t,screen:r,world:this.parent.toWorld(r),viewport:this.parent}),this.last=null,this.moved=!1,!0}}}},{key:"wheel",value:function(t){if(!this.paused&&this.options.wheel){var e=this.parent.plugins.get("wheel",!0);if(!e)return this.xDirection&&(this.parent.x+=t.deltaX*this.options.wheelScroll*this.reverse),this.yDirection&&(this.parent.y+=t.deltaY*this.options.wheelScroll*this.reverse),this.options.clampWheel&&this.clamp(),this.parent.emit("wheel-scroll",this.parent),this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.options.passiveWheel||t.preventDefault(),!0}}},{key:"resume",value:function(){this.last=null,this.paused=!1}},{key:"clamp",value:function(){var t=this.parent.plugins.get("decelerate",!0)||{};if("y"!==this.options.clampWheel)if(this.parent.screenWorldWidththis.parent.worldWidth&&(this.parent.x=-this.parent.worldWidth*this.parent.scale.x+this.parent.screenWidth,t.x=0);if("x"!==this.options.clampWheel)if(this.parent.screenWorldHeightthis.parent.worldHeight&&(this.parent.y=-this.parent.worldHeight*this.parent.scale.y+this.parent.screenHeight,t.y=0)}},{key:"active",get:function(){return this.moved}}]),n}(v),_={noDrag:!1,percent:1,center:null,factor:1},b=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},_,i),r}return Object(h.a)(n,[{key:"down",value:function(){if(this.parent.input.count()>=2)return this.active=!0,!0}},{key:"move",value:function(t){if(!this.paused&&this.active){var e=t.data.global.x,n=t.data.global.y,r=this.parent.input.touches;if(r.length>=2){var i=r[0],o=r[1],a=i.last&&o.last?Math.sqrt(Math.pow(o.last.x-i.last.x,2)+Math.pow(o.last.y-i.last.y,2)):null;if(i.id===t.data.pointerId?i.last={x:e,y:n,data:t.data}:o.id===t.data.pointerId&&(o.last={x:e,y:n,data:t.data}),a){var s,u={x:i.last.x+(o.last.x-i.last.x)/2,y:i.last.y+(o.last.y-i.last.y)/2};this.options.center||(s=this.parent.toLocal(u));var l=Math.sqrt(Math.pow(o.last.x-i.last.x,2)+Math.pow(o.last.y-i.last.y,2)),c=(1-a/(l=0===l?l=1e-10:l))*this.options.percent*this.parent.scale.x;this.parent.scale.x+=c,this.parent.scale.y+=c,this.parent.emit("zoomed",{viewport:this.parent,type:"pinch",center:u});var h=this.parent.plugins.get("clamp-zoom",!0);if(h&&h.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{var f=this.parent.toGlobal(s);this.parent.x+=(u.x-f.x)*this.options.factor,this.parent.y+=(u.y-f.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})}!this.options.noDrag&&this.lastCenter&&(this.parent.x+=(u.x-this.lastCenter.x)*this.options.factor,this.parent.y+=(u.y-this.lastCenter.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})),this.lastCenter=u,this.moved=!0}else this.pinching||(this.parent.emit("pinch-start",this.parent),this.pinching=!0);return!0}}}},{key:"up",value:function(){if(this.pinching&&this.parent.input.touches.length<=1)return this.active=!1,this.lastCenter=null,this.pinching=!1,this.moved=!1,this.parent.emit("pinch-end",this.parent),!0}}]),n}(v),x={left:!1,right:!1,top:!1,bottom:!1,direction:null,underflow:"center"},w=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},x,i),r.options.direction&&(r.options.left="x"===r.options.direction||"all"===r.options.direction||null,r.options.right="x"===r.options.direction||"all"===r.options.direction||null,r.options.top="y"===r.options.direction||"all"===r.options.direction||null,r.options.bottom="y"===r.options.direction||"all"===r.options.direction||null),r.parseUnderflow(),r.last={x:null,y:null,scaleX:null,scaleY:null},r.update(),r}return Object(h.a)(n,[{key:"parseUnderflow",value:function(){var t=this.options.underflow.toLowerCase();"none"===t?this.noUnderflow=!0:"center"===t?(this.underflowX=this.underflowY=0,this.noUnderflow=!1):(this.underflowX=-1!==t.indexOf("left")?-1:-1!==t.indexOf("right")?1:0,this.underflowY=-1!==t.indexOf("top")?-1:-1!==t.indexOf("bottom")?1:0,this.noUnderflow=!1)}},{key:"move",value:function(){return this.update(),!1}},{key:"update",value:function(){if(!this.paused&&(this.parent.x!==this.last.x||this.parent.y!==this.last.y||this.parent.scale.x!==this.last.scaleX||this.parent.scale.y!==this.last.scaleY)){var t={x:this.parent.x,y:this.parent.y},e=this.parent.plugins.decelerate||{};if(null!==this.options.left||null!==this.options.right){var n=!1;if(this.parent.screenWorldWidth(!0===this.options.right?this.parent.worldWidth:this.options.right)&&(this.parent.x=-(!0===this.options.right?this.parent.worldWidth:this.options.right)*this.parent.scale.x+this.parent.screenWidth,e.x=0,n=!0);n&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-x"})}if(null!==this.options.top||null!==this.options.bottom){var r=!1;if(this.parent.screenWorldHeight(!0===this.options.bottom?this.parent.worldHeight:this.options.bottom)&&(this.parent.y=-(!0===this.options.bottom?this.parent.worldHeight:this.options.bottom)*this.parent.scale.y+this.parent.screenHeight,e.y=0,r=!0);r&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-y"})}this.last.x=this.parent.x,this.last.y=this.parent.y,this.last.scaleX=this.parent.scale.x,this.last.scaleY=this.parent.scale.y}}},{key:"reset",value:function(){this.update()}}]),n}(v),T={minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,minScale:null,maxScale:null},E=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},T,i),r.clamp(),r}return Object(h.a)(n,[{key:"resize",value:function(){this.clamp()}},{key:"clamp",value:function(){if(!this.paused)if(this.options.minWidth||this.options.minHeight||this.options.maxWidth||this.options.maxHeight){var t=this.parent.worldScreenWidth,e=this.parent.worldScreenHeight;if(null!==this.options.minWidth&&tthis.options.maxWidth){var r=this.parent.scale.x;this.parent.fitWidth(this.options.maxWidth,!1,!1,!0),this.parent.scale.y*=this.parent.scale.x/r,t=this.parent.worldScreenWidth,e=this.parent.worldScreenHeight,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}if(null!==this.options.minHeight&&ethis.options.maxHeight){var o=this.parent.scale.y;this.parent.fitHeight(this.options.maxHeight,!1,!1,!0),this.parent.scale.x*=this.parent.scale.y/o,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}}else{var a=this.parent.scale.x;null!==this.options.minScale&&athis.options.maxScale&&(a=this.options.maxScale),a!==this.parent.scale.x&&(this.parent.scale.set(a),this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"}))}}},{key:"reset",value:function(){this.clamp()}}]),n}(v),S={friction:.95,bounce:.8,minSpeed:.01},P=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},S,i),r.saved=[],r.reset(),r.parent.on("moved",(function(t){return r.moved(t)})),r}return Object(h.a)(n,[{key:"destroy",value:function(){this.parent}},{key:"down",value:function(){this.saved=[],this.x=this.y=!1}},{key:"isActive",value:function(){return this.x||this.y}},{key:"move",value:function(){if(!this.paused){var t=this.parent.input.count();(1===t||t>1&&!this.parent.plugins.get("pinch",!0))&&(this.saved.push({x:this.parent.x,y:this.parent.y,time:performance.now()}),this.saved.length>60&&this.saved.splice(0,30))}}},{key:"moved",value:function(t){if(this.saved.length){var e=this.saved[this.saved.length-1];"clamp-x"===t.type?e.x===t.original.x&&(e.x=this.parent.x):"clamp-y"===t.type&&e.y===t.original.y&&(e.y=this.parent.y)}}},{key:"up",value:function(){if(0===this.parent.input.count()&&this.saved.length){var t,e=performance.now(),n=Object(l.a)(this.saved);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.time>=e-100){var i=e-r.time;this.x=(this.parent.x-r.x)/i,this.y=(this.parent.y-r.y)/i,this.percentChangeX=this.percentChangeY=this.options.friction;break}}}catch(o){n.e(o)}finally{n.f()}}}},{key:"activate",value:function(t){"undefined"!==typeof(t=t||{}).x&&(this.x=t.x,this.percentChangeX=this.options.friction),"undefined"!==typeof t.y&&(this.y=t.y,this.percentChangeY=this.options.friction)}},{key:"update",value:function(t){var e;this.paused||(this.x&&(this.parent.x+=this.x*t,this.x*=this.percentChangeX,Math.abs(this.x)1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},A,i),r.ease=I(r.options.ease,"easeInOutSine"),r.options.sides&&("all"===r.options.sides?r.top=r.bottom=r.left=r.right=!0:"horizontal"===r.options.sides?r.right=r.left=!0:"vertical"===r.options.sides?r.top=r.bottom=!0:(r.top=-1!==r.options.sides.indexOf("top"),r.bottom=-1!==r.options.sides.indexOf("bottom"),r.left=-1!==r.options.sides.indexOf("left"),r.right=-1!==r.options.sides.indexOf("right"))),r.parseUnderflow(),r.last={},r.reset(),r}return Object(h.a)(n,[{key:"parseUnderflow",value:function(){var t=this.options.underflow.toLowerCase();"center"===t?(this.underflowX=0,this.underflowY=0):(this.underflowX=-1!==t.indexOf("left")?-1:-1!==t.indexOf("right")?1:0,this.underflowY=-1!==t.indexOf("top")?-1:-1!==t.indexOf("bottom")?1:0)}},{key:"isActive",value:function(){return null!==this.toX||null!==this.toY}},{key:"down",value:function(){this.toX=this.toY=null}},{key:"up",value:function(){this.bounce()}},{key:"update",value:function(t){if(!this.paused){if(this.bounce(),this.toX){var e=this.toX;e.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-x"}),e.time>=this.options.time?(this.parent.x=e.end,this.toX=null,this.parent.emit("bounce-x-end",this.parent)):this.parent.x=this.ease(e.time,e.start,e.delta,this.options.time)}if(this.toY){var n=this.toY;n.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-y"}),n.time>=this.options.time?(this.parent.y=n.end,this.toY=null,this.parent.emit("bounce-y-end",this.parent)):this.parent.y=this.ease(n.time,n.start,n.delta,this.options.time)}}}},{key:"calcUnderflowX",value:function(){var t;switch(this.underflowX){case-1:t=0;break;case 1:t=this.parent.screenWidth-this.parent.screenWorldWidth;break;default:t=(this.parent.screenWidth-this.parent.screenWorldWidth)/2}return t}},{key:"calcUnderflowY",value:function(){var t;switch(this.underflowY){case-1:t=0;break;case 1:t=this.parent.screenHeight-this.parent.screenWorldHeight;break;default:t=(this.parent.screenHeight-this.parent.screenWorldHeight)/2}return t}},{key:"oob",value:function(){var t=this.options.bounceBox;if(t){var e="undefined"===typeof t.x?0:t.x,n="undefined"===typeof t.y?0:t.y,r="undefined"===typeof t.width?this.parent.worldWidth:t.width,i="undefined"===typeof t.height?this.parent.worldHeight:t.height;return{left:this.parent.leftr,top:this.parent.topi,topLeft:new f.Point(e*this.parent.scale.x,n*this.parent.scale.y),bottomRight:new f.Point(r*this.parent.scale.x-this.parent.screenWidth,i*this.parent.scale.y-this.parent.screenHeight)}}return{left:this.parent.left<0,right:this.parent.right>this.parent.worldWidth,top:this.parent.top<0,bottom:this.parent.bottom>this.parent.worldHeight,topLeft:new f.Point(0,0),bottomRight:new f.Point(this.parent.worldWidth*this.parent.scale.x-this.parent.screenWidth,this.parent.worldHeight*this.parent.scale.y-this.parent.screenHeight)}}},{key:"bounce",value:function(){if(!this.paused){var t,e=this.parent.plugins.get("decelerate",!0);e&&(e.x||e.y)&&(e.x&&e.percentChangeX===e.options.friction||e.y&&e.percentChangeY===e.options.friction)&&(((t=this.oob()).left&&this.left||t.right&&this.right)&&(e.percentChangeX=this.options.friction),(t.top&&this.top||t.bottom&&this.bottom)&&(e.percentChangeY=this.options.friction));var n=this.parent.plugins.get("drag",!0)||{},r=this.parent.plugins.get("pinch",!0)||{};if(e=e||{},!n.active&&!r.active&&(!this.toX||!this.toY)&&(!e.x||!e.y)){var i=(t=t||this.oob()).topLeft,o=t.bottomRight;if(!this.toX&&!e.x){var a=null;t.left&&this.left?a=this.parent.screenWorldWidth3&&void 0!==arguments[3]?arguments[3]:{};return Object(c.a)(this,n),(o=e.call(this,t)).options=Object.assign({},M,a),o.ease=I(a.ease,"easeInOutSine"),o.x=r,o.y=i,o.options.forceStart&&o.snapStart(),o}return Object(h.a)(n,[{key:"snapStart",value:function(){this.percent=0,this.snapping={time:0};var t=this.options.topLeft?this.parent.corner:this.parent.center;this.deltaX=this.x-t.x,this.deltaY=this.y-t.y,this.startX=t.x,this.startY=t.y,this.parent.emit("snap-start",this.parent)}},{key:"wheel",value:function(){this.options.removeOnInterrupt&&this.parent.plugins.remove("snap")}},{key:"down",value:function(){this.options.removeOnInterrupt?this.parent.plugins.remove("snap"):this.options.interrupt&&(this.snapping=null)}},{key:"up",value:function(){if(0===this.parent.input.count()){var t=this.parent.plugins.get("decelerate",!0);t&&(t.x||t.y)&&(t.percentChangeX=t.percentChangeY=this.options.friction)}}},{key:"update",value:function(t){if(!this.paused&&(!this.options.interrupt||0===this.parent.input.count()))if(this.snapping){var e,n,r,i=this.snapping;if(i.time+=t,i.time>this.options.time)e=!0,n=this.startX+this.deltaX,r=this.startY+this.deltaY;else{var o=this.ease(i.time,0,1,this.options.time);n=this.startX+this.deltaX*o,r=this.startY+this.deltaY*o}this.options.topLeft?this.parent.moveCorner(n,r):this.parent.moveCenter(n,r),this.parent.emit("moved",{viewport:this.parent,type:"snap"}),e&&(this.options.removeOnComplete&&this.parent.plugins.remove("snap"),this.parent.emit("snap-end",this.parent),this.snapping=null)}else{var a=this.options.topLeft?this.parent.corner:this.parent.center;a.x===this.x&&a.y===this.y||this.snapStart()}}}]),n}(v),D={width:0,height:0,time:1e3,ease:"easeInOutSine",center:null,interrupt:!0,removeOnComplete:!1,removeOnInterrupts:!1,forceStart:!1,noMove:!1},N=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},D,i),r.ease=I(r.options.ease),r.options.width>0&&(r.xScale=t.screenWidth/r.options.width),r.options.height>0&&(r.yScale=t.screenHeight/r.options.height),r.xIndependent=!!r.xScale,r.yIndependent=!!r.yScale,r.xScale=r.xIndependent?r.xScale:r.yScale,r.yScale=r.yIndependent?r.yScale:r.xScale,0===r.options.time?(t.container.scale.x=r.xScale,t.container.scale.y=r.yScale,r.options.removeOnComplete&&r.parent.plugins.remove("snap-zoom")):i.forceStart&&r.createSnapping(),r}return Object(h.a)(n,[{key:"createSnapping",value:function(){this.parent.scale;var t=this.parent.worldScreenWidth,e=this.parent.worldScreenHeight,n=this.parent.screenWidth/this.xScale,r=this.parent.screenHeight/this.yScale;this.snapping={time:0,startX:t,startY:e,deltaX:n-t,deltaY:r-e},this.parent.emit("snap-zoom-start",this.parent)}},{key:"resize",value:function(){this.snapping=null,this.options.width>0&&(this.xScale=this.parent.screenWidth/this.options.width),this.options.height>0&&(this.yScale=this.parent.screenHeight/this.options.height),this.xScale=this.xIndependent?this.xScale:this.yScale,this.yScale=this.yIndependent?this.yScale:this.xScale}},{key:"wheel",value:function(){this.options.removeOnInterrupt&&this.parent.plugins.remove("snap-zoom")}},{key:"down",value:function(){this.options.removeOnInterrupt?this.parent.plugins.remove("snap-zoom"):this.options.interrupt&&(this.snapping=null)}},{key:"update",value:function(t){var e;if(!this.paused&&(!this.options.interrupt||0===this.parent.input.count()))if(this.options.center||this.options.noMove||(e=this.parent.center),this.snapping){if(this.snapping){var n=this.snapping;if(n.time+=t,n.time>=this.options.time)this.parent.scale.set(this.xScale,this.yScale),this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom"),this.parent.emit("snap-zoom-end",this.parent),this.snapping=null;else{var r=this.snapping,i=this.ease(r.time,r.startX,r.deltaX,this.options.time),o=this.ease(r.time,r.startY,r.deltaY,this.options.time);this.parent.scale.x=this.parent.screenWidth/i,this.parent.scale.y=this.parent.screenHeight/o}var a=this.parent.plugins.get("clamp-zoom",!0);a&&a.clamp(),this.options.noMove||(this.options.center?this.parent.moveCenter(this.options.center):this.parent.moveCenter(e))}}else this.parent.scale.x===this.xScale&&this.parent.scale.y===this.yScale||this.createSnapping()}},{key:"resume",value:function(){this.snapping=null,Object(o.a)(Object(a.a)(n.prototype),"resume",this).call(this)}}]),n}(v),L={speed:0,acceleration:null,radius:null},F=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(c.a)(this,n),(i=e.call(this,t)).target=r,i.options=Object.assign({},L,o),i.velocity={x:0,y:0},i}return Object(h.a)(n,[{key:"update",value:function(t){if(!this.paused){var e=this.parent.center,n=this.target.x,r=this.target.y;if(this.options.radius){if(!(Math.sqrt(Math.pow(this.target.y-e.y,2)+Math.pow(this.target.x-e.x,2))>this.options.radius))return;var i=Math.atan2(this.target.y-e.y,this.target.x-e.x);n=this.target.x-Math.cos(i)*this.options.radius,r=this.target.y-Math.sin(i)*this.options.radius}var o=n-e.x,a=r-e.y;if(o||a)if(this.options.speed)if(this.options.acceleration){var s=Math.atan2(r-e.y,n-e.x),u=Math.sqrt(Math.pow(o,2)+Math.pow(a,2));if(u){var l=(Math.pow(this.velocity.x,2)+Math.pow(this.velocity.y,2))/(2*this.options.acceleration);this.velocity=u>l?{x:Math.min(this.velocity.x+this.options.acceleration*t,this.options.speed),y:Math.min(this.velocity.y+this.options.acceleration*t,this.options.speed)}:{x:Math.max(this.velocity.x-this.options.acceleration*this.options.speed,0),y:Math.max(this.velocity.y-this.options.acceleration*this.options.speed,0)};var c=Math.cos(s)*this.velocity.x,h=Math.sin(s)*this.velocity.y,f=Math.abs(c)>Math.abs(o)?n:e.x+c,p=Math.abs(h)>Math.abs(a)?r:e.y+h;this.parent.moveCenter(f,p),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}}else{var d=Math.atan2(r-e.y,n-e.x),m=Math.cos(d)*this.options.speed,v=Math.sin(d)*this.options.speed,y=Math.abs(m)>Math.abs(o)?n:e.x+m,g=Math.abs(v)>Math.abs(a)?r:e.y+v;this.parent.moveCenter(y,g),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}else this.parent.moveCenter(n,r),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}}}]),n}(v),U={percent:.1,smooth:!1,interrupt:!0,reverse:!1,center:null,lineHeight:20},j=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},U,i),r}return Object(h.a)(n,[{key:"down",value:function(){this.options.interrupt&&(this.smoothing=null)}},{key:"update",value:function(){if(this.smoothing){var t,e=this.smoothingCenter,n=this.smoothing;this.options.center||(t=this.parent.toLocal(e)),this.parent.scale.x+=n.x,this.parent.scale.y+=n.y,this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});var r=this.parent.plugins.get("clamp-zoom",!0);if(r&&r.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{var i=this.parent.toGlobal(t);this.parent.x+=e.x-i.x,this.parent.y+=e.y-i.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.smoothingCount++,this.smoothingCount>=this.options.smooth&&(this.smoothing=null)}}},{key:"wheel",value:function(t){if(!this.paused){var e=this.parent.input.getPointerPosition(t),n=(this.options.reverse?-1:1)*-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/500,r=Math.pow(2,(1+this.options.percent)*n);if(this.options.smooth){var i={x:this.smoothing?this.smoothing.x*(this.options.smooth-this.smoothingCount):0,y:this.smoothing?this.smoothing.y*(this.options.smooth-this.smoothingCount):0};this.smoothing={x:((this.parent.scale.x+i.x)*r-this.parent.scale.x)/this.options.smooth,y:((this.parent.scale.y+i.y)*r-this.parent.scale.y)/this.options.smooth},this.smoothingCount=0,this.smoothingCenter=e}else{var o;this.options.center||(o=this.parent.toLocal(e)),this.parent.scale.x*=r,this.parent.scale.y*=r,this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});var a=this.parent.plugins.get("clamp-zoom",!0);if(a&&a.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{var s=this.parent.toGlobal(o);this.parent.x+=e.x-s.x,this.parent.y+=e.y-s.y}}return this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel",{wheel:{dx:t.deltaX,dy:t.deltaY,dz:t.deltaZ},event:t,viewport:this.parent}),!this.parent.options.passiveWheel||void 0}}}]),n}(v),B={radius:null,distance:null,top:null,bottom:null,left:null,right:null,speed:8,reverse:!1,noDecelerate:!1,linear:!1,allowButtons:!1},z=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},B,i),r.reverse=r.options.reverse?1:-1,r.radiusSquared=Math.pow(r.options.radius,2),r.resize(),r}return Object(h.a)(n,[{key:"resize",value:function(){var t=this.options.distance;null!==t?(this.left=t,this.top=t,this.right=this.parent.worldScreenWidth-t,this.bottom=this.parent.worldScreenHeight-t):this.radius||(this.left=this.options.left,this.top=this.options.top,this.right=null===this.options.right?null:this.parent.worldScreenWidth-this.options.right,this.bottom=null===this.options.bottom?null:this.parent.worldScreenHeight-this.options.bottom)}},{key:"down",value:function(){this.paused||this.options.allowButtons||(this.horizontal=this.vertical=null)}},{key:"move",value:function(t){if(!this.paused&&!("mouse"!==t.data.pointerType&&1!==t.data.identifier||!this.options.allowButtons&&0!==t.data.buttons)){var e=t.data.global.x,n=t.data.global.y;if(this.radiusSquared){var r=this.parent.toScreen(this.parent.center);if(Math.pow(r.x-e,2)+Math.pow(r.y-n,2)>=this.radiusSquared){var i=Math.atan2(r.y-n,r.x-e);this.options.linear?(this.horizontal=Math.round(Math.cos(i))*this.options.speed*this.reverse*.06,this.vertical=Math.round(Math.sin(i))*this.options.speed*this.reverse*.06):(this.horizontal=Math.cos(i)*this.options.speed*this.reverse*.06,this.vertical=Math.sin(i)*this.options.speed*this.reverse*.06)}else this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=0}else null!==this.left&&ethis.right?this.horizontal=-1*this.reverse*this.options.speed*.06:(this.decelerateHorizontal(),this.horizontal=0),null!==this.top&&nthis.bottom?this.vertical=-1*this.reverse*this.options.speed*.06:(this.decelerateVertical(),this.vertical=0)}}},{key:"decelerateHorizontal",value:function(){var t=this.parent.plugins.get("decelerate",!0);this.horizontal&&t&&!this.options.noDecelerate&&t.activate({x:this.horizontal*this.options.speed*this.reverse/(1e3/60)})}},{key:"decelerateVertical",value:function(){var t=this.parent.plugins.get("decelerate",!0);this.vertical&&t&&!this.options.noDecelerate&&t.activate({y:this.vertical*this.options.speed*this.reverse/(1e3/60)})}},{key:"up",value:function(){this.paused||(this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=null)}},{key:"update",value:function(){if(!this.paused&&(this.horizontal||this.vertical)){var t=this.parent.center;this.horizontal&&(t.x+=this.horizontal*this.options.speed),this.vertical&&(t.y+=this.vertical*this.options.speed),this.parent.moveCenter(t),this.parent.emit("moved",{viewport:this.parent,type:"mouse-edges"})}}}]),n}(v),H={removeOnInterrupt:!1,ease:"linear",time:1e3},X=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},H,i),r.options.ease=I(r.options.ease),r.setupPosition(),r.setupZoom(),r}return Object(h.a)(n,[{key:"setupPosition",value:function(){"undefined"!==typeof this.options.position?(this.startX=this.parent.center.x,this.startY=this.parent.center.y,this.deltaX=this.options.position.x-this.parent.center.x,this.deltaY=this.options.position.y-this.parent.center.y,this.keepCenter=!1):this.keepCenter=!0}},{key:"setupZoom",value:function(){this.width=null,this.height=null,"undefined"!==typeof this.options.scale?this.width=this.parent.screenWidth/this.options.scale:"undefined"!==typeof this.options.scaleX||"undefined"!==typeof this.options.scaleY?("undefined"!==typeof this.options.scaleX&&(this.width=this.parent.screenWidth/this.options.scaleX),"undefined"!==typeof this.options.scaleY&&(this.height=this.parent.screenHeight/this.options.scaleY)):("undefined"!==typeof this.options.width&&(this.width=this.options.width),"undefined"!==typeof this.options.height&&(this.height=this.options.height)),null!==typeof this.width&&(this.startWidth=this.parent.screenWidthInWorldPixels,this.deltaWidth=this.width-this.startWidth),null!==typeof this.height&&(this.startHeight=this.parent.screenHeightInWorldPixels,this.deltaHeight=this.height-this.startHeight),this.time=0}},{key:"down",value:function(){this.options.removeOnInterrupt&&this.parent.plugins.remove("animate")}},{key:"complete",value:function(){this.parent.plugins.remove("animate"),null!==this.width&&this.parent.fitWidth(this.width,this.keepCenter,null===this.height),null!==this.height&&this.parent.fitHeight(this.height,this.keepCenter,null===this.width),this.keepCenter||this.parent.moveCenter(this.options.position.x,this.options.position.y),this.parent.emit("animate-end",this.parent),this.options.callbackOnComplete&&this.options.callbackOnComplete(this.parent)}},{key:"update",value:function(t){if(!this.paused)if(this.time+=t,this.time>=this.options.time)this.complete();else{var e=new f.Point(this.parent.scale.x,this.parent.scale.y),n=this.options.ease(this.time,0,1,this.options.time);if(null!==this.width&&this.parent.fitWidth(this.startWidth+this.deltaWidth*n,this.keepCenter,null===this.height),null!==this.height&&this.parent.fitHeight(this.startHeight+this.deltaHeight*n,this.keepCenter,null===this.width),null===this.width?this.parent.scale.x=this.parent.scale.y:null===this.height&&(this.parent.scale.y=this.parent.scale.x),!this.keepCenter){var r=new f.Point(this.parent.x,this.parent.y);this.parent.moveCenter(this.startX+this.deltaX*n,this.startY+this.deltaY*n),this.parent.emit("moved",{viewport:this.parent,original:r,type:"animate"})}(this.width||this.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:e,type:"animate"}),this.keepCenter}}}]),n}(v),W={screenWidth:window.innerWidth,screenHeight:window.innerHeight,worldWidth:null,worldHeight:null,threshold:5,passiveWheel:!0,stopPropagation:!1,forceHitArea:null,noTicker:!1,interaction:null,disableOnContextMenu:!1},G=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Object(c.a)(this,n),(t=e.call(this)).options=Object.assign({},W,i),i.ticker)t.options.ticker=i.ticker;else{var o,a=f;o=parseInt(/^(\d+)\./.exec(f.VERSION)[1])<5?a.ticker.shared:a.Ticker.shared,t.options.ticker=i.ticker||o}return t.screenWidth=t.options.screenWidth,t.screenHeight=t.options.screenHeight,t._worldWidth=t.options.worldWidth,t._worldHeight=t.options.worldHeight,t.forceHitArea=t.options.forceHitArea,t.threshold=t.options.threshold,t.options.divWheel=t.options.divWheel||document.body,t.options.disableOnContextMenu&&(t.options.divWheel.oncontextmenu=function(t){return t.preventDefault()}),t.options.noTicker||(t.tickerFunction=function(){return t.update(t.options.ticker.elapsedMS)},t.options.ticker.add(t.tickerFunction)),t.input=new p(Object(r.a)(t)),t.plugins=new m(Object(r.a)(t)),t}return Object(h.a)(n,[{key:"destroy",value:function(t){this.options.noTicker||this.options.ticker.remove(this.tickerFunction),this.input.destroy(),Object(o.a)(Object(a.a)(n.prototype),"destroy",this).call(this,t)}},{key:"update",value:function(t){this.pause||(this.plugins.update(t),this.lastViewport&&(this.lastViewport.x!==this.x||this.lastViewport.y!==this.y?this.moving=!0:this.moving&&(this.emit("moved-end",this),this.moving=!1),this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y?this.zooming=!0:this.zooming&&(this.emit("zoomed-end",this),this.zooming=!1)),this.forceHitArea||(this._hitAreaDefault=new f.Rectangle(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight),this.hitArea=this._hitAreaDefault),this._dirty=this._dirty||!this.lastViewport||this.lastViewport.x!==this.x||this.lastViewport.y!==this.y||this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y,this.lastViewport={x:this.x,y:this.y,scaleX:this.scale.x,scaleY:this.scale.y},this.emit("frame-end",this))}},{key:"resize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.innerWidth,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.innerHeight,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;this.screenWidth=t,this.screenHeight=e,"undefined"!==typeof n&&(this._worldWidth=n),"undefined"!==typeof r&&(this._worldHeight=r),this.plugins.resize(),this.dirty=!0}},{key:"getVisibleBounds",value:function(){return new f.Rectangle(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight)}},{key:"toWorld",value:function(t,e){return 2===arguments.length?this.toLocal(new f.Point(t,e)):this.toLocal(t)}},{key:"toScreen",value:function(t,e){return 2===arguments.length?this.toGlobal(new f.Point(t,e)):this.toGlobal(t)}},{key:"moveCenter",value:function(){var t,e;return isNaN(arguments[0])?(t=arguments[0].x,e=arguments[0].y):(t=arguments[0],e=arguments[1]),this.position.set((this.worldScreenWidth/2-t)*this.scale.x,(this.worldScreenHeight/2-e)*this.scale.y),this.plugins.reset(),this.dirty=!0,this}},{key:"moveCorner",value:function(t,e){return 1===arguments.length?this.position.set(-t.x*this.scale.x,-t.y*this.scale.y):this.position.set(-t*this.scale.x,-e*this.scale.y),this.plugins.reset(),this}},{key:"findFitWidth",value:function(t){return this.screenWidth/t}},{key:"findFitHeight",value:function(t){return this.screenHeight/t}},{key:"findFit",value:function(t,e){var n=this.screenWidth/t,r=this.screenHeight/e;return Math.min(n,r)}},{key:"findCover",value:function(t,e){var n=this.screenWidth/t,r=this.screenHeight/e;return Math.max(n,r)}},{key:"fitWidth",value:function(t,e){var n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;e&&(n=this.center),this.scale.x=this.screenWidth/t,r&&(this.scale.y=this.scale.x);var o=this.plugins.get("clamp-zoom",!0);return!i&&o&&o.clamp(),e&&this.moveCenter(n),this}},{key:"fitHeight",value:function(t,e){var n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;e&&(n=this.center),this.scale.y=this.screenHeight/t,r&&(this.scale.x=this.scale.y);var o=this.plugins.get("clamp-zoom",!0);return!i&&o&&o.clamp(),e&&this.moveCenter(n),this}},{key:"fitWorld",value:function(t){var e;t&&(e=this.center),this.scale.x=this.screenWidth/this.worldWidth,this.scale.y=this.screenHeight/this.worldHeight,this.scale.x1&&void 0!==arguments[1]?arguments[1]:this.worldWidth,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.worldHeight;t&&(e=this.center),this.scale.x=this.screenWidth/n,this.scale.y=this.screenHeight/r,this.scale.xthis.worldWidth,top:this.top<0,bottom:this.bottom>this._worldHeight,cornerPoint:new f.Point(this.worldWidth*this.scale.x-this.screenWidth,this.worldHeight*this.scale.y-this.screenHeight)}}},{key:"drag",value:function(t){return this.plugins.add("drag",new g(this,t)),this}},{key:"clamp",value:function(t){return this.plugins.add("clamp",new w(this,t)),this}},{key:"decelerate",value:function(t){return this.plugins.add("decelerate",new P(this,t)),this}},{key:"bounce",value:function(t){return this.plugins.add("bounce",new k(this,t)),this}},{key:"pinch",value:function(t){return this.plugins.add("pinch",new b(this,t)),this}},{key:"snap",value:function(t,e,n){return this.plugins.add("snap",new R(this,t,e,n)),this}},{key:"follow",value:function(t,e){return this.plugins.add("follow",new F(this,t,e)),this}},{key:"wheel",value:function(t){return this.plugins.add("wheel",new j(this,t)),this}},{key:"animate",value:function(t){return this.plugins.add("animate",new X(this,t)),this}},{key:"clampZoom",value:function(t){return this.plugins.add("clamp-zoom",new E(this,t)),this}},{key:"mouseEdges",value:function(t){return this.plugins.add("mouse-edges",new z(this,t)),this}},{key:"ensureVisible",value:function(t,e,n,r,i){i&&(n>this.worldScreenWidth||r>this.worldScreenHeight)&&(this.fit(!0,n,r),this.emit("zoomed",{viewport:this,type:"ensureVisible"}));var o=!1;tthis.right&&(this.right=t+n,o=!0),ethis.bottom&&(this.bottom=e+r,o=!0),o&&this.emit("moved",{viewport:this,type:"ensureVisible"})}},{key:"worldWidth",get:function(){return this._worldWidth?this._worldWidth:this.width/this.scale.x},set:function(t){this._worldWidth=t,this.plugins.resize()}},{key:"worldHeight",get:function(){return this._worldHeight?this._worldHeight:this.height/this.scale.y},set:function(t){this._worldHeight=t,this.plugins.resize()}},{key:"worldScreenWidth",get:function(){return this.screenWidth/this.scale.x}},{key:"worldScreenHeight",get:function(){return this.screenHeight/this.scale.y}},{key:"screenWorldWidth",get:function(){return this.worldWidth*this.scale.x}},{key:"screenWorldHeight",get:function(){return this.worldHeight*this.scale.y}},{key:"center",get:function(){return new f.Point(this.worldScreenWidth/2-this.x/this.scale.x,this.worldScreenHeight/2-this.y/this.scale.y)},set:function(t){this.moveCenter(t)}},{key:"corner",get:function(){return new f.Point(-this.x/this.scale.x,-this.y/this.scale.y)},set:function(t){this.moveCorner(t)}},{key:"screenWidthInWorldPixels",get:function(){return this.screenWidth/this.scale.x}},{key:"screenHeightInWorldPixels",get:function(){return this.screenHeight/this.scale.y}},{key:"visible",set:function(t){t||this.input.clear(),Object(i.a)(Object(a.a)(n.prototype),"visible",t,this,!0)}},{key:"scaled",set:function(t){this.setZoom(t,!0)},get:function(){return this.scale.x}},{key:"right",get:function(){return-this.x/this.scale.x+this.worldScreenWidth},set:function(t){this.x=-t*this.scale.x+this.screenWidth,this.plugins.reset()}},{key:"left",get:function(){return-this.x/this.scale.x},set:function(t){this.x=-t*this.scale.x,this.plugins.reset()}},{key:"top",get:function(){return-this.y/this.scale.y},set:function(t){this.y=-t*this.scale.y,this.plugins.reset()}},{key:"bottom",get:function(){return-this.y/this.scale.y+this.worldScreenHeight},set:function(t){this.y=-t*this.scale.y+this.screenHeight,this.plugins.reset()}},{key:"dirty",get:function(){return this._dirty},set:function(t){this._dirty=t}},{key:"forceHitArea",get:function(){return this._forceHitArea},set:function(t){t?(this._forceHitArea=t,this.hitArea=t):(this._forceHitArea=null,this.hitArea=new f.Rectangle(0,0,this.worldWidth,this.worldHeight))}},{key:"pause",get:function(){return this._pause},set:function(t){this._pause=t,this.lastViewport=null,this.moving=!1,this.zooming=!1,t&&this.input.pause()}}]),n}(f.Container)}).call(this,n(12))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(26),i=n(24);function o(t,e,n,a){return(o="undefined"!==typeof Reflect&&Reflect.set?Reflect.set:function(t,e,n,o){var a,s=Object(r.a)(t,e);if(s){if((a=Object.getOwnPropertyDescriptor(s,e)).set)return a.set.call(o,n),!0;if(!a.writable)return!1}if(a=Object.getOwnPropertyDescriptor(o,e)){if(!a.writable)return!1;a.value=n,Object.defineProperty(o,e,a)}else Object(i.a)(o,e,n);return!0})(t,e,n,a)}function a(t,e,n,r,i){if(!o(t,e,n,r||t)&&i)throw new Error("failed to set property");return n}},function(t,e,n){"use strict";(function(t){var n=function(){if("undefined"!==typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n0},t.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;a.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),l=function(t,e){for(var n=0,r=Object.keys(e);n0},t}(),x="undefined"!==typeof WeakMap?new WeakMap:new n,w=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),r=new b(e,n,this);x.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){w.prototype[t]=function(){var e;return(e=x.get(this))[t].apply(e,arguments)}}));var T="undefined"!==typeof i.ResizeObserver?i.ResizeObserver:w;e.a=T}).call(this,n(12))},function(t,e,n){var r=n(30),i=n(28);t.exports=function(t,e,n){var o=!0,a=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return i(n)&&(o="leading"in n?!!n.leading:o,a="trailing"in n?!!n.trailing:a),r(t,e,{leading:o,maxWait:e,trailing:a})}},,,function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";var r=n(1),i=60103;if(e.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),e.Fragment=o("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function l(t,e,n){var r,o={},l=null,c=null;for(r in void 0!==n&&(l=""+n),void 0!==e.key&&(l=""+e.key),void 0!==e.ref&&(c=e.ref),e)s.call(e,r)&&!u.hasOwnProperty(r)&&(o[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps)void 0===o[r]&&(o[r]=e[r]);return{$$typeof:i,type:t,key:l,ref:c,props:o,_owner:a.current}}e.jsx=l,e.jsxs=l},function(t,e,n){"use strict";var r=n(21),i="function"===typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,l=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,h=i?Symbol.for("react.context"):60110,f=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,d=i?Symbol.for("react.memo"):60115,m=i?Symbol.for("react.lazy"):60116,v="function"===typeof Symbol&&Symbol.iterator;function y(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;nA.length&&A.push(t)}function R(t,e,n,r){var i=typeof t;"undefined"!==i&&"boolean"!==i||(t=null);var s=!1;if(null===t)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case o:case a:s=!0}}if(s)return n(r,t,""===e?"."+N(t,0):e),1;if(s=0,e=""===e?".":e+":",Array.isArray(t))for(var u=0;u

(pos: IPointData, newPos?: P): P\n {\n newPos = (newPos || new Point()) as P;\n\n const x = pos.x;\n const y = pos.y;\n\n newPos.x = (this.a * x) + (this.c * y) + this.tx;\n newPos.y = (this.b * x) + (this.d * y) + this.ty;\n\n return newPos;\n }\n\n /**\n * Get a new position with the inverse of the current transformation applied.\n * Can be used to go from the world coordinate space to a child's coordinate space. (e.g. input)\n *\n * @param {PIXI.IPointData} pos - The origin\n * @param {PIXI.Point} [newPos] - The point that the new position is assigned to (allowed to be same as input)\n * @return {PIXI.Point} The new point, inverse-transformed through this matrix\n */\n applyInverse

(pos: IPointData, newPos?: P): P\n {\n newPos = (newPos || new Point()) as P;\n\n const id = 1 / ((this.a * this.d) + (this.c * -this.b));\n\n const x = pos.x;\n const y = pos.y;\n\n newPos.x = (this.d * id * x) + (-this.c * id * y) + (((this.ty * this.c) - (this.tx * this.d)) * id);\n newPos.y = (this.a * id * y) + (-this.b * id * x) + (((-this.ty * this.a) + (this.tx * this.b)) * id);\n\n return newPos;\n }\n\n /**\n * Translates the matrix on the x and y.\n *\n * @param {number} x - How much to translate x by\n * @param {number} y - How much to translate y by\n * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n */\n translate(x: number, y: number): this\n {\n this.tx += x;\n this.ty += y;\n\n return this;\n }\n\n /**\n * Applies a scale transformation to the matrix.\n *\n * @param {number} x - The amount to scale horizontally\n * @param {number} y - The amount to scale vertically\n * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n */\n scale(x: number, y: number): this\n {\n this.a *= x;\n this.d *= y;\n this.c *= x;\n this.b *= y;\n this.tx *= x;\n this.ty *= y;\n\n return this;\n }\n\n /**\n * Applies a rotation transformation to the matrix.\n *\n * @param {number} angle - The angle in radians.\n * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n */\n rotate(angle: number): this\n {\n const cos = Math.cos(angle);\n const sin = Math.sin(angle);\n\n const a1 = this.a;\n const c1 = this.c;\n const tx1 = this.tx;\n\n this.a = (a1 * cos) - (this.b * sin);\n this.b = (a1 * sin) + (this.b * cos);\n this.c = (c1 * cos) - (this.d * sin);\n this.d = (c1 * sin) + (this.d * cos);\n this.tx = (tx1 * cos) - (this.ty * sin);\n this.ty = (tx1 * sin) + (this.ty * cos);\n\n return this;\n }\n\n /**\n * Appends the given Matrix to this Matrix.\n *\n * @param {PIXI.Matrix} matrix - The matrix to append.\n * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n */\n append(matrix: Matrix): this\n {\n const a1 = this.a;\n const b1 = this.b;\n const c1 = this.c;\n const d1 = this.d;\n\n this.a = (matrix.a * a1) + (matrix.b * c1);\n this.b = (matrix.a * b1) + (matrix.b * d1);\n this.c = (matrix.c * a1) + (matrix.d * c1);\n this.d = (matrix.c * b1) + (matrix.d * d1);\n\n this.tx = (matrix.tx * a1) + (matrix.ty * c1) + this.tx;\n this.ty = (matrix.tx * b1) + (matrix.ty * d1) + this.ty;\n\n return this;\n }\n\n /**\n * Sets the matrix based on all the available properties\n *\n * @param {number} x - Position on the x axis\n * @param {number} y - Position on the y axis\n * @param {number} pivotX - Pivot on the x axis\n * @param {number} pivotY - Pivot on the y axis\n * @param {number} scaleX - Scale on the x axis\n * @param {number} scaleY - Scale on the y axis\n * @param {number} rotation - Rotation in radians\n * @param {number} skewX - Skew on the x axis\n * @param {number} skewY - Skew on the y axis\n * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n */\n setTransform(x: number, y: number, pivotX: number, pivotY: number, scaleX: number,\n scaleY: number, rotation: number, skewX: number, skewY: number): this\n {\n this.a = Math.cos(rotation + skewY) * scaleX;\n this.b = Math.sin(rotation + skewY) * scaleX;\n this.c = -Math.sin(rotation - skewX) * scaleY;\n this.d = Math.cos(rotation - skewX) * scaleY;\n\n this.tx = x - ((pivotX * this.a) + (pivotY * this.c));\n this.ty = y - ((pivotX * this.b) + (pivotY * this.d));\n\n return this;\n }\n\n /**\n * Prepends the given Matrix to this Matrix.\n *\n * @param {PIXI.Matrix} matrix - The matrix to prepend\n * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n */\n prepend(matrix: Matrix): this\n {\n const tx1 = this.tx;\n\n if (matrix.a !== 1 || matrix.b !== 0 || matrix.c !== 0 || matrix.d !== 1)\n {\n const a1 = this.a;\n const c1 = this.c;\n\n this.a = (a1 * matrix.a) + (this.b * matrix.c);\n this.b = (a1 * matrix.b) + (this.b * matrix.d);\n this.c = (c1 * matrix.a) + (this.d * matrix.c);\n this.d = (c1 * matrix.b) + (this.d * matrix.d);\n }\n\n this.tx = (tx1 * matrix.a) + (this.ty * matrix.c) + matrix.tx;\n this.ty = (tx1 * matrix.b) + (this.ty * matrix.d) + matrix.ty;\n\n return this;\n }\n\n /**\n * Decomposes the matrix (x, y, scaleX, scaleY, and rotation) and sets the properties on to a transform.\n *\n * @param {PIXI.Transform} transform - The transform to apply the properties to.\n * @return {PIXI.Transform} The transform with the newly applied properties\n */\n decompose(transform: Transform): Transform\n {\n // sort out rotation / skew..\n const a = this.a;\n const b = this.b;\n const c = this.c;\n const d = this.d;\n\n const skewX = -Math.atan2(-c, d);\n const skewY = Math.atan2(b, a);\n\n const delta = Math.abs(skewX + skewY);\n\n if (delta < 0.00001 || Math.abs(PI_2 - delta) < 0.00001)\n {\n transform.rotation = skewY;\n transform.skew.x = transform.skew.y = 0;\n }\n else\n {\n transform.rotation = 0;\n transform.skew.x = skewX;\n transform.skew.y = skewY;\n }\n\n // next set scale\n transform.scale.x = Math.sqrt((a * a) + (b * b));\n transform.scale.y = Math.sqrt((c * c) + (d * d));\n\n // next set position\n transform.position.x = this.tx;\n transform.position.y = this.ty;\n\n return transform;\n }\n\n /**\n * Inverts this matrix\n *\n * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n */\n invert(): this\n {\n const a1 = this.a;\n const b1 = this.b;\n const c1 = this.c;\n const d1 = this.d;\n const tx1 = this.tx;\n const n = (a1 * d1) - (b1 * c1);\n\n this.a = d1 / n;\n this.b = -b1 / n;\n this.c = -c1 / n;\n this.d = a1 / n;\n this.tx = ((c1 * this.ty) - (d1 * tx1)) / n;\n this.ty = -((a1 * this.ty) - (b1 * tx1)) / n;\n\n return this;\n }\n\n /**\n * Resets this Matrix to an identity (default) matrix.\n *\n * @return {PIXI.Matrix} This matrix. Good for chaining method calls.\n */\n identity(): this\n {\n this.a = 1;\n this.b = 0;\n this.c = 0;\n this.d = 1;\n this.tx = 0;\n this.ty = 0;\n\n return this;\n }\n\n /**\n * Creates a new Matrix object with the same values as this one.\n *\n * @return {PIXI.Matrix} A copy of this matrix. Good for chaining method calls.\n */\n clone(): Matrix\n {\n const matrix = new Matrix();\n\n matrix.a = this.a;\n matrix.b = this.b;\n matrix.c = this.c;\n matrix.d = this.d;\n matrix.tx = this.tx;\n matrix.ty = this.ty;\n\n return matrix;\n }\n\n /**\n * Changes the values of the given matrix to be the same as the ones in this matrix\n *\n * @param {PIXI.Matrix} matrix - The matrix to copy to.\n * @return {PIXI.Matrix} The matrix given in parameter with its values updated.\n */\n copyTo(matrix: Matrix): Matrix\n {\n matrix.a = this.a;\n matrix.b = this.b;\n matrix.c = this.c;\n matrix.d = this.d;\n matrix.tx = this.tx;\n matrix.ty = this.ty;\n\n return matrix;\n }\n\n /**\n * Changes the values of the matrix to be the same as the ones in given matrix\n *\n * @param {PIXI.Matrix} matrix - The matrix to copy from.\n * @return {PIXI.Matrix} this\n */\n copyFrom(matrix: Matrix): this\n {\n this.a = matrix.a;\n this.b = matrix.b;\n this.c = matrix.c;\n this.d = matrix.d;\n this.tx = matrix.tx;\n this.ty = matrix.ty;\n\n return this;\n }\n\n /**\n * A default (identity) matrix\n *\n * @static\n * @const\n * @member {PIXI.Matrix}\n */\n static get IDENTITY(): Matrix\n {\n return new Matrix();\n }\n\n /**\n * A temp matrix\n *\n * @static\n * @const\n * @member {PIXI.Matrix}\n */\n static get TEMP_MATRIX(): Matrix\n {\n return new Matrix();\n }\n}\n","// Your friendly neighbour https://en.wikipedia.org/wiki/Dihedral_group\n//\n// This file implements the dihedral group of order 16, also called\n// of degree 8. That's why its called groupD8.\n\nimport { Matrix } from './Matrix';\n\n/*\n * Transform matrix for operation n is:\n * | ux | vx |\n * | uy | vy |\n */\n\nconst ux = [1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1];\nconst uy = [0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1];\nconst vx = [0, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1];\nconst vy = [1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1];\n\n/**\n * [Cayley Table]{@link https://en.wikipedia.org/wiki/Cayley_table}\n * for the composition of each rotation in the dihederal group D8.\n *\n * @type number[][]\n * @private\n */\nconst rotationCayley: number[][] = [];\n\n/**\n * Matrices for each `GD8Symmetry` rotation.\n *\n * @type Matrix[]\n * @private\n */\nconst rotationMatrices: Matrix[] = [];\n\n/*\n * Alias for {@code Math.sign}.\n */\nconst signum = Math.sign;\n\n/*\n * Initializes `rotationCayley` and `rotationMatrices`. It is called\n * only once below.\n */\nfunction init(): void\n{\n for (let i = 0; i < 16; i++)\n {\n const row: number[] = [];\n\n rotationCayley.push(row);\n\n for (let j = 0; j < 16; j++)\n {\n /* Multiplies rotation matrices i and j. */\n const _ux = signum((ux[i] * ux[j]) + (vx[i] * uy[j]));\n const _uy = signum((uy[i] * ux[j]) + (vy[i] * uy[j]));\n const _vx = signum((ux[i] * vx[j]) + (vx[i] * vy[j]));\n const _vy = signum((uy[i] * vx[j]) + (vy[i] * vy[j]));\n\n /* Finds rotation matrix matching the product and pushes it. */\n for (let k = 0; k < 16; k++)\n {\n if (ux[k] === _ux && uy[k] === _uy\n && vx[k] === _vx && vy[k] === _vy)\n {\n row.push(k);\n break;\n }\n }\n }\n }\n\n for (let i = 0; i < 16; i++)\n {\n const mat = new Matrix();\n\n mat.set(ux[i], uy[i], vx[i], vy[i], 0, 0);\n rotationMatrices.push(mat);\n }\n}\n\ninit();\n\ntype GD8Symmetry = number;\n/**\n * @memberof PIXI\n * @typedef {number} GD8Symmetry\n * @see PIXI.groupD8\n */\n\n/**\n * Implements the dihedral group D8, which is similar to\n * [group D4]{@link http://mathworld.wolfram.com/DihedralGroupD4.html};\n * D8 is the same but with diagonals, and it is used for texture\n * rotations.\n *\n * The directions the U- and V- axes after rotation\n * of an angle of `a: GD8Constant` are the vectors `(uX(a), uY(a))`\n * and `(vX(a), vY(a))`. These aren't necessarily unit vectors.\n *\n * **Origin:**
\n * This is the small part of gameofbombs.com portal system. It works.\n *\n * @see PIXI.groupD8.E\n * @see PIXI.groupD8.SE\n * @see PIXI.groupD8.S\n * @see PIXI.groupD8.SW\n * @see PIXI.groupD8.W\n * @see PIXI.groupD8.NW\n * @see PIXI.groupD8.N\n * @see PIXI.groupD8.NE\n * @author Ivan @ivanpopelyshev\n * @namespace PIXI.groupD8\n * @memberof PIXI\n */\nexport const groupD8 = {\n /**\n * | Rotation | Direction |\n * |----------|-----------|\n * | 0° | East |\n *\n * @memberof PIXI.groupD8\n * @constant {PIXI.GD8Symmetry}\n */\n E: 0,\n\n /**\n * | Rotation | Direction |\n * |----------|-----------|\n * | 45°↻ | Southeast |\n *\n * @memberof PIXI.groupD8\n * @constant {PIXI.GD8Symmetry}\n */\n SE: 1,\n\n /**\n * | Rotation | Direction |\n * |----------|-----------|\n * | 90°↻ | South |\n *\n * @memberof PIXI.groupD8\n * @constant {PIXI.GD8Symmetry}\n */\n S: 2,\n\n /**\n * | Rotation | Direction |\n * |----------|-----------|\n * | 135°↻ | Southwest |\n *\n * @memberof PIXI.groupD8\n * @constant {PIXI.GD8Symmetry}\n */\n SW: 3,\n\n /**\n * | Rotation | Direction |\n * |----------|-----------|\n * | 180° | West |\n *\n * @memberof PIXI.groupD8\n * @constant {PIXI.GD8Symmetry}\n */\n W: 4,\n\n /**\n * | Rotation | Direction |\n * |-------------|--------------|\n * | -135°/225°↻ | Northwest |\n *\n * @memberof PIXI.groupD8\n * @constant {PIXI.GD8Symmetry}\n */\n NW: 5,\n\n /**\n * | Rotation | Direction |\n * |-------------|--------------|\n * | -90°/270°↻ | North |\n *\n * @memberof PIXI.groupD8\n * @constant {PIXI.GD8Symmetry}\n */\n N: 6,\n\n /**\n * | Rotation | Direction |\n * |-------------|--------------|\n * | -45°/315°↻ | Northeast |\n *\n * @memberof PIXI.groupD8\n * @constant {PIXI.GD8Symmetry}\n */\n NE: 7,\n\n /**\n * Reflection about Y-axis.\n *\n * @memberof PIXI.groupD8\n * @constant {PIXI.GD8Symmetry}\n */\n MIRROR_VERTICAL: 8,\n\n /**\n * Reflection about the main diagonal.\n *\n * @memberof PIXI.groupD8\n * @constant {PIXI.GD8Symmetry}\n */\n MAIN_DIAGONAL: 10,\n\n /**\n * Reflection about X-axis.\n *\n * @memberof PIXI.groupD8\n * @constant {PIXI.GD8Symmetry}\n */\n MIRROR_HORIZONTAL: 12,\n\n /**\n * Reflection about reverse diagonal.\n *\n * @memberof PIXI.groupD8\n * @constant {PIXI.GD8Symmetry}\n */\n REVERSE_DIAGONAL: 14,\n\n /**\n * @memberof PIXI.groupD8\n * @param {PIXI.GD8Symmetry} ind - sprite rotation angle.\n * @return {PIXI.GD8Symmetry} The X-component of the U-axis\n * after rotating the axes.\n */\n uX: (ind: GD8Symmetry): GD8Symmetry => ux[ind],\n\n /**\n * @memberof PIXI.groupD8\n * @param {PIXI.GD8Symmetry} ind - sprite rotation angle.\n * @return {PIXI.GD8Symmetry} The Y-component of the U-axis\n * after rotating the axes.\n */\n uY: (ind: GD8Symmetry): GD8Symmetry => uy[ind],\n\n /**\n * @memberof PIXI.groupD8\n * @param {PIXI.GD8Symmetry} ind - sprite rotation angle.\n * @return {PIXI.GD8Symmetry} The X-component of the V-axis\n * after rotating the axes.\n */\n vX: (ind: GD8Symmetry): GD8Symmetry => vx[ind],\n\n /**\n * @memberof PIXI.groupD8\n * @param {PIXI.GD8Symmetry} ind - sprite rotation angle.\n * @return {PIXI.GD8Symmetry} The Y-component of the V-axis\n * after rotating the axes.\n */\n vY: (ind: GD8Symmetry): GD8Symmetry => vy[ind],\n\n /**\n * @memberof PIXI.groupD8\n * @param {PIXI.GD8Symmetry} rotation - symmetry whose opposite\n * is needed. Only rotations have opposite symmetries while\n * reflections don't.\n * @return {PIXI.GD8Symmetry} The opposite symmetry of `rotation`\n */\n inv: (rotation: GD8Symmetry): GD8Symmetry =>\n {\n if (rotation & 8)// true only if between 8 & 15 (reflections)\n {\n return rotation & 15;// or rotation % 16\n }\n\n return (-rotation) & 7;// or (8 - rotation) % 8\n },\n\n /**\n * Composes the two D8 operations.\n *\n * Taking `^` as reflection:\n *\n * | | E=0 | S=2 | W=4 | N=6 | E^=8 | S^=10 | W^=12 | N^=14 |\n * |-------|-----|-----|-----|-----|------|-------|-------|-------|\n * | E=0 | E | S | W | N | E^ | S^ | W^ | N^ |\n * | S=2 | S | W | N | E | S^ | W^ | N^ | E^ |\n * | W=4 | W | N | E | S | W^ | N^ | E^ | S^ |\n * | N=6 | N | E | S | W | N^ | E^ | S^ | W^ |\n * | E^=8 | E^ | N^ | W^ | S^ | E | N | W | S |\n * | S^=10 | S^ | E^ | N^ | W^ | S | E | N | W |\n * | W^=12 | W^ | S^ | E^ | N^ | W | S | E | N |\n * | N^=14 | N^ | W^ | S^ | E^ | N | W | S | E |\n *\n * [This is a Cayley table]{@link https://en.wikipedia.org/wiki/Cayley_table}\n * @memberof PIXI.groupD8\n * @param {PIXI.GD8Symmetry} rotationSecond - Second operation, which\n * is the row in the above cayley table.\n * @param {PIXI.GD8Symmetry} rotationFirst - First operation, which\n * is the column in the above cayley table.\n * @return {PIXI.GD8Symmetry} Composed operation\n */\n add: (rotationSecond: GD8Symmetry, rotationFirst: GD8Symmetry): GD8Symmetry => (\n rotationCayley[rotationSecond][rotationFirst]\n ),\n\n /**\n * Reverse of `add`.\n *\n * @memberof PIXI.groupD8\n * @param {PIXI.GD8Symmetry} rotationSecond - Second operation\n * @param {PIXI.GD8Symmetry} rotationFirst - First operation\n * @return {PIXI.GD8Symmetry} Result\n */\n sub: (rotationSecond: GD8Symmetry, rotationFirst: GD8Symmetry): GD8Symmetry => (\n rotationCayley[rotationSecond][groupD8.inv(rotationFirst)]\n ),\n\n /**\n * Adds 180 degrees to rotation, which is a commutative\n * operation.\n *\n * @memberof PIXI.groupD8\n * @param {number} rotation - The number to rotate.\n * @returns {number} Rotated number\n */\n rotate180: (rotation: number): number => rotation ^ 4,\n\n /**\n * Checks if the rotation angle is vertical, i.e. south\n * or north. It doesn't work for reflections.\n *\n * @memberof PIXI.groupD8\n * @param {PIXI.GD8Symmetry} rotation - The number to check.\n * @returns {boolean} Whether or not the direction is vertical\n */\n isVertical: (rotation: GD8Symmetry): boolean => (rotation & 3) === 2, // rotation % 4 === 2\n\n /**\n * Approximates the vector `V(dx,dy)` into one of the\n * eight directions provided by `groupD8`.\n *\n * @memberof PIXI.groupD8\n * @param {number} dx - X-component of the vector\n * @param {number} dy - Y-component of the vector\n * @return {PIXI.GD8Symmetry} Approximation of the vector into\n * one of the eight symmetries.\n */\n byDirection: (dx: number, dy: number): GD8Symmetry =>\n {\n if (Math.abs(dx) * 2 <= Math.abs(dy))\n {\n if (dy >= 0)\n {\n return groupD8.S;\n }\n\n return groupD8.N;\n }\n else if (Math.abs(dy) * 2 <= Math.abs(dx))\n {\n if (dx > 0)\n {\n return groupD8.E;\n }\n\n return groupD8.W;\n }\n else if (dy > 0)\n {\n if (dx > 0)\n {\n return groupD8.SE;\n }\n\n return groupD8.SW;\n }\n else if (dx > 0)\n {\n return groupD8.NE;\n }\n\n return groupD8.NW;\n },\n\n /**\n * Helps sprite to compensate texture packer rotation.\n *\n * @memberof PIXI.groupD8\n * @param {PIXI.Matrix} matrix - sprite world matrix\n * @param {PIXI.GD8Symmetry} rotation - The rotation factor to use.\n * @param {number} tx - sprite anchoring\n * @param {number} ty - sprite anchoring\n */\n matrixAppendRotationInv: (matrix: Matrix, rotation: GD8Symmetry, tx = 0, ty = 0): void =>\n {\n // Packer used \"rotation\", we use \"inv(rotation)\"\n const mat: Matrix = rotationMatrices[groupD8.inv(rotation)];\n\n mat.tx = tx;\n mat.ty = ty;\n matrix.append(mat);\n },\n};\n","import { ObservablePoint } from './ObservablePoint';\nimport { Matrix } from './Matrix';\n\n/**\n * Transform that takes care about its versions\n *\n * @class\n * @memberof PIXI\n */\nexport class Transform\n{\n /**\n * A default (identity) transform\n *\n * @static\n * @constant\n * @member {PIXI.Transform}\n */\n public static readonly IDENTITY = new Transform();\n\n public worldTransform: Matrix;\n public localTransform: Matrix;\n public position: ObservablePoint;\n public scale: ObservablePoint;\n public pivot: ObservablePoint;\n public skew: ObservablePoint;\n public _parentID: number;\n _worldID: number;\n\n protected _rotation: number;\n protected _cx: number;\n protected _sx: number;\n protected _cy: number;\n protected _sy: number;\n protected _localID: number;\n protected _currentLocalID: number;\n\n constructor()\n {\n /**\n * The world transformation matrix.\n *\n * @member {PIXI.Matrix}\n */\n this.worldTransform = new Matrix();\n\n /**\n * The local transformation matrix.\n *\n * @member {PIXI.Matrix}\n */\n this.localTransform = new Matrix();\n\n /**\n * The coordinate of the object relative to the local coordinates of the parent.\n *\n * @member {PIXI.ObservablePoint}\n */\n this.position = new ObservablePoint(this.onChange, this, 0, 0);\n\n /**\n * The scale factor of the object.\n *\n * @member {PIXI.ObservablePoint}\n */\n this.scale = new ObservablePoint(this.onChange, this, 1, 1);\n\n /**\n * The pivot point of the displayObject that it rotates around.\n *\n * @member {PIXI.ObservablePoint}\n */\n this.pivot = new ObservablePoint(this.onChange, this, 0, 0);\n\n /**\n * The skew amount, on the x and y axis.\n *\n * @member {PIXI.ObservablePoint}\n */\n this.skew = new ObservablePoint(this.updateSkew, this, 0, 0);\n\n /**\n * The rotation amount.\n *\n * @protected\n * @member {number}\n */\n this._rotation = 0;\n\n /**\n * The X-coordinate value of the normalized local X axis,\n * the first column of the local transformation matrix without a scale.\n *\n * @protected\n * @member {number}\n */\n this._cx = 1;\n\n /**\n * The Y-coordinate value of the normalized local X axis,\n * the first column of the local transformation matrix without a scale.\n *\n * @protected\n * @member {number}\n */\n this._sx = 0;\n\n /**\n * The X-coordinate value of the normalized local Y axis,\n * the second column of the local transformation matrix without a scale.\n *\n * @protected\n * @member {number}\n */\n this._cy = 0;\n\n /**\n * The Y-coordinate value of the normalized local Y axis,\n * the second column of the local transformation matrix without a scale.\n *\n * @protected\n * @member {number}\n */\n this._sy = 1;\n\n /**\n * The locally unique ID of the local transform.\n *\n * @protected\n * @member {number}\n */\n this._localID = 0;\n\n /**\n * The locally unique ID of the local transform\n * used to calculate the current local transformation matrix.\n *\n * @protected\n * @member {number}\n */\n this._currentLocalID = 0;\n\n /**\n * The locally unique ID of the world transform.\n *\n * @protected\n * @member {number}\n */\n this._worldID = 0;\n\n /**\n * The locally unique ID of the parent's world transform\n * used to calculate the current world transformation matrix.\n *\n * @protected\n * @member {number}\n */\n this._parentID = 0;\n }\n\n /**\n * Called when a value changes.\n *\n * @protected\n */\n protected onChange(): void\n {\n this._localID++;\n }\n\n /**\n * Called when the skew or the rotation changes.\n *\n * @protected\n */\n protected updateSkew(): void\n {\n this._cx = Math.cos(this._rotation + this.skew.y);\n this._sx = Math.sin(this._rotation + this.skew.y);\n this._cy = -Math.sin(this._rotation - this.skew.x); // cos, added PI/2\n this._sy = Math.cos(this._rotation - this.skew.x); // sin, added PI/2\n\n this._localID++;\n }\n\n /**\n * Updates the local transformation matrix.\n */\n updateLocalTransform(): void\n {\n const lt = this.localTransform;\n\n if (this._localID !== this._currentLocalID)\n {\n // get the matrix values of the displayobject based on its transform properties..\n lt.a = this._cx * this.scale.x;\n lt.b = this._sx * this.scale.x;\n lt.c = this._cy * this.scale.y;\n lt.d = this._sy * this.scale.y;\n\n lt.tx = this.position.x - ((this.pivot.x * lt.a) + (this.pivot.y * lt.c));\n lt.ty = this.position.y - ((this.pivot.x * lt.b) + (this.pivot.y * lt.d));\n this._currentLocalID = this._localID;\n\n // force an update..\n this._parentID = -1;\n }\n }\n\n /**\n * Updates the local and the world transformation matrices.\n *\n * @param {PIXI.Transform} parentTransform - The parent transform\n */\n updateTransform(parentTransform: Transform): void\n {\n const lt = this.localTransform;\n\n if (this._localID !== this._currentLocalID)\n {\n // get the matrix values of the displayobject based on its transform properties..\n lt.a = this._cx * this.scale.x;\n lt.b = this._sx * this.scale.x;\n lt.c = this._cy * this.scale.y;\n lt.d = this._sy * this.scale.y;\n\n lt.tx = this.position.x - ((this.pivot.x * lt.a) + (this.pivot.y * lt.c));\n lt.ty = this.position.y - ((this.pivot.x * lt.b) + (this.pivot.y * lt.d));\n this._currentLocalID = this._localID;\n\n // force an update..\n this._parentID = -1;\n }\n\n if (this._parentID !== parentTransform._worldID)\n {\n // concat the parent matrix with the objects transform.\n const pt = parentTransform.worldTransform;\n const wt = this.worldTransform;\n\n wt.a = (lt.a * pt.a) + (lt.b * pt.c);\n wt.b = (lt.a * pt.b) + (lt.b * pt.d);\n wt.c = (lt.c * pt.a) + (lt.d * pt.c);\n wt.d = (lt.c * pt.b) + (lt.d * pt.d);\n wt.tx = (lt.tx * pt.a) + (lt.ty * pt.c) + pt.tx;\n wt.ty = (lt.tx * pt.b) + (lt.ty * pt.d) + pt.ty;\n\n this._parentID = parentTransform._worldID;\n\n // update the id of the transform..\n this._worldID++;\n }\n }\n\n /**\n * Decomposes a matrix and sets the transforms properties based on it.\n *\n * @param {PIXI.Matrix} matrix - The matrix to decompose\n */\n setFromMatrix(matrix: Matrix): void\n {\n matrix.decompose(this);\n this._localID++;\n }\n\n /**\n * The rotation of the object in radians.\n *\n * @member {number}\n */\n get rotation(): number\n {\n return this._rotation;\n }\n\n set rotation(value: number)\n {\n if (this._rotation !== value)\n {\n this._rotation = value;\n this.updateSkew();\n }\n }\n}\n","import { Rectangle } from '@pixi/math';\n\nimport type { IPointData, Transform, Matrix } from '@pixi/math';\n\n/**\n * 'Builder' pattern for bounds rectangles.\n *\n * This could be called an Axis-Aligned Bounding Box.\n * It is not an actual shape. It is a mutable thing; no 'EMPTY' or those kind of problems.\n *\n * @class\n * @memberof PIXI\n */\nexport class Bounds\n{\n public minX: number;\n public minY: number;\n public maxX: number;\n public maxY: number;\n public rect: Rectangle;\n public updateID: number;\n\n constructor()\n {\n /**\n * @member {number}\n * @default 0\n */\n this.minX = Infinity;\n\n /**\n * @member {number}\n * @default 0\n */\n this.minY = Infinity;\n\n /**\n * @member {number}\n * @default 0\n */\n this.maxX = -Infinity;\n\n /**\n * @member {number}\n * @default 0\n */\n this.maxY = -Infinity;\n\n this.rect = null;\n\n /**\n * It is updated to _boundsID of corresponding object to keep bounds in sync with content.\n * Updated from outside, thus public modifier.\n *\n * @member {number}\n * @public\n */\n this.updateID = -1;\n }\n\n /**\n * Checks if bounds are empty.\n *\n * @return {boolean} True if empty.\n */\n isEmpty(): boolean\n {\n return this.minX > this.maxX || this.minY > this.maxY;\n }\n\n /**\n * Clears the bounds and resets.\n *\n */\n clear(): void\n {\n this.minX = Infinity;\n this.minY = Infinity;\n this.maxX = -Infinity;\n this.maxY = -Infinity;\n }\n\n /**\n * Can return Rectangle.EMPTY constant, either construct new rectangle, either use your rectangle\n * It is not guaranteed that it will return tempRect\n *\n * @param {PIXI.Rectangle} rect - temporary object will be used if AABB is not empty\n * @returns {PIXI.Rectangle} A rectangle of the bounds\n */\n getRectangle(rect?: Rectangle): Rectangle\n {\n if (this.minX > this.maxX || this.minY > this.maxY)\n {\n return Rectangle.EMPTY;\n }\n\n rect = rect || new Rectangle(0, 0, 1, 1);\n\n rect.x = this.minX;\n rect.y = this.minY;\n rect.width = this.maxX - this.minX;\n rect.height = this.maxY - this.minY;\n\n return rect;\n }\n\n /**\n * This function should be inlined when its possible.\n *\n * @param {PIXI.IPointData} point - The point to add.\n */\n addPoint(point: IPointData): void\n {\n this.minX = Math.min(this.minX, point.x);\n this.maxX = Math.max(this.maxX, point.x);\n this.minY = Math.min(this.minY, point.y);\n this.maxY = Math.max(this.maxY, point.y);\n }\n\n /**\n * Adds a quad, not transformed\n *\n * @param {Float32Array} vertices - The verts to add.\n */\n addQuad(vertices: Float32Array): void\n {\n let minX = this.minX;\n let minY = this.minY;\n let maxX = this.maxX;\n let maxY = this.maxY;\n\n let x = vertices[0];\n let y = vertices[1];\n\n minX = x < minX ? x : minX;\n minY = y < minY ? y : minY;\n maxX = x > maxX ? x : maxX;\n maxY = y > maxY ? y : maxY;\n\n x = vertices[2];\n y = vertices[3];\n minX = x < minX ? x : minX;\n minY = y < minY ? y : minY;\n maxX = x > maxX ? x : maxX;\n maxY = y > maxY ? y : maxY;\n\n x = vertices[4];\n y = vertices[5];\n minX = x < minX ? x : minX;\n minY = y < minY ? y : minY;\n maxX = x > maxX ? x : maxX;\n maxY = y > maxY ? y : maxY;\n\n x = vertices[6];\n y = vertices[7];\n minX = x < minX ? x : minX;\n minY = y < minY ? y : minY;\n maxX = x > maxX ? x : maxX;\n maxY = y > maxY ? y : maxY;\n\n this.minX = minX;\n this.minY = minY;\n this.maxX = maxX;\n this.maxY = maxY;\n }\n\n /**\n * Adds sprite frame, transformed.\n *\n * @param {PIXI.Transform} transform - transform to apply\n * @param {number} x0 - left X of frame\n * @param {number} y0 - top Y of frame\n * @param {number} x1 - right X of frame\n * @param {number} y1 - bottom Y of frame\n */\n addFrame(transform: Transform, x0: number, y0: number, x1: number, y1: number): void\n {\n this.addFrameMatrix(transform.worldTransform, x0, y0, x1, y1);\n }\n\n /**\n * Adds sprite frame, multiplied by matrix\n *\n * @param {PIXI.Matrix} matrix - matrix to apply\n * @param {number} x0 - left X of frame\n * @param {number} y0 - top Y of frame\n * @param {number} x1 - right X of frame\n * @param {number} y1 - bottom Y of frame\n */\n addFrameMatrix(matrix: Matrix, x0: number, y0: number, x1: number, y1: number): void\n {\n const a = matrix.a;\n const b = matrix.b;\n const c = matrix.c;\n const d = matrix.d;\n const tx = matrix.tx;\n const ty = matrix.ty;\n\n let minX = this.minX;\n let minY = this.minY;\n let maxX = this.maxX;\n let maxY = this.maxY;\n\n let x = (a * x0) + (c * y0) + tx;\n let y = (b * x0) + (d * y0) + ty;\n\n minX = x < minX ? x : minX;\n minY = y < minY ? y : minY;\n maxX = x > maxX ? x : maxX;\n maxY = y > maxY ? y : maxY;\n\n x = (a * x1) + (c * y0) + tx;\n y = (b * x1) + (d * y0) + ty;\n minX = x < minX ? x : minX;\n minY = y < minY ? y : minY;\n maxX = x > maxX ? x : maxX;\n maxY = y > maxY ? y : maxY;\n\n x = (a * x0) + (c * y1) + tx;\n y = (b * x0) + (d * y1) + ty;\n minX = x < minX ? x : minX;\n minY = y < minY ? y : minY;\n maxX = x > maxX ? x : maxX;\n maxY = y > maxY ? y : maxY;\n\n x = (a * x1) + (c * y1) + tx;\n y = (b * x1) + (d * y1) + ty;\n minX = x < minX ? x : minX;\n minY = y < minY ? y : minY;\n maxX = x > maxX ? x : maxX;\n maxY = y > maxY ? y : maxY;\n\n this.minX = minX;\n this.minY = minY;\n this.maxX = maxX;\n this.maxY = maxY;\n }\n\n /**\n * Adds screen vertices from array\n *\n * @param {Float32Array} vertexData - calculated vertices\n * @param {number} beginOffset - begin offset\n * @param {number} endOffset - end offset, excluded\n */\n addVertexData(vertexData: Float32Array, beginOffset: number, endOffset: number): void\n {\n let minX = this.minX;\n let minY = this.minY;\n let maxX = this.maxX;\n let maxY = this.maxY;\n\n for (let i = beginOffset; i < endOffset; i += 2)\n {\n const x = vertexData[i];\n const y = vertexData[i + 1];\n\n minX = x < minX ? x : minX;\n minY = y < minY ? y : minY;\n maxX = x > maxX ? x : maxX;\n maxY = y > maxY ? y : maxY;\n }\n\n this.minX = minX;\n this.minY = minY;\n this.maxX = maxX;\n this.maxY = maxY;\n }\n\n /**\n * Add an array of mesh vertices\n *\n * @param {PIXI.Transform} transform - mesh transform\n * @param {Float32Array} vertices - mesh coordinates in array\n * @param {number} beginOffset - begin offset\n * @param {number} endOffset - end offset, excluded\n */\n addVertices(transform: Transform, vertices: Float32Array, beginOffset: number, endOffset: number): void\n {\n this.addVerticesMatrix(transform.worldTransform, vertices, beginOffset, endOffset);\n }\n\n /**\n * Add an array of mesh vertices.\n *\n * @param {PIXI.Matrix} matrix - mesh matrix\n * @param {Float32Array} vertices - mesh coordinates in array\n * @param {number} beginOffset - begin offset\n * @param {number} endOffset - end offset, excluded\n * @param {number} [padX=0] - x padding\n * @param {number} [padY=0] - y padding\n */\n addVerticesMatrix(matrix: Matrix, vertices: Float32Array, beginOffset: number,\n endOffset: number, padX = 0, padY = padX): void\n {\n const a = matrix.a;\n const b = matrix.b;\n const c = matrix.c;\n const d = matrix.d;\n const tx = matrix.tx;\n const ty = matrix.ty;\n\n let minX = this.minX;\n let minY = this.minY;\n let maxX = this.maxX;\n let maxY = this.maxY;\n\n for (let i = beginOffset; i < endOffset; i += 2)\n {\n const rawX = vertices[i];\n const rawY = vertices[i + 1];\n const x = (a * rawX) + (c * rawY) + tx;\n const y = (d * rawY) + (b * rawX) + ty;\n\n minX = Math.min(minX, x - padX);\n maxX = Math.max(maxX, x + padX);\n minY = Math.min(minY, y - padY);\n maxY = Math.max(maxY, y + padY);\n }\n\n this.minX = minX;\n this.minY = minY;\n this.maxX = maxX;\n this.maxY = maxY;\n }\n\n /**\n * Adds other Bounds.\n *\n * @param {PIXI.Bounds} bounds - The Bounds to be added\n */\n addBounds(bounds: Bounds): void\n {\n const minX = this.minX;\n const minY = this.minY;\n const maxX = this.maxX;\n const maxY = this.maxY;\n\n this.minX = bounds.minX < minX ? bounds.minX : minX;\n this.minY = bounds.minY < minY ? bounds.minY : minY;\n this.maxX = bounds.maxX > maxX ? bounds.maxX : maxX;\n this.maxY = bounds.maxY > maxY ? bounds.maxY : maxY;\n }\n\n /**\n * Adds other Bounds, masked with Bounds.\n *\n * @param {PIXI.Bounds} bounds - The Bounds to be added.\n * @param {PIXI.Bounds} mask - TODO\n */\n addBoundsMask(bounds: Bounds, mask: Bounds): void\n {\n const _minX = bounds.minX > mask.minX ? bounds.minX : mask.minX;\n const _minY = bounds.minY > mask.minY ? bounds.minY : mask.minY;\n const _maxX = bounds.maxX < mask.maxX ? bounds.maxX : mask.maxX;\n const _maxY = bounds.maxY < mask.maxY ? bounds.maxY : mask.maxY;\n\n if (_minX <= _maxX && _minY <= _maxY)\n {\n const minX = this.minX;\n const minY = this.minY;\n const maxX = this.maxX;\n const maxY = this.maxY;\n\n this.minX = _minX < minX ? _minX : minX;\n this.minY = _minY < minY ? _minY : minY;\n this.maxX = _maxX > maxX ? _maxX : maxX;\n this.maxY = _maxY > maxY ? _maxY : maxY;\n }\n }\n\n /**\n * Adds other Bounds, multiplied by matrix. Bounds shouldn't be empty.\n *\n * @param {PIXI.Bounds} bounds - other bounds\n * @param {PIXI.Matrix} matrix - multiplicator\n */\n addBoundsMatrix(bounds: Bounds, matrix: Matrix): void\n {\n this.addFrameMatrix(matrix, bounds.minX, bounds.minY, bounds.maxX, bounds.maxY);\n }\n\n /**\n * Adds other Bounds, masked with Rectangle.\n *\n * @param {PIXI.Bounds} bounds - TODO\n * @param {PIXI.Rectangle} area - TODO\n */\n addBoundsArea(bounds: Bounds, area: Rectangle): void\n {\n const _minX = bounds.minX > area.x ? bounds.minX : area.x;\n const _minY = bounds.minY > area.y ? bounds.minY : area.y;\n const _maxX = bounds.maxX < area.x + area.width ? bounds.maxX : (area.x + area.width);\n const _maxY = bounds.maxY < area.y + area.height ? bounds.maxY : (area.y + area.height);\n\n if (_minX <= _maxX && _minY <= _maxY)\n {\n const minX = this.minX;\n const minY = this.minY;\n const maxX = this.maxX;\n const maxY = this.maxY;\n\n this.minX = _minX < minX ? _minX : minX;\n this.minY = _minY < minY ? _minY : minY;\n this.maxX = _maxX > maxX ? _maxX : maxX;\n this.maxY = _maxY > maxY ? _maxY : maxY;\n }\n }\n\n /**\n * Pads bounds object, making it grow in all directions.\n * If paddingY is omitted, both paddingX and paddingY will be set to paddingX.\n *\n * @param {number} [paddingX=0] - The horizontal padding amount.\n * @param {number} [paddingY=0] - The vertical padding amount.\n */\n pad(paddingX = 0, paddingY = paddingX): void\n {\n if (!this.isEmpty())\n {\n this.minX -= paddingX;\n this.maxX += paddingX;\n this.minY -= paddingY;\n this.maxY += paddingY;\n }\n }\n\n /**\n * Adds padded frame. (x0, y0) should be strictly less than (x1, y1)\n *\n * @param {number} x0 - left X of frame\n * @param {number} y0 - top Y of frame\n * @param {number} x1 - right X of frame\n * @param {number} y1 - bottom Y of frame\n * @param {number} padX - padding X\n * @param {number} padY - padding Y\n */\n addFramePad(x0: number, y0: number, x1: number, y1: number, padX: number, padY: number): void\n {\n x0 -= padX;\n y0 -= padY;\n x1 += padX;\n y1 += padY;\n\n this.minX = this.minX < x0 ? this.minX : x0;\n this.maxX = this.maxX > x1 ? this.maxX : x1;\n this.minY = this.minY < y0 ? this.minY : y0;\n this.maxY = this.maxY > y1 ? this.maxY : y1;\n }\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\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\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import { DEG_TO_RAD, Matrix, Point, RAD_TO_DEG, Rectangle, Transform } from '@pixi/math';\nimport { EventEmitter } from '@pixi/utils';\nimport { Container } from './Container';\nimport { Bounds } from './Bounds';\n\nimport type { Filter, MaskData, Renderer } from '@pixi/core';\nimport type { IPointData, ObservablePoint } from '@pixi/math';\nimport type { Dict } from '@pixi/utils';\n\nexport interface IDestroyOptions {\n children?: boolean;\n texture?: boolean;\n baseTexture?: boolean;\n}\n\nexport interface DisplayObject extends GlobalMixins.DisplayObject, EventEmitter {}\n\n/**\n * The base class for all objects that are rendered on the screen.\n *\n * This is an abstract class and should not be used on its own; rather it should b e extended.\n *\n * @class\n * @extends PIXI.utils.EventEmitter\n * @memberof PIXI\n */\nexport abstract class DisplayObject extends EventEmitter\n{\n abstract sortDirty: boolean;\n\n public parent: DisplayObject;\n public worldAlpha: number;\n public transform: Transform;\n public alpha: number;\n public visible: boolean;\n public renderable: boolean;\n public filterArea: Rectangle;\n public filters: Filter[];\n public isSprite: boolean;\n public isMask: boolean;\n public _lastSortedIndex: number;\n public _mask: Container|MaskData;\n public _bounds: Bounds;\n public _localBounds: Bounds;\n\n protected _zIndex: number;\n protected _enabledFilters: Filter[];\n protected _boundsID: number;\n protected _boundsRect: Rectangle;\n protected _localBoundsRect: Rectangle;\n protected _destroyed: boolean;\n\n private tempDisplayObjectParent: TemporaryDisplayObject;\n public displayObjectUpdateTransform: () => void;\n\n /**\n * Mixes all enumerable properties and methods from a source object to DisplayObject.\n *\n * @param {object} source - The source of properties and methods to mix in.\n */\n static mixin(source: Dict): void\n {\n // in ES8/ES2017, this would be really easy:\n // Object.defineProperties(DisplayObject.prototype, Object.getOwnPropertyDescriptors(source));\n\n // get all the enumerable property keys\n const keys = Object.keys(source);\n\n // loop through properties\n for (let i = 0; i < keys.length; ++i)\n {\n const propertyName = keys[i];\n\n // Set the property using the property descriptor - this works for accessors and normal value properties\n Object.defineProperty(\n DisplayObject.prototype,\n propertyName,\n Object.getOwnPropertyDescriptor(source, propertyName)\n );\n }\n }\n\n constructor()\n {\n super();\n\n this.tempDisplayObjectParent = null;\n\n // TODO: need to create Transform from factory\n /**\n * World transform and local transform of this object.\n * This will become read-only later, please do not assign anything there unless you know what are you doing.\n *\n * @member {PIXI.Transform}\n */\n this.transform = new Transform();\n\n /**\n * The opacity of the object.\n *\n * @member {number}\n */\n this.alpha = 1;\n\n /**\n * The visibility of the object. If false the object will not be drawn, and\n * the updateTransform function will not be called.\n *\n * Only affects recursive calls from parent. You can ask for bounds or call updateTransform manually.\n *\n * @member {boolean}\n */\n this.visible = true;\n\n /**\n * Can this object be rendered, if false the object will not be drawn but the updateTransform\n * methods will still be called.\n *\n * Only affects recursive calls from parent. You can ask for bounds manually.\n *\n * @member {boolean}\n */\n this.renderable = true;\n\n /**\n * The display object container that contains this display object.\n *\n * @member {PIXI.Container}\n */\n this.parent = null;\n\n /**\n * The multiplied alpha of the displayObject.\n *\n * @member {number}\n * @readonly\n */\n this.worldAlpha = 1;\n\n /**\n * Which index in the children array the display component was before the previous zIndex sort.\n * Used by containers to help sort objects with the same zIndex, by using previous array index as the decider.\n *\n * @member {number}\n * @protected\n */\n this._lastSortedIndex = 0;\n\n /**\n * The zIndex of the displayObject.\n * A higher value will mean it will be rendered on top of other displayObjects within the same container.\n *\n * @member {number}\n * @protected\n */\n this._zIndex = 0;\n\n /**\n * The area the filter is applied to. This is used as more of an optimization\n * rather than figuring out the dimensions of the displayObject each frame you can set this rectangle.\n *\n * Also works as an interaction mask.\n *\n * @member {?PIXI.Rectangle}\n */\n this.filterArea = null;\n\n /**\n * Sets the filters for the displayObject.\n * * IMPORTANT: This is a WebGL only feature and will be ignored by the canvas renderer.\n * To remove filters simply set this property to `'null'`.\n *\n * @member {?PIXI.Filter[]}\n */\n this.filters = null;\n\n /**\n * Currently enabled filters\n * @member {PIXI.Filter[]}\n * @protected\n */\n this._enabledFilters = null;\n\n /**\n * The bounds object, this is used to calculate and store the bounds of the displayObject.\n *\n * @member {PIXI.Bounds}\n */\n this._bounds = new Bounds();\n\n /**\n * Local bounds object, swapped with `_bounds` when using `getLocalBounds()`.\n *\n * @member {PIXI.Bounds}\n */\n this._localBounds = null;\n\n /**\n * Flags the cached bounds as dirty.\n *\n * @member {number}\n * @protected\n */\n this._boundsID = 0;\n\n /**\n * Cache of this display-object's bounds-rectangle.\n *\n * @member {PIXI.Bounds}\n * @protected\n */\n this._boundsRect = null;\n\n /**\n * Cache of this display-object's local-bounds rectangle.\n *\n * @member {PIXI.Bounds}\n * @protected\n */\n this._localBoundsRect = null;\n\n /**\n * The original, cached mask of the object.\n *\n * @member {PIXI.Container|PIXI.MaskData|null}\n * @protected\n */\n this._mask = null;\n\n /**\n * Fired when this DisplayObject is added to a Container.\n *\n * @event PIXI.DisplayObject#added\n * @param {PIXI.Container} container - The container added to.\n */\n\n /**\n * Fired when this DisplayObject is removed from a Container.\n *\n * @event PIXI.DisplayObject#removed\n * @param {PIXI.Container} container - The container removed from.\n */\n\n /**\n * If the object has been destroyed via destroy(). If true, it should not be used.\n *\n * @member {boolean}\n * @protected\n */\n this._destroyed = false;\n\n /**\n * used to fast check if a sprite is.. a sprite!\n * @member {boolean}\n */\n this.isSprite = false;\n\n /**\n * Does any other displayObject use this object as a mask?\n * @member {boolean}\n */\n this.isMask = false;\n }\n\n /**\n * Recalculates the bounds of the display object.\n */\n abstract calculateBounds(): void;\n\n abstract removeChild(child: DisplayObject): void;\n\n /**\n * Renders the object using the WebGL renderer.\n *\n * @param {PIXI.Renderer} renderer - The renderer.\n */\n abstract render(renderer: Renderer): void;\n\n /**\n * Recursively updates transform of all objects from the root to this one\n * internal function for toLocal()\n */\n protected _recursivePostUpdateTransform(): void\n {\n if (this.parent)\n {\n this.parent._recursivePostUpdateTransform();\n this.transform.updateTransform(this.parent.transform);\n }\n else\n {\n this.transform.updateTransform(this._tempDisplayObjectParent.transform);\n }\n }\n\n /**\n * Updates the object transform for rendering.\n *\n * TODO - Optimization pass!\n */\n updateTransform(): void\n {\n this._boundsID++;\n\n this.transform.updateTransform(this.parent.transform);\n // multiply the alphas..\n this.worldAlpha = this.alpha * this.parent.worldAlpha;\n }\n\n /**\n * Retrieves the bounds of the displayObject as a rectangle object.\n *\n * @param {boolean} [skipUpdate] - Setting to `true` will stop the transforms of the scene graph from\n * being updated. This means the calculation returned MAY be out of date BUT will give you a\n * nice performance boost.\n * @param {PIXI.Rectangle} [rect] - Optional rectangle to store the result of the bounds calculation.\n * @return {PIXI.Rectangle} The rectangular bounding area.\n */\n getBounds(skipUpdate?: boolean, rect?: Rectangle): Rectangle\n {\n if (!skipUpdate)\n {\n if (!this.parent)\n {\n this.parent = this._tempDisplayObjectParent;\n this.updateTransform();\n this.parent = null;\n }\n else\n {\n this._recursivePostUpdateTransform();\n this.updateTransform();\n }\n }\n\n if (this._bounds.updateID !== this._boundsID)\n {\n this.calculateBounds();\n this._bounds.updateID = this._boundsID;\n }\n\n if (!rect)\n {\n if (!this._boundsRect)\n {\n this._boundsRect = new Rectangle();\n }\n\n rect = this._boundsRect;\n }\n\n return this._bounds.getRectangle(rect);\n }\n\n /**\n * Retrieves the local bounds of the displayObject as a rectangle object.\n *\n * @param {PIXI.Rectangle} [rect] - Optional rectangle to store the result of the bounds calculation.\n * @return {PIXI.Rectangle} The rectangular bounding area.\n */\n getLocalBounds(rect?: Rectangle): Rectangle\n {\n if (!rect)\n {\n if (!this._localBoundsRect)\n {\n this._localBoundsRect = new Rectangle();\n }\n\n rect = this._localBoundsRect;\n }\n\n if (!this._localBounds)\n {\n this._localBounds = new Bounds();\n }\n\n const transformRef = this.transform;\n const parentRef = this.parent;\n\n this.parent = null;\n this.transform = this._tempDisplayObjectParent.transform;\n\n const worldBounds = this._bounds;\n const worldBoundsID = this._boundsID;\n\n this._bounds = this._localBounds;\n\n const bounds = this.getBounds(false, rect);\n\n this.parent = parentRef;\n this.transform = transformRef;\n\n this._bounds = worldBounds;\n this._bounds.updateID += this._boundsID - worldBoundsID;// reflect side-effects\n\n return bounds;\n }\n\n /**\n * Calculates the global position of the display object.\n *\n * @param {PIXI.IPointData} position - The world origin to calculate from.\n * @param {PIXI.Point} [point] - A Point object in which to store the value, optional\n * (otherwise will create a new Point).\n * @param {boolean} [skipUpdate=false] - Should we skip the update transform.\n * @return {PIXI.Point} A point object representing the position of this object.\n */\n toGlobal

(position: IPointData, point?: P, skipUpdate = false): P\n {\n if (!skipUpdate)\n {\n this._recursivePostUpdateTransform();\n\n // this parent check is for just in case the item is a root object.\n // If it is we need to give it a temporary parent so that displayObjectUpdateTransform works correctly\n // this is mainly to avoid a parent check in the main loop. Every little helps for performance :)\n if (!this.parent)\n {\n this.parent = this._tempDisplayObjectParent;\n this.displayObjectUpdateTransform();\n this.parent = null;\n }\n else\n {\n this.displayObjectUpdateTransform();\n }\n }\n\n // don't need to update the lot\n return this.worldTransform.apply

(position, point);\n }\n\n /**\n * Calculates the local position of the display object relative to another point.\n *\n * @param {PIXI.IPointData} position - The world origin to calculate from.\n * @param {PIXI.DisplayObject} [from] - The DisplayObject to calculate the global position from.\n * @param {PIXI.Point} [point] - A Point object in which to store the value, optional\n * (otherwise will create a new Point).\n * @param {boolean} [skipUpdate=false] - Should we skip the update transform\n * @return {PIXI.Point} A point object representing the position of this object\n */\n toLocal

(position: IPointData, from: DisplayObject, point?: P, skipUpdate?: boolean): P\n {\n if (from)\n {\n position = from.toGlobal(position, point, skipUpdate);\n }\n\n if (!skipUpdate)\n {\n this._recursivePostUpdateTransform();\n\n // this parent check is for just in case the item is a root object.\n // If it is we need to give it a temporary parent so that displayObjectUpdateTransform works correctly\n // this is mainly to avoid a parent check in the main loop. Every little helps for performance :)\n if (!this.parent)\n {\n this.parent = this._tempDisplayObjectParent;\n this.displayObjectUpdateTransform();\n this.parent = null;\n }\n else\n {\n this.displayObjectUpdateTransform();\n }\n }\n\n // simply apply the matrix..\n return this.worldTransform.applyInverse

(position, point);\n }\n\n /**\n * Set the parent Container of this DisplayObject.\n *\n * @param {PIXI.Container} container - The Container to add this DisplayObject to.\n * @return {PIXI.Container} The Container that this DisplayObject was added to.\n */\n setParent(container: Container): Container\n {\n if (!container || !container.addChild)\n {\n throw new Error('setParent: Argument must be a Container');\n }\n\n container.addChild(this);\n\n return container;\n }\n\n /**\n * Convenience function to set the position, scale, skew and pivot at once.\n *\n * @param {number} [x=0] - The X position\n * @param {number} [y=0] - The Y position\n * @param {number} [scaleX=1] - The X scale value\n * @param {number} [scaleY=1] - The Y scale value\n * @param {number} [rotation=0] - The rotation\n * @param {number} [skewX=0] - The X skew value\n * @param {number} [skewY=0] - The Y skew value\n * @param {number} [pivotX=0] - The X pivot value\n * @param {number} [pivotY=0] - The Y pivot value\n * @return {PIXI.DisplayObject} The DisplayObject instance\n */\n setTransform(x = 0, y = 0, scaleX = 1, scaleY = 1, rotation = 0, skewX = 0, skewY = 0, pivotX = 0, pivotY = 0): this\n {\n this.position.x = x;\n this.position.y = y;\n this.scale.x = !scaleX ? 1 : scaleX;\n this.scale.y = !scaleY ? 1 : scaleY;\n this.rotation = rotation;\n this.skew.x = skewX;\n this.skew.y = skewY;\n this.pivot.x = pivotX;\n this.pivot.y = pivotY;\n\n return this;\n }\n\n /**\n * Base destroy method for generic display objects. This will automatically\n * remove the display object from its parent Container as well as remove\n * all current event listeners and internal references. Do not use a DisplayObject\n * after calling `destroy()`.\n *\n */\n destroy(_options?: IDestroyOptions|boolean): void\n {\n if (this.parent)\n {\n this.parent.removeChild(this);\n }\n this.removeAllListeners();\n this.transform = null;\n\n this.parent = null;\n this._bounds = null;\n this._mask = null;\n\n this.filters = null;\n this.filterArea = null;\n this.hitArea = null;\n\n this.interactive = false;\n this.interactiveChildren = false;\n\n this._destroyed = true;\n }\n\n /**\n * @protected\n * @member {PIXI.Container}\n */\n get _tempDisplayObjectParent(): TemporaryDisplayObject\n {\n if (this.tempDisplayObjectParent === null)\n {\n // eslint-disable-next-line no-use-before-define\n this.tempDisplayObjectParent = new TemporaryDisplayObject();\n }\n\n return this.tempDisplayObjectParent;\n }\n\n /**\n * Used in Renderer, cacheAsBitmap and other places where you call an `updateTransform` on root\n *\n * ```\n * const cacheParent = elem.enableTempParent();\n * elem.updateTransform();\n * elem.disableTempParent(cacheParent);\n * ```\n *\n * @returns {PIXI.DisplayObject} current parent\n */\n enableTempParent(): DisplayObject\n {\n const myParent = this.parent;\n\n this.parent = this._tempDisplayObjectParent;\n\n return myParent;\n }\n\n /**\n * Pair method for `enableTempParent`\n * @param {PIXI.DisplayObject} cacheParent actual parent of element\n */\n disableTempParent(cacheParent: DisplayObject): void\n {\n this.parent = cacheParent;\n }\n\n /**\n * The position of the displayObject on the x axis relative to the local coordinates of the parent.\n * An alias to position.x\n *\n * @member {number}\n */\n get x(): number\n {\n return this.position.x;\n }\n\n set x(value: number)\n {\n this.transform.position.x = value;\n }\n\n /**\n * The position of the displayObject on the y axis relative to the local coordinates of the parent.\n * An alias to position.y\n *\n * @member {number}\n */\n get y(): number\n {\n return this.position.y;\n }\n\n set y(value: number)\n {\n this.transform.position.y = value;\n }\n\n /**\n * Current transform of the object based on world (parent) factors.\n *\n * @member {PIXI.Matrix}\n * @readonly\n */\n get worldTransform(): Matrix\n {\n return this.transform.worldTransform;\n }\n\n /**\n * Current transform of the object based on local factors: position, scale, other stuff.\n *\n * @member {PIXI.Matrix}\n * @readonly\n */\n get localTransform(): Matrix\n {\n return this.transform.localTransform;\n }\n\n /**\n * The coordinate of the object relative to the local coordinates of the parent.\n * Assignment by value since pixi-v4.\n *\n * @member {PIXI.ObservablePoint}\n */\n get position(): ObservablePoint\n {\n return this.transform.position;\n }\n\n set position(value: ObservablePoint)\n {\n this.transform.position.copyFrom(value);\n }\n\n /**\n * The scale factor of the object.\n * Assignment by value since pixi-v4.\n *\n * @member {PIXI.ObservablePoint}\n */\n get scale(): ObservablePoint\n {\n return this.transform.scale;\n }\n\n set scale(value: ObservablePoint)\n {\n this.transform.scale.copyFrom(value);\n }\n\n /**\n * The pivot point of the displayObject that it rotates around.\n * Assignment by value since pixi-v4.\n *\n * @member {PIXI.ObservablePoint}\n */\n get pivot(): ObservablePoint\n {\n return this.transform.pivot;\n }\n\n set pivot(value: ObservablePoint)\n {\n this.transform.pivot.copyFrom(value);\n }\n\n /**\n * The skew factor for the object in radians.\n * Assignment by value since pixi-v4.\n *\n * @member {PIXI.ObservablePoint}\n */\n get skew(): ObservablePoint\n {\n return this.transform.skew;\n }\n\n set skew(value: ObservablePoint)\n {\n this.transform.skew.copyFrom(value);\n }\n\n /**\n * The rotation of the object in radians.\n * 'rotation' and 'angle' have the same effect on a display object; rotation is in radians, angle is in degrees.\n *\n * @member {number}\n */\n get rotation(): number\n {\n return this.transform.rotation;\n }\n\n set rotation(value: number)\n {\n this.transform.rotation = value;\n }\n\n /**\n * The angle of the object in degrees.\n * 'rotation' and 'angle' have the same effect on a display object; rotation is in radians, angle is in degrees.\n *\n * @member {number}\n */\n get angle(): number\n {\n return this.transform.rotation * RAD_TO_DEG;\n }\n\n set angle(value: number)\n {\n this.transform.rotation = value * DEG_TO_RAD;\n }\n\n /**\n * The zIndex of the displayObject.\n * If a container has the sortableChildren property set to true, children will be automatically\n * sorted by zIndex value; a higher value will mean it will be moved towards the end of the array,\n * and thus rendered on top of other displayObjects within the same container.\n *\n * @member {number}\n */\n get zIndex(): number\n {\n return this._zIndex;\n }\n\n set zIndex(value: number)\n {\n this._zIndex = value;\n if (this.parent)\n {\n this.parent.sortDirty = true;\n }\n }\n\n /**\n * Indicates if the object is globally visible.\n *\n * @member {boolean}\n * @readonly\n */\n get worldVisible(): boolean\n {\n let item = this as DisplayObject;\n\n do\n {\n if (!item.visible)\n {\n return false;\n }\n\n item = item.parent;\n } while (item);\n\n return true;\n }\n\n /**\n * Sets a mask for the displayObject. A mask is an object that limits the visibility of an\n * object to the shape of the mask applied to it. In PixiJS a regular mask must be a\n * {@link PIXI.Graphics} or a {@link PIXI.Sprite} object. This allows for much faster masking in canvas as it\n * utilities shape clipping. To remove a mask, set this property to `null`.\n *\n * For sprite mask both alpha and red channel are used. Black mask is the same as transparent mask.\n * @example\n * const graphics = new PIXI.Graphics();\n * graphics.beginFill(0xFF3300);\n * graphics.drawRect(50, 250, 100, 100);\n * graphics.endFill();\n *\n * const sprite = new PIXI.Sprite(texture);\n * sprite.mask = graphics;\n * @todo At the moment, PIXI.CanvasRenderer doesn't support PIXI.Sprite as mask.\n *\n * @member {PIXI.Container|PIXI.MaskData|null}\n */\n get mask(): Container|MaskData|null\n {\n return this._mask;\n }\n\n set mask(value: Container|MaskData|null)\n {\n if (this._mask)\n {\n const maskObject = ((this._mask as MaskData).maskObject || this._mask) as Container;\n\n maskObject.renderable = true;\n maskObject.isMask = false;\n }\n\n this._mask = value;\n\n if (this._mask)\n {\n const maskObject = ((this._mask as MaskData).maskObject || this._mask) as Container;\n\n maskObject.renderable = false;\n maskObject.isMask = true;\n }\n }\n}\n\nexport class TemporaryDisplayObject extends DisplayObject\n{\n calculateBounds: () => null;\n removeChild: (child: DisplayObject) => null;\n render: (renderer: Renderer) => null;\n sortDirty: boolean = null;\n}\n\n/**\n * DisplayObject default updateTransform, does not update children of container.\n * Will crash if there's no parent element.\n *\n * @memberof PIXI.DisplayObject#\n * @function displayObjectUpdateTransform\n */\nDisplayObject.prototype.displayObjectUpdateTransform = DisplayObject.prototype.updateTransform;\n","import { settings } from '@pixi/settings';\nimport { removeItems } from '@pixi/utils';\nimport { DisplayObject } from './DisplayObject';\nimport { Rectangle } from '@pixi/math';\n\nimport type { MaskData, Renderer } from '@pixi/core';\nimport type { IDestroyOptions } from './DisplayObject';\n\nfunction sortChildren(a: DisplayObject, b: DisplayObject): number\n{\n if (a.zIndex === b.zIndex)\n {\n return a._lastSortedIndex - b._lastSortedIndex;\n }\n\n return a.zIndex - b.zIndex;\n}\n\nexport interface Container extends GlobalMixins.Container, DisplayObject {}\n\n/**\n * A Container represents a collection of display objects.\n *\n * It is the base class of all display objects that act as a container for other objects (like Sprites).\n *\n *```js\n * let container = new PIXI.Container();\n * container.addChild(sprite);\n * ```\n *\n * @class\n * @extends PIXI.DisplayObject\n * @memberof PIXI\n */\nexport class Container extends DisplayObject\n{\n public readonly children: DisplayObject[];\n public sortableChildren: boolean;\n public sortDirty: boolean;\n public containerUpdateTransform: () => void;\n\n protected _width: number;\n protected _height: number;\n\n constructor()\n {\n super();\n\n /**\n * The array of children of this container.\n *\n * @member {PIXI.DisplayObject[]}\n * @readonly\n */\n this.children = [];\n\n /**\n * If set to true, the container will sort its children by zIndex value\n * when updateTransform() is called, or manually if sortChildren() is called.\n *\n * This actually changes the order of elements in the array, so should be treated\n * as a basic solution that is not performant compared to other solutions,\n * such as @link https://github.com/pixijs/pixi-display\n *\n * Also be aware of that this may not work nicely with the addChildAt() function,\n * as the zIndex sorting may cause the child to automatically sorted to another position.\n *\n * @see PIXI.settings.SORTABLE_CHILDREN\n *\n * @member {boolean}\n */\n this.sortableChildren = settings.SORTABLE_CHILDREN;\n\n /**\n * Should children be sorted by zIndex at the next updateTransform call.\n * Will get automatically set to true if a new child is added, or if a child's zIndex changes.\n *\n * @member {boolean}\n */\n this.sortDirty = false;\n\n /**\n * Fired when a DisplayObject is added to this Container.\n *\n * @event PIXI.Container#childAdded\n * @param {PIXI.DisplayObject} child - The child added to the Container.\n * @param {PIXI.Container} container - The container that added the child.\n * @param {number} index - The children's index of the added child.\n */\n\n /**\n * Fired when a DisplayObject is removed from this Container.\n *\n * @event PIXI.DisplayObject#removedFrom\n * @param {PIXI.DisplayObject} child - The child removed from the Container.\n * @param {PIXI.Container} container - The container that removed removed the child.\n * @param {number} index - The former children's index of the removed child\n */\n }\n\n /**\n * Overridable method that can be used by Container subclasses whenever the children array is modified\n *\n * @protected\n */\n protected onChildrenChange(_length: number): void\n {\n /* empty */\n }\n\n /**\n * Adds one or more children to the container.\n *\n * Multiple items can be added like so: `myContainer.addChild(thingOne, thingTwo, thingThree)`\n *\n * @param {...PIXI.DisplayObject} children - The DisplayObject(s) to add to the container\n * @return {PIXI.DisplayObject} The first child that was added.\n */\n addChild(...children: T): T[0]\n {\n // if there is only one argument we can bypass looping through the them\n if (children.length > 1)\n {\n // loop through the array and add all children\n for (let i = 0; i < children.length; i++)\n {\n // eslint-disable-next-line prefer-rest-params\n this.addChild(children[i]);\n }\n }\n else\n {\n const child = children[0];\n // if the child has a parent then lets remove it as PixiJS objects can only exist in one place\n\n if (child.parent)\n {\n child.parent.removeChild(child);\n }\n\n child.parent = this;\n this.sortDirty = true;\n\n // ensure child transform will be recalculated\n child.transform._parentID = -1;\n\n this.children.push(child);\n\n // ensure bounds will be recalculated\n this._boundsID++;\n\n // TODO - lets either do all callbacks or all events.. not both!\n this.onChildrenChange(this.children.length - 1);\n this.emit('childAdded', child, this, this.children.length - 1);\n child.emit('added', this);\n }\n\n return children[0];\n }\n\n /**\n * Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown\n *\n * @param {PIXI.DisplayObject} child - The child to add\n * @param {number} index - The index to place the child in\n * @return {PIXI.DisplayObject} The child that was added.\n */\n addChildAt(child: T, index: number): T\n {\n if (index < 0 || index > this.children.length)\n {\n throw new Error(`${child}addChildAt: The index ${index} supplied is out of bounds ${this.children.length}`);\n }\n\n if (child.parent)\n {\n child.parent.removeChild(child);\n }\n\n child.parent = this;\n this.sortDirty = true;\n\n // ensure child transform will be recalculated\n child.transform._parentID = -1;\n\n this.children.splice(index, 0, child);\n\n // ensure bounds will be recalculated\n this._boundsID++;\n\n // TODO - lets either do all callbacks or all events.. not both!\n this.onChildrenChange(index);\n child.emit('added', this);\n this.emit('childAdded', child, this, index);\n\n return child;\n }\n\n /**\n * Swaps the position of 2 Display Objects within this container.\n *\n * @param {PIXI.DisplayObject} child - First display object to swap\n * @param {PIXI.DisplayObject} child2 - Second display object to swap\n */\n swapChildren(child: DisplayObject, child2: DisplayObject): void\n {\n if (child === child2)\n {\n return;\n }\n\n const index1 = this.getChildIndex(child);\n const index2 = this.getChildIndex(child2);\n\n this.children[index1] = child2;\n this.children[index2] = child;\n this.onChildrenChange(index1 < index2 ? index1 : index2);\n }\n\n /**\n * Returns the index position of a child DisplayObject instance\n *\n * @param {PIXI.DisplayObject} child - The DisplayObject instance to identify\n * @return {number} The index position of the child display object to identify\n */\n getChildIndex(child: DisplayObject): number\n {\n const index = this.children.indexOf(child);\n\n if (index === -1)\n {\n throw new Error('The supplied DisplayObject must be a child of the caller');\n }\n\n return index;\n }\n\n /**\n * Changes the position of an existing child in the display object container\n *\n * @param {PIXI.DisplayObject} child - The child DisplayObject instance for which you want to change the index number\n * @param {number} index - The resulting index number for the child display object\n */\n setChildIndex(child: DisplayObject, index: number): void\n {\n if (index < 0 || index >= this.children.length)\n {\n throw new Error(`The index ${index} supplied is out of bounds ${this.children.length}`);\n }\n\n const currentIndex = this.getChildIndex(child);\n\n removeItems(this.children, currentIndex, 1); // remove from old position\n this.children.splice(index, 0, child); // add at new position\n\n this.onChildrenChange(index);\n }\n\n /**\n * Returns the child at the specified index\n *\n * @param {number} index - The index to get the child at\n * @return {PIXI.DisplayObject} The child at the given index, if any.\n */\n getChildAt(index: number): DisplayObject\n {\n if (index < 0 || index >= this.children.length)\n {\n throw new Error(`getChildAt: Index (${index}) does not exist.`);\n }\n\n return this.children[index];\n }\n\n /**\n * Removes one or more children from the container.\n *\n * @param {...PIXI.DisplayObject} children - The DisplayObject(s) to remove\n * @return {PIXI.DisplayObject} The first child that was removed.\n */\n removeChild(...children: T): T[0]\n {\n // if there is only one argument we can bypass looping through the them\n if (children.length > 1)\n {\n // loop through the arguments property and remove all children\n for (let i = 0; i < children.length; i++)\n {\n this.removeChild(children[i]);\n }\n }\n else\n {\n const child = children[0];\n const index = this.children.indexOf(child);\n\n if (index === -1) return null;\n\n child.parent = null;\n // ensure child transform will be recalculated\n child.transform._parentID = -1;\n removeItems(this.children, index, 1);\n\n // ensure bounds will be recalculated\n this._boundsID++;\n\n // TODO - lets either do all callbacks or all events.. not both!\n this.onChildrenChange(index);\n child.emit('removed', this);\n this.emit('childRemoved', child, this, index);\n }\n\n return children[0];\n }\n\n /**\n * Removes a child from the specified index position.\n *\n * @param {number} index - The index to get the child from\n * @return {PIXI.DisplayObject} The child that was removed.\n */\n removeChildAt(index: number): DisplayObject\n {\n const child = this.getChildAt(index);\n\n // ensure child transform will be recalculated..\n child.parent = null;\n child.transform._parentID = -1;\n removeItems(this.children, index, 1);\n\n // ensure bounds will be recalculated\n this._boundsID++;\n\n // TODO - lets either do all callbacks or all events.. not both!\n this.onChildrenChange(index);\n child.emit('removed', this);\n this.emit('childRemoved', child, this, index);\n\n return child;\n }\n\n /**\n * Removes all children from this container that are within the begin and end indexes.\n *\n * @param {number} [beginIndex=0] - The beginning position.\n * @param {number} [endIndex=this.children.length] - The ending position. Default value is size of the container.\n * @returns {PIXI.DisplayObject[]} List of removed children\n */\n removeChildren(beginIndex = 0, endIndex = this.children.length): DisplayObject[]\n {\n const begin = beginIndex;\n const end = endIndex;\n const range = end - begin;\n let removed;\n\n if (range > 0 && range <= end)\n {\n removed = this.children.splice(begin, range);\n\n for (let i = 0; i < removed.length; ++i)\n {\n removed[i].parent = null;\n if (removed[i].transform)\n {\n removed[i].transform._parentID = -1;\n }\n }\n\n this._boundsID++;\n\n this.onChildrenChange(beginIndex);\n\n for (let i = 0; i < removed.length; ++i)\n {\n removed[i].emit('removed', this);\n this.emit('childRemoved', removed[i], this, i);\n }\n\n return removed;\n }\n else if (range === 0 && this.children.length === 0)\n {\n return [];\n }\n\n throw new RangeError('removeChildren: numeric values are outside the acceptable range.');\n }\n\n /**\n * Sorts children by zIndex. Previous order is mantained for 2 children with the same zIndex.\n */\n sortChildren(): void\n {\n let sortRequired = false;\n\n for (let i = 0, j = this.children.length; i < j; ++i)\n {\n const child = this.children[i];\n\n child._lastSortedIndex = i;\n\n if (!sortRequired && child.zIndex !== 0)\n {\n sortRequired = true;\n }\n }\n\n if (sortRequired && this.children.length > 1)\n {\n this.children.sort(sortChildren);\n }\n\n this.sortDirty = false;\n }\n\n /**\n * Updates the transform on all children of this container for rendering\n */\n updateTransform(): void\n {\n if (this.sortableChildren && this.sortDirty)\n {\n this.sortChildren();\n }\n\n this._boundsID++;\n\n this.transform.updateTransform(this.parent.transform);\n\n // TODO: check render flags, how to process stuff here\n this.worldAlpha = this.alpha * this.parent.worldAlpha;\n\n for (let i = 0, j = this.children.length; i < j; ++i)\n {\n const child = this.children[i];\n\n if (child.visible)\n {\n child.updateTransform();\n }\n }\n }\n\n /**\n * Recalculates the bounds of the container.\n *\n */\n calculateBounds(): void\n {\n this._bounds.clear();\n\n this._calculateBounds();\n\n for (let i = 0; i < this.children.length; i++)\n {\n const child = this.children[i];\n\n if (!child.visible || !child.renderable)\n {\n continue;\n }\n\n child.calculateBounds();\n\n // TODO: filter+mask, need to mask both somehow\n if (child._mask)\n {\n const maskObject = ((child._mask as MaskData).maskObject || child._mask) as Container;\n\n maskObject.calculateBounds();\n this._bounds.addBoundsMask(child._bounds, maskObject._bounds);\n }\n else if (child.filterArea)\n {\n this._bounds.addBoundsArea(child._bounds, child.filterArea);\n }\n else\n {\n this._bounds.addBounds(child._bounds);\n }\n }\n\n this._bounds.updateID = this._boundsID;\n }\n\n /**\n * Retrieves the local bounds of the displayObject as a rectangle object.\n *\n * @param {PIXI.Rectangle} [rect] - Optional rectangle to store the result of the bounds calculation.\n * @param {boolean} [skipChildrenUpdate=false] - Setting to `true` will stop re-calculation of children transforms,\n * it was default behaviour of pixi 4.0-5.2 and caused many problems to users.\n * @return {PIXI.Rectangle} The rectangular bounding area.\n */\n public getLocalBounds(rect?: Rectangle, skipChildrenUpdate = false): Rectangle\n {\n const result = super.getLocalBounds(rect);\n\n if (!skipChildrenUpdate)\n {\n for (let i = 0, j = this.children.length; i < j; ++i)\n {\n const child = this.children[i];\n\n if (child.visible)\n {\n child.updateTransform();\n }\n }\n }\n\n return result;\n }\n\n /**\n * Recalculates the bounds of the object. Override this to\n * calculate the bounds of the specific object (not including children).\n *\n * @protected\n */\n protected _calculateBounds(): void\n {\n // FILL IN//\n }\n\n /**\n * Renders the object using the WebGL renderer\n *\n * @param {PIXI.Renderer} renderer - The renderer\n */\n render(renderer: Renderer): void\n {\n // if the object is not visible or the alpha is 0 then no need to render this element\n if (!this.visible || this.worldAlpha <= 0 || !this.renderable)\n {\n return;\n }\n\n // do a quick check to see if this element has a mask or a filter.\n if (this._mask || (this.filters && this.filters.length))\n {\n this.renderAdvanced(renderer);\n }\n else\n {\n this._render(renderer);\n\n // simple render children!\n for (let i = 0, j = this.children.length; i < j; ++i)\n {\n this.children[i].render(renderer);\n }\n }\n }\n\n /**\n * Render the object using the WebGL renderer and advanced features.\n *\n * @protected\n * @param {PIXI.Renderer} renderer - The renderer\n */\n protected renderAdvanced(renderer: Renderer): void\n {\n renderer.batch.flush();\n\n const filters = this.filters;\n const mask = this._mask;\n\n // push filter first as we need to ensure the stencil buffer is correct for any masking\n if (filters)\n {\n if (!this._enabledFilters)\n {\n this._enabledFilters = [];\n }\n\n this._enabledFilters.length = 0;\n\n for (let i = 0; i < filters.length; i++)\n {\n if (filters[i].enabled)\n {\n this._enabledFilters.push(filters[i]);\n }\n }\n\n if (this._enabledFilters.length)\n {\n renderer.filter.push(this, this._enabledFilters);\n }\n }\n\n if (mask)\n {\n renderer.mask.push(this, this._mask);\n }\n\n // add this object to the batch, only rendered if it has a texture.\n this._render(renderer);\n\n // now loop through the children and make sure they get rendered\n for (let i = 0, j = this.children.length; i < j; i++)\n {\n this.children[i].render(renderer);\n }\n\n renderer.batch.flush();\n\n if (mask)\n {\n renderer.mask.pop(this);\n }\n\n if (filters && this._enabledFilters && this._enabledFilters.length)\n {\n renderer.filter.pop();\n }\n }\n\n /**\n * To be overridden by the subclasses.\n *\n * @protected\n * @param {PIXI.Renderer} renderer - The renderer\n */\n protected _render(_renderer: Renderer): void // eslint-disable-line no-unused-vars\n {\n // this is where content itself gets rendered...\n }\n\n /**\n * Removes all internal references and listeners as well as removes children from the display list.\n * Do not use a Container after calling `destroy`.\n *\n * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options\n * have been set to that value\n * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy\n * method called as well. 'options' will be passed on to those calls.\n * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true\n * Should it destroy the texture of the child sprite\n * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true\n * Should it destroy the base texture of the child sprite\n */\n destroy(options?: IDestroyOptions|boolean): void\n {\n super.destroy();\n\n this.sortDirty = false;\n\n const destroyChildren = typeof options === 'boolean' ? options : options && options.children;\n\n const oldChildren = this.removeChildren(0, this.children.length);\n\n if (destroyChildren)\n {\n for (let i = 0; i < oldChildren.length; ++i)\n {\n oldChildren[i].destroy(options);\n }\n }\n }\n\n /**\n * The width of the Container, setting this will actually modify the scale to achieve the value set\n *\n * @member {number}\n */\n get width(): number\n {\n return this.scale.x * this.getLocalBounds().width;\n }\n\n set width(value: number)\n {\n const width = this.getLocalBounds().width;\n\n if (width !== 0)\n {\n this.scale.x = value / width;\n }\n else\n {\n this.scale.x = 1;\n }\n\n this._width = value;\n }\n\n /**\n * The height of the Container, setting this will actually modify the scale to achieve the value set\n *\n * @member {number}\n */\n get height(): number\n {\n return this.scale.y * this.getLocalBounds().height;\n }\n\n set height(value: number)\n {\n const height = this.getLocalBounds().height;\n\n if (height !== 0)\n {\n this.scale.y = value / height;\n }\n else\n {\n this.scale.y = 1;\n }\n\n this._height = value;\n }\n}\n\n/**\n * Container default updateTransform, does update children of container.\n * Will crash if there's no parent element.\n *\n * @memberof PIXI.Container#\n * @function containerUpdateTransform\n */\nContainer.prototype.containerUpdateTransform = Container.prototype.updateTransform;\n","import type { DisplayObject } from '@pixi/display';\n\nexport type PointerEvents = 'auto'\n| 'none'\n| 'visiblePainted'\n| 'visibleFill'\n| 'visibleStroke'\n| 'visible'\n| 'painted'\n| 'fill'\n| 'stroke'\n| 'all'\n| 'inherit';\n\nexport interface IAccessibleTarget {\n accessible: boolean;\n accessibleTitle: string;\n accessibleHint: string;\n tabIndex: number;\n _accessibleActive: boolean;\n _accessibleDiv: IAccessibleHTMLElement;\n accessibleType: string;\n accessiblePointerEvents: PointerEvents;\n accessibleChildren: true;\n renderId: number;\n}\n\nexport interface IAccessibleHTMLElement extends HTMLElement {\n type?: string;\n displayObject?: DisplayObject;\n}\n\n/**\n * Default property values of accessible objects\n * used by {@link PIXI.AccessibilityManager}.\n *\n * @private\n * @function accessibleTarget\n * @memberof PIXI\n * @type {Object}\n * @example\n * function MyObject() {}\n *\n * Object.assign(\n * MyObject.prototype,\n * PIXI.accessibleTarget\n * );\n */\nexport const accessibleTarget: IAccessibleTarget = {\n /**\n * Flag for if the object is accessible. If true AccessibilityManager will overlay a\n * shadow div with attributes set\n *\n * @member {boolean}\n * @memberof PIXI.DisplayObject#\n */\n accessible: false,\n\n /**\n * Sets the title attribute of the shadow div\n * If accessibleTitle AND accessibleHint has not been this will default to 'displayObject [tabIndex]'\n *\n * @member {?string}\n * @memberof PIXI.DisplayObject#\n */\n accessibleTitle: null,\n\n /**\n * Sets the aria-label attribute of the shadow div\n *\n * @member {string}\n * @memberof PIXI.DisplayObject#\n */\n accessibleHint: null,\n\n /**\n * @member {number}\n * @memberof PIXI.DisplayObject#\n * @private\n * @todo Needs docs.\n */\n tabIndex: 0,\n\n /**\n * @member {boolean}\n * @memberof PIXI.DisplayObject#\n * @todo Needs docs.\n */\n _accessibleActive: false,\n\n /**\n * @member {boolean}\n * @memberof PIXI.DisplayObject#\n * @todo Needs docs.\n */\n _accessibleDiv: null,\n\n /**\n * Specify the type of div the accessible layer is. Screen readers treat the element differently\n * depending on this type. Defaults to button.\n *\n * @member {string}\n * @memberof PIXI.DisplayObject#\n * @default 'button'\n */\n accessibleType: 'button',\n\n /**\n * Specify the pointer-events the accessible div will use\n * Defaults to auto.\n *\n * @member {string}\n * @memberof PIXI.DisplayObject#\n * @default 'auto'\n */\n accessiblePointerEvents: 'auto',\n\n /**\n * Setting to false will prevent any children inside this container to\n * be accessible. Defaults to true.\n *\n * @member {boolean}\n * @memberof PIXI.DisplayObject#\n * @default true\n */\n accessibleChildren: true,\n\n renderId: -1,\n};\n","import { DisplayObject } from '@pixi/display';\nimport { isMobile, removeItems } from '@pixi/utils';\nimport { accessibleTarget } from './accessibleTarget';\n\nimport type { Rectangle } from '@pixi/math';\nimport type { Container } from '@pixi/display';\nimport type { Renderer, AbstractRenderer } from '@pixi/core';\nimport type { IAccessibleHTMLElement } from './accessibleTarget';\n\n// add some extra variables to the container..\nDisplayObject.mixin(accessibleTarget);\n\nconst KEY_CODE_TAB = 9;\n\nconst DIV_TOUCH_SIZE = 100;\nconst DIV_TOUCH_POS_X = 0;\nconst DIV_TOUCH_POS_Y = 0;\nconst DIV_TOUCH_ZINDEX = 2;\n\nconst DIV_HOOK_SIZE = 1;\nconst DIV_HOOK_POS_X = -1000;\nconst DIV_HOOK_POS_Y = -1000;\nconst DIV_HOOK_ZINDEX = 2;\n\n/**\n * The Accessibility manager recreates the ability to tab and have content read by screen readers.\n * This is very important as it can possibly help people with disabilities access PixiJS content.\n *\n * A DisplayObject can be made accessible just like it can be made interactive. This manager will map the\n * events as if the mouse was being used, minimizing the effort required to implement.\n *\n * An instance of this class is automatically created by default, and can be found at `renderer.plugins.accessibility`\n *\n * @class\n * @memberof PIXI\n */\nexport class AccessibilityManager\n{\n public debug: boolean;\n public renderer: AbstractRenderer|Renderer;\n\n private _isActive: boolean;\n private _isMobileAccessibility: boolean;\n private _hookDiv: HTMLElement;\n private div: HTMLElement;\n private pool: IAccessibleHTMLElement[];\n private renderId: number;\n private children: DisplayObject[];\n private androidUpdateCount: number;\n private androidUpdateFrequency: number;\n\n /**\n * @param {PIXI.CanvasRenderer|PIXI.Renderer} renderer - A reference to the current renderer\n */\n constructor(renderer: AbstractRenderer|Renderer)\n {\n /**\n * @type {?HTMLElement}\n * @private\n */\n this._hookDiv = null;\n\n if (isMobile.tablet || isMobile.phone)\n {\n this.createTouchHook();\n }\n\n // first we create a div that will sit over the PixiJS element. This is where the div overlays will go.\n const div = document.createElement('div');\n\n div.style.width = `${DIV_TOUCH_SIZE}px`;\n div.style.height = `${DIV_TOUCH_SIZE}px`;\n div.style.position = 'absolute';\n div.style.top = `${DIV_TOUCH_POS_X}px`;\n div.style.left = `${DIV_TOUCH_POS_Y}px`;\n div.style.zIndex = DIV_TOUCH_ZINDEX.toString();\n\n /**\n * This is the dom element that will sit over the PixiJS element. This is where the div overlays will go.\n *\n * @type {HTMLElement}\n * @private\n */\n this.div = div;\n\n /**\n * A simple pool for storing divs.\n *\n * @type {*}\n * @private\n */\n this.pool = [];\n\n /**\n * This is a tick used to check if an object is no longer being rendered.\n *\n * @type {Number}\n * @private\n */\n this.renderId = 0;\n\n /**\n * Setting this to true will visually show the divs.\n *\n * @type {boolean}\n */\n this.debug = false;\n\n /**\n * The renderer this accessibility manager works for.\n *\n * @member {PIXI.AbstractRenderer}\n */\n this.renderer = renderer;\n\n /**\n * The array of currently active accessible items.\n *\n * @member {Array<*>}\n * @private\n */\n this.children = [];\n\n /**\n * pre-bind the functions\n *\n * @type {Function}\n * @private\n */\n this._onKeyDown = this._onKeyDown.bind(this);\n\n /**\n * pre-bind the functions\n *\n * @type {Function}\n * @private\n */\n this._onMouseMove = this._onMouseMove.bind(this);\n\n this._isActive = false;\n\n this._isMobileAccessibility = false;\n\n /**\n * count to throttle div updates on android devices\n * @type number\n * @private\n */\n this.androidUpdateCount = 0;\n\n /**\n * the frequency to update the div elements ()\n * @private\n */\n this.androidUpdateFrequency = 500; // 2fps\n\n // let listen for tab.. once pressed we can fire up and show the accessibility layer\n window.addEventListener('keydown', this._onKeyDown, false);\n }\n\n /**\n * A flag\n * @member {boolean}\n * @readonly\n */\n get isActive(): boolean\n {\n return this._isActive;\n }\n\n /**\n * A flag\n * @member {boolean}\n * @readonly\n */\n get isMobileAccessibility(): boolean\n {\n return this._isMobileAccessibility;\n }\n\n /**\n * Creates the touch hooks.\n *\n * @private\n */\n private createTouchHook(): void\n {\n const hookDiv = document.createElement('button');\n\n hookDiv.style.width = `${DIV_HOOK_SIZE}px`;\n hookDiv.style.height = `${DIV_HOOK_SIZE}px`;\n hookDiv.style.position = 'absolute';\n hookDiv.style.top = `${DIV_HOOK_POS_X}px`;\n hookDiv.style.left = `${DIV_HOOK_POS_Y}px`;\n hookDiv.style.zIndex = DIV_HOOK_ZINDEX.toString();\n hookDiv.style.backgroundColor = '#FF0000';\n hookDiv.title = 'select to enable accessability for this content';\n\n hookDiv.addEventListener('focus', () =>\n {\n this._isMobileAccessibility = true;\n this.activate();\n this.destroyTouchHook();\n });\n\n document.body.appendChild(hookDiv);\n this._hookDiv = hookDiv;\n }\n\n /**\n * Destroys the touch hooks.\n *\n * @private\n */\n private destroyTouchHook(): void\n {\n if (!this._hookDiv)\n {\n return;\n }\n document.body.removeChild(this._hookDiv);\n this._hookDiv = null;\n }\n\n /**\n * Activating will cause the Accessibility layer to be shown.\n * This is called when a user presses the tab key.\n *\n * @private\n */\n private activate(): void\n {\n if (this._isActive)\n {\n return;\n }\n\n this._isActive = true;\n\n window.document.addEventListener('mousemove', this._onMouseMove, true);\n window.removeEventListener('keydown', this._onKeyDown, false);\n\n // TODO: Remove casting when CanvasRenderer is converted\n (this.renderer as AbstractRenderer).on('postrender', this.update, this);\n\n if ((this.renderer as AbstractRenderer).view.parentNode)\n {\n (this.renderer as AbstractRenderer).view.parentNode.appendChild(this.div);\n }\n }\n\n /**\n * Deactivating will cause the Accessibility layer to be hidden.\n * This is called when a user moves the mouse.\n *\n * @private\n */\n private deactivate(): void\n {\n if (!this._isActive || this._isMobileAccessibility)\n {\n return;\n }\n\n this._isActive = false;\n\n window.document.removeEventListener('mousemove', this._onMouseMove, true);\n window.addEventListener('keydown', this._onKeyDown, false);\n\n // TODO: Remove casting when CanvasRenderer is converted\n (this.renderer as AbstractRenderer).off('postrender', this.update);\n\n if (this.div.parentNode)\n {\n this.div.parentNode.removeChild(this.div);\n }\n }\n\n /**\n * This recursive function will run through the scene graph and add any new accessible objects to the DOM layer.\n *\n * @private\n * @param {PIXI.Container} displayObject - The DisplayObject to check.\n */\n private updateAccessibleObjects(displayObject: Container): void\n {\n if (!displayObject.visible || !displayObject.accessibleChildren)\n {\n return;\n }\n\n if (displayObject.accessible && displayObject.interactive)\n {\n if (!displayObject._accessibleActive)\n {\n this.addChild(displayObject);\n }\n\n displayObject.renderId = this.renderId;\n }\n\n const children = displayObject.children;\n\n for (let i = 0; i < children.length; i++)\n {\n this.updateAccessibleObjects(children[i] as Container);\n }\n }\n\n /**\n * Before each render this function will ensure that all divs are mapped correctly to their DisplayObjects.\n *\n * @private\n */\n private update(): void\n {\n /* On Android default web browser, tab order seems to be calculated by position rather than tabIndex,\n * moving buttons can cause focus to flicker between two buttons making it hard/impossible to navigate,\n * so I am just running update every half a second, seems to fix it.\n */\n const now = performance.now();\n\n if (isMobile.android.device && now < this.androidUpdateCount)\n {\n return;\n }\n\n this.androidUpdateCount = now + this.androidUpdateFrequency;\n\n if (!(this.renderer as Renderer).renderingToScreen)\n {\n return;\n }\n\n // update children...\n if (this.renderer._lastObjectRendered)\n {\n this.updateAccessibleObjects(this.renderer._lastObjectRendered as Container);\n }\n\n // TODO: Remove casting when CanvasRenderer is converted\n const rect = (this.renderer as AbstractRenderer).view.getBoundingClientRect();\n\n const resolution = this.renderer.resolution;\n\n const sx = (rect.width / (this.renderer as AbstractRenderer).width) * resolution;\n const sy = (rect.height / (this.renderer as AbstractRenderer).height) * resolution;\n\n let div = this.div;\n\n div.style.left = `${rect.left}px`;\n div.style.top = `${rect.top}px`;\n div.style.width = `${(this.renderer as AbstractRenderer).width}px`;\n div.style.height = `${(this.renderer as AbstractRenderer).height}px`;\n\n for (let i = 0; i < this.children.length; i++)\n {\n const child = this.children[i];\n\n if (child.renderId !== this.renderId)\n {\n child._accessibleActive = false;\n\n removeItems(this.children, i, 1);\n this.div.removeChild(child._accessibleDiv);\n this.pool.push(child._accessibleDiv);\n child._accessibleDiv = null;\n\n i--;\n }\n else\n {\n // map div to display..\n div = child._accessibleDiv;\n let hitArea = child.hitArea as Rectangle;\n const wt = child.worldTransform;\n\n if (child.hitArea)\n {\n div.style.left = `${(wt.tx + (hitArea.x * wt.a)) * sx}px`;\n div.style.top = `${(wt.ty + (hitArea.y * wt.d)) * sy}px`;\n\n div.style.width = `${hitArea.width * wt.a * sx}px`;\n div.style.height = `${hitArea.height * wt.d * sy}px`;\n }\n else\n {\n hitArea = child.getBounds();\n\n this.capHitArea(hitArea);\n\n div.style.left = `${hitArea.x * sx}px`;\n div.style.top = `${hitArea.y * sy}px`;\n\n div.style.width = `${hitArea.width * sx}px`;\n div.style.height = `${hitArea.height * sy}px`;\n\n // update button titles and hints if they exist and they've changed\n if (div.title !== child.accessibleTitle && child.accessibleTitle !== null)\n {\n div.title = child.accessibleTitle;\n }\n if (div.getAttribute('aria-label') !== child.accessibleHint\n && child.accessibleHint !== null)\n {\n div.setAttribute('aria-label', child.accessibleHint);\n }\n }\n\n // the title or index may have changed, if so lets update it!\n if (child.accessibleTitle !== div.title || child.tabIndex !== div.tabIndex)\n {\n div.title = child.accessibleTitle;\n div.tabIndex = child.tabIndex;\n if (this.debug) this.updateDebugHTML(div);\n }\n }\n }\n\n // increment the render id..\n this.renderId++;\n }\n\n /**\n * private function that will visually add the information to the\n * accessability div\n *\n * @param {HTMLElement} div\n */\n public updateDebugHTML(div: IAccessibleHTMLElement): void\n {\n div.innerHTML = `type: ${div.type}
title : ${div.title}
tabIndex: ${div.tabIndex}`;\n }\n\n /**\n * Adjust the hit area based on the bounds of a display object\n *\n * @param {PIXI.Rectangle} hitArea - Bounds of the child\n */\n public capHitArea(hitArea: Rectangle): void\n {\n if (hitArea.x < 0)\n {\n hitArea.width += hitArea.x;\n hitArea.x = 0;\n }\n\n if (hitArea.y < 0)\n {\n hitArea.height += hitArea.y;\n hitArea.y = 0;\n }\n\n // TODO: Remove casting when CanvasRenderer is converted\n if (hitArea.x + hitArea.width > (this.renderer as AbstractRenderer).width)\n {\n hitArea.width = (this.renderer as AbstractRenderer).width - hitArea.x;\n }\n\n if (hitArea.y + hitArea.height > (this.renderer as AbstractRenderer).height)\n {\n hitArea.height = (this.renderer as AbstractRenderer).height - hitArea.y;\n }\n }\n\n /**\n * Adds a DisplayObject to the accessibility manager\n *\n * @private\n * @param {PIXI.DisplayObject} displayObject - The child to make accessible.\n */\n private addChild(displayObject: T): void\n {\n // this.activate();\n\n let div = this.pool.pop();\n\n if (!div)\n {\n div = document.createElement('button');\n\n div.style.width = `${DIV_TOUCH_SIZE}px`;\n div.style.height = `${DIV_TOUCH_SIZE}px`;\n div.style.backgroundColor = this.debug ? 'rgba(255,255,255,0.5)' : 'transparent';\n div.style.position = 'absolute';\n div.style.zIndex = DIV_TOUCH_ZINDEX.toString();\n div.style.borderStyle = 'none';\n\n // ARIA attributes ensure that button title and hint updates are announced properly\n if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1)\n {\n // Chrome doesn't need aria-live to work as intended; in fact it just gets more confused.\n div.setAttribute('aria-live', 'off');\n }\n else\n {\n div.setAttribute('aria-live', 'polite');\n }\n\n if (navigator.userAgent.match(/rv:.*Gecko\\//))\n {\n // FireFox needs this to announce only the new button name\n div.setAttribute('aria-relevant', 'additions');\n }\n else\n {\n // required by IE, other browsers don't much care\n div.setAttribute('aria-relevant', 'text');\n }\n\n div.addEventListener('click', this._onClick.bind(this));\n div.addEventListener('focus', this._onFocus.bind(this));\n div.addEventListener('focusout', this._onFocusOut.bind(this));\n }\n\n // set pointer events\n div.style.pointerEvents = displayObject.accessiblePointerEvents;\n // set the type, this defaults to button!\n div.type = displayObject.accessibleType;\n\n if (displayObject.accessibleTitle && displayObject.accessibleTitle !== null)\n {\n div.title = displayObject.accessibleTitle;\n }\n else if (!displayObject.accessibleHint\n || displayObject.accessibleHint === null)\n {\n div.title = `displayObject ${displayObject.tabIndex}`;\n }\n\n if (displayObject.accessibleHint\n && displayObject.accessibleHint !== null)\n {\n div.setAttribute('aria-label', displayObject.accessibleHint);\n }\n\n if (this.debug) this.updateDebugHTML(div);\n\n displayObject._accessibleActive = true;\n displayObject._accessibleDiv = div;\n div.displayObject = displayObject;\n\n this.children.push(displayObject);\n this.div.appendChild(displayObject._accessibleDiv);\n displayObject._accessibleDiv.tabIndex = displayObject.tabIndex;\n }\n\n /**\n * Maps the div button press to pixi's InteractionManager (click)\n *\n * @private\n * @param {MouseEvent} e - The click event.\n */\n private _onClick(e: MouseEvent): void\n {\n // TODO: Remove casting when CanvasRenderer is converted\n const interactionManager = (this.renderer as AbstractRenderer).plugins.interaction;\n\n interactionManager.dispatchEvent(\n (e.target as IAccessibleHTMLElement).displayObject, 'click', interactionManager.eventData\n );\n interactionManager.dispatchEvent(\n (e.target as IAccessibleHTMLElement).displayObject, 'pointertap', interactionManager.eventData\n );\n interactionManager.dispatchEvent(\n (e.target as IAccessibleHTMLElement).displayObject, 'tap', interactionManager.eventData\n );\n }\n\n /**\n * Maps the div focus events to pixi's InteractionManager (mouseover)\n *\n * @private\n * @param {FocusEvent} e - The focus event.\n */\n private _onFocus(e: FocusEvent): void\n {\n if (!(e.target as Element).getAttribute('aria-live'))\n {\n (e.target as Element).setAttribute('aria-live', 'assertive');\n }\n\n // TODO: Remove casting when CanvasRenderer is converted\n const interactionManager = (this.renderer as AbstractRenderer).plugins.interaction;\n\n interactionManager.dispatchEvent(\n (e.target as IAccessibleHTMLElement).displayObject, 'mouseover', interactionManager.eventData\n );\n }\n\n /**\n * Maps the div focus events to pixi's InteractionManager (mouseout)\n *\n * @private\n * @param {FocusEvent} e - The focusout event.\n */\n private _onFocusOut(e: FocusEvent): void\n {\n if (!(e.target as Element).getAttribute('aria-live'))\n {\n (e.target as Element).setAttribute('aria-live', 'polite');\n }\n\n // TODO: Remove casting when CanvasRenderer is converted\n const interactionManager = (this.renderer as AbstractRenderer).plugins.interaction;\n\n interactionManager.dispatchEvent((e.target as any).displayObject, 'mouseout', interactionManager.eventData);\n }\n\n /**\n * Is called when a key is pressed\n *\n * @private\n * @param {KeyboardEvent} e - The keydown event.\n */\n private _onKeyDown(e: KeyboardEvent): void\n {\n if (e.keyCode !== KEY_CODE_TAB)\n {\n return;\n }\n\n this.activate();\n }\n\n /**\n * Is called when the mouse moves across the renderer element\n *\n * @private\n * @param {MouseEvent} e - The mouse event.\n */\n private _onMouseMove(e: MouseEvent): void\n {\n if (e.movementX === 0 && e.movementY === 0)\n {\n return;\n }\n\n this.deactivate();\n }\n\n /**\n * Destroys the accessibility manager\n *\n */\n public destroy(): void\n {\n this.destroyTouchHook();\n this.div = null;\n\n window.document.removeEventListener('mousemove', this._onMouseMove, true);\n window.removeEventListener('keydown', this._onKeyDown);\n\n this.pool = null;\n this.children = null;\n this.renderer = null;\n }\n}\n","import { TickerCallback } from './Ticker';\n\n/**\n * Internal class for handling the priority sorting of ticker handlers.\n *\n * @private\n * @class\n * @memberof PIXI\n */\nexport class TickerListener\n{\n public priority: number;\n public next: TickerListener;\n public previous: TickerListener;\n\n private fn: TickerCallback;\n private context: T;\n private once: boolean;\n private _destroyed: boolean;\n\n /**\n * Constructor\n * @private\n * @param {Function} fn - The listener function to be added for one update\n * @param {*} [context=null] - The listener context\n * @param {number} [priority=0] - The priority for emitting\n * @param {boolean} [once=false] - If the handler should fire once\n */\n constructor(fn: TickerCallback, context: T = null, priority = 0, once = false)\n {\n /**\n * The handler function to execute.\n * @private\n * @member {Function}\n */\n this.fn = fn;\n\n /**\n * The calling to execute.\n * @private\n * @member {*}\n */\n this.context = context;\n\n /**\n * The current priority.\n * @private\n * @member {number}\n */\n this.priority = priority;\n\n /**\n * If this should only execute once.\n * @private\n * @member {boolean}\n */\n this.once = once;\n\n /**\n * The next item in chain.\n * @private\n * @member {TickerListener}\n */\n this.next = null;\n\n /**\n * The previous item in chain.\n * @private\n * @member {TickerListener}\n */\n this.previous = null;\n\n /**\n * `true` if this listener has been destroyed already.\n * @member {boolean}\n * @private\n */\n this._destroyed = false;\n }\n\n /**\n * Simple compare function to figure out if a function and context match.\n * @private\n * @param {Function} fn - The listener function to be added for one update\n * @param {any} [context] - The listener context\n * @return {boolean} `true` if the listener match the arguments\n */\n match(fn: TickerCallback, context: any = null): boolean\n {\n return this.fn === fn && this.context === context;\n }\n\n /**\n * Emit by calling the current function.\n * @private\n * @param {number} deltaTime - time since the last emit.\n * @return {TickerListener} Next ticker\n */\n emit(deltaTime: number): TickerListener\n {\n if (this.fn)\n {\n if (this.context)\n {\n this.fn.call(this.context, deltaTime);\n }\n else\n {\n (this as TickerListener).fn(deltaTime);\n }\n }\n\n const redirect = this.next;\n\n if (this.once)\n {\n this.destroy(true);\n }\n\n // Soft-destroying should remove\n // the next reference\n if (this._destroyed)\n {\n this.next = null;\n }\n\n return redirect;\n }\n\n /**\n * Connect to the list.\n * @private\n * @param {TickerListener} previous - Input node, previous listener\n */\n connect(previous: TickerListener): void\n {\n this.previous = previous;\n if (previous.next)\n {\n previous.next.previous = this;\n }\n this.next = previous.next;\n previous.next = this;\n }\n\n /**\n * Destroy and don't use after this.\n * @private\n * @param {boolean} [hard = false] `true` to remove the `next` reference, this\n * is considered a hard destroy. Soft destroy maintains the next reference.\n * @return {TickerListener} The listener to redirect while emitting or removing.\n */\n destroy(hard = false): TickerListener\n {\n this._destroyed = true;\n this.fn = null;\n this.context = null;\n\n // Disconnect, hook up next and previous\n if (this.previous)\n {\n this.previous.next = this.next;\n }\n\n if (this.next)\n {\n this.next.previous = this.previous;\n }\n\n // Redirect to the next item\n const redirect = this.next;\n\n // Remove references\n this.next = hard ? null : redirect;\n this.previous = null;\n\n return redirect;\n }\n}\n","import { settings } from './settings';\nimport { UPDATE_PRIORITY } from './const';\nimport { TickerListener } from './TickerListener';\n\nexport type TickerCallback = (this: T, dt: number) => any;\n\n/**\n * A Ticker class that runs an update loop that other objects listen to.\n *\n * This class is composed around listeners meant for execution on the next requested animation frame.\n * Animation frames are requested only when necessary, e.g. When the ticker is started and the emitter has listeners.\n *\n * @class\n * @memberof PIXI\n */\nexport class Ticker\n{\n static _shared: Ticker;\n static _system: Ticker;\n\n public autoStart: boolean;\n public deltaTime: number;\n public deltaMS: number;\n public elapsedMS: number;\n public lastTime: number;\n public speed: number;\n public started: boolean;\n\n private _head: TickerListener;\n private _requestId: number;\n private _maxElapsedMS: number;\n private _minElapsedMS: number;\n private _protected: boolean;\n private _lastFrame: number;\n private _tick: (time: number) => any;\n\n constructor()\n {\n /**\n * The first listener. All new listeners added are chained on this.\n * @private\n * @type {TickerListener}\n */\n this._head = new TickerListener(null, null, Infinity);\n\n /**\n * Internal current frame request ID\n * @type {?number}\n * @private\n */\n this._requestId = null;\n\n /**\n * Internal value managed by minFPS property setter and getter.\n * This is the maximum allowed milliseconds between updates.\n * @type {number}\n * @private\n */\n this._maxElapsedMS = 100;\n\n /**\n * Internal value managed by maxFPS property setter and getter.\n * This is the minimum allowed milliseconds between updates.\n * @type {number}\n * @private\n */\n this._minElapsedMS = 0;\n\n /**\n * Whether or not this ticker should invoke the method\n * {@link PIXI.Ticker#start} automatically\n * when a listener is added.\n *\n * @member {boolean}\n * @default false\n */\n this.autoStart = false;\n\n /**\n * Scalar time value from last frame to this frame.\n * This value is capped by setting {@link PIXI.Ticker#minFPS}\n * and is scaled with {@link PIXI.Ticker#speed}.\n * **Note:** The cap may be exceeded by scaling.\n *\n * @member {number}\n * @default 1\n */\n this.deltaTime = 1;\n\n /**\n * Scaler time elapsed in milliseconds from last frame to this frame.\n * This value is capped by setting {@link PIXI.Ticker#minFPS}\n * and is scaled with {@link PIXI.Ticker#speed}.\n * **Note:** The cap may be exceeded by scaling.\n * If the platform supports DOMHighResTimeStamp,\n * this value will have a precision of 1 µs.\n * Defaults to target frame time\n *\n * @member {number}\n * @default 16.66\n */\n this.deltaMS = 1 / settings.TARGET_FPMS;\n\n /**\n * Time elapsed in milliseconds from last frame to this frame.\n * Opposed to what the scalar {@link PIXI.Ticker#deltaTime}\n * is based, this value is neither capped nor scaled.\n * If the platform supports DOMHighResTimeStamp,\n * this value will have a precision of 1 µs.\n * Defaults to target frame time\n *\n * @member {number}\n * @default 16.66\n */\n this.elapsedMS = 1 / settings.TARGET_FPMS;\n\n /**\n * The last time {@link PIXI.Ticker#update} was invoked.\n * This value is also reset internally outside of invoking\n * update, but only when a new animation frame is requested.\n * If the platform supports DOMHighResTimeStamp,\n * this value will have a precision of 1 µs.\n *\n * @member {number}\n * @default -1\n */\n this.lastTime = -1;\n\n /**\n * Factor of current {@link PIXI.Ticker#deltaTime}.\n * @example\n * // Scales ticker.deltaTime to what would be\n * // the equivalent of approximately 120 FPS\n * ticker.speed = 2;\n *\n * @member {number}\n * @default 1\n */\n this.speed = 1;\n\n /**\n * Whether or not this ticker has been started.\n * `true` if {@link PIXI.Ticker#start} has been called.\n * `false` if {@link PIXI.Ticker#stop} has been called.\n * While `false`, this value may change to `true` in the\n * event of {@link PIXI.Ticker#autoStart} being `true`\n * and a listener is added.\n *\n * @member {boolean}\n * @default false\n */\n this.started = false;\n\n /**\n * If enabled, deleting is disabled.\n * @member {boolean}\n * @default false\n * @private\n */\n this._protected = false;\n\n /**\n * The last time keyframe was executed.\n * Maintains a relatively fixed interval with the previous value.\n * @member {number}\n * @default -1\n * @private\n */\n this._lastFrame = -1;\n\n /**\n * Internal tick method bound to ticker instance.\n * This is because in early 2015, Function.bind\n * is still 60% slower in high performance scenarios.\n * Also separating frame requests from update method\n * so listeners may be called at any time and with\n * any animation API, just invoke ticker.update(time).\n *\n * @private\n * @param {number} time - Time since last tick.\n */\n this._tick = (time: number): void =>\n {\n this._requestId = null;\n\n if (this.started)\n {\n // Invoke listeners now\n this.update(time);\n // Listener side effects may have modified ticker state.\n if (this.started && this._requestId === null && this._head.next)\n {\n this._requestId = requestAnimationFrame(this._tick);\n }\n }\n };\n }\n\n /**\n * Conditionally requests a new animation frame.\n * If a frame has not already been requested, and if the internal\n * emitter has listeners, a new frame is requested.\n *\n * @private\n */\n private _requestIfNeeded(): void\n {\n if (this._requestId === null && this._head.next)\n {\n // ensure callbacks get correct delta\n this.lastTime = performance.now();\n this._lastFrame = this.lastTime;\n this._requestId = requestAnimationFrame(this._tick);\n }\n }\n\n /**\n * Conditionally cancels a pending animation frame.\n *\n * @private\n */\n private _cancelIfNeeded(): void\n {\n if (this._requestId !== null)\n {\n cancelAnimationFrame(this._requestId);\n this._requestId = null;\n }\n }\n\n /**\n * Conditionally requests a new animation frame.\n * If the ticker has been started it checks if a frame has not already\n * been requested, and if the internal emitter has listeners. If these\n * conditions are met, a new frame is requested. If the ticker has not\n * been started, but autoStart is `true`, then the ticker starts now,\n * and continues with the previous conditions to request a new frame.\n *\n * @private\n */\n private _startIfPossible(): void\n {\n if (this.started)\n {\n this._requestIfNeeded();\n }\n else if (this.autoStart)\n {\n this.start();\n }\n }\n\n /**\n * Register a handler for tick events. Calls continuously unless\n * it is removed or the ticker is stopped.\n *\n * @param {Function} fn - The listener function to be added for updates\n * @param {*} [context] - The listener context\n * @param {number} [priority=PIXI.UPDATE_PRIORITY.NORMAL] - The priority for emitting\n * @returns {PIXI.Ticker} This instance of a ticker\n */\n add(fn: TickerCallback, context: T, priority = UPDATE_PRIORITY.NORMAL): this\n {\n return this._addListener(new TickerListener(fn, context, priority));\n }\n\n /**\n * Add a handler for the tick event which is only execute once.\n *\n * @param {Function} fn - The listener function to be added for one update\n * @param {*} [context] - The listener context\n * @param {number} [priority=PIXI.UPDATE_PRIORITY.NORMAL] - The priority for emitting\n * @returns {PIXI.Ticker} This instance of a ticker\n */\n addOnce(fn: TickerCallback, context: T, priority = UPDATE_PRIORITY.NORMAL): this\n {\n return this._addListener(new TickerListener(fn, context, priority, true));\n }\n\n /**\n * Internally adds the event handler so that it can be sorted by priority.\n * Priority allows certain handler (user, AnimatedSprite, Interaction) to be run\n * before the rendering.\n *\n * @private\n * @param {TickerListener} listener - Current listener being added.\n * @returns {PIXI.Ticker} This instance of a ticker\n */\n private _addListener(listener: TickerListener): this\n {\n // For attaching to head\n let current = this._head.next;\n let previous = this._head;\n\n // Add the first item\n if (!current)\n {\n listener.connect(previous);\n }\n else\n {\n // Go from highest to lowest priority\n while (current)\n {\n if (listener.priority > current.priority)\n {\n listener.connect(previous);\n break;\n }\n previous = current;\n current = current.next;\n }\n\n // Not yet connected\n if (!listener.previous)\n {\n listener.connect(previous);\n }\n }\n\n this._startIfPossible();\n\n return this;\n }\n\n /**\n * Removes any handlers matching the function and context parameters.\n * If no handlers are left after removing, then it cancels the animation frame.\n *\n * @param {Function} fn - The listener function to be removed\n * @param {*} [context] - The listener context to be removed\n * @returns {PIXI.Ticker} This instance of a ticker\n */\n remove(fn: TickerCallback, context: T): this\n {\n let listener = this._head.next;\n\n while (listener)\n {\n // We found a match, lets remove it\n // no break to delete all possible matches\n // incase a listener was added 2+ times\n if (listener.match(fn, context))\n {\n listener = listener.destroy();\n }\n else\n {\n listener = listener.next;\n }\n }\n\n if (!this._head.next)\n {\n this._cancelIfNeeded();\n }\n\n return this;\n }\n\n /**\n * The number of listeners on this ticker, calculated by walking through linked list\n *\n * @readonly\n * @member {number}\n */\n get count(): number\n {\n if (!this._head)\n {\n return 0;\n }\n\n let count = 0;\n let current = this._head;\n\n while ((current = current.next))\n {\n count++;\n }\n\n return count;\n }\n\n /**\n * Starts the ticker. If the ticker has listeners\n * a new animation frame is requested at this point.\n */\n start(): void\n {\n if (!this.started)\n {\n this.started = true;\n this._requestIfNeeded();\n }\n }\n\n /**\n * Stops the ticker. If the ticker has requested\n * an animation frame it is canceled at this point.\n */\n stop(): void\n {\n if (this.started)\n {\n this.started = false;\n this._cancelIfNeeded();\n }\n }\n\n /**\n * Destroy the ticker and don't use after this. Calling\n * this method removes all references to internal events.\n */\n destroy(): void\n {\n if (!this._protected)\n {\n this.stop();\n\n let listener = this._head.next;\n\n while (listener)\n {\n listener = listener.destroy(true);\n }\n\n this._head.destroy();\n this._head = null;\n }\n }\n\n /**\n * Triggers an update. An update entails setting the\n * current {@link PIXI.Ticker#elapsedMS},\n * the current {@link PIXI.Ticker#deltaTime},\n * invoking all listeners with current deltaTime,\n * and then finally setting {@link PIXI.Ticker#lastTime}\n * with the value of currentTime that was provided.\n * This method will be called automatically by animation\n * frame callbacks if the ticker instance has been started\n * and listeners are added.\n *\n * @param {number} [currentTime=performance.now()] - the current time of execution\n */\n update(currentTime = performance.now()): void\n {\n let elapsedMS;\n\n // If the difference in time is zero or negative, we ignore most of the work done here.\n // If there is no valid difference, then should be no reason to let anyone know about it.\n // A zero delta, is exactly that, nothing should update.\n //\n // The difference in time can be negative, and no this does not mean time traveling.\n // This can be the result of a race condition between when an animation frame is requested\n // on the current JavaScript engine event loop, and when the ticker's start method is invoked\n // (which invokes the internal _requestIfNeeded method). If a frame is requested before\n // _requestIfNeeded is invoked, then the callback for the animation frame the ticker requests,\n // can receive a time argument that can be less than the lastTime value that was set within\n // _requestIfNeeded. This difference is in microseconds, but this is enough to cause problems.\n //\n // This check covers this browser engine timing issue, as well as if consumers pass an invalid\n // currentTime value. This may happen if consumers opt-out of the autoStart, and update themselves.\n\n if (currentTime > this.lastTime)\n {\n // Save uncapped elapsedMS for measurement\n elapsedMS = this.elapsedMS = currentTime - this.lastTime;\n\n // cap the milliseconds elapsed used for deltaTime\n if (elapsedMS > this._maxElapsedMS)\n {\n elapsedMS = this._maxElapsedMS;\n }\n\n elapsedMS *= this.speed;\n\n // If not enough time has passed, exit the function.\n // Get ready for next frame by setting _lastFrame, but based on _minElapsedMS\n // adjustment to ensure a relatively stable interval.\n if (this._minElapsedMS)\n {\n const delta = currentTime - this._lastFrame | 0;\n\n if (delta < this._minElapsedMS)\n {\n return;\n }\n\n this._lastFrame = currentTime - (delta % this._minElapsedMS);\n }\n\n this.deltaMS = elapsedMS;\n this.deltaTime = this.deltaMS * settings.TARGET_FPMS;\n\n // Cache a local reference, in-case ticker is destroyed\n // during the emit, we can still check for head.next\n const head = this._head;\n\n // Invoke listeners added to internal emitter\n let listener = head.next;\n\n while (listener)\n {\n listener = listener.emit(this.deltaTime);\n }\n\n if (!head.next)\n {\n this._cancelIfNeeded();\n }\n }\n else\n {\n this.deltaTime = this.deltaMS = this.elapsedMS = 0;\n }\n\n this.lastTime = currentTime;\n }\n\n /**\n * The frames per second at which this ticker is running.\n * The default is approximately 60 in most modern browsers.\n * **Note:** This does not factor in the value of\n * {@link PIXI.Ticker#speed}, which is specific\n * to scaling {@link PIXI.Ticker#deltaTime}.\n *\n * @member {number}\n * @readonly\n */\n get FPS(): number\n {\n return 1000 / this.elapsedMS;\n }\n\n /**\n * Manages the maximum amount of milliseconds allowed to\n * elapse between invoking {@link PIXI.Ticker#update}.\n * This value is used to cap {@link PIXI.Ticker#deltaTime},\n * but does not effect the measured value of {@link PIXI.Ticker#FPS}.\n * When setting this property it is clamped to a value between\n * `0` and `PIXI.settings.TARGET_FPMS * 1000`.\n *\n * @member {number}\n * @default 10\n */\n get minFPS(): number\n {\n return 1000 / this._maxElapsedMS;\n }\n\n set minFPS(fps: number)\n {\n // Minimum must be below the maxFPS\n const minFPS = Math.min(this.maxFPS, fps);\n\n // Must be at least 0, but below 1 / settings.TARGET_FPMS\n const minFPMS = Math.min(Math.max(0, minFPS) / 1000, settings.TARGET_FPMS);\n\n this._maxElapsedMS = 1 / minFPMS;\n }\n\n /**\n * Manages the minimum amount of milliseconds required to\n * elapse between invoking {@link PIXI.Ticker#update}.\n * This will effect the measured value of {@link PIXI.Ticker#FPS}.\n * If it is set to `0`, then there is no limit; PixiJS will render as many frames as it can.\n * Otherwise it will be at least `minFPS`\n *\n * @member {number}\n * @default 0\n */\n get maxFPS(): number\n {\n if (this._minElapsedMS)\n {\n return Math.round(1000 / this._minElapsedMS);\n }\n\n return 0;\n }\n\n set maxFPS(fps: number)\n {\n if (fps === 0)\n {\n this._minElapsedMS = 0;\n }\n else\n {\n // Max must be at least the minFPS\n const maxFPS = Math.max(this.minFPS, fps);\n\n this._minElapsedMS = 1 / (maxFPS / 1000);\n }\n }\n\n /**\n * The shared ticker instance used by {@link PIXI.AnimatedSprite} and by\n * {@link PIXI.VideoResource} to update animation frames / video textures.\n *\n * It may also be used by {@link PIXI.Application} if created with the `sharedTicker` option property set to true.\n *\n * The property {@link PIXI.Ticker#autoStart} is set to `true` for this instance.\n * Please follow the examples for usage, including how to opt-out of auto-starting the shared ticker.\n *\n * @example\n * let ticker = PIXI.Ticker.shared;\n * // Set this to prevent starting this ticker when listeners are added.\n * // By default this is true only for the PIXI.Ticker.shared instance.\n * ticker.autoStart = false;\n * // FYI, call this to ensure the ticker is stopped. It should be stopped\n * // if you have not attempted to render anything yet.\n * ticker.stop();\n * // Call this when you are ready for a running shared ticker.\n * ticker.start();\n *\n * @example\n * // You may use the shared ticker to render...\n * let renderer = PIXI.autoDetectRenderer();\n * let stage = new PIXI.Container();\n * document.body.appendChild(renderer.view);\n * ticker.add(function (time) {\n * renderer.render(stage);\n * });\n *\n * @example\n * // Or you can just update it manually.\n * ticker.autoStart = false;\n * ticker.stop();\n * function animate(time) {\n * ticker.update(time);\n * renderer.render(stage);\n * requestAnimationFrame(animate);\n * }\n * animate(performance.now());\n *\n * @member {PIXI.Ticker}\n * @static\n */\n static get shared(): Ticker\n {\n if (!Ticker._shared)\n {\n const shared = Ticker._shared = new Ticker();\n\n shared.autoStart = true;\n shared._protected = true;\n }\n\n return Ticker._shared;\n }\n\n /**\n * The system ticker instance used by {@link PIXI.InteractionManager} and by\n * {@link PIXI.BasePrepare} for core timing functionality that shouldn't usually need to be paused,\n * unlike the `shared` ticker which drives visual animations and rendering which may want to be paused.\n *\n * The property {@link PIXI.Ticker#autoStart} is set to `true` for this instance.\n *\n * @member {PIXI.Ticker}\n * @static\n */\n static get system(): Ticker\n {\n if (!Ticker._system)\n {\n const system = Ticker._system = new Ticker();\n\n system.autoStart = true;\n system._protected = true;\n }\n\n return Ticker._system;\n }\n}\n","import { UPDATE_PRIORITY } from './const';\nimport { Ticker } from './Ticker';\n\nimport type { IApplicationOptions } from '@pixi/app';\n\n/**\n * Middleware for for Application Ticker.\n *\n * @example\n * import {TickerPlugin} from '@pixi/ticker';\n * import {Application} from '@pixi/app';\n * Application.registerPlugin(TickerPlugin);\n *\n * @class\n * @memberof PIXI\n */\nexport class TickerPlugin\n{\n static start: () => void;\n static stop: () => void;\n static _ticker: Ticker;\n static ticker: Ticker;\n\n /**\n * Initialize the plugin with scope of application instance\n *\n * @static\n * @private\n * @param {object} [options] - See application options\n */\n static init(options?: IApplicationOptions): void\n {\n // Set default\n options = Object.assign({\n autoStart: true,\n sharedTicker: false,\n }, options);\n\n // Create ticker setter\n Object.defineProperty(this, 'ticker',\n {\n set(ticker)\n {\n if (this._ticker)\n {\n this._ticker.remove(this.render, this);\n }\n this._ticker = ticker;\n if (ticker)\n {\n ticker.add(this.render, this, UPDATE_PRIORITY.LOW);\n }\n },\n get()\n {\n return this._ticker;\n },\n });\n\n /**\n * Convenience method for stopping the render.\n *\n * @method PIXI.Application#stop\n */\n this.stop = (): void =>\n {\n this._ticker.stop();\n };\n\n /**\n * Convenience method for starting the render.\n *\n * @method PIXI.Application#start\n */\n this.start = (): void =>\n {\n this._ticker.start();\n };\n\n /**\n * Internal reference to the ticker.\n *\n * @type {PIXI.Ticker}\n * @name _ticker\n * @memberof PIXI.Application#\n * @private\n */\n this._ticker = null;\n\n /**\n * Ticker for doing render updates.\n *\n * @type {PIXI.Ticker}\n * @name ticker\n * @memberof PIXI.Application#\n * @default PIXI.Ticker.shared\n */\n this.ticker = options.sharedTicker ? Ticker.shared : new Ticker();\n\n // Start the rendering\n if (options.autoStart)\n {\n this.start();\n }\n }\n\n /**\n * Clean up the ticker, scoped to application.\n *\n * @static\n * @private\n */\n static destroy(): void\n {\n if (this._ticker)\n {\n const oldTicker = this._ticker;\n\n this.ticker = null;\n oldTicker.destroy();\n }\n }\n}\n","import { Point, IPointData } from '@pixi/math';\n\nimport type { DisplayObject } from '@pixi/display';\n\nexport type InteractivePointerEvent = PointerEvent | TouchEvent | MouseEvent;\n\n/**\n * Holds all information related to an Interaction event\n *\n * @class\n * @memberof PIXI\n */\nexport class InteractionData\n{\n public global: Point;\n public target: DisplayObject;\n public originalEvent: InteractivePointerEvent;\n public identifier: number;\n public isPrimary: boolean;\n public button: number;\n public buttons: number;\n public width: number;\n public height: number;\n public tiltX: number;\n public tiltY: number;\n public pointerType: string;\n public pressure = 0;\n public rotationAngle = 0;\n public twist = 0;\n public tangentialPressure = 0;\n\n constructor()\n {\n /**\n * This point stores the global coords of where the touch/mouse event happened\n *\n * @member {PIXI.Point}\n */\n this.global = new Point();\n\n /**\n * The target Sprite that was interacted with\n *\n * @member {PIXI.Sprite}\n */\n this.target = null;\n\n /**\n * When passed to an event handler, this will be the original DOM Event that was captured\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent\n * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent\n * @member {MouseEvent|TouchEvent|PointerEvent}\n */\n this.originalEvent = null;\n\n /**\n * Unique identifier for this interaction\n *\n * @member {number}\n */\n this.identifier = null;\n\n /**\n * Indicates whether or not the pointer device that created the event is the primary pointer.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/isPrimary\n * @type {Boolean}\n */\n this.isPrimary = false;\n\n /**\n * Indicates which button was pressed on the mouse or pointer device to trigger the event.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button\n * @type {number}\n */\n this.button = 0;\n\n /**\n * Indicates which buttons are pressed on the mouse or pointer device when the event is triggered.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons\n * @type {number}\n */\n this.buttons = 0;\n\n /**\n * The width of the pointer's contact along the x-axis, measured in CSS pixels.\n * radiusX of TouchEvents will be represented by this value.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/width\n * @type {number}\n */\n this.width = 0;\n\n /**\n * The height of the pointer's contact along the y-axis, measured in CSS pixels.\n * radiusY of TouchEvents will be represented by this value.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/height\n * @type {number}\n */\n this.height = 0;\n\n /**\n * The angle, in degrees, between the pointer device and the screen.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltX\n * @type {number}\n */\n this.tiltX = 0;\n\n /**\n * The angle, in degrees, between the pointer device and the screen.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltY\n * @type {number}\n */\n this.tiltY = 0;\n\n /**\n * The type of pointer that triggered the event.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerType\n * @type {string}\n */\n this.pointerType = null;\n\n /**\n * Pressure applied by the pointing device during the event. A Touch's force property\n * will be represented by this value.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pressure\n * @type {number}\n */\n this.pressure = 0;\n\n /**\n * From TouchEvents (not PointerEvents triggered by touches), the rotationAngle of the Touch.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Touch/rotationAngle\n * @type {number}\n */\n this.rotationAngle = 0;\n\n /**\n * Twist of a stylus pointer.\n * @see https://w3c.github.io/pointerevents/#pointerevent-interface\n * @type {number}\n */\n this.twist = 0;\n\n /**\n * Barrel pressure on a stylus pointer.\n * @see https://w3c.github.io/pointerevents/#pointerevent-interface\n * @type {number}\n */\n this.tangentialPressure = 0;\n }\n\n /**\n * The unique identifier of the pointer. It will be the same as `identifier`.\n * @readonly\n * @member {number}\n * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerId\n */\n get pointerId(): number\n {\n return this.identifier;\n }\n\n /**\n * This will return the local coordinates of the specified displayObject for this InteractionData\n *\n * @param {PIXI.DisplayObject} displayObject - The DisplayObject that you would like the local\n * coords off\n * @param {PIXI.Point} [point] - A Point object in which to store the value, optional (otherwise\n * will create a new point)\n * @param {PIXI.Point} [globalPos] - A Point object containing your custom global coords, optional\n * (otherwise will use the current global coords)\n * @return {PIXI.Point} A point containing the coordinates of the InteractionData position relative\n * to the DisplayObject\n */\n public getLocalPosition

(displayObject: DisplayObject, point?: P, globalPos?: IPointData): P\n {\n return displayObject.worldTransform.applyInverse

(globalPos || this.global, point);\n }\n\n /**\n * Copies properties from normalized event data.\n *\n * @param {Touch|MouseEvent|PointerEvent} event - The normalized event data\n */\n public copyEvent(event: Touch | InteractivePointerEvent): void\n {\n // isPrimary should only change on touchstart/pointerdown, so we don't want to overwrite\n // it with \"false\" on later events when our shim for it on touch events might not be\n // accurate\n if ('isPrimary' in event && event.isPrimary)\n {\n this.isPrimary = true;\n }\n this.button = 'button' in event && event.button;\n // event.buttons is not available in all browsers (ie. Safari), but it does have a non-standard\n // event.which property instead, which conveys the same information.\n const buttons = 'buttons' in event && event.buttons;\n\n this.buttons = Number.isInteger(buttons) ? buttons : 'which' in event && event.which;\n this.width = 'width' in event && event.width;\n this.height = 'height' in event && event.height;\n this.tiltX = 'tiltX' in event && event.tiltX;\n this.tiltY = 'tiltY' in event && event.tiltY;\n this.pointerType = 'pointerType' in event && event.pointerType;\n this.pressure = 'pressure' in event && event.pressure;\n this.rotationAngle = 'rotationAngle' in event && event.rotationAngle;\n this.twist = ('twist' in event && event.twist) || 0;\n this.tangentialPressure = ('tangentialPressure' in event && event.tangentialPressure) || 0;\n }\n\n /**\n * Resets the data for pooling.\n */\n public reset(): void\n {\n // isPrimary is the only property that we really need to reset - everything else is\n // guaranteed to be overwritten\n this.isPrimary = false;\n }\n}\n","import type { DisplayObject } from '@pixi/display';\nimport type { InteractionData } from './InteractionData';\n\nexport type InteractionCallback = (interactionEvent: InteractionEvent, displayObject: DisplayObject, hit?: boolean) => void;\n\n/**\n * Event class that mimics native DOM events.\n *\n * @class\n * @memberof PIXI\n */\nexport class InteractionEvent\n{\n public stopped: boolean;\n public stopsPropagatingAt: DisplayObject;\n public stopPropagationHint: boolean;\n public target: DisplayObject;\n public currentTarget: DisplayObject;\n public type: string;\n public data: InteractionData;\n\n constructor()\n {\n /**\n * Whether this event will continue propagating in the tree.\n *\n * Remaining events for the {@link stopsPropagatingAt} object\n * will still be dispatched.\n *\n * @member {boolean}\n */\n this.stopped = false;\n\n /**\n * At which object this event stops propagating.\n *\n * @private\n * @member {PIXI.DisplayObject}\n */\n this.stopsPropagatingAt = null;\n\n /**\n * Whether we already reached the element we want to\n * stop propagating at. This is important for delayed events,\n * where we start over deeper in the tree again.\n *\n * @private\n * @member {boolean}\n */\n this.stopPropagationHint = false;\n\n /**\n * The object which caused this event to be dispatched.\n * For listener callback see {@link PIXI.InteractionEvent.currentTarget}.\n *\n * @member {PIXI.DisplayObject}\n */\n this.target = null;\n\n /**\n * The object whose event listener’s callback is currently being invoked.\n *\n * @member {PIXI.DisplayObject}\n */\n this.currentTarget = null;\n\n /**\n * Type of the event\n *\n * @member {string}\n */\n this.type = null;\n\n /**\n * InteractionData related to this event\n *\n * @member {PIXI.InteractionData}\n */\n this.data = null;\n }\n\n /**\n * Prevents event from reaching any objects other than the current object.\n *\n */\n public stopPropagation(): void\n {\n this.stopped = true;\n this.stopPropagationHint = true;\n this.stopsPropagatingAt = this.currentTarget;\n }\n\n /**\n * Resets the event.\n */\n public reset(): void\n {\n this.stopped = false;\n this.stopsPropagatingAt = null;\n this.stopPropagationHint = false;\n this.currentTarget = null;\n this.target = null;\n }\n}\n","export interface InteractionTrackingFlags\n{\n OVER: number;\n LEFT_DOWN: number;\n RIGHT_DOWN: number;\n NONE: number;\n}\n\n/**\n * DisplayObjects with the {@link PIXI.interactiveTarget} mixin use this class to track interactions\n *\n * @class\n * @private\n * @memberof PIXI\n */\nexport class InteractionTrackingData\n{\n public static FLAGS: Readonly = Object.freeze({\n NONE: 0,\n OVER: 1 << 0,\n LEFT_DOWN: 1 << 1,\n RIGHT_DOWN: 1 << 2,\n });\n\n private readonly _pointerId: number;\n private _flags: number;\n\n /**\n * @param {number} pointerId - Unique pointer id of the event\n * @private\n */\n constructor(pointerId: number)\n {\n this._pointerId = pointerId;\n this._flags = InteractionTrackingData.FLAGS.NONE;\n }\n\n /**\n *\n * @private\n * @param {number} flag - The interaction flag to set\n * @param {boolean} yn - Should the flag be set or unset\n */\n private _doSet(flag: number, yn: boolean): void\n {\n if (yn)\n {\n this._flags = this._flags | flag;\n }\n else\n {\n this._flags = this._flags & (~flag);\n }\n }\n\n /**\n * Unique pointer id of the event\n *\n * @readonly\n * @private\n * @member {number}\n */\n get pointerId(): number\n {\n return this._pointerId;\n }\n\n /**\n * State of the tracking data, expressed as bit flags\n *\n * @private\n * @member {number}\n */\n get flags(): number\n {\n return this._flags;\n }\n\n set flags(flags: number)\n {\n this._flags = flags;\n }\n\n /**\n * Is the tracked event inactive (not over or down)?\n *\n * @private\n * @member {number}\n */\n get none(): boolean\n {\n return this._flags === InteractionTrackingData.FLAGS.NONE;\n }\n\n /**\n * Is the tracked event over the DisplayObject?\n *\n * @private\n * @member {boolean}\n */\n get over(): boolean\n {\n return (this._flags & InteractionTrackingData.FLAGS.OVER) !== 0;\n }\n\n set over(yn: boolean)\n {\n this._doSet(InteractionTrackingData.FLAGS.OVER, yn);\n }\n\n /**\n * Did the right mouse button come down in the DisplayObject?\n *\n * @private\n * @member {boolean}\n */\n get rightDown(): boolean\n {\n return (this._flags & InteractionTrackingData.FLAGS.RIGHT_DOWN) !== 0;\n }\n\n set rightDown(yn: boolean)\n {\n this._doSet(InteractionTrackingData.FLAGS.RIGHT_DOWN, yn);\n }\n\n /**\n * Did the left mouse button come down in the DisplayObject?\n *\n * @private\n * @member {boolean}\n */\n get leftDown(): boolean\n {\n return (this._flags & InteractionTrackingData.FLAGS.LEFT_DOWN) !== 0;\n }\n\n set leftDown(yn: boolean)\n {\n this._doSet(InteractionTrackingData.FLAGS.LEFT_DOWN, yn);\n }\n}\n","import { Point } from '@pixi/math';\n\nimport type { InteractionEvent, InteractionCallback } from './InteractionEvent';\nimport type { Container, DisplayObject } from '@pixi/display';\n\n/**\n * Strategy how to search through stage tree for interactive objects\n *\n * @private\n * @class\n * @memberof PIXI\n */\nexport class TreeSearch\n{\n private readonly _tempPoint: Point;\n\n constructor()\n {\n this._tempPoint = new Point();\n }\n\n /**\n * Recursive implementation for findHit\n *\n * @private\n * @param {PIXI.InteractionEvent} interactionEvent - event containing the point that\n * is tested for collision\n * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - the displayObject\n * that will be hit test (recursively crawls its children)\n * @param {Function} [func] - the function that will be called on each interactive object. The\n * interactionEvent, displayObject and hit will be passed to the function\n * @param {boolean} [hitTest] - this indicates if the objects inside should be hit test against the point\n * @param {boolean} [interactive] - Whether the displayObject is interactive\n * @return {boolean} returns true if the displayObject hit the point\n */\n public recursiveFindHit(interactionEvent: InteractionEvent, displayObject: DisplayObject,\n func?: InteractionCallback, hitTest?: boolean, interactive?: boolean\n ): boolean\n {\n if (!displayObject || !displayObject.visible)\n {\n return false;\n }\n\n const point = interactionEvent.data.global;\n\n // Took a little while to rework this function correctly! But now it is done and nice and optimized! ^_^\n //\n // This function will now loop through all objects and then only hit test the objects it HAS\n // to, not all of them. MUCH faster..\n // An object will be hit test if the following is true:\n //\n // 1: It is interactive.\n // 2: It belongs to a parent that is interactive AND one of the parents children have not already been hit.\n //\n // As another little optimization once an interactive object has been hit we can carry on\n // through the scenegraph, but we know that there will be no more hits! So we can avoid extra hit tests\n // A final optimization is that an object is not hit test directly if a child has already been hit.\n\n interactive = displayObject.interactive || interactive;\n\n let hit = false;\n let interactiveParent = interactive;\n\n // Flag here can set to false if the event is outside the parents hitArea or mask\n let hitTestChildren = true;\n\n // If there is a hitArea, no need to test against anything else if the pointer is not within the hitArea\n // There is also no longer a need to hitTest children.\n if (displayObject.hitArea)\n {\n if (hitTest)\n {\n displayObject.worldTransform.applyInverse(point, this._tempPoint);\n if (!displayObject.hitArea.contains(this._tempPoint.x, this._tempPoint.y))\n {\n hitTest = false;\n hitTestChildren = false;\n }\n else\n {\n hit = true;\n }\n }\n interactiveParent = false;\n }\n // If there is a mask, no need to hitTest against anything else if the pointer is not within the mask.\n // We still want to hitTestChildren, however, to ensure a mouseout can still be generated.\n // https://github.com/pixijs/pixi.js/issues/5135\n else if (displayObject._mask)\n {\n if (hitTest)\n {\n if (!((displayObject._mask as any).containsPoint && (displayObject._mask as any).containsPoint(point)))\n {\n hitTest = false;\n }\n }\n }\n\n // ** FREE TIP **! If an object is not interactive or has no buttons in it\n // (such as a game scene!) set interactiveChildren to false for that displayObject.\n // This will allow PixiJS to completely ignore and bypass checking the displayObjects children.\n if (hitTestChildren && displayObject.interactiveChildren && (displayObject as Container).children)\n {\n const children = (displayObject as Container).children;\n\n for (let i = children.length - 1; i >= 0; i--)\n {\n const child = children[i];\n\n // time to get recursive.. if this function will return if something is hit..\n const childHit = this.recursiveFindHit(interactionEvent, child, func, hitTest, interactiveParent);\n\n if (childHit)\n {\n // its a good idea to check if a child has lost its parent.\n // this means it has been removed whilst looping so its best\n if (!child.parent)\n {\n continue;\n }\n\n // we no longer need to hit test any more objects in this container as we we\n // now know the parent has been hit\n interactiveParent = false;\n\n // If the child is interactive , that means that the object hit was actually\n // interactive and not just the child of an interactive object.\n // This means we no longer need to hit test anything else. We still need to run\n // through all objects, but we don't need to perform any hit tests.\n\n if (childHit)\n {\n if (interactionEvent.target)\n {\n hitTest = false;\n }\n hit = true;\n }\n }\n }\n }\n\n // no point running this if the item is not interactive or does not have an interactive parent.\n if (interactive)\n {\n // if we are hit testing (as in we have no hit any objects yet)\n // We also don't need to worry about hit testing if once of the displayObjects children\n // has already been hit - but only if it was interactive, otherwise we need to keep\n // looking for an interactive child, just in case we hit one\n if (hitTest && !interactionEvent.target)\n {\n // already tested against hitArea if it is defined\n if (!displayObject.hitArea && (displayObject as any).containsPoint)\n {\n if ((displayObject as any).containsPoint(point))\n {\n hit = true;\n }\n }\n }\n\n if (displayObject.interactive)\n {\n if (hit && !interactionEvent.target)\n {\n interactionEvent.target = displayObject;\n }\n\n if (func)\n {\n func(interactionEvent, displayObject, !!hit);\n }\n }\n }\n\n return hit;\n }\n\n /**\n * This function is provides a neat way of crawling through the scene graph and running a\n * specified function on all interactive objects it finds. It will also take care of hit\n * testing the interactive objects and passes the hit across in the function.\n *\n * @private\n * @param {PIXI.InteractionEvent} interactionEvent - event containing the point that\n * is tested for collision\n * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - the displayObject\n * that will be hit test (recursively crawls its children)\n * @param {Function} [func] - the function that will be called on each interactive object. The\n * interactionEvent, displayObject and hit will be passed to the function\n * @param {boolean} [hitTest] - this indicates if the objects inside should be hit test against the point\n * @return {boolean} returns true if the displayObject hit the point\n */\n public findHit(interactionEvent: InteractionEvent, displayObject: DisplayObject,\n func?: InteractionCallback, hitTest?: boolean\n ): void\n {\n this.recursiveFindHit(interactionEvent, displayObject, func, hitTest, false);\n }\n}\n","import type { InteractionTrackingData } from './InteractionTrackingData';\n\nexport type Cursor = 'auto'\n | 'default'\n | 'none'\n | 'context-menu'\n | 'help'\n | 'pointer'\n | 'progress'\n | 'wait'\n | 'cell'\n | 'crosshair'\n | 'text'\n | 'vertical-text'\n | 'alias'\n | 'copy'\n | 'move'\n | 'no-drop'\n | 'not-allowed'\n | 'e-resize'\n | 'n-resize'\n | 'ne-resize'\n | 'nw-resize'\n | 's-resize'\n | 'se-resize'\n | 'sw-resize'\n | 'w-resize'\n | 'ns-resize'\n | 'ew-resize'\n | 'nesw-resize'\n | 'col-resize'\n | 'nwse-resize'\n | 'row-resize'\n | 'all-scroll'\n | 'zoom-in'\n | 'zoom-out'\n | 'grab'\n | 'grabbing';\n\nexport interface IHitArea {\n contains(x: number, y: number): boolean;\n}\n\nexport interface InteractiveTarget {\n interactive: boolean;\n interactiveChildren: boolean;\n hitArea: IHitArea;\n cursor: Cursor | string;\n buttonMode: boolean;\n trackedPointers: {[x: number]: InteractionTrackingData};\n _trackedPointers: {[x: number]: InteractionTrackingData};\n}\n\n/**\n * Interface for classes that represent a hit area.\n *\n * It is implemented by the following classes:\n * - {@link PIXI.Circle}\n * - {@link PIXI.Ellipse}\n * - {@link PIXI.Polygon}\n * - {@link PIXI.RoundedRectangle}\n *\n * @interface IHitArea\n * @memberof PIXI\n */\n\n/**\n * Checks whether the x and y coordinates given are contained within this area\n *\n * @method\n * @name contains\n * @memberof PIXI.IHitArea#\n * @param {number} x - The X coordinate of the point to test\n * @param {number} y - The Y coordinate of the point to test\n * @return {boolean} Whether the x/y coordinates are within this area\n */\n\n/**\n * Default property values of interactive objects\n * Used by {@link PIXI.InteractionManager} to automatically give all DisplayObjects these properties\n *\n * @private\n * @name interactiveTarget\n * @type {Object}\n * @memberof PIXI\n * @example\n * function MyObject() {}\n *\n * Object.assign(\n * DisplayObject.prototype,\n * PIXI.interactiveTarget\n * );\n */\nexport const interactiveTarget: InteractiveTarget = {\n\n /**\n * Enable interaction events for the DisplayObject. Touch, pointer and mouse\n * events will not be emitted unless `interactive` is set to `true`.\n *\n * @example\n * const sprite = new PIXI.Sprite(texture);\n * sprite.interactive = true;\n * sprite.on('tap', (event) => {\n * //handle event\n * });\n * @member {boolean}\n * @memberof PIXI.DisplayObject#\n */\n interactive: false,\n\n /**\n * Determines if the children to the displayObject can be clicked/touched\n * Setting this to false allows PixiJS to bypass a recursive `hitTest` function\n *\n * @member {boolean}\n * @memberof PIXI.Container#\n */\n interactiveChildren: true,\n\n /**\n * Interaction shape. Children will be hit first, then this shape will be checked.\n * Setting this will cause this shape to be checked in hit tests rather than the displayObject's bounds.\n *\n * @example\n * const sprite = new PIXI.Sprite(texture);\n * sprite.interactive = true;\n * sprite.hitArea = new PIXI.Rectangle(0, 0, 100, 100);\n * @member {PIXI.IHitArea}\n * @memberof PIXI.DisplayObject#\n */\n hitArea: null,\n\n /**\n * If enabled, the mouse cursor use the pointer behavior when hovered over the displayObject if it is interactive\n * Setting this changes the 'cursor' property to `'pointer'`.\n *\n * @example\n * const sprite = new PIXI.Sprite(texture);\n * sprite.interactive = true;\n * sprite.buttonMode = true;\n * @member {boolean}\n * @memberof PIXI.DisplayObject#\n */\n get buttonMode(): boolean\n {\n return this.cursor === 'pointer';\n },\n set buttonMode(value: boolean)\n {\n if (value)\n {\n this.cursor = 'pointer';\n }\n else if (this.cursor === 'pointer')\n {\n this.cursor = null;\n }\n },\n\n /**\n * This defines what cursor mode is used when the mouse cursor\n * is hovered over the displayObject.\n *\n * @example\n * const sprite = new PIXI.Sprite(texture);\n * sprite.interactive = true;\n * sprite.cursor = 'wait';\n * @see https://developer.mozilla.org/en/docs/Web/CSS/cursor\n *\n * @member {string}\n * @memberof PIXI.DisplayObject#\n */\n cursor: null,\n\n /**\n * Internal set of all active pointers, by identifier\n *\n * @member {Map}\n * @memberof PIXI.DisplayObject#\n * @private\n */\n get trackedPointers()\n {\n if (this._trackedPointers === undefined) this._trackedPointers = {};\n\n return this._trackedPointers;\n },\n\n /**\n * Map of all tracked pointers, by identifier. Use trackedPointers to access.\n *\n * @private\n * @type {Map}\n */\n _trackedPointers: undefined,\n};\n","import { Ticker, UPDATE_PRIORITY } from '@pixi/ticker';\nimport { DisplayObject, TemporaryDisplayObject } from '@pixi/display';\nimport { InteractionData, InteractivePointerEvent } from './InteractionData';\nimport { InteractionEvent, InteractionCallback } from './InteractionEvent';\nimport { InteractionTrackingData } from './InteractionTrackingData';\nimport { TreeSearch } from './TreeSearch';\nimport { EventEmitter } from '@pixi/utils';\nimport { interactiveTarget } from './interactiveTarget';\n\nimport type { AbstractRenderer } from '@pixi/core';\nimport type { Point, IPointData } from '@pixi/math';\nimport type { Dict } from '@pixi/utils';\n\n// Mix interactiveTarget into DisplayObject.prototype,\n// after deprecation has been handled\nDisplayObject.mixin(interactiveTarget);\n\nconst MOUSE_POINTER_ID = 1;\n\n// Mock interface for hitTestEvent - only used inside hitTest()\ninterface TestInteractionEvent\n{\n target: DisplayObject;\n data: {global: Point};\n}\n\n// helpers for hitTest() - only used inside hitTest()\nconst hitTestEvent: TestInteractionEvent = {\n target: null,\n data: {\n global: null,\n },\n};\n\nexport interface InteractionManagerOptions {\n autoPreventDefault?: boolean;\n interactionFrequency?: number;\n useSystemTicker?: boolean;\n}\n\nexport interface DelayedEvent {\n displayObject: DisplayObject;\n eventString: string;\n eventData: InteractionEvent;\n}\n\ninterface CrossCSSStyleDeclaration extends CSSStyleDeclaration\n{\n msContentZooming: string;\n msTouchAction: string;\n}\n\n/**\n * The interaction manager deals with mouse, touch and pointer events.\n *\n * Any DisplayObject can be interactive if its `interactive` property is set to true.\n *\n * This manager also supports multitouch.\n *\n * An instance of this class is automatically created by default, and can be found at `renderer.plugins.interaction`\n *\n * @class\n * @extends PIXI.utils.EventEmitter\n * @memberof PIXI\n */\nexport class InteractionManager extends EventEmitter\n{\n public readonly activeInteractionData: { [key: number]: InteractionData };\n public readonly supportsTouchEvents: boolean;\n public readonly supportsPointerEvents: boolean;\n public interactionDataPool: InteractionData[];\n public cursor: string;\n public delayedEvents: DelayedEvent[];\n public search: TreeSearch;\n public renderer: AbstractRenderer;\n public autoPreventDefault: boolean;\n public interactionFrequency: number;\n public mouse: InteractionData;\n public eventData: InteractionEvent;\n public moveWhenInside: boolean;\n public cursorStyles: Dict void) | CSSStyleDeclaration>;\n public currentCursorMode: string;\n public resolution: number;\n\n protected interactionDOMElement: HTMLElement;\n protected eventsAdded: boolean;\n protected tickerAdded: boolean;\n protected mouseOverRenderer: boolean;\n\n private _useSystemTicker: boolean;\n private _deltaTime: number;\n private _didMove: boolean;\n private _tempDisplayObject: DisplayObject;\n\n /**\n * @param {PIXI.CanvasRenderer|PIXI.Renderer} renderer - A reference to the current renderer\n * @param {object} [options] - The options for the manager.\n * @param {boolean} [options.autoPreventDefault=true] - Should the manager automatically prevent default browser actions.\n * @param {number} [options.interactionFrequency=10] - Maximum requency (ms) at pointer over/out states will be checked.\n * @param {number} [options.useSystemTicker=true] - Whether to add {@link tickerUpdate} to {@link PIXI.Ticker.system}.\n */\n constructor(renderer: AbstractRenderer, options: InteractionManagerOptions)\n {\n super();\n\n options = options || {};\n\n /**\n * The renderer this interaction manager works for.\n *\n * @member {PIXI.AbstractRenderer}\n */\n this.renderer = renderer;\n\n /**\n * Should default browser actions automatically be prevented.\n * Does not apply to pointer events for backwards compatibility\n * preventDefault on pointer events stops mouse events from firing\n * Thus, for every pointer event, there will always be either a mouse of touch event alongside it.\n *\n * @member {boolean}\n * @default true\n */\n this.autoPreventDefault = options.autoPreventDefault !== undefined ? options.autoPreventDefault : true;\n\n /**\n * Maximum requency in milliseconds at which pointer over/out states will be checked by {@link tickerUpdate}.\n *\n * @member {number}\n * @default 10\n */\n this.interactionFrequency = options.interactionFrequency || 10;\n\n /**\n * The mouse data\n *\n * @member {PIXI.InteractionData}\n */\n this.mouse = new InteractionData();\n this.mouse.identifier = MOUSE_POINTER_ID;\n\n // setting the mouse to start off far off screen will mean that mouse over does\n // not get called before we even move the mouse.\n this.mouse.global.set(-999999);\n\n /**\n * Actively tracked InteractionData\n *\n * @private\n * @member {Object.}\n */\n this.activeInteractionData = {};\n this.activeInteractionData[MOUSE_POINTER_ID] = this.mouse;\n\n /**\n * Pool of unused InteractionData\n *\n * @private\n * @member {PIXI.InteractionData[]}\n */\n this.interactionDataPool = [];\n\n /**\n * An event data object to handle all the event tracking/dispatching\n *\n * @member {object}\n */\n this.eventData = new InteractionEvent();\n\n /**\n * The DOM element to bind to.\n *\n * @protected\n * @member {HTMLElement}\n */\n this.interactionDOMElement = null;\n\n /**\n * This property determines if mousemove and touchmove events are fired only when the cursor\n * is over the object.\n * Setting to true will make things work more in line with how the DOM version works.\n * Setting to false can make things easier for things like dragging\n * It is currently set to false as this is how PixiJS used to work. This will be set to true in\n * future versions of pixi.\n *\n * @member {boolean}\n * @default false\n */\n this.moveWhenInside = false;\n\n /**\n * Have events been attached to the dom element?\n *\n * @protected\n * @member {boolean}\n */\n this.eventsAdded = false;\n\n /**\n * Has the system ticker been added?\n *\n * @protected\n * @member {boolean}\n */\n this.tickerAdded = false;\n\n /**\n * Is the mouse hovering over the renderer?\n *\n * @protected\n * @member {boolean}\n */\n this.mouseOverRenderer = false;\n\n /**\n * Does the device support touch events\n * https://www.w3.org/TR/touch-events/\n *\n * @readonly\n * @member {boolean}\n */\n this.supportsTouchEvents = 'ontouchstart' in window;\n\n /**\n * Does the device support pointer events\n * https://www.w3.org/Submission/pointer-events/\n *\n * @readonly\n * @member {boolean}\n */\n this.supportsPointerEvents = !!window.PointerEvent;\n\n // this will make it so that you don't have to call bind all the time\n\n /**\n * @private\n * @member {Function}\n */\n this.onPointerUp = this.onPointerUp.bind(this);\n this.processPointerUp = this.processPointerUp.bind(this);\n\n /**\n * @private\n * @member {Function}\n */\n this.onPointerCancel = this.onPointerCancel.bind(this);\n this.processPointerCancel = this.processPointerCancel.bind(this);\n\n /**\n * @private\n * @member {Function}\n */\n this.onPointerDown = this.onPointerDown.bind(this);\n this.processPointerDown = this.processPointerDown.bind(this);\n\n /**\n * @private\n * @member {Function}\n */\n this.onPointerMove = this.onPointerMove.bind(this);\n this.processPointerMove = this.processPointerMove.bind(this);\n\n /**\n * @private\n * @member {Function}\n */\n this.onPointerOut = this.onPointerOut.bind(this);\n this.processPointerOverOut = this.processPointerOverOut.bind(this);\n\n /**\n * @private\n * @member {Function}\n */\n this.onPointerOver = this.onPointerOver.bind(this);\n\n /**\n * Dictionary of how different cursor modes are handled. Strings are handled as CSS cursor\n * values, objects are handled as dictionaries of CSS values for interactionDOMElement,\n * and functions are called instead of changing the CSS.\n * Default CSS cursor values are provided for 'default' and 'pointer' modes.\n * @member {Object.}\n */\n this.cursorStyles = {\n default: 'inherit',\n pointer: 'pointer',\n };\n\n /**\n * The mode of the cursor that is being used.\n * The value of this is a key from the cursorStyles dictionary.\n *\n * @member {string}\n */\n this.currentCursorMode = null;\n\n /**\n * Internal cached let.\n *\n * @private\n * @member {string}\n */\n this.cursor = null;\n\n /**\n * The current resolution / device pixel ratio.\n *\n * @member {number}\n * @default 1\n */\n this.resolution = 1;\n\n /**\n * Delayed pointer events. Used to guarantee correct ordering of over/out events.\n *\n * @private\n * @member {Array}\n */\n this.delayedEvents = [];\n\n /**\n * TreeSearch component that is used to hitTest stage tree\n *\n * @private\n * @member {PIXI.TreeSearch}\n */\n this.search = new TreeSearch();\n\n /**\n * Used as a last rendered object in case renderer doesnt have _lastObjectRendered\n * @member {DisplayObject}\n * @private\n */\n this._tempDisplayObject = new TemporaryDisplayObject();\n\n /**\n * Fired when a pointer device button (usually a mouse left-button) is pressed on the display\n * object.\n *\n * @event PIXI.InteractionManager#mousedown\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device secondary button (usually a mouse right-button) is pressed\n * on the display object.\n *\n * @event PIXI.InteractionManager#rightdown\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device button (usually a mouse left-button) is released over the display\n * object.\n *\n * @event PIXI.InteractionManager#mouseup\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device secondary button (usually a mouse right-button) is released\n * over the display object.\n *\n * @event PIXI.InteractionManager#rightup\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device button (usually a mouse left-button) is pressed and released on\n * the display object.\n *\n * @event PIXI.InteractionManager#click\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device secondary button (usually a mouse right-button) is pressed\n * and released on the display object.\n *\n * @event PIXI.InteractionManager#rightclick\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device button (usually a mouse left-button) is released outside the\n * display object that initially registered a\n * [mousedown]{@link PIXI.InteractionManager#event:mousedown}.\n *\n * @event PIXI.InteractionManager#mouseupoutside\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device secondary button (usually a mouse right-button) is released\n * outside the display object that initially registered a\n * [rightdown]{@link PIXI.InteractionManager#event:rightdown}.\n *\n * @event PIXI.InteractionManager#rightupoutside\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device (usually a mouse) is moved while over the display object\n *\n * @event PIXI.InteractionManager#mousemove\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device (usually a mouse) is moved onto the display object\n *\n * @event PIXI.InteractionManager#mouseover\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device (usually a mouse) is moved off the display object\n *\n * @event PIXI.InteractionManager#mouseout\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device button is pressed on the display object.\n *\n * @event PIXI.InteractionManager#pointerdown\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device button is released over the display object.\n * Not always fired when some buttons are held down while others are released. In those cases,\n * use [mousedown]{@link PIXI.InteractionManager#event:mousedown} and\n * [mouseup]{@link PIXI.InteractionManager#event:mouseup} instead.\n *\n * @event PIXI.InteractionManager#pointerup\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when the operating system cancels a pointer event\n *\n * @event PIXI.InteractionManager#pointercancel\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device button is pressed and released on the display object.\n *\n * @event PIXI.InteractionManager#pointertap\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device button is released outside the display object that initially\n * registered a [pointerdown]{@link PIXI.InteractionManager#event:pointerdown}.\n *\n * @event PIXI.InteractionManager#pointerupoutside\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device is moved while over the display object\n *\n * @event PIXI.InteractionManager#pointermove\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device is moved onto the display object\n *\n * @event PIXI.InteractionManager#pointerover\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device is moved off the display object\n *\n * @event PIXI.InteractionManager#pointerout\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a touch point is placed on the display object.\n *\n * @event PIXI.InteractionManager#touchstart\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a touch point is removed from the display object.\n *\n * @event PIXI.InteractionManager#touchend\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when the operating system cancels a touch\n *\n * @event PIXI.InteractionManager#touchcancel\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a touch point is placed and removed from the display object.\n *\n * @event PIXI.InteractionManager#tap\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a touch point is removed outside of the display object that initially\n * registered a [touchstart]{@link PIXI.InteractionManager#event:touchstart}.\n *\n * @event PIXI.InteractionManager#touchendoutside\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a touch point is moved along the display object.\n *\n * @event PIXI.InteractionManager#touchmove\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device button (usually a mouse left-button) is pressed on the display.\n * object. DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#mousedown\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device secondary button (usually a mouse right-button) is pressed\n * on the display object. DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#rightdown\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device button (usually a mouse left-button) is released over the display\n * object. DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#mouseup\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device secondary button (usually a mouse right-button) is released\n * over the display object. DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#rightup\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device button (usually a mouse left-button) is pressed and released on\n * the display object. DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#click\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device secondary button (usually a mouse right-button) is pressed\n * and released on the display object. DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#rightclick\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device button (usually a mouse left-button) is released outside the\n * display object that initially registered a\n * [mousedown]{@link PIXI.DisplayObject#event:mousedown}.\n * DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#mouseupoutside\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device secondary button (usually a mouse right-button) is released\n * outside the display object that initially registered a\n * [rightdown]{@link PIXI.DisplayObject#event:rightdown}.\n * DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#rightupoutside\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device (usually a mouse) is moved while over the display object.\n * DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#mousemove\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device (usually a mouse) is moved onto the display object.\n * DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#mouseover\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device (usually a mouse) is moved off the display object.\n * DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#mouseout\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device button is pressed on the display object.\n * DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#pointerdown\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device button is released over the display object.\n * DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#pointerup\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when the operating system cancels a pointer event.\n * DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#pointercancel\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device button is pressed and released on the display object.\n * DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#pointertap\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device button is released outside the display object that initially\n * registered a [pointerdown]{@link PIXI.DisplayObject#event:pointerdown}.\n * DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#pointerupoutside\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device is moved while over the display object.\n * DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#pointermove\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device is moved onto the display object.\n * DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#pointerover\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a pointer device is moved off the display object.\n * DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#pointerout\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a touch point is placed on the display object.\n * DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#touchstart\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a touch point is removed from the display object.\n * DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#touchend\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when the operating system cancels a touch.\n * DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#touchcancel\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a touch point is placed and removed from the display object.\n * DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#tap\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a touch point is removed outside of the display object that initially\n * registered a [touchstart]{@link PIXI.DisplayObject#event:touchstart}.\n * DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#touchendoutside\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n /**\n * Fired when a touch point is moved along the display object.\n * DisplayObject's `interactive` property must be set to `true` to fire event.\n *\n * @event PIXI.DisplayObject#touchmove\n * @param {PIXI.InteractionEvent} event - Interaction event\n */\n\n this._useSystemTicker = options.useSystemTicker !== undefined ? options.useSystemTicker : true;\n\n this.setTargetElement(this.renderer.view, this.renderer.resolution);\n }\n\n /**\n * Should the InteractionManager automatically add {@link tickerUpdate} to {@link PIXI.Ticker.system}.\n *\n * @member {boolean}\n * @default true\n */\n get useSystemTicker(): boolean\n {\n return this._useSystemTicker;\n }\n set useSystemTicker(useSystemTicker: boolean)\n {\n this._useSystemTicker = useSystemTicker;\n\n if (useSystemTicker)\n {\n this.addTickerListener();\n }\n else\n {\n this.removeTickerListener();\n }\n }\n\n /**\n * Last rendered object or temp object\n * @readonly\n * @protected\n * @member {PIXI.DisplayObject}\n */\n get lastObjectRendered(): DisplayObject\n {\n return this.renderer._lastObjectRendered || this._tempDisplayObject;\n }\n\n /**\n * Hit tests a point against the display tree, returning the first interactive object that is hit.\n *\n * @param {PIXI.Point} globalPoint - A point to hit test with, in global space.\n * @param {PIXI.Container} [root] - The root display object to start from. If omitted, defaults\n * to the last rendered root of the associated renderer.\n * @return {PIXI.DisplayObject} The hit display object, if any.\n */\n public hitTest(globalPoint: Point, root?: DisplayObject): DisplayObject\n {\n // clear the target for our hit test\n hitTestEvent.target = null;\n // assign the global point\n hitTestEvent.data.global = globalPoint;\n // ensure safety of the root\n if (!root)\n {\n root = this.lastObjectRendered;\n }\n // run the hit test\n this.processInteractive(hitTestEvent as InteractionEvent, root, null, true);\n // return our found object - it'll be null if we didn't hit anything\n\n return hitTestEvent.target;\n }\n\n /**\n * Sets the DOM element which will receive mouse/touch events. This is useful for when you have\n * other DOM elements on top of the renderers Canvas element. With this you'll be bale to delegate\n * another DOM element to receive those events.\n *\n * @param {HTMLElement} element - the DOM element which will receive mouse and touch events.\n * @param {number} [resolution=1] - The resolution / device pixel ratio of the new element (relative to the canvas).\n */\n public setTargetElement(element: HTMLElement, resolution = 1): void\n {\n this.removeTickerListener();\n\n this.removeEvents();\n\n this.interactionDOMElement = element;\n\n this.resolution = resolution;\n\n this.addEvents();\n\n this.addTickerListener();\n }\n\n /**\n * Add the ticker listener\n *\n * @private\n */\n private addTickerListener(): void\n {\n if (this.tickerAdded || !this.interactionDOMElement || !this._useSystemTicker)\n {\n return;\n }\n\n Ticker.system.add(this.tickerUpdate, this, UPDATE_PRIORITY.INTERACTION);\n\n this.tickerAdded = true;\n }\n\n /**\n * Remove the ticker listener\n *\n * @private\n */\n private removeTickerListener(): void\n {\n if (!this.tickerAdded)\n {\n return;\n }\n\n Ticker.system.remove(this.tickerUpdate, this);\n\n this.tickerAdded = false;\n }\n\n /**\n * Registers all the DOM events\n *\n * @private\n */\n private addEvents(): void\n {\n if (this.eventsAdded || !this.interactionDOMElement)\n {\n return;\n }\n\n const style = this.interactionDOMElement.style as CrossCSSStyleDeclaration;\n\n if (window.navigator.msPointerEnabled)\n {\n style.msContentZooming = 'none';\n style.msTouchAction = 'none';\n }\n else if (this.supportsPointerEvents)\n {\n style.touchAction = 'none';\n }\n\n /**\n * These events are added first, so that if pointer events are normalized, they are fired\n * in the same order as non-normalized events. ie. pointer event 1st, mouse / touch 2nd\n */\n if (this.supportsPointerEvents)\n {\n window.document.addEventListener('pointermove', this.onPointerMove, true);\n this.interactionDOMElement.addEventListener('pointerdown', this.onPointerDown, true);\n // pointerout is fired in addition to pointerup (for touch events) and pointercancel\n // we already handle those, so for the purposes of what we do in onPointerOut, we only\n // care about the pointerleave event\n this.interactionDOMElement.addEventListener('pointerleave', this.onPointerOut, true);\n this.interactionDOMElement.addEventListener('pointerover', this.onPointerOver, true);\n window.addEventListener('pointercancel', this.onPointerCancel, true);\n window.addEventListener('pointerup', this.onPointerUp, true);\n }\n else\n {\n window.document.addEventListener('mousemove', this.onPointerMove, true);\n this.interactionDOMElement.addEventListener('mousedown', this.onPointerDown, true);\n this.interactionDOMElement.addEventListener('mouseout', this.onPointerOut, true);\n this.interactionDOMElement.addEventListener('mouseover', this.onPointerOver, true);\n window.addEventListener('mouseup', this.onPointerUp, true);\n }\n\n // always look directly for touch events so that we can provide original data\n // In a future version we should change this to being just a fallback and rely solely on\n // PointerEvents whenever available\n if (this.supportsTouchEvents)\n {\n this.interactionDOMElement.addEventListener('touchstart', this.onPointerDown, true);\n this.interactionDOMElement.addEventListener('touchcancel', this.onPointerCancel, true);\n this.interactionDOMElement.addEventListener('touchend', this.onPointerUp, true);\n this.interactionDOMElement.addEventListener('touchmove', this.onPointerMove, true);\n }\n\n this.eventsAdded = true;\n }\n\n /**\n * Removes all the DOM events that were previously registered\n *\n * @private\n */\n private removeEvents(): void\n {\n if (!this.eventsAdded || !this.interactionDOMElement)\n {\n return;\n }\n\n const style = this.interactionDOMElement.style as CrossCSSStyleDeclaration;\n\n if (window.navigator.msPointerEnabled)\n {\n style.msContentZooming = '';\n style.msTouchAction = '';\n }\n else if (this.supportsPointerEvents)\n {\n style.touchAction = '';\n }\n\n if (this.supportsPointerEvents)\n {\n window.document.removeEventListener('pointermove', this.onPointerMove, true);\n this.interactionDOMElement.removeEventListener('pointerdown', this.onPointerDown, true);\n this.interactionDOMElement.removeEventListener('pointerleave', this.onPointerOut, true);\n this.interactionDOMElement.removeEventListener('pointerover', this.onPointerOver, true);\n window.removeEventListener('pointercancel', this.onPointerCancel, true);\n window.removeEventListener('pointerup', this.onPointerUp, true);\n }\n else\n {\n window.document.removeEventListener('mousemove', this.onPointerMove, true);\n this.interactionDOMElement.removeEventListener('mousedown', this.onPointerDown, true);\n this.interactionDOMElement.removeEventListener('mouseout', this.onPointerOut, true);\n this.interactionDOMElement.removeEventListener('mouseover', this.onPointerOver, true);\n window.removeEventListener('mouseup', this.onPointerUp, true);\n }\n\n if (this.supportsTouchEvents)\n {\n this.interactionDOMElement.removeEventListener('touchstart', this.onPointerDown, true);\n this.interactionDOMElement.removeEventListener('touchcancel', this.onPointerCancel, true);\n this.interactionDOMElement.removeEventListener('touchend', this.onPointerUp, true);\n this.interactionDOMElement.removeEventListener('touchmove', this.onPointerMove, true);\n }\n\n this.interactionDOMElement = null;\n\n this.eventsAdded = false;\n }\n\n /**\n * Updates the state of interactive objects if at least {@link interactionFrequency}\n * milliseconds have passed since the last invocation.\n *\n * Invoked by a throttled ticker update from {@link PIXI.Ticker.system}.\n *\n * @param {number} deltaTime - time delta since the last call\n */\n public tickerUpdate(deltaTime: number): void\n {\n this._deltaTime += deltaTime;\n\n if (this._deltaTime < this.interactionFrequency)\n {\n return;\n }\n\n this._deltaTime = 0;\n\n this.update();\n }\n\n /**\n * Updates the state of interactive objects.\n */\n public update(): void\n {\n if (!this.interactionDOMElement)\n {\n return;\n }\n\n // if the user move the mouse this check has already been done using the mouse move!\n if (this._didMove)\n {\n this._didMove = false;\n\n return;\n }\n\n this.cursor = null;\n\n // Resets the flag as set by a stopPropagation call. This flag is usually reset by a user interaction of any kind,\n // but there was a scenario of a display object moving under a static mouse cursor.\n // In this case, mouseover and mouseevents would not pass the flag test in dispatchEvent function\n for (const k in this.activeInteractionData)\n {\n // eslint-disable-next-line no-prototype-builtins\n if (this.activeInteractionData.hasOwnProperty(k))\n {\n const interactionData = this.activeInteractionData[k];\n\n if (interactionData.originalEvent && interactionData.pointerType !== 'touch')\n {\n const interactionEvent = this.configureInteractionEventForDOMEvent(\n this.eventData,\n interactionData.originalEvent as PointerEvent,\n interactionData\n );\n\n this.processInteractive(\n interactionEvent,\n this.lastObjectRendered,\n this.processPointerOverOut,\n true\n );\n }\n }\n }\n\n this.setCursorMode(this.cursor);\n }\n\n /**\n * Sets the current cursor mode, handling any callbacks or CSS style changes.\n *\n * @param {string} mode - cursor mode, a key from the cursorStyles dictionary\n */\n public setCursorMode(mode: string): void\n {\n mode = mode || 'default';\n // if the mode didn't actually change, bail early\n if (this.currentCursorMode === mode)\n {\n return;\n }\n this.currentCursorMode = mode;\n const style = this.cursorStyles[mode];\n\n // only do things if there is a cursor style for it\n if (style)\n {\n switch (typeof style)\n {\n case 'string':\n // string styles are handled as cursor CSS\n this.interactionDOMElement.style.cursor = style;\n break;\n case 'function':\n // functions are just called, and passed the cursor mode\n style(mode);\n break;\n case 'object':\n // if it is an object, assume that it is a dictionary of CSS styles,\n // apply it to the interactionDOMElement\n Object.assign(this.interactionDOMElement.style, style);\n break;\n }\n }\n else if (typeof mode === 'string' && !Object.prototype.hasOwnProperty.call(this.cursorStyles, mode))\n {\n // if it mode is a string (not a Symbol) and cursorStyles doesn't have any entry\n // for the mode, then assume that the dev wants it to be CSS for the cursor.\n this.interactionDOMElement.style.cursor = mode;\n }\n }\n\n /**\n * Dispatches an event on the display object that was interacted with\n *\n * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - the display object in question\n * @param {string} eventString - the name of the event (e.g, mousedown)\n * @param {PIXI.InteractionEvent} eventData - the event data object\n * @private\n */\n private dispatchEvent(displayObject: DisplayObject, eventString: string, eventData: InteractionEvent): void\n {\n // Even if the event was stopped, at least dispatch any remaining events\n // for the same display object.\n if (!eventData.stopPropagationHint || displayObject === eventData.stopsPropagatingAt)\n {\n eventData.currentTarget = displayObject;\n eventData.type = eventString;\n\n displayObject.emit(eventString, eventData);\n\n if ((displayObject as any)[eventString])\n {\n (displayObject as any)[eventString](eventData);\n }\n }\n }\n\n /**\n * Puts a event on a queue to be dispatched later. This is used to guarantee correct\n * ordering of over/out events.\n *\n * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - the display object in question\n * @param {string} eventString - the name of the event (e.g, mousedown)\n * @param {object} eventData - the event data object\n * @private\n */\n private delayDispatchEvent(displayObject: DisplayObject, eventString: string, eventData: InteractionEvent): void\n {\n this.delayedEvents.push({ displayObject, eventString, eventData });\n }\n\n /**\n * Maps x and y coords from a DOM object and maps them correctly to the PixiJS view. The\n * resulting value is stored in the point. This takes into account the fact that the DOM\n * element could be scaled and positioned anywhere on the screen.\n *\n * @param {PIXI.IPointData} point - the point that the result will be stored in\n * @param {number} x - the x coord of the position to map\n * @param {number} y - the y coord of the position to map\n */\n public mapPositionToPoint(point: IPointData, x: number, y: number): void\n {\n let rect;\n\n // IE 11 fix\n if (!this.interactionDOMElement.parentElement)\n {\n rect = { x: 0, y: 0, width: 0, height: 0 };\n }\n else\n {\n rect = this.interactionDOMElement.getBoundingClientRect();\n }\n\n const resolutionMultiplier = 1.0 / this.resolution;\n\n point.x = ((x - rect.left) * ((this.interactionDOMElement as any).width / rect.width)) * resolutionMultiplier;\n point.y = ((y - rect.top) * ((this.interactionDOMElement as any).height / rect.height)) * resolutionMultiplier;\n }\n\n /**\n * This function is provides a neat way of crawling through the scene graph and running a\n * specified function on all interactive objects it finds. It will also take care of hit\n * testing the interactive objects and passes the hit across in the function.\n *\n * @protected\n * @param {PIXI.InteractionEvent} interactionEvent - event containing the point that\n * is tested for collision\n * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - the displayObject\n * that will be hit test (recursively crawls its children)\n * @param {Function} [func] - the function that will be called on each interactive object. The\n * interactionEvent, displayObject and hit will be passed to the function\n * @param {boolean} [hitTest] - indicates whether we want to calculate hits\n * or just iterate through all interactive objects\n */\n public processInteractive(interactionEvent: InteractionEvent, displayObject: DisplayObject,\n func?: InteractionCallback, hitTest?: boolean\n ): void\n {\n const hit = this.search.findHit(interactionEvent, displayObject, func, hitTest);\n\n const delayedEvents = this.delayedEvents;\n\n if (!delayedEvents.length)\n {\n return hit;\n }\n // Reset the propagation hint, because we start deeper in the tree again.\n interactionEvent.stopPropagationHint = false;\n\n const delayedLen = delayedEvents.length;\n\n this.delayedEvents = [];\n\n for (let i = 0; i < delayedLen; i++)\n {\n const { displayObject, eventString, eventData } = delayedEvents[i];\n\n // When we reach the object we wanted to stop propagating at,\n // set the propagation hint.\n if (eventData.stopsPropagatingAt === displayObject)\n {\n eventData.stopPropagationHint = true;\n }\n\n this.dispatchEvent(displayObject, eventString, eventData);\n }\n\n return hit;\n }\n\n /**\n * Is called when the pointer button is pressed down on the renderer element\n *\n * @private\n * @param {PointerEvent} originalEvent - The DOM event of a pointer button being pressed down\n */\n private onPointerDown(originalEvent: InteractivePointerEvent): void\n {\n // if we support touch events, then only use those for touch events, not pointer events\n if (this.supportsTouchEvents && (originalEvent as PointerEvent).pointerType === 'touch') return;\n\n const events = this.normalizeToPointerData(originalEvent);\n\n /**\n * No need to prevent default on natural pointer events, as there are no side effects\n * Normalized events, however, may have the double mousedown/touchstart issue on the native android browser,\n * so still need to be prevented.\n */\n\n // Guaranteed that there will be at least one event in events, and all events must have the same pointer type\n\n if (this.autoPreventDefault && (events[0] as any).isNormalized)\n {\n const cancelable = originalEvent.cancelable || !('cancelable' in originalEvent);\n\n if (cancelable)\n {\n originalEvent.preventDefault();\n }\n }\n\n const eventLen = events.length;\n\n for (let i = 0; i < eventLen; i++)\n {\n const event = events[i];\n\n const interactionData = this.getInteractionDataForPointerId(event);\n\n const interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData);\n\n interactionEvent.data.originalEvent = originalEvent;\n\n this.processInteractive(interactionEvent, this.lastObjectRendered, this.processPointerDown, true);\n\n this.emit('pointerdown', interactionEvent);\n if (event.pointerType === 'touch')\n {\n this.emit('touchstart', interactionEvent);\n }\n // emit a mouse event for \"pen\" pointers, the way a browser would emit a fallback event\n else if (event.pointerType === 'mouse' || event.pointerType === 'pen')\n {\n const isRightButton = event.button === 2;\n\n this.emit(isRightButton ? 'rightdown' : 'mousedown', this.eventData);\n }\n }\n }\n\n /**\n * Processes the result of the pointer down check and dispatches the event if need be\n *\n * @private\n * @param {PIXI.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event\n * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - The display object that was tested\n * @param {boolean} hit - the result of the hit test on the display object\n */\n private processPointerDown(interactionEvent: InteractionEvent, displayObject: DisplayObject, hit: boolean): void\n {\n const data = interactionEvent.data;\n const id = interactionEvent.data.identifier;\n\n if (hit)\n {\n if (!displayObject.trackedPointers[id])\n {\n displayObject.trackedPointers[id] = new InteractionTrackingData(id);\n }\n this.dispatchEvent(displayObject, 'pointerdown', interactionEvent);\n\n if (data.pointerType === 'touch')\n {\n this.dispatchEvent(displayObject, 'touchstart', interactionEvent);\n }\n else if (data.pointerType === 'mouse' || data.pointerType === 'pen')\n {\n const isRightButton = data.button === 2;\n\n if (isRightButton)\n {\n displayObject.trackedPointers[id].rightDown = true;\n }\n else\n {\n displayObject.trackedPointers[id].leftDown = true;\n }\n\n this.dispatchEvent(displayObject, isRightButton ? 'rightdown' : 'mousedown', interactionEvent);\n }\n }\n }\n\n /**\n * Is called when the pointer button is released on the renderer element\n *\n * @private\n * @param {PointerEvent} originalEvent - The DOM event of a pointer button being released\n * @param {boolean} cancelled - true if the pointer is cancelled\n * @param {Function} func - Function passed to {@link processInteractive}\n */\n private onPointerComplete(originalEvent: InteractivePointerEvent, cancelled: boolean, func: InteractionCallback): void\n {\n const events = this.normalizeToPointerData(originalEvent);\n\n const eventLen = events.length;\n\n // if the event wasn't targeting our canvas, then consider it to be pointerupoutside\n // in all cases (unless it was a pointercancel)\n const eventAppend = originalEvent.target !== this.interactionDOMElement ? 'outside' : '';\n\n for (let i = 0; i < eventLen; i++)\n {\n const event = events[i];\n\n const interactionData = this.getInteractionDataForPointerId(event);\n\n const interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData);\n\n interactionEvent.data.originalEvent = originalEvent;\n\n // perform hit testing for events targeting our canvas or cancel events\n this.processInteractive(interactionEvent, this.lastObjectRendered, func, cancelled || !eventAppend);\n\n this.emit(cancelled ? 'pointercancel' : `pointerup${eventAppend}`, interactionEvent);\n\n if (event.pointerType === 'mouse' || event.pointerType === 'pen')\n {\n const isRightButton = event.button === 2;\n\n this.emit(isRightButton ? `rightup${eventAppend}` : `mouseup${eventAppend}`, interactionEvent);\n }\n else if (event.pointerType === 'touch')\n {\n this.emit(cancelled ? 'touchcancel' : `touchend${eventAppend}`, interactionEvent);\n this.releaseInteractionDataForPointerId(event.pointerId);\n }\n }\n }\n\n /**\n * Is called when the pointer button is cancelled\n *\n * @private\n * @param {PointerEvent} event - The DOM event of a pointer button being released\n */\n private onPointerCancel(event: InteractivePointerEvent): void\n {\n // if we support touch events, then only use those for touch events, not pointer events\n if (this.supportsTouchEvents && (event as PointerEvent).pointerType === 'touch') return;\n\n this.onPointerComplete(event, true, this.processPointerCancel);\n }\n\n /**\n * Processes the result of the pointer cancel check and dispatches the event if need be\n *\n * @private\n * @param {PIXI.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event\n * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - The display object that was tested\n */\n private processPointerCancel(interactionEvent: InteractionEvent, displayObject: DisplayObject): void\n {\n const data = interactionEvent.data;\n\n const id = interactionEvent.data.identifier;\n\n if (displayObject.trackedPointers[id] !== undefined)\n {\n delete displayObject.trackedPointers[id];\n this.dispatchEvent(displayObject, 'pointercancel', interactionEvent);\n\n if (data.pointerType === 'touch')\n {\n this.dispatchEvent(displayObject, 'touchcancel', interactionEvent);\n }\n }\n }\n\n /**\n * Is called when the pointer button is released on the renderer element\n *\n * @private\n * @param {PointerEvent} event - The DOM event of a pointer button being released\n */\n private onPointerUp(event: InteractivePointerEvent): void\n {\n // if we support touch events, then only use those for touch events, not pointer events\n if (this.supportsTouchEvents && (event as PointerEvent).pointerType === 'touch') return;\n\n this.onPointerComplete(event, false, this.processPointerUp);\n }\n\n /**\n * Processes the result of the pointer up check and dispatches the event if need be\n *\n * @private\n * @param {PIXI.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event\n * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - The display object that was tested\n * @param {boolean} hit - the result of the hit test on the display object\n */\n private processPointerUp(interactionEvent: InteractionEvent, displayObject: DisplayObject, hit: boolean): void\n {\n const data = interactionEvent.data;\n\n const id = interactionEvent.data.identifier;\n\n const trackingData = displayObject.trackedPointers[id];\n\n const isTouch = data.pointerType === 'touch';\n\n const isMouse = (data.pointerType === 'mouse' || data.pointerType === 'pen');\n // need to track mouse down status in the mouse block so that we can emit\n // event in a later block\n let isMouseTap = false;\n\n // Mouse only\n if (isMouse)\n {\n const isRightButton = data.button === 2;\n\n const flags = InteractionTrackingData.FLAGS;\n\n const test = isRightButton ? flags.RIGHT_DOWN : flags.LEFT_DOWN;\n\n const isDown = trackingData !== undefined && (trackingData.flags & test);\n\n if (hit)\n {\n this.dispatchEvent(displayObject, isRightButton ? 'rightup' : 'mouseup', interactionEvent);\n\n if (isDown)\n {\n this.dispatchEvent(displayObject, isRightButton ? 'rightclick' : 'click', interactionEvent);\n // because we can confirm that the mousedown happened on this object, flag for later emit of pointertap\n isMouseTap = true;\n }\n }\n else if (isDown)\n {\n this.dispatchEvent(displayObject, isRightButton ? 'rightupoutside' : 'mouseupoutside', interactionEvent);\n }\n // update the down state of the tracking data\n if (trackingData)\n {\n if (isRightButton)\n {\n trackingData.rightDown = false;\n }\n else\n {\n trackingData.leftDown = false;\n }\n }\n }\n\n // Pointers and Touches, and Mouse\n if (hit)\n {\n this.dispatchEvent(displayObject, 'pointerup', interactionEvent);\n if (isTouch) this.dispatchEvent(displayObject, 'touchend', interactionEvent);\n\n if (trackingData)\n {\n // emit pointertap if not a mouse, or if the mouse block decided it was a tap\n if (!isMouse || isMouseTap)\n {\n this.dispatchEvent(displayObject, 'pointertap', interactionEvent);\n }\n if (isTouch)\n {\n this.dispatchEvent(displayObject, 'tap', interactionEvent);\n // touches are no longer over (if they ever were) when we get the touchend\n // so we should ensure that we don't keep pretending that they are\n trackingData.over = false;\n }\n }\n }\n else if (trackingData)\n {\n this.dispatchEvent(displayObject, 'pointerupoutside', interactionEvent);\n if (isTouch) this.dispatchEvent(displayObject, 'touchendoutside', interactionEvent);\n }\n // Only remove the tracking data if there is no over/down state still associated with it\n if (trackingData && trackingData.none)\n {\n delete displayObject.trackedPointers[id];\n }\n }\n\n /**\n * Is called when the pointer moves across the renderer element\n *\n * @private\n * @param {PointerEvent} originalEvent - The DOM event of a pointer moving\n */\n private onPointerMove(originalEvent: InteractivePointerEvent): void\n {\n // if we support touch events, then only use those for touch events, not pointer events\n if (this.supportsTouchEvents && (originalEvent as PointerEvent).pointerType === 'touch') return;\n\n const events = this.normalizeToPointerData(originalEvent);\n\n if (events[0].pointerType === 'mouse' || events[0].pointerType === 'pen')\n {\n this._didMove = true;\n\n this.cursor = null;\n }\n\n const eventLen = events.length;\n\n for (let i = 0; i < eventLen; i++)\n {\n const event = events[i];\n\n const interactionData = this.getInteractionDataForPointerId(event);\n\n const interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData);\n\n interactionEvent.data.originalEvent = originalEvent;\n\n this.processInteractive(interactionEvent, this.lastObjectRendered, this.processPointerMove, true);\n\n this.emit('pointermove', interactionEvent);\n if (event.pointerType === 'touch') this.emit('touchmove', interactionEvent);\n if (event.pointerType === 'mouse' || event.pointerType === 'pen') this.emit('mousemove', interactionEvent);\n }\n\n if (events[0].pointerType === 'mouse')\n {\n this.setCursorMode(this.cursor);\n\n // TODO BUG for parents interactive object (border order issue)\n }\n }\n\n /**\n * Processes the result of the pointer move check and dispatches the event if need be\n *\n * @private\n * @param {PIXI.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event\n * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - The display object that was tested\n * @param {boolean} hit - the result of the hit test on the display object\n */\n private processPointerMove(interactionEvent: InteractionEvent, displayObject: DisplayObject, hit: boolean): void\n {\n const data = interactionEvent.data;\n\n const isTouch = data.pointerType === 'touch';\n\n const isMouse = (data.pointerType === 'mouse' || data.pointerType === 'pen');\n\n if (isMouse)\n {\n this.processPointerOverOut(interactionEvent, displayObject, hit);\n }\n\n if (!this.moveWhenInside || hit)\n {\n this.dispatchEvent(displayObject, 'pointermove', interactionEvent);\n if (isTouch) this.dispatchEvent(displayObject, 'touchmove', interactionEvent);\n if (isMouse) this.dispatchEvent(displayObject, 'mousemove', interactionEvent);\n }\n }\n\n /**\n * Is called when the pointer is moved out of the renderer element\n *\n * @private\n * @param {PointerEvent} originalEvent - The DOM event of a pointer being moved out\n */\n private onPointerOut(originalEvent: InteractivePointerEvent): void\n {\n // if we support touch events, then only use those for touch events, not pointer events\n if (this.supportsTouchEvents && (originalEvent as PointerEvent).pointerType === 'touch') return;\n\n const events = this.normalizeToPointerData(originalEvent);\n\n // Only mouse and pointer can call onPointerOut, so events will always be length 1\n const event = events[0];\n\n if (event.pointerType === 'mouse')\n {\n this.mouseOverRenderer = false;\n this.setCursorMode(null);\n }\n\n const interactionData = this.getInteractionDataForPointerId(event);\n\n const interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData);\n\n interactionEvent.data.originalEvent = event;\n\n this.processInteractive(interactionEvent, this.lastObjectRendered, this.processPointerOverOut, false);\n\n this.emit('pointerout', interactionEvent);\n if (event.pointerType === 'mouse' || event.pointerType === 'pen')\n {\n this.emit('mouseout', interactionEvent);\n }\n else\n {\n // we can get touchleave events after touchend, so we want to make sure we don't\n // introduce memory leaks\n this.releaseInteractionDataForPointerId(interactionData.identifier);\n }\n }\n\n /**\n * Processes the result of the pointer over/out check and dispatches the event if need be\n *\n * @private\n * @param {PIXI.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event\n * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - The display object that was tested\n * @param {boolean} hit - the result of the hit test on the display object\n */\n private processPointerOverOut(interactionEvent: InteractionEvent, displayObject: DisplayObject, hit: boolean): void\n {\n const data = interactionEvent.data;\n\n const id = interactionEvent.data.identifier;\n\n const isMouse = (data.pointerType === 'mouse' || data.pointerType === 'pen');\n\n let trackingData = displayObject.trackedPointers[id];\n\n // if we just moused over the display object, then we need to track that state\n if (hit && !trackingData)\n {\n trackingData = displayObject.trackedPointers[id] = new InteractionTrackingData(id);\n }\n\n if (trackingData === undefined) return;\n\n if (hit && this.mouseOverRenderer)\n {\n if (!trackingData.over)\n {\n trackingData.over = true;\n this.delayDispatchEvent(displayObject, 'pointerover', interactionEvent);\n if (isMouse)\n {\n this.delayDispatchEvent(displayObject, 'mouseover', interactionEvent);\n }\n }\n\n // only change the cursor if it has not already been changed (by something deeper in the\n // display tree)\n if (isMouse && this.cursor === null)\n {\n this.cursor = displayObject.cursor;\n }\n }\n else if (trackingData.over)\n {\n trackingData.over = false;\n this.dispatchEvent(displayObject, 'pointerout', this.eventData);\n if (isMouse)\n {\n this.dispatchEvent(displayObject, 'mouseout', interactionEvent);\n }\n // if there is no mouse down information for the pointer, then it is safe to delete\n if (trackingData.none)\n {\n delete displayObject.trackedPointers[id];\n }\n }\n }\n\n /**\n * Is called when the pointer is moved into the renderer element\n *\n * @private\n * @param {PointerEvent} originalEvent - The DOM event of a pointer button being moved into the renderer view\n */\n private onPointerOver(originalEvent: InteractivePointerEvent): void\n {\n const events = this.normalizeToPointerData(originalEvent);\n\n // Only mouse and pointer can call onPointerOver, so events will always be length 1\n const event = events[0];\n\n const interactionData = this.getInteractionDataForPointerId(event);\n\n const interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData);\n\n interactionEvent.data.originalEvent = event;\n\n if (event.pointerType === 'mouse')\n {\n this.mouseOverRenderer = true;\n }\n\n this.emit('pointerover', interactionEvent);\n if (event.pointerType === 'mouse' || event.pointerType === 'pen')\n {\n this.emit('mouseover', interactionEvent);\n }\n }\n\n /**\n * Get InteractionData for a given pointerId. Store that data as well\n *\n * @private\n * @param {PointerEvent} event - Normalized pointer event, output from normalizeToPointerData\n * @return {PIXI.InteractionData} - Interaction data for the given pointer identifier\n */\n private getInteractionDataForPointerId(event: PointerEvent): InteractionData\n {\n const pointerId = event.pointerId;\n\n let interactionData;\n\n if (pointerId === MOUSE_POINTER_ID || event.pointerType === 'mouse')\n {\n interactionData = this.mouse;\n }\n else if (this.activeInteractionData[pointerId])\n {\n interactionData = this.activeInteractionData[pointerId];\n }\n else\n {\n interactionData = this.interactionDataPool.pop() || new InteractionData();\n interactionData.identifier = pointerId;\n this.activeInteractionData[pointerId] = interactionData;\n }\n // copy properties from the event, so that we can make sure that touch/pointer specific\n // data is available\n interactionData.copyEvent(event);\n\n return interactionData;\n }\n\n /**\n * Return unused InteractionData to the pool, for a given pointerId\n *\n * @private\n * @param {number} pointerId - Identifier from a pointer event\n */\n private releaseInteractionDataForPointerId(pointerId: number): void\n {\n const interactionData = this.activeInteractionData[pointerId];\n\n if (interactionData)\n {\n delete this.activeInteractionData[pointerId];\n interactionData.reset();\n this.interactionDataPool.push(interactionData);\n }\n }\n\n /**\n * Configure an InteractionEvent to wrap a DOM PointerEvent and InteractionData\n *\n * @private\n * @param {PIXI.InteractionEvent} interactionEvent - The event to be configured\n * @param {PointerEvent} pointerEvent - The DOM event that will be paired with the InteractionEvent\n * @param {PIXI.InteractionData} interactionData - The InteractionData that will be paired\n * with the InteractionEvent\n * @return {PIXI.InteractionEvent} the interaction event that was passed in\n */\n private configureInteractionEventForDOMEvent(interactionEvent: InteractionEvent, pointerEvent: PointerEvent,\n interactionData: InteractionData\n ): InteractionEvent\n {\n interactionEvent.data = interactionData;\n\n this.mapPositionToPoint(interactionData.global, pointerEvent.clientX, pointerEvent.clientY);\n\n // Not really sure why this is happening, but it's how a previous version handled things\n if (pointerEvent.pointerType === 'touch')\n {\n (pointerEvent as any).globalX = interactionData.global.x;\n (pointerEvent as any).globalY = interactionData.global.y;\n }\n\n interactionData.originalEvent = pointerEvent;\n interactionEvent.reset();\n\n return interactionEvent;\n }\n\n /**\n * Ensures that the original event object contains all data that a regular pointer event would have\n *\n * @private\n * @param {TouchEvent|MouseEvent|PointerEvent} event - The original event data from a touch or mouse event\n * @return {PointerEvent[]} An array containing a single normalized pointer event, in the case of a pointer\n * or mouse event, or a multiple normalized pointer events if there are multiple changed touches\n */\n private normalizeToPointerData(event: InteractivePointerEvent): PointerEvent[]\n {\n const normalizedEvents = [];\n\n if (this.supportsTouchEvents && event instanceof TouchEvent)\n {\n for (let i = 0, li = event.changedTouches.length; i < li; i++)\n {\n const touch = event.changedTouches[i] as PixiTouch;\n\n if (typeof touch.button === 'undefined') touch.button = event.touches.length ? 1 : 0;\n if (typeof touch.buttons === 'undefined') touch.buttons = event.touches.length ? 1 : 0;\n if (typeof touch.isPrimary === 'undefined')\n {\n touch.isPrimary = event.touches.length === 1 && event.type === 'touchstart';\n }\n if (typeof touch.width === 'undefined') touch.width = touch.radiusX || 1;\n if (typeof touch.height === 'undefined') touch.height = touch.radiusY || 1;\n if (typeof touch.tiltX === 'undefined') touch.tiltX = 0;\n if (typeof touch.tiltY === 'undefined') touch.tiltY = 0;\n if (typeof touch.pointerType === 'undefined') touch.pointerType = 'touch';\n if (typeof touch.pointerId === 'undefined') touch.pointerId = touch.identifier || 0;\n if (typeof touch.pressure === 'undefined') touch.pressure = touch.force || 0.5;\n if (typeof touch.twist === 'undefined') touch.twist = 0;\n if (typeof touch.tangentialPressure === 'undefined') touch.tangentialPressure = 0;\n // TODO: Remove these, as layerX/Y is not a standard, is deprecated, has uneven\n // support, and the fill ins are not quite the same\n // offsetX/Y might be okay, but is not the same as clientX/Y when the canvas's top\n // left is not 0,0 on the page\n if (typeof touch.layerX === 'undefined') touch.layerX = touch.offsetX = touch.clientX;\n if (typeof touch.layerY === 'undefined') touch.layerY = touch.offsetY = touch.clientY;\n\n // mark the touch as normalized, just so that we know we did it\n touch.isNormalized = true;\n\n normalizedEvents.push(touch);\n }\n }\n // apparently PointerEvent subclasses MouseEvent, so yay\n else if (event instanceof MouseEvent && (!this.supportsPointerEvents || !(event instanceof window.PointerEvent)))\n {\n const tempEvent = event as PixiPointerEvent;\n\n if (typeof tempEvent.isPrimary === 'undefined') tempEvent.isPrimary = true;\n if (typeof tempEvent.width === 'undefined') tempEvent.width = 1;\n if (typeof tempEvent.height === 'undefined') tempEvent.height = 1;\n if (typeof tempEvent.tiltX === 'undefined') tempEvent.tiltX = 0;\n if (typeof tempEvent.tiltY === 'undefined') tempEvent.tiltY = 0;\n if (typeof tempEvent.pointerType === 'undefined') tempEvent.pointerType = 'mouse';\n if (typeof tempEvent.pointerId === 'undefined') tempEvent.pointerId = MOUSE_POINTER_ID;\n if (typeof tempEvent.pressure === 'undefined') tempEvent.pressure = 0.5;\n if (typeof tempEvent.twist === 'undefined') tempEvent.twist = 0;\n if (typeof tempEvent.tangentialPressure === 'undefined') tempEvent.tangentialPressure = 0;\n\n // mark the mouse event as normalized, just so that we know we did it\n tempEvent.isNormalized = true;\n\n normalizedEvents.push(tempEvent);\n }\n else\n {\n normalizedEvents.push(event);\n }\n\n return normalizedEvents as PointerEvent[];\n }\n\n /**\n * Destroys the interaction manager\n *\n */\n public destroy(): void\n {\n this.removeEvents();\n\n this.removeTickerListener();\n\n this.removeAllListeners();\n\n this.renderer = null;\n\n this.mouse = null;\n\n this.eventData = null;\n\n this.interactionDOMElement = null;\n\n this.onPointerDown = null;\n this.processPointerDown = null;\n\n this.onPointerUp = null;\n this.processPointerUp = null;\n\n this.onPointerCancel = null;\n this.processPointerCancel = null;\n\n this.onPointerMove = null;\n this.processPointerMove = null;\n\n this.onPointerOut = null;\n this.processPointerOverOut = null;\n\n this.onPointerOver = null;\n\n this.search = null;\n }\n}\n\ninterface PixiPointerEvent extends PointerEvent\n{\n isPrimary: boolean;\n width: number;\n height: number;\n tiltX: number;\n tiltY: number;\n pointerType: string;\n pointerId: number;\n pressure: number;\n twist: number;\n tangentialPressure: number;\n isNormalized: boolean;\n}\n\ninterface PixiTouch extends Touch\n{\n button: number;\n buttons: number;\n isPrimary: boolean;\n width: number;\n height: number;\n tiltX: number;\n tiltY: number;\n pointerType: string;\n pointerId: number;\n pressure: number;\n twist: number;\n tangentialPressure: number;\n layerX: number;\n layerY: number;\n offsetX: number;\n offsetY: number;\n isNormalized: boolean;\n}\n","/**\n * A Runner is a highly performant and simple alternative to signals. Best used in situations\n * where events are dispatched to many objects at high frequency (say every frame!)\n *\n *\n * like a signal..\n * ```\n * import { Runner } from '@pixi/runner';\n *\n * const myObject = {\n * loaded: new Runner('loaded')\n * }\n *\n * const listener = {\n * loaded: function(){\n * // thin\n * }\n * }\n *\n * myObject.update.add(listener);\n *\n * myObject.loaded.emit();\n * ```\n *\n * Or for handling calling the same function on many items\n * ```\n * import { Runner } from '@pixi/runner';\n *\n * const myGame = {\n * update: new Runner('update')\n * }\n *\n * const gameObject = {\n * update: function(time){\n * // update my gamey state\n * }\n * }\n *\n * myGame.update.add(gameObject1);\n *\n * myGame.update.emit(time);\n * ```\n * @class\n * @memberof PIXI\n */\nexport class Runner\n{\n public items: any[];\n private _name: string;\n private _aliasCount: number;\n\n /**\n * @param {string} name - the function name that will be executed on the listeners added to this Runner.\n */\n constructor(name: string)\n {\n this.items = [];\n this._name = name;\n this._aliasCount = 0;\n }\n\n /**\n * Dispatch/Broadcast Runner to all listeners added to the queue.\n * @param {...any} params - optional parameters to pass to each listener\n * @return {PIXI.Runner}\n */\n public emit(a0?: unknown, a1?: unknown, a2?: unknown, a3?: unknown,\n a4?: unknown, a5?: unknown, a6?: unknown, a7?: unknown): this\n {\n if (arguments.length > 8)\n {\n throw new Error('max arguments reached');\n }\n\n const { name, items } = this;\n\n this._aliasCount++;\n\n for (let i = 0, len = items.length; i < len; i++)\n {\n items[i][name](a0, a1, a2, a3, a4, a5, a6, a7);\n }\n\n if (items === this.items)\n {\n this._aliasCount--;\n }\n\n return this;\n }\n\n private ensureNonAliasedItems(): void\n {\n if (this._aliasCount > 0 && this.items.length > 1)\n {\n this._aliasCount = 0;\n this.items = this.items.slice(0);\n }\n }\n\n /**\n * Add a listener to the Runner\n *\n * Runners do not need to have scope or functions passed to them.\n * All that is required is to pass the listening object and ensure that it has contains a function that has the same name\n * as the name provided to the Runner when it was created.\n *\n * Eg A listener passed to this Runner will require a 'complete' function.\n *\n * ```\n * import { Runner } from '@pixi/runner';\n *\n * const complete = new Runner('complete');\n * ```\n *\n * The scope used will be the object itself.\n *\n * @param {any} item - The object that will be listening.\n * @return {PIXI.Runner}\n */\n public add(item: unknown): this\n {\n if ((item as any)[this._name])\n {\n this.ensureNonAliasedItems();\n this.remove(item);\n this.items.push(item);\n }\n\n return this;\n }\n\n /**\n * Remove a single listener from the dispatch queue.\n * @param {any} item - The listenr that you would like to remove.\n * @return {PIXI.Runner}\n */\n public remove(item: unknown): this\n {\n const index = this.items.indexOf(item);\n\n if (index !== -1)\n {\n this.ensureNonAliasedItems();\n this.items.splice(index, 1);\n }\n\n return this;\n }\n\n /**\n * Check to see if the listener is already in the Runner\n * @param {any} item - The listener that you would like to check.\n */\n public contains(item: unknown): boolean\n {\n return this.items.indexOf(item) !== -1;\n }\n\n /**\n * Remove all listeners from the Runner\n * @return {PIXI.Runner}\n */\n public removeAll(): this\n {\n this.ensureNonAliasedItems();\n this.items.length = 0;\n\n return this;\n }\n\n /**\n * Remove all references, don't use after this.\n */\n public destroy(): void\n {\n this.removeAll();\n this.items = null;\n this._name = null;\n }\n\n /**\n * `true` if there are no this Runner contains no listeners\n *\n * @member {boolean}\n * @readonly\n */\n public get empty(): boolean\n {\n return this.items.length === 0;\n }\n\n /**\n * The name of the runner.\n *\n * @member {string}\n * @readonly\n */\n public get name(): string\n {\n return this._name;\n }\n}\n\nObject.defineProperties(Runner.prototype, {\n /**\n * Alias for `emit`\n * @memberof PIXI.Runner#\n * @method dispatch\n * @see PIXI.Runner#emit\n */\n dispatch: { value: Runner.prototype.emit },\n /**\n * Alias for `emit`\n * @memberof PIXI.Runner#\n * @method run\n * @see PIXI.Runner#emit\n */\n run: { value: Runner.prototype.emit },\n});\n","import { Resource } from './Resource';\n\nimport type { IImageResourceOptions } from './ImageResource';\nimport type{ ISize } from '@pixi/math';\nimport type{ ICubeResourceOptions } from './CubeResource';\nimport type{ ISVGResourceOptions } from './SVGResource';\nimport type{ IVideoResourceOptions } from './VideoResource';\n\n/**\n * Allow flexible options for resource plugins\n */\nexport type IResourcePluginOptions = { [key: string]: any };\n\n/**\n * All allowable options for autoDetectResource\n */\nexport type IAutoDetectOptions = ISize\n | ICubeResourceOptions\n | IImageResourceOptions\n | ISVGResourceOptions\n | IVideoResourceOptions\n | IResourcePluginOptions;\n\n/**\n * Shape of supported resource plugins\n */\nexport interface IResourcePlugin\n{\n test(source: unknown, extension: string): boolean;\n new (source: any, options?: any): Resource;\n}\n\n/**\n * Collection of installed resource types, class must extend {@link PIXI.resources.Resource}.\n * @example\n * class CustomResource extends PIXI.resources.Resource {\n * // MUST have source, options constructor signature\n * // for auto-detected resources to be created.\n * constructor(source, options) {\n * super();\n * }\n * upload(renderer, baseTexture, glTexture) {\n * // upload with GL\n * return true;\n * }\n * // used to auto-detect resource\n * static test(source, extension) {\n * return extension === 'xyz'|| source instanceof SomeClass;\n * }\n * }\n * // Install the new resource type\n * PIXI.resources.INSTALLED.push(CustomResource);\n *\n * @name PIXI.resources.INSTALLED\n * @type {Array<*>}\n * @static\n * @readonly\n */\nexport const INSTALLED: Array = [];\n\n/**\n * Create a resource element from a single source element. This\n * auto-detects which type of resource to create. All resources that\n * are auto-detectable must have a static `test` method and a constructor\n * with the arguments `(source, options?)`. Currently, the supported\n * resources for auto-detection include:\n * - {@link PIXI.resources.ImageResource}\n * - {@link PIXI.resources.CanvasResource}\n * - {@link PIXI.resources.VideoResource}\n * - {@link PIXI.resources.SVGResource}\n * - {@link PIXI.resources.BufferResource}\n * @static\n * @function PIXI.resources.autoDetectResource\n * @param {string|*} source - Resource source, this can be the URL to the resource,\n * a typed-array (for BufferResource), HTMLVideoElement, SVG data-uri\n * or any other resource that can be auto-detected. If not resource is\n * detected, it's assumed to be an ImageResource.\n * @param {object} [options] - Pass-through options to use for Resource\n * @param {number} [options.width] - Width of BufferResource or SVG rasterization\n * @param {number} [options.height] - Height of BufferResource or SVG rasterization\n * @param {boolean} [options.autoLoad=true] - Image, SVG and Video flag to start loading\n * @param {number} [options.scale=1] - SVG source scale. Overridden by width, height\n * @param {boolean} [options.createBitmap=PIXI.settings.CREATE_IMAGE_BITMAP] - Image option to create Bitmap object\n * @param {boolean} [options.crossorigin=true] - Image and Video option to set crossOrigin\n * @param {boolean} [options.autoPlay=true] - Video option to start playing video immediately\n * @param {number} [options.updateFPS=0] - Video option to update how many times a second the\n * texture should be updated from the video. Leave at 0 to update at every render\n * @return {PIXI.resources.Resource} The created resource.\n */\nexport function autoDetectResource(source: unknown, options?: IAutoDetectOptions): Resource\n{\n if (!source)\n {\n return null;\n }\n\n let extension = '';\n\n if (typeof source === 'string')\n {\n // search for file extension: period, 3-4 chars, then ?, # or EOL\n const result = (/\\.(\\w{3,4})(?:$|\\?|#)/i).exec(source);\n\n if (result)\n {\n extension = result[1].toLowerCase();\n }\n }\n\n for (let i = INSTALLED.length - 1; i >= 0; --i)\n {\n const ResourcePlugin = INSTALLED[i];\n\n if (ResourcePlugin.test && ResourcePlugin.test(source, extension))\n {\n return new ResourcePlugin(source, options);\n }\n }\n\n throw new Error('Unrecognized source type to auto-detect Resource');\n}\n","import { Runner } from '@pixi/runner';\n\nimport type { BaseTexture } from '../BaseTexture';\nimport type { Renderer } from '../../Renderer';\nimport type { GLTexture } from '../GLTexture';\n\n/**\n * Base resource class for textures that manages validation and uploading, depending on its type.\n *\n * Uploading of a base texture to the GPU is required.\n *\n * @class\n * @memberof PIXI.resources\n */\nexport abstract class Resource\n{\n public destroyed: boolean;\n public internal: boolean;\n protected _width: number;\n protected _height: number;\n protected onResize: Runner;\n protected onUpdate: Runner;\n protected onError: Runner;\n /**\n * @param {number} [width=0] - Width of the resource\n * @param {number} [height=0] - Height of the resource\n */\n constructor(width = 0, height = 0)\n {\n /**\n * Internal width of the resource\n * @member {number}\n * @protected\n */\n this._width = width;\n\n /**\n * Internal height of the resource\n * @member {number}\n * @protected\n */\n this._height = height;\n\n /**\n * If resource has been destroyed\n * @member {boolean}\n * @readonly\n * @default false\n */\n this.destroyed = false;\n\n /**\n * `true` if resource is created by BaseTexture\n * useful for doing cleanup with BaseTexture destroy\n * and not cleaning up resources that were created\n * externally.\n * @member {boolean}\n * @protected\n */\n this.internal = false;\n\n /**\n * Mini-runner for handling resize events\n * accepts 2 parameters: width, height\n *\n * @member {Runner}\n * @private\n */\n this.onResize = new Runner('setRealSize');\n\n /**\n * Mini-runner for handling update events\n *\n * @member {Runner}\n * @private\n */\n this.onUpdate = new Runner('update');\n\n /**\n * Handle internal errors, such as loading errors\n * accepts 1 param: error\n *\n * @member {Runner}\n * @private\n */\n this.onError = new Runner('onError');\n }\n\n /**\n * Bind to a parent BaseTexture\n *\n * @param {PIXI.BaseTexture} baseTexture - Parent texture\n */\n bind(baseTexture: BaseTexture): void\n {\n this.onResize.add(baseTexture);\n this.onUpdate.add(baseTexture);\n this.onError.add(baseTexture);\n\n // Call a resize immediate if we already\n // have the width and height of the resource\n if (this._width || this._height)\n {\n this.onResize.emit(this._width, this._height);\n }\n }\n\n /**\n * Unbind to a parent BaseTexture\n *\n * @param {PIXI.BaseTexture} baseTexture - Parent texture\n */\n unbind(baseTexture: BaseTexture): void\n {\n this.onResize.remove(baseTexture);\n this.onUpdate.remove(baseTexture);\n this.onError.remove(baseTexture);\n }\n\n /**\n * Trigger a resize event\n * @param {number} width - X dimension\n * @param {number} height - Y dimension\n */\n resize(width: number, height: number): void\n {\n if (width !== this._width || height !== this._height)\n {\n this._width = width;\n this._height = height;\n this.onResize.emit(width, height);\n }\n }\n\n /**\n * Has been validated\n * @readonly\n * @member {boolean}\n */\n get valid(): boolean\n {\n return !!this._width && !!this._height;\n }\n\n /**\n * Has been updated trigger event\n */\n update(): void\n {\n if (!this.destroyed)\n {\n this.onUpdate.emit();\n }\n }\n\n /**\n * This can be overridden to start preloading a resource\n * or do any other prepare step.\n * @protected\n * @return {Promise} Handle the validate event\n */\n load(): Promise\n {\n return Promise.resolve(this);\n }\n\n /**\n * The width of the resource.\n *\n * @member {number}\n * @readonly\n */\n get width(): number\n {\n return this._width;\n }\n\n /**\n * The height of the resource.\n *\n * @member {number}\n * @readonly\n */\n get height(): number\n {\n return this._height;\n }\n\n /**\n * Uploads the texture or returns false if it cant for some reason. Override this.\n *\n * @param {PIXI.Renderer} renderer - yeah, renderer!\n * @param {PIXI.BaseTexture} baseTexture - the texture\n * @param {PIXI.GLTexture} glTexture - texture instance for this webgl context\n * @returns {boolean} true is success\n */\n abstract upload(renderer: Renderer, baseTexture: BaseTexture, glTexture: GLTexture): boolean;\n\n /**\n * Set the style, optional to override\n *\n * @param {PIXI.Renderer} renderer - yeah, renderer!\n * @param {PIXI.BaseTexture} baseTexture - the texture\n * @param {PIXI.GLTexture} glTexture - texture instance for this webgl context\n * @returns {boolean} `true` is success\n */\n style(_renderer: Renderer, _baseTexture: BaseTexture, _glTexture: GLTexture): boolean\n {\n return false;\n }\n\n /**\n * Clean up anything, this happens when destroying is ready.\n *\n * @protected\n */\n dispose(): void\n {\n // override\n }\n\n /**\n * Call when destroying resource, unbind any BaseTexture object\n * before calling this method, as reference counts are maintained\n * internally.\n */\n destroy(): void\n {\n if (!this.destroyed)\n {\n this.destroyed = true;\n this.dispose();\n this.onError.removeAll();\n this.onError = null;\n this.onResize.removeAll();\n this.onResize = null;\n this.onUpdate.removeAll();\n this.onUpdate = null;\n }\n }\n\n /**\n * Abstract, used to auto-detect resource type\n *\n * @static\n * @param {*} source - The source object\n * @param {string} extension - The extension of source, if set\n */\n static test(_source: unknown, _extension?: string): boolean\n {\n return false;\n }\n}\n","import { Resource } from './Resource';\nimport { ALPHA_MODES } from '@pixi/constants';\n\nimport type { ISize } from '@pixi/math';\nimport type { BaseTexture } from '../BaseTexture';\nimport type { Renderer } from '../../Renderer';\nimport type { GLTexture } from '../GLTexture';\n/**\n * @interface SharedArrayBuffer\n */\n\n/**\n * Buffer resource with data of typed array.\n * @class\n * @extends PIXI.resources.Resource\n * @memberof PIXI.resources\n */\nexport class BufferResource extends Resource\n{\n data: Float32Array|Uint8Array|Uint32Array;\n\n /**\n * @param {Float32Array|Uint8Array|Uint32Array} source - Source buffer\n * @param {object} options - Options\n * @param {number} options.width - Width of the texture\n * @param {number} options.height - Height of the texture\n */\n constructor(source: Float32Array|Uint8Array|Uint32Array, options: ISize)\n {\n const { width, height } = options || {};\n\n if (!width || !height)\n {\n throw new Error('BufferResource width or height invalid');\n }\n\n super(width, height);\n\n /**\n * Source array\n * Cannot be ClampedUint8Array because it cant be uploaded to WebGL\n *\n * @member {Float32Array|Uint8Array|Uint32Array}\n */\n this.data = source;\n }\n\n /**\n * Upload the texture to the GPU.\n * @param {PIXI.Renderer} renderer - Upload to the renderer\n * @param {PIXI.BaseTexture} baseTexture - Reference to parent texture\n * @param {PIXI.GLTexture} glTexture - glTexture\n * @returns {boolean} true is success\n */\n upload(renderer: Renderer, baseTexture: BaseTexture, glTexture: GLTexture): boolean\n {\n const gl = renderer.gl;\n\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, baseTexture.alphaMode === ALPHA_MODES.UNPACK);\n\n if (glTexture.width === baseTexture.width && glTexture.height === baseTexture.height)\n {\n gl.texSubImage2D(\n baseTexture.target,\n 0,\n 0,\n 0,\n baseTexture.width,\n baseTexture.height,\n baseTexture.format,\n baseTexture.type,\n this.data\n );\n }\n else\n {\n glTexture.width = baseTexture.width;\n glTexture.height = baseTexture.height;\n\n gl.texImage2D(\n baseTexture.target,\n 0,\n glTexture.internalFormat,\n baseTexture.width,\n baseTexture.height,\n 0,\n baseTexture.format,\n glTexture.type,\n this.data\n );\n }\n\n return true;\n }\n\n /**\n * Destroy and don't use after this\n * @override\n */\n dispose(): void\n {\n this.data = null;\n }\n\n /**\n * Used to auto-detect the type of resource.\n *\n * @static\n * @param {*} source - The source object\n * @return {boolean} `true` if \n */\n static test(source: unknown): source is Float32Array|Uint8Array|Uint32Array\n {\n return source instanceof Float32Array\n || source instanceof Uint8Array\n || source instanceof Uint32Array;\n }\n}\n","import { BaseTextureCache, EventEmitter, isPow2, TextureCache, uid } from '@pixi/utils';\nimport { FORMATS, SCALE_MODES, TARGETS, TYPES, ALPHA_MODES, MIPMAP_MODES, WRAP_MODES } from '@pixi/constants';\nimport { Resource } from './resources/Resource';\nimport { BufferResource } from './resources/BufferResource';\nimport { autoDetectResource } from './resources/autoDetectResource';\nimport { settings } from '@pixi/settings';\n\nimport type { GLTexture } from './GLTexture';\n\nconst defaultBufferOptions = {\n scaleMode: SCALE_MODES.NEAREST,\n format: FORMATS.RGBA,\n alphaMode: ALPHA_MODES.NPM,\n};\n\nexport type ImageSource = HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|ImageBitmap;\n\nexport interface IBaseTextureOptions {\n alphaMode?: ALPHA_MODES;\n mipmap?: MIPMAP_MODES;\n anisotropicLevel?: number;\n scaleMode?: SCALE_MODES;\n width?: number;\n height?: number;\n wrapMode?: WRAP_MODES;\n format?: FORMATS;\n type?: TYPES;\n target?: TARGETS;\n resolution?: number;\n resourceOptions?: any;\n}\n\nexport interface BaseTexture extends GlobalMixins.BaseTexture, EventEmitter {}\n\n/**\n * A Texture stores the information that represents an image.\n * All textures have a base texture, which contains information about the source.\n * Therefore you can have many textures all using a single BaseTexture\n *\n * @class\n * @extends PIXI.utils.EventEmitter\n * @memberof PIXI\n * @param {PIXI.resources.Resource|string|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} [resource=null]\n * The current resource to use, for things that aren't Resource objects, will be converted\n * into a Resource.\n * @param {Object} [options] - Collection of options\n * @param {PIXI.MIPMAP_MODES} [options.mipmap=PIXI.settings.MIPMAP_TEXTURES] - If mipmapping is enabled for texture\n * @param {number} [options.anisotropicLevel=PIXI.settings.ANISOTROPIC_LEVEL] - Anisotropic filtering level of texture\n * @param {PIXI.WRAP_MODES} [options.wrapMode=PIXI.settings.WRAP_MODE] - Wrap mode for textures\n * @param {PIXI.SCALE_MODES} [options.scaleMode=PIXI.settings.SCALE_MODE] - Default scale mode, linear, nearest\n * @param {PIXI.FORMATS} [options.format=PIXI.FORMATS.RGBA] - GL format type\n * @param {PIXI.TYPES} [options.type=PIXI.TYPES.UNSIGNED_BYTE] - GL data type\n * @param {PIXI.TARGETS} [options.target=PIXI.TARGETS.TEXTURE_2D] - GL texture target\n * @param {PIXI.ALPHA_MODES} [options.alphaMode=PIXI.ALPHA_MODES.UNPACK] - Pre multiply the image alpha\n * @param {number} [options.width=0] - Width of the texture\n * @param {number} [options.height=0] - Height of the texture\n * @param {number} [options.resolution] - Resolution of the base texture\n * @param {object} [options.resourceOptions] - Optional resource options,\n * see {@link PIXI.resources.autoDetectResource autoDetectResource}\n */\nexport class BaseTexture extends EventEmitter\n{\n public width: number;\n public height: number;\n public resolution: number;\n public alphaMode?: ALPHA_MODES;\n public mipmap?: MIPMAP_MODES;\n public anisotropicLevel?: number;\n public scaleMode?: SCALE_MODES;\n public wrapMode?: WRAP_MODES;\n public format?: FORMATS;\n public type?: TYPES;\n public target?: TARGETS;\n\n public readonly uid: number;\n touched: number;\n isPowerOfTwo: boolean;\n\n _glTextures: { [key: number]: GLTexture };\n dirtyId: number;\n dirtyStyleId: number;\n public cacheId: string;\n public valid: boolean;\n textureCacheIds: Array;\n public destroyed: boolean;\n public resource: Resource;\n _batchEnabled: number;\n _batchLocation: number;\n parentTextureArray: BaseTexture;\n\n constructor(resource: Resource | ImageSource | string | any = null, options: IBaseTextureOptions = null)\n {\n super();\n\n options = options || {};\n\n const { alphaMode, mipmap, anisotropicLevel, scaleMode, width, height,\n wrapMode, format, type, target, resolution, resourceOptions } = options;\n\n // Convert the resource to a Resource object\n if (resource && !(resource instanceof Resource))\n {\n resource = autoDetectResource(resource, resourceOptions);\n resource.internal = true;\n }\n\n /**\n * The width of the base texture set when the image has loaded\n *\n * @readonly\n * @member {number}\n */\n this.width = width || 0;\n\n /**\n * The height of the base texture set when the image has loaded\n *\n * @readonly\n * @member {number}\n */\n this.height = height || 0;\n\n /**\n * The resolution / device pixel ratio of the texture\n *\n * @member {number}\n * @default PIXI.settings.RESOLUTION\n */\n this.resolution = resolution || settings.RESOLUTION;\n\n /**\n * Mipmap mode of the texture, affects downscaled images\n *\n * @member {PIXI.MIPMAP_MODES}\n * @default PIXI.settings.MIPMAP_TEXTURES\n */\n this.mipmap = mipmap !== undefined ? mipmap : settings.MIPMAP_TEXTURES;\n\n /**\n * Anisotropic filtering level of texture\n *\n * @member {number}\n * @default PIXI.settings.ANISOTROPIC_LEVEL\n */\n this.anisotropicLevel = anisotropicLevel !== undefined ? anisotropicLevel : settings.ANISOTROPIC_LEVEL;\n\n /**\n * How the texture wraps\n * @member {number}\n */\n this.wrapMode = wrapMode || settings.WRAP_MODE;\n\n /**\n * The scale mode to apply when scaling this texture\n *\n * @member {PIXI.SCALE_MODES}\n * @default PIXI.settings.SCALE_MODE\n */\n this.scaleMode = scaleMode !== undefined ? scaleMode : settings.SCALE_MODE;\n\n /**\n * The pixel format of the texture\n *\n * @member {PIXI.FORMATS}\n * @default PIXI.FORMATS.RGBA\n */\n this.format = format || FORMATS.RGBA;\n\n /**\n * The type of resource data\n *\n * @member {PIXI.TYPES}\n * @default PIXI.TYPES.UNSIGNED_BYTE\n */\n this.type = type || TYPES.UNSIGNED_BYTE;\n\n /**\n * The target type\n *\n * @member {PIXI.TARGETS}\n * @default PIXI.TARGETS.TEXTURE_2D\n */\n this.target = target || TARGETS.TEXTURE_2D;\n\n /**\n * How to treat premultiplied alpha, see {@link PIXI.ALPHA_MODES}.\n *\n * @member {PIXI.ALPHA_MODES}\n * @default PIXI.ALPHA_MODES.UNPACK\n */\n this.alphaMode = alphaMode !== undefined ? alphaMode : ALPHA_MODES.UNPACK;\n\n if ((options as any).premultiplyAlpha !== undefined)\n {\n // triggers deprecation\n (this as any).premultiplyAlpha = (options as any).premultiplyAlpha;\n }\n\n /**\n * Global unique identifier for this BaseTexture\n *\n * @member {number}\n * @protected\n */\n this.uid = uid();\n\n /**\n * Used by automatic texture Garbage Collection, stores last GC tick when it was bound\n *\n * @member {number}\n * @protected\n */\n this.touched = 0;\n\n /**\n * Whether or not the texture is a power of two, try to use power of two textures as much\n * as you can\n *\n * @readonly\n * @member {boolean}\n * @default false\n */\n this.isPowerOfTwo = false;\n this._refreshPOT();\n\n /**\n * The map of render context textures where this is bound\n *\n * @member {Object}\n * @private\n */\n this._glTextures = {};\n\n /**\n * Used by TextureSystem to only update texture to the GPU when needed.\n * Please call `update()` to increment it.\n *\n * @readonly\n * @member {number}\n */\n this.dirtyId = 0;\n\n /**\n * Used by TextureSystem to only update texture style when needed.\n *\n * @protected\n * @member {number}\n */\n this.dirtyStyleId = 0;\n\n /**\n * Currently default cache ID.\n *\n * @member {string}\n */\n this.cacheId = null;\n\n /**\n * Generally speaking means when resource is loaded.\n * @readonly\n * @member {boolean}\n */\n this.valid = width > 0 && height > 0;\n\n /**\n * The collection of alternative cache ids, since some BaseTextures\n * can have more than one ID, short name and longer full URL\n *\n * @member {Array}\n * @readonly\n */\n this.textureCacheIds = [];\n\n /**\n * Flag if BaseTexture has been destroyed.\n *\n * @member {boolean}\n * @readonly\n */\n this.destroyed = false;\n\n /**\n * The resource used by this BaseTexture, there can only\n * be one resource per BaseTexture, but textures can share\n * resources.\n *\n * @member {PIXI.resources.Resource}\n * @readonly\n */\n this.resource = null;\n\n /**\n * Number of the texture batch, used by multi-texture renderers\n *\n * @member {number}\n */\n this._batchEnabled = 0;\n\n /**\n * Location inside texture batch, used by multi-texture renderers\n *\n * @member {number}\n */\n this._batchLocation = 0;\n\n /**\n * Whether its a part of another texture, handled by ArrayResource or CubeResource\n *\n * @member {PIXI.BaseTexture}\n */\n this.parentTextureArray = null;\n\n /**\n * Fired when a not-immediately-available source finishes loading.\n *\n * @protected\n * @event PIXI.BaseTexture#loaded\n * @param {PIXI.BaseTexture} baseTexture - Resource loaded.\n */\n\n /**\n * Fired when a not-immediately-available source fails to load.\n *\n * @protected\n * @event PIXI.BaseTexture#error\n * @param {PIXI.BaseTexture} baseTexture - Resource errored.\n * @param {ErrorEvent} event - Load error event.\n */\n\n /**\n * Fired when BaseTexture is updated.\n *\n * @protected\n * @event PIXI.BaseTexture#loaded\n * @param {PIXI.BaseTexture} baseTexture - Resource loaded.\n */\n\n /**\n * Fired when BaseTexture is updated.\n *\n * @protected\n * @event PIXI.BaseTexture#update\n * @param {PIXI.BaseTexture} baseTexture - Instance of texture being updated.\n */\n\n /**\n * Fired when BaseTexture is destroyed.\n *\n * @protected\n * @event PIXI.BaseTexture#dispose\n * @param {PIXI.BaseTexture} baseTexture - Instance of texture being destroyed.\n */\n\n // Set the resource\n this.setResource(resource);\n }\n\n /**\n * Pixel width of the source of this texture\n *\n * @readonly\n * @member {number}\n */\n get realWidth(): number\n {\n return Math.ceil((this.width * this.resolution) - 1e-4);\n }\n\n /**\n * Pixel height of the source of this texture\n *\n * @readonly\n * @member {number}\n */\n get realHeight(): number\n {\n return Math.ceil((this.height * this.resolution) - 1e-4);\n }\n\n /**\n * Changes style options of BaseTexture\n *\n * @param {PIXI.SCALE_MODES} [scaleMode] - Pixi scalemode\n * @param {PIXI.MIPMAP_MODES} [mipmap] - enable mipmaps\n * @returns {PIXI.BaseTexture} this\n */\n setStyle(scaleMode?: SCALE_MODES, mipmap?: MIPMAP_MODES): this\n {\n let dirty;\n\n if (scaleMode !== undefined && scaleMode !== this.scaleMode)\n {\n this.scaleMode = scaleMode;\n dirty = true;\n }\n\n if (mipmap !== undefined && mipmap !== this.mipmap)\n {\n this.mipmap = mipmap;\n dirty = true;\n }\n\n if (dirty)\n {\n this.dirtyStyleId++;\n }\n\n return this;\n }\n\n /**\n * Changes w/h/resolution. Texture becomes valid if width and height are greater than zero.\n *\n * @param {number} width - Visual width\n * @param {number} height - Visual height\n * @param {number} [resolution] - Optionally set resolution\n * @returns {PIXI.BaseTexture} this\n */\n setSize(width: number, height: number, resolution?: number): this\n {\n this.resolution = resolution || this.resolution;\n this.width = width;\n this.height = height;\n this._refreshPOT();\n this.update();\n\n return this;\n }\n\n /**\n * Sets real size of baseTexture, preserves current resolution.\n *\n * @param {number} realWidth - Full rendered width\n * @param {number} realHeight - Full rendered height\n * @param {number} [resolution] - Optionally set resolution\n * @returns {PIXI.BaseTexture} this\n */\n setRealSize(realWidth: number, realHeight: number, resolution?: number): this\n {\n this.resolution = resolution || this.resolution;\n this.width = realWidth / this.resolution;\n this.height = realHeight / this.resolution;\n this._refreshPOT();\n this.update();\n\n return this;\n }\n\n /**\n * Refresh check for isPowerOfTwo texture based on size\n *\n * @private\n */\n protected _refreshPOT(): void\n {\n this.isPowerOfTwo = isPow2(this.realWidth) && isPow2(this.realHeight);\n }\n\n /**\n * Changes resolution\n *\n * @param {number} resolution - res\n * @returns {PIXI.BaseTexture} this\n */\n setResolution(resolution: number): this\n {\n const oldResolution = this.resolution;\n\n if (oldResolution === resolution)\n {\n return this;\n }\n\n this.resolution = resolution;\n\n if (this.valid)\n {\n this.width = this.width * oldResolution / resolution;\n this.height = this.height * oldResolution / resolution;\n this.emit('update', this);\n }\n\n this._refreshPOT();\n\n return this;\n }\n\n /**\n * Sets the resource if it wasn't set. Throws error if resource already present\n *\n * @param {PIXI.resources.Resource} resource - that is managing this BaseTexture\n * @returns {PIXI.BaseTexture} this\n */\n setResource(resource: Resource): this\n {\n if (this.resource === resource)\n {\n return this;\n }\n\n if (this.resource)\n {\n throw new Error('Resource can be set only once');\n }\n\n resource.bind(this);\n\n this.resource = resource;\n\n return this;\n }\n\n /**\n * Invalidates the object. Texture becomes valid if width and height are greater than zero.\n */\n update(): void\n {\n if (!this.valid)\n {\n if (this.width > 0 && this.height > 0)\n {\n this.valid = true;\n this.emit('loaded', this);\n this.emit('update', this);\n }\n }\n else\n {\n this.dirtyId++;\n this.dirtyStyleId++;\n this.emit('update', this);\n }\n }\n\n /**\n * Handle errors with resources.\n * @private\n * @param {ErrorEvent} event - Error event emitted.\n */\n onError(event: ErrorEvent): void\n {\n this.emit('error', this, event);\n }\n\n /**\n * Destroys this base texture.\n * The method stops if resource doesn't want this texture to be destroyed.\n * Removes texture from all caches.\n */\n destroy(): void\n {\n // remove and destroy the resource\n if (this.resource)\n {\n this.resource.unbind(this);\n // only destroy resourced created internally\n if (this.resource.internal)\n {\n this.resource.destroy();\n }\n this.resource = null;\n }\n\n if (this.cacheId)\n {\n delete BaseTextureCache[this.cacheId];\n delete TextureCache[this.cacheId];\n\n this.cacheId = null;\n }\n\n // finally let the WebGL renderer know..\n this.dispose();\n\n BaseTexture.removeFromCache(this);\n this.textureCacheIds = null;\n\n this.destroyed = true;\n }\n\n /**\n * Frees the texture from WebGL memory without destroying this texture object.\n * This means you can still use the texture later which will upload it to GPU\n * memory again.\n *\n * @fires PIXI.BaseTexture#dispose\n */\n dispose(): void\n {\n this.emit('dispose', this);\n }\n\n /**\n * Utility function for BaseTexture|Texture cast\n */\n castToBaseTexture(): BaseTexture\n {\n return this;\n }\n\n /**\n * Helper function that creates a base texture based on the source you provide.\n * The source can be - image url, image element, canvas element. If the\n * source is an image url or an image element and not in the base texture\n * cache, it will be created and loaded.\n *\n * @static\n * @param {string|HTMLImageElement|HTMLCanvasElement|SVGElement|HTMLVideoElement} source - The\n * source to create base texture from.\n * @param {object} [options] See {@link PIXI.BaseTexture}'s constructor for options.\n * @param {boolean} [strict] - Enforce strict-mode, see {@link PIXI.settings.STRICT_TEXTURE_CACHE}.\n * @returns {PIXI.BaseTexture} The new base texture.\n */\n static from(source: ImageSource|string, options: IBaseTextureOptions,\n strict = settings.STRICT_TEXTURE_CACHE): BaseTexture\n {\n const isFrame = typeof source === 'string';\n let cacheId = null;\n\n if (isFrame)\n {\n cacheId = source;\n }\n else\n {\n if (!(source as any)._pixiId)\n {\n (source as any)._pixiId = `pixiid_${uid()}`;\n }\n\n cacheId = (source as any)._pixiId;\n }\n\n let baseTexture = BaseTextureCache[cacheId];\n\n // Strict-mode rejects invalid cacheIds\n if (isFrame && strict && !baseTexture)\n {\n throw new Error(`The cacheId \"${cacheId}\" does not exist in BaseTextureCache.`);\n }\n\n if (!baseTexture)\n {\n baseTexture = new BaseTexture(source, options);\n baseTexture.cacheId = cacheId;\n BaseTexture.addToCache(baseTexture, cacheId);\n }\n\n return baseTexture;\n }\n\n /**\n * Create a new BaseTexture with a BufferResource from a Float32Array.\n * RGBA values are floats from 0 to 1.\n * @static\n * @param {Float32Array|Uint8Array} buffer - The optional array to use, if no data\n * is provided, a new Float32Array is created.\n * @param {number} width - Width of the resource\n * @param {number} height - Height of the resource\n * @param {object} [options] See {@link PIXI.BaseTexture}'s constructor for options.\n * @return {PIXI.BaseTexture} The resulting new BaseTexture\n */\n static fromBuffer(buffer: Float32Array|Uint8Array,\n width: number, height: number, options: IBaseTextureOptions): BaseTexture\n {\n buffer = buffer || new Float32Array(width * height * 4);\n\n const resource = new BufferResource(buffer, { width, height });\n const type = buffer instanceof Float32Array ? TYPES.FLOAT : TYPES.UNSIGNED_BYTE;\n\n return new BaseTexture(resource, Object.assign(defaultBufferOptions, options || { width, height, type }));\n }\n\n /**\n * Adds a BaseTexture to the global BaseTextureCache. This cache is shared across the whole PIXI object.\n *\n * @static\n * @param {PIXI.BaseTexture} baseTexture - The BaseTexture to add to the cache.\n * @param {string} id - The id that the BaseTexture will be stored against.\n */\n static addToCache(baseTexture: BaseTexture, id: string): void\n {\n if (id)\n {\n if (baseTexture.textureCacheIds.indexOf(id) === -1)\n {\n baseTexture.textureCacheIds.push(id);\n }\n\n if (BaseTextureCache[id])\n {\n // eslint-disable-next-line no-console\n console.warn(`BaseTexture added to the cache with an id [${id}] that already had an entry`);\n }\n\n BaseTextureCache[id] = baseTexture;\n }\n }\n\n /**\n * Remove a BaseTexture from the global BaseTextureCache.\n *\n * @static\n * @param {string|PIXI.BaseTexture} baseTexture - id of a BaseTexture to be removed, or a BaseTexture instance itself.\n * @return {PIXI.BaseTexture|null} The BaseTexture that was removed.\n */\n static removeFromCache(baseTexture: string | BaseTexture): BaseTexture|null\n {\n if (typeof baseTexture === 'string')\n {\n const baseTextureFromCache = BaseTextureCache[baseTexture];\n\n if (baseTextureFromCache)\n {\n const index = baseTextureFromCache.textureCacheIds.indexOf(baseTexture);\n\n if (index > -1)\n {\n baseTextureFromCache.textureCacheIds.splice(index, 1);\n }\n\n delete BaseTextureCache[baseTexture];\n\n return baseTextureFromCache;\n }\n }\n else if (baseTexture && baseTexture.textureCacheIds)\n {\n for (let i = 0; i < baseTexture.textureCacheIds.length; ++i)\n {\n delete BaseTextureCache[baseTexture.textureCacheIds[i]];\n }\n\n baseTexture.textureCacheIds.length = 0;\n\n return baseTexture;\n }\n\n return null;\n }\n\n /**\n * Global number of the texture batch, used by multi-texture renderers\n *\n * @static\n * @member {number}\n */\n static _globalBatch = 0;\n}\n","import { Resource } from './Resource';\nimport { BaseTexture } from '../BaseTexture';\nimport { ISize } from '@pixi/math';\nimport { autoDetectResource, IAutoDetectOptions } from './autoDetectResource';\n\n/**\n * Resource that can manage several resource (items) inside.\n * All resources need to have the same pixel size.\n * Parent class for CubeResource and ArrayResource\n *\n * @class\n * @extends PIXI.resources.Resource\n * @memberof PIXI.resources\n * @param {object} [options] Options to for Resource constructor\n * @param {number} [options.width] - Width of the resource\n * @param {number} [options.height] - Height of the resource\n */\nexport abstract class AbstractMultiResource extends Resource\n{\n readonly length: number;\n items: Array;\n itemDirtyIds: Array;\n private _load: Promise;\n\n baseTexture: BaseTexture;\n\n constructor(length: number, options?: ISize)\n {\n const { width, height } = options || {};\n\n super(width, height);\n /**\n * Collection of partial baseTextures that correspond to resources\n * @member {Array}\n * @readonly\n */\n this.items = [];\n\n /**\n * Dirty IDs for each part\n * @member {Array}\n * @readonly\n */\n this.itemDirtyIds = [];\n\n for (let i = 0; i < length; i++)\n {\n const partTexture = new BaseTexture();\n\n this.items.push(partTexture);\n // -2 - first run of texture array upload\n // -1 - texture item was allocated\n // >=0 - texture item uploaded , in sync with items[i].dirtyId\n this.itemDirtyIds.push(-2);\n }\n\n /**\n * Number of elements in array\n *\n * @member {number}\n * @readonly\n */\n this.length = length;\n\n /**\n * Promise when loading\n * @member {Promise}\n * @private\n * @default null\n */\n this._load = null;\n\n /**\n * Bound baseTexture, there can only be one\n * @member {PIXI.BaseTexture}\n */\n this.baseTexture = null;\n }\n\n /**\n * used from ArrayResource and CubeResource constructors\n * @param {Array<*>} resources - Can be resources, image elements, canvas, etc. ,\n * length should be same as constructor length\n * @param {object} [options] - detect options for resources\n * @protected\n */\n protected initFromArray(resources: Array, options?: IAutoDetectOptions): void\n {\n for (let i = 0; i < this.length; i++)\n {\n if (!resources[i])\n {\n continue;\n }\n if (resources[i].castToBaseTexture)\n {\n this.addBaseTextureAt(resources[i].castToBaseTexture(), i);\n }\n else if (resources[i] instanceof Resource)\n {\n this.addResourceAt(resources[i], i);\n }\n else\n {\n this.addResourceAt(autoDetectResource(resources[i], options), i);\n }\n }\n }\n\n /**\n * Destroy this BaseImageResource\n * @override\n */\n dispose(): void\n {\n for (let i = 0, len = this.length; i < len; i++)\n {\n this.items[i].destroy();\n }\n this.items = null;\n this.itemDirtyIds = null;\n this._load = null;\n }\n\n /**\n * Set a baseTexture by ID\n *\n * @param {PIXI.BaseTexture} baseTexture\n * @param {number} index - Zero-based index of resource to set\n * @return {PIXI.resources.AbstractMultiResource} Instance for chaining\n */\n abstract addBaseTextureAt(baseTexture: BaseTexture, index: number): this;\n\n /**\n * Set a resource by ID\n *\n * @param {PIXI.resources.Resource} resource\n * @param {number} index - Zero-based index of resource to set\n * @return {PIXI.resources.ArrayResource} Instance for chaining\n */\n addResourceAt(resource: Resource, index: number): this\n {\n if (!this.items[index])\n {\n throw new Error(`Index ${index} is out of bounds`);\n }\n\n // Inherit the first resource dimensions\n if (resource.valid && !this.valid)\n {\n this.resize(resource.width, resource.height);\n }\n\n this.items[index].setResource(resource);\n\n return this;\n }\n\n /**\n * Set the parent base texture\n * @member {PIXI.BaseTexture}\n * @override\n */\n bind(baseTexture: BaseTexture): void\n {\n if (this.baseTexture !== null)\n {\n throw new Error('Only one base texture per TextureArray is allowed');\n }\n super.bind(baseTexture);\n\n for (let i = 0; i < this.length; i++)\n {\n this.items[i].parentTextureArray = baseTexture;\n this.items[i].on('update', baseTexture.update, baseTexture);\n }\n }\n\n /**\n * Unset the parent base texture\n * @member {PIXI.BaseTexture}\n * @override\n */\n unbind(baseTexture: BaseTexture): void\n {\n super.unbind(baseTexture);\n\n for (let i = 0; i < this.length; i++)\n {\n this.items[i].parentTextureArray = null;\n this.items[i].off('update', baseTexture.update, baseTexture);\n }\n }\n\n /**\n * Load all the resources simultaneously\n * @override\n * @return {Promise} When load is resolved\n */\n load(): Promise\n {\n if (this._load)\n {\n return this._load;\n }\n\n const resources = this.items.map((item) => item.resource).filter((item) => item);\n\n // TODO: also implement load part-by-part strategy\n const promises = resources.map((item) => item.load());\n\n this._load = Promise.all(promises)\n .then(() =>\n {\n const { realWidth, realHeight } = this.items[0];\n\n this.resize(realWidth, realHeight);\n\n return Promise.resolve(this);\n }\n );\n\n return this._load;\n }\n}\n","import { AbstractMultiResource } from './AbstractMultiResource';\nimport { TARGETS } from '@pixi/constants';\nimport { BaseTexture } from '../BaseTexture';\n\nimport type { BaseImageResource } from './BaseImageResource';\nimport type { Renderer } from '../../Renderer';\nimport type { GLTexture } from '../GLTexture';\nimport type { ISize } from '@pixi/math';\n\n/**\n * A resource that contains a number of sources.\n *\n * @class\n * @extends PIXI.resources.Resource\n * @memberof PIXI.resources\n * @param {number|Array<*>} source - Number of items in array or the collection\n * of image URLs to use. Can also be resources, image elements, canvas, etc.\n * @param {object} [options] - Options to apply to {@link PIXI.resources.autoDetectResource}\n * @param {number} [options.width] - Width of the resource\n * @param {number} [options.height] - Height of the resource\n */\nexport class ArrayResource extends AbstractMultiResource\n{\n constructor(source: number|Array, options?: ISize)\n {\n const { width, height } = options || {};\n\n let urls;\n let length: number;\n\n if (Array.isArray(source))\n {\n urls = source;\n length = source.length;\n }\n else\n {\n length = source;\n }\n\n super(length, { width, height });\n\n if (urls)\n {\n this.initFromArray(urls, options);\n }\n }\n /**\n * Set a baseTexture by ID,\n * ArrayResource just takes resource from it, nothing more\n *\n * @param {PIXI.BaseTexture} baseTexture\n * @param {number} index - Zero-based index of resource to set\n * @return {PIXI.resources.ArrayResource} Instance for chaining\n */\n addBaseTextureAt(baseTexture: BaseTexture, index: number): this\n {\n if (baseTexture.resource)\n {\n this.addResourceAt(baseTexture.resource, index);\n }\n else\n {\n throw new Error('ArrayResource does not support RenderTexture');\n }\n\n return this;\n }\n\n /**\n * Add binding\n * @member {PIXI.BaseTexture}\n * @override\n */\n bind(baseTexture: BaseTexture): void\n {\n super.bind(baseTexture);\n\n baseTexture.target = TARGETS.TEXTURE_2D_ARRAY;\n }\n\n /**\n * Upload the resources to the GPU.\n * @param {PIXI.Renderer} renderer\n * @param {PIXI.BaseTexture} texture\n * @param {PIXI.GLTexture} glTexture\n * @returns {boolean} whether texture was uploaded\n */\n upload(renderer: Renderer, texture: BaseTexture, glTexture: GLTexture): boolean\n {\n const { length, itemDirtyIds, items } = this;\n const { gl } = renderer;\n\n if (glTexture.dirtyId < 0)\n {\n gl.texImage3D(\n gl.TEXTURE_2D_ARRAY,\n 0,\n texture.format,\n this._width,\n this._height,\n length,\n 0,\n texture.format,\n texture.type,\n null\n );\n }\n\n for (let i = 0; i < length; i++)\n {\n const item = items[i];\n\n if (itemDirtyIds[i] < item.dirtyId)\n {\n itemDirtyIds[i] = item.dirtyId;\n if (item.valid)\n {\n gl.texSubImage3D(\n gl.TEXTURE_2D_ARRAY,\n 0,\n 0, // xoffset\n 0, // yoffset\n i, // zoffset\n item.resource.width,\n item.resource.height,\n 1,\n texture.format,\n texture.type,\n (item.resource as BaseImageResource).source\n );\n }\n }\n }\n\n return true;\n }\n}\n","import { Resource } from './Resource';\nimport { determineCrossOrigin } from '@pixi/utils';\nimport { ALPHA_MODES } from '@pixi/constants';\n\nimport type { BaseTexture, ImageSource } from '../BaseTexture';\nimport type { Renderer } from '../../Renderer';\nimport type { GLTexture } from '../GLTexture';\n/**\n * Base for all the image/canvas resources\n * @class\n * @extends PIXI.resources.Resource\n * @memberof PIXI.resources\n */\nexport class BaseImageResource extends Resource\n{\n public source: ImageSource;\n public noSubImage: boolean;\n\n /**\n * @param {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|SVGElement} source\n */\n constructor(source: ImageSource)\n {\n const sourceAny = source as any;\n const width = sourceAny.naturalWidth || sourceAny.videoWidth || sourceAny.width;\n const height = sourceAny.naturalHeight || sourceAny.videoHeight || sourceAny.height;\n\n super(width, height);\n\n /**\n * The source element\n * @member {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|SVGElement}\n * @readonly\n */\n this.source = source;\n\n /**\n * If set to `true`, will force `texImage2D` over `texSubImage2D` for uploading.\n * Certain types of media (e.g. video) using `texImage2D` is more performant.\n * @member {boolean}\n * @default false\n * @private\n */\n this.noSubImage = false;\n }\n\n /**\n * Set cross origin based detecting the url and the crossorigin\n * @protected\n * @param {HTMLElement} element - Element to apply crossOrigin\n * @param {string} url - URL to check\n * @param {boolean|string} [crossorigin=true] - Cross origin value to use\n */\n static crossOrigin(element: HTMLImageElement|HTMLVideoElement, url: string, crossorigin: boolean|string): void\n {\n if (crossorigin === undefined && url.indexOf('data:') !== 0)\n {\n element.crossOrigin = determineCrossOrigin(url);\n }\n else if (crossorigin !== false)\n {\n element.crossOrigin = typeof crossorigin === 'string' ? crossorigin : 'anonymous';\n }\n }\n\n /**\n * Upload the texture to the GPU.\n * @param {PIXI.Renderer} renderer - Upload to the renderer\n * @param {PIXI.BaseTexture} baseTexture - Reference to parent texture\n * @param {PIXI.GLTexture} glTexture\n * @param {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|SVGElement} [source] (optional)\n * @returns {boolean} true is success\n */\n upload(renderer: Renderer, baseTexture: BaseTexture, glTexture: GLTexture, source?: ImageSource): boolean\n {\n const gl = renderer.gl;\n const width = baseTexture.realWidth;\n const height = baseTexture.realHeight;\n\n source = source || this.source;\n\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, baseTexture.alphaMode === ALPHA_MODES.UNPACK);\n\n if (!this.noSubImage\n && baseTexture.target === gl.TEXTURE_2D\n && glTexture.width === width\n && glTexture.height === height)\n {\n gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, baseTexture.format, baseTexture.type, source);\n }\n else\n {\n glTexture.width = width;\n glTexture.height = height;\n\n gl.texImage2D(baseTexture.target, 0, baseTexture.format, baseTexture.format, baseTexture.type, source);\n }\n\n return true;\n }\n\n /**\n * Checks if source width/height was changed, resize can cause extra baseTexture update.\n * Triggers one update in any case.\n */\n update(): void\n {\n if (this.destroyed)\n {\n return;\n }\n\n const source = this.source as any;\n\n const width = source.naturalWidth || source.videoWidth || source.width;\n const height = source.naturalHeight || source.videoHeight || source.height;\n\n this.resize(width, height);\n\n super.update();\n }\n\n /**\n * Destroy this BaseImageResource\n * @override\n */\n dispose(): void\n {\n this.source = null;\n }\n}\n","import { BaseImageResource } from './BaseImageResource';\n\n/**\n * @interface OffscreenCanvas\n */\n\n/**\n * Resource type for HTMLCanvasElement.\n * @class\n * @extends PIXI.resources.BaseImageResource\n * @memberof PIXI.resources\n * @param {HTMLCanvasElement} source - Canvas element to use\n */\nexport class CanvasResource extends BaseImageResource\n{\n /**\n * Used to auto-detect the type of resource.\n *\n * @static\n * @param {HTMLCanvasElement|OffscreenCanvas} source - The source object\n * @return {boolean} `true` if source is HTMLCanvasElement or OffscreenCanvas\n */\n static test(source: unknown): source is OffscreenCanvas|HTMLCanvasElement\n {\n const { OffscreenCanvas } = window;\n\n // Check for browsers that don't yet support OffscreenCanvas\n if (OffscreenCanvas && source instanceof OffscreenCanvas)\n {\n return true;\n }\n\n return source instanceof HTMLCanvasElement;\n }\n}\n","import { AbstractMultiResource } from './AbstractMultiResource';\nimport { TARGETS } from '@pixi/constants';\n\nimport type { Resource } from './Resource';\nimport type { ISize } from '@pixi/math';\nimport type { ArrayFixed } from '@pixi/utils';\nimport type { BaseTexture } from '../BaseTexture';\nimport type { Renderer } from '../../Renderer';\nimport type { GLTexture } from '../GLTexture';\n\n/**\n * Constructor options for CubeResource\n */\nexport interface ICubeResourceOptions extends ISize\n{\n autoLoad?: boolean;\n linkBaseTexture?: boolean;\n}\n\n/**\n * Resource for a CubeTexture which contains six resources.\n *\n * @class\n * @extends PIXI.resources.ArrayResource\n * @memberof PIXI.resources\n * @param {Array} [source] - Collection of URLs or resources\n * to use as the sides of the cube.\n * @param {object} [options] - ImageResource options\n * @param {number} [options.width] - Width of resource\n * @param {number} [options.height] - Height of resource\n * @param {number} [options.autoLoad=true] - Whether to auto-load resources\n * @param {number} [options.linkBaseTexture=true] - In case BaseTextures are supplied,\n * whether to copy them or use\n */\nexport class CubeResource extends AbstractMultiResource\n{\n items: ArrayFixed;\n\n linkBaseTexture: boolean;\n\n constructor(source?: ArrayFixed, options?: ICubeResourceOptions)\n {\n const { width, height, autoLoad, linkBaseTexture } = options || {};\n\n if (source && source.length !== CubeResource.SIDES)\n {\n throw new Error(`Invalid length. Got ${source.length}, expected 6`);\n }\n\n super(6, { width, height });\n\n for (let i = 0; i < CubeResource.SIDES; i++)\n {\n this.items[i].target = TARGETS.TEXTURE_CUBE_MAP_POSITIVE_X + i;\n }\n\n /**\n * In case BaseTextures are supplied, whether to use same resource or bind baseTexture itself\n * @member {boolean}\n * @protected\n */\n this.linkBaseTexture = linkBaseTexture !== false;\n\n if (source)\n {\n this.initFromArray(source, options);\n }\n\n if (autoLoad !== false)\n {\n this.load();\n }\n }\n\n /**\n * Add binding\n *\n * @override\n * @param {PIXI.BaseTexture} baseTexture - parent base texture\n */\n bind(baseTexture: BaseTexture): void\n {\n super.bind(baseTexture);\n\n baseTexture.target = TARGETS.TEXTURE_CUBE_MAP;\n }\n\n addBaseTextureAt(baseTexture: BaseTexture, index: number, linkBaseTexture?: boolean): this\n {\n if (linkBaseTexture === undefined)\n {\n linkBaseTexture = this.linkBaseTexture;\n }\n\n if (!this.items[index])\n {\n throw new Error(`Index ${index} is out of bounds`);\n }\n\n if (!this.linkBaseTexture\n || baseTexture.parentTextureArray\n || Object.keys(baseTexture._glTextures).length > 0)\n {\n // copy mode\n if (baseTexture.resource)\n {\n this.addResourceAt(baseTexture.resource, index);\n }\n else\n {\n throw new Error(`CubeResource does not support copying of renderTexture.`);\n }\n }\n else\n {\n // link mode, the difficult one!\n baseTexture.target = TARGETS.TEXTURE_CUBE_MAP_POSITIVE_X + index;\n baseTexture.parentTextureArray = this.baseTexture;\n\n this.items[index] = baseTexture;\n }\n\n if (baseTexture.valid && !this.valid)\n {\n this.resize(baseTexture.realWidth, baseTexture.realHeight);\n }\n\n this.items[index] = baseTexture;\n\n return this;\n }\n\n /**\n * Upload the resource\n *\n * @returns {boolean} true is success\n */\n upload(renderer: Renderer, _baseTexture: BaseTexture, glTexture: GLTexture): boolean\n {\n const dirty = this.itemDirtyIds;\n\n for (let i = 0; i < CubeResource.SIDES; i++)\n {\n const side = this.items[i];\n\n if (dirty[i] < side.dirtyId)\n {\n if (side.valid && side.resource)\n {\n side.resource.upload(renderer, side, glTexture);\n dirty[i] = side.dirtyId;\n }\n else if (dirty[i] < -1)\n {\n // either item is not valid yet, either its a renderTexture\n // allocate the memory\n renderer.gl.texImage2D(side.target, 0,\n glTexture.internalFormat,\n _baseTexture.realWidth,\n _baseTexture.realHeight,\n 0,\n _baseTexture.format,\n glTexture.type,\n null);\n dirty[i] = -1;\n }\n }\n }\n\n return true;\n }\n\n /**\n * Number of texture sides to store for CubeResources\n *\n * @name PIXI.resources.CubeResource.SIDES\n * @static\n * @member {number}\n * @default 6\n */\n static SIDES = 6;\n\n /**\n * Used to auto-detect the type of resource.\n *\n * @static\n * @param {object} source - The source object\n * @return {boolean} `true` if source is an array of 6 elements\n */\n static test(source: unknown): source is ArrayFixed\n {\n return Array.isArray(source) && source.length === CubeResource.SIDES;\n }\n}\n","import { BaseImageResource } from './BaseImageResource';\nimport { settings } from '@pixi/settings';\nimport { ALPHA_MODES } from '@pixi/constants';\n\nimport type { BaseTexture } from '../BaseTexture';\nimport type { Renderer } from '../../Renderer';\nimport type { GLTexture } from '../GLTexture';\n\nexport interface IImageResourceOptions\n{\n autoLoad?: boolean;\n createBitmap?: boolean;\n crossorigin?: boolean|string;\n alphaMode?: ALPHA_MODES;\n}\n\n/**\n * Resource type for HTMLImageElement.\n * @class\n * @extends PIXI.resources.BaseImageResource\n * @memberof PIXI.resources\n */\nexport class ImageResource extends BaseImageResource\n{\n url: string;\n private _load: Promise;\n private _process: Promise;\n preserveBitmap: boolean;\n createBitmap: boolean;\n alphaMode: ALPHA_MODES;\n bitmap: ImageBitmap;\n /**\n * @param {HTMLImageElement|string} source - image source or URL\n * @param {object} [options]\n * @param {boolean} [options.autoLoad=true] - start loading process\n * @param {boolean} [options.createBitmap=PIXI.settings.CREATE_IMAGE_BITMAP] - whether its required to create\n * a bitmap before upload\n * @param {boolean} [options.crossorigin=true] - Load image using cross origin\n * @param {PIXI.ALPHA_MODES} [options.alphaMode=PIXI.ALPHA_MODES.UNPACK] - Premultiply image alpha in bitmap\n */\n constructor(source: HTMLImageElement|string, options?: IImageResourceOptions)\n {\n options = options || {};\n\n if (!(source instanceof HTMLImageElement))\n {\n const imageElement = new Image();\n\n BaseImageResource.crossOrigin(imageElement, source, options.crossorigin);\n\n imageElement.src = source;\n source = imageElement;\n }\n\n super(source);\n\n // FireFox 68, and possibly other versions, seems like setting the HTMLImageElement#width and #height\n // to non-zero values before its loading completes if images are in a cache.\n // Because of this, need to set the `_width` and the `_height` to zero to avoid uploading incomplete images.\n // Please refer to the issue #5968 (https://github.com/pixijs/pixi.js/issues/5968).\n if (!source.complete && !!this._width && !!this._height)\n {\n this._width = 0;\n this._height = 0;\n }\n\n /**\n * URL of the image source\n * @member {string}\n */\n this.url = source.src;\n\n /**\n * When process is completed\n * @member {Promise}\n * @private\n */\n this._process = null;\n\n /**\n * If the image should be disposed after upload\n * @member {boolean}\n * @default false\n */\n this.preserveBitmap = false;\n\n /**\n * If capable, convert the image using createImageBitmap API\n * @member {boolean}\n * @default PIXI.settings.CREATE_IMAGE_BITMAP\n */\n this.createBitmap = (options.createBitmap !== undefined\n ? options.createBitmap : settings.CREATE_IMAGE_BITMAP) && !!window.createImageBitmap;\n\n /**\n * Controls texture alphaMode field\n * Copies from options\n * Default is `null`, copies option from baseTexture\n *\n * @member {PIXI.ALPHA_MODES|null}\n * @readonly\n */\n this.alphaMode = typeof options.alphaMode === 'number' ? options.alphaMode : null;\n\n if ((options as any).premultiplyAlpha !== undefined)\n {\n // triggers deprecation\n (this as any).premultiplyAlpha = (options as any).premultiplyAlpha;\n }\n\n /**\n * The ImageBitmap element created for HTMLImageElement\n * @member {ImageBitmap}\n * @default null\n */\n this.bitmap = null;\n\n /**\n * Promise when loading\n * @member {Promise}\n * @private\n * @default null\n */\n this._load = null;\n\n if (options.autoLoad !== false)\n {\n this.load();\n }\n }\n\n /**\n * returns a promise when image will be loaded and processed\n *\n * @param {boolean} [createBitmap] - whether process image into bitmap\n * @returns {Promise}\n */\n load(createBitmap?: boolean): Promise\n {\n if (this._load)\n {\n return this._load;\n }\n\n if (createBitmap !== undefined)\n {\n this.createBitmap = createBitmap;\n }\n\n this._load = new Promise((resolve, reject): void =>\n {\n const source = this.source as HTMLImageElement;\n\n this.url = source.src;\n\n const completed = (): void =>\n {\n if (this.destroyed)\n {\n return;\n }\n source.onload = null;\n source.onerror = null;\n\n this.resize(source.width, source.height);\n this._load = null;\n\n if (this.createBitmap)\n {\n resolve(this.process());\n }\n else\n {\n resolve(this);\n }\n };\n\n if (source.complete && source.src)\n {\n completed();\n }\n else\n {\n source.onload = completed;\n source.onerror = (event): void =>\n {\n // Avoids Promise freezing when resource broken\n reject(event);\n this.onError.emit(event);\n };\n }\n });\n\n return this._load;\n }\n\n /**\n * Called when we need to convert image into BitmapImage.\n * Can be called multiple times, real promise is cached inside.\n *\n * @returns {Promise} cached promise to fill that bitmap\n */\n process(): Promise\n {\n const source = this.source as HTMLImageElement;\n\n if (this._process !== null)\n {\n return this._process;\n }\n if (this.bitmap !== null || !window.createImageBitmap)\n {\n return Promise.resolve(this);\n }\n\n this._process = (window.createImageBitmap as any)(source,\n 0, 0, source.width, source.height,\n {\n premultiplyAlpha: this.alphaMode === ALPHA_MODES.UNPACK ? 'premultiply' : 'none',\n })\n .then((bitmap: ImageBitmap) =>\n {\n if (this.destroyed)\n {\n return Promise.reject();\n }\n this.bitmap = bitmap;\n this.update();\n this._process = null;\n\n return Promise.resolve(this);\n });\n\n return this._process;\n }\n\n /**\n * Upload the image resource to GPU.\n *\n * @param {PIXI.Renderer} renderer - Renderer to upload to\n * @param {PIXI.BaseTexture} baseTexture - BaseTexture for this resource\n * @param {PIXI.GLTexture} glTexture - GLTexture to use\n * @returns {boolean} true is success\n */\n upload(renderer: Renderer, baseTexture: BaseTexture, glTexture: GLTexture): boolean\n {\n if (typeof this.alphaMode === 'number')\n {\n // bitmap stores unpack premultiply flag, we dont have to notify texImage2D about it\n\n baseTexture.alphaMode = this.alphaMode;\n }\n\n if (!this.createBitmap)\n {\n return super.upload(renderer, baseTexture, glTexture);\n }\n if (!this.bitmap)\n {\n // yeah, ignore the output\n this.process();\n if (!this.bitmap)\n {\n return false;\n }\n }\n\n super.upload(renderer, baseTexture, glTexture, this.bitmap);\n\n if (!this.preserveBitmap)\n {\n // checks if there are other renderers that possibly need this bitmap\n\n let flag = true;\n\n const glTextures = baseTexture._glTextures;\n\n for (const key in glTextures)\n {\n const otherTex = glTextures[key];\n\n if (otherTex !== glTexture && otherTex.dirtyId !== baseTexture.dirtyId)\n {\n flag = false;\n break;\n }\n }\n\n if (flag)\n {\n if (this.bitmap.close)\n {\n this.bitmap.close();\n }\n\n this.bitmap = null;\n }\n }\n\n return true;\n }\n\n /**\n * Destroys this texture\n * @override\n */\n dispose(): void\n {\n (this.source as HTMLImageElement).onload = null;\n (this.source as HTMLImageElement).onerror = null;\n\n super.dispose();\n\n if (this.bitmap)\n {\n this.bitmap.close();\n this.bitmap = null;\n }\n this._process = null;\n this._load = null;\n }\n\n /**\n * Used to auto-detect the type of resource.\n *\n * @static\n * @param {string|HTMLImageElement} source - The source object\n * @return {boolean} `true` if source is string or HTMLImageElement\n */\n static test(source: unknown): source is string|HTMLImageElement\n {\n return typeof source === 'string' || source instanceof HTMLImageElement;\n }\n}\n","import { uid } from '@pixi/utils';\nimport { BaseImageResource } from './BaseImageResource';\n\nimport type { ISize } from '@pixi/math';\n\nexport interface ISVGResourceOptions\n{\n source?: string;\n scale?: number;\n width?: number;\n height?: number;\n autoLoad?: boolean;\n crossorigin?: boolean|string;\n}\n/**\n * Resource type for SVG elements and graphics.\n * @class\n * @extends PIXI.resources.BaseImageResource\n * @memberof PIXI.resources\n * @param {string} source - Base64 encoded SVG element or URL for SVG file.\n * @param {object} [options] - Options to use\n * @param {number} [options.scale=1] - Scale to apply to SVG. Overridden by...\n * @param {number} [options.width] - Rasterize SVG this wide. Aspect ratio preserved if height not specified.\n * @param {number} [options.height] - Rasterize SVG this high. Aspect ratio preserved if width not specified.\n * @param {boolean} [options.autoLoad=true] - Start loading right away.\n */\nexport class SVGResource extends BaseImageResource\n{\n public readonly svg: string;\n public readonly scale: number;\n readonly _overrideWidth: number;\n readonly _overrideHeight: number;\n private _resolve: () => void;\n private _load: Promise;\n private _crossorigin?: boolean|string;\n\n constructor(sourceBase64: string, options: ISVGResourceOptions)\n {\n options = options || {};\n\n super(document.createElement('canvas'));\n this._width = 0;\n this._height = 0;\n\n /**\n * Base64 encoded SVG element or URL for SVG file\n * @readonly\n * @member {string}\n */\n this.svg = sourceBase64;\n\n /**\n * The source scale to apply when rasterizing on load\n * @readonly\n * @member {number}\n */\n this.scale = options.scale || 1;\n\n /**\n * A width override for rasterization on load\n * @readonly\n * @member {number}\n */\n this._overrideWidth = options.width;\n\n /**\n * A height override for rasterization on load\n * @readonly\n * @member {number}\n */\n this._overrideHeight = options.height;\n\n /**\n * Call when completely loaded\n * @private\n * @member {function}\n */\n this._resolve = null;\n\n /**\n * Cross origin value to use\n * @private\n * @member {boolean|string}\n */\n this._crossorigin = options.crossorigin;\n\n /**\n * Promise when loading\n * @member {Promise}\n * @private\n * @default null\n */\n this._load = null;\n\n if (options.autoLoad !== false)\n {\n this.load();\n }\n }\n\n load(): Promise\n {\n if (this._load)\n {\n return this._load;\n }\n\n this._load = new Promise((resolve): void =>\n {\n // Save this until after load is finished\n this._resolve = (): void =>\n {\n this.resize(this.source.width, this.source.height);\n resolve(this);\n };\n\n // Convert SVG inline string to data-uri\n if ((/^\\\n {\n if (!this._resolve)\n {\n return;\n }\n\n tempImage.onerror = null;\n this.onError.emit(event);\n };\n\n tempImage.onload = (): void =>\n {\n if (!this._resolve)\n {\n return;\n }\n\n const svgWidth = tempImage.width;\n const svgHeight = tempImage.height;\n\n if (!svgWidth || !svgHeight)\n {\n throw new Error('The SVG image must have width and height defined (in pixels), canvas API needs them.');\n }\n\n // Set render size\n let width = svgWidth * this.scale;\n let height = svgHeight * this.scale;\n\n if (this._overrideWidth || this._overrideHeight)\n {\n width = this._overrideWidth || this._overrideHeight / svgHeight * svgWidth;\n height = this._overrideHeight || this._overrideWidth / svgWidth * svgHeight;\n }\n width = Math.round(width);\n height = Math.round(height);\n\n // Create a canvas element\n const canvas = this.source as HTMLCanvasElement;\n\n canvas.width = width;\n canvas.height = height;\n (canvas as any)._pixiId = `canvas_${uid()}`;\n\n // Draw the Svg to the canvas\n canvas\n .getContext('2d')\n .drawImage(tempImage, 0, 0, svgWidth, svgHeight, 0, 0, width, height);\n\n this._resolve();\n this._resolve = null;\n };\n }\n\n /**\n * Get size from an svg string using regexp.\n *\n * @method\n * @param {string} svgString - a serialized svg element\n * @return {PIXI.ISize} image extension\n */\n static getSize(svgString?: string): ISize\n {\n const sizeMatch = SVGResource.SVG_SIZE.exec(svgString);\n const size: any = {};\n\n if (sizeMatch)\n {\n size[sizeMatch[1]] = Math.round(parseFloat(sizeMatch[3]));\n size[sizeMatch[5]] = Math.round(parseFloat(sizeMatch[7]));\n }\n\n return size;\n }\n\n /**\n * Destroys this texture\n * @override\n */\n dispose(): void\n {\n super.dispose();\n this._resolve = null;\n this._crossorigin = null;\n }\n\n /**\n * Used to auto-detect the type of resource.\n *\n * @static\n * @param {*} source - The source object\n * @param {string} extension - The extension of source, if set\n */\n static test(source: unknown, extension?: string): boolean\n {\n // url file extension is SVG\n return extension === 'svg'\n // source is SVG data-uri\n || (typeof source === 'string' && source.indexOf('data:image/svg+xml;base64') === 0)\n // source is SVG inline\n || (typeof source === 'string' && source.indexOf(']*(?:\\s(width|height)=('|\")(\\d*(?:\\.\\d+)?)(?:px)?('|\"))[^>]*(?:\\s(width|height)=('|\")(\\d*(?:\\.\\d+)?)(?:px)?('|\"))[^>]*>/i; // eslint-disable-line max-len\n}\n","import { BaseImageResource } from './BaseImageResource';\nimport { Ticker } from '@pixi/ticker';\n\nimport type { Dict } from '@pixi/utils';\n\nexport interface IVideoResourceOptions\n{\n autoLoad?: boolean;\n autoPlay?: boolean;\n updateFPS?: number;\n crossorigin?: boolean|string;\n}\n\nexport interface IVideoResourceOptionsElement\n{\n src: string;\n mime: string;\n}\n\n/**\n * Resource type for HTMLVideoElement.\n * @class\n * @extends PIXI.resources.BaseImageResource\n * @memberof PIXI.resources\n * @param {HTMLVideoElement|object|string|Array} source - Video element to use.\n * @param {object} [options] - Options to use\n * @param {boolean} [options.autoLoad=true] - Start loading the video immediately\n * @param {boolean} [options.autoPlay=true] - Start playing video immediately\n * @param {number} [options.updateFPS=0] - How many times a second to update the texture from the video.\n * Leave at 0 to update at every render.\n * @param {boolean} [options.crossorigin=true] - Load image using cross origin\n */\nexport class VideoResource extends BaseImageResource\n{\n protected _autoUpdate: boolean;\n protected _isConnectedToTicker: boolean;\n protected _updateFPS: number;\n protected _msToNextUpdate: number;\n protected autoPlay: boolean;\n private _load: Promise;\n private _resolve: (value?: VideoResource | PromiseLike) => void;\n\n constructor(source?: HTMLVideoElement|Array|string, options?: IVideoResourceOptions)\n {\n options = options || {};\n\n if (!(source instanceof HTMLVideoElement))\n {\n const videoElement = document.createElement('video');\n\n // workaround for https://github.com/pixijs/pixi.js/issues/5996\n videoElement.setAttribute('preload', 'auto');\n videoElement.setAttribute('webkit-playsinline', '');\n videoElement.setAttribute('playsinline', '');\n\n if (typeof source === 'string')\n {\n source = [source];\n }\n\n const firstSrc = (source[0] as IVideoResourceOptionsElement).src || source[0] as string;\n\n BaseImageResource.crossOrigin(videoElement, firstSrc, options.crossorigin);\n\n // array of objects or strings\n for (let i = 0; i < source.length; ++i)\n {\n const sourceElement = document.createElement('source');\n\n let { src, mime } = source[i] as IVideoResourceOptionsElement;\n\n src = src || source[i] as string;\n\n const baseSrc = src.split('?').shift().toLowerCase();\n const ext = baseSrc.substr(baseSrc.lastIndexOf('.') + 1);\n\n mime = mime || VideoResource.MIME_TYPES[ext] || `video/${ext}`;\n\n sourceElement.src = src;\n sourceElement.type = mime;\n\n videoElement.appendChild(sourceElement);\n }\n\n // Override the source\n source = videoElement;\n }\n\n super(source);\n\n this.noSubImage = true;\n\n /**\n * `true` to use PIXI.Ticker.shared to auto update the base texture.\n *\n * @type {boolean}\n * @default true\n * @private\n */\n this._autoUpdate = true;\n\n /**\n * `true` if the instance is currently connected to PIXI.Ticker.shared to auto update the base texture.\n *\n * @type {boolean}\n * @default false\n * @private\n */\n this._isConnectedToTicker = false;\n\n this._updateFPS = options.updateFPS || 0;\n this._msToNextUpdate = 0;\n\n /**\n * When set to true will automatically play videos used by this texture once\n * they are loaded. If false, it will not modify the playing state.\n *\n * @member {boolean}\n * @default true\n */\n this.autoPlay = options.autoPlay !== false;\n\n /**\n * Promise when loading\n * @member {Promise}\n * @private\n * @default null\n */\n this._load = null;\n\n /**\n * Callback when completed with load.\n * @member {function}\n * @private\n */\n this._resolve = null;\n\n // Bind for listeners\n this._onCanPlay = this._onCanPlay.bind(this);\n this._onError = this._onError.bind(this);\n\n if (options.autoLoad !== false)\n {\n this.load();\n }\n }\n\n /**\n * Trigger updating of the texture\n *\n * @param {number} [deltaTime=0] - time delta since last tick\n */\n update(_deltaTime = 0): void\n {\n if (!this.destroyed)\n {\n // account for if video has had its playbackRate changed\n const elapsedMS = Ticker.shared.elapsedMS * (this.source as HTMLVideoElement).playbackRate;\n\n this._msToNextUpdate = Math.floor(this._msToNextUpdate - elapsedMS);\n if (!this._updateFPS || this._msToNextUpdate <= 0)\n {\n super.update(/* deltaTime*/);\n this._msToNextUpdate = this._updateFPS ? Math.floor(1000 / this._updateFPS) : 0;\n }\n }\n }\n\n /**\n * Start preloading the video resource.\n *\n * @protected\n * @return {Promise} Handle the validate event\n */\n load(): Promise\n {\n if (this._load)\n {\n return this._load;\n }\n\n const source = this.source as HTMLVideoElement;\n\n if ((source.readyState === source.HAVE_ENOUGH_DATA || source.readyState === source.HAVE_FUTURE_DATA)\n && source.width && source.height)\n {\n (source as any).complete = true;\n }\n\n source.addEventListener('play', this._onPlayStart.bind(this));\n source.addEventListener('pause', this._onPlayStop.bind(this));\n\n if (!this._isSourceReady())\n {\n source.addEventListener('canplay', this._onCanPlay);\n source.addEventListener('canplaythrough', this._onCanPlay);\n source.addEventListener('error', this._onError, true);\n }\n else\n {\n this._onCanPlay();\n }\n\n this._load = new Promise((resolve): void =>\n {\n if (this.valid)\n {\n resolve(this);\n }\n else\n {\n this._resolve = resolve;\n\n source.load();\n }\n });\n\n return this._load;\n }\n\n /**\n * Handle video error events.\n *\n * @private\n */\n private _onError(event: ErrorEvent): void\n {\n (this.source as HTMLVideoElement).removeEventListener('error', this._onError, true);\n this.onError.emit(event);\n }\n\n /**\n * Returns true if the underlying source is playing.\n *\n * @private\n * @return {boolean} True if playing.\n */\n private _isSourcePlaying(): boolean\n {\n const source = this.source as HTMLVideoElement;\n\n return (source.currentTime > 0 && source.paused === false && source.ended === false && source.readyState > 2);\n }\n\n /**\n * Returns true if the underlying source is ready for playing.\n *\n * @private\n * @return {boolean} True if ready.\n */\n private _isSourceReady(): boolean\n {\n const source = this.source as HTMLVideoElement;\n\n return source.readyState === 3 || source.readyState === 4;\n }\n\n /**\n * Runs the update loop when the video is ready to play\n *\n * @private\n */\n private _onPlayStart(): void\n {\n // Just in case the video has not received its can play even yet..\n if (!this.valid)\n {\n this._onCanPlay();\n }\n\n if (this.autoUpdate && !this._isConnectedToTicker)\n {\n Ticker.shared.add(this.update, this);\n this._isConnectedToTicker = true;\n }\n }\n\n /**\n * Fired when a pause event is triggered, stops the update loop\n *\n * @private\n */\n private _onPlayStop(): void\n {\n if (this._isConnectedToTicker)\n {\n Ticker.shared.remove(this.update, this);\n this._isConnectedToTicker = false;\n }\n }\n\n /**\n * Fired when the video is loaded and ready to play\n *\n * @private\n */\n private _onCanPlay(): void\n {\n const source = this.source as HTMLVideoElement;\n\n source.removeEventListener('canplay', this._onCanPlay);\n source.removeEventListener('canplaythrough', this._onCanPlay);\n\n const valid = this.valid;\n\n this.resize(source.videoWidth, source.videoHeight);\n\n // prevent multiple loaded dispatches..\n if (!valid && this._resolve)\n {\n this._resolve(this);\n this._resolve = null;\n }\n\n if (this._isSourcePlaying())\n {\n this._onPlayStart();\n }\n else if (this.autoPlay)\n {\n source.play();\n }\n }\n\n /**\n * Destroys this texture\n * @override\n */\n dispose(): void\n {\n if (this._isConnectedToTicker)\n {\n Ticker.shared.remove(this.update, this);\n }\n\n const source = this.source as HTMLVideoElement;\n\n if (source)\n {\n source.removeEventListener('error', this._onError, true);\n source.pause();\n source.src = '';\n source.load();\n }\n super.dispose();\n }\n\n /**\n * Should the base texture automatically update itself, set to true by default\n *\n * @member {boolean}\n */\n get autoUpdate(): boolean\n {\n return this._autoUpdate;\n }\n\n set autoUpdate(value: boolean)\n {\n if (value !== this._autoUpdate)\n {\n this._autoUpdate = value;\n\n if (!this._autoUpdate && this._isConnectedToTicker)\n {\n Ticker.shared.remove(this.update, this);\n this._isConnectedToTicker = false;\n }\n else if (this._autoUpdate && !this._isConnectedToTicker && this._isSourcePlaying())\n {\n Ticker.shared.add(this.update, this);\n this._isConnectedToTicker = true;\n }\n }\n }\n\n /**\n * How many times a second to update the texture from the video. Leave at 0 to update at every render.\n * A lower fps can help performance, as updating the texture at 60fps on a 30ps video may not be efficient.\n *\n * @member {number}\n */\n get updateFPS(): number\n {\n return this._updateFPS;\n }\n\n set updateFPS(value: number)\n {\n if (value !== this._updateFPS)\n {\n this._updateFPS = value;\n }\n }\n\n /**\n * Used to auto-detect the type of resource.\n *\n * @static\n * @param {*} source - The source object\n * @param {string} extension - The extension of source, if set\n * @return {boolean} `true` if video source\n */\n static test(source: unknown, extension?: string): source is HTMLVideoElement\n {\n return (source instanceof HTMLVideoElement)\n || VideoResource.TYPES.indexOf(extension) > -1;\n }\n\n /**\n * List of common video file extensions supported by VideoResource.\n * @constant\n * @member {Array}\n * @static\n * @readonly\n */\n static TYPES = ['mp4', 'm4v', 'webm', 'ogg', 'ogv', 'h264', 'avi', 'mov'];\n\n /**\n * Map of video MIME types that can't be directly derived from file extensions.\n * @constant\n * @member {object}\n * @static\n * @readonly\n */\n static MIME_TYPES: Dict = {\n ogv: 'video/ogg',\n mov: 'video/quicktime',\n m4v: 'video/mp4',\n };\n}\n","import { BaseImageResource } from './BaseImageResource';\n\n/**\n * Resource type for ImageBitmap.\n * @class\n * @extends PIXI.resources.BaseImageResource\n * @memberof PIXI.resources\n * @param {ImageBitmap} source - Image element to use\n */\nexport class ImageBitmapResource extends BaseImageResource\n{\n /**\n * Used to auto-detect the type of resource.\n *\n * @static\n * @param {ImageBitmap} source - The source object\n * @return {boolean} `true` if source is an ImageBitmap\n */\n static test(source: unknown): source is ImageBitmap\n {\n return !!window.createImageBitmap && source instanceof ImageBitmap;\n }\n}\n","import { INSTALLED } from './autoDetectResource';\nimport { ArrayResource } from './ArrayResource';\nimport { BufferResource } from './BufferResource';\nimport { CanvasResource } from './CanvasResource';\nimport { CubeResource } from './CubeResource';\nimport { ImageResource } from './ImageResource';\nimport { SVGResource } from './SVGResource';\nimport { VideoResource } from './VideoResource';\nimport { ImageBitmapResource } from './ImageBitmapResource';\n\n/**\n * Collection of base resource types supported by PixiJS.\n *\n * Resources are used by {@link PIXI.BaseTexture} to handle different media types\n * such as images, video, SVG graphics, etc. In most use-cases, you should not\n * instantiate the resources directly. The easy thing is to use\n * {@link PIXI.BaseTexture.from}.\n * @example\n * const baseTexture = PIXI.BaseTexture.from('path/to/image.jpg');\n * @namespace PIXI.resources\n */\nexport * from './Resource';\nexport * from './BaseImageResource';\n\nINSTALLED.push(\n ImageResource,\n ImageBitmapResource,\n CanvasResource,\n VideoResource,\n SVGResource,\n BufferResource,\n CubeResource,\n ArrayResource\n);\n\nexport * from './autoDetectResource';\nexport * from './AbstractMultiResource';\nexport * from './ArrayResource';\nexport * from './BufferResource';\nexport * from './CanvasResource';\nexport * from './CubeResource';\nexport * from './ImageResource';\nexport * from './SVGResource';\nexport * from './VideoResource';\nexport * from './ImageBitmapResource';\n","import type { Renderer } from './Renderer';\n\n/**\n * System is a base class used for extending systems used by the {@link PIXI.Renderer}\n *\n * @see PIXI.Renderer#addSystem\n * @class\n * @memberof PIXI\n */\nexport class System\n{\n // public because of Filter usage,\n // protected because usually renderer it already known by those who use the system\n renderer: Renderer;\n /**\n * @param {PIXI.Renderer} renderer - The renderer this manager works for.\n */\n constructor(renderer: Renderer)\n {\n /**\n * The renderer this manager works for.\n *\n * @member {PIXI.Renderer}\n */\n this.renderer = renderer;\n }\n\n /**\n * Generic destroy methods to be overridden by the subclass\n */\n destroy(): void\n {\n (this as any).renderer = null;\n }\n}\n","import { ALPHA_MODES } from '@pixi/constants';\nimport { BufferResource } from './BufferResource';\n\nimport type { BaseTexture } from '../BaseTexture';\nimport type { Renderer } from '../../Renderer';\nimport type { GLTexture } from '../GLTexture';\n/**\n * Resource type for DepthTexture.\n * @class\n * @extends PIXI.resources.BufferResource\n * @memberof PIXI.resources\n */\nexport class DepthResource extends BufferResource\n{\n /**\n * Upload the texture to the GPU.\n * @param {PIXI.Renderer} renderer - Upload to the renderer\n * @param {PIXI.BaseTexture} baseTexture - Reference to parent texture\n * @param {PIXI.GLTexture} glTexture - glTexture\n * @returns {boolean} true is success\n */\n upload(renderer: Renderer, baseTexture: BaseTexture, glTexture: GLTexture): boolean\n {\n const gl = renderer.gl;\n\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, baseTexture.alphaMode === ALPHA_MODES.UNPACK);\n\n if (glTexture.width === baseTexture.width && glTexture.height === baseTexture.height)\n {\n gl.texSubImage2D(\n baseTexture.target,\n 0,\n 0,\n 0,\n baseTexture.width,\n baseTexture.height,\n baseTexture.format,\n baseTexture.type,\n this.data,\n );\n }\n else\n {\n glTexture.width = baseTexture.width;\n glTexture.height = baseTexture.height;\n\n gl.texImage2D(\n baseTexture.target,\n 0,\n // gl.DEPTH_COMPONENT16 Needed for depth to render properly in webgl2.0\n renderer.context.webGLVersion === 1 ? gl.DEPTH_COMPONENT : gl.DEPTH_COMPONENT16,\n baseTexture.width,\n baseTexture.height,\n 0,\n baseTexture.format,\n baseTexture.type,\n this.data,\n );\n }\n\n return true;\n }\n}\n","import { Runner } from '@pixi/runner';\nimport { BaseTexture } from '../textures/BaseTexture';\nimport { DepthResource } from '../textures/resources/DepthResource';\nimport { FORMATS, MIPMAP_MODES, SCALE_MODES, TYPES, MSAA_QUALITY } from '@pixi/constants';\n\nimport type { GLFramebuffer } from './GLFramebuffer';\n\n/**\n * Frame buffer used by the BaseRenderTexture\n *\n * @class\n * @memberof PIXI\n */\nexport class Framebuffer\n{\n public width: number;\n public height: number;\n public multisample: MSAA_QUALITY;\n stencil: boolean;\n depth: boolean;\n dirtyId: number;\n dirtyFormat: number;\n dirtySize: number;\n depthTexture: BaseTexture;\n colorTextures: Array;\n glFramebuffers: {[key: string]: GLFramebuffer};\n disposeRunner: Runner;\n /**\n * @param {number} width - Width of the frame buffer\n * @param {number} height - Height of the frame buffer\n */\n constructor(width: number, height: number)\n {\n /**\n * Width of framebuffer in pixels\n * @member {number}\n */\n this.width = Math.ceil(width || 100);\n /**\n * Height of framebuffer in pixels\n * @member {number}\n */\n this.height = Math.ceil(height || 100);\n\n this.stencil = false;\n this.depth = false;\n\n this.dirtyId = 0;\n this.dirtyFormat = 0;\n this.dirtySize = 0;\n\n this.depthTexture = null;\n this.colorTextures = [];\n\n this.glFramebuffers = {};\n\n this.disposeRunner = new Runner('disposeFramebuffer');\n\n /**\n * Desired number of samples for antialiasing. 0 means AA should not be used.\n *\n * Experimental WebGL2 feature, allows to use antialiasing in individual renderTextures.\n * Antialiasing is the same as for main buffer with renderer `antialias:true` options.\n * Seriously affects GPU memory consumption and GPU performance.\n *\n *```js\n * renderTexture.framebuffer.multisample = PIXI.MSAA_QUALITY.HIGH;\n * //...\n * renderer.render(renderTexture, myContainer);\n * renderer.framebuffer.blit(); // copies data from MSAA framebuffer to texture\n * ```\n *\n * @member {PIXI.MSAA_QUALITY}\n * @default PIXI.MSAA_QUALITY.NONE\n */\n this.multisample = MSAA_QUALITY.NONE;\n }\n\n /**\n * Reference to the colorTexture.\n *\n * @member {PIXI.BaseTexture[]}\n * @readonly\n */\n get colorTexture(): BaseTexture\n {\n return this.colorTextures[0];\n }\n\n /**\n * Add texture to the colorTexture array\n *\n * @param {number} [index=0] - Index of the array to add the texture to\n * @param {PIXI.BaseTexture} [texture] - Texture to add to the array\n */\n addColorTexture(index = 0, texture?: BaseTexture): this\n {\n // TODO add some validation to the texture - same width / height etc?\n this.colorTextures[index] = texture || new BaseTexture(null, {\n scaleMode: SCALE_MODES.NEAREST,\n resolution: 1,\n mipmap: MIPMAP_MODES.OFF,\n width: this.width,\n height: this.height,\n });\n\n this.dirtyId++;\n this.dirtyFormat++;\n\n return this;\n }\n\n /**\n * Add a depth texture to the frame buffer\n *\n * @param {PIXI.BaseTexture} [texture] - Texture to add\n */\n addDepthTexture(texture?: BaseTexture): this\n {\n /* eslint-disable max-len */\n this.depthTexture = texture || new BaseTexture(new DepthResource(null, { width: this.width, height: this.height }), {\n scaleMode: SCALE_MODES.NEAREST,\n resolution: 1,\n width: this.width,\n height: this.height,\n mipmap: MIPMAP_MODES.OFF,\n format: FORMATS.DEPTH_COMPONENT,\n type: TYPES.UNSIGNED_SHORT,\n });\n\n this.dirtyId++;\n this.dirtyFormat++;\n\n return this;\n }\n\n /**\n * Enable depth on the frame buffer\n */\n enableDepth(): this\n {\n this.depth = true;\n\n this.dirtyId++;\n this.dirtyFormat++;\n\n return this;\n }\n\n /**\n * Enable stencil on the frame buffer\n */\n enableStencil(): this\n {\n this.stencil = true;\n\n this.dirtyId++;\n this.dirtyFormat++;\n\n return this;\n }\n\n /**\n * Resize the frame buffer\n *\n * @param {number} width - Width of the frame buffer to resize to\n * @param {number} height - Height of the frame buffer to resize to\n */\n resize(width: number, height: number): void\n {\n width = Math.ceil(width);\n height = Math.ceil(height);\n\n if (width === this.width && height === this.height) return;\n\n this.width = width;\n this.height = height;\n\n this.dirtyId++;\n this.dirtySize++;\n\n for (let i = 0; i < this.colorTextures.length; i++)\n {\n const texture = this.colorTextures[i];\n const resolution = texture.resolution;\n\n // take into acount the fact the texture may have a different resolution..\n texture.setSize(width / resolution, height / resolution);\n }\n\n if (this.depthTexture)\n {\n const resolution = this.depthTexture.resolution;\n\n this.depthTexture.setSize(width / resolution, height / resolution);\n }\n }\n\n /**\n * Disposes WebGL resources that are connected to this geometry\n */\n dispose(): void\n {\n this.disposeRunner.emit(this, false);\n }\n\n /**\n * Destroys and removes the depth texture added to this framebuffer.\n */\n destroyDepthTexture(): void\n {\n if (this.depthTexture)\n {\n this.depthTexture.destroy();\n this.depthTexture = null;\n\n ++this.dirtyId;\n ++this.dirtyFormat;\n }\n }\n}\n","import { BaseTexture } from '../textures/BaseTexture';\nimport { Framebuffer } from '../framebuffer/Framebuffer';\n\nimport type { IBaseTextureOptions } from '../textures/BaseTexture';\nimport type { MaskData } from '../mask/MaskData';\n\nexport interface BaseRenderTexture extends GlobalMixins.BaseRenderTexture, BaseTexture {}\n\n/**\n * A BaseRenderTexture is a special texture that allows any PixiJS display object to be rendered to it.\n *\n * __Hint__: All DisplayObjects (i.e. Sprites) that render to a BaseRenderTexture should be preloaded\n * otherwise black rectangles will be drawn instead.\n *\n * A BaseRenderTexture takes a snapshot of any Display Object given to its render method. The position\n * and rotation of the given Display Objects is ignored. For example:\n *\n * ```js\n * let renderer = PIXI.autoDetectRenderer();\n * let baseRenderTexture = new PIXI.BaseRenderTexture({ width: 800, height: 600 });\n * let renderTexture = new PIXI.RenderTexture(baseRenderTexture);\n * let sprite = PIXI.Sprite.from(\"spinObj_01.png\");\n *\n * sprite.position.x = 800/2;\n * sprite.position.y = 600/2;\n * sprite.anchor.x = 0.5;\n * sprite.anchor.y = 0.5;\n *\n * renderer.render(sprite, renderTexture);\n * ```\n *\n * The Sprite in this case will be rendered using its local transform. To render this sprite at 0,0\n * you can clear the transform\n *\n * ```js\n *\n * sprite.setTransform()\n *\n * let baseRenderTexture = new PIXI.BaseRenderTexture({ width: 100, height: 100 });\n * let renderTexture = new PIXI.RenderTexture(baseRenderTexture);\n *\n * renderer.render(sprite, renderTexture); // Renders to center of RenderTexture\n * ```\n *\n * @class\n * @extends PIXI.BaseTexture\n * @memberof PIXI\n */\nexport class BaseRenderTexture extends BaseTexture\n{\n public clearColor: number[];\n public framebuffer: Framebuffer;\n maskStack: Array;\n filterStack: Array;\n /**\n * @param {object} [options]\n * @param {number} [options.width=100] - The width of the base render texture.\n * @param {number} [options.height=100] - The height of the base render texture.\n * @param {PIXI.SCALE_MODES} [options.scaleMode] - See {@link PIXI.SCALE_MODES} for possible values.\n * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the texture being generated.\n */\n constructor(options: IBaseTextureOptions)\n {\n if (typeof options === 'number')\n {\n /* eslint-disable prefer-rest-params */\n // Backward compatibility of signature\n const width = arguments[0];\n const height = arguments[1];\n const scaleMode = arguments[2];\n const resolution = arguments[3];\n\n options = { width, height, scaleMode, resolution };\n /* eslint-enable prefer-rest-params */\n }\n\n super(null, options);\n\n const { width, height } = options || {};\n\n // Set defaults\n this.mipmap = 0;\n this.width = Math.ceil(width) || 100;\n this.height = Math.ceil(height) || 100;\n this.valid = true;\n\n this.clearColor = [0, 0, 0, 0];\n\n this.framebuffer = new Framebuffer(this.width * this.resolution, this.height * this.resolution)\n .addColorTexture(0, this);\n\n // TODO - could this be added the systems?\n\n /**\n * The data structure for the stencil masks.\n *\n * @member {PIXI.MaskData[]}\n */\n this.maskStack = [];\n\n /**\n * The data structure for the filters.\n *\n * @member {Object[]}\n */\n this.filterStack = [{}];\n }\n\n /**\n * Resizes the BaseRenderTexture.\n *\n * @param {number} width - The width to resize to.\n * @param {number} height - The height to resize to.\n */\n resize(width: number, height: number): void\n {\n width = Math.ceil(width);\n height = Math.ceil(height);\n this.framebuffer.resize(width * this.resolution, height * this.resolution);\n }\n\n /**\n * Frees the texture and framebuffer from WebGL memory without destroying this texture object.\n * This means you can still use the texture later which will upload it to GPU\n * memory again.\n *\n * @fires PIXI.BaseTexture#dispose\n */\n dispose(): void\n {\n this.framebuffer.dispose();\n\n super.dispose();\n }\n\n /**\n * Destroys this texture.\n */\n destroy(): void\n {\n super.destroy();\n\n this.framebuffer.destroyDepthTexture();\n this.framebuffer = null;\n }\n}\n","import { groupD8 } from '@pixi/math';\n\nimport type { Rectangle, ISize } from '@pixi/math';\n\n/**\n * Stores a texture's frame in UV coordinates, in\n * which everything lies in the rectangle `[(0,0), (1,0),\n * (1,1), (0,1)]`.\n *\n * | Corner | Coordinates |\n * |--------------|-------------|\n * | Top-Left | `(x0,y0)` |\n * | Top-Right | `(x1,y1)` |\n * | Bottom-Right | `(x2,y2)` |\n * | Bottom-Left | `(x3,y3)` |\n *\n * @class\n * @protected\n * @memberof PIXI\n */\nexport class TextureUvs\n{\n public x0: number;\n public y0: number;\n public x1: number;\n public y1: number;\n public x2: number;\n public y2: number;\n public x3: number;\n public y3: number;\n public uvsFloat32: Float32Array;\n\n constructor()\n {\n /**\n * X-component of top-left corner `(x0,y0)`.\n *\n * @member {number}\n */\n this.x0 = 0;\n\n /**\n * Y-component of top-left corner `(x0,y0)`.\n *\n * @member {number}\n */\n this.y0 = 0;\n\n /**\n * X-component of top-right corner `(x1,y1)`.\n *\n * @member {number}\n */\n this.x1 = 1;\n\n /**\n * Y-component of top-right corner `(x1,y1)`.\n *\n * @member {number}\n */\n this.y1 = 0;\n\n /**\n * X-component of bottom-right corner `(x2,y2)`.\n *\n * @member {number}\n */\n this.x2 = 1;\n\n /**\n * Y-component of bottom-right corner `(x2,y2)`.\n *\n * @member {number}\n */\n this.y2 = 1;\n\n /**\n * X-component of bottom-left corner `(x3,y3)`.\n *\n * @member {number}\n */\n this.x3 = 0;\n\n /**\n * Y-component of bottom-right corner `(x3,y3)`.\n *\n * @member {number}\n */\n this.y3 = 1;\n\n this.uvsFloat32 = new Float32Array(8);\n }\n\n /**\n * Sets the texture Uvs based on the given frame information.\n *\n * @protected\n * @param {PIXI.Rectangle} frame - The frame of the texture\n * @param {PIXI.Rectangle} baseFrame - The base frame of the texture\n * @param {number} rotate - Rotation of frame, see {@link PIXI.groupD8}\n */\n set(frame: Rectangle, baseFrame: ISize, rotate: number): void\n {\n const tw = baseFrame.width;\n const th = baseFrame.height;\n\n if (rotate)\n {\n // width and height div 2 div baseFrame size\n const w2 = frame.width / 2 / tw;\n const h2 = frame.height / 2 / th;\n\n // coordinates of center\n const cX = (frame.x / tw) + w2;\n const cY = (frame.y / th) + h2;\n\n rotate = groupD8.add(rotate, groupD8.NW); // NW is top-left corner\n this.x0 = cX + (w2 * groupD8.uX(rotate));\n this.y0 = cY + (h2 * groupD8.uY(rotate));\n\n rotate = groupD8.add(rotate, 2); // rotate 90 degrees clockwise\n this.x1 = cX + (w2 * groupD8.uX(rotate));\n this.y1 = cY + (h2 * groupD8.uY(rotate));\n\n rotate = groupD8.add(rotate, 2);\n this.x2 = cX + (w2 * groupD8.uX(rotate));\n this.y2 = cY + (h2 * groupD8.uY(rotate));\n\n rotate = groupD8.add(rotate, 2);\n this.x3 = cX + (w2 * groupD8.uX(rotate));\n this.y3 = cY + (h2 * groupD8.uY(rotate));\n }\n else\n {\n this.x0 = frame.x / tw;\n this.y0 = frame.y / th;\n\n this.x1 = (frame.x + frame.width) / tw;\n this.y1 = frame.y / th;\n\n this.x2 = (frame.x + frame.width) / tw;\n this.y2 = (frame.y + frame.height) / th;\n\n this.x3 = frame.x / tw;\n this.y3 = (frame.y + frame.height) / th;\n }\n\n this.uvsFloat32[0] = this.x0;\n this.uvsFloat32[1] = this.y0;\n this.uvsFloat32[2] = this.x1;\n this.uvsFloat32[3] = this.y1;\n this.uvsFloat32[4] = this.x2;\n this.uvsFloat32[5] = this.y2;\n this.uvsFloat32[6] = this.x3;\n this.uvsFloat32[7] = this.y3;\n }\n}\n","import { BaseTexture } from './BaseTexture';\nimport { ImageResource } from './resources/ImageResource';\nimport { CanvasResource } from './resources/CanvasResource';\nimport { TextureUvs } from './TextureUvs';\nimport { settings } from '@pixi/settings';\nimport { Rectangle, Point } from '@pixi/math';\nimport { uid, TextureCache, getResolutionOfUrl, EventEmitter } from '@pixi/utils';\n\nimport type { IPointData } from '@pixi/math';\nimport type { IBaseTextureOptions, ImageSource } from './BaseTexture';\nimport type { TextureMatrix } from './TextureMatrix';\n\nconst DEFAULT_UVS = new TextureUvs();\n\nexport type TextureSource = string|BaseTexture|ImageSource;\n\nexport interface Texture extends GlobalMixins.Texture, EventEmitter {}\n\n/**\n * A texture stores the information that represents an image or part of an image.\n *\n * It cannot be added to the display list directly; instead use it as the texture for a Sprite.\n * If no frame is provided for a texture, then the whole image is used.\n *\n * You can directly create a texture from an image and then reuse it multiple times like this :\n *\n * ```js\n * let texture = PIXI.Texture.from('assets/image.png');\n * let sprite1 = new PIXI.Sprite(texture);\n * let sprite2 = new PIXI.Sprite(texture);\n * ```\n *\n * If you didnt pass the texture frame to constructor, it enables `noFrame` mode:\n * it subscribes on baseTexture events, it automatically resizes at the same time as baseTexture.\n *\n * Textures made from SVGs, loaded or not, cannot be used before the file finishes processing.\n * You can check for this by checking the sprite's _textureID property.\n * ```js\n * var texture = PIXI.Texture.from('assets/image.svg');\n * var sprite1 = new PIXI.Sprite(texture);\n * //sprite1._textureID should not be undefined if the texture has finished processing the SVG file\n * ```\n * You can use a ticker or rAF to ensure your sprites load the finished textures after processing. See issue #3068.\n *\n * @class\n * @extends PIXI.utils.EventEmitter\n * @memberof PIXI\n */\nexport class Texture extends EventEmitter\n{\n public baseTexture: BaseTexture;\n public orig: Rectangle;\n public trim: Rectangle;\n public valid: boolean;\n public noFrame: boolean;\n public defaultAnchor: Point;\n public uvMatrix: TextureMatrix;\n protected _rotate: number;\n _updateID: number;\n _frame: Rectangle;\n _uvs: TextureUvs;\n textureCacheIds: Array;\n\n /**\n * @param {PIXI.BaseTexture} baseTexture - The base texture source to create the texture from\n * @param {PIXI.Rectangle} [frame] - The rectangle frame of the texture to show\n * @param {PIXI.Rectangle} [orig] - The area of original texture\n * @param {PIXI.Rectangle} [trim] - Trimmed rectangle of original texture\n * @param {number} [rotate] - indicates how the texture was rotated by texture packer. See {@link PIXI.groupD8}\n * @param {PIXI.IPointData} [anchor] - Default anchor point used for sprite placement / rotation\n */\n constructor(baseTexture: BaseTexture, frame?: Rectangle,\n orig?: Rectangle, trim?: Rectangle, rotate?: number, anchor?: IPointData)\n {\n super();\n\n /**\n * Does this Texture have any frame data assigned to it?\n *\n * This mode is enabled automatically if no frame was passed inside constructor.\n *\n * In this mode texture is subscribed to baseTexture events, and fires `update` on any change.\n *\n * Beware, after loading or resize of baseTexture event can fired two times!\n * If you want more control, subscribe on baseTexture itself.\n *\n * ```js\n * texture.on('update', () => {});\n * ```\n *\n * Any assignment of `frame` switches off `noFrame` mode.\n *\n * @member {boolean}\n */\n this.noFrame = false;\n\n if (!frame)\n {\n this.noFrame = true;\n frame = new Rectangle(0, 0, 1, 1);\n }\n\n if (baseTexture instanceof Texture)\n {\n baseTexture = baseTexture.baseTexture;\n }\n\n /**\n * The base texture that this texture uses.\n *\n * @member {PIXI.BaseTexture}\n */\n this.baseTexture = baseTexture;\n\n /**\n * This is the area of the BaseTexture image to actually copy to the Canvas / WebGL when rendering,\n * irrespective of the actual frame size or placement (which can be influenced by trimmed texture atlases)\n *\n * @member {PIXI.Rectangle}\n */\n this._frame = frame;\n\n /**\n * This is the trimmed area of original texture, before it was put in atlas\n * Please call `updateUvs()` after you change coordinates of `trim` manually.\n *\n * @member {PIXI.Rectangle}\n */\n this.trim = trim;\n\n /**\n * This will let the renderer know if the texture is valid. If it's not then it cannot be rendered.\n *\n * @member {boolean}\n */\n this.valid = false;\n\n /**\n * The WebGL UV data cache. Can be used as quad UV\n *\n * @member {PIXI.TextureUvs}\n * @protected\n */\n this._uvs = DEFAULT_UVS;\n\n /**\n * Default TextureMatrix instance for this texture\n * By default that object is not created because its heavy\n *\n * @member {PIXI.TextureMatrix}\n */\n this.uvMatrix = null;\n\n /**\n * This is the area of original texture, before it was put in atlas\n *\n * @member {PIXI.Rectangle}\n */\n this.orig = orig || frame;// new Rectangle(0, 0, 1, 1);\n\n this._rotate = Number(rotate || 0);\n\n if (rotate as any === true)\n {\n // this is old texturepacker legacy, some games/libraries are passing \"true\" for rotated textures\n this._rotate = 2;\n }\n else if (this._rotate % 2 !== 0)\n {\n throw new Error('attempt to use diamond-shaped UVs. If you are sure, set rotation manually');\n }\n\n /**\n * Anchor point that is used as default if sprite is created with this texture.\n * Changing the `defaultAnchor` at a later point of time will not update Sprite's anchor point.\n * @member {PIXI.Point}\n * @default {0,0}\n */\n this.defaultAnchor = anchor ? new Point(anchor.x, anchor.y) : new Point(0, 0);\n\n /**\n * Update ID is observed by sprites and TextureMatrix instances.\n * Call updateUvs() to increment it.\n *\n * @member {number}\n * @protected\n */\n\n this._updateID = 0;\n\n /**\n * The ids under which this Texture has been added to the texture cache. This is\n * automatically set as long as Texture.addToCache is used, but may not be set if a\n * Texture is added directly to the TextureCache array.\n *\n * @member {string[]}\n */\n this.textureCacheIds = [];\n\n if (!baseTexture.valid)\n {\n baseTexture.once('loaded', this.onBaseTextureUpdated, this);\n }\n else if (this.noFrame)\n {\n // if there is no frame we should monitor for any base texture changes..\n if (baseTexture.valid)\n {\n this.onBaseTextureUpdated(baseTexture);\n }\n }\n else\n {\n this.frame = frame;\n }\n\n if (this.noFrame)\n {\n baseTexture.on('update', this.onBaseTextureUpdated, this);\n }\n }\n\n /**\n * Updates this texture on the gpu.\n *\n * Calls the TextureResource update.\n *\n * If you adjusted `frame` manually, please call `updateUvs()` instead.\n *\n */\n update(): void\n {\n if (this.baseTexture.resource)\n {\n this.baseTexture.resource.update();\n }\n }\n\n /**\n * Called when the base texture is updated\n *\n * @protected\n * @param {PIXI.BaseTexture} baseTexture - The base texture.\n */\n onBaseTextureUpdated(baseTexture: BaseTexture): void\n {\n if (this.noFrame)\n {\n if (!this.baseTexture.valid)\n {\n return;\n }\n\n this._frame.width = baseTexture.width;\n this._frame.height = baseTexture.height;\n this.valid = true;\n this.updateUvs();\n }\n else\n {\n // TODO this code looks confusing.. boo to abusing getters and setters!\n // if user gave us frame that has bigger size than resized texture it can be a problem\n this.frame = this._frame;\n }\n\n this.emit('update', this);\n }\n\n /**\n * Destroys this texture\n *\n * @param {boolean} [destroyBase=false] - Whether to destroy the base texture as well\n */\n destroy(destroyBase?: boolean): void\n {\n if (this.baseTexture)\n {\n if (destroyBase)\n {\n const resource = this.baseTexture as any;\n\n // delete the texture if it exists in the texture cache..\n // this only needs to be removed if the base texture is actually destroyed too..\n if (resource && resource.url && TextureCache[resource.url])\n {\n Texture.removeFromCache(resource.url);\n }\n\n this.baseTexture.destroy();\n }\n\n this.baseTexture.off('loaded', this.onBaseTextureUpdated, this);\n this.baseTexture.off('update', this.onBaseTextureUpdated, this);\n\n this.baseTexture = null;\n }\n\n this._frame = null;\n this._uvs = null;\n this.trim = null;\n this.orig = null;\n\n this.valid = false;\n\n Texture.removeFromCache(this);\n this.textureCacheIds = null;\n }\n\n /**\n * Creates a new texture object that acts the same as this one.\n *\n * @return {PIXI.Texture} The new texture\n */\n clone(): Texture\n {\n return new Texture(this.baseTexture,\n this.frame.clone(),\n this.orig.clone(),\n this.trim && this.trim.clone(),\n this.rotate,\n this.defaultAnchor\n );\n }\n\n /**\n * Updates the internal WebGL UV cache. Use it after you change `frame` or `trim` of the texture.\n * Call it after changing the frame\n */\n updateUvs(): void\n {\n if (this._uvs === DEFAULT_UVS)\n {\n this._uvs = new TextureUvs();\n }\n\n this._uvs.set(this._frame, this.baseTexture, this.rotate);\n\n this._updateID++;\n }\n\n /**\n * Helper function that creates a new Texture based on the source you provide.\n * The source can be - frame id, image url, video url, canvas element, video element, base texture\n *\n * @static\n * @param {string|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|PIXI.BaseTexture} source\n * Source to create texture from\n * @param {object} [options] See {@link PIXI.BaseTexture}'s constructor for options.\n * @param {boolean} [strict] - Enforce strict-mode, see {@link PIXI.settings.STRICT_TEXTURE_CACHE}.\n * @return {PIXI.Texture} The newly created texture\n */\n static from(source: TextureSource, options: IBaseTextureOptions = {},\n strict = settings.STRICT_TEXTURE_CACHE): Texture\n {\n const isFrame = typeof source === 'string';\n let cacheId = null;\n\n if (isFrame)\n {\n cacheId = source;\n }\n else\n {\n if (!(source as any)._pixiId)\n {\n (source as any)._pixiId = `pixiid_${uid()}`;\n }\n\n cacheId = (source as any)._pixiId;\n }\n\n let texture = TextureCache[cacheId];\n\n // Strict-mode rejects invalid cacheIds\n if (isFrame && strict && !texture)\n {\n throw new Error(`The cacheId \"${cacheId}\" does not exist in TextureCache.`);\n }\n\n if (!texture)\n {\n if (!options.resolution)\n {\n options.resolution = getResolutionOfUrl(source as string);\n }\n\n texture = new Texture(new BaseTexture(source, options));\n texture.baseTexture.cacheId = cacheId;\n\n BaseTexture.addToCache(texture.baseTexture, cacheId);\n Texture.addToCache(texture, cacheId);\n }\n\n // lets assume its a base texture!\n return texture;\n }\n\n /**\n * Useful for loading textures via URLs. Use instead of `Texture.from` because\n * it does a better job of handling failed URLs more effectively. This also ignores\n * `PIXI.settings.STRICT_TEXTURE_CACHE`. Works for Videos, SVGs, Images.\n * @param {string} url The remote URL to load.\n * @param {object} [options] Optional options to include\n * @return {Promise} A Promise that resolves to a Texture.\n */\n static fromURL(url: string, options?: IBaseTextureOptions): Promise\n {\n const resourceOptions = Object.assign({ autoLoad: false }, options?.resourceOptions);\n const texture = Texture.from(url, Object.assign({ resourceOptions }, options), false);\n const resource = texture.baseTexture.resource as ImageResource;\n\n // The texture was already loaded\n if (texture.baseTexture.valid)\n {\n return Promise.resolve(texture);\n }\n\n // Manually load the texture, this should allow users to handle load errors\n return resource.load().then(() => Promise.resolve(texture));\n }\n\n /**\n * Create a new Texture with a BufferResource from a Float32Array.\n * RGBA values are floats from 0 to 1.\n * @static\n * @param {Float32Array|Uint8Array} buffer - The optional array to use, if no data\n * is provided, a new Float32Array is created.\n * @param {number} width - Width of the resource\n * @param {number} height - Height of the resource\n * @param {object} [options] See {@link PIXI.BaseTexture}'s constructor for options.\n * @return {PIXI.Texture} The resulting new BaseTexture\n */\n static fromBuffer(buffer: Float32Array|Uint8Array,\n width: number, height: number, options: IBaseTextureOptions): Texture\n {\n return new Texture(BaseTexture.fromBuffer(buffer, width, height, options));\n }\n\n /**\n * Create a texture from a source and add to the cache.\n *\n * @static\n * @param {HTMLImageElement|HTMLCanvasElement} source - The input source.\n * @param {String} imageUrl - File name of texture, for cache and resolving resolution.\n * @param {String} [name] - Human readable name for the texture cache. If no name is\n * specified, only `imageUrl` will be used as the cache ID.\n * @return {PIXI.Texture} Output texture\n */\n static fromLoader(source: HTMLImageElement|HTMLCanvasElement, imageUrl: string, name: string): Texture\n {\n const resource = new ImageResource(source as any);\n\n resource.url = imageUrl;\n\n const baseTexture = new BaseTexture(resource, {\n scaleMode: settings.SCALE_MODE,\n resolution: getResolutionOfUrl(imageUrl),\n });\n\n const texture = new Texture(baseTexture);\n\n // No name, use imageUrl instead\n if (!name)\n {\n name = imageUrl;\n }\n\n // lets also add the frame to pixi's global cache for 'fromLoader' function\n BaseTexture.addToCache(texture.baseTexture, name);\n Texture.addToCache(texture, name);\n\n // also add references by url if they are different.\n if (name !== imageUrl)\n {\n BaseTexture.addToCache(texture.baseTexture, imageUrl);\n Texture.addToCache(texture, imageUrl);\n }\n\n return texture;\n }\n\n /**\n * Adds a Texture to the global TextureCache. This cache is shared across the whole PIXI object.\n *\n * @static\n * @param {PIXI.Texture} texture - The Texture to add to the cache.\n * @param {string} id - The id that the Texture will be stored against.\n */\n static addToCache(texture: Texture, id: string): void\n {\n if (id)\n {\n if (texture.textureCacheIds.indexOf(id) === -1)\n {\n texture.textureCacheIds.push(id);\n }\n\n if (TextureCache[id])\n {\n // eslint-disable-next-line no-console\n console.warn(`Texture added to the cache with an id [${id}] that already had an entry`);\n }\n\n TextureCache[id] = texture;\n }\n }\n\n /**\n * Remove a Texture from the global TextureCache.\n *\n * @static\n * @param {string|PIXI.Texture} texture - id of a Texture to be removed, or a Texture instance itself\n * @return {PIXI.Texture|null} The Texture that was removed\n */\n static removeFromCache(texture: string|Texture): Texture|null\n {\n if (typeof texture === 'string')\n {\n const textureFromCache = TextureCache[texture];\n\n if (textureFromCache)\n {\n const index = textureFromCache.textureCacheIds.indexOf(texture);\n\n if (index > -1)\n {\n textureFromCache.textureCacheIds.splice(index, 1);\n }\n\n delete TextureCache[texture];\n\n return textureFromCache;\n }\n }\n else if (texture && texture.textureCacheIds)\n {\n for (let i = 0; i < texture.textureCacheIds.length; ++i)\n {\n // Check that texture matches the one being passed in before deleting it from the cache.\n if (TextureCache[texture.textureCacheIds[i]] === texture)\n {\n delete TextureCache[texture.textureCacheIds[i]];\n }\n }\n\n texture.textureCacheIds.length = 0;\n\n return texture;\n }\n\n return null;\n }\n\n /**\n * Returns resolution of baseTexture\n *\n * @member {number}\n * @readonly\n */\n get resolution(): number\n {\n return this.baseTexture.resolution;\n }\n\n /**\n * The frame specifies the region of the base texture that this texture uses.\n * Please call `updateUvs()` after you change coordinates of `frame` manually.\n *\n * @member {PIXI.Rectangle}\n */\n get frame(): Rectangle\n {\n return this._frame;\n }\n\n set frame(frame: Rectangle)\n {\n this._frame = frame;\n\n this.noFrame = false;\n\n const { x, y, width, height } = frame;\n const xNotFit = x + width > this.baseTexture.width;\n const yNotFit = y + height > this.baseTexture.height;\n\n if (xNotFit || yNotFit)\n {\n const relationship = xNotFit && yNotFit ? 'and' : 'or';\n const errorX = `X: ${x} + ${width} = ${x + width} > ${this.baseTexture.width}`;\n const errorY = `Y: ${y} + ${height} = ${y + height} > ${this.baseTexture.height}`;\n\n throw new Error('Texture Error: frame does not fit inside the base Texture dimensions: '\n + `${errorX} ${relationship} ${errorY}`);\n }\n\n this.valid = width && height && this.baseTexture.valid;\n\n if (!this.trim && !this.rotate)\n {\n this.orig = frame;\n }\n\n if (this.valid)\n {\n this.updateUvs();\n }\n }\n\n /**\n * Indicates whether the texture is rotated inside the atlas\n * set to 2 to compensate for texture packer rotation\n * set to 6 to compensate for spine packer rotation\n * can be used to rotate or mirror sprites\n * See {@link PIXI.groupD8} for explanation\n *\n * @member {number}\n */\n get rotate(): number\n {\n return this._rotate;\n }\n\n set rotate(rotate: number)\n {\n this._rotate = rotate;\n if (this.valid)\n {\n this.updateUvs();\n }\n }\n\n /**\n * The width of the Texture in pixels.\n *\n * @member {number}\n */\n get width(): number\n {\n return this.orig.width;\n }\n\n /**\n * The height of the Texture in pixels.\n *\n * @member {number}\n */\n get height(): number\n {\n return this.orig.height;\n }\n\n /**\n * Utility function for BaseTexture|Texture cast\n */\n castToBaseTexture(): BaseTexture\n {\n return this.baseTexture;\n }\n\n static readonly EMPTY: Texture;\n static readonly WHITE: Texture;\n}\n\nfunction createWhiteTexture(): Texture\n{\n const canvas = document.createElement('canvas');\n\n canvas.width = 16;\n canvas.height = 16;\n\n const context = canvas.getContext('2d');\n\n context.fillStyle = 'white';\n context.fillRect(0, 0, 16, 16);\n\n return new Texture(new BaseTexture(new CanvasResource(canvas)));\n}\n\nfunction removeAllHandlers(tex: any): void\n{\n tex.destroy = function _emptyDestroy(): void { /* empty */ };\n tex.on = function _emptyOn(): void { /* empty */ };\n tex.once = function _emptyOnce(): void { /* empty */ };\n tex.emit = function _emptyEmit(): void { /* empty */ };\n}\n\n/**\n * An empty texture, used often to not have to create multiple empty textures.\n * Can not be destroyed.\n *\n * @static\n * @constant\n * @member {PIXI.Texture}\n */\n(Texture as any).EMPTY = new Texture(new BaseTexture());\nremoveAllHandlers(Texture.EMPTY);\nremoveAllHandlers(Texture.EMPTY.baseTexture);\n\n/**\n * A white texture of 16x16 size, used for graphics and other things\n * Can not be destroyed.\n *\n * @static\n * @constant\n * @member {PIXI.Texture}\n */\n(Texture as any).WHITE = createWhiteTexture();\nremoveAllHandlers(Texture.WHITE);\nremoveAllHandlers(Texture.WHITE.baseTexture);\n","import { BaseRenderTexture } from './BaseRenderTexture';\nimport { Texture } from '../textures/Texture';\n\nimport type { Rectangle } from '@pixi/math';\nimport type { Framebuffer } from '../framebuffer/Framebuffer';\nimport type { IBaseTextureOptions } from '../textures/BaseTexture';\n/**\n * A RenderTexture is a special texture that allows any PixiJS display object to be rendered to it.\n *\n * __Hint__: All DisplayObjects (i.e. Sprites) that render to a RenderTexture should be preloaded\n * otherwise black rectangles will be drawn instead.\n *\n * __Hint-2__: The actual memory allocation will happen on first render.\n * You shouldn't create renderTextures each frame just to delete them after, try to reuse them.\n *\n * A RenderTexture takes a snapshot of any Display Object given to its render method. For example:\n *\n * ```js\n * let renderer = PIXI.autoDetectRenderer();\n * let renderTexture = PIXI.RenderTexture.create({ width: 800, height: 600 });\n * let sprite = PIXI.Sprite.from(\"spinObj_01.png\");\n *\n * sprite.position.x = 800/2;\n * sprite.position.y = 600/2;\n * sprite.anchor.x = 0.5;\n * sprite.anchor.y = 0.5;\n *\n * renderer.render(sprite, renderTexture);\n * ```\n *\n * The Sprite in this case will be rendered using its local transform. To render this sprite at 0,0\n * you can clear the transform\n *\n * ```js\n *\n * sprite.setTransform()\n *\n * let renderTexture = new PIXI.RenderTexture.create(100, 100);\n *\n * renderer.render(sprite, renderTexture); // Renders to center of RenderTexture\n * ```\n *\n * @class\n * @extends PIXI.Texture\n * @memberof PIXI\n */\nexport class RenderTexture extends Texture\n{\n public filterFrame: Rectangle|null;\n public filterPoolKey: string|number|null;\n legacyRenderer: any;\n /**\n * @param {PIXI.BaseRenderTexture} baseRenderTexture - The base texture object that this texture uses\n * @param {PIXI.Rectangle} [frame] - The rectangle frame of the texture to show\n */\n constructor(baseRenderTexture: BaseRenderTexture, frame?: Rectangle)\n {\n // support for legacy..\n let _legacyRenderer = null;\n\n if (!(baseRenderTexture instanceof BaseRenderTexture))\n {\n /* eslint-disable prefer-rest-params, no-console */\n const width = arguments[1];\n const height = arguments[2];\n const scaleMode = arguments[3];\n const resolution = arguments[4];\n\n // we have an old render texture..\n console.warn(`Please use RenderTexture.create(${width}, ${height}) instead of the ctor directly.`);\n _legacyRenderer = arguments[0];\n /* eslint-enable prefer-rest-params, no-console */\n\n frame = null;\n baseRenderTexture = new BaseRenderTexture({\n width,\n height,\n scaleMode,\n resolution,\n });\n }\n\n /**\n * The base texture object that this texture uses\n *\n * @member {PIXI.BaseTexture}\n */\n super(baseRenderTexture, frame);\n\n this.legacyRenderer = _legacyRenderer;\n\n /**\n * This will let the renderer know if the texture is valid. If it's not then it cannot be rendered.\n *\n * @member {boolean}\n */\n this.valid = true;\n\n /**\n * Stores `sourceFrame` when this texture is inside current filter stack.\n * You can read it inside filters.\n *\n * @readonly\n * @member {PIXI.Rectangle}\n */\n this.filterFrame = null;\n\n /**\n * The key for pooled texture of FilterSystem\n * @protected\n * @member {string}\n */\n this.filterPoolKey = null;\n\n this.updateUvs();\n }\n\n /**\n * Shortcut to `this.baseTexture.framebuffer`, saves baseTexture cast.\n * @member {PIXI.Framebuffer}\n * @readonly\n */\n get framebuffer(): Framebuffer\n {\n return (this.baseTexture as BaseRenderTexture).framebuffer;\n }\n\n /**\n * Resizes the RenderTexture.\n *\n * @param {number} width - The width to resize to.\n * @param {number} height - The height to resize to.\n * @param {boolean} [resizeBaseTexture=true] - Should the baseTexture.width and height values be resized as well?\n */\n resize(width: number, height: number, resizeBaseTexture = true): void\n {\n width = Math.ceil(width);\n height = Math.ceil(height);\n\n // TODO - could be not required..\n this.valid = (width > 0 && height > 0);\n\n this._frame.width = this.orig.width = width;\n this._frame.height = this.orig.height = height;\n\n if (resizeBaseTexture)\n {\n (this.baseTexture as BaseRenderTexture).resize(width, height);\n }\n\n this.updateUvs();\n }\n\n /**\n * Changes the resolution of baseTexture, but does not change framebuffer size.\n *\n * @param {number} resolution - The new resolution to apply to RenderTexture\n */\n setResolution(resolution: number): void\n {\n const { baseTexture } = this;\n\n if (baseTexture.resolution === resolution)\n {\n return;\n }\n\n baseTexture.setResolution(resolution);\n this.resize(baseTexture.width, baseTexture.height, false);\n }\n\n /**\n * A short hand way of creating a render texture.\n *\n * @param {object} [options] - Options\n * @param {number} [options.width=100] - The width of the render texture\n * @param {number} [options.height=100] - The height of the render texture\n * @param {number} [options.scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values\n * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the texture being generated\n * @return {PIXI.RenderTexture} The new render texture\n */\n static create(options: IBaseTextureOptions): RenderTexture\n {\n // fallback, old-style: create(width, height, scaleMode, resolution)\n if (typeof options === 'number')\n {\n /* eslint-disable prefer-rest-params */\n options = {\n width: options,\n height: arguments[1],\n scaleMode: arguments[2],\n resolution: arguments[3],\n };\n /* eslint-enable prefer-rest-params */\n }\n\n return new RenderTexture(new BaseRenderTexture(options));\n }\n}\n","import { RenderTexture } from './RenderTexture';\nimport { BaseRenderTexture } from './BaseRenderTexture';\nimport { nextPow2 } from '@pixi/utils';\n\nimport type { IBaseTextureOptions } from '../textures/BaseTexture';\nimport type { ISize } from '@pixi/math';\n\n/**\n * Experimental!\n *\n * Texture pool, used by FilterSystem and plugins\n * Stores collection of temporary pow2 or screen-sized renderTextures\n *\n * If you use custom RenderTexturePool for your filters, you can use methods\n * `getFilterTexture` and `returnFilterTexture` same as in\n *\n * @class\n * @memberof PIXI\n */\nexport class RenderTexturePool\n{\n public textureOptions: IBaseTextureOptions;\n public enableFullScreen: boolean;\n texturePool: {[x in string|number]: RenderTexture[]};\n private _pixelsWidth: number;\n private _pixelsHeight: number;\n /**\n * @param {object} [textureOptions] - options that will be passed to BaseRenderTexture constructor\n * @param {PIXI.SCALE_MODES} [textureOptions.scaleMode] - See {@link PIXI.SCALE_MODES} for possible values.\n */\n constructor(textureOptions?: IBaseTextureOptions)\n {\n this.texturePool = {};\n this.textureOptions = textureOptions || {};\n /**\n * Allow renderTextures of the same size as screen, not just pow2\n *\n * Automatically sets to true after `setScreenSize`\n *\n * @member {boolean}\n * @default false\n */\n this.enableFullScreen = false;\n\n this._pixelsWidth = 0;\n this._pixelsHeight = 0;\n }\n\n /**\n * creates of texture with params that were specified in pool constructor\n *\n * @param {number} realWidth - width of texture in pixels\n * @param {number} realHeight - height of texture in pixels\n * @returns {RenderTexture}\n */\n createTexture(realWidth: number, realHeight: number): RenderTexture\n {\n const baseRenderTexture = new BaseRenderTexture(Object.assign({\n width: realWidth,\n height: realHeight,\n resolution: 1,\n }, this.textureOptions));\n\n return new RenderTexture(baseRenderTexture);\n }\n\n /**\n * Gets a Power-of-Two render texture or fullScreen texture\n *\n * @protected\n * @param {number} minWidth - The minimum width of the render texture in real pixels.\n * @param {number} minHeight - The minimum height of the render texture in real pixels.\n * @param {number} [resolution=1] - The resolution of the render texture.\n * @return {PIXI.RenderTexture} The new render texture.\n */\n getOptimalTexture(minWidth: number, minHeight: number, resolution = 1): RenderTexture\n {\n let key: number|string = RenderTexturePool.SCREEN_KEY;\n\n minWidth *= resolution;\n minHeight *= resolution;\n\n if (!this.enableFullScreen || minWidth !== this._pixelsWidth || minHeight !== this._pixelsHeight)\n {\n minWidth = nextPow2(minWidth);\n minHeight = nextPow2(minHeight);\n key = ((minWidth & 0xFFFF) << 16) | (minHeight & 0xFFFF);\n }\n\n if (!this.texturePool[key])\n {\n this.texturePool[key] = [];\n }\n\n let renderTexture = this.texturePool[key].pop();\n\n if (!renderTexture)\n {\n renderTexture = this.createTexture(minWidth, minHeight);\n }\n\n renderTexture.filterPoolKey = key;\n renderTexture.setResolution(resolution);\n\n return renderTexture;\n }\n\n /**\n * Gets extra texture of the same size as input renderTexture\n *\n * `getFilterTexture(input, 0.5)` or `getFilterTexture(0.5, input)`\n *\n * @param {PIXI.RenderTexture} input - renderTexture from which size and resolution will be copied\n * @param {number} [resolution] - override resolution of the renderTexture\n * It overrides, it does not multiply\n * @returns {PIXI.RenderTexture}\n */\n getFilterTexture(input: RenderTexture, resolution: number): RenderTexture\n {\n const filterTexture = this.getOptimalTexture(input.width, input.height, resolution || input.resolution);\n\n filterTexture.filterFrame = input.filterFrame;\n\n return filterTexture;\n }\n\n /**\n * Place a render texture back into the pool.\n * @param {PIXI.RenderTexture} renderTexture - The renderTexture to free\n */\n returnTexture(renderTexture: RenderTexture): void\n {\n const key = renderTexture.filterPoolKey;\n\n renderTexture.filterFrame = null;\n this.texturePool[key].push(renderTexture);\n }\n\n /**\n * Alias for returnTexture, to be compliant with FilterSystem interface\n * @param {PIXI.RenderTexture} renderTexture - The renderTexture to free\n */\n returnFilterTexture(renderTexture: RenderTexture): void\n {\n this.returnTexture(renderTexture);\n }\n\n /**\n * Clears the pool\n *\n * @param {boolean} [destroyTextures=true] - destroy all stored textures\n */\n clear(destroyTextures: boolean): void\n {\n destroyTextures = destroyTextures !== false;\n if (destroyTextures)\n {\n for (const i in this.texturePool)\n {\n const textures = this.texturePool[i];\n\n if (textures)\n {\n for (let j = 0; j < textures.length; j++)\n {\n textures[j].destroy(true);\n }\n }\n }\n }\n\n this.texturePool = {};\n }\n\n /**\n * If screen size was changed, drops all screen-sized textures,\n * sets new screen size, sets `enableFullScreen` to true\n *\n * Size is measured in pixels, `renderer.view` can be passed here, not `renderer.screen`\n *\n * @param {PIXI.ISize} size - Initial size of screen\n */\n setScreenSize(size: ISize): void\n {\n if (size.width === this._pixelsWidth\n && size.height === this._pixelsHeight)\n {\n return;\n }\n\n const screenKey = RenderTexturePool.SCREEN_KEY;\n const textures = this.texturePool[screenKey];\n\n this.enableFullScreen = size.width > 0 && size.height > 0;\n\n if (textures)\n {\n for (let j = 0; j < textures.length; j++)\n {\n textures[j].destroy(true);\n }\n }\n this.texturePool[screenKey] = [];\n\n this._pixelsWidth = size.width;\n this._pixelsHeight = size.height;\n }\n\n /**\n * Key that is used to store fullscreen renderTextures in a pool\n *\n * @static\n * @const {string}\n */\n static SCREEN_KEY = 'screen';\n}\n","import type { TYPES } from '@pixi/constants';\n\n/* eslint-disable max-len */\n\n/**\n * Holds the information for a single attribute structure required to render geometry.\n *\n * This does not contain the actual data, but instead has a buffer id that maps to a {@link PIXI.Buffer}\n * This can include anything from positions, uvs, normals, colors etc.\n *\n * @class\n * @memberof PIXI\n */\nexport class Attribute\n{\n public buffer: number;\n public size: number;\n public normalized: boolean;\n public type: TYPES;\n public stride: number;\n public start: number;\n public instance: boolean;\n /**\n * @param {string} buffer - the id of the buffer that this attribute will look for\n * @param {Number} [size=0] - the size of the attribute. If you have 2 floats per vertex (eg position x and y) this would be 2.\n * @param {Boolean} [normalized=false] - should the data be normalized.\n * @param {Number} [type=PIXI.TYPES.FLOAT] - what type of number is the attribute. Check {@link PIXI.TYPES} to see the ones available\n * @param {Number} [stride=0] - How far apart (in floats) the start of each value is. (used for interleaving data)\n * @param {Number} [start=0] - How far into the array to start reading values (used for interleaving data)\n */\n constructor(buffer: number, size = 0, normalized = false, type = 5126, stride?: number, start?: number, instance?: boolean)\n {\n this.buffer = buffer;\n this.size = size;\n this.normalized = normalized;\n this.type = type;\n this.stride = stride;\n this.start = start;\n this.instance = instance;\n }\n\n /**\n * Destroys the Attribute.\n */\n destroy(): void\n {\n this.buffer = null;\n }\n\n /**\n * Helper function that creates an Attribute based on the information provided\n *\n * @static\n * @param {string} buffer - the id of the buffer that this attribute will look for\n * @param {Number} [size=0] - the size of the attribute. If you have 2 floats per vertex (eg position x and y) this would be 2\n * @param {Boolean} [normalized=false] - should the data be normalized.\n * @param {Number} [type=PIXI.TYPES.FLOAT] - what type of number is the attribute. Check {@link PIXI.TYPES} to see the ones available\n * @param {Number} [stride=0] - How far apart (in floats) the start of each value is. (used for interleaving data)\n *\n * @returns {PIXI.Attribute} A new {@link PIXI.Attribute} based on the information provided\n */\n static from(buffer: number, size?: number, normalized?: boolean, type?: TYPES, stride?: number): Attribute\n {\n return new Attribute(buffer, size, normalized, type, stride);\n }\n}\n","import { Runner } from '@pixi/runner';\n\nimport type { GLBuffer } from './GLBuffer';\n\nlet UID = 0;\n/* eslint-disable max-len */\n\n/**\n * Marks places in PixiJS where you can pass Float32Array, UInt32Array, any typed arrays, and ArrayBuffer\n *\n * Same as ArrayBuffer in typescript lib, defined here just for documentation\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface IArrayBuffer extends ArrayBuffer\n{\n}\n\n/**\n * PixiJS classes use this type instead of ArrayBuffer and typed arrays\n * to support expressions like `geometry.buffers[0].data[0] = position.x`.\n *\n * Gives access to indexing and `length` field\n *\n * @popelyshev: If data is actually ArrayBuffer and throws Exception on indexing - its user problem :)\n */\nexport interface ITypedArray extends IArrayBuffer\n{\n readonly length: number;\n [index: number]: number;\n readonly BYTES_PER_ELEMENT: number;\n}\n\n/**\n * A wrapper for data so that it can be used and uploaded by WebGL\n *\n * @class\n * @memberof PIXI\n */\nexport class Buffer\n{\n public data: ITypedArray;\n public index: boolean;\n public static: boolean;\n public id: number;\n disposeRunner: Runner;\n _glBuffers: {[key: number]: GLBuffer};\n _updateID: number;\n /**\n * @param {ArrayBuffer| SharedArrayBuffer|ArrayBufferView} data - the data to store in the buffer.\n * @param {boolean} [_static=true] - `true` for static buffer\n * @param {boolean} [index=false] - `true` for index buffer\n */\n constructor(data?: IArrayBuffer, _static = true, index = false)\n {\n /**\n * The data in the buffer, as a typed array\n *\n * @member {ArrayBuffer| SharedArrayBuffer | ArrayBufferView}\n */\n this.data = (data || new Float32Array(1)) as ITypedArray;\n\n /**\n * A map of renderer IDs to webgl buffer\n *\n * @private\n * @member {object}\n */\n this._glBuffers = {};\n\n this._updateID = 0;\n\n this.index = index;\n\n this.static = _static;\n\n this.id = UID++;\n\n this.disposeRunner = new Runner('disposeBuffer');\n }\n\n // TODO could explore flagging only a partial upload?\n /**\n * flags this buffer as requiring an upload to the GPU\n * @param {ArrayBuffer|SharedArrayBuffer|ArrayBufferView} [data] - the data to update in the buffer.\n */\n update(data?: IArrayBuffer): void\n {\n this.data = (data as ITypedArray) || this.data;\n this._updateID++;\n }\n\n /**\n * disposes WebGL resources that are connected to this geometry\n */\n dispose(): void\n {\n this.disposeRunner.emit(this, false);\n }\n\n /**\n * Destroys the buffer\n */\n destroy(): void\n {\n this.dispose();\n\n this.data = null;\n }\n\n /**\n * Helper function that creates a buffer based on an array or TypedArray\n *\n * @static\n * @param {ArrayBufferView | number[]} data - the TypedArray that the buffer will store. If this is a regular Array it will be converted to a Float32Array.\n * @return {PIXI.Buffer} A new Buffer based on the data provided.\n */\n static from(data: IArrayBuffer | number[]): Buffer\n {\n if (data instanceof Array)\n {\n data = new Float32Array(data);\n }\n\n return new Buffer(data);\n }\n}\n","import type { ITypedArray } from '../Buffer';\n\nexport function getBufferType(array: ITypedArray): string|null\n{\n if (array.BYTES_PER_ELEMENT === 4)\n {\n if (array instanceof Float32Array)\n {\n return 'Float32Array';\n }\n else if (array instanceof Uint32Array)\n {\n return 'Uint32Array';\n }\n\n return 'Int32Array';\n }\n else if (array.BYTES_PER_ELEMENT === 2)\n {\n if (array instanceof Uint16Array)\n {\n return 'Uint16Array';\n }\n }\n else if (array.BYTES_PER_ELEMENT === 1)\n {\n if (array instanceof Uint8Array)\n {\n return 'Uint8Array';\n }\n }\n\n // TODO map out the rest of the array elements!\n return null;\n}\n","import { getBufferType } from './getBufferType';\n\nimport type { ITypedArray } from '../Buffer';\nimport type { Dict } from '@pixi/utils';\n\n/* eslint-disable object-shorthand */\nconst map: Dict = {\n Float32Array: Float32Array,\n Uint32Array: Uint32Array,\n Int32Array: Int32Array,\n Uint8Array: Uint8Array,\n};\n\nexport function interleaveTypedArrays(arrays: Array, sizes: Array): Float32Array\n{\n let outSize = 0;\n let stride = 0;\n const views: Dict = {};\n\n for (let i = 0; i < arrays.length; i++)\n {\n stride += sizes[i];\n outSize += arrays[i].length;\n }\n\n const buffer = new ArrayBuffer(outSize * 4);\n\n let out = null;\n let littleOffset = 0;\n\n for (let i = 0; i < arrays.length; i++)\n {\n const size = sizes[i];\n const array = arrays[i];\n\n const type = getBufferType(array);\n\n if (!views[type])\n {\n views[type] = new map[type](buffer);\n }\n\n out = views[type];\n\n for (let j = 0; j < array.length; j++)\n {\n const indexStart = ((j / size | 0) * stride) + littleOffset;\n const index = j % size;\n\n out[indexStart + index] = array[j];\n }\n\n littleOffset += size;\n }\n\n return new Float32Array(buffer);\n}\n","import { Attribute } from './Attribute';\nimport { Buffer } from './Buffer';\nimport { interleaveTypedArrays } from './utils/interleaveTypedArrays';\nimport { getBufferType } from './utils/getBufferType';\nimport { Runner } from '@pixi/runner';\n\nimport type { TYPES } from '@pixi/constants';\nimport type { IArrayBuffer } from './Buffer';\nimport type { Dict } from '@pixi/utils';\n\nconst byteSizeMap: {[key: number]: number} = { 5126: 4, 5123: 2, 5121: 1 };\nlet UID = 0;\n\n/* eslint-disable object-shorthand */\nconst map: Dict = {\n Float32Array: Float32Array,\n Uint32Array: Uint32Array,\n Int32Array: Int32Array,\n Uint8Array: Uint8Array,\n Uint16Array: Uint16Array,\n};\n\n/* eslint-disable max-len */\n\n/**\n * The Geometry represents a model. It consists of two components:\n * - GeometryStyle - The structure of the model such as the attributes layout\n * - GeometryData - the data of the model - this consists of buffers.\n * This can include anything from positions, uvs, normals, colors etc.\n *\n * Geometry can be defined without passing in a style or data if required (thats how I prefer!)\n *\n * ```js\n * let geometry = new PIXI.Geometry();\n *\n * geometry.addAttribute('positions', [0, 0, 100, 0, 100, 100, 0, 100], 2);\n * geometry.addAttribute('uvs', [0,0,1,0,1,1,0,1],2)\n * geometry.addIndex([0,1,2,1,3,2])\n *\n * ```\n * @class\n * @memberof PIXI\n */\nexport class Geometry\n{\n public buffers: Array;\n public indexBuffer: Buffer;\n public attributes: {[key: string]: Attribute};\n public id: number;\n public instanced: boolean;\n public instanceCount: number;\n glVertexArrayObjects: {[key: number]: {[key: string]: WebGLVertexArrayObject}};\n disposeRunner: Runner;\n refCount: number;\n /**\n * @param {PIXI.Buffer[]} [buffers] - an array of buffers. optional.\n * @param {object} [attributes] - of the geometry, optional structure of the attributes layout\n */\n constructor(buffers: Array = [], attributes: {[key: string]: Attribute} = {})\n {\n this.buffers = buffers;\n\n this.indexBuffer = null;\n\n this.attributes = attributes;\n\n /**\n * A map of renderer IDs to webgl VAOs\n *\n * @protected\n * @type {object}\n */\n this.glVertexArrayObjects = {};\n\n this.id = UID++;\n\n this.instanced = false;\n\n /**\n * Number of instances in this geometry, pass it to `GeometrySystem.draw()`\n * @member {number}\n * @default 1\n */\n this.instanceCount = 1;\n\n this.disposeRunner = new Runner('disposeGeometry');\n\n /**\n * Count of existing (not destroyed) meshes that reference this geometry\n * @member {number}\n */\n this.refCount = 0;\n }\n\n /**\n *\n * Adds an attribute to the geometry\n * Note: `stride` and `start` should be `undefined` if you dont know them, not 0!\n *\n * @param {String} id - the name of the attribute (matching up to a shader)\n * @param {PIXI.Buffer|number[]} [buffer] - the buffer that holds the data of the attribute . You can also provide an Array and a buffer will be created from it.\n * @param {Number} [size=0] - the size of the attribute. If you have 2 floats per vertex (eg position x and y) this would be 2\n * @param {Boolean} [normalized=false] - should the data be normalized.\n * @param {Number} [type=PIXI.TYPES.FLOAT] - what type of number is the attribute. Check {PIXI.TYPES} to see the ones available\n * @param {Number} [stride] - How far apart (in floats) the start of each value is. (used for interleaving data)\n * @param {Number} [start] - How far into the array to start reading values (used for interleaving data)\n * @param {boolean} [instance=false] - Instancing flag\n *\n * @return {PIXI.Geometry} returns self, useful for chaining.\n */\n addAttribute(id: string, buffer: Buffer|Float32Array|Uint32Array|Array, size = 0, normalized = false,\n type?: TYPES, stride?: number, start?: number, instance = false): this\n {\n if (!buffer)\n {\n throw new Error('You must pass a buffer when creating an attribute');\n }\n\n // check if this is a buffer!\n if (!(buffer instanceof Buffer))\n {\n // its an array!\n if (buffer instanceof Array)\n {\n buffer = new Float32Array(buffer);\n }\n\n buffer = new Buffer(buffer);\n }\n\n const ids = id.split('|');\n\n if (ids.length > 1)\n {\n for (let i = 0; i < ids.length; i++)\n {\n this.addAttribute(ids[i], buffer, size, normalized, type);\n }\n\n return this;\n }\n\n let bufferIndex = this.buffers.indexOf(buffer);\n\n if (bufferIndex === -1)\n {\n this.buffers.push(buffer);\n bufferIndex = this.buffers.length - 1;\n }\n\n this.attributes[id] = new Attribute(bufferIndex, size, normalized, type, stride, start, instance);\n\n // assuming that if there is instanced data then this will be drawn with instancing!\n this.instanced = this.instanced || instance;\n\n return this;\n }\n\n /**\n * returns the requested attribute\n *\n * @param {String} id - the name of the attribute required\n * @return {PIXI.Attribute} the attribute requested.\n */\n getAttribute(id: string): Attribute\n {\n return this.attributes[id];\n }\n\n /**\n * returns the requested buffer\n *\n * @param {String} id - the name of the buffer required\n * @return {PIXI.Buffer} the buffer requested.\n */\n getBuffer(id: string): Buffer\n {\n return this.buffers[this.getAttribute(id).buffer];\n }\n\n /**\n *\n * Adds an index buffer to the geometry\n * The index buffer contains integers, three for each triangle in the geometry, which reference the various attribute buffers (position, colour, UV coordinates, other UV coordinates, normal, …). There is only ONE index buffer.\n *\n * @param {PIXI.Buffer|number[]} [buffer] - the buffer that holds the data of the index buffer. You can also provide an Array and a buffer will be created from it.\n * @return {PIXI.Geometry} returns self, useful for chaining.\n */\n addIndex(buffer?: Buffer | IArrayBuffer | number[]): Geometry\n {\n if (!(buffer instanceof Buffer))\n {\n // its an array!\n if (buffer instanceof Array)\n {\n buffer = new Uint16Array(buffer);\n }\n\n buffer = new Buffer(buffer);\n }\n\n buffer.index = true;\n this.indexBuffer = buffer;\n\n if (this.buffers.indexOf(buffer) === -1)\n {\n this.buffers.push(buffer);\n }\n\n return this;\n }\n\n /**\n * returns the index buffer\n *\n * @return {PIXI.Buffer} the index buffer.\n */\n getIndex(): Buffer\n {\n return this.indexBuffer;\n }\n\n /**\n * this function modifies the structure so that all current attributes become interleaved into a single buffer\n * This can be useful if your model remains static as it offers a little performance boost\n *\n * @return {PIXI.Geometry} returns self, useful for chaining.\n */\n interleave(): Geometry\n {\n // a simple check to see if buffers are already interleaved..\n if (this.buffers.length === 1 || (this.buffers.length === 2 && this.indexBuffer)) return this;\n\n // assume already that no buffers are interleaved\n const arrays = [];\n const sizes = [];\n const interleavedBuffer = new Buffer();\n let i;\n\n for (i in this.attributes)\n {\n const attribute = this.attributes[i];\n\n const buffer = this.buffers[attribute.buffer];\n\n arrays.push(buffer.data);\n\n sizes.push((attribute.size * byteSizeMap[attribute.type]) / 4);\n\n attribute.buffer = 0;\n }\n\n interleavedBuffer.data = interleaveTypedArrays(arrays, sizes);\n\n for (i = 0; i < this.buffers.length; i++)\n {\n if (this.buffers[i] !== this.indexBuffer)\n {\n this.buffers[i].destroy();\n }\n }\n\n this.buffers = [interleavedBuffer];\n\n if (this.indexBuffer)\n {\n this.buffers.push(this.indexBuffer);\n }\n\n return this;\n }\n\n getSize(): number\n {\n for (const i in this.attributes)\n {\n const attribute = this.attributes[i];\n const buffer = this.buffers[attribute.buffer];\n\n return (buffer.data as any).length / ((attribute.stride / 4) || attribute.size);\n }\n\n return 0;\n }\n\n /**\n * disposes WebGL resources that are connected to this geometry\n */\n dispose(): void\n {\n this.disposeRunner.emit(this, false);\n }\n\n /**\n * Destroys the geometry.\n */\n destroy(): void\n {\n this.dispose();\n\n this.buffers = null;\n this.indexBuffer = null;\n this.attributes = null;\n }\n\n /**\n * returns a clone of the geometry\n *\n * @returns {PIXI.Geometry} a new clone of this geometry\n */\n clone(): Geometry\n {\n const geometry = new Geometry();\n\n for (let i = 0; i < this.buffers.length; i++)\n {\n geometry.buffers[i] = new Buffer(this.buffers[i].data.slice(0));\n }\n\n for (const i in this.attributes)\n {\n const attrib = this.attributes[i];\n\n geometry.attributes[i] = new Attribute(\n attrib.buffer,\n attrib.size,\n attrib.normalized,\n attrib.type,\n attrib.stride,\n attrib.start,\n attrib.instance\n );\n }\n\n if (this.indexBuffer)\n {\n geometry.indexBuffer = geometry.buffers[this.buffers.indexOf(this.indexBuffer)];\n geometry.indexBuffer.index = true;\n }\n\n return geometry;\n }\n\n /**\n * merges an array of geometries into a new single one\n * geometry attribute styles must match for this operation to work\n *\n * @param {PIXI.Geometry[]} geometries - array of geometries to merge\n * @returns {PIXI.Geometry} shiny new geometry!\n */\n static merge(geometries: Array): Geometry\n {\n // todo add a geometry check!\n // also a size check.. cant be too big!]\n\n const geometryOut = new Geometry();\n\n const arrays = [];\n const sizes: Array = [];\n const offsets = [];\n\n let geometry;\n\n // pass one.. get sizes..\n for (let i = 0; i < geometries.length; i++)\n {\n geometry = geometries[i];\n\n for (let j = 0; j < geometry.buffers.length; j++)\n {\n sizes[j] = sizes[j] || 0;\n sizes[j] += geometry.buffers[j].data.length;\n offsets[j] = 0;\n }\n }\n\n // build the correct size arrays..\n for (let i = 0; i < geometry.buffers.length; i++)\n {\n // TODO types!\n arrays[i] = new map[getBufferType(geometry.buffers[i].data)](sizes[i]);\n geometryOut.buffers[i] = new Buffer(arrays[i]);\n }\n\n // pass to set data..\n for (let i = 0; i < geometries.length; i++)\n {\n geometry = geometries[i];\n\n for (let j = 0; j < geometry.buffers.length; j++)\n {\n arrays[j].set(geometry.buffers[j].data, offsets[j]);\n offsets[j] += geometry.buffers[j].data.length;\n }\n }\n\n geometryOut.attributes = geometry.attributes;\n\n if (geometry.indexBuffer)\n {\n geometryOut.indexBuffer = geometryOut.buffers[geometry.buffers.indexOf(geometry.indexBuffer)];\n geometryOut.indexBuffer.index = true;\n\n let offset = 0;\n let stride = 0;\n let offset2 = 0;\n let bufferIndexToCount = 0;\n\n // get a buffer\n for (let i = 0; i < geometry.buffers.length; i++)\n {\n if (geometry.buffers[i] !== geometry.indexBuffer)\n {\n bufferIndexToCount = i;\n break;\n }\n }\n\n // figure out the stride of one buffer..\n for (const i in geometry.attributes)\n {\n const attribute = geometry.attributes[i];\n\n if ((attribute.buffer | 0) === bufferIndexToCount)\n {\n stride += ((attribute.size * byteSizeMap[attribute.type]) / 4);\n }\n }\n\n // time to off set all indexes..\n for (let i = 0; i < geometries.length; i++)\n {\n const indexBufferData = geometries[i].indexBuffer.data;\n\n for (let j = 0; j < indexBufferData.length; j++)\n {\n geometryOut.indexBuffer.data[j + offset2] += offset;\n }\n\n offset += geometry.buffers[bufferIndexToCount].data.length / (stride);\n offset2 += indexBufferData.length;\n }\n }\n\n return geometryOut;\n }\n}\n","import { Geometry } from '../geometry/Geometry';\n\n/**\n * Helper class to create a quad\n *\n * @class\n * @memberof PIXI\n */\nexport class Quad extends Geometry\n{\n constructor()\n {\n super();\n\n this.addAttribute('aVertexPosition', new Float32Array([\n 0, 0,\n 1, 0,\n 1, 1,\n 0, 1,\n ]))\n .addIndex([0, 1, 3, 2]);\n }\n}\n","import { Geometry } from '../geometry/Geometry';\nimport { Buffer } from '../geometry/Buffer';\n\nimport type { Rectangle } from '@pixi/math';\n\n/**\n * Helper class to create a quad with uvs like in v4\n *\n * @class\n * @memberof PIXI\n * @extends PIXI.Geometry\n */\nexport class QuadUv extends Geometry\n{\n vertexBuffer: Buffer;\n uvBuffer: Buffer;\n vertices: Float32Array;\n uvs: Float32Array;\n\n constructor()\n {\n super();\n\n /**\n * An array of vertices\n *\n * @member {Float32Array}\n */\n this.vertices = new Float32Array([\n -1, -1,\n 1, -1,\n 1, 1,\n -1, 1,\n ]);\n\n /**\n * The Uvs of the quad\n *\n * @member {Float32Array}\n */\n this.uvs = new Float32Array([\n 0, 0,\n 1, 0,\n 1, 1,\n 0, 1,\n ]);\n\n this.vertexBuffer = new Buffer(this.vertices);\n this.uvBuffer = new Buffer(this.uvs);\n\n this.addAttribute('aVertexPosition', this.vertexBuffer)\n .addAttribute('aTextureCoord', this.uvBuffer)\n .addIndex([0, 1, 2, 0, 2, 3]);\n }\n\n /**\n * Maps two Rectangle to the quad.\n *\n * @param {PIXI.Rectangle} targetTextureFrame - the first rectangle\n * @param {PIXI.Rectangle} destinationFrame - the second rectangle\n * @return {PIXI.Quad} Returns itself.\n */\n map(targetTextureFrame: Rectangle, destinationFrame: Rectangle): this\n {\n let x = 0; // destinationFrame.x / targetTextureFrame.width;\n let y = 0; // destinationFrame.y / targetTextureFrame.height;\n\n this.uvs[0] = x;\n this.uvs[1] = y;\n\n this.uvs[2] = x + (destinationFrame.width / targetTextureFrame.width);\n this.uvs[3] = y;\n\n this.uvs[4] = x + (destinationFrame.width / targetTextureFrame.width);\n this.uvs[5] = y + (destinationFrame.height / targetTextureFrame.height);\n\n this.uvs[6] = x;\n this.uvs[7] = y + (destinationFrame.height / targetTextureFrame.height);\n\n x = destinationFrame.x;\n y = destinationFrame.y;\n\n this.vertices[0] = x;\n this.vertices[1] = y;\n\n this.vertices[2] = x + destinationFrame.width;\n this.vertices[3] = y;\n\n this.vertices[4] = x + destinationFrame.width;\n this.vertices[5] = y + destinationFrame.height;\n\n this.vertices[6] = x;\n this.vertices[7] = y + destinationFrame.height;\n\n this.invalidate();\n\n return this;\n }\n\n /**\n * legacy upload method, just marks buffers dirty\n * @returns {PIXI.QuadUv} Returns itself.\n */\n invalidate(): this\n {\n this.vertexBuffer._updateID++;\n this.uvBuffer._updateID++;\n\n return this;\n }\n}\n","import type { Dict } from '@pixi/utils';\nimport type { UniformsSyncCallback } from './utils';\n\nlet UID = 0;\n\n/**\n * Uniform group holds uniform map and some ID's for work\n *\n * @class\n * @memberof PIXI\n */\nexport class UniformGroup\n{\n public readonly uniforms: Dict;\n public readonly group: boolean;\n public id: number;\n syncUniforms: Dict;\n dirtyId: number;\n static: boolean;\n\n /**\n * @param {object} [uniforms] - Custom uniforms to use to augment the built-in ones.\n * @param {boolean} [_static] - Uniforms wont be changed after creation\n */\n constructor(uniforms: Dict, _static?: boolean)\n {\n /**\n * uniform values\n * @member {object}\n * @readonly\n */\n this.uniforms = uniforms;\n\n /**\n * Its a group and not a single uniforms\n * @member {boolean}\n * @readonly\n * @default true\n */\n this.group = true;\n\n // lets generate this when the shader ?\n this.syncUniforms = {};\n\n /**\n * dirty version\n * @protected\n * @member {number}\n */\n this.dirtyId = 0;\n\n /**\n * unique id\n * @protected\n * @member {number}\n */\n this.id = UID++;\n\n /**\n * Uniforms wont be changed after creation\n * @member {boolean}\n */\n this.static = !!_static;\n }\n\n update(): void\n {\n this.dirtyId++;\n }\n\n add(name: string, uniforms: Dict, _static: boolean): void\n {\n this.uniforms[name] = new UniformGroup(uniforms, _static);\n }\n\n static from(uniforms: Dict, _static: boolean): UniformGroup\n {\n return new UniformGroup(uniforms, _static);\n }\n}\n","import { Rectangle } from '@pixi/math';\n\nimport type { Filter } from './Filter';\nimport type { IFilterTarget } from './IFilterTarget';\nimport type { RenderTexture } from '../renderTexture/RenderTexture';\n\n/**\n * System plugin to the renderer to manage filter states.\n *\n * @class\n * @private\n */\nexport class FilterState\n{\n renderTexture: RenderTexture;\n target: IFilterTarget;\n legacy: boolean;\n resolution: number;\n sourceFrame: Rectangle;\n destinationFrame: Rectangle;\n filters: Array;\n\n constructor()\n {\n this.renderTexture = null;\n\n /**\n * Target of the filters\n * We store for case when custom filter wants to know the element it was applied on\n * @member {PIXI.DisplayObject}\n * @private\n */\n this.target = null;\n\n /**\n * Compatibility with PixiJS v4 filters\n * @member {boolean}\n * @default false\n * @private\n */\n this.legacy = false;\n\n /**\n * Resolution of filters\n * @member {number}\n * @default 1\n * @private\n */\n this.resolution = 1;\n\n // next three fields are created only for root\n // re-assigned for everything else\n\n /**\n * Source frame\n * @member {PIXI.Rectangle}\n * @private\n */\n this.sourceFrame = new Rectangle();\n\n /**\n * Destination frame\n * @member {PIXI.Rectangle}\n * @private\n */\n this.destinationFrame = new Rectangle();\n\n /**\n * Collection of filters\n * @member {PIXI.Filter[]}\n * @private\n */\n this.filters = [];\n }\n\n /**\n * clears the state\n * @private\n */\n clear(): void\n {\n this.target = null;\n this.filters = null;\n this.renderTexture = null;\n }\n}\n","import { System } from '../System';\nimport { RenderTexturePool } from '../renderTexture/RenderTexturePool';\nimport { Quad } from '../utils/Quad';\nimport { QuadUv } from '../utils/QuadUv';\nimport { Rectangle, Matrix } from '@pixi/math';\nimport { UniformGroup } from '../shader/UniformGroup';\nimport { DRAW_MODES, CLEAR_MODES } from '@pixi/constants';\nimport { deprecation } from '@pixi/utils';\nimport { FilterState } from './FilterState';\n\nimport type { Filter } from './Filter';\nimport type { IFilterTarget } from './IFilterTarget';\nimport type { ISpriteMaskTarget } from './spriteMask/SpriteMaskFilter';\nimport type { RenderTexture } from '../renderTexture/RenderTexture';\nimport type { Renderer } from '../Renderer';\n/**\n * System plugin to the renderer to manage the filters.\n *\n * @class\n * @memberof PIXI.systems\n * @extends PIXI.System\n */\nexport class FilterSystem extends System\n{\n public readonly defaultFilterStack: Array;\n public statePool: Array;\n public texturePool: RenderTexturePool;\n public forceClear: boolean;\n public useMaxPadding: boolean;\n protected quad: Quad;\n protected quadUv: QuadUv;\n protected activeState: FilterState;\n protected globalUniforms: UniformGroup;\n private tempRect: Rectangle;\n\n /**\n * @param {PIXI.Renderer} renderer - The renderer this System works for.\n */\n constructor(renderer: Renderer)\n {\n super(renderer);\n\n /**\n * List of filters for the FilterSystem\n * @member {Object[]}\n * @readonly\n */\n this.defaultFilterStack = [{}] as any;\n\n /**\n * stores a bunch of PO2 textures used for filtering\n * @member {Object}\n */\n this.texturePool = new RenderTexturePool();\n\n this.texturePool.setScreenSize(renderer.view);\n\n /**\n * a pool for storing filter states, save us creating new ones each tick\n * @member {Object[]}\n */\n this.statePool = [];\n\n /**\n * A very simple geometry used when drawing a filter effect to the screen\n * @member {PIXI.Quad}\n */\n this.quad = new Quad();\n\n /**\n * Quad UVs\n * @member {PIXI.QuadUv}\n */\n this.quadUv = new QuadUv();\n\n /**\n * Temporary rect for maths\n * @type {PIXI.Rectangle}\n */\n this.tempRect = new Rectangle();\n\n /**\n * Active state\n * @member {object}\n */\n this.activeState = {} as any;\n\n /**\n * This uniform group is attached to filter uniforms when used\n * @member {PIXI.UniformGroup}\n * @property {PIXI.Rectangle} outputFrame\n * @property {Float32Array} inputSize\n * @property {Float32Array} inputPixel\n * @property {Float32Array} inputClamp\n * @property {Number} resolution\n * @property {Float32Array} filterArea\n * @property {Fload32Array} filterClamp\n */\n this.globalUniforms = new UniformGroup({\n outputFrame: this.tempRect,\n inputSize: new Float32Array(4),\n inputPixel: new Float32Array(4),\n inputClamp: new Float32Array(4),\n resolution: 1,\n\n // legacy variables\n filterArea: new Float32Array(4),\n filterClamp: new Float32Array(4),\n }, true);\n\n /**\n * Whether to clear output renderTexture in AUTO/BLIT mode. See {@link PIXI.CLEAR_MODES}\n * @member {boolean}\n */\n this.forceClear = false;\n\n /**\n * Old padding behavior is to use the max amount instead of sum padding.\n * Use this flag if you need the old behavior.\n * @member {boolean}\n * @default false\n */\n this.useMaxPadding = false;\n }\n\n /**\n * Adds a new filter to the System.\n *\n * @param {PIXI.DisplayObject} target - The target of the filter to render.\n * @param {PIXI.Filter[]} filters - The filters to apply.\n */\n push(target: IFilterTarget, filters: Array): void\n {\n const renderer = this.renderer;\n const filterStack = this.defaultFilterStack;\n const state = this.statePool.pop() || new FilterState();\n\n let resolution = filters[0].resolution;\n let padding = filters[0].padding;\n let autoFit = filters[0].autoFit;\n let legacy = filters[0].legacy;\n\n for (let i = 1; i < filters.length; i++)\n {\n const filter = filters[i];\n\n // lets use the lowest resolution..\n resolution = Math.min(resolution, filter.resolution);\n // figure out the padding required for filters\n padding = this.useMaxPadding\n // old behavior: use largest amount of padding!\n ? Math.max(padding, filter.padding)\n // new behavior: sum the padding\n : padding + filter.padding;\n // only auto fit if all filters are autofit\n autoFit = autoFit || filter.autoFit;\n\n legacy = legacy || filter.legacy;\n }\n\n if (filterStack.length === 1)\n {\n this.defaultFilterStack[0].renderTexture = renderer.renderTexture.current;\n }\n\n filterStack.push(state);\n\n state.resolution = resolution;\n\n state.legacy = legacy;\n\n state.target = target;\n\n state.sourceFrame.copyFrom(target.filterArea || target.getBounds(true));\n\n state.sourceFrame.pad(padding);\n if (autoFit)\n {\n state.sourceFrame.fit(this.renderer.renderTexture.sourceFrame);\n }\n\n // round to whole number based on resolution\n state.sourceFrame.ceil(resolution);\n\n state.renderTexture = this.getOptimalFilterTexture(state.sourceFrame.width, state.sourceFrame.height, resolution);\n state.filters = filters;\n\n state.destinationFrame.width = state.renderTexture.width;\n state.destinationFrame.height = state.renderTexture.height;\n\n const destinationFrame = this.tempRect;\n\n destinationFrame.width = state.sourceFrame.width;\n destinationFrame.height = state.sourceFrame.height;\n\n state.renderTexture.filterFrame = state.sourceFrame;\n\n renderer.renderTexture.bind(state.renderTexture, state.sourceFrame, destinationFrame);\n renderer.renderTexture.clear();\n }\n\n /**\n * Pops off the filter and applies it.\n *\n */\n pop(): void\n {\n const filterStack = this.defaultFilterStack;\n const state = filterStack.pop();\n const filters = state.filters;\n\n this.activeState = state;\n\n const globalUniforms = this.globalUniforms.uniforms;\n\n globalUniforms.outputFrame = state.sourceFrame;\n globalUniforms.resolution = state.resolution;\n\n const inputSize = globalUniforms.inputSize;\n const inputPixel = globalUniforms.inputPixel;\n const inputClamp = globalUniforms.inputClamp;\n\n inputSize[0] = state.destinationFrame.width;\n inputSize[1] = state.destinationFrame.height;\n inputSize[2] = 1.0 / inputSize[0];\n inputSize[3] = 1.0 / inputSize[1];\n\n inputPixel[0] = inputSize[0] * state.resolution;\n inputPixel[1] = inputSize[1] * state.resolution;\n inputPixel[2] = 1.0 / inputPixel[0];\n inputPixel[3] = 1.0 / inputPixel[1];\n\n inputClamp[0] = 0.5 * inputPixel[2];\n inputClamp[1] = 0.5 * inputPixel[3];\n inputClamp[2] = (state.sourceFrame.width * inputSize[2]) - (0.5 * inputPixel[2]);\n inputClamp[3] = (state.sourceFrame.height * inputSize[3]) - (0.5 * inputPixel[3]);\n\n // only update the rect if its legacy..\n if (state.legacy)\n {\n const filterArea = globalUniforms.filterArea;\n\n filterArea[0] = state.destinationFrame.width;\n filterArea[1] = state.destinationFrame.height;\n filterArea[2] = state.sourceFrame.x;\n filterArea[3] = state.sourceFrame.y;\n\n globalUniforms.filterClamp = globalUniforms.inputClamp;\n }\n\n this.globalUniforms.update();\n\n const lastState = filterStack[filterStack.length - 1];\n\n if (state.renderTexture.framebuffer.multisample > 1)\n {\n this.renderer.framebuffer.blit();\n }\n\n if (filters.length === 1)\n {\n filters[0].apply(this, state.renderTexture, lastState.renderTexture, CLEAR_MODES.BLEND, state);\n\n this.returnFilterTexture(state.renderTexture);\n }\n else\n {\n let flip = state.renderTexture;\n let flop = this.getOptimalFilterTexture(\n flip.width,\n flip.height,\n state.resolution\n );\n\n flop.filterFrame = flip.filterFrame;\n\n let i = 0;\n\n for (i = 0; i < filters.length - 1; ++i)\n {\n filters[i].apply(this, flip, flop, CLEAR_MODES.CLEAR, state);\n\n const t = flip;\n\n flip = flop;\n flop = t;\n }\n\n filters[i].apply(this, flip, lastState.renderTexture, CLEAR_MODES.BLEND, state);\n\n this.returnFilterTexture(flip);\n this.returnFilterTexture(flop);\n }\n\n state.clear();\n this.statePool.push(state);\n }\n\n /**\n * Binds a renderTexture with corresponding `filterFrame`, clears it if mode corresponds.\n * @param {PIXI.RenderTexture} filterTexture - renderTexture to bind, should belong to filter pool or filter stack\n * @param {PIXI.CLEAR_MODES} [clearMode] - clearMode, by default its CLEAR/YES. See {@link PIXI.CLEAR_MODES}\n */\n bindAndClear(filterTexture: RenderTexture, clearMode = CLEAR_MODES.CLEAR): void\n {\n if (filterTexture && filterTexture.filterFrame)\n {\n const destinationFrame = this.tempRect;\n\n destinationFrame.width = filterTexture.filterFrame.width;\n destinationFrame.height = filterTexture.filterFrame.height;\n\n this.renderer.renderTexture.bind(filterTexture, filterTexture.filterFrame, destinationFrame);\n }\n else\n {\n this.renderer.renderTexture.bind(filterTexture);\n }\n\n // TODO: remove in next major version\n if (typeof clearMode === 'boolean')\n {\n clearMode = clearMode ? CLEAR_MODES.CLEAR : CLEAR_MODES.BLEND;\n // get deprecation function from utils\n deprecation('5.2.1', 'Use CLEAR_MODES when using clear applyFilter option');\n }\n if (clearMode === CLEAR_MODES.CLEAR\n || (clearMode === CLEAR_MODES.BLIT && this.forceClear))\n {\n this.renderer.renderTexture.clear();\n }\n }\n\n /**\n * Draws a filter.\n *\n * @param {PIXI.Filter} filter - The filter to draw.\n * @param {PIXI.RenderTexture} input - The input render target.\n * @param {PIXI.RenderTexture} output - The target to output to.\n * @param {PIXI.CLEAR_MODES} [clearMode] - Should the output be cleared before rendering to it\n */\n applyFilter(filter: Filter, input: RenderTexture, output: RenderTexture, clearMode: CLEAR_MODES): void\n {\n const renderer = this.renderer;\n\n this.bindAndClear(output, clearMode);\n\n // set the uniforms..\n filter.uniforms.uSampler = input;\n filter.uniforms.filterGlobals = this.globalUniforms;\n\n // TODO make it so that the order of this does not matter..\n // because it does at the moment cos of global uniforms.\n // they need to get resynced\n\n renderer.state.set(filter.state);\n renderer.shader.bind(filter);\n\n if (filter.legacy)\n {\n this.quadUv.map(input._frame, input.filterFrame);\n\n renderer.geometry.bind(this.quadUv);\n renderer.geometry.draw(DRAW_MODES.TRIANGLES);\n }\n else\n {\n renderer.geometry.bind(this.quad);\n renderer.geometry.draw(DRAW_MODES.TRIANGLE_STRIP);\n }\n }\n\n /**\n * Multiply _input normalized coordinates_ to this matrix to get _sprite texture normalized coordinates_.\n *\n * Use `outputMatrix * vTextureCoord` in the shader.\n *\n * @param {PIXI.Matrix} outputMatrix - The matrix to output to.\n * @param {PIXI.Sprite} sprite - The sprite to map to.\n * @return {PIXI.Matrix} The mapped matrix.\n */\n calculateSpriteMatrix(outputMatrix: Matrix, sprite: ISpriteMaskTarget): Matrix\n {\n const { sourceFrame, destinationFrame } = this.activeState;\n const { orig } = sprite._texture;\n const mappedMatrix = outputMatrix.set(destinationFrame.width, 0, 0,\n destinationFrame.height, sourceFrame.x, sourceFrame.y);\n const worldTransform = sprite.worldTransform.copyTo(Matrix.TEMP_MATRIX);\n\n worldTransform.invert();\n mappedMatrix.prepend(worldTransform);\n mappedMatrix.scale(1.0 / orig.width, 1.0 / orig.height);\n mappedMatrix.translate(sprite.anchor.x, sprite.anchor.y);\n\n return mappedMatrix;\n }\n\n /**\n * Destroys this Filter System.\n */\n destroy(): void\n {\n // Those textures has to be destroyed by RenderTextureSystem or FramebufferSystem\n this.texturePool.clear(false);\n }\n\n /**\n * Gets a Power-of-Two render texture or fullScreen texture\n *\n * @protected\n * @param {number} minWidth - The minimum width of the render texture in real pixels.\n * @param {number} minHeight - The minimum height of the render texture in real pixels.\n * @param {number} [resolution=1] - The resolution of the render texture.\n * @return {PIXI.RenderTexture} The new render texture.\n */\n protected getOptimalFilterTexture(minWidth: number, minHeight: number, resolution = 1): RenderTexture\n {\n return this.texturePool.getOptimalTexture(minWidth, minHeight, resolution);\n }\n\n /**\n * Gets extra render texture to use inside current filter\n * To be compliant with older filters, you can use params in any order\n *\n * @param {PIXI.RenderTexture} [input] - renderTexture from which size and resolution will be copied\n * @param {number} [resolution] - override resolution of the renderTexture\n * @returns {PIXI.RenderTexture}\n */\n getFilterTexture(input?: RenderTexture, resolution?: number): RenderTexture\n {\n if (typeof input === 'number')\n {\n const swap = input;\n\n input = resolution as any;\n resolution = swap;\n }\n\n input = input || this.activeState.renderTexture;\n\n const filterTexture = this.texturePool.getOptimalTexture(input.width, input.height, resolution || input.resolution);\n\n filterTexture.filterFrame = input.filterFrame;\n\n return filterTexture;\n }\n\n /**\n * Frees a render texture back into the pool.\n *\n * @param {PIXI.RenderTexture} renderTexture - The renderTarget to free\n */\n returnFilterTexture(renderTexture: RenderTexture): void\n {\n this.texturePool.returnTexture(renderTexture);\n }\n\n /**\n * Empties the texture pool.\n */\n emptyPool(): void\n {\n this.texturePool.clear(true);\n }\n\n /**\n * calls `texturePool.resize()`, affects fullScreen renderTextures\n */\n resize(): void\n {\n this.texturePool.setScreenSize(this.renderer.view);\n }\n}\n","import type { Renderer } from '../Renderer';\n\n/**\n * Base for a common object renderer that can be used as a\n * system renderer plugin.\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI\n */\nexport class ObjectRenderer\n{\n protected renderer: Renderer;\n /**\n * @param {PIXI.Renderer} renderer - The renderer this manager works for.\n */\n constructor(renderer: Renderer)\n {\n /**\n * The renderer this manager works for.\n *\n * @member {PIXI.Renderer}\n */\n this.renderer = renderer;\n }\n\n /**\n * Stub method that should be used to empty the current\n * batch by rendering objects now.\n */\n flush(): void\n {\n // flush!\n }\n\n /**\n * Generic destruction method that frees all resources. This\n * should be called by subclasses.\n */\n destroy(): void\n {\n this.renderer = null;\n }\n\n /**\n * Stub method that initializes any state required before\n * rendering starts. It is different from the `prerender`\n * signal, which occurs every frame, in that it is called\n * whenever an object requests _this_ renderer specifically.\n */\n start(): void\n {\n // set the shader..\n }\n\n /**\n * Stops the renderer. It should free up any state and\n * become dormant.\n */\n stop(): void\n {\n this.flush();\n }\n\n /**\n * Keeps the object to render. It doesn't have to be\n * rendered immediately.\n *\n * @param {PIXI.DisplayObject} object - The object to render.\n */\n render(_object: any): void // eslint-disable-line @typescript-eslint/explicit-module-boundary-types\n {\n // render the object\n }\n}\n","import { System } from '../System';\nimport { ObjectRenderer } from './ObjectRenderer';\n\nimport type { Renderer } from '../Renderer';\nimport type { BaseTexture } from '../textures/BaseTexture';\nimport type { BatchTextureArray } from './BatchTextureArray';\n/**\n * System plugin to the renderer to manage batching.\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI.systems\n */\nexport class BatchSystem extends System\n{\n public readonly emptyRenderer: ObjectRenderer;\n public currentRenderer: ObjectRenderer;\n\n /**\n * @param {PIXI.Renderer} renderer - The renderer this System works for.\n */\n constructor(renderer: Renderer)\n {\n super(renderer);\n\n /**\n * An empty renderer.\n *\n * @member {PIXI.ObjectRenderer}\n */\n this.emptyRenderer = new ObjectRenderer(renderer);\n\n /**\n * The currently active ObjectRenderer.\n *\n * @member {PIXI.ObjectRenderer}\n */\n this.currentRenderer = this.emptyRenderer;\n }\n\n /**\n * Changes the current renderer to the one given in parameter\n *\n * @param {PIXI.ObjectRenderer} objectRenderer - The object renderer to use.\n */\n setObjectRenderer(objectRenderer: ObjectRenderer): void\n {\n if (this.currentRenderer === objectRenderer)\n {\n return;\n }\n\n this.currentRenderer.stop();\n this.currentRenderer = objectRenderer;\n\n this.currentRenderer.start();\n }\n\n /**\n * This should be called if you wish to do some custom rendering\n * It will basically render anything that may be batched up such as sprites\n */\n flush(): void\n {\n this.setObjectRenderer(this.emptyRenderer);\n }\n\n /**\n * Reset the system to an empty renderer\n */\n reset(): void\n {\n this.setObjectRenderer(this.emptyRenderer);\n }\n\n /**\n * Handy function for batch renderers: copies bound textures in first maxTextures locations to array\n * sets actual _batchLocation for them\n *\n * @param {PIXI.BaseTexture[]} - arr copy destination\n * @param {number} maxTextures - number of copied elements\n */\n copyBoundTextures(arr: BaseTexture[], maxTextures: number): void\n {\n const { boundTextures } = this.renderer.texture;\n\n for (let i = maxTextures - 1; i >= 0; --i)\n {\n arr[i] = boundTextures[i] || null;\n if (arr[i])\n {\n arr[i]._batchLocation = i;\n }\n }\n }\n\n /**\n * Assigns batch locations to textures in array based on boundTextures state.\n * All textures in texArray should have `_batchEnabled = _batchId`,\n * and their count should be less than `maxTextures`.\n *\n * @param {PIXI.BatchTextureArray} texArray - textures to bound\n * @param {PIXI.BaseTexture[]} boundTextures - current state of bound textures\n * @param {number} batchId - marker for _batchEnabled param of textures in texArray\n * @param {number} maxTextures - number of texture locations to manipulate\n */\n boundArray(texArray: BatchTextureArray, boundTextures: Array,\n batchId: number, maxTextures: number): void\n {\n const { elements, ids, count } = texArray;\n let j = 0;\n\n for (let i = 0; i < count; i++)\n {\n const tex = elements[i];\n const loc = tex._batchLocation;\n\n if (loc >= 0 && loc < maxTextures\n && boundTextures[loc] === tex)\n {\n ids[i] = loc;\n continue;\n }\n\n while (j < maxTextures)\n {\n const bound = boundTextures[j];\n\n if (bound && bound._batchEnabled === batchId\n && bound._batchLocation === j)\n {\n j++;\n continue;\n }\n\n ids[i] = j;\n tex._batchLocation = j;\n boundTextures[j] = tex;\n break;\n }\n }\n }\n}\n","import { ENV } from '@pixi/constants';\nimport { System } from '../System';\nimport { settings } from '../settings';\n\nimport type { IRenderingContext } from '../IRenderingContext';\nimport type { Renderer } from '../Renderer';\n\nlet CONTEXT_UID_COUNTER = 0;\n\nexport interface ISupportDict {\n uint32Indices: boolean;\n}\n/**\n * System plugin to the renderer to manage the context.\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI.systems\n */\nexport class ContextSystem extends System\n{\n public webGLVersion: number;\n readonly supports: ISupportDict;\n\n protected CONTEXT_UID: number;\n protected gl: IRenderingContext;\n /* eslint-disable camelcase */\n extensions:\n {\n drawBuffers?: WEBGL_draw_buffers;\n depthTexture?: OES_texture_float;\n loseContext?: WEBGL_lose_context;\n vertexArrayObject?: OES_vertex_array_object;\n anisotropicFiltering?: EXT_texture_filter_anisotropic;\n uint32ElementIndex?: OES_element_index_uint;\n floatTexture?: OES_texture_float;\n floatTextureLinear?: OES_texture_float_linear;\n textureHalfFloat?: OES_texture_half_float;\n textureHalfFloatLinear?: OES_texture_half_float_linear;\n colorBufferFloat?: WEBGL_color_buffer_float;\n };\n /* eslint-enable camelcase */\n\n /**\n * @param {PIXI.Renderer} renderer - The renderer this System works for.\n */\n constructor(renderer: Renderer)\n {\n super(renderer);\n\n /**\n * Either 1 or 2 to reflect the WebGL version being used\n * @member {number}\n * @readonly\n */\n this.webGLVersion = 1;\n\n /**\n * Extensions being used\n * @member {object}\n * @readonly\n * @property {WEBGL_draw_buffers} drawBuffers - WebGL v1 extension\n * @property {WEBGL_depth_texture} depthTexture - WebGL v1 extension\n * @property {OES_texture_float} floatTexture - WebGL v1 extension\n * @property {WEBGL_lose_context} loseContext - WebGL v1 extension\n * @property {OES_vertex_array_object} vertexArrayObject - WebGL v1 extension\n * @property {EXT_texture_filter_anisotropic} anisotropicFiltering - WebGL v1 and v2 extension\n */\n this.extensions = {};\n\n /**\n * Features supported by current context\n * @member {object}\n * @private\n * @readonly\n * @property {boolean} uint32Indices - Supports of 32-bit indices buffer\n */\n this.supports = {\n uint32Indices: false,\n };\n\n // Bind functions\n this.handleContextLost = this.handleContextLost.bind(this);\n this.handleContextRestored = this.handleContextRestored.bind(this);\n\n (renderer.view as any).addEventListener('webglcontextlost', this.handleContextLost, false);\n renderer.view.addEventListener('webglcontextrestored', this.handleContextRestored, false);\n }\n\n /**\n * `true` if the context is lost\n * @member {boolean}\n * @readonly\n */\n get isLost(): boolean\n {\n return (!this.gl || this.gl.isContextLost());\n }\n\n /**\n * Handle the context change event\n * @param {WebGLRenderingContext} gl - new webgl context\n */\n protected contextChange(gl: IRenderingContext): void\n {\n this.gl = gl;\n this.renderer.gl = gl;\n this.renderer.CONTEXT_UID = CONTEXT_UID_COUNTER++;\n\n // restore a context if it was previously lost\n if (gl.isContextLost() && gl.getExtension('WEBGL_lose_context'))\n {\n gl.getExtension('WEBGL_lose_context').restoreContext();\n }\n }\n\n /**\n * Initialize the context\n *\n * @protected\n * @param {WebGLRenderingContext} gl - WebGL context\n */\n initFromContext(gl: IRenderingContext): void\n {\n this.gl = gl;\n this.validateContext(gl);\n this.renderer.gl = gl;\n this.renderer.CONTEXT_UID = CONTEXT_UID_COUNTER++;\n this.renderer.runners.contextChange.emit(gl);\n }\n\n /**\n * Initialize from context options\n *\n * @protected\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext\n * @param {object} options - context attributes\n */\n initFromOptions(options: WebGLContextAttributes): void\n {\n const gl = this.createContext(this.renderer.view, options);\n\n this.initFromContext(gl);\n }\n\n /**\n * Helper class to create a WebGL Context\n *\n * @param canvas {HTMLCanvasElement} the canvas element that we will get the context from\n * @param options {object} An options object that gets passed in to the canvas element containing the context attributes\n * @see https://developer.mozilla.org/en/docs/Web/API/HTMLCanvasElement/getContext\n * @return {WebGLRenderingContext} the WebGL context\n */\n createContext(canvas: HTMLCanvasElement, options: WebGLContextAttributes): IRenderingContext\n {\n let gl;\n\n if (settings.PREFER_ENV >= ENV.WEBGL2)\n {\n gl = canvas.getContext('webgl2', options);\n }\n\n if (gl)\n {\n this.webGLVersion = 2;\n }\n else\n {\n this.webGLVersion = 1;\n\n gl = canvas.getContext('webgl', options)\n || canvas.getContext('experimental-webgl', options);\n\n if (!gl)\n {\n // fail, not able to get a context\n throw new Error('This browser does not support WebGL. Try using the canvas renderer');\n }\n }\n\n this.gl = gl as IRenderingContext;\n\n this.getExtensions();\n\n return this.gl;\n }\n\n /**\n * Auto-populate the extensions\n *\n * @protected\n */\n protected getExtensions(): void\n {\n // time to set up default extensions that Pixi uses.\n const { gl } = this;\n\n if (this.webGLVersion === 1)\n {\n Object.assign(this.extensions, {\n drawBuffers: gl.getExtension('WEBGL_draw_buffers'),\n depthTexture: gl.getExtension('WEBGL_depth_texture'),\n loseContext: gl.getExtension('WEBGL_lose_context'),\n vertexArrayObject: gl.getExtension('OES_vertex_array_object')\n || gl.getExtension('MOZ_OES_vertex_array_object')\n || gl.getExtension('WEBKIT_OES_vertex_array_object'),\n anisotropicFiltering: gl.getExtension('EXT_texture_filter_anisotropic'),\n uint32ElementIndex: gl.getExtension('OES_element_index_uint'),\n // Floats and half-floats\n floatTexture: gl.getExtension('OES_texture_float'),\n floatTextureLinear: gl.getExtension('OES_texture_float_linear'),\n textureHalfFloat: gl.getExtension('OES_texture_half_float'),\n textureHalfFloatLinear: gl.getExtension('OES_texture_half_float_linear'),\n });\n }\n else if (this.webGLVersion === 2)\n {\n Object.assign(this.extensions, {\n anisotropicFiltering: gl.getExtension('EXT_texture_filter_anisotropic'),\n // Floats and half-floats\n colorBufferFloat: gl.getExtension('EXT_color_buffer_float'),\n floatTextureLinear: gl.getExtension('OES_texture_float_linear'),\n });\n }\n }\n\n /**\n * Handles a lost webgl context\n *\n * @protected\n * @param {WebGLContextEvent} event - The context lost event.\n */\n protected handleContextLost(event: WebGLContextEvent): void\n {\n event.preventDefault();\n }\n\n /**\n * Handles a restored webgl context\n *\n * @protected\n */\n protected handleContextRestored(): void\n {\n this.renderer.runners.contextChange.emit(this.gl);\n }\n\n destroy(): void\n {\n const view = this.renderer.view;\n\n // remove listeners\n (view as any).removeEventListener('webglcontextlost', this.handleContextLost);\n view.removeEventListener('webglcontextrestored', this.handleContextRestored);\n\n this.gl.useProgram(null);\n\n if (this.extensions.loseContext)\n {\n this.extensions.loseContext.loseContext();\n }\n }\n\n /**\n * Handle the post-render runner event\n *\n * @protected\n */\n protected postrender(): void\n {\n if (this.renderer.renderingToScreen)\n {\n this.gl.flush();\n }\n }\n\n /**\n * Validate context\n *\n * @protected\n * @param {WebGLRenderingContext} gl - Render context\n */\n protected validateContext(gl: IRenderingContext): void\n {\n const attributes = gl.getContextAttributes();\n\n // this is going to be fairly simple for now.. but at least we have room to grow!\n if (!attributes.stencil)\n {\n /* eslint-disable max-len, no-console */\n console.warn('Provided WebGL context does not have a stencil buffer, masks may not render correctly');\n /* eslint-enable max-len, no-console */\n }\n\n const hasuint32\n = ('WebGL2RenderingContext' in window && gl instanceof window.WebGL2RenderingContext)\n || !!(gl as WebGLRenderingContext).getExtension('OES_element_index_uint');\n\n this.supports.uint32Indices = hasuint32;\n\n if (!hasuint32)\n {\n /* eslint-disable max-len, no-console */\n console.warn('Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly');\n /* eslint-enable max-len, no-console */\n }\n }\n}\n","import { MSAA_QUALITY } from '@pixi/constants';\n\nimport type { Framebuffer } from './Framebuffer';\n\n/**\n * Internal framebuffer for WebGL context\n * @class\n * @memberof PIXI\n */\nexport class GLFramebuffer\n{\n public framebuffer: WebGLFramebuffer;\n public stencil: WebGLRenderbuffer;\n public multisample: MSAA_QUALITY;\n public msaaBuffer: WebGLRenderbuffer;\n public blitFramebuffer: Framebuffer;\n dirtyId: number;\n dirtyFormat: number;\n dirtySize: number;\n\n constructor(framebuffer: WebGLTexture)\n {\n /**\n * The WebGL framebuffer\n * @member {WebGLFramebuffer}\n */\n this.framebuffer = framebuffer;\n /**\n * stencil+depth , usually costs 32bits per pixel\n * @member {WebGLRenderbuffer}\n */\n this.stencil = null;\n /**\n * latest known version of framebuffer\n * @member {number}\n * @protected\n */\n this.dirtyId = 0;\n /**\n * latest known version of framebuffer format\n * @member {number}\n * @protected\n */\n this.dirtyFormat = 0;\n /**\n * latest known version of framebuffer size\n * @member {number}\n * @protected\n */\n this.dirtySize = 0;\n\n /**\n * Detected AA samples number\n * @member {PIXI.MSAA_QUALITY}\n */\n this.multisample = MSAA_QUALITY.NONE;\n\n /**\n * In case MSAA, we use this Renderbuffer instead of colorTextures[0] when we write info\n * @member {WebGLRenderbuffer}\n */\n this.msaaBuffer = null;\n\n /**\n * In case we use MSAA, this is actual framebuffer that has colorTextures[0]\n * The contents of that framebuffer are read when we use that renderTexture in sprites\n * @member {PIXI.Framebuffer}\n */\n this.blitFramebuffer = null;\n }\n}\n","import { System } from '../System';\nimport { Rectangle } from '@pixi/math';\nimport { ENV, BUFFER_BITS, MSAA_QUALITY } from '@pixi/constants';\nimport { settings } from '../settings';\nimport { Framebuffer } from './Framebuffer';\nimport { GLFramebuffer } from './GLFramebuffer';\n\nimport type { Renderer } from '../Renderer';\nimport type { IRenderingContext } from '../IRenderingContext';\n\nconst tempRectangle = new Rectangle();\n\n/**\n * System plugin to the renderer to manage framebuffers.\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI.systems\n */\nexport class FramebufferSystem extends System\n{\n public readonly managedFramebuffers: Array;\n public current: Framebuffer;\n public viewport: Rectangle;\n public hasMRT: boolean;\n public writeDepthTexture: boolean;\n protected CONTEXT_UID: number;\n protected gl: IRenderingContext;\n protected unknownFramebuffer: Framebuffer;\n protected msaaSamples: Array;\n\n /**\n * @param {PIXI.Renderer} renderer - The renderer this System works for.\n */\n constructor(renderer: Renderer)\n {\n super(renderer);\n\n /**\n * A list of managed framebuffers\n * @member {PIXI.Framebuffer[]}\n * @readonly\n */\n this.managedFramebuffers = [];\n\n /**\n * Framebuffer value that shows that we don't know what is bound\n * @member {Framebuffer}\n * @readonly\n */\n this.unknownFramebuffer = new Framebuffer(10, 10);\n\n this.msaaSamples = null;\n }\n\n /**\n * Sets up the renderer context and necessary buffers.\n */\n protected contextChange(): void\n {\n const gl = this.gl = this.renderer.gl;\n\n this.CONTEXT_UID = this.renderer.CONTEXT_UID;\n this.current = this.unknownFramebuffer;\n this.viewport = new Rectangle();\n this.hasMRT = true;\n this.writeDepthTexture = true;\n\n this.disposeAll(true);\n\n // webgl2\n if (this.renderer.context.webGLVersion === 1)\n {\n // webgl 1!\n let nativeDrawBuffersExtension = this.renderer.context.extensions.drawBuffers;\n let nativeDepthTextureExtension = this.renderer.context.extensions.depthTexture;\n\n if (settings.PREFER_ENV === ENV.WEBGL_LEGACY)\n {\n nativeDrawBuffersExtension = null;\n nativeDepthTextureExtension = null;\n }\n\n if (nativeDrawBuffersExtension)\n {\n gl.drawBuffers = (activeTextures: number[]): void =>\n nativeDrawBuffersExtension.drawBuffersWEBGL(activeTextures);\n }\n else\n {\n this.hasMRT = false;\n gl.drawBuffers = (): void =>\n {\n // empty\n };\n }\n\n if (!nativeDepthTextureExtension)\n {\n this.writeDepthTexture = false;\n }\n }\n else\n {\n // WebGL2\n // cache possible MSAA samples\n this.msaaSamples = gl.getInternalformatParameter(gl.RENDERBUFFER, gl.RGBA8, gl.SAMPLES);\n }\n }\n\n /**\n * Bind a framebuffer\n *\n * @param {PIXI.Framebuffer} framebuffer\n * @param {PIXI.Rectangle} [frame] frame, default is framebuffer size\n */\n bind(framebuffer?: Framebuffer, frame?: Rectangle): void\n {\n const { gl } = this;\n\n if (framebuffer)\n {\n // TODO caching layer!\n\n const fbo = framebuffer.glFramebuffers[this.CONTEXT_UID] || this.initFramebuffer(framebuffer);\n\n if (this.current !== framebuffer)\n {\n this.current = framebuffer;\n gl.bindFramebuffer(gl.FRAMEBUFFER, fbo.framebuffer);\n }\n // make sure all textures are unbound..\n\n // now check for updates...\n if (fbo.dirtyId !== framebuffer.dirtyId)\n {\n fbo.dirtyId = framebuffer.dirtyId;\n\n if (fbo.dirtyFormat !== framebuffer.dirtyFormat)\n {\n fbo.dirtyFormat = framebuffer.dirtyFormat;\n this.updateFramebuffer(framebuffer);\n }\n else if (fbo.dirtySize !== framebuffer.dirtySize)\n {\n fbo.dirtySize = framebuffer.dirtySize;\n this.resizeFramebuffer(framebuffer);\n }\n }\n\n for (let i = 0; i < framebuffer.colorTextures.length; i++)\n {\n const tex = framebuffer.colorTextures[i];\n\n this.renderer.texture.unbind(tex.parentTextureArray || tex);\n }\n\n if (framebuffer.depthTexture)\n {\n this.renderer.texture.unbind(framebuffer.depthTexture);\n }\n\n if (frame)\n {\n this.setViewport(frame.x, frame.y, frame.width, frame.height);\n }\n else\n {\n this.setViewport(0, 0, framebuffer.width, framebuffer.height);\n }\n }\n else\n {\n if (this.current)\n {\n this.current = null;\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n }\n\n if (frame)\n {\n this.setViewport(frame.x, frame.y, frame.width, frame.height);\n }\n else\n {\n this.setViewport(0, 0, this.renderer.width, this.renderer.height);\n }\n }\n }\n\n /**\n * Set the WebGLRenderingContext's viewport.\n *\n * @param {Number} x - X position of viewport\n * @param {Number} y - Y position of viewport\n * @param {Number} width - Width of viewport\n * @param {Number} height - Height of viewport\n */\n setViewport(x: number, y: number, width: number, height: number): void\n {\n const v = this.viewport;\n\n if (v.width !== width || v.height !== height || v.x !== x || v.y !== y)\n {\n v.x = x;\n v.y = y;\n v.width = width;\n v.height = height;\n\n this.gl.viewport(x, y, width, height);\n }\n }\n\n /**\n * Get the size of the current width and height. Returns object with `width` and `height` values.\n *\n * @member {object}\n * @readonly\n */\n get size(): { x: number; y: number; width: number; height: number }\n {\n if (this.current)\n {\n // TODO store temp\n return { x: 0, y: 0, width: this.current.width, height: this.current.height };\n }\n\n return { x: 0, y: 0, width: this.renderer.width, height: this.renderer.height };\n }\n\n /**\n * Clear the color of the context\n *\n * @param {Number} r - Red value from 0 to 1\n * @param {Number} g - Green value from 0 to 1\n * @param {Number} b - Blue value from 0 to 1\n * @param {Number} a - Alpha value from 0 to 1\n * @param {PIXI.BUFFER_BITS} [mask=BUFFER_BITS.COLOR | BUFFER_BITS.DEPTH] - Bitwise OR of masks\n * that indicate the buffers to be cleared, by default COLOR and DEPTH buffers.\n */\n clear(r: number, g: number, b: number, a: number, mask: BUFFER_BITS = BUFFER_BITS.COLOR | BUFFER_BITS.DEPTH): void\n {\n const { gl } = this;\n\n // TODO clear color can be set only one right?\n gl.clearColor(r, g, b, a);\n gl.clear(mask);\n }\n\n /**\n * Initialize framebuffer for this context\n *\n * @protected\n * @param {PIXI.Framebuffer} framebuffer\n * @returns {PIXI.GLFramebuffer} created GLFramebuffer\n */\n initFramebuffer(framebuffer: Framebuffer): GLFramebuffer\n {\n const { gl } = this;\n const fbo = new GLFramebuffer(gl.createFramebuffer());\n\n fbo.multisample = this.detectSamples(framebuffer.multisample);\n framebuffer.glFramebuffers[this.CONTEXT_UID] = fbo;\n\n this.managedFramebuffers.push(framebuffer);\n framebuffer.disposeRunner.add(this);\n\n return fbo;\n }\n\n /**\n * Resize the framebuffer\n *\n * @protected\n * @param {PIXI.Framebuffer} framebuffer\n */\n resizeFramebuffer(framebuffer: Framebuffer): void\n {\n const { gl } = this;\n\n const fbo = framebuffer.glFramebuffers[this.CONTEXT_UID];\n\n if (fbo.stencil)\n {\n gl.bindRenderbuffer(gl.RENDERBUFFER, fbo.stencil);\n gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, framebuffer.width, framebuffer.height);\n }\n\n const colorTextures = framebuffer.colorTextures;\n\n for (let i = 0; i < colorTextures.length; i++)\n {\n this.renderer.texture.bind(colorTextures[i], 0);\n }\n\n if (framebuffer.depthTexture)\n {\n this.renderer.texture.bind(framebuffer.depthTexture, 0);\n }\n }\n\n /**\n * Update the framebuffer\n *\n * @protected\n * @param {PIXI.Framebuffer} framebuffer\n */\n updateFramebuffer(framebuffer: Framebuffer): void\n {\n const { gl } = this;\n\n const fbo = framebuffer.glFramebuffers[this.CONTEXT_UID];\n\n // bind the color texture\n const colorTextures = framebuffer.colorTextures;\n\n let count = colorTextures.length;\n\n if (!gl.drawBuffers)\n {\n count = Math.min(count, 1);\n }\n\n if (fbo.multisample > 1)\n {\n fbo.msaaBuffer = gl.createRenderbuffer();\n gl.bindRenderbuffer(gl.RENDERBUFFER, fbo.msaaBuffer);\n gl.renderbufferStorageMultisample(gl.RENDERBUFFER, fbo.multisample,\n gl.RGBA8, framebuffer.width, framebuffer.height);\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, fbo.msaaBuffer);\n }\n\n const activeTextures = [];\n\n for (let i = 0; i < count; i++)\n {\n if (i === 0 && fbo.multisample > 1)\n {\n continue;\n }\n\n const texture = framebuffer.colorTextures[i];\n const parentTexture = texture.parentTextureArray || texture;\n\n this.renderer.texture.bind(parentTexture, 0);\n\n gl.framebufferTexture2D(gl.FRAMEBUFFER,\n gl.COLOR_ATTACHMENT0 + i,\n texture.target,\n parentTexture._glTextures[this.CONTEXT_UID].texture,\n 0);\n\n activeTextures.push(gl.COLOR_ATTACHMENT0 + i);\n }\n\n if (activeTextures.length > 1)\n {\n gl.drawBuffers(activeTextures);\n }\n\n if (framebuffer.depthTexture)\n {\n const writeDepthTexture = this.writeDepthTexture;\n\n if (writeDepthTexture)\n {\n const depthTexture = framebuffer.depthTexture;\n\n this.renderer.texture.bind(depthTexture, 0);\n\n gl.framebufferTexture2D(gl.FRAMEBUFFER,\n gl.DEPTH_ATTACHMENT,\n gl.TEXTURE_2D,\n depthTexture._glTextures[this.CONTEXT_UID].texture,\n 0);\n }\n }\n\n if (!fbo.stencil && (framebuffer.stencil || framebuffer.depth))\n {\n fbo.stencil = gl.createRenderbuffer();\n\n gl.bindRenderbuffer(gl.RENDERBUFFER, fbo.stencil);\n\n gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, framebuffer.width, framebuffer.height);\n // TODO.. this is depth AND stencil?\n if (!framebuffer.depthTexture)\n { // you can't have both, so one should take priority if enabled\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, fbo.stencil);\n }\n }\n }\n\n /**\n * Detects number of samples that is not more than a param but as close to it as possible\n *\n * @param {PIXI.MSAA_QUALITY} samples - number of samples\n * @returns {PIXI.MSAA_QUALITY} - recommended number of samples\n */\n protected detectSamples(samples: MSAA_QUALITY): MSAA_QUALITY\n {\n const { msaaSamples } = this;\n let res = MSAA_QUALITY.NONE;\n\n if (samples <= 1 || msaaSamples === null)\n {\n return res;\n }\n for (let i = 0; i < msaaSamples.length; i++)\n {\n if (msaaSamples[i] <= samples)\n {\n res = msaaSamples[i];\n break;\n }\n }\n\n if (res === 1)\n {\n res = MSAA_QUALITY.NONE;\n }\n\n return res;\n }\n\n /**\n * Only works with WebGL2\n *\n * blits framebuffer to another of the same or bigger size\n * after that target framebuffer is bound\n *\n * Fails with WebGL warning if blits multisample framebuffer to different size\n *\n * @param {PIXI.Framebuffer} [framebuffer] - by default it blits \"into itself\", from renderBuffer to texture.\n * @param {PIXI.Rectangle} [sourcePixels] - source rectangle in pixels\n * @param {PIXI.Rectangle} [destPixels] - dest rectangle in pixels, assumed to be the same as sourcePixels\n */\n public blit(framebuffer?: Framebuffer, sourcePixels?: Rectangle, destPixels?: Rectangle): void\n {\n const { current, renderer, gl, CONTEXT_UID } = this;\n\n if (renderer.context.webGLVersion !== 2)\n {\n return;\n }\n\n if (!current)\n {\n return;\n }\n const fbo = current.glFramebuffers[CONTEXT_UID];\n\n if (!fbo)\n {\n return;\n }\n if (!framebuffer)\n {\n if (fbo.multisample <= 1)\n {\n return;\n }\n if (!fbo.blitFramebuffer)\n {\n fbo.blitFramebuffer = new Framebuffer(current.width, current.height);\n fbo.blitFramebuffer.addColorTexture(0, current.colorTextures[0]);\n }\n framebuffer = fbo.blitFramebuffer;\n framebuffer.width = current.width;\n framebuffer.height = current.height;\n }\n\n if (!sourcePixels)\n {\n sourcePixels = tempRectangle;\n sourcePixels.width = current.width;\n sourcePixels.height = current.height;\n }\n if (!destPixels)\n {\n destPixels = sourcePixels;\n }\n\n const sameSize = sourcePixels.width === destPixels.width && sourcePixels.height === destPixels.height;\n\n this.bind(framebuffer);\n gl.bindFramebuffer(gl.READ_FRAMEBUFFER, fbo.framebuffer);\n gl.blitFramebuffer(sourcePixels.x, sourcePixels.y, sourcePixels.width, sourcePixels.height,\n destPixels.x, destPixels.y, destPixels.width, destPixels.height,\n gl.COLOR_BUFFER_BIT, sameSize ? gl.NEAREST : gl.LINEAR\n );\n }\n\n /**\n * Disposes framebuffer\n * @param {PIXI.Framebuffer} framebuffer - framebuffer that has to be disposed of\n * @param {boolean} [contextLost=false] - If context was lost, we suppress all delete function calls\n */\n disposeFramebuffer(framebuffer: Framebuffer, contextLost?: boolean): void\n {\n const fbo = framebuffer.glFramebuffers[this.CONTEXT_UID];\n const gl = this.gl;\n\n if (!fbo)\n {\n return;\n }\n\n delete framebuffer.glFramebuffers[this.CONTEXT_UID];\n\n const index = this.managedFramebuffers.indexOf(framebuffer);\n\n if (index >= 0)\n {\n this.managedFramebuffers.splice(index, 1);\n }\n\n framebuffer.disposeRunner.remove(this);\n\n if (!contextLost)\n {\n gl.deleteFramebuffer(fbo.framebuffer);\n\n if (fbo.stencil)\n {\n gl.deleteRenderbuffer(fbo.stencil);\n }\n }\n }\n\n /**\n * Disposes all framebuffers, but not textures bound to them\n * @param {boolean} [contextLost=false] - If context was lost, we suppress all delete function calls\n */\n disposeAll(contextLost?: boolean): void\n {\n const list = this.managedFramebuffers;\n\n (this.managedFramebuffers as any) = [];\n\n for (let i = 0; i < list.length; i++)\n {\n this.disposeFramebuffer(list[i], contextLost);\n }\n }\n\n /**\n * Forcing creation of stencil buffer for current framebuffer, if it wasn't done before.\n * Used by MaskSystem, when its time to use stencil mask for Graphics element.\n *\n * Its an alternative for public lazy `framebuffer.enableStencil`, in case we need stencil without rebind.\n *\n * @private\n */\n forceStencil(): void\n {\n const framebuffer = this.current;\n\n if (!framebuffer)\n {\n return;\n }\n\n const fbo = framebuffer.glFramebuffers[this.CONTEXT_UID];\n\n if (!fbo || fbo.stencil)\n {\n return;\n }\n framebuffer.enableStencil();\n\n const w = framebuffer.width;\n const h = framebuffer.height;\n const gl = this.gl;\n const stencil = gl.createRenderbuffer();\n\n gl.bindRenderbuffer(gl.RENDERBUFFER, stencil);\n gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, w, h);\n\n fbo.stencil = stencil;\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, stencil);\n }\n\n /**\n * resets framebuffer stored state, binds screen framebuffer\n *\n * should be called before renderTexture reset()\n */\n reset(): void\n {\n this.current = this.unknownFramebuffer;\n this.viewport = new Rectangle();\n }\n}\n","export class GLBuffer\n{\n buffer: WebGLBuffer;\n updateID: number;\n byteLength: number;\n refCount: number;\n\n constructor(buffer?: WebGLBuffer)\n {\n this.buffer = buffer || null;\n this.updateID = -1;\n this.byteLength = -1;\n this.refCount = 0;\n }\n}\n","import { System } from '../System';\nimport { GLBuffer } from './GLBuffer';\nimport { ENV } from '@pixi/constants';\nimport { settings } from '../settings';\n\nimport type { DRAW_MODES } from '@pixi/constants';\nimport type { Renderer } from '../Renderer';\nimport type { IRenderingContext } from '../IRenderingContext';\nimport type { Geometry } from './Geometry';\nimport type { Shader } from '../shader/Shader';\nimport type { Program } from '../shader/Program';\nimport type { Buffer } from './Buffer';\nimport type { Dict } from '@pixi/utils';\n\nconst byteSizeMap: {[key: number]: number} = { 5126: 4, 5123: 2, 5121: 1 };\n\n/**\n * System plugin to the renderer to manage geometry.\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI.systems\n */\nexport class GeometrySystem extends System\n{\n public hasVao: boolean;\n public hasInstance: boolean;\n public canUseUInt32ElementIndex: boolean;\n protected CONTEXT_UID: number;\n protected gl: IRenderingContext;\n protected _activeGeometry: Geometry;\n protected _activeVao: WebGLVertexArrayObject;\n protected _boundBuffer: GLBuffer;\n readonly managedGeometries: {[key: number]: Geometry};\n readonly managedBuffers: {[key: number]: Buffer};\n\n /**\n * @param {PIXI.Renderer} renderer - The renderer this System works for.\n */\n constructor(renderer: Renderer)\n {\n super(renderer);\n\n this._activeGeometry = null;\n this._activeVao = null;\n\n /**\n * `true` if we has `*_vertex_array_object` extension\n * @member {boolean}\n * @readonly\n */\n this.hasVao = true;\n\n /**\n * `true` if has `ANGLE_instanced_arrays` extension\n * @member {boolean}\n * @readonly\n */\n this.hasInstance = true;\n\n /**\n * `true` if support `gl.UNSIGNED_INT` in `gl.drawElements` or `gl.drawElementsInstanced`\n * @member {boolean}\n * @readonly\n */\n this.canUseUInt32ElementIndex = false;\n\n /**\n * Cache for all geometries by id, used in case renderer gets destroyed or for profiling\n * @member {object}\n * @readonly\n */\n this.managedGeometries = {};\n\n /**\n * Cache for all buffers by id, used in case renderer gets destroyed or for profiling\n * @member {object}\n * @readonly\n */\n this.managedBuffers = {};\n }\n\n /**\n * Sets up the renderer context and necessary buffers.\n */\n protected contextChange(): void\n {\n this.disposeAll(true);\n\n const gl = this.gl = this.renderer.gl;\n const context = this.renderer.context;\n\n this.CONTEXT_UID = this.renderer.CONTEXT_UID;\n\n // webgl2\n if (!gl.createVertexArray)\n {\n // webgl 1!\n let nativeVaoExtension = this.renderer.context.extensions.vertexArrayObject;\n\n if (settings.PREFER_ENV === ENV.WEBGL_LEGACY)\n {\n nativeVaoExtension = null;\n }\n\n if (nativeVaoExtension)\n {\n gl.createVertexArray = (): WebGLVertexArrayObject =>\n nativeVaoExtension.createVertexArrayOES();\n\n gl.bindVertexArray = (vao): void =>\n nativeVaoExtension.bindVertexArrayOES(vao);\n\n gl.deleteVertexArray = (vao): void =>\n nativeVaoExtension.deleteVertexArrayOES(vao);\n }\n else\n {\n this.hasVao = false;\n gl.createVertexArray = (): WebGLVertexArrayObject =>\n null;\n\n gl.bindVertexArray = (): void =>\n null;\n\n gl.deleteVertexArray = (): void =>\n null;\n }\n }\n\n if (!gl.vertexAttribDivisor)\n {\n const instanceExt = gl.getExtension('ANGLE_instanced_arrays');\n\n if (instanceExt)\n {\n gl.vertexAttribDivisor = (a, b): void =>\n instanceExt.vertexAttribDivisorANGLE(a, b);\n\n gl.drawElementsInstanced = (a, b, c, d, e): void =>\n instanceExt.drawElementsInstancedANGLE(a, b, c, d, e);\n\n gl.drawArraysInstanced = (a, b, c, d): void =>\n instanceExt.drawArraysInstancedANGLE(a, b, c, d);\n }\n else\n {\n this.hasInstance = false;\n }\n }\n\n this.canUseUInt32ElementIndex = context.webGLVersion === 2 || !!context.extensions.uint32ElementIndex;\n }\n\n /**\n * Binds geometry so that is can be drawn. Creating a Vao if required\n *\n * @param {PIXI.Geometry} geometry - instance of geometry to bind\n * @param {PIXI.Shader} [shader] - instance of shader to use vao for\n */\n bind(geometry?: Geometry, shader?: Shader): void\n {\n shader = shader || this.renderer.shader.shader;\n\n const { gl } = this;\n\n // not sure the best way to address this..\n // currently different shaders require different VAOs for the same geometry\n // Still mulling over the best way to solve this one..\n // will likely need to modify the shader attribute locations at run time!\n let vaos = geometry.glVertexArrayObjects[this.CONTEXT_UID];\n\n if (!vaos)\n {\n this.managedGeometries[geometry.id] = geometry;\n geometry.disposeRunner.add(this);\n geometry.glVertexArrayObjects[this.CONTEXT_UID] = vaos = {};\n }\n\n const vao = vaos[shader.program.id] || this.initGeometryVao(geometry, shader.program);\n\n this._activeGeometry = geometry;\n\n if (this._activeVao !== vao)\n {\n this._activeVao = vao;\n\n if (this.hasVao)\n {\n gl.bindVertexArray(vao);\n }\n else\n {\n this.activateVao(geometry, shader.program);\n }\n }\n\n // TODO - optimise later!\n // don't need to loop through if nothing changed!\n // maybe look to add an 'autoupdate' to geometry?\n this.updateBuffers();\n }\n\n /**\n * Reset and unbind any active VAO and geometry\n */\n reset(): void\n {\n this.unbind();\n }\n\n /**\n * Update buffers\n * @protected\n */\n updateBuffers(): void\n {\n const geometry = this._activeGeometry;\n const { gl } = this;\n\n for (let i = 0; i < geometry.buffers.length; i++)\n {\n const buffer = geometry.buffers[i];\n\n const glBuffer = buffer._glBuffers[this.CONTEXT_UID];\n\n if (buffer._updateID !== glBuffer.updateID)\n {\n glBuffer.updateID = buffer._updateID;\n\n // TODO can cache this on buffer! maybe added a getter / setter?\n const type = buffer.index ? gl.ELEMENT_ARRAY_BUFFER : gl.ARRAY_BUFFER;\n\n // TODO this could change if the VAO changes...\n // need to come up with a better way to cache..\n // if (this.boundBuffers[type] !== glBuffer)\n // {\n // this.boundBuffers[type] = glBuffer;\n gl.bindBuffer(type, glBuffer.buffer);\n // }\n\n this._boundBuffer = glBuffer;\n\n if (glBuffer.byteLength >= buffer.data.byteLength)\n {\n // offset is always zero for now!\n gl.bufferSubData(type, 0, buffer.data);\n }\n else\n {\n const drawType = buffer.static ? gl.STATIC_DRAW : gl.DYNAMIC_DRAW;\n\n glBuffer.byteLength = buffer.data.byteLength;\n gl.bufferData(type, buffer.data, drawType);\n }\n }\n }\n }\n\n /**\n * Check compability between a geometry and a program\n * @protected\n * @param {PIXI.Geometry} geometry - Geometry instance\n * @param {PIXI.Program} program - Program instance\n */\n protected checkCompatibility(geometry: Geometry, program: Program): void\n {\n // geometry must have at least all the attributes that the shader requires.\n const geometryAttributes = geometry.attributes;\n const shaderAttributes = program.attributeData;\n\n for (const j in shaderAttributes)\n {\n if (!geometryAttributes[j])\n {\n throw new Error(`shader and geometry incompatible, geometry missing the \"${j}\" attribute`);\n }\n }\n }\n\n /**\n * Takes a geometry and program and generates a unique signature for them.\n *\n * @param {PIXI.Geometry} geometry - to get signature from\n * @param {PIXI.Program} program - to test geometry against\n * @returns {String} Unique signature of the geometry and program\n * @protected\n */\n protected getSignature(geometry: Geometry, program: Program): string\n {\n const attribs = geometry.attributes;\n const shaderAttributes = program.attributeData;\n\n const strings = ['g', geometry.id];\n\n for (const i in attribs)\n {\n if (shaderAttributes[i])\n {\n strings.push(i);\n }\n }\n\n return strings.join('-');\n }\n\n /**\n * Creates or gets Vao with the same structure as the geometry and stores it on the geometry.\n * If vao is created, it is bound automatically.\n *\n * @protected\n * @param {PIXI.Geometry} geometry - Instance of geometry to to generate Vao for\n * @param {PIXI.Program} program - Instance of program\n */\n protected initGeometryVao(geometry: Geometry, program: Program): WebGLVertexArrayObject\n {\n this.checkCompatibility(geometry, program);\n\n const gl = this.gl;\n const CONTEXT_UID = this.CONTEXT_UID;\n\n const signature = this.getSignature(geometry, program);\n\n const vaoObjectHash = geometry.glVertexArrayObjects[this.CONTEXT_UID];\n\n let vao = vaoObjectHash[signature];\n\n if (vao)\n {\n // this will give us easy access to the vao\n vaoObjectHash[program.id] = vao;\n\n return vao;\n }\n\n const buffers = geometry.buffers;\n const attributes = geometry.attributes;\n const tempStride: Dict = {};\n const tempStart: Dict = {};\n\n for (const j in buffers)\n {\n tempStride[j] = 0;\n tempStart[j] = 0;\n }\n\n for (const j in attributes)\n {\n if (!attributes[j].size && program.attributeData[j])\n {\n attributes[j].size = program.attributeData[j].size;\n }\n else if (!attributes[j].size)\n {\n console.warn(`PIXI Geometry attribute '${j}' size cannot be determined (likely the bound shader does not have the attribute)`); // eslint-disable-line\n }\n\n tempStride[attributes[j].buffer] += attributes[j].size * byteSizeMap[attributes[j].type];\n }\n\n for (const j in attributes)\n {\n const attribute = attributes[j];\n const attribSize = attribute.size;\n\n if (attribute.stride === undefined)\n {\n if (tempStride[attribute.buffer] === attribSize * byteSizeMap[attribute.type])\n {\n attribute.stride = 0;\n }\n else\n {\n attribute.stride = tempStride[attribute.buffer];\n }\n }\n\n if (attribute.start === undefined)\n {\n attribute.start = tempStart[attribute.buffer];\n\n tempStart[attribute.buffer] += attribSize * byteSizeMap[attribute.type];\n }\n }\n\n vao = gl.createVertexArray();\n\n gl.bindVertexArray(vao);\n\n // first update - and create the buffers!\n // only create a gl buffer if it actually gets\n for (let i = 0; i < buffers.length; i++)\n {\n const buffer = buffers[i];\n\n if (!buffer._glBuffers[CONTEXT_UID])\n {\n buffer._glBuffers[CONTEXT_UID] = new GLBuffer(gl.createBuffer());\n this.managedBuffers[buffer.id] = buffer;\n buffer.disposeRunner.add(this);\n }\n\n buffer._glBuffers[CONTEXT_UID].refCount++;\n }\n\n // TODO - maybe make this a data object?\n // lets wait to see if we need to first!\n\n this.activateVao(geometry, program);\n\n this._activeVao = vao;\n\n // add it to the cache!\n vaoObjectHash[program.id] = vao;\n vaoObjectHash[signature] = vao;\n\n return vao;\n }\n\n /**\n * Disposes buffer\n * @param {PIXI.Buffer} buffer - buffer with data\n * @param {boolean} [contextLost=false] - If context was lost, we suppress deleteVertexArray\n */\n disposeBuffer(buffer: Buffer, contextLost?: boolean): void\n {\n if (!this.managedBuffers[buffer.id])\n {\n return;\n }\n\n delete this.managedBuffers[buffer.id];\n\n const glBuffer = buffer._glBuffers[this.CONTEXT_UID];\n const gl = this.gl;\n\n buffer.disposeRunner.remove(this);\n\n if (!glBuffer)\n {\n return;\n }\n\n if (!contextLost)\n {\n gl.deleteBuffer(glBuffer.buffer);\n }\n\n delete buffer._glBuffers[this.CONTEXT_UID];\n }\n\n /**\n * Disposes geometry\n * @param {PIXI.Geometry} geometry - Geometry with buffers. Only VAO will be disposed\n * @param {boolean} [contextLost=false] - If context was lost, we suppress deleteVertexArray\n */\n disposeGeometry(geometry: Geometry, contextLost?: boolean): void\n {\n if (!this.managedGeometries[geometry.id])\n {\n return;\n }\n\n delete this.managedGeometries[geometry.id];\n\n const vaos = geometry.glVertexArrayObjects[this.CONTEXT_UID];\n const gl = this.gl;\n const buffers = geometry.buffers;\n\n geometry.disposeRunner.remove(this);\n\n if (!vaos)\n {\n return;\n }\n\n for (let i = 0; i < buffers.length; i++)\n {\n const buf = buffers[i]._glBuffers[this.CONTEXT_UID];\n\n buf.refCount--;\n if (buf.refCount === 0 && !contextLost)\n {\n this.disposeBuffer(buffers[i], contextLost);\n }\n }\n\n if (!contextLost)\n {\n for (const vaoId in vaos)\n {\n // delete only signatures, everything else are copies\n if (vaoId[0] === 'g')\n {\n const vao = vaos[vaoId];\n\n if (this._activeVao === vao)\n {\n this.unbind();\n }\n gl.deleteVertexArray(vao);\n }\n }\n }\n\n delete geometry.glVertexArrayObjects[this.CONTEXT_UID];\n }\n\n /**\n * dispose all WebGL resources of all managed geometries and buffers\n * @param {boolean} [contextLost=false] - If context was lost, we suppress `gl.delete` calls\n */\n disposeAll(contextLost?: boolean): void\n {\n let all: Array = Object.keys(this.managedGeometries);\n\n for (let i = 0; i < all.length; i++)\n {\n this.disposeGeometry(this.managedGeometries[all[i]], contextLost);\n }\n all = Object.keys(this.managedBuffers);\n for (let i = 0; i < all.length; i++)\n {\n this.disposeBuffer(this.managedBuffers[all[i]], contextLost);\n }\n }\n\n /**\n * Activate vertex array object\n *\n * @protected\n * @param {PIXI.Geometry} geometry - Geometry instance\n * @param {PIXI.Program} program - Shader program instance\n */\n protected activateVao(geometry: Geometry, program: Program): void\n {\n const gl = this.gl;\n const CONTEXT_UID = this.CONTEXT_UID;\n const buffers = geometry.buffers;\n const attributes = geometry.attributes;\n\n if (geometry.indexBuffer)\n {\n // first update the index buffer if we have one..\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, geometry.indexBuffer._glBuffers[CONTEXT_UID].buffer);\n }\n\n let lastBuffer = null;\n\n // add a new one!\n for (const j in attributes)\n {\n const attribute = attributes[j];\n const buffer = buffers[attribute.buffer];\n const glBuffer = buffer._glBuffers[CONTEXT_UID];\n\n if (program.attributeData[j])\n {\n if (lastBuffer !== glBuffer)\n {\n gl.bindBuffer(gl.ARRAY_BUFFER, glBuffer.buffer);\n\n lastBuffer = glBuffer;\n }\n\n const location = program.attributeData[j].location;\n\n // TODO introduce state again\n // we can optimise this for older devices that have no VAOs\n gl.enableVertexAttribArray(location);\n\n gl.vertexAttribPointer(location,\n attribute.size,\n attribute.type || gl.FLOAT,\n attribute.normalized,\n attribute.stride,\n attribute.start);\n\n if (attribute.instance)\n {\n // TODO calculate instance count based of this...\n if (this.hasInstance)\n {\n gl.vertexAttribDivisor(location, 1);\n }\n else\n {\n throw new Error('geometry error, GPU Instancing is not supported on this device');\n }\n }\n }\n }\n }\n\n /**\n * Draw the geometry\n *\n * @param {Number} type - the type primitive to render\n * @param {Number} [size] - the number of elements to be rendered\n * @param {Number} [start] - Starting index\n * @param {Number} [instanceCount] - the number of instances of the set of elements to execute\n */\n draw(type: DRAW_MODES, size?: number, start?: number, instanceCount?: number): this\n {\n const { gl } = this;\n const geometry = this._activeGeometry;\n\n // TODO.. this should not change so maybe cache the function?\n\n if (geometry.indexBuffer)\n {\n const byteSize = geometry.indexBuffer.data.BYTES_PER_ELEMENT;\n const glType = byteSize === 2 ? gl.UNSIGNED_SHORT : gl.UNSIGNED_INT;\n\n if (byteSize === 2 || (byteSize === 4 && this.canUseUInt32ElementIndex))\n {\n if (geometry.instanced)\n {\n /* eslint-disable max-len */\n gl.drawElementsInstanced(type, size || geometry.indexBuffer.data.length, glType, (start || 0) * byteSize, instanceCount || 1);\n /* eslint-enable max-len */\n }\n else\n {\n /* eslint-disable max-len */\n gl.drawElements(type, size || geometry.indexBuffer.data.length, glType, (start || 0) * byteSize);\n /* eslint-enable max-len */\n }\n }\n else\n {\n console.warn('unsupported index buffer type: uint32');\n }\n }\n else if (geometry.instanced)\n {\n // TODO need a better way to calculate size..\n gl.drawArraysInstanced(type, start, size || geometry.getSize(), instanceCount || 1);\n }\n else\n {\n gl.drawArrays(type, start, size || geometry.getSize());\n }\n\n return this;\n }\n\n /**\n * Unbind/reset everything\n * @protected\n */\n protected unbind(): void\n {\n this.gl.bindVertexArray(null);\n this._activeVao = null;\n this._activeGeometry = null;\n }\n}\n","import { MASK_TYPES } from '@pixi/constants';\n\nimport type { Rectangle, Matrix } from '@pixi/math';\nimport type { IFilterTarget } from '../filters/IFilterTarget';\nimport type { Renderer } from '../Renderer';\n\nexport interface IMaskTarget extends IFilterTarget\n{\n renderable: boolean;\n isSprite?: boolean;\n worldTransform: Matrix;\n isFastRect?(): boolean;\n getBounds(skipUpdate?: boolean): Rectangle;\n render(renderer: Renderer): void;\n}\n/**\n * Component for masked elements\n *\n * Holds mask mode and temporary data about current mask\n *\n * @class\n * @memberof PIXI\n */\nexport class MaskData\n{\n public type: MASK_TYPES;\n public autoDetect: boolean;\n public maskObject: IMaskTarget;\n public pooled: boolean;\n public isMaskData: true;\n _stencilCounter: number;\n _scissorCounter: number;\n _scissorRect: Rectangle;\n _target: IMaskTarget;\n\n /**\n * Create MaskData\n *\n * @param {PIXI.DisplayObject} [maskObject=null] - object that describes the mask\n */\n constructor(maskObject: IMaskTarget = null)\n {\n /**\n * Mask type\n * @member {PIXI.MASK_TYPES}\n */\n this.type = MASK_TYPES.NONE;\n\n /**\n * Whether we know the mask type beforehand\n * @member {boolean}\n * @default true\n */\n this.autoDetect = true;\n\n /**\n * Which element we use to mask\n * @member {PIXI.DisplayObject}\n */\n this.maskObject = maskObject || null;\n\n /**\n * Whether it belongs to MaskSystem pool\n * @member {boolean}\n */\n this.pooled = false;\n\n /**\n * Indicator of the type\n * @member {boolean}\n */\n this.isMaskData = true;\n\n /**\n * Stencil counter above the mask in stack\n * @member {number}\n * @private\n */\n this._stencilCounter = 0;\n /**\n * Scissor counter above the mask in stack\n * @member {number}\n * @private\n */\n this._scissorCounter = 0;\n\n /**\n * Scissor operation above the mask in stack.\n * Null if _scissorCounter is zero, rectangle instance if positive.\n * @member {PIXI.Rectangle}\n */\n this._scissorRect = null;\n\n /**\n * Targeted element. Temporary variable set by MaskSystem\n * @member {PIXI.DisplayObject}\n * @private\n */\n this._target = null;\n }\n\n /**\n * resets the mask data after popMask()\n */\n reset(): void\n {\n if (this.pooled)\n {\n this.maskObject = null;\n\n this.type = MASK_TYPES.NONE;\n\n this.autoDetect = true;\n }\n\n this._target = null;\n }\n\n /**\n * copies counters from maskData above, called from pushMask()\n * @param {PIXI.MaskData|null} maskAbove\n */\n copyCountersOrReset(maskAbove?: MaskData): void\n {\n if (maskAbove)\n {\n this._stencilCounter = maskAbove._stencilCounter;\n this._scissorCounter = maskAbove._scissorCounter;\n this._scissorRect = maskAbove._scissorRect;\n }\n else\n {\n this._stencilCounter = 0;\n this._scissorCounter = 0;\n this._scissorRect = null;\n }\n }\n}\n","import type { Dict } from '@pixi/utils';\n\n/**\n * @private\n * @param gl {WebGLRenderingContext} The current WebGL context {WebGLProgram}\n * @param type {Number} the type, can be either VERTEX_SHADER or FRAGMENT_SHADER\n * @param src {string} The vertex shader source as an array of strings.\n * @return {WebGLShader} the shader\n */\nfunction compileShader(gl: WebGLRenderingContextBase, type: number, src: string): WebGLShader\n{\n const shader = gl.createShader(type);\n\n gl.shaderSource(shader, src);\n gl.compileShader(shader);\n\n return shader;\n}\n\n/**\n * @method compileProgram\n * @private\n * @memberof PIXI.glCore.shader\n * @param gl {WebGLRenderingContext} The current WebGL context {WebGLProgram}\n * @param vertexSrc {string|string[]} The vertex shader source as an array of strings.\n * @param fragmentSrc {string|string[]} The fragment shader source as an array of strings.\n * @param attributeLocations {Object} An attribute location map that lets you manually set the attribute locations\n * @return {WebGLProgram} the shader program\n */\nexport function compileProgram(gl: WebGLRenderingContextBase, vertexSrc: string, fragmentSrc: string,\n attributeLocations?: Dict): WebGLProgram\n{\n const glVertShader = compileShader(gl, gl.VERTEX_SHADER, vertexSrc);\n const glFragShader = compileShader(gl, gl.FRAGMENT_SHADER, fragmentSrc);\n\n let program = gl.createProgram();\n\n gl.attachShader(program, glVertShader);\n gl.attachShader(program, glFragShader);\n\n // optionally, set the attributes manually for the program rather than letting WebGL decide..\n if (attributeLocations)\n {\n for (const i in attributeLocations)\n {\n gl.bindAttribLocation(program, attributeLocations[i], i);\n }\n }\n\n gl.linkProgram(program);\n\n // if linking fails, then log and cleanup\n if (!gl.getProgramParameter(program, gl.LINK_STATUS))\n {\n if (!gl.getShaderParameter(glVertShader, gl.COMPILE_STATUS))\n {\n console.warn(vertexSrc);\n console.error(gl.getShaderInfoLog(glVertShader));\n }\n\n if (!gl.getShaderParameter(glFragShader, gl.COMPILE_STATUS))\n {\n console.warn(fragmentSrc);\n console.error(gl.getShaderInfoLog(glFragShader));\n }\n\n console.error('Pixi.js Error: Could not initialize shader.');\n console.error('gl.VALIDATE_STATUS', gl.getProgramParameter(program, gl.VALIDATE_STATUS));\n console.error('gl.getError()', gl.getError());\n\n // if there is a program info log, log it\n if (gl.getProgramInfoLog(program) !== '')\n {\n console.warn('Pixi.js Warning: gl.getProgramInfoLog()', gl.getProgramInfoLog(program));\n }\n\n gl.deleteProgram(program);\n program = null;\n }\n\n // clean up some shaders\n gl.deleteShader(glVertShader);\n gl.deleteShader(glFragShader);\n\n return program;\n}\n","function booleanArray(size: number): Array\n{\n const array = new Array(size);\n\n for (let i = 0; i < array.length; i++)\n {\n array[i] = false;\n }\n\n return array;\n}\n\n/**\n * @method defaultValue\n * @memberof PIXI.glCore.shader\n * @param type {String} Type of value\n * @param size {Number}\n * @private\n */\nexport function defaultValue(type: string, size: number): number|Float32Array|Int32Array|boolean|boolean[]\n{\n switch (type)\n {\n case 'float':\n return 0;\n\n case 'vec2':\n return new Float32Array(2 * size);\n\n case 'vec3':\n return new Float32Array(3 * size);\n\n case 'vec4':\n return new Float32Array(4 * size);\n\n case 'int':\n case 'sampler2D':\n case 'sampler2DArray':\n return 0;\n\n case 'ivec2':\n return new Int32Array(2 * size);\n\n case 'ivec3':\n return new Int32Array(3 * size);\n\n case 'ivec4':\n return new Int32Array(4 * size);\n\n case 'bool':\n return false;\n\n case 'bvec2':\n\n return booleanArray(2 * size);\n\n case 'bvec3':\n return booleanArray(3 * size);\n\n case 'bvec4':\n return booleanArray(4 * size);\n\n case 'mat2':\n return new Float32Array([1, 0,\n 0, 1]);\n\n case 'mat3':\n return new Float32Array([1, 0, 0,\n 0, 1, 0,\n 0, 0, 1]);\n\n case 'mat4':\n return new Float32Array([1, 0, 0, 0,\n 0, 1, 0, 0,\n 0, 0, 1, 0,\n 0, 0, 0, 1]);\n }\n\n return null;\n}\n","import { settings } from '../../settings';\nimport { ENV } from '@pixi/constants';\n\nconst unknownContext = {};\nlet context: WebGLRenderingContext | WebGL2RenderingContext = unknownContext as any;\n\n/**\n * returns a little WebGL context to use for program inspection.\n *\n * @static\n * @private\n * @returns {WebGLRenderingContext} a gl context to test with\n */\nexport function getTestContext(): WebGLRenderingContext | WebGL2RenderingContext\n{\n if (context === unknownContext || (context && context.isContextLost()))\n {\n const canvas = document.createElement('canvas');\n\n let gl: WebGLRenderingContext | WebGL2RenderingContext;\n\n if (settings.PREFER_ENV >= ENV.WEBGL2)\n {\n gl = canvas.getContext('webgl2', {});\n }\n\n if (!gl)\n {\n gl = canvas.getContext('webgl', {})\n || (canvas.getContext('experimental-webgl', {}) as WebGLRenderingContext);\n\n if (!gl)\n {\n // fail, not able to get a context\n gl = null;\n }\n else\n {\n // for shader testing..\n gl.getExtension('WEBGL_draw_buffers');\n }\n }\n\n context = gl;\n }\n\n return context;\n}\n","import { getTestContext } from './getTestContext';\nimport { PRECISION } from '@pixi/constants';\n\nlet maxFragmentPrecision: string;\n\nexport function getMaxFragmentPrecision(): string\n{\n if (!maxFragmentPrecision)\n {\n maxFragmentPrecision = PRECISION.MEDIUM;\n const gl = getTestContext();\n\n if (gl)\n {\n if (gl.getShaderPrecisionFormat)\n {\n const shaderFragment = gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT);\n\n maxFragmentPrecision = shaderFragment.precision ? PRECISION.HIGH : PRECISION.MEDIUM;\n }\n }\n }\n\n return maxFragmentPrecision;\n}\n","import { PRECISION } from '@pixi/constants';\n\n/**\n * Sets the float precision on the shader, ensuring the device supports the request precision.\n * If the precision is already present, it just ensures that the device is able to handle it.\n *\n * @private\n * @param {string} src - The shader source\n * @param {string} requestedPrecision - The request float precision of the shader. Options are 'lowp', 'mediump' or 'highp'.\n * @param {string} maxSupportedPrecision - The maximum precision the shader supports.\n *\n * @return {string} modified shader source\n */\nexport function setPrecision(src: string, requestedPrecision: string, maxSupportedPrecision: string): string\n{\n if (src.substring(0, 9) !== 'precision')\n {\n // no precision supplied, so PixiJS will add the requested level.\n let precision = requestedPrecision;\n\n // If highp is requested but not supported, downgrade precision to a level all devices support.\n if (requestedPrecision === PRECISION.HIGH && maxSupportedPrecision !== PRECISION.HIGH)\n {\n precision = PRECISION.MEDIUM;\n }\n\n return `precision ${precision} float;\\n${src}`;\n }\n else if (maxSupportedPrecision !== PRECISION.HIGH && src.substring(0, 15) === 'precision highp')\n {\n // precision was supplied, but at a level this device does not support, so downgrading to mediump.\n return src.replace('precision highp', 'precision mediump');\n }\n\n return src;\n}\n","import type { Dict } from '@pixi/utils';\n\nconst GLSL_TO_SIZE: Dict = {\n float: 1,\n vec2: 2,\n vec3: 3,\n vec4: 4,\n\n int: 1,\n ivec2: 2,\n ivec3: 3,\n ivec4: 4,\n\n bool: 1,\n bvec2: 2,\n bvec3: 3,\n bvec4: 4,\n\n mat2: 4,\n mat3: 9,\n mat4: 16,\n\n sampler2D: 1,\n};\n\n/**\n * @private\n * @method mapSize\n * @memberof PIXI.glCore.shader\n * @param type {String}\n * @return {Number}\n */\nexport function mapSize(type: string): number\n{\n return GLSL_TO_SIZE[type];\n}\n","import type { Dict } from '@pixi/utils';\n\nlet GL_TABLE: Dict = null;\n\nconst GL_TO_GLSL_TYPES: Dict = {\n FLOAT: 'float',\n FLOAT_VEC2: 'vec2',\n FLOAT_VEC3: 'vec3',\n FLOAT_VEC4: 'vec4',\n\n INT: 'int',\n INT_VEC2: 'ivec2',\n INT_VEC3: 'ivec3',\n INT_VEC4: 'ivec4',\n\n BOOL: 'bool',\n BOOL_VEC2: 'bvec2',\n BOOL_VEC3: 'bvec3',\n BOOL_VEC4: 'bvec4',\n\n FLOAT_MAT2: 'mat2',\n FLOAT_MAT3: 'mat3',\n FLOAT_MAT4: 'mat4',\n\n SAMPLER_2D: 'sampler2D',\n INT_SAMPLER_2D: 'sampler2D',\n UNSIGNED_INT_SAMPLER_2D: 'sampler2D',\n SAMPLER_CUBE: 'samplerCube',\n INT_SAMPLER_CUBE: 'samplerCube',\n UNSIGNED_INT_SAMPLER_CUBE: 'samplerCube',\n SAMPLER_2D_ARRAY: 'sampler2DArray',\n INT_SAMPLER_2D_ARRAY: 'sampler2DArray',\n UNSIGNED_INT_SAMPLER_2D_ARRAY: 'sampler2DArray',\n};\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function mapType(gl: any, type: number): string\n{\n if (!GL_TABLE)\n {\n const typeNames = Object.keys(GL_TO_GLSL_TYPES);\n\n GL_TABLE = {};\n\n for (let i = 0; i < typeNames.length; ++i)\n {\n const tn = typeNames[i];\n\n GL_TABLE[gl[tn]] = GL_TO_GLSL_TYPES[tn];\n }\n }\n\n return GL_TABLE[type];\n}\n","/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n// Parsers, each one of these will take a look at the type of shader property and uniform.\n// if they pass the test function then the code function is called that returns a the shader upload code for that uniform.\n// Shader upload code is automagically generated with these parsers.\n// If no parser is valid then the default upload functions are used.\n// exposing Parsers means that custom upload logic can be added to pixi's shaders.\n// A good example would be a pixi rectangle can be directly set on a uniform.\n// If the shader sees it it knows how to upload the rectangle structure as a vec4\n// format is as follows:\n//\n// {\n// test: (data, uniform) => {} <--- test is this code should be used for this uniform\n// code: (name, uniform) => {} <--- returns the string of the piece of code that uploads the uniform\n// }\n\nexport interface IUniformParser\n{\n test(data: unknown, uniform: any): boolean;\n code(name: string, uniform: any): string;\n}\n\nexport const uniformParsers: IUniformParser[] = [\n\n // a float cache layer\n {\n test: (data: any): boolean =>\n data.type === 'float' && data.size === 1,\n code: (name: string): string =>\n `\n if(uv[\"${name}\"] !== ud[\"${name}\"].value)\n {\n ud[\"${name}\"].value = uv[\"${name}\"]\n gl.uniform1f(ud[\"${name}\"].location, uv[\"${name}\"])\n }\n `,\n },\n // handling samplers\n {\n test: (data: any): boolean =>\n // eslint-disable-next-line max-len\n (data.type === 'sampler2D' || data.type === 'samplerCube' || data.type === 'sampler2DArray') && data.size === 1 && !data.isArray,\n code: (name: string): string => `t = syncData.textureCount++;\n\n renderer.texture.bind(uv[\"${name}\"], t);\n\n if(ud[\"${name}\"].value !== t)\n {\n ud[\"${name}\"].value = t;\n gl.uniform1i(ud[\"${name}\"].location, t);\\n; // eslint-disable-line max-len\n }`,\n },\n // uploading pixi matrix object to mat3\n {\n test: (data: any, uniform: any): boolean =>\n data.type === 'mat3' && data.size === 1 && uniform.a !== undefined,\n code: (name: string): string =>\n\n // TODO and some smart caching dirty ids here!\n `\n gl.uniformMatrix3fv(ud[\"${name}\"].location, false, uv[\"${name}\"].toArray(true));\n `\n ,\n\n },\n // uploading a pixi point as a vec2 with caching layer\n {\n test: (data: any, uniform: any): boolean =>\n data.type === 'vec2' && data.size === 1 && uniform.x !== undefined,\n code: (name: string): string =>\n `\n cv = ud[\"${name}\"].value;\n v = uv[\"${name}\"];\n\n if(cv[0] !== v.x || cv[1] !== v.y)\n {\n cv[0] = v.x;\n cv[1] = v.y;\n gl.uniform2f(ud[\"${name}\"].location, v.x, v.y);\n }`,\n },\n // caching layer for a vec2\n {\n test: (data: any): boolean =>\n data.type === 'vec2' && data.size === 1,\n code: (name: string): string =>\n `\n cv = ud[\"${name}\"].value;\n v = uv[\"${name}\"];\n\n if(cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2f(ud[\"${name}\"].location, v[0], v[1]);\n }\n `,\n },\n // upload a pixi rectangle as a vec4 with caching layer\n {\n test: (data: any, uniform: any): boolean =>\n data.type === 'vec4' && data.size === 1 && uniform.width !== undefined,\n\n code: (name: string): string =>\n `\n cv = ud[\"${name}\"].value;\n v = uv[\"${name}\"];\n\n if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)\n {\n cv[0] = v.x;\n cv[1] = v.y;\n cv[2] = v.width;\n cv[3] = v.height;\n gl.uniform4f(ud[\"${name}\"].location, v.x, v.y, v.width, v.height)\n }`,\n },\n // a caching layer for vec4 uploading\n {\n test: (data: any): boolean =>\n data.type === 'vec4' && data.size === 1,\n code: (name: string): string =>\n `\n cv = ud[\"${name}\"].value;\n v = uv[\"${name}\"];\n\n if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4f(ud[\"${name}\"].location, v[0], v[1], v[2], v[3])\n }`,\n },\n];\n\n","import { uniformParsers } from './uniformParsers';\n\nimport type { UniformGroup } from '../UniformGroup';\nimport type { Dict } from '@pixi/utils';\n\nexport type UniformsSyncCallback = (...args: any[]) => void;\n\n// cv = CachedValue\n// v = value\n// ud = uniformData\n// uv = uniformValue\n// l = location\nconst GLSL_TO_SINGLE_SETTERS_CACHED: Dict = {\n\n float: `\n if(cv !== v)\n {\n cv.v = v;\n gl.uniform1f(location, v)\n }`,\n\n vec2: `\n if(cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2f(location, v[0], v[1])\n }`,\n\n vec3: `\n if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3f(location, v[0], v[1], v[2])\n }`,\n\n vec4: 'gl.uniform4f(location, v[0], v[1], v[2], v[3])',\n\n int: 'gl.uniform1i(location, v)',\n ivec2: 'gl.uniform2i(location, v[0], v[1])',\n ivec3: 'gl.uniform3i(location, v[0], v[1], v[2])',\n ivec4: 'gl.uniform4i(location, v[0], v[1], v[2], v[3])',\n\n bool: 'gl.uniform1i(location, v)',\n bvec2: 'gl.uniform2i(location, v[0], v[1])',\n bvec3: 'gl.uniform3i(location, v[0], v[1], v[2])',\n bvec4: 'gl.uniform4i(location, v[0], v[1], v[2], v[3])',\n\n mat2: 'gl.uniformMatrix2fv(location, false, v)',\n mat3: 'gl.uniformMatrix3fv(location, false, v)',\n mat4: 'gl.uniformMatrix4fv(location, false, v)',\n\n sampler2D: 'gl.uniform1i(location, v)',\n samplerCube: 'gl.uniform1i(location, v)',\n sampler2DArray: 'gl.uniform1i(location, v)',\n};\n\nconst GLSL_TO_ARRAY_SETTERS: Dict = {\n\n float: `gl.uniform1fv(location, v)`,\n\n vec2: `gl.uniform2fv(location, v)`,\n vec3: `gl.uniform3fv(location, v)`,\n vec4: 'gl.uniform4fv(location, v)',\n\n mat4: 'gl.uniformMatrix4fv(location, false, v)',\n mat3: 'gl.uniformMatrix3fv(location, false, v)',\n mat2: 'gl.uniformMatrix2fv(location, false, v)',\n\n int: 'gl.uniform1iv(location, v)',\n ivec2: 'gl.uniform2iv(location, v)',\n ivec3: 'gl.uniform3iv(location, v)',\n ivec4: 'gl.uniform4iv(location, v)',\n\n bool: 'gl.uniform1iv(location, v)',\n bvec2: 'gl.uniform2iv(location, v)',\n bvec3: 'gl.uniform3iv(location, v)',\n bvec4: 'gl.uniform4iv(location, v)',\n\n sampler2D: 'gl.uniform1iv(location, v)',\n samplerCube: 'gl.uniform1iv(location, v)',\n sampler2DArray: 'gl.uniform1iv(location, v)',\n};\n\nexport function generateUniformsSync(group: UniformGroup, uniformData: Dict): UniformsSyncCallback\n{\n const funcFragments = [`\n var v = null;\n var cv = null\n var t = 0;\n var gl = renderer.gl\n `];\n\n for (const i in group.uniforms)\n {\n const data = uniformData[i];\n\n if (!data)\n {\n if (group.uniforms[i].group)\n {\n funcFragments.push(`\n renderer.shader.syncUniformGroup(uv[\"${i}\"], syncData);\n `);\n }\n\n continue;\n }\n\n const uniform = group.uniforms[i];\n\n let parsed = false;\n\n for (let j = 0; j < uniformParsers.length; j++)\n {\n if (uniformParsers[j].test(data, uniform))\n {\n funcFragments.push(uniformParsers[j].code(i, uniform));\n parsed = true;\n\n break;\n }\n }\n\n if (!parsed)\n {\n const templateType = (data.size === 1) ? GLSL_TO_SINGLE_SETTERS_CACHED : GLSL_TO_ARRAY_SETTERS;\n\n const template = templateType[data.type].replace('location', `ud[\"${i}\"].location`);\n\n funcFragments.push(`\n cv = ud[\"${i}\"].value;\n v = uv[\"${i}\"];\n ${template};`);\n }\n }\n\n /**\n * the introduction of syncData is to solve an issue where textures in uniform groups are not set correctly\n * the texture count was always starting from 0 in each group. This needs to increment each time a texture is used\n * no matter which group is being used\n *\n */\n // eslint-disable-next-line no-new-func\n return new Function('ud', 'uv', 'renderer', 'syncData', funcFragments.join('\\n')) as UniformsSyncCallback;\n}\n\n","import type { IRenderingContext } from '../../IRenderingContext';\n\nconst fragTemplate = [\n 'precision mediump float;',\n 'void main(void){',\n 'float test = 0.1;',\n '%forloop%',\n 'gl_FragColor = vec4(0.0);',\n '}',\n].join('\\n');\n\nfunction generateIfTestSrc(maxIfs: number): string\n{\n let src = '';\n\n for (let i = 0; i < maxIfs; ++i)\n {\n if (i > 0)\n {\n src += '\\nelse ';\n }\n\n if (i < maxIfs - 1)\n {\n src += `if(test == ${i}.0){}`;\n }\n }\n\n return src;\n}\n\nexport function checkMaxIfStatementsInShader(maxIfs: number, gl: IRenderingContext): number\n{\n if (maxIfs === 0)\n {\n throw new Error('Invalid value of `0` passed to `checkMaxIfStatementsInShader`');\n }\n\n const shader = gl.createShader(gl.FRAGMENT_SHADER);\n\n while (true) // eslint-disable-line no-constant-condition\n {\n const fragmentSrc = fragTemplate.replace(/%forloop%/gi, generateIfTestSrc(maxIfs));\n\n gl.shaderSource(shader, fragmentSrc);\n gl.compileShader(shader);\n\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS))\n {\n maxIfs = (maxIfs / 2) | 0;\n }\n else\n {\n // valid!\n break;\n }\n }\n\n return maxIfs;\n}\n","// Cache the result to prevent running this over and over\nlet unsafeEval: boolean;\n\n/**\n * Not all platforms allow to generate function code (e.g., `new Function`).\n * this provides the platform-level detection.\n *\n * @private\n * @returns {boolean}\n */\nexport function unsafeEvalSupported(): boolean\n{\n if (typeof unsafeEval === 'boolean')\n {\n return unsafeEval;\n }\n\n try\n {\n /* eslint-disable no-new-func */\n const func = new Function('param1', 'param2', 'param3', 'return param1[param2] === param3;');\n /* eslint-enable no-new-func */\n\n unsafeEval = func({ a: 'b' }, 'a', 'b') === true;\n }\n catch (e)\n {\n unsafeEval = false;\n }\n\n return unsafeEval;\n}\n","import { setPrecision,\n defaultValue,\n compileProgram,\n mapSize,\n mapType,\n getTestContext,\n getMaxFragmentPrecision } from './utils';\nimport { ProgramCache } from '@pixi/utils';\nimport defaultFragment from './defaultProgram.frag';\nimport defaultVertex from './defaultProgram.vert';\nimport { settings } from '@pixi/settings';\nimport { PRECISION } from '@pixi/constants';\n\nimport type { GLProgram } from './GLProgram';\n\nlet UID = 0;\n\nconst nameCache: { [key: string]: number } = {};\n\nexport interface IAttributeData\n{\n type: string;\n size: number;\n location: number;\n name: string;\n}\n\nexport interface IUniformData\n{\n type: string;\n size: number;\n isArray: RegExpMatchArray;\n value: any;\n}\n\n/**\n * Helper class to create a shader program.\n *\n * @class\n * @memberof PIXI\n */\nexport class Program\n{\n public id: number;\n public vertexSrc: string;\n public fragmentSrc: string;\n nameCache: any;\n glPrograms: { [ key: number ]: GLProgram};\n syncUniforms: any;\n attributeData: { [key: string]: IAttributeData};\n uniformData: {[key: string]: IUniformData};\n /**\n * @param {string} [vertexSrc] - The source of the vertex shader.\n * @param {string} [fragmentSrc] - The source of the fragment shader.\n * @param {string} [name] - Name for shader\n */\n constructor(vertexSrc?: string, fragmentSrc?: string, name = 'pixi-shader')\n {\n this.id = UID++;\n\n /**\n * The vertex shader.\n *\n * @member {string}\n */\n this.vertexSrc = vertexSrc || Program.defaultVertexSrc;\n\n /**\n * The fragment shader.\n *\n * @member {string}\n */\n this.fragmentSrc = fragmentSrc || Program.defaultFragmentSrc;\n\n this.vertexSrc = this.vertexSrc.trim();\n this.fragmentSrc = this.fragmentSrc.trim();\n\n if (this.vertexSrc.substring(0, 8) !== '#version')\n {\n name = name.replace(/\\s+/g, '-');\n\n if (nameCache[name])\n {\n nameCache[name]++;\n name += `-${nameCache[name]}`;\n }\n else\n {\n nameCache[name] = 1;\n }\n\n this.vertexSrc = `#define SHADER_NAME ${name}\\n${this.vertexSrc}`;\n this.fragmentSrc = `#define SHADER_NAME ${name}\\n${this.fragmentSrc}`;\n\n this.vertexSrc = setPrecision(this.vertexSrc, settings.PRECISION_VERTEX, PRECISION.HIGH);\n this.fragmentSrc = setPrecision(this.fragmentSrc, settings.PRECISION_FRAGMENT, getMaxFragmentPrecision());\n }\n\n // currently this does not extract structs only default types\n this.extractData(this.vertexSrc, this.fragmentSrc);\n\n // this is where we store shader references..\n this.glPrograms = {};\n\n this.syncUniforms = null;\n }\n\n /**\n * Extracts the data for a buy creating a small test program\n * or reading the src directly.\n * @protected\n *\n * @param {string} [vertexSrc] - The source of the vertex shader.\n * @param {string} [fragmentSrc] - The source of the fragment shader.\n */\n protected extractData(vertexSrc: string, fragmentSrc: string): void\n {\n const gl = getTestContext();\n\n if (gl)\n {\n const program = compileProgram(gl, vertexSrc, fragmentSrc);\n\n this.attributeData = this.getAttributeData(program, gl);\n this.uniformData = this.getUniformData(program, gl);\n\n gl.deleteProgram(program);\n }\n else\n {\n this.uniformData = {};\n this.attributeData = {};\n }\n }\n\n /**\n * returns the attribute data from the program\n * @private\n *\n * @param {WebGLProgram} [program] - the WebGL program\n * @param {WebGLRenderingContext} [gl] - the WebGL context\n *\n * @returns {object} the attribute data for this program\n */\n protected getAttributeData(program: WebGLProgram, gl: WebGLRenderingContextBase): {[key: string]: IAttributeData}\n {\n const attributes: {[key: string]: IAttributeData} = {};\n const attributesArray: Array = [];\n\n const totalAttributes = gl.getProgramParameter(program, gl.ACTIVE_ATTRIBUTES);\n\n for (let i = 0; i < totalAttributes; i++)\n {\n const attribData = gl.getActiveAttrib(program, i);\n const type = mapType(gl, attribData.type);\n\n /*eslint-disable */\n const data = {\n type: type,\n name: attribData.name,\n size: mapSize(type),\n location: 0,\n };\n /* eslint-enable */\n\n attributes[attribData.name] = data;\n attributesArray.push(data);\n }\n\n attributesArray.sort((a, b) => (a.name > b.name) ? 1 : -1); // eslint-disable-line no-confusing-arrow\n\n for (let i = 0; i < attributesArray.length; i++)\n {\n attributesArray[i].location = i;\n }\n\n return attributes;\n }\n\n /**\n * returns the uniform data from the program\n * @private\n *\n * @param {webGL-program} [program] - the webgl program\n * @param {context} [gl] - the WebGL context\n *\n * @returns {object} the uniform data for this program\n */\n private getUniformData(program: WebGLProgram, gl: WebGLRenderingContextBase): {[key: string]: IUniformData}\n {\n const uniforms: {[key: string]: IUniformData} = {};\n\n const totalUniforms = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS);\n\n // TODO expose this as a prop?\n // const maskRegex = new RegExp('^(projectionMatrix|uSampler|translationMatrix)$');\n // const maskRegex = new RegExp('^(projectionMatrix|uSampler|translationMatrix)$');\n\n for (let i = 0; i < totalUniforms; i++)\n {\n const uniformData = gl.getActiveUniform(program, i);\n const name = uniformData.name.replace(/\\[.*?\\]$/, '');\n\n const isArray = uniformData.name.match(/\\[.*?\\]$/);\n const type = mapType(gl, uniformData.type);\n\n /*eslint-disable */\n uniforms[name] = {\n type: type,\n size: uniformData.size,\n isArray:isArray,\n value: defaultValue(type, uniformData.size),\n };\n /* eslint-enable */\n }\n\n return uniforms;\n }\n\n /**\n * The default vertex shader source\n *\n * @static\n * @constant\n * @member {string}\n */\n static get defaultVertexSrc(): string\n {\n return defaultVertex;\n }\n\n /**\n * The default fragment shader source\n *\n * @static\n * @constant\n * @member {string}\n */\n static get defaultFragmentSrc(): string\n {\n return defaultFragment;\n }\n\n /**\n * A short hand function to create a program based of a vertex and fragment shader\n * this method will also check to see if there is a cached program.\n *\n * @param {string} [vertexSrc] - The source of the vertex shader.\n * @param {string} [fragmentSrc] - The source of the fragment shader.\n * @param {string} [name=pixi-shader] - Name for shader\n *\n * @returns {PIXI.Program} an shiny new Pixi shader!\n */\n static from(vertexSrc?: string, fragmentSrc?: string, name?: string): Program\n {\n const key = vertexSrc + fragmentSrc;\n\n let program = ProgramCache[key];\n\n if (!program)\n {\n ProgramCache[key] = program = new Program(vertexSrc, fragmentSrc, name);\n }\n\n return program;\n }\n}\n","import { Program } from './Program';\nimport { UniformGroup } from './UniformGroup';\n\nimport type { Dict } from '@pixi/utils';\n\n/**\n * A helper class for shaders\n *\n * @class\n * @memberof PIXI\n */\nexport class Shader\n{\n public program: Program;\n public uniformGroup: UniformGroup;\n /**\n * @param {PIXI.Program} [program] - The program the shader will use.\n * @param {object} [uniforms] - Custom uniforms to use to augment the built-in ones.\n */\n constructor(program: Program, uniforms: Dict)\n {\n /**\n * Program that the shader uses\n *\n * @member {PIXI.Program}\n */\n this.program = program;\n\n // lets see whats been passed in\n // uniforms should be converted to a uniform group\n if (uniforms)\n {\n if (uniforms instanceof UniformGroup)\n {\n this.uniformGroup = uniforms;\n }\n else\n {\n this.uniformGroup = new UniformGroup(uniforms);\n }\n }\n else\n {\n this.uniformGroup = new UniformGroup({});\n }\n\n // time to build some getters and setters!\n // I guess down the line this could sort of generate an instruction list rather than use dirty ids?\n // does the trick for now though!\n for (const i in program.uniformData)\n {\n if (this.uniformGroup.uniforms[i] instanceof Array)\n {\n this.uniformGroup.uniforms[i] = new Float32Array(this.uniformGroup.uniforms[i]);\n }\n }\n }\n\n // TODO move to shader system..\n checkUniformExists(name: string, group: UniformGroup): boolean\n {\n if (group.uniforms[name])\n {\n return true;\n }\n\n for (const i in group.uniforms)\n {\n const uniform = group.uniforms[i];\n\n if (uniform.group)\n {\n if (this.checkUniformExists(name, uniform))\n {\n return true;\n }\n }\n }\n\n return false;\n }\n\n destroy(): void\n {\n // usage count on programs?\n // remove if not used!\n this.uniformGroup = null;\n }\n\n /**\n * Shader uniform values, shortcut for `uniformGroup.uniforms`\n * @readonly\n * @member {object}\n */\n get uniforms(): Dict\n {\n return this.uniformGroup.uniforms;\n }\n\n /**\n * A short hand function to create a shader based of a vertex and fragment shader\n *\n * @param {string} [vertexSrc] - The source of the vertex shader.\n * @param {string} [fragmentSrc] - The source of the fragment shader.\n * @param {object} [uniforms] - Custom uniforms to use to augment the built-in ones.\n *\n * @returns {PIXI.Shader} an shiny new Pixi shader!\n */\n static from(vertexSrc?: string, fragmentSrc?: string, uniforms?: Dict): Shader\n {\n const program = Program.from(vertexSrc, fragmentSrc);\n\n return new Shader(program, uniforms);\n }\n}\n","import { BLEND_MODES } from '@pixi/constants';\n\n/* eslint-disable max-len */\n\nconst BLEND = 0;\nconst OFFSET = 1;\nconst CULLING = 2;\nconst DEPTH_TEST = 3;\nconst WINDING = 4;\n\n/**\n * This is a WebGL state, and is is passed The WebGL StateManager.\n *\n * Each mesh rendered may require WebGL to be in a different state.\n * For example you may want different blend mode or to enable polygon offsets\n *\n * @class\n * @memberof PIXI\n */\nexport class State\n{\n data: number;\n _blendMode: BLEND_MODES;\n _polygonOffset: number;\n\n constructor()\n {\n this.data = 0;\n\n this.blendMode = BLEND_MODES.NORMAL;\n this.polygonOffset = 0;\n\n this.blend = true;\n // this.depthTest = true;\n }\n\n /**\n * Activates blending of the computed fragment color values\n *\n * @member {boolean}\n */\n get blend(): boolean\n {\n return !!(this.data & (1 << BLEND));\n }\n\n set blend(value: boolean)\n {\n if (!!(this.data & (1 << BLEND)) !== value)\n {\n this.data ^= (1 << BLEND);\n }\n }\n\n /**\n * Activates adding an offset to depth values of polygon's fragments\n *\n * @member {boolean}\n * @default false\n */\n get offsets(): boolean\n {\n return !!(this.data & (1 << OFFSET));\n }\n\n set offsets(value: boolean)\n {\n if (!!(this.data & (1 << OFFSET)) !== value)\n {\n this.data ^= (1 << OFFSET);\n }\n }\n\n /**\n * Activates culling of polygons.\n *\n * @member {boolean}\n * @default false\n */\n get culling(): boolean\n {\n return !!(this.data & (1 << CULLING));\n }\n\n set culling(value: boolean)\n {\n if (!!(this.data & (1 << CULLING)) !== value)\n {\n this.data ^= (1 << CULLING);\n }\n }\n\n /**\n * Activates depth comparisons and updates to the depth buffer.\n *\n * @member {boolean}\n * @default false\n */\n get depthTest(): boolean\n {\n return !!(this.data & (1 << DEPTH_TEST));\n }\n\n set depthTest(value: boolean)\n {\n if (!!(this.data & (1 << DEPTH_TEST)) !== value)\n {\n this.data ^= (1 << DEPTH_TEST);\n }\n }\n\n /**\n * Specifies whether or not front or back-facing polygons can be culled.\n * @member {boolean}\n * @default false\n */\n get clockwiseFrontFace(): boolean\n {\n return !!(this.data & (1 << WINDING));\n }\n\n set clockwiseFrontFace(value: boolean)\n {\n if (!!(this.data & (1 << WINDING)) !== value)\n {\n this.data ^= (1 << WINDING);\n }\n }\n\n /**\n * The blend mode to be applied when this state is set. Apply a value of `PIXI.BLEND_MODES.NORMAL` to reset the blend mode.\n * Setting this mode to anything other than NO_BLEND will automatically switch blending on.\n *\n * @member {number}\n * @default PIXI.BLEND_MODES.NORMAL\n * @see PIXI.BLEND_MODES\n */\n get blendMode(): BLEND_MODES\n {\n return this._blendMode;\n }\n\n set blendMode(value: BLEND_MODES)\n {\n this.blend = (value !== BLEND_MODES.NONE);\n this._blendMode = value;\n }\n\n /**\n * The polygon offset. Setting this property to anything other than 0 will automatically enable polygon offset fill.\n *\n * @member {number}\n * @default 0\n */\n get polygonOffset(): number\n {\n return this._polygonOffset;\n }\n\n set polygonOffset(value: number)\n {\n this.offsets = !!value;\n this._polygonOffset = value;\n }\n\n static for2d(): State\n {\n const state = new State();\n\n state.depthTest = false;\n state.blend = true;\n\n return state;\n }\n}\n\n","import { Shader } from '../shader/Shader';\nimport { Program } from '../shader/Program';\nimport { State } from '../state/State';\nimport { settings } from '@pixi/settings';\nimport defaultVertex from './defaultFilter.vert';\nimport defaultFragment from './defaultFilter.frag';\n\nimport type { RenderTexture } from '../renderTexture/RenderTexture';\nimport type { FilterSystem } from './FilterSystem';\nimport type { FilterState } from './FilterState';\nimport type { BLEND_MODES, CLEAR_MODES } from '@pixi/constants';\nimport type { Dict } from '@pixi/utils';\n\n/**\n * Filter is a special type of WebGL shader that is applied to the screen.\n *\n * {@link http://pixijs.io/examples/#/filters/blur-filter.js Example} of the\n * {@link PIXI.filters.BlurFilter BlurFilter}.\n *\n * ### Usage\n * Filters can be applied to any DisplayObject or Container.\n * PixiJS' `FilterSystem` renders the container into temporary Framebuffer,\n * then filter renders it to the screen.\n * Multiple filters can be added to the `filters` array property and stacked on each other.\n *\n * ```\n * const filter = new PIXI.Filter(myShaderVert, myShaderFrag, { myUniform: 0.5 });\n * const container = new PIXI.Container();\n * container.filters = [filter];\n * ```\n *\n * ### Previous Version Differences\n *\n * In PixiJS **v3**, a filter was always applied to _whole screen_.\n *\n * In PixiJS **v4**, a filter can be applied _only part of the screen_.\n * Developers had to create a set of uniforms to deal with coordinates.\n *\n * In PixiJS **v5** combines _both approaches_.\n * Developers can use normal coordinates of v3 and then allow filter to use partial Framebuffers,\n * bringing those extra uniforms into account.\n *\n * Also be aware that we have changed default vertex shader, please consult\n * {@link https://github.com/pixijs/pixi.js/wiki/v5-Creating-filters Wiki}.\n *\n * ### Built-in Uniforms\n *\n * PixiJS viewport uses screen (CSS) coordinates, `(0, 0, renderer.screen.width, renderer.screen.height)`,\n * and `projectionMatrix` uniform maps it to the gl viewport.\n *\n * **uSampler**\n *\n * The most important uniform is the input texture that container was rendered into.\n * _Important note: as with all Framebuffers in PixiJS, both input and output are\n * premultiplied by alpha._\n *\n * By default, input normalized coordinates are passed to fragment shader with `vTextureCoord`.\n * Use it to sample the input.\n *\n * ```\n * const fragment = `\n * varying vec2 vTextureCoord;\n * uniform sampler2D uSampler;\n * void main(void)\n * {\n * gl_FragColor = texture2D(uSampler, vTextureCoord);\n * }\n * `;\n *\n * const myFilter = new PIXI.Filter(null, fragment);\n * ```\n *\n * This filter is just one uniform less than {@link PIXI.filters.AlphaFilter AlphaFilter}.\n *\n * **outputFrame**\n *\n * The `outputFrame` holds the rectangle where filter is applied in screen (CSS) coordinates.\n * It's the same as `renderer.screen` for a fullscreen filter.\n * Only a part of `outputFrame.zw` size of temporary Framebuffer is used,\n * `(0, 0, outputFrame.width, outputFrame.height)`,\n *\n * Filters uses this quad to normalized (0-1) space, its passed into `aVertexPosition` attribute.\n * To calculate vertex position in screen space using normalized (0-1) space:\n *\n * ```\n * vec4 filterVertexPosition( void )\n * {\n * vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n * return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n * }\n * ```\n *\n * **inputSize**\n *\n * Temporary framebuffer is different, it can be either the size of screen, either power-of-two.\n * The `inputSize.xy` are size of temporary framebuffer that holds input.\n * The `inputSize.zw` is inverted, it's a shortcut to evade division inside the shader.\n *\n * Set `inputSize.xy = outputFrame.zw` for a fullscreen filter.\n *\n * To calculate input normalized coordinate, you have to map it to filter normalized space.\n * Multiply by `outputFrame.zw` to get input coordinate.\n * Divide by `inputSize.xy` to get input normalized coordinate.\n *\n * ```\n * vec2 filterTextureCoord( void )\n * {\n * return aVertexPosition * (outputFrame.zw * inputSize.zw); // same as /inputSize.xy\n * }\n * ```\n * **resolution**\n *\n * The `resolution` is the ratio of screen (CSS) pixels to real pixels.\n *\n * **inputPixel**\n *\n * `inputPixel.xy` is the size of framebuffer in real pixels, same as `inputSize.xy * resolution`\n * `inputPixel.zw` is inverted `inputPixel.xy`.\n *\n * It's handy for filters that use neighbour pixels, like {@link PIXI.filters.FXAAFilter FXAAFilter}.\n *\n * **inputClamp**\n *\n * If you try to get info from outside of used part of Framebuffer - you'll get undefined behaviour.\n * For displacements, coordinates has to be clamped.\n *\n * The `inputClamp.xy` is left-top pixel center, you may ignore it, because we use left-top part of Framebuffer\n * `inputClamp.zw` is bottom-right pixel center.\n *\n * ```\n * vec4 color = texture2D(uSampler, clamp(modifigedTextureCoord, inputClamp.xy, inputClamp.zw))\n * ```\n * OR\n * ```\n * vec4 color = texture2D(uSampler, min(modifigedTextureCoord, inputClamp.zw))\n * ```\n *\n * ### Additional Information\n *\n * Complete documentation on Filter usage is located in the\n * {@link https://github.com/pixijs/pixi.js/wiki/v5-Creating-filters Wiki}.\n *\n * Since PixiJS only had a handful of built-in filters, additional filters can be downloaded\n * {@link https://github.com/pixijs/pixi-filters here} from the PixiJS Filters repository.\n *\n * @class\n * @memberof PIXI\n * @extends PIXI.Shader\n */\nexport class Filter extends Shader\n{\n public padding: number;\n public resolution: number;\n public enabled: boolean;\n public autoFit: boolean;\n public legacy: boolean;\n state: State;\n /**\n * @param {string} [vertexSrc] - The source of the vertex shader.\n * @param {string} [fragmentSrc] - The source of the fragment shader.\n * @param {object} [uniforms] - Custom uniforms to use to augment the built-in ones.\n */\n constructor(vertexSrc?: string, fragmentSrc?: string, uniforms?: Dict)\n {\n const program = Program.from(vertexSrc || Filter.defaultVertexSrc,\n fragmentSrc || Filter.defaultFragmentSrc);\n\n super(program, uniforms);\n\n /**\n * The padding of the filter. Some filters require extra space to breath such as a blur.\n * Increasing this will add extra width and height to the bounds of the object that the\n * filter is applied to.\n *\n * @member {number}\n */\n this.padding = 0;\n\n /**\n * The resolution of the filter. Setting this to be lower will lower the quality but\n * increase the performance of the filter.\n *\n * @member {number}\n */\n this.resolution = settings.FILTER_RESOLUTION;\n\n /**\n * If enabled is true the filter is applied, if false it will not.\n *\n * @member {boolean}\n */\n this.enabled = true;\n\n /**\n * If enabled, PixiJS will fit the filter area into boundaries for better performance.\n * Switch it off if it does not work for specific shader.\n *\n * @member {boolean}\n */\n this.autoFit = true;\n\n /**\n * Legacy filters use position and uvs from attributes\n * @member {boolean}\n * @readonly\n */\n this.legacy = !!this.program.attributeData.aTextureCoord;\n\n /**\n * The WebGL state the filter requires to render\n * @member {PIXI.State}\n */\n this.state = new State();\n }\n\n /**\n * Applies the filter\n *\n * @param {PIXI.systems.FilterSystem} filterManager - The renderer to retrieve the filter from\n * @param {PIXI.RenderTexture} input - The input render target.\n * @param {PIXI.RenderTexture} output - The target to output to.\n * @param {PIXI.CLEAR_MODES} clearMode - Should the output be cleared before rendering to it.\n * @param {object} [currentState] - It's current state of filter.\n * There are some useful properties in the currentState :\n * target, filters, sourceFrame, destinationFrame, renderTarget, resolution\n */\n apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clearMode: CLEAR_MODES,\n _currentState?: FilterState): void\n {\n // do as you please!\n\n filterManager.applyFilter(this, input, output, clearMode);\n\n // or just do a regular render..\n }\n\n /**\n * Sets the blendmode of the filter\n *\n * @member {number}\n * @default PIXI.BLEND_MODES.NORMAL\n */\n get blendMode(): BLEND_MODES\n {\n return this.state.blendMode;\n }\n\n set blendMode(value: BLEND_MODES)\n {\n this.state.blendMode = value;\n }\n\n /**\n * The default vertex shader source\n *\n * @static\n * @type {string}\n * @constant\n */\n static get defaultVertexSrc(): string\n {\n return defaultVertex;\n }\n\n /**\n * The default fragment shader source\n *\n * @static\n * @type {string}\n * @constant\n */\n static get defaultFragmentSrc(): string\n {\n return defaultFragment;\n }\n\n /**\n * Used for caching shader IDs\n *\n * @static\n * @type {object}\n * @protected\n */\n static SOURCE_KEY_MAP: Dict;\n}\n","import { Matrix } from '@pixi/math';\n\nimport type { Texture } from './Texture';\n\nconst tempMat = new Matrix();\n\n/**\n * Class controls uv mapping from Texture normal space to BaseTexture normal space.\n *\n * Takes `trim` and `rotate` into account. May contain clamp settings for Meshes and TilingSprite.\n *\n * Can be used in Texture `uvMatrix` field, or separately, you can use different clamp settings on the same texture.\n * If you want to add support for texture region of certain feature or filter, that's what you're looking for.\n *\n * Takes track of Texture changes through `_lastTextureID` private field.\n * Use `update()` method call to track it from outside.\n *\n * @see PIXI.Texture\n * @see PIXI.Mesh\n * @see PIXI.TilingSprite\n * @class\n * @memberof PIXI\n */\nexport class TextureMatrix\n{\n public mapCoord: Matrix;\n public clampOffset: number;\n public clampMargin: number;\n readonly uClampFrame: Float32Array;\n readonly uClampOffset: Float32Array;\n _textureID: number;\n _updateID: number;\n _texture: Texture;\n isSimple: boolean;\n /**\n *\n * @param {PIXI.Texture} texture - observed texture\n * @param {number} [clampMargin] - Changes frame clamping, 0.5 by default. Use -0.5 for extra border.\n * @constructor\n */\n constructor(texture: Texture, clampMargin?: number)\n {\n this._texture = texture;\n\n /**\n * Matrix operation that converts texture region coords to texture coords\n * @member {PIXI.Matrix}\n * @readonly\n */\n this.mapCoord = new Matrix();\n\n /**\n * Clamp region for normalized coords, left-top pixel center in xy , bottom-right in zw.\n * Calculated based on clampOffset.\n * @member {Float32Array}\n * @readonly\n */\n this.uClampFrame = new Float32Array(4);\n\n /**\n * Normalized clamp offset.\n * Calculated based on clampOffset.\n * @member {Float32Array}\n * @readonly\n */\n this.uClampOffset = new Float32Array(2);\n\n /**\n * Tracks Texture frame changes\n * @member {number}\n * @protected\n */\n this._textureID = -1;\n\n /**\n * Tracks Texture frame changes\n * @member {number}\n * @protected\n */\n this._updateID = 0;\n\n /**\n * Changes frame clamping\n * Works with TilingSprite and Mesh\n * Change to 1.5 if you texture has repeated right and bottom lines, that leads to smoother borders\n *\n * @default 0\n * @member {number}\n */\n this.clampOffset = 0;\n\n /**\n * Changes frame clamping\n * Works with TilingSprite and Mesh\n * Change to -0.5 to add a pixel to the edge, recommended for transparent trimmed textures in atlas\n *\n * @default 0.5\n * @member {number}\n */\n this.clampMargin = (typeof clampMargin === 'undefined') ? 0.5 : clampMargin;\n\n /**\n * If texture size is the same as baseTexture\n * @member {boolean}\n * @default false\n * @readonly\n */\n this.isSimple = false;\n }\n\n /**\n * texture property\n * @member {PIXI.Texture}\n */\n get texture(): Texture\n {\n return this._texture;\n }\n\n set texture(value: Texture)\n {\n this._texture = value;\n this._textureID = -1;\n }\n\n /**\n * Multiplies uvs array to transform\n * @param {Float32Array} uvs - mesh uvs\n * @param {Float32Array} [out=uvs] output\n * @returns {Float32Array} output\n */\n multiplyUvs(uvs: Float32Array, out?: Float32Array): Float32Array\n {\n if (out === undefined)\n {\n out = uvs;\n }\n\n const mat = this.mapCoord;\n\n for (let i = 0; i < uvs.length; i += 2)\n {\n const x = uvs[i];\n const y = uvs[i + 1];\n\n out[i] = (x * mat.a) + (y * mat.c) + mat.tx;\n out[i + 1] = (x * mat.b) + (y * mat.d) + mat.ty;\n }\n\n return out;\n }\n\n /**\n * updates matrices if texture was changed\n * @param {boolean} [forceUpdate=false] - if true, matrices will be updated any case\n * @returns {boolean} whether or not it was updated\n */\n update(forceUpdate?: boolean): boolean\n {\n const tex = this._texture;\n\n if (!tex || !tex.valid)\n {\n return false;\n }\n\n if (!forceUpdate\n && this._textureID === tex._updateID)\n {\n return false;\n }\n\n this._textureID = tex._updateID;\n this._updateID++;\n\n const uvs = tex._uvs;\n\n this.mapCoord.set(uvs.x1 - uvs.x0, uvs.y1 - uvs.y0, uvs.x3 - uvs.x0, uvs.y3 - uvs.y0, uvs.x0, uvs.y0);\n\n const orig = tex.orig;\n const trim = tex.trim;\n\n if (trim)\n {\n tempMat.set(orig.width / trim.width, 0, 0, orig.height / trim.height,\n -trim.x / trim.width, -trim.y / trim.height);\n this.mapCoord.append(tempMat);\n }\n\n const texBase = tex.baseTexture;\n const frame = this.uClampFrame;\n const margin = this.clampMargin / texBase.resolution;\n const offset = this.clampOffset;\n\n frame[0] = (tex._frame.x + margin + offset) / texBase.width;\n frame[1] = (tex._frame.y + margin + offset) / texBase.height;\n frame[2] = (tex._frame.x + tex._frame.width - margin + offset) / texBase.width;\n frame[3] = (tex._frame.y + tex._frame.height - margin + offset) / texBase.height;\n this.uClampOffset[0] = offset / texBase.realWidth;\n this.uClampOffset[1] = offset / texBase.realHeight;\n\n this.isSimple = tex._frame.width === texBase.width\n && tex._frame.height === texBase.height\n && tex.rotate === 0;\n\n return true;\n }\n}\n","import { Filter } from '../Filter';\nimport { Matrix, Point } from '@pixi/math';\nimport { CLEAR_MODES } from '@pixi/constants';\nimport vertex from './spriteMaskFilter.vert';\nimport fragment from './spriteMaskFilter.frag';\nimport { TextureMatrix } from '../../textures/TextureMatrix';\n\nimport type { FilterSystem } from '../FilterSystem';\nimport type { IMaskTarget } from '../../mask/MaskData';\nimport type { Texture } from '../../textures/Texture';\nimport type { RenderTexture } from '../../renderTexture/RenderTexture';\n\nexport interface ISpriteMaskTarget extends IMaskTarget\n{\n _texture: Texture;\n worldAlpha: number;\n anchor: Point;\n}\n\n/**\n * This handles a Sprite acting as a mask, as opposed to a Graphic.\n *\n * WebGL only.\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI\n */\nexport class SpriteMaskFilter extends Filter\n{\n maskSprite: IMaskTarget;\n maskMatrix: Matrix;\n /**\n * @param {PIXI.Sprite} sprite - the target sprite\n */\n constructor(sprite: IMaskTarget)\n {\n const maskMatrix = new Matrix();\n\n super(vertex, fragment);\n\n sprite.renderable = false;\n\n /**\n * Sprite mask\n * @member {PIXI.Sprite}\n */\n this.maskSprite = sprite;\n\n /**\n * Mask matrix\n * @member {PIXI.Matrix}\n */\n this.maskMatrix = maskMatrix;\n }\n\n /**\n * Applies the filter\n *\n * @param {PIXI.systems.FilterSystem} filterManager - The renderer to retrieve the filter from\n * @param {PIXI.RenderTexture} input - The input render target.\n * @param {PIXI.RenderTexture} output - The target to output to.\n * @param {PIXI.CLEAR_MODES} clearMode - Should the output be cleared before rendering to it.\n */\n apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clearMode: CLEAR_MODES): void\n {\n const maskSprite = this.maskSprite as ISpriteMaskTarget;\n const tex = maskSprite._texture;\n\n if (!tex.valid)\n {\n return;\n }\n if (!tex.uvMatrix)\n {\n // margin = 0.0, let it bleed a bit, shader code becomes easier\n // assuming that atlas textures were made with 1-pixel padding\n tex.uvMatrix = new TextureMatrix(tex, 0.0);\n }\n tex.uvMatrix.update();\n\n this.uniforms.npmAlpha = tex.baseTexture.alphaMode ? 0.0 : 1.0;\n this.uniforms.mask = tex;\n // get _normalized sprite texture coords_ and convert them to _normalized atlas texture coords_ with `prepend`\n this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite)\n .prepend(tex.uvMatrix.mapCoord);\n this.uniforms.alpha = maskSprite.worldAlpha;\n this.uniforms.maskClamp = tex.uvMatrix.uClampFrame;\n\n filterManager.applyFilter(this, input, output, clearMode);\n }\n}\n","import { System } from '../System';\nimport { MaskData } from './MaskData';\nimport { SpriteMaskFilter } from '../filters/spriteMask/SpriteMaskFilter';\nimport { MASK_TYPES } from '@pixi/constants';\n\nimport type { IMaskTarget } from './MaskData';\nimport type { Renderer } from '../Renderer';\n\n/**\n * System plugin to the renderer to manage masks.\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI.systems\n */\nexport class MaskSystem extends System\n{\n public enableScissor: boolean;\n protected readonly alphaMaskPool: Array;\n protected alphaMaskIndex: number;\n private readonly maskDataPool: Array;\n private maskStack: Array;\n\n /**\n * @param {PIXI.Renderer} renderer - The renderer this System works for.\n */\n constructor(renderer: Renderer)\n {\n super(renderer);\n\n /**\n * Enable scissor\n * @member {boolean}\n * @readonly\n */\n this.enableScissor = false;\n\n /**\n * Pool of used sprite mask filters\n * @member {PIXI.SpriteMaskFilter[]}\n * @readonly\n */\n this.alphaMaskPool = [];\n\n /**\n * Pool of mask data\n * @member {PIXI.MaskData[]}\n * @readonly\n */\n this.maskDataPool = [];\n\n this.maskStack = [];\n\n /**\n * Current index of alpha mask pool\n * @member {number}\n * @default 0\n * @readonly\n */\n this.alphaMaskIndex = 0;\n }\n\n /**\n * Changes the mask stack that is used by this System.\n *\n * @param {PIXI.MaskData[]} maskStack - The mask stack\n */\n setMaskStack(maskStack: Array): void\n {\n this.maskStack = maskStack;\n this.renderer.scissor.setMaskStack(maskStack);\n this.renderer.stencil.setMaskStack(maskStack);\n }\n\n /**\n * Applies the Mask and adds it to the current filter stack.\n * Renderer batch must be flushed beforehand.\n *\n * @param {PIXI.DisplayObject} target - Display Object to push the mask to\n * @param {PIXI.MaskData|PIXI.Sprite|PIXI.Graphics|PIXI.DisplayObject} maskData - The masking data.\n */\n push(target: IMaskTarget, maskDataOrTarget: MaskData|IMaskTarget): void\n {\n let maskData = maskDataOrTarget as MaskData;\n\n if (!maskData.isMaskData)\n {\n const d = this.maskDataPool.pop() || new MaskData();\n\n d.pooled = true;\n d.maskObject = maskDataOrTarget as IMaskTarget;\n maskData = d;\n }\n\n if (maskData.autoDetect)\n {\n this.detect(maskData);\n }\n\n maskData.copyCountersOrReset(this.maskStack[this.maskStack.length - 1]);\n maskData._target = target;\n\n switch (maskData.type)\n {\n case MASK_TYPES.SCISSOR:\n this.maskStack.push(maskData);\n this.renderer.scissor.push(maskData);\n break;\n case MASK_TYPES.STENCIL:\n this.maskStack.push(maskData);\n this.renderer.stencil.push(maskData);\n break;\n case MASK_TYPES.SPRITE:\n maskData.copyCountersOrReset(null);\n this.pushSpriteMask(maskData);\n this.maskStack.push(maskData);\n break;\n default:\n break;\n }\n }\n\n /**\n * Removes the last mask from the mask stack and doesn't return it.\n * Renderer batch must be flushed beforehand.\n *\n * @param {PIXI.DisplayObject} target - Display Object to pop the mask from\n */\n pop(target: IMaskTarget): void\n {\n const maskData = this.maskStack.pop();\n\n if (!maskData || maskData._target !== target)\n {\n // TODO: add an assert when we have it\n\n return;\n }\n\n switch (maskData.type)\n {\n case MASK_TYPES.SCISSOR:\n this.renderer.scissor.pop();\n break;\n case MASK_TYPES.STENCIL:\n this.renderer.stencil.pop(maskData.maskObject);\n break;\n case MASK_TYPES.SPRITE:\n this.popSpriteMask();\n break;\n default:\n break;\n }\n\n maskData.reset();\n\n if (maskData.pooled)\n {\n this.maskDataPool.push(maskData);\n }\n }\n\n /**\n * Sets type of MaskData based on its maskObject\n * @param {PIXI.MaskData} maskData\n */\n detect(maskData: MaskData): void\n {\n const maskObject = maskData.maskObject;\n\n if (maskObject.isSprite)\n {\n maskData.type = MASK_TYPES.SPRITE;\n\n return;\n }\n maskData.type = MASK_TYPES.STENCIL;\n // detect scissor in graphics\n if (this.enableScissor\n && maskObject.isFastRect\n && maskObject.isFastRect())\n {\n const matrix = maskObject.worldTransform;\n\n // TODO: move the check to the matrix itself\n // we are checking that its orthogonal and x rotation is 0 90 180 or 270\n\n let rotX = Math.atan2(matrix.b, matrix.a);\n let rotXY = Math.atan2(matrix.d, matrix.c);\n\n // use the nearest degree to 0.01\n rotX = Math.round(rotX * (180 / Math.PI) * 100);\n rotXY = Math.round(rotXY * (180 / Math.PI) * 100) - rotX;\n\n rotX = ((rotX % 9000) + 9000) % 9000;\n rotXY = ((rotXY % 18000) + 18000) % 18000;\n\n if (rotX === 0 && rotXY === 9000)\n {\n maskData.type = MASK_TYPES.SCISSOR;\n }\n }\n }\n\n /**\n * Applies the Mask and adds it to the current filter stack.\n *\n * @param {PIXI.MaskData} maskData - Sprite to be used as the mask\n */\n pushSpriteMask(maskData: MaskData): void\n {\n const { maskObject } = maskData;\n const target = maskData._target;\n let alphaMaskFilter = this.alphaMaskPool[this.alphaMaskIndex];\n\n if (!alphaMaskFilter)\n {\n alphaMaskFilter = this.alphaMaskPool[this.alphaMaskIndex] = [new SpriteMaskFilter(maskObject)];\n }\n\n alphaMaskFilter[0].resolution = this.renderer.resolution;\n alphaMaskFilter[0].maskSprite = maskObject;\n\n const stashFilterArea = target.filterArea;\n\n target.filterArea = maskObject.getBounds(true);\n this.renderer.filter.push(target, alphaMaskFilter);\n target.filterArea = stashFilterArea;\n\n this.alphaMaskIndex++;\n }\n\n /**\n * Removes the last filter from the filter stack and doesn't return it.\n */\n popSpriteMask(): void\n {\n this.renderer.filter.pop();\n this.alphaMaskIndex--;\n }\n}\n","import { System } from '../System';\n\nimport type { MaskData } from './MaskData';\nimport type { Renderer } from '../Renderer';\n\n/**\n * System plugin to the renderer to manage masks of certain type\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI.systems\n */\nexport class AbstractMaskSystem extends System\n{\n protected maskStack: Array;\n protected glConst: number;\n /**\n * @param {PIXI.Renderer} renderer - The renderer this System works for.\n */\n constructor(renderer: Renderer)\n {\n super(renderer);\n\n /**\n * The mask stack\n * @member {PIXI.MaskData[]}\n */\n this.maskStack = [];\n\n /**\n * Constant for gl.enable\n * @member {number}\n * @private\n */\n this.glConst = 0;\n }\n\n /**\n * gets count of masks of certain type\n * @returns {number}\n */\n getStackLength(): number\n {\n return this.maskStack.length;\n }\n\n /**\n * Changes the mask stack that is used by this System.\n *\n * @param {PIXI.MaskData[]} maskStack - The mask stack\n */\n setMaskStack(maskStack: Array): void\n {\n const { gl } = this.renderer;\n const curStackLen = this.getStackLength();\n\n this.maskStack = maskStack;\n\n const newStackLen = this.getStackLength();\n\n if (newStackLen !== curStackLen)\n {\n if (newStackLen === 0)\n {\n gl.disable(this.glConst);\n }\n else\n {\n gl.enable(this.glConst);\n this._useCurrent();\n }\n }\n }\n\n /**\n * Setup renderer to use the current mask data.\n * @private\n */\n protected _useCurrent(): void\n {\n // OVERWRITE;\n }\n\n /**\n * Destroys the mask stack.\n *\n */\n destroy(): void\n {\n super.destroy();\n\n this.maskStack = null;\n }\n}\n","import { AbstractMaskSystem } from './AbstractMaskSystem';\n\nimport type { Renderer } from '../Renderer';\nimport type { MaskData } from './MaskData';\n\n/**\n * System plugin to the renderer to manage scissor rects (used for masks).\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI.systems\n */\nexport class ScissorSystem extends AbstractMaskSystem\n{\n /**\n * @param {PIXI.Renderer} renderer - The renderer this System works for.\n */\n constructor(renderer: Renderer)\n {\n super(renderer);\n\n this.glConst = WebGLRenderingContext.SCISSOR_TEST;\n }\n\n getStackLength(): number\n {\n const maskData = this.maskStack[this.maskStack.length - 1];\n\n if (maskData)\n {\n return maskData._scissorCounter;\n }\n\n return 0;\n }\n\n /**\n * Applies the Mask and adds it to the current stencil stack. @alvin\n *\n * @param {PIXI.MaskData} maskData - The mask data\n */\n push(maskData: MaskData): void\n {\n const maskObject = maskData.maskObject;\n\n maskObject.renderable = true;\n\n const prevData = maskData._scissorRect;\n const bounds = maskObject.getBounds(true);\n const { gl } = this.renderer;\n\n maskObject.renderable = false;\n\n if (prevData)\n {\n bounds.fit(prevData);\n }\n else\n {\n gl.enable(gl.SCISSOR_TEST);\n }\n\n maskData._scissorCounter++;\n maskData._scissorRect = bounds;\n this._useCurrent();\n }\n\n /**\n * Pops scissor mask. MaskData is already removed from stack\n */\n pop(): void\n {\n const { gl } = this.renderer;\n\n if (this.getStackLength() > 0)\n {\n this._useCurrent();\n }\n else\n {\n gl.disable(gl.SCISSOR_TEST);\n }\n }\n\n /**\n * Setup renderer to use the current scissor data.\n * @private\n */\n _useCurrent(): void\n {\n const rect = this.maskStack[this.maskStack.length - 1]._scissorRect;\n const rt = this.renderer.renderTexture.current;\n const { transform, sourceFrame, destinationFrame } = this.renderer.projection;\n const resolution = rt ? rt.resolution : this.renderer.resolution;\n let x = ((rect.x - sourceFrame.x) * resolution) + destinationFrame.x;\n let y = ((rect.y - sourceFrame.y) * resolution) + destinationFrame.y;\n const width = rect.width * resolution;\n const height = rect.height * resolution;\n\n if (transform)\n {\n x += transform.tx * resolution;\n y += transform.ty * resolution;\n }\n if (!rt)\n {\n // flipY. In future we'll have it over renderTextures as an option\n y = this.renderer.height - height - y;\n }\n\n this.renderer.gl.scissor(x, y, width, height);\n }\n}\n","import { AbstractMaskSystem } from './AbstractMaskSystem';\n\nimport type { Renderer } from '../Renderer';\nimport type { IMaskTarget, MaskData } from './MaskData';\n\n/**\n * System plugin to the renderer to manage stencils (used for masks).\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI.systems\n */\nexport class StencilSystem extends AbstractMaskSystem\n{\n /**\n * @param {PIXI.Renderer} renderer - The renderer this System works for.\n */\n constructor(renderer: Renderer)\n {\n super(renderer);\n\n this.glConst = WebGLRenderingContext.STENCIL_TEST;\n }\n\n getStackLength(): number\n {\n const maskData = this.maskStack[this.maskStack.length - 1];\n\n if (maskData)\n {\n return maskData._stencilCounter;\n }\n\n return 0;\n }\n\n /**\n * Applies the Mask and adds it to the current stencil stack.\n *\n * @param {PIXI.MaskData} maskData - The mask data\n */\n push(maskData: MaskData): void\n {\n const maskObject = maskData.maskObject;\n const { gl } = this.renderer;\n const prevMaskCount = maskData._stencilCounter;\n\n if (prevMaskCount === 0)\n {\n // force use stencil texture in current framebuffer\n this.renderer.framebuffer.forceStencil();\n gl.enable(gl.STENCIL_TEST);\n }\n\n maskData._stencilCounter++;\n\n // Increment the reference stencil value where the new mask overlaps with the old ones.\n gl.colorMask(false, false, false, false);\n gl.stencilFunc(gl.EQUAL, prevMaskCount, this._getBitwiseMask());\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);\n\n maskObject.renderable = true;\n maskObject.render(this.renderer);\n this.renderer.batch.flush();\n maskObject.renderable = false;\n\n this._useCurrent();\n }\n\n /**\n * Pops stencil mask. MaskData is already removed from stack\n *\n * @param {PIXI.DisplayObject} maskObject - object of popped mask data\n */\n pop(maskObject: IMaskTarget): void\n {\n const gl = this.renderer.gl;\n\n if (this.getStackLength() === 0)\n {\n // the stack is empty!\n gl.disable(gl.STENCIL_TEST);\n gl.clear(gl.STENCIL_BUFFER_BIT);\n gl.clearStencil(0);\n }\n else\n {\n // Decrement the reference stencil value where the popped mask overlaps with the other ones\n gl.colorMask(false, false, false, false);\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);\n\n maskObject.renderable = true;\n maskObject.render(this.renderer);\n this.renderer.batch.flush();\n maskObject.renderable = false;\n\n this._useCurrent();\n }\n }\n\n /**\n * Setup renderer to use the current stencil data.\n * @private\n */\n _useCurrent(): void\n {\n const gl = this.renderer.gl;\n\n gl.colorMask(true, true, true, true);\n gl.stencilFunc(gl.EQUAL, this.getStackLength(), this._getBitwiseMask());\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\n }\n\n /**\n * Fill 1s equal to the number of acitve stencil masks.\n * @private\n * @return {number} The bitwise mask.\n */\n _getBitwiseMask(): number\n {\n return (1 << this.getStackLength()) - 1;\n }\n}\n","import { System } from '../System';\nimport { Matrix } from '@pixi/math';\n\nimport type { Rectangle } from '@pixi/math';\nimport type { Renderer } from '../Renderer';\n\n/**\n * System plugin to the renderer to manage the projection matrix.\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI.systems\n */\n\nexport class ProjectionSystem extends System\n{\n public destinationFrame: Rectangle;\n public sourceFrame: Rectangle;\n public defaultFrame: Rectangle;\n public projectionMatrix: Matrix;\n public transform: Matrix;\n\n /**\n * @param {PIXI.Renderer} renderer - The renderer this System works for.\n */\n constructor(renderer: Renderer)\n {\n super(renderer);\n\n /**\n * Destination frame\n * @member {PIXI.Rectangle}\n * @readonly\n */\n this.destinationFrame = null;\n\n /**\n * Source frame\n * @member {PIXI.Rectangle}\n * @readonly\n */\n this.sourceFrame = null;\n\n /**\n * Default destination frame\n * @member {PIXI.Rectangle}\n * @readonly\n */\n this.defaultFrame = null;\n\n /**\n * Project matrix\n * @member {PIXI.Matrix}\n * @readonly\n */\n this.projectionMatrix = new Matrix();\n\n /**\n * A transform that will be appended to the projection matrix\n * if null, nothing will be applied\n * @member {PIXI.Matrix}\n */\n this.transform = null;\n }\n\n /**\n * Updates the projection matrix based on a projection frame (which is a rectangle).\n *\n * Make sure to run `renderer.framebuffer.setViewport(destinationFrame)` after calling this.\n *\n * @param {PIXI.Rectangle} destinationFrame - The destination frame.\n * @param {PIXI.Rectangle} sourceFrame - The source frame.\n * @param {Number} resolution - Resolution\n * @param {boolean} root - If is root\n */\n update(destinationFrame: Rectangle, sourceFrame: Rectangle, resolution: number, root: boolean): void\n {\n this.destinationFrame = destinationFrame || this.destinationFrame || this.defaultFrame;\n this.sourceFrame = sourceFrame || this.sourceFrame || destinationFrame;\n\n // Calculate object-space to clip-space projection\n this.calculateProjection(this.destinationFrame, this.sourceFrame, resolution, root);\n\n if (this.transform)\n {\n this.projectionMatrix.append(this.transform);\n }\n\n const renderer = this.renderer;\n\n renderer.globalUniforms.uniforms.projectionMatrix = this.projectionMatrix;\n renderer.globalUniforms.update();\n\n // this will work for now\n // but would be sweet to stick and even on the global uniforms..\n if (renderer.shader.shader)\n {\n renderer.shader.syncUniformGroup(renderer.shader.shader.uniforms.globals);\n }\n }\n\n /**\n * Updates the projection matrix based on a projection frame (which is a rectangle)\n *\n * @param {PIXI.Rectangle} destinationFrame - The destination frame.\n * @param {PIXI.Rectangle} sourceFrame - The source frame.\n * @param {Number} resolution - Resolution\n * @param {boolean} root - If is root\n */\n calculateProjection(_destinationFrame: Rectangle, sourceFrame: Rectangle, _resolution: number, root: boolean): void\n {\n const pm = this.projectionMatrix;\n const sign = !root ? 1 : -1;\n\n pm.identity();\n\n pm.a = (1 / sourceFrame.width * 2);\n pm.d = sign * (1 / sourceFrame.height * 2);\n\n pm.tx = -1 - (sourceFrame.x * pm.a);\n pm.ty = -sign - (sourceFrame.y * pm.d);\n }\n\n /**\n * Sets the transform of the active render target to the given matrix\n *\n * @param {PIXI.Matrix} matrix - The transformation matrix\n */\n setTransform(_matrix: Matrix): void\n {\n // this._activeRenderTarget.transform = matrix;\n }\n}\n","import { System } from '../System';\nimport { Rectangle } from '@pixi/math';\nimport { BUFFER_BITS } from '@pixi/constants';\n\nimport type { Renderer } from '../Renderer';\nimport type { RenderTexture } from './RenderTexture';\nimport type { BaseRenderTexture } from './BaseRenderTexture';\nimport type { MaskData } from '../mask/MaskData';\n\n// Temporary rectangle for assigned sourceFrame or destinationFrame\nconst tempRect = new Rectangle();\n\n// Temporary rectangle for renderTexture destinationFrame\nconst tempRect2 = new Rectangle();\n\n// Temporary rectangle for passing the framebuffer viewport\nconst viewportFrame = new Rectangle();\n\n/**\n * System plugin to the renderer to manage render textures.\n *\n * Should be added after FramebufferSystem\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI.systems\n */\nexport class RenderTextureSystem extends System\n{\n public clearColor: number[];\n public defaultMaskStack: Array;\n public current: RenderTexture;\n public readonly sourceFrame: Rectangle;\n public readonly destinationFrame: Rectangle;\n\n /**\n * @param {PIXI.Renderer} renderer - The renderer this System works for.\n */\n constructor(renderer: Renderer)\n {\n super(renderer);\n\n /**\n * The clear background color as rgba\n * @member {number[]}\n */\n this.clearColor = renderer._backgroundColorRgba;\n\n // TODO move this property somewhere else!\n /**\n * List of masks for the StencilSystem\n * @member {PIXI.Graphics[]}\n * @readonly\n */\n this.defaultMaskStack = [];\n\n // empty render texture?\n /**\n * Render texture\n * @member {PIXI.RenderTexture}\n * @readonly\n */\n this.current = null;\n\n /**\n * Source frame\n * @member {PIXI.Rectangle}\n * @readonly\n */\n this.sourceFrame = new Rectangle();\n\n /**\n * Destination frame\n * @member {PIXI.Rectangle}\n * @readonly\n */\n this.destinationFrame = new Rectangle();\n }\n\n /**\n * Bind the current render texture\n *\n * @param {PIXI.RenderTexture} [renderTexture] - RenderTexture to bind, by default its `null`, the screen\n * @param {PIXI.Rectangle} [sourceFrame] - part of screen that is mapped to the renderTexture\n * @param {PIXI.Rectangle} [destinationFrame] - part of renderTexture, by default it has the same size as sourceFrame\n */\n bind(renderTexture: RenderTexture = null, sourceFrame?: Rectangle, destinationFrame?: Rectangle): void\n {\n const renderer = this.renderer;\n\n this.current = renderTexture;\n\n let baseTexture: BaseRenderTexture;\n let framebuffer;\n let resolution;\n\n if (renderTexture)\n {\n baseTexture = renderTexture.baseTexture as BaseRenderTexture;\n\n resolution = baseTexture.resolution;\n\n if (!sourceFrame)\n {\n tempRect.width = renderTexture.frame.width;\n tempRect.height = renderTexture.frame.height;\n\n sourceFrame = tempRect;\n }\n\n if (!destinationFrame)\n {\n tempRect2.x = renderTexture.frame.x;\n tempRect2.y = renderTexture.frame.y;\n tempRect2.width = sourceFrame.width;\n tempRect2.height = sourceFrame.height;\n\n destinationFrame = tempRect2;\n }\n\n framebuffer = baseTexture.framebuffer;\n }\n else\n {\n resolution = renderer.resolution;\n\n if (!sourceFrame)\n {\n tempRect.width = renderer.screen.width;\n tempRect.height = renderer.screen.height;\n\n sourceFrame = tempRect;\n }\n\n if (!destinationFrame)\n {\n destinationFrame = tempRect;\n\n destinationFrame.width = sourceFrame.width;\n destinationFrame.height = sourceFrame.height;\n }\n }\n\n viewportFrame.x = destinationFrame.x * resolution;\n viewportFrame.y = destinationFrame.y * resolution;\n viewportFrame.width = destinationFrame.width * resolution;\n viewportFrame.height = destinationFrame.height * resolution;\n\n this.renderer.framebuffer.bind(framebuffer, viewportFrame);\n this.renderer.projection.update(destinationFrame, sourceFrame, resolution, !framebuffer);\n\n if (renderTexture)\n {\n this.renderer.mask.setMaskStack(baseTexture.maskStack);\n }\n else\n {\n this.renderer.mask.setMaskStack(this.defaultMaskStack);\n }\n\n this.sourceFrame.copyFrom(sourceFrame);\n this.destinationFrame.copyFrom(destinationFrame);\n }\n\n /**\n * Erases the render texture and fills the drawing area with a colour\n *\n * @param {number[]} [clearColor] - The color as rgba, default to use the renderer backgroundColor\n * @param {PIXI.BUFFER_BITS} [mask=BUFFER_BITS.COLOR | BUFFER_BITS.DEPTH] - Bitwise OR of masks\n * that indicate the buffers to be cleared, by default COLOR and DEPTH buffers.\n * @return {PIXI.Renderer} Returns itself.\n */\n clear(clearColor?: number[], mask?: BUFFER_BITS): void\n {\n if (this.current)\n {\n clearColor = clearColor || (this.current.baseTexture as BaseRenderTexture).clearColor;\n }\n else\n {\n clearColor = clearColor || this.clearColor;\n }\n\n this.renderer.framebuffer.clear(clearColor[0], clearColor[1], clearColor[2], clearColor[3], mask);\n }\n\n resize(): void // screenWidth, screenHeight)\n {\n // resize the root only!\n this.bind(null);\n }\n\n /**\n * Resets renderTexture state\n */\n reset(): void\n {\n this.bind(null);\n }\n}\n","import type { Dict } from '@pixi/utils';\n\nexport class IGLUniformData\n{\n location: WebGLUniformLocation;\n value: number | boolean | Float32Array | Int32Array | boolean[];\n}\n\n/**\n * Helper class to create a WebGL Program\n *\n * @class\n * @memberof PIXI\n */\nexport class GLProgram\n{\n public program: WebGLProgram;\n public uniformData: Dict;\n public uniformGroups: Dict;\n /**\n * Makes a new Pixi program\n *\n * @param program {WebGLProgram} webgl program\n * @param uniformData {Object} uniforms\n */\n constructor(program: WebGLProgram, uniformData: {[key: string]: IGLUniformData})\n {\n /**\n * The shader program\n *\n * @member {WebGLProgram}\n */\n this.program = program;\n\n /**\n * holds the uniform data which contains uniform locations\n * and current uniform values used for caching and preventing unneeded GPU commands\n * @member {Object}\n */\n this.uniformData = uniformData;\n\n /**\n * uniformGroups holds the various upload functions for the shader. Each uniform group\n * and program have a unique upload function generated.\n * @member {Object}\n */\n this.uniformGroups = {};\n }\n\n /**\n * Destroys this program\n */\n destroy(): void\n {\n this.uniformData = null;\n this.uniformGroups = null;\n this.program = null;\n }\n}\n","import { System } from '../System';\nimport { GLProgram } from './GLProgram';\nimport { generateUniformsSync, unsafeEvalSupported, defaultValue, compileProgram } from './utils';\n\nimport type { IGLUniformData } from './GLProgram';\nimport type { Renderer } from '../Renderer';\nimport type { IRenderingContext } from '../IRenderingContext';\nimport type { Shader } from './Shader';\nimport type { Program } from './Program';\nimport type { UniformGroup } from './UniformGroup';\nimport type { Dict } from '@pixi/utils';\nimport type { UniformsSyncCallback } from './utils';\n\nlet UID = 0;\n// defualt sync data so we don't create a new one each time!\nconst defaultSyncData = { textureCount: 0 };\n\n/**\n * System plugin to the renderer to manage shaders.\n *\n * @class\n * @memberof PIXI.systems\n * @extends PIXI.System\n */\nexport class ShaderSystem extends System\n{\n protected gl: IRenderingContext;\n public shader: Shader;\n public program: Program;\n public id: number;\n public destroyed = false;\n private cache: Dict;\n /**\n * @param {PIXI.Renderer} renderer - The renderer this System works for.\n */\n constructor(renderer: Renderer)\n {\n super(renderer);\n\n // Validation check that this environment support `new Function`\n this.systemCheck();\n\n /**\n * The current WebGL rendering context\n *\n * @member {WebGLRenderingContext}\n */\n this.gl = null;\n\n this.shader = null;\n this.program = null;\n\n /**\n * Cache to holds the generated functions. Stored against UniformObjects unique signature\n * @type {Object}\n * @private\n */\n this.cache = {};\n\n this.id = UID++;\n }\n\n /**\n * Overrideable function by `@pixi/unsafe-eval` to silence\n * throwing an error if platform doesn't support unsafe-evals.\n *\n * @private\n */\n systemCheck(): void\n {\n if (!unsafeEvalSupported())\n {\n throw new Error('Current environment does not allow unsafe-eval, '\n + 'please use @pixi/unsafe-eval module to enable support.');\n }\n }\n\n protected contextChange(gl: IRenderingContext): void\n {\n this.gl = gl;\n this.reset();\n }\n\n /**\n * Changes the current shader to the one given in parameter\n *\n * @param {PIXI.Shader} shader - the new shader\n * @param {boolean} [dontSync] - false if the shader should automatically sync its uniforms.\n * @returns {PIXI.GLProgram} the glProgram that belongs to the shader.\n */\n bind(shader: Shader, dontSync?: boolean): GLProgram\n {\n shader.uniforms.globals = this.renderer.globalUniforms;\n\n const program = shader.program;\n const glProgram = program.glPrograms[this.renderer.CONTEXT_UID] || this.generateShader(shader);\n\n this.shader = shader;\n\n // TODO - some current Pixi plugins bypass this.. so it not safe to use yet..\n if (this.program !== program)\n {\n this.program = program;\n this.gl.useProgram(glProgram.program);\n }\n\n if (!dontSync)\n {\n defaultSyncData.textureCount = 0;\n\n this.syncUniformGroup(shader.uniformGroup, defaultSyncData);\n }\n\n return glProgram;\n }\n\n /**\n * Uploads the uniforms values to the currently bound shader.\n *\n * @param {object} uniforms - the uniforms values that be applied to the current shader\n */\n setUniforms(uniforms: Dict): void\n {\n const shader = this.shader.program;\n const glProgram = shader.glPrograms[this.renderer.CONTEXT_UID];\n\n shader.syncUniforms(glProgram.uniformData, uniforms, this.renderer);\n }\n\n /* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n /**\n *\n * syncs uniforms on the group\n * @param {*} group - the uniform group to sync\n * @param {*} [syncData] - this is data that is passed to the sync function and any nested sync functions\n */\n syncUniformGroup(group: UniformGroup, syncData?: any): void\n {\n const glProgram = this.getglProgram();\n\n if (!group.static || group.dirtyId !== glProgram.uniformGroups[group.id])\n {\n glProgram.uniformGroups[group.id] = group.dirtyId;\n\n this.syncUniforms(group, glProgram, syncData);\n }\n }\n\n /**\n * Overrideable by the @pixi/unsafe-eval package to use static\n * syncUnforms instead.\n *\n * @private\n */\n syncUniforms(group: UniformGroup, glProgram: GLProgram, syncData: any): void\n {\n const syncFunc = group.syncUniforms[this.shader.program.id] || this.createSyncGroups(group);\n\n syncFunc(glProgram.uniformData, group.uniforms, this.renderer, syncData);\n }\n /* eslint-enable @typescript-eslint/explicit-module-boundary-types */\n\n createSyncGroups(group: UniformGroup): UniformsSyncCallback\n {\n const id = this.getSignature(group, this.shader.program.uniformData);\n\n if (!this.cache[id])\n {\n this.cache[id] = generateUniformsSync(group, this.shader.program.uniformData);\n }\n\n group.syncUniforms[this.shader.program.id] = this.cache[id];\n\n return group.syncUniforms[this.shader.program.id];\n }\n\n /**\n * Takes a uniform group and data and generates a unique signature for them.\n *\n * @param {PIXI.UniformGroup} group - the uniform group to get signature of\n * @param {Object} uniformData - uniform information generated by the shader\n * @returns {String} Unique signature of the uniform group\n * @private\n */\n private getSignature(group: UniformGroup, uniformData: Dict): string\n {\n const uniforms = group.uniforms;\n\n const strings = [];\n\n for (const i in uniforms)\n {\n strings.push(i);\n\n if (uniformData[i])\n {\n strings.push(uniformData[i].type);\n }\n }\n\n return strings.join('-');\n }\n\n /**\n * Returns the underlying GLShade rof the currently bound shader.\n * This can be handy for when you to have a little more control over the setting of your uniforms.\n *\n * @return {PIXI.GLProgram} the glProgram for the currently bound Shader for this context\n */\n getglProgram(): GLProgram\n {\n if (this.shader)\n {\n return this.shader.program.glPrograms[this.renderer.CONTEXT_UID];\n }\n\n return null;\n }\n\n /**\n * Generates a glProgram version of the Shader provided.\n *\n * @private\n * @param {PIXI.Shader} shader - the shader that the glProgram will be based on.\n * @return {PIXI.GLProgram} A shiny new glProgram!\n */\n generateShader(shader: Shader): GLProgram\n {\n const gl = this.gl;\n\n const program = shader.program;\n\n const attribMap: Dict = {};\n\n for (const i in program.attributeData)\n {\n attribMap[i] = program.attributeData[i].location;\n }\n\n const shaderProgram = compileProgram(gl, program.vertexSrc, program.fragmentSrc, attribMap);\n const uniformData: {[key: string]: IGLUniformData} = {};\n\n for (const i in program.uniformData)\n {\n const data = program.uniformData[i];\n\n uniformData[i] = {\n location: gl.getUniformLocation(shaderProgram, i),\n value: defaultValue(data.type, data.size),\n };\n }\n\n const glProgram = new GLProgram(shaderProgram, uniformData);\n\n program.glPrograms[this.renderer.CONTEXT_UID] = glProgram;\n\n return glProgram;\n }\n\n /**\n * Resets ShaderSystem state, does not affect WebGL state\n */\n reset(): void\n {\n this.program = null;\n this.shader = null;\n }\n\n /**\n * Destroys this System and removes all its textures\n */\n destroy(): void\n {\n // TODO implement destroy method for ShaderSystem\n this.destroyed = true;\n }\n}\n","import { mapWebGLBlendModesToPixi } from './utils/mapWebGLBlendModesToPixi';\nimport { System } from '../System';\nimport { State } from './State';\nimport { BLEND_MODES } from '@pixi/constants';\n\nimport type { IRenderingContext } from '../IRenderingContext';\nimport type { Renderer } from '../Renderer';\n\nconst BLEND = 0;\nconst OFFSET = 1;\nconst CULLING = 2;\nconst DEPTH_TEST = 3;\nconst WINDING = 4;\n\n/**\n * System plugin to the renderer to manage WebGL state machines.\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI.systems\n */\nexport class StateSystem extends System\n{\n public stateId: number;\n public polygonOffset: number;\n public blendMode: BLEND_MODES;\n protected _blendEq: boolean;\n protected gl: IRenderingContext;\n protected blendModes: number[][];\n protected readonly map: Array<(value: boolean) => void>;\n protected readonly checks: Array<(system: this, state: State) => void>;\n protected defaultState: State;\n /**\n * @param {PIXI.Renderer} renderer - The renderer this System works for.\n */\n constructor(renderer: Renderer)\n {\n super(renderer);\n\n /**\n * GL context\n * @member {WebGLRenderingContext}\n * @readonly\n */\n this.gl = null;\n\n /**\n * State ID\n * @member {number}\n * @readonly\n */\n this.stateId = 0;\n\n /**\n * Polygon offset\n * @member {number}\n * @readonly\n */\n this.polygonOffset = 0;\n\n /**\n * Blend mode\n * @member {number}\n * @default PIXI.BLEND_MODES.NONE\n * @readonly\n */\n this.blendMode = BLEND_MODES.NONE;\n\n /**\n * Whether current blend equation is different\n * @member {boolean}\n * @protected\n */\n this._blendEq = false;\n\n /**\n * Collection of calls\n * @member {function[]}\n * @readonly\n */\n this.map = [];\n\n // map functions for when we set state..\n this.map[BLEND] = this.setBlend;\n this.map[OFFSET] = this.setOffset;\n this.map[CULLING] = this.setCullFace;\n this.map[DEPTH_TEST] = this.setDepthTest;\n this.map[WINDING] = this.setFrontFace;\n\n /**\n * Collection of check calls\n * @member {function[]}\n * @readonly\n */\n this.checks = [];\n\n /**\n * Default WebGL State\n * @member {PIXI.State}\n * @readonly\n */\n this.defaultState = new State();\n this.defaultState.blend = true;\n }\n\n contextChange(gl: IRenderingContext): void\n {\n this.gl = gl;\n\n this.blendModes = mapWebGLBlendModesToPixi(gl);\n\n this.set(this.defaultState);\n\n this.reset();\n }\n\n /**\n * Sets the current state\n *\n * @param {*} state - The state to set.\n */\n set(state: State): void\n {\n state = state || this.defaultState;\n\n // TODO maybe to an object check? ( this.state === state )?\n if (this.stateId !== state.data)\n {\n let diff = this.stateId ^ state.data;\n let i = 0;\n\n // order from least to most common\n while (diff)\n {\n if (diff & 1)\n {\n // state change!\n this.map[i].call(this, !!(state.data & (1 << i)));\n }\n\n diff = diff >> 1;\n i++;\n }\n\n this.stateId = state.data;\n }\n\n // based on the above settings we check for specific modes..\n // for example if blend is active we check and set the blend modes\n // or of polygon offset is active we check the poly depth.\n for (let i = 0; i < this.checks.length; i++)\n {\n this.checks[i](this, state);\n }\n }\n\n /**\n * Sets the state, when previous state is unknown\n *\n * @param {*} state - The state to set\n */\n forceState(state: State): void\n {\n state = state || this.defaultState;\n for (let i = 0; i < this.map.length; i++)\n {\n this.map[i].call(this, !!(state.data & (1 << i)));\n }\n for (let i = 0; i < this.checks.length; i++)\n {\n this.checks[i](this, state);\n }\n\n this.stateId = state.data;\n }\n\n /**\n * Enables or disabled blending.\n *\n * @param {boolean} value - Turn on or off webgl blending.\n */\n setBlend(value: boolean): void\n {\n this.updateCheck(StateSystem.checkBlendMode, value);\n\n this.gl[value ? 'enable' : 'disable'](this.gl.BLEND);\n }\n\n /**\n * Enables or disable polygon offset fill\n *\n * @param {boolean} value - Turn on or off webgl polygon offset testing.\n */\n setOffset(value: boolean): void\n {\n this.updateCheck(StateSystem.checkPolygonOffset, value);\n\n this.gl[value ? 'enable' : 'disable'](this.gl.POLYGON_OFFSET_FILL);\n }\n\n /**\n * Sets whether to enable or disable depth test.\n *\n * @param {boolean} value - Turn on or off webgl depth testing.\n */\n setDepthTest(value: boolean): void\n {\n this.gl[value ? 'enable' : 'disable'](this.gl.DEPTH_TEST);\n }\n\n /**\n * Sets whether to enable or disable cull face.\n *\n * @param {boolean} value - Turn on or off webgl cull face.\n */\n setCullFace(value: boolean): void\n {\n this.gl[value ? 'enable' : 'disable'](this.gl.CULL_FACE);\n }\n\n /**\n * Sets the gl front face.\n *\n * @param {boolean} value - true is clockwise and false is counter-clockwise\n */\n setFrontFace(value: boolean): void\n {\n this.gl.frontFace(this.gl[value ? 'CW' : 'CCW']);\n }\n\n /**\n * Sets the blend mode.\n *\n * @param {number} value - The blend mode to set to.\n */\n setBlendMode(value: number): void\n {\n if (value === this.blendMode)\n {\n return;\n }\n\n this.blendMode = value;\n\n const mode = this.blendModes[value];\n const gl = this.gl;\n\n if (mode.length === 2)\n {\n gl.blendFunc(mode[0], mode[1]);\n }\n else\n {\n gl.blendFuncSeparate(mode[0], mode[1], mode[2], mode[3]);\n }\n if (mode.length === 6)\n {\n this._blendEq = true;\n gl.blendEquationSeparate(mode[4], mode[5]);\n }\n else if (this._blendEq)\n {\n this._blendEq = false;\n gl.blendEquationSeparate(gl.FUNC_ADD, gl.FUNC_ADD);\n }\n }\n\n /**\n * Sets the polygon offset.\n *\n * @param {number} value - the polygon offset\n * @param {number} scale - the polygon offset scale\n */\n setPolygonOffset(value: number, scale: number): void\n {\n this.gl.polygonOffset(value, scale);\n }\n\n // used\n /**\n * Resets all the logic and disables the vaos\n */\n reset(): void\n {\n this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL, false);\n\n this.forceState(this.defaultState);\n\n this._blendEq = true;\n this.blendMode = -1;\n this.setBlendMode(0);\n }\n\n /**\n * checks to see which updates should be checked based on which settings have been activated.\n * For example, if blend is enabled then we should check the blend modes each time the state is changed\n * or if polygon fill is activated then we need to check if the polygon offset changes.\n * The idea is that we only check what we have too.\n *\n * @param {Function} func - the checking function to add or remove\n * @param {boolean} value - should the check function be added or removed.\n */\n updateCheck(func: (system: this, state: State) => void, value: boolean): void\n {\n const index = this.checks.indexOf(func);\n\n if (value && index === -1)\n {\n this.checks.push(func);\n }\n else if (!value && index !== -1)\n {\n this.checks.splice(index, 1);\n }\n }\n\n /**\n * A private little wrapper function that we call to check the blend mode.\n *\n * @static\n * @private\n * @param {PIXI.StateSystem} System - the System to perform the state check on\n * @param {PIXI.State} state - the state that the blendMode will pulled from\n */\n static checkBlendMode(system: StateSystem, state: State): void\n {\n system.setBlendMode(state.blendMode);\n }\n\n /**\n * A private little wrapper function that we call to check the polygon offset.\n *\n * @static\n * @private\n * @param {PIXI.StateSystem} System - the System to perform the state check on\n * @param {PIXI.State} state - the state that the blendMode will pulled from\n */\n static checkPolygonOffset(system: StateSystem, state: State): void\n {\n system.setPolygonOffset(1, state.polygonOffset);\n }\n}\n","import { BLEND_MODES } from '@pixi/constants';\n\n/**\n * Maps gl blend combinations to WebGL.\n *\n * @memberof PIXI\n * @function mapWebGLBlendModesToPixi\n * @private\n * @param {WebGLRenderingContext} gl - The rendering context.\n * @param {number[][]} [array=[]] - The array to output into.\n * @return {number[][]} Mapped modes.\n */\nexport function mapWebGLBlendModesToPixi(gl: WebGLRenderingContextBase, array: number[][] = []): number[][]\n{\n // TODO - premultiply alpha would be different.\n // add a boolean for that!\n array[BLEND_MODES.NORMAL] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n array[BLEND_MODES.ADD] = [gl.ONE, gl.ONE];\n array[BLEND_MODES.MULTIPLY] = [gl.DST_COLOR, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n array[BLEND_MODES.SCREEN] = [gl.ONE, gl.ONE_MINUS_SRC_COLOR, gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n array[BLEND_MODES.OVERLAY] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n array[BLEND_MODES.DARKEN] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n array[BLEND_MODES.LIGHTEN] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n array[BLEND_MODES.COLOR_DODGE] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n array[BLEND_MODES.COLOR_BURN] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n array[BLEND_MODES.HARD_LIGHT] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n array[BLEND_MODES.SOFT_LIGHT] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n array[BLEND_MODES.DIFFERENCE] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n array[BLEND_MODES.EXCLUSION] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n array[BLEND_MODES.HUE] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n array[BLEND_MODES.SATURATION] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n array[BLEND_MODES.COLOR] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n array[BLEND_MODES.LUMINOSITY] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n array[BLEND_MODES.NONE] = [0, 0];\n\n // not-premultiplied blend modes\n array[BLEND_MODES.NORMAL_NPM] = [gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n array[BLEND_MODES.ADD_NPM] = [gl.SRC_ALPHA, gl.ONE, gl.ONE, gl.ONE];\n array[BLEND_MODES.SCREEN_NPM] = [gl.SRC_ALPHA, gl.ONE_MINUS_SRC_COLOR, gl.ONE, gl.ONE_MINUS_SRC_ALPHA];\n\n // composite operations\n array[BLEND_MODES.SRC_IN] = [gl.DST_ALPHA, gl.ZERO];\n array[BLEND_MODES.SRC_OUT] = [gl.ONE_MINUS_DST_ALPHA, gl.ZERO];\n array[BLEND_MODES.SRC_ATOP] = [gl.DST_ALPHA, gl.ONE_MINUS_SRC_ALPHA];\n array[BLEND_MODES.DST_OVER] = [gl.ONE_MINUS_DST_ALPHA, gl.ONE];\n array[BLEND_MODES.DST_IN] = [gl.ZERO, gl.SRC_ALPHA];\n array[BLEND_MODES.DST_OUT] = [gl.ZERO, gl.ONE_MINUS_SRC_ALPHA];\n array[BLEND_MODES.DST_ATOP] = [gl.ONE_MINUS_DST_ALPHA, gl.SRC_ALPHA];\n array[BLEND_MODES.XOR] = [gl.ONE_MINUS_DST_ALPHA, gl.ONE_MINUS_SRC_ALPHA];\n\n // SUBTRACT from flash\n array[BLEND_MODES.SUBTRACT] = [gl.ONE, gl.ONE, gl.ONE, gl.ONE, gl.FUNC_REVERSE_SUBTRACT, gl.FUNC_ADD];\n\n return array;\n}\n","import { System } from '../System';\nimport { GC_MODES } from '@pixi/constants';\nimport { settings } from '@pixi/settings';\n\nimport type { Renderer } from '../Renderer';\nimport type { Texture } from './Texture';\nimport type { RenderTexture } from '../renderTexture/RenderTexture';\n\nexport interface IUnloadableTexture {\n _texture: Texture | RenderTexture;\n children: IUnloadableTexture[];\n}\n\n/**\n * System plugin to the renderer to manage texture garbage collection on the GPU,\n * ensuring that it does not get clogged up with textures that are no longer being used.\n *\n * @class\n * @memberof PIXI.systems\n * @extends PIXI.System\n */\nexport class TextureGCSystem extends System\n{\n public count: number;\n public checkCount: number;\n public maxIdle: number;\n public checkCountMax: number;\n public mode: number;\n /**\n * @param {PIXI.Renderer} renderer - The renderer this System works for.\n */\n constructor(renderer: Renderer)\n {\n super(renderer);\n\n /**\n * Count\n * @member {number}\n * @readonly\n */\n this.count = 0;\n\n /**\n * Check count\n * @member {number}\n * @readonly\n */\n this.checkCount = 0;\n\n /**\n * Maximum idle time, in seconds\n * @member {number}\n * @see PIXI.settings.GC_MAX_IDLE\n */\n this.maxIdle = settings.GC_MAX_IDLE;\n\n /**\n * Maximum number of item to check\n * @member {number}\n * @see PIXI.settings.GC_MAX_CHECK_COUNT\n */\n this.checkCountMax = settings.GC_MAX_CHECK_COUNT;\n\n /**\n * Current garabage collection mode\n * @member {PIXI.GC_MODES}\n * @see PIXI.settings.GC_MODE\n */\n this.mode = settings.GC_MODE;\n }\n\n /**\n * Checks to see when the last time a texture was used\n * if the texture has not been used for a specified amount of time it will be removed from the GPU\n */\n protected postrender(): void\n {\n if (!this.renderer.renderingToScreen)\n {\n return;\n }\n\n this.count++;\n\n if (this.mode === GC_MODES.MANUAL)\n {\n return;\n }\n\n this.checkCount++;\n\n if (this.checkCount > this.checkCountMax)\n {\n this.checkCount = 0;\n\n this.run();\n }\n }\n\n /**\n * Checks to see when the last time a texture was used\n * if the texture has not been used for a specified amount of time it will be removed from the GPU\n */\n run(): void\n {\n const tm = this.renderer.texture;\n const managedTextures = tm.managedTextures;\n let wasRemoved = false;\n\n for (let i = 0; i < managedTextures.length; i++)\n {\n const texture = managedTextures[i];\n\n // only supports non generated textures at the moment!\n if (!(texture as any).framebuffer && this.count - texture.touched > this.maxIdle)\n {\n tm.destroyTexture(texture, true);\n managedTextures[i] = null;\n wasRemoved = true;\n }\n }\n\n if (wasRemoved)\n {\n let j = 0;\n\n for (let i = 0; i < managedTextures.length; i++)\n {\n if (managedTextures[i] !== null)\n {\n managedTextures[j++] = managedTextures[i];\n }\n }\n\n managedTextures.length = j;\n }\n }\n\n /**\n * Removes all the textures within the specified displayObject and its children from the GPU\n *\n * @param {PIXI.DisplayObject} displayObject - the displayObject to remove the textures from.\n */\n unload(displayObject: IUnloadableTexture): void\n {\n const tm = this.renderer.texture;\n\n // only destroy non generated textures\n if ((displayObject._texture as RenderTexture)?.framebuffer)\n {\n tm.destroyTexture(displayObject._texture);\n }\n\n for (let i = displayObject.children.length - 1; i >= 0; i--)\n {\n this.unload(displayObject.children[i]);\n }\n }\n}\n","/**\n * Internal texture for WebGL context\n * @class\n * @memberof PIXI\n */\nexport class GLTexture\n{\n public texture: WebGLTexture;\n public width: number;\n public height: number;\n public mipmap: boolean;\n public wrapMode: number;\n public type: number;\n public internalFormat: number;\n dirtyId: number;\n dirtyStyleId: number;\n\n constructor(texture: WebGLTexture)\n {\n /**\n * The WebGL texture\n * @member {WebGLTexture}\n */\n this.texture = texture;\n\n /**\n * Width of texture that was used in texImage2D\n * @member {number}\n */\n this.width = -1;\n\n /**\n * Height of texture that was used in texImage2D\n * @member {number}\n */\n this.height = -1;\n\n /**\n * Texture contents dirty flag\n * @member {number}\n */\n this.dirtyId = -1;\n\n /**\n * Texture style dirty flag\n * @member {number}\n */\n this.dirtyStyleId = -1;\n\n /**\n * Whether mip levels has to be generated\n * @member {boolean}\n */\n this.mipmap = false;\n\n /**\n * WrapMode copied from baseTexture\n * @member {number}\n */\n this.wrapMode = 33071;\n\n /**\n * Type copied from baseTexture\n * @member {number}\n */\n this.type = 6408;\n\n /**\n * Type copied from baseTexture\n * @member {number}\n */\n this.internalFormat = 5121;\n }\n}\n","import { System } from '../System';\nimport { BaseTexture } from './BaseTexture';\nimport { GLTexture } from './GLTexture';\nimport { removeItems } from '@pixi/utils';\nimport { MIPMAP_MODES, WRAP_MODES, SCALE_MODES, TYPES } from '@pixi/constants';\n\nimport type { Texture } from './Texture';\nimport type { IRenderingContext } from '../IRenderingContext';\nimport type { Renderer } from '../Renderer';\n/**\n * System plugin to the renderer to manage textures.\n *\n * @class\n * @extends PIXI.System\n * @memberof PIXI.systems\n */\nexport class TextureSystem extends System\n{\n public boundTextures: BaseTexture[];\n public managedTextures: Array;\n protected CONTEXT_UID: number;\n protected gl: IRenderingContext;\n protected webGLVersion: number;\n protected unknownTexture: BaseTexture;\n protected _unknownBoundTextures: boolean;\n currentLocation: number;\n emptyTextures: {[key: number]: GLTexture};\n\n /**\n * @param {PIXI.Renderer} renderer - The renderer this System works for.\n */\n constructor(renderer: Renderer)\n {\n super(renderer);\n\n // TODO set to max textures...\n /**\n * Bound textures\n * @member {PIXI.BaseTexture[]}\n * @readonly\n */\n this.boundTextures = [];\n /**\n * Current location\n * @member {number}\n * @readonly\n */\n this.currentLocation = -1;\n\n /**\n * List of managed textures\n * @member {PIXI.BaseTexture[]}\n * @readonly\n */\n this.managedTextures = [];\n\n /**\n * Did someone temper with textures state? We'll overwrite them when we need to unbind something.\n * @member {boolean}\n * @private\n */\n this._unknownBoundTextures = false;\n\n /**\n * BaseTexture value that shows that we don't know what is bound\n * @member {PIXI.BaseTexture}\n * @readonly\n */\n this.unknownTexture = new BaseTexture();\n }\n\n /**\n * Sets up the renderer context and necessary buffers.\n */\n contextChange(): void\n {\n const gl = this.gl = this.renderer.gl;\n\n this.CONTEXT_UID = this.renderer.CONTEXT_UID;\n\n this.webGLVersion = this.renderer.context.webGLVersion;\n\n const maxTextures = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);\n\n this.boundTextures.length = maxTextures;\n\n for (let i = 0; i < maxTextures; i++)\n {\n this.boundTextures[i] = null;\n }\n\n // TODO move this.. to a nice make empty textures class..\n this.emptyTextures = {};\n\n const emptyTexture2D = new GLTexture(gl.createTexture());\n\n gl.bindTexture(gl.TEXTURE_2D, emptyTexture2D.texture);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4));\n\n this.emptyTextures[gl.TEXTURE_2D] = emptyTexture2D;\n this.emptyTextures[gl.TEXTURE_CUBE_MAP] = new GLTexture(gl.createTexture());\n\n gl.bindTexture(gl.TEXTURE_CUBE_MAP, this.emptyTextures[gl.TEXTURE_CUBE_MAP].texture);\n\n for (let i = 0; i < 6; i++)\n {\n gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);\n }\n\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n\n for (let i = 0; i < this.boundTextures.length; i++)\n {\n this.bind(null, i);\n }\n }\n\n /**\n * Bind a texture to a specific location\n *\n * If you want to unbind something, please use `unbind(texture)` instead of `bind(null, textureLocation)`\n *\n * @param {PIXI.Texture|PIXI.BaseTexture} texture_ - Texture to bind\n * @param {number} [location=0] - Location to bind at\n */\n bind(texture: Texture|BaseTexture, location = 0): void\n {\n const { gl } = this;\n\n if (texture)\n {\n texture = texture.castToBaseTexture();\n\n if (texture.parentTextureArray)\n {\n // cannot bind partial texture\n // TODO: report a warning\n return;\n }\n\n if (texture.valid)\n {\n texture.touched = this.renderer.textureGC.count;\n\n const glTexture = texture._glTextures[this.CONTEXT_UID] || this.initTexture(texture);\n\n if (this.boundTextures[location] !== texture)\n {\n if (this.currentLocation !== location)\n {\n this.currentLocation = location;\n gl.activeTexture(gl.TEXTURE0 + location);\n }\n gl.bindTexture(texture.target, glTexture.texture);\n }\n\n if (glTexture.dirtyId !== texture.dirtyId)\n {\n if (this.currentLocation !== location)\n {\n this.currentLocation = location;\n gl.activeTexture(gl.TEXTURE0 + location);\n }\n this.updateTexture(texture);\n }\n\n this.boundTextures[location] = texture;\n }\n }\n else\n {\n if (this.currentLocation !== location)\n {\n this.currentLocation = location;\n gl.activeTexture(gl.TEXTURE0 + location);\n }\n\n gl.bindTexture(gl.TEXTURE_2D, this.emptyTextures[gl.TEXTURE_2D].texture);\n this.boundTextures[location] = null;\n }\n }\n\n /**\n * Resets texture location and bound textures\n *\n * Actual `bind(null, i)` calls will be performed at next `unbind()` call\n */\n reset(): void\n {\n this._unknownBoundTextures = true;\n this.currentLocation = -1;\n\n for (let i = 0; i < this.boundTextures.length; i++)\n {\n this.boundTextures[i] = this.unknownTexture;\n }\n }\n\n /**\n * Unbind a texture\n * @param {PIXI.BaseTexture} texture - Texture to bind\n */\n unbind(texture?: BaseTexture): void\n {\n const { gl, boundTextures } = this;\n\n if (this._unknownBoundTextures)\n {\n this._unknownBoundTextures = false;\n // someone changed webGL state,\n // we have to be sure that our texture does not appear in multi-texture renderer samplers\n for (let i = 0; i < boundTextures.length; i++)\n {\n if (boundTextures[i] === this.unknownTexture)\n {\n this.bind(null, i);\n }\n }\n }\n\n for (let i = 0; i < boundTextures.length; i++)\n {\n if (boundTextures[i] === texture)\n {\n if (this.currentLocation !== i)\n {\n gl.activeTexture(gl.TEXTURE0 + i);\n this.currentLocation = i;\n }\n\n gl.bindTexture(gl.TEXTURE_2D, this.emptyTextures[texture.target].texture);\n boundTextures[i] = null;\n }\n }\n }\n\n /**\n * Initialize a texture\n *\n * @private\n * @param {PIXI.BaseTexture} texture - Texture to initialize\n */\n initTexture(texture: BaseTexture): GLTexture\n {\n const glTexture = new GLTexture(this.gl.createTexture());\n\n // guarantee an update..\n glTexture.dirtyId = -1;\n\n texture._glTextures[this.CONTEXT_UID] = glTexture;\n\n this.managedTextures.push(texture);\n texture.on('dispose', this.destroyTexture, this);\n\n return glTexture;\n }\n\n initTextureType(texture: BaseTexture, glTexture: GLTexture): void\n {\n glTexture.internalFormat = texture.format;\n glTexture.type = texture.type;\n if (this.webGLVersion !== 2)\n {\n return;\n }\n const gl = this.renderer.gl;\n\n if (texture.type === gl.FLOAT\n && texture.format === gl.RGBA)\n {\n glTexture.internalFormat = gl.RGBA32F;\n }\n // that's WebGL1 HALF_FLOAT_OES\n // we have to convert it to WebGL HALF_FLOAT\n if (texture.type === TYPES.HALF_FLOAT)\n {\n glTexture.type = gl.HALF_FLOAT;\n }\n if (glTexture.type === gl.HALF_FLOAT\n && texture.format === gl.RGBA)\n {\n glTexture.internalFormat = gl.RGBA16F;\n }\n }\n\n /**\n * Update a texture\n *\n * @private\n * @param {PIXI.BaseTexture} texture - Texture to initialize\n */\n updateTexture(texture: BaseTexture): void\n {\n const glTexture = texture._glTextures[this.CONTEXT_UID];\n\n if (!glTexture)\n {\n return;\n }\n\n const renderer = this.renderer;\n\n this.initTextureType(texture, glTexture);\n\n if (texture.resource && texture.resource.upload(renderer, texture, glTexture))\n {\n // texture is uploaded, dont do anything!\n }\n else\n {\n // default, renderTexture-like logic\n const width = texture.realWidth;\n const height = texture.realHeight;\n const gl = renderer.gl;\n\n if (glTexture.width !== width\n || glTexture.height !== height\n || glTexture.dirtyId < 0)\n {\n glTexture.width = width;\n glTexture.height = height;\n\n gl.texImage2D(texture.target, 0,\n glTexture.internalFormat,\n width,\n height,\n 0,\n texture.format,\n glTexture.type,\n null);\n }\n }\n\n // lets only update what changes..\n if (texture.dirtyStyleId !== glTexture.dirtyStyleId)\n {\n this.updateTextureStyle(texture);\n }\n glTexture.dirtyId = texture.dirtyId;\n }\n\n /**\n * Deletes the texture from WebGL\n *\n * @private\n * @param {PIXI.BaseTexture|PIXI.Texture} texture_ - the texture to destroy\n * @param {boolean} [skipRemove=false] - Whether to skip removing the texture from the TextureManager.\n */\n destroyTexture(texture: BaseTexture|Texture, skipRemove?: boolean): void\n {\n const { gl } = this;\n\n texture = texture.castToBaseTexture();\n\n if (texture._glTextures[this.CONTEXT_UID])\n {\n this.unbind(texture);\n\n gl.deleteTexture(texture._glTextures[this.CONTEXT_UID].texture);\n texture.off('dispose', this.destroyTexture, this);\n\n delete texture._glTextures[this.CONTEXT_UID];\n\n if (!skipRemove)\n {\n const i = this.managedTextures.indexOf(texture);\n\n if (i !== -1)\n {\n removeItems(this.managedTextures, i, 1);\n }\n }\n }\n }\n\n /**\n * Update texture style such as mipmap flag\n *\n * @private\n * @param {PIXI.BaseTexture} texture - Texture to update\n */\n updateTextureStyle(texture: BaseTexture): void\n {\n const glTexture = texture._glTextures[this.CONTEXT_UID];\n\n if (!glTexture)\n {\n return;\n }\n\n if ((texture.mipmap === MIPMAP_MODES.POW2 || this.webGLVersion !== 2) && !texture.isPowerOfTwo)\n {\n glTexture.mipmap = false;\n }\n else\n {\n glTexture.mipmap = texture.mipmap >= 1;\n }\n\n if (this.webGLVersion !== 2 && !texture.isPowerOfTwo)\n {\n glTexture.wrapMode = WRAP_MODES.CLAMP;\n }\n else\n {\n glTexture.wrapMode = texture.wrapMode;\n }\n\n if (texture.resource && texture.resource.style(this.renderer, texture, glTexture))\n {\n // style is set, dont do anything!\n }\n else\n {\n this.setStyle(texture, glTexture);\n }\n\n glTexture.dirtyStyleId = texture.dirtyStyleId;\n }\n\n /**\n * Set style for texture\n *\n * @private\n * @param {PIXI.BaseTexture} texture - Texture to update\n * @param {PIXI.GLTexture} glTexture\n */\n setStyle(texture: BaseTexture, glTexture: GLTexture): void\n {\n const gl = this.gl;\n\n if (glTexture.mipmap)\n {\n gl.generateMipmap(texture.target);\n }\n\n gl.texParameteri(texture.target, gl.TEXTURE_WRAP_S, glTexture.wrapMode);\n gl.texParameteri(texture.target, gl.TEXTURE_WRAP_T, glTexture.wrapMode);\n\n if (glTexture.mipmap)\n {\n /* eslint-disable max-len */\n gl.texParameteri(texture.target, gl.TEXTURE_MIN_FILTER, texture.scaleMode === SCALE_MODES.LINEAR ? gl.LINEAR_MIPMAP_LINEAR : gl.NEAREST_MIPMAP_NEAREST);\n /* eslint-disable max-len */\n\n const anisotropicExt = this.renderer.context.extensions.anisotropicFiltering;\n\n if (anisotropicExt && texture.anisotropicLevel > 0 && texture.scaleMode === SCALE_MODES.LINEAR)\n {\n const level = Math.min(texture.anisotropicLevel, gl.getParameter(anisotropicExt.MAX_TEXTURE_MAX_ANISOTROPY_EXT));\n\n gl.texParameterf(texture.target, anisotropicExt.TEXTURE_MAX_ANISOTROPY_EXT, level);\n }\n }\n else\n {\n gl.texParameteri(texture.target, gl.TEXTURE_MIN_FILTER, texture.scaleMode === SCALE_MODES.LINEAR ? gl.LINEAR : gl.NEAREST);\n }\n\n gl.texParameteri(texture.target, gl.TEXTURE_MAG_FILTER, texture.scaleMode === SCALE_MODES.LINEAR ? gl.LINEAR : gl.NEAREST);\n }\n}\n","import { hex2string, hex2rgb, deprecation, EventEmitter } from '@pixi/utils';\nimport { Matrix, Rectangle } from '@pixi/math';\nimport { RENDERER_TYPE } from '@pixi/constants';\nimport { settings } from '@pixi/settings';\nimport { DisplayObject } from '@pixi/display';\nimport { RenderTexture } from './renderTexture/RenderTexture';\n\nimport type { SCALE_MODES } from '@pixi/constants';\nimport type { IRenderingContext } from './IRenderingContext';\nimport type { Container } from '@pixi/display';\n\nconst tempMatrix = new Matrix();\n\nexport interface IRendererOptions extends GlobalMixins.IRendererOptions\n{\n width?: number;\n height?: number;\n view?: HTMLCanvasElement;\n transparent?: boolean | 'notMultiplied';\n autoDensity?: boolean;\n antialias?: boolean;\n resolution?: number;\n preserveDrawingBuffer?: boolean;\n clearBeforeRender?: boolean;\n backgroundColor?: number;\n powerPreference?: WebGLPowerPreference;\n context?: IRenderingContext;\n}\n\ninterface IRendererOptionsLegacy extends IRendererOptions\n{\n autoResize?: boolean;\n roundPixels?: boolean;\n}\n\nexport interface IRendererPlugins\n{\n [key: string]: any;\n}\n\n/**\n * The AbstractRenderer is the base for a PixiJS Renderer. It is extended by the {@link PIXI.CanvasRenderer}\n * and {@link PIXI.Renderer} which can be used for rendering a PixiJS scene.\n *\n * @abstract\n * @class\n * @extends PIXI.utils.EventEmitter\n * @memberof PIXI\n */\nexport abstract class AbstractRenderer extends EventEmitter\n{\n public resolution: number;\n public clearBeforeRender?: boolean;\n public readonly options: IRendererOptions;\n public readonly type: RENDERER_TYPE;\n public readonly screen: Rectangle;\n public readonly view: HTMLCanvasElement;\n public readonly plugins: IRendererPlugins;\n public readonly transparent: boolean | 'notMultiplied';\n public readonly autoDensity: boolean;\n public readonly preserveDrawingBuffer: boolean;\n\n protected _backgroundColor: number;\n protected _backgroundColorString: string;\n _backgroundColorRgba: number[];\n _lastObjectRendered: DisplayObject;\n\n /**\n * @param {string} system - The name of the system this renderer is for.\n * @param {object} [options] - The optional renderer parameters.\n * @param {number} [options.width=800] - The width of the screen.\n * @param {number} [options.height=600] - The height of the screen.\n * @param {HTMLCanvasElement} [options.view] - The canvas to use as a view, optional.\n * @param {boolean} [options.transparent=false] - If the render view is transparent.\n * @param {boolean} [options.autoDensity=false] - Resizes renderer view in CSS pixels to allow for\n * resolutions other than 1.\n * @param {boolean} [options.antialias=false] - Sets antialias\n * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the renderer. The\n * resolution of the renderer retina would be 2.\n * @param {boolean} [options.preserveDrawingBuffer=false] - Enables drawing buffer preservation,\n * enable this if you need to call toDataUrl on the WebGL context.\n * @param {boolean} [options.clearBeforeRender=true] - This sets if the renderer will clear the canvas or\n * not before the new render pass.\n * @param {number} [options.backgroundColor=0x000000] - The background color of the rendered area\n * (shown if not transparent).\n */\n constructor(type: RENDERER_TYPE = RENDERER_TYPE.UNKNOWN, options?: IRendererOptions)\n {\n super();\n\n // Add the default render options\n options = Object.assign({}, settings.RENDER_OPTIONS, options);\n\n // Deprecation notice for renderer roundPixels option\n if ((options as IRendererOptionsLegacy).roundPixels)\n {\n settings.ROUND_PIXELS = (options as IRendererOptionsLegacy).roundPixels;\n deprecation('5.0.0', 'Renderer roundPixels option is deprecated, please use PIXI.settings.ROUND_PIXELS', 2);\n }\n\n /**\n * The supplied constructor options.\n *\n * @member {Object}\n * @readOnly\n */\n this.options = options;\n\n /**\n * The type of the renderer.\n *\n * @member {number}\n * @default PIXI.RENDERER_TYPE.UNKNOWN\n * @see PIXI.RENDERER_TYPE\n */\n this.type = type;\n\n /**\n * Measurements of the screen. (0, 0, screenWidth, screenHeight).\n *\n * Its safe to use as filterArea or hitArea for the whole stage.\n *\n * @member {PIXI.Rectangle}\n */\n this.screen = new Rectangle(0, 0, options.width, options.height);\n\n /**\n * The canvas element that everything is drawn to.\n *\n * @member {HTMLCanvasElement}\n */\n this.view = options.view || document.createElement('canvas');\n\n /**\n * The resolution / device pixel ratio of the renderer.\n *\n * @member {number}\n * @default 1\n */\n this.resolution = options.resolution || settings.RESOLUTION;\n\n /**\n * Whether the render view is transparent.\n *\n * @member {boolean}\n */\n this.transparent = options.transparent;\n\n /**\n * Whether CSS dimensions of canvas view should be resized to screen dimensions automatically.\n *\n * @member {boolean}\n */\n this.autoDensity = options.autoDensity || (options as IRendererOptionsLegacy).autoResize || false;\n // autoResize is deprecated, provides fallback support\n\n /**\n * The value of the preserveDrawingBuffer flag affects whether or not the contents of\n * the stencil buffer is retained after rendering.\n *\n * @member {boolean}\n */\n this.preserveDrawingBuffer = options.preserveDrawingBuffer;\n\n /**\n * This sets if the CanvasRenderer will clear the canvas or not before the new render pass.\n * If the scene is NOT transparent PixiJS will use a canvas sized fillRect operation every\n * frame to set the canvas background color. If the scene is transparent PixiJS will use clearRect\n * to clear the canvas every frame. Disable this by setting this to false. For example, if\n * your game has a canvas filling background image you often don't need this set.\n *\n * @member {boolean}\n * @default\n */\n this.clearBeforeRender = options.clearBeforeRender;\n\n /**\n * The background color as a number.\n *\n * @member {number}\n * @protected\n */\n this._backgroundColor = 0x000000;\n\n /**\n * The background color as an [R, G, B] array.\n *\n * @member {number[]}\n * @protected\n */\n this._backgroundColorRgba = [0, 0, 0, 0];\n\n /**\n * The background color as a string.\n *\n * @member {string}\n * @protected\n */\n this._backgroundColorString = '#000000';\n\n this.backgroundColor = options.backgroundColor || this._backgroundColor; // run bg color setter\n\n /**\n * The last root object that the renderer tried to render.\n *\n * @member {PIXI.DisplayObject}\n * @protected\n */\n this._lastObjectRendered = null;\n\n /**\n * Collection of plugins.\n * @readonly\n * @member {object}\n */\n this.plugins = {};\n }\n\n /**\n * Initialize the plugins.\n *\n * @protected\n * @param {object} staticMap - The dictionary of statically saved plugins.\n */\n initPlugins(staticMap: IRendererPlugins): void\n {\n for (const o in staticMap)\n {\n this.plugins[o] = new (staticMap[o])(this);\n }\n }\n\n /**\n * Same as view.width, actual number of pixels in the canvas by horizontal.\n *\n * @member {number}\n * @readonly\n * @default 800\n */\n get width(): number\n {\n return this.view.width;\n }\n\n /**\n * Same as view.height, actual number of pixels in the canvas by vertical.\n *\n * @member {number}\n * @readonly\n * @default 600\n */\n get height(): number\n {\n return this.view.height;\n }\n\n /**\n * Resizes the screen and canvas to the specified width and height.\n * Canvas dimensions are multiplied by resolution.\n *\n * @param {number} screenWidth - The new width of the screen.\n * @param {number} screenHeight - The new height of the screen.\n */\n resize(screenWidth: number, screenHeight: number): void\n {\n this.screen.width = screenWidth;\n this.screen.height = screenHeight;\n\n this.view.width = screenWidth * this.resolution;\n this.view.height = screenHeight * this.resolution;\n\n if (this.autoDensity)\n {\n this.view.style.width = `${screenWidth}px`;\n this.view.style.height = `${screenHeight}px`;\n }\n\n /**\n * Fired after view has been resized.\n *\n * @event PIXI.Renderer#resize\n * @param {number} screenWidth - The new width of the screen.\n * @param {number} screenHeight - The new height of the screen.\n */\n this.emit('resize', screenWidth, screenHeight);\n }\n\n /**\n * Useful function that returns a texture of the display object that can then be used to create sprites\n * This can be quite useful if your displayObject is complicated and needs to be reused multiple times.\n *\n * @param {PIXI.DisplayObject} displayObject - The displayObject the object will be generated from.\n * @param {PIXI.SCALE_MODES} scaleMode - The scale mode of the texture.\n * @param {number} resolution - The resolution / device pixel ratio of the texture being generated.\n * @param {PIXI.Rectangle} [region] - The region of the displayObject, that shall be rendered,\n * if no region is specified, defaults to the local bounds of the displayObject.\n * @return {PIXI.RenderTexture} A texture of the graphics object.\n */\n generateTexture(displayObject: DisplayObject,\n scaleMode?: SCALE_MODES, resolution?: number, region?: Rectangle): RenderTexture\n {\n region = region || (displayObject as Container).getLocalBounds(null, true);\n\n // minimum texture size is 1x1, 0x0 will throw an error\n if (region.width === 0) region.width = 1;\n if (region.height === 0) region.height = 1;\n\n const renderTexture = RenderTexture.create(\n {\n width: region.width | 0,\n height: region.height | 0,\n scaleMode,\n resolution,\n });\n\n tempMatrix.tx = -region.x;\n tempMatrix.ty = -region.y;\n\n this.render(displayObject, renderTexture, false, tempMatrix, !!displayObject.parent);\n\n return renderTexture;\n }\n\n abstract render(displayObject: DisplayObject, renderTexture?: RenderTexture,\n clear?: boolean, transform?: Matrix, skipUpdateTransform?: boolean): void;\n\n /**\n * Removes everything from the renderer and optionally removes the Canvas DOM element.\n *\n * @param {boolean} [removeView=false] - Removes the Canvas element from the DOM.\n */\n destroy(removeView?: boolean): void\n {\n for (const o in this.plugins)\n {\n this.plugins[o].destroy();\n this.plugins[o] = null;\n }\n\n if (removeView && this.view.parentNode)\n {\n this.view.parentNode.removeChild(this.view);\n }\n\n const thisAny = this as any;\n\n // null-ing all objects, that's a tradition!\n\n thisAny.plugins = null;\n thisAny.type = RENDERER_TYPE.UNKNOWN;\n thisAny.view = null;\n thisAny.screen = null;\n thisAny._tempDisplayObjectParent = null;\n thisAny.options = null;\n this._backgroundColorRgba = null;\n this._backgroundColorString = null;\n this._lastObjectRendered = null;\n }\n\n /**\n * The background color to fill if not transparent\n *\n * @member {number}\n */\n get backgroundColor(): number\n {\n return this._backgroundColor;\n }\n\n set backgroundColor(value: number)\n {\n this._backgroundColor = value;\n this._backgroundColorString = hex2string(value);\n hex2rgb(value, this._backgroundColorRgba);\n }\n}\n","import { AbstractRenderer } from './AbstractRenderer';\nimport { sayHello, isWebGLSupported } from '@pixi/utils';\nimport { MaskSystem } from './mask/MaskSystem';\nimport { StencilSystem } from './mask/StencilSystem';\nimport { ScissorSystem } from './mask/ScissorSystem';\nimport { FilterSystem } from './filters/FilterSystem';\nimport { FramebufferSystem } from './framebuffer/FramebufferSystem';\nimport { RenderTextureSystem } from './renderTexture/RenderTextureSystem';\nimport { TextureSystem } from './textures/TextureSystem';\nimport { ProjectionSystem } from './projection/ProjectionSystem';\nimport { StateSystem } from './state/StateSystem';\nimport { GeometrySystem } from './geometry/GeometrySystem';\nimport { ShaderSystem } from './shader/ShaderSystem';\nimport { ContextSystem } from './context/ContextSystem';\nimport { BatchSystem } from './batch/BatchSystem';\nimport { TextureGCSystem } from './textures/TextureGCSystem';\nimport { RENDERER_TYPE } from '@pixi/constants';\nimport { UniformGroup } from './shader/UniformGroup';\nimport { Matrix } from '@pixi/math';\nimport { Runner } from '@pixi/runner';\n\nimport type { IRendererOptions, IRendererPlugins } from './AbstractRenderer';\nimport type { RenderTexture } from './renderTexture/RenderTexture';\nimport type { DisplayObject } from '@pixi/display';\nimport type { System } from './System';\nimport type { IRenderingContext } from './IRenderingContext';\nimport type { Extract } from '@pixi/extract';\n\nexport interface IRendererPluginConstructor {\n new (renderer: Renderer, options?: any): IRendererPlugin;\n}\n\nexport interface IRendererPlugin {\n destroy(): void;\n}\n\n/**\n * The Renderer draws the scene and all its content onto a WebGL enabled canvas.\n *\n * This renderer should be used for browsers that support WebGL.\n *\n * This renderer works by automatically managing WebGLBatchesm, so no need for Sprite Batches or Sprite Clouds.\n * Don't forget to add the view to your DOM or you will not see anything!\n *\n * @class\n * @memberof PIXI\n * @extends PIXI.AbstractRenderer\n */\nexport class Renderer extends AbstractRenderer\n{\n public gl: IRenderingContext;\n public globalUniforms: UniformGroup;\n public CONTEXT_UID: number;\n public renderingToScreen: boolean;\n public extract: Extract;\n // systems\n public mask: MaskSystem;\n public context: ContextSystem;\n public state: StateSystem;\n public shader: ShaderSystem;\n public texture: TextureSystem;\n public geometry: GeometrySystem;\n public framebuffer: FramebufferSystem;\n public scissor: ScissorSystem;\n public stencil: StencilSystem;\n public projection: ProjectionSystem;\n public textureGC: TextureGCSystem;\n public filter: FilterSystem;\n public renderTexture: RenderTextureSystem;\n public batch: BatchSystem;\n\n runners: {[key: string]: Runner};\n\n /**\n * Create renderer if WebGL is available. Overrideable\n * by the **@pixi/canvas-renderer** package to allow fallback.\n * throws error if WebGL is not available.\n * @static\n * @private\n */\n static create(options: IRendererOptions): AbstractRenderer\n {\n if (isWebGLSupported())\n {\n return new Renderer(options);\n }\n\n throw new Error('WebGL unsupported in this browser, use \"pixi.js-legacy\" for fallback canvas2d support.');\n }\n\n /**\n * @param {object} [options] - The optional renderer parameters.\n * @param {number} [options.width=800] - The width of the screen.\n * @param {number} [options.height=600] - The height of the screen.\n * @param {HTMLCanvasElement} [options.view] - The canvas to use as a view, optional.\n * @param {boolean} [options.transparent=false] - If the render view is transparent.\n * @param {boolean} [options.autoDensity=false] - Resizes renderer view in CSS pixels to allow for\n * resolutions other than 1.\n * @param {boolean} [options.antialias=false] - Sets antialias. If not available natively then FXAA\n * antialiasing is used.\n * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the renderer.\n * The resolution of the renderer retina would be 2.\n * @param {boolean} [options.clearBeforeRender=true] - This sets if the renderer will clear\n * the canvas or not before the new render pass. If you wish to set this to false, you *must* set\n * preserveDrawingBuffer to `true`.\n * @param {boolean} [options.preserveDrawingBuffer=false] - Enables drawing buffer preservation,\n * enable this if you need to call toDataUrl on the WebGL context.\n * @param {number} [options.backgroundColor=0x000000] - The background color of the rendered area\n * (shown if not transparent).\n * @param {string} [options.powerPreference] - Parameter passed to WebGL context, set to \"high-performance\"\n * for devices with dual graphics card.\n * @param {object} [options.context] - If WebGL context already exists, all parameters must be taken from it.\n * @public\n */\n constructor(options? : IRendererOptions)\n {\n super(RENDERER_TYPE.WEBGL, options);\n\n // the options will have been modified here in the super constructor with pixi's default settings..\n options = this.options;\n\n /**\n * WebGL context, set by the contextSystem (this.context)\n *\n * @readonly\n * @member {WebGLRenderingContext}\n */\n this.gl = null;\n\n this.CONTEXT_UID = 0;\n\n // TODO legacy!\n\n /**\n * Internal signal instances of **runner**, these\n * are assigned to each system created.\n * @see PIXI.Runner\n * @name PIXI.Renderer#runners\n * @private\n * @type {object}\n * @readonly\n * @property {PIXI.Runner} destroy - Destroy runner\n * @property {PIXI.Runner} contextChange - Context change runner\n * @property {PIXI.Runner} reset - Reset runner\n * @property {PIXI.Runner} update - Update runner\n * @property {PIXI.Runner} postrender - Post-render runner\n * @property {PIXI.Runner} prerender - Pre-render runner\n * @property {PIXI.Runner} resize - Resize runner\n */\n this.runners = {\n destroy: new Runner('destroy'),\n contextChange: new Runner('contextChange'),\n reset: new Runner('reset'),\n update: new Runner('update'),\n postrender: new Runner('postrender'),\n prerender: new Runner('prerender'),\n resize: new Runner('resize'),\n };\n\n /**\n * Global uniforms\n * @member {PIXI.UniformGroup}\n */\n this.globalUniforms = new UniformGroup({\n projectionMatrix: new Matrix(),\n }, true);\n\n /**\n * Mask system instance\n * @member {PIXI.systems.MaskSystem} mask\n * @memberof PIXI.Renderer#\n * @readonly\n */\n this.addSystem(MaskSystem, 'mask')\n /**\n * Context system instance\n * @member {PIXI.systems.ContextSystem} context\n * @memberof PIXI.Renderer#\n * @readonly\n */\n .addSystem(ContextSystem, 'context')\n /**\n * State system instance\n * @member {PIXI.systems.StateSystem} state\n * @memberof PIXI.Renderer#\n * @readonly\n */\n .addSystem(StateSystem, 'state')\n /**\n * Shader system instance\n * @member {PIXI.systems.ShaderSystem} shader\n * @memberof PIXI.Renderer#\n * @readonly\n */\n .addSystem(ShaderSystem, 'shader')\n /**\n * Texture system instance\n * @member {PIXI.systems.TextureSystem} texture\n * @memberof PIXI.Renderer#\n * @readonly\n */\n .addSystem(TextureSystem, 'texture')\n /**\n * Geometry system instance\n * @member {PIXI.systems.GeometrySystem} geometry\n * @memberof PIXI.Renderer#\n * @readonly\n */\n .addSystem(GeometrySystem, 'geometry')\n /**\n * Framebuffer system instance\n * @member {PIXI.systems.FramebufferSystem} framebuffer\n * @memberof PIXI.Renderer#\n * @readonly\n */\n .addSystem(FramebufferSystem, 'framebuffer')\n /**\n * Scissor system instance\n * @member {PIXI.systems.ScissorSystem} scissor\n * @memberof PIXI.Renderer#\n * @readonly\n */\n .addSystem(ScissorSystem, 'scissor')\n /**\n * Stencil system instance\n * @member {PIXI.systems.StencilSystem} stencil\n * @memberof PIXI.Renderer#\n * @readonly\n */\n .addSystem(StencilSystem, 'stencil')\n /**\n * Projection system instance\n * @member {PIXI.systems.ProjectionSystem} projection\n * @memberof PIXI.Renderer#\n * @readonly\n */\n .addSystem(ProjectionSystem, 'projection')\n /**\n * Texture garbage collector system instance\n * @member {PIXI.systems.TextureGCSystem} textureGC\n * @memberof PIXI.Renderer#\n * @readonly\n */\n .addSystem(TextureGCSystem, 'textureGC')\n /**\n * Filter system instance\n * @member {PIXI.systems.FilterSystem} filter\n * @memberof PIXI.Renderer#\n * @readonly\n */\n .addSystem(FilterSystem, 'filter')\n /**\n * RenderTexture system instance\n * @member {PIXI.systems.RenderTextureSystem} renderTexture\n * @memberof PIXI.Renderer#\n * @readonly\n */\n .addSystem(RenderTextureSystem, 'renderTexture')\n\n /**\n * Batch system instance\n * @member {PIXI.systems.BatchSystem} batch\n * @memberof PIXI.Renderer#\n * @readonly\n */\n .addSystem(BatchSystem, 'batch');\n\n this.initPlugins(Renderer.__plugins);\n\n /**\n * The options passed in to create a new WebGL context.\n */\n if (options.context)\n {\n this.context.initFromContext(options.context);\n }\n else\n {\n this.context.initFromOptions({\n alpha: !!this.transparent,\n antialias: options.antialias,\n premultipliedAlpha: this.transparent && this.transparent !== 'notMultiplied',\n stencil: true,\n preserveDrawingBuffer: options.preserveDrawingBuffer,\n powerPreference: this.options.powerPreference,\n });\n }\n\n /**\n * Flag if we are rendering to the screen vs renderTexture\n * @member {boolean}\n * @readonly\n * @default true\n */\n this.renderingToScreen = true;\n\n sayHello(this.context.webGLVersion === 2 ? 'WebGL 2' : 'WebGL 1');\n\n this.resize(this.options.width, this.options.height);\n }\n\n /**\n * Add a new system to the renderer.\n * @param {Function} ClassRef - Class reference\n * @param {string} [name] - Property name for system, if not specified\n * will use a static `name` property on the class itself. This\n * name will be assigned as s property on the Renderer so make\n * sure it doesn't collide with properties on Renderer.\n * @return {PIXI.Renderer} Return instance of renderer\n */\n addSystem(ClassRef: { new(renderer: Renderer): T}, name: string): this\n {\n if (!name)\n {\n name = ClassRef.name;\n }\n\n const system = new ClassRef(this);\n\n if ((this as any)[name])\n {\n throw new Error(`Whoops! The name \"${name}\" is already in use`);\n }\n\n (this as any)[name] = system;\n\n for (const i in this.runners)\n {\n this.runners[i].add(system);\n }\n\n /**\n * Fired after rendering finishes.\n *\n * @event PIXI.Renderer#postrender\n */\n\n /**\n * Fired before rendering starts.\n *\n * @event PIXI.Renderer#prerender\n */\n\n /**\n * Fired when the WebGL context is set.\n *\n * @event PIXI.Renderer#context\n * @param {WebGLRenderingContext} gl - WebGL context.\n */\n\n return this;\n }\n\n /**\n * Renders the object to its WebGL view\n *\n * @param {PIXI.DisplayObject} displayObject - The object to be rendered.\n * @param {PIXI.RenderTexture} [renderTexture] - The render texture to render to.\n * @param {boolean} [clear=true] - Should the canvas be cleared before the new render.\n * @param {PIXI.Matrix} [transform] - A transform to apply to the render texture before rendering.\n * @param {boolean} [skipUpdateTransform=false] - Should we skip the update transform pass?\n */\n render(displayObject: DisplayObject, renderTexture?: RenderTexture,\n clear?: boolean, transform?: Matrix, skipUpdateTransform?: boolean): void\n {\n // can be handy to know!\n this.renderingToScreen = !renderTexture;\n\n this.runners.prerender.emit();\n this.emit('prerender');\n\n // apply a transform at a GPU level\n this.projection.transform = transform;\n\n // no point rendering if our context has been blown up!\n if (this.context.isLost)\n {\n return;\n }\n\n if (!renderTexture)\n {\n this._lastObjectRendered = displayObject;\n }\n\n if (!skipUpdateTransform)\n {\n // update the scene graph\n const cacheParent = displayObject.enableTempParent();\n\n displayObject.updateTransform();\n displayObject.disableTempParent(cacheParent);\n // displayObject.hitArea = //TODO add a temp hit area\n }\n\n this.renderTexture.bind(renderTexture);\n this.batch.currentRenderer.start();\n\n if (clear !== undefined ? clear : this.clearBeforeRender)\n {\n this.renderTexture.clear();\n }\n\n displayObject.render(this);\n\n // apply transform..\n this.batch.currentRenderer.flush();\n\n if (renderTexture)\n {\n renderTexture.baseTexture.update();\n }\n\n this.runners.postrender.emit();\n\n // reset transform after render\n this.projection.transform = null;\n\n this.emit('postrender');\n }\n\n /**\n * Resizes the WebGL view to the specified width and height.\n *\n * @param {number} screenWidth - The new width of the screen.\n * @param {number} screenHeight - The new height of the screen.\n */\n resize(screenWidth: number, screenHeight: number): void\n {\n super.resize(screenWidth, screenHeight);\n\n this.runners.resize.emit(screenWidth, screenHeight);\n }\n\n /**\n * Resets the WebGL state so you can render things however you fancy!\n *\n * @return {PIXI.Renderer} Returns itself.\n */\n reset(): this\n {\n this.runners.reset.emit();\n\n return this;\n }\n\n /**\n * Clear the frame buffer\n */\n clear(): void\n {\n this.renderTexture.bind();\n this.renderTexture.clear();\n }\n\n /**\n * Removes everything from the renderer (event listeners, spritebatch, etc...)\n *\n * @param {boolean} [removeView=false] - Removes the Canvas element from the DOM.\n * See: https://github.com/pixijs/pixi.js/issues/2233\n */\n destroy(removeView?: boolean): void\n {\n this.runners.destroy.emit();\n\n for (const r in this.runners)\n {\n this.runners[r].destroy();\n }\n\n // call base destroy\n super.destroy(removeView);\n\n // TODO nullify all the managers..\n this.gl = null;\n }\n\n /**\n * Collection of installed plugins. These are included by default in PIXI, but can be excluded\n * by creating a custom build. Consult the README for more information about creating custom\n * builds and excluding plugins.\n * @name PIXI.Renderer#plugins\n * @type {object}\n * @readonly\n * @property {PIXI.AccessibilityManager} accessibility Support tabbing interactive elements.\n * @property {PIXI.Extract} extract Extract image data from renderer.\n * @property {PIXI.InteractionManager} interaction Handles mouse, touch and pointer events.\n * @property {PIXI.Prepare} prepare Pre-render display objects.\n */\n\n static __plugins: IRendererPlugins;\n /**\n * Adds a plugin to the renderer.\n *\n * @method\n * @param {string} pluginName - The name of the plugin.\n * @param {Function} ctor - The constructor function or class for the plugin.\n */\n static registerPlugin(pluginName: string, ctor: IRendererPluginConstructor): void\n {\n Renderer.__plugins = Renderer.__plugins || {};\n Renderer.__plugins[pluginName] = ctor;\n }\n}\n","import { Renderer } from './Renderer';\nimport type { AbstractRenderer, IRendererOptions } from './AbstractRenderer';\n\nexport interface IRendererOptionsAuto extends IRendererOptions\n{\n forceCanvas?: boolean;\n}\n/**\n * This helper function will automatically detect which renderer you should be using.\n * WebGL is the preferred renderer as it is a lot faster. If WebGL is not supported by\n * the browser then this function will return a canvas renderer\n *\n * @memberof PIXI\n * @function autoDetectRenderer\n * @param {object} [options] - The optional renderer parameters\n * @param {number} [options.width=800] - the width of the renderers view\n * @param {number} [options.height=600] - the height of the renderers view\n * @param {HTMLCanvasElement} [options.view] - the canvas to use as a view, optional\n * @param {boolean} [options.transparent=false] - If the render view is transparent, default false\n * @param {boolean} [options.autoDensity=false] - Resizes renderer view in CSS pixels to allow for\n * resolutions other than 1\n * @param {boolean} [options.antialias=false] - sets antialias\n * @param {boolean} [options.preserveDrawingBuffer=false] - enables drawing buffer preservation, enable this if you\n * need to call toDataUrl on the webgl context\n * @param {number} [options.backgroundColor=0x000000] - The background color of the rendered area\n * (shown if not transparent).\n * @param {boolean} [options.clearBeforeRender=true] - This sets if the renderer will clear the canvas or\n * not before the new render pass.\n * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the renderer, retina would be 2\n * @param {boolean} [options.forceCanvas=false] - prevents selection of WebGL renderer, even if such is present, this\n * option only is available when using **pixi.js-legacy** or **@pixi/canvas-renderer** modules, otherwise\n * it is ignored.\n * @param {string} [options.powerPreference] - Parameter passed to webgl context, set to \"high-performance\"\n * for devices with dual graphics card **webgl only**\n * @return {PIXI.Renderer|PIXI.CanvasRenderer} Returns WebGL renderer if available, otherwise CanvasRenderer\n */\nexport function autoDetectRenderer(options: IRendererOptionsAuto): AbstractRenderer\n{\n return Renderer.create(options);\n}\n","import { DRAW_MODES } from '@pixi/constants';\n\nimport type { BLEND_MODES } from '@pixi/constants';\nimport type { BatchTextureArray } from './BatchTextureArray';\n\n/**\n * Used by the batcher to draw batches.\n * Each one of these contains all information required to draw a bound geometry.\n *\n * @class\n * @memberof PIXI\n */\nexport class BatchDrawCall\n{\n texArray: BatchTextureArray;\n type: DRAW_MODES;\n blend: BLEND_MODES;\n start: number;\n size: number;\n data: any;\n\n constructor()\n {\n this.texArray = null;\n this.blend = 0;\n this.type = DRAW_MODES.TRIANGLES;\n\n this.start = 0;\n this.size = 0;\n\n /**\n * data for uniforms or custom webgl state\n * @member {object}\n */\n this.data = null;\n }\n}\n","import type { BaseTexture } from '@pixi/core';\n\n/**\n * Used by the batcher to build texture batches.\n * Holds list of textures and their respective locations.\n *\n * @class\n * @memberof PIXI\n */\nexport class BatchTextureArray\n{\n public elements: BaseTexture[];\n public ids: number[];\n public count: number;\n\n constructor()\n {\n /**\n * inside textures array\n * @member {PIXI.BaseTexture[]}\n */\n this.elements = [];\n /**\n * Respective locations for textures\n * @member {number[]}\n */\n this.ids = [];\n /**\n * number of filled elements\n * @member {number}\n */\n this.count = 0;\n }\n\n clear(): void\n {\n for (let i = 0; i < this.count; i++)\n {\n this.elements[i] = null;\n }\n this.count = 0;\n }\n}\n","import type { ITypedArray } from './Buffer';\n\n/**\n * Flexible wrapper around `ArrayBuffer` that also provides\n * typed array views on demand.\n *\n * @class\n * @memberof PIXI\n */\nexport class ViewableBuffer\n{\n public size: number;\n public rawBinaryData: ArrayBuffer;\n public uint32View: Uint32Array;\n public float32View: Float32Array;\n\n private _int8View: Int8Array;\n private _uint8View: Uint8Array;\n private _int16View: Int16Array;\n private _uint16View: Uint16Array;\n private _int32View: Int32Array;\n\n /**\n * @param {number} size - The size of the buffer in bytes.\n */\n constructor(size: number)\n {\n /**\n * Underlying `ArrayBuffer` that holds all the data\n * and is of capacity `size`.\n *\n * @member {ArrayBuffer}\n */\n this.rawBinaryData = new ArrayBuffer(size);\n\n /**\n * View on the raw binary data as a `Uint32Array`.\n *\n * @member {Uint32Array}\n */\n this.uint32View = new Uint32Array(this.rawBinaryData);\n\n /**\n * View on the raw binary data as a `Float32Array`.\n *\n * @member {Float32Array}\n */\n this.float32View = new Float32Array(this.rawBinaryData);\n }\n\n /**\n * View on the raw binary data as a `Int8Array`.\n *\n * @member {Int8Array}\n */\n get int8View(): Int8Array\n {\n if (!this._int8View)\n {\n this._int8View = new Int8Array(this.rawBinaryData);\n }\n\n return this._int8View;\n }\n\n /**\n * View on the raw binary data as a `Uint8Array`.\n *\n * @member {Uint8Array}\n */\n get uint8View(): Uint8Array\n {\n if (!this._uint8View)\n {\n this._uint8View = new Uint8Array(this.rawBinaryData);\n }\n\n return this._uint8View;\n }\n\n /**\n * View on the raw binary data as a `Int16Array`.\n *\n * @member {Int16Array}\n */\n get int16View(): Int16Array\n {\n if (!this._int16View)\n {\n this._int16View = new Int16Array(this.rawBinaryData);\n }\n\n return this._int16View;\n }\n\n /**\n * View on the raw binary data as a `Uint16Array`.\n *\n * @member {Uint16Array}\n */\n get uint16View(): Uint16Array\n {\n if (!this._uint16View)\n {\n this._uint16View = new Uint16Array(this.rawBinaryData);\n }\n\n return this._uint16View;\n }\n\n /**\n * View on the raw binary data as a `Int32Array`.\n *\n * @member {Int32Array}\n */\n get int32View(): Int32Array\n {\n if (!this._int32View)\n {\n this._int32View = new Int32Array(this.rawBinaryData);\n }\n\n return this._int32View;\n }\n\n /**\n * Returns the view of the given type.\n *\n * @param {string} type - One of `int8`, `uint8`, `int16`,\n * `uint16`, `int32`, `uint32`, and `float32`.\n * @return {object} typed array of given type\n */\n view(type: string): ITypedArray\n {\n return (this as any)[`${type}View`];\n }\n\n /**\n * Destroys all buffer references. Do not use after calling\n * this.\n */\n destroy(): void\n {\n this.rawBinaryData = null;\n this._int8View = null;\n this._uint8View = null;\n this._int16View = null;\n this._uint16View = null;\n this._int32View = null;\n this.uint32View = null;\n this.float32View = null;\n }\n\n static sizeOf(type: string): number\n {\n switch (type)\n {\n case 'int8':\n case 'uint8':\n return 1;\n case 'int16':\n case 'uint16':\n return 2;\n case 'int32':\n case 'uint32':\n case 'float32':\n return 4;\n default:\n throw new Error(`${type} isn't a valid view type`);\n }\n }\n}\n","import { BatchDrawCall } from './BatchDrawCall';\nimport { BatchTextureArray } from './BatchTextureArray';\nimport { BaseTexture } from '../textures/BaseTexture';\nimport { ObjectRenderer } from './ObjectRenderer';\nimport { State } from '../state/State';\nimport { ViewableBuffer } from '../geometry/ViewableBuffer';\n\nimport { checkMaxIfStatementsInShader } from '../shader/utils/checkMaxIfStatementsInShader';\n\nimport { settings } from '@pixi/settings';\nimport { premultiplyBlendMode, premultiplyTint, nextPow2, log2 } from '@pixi/utils';\nimport { ENV } from '@pixi/constants';\n\nimport type { Renderer } from '../Renderer';\nimport type { Shader } from '../shader/Shader';\nimport type { BatchShaderGenerator } from './BatchShaderGenerator';\nimport type { BatchGeometry } from './BatchGeometry';\nimport type { Texture } from '../textures/Texture';\nimport type { BLEND_MODES } from '@pixi/constants';\n\n/**\n * Interface for elements like Sprite, Mesh etc. for batching.\n */\nexport interface IBatchableElement {\n _texture: Texture;\n vertexData: Float32Array;\n indices: Uint16Array | Uint32Array | Array;\n uvs: Float32Array;\n worldAlpha: number;\n _tintRGB: number;\n blendMode: BLEND_MODES;\n}\n\n/**\n * Renderer dedicated to drawing and batching sprites.\n *\n * This is the default batch renderer. It buffers objects\n * with texture-based geometries and renders them in\n * batches. It uploads multiple textures to the GPU to\n * reduce to the number of draw calls.\n *\n * @class\n * @protected\n * @memberof PIXI\n * @extends PIXI.ObjectRenderer\n */\nexport class AbstractBatchRenderer extends ObjectRenderer\n{\n public readonly state: State;\n public size: number;\n public MAX_TEXTURES: number;\n\n protected shaderGenerator: BatchShaderGenerator;\n protected geometryClass: typeof BatchGeometry;\n protected vertexSize: number;\n protected _vertexCount: number;\n protected _indexCount: number;\n protected _bufferedElements: Array;\n protected _bufferedTextures: Array;\n protected _bufferSize: number;\n protected _shader: Shader;\n protected _flushId: number;\n protected _aBuffers: Array;\n protected _iBuffers: Array;\n protected _dcIndex: number;\n protected _aIndex: number;\n protected _iIndex: number;\n protected _attributeBuffer: ViewableBuffer;\n protected _indexBuffer: Uint16Array;\n protected _tempBoundTextures: BaseTexture[];\n\n private _packedGeometries: Array;\n private _packedGeometryPoolSize: number;\n\n /**\n * This will hook onto the renderer's `contextChange`\n * and `prerender` signals.\n *\n * @param {PIXI.Renderer} renderer - The renderer this works for.\n */\n constructor(renderer: Renderer)\n {\n super(renderer);\n\n /**\n * This is used to generate a shader that can\n * color each vertex based on a `aTextureId`\n * attribute that points to an texture in `uSampler`.\n *\n * This enables the objects with different textures\n * to be drawn in the same draw call.\n *\n * You can customize your shader by creating your\n * custom shader generator.\n *\n * @member {PIXI.BatchShaderGenerator}\n * @protected\n */\n this.shaderGenerator = null;\n\n /**\n * The class that represents the geometry of objects\n * that are going to be batched with this.\n *\n * @member {object}\n * @default PIXI.BatchGeometry\n * @protected\n */\n this.geometryClass = null;\n\n /**\n * Size of data being buffered per vertex in the\n * attribute buffers (in floats). By default, the\n * batch-renderer plugin uses 6:\n *\n * | aVertexPosition | 2 |\n * |-----------------|---|\n * | aTextureCoords | 2 |\n * | aColor | 1 |\n * | aTextureId | 1 |\n *\n * @member {number}\n * @readonly\n */\n this.vertexSize = null;\n\n /**\n * The WebGL state in which this renderer will work.\n *\n * @member {PIXI.State}\n * @readonly\n */\n this.state = State.for2d();\n\n /**\n * The number of bufferable objects before a flush\n * occurs automatically.\n *\n * @member {number}\n * @default settings.SPRITE_BATCH_SIZE * 4\n */\n this.size = settings.SPRITE_BATCH_SIZE * 4;\n\n /**\n * Total count of all vertices used by the currently\n * buffered objects.\n *\n * @member {number}\n * @private\n */\n this._vertexCount = 0;\n\n /**\n * Total count of all indices used by the currently\n * buffered objects.\n *\n * @member {number}\n * @private\n */\n this._indexCount = 0;\n\n /**\n * Buffer of objects that are yet to be rendered.\n *\n * @member {PIXI.DisplayObject[]}\n * @private\n */\n this._bufferedElements = [];\n\n /**\n * Data for texture batch builder, helps to save a bit of CPU on a pass.\n * @type {PIXI.BaseTexture[]}\n * @private\n */\n this._bufferedTextures = [];\n\n /**\n * Number of elements that are buffered and are\n * waiting to be flushed.\n *\n * @member {number}\n * @private\n */\n this._bufferSize = 0;\n\n /**\n * This shader is generated by `this.shaderGenerator`.\n *\n * It is generated specifically to handle the required\n * number of textures being batched together.\n *\n * @member {PIXI.Shader}\n * @protected\n */\n this._shader = null;\n\n /**\n * Pool of `this.geometryClass` geometry objects\n * that store buffers. They are used to pass data\n * to the shader on each draw call.\n *\n * These are never re-allocated again, unless a\n * context change occurs; however, the pool may\n * be expanded if required.\n *\n * @member {PIXI.Geometry[]}\n * @private\n * @see PIXI.AbstractBatchRenderer.contextChange\n */\n this._packedGeometries = [];\n\n /**\n * Size of `this._packedGeometries`. It can be expanded\n * if more than `this._packedGeometryPoolSize` flushes\n * occur in a single frame.\n *\n * @member {number}\n * @private\n */\n this._packedGeometryPoolSize = 2;\n\n /**\n * A flush may occur multiple times in a single\n * frame. On iOS devices or when\n * `settings.CAN_UPLOAD_SAME_BUFFER` is false, the\n * batch renderer does not upload data to the same\n * `WebGLBuffer` for performance reasons.\n *\n * This is the index into `packedGeometries` that points to\n * geometry holding the most recent buffers.\n *\n * @member {number}\n * @private\n */\n this._flushId = 0;\n\n /**\n * Pool of `ViewableBuffer` objects that are sorted in\n * order of increasing size. The flush method uses\n * the buffer with the least size above the amount\n * it requires. These are used for passing attributes.\n *\n * The first buffer has a size of 8; each subsequent\n * buffer has double capacity of its previous.\n *\n * @member {PIXI.ViewableBuffer[]}\n * @private\n * @see PIXI.AbstractBatchRenderer#getAttributeBuffer\n */\n this._aBuffers = {} as any;\n\n /**\n * Pool of `Uint16Array` objects that are sorted in\n * order of increasing size. The flush method uses\n * the buffer with the least size above the amount\n * it requires. These are used for passing indices.\n *\n * The first buffer has a size of 12; each subsequent\n * buffer has double capacity of its previous.\n *\n * @member {Uint16Array[]}\n * @private\n * @see PIXI.AbstractBatchRenderer#getIndexBuffer\n */\n this._iBuffers = {} as any;\n\n /**\n * Maximum number of textures that can be uploaded to\n * the GPU under the current context. It is initialized\n * properly in `this.contextChange`.\n *\n * @member {number}\n * @see PIXI.AbstractBatchRenderer#contextChange\n * @readonly\n */\n this.MAX_TEXTURES = 1;\n\n this.renderer.on('prerender', this.onPrerender, this);\n renderer.runners.contextChange.add(this);\n\n this._dcIndex = 0;\n this._aIndex = 0;\n this._iIndex = 0;\n this._attributeBuffer = null;\n this._indexBuffer = null;\n this._tempBoundTextures = [];\n }\n\n /**\n * Handles the `contextChange` signal.\n *\n * It calculates `this.MAX_TEXTURES` and allocating the\n * packed-geometry object pool.\n */\n contextChange(): void\n {\n const gl = this.renderer.gl;\n\n if (settings.PREFER_ENV === ENV.WEBGL_LEGACY)\n {\n this.MAX_TEXTURES = 1;\n }\n else\n {\n // step 1: first check max textures the GPU can handle.\n this.MAX_TEXTURES = Math.min(\n gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS),\n settings.SPRITE_MAX_TEXTURES);\n\n // step 2: check the maximum number of if statements the shader can have too..\n this.MAX_TEXTURES = checkMaxIfStatementsInShader(\n this.MAX_TEXTURES, gl);\n }\n\n this._shader = this.shaderGenerator.generateShader(this.MAX_TEXTURES);\n\n // we use the second shader as the first one depending on your browser\n // may omit aTextureId as it is not used by the shader so is optimized out.\n for (let i = 0; i < this._packedGeometryPoolSize; i++)\n {\n /* eslint-disable max-len */\n this._packedGeometries[i] = new (this.geometryClass)();\n }\n\n this.initFlushBuffers();\n }\n\n /**\n * Makes sure that static and dynamic flush pooled objects have correct dimensions\n */\n initFlushBuffers(): void\n {\n const {\n _drawCallPool,\n _textureArrayPool,\n } = AbstractBatchRenderer;\n // max draw calls\n const MAX_SPRITES = this.size / 4;\n // max texture arrays\n const MAX_TA = Math.floor(MAX_SPRITES / this.MAX_TEXTURES) + 1;\n\n while (_drawCallPool.length < MAX_SPRITES)\n {\n _drawCallPool.push(new BatchDrawCall());\n }\n while (_textureArrayPool.length < MAX_TA)\n {\n _textureArrayPool.push(new BatchTextureArray());\n }\n for (let i = 0; i < this.MAX_TEXTURES; i++)\n {\n this._tempBoundTextures[i] = null;\n }\n }\n\n /**\n * Handles the `prerender` signal.\n *\n * It ensures that flushes start from the first geometry\n * object again.\n */\n onPrerender(): void\n {\n this._flushId = 0;\n }\n\n /**\n * Buffers the \"batchable\" object. It need not be rendered\n * immediately.\n *\n * @param {PIXI.DisplayObject} element - the element to render when\n * using this renderer\n */\n render(element: IBatchableElement): void\n {\n if (!element._texture.valid)\n {\n return;\n }\n\n if (this._vertexCount + (element.vertexData.length / 2) > this.size)\n {\n this.flush();\n }\n\n this._vertexCount += element.vertexData.length / 2;\n this._indexCount += element.indices.length;\n this._bufferedTextures[this._bufferSize] = element._texture.baseTexture;\n this._bufferedElements[this._bufferSize++] = element;\n }\n\n buildTexturesAndDrawCalls(): void\n {\n const {\n _bufferedTextures: textures,\n MAX_TEXTURES,\n } = this;\n const textureArrays = AbstractBatchRenderer._textureArrayPool;\n const batch = this.renderer.batch;\n const boundTextures = this._tempBoundTextures;\n const touch = this.renderer.textureGC.count;\n\n let TICK = ++BaseTexture._globalBatch;\n let countTexArrays = 0;\n let texArray = textureArrays[0];\n let start = 0;\n\n batch.copyBoundTextures(boundTextures, MAX_TEXTURES);\n\n for (let i = 0; i < this._bufferSize; ++i)\n {\n const tex = textures[i];\n\n textures[i] = null;\n if (tex._batchEnabled === TICK)\n {\n continue;\n }\n\n if (texArray.count >= MAX_TEXTURES)\n {\n batch.boundArray(texArray, boundTextures, TICK, MAX_TEXTURES);\n this.buildDrawCalls(texArray, start, i);\n start = i;\n texArray = textureArrays[++countTexArrays];\n ++TICK;\n }\n\n tex._batchEnabled = TICK;\n tex.touched = touch;\n texArray.elements[texArray.count++] = tex;\n }\n\n if (texArray.count > 0)\n {\n batch.boundArray(texArray, boundTextures, TICK, MAX_TEXTURES);\n this.buildDrawCalls(texArray, start, this._bufferSize);\n ++countTexArrays;\n ++TICK;\n }\n\n // Clean-up\n\n for (let i = 0; i < boundTextures.length; i++)\n {\n boundTextures[i] = null;\n }\n BaseTexture._globalBatch = TICK;\n }\n\n /**\n * Populating drawcalls for rendering\n *\n * @param {PIXI.BatchTextureArray} texArray\n * @param {number} start\n * @param {number} finish\n */\n buildDrawCalls(texArray: BatchTextureArray, start: number, finish: number): void\n {\n const {\n _bufferedElements: elements,\n _attributeBuffer,\n _indexBuffer,\n vertexSize,\n } = this;\n const drawCalls = AbstractBatchRenderer._drawCallPool;\n\n let dcIndex = this._dcIndex;\n let aIndex = this._aIndex;\n let iIndex = this._iIndex;\n\n let drawCall = drawCalls[dcIndex];\n\n drawCall.start = this._iIndex;\n drawCall.texArray = texArray;\n\n for (let i = start; i < finish; ++i)\n {\n const sprite = elements[i];\n const tex = sprite._texture.baseTexture;\n const spriteBlendMode = premultiplyBlendMode[\n tex.alphaMode ? 1 : 0][sprite.blendMode];\n\n elements[i] = null;\n\n if (start < i && drawCall.blend !== spriteBlendMode)\n {\n drawCall.size = iIndex - drawCall.start;\n start = i;\n drawCall = drawCalls[++dcIndex];\n drawCall.texArray = texArray;\n drawCall.start = iIndex;\n }\n\n this.packInterleavedGeometry(sprite, _attributeBuffer, _indexBuffer, aIndex, iIndex);\n aIndex += sprite.vertexData.length / 2 * vertexSize;\n iIndex += sprite.indices.length;\n\n drawCall.blend = spriteBlendMode;\n }\n\n if (start < finish)\n {\n drawCall.size = iIndex - drawCall.start;\n ++dcIndex;\n }\n\n this._dcIndex = dcIndex;\n this._aIndex = aIndex;\n this._iIndex = iIndex;\n }\n\n /**\n * Bind textures for current rendering\n *\n * @param {PIXI.BatchTextureArray} texArray\n */\n bindAndClearTexArray(texArray: BatchTextureArray): void\n {\n const textureSystem = this.renderer.texture;\n\n for (let j = 0; j < texArray.count; j++)\n {\n textureSystem.bind(texArray.elements[j], texArray.ids[j]);\n texArray.elements[j] = null;\n }\n texArray.count = 0;\n }\n\n updateGeometry(): void\n {\n const {\n _packedGeometries: packedGeometries,\n _attributeBuffer: attributeBuffer,\n _indexBuffer: indexBuffer,\n } = this;\n\n if (!settings.CAN_UPLOAD_SAME_BUFFER)\n { /* Usually on iOS devices, where the browser doesn't\n like uploads to the same buffer in a single frame. */\n if (this._packedGeometryPoolSize <= this._flushId)\n {\n this._packedGeometryPoolSize++;\n packedGeometries[this._flushId] = new (this.geometryClass)();\n }\n\n packedGeometries[this._flushId]._buffer.update(attributeBuffer.rawBinaryData);\n packedGeometries[this._flushId]._indexBuffer.update(indexBuffer);\n\n this.renderer.geometry.bind(packedGeometries[this._flushId]);\n this.renderer.geometry.updateBuffers();\n this._flushId++;\n }\n else\n {\n // lets use the faster option, always use buffer number 0\n packedGeometries[this._flushId]._buffer.update(attributeBuffer.rawBinaryData);\n packedGeometries[this._flushId]._indexBuffer.update(indexBuffer);\n\n this.renderer.geometry.updateBuffers();\n }\n }\n\n drawBatches(): void\n {\n const dcCount = this._dcIndex;\n const { gl, state: stateSystem } = this.renderer;\n const drawCalls = AbstractBatchRenderer._drawCallPool;\n\n let curTexArray = null;\n\n // Upload textures and do the draw calls\n for (let i = 0; i < dcCount; i++)\n {\n const { texArray, type, size, start, blend } = drawCalls[i];\n\n if (curTexArray !== texArray)\n {\n curTexArray = texArray;\n this.bindAndClearTexArray(texArray);\n }\n\n this.state.blendMode = blend;\n stateSystem.set(this.state);\n gl.drawElements(type, size, gl.UNSIGNED_SHORT, start * 2);\n }\n }\n\n /**\n * Renders the content _now_ and empties the current batch.\n */\n flush(): void\n {\n if (this._vertexCount === 0)\n {\n return;\n }\n\n this._attributeBuffer = this.getAttributeBuffer(this._vertexCount);\n this._indexBuffer = this.getIndexBuffer(this._indexCount);\n this._aIndex = 0;\n this._iIndex = 0;\n this._dcIndex = 0;\n\n this.buildTexturesAndDrawCalls();\n this.updateGeometry();\n this.drawBatches();\n\n // reset elements buffer for the next flush\n this._bufferSize = 0;\n this._vertexCount = 0;\n this._indexCount = 0;\n }\n\n /**\n * Starts a new sprite batch.\n */\n start(): void\n {\n this.renderer.state.set(this.state);\n\n this.renderer.shader.bind(this._shader);\n\n if (settings.CAN_UPLOAD_SAME_BUFFER)\n {\n // bind buffer #0, we don't need others\n this.renderer.geometry.bind(this._packedGeometries[this._flushId]);\n }\n }\n\n /**\n * Stops and flushes the current batch.\n */\n stop(): void\n {\n this.flush();\n }\n\n /**\n * Destroys this `AbstractBatchRenderer`. It cannot be used again.\n */\n destroy(): void\n {\n for (let i = 0; i < this._packedGeometryPoolSize; i++)\n {\n if (this._packedGeometries[i])\n {\n this._packedGeometries[i].destroy();\n }\n }\n\n this.renderer.off('prerender', this.onPrerender, this);\n\n this._aBuffers = null;\n this._iBuffers = null;\n this._packedGeometries = null;\n this._attributeBuffer = null;\n this._indexBuffer = null;\n\n if (this._shader)\n {\n this._shader.destroy();\n this._shader = null;\n }\n\n super.destroy();\n }\n\n /**\n * Fetches an attribute buffer from `this._aBuffers` that\n * can hold atleast `size` floats.\n *\n * @param {number} size - minimum capacity required\n * @return {ViewableBuffer} - buffer than can hold atleast `size` floats\n * @private\n */\n getAttributeBuffer(size: number): ViewableBuffer\n {\n // 8 vertices is enough for 2 quads\n const roundedP2 = nextPow2(Math.ceil(size / 8));\n const roundedSizeIndex = log2(roundedP2);\n const roundedSize = roundedP2 * 8;\n\n if (this._aBuffers.length <= roundedSizeIndex)\n {\n this._iBuffers.length = roundedSizeIndex + 1;\n }\n\n let buffer = this._aBuffers[roundedSize];\n\n if (!buffer)\n {\n this._aBuffers[roundedSize] = buffer = new ViewableBuffer(roundedSize * this.vertexSize * 4);\n }\n\n return buffer;\n }\n\n /**\n * Fetches an index buffer from `this._iBuffers` that can\n * have at least `size` capacity.\n *\n * @param {number} size - minimum required capacity\n * @return {Uint16Array} - buffer that can fit `size`\n * indices.\n * @private\n */\n getIndexBuffer(size: number): Uint16Array\n {\n // 12 indices is enough for 2 quads\n const roundedP2 = nextPow2(Math.ceil(size / 12));\n const roundedSizeIndex = log2(roundedP2);\n const roundedSize = roundedP2 * 12;\n\n if (this._iBuffers.length <= roundedSizeIndex)\n {\n this._iBuffers.length = roundedSizeIndex + 1;\n }\n\n let buffer = this._iBuffers[roundedSizeIndex];\n\n if (!buffer)\n {\n this._iBuffers[roundedSizeIndex] = buffer = new Uint16Array(roundedSize);\n }\n\n return buffer;\n }\n\n /**\n * Takes the four batching parameters of `element`, interleaves\n * and pushes them into the batching attribute/index buffers given.\n *\n * It uses these properties: `vertexData` `uvs`, `textureId` and\n * `indicies`. It also uses the \"tint\" of the base-texture, if\n * present.\n *\n * @param {PIXI.Sprite} element - element being rendered\n * @param {PIXI.ViewableBuffer} attributeBuffer - attribute buffer.\n * @param {Uint16Array} indexBuffer - index buffer\n * @param {number} aIndex - number of floats already in the attribute buffer\n * @param {number} iIndex - number of indices already in `indexBuffer`\n */\n packInterleavedGeometry(element: IBatchableElement, attributeBuffer: ViewableBuffer, indexBuffer: Uint16Array,\n aIndex: number, iIndex: number): void\n {\n const {\n uint32View,\n float32View,\n } = attributeBuffer;\n\n const packedVertices = aIndex / this.vertexSize;\n const uvs = element.uvs;\n const indicies = element.indices;\n const vertexData = element.vertexData;\n const textureId = element._texture.baseTexture._batchLocation;\n\n const alpha = Math.min(element.worldAlpha, 1.0);\n const argb = (alpha < 1.0\n && element._texture.baseTexture.alphaMode)\n ? premultiplyTint(element._tintRGB, alpha)\n : element._tintRGB + (alpha * 255 << 24);\n\n // lets not worry about tint! for now..\n for (let i = 0; i < vertexData.length; i += 2)\n {\n float32View[aIndex++] = vertexData[i];\n float32View[aIndex++] = vertexData[i + 1];\n float32View[aIndex++] = uvs[i];\n float32View[aIndex++] = uvs[i + 1];\n uint32View[aIndex++] = argb;\n float32View[aIndex++] = textureId;\n }\n\n for (let i = 0; i < indicies.length; i++)\n {\n indexBuffer[iIndex++] = packedVertices + indicies[i];\n }\n }\n\n /**\n * Pool of `BatchDrawCall` objects that `flush` used\n * to create \"batches\" of the objects being rendered.\n *\n * These are never re-allocated again.\n * Shared between all batch renderers because it can be only one \"flush\" working at the moment.\n *\n * @static\n * @member {PIXI.BatchDrawCall[]}\n */\n static _drawCallPool: Array = [];\n\n /**\n * Pool of `BatchDrawCall` objects that `flush` used\n * to create \"batches\" of the objects being rendered.\n *\n * These are never re-allocated again.\n * Shared between all batch renderers because it can be only one \"flush\" working at the moment.\n *\n * @static\n * @member {PIXI.BatchTextureArray[]}\n */\n static _textureArrayPool: Array = [];\n}\n","import { Shader } from '../shader/Shader';\nimport { Program } from '../shader/Program';\nimport { UniformGroup } from '../shader/UniformGroup';\nimport { Matrix } from '@pixi/math';\n\n/**\n * Helper that generates batching multi-texture shader. Use it with your new BatchRenderer\n *\n * @class\n * @memberof PIXI\n */\nexport class BatchShaderGenerator\n{\n public vertexSrc: string;\n public fragTemplate: string;\n programCache: {[key: number]: Program};\n defaultGroupCache: {[key: number]: UniformGroup};\n /**\n * @param {string} vertexSrc - Vertex shader\n * @param {string} fragTemplate - Fragment shader template\n */\n constructor(vertexSrc: string, fragTemplate: string)\n {\n /**\n * Reference to the vertex shader source.\n *\n * @member {string}\n */\n this.vertexSrc = vertexSrc;\n\n /**\n * Reference to the fragement shader template. Must contain \"%count%\" and \"%forloop%\".\n *\n * @member {string}\n */\n this.fragTemplate = fragTemplate;\n\n this.programCache = {};\n this.defaultGroupCache = {};\n\n if (fragTemplate.indexOf('%count%') < 0)\n {\n throw new Error('Fragment template must contain \"%count%\".');\n }\n\n if (fragTemplate.indexOf('%forloop%') < 0)\n {\n throw new Error('Fragment template must contain \"%forloop%\".');\n }\n }\n\n generateShader(maxTextures: number): Shader\n {\n if (!this.programCache[maxTextures])\n {\n const sampleValues = new Int32Array(maxTextures);\n\n for (let i = 0; i < maxTextures; i++)\n {\n sampleValues[i] = i;\n }\n\n this.defaultGroupCache[maxTextures] = UniformGroup.from({ uSamplers: sampleValues }, true);\n\n let fragmentSrc = this.fragTemplate;\n\n fragmentSrc = fragmentSrc.replace(/%count%/gi, `${maxTextures}`);\n fragmentSrc = fragmentSrc.replace(/%forloop%/gi, this.generateSampleSrc(maxTextures));\n\n this.programCache[maxTextures] = new Program(this.vertexSrc, fragmentSrc);\n }\n\n const uniforms = {\n tint: new Float32Array([1, 1, 1, 1]),\n translationMatrix: new Matrix(),\n default: this.defaultGroupCache[maxTextures],\n };\n\n return new Shader(this.programCache[maxTextures], uniforms);\n }\n\n generateSampleSrc(maxTextures: number): string\n {\n let src = '';\n\n src += '\\n';\n src += '\\n';\n\n for (let i = 0; i < maxTextures; i++)\n {\n if (i > 0)\n {\n src += '\\nelse ';\n }\n\n if (i < maxTextures - 1)\n {\n src += `if(vTextureId < ${i}.5)`;\n }\n\n src += '\\n{';\n src += `\\n\\tcolor = texture2D(uSamplers[${i}], vTextureCoord);`;\n src += '\\n}';\n }\n\n src += '\\n';\n src += '\\n';\n\n return src;\n }\n}\n","import { TYPES } from '@pixi/constants';\nimport { Geometry } from '../geometry/Geometry';\nimport { Buffer } from '../geometry/Buffer';\n\n/**\n * Geometry used to batch standard PIXI content (e.g. Mesh, Sprite, Graphics objects).\n *\n * @class\n * @memberof PIXI\n */\nexport class BatchGeometry extends Geometry\n{\n _buffer: Buffer;\n _indexBuffer: Buffer;\n /**\n * @param {boolean} [_static=false] - Optimization flag, where `false`\n * is updated every frame, `true` doesn't change frame-to-frame.\n */\n constructor(_static = false)\n {\n super();\n\n /**\n * Buffer used for position, color, texture IDs\n *\n * @member {PIXI.Buffer}\n * @protected\n */\n this._buffer = new Buffer(null, _static, false);\n\n /**\n * Index buffer data\n *\n * @member {PIXI.Buffer}\n * @protected\n */\n this._indexBuffer = new Buffer(null, _static, true);\n\n this.addAttribute('aVertexPosition', this._buffer, 2, false, TYPES.FLOAT)\n .addAttribute('aTextureCoord', this._buffer, 2, false, TYPES.FLOAT)\n .addAttribute('aColor', this._buffer, 4, true, TYPES.UNSIGNED_BYTE)\n .addAttribute('aTextureId', this._buffer, 1, true, TYPES.FLOAT)\n .addIndex(this._indexBuffer);\n }\n}\n","import { BatchShaderGenerator } from './BatchShaderGenerator';\nimport { BatchGeometry } from './BatchGeometry';\nimport { AbstractBatchRenderer } from './AbstractBatchRenderer';\n\nimport defaultVertex from './texture.vert';\nimport defaultFragment from './texture.frag';\n\nimport type { Renderer } from '../Renderer';\n\nexport interface IBatchFactoryOptions\n{\n vertex?: string;\n fragment?: string;\n geometryClass?: typeof BatchGeometry;\n vertexSize?: number;\n}\n\n/**\n * @class\n * @memberof PIXI\n * @hideconstructor\n */\nexport class BatchPluginFactory\n{\n /**\n * Create a new BatchRenderer plugin for Renderer. this convenience can provide an easy way\n * to extend BatchRenderer with all the necessary pieces.\n * @example\n * const fragment = `\n * varying vec2 vTextureCoord;\n * varying vec4 vColor;\n * varying float vTextureId;\n * uniform sampler2D uSamplers[%count%];\n *\n * void main(void){\n * vec4 color;\n * %forloop%\n * gl_FragColor = vColor * vec4(color.a - color.rgb, color.a);\n * }\n * `;\n * const InvertBatchRenderer = PIXI.BatchPluginFactory.create({ fragment });\n * PIXI.Renderer.registerPlugin('invert', InvertBatchRenderer);\n * const sprite = new PIXI.Sprite();\n * sprite.pluginName = 'invert';\n *\n * @static\n * @param {object} [options]\n * @param {string} [options.vertex=PIXI.BatchPluginFactory.defaultVertexSrc] - Vertex shader source\n * @param {string} [options.fragment=PIXI.BatchPluginFactory.defaultFragmentTemplate] - Fragment shader template\n * @param {number} [options.vertexSize=6] - Vertex size\n * @param {object} [options.geometryClass=PIXI.BatchGeometry]\n * @return {*} New batch renderer plugin\n */\n static create(options?: IBatchFactoryOptions): typeof AbstractBatchRenderer\n {\n const { vertex, fragment, vertexSize, geometryClass } = Object.assign({\n vertex: defaultVertex,\n fragment: defaultFragment,\n geometryClass: BatchGeometry,\n vertexSize: 6,\n }, options);\n\n return class BatchPlugin extends AbstractBatchRenderer\n {\n constructor(renderer: Renderer)\n {\n super(renderer);\n\n this.shaderGenerator = new BatchShaderGenerator(vertex, fragment);\n this.geometryClass = geometryClass;\n this.vertexSize = vertexSize;\n }\n };\n }\n\n /**\n * The default vertex shader source\n *\n * @static\n * @type {string}\n * @constant\n */\n static get defaultVertexSrc(): string\n {\n return defaultVertex;\n }\n\n /**\n * The default fragment shader source\n *\n * @static\n * @type {string}\n * @constant\n */\n static get defaultFragmentTemplate(): string\n {\n return defaultFragment;\n }\n}\n\n// Setup the default BatchRenderer plugin, this is what\n// we'll actually export at the root level\nexport const BatchRenderer = BatchPluginFactory.create();\n","import { Container } from '@pixi/display';\nimport { autoDetectRenderer } from '@pixi/core';\n\nimport type { Rectangle } from '@pixi/math';\nimport type { Renderer, IRendererOptionsAuto, AbstractRenderer } from '@pixi/core';\nimport type { IDestroyOptions } from '@pixi/display';\n\nexport interface IApplicationPlugin {\n init: (...params: any[]) => any;\n destroy: (...params: any[]) => any;\n}\n\nexport interface IApplicationOptions extends IRendererOptionsAuto {\n autoStart?: boolean;\n sharedTicker?: boolean;\n sharedLoader?: boolean;\n resizeTo?: Window | HTMLElement;\n resizeThrottle?: number;\n}\n\n/**\n * Convenience class to create a new PIXI application.\n *\n * This class automatically creates the renderer, ticker and root container.\n *\n * @example\n * // Create the application\n * const app = new PIXI.Application();\n *\n * // Add the view to the DOM\n * document.body.appendChild(app.view);\n *\n * // ex, add display objects\n * app.stage.addChild(PIXI.Sprite.from('something.png'));\n *\n * @class\n * @memberof PIXI\n */\nexport class Application\n{\n public static _plugins: IApplicationPlugin[];\n\n public stage: Container;\n public renderer: Renderer|AbstractRenderer;\n\n /**\n * @param {object} [options] - The optional renderer parameters.\n * @param {boolean} [options.autoStart=true] - Automatically starts the rendering after the construction.\n * **Note**: Setting this parameter to false does NOT stop the shared ticker even if you set\n * options.sharedTicker to true in case that it is already started. Stop it by your own.\n * @param {number} [options.width=800] - The width of the renderers view.\n * @param {number} [options.height=600] - The height of the renderers view.\n * @param {HTMLCanvasElement} [options.view] - The canvas to use as a view, optional.\n * @param {boolean} [options.transparent=false] - If the render view is transparent.\n * @param {boolean} [options.autoDensity=false] - Resizes renderer view in CSS pixels to allow for\n * resolutions other than 1.\n * @param {boolean} [options.antialias=false] - Sets antialias\n * @param {boolean} [options.preserveDrawingBuffer=false] - Enables drawing buffer preservation, enable this if you\n * need to call toDataUrl on the WebGL context.\n * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the renderer, retina would be 2.\n * @param {boolean} [options.forceCanvas=false] - prevents selection of WebGL renderer, even if such is present, this\n * option only is available when using **pixi.js-legacy** or **@pixi/canvas-renderer** modules, otherwise\n * it is ignored.\n * @param {number} [options.backgroundColor=0x000000] - The background color of the rendered area\n * (shown if not transparent).\n * @param {boolean} [options.clearBeforeRender=true] - This sets if the renderer will clear the canvas or\n * not before the new render pass.\n * @param {string} [options.powerPreference] - Parameter passed to webgl context, set to \"high-performance\"\n * for devices with dual graphics card. **(WebGL only)**.\n * @param {boolean} [options.sharedTicker=false] - `true` to use PIXI.Ticker.shared, `false` to create new ticker.\n * If set to false, you cannot register a handler to occur before anything that runs on the shared ticker.\n * The system ticker will always run before both the shared ticker and the app ticker.\n * @param {boolean} [options.sharedLoader=false] - `true` to use PIXI.Loader.shared, `false` to create new Loader.\n * @param {Window|HTMLElement} [options.resizeTo] - Element to automatically resize stage to.\n */\n constructor(options?: IApplicationOptions)\n {\n // The default options\n options = Object.assign({\n forceCanvas: false,\n }, options);\n\n /**\n * WebGL renderer if available, otherwise CanvasRenderer.\n * @member {PIXI.Renderer|PIXI.CanvasRenderer}\n */\n this.renderer = autoDetectRenderer(options);\n\n /**\n * The root display container that's rendered.\n * @member {PIXI.Container}\n */\n this.stage = new Container();\n\n // install plugins here\n Application._plugins.forEach((plugin) =>\n {\n plugin.init.call(this, options);\n });\n }\n\n /**\n * Register a middleware plugin for the application\n * @static\n * @param {PIXI.Application.Plugin} plugin - Plugin being installed\n */\n static registerPlugin(plugin: IApplicationPlugin): void\n {\n Application._plugins.push(plugin);\n }\n\n /**\n * Render the current stage.\n */\n public render(): void\n {\n // TODO: Since CanvasRenderer has not been converted this function thinks it takes DisplayObject & PIXI.DisplayObject\n // This can be fixed when CanvasRenderer is converted.\n this.renderer.render(this.stage as any);\n }\n\n /**\n * Reference to the renderer's canvas element.\n * @member {HTMLCanvasElement}\n * @readonly\n */\n get view(): HTMLCanvasElement\n {\n return this.renderer.view;\n }\n\n /**\n * Reference to the renderer's screen rectangle. Its safe to use as `filterArea` or `hitArea` for the whole screen.\n * @member {PIXI.Rectangle}\n * @readonly\n */\n get screen(): Rectangle\n {\n return this.renderer.screen;\n }\n\n /**\n * Destroy and don't use after this.\n * @param {Boolean} [removeView=false] - Automatically remove canvas from DOM.\n * @param {object|boolean} [stageOptions] - Options parameter. A boolean will act as if all options\n * have been set to that value\n * @param {boolean} [stageOptions.children=false] - if set to true, all the children will have their destroy\n * method called as well. 'stageOptions' will be passed on to those calls.\n * @param {boolean} [stageOptions.texture=false] - Only used for child Sprites if stageOptions.children is set\n * to true. Should it destroy the texture of the child sprite\n * @param {boolean} [stageOptions.baseTexture=false] - Only used for child Sprites if stageOptions.children is set\n * to true. Should it destroy the base texture of the child sprite\n */\n public destroy(removeView?: boolean, stageOptions?: IDestroyOptions|boolean): void\n {\n // Destroy plugins in the opposite order\n // which they were constructed\n const plugins = Application._plugins.slice(0);\n\n plugins.reverse();\n plugins.forEach((plugin) =>\n {\n plugin.destroy.call(this);\n });\n\n this.stage.destroy(stageOptions);\n this.stage = null;\n\n this.renderer.destroy(removeView);\n this.renderer = null;\n }\n}\n\n/**\n * @memberof PIXI.Application\n * @typedef {object} Plugin\n * @property {function} init - Called when Application is constructed, scoped to Application instance.\n * Passes in `options` as the only argument, which are Application constructor options.\n * @property {function} destroy - Called when destroying Application, scoped to Application instance\n */\n\n/**\n * Collection of installed plugins.\n * @static\n * @private\n * @type {PIXI.Application.Plugin[]}\n */\nApplication._plugins = [];\n","import type { CanvasRenderer } from '@pixi/canvas-renderer';\nimport type { Renderer } from '@pixi/core';\nimport type { IApplicationOptions } from './Application';\n\n/**\n * Middleware for for Application's resize functionality\n * @private\n * @class\n */\nexport class ResizePlugin\n{\n public static resizeTo: Window|HTMLElement;\n public static resize: () => void;\n public static renderer: Renderer|CanvasRenderer;\n public static queueResize: () => void;\n private static _resizeId: number;\n private static _resizeTo: Window|HTMLElement;\n private static cancelResize: () => void;\n\n /**\n * Initialize the plugin with scope of application instance\n * @static\n * @private\n * @param {object} [options] - See application options\n */\n static init(options?: IApplicationOptions): void\n {\n /**\n * The HTML element or window to automatically resize the\n * renderer's view element to match width and height.\n * @type {Window|HTMLElement}\n * @name resizeTo\n * @memberof PIXI.Application#\n */\n Object.defineProperty(this, 'resizeTo',\n {\n set(dom: Window|HTMLElement)\n {\n window.removeEventListener('resize', this.queueResize);\n this._resizeTo = dom;\n if (dom)\n {\n window.addEventListener('resize', this.queueResize);\n this.resize();\n }\n },\n get()\n {\n return this._resizeTo;\n },\n });\n\n /**\n * Resize is throttled, so it's\n * safe to call this multiple times per frame and it'll\n * only be called once.\n * @method PIXI.Application#queueResize\n */\n this.queueResize = (): void =>\n {\n if (!this._resizeTo)\n {\n return;\n }\n\n this.cancelResize();\n\n // // Throttle resize events per raf\n this._resizeId = requestAnimationFrame(() => this.resize());\n };\n\n /**\n * Cancel the resize queue.\n * @method PIXI.Application#cancelResize\n * @private\n */\n this.cancelResize = (): void =>\n {\n if (this._resizeId)\n {\n cancelAnimationFrame(this._resizeId);\n this._resizeId = null;\n }\n };\n\n /**\n * Execute an immediate resize on the renderer, this is not\n * throttled and can be expensive to call many times in a row.\n * Will resize only if `resizeTo` property is set.\n * @method PIXI.Application#resize\n */\n this.resize = (): void =>\n {\n if (!this._resizeTo)\n {\n return;\n }\n\n // clear queue resize\n this.cancelResize();\n\n let width: number;\n let height: number;\n\n // Resize to the window\n if (this._resizeTo === window)\n {\n width = window.innerWidth;\n height = window.innerHeight;\n }\n // Resize to other HTML entities\n else\n {\n const { clientWidth, clientHeight } = this._resizeTo as HTMLElement;\n\n width = clientWidth;\n height = clientHeight;\n }\n\n this.renderer.resize(width, height);\n };\n\n // On resize\n this._resizeId = null;\n this._resizeTo = null;\n this.resizeTo = options.resizeTo || null;\n }\n\n /**\n * Clean up the ticker, scoped to application\n * @static\n * @private\n */\n static destroy(): void\n {\n this.cancelResize();\n this.cancelResize = null;\n this.queueResize = null;\n this.resizeTo = null;\n this.resize = null;\n }\n}\n","import { CanvasRenderTarget } from '@pixi/utils';\nimport { Rectangle } from '@pixi/math';\nimport { RenderTexture } from '@pixi/core';\n\nimport type { Renderer, IRendererPlugin } from '@pixi/core';\nimport type { DisplayObject } from '@pixi/display';\n\nconst TEMP_RECT = new Rectangle();\nconst BYTES_PER_PIXEL = 4;\n\n/**\n * This class provides renderer-specific plugins for exporting content from a renderer.\n * For instance, these plugins can be used for saving an Image, Canvas element or for exporting the raw image data (pixels).\n *\n * Do not instantiate these plugins directly. It is available from the `renderer.plugins` property.\n * See {@link PIXI.CanvasRenderer#plugins} or {@link PIXI.Renderer#plugins}.\n * @example\n * // Create a new app (will auto-add extract plugin to renderer)\n * const app = new PIXI.Application();\n *\n * // Draw a red circle\n * const graphics = new PIXI.Graphics()\n * .beginFill(0xFF0000)\n * .drawCircle(0, 0, 50);\n *\n * // Render the graphics as an HTMLImageElement\n * const image = app.renderer.plugins.extract.image(graphics);\n * document.body.appendChild(image);\n * @class\n * @memberof PIXI\n */\nexport class Extract implements IRendererPlugin\n{\n private renderer: Renderer;\n\n /**\n * @param {PIXI.Renderer} renderer - A reference to the current renderer\n */\n constructor(renderer: Renderer)\n {\n this.renderer = renderer;\n /**\n * Collection of methods for extracting data (image, pixels, etc.) from a display object or render texture\n *\n * @member {PIXI.Extract} extract\n * @memberof PIXI.Renderer#\n * @see PIXI.Extract\n */\n renderer.extract = this;\n }\n\n /**\n * Will return a HTML Image of the target\n *\n * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n * to convert. If left empty will use the main renderer\n * @param {string} [format] - Image format, e.g. \"image/jpeg\" or \"image/webp\".\n * @param {number} [quality] - JPEG or Webp compression from 0 to 1. Default is 0.92.\n * @return {HTMLImageElement} HTML Image of the target\n */\n public image(target: DisplayObject|RenderTexture, format?: string, quality?: number): HTMLImageElement\n {\n const image = new Image();\n\n image.src = this.base64(target, format, quality);\n\n return image;\n }\n\n /**\n * Will return a a base64 encoded string of this target. It works by calling\n * `Extract.getCanvas` and then running toDataURL on that.\n *\n * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n * to convert. If left empty will use the main renderer\n * @param {string} [format] - Image format, e.g. \"image/jpeg\" or \"image/webp\".\n * @param {number} [quality] - JPEG or Webp compression from 0 to 1. Default is 0.92.\n * @return {string} A base64 encoded string of the texture.\n */\n public base64(target: DisplayObject|RenderTexture, format?: string, quality?: number): string\n {\n return this.canvas(target).toDataURL(format, quality);\n }\n\n /**\n * Creates a Canvas element, renders this target to it and then returns it.\n *\n * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n * to convert. If left empty will use the main renderer\n * @return {HTMLCanvasElement} A Canvas element with the texture rendered on.\n */\n public canvas(target: DisplayObject|RenderTexture): HTMLCanvasElement\n {\n const renderer = this.renderer;\n let resolution;\n let frame;\n let flipY = false;\n let renderTexture;\n let generated = false;\n\n if (target)\n {\n if (target instanceof RenderTexture)\n {\n renderTexture = target;\n }\n else\n {\n renderTexture = this.renderer.generateTexture(target);\n generated = true;\n }\n }\n\n if (renderTexture)\n {\n resolution = renderTexture.baseTexture.resolution;\n frame = renderTexture.frame;\n flipY = false;\n renderer.renderTexture.bind(renderTexture);\n }\n else\n {\n resolution = this.renderer.resolution;\n\n flipY = true;\n\n frame = TEMP_RECT;\n frame.width = this.renderer.width;\n frame.height = this.renderer.height;\n\n renderer.renderTexture.bind(null);\n }\n\n const width = Math.floor((frame.width * resolution) + 1e-4);\n const height = Math.floor((frame.height * resolution) + 1e-4);\n\n let canvasBuffer = new CanvasRenderTarget(width, height, 1);\n\n const webglPixels = new Uint8Array(BYTES_PER_PIXEL * width * height);\n\n // read pixels to the array\n const gl = renderer.gl;\n\n gl.readPixels(\n frame.x * resolution,\n frame.y * resolution,\n width,\n height,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n webglPixels\n );\n\n // add the pixels to the canvas\n const canvasData = canvasBuffer.context.getImageData(0, 0, width, height);\n\n Extract.arrayPostDivide(webglPixels, canvasData.data);\n\n canvasBuffer.context.putImageData(canvasData, 0, 0);\n\n // pulling pixels\n if (flipY)\n {\n const target = new CanvasRenderTarget(canvasBuffer.width, canvasBuffer.height, 1);\n\n target.context.scale(1, -1);\n\n // we can't render to itself because we should be empty before render.\n target.context.drawImage(canvasBuffer.canvas, 0, -height);\n\n canvasBuffer.destroy();\n canvasBuffer = target;\n }\n\n if (generated)\n {\n renderTexture.destroy(true);\n }\n\n // send the canvas back..\n return canvasBuffer.canvas;\n }\n\n /**\n * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA\n * order, with integer values between 0 and 255 (included).\n *\n * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n * to convert. If left empty will use the main renderer\n * @return {Uint8Array} One-dimensional array containing the pixel data of the entire texture\n */\n public pixels(target: DisplayObject|RenderTexture): Uint8Array\n {\n const renderer = this.renderer;\n let resolution;\n let frame;\n let renderTexture;\n let generated = false;\n\n if (target)\n {\n if (target instanceof RenderTexture)\n {\n renderTexture = target;\n }\n else\n {\n renderTexture = this.renderer.generateTexture(target);\n generated = true;\n }\n }\n\n if (renderTexture)\n {\n resolution = renderTexture.baseTexture.resolution;\n frame = renderTexture.frame;\n\n // bind the buffer\n renderer.renderTexture.bind(renderTexture);\n }\n else\n {\n resolution = renderer.resolution;\n\n frame = TEMP_RECT;\n frame.width = renderer.width;\n frame.height = renderer.height;\n\n renderer.renderTexture.bind(null);\n }\n\n const width = frame.width * resolution;\n const height = frame.height * resolution;\n\n const webglPixels = new Uint8Array(BYTES_PER_PIXEL * width * height);\n\n // read pixels to the array\n const gl = renderer.gl;\n\n gl.readPixels(\n frame.x * resolution,\n frame.y * resolution,\n width,\n height,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n webglPixels\n );\n\n if (generated)\n {\n renderTexture.destroy(true);\n }\n\n Extract.arrayPostDivide(webglPixels, webglPixels);\n\n return webglPixels;\n }\n\n /**\n * Destroys the extract\n *\n */\n public destroy(): void\n {\n this.renderer.extract = null;\n this.renderer = null;\n }\n\n /**\n * Takes premultiplied pixel data and produces regular pixel data\n *\n * @private\n * @param pixels {number[] | Uint8Array | Uint8ClampedArray} array of pixel data\n * @param out {number[] | Uint8Array | Uint8ClampedArray} output array\n */\n static arrayPostDivide(\n pixels: number[] | Uint8Array | Uint8ClampedArray, out: number[] | Uint8Array | Uint8ClampedArray\n ): void\n {\n for (let i = 0; i < pixels.length; i += 4)\n {\n const alpha = out[i + 3] = pixels[i + 3];\n\n if (alpha !== 0)\n {\n out[i] = Math.round(Math.min(pixels[i] * 255.0 / alpha, 255.0));\n out[i + 1] = Math.round(Math.min(pixels[i + 1] * 255.0 / alpha, 255.0));\n out[i + 2] = Math.round(Math.min(pixels[i + 2] * 255.0 / alpha, 255.0));\n }\n else\n {\n out[i] = pixels[i];\n out[i + 1] = pixels[i + 1];\n out[i + 2] = pixels[i + 2];\n }\n }\n }\n}\n","/**\n * Smaller version of the async library constructs.\n *\n * @namespace async\n */\n\n/**\n * Noop function\n *\n * @ignore\n * @function\n * @memberof async\n */\nfunction _noop() { /* empty */ }\n\n/**\n * Iterates an array in series.\n *\n * @memberof async\n * @function eachSeries\n * @param {Array.<*>} array - Array to iterate.\n * @param {function} iterator - Function to call for each element.\n * @param {function} callback - Function to call when done, or on error.\n * @param {boolean} [deferNext=false] - Break synchronous each loop by calling next with a setTimeout of 1.\n */\nexport function eachSeries(array, iterator, callback, deferNext) {\n let i = 0;\n const len = array.length;\n\n (function next(err) {\n if (err || i === len) {\n if (callback) {\n callback(err);\n }\n\n return;\n }\n\n if (deferNext) {\n setTimeout(() => {\n iterator(array[i++], next);\n }, 1);\n }\n else {\n iterator(array[i++], next);\n }\n })();\n}\n\n/**\n * Ensures a function is only called once.\n *\n * @ignore\n * @memberof async\n * @param {function} fn - The function to wrap.\n * @return {function} The wrapping function.\n */\nfunction onlyOnce(fn) {\n return function onceWrapper() {\n if (fn === null) {\n throw new Error('Callback was already called.');\n }\n\n const callFn = fn;\n\n fn = null;\n callFn.apply(this, arguments);\n };\n}\n\n/**\n * Async queue implementation,\n *\n * @memberof async\n * @function queue\n * @param {function} worker - The worker function to call for each task.\n * @param {number} concurrency - How many workers to run in parrallel.\n * @return {*} The async queue object.\n */\nexport function queue(worker, concurrency) {\n if (concurrency == null) { // eslint-disable-line no-eq-null,eqeqeq\n concurrency = 1;\n }\n else if (concurrency === 0) {\n throw new Error('Concurrency must not be zero');\n }\n\n let workers = 0;\n const q = {\n _tasks: [],\n concurrency,\n saturated: _noop,\n unsaturated: _noop,\n buffer: concurrency / 4,\n empty: _noop,\n drain: _noop,\n error: _noop,\n started: false,\n paused: false,\n push(data, callback) {\n _insert(data, false, callback);\n },\n kill() {\n workers = 0;\n q.drain = _noop;\n q.started = false;\n q._tasks = [];\n },\n unshift(data, callback) {\n _insert(data, true, callback);\n },\n process() {\n while (!q.paused && workers < q.concurrency && q._tasks.length) {\n const task = q._tasks.shift();\n\n if (q._tasks.length === 0) {\n q.empty();\n }\n\n workers += 1;\n\n if (workers === q.concurrency) {\n q.saturated();\n }\n\n worker(task.data, onlyOnce(_next(task)));\n }\n },\n length() {\n return q._tasks.length;\n },\n running() {\n return workers;\n },\n idle() {\n return q._tasks.length + workers === 0;\n },\n pause() {\n if (q.paused === true) {\n return;\n }\n\n q.paused = true;\n },\n resume() {\n if (q.paused === false) {\n return;\n }\n\n q.paused = false;\n\n // Need to call q.process once per concurrent\n // worker to preserve full concurrency after pause\n for (let w = 1; w <= q.concurrency; w++) {\n q.process();\n }\n },\n };\n\n function _insert(data, insertAtFront, callback) {\n if (callback != null && typeof callback !== 'function') { // eslint-disable-line no-eq-null,eqeqeq\n throw new Error('task callback must be a function');\n }\n\n q.started = true;\n\n if (data == null && q.idle()) { // eslint-disable-line no-eq-null,eqeqeq\n // call drain immediately if there are no tasks\n setTimeout(() => q.drain(), 1);\n\n return;\n }\n\n const item = {\n data,\n callback: typeof callback === 'function' ? callback : _noop,\n };\n\n if (insertAtFront) {\n q._tasks.unshift(item);\n }\n else {\n q._tasks.push(item);\n }\n\n setTimeout(() => q.process(), 1);\n }\n\n function _next(task) {\n return function next() {\n workers -= 1;\n\n task.callback.apply(task, arguments);\n\n if (arguments[0] != null) { // eslint-disable-line no-eq-null,eqeqeq\n q.error(arguments[0], task.data);\n }\n\n if (workers <= (q.concurrency - q.buffer)) {\n q.unsaturated();\n }\n\n if (q.idle()) {\n q.drain();\n }\n\n q.process();\n };\n }\n\n return q;\n}\n","// a simple in-memory cache for resources\nconst cache = {};\n\n/**\n * A simple in-memory cache for resource.\n *\n * @memberof middleware\n * @function caching\n * @example\n * import { Loader, middleware } from 'resource-loader';\n * const loader = new Loader();\n * loader.use(middleware.caching);\n * @param {Resource} resource - Current Resource\n * @param {function} next - Callback when complete\n */\nexport function caching(resource, next) {\n // if cached, then set data and complete the resource\n if (cache[resource.url]) {\n resource.data = cache[resource.url];\n resource.complete(); // marks resource load complete and stops processing before middlewares\n }\n // if not cached, wait for complete and store it in the cache.\n else {\n resource.onComplete.once(() => (cache[this.url] = this.data));\n }\n\n next();\n}\n","import parseUri from 'parse-uri';\nimport Signal from 'mini-signals';\n\n// tests if CORS is supported in XHR, if not we need to use XDR\nconst useXdr = !!(window.XDomainRequest && !('withCredentials' in (new XMLHttpRequest())));\nlet tempAnchor = null;\n\n// some status constants\nconst STATUS_NONE = 0;\nconst STATUS_OK = 200;\nconst STATUS_EMPTY = 204;\nconst STATUS_IE_BUG_EMPTY = 1223;\nconst STATUS_TYPE_OK = 2;\n\n// noop\nfunction _noop() { /* empty */ }\n\n/**\n * Manages the state and loading of a resource and all child resources.\n *\n * @class\n */\nclass Resource {\n /**\n * Sets the load type to be used for a specific extension.\n *\n * @static\n * @param {string} extname - The extension to set the type for, e.g. \"png\" or \"fnt\"\n * @param {Resource.LOAD_TYPE} loadType - The load type to set it to.\n */\n static setExtensionLoadType(extname, loadType) {\n setExtMap(Resource._loadTypeMap, extname, loadType);\n }\n\n /**\n * Sets the load type to be used for a specific extension.\n *\n * @static\n * @param {string} extname - The extension to set the type for, e.g. \"png\" or \"fnt\"\n * @param {Resource.XHR_RESPONSE_TYPE} xhrType - The xhr type to set it to.\n */\n static setExtensionXhrType(extname, xhrType) {\n setExtMap(Resource._xhrTypeMap, extname, xhrType);\n }\n\n /**\n * @param {string} name - The name of the resource to load.\n * @param {string|string[]} url - The url for this resource, for audio/video loads you can pass\n * an array of sources.\n * @param {object} [options] - The options for the load.\n * @param {string|boolean} [options.crossOrigin] - Is this request cross-origin? Default is to\n * determine automatically.\n * @param {number} [options.timeout=0] - A timeout in milliseconds for the load. If the load takes\n * longer than this time it is cancelled and the load is considered a failure. If this value is\n * set to `0` then there is no explicit timeout.\n * @param {Resource.LOAD_TYPE} [options.loadType=Resource.LOAD_TYPE.XHR] - How should this resource\n * be loaded?\n * @param {Resource.XHR_RESPONSE_TYPE} [options.xhrType=Resource.XHR_RESPONSE_TYPE.DEFAULT] - How\n * should the data being loaded be interpreted when using XHR?\n * @param {Resource.IMetadata} [options.metadata] - Extra configuration for middleware and the Resource object.\n */\n constructor(name, url, options) {\n if (typeof name !== 'string' || typeof url !== 'string') {\n throw new Error('Both name and url are required for constructing a resource.');\n }\n\n options = options || {};\n\n /**\n * The state flags of this resource.\n *\n * @private\n * @member {number}\n */\n this._flags = 0;\n\n // set data url flag, needs to be set early for some _determineX checks to work.\n this._setFlag(Resource.STATUS_FLAGS.DATA_URL, url.indexOf('data:') === 0);\n\n /**\n * The name of this resource.\n *\n * @readonly\n * @member {string}\n */\n this.name = name;\n\n /**\n * The url used to load this resource.\n *\n * @readonly\n * @member {string}\n */\n this.url = url;\n\n /**\n * The extension used to load this resource.\n *\n * @readonly\n * @member {string}\n */\n this.extension = this._getExtension();\n\n /**\n * The data that was loaded by the resource.\n *\n * @member {any}\n */\n this.data = null;\n\n /**\n * Is this request cross-origin? If unset, determined automatically.\n *\n * @member {string}\n */\n this.crossOrigin = options.crossOrigin === true ? 'anonymous' : options.crossOrigin;\n\n /**\n * A timeout in milliseconds for the load. If the load takes longer than this time\n * it is cancelled and the load is considered a failure. If this value is set to `0`\n * then there is no explicit timeout.\n *\n * @member {number}\n */\n this.timeout = options.timeout || 0;\n\n /**\n * The method of loading to use for this resource.\n *\n * @member {Resource.LOAD_TYPE}\n */\n this.loadType = options.loadType || this._determineLoadType();\n\n /**\n * The type used to load the resource via XHR. If unset, determined automatically.\n *\n * @member {string}\n */\n this.xhrType = options.xhrType;\n\n /**\n * Extra info for middleware, and controlling specifics about how the resource loads.\n *\n * Note that if you pass in a `loadElement`, the Resource class takes ownership of it.\n * Meaning it will modify it as it sees fit.\n *\n * @member {Resource.IMetadata}\n */\n this.metadata = options.metadata || {};\n\n /**\n * The error that occurred while loading (if any).\n *\n * @readonly\n * @member {Error}\n */\n this.error = null;\n\n /**\n * The XHR object that was used to load this resource. This is only set\n * when `loadType` is `Resource.LOAD_TYPE.XHR`.\n *\n * @readonly\n * @member {XMLHttpRequest}\n */\n this.xhr = null;\n\n /**\n * The child resources this resource owns.\n *\n * @readonly\n * @member {Resource[]}\n */\n this.children = [];\n\n /**\n * The resource type.\n *\n * @readonly\n * @member {Resource.TYPE}\n */\n this.type = Resource.TYPE.UNKNOWN;\n\n /**\n * The progress chunk owned by this resource.\n *\n * @readonly\n * @member {number}\n */\n this.progressChunk = 0;\n\n /**\n * The `dequeue` method that will be used a storage place for the async queue dequeue method\n * used privately by the loader.\n *\n * @private\n * @member {function}\n */\n this._dequeue = _noop;\n\n /**\n * Used a storage place for the on load binding used privately by the loader.\n *\n * @private\n * @member {function}\n */\n this._onLoadBinding = null;\n\n /**\n * The timer for element loads to check if they timeout.\n *\n * @private\n * @member {number}\n */\n this._elementTimer = 0;\n\n /**\n * The `complete` function bound to this resource's context.\n *\n * @private\n * @member {function}\n */\n this._boundComplete = this.complete.bind(this);\n\n /**\n * The `_onError` function bound to this resource's context.\n *\n * @private\n * @member {function}\n */\n this._boundOnError = this._onError.bind(this);\n\n /**\n * The `_onProgress` function bound to this resource's context.\n *\n * @private\n * @member {function}\n */\n this._boundOnProgress = this._onProgress.bind(this);\n\n /**\n * The `_onTimeout` function bound to this resource's context.\n *\n * @private\n * @member {function}\n */\n this._boundOnTimeout = this._onTimeout.bind(this);\n\n // xhr callbacks\n this._boundXhrOnError = this._xhrOnError.bind(this);\n this._boundXhrOnTimeout = this._xhrOnTimeout.bind(this);\n this._boundXhrOnAbort = this._xhrOnAbort.bind(this);\n this._boundXhrOnLoad = this._xhrOnLoad.bind(this);\n\n /**\n * Dispatched when the resource beings to load.\n *\n * The callback looks like {@link Resource.OnStartSignal}.\n *\n * @member {Signal}\n */\n this.onStart = new Signal();\n\n /**\n * Dispatched each time progress of this resource load updates.\n * Not all resources types and loader systems can support this event\n * so sometimes it may not be available. If the resource\n * is being loaded on a modern browser, using XHR, and the remote server\n * properly sets Content-Length headers, then this will be available.\n *\n * The callback looks like {@link Resource.OnProgressSignal}.\n *\n * @member {Signal}\n */\n this.onProgress = new Signal();\n\n /**\n * Dispatched once this resource has loaded, if there was an error it will\n * be in the `error` property.\n *\n * The callback looks like {@link Resource.OnCompleteSignal}.\n *\n * @member {Signal}\n */\n this.onComplete = new Signal();\n\n /**\n * Dispatched after this resource has had all the *after* middleware run on it.\n *\n * The callback looks like {@link Resource.OnCompleteSignal}.\n *\n * @member {Signal}\n */\n this.onAfterMiddleware = new Signal();\n }\n\n /**\n * When the resource starts to load.\n *\n * @memberof Resource\n * @callback OnStartSignal\n * @param {Resource} resource - The resource that the event happened on.\n */\n\n /**\n * When the resource reports loading progress.\n *\n * @memberof Resource\n * @callback OnProgressSignal\n * @param {Resource} resource - The resource that the event happened on.\n * @param {number} percentage - The progress of the load in the range [0, 1].\n */\n\n /**\n * When the resource finishes loading.\n *\n * @memberof Resource\n * @callback OnCompleteSignal\n * @param {Resource} resource - The resource that the event happened on.\n */\n\n /**\n * @memberof Resource\n * @typedef {object} IMetadata\n * @property {HTMLImageElement|HTMLAudioElement|HTMLVideoElement} [loadElement=null] - The\n * element to use for loading, instead of creating one.\n * @property {boolean} [skipSource=false] - Skips adding source(s) to the load element. This\n * is useful if you want to pass in a `loadElement` that you already added load sources to.\n * @property {string|string[]} [mimeType] - The mime type to use for the source element\n * of a video/audio elment. If the urls are an array, you can pass this as an array as well\n * where each index is the mime type to use for the corresponding url index.\n */\n\n /**\n * Stores whether or not this url is a data url.\n *\n * @readonly\n * @member {boolean}\n */\n get isDataUrl() {\n return this._hasFlag(Resource.STATUS_FLAGS.DATA_URL);\n }\n\n /**\n * Describes if this resource has finished loading. Is true when the resource has completely\n * loaded.\n *\n * @readonly\n * @member {boolean}\n */\n get isComplete() {\n return this._hasFlag(Resource.STATUS_FLAGS.COMPLETE);\n }\n\n /**\n * Describes if this resource is currently loading. Is true when the resource starts loading,\n * and is false again when complete.\n *\n * @readonly\n * @member {boolean}\n */\n get isLoading() {\n return this._hasFlag(Resource.STATUS_FLAGS.LOADING);\n }\n\n /**\n * Marks the resource as complete.\n *\n */\n complete() {\n this._clearEvents();\n this._finish();\n }\n\n /**\n * Aborts the loading of this resource, with an optional message.\n *\n * @param {string} message - The message to use for the error\n */\n abort(message) {\n // abort can be called multiple times, ignore subsequent calls.\n if (this.error) {\n return;\n }\n\n // store error\n this.error = new Error(message);\n\n // clear events before calling aborts\n this._clearEvents();\n\n // abort the actual loading\n if (this.xhr) {\n this.xhr.abort();\n }\n else if (this.xdr) {\n this.xdr.abort();\n }\n else if (this.data) {\n // single source\n if (this.data.src) {\n this.data.src = Resource.EMPTY_GIF;\n }\n // multi-source\n else {\n while (this.data.firstChild) {\n this.data.removeChild(this.data.firstChild);\n }\n }\n }\n\n // done now.\n this._finish();\n }\n\n /**\n * Kicks off loading of this resource. This method is asynchronous.\n *\n * @param {Resource.OnCompleteSignal} [cb] - Optional callback to call once the resource is loaded.\n */\n load(cb) {\n if (this.isLoading) {\n return;\n }\n\n if (this.isComplete) {\n if (cb) {\n setTimeout(() => cb(this), 1);\n }\n\n return;\n }\n else if (cb) {\n this.onComplete.once(cb);\n }\n\n this._setFlag(Resource.STATUS_FLAGS.LOADING, true);\n\n this.onStart.dispatch(this);\n\n // if unset, determine the value\n if (this.crossOrigin === false || typeof this.crossOrigin !== 'string') {\n this.crossOrigin = this._determineCrossOrigin(this.url);\n }\n\n switch (this.loadType) {\n case Resource.LOAD_TYPE.IMAGE:\n this.type = Resource.TYPE.IMAGE;\n this._loadElement('image');\n break;\n\n case Resource.LOAD_TYPE.AUDIO:\n this.type = Resource.TYPE.AUDIO;\n this._loadSourceElement('audio');\n break;\n\n case Resource.LOAD_TYPE.VIDEO:\n this.type = Resource.TYPE.VIDEO;\n this._loadSourceElement('video');\n break;\n\n case Resource.LOAD_TYPE.XHR:\n /* falls through */\n default:\n if (useXdr && this.crossOrigin) {\n this._loadXdr();\n }\n else {\n this._loadXhr();\n }\n break;\n }\n }\n\n /**\n * Checks if the flag is set.\n *\n * @private\n * @param {number} flag - The flag to check.\n * @return {boolean} True if the flag is set.\n */\n _hasFlag(flag) {\n return (this._flags & flag) !== 0;\n }\n\n /**\n * (Un)Sets the flag.\n *\n * @private\n * @param {number} flag - The flag to (un)set.\n * @param {boolean} value - Whether to set or (un)set the flag.\n */\n _setFlag(flag, value) {\n this._flags = value ? (this._flags | flag) : (this._flags & ~flag);\n }\n\n /**\n * Clears all the events from the underlying loading source.\n *\n * @private\n */\n _clearEvents() {\n clearTimeout(this._elementTimer);\n\n if (this.data && this.data.removeEventListener) {\n this.data.removeEventListener('error', this._boundOnError, false);\n this.data.removeEventListener('load', this._boundComplete, false);\n this.data.removeEventListener('progress', this._boundOnProgress, false);\n this.data.removeEventListener('canplaythrough', this._boundComplete, false);\n }\n\n if (this.xhr) {\n if (this.xhr.removeEventListener) {\n this.xhr.removeEventListener('error', this._boundXhrOnError, false);\n this.xhr.removeEventListener('timeout', this._boundXhrOnTimeout, false);\n this.xhr.removeEventListener('abort', this._boundXhrOnAbort, false);\n this.xhr.removeEventListener('progress', this._boundOnProgress, false);\n this.xhr.removeEventListener('load', this._boundXhrOnLoad, false);\n }\n else {\n this.xhr.onerror = null;\n this.xhr.ontimeout = null;\n this.xhr.onprogress = null;\n this.xhr.onload = null;\n }\n }\n }\n\n /**\n * Finalizes the load.\n *\n * @private\n */\n _finish() {\n if (this.isComplete) {\n throw new Error('Complete called again for an already completed resource.');\n }\n\n this._setFlag(Resource.STATUS_FLAGS.COMPLETE, true);\n this._setFlag(Resource.STATUS_FLAGS.LOADING, false);\n\n this.onComplete.dispatch(this);\n }\n\n /**\n * Loads this resources using an element that has a single source,\n * like an HTMLImageElement.\n *\n * @private\n * @param {string} type - The type of element to use.\n */\n _loadElement(type) {\n if (this.metadata.loadElement) {\n this.data = this.metadata.loadElement;\n }\n else if (type === 'image' && typeof window.Image !== 'undefined') {\n this.data = new Image();\n }\n else {\n this.data = document.createElement(type);\n }\n\n if (this.crossOrigin) {\n this.data.crossOrigin = this.crossOrigin;\n }\n\n if (!this.metadata.skipSource) {\n this.data.src = this.url;\n }\n\n this.data.addEventListener('error', this._boundOnError, false);\n this.data.addEventListener('load', this._boundComplete, false);\n this.data.addEventListener('progress', this._boundOnProgress, false);\n\n if (this.timeout) {\n this._elementTimer = setTimeout(this._boundOnTimeout, this.timeout);\n }\n }\n\n /**\n * Loads this resources using an element that has multiple sources,\n * like an HTMLAudioElement or HTMLVideoElement.\n *\n * @private\n * @param {string} type - The type of element to use.\n */\n _loadSourceElement(type) {\n if (this.metadata.loadElement) {\n this.data = this.metadata.loadElement;\n }\n else if (type === 'audio' && typeof window.Audio !== 'undefined') {\n this.data = new Audio();\n }\n else {\n this.data = document.createElement(type);\n }\n\n if (this.data === null) {\n this.abort(`Unsupported element: ${type}`);\n\n return;\n }\n\n if (this.crossOrigin) {\n this.data.crossOrigin = this.crossOrigin;\n }\n\n if (!this.metadata.skipSource) {\n // support for CocoonJS Canvas+ runtime, lacks document.createElement('source')\n if (navigator.isCocoonJS) {\n this.data.src = Array.isArray(this.url) ? this.url[0] : this.url;\n }\n else if (Array.isArray(this.url)) {\n const mimeTypes = this.metadata.mimeType;\n\n for (let i = 0; i < this.url.length; ++i) {\n this.data.appendChild(\n this._createSource(type, this.url[i], Array.isArray(mimeTypes) ? mimeTypes[i] : mimeTypes)\n );\n }\n }\n else {\n const mimeTypes = this.metadata.mimeType;\n\n this.data.appendChild(\n this._createSource(type, this.url, Array.isArray(mimeTypes) ? mimeTypes[0] : mimeTypes)\n );\n }\n }\n\n this.data.addEventListener('error', this._boundOnError, false);\n this.data.addEventListener('load', this._boundComplete, false);\n this.data.addEventListener('progress', this._boundOnProgress, false);\n this.data.addEventListener('canplaythrough', this._boundComplete, false);\n\n this.data.load();\n\n if (this.timeout) {\n this._elementTimer = setTimeout(this._boundOnTimeout, this.timeout);\n }\n }\n\n /**\n * Loads this resources using an XMLHttpRequest.\n *\n * @private\n */\n _loadXhr() {\n // if unset, determine the value\n if (typeof this.xhrType !== 'string') {\n this.xhrType = this._determineXhrType();\n }\n\n const xhr = this.xhr = new XMLHttpRequest();\n\n // set the request type and url\n xhr.open('GET', this.url, true);\n\n xhr.timeout = this.timeout;\n\n // load json as text and parse it ourselves. We do this because some browsers\n // *cough* safari *cough* can't deal with it.\n if (this.xhrType === Resource.XHR_RESPONSE_TYPE.JSON || this.xhrType === Resource.XHR_RESPONSE_TYPE.DOCUMENT) {\n xhr.responseType = Resource.XHR_RESPONSE_TYPE.TEXT;\n }\n else {\n xhr.responseType = this.xhrType;\n }\n\n xhr.addEventListener('error', this._boundXhrOnError, false);\n xhr.addEventListener('timeout', this._boundXhrOnTimeout, false);\n xhr.addEventListener('abort', this._boundXhrOnAbort, false);\n xhr.addEventListener('progress', this._boundOnProgress, false);\n xhr.addEventListener('load', this._boundXhrOnLoad, false);\n\n xhr.send();\n }\n\n /**\n * Loads this resources using an XDomainRequest. This is here because we need to support IE9 (gross).\n *\n * @private\n */\n _loadXdr() {\n // if unset, determine the value\n if (typeof this.xhrType !== 'string') {\n this.xhrType = this._determineXhrType();\n }\n\n const xdr = this.xhr = new XDomainRequest(); // eslint-disable-line no-undef\n\n // XDomainRequest has a few quirks. Occasionally it will abort requests\n // A way to avoid this is to make sure ALL callbacks are set even if not used\n // More info here: http://stackoverflow.com/questions/15786966/xdomainrequest-aborts-post-on-ie-9\n xdr.timeout = this.timeout || 5000; // XDR needs a timeout value or it breaks in IE9\n\n xdr.onerror = this._boundXhrOnError;\n xdr.ontimeout = this._boundXhrOnTimeout;\n xdr.onprogress = this._boundOnProgress;\n xdr.onload = this._boundXhrOnLoad;\n\n xdr.open('GET', this.url, true);\n\n // Note: The xdr.send() call is wrapped in a timeout to prevent an\n // issue with the interface where some requests are lost if multiple\n // XDomainRequests are being sent at the same time.\n // Some info here: https://github.com/photonstorm/phaser/issues/1248\n setTimeout(() => xdr.send(), 1);\n }\n\n /**\n * Creates a source used in loading via an element.\n *\n * @private\n * @param {string} type - The element type (video or audio).\n * @param {string} url - The source URL to load from.\n * @param {string} [mime] - The mime type of the video\n * @return {HTMLSourceElement} The source element.\n */\n _createSource(type, url, mime) {\n if (!mime) {\n mime = `${type}/${this._getExtension(url)}`;\n }\n\n const source = document.createElement('source');\n\n source.src = url;\n source.type = mime;\n\n return source;\n }\n\n /**\n * Called if a load errors out.\n *\n * @param {Event} event - The error event from the element that emits it.\n * @private\n */\n _onError(event) {\n this.abort(`Failed to load element using: ${event.target.nodeName}`);\n }\n\n /**\n * Called if a load progress event fires for an element or xhr/xdr.\n *\n * @private\n * @param {XMLHttpRequestProgressEvent|Event} event - Progress event.\n */\n _onProgress(event) {\n if (event && event.lengthComputable) {\n this.onProgress.dispatch(this, event.loaded / event.total);\n }\n }\n\n /**\n * Called if a timeout event fires for an element.\n *\n * @private\n */\n _onTimeout() {\n this.abort(`Load timed out.`);\n }\n\n /**\n * Called if an error event fires for xhr/xdr.\n *\n * @private\n */\n _xhrOnError() {\n const xhr = this.xhr;\n\n this.abort(`${reqType(xhr)} Request failed. Status: ${xhr.status}, text: \"${xhr.statusText}\"`);\n }\n\n /**\n * Called if an error event fires for xhr/xdr.\n *\n * @private\n */\n _xhrOnTimeout() {\n const xhr = this.xhr;\n\n this.abort(`${reqType(xhr)} Request timed out.`);\n }\n\n /**\n * Called if an abort event fires for xhr/xdr.\n *\n * @private\n */\n _xhrOnAbort() {\n const xhr = this.xhr;\n\n this.abort(`${reqType(xhr)} Request was aborted by the user.`);\n }\n\n /**\n * Called when data successfully loads from an xhr/xdr request.\n *\n * @private\n * @param {XMLHttpRequestLoadEvent|Event} event - Load event\n */\n _xhrOnLoad() {\n const xhr = this.xhr;\n let text = '';\n let status = typeof xhr.status === 'undefined' ? STATUS_OK : xhr.status; // XDR has no `.status`, assume 200.\n\n // responseText is accessible only if responseType is '' or 'text' and on older browsers\n if (xhr.responseType === '' || xhr.responseType === 'text' || typeof xhr.responseType === 'undefined') {\n text = xhr.responseText;\n }\n\n // status can be 0 when using the `file://` protocol so we also check if a response is set.\n // If it has a response, we assume 200; otherwise a 0 status code with no contents is an aborted request.\n if (status === STATUS_NONE && (text.length > 0 || xhr.responseType === Resource.XHR_RESPONSE_TYPE.BUFFER)) {\n status = STATUS_OK;\n }\n // handle IE9 bug: http://stackoverflow.com/questions/10046972/msie-returns-status-code-of-1223-for-ajax-request\n else if (status === STATUS_IE_BUG_EMPTY) {\n status = STATUS_EMPTY;\n }\n\n const statusType = (status / 100) | 0;\n\n if (statusType === STATUS_TYPE_OK) {\n // if text, just return it\n if (this.xhrType === Resource.XHR_RESPONSE_TYPE.TEXT) {\n this.data = text;\n this.type = Resource.TYPE.TEXT;\n }\n // if json, parse into json object\n else if (this.xhrType === Resource.XHR_RESPONSE_TYPE.JSON) {\n try {\n this.data = JSON.parse(text);\n this.type = Resource.TYPE.JSON;\n }\n catch (e) {\n this.abort(`Error trying to parse loaded json: ${e}`);\n\n return;\n }\n }\n // if xml, parse into an xml document or div element\n else if (this.xhrType === Resource.XHR_RESPONSE_TYPE.DOCUMENT) {\n try {\n if (window.DOMParser) {\n const domparser = new DOMParser();\n\n this.data = domparser.parseFromString(text, 'text/xml');\n }\n else {\n const div = document.createElement('div');\n\n div.innerHTML = text;\n\n this.data = div;\n }\n\n this.type = Resource.TYPE.XML;\n }\n catch (e) {\n this.abort(`Error trying to parse loaded xml: ${e}`);\n\n return;\n }\n }\n // other types just return the response\n else {\n this.data = xhr.response || text;\n }\n }\n else {\n this.abort(`[${xhr.status}] ${xhr.statusText}: ${xhr.responseURL}`);\n\n return;\n }\n\n this.complete();\n }\n\n /**\n * Sets the `crossOrigin` property for this resource based on if the url\n * for this resource is cross-origin. If crossOrigin was manually set, this\n * function does nothing.\n *\n * @private\n * @param {string} url - The url to test.\n * @param {object} [loc=window.location] - The location object to test against.\n * @return {string} The crossOrigin value to use (or empty string for none).\n */\n _determineCrossOrigin(url, loc) {\n // data: and javascript: urls are considered same-origin\n if (url.indexOf('data:') === 0) {\n return '';\n }\n\n // A sandboxed iframe without the 'allow-same-origin' attribute will have a special\n // origin designed not to match window.location.origin, and will always require\n // crossOrigin requests regardless of whether the location matches.\n if (window.origin !== window.location.origin) {\n return 'anonymous';\n }\n\n // default is window.location\n loc = loc || window.location;\n\n if (!tempAnchor) {\n tempAnchor = document.createElement('a');\n }\n\n // let the browser determine the full href for the url of this resource and then\n // parse with the node url lib, we can't use the properties of the anchor element\n // because they don't work in IE9 :(\n tempAnchor.href = url;\n url = parseUri(tempAnchor.href, { strictMode: true });\n\n const samePort = (!url.port && loc.port === '') || (url.port === loc.port);\n const protocol = url.protocol ? `${url.protocol}:` : '';\n\n // if cross origin\n if (url.host !== loc.hostname || !samePort || protocol !== loc.protocol) {\n return 'anonymous';\n }\n\n return '';\n }\n\n /**\n * Determines the responseType of an XHR request based on the extension of the\n * resource being loaded.\n *\n * @private\n * @return {Resource.XHR_RESPONSE_TYPE} The responseType to use.\n */\n _determineXhrType() {\n return Resource._xhrTypeMap[this.extension] || Resource.XHR_RESPONSE_TYPE.TEXT;\n }\n\n /**\n * Determines the loadType of a resource based on the extension of the\n * resource being loaded.\n *\n * @private\n * @return {Resource.LOAD_TYPE} The loadType to use.\n */\n _determineLoadType() {\n return Resource._loadTypeMap[this.extension] || Resource.LOAD_TYPE.XHR;\n }\n\n /**\n * Extracts the extension (sans '.') of the file being loaded by the resource.\n *\n * @private\n * @return {string} The extension.\n */\n _getExtension() {\n let url = this.url;\n let ext = '';\n\n if (this.isDataUrl) {\n const slashIndex = url.indexOf('/');\n\n ext = url.substring(slashIndex + 1, url.indexOf(';', slashIndex));\n }\n else {\n const queryStart = url.indexOf('?');\n const hashStart = url.indexOf('#');\n const index = Math.min(\n queryStart > -1 ? queryStart : url.length,\n hashStart > -1 ? hashStart : url.length\n );\n\n url = url.substring(0, index);\n ext = url.substring(url.lastIndexOf('.') + 1);\n }\n\n return ext.toLowerCase();\n }\n\n /**\n * Determines the mime type of an XHR request based on the responseType of\n * resource being loaded.\n *\n * @private\n * @param {Resource.XHR_RESPONSE_TYPE} type - The type to get a mime type for.\n * @return {string} The mime type to use.\n */\n _getMimeFromXhrType(type) {\n switch (type) {\n case Resource.XHR_RESPONSE_TYPE.BUFFER:\n return 'application/octet-binary';\n\n case Resource.XHR_RESPONSE_TYPE.BLOB:\n return 'application/blob';\n\n case Resource.XHR_RESPONSE_TYPE.DOCUMENT:\n return 'application/xml';\n\n case Resource.XHR_RESPONSE_TYPE.JSON:\n return 'application/json';\n\n case Resource.XHR_RESPONSE_TYPE.DEFAULT:\n case Resource.XHR_RESPONSE_TYPE.TEXT:\n /* falls through */\n default:\n return 'text/plain';\n }\n }\n}\n\n/**\n * The types of resources a resource could represent.\n *\n * @static\n * @readonly\n * @enum {number}\n */\nResource.STATUS_FLAGS = {\n NONE: 0,\n DATA_URL: (1 << 0),\n COMPLETE: (1 << 1),\n LOADING: (1 << 2),\n};\n\n/**\n * The types of resources a resource could represent.\n *\n * @static\n * @readonly\n * @enum {number}\n */\nResource.TYPE = {\n UNKNOWN: 0,\n JSON: 1,\n XML: 2,\n IMAGE: 3,\n AUDIO: 4,\n VIDEO: 5,\n TEXT: 6,\n};\n\n/**\n * The types of loading a resource can use.\n *\n * @static\n * @readonly\n * @enum {number}\n */\nResource.LOAD_TYPE = {\n /** Uses XMLHttpRequest to load the resource. */\n XHR: 1,\n /** Uses an `Image` object to load the resource. */\n IMAGE: 2,\n /** Uses an `Audio` object to load the resource. */\n AUDIO: 3,\n /** Uses a `Video` object to load the resource. */\n VIDEO: 4,\n};\n\n/**\n * The XHR ready states, used internally.\n *\n * @static\n * @readonly\n * @enum {string}\n */\nResource.XHR_RESPONSE_TYPE = {\n /** string */\n DEFAULT: 'text',\n /** ArrayBuffer */\n BUFFER: 'arraybuffer',\n /** Blob */\n BLOB: 'blob',\n /** Document */\n DOCUMENT: 'document',\n /** Object */\n JSON: 'json',\n /** String */\n TEXT: 'text',\n};\n\nResource._loadTypeMap = {\n // images\n gif: Resource.LOAD_TYPE.IMAGE,\n png: Resource.LOAD_TYPE.IMAGE,\n bmp: Resource.LOAD_TYPE.IMAGE,\n jpg: Resource.LOAD_TYPE.IMAGE,\n jpeg: Resource.LOAD_TYPE.IMAGE,\n tif: Resource.LOAD_TYPE.IMAGE,\n tiff: Resource.LOAD_TYPE.IMAGE,\n webp: Resource.LOAD_TYPE.IMAGE,\n tga: Resource.LOAD_TYPE.IMAGE,\n svg: Resource.LOAD_TYPE.IMAGE,\n 'svg+xml': Resource.LOAD_TYPE.IMAGE, // for SVG data urls\n\n // audio\n mp3: Resource.LOAD_TYPE.AUDIO,\n ogg: Resource.LOAD_TYPE.AUDIO,\n wav: Resource.LOAD_TYPE.AUDIO,\n\n // videos\n mp4: Resource.LOAD_TYPE.VIDEO,\n webm: Resource.LOAD_TYPE.VIDEO,\n};\n\nResource._xhrTypeMap = {\n // xml\n xhtml: Resource.XHR_RESPONSE_TYPE.DOCUMENT,\n html: Resource.XHR_RESPONSE_TYPE.DOCUMENT,\n htm: Resource.XHR_RESPONSE_TYPE.DOCUMENT,\n xml: Resource.XHR_RESPONSE_TYPE.DOCUMENT,\n tmx: Resource.XHR_RESPONSE_TYPE.DOCUMENT,\n svg: Resource.XHR_RESPONSE_TYPE.DOCUMENT,\n\n // This was added to handle Tiled Tileset XML, but .tsx is also a TypeScript React Component.\n // Since it is way less likely for people to be loading TypeScript files instead of Tiled files,\n // this should probably be fine.\n tsx: Resource.XHR_RESPONSE_TYPE.DOCUMENT,\n\n // images\n gif: Resource.XHR_RESPONSE_TYPE.BLOB,\n png: Resource.XHR_RESPONSE_TYPE.BLOB,\n bmp: Resource.XHR_RESPONSE_TYPE.BLOB,\n jpg: Resource.XHR_RESPONSE_TYPE.BLOB,\n jpeg: Resource.XHR_RESPONSE_TYPE.BLOB,\n tif: Resource.XHR_RESPONSE_TYPE.BLOB,\n tiff: Resource.XHR_RESPONSE_TYPE.BLOB,\n webp: Resource.XHR_RESPONSE_TYPE.BLOB,\n tga: Resource.XHR_RESPONSE_TYPE.BLOB,\n\n // json\n json: Resource.XHR_RESPONSE_TYPE.JSON,\n\n // text\n text: Resource.XHR_RESPONSE_TYPE.TEXT,\n txt: Resource.XHR_RESPONSE_TYPE.TEXT,\n\n // fonts\n ttf: Resource.XHR_RESPONSE_TYPE.BUFFER,\n otf: Resource.XHR_RESPONSE_TYPE.BUFFER,\n};\n\n// We can't set the `src` attribute to empty string, so on abort we set it to this 1px transparent gif\nResource.EMPTY_GIF = 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==';\n\n/**\n * Quick helper to set a value on one of the extension maps. Ensures there is no\n * dot at the start of the extension.\n *\n * @ignore\n * @param {object} map - The map to set on.\n * @param {string} extname - The extension (or key) to set.\n * @param {number} val - The value to set.\n */\nfunction setExtMap(map, extname, val) {\n if (extname && extname.indexOf('.') === 0) {\n extname = extname.substring(1);\n }\n\n if (!extname) {\n return;\n }\n\n map[extname] = val;\n}\n\n/**\n * Quick helper to get string xhr type.\n *\n * @ignore\n * @param {XMLHttpRequest|XDomainRequest} xhr - The request to check.\n * @return {string} The type.\n */\nfunction reqType(xhr) {\n return xhr.toString().replace('object ', '');\n}\n\nexport { Resource };\n","import { Resource } from '../Resource';\nimport { encodeBinary } from '../encodeBinary';\n\nconst Url = window.URL || window.webkitURL;\n\n/**\n * A middleware for transforming XHR loaded Blobs into more useful objects\n *\n * @memberof middleware\n * @function parsing\n * @example\n * import { Loader, middleware } from 'resource-loader';\n * const loader = new Loader();\n * loader.use(middleware.parsing);\n * @param {Resource} resource - Current Resource\n * @param {function} next - Callback when complete\n */\nexport function parsing(resource, next) {\n if (!resource.data) {\n next();\n\n return;\n }\n\n // if this was an XHR load of a blob\n if (resource.xhr && resource.xhrType === Resource.XHR_RESPONSE_TYPE.BLOB) {\n // if there is no blob support we probably got a binary string back\n if (!window.Blob || typeof resource.data === 'string') {\n const type = resource.xhr.getResponseHeader('content-type');\n\n // this is an image, convert the binary string into a data url\n if (type && type.indexOf('image') === 0) {\n resource.data = new Image();\n resource.data.src = `data:${type};base64,${encodeBinary(resource.xhr.responseText)}`;\n\n resource.type = Resource.TYPE.IMAGE;\n\n // wait until the image loads and then callback\n resource.data.onload = () => {\n resource.data.onload = null;\n\n next();\n };\n\n // next will be called on load\n return;\n }\n }\n // if content type says this is an image, then we should transform the blob into an Image object\n else if (resource.data.type.indexOf('image') === 0) {\n const src = Url.createObjectURL(resource.data);\n\n resource.blob = resource.data;\n resource.data = new Image();\n resource.data.src = src;\n\n resource.type = Resource.TYPE.IMAGE;\n\n // cleanup the no longer used blob after the image loads\n // TODO: Is this correct? Will the image be invalid after revoking?\n resource.data.onload = () => {\n Url.revokeObjectURL(src);\n resource.data.onload = null;\n\n next();\n };\n\n // next will be called on load.\n return;\n }\n }\n\n next();\n}\n","const _keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\n/**\n * Encodes binary into base64.\n *\n * @function encodeBinary\n * @param {string} input The input data to encode.\n * @returns {string} The encoded base64 string\n */\nexport function encodeBinary(input) {\n let output = '';\n let inx = 0;\n\n while (inx < input.length) {\n // Fill byte buffer array\n const bytebuffer = [0, 0, 0];\n const encodedCharIndexes = [0, 0, 0, 0];\n\n for (let jnx = 0; jnx < bytebuffer.length; ++jnx) {\n if (inx < input.length) {\n // throw away high-order byte, as documented at:\n // https://developer.mozilla.org/En/Using_XMLHttpRequest#Handling_binary_data\n bytebuffer[jnx] = input.charCodeAt(inx++) & 0xff;\n }\n else {\n bytebuffer[jnx] = 0;\n }\n }\n\n // Get each encoded character, 6 bits at a time\n // index 1: first 6 bits\n encodedCharIndexes[0] = bytebuffer[0] >> 2;\n\n // index 2: second 6 bits (2 least significant bits from input byte 1 + 4 most significant bits from byte 2)\n encodedCharIndexes[1] = ((bytebuffer[0] & 0x3) << 4) | (bytebuffer[1] >> 4);\n\n // index 3: third 6 bits (4 least significant bits from input byte 2 + 2 most significant bits from byte 3)\n encodedCharIndexes[2] = ((bytebuffer[1] & 0x0f) << 2) | (bytebuffer[2] >> 6);\n\n // index 3: forth 6 bits (6 least significant bits from input byte 3)\n encodedCharIndexes[3] = bytebuffer[2] & 0x3f;\n\n // Determine whether padding happened, and adjust accordingly\n const paddingBytes = inx - (input.length - 1);\n\n switch (paddingBytes) {\n case 2:\n // Set last 2 characters to padding char\n encodedCharIndexes[3] = 64;\n encodedCharIndexes[2] = 64;\n break;\n\n case 1:\n // Set last character to padding char\n encodedCharIndexes[3] = 64;\n break;\n\n default:\n break; // No padding - proceed\n }\n\n // Now we will grab each appropriate character out of our keystring\n // based on our index array and append it to the output string\n for (let jnx = 0; jnx < encodedCharIndexes.length; ++jnx) {\n output += _keyStr.charAt(encodedCharIndexes[jnx]);\n }\n }\n\n return output;\n}\n","import Signal from 'mini-signals';\nimport parseUri from 'parse-uri';\nimport * as async from './async';\nimport { Resource } from './Resource';\n\n// some constants\nconst MAX_PROGRESS = 100;\nconst rgxExtractUrlHash = /(#[\\w-]+)?$/;\n\n/**\n * Manages the state and loading of multiple resources to load.\n *\n * @class\n */\nclass Loader {\n /**\n * @param {string} [baseUrl=''] - The base url for all resources loaded by this loader.\n * @param {number} [concurrency=10] - The number of resources to load concurrently.\n */\n constructor(baseUrl = '', concurrency = 10) {\n /**\n * The base url for all resources loaded by this loader.\n *\n * @member {string}\n */\n this.baseUrl = baseUrl;\n\n /**\n * The progress percent of the loader going through the queue.\n *\n * @member {number}\n * @default 0\n */\n this.progress = 0;\n\n /**\n * Loading state of the loader, true if it is currently loading resources.\n *\n * @member {boolean}\n * @default false\n */\n this.loading = false;\n\n /**\n * A querystring to append to every URL added to the loader.\n *\n * This should be a valid query string *without* the question-mark (`?`). The loader will\n * also *not* escape values for you. Make sure to escape your parameters with\n * [`encodeURIComponent`](https://mdn.io/encodeURIComponent) before assigning this property.\n *\n * @example\n * const loader = new Loader();\n *\n * loader.defaultQueryString = 'user=me&password=secret';\n *\n * // This will request 'image.png?user=me&password=secret'\n * loader.add('image.png').load();\n *\n * loader.reset();\n *\n * // This will request 'image.png?v=1&user=me&password=secret'\n * loader.add('iamge.png?v=1').load();\n *\n * @member {string}\n * @default ''\n */\n this.defaultQueryString = '';\n\n /**\n * The middleware to run before loading each resource.\n *\n * @private\n * @member {function[]}\n */\n this._beforeMiddleware = [];\n\n /**\n * The middleware to run after loading each resource.\n *\n * @private\n * @member {function[]}\n */\n this._afterMiddleware = [];\n\n /**\n * The tracks the resources we are currently completing parsing for.\n *\n * @private\n * @member {Resource[]}\n */\n this._resourcesParsing = [];\n\n /**\n * The `_loadResource` function bound with this object context.\n *\n * @private\n * @member {function}\n * @param {Resource} r - The resource to load\n * @param {Function} d - The dequeue function\n * @return {undefined}\n */\n this._boundLoadResource = (r, d) => this._loadResource(r, d);\n\n /**\n * The resources waiting to be loaded.\n *\n * @private\n * @member {Resource[]}\n */\n this._queue = async.queue(this._boundLoadResource, concurrency);\n\n this._queue.pause();\n\n /**\n * All the resources for this loader keyed by name.\n *\n * @member {object}\n */\n this.resources = {};\n\n /**\n * Dispatched once per loaded or errored resource.\n *\n * The callback looks like {@link Loader.OnProgressSignal}.\n *\n * @member {Signal}\n */\n this.onProgress = new Signal();\n\n /**\n * Dispatched once per errored resource.\n *\n * The callback looks like {@link Loader.OnErrorSignal}.\n *\n * @member {Signal}\n */\n this.onError = new Signal();\n\n /**\n * Dispatched once per loaded resource.\n *\n * The callback looks like {@link Loader.OnLoadSignal}.\n *\n * @member {Signal}\n */\n this.onLoad = new Signal();\n\n /**\n * Dispatched when the loader begins to process the queue.\n *\n * The callback looks like {@link Loader.OnStartSignal}.\n *\n * @member {Signal}\n */\n this.onStart = new Signal();\n\n /**\n * Dispatched when the queued resources all load.\n *\n * The callback looks like {@link Loader.OnCompleteSignal}.\n *\n * @member {Signal}\n */\n this.onComplete = new Signal();\n\n // Add default before middleware\n for (let i = 0; i < Loader._defaultBeforeMiddleware.length; ++i) {\n this.pre(Loader._defaultBeforeMiddleware[i]);\n }\n\n // Add default after middleware\n for (let i = 0; i < Loader._defaultAfterMiddleware.length; ++i) {\n this.use(Loader._defaultAfterMiddleware[i]);\n }\n }\n\n /**\n * When the progress changes the loader and resource are disaptched.\n *\n * @memberof Loader\n * @callback OnProgressSignal\n * @param {Loader} loader - The loader the progress is advancing on.\n * @param {Resource} resource - The resource that has completed or failed to cause the progress to advance.\n */\n\n /**\n * When an error occurrs the loader and resource are disaptched.\n *\n * @memberof Loader\n * @callback OnErrorSignal\n * @param {Loader} loader - The loader the error happened in.\n * @param {Resource} resource - The resource that caused the error.\n */\n\n /**\n * When a load completes the loader and resource are disaptched.\n *\n * @memberof Loader\n * @callback OnLoadSignal\n * @param {Loader} loader - The loader that laoded the resource.\n * @param {Resource} resource - The resource that has completed loading.\n */\n\n /**\n * When the loader starts loading resources it dispatches this callback.\n *\n * @memberof Loader\n * @callback OnStartSignal\n * @param {Loader} loader - The loader that has started loading resources.\n */\n\n /**\n * When the loader completes loading resources it dispatches this callback.\n *\n * @memberof Loader\n * @callback OnCompleteSignal\n * @param {Loader} loader - The loader that has finished loading resources.\n */\n\n /**\n * Options for a call to `.add()`.\n *\n * @see Loader#add\n *\n * @typedef {object} IAddOptions\n * @property {string} [name] - The name of the resource to load, if not passed the url is used.\n * @property {string} [key] - Alias for `name`.\n * @property {string} [url] - The url for this resource, relative to the baseUrl of this loader.\n * @property {string|boolean} [crossOrigin] - Is this request cross-origin? Default is to\n * determine automatically.\n * @property {number} [timeout=0] - A timeout in milliseconds for the load. If the load takes\n * longer than this time it is cancelled and the load is considered a failure. If this value is\n * set to `0` then there is no explicit timeout.\n * @property {Resource.LOAD_TYPE} [loadType=Resource.LOAD_TYPE.XHR] - How should this resource\n * be loaded?\n * @property {Resource.XHR_RESPONSE_TYPE} [xhrType=Resource.XHR_RESPONSE_TYPE.DEFAULT] - How\n * should the data being loaded be interpreted when using XHR?\n * @property {Resource.OnCompleteSignal} [onComplete] - Callback to add an an onComplete signal istener.\n * @property {Resource.OnCompleteSignal} [callback] - Alias for `onComplete`.\n * @property {Resource.IMetadata} [metadata] - Extra configuration for middleware and the Resource object.\n */\n\n /* eslint-disable require-jsdoc,valid-jsdoc */\n /**\n * Adds a resource (or multiple resources) to the loader queue.\n *\n * This function can take a wide variety of different parameters. The only thing that is always\n * required the url to load. All the following will work:\n *\n * ```js\n * loader\n * // normal param syntax\n * .add('key', 'http://...', function () {})\n * .add('http://...', function () {})\n * .add('http://...')\n *\n * // object syntax\n * .add({\n * name: 'key2',\n * url: 'http://...'\n * }, function () {})\n * .add({\n * url: 'http://...'\n * }, function () {})\n * .add({\n * name: 'key3',\n * url: 'http://...'\n * onComplete: function () {}\n * })\n * .add({\n * url: 'https://...',\n * onComplete: function () {},\n * crossOrigin: true\n * })\n *\n * // you can also pass an array of objects or urls or both\n * .add([\n * { name: 'key4', url: 'http://...', onComplete: function () {} },\n * { url: 'http://...', onComplete: function () {} },\n * 'http://...'\n * ])\n *\n * // and you can use both params and options\n * .add('key', 'http://...', { crossOrigin: true }, function () {})\n * .add('http://...', { crossOrigin: true }, function () {});\n * ```\n *\n * @function\n * @variation 1\n * @param {string} name - The name of the resource to load.\n * @param {string} url - The url for this resource, relative to the baseUrl of this loader.\n * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading.\n * @return {this} Returns itself.\n *//**\n * @function\n * @variation 2\n * @param {string} name - The name of the resource to load.\n * @param {string} url - The url for this resource, relative to the baseUrl of this loader.\n * @param {IAddOptions} [options] - The options for the load.\n * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading.\n * @return {this} Returns itself.\n *//**\n * @function\n * @variation 3\n * @param {string} url - The url for this resource, relative to the baseUrl of this loader.\n * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading.\n * @return {this} Returns itself.\n *//**\n * @function\n * @variation 4\n * @param {string} url - The url for this resource, relative to the baseUrl of this loader.\n * @param {IAddOptions} [options] - The options for the load.\n * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading.\n * @return {this} Returns itself.\n *//**\n * @function\n * @variation 5\n * @param {IAddOptions} options - The options for the load. This object must contain a `url` property.\n * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading.\n * @return {this} Returns itself.\n *//**\n * @function\n * @variation 6\n * @param {Array} resources - An array of resources to load, where each is\n * either an object with the options or a string url. If you pass an object, it must contain a `url` property.\n * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading.\n * @return {this} Returns itself.\n */\n add(name, url, options, cb) {\n // special case of an array of objects or urls\n if (Array.isArray(name)) {\n for (let i = 0; i < name.length; ++i) {\n this.add(name[i]);\n }\n\n return this;\n }\n\n // if an object is passed instead of params\n if (typeof name === 'object') {\n cb = url || name.callback || name.onComplete;\n options = name;\n url = name.url;\n name = name.name || name.key || name.url;\n }\n\n // case where no name is passed shift all args over by one.\n if (typeof url !== 'string') {\n cb = options;\n options = url;\n url = name;\n }\n\n // now that we shifted make sure we have a proper url.\n if (typeof url !== 'string') {\n throw new Error('No url passed to add resource to loader.');\n }\n\n // options are optional so people might pass a function and no options\n if (typeof options === 'function') {\n cb = options;\n options = null;\n }\n\n // if loading already you can only add resources that have a parent.\n if (this.loading && (!options || !options.parentResource)) {\n throw new Error('Cannot add resources while the loader is running.');\n }\n\n // check if resource already exists.\n if (this.resources[name]) {\n throw new Error(`Resource named \"${name}\" already exists.`);\n }\n\n // add base url if this isn't an absolute url\n url = this._prepareUrl(url);\n\n // create the store the resource\n this.resources[name] = new Resource(name, url, options);\n\n if (typeof cb === 'function') {\n this.resources[name].onAfterMiddleware.once(cb);\n }\n\n // if actively loading, make sure to adjust progress chunks for that parent and its children\n if (this.loading) {\n const parent = options.parentResource;\n const incompleteChildren = [];\n\n for (let i = 0; i < parent.children.length; ++i) {\n if (!parent.children[i].isComplete) {\n incompleteChildren.push(parent.children[i]);\n }\n }\n\n const fullChunk = parent.progressChunk * (incompleteChildren.length + 1); // +1 for parent\n const eachChunk = fullChunk / (incompleteChildren.length + 2); // +2 for parent & new child\n\n parent.children.push(this.resources[name]);\n parent.progressChunk = eachChunk;\n\n for (let i = 0; i < incompleteChildren.length; ++i) {\n incompleteChildren[i].progressChunk = eachChunk;\n }\n\n this.resources[name].progressChunk = eachChunk;\n }\n\n // add the resource to the queue\n this._queue.push(this.resources[name]);\n\n return this;\n }\n /* eslint-enable require-jsdoc,valid-jsdoc */\n\n /**\n * Sets up a middleware function that will run *before* the\n * resource is loaded.\n *\n * @param {function} fn - The middleware function to register.\n * @return {this} Returns itself.\n */\n pre(fn) {\n this._beforeMiddleware.push(fn);\n\n return this;\n }\n\n /**\n * Sets up a middleware function that will run *after* the\n * resource is loaded.\n *\n * @param {function} fn - The middleware function to register.\n * @return {this} Returns itself.\n */\n use(fn) {\n this._afterMiddleware.push(fn);\n\n return this;\n }\n\n /**\n * Resets the queue of the loader to prepare for a new load.\n *\n * @return {this} Returns itself.\n */\n reset() {\n this.progress = 0;\n this.loading = false;\n\n this._queue.kill();\n this._queue.pause();\n\n // abort all resource loads\n for (const k in this.resources) {\n const res = this.resources[k];\n\n if (res._onLoadBinding) {\n res._onLoadBinding.detach();\n }\n\n if (res.isLoading) {\n res.abort();\n }\n }\n\n this.resources = {};\n\n return this;\n }\n\n /**\n * Starts loading the queued resources.\n *\n * @param {function} [cb] - Optional callback that will be bound to the `complete` event.\n * @return {this} Returns itself.\n */\n load(cb) {\n // register complete callback if they pass one\n if (typeof cb === 'function') {\n this.onComplete.once(cb);\n }\n\n // if the queue has already started we are done here\n if (this.loading) {\n return this;\n }\n\n if (this._queue.idle()) {\n this._onStart();\n this._onComplete();\n }\n else {\n // distribute progress chunks\n const numTasks = this._queue._tasks.length;\n const chunk = MAX_PROGRESS / numTasks;\n\n for (let i = 0; i < this._queue._tasks.length; ++i) {\n this._queue._tasks[i].data.progressChunk = chunk;\n }\n\n // notify we are starting\n this._onStart();\n\n // start loading\n this._queue.resume();\n }\n\n return this;\n }\n\n /**\n * The number of resources to load concurrently.\n *\n * @member {number}\n * @default 10\n */\n get concurrency() {\n return this._queue.concurrency;\n }\n // eslint-disable-next-line require-jsdoc\n set concurrency(concurrency) {\n this._queue.concurrency = concurrency;\n }\n\n /**\n * Prepares a url for usage based on the configuration of this object\n *\n * @private\n * @param {string} url - The url to prepare.\n * @return {string} The prepared url.\n */\n _prepareUrl(url) {\n const parsedUrl = parseUri(url, { strictMode: true });\n let result;\n\n // absolute url, just use it as is.\n if (parsedUrl.protocol || !parsedUrl.path || url.indexOf('//') === 0) {\n result = url;\n }\n // if baseUrl doesn't end in slash and url doesn't start with slash, then add a slash inbetween\n else if (this.baseUrl.length\n && this.baseUrl.lastIndexOf('/') !== this.baseUrl.length - 1\n && url.charAt(0) !== '/'\n ) {\n result = `${this.baseUrl}/${url}`;\n }\n else {\n result = this.baseUrl + url;\n }\n\n // if we need to add a default querystring, there is a bit more work\n if (this.defaultQueryString) {\n const hash = rgxExtractUrlHash.exec(result)[0];\n\n result = result.substr(0, result.length - hash.length);\n\n if (result.indexOf('?') !== -1) {\n result += `&${this.defaultQueryString}`;\n }\n else {\n result += `?${this.defaultQueryString}`;\n }\n\n result += hash;\n }\n\n return result;\n }\n\n /**\n * Loads a single resource.\n *\n * @private\n * @param {Resource} resource - The resource to load.\n * @param {function} dequeue - The function to call when we need to dequeue this item.\n */\n _loadResource(resource, dequeue) {\n resource._dequeue = dequeue;\n\n // run before middleware\n async.eachSeries(\n this._beforeMiddleware,\n (fn, next) => {\n fn.call(this, resource, () => {\n // if the before middleware marks the resource as complete,\n // break and don't process any more before middleware\n next(resource.isComplete ? {} : null);\n });\n },\n () => {\n if (resource.isComplete) {\n this._onLoad(resource);\n }\n else {\n resource._onLoadBinding = resource.onComplete.once(this._onLoad, this);\n resource.load();\n }\n },\n true\n );\n }\n\n /**\n * Called once loading has started.\n *\n * @private\n */\n _onStart() {\n this.progress = 0;\n this.loading = true;\n this.onStart.dispatch(this);\n }\n\n /**\n * Called once each resource has loaded.\n *\n * @private\n */\n _onComplete() {\n this.progress = MAX_PROGRESS;\n this.loading = false;\n this.onComplete.dispatch(this, this.resources);\n }\n\n /**\n * Called each time a resources is loaded.\n *\n * @private\n * @param {Resource} resource - The resource that was loaded\n */\n _onLoad(resource) {\n resource._onLoadBinding = null;\n\n // remove this resource from the async queue, and add it to our list of resources that are being parsed\n this._resourcesParsing.push(resource);\n resource._dequeue();\n\n // run all the after middleware for this resource\n async.eachSeries(\n this._afterMiddleware,\n (fn, next) => {\n fn.call(this, resource, next);\n },\n () => {\n resource.onAfterMiddleware.dispatch(resource);\n\n this.progress = Math.min(MAX_PROGRESS, this.progress + resource.progressChunk);\n this.onProgress.dispatch(this, resource);\n\n if (resource.error) {\n this.onError.dispatch(resource.error, this, resource);\n }\n else {\n this.onLoad.dispatch(this, resource);\n }\n\n this._resourcesParsing.splice(this._resourcesParsing.indexOf(resource), 1);\n\n // do completion check\n if (this._queue.idle() && this._resourcesParsing.length === 0) {\n this._onComplete();\n }\n },\n true\n );\n }\n}\n\n/**\n * A default array of middleware to run before loading each resource.\n * Each of these middlewares are added to any new Loader instances when they are created.\n *\n * @private\n * @member {function[]}\n */\nLoader._defaultBeforeMiddleware = [];\n\n/**\n * A default array of middleware to run after loading each resource.\n * Each of these middlewares are added to any new Loader instances when they are created.\n *\n * @private\n * @member {function[]}\n */\nLoader._defaultAfterMiddleware = [];\n\n/**\n * Sets up a middleware function that will run *before* the\n * resource is loaded.\n *\n * @static\n * @param {function} fn - The middleware function to register.\n * @return {Loader} Returns itself.\n */\nLoader.pre = function LoaderPreStatic(fn) {\n Loader._defaultBeforeMiddleware.push(fn);\n\n return Loader;\n};\n\n/**\n * Sets up a middleware function that will run *after* the\n * resource is loaded.\n *\n * @static\n * @param {function} fn - The middleware function to register.\n * @return {Loader} Returns itself.\n */\nLoader.use = function LoaderUseStatic(fn) {\n Loader._defaultAfterMiddleware.push(fn);\n\n return Loader;\n};\n\nexport { Loader };\n\n","import { Resource } from 'resource-loader';\n\nimport type { Spritesheet } from '@pixi/spritesheet';\nimport type { Texture } from '@pixi/core';\nimport type { Dict } from '@pixi/utils';\n\nexport interface IResourceMetadata extends GlobalMixins.IResourceMetadata, Resource.IMetadata {\n imageMetadata?: any;\n}\nexport interface ILoaderResource extends GlobalMixins.ILoaderResource, Resource\n{\n texture?: Texture;\n spritesheet?: Spritesheet;\n\n // required for Spritesheet\n textures?: Dict;\n\n // required specific type for Spritesheet\n metadata: IResourceMetadata;\n}\n\n// Mix constructor and typeof Resource , otherwise we can't access to statics field\ntype TLoaderResource = { new(...args: any[]): ILoaderResource } & typeof Resource;\n\n/**\n* Reference to **{@link https://github.com/englercj/resource-loader\n* resource-loader}**'s Resource class.\n* @see http://englercj.github.io/resource-loader/Resource.html\n* @class LoaderResource\n* @memberof PIXI\n*/\nexport const LoaderResource: TLoaderResource = Resource;\n","import { Resource } from 'resource-loader';\nimport { Texture } from '@pixi/core';\n\nimport type { ILoaderResource } from './LoaderResource';\n\n/**\n * Loader plugin for handling Texture resources.\n * @class\n * @memberof PIXI\n * @implements PIXI.ILoaderPlugin\n */\nexport class TextureLoader\n{\n /**\n * Called after a resource is loaded.\n * @see PIXI.Loader.loaderMiddleware\n * @param {PIXI.LoaderResource} resource\n * @param {function} next\n */\n public static use(resource: ILoaderResource, next: (...args: any[]) => void): void\n {\n // create a new texture if the data is an Image object\n if (resource.data && resource.type === Resource.TYPE.IMAGE)\n {\n resource.texture = Texture.fromLoader(\n resource.data,\n resource.url,\n resource.name\n );\n }\n next();\n }\n}\n","import { Loader as ResourceLoader, middleware } from 'resource-loader';\nimport { TextureLoader } from './TextureLoader';\n\nimport type { Resource } from 'resource-loader';\n\n/**\n * The new loader, extends Resource Loader by Chad Engler: https://github.com/englercj/resource-loader\n *\n * ```js\n * const loader = PIXI.Loader.shared; // PixiJS exposes a premade instance for you to use.\n * //or\n * const loader = new PIXI.Loader(); // you can also create your own if you want\n *\n * const sprites = {};\n *\n * // Chainable `add` to enqueue a resource\n * loader.add('bunny', 'data/bunny.png')\n * .add('spaceship', 'assets/spritesheet.json');\n * loader.add('scoreFont', 'assets/score.fnt');\n *\n * // Chainable `pre` to add a middleware that runs for each resource, *before* loading that resource.\n * // This is useful to implement custom caching modules (using filesystem, indexeddb, memory, etc).\n * loader.pre(cachingMiddleware);\n *\n * // Chainable `use` to add a middleware that runs for each resource, *after* loading that resource.\n * // This is useful to implement custom parsing modules (like spritesheet parsers, spine parser, etc).\n * loader.use(parsingMiddleware);\n *\n * // The `load` method loads the queue of resources, and calls the passed in callback called once all\n * // resources have loaded.\n * loader.load((loader, resources) => {\n * // resources is an object where the key is the name of the resource loaded and the value is the resource object.\n * // They have a couple default properties:\n * // - `url`: The URL that the resource was loaded from\n * // - `error`: The error that happened when trying to load (if any)\n * // - `data`: The raw data that was loaded\n * // also may contain other properties based on the middleware that runs.\n * sprites.bunny = new PIXI.TilingSprite(resources.bunny.texture);\n * sprites.spaceship = new PIXI.TilingSprite(resources.spaceship.texture);\n * sprites.scoreFont = new PIXI.TilingSprite(resources.scoreFont.texture);\n * });\n *\n * // throughout the process multiple signals can be dispatched.\n * loader.onProgress.add(() => {}); // called once per loaded/errored file\n * loader.onError.add(() => {}); // called once per errored file\n * loader.onLoad.add(() => {}); // called once per loaded file\n * loader.onComplete.add(() => {}); // called once when the queued resources all load.\n * ```\n *\n * @see https://github.com/englercj/resource-loader\n *\n * @class Loader\n * @memberof PIXI\n * @param {string} [baseUrl=''] - The base url for all resources loaded by this loader.\n * @param {number} [concurrency=10] - The number of resources to load concurrently.\n */\nexport class Loader extends ResourceLoader\n{\n /**\n * Collection of all installed `use` middleware for Loader.\n *\n * @static\n * @member {Array} _plugins\n * @memberof PIXI.Loader\n * @private\n */\n private static _plugins: Array = [];\n private static _shared: Loader;\n private _protected: boolean;\n\n constructor(baseUrl?: string, concurrency?: number)\n {\n super(baseUrl, concurrency);\n\n for (let i = 0; i < Loader._plugins.length; ++i)\n {\n const plugin = Loader._plugins[i];\n const { pre, use } = plugin;\n\n if (pre)\n {\n this.pre(pre);\n }\n\n if (use)\n {\n this.use(use);\n }\n }\n\n /**\n * If this loader cannot be destroyed.\n * @member {boolean}\n * @default false\n * @private\n */\n this._protected = false;\n }\n\n /**\n * Destroy the loader, removes references.\n * @memberof PIXI.Loader#\n * @method destroy\n * @public\n */\n public destroy(): void\n {\n if (!this._protected)\n {\n this.reset();\n }\n }\n\n /**\n * A premade instance of the loader that can be used to load resources.\n * @name shared\n * @type {PIXI.Loader}\n * @static\n * @memberof PIXI.Loader\n */\n public static get shared(): Loader\n {\n let shared = Loader._shared;\n\n if (!shared)\n {\n shared = new Loader();\n shared._protected = true;\n Loader._shared = shared;\n }\n\n return shared;\n }\n\n /**\n * Adds a Loader plugin for the global shared loader and all\n * new Loader instances created.\n *\n * @static\n * @method registerPlugin\n * @memberof PIXI.Loader\n * @param {PIXI.ILoaderPlugin} plugin - The plugin to add\n * @return {PIXI.Loader} Reference to PIXI.Loader for chaining\n */\n public static registerPlugin(plugin: ILoaderPlugin): typeof Loader\n {\n Loader._plugins.push(plugin);\n\n if (plugin.add)\n {\n plugin.add();\n }\n\n return Loader;\n }\n}\n\n// parse any blob into more usable objects (e.g. Image)\nLoader.registerPlugin({ use: middleware.parsing });\n\n// parse any Image objects into textures\nLoader.registerPlugin(TextureLoader);\n\nexport interface ILoaderPlugin {\n add?(): void;\n pre?(resource: Resource, next?: (...args: any[]) => void): void;\n use?(resource: Resource, next?: (...args: any[]) => void): void;\n}\n\n/**\n * Plugin to be installed for handling specific Loader resources.\n *\n * @memberof PIXI\n * @typedef {object} ILoaderPlugin\n * @property {function} [add] - Function to call immediate after registering plugin.\n * @property {PIXI.Loader.loaderMiddleware} [pre] - Middleware function to run before load, the\n * arguments for this are `(resource, next)`\n * @property {PIXI.Loader.loaderMiddleware} [use] - Middleware function to run after load, the\n * arguments for this are `(resource, next)`\n */\n\n/**\n * @memberof PIXI.Loader\n * @typedef {object} ICallbackID\n */\n\n/**\n * @memberof PIXI.Loader\n * @typedef {function} ISignalCallback\n * @param {function} callback - Callback function\n * @param {object} [context] - Context\n * @returns {ICallbackID} - CallbackID\n */\n\n/**\n * @memberof PIXI.Loader\n * @typedef {function} ISignalDetach\n * @param {ICallbackID} id - CallbackID returned by `add`/`once` methods\n */\n\n/**\n * @memberof PIXI.Loader\n * @typedef ILoaderSignal\n * @property {ISignalCallback} add - Register callback\n * @property {ISignalCallback} once - Register oneshot callback\n * @property {ISignalDetach} detach - Detach specific callback by ID\n */\n\n/**\n * @memberof PIXI.Loader\n * @callback loaderMiddleware\n * @param {PIXI.LoaderResource} resource\n * @param {function} next\n */\n\n/**\n * @memberof PIXI.Loader#\n * @description Dispatched when the loader begins to loading process.\n * @member {PIXI.Loader.ILoaderSignal} onStart\n */\n\n/**\n * @memberof PIXI.Loader#\n * @description Dispatched once per loaded or errored resource.\n * @member {PIXI.Loader.ILoaderSignal} onProgress\n */\n\n/**\n * @memberof PIXI.Loader#\n * @description Dispatched once per errored resource.\n * @member {PIXI.Loader.ILoaderSignal} onError\n */\n\n/**\n * @memberof PIXI.Loader#\n * @description Dispatched once per loaded resource.\n * @member {PIXI.Loader.ILoaderSignal} onLoad\n */\n\n/**\n * @memberof PIXI.Loader#\n * @description Dispatched when completely loaded all resources.\n * @member {PIXI.Loader.ILoaderSignal} onComplete\n */\n","import { Loader } from './Loader';\n\nimport type { IApplicationOptions } from '@pixi/app';\n/**\n * Application plugin for supporting loader option. Installing the LoaderPlugin\n * is not necessary if using **pixi.js** or **pixi.js-legacy**.\n * @example\n * import {AppLoaderPlugin} from '@pixi/loaders';\n * import {Application} from '@pixi/app';\n * Application.registerPlugin(AppLoaderPlugin);\n * @class\n * @memberof PIXI\n */\nexport class AppLoaderPlugin\n{\n public static loader: Loader;\n /**\n * Called on application constructor\n * @param {object} options\n * @private\n */\n static init(options?: IApplicationOptions): void\n {\n options = Object.assign({\n sharedLoader: false,\n }, options);\n\n /**\n * Loader instance to help with asset loading.\n * @name PIXI.Application#loader\n * @type {PIXI.Loader}\n * @readonly\n */\n this.loader = options.sharedLoader ? Loader.shared : new Loader();\n }\n\n /**\n * Called when application destroyed\n * @private\n */\n static destroy(): void\n {\n if (this.loader)\n {\n this.loader.destroy();\n this.loader = null;\n }\n }\n}\n","import { BLEND_MODES } from '@pixi/constants';\nimport { Container } from '@pixi/display';\nimport { hex2rgb } from '@pixi/utils';\n\nimport type { BaseTexture, Renderer } from '@pixi/core';\nimport type { ParticleBuffer } from './ParticleBuffer';\nimport type { IDestroyOptions } from '@pixi/display';\n\nexport interface IParticleProperties {\n vertices?: boolean;\n position?: boolean;\n rotation?: boolean;\n uvs?: boolean;\n tint?: boolean;\n alpha?: boolean;\n scale?: boolean;\n}\n\n/**\n * The ParticleContainer class is a really fast version of the Container built solely for speed,\n * so use when you need a lot of sprites or particles.\n *\n * The tradeoff of the ParticleContainer is that most advanced functionality will not work.\n * ParticleContainer implements the basic object transform (position, scale, rotation)\n * and some advanced functionality like tint (as of v4.5.6).\n *\n * Other more advanced functionality like masking, children, filters, etc will not work on sprites in this batch.\n *\n * It's extremely easy to use:\n * ```js\n * let container = new ParticleContainer();\n *\n * for (let i = 0; i < 100; ++i)\n * {\n * let sprite = PIXI.Sprite.from(\"myImage.png\");\n * container.addChild(sprite);\n * }\n * ```\n *\n * And here you have a hundred sprites that will be rendered at the speed of light.\n *\n * @class\n * @extends PIXI.Container\n * @memberof PIXI\n */\nexport class ParticleContainer extends Container\n{\n public readonly blendMode: BLEND_MODES;\n public autoResize: boolean;\n public roundPixels: boolean;\n public baseTexture: BaseTexture;\n public tintRgb: Float32Array;\n\n _maxSize: number;\n _buffers: ParticleBuffer[];\n _batchSize: number;\n _properties: boolean[];\n _bufferUpdateIDs: number[];\n _updateID: number;\n private _tint: number;\n\n /**\n * @param {number} [maxSize=1500] - The maximum number of particles that can be rendered by the container.\n * Affects size of allocated buffers.\n * @param {object} [properties] - The properties of children that should be uploaded to the gpu and applied.\n * @param {boolean} [properties.vertices=false] - When true, vertices be uploaded and applied.\n * if sprite's ` scale/anchor/trim/frame/orig` is dynamic, please set `true`.\n * @param {boolean} [properties.position=true] - When true, position be uploaded and applied.\n * @param {boolean} [properties.rotation=false] - When true, rotation be uploaded and applied.\n * @param {boolean} [properties.uvs=false] - When true, uvs be uploaded and applied.\n * @param {boolean} [properties.tint=false] - When true, alpha and tint be uploaded and applied.\n * @param {number} [batchSize=16384] - Number of particles per batch. If less than maxSize, it uses maxSize instead.\n * @param {boolean} [autoResize=false] - If true, container allocates more batches in case\n * there are more than `maxSize` particles.\n */\n constructor(maxSize = 1500, properties: IParticleProperties, batchSize = 16384, autoResize = false)\n {\n super();\n\n // Making sure the batch size is valid\n // 65535 is max vertex index in the index buffer (see ParticleRenderer)\n // so max number of particles is 65536 / 4 = 16384\n const maxBatchSize = 16384;\n\n if (batchSize > maxBatchSize)\n {\n batchSize = maxBatchSize;\n }\n\n /**\n * Set properties to be dynamic (true) / static (false)\n *\n * @member {boolean[]}\n * @private\n */\n this._properties = [false, true, false, false, false];\n\n /**\n * @member {number}\n * @private\n */\n this._maxSize = maxSize;\n\n /**\n * @member {number}\n * @private\n */\n this._batchSize = batchSize;\n\n /**\n * @member {Array}\n * @private\n */\n this._buffers = null;\n\n /**\n * for every batch stores _updateID corresponding to the last change in that batch\n * @member {number[]}\n * @private\n */\n this._bufferUpdateIDs = [];\n\n /**\n * when child inserted, removed or changes position this number goes up\n * @member {number[]}\n * @private\n */\n this._updateID = 0;\n\n /**\n * @member {boolean}\n *\n */\n this.interactiveChildren = false;\n\n /**\n * The blend mode to be applied to the sprite. Apply a value of `PIXI.BLEND_MODES.NORMAL`\n * to reset the blend mode.\n *\n * @member {number}\n * @default PIXI.BLEND_MODES.NORMAL\n * @see PIXI.BLEND_MODES\n */\n this.blendMode = BLEND_MODES.NORMAL;\n\n /**\n * If true, container allocates more batches in case there are more than `maxSize` particles.\n * @member {boolean}\n * @default false\n */\n this.autoResize = autoResize;\n\n /**\n * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation.\n * Advantages can include sharper image quality (like text) and faster rendering on canvas.\n * The main disadvantage is movement of objects may appear less smooth.\n * Default to true here as performance is usually the priority for particles.\n *\n * @member {boolean}\n * @default true\n */\n this.roundPixels = true;\n\n /**\n * The texture used to render the children.\n *\n * @readonly\n * @member {PIXI.BaseTexture}\n */\n this.baseTexture = null;\n\n this.setProperties(properties);\n\n /**\n * The tint applied to the container.\n * This is a hex value. A value of 0xFFFFFF will remove any tint effect.\n *\n * @private\n * @member {number}\n * @default 0xFFFFFF\n */\n this._tint = 0;\n this.tintRgb = new Float32Array(4);\n this.tint = 0xFFFFFF;\n }\n\n /**\n * Sets the private properties array to dynamic / static based on the passed properties object\n *\n * @param {object} properties - The properties to be uploaded\n */\n public setProperties(properties: IParticleProperties): void\n {\n if (properties)\n {\n this._properties[0] = 'vertices' in properties || 'scale' in properties\n ? !!properties.vertices || !!properties.scale : this._properties[0];\n this._properties[1] = 'position' in properties ? !!properties.position : this._properties[1];\n this._properties[2] = 'rotation' in properties ? !!properties.rotation : this._properties[2];\n this._properties[3] = 'uvs' in properties ? !!properties.uvs : this._properties[3];\n this._properties[4] = 'tint' in properties || 'alpha' in properties\n ? !!properties.tint || !!properties.alpha : this._properties[4];\n }\n }\n\n /**\n * Updates the object transform for rendering\n *\n * @private\n */\n updateTransform(): void\n {\n // TODO don't need to!\n this.displayObjectUpdateTransform();\n }\n\n /**\n * The tint applied to the container. This is a hex value.\n * A value of 0xFFFFFF will remove any tint effect.\n ** IMPORTANT: This is a WebGL only feature and will be ignored by the canvas renderer.\n * @member {number}\n * @default 0xFFFFFF\n */\n get tint(): number\n {\n return this._tint;\n }\n\n set tint(value: number)\n {\n this._tint = value;\n hex2rgb(value, this.tintRgb);\n }\n\n /**\n * Renders the container using the WebGL renderer\n *\n * @private\n * @param {PIXI.Renderer} renderer - The webgl renderer\n */\n public render(renderer: Renderer): void\n {\n if (!this.visible || this.worldAlpha <= 0 || !this.children.length || !this.renderable)\n {\n return;\n }\n\n if (!this.baseTexture)\n {\n this.baseTexture = (this.children[0] as any)._texture.baseTexture;\n if (!this.baseTexture.valid)\n {\n this.baseTexture.once('update', () => this.onChildrenChange(0));\n }\n }\n\n renderer.batch.setObjectRenderer(renderer.plugins.particle);\n renderer.plugins.particle.render(this);\n }\n\n /**\n * Set the flag that static data should be updated to true\n *\n * @private\n * @param {number} smallestChildIndex - The smallest child index\n */\n protected onChildrenChange(smallestChildIndex: number): void\n {\n const bufferIndex = Math.floor(smallestChildIndex / this._batchSize);\n\n while (this._bufferUpdateIDs.length < bufferIndex)\n {\n this._bufferUpdateIDs.push(0);\n }\n this._bufferUpdateIDs[bufferIndex] = ++this._updateID;\n }\n\n public dispose(): void\n {\n if (this._buffers)\n {\n for (let i = 0; i < this._buffers.length; ++i)\n {\n this._buffers[i].destroy();\n }\n\n this._buffers = null;\n }\n }\n\n /**\n * Destroys the container\n *\n * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options\n * have been set to that value\n * @param {boolean} [options.children=false] - if set to true, all the children will have their\n * destroy method called as well. 'options' will be passed on to those calls.\n * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true\n * Should it destroy the texture of the child sprite\n * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true\n * Should it destroy the base texture of the child sprite\n */\n public destroy(options: IDestroyOptions|boolean): void\n {\n super.destroy(options);\n\n this.dispose();\n\n this._properties = null;\n this._buffers = null;\n this._bufferUpdateIDs = null;\n }\n}\n","import { createIndicesForQuads } from '@pixi/utils';\nimport { Geometry, Buffer } from '@pixi/core';\nimport { TYPES } from '@pixi/constants';\n\nimport type { DisplayObject } from '@pixi/display';\nimport type { IParticleRendererProperty } from './ParticleRenderer';\n\n/**\n * @author Mat Groves\n *\n * Big thanks to the very clever Matt DesLauriers https://github.com/mattdesl/\n * for creating the original PixiJS version!\n * Also a thanks to https://github.com/bchevalier for tweaking the tint and alpha so that\n * they now share 4 bytes on the vertex buffer\n *\n * Heavily inspired by LibGDX's ParticleBuffer:\n * https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/g2d/ParticleBuffer.java\n */\n\n/**\n * The particle buffer manages the static and dynamic buffers for a particle container.\n *\n * @class\n * @private\n * @memberof PIXI\n */\nexport class ParticleBuffer\n{\n public geometry: Geometry;\n public staticStride: number;\n public staticBuffer: Buffer;\n public staticData: Float32Array;\n public staticDataUint32: Uint32Array;\n public dynamicStride: number;\n public dynamicBuffer: Buffer;\n public dynamicData: Float32Array;\n public dynamicDataUint32: Uint32Array;\n public _updateID: number;\n\n indexBuffer: Buffer;\n private size: number;\n private dynamicProperties: IParticleRendererProperty[];\n private staticProperties: IParticleRendererProperty[];\n\n /**\n * @private\n * @param {object} properties - The properties to upload.\n * @param {boolean[]} dynamicPropertyFlags - Flags for which properties are dynamic.\n * @param {number} size - The size of the batch.\n */\n constructor(properties: IParticleRendererProperty[], dynamicPropertyFlags: boolean[], size: number)\n {\n this.geometry = new Geometry();\n\n this.indexBuffer = null;\n\n /**\n * The number of particles the buffer can hold\n *\n * @private\n * @member {number}\n */\n this.size = size;\n\n /**\n * A list of the properties that are dynamic.\n *\n * @private\n * @member {object[]}\n */\n this.dynamicProperties = [];\n\n /**\n * A list of the properties that are static.\n *\n * @private\n * @member {object[]}\n */\n this.staticProperties = [];\n\n for (let i = 0; i < properties.length; ++i)\n {\n let property = properties[i];\n\n // Make copy of properties object so that when we edit the offset it doesn't\n // change all other instances of the object literal\n property = {\n attributeName: property.attributeName,\n size: property.size,\n uploadFunction: property.uploadFunction,\n type: property.type || TYPES.FLOAT,\n offset: property.offset,\n };\n\n if (dynamicPropertyFlags[i])\n {\n this.dynamicProperties.push(property);\n }\n else\n {\n this.staticProperties.push(property);\n }\n }\n\n this.staticStride = 0;\n this.staticBuffer = null;\n this.staticData = null;\n this.staticDataUint32 = null;\n\n this.dynamicStride = 0;\n this.dynamicBuffer = null;\n this.dynamicData = null;\n this.dynamicDataUint32 = null;\n\n this._updateID = 0;\n\n this.initBuffers();\n }\n\n /**\n * Sets up the renderer context and necessary buffers.\n *\n * @private\n */\n private initBuffers(): void\n {\n const geometry = this.geometry;\n\n let dynamicOffset = 0;\n\n /**\n * Holds the indices of the geometry (quads) to draw\n *\n * @member {Uint16Array}\n * @private\n */\n this.indexBuffer = new Buffer(createIndicesForQuads(this.size), true, true);\n geometry.addIndex(this.indexBuffer);\n\n this.dynamicStride = 0;\n\n for (let i = 0; i < this.dynamicProperties.length; ++i)\n {\n const property = this.dynamicProperties[i];\n\n property.offset = dynamicOffset;\n dynamicOffset += property.size;\n this.dynamicStride += property.size;\n }\n\n const dynBuffer = new ArrayBuffer(this.size * this.dynamicStride * 4 * 4);\n\n this.dynamicData = new Float32Array(dynBuffer);\n this.dynamicDataUint32 = new Uint32Array(dynBuffer);\n this.dynamicBuffer = new Buffer(this.dynamicData, false, false);\n\n // static //\n let staticOffset = 0;\n\n this.staticStride = 0;\n\n for (let i = 0; i < this.staticProperties.length; ++i)\n {\n const property = this.staticProperties[i];\n\n property.offset = staticOffset;\n staticOffset += property.size;\n this.staticStride += property.size;\n }\n\n const statBuffer = new ArrayBuffer(this.size * this.staticStride * 4 * 4);\n\n this.staticData = new Float32Array(statBuffer);\n this.staticDataUint32 = new Uint32Array(statBuffer);\n this.staticBuffer = new Buffer(this.staticData, true, false);\n\n for (let i = 0; i < this.dynamicProperties.length; ++i)\n {\n const property = this.dynamicProperties[i];\n\n geometry.addAttribute(\n property.attributeName,\n this.dynamicBuffer,\n 0,\n property.type === TYPES.UNSIGNED_BYTE,\n property.type,\n this.dynamicStride * 4,\n property.offset * 4\n );\n }\n\n for (let i = 0; i < this.staticProperties.length; ++i)\n {\n const property = this.staticProperties[i];\n\n geometry.addAttribute(\n property.attributeName,\n this.staticBuffer,\n 0,\n property.type === TYPES.UNSIGNED_BYTE,\n property.type,\n this.staticStride * 4,\n property.offset * 4\n );\n }\n }\n\n /**\n * Uploads the dynamic properties.\n *\n * @private\n * @param {PIXI.DisplayObject[]} children - The children to upload.\n * @param {number} startIndex - The index to start at.\n * @param {number} amount - The number to upload.\n */\n uploadDynamic(children: DisplayObject[], startIndex: number, amount: number): void\n {\n for (let i = 0; i < this.dynamicProperties.length; i++)\n {\n const property = this.dynamicProperties[i];\n\n property.uploadFunction(children, startIndex, amount,\n property.type === TYPES.UNSIGNED_BYTE ? this.dynamicDataUint32 : this.dynamicData,\n this.dynamicStride, property.offset);\n }\n\n this.dynamicBuffer._updateID++;\n }\n\n /**\n * Uploads the static properties.\n *\n * @private\n * @param {PIXI.DisplayObject[]} children - The children to upload.\n * @param {number} startIndex - The index to start at.\n * @param {number} amount - The number to upload.\n */\n uploadStatic(children: DisplayObject[], startIndex: number, amount: number): void\n {\n for (let i = 0; i < this.staticProperties.length; i++)\n {\n const property = this.staticProperties[i];\n\n property.uploadFunction(children, startIndex, amount,\n property.type === TYPES.UNSIGNED_BYTE ? this.staticDataUint32 : this.staticData,\n this.staticStride, property.offset);\n }\n\n this.staticBuffer._updateID++;\n }\n\n /**\n * Destroys the ParticleBuffer.\n *\n * @private\n */\n destroy(): void\n {\n this.indexBuffer = null;\n\n this.dynamicProperties = null;\n this.dynamicBuffer = null;\n this.dynamicData = null;\n this.dynamicDataUint32 = null;\n\n this.staticProperties = null;\n this.staticBuffer = null;\n this.staticData = null;\n this.staticDataUint32 = null;\n // all buffers are destroyed inside geometry\n this.geometry.destroy();\n }\n}\n","import { TYPES } from '@pixi/constants';\nimport { ObjectRenderer, Shader, State } from '@pixi/core';\nimport { Matrix } from '@pixi/math';\nimport { correctBlendMode, premultiplyRgba, premultiplyTint } from '@pixi/utils';\nimport { ParticleBuffer } from './ParticleBuffer';\nimport fragment from './particles.frag';\nimport vertex from './particles.vert';\n\nimport type { DisplayObject } from '@pixi/display';\nimport type { ParticleContainer } from './ParticleContainer';\nimport type { Renderer } from '@pixi/core';\n\nexport interface IParticleRendererProperty {\n attributeName: string;\n size: number;\n type?: TYPES;\n uploadFunction: (...params: any[]) => any;\n offset: number;\n}\n\n/**\n * @author Mat Groves\n *\n * Big thanks to the very clever Matt DesLauriers https://github.com/mattdesl/\n * for creating the original PixiJS version!\n * Also a thanks to https://github.com/bchevalier for tweaking the tint and alpha so that they now\n * share 4 bytes on the vertex buffer\n *\n * Heavily inspired by LibGDX's ParticleRenderer:\n * https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/g2d/ParticleRenderer.java\n */\n\n/**\n * Renderer for Particles that is designer for speed over feature set.\n *\n * @class\n * @memberof PIXI\n */\nexport class ParticleRenderer extends ObjectRenderer\n{\n public readonly state: State;\n public shader: Shader;\n public tempMatrix: Matrix;\n public properties: IParticleRendererProperty[];\n\n /**\n * @param {PIXI.Renderer} renderer - The renderer this sprite batch works for.\n */\n constructor(renderer: Renderer)\n {\n super(renderer);\n\n // 65535 is max vertex index in the index buffer (see ParticleRenderer)\n // so max number of particles is 65536 / 4 = 16384\n // and max number of element in the index buffer is 16384 * 6 = 98304\n // Creating a full index buffer, overhead is 98304 * 2 = 196Ko\n // let numIndices = 98304;\n\n /**\n * The default shader that is used if a sprite doesn't have a more specific one.\n *\n * @member {PIXI.Shader}\n */\n this.shader = null;\n\n this.properties = null;\n\n this.tempMatrix = new Matrix();\n\n this.properties = [\n // verticesData\n {\n attributeName: 'aVertexPosition',\n size: 2,\n uploadFunction: this.uploadVertices,\n offset: 0,\n },\n // positionData\n {\n attributeName: 'aPositionCoord',\n size: 2,\n uploadFunction: this.uploadPosition,\n offset: 0,\n },\n // rotationData\n {\n attributeName: 'aRotation',\n size: 1,\n uploadFunction: this.uploadRotation,\n offset: 0,\n },\n // uvsData\n {\n attributeName: 'aTextureCoord',\n size: 2,\n uploadFunction: this.uploadUvs,\n offset: 0,\n },\n // tintData\n {\n attributeName: 'aColor',\n size: 1,\n type: TYPES.UNSIGNED_BYTE,\n uploadFunction: this.uploadTint,\n offset: 0,\n },\n ];\n\n this.shader = Shader.from(vertex, fragment, {});\n\n /**\n * The WebGL state in which this renderer will work.\n *\n * @member {PIXI.State}\n * @readonly\n */\n this.state = State.for2d();\n }\n\n /**\n * Renders the particle container object.\n *\n * @param {PIXI.ParticleContainer} container - The container to render using this ParticleRenderer\n */\n public render(container: ParticleContainer): void\n {\n const children = container.children;\n const maxSize = container._maxSize;\n const batchSize = container._batchSize;\n const renderer = this.renderer;\n let totalChildren = children.length;\n\n if (totalChildren === 0)\n {\n return;\n }\n else if (totalChildren > maxSize && !container.autoResize)\n {\n totalChildren = maxSize;\n }\n\n let buffers = container._buffers;\n\n if (!buffers)\n {\n buffers = container._buffers = this.generateBuffers(container);\n }\n\n const baseTexture = (children[0] as any)._texture.baseTexture;\n\n // if the uvs have not updated then no point rendering just yet!\n this.state.blendMode = correctBlendMode(container.blendMode, baseTexture.alphaMode);\n renderer.state.set(this.state);\n\n const gl = renderer.gl;\n\n const m = container.worldTransform.copyTo(this.tempMatrix);\n\n m.prepend(renderer.globalUniforms.uniforms.projectionMatrix);\n\n this.shader.uniforms.translationMatrix = m.toArray(true);\n\n this.shader.uniforms.uColor = premultiplyRgba(container.tintRgb,\n container.worldAlpha, this.shader.uniforms.uColor, baseTexture.alphaMode);\n\n this.shader.uniforms.uSampler = baseTexture;\n\n this.renderer.shader.bind(this.shader);\n\n let updateStatic = false;\n\n // now lets upload and render the buffers..\n for (let i = 0, j = 0; i < totalChildren; i += batchSize, j += 1)\n {\n let amount = (totalChildren - i);\n\n if (amount > batchSize)\n {\n amount = batchSize;\n }\n\n if (j >= buffers.length)\n {\n buffers.push(this._generateOneMoreBuffer(container));\n }\n\n const buffer = buffers[j];\n\n // we always upload the dynamic\n buffer.uploadDynamic(children, i, amount);\n\n const bid = container._bufferUpdateIDs[j] || 0;\n\n updateStatic = updateStatic || (buffer._updateID < bid);\n // we only upload the static content when we have to!\n if (updateStatic)\n {\n buffer._updateID = container._updateID;\n buffer.uploadStatic(children, i, amount);\n }\n\n // bind the buffer\n renderer.geometry.bind(buffer.geometry);\n gl.drawElements(gl.TRIANGLES, amount * 6, gl.UNSIGNED_SHORT, 0);\n }\n }\n\n /**\n * Creates one particle buffer for each child in the container we want to render and updates internal properties\n *\n * @param {PIXI.ParticleContainer} container - The container to render using this ParticleRenderer\n * @return {PIXI.ParticleBuffer[]} The buffers\n * @private\n */\n private generateBuffers(container: ParticleContainer): ParticleBuffer[]\n {\n const buffers = [];\n const size = container._maxSize;\n const batchSize = container._batchSize;\n const dynamicPropertyFlags = container._properties;\n\n for (let i = 0; i < size; i += batchSize)\n {\n buffers.push(new ParticleBuffer(this.properties, dynamicPropertyFlags, batchSize));\n }\n\n return buffers;\n }\n\n /**\n * Creates one more particle buffer, because container has autoResize feature\n *\n * @param {PIXI.ParticleContainer} container - The container to render using this ParticleRenderer\n * @return {PIXI.ParticleBuffer} generated buffer\n * @private\n */\n private _generateOneMoreBuffer(container: ParticleContainer): ParticleBuffer\n {\n const batchSize = container._batchSize;\n const dynamicPropertyFlags = container._properties;\n\n return new ParticleBuffer(this.properties, dynamicPropertyFlags, batchSize);\n }\n\n /**\n * Uploads the vertices.\n *\n * @param {PIXI.DisplayObject[]} children - the array of display objects to render\n * @param {number} startIndex - the index to start from in the children array\n * @param {number} amount - the amount of children that will have their vertices uploaded\n * @param {number[]} array - The vertices to upload.\n * @param {number} stride - Stride to use for iteration.\n * @param {number} offset - Offset to start at.\n */\n public uploadVertices(\n children: DisplayObject[], startIndex: number, amount: number,\n array: number[], stride: number, offset: number\n ): void\n {\n let w0 = 0;\n let w1 = 0;\n let h0 = 0;\n let h1 = 0;\n\n for (let i = 0; i < amount; ++i)\n {\n const sprite: any = children[startIndex + i];\n const texture = sprite._texture;\n const sx = sprite.scale.x;\n const sy = sprite.scale.y;\n const trim = texture.trim;\n const orig = texture.orig;\n\n if (trim)\n {\n // if the sprite is trimmed and is not a tilingsprite then we need to add the\n // extra space before transforming the sprite coords..\n w1 = trim.x - (sprite.anchor.x * orig.width);\n w0 = w1 + trim.width;\n\n h1 = trim.y - (sprite.anchor.y * orig.height);\n h0 = h1 + trim.height;\n }\n else\n {\n w0 = (orig.width) * (1 - sprite.anchor.x);\n w1 = (orig.width) * -sprite.anchor.x;\n\n h0 = orig.height * (1 - sprite.anchor.y);\n h1 = orig.height * -sprite.anchor.y;\n }\n\n array[offset] = w1 * sx;\n array[offset + 1] = h1 * sy;\n\n array[offset + stride] = w0 * sx;\n array[offset + stride + 1] = h1 * sy;\n\n array[offset + (stride * 2)] = w0 * sx;\n array[offset + (stride * 2) + 1] = h0 * sy;\n\n array[offset + (stride * 3)] = w1 * sx;\n array[offset + (stride * 3) + 1] = h0 * sy;\n\n offset += stride * 4;\n }\n }\n\n /**\n * Uploads the position.\n *\n * @param {PIXI.DisplayObject[]} children - the array of display objects to render\n * @param {number} startIndex - the index to start from in the children array\n * @param {number} amount - the amount of children that will have their positions uploaded\n * @param {number[]} array - The vertices to upload.\n * @param {number} stride - Stride to use for iteration.\n * @param {number} offset - Offset to start at.\n */\n public uploadPosition(\n children: DisplayObject[], startIndex: number, amount: number,\n array: number[], stride: number, offset: number\n ): void\n {\n for (let i = 0; i < amount; i++)\n {\n const spritePosition = children[startIndex + i].position;\n\n array[offset] = spritePosition.x;\n array[offset + 1] = spritePosition.y;\n\n array[offset + stride] = spritePosition.x;\n array[offset + stride + 1] = spritePosition.y;\n\n array[offset + (stride * 2)] = spritePosition.x;\n array[offset + (stride * 2) + 1] = spritePosition.y;\n\n array[offset + (stride * 3)] = spritePosition.x;\n array[offset + (stride * 3) + 1] = spritePosition.y;\n\n offset += stride * 4;\n }\n }\n\n /**\n * Uploads the rotation.\n *\n * @param {PIXI.DisplayObject[]} children - the array of display objects to render\n * @param {number} startIndex - the index to start from in the children array\n * @param {number} amount - the amount of children that will have their rotation uploaded\n * @param {number[]} array - The vertices to upload.\n * @param {number} stride - Stride to use for iteration.\n * @param {number} offset - Offset to start at.\n */\n public uploadRotation(\n children: DisplayObject[], startIndex: number, amount: number,\n array: number[], stride: number, offset: number\n ): void\n {\n for (let i = 0; i < amount; i++)\n {\n const spriteRotation = children[startIndex + i].rotation;\n\n array[offset] = spriteRotation;\n array[offset + stride] = spriteRotation;\n array[offset + (stride * 2)] = spriteRotation;\n array[offset + (stride * 3)] = spriteRotation;\n\n offset += stride * 4;\n }\n }\n\n /**\n * Uploads the Uvs\n *\n * @param {PIXI.DisplayObject[]} children - the array of display objects to render\n * @param {number} startIndex - the index to start from in the children array\n * @param {number} amount - the amount of children that will have their rotation uploaded\n * @param {number[]} array - The vertices to upload.\n * @param {number} stride - Stride to use for iteration.\n * @param {number} offset - Offset to start at.\n */\n public uploadUvs(\n children: DisplayObject[], startIndex: number, amount: number,\n array: number[], stride: number, offset: number\n ): void\n {\n for (let i = 0; i < amount; ++i)\n {\n const textureUvs = (children[startIndex + i] as any)._texture._uvs;\n\n if (textureUvs)\n {\n array[offset] = textureUvs.x0;\n array[offset + 1] = textureUvs.y0;\n\n array[offset + stride] = textureUvs.x1;\n array[offset + stride + 1] = textureUvs.y1;\n\n array[offset + (stride * 2)] = textureUvs.x2;\n array[offset + (stride * 2) + 1] = textureUvs.y2;\n\n array[offset + (stride * 3)] = textureUvs.x3;\n array[offset + (stride * 3) + 1] = textureUvs.y3;\n\n offset += stride * 4;\n }\n else\n {\n // TODO you know this can be easier!\n array[offset] = 0;\n array[offset + 1] = 0;\n\n array[offset + stride] = 0;\n array[offset + stride + 1] = 0;\n\n array[offset + (stride * 2)] = 0;\n array[offset + (stride * 2) + 1] = 0;\n\n array[offset + (stride * 3)] = 0;\n array[offset + (stride * 3) + 1] = 0;\n\n offset += stride * 4;\n }\n }\n }\n\n /**\n * Uploads the tint.\n *\n * @param {PIXI.DisplayObject[]} children - the array of display objects to render\n * @param {number} startIndex - the index to start from in the children array\n * @param {number} amount - the amount of children that will have their rotation uploaded\n * @param {number[]} array - The vertices to upload.\n * @param {number} stride - Stride to use for iteration.\n * @param {number} offset - Offset to start at.\n */\n public uploadTint(\n children: DisplayObject[], startIndex: number, amount: number,\n array: number[], stride: number, offset: number\n ): void\n {\n for (let i = 0; i < amount; ++i)\n {\n const sprite: any = children[startIndex + i];\n const premultiplied = sprite._texture.baseTexture.alphaMode > 0;\n const alpha = sprite.alpha;\n\n // we dont call extra function if alpha is 1.0, that's faster\n const argb = alpha < 1.0 && premultiplied\n ? premultiplyTint(sprite._tintRGB, alpha) : sprite._tintRGB + (alpha * 255 << 24);\n\n array[offset] = argb;\n array[offset + stride] = argb;\n array[offset + (stride * 2)] = argb;\n array[offset + (stride * 3)] = argb;\n\n offset += stride * 4;\n }\n }\n\n /**\n * Destroys the ParticleRenderer.\n */\n public destroy(): void\n {\n super.destroy();\n\n if (this.shader)\n {\n this.shader.destroy();\n this.shader = null;\n }\n\n this.tempMatrix = null;\n }\n}\n","import { Texture } from '@pixi/core';\nimport type { Matrix } from '@pixi/math';\n\n/**\n * Fill style object for Graphics.\n *\n * @class\n * @memberof PIXI\n */\nexport class FillStyle\n{\n /**\n * The hex color value used when coloring the Graphics object.\n *\n * @member {number}\n * @default 0xFFFFFF\n */\n public color = 0xFFFFFF;\n\n /**\n * The alpha value used when filling the Graphics object.\n *\n * @member {number}\n * @default 1\n */\n public alpha = 1.0;\n\n /**\n * The texture to be used for the fill.\n *\n * @member {PIXI.Texture}\n * @default 0\n */\n public texture: Texture = Texture.WHITE;\n\n /**\n * The transform aplpied to the texture.\n *\n * @member {PIXI.Matrix}\n * @default null\n */\n public matrix: Matrix = null;\n\n /**\n * If the current fill is visible.\n *\n * @member {boolean}\n * @default false\n */\n public visible = false;\n\n constructor()\n {\n this.reset();\n }\n\n /**\n * Clones the object\n *\n * @return {PIXI.FillStyle}\n */\n public clone(): FillStyle\n {\n const obj = new FillStyle();\n\n obj.color = this.color;\n obj.alpha = this.alpha;\n obj.texture = this.texture;\n obj.matrix = this.matrix;\n obj.visible = this.visible;\n\n return obj;\n }\n\n /**\n * Reset\n */\n public reset(): void\n {\n this.color = 0xFFFFFF;\n this.alpha = 1;\n this.texture = Texture.WHITE;\n this.matrix = null;\n this.visible = false;\n }\n\n /**\n * Destroy and don't use after this\n */\n public destroy(): void\n {\n this.texture = null;\n this.matrix = null;\n }\n}\n","import { earcut } from '@pixi/utils';\n\nimport type { IShapeBuildCommand } from './IShapeBuildCommand';\nimport type { Polygon } from '@pixi/math';\n\n/**\n * Builds a polygon to draw\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties\n * @param {object} webGLData - an object containing all the WebGL-specific information to create this shape\n * @param {object} webGLDataNativeLines - an object containing all the WebGL-specific information to create nativeLines\n */\nexport const buildPoly: IShapeBuildCommand = {\n\n build(graphicsData)\n {\n graphicsData.points = (graphicsData.shape as Polygon).points.slice();\n },\n\n triangulate(graphicsData, graphicsGeometry)\n {\n let points = graphicsData.points;\n const holes = graphicsData.holes;\n const verts = graphicsGeometry.points;\n const indices = graphicsGeometry.indices;\n\n if (points.length >= 6)\n {\n const holeArray = [];\n // Process holes..\n\n for (let i = 0; i < holes.length; i++)\n {\n const hole = holes[i];\n\n holeArray.push(points.length / 2);\n points = points.concat(hole.points);\n }\n\n // sort color\n const triangles = earcut(points, holeArray, 2);\n\n if (!triangles)\n {\n return;\n }\n\n const vertPos = verts.length / 2;\n\n for (let i = 0; i < triangles.length; i += 3)\n {\n indices.push(triangles[i] + vertPos);\n indices.push(triangles[i + 1] + vertPos);\n indices.push(triangles[i + 2] + vertPos);\n }\n\n for (let i = 0; i < points.length; i++)\n {\n verts.push(points[i]);\n }\n }\n },\n};\n","// for type only\nimport { SHAPES } from '@pixi/math';\n\nimport type { Circle, Ellipse } from '@pixi/math';\nimport type { IShapeBuildCommand } from './IShapeBuildCommand';\n\n/**\n * Builds a circle to draw\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object to draw\n * @param {object} webGLData - an object containing all the WebGL-specific information to create this shape\n * @param {object} webGLDataNativeLines - an object containing all the WebGL-specific information to create nativeLines\n */\nexport const buildCircle: IShapeBuildCommand = {\n\n build(graphicsData)\n {\n // need to convert points to a nice regular data\n const circleData = graphicsData.shape as Circle;\n const points = graphicsData.points;\n const x = circleData.x;\n const y = circleData.y;\n let width;\n let height;\n\n points.length = 0;\n\n // TODO - bit hacky??\n if (graphicsData.type === SHAPES.CIRC)\n {\n width = circleData.radius;\n height = circleData.radius;\n }\n else\n {\n const ellipseData = graphicsData.shape as Ellipse;\n\n width = ellipseData.width;\n height = ellipseData.height;\n }\n\n if (width === 0 || height === 0)\n {\n return;\n }\n\n let totalSegs = Math.floor(30 * Math.sqrt(circleData.radius))\n || Math.floor(15 * Math.sqrt(width + height));\n\n totalSegs /= 2.3;\n\n const seg = (Math.PI * 2) / totalSegs;\n\n for (let i = 0; i < totalSegs - 0.5; i++)\n {\n points.push(\n x + (Math.sin(-seg * i) * width),\n y + (Math.cos(-seg * i) * height)\n );\n }\n\n points.push(points[0], points[1]);\n },\n\n triangulate(graphicsData, graphicsGeometry)\n {\n const points = graphicsData.points;\n const verts = graphicsGeometry.points;\n const indices = graphicsGeometry.indices;\n\n let vertPos = verts.length / 2;\n const center = vertPos;\n\n const circle = (graphicsData.shape) as Circle;\n const matrix = graphicsData.matrix;\n const x = circle.x;\n const y = circle.y;\n\n // Push center (special point)\n verts.push(\n graphicsData.matrix ? (matrix.a * x) + (matrix.c * y) + matrix.tx : x,\n graphicsData.matrix ? (matrix.b * x) + (matrix.d * y) + matrix.ty : y);\n\n for (let i = 0; i < points.length; i += 2)\n {\n verts.push(points[i], points[i + 1]);\n\n // add some uvs\n indices.push(vertPos++, center, vertPos);\n }\n },\n};\n","import type { IShapeBuildCommand } from './IShapeBuildCommand';\nimport type { Rectangle } from '@pixi/math';\n\n/**\n * Builds a rectangle to draw\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties\n * @param {object} webGLData - an object containing all the WebGL-specific information to create this shape\n * @param {object} webGLDataNativeLines - an object containing all the WebGL-specific information to create nativeLines\n */\nexport const buildRectangle: IShapeBuildCommand = {\n\n build(graphicsData)\n {\n // --- //\n // need to convert points to a nice regular data\n //\n const rectData = graphicsData.shape as Rectangle;\n const x = rectData.x;\n const y = rectData.y;\n const width = rectData.width;\n const height = rectData.height;\n\n const points = graphicsData.points;\n\n points.length = 0;\n\n points.push(x, y,\n x + width, y,\n x + width, y + height,\n x, y + height);\n },\n\n triangulate(graphicsData, graphicsGeometry)\n {\n const points = graphicsData.points;\n const verts = graphicsGeometry.points;\n\n const vertPos = verts.length / 2;\n\n verts.push(points[0], points[1],\n points[2], points[3],\n points[6], points[7],\n points[4], points[5]);\n\n graphicsGeometry.indices.push(vertPos, vertPos + 1, vertPos + 2,\n vertPos + 1, vertPos + 2, vertPos + 3);\n },\n};\n","import { earcut } from '@pixi/utils';\n\n// for type only\nimport type { IShapeBuildCommand } from './IShapeBuildCommand';\nimport type { RoundedRectangle } from '@pixi/math';\n\n/**\n * Calculate a single point for a quadratic bezier curve.\n * Utility function used by quadraticBezierCurve.\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {number} n1 - first number\n * @param {number} n2 - second number\n * @param {number} perc - percentage\n * @return {number} the result\n *\n */\nfunction getPt(n1: number, n2: number, perc: number): number\n{\n const diff = n2 - n1;\n\n return n1 + (diff * perc);\n}\n\n/**\n * Calculate the points for a quadratic bezier curve. (helper function..)\n * Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {number} fromX - Origin point x\n * @param {number} fromY - Origin point x\n * @param {number} cpX - Control point x\n * @param {number} cpY - Control point y\n * @param {number} toX - Destination point x\n * @param {number} toY - Destination point y\n * @param {number[]} [out=[]] - The output array to add points into. If not passed, a new array is created.\n * @return {number[]} an array of points\n */\nfunction quadraticBezierCurve(\n fromX: number, fromY: number,\n cpX: number, cpY: number,\n toX: number, toY: number,\n out: Array = []): Array\n{\n const n = 20;\n const points = out;\n\n let xa = 0;\n let ya = 0;\n let xb = 0;\n let yb = 0;\n let x = 0;\n let y = 0;\n\n for (let i = 0, j = 0; i <= n; ++i)\n {\n j = i / n;\n\n // The Green Line\n xa = getPt(fromX, cpX, j);\n ya = getPt(fromY, cpY, j);\n xb = getPt(cpX, toX, j);\n yb = getPt(cpY, toY, j);\n\n // The Black Dot\n x = getPt(xa, xb, j);\n y = getPt(ya, yb, j);\n\n points.push(x, y);\n }\n\n return points;\n}\n\n/**\n * Builds a rounded rectangle to draw\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties\n * @param {object} webGLData - an object containing all the WebGL-specific information to create this shape\n * @param {object} webGLDataNativeLines - an object containing all the WebGL-specific information to create nativeLines\n */\nexport const buildRoundedRectangle: IShapeBuildCommand = {\n\n build(graphicsData)\n {\n const rrectData = graphicsData.shape as RoundedRectangle;\n const points = graphicsData.points;\n const x = rrectData.x;\n const y = rrectData.y;\n const width = rrectData.width;\n const height = rrectData.height;\n\n // Don't allow negative radius or greater than half the smallest width\n const radius = Math.max(0, Math.min(rrectData.radius, Math.min(width, height) / 2));\n\n points.length = 0;\n\n // No radius, do a simple rectangle\n if (!radius)\n {\n points.push(x, y,\n x + width, y,\n x + width, y + height,\n x, y + height);\n }\n else\n {\n quadraticBezierCurve(x, y + radius,\n x, y,\n x + radius, y,\n points);\n quadraticBezierCurve(x + width - radius,\n y, x + width, y,\n x + width, y + radius,\n points);\n quadraticBezierCurve(x + width, y + height - radius,\n x + width, y + height,\n x + width - radius, y + height,\n points);\n quadraticBezierCurve(x + radius, y + height,\n x, y + height,\n x, y + height - radius,\n points);\n }\n\n // this tiny number deals with the issue that occurs when points overlap and earcut fails to triangulate the item.\n // TODO - fix this properly, this is not very elegant.. but it works for now.\n },\n\n triangulate(graphicsData, graphicsGeometry)\n {\n const points = graphicsData.points;\n\n const verts = graphicsGeometry.points;\n const indices = graphicsGeometry.indices;\n\n const vecPos = verts.length / 2;\n\n const triangles = earcut(points, null, 2);\n\n for (let i = 0, j = triangles.length; i < j; i += 3)\n {\n indices.push(triangles[i] + vecPos);\n // indices.push(triangles[i] + vecPos);\n indices.push(triangles[i + 1] + vecPos);\n // indices.push(triangles[i + 2] + vecPos);\n indices.push(triangles[i + 2] + vecPos);\n }\n\n for (let i = 0, j = points.length; i < j; i++)\n {\n verts.push(points[i], points[++i]);\n }\n },\n};\n","import { Point, SHAPES } from '@pixi/math';\n\nimport type { Polygon } from '@pixi/math';\nimport type { GraphicsData } from '../GraphicsData';\nimport type { GraphicsGeometry } from '../GraphicsGeometry';\nimport { LINE_JOIN, LINE_CAP } from '../const';\nimport { GRAPHICS_CURVES } from '../const';\n\n/**\n * Buffers vertices to draw a square cap.\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {number} x - X-coord of end point\n * @param {number} y - Y-coord of end point\n * @param {number} nx - X-coord of line normal pointing inside\n * @param {number} ny - Y-coord of line normal pointing inside\n * @param {Array} verts - vertex buffer\n * @returns {}\n */\nfunction square(\n x: number,\n y: number,\n nx: number,\n ny: number,\n innerWeight: number,\n outerWeight: number,\n clockwise: boolean, /* rotation for square (true at left end, false at right end) */\n verts: Array\n): number\n{\n const ix = x - (nx * innerWeight);\n const iy = y - (ny * innerWeight);\n const ox = x + (nx * outerWeight);\n const oy = y + (ny * outerWeight);\n\n /* Rotate nx,ny for extension vector */\n let exx; let\n eyy;\n\n if (clockwise)\n {\n exx = ny;\n eyy = -nx;\n }\n else\n {\n exx = -ny;\n eyy = nx;\n }\n\n /* [i|0]x,y extended at cap */\n const eix = ix + exx;\n const eiy = iy + eyy;\n const eox = ox + exx;\n const eoy = oy + eyy;\n\n /* Square itself must be inserted clockwise*/\n verts.push(eix, eiy);\n verts.push(eox, eoy);\n\n return 2;\n}\n\n/**\n * Buffers vertices to draw an arc at the line joint or cap.\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {number} cx - X-coord of center\n * @param {number} cy - Y-coord of center\n * @param {number} sx - X-coord of arc start\n * @param {number} sy - Y-coord of arc start\n * @param {number} ex - X-coord of arc end\n * @param {number} ey - Y-coord of arc end\n * @param {Array} verts - buffer of vertices\n * @param {boolean} clockwise - orientation of vertices\n * @returns {number} - no. of vertices pushed\n */\nfunction round(\n cx: number,\n cy: number,\n sx: number,\n sy: number,\n ex: number,\n ey: number,\n verts: Array,\n clockwise: boolean, /* if not cap, then clockwise is turn of joint, otherwise rotation from angle0 to angle1 */\n): number\n{\n const cx2p0x = sx - cx;\n const cy2p0y = sy - cy;\n\n let angle0 = Math.atan2(cx2p0x, cy2p0y);\n let angle1 = Math.atan2(ex - cx, ey - cy);\n\n if (clockwise && angle0 < angle1)\n {\n angle0 += Math.PI * 2;\n }\n else if (!clockwise && angle0 > angle1)\n {\n angle1 += Math.PI * 2;\n }\n\n let startAngle = angle0;\n const angleDiff = angle1 - angle0;\n const absAngleDiff = Math.abs(angleDiff);\n\n /* if (absAngleDiff >= PI_LBOUND && absAngleDiff <= PI_UBOUND)\n {\n const r1x = cx - nxtPx;\n const r1y = cy - nxtPy;\n\n if (r1x === 0)\n {\n if (r1y > 0)\n {\n angleDiff = -angleDiff;\n }\n }\n else if (r1x >= -GRAPHICS_CURVES.epsilon)\n {\n angleDiff = -angleDiff;\n }\n }*/\n\n const radius = Math.sqrt((cx2p0x * cx2p0x) + (cy2p0y * cy2p0y));\n const segCount = ((15 * absAngleDiff * Math.sqrt(radius) / Math.PI) >> 0) + 1;\n const angleInc = angleDiff / segCount;\n\n startAngle += angleInc;\n\n if (clockwise)\n {\n verts.push(cx, cy);\n verts.push(sx, sy);\n\n for (let i = 1, angle = startAngle; i < segCount; i++, angle += angleInc)\n {\n verts.push(cx, cy);\n verts.push(cx + ((Math.sin(angle) * radius)),\n cy + ((Math.cos(angle) * radius)));\n }\n\n verts.push(cx, cy);\n verts.push(ex, ey);\n }\n else\n {\n verts.push(sx, sy);\n verts.push(cx, cy);\n\n for (let i = 1, angle = startAngle; i < segCount; i++, angle += angleInc)\n {\n verts.push(cx + ((Math.sin(angle) * radius)),\n cy + ((Math.cos(angle) * radius)));\n verts.push(cx, cy);\n }\n\n verts.push(ex, ey);\n verts.push(cx, cy);\n }\n\n return segCount * 2;\n}\n\n/**\n * Builds a line to draw using the polygon method.\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {PIXI.GraphicsData} graphicsData - The graphics object containing all the necessary properties\n * @param {PIXI.GraphicsGeometry} graphicsGeometry - Geometry where to append output\n */\nfunction buildNonNativeLine(graphicsData: GraphicsData, graphicsGeometry: GraphicsGeometry): void\n{\n const shape = graphicsData.shape as Polygon;\n let points = graphicsData.points || shape.points.slice();\n const eps = graphicsGeometry.closePointEps;\n\n if (points.length === 0)\n {\n return;\n }\n // if the line width is an odd number add 0.5 to align to a whole pixel\n // commenting this out fixes #711 and #1620\n // if (graphicsData.lineWidth%2)\n // {\n // for (i = 0; i < points.length; i++)\n // {\n // points[i] += 0.5;\n // }\n // }\n\n const style = graphicsData.lineStyle;\n\n // get first and last point.. figure out the middle!\n const firstPoint = new Point(points[0], points[1]);\n const lastPoint = new Point(points[points.length - 2], points[points.length - 1]);\n const closedShape = shape.type !== SHAPES.POLY || shape.closeStroke;\n const closedPath = Math.abs(firstPoint.x - lastPoint.x) < eps\n && Math.abs(firstPoint.y - lastPoint.y) < eps;\n\n // if the first point is the last point - gonna have issues :)\n if (closedShape)\n {\n // need to clone as we are going to slightly modify the shape..\n points = points.slice();\n\n if (closedPath)\n {\n points.pop();\n points.pop();\n lastPoint.set(points[points.length - 2], points[points.length - 1]);\n }\n\n const midPointX = (firstPoint.x + lastPoint.x) * 0.5;\n const midPointY = (lastPoint.y + firstPoint.y) * 0.5;\n\n points.unshift(midPointX, midPointY);\n points.push(midPointX, midPointY);\n }\n\n const verts = graphicsGeometry.points;\n const length = points.length / 2;\n let indexCount = points.length;\n const indexStart = verts.length / 2;\n\n // Max. inner and outer width\n const width = style.width / 2;\n const widthSquared = width * width;\n const miterLimitSquared = style.miterLimit * style.miterLimit;\n\n /* Line segments of interest where (x1,y1) forms the corner. */\n let x0 = points[0];\n let y0 = points[1];\n let x1 = points[2];\n let y1 = points[3];\n let x2 = 0;\n let y2 = 0;\n\n /* perp[?](x|y) = the line normal with magnitude lineWidth. */\n let perpx = -(y0 - y1);\n let perpy = x0 - x1;\n let perp1x = 0;\n let perp1y = 0;\n\n let dist = Math.sqrt((perpx * perpx) + (perpy * perpy));\n\n perpx /= dist;\n perpy /= dist;\n perpx *= width;\n perpy *= width;\n\n const ratio = style.alignment;// 0.5;\n const innerWeight = (1 - ratio) * 2;\n const outerWeight = ratio * 2;\n\n if (!closedShape)\n {\n if (style.cap === LINE_CAP.ROUND)\n {\n indexCount += round(\n x0 - (perpx * (innerWeight - outerWeight) * 0.5),\n y0 - (perpy * (innerWeight - outerWeight) * 0.5),\n x0 - (perpx * innerWeight),\n y0 - (perpy * innerWeight),\n x0 + (perpx * outerWeight),\n y0 + (perpy * outerWeight),\n verts,\n true,\n ) + 2;\n }\n else if (style.cap === LINE_CAP.SQUARE)\n {\n indexCount += square(x0, y0, perpx, perpy, innerWeight, outerWeight, true, verts);\n }\n }\n\n // Push first point (below & above vertices)\n verts.push(\n x0 - (perpx * innerWeight),\n y0 - (perpy * innerWeight));\n verts.push(\n x0 + (perpx * outerWeight),\n y0 + (perpy * outerWeight));\n\n for (let i = 1; i < length - 1; ++i)\n {\n x0 = points[(i - 1) * 2];\n y0 = points[((i - 1) * 2) + 1];\n\n x1 = points[i * 2];\n y1 = points[(i * 2) + 1];\n\n x2 = points[(i + 1) * 2];\n y2 = points[((i + 1) * 2) + 1];\n\n perpx = -(y0 - y1);\n perpy = x0 - x1;\n\n dist = Math.sqrt((perpx * perpx) + (perpy * perpy));\n perpx /= dist;\n perpy /= dist;\n perpx *= width;\n perpy *= width;\n\n perp1x = -(y1 - y2);\n perp1y = x1 - x2;\n\n dist = Math.sqrt((perp1x * perp1x) + (perp1y * perp1y));\n perp1x /= dist;\n perp1y /= dist;\n perp1x *= width;\n perp1y *= width;\n\n /* d[x|y](0|1) = the component displacment between points p(0,1|1,2) */\n const dx0 = x1 - x0;\n const dy0 = y0 - y1;\n const dx1 = x1 - x2;\n const dy1 = y2 - y1;\n\n /* +ve if internal angle counterclockwise, -ve if internal angle clockwise. */\n const cross = (dy0 * dx1) - (dy1 * dx0);\n const clockwise = (cross < 0);\n\n /* Going nearly straight? */\n if (Math.abs(cross) < 0.1)\n {\n verts.push(\n x1 - (perpx * innerWeight),\n y1 - (perpy * innerWeight));\n verts.push(\n x1 + (perpx * outerWeight),\n y1 + (perpy * outerWeight));\n\n continue;\n }\n\n /* p[x|y] is the miter point. pdist is the distance between miter point and p1. */\n const c1 = ((-perpx + x0) * (-perpy + y1)) - ((-perpx + x1) * (-perpy + y0));\n const c2 = ((-perp1x + x2) * (-perp1y + y1)) - ((-perp1x + x1) * (-perp1y + y2));\n const px = ((dx0 * c2) - (dx1 * c1)) / cross;\n const py = ((dy1 * c1) - (dy0 * c2)) / cross;\n const pdist = ((px - x1) * (px - x1)) + ((py - y1) * (py - y1));\n\n /* Inner miter point */\n const imx = x1 + ((px - x1) * innerWeight);\n const imy = y1 + ((py - y1) * innerWeight);\n /* Outer miter point */\n const omx = x1 - ((px - x1) * outerWeight);\n const omy = y1 - ((py - y1) * outerWeight);\n\n if (style.join === LINE_JOIN.BEVEL || pdist / widthSquared > miterLimitSquared)\n {\n if (clockwise) /* rotating at inner angle */\n {\n verts.push(imx, imy);// inner miter point\n verts.push(x1 + (perpx * outerWeight), y1 + (perpy * outerWeight));// first segment's outer vertex\n verts.push(imx, imy);// inner miter point\n verts.push(x1 + (perp1x * outerWeight), y1 + (perp1y * outerWeight));// second segment's outer vertex\n }\n else /* rotating at outer angle */\n {\n verts.push(x1 - (perpx * innerWeight), y1 - (perpy * innerWeight));// first segment's inner vertex\n verts.push(omx, omy);// outer miter point\n verts.push(x1 - (perp1x * innerWeight), y1 - (perp1y * innerWeight));// second segment's outer vertex\n verts.push(omx, omy);// outer miter point\n }\n\n indexCount += 2;\n }\n else if (style.join === LINE_JOIN.ROUND)\n {\n if (clockwise) /* arc is outside */\n {\n verts.push(imx, imy);\n verts.push(x1 + (perpx * outerWeight), y1 + (perpy * outerWeight));\n\n indexCount += round(\n x1, y1,\n x1 + (perpx * outerWeight), y1 + (perpy * outerWeight),\n x1 + (perp1x * outerWeight), y1 + (perp1y * outerWeight),\n verts, true\n ) + 4;\n\n verts.push(imx, imy);\n verts.push(x1 + (perp1x * outerWeight), y1 + (perp1y * outerWeight));\n }\n else /* arc is inside */\n {\n verts.push(x1 - (perpx * innerWeight), y1 - (perpy * innerWeight));\n verts.push(omx, omy);\n\n indexCount += round(\n x1, y1,\n x1 - (perpx * innerWeight), y1 - (perpy * innerWeight),\n x1 - (perp1x * innerWeight), y1 - (perp1y * innerWeight),\n verts, false\n ) + 4;\n\n verts.push(x1 - (perp1x * innerWeight), y1 - (perp1y * innerWeight));\n verts.push(omx, omy);\n }\n }\n else\n {\n verts.push(imx, imy);\n verts.push(omx, omy);\n }\n }\n\n x0 = points[(length - 2) * 2];\n y0 = points[((length - 2) * 2) + 1];\n\n x1 = points[(length - 1) * 2];\n y1 = points[((length - 1) * 2) + 1];\n\n perpx = -(y0 - y1);\n perpy = x0 - x1;\n\n dist = Math.sqrt((perpx * perpx) + (perpy * perpy));\n perpx /= dist;\n perpy /= dist;\n perpx *= width;\n perpy *= width;\n\n verts.push(x1 - (perpx * innerWeight), y1 - (perpy * innerWeight));\n verts.push(x1 + (perpx * outerWeight), y1 + (perpy * outerWeight));\n\n if (!closedShape)\n {\n if (style.cap === LINE_CAP.ROUND)\n {\n indexCount += round(\n x1 - (perpx * (innerWeight - outerWeight) * 0.5),\n y1 - (perpy * (innerWeight - outerWeight) * 0.5),\n x1 - (perpx * innerWeight),\n y1 - (perpy * innerWeight),\n x1 + (perpx * outerWeight),\n y1 + (perpy * outerWeight),\n verts,\n false\n ) + 2;\n }\n else if (style.cap === LINE_CAP.SQUARE)\n {\n indexCount += square(x1, y1, perpx, perpy, innerWeight, outerWeight, false, verts);\n }\n }\n\n const indices = graphicsGeometry.indices;\n const eps2 = GRAPHICS_CURVES.epsilon * GRAPHICS_CURVES.epsilon;\n\n // indices.push(indexStart);\n for (let i = indexStart; i < indexCount + indexStart - 2; ++i)\n {\n x0 = verts[(i * 2)];\n y0 = verts[(i * 2) + 1];\n\n x1 = verts[(i + 1) * 2];\n y1 = verts[((i + 1) * 2) + 1];\n\n x2 = verts[(i + 2) * 2];\n y2 = verts[((i + 2) * 2) + 1];\n\n /* Skip zero area triangles */\n if (Math.abs((x0 * (y1 - y2)) + (x1 * (y2 - y0)) + (x2 * (y0 - y1))) < eps2)\n {\n continue;\n }\n\n indices.push(i, i + 1, i + 2);\n }\n}\n\n/**\n * Builds a line to draw using the gl.drawArrays(gl.LINES) method\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {PIXI.GraphicsData} graphicsData - The graphics object containing all the necessary properties\n * @param {PIXI.GraphicsGeometry} graphicsGeometry - Geometry where to append output\n */\nfunction buildNativeLine(graphicsData: GraphicsData, graphicsGeometry: GraphicsGeometry): void\n{\n let i = 0;\n\n const shape = graphicsData.shape as Polygon;\n const points = graphicsData.points || shape.points;\n const closedShape = shape.type !== SHAPES.POLY || shape.closeStroke;\n\n if (points.length === 0) return;\n\n const verts = graphicsGeometry.points;\n const indices = graphicsGeometry.indices;\n const length = points.length / 2;\n\n const startIndex = verts.length / 2;\n let currentIndex = startIndex;\n\n verts.push(points[0], points[1]);\n\n for (i = 1; i < length; i++)\n {\n verts.push(points[i * 2], points[(i * 2) + 1]);\n indices.push(currentIndex, currentIndex + 1);\n\n currentIndex++;\n }\n\n if (closedShape)\n {\n indices.push(currentIndex, startIndex);\n }\n}\n\n/**\n * Builds a line to draw\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @private\n * @param {PIXI.GraphicsData} graphicsData - The graphics object containing all the necessary properties\n * @param {PIXI.GraphicsGeometry} graphicsGeometry - Geometry where to append output\n */\nexport function buildLine(graphicsData: GraphicsData, graphicsGeometry: GraphicsGeometry): void\n{\n if (graphicsData.lineStyle.native)\n {\n buildNativeLine(graphicsData, graphicsGeometry);\n }\n else\n {\n buildNonNativeLine(graphicsData, graphicsGeometry);\n }\n}\n","import { Polygon, PI_2 } from '@pixi/math';\n\n/**\n * Draw a star shape with an arbitrary number of points.\n *\n * @class\n * @extends PIXI.Polygon\n * @memberof PIXI.graphicsUtils\n * @param {number} x - Center X position of the star\n * @param {number} y - Center Y position of the star\n * @param {number} points - The number of points of the star, must be > 1\n * @param {number} radius - The outer radius of the star\n * @param {number} [innerRadius] - The inner radius between points, default half `radius`\n * @param {number} [rotation=0] - The rotation of the star in radians, where 0 is vertical\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\nexport class Star extends Polygon\n{\n constructor(x: number, y: number, points: number, radius: number, innerRadius: number, rotation = 0)\n {\n innerRadius = innerRadius || radius / 2;\n\n const startAngle = (-1 * Math.PI / 2) + rotation;\n const len = points * 2;\n const delta = PI_2 / len;\n const polygon = [];\n\n for (let i = 0; i < len; i++)\n {\n const r = i % 2 ? innerRadius : radius;\n const angle = (i * delta) + startAngle;\n\n polygon.push(\n x + (r * Math.cos(angle)),\n y + (r * Math.sin(angle))\n );\n }\n\n super(polygon);\n }\n}\n","import { GRAPHICS_CURVES } from '../const';\nimport { PI_2 } from '@pixi/math';\n\ninterface IArcLikeShape {\n cx: number;\n cy: number;\n radius: number;\n startAngle: number;\n endAngle: number;\n anticlockwise: boolean;\n}\n\n/**\n * Utilities for arc curves\n * @class\n * @private\n */\nexport class ArcUtils\n{\n /**\n * The arcTo() method creates an arc/curve between two tangents on the canvas.\n *\n * \"borrowed\" from https://code.google.com/p/fxcanvas/ - thanks google!\n *\n * @private\n * @param {number} x1 - The x-coordinate of the beginning of the arc\n * @param {number} y1 - The y-coordinate of the beginning of the arc\n * @param {number} x2 - The x-coordinate of the end of the arc\n * @param {number} y2 - The y-coordinate of the end of the arc\n * @param {number} radius - The radius of the arc\n * @return {object} If the arc length is valid, return center of circle, radius and other info otherwise `null`.\n */\n static curveTo(x1: number, y1: number, x2: number, y2: number, radius: number, points: Array): IArcLikeShape\n {\n const fromX = points[points.length - 2];\n const fromY = points[points.length - 1];\n\n const a1 = fromY - y1;\n const b1 = fromX - x1;\n const a2 = y2 - y1;\n const b2 = x2 - x1;\n const mm = Math.abs((a1 * b2) - (b1 * a2));\n\n if (mm < 1.0e-8 || radius === 0)\n {\n if (points[points.length - 2] !== x1 || points[points.length - 1] !== y1)\n {\n points.push(x1, y1);\n }\n\n return null;\n }\n\n const dd = (a1 * a1) + (b1 * b1);\n const cc = (a2 * a2) + (b2 * b2);\n const tt = (a1 * a2) + (b1 * b2);\n const k1 = radius * Math.sqrt(dd) / mm;\n const k2 = radius * Math.sqrt(cc) / mm;\n const j1 = k1 * tt / dd;\n const j2 = k2 * tt / cc;\n const cx = (k1 * b2) + (k2 * b1);\n const cy = (k1 * a2) + (k2 * a1);\n const px = b1 * (k2 + j1);\n const py = a1 * (k2 + j1);\n const qx = b2 * (k1 + j2);\n const qy = a2 * (k1 + j2);\n const startAngle = Math.atan2(py - cy, px - cx);\n const endAngle = Math.atan2(qy - cy, qx - cx);\n\n return {\n cx: (cx + x1),\n cy: (cy + y1),\n radius,\n startAngle,\n endAngle,\n anticlockwise: (b1 * a2 > b2 * a1),\n };\n }\n\n /* eslint-disable max-len */\n /**\n * The arc method creates an arc/curve (used to create circles, or parts of circles).\n *\n * @private\n * @param {number} startX - Start x location of arc\n * @param {number} startY - Start y location of arc\n * @param {number} cx - The x-coordinate of the center of the circle\n * @param {number} cy - The y-coordinate of the center of the circle\n * @param {number} radius - The radius of the circle\n * @param {number} startAngle - The starting angle, in radians (0 is at the 3 o'clock position\n * of the arc's circle)\n * @param {number} endAngle - The ending angle, in radians\n * @param {boolean} anticlockwise - Specifies whether the drawing should be\n * counter-clockwise or clockwise. False is default, and indicates clockwise, while true\n * indicates counter-clockwise.\n * @param {number[]} points - Collection of points to add to\n */\n static arc(_startX: number, _startY: number, cx: number, cy: number, radius: number,\n startAngle: number, endAngle: number, _anticlockwise: boolean, points: Array): void\n {\n const sweep = endAngle - startAngle;\n const n = GRAPHICS_CURVES._segmentsCount(\n Math.abs(sweep) * radius,\n Math.ceil(Math.abs(sweep) / PI_2) * 40\n );\n\n const theta = (sweep) / (n * 2);\n const theta2 = theta * 2;\n const cTheta = Math.cos(theta);\n const sTheta = Math.sin(theta);\n const segMinus = n - 1;\n const remainder = (segMinus % 1) / segMinus;\n\n for (let i = 0; i <= segMinus; ++i)\n {\n const real = i + (remainder * i);\n const angle = ((theta) + startAngle + (theta2 * real));\n const c = Math.cos(angle);\n const s = -Math.sin(angle);\n\n points.push(\n (((cTheta * c) + (sTheta * s)) * radius) + cx,\n (((cTheta * -s) + (sTheta * c)) * radius) + cy\n );\n }\n }\n /* eslint-enable max-len */\n}\n","import { GRAPHICS_CURVES } from '../const';\n\n/**\n * Utilities for bezier curves\n * @class\n * @private\n */\nexport class BezierUtils\n{\n /**\n * Calculate length of bezier curve.\n * Analytical solution is impossible, since it involves an integral that does not integrate in general.\n * Therefore numerical solution is used.\n *\n * @private\n * @param {number} fromX - Starting point x\n * @param {number} fromY - Starting point y\n * @param {number} cpX - Control point x\n * @param {number} cpY - Control point y\n * @param {number} cpX2 - Second Control point x\n * @param {number} cpY2 - Second Control point y\n * @param {number} toX - Destination point x\n * @param {number} toY - Destination point y\n * @return {number} Length of bezier curve\n */\n static curveLength(\n fromX: number, fromY: number,\n cpX: number, cpY: number,\n cpX2: number, cpY2: number,\n toX: number, toY: number): number\n {\n const n = 10;\n let result = 0.0;\n let t = 0.0;\n let t2 = 0.0;\n let t3 = 0.0;\n let nt = 0.0;\n let nt2 = 0.0;\n let nt3 = 0.0;\n let x = 0.0;\n let y = 0.0;\n let dx = 0.0;\n let dy = 0.0;\n let prevX = fromX;\n let prevY = fromY;\n\n for (let i = 1; i <= n; ++i)\n {\n t = i / n;\n t2 = t * t;\n t3 = t2 * t;\n nt = (1.0 - t);\n nt2 = nt * nt;\n nt3 = nt2 * nt;\n\n x = (nt3 * fromX) + (3.0 * nt2 * t * cpX) + (3.0 * nt * t2 * cpX2) + (t3 * toX);\n y = (nt3 * fromY) + (3.0 * nt2 * t * cpY) + (3 * nt * t2 * cpY2) + (t3 * toY);\n dx = prevX - x;\n dy = prevY - y;\n prevX = x;\n prevY = y;\n\n result += Math.sqrt((dx * dx) + (dy * dy));\n }\n\n return result;\n }\n\n /**\n * Calculate the points for a bezier curve and then draws it.\n *\n * Ignored from docs since it is not directly exposed.\n *\n * @ignore\n * @param {number} cpX - Control point x\n * @param {number} cpY - Control point y\n * @param {number} cpX2 - Second Control point x\n * @param {number} cpY2 - Second Control point y\n * @param {number} toX - Destination point x\n * @param {number} toY - Destination point y\n * @param {number[]} points - Path array to push points into\n */\n static curveTo(\n cpX: number, cpY: number,\n cpX2: number, cpY2: number,\n toX: number, toY: number,\n points: Array): void\n {\n const fromX = points[points.length - 2];\n const fromY = points[points.length - 1];\n\n points.length -= 2;\n\n const n = GRAPHICS_CURVES._segmentsCount(\n BezierUtils.curveLength(fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY)\n );\n\n let dt = 0;\n let dt2 = 0;\n let dt3 = 0;\n let t2 = 0;\n let t3 = 0;\n\n points.push(fromX, fromY);\n\n for (let i = 1, j = 0; i <= n; ++i)\n {\n j = i / n;\n\n dt = (1 - j);\n dt2 = dt * dt;\n dt3 = dt2 * dt;\n\n t2 = j * j;\n t3 = t2 * j;\n\n points.push(\n (dt3 * fromX) + (3 * dt2 * j * cpX) + (3 * dt * t2 * cpX2) + (t3 * toX),\n (dt3 * fromY) + (3 * dt2 * j * cpY) + (3 * dt * t2 * cpY2) + (t3 * toY)\n );\n }\n }\n}\n","import { GRAPHICS_CURVES } from '../const';\n\n/**\n * Utilities for quadratic curves\n * @class\n * @private\n */\nexport class QuadraticUtils\n{\n /**\n * Calculate length of quadratic curve\n * @see {@link http://www.malczak.linuxpl.com/blog/quadratic-bezier-curve-length/}\n * for the detailed explanation of math behind this.\n *\n * @private\n * @param {number} fromX - x-coordinate of curve start point\n * @param {number} fromY - y-coordinate of curve start point\n * @param {number} cpX - x-coordinate of curve control point\n * @param {number} cpY - y-coordinate of curve control point\n * @param {number} toX - x-coordinate of curve end point\n * @param {number} toY - y-coordinate of curve end point\n * @return {number} Length of quadratic curve\n */\n static curveLength(\n fromX: number, fromY: number,\n cpX: number, cpY: number,\n toX: number, toY: number): number\n {\n const ax = fromX - (2.0 * cpX) + toX;\n const ay = fromY - (2.0 * cpY) + toY;\n const bx = (2.0 * cpX) - (2.0 * fromX);\n const by = (2.0 * cpY) - (2.0 * fromY);\n const a = 4.0 * ((ax * ax) + (ay * ay));\n const b = 4.0 * ((ax * bx) + (ay * by));\n const c = (bx * bx) + (by * by);\n\n const s = 2.0 * Math.sqrt(a + b + c);\n const a2 = Math.sqrt(a);\n const a32 = 2.0 * a * a2;\n const c2 = 2.0 * Math.sqrt(c);\n const ba = b / a2;\n\n return (\n (a32 * s)\n + (a2 * b * (s - c2))\n + (\n ((4.0 * c * a) - (b * b))\n * Math.log(((2.0 * a2) + ba + s) / (ba + c2))\n )\n ) / (4.0 * a32);\n }\n\n /**\n * Calculate the points for a quadratic bezier curve and then draws it.\n * Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c\n *\n * @private\n * @param {number} cpX - Control point x\n * @param {number} cpY - Control point y\n * @param {number} toX - Destination point x\n * @param {number} toY - Destination point y\n * @param {number[]} points - Points to add segments to.\n */\n static curveTo(cpX: number, cpY: number, toX: number, toY: number, points: Array): void\n {\n const fromX = points[points.length - 2];\n const fromY = points[points.length - 1];\n\n const n = GRAPHICS_CURVES._segmentsCount(\n QuadraticUtils.curveLength(fromX, fromY, cpX, cpY, toX, toY)\n );\n\n let xa = 0;\n let ya = 0;\n\n for (let i = 1; i <= n; ++i)\n {\n const j = i / n;\n\n xa = fromX + ((cpX - fromX) * j);\n ya = fromY + ((cpY - fromY) * j);\n\n points.push(xa + (((cpX + ((toX - cpX) * j)) - xa) * j),\n ya + (((cpY + ((toY - cpY) * j)) - ya) * j));\n }\n }\n}\n","import type { LineStyle } from '../styles/LineStyle';\nimport type { FillStyle } from '../styles/FillStyle';\n\n/**\n * A structure to hold interim batch objects for Graphics.\n * @class\n * @memberof PIXI.graphicsUtils\n */\nexport class BatchPart\n{\n public style: LineStyle | FillStyle;\n public start: number;\n public size: number;\n public attribStart: number;\n public attribSize: number;\n\n constructor()\n {\n this.reset();\n }\n\n /**\n * Begin batch part\n *\n * @param {PIXI.FillStyle | PIXI.LineStyle} style\n * @param {number} startIndex\n * @param {number} attribStart\n */\n public begin(style: LineStyle | FillStyle, startIndex: number, attribStart: number): void\n {\n this.reset();\n this.style = style;\n this.start = startIndex;\n this.attribStart = attribStart;\n }\n\n /**\n * End batch part\n *\n * @param {number} endIndex\n * @param {number} endAttrib\n */\n public end(endIndex: number, endAttrib: number): void\n {\n this.attribSize = endAttrib - this.attribStart;\n this.size = endIndex - this.start;\n }\n\n public reset(): void\n {\n this.style = null;\n this.size = 0;\n this.start = 0;\n this.attribStart = 0;\n this.attribSize = 0;\n }\n}\n","/**\n * Generalized convenience utilities for Graphics.\n *\n * @namespace graphicsUtils\n * @memberof PIXI\n */\n\nimport { buildPoly } from './buildPoly';\nexport { buildPoly };\n\nimport { buildCircle } from './buildCircle';\nexport { buildCircle };\n\nimport { buildRectangle } from './buildRectangle';\nexport { buildRectangle };\n\nimport { buildRoundedRectangle } from './buildRoundedRectangle';\nexport { buildRoundedRectangle };\n\nexport * from './buildLine';\nexport * from './Star';\nexport * from './ArcUtils';\nexport * from './BezierUtils';\nexport * from './QuadraticUtils';\nexport * from './BatchPart';\n\n// for type only\nimport { BatchPart } from './BatchPart';\nimport { SHAPES } from '@pixi/math';\nimport { BatchDrawCall } from '@pixi/core';\nimport { IShapeBuildCommand } from './IShapeBuildCommand';\n\n/**\n * Map of fill commands for each shape type.\n *\n * @memberof PIXI.graphicsUtils\n * @member {Object} FILL_COMMANDS\n */\nexport const FILL_COMMANDS: Record = {\n [SHAPES.POLY]: buildPoly,\n [SHAPES.CIRC]: buildCircle,\n [SHAPES.ELIP]: buildCircle,\n [SHAPES.RECT]: buildRectangle,\n [SHAPES.RREC]: buildRoundedRectangle,\n};\n\n/**\n * Batch pool, stores unused batches for preventing allocations.\n *\n * @memberof PIXI.graphicsUtils\n * @member {Array} BATCH_POOL\n */\nexport const BATCH_POOL: Array = [];\n\n/**\n * Draw call pool, stores unused draw calls for preventing allocations.\n *\n * @memberof PIXI.graphicsUtils\n * @member {Array} DRAW_CALL_POOL\n */\nexport const DRAW_CALL_POOL: Array = [];\n","import type { Matrix, SHAPES, IShape } from '@pixi/math';\nimport type { FillStyle } from './styles/FillStyle';\nimport type { LineStyle } from './styles/LineStyle';\n\n/**\n * A class to contain data useful for Graphics objects\n *\n * @class\n * @memberof PIXI\n */\nexport class GraphicsData\n{\n shape: IShape;\n lineStyle: LineStyle;\n fillStyle: FillStyle;\n matrix: Matrix;\n type: SHAPES;\n points: number[];\n holes: Array;\n /**\n *\n * @param {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} shape - The shape object to draw.\n * @param {PIXI.FillStyle} [fillStyle] - the width of the line to draw\n * @param {PIXI.LineStyle} [lineStyle] - the color of the line to draw\n * @param {PIXI.Matrix} [matrix] - Transform matrix\n */\n constructor(shape: IShape, fillStyle: FillStyle = null, lineStyle: LineStyle = null, matrix: Matrix = null)\n {\n /**\n * The shape object to draw.\n * @member {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle}\n */\n this.shape = shape;\n\n /**\n * The style of the line.\n * @member {PIXI.LineStyle}\n */\n this.lineStyle = lineStyle;\n\n /**\n * The style of the fill.\n * @member {PIXI.FillStyle}\n */\n this.fillStyle = fillStyle;\n\n /**\n * The transform matrix.\n * @member {PIXI.Matrix}\n */\n this.matrix = matrix;\n\n /**\n * The type of the shape, see the Const.Shapes file for all the existing types,\n * @member {number}\n */\n this.type = shape.type;\n\n /**\n * The collection of points.\n * @member {number[]}\n */\n this.points = [];\n\n /**\n * The collection of holes.\n * @member {PIXI.GraphicsData[]}\n */\n this.holes = [];\n }\n\n /**\n * Creates a new GraphicsData object with the same values as this one.\n *\n * @return {PIXI.GraphicsData} Cloned GraphicsData object\n */\n public clone(): GraphicsData\n {\n return new GraphicsData(\n this.shape,\n this.fillStyle,\n this.lineStyle,\n this.matrix\n );\n }\n\n /**\n * Destroys the Graphics data.\n *\n */\n public destroy(): void\n {\n this.shape = null;\n this.holes.length = 0;\n this.holes = null;\n this.points.length = 0;\n this.points = null;\n this.lineStyle = null;\n this.fillStyle = null;\n }\n}\n","import {\n buildLine,\n buildPoly,\n BatchPart,\n FILL_COMMANDS,\n BATCH_POOL,\n DRAW_CALL_POOL,\n} from './utils';\n\nimport {\n BatchGeometry,\n BatchDrawCall,\n BatchTextureArray,\n BaseTexture,\n Texture,\n} from '@pixi/core';\n\nimport { DRAW_MODES, WRAP_MODES } from '@pixi/constants';\nimport { SHAPES, Point, Matrix } from '@pixi/math';\nimport { GraphicsData } from './GraphicsData';\nimport { premultiplyTint } from '@pixi/utils';\nimport { Bounds } from '@pixi/display';\n\nimport type { Circle, Ellipse, Polygon, Rectangle, RoundedRectangle, IPointData } from '@pixi/math';\nimport type { FillStyle } from './styles/FillStyle';\nimport type { LineStyle } from './styles/LineStyle';\n\n/**\n * @description Complex shape type\n * @todo Move to Math shapes\n */\ntype IShape = Circle | Ellipse | Polygon | Rectangle | RoundedRectangle;\n\nconst tmpPoint = new Point();\nconst tmpBounds = new Bounds();\n\n/**\n * The Graphics class contains methods used to draw primitive shapes such as lines, circles and\n * rectangles to the display, and to color and fill them.\n *\n * GraphicsGeometry is designed to not be continually updating the geometry since it's expensive\n * to re-tesselate using **earcut**. Consider using {@link PIXI.Mesh} for this use-case, it's much faster.\n *\n * @class\n * @extends PIXI.BatchGeometry\n * @memberof PIXI\n */\nexport class GraphicsGeometry extends BatchGeometry\n{\n /**\n * The maximum number of points to consider an object \"batchable\",\n * able to be batched by the renderer's batch system.\n *\n * @memberof PIXI.GraphicsGeometry\n * @static\n * @member {number} BATCHABLE_SIZE\n * @default 100\n */\n public static BATCHABLE_SIZE = 100;\n\n public closePointEps: number;\n public boundsPadding: number;\n\n uvsFloat32: Float32Array = null;\n indicesUint16: Uint16Array | Uint32Array = null;\n batchable: boolean;\n points: Array;\n colors: Array;\n uvs: Array;\n indices: Array;\n textureIds: Array;\n graphicsData: Array;\n drawCalls: Array;\n batchDirty: number;\n batches: Array;\n\n protected dirty: number;\n protected cacheDirty: number;\n protected clearDirty: number;\n protected shapeIndex: number;\n protected _bounds: Bounds;\n protected boundsDirty: number;\n\n constructor()\n {\n super();\n\n /**\n * An array of points to draw, 2 numbers per point\n *\n * @member {number[]}\n * @protected\n */\n this.points = [];\n\n /**\n * The collection of colors\n *\n * @member {number[]}\n * @protected\n */\n this.colors = [];\n\n /**\n * The UVs collection\n *\n * @member {number[]}\n * @protected\n */\n this.uvs = [];\n\n /**\n * The indices of the vertices\n *\n * @member {number[]}\n * @protected\n */\n this.indices = [];\n\n /**\n * Reference to the texture IDs.\n *\n * @member {number[]}\n * @protected\n */\n this.textureIds = [];\n\n /**\n * The collection of drawn shapes.\n *\n * @member {PIXI.GraphicsData[]}\n * @protected\n */\n this.graphicsData = [];\n\n /**\n * Used to detect if the graphics object has changed.\n *\n * @member {number}\n * @protected\n */\n this.dirty = 0;\n\n /**\n * Batches need to regenerated if the geometry is updated.\n *\n * @member {number}\n * @protected\n */\n this.batchDirty = -1;\n\n /**\n * Used to check if the cache is dirty.\n *\n * @member {number}\n * @protected\n */\n this.cacheDirty = -1;\n\n /**\n * Used to detect if we cleared the graphicsData.\n *\n * @member {number}\n * @default 0\n * @protected\n */\n this.clearDirty = 0;\n\n /**\n * List of current draw calls drived from the batches.\n *\n * @member {object[]}\n * @protected\n */\n this.drawCalls = [];\n\n /**\n * Intermediate abstract format sent to batch system.\n * Can be converted to drawCalls or to batchable objects.\n *\n * @member {PIXI.graphicsUtils.BatchPart[]}\n * @protected\n */\n this.batches = [];\n\n /**\n * Index of the last batched shape in the stack of calls.\n *\n * @member {number}\n * @protected\n */\n this.shapeIndex = 0;\n\n /**\n * Cached bounds.\n *\n * @member {PIXI.Bounds}\n * @protected\n */\n this._bounds = new Bounds();\n\n /**\n * The bounds dirty flag.\n *\n * @member {number}\n * @protected\n */\n this.boundsDirty = -1;\n\n /**\n * Padding to add to the bounds.\n *\n * @member {number}\n * @default 0\n */\n this.boundsPadding = 0;\n\n this.batchable = false;\n\n this.indicesUint16 = null;\n\n this.uvsFloat32 = null;\n\n /**\n * Minimal distance between points that are considered different.\n * Affects line tesselation.\n *\n * @member {number}\n */\n this.closePointEps = 1e-4;\n }\n\n /**\n * Get the current bounds of the graphic geometry.\n *\n * @member {PIXI.Bounds}\n * @readonly\n */\n public get bounds(): Bounds\n {\n if (this.boundsDirty !== this.dirty)\n {\n this.boundsDirty = this.dirty;\n this.calculateBounds();\n }\n\n return this._bounds;\n }\n\n /**\n * Call if you changed graphicsData manually.\n * Empties all batch buffers.\n */\n protected invalidate(): void\n {\n this.boundsDirty = -1;\n this.dirty++;\n this.batchDirty++;\n this.shapeIndex = 0;\n\n this.points.length = 0;\n this.colors.length = 0;\n this.uvs.length = 0;\n this.indices.length = 0;\n this.textureIds.length = 0;\n\n for (let i = 0; i < this.drawCalls.length; i++)\n {\n this.drawCalls[i].texArray.clear();\n DRAW_CALL_POOL.push(this.drawCalls[i]);\n }\n\n this.drawCalls.length = 0;\n\n for (let i = 0; i < this.batches.length; i++)\n {\n const batchPart = this.batches[i];\n\n batchPart.reset();\n BATCH_POOL.push(batchPart);\n }\n\n this.batches.length = 0;\n }\n\n /**\n * Clears the graphics that were drawn to this Graphics object, and resets fill and line style settings.\n *\n * @return {PIXI.GraphicsGeometry} This GraphicsGeometry object. Good for chaining method calls\n */\n public clear(): GraphicsGeometry\n {\n if (this.graphicsData.length > 0)\n {\n this.invalidate();\n this.clearDirty++;\n this.graphicsData.length = 0;\n }\n\n return this;\n }\n\n /**\n * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon.\n *\n * @param {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} shape - The shape object to draw.\n * @param {PIXI.FillStyle} fillStyle - Defines style of the fill.\n * @param {PIXI.LineStyle} lineStyle - Defines style of the lines.\n * @param {PIXI.Matrix} matrix - Transform applied to the points of the shape.\n * @return {PIXI.GraphicsGeometry} Returns geometry for chaining.\n */\n public drawShape(\n shape: IShape,\n fillStyle: FillStyle = null,\n lineStyle: LineStyle = null,\n matrix: Matrix = null): GraphicsGeometry\n {\n const data = new GraphicsData(shape, fillStyle, lineStyle, matrix);\n\n this.graphicsData.push(data);\n this.dirty++;\n\n return this;\n }\n\n /**\n * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon.\n *\n * @param {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} shape - The shape object to draw.\n * @param {PIXI.Matrix} matrix - Transform applied to the points of the shape.\n * @return {PIXI.GraphicsGeometry} Returns geometry for chaining.\n */\n public drawHole(shape: IShape, matrix: Matrix = null): GraphicsGeometry\n {\n if (!this.graphicsData.length)\n {\n return null;\n }\n\n const data = new GraphicsData(shape, null, null, matrix);\n\n const lastShape = this.graphicsData[this.graphicsData.length - 1];\n\n data.lineStyle = lastShape.lineStyle;\n\n lastShape.holes.push(data);\n\n this.dirty++;\n\n return this;\n }\n\n /**\n * Destroys the GraphicsGeometry object.\n *\n */\n public destroy(): void\n {\n super.destroy();\n\n // destroy each of the GraphicsData objects\n for (let i = 0; i < this.graphicsData.length; ++i)\n {\n this.graphicsData[i].destroy();\n }\n\n this.points.length = 0;\n this.points = null;\n this.colors.length = 0;\n this.colors = null;\n this.uvs.length = 0;\n this.uvs = null;\n this.indices.length = 0;\n this.indices = null;\n this.indexBuffer.destroy();\n this.indexBuffer = null;\n this.graphicsData.length = 0;\n this.graphicsData = null;\n this.drawCalls.length = 0;\n this.drawCalls = null;\n this.batches.length = 0;\n this.batches = null;\n this._bounds = null;\n }\n\n /**\n * Check to see if a point is contained within this geometry.\n *\n * @param {PIXI.IPointData} point - Point to check if it's contained.\n * @return {Boolean} `true` if the point is contained within geometry.\n */\n public containsPoint(point: IPointData): boolean\n {\n const graphicsData = this.graphicsData;\n\n for (let i = 0; i < graphicsData.length; ++i)\n {\n const data = graphicsData[i];\n\n if (!data.fillStyle.visible)\n {\n continue;\n }\n\n // only deal with fills..\n if (data.shape)\n {\n if (data.matrix)\n {\n data.matrix.applyInverse(point, tmpPoint);\n }\n else\n {\n tmpPoint.copyFrom(point);\n }\n\n if (data.shape.contains(tmpPoint.x, tmpPoint.y))\n {\n let hitHole = false;\n\n if (data.holes)\n {\n for (let i = 0; i < data.holes.length; i++)\n {\n const hole = data.holes[i];\n\n if (hole.shape.contains(tmpPoint.x, tmpPoint.y))\n {\n hitHole = true;\n break;\n }\n }\n }\n\n if (!hitHole)\n {\n return true;\n }\n }\n }\n }\n\n return false;\n }\n\n /**\n * Generates intermediate batch data. Either gets converted to drawCalls\n * or used to convert to batch objects directly by the Graphics object.\n *\n * @param {boolean} [aloow32Indices] - Allow using 32-bit indices for preventings artefacts when more that 65535 vertices\n */\n updateBatches(allow32Indices?: boolean): void\n {\n if (!this.graphicsData.length)\n {\n this.batchable = true;\n\n return;\n }\n\n if (!this.validateBatching())\n {\n return;\n }\n\n this.cacheDirty = this.dirty;\n\n const uvs = this.uvs;\n const graphicsData = this.graphicsData;\n\n let batchPart: BatchPart = null;\n\n let currentStyle = null;\n\n if (this.batches.length > 0)\n {\n batchPart = this.batches[this.batches.length - 1];\n currentStyle = batchPart.style;\n }\n\n for (let i = this.shapeIndex; i < graphicsData.length; i++)\n {\n this.shapeIndex++;\n\n const data = graphicsData[i];\n const fillStyle = data.fillStyle;\n const lineStyle = data.lineStyle;\n const command = FILL_COMMANDS[data.type];\n\n // build out the shapes points..\n command.build(data);\n\n if (data.matrix)\n {\n this.transformPoints(data.points, data.matrix);\n }\n\n for (let j = 0; j < 2; j++)\n {\n const style = (j === 0) ? fillStyle : lineStyle;\n\n if (!style.visible) continue;\n\n const nextTexture = style.texture.baseTexture;\n const index = this.indices.length;\n const attribIndex = this.points.length / 2;\n\n nextTexture.wrapMode = WRAP_MODES.REPEAT;\n\n if (j === 0)\n {\n this.processFill(data);\n }\n else\n {\n this.processLine(data);\n }\n\n const size = (this.points.length / 2) - attribIndex;\n\n if (size === 0) continue;\n // close batch if style is different\n if (batchPart && !this._compareStyles(currentStyle, style))\n {\n batchPart.end(index, attribIndex);\n batchPart = null;\n }\n // spawn new batch if its first batch or previous was closed\n if (!batchPart)\n {\n batchPart = BATCH_POOL.pop() || new BatchPart();\n batchPart.begin(style, index, attribIndex);\n this.batches.push(batchPart);\n currentStyle = style;\n }\n\n this.addUvs(this.points, uvs, style.texture, attribIndex, size, style.matrix);\n }\n }\n\n const index = this.indices.length;\n const attrib = this.points.length / 2;\n\n if (batchPart)\n {\n batchPart.end(index, attrib);\n }\n\n if (this.batches.length === 0)\n {\n // there are no visible styles in GraphicsData\n // its possible that someone wants Graphics just for the bounds\n this.batchable = true;\n\n return;\n }\n\n // prevent allocation when length is same as buffer\n if (this.indicesUint16 && this.indices.length === this.indicesUint16.length)\n {\n this.indicesUint16.set(this.indices);\n }\n else\n {\n const need32\n = attrib > 0xffff && allow32Indices;\n\n this.indicesUint16 = need32 ? new Uint32Array(this.indices) : new Uint16Array(this.indices);\n }\n\n // TODO make this a const..\n this.batchable = this.isBatchable();\n\n if (this.batchable)\n {\n this.packBatches();\n }\n else\n {\n this.buildDrawCalls();\n }\n }\n\n /**\n * Affinity check\n *\n * @param {PIXI.FillStyle | PIXI.LineStyle} styleA\n * @param {PIXI.FillStyle | PIXI.LineStyle} styleB\n */\n protected _compareStyles(styleA: FillStyle | LineStyle, styleB: FillStyle | LineStyle): boolean\n {\n if (!styleA || !styleB)\n {\n return false;\n }\n\n if (styleA.texture.baseTexture !== styleB.texture.baseTexture)\n {\n return false;\n }\n\n if (styleA.color + styleA.alpha !== styleB.color + styleB.alpha)\n {\n return false;\n }\n\n if (!!(styleA as LineStyle).native !== !!(styleB as LineStyle).native)\n {\n return false;\n }\n\n return true;\n }\n\n /**\n * Test geometry for batching process.\n *\n * @protected\n */\n protected validateBatching(): boolean\n {\n if (this.dirty === this.cacheDirty || !this.graphicsData.length)\n {\n return false;\n }\n\n for (let i = 0, l = this.graphicsData.length; i < l; i++)\n {\n const data = this.graphicsData[i];\n const fill = data.fillStyle;\n const line = data.lineStyle;\n\n if (fill && !fill.texture.baseTexture.valid) return false;\n if (line && !line.texture.baseTexture.valid) return false;\n }\n\n return true;\n }\n\n /**\n * Offset the indices so that it works with the batcher.\n *\n * @protected\n */\n protected packBatches(): void\n {\n this.batchDirty++;\n this.uvsFloat32 = new Float32Array(this.uvs);\n\n const batches = this.batches;\n\n for (let i = 0, l = batches.length; i < l; i++)\n {\n const batch = batches[i];\n\n for (let j = 0; j < batch.size; j++)\n {\n const index = batch.start + j;\n\n this.indicesUint16[index] = this.indicesUint16[index] - batch.attribStart;\n }\n }\n }\n\n /**\n * Checks to see if this graphics geometry can be batched.\n * Currently it needs to be small enough and not contain any native lines.\n *\n * @protected\n */\n protected isBatchable(): boolean\n {\n // prevent heavy mesh batching\n if (this.points.length > 0xffff * 2)\n {\n return false;\n }\n\n const batches = this.batches;\n\n for (let i = 0; i < batches.length; i++)\n {\n if ((batches[i].style as LineStyle).native)\n {\n return false;\n }\n }\n\n return (this.points.length < GraphicsGeometry.BATCHABLE_SIZE * 2);\n }\n\n /**\n * Converts intermediate batches data to drawCalls.\n *\n * @protected\n */\n protected buildDrawCalls(): void\n {\n let TICK = ++BaseTexture._globalBatch;\n\n for (let i = 0; i < this.drawCalls.length; i++)\n {\n this.drawCalls[i].texArray.clear();\n DRAW_CALL_POOL.push(this.drawCalls[i]);\n }\n\n this.drawCalls.length = 0;\n\n const colors = this.colors;\n const textureIds = this.textureIds;\n\n let currentGroup: BatchDrawCall = DRAW_CALL_POOL.pop();\n\n if (!currentGroup)\n {\n currentGroup = new BatchDrawCall();\n currentGroup.texArray = new BatchTextureArray();\n }\n currentGroup.texArray.count = 0;\n currentGroup.start = 0;\n currentGroup.size = 0;\n currentGroup.type = DRAW_MODES.TRIANGLES;\n\n let textureCount = 0;\n let currentTexture = null;\n let textureId = 0;\n let native = false;\n let drawMode = DRAW_MODES.TRIANGLES;\n\n let index = 0;\n\n this.drawCalls.push(currentGroup);\n\n // TODO - this can be simplified\n for (let i = 0; i < this.batches.length; i++)\n {\n const data = this.batches[i];\n\n // TODO add some full on MAX_TEXTURE CODE..\n const MAX_TEXTURES = 8;\n\n // Forced cast for checking `native` without errors\n const style = data.style as LineStyle;\n\n const nextTexture = style.texture.baseTexture;\n\n if (native !== !!style.native)\n {\n native = !!style.native;\n drawMode = native ? DRAW_MODES.LINES : DRAW_MODES.TRIANGLES;\n\n // force the batch to break!\n currentTexture = null;\n textureCount = MAX_TEXTURES;\n TICK++;\n }\n\n if (currentTexture !== nextTexture)\n {\n currentTexture = nextTexture;\n\n if (nextTexture._batchEnabled !== TICK)\n {\n if (textureCount === MAX_TEXTURES)\n {\n TICK++;\n\n textureCount = 0;\n\n if (currentGroup.size > 0)\n {\n currentGroup = DRAW_CALL_POOL.pop();\n if (!currentGroup)\n {\n currentGroup = new BatchDrawCall();\n currentGroup.texArray = new BatchTextureArray();\n }\n this.drawCalls.push(currentGroup);\n }\n\n currentGroup.start = index;\n currentGroup.size = 0;\n currentGroup.texArray.count = 0;\n currentGroup.type = drawMode;\n }\n\n // TODO add this to the render part..\n // Hack! Because texture has protected `touched`\n nextTexture.touched = 1;// touch;\n\n nextTexture._batchEnabled = TICK;\n nextTexture._batchLocation = textureCount;\n nextTexture.wrapMode = 10497;\n\n currentGroup.texArray.elements[currentGroup.texArray.count++] = nextTexture;\n textureCount++;\n }\n }\n\n currentGroup.size += data.size;\n index += data.size;\n\n textureId = nextTexture._batchLocation;\n\n this.addColors(colors, style.color, style.alpha, data.attribSize);\n this.addTextureIds(textureIds, textureId, data.attribSize);\n }\n\n BaseTexture._globalBatch = TICK;\n\n // upload..\n // merge for now!\n this.packAttributes();\n }\n\n /**\n * Packs attributes to single buffer.\n *\n * @protected\n */\n protected packAttributes(): void\n {\n const verts = this.points;\n const uvs = this.uvs;\n const colors = this.colors;\n const textureIds = this.textureIds;\n\n // verts are 2 positions.. so we * by 3 as there are 6 properties.. then 4 cos its bytes\n const glPoints = new ArrayBuffer(verts.length * 3 * 4);\n const f32 = new Float32Array(glPoints);\n const u32 = new Uint32Array(glPoints);\n\n let p = 0;\n\n for (let i = 0; i < verts.length / 2; i++)\n {\n f32[p++] = verts[i * 2];\n f32[p++] = verts[(i * 2) + 1];\n\n f32[p++] = uvs[i * 2];\n f32[p++] = uvs[(i * 2) + 1];\n\n u32[p++] = colors[i];\n\n f32[p++] = textureIds[i];\n }\n\n this._buffer.update(glPoints);\n this._indexBuffer.update(this.indicesUint16);\n }\n\n /**\n * Process fill part of Graphics.\n *\n * @param {PIXI.GraphicsData} data\n * @protected\n */\n protected processFill(data: GraphicsData): void\n {\n if (data.holes.length)\n {\n this.processHoles(data.holes);\n\n buildPoly.triangulate(data, this);\n }\n else\n {\n const command = FILL_COMMANDS[data.type];\n\n command.triangulate(data, this);\n }\n }\n\n /**\n * Process line part of Graphics.\n *\n * @param {PIXI.GraphicsData} data\n * @protected\n */\n protected processLine(data: GraphicsData): void\n {\n buildLine(data, this);\n\n for (let i = 0; i < data.holes.length; i++)\n {\n buildLine(data.holes[i], this);\n }\n }\n\n /**\n * Process the holes data.\n *\n * @param {PIXI.GraphicsData[]} holes - Holes to render\n * @protected\n */\n protected processHoles(holes: Array): void\n {\n for (let i = 0; i < holes.length; i++)\n {\n const hole = holes[i];\n const command = FILL_COMMANDS[hole.type];\n\n command.build(hole);\n\n if (hole.matrix)\n {\n this.transformPoints(hole.points, hole.matrix);\n }\n }\n }\n\n /**\n * Update the local bounds of the object. Expensive to use performance-wise.\n *\n * @protected\n */\n protected calculateBounds(): void\n {\n const bounds = this._bounds;\n const sequenceBounds = tmpBounds;\n let curMatrix = Matrix.IDENTITY;\n\n this._bounds.clear();\n sequenceBounds.clear();\n\n for (let i = 0; i < this.graphicsData.length; i++)\n {\n const data = this.graphicsData[i];\n const shape = data.shape;\n const type = data.type;\n const lineStyle = data.lineStyle;\n const nextMatrix = data.matrix || Matrix.IDENTITY;\n let lineWidth = 0.0;\n\n if (lineStyle && lineStyle.visible)\n {\n const alignment = lineStyle.alignment;\n\n lineWidth = lineStyle.width;\n\n if (type === SHAPES.POLY)\n {\n lineWidth = lineWidth * (0.5 + Math.abs(0.5 - alignment));\n }\n else\n {\n lineWidth = lineWidth * Math.max(0, alignment);\n }\n }\n\n if (curMatrix !== nextMatrix)\n {\n if (!sequenceBounds.isEmpty())\n {\n bounds.addBoundsMatrix(sequenceBounds, curMatrix);\n sequenceBounds.clear();\n }\n curMatrix = nextMatrix;\n }\n\n if (type === SHAPES.RECT || type === SHAPES.RREC)\n {\n const rect = shape as Rectangle | RoundedRectangle;\n\n sequenceBounds.addFramePad(rect.x, rect.y, rect.x + rect.width, rect.y + rect.height,\n lineWidth, lineWidth);\n }\n else if (type === SHAPES.CIRC)\n {\n const circle = shape as Circle;\n\n sequenceBounds.addFramePad(circle.x, circle.y, circle.x, circle.y,\n circle.radius + lineWidth, circle.radius + lineWidth);\n }\n else if (type === SHAPES.ELIP)\n {\n const ellipse = shape as Ellipse;\n\n sequenceBounds.addFramePad(ellipse.x, ellipse.y, ellipse.x, ellipse.y,\n ellipse.width + lineWidth, ellipse.height + lineWidth);\n }\n else\n {\n const poly = shape as Polygon;\n // adding directly to the bounds\n\n bounds.addVerticesMatrix(curMatrix, (poly.points as any), 0, poly.points.length, lineWidth, lineWidth);\n }\n }\n\n if (!sequenceBounds.isEmpty())\n {\n bounds.addBoundsMatrix(sequenceBounds, curMatrix);\n }\n\n bounds.pad(this.boundsPadding, this.boundsPadding);\n }\n\n /**\n * Transform points using matrix.\n *\n * @protected\n * @param {number[]} points - Points to transform\n * @param {PIXI.Matrix} matrix - Transform matrix\n */\n protected transformPoints(points: Array, matrix: Matrix): void\n {\n for (let i = 0; i < points.length / 2; i++)\n {\n const x = points[(i * 2)];\n const y = points[(i * 2) + 1];\n\n points[(i * 2)] = (matrix.a * x) + (matrix.c * y) + matrix.tx;\n points[(i * 2) + 1] = (matrix.b * x) + (matrix.d * y) + matrix.ty;\n }\n }\n\n /**\n * Add colors.\n *\n * @protected\n * @param {number[]} colors - List of colors to add to\n * @param {number} color - Color to add\n * @param {number} alpha - Alpha to use\n * @param {number} size - Number of colors to add\n */\n protected addColors(colors: Array, color: number, alpha: number, size: number): void\n {\n // TODO use the premultiply bits Ivan added\n const rgb = (color >> 16) + (color & 0xff00) + ((color & 0xff) << 16);\n\n const rgba = premultiplyTint(rgb, alpha);\n\n while (size-- > 0)\n {\n colors.push(rgba);\n }\n }\n\n /**\n * Add texture id that the shader/fragment wants to use.\n *\n * @protected\n * @param {number[]} textureIds\n * @param {number} id\n * @param {number} size\n */\n protected addTextureIds(textureIds: Array, id: number, size: number): void\n {\n while (size-- > 0)\n {\n textureIds.push(id);\n }\n }\n\n /**\n * Generates the UVs for a shape.\n *\n * @protected\n * @param {number[]} verts - Vertices\n * @param {number[]} uvs - UVs\n * @param {PIXI.Texture} texture - Reference to Texture\n * @param {number} start - Index buffer start index.\n * @param {number} size - The size/length for index buffer.\n * @param {PIXI.Matrix} [matrix] - Optional transform for all points.\n */\n protected addUvs(\n verts: Array,\n uvs: Array,\n texture: Texture,\n start: number, size:\n number, matrix:\n Matrix = null): void\n {\n let index = 0;\n const uvsStart = uvs.length;\n const frame = texture.frame;\n\n while (index < size)\n {\n let x = verts[(start + index) * 2];\n let y = verts[((start + index) * 2) + 1];\n\n if (matrix)\n {\n const nx = (matrix.a * x) + (matrix.c * y) + matrix.tx;\n\n y = (matrix.b * x) + (matrix.d * y) + matrix.ty;\n x = nx;\n }\n\n index++;\n\n uvs.push(x / frame.width, y / frame.height);\n }\n\n const baseTexture = texture.baseTexture;\n\n if (frame.width < baseTexture.width\n || frame.height < baseTexture.height)\n {\n this.adjustUvs(uvs, texture, uvsStart, size);\n }\n }\n\n /**\n * Modify uvs array according to position of texture region\n * Does not work with rotated or trimmed textures\n *\n * @param {number[]} uvs - array\n * @param {PIXI.Texture} texture - region\n * @param {number} start - starting index for uvs\n * @param {number} size - how many points to adjust\n */\n protected adjustUvs(uvs: Array, texture: Texture, start: number, size: number): void\n {\n const baseTexture = texture.baseTexture;\n const eps = 1e-6;\n const finish = start + (size * 2);\n const frame = texture.frame;\n const scaleX = frame.width / baseTexture.width;\n const scaleY = frame.height / baseTexture.height;\n let offsetX = frame.x / frame.width;\n let offsetY = frame.y / frame.height;\n let minX = Math.floor(uvs[start] + eps);\n let minY = Math.floor(uvs[start + 1] + eps);\n\n for (let i = start + 2; i < finish; i += 2)\n {\n minX = Math.min(minX, Math.floor(uvs[i] + eps));\n minY = Math.min(minY, Math.floor(uvs[i + 1] + eps));\n }\n offsetX -= minX;\n offsetY -= minY;\n for (let i = start; i < finish; i += 2)\n {\n uvs[i] = (uvs[i] + offsetX) * scaleX;\n uvs[i + 1] = (uvs[i + 1] + offsetY) * scaleY;\n }\n }\n}\n","import { FillStyle } from './FillStyle';\nimport { LINE_JOIN, LINE_CAP } from '../const';\n\n/**\n * Represents the line style for Graphics.\n * @memberof PIXI\n * @class\n * @extends PIXI.FillStyle\n */\nexport class LineStyle extends FillStyle\n{\n /**\n * The width (thickness) of any lines drawn.\n *\n * @member {number}\n * @default 0\n */\n public width = 0;\n\n /**\n * The alignment of any lines drawn (0.5 = middle, 1 = outer, 0 = inner).\n *\n * @member {number}\n * @default 0.5\n */\n public alignment = 0.5;\n\n /**\n * If true the lines will be draw using LINES instead of TRIANGLE_STRIP\n *\n * @member {boolean}\n * @default false\n */\n public native = false;\n\n /**\n * Line cap style.\n *\n * @member {PIXI.LINE_CAP}\n * @default PIXI.LINE_CAP.BUTT\n */\n public cap = LINE_CAP.BUTT;\n\n /**\n * Line join style.\n *\n * @member {PIXI.LINE_JOIN}\n * @default PIXI.LINE_JOIN.MITER\n */\n public join = LINE_JOIN.MITER;\n\n /**\n * Miter limit.\n *\n * @member {number}\n * @default 10\n */\n public miterLimit = 10;\n\n /**\n * Clones the object\n *\n * @return {PIXI.LineStyle}\n */\n public clone(): LineStyle\n {\n const obj = new LineStyle();\n\n obj.color = this.color;\n obj.alpha = this.alpha;\n obj.texture = this.texture;\n obj.matrix = this.matrix;\n obj.visible = this.visible;\n obj.width = this.width;\n obj.alignment = this.alignment;\n obj.native = this.native;\n obj.cap = this.cap;\n obj.join = this.join;\n obj.miterLimit = this.miterLimit;\n\n return obj;\n }\n\n /**\n * Reset the line style to default.\n */\n public reset(): void\n {\n super.reset();\n\n // Override default line style color\n this.color = 0x0;\n\n this.alignment = 0.5;\n this.width = 0;\n this.native = false;\n }\n}\n","import {\n Circle,\n Ellipse,\n PI_2,\n Point,\n Polygon,\n Rectangle,\n RoundedRectangle,\n Matrix,\n SHAPES,\n} from '@pixi/math';\n\nimport { Texture, UniformGroup, State, Renderer, BatchDrawCall } from '@pixi/core';\nimport { BezierUtils, QuadraticUtils, ArcUtils, Star } from './utils';\nimport { hex2rgb, deprecation } from '@pixi/utils';\nimport { GraphicsGeometry } from './GraphicsGeometry';\nimport { FillStyle } from './styles/FillStyle';\nimport { LineStyle } from './styles/LineStyle';\nimport { BLEND_MODES } from '@pixi/constants';\nimport { Container } from '@pixi/display';\nimport { Shader } from '@pixi/core';\n\nimport type { IShape, IPointData } from '@pixi/math';\nimport type { IDestroyOptions } from '@pixi/display';\nimport { LINE_JOIN, LINE_CAP } from './const';\n\n/**\n * Batch element computed from Graphics geometry\n */\nexport interface IGraphicsBatchElement {\n vertexData: Float32Array;\n blendMode: BLEND_MODES;\n indices: Uint16Array | Uint32Array;\n uvs: Float32Array;\n alpha: number;\n worldAlpha: number;\n _batchRGB: number[];\n _tintRGB: number;\n _texture: Texture;\n}\n\nexport interface IFillStyleOptions {\n color?: number;\n alpha?: number;\n texture?: Texture;\n matrix?: Matrix;\n}\n\nexport interface ILineStyleOptions extends IFillStyleOptions {\n width?: number;\n alignment?: number;\n native?: boolean;\n cap?: LINE_CAP;\n join?: LINE_JOIN;\n miterLimit?: number;\n}\n\nconst temp = new Float32Array(3);\n\n// a default shaders map used by graphics..\nconst DEFAULT_SHADERS: {[key: string]: Shader} = {};\n\nexport interface Graphics extends GlobalMixins.Graphics, Container {}\n\n/**\n * The Graphics class contains methods used to draw primitive shapes such as lines, circles and\n * rectangles to the display, and to color and fill them.\n *\n * Note that because Graphics can share a GraphicsGeometry with other instances,\n * it is necessary to call `destroy()` to properly dereference the underlying\n * GraphicsGeometry and avoid a memory leak. Alternatively, keep using the same\n * Graphics instance and call `clear()` between redraws.\n *\n * @class\n * @extends PIXI.Container\n * @memberof PIXI\n */\nexport class Graphics extends Container\n{\n /**\n * Temporary point to use for containsPoint\n *\n * @static\n * @private\n * @member {PIXI.Point}\n */\n\n static _TEMP_POINT = new Point();\n\n public shader: Shader;\n public pluginName: string;\n\n protected currentPath: Polygon;\n protected batches: Array;\n protected batchTint: number;\n protected batchDirty: number;\n protected vertexData: Float32Array;\n\n protected _fillStyle: FillStyle;\n protected _lineStyle: LineStyle;\n protected _matrix: Matrix;\n protected _holeMode: boolean;\n protected _transformID: number;\n protected _tint: number;\n\n private state: State;\n private _geometry: GraphicsGeometry;\n\n /**\n * Includes vertex positions, face indices, normals, colors, UVs, and\n * custom attributes within buffers, reducing the cost of passing all\n * this data to the GPU. Can be shared between multiple Mesh or Graphics objects.\n *\n * @member {PIXI.GraphicsGeometry}\n * @readonly\n */\n public get geometry(): GraphicsGeometry\n {\n return this._geometry;\n }\n\n /**\n * @param {PIXI.GraphicsGeometry} [geometry=null] - Geometry to use, if omitted\n * will create a new GraphicsGeometry instance.\n */\n constructor(geometry: GraphicsGeometry = null)\n {\n super();\n\n this._geometry = geometry || new GraphicsGeometry();\n this._geometry.refCount++;\n\n /**\n * Represents the vertex and fragment shaders that processes the geometry and runs on the GPU.\n * Can be shared between multiple Graphics objects.\n *\n * @member {PIXI.Shader}\n */\n this.shader = null;\n\n /**\n * Represents the WebGL state the Graphics required to render, excludes shader and geometry. E.g.,\n * blend mode, culling, depth testing, direction of rendering triangles, backface, etc.\n *\n * @member {PIXI.State}\n */\n this.state = State.for2d();\n\n /**\n * Current fill style\n *\n * @member {PIXI.FillStyle}\n * @protected\n */\n this._fillStyle = new FillStyle();\n\n /**\n * Current line style\n *\n * @member {PIXI.LineStyle}\n * @protected\n */\n this._lineStyle = new LineStyle();\n\n /**\n * Current shape transform matrix.\n *\n * @member {PIXI.Matrix}\n * @protected\n */\n this._matrix = null;\n\n /**\n * Current hole mode is enabled.\n *\n * @member {boolean}\n * @default false\n * @protected\n */\n this._holeMode = false;\n\n /**\n * Current path\n *\n * @member {PIXI.Polygon}\n * @protected\n */\n this.currentPath = null;\n\n /**\n * When cacheAsBitmap is set to true the graphics object will be rendered as if it was a sprite.\n * This is useful if your graphics element does not change often, as it will speed up the rendering\n * of the object in exchange for taking up texture memory. It is also useful if you need the graphics\n * object to be anti-aliased, because it will be rendered using canvas. This is not recommended if\n * you are constantly redrawing the graphics element.\n *\n * @name cacheAsBitmap\n * @member {boolean}\n * @memberof PIXI.Graphics#\n * @default false\n */\n\n /**\n * A collections of batches! These can be drawn by the renderer batch system.\n *\n * @protected\n * @member {object[]}\n */\n this.batches = [];\n\n /**\n * Update dirty for limiting calculating tints for batches.\n *\n * @protected\n * @member {number}\n * @default -1\n */\n this.batchTint = -1;\n\n /**\n * Update dirty for limiting calculating batches.\n *\n * @protected\n * @member {number}\n * @default -1\n */\n this.batchDirty = -1;\n\n /**\n * Copy of the object vertex data.\n *\n * @protected\n * @member {Float32Array}\n */\n this.vertexData = null;\n\n /**\n * Renderer plugin for batching\n *\n * @member {string}\n * @default 'batch'\n */\n this.pluginName = 'batch';\n\n this._transformID = -1;\n\n // Set default\n this.tint = 0xFFFFFF;\n this.blendMode = BLEND_MODES.NORMAL;\n }\n\n /**\n * Creates a new Graphics object with the same values as this one.\n * Note that only the geometry of the object is cloned, not its transform (position,scale,etc)\n *\n * @return {PIXI.Graphics} A clone of the graphics object\n */\n public clone(): Graphics\n {\n this.finishPoly();\n\n return new Graphics(this._geometry);\n }\n\n /**\n * The blend mode to be applied to the graphic shape. Apply a value of\n * `PIXI.BLEND_MODES.NORMAL` to reset the blend mode.\n *\n * @member {number}\n * @default PIXI.BLEND_MODES.NORMAL;\n * @see PIXI.BLEND_MODES\n */\n public set blendMode(value: BLEND_MODES)\n {\n this.state.blendMode = value;\n }\n\n public get blendMode(): BLEND_MODES\n {\n return this.state.blendMode;\n }\n\n /**\n * The tint applied to the graphic shape. This is a hex value. A value of\n * 0xFFFFFF will remove any tint effect.\n *\n * @member {number}\n * @default 0xFFFFFF\n */\n public get tint(): number\n {\n return this._tint;\n }\n\n public set tint(value: number)\n {\n this._tint = value;\n }\n\n /**\n * The current fill style.\n *\n * @member {PIXI.FillStyle}\n * @readonly\n */\n public get fill(): FillStyle\n {\n return this._fillStyle;\n }\n\n /**\n * The current line style.\n *\n * @member {PIXI.LineStyle}\n * @readonly\n */\n public get line(): LineStyle\n {\n return this._lineStyle;\n }\n\n /**\n * Specifies the line style used for subsequent calls to Graphics methods such as the lineTo()\n * method or the drawCircle() method.\n *\n * @method PIXI.Graphics#lineStyle\n * @param {number} [width=0] - width of the line to draw, will update the objects stored style\n * @param {number} [color=0x0] - color of the line to draw, will update the objects stored style\n * @param {number} [alpha=1] - alpha of the line to draw, will update the objects stored style\n * @param {number} [alignment=0.5] - alignment of the line to draw, (0 = inner, 0.5 = middle, 1 = outter)\n * @param {boolean} [native=false] - If true the lines will be draw using LINES instead of TRIANGLE_STRIP\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\n /**\n * Specifies the line style used for subsequent calls to Graphics methods such as the lineTo()\n * method or the drawCircle() method.\n *\n * @param {object} [options] - Line style options\n * @param {number} [options.width=0] - width of the line to draw, will update the objects stored style\n * @param {number} [options.color=0x0] - color of the line to draw, will update the objects stored style\n * @param {number} [options.alpha=1] - alpha of the line to draw, will update the objects stored style\n * @param {number} [options.alignment=0.5] - alignment of the line to draw, (0 = inner, 0.5 = middle, 1 = outter)\n * @param {boolean} [options.native=false] - If true the lines will be draw using LINES instead of TRIANGLE_STRIP\n * @param {PIXI.LINE_CAP}[options.cap=PIXI.LINE_CAP.BUTT] - line cap style\n * @param {PIXI.LINE_JOIN}[options.join=PIXI.LINE_JOIN.MITER] - line join style\n * @param {number}[options.miterLimit=10] - miter limit ratio\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\n public lineStyle(options: ILineStyleOptions = null): this\n {\n // Support non-object params: (width, color, alpha, alignment, native)\n if (typeof options === 'number')\n {\n // eslint-disable-next-line\n const args = arguments;\n\n options = {\n width: args[0] || 0,\n color: args[1] || 0x0,\n alpha: args[2] !== undefined ? args[2] : 1,\n alignment: args[3] !== undefined ? args[3] : 0.5,\n native: !!args[4],\n };\n }\n\n return this.lineTextureStyle(options);\n }\n\n /**\n * Like line style but support texture for line fill.\n *\n * @param {object} [options] - Collection of options for setting line style.\n * @param {number} [options.width=0] - width of the line to draw, will update the objects stored style\n * @param {PIXI.Texture} [options.texture=PIXI.Texture.WHITE] - Texture to use\n * @param {number} [options.color=0x0] - color of the line to draw, will update the objects stored style.\n * Default 0xFFFFFF if texture present.\n * @param {number} [options.alpha=1] - alpha of the line to draw, will update the objects stored style\n * @param {PIXI.Matrix} [options.matrix=null] - Texture matrix to transform texture\n * @param {number} [options.alignment=0.5] - alignment of the line to draw, (0 = inner, 0.5 = middle, 1 = outter)\n * @param {boolean} [options.native=false] - If true the lines will be draw using LINES instead of TRIANGLE_STRIP\n * @param {PIXI.LINE_CAP}[options.cap=PIXI.LINE_CAP.BUTT] - line cap style\n * @param {PIXI.LINE_JOIN}[options.join=PIXI.LINE_JOIN.MITER] - line join style\n * @param {number}[options.miterLimit=10] - miter limit ratio\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\n public lineTextureStyle(options: ILineStyleOptions): this\n {\n // backward compatibility with params: (width, texture,\n // color, alpha, matrix, alignment, native)\n if (typeof options === 'number')\n {\n deprecation('v5.2.0', 'Please use object-based options for Graphics#lineTextureStyle');\n\n // eslint-disable-next-line\n const [width, texture, color, alpha, matrix, alignment, native] = arguments as any;\n\n options = { width, texture, color, alpha, matrix, alignment, native };\n\n // Remove undefined keys\n Object.keys(options).forEach((key) => (options as any)[key] === undefined && delete (options as any)[key]);\n }\n\n // Apply defaults\n options = Object.assign({\n width: 0,\n texture: Texture.WHITE,\n color: (options && options.texture) ? 0xFFFFFF : 0x0,\n alpha: 1,\n matrix: null,\n alignment: 0.5,\n native: false,\n cap: LINE_CAP.BUTT,\n join: LINE_JOIN.MITER,\n miterLimit: 10,\n }, options);\n\n if (this.currentPath)\n {\n this.startPoly();\n }\n\n const visible = options.width > 0 && options.alpha > 0;\n\n if (!visible)\n {\n this._lineStyle.reset();\n }\n else\n {\n if (options.matrix)\n {\n options.matrix = options.matrix.clone();\n options.matrix.invert();\n }\n\n Object.assign(this._lineStyle, { visible }, options);\n }\n\n return this;\n }\n\n /**\n * Start a polygon object internally\n * @protected\n */\n protected startPoly(): void\n {\n if (this.currentPath)\n {\n const points = this.currentPath.points;\n const len = this.currentPath.points.length;\n\n if (len > 2)\n {\n this.drawShape(this.currentPath);\n this.currentPath = new Polygon();\n this.currentPath.closeStroke = false;\n this.currentPath.points.push(points[len - 2], points[len - 1]);\n }\n }\n else\n {\n this.currentPath = new Polygon();\n this.currentPath.closeStroke = false;\n }\n }\n\n /**\n * Finish the polygon object.\n * @protected\n */\n finishPoly(): void\n {\n if (this.currentPath)\n {\n if (this.currentPath.points.length > 2)\n {\n this.drawShape(this.currentPath);\n this.currentPath = null;\n }\n else\n {\n this.currentPath.points.length = 0;\n }\n }\n }\n\n /**\n * Moves the current drawing position to x, y.\n *\n * @param {number} x - the X coordinate to move to\n * @param {number} y - the Y coordinate to move to\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\n public moveTo(x: number, y: number): this\n {\n this.startPoly();\n this.currentPath.points[0] = x;\n this.currentPath.points[1] = y;\n\n return this;\n }\n\n /**\n * Draws a line using the current line style from the current drawing position to (x, y);\n * The current drawing position is then set to (x, y).\n *\n * @param {number} x - the X coordinate to draw to\n * @param {number} y - the Y coordinate to draw to\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\n public lineTo(x: number, y: number): this\n {\n if (!this.currentPath)\n {\n this.moveTo(0, 0);\n }\n\n // remove duplicates..\n const points = this.currentPath.points;\n const fromX = points[points.length - 2];\n const fromY = points[points.length - 1];\n\n if (fromX !== x || fromY !== y)\n {\n points.push(x, y);\n }\n\n return this;\n }\n\n /**\n * Initialize the curve\n *\n * @protected\n * @param {number} [x=0]\n * @param {number} [y=0]\n */\n protected _initCurve(x = 0, y = 0): void\n {\n if (this.currentPath)\n {\n if (this.currentPath.points.length === 0)\n {\n this.currentPath.points = [x, y];\n }\n }\n else\n {\n this.moveTo(x, y);\n }\n }\n\n /**\n * Calculate the points for a quadratic bezier curve and then draws it.\n * Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c\n *\n * @param {number} cpX - Control point x\n * @param {number} cpY - Control point y\n * @param {number} toX - Destination point x\n * @param {number} toY - Destination point y\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\n public quadraticCurveTo(cpX: number, cpY: number, toX: number, toY: number): this\n {\n this._initCurve();\n\n const points = this.currentPath.points;\n\n if (points.length === 0)\n {\n this.moveTo(0, 0);\n }\n\n QuadraticUtils.curveTo(cpX, cpY, toX, toY, points);\n\n return this;\n }\n\n /**\n * Calculate the points for a bezier curve and then draws it.\n *\n * @param {number} cpX - Control point x\n * @param {number} cpY - Control point y\n * @param {number} cpX2 - Second Control point x\n * @param {number} cpY2 - Second Control point y\n * @param {number} toX - Destination point x\n * @param {number} toY - Destination point y\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\n public bezierCurveTo(cpX: number, cpY: number, cpX2: number, cpY2: number, toX: number, toY: number): this\n {\n this._initCurve();\n\n BezierUtils.curveTo(cpX, cpY, cpX2, cpY2, toX, toY, this.currentPath.points);\n\n return this;\n }\n\n /**\n * The arcTo() method creates an arc/curve between two tangents on the canvas.\n *\n * \"borrowed\" from https://code.google.com/p/fxcanvas/ - thanks google!\n *\n * @param {number} x1 - The x-coordinate of the first tangent point of the arc\n * @param {number} y1 - The y-coordinate of the first tangent point of the arc\n * @param {number} x2 - The x-coordinate of the end of the arc\n * @param {number} y2 - The y-coordinate of the end of the arc\n * @param {number} radius - The radius of the arc\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\n public arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): this\n {\n this._initCurve(x1, y1);\n\n const points = this.currentPath.points;\n\n const result = ArcUtils.curveTo(x1, y1, x2, y2, radius, points);\n\n if (result)\n {\n const { cx, cy, radius, startAngle, endAngle, anticlockwise } = result;\n\n this.arc(cx, cy, radius, startAngle, endAngle, anticlockwise);\n }\n\n return this;\n }\n\n /**\n * The arc method creates an arc/curve (used to create circles, or parts of circles).\n *\n * @param {number} cx - The x-coordinate of the center of the circle\n * @param {number} cy - The y-coordinate of the center of the circle\n * @param {number} radius - The radius of the circle\n * @param {number} startAngle - The starting angle, in radians (0 is at the 3 o'clock position\n * of the arc's circle)\n * @param {number} endAngle - The ending angle, in radians\n * @param {boolean} [anticlockwise=false] - Specifies whether the drawing should be\n * counter-clockwise or clockwise. False is default, and indicates clockwise, while true\n * indicates counter-clockwise.\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\n public arc(cx: number, cy: number, radius: number, startAngle: number, endAngle: number, anticlockwise = false): this\n {\n if (startAngle === endAngle)\n {\n return this;\n }\n\n if (!anticlockwise && endAngle <= startAngle)\n {\n endAngle += PI_2;\n }\n else if (anticlockwise && startAngle <= endAngle)\n {\n startAngle += PI_2;\n }\n\n const sweep = endAngle - startAngle;\n\n if (sweep === 0)\n {\n return this;\n }\n\n const startX = cx + (Math.cos(startAngle) * radius);\n const startY = cy + (Math.sin(startAngle) * radius);\n const eps = this._geometry.closePointEps;\n\n // If the currentPath exists, take its points. Otherwise call `moveTo` to start a path.\n let points = this.currentPath ? this.currentPath.points : null;\n\n if (points)\n {\n // TODO: make a better fix.\n\n // We check how far our start is from the last existing point\n const xDiff = Math.abs(points[points.length - 2] - startX);\n const yDiff = Math.abs(points[points.length - 1] - startY);\n\n if (xDiff < eps && yDiff < eps)\n {\n // If the point is very close, we don't add it, since this would lead to artifacts\n // during tessellation due to floating point imprecision.\n }\n else\n {\n points.push(startX, startY);\n }\n }\n else\n {\n this.moveTo(startX, startY);\n points = this.currentPath.points;\n }\n\n ArcUtils.arc(startX, startY, cx, cy, radius, startAngle, endAngle, anticlockwise, points);\n\n return this;\n }\n\n /**\n * Specifies a simple one-color fill that subsequent calls to other Graphics methods\n * (such as lineTo() or drawCircle()) use when drawing.\n *\n * @param {number} [color=0] - the color of the fill\n * @param {number} [alpha=1] - the alpha of the fill\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\n public beginFill(color = 0, alpha = 1): this\n {\n return this.beginTextureFill({ texture: Texture.WHITE, color, alpha });\n }\n\n /**\n * Begin the texture fill\n *\n * @param {object} [options] - Object object.\n * @param {PIXI.Texture} [options.texture=PIXI.Texture.WHITE] - Texture to fill\n * @param {number} [options.color=0xffffff] - Background to fill behind texture\n * @param {number} [options.alpha=1] - Alpha of fill\n * @param {PIXI.Matrix} [options.matrix=null] - Transform matrix\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\n beginTextureFill(options: IFillStyleOptions): this\n {\n // backward compatibility with params: (texture, color, alpha, matrix)\n if (options instanceof Texture)\n {\n deprecation('v5.2.0', 'Please use object-based options for Graphics#beginTextureFill');\n\n // eslint-disable-next-line\n const [texture, color, alpha, matrix] = arguments as any;\n\n options = { texture, color, alpha, matrix };\n\n // Remove undefined keys\n Object.keys(options).forEach((key) => (options as any)[key] === undefined && delete (options as any)[key]);\n }\n\n // Apply defaults\n options = Object.assign({\n texture: Texture.WHITE,\n color: 0xFFFFFF,\n alpha: 1,\n matrix: null,\n }, options) as IFillStyleOptions;\n\n if (this.currentPath)\n {\n this.startPoly();\n }\n\n const visible = options.alpha > 0;\n\n if (!visible)\n {\n this._fillStyle.reset();\n }\n else\n {\n if (options.matrix)\n {\n options.matrix = options.matrix.clone();\n options.matrix.invert();\n }\n\n Object.assign(this._fillStyle, { visible }, options);\n }\n\n return this;\n }\n\n /**\n * Applies a fill to the lines and shapes that were added since the last call to the beginFill() method.\n *\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\n public endFill(): this\n {\n this.finishPoly();\n\n this._fillStyle.reset();\n\n return this;\n }\n\n /**\n * Draws a rectangle shape.\n *\n * @param {number} x - The X coord of the top-left of the rectangle\n * @param {number} y - The Y coord of the top-left of the rectangle\n * @param {number} width - The width of the rectangle\n * @param {number} height - The height of the rectangle\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\n public drawRect(x: number, y: number, width: number, height: number): this\n {\n return this.drawShape(new Rectangle(x, y, width, height));\n }\n\n /**\n * Draw a rectangle shape with rounded/beveled corners.\n *\n * @param {number} x - The X coord of the top-left of the rectangle\n * @param {number} y - The Y coord of the top-left of the rectangle\n * @param {number} width - The width of the rectangle\n * @param {number} height - The height of the rectangle\n * @param {number} radius - Radius of the rectangle corners\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\n public drawRoundedRect(x: number, y: number, width: number, height: number, radius: number): this\n {\n return this.drawShape(new RoundedRectangle(x, y, width, height, radius));\n }\n\n /**\n * Draws a circle.\n *\n * @param {number} x - The X coordinate of the center of the circle\n * @param {number} y - The Y coordinate of the center of the circle\n * @param {number} radius - The radius of the circle\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\n public drawCircle(x: number, y: number, radius: number): this\n {\n return this.drawShape(new Circle(x, y, radius));\n }\n\n /**\n * Draws an ellipse.\n *\n * @param {number} x - The X coordinate of the center of the ellipse\n * @param {number} y - The Y coordinate of the center of the ellipse\n * @param {number} width - The half width of the ellipse\n * @param {number} height - The half height of the ellipse\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\n public drawEllipse(x: number, y: number, width: number, height: number): this\n {\n return this.drawShape(new Ellipse(x, y, width, height));\n }\n\n public drawPolygon(...path: Array | Array): this\n public drawPolygon(path: Array | Array | Polygon): this\n\n /**\n * Draws a polygon using the given path.\n *\n * @param {number[]|PIXI.Point[]|PIXI.Polygon} path - The path data used to construct the polygon.\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\n public drawPolygon(...path: any[]): this\n {\n let points: Array | Array;\n let closeStroke = true;// !!this._fillStyle;\n\n const poly = path[0] as Polygon;\n\n // check if data has points..\n if (poly.points)\n {\n closeStroke = poly.closeStroke;\n points = poly.points;\n }\n else\n if (Array.isArray(path[0]))\n {\n points = path[0];\n }\n else\n {\n points = path;\n }\n\n const shape = new Polygon(points);\n\n shape.closeStroke = closeStroke;\n\n this.drawShape(shape);\n\n return this;\n }\n\n /**\n * Draw any shape.\n *\n * @param {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} shape - Shape to draw\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\n public drawShape(shape: IShape): this\n {\n if (!this._holeMode)\n {\n this._geometry.drawShape(\n shape,\n this._fillStyle.clone(),\n this._lineStyle.clone(),\n this._matrix\n );\n }\n else\n {\n this._geometry.drawHole(shape, this._matrix);\n }\n\n return this;\n }\n\n /**\n * Draw a star shape with an arbitrary number of points.\n *\n * @param {number} x - Center X position of the star\n * @param {number} y - Center Y position of the star\n * @param {number} points - The number of points of the star, must be > 1\n * @param {number} radius - The outer radius of the star\n * @param {number} [innerRadius] - The inner radius between points, default half `radius`\n * @param {number} [rotation=0] - The rotation of the star in radians, where 0 is vertical\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\n public drawStar(x: number, y: number, points: number, radius: number, innerRadius: number, rotation = 0): this\n {\n return this.drawPolygon(new Star(x, y, points, radius, innerRadius, rotation) as Polygon);\n }\n\n /**\n * Clears the graphics that were drawn to this Graphics object, and resets fill and line style settings.\n *\n * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls\n */\n public clear(): this\n {\n this._geometry.clear();\n this._lineStyle.reset();\n this._fillStyle.reset();\n\n this._boundsID++;\n this._matrix = null;\n this._holeMode = false;\n this.currentPath = null;\n\n return this;\n }\n\n /**\n * True if graphics consists of one rectangle, and thus, can be drawn like a Sprite and\n * masked with gl.scissor.\n *\n * @returns {boolean} True if only 1 rect.\n */\n public isFastRect(): boolean\n {\n const data = this._geometry.graphicsData;\n\n return data.length === 1\n && data[0].shape.type === SHAPES.RECT\n && !(data[0].lineStyle.visible && data[0].lineStyle.width);\n }\n\n /**\n * Renders the object using the WebGL renderer\n *\n * @protected\n * @param {PIXI.Renderer} renderer - The renderer\n */\n protected _render(renderer: Renderer): void\n {\n this.finishPoly();\n\n const geometry = this._geometry;\n const hasuit32 = renderer.context.supports.uint32Indices;\n // batch part..\n // batch it!\n\n geometry.updateBatches(hasuit32);\n\n if (geometry.batchable)\n {\n if (this.batchDirty !== geometry.batchDirty)\n {\n this._populateBatches();\n }\n\n this._renderBatched(renderer);\n }\n else\n {\n // no batching...\n renderer.batch.flush();\n\n this._renderDirect(renderer);\n }\n }\n\n /**\n * Populating batches for rendering\n *\n * @protected\n */\n protected _populateBatches(): void\n {\n const geometry = this._geometry;\n const blendMode = this.blendMode;\n const len = geometry.batches.length;\n\n this.batchTint = -1;\n this._transformID = -1;\n this.batchDirty = geometry.batchDirty;\n this.batches.length = len;\n\n this.vertexData = new Float32Array(geometry.points);\n\n for (let i = 0; i < len; i++)\n {\n const gI = geometry.batches[i];\n const color = gI.style.color;\n const vertexData = new Float32Array(this.vertexData.buffer,\n gI.attribStart * 4 * 2,\n gI.attribSize * 2);\n\n const uvs = new Float32Array(geometry.uvsFloat32.buffer,\n gI.attribStart * 4 * 2,\n gI.attribSize * 2);\n\n const indices = new Uint16Array(geometry.indicesUint16.buffer,\n gI.start * 2,\n gI.size);\n\n const batch = {\n vertexData,\n blendMode,\n indices,\n uvs,\n _batchRGB: hex2rgb(color) as Array,\n _tintRGB: color,\n _texture: gI.style.texture,\n alpha: gI.style.alpha,\n worldAlpha: 1 };\n\n this.batches[i] = batch;\n }\n }\n\n /**\n * Renders the batches using the BathedRenderer plugin\n *\n * @protected\n * @param {PIXI.Renderer} renderer - The renderer\n */\n protected _renderBatched(renderer: Renderer): void\n {\n if (!this.batches.length)\n {\n return;\n }\n\n renderer.batch.setObjectRenderer(renderer.plugins[this.pluginName]);\n\n this.calculateVertices();\n this.calculateTints();\n\n for (let i = 0, l = this.batches.length; i < l; i++)\n {\n const batch = this.batches[i];\n\n batch.worldAlpha = this.worldAlpha * batch.alpha;\n\n renderer.plugins[this.pluginName].render(batch);\n }\n }\n\n /**\n * Renders the graphics direct\n *\n * @protected\n * @param {PIXI.Renderer} renderer - The renderer\n */\n protected _renderDirect(renderer: Renderer): void\n {\n const shader = this._resolveDirectShader(renderer);\n\n const geometry = this._geometry;\n const tint = this.tint;\n const worldAlpha = this.worldAlpha;\n const uniforms = shader.uniforms;\n const drawCalls = geometry.drawCalls;\n\n // lets set the transfomr\n uniforms.translationMatrix = this.transform.worldTransform;\n\n // and then lets set the tint..\n uniforms.tint[0] = (((tint >> 16) & 0xFF) / 255) * worldAlpha;\n uniforms.tint[1] = (((tint >> 8) & 0xFF) / 255) * worldAlpha;\n uniforms.tint[2] = ((tint & 0xFF) / 255) * worldAlpha;\n uniforms.tint[3] = worldAlpha;\n\n // the first draw call, we can set the uniforms of the shader directly here.\n\n // this means that we can tack advantage of the sync function of pixi!\n // bind and sync uniforms..\n // there is a way to optimise this..\n renderer.shader.bind(shader);\n renderer.geometry.bind(geometry, shader);\n\n // set state..\n renderer.state.set(this.state);\n\n // then render the rest of them...\n for (let i = 0, l = drawCalls.length; i < l; i++)\n {\n this._renderDrawCallDirect(renderer, geometry.drawCalls[i]);\n }\n }\n\n /**\n * Renders specific DrawCall\n *\n * @param {PIXI.Renderer} renderer\n * @param {PIXI.BatchDrawCall} drawCall\n */\n protected _renderDrawCallDirect(renderer: Renderer, drawCall: BatchDrawCall): void\n {\n const { texArray, type, size, start } = drawCall;\n const groupTextureCount = texArray.count;\n\n for (let j = 0; j < groupTextureCount; j++)\n {\n renderer.texture.bind(texArray.elements[j], j);\n }\n\n renderer.geometry.draw(type, size, start);\n }\n\n /**\n * Resolves shader for direct rendering\n *\n * @protected\n * @param {PIXI.Renderer} renderer - The renderer\n */\n protected _resolveDirectShader(renderer: Renderer): Shader\n {\n let shader = this.shader;\n\n const pluginName = this.pluginName;\n\n if (!shader)\n {\n // if there is no shader here, we can use the default shader.\n // and that only gets created if we actually need it..\n // but may be more than one plugins for graphics\n if (!DEFAULT_SHADERS[pluginName])\n {\n const sampleValues = new Int32Array(16);\n\n for (let i = 0; i < 16; i++)\n {\n sampleValues[i] = i;\n }\n\n const uniforms = {\n tint: new Float32Array([1, 1, 1, 1]),\n translationMatrix: new Matrix(),\n default: UniformGroup.from({ uSamplers: sampleValues }, true),\n };\n\n const program = renderer.plugins[pluginName]._shader.program;\n\n DEFAULT_SHADERS[pluginName] = new Shader(program, uniforms);\n }\n\n shader = DEFAULT_SHADERS[pluginName];\n }\n\n return shader;\n }\n\n /**\n * Retrieves the bounds of the graphic shape as a rectangle object\n *\n * @protected\n */\n protected _calculateBounds(): void\n {\n this.finishPoly();\n\n const geometry = this._geometry;\n\n // skipping when graphics is empty, like a container\n if (!geometry.graphicsData.length)\n {\n return;\n }\n\n const { minX, minY, maxX, maxY } = geometry.bounds;\n\n this._bounds.addFrame(this.transform, minX, minY, maxX, maxY);\n }\n\n /**\n * Tests if a point is inside this graphics object\n *\n * @param {PIXI.IPointData} point - the point to test\n * @return {boolean} the result of the test\n */\n public containsPoint(point: IPointData): boolean\n {\n this.worldTransform.applyInverse(point, Graphics._TEMP_POINT);\n\n return this._geometry.containsPoint(Graphics._TEMP_POINT);\n }\n\n /**\n * Recalcuate the tint by applying tin to batches using Graphics tint.\n * @protected\n */\n protected calculateTints(): void\n {\n if (this.batchTint !== this.tint)\n {\n this.batchTint = this.tint;\n\n const tintRGB = hex2rgb(this.tint, temp);\n\n for (let i = 0; i < this.batches.length; i++)\n {\n const batch = this.batches[i];\n\n const batchTint = batch._batchRGB;\n\n const r = (tintRGB[0] * batchTint[0]) * 255;\n const g = (tintRGB[1] * batchTint[1]) * 255;\n const b = (tintRGB[2] * batchTint[2]) * 255;\n\n // TODO Ivan, can this be done in one go?\n const color = (r << 16) + (g << 8) + (b | 0);\n\n batch._tintRGB = (color >> 16)\n + (color & 0xff00)\n + ((color & 0xff) << 16);\n }\n }\n }\n\n /**\n * If there's a transform update or a change to the shape of the\n * geometry, recaculate the vertices.\n * @protected\n */\n protected calculateVertices(): void\n {\n const wtID = this.transform._worldID;\n\n if (this._transformID === wtID)\n {\n return;\n }\n\n this._transformID = wtID;\n\n const wt = this.transform.worldTransform;\n const a = wt.a;\n const b = wt.b;\n const c = wt.c;\n const d = wt.d;\n const tx = wt.tx;\n const ty = wt.ty;\n\n const data = this._geometry.points;// batch.vertexDataOriginal;\n const vertexData = this.vertexData;\n\n let count = 0;\n\n for (let i = 0; i < data.length; i += 2)\n {\n const x = data[i];\n const y = data[i + 1];\n\n vertexData[count++] = (a * x) + (c * y) + tx;\n vertexData[count++] = (d * y) + (b * x) + ty;\n }\n }\n\n /**\n * Closes the current path.\n *\n * @return {PIXI.Graphics} Returns itself.\n */\n public closePath(): this\n {\n const currentPath = this.currentPath;\n\n if (currentPath)\n {\n // we don't need to add extra point in the end because buildLine will take care of that\n currentPath.closeStroke = true;\n }\n\n return this;\n }\n\n /**\n * Apply a matrix to the positional data.\n *\n * @param {PIXI.Matrix} matrix - Matrix to use for transform current shape.\n * @return {PIXI.Graphics} Returns itself.\n */\n public setMatrix(matrix: Matrix): this\n {\n this._matrix = matrix;\n\n return this;\n }\n\n /**\n * Begin adding holes to the last draw shape\n * IMPORTANT: holes must be fully inside a shape to work\n * Also weirdness ensues if holes overlap!\n * Ellipses, Circles, Rectangles and Rounded Rectangles cannot be holes or host for holes in CanvasRenderer,\n * please use `moveTo` `lineTo`, `quadraticCurveTo` if you rely on pixi-legacy bundle.\n * @return {PIXI.Graphics} Returns itself.\n */\n public beginHole(): this\n {\n this.finishPoly();\n this._holeMode = true;\n\n return this;\n }\n\n /**\n * End adding holes to the last draw shape\n * @return {PIXI.Graphics} Returns itself.\n */\n public endHole(): this\n {\n this.finishPoly();\n this._holeMode = false;\n\n return this;\n }\n\n /**\n * Destroys the Graphics object.\n *\n * @param {object|boolean} [options] - Options parameter. A boolean will act as if all\n * options have been set to that value\n * @param {boolean} [options.children=false] - if set to true, all the children will have\n * their destroy method called as well. 'options' will be passed on to those calls.\n * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true\n * Should it destroy the texture of the child sprite\n * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true\n * Should it destroy the base texture of the child sprite\n */\n public destroy(options: IDestroyOptions|boolean): void\n {\n super.destroy(options);\n\n this._geometry.refCount--;\n if (this._geometry.refCount === 0)\n {\n this._geometry.dispose();\n }\n\n this._matrix = null;\n this.currentPath = null;\n this._lineStyle.destroy();\n this._lineStyle = null;\n this._fillStyle.destroy();\n this._fillStyle = null;\n this._geometry = null;\n this.shader = null;\n this.vertexData = null;\n this.batches.length = 0;\n this.batches = null;\n\n super.destroy(options);\n }\n}\n","import { BLEND_MODES } from '@pixi/constants';\nimport { Texture } from '@pixi/core';\nimport { Container } from '@pixi/display';\nimport { ObservablePoint, Point, Rectangle } from '@pixi/math';\nimport { settings } from '@pixi/settings';\nimport { sign } from '@pixi/utils';\n\nimport type { IBaseTextureOptions, Renderer, TextureSource } from '@pixi/core';\nimport type { IDestroyOptions } from '@pixi/display';\nimport type { IPointData } from '@pixi/math';\n\nconst tempPoint = new Point();\nconst indices = new Uint16Array([0, 1, 2, 0, 2, 3]);\n\nexport type SpriteSource = TextureSource|Texture;\n\nexport interface Sprite extends GlobalMixins.Sprite, Container {}\n\n/**\n * The Sprite object is the base for all textured objects that are rendered to the screen\n*\n * A sprite can be created directly from an image like this:\n *\n * ```js\n * let sprite = PIXI.Sprite.from('assets/image.png');\n * ```\n *\n * The more efficient way to create sprites is using a {@link PIXI.Spritesheet},\n * as swapping base textures when rendering to the screen is inefficient.\n *\n * ```js\n * PIXI.Loader.shared.add(\"assets/spritesheet.json\").load(setup);\n *\n * function setup() {\n * let sheet = PIXI.Loader.shared.resources[\"assets/spritesheet.json\"].spritesheet;\n * let sprite = new PIXI.Sprite(sheet.textures[\"image.png\"]);\n * ...\n * }\n * ```\n *\n * @class\n * @extends PIXI.Container\n * @memberof PIXI\n */\nexport class Sprite extends Container\n{\n public blendMode: BLEND_MODES;\n public indices: Uint16Array;\n public pluginName: string;\n\n _width: number;\n _height: number;\n _texture: Texture;\n _textureID: number;\n _cachedTint: number;\n protected _textureTrimmedID: number;\n protected uvs: Float32Array;\n protected _anchor: ObservablePoint;\n protected vertexData: Float32Array;\n\n private vertexTrimmedData: Float32Array;\n private _roundPixels: boolean;\n private _transformID: number;\n private _transformTrimmedID: number;\n private _tint: number;\n\n // Internal-only properties\n _tintRGB: number;\n\n /**\n * @param {PIXI.Texture} [texture] - The texture for this sprite.\n */\n constructor(texture: Texture)\n {\n super();\n\n /**\n * The anchor point defines the normalized coordinates\n * in the texture that map to the position of this\n * sprite.\n *\n * By default, this is `(0,0)` (or `texture.defaultAnchor`\n * if you have modified that), which means the position\n * `(x,y)` of this `Sprite` will be the top-left corner.\n *\n * Note: Updating `texture.defaultAnchor` after\n * constructing a `Sprite` does _not_ update its anchor.\n *\n * {@link https://docs.cocos2d-x.org/cocos2d-x/en/sprites/manipulation.html}\n *\n * @default `texture.defaultAnchor`\n * @member {PIXI.ObservablePoint}\n * @private\n */\n this._anchor = new ObservablePoint(\n this._onAnchorUpdate,\n this,\n (texture ? texture.defaultAnchor.x : 0),\n (texture ? texture.defaultAnchor.y : 0)\n );\n\n /**\n * The texture that the sprite is using\n *\n * @private\n * @member {PIXI.Texture}\n */\n this._texture = null;\n\n /**\n * The width of the sprite (this is initially set by the texture)\n *\n * @protected\n * @member {number}\n */\n this._width = 0;\n\n /**\n * The height of the sprite (this is initially set by the texture)\n *\n * @protected\n * @member {number}\n */\n this._height = 0;\n\n /**\n * The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.\n *\n * @private\n * @member {number}\n * @default 0xFFFFFF\n */\n this._tint = null;\n\n /**\n * The tint applied to the sprite. This is a RGB value. A value of 0xFFFFFF will remove any tint effect.\n *\n * @private\n * @member {number}\n * @default 16777215\n */\n this._tintRGB = null;\n\n this.tint = 0xFFFFFF;\n\n /**\n * The blend mode to be applied to the sprite. Apply a value of `PIXI.BLEND_MODES.NORMAL` to reset the blend mode.\n *\n * @member {number}\n * @default PIXI.BLEND_MODES.NORMAL\n * @see PIXI.BLEND_MODES\n */\n this.blendMode = BLEND_MODES.NORMAL;\n\n /**\n * Cached tint value so we can tell when the tint is changed.\n * Value is used for 2d CanvasRenderer.\n *\n * @protected\n * @member {number}\n * @default 0xFFFFFF\n */\n this._cachedTint = 0xFFFFFF;\n\n /**\n * this is used to store the uvs data of the sprite, assigned at the same time\n * as the vertexData in calculateVertices()\n *\n * @private\n * @member {Float32Array}\n */\n this.uvs = null;\n\n // call texture setter\n this.texture = texture || Texture.EMPTY;\n\n /**\n * this is used to store the vertex data of the sprite (basically a quad)\n *\n * @private\n * @member {Float32Array}\n */\n this.vertexData = new Float32Array(8);\n\n /**\n * This is used to calculate the bounds of the object IF it is a trimmed sprite\n *\n * @private\n * @member {Float32Array}\n */\n this.vertexTrimmedData = null;\n\n this._transformID = -1;\n this._textureID = -1;\n\n this._transformTrimmedID = -1;\n this._textureTrimmedID = -1;\n\n // Batchable stuff..\n // TODO could make this a mixin?\n this.indices = indices;\n\n /**\n * Plugin that is responsible for rendering this element.\n * Allows to customize the rendering process without overriding '_render' & '_renderCanvas' methods.\n *\n * @member {string}\n * @default 'batch'\n */\n this.pluginName = 'batch';\n\n /**\n * used to fast check if a sprite is.. a sprite!\n * @member {boolean}\n */\n this.isSprite = true;\n\n /**\n * Internal roundPixels field\n *\n * @member {boolean}\n * @private\n */\n this._roundPixels = settings.ROUND_PIXELS;\n }\n\n /**\n * When the texture is updated, this event will fire to update the scale and frame\n *\n * @protected\n */\n protected _onTextureUpdate(): void\n {\n this._textureID = -1;\n this._textureTrimmedID = -1;\n this._cachedTint = 0xFFFFFF;\n\n // so if _width is 0 then width was not set..\n if (this._width)\n {\n this.scale.x = sign(this.scale.x) * this._width / this._texture.orig.width;\n }\n\n if (this._height)\n {\n this.scale.y = sign(this.scale.y) * this._height / this._texture.orig.height;\n }\n }\n\n /**\n * Called when the anchor position updates.\n *\n * @private\n */\n private _onAnchorUpdate(): void\n {\n this._transformID = -1;\n this._transformTrimmedID = -1;\n }\n\n /**\n * calculates worldTransform * vertices, store it in vertexData\n */\n public calculateVertices(): void\n {\n const texture = this._texture;\n\n if (this._transformID === this.transform._worldID && this._textureID === texture._updateID)\n {\n return;\n }\n\n // update texture UV here, because base texture can be changed without calling `_onTextureUpdate`\n if (this._textureID !== texture._updateID)\n {\n this.uvs = this._texture._uvs.uvsFloat32;\n }\n\n this._transformID = this.transform._worldID;\n this._textureID = texture._updateID;\n\n // set the vertex data\n\n const wt = this.transform.worldTransform;\n const a = wt.a;\n const b = wt.b;\n const c = wt.c;\n const d = wt.d;\n const tx = wt.tx;\n const ty = wt.ty;\n const vertexData = this.vertexData;\n const trim = texture.trim;\n const orig = texture.orig;\n const anchor = this._anchor;\n\n let w0 = 0;\n let w1 = 0;\n let h0 = 0;\n let h1 = 0;\n\n if (trim)\n {\n // if the sprite is trimmed and is not a tilingsprite then we need to add the extra\n // space before transforming the sprite coords.\n w1 = trim.x - (anchor._x * orig.width);\n w0 = w1 + trim.width;\n\n h1 = trim.y - (anchor._y * orig.height);\n h0 = h1 + trim.height;\n }\n else\n {\n w1 = -anchor._x * orig.width;\n w0 = w1 + orig.width;\n\n h1 = -anchor._y * orig.height;\n h0 = h1 + orig.height;\n }\n\n // xy\n vertexData[0] = (a * w1) + (c * h1) + tx;\n vertexData[1] = (d * h1) + (b * w1) + ty;\n\n // xy\n vertexData[2] = (a * w0) + (c * h1) + tx;\n vertexData[3] = (d * h1) + (b * w0) + ty;\n\n // xy\n vertexData[4] = (a * w0) + (c * h0) + tx;\n vertexData[5] = (d * h0) + (b * w0) + ty;\n\n // xy\n vertexData[6] = (a * w1) + (c * h0) + tx;\n vertexData[7] = (d * h0) + (b * w1) + ty;\n\n if (this._roundPixels)\n {\n const resolution = settings.RESOLUTION;\n\n for (let i = 0; i < vertexData.length; ++i)\n {\n vertexData[i] = Math.round((vertexData[i] * resolution | 0) / resolution);\n }\n }\n }\n\n /**\n * calculates worldTransform * vertices for a non texture with a trim. store it in vertexTrimmedData\n * This is used to ensure that the true width and height of a trimmed texture is respected\n */\n public calculateTrimmedVertices(): void\n {\n if (!this.vertexTrimmedData)\n {\n this.vertexTrimmedData = new Float32Array(8);\n }\n else if (this._transformTrimmedID === this.transform._worldID && this._textureTrimmedID === this._texture._updateID)\n {\n return;\n }\n\n this._transformTrimmedID = this.transform._worldID;\n this._textureTrimmedID = this._texture._updateID;\n\n // lets do some special trim code!\n const texture = this._texture;\n const vertexData = this.vertexTrimmedData;\n const orig = texture.orig;\n const anchor = this._anchor;\n\n // lets calculate the new untrimmed bounds..\n const wt = this.transform.worldTransform;\n const a = wt.a;\n const b = wt.b;\n const c = wt.c;\n const d = wt.d;\n const tx = wt.tx;\n const ty = wt.ty;\n\n const w1 = -anchor._x * orig.width;\n const w0 = w1 + orig.width;\n\n const h1 = -anchor._y * orig.height;\n const h0 = h1 + orig.height;\n\n // xy\n vertexData[0] = (a * w1) + (c * h1) + tx;\n vertexData[1] = (d * h1) + (b * w1) + ty;\n\n // xy\n vertexData[2] = (a * w0) + (c * h1) + tx;\n vertexData[3] = (d * h1) + (b * w0) + ty;\n\n // xy\n vertexData[4] = (a * w0) + (c * h0) + tx;\n vertexData[5] = (d * h0) + (b * w0) + ty;\n\n // xy\n vertexData[6] = (a * w1) + (c * h0) + tx;\n vertexData[7] = (d * h0) + (b * w1) + ty;\n }\n\n /**\n *\n * Renders the object using the WebGL renderer\n *\n * @protected\n * @param {PIXI.Renderer} renderer - The webgl renderer to use.\n */\n protected _render(renderer: Renderer): void\n {\n this.calculateVertices();\n\n renderer.batch.setObjectRenderer(renderer.plugins[this.pluginName]);\n renderer.plugins[this.pluginName].render(this);\n }\n\n /**\n * Updates the bounds of the sprite.\n *\n * @protected\n */\n protected _calculateBounds(): void\n {\n const trim = this._texture.trim;\n const orig = this._texture.orig;\n\n // First lets check to see if the current texture has a trim..\n if (!trim || (trim.width === orig.width && trim.height === orig.height))\n {\n // no trim! lets use the usual calculations..\n this.calculateVertices();\n this._bounds.addQuad(this.vertexData);\n }\n else\n {\n // lets calculate a special trimmed bounds...\n this.calculateTrimmedVertices();\n this._bounds.addQuad(this.vertexTrimmedData);\n }\n }\n\n /**\n * Gets the local bounds of the sprite object.\n *\n * @param {PIXI.Rectangle} [rect] - The output rectangle.\n * @return {PIXI.Rectangle} The bounds.\n */\n public getLocalBounds(rect: Rectangle): Rectangle\n {\n // we can do a fast local bounds if the sprite has no children!\n if (this.children.length === 0)\n {\n this._bounds.minX = this._texture.orig.width * -this._anchor._x;\n this._bounds.minY = this._texture.orig.height * -this._anchor._y;\n this._bounds.maxX = this._texture.orig.width * (1 - this._anchor._x);\n this._bounds.maxY = this._texture.orig.height * (1 - this._anchor._y);\n\n if (!rect)\n {\n if (!this._localBoundsRect)\n {\n this._localBoundsRect = new Rectangle();\n }\n\n rect = this._localBoundsRect;\n }\n\n return this._bounds.getRectangle(rect);\n }\n\n return super.getLocalBounds.call(this, rect);\n }\n\n /**\n * Tests if a point is inside this sprite\n *\n * @param {PIXI.IPointData} point - the point to test\n * @return {boolean} the result of the test\n */\n public containsPoint(point: IPointData): boolean\n {\n this.worldTransform.applyInverse(point, tempPoint);\n\n const width = this._texture.orig.width;\n const height = this._texture.orig.height;\n const x1 = -width * this.anchor.x;\n let y1 = 0;\n\n if (tempPoint.x >= x1 && tempPoint.x < x1 + width)\n {\n y1 = -height * this.anchor.y;\n\n if (tempPoint.y >= y1 && tempPoint.y < y1 + height)\n {\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Destroys this sprite and optionally its texture and children\n *\n * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options\n * have been set to that value\n * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy\n * method called as well. 'options' will be passed on to those calls.\n * @param {boolean} [options.texture=false] - Should it destroy the current texture of the sprite as well\n * @param {boolean} [options.baseTexture=false] - Should it destroy the base texture of the sprite as well\n */\n public destroy(options: IDestroyOptions|boolean): void\n {\n super.destroy(options);\n\n this._texture.off('update', this._onTextureUpdate, this);\n\n this._anchor = null;\n\n const destroyTexture = typeof options === 'boolean' ? options : options && options.texture;\n\n if (destroyTexture)\n {\n const destroyBaseTexture = typeof options === 'boolean' ? options : options && options.baseTexture;\n\n this._texture.destroy(!!destroyBaseTexture);\n }\n\n this._texture = null;\n }\n\n // some helper functions..\n\n /**\n * Helper function that creates a new sprite based on the source you provide.\n * The source can be - frame id, image url, video url, canvas element, video element, base texture\n *\n * @static\n * @param {string|PIXI.Texture|HTMLCanvasElement|HTMLVideoElement} source - Source to create texture from\n * @param {object} [options] - See {@link PIXI.BaseTexture}'s constructor for options.\n * @return {PIXI.Sprite} The newly created sprite\n */\n static from(source: SpriteSource, options: IBaseTextureOptions): Sprite\n {\n const texture = (source instanceof Texture)\n ? source\n : Texture.from(source, options);\n\n return new Sprite(texture);\n }\n\n /**\n * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation.\n * Advantages can include sharper image quality (like text) and faster rendering on canvas.\n * The main disadvantage is movement of objects may appear less smooth.\n * To set the global default, change {@link PIXI.settings.ROUND_PIXELS}\n *\n * @member {boolean}\n * @default false\n */\n set roundPixels(value: boolean)\n {\n if (this._roundPixels !== value)\n {\n this._transformID = -1;\n }\n this._roundPixels = value;\n }\n\n get roundPixels(): boolean\n {\n return this._roundPixels;\n }\n\n /**\n * The width of the sprite, setting this will actually modify the scale to achieve the value set\n *\n * @member {number}\n */\n get width(): number\n {\n return Math.abs(this.scale.x) * this._texture.orig.width;\n }\n\n set width(value: number)\n {\n const s = sign(this.scale.x) || 1;\n\n this.scale.x = s * value / this._texture.orig.width;\n this._width = value;\n }\n\n /**\n * The height of the sprite, setting this will actually modify the scale to achieve the value set\n *\n * @member {number}\n */\n get height(): number\n {\n return Math.abs(this.scale.y) * this._texture.orig.height;\n }\n\n set height(value: number)\n {\n const s = sign(this.scale.y) || 1;\n\n this.scale.y = s * value / this._texture.orig.height;\n this._height = value;\n }\n\n /**\n * The anchor sets the origin point of the sprite. The default value is taken from the {@link PIXI.Texture|Texture}\n * and passed to the constructor.\n *\n * The default is `(0,0)`, this means the sprite's origin is the top left.\n *\n * Setting the anchor to `(0.5,0.5)` means the sprite's origin is centered.\n *\n * Setting the anchor to `(1,1)` would mean the sprite's origin point will be the bottom right corner.\n *\n * If you pass only single parameter, it will set both x and y to the same value as shown in the example below.\n *\n * @example\n * const sprite = new PIXI.Sprite(texture);\n * sprite.anchor.set(0.5); // This will set the origin to center. (0.5) is same as (0.5, 0.5).\n *\n * @member {PIXI.ObservablePoint}\n */\n get anchor(): ObservablePoint\n {\n return this._anchor;\n }\n\n set anchor(value: ObservablePoint)\n {\n this._anchor.copyFrom(value);\n }\n\n /**\n * The tint applied to the sprite. This is a hex value.\n * A value of 0xFFFFFF will remove any tint effect.\n *\n * @member {number}\n * @default 0xFFFFFF\n */\n get tint(): number\n {\n return this._tint;\n }\n\n set tint(value: number)\n {\n this._tint = value;\n this._tintRGB = (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16);\n }\n\n /**\n * The texture that the sprite is using\n *\n * @member {PIXI.Texture}\n */\n get texture(): Texture\n {\n return this._texture;\n }\n\n set texture(value: Texture)\n {\n if (this._texture === value)\n {\n return;\n }\n\n if (this._texture)\n {\n this._texture.off('update', this._onTextureUpdate, this);\n }\n\n this._texture = value || Texture.EMPTY;\n this._cachedTint = 0xFFFFFF;\n\n this._textureID = -1;\n this._textureTrimmedID = -1;\n\n if (value)\n {\n // wait for the texture to load\n if (value.baseTexture.valid)\n {\n this._onTextureUpdate();\n }\n else\n {\n value.once('update', this._onTextureUpdate, this);\n }\n }\n }\n}\n","// disabling eslint for now, going to rewrite this in v5\n/* eslint-disable */\n\nimport { TEXT_GRADIENT } from './const';\nimport { hex2string } from '@pixi/utils';\n\nexport type TextStyleAlign = 'left'|'center'|'right';\nexport type TextStyleFill = string|string[]|number|number[]|CanvasGradient|CanvasPattern;\nexport type TextStyleFontStyle = 'normal'|'italic'|'oblique';\nexport type TextStyleFontVariant = 'normal'|'small-caps';\nexport type TextStyleFontWeight = 'normal'|'bold'|'bolder'|'lighter'|'100'|'200'|'300'|'400'|'500'|'600'|'700'|'800'|'900';\nexport type TextStyleLineJoin = 'miter'|'round'|'bevel';\nexport type TextStyleTextBaseline = 'alphabetic'|'top'|'hanging'|'middle'|'ideographic'|'bottom';\nexport type TextStyleWhiteSpace = 'normal'|'pre'|'pre-line';\n\nexport interface ITextStyle {\n align: TextStyleAlign;\n breakWords: boolean;\n dropShadow: boolean;\n dropShadowAlpha: number;\n dropShadowAngle: number;\n dropShadowBlur: number;\n dropShadowColor: string|number;\n dropShadowDistance: number;\n fill: TextStyleFill;\n fillGradientType: TEXT_GRADIENT;\n fillGradientStops: number[];\n fontFamily: string | string[];\n fontSize: number | string;\n fontStyle: TextStyleFontStyle;\n fontVariant: TextStyleFontVariant;\n fontWeight: TextStyleFontWeight;\n letterSpacing: number;\n lineHeight: number;\n lineJoin: TextStyleLineJoin;\n miterLimit: number;\n padding: number;\n stroke: string|number;\n strokeThickness: number;\n textBaseline: TextStyleTextBaseline;\n trim: boolean;\n whiteSpace: TextStyleWhiteSpace;\n wordWrap: boolean;\n wordWrapWidth: number;\n leading: number;\n}\n\nconst defaultStyle: ITextStyle = {\n align: 'left',\n breakWords: false,\n dropShadow: false,\n dropShadowAlpha: 1,\n dropShadowAngle: Math.PI / 6,\n dropShadowBlur: 0,\n dropShadowColor: 'black',\n dropShadowDistance: 5,\n fill: 'black',\n fillGradientType: TEXT_GRADIENT.LINEAR_VERTICAL,\n fillGradientStops: [],\n fontFamily: 'Arial',\n fontSize: 26,\n fontStyle: 'normal',\n fontVariant: 'normal',\n fontWeight: 'normal',\n letterSpacing: 0,\n lineHeight: 0,\n lineJoin: 'miter',\n miterLimit: 10,\n padding: 0,\n stroke: 'black',\n strokeThickness: 0,\n textBaseline: 'alphabetic',\n trim: false,\n whiteSpace: 'pre',\n wordWrap: false,\n wordWrapWidth: 100,\n leading: 0,\n};\n\nconst genericFontFamilies = [\n 'serif',\n 'sans-serif',\n 'monospace',\n 'cursive',\n 'fantasy',\n 'system-ui',\n];\n\n/**\n * A TextStyle Object contains information to decorate a Text objects.\n *\n * An instance can be shared between multiple Text objects; then changing the style will update all text objects using it.\n *\n * A tool can be used to generate a text style [here](https://pixijs.io/pixi-text-style).\n *\n * @class\n * @memberof PIXI\n */\nexport class TextStyle implements ITextStyle\n{\n public styleID: number;\n\n protected _align: TextStyleAlign;\n protected _breakWords: boolean;\n protected _dropShadow: boolean;\n protected _dropShadowAlpha: number;\n protected _dropShadowAngle: number;\n protected _dropShadowBlur: number;\n protected _dropShadowColor: string|number;\n protected _dropShadowDistance: number;\n protected _fill: TextStyleFill;\n protected _fillGradientType: TEXT_GRADIENT;\n protected _fillGradientStops: number[];\n protected _fontFamily: string|string[];\n protected _fontSize: number|string;\n protected _fontStyle: TextStyleFontStyle;\n protected _fontVariant: TextStyleFontVariant;\n protected _fontWeight: TextStyleFontWeight;\n protected _letterSpacing: number;\n protected _lineHeight: number;\n protected _lineJoin: TextStyleLineJoin;\n protected _miterLimit: number;\n protected _padding: number;\n protected _stroke: string|number;\n protected _strokeThickness: number;\n protected _textBaseline: TextStyleTextBaseline;\n protected _trim: boolean;\n protected _whiteSpace: TextStyleWhiteSpace;\n protected _wordWrap: boolean;\n protected _wordWrapWidth: number;\n protected _leading: number;\n\n /**\n * @param {object} [style] - The style parameters\n * @param {string} [style.align='left'] - Alignment for multiline text ('left', 'center' or 'right'),\n * does not affect single line text\n * @param {boolean} [style.breakWords=false] - Indicates if lines can be wrapped within words, it\n * needs wordWrap to be set to true\n * @param {boolean} [style.dropShadow=false] - Set a drop shadow for the text\n * @param {number} [style.dropShadowAlpha=1] - Set alpha for the drop shadow\n * @param {number} [style.dropShadowAngle=Math.PI/6] - Set a angle of the drop shadow\n * @param {number} [style.dropShadowBlur=0] - Set a shadow blur radius\n * @param {string|number} [style.dropShadowColor='black'] - A fill style to be used on the dropshadow e.g 'red', '#00FF00'\n * @param {number} [style.dropShadowDistance=5] - Set a distance of the drop shadow\n * @param {string|string[]|number|number[]|CanvasGradient|CanvasPattern} [style.fill='black'] - A canvas\n * fillstyle that will be used on the text e.g 'red', '#00FF00'. Can be an array to create a gradient\n * eg ['#000000','#FFFFFF']\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle|MDN}\n * @param {number} [style.fillGradientType=PIXI.TEXT_GRADIENT.LINEAR_VERTICAL] - If fill is an array of colours\n * to create a gradient, this can change the type/direction of the gradient. See {@link PIXI.TEXT_GRADIENT}\n * @param {number[]} [style.fillGradientStops] - If fill is an array of colours to create a gradient, this array can set\n * the stop points (numbers between 0 and 1) for the color, overriding the default behaviour of evenly spacing them.\n * @param {string|string[]} [style.fontFamily='Arial'] - The font family\n * @param {number|string} [style.fontSize=26] - The font size (as a number it converts to px, but as a string,\n * equivalents are '26px','20pt','160%' or '1.6em')\n * @param {string} [style.fontStyle='normal'] - The font style ('normal', 'italic' or 'oblique')\n * @param {string} [style.fontVariant='normal'] - The font variant ('normal' or 'small-caps')\n * @param {string} [style.fontWeight='normal'] - The font weight ('normal', 'bold', 'bolder', 'lighter' and '100',\n * '200', '300', '400', '500', '600', '700', '800' or '900')\n * @param {number} [style.leading=0] - The space between lines\n * @param {number} [style.letterSpacing=0] - The amount of spacing between letters, default is 0\n * @param {number} [style.lineHeight] - The line height, a number that represents the vertical space that a letter uses\n * @param {string} [style.lineJoin='miter'] - The lineJoin property sets the type of corner created, it can resolve\n * spiked text issues. Possible values \"miter\" (creates a sharp corner), \"round\" (creates a round corner) or \"bevel\"\n * (creates a squared corner).\n * @param {number} [style.miterLimit=10] - The miter limit to use when using the 'miter' lineJoin mode. This can reduce\n * or increase the spikiness of rendered text.\n * @param {number} [style.padding=0] - Occasionally some fonts are cropped. Adding some padding will prevent this from\n * happening by adding padding to all sides of the text.\n * @param {string|number} [style.stroke='black'] - A canvas fillstyle that will be used on the text stroke\n * e.g 'blue', '#FCFF00'\n * @param {number} [style.strokeThickness=0] - A number that represents the thickness of the stroke.\n * Default is 0 (no stroke)\n * @param {boolean} [style.trim=false] - Trim transparent borders\n * @param {string} [style.textBaseline='alphabetic'] - The baseline of the text that is rendered.\n * @param {string} [style.whiteSpace='pre'] - Determines whether newlines & spaces are collapsed or preserved \"normal\"\n * (collapse, collapse), \"pre\" (preserve, preserve) | \"pre-line\" (preserve, collapse). It needs wordWrap to be set to true\n * @param {boolean} [style.wordWrap=false] - Indicates if word wrap should be used\n * @param {number} [style.wordWrapWidth=100] - The width at which text will wrap, it needs wordWrap to be set to true\n */\n constructor(style: Partial)\n {\n this.styleID = 0;\n\n this.reset();\n\n deepCopyProperties(this, style, style);\n }\n\n /**\n * Creates a new TextStyle object with the same values as this one.\n * Note that the only the properties of the object are cloned.\n *\n * @return {PIXI.TextStyle} New cloned TextStyle object\n */\n public clone(): TextStyle\n {\n const clonedProperties: Partial = {};\n\n deepCopyProperties(clonedProperties, this, defaultStyle);\n\n return new TextStyle(clonedProperties);\n }\n\n /**\n * Resets all properties to the defaults specified in TextStyle.prototype._default\n */\n public reset(): void\n {\n deepCopyProperties(this, defaultStyle, defaultStyle);\n }\n\n /**\n * Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text\n *\n * @member {string}\n */\n get align(): TextStyleAlign\n {\n return this._align;\n }\n set align(align: TextStyleAlign)\n {\n if (this._align !== align)\n {\n this._align = align;\n this.styleID++;\n }\n }\n\n /**\n * Indicates if lines can be wrapped within words, it needs wordWrap to be set to true\n *\n * @member {boolean}\n */\n get breakWords(): boolean\n {\n return this._breakWords;\n }\n set breakWords(breakWords: boolean)\n {\n if (this._breakWords !== breakWords)\n {\n this._breakWords = breakWords;\n this.styleID++;\n }\n }\n\n /**\n * Set a drop shadow for the text\n *\n * @member {boolean}\n */\n get dropShadow(): boolean\n {\n return this._dropShadow;\n }\n set dropShadow(dropShadow: boolean)\n {\n if (this._dropShadow !== dropShadow)\n {\n this._dropShadow = dropShadow;\n this.styleID++;\n }\n }\n\n /**\n * Set alpha for the drop shadow\n *\n * @member {number}\n */\n get dropShadowAlpha(): number\n {\n return this._dropShadowAlpha;\n }\n set dropShadowAlpha(dropShadowAlpha: number)\n {\n if (this._dropShadowAlpha !== dropShadowAlpha)\n {\n this._dropShadowAlpha = dropShadowAlpha;\n this.styleID++;\n }\n }\n\n /**\n * Set a angle of the drop shadow\n *\n * @member {number}\n */\n get dropShadowAngle(): number\n {\n return this._dropShadowAngle;\n }\n set dropShadowAngle(dropShadowAngle: number)\n {\n if (this._dropShadowAngle !== dropShadowAngle)\n {\n this._dropShadowAngle = dropShadowAngle;\n this.styleID++;\n }\n }\n\n /**\n * Set a shadow blur radius\n *\n * @member {number}\n */\n get dropShadowBlur(): number\n {\n return this._dropShadowBlur;\n }\n set dropShadowBlur(dropShadowBlur: number)\n {\n if (this._dropShadowBlur !== dropShadowBlur)\n {\n this._dropShadowBlur = dropShadowBlur;\n this.styleID++;\n }\n }\n\n /**\n * A fill style to be used on the dropshadow e.g 'red', '#00FF00'\n *\n * @member {string|number}\n */\n get dropShadowColor(): number | string\n {\n return this._dropShadowColor;\n }\n set dropShadowColor(dropShadowColor: number | string)\n {\n const outputColor = getColor(dropShadowColor);\n if (this._dropShadowColor !== outputColor)\n {\n this._dropShadowColor = outputColor;\n this.styleID++;\n }\n }\n\n /**\n * Set a distance of the drop shadow\n *\n * @member {number}\n */\n get dropShadowDistance(): number\n {\n return this._dropShadowDistance;\n }\n set dropShadowDistance(dropShadowDistance: number)\n {\n if (this._dropShadowDistance !== dropShadowDistance)\n {\n this._dropShadowDistance = dropShadowDistance;\n this.styleID++;\n }\n }\n\n /**\n * A canvas fillstyle that will be used on the text e.g 'red', '#00FF00'.\n * Can be an array to create a gradient eg ['#000000','#FFFFFF']\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle|MDN}\n *\n * @member {string|string[]|number|number[]|CanvasGradient|CanvasPattern}\n */\n get fill(): TextStyleFill\n {\n return this._fill;\n }\n set fill(fill: TextStyleFill)\n {\n // TODO: Can't have different types for getter and setter. The getter shouldn't have the number type as\n // the setter converts to string. See this thread for more details:\n // https://github.com/microsoft/TypeScript/issues/2521\n // TODO: Not sure if getColor works properly with CanvasGradient and/or CanvasPattern, can't pass in\n // without casting here.\n const outputColor = getColor(fill as any);\n if (this._fill !== outputColor)\n {\n this._fill = outputColor;\n this.styleID++;\n }\n }\n\n /**\n * If fill is an array of colours to create a gradient, this can change the type/direction of the gradient.\n * See {@link PIXI.TEXT_GRADIENT}\n *\n * @member {number}\n */\n get fillGradientType(): TEXT_GRADIENT\n {\n return this._fillGradientType;\n }\n set fillGradientType(fillGradientType: TEXT_GRADIENT)\n {\n if (this._fillGradientType !== fillGradientType)\n {\n this._fillGradientType = fillGradientType;\n this.styleID++;\n }\n }\n\n /**\n * If fill is an array of colours to create a gradient, this array can set the stop points\n * (numbers between 0 and 1) for the color, overriding the default behaviour of evenly spacing them.\n *\n * @member {number[]}\n */\n get fillGradientStops(): number[]\n {\n return this._fillGradientStops;\n }\n set fillGradientStops(fillGradientStops: number[])\n {\n if (!areArraysEqual(this._fillGradientStops,fillGradientStops))\n {\n this._fillGradientStops = fillGradientStops;\n this.styleID++;\n }\n }\n\n /**\n * The font family\n *\n * @member {string|string[]}\n */\n get fontFamily(): string | string[]\n {\n return this._fontFamily;\n }\n set fontFamily(fontFamily: string | string[])\n {\n if (this.fontFamily !== fontFamily)\n {\n this._fontFamily = fontFamily;\n this.styleID++;\n }\n }\n\n /**\n * The font size\n * (as a number it converts to px, but as a string, equivalents are '26px','20pt','160%' or '1.6em')\n *\n * @member {number|string}\n */\n get fontSize(): number | string\n {\n return this._fontSize;\n }\n set fontSize(fontSize: number | string)\n {\n if (this._fontSize !== fontSize)\n {\n this._fontSize = fontSize;\n this.styleID++;\n }\n }\n\n /**\n * The font style\n * ('normal', 'italic' or 'oblique')\n *\n * @member {string}\n */\n get fontStyle(): TextStyleFontStyle\n {\n return this._fontStyle;\n }\n set fontStyle(fontStyle: TextStyleFontStyle)\n {\n if (this._fontStyle !== fontStyle)\n {\n this._fontStyle = fontStyle;\n this.styleID++;\n }\n }\n\n /**\n * The font variant\n * ('normal' or 'small-caps')\n *\n * @member {string}\n */\n get fontVariant(): TextStyleFontVariant\n {\n return this._fontVariant;\n }\n set fontVariant(fontVariant: TextStyleFontVariant)\n {\n if (this._fontVariant !== fontVariant)\n {\n this._fontVariant = fontVariant;\n this.styleID++;\n }\n }\n\n /**\n * The font weight\n * ('normal', 'bold', 'bolder', 'lighter' and '100', '200', '300', '400', '500', '600', '700', 800' or '900')\n *\n * @member {string}\n */\n get fontWeight(): TextStyleFontWeight\n {\n return this._fontWeight;\n }\n set fontWeight(fontWeight: TextStyleFontWeight)\n {\n if (this._fontWeight !== fontWeight)\n {\n this._fontWeight = fontWeight;\n this.styleID++;\n }\n }\n\n /**\n * The amount of spacing between letters, default is 0\n *\n * @member {number}\n */\n get letterSpacing(): number\n {\n return this._letterSpacing;\n }\n set letterSpacing(letterSpacing: number)\n {\n if (this._letterSpacing !== letterSpacing)\n {\n this._letterSpacing = letterSpacing;\n this.styleID++;\n }\n }\n\n /**\n * The line height, a number that represents the vertical space that a letter uses\n *\n * @member {number}\n */\n get lineHeight(): number\n {\n return this._lineHeight;\n }\n set lineHeight(lineHeight: number)\n {\n if (this._lineHeight !== lineHeight)\n {\n this._lineHeight = lineHeight;\n this.styleID++;\n }\n }\n\n /**\n * The space between lines\n *\n * @member {number}\n */\n get leading(): number\n {\n return this._leading;\n }\n set leading(leading: number)\n {\n if (this._leading !== leading)\n {\n this._leading = leading;\n this.styleID++;\n }\n }\n\n /**\n * The lineJoin property sets the type of corner created, it can resolve spiked text issues.\n * Default is 'miter' (creates a sharp corner).\n *\n * @member {string}\n */\n get lineJoin(): TextStyleLineJoin\n {\n return this._lineJoin;\n }\n set lineJoin(lineJoin: TextStyleLineJoin)\n {\n if (this._lineJoin !== lineJoin)\n {\n this._lineJoin = lineJoin;\n this.styleID++;\n }\n }\n\n /**\n * The miter limit to use when using the 'miter' lineJoin mode\n * This can reduce or increase the spikiness of rendered text.\n *\n * @member {number}\n */\n get miterLimit(): number\n {\n return this._miterLimit;\n }\n set miterLimit(miterLimit: number)\n {\n if (this._miterLimit !== miterLimit)\n {\n this._miterLimit = miterLimit;\n this.styleID++;\n }\n }\n\n /**\n * Occasionally some fonts are cropped. Adding some padding will prevent this from happening\n * by adding padding to all sides of the text.\n *\n * @member {number}\n */\n get padding(): number\n {\n return this._padding;\n }\n set padding(padding: number)\n {\n if (this._padding !== padding)\n {\n this._padding = padding;\n this.styleID++;\n }\n }\n\n /**\n * A canvas fillstyle that will be used on the text stroke\n * e.g 'blue', '#FCFF00'\n *\n * @member {string|number}\n */\n get stroke(): string | number\n {\n return this._stroke;\n }\n set stroke(stroke: string | number)\n {\n // TODO: Can't have different types for getter and setter. The getter shouldn't have the number type as\n // the setter converts to string. See this thread for more details:\n // https://github.com/microsoft/TypeScript/issues/2521\n const outputColor = getColor(stroke);\n if (this._stroke !== outputColor)\n {\n this._stroke = outputColor;\n this.styleID++;\n }\n }\n\n /**\n * A number that represents the thickness of the stroke.\n * Default is 0 (no stroke)\n *\n * @member {number}\n */\n get strokeThickness(): number\n {\n return this._strokeThickness;\n }\n set strokeThickness(strokeThickness: number)\n {\n if (this._strokeThickness !== strokeThickness)\n {\n this._strokeThickness = strokeThickness;\n this.styleID++;\n }\n }\n\n /**\n * The baseline of the text that is rendered.\n *\n * @member {string}\n */\n get textBaseline(): TextStyleTextBaseline\n {\n return this._textBaseline;\n }\n set textBaseline(textBaseline: TextStyleTextBaseline)\n {\n if (this._textBaseline !== textBaseline)\n {\n this._textBaseline = textBaseline;\n this.styleID++;\n }\n }\n\n /**\n * Trim transparent borders\n *\n * @member {boolean}\n */\n get trim(): boolean\n {\n return this._trim;\n }\n set trim(trim: boolean)\n {\n if (this._trim !== trim)\n {\n this._trim = trim;\n this.styleID++;\n }\n }\n\n /**\n * How newlines and spaces should be handled.\n * Default is 'pre' (preserve, preserve).\n *\n * value | New lines | Spaces\n * --- | --- | ---\n * 'normal' | Collapse | Collapse\n * 'pre' | Preserve | Preserve\n * 'pre-line' | Preserve | Collapse\n *\n * @member {string}\n */\n get whiteSpace(): TextStyleWhiteSpace\n {\n return this._whiteSpace;\n }\n set whiteSpace(whiteSpace: TextStyleWhiteSpace)\n {\n if (this._whiteSpace !== whiteSpace)\n {\n this._whiteSpace = whiteSpace;\n this.styleID++;\n }\n }\n\n /**\n * Indicates if word wrap should be used\n *\n * @member {boolean}\n */\n get wordWrap(): boolean\n {\n return this._wordWrap;\n }\n set wordWrap(wordWrap: boolean)\n {\n if (this._wordWrap !== wordWrap)\n {\n this._wordWrap = wordWrap;\n this.styleID++;\n }\n }\n\n /**\n * The width at which text will wrap, it needs wordWrap to be set to true\n *\n * @member {number}\n */\n get wordWrapWidth(): number\n {\n return this._wordWrapWidth;\n }\n set wordWrapWidth(wordWrapWidth: number)\n {\n if (this._wordWrapWidth !== wordWrapWidth)\n {\n this._wordWrapWidth = wordWrapWidth;\n this.styleID++;\n }\n }\n\n /**\n * Generates a font style string to use for `TextMetrics.measureFont()`.\n *\n * @return {string} Font style string, for passing to `TextMetrics.measureFont()`\n */\n public toFontString(): string\n {\n // build canvas api font setting from individual components. Convert a numeric this.fontSize to px\n const fontSizeString = (typeof this.fontSize === 'number') ? `${this.fontSize}px` : this.fontSize;\n\n // Clean-up fontFamily property by quoting each font name\n // this will support font names with spaces\n let fontFamilies: string|string[] = this.fontFamily;\n\n if (!Array.isArray(this.fontFamily))\n {\n fontFamilies = this.fontFamily.split(',');\n }\n\n for (let i = fontFamilies.length - 1; i >= 0; i--)\n {\n // Trim any extra white-space\n let fontFamily = fontFamilies[i].trim();\n\n // Check if font already contains strings\n if (!(/([\\\"\\'])[^\\'\\\"]+\\1/).test(fontFamily) && genericFontFamilies.indexOf(fontFamily) < 0)\n {\n fontFamily = `\"${fontFamily}\"`;\n }\n (fontFamilies as string[])[i] = fontFamily;\n }\n\n return `${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${fontSizeString} ${(fontFamilies as string[]).join(',')}`;\n }\n}\n\n/**\n * Utility function to convert hexadecimal colors to strings, and simply return the color if it's a string.\n * @private\n * @param {string|number} color\n * @return {string} The color as a string.\n */\nfunction getSingleColor(color: string|number): string\n{\n if (typeof color === 'number')\n {\n return hex2string(color);\n }\n else if (typeof color === 'string')\n {\n if ( color.indexOf('0x') === 0 )\n {\n color = color.replace('0x', '#');\n }\n }\n\n return color;\n}\n\n/**\n * Utility function to convert hexadecimal colors to strings, and simply return the color if it's a string.\n * This version can also convert array of colors\n * @private\n * @param {string|number|number[]} color\n * @return {string} The color as a string.\n */\nfunction getColor(color: (string|number)[]): string[];\nfunction getColor(color: string|number): string;\nfunction getColor(color: string|number|(string|number)[]): string|string[]\n{\n if (!Array.isArray(color))\n {\n return getSingleColor(color);\n }\n else\n {\n for (let i = 0; i < color.length; ++i)\n {\n color[i] = getSingleColor(color[i]);\n }\n\n return color as string[];\n }\n}\n\n/**\n * Utility function to convert hexadecimal colors to strings, and simply return the color if it's a string.\n * This version can also convert array of colors\n * @private\n * @param {Array} array1 - First array to compare\n * @param {Array} array2 - Second array to compare\n * @return {boolean} Do the arrays contain the same values in the same order\n */\nfunction areArraysEqual(array1: T[], array2: T[]): boolean\n{\n if (!Array.isArray(array1) || !Array.isArray(array2))\n {\n return false;\n }\n\n if (array1.length !== array2.length)\n {\n return false;\n }\n\n for (let i = 0; i < array1.length; ++i)\n {\n if (array1[i] !== array2[i])\n {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Utility function to ensure that object properties are copied by value, and not by reference\n * @private\n * @param {Object} target - Target object to copy properties into\n * @param {Object} source - Source object for the properties to copy\n * @param {string} propertyObj - Object containing properties names we want to loop over\n */\nfunction deepCopyProperties(target: Record, source: Record, propertyObj: Record): void {\n for (const prop in propertyObj) {\n if (Array.isArray(source[prop])) {\n target[prop] = source[prop].slice();\n } else {\n target[prop] = source[prop];\n }\n }\n}\n","import { TextStyle, TextStyleWhiteSpace } from './TextStyle';\n\ninterface IFontMetrics {\n ascent: number;\n descent: number;\n fontSize: number;\n}\n\ntype CharacterWidthCache = { [key: string]: number };\n\n/**\n * The TextMetrics object represents the measurement of a block of text with a specified style.\n *\n * ```js\n * let style = new PIXI.TextStyle({fontFamily : 'Arial', fontSize: 24, fill : 0xff1010, align : 'center'})\n * let textMetrics = PIXI.TextMetrics.measureText('Your text', style)\n * ```\n *\n * @class\n * @memberof PIXI\n */\nexport class TextMetrics\n{\n public text: string;\n public style: TextStyle;\n public width: number;\n public height: number;\n public lines: string[];\n public lineWidths: number[];\n public lineHeight: number;\n public maxLineWidth: number;\n public fontProperties: IFontMetrics;\n\n public static METRICS_STRING: string;\n public static BASELINE_SYMBOL: string;\n public static BASELINE_MULTIPLIER: number;\n\n // TODO: These should be protected but they're initialized outside of the class.\n public static _canvas: HTMLCanvasElement|OffscreenCanvas;\n public static _context: CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D;\n public static _fonts: { [font: string]: IFontMetrics };\n public static _newlines: number[];\n public static _breakingSpaces: number[];\n\n /**\n * @param {string} text - the text that was measured\n * @param {PIXI.TextStyle} style - the style that was measured\n * @param {number} width - the measured width of the text\n * @param {number} height - the measured height of the text\n * @param {string[]} lines - an array of the lines of text broken by new lines and wrapping if specified in style\n * @param {number[]} lineWidths - an array of the line widths for each line matched to `lines`\n * @param {number} lineHeight - the measured line height for this style\n * @param {number} maxLineWidth - the maximum line width for all measured lines\n * @param {Object} fontProperties - the font properties object from TextMetrics.measureFont\n */\n constructor(text: string, style: TextStyle, width: number, height: number, lines: string[], lineWidths: number[],\n lineHeight: number, maxLineWidth: number, fontProperties: IFontMetrics)\n {\n /**\n * The text that was measured\n *\n * @member {string}\n */\n this.text = text;\n\n /**\n * The style that was measured\n *\n * @member {PIXI.TextStyle}\n */\n this.style = style;\n\n /**\n * The measured width of the text\n *\n * @member {number}\n */\n this.width = width;\n\n /**\n * The measured height of the text\n *\n * @member {number}\n */\n this.height = height;\n\n /**\n * An array of lines of the text broken by new lines and wrapping is specified in style\n *\n * @member {string[]}\n */\n this.lines = lines;\n\n /**\n * An array of the line widths for each line matched to `lines`\n *\n * @member {number[]}\n */\n this.lineWidths = lineWidths;\n\n /**\n * The measured line height for this style\n *\n * @member {number}\n */\n this.lineHeight = lineHeight;\n\n /**\n * The maximum line width for all measured lines\n *\n * @member {number}\n */\n this.maxLineWidth = maxLineWidth;\n\n /**\n * The font properties object from TextMetrics.measureFont\n *\n * @member {PIXI.IFontMetrics}\n */\n this.fontProperties = fontProperties;\n }\n\n /**\n * Measures the supplied string of text and returns a Rectangle.\n *\n * @param {string} text - the text to measure.\n * @param {PIXI.TextStyle} style - the text style to use for measuring\n * @param {boolean} [wordWrap] - optional override for if word-wrap should be applied to the text.\n * @param {HTMLCanvasElement} [canvas] - optional specification of the canvas to use for measuring.\n * @return {PIXI.TextMetrics} measured width and height of the text.\n */\n public static measureText(text: string, style: TextStyle, wordWrap: boolean, canvas = TextMetrics._canvas): TextMetrics\n {\n wordWrap = (wordWrap === undefined || wordWrap === null) ? style.wordWrap : wordWrap;\n const font = style.toFontString();\n const fontProperties = TextMetrics.measureFont(font);\n\n // fallback in case UA disallow canvas data extraction\n // (toDataURI, getImageData functions)\n if (fontProperties.fontSize === 0)\n {\n fontProperties.fontSize = style.fontSize as number;\n fontProperties.ascent = style.fontSize as number;\n }\n\n const context = canvas.getContext('2d');\n\n context.font = font;\n\n const outputText = wordWrap ? TextMetrics.wordWrap(text, style, canvas) : text;\n const lines = outputText.split(/(?:\\r\\n|\\r|\\n)/);\n const lineWidths = new Array(lines.length);\n let maxLineWidth = 0;\n\n for (let i = 0; i < lines.length; i++)\n {\n const lineWidth = context.measureText(lines[i]).width + ((lines[i].length - 1) * style.letterSpacing);\n\n lineWidths[i] = lineWidth;\n maxLineWidth = Math.max(maxLineWidth, lineWidth);\n }\n let width = maxLineWidth + style.strokeThickness;\n\n if (style.dropShadow)\n {\n width += style.dropShadowDistance;\n }\n\n const lineHeight = style.lineHeight || fontProperties.fontSize + style.strokeThickness;\n let height = Math.max(lineHeight, fontProperties.fontSize + style.strokeThickness)\n + ((lines.length - 1) * (lineHeight + style.leading));\n\n if (style.dropShadow)\n {\n height += style.dropShadowDistance;\n }\n\n return new TextMetrics(\n text,\n style,\n width,\n height,\n lines,\n lineWidths,\n lineHeight + style.leading,\n maxLineWidth,\n fontProperties\n );\n }\n\n /**\n * Applies newlines to a string to have it optimally fit into the horizontal\n * bounds set by the Text object's wordWrapWidth property.\n *\n * @private\n * @param {string} text - String to apply word wrapping to\n * @param {PIXI.TextStyle} style - the style to use when wrapping\n * @param {HTMLCanvasElement} [canvas] - optional specification of the canvas to use for measuring.\n * @return {string} New string with new lines applied where required\n */\n private static wordWrap(text: string, style: TextStyle, canvas = TextMetrics._canvas): string\n {\n const context = canvas.getContext('2d');\n\n let width = 0;\n let line = '';\n let lines = '';\n\n const cache: CharacterWidthCache = {};\n const { letterSpacing, whiteSpace } = style;\n\n // How to handle whitespaces\n const collapseSpaces = TextMetrics.collapseSpaces(whiteSpace);\n const collapseNewlines = TextMetrics.collapseNewlines(whiteSpace);\n\n // whether or not spaces may be added to the beginning of lines\n let canPrependSpaces = !collapseSpaces;\n\n // There is letterSpacing after every char except the last one\n // t_h_i_s_' '_i_s_' '_a_n_' '_e_x_a_m_p_l_e_' '_!\n // so for convenience the above needs to be compared to width + 1 extra letterSpace\n // t_h_i_s_' '_i_s_' '_a_n_' '_e_x_a_m_p_l_e_' '_!_\n // ________________________________________________\n // And then the final space is simply no appended to each line\n const wordWrapWidth = style.wordWrapWidth + letterSpacing;\n\n // break text into words, spaces and newline chars\n const tokens = TextMetrics.tokenize(text);\n\n for (let i = 0; i < tokens.length; i++)\n {\n // get the word, space or newlineChar\n let token = tokens[i];\n\n // if word is a new line\n if (TextMetrics.isNewline(token))\n {\n // keep the new line\n if (!collapseNewlines)\n {\n lines += TextMetrics.addLine(line);\n canPrependSpaces = !collapseSpaces;\n line = '';\n width = 0;\n continue;\n }\n\n // if we should collapse new lines\n // we simply convert it into a space\n token = ' ';\n }\n\n // if we should collapse repeated whitespaces\n if (collapseSpaces)\n {\n // check both this and the last tokens for spaces\n const currIsBreakingSpace = TextMetrics.isBreakingSpace(token);\n const lastIsBreakingSpace = TextMetrics.isBreakingSpace(line[line.length - 1]);\n\n if (currIsBreakingSpace && lastIsBreakingSpace)\n {\n continue;\n }\n }\n\n // get word width from cache if possible\n const tokenWidth = TextMetrics.getFromCache(token, letterSpacing, cache, context);\n\n // word is longer than desired bounds\n if (tokenWidth > wordWrapWidth)\n {\n // if we are not already at the beginning of a line\n if (line !== '')\n {\n // start newlines for overflow words\n lines += TextMetrics.addLine(line);\n line = '';\n width = 0;\n }\n\n // break large word over multiple lines\n if (TextMetrics.canBreakWords(token, style.breakWords))\n {\n // break word into characters\n const characters = TextMetrics.wordWrapSplit(token);\n\n // loop the characters\n for (let j = 0; j < characters.length; j++)\n {\n let char = characters[j];\n\n let k = 1;\n // we are not at the end of the token\n\n while (characters[j + k])\n {\n const nextChar = characters[j + k];\n const lastChar = char[char.length - 1];\n\n // should not split chars\n if (!TextMetrics.canBreakChars(lastChar, nextChar, token, j, style.breakWords))\n {\n // combine chars & move forward one\n char += nextChar;\n }\n else\n {\n break;\n }\n\n k++;\n }\n\n j += char.length - 1;\n\n const characterWidth = TextMetrics.getFromCache(char, letterSpacing, cache, context);\n\n if (characterWidth + width > wordWrapWidth)\n {\n lines += TextMetrics.addLine(line);\n canPrependSpaces = false;\n line = '';\n width = 0;\n }\n\n line += char;\n width += characterWidth;\n }\n }\n\n // run word out of the bounds\n else\n {\n // if there are words in this line already\n // finish that line and start a new one\n if (line.length > 0)\n {\n lines += TextMetrics.addLine(line);\n line = '';\n width = 0;\n }\n\n const isLastToken = i === tokens.length - 1;\n\n // give it its own line if it's not the end\n lines += TextMetrics.addLine(token, !isLastToken);\n canPrependSpaces = false;\n line = '';\n width = 0;\n }\n }\n\n // word could fit\n else\n {\n // word won't fit because of existing words\n // start a new line\n if (tokenWidth + width > wordWrapWidth)\n {\n // if its a space we don't want it\n canPrependSpaces = false;\n\n // add a new line\n lines += TextMetrics.addLine(line);\n\n // start a new line\n line = '';\n width = 0;\n }\n\n // don't add spaces to the beginning of lines\n if (line.length > 0 || !TextMetrics.isBreakingSpace(token) || canPrependSpaces)\n {\n // add the word to the current line\n line += token;\n\n // update width counter\n width += tokenWidth;\n }\n }\n }\n\n lines += TextMetrics.addLine(line, false);\n\n return lines;\n }\n\n /**\n * Convienience function for logging each line added during the wordWrap\n * method\n *\n * @private\n * @param {string} line - The line of text to add\n * @param {boolean} newLine - Add new line character to end\n * @return {string} A formatted line\n */\n private static addLine(line: string, newLine = true): string\n {\n line = TextMetrics.trimRight(line);\n\n line = (newLine) ? `${line}\\n` : line;\n\n return line;\n }\n\n /**\n * Gets & sets the widths of calculated characters in a cache object\n *\n * @private\n * @param {string} key - The key\n * @param {number} letterSpacing - The letter spacing\n * @param {object} cache - The cache\n * @param {CanvasRenderingContext2D} context - The canvas context\n * @return {number} The from cache.\n */\n private static getFromCache(key: string, letterSpacing: number, cache: CharacterWidthCache,\n context: CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D): number\n {\n let width = cache[key];\n\n if (width === undefined)\n {\n const spacing = ((key.length) * letterSpacing);\n\n width = context.measureText(key).width + spacing;\n cache[key] = width;\n }\n\n return width;\n }\n\n /**\n * Determines whether we should collapse breaking spaces\n *\n * @private\n * @param {string} whiteSpace - The TextStyle property whiteSpace\n * @return {boolean} should collapse\n */\n private static collapseSpaces(whiteSpace: TextStyleWhiteSpace): boolean\n {\n return (whiteSpace === 'normal' || whiteSpace === 'pre-line');\n }\n\n /**\n * Determines whether we should collapse newLine chars\n *\n * @private\n * @param {string} whiteSpace - The white space\n * @return {boolean} should collapse\n */\n private static collapseNewlines(whiteSpace: TextStyleWhiteSpace): boolean\n {\n return (whiteSpace === 'normal');\n }\n\n /**\n * trims breaking whitespaces from string\n *\n * @private\n * @param {string} text - The text\n * @return {string} trimmed string\n */\n private static trimRight(text: string): string\n {\n if (typeof text !== 'string')\n {\n return '';\n }\n\n for (let i = text.length - 1; i >= 0; i--)\n {\n const char = text[i];\n\n if (!TextMetrics.isBreakingSpace(char))\n {\n break;\n }\n\n text = text.slice(0, -1);\n }\n\n return text;\n }\n\n /**\n * Determines if char is a newline.\n *\n * @private\n * @param {string} char - The character\n * @return {boolean} True if newline, False otherwise.\n */\n private static isNewline(char: string): boolean\n {\n if (typeof char !== 'string')\n {\n return false;\n }\n\n return (TextMetrics._newlines.indexOf(char.charCodeAt(0)) >= 0);\n }\n\n /**\n * Determines if char is a breaking whitespace.\n *\n * @private\n * @param {string} char - The character\n * @return {boolean} True if whitespace, False otherwise.\n */\n private static isBreakingSpace(char: string): boolean\n {\n if (typeof char !== 'string')\n {\n return false;\n }\n\n return (TextMetrics._breakingSpaces.indexOf(char.charCodeAt(0)) >= 0);\n }\n\n /**\n * Splits a string into words, breaking-spaces and newLine characters\n *\n * @private\n * @param {string} text - The text\n * @return {string[]} A tokenized array\n */\n private static tokenize(text: string): string[]\n {\n const tokens: string[] = [];\n let token = '';\n\n if (typeof text !== 'string')\n {\n return tokens;\n }\n\n for (let i = 0; i < text.length; i++)\n {\n const char = text[i];\n\n if (TextMetrics.isBreakingSpace(char) || TextMetrics.isNewline(char))\n {\n if (token !== '')\n {\n tokens.push(token);\n token = '';\n }\n\n tokens.push(char);\n\n continue;\n }\n\n token += char;\n }\n\n if (token !== '')\n {\n tokens.push(token);\n }\n\n return tokens;\n }\n\n /**\n * Overridable helper method used internally by TextMetrics, exposed to allow customizing the class's behavior.\n *\n * It allows one to customise which words should break\n * Examples are if the token is CJK or numbers.\n * It must return a boolean.\n *\n * @param {string} token - The token\n * @param {boolean} breakWords - The style attr break words\n * @return {boolean} whether to break word or not\n */\n static canBreakWords(_token: string, breakWords: boolean): boolean\n {\n return breakWords;\n }\n\n /**\n * Overridable helper method used internally by TextMetrics, exposed to allow customizing the class's behavior.\n *\n * It allows one to determine whether a pair of characters\n * should be broken by newlines\n * For example certain characters in CJK langs or numbers.\n * It must return a boolean.\n *\n * @param {string} char - The character\n * @param {string} nextChar - The next character\n * @param {string} token - The token/word the characters are from\n * @param {number} index - The index in the token of the char\n * @param {boolean} breakWords - The style attr break words\n * @return {boolean} whether to break word or not\n */\n static canBreakChars(_char: string, _nextChar: string, _token: string, _index: number,\n _breakWords: boolean): boolean\n {\n return true;\n }\n\n /**\n * Overridable helper method used internally by TextMetrics, exposed to allow customizing the class's behavior.\n *\n * It is called when a token (usually a word) has to be split into separate pieces\n * in order to determine the point to break a word.\n * It must return an array of characters.\n *\n * @example\n * // Correctly splits emojis, eg \"🤪🤪\" will result in two element array, each with one emoji.\n * TextMetrics.wordWrapSplit = (token) => [...token];\n *\n * @param {string} token - The token to split\n * @return {string[]} The characters of the token\n */\n static wordWrapSplit(token: string): string[]\n {\n return token.split('');\n }\n\n /**\n * Calculates the ascent, descent and fontSize of a given font-style\n *\n * @static\n * @param {string} font - String representing the style of the font\n * @return {PIXI.IFontMetrics} Font properties object\n */\n public static measureFont(font: string): IFontMetrics\n {\n // as this method is used for preparing assets, don't recalculate things if we don't need to\n if (TextMetrics._fonts[font])\n {\n return TextMetrics._fonts[font];\n }\n\n const properties: IFontMetrics = {\n ascent: 0,\n descent: 0,\n fontSize: 0,\n };\n\n const canvas = TextMetrics._canvas;\n const context = TextMetrics._context;\n\n context.font = font;\n\n const metricsString = TextMetrics.METRICS_STRING + TextMetrics.BASELINE_SYMBOL;\n const width = Math.ceil(context.measureText(metricsString).width);\n let baseline = Math.ceil(context.measureText(TextMetrics.BASELINE_SYMBOL).width);\n const height = 2 * baseline;\n\n baseline = baseline * TextMetrics.BASELINE_MULTIPLIER | 0;\n\n canvas.width = width;\n canvas.height = height;\n\n context.fillStyle = '#f00';\n context.fillRect(0, 0, width, height);\n\n context.font = font;\n\n context.textBaseline = 'alphabetic';\n context.fillStyle = '#000';\n context.fillText(metricsString, 0, baseline);\n\n const imagedata = context.getImageData(0, 0, width, height).data;\n const pixels = imagedata.length;\n const line = width * 4;\n\n let i = 0;\n let idx = 0;\n let stop = false;\n\n // ascent. scan from top to bottom until we find a non red pixel\n for (i = 0; i < baseline; ++i)\n {\n for (let j = 0; j < line; j += 4)\n {\n if (imagedata[idx + j] !== 255)\n {\n stop = true;\n break;\n }\n }\n if (!stop)\n {\n idx += line;\n }\n else\n {\n break;\n }\n }\n\n properties.ascent = baseline - i;\n\n idx = pixels - line;\n stop = false;\n\n // descent. scan from bottom to top until we find a non red pixel\n for (i = height; i > baseline; --i)\n {\n for (let j = 0; j < line; j += 4)\n {\n if (imagedata[idx + j] !== 255)\n {\n stop = true;\n break;\n }\n }\n\n if (!stop)\n {\n idx -= line;\n }\n else\n {\n break;\n }\n }\n\n properties.descent = i - baseline;\n properties.fontSize = properties.ascent + properties.descent;\n\n TextMetrics._fonts[font] = properties;\n\n return properties;\n }\n\n /**\n * Clear font metrics in metrics cache.\n *\n * @static\n * @param {string} [font] - font name. If font name not set then clear cache for all fonts.\n */\n public static clearMetrics(font = ''): void\n {\n if (font)\n {\n delete TextMetrics._fonts[font];\n }\n else\n {\n TextMetrics._fonts = {};\n }\n }\n}\n\n/**\n * Internal return object for {@link PIXI.TextMetrics.measureFont `TextMetrics.measureFont`}.\n *\n * @typedef {object} FontMetrics\n * @property {number} ascent - The ascent distance\n * @property {number} descent - The descent distance\n * @property {number} fontSize - Font size from ascent to descent\n * @memberof PIXI.TextMetrics\n * @private\n */\n\nconst canvas = ((): HTMLCanvasElement|OffscreenCanvas =>\n{\n try\n {\n // OffscreenCanvas2D measureText can be up to 40% faster.\n const c = new OffscreenCanvas(0, 0);\n const context = c.getContext('2d');\n\n if (context && context.measureText)\n {\n return c;\n }\n\n return document.createElement('canvas');\n }\n catch (ex)\n {\n return document.createElement('canvas');\n }\n})();\n\ncanvas.width = canvas.height = 10;\n\n/**\n * Cached canvas element for measuring text\n *\n * @memberof PIXI.TextMetrics\n * @type {HTMLCanvasElement}\n * @private\n */\nTextMetrics._canvas = canvas;\n\n/**\n * Cache for context to use.\n *\n * @memberof PIXI.TextMetrics\n * @type {CanvasRenderingContext2D}\n * @private\n */\nTextMetrics._context = canvas.getContext('2d');\n\n/**\n * Cache of {@see PIXI.TextMetrics.FontMetrics} objects.\n *\n * @memberof PIXI.TextMetrics\n * @type {Object}\n * @private\n */\nTextMetrics._fonts = {};\n\n/**\n * String used for calculate font metrics.\n * These characters are all tall to help calculate the height required for text.\n *\n * @static\n * @memberof PIXI.TextMetrics\n * @name METRICS_STRING\n * @type {string}\n * @default |ÉqÅ\n */\nTextMetrics.METRICS_STRING = '|ÉqÅ';\n\n/**\n * Baseline symbol for calculate font metrics.\n *\n * @static\n * @memberof PIXI.TextMetrics\n * @name BASELINE_SYMBOL\n * @type {string}\n * @default M\n */\nTextMetrics.BASELINE_SYMBOL = 'M';\n\n/**\n * Baseline multiplier for calculate font metrics.\n *\n * @static\n * @memberof PIXI.TextMetrics\n * @name BASELINE_MULTIPLIER\n * @type {number}\n * @default 1.4\n */\nTextMetrics.BASELINE_MULTIPLIER = 1.4;\n\n/**\n * Cache of new line chars.\n *\n * @memberof PIXI.TextMetrics\n * @type {number[]}\n * @private\n */\nTextMetrics._newlines = [\n 0x000A, // line feed\n 0x000D, // carriage return\n];\n\n/**\n * Cache of breaking spaces.\n *\n * @memberof PIXI.TextMetrics\n * @type {number[]}\n * @private\n */\nTextMetrics._breakingSpaces = [\n 0x0009, // character tabulation\n 0x0020, // space\n 0x2000, // en quad\n 0x2001, // em quad\n 0x2002, // en space\n 0x2003, // em space\n 0x2004, // three-per-em space\n 0x2005, // four-per-em space\n 0x2006, // six-per-em space\n 0x2008, // punctuation space\n 0x2009, // thin space\n 0x200A, // hair space\n 0x205F, // medium mathematical space\n 0x3000, // ideographic space\n];\n\n/**\n * A number, or a string containing a number.\n *\n * @memberof PIXI\n * @typedef IFontMetrics\n * @property {number} ascent - Font ascent\n * @property {number} descent - Font descent\n * @property {number} fontSize - Font size\n */\n","/* eslint max-depth: [2, 8] */\nimport { Sprite } from '@pixi/sprite';\nimport { Texture } from '@pixi/core';\nimport { settings } from '@pixi/settings';\nimport { Rectangle } from '@pixi/math';\nimport { sign, trimCanvas, hex2rgb, string2hex } from '@pixi/utils';\nimport { TEXT_GRADIENT } from './const';\nimport { TextStyle } from './TextStyle';\nimport { TextMetrics } from './TextMetrics';\n\nimport type { IDestroyOptions } from '@pixi/display';\nimport type { Renderer } from '@pixi/core';\nimport type { ITextStyle } from './TextStyle';\n\nconst defaultDestroyOptions: IDestroyOptions = {\n texture: true,\n children: false,\n baseTexture: true,\n};\n\n/**\n * A Text Object will create a line or multiple lines of text.\n *\n * The text is created using the [Canvas API](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API).\n *\n * The primary advantage of this class over BitmapText is that you have great control over the style of the next,\n * which you can change at runtime.\n *\n * The primary disadvantages is that each piece of text has it's own texture, which can use more memory.\n * When text changes, this texture has to be re-generated and re-uploaded to the GPU, taking up time.\n *\n * To split a line you can use '\\n' in your text string, or, on the `style` object,\n * change its `wordWrap` property to true and and give the `wordWrapWidth` property a value.\n *\n * A Text can be created directly from a string and a style object,\n * which can be generated [here](https://pixijs.io/pixi-text-style).\n *\n * ```js\n * let text = new PIXI.Text('This is a PixiJS text',{fontFamily : 'Arial', fontSize: 24, fill : 0xff1010, align : 'center'});\n * ```\n *\n * @class\n * @extends PIXI.Sprite\n * @memberof PIXI\n */\nexport class Text extends Sprite\n{\n public canvas: HTMLCanvasElement;\n public context: CanvasRenderingContext2D;\n public localStyleID: number;\n public dirty: boolean;\n\n _resolution: number;\n _autoResolution: boolean;\n protected _text: string;\n protected _font: string;\n protected _style: TextStyle;\n protected _styleListener: () => void;\n private _ownCanvas: boolean;\n\n /**\n * @param {string} text - The string that you would like the text to display\n * @param {object|PIXI.TextStyle} [style] - The style parameters\n * @param {HTMLCanvasElement} [canvas] - The canvas element for drawing text\n */\n constructor(text: string, style: Partial|TextStyle, canvas: HTMLCanvasElement)\n {\n let ownCanvas = false;\n\n if (!canvas)\n {\n canvas = document.createElement('canvas');\n ownCanvas = true;\n }\n\n canvas.width = 3;\n canvas.height = 3;\n\n const texture = Texture.from(canvas);\n\n texture.orig = new Rectangle();\n texture.trim = new Rectangle();\n\n super(texture);\n\n /**\n * Keep track if this Text object created it's own canvas\n * element (`true`) or uses the constructor argument (`false`).\n * Used to workaround a GC issues with Safari < 13 when\n * destroying Text. See `destroy` for more info.\n *\n * @member {boolean}\n * @private\n */\n this._ownCanvas = ownCanvas;\n\n /**\n * The canvas element that everything is drawn to\n *\n * @member {HTMLCanvasElement}\n */\n this.canvas = canvas;\n\n /**\n * The canvas 2d context that everything is drawn with\n * @member {CanvasRenderingContext2D}\n */\n this.context = this.canvas.getContext('2d');\n\n /**\n * The resolution / device pixel ratio of the canvas.\n * This is set to automatically match the renderer resolution by default, but can be overridden by setting manually.\n * @member {number}\n * @default 1\n */\n this._resolution = settings.RESOLUTION;\n this._autoResolution = true;\n\n /**\n * Private tracker for the current text.\n *\n * @member {string}\n * @private\n */\n this._text = null;\n\n /**\n * Private tracker for the current style.\n *\n * @member {object}\n * @private\n */\n this._style = null;\n /**\n * Private listener to track style changes.\n *\n * @member {Function}\n * @private\n */\n this._styleListener = null;\n\n /**\n * Private tracker for the current font.\n *\n * @member {string}\n * @private\n */\n this._font = '';\n\n this.text = text;\n this.style = style;\n\n this.localStyleID = -1;\n }\n\n /**\n * Renders text to its canvas, and updates its texture.\n * By default this is used internally to ensure the texture is correct before rendering,\n * but it can be used called externally, for example from this class to 'pre-generate' the texture from a piece of text,\n * and then shared across multiple Sprites.\n *\n * @param {boolean} respectDirty - Whether to abort updating the text if the Text isn't dirty and the function is called.\n */\n public updateText(respectDirty: boolean): void\n {\n const style = this._style;\n\n // check if style has changed..\n if (this.localStyleID !== style.styleID)\n {\n this.dirty = true;\n this.localStyleID = style.styleID;\n }\n\n if (!this.dirty && respectDirty)\n {\n return;\n }\n\n this._font = this._style.toFontString();\n\n const context = this.context;\n const measured = TextMetrics.measureText(this._text || ' ', this._style, this._style.wordWrap, this.canvas);\n const width = measured.width;\n const height = measured.height;\n const lines = measured.lines;\n const lineHeight = measured.lineHeight;\n const lineWidths = measured.lineWidths;\n const maxLineWidth = measured.maxLineWidth;\n const fontProperties = measured.fontProperties;\n\n this.canvas.width = Math.ceil((Math.max(1, width) + (style.padding * 2)) * this._resolution);\n this.canvas.height = Math.ceil((Math.max(1, height) + (style.padding * 2)) * this._resolution);\n\n context.scale(this._resolution, this._resolution);\n\n context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n\n context.font = this._font;\n context.lineWidth = style.strokeThickness;\n context.textBaseline = style.textBaseline;\n context.lineJoin = style.lineJoin;\n context.miterLimit = style.miterLimit;\n\n let linePositionX: number;\n let linePositionY: number;\n\n // require 2 passes if a shadow; the first to draw the drop shadow, the second to draw the text\n const passesCount = style.dropShadow ? 2 : 1;\n\n // For v4, we drew text at the colours of the drop shadow underneath the normal text. This gave the correct zIndex,\n // but features such as alpha and shadowblur did not look right at all, since we were using actual text as a shadow.\n //\n // For v5.0.0, we moved over to just use the canvas API for drop shadows, which made them look much nicer and more\n // visually please, but now because the stroke is drawn and then the fill, drop shadows would appear on both the fill\n // and the stroke; and fill drop shadows would appear over the top of the stroke.\n //\n // For v5.1.1, the new route is to revert to v4 style of drawing text first to get the drop shadows underneath normal\n // text, but instead drawing text in the correct location, we'll draw it off screen (-paddingY), and then adjust the\n // drop shadow so only that appears on screen (+paddingY). Now we'll have the correct draw order of the shadow\n // beneath the text, whilst also having the proper text shadow styling.\n for (let i = 0; i < passesCount; ++i)\n {\n const isShadowPass = style.dropShadow && i === 0;\n const dsOffsetText = isShadowPass ? height * 2 : 0; // we only want the drop shadow, so put text way off-screen\n const dsOffsetShadow = dsOffsetText * this.resolution;\n\n if (isShadowPass)\n {\n // On Safari, text with gradient and drop shadows together do not position correctly\n // if the scale of the canvas is not 1: https://bugs.webkit.org/show_bug.cgi?id=197689\n // Therefore we'll set the styles to be a plain black whilst generating this drop shadow\n context.fillStyle = 'black';\n context.strokeStyle = 'black';\n\n const dropShadowColor = style.dropShadowColor;\n const rgb = hex2rgb(typeof dropShadowColor === 'number' ? dropShadowColor : string2hex(dropShadowColor));\n\n context.shadowColor = `rgba(${rgb[0] * 255},${rgb[1] * 255},${rgb[2] * 255},${style.dropShadowAlpha})`;\n context.shadowBlur = style.dropShadowBlur;\n context.shadowOffsetX = Math.cos(style.dropShadowAngle) * style.dropShadowDistance;\n context.shadowOffsetY = (Math.sin(style.dropShadowAngle) * style.dropShadowDistance) + dsOffsetShadow;\n }\n else\n {\n // set canvas text styles\n context.fillStyle = this._generateFillStyle(style, lines, measured);\n // TODO: Can't have different types for getter and setter. The getter shouldn't have the number type as\n // the setter converts to string. See this thread for more details:\n // https://github.com/microsoft/TypeScript/issues/2521\n context.strokeStyle = style.stroke as string;\n\n context.shadowColor = '0';\n context.shadowBlur = 0;\n context.shadowOffsetX = 0;\n context.shadowOffsetY = 0;\n }\n\n // draw lines line by line\n for (let i = 0; i < lines.length; i++)\n {\n linePositionX = style.strokeThickness / 2;\n linePositionY = ((style.strokeThickness / 2) + (i * lineHeight)) + fontProperties.ascent;\n\n if (style.align === 'right')\n {\n linePositionX += maxLineWidth - lineWidths[i];\n }\n else if (style.align === 'center')\n {\n linePositionX += (maxLineWidth - lineWidths[i]) / 2;\n }\n\n if (style.stroke && style.strokeThickness)\n {\n this.drawLetterSpacing(\n lines[i],\n linePositionX + style.padding,\n linePositionY + style.padding - dsOffsetText,\n true\n );\n }\n\n if (style.fill)\n {\n this.drawLetterSpacing(\n lines[i],\n linePositionX + style.padding,\n linePositionY + style.padding - dsOffsetText\n );\n }\n }\n }\n\n this.updateTexture();\n }\n\n /**\n * Render the text with letter-spacing.\n * @param {string} text - The text to draw\n * @param {number} x - Horizontal position to draw the text\n * @param {number} y - Vertical position to draw the text\n * @param {boolean} [isStroke=false] - Is this drawing for the outside stroke of the\n * text? If not, it's for the inside fill\n * @private\n */\n private drawLetterSpacing(text: string, x: number, y: number, isStroke = false): void\n {\n const style = this._style;\n\n // letterSpacing of 0 means normal\n const letterSpacing = style.letterSpacing;\n\n if (letterSpacing === 0)\n {\n if (isStroke)\n {\n this.context.strokeText(text, x, y);\n }\n else\n {\n this.context.fillText(text, x, y);\n }\n\n return;\n }\n\n let currentPosition = x;\n\n // Using Array.from correctly splits characters whilst keeping emoji together.\n // This is not supported on IE as it requires ES6, so regular text splitting occurs.\n // This also doesn't account for emoji that are multiple emoji put together to make something else.\n // Handling all of this would require a big library itself.\n // https://medium.com/@giltayar/iterating-over-emoji-characters-the-es6-way-f06e4589516\n // https://github.com/orling/grapheme-splitter\n const stringArray = Array.from ? Array.from(text) : text.split('');\n let previousWidth = this.context.measureText(text).width;\n let currentWidth = 0;\n\n for (let i = 0; i < stringArray.length; ++i)\n {\n const currentChar = stringArray[i];\n\n if (isStroke)\n {\n this.context.strokeText(currentChar, currentPosition, y);\n }\n else\n {\n this.context.fillText(currentChar, currentPosition, y);\n }\n currentWidth = this.context.measureText(text.substring(i + 1)).width;\n currentPosition += previousWidth - currentWidth + letterSpacing;\n previousWidth = currentWidth;\n }\n }\n\n /**\n * Updates texture size based on canvas size\n *\n * @private\n */\n private updateTexture(): void\n {\n const canvas = this.canvas;\n\n if (this._style.trim)\n {\n const trimmed = trimCanvas(canvas);\n\n if (trimmed.data)\n {\n canvas.width = trimmed.width;\n canvas.height = trimmed.height;\n this.context.putImageData(trimmed.data, 0, 0);\n }\n }\n\n const texture = this._texture;\n const style = this._style;\n const padding = style.trim ? 0 : style.padding;\n const baseTexture = texture.baseTexture;\n\n texture.trim.width = texture._frame.width = Math.ceil(canvas.width / this._resolution);\n texture.trim.height = texture._frame.height = Math.ceil(canvas.height / this._resolution);\n texture.trim.x = -padding;\n texture.trim.y = -padding;\n\n texture.orig.width = texture._frame.width - (padding * 2);\n texture.orig.height = texture._frame.height - (padding * 2);\n\n // call sprite onTextureUpdate to update scale if _width or _height were set\n this._onTextureUpdate();\n\n baseTexture.setRealSize(canvas.width, canvas.height, this._resolution);\n\n // Recursively updates transform of all objects from the root to this one\n this._recursivePostUpdateTransform();\n\n this.dirty = false;\n }\n\n /**\n * Renders the object using the WebGL renderer\n *\n * @protected\n * @param {PIXI.Renderer} renderer - The renderer\n */\n protected _render(renderer: Renderer): void\n {\n if (this._autoResolution && this._resolution !== renderer.resolution)\n {\n this._resolution = renderer.resolution;\n this.dirty = true;\n }\n\n this.updateText(true);\n\n super._render(renderer);\n }\n\n /**\n * Gets the local bounds of the text object.\n *\n * @param {PIXI.Rectangle} rect - The output rectangle.\n * @return {PIXI.Rectangle} The bounds.\n */\n public getLocalBounds(rect: Rectangle): Rectangle\n {\n this.updateText(true);\n\n return super.getLocalBounds.call(this, rect);\n }\n\n /**\n * calculates the bounds of the Text as a rectangle. The bounds calculation takes the worldTransform into account.\n * @protected\n */\n protected _calculateBounds(): void\n {\n this.updateText(true);\n this.calculateVertices();\n // if we have already done this on THIS frame.\n this._bounds.addQuad(this.vertexData);\n }\n\n /**\n * Generates the fill style. Can automatically generate a gradient based on the fill style being an array\n *\n * @private\n * @param {object} style - The style.\n * @param {string[]} lines - The lines of text.\n * @return {string|number|CanvasGradient} The fill style\n */\n private _generateFillStyle(style: TextStyle, lines: string[], metrics: TextMetrics): string|CanvasGradient|CanvasPattern\n {\n // TODO: Can't have different types for getter and setter. The getter shouldn't have the number type as\n // the setter converts to string. See this thread for more details:\n // https://github.com/microsoft/TypeScript/issues/2521\n const fillStyle: string|string[]|CanvasGradient|CanvasPattern = style.fill as any;\n\n if (!Array.isArray(fillStyle))\n {\n return fillStyle;\n }\n else if (fillStyle.length === 1)\n {\n return fillStyle[0];\n }\n\n // the gradient will be evenly spaced out according to how large the array is.\n // ['#FF0000', '#00FF00', '#0000FF'] would created stops at 0.25, 0.5 and 0.75\n let gradient: string[]|CanvasGradient;\n\n // a dropshadow will enlarge the canvas and result in the gradient being\n // generated with the incorrect dimensions\n const dropShadowCorrection = (style.dropShadow) ? style.dropShadowDistance : 0;\n\n // should also take padding into account, padding can offset the gradient\n const padding = style.padding || 0;\n\n const width = Math.ceil(this.canvas.width / this._resolution) - dropShadowCorrection - (padding * 2);\n const height = Math.ceil(this.canvas.height / this._resolution) - dropShadowCorrection - (padding * 2);\n\n // make a copy of the style settings, so we can manipulate them later\n const fill = fillStyle.slice();\n const fillGradientStops = style.fillGradientStops.slice();\n\n // wanting to evenly distribute the fills. So an array of 4 colours should give fills of 0.25, 0.5 and 0.75\n if (!fillGradientStops.length)\n {\n const lengthPlus1 = fill.length + 1;\n\n for (let i = 1; i < lengthPlus1; ++i)\n {\n fillGradientStops.push(i / lengthPlus1);\n }\n }\n\n // stop the bleeding of the last gradient on the line above to the top gradient of the this line\n // by hard defining the first gradient colour at point 0, and last gradient colour at point 1\n fill.unshift(fillStyle[0]);\n fillGradientStops.unshift(0);\n\n fill.push(fillStyle[fillStyle.length - 1]);\n fillGradientStops.push(1);\n\n if (style.fillGradientType === TEXT_GRADIENT.LINEAR_VERTICAL)\n {\n // start the gradient at the top center of the canvas, and end at the bottom middle of the canvas\n gradient = this.context.createLinearGradient(width / 2, padding, width / 2, height + padding);\n\n // we need to repeat the gradient so that each individual line of text has the same vertical gradient effect\n // ['#FF0000', '#00FF00', '#0000FF'] over 2 lines would create stops at 0.125, 0.25, 0.375, 0.625, 0.75, 0.875\n\n // There's potential for floating point precision issues at the seams between gradient repeats.\n // The loop below generates the stops in order, so track the last generated one to prevent\n // floating point precision from making us go the teeniest bit backwards, resulting in\n // the first and last colors getting swapped.\n let lastIterationStop = 0;\n\n // Actual height of the text itself, not counting spacing for lineHeight/leading/dropShadow etc\n const textHeight = metrics.fontProperties.fontSize + style.strokeThickness;\n\n // textHeight, but as a 0-1 size in global gradient stop space\n const gradStopLineHeight = textHeight / height;\n\n for (let i = 0; i < lines.length; i++)\n {\n const thisLineTop = metrics.lineHeight * i;\n\n for (let j = 0; j < fill.length; j++)\n {\n // 0-1 stop point for the current line, multiplied to global space afterwards\n let lineStop = 0;\n\n if (typeof fillGradientStops[j] === 'number')\n {\n lineStop = fillGradientStops[j];\n }\n else\n {\n lineStop = j / fill.length;\n }\n\n const globalStop = (thisLineTop / height) + (lineStop * gradStopLineHeight);\n\n // Prevent color stop generation going backwards from floating point imprecision\n let clampedStop = Math.max(lastIterationStop, globalStop);\n\n clampedStop = Math.min(clampedStop, 1); // Cap at 1 as well for safety's sake to avoid a possible throw.\n gradient.addColorStop(clampedStop, fill[j]);\n lastIterationStop = clampedStop;\n }\n }\n }\n else\n {\n // start the gradient at the center left of the canvas, and end at the center right of the canvas\n gradient = this.context.createLinearGradient(padding, height / 2, width + padding, height / 2);\n\n // can just evenly space out the gradients in this case, as multiple lines makes no difference\n // to an even left to right gradient\n const totalIterations = fill.length + 1;\n let currentIteration = 1;\n\n for (let i = 0; i < fill.length; i++)\n {\n let stop: number;\n\n if (typeof fillGradientStops[i] === 'number')\n {\n stop = fillGradientStops[i];\n }\n else\n {\n stop = currentIteration / totalIterations;\n }\n gradient.addColorStop(stop, fill[i]);\n currentIteration++;\n }\n }\n\n return gradient;\n }\n\n /**\n * Destroys this text object.\n * Note* Unlike a Sprite, a Text object will automatically destroy its baseTexture and texture as\n * the majority of the time the texture will not be shared with any other Sprites.\n *\n * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options\n * have been set to that value\n * @param {boolean} [options.children=false] - if set to true, all the children will have their\n * destroy method called as well. 'options' will be passed on to those calls.\n * @param {boolean} [options.texture=true] - Should it destroy the current texture of the sprite as well\n * @param {boolean} [options.baseTexture=true] - Should it destroy the base texture of the sprite as well\n */\n public destroy(options: IDestroyOptions|boolean): void\n {\n if (typeof options === 'boolean')\n {\n options = { children: options };\n }\n\n options = Object.assign({}, defaultDestroyOptions, options);\n\n super.destroy(options);\n\n // set canvas width and height to 0 to workaround memory leak in Safari < 13\n // https://stackoverflow.com/questions/52532614/total-canvas-memory-use-exceeds-the-maximum-limit-safari-12\n if (this._ownCanvas)\n {\n this.canvas.height = this.canvas.width = 0;\n }\n\n // make sure to reset the the context and canvas.. dont want this hanging around in memory!\n this.context = null;\n this.canvas = null;\n\n this._style = null;\n }\n\n /**\n * The width of the Text, setting this will actually modify the scale to achieve the value set\n *\n * @member {number}\n */\n get width(): number\n {\n this.updateText(true);\n\n return Math.abs(this.scale.x) * this._texture.orig.width;\n }\n\n set width(value: number)\n {\n this.updateText(true);\n\n const s = sign(this.scale.x) || 1;\n\n this.scale.x = s * value / this._texture.orig.width;\n this._width = value;\n }\n\n /**\n * The height of the Text, setting this will actually modify the scale to achieve the value set\n *\n * @member {number}\n */\n get height(): number\n {\n this.updateText(true);\n\n return Math.abs(this.scale.y) * this._texture.orig.height;\n }\n\n set height(value: number)\n {\n this.updateText(true);\n\n const s = sign(this.scale.y) || 1;\n\n this.scale.y = s * value / this._texture.orig.height;\n this._height = value;\n }\n\n /**\n * Set the style of the text. Set up an event listener to listen for changes on the style\n * object and mark the text as dirty.\n *\n * @member {object|PIXI.TextStyle}\n */\n get style(): TextStyle|Partial\n {\n // TODO: Can't have different types for getter and setter. The getter shouldn't have the ITextStyle\n // since the setter creates the TextStyle. See this thread for more details:\n // https://github.com/microsoft/TypeScript/issues/2521\n return this._style;\n }\n\n set style(style: TextStyle|Partial)\n {\n style = style || {};\n\n if (style instanceof TextStyle)\n {\n this._style = style;\n }\n else\n {\n this._style = new TextStyle(style);\n }\n\n this.localStyleID = -1;\n this.dirty = true;\n }\n\n /**\n * Set the copy for the text object. To split a line you can use '\\n'.\n *\n * @member {string}\n */\n get text(): string\n {\n return this._text;\n }\n\n set text(text: string)\n {\n text = String(text === null || text === undefined ? '' : text);\n\n if (this._text === text)\n {\n return;\n }\n this._text = text;\n this.dirty = true;\n }\n\n /**\n * The resolution / device pixel ratio of the canvas.\n * This is set to automatically match the renderer resolution by default, but can be overridden by setting manually.\n * @member {number}\n * @default 1\n */\n get resolution(): number\n {\n return this._resolution;\n }\n\n set resolution(value: number)\n {\n this._autoResolution = false;\n\n if (this._resolution === value)\n {\n return;\n }\n\n this._resolution = value;\n this.dirty = true;\n }\n}\n","/**\n * CountLimiter limits the number of items handled by a {@link PIXI.BasePrepare} to a specified\n * number of items per frame.\n *\n * @class\n * @memberof PIXI\n */\nexport class CountLimiter\n{\n public maxItemsPerFrame: number;\n public itemsLeft: number;\n /**\n * @param {number} maxItemsPerFrame - The maximum number of items that can be prepared each frame.\n */\n constructor(maxItemsPerFrame: number)\n {\n /**\n * The maximum number of items that can be prepared each frame.\n * @type {number}\n * @private\n */\n this.maxItemsPerFrame = maxItemsPerFrame;\n /**\n * The number of items that can be prepared in the current frame.\n * @type {number}\n * @private\n */\n this.itemsLeft = 0;\n }\n\n /**\n * Resets any counting properties to start fresh on a new frame.\n */\n beginFrame(): void\n {\n this.itemsLeft = this.maxItemsPerFrame;\n }\n\n /**\n * Checks to see if another item can be uploaded. This should only be called once per item.\n * @return {boolean} If the item is allowed to be uploaded.\n */\n allowedToUpload(): boolean\n {\n return this.itemsLeft-- > 0;\n }\n}\n","import { Texture, BaseTexture } from '@pixi/core';\nimport { Ticker, UPDATE_PRIORITY } from '@pixi/ticker';\nimport { settings } from '@pixi/settings';\nimport { Container, DisplayObject } from '@pixi/display';\nimport { Text, TextStyle, TextMetrics } from '@pixi/text';\nimport { CountLimiter } from './CountLimiter';\n\nimport type { AbstractRenderer } from '@pixi/core';\n\ninterface IArrowFunction {\n (): void;\n}\ninterface IUploadHook {\n (helper: AbstractRenderer | BasePrepare, item: IDisplayObjectExtended): boolean;\n}\n\ninterface IFindHook {\n (item: any, queue: Array): boolean;\n}\n\nexport interface IDisplayObjectExtended extends DisplayObject {\n _textures?: Array;\n _texture?: Texture;\n style?: TextStyle;\n}\n\n/**\n * Built-in hook to find multiple textures from objects like AnimatedSprites.\n *\n * @private\n * @param {PIXI.DisplayObject} item - Display object to check\n * @param {Array<*>} queue - Collection of items to upload\n * @return {boolean} if a PIXI.Texture object was found.\n */\n\nfunction findMultipleBaseTextures(item: IDisplayObjectExtended, queue: Array): boolean\n{\n let result = false;\n\n // Objects with multiple textures\n if (item && item._textures && item._textures.length)\n {\n for (let i = 0; i < item._textures.length; i++)\n {\n if (item._textures[i] instanceof Texture)\n {\n const baseTexture = item._textures[i].baseTexture;\n\n if (queue.indexOf(baseTexture) === -1)\n {\n queue.push(baseTexture);\n result = true;\n }\n }\n }\n }\n\n return result;\n}\n\n/**\n * Built-in hook to find BaseTextures from Texture.\n *\n * @private\n * @param {PIXI.Texture} item - Display object to check\n * @param {Array<*>} queue - Collection of items to upload\n * @return {boolean} if a PIXI.Texture object was found.\n */\nfunction findBaseTexture(item: Texture, queue: Array): boolean\n{\n if (item.baseTexture instanceof BaseTexture)\n {\n const texture = item.baseTexture;\n\n if (queue.indexOf(texture) === -1)\n {\n queue.push(texture);\n }\n\n return true;\n }\n\n return false;\n}\n\n/**\n * Built-in hook to find textures from objects.\n *\n * @private\n * @param {PIXI.DisplayObject} item - Display object to check\n * @param {Array<*>} queue - Collection of items to upload\n * @return {boolean} if a PIXI.Texture object was found.\n */\nfunction findTexture(item: IDisplayObjectExtended, queue: Array): boolean\n{\n if (item._texture && item._texture instanceof Texture)\n {\n const texture = item._texture.baseTexture;\n\n if (queue.indexOf(texture) === -1)\n {\n queue.push(texture);\n }\n\n return true;\n }\n\n return false;\n}\n\n/**\n * Built-in hook to draw PIXI.Text to its texture.\n *\n * @private\n * @param {PIXI.AbstractRenderer|PIXI.BasePrepare} helper - Not used by this upload handler\n * @param {PIXI.DisplayObject} item - Item to check\n * @return {boolean} If item was uploaded.\n */\nfunction drawText(_helper: AbstractRenderer | BasePrepare, item: IDisplayObjectExtended): boolean\n{\n if (item instanceof Text)\n {\n // updating text will return early if it is not dirty\n item.updateText(true);\n\n return true;\n }\n\n return false;\n}\n\n/**\n * Built-in hook to calculate a text style for a PIXI.Text object.\n *\n * @private\n * @param {PIXI.AbstractRenderer|PIXI.BasePrepare} helper - Not used by this upload handler\n * @param {PIXI.DisplayObject} item - Item to check\n * @return {boolean} If item was uploaded.\n */\nfunction calculateTextStyle(_helper: AbstractRenderer | BasePrepare, item: IDisplayObjectExtended): boolean\n{\n if (item instanceof TextStyle)\n {\n const font = item.toFontString();\n\n TextMetrics.measureFont(font);\n\n return true;\n }\n\n return false;\n}\n\n/**\n * Built-in hook to find Text objects.\n *\n * @private\n * @param {PIXI.DisplayObject} item - Display object to check\n * @param {Array<*>} queue - Collection of items to upload\n * @return {boolean} if a PIXI.Text object was found.\n */\nfunction findText(item: IDisplayObjectExtended, queue: Array): boolean\n{\n if (item instanceof Text)\n {\n // push the text style to prepare it - this can be really expensive\n if (queue.indexOf(item.style) === -1)\n {\n queue.push(item.style);\n }\n // also push the text object so that we can render it (to canvas/texture) if needed\n if (queue.indexOf(item) === -1)\n {\n queue.push(item);\n }\n // also push the Text's texture for upload to GPU\n const texture = item._texture.baseTexture;\n\n if (queue.indexOf(texture) === -1)\n {\n queue.push(texture);\n }\n\n return true;\n }\n\n return false;\n}\n\n/**\n * Built-in hook to find TextStyle objects.\n *\n * @private\n * @param {PIXI.TextStyle} item - Display object to check\n * @param {Array<*>} queue - Collection of items to upload\n * @return {boolean} if a PIXI.TextStyle object was found.\n */\nfunction findTextStyle(item: TextStyle, queue: Array): boolean\n{\n if (item instanceof TextStyle)\n {\n if (queue.indexOf(item) === -1)\n {\n queue.push(item);\n }\n\n return true;\n }\n\n return false;\n}\n\n/**\n * The prepare manager provides functionality to upload content to the GPU.\n *\n * BasePrepare handles basic queuing functionality and is extended by\n * {@link PIXI.Prepare} and {@link PIXI.CanvasPrepare}\n * to provide preparation capabilities specific to their respective renderers.\n *\n * @example\n * // Create a sprite\n * const sprite = PIXI.Sprite.from('something.png');\n *\n * // Load object into GPU\n * app.renderer.plugins.prepare.upload(sprite, () => {\n *\n * //Texture(s) has been uploaded to GPU\n * app.stage.addChild(sprite);\n *\n * })\n *\n * @abstract\n * @class\n * @memberof PIXI\n */\nexport class BasePrepare\n{\n private limiter: CountLimiter;\n protected renderer: AbstractRenderer;\n protected uploadHookHelper: any;\n protected queue: Array;\n public addHooks: Array;\n public uploadHooks: Array;\n public completes: Array;\n public ticking: boolean;\n private delayedTick: IArrowFunction;\n /**\n * @param {PIXI.AbstractRenderer} renderer - A reference to the current renderer\n */\n constructor(renderer: AbstractRenderer)\n {\n /**\n * The limiter to be used to control how quickly items are prepared.\n * @type {PIXI.CountLimiter|PIXI.TimeLimiter}\n */\n this.limiter = new CountLimiter(settings.UPLOADS_PER_FRAME);\n\n /**\n * Reference to the renderer.\n * @type {PIXI.AbstractRenderer}\n * @protected\n */\n this.renderer = renderer;\n\n /**\n * The only real difference between CanvasPrepare and Prepare is what they pass\n * to upload hooks. That different parameter is stored here.\n * @type {object}\n * @protected\n */\n this.uploadHookHelper = null;\n\n /**\n * Collection of items to uploads at once.\n * @type {Array<*>}\n * @private\n */\n this.queue = [];\n\n /**\n * Collection of additional hooks for finding assets.\n * @type {Array}\n * @private\n */\n this.addHooks = [];\n\n /**\n * Collection of additional hooks for processing assets.\n * @type {Array}\n * @private\n */\n this.uploadHooks = [];\n\n /**\n * Callback to call after completed.\n * @type {Array}\n * @private\n */\n this.completes = [];\n\n /**\n * If prepare is ticking (running).\n * @type {boolean}\n * @private\n */\n this.ticking = false;\n\n /**\n * 'bound' call for prepareItems().\n * @type {Function}\n * @private\n */\n this.delayedTick = (): void =>\n {\n // unlikely, but in case we were destroyed between tick() and delayedTick()\n if (!this.queue)\n {\n return;\n }\n this.prepareItems();\n };\n\n // hooks to find the correct texture\n this.registerFindHook(findText);\n this.registerFindHook(findTextStyle);\n this.registerFindHook(findMultipleBaseTextures);\n this.registerFindHook(findBaseTexture);\n this.registerFindHook(findTexture);\n\n // upload hooks\n this.registerUploadHook(drawText);\n this.registerUploadHook(calculateTextStyle);\n }\n\n /**\n * Upload all the textures and graphics to the GPU.\n *\n * @param {Function|PIXI.DisplayObject|PIXI.Container|PIXI.BaseTexture|PIXI.Texture|PIXI.Graphics|PIXI.Text} item -\n * Either the container or display object to search for items to upload, the items to upload themselves,\n * or the callback function, if items have been added using `prepare.add`.\n * @param {Function} [done] - Optional callback when all queued uploads have completed\n */\n upload(item: IDisplayObjectExtended | IUploadHook | IFindHook | (() => void), done: () => void): void\n {\n if (typeof item === 'function')\n {\n done = item as () => void;\n item = null;\n }\n\n // If a display object, search for items\n // that we could upload\n if (item)\n {\n this.add(item as IDisplayObjectExtended | IUploadHook | IFindHook);\n }\n\n // Get the items for upload from the display\n if (this.queue.length)\n {\n if (done)\n {\n this.completes.push(done);\n }\n\n if (!this.ticking)\n {\n this.ticking = true;\n Ticker.system.addOnce(this.tick, this, UPDATE_PRIORITY.UTILITY);\n }\n }\n else if (done)\n {\n done();\n }\n }\n\n /**\n * Handle tick update\n *\n * @private\n */\n tick(): void\n {\n setTimeout(this.delayedTick, 0);\n }\n\n /**\n * Actually prepare items. This is handled outside of the tick because it will take a while\n * and we do NOT want to block the current animation frame from rendering.\n *\n * @private\n */\n prepareItems(): void\n {\n this.limiter.beginFrame();\n // Upload the graphics\n while (this.queue.length && this.limiter.allowedToUpload())\n {\n const item = this.queue[0];\n let uploaded = false;\n\n if (item && !item._destroyed)\n {\n for (let i = 0, len = this.uploadHooks.length; i < len; i++)\n {\n if (this.uploadHooks[i](this.uploadHookHelper, item))\n {\n this.queue.shift();\n uploaded = true;\n break;\n }\n }\n }\n\n if (!uploaded)\n {\n this.queue.shift();\n }\n }\n\n // We're finished\n if (!this.queue.length)\n {\n this.ticking = false;\n\n const completes = this.completes.slice(0);\n\n this.completes.length = 0;\n\n for (let i = 0, len = completes.length; i < len; i++)\n {\n completes[i]();\n }\n }\n else\n {\n // if we are not finished, on the next rAF do this again\n Ticker.system.addOnce(this.tick, this, UPDATE_PRIORITY.UTILITY);\n }\n }\n\n /**\n * Adds hooks for finding items.\n *\n * @param {Function} addHook - Function call that takes two parameters: `item:*, queue:Array`\n * function must return `true` if it was able to add item to the queue.\n * @return {this} Instance of plugin for chaining.\n */\n registerFindHook(addHook: IFindHook): this\n {\n if (addHook)\n {\n this.addHooks.push(addHook);\n }\n\n return this;\n }\n\n /**\n * Adds hooks for uploading items.\n *\n * @param {Function} uploadHook - Function call that takes two parameters: `prepare:CanvasPrepare, item:*` and\n * function must return `true` if it was able to handle upload of item.\n * @return {this} Instance of plugin for chaining.\n */\n registerUploadHook(uploadHook: IUploadHook): this\n {\n if (uploadHook)\n {\n this.uploadHooks.push(uploadHook);\n }\n\n return this;\n }\n\n /**\n * Manually add an item to the uploading queue.\n *\n * @param {PIXI.DisplayObject|PIXI.Container|PIXI.BaseTexture|PIXI.Texture|PIXI.Graphics|PIXI.Text|*} item - Object to\n * add to the queue\n * @return {this} Instance of plugin for chaining.\n */\n add(item: IDisplayObjectExtended | IUploadHook | IFindHook): this\n {\n // Add additional hooks for finding elements on special\n // types of objects that\n for (let i = 0, len = this.addHooks.length; i < len; i++)\n {\n if (this.addHooks[i](item, this.queue))\n {\n break;\n }\n }\n\n // Get children recursively\n if (item instanceof Container)\n {\n for (let i = item.children.length - 1; i >= 0; i--)\n {\n this.add(item.children[i]);\n }\n }\n\n return this;\n }\n\n /**\n * Destroys the plugin, don't use after this.\n *\n */\n destroy(): void\n {\n if (this.ticking)\n {\n Ticker.system.remove(this.tick, this);\n }\n this.ticking = false;\n this.addHooks = null;\n this.uploadHooks = null;\n this.renderer = null;\n this.completes = null;\n this.queue = null;\n this.limiter = null;\n this.uploadHookHelper = null;\n }\n}\n","import { BaseTexture } from '@pixi/core';\nimport { Graphics } from '@pixi/graphics';\nimport { BasePrepare, IDisplayObjectExtended } from './BasePrepare';\n\nimport type { AbstractRenderer, Renderer } from '@pixi/core';\n\n/**\n * Built-in hook to upload PIXI.Texture objects to the GPU.\n *\n * @private\n * @param {PIXI.Renderer} renderer - instance of the webgl renderer\n * @param {PIXI.BaseTexture} item - Item to check\n * @return {boolean} If item was uploaded.\n */\nfunction uploadBaseTextures(renderer: AbstractRenderer | BasePrepare, item: IDisplayObjectExtended | BaseTexture): boolean\n{\n if (item instanceof BaseTexture)\n {\n // if the texture already has a GL texture, then the texture has been prepared or rendered\n // before now. If the texture changed, then the changer should be calling texture.update() which\n // reuploads the texture without need for preparing it again\n if (!item._glTextures[(renderer as Renderer).CONTEXT_UID])\n {\n (renderer as Renderer).texture.bind(item);\n }\n\n return true;\n }\n\n return false;\n}\n\n/**\n * Built-in hook to upload PIXI.Graphics to the GPU.\n *\n * @private\n * @param {PIXI.Renderer} renderer - instance of the webgl renderer\n * @param {PIXI.DisplayObject} item - Item to check\n * @return {boolean} If item was uploaded.\n */\nfunction uploadGraphics(renderer: AbstractRenderer | BasePrepare, item: IDisplayObjectExtended): boolean\n{\n if (!(item instanceof Graphics))\n {\n return false;\n }\n\n const { geometry } = item;\n\n // update dirty graphics to get batches\n item.finishPoly();\n geometry.updateBatches();\n\n const { batches } = geometry;\n\n // upload all textures found in styles\n for (let i = 0; i < batches.length; i++)\n {\n const { texture } = batches[i].style;\n\n if (texture)\n {\n uploadBaseTextures(renderer, texture.baseTexture);\n }\n }\n\n // if its not batchable - update vao for particular shader\n if (!geometry.batchable)\n {\n (renderer as Renderer).geometry.bind(geometry, (item as any)._resolveDirectShader((renderer as Renderer)));\n }\n\n return true;\n}\n\n/**\n * Built-in hook to find graphics.\n *\n * @private\n * @param {PIXI.DisplayObject} item - Display object to check\n * @param {Array<*>} queue - Collection of items to upload\n * @return {boolean} if a PIXI.Graphics object was found.\n */\nfunction findGraphics(item: IDisplayObjectExtended, queue: Array): boolean\n{\n if (item instanceof Graphics)\n {\n queue.push(item);\n\n return true;\n }\n\n return false;\n}\n\n/**\n * The prepare plugin provides renderer-specific plugins for pre-rendering DisplayObjects. These plugins are useful for\n * asynchronously preparing and uploading to the GPU assets, textures, graphics waiting to be displayed.\n *\n * Do not instantiate this plugin directly. It is available from the `renderer.plugins` property.\n * See {@link PIXI.CanvasRenderer#plugins} or {@link PIXI.Renderer#plugins}.\n * @example\n * // Create a new application\n * const app = new PIXI.Application();\n * document.body.appendChild(app.view);\n *\n * // Don't start rendering right away\n * app.stop();\n *\n * // create a display object\n * const rect = new PIXI.Graphics()\n * .beginFill(0x00ff00)\n * .drawRect(40, 40, 200, 200);\n *\n * // Add to the stage\n * app.stage.addChild(rect);\n *\n * // Don't start rendering until the graphic is uploaded to the GPU\n * app.renderer.plugins.prepare.upload(app.stage, () => {\n * app.start();\n * });\n *\n * @class\n * @extends PIXI.BasePrepare\n * @memberof PIXI\n */\nexport class Prepare extends BasePrepare\n{\n /**\n * @param {PIXI.Renderer} renderer - A reference to the current renderer\n */\n constructor(renderer: Renderer)\n {\n super(renderer);\n\n this.uploadHookHelper = this.renderer;\n\n // Add textures and graphics to upload\n this.registerFindHook(findGraphics);\n this.registerUploadHook(uploadBaseTextures);\n this.registerUploadHook(uploadGraphics);\n }\n}\n","/**\n * TimeLimiter limits the number of items handled by a {@link PIXI.BasePrepare} to a specified\n * number of milliseconds per frame.\n *\n * @class\n * @memberof PIXI\n */\nexport class TimeLimiter\n{\n public maxMilliseconds: number;\n public frameStart: number;\n /**\n * @param {number} maxMilliseconds - The maximum milliseconds that can be spent preparing items each frame.\n */\n constructor(maxMilliseconds: number)\n {\n /**\n * The maximum milliseconds that can be spent preparing items each frame.\n * @type {number}\n * @private\n */\n this.maxMilliseconds = maxMilliseconds;\n /**\n * The start time of the current frame.\n * @type {number}\n * @private\n */\n this.frameStart = 0;\n }\n\n /**\n * Resets any counting properties to start fresh on a new frame.\n */\n beginFrame(): void\n {\n this.frameStart = Date.now();\n }\n\n /**\n * Checks to see if another item can be uploaded. This should only be called once per item.\n * @return {boolean} If the item is allowed to be uploaded.\n */\n allowedToUpload(): boolean\n {\n return Date.now() - this.frameStart < this.maxMilliseconds;\n }\n}\n","import { Rectangle } from '@pixi/math';\nimport { Texture, BaseTexture } from '@pixi/core';\nimport { getResolutionOfUrl } from '@pixi/utils';\nimport type { Dict } from '@pixi/utils';\nimport type { resources } from '@pixi/core';\nimport type { IPointData } from '@pixi/math';\n\n/**\n * Represents the JSON data for a spritesheet atlas.\n */\nexport interface ISpritesheetFrameData {\n frame: {\n x: number;\n y: number;\n w: number;\n h: number;\n };\n trimmed?: boolean;\n rotated?: boolean;\n sourceSize?: {\n w: number;\n h: number;\n };\n spriteSourceSize?: {\n x: number;\n y: number;\n };\n anchor?: IPointData;\n}\n\n/**\n * Atlas format.\n */\nexport interface ISpritesheetData {\n frames: Dict;\n animations?: Dict;\n meta: {\n scale: string;\n };\n}\n\n/**\n * Utility class for maintaining reference to a collection\n * of Textures on a single Spritesheet.\n *\n * To access a sprite sheet from your code pass its JSON data file to Pixi's loader:\n *\n * ```js\n * PIXI.Loader.shared.add(\"images/spritesheet.json\").load(setup);\n *\n * function setup() {\n * let sheet = PIXI.Loader.shared.resources[\"images/spritesheet.json\"].spritesheet;\n * ...\n * }\n * ```\n * With the `sheet.textures` you can create Sprite objects,`sheet.animations` can be used to create an AnimatedSprite.\n *\n * Sprite sheets can be packed using tools like {@link https://codeandweb.com/texturepacker|TexturePacker},\n * {@link https://renderhjs.net/shoebox/|Shoebox} or {@link https://github.com/krzysztof-o/spritesheet.js|Spritesheet.js}.\n * Default anchor points (see {@link PIXI.Texture#defaultAnchor}) and grouping of animation sprites are currently only\n * supported by TexturePacker.\n *\n * @class\n * @memberof PIXI\n */\nexport class Spritesheet\n{\n /**\n * The maximum number of Textures to build per process.\n *\n * @type {number}\n * @default 1000\n */\n static readonly BATCH_SIZE = 1000;\n\n public baseTexture: BaseTexture;\n public textures: Dict;\n public animations: Dict;\n public data: ISpritesheetData;\n public resolution: number;\n\n private _texture: Texture;\n private _frames: Dict;\n private _frameKeys: string[];\n private _batchIndex: number;\n private _callback: (textures: Dict) => void;\n\n /**\n * @param {PIXI.BaseTexture|PIXI.Texture} baseTexture - Reference to the source BaseTexture object.\n * @param {Object} data - Spritesheet image data.\n * @param {string} [resolutionFilename] - The filename to consider when determining\n * the resolution of the spritesheet. If not provided, the imageUrl will\n * be used on the BaseTexture.\n */\n constructor(texture: BaseTexture | Texture, data: ISpritesheetData, resolutionFilename: string = null)\n {\n /**\n * Reference to original source image from the Loader. This reference is retained so we\n * can destroy the Texture later on. It is never used internally.\n * @type {PIXI.Texture}\n * @private\n */\n this._texture = texture instanceof Texture ? texture : null;\n\n /**\n * Reference to ths source texture.\n * @type {PIXI.BaseTexture}\n */\n this.baseTexture = texture instanceof BaseTexture ? texture : this._texture.baseTexture;\n\n /**\n * A map containing all textures of the sprite sheet.\n * Can be used to create a {@link PIXI.Sprite|Sprite}:\n * ```js\n * new PIXI.Sprite(sheet.textures[\"image.png\"]);\n * ```\n * @member {Object}\n */\n this.textures = {};\n\n /**\n * A map containing the textures for each animation.\n * Can be used to create an {@link PIXI.AnimatedSprite|AnimatedSprite}:\n * ```js\n * new PIXI.AnimatedSprite(sheet.animations[\"anim_name\"])\n * ```\n * @member {Object}\n */\n this.animations = {};\n\n /**\n * Reference to the original JSON data.\n * @type {Object}\n */\n this.data = data;\n\n const resource = this.baseTexture.resource as resources.ImageResource;\n\n /**\n * The resolution of the spritesheet.\n * @type {number}\n */\n this.resolution = this._updateResolution(resolutionFilename || (resource ? resource.url : null));\n\n /**\n * Map of spritesheet frames.\n * @type {Object}\n * @private\n */\n this._frames = this.data.frames;\n\n /**\n * Collection of frame names.\n * @type {string[]}\n * @private\n */\n this._frameKeys = Object.keys(this._frames);\n\n /**\n * Current batch index being processed.\n * @type {number}\n * @private\n */\n this._batchIndex = 0;\n\n /**\n * Callback when parse is completed.\n * @type {Function}\n * @private\n */\n this._callback = null;\n }\n\n /**\n * Generate the resolution from the filename or fallback\n * to the meta.scale field of the JSON data.\n *\n * @private\n * @param {string} resolutionFilename - The filename to use for resolving\n * the default resolution.\n * @return {number} Resolution to use for spritesheet.\n */\n private _updateResolution(resolutionFilename: string = null): number\n {\n const { scale } = this.data.meta;\n\n // Use a defaultValue of `null` to check if a url-based resolution is set\n let resolution = getResolutionOfUrl(resolutionFilename, null);\n\n // No resolution found via URL\n if (resolution === null)\n {\n // Use the scale value or default to 1\n resolution = scale !== undefined ? parseFloat(scale) : 1;\n }\n\n // For non-1 resolutions, update baseTexture\n if (resolution !== 1)\n {\n this.baseTexture.setResolution(resolution);\n }\n\n return resolution;\n }\n\n /**\n * Parser spritesheet from loaded data. This is done asynchronously\n * to prevent creating too many Texture within a single process.\n *\n * @param {Function} callback - Callback when complete returns\n * a map of the Textures for this spritesheet.\n */\n public parse(callback: () => void): void\n {\n this._batchIndex = 0;\n this._callback = callback;\n\n if (this._frameKeys.length <= Spritesheet.BATCH_SIZE)\n {\n this._processFrames(0);\n this._processAnimations();\n this._parseComplete();\n }\n else\n {\n this._nextBatch();\n }\n }\n\n /**\n * Process a batch of frames\n *\n * @private\n * @param {number} initialFrameIndex - The index of frame to start.\n */\n private _processFrames(initialFrameIndex: number): void\n {\n let frameIndex = initialFrameIndex;\n const maxFrames = Spritesheet.BATCH_SIZE;\n\n while (frameIndex - initialFrameIndex < maxFrames && frameIndex < this._frameKeys.length)\n {\n const i = this._frameKeys[frameIndex];\n const data = this._frames[i];\n const rect = data.frame;\n\n if (rect)\n {\n let frame = null;\n let trim = null;\n const sourceSize = data.trimmed !== false && data.sourceSize\n ? data.sourceSize : data.frame;\n\n const orig = new Rectangle(\n 0,\n 0,\n Math.floor(sourceSize.w) / this.resolution,\n Math.floor(sourceSize.h) / this.resolution\n );\n\n if (data.rotated)\n {\n frame = new Rectangle(\n Math.floor(rect.x) / this.resolution,\n Math.floor(rect.y) / this.resolution,\n Math.floor(rect.h) / this.resolution,\n Math.floor(rect.w) / this.resolution\n );\n }\n else\n {\n frame = new Rectangle(\n Math.floor(rect.x) / this.resolution,\n Math.floor(rect.y) / this.resolution,\n Math.floor(rect.w) / this.resolution,\n Math.floor(rect.h) / this.resolution\n );\n }\n\n // Check to see if the sprite is trimmed\n if (data.trimmed !== false && data.spriteSourceSize)\n {\n trim = new Rectangle(\n Math.floor(data.spriteSourceSize.x) / this.resolution,\n Math.floor(data.spriteSourceSize.y) / this.resolution,\n Math.floor(rect.w) / this.resolution,\n Math.floor(rect.h) / this.resolution\n );\n }\n\n this.textures[i] = new Texture(\n this.baseTexture,\n frame,\n orig,\n trim,\n data.rotated ? 2 : 0,\n data.anchor\n );\n\n // lets also add the frame to pixi's global cache for 'from' and 'fromLoader' functions\n Texture.addToCache(this.textures[i], i);\n }\n\n frameIndex++;\n }\n }\n\n /**\n * Parse animations config\n *\n * @private\n */\n private _processAnimations(): void\n {\n const animations = this.data.animations || {};\n\n for (const animName in animations)\n {\n this.animations[animName] = [];\n for (let i = 0; i < animations[animName].length; i++)\n {\n const frameName = animations[animName][i];\n\n this.animations[animName].push(this.textures[frameName]);\n }\n }\n }\n\n /**\n * The parse has completed.\n *\n * @private\n */\n private _parseComplete(): void\n {\n const callback = this._callback;\n\n this._callback = null;\n this._batchIndex = 0;\n callback.call(this, this.textures);\n }\n\n /**\n * Begin the next batch of textures.\n *\n * @private\n */\n private _nextBatch(): void\n {\n this._processFrames(this._batchIndex * Spritesheet.BATCH_SIZE);\n this._batchIndex++;\n setTimeout(() =>\n {\n if (this._batchIndex * Spritesheet.BATCH_SIZE < this._frameKeys.length)\n {\n this._nextBatch();\n }\n else\n {\n this._processAnimations();\n this._parseComplete();\n }\n }, 0);\n }\n\n /**\n * Destroy Spritesheet and don't use after this.\n *\n * @param {boolean} [destroyBase=false] - Whether to destroy the base texture as well\n */\n public destroy(destroyBase = false): void\n {\n for (const i in this.textures)\n {\n this.textures[i].destroy();\n }\n this._frames = null;\n this._frameKeys = null;\n this.data = null;\n this.textures = null;\n if (destroyBase)\n {\n this._texture?.destroy();\n this.baseTexture.destroy();\n }\n this._texture = null;\n this.baseTexture = null;\n }\n}\n","import { url } from '@pixi/utils';\nimport { Spritesheet } from './Spritesheet';\nimport { LoaderResource } from '@pixi/loaders';\nimport type { Loader, ILoaderResource } from '@pixi/loaders';\n\n/**\n * {@link PIXI.Loader Loader} middleware for loading texture atlases that have been created with\n * TexturePacker or similar JSON-based spritesheet.\n *\n * This middleware automatically generates Texture resources.\n *\n * @class\n * @memberof PIXI\n * @implements PIXI.ILoaderPlugin\n */\nexport class SpritesheetLoader\n{\n /**\n * Called after a resource is loaded.\n * @see PIXI.Loader.loaderMiddleware\n * @param {PIXI.LoaderResource} resource\n * @param {function} next\n */\n static use(resource: ILoaderResource, next: (...args: unknown[]) => void): void\n {\n // because this is middleware, it execute in loader context. `this` = loader\n const loader = (this as any) as Loader;\n const imageResourceName = `${resource.name}_image`;\n\n // skip if no data, its not json, it isn't spritesheet data, or the image resource already exists\n if (!resource.data\n || resource.type !== LoaderResource.TYPE.JSON\n || !resource.data.frames\n || loader.resources[imageResourceName]\n )\n {\n next();\n\n return;\n }\n\n const loadOptions = {\n crossOrigin: resource.crossOrigin,\n metadata: resource.metadata.imageMetadata,\n parentResource: resource,\n };\n\n const resourcePath = SpritesheetLoader.getResourcePath(resource, loader.baseUrl);\n\n // load the image for this sheet\n loader.add(imageResourceName, resourcePath, loadOptions, function onImageLoad(res: ILoaderResource)\n {\n if (res.error)\n {\n next(res.error);\n\n return;\n }\n\n const spritesheet = new Spritesheet(\n res.texture,\n resource.data,\n resource.url\n );\n\n spritesheet.parse(() =>\n {\n resource.spritesheet = spritesheet;\n resource.textures = spritesheet.textures;\n next();\n });\n });\n }\n\n /**\n * Get the spritesheets root path\n * @param {PIXI.LoaderResource} resource - Resource to check path\n * @param {string} baseUrl - Base root url\n */\n static getResourcePath(resource: ILoaderResource, baseUrl: string): string\n {\n // Prepend url path unless the resource image is a data url\n if (resource.isDataUrl)\n {\n return resource.data.meta.image;\n }\n\n return url.resolve(resource.url.replace(baseUrl, ''), resource.data.meta.image);\n }\n}\n","import { Texture, TextureMatrix } from '@pixi/core';\nimport { Point, Rectangle, Transform } from '@pixi/math';\nimport { Sprite } from '@pixi/sprite';\nimport { deprecation } from '@pixi/utils';\nimport type { Renderer, IBaseTextureOptions, TextureSource } from '@pixi/core';\nimport type { IDestroyOptions } from '@pixi/display';\nimport type { IPoint, IPointData, ISize, ObservablePoint } from '@pixi/math';\n\nconst tempPoint = new Point();\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface TilingSprite extends GlobalMixins.TilingSprite {}\n\n/**\n * A tiling sprite is a fast way of rendering a tiling image\n *\n * @class\n * @extends PIXI.Sprite\n * @memberof PIXI\n */\nexport class TilingSprite extends Sprite\n{\n public tileTransform: Transform;\n public uvMatrix: TextureMatrix;\n public uvRespectAnchor: boolean;\n\n /**\n * @param {PIXI.Texture} texture - the texture of the tiling sprite\n * @param {number} [width=100] - the width of the tiling sprite\n * @param {number} [height=100] - the height of the tiling sprite\n */\n constructor(texture: Texture, width = 100, height = 100)\n {\n super(texture);\n\n /**\n * Tile transform\n *\n * @member {PIXI.Transform}\n */\n this.tileTransform = new Transform();\n\n /**\n * The with of the tiling sprite\n *\n * @member {number}\n * @private\n */\n this._width = width;\n\n /**\n * The height of the tiling sprite\n *\n * @member {number}\n * @private\n */\n this._height = height;\n\n /**\n * matrix that is applied to UV to get the coords in Texture normalized space to coords in BaseTexture space\n *\n * @member {PIXI.TextureMatrix}\n */\n this.uvMatrix = texture.uvMatrix || new TextureMatrix(texture);\n\n /**\n * Plugin that is responsible for rendering this element.\n * Allows to customize the rendering process without overriding '_render' method.\n *\n * @member {string}\n * @default 'tilingSprite'\n */\n this.pluginName = 'tilingSprite';\n\n /**\n * Whether or not anchor affects uvs\n *\n * @member {boolean}\n * @default false\n */\n this.uvRespectAnchor = false;\n }\n /**\n * Changes frame clamping in corresponding textureTransform, shortcut\n * Change to -0.5 to add a pixel to the edge, recommended for transparent trimmed textures in atlas\n *\n * @default 0.5\n * @member {number}\n */\n get clampMargin(): number\n {\n return this.uvMatrix.clampMargin;\n }\n\n set clampMargin(value: number)\n {\n this.uvMatrix.clampMargin = value;\n this.uvMatrix.update(true);\n }\n\n /**\n * The scaling of the image that is being tiled\n *\n * @member {PIXI.ObservablePoint}\n */\n get tileScale(): ObservablePoint\n {\n return this.tileTransform.scale;\n }\n\n set tileScale(value: ObservablePoint)\n {\n this.tileTransform.scale.copyFrom(value as IPoint);\n }\n\n /**\n * The offset of the image that is being tiled\n *\n * @member {PIXI.ObservablePoint}\n */\n get tilePosition(): ObservablePoint\n {\n return this.tileTransform.position;\n }\n\n set tilePosition(value: ObservablePoint)\n {\n this.tileTransform.position.copyFrom(value as IPoint);\n }\n\n /**\n * @protected\n */\n protected _onTextureUpdate(): void\n {\n if (this.uvMatrix)\n {\n this.uvMatrix.texture = this._texture;\n }\n this._cachedTint = 0xFFFFFF;\n }\n\n /**\n * Renders the object using the WebGL renderer\n *\n * @protected\n * @param {PIXI.Renderer} renderer - The renderer\n */\n protected _render(renderer: Renderer): void\n {\n // tweak our texture temporarily..\n const texture = this._texture;\n\n if (!texture || !texture.valid)\n {\n return;\n }\n\n this.tileTransform.updateLocalTransform();\n this.uvMatrix.update();\n\n renderer.batch.setObjectRenderer(renderer.plugins[this.pluginName]);\n renderer.plugins[this.pluginName].render(this);\n }\n\n /**\n * Updates the bounds of the tiling sprite.\n *\n * @protected\n */\n protected _calculateBounds(): void\n {\n const minX = this._width * -this._anchor._x;\n const minY = this._height * -this._anchor._y;\n const maxX = this._width * (1 - this._anchor._x);\n const maxY = this._height * (1 - this._anchor._y);\n\n this._bounds.addFrame(this.transform, minX, minY, maxX, maxY);\n }\n\n /**\n * Gets the local bounds of the sprite object.\n *\n * @param {PIXI.Rectangle} rect - The output rectangle.\n * @return {PIXI.Rectangle} The bounds.\n */\n public getLocalBounds(rect: Rectangle): Rectangle\n {\n // we can do a fast local bounds if the sprite has no children!\n if (this.children.length === 0)\n {\n this._bounds.minX = this._width * -this._anchor._x;\n this._bounds.minY = this._height * -this._anchor._y;\n this._bounds.maxX = this._width * (1 - this._anchor._x);\n this._bounds.maxY = this._height * (1 - this._anchor._y);\n\n if (!rect)\n {\n if (!this._localBoundsRect)\n {\n this._localBoundsRect = new Rectangle();\n }\n\n rect = this._localBoundsRect;\n }\n\n return this._bounds.getRectangle(rect);\n }\n\n return super.getLocalBounds.call(this, rect);\n }\n\n /**\n * Checks if a point is inside this tiling sprite.\n *\n * @param {PIXI.IPointData} point - the point to check\n * @return {boolean} Whether or not the sprite contains the point.\n */\n public containsPoint(point: IPointData): boolean\n {\n this.worldTransform.applyInverse(point, tempPoint);\n\n const width = this._width;\n const height = this._height;\n const x1 = -width * this.anchor._x;\n\n if (tempPoint.x >= x1 && tempPoint.x < x1 + width)\n {\n const y1 = -height * this.anchor._y;\n\n if (tempPoint.y >= y1 && tempPoint.y < y1 + height)\n {\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Destroys this sprite and optionally its texture and children\n *\n * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options\n * have been set to that value\n * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy\n * method called as well. 'options' will be passed on to those calls.\n * @param {boolean} [options.texture=false] - Should it destroy the current texture of the sprite as well\n * @param {boolean} [options.baseTexture=false] - Should it destroy the base texture of the sprite as well\n */\n public destroy(options: IDestroyOptions|boolean): void\n {\n super.destroy(options);\n\n this.tileTransform = null;\n this.uvMatrix = null;\n }\n\n /**\n * Helper function that creates a new tiling sprite based on the source you provide.\n * The source can be - frame id, image url, video url, canvas element, video element, base texture\n *\n * @static\n * @param {string|PIXI.Texture|HTMLCanvasElement|HTMLVideoElement} source - Source to create texture from\n * @param {Object} options - See {@link PIXI.BaseTexture}'s constructor for options.\n * @param {number} options.width - required width of the tiling sprite\n * @param {number} options.height - required height of the tiling sprite\n * @return {PIXI.TilingSprite} The newly created texture\n */\n static from(source: TextureSource, options: ISize & IBaseTextureOptions): TilingSprite\n {\n // Deprecated\n if (typeof options === 'number')\n {\n deprecation('5.3.0', 'TilingSprite.from use options instead of width and height args');\n // eslint-disable-next-line prefer-rest-params\n options = { width: options, height: arguments[2] } as ISize;\n }\n\n return new TilingSprite(\n Texture.from(source, options),\n options.width,\n options.height\n );\n }\n\n /**\n * The width of the sprite, setting this will actually modify the scale to achieve the value set\n *\n * @member {number}\n */\n get width(): number\n {\n return this._width;\n }\n\n set width(value: number)\n {\n this._width = value;\n }\n\n /**\n * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set\n *\n * @member {number}\n */\n get height(): number\n {\n return this._height;\n }\n\n set height(value: number)\n {\n this._height = value;\n }\n}\n","import { ObjectRenderer, Shader, State, QuadUv } from '@pixi/core';\nimport { WRAP_MODES } from '@pixi/constants';\nimport { Matrix } from '@pixi/math';\nimport { premultiplyTintToRgba, correctBlendMode } from '@pixi/utils';\n\nimport vertex from './tilingSprite.vert';\nimport fragment from './tilingSprite.frag';\nimport fragmentSimple from './tilingSprite_simple.frag';\n\nimport type { Renderer } from '@pixi/core';\nimport type { TilingSprite } from './TilingSprite';\n\nconst tempMat = new Matrix();\n\n/**\n * WebGL renderer plugin for tiling sprites\n *\n * @class\n * @memberof PIXI\n * @extends PIXI.ObjectRenderer\n */\nexport class TilingSpriteRenderer extends ObjectRenderer\n{\n public shader: Shader;\n public simpleShader: Shader;\n public quad: QuadUv;\n public readonly state: State;\n\n /**\n * constructor for renderer\n *\n * @param {PIXI.Renderer} renderer - The renderer this tiling awesomeness works for.\n */\n constructor(renderer: Renderer)\n {\n super(renderer);\n\n const uniforms = { globals: this.renderer.globalUniforms };\n\n this.shader = Shader.from(vertex, fragment, uniforms);\n\n this.simpleShader = Shader.from(vertex, fragmentSimple, uniforms);\n\n this.quad = new QuadUv();\n\n /**\n * The WebGL state in which this renderer will work.\n *\n * @member {PIXI.State}\n * @readonly\n */\n this.state = State.for2d();\n }\n\n /**\n *\n * @param {PIXI.TilingSprite} ts - tilingSprite to be rendered\n */\n public render(ts: TilingSprite): void\n {\n const renderer = this.renderer;\n const quad = this.quad;\n\n let vertices = quad.vertices;\n\n vertices[0] = vertices[6] = (ts._width) * -ts.anchor.x;\n vertices[1] = vertices[3] = ts._height * -ts.anchor.y;\n\n vertices[2] = vertices[4] = (ts._width) * (1.0 - ts.anchor.x);\n vertices[5] = vertices[7] = ts._height * (1.0 - ts.anchor.y);\n\n if (ts.uvRespectAnchor)\n {\n vertices = quad.uvs;\n\n vertices[0] = vertices[6] = -ts.anchor.x;\n vertices[1] = vertices[3] = -ts.anchor.y;\n\n vertices[2] = vertices[4] = 1.0 - ts.anchor.x;\n vertices[5] = vertices[7] = 1.0 - ts.anchor.y;\n }\n\n quad.invalidate();\n\n const tex = ts._texture;\n const baseTex = tex.baseTexture;\n const lt = ts.tileTransform.localTransform;\n const uv = ts.uvMatrix;\n let isSimple = baseTex.isPowerOfTwo\n && tex.frame.width === baseTex.width && tex.frame.height === baseTex.height;\n\n // auto, force repeat wrapMode for big tiling textures\n if (isSimple)\n {\n if (!baseTex._glTextures[renderer.CONTEXT_UID])\n {\n if (baseTex.wrapMode === WRAP_MODES.CLAMP)\n {\n baseTex.wrapMode = WRAP_MODES.REPEAT;\n }\n }\n else\n {\n isSimple = baseTex.wrapMode !== WRAP_MODES.CLAMP;\n }\n }\n\n const shader = isSimple ? this.simpleShader : this.shader;\n\n const w = tex.width;\n const h = tex.height;\n const W = ts._width;\n const H = ts._height;\n\n tempMat.set(lt.a * w / W,\n lt.b * w / H,\n lt.c * h / W,\n lt.d * h / H,\n lt.tx / W,\n lt.ty / H);\n\n // that part is the same as above:\n // tempMat.identity();\n // tempMat.scale(tex.width, tex.height);\n // tempMat.prepend(lt);\n // tempMat.scale(1.0 / ts._width, 1.0 / ts._height);\n\n tempMat.invert();\n if (isSimple)\n {\n tempMat.prepend(uv.mapCoord);\n }\n else\n {\n shader.uniforms.uMapCoord = uv.mapCoord.toArray(true);\n shader.uniforms.uClampFrame = uv.uClampFrame;\n shader.uniforms.uClampOffset = uv.uClampOffset;\n }\n\n shader.uniforms.uTransform = tempMat.toArray(true);\n shader.uniforms.uColor = premultiplyTintToRgba(ts.tint, ts.worldAlpha,\n shader.uniforms.uColor, baseTex.alphaMode as any);\n shader.uniforms.translationMatrix = ts.transform.worldTransform.toArray(true);\n shader.uniforms.uSampler = tex;\n\n renderer.shader.bind(shader);\n renderer.geometry.bind(quad);\n\n this.state.blendMode = correctBlendMode(ts.blendMode, baseTex.alphaMode as any);\n renderer.state.set(this.state);\n renderer.geometry.draw(this.renderer.gl.TRIANGLES, 6, 0);\n }\n}\n","import type { TextureMatrix, Buffer } from '@pixi/core';\n\n/**\n * Class controls cache for UV mapping from Texture normal space to BaseTexture normal space.\n *\n * @class\n * @memberof PIXI\n */\nexport class MeshBatchUvs\n{\n public readonly data: Float32Array;\n public uvBuffer: Buffer;\n public uvMatrix: TextureMatrix;\n\n private _bufferUpdateId: number;\n private _textureUpdateId: number;\n\n // Internal-only properties\n _updateID: number;\n\n /**\n * @param {PIXI.Buffer} uvBuffer - Buffer with normalized uv's\n * @param {PIXI.TextureMatrix} uvMatrix - Material UV matrix\n */\n constructor(uvBuffer: Buffer, uvMatrix: TextureMatrix)\n {\n /**\n * Buffer with normalized UV's\n * @member {PIXI.Buffer}\n */\n this.uvBuffer = uvBuffer;\n\n /**\n * Material UV matrix\n * @member {PIXI.TextureMatrix}\n */\n this.uvMatrix = uvMatrix;\n\n /**\n * UV Buffer data\n * @member {Float32Array}\n * @readonly\n */\n this.data = null;\n\n this._bufferUpdateId = -1;\n\n this._textureUpdateId = -1;\n\n this._updateID = 0;\n }\n\n /**\n * updates\n *\n * @param {boolean} [forceUpdate] - force the update\n */\n public update(forceUpdate?: boolean): void\n {\n if (!forceUpdate\n && this._bufferUpdateId === this.uvBuffer._updateID\n && this._textureUpdateId === this.uvMatrix._updateID\n )\n {\n return;\n }\n\n this._bufferUpdateId = this.uvBuffer._updateID;\n this._textureUpdateId = this.uvMatrix._updateID;\n\n const data = this.uvBuffer.data as Float32Array;\n\n if (!this.data || this.data.length !== data.length)\n {\n (this.data as any) = new Float32Array(data.length);\n }\n\n this.uvMatrix.multiplyUvs(data, this.data);\n\n this._updateID++;\n }\n}\n","import { State } from '@pixi/core';\nimport { Point, Polygon } from '@pixi/math';\nimport { BLEND_MODES, DRAW_MODES } from '@pixi/constants';\nimport { Container } from '@pixi/display';\nimport { settings } from '@pixi/settings';\nimport { MeshBatchUvs } from './MeshBatchUvs';\nimport { MeshMaterial } from './MeshMaterial';\n\nimport type { IDestroyOptions } from '@pixi/display';\nimport type { Texture, Renderer, Geometry, Buffer } from '@pixi/core';\nimport type { IPointData } from '@pixi/math';\n\nconst tempPoint = new Point();\nconst tempPolygon = new Polygon();\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface Mesh extends GlobalMixins.Mesh {}\n\n/**\n * Base mesh class.\n *\n * This class empowers you to have maximum flexibility to render any kind of WebGL visuals you can think of.\n * This class assumes a certain level of WebGL knowledge.\n * If you know a bit this should abstract enough away to make you life easier!\n *\n * Pretty much ALL WebGL can be broken down into the following:\n * - Geometry - The structure and data for the mesh. This can include anything from positions, uvs, normals, colors etc..\n * - Shader - This is the shader that PixiJS will render the geometry with (attributes in the shader must match the geometry)\n * - State - This is the state of WebGL required to render the mesh.\n *\n * Through a combination of the above elements you can render anything you want, 2D or 3D!\n *\n * @class\n * @extends PIXI.Container\n * @memberof PIXI\n */\nexport class Mesh extends Container\n{\n public readonly geometry: Geometry;\n public shader: MeshMaterial;\n public state: State;\n public drawMode: DRAW_MODES;\n public start: number;\n public size: number;\n\n private vertexData: Float32Array;\n private vertexDirty: number;\n private _transformID: number;\n private _roundPixels: boolean;\n private batchUvs: MeshBatchUvs;\n\n // Internal-only properties\n uvs: Float32Array;\n indices: Uint16Array;\n _tintRGB: number;\n _texture: Texture;\n\n /**\n * @param {PIXI.Geometry} geometry - the geometry the mesh will use\n * @param {PIXI.MeshMaterial} shader - the shader the mesh will use\n * @param {PIXI.State} [state] - the state that the WebGL context is required to be in to render the mesh\n * if no state is provided, uses {@link PIXI.State.for2d} to create a 2D state for PixiJS.\n * @param {number} [drawMode=PIXI.DRAW_MODES.TRIANGLES] - the drawMode, can be any of the PIXI.DRAW_MODES consts\n */\n constructor(geometry: Geometry, shader: MeshMaterial, state?: State, drawMode = DRAW_MODES.TRIANGLES)\n {\n super();\n\n /**\n * Includes vertex positions, face indices, normals, colors, UVs, and\n * custom attributes within buffers, reducing the cost of passing all\n * this data to the GPU. Can be shared between multiple Mesh objects.\n * @member {PIXI.Geometry}\n * @readonly\n */\n this.geometry = geometry;\n\n geometry.refCount++;\n\n /**\n * Represents the vertex and fragment shaders that processes the geometry and runs on the GPU.\n * Can be shared between multiple Mesh objects.\n * @member {PIXI.Shader|PIXI.MeshMaterial}\n */\n this.shader = shader;\n\n /**\n * Represents the WebGL state the Mesh required to render, excludes shader and geometry. E.g.,\n * blend mode, culling, depth testing, direction of rendering triangles, backface, etc.\n * @member {PIXI.State}\n */\n this.state = state || State.for2d();\n\n /**\n * The way the Mesh should be drawn, can be any of the {@link PIXI.DRAW_MODES} constants.\n *\n * @member {number}\n * @see PIXI.DRAW_MODES\n */\n this.drawMode = drawMode;\n\n /**\n * Typically the index of the IndexBuffer where to start drawing.\n * @member {number}\n * @default 0\n */\n this.start = 0;\n\n /**\n * How much of the geometry to draw, by default `0` renders everything.\n * @member {number}\n * @default 0\n */\n this.size = 0;\n\n /**\n * thease are used as easy access for batching\n * @member {Float32Array}\n * @private\n */\n this.uvs = null;\n\n /**\n * thease are used as easy access for batching\n * @member {Uint16Array}\n * @private\n */\n this.indices = null;\n\n /**\n * this is the caching layer used by the batcher\n * @member {Float32Array}\n * @private\n */\n this.vertexData = new Float32Array(1);\n\n /**\n * If geometry is changed used to decide to re-transform\n * the vertexData.\n * @member {number}\n * @private\n */\n this.vertexDirty = 0;\n\n this._transformID = -1;\n\n // Inherited from DisplayMode, set defaults\n this.tint = 0xFFFFFF;\n this.blendMode = BLEND_MODES.NORMAL;\n\n /**\n * Internal roundPixels field\n *\n * @member {boolean}\n * @private\n */\n this._roundPixels = settings.ROUND_PIXELS;\n\n /**\n * Batched UV's are cached for atlas textures\n * @member {PIXI.MeshBatchUvs}\n * @private\n */\n this.batchUvs = null;\n }\n\n /**\n * To change mesh uv's, change its uvBuffer data and increment its _updateID.\n * @member {PIXI.Buffer}\n * @readonly\n */\n get uvBuffer(): Buffer\n {\n return this.geometry.buffers[1];\n }\n\n /**\n * To change mesh vertices, change its uvBuffer data and increment its _updateID.\n * Incrementing _updateID is optional because most of Mesh objects do it anyway.\n * @member {PIXI.Buffer}\n * @readonly\n */\n get verticesBuffer(): Buffer\n {\n return this.geometry.buffers[0];\n }\n\n /**\n * Alias for {@link PIXI.Mesh#shader}.\n * @member {PIXI.MeshMaterial}\n */\n set material(value: MeshMaterial)\n {\n this.shader = value;\n }\n\n get material(): MeshMaterial\n {\n return this.shader;\n }\n\n /**\n * The blend mode to be applied to the Mesh. Apply a value of\n * `PIXI.BLEND_MODES.NORMAL` to reset the blend mode.\n *\n * @member {number}\n * @default PIXI.BLEND_MODES.NORMAL;\n * @see PIXI.BLEND_MODES\n */\n set blendMode(value: BLEND_MODES)\n {\n this.state.blendMode = value;\n }\n\n get blendMode(): BLEND_MODES\n {\n return this.state.blendMode;\n }\n\n /**\n * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation.\n * Advantages can include sharper image quality (like text) and faster rendering on canvas.\n * The main disadvantage is movement of objects may appear less smooth.\n * To set the global default, change {@link PIXI.settings.ROUND_PIXELS}\n *\n * @member {boolean}\n * @default false\n */\n set roundPixels(value: boolean)\n {\n if (this._roundPixels !== value)\n {\n this._transformID = -1;\n }\n this._roundPixels = value;\n }\n\n get roundPixels(): boolean\n {\n return this._roundPixels;\n }\n\n /**\n * The multiply tint applied to the Mesh. This is a hex value. A value of\n * `0xFFFFFF` will remove any tint effect.\n *\n * @member {number}\n * @default 0xFFFFFF\n */\n get tint(): number\n {\n return this.shader.tint;\n }\n\n set tint(value: number)\n {\n this.shader.tint = value;\n }\n\n /**\n * The texture that the Mesh uses.\n *\n * @member {PIXI.Texture}\n */\n get texture(): Texture\n {\n return this.shader.texture;\n }\n\n set texture(value: Texture)\n {\n this.shader.texture = value;\n }\n\n /**\n * Standard renderer draw.\n * @protected\n * @param {PIXI.Renderer} renderer - Instance to renderer.\n */\n protected _render(renderer: Renderer): void\n {\n // set properties for batching..\n // TODO could use a different way to grab verts?\n const vertices = this.geometry.buffers[0].data;\n\n // TODO benchmark check for attribute size..\n if (\n this.shader.batchable\n && this.drawMode === DRAW_MODES.TRIANGLES\n && vertices.length < Mesh.BATCHABLE_SIZE * 2\n )\n {\n this._renderToBatch(renderer);\n }\n else\n {\n this._renderDefault(renderer);\n }\n }\n\n /**\n * Standard non-batching way of rendering.\n * @protected\n * @param {PIXI.Renderer} renderer - Instance to renderer.\n */\n protected _renderDefault(renderer: Renderer): void\n {\n const shader = this.shader;\n\n shader.alpha = this.worldAlpha;\n if (shader.update)\n {\n shader.update();\n }\n\n renderer.batch.flush();\n\n if (shader.program.uniformData.translationMatrix)\n {\n shader.uniforms.translationMatrix = this.transform.worldTransform.toArray(true);\n }\n\n // bind and sync uniforms..\n renderer.shader.bind(shader);\n\n // set state..\n renderer.state.set(this.state);\n\n // bind the geometry...\n renderer.geometry.bind(this.geometry, shader);\n\n // then render it\n renderer.geometry.draw(this.drawMode, this.size, this.start, this.geometry.instanceCount);\n }\n\n /**\n * Rendering by using the Batch system.\n * @protected\n * @param {PIXI.Renderer} renderer - Instance to renderer.\n */\n protected _renderToBatch(renderer: Renderer): void\n {\n const geometry = this.geometry;\n\n if (this.shader.uvMatrix)\n {\n this.shader.uvMatrix.update();\n this.calculateUvs();\n }\n\n // set properties for batching..\n this.calculateVertices();\n this.indices = geometry.indexBuffer.data as Uint16Array;\n this._tintRGB = this.shader._tintRGB;\n this._texture = this.shader.texture;\n\n const pluginName = this.material.pluginName;\n\n renderer.batch.setObjectRenderer(renderer.plugins[pluginName]);\n renderer.plugins[pluginName].render(this);\n }\n\n /**\n * Updates vertexData field based on transform and vertices\n */\n public calculateVertices(): void\n {\n const geometry = this.geometry;\n const vertices = geometry.buffers[0].data;\n\n if ((geometry as any).vertexDirtyId === this.vertexDirty && this._transformID === this.transform._worldID)\n {\n return;\n }\n\n this._transformID = this.transform._worldID;\n\n if (this.vertexData.length !== vertices.length)\n {\n this.vertexData = new Float32Array(vertices.length);\n }\n\n const wt = this.transform.worldTransform;\n const a = wt.a;\n const b = wt.b;\n const c = wt.c;\n const d = wt.d;\n const tx = wt.tx;\n const ty = wt.ty;\n\n const vertexData = this.vertexData;\n\n for (let i = 0; i < vertexData.length / 2; i++)\n {\n const x = vertices[(i * 2)];\n const y = vertices[(i * 2) + 1];\n\n vertexData[(i * 2)] = (a * x) + (c * y) + tx;\n vertexData[(i * 2) + 1] = (b * x) + (d * y) + ty;\n }\n\n if (this._roundPixels)\n {\n const resolution = settings.RESOLUTION;\n\n for (let i = 0; i < vertexData.length; ++i)\n {\n vertexData[i] = Math.round((vertexData[i] * resolution | 0) / resolution);\n }\n }\n\n this.vertexDirty = (geometry as any).vertexDirtyId;\n }\n\n /**\n * Updates uv field based on from geometry uv's or batchUvs\n */\n public calculateUvs(): void\n {\n const geomUvs = this.geometry.buffers[1];\n\n if (!this.shader.uvMatrix.isSimple)\n {\n if (!this.batchUvs)\n {\n this.batchUvs = new MeshBatchUvs(geomUvs, this.shader.uvMatrix);\n }\n this.batchUvs.update();\n this.uvs = this.batchUvs.data;\n }\n else\n {\n this.uvs = geomUvs.data as Float32Array;\n }\n }\n\n /**\n * Updates the bounds of the mesh as a rectangle. The bounds calculation takes the worldTransform into account.\n * there must be a aVertexPosition attribute present in the geometry for bounds to be calculated correctly.\n *\n * @protected\n */\n protected _calculateBounds(): void\n {\n this.calculateVertices();\n\n this._bounds.addVertexData(this.vertexData, 0, this.vertexData.length);\n }\n\n /**\n * Tests if a point is inside this mesh. Works only for PIXI.DRAW_MODES.TRIANGLES.\n *\n * @param {PIXI.IPointData} point - the point to test\n * @return {boolean} the result of the test\n */\n public containsPoint(point: IPointData): boolean\n {\n if (!this.getBounds().contains(point.x, point.y))\n {\n return false;\n }\n\n this.worldTransform.applyInverse(point, tempPoint);\n\n const vertices = this.geometry.getBuffer('aVertexPosition').data;\n\n const points = tempPolygon.points;\n const indices = this.geometry.getIndex().data;\n const len = indices.length;\n const step = this.drawMode === 4 ? 3 : 1;\n\n for (let i = 0; i + 2 < len; i += step)\n {\n const ind0 = indices[i] * 2;\n const ind1 = indices[i + 1] * 2;\n const ind2 = indices[i + 2] * 2;\n\n points[0] = vertices[ind0];\n points[1] = vertices[ind0 + 1];\n points[2] = vertices[ind1];\n points[3] = vertices[ind1 + 1];\n points[4] = vertices[ind2];\n points[5] = vertices[ind2 + 1];\n\n if (tempPolygon.contains(tempPoint.x, tempPoint.y))\n {\n return true;\n }\n }\n\n return false;\n }\n /**\n * Destroys the Mesh object.\n *\n * @param {object|boolean} [options] - Options parameter. A boolean will act as if all\n * options have been set to that value\n * @param {boolean} [options.children=false] - if set to true, all the children will have\n * their destroy method called as well. 'options' will be passed on to those calls.\n */\n public destroy(options: IDestroyOptions|boolean): void\n {\n super.destroy(options);\n\n this.geometry.refCount--;\n if (this.geometry.refCount === 0)\n {\n this.geometry.dispose();\n }\n\n (this as any).geometry = null;\n this.shader = null;\n this.state = null;\n this.uvs = null;\n this.indices = null;\n this.vertexData = null;\n }\n\n /**\n * The maximum number of vertices to consider batchable. Generally, the complexity\n * of the geometry.\n * @memberof PIXI.Mesh\n * @static\n * @member {number} BATCHABLE_SIZE\n */\n public static BATCHABLE_SIZE = 100;\n}\n\n","import { Program, Shader, TextureMatrix } from '@pixi/core';\nimport { Matrix } from '@pixi/math';\nimport { premultiplyTintToRgba } from '@pixi/utils';\nimport fragment from './shader/mesh.frag';\nimport vertex from './shader/mesh.vert';\n\nimport type { Texture } from '@pixi/core';\nimport type { Dict } from '@pixi/utils';\n\nexport interface IMeshMaterialOptions {\n alpha?: number;\n tint?: number;\n pluginName?: string;\n program?: Program;\n uniforms?: Dict;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface MeshMaterial extends GlobalMixins.MeshMaterial {}\n\n/**\n * Slightly opinionated default shader for PixiJS 2D objects.\n * @class\n * @memberof PIXI\n * @extends PIXI.Shader\n */\nexport class MeshMaterial extends Shader\n{\n public readonly uvMatrix: TextureMatrix;\n\n public batchable: boolean;\n public pluginName: string;\n\n // Internal-only properties\n _tintRGB: number;\n\n private _colorDirty: boolean;\n private _alpha: number;\n private _tint: number;\n\n /**\n * @param {PIXI.Texture} uSampler - Texture that material uses to render.\n * @param {object} [options] - Additional options\n * @param {number} [options.alpha=1] - Default alpha.\n * @param {number} [options.tint=0xFFFFFF] - Default tint.\n * @param {string} [options.pluginName='batch'] - Renderer plugin for batching.\n * @param {PIXI.Program} [options.program=0xFFFFFF] - Custom program.\n * @param {object} [options.uniforms] - Custom uniforms.\n */\n constructor(uSampler: Texture, options?: IMeshMaterialOptions)\n {\n const uniforms = {\n uSampler,\n alpha: 1,\n uTextureMatrix: Matrix.IDENTITY,\n uColor: new Float32Array([1, 1, 1, 1]),\n };\n\n // Set defaults\n options = Object.assign({\n tint: 0xFFFFFF,\n alpha: 1,\n pluginName: 'batch',\n }, options);\n\n if (options.uniforms)\n {\n Object.assign(uniforms, options.uniforms);\n }\n\n super(options.program || Program.from(vertex, fragment), uniforms);\n\n /**\n * Only do update if tint or alpha changes.\n * @member {boolean}\n * @private\n * @default false\n */\n this._colorDirty = false;\n\n /**\n * TextureMatrix instance for this Mesh, used to track Texture changes\n *\n * @member {PIXI.TextureMatrix}\n * @readonly\n */\n this.uvMatrix = new TextureMatrix(uSampler);\n\n /**\n * `true` if shader can be batch with the renderer's batch system.\n * @member {boolean}\n * @default true\n */\n this.batchable = options.program === undefined;\n\n /**\n * Renderer plugin for batching\n *\n * @member {string}\n * @default 'batch'\n */\n this.pluginName = options.pluginName;\n\n this.tint = options.tint;\n this.alpha = options.alpha;\n }\n\n /**\n * Reference to the texture being rendered.\n * @member {PIXI.Texture}\n */\n get texture(): Texture\n {\n return this.uniforms.uSampler;\n }\n set texture(value: Texture)\n {\n if (this.uniforms.uSampler !== value)\n {\n this.uniforms.uSampler = value;\n this.uvMatrix.texture = value;\n }\n }\n\n /**\n * This gets automatically set by the object using this.\n *\n * @default 1\n * @member {number}\n */\n set alpha(value: number)\n {\n if (value === this._alpha) return;\n\n this._alpha = value;\n this._colorDirty = true;\n }\n get alpha(): number\n {\n return this._alpha;\n }\n\n /**\n * Multiply tint for the material.\n * @member {number}\n * @default 0xFFFFFF\n */\n set tint(value: number)\n {\n if (value === this._tint) return;\n\n this._tint = value;\n this._tintRGB = (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16);\n this._colorDirty = true;\n }\n get tint(): number\n {\n return this._tint;\n }\n\n /**\n * Gets called automatically by the Mesh. Intended to be overridden for custom\n * MeshMaterial objects.\n */\n public update(): void\n {\n if (this._colorDirty)\n {\n this._colorDirty = false;\n const baseTexture = this.texture.baseTexture;\n\n premultiplyTintToRgba(\n this._tint, this._alpha, this.uniforms.uColor, (baseTexture.alphaMode as unknown as boolean)\n );\n }\n if (this.uvMatrix.update())\n {\n this.uniforms.uTextureMatrix = this.uvMatrix.mapCoord;\n }\n }\n}\n","import { TYPES } from '@pixi/constants';\nimport { Buffer, Geometry } from '@pixi/core';\n\nimport type { IArrayBuffer } from '@pixi/core';\n\n/**\n * Standard 2D geometry used in PixiJS.\n *\n * Geometry can be defined without passing in a style or data if required.\n *\n * ```js\n * const geometry = new PIXI.Geometry();\n *\n * geometry.addAttribute('positions', [0, 0, 100, 0, 100, 100, 0, 100], 2);\n * geometry.addAttribute('uvs', [0,0,1,0,1,1,0,1], 2);\n * geometry.addIndex([0,1,2,1,3,2]);\n *\n * ```\n * @class\n * @memberof PIXI\n * @extends PIXI.Geometry\n */\nexport class MeshGeometry extends Geometry\n{\n // Internal-only properties\n _updateId: number;\n\n /**\n * @param {Float32Array|number[]} [vertices] - Positional data on geometry.\n * @param {Float32Array|number[]} [uvs] - Texture UVs.\n * @param {Uint16Array|number[]} [index] - IndexBuffer\n */\n constructor(vertices?: IArrayBuffer, uvs?: IArrayBuffer, index?: IArrayBuffer)\n {\n super();\n\n const verticesBuffer = new Buffer(vertices);\n const uvsBuffer = new Buffer(uvs, true);\n const indexBuffer = new Buffer(index, true, true);\n\n this.addAttribute('aVertexPosition', verticesBuffer, 2, false, TYPES.FLOAT)\n .addAttribute('aTextureCoord', uvsBuffer, 2, false, TYPES.FLOAT)\n .addIndex(indexBuffer);\n\n /**\n * Dirty flag to limit update calls on Mesh. For example,\n * limiting updates on a single Mesh instance with a shared Geometry\n * within the render loop.\n * @private\n * @member {number}\n * @default -1\n */\n this._updateId = -1;\n }\n\n /**\n * If the vertex position is updated.\n * @member {number}\n * @readonly\n * @private\n */\n get vertexDirtyId(): number\n {\n return this.buffers[0]._updateID;\n }\n}\n","/* eslint-disable max-len */\n\n/**\n * Normalized parsed data from .fnt files.\n *\n * @class\n * @memberof PIXI\n */\nexport class BitmapFontData\n{\n public info: IBitmapFontDataInfo[];\n public common: IBitmapFontDataCommon[];\n public page: IBitmapFontDataPage[];\n public char: IBitmapFontDataChar[];\n public kerning: IBitmapFontDataKerning[];\n\n constructor()\n {\n /**\n * @member {PIXI.IBitmapFontDataInfo[]}\n * @readOnly\n */\n this.info = [];\n\n /**\n * @member {PIXI.IBitmapFontDataCommon[]}\n * @readOnly\n */\n this.common = [];\n\n /**\n * @member {PIXI.IBitmapFontDataPage[]}\n * @readOnly\n */\n this.page = [];\n\n /**\n * @member {PIXI.IBitmapFontDataChar[]}\n * @readOnly\n */\n this.char = [];\n\n /**\n * @member {PIXI.IBitmapFontDataKerning[]}\n * @readOnly\n */\n this.kerning = [];\n }\n}\n\nexport interface IBitmapFontDataInfo {\n face: string;\n size: number;\n}\n\nexport interface IBitmapFontDataCommon {\n lineHeight: number;\n}\n\nexport interface IBitmapFontDataPage {\n id: number;\n file: string;\n}\n\nexport interface IBitmapFontDataChar {\n id: number;\n page: number;\n x: number;\n y: number;\n width: number;\n height: number;\n xoffset: number;\n yoffset: number;\n xadvance: number;\n}\n\nexport interface IBitmapFontDataKerning {\n first: number;\n second: number;\n amount: number;\n}\n\n/**\n * @memberof PIXI\n * @typedef {object} IBitmapFontDataInfo\n * @property {string} face\n * @property {number} size\n */\n\n/**\n * @memberof PIXI\n * @typedef {object} IBitmapFontDataCommon\n * @property {number} lineHeight\n */\n\n/**\n * @memberof PIXI\n * @typedef {object} IBitmapFontDataPage\n * @property {number} id\n * @property {string} file\n */\n\n/**\n * @memberof PIXI\n * @typedef {object} IBitmapFontDataChar\n * @property {string} id\n * @property {number} page\n * @property {number} x\n * @property {number} y\n * @property {number} width\n * @property {number} height\n * @property {number} xoffset\n * @property {number} yoffset\n * @property {number} xadvance\n */\n\n/**\n * @memberof PIXI\n * @typedef {object} IBitmapFontDataKerning\n * @property {number} first\n * @property {number} second\n * @property {number} amount\n */\n","import { TextFormat } from './TextFormat';\nimport { XMLFormat } from './XMLFormat';\n\n// Registered formats, maybe make this extensible in the future?\nconst formats = [\n TextFormat,\n XMLFormat,\n] as const;\n\n/**\n * Auto-detect BitmapFont parsing format based on data.\n * @private\n * @param {any} data - Data to detect format\n * @return {any} Format or null\n */\nexport function autoDetectFormat(data: unknown): typeof formats[number] | null\n{\n for (let i = 0; i < formats.length; i++)\n {\n if (formats[i].test(data))\n {\n return formats[i];\n }\n }\n\n return null;\n}\n","import { BitmapFontData } from '../BitmapFontData';\n\n/**\n * Internal data format used to convert to BitmapFontData.\n * @private\n */\ninterface IBitmapFontRawData {\n info: {\n face: string;\n size: string;\n }[];\n common: { lineHeight: string }[];\n page: {\n id: string;\n file: string;\n }[];\n chars: {\n count: number;\n }[];\n char: {\n id: string;\n page: string;\n x: string;\n y: string;\n width: string;\n height: string;\n xoffset: string;\n yoffset: string;\n xadvance: string;\n }[];\n kerning?: {\n first: string;\n second: string;\n amount: string;\n }[];\n}\n\n/**\n * BitmapFont format that's Text-based.\n *\n * @class\n * @private\n */\nexport class TextFormat\n{\n /**\n * Check if resource refers to txt font data.\n *\n * @static\n * @private\n * @param {any} data\n * @return {boolean} True if resource could be treated as font data, false otherwise.\n */\n static test(data: unknown): boolean\n {\n return typeof data === 'string' && data.indexOf('info face=') === 0;\n }\n\n /**\n * Convert text font data to a javascript object.\n *\n * @static\n * @private\n * @param {string} txt - Raw string data to be converted\n * @return {PIXI.BitmapFontData} Parsed font data\n */\n static parse(txt: string): BitmapFontData\n {\n // Retrieve data item\n const items = txt.match(/^[a-z]+\\s+.+$/gm);\n const rawData: IBitmapFontRawData = {\n info: [],\n common: [],\n page: [],\n char: [],\n chars: [],\n kerning: [],\n };\n\n for (const i in items)\n {\n // Extract item name\n const name = items[i].match(/^[a-z]+/gm)[0] as keyof BitmapFontData;\n\n // Extract item attribute list as string ex.: \"width=10\"\n const attributeList = items[i].match(/[a-zA-Z]+=([^\\s\"']+|\"([^\"]*)\")/gm);\n\n // Convert attribute list into an object\n const itemData: any = {};\n\n for (const i in attributeList)\n {\n // Split key-value pairs\n const split = attributeList[i].split('=');\n const key = split[0];\n\n // Remove eventual quotes from value\n const strValue = split[1].replace(/\"/gm, '');\n\n // Try to convert value into float\n const floatValue = parseFloat(strValue);\n\n // Use string value case float value is NaN\n const value = isNaN(floatValue) ? strValue : floatValue;\n\n itemData[key] = value;\n }\n\n // Push current item to the resulting data\n rawData[name].push(itemData);\n }\n\n const font = new BitmapFontData();\n\n rawData.info.forEach((info) => font.info.push({\n face: info.face,\n size: parseInt(info.size, 10),\n }));\n\n rawData.common.forEach((common) => font.common.push({\n lineHeight: parseInt(common.lineHeight, 10),\n }));\n\n rawData.page.forEach((page) => font.page.push({\n id: parseInt(page.id, 10),\n file: page.file,\n }));\n\n rawData.char.forEach((char) => font.char.push({\n id: parseInt(char.id, 10),\n page: parseInt(char.page, 10),\n x: parseInt(char.x, 10),\n y: parseInt(char.y, 10),\n width: parseInt(char.width, 10),\n height: parseInt(char.height, 10),\n xoffset: parseInt(char.xoffset, 10),\n yoffset: parseInt(char.yoffset, 10),\n xadvance: parseInt(char.xadvance, 10),\n }));\n\n rawData.kerning.forEach((kerning) => font.kerning.push({\n first: parseInt(kerning.first, 10),\n second: parseInt(kerning.second, 10),\n amount: parseInt(kerning.amount, 10),\n }));\n\n return font;\n }\n}\n","import { BitmapFontData } from '../BitmapFontData';\n\n/**\n * BitmapFont format that's XML-based.\n *\n * @class\n * @private\n */\nexport class XMLFormat\n{\n /**\n * Check if resource refers to xml font data.\n *\n * @static\n * @private\n * @param {any} data\n * @return {boolean} True if resource could be treated as font data, false otherwise.\n */\n static test(data: unknown): boolean\n {\n return data instanceof XMLDocument\n && data.getElementsByTagName('page').length\n && data.getElementsByTagName('info')[0].getAttribute('face') !== null;\n }\n\n /**\n * Convert the XML into BitmapFontData that we can use.\n *\n * @static\n * @private\n * @param {XMLDocument} xml\n * @return {BitmapFontData} Data to use for BitmapFont\n */\n static parse(xml: XMLDocument): BitmapFontData\n {\n const data = new BitmapFontData();\n const info = xml.getElementsByTagName('info');\n const common = xml.getElementsByTagName('common');\n const page = xml.getElementsByTagName('page');\n const char = xml.getElementsByTagName('char');\n const kerning = xml.getElementsByTagName('kerning');\n\n for (let i = 0; i < info.length; i++)\n {\n data.info.push({\n face: info[i].getAttribute('face'),\n size: parseInt(info[i].getAttribute('size'), 10),\n });\n }\n\n for (let i = 0; i < common.length; i++)\n {\n data.common.push({\n lineHeight: parseInt(common[i].getAttribute('lineHeight'), 10),\n });\n }\n\n for (let i = 0; i < page.length; i++)\n {\n data.page.push({\n id: parseInt(page[i].getAttribute('id'), 10) || 0,\n file: page[i].getAttribute('file'),\n });\n }\n\n for (let i = 0; i < char.length; i++)\n {\n const letter = char[i];\n\n data.char.push({\n id: parseInt(letter.getAttribute('id'), 10),\n page: parseInt(letter.getAttribute('page'), 10) || 0,\n x: parseInt(letter.getAttribute('x'), 10),\n y: parseInt(letter.getAttribute('y'), 10),\n width: parseInt(letter.getAttribute('width'), 10),\n height: parseInt(letter.getAttribute('height'), 10),\n xoffset: parseInt(letter.getAttribute('xoffset'), 10),\n yoffset: parseInt(letter.getAttribute('yoffset'), 10),\n xadvance: parseInt(letter.getAttribute('xadvance'), 10),\n });\n }\n\n for (let i = 0; i < kerning.length; i++)\n {\n data.kerning.push({\n first: parseInt(kerning[i].getAttribute('first'), 10),\n second: parseInt(kerning[i].getAttribute('second'), 10),\n amount: parseInt(kerning[i].getAttribute('amount'), 10),\n });\n }\n\n return data;\n }\n}\n","import { TextStyle, TextMetrics, TEXT_GRADIENT } from '@pixi/text';\n\n// TODO: Prevent code duplication b/w generateFillStyle & Text#generateFillStyle\n\n/**\n * Generates the fill style. Can automatically generate a gradient based on the fill style being an array\n *\n * @private\n * @param {object} style - The style.\n * @param {string[]} lines - The lines of text.\n * @return {string|number|CanvasGradient} The fill style\n */\nexport function generateFillStyle(\n canvas: HTMLCanvasElement,\n context: CanvasRenderingContext2D,\n style: TextStyle,\n resolution: number,\n lines: string[],\n metrics: TextMetrics\n): string|CanvasGradient|CanvasPattern\n{\n // TODO: Can't have different types for getter and setter. The getter shouldn't have the number type as\n // the setter converts to string. See this thread for more details:\n // https://github.com/microsoft/TypeScript/issues/2521\n const fillStyle: string|string[]|CanvasGradient|CanvasPattern = style.fill as any;\n\n if (!Array.isArray(fillStyle))\n {\n return fillStyle;\n }\n else if (fillStyle.length === 1)\n {\n return fillStyle[0];\n }\n\n // the gradient will be evenly spaced out according to how large the array is.\n // ['#FF0000', '#00FF00', '#0000FF'] would created stops at 0.25, 0.5 and 0.75\n let gradient: string[]|CanvasGradient;\n\n // a dropshadow will enlarge the canvas and result in the gradient being\n // generated with the incorrect dimensions\n const dropShadowCorrection = (style.dropShadow) ? style.dropShadowDistance : 0;\n\n // should also take padding into account, padding can offset the gradient\n const padding = style.padding || 0;\n\n const width = Math.ceil(canvas.width / resolution) - dropShadowCorrection - (padding * 2);\n const height = Math.ceil(canvas.height / resolution) - dropShadowCorrection - (padding * 2);\n\n // make a copy of the style settings, so we can manipulate them later\n const fill = fillStyle.slice();\n const fillGradientStops = style.fillGradientStops.slice();\n\n // wanting to evenly distribute the fills. So an array of 4 colours should give fills of 0.25, 0.5 and 0.75\n if (!fillGradientStops.length)\n {\n const lengthPlus1 = fill.length + 1;\n\n for (let i = 1; i < lengthPlus1; ++i)\n {\n fillGradientStops.push(i / lengthPlus1);\n }\n }\n\n // stop the bleeding of the last gradient on the line above to the top gradient of the this line\n // by hard defining the first gradient colour at point 0, and last gradient colour at point 1\n fill.unshift(fillStyle[0]);\n fillGradientStops.unshift(0);\n\n fill.push(fillStyle[fillStyle.length - 1]);\n fillGradientStops.push(1);\n\n if (style.fillGradientType === TEXT_GRADIENT.LINEAR_VERTICAL)\n {\n // start the gradient at the top center of the canvas, and end at the bottom middle of the canvas\n gradient = context.createLinearGradient(width / 2, padding, width / 2, height + padding);\n\n // we need to repeat the gradient so that each individual line of text has the same vertical gradient effect\n // ['#FF0000', '#00FF00', '#0000FF'] over 2 lines would create stops at 0.125, 0.25, 0.375, 0.625, 0.75, 0.875\n\n // There's potential for floating point precision issues at the seams between gradient repeats.\n // The loop below generates the stops in order, so track the last generated one to prevent\n // floating point precision from making us go the teeniest bit backwards, resulting in\n // the first and last colors getting swapped.\n let lastIterationStop = 0;\n\n // Actual height of the text itself, not counting spacing for lineHeight/leading/dropShadow etc\n const textHeight = metrics.fontProperties.fontSize + style.strokeThickness;\n\n // textHeight, but as a 0-1 size in global gradient stop space\n const gradStopLineHeight = textHeight / height;\n\n for (let i = 0; i < lines.length; i++)\n {\n const thisLineTop = metrics.lineHeight * i;\n\n for (let j = 0; j < fill.length; j++)\n {\n // 0-1 stop point for the current line, multiplied to global space afterwards\n let lineStop = 0;\n\n if (typeof fillGradientStops[j] === 'number')\n {\n lineStop = fillGradientStops[j];\n }\n else\n {\n lineStop = j / fill.length;\n }\n\n const globalStop = (thisLineTop / height) + (lineStop * gradStopLineHeight);\n\n // Prevent color stop generation going backwards from floating point imprecision\n let clampedStop = Math.max(lastIterationStop, globalStop);\n\n clampedStop = Math.min(clampedStop, 1); // Cap at 1 as well for safety's sake to avoid a possible throw.\n gradient.addColorStop(clampedStop, fill[j]);\n lastIterationStop = clampedStop;\n }\n }\n }\n else\n {\n // start the gradient at the center left of the canvas, and end at the center right of the canvas\n gradient = context.createLinearGradient(padding, height / 2, width + padding, height / 2);\n\n // can just evenly space out the gradients in this case, as multiple lines makes no difference\n // to an even left to right gradient\n const totalIterations = fill.length + 1;\n let currentIteration = 1;\n\n for (let i = 0; i < fill.length; i++)\n {\n let stop: number;\n\n if (typeof fillGradientStops[i] === 'number')\n {\n stop = fillGradientStops[i];\n }\n else\n {\n stop = currentIteration / totalIterations;\n }\n gradient.addColorStop(stop, fill[i]);\n currentIteration++;\n }\n }\n\n return gradient;\n}\n","import { generateFillStyle } from './generateFillStyle';\nimport { hex2rgb, string2hex } from '@pixi/utils';\nimport type { TextMetrics, TextStyle } from '@pixi/text';\n\n// TODO: Prevent code duplication b/w drawGlyph & Text#updateText\n\n/**\n * Draws the glyph `metrics.text` on the given canvas.\n *\n * Ignored because not directly exposed.\n *\n * @ignore\n * @param {HTMLCanvasElement} canvas\n * @param {CanvasRenderingContext2D} context\n * @param {TextMetrics} metrics\n * @param {number} x\n * @param {number} y\n * @param {number} resolution\n * @param {TextStyle} style\n */\nexport function drawGlyph(\n canvas: HTMLCanvasElement,\n context: CanvasRenderingContext2D,\n metrics: TextMetrics,\n x: number,\n y: number,\n resolution: number,\n style: TextStyle\n): void\n{\n const char = metrics.text;\n const fontProperties = metrics.fontProperties;\n\n context.translate(x, y);\n context.scale(resolution, resolution);\n\n const tx = style.strokeThickness / 2;\n const ty = -(style.strokeThickness / 2);\n\n context.font = style.toFontString();\n context.lineWidth = style.strokeThickness;\n context.textBaseline = style.textBaseline;\n context.lineJoin = style.lineJoin;\n context.miterLimit = style.miterLimit;\n\n // set canvas text styles\n context.fillStyle = generateFillStyle(canvas, context, style, resolution, [char], metrics);\n context.strokeStyle = style.stroke as string;\n\n context.font = style.toFontString();\n context.lineWidth = style.strokeThickness;\n context.textBaseline = style.textBaseline;\n context.lineJoin = style.lineJoin;\n context.miterLimit = style.miterLimit;\n\n // set canvas text styles\n context.fillStyle = generateFillStyle(canvas, context, style, resolution, [char], metrics);\n context.strokeStyle = style.stroke as string;\n\n const dropShadowColor = style.dropShadowColor;\n const rgb = hex2rgb(typeof dropShadowColor === 'number' ? dropShadowColor : string2hex(dropShadowColor));\n\n if (style.dropShadow)\n {\n context.shadowColor = `rgba(${rgb[0] * 255},${rgb[1] * 255},${rgb[2] * 255},${style.dropShadowAlpha})`;\n context.shadowBlur = style.dropShadowBlur;\n context.shadowOffsetX = Math.cos(style.dropShadowAngle) * style.dropShadowDistance;\n context.shadowOffsetY = Math.sin(style.dropShadowAngle) * style.dropShadowDistance;\n }\n else\n {\n context.shadowColor = '0';\n context.shadowBlur = 0;\n context.shadowOffsetX = 0;\n context.shadowOffsetY = 0;\n }\n\n if (style.stroke && style.strokeThickness)\n {\n context.strokeText(char, tx, ty + metrics.lineHeight - fontProperties.descent);\n }\n if (style.fill)\n {\n context.fillText(char, tx, ty + metrics.lineHeight - fontProperties.descent);\n }\n\n context.setTransform();\n\n context.fillStyle = 'rgba(0, 0, 0, 0)';\n}\n","import { getResolutionOfUrl } from '@pixi/utils';\nimport { Rectangle } from '@pixi/math';\nimport { Texture, BaseTexture } from '@pixi/core';\nimport { TextStyle, TextMetrics } from '@pixi/text';\nimport { autoDetectFormat } from './formats';\nimport { BitmapFontData } from './BitmapFontData';\nimport { resolveCharacters, drawGlyph } from './utils';\n\nimport type { Dict } from '@pixi/utils';\nimport type { ITextStyle } from '@pixi/text';\n\nexport interface IBitmapFontCharacter\n{\n xOffset: number;\n yOffset: number;\n xAdvance: number;\n texture: Texture;\n page: number;\n kerning: Dict;\n}\n\nexport interface IBitmapFontOptions\n{\n chars?: string | (string | string[])[];\n resolution?: number;\n padding?: number;\n textureWidth?: number;\n textureHeight?: number;\n}\n\n/**\n * BitmapFont represents a typeface available for use with the BitmapText class. Use the `install`\n * method for adding a font to be used.\n *\n * @class\n * @memberof PIXI\n */\nexport class BitmapFont\n{\n /**\n * This character set includes all the letters in the alphabet (both lower- and upper- case).\n * @readonly\n * @static\n * @member {string[][]}\n * @example\n * BitmapFont.from(\"ExampleFont\", style, { chars: BitmapFont.ALPHA })\n */\n public static readonly ALPHA = [['a', 'z'], ['A', 'Z'], ' '];\n\n /**\n * This character set includes all decimal digits (from 0 to 9).\n * @readonly\n * @static\n * @member {string[][]}\n * @example\n * BitmapFont.from(\"ExampleFont\", style, { chars: BitmapFont.NUMERIC })\n */\n public static readonly NUMERIC = [['0', '9']];\n\n /**\n * This character set is the union of `BitmapFont.ALPHA` and `BitmapFont.NUMERIC`.\n * @readonly\n * @static\n * @member {string[][]}\n */\n public static readonly ALPHANUMERIC = [['a', 'z'], ['A', 'Z'], ['0', '9'], ' '];\n\n /**\n * This character set consists of all the ASCII table.\n * @readonly\n * @static\n * @member {string[][]}\n * @see http://www.asciitable.com/\n */\n public static readonly ASCII = [[' ', '~']];\n\n /**\n * Collection of default options when using `BitmapFont.from`.\n *\n * @readonly\n * @static\n * @member {PIXI.IBitmapFontOptions}\n * @property {number} resolution=1\n * @property {number} textureWidth=512\n * @property {number} textureHeight=512\n * @property {number} padding=4\n * @property {string|string[]|string[][]} chars=PIXI.BitmapFont.ALPHANUMERIC\n */\n public static readonly defaultOptions: IBitmapFontOptions = {\n resolution: 1,\n textureWidth: 512,\n textureHeight: 512,\n padding: 4,\n chars: BitmapFont.ALPHANUMERIC,\n };\n\n /**\n * Collection of available/installed fonts.\n *\n * @readonly\n * @static\n * @member {Object.}\n */\n public static readonly available: Dict = {};\n public readonly font: string;\n public readonly size: number;\n public readonly lineHeight: number;\n public readonly chars: Dict;\n public readonly pageTextures: Dict;\n\n /**\n * @param {PIXI.BitmapFontData} data\n * @param {PIXI.Texture[]|Object.} textures\n */\n constructor(data: BitmapFontData, textures: Texture[]|Dict)\n {\n const [info] = data.info;\n const [common] = data.common;\n const [page] = data.page;\n const res = getResolutionOfUrl(page.file);\n const pageTextures: Dict = {};\n\n /**\n * The name of the font face.\n *\n * @member {string}\n * @readonly\n */\n this.font = info.face;\n\n /**\n * The size of the font face in pixels.\n *\n * @member {number}\n * @readonly\n */\n this.size = info.size;\n\n /**\n * The line-height of the font face in pixels.\n *\n * @member {number}\n * @readonly\n */\n this.lineHeight = common.lineHeight / res;\n\n /**\n * The map of characters by character code.\n *\n * @member {object}\n * @readonly\n */\n this.chars = {};\n\n /**\n * The map of base page textures (i.e., sheets of glyphs).\n *\n * @member {object}\n * @readonly\n * @private\n */\n this.pageTextures = pageTextures;\n\n // Convert the input Texture, Textures or object\n // into a page Texture lookup by \"id\"\n for (let i = 0; i < data.page.length; i++)\n {\n const { id, file } = data.page[i];\n\n pageTextures[id] = textures instanceof Array\n ? textures[i] : textures[file];\n }\n\n // parse letters\n for (let i = 0; i < data.char.length; i++)\n {\n const { id, page } = data.char[i];\n let { x, y, width, height, xoffset, yoffset, xadvance } = data.char[i];\n\n x /= res;\n y /= res;\n width /= res;\n height /= res;\n xoffset /= res;\n yoffset /= res;\n xadvance /= res;\n\n const rect = new Rectangle(\n x + (pageTextures[page].frame.x / res),\n y + (pageTextures[page].frame.y / res),\n width,\n height\n );\n\n this.chars[id] = {\n xOffset: xoffset,\n yOffset: yoffset,\n xAdvance: xadvance,\n kerning: {},\n texture: new Texture(\n pageTextures[page].baseTexture,\n rect\n ),\n page,\n };\n }\n\n // parse kernings\n for (let i = 0; i < data.kerning.length; i++)\n {\n let { first, second, amount } = data.kerning[i];\n\n first /= res;\n second /= res;\n amount /= res;\n\n if (this.chars[second])\n {\n this.chars[second].kerning[first] = amount;\n }\n }\n }\n\n /**\n * Remove references to created glyph textures.\n */\n public destroy(): void\n {\n for (const id in this.chars)\n {\n this.chars[id].texture.destroy();\n this.chars[id].texture = null;\n }\n\n for (const id in this.pageTextures)\n {\n this.pageTextures[id].destroy(true);\n this.pageTextures[id] = null;\n }\n\n // Set readonly null.\n (this as any).chars = null;\n (this as any).pageTextures = null;\n }\n\n /**\n * Register a new bitmap font.\n *\n * @static\n * @param {XMLDocument|string|PIXI.BitmapFontData} data - The\n * characters map that could be provided as xml or raw string.\n * @param {Object.|PIXI.Texture|PIXI.Texture[]}\n * textures - List of textures for each page.\n * @return {PIXI.BitmapFont} Result font object with font, size, lineHeight\n * and char fields.\n */\n public static install(\n data: string|XMLDocument|BitmapFontData,\n textures: Texture|Texture[]|Dict\n ): BitmapFont\n {\n let fontData;\n\n if (data instanceof BitmapFontData)\n {\n fontData = data;\n }\n else\n {\n const format = autoDetectFormat(data);\n\n if (!format)\n {\n throw new Error('Unrecognized data format for font.');\n }\n\n fontData = format.parse(data as any);\n }\n\n // Single texture, convert to list\n if (textures instanceof Texture)\n {\n textures = [textures];\n }\n\n const font = new BitmapFont(fontData, textures);\n\n BitmapFont.available[font.font] = font;\n\n return font;\n }\n\n /**\n * Remove bitmap font by name.\n *\n * @static\n * @param {string} name\n */\n public static uninstall(name: string): void\n {\n const font = BitmapFont.available[name];\n\n if (!font)\n {\n throw new Error(`No font found named '${name}'`);\n }\n\n font.destroy();\n delete BitmapFont.available[name];\n }\n\n /**\n * Generates a bitmap-font for the given style and character set. This does not support\n * kernings yet. With `style` properties, only the following non-layout properties are used:\n *\n * - {@link PIXI.TextStyle#dropShadow|dropShadow}\n * - {@link PIXI.TextStyle#dropShadowDistance|dropShadowDistance}\n * - {@link PIXI.TextStyle#dropShadowColor|dropShadowColor}\n * - {@link PIXI.TextStyle#dropShadowBlur|dropShadowBlur}\n * - {@link PIXI.TextStyle#dropShadowAngle|dropShadowAngle}\n * - {@link PIXI.TextStyle#fill|fill}\n * - {@link PIXI.TextStyle#fillGradientStops|fillGradientStops}\n * - {@link PIXI.TextStyle#fillGradientType|fillGradientType}\n * - {@link PIXI.TextStyle#fontFamily|fontFamily}\n * - {@link PIXI.TextStyle#fontSize|fontSize}\n * - {@link PIXI.TextStyle#fontVariant|fontVariant}\n * - {@link PIXI.TextStyle#fontWeight|fontWeight}\n * - {@link PIXI.TextStyle#lineJoin|lineJoin}\n * - {@link PIXI.TextStyle#miterLimit|miterLimit}\n * - {@link PIXI.TextStyle#stroke|stroke}\n * - {@link PIXI.TextStyle#strokeThickness|strokeThickness}\n * - {@link PIXI.TextStyle#textBaseline|textBaseline}\n *\n * @param {string} name - The name of the custom font to use with BitmapText.\n * @param {object|PIXI.TextStyle} [style] - Style options to render with BitmapFont.\n * @param {PIXI.IBitmapFontOptions} [options] - Setup options for font or name of the font.\n * @param {string|string[]|string[][]} [options.chars=PIXI.BitmapFont.ALPHANUMERIC] - characters included\n * in the font set. You can also use ranges. For example, `[['a', 'z'], ['A', 'Z'], \"!@#$%^&*()~{}[] \"]`.\n * Don't forget to include spaces ' ' in your character set!\n * @param {number} [options.resolution=1] - Render resolution for glyphs.\n * @param {number} [options.textureWidth=512] - Optional width of atlas, smaller values to reduce memory.\n * @param {number} [options.textureHeight=512] - Optional height of atlas, smaller values to reduce memory.\n * @param {number} [options.padding=4] - Padding between glyphs on texture atlas.\n * @return {PIXI.BitmapFont} Font generated by style options.\n * @static\n * @example\n * PIXI.BitmapFont.from(\"TitleFont\", {\n * fontFamily: \"Arial\",\n * fontSize: 12,\n * strokeThickness: 2,\n * fill: \"purple\"\n * });\n *\n * const title = new PIXI.BitmapText(\"This is the title\", { fontName: \"TitleFont\" });\n */\n public static from(name: string, textStyle?: TextStyle | Partial, options?: IBitmapFontOptions): BitmapFont\n {\n if (!name)\n {\n throw new Error('[BitmapFont] Property `name` is required.');\n }\n\n const {\n chars,\n padding,\n resolution,\n textureWidth,\n textureHeight } = Object.assign(\n {}, BitmapFont.defaultOptions, options);\n\n const charsList = resolveCharacters(chars);\n const style = textStyle instanceof TextStyle ? textStyle : new TextStyle(textStyle);\n const lineWidth = textureWidth;\n const fontData = new BitmapFontData();\n\n fontData.info[0] = {\n face: style.fontFamily as string,\n size: style.fontSize as number,\n };\n fontData.common[0] = {\n lineHeight: style.fontSize as number,\n };\n\n let positionX = 0;\n let positionY = 0;\n\n let canvas;\n let context;\n let baseTexture;\n let maxCharHeight = 0;\n const baseTextures = [];\n const textures: Texture[] = [];\n\n for (let i = 0; i < charsList.length; i++)\n {\n if (!canvas)\n {\n canvas = document.createElement('canvas');\n canvas.width = textureWidth;\n canvas.height = textureHeight;\n\n context = canvas.getContext('2d');\n baseTexture = new BaseTexture(canvas, { resolution });\n\n baseTextures.push(baseTexture);\n textures.push(new Texture(baseTexture));\n\n fontData.page.push({\n id: textures.length - 1,\n file: '',\n });\n }\n\n // Measure glyph dimensions\n const metrics = TextMetrics.measureText(charsList[i], style, false, canvas);\n const width = metrics.width;\n const height = Math.ceil(metrics.height);\n\n // This is ugly - but italics are given more space so they don't overlap\n const textureGlyphWidth = Math.ceil((style.fontStyle === 'italic' ? 2 : 1) * width);\n\n // Can't fit char anymore: next canvas please!\n if (positionY >= textureHeight - (height * resolution))\n {\n if (positionY === 0)\n {\n // We don't want user debugging an infinite loop (or do we? :)\n throw new Error(`[BitmapFont] textureHeight ${textureHeight}px is `\n + `too small for ${style.fontSize}px fonts`);\n }\n\n --i;\n\n // Create new atlas once current has filled up\n canvas = null;\n context = null;\n baseTexture = null;\n positionY = 0;\n positionX = 0;\n maxCharHeight = 0;\n\n continue;\n }\n\n maxCharHeight = Math.max(height + metrics.fontProperties.descent, maxCharHeight);\n\n // Wrap line once full row has been rendered\n if ((textureGlyphWidth * resolution) + positionX >= lineWidth)\n {\n --i;\n positionY += maxCharHeight * resolution;\n positionY = Math.ceil(positionY);\n positionX = 0;\n maxCharHeight = 0;\n\n continue;\n }\n\n drawGlyph(canvas, context, metrics, positionX, positionY, resolution, style);\n\n // Unique (numeric) ID mapping to this glyph\n const id = metrics.text.charCodeAt(0);\n\n // Create a texture holding just the glyph\n fontData.char.push({\n id,\n page: textures.length - 1,\n x: positionX / resolution,\n y: positionY / resolution,\n width: textureGlyphWidth,\n height,\n xoffset: 0,\n yoffset: 0,\n xadvance: Math.ceil(width\n - (style.dropShadow ? style.dropShadowDistance : 0)\n - (style.stroke ? style.strokeThickness : 0)),\n });\n\n positionX += (textureGlyphWidth + (2 * padding)) * resolution;\n positionX = Math.ceil(positionX);\n }\n\n const font = new BitmapFont(fontData, textures);\n\n // Make it easier to replace a font\n if (BitmapFont.available[name] !== undefined)\n {\n BitmapFont.uninstall(name);\n }\n\n BitmapFont.available[name] = font;\n\n return font;\n }\n}\n\n/**\n * @memberof PIXI\n * @interface IBitmapFontOptions\n * @property {string | string[] | string[][]} [chars=PIXI.BitmapFont.ALPHANUMERIC] - the character set to generate\n * @property {number} [resolution=1] - the resolution for rendering\n * @property {number} [padding=4] - the padding between glyphs in the atlas\n * @property {number} [textureWidth=512] - the width of the texture atlas\n * @property {number} [textureHeight=512] - the height of the texture atlas\n */\n\n","/**\n * Processes the passed character set data and returns a flattened array of all the characters.\n *\n * Ignored because not directly exposed.\n *\n * @ignore\n * @param {string | string[] | string[][] } chars\n * @returns {string[]}\n */\nexport function resolveCharacters(chars: string | (string | string[])[]): string[]\n{\n // Split the chars string into individual characters\n if (typeof chars === 'string')\n {\n chars = [chars];\n }\n\n // Handle an array of characters+ranges\n const result: string[] = [];\n\n for (let i = 0, j = chars.length; i < j; i++)\n {\n const item = chars[i];\n\n // Handle range delimited by start/end chars\n if (Array.isArray(item))\n {\n if (item.length !== 2)\n {\n throw new Error(`[BitmapFont]: Invalid character range length, expecting 2 got ${item.length}.`);\n }\n\n const startCode = item[0].charCodeAt(0);\n const endCode = item[1].charCodeAt(0);\n\n if (endCode < startCode)\n {\n throw new Error('[BitmapFont]: Invalid character range.');\n }\n\n for (let i = startCode, j = endCode; i <= j; i++)\n {\n result.push(String.fromCharCode(i));\n }\n }\n // Handle a character set string\n else\n {\n result.push(...item.split(''));\n }\n }\n\n if (result.length === 0)\n {\n throw new Error('[BitmapFont]: Empty set when resolving characters.');\n }\n\n return result;\n}\n","import { ObservablePoint, Point } from '@pixi/math';\nimport { settings } from '@pixi/settings';\nimport { Mesh, MeshGeometry, MeshMaterial } from '@pixi/mesh';\nimport { removeItems, deprecation } from '@pixi/utils';\nimport { BitmapFont } from './BitmapFont';\n\nimport type { Dict } from '@pixi/utils';\nimport type { Rectangle } from '@pixi/math';\nimport { Texture } from '@pixi/core';\nimport type { IBitmapTextStyle } from './BitmapTextStyle';\nimport type { TextStyleAlign } from '@pixi/text';\nimport type { BitmapFontData } from './BitmapFontData';\nimport { Container } from '@pixi/display';\n\ninterface PageMeshData {\n index: number;\n indexCount: number;\n vertexCount: number;\n uvsCount: number;\n total: number;\n mesh: Mesh;\n vertices?: Float32Array;\n uvs?: Float32Array;\n indices?: Uint16Array;\n}\ninterface CharRenderData {\n texture: Texture;\n line: number;\n charCode: number;\n position: Point;\n}\n\nconst pageMeshDataPool: PageMeshData[] = [];\nconst charRenderDataPool: CharRenderData[] = [];\n\n/**\n * A BitmapText object will create a line or multiple lines of text using bitmap font.\n *\n * The primary advantage of this class over Text is that all of your textures are pre-generated and loading,\n * meaning that rendering is fast, and changing text has no performance implications.\n *\n * Supporting character sets other than latin, such as CJK languages, may be impractical due to the number of characters.\n *\n * To split a line you can use '\\n', '\\r' or '\\r\\n' in your string.\n *\n * PixiJS can auto-generate fonts on-the-fly using BitmapFont or use fnt files provided by:\n * http://www.angelcode.com/products/bmfont/ for Windows or\n * http://www.bmglyph.com/ for Mac.\n *\n * A BitmapText can only be created when the font is loaded.\n *\n * ```js\n * // in this case the font is in a file called 'desyrel.fnt'\n * let bitmapText = new PIXI.BitmapText(\"text using a fancy font!\", {font: \"35px Desyrel\", align: \"right\"});\n * ```\n *\n * @class\n * @extends PIXI.Container\n * @memberof PIXI\n */\nexport class BitmapText extends Container\n{\n public static styleDefaults: Partial = {\n align: 'left',\n tint: 0xFFFFFF,\n maxWidth: 0,\n letterSpacing: 0,\n };\n public roundPixels: boolean;\n public dirty: boolean;\n protected _textWidth: number;\n protected _textHeight: number;\n protected _text: string;\n protected _maxWidth: number;\n protected _maxLineHeight: number;\n protected _letterSpacing: number;\n protected _anchor: ObservablePoint;\n protected _fontName: string;\n protected _fontSize: number;\n protected _align: TextStyleAlign;\n protected _activePagesMeshData: PageMeshData[];\n protected _tint = 0xFFFFFF;\n\n /**\n * @param {string} text - A string that you would like the text to display.\n * @param {object} style - The style parameters.\n * @param {string} style.fontName - The installed BitmapFont name.\n * @param {number} [style.fontSize] - The size of the font in pixels, e.g. 24. If undefined,\n *. this will default to the BitmapFont size.\n * @param {string} [style.align='left'] - Alignment for multiline text ('left', 'center' or 'right'),\n * does not affect single line text.\n * @param {number} [style.tint=0xFFFFFF] - The tint color.\n * @param {number} [style.letterSpacing=0] - The amount of spacing between letters.\n * @param {number} [style.maxWidth=0] - The max width of the text before line wrapping.\n */\n constructor(text: string, style: Partial = {})\n {\n super();\n\n if (style.font)\n {\n deprecation('5.3.0', 'PIXI.BitmapText constructor style.font property is deprecated.');\n\n this._upgradeStyle(style);\n }\n\n // Apply the defaults\n const { align, tint, maxWidth, letterSpacing, fontName, fontSize } = Object.assign(\n {}, BitmapText.styleDefaults, style);\n\n if (!BitmapFont.available[fontName])\n {\n throw new Error(`Missing BitmapFont \"${fontName}\"`);\n }\n\n /**\n * Collection of page mesh data.\n *\n * @member {object}\n * @private\n */\n this._activePagesMeshData = [];\n\n /**\n * Private tracker for the width of the overall text\n *\n * @member {number}\n * @private\n */\n this._textWidth = 0;\n\n /**\n * Private tracker for the height of the overall text\n *\n * @member {number}\n * @private\n */\n this._textHeight = 0;\n\n /**\n * Private tracker for the current text align.\n *\n * @member {string}\n * @private\n */\n this._align = align;\n\n /**\n * Private tracker for the current tint.\n *\n * @member {number}\n * @private\n */\n this._tint = tint;\n\n /**\n * Private tracker for the current font name.\n *\n * @member {string}\n * @private\n */\n this._fontName = fontName;\n\n /**\n * Private tracker for the current font size.\n *\n * @member {number}\n * @private\n */\n this._fontSize = fontSize || BitmapFont.available[fontName].size;\n\n /**\n * Private tracker for the current text.\n *\n * @member {string}\n * @private\n */\n this._text = text;\n\n /**\n * The max width of this bitmap text in pixels. If the text provided is longer than the\n * value provided, line breaks will be automatically inserted in the last whitespace.\n * Disable by setting value to 0\n *\n * @member {number}\n * @private\n */\n this._maxWidth = maxWidth;\n\n /**\n * The max line height. This is useful when trying to use the total height of the Text,\n * ie: when trying to vertically align. (Internally used)\n *\n * @member {number}\n * @private\n */\n this._maxLineHeight = 0;\n\n /**\n * Letter spacing. This is useful for setting the space between characters.\n * @member {number}\n * @private\n */\n this._letterSpacing = letterSpacing;\n\n /**\n * Text anchor. read-only\n *\n * @member {PIXI.ObservablePoint}\n * @private\n */\n this._anchor = new ObservablePoint((): void => { this.dirty = true; }, this, 0, 0);\n\n /**\n * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation.\n * Advantages can include sharper image quality (like text) and faster rendering on canvas.\n * The main disadvantage is movement of objects may appear less smooth.\n * To set the global default, change {@link PIXI.settings.ROUND_PIXELS}\n *\n * @member {boolean}\n * @default PIXI.settings.ROUND_PIXELS\n */\n this.roundPixels = settings.ROUND_PIXELS;\n\n /**\n * Set to `true` if the BitmapText needs to be redrawn.\n *\n * @member {boolean}\n */\n this.dirty = true;\n }\n\n /**\n * Renders text and updates it when needed. This should only be called\n * if the BitmapFont is regenerated.\n */\n public updateText(): void\n {\n const data = BitmapFont.available[this._fontName];\n const scale = this._fontSize / data.size;\n const pos = new Point();\n const chars: CharRenderData[] = [];\n const lineWidths = [];\n const text = this._text.replace(/(?:\\r\\n|\\r)/g, '\\n') || ' ';\n const textLength = text.length;\n const maxWidth = this._maxWidth * data.size / this._fontSize;\n\n let prevCharCode = null;\n let lastLineWidth = 0;\n let maxLineWidth = 0;\n let line = 0;\n let lastBreakPos = -1;\n let lastBreakWidth = 0;\n let spacesRemoved = 0;\n let maxLineHeight = 0;\n\n for (let i = 0; i < textLength; i++)\n {\n const charCode = text.charCodeAt(i);\n const char = text.charAt(i);\n\n if ((/(?:\\s)/).test(char))\n {\n lastBreakPos = i;\n lastBreakWidth = lastLineWidth;\n }\n\n if (char === '\\r' || char === '\\n')\n {\n lineWidths.push(lastLineWidth);\n maxLineWidth = Math.max(maxLineWidth, lastLineWidth);\n ++line;\n ++spacesRemoved;\n\n pos.x = 0;\n pos.y += data.lineHeight;\n prevCharCode = null;\n continue;\n }\n\n const charData = data.chars[charCode];\n\n if (!charData)\n {\n continue;\n }\n\n if (prevCharCode && charData.kerning[prevCharCode])\n {\n pos.x += charData.kerning[prevCharCode];\n }\n\n const charRenderData = charRenderDataPool.pop() || {\n texture: Texture.EMPTY,\n line: 0,\n charCode: 0,\n position: new Point(),\n };\n\n charRenderData.texture = charData.texture;\n charRenderData.line = line;\n charRenderData.charCode = charCode;\n charRenderData.position.x = pos.x + charData.xOffset + (this._letterSpacing / 2);\n charRenderData.position.y = pos.y + charData.yOffset;\n\n chars.push(charRenderData);\n\n pos.x += charData.xAdvance + this._letterSpacing;\n lastLineWidth = pos.x;\n maxLineHeight = Math.max(maxLineHeight, (charData.yOffset + charData.texture.height));\n prevCharCode = charCode;\n\n if (lastBreakPos !== -1 && maxWidth > 0 && pos.x > maxWidth)\n {\n ++spacesRemoved;\n removeItems(chars, 1 + lastBreakPos - spacesRemoved, 1 + i - lastBreakPos);\n i = lastBreakPos;\n lastBreakPos = -1;\n\n lineWidths.push(lastBreakWidth);\n maxLineWidth = Math.max(maxLineWidth, lastBreakWidth);\n line++;\n\n pos.x = 0;\n pos.y += data.lineHeight;\n prevCharCode = null;\n }\n }\n\n const lastChar = text.charAt(text.length - 1);\n\n if (lastChar !== '\\r' && lastChar !== '\\n')\n {\n if ((/(?:\\s)/).test(lastChar))\n {\n lastLineWidth = lastBreakWidth;\n }\n\n lineWidths.push(lastLineWidth);\n maxLineWidth = Math.max(maxLineWidth, lastLineWidth);\n }\n\n const lineAlignOffsets = [];\n\n for (let i = 0; i <= line; i++)\n {\n let alignOffset = 0;\n\n if (this._align === 'right')\n {\n alignOffset = maxLineWidth - lineWidths[i];\n }\n else if (this._align === 'center')\n {\n alignOffset = (maxLineWidth - lineWidths[i]) / 2;\n }\n\n lineAlignOffsets.push(alignOffset);\n }\n\n const lenChars = chars.length;\n\n const pagesMeshData: Record = {};\n\n const newPagesMeshData: PageMeshData[] = [];\n\n const activePagesMeshData = this._activePagesMeshData;\n\n for (let i = 0; i < activePagesMeshData.length; i++)\n {\n pageMeshDataPool.push(activePagesMeshData[i]);\n }\n\n for (let i = 0; i < lenChars; i++)\n {\n const texture = chars[i].texture;\n const baseTextureUid = texture.baseTexture.uid;\n\n if (!pagesMeshData[baseTextureUid])\n {\n let pageMeshData = pageMeshDataPool.pop();\n\n if (!pageMeshData)\n {\n const geometry = new MeshGeometry();\n const material = new MeshMaterial(Texture.EMPTY);\n\n const mesh = new Mesh(geometry, material);\n\n pageMeshData = {\n index: 0,\n indexCount: 0,\n vertexCount: 0,\n uvsCount: 0,\n total: 0,\n mesh,\n vertices: null,\n uvs: null,\n indices: null,\n };\n }\n\n // reset data..\n pageMeshData.index = 0;\n pageMeshData.indexCount = 0;\n pageMeshData.vertexCount = 0;\n pageMeshData.uvsCount = 0;\n pageMeshData.total = 0;\n // TODO need to get page texture here somehow..\n pageMeshData.mesh.texture = new Texture(texture.baseTexture);\n pageMeshData.mesh.tint = this._tint;\n\n newPagesMeshData.push(pageMeshData);\n\n pagesMeshData[baseTextureUid] = pageMeshData;\n }\n\n pagesMeshData[baseTextureUid].total++;\n }\n\n // lets find any previously active pageMeshDatas that are no longer required for\n // the updated text (if any), removed and return them to the pool.\n for (let i = 0; i < activePagesMeshData.length; i++)\n {\n if (newPagesMeshData.indexOf(activePagesMeshData[i]) === -1)\n {\n this.removeChild(activePagesMeshData[i].mesh);\n }\n }\n\n // next lets add any new meshes, that have not yet been added to this BitmapText\n // we only add if its not already a child of this BitmapObject\n for (let i = 0; i < newPagesMeshData.length; i++)\n {\n if (newPagesMeshData[i].mesh.parent !== this)\n {\n this.addChild(newPagesMeshData[i].mesh);\n }\n }\n\n // active page mesh datas are set to be the new pages added.\n this._activePagesMeshData = newPagesMeshData;\n\n for (const i in pagesMeshData)\n {\n const pageMeshData = pagesMeshData[i];\n const total = pageMeshData.total;\n\n // lets only allocate new buffers if we can fit the new text in the current ones..\n // unless that is, we will be batching. Currently batching dose not respect the size property of mesh\n if (!(pageMeshData.indices?.length > 6 * total) || pageMeshData.vertices.length < Mesh.BATCHABLE_SIZE * 2)\n {\n pageMeshData.vertices = new Float32Array(4 * 2 * total);\n pageMeshData.uvs = new Float32Array(4 * 2 * total);\n pageMeshData.indices = new Uint16Array(6 * total);\n }\n\n // as a buffer maybe bigger than the current word, we set the size of the meshMaterial\n // to match the number of letters needed\n pageMeshData.mesh.size = 6 * total;\n }\n\n for (let i = 0; i < lenChars; i++)\n {\n const char = chars[i];\n const xPos = (char.position.x + lineAlignOffsets[char.line]) * scale;\n const yPos = char.position.y * scale;\n const texture = char.texture;\n\n const pageMesh = pagesMeshData[texture.baseTexture.uid];\n\n const textureFrame = texture.frame;\n const textureUvs = texture._uvs;\n\n const index = pageMesh.index++;\n\n pageMesh.indices[(index * 6) + 0] = 0 + (index * 4);\n pageMesh.indices[(index * 6) + 1] = 1 + (index * 4);\n pageMesh.indices[(index * 6) + 2] = 2 + (index * 4);\n pageMesh.indices[(index * 6) + 3] = 0 + (index * 4);\n pageMesh.indices[(index * 6) + 4] = 2 + (index * 4);\n pageMesh.indices[(index * 6) + 5] = 3 + (index * 4);\n\n pageMesh.vertices[(index * 8) + 0] = xPos;\n pageMesh.vertices[(index * 8) + 1] = yPos;\n\n pageMesh.vertices[(index * 8) + 2] = xPos + (textureFrame.width * scale);\n pageMesh.vertices[(index * 8) + 3] = yPos;\n\n pageMesh.vertices[(index * 8) + 4] = xPos + (textureFrame.width * scale);\n pageMesh.vertices[(index * 8) + 5] = yPos + (textureFrame.height * scale);\n\n pageMesh.vertices[(index * 8) + 6] = xPos;\n pageMesh.vertices[(index * 8) + 7] = yPos + (textureFrame.height * scale);\n\n pageMesh.uvs[(index * 8) + 0] = textureUvs.x0;\n pageMesh.uvs[(index * 8) + 1] = textureUvs.y0;\n\n pageMesh.uvs[(index * 8) + 2] = textureUvs.x1;\n pageMesh.uvs[(index * 8) + 3] = textureUvs.y1;\n\n pageMesh.uvs[(index * 8) + 4] = textureUvs.x2;\n pageMesh.uvs[(index * 8) + 5] = textureUvs.y2;\n\n pageMesh.uvs[(index * 8) + 6] = textureUvs.x3;\n pageMesh.uvs[(index * 8) + 7] = textureUvs.y3;\n }\n\n this._textWidth = maxLineWidth * scale;\n this._textHeight = (pos.y + data.lineHeight) * scale;\n\n for (const i in pagesMeshData)\n {\n const pageMeshData = pagesMeshData[i];\n\n // apply anchor\n if (this.anchor.x !== 0 || this.anchor.y !== 0)\n {\n let vertexCount = 0;\n\n const anchorOffsetX = this._textWidth * this.anchor.x;\n const anchorOffsetY = this._textHeight * this.anchor.y;\n\n for (let i = 0; i < pageMeshData.total; i++)\n {\n pageMeshData.vertices[vertexCount++] -= anchorOffsetX;\n pageMeshData.vertices[vertexCount++] -= anchorOffsetY;\n\n pageMeshData.vertices[vertexCount++] -= anchorOffsetX;\n pageMeshData.vertices[vertexCount++] -= anchorOffsetY;\n\n pageMeshData.vertices[vertexCount++] -= anchorOffsetX;\n pageMeshData.vertices[vertexCount++] -= anchorOffsetY;\n\n pageMeshData.vertices[vertexCount++] -= anchorOffsetX;\n pageMeshData.vertices[vertexCount++] -= anchorOffsetY;\n }\n }\n\n this._maxLineHeight = maxLineHeight * scale;\n\n const vertexBuffer = pageMeshData.mesh.geometry.getBuffer('aVertexPosition');\n const textureBuffer = pageMeshData.mesh.geometry.getBuffer('aTextureCoord');\n const indexBuffer = pageMeshData.mesh.geometry.getIndex();\n\n vertexBuffer.data = pageMeshData.vertices;\n textureBuffer.data = pageMeshData.uvs;\n indexBuffer.data = pageMeshData.indices;\n\n vertexBuffer.update();\n textureBuffer.update();\n indexBuffer.update();\n }\n\n for (let i = 0; i < chars.length; i++)\n {\n charRenderDataPool.push(chars[i]);\n }\n }\n\n /**\n * Updates the transform of this object\n *\n * @private\n */\n updateTransform(): void\n {\n this.validate();\n this.containerUpdateTransform();\n }\n\n /**\n * Validates text before calling parent's getLocalBounds\n *\n * @return {PIXI.Rectangle} The rectangular bounding area\n */\n public getLocalBounds(): Rectangle\n {\n this.validate();\n\n return super.getLocalBounds();\n }\n\n /**\n * Updates text when needed\n *\n * @private\n */\n protected validate(): void\n {\n if (this.dirty)\n {\n this.updateText();\n this.dirty = false;\n }\n }\n\n /**\n * The tint of the BitmapText object.\n *\n * @member {number}\n * @default 0xffffff\n */\n public get tint(): number\n {\n return this._tint;\n }\n\n public set tint(value: number)\n {\n if (this._tint === value) return;\n\n this._tint = value;\n\n for (let i = 0; i < this._activePagesMeshData.length; i++)\n {\n this._activePagesMeshData[i].mesh.tint = value;\n }\n }\n\n /**\n * The alignment of the BitmapText object.\n *\n * @member {string}\n * @default 'left'\n */\n public get align(): TextStyleAlign\n {\n return this._align;\n }\n\n public set align(value: TextStyleAlign)\n {\n if (this._align !== value)\n {\n this._align = value;\n this.dirty = true;\n }\n }\n\n /**\n * The name of the BitmapFont.\n *\n * @member {string}\n */\n public get fontName(): string\n {\n return this._fontName;\n }\n\n public set fontName(value: string)\n {\n if (!BitmapFont.available[value])\n {\n throw new Error(`Missing BitmapFont \"${value}\"`);\n }\n\n if (this._fontName !== value)\n {\n this._fontName = value;\n this.dirty = true;\n }\n }\n\n /**\n * The size of the font to display.\n *\n * @member {number}\n */\n public get fontSize(): number\n {\n return this._fontSize;\n }\n\n public set fontSize(value: number)\n {\n if (this._fontSize !== value)\n {\n this._fontSize = value;\n this.dirty = true;\n }\n }\n\n /**\n * The anchor sets the origin point of the text.\n *\n * The default is `(0,0)`, this means the text's origin is the top left.\n *\n * Setting the anchor to `(0.5,0.5)` means the text's origin is centered.\n *\n * Setting the anchor to `(1,1)` would mean the text's origin point will be the bottom right corner.\n *\n * @member {PIXI.Point | number}\n */\n public get anchor(): ObservablePoint\n {\n return this._anchor;\n }\n\n public set anchor(value: ObservablePoint)\n {\n if (typeof value === 'number')\n {\n this._anchor.set(value);\n }\n else\n {\n this._anchor.copyFrom(value);\n }\n }\n\n /**\n * The text of the BitmapText object.\n *\n * @member {string}\n */\n public get text(): string\n {\n return this._text;\n }\n\n public set text(text: string)\n {\n text = String(text === null || text === undefined ? '' : text);\n\n if (this._text === text)\n {\n return;\n }\n this._text = text;\n this.dirty = true;\n }\n\n /**\n * The max width of this bitmap text in pixels. If the text provided is longer than the\n * value provided, line breaks will be automatically inserted in the last whitespace.\n * Disable by setting the value to 0.\n *\n * @member {number}\n */\n public get maxWidth(): number\n {\n return this._maxWidth;\n }\n\n public set maxWidth(value: number)\n {\n if (this._maxWidth === value)\n {\n return;\n }\n this._maxWidth = value;\n this.dirty = true;\n }\n\n /**\n * The max line height. This is useful when trying to use the total height of the Text,\n * i.e. when trying to vertically align.\n *\n * @member {number}\n * @readonly\n */\n public get maxLineHeight(): number\n {\n this.validate();\n\n return this._maxLineHeight;\n }\n\n /**\n * The width of the overall text, different from fontSize,\n * which is defined in the style object.\n *\n * @member {number}\n * @readonly\n */\n public get textWidth(): number\n {\n this.validate();\n\n return this._textWidth;\n }\n\n /**\n * Additional space between characters.\n *\n * @member {number}\n */\n public get letterSpacing(): number\n {\n return this._letterSpacing;\n }\n\n public set letterSpacing(value: number)\n {\n if (this._letterSpacing !== value)\n {\n this._letterSpacing = value;\n this.dirty = true;\n }\n }\n\n /**\n * The height of the overall text, different from fontSize,\n * which is defined in the style object.\n *\n * @member {number}\n * @readonly\n */\n public get textHeight(): number\n {\n this.validate();\n\n return this._textHeight;\n }\n\n /**\n * For backward compatibility, convert old style.font constructor param to fontName & fontSize properties.\n *\n * @private\n * @deprecated since 5.3.0\n */\n _upgradeStyle(style: Partial): void\n {\n if (typeof style.font === 'string')\n {\n const valueSplit = style.font.split(' ');\n\n style.fontName = valueSplit.length === 1\n ? valueSplit[0]\n : valueSplit.slice(1).join(' ');\n\n if (valueSplit.length >= 2)\n {\n style.fontSize = parseInt(valueSplit[0], 10);\n }\n }\n else\n {\n style.fontName = style.font.name;\n style.fontSize = typeof style.font.size === 'number'\n ? style.font.size\n : parseInt(style.font.size, 10);\n }\n }\n\n /**\n * Register a bitmap font with data and a texture.\n *\n * @deprecated since 5.3.0\n * @see PIXI.BitmapFont.install\n * @static\n */\n static registerFont(data: string|XMLDocument|BitmapFontData, textures: Texture|Texture[]|Dict): BitmapFont\n {\n deprecation('5.3.0', 'PIXI.BitmapText.registerFont is deprecated, use PIXI.BitmapFont.install');\n\n return BitmapFont.install(data, textures);\n }\n\n /**\n * Get the list of installed fonts.\n *\n * @see PIXI.BitmapFont.available\n * @deprecated since 5.3.0\n * @static\n * @readonly\n * @member {Object.}\n */\n static get fonts(): Dict\n {\n deprecation('5.3.0', 'PIXI.BitmapText.fonts is deprecated, use PIXI.BitmapFont.available');\n\n return BitmapFont.available;\n }\n}\n","import { LoaderResource } from '@pixi/loaders';\nimport { autoDetectFormat } from './formats';\nimport { BitmapFont } from './BitmapFont';\n\nimport type { ILoaderResource } from '@pixi/loaders';\nimport type { Dict } from '@pixi/utils';\nimport type { Loader } from '@pixi/loaders';\nimport type { Texture } from '@pixi/core';\n\n/**\n * {@link PIXI.Loader Loader} middleware for loading\n * bitmap-based fonts suitable for using with {@link PIXI.BitmapText}.\n * @class\n * @memberof PIXI\n * @implements PIXI.ILoaderPlugin\n */\nexport class BitmapFontLoader\n{\n /**\n * Called when the plugin is installed.\n *\n * @see PIXI.Loader.registerPlugin\n */\n public static add(): void\n {\n LoaderResource.setExtensionXhrType('fnt', LoaderResource.XHR_RESPONSE_TYPE.DOCUMENT);\n }\n\n /**\n * Called after a resource is loaded.\n * @see PIXI.Loader.loaderMiddleware\n * @param {PIXI.LoaderResource} resource\n * @param {function} next\n */\n static use(this: Loader, resource: ILoaderResource, next: (...args: any[]) => void): void\n {\n const format = autoDetectFormat(resource.data);\n\n // Resource was not recognised as any of the expected font data format\n if (!format)\n {\n next();\n\n return;\n }\n\n const baseUrl = BitmapFontLoader.getBaseUrl(this, resource);\n const data = format.parse(resource.data);\n const textures: Dict = {};\n\n // Handle completed, when the number of textures\n // load is the same number as references in the fnt file\n const completed = (page: ILoaderResource): void =>\n {\n textures[page.metadata.pageFile] = page.texture;\n\n if (Object.keys(textures).length === data.page.length)\n {\n resource.bitmapFont = BitmapFont.install(data, textures);\n next();\n }\n };\n\n for (let i = 0; i < data.page.length; ++i)\n {\n const pageFile = data.page[i].file;\n const url = baseUrl + pageFile;\n let exists = false;\n\n // incase the image is loaded outside\n // using the same loader, resource will be available\n for (const name in this.resources)\n {\n const bitmapResource: ILoaderResource = this.resources[name];\n\n if (bitmapResource.url === url)\n {\n bitmapResource.metadata.pageFile = pageFile;\n if (bitmapResource.texture)\n {\n completed(bitmapResource);\n }\n else\n {\n bitmapResource.onAfterMiddleware.add(completed);\n }\n exists = true;\n break;\n }\n }\n\n // texture is not loaded, we'll attempt to add\n // it to the load and add the texture to the list\n if (!exists)\n {\n // Standard loading options for images\n const options = {\n crossOrigin: resource.crossOrigin,\n loadType: LoaderResource.LOAD_TYPE.IMAGE,\n metadata: Object.assign(\n { pageFile },\n resource.metadata.imageMetadata\n ),\n parentResource: resource,\n };\n\n this.add(url, options, completed);\n }\n }\n }\n\n /**\n * Get folder path from a resource\n * @private\n * @param {PIXI.Loader} loader\n * @param {PIXI.LoaderResource} resource\n * @return {string}\n */\n private static getBaseUrl(loader: Loader, resource: ILoaderResource): string\n {\n let resUrl = !resource.isDataUrl ? BitmapFontLoader.dirname(resource.url) : '';\n\n if (resource.isDataUrl)\n {\n if (resUrl === '.')\n {\n resUrl = '';\n }\n\n if (loader.baseUrl && resUrl)\n {\n // if baseurl has a trailing slash then add one to resUrl so the replace works below\n if (loader.baseUrl.charAt(loader.baseUrl.length - 1) === '/')\n {\n resUrl += '/';\n }\n }\n }\n\n // remove baseUrl from resUrl\n resUrl = resUrl.replace(loader.baseUrl, '');\n\n // if there is an resUrl now, it needs a trailing slash. Ensure that it does if the string isn't empty.\n if (resUrl && resUrl.charAt(resUrl.length - 1) !== '/')\n {\n resUrl += '/';\n }\n\n return resUrl;\n }\n\n /**\n * Replacement for NodeJS's path.dirname\n * @private\n * @param {string} url - Path to get directory for\n */\n private static dirname(url: string): string\n {\n const dir = url\n .replace(/\\\\/g, '/') // convert windows notation to UNIX notation, URL-safe because it's a forbidden character\n .replace(/\\/$/, '') // replace trailing slash\n .replace(/\\/[^\\/]*$/, ''); // remove everything after the last\n\n // File request is relative, use current directory\n if (dir === url)\n {\n return '.';\n }\n // Started with a slash\n else if (dir === '')\n {\n return '/';\n }\n\n return dir;\n }\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\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\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import { Filter, defaultVertex } from '@pixi/core';\nimport fragment from './alpha.frag';\n\n/**\n * Simplest filter - applies alpha.\n *\n * Use this instead of Container's alpha property to avoid visual layering of individual elements.\n * AlphaFilter applies alpha evenly across the entire display object and any opaque elements it contains.\n * If elements are not opaque, they will blend with each other anyway.\n *\n * Very handy if you want to use common features of all filters:\n *\n * 1. Assign a blendMode to this filter, blend all elements inside display object with background.\n *\n * 2. To use clipping in display coordinates, assign a filterArea to the same container that has this filter.\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n */\nexport class AlphaFilter extends Filter\n{\n /**\n * @param {number} [alpha=1] - Amount of alpha from 0 to 1, where 0 is transparent\n */\n constructor(alpha = 1.0)\n {\n super(defaultVertex, fragment, { uAlpha: 1 });\n\n this.alpha = alpha;\n }\n\n /**\n * Coefficient for alpha multiplication\n *\n * @member {number}\n * @default 1\n */\n get alpha(): number\n {\n return this.uniforms.uAlpha;\n }\n\n set alpha(value: number)\n {\n this.uniforms.uAlpha = value;\n }\n}\n","interface IGAUSSIAN_VALUES {\n [x: number]: number[];\n}\nconst GAUSSIAN_VALUES: IGAUSSIAN_VALUES = {\n 5: [0.153388, 0.221461, 0.250301],\n 7: [0.071303, 0.131514, 0.189879, 0.214607],\n 9: [0.028532, 0.067234, 0.124009, 0.179044, 0.20236],\n 11: [0.0093, 0.028002, 0.065984, 0.121703, 0.175713, 0.198596],\n 13: [0.002406, 0.009255, 0.027867, 0.065666, 0.121117, 0.174868, 0.197641],\n 15: [0.000489, 0.002403, 0.009246, 0.02784, 0.065602, 0.120999, 0.174697, 0.197448],\n};\n\nconst fragTemplate = [\n 'varying vec2 vBlurTexCoords[%size%];',\n 'uniform sampler2D uSampler;',\n\n 'void main(void)',\n '{',\n ' gl_FragColor = vec4(0.0);',\n ' %blur%',\n '}',\n\n].join('\\n');\n\nexport function generateBlurFragSource(kernelSize: number): string\n{\n const kernel = GAUSSIAN_VALUES[kernelSize];\n const halfLength = kernel.length;\n\n let fragSource = fragTemplate;\n\n let blurLoop = '';\n const template = 'gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;';\n let value: number;\n\n for (let i = 0; i < kernelSize; i++)\n {\n let blur = template.replace('%index%', i.toString());\n\n value = i;\n\n if (i >= halfLength)\n {\n value = kernelSize - i - 1;\n }\n\n blur = blur.replace('%value%', kernel[value].toString());\n\n blurLoop += blur;\n blurLoop += '\\n';\n }\n\n fragSource = fragSource.replace('%blur%', blurLoop);\n fragSource = fragSource.replace('%size%', kernelSize.toString());\n\n return fragSource;\n}\n","/**\n * Different types of environments for WebGL.\n *\n * @static\n * @memberof PIXI\n * @name ENV\n * @enum {number}\n * @property {number} WEBGL_LEGACY - Used for older v1 WebGL devices. PixiJS will aim to ensure compatibility\n * with older / less advanced devices. If you experience unexplained flickering prefer this environment.\n * @property {number} WEBGL - Version 1 of WebGL\n * @property {number} WEBGL2 - Version 2 of WebGL\n */\nexport enum ENV {\n WEBGL_LEGACY,\n WEBGL,\n WEBGL2,\n}\n\n/**\n * Constant to identify the Renderer Type.\n *\n * @static\n * @memberof PIXI\n * @name RENDERER_TYPE\n * @enum {number}\n * @property {number} UNKNOWN - Unknown render type.\n * @property {number} WEBGL - WebGL render type.\n * @property {number} CANVAS - Canvas render type.\n */\nexport enum RENDERER_TYPE {\n UNKNOWN,\n WEBGL,\n CANVAS,\n}\n\n/**\n * Bitwise OR of masks that indicate the buffers to be cleared.\n *\n * @static\n * @memberof PIXI\n * @name BUFFER_BITS\n * @enum {number}\n * @property {number} COLOR - Indicates the buffers currently enabled for color writing.\n * @property {number} DEPTH - Indicates the depth buffer.\n * @property {number} STENCIL - Indicates the stencil buffer.\n */\nexport enum BUFFER_BITS {\n COLOR = 0x00004000,\n DEPTH = 0x00000100,\n STENCIL = 0x00000400\n}\n\n/**\n * Various blend modes supported by PIXI.\n *\n * IMPORTANT - The WebGL renderer only supports the NORMAL, ADD, MULTIPLY and SCREEN blend modes.\n * Anything else will silently act like NORMAL.\n *\n * @memberof PIXI\n * @name BLEND_MODES\n * @enum {number}\n * @property {number} NORMAL\n * @property {number} ADD\n * @property {number} MULTIPLY\n * @property {number} SCREEN\n * @property {number} OVERLAY\n * @property {number} DARKEN\n * @property {number} LIGHTEN\n * @property {number} COLOR_DODGE\n * @property {number} COLOR_BURN\n * @property {number} HARD_LIGHT\n * @property {number} SOFT_LIGHT\n * @property {number} DIFFERENCE\n * @property {number} EXCLUSION\n * @property {number} HUE\n * @property {number} SATURATION\n * @property {number} COLOR\n * @property {number} LUMINOSITY\n * @property {number} NORMAL_NPM\n * @property {number} ADD_NPM\n * @property {number} SCREEN_NPM\n * @property {number} NONE\n * @property {number} SRC_IN\n * @property {number} SRC_OUT\n * @property {number} SRC_ATOP\n * @property {number} DST_OVER\n * @property {number} DST_IN\n * @property {number} DST_OUT\n * @property {number} DST_ATOP\n * @property {number} SUBTRACT\n * @property {number} SRC_OVER\n * @property {number} ERASE\n * @property {number} XOR\n */\nexport enum BLEND_MODES {\n NORMAL = 0,\n ADD = 1,\n MULTIPLY = 2,\n SCREEN = 3,\n OVERLAY = 4,\n DARKEN = 5,\n LIGHTEN = 6,\n COLOR_DODGE = 7,\n COLOR_BURN = 8,\n HARD_LIGHT = 9,\n SOFT_LIGHT = 10,\n DIFFERENCE = 11,\n EXCLUSION = 12,\n HUE = 13,\n SATURATION = 14,\n COLOR = 15,\n LUMINOSITY = 16,\n NORMAL_NPM = 17,\n ADD_NPM = 18,\n SCREEN_NPM = 19,\n NONE = 20,\n\n SRC_OVER = 0,\n SRC_IN = 21,\n SRC_OUT = 22,\n SRC_ATOP = 23,\n DST_OVER = 24,\n DST_IN = 25,\n DST_OUT = 26,\n DST_ATOP = 27,\n ERASE = 26,\n SUBTRACT = 28,\n XOR = 29,\n}\n\n/**\n * Various webgl draw modes. These can be used to specify which GL drawMode to use\n * under certain situations and renderers.\n *\n * @memberof PIXI\n * @static\n * @name DRAW_MODES\n * @enum {number}\n * @property {number} POINTS\n * @property {number} LINES\n * @property {number} LINE_LOOP\n * @property {number} LINE_STRIP\n * @property {number} TRIANGLES\n * @property {number} TRIANGLE_STRIP\n * @property {number} TRIANGLE_FAN\n */\nexport enum DRAW_MODES {\n POINTS,\n LINES,\n LINE_LOOP,\n LINE_STRIP,\n TRIANGLES,\n TRIANGLE_STRIP,\n TRIANGLE_FAN,\n}\n\n/**\n * Various GL texture/resources formats.\n *\n * @memberof PIXI\n * @static\n * @name FORMATS\n * @enum {number}\n * @property {number} RGBA=6408\n * @property {number} RGB=6407\n * @property {number} ALPHA=6406\n * @property {number} LUMINANCE=6409\n * @property {number} LUMINANCE_ALPHA=6410\n * @property {number} DEPTH_COMPONENT=6402\n * @property {number} DEPTH_STENCIL=34041\n */\nexport enum FORMATS {\n RGBA = 6408,\n RGB = 6407,\n ALPHA = 6406,\n LUMINANCE = 6409,\n LUMINANCE_ALPHA = 6410,\n DEPTH_COMPONENT = 6402,\n DEPTH_STENCIL = 34041,\n}\n\n/**\n * Various GL target types.\n *\n * @memberof PIXI\n * @static\n * @name TARGETS\n * @enum {number}\n * @property {number} TEXTURE_2D=3553\n * @property {number} TEXTURE_CUBE_MAP=34067\n * @property {number} TEXTURE_2D_ARRAY=35866\n * @property {number} TEXTURE_CUBE_MAP_POSITIVE_X=34069\n * @property {number} TEXTURE_CUBE_MAP_NEGATIVE_X=34070\n * @property {number} TEXTURE_CUBE_MAP_POSITIVE_Y=34071\n * @property {number} TEXTURE_CUBE_MAP_NEGATIVE_Y=34072\n * @property {number} TEXTURE_CUBE_MAP_POSITIVE_Z=34073\n * @property {number} TEXTURE_CUBE_MAP_NEGATIVE_Z=34074\n */\nexport enum TARGETS {\n TEXTURE_2D = 3553,\n TEXTURE_CUBE_MAP = 34067,\n TEXTURE_2D_ARRAY = 35866,\n TEXTURE_CUBE_MAP_POSITIVE_X = 34069,\n TEXTURE_CUBE_MAP_NEGATIVE_X = 34070,\n TEXTURE_CUBE_MAP_POSITIVE_Y = 34071,\n TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072,\n TEXTURE_CUBE_MAP_POSITIVE_Z = 34073,\n TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074,\n}\n\n/**\n * Various GL data format types.\n *\n * @memberof PIXI\n * @static\n * @name TYPES\n * @enum {number}\n * @property {number} UNSIGNED_BYTE=5121\n * @property {number} UNSIGNED_SHORT=5123\n * @property {number} UNSIGNED_SHORT_5_6_5=33635\n * @property {number} UNSIGNED_SHORT_4_4_4_4=32819\n * @property {number} UNSIGNED_SHORT_5_5_5_1=32820\n * @property {number} FLOAT=5126\n * @property {number} HALF_FLOAT=36193\n */\nexport enum TYPES {\n UNSIGNED_BYTE = 5121,\n UNSIGNED_SHORT = 5123,\n UNSIGNED_SHORT_5_6_5 = 33635,\n UNSIGNED_SHORT_4_4_4_4 = 32819,\n UNSIGNED_SHORT_5_5_5_1 = 32820,\n FLOAT = 5126,\n HALF_FLOAT = 36193,\n}\n\n/**\n * The scale modes that are supported by pixi.\n *\n * The {@link PIXI.settings.SCALE_MODE} scale mode affects the default scaling mode of future operations.\n * It can be re-assigned to either LINEAR or NEAREST, depending upon suitability.\n *\n * @memberof PIXI\n * @static\n * @name SCALE_MODES\n * @enum {number}\n * @property {number} LINEAR Smooth scaling\n * @property {number} NEAREST Pixelating scaling\n */\nexport enum SCALE_MODES {\n NEAREST,\n LINEAR,\n}\n\n/**\n * The wrap modes that are supported by pixi.\n *\n * The {@link PIXI.settings.WRAP_MODE} wrap mode affects the default wrapping mode of future operations.\n * It can be re-assigned to either CLAMP or REPEAT, depending upon suitability.\n * If the texture is non power of two then clamp will be used regardless as WebGL can\n * only use REPEAT if the texture is po2.\n *\n * This property only affects WebGL.\n *\n * @name WRAP_MODES\n * @memberof PIXI\n * @static\n * @enum {number}\n * @property {number} CLAMP - The textures uvs are clamped\n * @property {number} REPEAT - The texture uvs tile and repeat\n * @property {number} MIRRORED_REPEAT - The texture uvs tile and repeat with mirroring\n */\nexport enum WRAP_MODES {\n CLAMP = 33071,\n REPEAT = 10497,\n MIRRORED_REPEAT = 33648,\n}\n\n/**\n * Mipmap filtering modes that are supported by pixi.\n *\n * The {@link PIXI.settings.MIPMAP_TEXTURES} affects default texture filtering.\n * Mipmaps are generated for a baseTexture if its `mipmap` field is `ON`,\n * or its `POW2` and texture dimensions are powers of 2.\n * Due to platform restriction, `ON` option will work like `POW2` for webgl-1.\n *\n * This property only affects WebGL.\n *\n * @name MIPMAP_MODES\n * @memberof PIXI\n * @static\n * @enum {number}\n * @property {number} OFF - No mipmaps\n * @property {number} POW2 - Generate mipmaps if texture dimensions are pow2\n * @property {number} ON - Always generate mipmaps\n */\nexport enum MIPMAP_MODES {\n OFF,\n POW2,\n ON,\n}\n\n/**\n * How to treat textures with premultiplied alpha\n *\n * @name ALPHA_MODES\n * @memberof PIXI\n * @static\n * @enum {number}\n * @property {number} NO_PREMULTIPLIED_ALPHA - Source is not premultiplied, leave it like that.\n * Option for compressed and data textures that are created from typed arrays.\n * @property {number} PREMULTIPLY_ON_UPLOAD - Source is not premultiplied, premultiply on upload.\n * Default option, used for all loaded images.\n * @property {number} PREMULTIPLIED_ALPHA - Source is already premultiplied\n * Example: spine atlases with `_pma` suffix.\n * @property {number} NPM - Alias for NO_PREMULTIPLIED_ALPHA.\n * @property {number} UNPACK - Default option, alias for PREMULTIPLY_ON_UPLOAD.\n * @property {number} PMA - Alias for PREMULTIPLIED_ALPHA.\n */\nexport enum ALPHA_MODES {\n NPM = 0,\n UNPACK = 1,\n PMA = 2,\n NO_PREMULTIPLIED_ALPHA = 0,\n PREMULTIPLY_ON_UPLOAD = 1,\n PREMULTIPLY_ALPHA = 2,\n}\n\n/**\n * How to clear renderTextures in filter\n *\n * @name CLEAR_MODES\n * @memberof PIXI\n * @static\n * @enum {number}\n * @property {number} BLEND - Preserve the information in the texture, blend above\n * @property {number} CLEAR - Must use `gl.clear` operation\n * @property {number} BLIT - Clear or blit it, depends on device and level of paranoia\n * @property {number} NO - Alias for BLEND, same as `false` in earlier versions\n * @property {number} YES - Alias for CLEAR, same as `true` in earlier versions\n * @property {number} AUTO - Alias for BLIT\n */\nexport enum CLEAR_MODES {\n NO = 0,\n YES = 1,\n AUTO = 2,\n BLEND = 0,\n CLEAR = 1,\n BLIT = 2,\n}\n\n/**\n * The gc modes that are supported by pixi.\n *\n * The {@link PIXI.settings.GC_MODE} Garbage Collection mode for PixiJS textures is AUTO\n * If set to GC_MODE, the renderer will occasionally check textures usage. If they are not\n * used for a specified period of time they will be removed from the GPU. They will of course\n * be uploaded again when they are required. This is a silent behind the scenes process that\n * should ensure that the GPU does not get filled up.\n *\n * Handy for mobile devices!\n * This property only affects WebGL.\n *\n * @name GC_MODES\n * @enum {number}\n * @static\n * @memberof PIXI\n * @property {number} AUTO - Garbage collection will happen periodically automatically\n * @property {number} MANUAL - Garbage collection will need to be called manually\n */\nexport enum GC_MODES {\n AUTO,\n MANUAL,\n}\n\n/**\n * Constants that specify float precision in shaders.\n *\n * @name PRECISION\n * @memberof PIXI\n * @constant\n * @static\n * @enum {string}\n * @property {string} LOW='lowp'\n * @property {string} MEDIUM='mediump'\n * @property {string} HIGH='highp'\n */\nexport enum PRECISION {\n LOW = 'lowp',\n MEDIUM = 'mediump',\n HIGH = 'highp',\n}\n\n/**\n * Constants for mask implementations.\n * We use `type` suffix because it leads to very different behaviours\n *\n * @name MASK_TYPES\n * @memberof PIXI\n * @static\n * @enum {number}\n * @property {number} NONE - Mask is ignored\n * @property {number} SCISSOR - Scissor mask, rectangle on screen, cheap\n * @property {number} STENCIL - Stencil mask, 1-bit, medium, works only if renderer supports stencil\n * @property {number} SPRITE - Mask that uses SpriteMaskFilter, uses temporary RenderTexture\n */\nexport enum MASK_TYPES {\n NONE = 0,\n SCISSOR = 1,\n STENCIL = 2,\n SPRITE = 3,\n}\n\n/**\n * Constants for multi-sampling antialiasing.\n *\n * @see PIXI.Framebuffer#multisample\n *\n * @name MSAA_QUALITY\n * @memberof PIXI\n * @static\n * @enum {number}\n * @property {number} NONE - No multisampling for this renderTexture\n * @property {number} LOW - Try 2 samples\n * @property {number} MEDIUM - Try 4 samples\n * @property {number} HIGH - Try 8 samples\n */\nexport enum MSAA_QUALITY {\n NONE = 0,\n LOW = 2,\n MEDIUM = 4,\n HIGH = 8\n}\n","import { Filter } from '@pixi/core';\nimport { settings } from '@pixi/settings';\nimport { generateBlurVertSource } from './generateBlurVertSource';\nimport { generateBlurFragSource } from './generateBlurFragSource';\nimport { CLEAR_MODES } from '@pixi/constants';\n\nimport type { RenderTexture, systems } from '@pixi/core';\n\n/**\n * The BlurFilterPass applies a horizontal or vertical Gaussian blur to an object.\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n */\nexport class BlurFilterPass extends Filter\n{\n public horizontal: boolean;\n public strength: number;\n public passes: number;\n\n private _quality: number;\n\n /**\n * @param {boolean} horizontal - Do pass along the x-axis (`true`) or y-axis (`false`).\n * @param {number} [strength=8] - The strength of the blur filter.\n * @param {number} [quality=4] - The quality of the blur filter.\n * @param {number} [resolution=1] - The resolution of the blur filter.\n * @param {number} [kernelSize=5] - The kernelSize of the blur filter.Options: 5, 7, 9, 11, 13, 15.\n */\n constructor(horizontal: boolean, strength = 8, quality = 4, resolution = settings.RESOLUTION, kernelSize = 5)\n {\n const vertSrc = generateBlurVertSource(kernelSize, horizontal);\n const fragSrc = generateBlurFragSource(kernelSize);\n\n super(\n // vertex shader\n vertSrc,\n // fragment shader\n fragSrc\n );\n\n this.horizontal = horizontal;\n\n this.resolution = resolution;\n\n this._quality = 0;\n\n this.quality = quality;\n\n this.blur = strength;\n }\n\n /**\n * Applies the filter.\n *\n * @param {PIXI.systems.FilterSystem} filterManager - The manager.\n * @param {PIXI.RenderTexture} input - The input target.\n * @param {PIXI.RenderTexture} output - The output target.\n * @param {PIXI.CLEAR_MODES} clearMode - How to clear\n */\n public apply(\n filterManager: systems.FilterSystem, input: RenderTexture, output: RenderTexture, clearMode: CLEAR_MODES\n ): void\n {\n if (output)\n {\n if (this.horizontal)\n {\n this.uniforms.strength = (1 / output.width) * (output.width / input.width);\n }\n else\n {\n this.uniforms.strength = (1 / output.height) * (output.height / input.height);\n }\n }\n else\n {\n if (this.horizontal) // eslint-disable-line\n {\n this.uniforms.strength = (1 / filterManager.renderer.width) * (filterManager.renderer.width / input.width);\n }\n else\n {\n this.uniforms.strength = (1 / filterManager.renderer.height) * (filterManager.renderer.height / input.height); // eslint-disable-line\n }\n }\n\n // screen space!\n this.uniforms.strength *= this.strength;\n this.uniforms.strength /= this.passes;\n\n if (this.passes === 1)\n {\n filterManager.applyFilter(this, input, output, clearMode);\n }\n else\n {\n const renderTarget = filterManager.getFilterTexture();\n const renderer = filterManager.renderer;\n\n let flip = input;\n let flop = renderTarget;\n\n this.state.blend = false;\n filterManager.applyFilter(this, flip, flop, CLEAR_MODES.CLEAR);\n\n for (let i = 1; i < this.passes - 1; i++)\n {\n filterManager.bindAndClear(flip, CLEAR_MODES.BLIT);\n\n this.uniforms.uSampler = flop;\n\n const temp = flop;\n\n flop = flip;\n flip = temp;\n\n renderer.shader.bind(this);\n renderer.geometry.draw(5);\n }\n\n this.state.blend = true;\n filterManager.applyFilter(this, flop, output, clearMode);\n filterManager.returnFilterTexture(renderTarget);\n }\n }\n /**\n * Sets the strength of both the blur.\n *\n * @member {number}\n * @default 16\n */\n get blur(): number\n {\n return this.strength;\n }\n\n set blur(value: number)\n {\n this.padding = 1 + (Math.abs(value) * 2);\n this.strength = value;\n }\n\n /**\n * Sets the quality of the blur by modifying the number of passes. More passes means higher\n * quaility bluring but the lower the performance.\n *\n * @member {number}\n * @default 4\n */\n get quality(): number\n {\n return this._quality;\n }\n\n set quality(value: number)\n {\n this._quality = value;\n this.passes = value;\n }\n}\n","const vertTemplate = `\n attribute vec2 aVertexPosition;\n\n uniform mat3 projectionMatrix;\n\n uniform float strength;\n\n varying vec2 vBlurTexCoords[%size%];\n\n uniform vec4 inputSize;\n uniform vec4 outputFrame;\n\n vec4 filterVertexPosition( void )\n {\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n }\n\n vec2 filterTextureCoord( void )\n {\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n }\n\n void main(void)\n {\n gl_Position = filterVertexPosition();\n\n vec2 textureCoord = filterTextureCoord();\n %blur%\n }`;\n\nexport function generateBlurVertSource(kernelSize: number, x: boolean): string\n{\n const halfLength = Math.ceil(kernelSize / 2);\n\n let vertSource = vertTemplate;\n\n let blurLoop = '';\n let template;\n\n if (x)\n {\n template = 'vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);';\n }\n else\n {\n template = 'vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);';\n }\n\n for (let i = 0; i < kernelSize; i++)\n {\n let blur = template.replace('%index%', i.toString());\n\n blur = blur.replace('%sampleIndex%', `${i - (halfLength - 1)}.0`);\n\n blurLoop += blur;\n blurLoop += '\\n';\n }\n\n vertSource = vertSource.replace('%blur%', blurLoop);\n vertSource = vertSource.replace('%size%', kernelSize.toString());\n\n return vertSource;\n}\n","import { Filter } from '@pixi/core';\nimport { settings } from '@pixi/settings';\nimport { BlurFilterPass } from './BlurFilterPass';\nimport { CLEAR_MODES } from '@pixi/constants';\n\nimport type { RenderTexture, systems } from '@pixi/core';\nimport type { BLEND_MODES } from '@pixi/constants';\n\n/**\n * The BlurFilter applies a Gaussian blur to an object.\n *\n * The strength of the blur can be set for the x-axis and y-axis separately.\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n */\nexport class BlurFilter extends Filter\n{\n public blurXFilter: BlurFilterPass;\n public blurYFilter: BlurFilterPass;\n\n private _repeatEdgePixels: boolean;\n\n /**\n * @param {number} [strength=8] - The strength of the blur filter.\n * @param {number} [quality=4] - The quality of the blur filter.\n * @param {number} [resolution=1] - The resolution of the blur filter.\n * @param {number} [kernelSize=5] - The kernelSize of the blur filter.Options: 5, 7, 9, 11, 13, 15.\n */\n constructor(strength = 8, quality = 4, resolution = settings.RESOLUTION, kernelSize = 5)\n {\n super();\n\n this.blurXFilter = new BlurFilterPass(true, strength, quality, resolution, kernelSize);\n this.blurYFilter = new BlurFilterPass(false, strength, quality, resolution, kernelSize);\n\n this.resolution = resolution;\n this.quality = quality;\n this.blur = strength;\n\n this.repeatEdgePixels = false;\n }\n\n /**\n * Applies the filter.\n *\n * @param {PIXI.systems.FilterSystem} filterManager - The manager.\n * @param {PIXI.RenderTexture} input - The input target.\n * @param {PIXI.RenderTexture} output - The output target.\n * @param {PIXI.CLEAR_MODES} clearMode - How to clear\n */\n apply(filterManager: systems.FilterSystem, input: RenderTexture, output: RenderTexture, clearMode: CLEAR_MODES): void\n {\n const xStrength = Math.abs(this.blurXFilter.strength);\n const yStrength = Math.abs(this.blurYFilter.strength);\n\n if (xStrength && yStrength)\n {\n const renderTarget = filterManager.getFilterTexture();\n\n this.blurXFilter.apply(filterManager, input, renderTarget, CLEAR_MODES.CLEAR);\n this.blurYFilter.apply(filterManager, renderTarget, output, clearMode);\n\n filterManager.returnFilterTexture(renderTarget);\n }\n else if (yStrength)\n {\n this.blurYFilter.apply(filterManager, input, output, clearMode);\n }\n else\n {\n this.blurXFilter.apply(filterManager, input, output, clearMode);\n }\n }\n\n protected updatePadding(): void\n {\n if (this._repeatEdgePixels)\n {\n this.padding = 0;\n }\n else\n {\n this.padding = Math.max(Math.abs(this.blurXFilter.strength), Math.abs(this.blurYFilter.strength)) * 2;\n }\n }\n\n /**\n * Sets the strength of both the blurX and blurY properties simultaneously\n *\n * @member {number}\n * @default 2\n */\n get blur(): number\n {\n return this.blurXFilter.blur;\n }\n\n set blur(value: number)\n {\n this.blurXFilter.blur = this.blurYFilter.blur = value;\n this.updatePadding();\n }\n\n /**\n * Sets the number of passes for blur. More passes means higher quaility bluring.\n *\n * @member {number}\n * @default 1\n */\n get quality(): number\n {\n return this.blurXFilter.quality;\n }\n\n set quality(value: number)\n {\n this.blurXFilter.quality = this.blurYFilter.quality = value;\n }\n\n /**\n * Sets the strength of the blurX property\n *\n * @member {number}\n * @default 2\n */\n get blurX(): number\n {\n return this.blurXFilter.blur;\n }\n\n set blurX(value: number)\n {\n this.blurXFilter.blur = value;\n this.updatePadding();\n }\n\n /**\n * Sets the strength of the blurY property\n *\n * @member {number}\n * @default 2\n */\n get blurY(): number\n {\n return this.blurYFilter.blur;\n }\n\n set blurY(value: number)\n {\n this.blurYFilter.blur = value;\n this.updatePadding();\n }\n\n /**\n * Sets the blendmode of the filter\n *\n * @member {number}\n * @default PIXI.BLEND_MODES.NORMAL\n */\n get blendMode(): BLEND_MODES\n {\n return this.blurYFilter.blendMode;\n }\n\n set blendMode(value: BLEND_MODES)\n {\n this.blurYFilter.blendMode = value;\n }\n\n /**\n * If set to true the edge of the target will be clamped\n *\n * @member {boolean}\n * @default false\n */\n get repeatEdgePixels(): boolean\n {\n return this._repeatEdgePixels;\n }\n\n set repeatEdgePixels(value: boolean)\n {\n this._repeatEdgePixels = value;\n this.updatePadding();\n }\n}\n","import { Filter, defaultFilterVertex } from '@pixi/core';\nimport fragment from './colorMatrix.frag';\n\nimport type { ArrayFixed } from '@pixi/utils';\n\nexport type ColorMatrix = ArrayFixed;\n\n/**\n * The ColorMatrixFilter class lets you apply a 5x4 matrix transformation on the RGBA\n * color and alpha values of every pixel on your displayObject to produce a result\n * with a new set of RGBA color and alpha values. It's pretty powerful!\n *\n * ```js\n * let colorMatrix = new PIXI.filters.ColorMatrixFilter();\n * container.filters = [colorMatrix];\n * colorMatrix.contrast(2);\n * ```\n * @author Clément Chenebault \n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n */\nexport class ColorMatrixFilter extends Filter\n{\n public grayscale: (scale: number, multiply: boolean) => void;\n\n constructor()\n {\n const uniforms = {\n m: new Float32Array([1, 0, 0, 0, 0,\n 0, 1, 0, 0, 0,\n 0, 0, 1, 0, 0,\n 0, 0, 0, 1, 0]),\n uAlpha: 1,\n };\n\n super(defaultFilterVertex, fragment, uniforms);\n\n this.alpha = 1;\n }\n\n /**\n * Transforms current matrix and set the new one\n *\n * @param {number[]} matrix - 5x4 matrix\n * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n private _loadMatrix(matrix: ColorMatrix, multiply = false): void\n {\n let newMatrix = matrix;\n\n if (multiply)\n {\n this._multiply(newMatrix, this.uniforms.m, matrix);\n newMatrix = this._colorMatrix(newMatrix) as any;\n }\n\n // set the new matrix\n this.uniforms.m = newMatrix;\n }\n\n /**\n * Multiplies two mat5's\n *\n * @private\n * @param {number[]} out - 5x4 matrix the receiving matrix\n * @param {number[]} a - 5x4 matrix the first operand\n * @param {number[]} b - 5x4 matrix the second operand\n * @returns {number[]} 5x4 matrix\n */\n private _multiply(out: ColorMatrix, a: ColorMatrix, b: ColorMatrix): ColorMatrix\n {\n // Red Channel\n out[0] = (a[0] * b[0]) + (a[1] * b[5]) + (a[2] * b[10]) + (a[3] * b[15]);\n out[1] = (a[0] * b[1]) + (a[1] * b[6]) + (a[2] * b[11]) + (a[3] * b[16]);\n out[2] = (a[0] * b[2]) + (a[1] * b[7]) + (a[2] * b[12]) + (a[3] * b[17]);\n out[3] = (a[0] * b[3]) + (a[1] * b[8]) + (a[2] * b[13]) + (a[3] * b[18]);\n out[4] = (a[0] * b[4]) + (a[1] * b[9]) + (a[2] * b[14]) + (a[3] * b[19]) + a[4];\n\n // Green Channel\n out[5] = (a[5] * b[0]) + (a[6] * b[5]) + (a[7] * b[10]) + (a[8] * b[15]);\n out[6] = (a[5] * b[1]) + (a[6] * b[6]) + (a[7] * b[11]) + (a[8] * b[16]);\n out[7] = (a[5] * b[2]) + (a[6] * b[7]) + (a[7] * b[12]) + (a[8] * b[17]);\n out[8] = (a[5] * b[3]) + (a[6] * b[8]) + (a[7] * b[13]) + (a[8] * b[18]);\n out[9] = (a[5] * b[4]) + (a[6] * b[9]) + (a[7] * b[14]) + (a[8] * b[19]) + a[9];\n\n // Blue Channel\n out[10] = (a[10] * b[0]) + (a[11] * b[5]) + (a[12] * b[10]) + (a[13] * b[15]);\n out[11] = (a[10] * b[1]) + (a[11] * b[6]) + (a[12] * b[11]) + (a[13] * b[16]);\n out[12] = (a[10] * b[2]) + (a[11] * b[7]) + (a[12] * b[12]) + (a[13] * b[17]);\n out[13] = (a[10] * b[3]) + (a[11] * b[8]) + (a[12] * b[13]) + (a[13] * b[18]);\n out[14] = (a[10] * b[4]) + (a[11] * b[9]) + (a[12] * b[14]) + (a[13] * b[19]) + a[14];\n\n // Alpha Channel\n out[15] = (a[15] * b[0]) + (a[16] * b[5]) + (a[17] * b[10]) + (a[18] * b[15]);\n out[16] = (a[15] * b[1]) + (a[16] * b[6]) + (a[17] * b[11]) + (a[18] * b[16]);\n out[17] = (a[15] * b[2]) + (a[16] * b[7]) + (a[17] * b[12]) + (a[18] * b[17]);\n out[18] = (a[15] * b[3]) + (a[16] * b[8]) + (a[17] * b[13]) + (a[18] * b[18]);\n out[19] = (a[15] * b[4]) + (a[16] * b[9]) + (a[17] * b[14]) + (a[18] * b[19]) + a[19];\n\n return out;\n }\n\n /**\n * Create a Float32 Array and normalize the offset component to 0-1\n *\n * @private\n * @param {number[]} matrix - 5x4 matrix\n * @return {number[]} 5x4 matrix with all values between 0-1\n */\n private _colorMatrix(matrix: ColorMatrix): ColorMatrix\n {\n // Create a Float32 Array and normalize the offset component to 0-1\n const m = new Float32Array(matrix);\n\n m[4] /= 255;\n m[9] /= 255;\n m[14] /= 255;\n m[19] /= 255;\n\n return m as any;\n }\n\n /**\n * Adjusts brightness\n *\n * @param {number} b - value of the brigthness (0-1, where 0 is black)\n * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public brightness(b: number, multiply: boolean): void\n {\n const matrix: ColorMatrix = [\n b, 0, 0, 0, 0,\n 0, b, 0, 0, 0,\n 0, 0, b, 0, 0,\n 0, 0, 0, 1, 0,\n ];\n\n this._loadMatrix(matrix, multiply);\n }\n\n /**\n * Set the matrices in grey scales\n *\n * @param {number} scale - value of the grey (0-1, where 0 is black)\n * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public greyscale(scale: number, multiply: boolean): void\n {\n const matrix: ColorMatrix = [\n scale, scale, scale, 0, 0,\n scale, scale, scale, 0, 0,\n scale, scale, scale, 0, 0,\n 0, 0, 0, 1, 0,\n ];\n\n this._loadMatrix(matrix, multiply);\n }\n\n /**\n * Set the black and white matrice.\n *\n * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public blackAndWhite(multiply: boolean): void\n {\n const matrix: ColorMatrix = [\n 0.3, 0.6, 0.1, 0, 0,\n 0.3, 0.6, 0.1, 0, 0,\n 0.3, 0.6, 0.1, 0, 0,\n 0, 0, 0, 1, 0,\n ];\n\n this._loadMatrix(matrix, multiply);\n }\n\n /**\n * Set the hue property of the color\n *\n * @param {number} rotation - in degrees\n * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public hue(rotation: number, multiply: boolean): void\n {\n rotation = (rotation || 0) / 180 * Math.PI;\n\n const cosR = Math.cos(rotation);\n const sinR = Math.sin(rotation);\n const sqrt = Math.sqrt;\n\n /* a good approximation for hue rotation\n This matrix is far better than the versions with magic luminance constants\n formerly used here, but also used in the starling framework (flash) and known from this\n old part of the internet: quasimondo.com/archives/000565.php\n\n This new matrix is based on rgb cube rotation in space. Look here for a more descriptive\n implementation as a shader not a general matrix:\n https://github.com/evanw/glfx.js/blob/58841c23919bd59787effc0333a4897b43835412/src/filters/adjust/huesaturation.js\n\n This is the source for the code:\n see http://stackoverflow.com/questions/8507885/shift-hue-of-an-rgb-color/8510751#8510751\n */\n\n const w = 1 / 3;\n const sqrW = sqrt(w); // weight is\n\n const a00 = cosR + ((1.0 - cosR) * w);\n const a01 = (w * (1.0 - cosR)) - (sqrW * sinR);\n const a02 = (w * (1.0 - cosR)) + (sqrW * sinR);\n\n const a10 = (w * (1.0 - cosR)) + (sqrW * sinR);\n const a11 = cosR + (w * (1.0 - cosR));\n const a12 = (w * (1.0 - cosR)) - (sqrW * sinR);\n\n const a20 = (w * (1.0 - cosR)) - (sqrW * sinR);\n const a21 = (w * (1.0 - cosR)) + (sqrW * sinR);\n const a22 = cosR + (w * (1.0 - cosR));\n\n const matrix: ColorMatrix = [\n a00, a01, a02, 0, 0,\n a10, a11, a12, 0, 0,\n a20, a21, a22, 0, 0,\n 0, 0, 0, 1, 0,\n ];\n\n this._loadMatrix(matrix, multiply);\n }\n\n /**\n * Set the contrast matrix, increase the separation between dark and bright\n * Increase contrast : shadows darker and highlights brighter\n * Decrease contrast : bring the shadows up and the highlights down\n *\n * @param {number} amount - value of the contrast (0-1)\n * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public contrast(amount: number, multiply: boolean): void\n {\n const v = (amount || 0) + 1;\n const o = -0.5 * (v - 1);\n\n const matrix: ColorMatrix = [\n v, 0, 0, 0, o,\n 0, v, 0, 0, o,\n 0, 0, v, 0, o,\n 0, 0, 0, 1, 0,\n ];\n\n this._loadMatrix(matrix, multiply);\n }\n\n /**\n * Set the saturation matrix, increase the separation between colors\n * Increase saturation : increase contrast, brightness, and sharpness\n *\n * @param {number} amount - The saturation amount (0-1)\n * @param {boolean} [multiply] - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public saturate(amount = 0, multiply?: boolean): void\n {\n const x = (amount * 2 / 3) + 1;\n const y = ((x - 1) * -0.5);\n\n const matrix: ColorMatrix = [\n x, y, y, 0, 0,\n y, x, y, 0, 0,\n y, y, x, 0, 0,\n 0, 0, 0, 1, 0,\n ];\n\n this._loadMatrix(matrix, multiply);\n }\n\n /**\n * Desaturate image (remove color)\n *\n * Call the saturate function\n *\n */\n public desaturate(): void // eslint-disable-line no-unused-vars\n {\n this.saturate(-1);\n }\n\n /**\n * Negative image (inverse of classic rgb matrix)\n *\n * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public negative(multiply: boolean): void\n {\n const matrix: ColorMatrix = [\n -1, 0, 0, 1, 0,\n 0, -1, 0, 1, 0,\n 0, 0, -1, 1, 0,\n 0, 0, 0, 1, 0,\n ];\n\n this._loadMatrix(matrix, multiply);\n }\n\n /**\n * Sepia image\n *\n * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public sepia(multiply: boolean): void\n {\n const matrix: ColorMatrix = [\n 0.393, 0.7689999, 0.18899999, 0, 0,\n 0.349, 0.6859999, 0.16799999, 0, 0,\n 0.272, 0.5339999, 0.13099999, 0, 0,\n 0, 0, 0, 1, 0,\n ];\n\n this._loadMatrix(matrix, multiply);\n }\n\n /**\n * Color motion picture process invented in 1916 (thanks Dominic Szablewski)\n *\n * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public technicolor(multiply: boolean): void\n {\n const matrix: ColorMatrix = [\n 1.9125277891456083, -0.8545344976951645, -0.09155508482755585, 0, 11.793603434377337,\n -0.3087833385928097, 1.7658908555458428, -0.10601743074722245, 0, -70.35205161461398,\n -0.231103377548616, -0.7501899197440212, 1.847597816108189, 0, 30.950940869491138,\n 0, 0, 0, 1, 0,\n ];\n\n this._loadMatrix(matrix, multiply);\n }\n\n /**\n * Polaroid filter\n *\n * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public polaroid(multiply: boolean): void\n {\n const matrix: ColorMatrix = [\n 1.438, -0.062, -0.062, 0, 0,\n -0.122, 1.378, -0.122, 0, 0,\n -0.016, -0.016, 1.483, 0, 0,\n 0, 0, 0, 1, 0,\n ];\n\n this._loadMatrix(matrix, multiply);\n }\n\n /**\n * Filter who transforms : Red -> Blue and Blue -> Red\n *\n * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public toBGR(multiply: boolean): void\n {\n const matrix: ColorMatrix = [\n 0, 0, 1, 0, 0,\n 0, 1, 0, 0, 0,\n 1, 0, 0, 0, 0,\n 0, 0, 0, 1, 0,\n ];\n\n this._loadMatrix(matrix, multiply);\n }\n\n /**\n * Color reversal film introduced by Eastman Kodak in 1935. (thanks Dominic Szablewski)\n *\n * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public kodachrome(multiply: boolean): void\n {\n const matrix: ColorMatrix = [\n 1.1285582396593525, -0.3967382283601348, -0.03992559172921793, 0, 63.72958762196502,\n -0.16404339962244616, 1.0835251566291304, -0.05498805115633132, 0, 24.732407896706203,\n -0.16786010706155763, -0.5603416277695248, 1.6014850761964943, 0, 35.62982807460946,\n 0, 0, 0, 1, 0,\n ];\n\n this._loadMatrix(matrix, multiply);\n }\n\n /**\n * Brown delicious browni filter (thanks Dominic Szablewski)\n *\n * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public browni(multiply: boolean): void\n {\n const matrix: ColorMatrix = [\n 0.5997023498159715, 0.34553243048391263, -0.2708298674538042, 0, 47.43192855600873,\n -0.037703249837783157, 0.8609577587992641, 0.15059552388459913, 0, -36.96841498319127,\n 0.24113635128153335, -0.07441037908422492, 0.44972182064877153, 0, -7.562075277591283,\n 0, 0, 0, 1, 0,\n ];\n\n this._loadMatrix(matrix, multiply);\n }\n\n /**\n * Vintage filter (thanks Dominic Szablewski)\n *\n * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public vintage(multiply: boolean): void\n {\n const matrix: ColorMatrix = [\n 0.6279345635605994, 0.3202183420819367, -0.03965408211312453, 0, 9.651285835294123,\n 0.02578397704808868, 0.6441188644374771, 0.03259127616149294, 0, 7.462829176470591,\n 0.0466055556782719, -0.0851232987247891, 0.5241648018700465, 0, 5.159190588235296,\n 0, 0, 0, 1, 0,\n ];\n\n this._loadMatrix(matrix, multiply);\n }\n\n /**\n * We don't know exactly what it does, kind of gradient map, but funny to play with!\n *\n * @param {number} desaturation - Tone values.\n * @param {number} toned - Tone values.\n * @param {number} lightColor - Tone values, example: `0xFFE580`\n * @param {number} darkColor - Tone values, example: `0xFFE580`\n * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public colorTone(desaturation: number, toned: number, lightColor: number, darkColor: number, multiply: boolean): void\n {\n desaturation = desaturation || 0.2;\n toned = toned || 0.15;\n lightColor = lightColor || 0xFFE580;\n darkColor = darkColor || 0x338000;\n\n const lR = ((lightColor >> 16) & 0xFF) / 255;\n const lG = ((lightColor >> 8) & 0xFF) / 255;\n const lB = (lightColor & 0xFF) / 255;\n\n const dR = ((darkColor >> 16) & 0xFF) / 255;\n const dG = ((darkColor >> 8) & 0xFF) / 255;\n const dB = (darkColor & 0xFF) / 255;\n\n const matrix: ColorMatrix = [\n 0.3, 0.59, 0.11, 0, 0,\n lR, lG, lB, desaturation, 0,\n dR, dG, dB, toned, 0,\n lR - dR, lG - dG, lB - dB, 0, 0,\n ];\n\n this._loadMatrix(matrix, multiply);\n }\n\n /**\n * Night effect\n *\n * @param {number} intensity - The intensity of the night effect.\n * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public night(intensity: number, multiply: boolean): void\n {\n intensity = intensity || 0.1;\n\n const matrix: ColorMatrix = [\n intensity * (-2.0), -intensity, 0, 0, 0,\n -intensity, 0, intensity, 0, 0,\n 0, intensity, intensity * 2.0, 0, 0,\n 0, 0, 0, 1, 0,\n ];\n\n this._loadMatrix(matrix, multiply);\n }\n\n /**\n * Predator effect\n *\n * Erase the current matrix by setting a new indepent one\n *\n * @param {number} amount - how much the predator feels his future victim\n * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public predator(amount: number, multiply: boolean): void\n {\n const matrix: ColorMatrix = [\n // row 1\n 11.224130630493164 * amount,\n -4.794486999511719 * amount,\n -2.8746118545532227 * amount,\n 0 * amount,\n 0.40342438220977783 * amount,\n // row 2\n -3.6330697536468506 * amount,\n 9.193157196044922 * amount,\n -2.951810836791992 * amount,\n 0 * amount,\n -1.316135048866272 * amount,\n // row 3\n -3.2184197902679443 * amount,\n -4.2375030517578125 * amount,\n 7.476448059082031 * amount,\n 0 * amount,\n 0.8044459223747253 * amount,\n // row 4\n 0, 0, 0, 1, 0,\n ];\n\n this._loadMatrix(matrix, multiply);\n }\n\n /**\n * LSD effect\n *\n * Multiply the current matrix\n *\n * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false,\n * just set the current matrix with @param matrix\n */\n public lsd(multiply: boolean): void\n {\n const matrix: ColorMatrix = [\n 2, -0.4, 0.5, 0, 0,\n -0.5, 2, -0.4, 0, 0,\n -0.4, -0.5, 3, 0, 0,\n 0, 0, 0, 1, 0,\n ];\n\n this._loadMatrix(matrix, multiply);\n }\n\n /**\n * Erase the current matrix by setting the default one\n *\n */\n public reset(): void\n {\n const matrix: ColorMatrix = [\n 1, 0, 0, 0, 0,\n 0, 1, 0, 0, 0,\n 0, 0, 1, 0, 0,\n 0, 0, 0, 1, 0,\n ];\n\n this._loadMatrix(matrix, false);\n }\n\n /**\n * The matrix of the color matrix filter\n *\n * @member {number[]}\n * @default [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]\n */\n get matrix(): ColorMatrix\n {\n return this.uniforms.m;\n }\n\n set matrix(value: ColorMatrix)\n {\n this.uniforms.m = value;\n }\n\n /**\n * The opacity value to use when mixing the original and resultant colors.\n *\n * When the value is 0, the original color is used without modification.\n * When the value is 1, the result color is used.\n * When in the range (0, 1) the color is interpolated between the original and result by this amount.\n *\n * @member {number}\n * @default 1\n */\n get alpha(): number\n {\n return this.uniforms.uAlpha;\n }\n\n set alpha(value: number)\n {\n this.uniforms.uAlpha = value;\n }\n}\n\n// Americanized alias\nColorMatrixFilter.prototype.grayscale = ColorMatrixFilter.prototype.greyscale;\n","import { Filter } from '@pixi/core';\nimport { Matrix, Point } from '@pixi/math';\nimport fragment from './displacement.frag';\nimport vertex from './displacement.vert';\n\nimport type { CLEAR_MODES } from '@pixi/constants';\nimport type { RenderTexture, systems, Texture, ISpriteMaskTarget } from '@pixi/core';\n\n/**\n * The DisplacementFilter class uses the pixel values from the specified texture\n * (called the displacement map) to perform a displacement of an object.\n *\n * You can use this filter to apply all manor of crazy warping effects.\n * Currently the `r` property of the texture is used to offset the `x`\n * and the `g` property of the texture is used to offset the `y`.\n *\n * The way it works is it uses the values of the displacement map to look up the\n * correct pixels to output. This means it's not technically moving the original.\n * Instead, it's starting at the output and asking \"which pixel from the original goes here\".\n * For example, if a displacement map pixel has `red = 1` and the filter scale is `20`,\n * this filter will output the pixel approximately 20 pixels to the right of the original.\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n */\nexport class DisplacementFilter extends Filter\n{\n public maskSprite: ISpriteMaskTarget;\n public maskMatrix: Matrix;\n public scale: Point;\n\n /**\n * @param {PIXI.Sprite} sprite - The sprite used for the displacement map. (make sure its added to the scene!)\n * @param {number} [scale] - The scale of the displacement\n */\n constructor(sprite: ISpriteMaskTarget, scale: number)\n {\n const maskMatrix = new Matrix();\n\n sprite.renderable = false;\n\n super(vertex, fragment, {\n mapSampler: sprite._texture,\n filterMatrix: maskMatrix,\n scale: { x: 1, y: 1 },\n rotation: new Float32Array([1, 0, 0, 1]),\n });\n\n this.maskSprite = sprite;\n this.maskMatrix = maskMatrix;\n\n if (scale === null || scale === undefined)\n {\n scale = 20;\n }\n\n /**\n * scaleX, scaleY for displacements\n * @member {PIXI.Point}\n */\n this.scale = new Point(scale, scale);\n }\n\n /**\n * Applies the filter.\n *\n * @param {PIXI.systems.FilterSystem} filterManager - The manager.\n * @param {PIXI.RenderTexture} input - The input target.\n * @param {PIXI.RenderTexture} output - The output target.\n * @param {PIXI.CLEAR_MODES} clearMode - clearMode.\n */\n public apply(\n filterManager: systems.FilterSystem, input: RenderTexture, output: RenderTexture, clearMode: CLEAR_MODES\n ): void\n {\n // fill maskMatrix with _normalized sprite texture coords_\n this.uniforms.filterMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, this.maskSprite);\n this.uniforms.scale.x = this.scale.x;\n this.uniforms.scale.y = this.scale.y;\n\n // Extract rotation from world transform\n const wt = this.maskSprite.worldTransform;\n const lenX = Math.sqrt((wt.a * wt.a) + (wt.b * wt.b));\n const lenY = Math.sqrt((wt.c * wt.c) + (wt.d * wt.d));\n\n if (lenX !== 0 && lenY !== 0)\n {\n this.uniforms.rotation[0] = wt.a / lenX;\n this.uniforms.rotation[1] = wt.b / lenX;\n this.uniforms.rotation[2] = wt.c / lenY;\n this.uniforms.rotation[3] = wt.d / lenY;\n }\n\n // draw the filter...\n filterManager.applyFilter(this, input, output, clearMode);\n }\n\n /**\n * The texture used for the displacement map. Must be power of 2 sized texture.\n *\n * @member {PIXI.Texture}\n */\n get map(): Texture\n {\n return this.uniforms.mapSampler;\n }\n\n set map(value: Texture)\n {\n this.uniforms.mapSampler = value;\n }\n}\n","import { Filter } from '@pixi/core';\nimport vertex from './fxaa.vert';\nimport fragment from './fxaa.frag';\n\n/**\n * Basic FXAA (Fast Approximate Anti-Aliasing) implementation based on the code on geeks3d.com\n * with the modification that the texture2DLod stuff was removed since it is unsupported by WebGL.\n *\n * @see https://github.com/mitsuhiko/webgl-meincraft\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n *\n */\nexport class FXAAFilter extends Filter\n{\n constructor()\n {\n // TODO - needs work\n super(vertex, fragment);\n }\n}\n","import { Filter, defaultFilterVertex } from '@pixi/core';\nimport fragment from './noise.frag';\n\n/**\n * @author Vico @vicocotea\n * original filter: https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/noise.js\n */\n\n/**\n * A Noise effect filter.\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n */\nexport class NoiseFilter extends Filter\n{\n /**\n * @param {number} [noise=0.5] - The noise intensity, should be a normalized value in the range [0, 1].\n * @param {number} [seed] - A random seed for the noise generation. Default is `Math.random()`.\n */\n constructor(noise = 0.5, seed = Math.random())\n {\n super(defaultFilterVertex, fragment, {\n uNoise: 0,\n uSeed: 0,\n });\n\n this.noise = noise;\n this.seed = seed;\n }\n\n /**\n * The amount of noise to apply, this value should be in the range (0, 1].\n *\n * @member {number}\n * @default 0.5\n */\n get noise(): number\n {\n return this.uniforms.uNoise;\n }\n\n set noise(value: number)\n {\n this.uniforms.uNoise = value;\n }\n\n /**\n * A seed value to apply to the random noise generation. `Math.random()` is a good value to use.\n *\n * @member {number}\n */\n get seed(): number\n {\n return this.uniforms.uSeed;\n }\n\n set seed(value: number)\n {\n this.uniforms.uSeed = value;\n }\n}\n","import { MeshGeometry } from '@pixi/mesh';\n\nexport class PlaneGeometry extends MeshGeometry\n{\n public segWidth: number;\n public segHeight: number;\n public width: number;\n public height: number;\n\n constructor(width = 100, height = 100, segWidth = 10, segHeight = 10)\n {\n super();\n\n this.segWidth = segWidth;\n this.segHeight = segHeight;\n\n this.width = width;\n this.height = height;\n\n this.build();\n }\n\n /**\n * Refreshes plane coordinates\n * @private\n */\n build(): void\n {\n const total = this.segWidth * this.segHeight;\n const verts = [];\n const uvs = [];\n const indices = [];\n\n const segmentsX = this.segWidth - 1;\n const segmentsY = this.segHeight - 1;\n\n const sizeX = (this.width) / segmentsX;\n const sizeY = (this.height) / segmentsY;\n\n for (let i = 0; i < total; i++)\n {\n const x = (i % this.segWidth);\n const y = ((i / this.segWidth) | 0);\n\n verts.push(x * sizeX, y * sizeY);\n uvs.push(x / segmentsX, y / segmentsY);\n }\n\n const totalSub = segmentsX * segmentsY;\n\n for (let i = 0; i < totalSub; i++)\n {\n const xpos = i % segmentsX;\n const ypos = (i / segmentsX) | 0;\n\n const value = (ypos * this.segWidth) + xpos;\n const value2 = (ypos * this.segWidth) + xpos + 1;\n const value3 = ((ypos + 1) * this.segWidth) + xpos;\n const value4 = ((ypos + 1) * this.segWidth) + xpos + 1;\n\n indices.push(value, value2, value3,\n value2, value4, value3);\n }\n\n this.buffers[0].data = new Float32Array(verts);\n this.buffers[1].data = new Float32Array(uvs);\n this.indexBuffer.data = new Uint16Array(indices);\n\n // ensure that the changes are uploaded\n this.buffers[0].update();\n this.buffers[1].update();\n this.indexBuffer.update();\n }\n}\n","import { MeshGeometry } from '@pixi/mesh';\nimport type { IPoint } from '@pixi/math';\n\n/**\n * RopeGeometry allows you to draw a geometry across several points and then manipulate these points.\n *\n * ```js\n * for (let i = 0; i < 20; i++) {\n * points.push(new PIXI.Point(i * 50, 0));\n * };\n * const rope = new PIXI.RopeGeometry(100, points);\n * ```\n *\n * @class\n * @extends PIXI.MeshGeometry\n * @memberof PIXI\n *\n */\nexport class RopeGeometry extends MeshGeometry\n{\n public points: IPoint[];\n public readonly textureScale: number;\n _width: number;\n\n /**\n * @param {number} [width=200] - The width (i.e., thickness) of the rope.\n * @param {PIXI.Point[]} [points] - An array of {@link PIXI.Point} objects to construct this rope.\n * @param {number} [textureScale=0] - By default the rope texture will be stretched to match\n * rope length. If textureScale is positive this value will be treated as a scaling\n * factor and the texture will preserve its aspect ratio instead. To create a tiling rope\n * set baseTexture.wrapMode to {@link PIXI.WRAP_MODES.REPEAT} and use a power of two texture,\n * then set textureScale=1 to keep the original texture pixel size.\n * In order to reduce alpha channel artifacts provide a larger texture and downsample -\n * i.e. set textureScale=0.5 to scale it down twice.\n */\n constructor(width = 200, points: IPoint[], textureScale = 0)\n {\n super(new Float32Array(points.length * 4),\n new Float32Array(points.length * 4),\n new Uint16Array((points.length - 1) * 6));\n\n /**\n * An array of points that determine the rope\n * @member {PIXI.Point[]}\n */\n this.points = points;\n\n /**\n * The width (i.e., thickness) of the rope.\n * @member {number}\n * @readOnly\n */\n this._width = width;\n\n /**\n * Rope texture scale, if zero then the rope texture is stretched.\n * @member {number}\n * @readOnly\n */\n this.textureScale = textureScale;\n\n this.build();\n }\n\n /**\n * The width (i.e., thickness) of the rope.\n * @member {number}\n * @readOnly\n */\n get width(): number\n {\n return this._width;\n }\n\n /**\n * Refreshes Rope indices and uvs\n * @private\n */\n private build(): void\n {\n const points = this.points;\n\n if (!points) return;\n\n const vertexBuffer = this.getBuffer('aVertexPosition');\n const uvBuffer = this.getBuffer('aTextureCoord');\n const indexBuffer = this.getIndex();\n\n // if too little points, or texture hasn't got UVs set yet just move on.\n if (points.length < 1)\n {\n return;\n }\n\n // if the number of points has changed we will need to recreate the arraybuffers\n if (vertexBuffer.data.length / 4 !== points.length)\n {\n vertexBuffer.data = new Float32Array(points.length * 4);\n uvBuffer.data = new Float32Array(points.length * 4);\n indexBuffer.data = new Uint16Array((points.length - 1) * 6);\n }\n\n const uvs = uvBuffer.data;\n const indices = indexBuffer.data;\n\n uvs[0] = 0;\n uvs[1] = 0;\n uvs[2] = 0;\n uvs[3] = 1;\n\n let amount = 0;\n let prev = points[0];\n const textureWidth = this._width * this.textureScale;\n const total = points.length; // - 1;\n\n for (let i = 0; i < total; i++)\n {\n // time to do some smart drawing!\n const index = i * 4;\n\n if (this.textureScale > 0)\n {\n // calculate pixel distance from previous point\n const dx = prev.x - points[i].x;\n const dy = prev.y - points[i].y;\n const distance = Math.sqrt((dx * dx) + (dy * dy));\n\n prev = points[i];\n amount += distance / textureWidth;\n }\n else\n {\n // stretch texture\n amount = i / (total - 1);\n }\n\n uvs[index] = amount;\n uvs[index + 1] = 0;\n\n uvs[index + 2] = amount;\n uvs[index + 3] = 1;\n }\n\n let indexCount = 0;\n\n for (let i = 0; i < total - 1; i++)\n {\n const index = i * 2;\n\n indices[indexCount++] = index;\n indices[indexCount++] = index + 1;\n indices[indexCount++] = index + 2;\n\n indices[indexCount++] = index + 2;\n indices[indexCount++] = index + 1;\n indices[indexCount++] = index + 3;\n }\n\n // ensure that the changes are uploaded\n uvBuffer.update();\n indexBuffer.update();\n\n this.updateVertices();\n }\n\n /**\n * refreshes vertices of Rope mesh\n */\n public updateVertices(): void\n {\n const points = this.points;\n\n if (points.length < 1)\n {\n return;\n }\n\n let lastPoint = points[0];\n let nextPoint;\n let perpX = 0;\n let perpY = 0;\n\n const vertices = this.buffers[0].data;\n const total = points.length;\n\n for (let i = 0; i < total; i++)\n {\n const point = points[i];\n const index = i * 4;\n\n if (i < points.length - 1)\n {\n nextPoint = points[i + 1];\n }\n else\n {\n nextPoint = point;\n }\n\n perpY = -(nextPoint.x - lastPoint.x);\n perpX = nextPoint.y - lastPoint.y;\n\n let ratio = (1 - (i / (total - 1))) * 10;\n\n if (ratio > 1)\n {\n ratio = 1;\n }\n\n const perpLength = Math.sqrt((perpX * perpX) + (perpY * perpY));\n const num = this.textureScale > 0 ? this.textureScale * this._width / 2 : this._width / 2;\n\n perpX /= perpLength;\n perpY /= perpLength;\n\n perpX *= num;\n perpY *= num;\n\n vertices[index] = point.x + perpX;\n vertices[index + 1] = point.y + perpY;\n vertices[index + 2] = point.x - perpX;\n vertices[index + 3] = point.y - perpY;\n\n lastPoint = point;\n }\n\n this.buffers[0].update();\n }\n\n public update(): void\n {\n if (this.textureScale > 0)\n {\n this.build(); // we need to update UVs\n }\n else\n {\n this.updateVertices();\n }\n }\n}\n","import { Mesh, MeshMaterial } from '@pixi/mesh';\nimport { WRAP_MODES } from '@pixi/constants';\nimport { RopeGeometry } from './geometry/RopeGeometry';\n\nimport type { Texture, Renderer } from '@pixi/core';\nimport type { IPoint } from '@pixi/math';\n\n/**\n * The rope allows you to draw a texture across several points and then manipulate these points\n *\n *```js\n * for (let i = 0; i < 20; i++) {\n * points.push(new PIXI.Point(i * 50, 0));\n * };\n * let rope = new PIXI.SimpleRope(PIXI.Texture.from(\"snake.png\"), points);\n * ```\n *\n * @class\n * @extends PIXI.Mesh\n * @memberof PIXI\n *\n */\nexport class SimpleRope extends Mesh\n{\n public autoUpdate: boolean;\n\n /**\n * @param {PIXI.Texture} texture - The texture to use on the rope.\n * @param {PIXI.Point[]} points - An array of {@link PIXI.Point} objects to construct this rope.\n * @param {number} [textureScale=0] - Optional. Positive values scale rope texture\n * keeping its aspect ratio. You can reduce alpha channel artifacts by providing a larger texture\n * and downsampling here. If set to zero, texture will be streched instead.\n */\n constructor(texture: Texture, points: IPoint[], textureScale = 0)\n {\n const ropeGeometry = new RopeGeometry(texture.height, points, textureScale);\n const meshMaterial = new MeshMaterial(texture);\n\n if (textureScale > 0)\n {\n // attempt to set UV wrapping, will fail on non-power of two textures\n texture.baseTexture.wrapMode = WRAP_MODES.REPEAT;\n }\n super(ropeGeometry, meshMaterial);\n\n /**\n * re-calculate vertices by rope points each frame\n *\n * @member {boolean}\n */\n this.autoUpdate = true;\n }\n\n _render(renderer: Renderer): void\n {\n const geometry: RopeGeometry = this.geometry as any;\n\n if (this.autoUpdate || geometry._width !== this.shader.texture.height)\n {\n geometry._width = this.shader.texture.height;\n geometry.update();\n }\n\n super._render(renderer);\n }\n}\n","import { Texture } from '@pixi/core';\nimport { Mesh, MeshMaterial } from '@pixi/mesh';\nimport { PlaneGeometry } from './geometry/PlaneGeometry';\n\nimport type{ Renderer } from '@pixi/core';\n\n/**\n * The SimplePlane allows you to draw a texture across several points and then manipulate these points\n *\n *```js\n * for (let i = 0; i < 20; i++) {\n * points.push(new PIXI.Point(i * 50, 0));\n * };\n * let SimplePlane = new PIXI.SimplePlane(PIXI.Texture.from(\"snake.png\"), points);\n * ```\n *\n * @class\n * @extends PIXI.Mesh\n * @memberof PIXI\n *\n */\nexport class SimplePlane extends Mesh\n{\n protected _textureID: number;\n\n /**\n * @param {PIXI.Texture} texture - The texture to use on the SimplePlane.\n * @param {number} verticesX - The number of vertices in the x-axis\n * @param {number} verticesY - The number of vertices in the y-axis\n */\n constructor(texture: Texture, verticesX: number, verticesY: number)\n {\n const planeGeometry = new PlaneGeometry(texture.width, texture.height, verticesX, verticesY);\n const meshMaterial = new MeshMaterial(Texture.WHITE);\n\n super(planeGeometry, meshMaterial);\n\n // lets call the setter to ensure all necessary updates are performed\n this.texture = texture;\n }\n\n /**\n * Method used for overrides, to do something in case texture frame was changed.\n * Meshes based on plane can override it and change more details based on texture.\n */\n public textureUpdated(): void\n {\n this._textureID = this.shader.texture._updateID;\n\n const geometry: PlaneGeometry = this.geometry as any;\n\n geometry.width = this.shader.texture.width;\n geometry.height = this.shader.texture.height;\n\n geometry.build();\n }\n\n set texture(value: Texture)\n {\n // Track texture same way sprite does.\n // For generated meshes like NineSlicePlane it can change the geometry.\n // Unfortunately, this method might not work if you directly change texture in material.\n\n if (this.shader.texture === value)\n {\n return;\n }\n\n this.shader.texture = value;\n this._textureID = -1;\n\n if (value.baseTexture.valid)\n {\n this.textureUpdated();\n }\n else\n {\n value.once('update', this.textureUpdated, this);\n }\n }\n\n get texture(): Texture\n {\n return this.shader.texture;\n }\n\n _render(renderer: Renderer): void\n {\n if (this._textureID !== this.shader.texture._updateID)\n {\n this.textureUpdated();\n }\n\n super._render(renderer);\n }\n}\n","import { Mesh, MeshGeometry, MeshMaterial } from '@pixi/mesh';\nimport { Texture } from '@pixi/core';\n\nimport type { ITypedArray, IArrayBuffer, Renderer } from '@pixi/core';\nimport type { DRAW_MODES } from '@pixi/constants';\n\n/**\n * The Simple Mesh class mimics Mesh in PixiJS v4, providing easy-to-use constructor arguments.\n * For more robust customization, use {@link PIXI.Mesh}.\n *\n * @class\n * @extends PIXI.Mesh\n * @memberof PIXI\n */\nexport class SimpleMesh extends Mesh\n{\n public autoUpdate: boolean;\n\n /**\n * @param {PIXI.Texture} [texture=Texture.EMPTY] - The texture to use\n * @param {Float32Array} [vertices] - if you want to specify the vertices\n * @param {Float32Array} [uvs] - if you want to specify the uvs\n * @param {Uint16Array} [indices] - if you want to specify the indices\n * @param {number} [drawMode] - the drawMode, can be any of the Mesh.DRAW_MODES consts\n */\n constructor(\n texture = Texture.EMPTY,\n vertices?: IArrayBuffer,\n uvs?: IArrayBuffer,\n indices?: IArrayBuffer,\n drawMode?: DRAW_MODES\n )\n {\n const geometry = new MeshGeometry(vertices, uvs, indices);\n\n geometry.getBuffer('aVertexPosition').static = false;\n\n const meshMaterial = new MeshMaterial(texture);\n\n super(geometry, meshMaterial, null, drawMode);\n\n /**\n * upload vertices buffer each frame\n * @member {boolean}\n */\n this.autoUpdate = true;\n }\n\n /**\n * Collection of vertices data.\n * @member {Float32Array}\n */\n get vertices(): ITypedArray\n {\n return this.geometry.getBuffer('aVertexPosition').data;\n }\n set vertices(value: ITypedArray)\n {\n this.geometry.getBuffer('aVertexPosition').data = value;\n }\n\n _render(renderer: Renderer): void\n {\n if (this.autoUpdate)\n {\n this.geometry.getBuffer('aVertexPosition').update();\n }\n\n super._render(renderer);\n }\n}\n","import { Texture } from '@pixi/core';\nimport { SimplePlane } from './SimplePlane';\n\nimport type { ITypedArray } from '@pixi/core';\n\nconst DEFAULT_BORDER_SIZE = 10;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface NineSlicePlane extends GlobalMixins.NineSlicePlane {}\n\n/**\n * The NineSlicePlane allows you to stretch a texture using 9-slice scaling. The corners will remain unscaled (useful\n * for buttons with rounded corners for example) and the other areas will be scaled horizontally and or vertically\n *\n *```js\n * let Plane9 = new PIXI.NineSlicePlane(PIXI.Texture.from('BoxWithRoundedCorners.png'), 15, 15, 15, 15);\n * ```\n *

\n *      A                          B\n *    +---+----------------------+---+\n *  C | 1 |          2           | 3 |\n *    +---+----------------------+---+\n *    |   |                      |   |\n *    | 4 |          5           | 6 |\n *    |   |                      |   |\n *    +---+----------------------+---+\n *  D | 7 |          8           | 9 |\n *    +---+----------------------+---+\n\n *  When changing this objects width and/or height:\n *     areas 1 3 7 and 9 will remain unscaled.\n *     areas 2 and 8 will be stretched horizontally\n *     areas 4 and 6 will be stretched vertically\n *     area 5 will be stretched both horizontally and vertically\n * 
\n *\n * @class\n * @extends PIXI.SimplePlane\n * @memberof PIXI\n *\n */\nexport class NineSlicePlane extends SimplePlane\n{\n private _origWidth: number;\n private _origHeight: number;\n _leftWidth: number;\n _rightWidth: number;\n _topHeight: number;\n _bottomHeight: number;\n\n /**\n * @param {PIXI.Texture} texture - The texture to use on the NineSlicePlane.\n * @param {number} [leftWidth=10] - size of the left vertical bar (A)\n * @param {number} [topHeight=10] - size of the top horizontal bar (C)\n * @param {number} [rightWidth=10] - size of the right vertical bar (B)\n * @param {number} [bottomHeight=10] - size of the bottom horizontal bar (D)\n */\n constructor(\n texture: Texture,\n leftWidth = DEFAULT_BORDER_SIZE,\n topHeight = DEFAULT_BORDER_SIZE,\n rightWidth = DEFAULT_BORDER_SIZE,\n bottomHeight = DEFAULT_BORDER_SIZE\n )\n {\n super(Texture.WHITE, 4, 4);\n\n this._origWidth = texture.orig.width;\n this._origHeight = texture.orig.height;\n\n /**\n * The width of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane\n *\n * @member {number}\n * @override\n */\n this._width = this._origWidth;\n\n /**\n * The height of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane\n *\n * @member {number}\n * @override\n */\n this._height = this._origHeight;\n\n /**\n * The width of the left column (a)\n *\n * @member {number}\n * @private\n */\n this._leftWidth = leftWidth;\n\n /**\n * The width of the right column (b)\n *\n * @member {number}\n * @private\n */\n this._rightWidth = rightWidth;\n\n /**\n * The height of the top row (c)\n *\n * @member {number}\n * @private\n */\n this._topHeight = topHeight;\n\n /**\n * The height of the bottom row (d)\n *\n * @member {number}\n * @private\n */\n this._bottomHeight = bottomHeight;\n\n // lets call the setter to ensure all necessary updates are performed\n this.texture = texture;\n }\n\n public textureUpdated(): void\n {\n this._textureID = this.shader.texture._updateID;\n this._refresh();\n }\n\n get vertices(): ITypedArray\n {\n return this.geometry.getBuffer('aVertexPosition').data;\n }\n\n set vertices(value: ITypedArray)\n {\n this.geometry.getBuffer('aVertexPosition').data = value;\n }\n\n /**\n * Updates the horizontal vertices.\n *\n */\n public updateHorizontalVertices(): void\n {\n const vertices = this.vertices;\n\n const scale = this._getMinScale();\n\n vertices[9] = vertices[11] = vertices[13] = vertices[15] = this._topHeight * scale;\n vertices[17] = vertices[19] = vertices[21] = vertices[23] = this._height - (this._bottomHeight * scale);\n vertices[25] = vertices[27] = vertices[29] = vertices[31] = this._height;\n }\n\n /**\n * Updates the vertical vertices.\n *\n */\n public updateVerticalVertices(): void\n {\n const vertices = this.vertices;\n\n const scale = this._getMinScale();\n\n vertices[2] = vertices[10] = vertices[18] = vertices[26] = this._leftWidth * scale;\n vertices[4] = vertices[12] = vertices[20] = vertices[28] = this._width - (this._rightWidth * scale);\n vertices[6] = vertices[14] = vertices[22] = vertices[30] = this._width;\n }\n\n /**\n * Returns the smaller of a set of vertical and horizontal scale of nine slice corners.\n *\n * @return {number} Smaller number of vertical and horizontal scale.\n * @private\n */\n private _getMinScale(): number\n {\n const w = this._leftWidth + this._rightWidth;\n const scaleW = this._width > w ? 1.0 : this._width / w;\n\n const h = this._topHeight + this._bottomHeight;\n const scaleH = this._height > h ? 1.0 : this._height / h;\n\n const scale = Math.min(scaleW, scaleH);\n\n return scale;\n }\n\n /**\n * The width of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane\n *\n * @member {number}\n */\n get width(): number\n {\n return this._width;\n }\n\n set width(value: number)\n {\n this._width = value;\n this._refresh();\n }\n\n /**\n * The height of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane\n *\n * @member {number}\n */\n get height(): number\n {\n return this._height;\n }\n\n set height(value: number)\n {\n this._height = value;\n this._refresh();\n }\n\n /**\n * The width of the left column\n *\n * @member {number}\n */\n get leftWidth(): number\n {\n return this._leftWidth;\n }\n\n set leftWidth(value: number)\n {\n this._leftWidth = value;\n this._refresh();\n }\n\n /**\n * The width of the right column\n *\n * @member {number}\n */\n get rightWidth(): number\n {\n return this._rightWidth;\n }\n\n set rightWidth(value: number)\n {\n this._rightWidth = value;\n this._refresh();\n }\n\n /**\n * The height of the top row\n *\n * @member {number}\n */\n get topHeight(): number\n {\n return this._topHeight;\n }\n\n set topHeight(value: number)\n {\n this._topHeight = value;\n this._refresh();\n }\n\n /**\n * The height of the bottom row\n *\n * @member {number}\n */\n get bottomHeight(): number\n {\n return this._bottomHeight;\n }\n\n set bottomHeight(value: number)\n {\n this._bottomHeight = value;\n this._refresh();\n }\n\n /**\n * Refreshes NineSlicePlane coords. All of them.\n */\n private _refresh(): void\n {\n const texture = this.texture;\n\n const uvs = this.geometry.buffers[1].data;\n\n this._origWidth = texture.orig.width;\n this._origHeight = texture.orig.height;\n\n const _uvw = 1.0 / this._origWidth;\n const _uvh = 1.0 / this._origHeight;\n\n uvs[0] = uvs[8] = uvs[16] = uvs[24] = 0;\n uvs[1] = uvs[3] = uvs[5] = uvs[7] = 0;\n uvs[6] = uvs[14] = uvs[22] = uvs[30] = 1;\n uvs[25] = uvs[27] = uvs[29] = uvs[31] = 1;\n\n uvs[2] = uvs[10] = uvs[18] = uvs[26] = _uvw * this._leftWidth;\n uvs[4] = uvs[12] = uvs[20] = uvs[28] = 1 - (_uvw * this._rightWidth);\n uvs[9] = uvs[11] = uvs[13] = uvs[15] = _uvh * this._topHeight;\n uvs[17] = uvs[19] = uvs[21] = uvs[23] = 1 - (_uvh * this._bottomHeight);\n\n this.updateHorizontalVertices();\n this.updateVerticalVertices();\n\n this.geometry.buffers[0].update();\n this.geometry.buffers[1].update();\n }\n}\n","import { Texture } from '@pixi/core';\nimport { Sprite } from '@pixi/sprite';\nimport { Ticker, UPDATE_PRIORITY } from '@pixi/ticker';\nimport type { IDestroyOptions } from '@pixi/display';\n\n/**\n * An AnimatedSprite is a simple way to display an animation depicted by a list of textures.\n *\n * ```js\n * let alienImages = [\"image_sequence_01.png\",\"image_sequence_02.png\",\"image_sequence_03.png\",\"image_sequence_04.png\"];\n * let textureArray = [];\n *\n * for (let i=0; i < 4; i++)\n * {\n * let texture = PIXI.Texture.from(alienImages[i]);\n * textureArray.push(texture);\n * };\n *\n * let animatedSprite = new PIXI.AnimatedSprite(textureArray);\n * ```\n *\n * The more efficient and simpler way to create an animated sprite is using a {@link PIXI.Spritesheet}\n * containing the animation definitions:\n *\n * ```js\n * PIXI.Loader.shared.add(\"assets/spritesheet.json\").load(setup);\n *\n * function setup() {\n * let sheet = PIXI.Loader.shared.resources[\"assets/spritesheet.json\"].spritesheet;\n * animatedSprite = new PIXI.AnimatedSprite(sheet.animations[\"image_sequence\"]);\n * ...\n * }\n * ```\n *\n * @class\n * @extends PIXI.Sprite\n * @memberof PIXI\n */\nexport class AnimatedSprite extends Sprite\n{\n public animationSpeed: number;\n public loop: boolean;\n public updateAnchor: boolean;\n public onComplete: () => void;\n public onFrameChange: (currentFrame: number) => void;\n public onLoop: () => void;\n\n private _playing: boolean;\n private _textures: Texture[];\n private _durations: number[];\n private _autoUpdate: boolean;\n private _isConnectedToTicker: boolean;\n private _currentTime: number;\n private _previousFrame: number;\n\n /**\n * @param {PIXI.Texture[]|PIXI.AnimatedSprite.FrameObject[]} textures - An array of {@link PIXI.Texture} or frame\n * objects that make up the animation.\n * @param {boolean} [autoUpdate=true] - Whether to use PIXI.Ticker.shared to auto update animation time.\n */\n constructor(textures: Texture[]|FrameObject[], autoUpdate = true)\n {\n super(textures[0] instanceof Texture ? textures[0] : textures[0].texture);\n\n /**\n * @type {PIXI.Texture[]}\n * @private\n */\n this._textures = null;\n\n /**\n * @type {number[]}\n * @private\n */\n this._durations = null;\n\n /**\n * `true` uses PIXI.Ticker.shared to auto update animation time.\n *\n * @type {boolean}\n * @default true\n * @private\n */\n this._autoUpdate = autoUpdate;\n\n /**\n * `true` if the instance is currently connected to PIXI.Ticker.shared to auto update animation time.\n *\n * @type {boolean}\n * @default false\n * @private\n */\n this._isConnectedToTicker = false;\n\n /**\n * The speed that the AnimatedSprite will play at. Higher is faster, lower is slower.\n *\n * @member {number}\n * @default 1\n */\n this.animationSpeed = 1;\n\n /**\n * Whether or not the animate sprite repeats after playing.\n *\n * @member {boolean}\n * @default true\n */\n this.loop = true;\n\n /**\n * Update anchor to [Texture's defaultAnchor]{@link PIXI.Texture#defaultAnchor} when frame changes.\n *\n * Useful with [sprite sheet animations]{@link PIXI.Spritesheet#animations} created with tools.\n * Changing anchor for each frame allows to pin sprite origin to certain moving feature\n * of the frame (e.g. left foot).\n *\n * Note: Enabling this will override any previously set `anchor` on each frame change.\n *\n * @member {boolean}\n * @default false\n */\n this.updateAnchor = false;\n\n /**\n * User-assigned function to call when an AnimatedSprite finishes playing.\n *\n * @example\n * animation.onComplete = function () {\n * // finished!\n * };\n * @member {Function}\n */\n this.onComplete = null;\n\n /**\n * User-assigned function to call when an AnimatedSprite changes which texture is being rendered.\n *\n * @example\n * animation.onFrameChange = function () {\n * // updated!\n * };\n * @member {Function}\n */\n this.onFrameChange = null;\n\n /**\n * User-assigned function to call when `loop` is true, and an AnimatedSprite is played and\n * loops around to start again.\n *\n * @example\n * animation.onLoop = function () {\n * // looped!\n * };\n * @member {Function}\n */\n this.onLoop = null;\n\n /**\n * Elapsed time since animation has been started, used internally to display current texture.\n *\n * @member {number}\n * @private\n */\n this._currentTime = 0;\n\n this._playing = false;\n\n /**\n * The texture index that was displayed last time\n *\n * @member {number}\n * @private\n */\n this._previousFrame = null;\n\n this.textures = textures;\n }\n\n /**\n * Stops the AnimatedSprite.\n *\n */\n public stop(): void\n {\n if (!this._playing)\n {\n return;\n }\n\n this._playing = false;\n if (this._autoUpdate && this._isConnectedToTicker)\n {\n Ticker.shared.remove(this.update, this);\n this._isConnectedToTicker = false;\n }\n }\n\n /**\n * Plays the AnimatedSprite.\n *\n */\n public play(): void\n {\n if (this._playing)\n {\n return;\n }\n\n this._playing = true;\n if (this._autoUpdate && !this._isConnectedToTicker)\n {\n Ticker.shared.add(this.update, this, UPDATE_PRIORITY.HIGH);\n this._isConnectedToTicker = true;\n }\n }\n\n /**\n * Stops the AnimatedSprite and goes to a specific frame.\n *\n * @param {number} frameNumber - Frame index to stop at.\n */\n public gotoAndStop(frameNumber: number): void\n {\n this.stop();\n\n const previousFrame = this.currentFrame;\n\n this._currentTime = frameNumber;\n\n if (previousFrame !== this.currentFrame)\n {\n this.updateTexture();\n }\n }\n\n /**\n * Goes to a specific frame and begins playing the AnimatedSprite.\n *\n * @param {number} frameNumber - Frame index to start at.\n */\n public gotoAndPlay(frameNumber: number): void\n {\n const previousFrame = this.currentFrame;\n\n this._currentTime = frameNumber;\n\n if (previousFrame !== this.currentFrame)\n {\n this.updateTexture();\n }\n\n this.play();\n }\n\n /**\n * Updates the object transform for rendering.\n *\n * @param {number} deltaTime - Time since last tick.\n */\n update(deltaTime: number): void\n {\n const elapsed = this.animationSpeed * deltaTime;\n const previousFrame = this.currentFrame;\n\n if (this._durations !== null)\n {\n let lag = this._currentTime % 1 * this._durations[this.currentFrame];\n\n lag += elapsed / 60 * 1000;\n\n while (lag < 0)\n {\n this._currentTime--;\n lag += this._durations[this.currentFrame];\n }\n\n const sign = Math.sign(this.animationSpeed * deltaTime);\n\n this._currentTime = Math.floor(this._currentTime);\n\n while (lag >= this._durations[this.currentFrame])\n {\n lag -= this._durations[this.currentFrame] * sign;\n this._currentTime += sign;\n }\n\n this._currentTime += lag / this._durations[this.currentFrame];\n }\n else\n {\n this._currentTime += elapsed;\n }\n\n if (this._currentTime < 0 && !this.loop)\n {\n this.gotoAndStop(0);\n\n if (this.onComplete)\n {\n this.onComplete();\n }\n }\n else if (this._currentTime >= this._textures.length && !this.loop)\n {\n this.gotoAndStop(this._textures.length - 1);\n\n if (this.onComplete)\n {\n this.onComplete();\n }\n }\n else if (previousFrame !== this.currentFrame)\n {\n if (this.loop && this.onLoop)\n {\n if (this.animationSpeed > 0 && this.currentFrame < previousFrame)\n {\n this.onLoop();\n }\n else if (this.animationSpeed < 0 && this.currentFrame > previousFrame)\n {\n this.onLoop();\n }\n }\n\n this.updateTexture();\n }\n }\n\n /**\n * Updates the displayed texture to match the current frame index.\n *\n * @private\n */\n private updateTexture(): void\n {\n const currentFrame = this.currentFrame;\n\n if (this._previousFrame === currentFrame)\n {\n return;\n }\n\n this._previousFrame = currentFrame;\n\n this._texture = this._textures[currentFrame];\n this._textureID = -1;\n this._textureTrimmedID = -1;\n this._cachedTint = 0xFFFFFF;\n this.uvs = this._texture._uvs.uvsFloat32;\n\n if (this.updateAnchor)\n {\n this._anchor.copyFrom(this._texture.defaultAnchor);\n }\n\n if (this.onFrameChange)\n {\n this.onFrameChange(this.currentFrame);\n }\n }\n\n /**\n * Stops the AnimatedSprite and destroys it.\n *\n * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options\n * have been set to that value.\n * @param {boolean} [options.children=false] - If set to true, all the children will have their destroy\n * method called as well. 'options' will be passed on to those calls.\n * @param {boolean} [options.texture=false] - Should it destroy the current texture of the sprite as well.\n * @param {boolean} [options.baseTexture=false] - Should it destroy the base texture of the sprite as well.\n */\n public destroy(options: IDestroyOptions|boolean): void\n {\n this.stop();\n super.destroy(options);\n\n this.onComplete = null;\n this.onFrameChange = null;\n this.onLoop = null;\n }\n\n /**\n * A short hand way of creating an AnimatedSprite from an array of frame ids.\n *\n * @static\n * @param {string[]} frames - The array of frames ids the AnimatedSprite will use as its texture frames.\n * @return {PIXI.AnimatedSprite} The new animated sprite with the specified frames.\n */\n public static fromFrames(frames: string[]): AnimatedSprite\n {\n const textures = [];\n\n for (let i = 0; i < frames.length; ++i)\n {\n textures.push(Texture.from(frames[i]));\n }\n\n return new AnimatedSprite(textures);\n }\n\n /**\n * A short hand way of creating an AnimatedSprite from an array of image ids.\n *\n * @static\n * @param {string[]} images - The array of image urls the AnimatedSprite will use as its texture frames.\n * @return {PIXI.AnimatedSprite} The new animate sprite with the specified images as frames.\n */\n public static fromImages(images: string[]): AnimatedSprite\n {\n const textures = [];\n\n for (let i = 0; i < images.length; ++i)\n {\n textures.push(Texture.from(images[i]));\n }\n\n return new AnimatedSprite(textures);\n }\n\n /**\n * The total number of frames in the AnimatedSprite. This is the same as number of textures\n * assigned to the AnimatedSprite.\n *\n * @readonly\n * @member {number}\n * @default 0\n */\n get totalFrames(): number\n {\n return this._textures.length;\n }\n\n /**\n * The array of textures used for this AnimatedSprite.\n *\n * @member {PIXI.Texture[]}\n */\n get textures(): Texture[]|FrameObject[]\n {\n return this._textures;\n }\n\n set textures(value: Texture[]|FrameObject[])\n {\n if (value[0] instanceof Texture)\n {\n this._textures = value as Texture[];\n this._durations = null;\n }\n else\n {\n this._textures = [];\n this._durations = [];\n\n for (let i = 0; i < value.length; i++)\n {\n this._textures.push((value[i] as FrameObject).texture);\n this._durations.push((value[i] as FrameObject).time);\n }\n }\n this._previousFrame = null;\n this.gotoAndStop(0);\n this.updateTexture();\n }\n\n /**\n * The AnimatedSprites current frame index.\n *\n * @member {number}\n * @readonly\n */\n get currentFrame(): number\n {\n let currentFrame = Math.floor(this._currentTime) % this._textures.length;\n\n if (currentFrame < 0)\n {\n currentFrame += this._textures.length;\n }\n\n return currentFrame;\n }\n\n /**\n * Indicates if the AnimatedSprite is currently playing.\n *\n * @member {boolean}\n * @readonly\n */\n get playing(): boolean\n {\n return this._playing;\n }\n\n /**\n * Whether to use PIXI.Ticker.shared to auto update animation time\n *\n * @member {boolean}\n */\n get autoUpdate(): boolean\n {\n return this._autoUpdate;\n }\n\n set autoUpdate(value: boolean)\n {\n if (value !== this._autoUpdate)\n {\n this._autoUpdate = value;\n\n if (!this._autoUpdate && this._isConnectedToTicker)\n {\n Ticker.shared.remove(this.update, this);\n this._isConnectedToTicker = false;\n }\n else if (this._autoUpdate && !this._isConnectedToTicker && this._playing)\n {\n Ticker.shared.add(this.update, this);\n this._isConnectedToTicker = true;\n }\n }\n }\n}\n\nexport interface FrameObject {\n texture: Texture;\n time: number;\n}\n\n/**\n * @memberof PIXI.AnimatedSprite\n * @typedef {object} FrameObject\n * @type {object}\n * @property {PIXI.Texture} texture - The {@link PIXI.Texture} of the frame\n * @property {number} time - the duration of the frame in ms\n */\n","import { deprecation } from '@pixi/utils';\nimport type {\n systems,\n resources,\n Renderer,\n ImageSource,\n BaseTexture,\n RenderTexture,\n Texture,\n State,\n AbstractRenderer } from '@pixi/core';\nimport type { DisplayObject, Container } from '@pixi/display';\nimport type { TilingSprite } from '@pixi/sprite-tiling';\nimport type {\n Point,\n ObservablePoint,\n IPoint,\n Rectangle,\n Transform,\n groupD8,\n Matrix } from '@pixi/math';\nimport type { InteractionManager, InteractionData, InteractionEvent } from '@pixi/interaction';\nimport type { AccessibilityManager } from '@pixi/accessibility';\nimport type { Ticker } from '@pixi/ticker';\nimport type { Graphics, GraphicsData } from '@pixi/graphics';\nimport type { Sprite } from '@pixi/sprite';\nimport type { BitmapText, BitmapFontLoader } from '@pixi/text-bitmap';\nimport type { CanvasRenderTarget } from '@pixi/utils';\nimport type { Loader, LoaderResource } from '@pixi/loaders';\nimport type { BasePrepare, Prepare } from '@pixi/prepare';\nimport type { Extract } from '@pixi/extract';\nimport type { AnimatedSprite } from '@pixi/sprite-animated';\nimport type { Mesh } from '@pixi/mesh';\nimport type { ParticleContainer } from '@pixi/particles';\nimport type { SpritesheetLoader } from '@pixi/spritesheet';\nimport type {\n SimpleRope,\n NineSlicePlane,\n SimpleMesh,\n SimplePlane } from '@pixi/mesh-extras';\n\nconst v5 = '5.0.0';\n\n// Canvas deprecations needs to get moved\n// to the legacy package, but for now, we'll\n// ad this reminder\ntype $FixLegacy = any;\n\n/**\n * Deprecations (backward compatibilities) are automatically applied for browser bundles\n * in the UMD module format. If using Webpack or Rollup, you'll need to apply these\n * deprecations manually by doing something like this:\n * @example\n * import * as PIXI from 'pixi.js';\n * PIXI.useDeprecated(); // MUST be bound to namespace\n * @memberof PIXI\n * @function useDeprecated\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function useDeprecated(this: any): void\n{\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const PIXI = this;\n\n Object.defineProperties(PIXI, {\n /**\n * @constant {RegExp|string} SVG_SIZE\n * @memberof PIXI\n * @see PIXI.resources.SVGResource.SVG_SIZE\n * @deprecated since 5.0.0\n */\n SVG_SIZE: {\n get(): RegExp\n {\n deprecation(v5, 'PIXI.utils.SVG_SIZE property has moved to PIXI.resources.SVGResource.SVG_SIZE');\n\n return PIXI.SVGResource.SVG_SIZE;\n },\n },\n\n /**\n * @class PIXI.TransformStatic\n * @deprecated since 5.0.0\n * @see PIXI.Transform\n */\n TransformStatic: {\n get(): Transform\n {\n deprecation(v5, 'PIXI.TransformStatic class has been removed, use PIXI.Transform');\n\n return PIXI.Transform;\n },\n },\n\n /**\n * @class PIXI.TransformBase\n * @deprecated since 5.0.0\n * @see PIXI.Transform\n */\n TransformBase: {\n get(): Transform\n {\n deprecation(v5, 'PIXI.TransformBase class has been removed, use PIXI.Transform');\n\n return PIXI.Transform;\n },\n },\n\n /**\n * Constants that specify the transform type.\n *\n * @static\n * @constant\n * @name TRANSFORM_MODE\n * @memberof PIXI\n * @enum {number}\n * @deprecated since 5.0.0\n * @property {number} STATIC\n * @property {number} DYNAMIC\n */\n TRANSFORM_MODE: {\n get(): {[name: string]: number}\n {\n deprecation(v5, 'PIXI.TRANSFORM_MODE property has been removed');\n\n return { STATIC: 0, DYNAMIC: 1 };\n },\n },\n\n /**\n * @class PIXI.WebGLRenderer\n * @see PIXI.Renderer\n * @deprecated since 5.0.0\n */\n WebGLRenderer: {\n get(): typeof Renderer\n {\n deprecation(v5, 'PIXI.WebGLRenderer class has moved to PIXI.Renderer');\n\n return PIXI.Renderer;\n },\n },\n\n /**\n * @class PIXI.CanvasRenderTarget\n * @see PIXI.utils.CanvasRenderTarget\n * @deprecated since 5.0.0\n */\n CanvasRenderTarget: {\n get(): CanvasRenderTarget\n {\n deprecation(v5, 'PIXI.CanvasRenderTarget class has moved to PIXI.utils.CanvasRenderTarget');\n\n return PIXI.utils.CanvasRenderTarget;\n },\n },\n\n /**\n * @memberof PIXI\n * @name loader\n * @type {PIXI.Loader}\n * @see PIXI.Loader.shared\n * @deprecated since 5.0.0\n */\n loader: {\n get(): Loader\n {\n deprecation(v5, 'PIXI.loader instance has moved to PIXI.Loader.shared');\n\n return PIXI.Loader.shared;\n },\n },\n\n /**\n * @class PIXI.FilterManager\n * @see PIXI.systems.FilterSystem\n * @deprecated since 5.0.0\n */\n FilterManager: {\n get(): systems.FilterSystem\n {\n deprecation(v5, 'PIXI.FilterManager class has moved to PIXI.systems.FilterSystem');\n\n return PIXI.systems.FilterSystem;\n },\n },\n\n /**\n * @namespace PIXI.CanvasTinter\n * @see PIXI.canvasUtils\n * @deprecated since 5.2.0\n */\n CanvasTinter: {\n get(): $FixLegacy\n {\n deprecation('5.2.0', 'PIXI.CanvasTinter namespace has moved to PIXI.canvasUtils');\n\n return PIXI.canvasUtils;\n },\n },\n\n /**\n * @namespace PIXI.GroupD8\n * @see PIXI.groupD8\n * @deprecated since 5.2.0\n */\n GroupD8: {\n get(): typeof groupD8\n {\n deprecation('5.2.0', 'PIXI.GroupD8 namespace has moved to PIXI.groupD8');\n\n return PIXI.groupD8;\n },\n },\n });\n\n /**\n * @namespace PIXI.accessibility\n * @see PIXI\n * @deprecated since 5.3.0\n */\n PIXI.accessibility = {};\n\n Object.defineProperties(PIXI.accessibility, {\n /**\n * @class PIXI.accessibility.AccessibilityManager\n * @deprecated since 5.3.0\n * @see PIXI.AccessibilityManager\n */\n AccessibilityManager: {\n get(): typeof AccessibilityManager\n {\n deprecation('5.3.0', 'PIXI.accessibility.AccessibilityManager moved to PIXI.AccessibilityManager');\n\n return PIXI.AccessibilityManager;\n },\n },\n });\n\n /**\n * @namespace PIXI.interaction\n * @see PIXI\n * @deprecated since 5.3.0\n */\n PIXI.interaction = {};\n\n Object.defineProperties(PIXI.interaction, {\n /**\n * @class PIXI.interaction.InteractionManager\n * @deprecated since 5.3.0\n * @see PIXI.InteractionManager\n */\n InteractionManager: {\n get(): typeof InteractionManager\n {\n deprecation('5.3.0', 'PIXI.interaction.InteractionManager moved to PIXI.InteractionManager');\n\n return PIXI.InteractionManager;\n },\n },\n\n /**\n * @class PIXI.interaction.InteractionData\n * @deprecated since 5.3.0\n * @see PIXI.InteractionData\n */\n InteractionData: {\n get(): typeof InteractionData\n {\n deprecation('5.3.0', 'PIXI.interaction.InteractionData moved to PIXI.InteractionData');\n\n return PIXI.InteractionData;\n },\n },\n\n /**\n * @class PIXI.interaction.InteractionEvent\n * @deprecated since 5.3.0\n * @see PIXI.InteractionEvent\n */\n InteractionEvent: {\n get(): typeof InteractionEvent\n {\n deprecation('5.3.0', 'PIXI.interaction.InteractionEvent moved to PIXI.InteractionEvent');\n\n return PIXI.InteractionEvent;\n },\n },\n });\n\n /**\n * @namespace PIXI.prepare\n * @see PIXI\n * @deprecated since 5.2.1\n */\n PIXI.prepare = {};\n\n Object.defineProperties(PIXI.prepare, {\n /**\n * @class PIXI.prepare.BasePrepare\n * @deprecated since 5.2.1\n * @see PIXI.BasePrepare\n */\n BasePrepare: {\n get(): typeof BasePrepare\n {\n deprecation('5.2.1', 'PIXI.prepare.BasePrepare moved to PIXI.BasePrepare');\n\n return PIXI.BasePrepare;\n },\n },\n /**\n * @class PIXI.prepare.Prepare\n * @deprecated since 5.2.1\n * @see PIXI.Prepare\n */\n Prepare: {\n get(): typeof Prepare\n {\n deprecation('5.2.1', 'PIXI.prepare.Prepare moved to PIXI.Prepare');\n\n return PIXI.Prepare;\n },\n },\n /**\n * @class PIXI.prepare.CanvasPrepare\n * @deprecated since 5.2.1\n * @see PIXI.CanvasPrepare\n */\n CanvasPrepare: {\n get(): $FixLegacy\n {\n deprecation('5.2.1', 'PIXI.prepare.CanvasPrepare moved to PIXI.CanvasPrepare');\n\n return PIXI.CanvasPrepare;\n },\n },\n });\n\n /**\n * @namespace PIXI.extract\n * @see PIXI\n * @deprecated since 5.2.1\n */\n PIXI.extract = {};\n\n Object.defineProperties(PIXI.extract, {\n /**\n * @class PIXI.extract.Extract\n * @deprecated since 5.2.1\n * @see PIXI.Extract\n */\n Extract: {\n get(): typeof Extract\n {\n deprecation('5.2.1', 'PIXI.extract.Extract moved to PIXI.Extract');\n\n return PIXI.Extract;\n },\n },\n /**\n * @class PIXI.extract.CanvasExtract\n * @deprecated since 5.2.1\n * @see PIXI.CanvasExtract\n */\n CanvasExtract: {\n get(): $FixLegacy\n {\n deprecation('5.2.1', 'PIXI.extract.CanvasExtract moved to PIXI.CanvasExtract');\n\n return PIXI.CanvasExtract;\n },\n },\n });\n\n /**\n * This namespace has been removed. All classes previous nested\n * under this namespace have been moved to the top-level `PIXI` object.\n * @namespace PIXI.extras\n * @deprecated since 5.0.0\n */\n PIXI.extras = {};\n\n Object.defineProperties(PIXI.extras, {\n /**\n * @class PIXI.extras.TilingSprite\n * @see PIXI.TilingSprite\n * @deprecated since 5.0.0\n */\n TilingSprite: {\n get(): typeof TilingSprite\n {\n deprecation(v5, 'PIXI.extras.TilingSprite class has moved to PIXI.TilingSprite');\n\n return PIXI.TilingSprite;\n },\n },\n /**\n * @class PIXI.extras.TilingSpriteRenderer\n * @see PIXI.TilingSpriteRenderer\n * @deprecated since 5.0.0\n */\n TilingSpriteRenderer: {\n get(): $FixLegacy\n {\n deprecation(v5, 'PIXI.extras.TilingSpriteRenderer class has moved to PIXI.TilingSpriteRenderer');\n\n return PIXI.TilingSpriteRenderer;\n },\n },\n /**\n * @class PIXI.extras.AnimatedSprite\n * @see PIXI.AnimatedSprite\n * @deprecated since 5.0.0\n */\n AnimatedSprite: {\n get(): typeof AnimatedSprite\n {\n deprecation(v5, 'PIXI.extras.AnimatedSprite class has moved to PIXI.AnimatedSprite');\n\n return PIXI.AnimatedSprite;\n },\n },\n /**\n * @class PIXI.extras.BitmapText\n * @see PIXI.BitmapText\n * @deprecated since 5.0.0\n */\n BitmapText: {\n get(): typeof BitmapText\n {\n deprecation(v5, 'PIXI.extras.BitmapText class has moved to PIXI.BitmapText');\n\n return PIXI.BitmapText;\n },\n },\n });\n\n /**\n * @static\n * @method PIXI.TilingSprite.fromFrame\n * @deprecated since 5.3.0\n * @see PIXI.TilingSprite.from\n */\n PIXI.TilingSprite.fromFrame = function fromFrame(frameId: string, width: number, height: number): TilingSprite\n {\n deprecation('5.3.0', 'TilingSprite.fromFrame is deprecated, use TilingSprite.from');\n\n return PIXI.TilingSprite.from(frameId, { width, height });\n };\n\n /**\n * @static\n * @method PIXI.TilingSprite.fromImage\n * @deprecated since 5.3.0\n * @see PIXI.TilingSprite.from\n */\n PIXI.TilingSprite.fromImage = function fromImage(\n imageId: string,\n width: number,\n height: number,\n options: any = {}): TilingSprite\n {\n deprecation('5.3.0', 'TilingSprite.fromImage is deprecated, use TilingSprite.from');\n\n // Fallback support for crossorigin, scaleMode parameters\n if (options && typeof options !== 'object')\n {\n options = {\n // eslint-disable-next-line prefer-rest-params\n scaleMode: arguments[4],\n resourceOptions: {\n // eslint-disable-next-line prefer-rest-params\n crossorigin: arguments[3],\n },\n };\n }\n\n options.width = width;\n options.height = height;\n\n return PIXI.TilingSprite.from(imageId, options);\n };\n\n Object.defineProperties(PIXI.utils, {\n /**\n * @function PIXI.utils.getSvgSize\n * @see PIXI.resources.SVGResource.getSize\n * @deprecated since 5.0.0\n */\n getSvgSize: {\n get(): typeof resources.SVGResource.getSize\n {\n deprecation(v5, 'PIXI.utils.getSvgSize function has moved to PIXI.resources.SVGResource.getSize');\n\n return PIXI.resources.SVGResource.getSize;\n },\n },\n });\n\n /**\n * All classes on this namespace have moved to the high-level `PIXI` object.\n * @namespace PIXI.mesh\n * @deprecated since 5.0.0\n */\n PIXI.mesh = {};\n\n Object.defineProperties(PIXI.mesh, {\n /**\n * @class PIXI.mesh.Mesh\n * @see PIXI.SimpleMesh\n * @deprecated since 5.0.0\n */\n Mesh: {\n get(): typeof SimpleMesh\n {\n deprecation(v5, 'PIXI.mesh.Mesh class has moved to PIXI.SimpleMesh');\n\n return PIXI.SimpleMesh;\n },\n },\n /**\n * @class PIXI.mesh.NineSlicePlane\n * @see PIXI.NineSlicePlane\n * @deprecated since 5.0.0\n */\n NineSlicePlane: {\n get(): typeof NineSlicePlane\n {\n deprecation(v5, 'PIXI.mesh.NineSlicePlane class has moved to PIXI.NineSlicePlane');\n\n return PIXI.NineSlicePlane;\n },\n },\n /**\n * @class PIXI.mesh.Plane\n * @see PIXI.SimplePlane\n * @deprecated since 5.0.0\n */\n Plane: {\n get(): typeof SimplePlane\n {\n deprecation(v5, 'PIXI.mesh.Plane class has moved to PIXI.SimplePlane');\n\n return PIXI.SimplePlane;\n },\n },\n /**\n * @class PIXI.mesh.Rope\n * @see PIXI.SimpleRope\n * @deprecated since 5.0.0\n */\n Rope: {\n get(): typeof SimpleRope\n {\n deprecation(v5, 'PIXI.mesh.Rope class has moved to PIXI.SimpleRope');\n\n return PIXI.SimpleRope;\n },\n },\n /**\n * @class PIXI.mesh.RawMesh\n * @see PIXI.Mesh\n * @deprecated since 5.0.0\n */\n RawMesh: {\n get(): typeof Mesh\n {\n deprecation(v5, 'PIXI.mesh.RawMesh class has moved to PIXI.Mesh');\n\n return PIXI.Mesh;\n },\n },\n /**\n * @class PIXI.mesh.CanvasMeshRenderer\n * @see PIXI.CanvasMeshRenderer\n * @deprecated since 5.0.0\n */\n CanvasMeshRenderer: {\n get(): $FixLegacy\n {\n deprecation(v5, 'PIXI.mesh.CanvasMeshRenderer class has moved to PIXI.CanvasMeshRenderer');\n\n return PIXI.CanvasMeshRenderer;\n },\n },\n /**\n * @class PIXI.mesh.MeshRenderer\n * @see PIXI.MeshRenderer\n * @deprecated since 5.0.0\n */\n MeshRenderer: {\n get(): $FixLegacy\n {\n deprecation(v5, 'PIXI.mesh.MeshRenderer class has moved to PIXI.MeshRenderer');\n\n return PIXI.MeshRenderer;\n },\n },\n });\n\n /**\n * This namespace has been removed and items have been moved to\n * the top-level `PIXI` object.\n * @namespace PIXI.particles\n * @deprecated since 5.0.0\n */\n PIXI.particles = {};\n\n Object.defineProperties(PIXI.particles, {\n /**\n * @class PIXI.particles.ParticleContainer\n * @deprecated since 5.0.0\n * @see PIXI.ParticleContainer\n */\n ParticleContainer: {\n get(): typeof ParticleContainer\n {\n deprecation(v5, 'PIXI.particles.ParticleContainer class has moved to PIXI.ParticleContainer');\n\n return PIXI.ParticleContainer;\n },\n },\n /**\n * @class PIXI.particles.ParticleRenderer\n * @deprecated since 5.0.0\n * @see PIXI.ParticleRenderer\n */\n ParticleRenderer: {\n get(): $FixLegacy\n {\n deprecation(v5, 'PIXI.particles.ParticleRenderer class has moved to PIXI.ParticleRenderer');\n\n return PIXI.ParticleRenderer;\n },\n },\n });\n\n /**\n * This namespace has been removed and items have been moved to\n * the top-level `PIXI` object.\n * @namespace PIXI.ticker\n * @deprecated since 5.0.0\n */\n PIXI.ticker = {};\n\n Object.defineProperties(PIXI.ticker, {\n /**\n * @class PIXI.ticker.Ticker\n * @deprecated since 5.0.0\n * @see PIXI.Ticker\n */\n Ticker: {\n get(): typeof Ticker\n {\n deprecation(v5, 'PIXI.ticker.Ticker class has moved to PIXI.Ticker');\n\n return PIXI.Ticker;\n },\n },\n /**\n * @name PIXI.ticker.shared\n * @type {PIXI.Ticker}\n * @deprecated since 5.0.0\n * @see PIXI.Ticker.shared\n */\n shared: {\n get(): Ticker\n {\n deprecation(v5, 'PIXI.ticker.shared instance has moved to PIXI.Ticker.shared');\n\n return PIXI.Ticker.shared;\n },\n },\n });\n\n /**\n * All classes on this namespace have moved to the high-level `PIXI` object.\n * @namespace PIXI.loaders\n * @deprecated since 5.0.0\n */\n PIXI.loaders = {};\n\n Object.defineProperties(PIXI.loaders, {\n /**\n * @class PIXI.loaders.Loader\n * @see PIXI.Loader\n * @deprecated since 5.0.0\n */\n Loader: {\n get(): typeof Loader\n {\n deprecation(v5, 'PIXI.loaders.Loader class has moved to PIXI.Loader');\n\n return PIXI.Loader;\n },\n },\n /**\n * @class PIXI.loaders.Resource\n * @see PIXI.LoaderResource\n * @deprecated since 5.0.0\n */\n Resource: {\n get(): typeof LoaderResource\n {\n deprecation(v5, 'PIXI.loaders.Resource class has moved to PIXI.LoaderResource');\n\n return PIXI.LoaderResource;\n },\n },\n /**\n * @function PIXI.loaders.bitmapFontParser\n * @see PIXI.BitmapFontLoader.use\n * @deprecated since 5.0.0\n */\n bitmapFontParser: {\n get(): typeof BitmapFontLoader.use\n {\n deprecation(v5, 'PIXI.loaders.bitmapFontParser function has moved to PIXI.BitmapFontLoader.use');\n\n return PIXI.BitmapFontLoader.use;\n },\n },\n /**\n * @function PIXI.loaders.parseBitmapFontData\n * @deprecated since 5.0.0\n */\n parseBitmapFontData: {\n get(): void\n {\n deprecation(v5, 'PIXI.loaders.parseBitmapFontData function has removed');\n },\n },\n /**\n * @function PIXI.loaders.spritesheetParser\n * @see PIXI.SpritesheetLoader.use\n * @deprecated since 5.0.0\n */\n spritesheetParser: {\n get(): typeof SpritesheetLoader.use\n {\n deprecation(v5, 'PIXI.loaders.spritesheetParser function has moved to PIXI.SpritesheetLoader.use');\n\n return PIXI.SpritesheetLoader.use;\n },\n },\n /**\n * @function PIXI.loaders.getResourcePath\n * @see PIXI.SpritesheetLoader.getResourcePath\n * @deprecated since 5.0.0\n */\n getResourcePath: {\n get(): typeof SpritesheetLoader.getResourcePath\n {\n deprecation(v5, 'PIXI.loaders.getResourcePath property has moved to PIXI.SpritesheetLoader.getResourcePath');\n\n return PIXI.SpritesheetLoader.getResourcePath;\n },\n },\n });\n\n /**\n * @function PIXI.loaders.Loader.addPixiMiddleware\n * @see PIXI.Loader.registerPlugin\n * @deprecated since 5.0.0\n * @param {function} middleware\n */\n PIXI.Loader.addPixiMiddleware = function addPixiMiddleware(middleware: any): typeof Loader\n {\n deprecation(v5,\n 'PIXI.loaders.Loader.addPixiMiddleware function is deprecated, use PIXI.loaders.Loader.registerPlugin'\n );\n\n return PIXI.loaders.Loader.registerPlugin({ use: middleware() });\n };\n\n // convenience for converting event name to signal name\n const eventToSignal = (event: any): string =>\n `on${event.charAt(0).toUpperCase()}${event.slice(1)}`;\n\n Object.assign(PIXI.Loader.prototype,\n {\n /**\n * Use the corresponding signal, e.g., event `start`` is signal `onStart`.\n * @method PIXI.Loader#on\n * @deprecated since 5.0.0\n */\n on(event: any)\n {\n const signal = eventToSignal(event);\n\n deprecation(v5, `PIXI.Loader#on is completely deprecated, use PIXI.Loader#${signal}.add`);\n },\n /**\n * Use the corresponding signal, e.g., event `start`` is signal `onStart`.\n * @method PIXI.Loader#once\n * @deprecated since 5.0.0\n */\n once(event: any)\n {\n const signal = eventToSignal(event);\n\n deprecation(v5, `PIXI.Loader#once is completely deprecated, use PIXI.Loader#${signal}.once`);\n },\n /**\n * Use the corresponding signal, e.g., event `start`` is signal `onStart`.\n * @method PIXI.Loader#off\n * @deprecated since 5.0.0\n */\n off(event: any)\n {\n const signal = eventToSignal(event);\n\n deprecation(v5, `PIXI.Loader#off is completely deprecated, use PIXI.Loader#${signal}.detach`);\n },\n });\n\n /**\n * @class PIXI.extract.WebGLExtract\n * @deprecated since 5.0.0\n * @see PIXI.Extract\n */\n Object.defineProperty(PIXI.extract, 'WebGLExtract', {\n get(): typeof Extract\n {\n deprecation(v5, 'PIXI.extract.WebGLExtract method has moved to PIXI.Extract');\n\n return PIXI.Extract;\n },\n });\n\n /**\n * @class PIXI.prepare.WebGLPrepare\n * @deprecated since 5.0.0\n * @see PIXI.Prepare\n */\n Object.defineProperty(PIXI.prepare, 'WebGLPrepare', {\n get(): typeof Prepare\n {\n deprecation(v5, 'PIXI.prepare.WebGLPrepare class has moved to PIXI.Prepare');\n\n return PIXI.Prepare;\n },\n });\n\n /**\n * @method PIXI.Container#_renderWebGL\n * @private\n * @deprecated since 5.0.0\n * @see PIXI.Container#render\n * @param {PIXI.Renderer} renderer Instance of renderer\n */\n PIXI.Container.prototype._renderWebGL = function _renderWebGL(this: Container, renderer: Renderer): void\n {\n deprecation(v5, 'PIXI.Container._renderWebGL method has moved to PIXI.Container._render');\n\n this._render(renderer);\n };\n\n /**\n * @method PIXI.Container#renderWebGL\n * @deprecated since 5.0.0\n * @see PIXI.Container#render\n * @param {PIXI.Renderer} renderer Instance of renderer\n */\n PIXI.Container.prototype.renderWebGL = function renderWebGL(this: Container, renderer: Renderer): void\n {\n deprecation(v5, 'PIXI.Container.renderWebGL method has moved to PIXI.Container.render');\n\n this.render(renderer);\n };\n\n /**\n * @method PIXI.DisplayObject#renderWebGL\n * @deprecated since 5.0.0\n * @see PIXI.DisplayObject#render\n * @param {PIXI.Renderer} renderer Instance of renderer\n */\n PIXI.DisplayObject.prototype.renderWebGL = function renderWebGL(this: DisplayObject, renderer: Renderer): void\n {\n deprecation(v5, 'PIXI.DisplayObject.renderWebGL method has moved to PIXI.DisplayObject.render');\n\n this.render(renderer);\n };\n\n /**\n * @method PIXI.Container#renderAdvancedWebGL\n * @deprecated since 5.0.0\n * @see PIXI.Container#renderAdvanced\n * @param {PIXI.Renderer} renderer Instance of renderer\n */\n PIXI.Container.prototype.renderAdvancedWebGL = function renderAdvancedWebGL(this: Container, renderer: Renderer): void\n {\n deprecation(v5, 'PIXI.Container.renderAdvancedWebGL method has moved to PIXI.Container.renderAdvanced');\n\n this.renderAdvanced(renderer);\n };\n\n Object.defineProperties(PIXI.settings, {\n /**\n * Default transform type.\n *\n * @static\n * @deprecated since 5.0.0\n * @memberof PIXI.settings\n * @type {PIXI.TRANSFORM_MODE}\n * @default PIXI.TRANSFORM_MODE.STATIC\n */\n TRANSFORM_MODE: {\n get(): number\n {\n deprecation(v5, 'PIXI.settings.TRANSFORM_MODE property has been removed');\n\n return 0;\n },\n set(): void\n {\n deprecation(v5, 'PIXI.settings.TRANSFORM_MODE property has been removed');\n },\n },\n });\n\n const { BaseTexture: BaseTextureAny } = PIXI;\n\n /**\n * @method loadSource\n * @memberof PIXI.BaseTexture#\n * @deprecated since 5.0.0\n */\n BaseTextureAny.prototype.loadSource = function loadSource(image: string | HTMLImageElement): void\n {\n deprecation(v5, 'PIXI.BaseTexture.loadSource method has been deprecated');\n\n const resource = PIXI.resources.autoDetectResource(image);\n\n resource.internal = true;\n\n this.setResource(resource);\n this.update();\n };\n\n let baseTextureIdDeprecation = false;\n\n Object.defineProperties(BaseTextureAny.prototype, {\n /**\n * @name PIXI.BaseTexture#hasLoaded\n * @type {boolean}\n * @deprecated since 5.0.0\n * @readonly\n * @see PIXI.BaseTexture#valid\n */\n hasLoaded: {\n get(): boolean\n {\n deprecation(v5, 'PIXI.BaseTexture.hasLoaded property has been removed, use PIXI.BaseTexture.valid');\n\n return this.valid;\n },\n },\n /**\n * @name PIXI.BaseTexture#imageUrl\n * @type {string}\n * @deprecated since 5.0.0\n * @see PIXI.resources.ImageResource#url\n */\n imageUrl: {\n get(this: BaseTexture): string\n {\n deprecation(v5, 'PIXI.BaseTexture.imageUrl property has been removed, use PIXI.BaseTexture.resource.url');\n\n return (this.resource as resources.ImageResource)?.url;\n },\n\n set(this: BaseTexture, imageUrl: string): void\n {\n deprecation(v5, 'PIXI.BaseTexture.imageUrl property has been removed, use PIXI.BaseTexture.resource.url');\n\n if (this.resource)\n {\n (this.resource as resources.ImageResource).url = imageUrl;\n }\n },\n },\n /**\n * @name PIXI.BaseTexture#source\n * @type {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|SVGElement}\n * @deprecated since 5.0.0\n * @readonly\n * @see PIXI.resources.BaseImageResource#source\n */\n source: {\n get(this: BaseTexture): ImageSource\n {\n deprecation(v5, 'PIXI.BaseTexture.source property has been moved, use `PIXI.BaseTexture.resource.source`');\n\n return (this.resource as resources.BaseImageResource).source;\n },\n set(this: BaseTexture, source: ImageSource): void\n {\n deprecation(v5, 'PIXI.BaseTexture.source property has been moved, use `PIXI.BaseTexture.resource.source` '\n + 'if you want to set HTMLCanvasElement. Otherwise, create new BaseTexture.');\n\n if (this.resource)\n {\n (this.resource as resources.BaseImageResource).source = source;\n }\n },\n },\n\n /**\n * @name PIXI.BaseTexture#premultiplyAlpha\n * @type {boolean}\n * @deprecated since 5.2.0\n * @readonly\n * @see PIXI.BaseTexture#alphaMode\n */\n premultiplyAlpha: {\n get(this: BaseTexture): boolean\n {\n deprecation('5.2.0', 'PIXI.BaseTexture.premultiplyAlpha property has been changed to `alphaMode`'\n + ', see `PIXI.ALPHA_MODES`');\n\n return this.alphaMode !== 0;\n },\n set(this: BaseTexture, value: boolean): void\n {\n deprecation('5.2.0', 'PIXI.BaseTexture.premultiplyAlpha property has been changed to `alphaMode`'\n + ', see `PIXI.ALPHA_MODES`');\n\n this.alphaMode = Number(value);\n },\n },\n /**\n * Batch local field, stores current texture location\n *\n * @name PIXI.BaseTexture#_id\n * @deprecated since 5.2.0\n * @type {number}\n * @see PIXI.BaseTexture#_batchLocation\n */\n _id: {\n get(this: BaseTexture): number\n {\n if (!baseTextureIdDeprecation)\n {\n // #popelyshev: That property was a hot place, I don't want to call deprecation method on it if possible\n deprecation('5.2.0', 'PIXI.BaseTexture._id batch local field has been changed to `_batchLocation`');\n baseTextureIdDeprecation = true;\n }\n\n return this._batchLocation;\n },\n set(this: BaseTexture, value: number): void\n {\n this._batchLocation = value;\n },\n },\n });\n\n /**\n * @method fromImage\n * @static\n * @memberof PIXI.BaseTexture\n * @deprecated since 5.0.0\n * @see PIXI.BaseTexture.from\n */\n BaseTextureAny.fromImage = function fromImage(\n canvas: HTMLCanvasElement,\n crossorigin: string | boolean,\n scaleMode: number,\n scale: number): BaseTexture\n {\n deprecation(v5, 'PIXI.BaseTexture.fromImage method has been replaced with PIXI.BaseTexture.from');\n\n const resourceOptions = { scale, crossorigin };\n\n return BaseTextureAny.from(canvas, { scaleMode, resourceOptions });\n };\n\n /**\n * @method fromCanvas\n * @static\n * @memberof PIXI.BaseTexture\n * @deprecated since 5.0.0\n * @see PIXI.BaseTexture.from\n */\n BaseTextureAny.fromCanvas = function fromCanvas(canvas: HTMLCanvasElement, scaleMode: number): BaseTexture\n {\n deprecation(v5, 'PIXI.BaseTexture.fromCanvas method has been replaced with PIXI.BaseTexture.from');\n\n return BaseTextureAny.from(canvas, { scaleMode });\n };\n\n /**\n * @method fromSVG\n * @static\n * @memberof PIXI.BaseTexture\n * @deprecated since 5.0.0\n * @see PIXI.BaseTexture.from\n */\n BaseTextureAny.fromSVG = function fromSVG(\n canvas: HTMLCanvasElement,\n crossorigin: string | boolean,\n scaleMode: number,\n scale: number): BaseTexture\n {\n deprecation(v5, 'PIXI.BaseTexture.fromSVG method has been replaced with PIXI.BaseTexture.from');\n\n const resourceOptions = { scale, crossorigin };\n\n return BaseTextureAny.from(canvas, { scaleMode, resourceOptions });\n };\n\n Object.defineProperties(PIXI.resources.ImageResource.prototype, {\n /**\n * @name PIXI.resources.ImageResource#premultiplyAlpha\n * @type {boolean}\n * @deprecated since 5.2.0\n * @readonly\n * @see PIXI.resources.ImageResource#alphaMode\n */\n premultiplyAlpha: {\n get(this: resources.ImageResource): boolean\n {\n deprecation('5.2.0', 'PIXI.resources.ImageResource.premultiplyAlpha property '\n + 'has been changed to `alphaMode`, see `PIXI.ALPHA_MODES`');\n\n return this.alphaMode !== 0;\n },\n set(this: resources.ImageResource, value: boolean): void\n {\n deprecation('5.2.0', 'PIXI.resources.ImageResource.premultiplyAlpha property '\n + 'has been changed to `alphaMode`, see `PIXI.ALPHA_MODES`');\n this.alphaMode = Number(value);\n },\n },\n });\n\n /**\n * @method PIXI.Point#copy\n * @deprecated since 5.0.0\n * @see PIXI.Point#copyFrom\n */\n PIXI.Point.prototype.copy = function copy(this: Point, p: IPoint): Point\n {\n deprecation(v5, 'PIXI.Point.copy method has been replaced with PIXI.Point.copyFrom');\n\n return this.copyFrom(p);\n };\n\n /**\n * @method PIXI.ObservablePoint#copy\n * @deprecated since 5.0.0\n * @see PIXI.ObservablePoint#copyFrom\n */\n PIXI.ObservablePoint.prototype.copy = function copy(this: ObservablePoint, p: IPoint): ObservablePoint\n {\n deprecation(v5, 'PIXI.ObservablePoint.copy method has been replaced with PIXI.ObservablePoint.copyFrom');\n\n return this.copyFrom(p);\n };\n\n /**\n * @method PIXI.Rectangle#copy\n * @deprecated since 5.0.0\n * @see PIXI.Rectangle#copyFrom\n */\n PIXI.Rectangle.prototype.copy = function copy(this: Rectangle, p: Rectangle): Rectangle\n {\n deprecation(v5, 'PIXI.Rectangle.copy method has been replaced with PIXI.Rectangle.copyFrom');\n\n return this.copyFrom(p);\n };\n\n /**\n * @method PIXI.Matrix#copy\n * @deprecated since 5.0.0\n * @see PIXI.Matrix#copyTo\n */\n PIXI.Matrix.prototype.copy = function copy(this: Matrix, p: Matrix): Matrix\n {\n deprecation(v5, 'PIXI.Matrix.copy method has been replaced with PIXI.Matrix.copyTo');\n\n return this.copyTo(p);\n };\n\n /**\n * @method PIXI.systems.StateSystem#setState\n * @deprecated since 5.1.0\n * @see PIXI.systems.StateSystem#set\n */\n PIXI.systems.StateSystem.prototype.setState = function setState(this: systems.StateSystem, s: State): void\n {\n deprecation('v5.1.0', 'StateSystem.setState has been renamed to StateSystem.set');\n\n return this.set(s);\n };\n\n Object.assign(PIXI.systems.FilterSystem.prototype, {\n /**\n * @method PIXI.FilterManager#getRenderTarget\n * @deprecated since 5.0.0\n * @see PIXI.systems.FilterSystem#getFilterTexture\n */\n getRenderTarget(this: systems.FilterSystem, _clear: boolean, resolution: number)\n {\n deprecation(v5,\n 'PIXI.FilterManager.getRenderTarget method has been replaced with PIXI.systems.FilterSystem#getFilterTexture'\n );\n\n return this.getFilterTexture(null, resolution);\n },\n\n /**\n * @method PIXI.FilterManager#returnRenderTarget\n * @deprecated since 5.0.0\n * @see PIXI.systems.FilterSystem#returnFilterTexture\n */\n returnRenderTarget(this: systems.FilterSystem, renderTexture: any)\n {\n deprecation(v5,\n 'PIXI.FilterManager.returnRenderTarget method has been replaced with '\n + 'PIXI.systems.FilterSystem.returnFilterTexture'\n );\n\n this.returnFilterTexture(renderTexture);\n },\n\n /**\n * @method PIXI.systems.FilterSystem#calculateScreenSpaceMatrix\n * @deprecated since 5.0.0\n * @param {PIXI.Matrix} outputMatrix - the matrix to output to.\n * @return {PIXI.Matrix} The mapped matrix.\n */\n calculateScreenSpaceMatrix(this: systems.FilterSystem, outputMatrix: any)\n {\n deprecation(v5, 'PIXI.systems.FilterSystem.calculateScreenSpaceMatrix method is removed, '\n + 'use `(vTextureCoord * inputSize.xy) + outputFrame.xy` instead');\n\n const mappedMatrix = outputMatrix.identity();\n const { sourceFrame, destinationFrame } = this.activeState;\n\n mappedMatrix.translate(sourceFrame.x / destinationFrame.width, sourceFrame.y / destinationFrame.height);\n mappedMatrix.scale(destinationFrame.width, destinationFrame.height);\n\n return mappedMatrix;\n },\n\n /**\n * @method PIXI.systems.FilterSystem#calculateNormalizedScreenSpaceMatrix\n * @deprecated since 5.0.0\n * @param {PIXI.Matrix} outputMatrix - The matrix to output to.\n * @return {PIXI.Matrix} The mapped matrix.\n */\n calculateNormalizedScreenSpaceMatrix(this: systems.FilterSystem, outputMatrix: Matrix): Matrix\n {\n deprecation(v5, 'PIXI.systems.FilterManager.calculateNormalizedScreenSpaceMatrix method is removed, '\n + 'use `((vTextureCoord * inputSize.xy) + outputFrame.xy) / outputFrame.zw` instead.');\n\n const { sourceFrame, destinationFrame } = this.activeState;\n const mappedMatrix = outputMatrix.identity();\n\n mappedMatrix.translate(sourceFrame.x / destinationFrame.width, sourceFrame.y / destinationFrame.height);\n\n const translateScaleX = (destinationFrame.width / sourceFrame.width);\n const translateScaleY = (destinationFrame.height / sourceFrame.height);\n\n mappedMatrix.scale(translateScaleX, translateScaleY);\n\n return mappedMatrix;\n },\n });\n\n Object.defineProperties(PIXI.RenderTexture.prototype, {\n /**\n * @name PIXI.RenderTexture#sourceFrame\n * @type {PIXI.Rectangle}\n * @deprecated since 5.0.0\n * @readonly\n */\n sourceFrame: {\n get(this: RenderTexture): Rectangle\n {\n deprecation(v5, 'PIXI.RenderTexture.sourceFrame property has been removed');\n\n return this.filterFrame;\n },\n },\n /**\n * @name PIXI.RenderTexture#size\n * @type {PIXI.Rectangle}\n * @deprecated since 5.0.0\n * @readonly\n */\n size: {\n get(this: RenderTexture): Rectangle\n {\n deprecation(v5, 'PIXI.RenderTexture.size property has been removed');\n\n return this._frame;\n },\n },\n });\n\n /**\n * @class BlurXFilter\n * @memberof PIXI.filters\n * @deprecated since 5.0.0\n * @see PIXI.filters.BlurFilterPass\n */\n class BlurXFilter extends PIXI.filters.BlurFilterPass\n {\n constructor(strength: number, quality: number, resolution: number, kernelSize: number)\n {\n deprecation(v5, 'PIXI.filters.BlurXFilter class is deprecated, use PIXI.filters.BlurFilterPass');\n\n super(true, strength, quality, resolution, kernelSize);\n }\n }\n\n /**\n * @class BlurYFilter\n * @memberof PIXI.filters\n * @deprecated since 5.0.0\n * @see PIXI.filters.BlurFilterPass\n */\n class BlurYFilter extends PIXI.filters.BlurFilterPass\n {\n constructor(strength: number, quality: number, resolution: number, kernelSize: number)\n {\n deprecation(v5, 'PIXI.filters.BlurYFilter class is deprecated, use PIXI.filters.BlurFilterPass');\n\n super(false, strength, quality, resolution, kernelSize);\n }\n }\n\n Object.assign(PIXI.filters, {\n BlurXFilter,\n BlurYFilter,\n });\n\n const {\n Sprite: SpriteAny,\n Texture: TextureAny,\n Graphics: GraphicsAny } = PIXI;\n\n // Support for pixi.js-legacy bifurcation\n // give users a friendly assist to use legacy\n if (!GraphicsAny.prototype.generateCanvasTexture)\n {\n GraphicsAny.prototype.generateCanvasTexture = function generateCanvasTexture(): void\n {\n deprecation(v5, 'PIXI.Graphics.generateCanvasTexture method is only available in \"pixi.js-legacy\"');\n };\n }\n\n /**\n * @deprecated since 5.0.0\n * @member {PIXI.Graphics} PIXI.Graphics#graphicsData\n * @see PIXI.Graphics#geometry\n * @readonly\n */\n Object.defineProperty(GraphicsAny.prototype, 'graphicsData', {\n get(this: Graphics): GraphicsData[]\n {\n deprecation(v5, 'PIXI.Graphics.graphicsData property is deprecated, use PIXI.Graphics.geometry.graphicsData');\n\n return this.geometry.graphicsData;\n },\n });\n\n // Use these to deprecate all the Sprite from* methods\n function spriteFrom(name: string, source: string, crossorigin: string | boolean, scaleMode: number): Sprite\n {\n deprecation(v5, `PIXI.Sprite.${name} method is deprecated, use PIXI.Sprite.from`);\n\n return SpriteAny.from(source, {\n resourceOptions: {\n scale: scaleMode,\n crossorigin,\n },\n });\n }\n\n /**\n * @deprecated since 5.0.0\n * @see PIXI.Sprite.from\n * @method PIXI.Sprite.fromImage\n * @return {PIXI.Sprite}\n */\n SpriteAny.fromImage = spriteFrom.bind(null, 'fromImage');\n\n /**\n * @deprecated since 5.0.0\n * @method PIXI.Sprite.fromSVG\n * @see PIXI.Sprite.from\n * @return {PIXI.Sprite}\n */\n SpriteAny.fromSVG = spriteFrom.bind(null, 'fromSVG');\n\n /**\n * @deprecated since 5.0.0\n * @method PIXI.Sprite.fromCanvas\n * @see PIXI.Sprite.from\n * @return {PIXI.Sprite}\n */\n SpriteAny.fromCanvas = spriteFrom.bind(null, 'fromCanvas');\n\n /**\n * @deprecated since 5.0.0\n * @method PIXI.Sprite.fromVideo\n * @see PIXI.Sprite.from\n * @return {PIXI.Sprite}\n */\n SpriteAny.fromVideo = spriteFrom.bind(null, 'fromVideo');\n\n /**\n * @deprecated since 5.0.0\n * @method PIXI.Sprite.fromFrame\n * @see PIXI.Sprite.from\n * @return {PIXI.Sprite}\n */\n SpriteAny.fromFrame = spriteFrom.bind(null, 'fromFrame');\n\n // Use these to deprecate all the Texture from* methods\n function textureFrom(name: string, source: string, crossorigin: string | boolean, scaleMode: number): Texture\n {\n deprecation(v5, `PIXI.Texture.${name} method is deprecated, use PIXI.Texture.from`);\n\n return TextureAny.from(source, {\n resourceOptions: {\n scale: scaleMode,\n crossorigin,\n },\n });\n }\n\n /**\n * @deprecated since 5.0.0\n * @method PIXI.Texture.fromImage\n * @see PIXI.Texture.from\n * @return {PIXI.Texture}\n */\n TextureAny.fromImage = textureFrom.bind(null, 'fromImage');\n\n /**\n * @deprecated since 5.0.0\n * @method PIXI.Texture.fromSVG\n * @see PIXI.Texture.from\n * @return {PIXI.Texture}\n */\n TextureAny.fromSVG = textureFrom.bind(null, 'fromSVG');\n\n /**\n * @deprecated since 5.0.0\n * @method PIXI.Texture.fromCanvas\n * @see PIXI.Texture.from\n * @return {PIXI.Texture}\n */\n TextureAny.fromCanvas = textureFrom.bind(null, 'fromCanvas');\n\n /**\n * @deprecated since 5.0.0\n * @method PIXI.Texture.fromVideo\n * @see PIXI.Texture.from\n * @return {PIXI.Texture}\n */\n TextureAny.fromVideo = textureFrom.bind(null, 'fromVideo');\n\n /**\n * @deprecated since 5.0.0\n * @method PIXI.Texture.fromFrame\n * @see PIXI.Texture.from\n * @return {PIXI.Texture}\n */\n TextureAny.fromFrame = textureFrom.bind(null, 'fromFrame');\n\n /**\n * @deprecated since 5.0.0\n * @member {boolean} PIXI.AbstractRenderer#autoResize\n * @see PIXI.AbstractRenderer#autoDensity\n */\n Object.defineProperty(PIXI.AbstractRenderer.prototype, 'autoResize', {\n get(this: AbstractRenderer): boolean\n {\n deprecation(v5, 'PIXI.AbstractRenderer.autoResize property is deprecated, '\n + 'use PIXI.AbstractRenderer.autoDensity');\n\n return this.autoDensity;\n },\n set(this: any, value: boolean): void\n {\n deprecation(v5, 'PIXI.AbstractRenderer.autoResize property is deprecated, '\n + 'use PIXI.AbstractRenderer.autoDensity');\n\n this.autoDensity = value;\n },\n });\n\n /**\n * @deprecated since 5.0.0\n * @member {PIXI.systems.TextureSystem} PIXI.Renderer#textureManager\n * @see PIXI.Renderer#texture\n */\n Object.defineProperty(PIXI.Renderer.prototype, 'textureManager', {\n get(this: Renderer)\n {\n deprecation(v5, 'PIXI.Renderer.textureManager property is deprecated, use PIXI.Renderer.texture');\n\n return this.texture;\n },\n });\n\n /**\n * @namespace PIXI.utils.mixins\n * @deprecated since 5.0.0\n */\n PIXI.utils.mixins = {\n /**\n * @memberof PIXI.utils.mixins\n * @function mixin\n * @deprecated since 5.0.0\n */\n mixin(): void\n {\n deprecation(v5, 'PIXI.utils.mixins.mixin function is no longer available');\n },\n /**\n * @memberof PIXI.utils.mixins\n * @function delayMixin\n * @deprecated since 5.0.0\n */\n delayMixin(): void\n {\n deprecation(v5, 'PIXI.utils.mixins.delayMixin function is no longer available');\n },\n /**\n * @memberof PIXI.utils.mixins\n * @function performMixins\n * @deprecated since 5.0.0\n */\n performMixins(): void\n {\n deprecation(v5, 'PIXI.utils.mixins.performMixins function is no longer available');\n },\n };\n\n /**\n * @memberof PIXI.BitmapText\n * @member {object} font\n * @deprecated since 5.3.0\n */\n Object.defineProperty(PIXI.BitmapText.prototype, 'font', {\n get(this: BitmapText): any\n {\n deprecation('5.3.0', 'PIXI.BitmapText.font property is deprecated, '\n + 'use fontName, fontSize, tint or align properties');\n\n return {\n name: this._fontName,\n size: this._fontSize,\n tint: this._tint,\n align: this._align,\n };\n },\n set(this: BitmapText, value: any)\n {\n deprecation('5.3.0', 'PIXI.BitmapText.font property is deprecated, '\n + 'use fontName, fontSize, tint or align properties');\n\n if (!value)\n {\n return;\n }\n\n const style: any = { font: value };\n\n this._upgradeStyle(style);\n\n style.fontSize = style.fontSize || PIXI.BitmapFont.available[style.fontName].size;\n\n this._fontName = style.fontName;\n this._fontSize = style.fontSize;\n\n this.dirty = true;\n },\n });\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}","import getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\nimport isNativeReflectConstruct from \"@babel/runtime/helpers/esm/isNativeReflectConstruct\";\nimport possibleConstructorReturn from \"@babel/runtime/helpers/esm/possibleConstructorReturn\";\nexport default function _createSuper(Derived) {\n var hasNativeReflectConstruct = isNativeReflectConstruct();\n return function _createSuperInternal() {\n var Super = getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return possibleConstructorReturn(this, result);\n };\n}","export default function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"@babel/runtime/helpers/esm/setPrototypeOf\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","if (process.env.NODE_ENV === \"production\") {\n module.exports = require(\"./cjs/react-pixi-fiber.production.min.js\");\n} else {\n module.exports = require(\"./cjs/react-pixi-fiber.development.js\");\n}\n","import React from 'react';\nexport var ReactReduxContext = /*#__PURE__*/React.createContext(null);\n\nif (process.env.NODE_ENV !== 'production') {\n ReactReduxContext.displayName = 'ReactRedux';\n}\n\nexport default ReactReduxContext;","// Default to a dummy \"batch\" implementation that just runs the callback\nfunction defaultNoopBatch(callback) {\n callback();\n}\n\nvar batch = defaultNoopBatch; // Allow injecting another batching function later\n\nexport var setBatch = function setBatch(newBatch) {\n return batch = newBatch;\n}; // Supply a getter just to skip dealing with ESM bindings\n\nexport var getBatch = function getBatch() {\n return batch;\n};","import { getBatch } from './batch'; // encapsulates the subscription logic for connecting a component to the redux store, as\n// well as nesting subscriptions of descendant components, so that we can ensure the\n// ancestor components re-render before descendants\n\nvar nullListeners = {\n notify: function notify() {}\n};\n\nfunction createListenerCollection() {\n var batch = getBatch();\n var first = null;\n var last = null;\n return {\n clear: function clear() {\n first = null;\n last = null;\n },\n notify: function notify() {\n batch(function () {\n var listener = first;\n\n while (listener) {\n listener.callback();\n listener = listener.next;\n }\n });\n },\n get: function get() {\n var listeners = [];\n var listener = first;\n\n while (listener) {\n listeners.push(listener);\n listener = listener.next;\n }\n\n return listeners;\n },\n subscribe: function subscribe(callback) {\n var isSubscribed = true;\n var listener = last = {\n callback: callback,\n next: null,\n prev: last\n };\n\n if (listener.prev) {\n listener.prev.next = listener;\n } else {\n first = listener;\n }\n\n return function unsubscribe() {\n if (!isSubscribed || first === null) return;\n isSubscribed = false;\n\n if (listener.next) {\n listener.next.prev = listener.prev;\n } else {\n last = listener.prev;\n }\n\n if (listener.prev) {\n listener.prev.next = listener.next;\n } else {\n first = listener.next;\n }\n };\n }\n };\n}\n\nvar Subscription = /*#__PURE__*/function () {\n function Subscription(store, parentSub) {\n this.store = store;\n this.parentSub = parentSub;\n this.unsubscribe = null;\n this.listeners = nullListeners;\n this.handleChangeWrapper = this.handleChangeWrapper.bind(this);\n }\n\n var _proto = Subscription.prototype;\n\n _proto.addNestedSub = function addNestedSub(listener) {\n this.trySubscribe();\n return this.listeners.subscribe(listener);\n };\n\n _proto.notifyNestedSubs = function notifyNestedSubs() {\n this.listeners.notify();\n };\n\n _proto.handleChangeWrapper = function handleChangeWrapper() {\n if (this.onStateChange) {\n this.onStateChange();\n }\n };\n\n _proto.isSubscribed = function isSubscribed() {\n return Boolean(this.unsubscribe);\n };\n\n _proto.trySubscribe = function trySubscribe() {\n if (!this.unsubscribe) {\n this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.handleChangeWrapper) : this.store.subscribe(this.handleChangeWrapper);\n this.listeners = createListenerCollection();\n }\n };\n\n _proto.tryUnsubscribe = function tryUnsubscribe() {\n if (this.unsubscribe) {\n this.unsubscribe();\n this.unsubscribe = null;\n this.listeners.clear();\n this.listeners = nullListeners;\n }\n };\n\n return Subscription;\n}();\n\nexport { Subscription as default };","import React, { useMemo, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { ReactReduxContext } from './Context';\nimport Subscription from '../utils/Subscription';\n\nfunction Provider(_ref) {\n var store = _ref.store,\n context = _ref.context,\n children = _ref.children;\n var contextValue = useMemo(function () {\n var subscription = new Subscription(store);\n subscription.onStateChange = subscription.notifyNestedSubs;\n return {\n store: store,\n subscription: subscription\n };\n }, [store]);\n var previousState = useMemo(function () {\n return store.getState();\n }, [store]);\n useEffect(function () {\n var subscription = contextValue.subscription;\n subscription.trySubscribe();\n\n if (previousState !== store.getState()) {\n subscription.notifyNestedSubs();\n }\n\n return function () {\n subscription.tryUnsubscribe();\n subscription.onStateChange = null;\n };\n }, [contextValue, previousState]);\n var Context = context || ReactReduxContext;\n return /*#__PURE__*/React.createElement(Context.Provider, {\n value: contextValue\n }, children);\n}\n\nif (process.env.NODE_ENV !== 'production') {\n Provider.propTypes = {\n store: PropTypes.shape({\n subscribe: PropTypes.func.isRequired,\n dispatch: PropTypes.func.isRequired,\n getState: PropTypes.func.isRequired\n }),\n context: PropTypes.object,\n children: PropTypes.any\n };\n}\n\nexport default Provider;","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","import { useEffect, useLayoutEffect } from 'react'; // React currently throws a warning when using useLayoutEffect on the server.\n// To get around it, we can conditionally useEffect on the server (no-op) and\n// useLayoutEffect in the browser. We need useLayoutEffect to ensure the store\n// subscription callback always has the selector from the latest render commit\n// available, otherwise a store update may happen between render and the effect,\n// which may cause missed updates; we also must ensure the store subscription\n// is created synchronously, otherwise a store update may occur before the\n// subscription is created and an inconsistent state may be observed\n\nexport var useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? useLayoutEffect : useEffect;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport hoistStatics from 'hoist-non-react-statics';\nimport React, { useContext, useMemo, useRef, useReducer } from 'react';\nimport { isValidElementType, isContextConsumer } from 'react-is';\nimport Subscription from '../utils/Subscription';\nimport { useIsomorphicLayoutEffect } from '../utils/useIsomorphicLayoutEffect';\nimport { ReactReduxContext } from './Context'; // Define some constant arrays just to avoid re-creating these\n\nvar EMPTY_ARRAY = [];\nvar NO_SUBSCRIPTION_ARRAY = [null, null];\n\nvar stringifyComponent = function stringifyComponent(Comp) {\n try {\n return JSON.stringify(Comp);\n } catch (err) {\n return String(Comp);\n }\n};\n\nfunction storeStateUpdatesReducer(state, action) {\n var updateCount = state[1];\n return [action.payload, updateCount + 1];\n}\n\nfunction useIsomorphicLayoutEffectWithArgs(effectFunc, effectArgs, dependencies) {\n useIsomorphicLayoutEffect(function () {\n return effectFunc.apply(void 0, effectArgs);\n }, dependencies);\n}\n\nfunction captureWrapperProps(lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, actualChildProps, childPropsFromStoreUpdate, notifyNestedSubs) {\n // We want to capture the wrapper props and child props we used for later comparisons\n lastWrapperProps.current = wrapperProps;\n lastChildProps.current = actualChildProps;\n renderIsScheduled.current = false; // If the render was from a store update, clear out that reference and cascade the subscriber update\n\n if (childPropsFromStoreUpdate.current) {\n childPropsFromStoreUpdate.current = null;\n notifyNestedSubs();\n }\n}\n\nfunction subscribeUpdates(shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, childPropsFromStoreUpdate, notifyNestedSubs, forceComponentUpdateDispatch) {\n // If we're not subscribed to the store, nothing to do here\n if (!shouldHandleStateChanges) return; // Capture values for checking if and when this component unmounts\n\n var didUnsubscribe = false;\n var lastThrownError = null; // We'll run this callback every time a store subscription update propagates to this component\n\n var checkForUpdates = function checkForUpdates() {\n if (didUnsubscribe) {\n // Don't run stale listeners.\n // Redux doesn't guarantee unsubscriptions happen until next dispatch.\n return;\n }\n\n var latestStoreState = store.getState();\n var newChildProps, error;\n\n try {\n // Actually run the selector with the most recent store state and wrapper props\n // to determine what the child props should be\n newChildProps = childPropsSelector(latestStoreState, lastWrapperProps.current);\n } catch (e) {\n error = e;\n lastThrownError = e;\n }\n\n if (!error) {\n lastThrownError = null;\n } // If the child props haven't changed, nothing to do here - cascade the subscription update\n\n\n if (newChildProps === lastChildProps.current) {\n if (!renderIsScheduled.current) {\n notifyNestedSubs();\n }\n } else {\n // Save references to the new child props. Note that we track the \"child props from store update\"\n // as a ref instead of a useState/useReducer because we need a way to determine if that value has\n // been processed. If this went into useState/useReducer, we couldn't clear out the value without\n // forcing another re-render, which we don't want.\n lastChildProps.current = newChildProps;\n childPropsFromStoreUpdate.current = newChildProps;\n renderIsScheduled.current = true; // If the child props _did_ change (or we caught an error), this wrapper component needs to re-render\n\n forceComponentUpdateDispatch({\n type: 'STORE_UPDATED',\n payload: {\n error: error\n }\n });\n }\n }; // Actually subscribe to the nearest connected ancestor (or store)\n\n\n subscription.onStateChange = checkForUpdates;\n subscription.trySubscribe(); // Pull data from the store after first render in case the store has\n // changed since we began.\n\n checkForUpdates();\n\n var unsubscribeWrapper = function unsubscribeWrapper() {\n didUnsubscribe = true;\n subscription.tryUnsubscribe();\n subscription.onStateChange = null;\n\n if (lastThrownError) {\n // It's possible that we caught an error due to a bad mapState function, but the\n // parent re-rendered without this component and we're about to unmount.\n // This shouldn't happen as long as we do top-down subscriptions correctly, but\n // if we ever do those wrong, this throw will surface the error in our tests.\n // In that case, throw the error from here so it doesn't get lost.\n throw lastThrownError;\n }\n };\n\n return unsubscribeWrapper;\n}\n\nvar initStateUpdates = function initStateUpdates() {\n return [null, 0];\n};\n\nexport default function connectAdvanced(\n/*\n selectorFactory is a func that is responsible for returning the selector function used to\n compute new props from state, props, and dispatch. For example:\n export default connectAdvanced((dispatch, options) => (state, props) => ({\n thing: state.things[props.thingId],\n saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)),\n }))(YourComponent)\n Access to dispatch is provided to the factory so selectorFactories can bind actionCreators\n outside of their selector as an optimization. Options passed to connectAdvanced are passed to\n the selectorFactory, along with displayName and WrappedComponent, as the second argument.\n Note that selectorFactory is responsible for all caching/memoization of inbound and outbound\n props. Do not use connectAdvanced directly without memoizing results between calls to your\n selector, otherwise the Connect component will re-render on every state or props change.\n*/\nselectorFactory, // options object:\n_ref) {\n if (_ref === void 0) {\n _ref = {};\n }\n\n var _ref2 = _ref,\n _ref2$getDisplayName = _ref2.getDisplayName,\n getDisplayName = _ref2$getDisplayName === void 0 ? function (name) {\n return \"ConnectAdvanced(\" + name + \")\";\n } : _ref2$getDisplayName,\n _ref2$methodName = _ref2.methodName,\n methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName,\n _ref2$renderCountProp = _ref2.renderCountProp,\n renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp,\n _ref2$shouldHandleSta = _ref2.shouldHandleStateChanges,\n shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta,\n _ref2$storeKey = _ref2.storeKey,\n storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey,\n _ref2$withRef = _ref2.withRef,\n withRef = _ref2$withRef === void 0 ? false : _ref2$withRef,\n _ref2$forwardRef = _ref2.forwardRef,\n forwardRef = _ref2$forwardRef === void 0 ? false : _ref2$forwardRef,\n _ref2$context = _ref2.context,\n context = _ref2$context === void 0 ? ReactReduxContext : _ref2$context,\n connectOptions = _objectWithoutPropertiesLoose(_ref2, [\"getDisplayName\", \"methodName\", \"renderCountProp\", \"shouldHandleStateChanges\", \"storeKey\", \"withRef\", \"forwardRef\", \"context\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (renderCountProp !== undefined) {\n throw new Error(\"renderCountProp is removed. render counting is built into the latest React Dev Tools profiling extension\");\n }\n\n if (withRef) {\n throw new Error('withRef is removed. To access the wrapped instance, use a ref on the connected component');\n }\n\n var customStoreWarningMessage = 'To use a custom Redux store for specific components, create a custom React context with ' + \"React.createContext(), and pass the context object to React Redux's Provider and specific components\" + ' like: . ' + 'You may also pass a {context : MyContext} option to connect';\n\n if (storeKey !== 'store') {\n throw new Error('storeKey has been removed and does not do anything. ' + customStoreWarningMessage);\n }\n }\n\n var Context = context;\n return function wrapWithConnect(WrappedComponent) {\n if (process.env.NODE_ENV !== 'production' && !isValidElementType(WrappedComponent)) {\n throw new Error(\"You must pass a component to the function returned by \" + (methodName + \". Instead received \" + stringifyComponent(WrappedComponent)));\n }\n\n var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n var displayName = getDisplayName(wrappedComponentName);\n\n var selectorFactoryOptions = _extends({}, connectOptions, {\n getDisplayName: getDisplayName,\n methodName: methodName,\n renderCountProp: renderCountProp,\n shouldHandleStateChanges: shouldHandleStateChanges,\n storeKey: storeKey,\n displayName: displayName,\n wrappedComponentName: wrappedComponentName,\n WrappedComponent: WrappedComponent\n });\n\n var pure = connectOptions.pure;\n\n function createChildSelector(store) {\n return selectorFactory(store.dispatch, selectorFactoryOptions);\n } // If we aren't running in \"pure\" mode, we don't want to memoize values.\n // To avoid conditionally calling hooks, we fall back to a tiny wrapper\n // that just executes the given callback immediately.\n\n\n var usePureOnlyMemo = pure ? useMemo : function (callback) {\n return callback();\n };\n\n function ConnectFunction(props) {\n var _useMemo = useMemo(function () {\n // Distinguish between actual \"data\" props that were passed to the wrapper component,\n // and values needed to control behavior (forwarded refs, alternate context instances).\n // To maintain the wrapperProps object reference, memoize this destructuring.\n var reactReduxForwardedRef = props.reactReduxForwardedRef,\n wrapperProps = _objectWithoutPropertiesLoose(props, [\"reactReduxForwardedRef\"]);\n\n return [props.context, reactReduxForwardedRef, wrapperProps];\n }, [props]),\n propsContext = _useMemo[0],\n reactReduxForwardedRef = _useMemo[1],\n wrapperProps = _useMemo[2];\n\n var ContextToUse = useMemo(function () {\n // Users may optionally pass in a custom context instance to use instead of our ReactReduxContext.\n // Memoize the check that determines which context instance we should use.\n return propsContext && propsContext.Consumer && isContextConsumer( /*#__PURE__*/React.createElement(propsContext.Consumer, null)) ? propsContext : Context;\n }, [propsContext, Context]); // Retrieve the store and ancestor subscription via context, if available\n\n var contextValue = useContext(ContextToUse); // The store _must_ exist as either a prop or in context.\n // We'll check to see if it _looks_ like a Redux store first.\n // This allows us to pass through a `store` prop that is just a plain value.\n\n var didStoreComeFromProps = Boolean(props.store) && Boolean(props.store.getState) && Boolean(props.store.dispatch);\n var didStoreComeFromContext = Boolean(contextValue) && Boolean(contextValue.store);\n\n if (process.env.NODE_ENV !== 'production' && !didStoreComeFromProps && !didStoreComeFromContext) {\n throw new Error(\"Could not find \\\"store\\\" in the context of \" + (\"\\\"\" + displayName + \"\\\". Either wrap the root component in a , \") + \"or pass a custom React context provider to and the corresponding \" + (\"React context consumer to \" + displayName + \" in connect options.\"));\n } // Based on the previous check, one of these must be true\n\n\n var store = didStoreComeFromProps ? props.store : contextValue.store;\n var childPropsSelector = useMemo(function () {\n // The child props selector needs the store reference as an input.\n // Re-create this selector whenever the store changes.\n return createChildSelector(store);\n }, [store]);\n\n var _useMemo2 = useMemo(function () {\n if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY; // This Subscription's source should match where store came from: props vs. context. A component\n // connected to the store via props shouldn't use subscription from context, or vice versa.\n\n var subscription = new Subscription(store, didStoreComeFromProps ? null : contextValue.subscription); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in\n // the middle of the notification loop, where `subscription` will then be null. This can\n // probably be avoided if Subscription's listeners logic is changed to not call listeners\n // that have been unsubscribed in the middle of the notification loop.\n\n var notifyNestedSubs = subscription.notifyNestedSubs.bind(subscription);\n return [subscription, notifyNestedSubs];\n }, [store, didStoreComeFromProps, contextValue]),\n subscription = _useMemo2[0],\n notifyNestedSubs = _useMemo2[1]; // Determine what {store, subscription} value should be put into nested context, if necessary,\n // and memoize that value to avoid unnecessary context updates.\n\n\n var overriddenContextValue = useMemo(function () {\n if (didStoreComeFromProps) {\n // This component is directly subscribed to a store from props.\n // We don't want descendants reading from this store - pass down whatever\n // the existing context value is from the nearest connected ancestor.\n return contextValue;\n } // Otherwise, put this component's subscription instance into context, so that\n // connected descendants won't update until after this component is done\n\n\n return _extends({}, contextValue, {\n subscription: subscription\n });\n }, [didStoreComeFromProps, contextValue, subscription]); // We need to force this wrapper component to re-render whenever a Redux store update\n // causes a change to the calculated child component props (or we caught an error in mapState)\n\n var _useReducer = useReducer(storeStateUpdatesReducer, EMPTY_ARRAY, initStateUpdates),\n _useReducer$ = _useReducer[0],\n previousStateUpdateResult = _useReducer$[0],\n forceComponentUpdateDispatch = _useReducer[1]; // Propagate any mapState/mapDispatch errors upwards\n\n\n if (previousStateUpdateResult && previousStateUpdateResult.error) {\n throw previousStateUpdateResult.error;\n } // Set up refs to coordinate values between the subscription effect and the render logic\n\n\n var lastChildProps = useRef();\n var lastWrapperProps = useRef(wrapperProps);\n var childPropsFromStoreUpdate = useRef();\n var renderIsScheduled = useRef(false);\n var actualChildProps = usePureOnlyMemo(function () {\n // Tricky logic here:\n // - This render may have been triggered by a Redux store update that produced new child props\n // - However, we may have gotten new wrapper props after that\n // If we have new child props, and the same wrapper props, we know we should use the new child props as-is.\n // But, if we have new wrapper props, those might change the child props, so we have to recalculate things.\n // So, we'll use the child props from store update only if the wrapper props are the same as last time.\n if (childPropsFromStoreUpdate.current && wrapperProps === lastWrapperProps.current) {\n return childPropsFromStoreUpdate.current;\n } // TODO We're reading the store directly in render() here. Bad idea?\n // This will likely cause Bad Things (TM) to happen in Concurrent Mode.\n // Note that we do this because on renders _not_ caused by store updates, we need the latest store state\n // to determine what the child props should be.\n\n\n return childPropsSelector(store.getState(), wrapperProps);\n }, [store, previousStateUpdateResult, wrapperProps]); // We need this to execute synchronously every time we re-render. However, React warns\n // about useLayoutEffect in SSR, so we try to detect environment and fall back to\n // just useEffect instead to avoid the warning, since neither will run anyway.\n\n useIsomorphicLayoutEffectWithArgs(captureWrapperProps, [lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, actualChildProps, childPropsFromStoreUpdate, notifyNestedSubs]); // Our re-subscribe logic only runs when the store/subscription setup changes\n\n useIsomorphicLayoutEffectWithArgs(subscribeUpdates, [shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, childPropsFromStoreUpdate, notifyNestedSubs, forceComponentUpdateDispatch], [store, subscription, childPropsSelector]); // Now that all that's done, we can finally try to actually render the child component.\n // We memoize the elements for the rendered child component as an optimization.\n\n var renderedWrappedComponent = useMemo(function () {\n return /*#__PURE__*/React.createElement(WrappedComponent, _extends({}, actualChildProps, {\n ref: reactReduxForwardedRef\n }));\n }, [reactReduxForwardedRef, WrappedComponent, actualChildProps]); // If React sees the exact same element reference as last time, it bails out of re-rendering\n // that child, same as if it was wrapped in React.memo() or returned false from shouldComponentUpdate.\n\n var renderedChild = useMemo(function () {\n if (shouldHandleStateChanges) {\n // If this component is subscribed to store updates, we need to pass its own\n // subscription instance down to our descendants. That means rendering the same\n // Context instance, and putting a different value into the context.\n return /*#__PURE__*/React.createElement(ContextToUse.Provider, {\n value: overriddenContextValue\n }, renderedWrappedComponent);\n }\n\n return renderedWrappedComponent;\n }, [ContextToUse, renderedWrappedComponent, overriddenContextValue]);\n return renderedChild;\n } // If we're in \"pure\" mode, ensure our wrapper component only re-renders when incoming props have changed.\n\n\n var Connect = pure ? React.memo(ConnectFunction) : ConnectFunction;\n Connect.WrappedComponent = WrappedComponent;\n Connect.displayName = displayName;\n\n if (forwardRef) {\n var forwarded = React.forwardRef(function forwardConnectRef(props, ref) {\n return /*#__PURE__*/React.createElement(Connect, _extends({}, props, {\n reactReduxForwardedRef: ref\n }));\n });\n forwarded.displayName = displayName;\n forwarded.WrappedComponent = WrappedComponent;\n return hoistStatics(forwarded, WrappedComponent);\n }\n\n return hoistStatics(Connect, WrappedComponent);\n };\n}","function is(x, y) {\n if (x === y) {\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n}\n\nexport default function shallowEqual(objA, objB) {\n if (is(objA, objB)) return true;\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) return false;\n\n for (var i = 0; i < keysA.length; i++) {\n if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}","import verifyPlainObject from '../utils/verifyPlainObject';\nexport function wrapMapToPropsConstant(getConstant) {\n return function initConstantSelector(dispatch, options) {\n var constant = getConstant(dispatch, options);\n\n function constantSelector() {\n return constant;\n }\n\n constantSelector.dependsOnOwnProps = false;\n return constantSelector;\n };\n} // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args\n// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine\n// whether mapToProps needs to be invoked when props have changed.\n//\n// A length of one signals that mapToProps does not depend on props from the parent component.\n// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and\n// therefore not reporting its length accurately..\n\nexport function getDependsOnOwnProps(mapToProps) {\n return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;\n} // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,\n// this function wraps mapToProps in a proxy function which does several things:\n//\n// * Detects whether the mapToProps function being called depends on props, which\n// is used by selectorFactory to decide if it should reinvoke on props changes.\n//\n// * On first call, handles mapToProps if returns another function, and treats that\n// new function as the true mapToProps for subsequent calls.\n//\n// * On first call, verifies the first result is a plain object, in order to warn\n// the developer that their mapToProps function is not returning a valid result.\n//\n\nexport function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}","import { bindActionCreators } from 'redux';\nimport { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps';\nexport function whenMapDispatchToPropsIsFunction(mapDispatchToProps) {\n return typeof mapDispatchToProps === 'function' ? wrapMapToPropsFunc(mapDispatchToProps, 'mapDispatchToProps') : undefined;\n}\nexport function whenMapDispatchToPropsIsMissing(mapDispatchToProps) {\n return !mapDispatchToProps ? wrapMapToPropsConstant(function (dispatch) {\n return {\n dispatch: dispatch\n };\n }) : undefined;\n}\nexport function whenMapDispatchToPropsIsObject(mapDispatchToProps) {\n return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? wrapMapToPropsConstant(function (dispatch) {\n return bindActionCreators(mapDispatchToProps, dispatch);\n }) : undefined;\n}\nexport default [whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject];","import { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps';\nexport function whenMapStateToPropsIsFunction(mapStateToProps) {\n return typeof mapStateToProps === 'function' ? wrapMapToPropsFunc(mapStateToProps, 'mapStateToProps') : undefined;\n}\nexport function whenMapStateToPropsIsMissing(mapStateToProps) {\n return !mapStateToProps ? wrapMapToPropsConstant(function () {\n return {};\n }) : undefined;\n}\nexport default [whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing];","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport verifyPlainObject from '../utils/verifyPlainObject';\nexport function defaultMergeProps(stateProps, dispatchProps, ownProps) {\n return _extends({}, ownProps, stateProps, dispatchProps);\n}\nexport function wrapMergePropsFunc(mergeProps) {\n return function initMergePropsProxy(dispatch, _ref) {\n var displayName = _ref.displayName,\n pure = _ref.pure,\n areMergedPropsEqual = _ref.areMergedPropsEqual;\n var hasRunOnce = false;\n var mergedProps;\n return function mergePropsProxy(stateProps, dispatchProps, ownProps) {\n var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n\n if (hasRunOnce) {\n if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;\n } else {\n hasRunOnce = true;\n mergedProps = nextMergedProps;\n if (process.env.NODE_ENV !== 'production') verifyPlainObject(mergedProps, displayName, 'mergeProps');\n }\n\n return mergedProps;\n };\n };\n}\nexport function whenMergePropsIsFunction(mergeProps) {\n return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined;\n}\nexport function whenMergePropsIsOmitted(mergeProps) {\n return !mergeProps ? function () {\n return defaultMergeProps;\n } : undefined;\n}\nexport default [whenMergePropsIsFunction, whenMergePropsIsOmitted];","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport verifySubselectors from './verifySubselectors';\nexport function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) {\n return function impureFinalPropsSelector(state, ownProps) {\n return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps);\n };\n}\nexport function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) {\n var areStatesEqual = _ref.areStatesEqual,\n areOwnPropsEqual = _ref.areOwnPropsEqual,\n areStatePropsEqual = _ref.areStatePropsEqual;\n var hasRunAtLeastOnce = false;\n var state;\n var ownProps;\n var stateProps;\n var dispatchProps;\n var mergedProps;\n\n function handleFirstCall(firstState, firstOwnProps) {\n state = firstState;\n ownProps = firstOwnProps;\n stateProps = mapStateToProps(state, ownProps);\n dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n hasRunAtLeastOnce = true;\n return mergedProps;\n }\n\n function handleNewPropsAndNewState() {\n stateProps = mapStateToProps(state, ownProps);\n if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n\n function handleNewProps() {\n if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);\n if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n\n function handleNewState() {\n var nextStateProps = mapStateToProps(state, ownProps);\n var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);\n stateProps = nextStateProps;\n if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n\n function handleSubsequentCalls(nextState, nextOwnProps) {\n var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);\n var stateChanged = !areStatesEqual(nextState, state);\n state = nextState;\n ownProps = nextOwnProps;\n if (propsChanged && stateChanged) return handleNewPropsAndNewState();\n if (propsChanged) return handleNewProps();\n if (stateChanged) return handleNewState();\n return mergedProps;\n }\n\n return function pureFinalPropsSelector(nextState, nextOwnProps) {\n return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);\n };\n} // TODO: Add more comments\n// If pure is true, the selector returned by selectorFactory will memoize its results,\n// allowing connectAdvanced's shouldComponentUpdate to return false if final\n// props have not changed. If false, the selector will always return a new\n// object and shouldComponentUpdate will always return true.\n\nexport default function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutPropertiesLoose(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport connectAdvanced from '../components/connectAdvanced';\nimport shallowEqual from '../utils/shallowEqual';\nimport defaultMapDispatchToPropsFactories from './mapDispatchToProps';\nimport defaultMapStateToPropsFactories from './mapStateToProps';\nimport defaultMergePropsFactories from './mergeProps';\nimport defaultSelectorFactory from './selectorFactory';\n/*\n connect is a facade over connectAdvanced. It turns its args into a compatible\n selectorFactory, which has the signature:\n\n (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps\n \n connect passes its args to connectAdvanced as options, which will in turn pass them to\n selectorFactory each time a Connect component instance is instantiated or hot reloaded.\n\n selectorFactory returns a final props selector from its mapStateToProps,\n mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps,\n mergePropsFactories, and pure args.\n\n The resulting final props selector is called by the Connect component instance whenever\n it receives new props or store state.\n */\n\nfunction match(arg, factories, name) {\n for (var i = factories.length - 1; i >= 0; i--) {\n var result = factories[i](arg);\n if (result) return result;\n }\n\n return function (dispatch, options) {\n throw new Error(\"Invalid value of type \" + typeof arg + \" for \" + name + \" argument when connecting component \" + options.wrappedComponentName + \".\");\n };\n}\n\nfunction strictEqual(a, b) {\n return a === b;\n} // createConnect with default args builds the 'official' connect behavior. Calling it with\n// different options opens up some testing and extensibility scenarios\n\n\nexport function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? defaultMapStateToPropsFactories : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? defaultMapDispatchToPropsFactories : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? defaultMergePropsFactories : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? defaultSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? shallowEqual : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? shallowEqual : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? shallowEqual : _ref3$areMergedPropsE,\n extraOptions = _objectWithoutPropertiesLoose(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}\nexport default /*#__PURE__*/createConnect();","import { useReducer, useRef, useMemo, useContext, useDebugValue } from 'react';\nimport { useReduxContext as useDefaultReduxContext } from './useReduxContext';\nimport Subscription from '../utils/Subscription';\nimport { useIsomorphicLayoutEffect } from '../utils/useIsomorphicLayoutEffect';\nimport { ReactReduxContext } from '../components/Context';\n\nvar refEquality = function refEquality(a, b) {\n return a === b;\n};\n\nfunction useSelectorWithStoreAndSubscription(selector, equalityFn, store, contextSub) {\n var _useReducer = useReducer(function (s) {\n return s + 1;\n }, 0),\n forceRender = _useReducer[1];\n\n var subscription = useMemo(function () {\n return new Subscription(store, contextSub);\n }, [store, contextSub]);\n var latestSubscriptionCallbackError = useRef();\n var latestSelector = useRef();\n var latestStoreState = useRef();\n var latestSelectedState = useRef();\n var storeState = store.getState();\n var selectedState;\n\n try {\n if (selector !== latestSelector.current || storeState !== latestStoreState.current || latestSubscriptionCallbackError.current) {\n selectedState = selector(storeState);\n } else {\n selectedState = latestSelectedState.current;\n }\n } catch (err) {\n if (latestSubscriptionCallbackError.current) {\n err.message += \"\\nThe error may be correlated with this previous error:\\n\" + latestSubscriptionCallbackError.current.stack + \"\\n\\n\";\n }\n\n throw err;\n }\n\n useIsomorphicLayoutEffect(function () {\n latestSelector.current = selector;\n latestStoreState.current = storeState;\n latestSelectedState.current = selectedState;\n latestSubscriptionCallbackError.current = undefined;\n });\n useIsomorphicLayoutEffect(function () {\n function checkForUpdates() {\n try {\n var newSelectedState = latestSelector.current(store.getState());\n\n if (equalityFn(newSelectedState, latestSelectedState.current)) {\n return;\n }\n\n latestSelectedState.current = newSelectedState;\n } catch (err) {\n // we ignore all errors here, since when the component\n // is re-rendered, the selectors are called again, and\n // will throw again, if neither props nor store state\n // changed\n latestSubscriptionCallbackError.current = err;\n }\n\n forceRender();\n }\n\n subscription.onStateChange = checkForUpdates;\n subscription.trySubscribe();\n checkForUpdates();\n return function () {\n return subscription.tryUnsubscribe();\n };\n }, [store, subscription]);\n return selectedState;\n}\n/**\n * Hook factory, which creates a `useSelector` hook bound to a given context.\n *\n * @param {React.Context} [context=ReactReduxContext] Context passed to your ``.\n * @returns {Function} A `useSelector` hook bound to the specified context.\n */\n\n\nexport function createSelectorHook(context) {\n if (context === void 0) {\n context = ReactReduxContext;\n }\n\n var useReduxContext = context === ReactReduxContext ? useDefaultReduxContext : function () {\n return useContext(context);\n };\n return function useSelector(selector, equalityFn) {\n if (equalityFn === void 0) {\n equalityFn = refEquality;\n }\n\n if (process.env.NODE_ENV !== 'production' && !selector) {\n throw new Error(\"You must pass a selector to useSelector\");\n }\n\n var _useReduxContext = useReduxContext(),\n store = _useReduxContext.store,\n contextSub = _useReduxContext.subscription;\n\n var selectedState = useSelectorWithStoreAndSubscription(selector, equalityFn, store, contextSub);\n useDebugValue(selectedState);\n return selectedState;\n };\n}\n/**\n * A hook to access the redux store's state. This hook takes a selector function\n * as an argument. The selector is called with the store state.\n *\n * This hook takes an optional equality comparison function as the second parameter\n * that allows you to customize the way the selected state is compared to determine\n * whether the component needs to be re-rendered.\n *\n * @param {Function} selector the selector function\n * @param {Function=} equalityFn the function that will be used to determine equality\n *\n * @returns {any} the selected state\n *\n * @example\n *\n * import React from 'react'\n * import { useSelector } from 'react-redux'\n *\n * export const CounterComponent = () => {\n * const counter = useSelector(state => state.counter)\n * return
{counter}
\n * }\n */\n\nexport var useSelector = /*#__PURE__*/createSelectorHook();","import Provider from './components/Provider';\nimport connectAdvanced from './components/connectAdvanced';\nimport { ReactReduxContext } from './components/Context';\nimport connect from './connect/connect';\nimport { useDispatch, createDispatchHook } from './hooks/useDispatch';\nimport { useSelector, createSelectorHook } from './hooks/useSelector';\nimport { useStore, createStoreHook } from './hooks/useStore';\nimport { setBatch } from './utils/batch';\nimport { unstable_batchedUpdates as batch } from './utils/reactBatchedUpdates';\nimport shallowEqual from './utils/shallowEqual';\nsetBatch(batch);\nexport { Provider, connectAdvanced, ReactReduxContext, connect, batch, useDispatch, createDispatchHook, useSelector, createSelectorHook, useStore, createStoreHook, shallowEqual };","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n// Used for setting prototype methods that IE8 chokes on.\nvar DELETE = 'delete';\n\n// Constants describing the size of trie nodes.\nvar SHIFT = 5; // Resulted in best performance after ______?\nvar SIZE = 1 << SHIFT;\nvar MASK = SIZE - 1;\n\n// A consistent shared value representing \"not set\" which equals nothing other\n// than itself, and nothing that could be provided externally.\nvar NOT_SET = {};\n\n// Boolean references, Rough equivalent of `bool &`.\nfunction MakeRef() {\n return { value: false };\n}\n\nfunction SetRef(ref) {\n if (ref) {\n ref.value = true;\n }\n}\n\n// A function which returns a value representing an \"owner\" for transient writes\n// to tries. The return value will only ever equal itself, and will not equal\n// the return of any subsequent call of this function.\nfunction OwnerID() {}\n\nfunction ensureSize(iter) {\n if (iter.size === undefined) {\n iter.size = iter.__iterate(returnTrue);\n }\n return iter.size;\n}\n\nfunction wrapIndex(iter, index) {\n // This implements \"is array index\" which the ECMAString spec defines as:\n //\n // A String property name P is an array index if and only if\n // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal\n // to 2^32−1.\n //\n // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects\n if (typeof index !== 'number') {\n var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32\n if ('' + uint32Index !== index || uint32Index === 4294967295) {\n return NaN;\n }\n index = uint32Index;\n }\n return index < 0 ? ensureSize(iter) + index : index;\n}\n\nfunction returnTrue() {\n return true;\n}\n\nfunction wholeSlice(begin, end, size) {\n return (\n ((begin === 0 && !isNeg(begin)) ||\n (size !== undefined && begin <= -size)) &&\n (end === undefined || (size !== undefined && end >= size))\n );\n}\n\nfunction resolveBegin(begin, size) {\n return resolveIndex(begin, size, 0);\n}\n\nfunction resolveEnd(end, size) {\n return resolveIndex(end, size, size);\n}\n\nfunction resolveIndex(index, size, defaultIndex) {\n // Sanitize indices using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n return index === undefined\n ? defaultIndex\n : isNeg(index)\n ? size === Infinity\n ? size\n : Math.max(0, size + index) | 0\n : size === undefined || size === index\n ? index\n : Math.min(size, index) | 0;\n}\n\nfunction isNeg(value) {\n // Account for -0 which is negative, but not less than 0.\n return value < 0 || (value === 0 && 1 / value === -Infinity);\n}\n\n// Note: value is unchanged to not break immutable-devtools.\nvar IS_COLLECTION_SYMBOL = '@@__IMMUTABLE_ITERABLE__@@';\n\nfunction isCollection(maybeCollection) {\n return Boolean(maybeCollection && maybeCollection[IS_COLLECTION_SYMBOL]);\n}\n\nvar IS_KEYED_SYMBOL = '@@__IMMUTABLE_KEYED__@@';\n\nfunction isKeyed(maybeKeyed) {\n return Boolean(maybeKeyed && maybeKeyed[IS_KEYED_SYMBOL]);\n}\n\nvar IS_INDEXED_SYMBOL = '@@__IMMUTABLE_INDEXED__@@';\n\nfunction isIndexed(maybeIndexed) {\n return Boolean(maybeIndexed && maybeIndexed[IS_INDEXED_SYMBOL]);\n}\n\nfunction isAssociative(maybeAssociative) {\n return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);\n}\n\nvar Collection = function Collection(value) {\n return isCollection(value) ? value : Seq(value);\n};\n\nvar KeyedCollection = /*@__PURE__*/(function (Collection) {\n function KeyedCollection(value) {\n return isKeyed(value) ? value : KeyedSeq(value);\n }\n\n if ( Collection ) KeyedCollection.__proto__ = Collection;\n KeyedCollection.prototype = Object.create( Collection && Collection.prototype );\n KeyedCollection.prototype.constructor = KeyedCollection;\n\n return KeyedCollection;\n}(Collection));\n\nvar IndexedCollection = /*@__PURE__*/(function (Collection) {\n function IndexedCollection(value) {\n return isIndexed(value) ? value : IndexedSeq(value);\n }\n\n if ( Collection ) IndexedCollection.__proto__ = Collection;\n IndexedCollection.prototype = Object.create( Collection && Collection.prototype );\n IndexedCollection.prototype.constructor = IndexedCollection;\n\n return IndexedCollection;\n}(Collection));\n\nvar SetCollection = /*@__PURE__*/(function (Collection) {\n function SetCollection(value) {\n return isCollection(value) && !isAssociative(value) ? value : SetSeq(value);\n }\n\n if ( Collection ) SetCollection.__proto__ = Collection;\n SetCollection.prototype = Object.create( Collection && Collection.prototype );\n SetCollection.prototype.constructor = SetCollection;\n\n return SetCollection;\n}(Collection));\n\nCollection.Keyed = KeyedCollection;\nCollection.Indexed = IndexedCollection;\nCollection.Set = SetCollection;\n\nvar IS_SEQ_SYMBOL = '@@__IMMUTABLE_SEQ__@@';\n\nfunction isSeq(maybeSeq) {\n return Boolean(maybeSeq && maybeSeq[IS_SEQ_SYMBOL]);\n}\n\nvar IS_RECORD_SYMBOL = '@@__IMMUTABLE_RECORD__@@';\n\nfunction isRecord(maybeRecord) {\n return Boolean(maybeRecord && maybeRecord[IS_RECORD_SYMBOL]);\n}\n\nfunction isImmutable(maybeImmutable) {\n return isCollection(maybeImmutable) || isRecord(maybeImmutable);\n}\n\nvar IS_ORDERED_SYMBOL = '@@__IMMUTABLE_ORDERED__@@';\n\nfunction isOrdered(maybeOrdered) {\n return Boolean(maybeOrdered && maybeOrdered[IS_ORDERED_SYMBOL]);\n}\n\nvar ITERATE_KEYS = 0;\nvar ITERATE_VALUES = 1;\nvar ITERATE_ENTRIES = 2;\n\nvar REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\n\nvar ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;\n\nvar Iterator = function Iterator(next) {\n this.next = next;\n};\n\nIterator.prototype.toString = function toString () {\n return '[Iterator]';\n};\n\nIterator.KEYS = ITERATE_KEYS;\nIterator.VALUES = ITERATE_VALUES;\nIterator.ENTRIES = ITERATE_ENTRIES;\n\nIterator.prototype.inspect = Iterator.prototype.toSource = function() {\n return this.toString();\n};\nIterator.prototype[ITERATOR_SYMBOL] = function() {\n return this;\n};\n\nfunction iteratorValue(type, k, v, iteratorResult) {\n var value = type === 0 ? k : type === 1 ? v : [k, v];\n iteratorResult\n ? (iteratorResult.value = value)\n : (iteratorResult = {\n value: value,\n done: false,\n });\n return iteratorResult;\n}\n\nfunction iteratorDone() {\n return { value: undefined, done: true };\n}\n\nfunction hasIterator(maybeIterable) {\n return !!getIteratorFn(maybeIterable);\n}\n\nfunction isIterator(maybeIterator) {\n return maybeIterator && typeof maybeIterator.next === 'function';\n}\n\nfunction getIterator(iterable) {\n var iteratorFn = getIteratorFn(iterable);\n return iteratorFn && iteratorFn.call(iterable);\n}\n\nfunction getIteratorFn(iterable) {\n var iteratorFn =\n iterable &&\n ((REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) ||\n iterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction isArrayLike(value) {\n if (Array.isArray(value) || typeof value === 'string') {\n return true;\n }\n\n return (\n value &&\n typeof value === 'object' &&\n Number.isInteger(value.length) &&\n value.length >= 0 &&\n (value.length === 0\n ? // Only {length: 0} is considered Array-like.\n Object.keys(value).length === 1\n : // An object is only Array-like if it has a property where the last value\n // in the array-like may be found (which could be undefined).\n value.hasOwnProperty(value.length - 1))\n );\n}\n\nvar Seq = /*@__PURE__*/(function (Collection$$1) {\n function Seq(value) {\n return value === null || value === undefined\n ? emptySequence()\n : isImmutable(value)\n ? value.toSeq()\n : seqFromValue(value);\n }\n\n if ( Collection$$1 ) Seq.__proto__ = Collection$$1;\n Seq.prototype = Object.create( Collection$$1 && Collection$$1.prototype );\n Seq.prototype.constructor = Seq;\n\n Seq.prototype.toSeq = function toSeq () {\n return this;\n };\n\n Seq.prototype.toString = function toString () {\n return this.__toString('Seq {', '}');\n };\n\n Seq.prototype.cacheResult = function cacheResult () {\n if (!this._cache && this.__iterateUncached) {\n this._cache = this.entrySeq().toArray();\n this.size = this._cache.length;\n }\n return this;\n };\n\n // abstract __iterateUncached(fn, reverse)\n\n Seq.prototype.__iterate = function __iterate (fn, reverse) {\n var cache = this._cache;\n if (cache) {\n var size = cache.length;\n var i = 0;\n while (i !== size) {\n var entry = cache[reverse ? size - ++i : i++];\n if (fn(entry[1], entry[0], this) === false) {\n break;\n }\n }\n return i;\n }\n return this.__iterateUncached(fn, reverse);\n };\n\n // abstract __iteratorUncached(type, reverse)\n\n Seq.prototype.__iterator = function __iterator (type, reverse) {\n var cache = this._cache;\n if (cache) {\n var size = cache.length;\n var i = 0;\n return new Iterator(function () {\n if (i === size) {\n return iteratorDone();\n }\n var entry = cache[reverse ? size - ++i : i++];\n return iteratorValue(type, entry[0], entry[1]);\n });\n }\n return this.__iteratorUncached(type, reverse);\n };\n\n return Seq;\n}(Collection));\n\nvar KeyedSeq = /*@__PURE__*/(function (Seq) {\n function KeyedSeq(value) {\n return value === null || value === undefined\n ? emptySequence().toKeyedSeq()\n : isCollection(value)\n ? isKeyed(value)\n ? value.toSeq()\n : value.fromEntrySeq()\n : isRecord(value)\n ? value.toSeq()\n : keyedSeqFromValue(value);\n }\n\n if ( Seq ) KeyedSeq.__proto__ = Seq;\n KeyedSeq.prototype = Object.create( Seq && Seq.prototype );\n KeyedSeq.prototype.constructor = KeyedSeq;\n\n KeyedSeq.prototype.toKeyedSeq = function toKeyedSeq () {\n return this;\n };\n\n return KeyedSeq;\n}(Seq));\n\nvar IndexedSeq = /*@__PURE__*/(function (Seq) {\n function IndexedSeq(value) {\n return value === null || value === undefined\n ? emptySequence()\n : isCollection(value)\n ? isKeyed(value)\n ? value.entrySeq()\n : value.toIndexedSeq()\n : isRecord(value)\n ? value.toSeq().entrySeq()\n : indexedSeqFromValue(value);\n }\n\n if ( Seq ) IndexedSeq.__proto__ = Seq;\n IndexedSeq.prototype = Object.create( Seq && Seq.prototype );\n IndexedSeq.prototype.constructor = IndexedSeq;\n\n IndexedSeq.of = function of (/*...values*/) {\n return IndexedSeq(arguments);\n };\n\n IndexedSeq.prototype.toIndexedSeq = function toIndexedSeq () {\n return this;\n };\n\n IndexedSeq.prototype.toString = function toString () {\n return this.__toString('Seq [', ']');\n };\n\n return IndexedSeq;\n}(Seq));\n\nvar SetSeq = /*@__PURE__*/(function (Seq) {\n function SetSeq(value) {\n return (isCollection(value) && !isAssociative(value)\n ? value\n : IndexedSeq(value)\n ).toSetSeq();\n }\n\n if ( Seq ) SetSeq.__proto__ = Seq;\n SetSeq.prototype = Object.create( Seq && Seq.prototype );\n SetSeq.prototype.constructor = SetSeq;\n\n SetSeq.of = function of (/*...values*/) {\n return SetSeq(arguments);\n };\n\n SetSeq.prototype.toSetSeq = function toSetSeq () {\n return this;\n };\n\n return SetSeq;\n}(Seq));\n\nSeq.isSeq = isSeq;\nSeq.Keyed = KeyedSeq;\nSeq.Set = SetSeq;\nSeq.Indexed = IndexedSeq;\n\nSeq.prototype[IS_SEQ_SYMBOL] = true;\n\n// #pragma Root Sequences\n\nvar ArraySeq = /*@__PURE__*/(function (IndexedSeq) {\n function ArraySeq(array) {\n this._array = array;\n this.size = array.length;\n }\n\n if ( IndexedSeq ) ArraySeq.__proto__ = IndexedSeq;\n ArraySeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );\n ArraySeq.prototype.constructor = ArraySeq;\n\n ArraySeq.prototype.get = function get (index, notSetValue) {\n return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;\n };\n\n ArraySeq.prototype.__iterate = function __iterate (fn, reverse) {\n var array = this._array;\n var size = array.length;\n var i = 0;\n while (i !== size) {\n var ii = reverse ? size - ++i : i++;\n if (fn(array[ii], ii, this) === false) {\n break;\n }\n }\n return i;\n };\n\n ArraySeq.prototype.__iterator = function __iterator (type, reverse) {\n var array = this._array;\n var size = array.length;\n var i = 0;\n return new Iterator(function () {\n if (i === size) {\n return iteratorDone();\n }\n var ii = reverse ? size - ++i : i++;\n return iteratorValue(type, ii, array[ii]);\n });\n };\n\n return ArraySeq;\n}(IndexedSeq));\n\nvar ObjectSeq = /*@__PURE__*/(function (KeyedSeq) {\n function ObjectSeq(object) {\n var keys = Object.keys(object);\n this._object = object;\n this._keys = keys;\n this.size = keys.length;\n }\n\n if ( KeyedSeq ) ObjectSeq.__proto__ = KeyedSeq;\n ObjectSeq.prototype = Object.create( KeyedSeq && KeyedSeq.prototype );\n ObjectSeq.prototype.constructor = ObjectSeq;\n\n ObjectSeq.prototype.get = function get (key, notSetValue) {\n if (notSetValue !== undefined && !this.has(key)) {\n return notSetValue;\n }\n return this._object[key];\n };\n\n ObjectSeq.prototype.has = function has (key) {\n return hasOwnProperty.call(this._object, key);\n };\n\n ObjectSeq.prototype.__iterate = function __iterate (fn, reverse) {\n var object = this._object;\n var keys = this._keys;\n var size = keys.length;\n var i = 0;\n while (i !== size) {\n var key = keys[reverse ? size - ++i : i++];\n if (fn(object[key], key, this) === false) {\n break;\n }\n }\n return i;\n };\n\n ObjectSeq.prototype.__iterator = function __iterator (type, reverse) {\n var object = this._object;\n var keys = this._keys;\n var size = keys.length;\n var i = 0;\n return new Iterator(function () {\n if (i === size) {\n return iteratorDone();\n }\n var key = keys[reverse ? size - ++i : i++];\n return iteratorValue(type, key, object[key]);\n });\n };\n\n return ObjectSeq;\n}(KeyedSeq));\nObjectSeq.prototype[IS_ORDERED_SYMBOL] = true;\n\nvar CollectionSeq = /*@__PURE__*/(function (IndexedSeq) {\n function CollectionSeq(collection) {\n this._collection = collection;\n this.size = collection.length || collection.size;\n }\n\n if ( IndexedSeq ) CollectionSeq.__proto__ = IndexedSeq;\n CollectionSeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );\n CollectionSeq.prototype.constructor = CollectionSeq;\n\n CollectionSeq.prototype.__iterateUncached = function __iterateUncached (fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var collection = this._collection;\n var iterator = getIterator(collection);\n var iterations = 0;\n if (isIterator(iterator)) {\n var step;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n }\n return iterations;\n };\n\n CollectionSeq.prototype.__iteratorUncached = function __iteratorUncached (type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var collection = this._collection;\n var iterator = getIterator(collection);\n if (!isIterator(iterator)) {\n return new Iterator(iteratorDone);\n }\n var iterations = 0;\n return new Iterator(function () {\n var step = iterator.next();\n return step.done ? step : iteratorValue(type, iterations++, step.value);\n });\n };\n\n return CollectionSeq;\n}(IndexedSeq));\n\n// # pragma Helper functions\n\nvar EMPTY_SEQ;\n\nfunction emptySequence() {\n return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));\n}\n\nfunction keyedSeqFromValue(value) {\n var seq = Array.isArray(value)\n ? new ArraySeq(value)\n : hasIterator(value)\n ? new CollectionSeq(value)\n : undefined;\n if (seq) {\n return seq.fromEntrySeq();\n }\n if (typeof value === 'object') {\n return new ObjectSeq(value);\n }\n throw new TypeError(\n 'Expected Array or collection object of [k, v] entries, or keyed object: ' +\n value\n );\n}\n\nfunction indexedSeqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value);\n if (seq) {\n return seq;\n }\n throw new TypeError(\n 'Expected Array or collection object of values: ' + value\n );\n}\n\nfunction seqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value);\n if (seq) {\n return seq;\n }\n if (typeof value === 'object') {\n return new ObjectSeq(value);\n }\n throw new TypeError(\n 'Expected Array or collection object of values, or keyed object: ' + value\n );\n}\n\nfunction maybeIndexedSeqFromValue(value) {\n return isArrayLike(value)\n ? new ArraySeq(value)\n : hasIterator(value)\n ? new CollectionSeq(value)\n : undefined;\n}\n\nvar IS_MAP_SYMBOL = '@@__IMMUTABLE_MAP__@@';\n\nfunction isMap(maybeMap) {\n return Boolean(maybeMap && maybeMap[IS_MAP_SYMBOL]);\n}\n\nfunction isOrderedMap(maybeOrderedMap) {\n return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);\n}\n\nfunction isValueObject(maybeValue) {\n return Boolean(\n maybeValue &&\n typeof maybeValue.equals === 'function' &&\n typeof maybeValue.hashCode === 'function'\n );\n}\n\n/**\n * An extension of the \"same-value\" algorithm as [described for use by ES6 Map\n * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality)\n *\n * NaN is considered the same as NaN, however -0 and 0 are considered the same\n * value, which is different from the algorithm described by\n * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).\n *\n * This is extended further to allow Objects to describe the values they\n * represent, by way of `valueOf` or `equals` (and `hashCode`).\n *\n * Note: because of this extension, the key equality of Immutable.Map and the\n * value equality of Immutable.Set will differ from ES6 Map and Set.\n *\n * ### Defining custom values\n *\n * The easiest way to describe the value an object represents is by implementing\n * `valueOf`. For example, `Date` represents a value by returning a unix\n * timestamp for `valueOf`:\n *\n * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ...\n * var date2 = new Date(1234567890000);\n * date1.valueOf(); // 1234567890000\n * assert( date1 !== date2 );\n * assert( Immutable.is( date1, date2 ) );\n *\n * Note: overriding `valueOf` may have other implications if you use this object\n * where JavaScript expects a primitive, such as implicit string coercion.\n *\n * For more complex types, especially collections, implementing `valueOf` may\n * not be performant. An alternative is to implement `equals` and `hashCode`.\n *\n * `equals` takes another object, presumably of similar type, and returns true\n * if it is equal. Equality is symmetrical, so the same result should be\n * returned if this and the argument are flipped.\n *\n * assert( a.equals(b) === b.equals(a) );\n *\n * `hashCode` returns a 32bit integer number representing the object which will\n * be used to determine how to store the value object in a Map or Set. You must\n * provide both or neither methods, one must not exist without the other.\n *\n * Also, an important relationship between these methods must be upheld: if two\n * values are equal, they *must* return the same hashCode. If the values are not\n * equal, they might have the same hashCode; this is called a hash collision,\n * and while undesirable for performance reasons, it is acceptable.\n *\n * if (a.equals(b)) {\n * assert( a.hashCode() === b.hashCode() );\n * }\n *\n * All Immutable collections are Value Objects: they implement `equals()`\n * and `hashCode()`.\n */\nfunction is(valueA, valueB) {\n if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n if (\n typeof valueA.valueOf === 'function' &&\n typeof valueB.valueOf === 'function'\n ) {\n valueA = valueA.valueOf();\n valueB = valueB.valueOf();\n if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n }\n return !!(\n isValueObject(valueA) &&\n isValueObject(valueB) &&\n valueA.equals(valueB)\n );\n}\n\nvar imul =\n typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2\n ? Math.imul\n : function imul(a, b) {\n a |= 0; // int\n b |= 0; // int\n var c = a & 0xffff;\n var d = b & 0xffff;\n // Shift by 0 fixes the sign on the high part.\n return (c * d + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0)) | 0; // int\n };\n\n// v8 has an optimization for storing 31-bit signed numbers.\n// Values which have either 00 or 11 as the high order bits qualify.\n// This function drops the highest order bit in a signed number, maintaining\n// the sign bit.\nfunction smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xbfffffff);\n}\n\nvar defaultValueOf = Object.prototype.valueOf;\n\nfunction hash(o) {\n switch (typeof o) {\n case 'boolean':\n // The hash values for built-in constants are a 1 value for each 5-byte\n // shift region expect for the first, which encodes the value. This\n // reduces the odds of a hash collision for these common values.\n return o ? 0x42108421 : 0x42108420;\n case 'number':\n return hashNumber(o);\n case 'string':\n return o.length > STRING_HASH_CACHE_MIN_STRLEN\n ? cachedHashString(o)\n : hashString(o);\n case 'object':\n case 'function':\n if (o === null) {\n return 0x42108422;\n }\n if (typeof o.hashCode === 'function') {\n // Drop any high bits from accidentally long hash codes.\n return smi(o.hashCode(o));\n }\n if (o.valueOf !== defaultValueOf && typeof o.valueOf === 'function') {\n o = o.valueOf(o);\n }\n return hashJSObj(o);\n case 'undefined':\n return 0x42108423;\n default:\n if (typeof o.toString === 'function') {\n return hashString(o.toString());\n }\n throw new Error('Value type ' + typeof o + ' cannot be hashed.');\n }\n}\n\n// Compress arbitrarily large numbers into smi hashes.\nfunction hashNumber(n) {\n if (n !== n || n === Infinity) {\n return 0;\n }\n var hash = n | 0;\n if (hash !== n) {\n hash ^= n * 0xffffffff;\n }\n while (n > 0xffffffff) {\n n /= 0xffffffff;\n hash ^= n;\n }\n return smi(hash);\n}\n\nfunction cachedHashString(string) {\n var hashed = stringHashCache[string];\n if (hashed === undefined) {\n hashed = hashString(string);\n if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {\n STRING_HASH_CACHE_SIZE = 0;\n stringHashCache = {};\n }\n STRING_HASH_CACHE_SIZE++;\n stringHashCache[string] = hashed;\n }\n return hashed;\n}\n\n// http://jsperf.com/hashing-strings\nfunction hashString(string) {\n // This is the hash from JVM\n // The hash code for a string is computed as\n // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],\n // where s[i] is the ith character of the string and n is the length of\n // the string. We \"mod\" the result to make it between 0 (inclusive) and 2^31\n // (exclusive) by dropping high bits.\n var hashed = 0;\n for (var ii = 0; ii < string.length; ii++) {\n hashed = (31 * hashed + string.charCodeAt(ii)) | 0;\n }\n return smi(hashed);\n}\n\nfunction hashJSObj(obj) {\n var hashed;\n if (usingWeakMap) {\n hashed = weakMap.get(obj);\n if (hashed !== undefined) {\n return hashed;\n }\n }\n\n hashed = obj[UID_HASH_KEY];\n if (hashed !== undefined) {\n return hashed;\n }\n\n if (!canDefineProperty) {\n hashed = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];\n if (hashed !== undefined) {\n return hashed;\n }\n\n hashed = getIENodeHash(obj);\n if (hashed !== undefined) {\n return hashed;\n }\n }\n\n hashed = ++objHashUID;\n if (objHashUID & 0x40000000) {\n objHashUID = 0;\n }\n\n if (usingWeakMap) {\n weakMap.set(obj, hashed);\n } else if (isExtensible !== undefined && isExtensible(obj) === false) {\n throw new Error('Non-extensible objects are not allowed as keys.');\n } else if (canDefineProperty) {\n Object.defineProperty(obj, UID_HASH_KEY, {\n enumerable: false,\n configurable: false,\n writable: false,\n value: hashed,\n });\n } else if (\n obj.propertyIsEnumerable !== undefined &&\n obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable\n ) {\n // Since we can't define a non-enumerable property on the object\n // we'll hijack one of the less-used non-enumerable properties to\n // save our hash on it. Since this is a function it will not show up in\n // `JSON.stringify` which is what we want.\n obj.propertyIsEnumerable = function() {\n return this.constructor.prototype.propertyIsEnumerable.apply(\n this,\n arguments\n );\n };\n obj.propertyIsEnumerable[UID_HASH_KEY] = hashed;\n } else if (obj.nodeType !== undefined) {\n // At this point we couldn't get the IE `uniqueID` to use as a hash\n // and we couldn't use a non-enumerable property to exploit the\n // dontEnum bug so we simply add the `UID_HASH_KEY` on the node\n // itself.\n obj[UID_HASH_KEY] = hashed;\n } else {\n throw new Error('Unable to set a non-enumerable property on object.');\n }\n\n return hashed;\n}\n\n// Get references to ES5 object methods.\nvar isExtensible = Object.isExtensible;\n\n// True if Object.defineProperty works as expected. IE8 fails this test.\nvar canDefineProperty = (function() {\n try {\n Object.defineProperty({}, '@', {});\n return true;\n } catch (e) {\n return false;\n }\n})();\n\n// IE has a `uniqueID` property on DOM nodes. We can construct the hash from it\n// and avoid memory leaks from the IE cloneNode bug.\nfunction getIENodeHash(node) {\n if (node && node.nodeType > 0) {\n switch (node.nodeType) {\n case 1: // Element\n return node.uniqueID;\n case 9: // Document\n return node.documentElement && node.documentElement.uniqueID;\n }\n }\n}\n\n// If possible, use a WeakMap.\nvar usingWeakMap = typeof WeakMap === 'function';\nvar weakMap;\nif (usingWeakMap) {\n weakMap = new WeakMap();\n}\n\nvar objHashUID = 0;\n\nvar UID_HASH_KEY = '__immutablehash__';\nif (typeof Symbol === 'function') {\n UID_HASH_KEY = Symbol(UID_HASH_KEY);\n}\n\nvar STRING_HASH_CACHE_MIN_STRLEN = 16;\nvar STRING_HASH_CACHE_MAX_SIZE = 255;\nvar STRING_HASH_CACHE_SIZE = 0;\nvar stringHashCache = {};\n\nvar ToKeyedSequence = /*@__PURE__*/(function (KeyedSeq$$1) {\n function ToKeyedSequence(indexed, useKeys) {\n this._iter = indexed;\n this._useKeys = useKeys;\n this.size = indexed.size;\n }\n\n if ( KeyedSeq$$1 ) ToKeyedSequence.__proto__ = KeyedSeq$$1;\n ToKeyedSequence.prototype = Object.create( KeyedSeq$$1 && KeyedSeq$$1.prototype );\n ToKeyedSequence.prototype.constructor = ToKeyedSequence;\n\n ToKeyedSequence.prototype.get = function get (key, notSetValue) {\n return this._iter.get(key, notSetValue);\n };\n\n ToKeyedSequence.prototype.has = function has (key) {\n return this._iter.has(key);\n };\n\n ToKeyedSequence.prototype.valueSeq = function valueSeq () {\n return this._iter.valueSeq();\n };\n\n ToKeyedSequence.prototype.reverse = function reverse () {\n var this$1 = this;\n\n var reversedSequence = reverseFactory(this, true);\n if (!this._useKeys) {\n reversedSequence.valueSeq = function () { return this$1._iter.toSeq().reverse(); };\n }\n return reversedSequence;\n };\n\n ToKeyedSequence.prototype.map = function map (mapper, context) {\n var this$1 = this;\n\n var mappedSequence = mapFactory(this, mapper, context);\n if (!this._useKeys) {\n mappedSequence.valueSeq = function () { return this$1._iter.toSeq().map(mapper, context); };\n }\n return mappedSequence;\n };\n\n ToKeyedSequence.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1 = this;\n\n return this._iter.__iterate(function (v, k) { return fn(v, k, this$1); }, reverse);\n };\n\n ToKeyedSequence.prototype.__iterator = function __iterator (type, reverse) {\n return this._iter.__iterator(type, reverse);\n };\n\n return ToKeyedSequence;\n}(KeyedSeq));\nToKeyedSequence.prototype[IS_ORDERED_SYMBOL] = true;\n\nvar ToIndexedSequence = /*@__PURE__*/(function (IndexedSeq$$1) {\n function ToIndexedSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n\n if ( IndexedSeq$$1 ) ToIndexedSequence.__proto__ = IndexedSeq$$1;\n ToIndexedSequence.prototype = Object.create( IndexedSeq$$1 && IndexedSeq$$1.prototype );\n ToIndexedSequence.prototype.constructor = ToIndexedSequence;\n\n ToIndexedSequence.prototype.includes = function includes (value) {\n return this._iter.includes(value);\n };\n\n ToIndexedSequence.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1 = this;\n\n var i = 0;\n reverse && ensureSize(this);\n return this._iter.__iterate(\n function (v) { return fn(v, reverse ? this$1.size - ++i : i++, this$1); },\n reverse\n );\n };\n\n ToIndexedSequence.prototype.__iterator = function __iterator (type, reverse) {\n var this$1 = this;\n\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n var i = 0;\n reverse && ensureSize(this);\n return new Iterator(function () {\n var step = iterator.next();\n return step.done\n ? step\n : iteratorValue(\n type,\n reverse ? this$1.size - ++i : i++,\n step.value,\n step\n );\n });\n };\n\n return ToIndexedSequence;\n}(IndexedSeq));\n\nvar ToSetSequence = /*@__PURE__*/(function (SetSeq$$1) {\n function ToSetSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n\n if ( SetSeq$$1 ) ToSetSequence.__proto__ = SetSeq$$1;\n ToSetSequence.prototype = Object.create( SetSeq$$1 && SetSeq$$1.prototype );\n ToSetSequence.prototype.constructor = ToSetSequence;\n\n ToSetSequence.prototype.has = function has (key) {\n return this._iter.includes(key);\n };\n\n ToSetSequence.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1 = this;\n\n return this._iter.__iterate(function (v) { return fn(v, v, this$1); }, reverse);\n };\n\n ToSetSequence.prototype.__iterator = function __iterator (type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function () {\n var step = iterator.next();\n return step.done\n ? step\n : iteratorValue(type, step.value, step.value, step);\n });\n };\n\n return ToSetSequence;\n}(SetSeq));\n\nvar FromEntriesSequence = /*@__PURE__*/(function (KeyedSeq$$1) {\n function FromEntriesSequence(entries) {\n this._iter = entries;\n this.size = entries.size;\n }\n\n if ( KeyedSeq$$1 ) FromEntriesSequence.__proto__ = KeyedSeq$$1;\n FromEntriesSequence.prototype = Object.create( KeyedSeq$$1 && KeyedSeq$$1.prototype );\n FromEntriesSequence.prototype.constructor = FromEntriesSequence;\n\n FromEntriesSequence.prototype.entrySeq = function entrySeq () {\n return this._iter.toSeq();\n };\n\n FromEntriesSequence.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1 = this;\n\n return this._iter.__iterate(function (entry) {\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedCollection = isCollection(entry);\n return fn(\n indexedCollection ? entry.get(1) : entry[1],\n indexedCollection ? entry.get(0) : entry[0],\n this$1\n );\n }\n }, reverse);\n };\n\n FromEntriesSequence.prototype.__iterator = function __iterator (type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function () {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedCollection = isCollection(entry);\n return iteratorValue(\n type,\n indexedCollection ? entry.get(0) : entry[0],\n indexedCollection ? entry.get(1) : entry[1],\n step\n );\n }\n }\n });\n };\n\n return FromEntriesSequence;\n}(KeyedSeq));\n\nToIndexedSequence.prototype.cacheResult = ToKeyedSequence.prototype.cacheResult = ToSetSequence.prototype.cacheResult = FromEntriesSequence.prototype.cacheResult = cacheResultThrough;\n\nfunction flipFactory(collection) {\n var flipSequence = makeSequence(collection);\n flipSequence._iter = collection;\n flipSequence.size = collection.size;\n flipSequence.flip = function () { return collection; };\n flipSequence.reverse = function() {\n var reversedSequence = collection.reverse.apply(this); // super.reverse()\n reversedSequence.flip = function () { return collection.reverse(); };\n return reversedSequence;\n };\n flipSequence.has = function (key) { return collection.includes(key); };\n flipSequence.includes = function (key) { return collection.has(key); };\n flipSequence.cacheResult = cacheResultThrough;\n flipSequence.__iterateUncached = function(fn, reverse) {\n var this$1 = this;\n\n return collection.__iterate(function (v, k) { return fn(k, v, this$1) !== false; }, reverse);\n };\n flipSequence.__iteratorUncached = function(type, reverse) {\n if (type === ITERATE_ENTRIES) {\n var iterator = collection.__iterator(type, reverse);\n return new Iterator(function () {\n var step = iterator.next();\n if (!step.done) {\n var k = step.value[0];\n step.value[0] = step.value[1];\n step.value[1] = k;\n }\n return step;\n });\n }\n return collection.__iterator(\n type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES,\n reverse\n );\n };\n return flipSequence;\n}\n\nfunction mapFactory(collection, mapper, context) {\n var mappedSequence = makeSequence(collection);\n mappedSequence.size = collection.size;\n mappedSequence.has = function (key) { return collection.has(key); };\n mappedSequence.get = function (key, notSetValue) {\n var v = collection.get(key, NOT_SET);\n return v === NOT_SET\n ? notSetValue\n : mapper.call(context, v, key, collection);\n };\n mappedSequence.__iterateUncached = function(fn, reverse) {\n var this$1 = this;\n\n return collection.__iterate(\n function (v, k, c) { return fn(mapper.call(context, v, k, c), k, this$1) !== false; },\n reverse\n );\n };\n mappedSequence.__iteratorUncached = function(type, reverse) {\n var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);\n return new Iterator(function () {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n return iteratorValue(\n type,\n key,\n mapper.call(context, entry[1], key, collection),\n step\n );\n });\n };\n return mappedSequence;\n}\n\nfunction reverseFactory(collection, useKeys) {\n var this$1 = this;\n\n var reversedSequence = makeSequence(collection);\n reversedSequence._iter = collection;\n reversedSequence.size = collection.size;\n reversedSequence.reverse = function () { return collection; };\n if (collection.flip) {\n reversedSequence.flip = function() {\n var flipSequence = flipFactory(collection);\n flipSequence.reverse = function () { return collection.flip(); };\n return flipSequence;\n };\n }\n reversedSequence.get = function (key, notSetValue) { return collection.get(useKeys ? key : -1 - key, notSetValue); };\n reversedSequence.has = function (key) { return collection.has(useKeys ? key : -1 - key); };\n reversedSequence.includes = function (value) { return collection.includes(value); };\n reversedSequence.cacheResult = cacheResultThrough;\n reversedSequence.__iterate = function(fn, reverse) {\n var this$1 = this;\n\n var i = 0;\n reverse && ensureSize(collection);\n return collection.__iterate(\n function (v, k) { return fn(v, useKeys ? k : reverse ? this$1.size - ++i : i++, this$1); },\n !reverse\n );\n };\n reversedSequence.__iterator = function (type, reverse) {\n var i = 0;\n reverse && ensureSize(collection);\n var iterator = collection.__iterator(ITERATE_ENTRIES, !reverse);\n return new Iterator(function () {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n return iteratorValue(\n type,\n useKeys ? entry[0] : reverse ? this$1.size - ++i : i++,\n entry[1],\n step\n );\n });\n };\n return reversedSequence;\n}\n\nfunction filterFactory(collection, predicate, context, useKeys) {\n var filterSequence = makeSequence(collection);\n if (useKeys) {\n filterSequence.has = function (key) {\n var v = collection.get(key, NOT_SET);\n return v !== NOT_SET && !!predicate.call(context, v, key, collection);\n };\n filterSequence.get = function (key, notSetValue) {\n var v = collection.get(key, NOT_SET);\n return v !== NOT_SET && predicate.call(context, v, key, collection)\n ? v\n : notSetValue;\n };\n }\n filterSequence.__iterateUncached = function(fn, reverse) {\n var this$1 = this;\n\n var iterations = 0;\n collection.__iterate(function (v, k, c) {\n if (predicate.call(context, v, k, c)) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$1);\n }\n }, reverse);\n return iterations;\n };\n filterSequence.__iteratorUncached = function(type, reverse) {\n var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);\n var iterations = 0;\n return new Iterator(function () {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n var value = entry[1];\n if (predicate.call(context, value, key, collection)) {\n return iteratorValue(type, useKeys ? key : iterations++, value, step);\n }\n }\n });\n };\n return filterSequence;\n}\n\nfunction countByFactory(collection, grouper, context) {\n var groups = Map().asMutable();\n collection.__iterate(function (v, k) {\n groups.update(grouper.call(context, v, k, collection), 0, function (a) { return a + 1; });\n });\n return groups.asImmutable();\n}\n\nfunction groupByFactory(collection, grouper, context) {\n var isKeyedIter = isKeyed(collection);\n var groups = (isOrdered(collection) ? OrderedMap() : Map()).asMutable();\n collection.__iterate(function (v, k) {\n groups.update(\n grouper.call(context, v, k, collection),\n function (a) { return ((a = a || []), a.push(isKeyedIter ? [k, v] : v), a); }\n );\n });\n var coerce = collectionClass(collection);\n return groups.map(function (arr) { return reify(collection, coerce(arr)); }).asImmutable();\n}\n\nfunction sliceFactory(collection, begin, end, useKeys) {\n var originalSize = collection.size;\n\n if (wholeSlice(begin, end, originalSize)) {\n return collection;\n }\n\n var resolvedBegin = resolveBegin(begin, originalSize);\n var resolvedEnd = resolveEnd(end, originalSize);\n\n // begin or end will be NaN if they were provided as negative numbers and\n // this collection's size is unknown. In that case, cache first so there is\n // a known size and these do not resolve to NaN.\n if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {\n return sliceFactory(collection.toSeq().cacheResult(), begin, end, useKeys);\n }\n\n // Note: resolvedEnd is undefined when the original sequence's length is\n // unknown and this slice did not supply an end and should contain all\n // elements after resolvedBegin.\n // In that case, resolvedSize will be NaN and sliceSize will remain undefined.\n var resolvedSize = resolvedEnd - resolvedBegin;\n var sliceSize;\n if (resolvedSize === resolvedSize) {\n sliceSize = resolvedSize < 0 ? 0 : resolvedSize;\n }\n\n var sliceSeq = makeSequence(collection);\n\n // If collection.size is undefined, the size of the realized sliceSeq is\n // unknown at this point unless the number of items to slice is 0\n sliceSeq.size =\n sliceSize === 0 ? sliceSize : (collection.size && sliceSize) || undefined;\n\n if (!useKeys && isSeq(collection) && sliceSize >= 0) {\n sliceSeq.get = function(index, notSetValue) {\n index = wrapIndex(this, index);\n return index >= 0 && index < sliceSize\n ? collection.get(index + resolvedBegin, notSetValue)\n : notSetValue;\n };\n }\n\n sliceSeq.__iterateUncached = function(fn, reverse) {\n var this$1 = this;\n\n if (sliceSize === 0) {\n return 0;\n }\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var skipped = 0;\n var isSkipping = true;\n var iterations = 0;\n collection.__iterate(function (v, k) {\n if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {\n iterations++;\n return (\n fn(v, useKeys ? k : iterations - 1, this$1) !== false &&\n iterations !== sliceSize\n );\n }\n });\n return iterations;\n };\n\n sliceSeq.__iteratorUncached = function(type, reverse) {\n if (sliceSize !== 0 && reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n // Don't bother instantiating parent iterator if taking 0.\n if (sliceSize === 0) {\n return new Iterator(iteratorDone);\n }\n var iterator = collection.__iterator(type, reverse);\n var skipped = 0;\n var iterations = 0;\n return new Iterator(function () {\n while (skipped++ < resolvedBegin) {\n iterator.next();\n }\n if (++iterations > sliceSize) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (useKeys || type === ITERATE_VALUES || step.done) {\n return step;\n }\n if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations - 1, undefined, step);\n }\n return iteratorValue(type, iterations - 1, step.value[1], step);\n });\n };\n\n return sliceSeq;\n}\n\nfunction takeWhileFactory(collection, predicate, context) {\n var takeSequence = makeSequence(collection);\n takeSequence.__iterateUncached = function(fn, reverse) {\n var this$1 = this;\n\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterations = 0;\n collection.__iterate(\n function (v, k, c) { return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$1); }\n );\n return iterations;\n };\n takeSequence.__iteratorUncached = function(type, reverse) {\n var this$1 = this;\n\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);\n var iterating = true;\n return new Iterator(function () {\n if (!iterating) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var k = entry[0];\n var v = entry[1];\n if (!predicate.call(context, v, k, this$1)) {\n iterating = false;\n return iteratorDone();\n }\n return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);\n });\n };\n return takeSequence;\n}\n\nfunction skipWhileFactory(collection, predicate, context, useKeys) {\n var skipSequence = makeSequence(collection);\n skipSequence.__iterateUncached = function(fn, reverse) {\n var this$1 = this;\n\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var isSkipping = true;\n var iterations = 0;\n collection.__iterate(function (v, k, c) {\n if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$1);\n }\n });\n return iterations;\n };\n skipSequence.__iteratorUncached = function(type, reverse) {\n var this$1 = this;\n\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);\n var skipping = true;\n var iterations = 0;\n return new Iterator(function () {\n var step;\n var k;\n var v;\n do {\n step = iterator.next();\n if (step.done) {\n if (useKeys || type === ITERATE_VALUES) {\n return step;\n }\n if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations++, undefined, step);\n }\n return iteratorValue(type, iterations++, step.value[1], step);\n }\n var entry = step.value;\n k = entry[0];\n v = entry[1];\n skipping && (skipping = predicate.call(context, v, k, this$1));\n } while (skipping);\n return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);\n });\n };\n return skipSequence;\n}\n\nfunction concatFactory(collection, values) {\n var isKeyedCollection = isKeyed(collection);\n var iters = [collection]\n .concat(values)\n .map(function (v) {\n if (!isCollection(v)) {\n v = isKeyedCollection\n ? keyedSeqFromValue(v)\n : indexedSeqFromValue(Array.isArray(v) ? v : [v]);\n } else if (isKeyedCollection) {\n v = KeyedCollection(v);\n }\n return v;\n })\n .filter(function (v) { return v.size !== 0; });\n\n if (iters.length === 0) {\n return collection;\n }\n\n if (iters.length === 1) {\n var singleton = iters[0];\n if (\n singleton === collection ||\n (isKeyedCollection && isKeyed(singleton)) ||\n (isIndexed(collection) && isIndexed(singleton))\n ) {\n return singleton;\n }\n }\n\n var concatSeq = new ArraySeq(iters);\n if (isKeyedCollection) {\n concatSeq = concatSeq.toKeyedSeq();\n } else if (!isIndexed(collection)) {\n concatSeq = concatSeq.toSetSeq();\n }\n concatSeq = concatSeq.flatten(true);\n concatSeq.size = iters.reduce(function (sum, seq) {\n if (sum !== undefined) {\n var size = seq.size;\n if (size !== undefined) {\n return sum + size;\n }\n }\n }, 0);\n return concatSeq;\n}\n\nfunction flattenFactory(collection, depth, useKeys) {\n var flatSequence = makeSequence(collection);\n flatSequence.__iterateUncached = function(fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterations = 0;\n var stopped = false;\n function flatDeep(iter, currentDepth) {\n iter.__iterate(function (v, k) {\n if ((!depth || currentDepth < depth) && isCollection(v)) {\n flatDeep(v, currentDepth + 1);\n } else {\n iterations++;\n if (fn(v, useKeys ? k : iterations - 1, flatSequence) === false) {\n stopped = true;\n }\n }\n return !stopped;\n }, reverse);\n }\n flatDeep(collection, 0);\n return iterations;\n };\n flatSequence.__iteratorUncached = function(type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = collection.__iterator(type, reverse);\n var stack = [];\n var iterations = 0;\n return new Iterator(function () {\n while (iterator) {\n var step = iterator.next();\n if (step.done !== false) {\n iterator = stack.pop();\n continue;\n }\n var v = step.value;\n if (type === ITERATE_ENTRIES) {\n v = v[1];\n }\n if ((!depth || stack.length < depth) && isCollection(v)) {\n stack.push(iterator);\n iterator = v.__iterator(type, reverse);\n } else {\n return useKeys ? step : iteratorValue(type, iterations++, v, step);\n }\n }\n return iteratorDone();\n });\n };\n return flatSequence;\n}\n\nfunction flatMapFactory(collection, mapper, context) {\n var coerce = collectionClass(collection);\n return collection\n .toSeq()\n .map(function (v, k) { return coerce(mapper.call(context, v, k, collection)); })\n .flatten(true);\n}\n\nfunction interposeFactory(collection, separator) {\n var interposedSequence = makeSequence(collection);\n interposedSequence.size = collection.size && collection.size * 2 - 1;\n interposedSequence.__iterateUncached = function(fn, reverse) {\n var this$1 = this;\n\n var iterations = 0;\n collection.__iterate(\n function (v) { return (!iterations || fn(separator, iterations++, this$1) !== false) &&\n fn(v, iterations++, this$1) !== false; },\n reverse\n );\n return iterations;\n };\n interposedSequence.__iteratorUncached = function(type, reverse) {\n var iterator = collection.__iterator(ITERATE_VALUES, reverse);\n var iterations = 0;\n var step;\n return new Iterator(function () {\n if (!step || iterations % 2) {\n step = iterator.next();\n if (step.done) {\n return step;\n }\n }\n return iterations % 2\n ? iteratorValue(type, iterations++, separator)\n : iteratorValue(type, iterations++, step.value, step);\n });\n };\n return interposedSequence;\n}\n\nfunction sortFactory(collection, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n var isKeyedCollection = isKeyed(collection);\n var index = 0;\n var entries = collection\n .toSeq()\n .map(function (v, k) { return [k, v, index++, mapper ? mapper(v, k, collection) : v]; })\n .valueSeq()\n .toArray();\n entries.sort(function (a, b) { return comparator(a[3], b[3]) || a[2] - b[2]; }).forEach(\n isKeyedCollection\n ? function (v, i) {\n entries[i].length = 2;\n }\n : function (v, i) {\n entries[i] = v[1];\n }\n );\n return isKeyedCollection\n ? KeyedSeq(entries)\n : isIndexed(collection)\n ? IndexedSeq(entries)\n : SetSeq(entries);\n}\n\nfunction maxFactory(collection, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n if (mapper) {\n var entry = collection\n .toSeq()\n .map(function (v, k) { return [v, mapper(v, k, collection)]; })\n .reduce(function (a, b) { return (maxCompare(comparator, a[1], b[1]) ? b : a); });\n return entry && entry[0];\n }\n return collection.reduce(function (a, b) { return (maxCompare(comparator, a, b) ? b : a); });\n}\n\nfunction maxCompare(comparator, a, b) {\n var comp = comparator(b, a);\n // b is considered the new max if the comparator declares them equal, but\n // they are not equal and b is in fact a nullish value.\n return (\n (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) ||\n comp > 0\n );\n}\n\nfunction zipWithFactory(keyIter, zipper, iters, zipAll) {\n var zipSequence = makeSequence(keyIter);\n var sizes = new ArraySeq(iters).map(function (i) { return i.size; });\n zipSequence.size = zipAll ? sizes.max() : sizes.min();\n // Note: this a generic base implementation of __iterate in terms of\n // __iterator which may be more generically useful in the future.\n zipSequence.__iterate = function(fn, reverse) {\n /* generic:\n var iterator = this.__iterator(ITERATE_ENTRIES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n iterations++;\n if (fn(step.value[1], step.value[0], this) === false) {\n break;\n }\n }\n return iterations;\n */\n // indexed:\n var iterator = this.__iterator(ITERATE_VALUES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n return iterations;\n };\n zipSequence.__iteratorUncached = function(type, reverse) {\n var iterators = iters.map(\n function (i) { return ((i = Collection(i)), getIterator(reverse ? i.reverse() : i)); }\n );\n var iterations = 0;\n var isDone = false;\n return new Iterator(function () {\n var steps;\n if (!isDone) {\n steps = iterators.map(function (i) { return i.next(); });\n isDone = zipAll ? steps.every(function (s) { return s.done; }) : steps.some(function (s) { return s.done; });\n }\n if (isDone) {\n return iteratorDone();\n }\n return iteratorValue(\n type,\n iterations++,\n zipper.apply(null, steps.map(function (s) { return s.value; }))\n );\n });\n };\n return zipSequence;\n}\n\n// #pragma Helper Functions\n\nfunction reify(iter, seq) {\n return iter === seq ? iter : isSeq(iter) ? seq : iter.constructor(seq);\n}\n\nfunction validateEntry(entry) {\n if (entry !== Object(entry)) {\n throw new TypeError('Expected [K, V] tuple: ' + entry);\n }\n}\n\nfunction collectionClass(collection) {\n return isKeyed(collection)\n ? KeyedCollection\n : isIndexed(collection)\n ? IndexedCollection\n : SetCollection;\n}\n\nfunction makeSequence(collection) {\n return Object.create(\n (isKeyed(collection)\n ? KeyedSeq\n : isIndexed(collection)\n ? IndexedSeq\n : SetSeq\n ).prototype\n );\n}\n\nfunction cacheResultThrough() {\n if (this._iter.cacheResult) {\n this._iter.cacheResult();\n this.size = this._iter.size;\n return this;\n }\n return Seq.prototype.cacheResult.call(this);\n}\n\nfunction defaultComparator(a, b) {\n if (a === undefined && b === undefined) {\n return 0;\n }\n\n if (a === undefined) {\n return 1;\n }\n\n if (b === undefined) {\n return -1;\n }\n\n return a > b ? 1 : a < b ? -1 : 0;\n}\n\n// http://jsperf.com/copy-array-inline\nfunction arrCopy(arr, offset) {\n offset = offset || 0;\n var len = Math.max(0, arr.length - offset);\n var newArr = new Array(len);\n for (var ii = 0; ii < len; ii++) {\n newArr[ii] = arr[ii + offset];\n }\n return newArr;\n}\n\nfunction invariant(condition, error) {\n if (!condition) { throw new Error(error); }\n}\n\nfunction assertNotInfinite(size) {\n invariant(\n size !== Infinity,\n 'Cannot perform this action with an infinite size.'\n );\n}\n\nfunction coerceKeyPath(keyPath) {\n if (isArrayLike(keyPath) && typeof keyPath !== 'string') {\n return keyPath;\n }\n if (isOrdered(keyPath)) {\n return keyPath.toArray();\n }\n throw new TypeError(\n 'Invalid keyPath: expected Ordered Collection or Array: ' + keyPath\n );\n}\n\nfunction isPlainObj(value) {\n return (\n value &&\n (typeof value.constructor !== 'function' ||\n value.constructor.name === 'Object')\n );\n}\n\n/**\n * Returns true if the value is a potentially-persistent data structure, either\n * provided by Immutable.js or a plain Array or Object.\n */\nfunction isDataStructure(value) {\n return (\n typeof value === 'object' &&\n (isImmutable(value) || Array.isArray(value) || isPlainObj(value))\n );\n}\n\n/**\n * Converts a value to a string, adding quotes if a string was provided.\n */\nfunction quoteString(value) {\n try {\n return typeof value === 'string' ? JSON.stringify(value) : String(value);\n } catch (_ignoreError) {\n return JSON.stringify(value);\n }\n}\n\nfunction has(collection, key) {\n return isImmutable(collection)\n ? collection.has(key)\n : isDataStructure(collection) && hasOwnProperty.call(collection, key);\n}\n\nfunction get(collection, key, notSetValue) {\n return isImmutable(collection)\n ? collection.get(key, notSetValue)\n : !has(collection, key)\n ? notSetValue\n : typeof collection.get === 'function'\n ? collection.get(key)\n : collection[key];\n}\n\nfunction shallowCopy(from) {\n if (Array.isArray(from)) {\n return arrCopy(from);\n }\n var to = {};\n for (var key in from) {\n if (hasOwnProperty.call(from, key)) {\n to[key] = from[key];\n }\n }\n return to;\n}\n\nfunction remove(collection, key) {\n if (!isDataStructure(collection)) {\n throw new TypeError(\n 'Cannot update non-data-structure value: ' + collection\n );\n }\n if (isImmutable(collection)) {\n if (!collection.remove) {\n throw new TypeError(\n 'Cannot update immutable value without .remove() method: ' + collection\n );\n }\n return collection.remove(key);\n }\n if (!hasOwnProperty.call(collection, key)) {\n return collection;\n }\n var collectionCopy = shallowCopy(collection);\n if (Array.isArray(collectionCopy)) {\n collectionCopy.splice(key, 1);\n } else {\n delete collectionCopy[key];\n }\n return collectionCopy;\n}\n\nfunction set(collection, key, value) {\n if (!isDataStructure(collection)) {\n throw new TypeError(\n 'Cannot update non-data-structure value: ' + collection\n );\n }\n if (isImmutable(collection)) {\n if (!collection.set) {\n throw new TypeError(\n 'Cannot update immutable value without .set() method: ' + collection\n );\n }\n return collection.set(key, value);\n }\n if (hasOwnProperty.call(collection, key) && value === collection[key]) {\n return collection;\n }\n var collectionCopy = shallowCopy(collection);\n collectionCopy[key] = value;\n return collectionCopy;\n}\n\nfunction updateIn(collection, keyPath, notSetValue, updater) {\n if (!updater) {\n updater = notSetValue;\n notSetValue = undefined;\n }\n var updatedValue = updateInDeeply(\n isImmutable(collection),\n collection,\n coerceKeyPath(keyPath),\n 0,\n notSetValue,\n updater\n );\n return updatedValue === NOT_SET ? notSetValue : updatedValue;\n}\n\nfunction updateInDeeply(\n inImmutable,\n existing,\n keyPath,\n i,\n notSetValue,\n updater\n) {\n var wasNotSet = existing === NOT_SET;\n if (i === keyPath.length) {\n var existingValue = wasNotSet ? notSetValue : existing;\n var newValue = updater(existingValue);\n return newValue === existingValue ? existing : newValue;\n }\n if (!wasNotSet && !isDataStructure(existing)) {\n throw new TypeError(\n 'Cannot update within non-data-structure value in path [' +\n keyPath.slice(0, i).map(quoteString) +\n ']: ' +\n existing\n );\n }\n var key = keyPath[i];\n var nextExisting = wasNotSet ? NOT_SET : get(existing, key, NOT_SET);\n var nextUpdated = updateInDeeply(\n nextExisting === NOT_SET ? inImmutable : isImmutable(nextExisting),\n nextExisting,\n keyPath,\n i + 1,\n notSetValue,\n updater\n );\n return nextUpdated === nextExisting\n ? existing\n : nextUpdated === NOT_SET\n ? remove(existing, key)\n : set(\n wasNotSet ? (inImmutable ? emptyMap() : {}) : existing,\n key,\n nextUpdated\n );\n}\n\nfunction setIn(collection, keyPath, value) {\n return updateIn(collection, keyPath, NOT_SET, function () { return value; });\n}\n\nfunction setIn$1(keyPath, v) {\n return setIn(this, keyPath, v);\n}\n\nfunction removeIn(collection, keyPath) {\n return updateIn(collection, keyPath, function () { return NOT_SET; });\n}\n\nfunction deleteIn(keyPath) {\n return removeIn(this, keyPath);\n}\n\nfunction update(collection, key, notSetValue, updater) {\n return updateIn(collection, [key], notSetValue, updater);\n}\n\nfunction update$1(key, notSetValue, updater) {\n return arguments.length === 1\n ? key(this)\n : update(this, key, notSetValue, updater);\n}\n\nfunction updateIn$1(keyPath, notSetValue, updater) {\n return updateIn(this, keyPath, notSetValue, updater);\n}\n\nfunction merge() {\n var iters = [], len = arguments.length;\n while ( len-- ) iters[ len ] = arguments[ len ];\n\n return mergeIntoKeyedWith(this, iters);\n}\n\nfunction mergeWith(merger) {\n var iters = [], len = arguments.length - 1;\n while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];\n\n if (typeof merger !== 'function') {\n throw new TypeError('Invalid merger function: ' + merger);\n }\n return mergeIntoKeyedWith(this, iters, merger);\n}\n\nfunction mergeIntoKeyedWith(collection, collections, merger) {\n var iters = [];\n for (var ii = 0; ii < collections.length; ii++) {\n var collection$1 = KeyedCollection(collections[ii]);\n if (collection$1.size !== 0) {\n iters.push(collection$1);\n }\n }\n if (iters.length === 0) {\n return collection;\n }\n if (\n collection.toSeq().size === 0 &&\n !collection.__ownerID &&\n iters.length === 1\n ) {\n return collection.constructor(iters[0]);\n }\n return collection.withMutations(function (collection) {\n var mergeIntoCollection = merger\n ? function (value, key) {\n update(\n collection,\n key,\n NOT_SET,\n function (oldVal) { return (oldVal === NOT_SET ? value : merger(oldVal, value, key)); }\n );\n }\n : function (value, key) {\n collection.set(key, value);\n };\n for (var ii = 0; ii < iters.length; ii++) {\n iters[ii].forEach(mergeIntoCollection);\n }\n });\n}\n\nfunction merge$1(collection) {\n var sources = [], len = arguments.length - 1;\n while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ];\n\n return mergeWithSources(collection, sources);\n}\n\nfunction mergeWith$1(merger, collection) {\n var sources = [], len = arguments.length - 2;\n while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ];\n\n return mergeWithSources(collection, sources, merger);\n}\n\nfunction mergeDeep(collection) {\n var sources = [], len = arguments.length - 1;\n while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ];\n\n return mergeDeepWithSources(collection, sources);\n}\n\nfunction mergeDeepWith(merger, collection) {\n var sources = [], len = arguments.length - 2;\n while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ];\n\n return mergeDeepWithSources(collection, sources, merger);\n}\n\nfunction mergeDeepWithSources(collection, sources, merger) {\n return mergeWithSources(collection, sources, deepMergerWith(merger));\n}\n\nfunction mergeWithSources(collection, sources, merger) {\n if (!isDataStructure(collection)) {\n throw new TypeError(\n 'Cannot merge into non-data-structure value: ' + collection\n );\n }\n if (isImmutable(collection)) {\n return typeof merger === 'function' && collection.mergeWith\n ? collection.mergeWith.apply(collection, [ merger ].concat( sources ))\n : collection.merge\n ? collection.merge.apply(collection, sources)\n : collection.concat.apply(collection, sources);\n }\n var isArray = Array.isArray(collection);\n var merged = collection;\n var Collection$$1 = isArray ? IndexedCollection : KeyedCollection;\n var mergeItem = isArray\n ? function (value) {\n // Copy on write\n if (merged === collection) {\n merged = shallowCopy(merged);\n }\n merged.push(value);\n }\n : function (value, key) {\n var hasVal = hasOwnProperty.call(merged, key);\n var nextVal =\n hasVal && merger ? merger(merged[key], value, key) : value;\n if (!hasVal || nextVal !== merged[key]) {\n // Copy on write\n if (merged === collection) {\n merged = shallowCopy(merged);\n }\n merged[key] = nextVal;\n }\n };\n for (var i = 0; i < sources.length; i++) {\n Collection$$1(sources[i]).forEach(mergeItem);\n }\n return merged;\n}\n\nfunction deepMergerWith(merger) {\n function deepMerger(oldValue, newValue, key) {\n return isDataStructure(oldValue) && isDataStructure(newValue)\n ? mergeWithSources(oldValue, [newValue], deepMerger)\n : merger\n ? merger(oldValue, newValue, key)\n : newValue;\n }\n return deepMerger;\n}\n\nfunction mergeDeep$1() {\n var iters = [], len = arguments.length;\n while ( len-- ) iters[ len ] = arguments[ len ];\n\n return mergeDeepWithSources(this, iters);\n}\n\nfunction mergeDeepWith$1(merger) {\n var iters = [], len = arguments.length - 1;\n while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];\n\n return mergeDeepWithSources(this, iters, merger);\n}\n\nfunction mergeIn(keyPath) {\n var iters = [], len = arguments.length - 1;\n while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];\n\n return updateIn(this, keyPath, emptyMap(), function (m) { return mergeWithSources(m, iters); });\n}\n\nfunction mergeDeepIn(keyPath) {\n var iters = [], len = arguments.length - 1;\n while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];\n\n return updateIn(this, keyPath, emptyMap(), function (m) { return mergeDeepWithSources(m, iters); }\n );\n}\n\nfunction withMutations(fn) {\n var mutable = this.asMutable();\n fn(mutable);\n return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;\n}\n\nfunction asMutable() {\n return this.__ownerID ? this : this.__ensureOwner(new OwnerID());\n}\n\nfunction asImmutable() {\n return this.__ensureOwner();\n}\n\nfunction wasAltered() {\n return this.__altered;\n}\n\nvar Map = /*@__PURE__*/(function (KeyedCollection$$1) {\n function Map(value) {\n return value === null || value === undefined\n ? emptyMap()\n : isMap(value) && !isOrdered(value)\n ? value\n : emptyMap().withMutations(function (map) {\n var iter = KeyedCollection$$1(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v, k) { return map.set(k, v); });\n });\n }\n\n if ( KeyedCollection$$1 ) Map.__proto__ = KeyedCollection$$1;\n Map.prototype = Object.create( KeyedCollection$$1 && KeyedCollection$$1.prototype );\n Map.prototype.constructor = Map;\n\n Map.of = function of () {\n var keyValues = [], len = arguments.length;\n while ( len-- ) keyValues[ len ] = arguments[ len ];\n\n return emptyMap().withMutations(function (map) {\n for (var i = 0; i < keyValues.length; i += 2) {\n if (i + 1 >= keyValues.length) {\n throw new Error('Missing value for key: ' + keyValues[i]);\n }\n map.set(keyValues[i], keyValues[i + 1]);\n }\n });\n };\n\n Map.prototype.toString = function toString () {\n return this.__toString('Map {', '}');\n };\n\n // @pragma Access\n\n Map.prototype.get = function get (k, notSetValue) {\n return this._root\n ? this._root.get(0, undefined, k, notSetValue)\n : notSetValue;\n };\n\n // @pragma Modification\n\n Map.prototype.set = function set (k, v) {\n return updateMap(this, k, v);\n };\n\n Map.prototype.remove = function remove (k) {\n return updateMap(this, k, NOT_SET);\n };\n\n Map.prototype.deleteAll = function deleteAll (keys) {\n var collection = Collection(keys);\n\n if (collection.size === 0) {\n return this;\n }\n\n return this.withMutations(function (map) {\n collection.forEach(function (key) { return map.remove(key); });\n });\n };\n\n Map.prototype.clear = function clear () {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._root = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyMap();\n };\n\n // @pragma Composition\n\n Map.prototype.sort = function sort (comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator));\n };\n\n Map.prototype.sortBy = function sortBy (mapper, comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator, mapper));\n };\n\n Map.prototype.map = function map (mapper, context) {\n return this.withMutations(function (map) {\n map.forEach(function (value, key) {\n map.set(key, mapper.call(context, value, key, map));\n });\n });\n };\n\n // @pragma Mutability\n\n Map.prototype.__iterator = function __iterator (type, reverse) {\n return new MapIterator(this, type, reverse);\n };\n\n Map.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1 = this;\n\n var iterations = 0;\n this._root &&\n this._root.iterate(function (entry) {\n iterations++;\n return fn(entry[1], entry[0], this$1);\n }, reverse);\n return iterations;\n };\n\n Map.prototype.__ensureOwner = function __ensureOwner (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n if (this.size === 0) {\n return emptyMap();\n }\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeMap(this.size, this._root, ownerID, this.__hash);\n };\n\n return Map;\n}(KeyedCollection));\n\nMap.isMap = isMap;\n\nvar MapPrototype = Map.prototype;\nMapPrototype[IS_MAP_SYMBOL] = true;\nMapPrototype[DELETE] = MapPrototype.remove;\nMapPrototype.removeAll = MapPrototype.deleteAll;\nMapPrototype.setIn = setIn$1;\nMapPrototype.removeIn = MapPrototype.deleteIn = deleteIn;\nMapPrototype.update = update$1;\nMapPrototype.updateIn = updateIn$1;\nMapPrototype.merge = MapPrototype.concat = merge;\nMapPrototype.mergeWith = mergeWith;\nMapPrototype.mergeDeep = mergeDeep$1;\nMapPrototype.mergeDeepWith = mergeDeepWith$1;\nMapPrototype.mergeIn = mergeIn;\nMapPrototype.mergeDeepIn = mergeDeepIn;\nMapPrototype.withMutations = withMutations;\nMapPrototype.wasAltered = wasAltered;\nMapPrototype.asImmutable = asImmutable;\nMapPrototype['@@transducer/init'] = MapPrototype.asMutable = asMutable;\nMapPrototype['@@transducer/step'] = function(result, arr) {\n return result.set(arr[0], arr[1]);\n};\nMapPrototype['@@transducer/result'] = function(obj) {\n return obj.asImmutable();\n};\n\n// #pragma Trie Nodes\n\nvar ArrayMapNode = function ArrayMapNode(ownerID, entries) {\n this.ownerID = ownerID;\n this.entries = entries;\n};\n\nArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n};\n\nArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n\n var entries = this.entries;\n var idx = 0;\n var len = entries.length;\n for (; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n\n if (removed && entries.length === 1) {\n return; // undefined\n }\n\n if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {\n return createNodes(ownerID, entries, key, value);\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n\n if (exists) {\n if (removed) {\n idx === len - 1\n ? newEntries.pop()\n : (newEntries[idx] = newEntries.pop());\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n\n return new ArrayMapNode(ownerID, newEntries);\n};\n\nvar BitmapIndexedNode = function BitmapIndexedNode(ownerID, bitmap, nodes) {\n this.ownerID = ownerID;\n this.bitmap = bitmap;\n this.nodes = nodes;\n};\n\nBitmapIndexedNode.prototype.get = function get (shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var bit = 1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK);\n var bitmap = this.bitmap;\n return (bitmap & bit) === 0\n ? notSetValue\n : this.nodes[popCount(bitmap & (bit - 1))].get(\n shift + SHIFT,\n keyHash,\n key,\n notSetValue\n );\n};\n\nBitmapIndexedNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var bit = 1 << keyHashFrag;\n var bitmap = this.bitmap;\n var exists = (bitmap & bit) !== 0;\n\n if (!exists && value === NOT_SET) {\n return this;\n }\n\n var idx = popCount(bitmap & (bit - 1));\n var nodes = this.nodes;\n var node = exists ? nodes[idx] : undefined;\n var newNode = updateNode(\n node,\n ownerID,\n shift + SHIFT,\n keyHash,\n key,\n value,\n didChangeSize,\n didAlter\n );\n\n if (newNode === node) {\n return this;\n }\n\n if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {\n return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);\n }\n\n if (\n exists &&\n !newNode &&\n nodes.length === 2 &&\n isLeafNode(nodes[idx ^ 1])\n ) {\n return nodes[idx ^ 1];\n }\n\n if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {\n return newNode;\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newBitmap = exists ? (newNode ? bitmap : bitmap ^ bit) : bitmap | bit;\n var newNodes = exists\n ? newNode\n ? setAt(nodes, idx, newNode, isEditable)\n : spliceOut(nodes, idx, isEditable)\n : spliceIn(nodes, idx, newNode, isEditable);\n\n if (isEditable) {\n this.bitmap = newBitmap;\n this.nodes = newNodes;\n return this;\n }\n\n return new BitmapIndexedNode(ownerID, newBitmap, newNodes);\n};\n\nvar HashArrayMapNode = function HashArrayMapNode(ownerID, count, nodes) {\n this.ownerID = ownerID;\n this.count = count;\n this.nodes = nodes;\n};\n\nHashArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var node = this.nodes[idx];\n return node\n ? node.get(shift + SHIFT, keyHash, key, notSetValue)\n : notSetValue;\n};\n\nHashArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var removed = value === NOT_SET;\n var nodes = this.nodes;\n var node = nodes[idx];\n\n if (removed && !node) {\n return this;\n }\n\n var newNode = updateNode(\n node,\n ownerID,\n shift + SHIFT,\n keyHash,\n key,\n value,\n didChangeSize,\n didAlter\n );\n if (newNode === node) {\n return this;\n }\n\n var newCount = this.count;\n if (!node) {\n newCount++;\n } else if (!newNode) {\n newCount--;\n if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {\n return packNodes(ownerID, nodes, newCount, idx);\n }\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newNodes = setAt(nodes, idx, newNode, isEditable);\n\n if (isEditable) {\n this.count = newCount;\n this.nodes = newNodes;\n return this;\n }\n\n return new HashArrayMapNode(ownerID, newCount, newNodes);\n};\n\nvar HashCollisionNode = function HashCollisionNode(ownerID, keyHash, entries) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entries = entries;\n};\n\nHashCollisionNode.prototype.get = function get (shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n};\n\nHashCollisionNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n\n var removed = value === NOT_SET;\n\n if (keyHash !== this.keyHash) {\n if (removed) {\n return this;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);\n }\n\n var entries = this.entries;\n var idx = 0;\n var len = entries.length;\n for (; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n\n if (removed && len === 2) {\n return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n\n if (exists) {\n if (removed) {\n idx === len - 1\n ? newEntries.pop()\n : (newEntries[idx] = newEntries.pop());\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n\n return new HashCollisionNode(ownerID, this.keyHash, newEntries);\n};\n\nvar ValueNode = function ValueNode(ownerID, keyHash, entry) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entry = entry;\n};\n\nValueNode.prototype.get = function get (shift, keyHash, key, notSetValue) {\n return is(key, this.entry[0]) ? this.entry[1] : notSetValue;\n};\n\nValueNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n var keyMatch = is(key, this.entry[0]);\n if (keyMatch ? value === this.entry[1] : removed) {\n return this;\n }\n\n SetRef(didAlter);\n\n if (removed) {\n SetRef(didChangeSize);\n return; // undefined\n }\n\n if (keyMatch) {\n if (ownerID && ownerID === this.ownerID) {\n this.entry[1] = value;\n return this;\n }\n return new ValueNode(ownerID, this.keyHash, [key, value]);\n }\n\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);\n};\n\n// #pragma Iterators\n\nArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate = function(\n fn,\n reverse\n) {\n var entries = this.entries;\n for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {\n if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {\n return false;\n }\n }\n};\n\nBitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate = function(\n fn,\n reverse\n) {\n var nodes = this.nodes;\n for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {\n var node = nodes[reverse ? maxIndex - ii : ii];\n if (node && node.iterate(fn, reverse) === false) {\n return false;\n }\n }\n};\n\n// eslint-disable-next-line no-unused-vars\nValueNode.prototype.iterate = function(fn, reverse) {\n return fn(this.entry);\n};\n\nvar MapIterator = /*@__PURE__*/(function (Iterator$$1) {\n function MapIterator(map, type, reverse) {\n this._type = type;\n this._reverse = reverse;\n this._stack = map._root && mapIteratorFrame(map._root);\n }\n\n if ( Iterator$$1 ) MapIterator.__proto__ = Iterator$$1;\n MapIterator.prototype = Object.create( Iterator$$1 && Iterator$$1.prototype );\n MapIterator.prototype.constructor = MapIterator;\n\n MapIterator.prototype.next = function next () {\n var type = this._type;\n var stack = this._stack;\n while (stack) {\n var node = stack.node;\n var index = stack.index++;\n var maxIndex = (void 0);\n if (node.entry) {\n if (index === 0) {\n return mapIteratorValue(type, node.entry);\n }\n } else if (node.entries) {\n maxIndex = node.entries.length - 1;\n if (index <= maxIndex) {\n return mapIteratorValue(\n type,\n node.entries[this._reverse ? maxIndex - index : index]\n );\n }\n } else {\n maxIndex = node.nodes.length - 1;\n if (index <= maxIndex) {\n var subNode = node.nodes[this._reverse ? maxIndex - index : index];\n if (subNode) {\n if (subNode.entry) {\n return mapIteratorValue(type, subNode.entry);\n }\n stack = this._stack = mapIteratorFrame(subNode, stack);\n }\n continue;\n }\n }\n stack = this._stack = this._stack.__prev;\n }\n return iteratorDone();\n };\n\n return MapIterator;\n}(Iterator));\n\nfunction mapIteratorValue(type, entry) {\n return iteratorValue(type, entry[0], entry[1]);\n}\n\nfunction mapIteratorFrame(node, prev) {\n return {\n node: node,\n index: 0,\n __prev: prev,\n };\n}\n\nfunction makeMap(size, root, ownerID, hash$$1) {\n var map = Object.create(MapPrototype);\n map.size = size;\n map._root = root;\n map.__ownerID = ownerID;\n map.__hash = hash$$1;\n map.__altered = false;\n return map;\n}\n\nvar EMPTY_MAP;\nfunction emptyMap() {\n return EMPTY_MAP || (EMPTY_MAP = makeMap(0));\n}\n\nfunction updateMap(map, k, v) {\n var newRoot;\n var newSize;\n if (!map._root) {\n if (v === NOT_SET) {\n return map;\n }\n newSize = 1;\n newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);\n } else {\n var didChangeSize = MakeRef();\n var didAlter = MakeRef();\n newRoot = updateNode(\n map._root,\n map.__ownerID,\n 0,\n undefined,\n k,\n v,\n didChangeSize,\n didAlter\n );\n if (!didAlter.value) {\n return map;\n }\n newSize = map.size + (didChangeSize.value ? (v === NOT_SET ? -1 : 1) : 0);\n }\n if (map.__ownerID) {\n map.size = newSize;\n map._root = newRoot;\n map.__hash = undefined;\n map.__altered = true;\n return map;\n }\n return newRoot ? makeMap(newSize, newRoot) : emptyMap();\n}\n\nfunction updateNode(\n node,\n ownerID,\n shift,\n keyHash,\n key,\n value,\n didChangeSize,\n didAlter\n) {\n if (!node) {\n if (value === NOT_SET) {\n return node;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return new ValueNode(ownerID, keyHash, [key, value]);\n }\n return node.update(\n ownerID,\n shift,\n keyHash,\n key,\n value,\n didChangeSize,\n didAlter\n );\n}\n\nfunction isLeafNode(node) {\n return (\n node.constructor === ValueNode || node.constructor === HashCollisionNode\n );\n}\n\nfunction mergeIntoNode(node, ownerID, shift, keyHash, entry) {\n if (node.keyHash === keyHash) {\n return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);\n }\n\n var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;\n var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n\n var newNode;\n var nodes =\n idx1 === idx2\n ? [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)]\n : ((newNode = new ValueNode(ownerID, keyHash, entry)),\n idx1 < idx2 ? [node, newNode] : [newNode, node]);\n\n return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);\n}\n\nfunction createNodes(ownerID, entries, key, value) {\n if (!ownerID) {\n ownerID = new OwnerID();\n }\n var node = new ValueNode(ownerID, hash(key), [key, value]);\n for (var ii = 0; ii < entries.length; ii++) {\n var entry = entries[ii];\n node = node.update(ownerID, 0, undefined, entry[0], entry[1]);\n }\n return node;\n}\n\nfunction packNodes(ownerID, nodes, count, excluding) {\n var bitmap = 0;\n var packedII = 0;\n var packedNodes = new Array(count);\n for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {\n var node = nodes[ii];\n if (node !== undefined && ii !== excluding) {\n bitmap |= bit;\n packedNodes[packedII++] = node;\n }\n }\n return new BitmapIndexedNode(ownerID, bitmap, packedNodes);\n}\n\nfunction expandNodes(ownerID, nodes, bitmap, including, node) {\n var count = 0;\n var expandedNodes = new Array(SIZE);\n for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {\n expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;\n }\n expandedNodes[including] = node;\n return new HashArrayMapNode(ownerID, count + 1, expandedNodes);\n}\n\nfunction popCount(x) {\n x -= (x >> 1) & 0x55555555;\n x = (x & 0x33333333) + ((x >> 2) & 0x33333333);\n x = (x + (x >> 4)) & 0x0f0f0f0f;\n x += x >> 8;\n x += x >> 16;\n return x & 0x7f;\n}\n\nfunction setAt(array, idx, val, canEdit) {\n var newArray = canEdit ? array : arrCopy(array);\n newArray[idx] = val;\n return newArray;\n}\n\nfunction spliceIn(array, idx, val, canEdit) {\n var newLen = array.length + 1;\n if (canEdit && idx + 1 === newLen) {\n array[idx] = val;\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n newArray[ii] = val;\n after = -1;\n } else {\n newArray[ii] = array[ii + after];\n }\n }\n return newArray;\n}\n\nfunction spliceOut(array, idx, canEdit) {\n var newLen = array.length - 1;\n if (canEdit && idx === newLen) {\n array.pop();\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n after = 1;\n }\n newArray[ii] = array[ii + after];\n }\n return newArray;\n}\n\nvar MAX_ARRAY_MAP_SIZE = SIZE / 4;\nvar MAX_BITMAP_INDEXED_SIZE = SIZE / 2;\nvar MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;\n\nvar IS_LIST_SYMBOL = '@@__IMMUTABLE_LIST__@@';\n\nfunction isList(maybeList) {\n return Boolean(maybeList && maybeList[IS_LIST_SYMBOL]);\n}\n\nvar List = /*@__PURE__*/(function (IndexedCollection$$1) {\n function List(value) {\n var empty = emptyList();\n if (value === null || value === undefined) {\n return empty;\n }\n if (isList(value)) {\n return value;\n }\n var iter = IndexedCollection$$1(value);\n var size = iter.size;\n if (size === 0) {\n return empty;\n }\n assertNotInfinite(size);\n if (size > 0 && size < SIZE) {\n return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));\n }\n return empty.withMutations(function (list) {\n list.setSize(size);\n iter.forEach(function (v, i) { return list.set(i, v); });\n });\n }\n\n if ( IndexedCollection$$1 ) List.__proto__ = IndexedCollection$$1;\n List.prototype = Object.create( IndexedCollection$$1 && IndexedCollection$$1.prototype );\n List.prototype.constructor = List;\n\n List.of = function of (/*...values*/) {\n return this(arguments);\n };\n\n List.prototype.toString = function toString () {\n return this.__toString('List [', ']');\n };\n\n // @pragma Access\n\n List.prototype.get = function get (index, notSetValue) {\n index = wrapIndex(this, index);\n if (index >= 0 && index < this.size) {\n index += this._origin;\n var node = listNodeFor(this, index);\n return node && node.array[index & MASK];\n }\n return notSetValue;\n };\n\n // @pragma Modification\n\n List.prototype.set = function set (index, value) {\n return updateList(this, index, value);\n };\n\n List.prototype.remove = function remove (index) {\n return !this.has(index)\n ? this\n : index === 0\n ? this.shift()\n : index === this.size - 1\n ? this.pop()\n : this.splice(index, 1);\n };\n\n List.prototype.insert = function insert (index, value) {\n return this.splice(index, 0, value);\n };\n\n List.prototype.clear = function clear () {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = this._origin = this._capacity = 0;\n this._level = SHIFT;\n this._root = this._tail = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyList();\n };\n\n List.prototype.push = function push (/*...values*/) {\n var values = arguments;\n var oldSize = this.size;\n return this.withMutations(function (list) {\n setListBounds(list, 0, oldSize + values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(oldSize + ii, values[ii]);\n }\n });\n };\n\n List.prototype.pop = function pop () {\n return setListBounds(this, 0, -1);\n };\n\n List.prototype.unshift = function unshift (/*...values*/) {\n var values = arguments;\n return this.withMutations(function (list) {\n setListBounds(list, -values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(ii, values[ii]);\n }\n });\n };\n\n List.prototype.shift = function shift () {\n return setListBounds(this, 1);\n };\n\n // @pragma Composition\n\n List.prototype.concat = function concat (/*...collections*/) {\n var arguments$1 = arguments;\n\n var seqs = [];\n for (var i = 0; i < arguments.length; i++) {\n var argument = arguments$1[i];\n var seq = IndexedCollection$$1(\n typeof argument !== 'string' && hasIterator(argument)\n ? argument\n : [argument]\n );\n if (seq.size !== 0) {\n seqs.push(seq);\n }\n }\n if (seqs.length === 0) {\n return this;\n }\n if (this.size === 0 && !this.__ownerID && seqs.length === 1) {\n return this.constructor(seqs[0]);\n }\n return this.withMutations(function (list) {\n seqs.forEach(function (seq) { return seq.forEach(function (value) { return list.push(value); }); });\n });\n };\n\n List.prototype.setSize = function setSize (size) {\n return setListBounds(this, 0, size);\n };\n\n List.prototype.map = function map (mapper, context) {\n var this$1 = this;\n\n return this.withMutations(function (list) {\n for (var i = 0; i < this$1.size; i++) {\n list.set(i, mapper.call(context, list.get(i), i, list));\n }\n });\n };\n\n // @pragma Iteration\n\n List.prototype.slice = function slice (begin, end) {\n var size = this.size;\n if (wholeSlice(begin, end, size)) {\n return this;\n }\n return setListBounds(\n this,\n resolveBegin(begin, size),\n resolveEnd(end, size)\n );\n };\n\n List.prototype.__iterator = function __iterator (type, reverse) {\n var index = reverse ? this.size : 0;\n var values = iterateList(this, reverse);\n return new Iterator(function () {\n var value = values();\n return value === DONE\n ? iteratorDone()\n : iteratorValue(type, reverse ? --index : index++, value);\n });\n };\n\n List.prototype.__iterate = function __iterate (fn, reverse) {\n var index = reverse ? this.size : 0;\n var values = iterateList(this, reverse);\n var value;\n while ((value = values()) !== DONE) {\n if (fn(value, reverse ? --index : index++, this) === false) {\n break;\n }\n }\n return index;\n };\n\n List.prototype.__ensureOwner = function __ensureOwner (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n if (this.size === 0) {\n return emptyList();\n }\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeList(\n this._origin,\n this._capacity,\n this._level,\n this._root,\n this._tail,\n ownerID,\n this.__hash\n );\n };\n\n return List;\n}(IndexedCollection));\n\nList.isList = isList;\n\nvar ListPrototype = List.prototype;\nListPrototype[IS_LIST_SYMBOL] = true;\nListPrototype[DELETE] = ListPrototype.remove;\nListPrototype.merge = ListPrototype.concat;\nListPrototype.setIn = setIn$1;\nListPrototype.deleteIn = ListPrototype.removeIn = deleteIn;\nListPrototype.update = update$1;\nListPrototype.updateIn = updateIn$1;\nListPrototype.mergeIn = mergeIn;\nListPrototype.mergeDeepIn = mergeDeepIn;\nListPrototype.withMutations = withMutations;\nListPrototype.wasAltered = wasAltered;\nListPrototype.asImmutable = asImmutable;\nListPrototype['@@transducer/init'] = ListPrototype.asMutable = asMutable;\nListPrototype['@@transducer/step'] = function(result, arr) {\n return result.push(arr);\n};\nListPrototype['@@transducer/result'] = function(obj) {\n return obj.asImmutable();\n};\n\nvar VNode = function VNode(array, ownerID) {\n this.array = array;\n this.ownerID = ownerID;\n};\n\n// TODO: seems like these methods are very similar\n\nVNode.prototype.removeBefore = function removeBefore (ownerID, level, index) {\n if (index === level ? 1 << level : this.array.length === 0) {\n return this;\n }\n var originIndex = (index >>> level) & MASK;\n if (originIndex >= this.array.length) {\n return new VNode([], ownerID);\n }\n var removingFirst = originIndex === 0;\n var newChild;\n if (level > 0) {\n var oldChild = this.array[originIndex];\n newChild =\n oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);\n if (newChild === oldChild && removingFirst) {\n return this;\n }\n }\n if (removingFirst && !newChild) {\n return this;\n }\n var editable = editableVNode(this, ownerID);\n if (!removingFirst) {\n for (var ii = 0; ii < originIndex; ii++) {\n editable.array[ii] = undefined;\n }\n }\n if (newChild) {\n editable.array[originIndex] = newChild;\n }\n return editable;\n};\n\nVNode.prototype.removeAfter = function removeAfter (ownerID, level, index) {\n if (index === (level ? 1 << level : 0) || this.array.length === 0) {\n return this;\n }\n var sizeIndex = ((index - 1) >>> level) & MASK;\n if (sizeIndex >= this.array.length) {\n return this;\n }\n\n var newChild;\n if (level > 0) {\n var oldChild = this.array[sizeIndex];\n newChild =\n oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);\n if (newChild === oldChild && sizeIndex === this.array.length - 1) {\n return this;\n }\n }\n\n var editable = editableVNode(this, ownerID);\n editable.array.splice(sizeIndex + 1);\n if (newChild) {\n editable.array[sizeIndex] = newChild;\n }\n return editable;\n};\n\nvar DONE = {};\n\nfunction iterateList(list, reverse) {\n var left = list._origin;\n var right = list._capacity;\n var tailPos = getTailOffset(right);\n var tail = list._tail;\n\n return iterateNodeOrLeaf(list._root, list._level, 0);\n\n function iterateNodeOrLeaf(node, level, offset) {\n return level === 0\n ? iterateLeaf(node, offset)\n : iterateNode(node, level, offset);\n }\n\n function iterateLeaf(node, offset) {\n var array = offset === tailPos ? tail && tail.array : node && node.array;\n var from = offset > left ? 0 : left - offset;\n var to = right - offset;\n if (to > SIZE) {\n to = SIZE;\n }\n return function () {\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n return array && array[idx];\n };\n }\n\n function iterateNode(node, level, offset) {\n var values;\n var array = node && node.array;\n var from = offset > left ? 0 : (left - offset) >> level;\n var to = ((right - offset) >> level) + 1;\n if (to > SIZE) {\n to = SIZE;\n }\n return function () {\n while (true) {\n if (values) {\n var value = values();\n if (value !== DONE) {\n return value;\n }\n values = null;\n }\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n values = iterateNodeOrLeaf(\n array && array[idx],\n level - SHIFT,\n offset + (idx << level)\n );\n }\n };\n }\n}\n\nfunction makeList(origin, capacity, level, root, tail, ownerID, hash) {\n var list = Object.create(ListPrototype);\n list.size = capacity - origin;\n list._origin = origin;\n list._capacity = capacity;\n list._level = level;\n list._root = root;\n list._tail = tail;\n list.__ownerID = ownerID;\n list.__hash = hash;\n list.__altered = false;\n return list;\n}\n\nvar EMPTY_LIST;\nfunction emptyList() {\n return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));\n}\n\nfunction updateList(list, index, value) {\n index = wrapIndex(list, index);\n\n if (index !== index) {\n return list;\n }\n\n if (index >= list.size || index < 0) {\n return list.withMutations(function (list) {\n index < 0\n ? setListBounds(list, index).set(0, value)\n : setListBounds(list, 0, index + 1).set(index, value);\n });\n }\n\n index += list._origin;\n\n var newTail = list._tail;\n var newRoot = list._root;\n var didAlter = MakeRef();\n if (index >= getTailOffset(list._capacity)) {\n newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);\n } else {\n newRoot = updateVNode(\n newRoot,\n list.__ownerID,\n list._level,\n index,\n value,\n didAlter\n );\n }\n\n if (!didAlter.value) {\n return list;\n }\n\n if (list.__ownerID) {\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(list._origin, list._capacity, list._level, newRoot, newTail);\n}\n\nfunction updateVNode(node, ownerID, level, index, value, didAlter) {\n var idx = (index >>> level) & MASK;\n var nodeHas = node && idx < node.array.length;\n if (!nodeHas && value === undefined) {\n return node;\n }\n\n var newNode;\n\n if (level > 0) {\n var lowerNode = node && node.array[idx];\n var newLowerNode = updateVNode(\n lowerNode,\n ownerID,\n level - SHIFT,\n index,\n value,\n didAlter\n );\n if (newLowerNode === lowerNode) {\n return node;\n }\n newNode = editableVNode(node, ownerID);\n newNode.array[idx] = newLowerNode;\n return newNode;\n }\n\n if (nodeHas && node.array[idx] === value) {\n return node;\n }\n\n if (didAlter) {\n SetRef(didAlter);\n }\n\n newNode = editableVNode(node, ownerID);\n if (value === undefined && idx === newNode.array.length - 1) {\n newNode.array.pop();\n } else {\n newNode.array[idx] = value;\n }\n return newNode;\n}\n\nfunction editableVNode(node, ownerID) {\n if (ownerID && node && ownerID === node.ownerID) {\n return node;\n }\n return new VNode(node ? node.array.slice() : [], ownerID);\n}\n\nfunction listNodeFor(list, rawIndex) {\n if (rawIndex >= getTailOffset(list._capacity)) {\n return list._tail;\n }\n if (rawIndex < 1 << (list._level + SHIFT)) {\n var node = list._root;\n var level = list._level;\n while (node && level > 0) {\n node = node.array[(rawIndex >>> level) & MASK];\n level -= SHIFT;\n }\n return node;\n }\n}\n\nfunction setListBounds(list, begin, end) {\n // Sanitize begin & end using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n if (begin !== undefined) {\n begin |= 0;\n }\n if (end !== undefined) {\n end |= 0;\n }\n var owner = list.__ownerID || new OwnerID();\n var oldOrigin = list._origin;\n var oldCapacity = list._capacity;\n var newOrigin = oldOrigin + begin;\n var newCapacity =\n end === undefined\n ? oldCapacity\n : end < 0\n ? oldCapacity + end\n : oldOrigin + end;\n if (newOrigin === oldOrigin && newCapacity === oldCapacity) {\n return list;\n }\n\n // If it's going to end after it starts, it's empty.\n if (newOrigin >= newCapacity) {\n return list.clear();\n }\n\n var newLevel = list._level;\n var newRoot = list._root;\n\n // New origin might need creating a higher root.\n var offsetShift = 0;\n while (newOrigin + offsetShift < 0) {\n newRoot = new VNode(\n newRoot && newRoot.array.length ? [undefined, newRoot] : [],\n owner\n );\n newLevel += SHIFT;\n offsetShift += 1 << newLevel;\n }\n if (offsetShift) {\n newOrigin += offsetShift;\n oldOrigin += offsetShift;\n newCapacity += offsetShift;\n oldCapacity += offsetShift;\n }\n\n var oldTailOffset = getTailOffset(oldCapacity);\n var newTailOffset = getTailOffset(newCapacity);\n\n // New size might need creating a higher root.\n while (newTailOffset >= 1 << (newLevel + SHIFT)) {\n newRoot = new VNode(\n newRoot && newRoot.array.length ? [newRoot] : [],\n owner\n );\n newLevel += SHIFT;\n }\n\n // Locate or create the new tail.\n var oldTail = list._tail;\n var newTail =\n newTailOffset < oldTailOffset\n ? listNodeFor(list, newCapacity - 1)\n : newTailOffset > oldTailOffset\n ? new VNode([], owner)\n : oldTail;\n\n // Merge Tail into tree.\n if (\n oldTail &&\n newTailOffset > oldTailOffset &&\n newOrigin < oldCapacity &&\n oldTail.array.length\n ) {\n newRoot = editableVNode(newRoot, owner);\n var node = newRoot;\n for (var level = newLevel; level > SHIFT; level -= SHIFT) {\n var idx = (oldTailOffset >>> level) & MASK;\n node = node.array[idx] = editableVNode(node.array[idx], owner);\n }\n node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;\n }\n\n // If the size has been reduced, there's a chance the tail needs to be trimmed.\n if (newCapacity < oldCapacity) {\n newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);\n }\n\n // If the new origin is within the tail, then we do not need a root.\n if (newOrigin >= newTailOffset) {\n newOrigin -= newTailOffset;\n newCapacity -= newTailOffset;\n newLevel = SHIFT;\n newRoot = null;\n newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);\n\n // Otherwise, if the root has been trimmed, garbage collect.\n } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {\n offsetShift = 0;\n\n // Identify the new top root node of the subtree of the old root.\n while (newRoot) {\n var beginIndex = (newOrigin >>> newLevel) & MASK;\n if ((beginIndex !== newTailOffset >>> newLevel) & MASK) {\n break;\n }\n if (beginIndex) {\n offsetShift += (1 << newLevel) * beginIndex;\n }\n newLevel -= SHIFT;\n newRoot = newRoot.array[beginIndex];\n }\n\n // Trim the new sides of the new root.\n if (newRoot && newOrigin > oldOrigin) {\n newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);\n }\n if (newRoot && newTailOffset < oldTailOffset) {\n newRoot = newRoot.removeAfter(\n owner,\n newLevel,\n newTailOffset - offsetShift\n );\n }\n if (offsetShift) {\n newOrigin -= offsetShift;\n newCapacity -= offsetShift;\n }\n }\n\n if (list.__ownerID) {\n list.size = newCapacity - newOrigin;\n list._origin = newOrigin;\n list._capacity = newCapacity;\n list._level = newLevel;\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);\n}\n\nfunction getTailOffset(size) {\n return size < SIZE ? 0 : ((size - 1) >>> SHIFT) << SHIFT;\n}\n\nvar OrderedMap = /*@__PURE__*/(function (Map$$1) {\n function OrderedMap(value) {\n return value === null || value === undefined\n ? emptyOrderedMap()\n : isOrderedMap(value)\n ? value\n : emptyOrderedMap().withMutations(function (map) {\n var iter = KeyedCollection(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v, k) { return map.set(k, v); });\n });\n }\n\n if ( Map$$1 ) OrderedMap.__proto__ = Map$$1;\n OrderedMap.prototype = Object.create( Map$$1 && Map$$1.prototype );\n OrderedMap.prototype.constructor = OrderedMap;\n\n OrderedMap.of = function of (/*...values*/) {\n return this(arguments);\n };\n\n OrderedMap.prototype.toString = function toString () {\n return this.__toString('OrderedMap {', '}');\n };\n\n // @pragma Access\n\n OrderedMap.prototype.get = function get (k, notSetValue) {\n var index = this._map.get(k);\n return index !== undefined ? this._list.get(index)[1] : notSetValue;\n };\n\n // @pragma Modification\n\n OrderedMap.prototype.clear = function clear () {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._map.clear();\n this._list.clear();\n return this;\n }\n return emptyOrderedMap();\n };\n\n OrderedMap.prototype.set = function set (k, v) {\n return updateOrderedMap(this, k, v);\n };\n\n OrderedMap.prototype.remove = function remove (k) {\n return updateOrderedMap(this, k, NOT_SET);\n };\n\n OrderedMap.prototype.wasAltered = function wasAltered () {\n return this._map.wasAltered() || this._list.wasAltered();\n };\n\n OrderedMap.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1 = this;\n\n return this._list.__iterate(\n function (entry) { return entry && fn(entry[1], entry[0], this$1); },\n reverse\n );\n };\n\n OrderedMap.prototype.__iterator = function __iterator (type, reverse) {\n return this._list.fromEntrySeq().__iterator(type, reverse);\n };\n\n OrderedMap.prototype.__ensureOwner = function __ensureOwner (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n var newList = this._list.__ensureOwner(ownerID);\n if (!ownerID) {\n if (this.size === 0) {\n return emptyOrderedMap();\n }\n this.__ownerID = ownerID;\n this._map = newMap;\n this._list = newList;\n return this;\n }\n return makeOrderedMap(newMap, newList, ownerID, this.__hash);\n };\n\n return OrderedMap;\n}(Map));\n\nOrderedMap.isOrderedMap = isOrderedMap;\n\nOrderedMap.prototype[IS_ORDERED_SYMBOL] = true;\nOrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;\n\nfunction makeOrderedMap(map, list, ownerID, hash) {\n var omap = Object.create(OrderedMap.prototype);\n omap.size = map ? map.size : 0;\n omap._map = map;\n omap._list = list;\n omap.__ownerID = ownerID;\n omap.__hash = hash;\n return omap;\n}\n\nvar EMPTY_ORDERED_MAP;\nfunction emptyOrderedMap() {\n return (\n EMPTY_ORDERED_MAP ||\n (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()))\n );\n}\n\nfunction updateOrderedMap(omap, k, v) {\n var map = omap._map;\n var list = omap._list;\n var i = map.get(k);\n var has = i !== undefined;\n var newMap;\n var newList;\n if (v === NOT_SET) {\n // removed\n if (!has) {\n return omap;\n }\n if (list.size >= SIZE && list.size >= map.size * 2) {\n newList = list.filter(function (entry, idx) { return entry !== undefined && i !== idx; });\n newMap = newList\n .toKeyedSeq()\n .map(function (entry) { return entry[0]; })\n .flip()\n .toMap();\n if (omap.__ownerID) {\n newMap.__ownerID = newList.__ownerID = omap.__ownerID;\n }\n } else {\n newMap = map.remove(k);\n newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);\n }\n } else if (has) {\n if (v === list.get(i)[1]) {\n return omap;\n }\n newMap = map;\n newList = list.set(i, [k, v]);\n } else {\n newMap = map.set(k, list.size);\n newList = list.set(list.size, [k, v]);\n }\n if (omap.__ownerID) {\n omap.size = newMap.size;\n omap._map = newMap;\n omap._list = newList;\n omap.__hash = undefined;\n return omap;\n }\n return makeOrderedMap(newMap, newList);\n}\n\nvar IS_STACK_SYMBOL = '@@__IMMUTABLE_STACK__@@';\n\nfunction isStack(maybeStack) {\n return Boolean(maybeStack && maybeStack[IS_STACK_SYMBOL]);\n}\n\nvar Stack = /*@__PURE__*/(function (IndexedCollection$$1) {\n function Stack(value) {\n return value === null || value === undefined\n ? emptyStack()\n : isStack(value)\n ? value\n : emptyStack().pushAll(value);\n }\n\n if ( IndexedCollection$$1 ) Stack.__proto__ = IndexedCollection$$1;\n Stack.prototype = Object.create( IndexedCollection$$1 && IndexedCollection$$1.prototype );\n Stack.prototype.constructor = Stack;\n\n Stack.of = function of (/*...values*/) {\n return this(arguments);\n };\n\n Stack.prototype.toString = function toString () {\n return this.__toString('Stack [', ']');\n };\n\n // @pragma Access\n\n Stack.prototype.get = function get (index, notSetValue) {\n var head = this._head;\n index = wrapIndex(this, index);\n while (head && index--) {\n head = head.next;\n }\n return head ? head.value : notSetValue;\n };\n\n Stack.prototype.peek = function peek () {\n return this._head && this._head.value;\n };\n\n // @pragma Modification\n\n Stack.prototype.push = function push (/*...values*/) {\n var arguments$1 = arguments;\n\n if (arguments.length === 0) {\n return this;\n }\n var newSize = this.size + arguments.length;\n var head = this._head;\n for (var ii = arguments.length - 1; ii >= 0; ii--) {\n head = {\n value: arguments$1[ii],\n next: head,\n };\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n Stack.prototype.pushAll = function pushAll (iter) {\n iter = IndexedCollection$$1(iter);\n if (iter.size === 0) {\n return this;\n }\n if (this.size === 0 && isStack(iter)) {\n return iter;\n }\n assertNotInfinite(iter.size);\n var newSize = this.size;\n var head = this._head;\n iter.__iterate(function (value) {\n newSize++;\n head = {\n value: value,\n next: head,\n };\n }, /* reverse */ true);\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n Stack.prototype.pop = function pop () {\n return this.slice(1);\n };\n\n Stack.prototype.clear = function clear () {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._head = undefined;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyStack();\n };\n\n Stack.prototype.slice = function slice (begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n var resolvedBegin = resolveBegin(begin, this.size);\n var resolvedEnd = resolveEnd(end, this.size);\n if (resolvedEnd !== this.size) {\n // super.slice(begin, end);\n return IndexedCollection$$1.prototype.slice.call(this, begin, end);\n }\n var newSize = this.size - resolvedBegin;\n var head = this._head;\n while (resolvedBegin--) {\n head = head.next;\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n // @pragma Mutability\n\n Stack.prototype.__ensureOwner = function __ensureOwner (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n if (this.size === 0) {\n return emptyStack();\n }\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeStack(this.size, this._head, ownerID, this.__hash);\n };\n\n // @pragma Iteration\n\n Stack.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1 = this;\n\n if (reverse) {\n return new ArraySeq(this.toArray()).__iterate(\n function (v, k) { return fn(v, k, this$1); },\n reverse\n );\n }\n var iterations = 0;\n var node = this._head;\n while (node) {\n if (fn(node.value, iterations++, this) === false) {\n break;\n }\n node = node.next;\n }\n return iterations;\n };\n\n Stack.prototype.__iterator = function __iterator (type, reverse) {\n if (reverse) {\n return new ArraySeq(this.toArray()).__iterator(type, reverse);\n }\n var iterations = 0;\n var node = this._head;\n return new Iterator(function () {\n if (node) {\n var value = node.value;\n node = node.next;\n return iteratorValue(type, iterations++, value);\n }\n return iteratorDone();\n });\n };\n\n return Stack;\n}(IndexedCollection));\n\nStack.isStack = isStack;\n\nvar StackPrototype = Stack.prototype;\nStackPrototype[IS_STACK_SYMBOL] = true;\nStackPrototype.shift = StackPrototype.pop;\nStackPrototype.unshift = StackPrototype.push;\nStackPrototype.unshiftAll = StackPrototype.pushAll;\nStackPrototype.withMutations = withMutations;\nStackPrototype.wasAltered = wasAltered;\nStackPrototype.asImmutable = asImmutable;\nStackPrototype['@@transducer/init'] = StackPrototype.asMutable = asMutable;\nStackPrototype['@@transducer/step'] = function(result, arr) {\n return result.unshift(arr);\n};\nStackPrototype['@@transducer/result'] = function(obj) {\n return obj.asImmutable();\n};\n\nfunction makeStack(size, head, ownerID, hash) {\n var map = Object.create(StackPrototype);\n map.size = size;\n map._head = head;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n}\n\nvar EMPTY_STACK;\nfunction emptyStack() {\n return EMPTY_STACK || (EMPTY_STACK = makeStack(0));\n}\n\nvar IS_SET_SYMBOL = '@@__IMMUTABLE_SET__@@';\n\nfunction isSet(maybeSet) {\n return Boolean(maybeSet && maybeSet[IS_SET_SYMBOL]);\n}\n\nfunction isOrderedSet(maybeOrderedSet) {\n return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);\n}\n\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (\n !isCollection(b) ||\n (a.size !== undefined && b.size !== undefined && a.size !== b.size) ||\n (a.__hash !== undefined &&\n b.__hash !== undefined &&\n a.__hash !== b.__hash) ||\n isKeyed(a) !== isKeyed(b) ||\n isIndexed(a) !== isIndexed(b) ||\n isOrdered(a) !== isOrdered(b)\n ) {\n return false;\n }\n\n if (a.size === 0 && b.size === 0) {\n return true;\n }\n\n var notAssociative = !isAssociative(a);\n\n if (isOrdered(a)) {\n var entries = a.entries();\n return (\n b.every(function (v, k) {\n var entry = entries.next().value;\n return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));\n }) && entries.next().done\n );\n }\n\n var flipped = false;\n\n if (a.size === undefined) {\n if (b.size === undefined) {\n if (typeof a.cacheResult === 'function') {\n a.cacheResult();\n }\n } else {\n flipped = true;\n var _ = a;\n a = b;\n b = _;\n }\n }\n\n var allEqual = true;\n var bSize = b.__iterate(function (v, k) {\n if (\n notAssociative\n ? !a.has(v)\n : flipped\n ? !is(v, a.get(k, NOT_SET))\n : !is(a.get(k, NOT_SET), v)\n ) {\n allEqual = false;\n return false;\n }\n });\n\n return allEqual && a.size === bSize;\n}\n\n/**\n * Contributes additional methods to a constructor\n */\nfunction mixin(ctor, methods) {\n var keyCopier = function (key) {\n ctor.prototype[key] = methods[key];\n };\n Object.keys(methods).forEach(keyCopier);\n Object.getOwnPropertySymbols &&\n Object.getOwnPropertySymbols(methods).forEach(keyCopier);\n return ctor;\n}\n\nfunction toJS(value) {\n if (!value || typeof value !== 'object') {\n return value;\n }\n if (!isCollection(value)) {\n if (!isDataStructure(value)) {\n return value;\n }\n value = Seq(value);\n }\n if (isKeyed(value)) {\n var result$1 = {};\n value.__iterate(function (v, k) {\n result$1[k] = toJS(v);\n });\n return result$1;\n }\n var result = [];\n value.__iterate(function (v) {\n result.push(toJS(v));\n });\n return result;\n}\n\nvar Set = /*@__PURE__*/(function (SetCollection$$1) {\n function Set(value) {\n return value === null || value === undefined\n ? emptySet()\n : isSet(value) && !isOrdered(value)\n ? value\n : emptySet().withMutations(function (set) {\n var iter = SetCollection$$1(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v) { return set.add(v); });\n });\n }\n\n if ( SetCollection$$1 ) Set.__proto__ = SetCollection$$1;\n Set.prototype = Object.create( SetCollection$$1 && SetCollection$$1.prototype );\n Set.prototype.constructor = Set;\n\n Set.of = function of (/*...values*/) {\n return this(arguments);\n };\n\n Set.fromKeys = function fromKeys (value) {\n return this(KeyedCollection(value).keySeq());\n };\n\n Set.intersect = function intersect (sets) {\n sets = Collection(sets).toArray();\n return sets.length\n ? SetPrototype.intersect.apply(Set(sets.pop()), sets)\n : emptySet();\n };\n\n Set.union = function union (sets) {\n sets = Collection(sets).toArray();\n return sets.length\n ? SetPrototype.union.apply(Set(sets.pop()), sets)\n : emptySet();\n };\n\n Set.prototype.toString = function toString () {\n return this.__toString('Set {', '}');\n };\n\n // @pragma Access\n\n Set.prototype.has = function has (value) {\n return this._map.has(value);\n };\n\n // @pragma Modification\n\n Set.prototype.add = function add (value) {\n return updateSet(this, this._map.set(value, value));\n };\n\n Set.prototype.remove = function remove (value) {\n return updateSet(this, this._map.remove(value));\n };\n\n Set.prototype.clear = function clear () {\n return updateSet(this, this._map.clear());\n };\n\n // @pragma Composition\n\n Set.prototype.map = function map (mapper, context) {\n var this$1 = this;\n\n var removes = [];\n var adds = [];\n this.forEach(function (value) {\n var mapped = mapper.call(context, value, value, this$1);\n if (mapped !== value) {\n removes.push(value);\n adds.push(mapped);\n }\n });\n return this.withMutations(function (set) {\n removes.forEach(function (value) { return set.remove(value); });\n adds.forEach(function (value) { return set.add(value); });\n });\n };\n\n Set.prototype.union = function union () {\n var iters = [], len = arguments.length;\n while ( len-- ) iters[ len ] = arguments[ len ];\n\n iters = iters.filter(function (x) { return x.size !== 0; });\n if (iters.length === 0) {\n return this;\n }\n if (this.size === 0 && !this.__ownerID && iters.length === 1) {\n return this.constructor(iters[0]);\n }\n return this.withMutations(function (set) {\n for (var ii = 0; ii < iters.length; ii++) {\n SetCollection$$1(iters[ii]).forEach(function (value) { return set.add(value); });\n }\n });\n };\n\n Set.prototype.intersect = function intersect () {\n var iters = [], len = arguments.length;\n while ( len-- ) iters[ len ] = arguments[ len ];\n\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function (iter) { return SetCollection$$1(iter); });\n var toRemove = [];\n this.forEach(function (value) {\n if (!iters.every(function (iter) { return iter.includes(value); })) {\n toRemove.push(value);\n }\n });\n return this.withMutations(function (set) {\n toRemove.forEach(function (value) {\n set.remove(value);\n });\n });\n };\n\n Set.prototype.subtract = function subtract () {\n var iters = [], len = arguments.length;\n while ( len-- ) iters[ len ] = arguments[ len ];\n\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function (iter) { return SetCollection$$1(iter); });\n var toRemove = [];\n this.forEach(function (value) {\n if (iters.some(function (iter) { return iter.includes(value); })) {\n toRemove.push(value);\n }\n });\n return this.withMutations(function (set) {\n toRemove.forEach(function (value) {\n set.remove(value);\n });\n });\n };\n\n Set.prototype.sort = function sort (comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator));\n };\n\n Set.prototype.sortBy = function sortBy (mapper, comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator, mapper));\n };\n\n Set.prototype.wasAltered = function wasAltered () {\n return this._map.wasAltered();\n };\n\n Set.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1 = this;\n\n return this._map.__iterate(function (k) { return fn(k, k, this$1); }, reverse);\n };\n\n Set.prototype.__iterator = function __iterator (type, reverse) {\n return this._map.__iterator(type, reverse);\n };\n\n Set.prototype.__ensureOwner = function __ensureOwner (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n if (!ownerID) {\n if (this.size === 0) {\n return this.__empty();\n }\n this.__ownerID = ownerID;\n this._map = newMap;\n return this;\n }\n return this.__make(newMap, ownerID);\n };\n\n return Set;\n}(SetCollection));\n\nSet.isSet = isSet;\n\nvar SetPrototype = Set.prototype;\nSetPrototype[IS_SET_SYMBOL] = true;\nSetPrototype[DELETE] = SetPrototype.remove;\nSetPrototype.merge = SetPrototype.concat = SetPrototype.union;\nSetPrototype.withMutations = withMutations;\nSetPrototype.asImmutable = asImmutable;\nSetPrototype['@@transducer/init'] = SetPrototype.asMutable = asMutable;\nSetPrototype['@@transducer/step'] = function(result, arr) {\n return result.add(arr);\n};\nSetPrototype['@@transducer/result'] = function(obj) {\n return obj.asImmutable();\n};\n\nSetPrototype.__empty = emptySet;\nSetPrototype.__make = makeSet;\n\nfunction updateSet(set, newMap) {\n if (set.__ownerID) {\n set.size = newMap.size;\n set._map = newMap;\n return set;\n }\n return newMap === set._map\n ? set\n : newMap.size === 0\n ? set.__empty()\n : set.__make(newMap);\n}\n\nfunction makeSet(map, ownerID) {\n var set = Object.create(SetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n}\n\nvar EMPTY_SET;\nfunction emptySet() {\n return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));\n}\n\n/**\n * Returns a lazy seq of nums from start (inclusive) to end\n * (exclusive), by step, where start defaults to 0, step to 1, and end to\n * infinity. When start is equal to end, returns empty list.\n */\nvar Range = /*@__PURE__*/(function (IndexedSeq$$1) {\n function Range(start, end, step) {\n if (!(this instanceof Range)) {\n return new Range(start, end, step);\n }\n invariant(step !== 0, 'Cannot step a Range by 0');\n start = start || 0;\n if (end === undefined) {\n end = Infinity;\n }\n step = step === undefined ? 1 : Math.abs(step);\n if (end < start) {\n step = -step;\n }\n this._start = start;\n this._end = end;\n this._step = step;\n this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);\n if (this.size === 0) {\n if (EMPTY_RANGE) {\n return EMPTY_RANGE;\n }\n EMPTY_RANGE = this;\n }\n }\n\n if ( IndexedSeq$$1 ) Range.__proto__ = IndexedSeq$$1;\n Range.prototype = Object.create( IndexedSeq$$1 && IndexedSeq$$1.prototype );\n Range.prototype.constructor = Range;\n\n Range.prototype.toString = function toString () {\n if (this.size === 0) {\n return 'Range []';\n }\n return (\n 'Range [ ' +\n this._start +\n '...' +\n this._end +\n (this._step !== 1 ? ' by ' + this._step : '') +\n ' ]'\n );\n };\n\n Range.prototype.get = function get (index, notSetValue) {\n return this.has(index)\n ? this._start + wrapIndex(this, index) * this._step\n : notSetValue;\n };\n\n Range.prototype.includes = function includes (searchValue) {\n var possibleIndex = (searchValue - this._start) / this._step;\n return (\n possibleIndex >= 0 &&\n possibleIndex < this.size &&\n possibleIndex === Math.floor(possibleIndex)\n );\n };\n\n Range.prototype.slice = function slice (begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n begin = resolveBegin(begin, this.size);\n end = resolveEnd(end, this.size);\n if (end <= begin) {\n return new Range(0, 0);\n }\n return new Range(\n this.get(begin, this._end),\n this.get(end, this._end),\n this._step\n );\n };\n\n Range.prototype.indexOf = function indexOf (searchValue) {\n var offsetValue = searchValue - this._start;\n if (offsetValue % this._step === 0) {\n var index = offsetValue / this._step;\n if (index >= 0 && index < this.size) {\n return index;\n }\n }\n return -1;\n };\n\n Range.prototype.lastIndexOf = function lastIndexOf (searchValue) {\n return this.indexOf(searchValue);\n };\n\n Range.prototype.__iterate = function __iterate (fn, reverse) {\n var size = this.size;\n var step = this._step;\n var value = reverse ? this._start + (size - 1) * step : this._start;\n var i = 0;\n while (i !== size) {\n if (fn(value, reverse ? size - ++i : i++, this) === false) {\n break;\n }\n value += reverse ? -step : step;\n }\n return i;\n };\n\n Range.prototype.__iterator = function __iterator (type, reverse) {\n var size = this.size;\n var step = this._step;\n var value = reverse ? this._start + (size - 1) * step : this._start;\n var i = 0;\n return new Iterator(function () {\n if (i === size) {\n return iteratorDone();\n }\n var v = value;\n value += reverse ? -step : step;\n return iteratorValue(type, reverse ? size - ++i : i++, v);\n });\n };\n\n Range.prototype.equals = function equals (other) {\n return other instanceof Range\n ? this._start === other._start &&\n this._end === other._end &&\n this._step === other._step\n : deepEqual(this, other);\n };\n\n return Range;\n}(IndexedSeq));\n\nvar EMPTY_RANGE;\n\nfunction getIn(collection, searchKeyPath, notSetValue) {\n var keyPath = coerceKeyPath(searchKeyPath);\n var i = 0;\n while (i !== keyPath.length) {\n collection = get(collection, keyPath[i++], NOT_SET);\n if (collection === NOT_SET) {\n return notSetValue;\n }\n }\n return collection;\n}\n\nfunction getIn$1(searchKeyPath, notSetValue) {\n return getIn(this, searchKeyPath, notSetValue);\n}\n\nfunction hasIn(collection, keyPath) {\n return getIn(collection, keyPath, NOT_SET) !== NOT_SET;\n}\n\nfunction hasIn$1(searchKeyPath) {\n return hasIn(this, searchKeyPath);\n}\n\nfunction toObject() {\n assertNotInfinite(this.size);\n var object = {};\n this.__iterate(function (v, k) {\n object[k] = v;\n });\n return object;\n}\n\n// Note: all of these methods are deprecated.\nCollection.isIterable = isCollection;\nCollection.isKeyed = isKeyed;\nCollection.isIndexed = isIndexed;\nCollection.isAssociative = isAssociative;\nCollection.isOrdered = isOrdered;\n\nCollection.Iterator = Iterator;\n\nmixin(Collection, {\n // ### Conversion to other types\n\n toArray: function toArray() {\n assertNotInfinite(this.size);\n var array = new Array(this.size || 0);\n var useTuples = isKeyed(this);\n var i = 0;\n this.__iterate(function (v, k) {\n // Keyed collections produce an array of tuples.\n array[i++] = useTuples ? [k, v] : v;\n });\n return array;\n },\n\n toIndexedSeq: function toIndexedSeq() {\n return new ToIndexedSequence(this);\n },\n\n toJS: function toJS$1() {\n return toJS(this);\n },\n\n toKeyedSeq: function toKeyedSeq() {\n return new ToKeyedSequence(this, true);\n },\n\n toMap: function toMap() {\n // Use Late Binding here to solve the circular dependency.\n return Map(this.toKeyedSeq());\n },\n\n toObject: toObject,\n\n toOrderedMap: function toOrderedMap() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedMap(this.toKeyedSeq());\n },\n\n toOrderedSet: function toOrderedSet() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedSet(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toSet: function toSet() {\n // Use Late Binding here to solve the circular dependency.\n return Set(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toSetSeq: function toSetSeq() {\n return new ToSetSequence(this);\n },\n\n toSeq: function toSeq() {\n return isIndexed(this)\n ? this.toIndexedSeq()\n : isKeyed(this)\n ? this.toKeyedSeq()\n : this.toSetSeq();\n },\n\n toStack: function toStack() {\n // Use Late Binding here to solve the circular dependency.\n return Stack(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toList: function toList() {\n // Use Late Binding here to solve the circular dependency.\n return List(isKeyed(this) ? this.valueSeq() : this);\n },\n\n // ### Common JavaScript methods and properties\n\n toString: function toString() {\n return '[Collection]';\n },\n\n __toString: function __toString(head, tail) {\n if (this.size === 0) {\n return head + tail;\n }\n return (\n head +\n ' ' +\n this.toSeq()\n .map(this.__toStringMapper)\n .join(', ') +\n ' ' +\n tail\n );\n },\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n concat: function concat() {\n var values = [], len = arguments.length;\n while ( len-- ) values[ len ] = arguments[ len ];\n\n return reify(this, concatFactory(this, values));\n },\n\n includes: function includes(searchValue) {\n return this.some(function (value) { return is(value, searchValue); });\n },\n\n entries: function entries() {\n return this.__iterator(ITERATE_ENTRIES);\n },\n\n every: function every(predicate, context) {\n assertNotInfinite(this.size);\n var returnValue = true;\n this.__iterate(function (v, k, c) {\n if (!predicate.call(context, v, k, c)) {\n returnValue = false;\n return false;\n }\n });\n return returnValue;\n },\n\n filter: function filter(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, true));\n },\n\n find: function find(predicate, context, notSetValue) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[1] : notSetValue;\n },\n\n forEach: function forEach(sideEffect, context) {\n assertNotInfinite(this.size);\n return this.__iterate(context ? sideEffect.bind(context) : sideEffect);\n },\n\n join: function join(separator) {\n assertNotInfinite(this.size);\n separator = separator !== undefined ? '' + separator : ',';\n var joined = '';\n var isFirst = true;\n this.__iterate(function (v) {\n isFirst ? (isFirst = false) : (joined += separator);\n joined += v !== null && v !== undefined ? v.toString() : '';\n });\n return joined;\n },\n\n keys: function keys() {\n return this.__iterator(ITERATE_KEYS);\n },\n\n map: function map(mapper, context) {\n return reify(this, mapFactory(this, mapper, context));\n },\n\n reduce: function reduce$1(reducer, initialReduction, context) {\n return reduce(\n this,\n reducer,\n initialReduction,\n context,\n arguments.length < 2,\n false\n );\n },\n\n reduceRight: function reduceRight(reducer, initialReduction, context) {\n return reduce(\n this,\n reducer,\n initialReduction,\n context,\n arguments.length < 2,\n true\n );\n },\n\n reverse: function reverse() {\n return reify(this, reverseFactory(this, true));\n },\n\n slice: function slice(begin, end) {\n return reify(this, sliceFactory(this, begin, end, true));\n },\n\n some: function some(predicate, context) {\n return !this.every(not(predicate), context);\n },\n\n sort: function sort(comparator) {\n return reify(this, sortFactory(this, comparator));\n },\n\n values: function values() {\n return this.__iterator(ITERATE_VALUES);\n },\n\n // ### More sequential methods\n\n butLast: function butLast() {\n return this.slice(0, -1);\n },\n\n isEmpty: function isEmpty() {\n return this.size !== undefined ? this.size === 0 : !this.some(function () { return true; });\n },\n\n count: function count(predicate, context) {\n return ensureSize(\n predicate ? this.toSeq().filter(predicate, context) : this\n );\n },\n\n countBy: function countBy(grouper, context) {\n return countByFactory(this, grouper, context);\n },\n\n equals: function equals(other) {\n return deepEqual(this, other);\n },\n\n entrySeq: function entrySeq() {\n var collection = this;\n if (collection._cache) {\n // We cache as an entries array, so we can just return the cache!\n return new ArraySeq(collection._cache);\n }\n var entriesSequence = collection\n .toSeq()\n .map(entryMapper)\n .toIndexedSeq();\n entriesSequence.fromEntrySeq = function () { return collection.toSeq(); };\n return entriesSequence;\n },\n\n filterNot: function filterNot(predicate, context) {\n return this.filter(not(predicate), context);\n },\n\n findEntry: function findEntry(predicate, context, notSetValue) {\n var found = notSetValue;\n this.__iterate(function (v, k, c) {\n if (predicate.call(context, v, k, c)) {\n found = [k, v];\n return false;\n }\n });\n return found;\n },\n\n findKey: function findKey(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry && entry[0];\n },\n\n findLast: function findLast(predicate, context, notSetValue) {\n return this.toKeyedSeq()\n .reverse()\n .find(predicate, context, notSetValue);\n },\n\n findLastEntry: function findLastEntry(predicate, context, notSetValue) {\n return this.toKeyedSeq()\n .reverse()\n .findEntry(predicate, context, notSetValue);\n },\n\n findLastKey: function findLastKey(predicate, context) {\n return this.toKeyedSeq()\n .reverse()\n .findKey(predicate, context);\n },\n\n first: function first(notSetValue) {\n return this.find(returnTrue, null, notSetValue);\n },\n\n flatMap: function flatMap(mapper, context) {\n return reify(this, flatMapFactory(this, mapper, context));\n },\n\n flatten: function flatten(depth) {\n return reify(this, flattenFactory(this, depth, true));\n },\n\n fromEntrySeq: function fromEntrySeq() {\n return new FromEntriesSequence(this);\n },\n\n get: function get(searchKey, notSetValue) {\n return this.find(function (_, key) { return is(key, searchKey); }, undefined, notSetValue);\n },\n\n getIn: getIn$1,\n\n groupBy: function groupBy(grouper, context) {\n return groupByFactory(this, grouper, context);\n },\n\n has: function has(searchKey) {\n return this.get(searchKey, NOT_SET) !== NOT_SET;\n },\n\n hasIn: hasIn$1,\n\n isSubset: function isSubset(iter) {\n iter = typeof iter.includes === 'function' ? iter : Collection(iter);\n return this.every(function (value) { return iter.includes(value); });\n },\n\n isSuperset: function isSuperset(iter) {\n iter = typeof iter.isSubset === 'function' ? iter : Collection(iter);\n return iter.isSubset(this);\n },\n\n keyOf: function keyOf(searchValue) {\n return this.findKey(function (value) { return is(value, searchValue); });\n },\n\n keySeq: function keySeq() {\n return this.toSeq()\n .map(keyMapper)\n .toIndexedSeq();\n },\n\n last: function last(notSetValue) {\n return this.toSeq()\n .reverse()\n .first(notSetValue);\n },\n\n lastKeyOf: function lastKeyOf(searchValue) {\n return this.toKeyedSeq()\n .reverse()\n .keyOf(searchValue);\n },\n\n max: function max(comparator) {\n return maxFactory(this, comparator);\n },\n\n maxBy: function maxBy(mapper, comparator) {\n return maxFactory(this, comparator, mapper);\n },\n\n min: function min(comparator) {\n return maxFactory(\n this,\n comparator ? neg(comparator) : defaultNegComparator\n );\n },\n\n minBy: function minBy(mapper, comparator) {\n return maxFactory(\n this,\n comparator ? neg(comparator) : defaultNegComparator,\n mapper\n );\n },\n\n rest: function rest() {\n return this.slice(1);\n },\n\n skip: function skip(amount) {\n return amount === 0 ? this : this.slice(Math.max(0, amount));\n },\n\n skipLast: function skipLast(amount) {\n return amount === 0 ? this : this.slice(0, -Math.max(0, amount));\n },\n\n skipWhile: function skipWhile(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, true));\n },\n\n skipUntil: function skipUntil(predicate, context) {\n return this.skipWhile(not(predicate), context);\n },\n\n sortBy: function sortBy(mapper, comparator) {\n return reify(this, sortFactory(this, comparator, mapper));\n },\n\n take: function take(amount) {\n return this.slice(0, Math.max(0, amount));\n },\n\n takeLast: function takeLast(amount) {\n return this.slice(-Math.max(0, amount));\n },\n\n takeWhile: function takeWhile(predicate, context) {\n return reify(this, takeWhileFactory(this, predicate, context));\n },\n\n takeUntil: function takeUntil(predicate, context) {\n return this.takeWhile(not(predicate), context);\n },\n\n update: function update(fn) {\n return fn(this);\n },\n\n valueSeq: function valueSeq() {\n return this.toIndexedSeq();\n },\n\n // ### Hashable Object\n\n hashCode: function hashCode() {\n return this.__hash || (this.__hash = hashCollection(this));\n },\n\n // ### Internal\n\n // abstract __iterate(fn, reverse)\n\n // abstract __iterator(type, reverse)\n});\n\nvar CollectionPrototype = Collection.prototype;\nCollectionPrototype[IS_COLLECTION_SYMBOL] = true;\nCollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.values;\nCollectionPrototype.toJSON = CollectionPrototype.toArray;\nCollectionPrototype.__toStringMapper = quoteString;\nCollectionPrototype.inspect = CollectionPrototype.toSource = function() {\n return this.toString();\n};\nCollectionPrototype.chain = CollectionPrototype.flatMap;\nCollectionPrototype.contains = CollectionPrototype.includes;\n\nmixin(KeyedCollection, {\n // ### More sequential methods\n\n flip: function flip() {\n return reify(this, flipFactory(this));\n },\n\n mapEntries: function mapEntries(mapper, context) {\n var this$1 = this;\n\n var iterations = 0;\n return reify(\n this,\n this.toSeq()\n .map(function (v, k) { return mapper.call(context, [k, v], iterations++, this$1); })\n .fromEntrySeq()\n );\n },\n\n mapKeys: function mapKeys(mapper, context) {\n var this$1 = this;\n\n return reify(\n this,\n this.toSeq()\n .flip()\n .map(function (k, v) { return mapper.call(context, k, v, this$1); })\n .flip()\n );\n },\n});\n\nvar KeyedCollectionPrototype = KeyedCollection.prototype;\nKeyedCollectionPrototype[IS_KEYED_SYMBOL] = true;\nKeyedCollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.entries;\nKeyedCollectionPrototype.toJSON = toObject;\nKeyedCollectionPrototype.__toStringMapper = function (v, k) { return quoteString(k) + ': ' + quoteString(v); };\n\nmixin(IndexedCollection, {\n // ### Conversion to other types\n\n toKeyedSeq: function toKeyedSeq() {\n return new ToKeyedSequence(this, false);\n },\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n filter: function filter(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, false));\n },\n\n findIndex: function findIndex(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n\n indexOf: function indexOf(searchValue) {\n var key = this.keyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n\n lastIndexOf: function lastIndexOf(searchValue) {\n var key = this.lastKeyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n\n reverse: function reverse() {\n return reify(this, reverseFactory(this, false));\n },\n\n slice: function slice(begin, end) {\n return reify(this, sliceFactory(this, begin, end, false));\n },\n\n splice: function splice(index, removeNum /*, ...values*/) {\n var numArgs = arguments.length;\n removeNum = Math.max(removeNum || 0, 0);\n if (numArgs === 0 || (numArgs === 2 && !removeNum)) {\n return this;\n }\n // If index is negative, it should resolve relative to the size of the\n // collection. However size may be expensive to compute if not cached, so\n // only call count() if the number is in fact negative.\n index = resolveBegin(index, index < 0 ? this.count() : this.size);\n var spliced = this.slice(0, index);\n return reify(\n this,\n numArgs === 1\n ? spliced\n : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum))\n );\n },\n\n // ### More collection methods\n\n findLastIndex: function findLastIndex(predicate, context) {\n var entry = this.findLastEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n\n first: function first(notSetValue) {\n return this.get(0, notSetValue);\n },\n\n flatten: function flatten(depth) {\n return reify(this, flattenFactory(this, depth, false));\n },\n\n get: function get(index, notSetValue) {\n index = wrapIndex(this, index);\n return index < 0 ||\n (this.size === Infinity || (this.size !== undefined && index > this.size))\n ? notSetValue\n : this.find(function (_, key) { return key === index; }, undefined, notSetValue);\n },\n\n has: function has(index) {\n index = wrapIndex(this, index);\n return (\n index >= 0 &&\n (this.size !== undefined\n ? this.size === Infinity || index < this.size\n : this.indexOf(index) !== -1)\n );\n },\n\n interpose: function interpose(separator) {\n return reify(this, interposeFactory(this, separator));\n },\n\n interleave: function interleave(/*...collections*/) {\n var collections = [this].concat(arrCopy(arguments));\n var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, collections);\n var interleaved = zipped.flatten(true);\n if (zipped.size) {\n interleaved.size = zipped.size * collections.length;\n }\n return reify(this, interleaved);\n },\n\n keySeq: function keySeq() {\n return Range(0, this.size);\n },\n\n last: function last(notSetValue) {\n return this.get(-1, notSetValue);\n },\n\n skipWhile: function skipWhile(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, false));\n },\n\n zip: function zip(/*, ...collections */) {\n var collections = [this].concat(arrCopy(arguments));\n return reify(this, zipWithFactory(this, defaultZipper, collections));\n },\n\n zipAll: function zipAll(/*, ...collections */) {\n var collections = [this].concat(arrCopy(arguments));\n return reify(this, zipWithFactory(this, defaultZipper, collections, true));\n },\n\n zipWith: function zipWith(zipper /*, ...collections */) {\n var collections = arrCopy(arguments);\n collections[0] = this;\n return reify(this, zipWithFactory(this, zipper, collections));\n },\n});\n\nvar IndexedCollectionPrototype = IndexedCollection.prototype;\nIndexedCollectionPrototype[IS_INDEXED_SYMBOL] = true;\nIndexedCollectionPrototype[IS_ORDERED_SYMBOL] = true;\n\nmixin(SetCollection, {\n // ### ES6 Collection methods (ES6 Array and Map)\n\n get: function get(value, notSetValue) {\n return this.has(value) ? value : notSetValue;\n },\n\n includes: function includes(value) {\n return this.has(value);\n },\n\n // ### More sequential methods\n\n keySeq: function keySeq() {\n return this.valueSeq();\n },\n});\n\nSetCollection.prototype.has = CollectionPrototype.includes;\nSetCollection.prototype.contains = SetCollection.prototype.includes;\n\n// Mixin subclasses\n\nmixin(KeyedSeq, KeyedCollection.prototype);\nmixin(IndexedSeq, IndexedCollection.prototype);\nmixin(SetSeq, SetCollection.prototype);\n\n// #pragma Helper functions\n\nfunction reduce(collection, reducer, reduction, context, useFirst, reverse) {\n assertNotInfinite(collection.size);\n collection.__iterate(function (v, k, c) {\n if (useFirst) {\n useFirst = false;\n reduction = v;\n } else {\n reduction = reducer.call(context, reduction, v, k, c);\n }\n }, reverse);\n return reduction;\n}\n\nfunction keyMapper(v, k) {\n return k;\n}\n\nfunction entryMapper(v, k) {\n return [k, v];\n}\n\nfunction not(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n };\n}\n\nfunction neg(predicate) {\n return function() {\n return -predicate.apply(this, arguments);\n };\n}\n\nfunction defaultZipper() {\n return arrCopy(arguments);\n}\n\nfunction defaultNegComparator(a, b) {\n return a < b ? 1 : a > b ? -1 : 0;\n}\n\nfunction hashCollection(collection) {\n if (collection.size === Infinity) {\n return 0;\n }\n var ordered = isOrdered(collection);\n var keyed = isKeyed(collection);\n var h = ordered ? 1 : 0;\n var size = collection.__iterate(\n keyed\n ? ordered\n ? function (v, k) {\n h = (31 * h + hashMerge(hash(v), hash(k))) | 0;\n }\n : function (v, k) {\n h = (h + hashMerge(hash(v), hash(k))) | 0;\n }\n : ordered\n ? function (v) {\n h = (31 * h + hash(v)) | 0;\n }\n : function (v) {\n h = (h + hash(v)) | 0;\n }\n );\n return murmurHashOfSize(size, h);\n}\n\nfunction murmurHashOfSize(size, h) {\n h = imul(h, 0xcc9e2d51);\n h = imul((h << 15) | (h >>> -15), 0x1b873593);\n h = imul((h << 13) | (h >>> -13), 5);\n h = ((h + 0xe6546b64) | 0) ^ size;\n h = imul(h ^ (h >>> 16), 0x85ebca6b);\n h = imul(h ^ (h >>> 13), 0xc2b2ae35);\n h = smi(h ^ (h >>> 16));\n return h;\n}\n\nfunction hashMerge(a, b) {\n return (a ^ (b + 0x9e3779b9 + (a << 6) + (a >> 2))) | 0; // int\n}\n\nvar OrderedSet = /*@__PURE__*/(function (Set$$1) {\n function OrderedSet(value) {\n return value === null || value === undefined\n ? emptyOrderedSet()\n : isOrderedSet(value)\n ? value\n : emptyOrderedSet().withMutations(function (set) {\n var iter = SetCollection(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v) { return set.add(v); });\n });\n }\n\n if ( Set$$1 ) OrderedSet.__proto__ = Set$$1;\n OrderedSet.prototype = Object.create( Set$$1 && Set$$1.prototype );\n OrderedSet.prototype.constructor = OrderedSet;\n\n OrderedSet.of = function of (/*...values*/) {\n return this(arguments);\n };\n\n OrderedSet.fromKeys = function fromKeys (value) {\n return this(KeyedCollection(value).keySeq());\n };\n\n OrderedSet.prototype.toString = function toString () {\n return this.__toString('OrderedSet {', '}');\n };\n\n return OrderedSet;\n}(Set));\n\nOrderedSet.isOrderedSet = isOrderedSet;\n\nvar OrderedSetPrototype = OrderedSet.prototype;\nOrderedSetPrototype[IS_ORDERED_SYMBOL] = true;\nOrderedSetPrototype.zip = IndexedCollectionPrototype.zip;\nOrderedSetPrototype.zipWith = IndexedCollectionPrototype.zipWith;\n\nOrderedSetPrototype.__empty = emptyOrderedSet;\nOrderedSetPrototype.__make = makeOrderedSet;\n\nfunction makeOrderedSet(map, ownerID) {\n var set = Object.create(OrderedSetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n}\n\nvar EMPTY_ORDERED_SET;\nfunction emptyOrderedSet() {\n return (\n EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()))\n );\n}\n\nvar Record = function Record(defaultValues, name) {\n var hasInitialized;\n\n var RecordType = function Record(values) {\n var this$1 = this;\n\n if (values instanceof RecordType) {\n return values;\n }\n if (!(this instanceof RecordType)) {\n return new RecordType(values);\n }\n if (!hasInitialized) {\n hasInitialized = true;\n var keys = Object.keys(defaultValues);\n var indices = (RecordTypePrototype._indices = {});\n // Deprecated: left to attempt not to break any external code which\n // relies on a ._name property existing on record instances.\n // Use Record.getDescriptiveName() instead\n RecordTypePrototype._name = name;\n RecordTypePrototype._keys = keys;\n RecordTypePrototype._defaultValues = defaultValues;\n for (var i = 0; i < keys.length; i++) {\n var propName = keys[i];\n indices[propName] = i;\n if (RecordTypePrototype[propName]) {\n /* eslint-disable no-console */\n typeof console === 'object' &&\n console.warn &&\n console.warn(\n 'Cannot define ' +\n recordName(this) +\n ' with property \"' +\n propName +\n '\" since that property name is part of the Record API.'\n );\n /* eslint-enable no-console */\n } else {\n setProp(RecordTypePrototype, propName);\n }\n }\n }\n this.__ownerID = undefined;\n this._values = List().withMutations(function (l) {\n l.setSize(this$1._keys.length);\n KeyedCollection(values).forEach(function (v, k) {\n l.set(this$1._indices[k], v === this$1._defaultValues[k] ? undefined : v);\n });\n });\n };\n\n var RecordTypePrototype = (RecordType.prototype = Object.create(\n RecordPrototype\n ));\n RecordTypePrototype.constructor = RecordType;\n\n if (name) {\n RecordType.displayName = name;\n }\n\n return RecordType;\n};\n\nRecord.prototype.toString = function toString () {\n var str = recordName(this) + ' { ';\n var keys = this._keys;\n var k;\n for (var i = 0, l = keys.length; i !== l; i++) {\n k = keys[i];\n str += (i ? ', ' : '') + k + ': ' + quoteString(this.get(k));\n }\n return str + ' }';\n};\n\nRecord.prototype.equals = function equals (other) {\n return (\n this === other ||\n (other &&\n this._keys === other._keys &&\n recordSeq(this).equals(recordSeq(other)))\n );\n};\n\nRecord.prototype.hashCode = function hashCode () {\n return recordSeq(this).hashCode();\n};\n\n// @pragma Access\n\nRecord.prototype.has = function has (k) {\n return this._indices.hasOwnProperty(k);\n};\n\nRecord.prototype.get = function get (k, notSetValue) {\n if (!this.has(k)) {\n return notSetValue;\n }\n var index = this._indices[k];\n var value = this._values.get(index);\n return value === undefined ? this._defaultValues[k] : value;\n};\n\n// @pragma Modification\n\nRecord.prototype.set = function set (k, v) {\n if (this.has(k)) {\n var newValues = this._values.set(\n this._indices[k],\n v === this._defaultValues[k] ? undefined : v\n );\n if (newValues !== this._values && !this.__ownerID) {\n return makeRecord(this, newValues);\n }\n }\n return this;\n};\n\nRecord.prototype.remove = function remove (k) {\n return this.set(k);\n};\n\nRecord.prototype.clear = function clear () {\n var newValues = this._values.clear().setSize(this._keys.length);\n return this.__ownerID ? this : makeRecord(this, newValues);\n};\n\nRecord.prototype.wasAltered = function wasAltered () {\n return this._values.wasAltered();\n};\n\nRecord.prototype.toSeq = function toSeq () {\n return recordSeq(this);\n};\n\nRecord.prototype.toJS = function toJS$1 () {\n return toJS(this);\n};\n\nRecord.prototype.entries = function entries () {\n return this.__iterator(ITERATE_ENTRIES);\n};\n\nRecord.prototype.__iterator = function __iterator (type, reverse) {\n return recordSeq(this).__iterator(type, reverse);\n};\n\nRecord.prototype.__iterate = function __iterate (fn, reverse) {\n return recordSeq(this).__iterate(fn, reverse);\n};\n\nRecord.prototype.__ensureOwner = function __ensureOwner (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newValues = this._values.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._values = newValues;\n return this;\n }\n return makeRecord(this, newValues, ownerID);\n};\n\nRecord.isRecord = isRecord;\nRecord.getDescriptiveName = recordName;\nvar RecordPrototype = Record.prototype;\nRecordPrototype[IS_RECORD_SYMBOL] = true;\nRecordPrototype[DELETE] = RecordPrototype.remove;\nRecordPrototype.deleteIn = RecordPrototype.removeIn = deleteIn;\nRecordPrototype.getIn = getIn$1;\nRecordPrototype.hasIn = CollectionPrototype.hasIn;\nRecordPrototype.merge = merge;\nRecordPrototype.mergeWith = mergeWith;\nRecordPrototype.mergeIn = mergeIn;\nRecordPrototype.mergeDeep = mergeDeep$1;\nRecordPrototype.mergeDeepWith = mergeDeepWith$1;\nRecordPrototype.mergeDeepIn = mergeDeepIn;\nRecordPrototype.setIn = setIn$1;\nRecordPrototype.update = update$1;\nRecordPrototype.updateIn = updateIn$1;\nRecordPrototype.withMutations = withMutations;\nRecordPrototype.asMutable = asMutable;\nRecordPrototype.asImmutable = asImmutable;\nRecordPrototype[ITERATOR_SYMBOL] = RecordPrototype.entries;\nRecordPrototype.toJSON = RecordPrototype.toObject =\n CollectionPrototype.toObject;\nRecordPrototype.inspect = RecordPrototype.toSource = function() {\n return this.toString();\n};\n\nfunction makeRecord(likeRecord, values, ownerID) {\n var record = Object.create(Object.getPrototypeOf(likeRecord));\n record._values = values;\n record.__ownerID = ownerID;\n return record;\n}\n\nfunction recordName(record) {\n return record.constructor.displayName || record.constructor.name || 'Record';\n}\n\nfunction recordSeq(record) {\n return keyedSeqFromValue(record._keys.map(function (k) { return [k, record.get(k)]; }));\n}\n\nfunction setProp(prototype, name) {\n try {\n Object.defineProperty(prototype, name, {\n get: function() {\n return this.get(name);\n },\n set: function(value) {\n invariant(this.__ownerID, 'Cannot set on an immutable record.');\n this.set(name, value);\n },\n });\n } catch (error) {\n // Object.defineProperty failed. Probably IE8.\n }\n}\n\n/**\n * Returns a lazy Seq of `value` repeated `times` times. When `times` is\n * undefined, returns an infinite sequence of `value`.\n */\nvar Repeat = /*@__PURE__*/(function (IndexedSeq$$1) {\n function Repeat(value, times) {\n if (!(this instanceof Repeat)) {\n return new Repeat(value, times);\n }\n this._value = value;\n this.size = times === undefined ? Infinity : Math.max(0, times);\n if (this.size === 0) {\n if (EMPTY_REPEAT) {\n return EMPTY_REPEAT;\n }\n EMPTY_REPEAT = this;\n }\n }\n\n if ( IndexedSeq$$1 ) Repeat.__proto__ = IndexedSeq$$1;\n Repeat.prototype = Object.create( IndexedSeq$$1 && IndexedSeq$$1.prototype );\n Repeat.prototype.constructor = Repeat;\n\n Repeat.prototype.toString = function toString () {\n if (this.size === 0) {\n return 'Repeat []';\n }\n return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';\n };\n\n Repeat.prototype.get = function get (index, notSetValue) {\n return this.has(index) ? this._value : notSetValue;\n };\n\n Repeat.prototype.includes = function includes (searchValue) {\n return is(this._value, searchValue);\n };\n\n Repeat.prototype.slice = function slice (begin, end) {\n var size = this.size;\n return wholeSlice(begin, end, size)\n ? this\n : new Repeat(\n this._value,\n resolveEnd(end, size) - resolveBegin(begin, size)\n );\n };\n\n Repeat.prototype.reverse = function reverse () {\n return this;\n };\n\n Repeat.prototype.indexOf = function indexOf (searchValue) {\n if (is(this._value, searchValue)) {\n return 0;\n }\n return -1;\n };\n\n Repeat.prototype.lastIndexOf = function lastIndexOf (searchValue) {\n if (is(this._value, searchValue)) {\n return this.size;\n }\n return -1;\n };\n\n Repeat.prototype.__iterate = function __iterate (fn, reverse) {\n var size = this.size;\n var i = 0;\n while (i !== size) {\n if (fn(this._value, reverse ? size - ++i : i++, this) === false) {\n break;\n }\n }\n return i;\n };\n\n Repeat.prototype.__iterator = function __iterator (type, reverse) {\n var this$1 = this;\n\n var size = this.size;\n var i = 0;\n return new Iterator(\n function () { return i === size\n ? iteratorDone()\n : iteratorValue(type, reverse ? size - ++i : i++, this$1._value); }\n );\n };\n\n Repeat.prototype.equals = function equals (other) {\n return other instanceof Repeat\n ? is(this._value, other._value)\n : deepEqual(other);\n };\n\n return Repeat;\n}(IndexedSeq));\n\nvar EMPTY_REPEAT;\n\nfunction fromJS(value, converter) {\n return fromJSWith(\n [],\n converter || defaultConverter,\n value,\n '',\n converter && converter.length > 2 ? [] : undefined,\n { '': value }\n );\n}\n\nfunction fromJSWith(stack, converter, value, key, keyPath, parentValue) {\n var toSeq = Array.isArray(value)\n ? IndexedSeq\n : isPlainObj(value)\n ? KeyedSeq\n : null;\n if (toSeq) {\n if (~stack.indexOf(value)) {\n throw new TypeError('Cannot convert circular structure to Immutable');\n }\n stack.push(value);\n keyPath && key !== '' && keyPath.push(key);\n var converted = converter.call(\n parentValue,\n key,\n toSeq(value).map(function (v, k) { return fromJSWith(stack, converter, v, k, keyPath, value); }\n ),\n keyPath && keyPath.slice()\n );\n stack.pop();\n keyPath && keyPath.pop();\n return converted;\n }\n return value;\n}\n\nfunction defaultConverter(k, v) {\n return isKeyed(v) ? v.toMap() : v.toList();\n}\n\nvar version = \"4.0.0-rc.11\";\n\nvar Immutable = {\n version: version,\n\n Collection: Collection,\n // Note: Iterable is deprecated\n Iterable: Collection,\n\n Seq: Seq,\n Map: Map,\n OrderedMap: OrderedMap,\n List: List,\n Stack: Stack,\n Set: Set,\n OrderedSet: OrderedSet,\n\n Record: Record,\n Range: Range,\n Repeat: Repeat,\n\n is: is,\n fromJS: fromJS,\n hash: hash,\n\n isImmutable: isImmutable,\n isCollection: isCollection,\n isKeyed: isKeyed,\n isIndexed: isIndexed,\n isAssociative: isAssociative,\n isOrdered: isOrdered,\n isValueObject: isValueObject,\n isSeq: isSeq,\n isList: isList,\n isMap: isMap,\n isOrderedMap: isOrderedMap,\n isStack: isStack,\n isSet: isSet,\n isOrderedSet: isOrderedSet,\n isRecord: isRecord,\n\n get: get,\n getIn: getIn,\n has: has,\n hasIn: hasIn,\n merge: merge$1,\n mergeDeep: mergeDeep,\n mergeWith: mergeWith$1,\n mergeDeepWith: mergeDeepWith,\n remove: remove,\n removeIn: removeIn,\n set: set,\n setIn: setIn,\n update: update,\n updateIn: updateIn,\n};\n\n// Note: Iterable is deprecated\nvar Iterable = Collection;\n\nexport default Immutable;\nexport { version, Collection, Iterable, Seq, Map, OrderedMap, List, Stack, Set, OrderedSet, Record, Range, Repeat, is, fromJS, hash, isImmutable, isCollection, isKeyed, isIndexed, isAssociative, isOrdered, isValueObject, get, getIn, has, hasIn, merge$1 as merge, mergeDeep, mergeWith$1 as mergeWith, mergeDeepWith, remove, removeIn, set, setIn, update, updateIn };\n","import unsupportedIterableToArray from \"@babel/runtime/helpers/esm/unsupportedIterableToArray\";\nexport default function _createForOfIteratorHelper(o, allowArrayLike) {\n var it;\n\n if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n\n var F = function F() {};\n\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = o[Symbol.iterator]();\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nvar MiniSignalBinding = (function () {\n function MiniSignalBinding(fn, once, thisArg) {\n if (once === undefined) once = false;\n\n _classCallCheck(this, MiniSignalBinding);\n\n this._fn = fn;\n this._once = once;\n this._thisArg = thisArg;\n this._next = this._prev = this._owner = null;\n }\n\n _createClass(MiniSignalBinding, [{\n key: 'detach',\n value: function detach() {\n if (this._owner === null) return false;\n this._owner.detach(this);\n return true;\n }\n }]);\n\n return MiniSignalBinding;\n})();\n\nfunction _addMiniSignalBinding(self, node) {\n if (!self._head) {\n self._head = node;\n self._tail = node;\n } else {\n self._tail._next = node;\n node._prev = self._tail;\n self._tail = node;\n }\n\n node._owner = self;\n\n return node;\n}\n\nvar MiniSignal = (function () {\n function MiniSignal() {\n _classCallCheck(this, MiniSignal);\n\n this._head = this._tail = undefined;\n }\n\n _createClass(MiniSignal, [{\n key: 'handlers',\n value: function handlers() {\n var exists = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0];\n\n var node = this._head;\n\n if (exists) return !!node;\n\n var ee = [];\n\n while (node) {\n ee.push(node);\n node = node._next;\n }\n\n return ee;\n }\n }, {\n key: 'has',\n value: function has(node) {\n if (!(node instanceof MiniSignalBinding)) {\n throw new Error('MiniSignal#has(): First arg must be a MiniSignalBinding object.');\n }\n\n return node._owner === this;\n }\n }, {\n key: 'dispatch',\n value: function dispatch() {\n var node = this._head;\n\n if (!node) return false;\n\n while (node) {\n if (node._once) this.detach(node);\n node._fn.apply(node._thisArg, arguments);\n node = node._next;\n }\n\n return true;\n }\n }, {\n key: 'add',\n value: function add(fn) {\n var thisArg = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];\n\n if (typeof fn !== 'function') {\n throw new Error('MiniSignal#add(): First arg must be a Function.');\n }\n return _addMiniSignalBinding(this, new MiniSignalBinding(fn, false, thisArg));\n }\n }, {\n key: 'once',\n value: function once(fn) {\n var thisArg = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];\n\n if (typeof fn !== 'function') {\n throw new Error('MiniSignal#once(): First arg must be a Function.');\n }\n return _addMiniSignalBinding(this, new MiniSignalBinding(fn, true, thisArg));\n }\n }, {\n key: 'detach',\n value: function detach(node) {\n if (!(node instanceof MiniSignalBinding)) {\n throw new Error('MiniSignal#detach(): First arg must be a MiniSignalBinding object.');\n }\n if (node._owner !== this) return this;\n\n if (node._prev) node._prev._next = node._next;\n if (node._next) node._next._prev = node._prev;\n\n if (node === this._head) {\n this._head = node._next;\n if (node._next === null) {\n this._tail = null;\n }\n } else if (node === this._tail) {\n this._tail = node._prev;\n this._tail._next = null;\n }\n\n node._owner = null;\n return this;\n }\n }, {\n key: 'detachAll',\n value: function detachAll() {\n var node = this._head;\n if (!node) return this;\n\n this._head = this._tail = null;\n\n while (node) {\n node._owner = null;\n node = node._next;\n }\n return this;\n }\n }]);\n\n return MiniSignal;\n})();\n\nMiniSignal.MiniSignalBinding = MiniSignalBinding;\n\nexports['default'] = MiniSignal;\nmodule.exports = exports['default'];\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","'use strict';\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (process.env.NODE_ENV === 'production') {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = require('./cjs/react-dom.production.min.js');\n} else {\n module.exports = require('./cjs/react-dom.development.js');\n}\n","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import $$observable from 'symbol-observable';\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nvar randomString = function randomString() {\n return Math.random().toString(36).substring(7).split('').join('.');\n};\n\nvar ActionTypes = {\n INIT: \"@@redux/INIT\" + randomString(),\n REPLACE: \"@@redux/REPLACE\" + randomString(),\n PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {\n return \"@@redux/PROBE_UNKNOWN_ACTION\" + randomString();\n }\n};\n\n/**\n * @param {any} obj The object to inspect.\n * @returns {boolean} True if the argument appears to be a plain object.\n */\nfunction isPlainObject(obj) {\n if (typeof obj !== 'object' || obj === null) return false;\n var proto = obj;\n\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n\n return Object.getPrototypeOf(obj) === proto;\n}\n\n/**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\n\nfunction createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {\n throw new Error('It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function.');\n }\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== 'undefined') {\n if (typeof enhancer !== 'function') {\n throw new Error('Expected the enhancer to be a function.');\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== 'function') {\n throw new Error('Expected the reducer to be a function.');\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n /**\n * This makes a shallow copy of currentListeners so we can use\n * nextListeners as a temporary list while dispatching.\n *\n * This prevents any bugs around consumers calling\n * subscribe/unsubscribe in the middle of a dispatch.\n */\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n\n\n function getState() {\n if (isDispatching) {\n throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');\n }\n\n return currentState;\n }\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n\n\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected the listener to be a function.');\n }\n\n if (isDispatching) {\n throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribelistener for more details.');\n }\n\n var isSubscribed = true;\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n if (isDispatching) {\n throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribelistener for more details.');\n }\n\n isSubscribed = false;\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n currentListeners = null;\n };\n }\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n\n\n function dispatch(action) {\n if (!isPlainObject(action)) {\n throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n }\n\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n }\n\n if (isDispatching) {\n throw new Error('Reducers may not dispatch actions.');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n\n return action;\n }\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n\n\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== 'function') {\n throw new Error('Expected the nextReducer to be a function.');\n }\n\n currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.\n // Any reducers that existed in both the new and old rootReducer\n // will receive the previous state. This effectively populates\n // the new state tree with any relevant data from the old one.\n\n dispatch({\n type: ActionTypes.REPLACE\n });\n }\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/tc39/proposal-observable\n */\n\n\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (typeof observer !== 'object' || observer === null) {\n throw new TypeError('Expected the observer to be an object.');\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return {\n unsubscribe: unsubscribe\n };\n }\n }, _ref[$$observable] = function () {\n return this;\n }, _ref;\n } // When a store is created, an \"INIT\" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n\n\n dispatch({\n type: ActionTypes.INIT\n });\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[$$observable] = observable, _ref2;\n}\n\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nfunction warning(message) {\n /* eslint-disable no-console */\n if (typeof console !== 'undefined' && typeof console.error === 'function') {\n console.error(message);\n }\n /* eslint-enable no-console */\n\n\n try {\n // This error was thrown as a convenience so that if you enable\n // \"break on all exceptions\" in your console,\n // it would pause the execution at this line.\n throw new Error(message);\n } catch (e) {} // eslint-disable-line no-empty\n\n}\n\nfunction getUndefinedStateErrorMessage(key, action) {\n var actionType = action && action.type;\n var actionDescription = actionType && \"action \\\"\" + String(actionType) + \"\\\"\" || 'an action';\n return \"Given \" + actionDescription + \", reducer \\\"\" + key + \"\\\" returned undefined. \" + \"To ignore an action, you must explicitly return the previous state. \" + \"If you want this reducer to hold no value, you can return null instead of undefined.\";\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n var reducerKeys = Object.keys(reducers);\n var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n if (reducerKeys.length === 0) {\n return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n }\n\n if (!isPlainObject(inputState)) {\n return \"The \" + argumentName + \" has unexpected type of \\\"\" + {}.toString.call(inputState).match(/\\s([a-z|A-Z]+)/)[1] + \"\\\". Expected argument to be an object with the following \" + (\"keys: \\\"\" + reducerKeys.join('\", \"') + \"\\\"\");\n }\n\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n });\n unexpectedKeys.forEach(function (key) {\n unexpectedKeyCache[key] = true;\n });\n if (action && action.type === ActionTypes.REPLACE) return;\n\n if (unexpectedKeys.length > 0) {\n return \"Unexpected \" + (unexpectedKeys.length > 1 ? 'keys' : 'key') + \" \" + (\"\\\"\" + unexpectedKeys.join('\", \"') + \"\\\" found in \" + argumentName + \". \") + \"Expected to find one of the known reducer keys instead: \" + (\"\\\"\" + reducerKeys.join('\", \"') + \"\\\". Unexpected keys will be ignored.\");\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, {\n type: ActionTypes.INIT\n });\n\n if (typeof initialState === 'undefined') {\n throw new Error(\"Reducer \\\"\" + key + \"\\\" returned undefined during initialization. \" + \"If the state passed to the reducer is undefined, you must \" + \"explicitly return the initial state. The initial state may \" + \"not be undefined. If you don't want to set a value for this reducer, \" + \"you can use null instead of undefined.\");\n }\n\n if (typeof reducer(undefined, {\n type: ActionTypes.PROBE_UNKNOWN_ACTION()\n }) === 'undefined') {\n throw new Error(\"Reducer \\\"\" + key + \"\\\" returned undefined when probed with a random type. \" + (\"Don't try to handle \" + ActionTypes.INIT + \" or other actions in \\\"redux/*\\\" \") + \"namespace. They are considered private. Instead, you must return the \" + \"current state for any unknown actions, unless it is undefined, \" + \"in which case you must return the initial state, regardless of the \" + \"action type. The initial state may not be undefined, but can be null.\");\n }\n });\n}\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\n\n\nfunction combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof reducers[key] === 'undefined') {\n warning(\"No reducer provided for key \\\"\" + key + \"\\\"\");\n }\n }\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n\n var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same\n // keys multiple times.\n\n var unexpectedKeyCache;\n\n if (process.env.NODE_ENV !== 'production') {\n unexpectedKeyCache = {};\n }\n\n var shapeAssertionError;\n\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination(state, action) {\n if (state === void 0) {\n state = {};\n }\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n\n if (warningMessage) {\n warning(warningMessage);\n }\n }\n\n var hasChanged = false;\n var nextState = {};\n\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n\n if (typeof nextStateForKey === 'undefined') {\n var errorMessage = getUndefinedStateErrorMessage(_key, action);\n throw new Error(errorMessage);\n }\n\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n\n hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;\n return hasChanged ? nextState : state;\n };\n}\n\nfunction bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(this, arguments));\n };\n}\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass an action creator as the first argument,\n * and get a dispatch wrapped function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\n\n\nfunction bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== 'object' || actionCreators === null) {\n throw new Error(\"bindActionCreators expected an object or a function, instead received \" + (actionCreators === null ? 'null' : typeof actionCreators) + \". \" + \"Did you write \\\"import ActionCreators from\\\" instead of \\\"import * as ActionCreators from\\\"?\");\n }\n\n var boundActionCreators = {};\n\n for (var key in actionCreators) {\n var actionCreator = actionCreators[key];\n\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n\n return boundActionCreators;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n keys.push.apply(keys, Object.getOwnPropertySymbols(object));\n }\n\n if (enumerableOnly) keys = keys.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(source, true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(source).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\nfunction compose() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(void 0, arguments));\n };\n });\n}\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\n\nfunction applyMiddleware() {\n for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function () {\n var store = createStore.apply(void 0, arguments);\n\n var _dispatch = function dispatch() {\n throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');\n };\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch() {\n return _dispatch.apply(void 0, arguments);\n }\n };\n var chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = compose.apply(void 0, chain)(store.dispatch);\n return _objectSpread2({}, store, {\n dispatch: _dispatch\n });\n };\n };\n}\n\n/*\n * This is a dummy function to check if the function name has been altered by minification.\n * If the function has been minified and NODE_ENV !== 'production', warn the user.\n */\n\nfunction isCrushed() {}\n\nif (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {\n warning('You are currently using minified code outside of NODE_ENV === \"production\". ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' + 'to ensure you have the correct code for your production build.');\n}\n\nexport { ActionTypes as __DO_NOT_USE__ActionTypes, applyMiddleware, bindActionCreators, combineReducers, compose, createStore };\n","import defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nexport default function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}","import arrayWithoutHoles from \"@babel/runtime/helpers/esm/arrayWithoutHoles\";\nimport iterableToArray from \"@babel/runtime/helpers/esm/iterableToArray\";\nimport unsupportedIterableToArray from \"@babel/runtime/helpers/esm/unsupportedIterableToArray\";\nimport nonIterableSpread from \"@babel/runtime/helpers/esm/nonIterableSpread\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"@babel/runtime/helpers/esm/arrayLikeToArray\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar punycode = require('punycode');\nvar util = require('./util');\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = require('querystring');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && util.isObject(url) && url instanceof Url) return url;\n\n var u = new Url;\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n if (!util.isString(url)) {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n // Copy chrome, IE, opera backslash-handling behavior.\n // Back slashes before the query string get converted to forward slashes\n // See: https://code.google.com/p/chromium/issues/detail?id=25916\n var queryIndex = url.indexOf('?'),\n splitter =\n (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n\n var rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1)\n hostEnd = rest.length;\n\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) continue;\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n // IDNA Support: Returns a punycoded representation of \"domain\".\n // It only converts parts of the domain name that\n // have non-ASCII characters, i.e. it doesn't matter if\n // you call it with a domain that already is ASCII-only.\n this.hostname = punycode.toASCII(this.hostname);\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n // now rest is set to the post-host stuff.\n // chop off any delim chars.\n if (!unsafeProtocol[lowerProto]) {\n\n // First, make 100% sure that any \"autoEscape\" chars get\n // escaped, even if encodeURIComponent doesn't think they\n // need to be.\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1)\n continue;\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) this.pathname = rest;\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n //to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (util.isString(obj)) obj = urlParse(obj);\n if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n return obj.format();\n}\n\nUrl.prototype.format = function() {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ?\n this.hostname :\n '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query &&\n util.isObject(this.query) &&\n Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n // unless they had them to begin with.\n if (this.slashes ||\n (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n if (search && search.charAt(0) !== '?') search = '?' + search;\n\n pathname = pathname.replace(/[?#]/g, function(match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) return relative;\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n if (util.isString(relative)) {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n var tkeys = Object.keys(this);\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n }\n\n // hash is always overridden, no matter what.\n // even href=\"\" will remove it.\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol')\n result[rkey] = relative[rkey];\n }\n\n //urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] &&\n result.hostname && !result.pathname) {\n result.path = result.pathname = '/';\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n // if it's a known url protocol, then changing\n // the protocol does weird things\n // first, if it's not file:, then we MUST have a host,\n // and if there was a path\n // to begin with, then we MUST have a path.\n // if it is file:, then the host is dropped,\n // because that's known to be hostless.\n // anything else is assumed to be absolute.\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift()));\n if (!relative.host) relative.host = '';\n if (!relative.hostname) relative.hostname = '';\n if (relPath[0] !== '') relPath.unshift('');\n if (relPath.length < 2) relPath.unshift('');\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n isRelAbs = (\n relative.host ||\n relative.pathname && relative.pathname.charAt(0) === '/'\n ),\n mustEndAbs = (isRelAbs || isSourceAbs ||\n (result.host && relative.pathname)),\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n // if the url is a non-slashed url, then relative\n // links like ../.. should be able\n // to crawl up to the hostname, as well. This is strange.\n // result.protocol has already been set by now.\n // Later on, put the first path part into the host field.\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') srcPath[0] = result.host;\n else srcPath.unshift(result.host);\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') relPath[0] = relative.host;\n else relPath.unshift(relative.host);\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = (relative.host || relative.host === '') ?\n relative.host : result.host;\n result.hostname = (relative.hostname || relative.hostname === '') ?\n relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n // it's relative\n // throw away the existing file, and take the new path instead.\n if (!srcPath) srcPath = [];\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (!util.isNullOrUndefined(relative.search)) {\n // just pull out the search.\n // like href='?foo'.\n // Put this after the other two cases because it simplifies the booleans\n if (psychotic) {\n result.hostname = result.host = srcPath.shift();\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n //to support http.request\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n // no path at all. easy.\n // we've already handled the other stuff above.\n result.pathname = null;\n //to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n // if a url ENDs in . or .., then it must get a trailing slash.\n // however, if it ends in anything else non-slashy,\n // then it must NOT get a trailing slash.\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (\n (result.host || relative.host || srcPath.length > 1) &&\n (last === '.' || last === '..') || last === '');\n\n // strip single dots, resolve double dots to parent dir\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' &&\n (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' ||\n (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = result.host = isAbsolute ? '' :\n srcPath.length ? srcPath.shift() : '';\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (!srcPath.length) {\n result.pathname = null;\n result.path = null;\n } else {\n result.pathname = srcPath.join('/');\n }\n\n //to support request.http\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function() {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) this.hostname = host;\n};\n","import arrayLikeToArray from \"@babel/runtime/helpers/esm/arrayLikeToArray\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","export combineReducers from './combineReducers';\n","import getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\nexport default function _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}","function areInputsEqual(newInputs, lastInputs) {\n if (newInputs.length !== lastInputs.length) {\n return false;\n }\n for (var i = 0; i < newInputs.length; i++) {\n if (newInputs[i] !== lastInputs[i]) {\n return false;\n }\n }\n return true;\n}\n\nfunction memoizeOne(resultFn, isEqual) {\n if (isEqual === void 0) { isEqual = areInputsEqual; }\n var lastThis;\n var lastArgs = [];\n var lastResult;\n var calledOnce = false;\n function memoized() {\n var newArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n newArgs[_i] = arguments[_i];\n }\n if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {\n return lastResult;\n }\n lastResult = resultFn.apply(this, newArgs);\n calledOnce = true;\n lastThis = this;\n lastArgs = newArgs;\n return lastResult;\n }\n return memoized;\n}\n\nexport default memoizeOne;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","/* global window */\nimport ponyfill from './ponyfill.js';\n\nvar root;\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (typeof module !== 'undefined') {\n root = module;\n} else {\n root = Function('return this')();\n}\n\nvar result = ponyfill(root);\nexport default result;\n","'use strict'\n\nfunction parseURI (str, opts) {\n if (!str) return undefined\n\n opts = opts || {}\n\n var o = {\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n }\n\n var m = o.parser[opts.strictMode ? 'strict' : 'loose'].exec(str)\n var uri = {}\n var i = 14\n\n while (i--) uri[o.key[i]] = m[i] || ''\n\n uri[o.q.name] = {}\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) uri[o.q.name][$1] = $2\n })\n\n return uri\n}\n\nmodule.exports = parseURI\n","import { BLEND_MODES, Point, Texture } from 'pixi.js';\nimport { PropertyNode, ValueStep } from './PropertyNode';\n// eslint-disable-next-line no-duplicate-imports\nimport * as pixi from 'pixi.js';\n// get Texture.from()/Texture.fromImage(), in V4 and V5 friendly methods\n/**\n * @hidden\n */\nlet TextureFromString: (s: string) => pixi.Texture;\n// to avoid Rollup transforming our import, save pixi namespace in a variable\nconst pixiNS = pixi;\n\nif (parseInt((/^(\\d+)\\./).exec(pixi.VERSION)[1], 10) < 5)\n{\n TextureFromString = (pixiNS.Texture as any).fromImage;\n}\nelse\n{\n TextureFromString = pixiNS.Texture.from;\n}\n\nexport function GetTextureFromString(s: string): Texture\n{\n return TextureFromString(s);\n}\n\nexport interface Color {\n r: number;\n g: number;\n b: number;\n a?: number;\n}\n\nexport interface EaseSegment {\n cp: number;\n s: number;\n e: number;\n}\n\nexport type SimpleEase = (time: number) => number;\n\n/**\n * Contains helper functions for particles and emitters to use.\n */\nexport namespace ParticleUtils {\n /**\n * If errors and warnings should be logged within the library.\n */\n export const verbose = false;\n\n export const DEG_TO_RADS = Math.PI / 180;\n\n /**\n * Rotates a point by a given angle.\n * @param angle The angle to rotate by in degrees\n * @param p The point to rotate around 0,0.\n */\n export function rotatePoint(angle: number, p: Point): void\n {\n if (!angle) return;\n angle *= ParticleUtils.DEG_TO_RADS;\n const s = Math.sin(angle);\n const c = Math.cos(angle);\n const xnew = (p.x * c) - (p.y * s);\n const ynew = (p.x * s) + (p.y * c);\n\n p.x = xnew;\n p.y = ynew;\n }\n\n /**\n * Combines separate color components (0-255) into a single uint color.\n * @param r The red value of the color\n * @param g The green value of the color\n * @param b The blue value of the color\n * @return The color in the form of 0xRRGGBB\n */\n export function combineRGBComponents(r: number, g: number, b: number/* , a*/): number\n {\n return /* a << 24 |*/ (r << 16) | (g << 8) | b;\n }\n\n /**\n * Reduces the point to a length of 1.\n * @param point The point to normalize\n */\n export function normalize(point: Point): void\n {\n const oneOverLen = 1 / ParticleUtils.length(point);\n\n point.x *= oneOverLen;\n point.y *= oneOverLen;\n }\n\n /**\n * Multiplies the x and y values of this point by a value.\n * @param point The point to scaleBy\n * @param value The value to scale by.\n */\n export function scaleBy(point: Point, value: number): void\n {\n point.x *= value;\n point.y *= value;\n }\n\n /**\n * Returns the length (or magnitude) of this point.\n * @param point The point to measure length\n * @return The length of this point.\n */\n export function length(point: Point): number\n {\n return Math.sqrt((point.x * point.x) + (point.y * point.y));\n }\n\n /**\n * Converts a hex string from \"#AARRGGBB\", \"#RRGGBB\", \"0xAARRGGBB\", \"0xRRGGBB\",\n * \"AARRGGBB\", or \"RRGGBB\" to an object of ints of 0-255, as\n * {r, g, b, (a)}.\n * @param color The input color string.\n * @param output An object to put the output in. If omitted, a new object is created.\n * @return The object with r, g, and b properties, possibly with an a property.\n */\n export function hexToRGB(color: string, output?: Color): Color\n {\n if (!output)\n {\n output = {} as Color;\n }\n if (color.charAt(0) === '#')\n {\n color = color.substr(1);\n }\n else if (color.indexOf('0x') === 0)\n {\n color = color.substr(2);\n }\n let alpha;\n\n if (color.length === 8)\n {\n alpha = color.substr(0, 2);\n color = color.substr(2);\n }\n output.r = parseInt(color.substr(0, 2), 16);// Red\n output.g = parseInt(color.substr(2, 2), 16);// Green\n output.b = parseInt(color.substr(4, 2), 16);// Blue\n if (alpha)\n {\n output.a = parseInt(alpha, 16);\n }\n\n return output;\n }\n\n /**\n * Generates a custom ease function, based on the GreenSock custom ease, as demonstrated\n * by the related tool at http://www.greensock.com/customease/.\n * @param segments An array of segments, as created by\n * http://www.greensock.com/customease/.\n * @return A function that calculates the percentage of change at\n * a given point in time (0-1 inclusive).\n */\n export function generateEase(segments: EaseSegment[]): SimpleEase\n {\n const qty = segments.length;\n const oneOverQty = 1 / qty;\n /*\n * Calculates the percentage of change at a given point in time (0-1 inclusive).\n * @param {Number} time The time of the ease, 0-1 inclusive.\n * @return {Number} The percentage of the change, 0-1 inclusive (unless your\n * ease goes outside those bounds).\n */\n\n // eslint-disable-next-line func-names\n return function (time: number): number\n {\n const i = (qty * time) | 0;// do a quick floor operation\n\n const t = (time - (i * oneOverQty)) * qty;\n const s = segments[i] || segments[qty - 1];\n\n return (s.s + (t * ((2 * (1 - t) * (s.cp - s.s)) + (t * (s.e - s.s)))));\n };\n }\n\n /**\n * Gets a blend mode, ensuring that it is valid.\n * @param name The name of the blend mode to get.\n * @return The blend mode as specified in the PIXI.BLEND_MODES enumeration.\n */\n export function getBlendMode(name: string): number\n {\n if (!name) return BLEND_MODES.NORMAL;\n name = name.toUpperCase();\n while (name.indexOf(' ') >= 0)\n {\n name = name.replace(' ', '_');\n }\n\n return (BLEND_MODES as any)[name] || BLEND_MODES.NORMAL;\n }\n\n /**\n * Converts a list of {value, time} objects starting at time 0 and ending at time 1 into an evenly\n * spaced stepped list of PropertyNodes for color values. This is primarily to handle conversion of\n * linear gradients to fewer colors, allowing for some optimization for Canvas2d fallbacks.\n * @param list The list of data to convert.\n * @param [numSteps=10] The number of steps to use.\n * @return The blend mode as specified in the PIXI.blendModes enumeration.\n */\n export function createSteppedGradient(list: ValueStep[], numSteps = 10): PropertyNode\n {\n if (typeof numSteps !== 'number' || numSteps <= 0)\n {\n numSteps = 10;\n }\n const first = new PropertyNode(ParticleUtils.hexToRGB(list[0].value), list[0].time);\n\n first.isStepped = true;\n let currentNode = first;\n let current = list[0];\n let nextIndex = 1;\n let next = list[nextIndex];\n\n for (let i = 1; i < numSteps; ++i)\n {\n let lerp = i / numSteps;\n // ensure we are on the right segment, if multiple\n\n while (lerp > next.time)\n {\n current = next;\n next = list[++nextIndex];\n }\n // convert the lerp value to the segment range\n lerp = (lerp - current.time) / (next.time - current.time);\n const curVal = ParticleUtils.hexToRGB(current.value);\n const nextVal = ParticleUtils.hexToRGB(next.value);\n const output: Color = {\n r: ((nextVal.r - curVal.r) * lerp) + curVal.r,\n g: ((nextVal.g - curVal.g) * lerp) + curVal.g,\n b: ((nextVal.b - curVal.b) * lerp) + curVal.b,\n };\n\n currentNode.next = new PropertyNode(output, i / numSteps);\n currentNode = currentNode.next;\n }\n\n // we don't need to have a PropertyNode for time of 1, because in a stepped version at that point\n // the particle has died of old age\n return first;\n }\n}\n","import { ParticleUtils, EaseSegment, SimpleEase, Color } from './ParticleUtils';\nimport { BasicTweenable } from './EmitterConfig';\n\nexport interface ValueStep {\n value: T;\n time: number;\n}\n\nexport interface ValueList {\n list: ValueStep[];\n isStepped?: boolean;\n ease?: SimpleEase|EaseSegment[];\n}\n/**\n * A single node in a PropertyList.\n */\nexport class PropertyNode\n{\n /**\n * Value for the node.\n */\n public value: V;\n /**\n * Time value for the node. Between 0-1.\n */\n public time: number;\n /**\n * The next node in line.\n */\n public next: PropertyNode;\n /**\n * If this is the first node in the list, controls if the entire list is stepped or not.\n */\n public isStepped: boolean;\n public ease: SimpleEase;\n\n /**\n * @param value The value for this node\n * @param time The time for this node, between 0-1\n * @param [ease] Custom ease for this list. Only relevant for the first node.\n */\n constructor(value: V, time: number, ease?: SimpleEase|EaseSegment[])\n {\n this.value = value;\n this.time = time;\n this.next = null;\n this.isStepped = false;\n if (ease)\n {\n this.ease = typeof ease === 'function' ? ease : ParticleUtils.generateEase(ease);\n }\n else\n {\n this.ease = null;\n }\n }\n\n /**\n * Creates a list of property values from a data object {list, isStepped} with a list of objects in\n * the form {value, time}. Alternatively, the data object can be in the deprecated form of\n * {start, end}.\n * @param data The data for the list.\n * @param data.list The array of value and time objects.\n * @param data.isStepped If the list is stepped rather than interpolated.\n * @param data.ease Custom ease for this list.\n * @return The first node in the list\n */\n // eslint-disable-next-line max-len\n public static createList(data: ValueList|BasicTweenable): PropertyNode\n {\n if ('list' in data)\n {\n const array = data.list;\n let node;\n const { value, time } = array[0];\n\n // eslint-disable-next-line max-len\n const first = node = new PropertyNode(typeof value === 'string' ? ParticleUtils.hexToRGB(value) : value, time, data.ease);\n\n // only set up subsequent nodes if there are a bunch or the 2nd one is different from the first\n if (array.length > 2 || (array.length === 2 && array[1].value !== value))\n {\n for (let i = 1; i < array.length; ++i)\n {\n const { value, time } = array[i];\n\n node.next = new PropertyNode(typeof value === 'string' ? ParticleUtils.hexToRGB(value) : value, time);\n node = node.next;\n }\n }\n first.isStepped = !!data.isStepped;\n\n return first as PropertyNode;\n }\n\n // Handle deprecated version here\n const start = new PropertyNode(typeof data.start === 'string' ? ParticleUtils.hexToRGB(data.start) : data.start, 0);\n // only set up a next value if it is different from the starting value\n\n if (data.end !== data.start)\n {\n start.next = new PropertyNode(typeof data.end === 'string' ? ParticleUtils.hexToRGB(data.end) : data.end, 1);\n }\n\n return start as PropertyNode;\n }\n}\n","import { ParticleUtils, SimpleEase, Color } from './ParticleUtils';\nimport { PropertyNode } from './PropertyNode';\n\nfunction intValueSimple(this: PropertyList, lerp: number): number\n{\n if (this.ease)\n { lerp = this.ease(lerp); }\n\n return ((this.next.value - this.current.value) * lerp) + this.current.value;\n}\n\nfunction intColorSimple(this: PropertyList, lerp: number): number\n{\n if (this.ease)\n { lerp = this.ease(lerp); }\n const curVal = this.current.value; const\n nextVal = this.next.value;\n const r = ((nextVal.r - curVal.r) * lerp) + curVal.r;\n const g = ((nextVal.g - curVal.g) * lerp) + curVal.g;\n const b = ((nextVal.b - curVal.b) * lerp) + curVal.b;\n\n return ParticleUtils.combineRGBComponents(r, g, b);\n}\n\nfunction intValueComplex(this: PropertyList, lerp: number): number\n{\n if (this.ease)\n { lerp = this.ease(lerp); }\n // make sure we are on the right segment\n while (lerp > this.next.time)\n {\n this.current = this.next;\n this.next = this.next.next;\n }\n // convert the lerp value to the segment range\n lerp = (lerp - this.current.time) / (this.next.time - this.current.time);\n\n return ((this.next.value - this.current.value) * lerp) + this.current.value;\n}\n\nfunction intColorComplex(this: PropertyList, lerp: number): number\n{\n if (this.ease)\n { lerp = this.ease(lerp); }\n // make sure we are on the right segment\n while (lerp > this.next.time)\n {\n this.current = this.next;\n this.next = this.next.next;\n }\n // convert the lerp value to the segment range\n lerp = (lerp - this.current.time) / (this.next.time - this.current.time);\n const curVal = this.current.value; const\n nextVal = this.next.value;\n const r = ((nextVal.r - curVal.r) * lerp) + curVal.r;\n const g = ((nextVal.g - curVal.g) * lerp) + curVal.g;\n const b = ((nextVal.b - curVal.b) * lerp) + curVal.b;\n\n return ParticleUtils.combineRGBComponents(r, g, b);\n}\n\nfunction intValueStepped(this: PropertyList, lerp: number): number\n{\n if (this.ease)\n { lerp = this.ease(lerp); }\n // make sure we are on the right segment\n while (this.next && lerp > this.next.time)\n {\n this.current = this.next;\n this.next = this.next.next;\n }\n\n return this.current.value;\n}\n\nfunction intColorStepped(this: PropertyList, lerp: number): number\n{\n if (this.ease)\n { lerp = this.ease(lerp); }\n // make sure we are on the right segment\n while (this.next && lerp > this.next.time)\n {\n this.current = this.next;\n this.next = this.next.next;\n }\n const curVal = this.current.value;\n\n return ParticleUtils.combineRGBComponents(curVal.r, curVal.g, curVal.b);\n}\n\n/**\n * Singly linked list container for keeping track of interpolated properties for particles.\n * Each Particle will have one of these for each interpolated property.\n */\nexport class PropertyList\n{\n /**\n * The current property node in the linked list.\n */\n public current: PropertyNode;\n /**\n * The next property node in the linked list. Stored separately for slightly less variable\n * access.\n */\n public next: PropertyNode;\n /**\n * Calculates the correct value for the current interpolation value. This method is set in\n * the reset() method.\n * @param lerp The interpolation value from 0-1.\n * @return The interpolated value. Colors are converted to the hex value.\n */\n public interpolate: (lerp: number) => number;\n /**\n * A custom easing method for this list.\n * @param lerp The interpolation value from 0-1.\n * @return The eased value, also from 0-1.\n */\n public ease: SimpleEase;\n /**\n * If this list manages colors, which requires a different method for interpolation.\n */\n private isColor: boolean;\n\n /**\n * @param isColor If this list handles color values\n */\n constructor(isColor = false)\n {\n this.current = null;\n this.next = null;\n this.isColor = !!isColor;\n this.interpolate = null;\n this.ease = null;\n }\n\n /**\n * Resets the list for use.\n * @param first The first node in the list.\n * @param first.isStepped If the values should be stepped instead of interpolated linearly.\n */\n public reset(first: PropertyNode): void\n {\n this.current = first;\n this.next = first.next;\n const isSimple = this.next && this.next.time >= 1;\n\n if (isSimple)\n {\n this.interpolate = this.isColor ? intColorSimple : intValueSimple;\n }\n else if (first.isStepped)\n {\n this.interpolate = this.isColor ? intColorStepped : intValueStepped;\n }\n else\n {\n this.interpolate = this.isColor ? intColorComplex : intValueComplex;\n }\n this.ease = this.current.ease;\n }\n}\n","import { ParticleUtils, Color, SimpleEase } from './ParticleUtils';\nimport { Particle } from './Particle';\nimport { PropertyNode } from './PropertyNode';\nimport { PolygonalChain } from './PolygonalChain';\nimport { EmitterConfig, OldEmitterConfig } from './EmitterConfig';\nimport { Point, Circle, Rectangle, Container, settings } from 'pixi.js';\n// eslint-disable-next-line no-duplicate-imports\nimport * as pixi from 'pixi.js';\n// get the shared ticker, in V4 and V5 friendly methods\n/**\n * @hidden\n */\nlet ticker: pixi.Ticker;\n// to avoid Rollup transforming our import, save pixi namespace in a variable\nconst pixiNS = pixi;\n\nif (parseInt((/^(\\d+)\\./).exec(pixi.VERSION)[1], 10) < 5)\n{\n ticker = (pixiNS as any).ticker.shared;\n}\nelse\n{\n ticker = pixiNS.Ticker.shared;\n}\n\nexport interface ParticleConstructor\n{\n new (emitter: Emitter): Particle;\n}\n\n/**\n * @hidden\n */\nconst helperPoint = new Point();\n\n/**\n * A particle emitter.\n */\nexport class Emitter\n{\n /**\n * The constructor used to create new particles. The default is\n * the built in particle class.\n */\n protected _particleConstructor: typeof Particle;\n // properties for individual particles\n /**\n * An array of PIXI Texture objects.\n */\n public particleImages: any[];\n /**\n * The first node in the list of alpha values for all particles.\n */\n public startAlpha: PropertyNode;\n /**\n * The first node in the list of speed values of all particles.\n */\n public startSpeed: PropertyNode;\n /**\n * A minimum multiplier for the speed of a particle at all stages of its life. A value between\n * minimumSpeedMultiplier and 1 is randomly generated for each particle.\n */\n public minimumSpeedMultiplier: number;\n /**\n * Acceleration to apply to particles. Using this disables\n * any interpolation of particle speed. If the particles do\n * not have a rotation speed, then they will be rotated to\n * match the direction of travel.\n */\n public acceleration: Point;\n /**\n * The maximum speed allowed for accelerating particles. Negative values, values of 0 or NaN\n * will disable the maximum speed.\n */\n public maxSpeed: number;\n /**\n * The first node in the list of scale values of all particles.\n */\n public startScale: PropertyNode;\n /**\n * A minimum multiplier for the scale of a particle at all stages of its life. A value between\n * minimumScaleMultiplier and 1 is randomly generated for each particle.\n */\n public minimumScaleMultiplier: number;\n /**\n * The first node in the list of color values of all particles, as red, green, and blue\n * uints from 0-255.\n */\n public startColor: PropertyNode;\n /**\n * The minimum lifetime for a particle, in seconds.\n */\n public minLifetime: number;\n /**\n * The maximum lifetime for a particle, in seconds.\n */\n public maxLifetime: number;\n /**\n * The minimum start rotation for a particle, in degrees. This value\n * is ignored if the spawn type is \"burst\" or \"arc\".\n */\n public minStartRotation: number;\n /**\n * The maximum start rotation for a particle, in degrees. This value\n * is ignored if the spawn type is \"burst\" or \"arc\".\n */\n public maxStartRotation: number;\n /**\n * If no particle rotation should occur. Starting rotation will still\n * affect the direction in which particles move. If the rotation speed\n * is set, then this will be ignored.\n */\n public noRotation: boolean;\n /**\n * The minimum rotation speed for a particle, in degrees per second.\n * This only visually spins the particle, it does not change direction\n * of movement.\n */\n public minRotationSpeed: number;\n /**\n * The maximum rotation speed for a particle, in degrees per second.\n * This only visually spins the particle, it does not change direction\n * of movement.\n */\n public maxRotationSpeed: number;\n /**\n * The Acceleration of rotation (angular acceleration) for a particle, in degrees per second.\n */\n public rotationAcceleration: number;\n /**\n * The blend mode for all particles, as named by PIXI.blendModes.\n */\n public particleBlendMode: number;\n /**\n * An easing function for nonlinear interpolation of values. Accepts a single\n * parameter of time as a value from 0-1, inclusive. Expected outputs are values\n * from 0-1, inclusive.\n */\n public customEase: SimpleEase;\n /**\n *\tExtra data for use in custom particles. The emitter doesn't look inside, but\n *\tpasses it on to the particle to use in init().\n */\n public extraData: any;\n // properties for spawning particles\n /**\n * Time between particle spawns in seconds.\n */\n protected _frequency: number;\n /**\n * Chance that a particle will be spawned on each opportunity to spawn one.\n * 0 is 0%, 1 is 100%.\n */\n public spawnChance: number;\n /**\n * Maximum number of particles to keep alive at a time. If this limit\n * is reached, no more particles will spawn until some have died.\n */\n public maxParticles: number;\n /**\n * The amount of time in seconds to emit for before setting emit to false.\n * A value of -1 is an unlimited amount of time.\n */\n public emitterLifetime: number;\n /**\n * Position at which to spawn particles, relative to the emitter's owner's origin.\n * For example, the flames of a rocket travelling right might have a spawnPos\n * of {x:-50, y:0}.\n * to spawn at the rear of the rocket.\n * To change this, use updateSpawnPos().\n */\n public spawnPos: Point;\n /**\n * How the particles will be spawned. Valid types are \"point\", \"rectangle\",\n * \"circle\", \"burst\", \"ring\".\n */\n public spawnType: string;\n /**\n * A reference to the emitter function specific to the spawn type.\n */\n protected _spawnFunc: (p: Particle, emitPosX: number, emitPosY: number, i?: number) => void;\n /**\n * A rectangle relative to spawnPos to spawn particles inside if the spawn type is \"rect\".\n */\n public spawnRect: Rectangle;\n /**\n * A polygon relative to spawnPos to spawn particles on the chain if the spawn type is \"polygonalChain\".\n */\n public spawnPolygonalChain: PolygonalChain;\n /**\n * A circle relative to spawnPos to spawn particles inside if the spawn type is \"circle\".\n */\n public spawnCircle: Circle & {minRadius: number};\n /**\n * Number of particles to spawn time that the frequency allows for particles to spawn.\n */\n public particlesPerWave: number;\n /**\n * Spacing between particles in a burst. 0 gives a random angle for each particle.\n */\n public particleSpacing: number;\n /**\n * Angle at which to start spawning particles in a burst.\n */\n public angleStart: number;\n /**\n * Rotation of the emitter or emitter's owner in degrees. This is added to\n * the calculated spawn angle.\n * To change this, use rotate().\n */\n protected rotation: number;\n /**\n * The world position of the emitter's owner, to add spawnPos to when\n * spawning particles. To change this, use updateOwnerPos().\n */\n protected ownerPos: Point;\n /**\n * The origin + spawnPos in the previous update, so that the spawn position\n * can be interpolated to space out particles better.\n */\n protected _prevEmitterPos: Point;\n /**\n * If _prevEmitterPos is valid, to prevent interpolation on the first update\n */\n protected _prevPosIsValid: boolean;\n /**\n * If either ownerPos or spawnPos has changed since the previous update.\n */\n protected _posChanged: boolean;\n /**\n * The container to add particles to.\n */\n protected _parent: Container;\n /**\n * If particles should be added at the back of the display list instead of the front.\n */\n public addAtBack: boolean;\n /**\n * The current number of active particles.\n */\n public particleCount: number;\n /**\n * If particles should be emitted during update() calls. Setting this to false\n * stops new particles from being created, but allows existing ones to die out.\n */\n protected _emit: boolean;\n /**\n * The timer for when to spawn particles in seconds, where numbers less\n * than 0 mean that particles should be spawned.\n */\n protected _spawnTimer: number;\n /**\n * The life of the emitter in seconds.\n */\n protected _emitterLife: number;\n /**\n * The particles that are active and on the display list. This is the first particle in a\n * linked list.\n */\n protected _activeParticlesFirst: Particle;\n /**\n * The particles that are active and on the display list. This is the last particle in a\n * linked list.\n */\n protected _activeParticlesLast: Particle;\n /**\n * The particles that are not currently being used. This is the first particle in a\n * linked list.\n */\n protected _poolFirst: Particle;\n /**\n * The original config object that this emitter was initialized with.\n */\n protected _origConfig: any;\n /**\n * The original particle image data that this emitter was initialized with.\n */\n protected _origArt: any;\n /**\n * If the update function is called automatically from the shared ticker.\n * Setting this to false requires calling the update function manually.\n */\n protected _autoUpdate: boolean;\n /**\n * A number keeping index of currently applied image. Used to emit arts in order.\n */\n protected _currentImageIndex = -1;\n /**\n * If the emitter should destroy itself when all particles have died out. This is set by\n * playOnceAndDestroy();\n */\n protected _destroyWhenComplete: boolean;\n /**\n * A callback for when all particles have died out. This is set by\n * playOnceAndDestroy() or playOnce();\n */\n protected _completeCallback: () => void;\n\n /**\n * @param particleParent The container to add the particles to.\n * @param particleImages A texture or array of textures to use\n * for the particles. Strings will be turned\n * into textures via Texture.fromImage().\n * @param config A configuration object containing settings for the emitter.\n * @param config.emit If config.emit is explicitly passed as false, the\n * Emitter will start disabled.\n * @param config.autoUpdate If config.autoUpdate is explicitly passed as\n * true, the Emitter will automatically call\n * update via the PIXI shared ticker.\n */\n constructor(particleParent: Container, particleImages: any, config: EmitterConfig|OldEmitterConfig)\n {\n this._particleConstructor = Particle;\n // properties for individual particles\n this.particleImages = null;\n this.startAlpha = null;\n this.startSpeed = null;\n this.minimumSpeedMultiplier = 1;\n this.acceleration = null;\n this.maxSpeed = NaN;\n this.startScale = null;\n this.minimumScaleMultiplier = 1;\n this.startColor = null;\n this.minLifetime = 0;\n this.maxLifetime = 0;\n this.minStartRotation = 0;\n this.maxStartRotation = 0;\n this.noRotation = false;\n this.minRotationSpeed = 0;\n this.maxRotationSpeed = 0;\n this.particleBlendMode = 0;\n this.customEase = null;\n this.extraData = null;\n // properties for spawning particles\n this._frequency = 1;\n this.spawnChance = 1;\n this.maxParticles = 1000;\n this.emitterLifetime = -1;\n this.spawnPos = null;\n this.spawnType = null;\n this._spawnFunc = null;\n this.spawnRect = null;\n this.spawnCircle = null;\n this.spawnPolygonalChain = null;\n this.particlesPerWave = 1;\n this.particleSpacing = 0;\n this.angleStart = 0;\n // emitter properties\n this.rotation = 0;\n this.ownerPos = null;\n this._prevEmitterPos = null;\n this._prevPosIsValid = false;\n this._posChanged = false;\n this._parent = null;\n this.addAtBack = false;\n this.particleCount = 0;\n this._emit = false;\n this._spawnTimer = 0;\n this._emitterLife = -1;\n this._activeParticlesFirst = null;\n this._activeParticlesLast = null;\n this._poolFirst = null;\n this._origConfig = null;\n this._origArt = null;\n this._autoUpdate = false;\n this._currentImageIndex = -1;\n this._destroyWhenComplete = false;\n this._completeCallback = null;\n\n // set the initial parent\n this.parent = particleParent;\n\n if (particleImages && config)\n {\n this.init(particleImages, config);\n }\n\n // save often used functions on the instance instead of the prototype for better speed\n this.recycle = this.recycle;\n this.update = this.update;\n this.rotate = this.rotate;\n this.updateSpawnPos = this.updateSpawnPos;\n this.updateOwnerPos = this.updateOwnerPos;\n }\n\n /**\n * If the emitter is using particle art in order as provided in `particleImages`.\n * Effective only when `particleImages` has multiple art options.\n * This is particularly useful ensuring that each art shows up once, in case you need to emit a body in an order.\n * For example: dragon - [Head, body1, body2, ..., tail]\n */\n public get orderedArt(): boolean { return this._currentImageIndex !== -1; }\n public set orderedArt(value)\n {\n this._currentImageIndex = value ? 0 : -1;\n }\n\n /**\n * Time between particle spawns in seconds. If this value is not a number greater than 0,\n * it will be set to 1 (particle per second) to prevent infinite loops.\n */\n public get frequency(): number { return this._frequency; }\n public set frequency(value)\n {\n // do some error checking to prevent infinite loops\n if (typeof value === 'number' && value > 0)\n {\n this._frequency = value;\n }\n else\n {\n this._frequency = 1;\n }\n }\n /**\n * The constructor used to create new particles. The default is\n * the built in Particle class. Setting this will dump any active or\n * pooled particles, if the emitter has already been used.\n */\n public get particleConstructor(): typeof Particle { return this._particleConstructor; }\n public set particleConstructor(value)\n {\n if (value !== this._particleConstructor)\n {\n this._particleConstructor = value;\n // clean up existing particles\n this.cleanup();\n // scrap all the particles\n for (let particle = this._poolFirst; particle; particle = particle.next)\n {\n particle.destroy();\n }\n this._poolFirst = null;\n // re-initialize the emitter so that the new constructor can do anything it needs to\n if (this._origConfig && this._origArt)\n {\n this.init(this._origArt, this._origConfig);\n }\n }\n }\n\n /**\n * The container to add particles to. Settings this will dump any active particles.\n */\n public get parent(): Container { return this._parent; }\n public set parent(value)\n {\n this.cleanup();\n this._parent = value;\n }\n\n /**\n * Sets up the emitter based on the config settings.\n * @param art A texture or array of textures to use for the particles.\n * @param config A configuration object containing settings for the emitter.\n */\n public init(art: any, config: EmitterConfig|OldEmitterConfig): void\n {\n if (!art || !config)\n {\n return;\n }\n // clean up any existing particles\n this.cleanup();\n\n // store the original config and particle images, in case we need to re-initialize\n // when the particle constructor is changed\n this._origConfig = config;\n this._origArt = art;\n\n // set up the array of data, also ensuring that it is an array\n art = Array.isArray(art) ? art.slice() : [art];\n // run the art through the particle class's parsing function\n const partClass = this._particleConstructor;\n\n this.particleImages = partClass.parseArt ? partClass.parseArt(art) : art;\n // /////////////////////////\n // Particle Properties //\n // /////////////////////////\n // set up the alpha\n if (config.alpha)\n {\n this.startAlpha = PropertyNode.createList(config.alpha);\n }\n else\n {\n this.startAlpha = new PropertyNode(1, 0);\n }\n // set up the speed\n if (config.speed)\n {\n this.startSpeed = PropertyNode.createList(config.speed);\n // eslint-disable-next-line max-len\n this.minimumSpeedMultiplier = ('minimumSpeedMultiplier' in config ? config.minimumSpeedMultiplier : (config.speed as any).minimumSpeedMultiplier) || 1;\n }\n else\n {\n this.minimumSpeedMultiplier = 1;\n this.startSpeed = new PropertyNode(0, 0);\n }\n // set up acceleration\n const acceleration = config.acceleration;\n\n if (acceleration && (acceleration.x || acceleration.y))\n {\n // make sure we disable speed interpolation\n this.startSpeed.next = null;\n this.acceleration = new Point(acceleration.x, acceleration.y);\n this.maxSpeed = config.maxSpeed || NaN;\n }\n else\n {\n this.acceleration = new Point();\n }\n // set up the scale\n if (config.scale)\n {\n this.startScale = PropertyNode.createList(config.scale);\n // eslint-disable-next-line max-len\n this.minimumScaleMultiplier = ('minimumScaleMultiplier' in config ? config.minimumScaleMultiplier : (config.scale as any).minimumScaleMultiplier) || 1;\n }\n else\n {\n this.startScale = new PropertyNode(1, 0);\n this.minimumScaleMultiplier = 1;\n }\n // set up the color\n if (config.color)\n {\n this.startColor = PropertyNode.createList(config.color);\n }\n else\n {\n this.startColor = new PropertyNode({ r: 0xFF, g: 0xFF, b: 0xFF }, 0);\n }\n // set up the start rotation\n if (config.startRotation)\n {\n this.minStartRotation = config.startRotation.min;\n this.maxStartRotation = config.startRotation.max;\n }\n else\n {\n this.minStartRotation = this.maxStartRotation = 0;\n }\n if (config.noRotation\n && (this.minStartRotation || this.maxStartRotation))\n {\n this.noRotation = !!config.noRotation;\n }\n else\n {\n this.noRotation = false;\n }\n // set up the rotation speed\n if (config.rotationSpeed)\n {\n this.minRotationSpeed = config.rotationSpeed.min;\n this.maxRotationSpeed = config.rotationSpeed.max;\n }\n else\n {\n this.minRotationSpeed = this.maxRotationSpeed = 0;\n }\n\n this.rotationAcceleration = config.rotationAcceleration || 0;\n // set up the lifetime\n this.minLifetime = config.lifetime.min;\n this.maxLifetime = config.lifetime.max;\n // get the blend mode\n this.particleBlendMode = ParticleUtils.getBlendMode(config.blendMode);\n // use the custom ease if provided\n if (config.ease)\n {\n this.customEase = typeof config.ease === 'function'\n ? config.ease : ParticleUtils.generateEase(config.ease);\n }\n else\n {\n this.customEase = null;\n }\n // set up the extra data, running it through the particle class's parseData function.\n if (partClass.parseData)\n {\n this.extraData = partClass.parseData(config.extraData);\n }\n else\n {\n this.extraData = config.extraData || null;\n }\n // ////////////////////////\n // Emitter Properties //\n // ////////////////////////\n // reset spawn type specific settings\n this.spawnRect = this.spawnCircle = null;\n this.particlesPerWave = 1;\n if (config.particlesPerWave && config.particlesPerWave > 1)\n {\n this.particlesPerWave = config.particlesPerWave;\n }\n this.particleSpacing = 0;\n this.angleStart = 0;\n // determine the spawn function to use\n this.parseSpawnType(config);\n // set the spawning frequency\n this.frequency = config.frequency;\n this.spawnChance = (typeof config.spawnChance === 'number' && config.spawnChance > 0) ? config.spawnChance : 1;\n // set the emitter lifetime\n this.emitterLifetime = config.emitterLifetime || -1;\n // set the max particles\n this.maxParticles = config.maxParticles > 0 ? config.maxParticles : 1000;\n // determine if we should add the particle at the back of the list or not\n this.addAtBack = !!config.addAtBack;\n // reset the emitter position and rotation variables\n this.rotation = 0;\n this.ownerPos = new Point();\n this.spawnPos = new Point(config.pos.x, config.pos.y);\n\n this.initAdditional(art, config);\n\n this._prevEmitterPos = this.spawnPos.clone();\n // previous emitter position is invalid and should not be used for interpolation\n this._prevPosIsValid = false;\n // start emitting\n this._spawnTimer = 0;\n this.emit = config.emit === undefined ? true : !!config.emit;\n this.autoUpdate = !!config.autoUpdate;\n this.orderedArt = !!config.orderedArt;\n }\n\n /**\n * Sets up additional parameters to the emitter from config settings.\n * Using for parsing additional parameters on classes that extend from Emitter\n * @param art A texture or array of textures to use for the particles.\n * @param config A configuration object containing settings for the emitter.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected initAdditional(art: any, config: EmitterConfig|OldEmitterConfig): void\n {\n // override in subclasses\n }\n\n /**\n * Parsing emitter spawn type from config settings.\n * Place for override and add new kind of spawn type\n * @param config A configuration object containing settings for the emitter.\n */\n protected parseSpawnType(config: EmitterConfig|OldEmitterConfig): void\n {\n let spawnCircle;\n\n switch (config.spawnType)\n {\n case 'rect':\n this.spawnType = 'rect';\n this._spawnFunc = this._spawnRect;\n const spawnRect = config.spawnRect;\n\n this.spawnRect = new Rectangle(spawnRect.x, spawnRect.y, spawnRect.w, spawnRect.h);\n break;\n case 'circle':\n this.spawnType = 'circle';\n this._spawnFunc = this._spawnCircle;\n spawnCircle = config.spawnCircle;\n this.spawnCircle = new Circle(spawnCircle.x, spawnCircle.y, spawnCircle.r) as any;\n break;\n case 'ring':\n this.spawnType = 'ring';\n this._spawnFunc = this._spawnRing;\n spawnCircle = config.spawnCircle;\n this.spawnCircle = new Circle(spawnCircle.x, spawnCircle.y, spawnCircle.r) as any;\n this.spawnCircle.minRadius = spawnCircle.minR;\n break;\n case 'burst':\n this.spawnType = 'burst';\n this._spawnFunc = this._spawnBurst;\n this.particleSpacing = config.particleSpacing;\n this.angleStart = config.angleStart ? config.angleStart : 0;\n break;\n case 'point':\n this.spawnType = 'point';\n this._spawnFunc = this._spawnPoint;\n break;\n case 'polygonalChain':\n this.spawnType = 'polygonalChain';\n this._spawnFunc = this._spawnPolygonalChain;\n this.spawnPolygonalChain = new PolygonalChain(config.spawnPolygon);\n break;\n default:\n this.spawnType = 'point';\n this._spawnFunc = this._spawnPoint;\n break;\n }\n }\n\n /**\n * Recycles an individual particle. For internal use only.\n * @param particle The particle to recycle.\n * @internal\n */\n public recycle(particle: Particle): void\n {\n if (particle.next)\n {\n particle.next.prev = particle.prev;\n }\n if (particle.prev)\n {\n particle.prev.next = particle.next;\n }\n if (particle === this._activeParticlesLast)\n {\n this._activeParticlesLast = particle.prev;\n }\n if (particle === this._activeParticlesFirst)\n {\n this._activeParticlesFirst = particle.next;\n }\n // add to pool\n particle.prev = null;\n particle.next = this._poolFirst;\n this._poolFirst = particle;\n // remove child from display, or make it invisible if it is in a ParticleContainer\n if (particle.parent)\n {\n particle.parent.removeChild(particle);\n }\n // decrease count\n --this.particleCount;\n }\n\n /**\n * Sets the rotation of the emitter to a new value.\n * @param newRot The new rotation, in degrees.\n */\n public rotate(newRot: number): void\n {\n if (this.rotation === newRot) return;\n // caclulate the difference in rotation for rotating spawnPos\n const diff = newRot - this.rotation;\n\n this.rotation = newRot;\n // rotate spawnPos\n ParticleUtils.rotatePoint(diff, this.spawnPos);\n // mark the position as having changed\n this._posChanged = true;\n }\n\n /**\n * Changes the spawn position of the emitter.\n * @param x The new x value of the spawn position for the emitter.\n * @param y The new y value of the spawn position for the emitter.\n */\n public updateSpawnPos(x: number, y: number): void\n {\n this._posChanged = true;\n this.spawnPos.x = x;\n this.spawnPos.y = y;\n }\n\n /**\n * Changes the position of the emitter's owner. You should call this if you are adding\n * particles to the world container that your emitter's owner is moving around in.\n * @param x The new x value of the emitter's owner.\n * @param y The new y value of the emitter's owner.\n */\n public updateOwnerPos(x: number, y: number): void\n {\n this._posChanged = true;\n this.ownerPos.x = x;\n this.ownerPos.y = y;\n }\n\n /**\n * Prevents emitter position interpolation in the next update.\n * This should be used if you made a major position change of your emitter's owner\n * that was not normal movement.\n */\n public resetPositionTracking(): void\n {\n this._prevPosIsValid = false;\n }\n\n /**\n * If particles should be emitted during update() calls. Setting this to false\n * stops new particles from being created, but allows existing ones to die out.\n */\n public get emit(): boolean { return this._emit; }\n public set emit(value)\n {\n this._emit = !!value;\n this._emitterLife = this.emitterLifetime;\n }\n\n /**\n * If the update function is called automatically from the shared ticker.\n * Setting this to false requires calling the update function manually.\n */\n public get autoUpdate(): boolean { return this._autoUpdate; }\n public set autoUpdate(value)\n {\n if (this._autoUpdate && !value)\n {\n ticker.remove(this.update, this);\n }\n else if (!this._autoUpdate && value)\n {\n ticker.add(this.update, this);\n }\n this._autoUpdate = !!value;\n }\n\n /**\n * Starts emitting particles, sets autoUpdate to true, and sets up the Emitter to destroy itself\n * when particle emission is complete.\n * @param callback Callback for when emission is complete (all particles have died off)\n */\n public playOnceAndDestroy(callback?: () => void): void\n {\n this.autoUpdate = true;\n this.emit = true;\n this._destroyWhenComplete = true;\n this._completeCallback = callback;\n }\n\n /**\n * Starts emitting particles and optionally calls a callback when particle emission is complete.\n * @param callback Callback for when emission is complete (all particles have died off)\n */\n public playOnce(callback?: () => void): void\n {\n this.emit = true;\n this._completeCallback = callback;\n }\n\n /**\n * Updates all particles spawned by this emitter and emits new ones.\n * @param delta Time elapsed since the previous frame, in __seconds__.\n */\n public update(delta: number): void\n {\n if (this._autoUpdate)\n {\n delta = delta / settings.TARGET_FPMS / 1000;\n }\n\n // if we don't have a parent to add particles to, then don't do anything.\n // this also works as a isDestroyed check\n if (!this._parent) return;\n // update existing particles\n let i;\n let particle;\n let next;\n\n for (particle = this._activeParticlesFirst; particle; particle = next)\n {\n next = particle.next;\n particle.update(delta);\n }\n let prevX;\n let prevY;\n // if the previous position is valid, store these for later interpolation\n\n if (this._prevPosIsValid)\n {\n prevX = this._prevEmitterPos.x;\n prevY = this._prevEmitterPos.y;\n }\n // store current position of the emitter as local variables\n const curX = this.ownerPos.x + this.spawnPos.x;\n const curY = this.ownerPos.y + this.spawnPos.y;\n // spawn new particles\n\n if (this._emit)\n {\n // decrease spawn timer\n this._spawnTimer -= delta < 0 ? 0 : delta;\n // while _spawnTimer < 0, we have particles to spawn\n while (this._spawnTimer <= 0)\n {\n // determine if the emitter should stop spawning\n if (this._emitterLife >= 0)\n {\n this._emitterLife -= this._frequency;\n if (this._emitterLife <= 0)\n {\n this._spawnTimer = 0;\n this._emitterLife = 0;\n this.emit = false;\n break;\n }\n }\n // determine if we have hit the particle limit\n if (this.particleCount >= this.maxParticles)\n {\n this._spawnTimer += this._frequency;\n continue;\n }\n // determine the particle lifetime\n let lifetime;\n\n if (this.minLifetime === this.maxLifetime)\n {\n lifetime = this.minLifetime;\n }\n else\n {\n lifetime = (Math.random() * (this.maxLifetime - this.minLifetime)) + this.minLifetime;\n }\n // only make the particle if it wouldn't immediately destroy itself\n if (-this._spawnTimer < lifetime)\n {\n // If the position has changed and this isn't the first spawn,\n // interpolate the spawn position\n let emitPosX; let\n emitPosY;\n\n if (this._prevPosIsValid && this._posChanged)\n {\n // 1 - _spawnTimer / delta, but _spawnTimer is negative\n const lerp = 1 + (this._spawnTimer / delta);\n\n emitPosX = ((curX - prevX) * lerp) + prevX;\n emitPosY = ((curY - prevY) * lerp) + prevY;\n }\n else// otherwise just set to the spawn position\n {\n emitPosX = curX;\n emitPosY = curY;\n }\n // create enough particles to fill the wave (non-burst types have a wave of 1)\n i = 0;\n for (let len = Math.min(this.particlesPerWave, this.maxParticles - this.particleCount); i < len; ++i)\n {\n // see if we actually spawn one\n if (this.spawnChance < 1 && Math.random() >= this.spawnChance)\n {\n continue;\n }\n // create particle\n let p;\n\n if (this._poolFirst)\n {\n p = this._poolFirst;\n this._poolFirst = this._poolFirst.next;\n p.next = null;\n }\n else\n {\n p = new this.particleConstructor(this);\n }\n\n // set a random texture if we have more than one\n if (this.particleImages.length > 1)\n {\n // if using ordered art\n if (this._currentImageIndex !== -1)\n {\n // get current art index, then increment for the next particle\n p.applyArt(this.particleImages[this._currentImageIndex++]);\n // loop around if needed\n if (this._currentImageIndex < 0 || this._currentImageIndex >= this.particleImages.length)\n {\n this._currentImageIndex = 0;\n }\n }\n // otherwise grab a random one\n else\n {\n p.applyArt(this.particleImages[Math.floor(Math.random() * this.particleImages.length)]);\n }\n }\n else\n {\n // if they are actually the same texture, a standard particle\n // will quit early from the texture setting in setTexture().\n p.applyArt(this.particleImages[0]);\n }\n // set up the start and end values\n p.alphaList.reset(this.startAlpha);\n if (this.minimumSpeedMultiplier !== 1)\n {\n // eslint-disable-next-line max-len\n p.speedMultiplier = (Math.random() * (1 - this.minimumSpeedMultiplier)) + this.minimumSpeedMultiplier;\n }\n p.speedList.reset(this.startSpeed);\n p.acceleration.x = this.acceleration.x;\n p.acceleration.y = this.acceleration.y;\n p.maxSpeed = this.maxSpeed;\n if (this.minimumScaleMultiplier !== 1)\n {\n // eslint-disable-next-line max-len\n p.scaleMultiplier = (Math.random() * (1 - this.minimumScaleMultiplier)) + this.minimumScaleMultiplier;\n }\n p.scaleList.reset(this.startScale);\n p.colorList.reset(this.startColor);\n // randomize the rotation speed\n if (this.minRotationSpeed === this.maxRotationSpeed)\n {\n p.rotationSpeed = this.minRotationSpeed;\n }\n else\n {\n // eslint-disable-next-line max-len\n p.rotationSpeed = (Math.random() * (this.maxRotationSpeed - this.minRotationSpeed)) + this.minRotationSpeed;\n }\n p.rotationAcceleration = this.rotationAcceleration;\n p.noRotation = this.noRotation;\n // set up the lifetime\n p.maxLife = lifetime;\n // set the blend mode\n p.blendMode = this.particleBlendMode;\n // set the custom ease, if any\n p.ease = this.customEase;\n // set the extra data, if any\n p.extraData = this.extraData;\n // set additional properties to particle\n this.applyAdditionalProperties(p);\n // call the proper function to handle rotation and position of particle\n this._spawnFunc(p, emitPosX, emitPosY, i);\n // initialize particle\n p.init();\n // add the particle to the display list\n if (this.addAtBack)\n {\n this._parent.addChildAt(p, 0);\n }\n else\n {\n this._parent.addChild(p);\n }\n // add particle to list of active particles\n if (this._activeParticlesLast)\n {\n this._activeParticlesLast.next = p;\n p.prev = this._activeParticlesLast;\n this._activeParticlesLast = p;\n }\n else\n {\n this._activeParticlesLast = this._activeParticlesFirst = p;\n }\n ++this.particleCount;\n // update the particle by the time passed, so the particles are spread out properly\n p.update(-this._spawnTimer);// we want a positive delta, because a negative delta messes things up\n }\n }\n // increase timer and continue on to any other particles that need to be created\n this._spawnTimer += this._frequency;\n }\n }\n // if the position changed before this update, then keep track of that\n if (this._posChanged)\n {\n this._prevEmitterPos.x = curX;\n this._prevEmitterPos.y = curY;\n this._prevPosIsValid = true;\n this._posChanged = false;\n }\n\n // if we are all done and should destroy ourselves, take care of that\n if (!this._emit && !this._activeParticlesFirst)\n {\n if (this._completeCallback)\n {\n const cb = this._completeCallback;\n\n this._completeCallback = null;\n cb();\n }\n if (this._destroyWhenComplete)\n {\n this.destroy();\n }\n }\n }\n\n /**\n * Set additional properties to new particle.\n * Using on classes that extend from Emitter\n * @param p The particle\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected applyAdditionalProperties(p: Particle): void\n {\n // for override in subclass\n }\n\n /**\n * Positions a particle for a point type emitter.\n * @param p The particle to position and rotate.\n * @param emitPosX The emitter's x position\n * @param emitPosY The emitter's y position\n * @param i The particle number in the current wave. Not used for this function.\n */\n protected _spawnPoint(p: Particle, emitPosX: number, emitPosY: number): void\n {\n // set the initial rotation/direction of the particle based on\n // starting particle angle and rotation of emitter\n if (this.minStartRotation === this.maxStartRotation)\n {\n p.rotation = this.minStartRotation + this.rotation;\n }\n else\n {\n // eslint-disable-next-line max-len\n p.rotation = (Math.random() * (this.maxStartRotation - this.minStartRotation)) + this.minStartRotation + this.rotation;\n }\n // drop the particle at the emitter's position\n p.position.x = emitPosX;\n p.position.y = emitPosY;\n }\n\n /**\n * Positions a particle for a rectangle type emitter.\n * @param p The particle to position and rotate.\n * @param emitPosX The emitter's x position\n * @param emitPosY The emitter's y position\n * @param i The particle number in the current wave. Not used for this function.\n */\n protected _spawnRect(p: Particle, emitPosX: number, emitPosY: number): void\n {\n // set the initial rotation/direction of the particle based on starting\n // particle angle and rotation of emitter\n if (this.minStartRotation === this.maxStartRotation)\n {\n p.rotation = this.minStartRotation + this.rotation;\n }\n else\n {\n // eslint-disable-next-line max-len\n p.rotation = (Math.random() * (this.maxStartRotation - this.minStartRotation)) + this.minStartRotation + this.rotation;\n }\n // place the particle at a random point in the rectangle\n helperPoint.x = (Math.random() * this.spawnRect.width) + this.spawnRect.x;\n helperPoint.y = (Math.random() * this.spawnRect.height) + this.spawnRect.y;\n if (this.rotation !== 0)\n {\n ParticleUtils.rotatePoint(this.rotation, helperPoint);\n }\n p.position.x = emitPosX + helperPoint.x;\n p.position.y = emitPosY + helperPoint.y;\n }\n\n /**\n * Positions a particle for a circle type emitter.\n * @param p The particle to position and rotate.\n * @param emitPosX The emitter's x position\n * @param emitPosY The emitter's y position\n * @param i The particle number in the current wave. Not used for this function.\n */\n protected _spawnCircle(p: Particle, emitPosX: number, emitPosY: number): void\n {\n // set the initial rotation/direction of the particle based on starting\n // particle angle and rotation of emitter\n if (this.minStartRotation === this.maxStartRotation)\n {\n p.rotation = this.minStartRotation + this.rotation;\n }\n else\n {\n // eslint-disable-next-line max-len\n p.rotation = (Math.random() * (this.maxStartRotation - this.minStartRotation)) + this.minStartRotation + this.rotation;\n }\n // place the particle at a random radius in the circle\n helperPoint.x = Math.random() * this.spawnCircle.radius;\n helperPoint.y = 0;\n // rotate the point to a random angle in the circle\n ParticleUtils.rotatePoint(Math.random() * 360, helperPoint);\n // offset by the circle's center\n helperPoint.x += this.spawnCircle.x;\n helperPoint.y += this.spawnCircle.y;\n // rotate the point by the emitter's rotation\n if (this.rotation !== 0)\n {\n ParticleUtils.rotatePoint(this.rotation, helperPoint);\n }\n // set the position, offset by the emitter's position\n p.position.x = emitPosX + helperPoint.x;\n p.position.y = emitPosY + helperPoint.y;\n }\n\n /**\n * Positions a particle for a ring type emitter.\n * @param p The particle to position and rotate.\n * @param emitPosX The emitter's x position\n * @param emitPosY The emitter's y position\n * @param i The particle number in the current wave. Not used for this function.\n */\n protected _spawnRing(p: Particle, emitPosX: number, emitPosY: number): void\n {\n const spawnCircle = this.spawnCircle;\n // set the initial rotation/direction of the particle based on starting\n // particle angle and rotation of emitter\n\n if (this.minStartRotation === this.maxStartRotation)\n {\n p.rotation = this.minStartRotation + this.rotation;\n }\n else\n {\n p.rotation = (Math.random() * (this.maxStartRotation - this.minStartRotation))\n + this.minStartRotation + this.rotation;\n }\n // place the particle at a random radius in the ring\n if (spawnCircle.minRadius !== spawnCircle.radius)\n {\n helperPoint.x = (Math.random() * (spawnCircle.radius - spawnCircle.minRadius))\n + spawnCircle.minRadius;\n }\n else\n {\n helperPoint.x = spawnCircle.radius;\n }\n helperPoint.y = 0;\n // rotate the point to a random angle in the circle\n const angle = Math.random() * 360;\n\n p.rotation += angle;\n ParticleUtils.rotatePoint(angle, helperPoint);\n // offset by the circle's center\n helperPoint.x += this.spawnCircle.x;\n helperPoint.y += this.spawnCircle.y;\n // rotate the point by the emitter's rotation\n if (this.rotation !== 0)\n {\n ParticleUtils.rotatePoint(this.rotation, helperPoint);\n }\n // set the position, offset by the emitter's position\n p.position.x = emitPosX + helperPoint.x;\n p.position.y = emitPosY + helperPoint.y;\n }\n\n /**\n * Positions a particle for polygonal chain.\n * @param p The particle to position and rotate.\n * @param emitPosX The emitter's x position\n * @param emitPosY The emitter's y position\n * @param i The particle number in the current wave. Not used for this function.\n */\n protected _spawnPolygonalChain(p: Particle, emitPosX: number, emitPosY: number): void\n {\n // set the initial rotation/direction of the particle based on starting\n // particle angle and rotation of emitter\n if (this.minStartRotation === this.maxStartRotation)\n {\n p.rotation = this.minStartRotation + this.rotation;\n }\n else\n {\n p.rotation = (Math.random() * (this.maxStartRotation - this.minStartRotation))\n + this.minStartRotation + this.rotation;\n }\n // get random point on the polygon chain\n this.spawnPolygonalChain.getRandomPoint(helperPoint);\n // rotate the point by the emitter's rotation\n if (this.rotation !== 0)\n {\n ParticleUtils.rotatePoint(this.rotation, helperPoint);\n }\n // set the position, offset by the emitter's position\n p.position.x = emitPosX + helperPoint.x;\n p.position.y = emitPosY + helperPoint.y;\n }\n\n /**\n * Positions a particle for a burst type emitter.\n * @param p The particle to position and rotate.\n * @param emitPosX The emitter's x position\n * @param emitPosY The emitter's y position\n * @param i The particle number in the current wave.\n */\n protected _spawnBurst(p: Particle, emitPosX: number, emitPosY: number, i: number): void\n {\n // set the initial rotation/direction of the particle based on spawn\n // angle and rotation of emitter\n if (this.particleSpacing === 0)\n {\n p.rotation = Math.random() * 360;\n }\n else\n {\n p.rotation = this.angleStart + (this.particleSpacing * i) + this.rotation;\n }\n // drop the particle at the emitter's position\n p.position.x = emitPosX;\n p.position.y = emitPosY;\n }\n\n /**\n * Kills all active particles immediately.\n */\n public cleanup(): void\n {\n let particle;\n let next;\n\n for (particle = this._activeParticlesFirst; particle; particle = next)\n {\n next = particle.next;\n this.recycle(particle);\n if (particle.parent)\n {\n particle.parent.removeChild(particle);\n }\n }\n this._activeParticlesFirst = this._activeParticlesLast = null;\n this.particleCount = 0;\n }\n\n /**\n * Destroys the emitter and all of its particles.\n */\n public destroy(): void\n {\n // make sure we aren't still listening to any tickers\n this.autoUpdate = false;\n // puts all active particles in the pool, and removes them from the particle parent\n this.cleanup();\n // wipe the pool clean\n let next;\n\n for (let particle = this._poolFirst; particle; particle = next)\n {\n // store next value so we don't lose it in our destroy call\n next = particle.next;\n particle.destroy();\n }\n this._poolFirst = this._parent = this.particleImages = this.spawnPos = this.ownerPos\n = this.startColor = this.startScale = this.startAlpha = this.startSpeed\n = this.customEase = this._completeCallback = null;\n }\n}\n","import { Emitter } from './Emitter';\nimport { ParticleUtils, SimpleEase, Color, GetTextureFromString } from './ParticleUtils';\nimport { PropertyList } from './PropertyList';\nimport { LinkedListChild } from './LinkedListContainer';\nimport { Sprite, Point, Texture } from 'pixi.js';\n\n/**\n * An individual particle image. You shouldn't have to deal with these.\n */\nexport class Particle extends Sprite implements LinkedListChild\n{\n /**\n * The emitter that controls this particle.\n */\n public emitter: Emitter;\n /**\n * The velocity of the particle. Speed may change, but the angle also\n * contained in velocity is constant.\n */\n public velocity: Point;\n /**\n * The maximum lifetime of this particle, in seconds.\n */\n public maxLife: number;\n /**\n * The current age of the particle, in seconds.\n */\n public age: number;\n /**\n * A simple easing function to be applied to all properties that\n * are being interpolated.\n */\n public ease: SimpleEase;\n /**\n * Extra data that the emitter passes along for custom particles.\n */\n public extraData: any;\n /**\n * The alpha of the particle throughout its life.\n */\n public alphaList: PropertyList;\n /**\n * The speed of the particle throughout its life.\n */\n public speedList: PropertyList;\n /**\n * A multiplier from 0-1 applied to the speed of the particle at all times.\n */\n public speedMultiplier: number;\n /**\n * Acceleration to apply to the particle.\n */\n public acceleration: Point;\n /**\n * The maximum speed allowed for accelerating particles. Negative values, values of 0 or NaN\n * will disable the maximum speed.\n */\n public maxSpeed: number;\n /**\n * Speed at which the particle rotates, in radians per second.\n */\n public rotationSpeed: number;\n\n /**\n * Acceleration of rotation (angular acceleration) to apply to the particle.\n */\n public rotationAcceleration: number;\n\n /**\n * If particle rotation is locked, preventing rotation from occurring due\n * to directional changes.\n */\n public noRotation: boolean;\n /**\n * The scale of the particle throughout its life.\n */\n public scaleList: PropertyList;\n /**\n * A multiplier from 0-1 applied to the scale of the particle at all times.\n */\n public scaleMultiplier: number;\n /**\n * The tint of the particle throughout its life.\n */\n public colorList: PropertyList;\n /**\n * A reference to init, so that subclasses can access it without the penalty of Function.call()\n */\n protected Particle_init: typeof Particle.prototype.init;\n /**\n * A reference to update so that subclasses can access the original without the overhead\n * of Function.call().\n * @param delta Time elapsed since the previous frame, in __seconds__.\n * @return The standard interpolation multiplier (0-1) used for all relevant particle\n * properties. A value of -1 means the particle died of old age instead.\n */\n protected Particle_update: typeof Particle.prototype.update;\n protected Particle_destroy: typeof Particle.prototype.destroy;\n protected Sprite_destroy: typeof Sprite.prototype.destroy;\n /**\n * If alpha should be interpolated at all.\n */\n protected _doAlpha: boolean;\n /**\n * If scale should be interpolated at all.\n */\n protected _doScale: boolean;\n /**\n * If speed should be interpolated at all.\n */\n protected _doSpeed: boolean;\n /**\n * If acceleration should be handled at all. _doSpeed is mutually exclusive with this,\n * and _doSpeed gets priority.\n */\n protected _doAcceleration: boolean;\n /**\n * If color should be interpolated at all.\n */\n protected _doColor: boolean;\n /**\n * If normal movement should be handled. Subclasses wishing to override movement\n * can set this to false in init().\n */\n protected _doNormalMovement: boolean;\n /**\n * One divided by the max life of the particle, saved for slightly faster math.\n */\n private _oneOverLife: number;\n /**\n * Reference to the next particle in the list.\n */\n public next: Particle;\n\n /**\n * Reference to the previous particle in the list.\n */\n public prev: Particle;\n\n public prevChild: LinkedListChild;\n public nextChild: LinkedListChild;\n\n /**\n * @param {PIXI.particles.Emitter} emitter The emitter that controls this particle.\n */\n constructor(emitter: Emitter)\n {\n // start off the sprite with a blank texture, since we are going to replace it\n // later when the particle is initialized.\n super();\n // initialize LinkedListChild props so they are included in underlying JS class definition\n this.prevChild = this.nextChild = null;\n\n this.emitter = emitter;\n // particles should be centered\n this.anchor.x = this.anchor.y = 0.5;\n this.velocity = new Point();\n this.rotationSpeed = 0;\n this.rotationAcceleration = 0;\n this.maxLife = 0;\n this.age = 0;\n this.ease = null;\n this.extraData = null;\n this.alphaList = new PropertyList();\n this.speedList = new PropertyList();\n this.speedMultiplier = 1;\n this.acceleration = new Point();\n this.maxSpeed = NaN;\n this.scaleList = new PropertyList();\n this.scaleMultiplier = 1;\n this.colorList = new PropertyList(true);\n this._doAlpha = false;\n this._doScale = false;\n this._doSpeed = false;\n this._doAcceleration = false;\n this._doColor = false;\n this._doNormalMovement = false;\n this._oneOverLife = 0;\n this.next = null;\n this.prev = null;\n\n // save often used functions on the instance instead of the prototype for better speed\n this.init = this.init;\n this.Particle_init = Particle.prototype.init;\n this.update = this.update;\n this.Particle_update = Particle.prototype.update;\n this.Sprite_destroy = super.destroy;\n this.Particle_destroy = Particle.prototype.destroy;\n this.applyArt = this.applyArt;\n this.kill = this.kill;\n }\n\n /**\n * Initializes the particle for use, based on the properties that have to\n * have been set already on the particle.\n */\n public init(): void\n {\n // reset the age\n this.age = 0;\n // set up the velocity based on the start speed and rotation\n this.velocity.x = this.speedList.current.value * this.speedMultiplier;\n this.velocity.y = 0;\n ParticleUtils.rotatePoint(this.rotation, this.velocity);\n if (this.noRotation)\n {\n this.rotation = 0;\n }\n else\n {\n // convert rotation to Radians from Degrees\n this.rotation *= ParticleUtils.DEG_TO_RADS;\n }\n // convert rotation speed to Radians from Degrees\n this.rotationSpeed *= ParticleUtils.DEG_TO_RADS;\n this.rotationAcceleration *= ParticleUtils.DEG_TO_RADS;\n\n // set alpha to inital alpha\n this.alpha = this.alphaList.current.value;\n // set scale to initial scale\n this.scale.x = this.scale.y = this.scaleList.current.value;\n // figure out what we need to interpolate\n this._doAlpha = !!this.alphaList.current.next;\n this._doSpeed = !!this.speedList.current.next;\n this._doScale = !!this.scaleList.current.next;\n this._doColor = !!this.colorList.current.next;\n this._doAcceleration = this.acceleration.x !== 0 || this.acceleration.y !== 0;\n // _doNormalMovement can be cancelled by subclasses\n this._doNormalMovement = this._doSpeed || this.speedList.current.value !== 0 || this._doAcceleration;\n // save our lerp helper\n this._oneOverLife = 1 / this.maxLife;\n // set the inital color\n const color = this.colorList.current.value;\n\n this.tint = ParticleUtils.combineRGBComponents(color.r, color.g, color.b);\n // ensure visibility\n this.visible = true;\n }\n\n /**\n * Sets the texture for the particle. This can be overridden to allow\n * for an animated particle.\n * @param art The texture to set.\n */\n public applyArt(art: any): void\n {\n this.texture = art || Texture.EMPTY;\n }\n\n /**\n * Updates the particle.\n * @param delta Time elapsed since the previous frame, in __seconds__.\n * @return The standard interpolation multiplier (0-1) used for all\n * relevant particle properties. A value of -1 means the particle\n * died of old age instead.\n */\n public update(delta: number): number\n {\n // increase age\n this.age += delta;\n // recycle particle if it is too old\n if (this.age >= this.maxLife || this.age < 0)\n {\n this.kill();\n\n return -1;\n }\n\n // determine our interpolation value\n let lerp = this.age * this._oneOverLife;// lifetime / maxLife;\n\n if (this.ease)\n {\n if (this.ease.length === 4)\n {\n // the t, b, c, d parameters that some tween libraries use\n // (time, initial value, end value, duration)\n lerp = (this.ease as any)(lerp, 0, 1, 1);\n }\n else\n {\n // the simplified version that we like that takes\n // one parameter, time from 0-1. TweenJS eases provide this usage.\n lerp = this.ease(lerp);\n }\n }\n\n // interpolate alpha\n if (this._doAlpha)\n {\n this.alpha = this.alphaList.interpolate(lerp);\n }\n // interpolate scale\n if (this._doScale)\n {\n const scale = this.scaleList.interpolate(lerp) * this.scaleMultiplier;\n\n this.scale.x = this.scale.y = scale;\n }\n // handle movement\n if (this._doNormalMovement)\n {\n let deltaX: number;\n let deltaY: number;\n // interpolate speed\n\n if (this._doSpeed)\n {\n const speed = this.speedList.interpolate(lerp) * this.speedMultiplier;\n\n ParticleUtils.normalize(this.velocity);\n ParticleUtils.scaleBy(this.velocity, speed);\n deltaX = this.velocity.x * delta;\n deltaY = this.velocity.y * delta;\n }\n else if (this._doAcceleration)\n {\n const oldVX = this.velocity.x;\n const oldVY = this.velocity.y;\n\n this.velocity.x += this.acceleration.x * delta;\n this.velocity.y += this.acceleration.y * delta;\n if (this.maxSpeed)\n {\n const currentSpeed = ParticleUtils.length(this.velocity);\n // if we are going faster than we should, clamp at the max speed\n // DO NOT recalculate vector length\n\n if (currentSpeed > this.maxSpeed)\n {\n ParticleUtils.scaleBy(this.velocity, this.maxSpeed / currentSpeed);\n }\n }\n // calculate position delta by the midpoint between our old velocity and our new velocity\n deltaX = (oldVX + this.velocity.x) / 2 * delta;\n deltaY = (oldVY + this.velocity.y) / 2 * delta;\n }\n else\n {\n deltaX = this.velocity.x * delta;\n deltaY = this.velocity.y * delta;\n }\n // adjust position based on velocity\n this.position.x += deltaX;\n this.position.y += deltaY;\n }\n // interpolate color\n if (this._doColor)\n {\n this.tint = this.colorList.interpolate(lerp);\n }\n // update rotation\n if (this.rotationAcceleration !== 0)\n {\n const newRotationSpeed = this.rotationSpeed + (this.rotationAcceleration * delta);\n\n this.rotation += (this.rotationSpeed + newRotationSpeed) / 2 * delta;\n this.rotationSpeed = newRotationSpeed;\n }\n else if (this.rotationSpeed !== 0)\n {\n this.rotation += this.rotationSpeed * delta;\n }\n else if (this.acceleration && !this.noRotation)\n {\n this.rotation = Math.atan2(this.velocity.y, this.velocity.x);// + Math.PI / 2;\n }\n\n return lerp;\n }\n\n /**\n * Kills the particle, removing it from the display list\n * and telling the emitter to recycle it.\n */\n public kill(): void\n {\n this.emitter.recycle(this);\n }\n\n /**\n * Destroys the particle, removing references and preventing future use.\n */\n public destroy(): void\n {\n if (this.parent)\n {\n this.parent.removeChild(this);\n }\n this.Sprite_destroy();\n this.emitter = this.velocity = this.colorList = this.scaleList = this.alphaList\n = this.speedList = this.ease = this.next = this.prev = null;\n }\n\n /**\n * Checks over the art that was passed to the Emitter's init() function, to do any special\n * modifications to prepare it ahead of time.\n * @param art The array of art data. For Particle, it should be an array of\n * Textures. Any strings in the array will be converted to\n * Textures via Texture.from().\n * @return The art, after any needed modifications.\n */\n public static parseArt(art: any[]): any[]\n {\n // convert any strings to Textures.\n let i;\n\n for (i = art.length; i >= 0; --i)\n {\n if (typeof art[i] === 'string')\n {\n art[i] = GetTextureFromString(art[i]);\n }\n }\n // particles from different base textures will be slower in WebGL than if they\n // were from one spritesheet\n if (ParticleUtils.verbose)\n {\n for (i = art.length - 1; i > 0; --i)\n {\n if (art[i].baseTexture !== art[i - 1].baseTexture)\n {\n if (window.console)\n {\n // eslint-disable-next-line max-len\n console.warn('PixiParticles: using particle textures from different images may hinder performance in WebGL');\n }\n break;\n }\n }\n }\n\n return art;\n }\n\n /**\n * Parses extra emitter data to ensure it is set up for this particle class.\n * Particle does nothing to the extra data.\n * @param extraData The extra data from the particle config.\n * @return The parsed extra data.\n */\n public static parseData(extraData: any): any\n {\n return extraData;\n }\n}\n","import { Point } from 'pixi.js';\n\nexport interface BasicPoint\n{\n x: number;\n y: number;\n}\n\nexport interface Segment\n{\n p1: BasicPoint;\n p2: BasicPoint;\n l: number;\n}\n\n/**\n * Chain of line segments for generating spawn positions.\n */\nexport class PolygonalChain\n{\n /**\n * List of segment objects in the chain.\n */\n private segments: Segment[];\n /**\n * Total length of all segments of the chain.\n */\n private totalLength: number;\n /**\n * Total length of segments up to and including the segment of the same index.\n * Used for weighted random selection of segment.\n */\n private countingLengths: number[];\n\n /**\n * @param data Point data for polygon chains. Either a list of points for a single chain, or a list of chains.\n */\n constructor(data: BasicPoint[]|BasicPoint[][])\n {\n this.segments = [];\n this.countingLengths = [];\n this.totalLength = 0;\n this.init(data);\n }\n\n /**\n * @param data Point data for polygon chains. Either a list of points for a single chain, or a list of chains.\n */\n private init(data: BasicPoint[]|BasicPoint[][]): void\n {\n // if data is not present, set up a segment of length 0\n if (!data || !data.length)\n {\n this.segments.push({ p1: { x: 0, y: 0 }, p2: { x: 0, y: 0 }, l: 0 });\n }\n else if (Array.isArray(data[0]))\n {\n // list of segment chains, each defined as a list of points\n for (let i = 0; i < data.length; ++i)\n {\n // loop through the chain, connecting points\n const chain = data[i] as BasicPoint[];\n let prevPoint = chain[0] as BasicPoint;\n\n for (let j = 1; j < chain.length; ++j)\n {\n const second = chain[j] as BasicPoint;\n\n this.segments.push({ p1: prevPoint, p2: second, l: 0 });\n prevPoint = second;\n }\n }\n }\n else\n {\n let prevPoint = data[0] as BasicPoint;\n // list of points\n\n for (let i = 1; i < data.length; ++i)\n {\n const second = data[i] as BasicPoint;\n\n this.segments.push({ p1: prevPoint, p2: second, l: 0 });\n prevPoint = second;\n }\n }\n // now go through our segments to calculate the lengths so that we\n // can set up a nice weighted random distribution\n for (let i = 0; i < this.segments.length; ++i)\n {\n const { p1, p2 } = this.segments[i];\n const segLength = Math.sqrt(((p2.x - p1.x) * (p2.x - p1.x)) + ((p2.y - p1.y) * (p2.y - p1.y)));\n // save length so we can turn a random number into a 0-1 interpolation value later\n\n this.segments[i].l = segLength;\n this.totalLength += segLength;\n // keep track of the length so far, counting up\n this.countingLengths.push(this.totalLength);\n }\n }\n\n /**\n * Gets a random point in the chain.\n * @param out The point to store the selected position in.\n */\n public getRandomPoint(out: Point): void\n {\n // select a random spot in the length of the chain\n const rand = Math.random() * this.totalLength;\n let chosenSeg: Segment;\n let lerp: number;\n\n // if only one segment, it wins\n if (this.segments.length === 1)\n {\n chosenSeg = this.segments[0];\n lerp = rand;\n }\n else\n {\n // otherwise, go through countingLengths until we have determined\n // which segment we chose\n for (let i = 0; i < this.countingLengths.length; ++i)\n {\n if (rand < this.countingLengths[i])\n {\n chosenSeg = this.segments[i];\n // set lerp equal to the length into that segment\n // (i.e. the remainder after subtracting all the segments before it)\n lerp = i === 0 ? rand : rand - this.countingLengths[i - 1];\n break;\n }\n }\n }\n // divide lerp by the segment length, to result in a 0-1 number.\n lerp /= chosenSeg.l || 1;\n const { p1, p2 } = chosenSeg;\n // now calculate the position in the segment that the lerp value represents\n\n out.x = p1.x + (lerp * (p2.x - p1.x));\n out.y = p1.y + (lerp * (p2.y - p1.y));\n }\n}\n","import { ParticleUtils } from './ParticleUtils';\nimport { Particle } from './Particle';\nimport { Emitter } from './Emitter';\nimport { Point, Texture } from 'pixi.js';\n\n/**\n * A helper point for math things.\n * @hidden\n */\nconst helperPoint = new Point();\n\n/**\n * A hand picked list of Math functions (and a couple properties) that are\n * allowable. They should be used without the preceding \"Math.\"\n * @hidden\n */\nconst MATH_FUNCS = [\n 'pow',\n 'sqrt',\n 'abs',\n 'floor',\n 'round',\n 'ceil',\n 'E',\n 'PI',\n 'sin',\n 'cos',\n 'tan',\n 'asin',\n 'acos',\n 'atan',\n 'atan2',\n 'log',\n];\n/**\n * create an actual regular expression object from the string\n * @hidden\n */\nconst WHITELISTER = new RegExp(\n [\n // Allow the 4 basic operations, parentheses and all numbers/decimals, as well\n // as 'x', for the variable usage.\n '[01234567890\\\\.\\\\*\\\\-\\\\+\\\\/\\\\(\\\\)x ,]',\n ].concat(MATH_FUNCS).join('|'),\n 'g',\n);\n\n/**\n * Parses a string into a function for path following.\n * This involves whitelisting the string for safety, inserting \"Math.\" to math function\n * names, and using `new Function()` to generate a function.\n * @hidden\n * @param pathString The string to parse.\n * @return The path function - takes x, outputs y.\n */\nfunction parsePath(pathString: string): (x: number) => number\n{\n const matches = pathString.match(WHITELISTER);\n\n for (let i = matches.length - 1; i >= 0; --i)\n {\n if (MATH_FUNCS.indexOf(matches[i]) >= 0)\n { matches[i] = `Math.${matches[i]}`; }\n }\n pathString = matches.join('');\n\n // eslint-disable-next-line no-new-func\n return new Function('x', `return ${pathString};`) as (x: number) => number;\n}\n\n/**\n * An particle that follows a path defined by an algebraic expression, e.g. \"sin(x)\" or\n * \"5x + 3\".\n * To use this class, the particle config must have a \"path\" string in the\n * \"extraData\" parameter. This string should have \"x\" in it to represent movement (from the\n * speed settings of the particle). It may have numbers, parentheses, the four basic\n * operations, and the following Math functions or properties (without the preceding \"Math.\"):\n * \"pow\", \"sqrt\", \"abs\", \"floor\", \"round\", \"ceil\", \"E\", \"PI\", \"sin\", \"cos\", \"tan\", \"asin\",\n * \"acos\", \"atan\", \"atan2\", \"log\".\n * The overall movement of the particle and the expression value become x and y positions for\n * the particle, respectively. The final position is rotated by the spawn rotation/angle of\n * the particle.\n *\n * Some example paths:\n *\n * \t\"sin(x/10) * 20\" // A sine wave path.\n * \t\"cos(x/100) * 30\" // Particles curve counterclockwise (for medium speed/low lifetime particles)\n * \t\"pow(x/10, 2) / 2\" // Particles curve clockwise (remember, +y is down).\n */\nexport class PathParticle extends Particle\n{\n /**\n * The function representing the path the particle should take.\n */\n public path: Function;\n /**\n * The initial rotation in degrees of the particle, because the direction of the path\n * is based on that.\n */\n public initialRotation: number;\n /**\n * The initial position of the particle, as all path movement is added to that.\n */\n public initialPosition: Point;\n /**\n * Total single directional movement, due to speed.\n */\n public movement: number;\n\n /**\n * @param {PIXI.particles.Emitter} emitter The emitter that controls this PathParticle.\n */\n constructor(emitter: Emitter)\n {\n super(emitter);\n this.path = null;\n this.initialRotation = 0;\n this.initialPosition = new Point();\n this.movement = 0;\n }\n\n /**\n * Initializes the particle for use, based on the properties that have to\n * have been set already on the particle.\n */\n public init(): void\n {\n // get initial rotation before it is converted to radians\n this.initialRotation = this.rotation;\n // standard init\n this.Particle_init();\n\n // set the path for the particle\n this.path = this.extraData.path;\n // cancel the normal movement behavior\n this._doNormalMovement = !this.path;\n // reset movement\n this.movement = 0;\n // grab position\n this.initialPosition.x = this.position.x;\n this.initialPosition.y = this.position.y;\n }\n\n /**\n * Updates the particle.\n * @param delta Time elapsed since the previous frame, in __seconds__.\n */\n public update(delta: number): number\n {\n const lerp = this.Particle_update(delta);\n // if the particle died during the update, then don't bother\n\n if (lerp >= 0 && this.path)\n {\n // increase linear movement based on speed\n if (this._doSpeed)\n {\n const speed = this.speedList.interpolate(lerp) * this.speedMultiplier;\n\n this.movement += speed * delta;\n }\n else\n {\n const speed = this.speedList.current.value * this.speedMultiplier;\n\n this.movement += speed * delta;\n }\n // set up the helper point for rotation\n helperPoint.x = this.movement;\n helperPoint.y = this.path(this.movement);\n ParticleUtils.rotatePoint(this.initialRotation, helperPoint);\n this.position.x = this.initialPosition.x + helperPoint.x;\n this.position.y = this.initialPosition.y + helperPoint.y;\n }\n\n return lerp;\n }\n\n /**\n * Destroys the particle, removing references and preventing future use.\n */\n public destroy(): void\n {\n this.Particle_destroy();\n this.path = this.initialPosition = null;\n }\n\n /**\n * Checks over the art that was passed to the Emitter's init() function, to do any special\n * modifications to prepare it ahead of time. This just runs Particle.parseArt().\n * @param art The array of art data. For Particle, it should be an array of\n * Textures. Any strings in the array will be converted to\n * Textures via Texture.fromImage().\n * @return The art, after any needed modifications.\n */\n public static parseArt(art: (Texture|string)[]): Texture[]\n {\n return Particle.parseArt(art);\n }\n\n /**\n * Parses extra emitter data to ensure it is set up for this particle class.\n * PathParticle checks for the existence of path data, and parses the path data for use\n * by particle instances.\n * @param extraData The extra data from the particle config.\n * @return The parsed extra data.\n */\n public static parseData(extraData: {path: string}): any\n {\n const output: any = {};\n\n if (extraData && extraData.path)\n {\n try\n {\n output.path = parsePath(extraData.path);\n }\n catch (e)\n {\n if (ParticleUtils.verbose)\n {\n console.error('PathParticle: error in parsing path expression');\n }\n output.path = null;\n }\n }\n else\n {\n if (ParticleUtils.verbose)\n {\n console.error('PathParticle requires a path string in extraData!');\n }\n output.path = null;\n }\n\n return output;\n }\n}\n","import { Particle } from './Particle';\nimport { Emitter } from './Emitter';\nimport { GetTextureFromString } from './ParticleUtils';\nimport { Texture } from 'pixi.js';\n\nexport interface ParsedAnimatedParticleArt\n{\n textures: Texture[];\n duration: number;\n framerate: number;\n loop: boolean;\n}\n\nexport interface AnimatedParticleArt\n{\n framerate: 'matchLife'|number;\n loop?: boolean;\n textures: (string|Texture|{texture: string|Texture;count: number})[];\n}\n\n/**\n * An individual particle image with an animation. Art data passed to the emitter must be\n * formatted in a particular way for AnimatedParticle to be able to handle it:\n *\n * ```typescript\n * {\n * //framerate is required. It is the animation speed of the particle in frames per\n * //second.\n * //A value of \"matchLife\" causes the animation to match the lifetime of an individual\n * //particle, instead of at a constant framerate. This causes the animation to play\n * //through one time, completing when the particle expires.\n * framerate: 6,\n * //loop is optional, and defaults to false.\n * loop: true,\n * //textures is required, and can be an array of any (non-zero) length.\n * textures: [\n * //each entry represents a single texture that should be used for one or more\n * //frames. Any strings will be converted to Textures with Texture.from().\n * //Instances of PIXI.Texture will be used directly.\n * \"animFrame1.png\",\n * //entries can be an object with a 'count' property, telling AnimatedParticle to\n * //use that texture for 'count' frames sequentially.\n * {\n * texture: \"animFrame2.png\",\n * count: 3\n * },\n * \"animFrame3.png\"\n * ]\n * }\n * ```\n */\nexport class AnimatedParticle extends Particle\n{\n /**\n * Texture array used as each frame of animation, similarly to how MovieClip works.\n */\n private textures: Texture[];\n\n /**\n * Duration of the animation, in seconds.\n */\n private duration: number;\n\n /**\n * Animation framerate, in frames per second.\n */\n private framerate: number;\n\n /**\n * Animation time elapsed, in seconds.\n */\n private elapsed: number;\n\n /**\n * If this particle animation should loop.\n */\n private loop: boolean;\n\n /**\n * @param emitter The emitter that controls this AnimatedParticle.\n */\n constructor(emitter: Emitter)\n {\n super(emitter);\n\n this.textures = null;\n this.duration = 0;\n this.framerate = 0;\n this.elapsed = 0;\n this.loop = false;\n }\n\n /**\n * Initializes the particle for use, based on the properties that have to\n * have been set already on the particle.\n */\n public init(): void\n {\n this.Particle_init();\n\n this.elapsed = 0;\n\n // if the animation needs to match the particle's life, then cacluate variables\n if (this.framerate < 0)\n {\n this.duration = this.maxLife;\n this.framerate = this.textures.length / this.duration;\n }\n }\n\n /**\n * Sets the textures for the particle.\n * @param art An array of PIXI.Texture objects for this animated particle.\n */\n public applyArt(art: ParsedAnimatedParticleArt): void\n {\n this.textures = art.textures;\n this.framerate = art.framerate;\n this.duration = art.duration;\n this.loop = art.loop;\n }\n\n /**\n * Updates the particle.\n * @param delta Time elapsed since the previous frame, in __seconds__.\n */\n public update(delta: number): number\n {\n const lerp = this.Particle_update(delta);\n // only animate the particle if it is still alive\n\n if (lerp >= 0)\n {\n this.elapsed += delta;\n if (this.elapsed > this.duration)\n {\n // loop elapsed back around\n if (this.loop)\n {\n this.elapsed = this.elapsed % this.duration;\n }\n // subtract a small amount to prevent attempting to go past the end of the animation\n else\n {\n this.elapsed = this.duration - 0.000001;\n }\n }\n // add a very small number to the frame and then floor it to avoid\n // the frame being one short due to floating point errors.\n const frame = ((this.elapsed * this.framerate) + 0.0000001) | 0;\n\n this.texture = this.textures[frame] || Texture.EMPTY;\n }\n\n return lerp;\n }\n\n /**\n * Destroys the particle, removing references and preventing future use.\n */\n public destroy(): void\n {\n this.Particle_destroy();\n this.textures = null;\n }\n\n /**\n * Checks over the art that was passed to the Emitter's init() function, to do any special\n * modifications to prepare it ahead of time.\n * @param art The array of art data, properly formatted for AnimatedParticle.\n * @return The art, after any needed modifications.\n */\n public static parseArt(art: AnimatedParticleArt[]): any\n {\n const outArr: ParsedAnimatedParticleArt[] = [];\n\n for (let i = 0; i < art.length; ++i)\n {\n const data = art[i];\n const output = outArr[i] = {} as ParsedAnimatedParticleArt;\n const outTextures = output.textures = [] as Texture[];\n const textures = data.textures;\n\n for (let j = 0; j < textures.length; ++j)\n {\n let tex = textures[j];\n\n if (typeof tex === 'string')\n {\n outTextures.push(GetTextureFromString(tex));\n }\n else if (tex instanceof Texture)\n {\n outTextures.push(tex);\n }\n // assume an object with extra data determining duplicate frame data\n else\n {\n let dupe = tex.count || 1;\n\n if (typeof tex.texture === 'string')\n {\n tex = GetTextureFromString(tex.texture);\n }\n else// if(tex.texture instanceof Texture)\n {\n tex = tex.texture;\n }\n for (; dupe > 0; --dupe)\n {\n outTextures.push(tex);\n }\n }\n }\n\n // use these values to signify that the animation should match the particle life time.\n if (data.framerate === 'matchLife')\n {\n // -1 means that it should be calculated\n output.framerate = -1;\n output.duration = 0;\n output.loop = false;\n }\n else\n {\n // determine if the animation should loop\n output.loop = !!data.loop;\n // get the framerate, default to 60\n output.framerate = data.framerate > 0 ? data.framerate : 60;\n // determine the duration\n output.duration = outTextures.length / output.framerate;\n }\n }\n\n return outArr;\n }\n}\n","import { Container, DisplayObject, Renderer, Rectangle, MaskData } from 'pixi.js';\n\n/** Interface for a child of a LinkedListContainer (has the prev/next properties added) */\nexport interface LinkedListChild extends DisplayObject\n{\n nextChild: LinkedListChild|null;\n prevChild: LinkedListChild|null;\n}\n\n/**\n * A semi-experimental Container that uses a doubly linked list to manage children instead of an\n * array. This means that adding/removing children often is not the same performance hit that\n * it would to be continually pushing/splicing.\n * However, this is primarily intended to be used for heavy particle usage, and may not handle\n * edge cases well if used as a complete Container replacement.\n */\nexport class LinkedListContainer extends Container\n{\n private _firstChild: LinkedListChild|null = null;\n private _lastChild: LinkedListChild|null = null;\n private _childCount = 0;\n\n public get firstChild(): LinkedListChild\n {\n return this._firstChild;\n }\n\n public get lastChild(): LinkedListChild\n {\n return this._lastChild;\n }\n\n public get childCount(): number\n {\n return this._childCount;\n }\n\n public addChild(...children: T): T[0]\n {\n // if there is only one argument we can bypass looping through the them\n if (children.length > 1)\n {\n // loop through the array and add all children\n for (let i = 0; i < children.length; i++)\n {\n // eslint-disable-next-line prefer-rest-params\n this.addChild(children[i]);\n }\n }\n else\n {\n const child = children[0] as LinkedListChild;\n // if the child has a parent then lets remove it as PixiJS objects can only exist in one place\n\n if (child.parent)\n {\n child.parent.removeChild(child);\n }\n\n (child as any).parent = this;\n this.sortDirty = true;\n\n // ensure child transform will be recalculated\n (child.transform as any)._parentID = -1;\n\n // add to list if we have a list\n if (this._lastChild)\n {\n this._lastChild.nextChild = child;\n child.prevChild = this._lastChild;\n this._lastChild = child;\n }\n // otherwise initialize the list\n else\n {\n this._firstChild = this._lastChild = child;\n }\n\n // update child count\n ++this._childCount;\n\n // ensure bounds will be recalculated\n (this as any)._boundsID++;\n\n // TODO - lets either do all callbacks or all events.. not both!\n this.onChildrenChange();\n this.emit('childAdded', child, this, this._childCount);\n child.emit('added', this);\n }\n\n return children[0];\n }\n\n public addChildAt(child: T, index: number): T\n {\n if (index < 0 || index > this._childCount)\n {\n throw new Error(`addChildAt: The index ${index} supplied is out of bounds ${this._childCount}`);\n }\n\n if (child.parent)\n {\n child.parent.removeChild(child);\n }\n\n (child as any).parent = this;\n this.sortDirty = true;\n\n // ensure child transform will be recalculated\n (child.transform as any)._parentID = -1;\n\n const c = (child as any) as LinkedListChild;\n\n // if no children, do basic initialization\n if (!this._firstChild)\n {\n this._firstChild = this._lastChild = c;\n }\n // add at beginning (back)\n else if (index === 0)\n {\n this._firstChild.prevChild = c;\n c.nextChild = this._firstChild;\n this._firstChild = c;\n }\n // add at end (front)\n else if (index === this._childCount)\n {\n this._lastChild.nextChild = c;\n c.prevChild = this._lastChild;\n this._lastChild = c;\n }\n // otherwise we have to start counting through the children to find the right one\n // - SLOW, only provided to fully support the possibility of use\n else\n {\n let i = 0;\n let target = this._firstChild;\n\n while (i < index)\n {\n target = target.nextChild;\n ++i;\n }\n // insert before the target that we found at the specified index\n target.prevChild.nextChild = c;\n c.prevChild = target.prevChild;\n c.nextChild = target;\n target.prevChild = c;\n }\n\n // update child count\n ++this._childCount;\n\n // ensure bounds will be recalculated\n (this as any)._boundsID++;\n\n // TODO - lets either do all callbacks or all events.. not both!\n (this as any).onChildrenChange(index);// the PixiJS types say this has no arguments\n child.emit('added', this);\n this.emit('childAdded', child, this, index);\n\n return child;\n }\n\n /**\n * Adds a child to the container to be rendered below another child.\n *\n * @param child The child to add\n * @param relative - The current child to add the new child relative to.\n * @return The child that was added.\n */\n public addChildBelow(child: T, relative: DisplayObject): T\n {\n if (relative.parent !== this)\n {\n throw new Error(`addChildBelow: The relative target must be a child of this parent`);\n }\n\n if (child.parent)\n {\n child.parent.removeChild(child);\n }\n\n (child as any).parent = this;\n this.sortDirty = true;\n\n // ensure child transform will be recalculated\n (child.transform as any)._parentID = -1;\n\n // insert before the target that we were given\n (relative as LinkedListChild).prevChild.nextChild = (child as any as LinkedListChild);\n (child as any as LinkedListChild).prevChild = (relative as LinkedListChild).prevChild;\n (child as any as LinkedListChild).nextChild = (relative as LinkedListChild);\n (relative as LinkedListChild).prevChild = (child as any as LinkedListChild);\n if (this._firstChild === relative)\n {\n this._firstChild = (child as any as LinkedListChild);\n }\n\n // update child count\n ++this._childCount;\n\n // ensure bounds will be recalculated\n (this as any)._boundsID++;\n\n // TODO - lets either do all callbacks or all events.. not both!\n this.onChildrenChange();\n this.emit('childAdded', child, this, this._childCount);\n child.emit('added', this);\n\n return child;\n }\n\n /**\n * Adds a child to the container to be rendered above another child.\n *\n * @param child The child to add\n * @param relative - The current child to add the new child relative to.\n * @return The child that was added.\n */\n public addChildAbove(child: T, relative: DisplayObject): T\n {\n if (relative.parent !== this)\n {\n throw new Error(`addChildBelow: The relative target must be a child of this parent`);\n }\n\n if (child.parent)\n {\n child.parent.removeChild(child);\n }\n\n (child as any).parent = this;\n this.sortDirty = true;\n\n // ensure child transform will be recalculated\n (child.transform as any)._parentID = -1;\n\n // insert after the target that we were given\n (relative as LinkedListChild).nextChild.prevChild = (child as any as LinkedListChild);\n (child as any as LinkedListChild).nextChild = (relative as LinkedListChild).nextChild;\n (child as any as LinkedListChild).prevChild = (relative as LinkedListChild);\n (relative as LinkedListChild).nextChild = (child as any as LinkedListChild);\n if (this._lastChild === relative)\n {\n this._lastChild = (child as any as LinkedListChild);\n }\n\n // update child count\n ++this._childCount;\n\n // ensure bounds will be recalculated\n (this as any)._boundsID++;\n\n // TODO - lets either do all callbacks or all events.. not both!\n this.onChildrenChange();\n this.emit('childAdded', child, this, this._childCount);\n child.emit('added', this);\n\n return child;\n }\n\n public swapChildren(child: DisplayObject, child2: DisplayObject): void\n {\n if (child === child2 || child.parent !== this || child2.parent !== this)\n {\n return;\n }\n\n const { prevChild, nextChild } = (child as LinkedListChild);\n\n (child as LinkedListChild).prevChild = (child2 as LinkedListChild).prevChild;\n (child as LinkedListChild).nextChild = (child2 as LinkedListChild).nextChild;\n (child2 as LinkedListChild).prevChild = prevChild;\n (child2 as LinkedListChild).nextChild = nextChild;\n\n if (this._firstChild === child)\n {\n this._firstChild = child2 as LinkedListChild;\n }\n else if (this._firstChild === child2)\n {\n this._firstChild = child as LinkedListChild;\n }\n if (this._lastChild === child)\n {\n this._lastChild = child2 as LinkedListChild;\n }\n else if (this._lastChild === child2)\n {\n this._lastChild = child as LinkedListChild;\n }\n\n this.onChildrenChange();\n }\n\n public getChildIndex(child: DisplayObject): number\n {\n let index = 0;\n let test = this._firstChild;\n\n while (test)\n {\n if (test === child)\n {\n break;\n }\n test = test.nextChild;\n ++index;\n }\n if (!test)\n {\n throw new Error('The supplied DisplayObject must be a child of the caller');\n }\n\n return index;\n }\n\n setChildIndex(child: DisplayObject, index: number): void\n {\n if (index < 0 || index >= this._childCount)\n {\n throw new Error(`The index ${index} supplied is out of bounds ${this._childCount}`);\n }\n if (child.parent !== this)\n {\n throw new Error('The supplied DisplayObject must be a child of the caller');\n }\n\n // remove child\n if ((child as LinkedListChild).nextChild)\n {\n (child as LinkedListChild).nextChild.prevChild = (child as LinkedListChild).prevChild;\n }\n if ((child as LinkedListChild).prevChild)\n {\n (child as LinkedListChild).prevChild.nextChild = (child as LinkedListChild).nextChild;\n }\n if (this._firstChild === (child as LinkedListChild))\n {\n this._firstChild = (child as LinkedListChild).nextChild;\n }\n if (this._lastChild === (child as LinkedListChild))\n {\n this._lastChild = (child as LinkedListChild).prevChild;\n }\n (child as LinkedListChild).nextChild = null;\n (child as LinkedListChild).prevChild = null;\n\n // do addChildAt\n if (!this._firstChild)\n {\n this._firstChild = this._lastChild = (child as LinkedListChild);\n }\n else if (index === 0)\n {\n this._firstChild.prevChild = (child as LinkedListChild);\n (child as LinkedListChild).nextChild = this._firstChild;\n this._firstChild = (child as LinkedListChild);\n }\n else if (index === this._childCount)\n {\n this._lastChild.nextChild = (child as LinkedListChild);\n (child as LinkedListChild).prevChild = this._lastChild;\n this._lastChild = (child as LinkedListChild);\n }\n else\n {\n let i = 0;\n let target = this._firstChild;\n\n while (i < index)\n {\n target = target.nextChild;\n ++i;\n }\n target.prevChild.nextChild = (child as LinkedListChild);\n (child as LinkedListChild).prevChild = target.prevChild;\n (child as LinkedListChild).nextChild = target;\n target.prevChild = (child as LinkedListChild);\n }\n\n (this as any).onChildrenChange(index);\n }\n\n public removeChild(...children: T): T[0]\n {\n // if there is only one argument we can bypass looping through the them\n if (children.length > 1)\n {\n // loop through the arguments property and remove all children\n for (let i = 0; i < children.length; i++)\n {\n this.removeChild(children[i]);\n }\n }\n else\n {\n const child = children[0] as LinkedListChild;\n\n // bail if not actually our child\n if ((child as any).parent !== this) return null;\n\n (child as any).parent = null;\n // ensure child transform will be recalculated\n (child.transform as any)._parentID = -1;\n\n // swap out child references\n if (child.nextChild)\n {\n child.nextChild.prevChild = child.prevChild;\n }\n if (child.prevChild)\n {\n child.prevChild.nextChild = child.nextChild;\n }\n if (this._firstChild === child)\n {\n this._firstChild = child.nextChild;\n }\n if (this._lastChild === child)\n {\n this._lastChild = child.prevChild;\n }\n // clear sibling references\n child.nextChild = null;\n child.prevChild = null;\n\n // update child count\n --this._childCount;\n\n // ensure bounds will be recalculated\n (this as any)._boundsID++;\n\n // TODO - lets either do all callbacks or all events.. not both!\n this.onChildrenChange();\n child.emit('removed', this);\n this.emit('childRemoved', child, this);\n }\n\n return children[0];\n }\n\n public getChildAt(index: number): DisplayObject\n {\n if (index < 0 || index >= this._childCount)\n {\n throw new Error(`getChildAt: Index (${index}) does not exist.`);\n }\n\n if (index === 0)\n {\n return this._firstChild;\n }\n // add at end (front)\n else if (index === this._childCount)\n {\n return this._lastChild;\n }\n // otherwise we have to start counting through the children to find the right one\n // - SLOW, only provided to fully support the possibility of use\n let i = 0;\n let target = this._firstChild;\n\n while (i < index)\n {\n target = target.nextChild;\n ++i;\n }\n\n return target;\n }\n\n public removeChildAt(index: number): DisplayObject\n {\n const child = this.getChildAt(index) as LinkedListChild;\n\n // ensure child transform will be recalculated..\n (child as any).parent = null;\n (child.transform as any)._parentID = -1;\n // swap out child references\n if (child.nextChild)\n {\n child.nextChild.prevChild = child.prevChild;\n }\n if (child.prevChild)\n {\n child.prevChild.nextChild = child.nextChild;\n }\n if (this._firstChild === child)\n {\n this._firstChild = child.nextChild;\n }\n if (this._lastChild === child)\n {\n this._lastChild = child.prevChild;\n }\n // clear sibling references\n child.nextChild = null;\n child.prevChild = null;\n\n // update child count\n --this._childCount;\n\n // ensure bounds will be recalculated\n (this as any)._boundsID++;\n\n // TODO - lets either do all callbacks or all events.. not both!\n (this as any).onChildrenChange(index);// the PixiJS types say this has no arguments\n child.emit('removed', this);\n this.emit('childRemoved', child, this, index);\n\n return child;\n }\n\n public removeChildren(beginIndex = 0, endIndex = this._childCount): DisplayObject[]\n {\n const begin = beginIndex;\n const end = endIndex;\n const range = end - begin;\n\n if (range > 0 && range <= end)\n {\n const removed: LinkedListChild[] = [];\n let child = this._firstChild;\n\n for (let i = 0; i <= end && child; ++i, child = child.nextChild)\n {\n if (i >= begin)\n {\n removed.push(child);\n }\n }\n\n // child before removed section\n const prevChild = removed[0].prevChild;\n // child after removed section\n const nextChild = removed[removed.length - 1].nextChild;\n\n if (!nextChild)\n {\n // if we removed the last child, then the new last child is the one before\n // the removed section\n this._lastChild = prevChild;\n }\n else\n {\n // otherwise, stitch the child before the section to the child after\n nextChild.prevChild = prevChild;\n }\n if (!prevChild)\n {\n // if we removed the first child, then the new first child is the one after\n // the removed section\n this._firstChild = nextChild;\n }\n else\n {\n // otherwise stich the child after the section to the one before\n prevChild.nextChild = nextChild;\n }\n\n for (let i = 0; i < removed.length; ++i)\n {\n // clear parenting and sibling references for all removed children\n (removed[i] as any).parent = null;\n if (removed[i].transform)\n {\n (removed[i].transform as any)._parentID = -1;\n }\n removed[i].nextChild = null;\n removed[i].prevChild = null;\n }\n\n (this as any)._boundsID++;\n\n (this as any).onChildrenChange(beginIndex);\n\n for (let i = 0; i < removed.length; ++i)\n {\n removed[i].emit('removed', this);\n this.emit('childRemoved', removed[i], this, i);\n }\n\n return removed;\n }\n else if (range === 0 && this._childCount === 0)\n {\n return [];\n }\n\n throw new RangeError('removeChildren: numeric values are outside the acceptable range.');\n }\n\n /**\n * Updates the transform on all children of this container for rendering.\n * Copied from and overrides PixiJS v5 method (v4 method is identical)\n */\n updateTransform(): void\n {\n (this as any)._boundsID++;\n\n this.transform.updateTransform(this.parent.transform);\n\n // TODO: check render flags, how to process stuff here\n (this as any).worldAlpha = this.alpha * this.parent.worldAlpha;\n\n let child;\n let next;\n\n for (child = this._firstChild; child; child = next)\n {\n next = child.nextChild;\n\n if (child.visible)\n {\n child.updateTransform();\n }\n }\n }\n\n /**\n * Recalculates the bounds of the container.\n * Copied from and overrides PixiJS v5 method (v4 method is identical)\n */\n calculateBounds(): void\n {\n this._bounds.clear();\n\n this._calculateBounds();\n\n let child;\n let next;\n\n for (child = this._firstChild; child; child = next)\n {\n next = child.nextChild;\n\n if (!child.visible || !child.renderable)\n {\n continue;\n }\n\n child.calculateBounds();\n\n // TODO: filter+mask, need to mask both somehow\n if ((child as any)._mask)\n {\n const maskObject = (((child as any)._mask as MaskData).maskObject || (child as any)._mask) as Container;\n\n maskObject.calculateBounds();\n this._bounds.addBoundsMask((child as any)._bounds, (maskObject as any)._bounds);\n }\n else if (child.filterArea)\n {\n this._bounds.addBoundsArea((child as any)._bounds, child.filterArea);\n }\n else\n {\n this._bounds.addBounds((child as any)._bounds);\n }\n }\n\n (this._bounds as any).updateID = (this as any)._boundsID;\n }\n\n /**\n * Retrieves the local bounds of the displayObject as a rectangle object. Copied from and overrides PixiJS v5 method\n */\n public getLocalBounds(rect?: Rectangle, skipChildrenUpdate = false): Rectangle\n {\n // skip Container's getLocalBounds, go directly to DisplayObject\n const result = DisplayObject.prototype.getLocalBounds.call(this, rect);\n\n if (!skipChildrenUpdate)\n {\n let child;\n let next;\n\n for (child = this._firstChild; child; child = next)\n {\n next = child.nextChild;\n\n if (child.visible)\n {\n child.updateTransform();\n }\n }\n }\n\n return result;\n }\n\n /**\n * Renders the object using the WebGL renderer. Copied from and overrides PixiJS v5 method\n */\n render(renderer: Renderer): void\n {\n // if the object is not visible or the alpha is 0 then no need to render this element\n if (!this.visible || this.worldAlpha <= 0 || !this.renderable)\n {\n return;\n }\n\n // do a quick check to see if this element has a mask or a filter.\n if (this._mask || (this.filters && this.filters.length))\n {\n this.renderAdvanced(renderer);\n }\n else\n {\n this._render(renderer);\n\n let child;\n let next;\n\n // simple render children!\n for (child = this._firstChild; child; child = next)\n {\n next = child.nextChild;\n child.render(renderer);\n }\n }\n }\n\n /**\n * Render the object using the WebGL renderer and advanced features. Copied from and overrides PixiJS v5 method\n */\n protected renderAdvanced(renderer: Renderer): void\n {\n renderer.batch.flush();\n\n const filters = this.filters;\n const mask = this._mask;\n\n // _enabledFilters note: As of development, _enabledFilters is not documented in pixi.js\n // types but is in code of current release (5.2.4).\n\n // push filter first as we need to ensure the stencil buffer is correct for any masking\n if (filters)\n {\n if (!(this as any)._enabledFilters)\n {\n (this as any)._enabledFilters = [];\n }\n\n (this as any)._enabledFilters.length = 0;\n\n for (let i = 0; i < filters.length; i++)\n {\n if (filters[i].enabled)\n {\n (this as any)._enabledFilters.push(filters[i]);\n }\n }\n\n if ((this as any)._enabledFilters.length)\n {\n renderer.filter.push(this, (this as any)._enabledFilters);\n }\n }\n\n if (mask)\n {\n renderer.mask.push(this, this._mask);\n }\n\n // add this object to the batch, only rendered if it has a texture.\n this._render(renderer);\n\n let child;\n let next;\n\n // now loop through the children and make sure they get rendered\n for (child = this._firstChild; child; child = next)\n {\n next = child.nextChild;\n child.render(renderer);\n }\n\n renderer.batch.flush();\n\n if (mask)\n {\n renderer.mask.pop(this);\n }\n\n if (filters && (this as any)._enabledFilters && (this as any)._enabledFilters.length)\n {\n renderer.filter.pop();\n }\n }\n\n /**\n * Renders the object using the WebGL renderer. Copied from and overrides PixiJS V4 method.\n */\n renderWebGL(renderer: any): void\n {\n // if the object is not visible or the alpha is 0 then no need to render this element\n if (!this.visible || this.worldAlpha <= 0 || !this.renderable)\n {\n return;\n }\n\n // do a quick check to see if this element has a mask or a filter.\n if (this._mask || (this.filters && this.filters.length))\n {\n this.renderAdvancedWebGL(renderer);\n }\n else\n {\n (this as any)._renderWebGL(renderer);\n\n let child;\n let next;\n\n // simple render children!\n for (child = this._firstChild; child; child = next)\n {\n next = child.nextChild;\n (child as any).renderWebGL(renderer);\n }\n }\n }\n\n /**\n * Render the object using the WebGL renderer and advanced features. Copied from and overrides PixiJS V4 method.\n */\n private renderAdvancedWebGL(renderer: any): void\n {\n renderer.flush();\n\n // _filters is a v4 specific property\n const filters = (this as any)._filters;\n const mask = this._mask;\n\n // push filter first as we need to ensure the stencil buffer is correct for any masking\n if (filters)\n {\n if (!(this as any)._enabledFilters)\n {\n (this as any)._enabledFilters = [];\n }\n\n (this as any)._enabledFilters.length = 0;\n\n for (let i = 0; i < filters.length; i++)\n {\n if (filters[i].enabled)\n {\n (this as any)._enabledFilters.push(filters[i]);\n }\n }\n\n if ((this as any)._enabledFilters.length)\n {\n renderer.filterManager.pushFilter(this, (this as any)._enabledFilters);\n }\n }\n\n if (mask)\n {\n renderer.maskManager.pushMask(this, this._mask);\n }\n\n // add this object to the batch, only rendered if it has a texture.\n (this as any)._renderWebGL(renderer);\n\n let child;\n let next;\n\n // now loop through the children and make sure they get rendered\n for (child = this._firstChild; child; child = next)\n {\n next = child.nextChild;\n (child as any).renderWebGL(renderer);\n }\n\n renderer.flush();\n\n if (mask)\n {\n renderer.maskManager.popMask(this, this._mask);\n }\n\n if (filters && (this as any)._enabledFilters && (this as any)._enabledFilters.length)\n {\n renderer.filterManager.popFilter();\n }\n }\n\n /**\n * Renders the object using the Canvas renderer. Copied from and overrides PixiJS V4 method or Canvas mixin in V5.\n */\n renderCanvas(renderer: any): void\n {\n // if not visible or the alpha is 0 then no need to render this\n if (!this.visible || this.worldAlpha <= 0 || !this.renderable)\n {\n return;\n }\n\n if (this._mask)\n {\n renderer.maskManager.pushMask(this._mask);\n }\n\n (this as any)._renderCanvas(renderer);\n\n let child;\n let next;\n\n for (child = this._firstChild; child; child = next)\n {\n next = child.nextChild;\n (child as any).renderCanvas(renderer);\n }\n\n if (this._mask)\n {\n renderer.maskManager.popMask(renderer);\n }\n }\n}\n","import superPropBase from \"@babel/runtime/helpers/esm/superPropBase\";\nexport default function _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","'use strict';\n\nmodule.exports = earcut;\nmodule.exports.default = earcut;\n\nfunction earcut(data, holeIndices, dim) {\n\n dim = dim || 2;\n\n var hasHoles = holeIndices && holeIndices.length,\n outerLen = hasHoles ? holeIndices[0] * dim : data.length,\n outerNode = linkedList(data, 0, outerLen, dim, true),\n triangles = [];\n\n if (!outerNode || outerNode.next === outerNode.prev) return triangles;\n\n var minX, minY, maxX, maxY, x, y, invSize;\n\n if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);\n\n // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n if (data.length > 80 * dim) {\n minX = maxX = data[0];\n minY = maxY = data[1];\n\n for (var i = dim; i < outerLen; i += dim) {\n x = data[i];\n y = data[i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n }\n\n // minX, minY and invSize are later used to transform coords into integers for z-order calculation\n invSize = Math.max(maxX - minX, maxY - minY);\n invSize = invSize !== 0 ? 1 / invSize : 0;\n }\n\n earcutLinked(outerNode, triangles, dim, minX, minY, invSize);\n\n return triangles;\n}\n\n// create a circular doubly linked list from polygon points in the specified winding order\nfunction linkedList(data, start, end, dim, clockwise) {\n var i, last;\n\n if (clockwise === (signedArea(data, start, end, dim) > 0)) {\n for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);\n } else {\n for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);\n }\n\n if (last && equals(last, last.next)) {\n removeNode(last);\n last = last.next;\n }\n\n return last;\n}\n\n// eliminate colinear or duplicate points\nfunction filterPoints(start, end) {\n if (!start) return start;\n if (!end) end = start;\n\n var p = start,\n again;\n do {\n again = false;\n\n if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\n removeNode(p);\n p = end = p.prev;\n if (p === p.next) break;\n again = true;\n\n } else {\n p = p.next;\n }\n } while (again || p !== end);\n\n return end;\n}\n\n// main ear slicing loop which triangulates a polygon (given as a linked list)\nfunction earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {\n if (!ear) return;\n\n // interlink polygon nodes in z-order\n if (!pass && invSize) indexCurve(ear, minX, minY, invSize);\n\n var stop = ear,\n prev, next;\n\n // iterate through ears, slicing them one by one\n while (ear.prev !== ear.next) {\n prev = ear.prev;\n next = ear.next;\n\n if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {\n // cut off the triangle\n triangles.push(prev.i / dim);\n triangles.push(ear.i / dim);\n triangles.push(next.i / dim);\n\n removeNode(ear);\n\n // skipping the next vertex leads to less sliver triangles\n ear = next.next;\n stop = next.next;\n\n continue;\n }\n\n ear = next;\n\n // if we looped through the whole remaining polygon and can't find any more ears\n if (ear === stop) {\n // try filtering points and slicing again\n if (!pass) {\n earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);\n\n // if this didn't work, try curing all small self-intersections locally\n } else if (pass === 1) {\n ear = cureLocalIntersections(filterPoints(ear), triangles, dim);\n earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);\n\n // as a last resort, try splitting the remaining polygon into two\n } else if (pass === 2) {\n splitEarcut(ear, triangles, dim, minX, minY, invSize);\n }\n\n break;\n }\n }\n}\n\n// check whether a polygon node forms a valid ear with adjacent nodes\nfunction isEar(ear) {\n var a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n // now make sure we don't have other points inside the potential ear\n var p = ear.next.next;\n\n while (p !== ear.prev) {\n if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.next;\n }\n\n return true;\n}\n\nfunction isEarHashed(ear, minX, minY, invSize) {\n var a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n // triangle bbox; min & max are calculated like this for speed\n var minTX = a.x < b.x ? (a.x < c.x ? a.x : c.x) : (b.x < c.x ? b.x : c.x),\n minTY = a.y < b.y ? (a.y < c.y ? a.y : c.y) : (b.y < c.y ? b.y : c.y),\n maxTX = a.x > b.x ? (a.x > c.x ? a.x : c.x) : (b.x > c.x ? b.x : c.x),\n maxTY = a.y > b.y ? (a.y > c.y ? a.y : c.y) : (b.y > c.y ? b.y : c.y);\n\n // z-order range for the current triangle bbox;\n var minZ = zOrder(minTX, minTY, minX, minY, invSize),\n maxZ = zOrder(maxTX, maxTY, minX, minY, invSize);\n\n var p = ear.prevZ,\n n = ear.nextZ;\n\n // look for points inside the triangle in both directions\n while (p && p.z >= minZ && n && n.z <= maxZ) {\n if (p !== ear.prev && p !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n\n if (n !== ear.prev && n !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\n area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n\n // look for remaining points in decreasing z-order\n while (p && p.z >= minZ) {\n if (p !== ear.prev && p !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n }\n\n // look for remaining points in increasing z-order\n while (n && n.z <= maxZ) {\n if (n !== ear.prev && n !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\n area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n\n return true;\n}\n\n// go through all polygon nodes and cure small local self-intersections\nfunction cureLocalIntersections(start, triangles, dim) {\n var p = start;\n do {\n var a = p.prev,\n b = p.next.next;\n\n if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {\n\n triangles.push(a.i / dim);\n triangles.push(p.i / dim);\n triangles.push(b.i / dim);\n\n // remove two nodes involved\n removeNode(p);\n removeNode(p.next);\n\n p = start = b;\n }\n p = p.next;\n } while (p !== start);\n\n return filterPoints(p);\n}\n\n// try splitting polygon into two and triangulate them independently\nfunction splitEarcut(start, triangles, dim, minX, minY, invSize) {\n // look for a valid diagonal that divides the polygon into two\n var a = start;\n do {\n var b = a.next.next;\n while (b !== a.prev) {\n if (a.i !== b.i && isValidDiagonal(a, b)) {\n // split the polygon in two by the diagonal\n var c = splitPolygon(a, b);\n\n // filter colinear points around the cuts\n a = filterPoints(a, a.next);\n c = filterPoints(c, c.next);\n\n // run earcut on each half\n earcutLinked(a, triangles, dim, minX, minY, invSize);\n earcutLinked(c, triangles, dim, minX, minY, invSize);\n return;\n }\n b = b.next;\n }\n a = a.next;\n } while (a !== start);\n}\n\n// link every hole into the outer loop, producing a single-ring polygon without holes\nfunction eliminateHoles(data, holeIndices, outerNode, dim) {\n var queue = [],\n i, len, start, end, list;\n\n for (i = 0, len = holeIndices.length; i < len; i++) {\n start = holeIndices[i] * dim;\n end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n list = linkedList(data, start, end, dim, false);\n if (list === list.next) list.steiner = true;\n queue.push(getLeftmost(list));\n }\n\n queue.sort(compareX);\n\n // process holes from left to right\n for (i = 0; i < queue.length; i++) {\n eliminateHole(queue[i], outerNode);\n outerNode = filterPoints(outerNode, outerNode.next);\n }\n\n return outerNode;\n}\n\nfunction compareX(a, b) {\n return a.x - b.x;\n}\n\n// find a bridge between vertices that connects hole with an outer ring and and link it\nfunction eliminateHole(hole, outerNode) {\n outerNode = findHoleBridge(hole, outerNode);\n if (outerNode) {\n var b = splitPolygon(outerNode, hole);\n\n // filter collinear points around the cuts\n filterPoints(outerNode, outerNode.next);\n filterPoints(b, b.next);\n }\n}\n\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\nfunction findHoleBridge(hole, outerNode) {\n var p = outerNode,\n hx = hole.x,\n hy = hole.y,\n qx = -Infinity,\n m;\n\n // find a segment intersected by a ray from the hole's leftmost point to the left;\n // segment's endpoint with lesser x will be potential connection point\n do {\n if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {\n var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\n if (x <= hx && x > qx) {\n qx = x;\n if (x === hx) {\n if (hy === p.y) return p;\n if (hy === p.next.y) return p.next;\n }\n m = p.x < p.next.x ? p : p.next;\n }\n }\n p = p.next;\n } while (p !== outerNode);\n\n if (!m) return null;\n\n if (hx === qx) return m; // hole touches outer segment; pick leftmost endpoint\n\n // look for points inside the triangle of hole point, segment intersection and endpoint;\n // if there are no points found, we have a valid connection;\n // otherwise choose the point of the minimum angle with the ray as connection point\n\n var stop = m,\n mx = m.x,\n my = m.y,\n tanMin = Infinity,\n tan;\n\n p = m;\n\n do {\n if (hx >= p.x && p.x >= mx && hx !== p.x &&\n pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\n\n tan = Math.abs(hy - p.y) / (hx - p.x); // tangential\n\n if (locallyInside(p, hole) &&\n (tan < tanMin || (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))) {\n m = p;\n tanMin = tan;\n }\n }\n\n p = p.next;\n } while (p !== stop);\n\n return m;\n}\n\n// whether sector in vertex m contains sector in vertex p in the same coordinates\nfunction sectorContainsSector(m, p) {\n return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;\n}\n\n// interlink polygon nodes in z-order\nfunction indexCurve(start, minX, minY, invSize) {\n var p = start;\n do {\n if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, invSize);\n p.prevZ = p.prev;\n p.nextZ = p.next;\n p = p.next;\n } while (p !== start);\n\n p.prevZ.nextZ = null;\n p.prevZ = null;\n\n sortLinked(p);\n}\n\n// Simon Tatham's linked list merge sort algorithm\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\nfunction sortLinked(list) {\n var i, p, q, e, tail, numMerges, pSize, qSize,\n inSize = 1;\n\n do {\n p = list;\n list = null;\n tail = null;\n numMerges = 0;\n\n while (p) {\n numMerges++;\n q = p;\n pSize = 0;\n for (i = 0; i < inSize; i++) {\n pSize++;\n q = q.nextZ;\n if (!q) break;\n }\n qSize = inSize;\n\n while (pSize > 0 || (qSize > 0 && q)) {\n\n if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {\n e = p;\n p = p.nextZ;\n pSize--;\n } else {\n e = q;\n q = q.nextZ;\n qSize--;\n }\n\n if (tail) tail.nextZ = e;\n else list = e;\n\n e.prevZ = tail;\n tail = e;\n }\n\n p = q;\n }\n\n tail.nextZ = null;\n inSize *= 2;\n\n } while (numMerges > 1);\n\n return list;\n}\n\n// z-order of a point given coords and inverse of the longer side of data bbox\nfunction zOrder(x, y, minX, minY, invSize) {\n // coords are transformed into non-negative 15-bit integer range\n x = 32767 * (x - minX) * invSize;\n y = 32767 * (y - minY) * invSize;\n\n x = (x | (x << 8)) & 0x00FF00FF;\n x = (x | (x << 4)) & 0x0F0F0F0F;\n x = (x | (x << 2)) & 0x33333333;\n x = (x | (x << 1)) & 0x55555555;\n\n y = (y | (y << 8)) & 0x00FF00FF;\n y = (y | (y << 4)) & 0x0F0F0F0F;\n y = (y | (y << 2)) & 0x33333333;\n y = (y | (y << 1)) & 0x55555555;\n\n return x | (y << 1);\n}\n\n// find the leftmost node of a polygon ring\nfunction getLeftmost(start) {\n var p = start,\n leftmost = start;\n do {\n if (p.x < leftmost.x || (p.x === leftmost.x && p.y < leftmost.y)) leftmost = p;\n p = p.next;\n } while (p !== start);\n\n return leftmost;\n}\n\n// check if a point lies within a convex triangle\nfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}\n\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\nfunction isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges\n (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible\n (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors\n equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case\n}\n\n// signed area of a triangle\nfunction area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}\n\n// check if two points are equal\nfunction equals(p1, p2) {\n return p1.x === p2.x && p1.y === p2.y;\n}\n\n// check if two segments intersect\nfunction intersects(p1, q1, p2, q2) {\n var o1 = sign(area(p1, q1, p2));\n var o2 = sign(area(p1, q1, q2));\n var o3 = sign(area(p2, q2, p1));\n var o4 = sign(area(p2, q2, q1));\n\n if (o1 !== o2 && o3 !== o4) return true; // general case\n\n if (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1\n if (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1\n if (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2\n if (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2\n\n return false;\n}\n\n// for collinear points p, q, r, check if point q lies on segment pr\nfunction onSegment(p, q, r) {\n return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}\n\nfunction sign(num) {\n return num > 0 ? 1 : num < 0 ? -1 : 0;\n}\n\n// check if a polygon diagonal intersects any polygon segments\nfunction intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}\n\n// check if a polygon diagonal is locally inside the polygon\nfunction locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}\n\n// check if the middle point of a polygon diagonal is inside the polygon\nfunction middleInside(a, b) {\n var p = a,\n inside = false,\n px = (a.x + b.x) / 2,\n py = (a.y + b.y) / 2;\n do {\n if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y &&\n (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))\n inside = !inside;\n p = p.next;\n } while (p !== a);\n\n return inside;\n}\n\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\nfunction splitPolygon(a, b) {\n var a2 = new Node(a.i, a.x, a.y),\n b2 = new Node(b.i, b.x, b.y),\n an = a.next,\n bp = b.prev;\n\n a.next = b;\n b.prev = a;\n\n a2.next = an;\n an.prev = a2;\n\n b2.next = a2;\n a2.prev = b2;\n\n bp.next = b2;\n b2.prev = bp;\n\n return b2;\n}\n\n// create a node and optionally link it with previous one (in a circular doubly linked list)\nfunction insertNode(i, x, y, last) {\n var p = new Node(i, x, y);\n\n if (!last) {\n p.prev = p;\n p.next = p;\n\n } else {\n p.next = last.next;\n p.prev = last;\n last.next.prev = p;\n last.next = p;\n }\n return p;\n}\n\nfunction removeNode(p) {\n p.next.prev = p.prev;\n p.prev.next = p.next;\n\n if (p.prevZ) p.prevZ.nextZ = p.nextZ;\n if (p.nextZ) p.nextZ.prevZ = p.prevZ;\n}\n\nfunction Node(i, x, y) {\n // vertex index in coordinates array\n this.i = i;\n\n // vertex coordinates\n this.x = x;\n this.y = y;\n\n // previous and next vertex nodes in a polygon ring\n this.prev = null;\n this.next = null;\n\n // z-order curve value\n this.z = null;\n\n // previous and next nodes in z-order\n this.prevZ = null;\n this.nextZ = null;\n\n // indicates whether this is a steiner point\n this.steiner = false;\n}\n\n// return a percentage difference between the polygon area and its triangulation area;\n// used to verify correctness of triangulation\nearcut.deviation = function (data, holeIndices, dim, triangles) {\n var hasHoles = holeIndices && holeIndices.length;\n var outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n\n var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));\n if (hasHoles) {\n for (var i = 0, len = holeIndices.length; i < len; i++) {\n var start = holeIndices[i] * dim;\n var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n polygonArea -= Math.abs(signedArea(data, start, end, dim));\n }\n }\n\n var trianglesArea = 0;\n for (i = 0; i < triangles.length; i += 3) {\n var a = triangles[i] * dim;\n var b = triangles[i + 1] * dim;\n var c = triangles[i + 2] * dim;\n trianglesArea += Math.abs(\n (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -\n (data[a] - data[b]) * (data[c + 1] - data[a + 1]));\n }\n\n return polygonArea === 0 && trianglesArea === 0 ? 0 :\n Math.abs((trianglesArea - polygonArea) / polygonArea);\n};\n\nfunction signedArea(data, start, end, dim) {\n var sum = 0;\n for (var i = start, j = end - dim; i < end; i += dim) {\n sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\n j = i;\n }\n return sum;\n}\n\n// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts\nearcut.flatten = function (data) {\n var dim = data[0][0].length,\n result = {vertices: [], holes: [], dimensions: dim},\n holeIndex = 0;\n\n for (var i = 0; i < data.length; i++) {\n for (var j = 0; j < data[i].length; j++) {\n for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);\n }\n if (i > 0) {\n holeIndex += data[i - 1].length;\n result.holes.push(holeIndex);\n }\n }\n return result;\n};\n","export default (action: Object): string => {\n return action && action.type === '@@redux/INIT' ? 'initialState argument passed to createStore' : 'previous state received by the reducer';\n};\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","export default function symbolObservablePonyfill(root) {\n\tvar result;\n\tvar Symbol = root.Symbol;\n\n\tif (typeof Symbol === 'function') {\n\t\tif (Symbol.observable) {\n\t\t\tresult = Symbol.observable;\n\t\t} else {\n\t\t\tresult = Symbol('observable');\n\t\t\tSymbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n","function createThunkMiddleware(extraArgument) {\n return function (_ref) {\n var dispatch = _ref.dispatch,\n getState = _ref.getState;\n return function (next) {\n return function (action) {\n if (typeof action === 'function') {\n return action(dispatch, getState, extraArgument);\n }\n\n return next(action);\n };\n };\n };\n}\n\nvar thunk = createThunkMiddleware();\nthunk.withExtraArgument = createThunkMiddleware;\n\nexport default thunk;","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports.batchedSubscribe = batchedSubscribe;\n\nfunction batchedSubscribe(batch) {\n if (typeof batch !== 'function') {\n throw new Error('Expected batch to be a function.');\n }\n\n var currentListeners = [];\n var nextListeners = currentListeners;\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected listener to be a function.');\n }\n\n var isSubscribed = true;\n\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n isSubscribed = false;\n\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n };\n }\n\n function notifyListeners() {\n var listeners = currentListeners = nextListeners;\n for (var i = 0; i < listeners.length; i++) {\n listeners[i]();\n }\n }\n\n function notifyListenersBatched() {\n batch(notifyListeners);\n }\n\n return function (next) {\n return function () {\n var store = next.apply(undefined, arguments);\n var subscribeImmediate = store.subscribe;\n\n function dispatch() {\n var res = store.dispatch.apply(store, arguments);\n notifyListenersBatched();\n return res;\n }\n\n return _extends({}, store, {\n dispatch: dispatch,\n subscribe: subscribe,\n subscribeImmediate: subscribeImmediate\n });\n };\n };\n}","(function(global){\n\n//\n// Check for native Promise and it has correct interface\n//\n\nvar NativePromise = global['Promise'];\nvar nativePromiseSupported =\n NativePromise &&\n // Some of these methods are missing from\n // Firefox/Chrome experimental implementations\n 'resolve' in NativePromise &&\n 'reject' in NativePromise &&\n 'all' in NativePromise &&\n 'race' in NativePromise &&\n // Older version of the spec had a resolver object\n // as the arg rather than a function\n (function(){\n var resolve;\n new NativePromise(function(r){ resolve = r; });\n return typeof resolve === 'function';\n })();\n\n\n//\n// export if necessary\n//\n\nif (typeof exports !== 'undefined' && exports)\n{\n // node.js\n exports.Promise = nativePromiseSupported ? NativePromise : Promise;\n exports.Polyfill = Promise;\n}\nelse\n{\n // AMD\n if (typeof define == 'function' && define.amd)\n {\n define(function(){\n return nativePromiseSupported ? NativePromise : Promise;\n });\n }\n else\n {\n // in browser add to global\n if (!nativePromiseSupported)\n global['Promise'] = Promise;\n }\n}\n\n\n//\n// Polyfill\n//\n\nvar PENDING = 'pending';\nvar SEALED = 'sealed';\nvar FULFILLED = 'fulfilled';\nvar REJECTED = 'rejected';\nvar NOOP = function(){};\n\nfunction isArray(value) {\n return Object.prototype.toString.call(value) === '[object Array]';\n}\n\n// async calls\nvar asyncSetTimer = typeof setImmediate !== 'undefined' ? setImmediate : setTimeout;\nvar asyncQueue = [];\nvar asyncTimer;\n\nfunction asyncFlush(){\n // run promise callbacks\n for (var i = 0; i < asyncQueue.length; i++)\n asyncQueue[i][0](asyncQueue[i][1]);\n\n // reset async asyncQueue\n asyncQueue = [];\n asyncTimer = false;\n}\n\nfunction asyncCall(callback, arg){\n asyncQueue.push([callback, arg]);\n\n if (!asyncTimer)\n {\n asyncTimer = true;\n asyncSetTimer(asyncFlush, 0);\n }\n}\n\n\nfunction invokeResolver(resolver, promise) {\n function resolvePromise(value) {\n resolve(promise, value);\n }\n\n function rejectPromise(reason) {\n reject(promise, reason);\n }\n\n try {\n resolver(resolvePromise, rejectPromise);\n } catch(e) {\n rejectPromise(e);\n }\n}\n\nfunction invokeCallback(subscriber){\n var owner = subscriber.owner;\n var settled = owner.state_;\n var value = owner.data_; \n var callback = subscriber[settled];\n var promise = subscriber.then;\n\n if (typeof callback === 'function')\n {\n settled = FULFILLED;\n try {\n value = callback(value);\n } catch(e) {\n reject(promise, e);\n }\n }\n\n if (!handleThenable(promise, value))\n {\n if (settled === FULFILLED)\n resolve(promise, value);\n\n if (settled === REJECTED)\n reject(promise, value);\n }\n}\n\nfunction handleThenable(promise, value) {\n var resolved;\n\n try {\n if (promise === value)\n throw new TypeError('A promises callback cannot return that same promise.');\n\n if (value && (typeof value === 'function' || typeof value === 'object'))\n {\n var then = value.then; // then should be retrived only once\n\n if (typeof then === 'function')\n {\n then.call(value, function(val){\n if (!resolved)\n {\n resolved = true;\n\n if (value !== val)\n resolve(promise, val);\n else\n fulfill(promise, val);\n }\n }, function(reason){\n if (!resolved)\n {\n resolved = true;\n\n reject(promise, reason);\n }\n });\n\n return true;\n }\n }\n } catch (e) {\n if (!resolved)\n reject(promise, e);\n\n return true;\n }\n\n return false;\n}\n\nfunction resolve(promise, value){\n if (promise === value || !handleThenable(promise, value))\n fulfill(promise, value);\n}\n\nfunction fulfill(promise, value){\n if (promise.state_ === PENDING)\n {\n promise.state_ = SEALED;\n promise.data_ = value;\n\n asyncCall(publishFulfillment, promise);\n }\n}\n\nfunction reject(promise, reason){\n if (promise.state_ === PENDING)\n {\n promise.state_ = SEALED;\n promise.data_ = reason;\n\n asyncCall(publishRejection, promise);\n }\n}\n\nfunction publish(promise) {\n var callbacks = promise.then_;\n promise.then_ = undefined;\n\n for (var i = 0; i < callbacks.length; i++) {\n invokeCallback(callbacks[i]);\n }\n}\n\nfunction publishFulfillment(promise){\n promise.state_ = FULFILLED;\n publish(promise);\n}\n\nfunction publishRejection(promise){\n promise.state_ = REJECTED;\n publish(promise);\n}\n\n/**\n* @class\n*/\nfunction Promise(resolver){\n if (typeof resolver !== 'function')\n throw new TypeError('Promise constructor takes a function argument');\n\n if (this instanceof Promise === false)\n throw new TypeError('Failed to construct \\'Promise\\': Please use the \\'new\\' operator, this object constructor cannot be called as a function.');\n\n this.then_ = [];\n\n invokeResolver(resolver, this);\n}\n\nPromise.prototype = {\n constructor: Promise,\n\n state_: PENDING,\n then_: null,\n data_: undefined,\n\n then: function(onFulfillment, onRejection){\n var subscriber = {\n owner: this,\n then: new this.constructor(NOOP),\n fulfilled: onFulfillment,\n rejected: onRejection\n };\n\n if (this.state_ === FULFILLED || this.state_ === REJECTED)\n {\n // already resolved, call callback async\n asyncCall(invokeCallback, subscriber);\n }\n else\n {\n // subscribe\n this.then_.push(subscriber);\n }\n\n return subscriber.then;\n },\n\n 'catch': function(onRejection) {\n return this.then(null, onRejection);\n }\n};\n\nPromise.all = function(promises){\n var Class = this;\n\n if (!isArray(promises))\n throw new TypeError('You must pass an array to Promise.all().');\n\n return new Class(function(resolve, reject){\n var results = [];\n var remaining = 0;\n\n function resolver(index){\n remaining++;\n return function(value){\n results[index] = value;\n if (!--remaining)\n resolve(results);\n };\n }\n\n for (var i = 0, promise; i < promises.length; i++)\n {\n promise = promises[i];\n\n if (promise && typeof promise.then === 'function')\n promise.then(resolver(i), reject);\n else\n results[i] = promise;\n }\n\n if (!remaining)\n resolve(results);\n });\n};\n\nPromise.race = function(promises){\n var Class = this;\n\n if (!isArray(promises))\n throw new TypeError('You must pass an array to Promise.race().');\n\n return new Class(function(resolve, reject) {\n for (var i = 0, promise; i < promises.length; i++)\n {\n promise = promises[i];\n\n if (promise && typeof promise.then === 'function')\n promise.then(resolve, reject);\n else\n resolve(promise);\n }\n });\n};\n\nPromise.resolve = function(value){\n var Class = this;\n\n if (value && typeof value === 'object' && value.constructor === Class)\n return value;\n\n return new Class(function(resolve){\n resolve(value);\n });\n};\n\nPromise.reject = function(reason){\n var Class = this;\n\n return new Class(function(resolve, reject){\n reject(reason);\n });\n};\n\n})(typeof window != 'undefined' ? window : typeof global != 'undefined' ? global : typeof self != 'undefined' ? self : this);\n","import * as PIXI from 'pixi.js'\r\n\r\n/**\r\n * @typedef ViewportTouch\r\n * @property {number} id\r\n * @property {PIXI.Point} last\r\n*/\r\n\r\n/**\r\n * handles all input for Viewport\r\n * @private\r\n */\r\nexport class InputManager {\r\n constructor(viewport) {\r\n this.viewport = viewport\r\n\r\n /**\r\n * list of active touches on viewport\r\n * @type {ViewportTouch[]}\r\n */\r\n this.touches = []\r\n this.addListeners()\r\n }\r\n\r\n /**\r\n * add input listeners\r\n * @private\r\n */\r\n addListeners() {\r\n this.viewport.interactive = true\r\n if (!this.viewport.forceHitArea) {\r\n this.viewport.hitArea = new PIXI.Rectangle(0, 0, this.viewport.worldWidth, this.viewport.worldHeight)\r\n }\r\n this.viewport.on('pointerdown', this.down, this)\r\n this.viewport.on('pointermove', this.move, this)\r\n this.viewport.on('pointerup', this.up, this)\r\n this.viewport.on('pointerupoutside', this.up, this)\r\n this.viewport.on('pointercancel', this.up, this)\r\n this.viewport.on('pointerout', this.up, this)\r\n this.wheelFunction = (e) => this.handleWheel(e)\r\n this.viewport.options.divWheel.addEventListener('wheel', this.wheelFunction, { passive: this.viewport.options.passiveWheel })\r\n this.isMouseDown = false\r\n }\r\n\r\n /**\r\n * removes all event listeners from viewport\r\n * (useful for cleanup of wheel when removing viewport)\r\n */\r\n destroy() {\r\n this.viewport.options.divWheel.removeEventListener('wheel', this.wheelFunction)\r\n }\r\n\r\n /**\r\n * handle down events for viewport\r\n * @param {PIXI.InteractionEvent} event\r\n */\r\n down(event) {\r\n if (this.viewport.pause || !this.viewport.worldVisible) {\r\n return\r\n }\r\n if (event.data.pointerType === 'mouse') {\r\n this.isMouseDown = true\r\n }\r\n else if (!this.get(event.data.pointerId)) {\r\n this.touches.push({ id: event.data.pointerId, last: null })\r\n }\r\n if (this.count() === 1) {\r\n this.last = event.data.global.clone()\r\n\r\n // clicked event does not fire if viewport is decelerating or bouncing\r\n const decelerate = this.viewport.plugins.get('decelerate', true)\r\n const bounce = this.viewport.plugins.get('bounce', true)\r\n if ((!decelerate || !decelerate.isActive()) && (!bounce || !bounce.isActive())) {\r\n this.clickedAvailable = true\r\n }\r\n else {\r\n this.clickedAvailable = false\r\n }\r\n }\r\n else {\r\n this.clickedAvailable = false\r\n }\r\n\r\n const stop = this.viewport.plugins.down(event)\r\n if (stop && this.viewport.options.stopPropagation) {\r\n event.stopPropagation()\r\n }\r\n }\r\n\r\n /**\r\n * clears all pointer events\r\n */\r\n clear() {\r\n this.isMouseDown = false\r\n this.touches = []\r\n this.last = null\r\n }\r\n\r\n /**\r\n * @param {number} change\r\n * @returns whether change exceeds threshold\r\n */\r\n checkThreshold(change) {\r\n if (Math.abs(change) >= this.viewport.threshold) {\r\n return true\r\n }\r\n return false\r\n }\r\n\r\n /**\r\n * handle move events for viewport\r\n * @param {PIXI.InteractionEvent} event\r\n */\r\n move(event) {\r\n if (this.viewport.pause || !this.viewport.worldVisible) {\r\n return\r\n }\r\n\r\n const stop = this.viewport.plugins.move(event)\r\n\r\n if (this.clickedAvailable) {\r\n const distX = event.data.global.x - this.last.x\r\n const distY = event.data.global.y - this.last.y\r\n if (this.checkThreshold(distX) || this.checkThreshold(distY)) {\r\n this.clickedAvailable = false\r\n }\r\n }\r\n\r\n if (stop && this.viewport.options.stopPropagation) {\r\n event.stopPropagation()\r\n }\r\n }\r\n\r\n /**\r\n * handle up events for viewport\r\n * @param {PIXI.InteractionEvent} event\r\n */\r\n up(event) {\r\n if (this.viewport.pause || !this.viewport.worldVisible) {\r\n return\r\n }\r\n\r\n if (event.data.pointerType === 'mouse') {\r\n this.isMouseDown = false\r\n }\r\n\r\n if (event.data.pointerType !== 'mouse') {\r\n this.remove(event.data.pointerId)\r\n }\r\n\r\n const stop = this.viewport.plugins.up(event)\r\n\r\n if (this.clickedAvailable && this.count() === 0) {\r\n this.viewport.emit('clicked', { event: event, screen: this.last, world: this.viewport.toWorld(this.last), viewport: this })\r\n this.clickedAvailable = false\r\n }\r\n\r\n if (stop && this.viewport.options.stopPropagation) {\r\n event.stopPropagation()\r\n }\r\n }\r\n\r\n /**\r\n * gets pointer position if this.interaction is set\r\n * @param {WheelEvent} event\r\n * @return {PIXI.Point}\r\n */\r\n getPointerPosition(event) {\r\n let point = new PIXI.Point()\r\n if (this.viewport.options.interaction) {\r\n this.viewport.options.interaction.mapPositionToPoint(point, event.clientX, event.clientY)\r\n }\r\n else {\r\n point.x = event.clientX\r\n point.y = event.clientY\r\n }\r\n return point\r\n }\r\n\r\n /**\r\n * handle wheel events\r\n * @param {WheelEvent} event\r\n */\r\n handleWheel(event) {\r\n if (this.viewport.pause || !this.viewport.worldVisible) {\r\n return\r\n }\r\n\r\n // only handle wheel events where the mouse is over the viewport\r\n const point = this.viewport.toLocal(this.getPointerPosition(event))\r\n if (this.viewport.left <= point.x && point.x <= this.viewport.right && this.viewport.top <= point.y && point.y <= this.viewport.bottom) {\r\n const stop = this.viewport.plugins.wheel(event)\r\n if (stop && !this.viewport.options.passiveWheel) {\r\n event.preventDefault()\r\n }\r\n }\r\n }\r\n\r\n pause() {\r\n this.touches = []\r\n this.isMouseDown = false\r\n }\r\n\r\n /**\r\n * get touch by id\r\n * @param {number} id\r\n * @return {ViewportTouch}\r\n */\r\n get(id) {\r\n for (let touch of this.touches) {\r\n if (touch.id === id) {\r\n return touch\r\n }\r\n }\r\n return null\r\n }\r\n\r\n /**\r\n * remove touch by number\r\n * @param {number} id\r\n */\r\n remove(id) {\r\n for (let i = 0; i < this.touches.length; i++) {\r\n if (this.touches[i].id === id) {\r\n this.touches.splice(i, 1)\r\n return\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @returns {number} count of mouse/touch pointers that are down on the viewport\r\n */\r\n count() {\r\n return (this.isMouseDown ? 1 : 0) + this.touches.length\r\n }\r\n}\r\n","const PLUGIN_ORDER = ['drag', 'pinch', 'wheel', 'follow', 'mouse-edges', 'decelerate', 'aniamte', 'bounce', 'snap-zoom', 'clamp-zoom', 'snap', 'clamp']\r\n\r\n/**\r\n * Use this to access current plugins or add user-defined plugins\r\n */\r\nexport class PluginManager {\r\n /**\r\n * instantiated by Viewport\r\n * @param {Viewport} viewport\r\n */\r\n constructor(viewport) {\r\n this.viewport = viewport\r\n this.list = []\r\n this.plugins = {}\r\n }\r\n\r\n /**\r\n * Inserts a named plugin or a user plugin into the viewport\r\n * default plugin order: 'drag', 'pinch', 'wheel', 'follow', 'mouse-edges', 'decelerate', 'bounce', 'snap-zoom', 'clamp-zoom', 'snap', 'clamp'\r\n * @param {string} name of plugin\r\n * @param {Plugin} plugin - instantiated Plugin class\r\n * @param {number} index to insert userPlugin (otherwise inserts it at the end)\r\n */\r\n add(name, plugin, index = PLUGIN_ORDER.length) {\r\n this.plugins[name] = plugin\r\n const current = PLUGIN_ORDER.indexOf(name)\r\n if (current !== -1) {\r\n PLUGIN_ORDER.splice(current, 1)\r\n }\r\n PLUGIN_ORDER.splice(index, 0, name)\r\n this.sort()\r\n }\r\n\r\n /**\r\n * get plugin\r\n * @param {string} name of plugin\r\n * @param {boolean} [ignorePaused] return null if plugin is paused\r\n * @return {Plugin}\r\n */\r\n get(name, ignorePaused) {\r\n if (ignorePaused) {\r\n if (typeof this.plugins[name] !== 'undefined' && this.plugins[name].paused) {\r\n return null\r\n }\r\n }\r\n return this.plugins[name]\r\n }\r\n\r\n /**\r\n * update all active plugins\r\n * @ignore\r\n * @param {number} elapsed type in milliseconds since last update\r\n */\r\n update(elapsed) {\r\n for (let plugin of this.list) {\r\n plugin.update(elapsed)\r\n }\r\n }\r\n\r\n /**\r\n * resize all active plugins\r\n * @ignore\r\n */\r\n resize() {\r\n for (let plugin of this.list) {\r\n plugin.resize()\r\n }\r\n }\r\n\r\n /**\r\n * clamps and resets bounce and decelerate (as needed) after manually moving viewport\r\n */\r\n reset() {\r\n for (let plugin of this.list) {\r\n plugin.reset()\r\n }\r\n }\r\n\r\n /**\r\n * removes installed plugin\r\n * @param {string} name of plugin (e.g., 'drag', 'pinch')\r\n */\r\n remove(name) {\r\n if (this.plugins[name]) {\r\n this.plugins[name] = null\r\n this.viewport.emit(name + '-remove')\r\n this.sort()\r\n }\r\n }\r\n\r\n /**\r\n * pause plugin\r\n * @param {string} name of plugin (e.g., 'drag', 'pinch')\r\n */\r\n pause(name) {\r\n if (this.plugins[name]) {\r\n this.plugins[name].pause()\r\n }\r\n }\r\n\r\n /**\r\n * resume plugin\r\n * @param {string} name of plugin (e.g., 'drag', 'pinch')\r\n */\r\n resume(name) {\r\n if (this.plugins[name]) {\r\n this.plugins[name].resume()\r\n }\r\n }\r\n\r\n /**\r\n * sort plugins according to PLUGIN_ORDER\r\n * @ignore\r\n */\r\n sort() {\r\n this.list = []\r\n for (let plugin of PLUGIN_ORDER) {\r\n if (this.plugins[plugin]) {\r\n this.list.push(this.plugins[plugin])\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * handle down for all plugins\r\n * @ignore\r\n * @param {PIXI.InteractionEvent} event\r\n * @returns {boolean}\r\n */\r\n down(event) {\r\n let stop = false\r\n for (let plugin of this.list) {\r\n if (plugin.down(event)) {\r\n stop = true\r\n }\r\n }\r\n return stop\r\n }\r\n\r\n /**\r\n * handle move for all plugins\r\n * @ignore\r\n * @param {PIXI.InteractionEvent} event\r\n * @returns {boolean}\r\n */\r\n move(event) {\r\n let stop = false\r\n for (let plugin of this.viewport.plugins.list) {\r\n if (plugin.move(event)) {\r\n stop = true\r\n }\r\n }\r\n return stop\r\n }\r\n\r\n /**\r\n * handle up for all plugins\r\n * @ignore\r\n * @param {PIXI.InteractionEvent} event\r\n * @returns {boolean}\r\n */\r\n up(event) {\r\n let stop = false\r\n for (let plugin of this.list) {\r\n if (plugin.up(event)) {\r\n stop = true\r\n }\r\n }\r\n return stop\r\n }\r\n\r\n /**\r\n * handle wheel event for all plugins\r\n * @ignore\r\n * @param {WheelEvent} event\r\n * @returns {boolean}\r\n */\r\n wheel(e) {\r\n let result = false\r\n for (let plugin of this.list) {\r\n if (plugin.wheel(e)) {\r\n result = true\r\n }\r\n }\r\n return result\r\n }\r\n}\r\n","/**\r\n * derive this class to create user-defined plugins\r\n */\r\nexport class Plugin\r\n{\r\n /**\r\n * @param {Viewport} parent\r\n */\r\n constructor(parent)\r\n {\r\n this.parent = parent\r\n this.paused = false\r\n }\r\n\r\n /** called when plugin is removed */\r\n destroy() {}\r\n\r\n /**\r\n * handler for pointerdown PIXI event\r\n * @param {PIXI.InteractionEvent} event\r\n * @returns {boolean}\r\n */\r\n down()\r\n {\r\n return false\r\n }\r\n\r\n /**\r\n * handler for pointermove PIXI event\r\n * @param {PIXI.InteractionEvent} event\r\n * @returns {boolean}\r\n */\r\n move()\r\n {\r\n return false\r\n }\r\n\r\n /**\r\n * handler for pointerup PIXI event\r\n * @param {PIXI.InteractionEvent} event\r\n * @returns {boolean}\r\n */\r\n up()\r\n {\r\n return false\r\n }\r\n\r\n /**\r\n * handler for wheel event on div\r\n * @param {WheelEvent} event\r\n * @returns {boolean}\r\n */\r\n wheel()\r\n {\r\n return false\r\n }\r\n\r\n /**\r\n * called on each tick\r\n * @param {number} elapsed time in millisecond since last update\r\n */\r\n update() { }\r\n\r\n /** called when the viewport is resized */\r\n resize() { }\r\n\r\n /** called when the viewport is manually moved */\r\n reset() { }\r\n\r\n /** pause the plugin */\r\n pause()\r\n {\r\n this.paused = true\r\n }\r\n\r\n /** un-pause the plugin */\r\n resume()\r\n {\r\n this.paused = false\r\n }\r\n}\r\n","import * as PIXI from 'pixi.js'\r\n\r\nimport { Plugin } from './plugin'\r\n\r\n/**\r\n * @typedef {object} LastDrag\r\n * @property {number} x\r\n * @property {number} y\r\n * @property {PIXI.Point} parent\r\n */\r\n\r\n/**\r\n * @typedef DragOptions\r\n * @property {string} [direction=all] direction to drag\r\n * @property {boolean} [pressDrag=true] whether click to drag is active\r\n * @property {boolean} [wheel=true] use wheel to scroll in direction (unless wheel plugin is active)\r\n * @property {number} [wheelScroll=1] number of pixels to scroll with each wheel spin\r\n * @property {boolean} [reverse] reverse the direction of the wheel scroll\r\n * @property {(boolean|string)} [clampWheel=false] clamp wheel(to avoid weird bounce with mouse wheel)\r\n * @property {string} [underflow=center] where to place world if too small for screen\r\n * @property {number} [factor=1] factor to multiply drag to increase the speed of movement\r\n * @property {string} [mouseButtons=all] changes which mouse buttons trigger drag, use: 'all', 'left', right' 'middle', or some combination, like, 'middle-right'; you may want to set viewport.options.disableOnContextMenu if you want to use right-click dragging\r\n * @property {string[]} [keyToPress=null] array containing {@link key|https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code} codes of keys that can be pressed for the drag to be triggered, e.g.: ['ShiftLeft', 'ShiftRight'}.\r\n * @property {boolean} [ignoreKeyToPressOnTouch=false] ignore keyToPress for touch events\r\n */\r\n\r\nconst dragOptions = {\r\n direction: 'all',\r\n pressDrag: true,\r\n wheel: true,\r\n wheelScroll: 1,\r\n reverse: false,\r\n clampWheel: false,\r\n underflow: 'center',\r\n factor: 1,\r\n mouseButtons: 'all',\r\n keyToPress: null,\r\n ignoreKeyToPressOnTouch: false\r\n}\r\n\r\n/**\r\n * @private\r\n */\r\nexport class Drag extends Plugin {\r\n /**\r\n * @param {Viewport} parent\r\n * @param {DragOptions} options\r\n */\r\n constructor(parent, options = {}) {\r\n super(parent)\r\n this.options = Object.assign({}, dragOptions, options)\r\n this.moved = false\r\n this.reverse = this.options.reverse ? 1 : -1\r\n this.xDirection = !this.options.direction || this.options.direction === 'all' || this.options.direction === 'x'\r\n this.yDirection = !this.options.direction || this.options.direction === 'all' || this.options.direction === 'y'\r\n this.keyIsPressed = false\r\n\r\n this.parseUnderflow()\r\n this.mouseButtons(this.options.mouseButtons)\r\n if (this.options.keyToPress) {\r\n this.handleKeyPresses(this.options.keyToPress)\r\n }\r\n }\r\n\r\n /**\r\n * Handles keypress events and set the keyIsPressed boolean accordingly\r\n * @param {array} codes - key codes that can be used to trigger drag event\r\n */\r\n handleKeyPresses(codes) {\r\n parent.addEventListener(\"keydown\", e => {\r\n if (codes.includes(e.code))\r\n this.keyIsPressed = true\r\n })\r\n\r\n parent.addEventListener(\"keyup\", e => {\r\n if (codes.includes(e.code))\r\n this.keyIsPressed = false\r\n })\r\n }\r\n\r\n /**\r\n * initialize mousebuttons array\r\n * @param {string} buttons\r\n */\r\n mouseButtons(buttons) {\r\n if (!buttons || buttons === 'all') {\r\n this.mouse = [true, true, true]\r\n }\r\n else {\r\n this.mouse = [\r\n buttons.indexOf('left') === -1 ? false : true,\r\n buttons.indexOf('middle') === -1 ? false : true,\r\n buttons.indexOf('right') === -1 ? false : true\r\n ]\r\n }\r\n }\r\n\r\n parseUnderflow() {\r\n const clamp = this.options.underflow.toLowerCase()\r\n if (clamp === 'center') {\r\n this.underflowX = 0\r\n this.underflowY = 0\r\n }\r\n else {\r\n this.underflowX = (clamp.indexOf('left') !== -1) ? -1 : (clamp.indexOf('right') !== -1) ? 1 : 0\r\n this.underflowY = (clamp.indexOf('top') !== -1) ? -1 : (clamp.indexOf('bottom') !== -1) ? 1 : 0\r\n }\r\n }\r\n\r\n /**\r\n * @param {PIXI.InteractionEvent} event\r\n * @returns {boolean}\r\n */\r\n checkButtons(event) {\r\n const isMouse = event.data.pointerType === 'mouse'\r\n const count = this.parent.input.count()\r\n if ((count === 1) || (count > 1 && !this.parent.plugins.get('pinch', true))) {\r\n if (!isMouse || this.mouse[event.data.button]) {\r\n return true\r\n }\r\n }\r\n return false\r\n }\r\n\r\n /**\r\n * @param {PIXI.InteractionEvent} event\r\n * @returns {boolean}\r\n */\r\n checkKeyPress(event) {\r\n if (!this.options.keyToPress || this.keyIsPressed || (this.options.ignoreKeyToPressOnTouch && event.data.pointerType === 'touch'))\r\n return true\r\n\r\n return false\r\n }\r\n\r\n /**\r\n * @param {PIXI.InteractionEvent} event\r\n */\r\n down(event) {\r\n if (this.paused || !this.options.pressDrag) {\r\n return\r\n }\r\n if (this.checkButtons(event) && this.checkKeyPress(event)) {\r\n this.last = { x: event.data.global.x, y: event.data.global.y }\r\n this.current = event.data.pointerId\r\n return true\r\n }\r\n else {\r\n this.last = null\r\n }\r\n }\r\n\r\n get active() {\r\n return this.moved\r\n }\r\n\r\n /**\r\n * @param {PIXI.InteractionEvent} event\r\n */\r\n move(event) {\r\n if (this.paused || !this.options.pressDrag) {\r\n return\r\n }\r\n if (this.last && this.current === event.data.pointerId) {\r\n const x = event.data.global.x\r\n const y = event.data.global.y\r\n const count = this.parent.input.count()\r\n if (count === 1 || (count > 1 && !this.parent.plugins.get('pinch', true))) {\r\n const distX = x - this.last.x\r\n const distY = y - this.last.y\r\n if (this.moved || ((this.xDirection && this.parent.input.checkThreshold(distX)) || (this.yDirection && this.parent.input.checkThreshold(distY)))) {\r\n const newPoint = { x, y }\r\n if (this.xDirection) {\r\n this.parent.x += (newPoint.x - this.last.x) * this.options.factor\r\n }\r\n if (this.yDirection) {\r\n this.parent.y += (newPoint.y - this.last.y) * this.options.factor\r\n }\r\n this.last = newPoint\r\n if (!this.moved) {\r\n this.parent.emit('drag-start', { event: event, screen: new PIXI.Point(this.last.x, this.last.y), world: this.parent.toWorld(new PIXI.Point(this.last.x, this.last.y)), viewport: this.parent })\r\n }\r\n this.moved = true\r\n this.parent.emit('moved', { viewport: this.parent, type: 'drag' })\r\n return true\r\n }\r\n }\r\n else {\r\n this.moved = false\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @param {PIXI.InteractionEvent} event\r\n * @returns {boolean}\r\n */\r\n up(event) {\r\n if (this.paused) {\r\n return\r\n }\r\n const touches = this.parent.input.touches\r\n if (touches.length === 1) {\r\n const pointer = touches[0]\r\n if (pointer.last) {\r\n this.last = { x: pointer.last.x, y: pointer.last.y }\r\n this.current = pointer.id\r\n }\r\n this.moved = false\r\n return true\r\n }\r\n else if (this.last) {\r\n if (this.moved) {\r\n const screen = new PIXI.Point(this.last.x, this.last.y)\r\n this.parent.emit('drag-end', { event: event, screen, world: this.parent.toWorld(screen), viewport: this.parent })\r\n this.last = null\r\n this.moved = false\r\n return true\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @param {WheelEvent} event\r\n * @returns {boolean}\r\n */\r\n wheel(event) {\r\n if (this.paused) {\r\n return\r\n }\r\n\r\n if (this.options.wheel) {\r\n const wheel = this.parent.plugins.get('wheel', true)\r\n if (!wheel) {\r\n if (this.xDirection) {\r\n this.parent.x += event.deltaX * this.options.wheelScroll * this.reverse\r\n }\r\n if (this.yDirection) {\r\n this.parent.y += event.deltaY * this.options.wheelScroll * this.reverse\r\n }\r\n if (this.options.clampWheel) {\r\n this.clamp()\r\n }\r\n this.parent.emit('wheel-scroll', this.parent)\r\n this.parent.emit('moved', { viewport: this.parent, type: 'wheel' })\r\n if (!this.parent.options.passiveWheel) {\r\n event.preventDefault()\r\n }\r\n return true\r\n }\r\n }\r\n }\r\n\r\n resume() {\r\n this.last = null\r\n this.paused = false\r\n }\r\n\r\n clamp() {\r\n const decelerate = this.parent.plugins.get('decelerate', true) || {}\r\n if (this.options.clampWheel !== 'y') {\r\n if (this.parent.screenWorldWidth < this.parent.screenWidth) {\r\n switch (this.underflowX) {\r\n case -1:\r\n this.parent.x = 0\r\n break\r\n case 1:\r\n this.parent.x = (this.parent.screenWidth - this.parent.screenWorldWidth)\r\n break\r\n default:\r\n this.parent.x = (this.parent.screenWidth - this.parent.screenWorldWidth) / 2\r\n }\r\n }\r\n else {\r\n if (this.parent.left < 0) {\r\n this.parent.x = 0\r\n decelerate.x = 0\r\n }\r\n else if (this.parent.right > this.parent.worldWidth) {\r\n this.parent.x = -this.parent.worldWidth * this.parent.scale.x + this.parent.screenWidth\r\n decelerate.x = 0\r\n }\r\n }\r\n }\r\n if (this.options.clampWheel !== 'x') {\r\n if (this.parent.screenWorldHeight < this.parent.screenHeight) {\r\n switch (this.underflowY) {\r\n case -1:\r\n this.parent.y = 0\r\n break\r\n case 1:\r\n this.parent.y = (this.parent.screenHeight - this.parent.screenWorldHeight)\r\n break\r\n default:\r\n this.parent.y = (this.parent.screenHeight - this.parent.screenWorldHeight) / 2\r\n }\r\n }\r\n else {\r\n if (this.parent.top < 0) {\r\n this.parent.y = 0\r\n decelerate.y = 0\r\n }\r\n if (this.parent.bottom > this.parent.worldHeight) {\r\n this.parent.y = -this.parent.worldHeight * this.parent.scale.y + this.parent.screenHeight\r\n decelerate.y = 0\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","import { Plugin } from './plugin'\r\n\r\n/**\r\n * @typedef {object} PinchOptions\r\n * @property {boolean} [noDrag] disable two-finger dragging\r\n * @property {number} [percent=1] percent to modify pinch speed\r\n * @property {number} [factor=1] factor to multiply two-finger drag to increase the speed of movement\r\n * @property {PIXI.Point} [center] place this point at center during zoom instead of center of two fingers\r\n */\r\n\r\nconst pinchOptions = {\r\n noDrag: false,\r\n percent: 1,\r\n center: null,\r\n factor: 1,\r\n}\r\n\r\nexport class Pinch extends Plugin {\r\n /**\r\n * @private\r\n * @param {Viewport} parent\r\n * @param {PinchOptions} [options]\r\n */\r\n constructor(parent, options = {}) {\r\n super(parent)\r\n this.options = Object.assign({}, pinchOptions, options)\r\n }\r\n\r\n down() {\r\n if (this.parent.input.count() >= 2) {\r\n this.active = true\r\n return true\r\n }\r\n }\r\n\r\n move(e) {\r\n if (this.paused || !this.active) {\r\n return\r\n }\r\n\r\n const x = e.data.global.x\r\n const y = e.data.global.y\r\n\r\n const pointers = this.parent.input.touches\r\n if (pointers.length >= 2) {\r\n const first = pointers[0]\r\n const second = pointers[1]\r\n const last = (first.last && second.last) ? Math.sqrt(Math.pow(second.last.x - first.last.x, 2) + Math.pow(second.last.y - first.last.y, 2)) : null\r\n if (first.id === e.data.pointerId) {\r\n first.last = { x, y, data: e.data }\r\n }\r\n else if (second.id === e.data.pointerId) {\r\n second.last = { x, y, data: e.data }\r\n }\r\n if (last) {\r\n let oldPoint\r\n const point = { x: first.last.x + (second.last.x - first.last.x) / 2, y: first.last.y + (second.last.y - first.last.y) / 2 }\r\n if (!this.options.center) {\r\n oldPoint = this.parent.toLocal(point)\r\n }\r\n let dist = Math.sqrt(Math.pow(second.last.x - first.last.x, 2) + Math.pow(second.last.y - first.last.y, 2))\r\n dist = dist === 0 ? dist = 0.0000000001 : dist\r\n const change = (1 - last / dist) * this.options.percent * this.parent.scale.x\r\n this.parent.scale.x += change\r\n this.parent.scale.y += change\r\n this.parent.emit('zoomed', { viewport: this.parent, type: 'pinch', center: point })\r\n const clamp = this.parent.plugins.get('clamp-zoom', true)\r\n if (clamp) {\r\n clamp.clamp()\r\n }\r\n if (this.options.center) {\r\n this.parent.moveCenter(this.options.center)\r\n }\r\n else {\r\n const newPoint = this.parent.toGlobal(oldPoint)\r\n this.parent.x += (point.x - newPoint.x) * this.options.factor\r\n this.parent.y += (point.y - newPoint.y) * this.options.factor\r\n this.parent.emit('moved', { viewport: this.parent, type: 'pinch' })\r\n }\r\n if (!this.options.noDrag && this.lastCenter) {\r\n this.parent.x += (point.x - this.lastCenter.x) * this.options.factor\r\n this.parent.y += (point.y - this.lastCenter.y) * this.options.factor\r\n this.parent.emit('moved', { viewport: this.parent, type: 'pinch' })\r\n }\r\n this.lastCenter = point\r\n this.moved = true\r\n }\r\n else {\r\n if (!this.pinching) {\r\n this.parent.emit('pinch-start', this.parent)\r\n this.pinching = true\r\n }\r\n }\r\n return true\r\n }\r\n }\r\n\r\n up() {\r\n if (this.pinching) {\r\n if (this.parent.input.touches.length <= 1) {\r\n this.active = false\r\n this.lastCenter = null\r\n this.pinching = false\r\n this.moved = false\r\n this.parent.emit('pinch-end', this.parent)\r\n return true\r\n }\r\n }\r\n }\r\n}","import { Plugin } from './plugin'\r\n\r\n/**\r\n * @typedef ClampOptions\r\n * @property {(number|boolean)} [left=false] clamp left; true = 0\r\n * @property {(number|boolean)} [right=false] clamp right; true = viewport.worldWidth\r\n * @property {(number|boolean)} [top=false] clamp top; true = 0\r\n * @property {(number|boolean)} [bottom=false] clamp bottom; true = viewport.worldHeight\r\n * @property {string} [direction] (all, x, or y) using clamps of [0, viewport.worldWidth/viewport.worldHeight]; replaces left/right/top/bottom if set\r\n * @property {string} [underflow=center] where to place world if too small for screen (e.g., top-right, center, none, bottomleft)\r\n */\r\n\r\nconst clampOptions =\r\n{\r\n left: false,\r\n right: false,\r\n top: false,\r\n bottom: false,\r\n direction: null,\r\n underflow: 'center'\r\n}\r\n\r\nexport class Clamp extends Plugin\r\n{\r\n /**\r\n * @private\r\n * @param {Viewport} parent\r\n * @param {ClampOptions} [options]\r\n */\r\n constructor(parent, options={})\r\n {\r\n super(parent)\r\n this.options = Object.assign({}, clampOptions, options)\r\n if (this.options.direction)\r\n {\r\n this.options.left = this.options.direction === 'x' || this.options.direction === 'all' ? true : null\r\n this.options.right = this.options.direction === 'x' || this.options.direction === 'all' ? true : null\r\n this.options.top = this.options.direction === 'y' || this.options.direction === 'all' ? true : null\r\n this.options.bottom = this.options.direction === 'y' || this.options.direction === 'all' ? true : null\r\n }\r\n this.parseUnderflow()\r\n this.last = { x: null, y: null, scaleX: null, scaleY: null }\r\n this.update()\r\n }\r\n\r\n parseUnderflow()\r\n {\r\n const clamp = this.options.underflow.toLowerCase()\r\n if (clamp === 'none')\r\n {\r\n this.noUnderflow = true\r\n }\r\n else if (clamp === 'center')\r\n {\r\n this.underflowX = this.underflowY = 0\r\n this.noUnderflow = false\r\n }\r\n else\r\n {\r\n this.underflowX = (clamp.indexOf('left') !== -1) ? -1 : (clamp.indexOf('right') !== -1) ? 1 : 0\r\n this.underflowY = (clamp.indexOf('top') !== -1) ? -1 : (clamp.indexOf('bottom') !== -1) ? 1 : 0\r\n this.noUnderflow = false\r\n }\r\n }\r\n\r\n /**\r\n * handle move events\r\n * @param {PIXI.InteractionEvent} event\r\n * @returns {boolean}\r\n */\r\n move()\r\n {\r\n this.update()\r\n return false\r\n }\r\n\r\n update()\r\n {\r\n if (this.paused)\r\n {\r\n return\r\n }\r\n\r\n // only clamp on change\r\n if (this.parent.x === this.last.x && this.parent.y === this.last.y && this.parent.scale.x === this.last.scaleX && this.parent.scale.y === this.last.scaleY)\r\n {\r\n return\r\n }\r\n const original = { x: this.parent.x, y: this.parent.y }\r\n const decelerate = this.parent.plugins['decelerate'] || {}\r\n if (this.options.left !== null || this.options.right !== null)\r\n {\r\n let moved = false\r\n if (this.parent.screenWorldWidth < this.parent.screenWidth)\r\n {\r\n if (!this.noUnderflow)\r\n {\r\n switch (this.underflowX)\r\n {\r\n case -1:\r\n if (this.parent.x !== 0)\r\n {\r\n this.parent.x = 0\r\n moved = true\r\n }\r\n break\r\n case 1:\r\n if (this.parent.x !== this.parent.screenWidth - this.parent.screenWorldWidth)\r\n {\r\n this.parent.x = this.parent.screenWidth - this.parent.screenWorldWidth\r\n moved = true\r\n }\r\n break\r\n default:\r\n if (this.parent.x !== (this.parent.screenWidth - this.parent.screenWorldWidth) / 2)\r\n {\r\n this.parent.x = (this.parent.screenWidth - this.parent.screenWorldWidth) / 2\r\n moved = true\r\n }\r\n }\r\n }\r\n }\r\n else\r\n {\r\n if (this.options.left !== null)\r\n {\r\n if (this.parent.left < (this.options.left === true ? 0 : this.options.left))\r\n {\r\n this.parent.x = -(this.options.left === true ? 0 : this.options.left) * this.parent.scale.x\r\n decelerate.x = 0\r\n moved = true\r\n }\r\n }\r\n if (this.options.right !== null)\r\n {\r\n if (this.parent.right > (this.options.right === true ? this.parent.worldWidth : this.options.right))\r\n {\r\n this.parent.x = -(this.options.right === true ? this.parent.worldWidth : this.options.right) * this.parent.scale.x + this.parent.screenWidth\r\n decelerate.x = 0\r\n moved = true\r\n }\r\n }\r\n }\r\n if (moved)\r\n {\r\n this.parent.emit('moved', { viewport: this.parent, original, type: 'clamp-x' })\r\n }\r\n }\r\n if (this.options.top !== null || this.options.bottom !== null)\r\n {\r\n let moved = false\r\n if (this.parent.screenWorldHeight < this.parent.screenHeight)\r\n {\r\n if (!this.noUnderflow)\r\n {\r\n switch (this.underflowY)\r\n {\r\n case -1:\r\n if (this.parent.y !== 0)\r\n {\r\n this.parent.y = 0\r\n moved = true\r\n }\r\n break\r\n case 1:\r\n if (this.parent.y !== this.parent.screenHeight - this.parent.screenWorldHeight)\r\n {\r\n this.parent.y = (this.parent.screenHeight - this.parent.screenWorldHeight)\r\n moved = true\r\n }\r\n break\r\n default:\r\n if (this.parent.y !== (this.parent.screenHeight - this.parent.screenWorldHeight) / 2)\r\n {\r\n this.parent.y = (this.parent.screenHeight - this.parent.screenWorldHeight) / 2\r\n moved = true\r\n }\r\n }\r\n }\r\n }\r\n else\r\n {\r\n if (this.options.top !== null)\r\n {\r\n if (this.parent.top < (this.options.top === true ? 0 : this.options.top))\r\n {\r\n this.parent.y = -(this.options.top === true ? 0 : this.options.top) * this.parent.scale.y\r\n decelerate.y = 0\r\n moved = true\r\n }\r\n }\r\n if (this.options.bottom !== null)\r\n {\r\n if (this.parent.bottom > (this.options.bottom === true ? this.parent.worldHeight : this.options.bottom))\r\n {\r\n this.parent.y = -(this.options.bottom === true ? this.parent.worldHeight : this.options.bottom) * this.parent.scale.y + this.parent.screenHeight\r\n decelerate.y = 0\r\n moved = true\r\n }\r\n }\r\n }\r\n if (moved)\r\n {\r\n this.parent.emit('moved', { viewport: this.parent, original, type: 'clamp-y' })\r\n }\r\n }\r\n this.last.x = this.parent.x\r\n this.last.y = this.parent.y\r\n this.last.scaleX = this.parent.scale.x\r\n this.last.scaleY = this.parent.scale.y\r\n }\r\n\r\n reset() \r\n {\r\n this.update();\r\n }\r\n}\r\n","import { Plugin } from './plugin'\r\n\r\n/**\r\n * use either minimum width/height or minimum scale\r\n * @typedef {object} ClampZoomOptions\r\n * @property {number} [minWidth] minimum width\r\n * @property {number} [minHeight] minimum height\r\n * @property {number} [maxWidth] maximum width\r\n * @property {number} [maxHeight] maximum height\r\n * @property {number} [minScale] minimum scale\r\n * @property {number} [maxScale] minimum scale\r\n */\r\n\r\nconst clampZoomOptions = {\r\n minWidth: null,\r\n minHeight: null,\r\n maxWidth: null,\r\n maxHeight: null,\r\n minScale: null,\r\n maxScale: null\r\n}\r\n\r\nexport class ClampZoom extends Plugin\r\n{\r\n /**\r\n * @private\r\n * @param {Viewport} parent\r\n * @param {ClampZoomOptions} [options]\r\n */\r\n constructor(parent, options={})\r\n {\r\n super(parent)\r\n this.options = Object.assign({}, clampZoomOptions, options)\r\n this.clamp()\r\n }\r\n\r\n resize()\r\n {\r\n this.clamp()\r\n }\r\n\r\n clamp()\r\n {\r\n if (this.paused)\r\n {\r\n return\r\n }\r\n\r\n if (this.options.minWidth || this.options.minHeight || this.options.maxWidth || this.options.maxHeight)\r\n {\r\n let width = this.parent.worldScreenWidth\r\n let height = this.parent.worldScreenHeight\r\n if (this.options.minWidth !== null && width < this.options.minWidth)\r\n {\r\n const original = this.parent.scale.x\r\n this.parent.fitWidth(this.options.minWidth, false, false, true)\r\n this.parent.scale.y *= this.parent.scale.x / original\r\n width = this.parent.worldScreenWidth\r\n height = this.parent.worldScreenHeight\r\n this.parent.emit('zoomed', { viewport: this.parent, type: 'clamp-zoom' })\r\n }\r\n if (this.options.maxWidth !== null && width > this.options.maxWidth)\r\n {\r\n const original = this.parent.scale.x\r\n this.parent.fitWidth(this.options.maxWidth, false, false, true)\r\n this.parent.scale.y *= this.parent.scale.x / original\r\n width = this.parent.worldScreenWidth\r\n height = this.parent.worldScreenHeight\r\n this.parent.emit('zoomed', { viewport: this.parent, type: 'clamp-zoom' })\r\n }\r\n if (this.options.minHeight !== null && height < this.options.minHeight)\r\n {\r\n const original = this.parent.scale.y\r\n this.parent.fitHeight(this.options.minHeight, false, false, true)\r\n this.parent.scale.x *= this.parent.scale.y / original\r\n width = this.parent.worldScreenWidth\r\n height = this.parent.worldScreenHeight\r\n this.parent.emit('zoomed', { viewport: this.parent, type: 'clamp-zoom' })\r\n }\r\n if (this.options.maxHeight !== null && height > this.options.maxHeight)\r\n {\r\n const original = this.parent.scale.y\r\n this.parent.fitHeight(this.options.maxHeight, false, false, true)\r\n this.parent.scale.x *= this.parent.scale.y / original\r\n this.parent.emit('zoomed', { viewport: this.parent, type: 'clamp-zoom' })\r\n }\r\n }\r\n else\r\n {\r\n let scale = this.parent.scale.x\r\n if (this.options.minScale !== null && scale < this.options.minScale)\r\n {\r\n scale = this.options.minScale\r\n }\r\n if (this.options.maxScale !== null && scale > this.options.maxScale)\r\n {\r\n scale = this.options.maxScale\r\n }\r\n if (scale !== this.parent.scale.x) {\r\n this.parent.scale.set(scale)\r\n this.parent.emit('zoomed', { viewport: this.parent, type: 'clamp-zoom' })\r\n }\r\n }\r\n }\r\n\r\n reset()\r\n {\r\n this.clamp()\r\n }\r\n}\r\n","import { Plugin } from './plugin'\r\n\r\n/**\r\n * @typedef {object} DecelerateOptions\r\n * @property {number} [friction=0.95] percent to decelerate after movement\r\n * @property {number} [bounce=0.8] percent to decelerate when past boundaries (only applicable when viewport.bounce() is active)\r\n * @property {number} [minSpeed=0.01] minimum velocity before stopping/reversing acceleration\r\n */\r\n\r\nconst decelerateOptions = {\r\n friction: 0.95,\r\n bounce: 0.8,\r\n minSpeed: 0.01\r\n}\r\n\r\nexport class Decelerate extends Plugin {\r\n /**\r\n * @private\r\n * @param {Viewport} parent\r\n * @param {DecelerateOptions} [options]\r\n */\r\n constructor(parent, options = {}) {\r\n super(parent)\r\n this.options = Object.assign({}, decelerateOptions, options)\r\n this.saved = []\r\n this.reset()\r\n this.parent.on('moved', data => this.moved(data))\r\n }\r\n\r\n destroy() {\r\n this.parent\r\n }\r\n\r\n down() {\r\n this.saved = []\r\n this.x = this.y = false\r\n }\r\n\r\n isActive() {\r\n return this.x || this.y\r\n }\r\n\r\n move() {\r\n if (this.paused) {\r\n return\r\n }\r\n\r\n const count = this.parent.input.count()\r\n if (count === 1 || (count > 1 && !this.parent.plugins.get('pinch', true))) {\r\n this.saved.push({ x: this.parent.x, y: this.parent.y, time: performance.now() })\r\n if (this.saved.length > 60) {\r\n this.saved.splice(0, 30)\r\n }\r\n }\r\n }\r\n\r\n moved(data) {\r\n if (this.saved.length) {\r\n const last = this.saved[this.saved.length - 1]\r\n if (data.type === 'clamp-x') {\r\n if (last.x === data.original.x) {\r\n last.x = this.parent.x\r\n }\r\n }\r\n else if (data.type === 'clamp-y') {\r\n if (last.y === data.original.y) {\r\n last.y = this.parent.y\r\n }\r\n }\r\n }\r\n }\r\n\r\n up() {\r\n if (this.parent.input.count() === 0 && this.saved.length) {\r\n const now = performance.now()\r\n for (let save of this.saved) {\r\n if (save.time >= now - 100) {\r\n const time = now - save.time\r\n this.x = (this.parent.x - save.x) / time\r\n this.y = (this.parent.y - save.y) / time\r\n this.percentChangeX = this.percentChangeY = this.options.friction\r\n break\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * manually activate plugin\r\n * @param {object} options\r\n * @param {number} [options.x]\r\n * @param {number} [options.y]\r\n */\r\n activate(options) {\r\n options = options || {}\r\n if (typeof options.x !== 'undefined') {\r\n this.x = options.x\r\n this.percentChangeX = this.options.friction\r\n }\r\n if (typeof options.y !== 'undefined') {\r\n this.y = options.y\r\n this.percentChangeY = this.options.friction\r\n }\r\n }\r\n\r\n update(elapsed) {\r\n if (this.paused) {\r\n return\r\n }\r\n\r\n let moved\r\n if (this.x) {\r\n this.parent.x += this.x * elapsed\r\n this.x *= this.percentChangeX\r\n if (Math.abs(this.x) < this.options.minSpeed) {\r\n this.x = 0\r\n }\r\n moved = true\r\n }\r\n if (this.y) {\r\n this.parent.y += this.y * elapsed\r\n this.y *= this.percentChangeY\r\n if (Math.abs(this.y) < this.options.minSpeed) {\r\n this.y = 0\r\n }\r\n moved = true\r\n }\r\n if (moved) {\r\n this.parent.emit('moved', { viewport: this.parent, type: 'decelerate' })\r\n }\r\n }\r\n\r\n reset() {\r\n this.x = this.y = null\r\n }\r\n}","\n/*\n\tCopyright © 2001 Robert Penner\n\tAll rights reserved.\n\n\tRedistribution and use in source and binary forms, with or without modification, \n\tare permitted provided that the following conditions are met:\n\n\tRedistributions of source code must retain the above copyright notice, this list of \n\tconditions and the following disclaimer.\n\tRedistributions in binary form must reproduce the above copyright notice, this list \n\tof conditions and the following disclaimer in the documentation and/or other materials \n\tprovided with the distribution.\n\n\tNeither the name of the author nor the names of contributors may be used to endorse \n\tor promote products derived from this software without specific prior written permission.\n\n\tTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY \n\tEXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n\tMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n\tCOPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n\tEXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED \n\tAND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n\tNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED \n\tOF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n(function() {\n var penner, umd;\n\n umd = function(factory) {\n if (typeof exports === 'object') {\n return module.exports = factory;\n } else if (typeof define === 'function' && define.amd) {\n return define([], factory);\n } else {\n return this.penner = factory;\n }\n };\n\n penner = {\n linear: function(t, b, c, d) {\n return c * t / d + b;\n },\n easeInQuad: function(t, b, c, d) {\n return c * (t /= d) * t + b;\n },\n easeOutQuad: function(t, b, c, d) {\n return -c * (t /= d) * (t - 2) + b;\n },\n easeInOutQuad: function(t, b, c, d) {\n if ((t /= d / 2) < 1) {\n return c / 2 * t * t + b;\n } else {\n return -c / 2 * ((--t) * (t - 2) - 1) + b;\n }\n },\n easeInCubic: function(t, b, c, d) {\n return c * (t /= d) * t * t + b;\n },\n easeOutCubic: function(t, b, c, d) {\n return c * ((t = t / d - 1) * t * t + 1) + b;\n },\n easeInOutCubic: function(t, b, c, d) {\n if ((t /= d / 2) < 1) {\n return c / 2 * t * t * t + b;\n } else {\n return c / 2 * ((t -= 2) * t * t + 2) + b;\n }\n },\n easeInQuart: function(t, b, c, d) {\n return c * (t /= d) * t * t * t + b;\n },\n easeOutQuart: function(t, b, c, d) {\n return -c * ((t = t / d - 1) * t * t * t - 1) + b;\n },\n easeInOutQuart: function(t, b, c, d) {\n if ((t /= d / 2) < 1) {\n return c / 2 * t * t * t * t + b;\n } else {\n return -c / 2 * ((t -= 2) * t * t * t - 2) + b;\n }\n },\n easeInQuint: function(t, b, c, d) {\n return c * (t /= d) * t * t * t * t + b;\n },\n easeOutQuint: function(t, b, c, d) {\n return c * ((t = t / d - 1) * t * t * t * t + 1) + b;\n },\n easeInOutQuint: function(t, b, c, d) {\n if ((t /= d / 2) < 1) {\n return c / 2 * t * t * t * t * t + b;\n } else {\n return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;\n }\n },\n easeInSine: function(t, b, c, d) {\n return -c * Math.cos(t / d * (Math.PI / 2)) + c + b;\n },\n easeOutSine: function(t, b, c, d) {\n return c * Math.sin(t / d * (Math.PI / 2)) + b;\n },\n easeInOutSine: function(t, b, c, d) {\n return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;\n },\n easeInExpo: function(t, b, c, d) {\n if (t === 0) {\n return b;\n } else {\n return c * Math.pow(2, 10 * (t / d - 1)) + b;\n }\n },\n easeOutExpo: function(t, b, c, d) {\n if (t === d) {\n return b + c;\n } else {\n return c * (-Math.pow(2, -10 * t / d) + 1) + b;\n }\n },\n easeInOutExpo: function(t, b, c, d) {\n if (t === 0) {\n b;\n }\n if (t === d) {\n b + c;\n }\n if ((t /= d / 2) < 1) {\n return c / 2 * Math.pow(2, 10 * (t - 1)) + b;\n } else {\n return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b;\n }\n },\n easeInCirc: function(t, b, c, d) {\n return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b;\n },\n easeOutCirc: function(t, b, c, d) {\n return c * Math.sqrt(1 - (t = t / d - 1) * t) + b;\n },\n easeInOutCirc: function(t, b, c, d) {\n if ((t /= d / 2) < 1) {\n return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b;\n } else {\n return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b;\n }\n },\n easeInElastic: function(t, b, c, d) {\n var a, p, s;\n s = 1.70158;\n p = 0;\n a = c;\n if (t === 0) {\n b;\n } else if ((t /= d) === 1) {\n b + c;\n }\n if (!p) {\n p = d * .3;\n }\n if (a < Math.abs(c)) {\n a = c;\n s = p / 4;\n } else {\n s = p / (2 * Math.PI) * Math.asin(c / a);\n }\n return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;\n },\n easeOutElastic: function(t, b, c, d) {\n var a, p, s;\n s = 1.70158;\n p = 0;\n a = c;\n if (t === 0) {\n b;\n } else if ((t /= d) === 1) {\n b + c;\n }\n if (!p) {\n p = d * .3;\n }\n if (a < Math.abs(c)) {\n a = c;\n s = p / 4;\n } else {\n s = p / (2 * Math.PI) * Math.asin(c / a);\n }\n return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b;\n },\n easeInOutElastic: function(t, b, c, d) {\n var a, p, s;\n s = 1.70158;\n p = 0;\n a = c;\n if (t === 0) {\n b;\n } else if ((t /= d / 2) === 2) {\n b + c;\n }\n if (!p) {\n p = d * (.3 * 1.5);\n }\n if (a < Math.abs(c)) {\n a = c;\n s = p / 4;\n } else {\n s = p / (2 * Math.PI) * Math.asin(c / a);\n }\n if (t < 1) {\n return -.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;\n } else {\n return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * .5 + c + b;\n }\n },\n easeInBack: function(t, b, c, d, s) {\n if (s === void 0) {\n s = 1.70158;\n }\n return c * (t /= d) * t * ((s + 1) * t - s) + b;\n },\n easeOutBack: function(t, b, c, d, s) {\n if (s === void 0) {\n s = 1.70158;\n }\n return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;\n },\n easeInOutBack: function(t, b, c, d, s) {\n if (s === void 0) {\n s = 1.70158;\n }\n if ((t /= d / 2) < 1) {\n return c / 2 * (t * t * (((s *= 1.525) + 1) * t - s)) + b;\n } else {\n return c / 2 * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2) + b;\n }\n },\n easeInBounce: function(t, b, c, d) {\n var v;\n v = penner.easeOutBounce(d - t, 0, c, d);\n return c - v + b;\n },\n easeOutBounce: function(t, b, c, d) {\n if ((t /= d) < 1 / 2.75) {\n return c * (7.5625 * t * t) + b;\n } else if (t < 2 / 2.75) {\n return c * (7.5625 * (t -= 1.5 / 2.75) * t + .75) + b;\n } else if (t < 2.5 / 2.75) {\n return c * (7.5625 * (t -= 2.25 / 2.75) * t + .9375) + b;\n } else {\n return c * (7.5625 * (t -= 2.625 / 2.75) * t + .984375) + b;\n }\n },\n easeInOutBounce: function(t, b, c, d) {\n var v;\n if (t < d / 2) {\n v = penner.easeInBounce(t * 2, 0, c, d);\n return v * .5 + b;\n } else {\n v = penner.easeOutBounce(t * 2 - d, 0, c, d);\n return v * .5 + c * .5 + b;\n }\n }\n };\n\n umd(penner);\n\n}).call(this);\n","import Penner from 'penner'\r\n\r\n/**\r\n * returns correct Penner equation using string or Function\r\n * @param {(function|string)} [ease]\r\n * @param {defaults} default penner equation to use if none is provided\r\n */\r\nexport default function ease(ease, defaults)\r\n{\r\n if (!ease)\r\n {\r\n return Penner[defaults]\r\n }\r\n else if (typeof ease === 'function')\r\n {\r\n return ease\r\n }\r\n else if (typeof ease === 'string')\r\n {\r\n return Penner[ease]\r\n }\r\n}","import * as PIXI from 'pixi.js'\r\nimport { Plugin } from './plugin'\r\nimport ease from '../ease'\r\n\r\n/**\r\n * @typedef {options} BounceOptions\r\n * @property {string} [sides=all] all, horizontal, vertical, or combination of top, bottom, right, left (e.g., 'top-bottom-right')\r\n * @property {number} [friction=0.5] friction to apply to decelerate if active\r\n * @property {number} [time=150] time in ms to finish bounce\r\n * @property {object} [bounceBox] use this bounceBox instead of (0, 0, viewport.worldWidth, viewport.worldHeight)\r\n * @property {number} [bounceBox.x=0]\r\n * @property {number} [bounceBox.y=0]\r\n * @property {number} [bounceBox.width=viewport.worldWidth]\r\n * @property {number} [bounceBox.height=viewport.worldHeight]\r\n * @property {string|function} [ease=easeInOutSine] ease function or name (see http://easings.net/ for supported names)\r\n * @property {string} [underflow=center] (top/bottom/center and left/right/center, or center) where to place world if too small for screen\r\n */\r\n\r\nconst bounceOptions = {\r\n sides: 'all',\r\n friction: 0.5,\r\n time: 150,\r\n ease: 'easeInOutSine',\r\n underflow: 'center',\r\n bounceBox: null\r\n}\r\n\r\nexport class Bounce extends Plugin {\r\n /**\r\n * @private\r\n * @param {Viewport} parent\r\n * @param {BounceOptions} [options]\r\n * @fires bounce-start-x\r\n * @fires bounce.end-x\r\n * @fires bounce-start-y\r\n * @fires bounce-end-y\r\n */\r\n constructor(parent, options = {}) {\r\n super(parent)\r\n this.options = Object.assign({}, bounceOptions, options)\r\n this.ease = ease(this.options.ease, 'easeInOutSine')\r\n if (this.options.sides) {\r\n if (this.options.sides === 'all') {\r\n this.top = this.bottom = this.left = this.right = true\r\n }\r\n else if (this.options.sides === 'horizontal') {\r\n this.right = this.left = true\r\n }\r\n else if (this.options.sides === 'vertical') {\r\n this.top = this.bottom = true\r\n }\r\n else {\r\n this.top = this.options.sides.indexOf('top') !== -1\r\n this.bottom = this.options.sides.indexOf('bottom') !== -1\r\n this.left = this.options.sides.indexOf('left') !== -1\r\n this.right = this.options.sides.indexOf('right') !== -1\r\n }\r\n }\r\n this.parseUnderflow()\r\n this.last = {}\r\n this.reset()\r\n }\r\n\r\n parseUnderflow() {\r\n const clamp = this.options.underflow.toLowerCase()\r\n if (clamp === 'center') {\r\n this.underflowX = 0\r\n this.underflowY = 0\r\n }\r\n else {\r\n this.underflowX = (clamp.indexOf('left') !== -1) ? -1 : (clamp.indexOf('right') !== -1) ? 1 : 0\r\n this.underflowY = (clamp.indexOf('top') !== -1) ? -1 : (clamp.indexOf('bottom') !== -1) ? 1 : 0\r\n }\r\n }\r\n\r\n isActive() {\r\n return this.toX !== null || this.toY !== null\r\n }\r\n\r\n down() {\r\n this.toX = this.toY = null\r\n }\r\n\r\n up() {\r\n this.bounce()\r\n }\r\n\r\n update(elapsed) {\r\n if (this.paused) {\r\n return\r\n }\r\n\r\n this.bounce()\r\n if (this.toX) {\r\n const toX = this.toX\r\n toX.time += elapsed\r\n this.parent.emit('moved', { viewport: this.parent, type: 'bounce-x' })\r\n if (toX.time >= this.options.time) {\r\n this.parent.x = toX.end\r\n this.toX = null\r\n this.parent.emit('bounce-x-end', this.parent)\r\n }\r\n else {\r\n this.parent.x = this.ease(toX.time, toX.start, toX.delta, this.options.time)\r\n }\r\n }\r\n if (this.toY) {\r\n const toY = this.toY\r\n toY.time += elapsed\r\n this.parent.emit('moved', { viewport: this.parent, type: 'bounce-y' })\r\n if (toY.time >= this.options.time) {\r\n this.parent.y = toY.end\r\n this.toY = null\r\n this.parent.emit('bounce-y-end', this.parent)\r\n }\r\n else {\r\n this.parent.y = this.ease(toY.time, toY.start, toY.delta, this.options.time)\r\n }\r\n }\r\n }\r\n\r\n calcUnderflowX() {\r\n let x\r\n switch (this.underflowX) {\r\n case -1:\r\n x = 0\r\n break\r\n case 1:\r\n x = (this.parent.screenWidth - this.parent.screenWorldWidth)\r\n break\r\n default:\r\n x = (this.parent.screenWidth - this.parent.screenWorldWidth) / 2\r\n }\r\n return x\r\n }\r\n\r\n calcUnderflowY() {\r\n let y\r\n switch (this.underflowY) {\r\n case -1:\r\n y = 0\r\n break\r\n case 1:\r\n y = (this.parent.screenHeight - this.parent.screenWorldHeight)\r\n break\r\n default:\r\n y = (this.parent.screenHeight - this.parent.screenWorldHeight) / 2\r\n }\r\n return y\r\n }\r\n\r\n oob() {\r\n const box = this.options.bounceBox\r\n if (box) {\r\n const x1 = typeof box.x === 'undefined' ? 0 : box.x\r\n const y1 = typeof box.y === 'undefined' ? 0 : box.y\r\n const width = typeof box.width === 'undefined' ? this.parent.worldWidth : box.width\r\n const height = typeof box.height === 'undefined' ? this.parent.worldHeight : box.height\r\n return {\r\n left: this.parent.left < x1,\r\n right: this.parent.right > width,\r\n top: this.parent.top < y1,\r\n bottom: this.parent.bottom > height,\r\n topLeft: new PIXI.Point(\r\n x1 * this.parent.scale.x,\r\n y1 * this.parent.scale.y\r\n ),\r\n bottomRight: new PIXI.Point(\r\n width * this.parent.scale.x - this.parent.screenWidth,\r\n height * this.parent.scale.y - this.parent.screenHeight\r\n )\r\n }\r\n }\r\n return {\r\n left: this.parent.left < 0,\r\n right: this.parent.right > this.parent.worldWidth,\r\n top: this.parent.top < 0,\r\n bottom: this.parent.bottom > this.parent.worldHeight,\r\n topLeft: new PIXI.Point(0, 0),\r\n bottomRight: new PIXI.Point(\r\n this.parent.worldWidth * this.parent.scale.x - this.parent.screenWidth,\r\n this.parent.worldHeight * this.parent.scale.y - this.parent.screenHeight\r\n )\r\n }\r\n }\r\n\r\n bounce() {\r\n if (this.paused) {\r\n return\r\n }\r\n\r\n let oob\r\n let decelerate = this.parent.plugins.get('decelerate', true)\r\n if (decelerate && (decelerate.x || decelerate.y)) {\r\n if ((decelerate.x && decelerate.percentChangeX === decelerate.options.friction) || (decelerate.y && decelerate.percentChangeY === decelerate.options.friction)) {\r\n oob = this.oob()\r\n if ((oob.left && this.left) || (oob.right && this.right)) {\r\n decelerate.percentChangeX = this.options.friction\r\n }\r\n if ((oob.top && this.top) || (oob.bottom && this.bottom)) {\r\n decelerate.percentChangeY = this.options.friction\r\n }\r\n }\r\n }\r\n const drag = this.parent.plugins.get('drag', true) || {}\r\n const pinch = this.parent.plugins.get('pinch', true) || {}\r\n decelerate = decelerate || {}\r\n if (!drag.active && !pinch.active && ((!this.toX || !this.toY) && (!decelerate.x || !decelerate.y))) {\r\n oob = oob || this.oob()\r\n const topLeft = oob.topLeft\r\n const bottomRight = oob.bottomRight\r\n if (!this.toX && !decelerate.x) {\r\n let x = null\r\n if (oob.left && this.left) {\r\n x = (this.parent.screenWorldWidth < this.parent.screenWidth) ? this.calcUnderflowX() : -topLeft.x\r\n }\r\n else if (oob.right && this.right) {\r\n x = (this.parent.screenWorldWidth < this.parent.screenWidth) ? this.calcUnderflowX() : -bottomRight.x\r\n }\r\n if (x !== null && this.parent.x !== x) {\r\n this.toX = { time: 0, start: this.parent.x, delta: x - this.parent.x, end: x }\r\n this.parent.emit('bounce-x-start', this.parent)\r\n }\r\n }\r\n if (!this.toY && !decelerate.y) {\r\n let y = null\r\n if (oob.top && this.top) {\r\n y = (this.parent.screenWorldHeight < this.parent.screenHeight) ? this.calcUnderflowY() : -topLeft.y\r\n }\r\n else if (oob.bottom && this.bottom) {\r\n y = (this.parent.screenWorldHeight < this.parent.screenHeight) ? this.calcUnderflowY() : -bottomRight.y\r\n }\r\n if (y !== null && this.parent.y !== y) {\r\n this.toY = { time: 0, start: this.parent.y, delta: y - this.parent.y, end: y }\r\n this.parent.emit('bounce-y-start', this.parent)\r\n }\r\n }\r\n }\r\n }\r\n\r\n reset() {\r\n this.toX = this.toY = null\r\n this.bounce()\r\n }\r\n}","import { Plugin } from './plugin'\r\nimport ease from '../ease'\r\n\r\n/**\r\n * @typedef SnapOptions\r\n * @property {boolean} [topLeft] snap to the top-left of viewport instead of center\r\n * @property {number} [friction=0.8] friction/frame to apply if decelerate is active\r\n * @property {number} [time=1000]\r\n * @property {string|function} [ease=easeInOutSine] ease function or name (see http://easings.net/ for supported names)\r\n * @property {boolean} [interrupt=true] pause snapping with any user input on the viewport\r\n * @property {boolean} [removeOnComplete] removes this plugin after snapping is complete\r\n * @property {boolean} [removeOnInterrupt] removes this plugin if interrupted by any user input\r\n * @property {boolean} [forceStart] starts the snap immediately regardless of whether the viewport is at the desired location\r\n */\r\n\r\nconst snapOptions = {\r\n topLeft: false,\r\n friction: 0.8,\r\n time: 1000,\r\n ease: 'easeInOutSine',\r\n interrupt: true,\r\n removeOnComplete: false,\r\n removeOnInterrupt: false,\r\n forceStart: false\r\n}\r\n\r\nexport class Snap extends Plugin {\r\n /**\r\n * @private\r\n * @param {Viewport} parent\r\n * @param {number} x\r\n * @param {number} y\r\n * @param {SnapOptions} [options]\r\n * @event snap-start(Viewport) emitted each time a snap animation starts\r\n * @event snap-restart(Viewport) emitted each time a snap resets because of a change in viewport size\r\n * @event snap-end(Viewport) emitted each time snap reaches its target\r\n * @event snap-remove(Viewport) emitted if snap plugin is removed\r\n */\r\n constructor(parent, x, y, options = {}) {\r\n super(parent)\r\n this.options = Object.assign({}, snapOptions, options)\r\n this.ease = ease(options.ease, 'easeInOutSine')\r\n this.x = x\r\n this.y = y\r\n if (this.options.forceStart) {\r\n this.snapStart()\r\n }\r\n }\r\n\r\n snapStart() {\r\n this.percent = 0\r\n this.snapping = { time: 0 }\r\n const current = this.options.topLeft ? this.parent.corner : this.parent.center\r\n this.deltaX = this.x - current.x\r\n this.deltaY = this.y - current.y\r\n this.startX = current.x\r\n this.startY = current.y\r\n this.parent.emit('snap-start', this.parent)\r\n }\r\n\r\n wheel() {\r\n if (this.options.removeOnInterrupt) {\r\n this.parent.plugins.remove('snap')\r\n }\r\n }\r\n\r\n down() {\r\n if (this.options.removeOnInterrupt) {\r\n this.parent.plugins.remove('snap')\r\n }\r\n else if (this.options.interrupt) {\r\n this.snapping = null\r\n }\r\n }\r\n\r\n up() {\r\n if (this.parent.input.count() === 0) {\r\n const decelerate = this.parent.plugins.get('decelerate', true)\r\n if (decelerate && (decelerate.x || decelerate.y)) {\r\n decelerate.percentChangeX = decelerate.percentChangeY = this.options.friction\r\n }\r\n }\r\n }\r\n\r\n update(elapsed) {\r\n if (this.paused) {\r\n return\r\n }\r\n if (this.options.interrupt && this.parent.input.count() !== 0) {\r\n return\r\n }\r\n if (!this.snapping) {\r\n const current = this.options.topLeft ? this.parent.corner : this.parent.center\r\n if (current.x !== this.x || current.y !== this.y) {\r\n this.snapStart()\r\n }\r\n }\r\n else {\r\n const snapping = this.snapping\r\n snapping.time += elapsed\r\n let finished, x, y\r\n if (snapping.time > this.options.time) {\r\n finished = true\r\n x = this.startX + this.deltaX\r\n y = this.startY + this.deltaY\r\n }\r\n else {\r\n const percent = this.ease(snapping.time, 0, 1, this.options.time)\r\n x = this.startX + this.deltaX * percent\r\n y = this.startY + this.deltaY * percent\r\n }\r\n if (this.options.topLeft) {\r\n this.parent.moveCorner(x, y)\r\n }\r\n else {\r\n this.parent.moveCenter(x, y)\r\n }\r\n this.parent.emit('moved', { viewport: this.parent, type: 'snap' })\r\n if (finished) {\r\n if (this.options.removeOnComplete) {\r\n this.parent.plugins.remove('snap')\r\n }\r\n this.parent.emit('snap-end', this.parent)\r\n this.snapping = null\r\n }\r\n }\r\n }\r\n}","import { Plugin } from './plugin'\r\nimport ease from '../ease'\r\n\r\n/**\r\n * @typedef {Object} SnapZoomOptions\r\n * @property {number} [width=0] the desired width to snap (to maintain aspect ratio, choose only width or height)\r\n * @property {number} [height=0] the desired height to snap (to maintain aspect ratio, choose only width or height)\r\n * @property {number} [time=1000] time for snapping in ms\r\n * @property {(string|function)} [ease=easeInOutSine] ease function or name (see http://easings.net/ for supported names)\r\n * @property {PIXI.Point} [center] place this point at center during zoom instead of center of the viewport\r\n * @property {boolean} [interrupt=true] pause snapping with any user input on the viewport\r\n * @property {boolean} [removeOnComplete] removes this plugin after snapping is complete\r\n * @property {boolean} [removeOnInterrupt] removes this plugin if interrupted by any user input\r\n * @property {boolean} [forceStart] starts the snap immediately regardless of whether the viewport is at the desired zoom\r\n * @property {boolean} [noMove] zoom but do not move\r\n */\r\n\r\nconst snapZoomOptions = {\r\n width: 0,\r\n height: 0,\r\n time: 1000,\r\n ease: 'easeInOutSine',\r\n center: null,\r\n interrupt: true,\r\n removeOnComplete: false,\r\n removeOnInterrupts: false,\r\n forceStart: false,\r\n noMove: false\r\n}\r\n\r\nexport class SnapZoom extends Plugin {\r\n /**\r\n * @param {Viewport} parent\r\n * @param {SnapZoomOptions} options\r\n * @event snap-zoom-start(Viewport) emitted each time a fit animation starts\r\n * @event snap-zoom-end(Viewport) emitted each time fit reaches its target\r\n * @event snap-zoom-end(Viewport) emitted each time fit reaches its target\r\n */\r\n constructor(parent, options = {}) {\r\n super(parent)\r\n this.options = Object.assign({}, snapZoomOptions, options)\r\n this.ease = ease(this.options.ease)\r\n if (this.options.width > 0) {\r\n this.xScale = parent.screenWidth / this.options.width\r\n }\r\n if (this.options.height > 0) {\r\n this.yScale = parent.screenHeight / this.options.height\r\n }\r\n this.xIndependent = this.xScale ? true : false\r\n this.yIndependent = this.yScale ? true : false\r\n this.xScale = this.xIndependent ? this.xScale : this.yScale\r\n this.yScale = this.yIndependent ? this.yScale : this.xScale\r\n\r\n if (this.options.time === 0) {\r\n parent.container.scale.x = this.xScale\r\n parent.container.scale.y = this.yScale\r\n if (this.options.removeOnComplete) {\r\n this.parent.plugins.remove('snap-zoom')\r\n }\r\n }\r\n else if (options.forceStart) {\r\n this.createSnapping()\r\n }\r\n }\r\n\r\n createSnapping() {\r\n const scale = this.parent.scale\r\n const startWorldScreenWidth = this.parent.worldScreenWidth\r\n const startWorldScreenHeight = this.parent.worldScreenHeight\r\n const endWorldScreenWidth = this.parent.screenWidth / this.xScale\r\n const endWorldScreenHeight = this.parent.screenHeight / this.yScale\r\n \r\n this.snapping = { \r\n time: 0, \r\n startX: startWorldScreenWidth, \r\n startY: startWorldScreenHeight, \r\n deltaX: endWorldScreenWidth - startWorldScreenWidth, \r\n deltaY: endWorldScreenHeight - startWorldScreenHeight \r\n }\r\n this.parent.emit('snap-zoom-start', this.parent)\r\n }\r\n\r\n resize() {\r\n this.snapping = null\r\n\r\n if (this.options.width > 0) {\r\n this.xScale = this.parent.screenWidth / this.options.width\r\n }\r\n if (this.options.height > 0) {\r\n this.yScale = this.parent.screenHeight / this.options.height\r\n }\r\n this.xScale = this.xIndependent ? this.xScale : this.yScale\r\n this.yScale = this.yIndependent ? this.yScale : this.xScale\r\n }\r\n\r\n wheel() {\r\n if (this.options.removeOnInterrupt) {\r\n this.parent.plugins.remove('snap-zoom')\r\n }\r\n }\r\n\r\n down() {\r\n if (this.options.removeOnInterrupt) {\r\n this.parent.plugins.remove('snap-zoom')\r\n }\r\n else if (this.options.interrupt) {\r\n this.snapping = null\r\n }\r\n }\r\n\r\n update(elapsed) {\r\n if (this.paused) {\r\n return\r\n }\r\n if (this.options.interrupt && this.parent.input.count() !== 0) {\r\n return\r\n }\r\n\r\n let oldCenter\r\n if (!this.options.center && !this.options.noMove) {\r\n oldCenter = this.parent.center\r\n }\r\n if (!this.snapping) {\r\n if (this.parent.scale.x !== this.xScale || this.parent.scale.y !== this.yScale) {\r\n this.createSnapping()\r\n }\r\n }\r\n else if (this.snapping) {\r\n const snapping = this.snapping\r\n snapping.time += elapsed\r\n if (snapping.time >= this.options.time) {\r\n this.parent.scale.set(this.xScale, this.yScale)\r\n if (this.options.removeOnComplete) {\r\n this.parent.plugins.remove('snap-zoom')\r\n }\r\n this.parent.emit('snap-zoom-end', this.parent)\r\n this.snapping = null\r\n }\r\n else {\r\n const snapping = this.snapping\r\n const worldScreenWidth = this.ease(snapping.time, snapping.startX, snapping.deltaX, this.options.time)\r\n const worldScreenHeight = this.ease(snapping.time, snapping.startY, snapping.deltaY, this.options.time)\r\n\r\n this.parent.scale.x = this.parent.screenWidth / worldScreenWidth\r\n this.parent.scale.y = this.parent.screenHeight / worldScreenHeight\r\n }\r\n const clamp = this.parent.plugins.get('clamp-zoom', true)\r\n if (clamp) {\r\n clamp.clamp()\r\n }\r\n if (!this.options.noMove) {\r\n if (!this.options.center) {\r\n this.parent.moveCenter(oldCenter)\r\n }\r\n else {\r\n this.parent.moveCenter(this.options.center)\r\n }\r\n }\r\n }\r\n }\r\n\r\n resume() {\r\n this.snapping = null\r\n super.resume()\r\n }\r\n}","import { Plugin } from './plugin'\r\n\r\n/**\r\n * @typedef {object} FollowOptions\r\n * @property {number} [speed=0] to follow in pixels/frame (0=teleport to location)\r\n * @property {number} [acceleration] set acceleration to accelerate and decelerate at this rate; speed cannot be 0 to use acceleration\r\n * @property {number} [radius] radius (in world coordinates) of center circle where movement is allowed without moving the viewport\r\n */\r\n\r\nconst followOptions = {\r\n speed: 0,\r\n acceleration: null,\r\n radius: null\r\n}\r\n\r\nexport class Follow extends Plugin\r\n{\r\n /**\r\n * @private\r\n * @param {Viewport} parent\r\n * @param {PIXI.DisplayObject} target to follow\r\n * @param {FollowOptions} [options]\r\n */\r\n constructor(parent, target, options = {})\r\n {\r\n super(parent)\r\n this.target = target\r\n this.options = Object.assign({}, followOptions, options)\r\n this.velocity = { x: 0, y: 0 }\r\n }\r\n\r\n update(elapsed)\r\n {\r\n if (this.paused)\r\n {\r\n return\r\n }\r\n\r\n const center = this.parent.center\r\n let toX = this.target.x,\r\n toY = this.target.y\r\n if (this.options.radius)\r\n {\r\n const distance = Math.sqrt(Math.pow(this.target.y - center.y, 2) + Math.pow(this.target.x - center.x, 2))\r\n if (distance > this.options.radius)\r\n {\r\n const angle = Math.atan2(this.target.y - center.y, this.target.x - center.x)\r\n toX = this.target.x - Math.cos(angle) * this.options.radius\r\n toY = this.target.y - Math.sin(angle) * this.options.radius\r\n }\r\n else\r\n {\r\n return\r\n }\r\n }\r\n\r\n const deltaX = toX - center.x\r\n const deltaY = toY - center.y\r\n if (deltaX || deltaY)\r\n {\r\n if (this.options.speed)\r\n {\r\n if (this.options.acceleration)\r\n {\r\n const angle = Math.atan2(toY - center.y, toX - center.x)\r\n const distance = Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2))\r\n if (distance)\r\n {\r\n const decelerationDistance = (Math.pow(this.velocity.x, 2) + Math.pow(this.velocity.y, 2)) / (2 * this.options.acceleration)\r\n if (distance > decelerationDistance)\r\n {\r\n this.velocity = {\r\n x: Math.min(this.velocity.x + this.options.acceleration * elapsed, this.options.speed),\r\n y: Math.min(this.velocity.y + this.options.acceleration * elapsed, this.options.speed)\r\n }\r\n }\r\n else\r\n {\r\n this.velocity = {\r\n x: Math.max(this.velocity.x - this.options.acceleration * this.options.speed, 0),\r\n y: Math.max(this.velocity.y - this.options.acceleration * this.options.speed, 0)\r\n }\r\n }\r\n const changeX = Math.cos(angle) * this.velocity.x\r\n const changeY = Math.sin(angle) * this.velocity.y\r\n const x = Math.abs(changeX) > Math.abs(deltaX) ? toX : center.x + changeX\r\n const y = Math.abs(changeY) > Math.abs(deltaY) ? toY : center.y + changeY\r\n this.parent.moveCenter(x, y)\r\n this.parent.emit('moved', { viewport: this.parent, type: 'follow' })\r\n }\r\n }\r\n else\r\n {\r\n const angle = Math.atan2(toY - center.y, toX - center.x)\r\n const changeX = Math.cos(angle) * this.options.speed\r\n const changeY = Math.sin(angle) * this.options.speed\r\n const x = Math.abs(changeX) > Math.abs(deltaX) ? toX : center.x + changeX\r\n const y = Math.abs(changeY) > Math.abs(deltaY) ? toY : center.y + changeY\r\n this.parent.moveCenter(x, y)\r\n this.parent.emit('moved', { viewport: this.parent, type: 'follow' })\r\n }\r\n }\r\n else\r\n {\r\n this.parent.moveCenter(toX, toY)\r\n this.parent.emit('moved', { viewport: this.parent, type: 'follow' })\r\n }\r\n }\r\n }\r\n}","import { Plugin } from './plugin'\r\n\r\n/**\r\n * the default event listener for 'wheel' event is document.body. Use `Viewport.options.divWheel` to change this default\r\n * @typedef WheelOptions\r\n * @property {number} [percent=0.1] percent to scroll with each spin\r\n * @property {number} [smooth] smooth the zooming by providing the number of frames to zoom between wheel spins\r\n * @property {boolean} [interrupt=true] stop smoothing with any user input on the viewport\r\n * @property {boolean} [reverse] reverse the direction of the scroll\r\n * @property {PIXI.Point} [center] place this point at center during zoom instead of current mouse position\r\n * @property {number} [lineHeight=20] scaling factor for non-DOM_DELTA_PIXEL scrolling events\r\n */\r\n\r\nconst wheelOptions = {\r\n percent: 0.1,\r\n smooth: false,\r\n interrupt: true,\r\n reverse: false,\r\n center: null,\r\n lineHeight: 20\r\n}\r\n\r\nexport class Wheel extends Plugin {\r\n /**\r\n * @private\r\n * @param {Viewport} parent\r\n * @param {WheelOptions} [options]\r\n * @event wheel({wheel: {dx, dy, dz}, event, viewport})\r\n */\r\n constructor(parent, options = {}) {\r\n super(parent)\r\n this.options = Object.assign({}, wheelOptions, options)\r\n }\r\n\r\n down() {\r\n if (this.options.interrupt) {\r\n this.smoothing = null\r\n }\r\n }\r\n\r\n update() {\r\n if (this.smoothing) {\r\n const point = this.smoothingCenter\r\n const change = this.smoothing\r\n let oldPoint\r\n if (!this.options.center) {\r\n oldPoint = this.parent.toLocal(point)\r\n }\r\n this.parent.scale.x += change.x\r\n this.parent.scale.y += change.y\r\n this.parent.emit('zoomed', { viewport: this.parent, type: 'wheel' })\r\n const clamp = this.parent.plugins.get('clamp-zoom', true)\r\n if (clamp) {\r\n clamp.clamp()\r\n }\r\n if (this.options.center) {\r\n this.parent.moveCenter(this.options.center)\r\n }\r\n else {\r\n const newPoint = this.parent.toGlobal(oldPoint)\r\n this.parent.x += point.x - newPoint.x\r\n this.parent.y += point.y - newPoint.y\r\n }\r\n this.parent.emit('moved', { viewport: this.parent, type: 'wheel' })\r\n this.smoothingCount++\r\n if (this.smoothingCount >= this.options.smooth) {\r\n this.smoothing = null\r\n }\r\n }\r\n }\r\n\r\n wheel(e) {\r\n if (this.paused) {\r\n return\r\n }\r\n\r\n let point = this.parent.input.getPointerPosition(e)\r\n const sign = this.options.reverse ? -1 : 1\r\n const step = sign * -e.deltaY * (e.deltaMode ? this.options.lineHeight : 1) / 500\r\n const change = Math.pow(2, (1 + this.options.percent) * step)\r\n if (this.options.smooth) {\r\n const original = {\r\n x: this.smoothing ? this.smoothing.x * (this.options.smooth - this.smoothingCount) : 0,\r\n y: this.smoothing ? this.smoothing.y * (this.options.smooth - this.smoothingCount) : 0\r\n }\r\n this.smoothing = {\r\n x: ((this.parent.scale.x + original.x) * change - this.parent.scale.x) / this.options.smooth,\r\n y: ((this.parent.scale.y + original.y) * change - this.parent.scale.y) / this.options.smooth\r\n }\r\n this.smoothingCount = 0\r\n this.smoothingCenter = point\r\n }\r\n else {\r\n let oldPoint\r\n if (!this.options.center) {\r\n oldPoint = this.parent.toLocal(point)\r\n }\r\n this.parent.scale.x *= change\r\n this.parent.scale.y *= change\r\n this.parent.emit('zoomed', { viewport: this.parent, type: 'wheel' })\r\n const clamp = this.parent.plugins.get('clamp-zoom', true)\r\n if (clamp) {\r\n clamp.clamp()\r\n }\r\n if (this.options.center) {\r\n this.parent.moveCenter(this.options.center)\r\n }\r\n else {\r\n const newPoint = this.parent.toGlobal(oldPoint)\r\n this.parent.x += point.x - newPoint.x\r\n this.parent.y += point.y - newPoint.y\r\n }\r\n }\r\n this.parent.emit('moved', { viewport: this.parent, type: 'wheel' })\r\n this.parent.emit('wheel', { wheel: { dx: e.deltaX, dy: e.deltaY, dz: e.deltaZ }, event: e, viewport: this.parent })\r\n if (!this.parent.options.passiveWheel) {\r\n return true\r\n }\r\n }\r\n}\r\n","import { Plugin } from './plugin'\r\n\r\n/**\r\n * @typedef MouseEdgesOptions\r\n * @property {number} [radius] distance from center of screen in screen pixels\r\n * @property {number} [distance] distance from all sides in screen pixels\r\n * @property {number} [top] alternatively, set top distance (leave unset for no top scroll)\r\n * @property {number} [bottom] alternatively, set bottom distance (leave unset for no top scroll)\r\n * @property {number} [left] alternatively, set left distance (leave unset for no top scroll)\r\n * @property {number} [right] alternatively, set right distance (leave unset for no top scroll)\r\n * @property {number} [speed=8] speed in pixels/frame to scroll viewport\r\n * @property {boolean} [reverse] reverse direction of scroll\r\n * @property {boolean} [noDecelerate] don't use decelerate plugin even if it's installed\r\n * @property {boolean} [linear] if using radius, use linear movement (+/- 1, +/- 1) instead of angled movement (Math.cos(angle from center), Math.sin(angle from center))\r\n * @property {boolean} [allowButtons] allows plugin to continue working even when there's a mousedown event\r\n */\r\n\r\nconst mouseEdgesOptions = {\r\n radius: null,\r\n distance: null,\r\n top: null,\r\n bottom: null,\r\n left: null,\r\n right: null,\r\n speed: 8,\r\n reverse: false,\r\n noDecelerate: false,\r\n linear: false,\r\n allowButtons: false\r\n}\r\n\r\nexport class MouseEdges extends Plugin {\r\n /**\r\n * Scroll viewport when mouse hovers near one of the edges.\r\n * @private\r\n * @param {Viewport} parent\r\n * @param {MouseEdgeOptions} [options]\r\n * @event mouse-edge-start(Viewport) emitted when mouse-edge starts\r\n * @event mouse-edge-end(Viewport) emitted when mouse-edge ends\r\n */\r\n constructor(parent, options = {}) {\r\n super(parent)\r\n this.options = Object.assign({}, mouseEdgesOptions, options)\r\n this.reverse = this.options.reverse ? 1 : -1\r\n this.radiusSquared = Math.pow(this.options.radius, 2)\r\n this.resize()\r\n }\r\n\r\n resize() {\r\n const distance = this.options.distance\r\n if (distance !== null) {\r\n this.left = distance\r\n this.top = distance\r\n this.right = this.parent.worldScreenWidth - distance\r\n this.bottom = this.parent.worldScreenHeight - distance\r\n }\r\n else if (!this.radius) {\r\n this.left = this.options.left\r\n this.top = this.options.top\r\n this.right = this.options.right === null ? null : this.parent.worldScreenWidth - this.options.right\r\n this.bottom = this.options.bottom === null ? null : this.parent.worldScreenHeight - this.options.bottom\r\n }\r\n }\r\n\r\n down() {\r\n if (this.paused) {\r\n return\r\n }\r\n if (!this.options.allowButtons) {\r\n this.horizontal = this.vertical = null\r\n }\r\n }\r\n\r\n move(event) {\r\n if (this.paused) {\r\n return\r\n }\r\n if ((event.data.pointerType !== 'mouse' && event.data.identifier !== 1) || (!this.options.allowButtons && event.data.buttons !== 0)) {\r\n return\r\n }\r\n const x = event.data.global.x\r\n const y = event.data.global.y\r\n\r\n if (this.radiusSquared) {\r\n const center = this.parent.toScreen(this.parent.center)\r\n const distance = Math.pow(center.x - x, 2) + Math.pow(center.y - y, 2)\r\n if (distance >= this.radiusSquared) {\r\n const angle = Math.atan2(center.y - y, center.x - x)\r\n if (this.options.linear) {\r\n this.horizontal = Math.round(Math.cos(angle)) * this.options.speed * this.reverse * (60 / 1000)\r\n this.vertical = Math.round(Math.sin(angle)) * this.options.speed * this.reverse * (60 / 1000)\r\n }\r\n else {\r\n this.horizontal = Math.cos(angle) * this.options.speed * this.reverse * (60 / 1000)\r\n this.vertical = Math.sin(angle) * this.options.speed * this.reverse * (60 / 1000)\r\n }\r\n }\r\n else {\r\n if (this.horizontal) {\r\n this.decelerateHorizontal()\r\n }\r\n if (this.vertical) {\r\n this.decelerateVertical()\r\n }\r\n this.horizontal = this.vertical = 0\r\n }\r\n }\r\n else {\r\n if (this.left !== null && x < this.left) {\r\n this.horizontal = 1 * this.reverse * this.options.speed * (60 / 1000)\r\n }\r\n else if (this.right !== null && x > this.right) {\r\n this.horizontal = -1 * this.reverse * this.options.speed * (60 / 1000)\r\n }\r\n else {\r\n this.decelerateHorizontal()\r\n this.horizontal = 0\r\n }\r\n if (this.top !== null && y < this.top) {\r\n this.vertical = 1 * this.reverse * this.options.speed * (60 / 1000)\r\n }\r\n else if (this.bottom !== null && y > this.bottom) {\r\n this.vertical = -1 * this.reverse * this.options.speed * (60 / 1000)\r\n }\r\n else {\r\n this.decelerateVertical()\r\n this.vertical = 0\r\n }\r\n }\r\n }\r\n\r\n decelerateHorizontal() {\r\n const decelerate = this.parent.plugins.get('decelerate', true)\r\n if (this.horizontal && decelerate && !this.options.noDecelerate) {\r\n decelerate.activate({ x: (this.horizontal * this.options.speed * this.reverse) / (1000 / 60) })\r\n }\r\n }\r\n\r\n decelerateVertical() {\r\n const decelerate = this.parent.plugins.get('decelerate', true)\r\n if (this.vertical && decelerate && !this.options.noDecelerate) {\r\n decelerate.activate({ y: (this.vertical * this.options.speed * this.reverse) / (1000 / 60) })\r\n }\r\n }\r\n\r\n up() {\r\n if (this.paused) {\r\n return\r\n }\r\n if (this.horizontal) {\r\n this.decelerateHorizontal()\r\n }\r\n if (this.vertical) {\r\n this.decelerateVertical()\r\n }\r\n this.horizontal = this.vertical = null\r\n }\r\n\r\n update() {\r\n if (this.paused) {\r\n return\r\n }\r\n\r\n if (this.horizontal || this.vertical) {\r\n const center = this.parent.center\r\n if (this.horizontal) {\r\n center.x += this.horizontal * this.options.speed\r\n }\r\n if (this.vertical) {\r\n center.y += this.vertical * this.options.speed\r\n }\r\n this.parent.moveCenter(center)\r\n this.parent.emit('moved', { viewport: this.parent, type: 'mouse-edges' })\r\n }\r\n }\r\n}","import * as PIXI from 'pixi.js'\nimport { Plugin } from './plugin'\nimport ease from '../ease'\n\n/**\n * To set the zoom level, use: (1) scale, (2) scaleX and scaleY, or (3) width and/or height\n * @typedef {options} AnimateOptions\n * @property {number} [time=1000] to animate\n * @property {PIXI.Point} [position=viewport.center] position to move viewport\n * @property {number} [width] desired viewport width in world pixels (use instead of scale; aspect ratio is maintained if height is not provided)\n * @property {number} [height] desired viewport height in world pixels (use instead of scale; aspect ratio is maintained if width is not provided)\n * @property {number} [scale] scale to change zoom (scale.x = scale.y)\n * @property {number} [scaleX] independently change zoom in x-direction\n * @property {number} [scaleY] independently change zoom in y-direction\n * @property {(function|string)} [ease=linear] easing function to use\n * @property {function} [callbackOnComplete]\n * @property {boolean} [removeOnInterrupt] removes this plugin if interrupted by any user input\n */\n\nconst animateOptions = {\n removeOnInterrupt: false,\n ease: 'linear',\n time: 1000\n}\n\nexport class Animate extends Plugin\n{\n /**\n * @private\n * @param {Viewport} parent\n * @param {AnimateOptions} [options]\n * @fires animate-end\n */\n constructor(parent, options={})\n {\n super(parent)\n this.options = Object.assign({}, animateOptions, options)\n this.options.ease = ease(this.options.ease)\n this.setupPosition()\n this.setupZoom()\n }\n\n setupPosition()\n {\n if (typeof this.options.position !== 'undefined')\n {\n this.startX = this.parent.center.x\n this.startY = this.parent.center.y\n this.deltaX = this.options.position.x - this.parent.center.x\n this.deltaY = this.options.position.y - this.parent.center.y\n this.keepCenter = false\n }\n else\n {\n this.keepCenter = true\n }\n }\n\n setupZoom()\n {\n this.width = null\n this.height = null\n if (typeof this.options.scale !== 'undefined')\n {\n this.width = this.parent.screenWidth / this.options.scale\n }\n else if (typeof this.options.scaleX !== 'undefined' || typeof this.options.scaleY !== 'undefined')\n {\n if (typeof this.options.scaleX !== 'undefined')\n {\n // screenSizeInWorldPixels = screenWidth / scale\n this.width = this.parent.screenWidth / this.options.scaleX\n }\n if (typeof this.options.scaleY !== 'undefined')\n {\n this.height = this.parent.screenHeight / this.options.scaleY\n }\n }\n else\n {\n if (typeof this.options.width !== 'undefined')\n {\n this.width = this.options.width\n }\n if (typeof this.options.height !== 'undefined')\n {\n this.height = this.options.height\n }\n }\n if (typeof this.width !== null)\n {\n this.startWidth = this.parent.screenWidthInWorldPixels\n this.deltaWidth = this.width - this.startWidth\n }\n if (typeof this.height !== null)\n {\n this.startHeight = this.parent.screenHeightInWorldPixels\n this.deltaHeight = this.height - this.startHeight\n }\n this.time = 0\n }\n\n down()\n {\n if (this.options.removeOnInterrupt)\n {\n this.parent.plugins.remove('animate')\n }\n }\n\n complete()\n {\n this.parent.plugins.remove('animate')\n if (this.width !== null)\n {\n this.parent.fitWidth(this.width, this.keepCenter, this.height === null)\n }\n if (this.height !== null)\n {\n this.parent.fitHeight(this.height, this.keepCenter, this.width === null)\n }\n if (!this.keepCenter)\n {\n this.parent.moveCenter(this.options.position.x, this.options.position.y)\n }\n this.parent.emit('animate-end', this.parent)\n if (this.options.callbackOnComplete)\n {\n this.options.callbackOnComplete(this.parent)\n }\n }\n\n update(elapsed)\n {\n if (this.paused)\n {\n return\n }\n this.time += elapsed\n if (this.time >= this.options.time)\n {\n this.complete()\n }\n else\n {\n const originalZoom = new PIXI.Point(this.parent.scale.x, this.parent.scale.y)\n const percent = this.options.ease(this.time, 0, 1, this.options.time)\n if (this.width !== null)\n {\n this.parent.fitWidth(this.startWidth + this.deltaWidth * percent, this.keepCenter, this.height === null)\n }\n if (this.height !== null)\n {\n this.parent.fitHeight(this.startHeight + this.deltaHeight * percent, this.keepCenter, this.width === null)\n }\n if (this.width === null)\n {\n this.parent.scale.x = this.parent.scale.y\n }\n else if (this.height === null)\n {\n this.parent.scale.y = this.parent.scale.x\n }\n if (!this.keepCenter)\n {\n const original = new PIXI.Point(this.parent.x, this.parent.y)\n this.parent.moveCenter(this.startX + this.deltaX * percent, this.startY + this.deltaY * percent)\n this.parent.emit('moved', { viewport: this.parent, original, type: 'animate'})\n }\n if (this.width || this.height)\n {\n this.parent.emit('zoomed', { viewport: this.parent, original: originalZoom, type: 'animate' })\n }\n if (!this.keepCenter)\n {\n }\n }\n }\n}","import * as PIXI from 'pixi.js'\r\n\r\nimport { InputManager } from './input-manager'\r\nimport { PluginManager } from './plugin-manager'\r\nimport { Drag } from './plugins/drag'\r\nimport { Pinch } from './plugins/pinch'\r\nimport { Clamp } from './plugins/clamp'\r\nimport { ClampZoom } from './plugins/clamp-zoom'\r\nimport { Decelerate } from './plugins/decelerate'\r\nimport { Bounce } from './plugins/bounce'\r\nimport { Snap } from './plugins/snap'\r\nimport { SnapZoom } from './plugins/snap-zoom'\r\nimport { Follow } from './plugins/follow'\r\nimport { Wheel } from './plugins/wheel'\r\nimport { MouseEdges } from './plugins/mouse-edges'\r\nimport { Animate } from './plugins/animate'\r\nexport { Plugin } from './plugins/plugin'\r\n\r\n/**\r\n * @typedef {object} ViewportOptions\r\n * @property {number} [screenWidth=window.innerWidth]\r\n * @property {number} [screenHeight=window.innerHeight]\r\n * @property {number} [worldWidth=this.width]\r\n * @property {number} [worldHeight=this.height]\r\n * @property {number} [threshold=5] number of pixels to move to trigger an input event (e.g., drag, pinch) or disable a clicked event\r\n * @property {boolean} [passiveWheel=true] whether the 'wheel' event is set to passive (note: if false, e.preventDefault() will be called when wheel is used over the viewport)\r\n * @property {boolean} [stopPropagation=false] whether to stopPropagation of events that impact the viewport (except wheel events, see options.passiveWheel)\r\n * @property {HitArea} [forceHitArea] change the default hitArea from world size to a new value\r\n * @property {boolean} [noTicker] set this if you want to manually call update() function on each frame\r\n * @property {PIXI.Ticker} [ticker=PIXI.Ticker.shared] use this PIXI.ticker for updates\r\n * @property {PIXI.InteractionManager} [interaction=null] InteractionManager, available from instantiated WebGLRenderer/CanvasRenderer.plugins.interaction - used to calculate pointer postion relative to canvas location on screen\r\n * @property {HTMLElement} [divWheel=document.body] div to attach the wheel event\r\n * @property {boolean} [disableOnContextMenu] remove oncontextmenu=() => {} from the divWheel element\r\n */\r\n\r\nconst viewportOptions = {\r\n screenWidth: window.innerWidth,\r\n screenHeight: window.innerHeight,\r\n worldWidth: null,\r\n worldHeight: null,\r\n threshold: 5,\r\n passiveWheel: true,\r\n stopPropagation: false,\r\n forceHitArea: null,\r\n noTicker: false,\r\n interaction: null,\r\n disableOnContextMenu: false\r\n}\r\n\r\n/**\r\n * Main class to use when creating a Viewport\r\n */\r\nexport class Viewport extends PIXI.Container {\r\n /**\r\n * @param {ViewportOptions} [options]\r\n * @fires clicked\r\n * @fires drag-start\r\n * @fires drag-end\r\n * @fires drag-remove\r\n * @fires pinch-start\r\n * @fires pinch-end\r\n * @fires pinch-remove\r\n * @fires snap-start\r\n * @fires snap-end\r\n * @fires snap-remove\r\n * @fires snap-zoom-start\r\n * @fires snap-zoom-end\r\n * @fires snap-zoom-remove\r\n * @fires bounce-x-start\r\n * @fires bounce-x-end\r\n * @fires bounce-y-start\r\n * @fires bounce-y-end\r\n * @fires bounce-remove\r\n * @fires wheel\r\n * @fires wheel-remove\r\n * @fires wheel-scroll\r\n * @fires wheel-scroll-remove\r\n * @fires mouse-edge-start\r\n * @fires mouse-edge-end\r\n * @fires mouse-edge-remove\r\n * @fires moved\r\n * @fires moved-end\r\n * @fires zoomed\r\n * @fires zoomed-end\r\n * @fires frame-end\r\n */\r\n constructor(options = {}) {\r\n super()\r\n this.options = Object.assign({}, viewportOptions, options)\r\n\r\n // needed to pull this out of viewportOptions because of pixi.js v4 support (which changed from PIXI.ticker.shared to PIXI.Ticker.shared...sigh)\r\n if (options.ticker) {\r\n this.options.ticker = options.ticker\r\n }\r\n else {\r\n // to avoid Rollup transforming our import, save pixi namespace in a variable\r\n // from here: https://github.com/pixijs/pixi.js/issues/5757\r\n let ticker\r\n const pixiNS = PIXI\r\n if (parseInt(/^(\\d+)\\./.exec(PIXI.VERSION)[1]) < 5) {\r\n ticker = pixiNS.ticker.shared\r\n }\r\n else {\r\n ticker = pixiNS.Ticker.shared\r\n }\r\n this.options.ticker = options.ticker || ticker\r\n }\r\n\r\n /** @type {number} */\r\n this.screenWidth = this.options.screenWidth\r\n\r\n /** @type {number} */\r\n this.screenHeight = this.options.screenHeight\r\n\r\n this._worldWidth = this.options.worldWidth\r\n this._worldHeight = this.options.worldHeight\r\n this.forceHitArea = this.options.forceHitArea\r\n\r\n /**\r\n * number of pixels to move to trigger an input event (e.g., drag, pinch) or disable a clicked event\r\n * @type {number}\r\n */\r\n this.threshold = this.options.threshold\r\n\r\n this.options.divWheel = this.options.divWheel || document.body\r\n\r\n if (this.options.disableOnContextMenu) {\r\n this.options.divWheel.oncontextmenu = e => e.preventDefault()\r\n }\r\n\r\n if (!this.options.noTicker) {\r\n this.tickerFunction = () => this.update(this.options.ticker.elapsedMS)\r\n this.options.ticker.add(this.tickerFunction)\r\n }\r\n\r\n this.input = new InputManager(this)\r\n\r\n /**\r\n * Use this to add user plugins or access existing plugins (e.g., to pause, resume, or remove them)\r\n * @type {PluginManager}\r\n */\r\n this.plugins = new PluginManager(this)\r\n }\r\n\r\n /**\r\n * overrides PIXI.Container's destroy to also remove the 'wheel' and PIXI.Ticker listeners\r\n * @param {(object|boolean)} [options] - Options parameter. A boolean will act as if all options have been set to that value\r\n * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy method called as well. 'options' will be passed on to those calls.\r\n * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true. Should it destroy the texture of the child sprite\r\n * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true. Should it destroy the base texture of the child sprite */\r\n destroy(options) {\r\n if (!this.options.noTicker) {\r\n this.options.ticker.remove(this.tickerFunction)\r\n }\r\n this.input.destroy()\r\n super.destroy(options)\r\n }\r\n\r\n /**\r\n * update viewport on each frame\r\n * by default, you do not need to call this unless you set options.noTicker=true\r\n * @param {number} elapsed time in milliseconds since last update\r\n */\r\n update(elapsed) {\r\n if (!this.pause) {\r\n this.plugins.update(elapsed)\r\n\r\n if (this.lastViewport) {\r\n // check for moved-end event\r\n if (this.lastViewport.x !== this.x || this.lastViewport.y !== this.y) {\r\n this.moving = true\r\n }\r\n else {\r\n if (this.moving) {\r\n this.emit('moved-end', this)\r\n this.moving = false\r\n }\r\n }\r\n // check for zoomed-end event\r\n if (this.lastViewport.scaleX !== this.scale.x || this.lastViewport.scaleY !== this.scale.y) {\r\n this.zooming = true\r\n }\r\n else {\r\n if (this.zooming) {\r\n this.emit('zoomed-end', this)\r\n this.zooming = false\r\n }\r\n }\r\n }\r\n\r\n if (!this.forceHitArea) {\r\n this._hitAreaDefault = new PIXI.Rectangle(this.left, this.top, this.worldScreenWidth, this.worldScreenHeight)\r\n this.hitArea = this._hitAreaDefault\r\n }\r\n\r\n this._dirty = this._dirty || !this.lastViewport ||\r\n this.lastViewport.x !== this.x || this.lastViewport.y !== this.y ||\r\n this.lastViewport.scaleX !== this.scale.x || this.lastViewport.scaleY !== this.scale.y\r\n\r\n this.lastViewport = {\r\n x: this.x,\r\n y: this.y,\r\n scaleX: this.scale.x,\r\n scaleY: this.scale.y\r\n }\r\n this.emit('frame-end', this)\r\n }\r\n }\r\n\r\n /**\r\n * use this to set screen and world sizes--needed for pinch/wheel/clamp/bounce\r\n * @param {number} [screenWidth=window.innerWidth]\r\n * @param {number} [screenHeight=window.innerHeight]\r\n * @param {number} [worldWidth]\r\n * @param {number} [worldHeight]\r\n */\r\n resize(screenWidth = window.innerWidth, screenHeight = window.innerHeight, worldWidth, worldHeight) {\r\n this.screenWidth = screenWidth\r\n this.screenHeight = screenHeight\r\n if (typeof worldWidth !== 'undefined') {\r\n this._worldWidth = worldWidth\r\n }\r\n if (typeof worldHeight !== 'undefined') {\r\n this._worldHeight = worldHeight\r\n }\r\n this.plugins.resize()\r\n this.dirty = true\r\n }\r\n\r\n /**\r\n * world width in pixels\r\n * @type {number}\r\n */\r\n get worldWidth() {\r\n if (this._worldWidth) {\r\n return this._worldWidth\r\n }\r\n else {\r\n return this.width / this.scale.x\r\n }\r\n }\r\n set worldWidth(value) {\r\n this._worldWidth = value\r\n this.plugins.resize()\r\n }\r\n\r\n /**\r\n * world height in pixels\r\n * @type {number}\r\n */\r\n get worldHeight() {\r\n if (this._worldHeight) {\r\n return this._worldHeight\r\n }\r\n else {\r\n return this.height / this.scale.y\r\n }\r\n }\r\n set worldHeight(value) {\r\n this._worldHeight = value\r\n this.plugins.resize()\r\n }\r\n\r\n /**\r\n * get visible bounds of viewport\r\n * @returns {PIXI.Rectangle}\r\n */\r\n getVisibleBounds() {\r\n return new PIXI.Rectangle(this.left, this.top, this.worldScreenWidth, this.worldScreenHeight)\r\n }\r\n\r\n /**\r\n * change coordinates from screen to world\r\n * @param {(number|PIXI.Point)} x or point\r\n * @param {number} [y]\r\n * @return {PIXI.Point}\r\n */\r\n toWorld(x, y) {\r\n if (arguments.length === 2) {\r\n return this.toLocal(new PIXI.Point(x, y))\r\n }\r\n else {\r\n return this.toLocal(x)\r\n }\r\n }\r\n\r\n /**\r\n * change coordinates from world to screen\r\n * @param {(number|PIXI.Point)} x or point\r\n * @param {number} [y]\r\n * @return {PIXI.Point}\r\n */\r\n toScreen(x, y) {\r\n if (arguments.length === 2) {\r\n return this.toGlobal(new PIXI.Point(x, y))\r\n }\r\n else {\r\n return this.toGlobal(x)\r\n }\r\n }\r\n\r\n /**\r\n * screen width in world coordinates\r\n * @type {number}\r\n */\r\n get worldScreenWidth() {\r\n return this.screenWidth / this.scale.x\r\n }\r\n\r\n /**\r\n * screen height in world coordinates\r\n * @type {number}\r\n */\r\n get worldScreenHeight() {\r\n return this.screenHeight / this.scale.y\r\n }\r\n\r\n /**\r\n * world width in screen coordinates\r\n * @type {number}\r\n */\r\n get screenWorldWidth() {\r\n return this.worldWidth * this.scale.x\r\n }\r\n\r\n /**\r\n * world height in screen coordinates\r\n * @type {number}\r\n */\r\n get screenWorldHeight() {\r\n return this.worldHeight * this.scale.y\r\n }\r\n\r\n /**\r\n * center of screen in world coordinates\r\n * @type {PIXI.Point}\r\n */\r\n get center() {\r\n return new PIXI.Point(this.worldScreenWidth / 2 - this.x / this.scale.x, this.worldScreenHeight / 2 - this.y / this.scale.y)\r\n }\r\n set center(value) {\r\n this.moveCenter(value)\r\n }\r\n\r\n /**\r\n * move center of viewport to point\r\n * @param {(number|PIXI.Point)} x or point\r\n * @param {number} [y]\r\n * @return {Viewport} this\r\n */\r\n moveCenter() {\r\n let x, y\r\n if (!isNaN(arguments[0])) {\r\n x = arguments[0]\r\n y = arguments[1]\r\n }\r\n else {\r\n x = arguments[0].x\r\n y = arguments[0].y\r\n }\r\n this.position.set((this.worldScreenWidth / 2 - x) * this.scale.x, (this.worldScreenHeight / 2 - y) * this.scale.y)\r\n this.plugins.reset()\r\n this.dirty = true\r\n return this\r\n }\r\n\r\n /**\r\n * top-left corner of Viewport\r\n * @type {PIXI.Point}\r\n */\r\n get corner() {\r\n return new PIXI.Point(-this.x / this.scale.x, -this.y / this.scale.y)\r\n }\r\n set corner(value) {\r\n this.moveCorner(value)\r\n }\r\n\r\n /**\r\n * move viewport's top-left corner; also clamps and resets decelerate and bounce (as needed)\r\n * @param {(number|PIXI.Point)} x or point\r\n * @param {number} [y]\r\n * @return {Viewport} this\r\n */\r\n moveCorner(x, y) {\r\n if (arguments.length === 1) {\r\n this.position.set(-x.x * this.scale.x, -x.y * this.scale.y)\r\n }\r\n else {\r\n this.position.set(-x * this.scale.x, -y * this.scale.y)\r\n }\r\n this.plugins.reset()\r\n return this\r\n }\r\n\r\n /**\r\n * get how many world pixels fit in screen's width\r\n * @type {number}\r\n */\r\n get screenWidthInWorldPixels() {\r\n return this.screenWidth / this.scale.x\r\n }\r\n\r\n /**\r\n * get how many world pixels fit on screen's height\r\n * @type {number}\r\n */\r\n get screenHeightInWorldPixels() {\r\n return this.screenHeight / this.scale.y\r\n }\r\n\r\n /**\r\n * find the scale value that fits a world width on the screen\r\n * does not change the viewport (use fit... to change)\r\n * @param {number} width in world pixels\r\n * @returns {number} scale\r\n */\r\n findFitWidth(width) {\r\n return this.screenWidth / width\r\n }\r\n\r\n /**\r\n * finds the scale value that fits a world height on the screens\r\n * does not change the viewport (use fit... to change)\r\n * @param {number} height in world pixels\r\n * @returns {number} scale\r\n */\r\n findFitHeight(height) {\r\n return this.screenHeight / height\r\n }\r\n\r\n /**\r\n * finds the scale value that fits the smaller of a world width and world height on the screen\r\n * does not change the viewport (use fit... to change)\r\n * @param {number} width in world pixels\r\n * @param {number} height in world pixels\r\n * @returns {number} scale\r\n */\r\n findFit(width, height) {\r\n const scaleX = this.screenWidth / width\r\n const scaleY = this.screenHeight / height\r\n return Math.min(scaleX, scaleY)\r\n }\r\n\r\n /**\r\n * finds the scale value that fits the larger of a world width and world height on the screen\r\n * does not change the viewport (use fit... to change)\r\n * @param {number} width in world pixels\r\n * @param {number} height in world pixels\r\n * @returns {number} scale\r\n */\r\n findCover(width, height) {\r\n const scaleX = this.screenWidth / width\r\n const scaleY = this.screenHeight / height\r\n return Math.max(scaleX, scaleY)\r\n }\r\n\r\n /**\r\n * change zoom so the width fits in the viewport\r\n * @param {number} [width=this.worldWidth] in world coordinates\r\n * @param {boolean} [center] maintain the same center\r\n * @param {boolean} [scaleY=true] whether to set scaleY=scaleX\r\n * @param {boolean} [noClamp] whether to disable clamp-zoom\r\n * @returns {Viewport} this\r\n */\r\n fitWidth(width, center, scaleY = true, noClamp) {\r\n let save\r\n if (center) {\r\n save = this.center\r\n }\r\n this.scale.x = this.screenWidth / width\r\n\r\n if (scaleY) {\r\n this.scale.y = this.scale.x\r\n }\r\n\r\n const clampZoom = this.plugins.get('clamp-zoom', true)\r\n if (!noClamp && clampZoom) {\r\n clampZoom.clamp()\r\n }\r\n\r\n if (center) {\r\n this.moveCenter(save)\r\n }\r\n return this\r\n }\r\n\r\n /**\r\n * change zoom so the height fits in the viewport\r\n * @param {number} [height=this.worldHeight] in world coordinates\r\n * @param {boolean} [center] maintain the same center of the screen after zoom\r\n * @param {boolean} [scaleX=true] whether to set scaleX = scaleY\r\n * @param {boolean} [noClamp] whether to disable clamp-zoom\r\n * @returns {Viewport} this\r\n */\r\n fitHeight(height, center, scaleX = true, noClamp) {\r\n let save\r\n if (center) {\r\n save = this.center\r\n }\r\n this.scale.y = this.screenHeight / height\r\n\r\n if (scaleX) {\r\n this.scale.x = this.scale.y\r\n }\r\n\r\n const clampZoom = this.plugins.get('clamp-zoom', true)\r\n if (!noClamp && clampZoom) {\r\n clampZoom.clamp()\r\n }\r\n\r\n if (center) {\r\n this.moveCenter(save)\r\n }\r\n return this\r\n }\r\n\r\n /**\r\n * change zoom so it fits the entire world in the viewport\r\n * @param {boolean} center maintain the same center of the screen after zoom\r\n * @returns {Viewport} this\r\n */\r\n fitWorld(center) {\r\n let save\r\n if (center) {\r\n save = this.center\r\n }\r\n this.scale.x = this.screenWidth / this.worldWidth\r\n this.scale.y = this.screenHeight / this.worldHeight\r\n if (this.scale.x < this.scale.y) {\r\n this.scale.y = this.scale.x\r\n }\r\n else {\r\n this.scale.x = this.scale.y\r\n }\r\n\r\n const clampZoom = this.plugins.get('clamp-zoom', true)\r\n if (clampZoom) {\r\n clampZoom.clamp()\r\n }\r\n\r\n if (center) {\r\n this.moveCenter(save)\r\n }\r\n return this\r\n }\r\n\r\n /**\r\n * change zoom so it fits the size or the entire world in the viewport\r\n * @param {boolean} [center] maintain the same center of the screen after zoom\r\n * @param {number} [width=this.worldWidth] desired width\r\n * @param {number} [height=this.worldHeight] desired height\r\n * @returns {Viewport} this\r\n */\r\n fit(center, width = this.worldWidth, height = this.worldHeight) {\r\n let save\r\n if (center) {\r\n save = this.center\r\n }\r\n this.scale.x = this.screenWidth / width\r\n this.scale.y = this.screenHeight / height\r\n if (this.scale.x < this.scale.y) {\r\n this.scale.y = this.scale.x\r\n }\r\n else {\r\n this.scale.x = this.scale.y\r\n }\r\n const clampZoom = this.plugins.get('clamp-zoom', true)\r\n if (clampZoom) {\r\n clampZoom.clamp()\r\n }\r\n if (center) {\r\n this.moveCenter(save)\r\n }\r\n return this\r\n }\r\n\r\n set visible(value) {\r\n if (!value) {\r\n this.input.clear()\r\n }\r\n super.visible = value\r\n }\r\n\r\n /**\r\n * zoom viewport to specific value\r\n * @param {number} scale value (e.g., 1 would be 100%, 0.25 would be 25%)\r\n * @param {boolean} [center] maintain the same center of the screen after zoom\r\n * @return {Viewport} this\r\n */\r\n setZoom(scale, center) {\r\n let save\r\n if (center) {\r\n save = this.center\r\n }\r\n this.scale.set(scale)\r\n const clampZoom = this.plugins.get('clamp-zoom', true)\r\n if (clampZoom) {\r\n clampZoom.clamp()\r\n }\r\n if (center) {\r\n this.moveCenter(save)\r\n }\r\n return this\r\n }\r\n\r\n /**\r\n * zoom viewport by a certain percent (in both x and y direction)\r\n * @param {number} percent change (e.g., 0.25 would increase a starting scale of 1.0 to 1.25)\r\n * @param {boolean} [center] maintain the same center of the screen after zoom\r\n * @return {Viewport} this\r\n */\r\n zoomPercent(percent, center) {\r\n return this.setZoom(this.scale.x + this.scale.x * percent, center)\r\n }\r\n\r\n /**\r\n * zoom viewport by increasing/decreasing width by a certain number of pixels\r\n * @param {number} change in pixels\r\n * @param {boolean} [center] maintain the same center of the screen after zoom\r\n * @return {Viewport} this\r\n */\r\n zoom(change, center) {\r\n this.fitWidth(change + this.worldScreenWidth, center)\r\n return this\r\n }\r\n\r\n /**\r\n * changes scale of viewport and maintains center of viewport\r\n * @type {number}\r\n */\r\n set scaled(scale) {\r\n this.setZoom(scale, true)\r\n }\r\n get scaled() {\r\n return this.scale.x\r\n }\r\n\r\n /**\r\n * @param {SnapZoomOptions} options\r\n */\r\n snapZoom(options) {\r\n this.plugins.add('snap-zoom', new SnapZoom(this, options))\r\n return this\r\n }\r\n\r\n /**\r\n * is container out of world bounds\r\n * @returns {OutOfBounds}\r\n */\r\n OOB() {\r\n return {\r\n left: this.left < 0,\r\n right: this.right > this.worldWidth,\r\n top: this.top < 0,\r\n bottom: this.bottom > this._worldHeight,\r\n cornerPoint: new PIXI.Point(\r\n this.worldWidth * this.scale.x - this.screenWidth,\r\n this.worldHeight * this.scale.y - this.screenHeight\r\n )\r\n }\r\n }\r\n\r\n /**\r\n * world coordinates of the right edge of the screen\r\n * @type {number}\r\n */\r\n get right() {\r\n return -this.x / this.scale.x + this.worldScreenWidth\r\n }\r\n set right(value) {\r\n this.x = -value * this.scale.x + this.screenWidth\r\n this.plugins.reset()\r\n }\r\n\r\n /**\r\n * world coordinates of the left edge of the screen\r\n * @type { number }\r\n */\r\n get left() {\r\n return -this.x / this.scale.x\r\n }\r\n set left(value) {\r\n this.x = -value * this.scale.x\r\n this.plugins.reset()\r\n }\r\n\r\n /**\r\n * world coordinates of the top edge of the screen\r\n * @type {number}\r\n */\r\n get top() {\r\n return -this.y / this.scale.y\r\n }\r\n set top(value) {\r\n this.y = -value * this.scale.y\r\n this.plugins.reset()\r\n }\r\n\r\n /**\r\n * world coordinates of the bottom edge of the screen\r\n * @type {number}\r\n */\r\n get bottom() {\r\n return -this.y / this.scale.y + this.worldScreenHeight\r\n }\r\n set bottom(value) {\r\n this.y = -value * this.scale.y + this.screenHeight\r\n this.plugins.reset()\r\n }\r\n\r\n /**\r\n * determines whether the viewport is dirty (i.e., needs to be renderered to the screen because of a change)\r\n * @type {boolean}\r\n */\r\n get dirty() {\r\n return this._dirty\r\n }\r\n set dirty(value) {\r\n this._dirty = value\r\n }\r\n\r\n /**\r\n * permanently changes the Viewport's hitArea\r\n * NOTE: if not set then hitArea = PIXI.Rectangle(Viewport.left, Viewport.top, Viewport.worldScreenWidth, Viewport.worldScreenHeight)\r\n * @returns {HitArea}\r\n */\r\n get forceHitArea() {\r\n return this._forceHitArea\r\n }\r\n set forceHitArea(value) {\r\n if (value) {\r\n this._forceHitArea = value\r\n this.hitArea = value\r\n }\r\n else {\r\n this._forceHitArea = null\r\n this.hitArea = new PIXI.Rectangle(0, 0, this.worldWidth, this.worldHeight)\r\n }\r\n }\r\n\r\n /**\r\n * enable one-finger touch to drag\r\n * NOTE: if you expect users to use right-click dragging, you should enable viewport.options.disableOnContextMenu to avoid the context menu popping up on each right-click drag\r\n * @param {DragOptions} [options]\r\n * @returns {Viewport} this\r\n */\r\n drag(options) {\r\n this.plugins.add('drag', new Drag(this, options))\r\n return this\r\n }\r\n\r\n /**\r\n * clamp to world boundaries or other provided boundaries\r\n * NOTES:\r\n * clamp is disabled if called with no options; use { direction: 'all' } for all edge clamping\r\n * screenWidth, screenHeight, worldWidth, and worldHeight needs to be set for this to work properly\r\n * @param {ClampOptions} [options]\r\n * @returns {Viewport} this\r\n */\r\n clamp(options) {\r\n this.plugins.add('clamp', new Clamp(this, options))\r\n return this\r\n }\r\n\r\n /**\r\n * decelerate after a move\r\n * NOTE: this fires 'moved' event during deceleration\r\n * @param {DecelerateOptions} [options]\r\n * @return {Viewport} this\r\n */\r\n decelerate(options) {\r\n this.plugins.add('decelerate', new Decelerate(this, options))\r\n return this\r\n }\r\n\r\n /**\r\n * bounce on borders\r\n * NOTES:\r\n * screenWidth, screenHeight, worldWidth, and worldHeight needs to be set for this to work properly\r\n * fires 'moved', 'bounce-x-start', 'bounce-y-start', 'bounce-x-end', and 'bounce-y-end' events\r\n * @param {object} [options]\r\n * @param {string} [options.sides=all] all, horizontal, vertical, or combination of top, bottom, right, left (e.g., 'top-bottom-right')\r\n * @param {number} [options.friction=0.5] friction to apply to decelerate if active\r\n * @param {number} [options.time=150] time in ms to finish bounce\r\n * @param {object} [options.bounceBox] use this bounceBox instead of (0, 0, viewport.worldWidth, viewport.worldHeight)\r\n * @param {number} [options.bounceBox.x=0]\r\n * @param {number} [options.bounceBox.y=0]\r\n * @param {number} [options.bounceBox.width=viewport.worldWidth]\r\n * @param {number} [options.bounceBox.height=viewport.worldHeight]\r\n * @param {string|function} [options.ease=easeInOutSine] ease function or name (see http://easings.net/ for supported names)\r\n * @param {string} [options.underflow=center] (top/bottom/center and left/right/center, or center) where to place world if too small for screen\r\n * @return {Viewport} this\r\n */\r\n bounce(options) {\r\n this.plugins.add('bounce', new Bounce(this, options))\r\n return this\r\n }\r\n\r\n /**\r\n * enable pinch to zoom and two-finger touch to drag\r\n * @param {PinchOptions} [options]\r\n * @return {Viewport} this\r\n */\r\n pinch(options) {\r\n this.plugins.add('pinch', new Pinch(this, options))\r\n return this\r\n }\r\n\r\n /**\r\n * snap to a point\r\n * @param {number} x\r\n * @param {number} y\r\n * @param {SnapOptions} [options]\r\n * @return {Viewport} this\r\n */\r\n snap(x, y, options) {\r\n this.plugins.add('snap', new Snap(this, x, y, options))\r\n return this\r\n }\r\n\r\n /**\r\n * follow a target\r\n * NOTES:\r\n * uses the (x, y) as the center to follow; for PIXI.Sprite to work properly, use sprite.anchor.set(0.5)\r\n * options.acceleration is not perfect as it doesn't know the velocity of the target\r\n * it adds acceleration to the start of movement and deceleration to the end of movement when the target is stopped\r\n * fires 'moved' event\r\n * @param {PIXI.DisplayObject} target to follow\r\n * @param {FollowOptions} [options]\r\n * @returns {Viewport} this\r\n */\r\n follow(target, options) {\r\n this.plugins.add('follow', new Follow(this, target, options))\r\n return this\r\n }\r\n\r\n /**\r\n * zoom using mouse wheel\r\n * @param {WheelOptions} [options]\r\n * @return {Viewport} this\r\n */\r\n wheel(options) {\r\n this.plugins.add('wheel', new Wheel(this, options))\r\n return this\r\n }\r\n\r\n /**\r\n * animate the position and/or scale of the viewport\r\n * @param {AnimateOptions} options\r\n * @returns {Viewport} this\r\n */\r\n animate(options) {\r\n this.plugins.add('animate', new Animate(this, options))\r\n return this\r\n }\r\n\r\n /**\r\n * enable clamping of zoom to constraints\r\n * @description\r\n * The minWidth/Height settings are how small the world can get (as it would appear on the screen)\r\n * before clamping. The maxWidth/maxHeight is how larger the world can scale (as it would appear on\r\n * the screen) before clamping.\r\n *\r\n * For example, if you have a world size of 1000 x 1000 and a screen size of 100 x 100, if you set\r\n * minWidth/Height = 100 then the world will not be able to zoom smaller than the screen size (ie,\r\n * zooming out so it appears smaller than the screen). Similarly, if you set maxWidth/Height = 100\r\n * the world will not be able to zoom larger than the screen size (ie, zooming in so it appears\r\n * larger than the screen).\r\n * @param {ClampZoomOptions} [options]\r\n * @return {Viewport} this\r\n */\r\n clampZoom(options) {\r\n this.plugins.add('clamp-zoom', new ClampZoom(this, options))\r\n return this\r\n }\r\n\r\n /**\r\n * Scroll viewport when mouse hovers near one of the edges or radius-distance from center of screen.\r\n * NOTE: fires 'moved' event\r\n * @param {MouseEdgesOptions} [options]\r\n */\r\n mouseEdges(options) {\r\n this.plugins.add('mouse-edges', new MouseEdges(this, options))\r\n return this\r\n }\r\n\r\n /**\r\n * pause viewport (including animation updates such as decelerate)\r\n * @type {boolean}\r\n */\r\n get pause() {\r\n return this._pause\r\n }\r\n set pause(value) {\r\n this._pause = value\r\n this.lastViewport = null\r\n this.moving = false\r\n this.zooming = false\r\n if (value) {\r\n this.input.pause()\r\n }\r\n }\r\n\r\n /**\r\n * move the viewport so the bounding box is visible\r\n * @param {number} x - left\r\n * @param {number} y - top\r\n * @param {number} width\r\n * @param {number} height\r\n * @param {boolean} [resizeToFit] resize the viewport so the box fits within the viewport\r\n */\r\n ensureVisible(x, y, width, height, resizeToFit) {\r\n if (resizeToFit && (width > this.worldScreenWidth || height > this.worldScreenHeight)) {\r\n this.fit(true, width, height)\r\n this.emit('zoomed', { viewport: this, type: 'ensureVisible' })\r\n }\r\n let moved = false\r\n if (x < this.left) {\r\n this.left = x\r\n moved = true\r\n }\r\n else if (x + width > this.right) {\r\n this.right = x + width\r\n moved = true\r\n }\r\n if (y < this.top) {\r\n this.top = y\r\n moved = true\r\n }\r\n else if (y + height > this.bottom) {\r\n this.bottom = y + height\r\n moved = true\r\n }\r\n if (moved) {\r\n this.emit('moved', { viewport: this, type: 'ensureVisible' })\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * fires after a mouse or touch click\r\n * @event Viewport#clicked\r\n * @type {object}\r\n * @property {PIXI.Point} screen\r\n * @property {PIXI.Point} world\r\n * @property {Viewport} viewport\r\n */\r\n\r\n/**\r\n * fires when a drag starts\r\n * @event Viewport#drag-start\r\n * @type {object}\r\n * @property {PIXI.Point} screen\r\n * @property {PIXI.Point} world\r\n * @property {Viewport} viewport\r\n */\r\n\r\n/**\r\n * fires when a drag ends\r\n * @event Viewport#drag-end\r\n * @type {object}\r\n * @property {PIXI.Point} screen\r\n * @property {PIXI.Point} world\r\n * @property {Viewport} viewport\r\n */\r\n\r\n/**\r\n * fires when a pinch starts\r\n * @event Viewport#pinch-start\r\n * @type {Viewport}\r\n */\r\n\r\n/**\r\n * fires when a pinch end\r\n * @event Viewport#pinch-end\r\n * @type {Viewport}\r\n */\r\n\r\n/**\r\n * fires when a snap starts\r\n * @event Viewport#snap-start\r\n * @type {Viewport}\r\n */\r\n\r\n/**\r\n * fires when a snap ends\r\n * @event Viewport#snap-end\r\n * @type {Viewport}\r\n */\r\n\r\n/**\r\n * fires when a snap-zoom starts\r\n * @event Viewport#snap-zoom-start\r\n * @type {Viewport}\r\n */\r\n\r\n/**\r\n * fires when a snap-zoom ends\r\n * @event Viewport#snap-zoom-end\r\n * @type {Viewport}\r\n */\r\n\r\n/**\r\n * fires when a bounce starts in the x direction\r\n * @event Viewport#bounce-x-start\r\n * @type {Viewport}\r\n */\r\n\r\n/**\r\n * fires when a bounce ends in the x direction\r\n * @event Viewport#bounce-x-end\r\n * @type {Viewport}\r\n */\r\n\r\n/**\r\n * fires when a bounce starts in the y direction\r\n * @event Viewport#bounce-y-start\r\n * @type {Viewport}\r\n */\r\n\r\n/**\r\n * fires when a bounce ends in the y direction\r\n * @event Viewport#bounce-y-end\r\n * @type {Viewport}\r\n */\r\n\r\n/**\r\n * fires when for a mouse wheel event\r\n * @event Viewport#wheel\r\n * @type {object}\r\n * @property {object} wheel\r\n * @property {number} wheel.dx\r\n * @property {number} wheel.dy\r\n * @property {number} wheel.dz\r\n * @property {Viewport} viewport\r\n */\r\n\r\n/**\r\n * fires when a wheel-scroll occurs\r\n * @event Viewport#wheel-scroll\r\n * @type {Viewport}\r\n */\r\n\r\n/**\r\n * fires when a mouse-edge starts to scroll\r\n * @event Viewport#mouse-edge-start\r\n * @type {Viewport}\r\n */\r\n\r\n/**\r\n * fires when the mouse-edge scrolling ends\r\n * @event Viewport#mouse-edge-end\r\n * @type {Viewport}\r\n */\r\n\r\n/**\r\n * fires when viewport moves through UI interaction, deceleration, ensureVisible, or follow\r\n * @event Viewport#moved\r\n * @type {object}\r\n * @property {Viewport} viewport\r\n * @property {string} type (drag, snap, pinch, follow, bounce-x, bounce-y, clamp-x, clamp-y, decelerate, mouse-edges, wheel, ensureVisible)\r\n */\r\n\r\n/**\r\n * fires when viewport moves through UI interaction, deceleration, ensureVisible, or follow\r\n * @event Viewport#zoomed\r\n * @type {object}\r\n * @property {Viewport} viewport\r\n * @property {string} type (drag-zoom, pinch, wheel, clamp-zoom, ensureVisible)\r\n */\r\n\r\n/**\r\n * fires when viewport stops moving\r\n * @event Viewport#moved-end\r\n * @type {Viewport}\r\n */\r\n\r\n/**\r\n * fires when viewport stops zooming\r\n * @event Viewport#zoomed-end\r\n * @type {Viewport}\r\n */\r\n\r\n/**\r\n* fires at the end of an update frame\r\n* @event Viewport#frame-end\r\n* @type {Viewport}\r\n*/\r\n\r\n/** @typedef HitArea {(PIXI.Rectangle | PIXI.Circle | PIXI.Ellipse | PIXI.Polygon | PIXI.RoundedRectangle)} */\r\n\r\n/**\r\n * @typedef {Object} OutOfBounds\r\n * @private\r\n * @property {boolean} left\r\n * @property {boolean} right\r\n * @property {boolean} top\r\n * @property {boolean} bottom\r\n * @property {PIXI.Point} cornerPoint\r\n */\r\n\r\n/**\r\n * @typedef {Object} LastViewport\r\n * @private\r\n * @property {number} x\r\n * @property {number} y\r\n * @property {number} scaleX\r\n * @property {number} scaleY\r\n */","import superPropBase from \"@babel/runtime/helpers/esm/superPropBase\";\nimport defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n\nfunction set(target, property, value, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.set) {\n set = Reflect.set;\n } else {\n set = function set(target, property, value, receiver) {\n var base = superPropBase(target, property);\n var desc;\n\n if (base) {\n desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.set) {\n desc.set.call(receiver, value);\n return true;\n } else if (!desc.writable) {\n return false;\n }\n }\n\n desc = Object.getOwnPropertyDescriptor(receiver, property);\n\n if (desc) {\n if (!desc.writable) {\n return false;\n }\n\n desc.value = value;\n Object.defineProperty(receiver, property, desc);\n } else {\n defineProperty(receiver, property, value);\n }\n\n return true;\n };\n }\n\n return set(target, property, value, receiver);\n}\n\nexport default function _set(target, property, value, receiver, isStrict) {\n var s = set(target, property, value, receiver || target);\n\n if (!s && isStrict) {\n throw new Error('failed to set property');\n }\n\n return value;\n}","/**\r\n * A collection of shims that provide minimal functionality of the ES6 collections.\r\n *\r\n * These implementations are not meant to be used outside of the ResizeObserver\r\n * modules as they cover only a limited range of use cases.\r\n */\r\n/* eslint-disable require-jsdoc, valid-jsdoc */\r\nvar MapShim = (function () {\r\n if (typeof Map !== 'undefined') {\r\n return Map;\r\n }\r\n /**\r\n * Returns index in provided array that matches the specified key.\r\n *\r\n * @param {Array} arr\r\n * @param {*} key\r\n * @returns {number}\r\n */\r\n function getIndex(arr, key) {\r\n var result = -1;\r\n arr.some(function (entry, index) {\r\n if (entry[0] === key) {\r\n result = index;\r\n return true;\r\n }\r\n return false;\r\n });\r\n return result;\r\n }\r\n return /** @class */ (function () {\r\n function class_1() {\r\n this.__entries__ = [];\r\n }\r\n Object.defineProperty(class_1.prototype, \"size\", {\r\n /**\r\n * @returns {boolean}\r\n */\r\n get: function () {\r\n return this.__entries__.length;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @param {*} key\r\n * @returns {*}\r\n */\r\n class_1.prototype.get = function (key) {\r\n var index = getIndex(this.__entries__, key);\r\n var entry = this.__entries__[index];\r\n return entry && entry[1];\r\n };\r\n /**\r\n * @param {*} key\r\n * @param {*} value\r\n * @returns {void}\r\n */\r\n class_1.prototype.set = function (key, value) {\r\n var index = getIndex(this.__entries__, key);\r\n if (~index) {\r\n this.__entries__[index][1] = value;\r\n }\r\n else {\r\n this.__entries__.push([key, value]);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.delete = function (key) {\r\n var entries = this.__entries__;\r\n var index = getIndex(entries, key);\r\n if (~index) {\r\n entries.splice(index, 1);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.has = function (key) {\r\n return !!~getIndex(this.__entries__, key);\r\n };\r\n /**\r\n * @returns {void}\r\n */\r\n class_1.prototype.clear = function () {\r\n this.__entries__.splice(0);\r\n };\r\n /**\r\n * @param {Function} callback\r\n * @param {*} [ctx=null]\r\n * @returns {void}\r\n */\r\n class_1.prototype.forEach = function (callback, ctx) {\r\n if (ctx === void 0) { ctx = null; }\r\n for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {\r\n var entry = _a[_i];\r\n callback.call(ctx, entry[1], entry[0]);\r\n }\r\n };\r\n return class_1;\r\n }());\r\n})();\n\n/**\r\n * Detects whether window and document objects are available in current environment.\r\n */\r\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;\n\n// Returns global object of a current environment.\r\nvar global$1 = (function () {\r\n if (typeof global !== 'undefined' && global.Math === Math) {\r\n return global;\r\n }\r\n if (typeof self !== 'undefined' && self.Math === Math) {\r\n return self;\r\n }\r\n if (typeof window !== 'undefined' && window.Math === Math) {\r\n return window;\r\n }\r\n // eslint-disable-next-line no-new-func\r\n return Function('return this')();\r\n})();\n\n/**\r\n * A shim for the requestAnimationFrame which falls back to the setTimeout if\r\n * first one is not supported.\r\n *\r\n * @returns {number} Requests' identifier.\r\n */\r\nvar requestAnimationFrame$1 = (function () {\r\n if (typeof requestAnimationFrame === 'function') {\r\n // It's required to use a bounded function because IE sometimes throws\r\n // an \"Invalid calling object\" error if rAF is invoked without the global\r\n // object on the left hand side.\r\n return requestAnimationFrame.bind(global$1);\r\n }\r\n return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };\r\n})();\n\n// Defines minimum timeout before adding a trailing call.\r\nvar trailingTimeout = 2;\r\n/**\r\n * Creates a wrapper function which ensures that provided callback will be\r\n * invoked only once during the specified delay period.\r\n *\r\n * @param {Function} callback - Function to be invoked after the delay period.\r\n * @param {number} delay - Delay after which to invoke callback.\r\n * @returns {Function}\r\n */\r\nfunction throttle (callback, delay) {\r\n var leadingCall = false, trailingCall = false, lastCallTime = 0;\r\n /**\r\n * Invokes the original callback function and schedules new invocation if\r\n * the \"proxy\" was called during current request.\r\n *\r\n * @returns {void}\r\n */\r\n function resolvePending() {\r\n if (leadingCall) {\r\n leadingCall = false;\r\n callback();\r\n }\r\n if (trailingCall) {\r\n proxy();\r\n }\r\n }\r\n /**\r\n * Callback invoked after the specified delay. It will further postpone\r\n * invocation of the original function delegating it to the\r\n * requestAnimationFrame.\r\n *\r\n * @returns {void}\r\n */\r\n function timeoutCallback() {\r\n requestAnimationFrame$1(resolvePending);\r\n }\r\n /**\r\n * Schedules invocation of the original function.\r\n *\r\n * @returns {void}\r\n */\r\n function proxy() {\r\n var timeStamp = Date.now();\r\n if (leadingCall) {\r\n // Reject immediately following calls.\r\n if (timeStamp - lastCallTime < trailingTimeout) {\r\n return;\r\n }\r\n // Schedule new call to be in invoked when the pending one is resolved.\r\n // This is important for \"transitions\" which never actually start\r\n // immediately so there is a chance that we might miss one if change\r\n // happens amids the pending invocation.\r\n trailingCall = true;\r\n }\r\n else {\r\n leadingCall = true;\r\n trailingCall = false;\r\n setTimeout(timeoutCallback, delay);\r\n }\r\n lastCallTime = timeStamp;\r\n }\r\n return proxy;\r\n}\n\n// Minimum delay before invoking the update of observers.\r\nvar REFRESH_DELAY = 20;\r\n// A list of substrings of CSS properties used to find transition events that\r\n// might affect dimensions of observed elements.\r\nvar transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];\r\n// Check if MutationObserver is available.\r\nvar mutationObserverSupported = typeof MutationObserver !== 'undefined';\r\n/**\r\n * Singleton controller class which handles updates of ResizeObserver instances.\r\n */\r\nvar ResizeObserverController = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserverController.\r\n *\r\n * @private\r\n */\r\n function ResizeObserverController() {\r\n /**\r\n * Indicates whether DOM listeners have been added.\r\n *\r\n * @private {boolean}\r\n */\r\n this.connected_ = false;\r\n /**\r\n * Tells that controller has subscribed for Mutation Events.\r\n *\r\n * @private {boolean}\r\n */\r\n this.mutationEventsAdded_ = false;\r\n /**\r\n * Keeps reference to the instance of MutationObserver.\r\n *\r\n * @private {MutationObserver}\r\n */\r\n this.mutationsObserver_ = null;\r\n /**\r\n * A list of connected observers.\r\n *\r\n * @private {Array}\r\n */\r\n this.observers_ = [];\r\n this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);\r\n this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);\r\n }\r\n /**\r\n * Adds observer to observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be added.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.addObserver = function (observer) {\r\n if (!~this.observers_.indexOf(observer)) {\r\n this.observers_.push(observer);\r\n }\r\n // Add listeners if they haven't been added yet.\r\n if (!this.connected_) {\r\n this.connect_();\r\n }\r\n };\r\n /**\r\n * Removes observer from observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be removed.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.removeObserver = function (observer) {\r\n var observers = this.observers_;\r\n var index = observers.indexOf(observer);\r\n // Remove observer if it's present in registry.\r\n if (~index) {\r\n observers.splice(index, 1);\r\n }\r\n // Remove listeners if controller has no connected observers.\r\n if (!observers.length && this.connected_) {\r\n this.disconnect_();\r\n }\r\n };\r\n /**\r\n * Invokes the update of observers. It will continue running updates insofar\r\n * it detects changes.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.refresh = function () {\r\n var changesDetected = this.updateObservers_();\r\n // Continue running updates if changes have been detected as there might\r\n // be future ones caused by CSS transitions.\r\n if (changesDetected) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Updates every observer from observers list and notifies them of queued\r\n * entries.\r\n *\r\n * @private\r\n * @returns {boolean} Returns \"true\" if any observer has detected changes in\r\n * dimensions of it's elements.\r\n */\r\n ResizeObserverController.prototype.updateObservers_ = function () {\r\n // Collect observers that have active observations.\r\n var activeObservers = this.observers_.filter(function (observer) {\r\n return observer.gatherActive(), observer.hasActive();\r\n });\r\n // Deliver notifications in a separate cycle in order to avoid any\r\n // collisions between observers, e.g. when multiple instances of\r\n // ResizeObserver are tracking the same element and the callback of one\r\n // of them changes content dimensions of the observed target. Sometimes\r\n // this may result in notifications being blocked for the rest of observers.\r\n activeObservers.forEach(function (observer) { return observer.broadcastActive(); });\r\n return activeObservers.length > 0;\r\n };\r\n /**\r\n * Initializes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.connect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already added.\r\n if (!isBrowser || this.connected_) {\r\n return;\r\n }\r\n // Subscription to the \"Transitionend\" event is used as a workaround for\r\n // delayed transitions. This way it's possible to capture at least the\r\n // final state of an element.\r\n document.addEventListener('transitionend', this.onTransitionEnd_);\r\n window.addEventListener('resize', this.refresh);\r\n if (mutationObserverSupported) {\r\n this.mutationsObserver_ = new MutationObserver(this.refresh);\r\n this.mutationsObserver_.observe(document, {\r\n attributes: true,\r\n childList: true,\r\n characterData: true,\r\n subtree: true\r\n });\r\n }\r\n else {\r\n document.addEventListener('DOMSubtreeModified', this.refresh);\r\n this.mutationEventsAdded_ = true;\r\n }\r\n this.connected_ = true;\r\n };\r\n /**\r\n * Removes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.disconnect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already removed.\r\n if (!isBrowser || !this.connected_) {\r\n return;\r\n }\r\n document.removeEventListener('transitionend', this.onTransitionEnd_);\r\n window.removeEventListener('resize', this.refresh);\r\n if (this.mutationsObserver_) {\r\n this.mutationsObserver_.disconnect();\r\n }\r\n if (this.mutationEventsAdded_) {\r\n document.removeEventListener('DOMSubtreeModified', this.refresh);\r\n }\r\n this.mutationsObserver_ = null;\r\n this.mutationEventsAdded_ = false;\r\n this.connected_ = false;\r\n };\r\n /**\r\n * \"Transitionend\" event handler.\r\n *\r\n * @private\r\n * @param {TransitionEvent} event\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {\r\n var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;\r\n // Detect whether transition may affect dimensions of an element.\r\n var isReflowProperty = transitionKeys.some(function (key) {\r\n return !!~propertyName.indexOf(key);\r\n });\r\n if (isReflowProperty) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Returns instance of the ResizeObserverController.\r\n *\r\n * @returns {ResizeObserverController}\r\n */\r\n ResizeObserverController.getInstance = function () {\r\n if (!this.instance_) {\r\n this.instance_ = new ResizeObserverController();\r\n }\r\n return this.instance_;\r\n };\r\n /**\r\n * Holds reference to the controller's instance.\r\n *\r\n * @private {ResizeObserverController}\r\n */\r\n ResizeObserverController.instance_ = null;\r\n return ResizeObserverController;\r\n}());\n\n/**\r\n * Defines non-writable/enumerable properties of the provided target object.\r\n *\r\n * @param {Object} target - Object for which to define properties.\r\n * @param {Object} props - Properties to be defined.\r\n * @returns {Object} Target object.\r\n */\r\nvar defineConfigurable = (function (target, props) {\r\n for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n Object.defineProperty(target, key, {\r\n value: props[key],\r\n enumerable: false,\r\n writable: false,\r\n configurable: true\r\n });\r\n }\r\n return target;\r\n});\n\n/**\r\n * Returns the global object associated with provided element.\r\n *\r\n * @param {Object} target\r\n * @returns {Object}\r\n */\r\nvar getWindowOf = (function (target) {\r\n // Assume that the element is an instance of Node, which means that it\r\n // has the \"ownerDocument\" property from which we can retrieve a\r\n // corresponding global object.\r\n var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;\r\n // Return the local global object if it's not possible extract one from\r\n // provided element.\r\n return ownerGlobal || global$1;\r\n});\n\n// Placeholder of an empty content rectangle.\r\nvar emptyRect = createRectInit(0, 0, 0, 0);\r\n/**\r\n * Converts provided string to a number.\r\n *\r\n * @param {number|string} value\r\n * @returns {number}\r\n */\r\nfunction toFloat(value) {\r\n return parseFloat(value) || 0;\r\n}\r\n/**\r\n * Extracts borders size from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @param {...string} positions - Borders positions (top, right, ...)\r\n * @returns {number}\r\n */\r\nfunction getBordersSize(styles) {\r\n var positions = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n positions[_i - 1] = arguments[_i];\r\n }\r\n return positions.reduce(function (size, position) {\r\n var value = styles['border-' + position + '-width'];\r\n return size + toFloat(value);\r\n }, 0);\r\n}\r\n/**\r\n * Extracts paddings sizes from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @returns {Object} Paddings box.\r\n */\r\nfunction getPaddings(styles) {\r\n var positions = ['top', 'right', 'bottom', 'left'];\r\n var paddings = {};\r\n for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {\r\n var position = positions_1[_i];\r\n var value = styles['padding-' + position];\r\n paddings[position] = toFloat(value);\r\n }\r\n return paddings;\r\n}\r\n/**\r\n * Calculates content rectangle of provided SVG element.\r\n *\r\n * @param {SVGGraphicsElement} target - Element content rectangle of which needs\r\n * to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getSVGContentRect(target) {\r\n var bbox = target.getBBox();\r\n return createRectInit(0, 0, bbox.width, bbox.height);\r\n}\r\n/**\r\n * Calculates content rectangle of provided HTMLElement.\r\n *\r\n * @param {HTMLElement} target - Element for which to calculate the content rectangle.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getHTMLElementContentRect(target) {\r\n // Client width & height properties can't be\r\n // used exclusively as they provide rounded values.\r\n var clientWidth = target.clientWidth, clientHeight = target.clientHeight;\r\n // By this condition we can catch all non-replaced inline, hidden and\r\n // detached elements. Though elements with width & height properties less\r\n // than 0.5 will be discarded as well.\r\n //\r\n // Without it we would need to implement separate methods for each of\r\n // those cases and it's not possible to perform a precise and performance\r\n // effective test for hidden elements. E.g. even jQuery's ':visible' filter\r\n // gives wrong results for elements with width & height less than 0.5.\r\n if (!clientWidth && !clientHeight) {\r\n return emptyRect;\r\n }\r\n var styles = getWindowOf(target).getComputedStyle(target);\r\n var paddings = getPaddings(styles);\r\n var horizPad = paddings.left + paddings.right;\r\n var vertPad = paddings.top + paddings.bottom;\r\n // Computed styles of width & height are being used because they are the\r\n // only dimensions available to JS that contain non-rounded values. It could\r\n // be possible to utilize the getBoundingClientRect if only it's data wasn't\r\n // affected by CSS transformations let alone paddings, borders and scroll bars.\r\n var width = toFloat(styles.width), height = toFloat(styles.height);\r\n // Width & height include paddings and borders when the 'border-box' box\r\n // model is applied (except for IE).\r\n if (styles.boxSizing === 'border-box') {\r\n // Following conditions are required to handle Internet Explorer which\r\n // doesn't include paddings and borders to computed CSS dimensions.\r\n //\r\n // We can say that if CSS dimensions + paddings are equal to the \"client\"\r\n // properties then it's either IE, and thus we don't need to subtract\r\n // anything, or an element merely doesn't have paddings/borders styles.\r\n if (Math.round(width + horizPad) !== clientWidth) {\r\n width -= getBordersSize(styles, 'left', 'right') + horizPad;\r\n }\r\n if (Math.round(height + vertPad) !== clientHeight) {\r\n height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\r\n }\r\n }\r\n // Following steps can't be applied to the document's root element as its\r\n // client[Width/Height] properties represent viewport area of the window.\r\n // Besides, it's as well not necessary as the itself neither has\r\n // rendered scroll bars nor it can be clipped.\r\n if (!isDocumentElement(target)) {\r\n // In some browsers (only in Firefox, actually) CSS width & height\r\n // include scroll bars size which can be removed at this step as scroll\r\n // bars are the only difference between rounded dimensions + paddings\r\n // and \"client\" properties, though that is not always true in Chrome.\r\n var vertScrollbar = Math.round(width + horizPad) - clientWidth;\r\n var horizScrollbar = Math.round(height + vertPad) - clientHeight;\r\n // Chrome has a rather weird rounding of \"client\" properties.\r\n // E.g. for an element with content width of 314.2px it sometimes gives\r\n // the client width of 315px and for the width of 314.7px it may give\r\n // 314px. And it doesn't happen all the time. So just ignore this delta\r\n // as a non-relevant.\r\n if (Math.abs(vertScrollbar) !== 1) {\r\n width -= vertScrollbar;\r\n }\r\n if (Math.abs(horizScrollbar) !== 1) {\r\n height -= horizScrollbar;\r\n }\r\n }\r\n return createRectInit(paddings.left, paddings.top, width, height);\r\n}\r\n/**\r\n * Checks whether provided element is an instance of the SVGGraphicsElement.\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nvar isSVGGraphicsElement = (function () {\r\n // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement\r\n // interface.\r\n if (typeof SVGGraphicsElement !== 'undefined') {\r\n return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };\r\n }\r\n // If it's so, then check that element is at least an instance of the\r\n // SVGElement and that it has the \"getBBox\" method.\r\n // eslint-disable-next-line no-extra-parens\r\n return function (target) { return (target instanceof getWindowOf(target).SVGElement &&\r\n typeof target.getBBox === 'function'); };\r\n})();\r\n/**\r\n * Checks whether provided element is a document element ().\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nfunction isDocumentElement(target) {\r\n return target === getWindowOf(target).document.documentElement;\r\n}\r\n/**\r\n * Calculates an appropriate content rectangle for provided html or svg element.\r\n *\r\n * @param {Element} target - Element content rectangle of which needs to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getContentRect(target) {\r\n if (!isBrowser) {\r\n return emptyRect;\r\n }\r\n if (isSVGGraphicsElement(target)) {\r\n return getSVGContentRect(target);\r\n }\r\n return getHTMLElementContentRect(target);\r\n}\r\n/**\r\n * Creates rectangle with an interface of the DOMRectReadOnly.\r\n * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly\r\n *\r\n * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.\r\n * @returns {DOMRectReadOnly}\r\n */\r\nfunction createReadOnlyRect(_a) {\r\n var x = _a.x, y = _a.y, width = _a.width, height = _a.height;\r\n // If DOMRectReadOnly is available use it as a prototype for the rectangle.\r\n var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;\r\n var rect = Object.create(Constr.prototype);\r\n // Rectangle's properties are not writable and non-enumerable.\r\n defineConfigurable(rect, {\r\n x: x, y: y, width: width, height: height,\r\n top: y,\r\n right: x + width,\r\n bottom: height + y,\r\n left: x\r\n });\r\n return rect;\r\n}\r\n/**\r\n * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.\r\n * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit\r\n *\r\n * @param {number} x - X coordinate.\r\n * @param {number} y - Y coordinate.\r\n * @param {number} width - Rectangle's width.\r\n * @param {number} height - Rectangle's height.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction createRectInit(x, y, width, height) {\r\n return { x: x, y: y, width: width, height: height };\r\n}\n\n/**\r\n * Class that is responsible for computations of the content rectangle of\r\n * provided DOM element and for keeping track of it's changes.\r\n */\r\nvar ResizeObservation = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObservation.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n */\r\n function ResizeObservation(target) {\r\n /**\r\n * Broadcasted width of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastWidth = 0;\r\n /**\r\n * Broadcasted height of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastHeight = 0;\r\n /**\r\n * Reference to the last observed content rectangle.\r\n *\r\n * @private {DOMRectInit}\r\n */\r\n this.contentRect_ = createRectInit(0, 0, 0, 0);\r\n this.target = target;\r\n }\r\n /**\r\n * Updates content rectangle and tells whether it's width or height properties\r\n * have changed since the last broadcast.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObservation.prototype.isActive = function () {\r\n var rect = getContentRect(this.target);\r\n this.contentRect_ = rect;\r\n return (rect.width !== this.broadcastWidth ||\r\n rect.height !== this.broadcastHeight);\r\n };\r\n /**\r\n * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data\r\n * from the corresponding properties of the last observed content rectangle.\r\n *\r\n * @returns {DOMRectInit} Last observed content rectangle.\r\n */\r\n ResizeObservation.prototype.broadcastRect = function () {\r\n var rect = this.contentRect_;\r\n this.broadcastWidth = rect.width;\r\n this.broadcastHeight = rect.height;\r\n return rect;\r\n };\r\n return ResizeObservation;\r\n}());\n\nvar ResizeObserverEntry = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObserverEntry.\r\n *\r\n * @param {Element} target - Element that is being observed.\r\n * @param {DOMRectInit} rectInit - Data of the element's content rectangle.\r\n */\r\n function ResizeObserverEntry(target, rectInit) {\r\n var contentRect = createReadOnlyRect(rectInit);\r\n // According to the specification following properties are not writable\r\n // and are also not enumerable in the native implementation.\r\n //\r\n // Property accessors are not being used as they'd require to define a\r\n // private WeakMap storage which may cause memory leaks in browsers that\r\n // don't support this type of collections.\r\n defineConfigurable(this, { target: target, contentRect: contentRect });\r\n }\r\n return ResizeObserverEntry;\r\n}());\n\nvar ResizeObserverSPI = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback function that is invoked\r\n * when one of the observed elements changes it's content dimensions.\r\n * @param {ResizeObserverController} controller - Controller instance which\r\n * is responsible for the updates of observer.\r\n * @param {ResizeObserver} callbackCtx - Reference to the public\r\n * ResizeObserver instance which will be passed to callback function.\r\n */\r\n function ResizeObserverSPI(callback, controller, callbackCtx) {\r\n /**\r\n * Collection of resize observations that have detected changes in dimensions\r\n * of elements.\r\n *\r\n * @private {Array}\r\n */\r\n this.activeObservations_ = [];\r\n /**\r\n * Registry of the ResizeObservation instances.\r\n *\r\n * @private {Map}\r\n */\r\n this.observations_ = new MapShim();\r\n if (typeof callback !== 'function') {\r\n throw new TypeError('The callback provided as parameter 1 is not a function.');\r\n }\r\n this.callback_ = callback;\r\n this.controller_ = controller;\r\n this.callbackCtx_ = callbackCtx;\r\n }\r\n /**\r\n * Starts observing provided element.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.observe = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is already being observed.\r\n if (observations.has(target)) {\r\n return;\r\n }\r\n observations.set(target, new ResizeObservation(target));\r\n this.controller_.addObserver(this);\r\n // Force the update of observations.\r\n this.controller_.refresh();\r\n };\r\n /**\r\n * Stops observing provided element.\r\n *\r\n * @param {Element} target - Element to stop observing.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.unobserve = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is not being observed.\r\n if (!observations.has(target)) {\r\n return;\r\n }\r\n observations.delete(target);\r\n if (!observations.size) {\r\n this.controller_.removeObserver(this);\r\n }\r\n };\r\n /**\r\n * Stops observing all elements.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.disconnect = function () {\r\n this.clearActive();\r\n this.observations_.clear();\r\n this.controller_.removeObserver(this);\r\n };\r\n /**\r\n * Collects observation instances the associated element of which has changed\r\n * it's content rectangle.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.gatherActive = function () {\r\n var _this = this;\r\n this.clearActive();\r\n this.observations_.forEach(function (observation) {\r\n if (observation.isActive()) {\r\n _this.activeObservations_.push(observation);\r\n }\r\n });\r\n };\r\n /**\r\n * Invokes initial callback function with a list of ResizeObserverEntry\r\n * instances collected from active resize observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.broadcastActive = function () {\r\n // Do nothing if observer doesn't have active observations.\r\n if (!this.hasActive()) {\r\n return;\r\n }\r\n var ctx = this.callbackCtx_;\r\n // Create ResizeObserverEntry instance for every active observation.\r\n var entries = this.activeObservations_.map(function (observation) {\r\n return new ResizeObserverEntry(observation.target, observation.broadcastRect());\r\n });\r\n this.callback_.call(ctx, entries, ctx);\r\n this.clearActive();\r\n };\r\n /**\r\n * Clears the collection of active observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.clearActive = function () {\r\n this.activeObservations_.splice(0);\r\n };\r\n /**\r\n * Tells whether observer has active observations.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObserverSPI.prototype.hasActive = function () {\r\n return this.activeObservations_.length > 0;\r\n };\r\n return ResizeObserverSPI;\r\n}());\n\n// Registry of internal observers. If WeakMap is not available use current shim\r\n// for the Map collection as it has all required methods and because WeakMap\r\n// can't be fully polyfilled anyway.\r\nvar observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();\r\n/**\r\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\r\n * exposing only those methods and properties that are defined in the spec.\r\n */\r\nvar ResizeObserver = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback that is invoked when\r\n * dimensions of the observed elements change.\r\n */\r\n function ResizeObserver(callback) {\r\n if (!(this instanceof ResizeObserver)) {\r\n throw new TypeError('Cannot call a class as a function.');\r\n }\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n var controller = ResizeObserverController.getInstance();\r\n var observer = new ResizeObserverSPI(callback, controller, this);\r\n observers.set(this, observer);\r\n }\r\n return ResizeObserver;\r\n}());\r\n// Expose public methods of ResizeObserver.\r\n[\r\n 'observe',\r\n 'unobserve',\r\n 'disconnect'\r\n].forEach(function (method) {\r\n ResizeObserver.prototype[method] = function () {\r\n var _a;\r\n return (_a = observers.get(this))[method].apply(_a, arguments);\r\n };\r\n});\n\nvar index = (function () {\r\n // Export existing implementation if available.\r\n if (typeof global$1.ResizeObserver !== 'undefined') {\r\n return global$1.ResizeObserver;\r\n }\r\n return ResizeObserver;\r\n})();\n\nexport default index;\n","var debounce = require('./debounce'),\n isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;\n","import objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","/** @license React v16.14.0\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),g=60103;exports.Fragment=60107;if(\"function\"===typeof Symbol&&Symbol.for){var h=Symbol.for;g=h(\"react.element\");exports.Fragment=h(\"react.fragment\")}var m=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n=Object.prototype.hasOwnProperty,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,k){var b,d={},e=null,l=null;void 0!==k&&(e=\"\"+k);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(l=a.ref);for(b in a)n.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:g,type:c,key:e,ref:l,props:d,_owner:m.current}}exports.jsx=q;exports.jsxs=q;\n","/** @license React v16.14.0\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var l=require(\"object-assign\"),n=\"function\"===typeof Symbol&&Symbol.for,p=n?Symbol.for(\"react.element\"):60103,q=n?Symbol.for(\"react.portal\"):60106,r=n?Symbol.for(\"react.fragment\"):60107,t=n?Symbol.for(\"react.strict_mode\"):60108,u=n?Symbol.for(\"react.profiler\"):60114,v=n?Symbol.for(\"react.provider\"):60109,w=n?Symbol.for(\"react.context\"):60110,x=n?Symbol.for(\"react.forward_ref\"):60112,y=n?Symbol.for(\"react.suspense\"):60113,z=n?Symbol.for(\"react.memo\"):60115,A=n?Symbol.for(\"react.lazy\"):\n60116,B=\"function\"===typeof Symbol&&Symbol.iterator;function C(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cQ.length&&Q.push(a)}\nfunction T(a,b,c,e){var d=typeof a;if(\"undefined\"===d||\"boolean\"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case \"string\":case \"number\":g=!0;break;case \"object\":switch(a.$$typeof){case p:case q:g=!0}}if(g)return c(e,a,\"\"===b?\".\"+U(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var k=0;kb}return!1}function v(a,b,c,d,e,f){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f}var C={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){C[a]=new v(a,0,!1,a,null,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];C[b]=new v(b,1,!1,a[1],null,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){C[a]=new v(a,2,!1,a.toLowerCase(),null,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){C[a]=new v(a,2,!1,a,null,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){C[a]=new v(a,3,!1,a.toLowerCase(),null,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){C[a]=new v(a,3,!0,a,null,!1)});[\"capture\",\"download\"].forEach(function(a){C[a]=new v(a,4,!1,a,null,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){C[a]=new v(a,6,!1,a,null,!1)});[\"rowSpan\",\"start\"].forEach(function(a){C[a]=new v(a,5,!1,a.toLowerCase(),null,!1)});var Ua=/[\\-:]([a-z])/g;function Va(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(Ua,\nVa);C[b]=new v(b,1,!1,a,null,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(Ua,Va);C[b]=new v(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(Ua,Va);C[b]=new v(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){C[a]=new v(a,1,!1,a.toLowerCase(),null,!1)});\nC.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){C[a]=new v(a,1,!1,a.toLowerCase(),null,!0)});var Wa=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Wa.hasOwnProperty(\"ReactCurrentDispatcher\")||(Wa.ReactCurrentDispatcher={current:null});Wa.hasOwnProperty(\"ReactCurrentBatchConfig\")||(Wa.ReactCurrentBatchConfig={suspense:null});\nfunction Xa(a,b,c,d){var e=C.hasOwnProperty(b)?C[b]:null;var f=null!==e?0===e.type:d?!1:!(2=c.length))throw Error(u(93));c=c[0]}b=c}null==b&&(b=\"\");c=b}a._wrapperState={initialValue:rb(c)}}\nfunction Kb(a,b){var c=rb(b.value),d=rb(b.defaultValue);null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=\"\"+d)}function Lb(a){var b=a.textContent;b===a._wrapperState.initialValue&&\"\"!==b&&null!==b&&(a.value=b)}var Mb={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction Nb(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function Ob(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?Nb(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar Pb,Qb=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Mb.svg||\"innerHTML\"in a)a.innerHTML=b;else{Pb=Pb||document.createElement(\"div\");Pb.innerHTML=\"\"+b.valueOf().toString()+\"\";for(b=Pb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction Rb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}function Sb(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c[\"Webkit\"+a]=\"webkit\"+b;c[\"Moz\"+a]=\"moz\"+b;return c}var Tb={animationend:Sb(\"Animation\",\"AnimationEnd\"),animationiteration:Sb(\"Animation\",\"AnimationIteration\"),animationstart:Sb(\"Animation\",\"AnimationStart\"),transitionend:Sb(\"Transition\",\"TransitionEnd\")},Ub={},Vb={};\nya&&(Vb=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete Tb.animationend.animation,delete Tb.animationiteration.animation,delete Tb.animationstart.animation),\"TransitionEvent\"in window||delete Tb.transitionend.transition);function Wb(a){if(Ub[a])return Ub[a];if(!Tb[a])return a;var b=Tb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Vb)return Ub[a]=b[c];return a}\nvar Xb=Wb(\"animationend\"),Yb=Wb(\"animationiteration\"),Zb=Wb(\"animationstart\"),$b=Wb(\"transitionend\"),ac=\"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting\".split(\" \"),bc=new (\"function\"===typeof WeakMap?WeakMap:Map);function cc(a){var b=bc.get(a);void 0===b&&(b=new Map,bc.set(a,b));return b}\nfunction dc(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.effectTag&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function ec(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function fc(a){if(dc(a)!==a)throw Error(u(188));}\nfunction gc(a){var b=a.alternate;if(!b){b=dc(a);if(null===b)throw Error(u(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return fc(e),a;if(f===d)return fc(e),b;f=f.sibling}throw Error(u(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===\nc){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(u(189));}}if(c.alternate!==d)throw Error(u(190));}if(3!==c.tag)throw Error(u(188));return c.stateNode.current===c?a:b}function hc(a){a=gc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}\nfunction ic(a,b){if(null==b)throw Error(u(30));if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function jc(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}var kc=null;\nfunction lc(a){if(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))for(var d=0;dpc.length&&pc.push(a)}\nfunction rc(a,b,c,d){if(pc.length){var e=pc.pop();e.topLevelType=a;e.eventSystemFlags=d;e.nativeEvent=b;e.targetInst=c;return e}return{topLevelType:a,eventSystemFlags:d,nativeEvent:b,targetInst:c,ancestors:[]}}\nfunction sc(a){var b=a.targetInst,c=b;do{if(!c){a.ancestors.push(c);break}var d=c;if(3===d.tag)d=d.stateNode.containerInfo;else{for(;d.return;)d=d.return;d=3!==d.tag?null:d.stateNode.containerInfo}if(!d)break;b=c.tag;5!==b&&6!==b||a.ancestors.push(c);c=tc(d)}while(c);for(c=0;c=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=ud(c)}}\nfunction wd(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?wd(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function xd(){for(var a=window,b=td();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=td(a.document)}return b}\nfunction yd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}var zd=\"$\",Ad=\"/$\",Bd=\"$?\",Cd=\"$!\",Dd=null,Ed=null;function Fd(a,b){switch(a){case \"button\":case \"input\":case \"select\":case \"textarea\":return!!b.autoFocus}return!1}\nfunction Gd(a,b){return\"textarea\"===a||\"option\"===a||\"noscript\"===a||\"string\"===typeof b.children||\"number\"===typeof b.children||\"object\"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}var Hd=\"function\"===typeof setTimeout?setTimeout:void 0,Id=\"function\"===typeof clearTimeout?clearTimeout:void 0;function Jd(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}\nfunction Kd(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if(c===zd||c===Cd||c===Bd){if(0===b)return a;b--}else c===Ad&&b++}a=a.previousSibling}return null}var Ld=Math.random().toString(36).slice(2),Md=\"__reactInternalInstance$\"+Ld,Nd=\"__reactEventHandlers$\"+Ld,Od=\"__reactContainere$\"+Ld;\nfunction tc(a){var b=a[Md];if(b)return b;for(var c=a.parentNode;c;){if(b=c[Od]||c[Md]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=Kd(a);null!==a;){if(c=a[Md])return c;a=Kd(a)}return b}a=c;c=a.parentNode}return null}function Nc(a){a=a[Md]||a[Od];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function Pd(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(u(33));}function Qd(a){return a[Nd]||null}\nfunction Rd(a){do a=a.return;while(a&&5!==a.tag);return a?a:null}\nfunction Sd(a,b){var c=a.stateNode;if(!c)return null;var d=la(c);if(!d)return null;c=d[b];a:switch(b){case \"onClick\":case \"onClickCapture\":case \"onDoubleClick\":case \"onDoubleClickCapture\":case \"onMouseDown\":case \"onMouseDownCapture\":case \"onMouseMove\":case \"onMouseMoveCapture\":case \"onMouseUp\":case \"onMouseUpCapture\":case \"onMouseEnter\":(d=!d.disabled)||(a=a.type,d=!(\"button\"===a||\"input\"===a||\"select\"===a||\"textarea\"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&\"function\"!==typeof c)throw Error(u(231,\nb,typeof c));return c}function Td(a,b,c){if(b=Sd(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=ic(c._dispatchListeners,b),c._dispatchInstances=ic(c._dispatchInstances,a)}function Ud(a){if(a&&a.dispatchConfig.phasedRegistrationNames){for(var b=a._targetInst,c=[];b;)c.push(b),b=Rd(b);for(b=c.length;0this.eventPool.length&&this.eventPool.push(a)}function de(a){a.eventPool=[];a.getPooled=ee;a.release=fe}var ge=G.extend({data:null}),he=G.extend({data:null}),ie=[9,13,27,32],je=ya&&\"CompositionEvent\"in window,ke=null;ya&&\"documentMode\"in document&&(ke=document.documentMode);\nvar le=ya&&\"TextEvent\"in window&&!ke,me=ya&&(!je||ke&&8=ke),ne=String.fromCharCode(32),oe={beforeInput:{phasedRegistrationNames:{bubbled:\"onBeforeInput\",captured:\"onBeforeInputCapture\"},dependencies:[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]},compositionEnd:{phasedRegistrationNames:{bubbled:\"onCompositionEnd\",captured:\"onCompositionEndCapture\"},dependencies:\"blur compositionend keydown keypress keyup mousedown\".split(\" \")},compositionStart:{phasedRegistrationNames:{bubbled:\"onCompositionStart\",\ncaptured:\"onCompositionStartCapture\"},dependencies:\"blur compositionstart keydown keypress keyup mousedown\".split(\" \")},compositionUpdate:{phasedRegistrationNames:{bubbled:\"onCompositionUpdate\",captured:\"onCompositionUpdateCapture\"},dependencies:\"blur compositionupdate keydown keypress keyup mousedown\".split(\" \")}},pe=!1;\nfunction qe(a,b){switch(a){case \"keyup\":return-1!==ie.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"blur\":return!0;default:return!1}}function re(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var se=!1;function te(a,b){switch(a){case \"compositionend\":return re(b);case \"keypress\":if(32!==b.which)return null;pe=!0;return ne;case \"textInput\":return a=b.data,a===ne&&pe?null:a;default:return null}}\nfunction ue(a,b){if(se)return\"compositionend\"===a||!je&&qe(a,b)?(a=ae(),$d=Zd=Yd=null,se=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=document.documentMode,df={select:{phasedRegistrationNames:{bubbled:\"onSelect\",captured:\"onSelectCapture\"},dependencies:\"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange\".split(\" \")}},ef=null,ff=null,gf=null,hf=!1;\nfunction jf(a,b){var c=b.window===b?b.document:9===b.nodeType?b:b.ownerDocument;if(hf||null==ef||ef!==td(c))return null;c=ef;\"selectionStart\"in c&&yd(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset});return gf&&bf(gf,c)?null:(gf=c,a=G.getPooled(df.select,ff,a,b),a.type=\"select\",a.target=ef,Xd(a),a)}\nvar kf={eventTypes:df,extractEvents:function(a,b,c,d,e,f){e=f||(d.window===d?d.document:9===d.nodeType?d:d.ownerDocument);if(!(f=!e)){a:{e=cc(e);f=wa.onSelect;for(var g=0;gzf||(a.current=yf[zf],yf[zf]=null,zf--)}\nfunction I(a,b){zf++;yf[zf]=a.current;a.current=b}var Af={},J={current:Af},K={current:!1},Bf=Af;function Cf(a,b){var c=a.type.contextTypes;if(!c)return Af;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function L(a){a=a.childContextTypes;return null!==a&&void 0!==a}\nfunction Df(){H(K);H(J)}function Ef(a,b,c){if(J.current!==Af)throw Error(u(168));I(J,b);I(K,c)}function Ff(a,b,c){var d=a.stateNode;a=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(u(108,pb(b)||\"Unknown\",e));return n({},c,{},d)}function Gf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Af;Bf=J.current;I(J,a);I(K,K.current);return!0}\nfunction Hf(a,b,c){var d=a.stateNode;if(!d)throw Error(u(169));c?(a=Ff(a,b,Bf),d.__reactInternalMemoizedMergedChildContext=a,H(K),H(J),I(J,a)):H(K);I(K,c)}\nvar If=r.unstable_runWithPriority,Jf=r.unstable_scheduleCallback,Kf=r.unstable_cancelCallback,Lf=r.unstable_requestPaint,Mf=r.unstable_now,Nf=r.unstable_getCurrentPriorityLevel,Of=r.unstable_ImmediatePriority,Pf=r.unstable_UserBlockingPriority,Qf=r.unstable_NormalPriority,Rf=r.unstable_LowPriority,Sf=r.unstable_IdlePriority,Tf={},Uf=r.unstable_shouldYield,Vf=void 0!==Lf?Lf:function(){},Wf=null,Xf=null,Yf=!1,Zf=Mf(),$f=1E4>Zf?Mf:function(){return Mf()-Zf};\nfunction ag(){switch(Nf()){case Of:return 99;case Pf:return 98;case Qf:return 97;case Rf:return 96;case Sf:return 95;default:throw Error(u(332));}}function bg(a){switch(a){case 99:return Of;case 98:return Pf;case 97:return Qf;case 96:return Rf;case 95:return Sf;default:throw Error(u(332));}}function cg(a,b){a=bg(a);return If(a,b)}function dg(a,b,c){a=bg(a);return Jf(a,b,c)}function eg(a){null===Wf?(Wf=[a],Xf=Jf(Of,fg)):Wf.push(a);return Tf}function gg(){if(null!==Xf){var a=Xf;Xf=null;Kf(a)}fg()}\nfunction fg(){if(!Yf&&null!==Wf){Yf=!0;var a=0;try{var b=Wf;cg(99,function(){for(;a=b&&(rg=!0),a.firstContext=null)}\nfunction sg(a,b){if(mg!==a&&!1!==b&&0!==b){if(\"number\"!==typeof b||1073741823===b)mg=a,b=1073741823;b={context:a,observedBits:b,next:null};if(null===lg){if(null===kg)throw Error(u(308));lg=b;kg.dependencies={expirationTime:0,firstContext:b,responders:null}}else lg=lg.next=b}return a._currentValue}var tg=!1;function ug(a){a.updateQueue={baseState:a.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}\nfunction vg(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,baseQueue:a.baseQueue,shared:a.shared,effects:a.effects})}function wg(a,b){a={expirationTime:a,suspenseConfig:b,tag:0,payload:null,callback:null,next:null};return a.next=a}function xg(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}}\nfunction yg(a,b){var c=a.alternate;null!==c&&vg(c,a);a=a.updateQueue;c=a.baseQueue;null===c?(a.baseQueue=b.next=b,b.next=b):(b.next=c.next,c.next=b)}\nfunction zg(a,b,c,d){var e=a.updateQueue;tg=!1;var f=e.baseQueue,g=e.shared.pending;if(null!==g){if(null!==f){var h=f.next;f.next=g.next;g.next=h}f=g;e.shared.pending=null;h=a.alternate;null!==h&&(h=h.updateQueue,null!==h&&(h.baseQueue=g))}if(null!==f){h=f.next;var k=e.baseState,l=0,m=null,p=null,x=null;if(null!==h){var z=h;do{g=z.expirationTime;if(gl&&(l=g)}else{null!==x&&(x=x.next={expirationTime:1073741823,suspenseConfig:z.suspenseConfig,tag:z.tag,payload:z.payload,callback:z.callback,next:null});Ag(g,z.suspenseConfig);a:{var D=a,t=z;g=b;ca=c;switch(t.tag){case 1:D=t.payload;if(\"function\"===typeof D){k=D.call(ca,k,g);break a}k=D;break a;case 3:D.effectTag=D.effectTag&-4097|64;case 0:D=t.payload;g=\"function\"===typeof D?D.call(ca,k,g):D;if(null===g||void 0===g)break a;k=n({},k,g);break a;case 2:tg=!0}}null!==z.callback&&\n(a.effectTag|=32,g=e.effects,null===g?e.effects=[z]:g.push(z))}z=z.next;if(null===z||z===h)if(g=e.shared.pending,null===g)break;else z=f.next=g.next,g.next=h,e.baseQueue=f=g,e.shared.pending=null}while(1)}null===x?m=k:x.next=p;e.baseState=m;e.baseQueue=x;Bg(l);a.expirationTime=l;a.memoizedState=k}}\nfunction Cg(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;by?(A=m,m=null):A=m.sibling;var q=x(e,m,h[y],k);if(null===q){null===m&&(m=A);break}a&&\nm&&null===q.alternate&&b(e,m);g=f(q,g,y);null===t?l=q:t.sibling=q;t=q;m=A}if(y===h.length)return c(e,m),l;if(null===m){for(;yy?(A=t,t=null):A=t.sibling;var D=x(e,t,q.value,l);if(null===D){null===t&&(t=A);break}a&&t&&null===D.alternate&&b(e,t);g=f(D,g,y);null===m?k=D:m.sibling=D;m=D;t=A}if(q.done)return c(e,t),k;if(null===t){for(;!q.done;y++,q=h.next())q=p(e,q.value,l),null!==q&&(g=f(q,g,y),null===m?k=q:m.sibling=q,m=q);return k}for(t=d(e,t);!q.done;y++,q=h.next())q=z(t,e,y,q.value,l),null!==q&&(a&&null!==\nq.alternate&&t.delete(null===q.key?y:q.key),g=f(q,g,y),null===m?k=q:m.sibling=q,m=q);a&&t.forEach(function(a){return b(e,a)});return k}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ab&&null===f.key;k&&(f=f.props.children);var l=\"object\"===typeof f&&null!==f;if(l)switch(f.$$typeof){case Za:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ab){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,\nk.sibling);d=e(k,f.props);d.ref=Pg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===ab?(d=Wg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Ug(f.type,f.key,f.props,null,a.mode,h),h.ref=Pg(a,d,f),h.return=a,a=h)}return g(a);case $a:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=\nd.sibling}d=Vg(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Tg(f,a.mode,h),d.return=a,a=d),g(a);if(Og(f))return ca(a,d,f,h);if(nb(f))return D(a,d,f,h);l&&Qg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 1:case 0:throw a=a.type,Error(u(152,a.displayName||a.name||\"Component\"));}return c(a,d)}}var Xg=Rg(!0),Yg=Rg(!1),Zg={},$g={current:Zg},ah={current:Zg},bh={current:Zg};\nfunction ch(a){if(a===Zg)throw Error(u(174));return a}function dh(a,b){I(bh,b);I(ah,a);I($g,Zg);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Ob(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=Ob(b,a)}H($g);I($g,b)}function eh(){H($g);H(ah);H(bh)}function fh(a){ch(bh.current);var b=ch($g.current);var c=Ob(b,a.type);b!==c&&(I(ah,a),I($g,c))}function gh(a){ah.current===a&&(H($g),H(ah))}var M={current:0};\nfunction hh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||c.data===Bd||c.data===Cd))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.effectTag&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}function ih(a,b){return{responder:a,props:b}}\nvar jh=Wa.ReactCurrentDispatcher,kh=Wa.ReactCurrentBatchConfig,lh=0,N=null,O=null,P=null,mh=!1;function Q(){throw Error(u(321));}function nh(a,b){if(null===b)return!1;for(var c=0;cf))throw Error(u(301));f+=1;P=O=null;b.updateQueue=null;jh.current=rh;a=c(d,e)}while(b.expirationTime===lh)}jh.current=sh;b=null!==O&&null!==O.next;lh=0;P=O=N=null;mh=!1;if(b)throw Error(u(300));return a}\nfunction th(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===P?N.memoizedState=P=a:P=P.next=a;return P}function uh(){if(null===O){var a=N.alternate;a=null!==a?a.memoizedState:null}else a=O.next;var b=null===P?N.memoizedState:P.next;if(null!==b)P=b,O=a;else{if(null===a)throw Error(u(310));O=a;a={memoizedState:O.memoizedState,baseState:O.baseState,baseQueue:O.baseQueue,queue:O.queue,next:null};null===P?N.memoizedState=P=a:P=P.next=a}return P}\nfunction vh(a,b){return\"function\"===typeof b?b(a):b}\nfunction wh(a){var b=uh(),c=b.queue;if(null===c)throw Error(u(311));c.lastRenderedReducer=a;var d=O,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.expirationTime;if(lN.expirationTime&&\n(N.expirationTime=l,Bg(l))}else null!==h&&(h=h.next={expirationTime:1073741823,suspenseConfig:k.suspenseConfig,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),Ag(l,k.suspenseConfig),d=k.eagerReducer===a?k.eagerState:a(d,k.action);k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;$e(d,b.memoizedState)||(rg=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}\nfunction xh(a){var b=uh(),c=b.queue;if(null===c)throw Error(u(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);$e(f,b.memoizedState)||(rg=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}\nfunction yh(a){var b=th();\"function\"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:vh,lastRenderedState:a};a=a.dispatch=zh.bind(null,N,a);return[b.memoizedState,a]}function Ah(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=N.updateQueue;null===b?(b={lastEffect:null},N.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}\nfunction Bh(){return uh().memoizedState}function Ch(a,b,c,d){var e=th();N.effectTag|=a;e.memoizedState=Ah(1|b,c,void 0,void 0===d?null:d)}function Dh(a,b,c,d){var e=uh();d=void 0===d?null:d;var f=void 0;if(null!==O){var g=O.memoizedState;f=g.destroy;if(null!==d&&nh(d,g.deps)){Ah(b,c,f,d);return}}N.effectTag|=a;e.memoizedState=Ah(1|b,c,f,d)}function Eh(a,b){return Ch(516,4,a,b)}function Fh(a,b){return Dh(516,4,a,b)}function Gh(a,b){return Dh(4,2,a,b)}\nfunction Hh(a,b){if(\"function\"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function Ih(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Dh(4,2,Hh.bind(null,b,a),c)}function Jh(){}function Kh(a,b){th().memoizedState=[a,void 0===b?null:b];return a}function Lh(a,b){var c=uh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&nh(b,d[1]))return d[0];c.memoizedState=[a,b];return a}\nfunction Mh(a,b){var c=uh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&nh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}function Nh(a,b,c){var d=ag();cg(98>d?98:d,function(){a(!0)});cg(97\\x3c/script>\",a=a.removeChild(a.firstChild)):\"string\"===typeof d.is?a=g.createElement(e,{is:d.is}):(a=g.createElement(e),\"select\"===e&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,e);a[Md]=b;a[Nd]=d;ni(a,b,!1,!1);b.stateNode=a;g=pd(e,d);switch(e){case \"iframe\":case \"object\":case \"embed\":F(\"load\",\na);h=d;break;case \"video\":case \"audio\":for(h=0;hd.tailExpiration&&1b)&&tj.set(a,b)))}}\nfunction xj(a,b){a.expirationTimea?c:a;return 2>=a&&b!==a?0:a}\nfunction Z(a){if(0!==a.lastExpiredTime)a.callbackExpirationTime=1073741823,a.callbackPriority=99,a.callbackNode=eg(yj.bind(null,a));else{var b=zj(a),c=a.callbackNode;if(0===b)null!==c&&(a.callbackNode=null,a.callbackExpirationTime=0,a.callbackPriority=90);else{var d=Gg();1073741823===b?d=99:1===b||2===b?d=95:(d=10*(1073741821-b)-10*(1073741821-d),d=0>=d?99:250>=d?98:5250>=d?97:95);if(null!==c){var e=a.callbackPriority;if(a.callbackExpirationTime===b&&e>=d)return;c!==Tf&&Kf(c)}a.callbackExpirationTime=\nb;a.callbackPriority=d;b=1073741823===b?eg(yj.bind(null,a)):dg(d,Bj.bind(null,a),{timeout:10*(1073741821-b)-$f()});a.callbackNode=b}}}\nfunction Bj(a,b){wj=0;if(b)return b=Gg(),Cj(a,b),Z(a),null;var c=zj(a);if(0!==c){b=a.callbackNode;if((W&(fj|gj))!==V)throw Error(u(327));Dj();a===T&&c===U||Ej(a,c);if(null!==X){var d=W;W|=fj;var e=Fj();do try{Gj();break}catch(h){Hj(a,h)}while(1);ng();W=d;cj.current=e;if(S===hj)throw b=kj,Ej(a,c),xi(a,c),Z(a),b;if(null===X)switch(e=a.finishedWork=a.current.alternate,a.finishedExpirationTime=c,d=S,T=null,d){case ti:case hj:throw Error(u(345));case ij:Cj(a,2=c){a.lastPingedTime=c;Ej(a,c);break}}f=zj(a);if(0!==f&&f!==c)break;if(0!==d&&d!==c){a.lastPingedTime=d;break}a.timeoutHandle=Hd(Jj.bind(null,a),e);break}Jj(a);break;case vi:xi(a,c);d=a.lastSuspendedTime;c===d&&(a.nextKnownPendingLevel=Ij(e));if(oj&&(e=a.lastPingedTime,0===e||e>=c)){a.lastPingedTime=c;Ej(a,c);break}e=zj(a);if(0!==e&&e!==c)break;if(0!==d&&d!==c){a.lastPingedTime=\nd;break}1073741823!==mj?d=10*(1073741821-mj)-$f():1073741823===lj?d=0:(d=10*(1073741821-lj)-5E3,e=$f(),c=10*(1073741821-c)-e,d=e-d,0>d&&(d=0),d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*bj(d/1960))-d,c=d?d=0:(e=g.busyDelayMs|0,f=$f()-(10*(1073741821-f)-(g.timeoutMs|0||5E3)),d=f<=e?0:e+d-f);if(10 component higher in the tree to provide a loading indicator or placeholder to display.\"+qb(g))}S!==\njj&&(S=ij);h=Ai(h,g);p=f;do{switch(p.tag){case 3:k=h;p.effectTag|=4096;p.expirationTime=b;var B=Xi(p,k,b);yg(p,B);break a;case 1:k=h;var w=p.type,ub=p.stateNode;if(0===(p.effectTag&64)&&(\"function\"===typeof w.getDerivedStateFromError||null!==ub&&\"function\"===typeof ub.componentDidCatch&&(null===aj||!aj.has(ub)))){p.effectTag|=4096;p.expirationTime=b;var vb=$i(p,k,b);yg(p,vb);break a}}p=p.return}while(null!==p)}X=Pj(X)}catch(Xc){b=Xc;continue}break}while(1)}\nfunction Fj(){var a=cj.current;cj.current=sh;return null===a?sh:a}function Ag(a,b){awi&&(wi=a)}function Kj(){for(;null!==X;)X=Qj(X)}function Gj(){for(;null!==X&&!Uf();)X=Qj(X)}function Qj(a){var b=Rj(a.alternate,a,U);a.memoizedProps=a.pendingProps;null===b&&(b=Pj(a));dj.current=null;return b}\nfunction Pj(a){X=a;do{var b=X.alternate;a=X.return;if(0===(X.effectTag&2048)){b=si(b,X,U);if(1===U||1!==X.childExpirationTime){for(var c=0,d=X.child;null!==d;){var e=d.expirationTime,f=d.childExpirationTime;e>c&&(c=e);f>c&&(c=f);d=d.sibling}X.childExpirationTime=c}if(null!==b)return b;null!==a&&0===(a.effectTag&2048)&&(null===a.firstEffect&&(a.firstEffect=X.firstEffect),null!==X.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=X.firstEffect),a.lastEffect=X.lastEffect),1a?b:a}function Jj(a){var b=ag();cg(99,Sj.bind(null,a,b));return null}\nfunction Sj(a,b){do Dj();while(null!==rj);if((W&(fj|gj))!==V)throw Error(u(327));var c=a.finishedWork,d=a.finishedExpirationTime;if(null===c)return null;a.finishedWork=null;a.finishedExpirationTime=0;if(c===a.current)throw Error(u(177));a.callbackNode=null;a.callbackExpirationTime=0;a.callbackPriority=90;a.nextKnownPendingLevel=0;var e=Ij(c);a.firstPendingTime=e;d<=a.lastSuspendedTime?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:d<=a.firstSuspendedTime&&(a.firstSuspendedTime=\nd-1);d<=a.lastPingedTime&&(a.lastPingedTime=0);d<=a.lastExpiredTime&&(a.lastExpiredTime=0);a===T&&(X=T=null,U=0);1h&&(l=h,h=g,g=l),l=vd(q,g),m=vd(q,h),l&&m&&(1!==w.rangeCount||w.anchorNode!==l.node||w.anchorOffset!==l.offset||w.focusNode!==m.node||w.focusOffset!==m.offset)&&(B=B.createRange(),B.setStart(l.node,l.offset),w.removeAllRanges(),g>h?(w.addRange(B),w.extend(m.node,m.offset)):(B.setEnd(m.node,m.offset),w.addRange(B))))));B=[];for(w=q;w=w.parentNode;)1===w.nodeType&&B.push({element:w,left:w.scrollLeft,\ntop:w.scrollTop});\"function\"===typeof q.focus&&q.focus();for(q=0;q=c)return ji(a,b,c);I(M,M.current&1);b=$h(a,b,c);return null!==b?b.sibling:null}I(M,M.current&1);break;case 19:d=b.childExpirationTime>=c;if(0!==(a.effectTag&64)){if(d)return mi(a,b,c);b.effectTag|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null);I(M,M.current);if(!d)return null}return $h(a,b,c)}rg=!1}}else rg=!1;b.expirationTime=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;e=Cf(b,J.current);qg(b,c);e=oh(null,\nb,d,a,e,c);b.effectTag|=1;if(\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(L(d)){var f=!0;Gf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;ug(b);var g=d.getDerivedStateFromProps;\"function\"===typeof g&&Fg(b,d,g,a);e.updater=Jg;b.stateNode=e;e._reactInternalFiber=b;Ng(b,d,a,c);b=gi(null,b,d,!0,f,c)}else b.tag=0,R(null,b,e,c),b=b.child;return b;case 16:a:{e=b.elementType;null!==a&&(a.alternate=\nnull,b.alternate=null,b.effectTag|=2);a=b.pendingProps;ob(e);if(1!==e._status)throw e._result;e=e._result;b.type=e;f=b.tag=Xj(e);a=ig(e,a);switch(f){case 0:b=di(null,b,e,a,c);break a;case 1:b=fi(null,b,e,a,c);break a;case 11:b=Zh(null,b,e,a,c);break a;case 14:b=ai(null,b,e,ig(e.type,a),d,c);break a}throw Error(u(306,e,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),di(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),fi(a,b,d,e,c);\ncase 3:hi(b);d=b.updateQueue;if(null===a||null===d)throw Error(u(282));d=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;vg(a,b);zg(b,d,null,c);d=b.memoizedState.element;if(d===e)Xh(),b=$h(a,b,c);else{if(e=b.stateNode.hydrate)Ph=Jd(b.stateNode.containerInfo.firstChild),Oh=b,e=Qh=!0;if(e)for(c=Yg(b,null,d,c),b.child=c;c;)c.effectTag=c.effectTag&-3|1024,c=c.sibling;else R(a,b,d,c),Xh();b=b.child}return b;case 5:return fh(b),null===a&&Uh(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:\nnull,g=e.children,Gd(d,e)?g=null:null!==f&&Gd(d,f)&&(b.effectTag|=16),ei(a,b),b.mode&4&&1!==c&&e.hidden?(b.expirationTime=b.childExpirationTime=1,b=null):(R(a,b,g,c),b=b.child),b;case 6:return null===a&&Uh(b),null;case 13:return ji(a,b,c);case 4:return dh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Xg(b,null,d,c):R(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),Zh(a,b,d,e,c);case 7:return R(a,b,b.pendingProps,c),b.child;case 8:return R(a,\nb,b.pendingProps.children,c),b.child;case 12:return R(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;var h=b.type._context;I(jg,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=$e(h,f)?0:(\"function\"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0,0===f){if(g.children===e.children&&!K.current){b=$h(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==\nk){g=h.child;for(var l=k.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=wg(c,null),l.tag=2,xg(h,l));h.expirationTime=b&&a<=b}function xi(a,b){var c=a.firstSuspendedTime,d=a.lastSuspendedTime;cb||0===c)a.lastSuspendedTime=b;b<=a.lastPingedTime&&(a.lastPingedTime=0);b<=a.lastExpiredTime&&(a.lastExpiredTime=0)}\nfunction yi(a,b){b>a.firstPendingTime&&(a.firstPendingTime=b);var c=a.firstSuspendedTime;0!==c&&(b>=c?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:b>=a.lastSuspendedTime&&(a.lastSuspendedTime=b+1),b>a.nextKnownPendingLevel&&(a.nextKnownPendingLevel=b))}function Cj(a,b){var c=a.lastExpiredTime;if(0===c||c>b)a.lastExpiredTime=b}\nfunction bk(a,b,c,d){var e=b.current,f=Gg(),g=Dg.suspense;f=Hg(f,e,g);a:if(c){c=c._reactInternalFiber;b:{if(dc(c)!==c||1!==c.tag)throw Error(u(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(L(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(u(171));}if(1===c.tag){var k=c.type;if(L(k)){c=Ff(c,k,h);break a}}c=h}else c=Af;null===b.context?b.context=c:b.pendingContext=c;b=wg(f,g);b.payload={element:a};d=void 0===\nd?null:d;null!==d&&(b.callback=d);xg(e,b);Ig(e,f);return f}function ck(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function dk(a,b){a=a.memoizedState;null!==a&&null!==a.dehydrated&&a.retryTime=G};l=function(){};exports.unstable_forceFrameRate=function(a){0>a||125>>1,e=a[d];if(void 0!==e&&0K(n,c))void 0!==r&&0>K(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>K(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function K(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var N=[],O=[],P=1,Q=null,R=3,S=!1,T=!1,U=!1;\nfunction V(a){for(var b=L(O);null!==b;){if(null===b.callback)M(O);else if(b.startTime<=a)M(O),b.sortIndex=b.expirationTime,J(N,b);else break;b=L(O)}}function W(a){U=!1;V(a);if(!T)if(null!==L(N))T=!0,f(X);else{var b=L(O);null!==b&&g(W,b.startTime-a)}}\nfunction X(a,b){T=!1;U&&(U=!1,h());S=!0;var c=R;try{V(b);for(Q=L(N);null!==Q&&(!(Q.expirationTime>b)||a&&!k());){var d=Q.callback;if(null!==d){Q.callback=null;R=Q.priorityLevel;var e=d(Q.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?Q.callback=e:Q===L(N)&&M(N);V(b)}else M(N);Q=L(N)}if(null!==Q)var m=!0;else{var n=L(O);null!==n&&g(W,n.startTime-b);m=!1}return m}finally{Q=null,R=c,S=!1}}\nfunction Y(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}}var Z=l;exports.unstable_IdlePriority=5;exports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_continueExecution=function(){T||S||(T=!0,f(X))};\nexports.unstable_getCurrentPriorityLevel=function(){return R};exports.unstable_getFirstCallbackNode=function(){return L(N)};exports.unstable_next=function(a){switch(R){case 1:case 2:case 3:var b=3;break;default:b=R}var c=R;R=b;try{return a()}finally{R=c}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=Z;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=R;R=a;try{return b()}finally{R=c}};\nexports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();if(\"object\"===typeof c&&null!==c){var e=c.delay;e=\"number\"===typeof e&&0d?(a.sortIndex=e,J(O,a),null===L(N)&&a===L(O)&&(U?h():U=!0,g(W,e-d))):(a.sortIndex=c,J(N,a),T||S||(T=!0,f(X)));return a};\nexports.unstable_shouldYield=function(){var a=exports.unstable_now();V(a);var b=L(N);return b!==Q&&null!==Q&&null!==b&&null!==b.callback&&b.startTime<=a&&b.expirationTime= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n (typeof global !== \"undefined\" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n (typeof global !== \"undefined\" && global.clearImmediate) ||\n (this && this.clearImmediate);\n","(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a

5lI zTt)8IjfFrHXA_^#vbJ#U(kV40)cn7)DNBDEFHk{8#A)V2=7%q5_`piR@U+>> z8MaM|~Cwtj`mN2r7UYqxU($jt( z)}q3^uLbPoIc0m~cDDNCgZFU_{bE^Frmgwvy&UYISaQkl92^7--)D&e*x2|0!a^aY zq0>8GZkZJ(%zZ`Zk$bYw3<%;6j}H0*5TUksHDKOkw%+j|KzRNMJB~eNbgYS};dGb&4|F~)l~VoMsW z{OGOjWm|w>&tbmo_~*{p0-snYs-}zr#h^UJweXziyO!2|Sjm3ftQ`*Oy-mVt`uIBm z;YJ@G_{>fxZoP=zFlp^nag>UeX`I0mFh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