@tsparticles/plugin-polygon-mask 3.8.0 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -376,7 +376,7 @@ export class PolygonMaskInstance {
376
376
  clearTimeout(this.redrawTimeout);
377
377
  }
378
378
  const timeout = 250;
379
- this.redrawTimeout = window.setTimeout(() => {
379
+ this.redrawTimeout = setTimeout(() => {
380
380
  void (async () => {
381
381
  await this._initRawData(true);
382
382
  await container.particles.redraw();
package/browser/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./pathseg.js";
2
2
  import { PolygonMaskPlugin } from "./PolygonMaskPlugin.js";
3
3
  export async function loadPolygonMaskPlugin(engine, refresh = true) {
4
- engine.checkVersion("3.8.0");
4
+ engine.checkVersion("3.9.0");
5
5
  await engine.addPlugin(new PolygonMaskPlugin(engine), refresh);
6
6
  }
7
7
  export * from "./Enums/PolygonMaskInlineArrangement.js";
@@ -379,7 +379,7 @@ class PolygonMaskInstance {
379
379
  clearTimeout(this.redrawTimeout);
380
380
  }
381
381
  const timeout = 250;
382
- this.redrawTimeout = window.setTimeout(() => {
382
+ this.redrawTimeout = setTimeout(() => {
383
383
  void (async () => {
384
384
  await this._initRawData(true);
385
385
  await container.particles.redraw();
package/cjs/index.js CHANGED
@@ -18,7 +18,7 @@ exports.loadPolygonMaskPlugin = loadPolygonMaskPlugin;
18
18
  require("./pathseg.js");
19
19
  const PolygonMaskPlugin_js_1 = require("./PolygonMaskPlugin.js");
20
20
  async function loadPolygonMaskPlugin(engine, refresh = true) {
21
- engine.checkVersion("3.8.0");
21
+ engine.checkVersion("3.9.0");
22
22
  await engine.addPlugin(new PolygonMaskPlugin_js_1.PolygonMaskPlugin(engine), refresh);
23
23
  }
24
24
  __exportStar(require("./Enums/PolygonMaskInlineArrangement.js"), exports);
@@ -376,7 +376,7 @@ export class PolygonMaskInstance {
376
376
  clearTimeout(this.redrawTimeout);
377
377
  }
378
378
  const timeout = 250;
379
- this.redrawTimeout = window.setTimeout(() => {
379
+ this.redrawTimeout = setTimeout(() => {
380
380
  void (async () => {
381
381
  await this._initRawData(true);
382
382
  await container.particles.redraw();
package/esm/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./pathseg.js";
2
2
  import { PolygonMaskPlugin } from "./PolygonMaskPlugin.js";
3
3
  export async function loadPolygonMaskPlugin(engine, refresh = true) {
4
- engine.checkVersion("3.8.0");
4
+ engine.checkVersion("3.9.0");
5
5
  await engine.addPlugin(new PolygonMaskPlugin(engine), refresh);
6
6
  }
7
7
  export * from "./Enums/PolygonMaskInlineArrangement.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/plugin-polygon-mask",
3
- "version": "3.8.0",
3
+ "version": "3.9.0",
4
4
  "description": "tsParticles polygon mask plugin",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -88,7 +88,7 @@
88
88
  "./package.json": "./package.json"
89
89
  },
90
90
  "dependencies": {
91
- "@tsparticles/engine": "3.8.0"
91
+ "@tsparticles/engine": "3.9.0"
92
92
  },
93
93
  "publishConfig": {
94
94
  "access": "public"
package/report.html CHANGED
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="UTF-8"/>
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
6
- <title>@tsparticles/plugin-polygon-mask [23 Jan 2025 at 09:04]</title>
6
+ <title>@tsparticles/plugin-polygon-mask [1 Aug 2025 at 08:48]</title>
7
7
  <link rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAABrVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+O1foceMD///+J0/qK1Pr7/v8Xdr/9///W8P4UdL7L7P0Scr2r4Pyj3vwad8D5/f/2/f+55f3E6f34+/2H0/ojfMKpzOd0rNgQcb3F3O/j9f7c8v6g3Pz0/P/w+v/q+P7n9v6T1/uQ1vuE0vqLut/y+v+Z2fvt+f+15Pzv9fuc2/vR7v2V2Pvd6/bg9P7I6/285/2y4/yp3/zp8vk8i8kqgMT7/P31+fyv4vxGkcz6/P6/6P3j7vfS5PNnpNUxhcbO7f7F6v3O4vHK3/DA2u631Ouy0eqXweKJud5wqthfoNMMbLvY8f73+v2dxeR8sNtTmdDx9/zX6PSjyeaCtd1YnNGX2PuQveCGt95Nls42h8dLlM3F4vBtAAAAM3RSTlMAAyOx0/sKBvik8opWGBMOAe3l1snDm2E9LSb06eHcu5JpHbarfHZCN9CBb08zzkdNS0kYaptYAAAFV0lEQVRYw92X51/aYBDHHS2O2qqttVbrqNq9m+TJIAYIShBkWwqIiCgoWvfeq7Z2/s29hyQNyUcR7LveGwVyXy6XH8/9rqxglLfUPLxVduUor3h0rfp2TYvpivk37929TkG037hffoX0+peVtZQc1589rigVUdXS/ABSAyEmGIO/1XfvldSK8vs3OqB6u3m0nxmIrvgB0dj7rr7Y9IbuF68hnfFaiHA/sxqm0wciIG43P60qKv9WXWc1RXGh/mFESFABTSBi0sNAKzqet17eCtOb3kZIDwxEEU0oAIJGYxNBDhBND29e0rtXXbcpuPmED9IhEAAQ/AXEaF8EPmnrrKsv0LvWR3fg5sWDNAFZOgAgaKvZDogHNU9MFwnnYROkc56RD5CjAbQX9Ow4g7upCsvYu55aSI/Nj0H1akgKQEUM94dwK65hYRmFU9MIcH/fqJYOZYcnuJSU/waKDgTOEVaVKhwrTRP5XzgSpAITYzom7UvkhFX5VutmxeNnWDjjswTKTyfgluNDGbUpWissXhF3s7mlSml+czWkg3D0l1nNjGNjz3myOQOa1KM/jOS6ebdbAVTCi4gljHSFrviza7tOgRWcS0MOUX9zdNgag5w7rRqA44Lzw0hr1WqES36dFliSJFlh2rXIae3FFcDDgKdxrUIDePr8jGcSClV1u7A9xeN0ModY/pHMxmR1EzRh8TJiwqsHmKW0l4FCEZI+jHio+JdPPE9qwQtTRxku2D8sIeRL2LnxWSllANCQGOIiqVHAz2ye2JR0DcH+HoxDkaADLjgxjKQ+AwCX/g0+DNgdG0ukYCONAe+dbc2IAc6fwt1ARoDSezNHxV2Cmzwv3O6lDMV55edBGwGK9n1+x2F8EDfAGCxug8MhpsMEcTEAWf3rx2vZhe/LAmtIn/6apE6PN0ULKgywD9mmdxbmFl3OvD5AS5fW5zLbv/YHmcsBTjf/afDz3MaZTVCfAP9z6/Bw6ycv8EUBWJIn9zYcoAWWlW9+OzO3vkTy8H+RANLmdrpOuYWdZYEXpo+TlCJrW5EARb7fF+bWdqf3hhyZI1nWJQHgznErZhbjoEsWqi8dQNoE294aldzFurwSABL2XXMf9+H1VQGke9exw5P/AnA5Pv5ngMul7LOvO922iwACu8WkCwLCafvM4CeWPxfA8lNHcWZSoi8EwMAIciKX2Z4SWCMAa3snCZ/G4EA8D6CMLNFsGQhkkz/gQNEBbPCbWsxGUpYVu3z8IyNAknwJkfPMEhLyrdi5RTyUVACkw4GSFRNWJNEW+fgPGwHD8/JxnRuLabN4CGNRkAE23na2+VmEAUmrYymSGjMAYqH84YUIyzgzs3XC7gNgH36Vcc4zKY9o9fgPBXUAiHHwVboBHGLiX6Zcjp1f2wu4tvzZKo0ecPnDtQYDQvJXaBeNzce45Fp28ZQLrEZVuFqgBwOalArKXnW1UzlnSusQKJqKYNuz4tOnI6sZG4zanpemv+7ySU2jbA9h6uhcgpfy6G2PahirDZ6zvq6zDduMVFTKvzw8wgyEdelwY9in3XkEPs3osJuwRQ4qTkfzifndg9Gfc4pdsu82+tTnHZTBa2EAMrqr2t43pguc8tNm7JQVQ2S0ukj2d22dhXYP0/veWtwKrCkNoNimAN5+Xr/oLrxswKbVJjteWrX7eR63o4j9q0GxnaBdWgGA5VStpanIjQmEhV0/nVt5VOFUvix6awJhPcAaTEShgrG+iGyvb5a0Ndb1YGHFPEwoqAinoaykaID1o1pdPNu7XsnCKQ3R+hwWIIhGvORcJUBYXe3Xa3vq/mF/N9V13ugufMkfXn+KHsRD0B8AAAAASUVORK5CYII=" type="image/x-icon" />
8
8
 
9
9
  <script>
@@ -4,7 +4,7 @@
4
4
  * Demo / Generator : https://particles.js.org/
5
5
  * GitHub : https://www.github.com/matteobruni/tsparticles
6
6
  * How to use? : Check the GitHub README
7
- * v3.8.0
7
+ * v3.9.0
8
8
  */
9
9
  /*
10
10
  * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
@@ -34,7 +34,7 @@ return /******/ (() => { // webpackBootstrap
34
34
  \************************************************************/
35
35
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
36
36
 
37
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskInlineArrangement: () => (/* binding */ PolygonMaskInlineArrangement)\n/* harmony export */ });\nvar PolygonMaskInlineArrangement;\n(function (PolygonMaskInlineArrangement) {\n PolygonMaskInlineArrangement[\"equidistant\"] = \"equidistant\";\n PolygonMaskInlineArrangement[\"onePerPoint\"] = \"one-per-point\";\n PolygonMaskInlineArrangement[\"perPoint\"] = \"per-point\";\n PolygonMaskInlineArrangement[\"randomLength\"] = \"random-length\";\n PolygonMaskInlineArrangement[\"randomPoint\"] = \"random-point\";\n})(PolygonMaskInlineArrangement || (PolygonMaskInlineArrangement = {}));\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/Enums/PolygonMaskInlineArrangement.js?");
37
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskInlineArrangement: () => (/* binding */ PolygonMaskInlineArrangement)\n/* harmony export */ });\nvar PolygonMaskInlineArrangement;\n(function (PolygonMaskInlineArrangement) {\n PolygonMaskInlineArrangement[\"equidistant\"] = \"equidistant\";\n PolygonMaskInlineArrangement[\"onePerPoint\"] = \"one-per-point\";\n PolygonMaskInlineArrangement[\"perPoint\"] = \"per-point\";\n PolygonMaskInlineArrangement[\"randomLength\"] = \"random-length\";\n PolygonMaskInlineArrangement[\"randomPoint\"] = \"random-point\";\n})(PolygonMaskInlineArrangement || (PolygonMaskInlineArrangement = {}));\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/Enums/PolygonMaskInlineArrangement.js?\n}");
38
38
 
39
39
  /***/ }),
40
40
 
@@ -44,7 +44,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
44
44
  \***************************************************/
45
45
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
46
46
 
47
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskMoveType: () => (/* binding */ PolygonMaskMoveType)\n/* harmony export */ });\nvar PolygonMaskMoveType;\n(function (PolygonMaskMoveType) {\n PolygonMaskMoveType[\"path\"] = \"path\";\n PolygonMaskMoveType[\"radius\"] = \"radius\";\n})(PolygonMaskMoveType || (PolygonMaskMoveType = {}));\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/Enums/PolygonMaskMoveType.js?");
47
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskMoveType: () => (/* binding */ PolygonMaskMoveType)\n/* harmony export */ });\nvar PolygonMaskMoveType;\n(function (PolygonMaskMoveType) {\n PolygonMaskMoveType[\"path\"] = \"path\";\n PolygonMaskMoveType[\"radius\"] = \"radius\";\n})(PolygonMaskMoveType || (PolygonMaskMoveType = {}));\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/Enums/PolygonMaskMoveType.js?\n}");
48
48
 
49
49
  /***/ }),
50
50
 
@@ -54,7 +54,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
54
54
  \***********************************************/
55
55
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
56
56
 
57
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskType: () => (/* binding */ PolygonMaskType)\n/* harmony export */ });\nvar PolygonMaskType;\n(function (PolygonMaskType) {\n PolygonMaskType[\"inline\"] = \"inline\";\n PolygonMaskType[\"inside\"] = \"inside\";\n PolygonMaskType[\"outside\"] = \"outside\";\n PolygonMaskType[\"none\"] = \"none\";\n})(PolygonMaskType || (PolygonMaskType = {}));\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/Enums/PolygonMaskType.js?");
57
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskType: () => (/* binding */ PolygonMaskType)\n/* harmony export */ });\nvar PolygonMaskType;\n(function (PolygonMaskType) {\n PolygonMaskType[\"inline\"] = \"inline\";\n PolygonMaskType[\"inside\"] = \"inside\";\n PolygonMaskType[\"outside\"] = \"outside\";\n PolygonMaskType[\"none\"] = \"none\";\n})(PolygonMaskType || (PolygonMaskType = {}));\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/Enums/PolygonMaskType.js?\n}");
58
58
 
59
59
  /***/ }),
60
60
 
@@ -64,7 +64,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
64
64
  \*****************************************************/
65
65
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
66
66
 
67
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMask: () => (/* binding */ PolygonMask)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _PolygonMaskDraw_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PolygonMaskDraw.js */ \"./dist/browser/Options/Classes/PolygonMaskDraw.js\");\n/* harmony import */ var _PolygonMaskInline_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PolygonMaskInline.js */ \"./dist/browser/Options/Classes/PolygonMaskInline.js\");\n/* harmony import */ var _PolygonMaskLocalSvg_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./PolygonMaskLocalSvg.js */ \"./dist/browser/Options/Classes/PolygonMaskLocalSvg.js\");\n/* harmony import */ var _PolygonMaskMove_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PolygonMaskMove.js */ \"./dist/browser/Options/Classes/PolygonMaskMove.js\");\n/* harmony import */ var _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Enums/PolygonMaskType.js */ \"./dist/browser/Enums/PolygonMaskType.js\");\n\n\n\n\n\n\nclass PolygonMask {\n constructor(engine) {\n this.draw = new _PolygonMaskDraw_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskDraw(engine);\n this.enable = false;\n this.inline = new _PolygonMaskInline_js__WEBPACK_IMPORTED_MODULE_2__.PolygonMaskInline();\n this.move = new _PolygonMaskMove_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskMove();\n this.scale = 1;\n this.type = _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_4__.PolygonMaskType.none;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n this.draw.load(data.draw);\n this.inline.load(data.inline);\n this.move.load(data.move);\n if (data.scale !== undefined) {\n this.scale = data.scale;\n }\n if (data.type !== undefined) {\n this.type = data.type;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n } else {\n this.enable = this.type !== _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_4__.PolygonMaskType.none;\n }\n if (data.url !== undefined) {\n this.url = data.url;\n }\n if (data.data !== undefined) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isString)(data.data)) {\n this.data = data.data;\n } else {\n this.data = new _PolygonMaskLocalSvg_js__WEBPACK_IMPORTED_MODULE_5__.PolygonMaskLocalSvg();\n this.data.load(data.data);\n }\n }\n if (data.position !== undefined) {\n this.position = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.deepExtend)({}, data.position);\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/Options/Classes/PolygonMask.js?");
67
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMask: () => (/* binding */ PolygonMask)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _PolygonMaskDraw_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PolygonMaskDraw.js */ \"./dist/browser/Options/Classes/PolygonMaskDraw.js\");\n/* harmony import */ var _PolygonMaskInline_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PolygonMaskInline.js */ \"./dist/browser/Options/Classes/PolygonMaskInline.js\");\n/* harmony import */ var _PolygonMaskLocalSvg_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PolygonMaskLocalSvg.js */ \"./dist/browser/Options/Classes/PolygonMaskLocalSvg.js\");\n/* harmony import */ var _PolygonMaskMove_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./PolygonMaskMove.js */ \"./dist/browser/Options/Classes/PolygonMaskMove.js\");\n/* harmony import */ var _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Enums/PolygonMaskType.js */ \"./dist/browser/Enums/PolygonMaskType.js\");\n\n\n\n\n\n\nclass PolygonMask {\n constructor(engine) {\n this.draw = new _PolygonMaskDraw_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskDraw(engine);\n this.enable = false;\n this.inline = new _PolygonMaskInline_js__WEBPACK_IMPORTED_MODULE_2__.PolygonMaskInline();\n this.move = new _PolygonMaskMove_js__WEBPACK_IMPORTED_MODULE_4__.PolygonMaskMove();\n this.scale = 1;\n this.type = _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_5__.PolygonMaskType.none;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n this.draw.load(data.draw);\n this.inline.load(data.inline);\n this.move.load(data.move);\n if (data.scale !== undefined) {\n this.scale = data.scale;\n }\n if (data.type !== undefined) {\n this.type = data.type;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n } else {\n this.enable = this.type !== _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_5__.PolygonMaskType.none;\n }\n if (data.url !== undefined) {\n this.url = data.url;\n }\n if (data.data !== undefined) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isString)(data.data)) {\n this.data = data.data;\n } else {\n this.data = new _PolygonMaskLocalSvg_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskLocalSvg();\n this.data.load(data.data);\n }\n }\n if (data.position !== undefined) {\n this.position = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.deepExtend)({}, data.position);\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/Options/Classes/PolygonMask.js?\n}");
68
68
 
69
69
  /***/ }),
70
70
 
@@ -74,7 +74,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
74
74
  \*********************************************************/
75
75
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
76
76
 
77
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskDraw: () => (/* binding */ PolygonMaskDraw)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _PolygonMaskDrawStroke_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PolygonMaskDrawStroke.js */ \"./dist/browser/Options/Classes/PolygonMaskDrawStroke.js\");\n\n\nclass PolygonMaskDraw {\n constructor(engine) {\n this.enable = false;\n this.stroke = new _PolygonMaskDrawStroke_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskDrawStroke(engine);\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n const stroke = data.stroke;\n this.stroke.load(stroke);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/Options/Classes/PolygonMaskDraw.js?");
77
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskDraw: () => (/* binding */ PolygonMaskDraw)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _PolygonMaskDrawStroke_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PolygonMaskDrawStroke.js */ \"./dist/browser/Options/Classes/PolygonMaskDrawStroke.js\");\n\n\nclass PolygonMaskDraw {\n constructor(engine) {\n this.enable = false;\n this.stroke = new _PolygonMaskDrawStroke_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskDrawStroke(engine);\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n const stroke = data.stroke;\n this.stroke.load(stroke);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/Options/Classes/PolygonMaskDraw.js?\n}");
78
78
 
79
79
  /***/ }),
80
80
 
@@ -84,7 +84,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
84
84
  \***************************************************************/
85
85
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
86
86
 
87
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskDrawStroke: () => (/* binding */ PolygonMaskDrawStroke)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nclass PolygonMaskDrawStroke {\n constructor(engine) {\n this._engine = engine;\n this.color = new _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OptionsColor();\n this.width = 0.5;\n this.opacity = 1;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n this.color = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OptionsColor.create(this.color, data.color);\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isString)(this.color.value)) {\n this.opacity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.stringToAlpha)(this._engine, this.color.value) ?? this.opacity;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n if (data.width !== undefined) {\n this.width = data.width;\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/Options/Classes/PolygonMaskDrawStroke.js?");
87
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskDrawStroke: () => (/* binding */ PolygonMaskDrawStroke)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nclass PolygonMaskDrawStroke {\n constructor(engine) {\n this._engine = engine;\n this.color = new _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OptionsColor();\n this.width = 0.5;\n this.opacity = 1;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n this.color = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OptionsColor.create(this.color, data.color);\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isString)(this.color.value)) {\n this.opacity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.stringToAlpha)(this._engine, this.color.value) ?? this.opacity;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n if (data.width !== undefined) {\n this.width = data.width;\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/Options/Classes/PolygonMaskDrawStroke.js?\n}");
88
88
 
89
89
  /***/ }),
90
90
 
@@ -94,7 +94,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
94
94
  \***********************************************************/
95
95
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
96
96
 
97
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskInline: () => (/* binding */ PolygonMaskInline)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Enums/PolygonMaskInlineArrangement.js */ \"./dist/browser/Enums/PolygonMaskInlineArrangement.js\");\n\n\nclass PolygonMaskInline {\n constructor() {\n this.arrangement = _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskInlineArrangement.onePerPoint;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.arrangement !== undefined) {\n this.arrangement = data.arrangement;\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/Options/Classes/PolygonMaskInline.js?");
97
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskInline: () => (/* binding */ PolygonMaskInline)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Enums/PolygonMaskInlineArrangement.js */ \"./dist/browser/Enums/PolygonMaskInlineArrangement.js\");\n\n\nclass PolygonMaskInline {\n constructor() {\n this.arrangement = _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskInlineArrangement.onePerPoint;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.arrangement !== undefined) {\n this.arrangement = data.arrangement;\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/Options/Classes/PolygonMaskInline.js?\n}");
98
98
 
99
99
  /***/ }),
100
100
 
@@ -104,7 +104,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
104
104
  \*************************************************************/
105
105
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
106
106
 
107
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskLocalSvg: () => (/* binding */ PolygonMaskLocalSvg)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nclass PolygonMaskLocalSvg {\n constructor() {\n this.path = [];\n this.size = {\n height: 0,\n width: 0\n };\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.path !== undefined) {\n this.path = data.path;\n }\n if (data.size !== undefined) {\n if (data.size.width !== undefined) {\n this.size.width = data.size.width;\n }\n if (data.size.height !== undefined) {\n this.size.height = data.size.height;\n }\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/Options/Classes/PolygonMaskLocalSvg.js?");
107
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskLocalSvg: () => (/* binding */ PolygonMaskLocalSvg)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nclass PolygonMaskLocalSvg {\n constructor() {\n this.path = [];\n this.size = {\n height: 0,\n width: 0\n };\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.path !== undefined) {\n this.path = data.path;\n }\n if (data.size !== undefined) {\n if (data.size.width !== undefined) {\n this.size.width = data.size.width;\n }\n if (data.size.height !== undefined) {\n this.size.height = data.size.height;\n }\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/Options/Classes/PolygonMaskLocalSvg.js?\n}");
108
108
 
109
109
  /***/ }),
110
110
 
@@ -114,7 +114,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
114
114
  \*********************************************************/
115
115
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
116
116
 
117
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskMove: () => (/* binding */ PolygonMaskMove)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Enums_PolygonMaskMoveType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Enums/PolygonMaskMoveType.js */ \"./dist/browser/Enums/PolygonMaskMoveType.js\");\n\n\nclass PolygonMaskMove {\n constructor() {\n this.radius = 10;\n this.type = _Enums_PolygonMaskMoveType_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskMoveType.path;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.radius !== undefined) {\n this.radius = data.radius;\n }\n if (data.type !== undefined) {\n this.type = data.type;\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/Options/Classes/PolygonMaskMove.js?");
117
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskMove: () => (/* binding */ PolygonMaskMove)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Enums_PolygonMaskMoveType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Enums/PolygonMaskMoveType.js */ \"./dist/browser/Enums/PolygonMaskMoveType.js\");\n\n\nclass PolygonMaskMove {\n constructor() {\n this.radius = 10;\n this.type = _Enums_PolygonMaskMoveType_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskMoveType.path;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.radius !== undefined) {\n this.radius = data.radius;\n }\n if (data.type !== undefined) {\n this.type = data.type;\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/Options/Classes/PolygonMaskMove.js?\n}");
118
118
 
119
119
  /***/ }),
120
120
 
@@ -124,7 +124,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
124
124
  \*********************************************/
125
125
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
126
126
 
127
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskInstance: () => (/* binding */ PolygonMaskInstance)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils.js */ \"./dist/browser/utils.js\");\n/* harmony import */ var _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Enums/PolygonMaskInlineArrangement.js */ \"./dist/browser/Enums/PolygonMaskInlineArrangement.js\");\n/* harmony import */ var _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Enums/PolygonMaskType.js */ \"./dist/browser/Enums/PolygonMaskType.js\");\n\n\n\n\nconst noPolygonDataLoaded = `${_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.errorPrefix} No polygon data loaded.`,\n noPolygonFound = `${_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.errorPrefix} No polygon found, you need to specify SVG url in config.`,\n origin = {\n x: 0,\n y: 0\n },\n half = 0.5,\n double = 2;\nclass PolygonMaskInstance {\n constructor(container, engine) {\n this._checkInsidePolygon = position => {\n const container = this._container,\n options = container.actualOptions.polygon;\n if (!options?.enable || options.type === _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskType.none || options.type === _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskType.inline) {\n return true;\n }\n if (!this.raw) {\n throw new Error(noPolygonFound);\n }\n const canvasSize = container.canvas.size,\n x = position?.x ?? (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * canvasSize.width,\n y = position?.y ?? (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * canvasSize.height,\n indexOffset = 1;\n let inside = false;\n for (let i = 0, j = this.raw.length - indexOffset; i < this.raw.length; j = i++) {\n const pi = this.raw[i],\n pj = this.raw[j],\n intersect = pi.y > y !== pj.y > y && x < (pj.x - pi.x) * (y - pi.y) / (pj.y - pi.y) + pi.x;\n if (intersect) {\n inside = !inside;\n }\n }\n if (options.type === _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskType.inside) {\n return inside;\n } else {\n return options.type === _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskType.outside ? !inside : false;\n }\n };\n this._createPath2D = () => {\n const container = this._container,\n options = container.actualOptions.polygon;\n if (!options || !this.paths?.length) {\n return;\n }\n for (const path of this.paths) {\n const pathData = path.element?.getAttribute(\"d\");\n if (pathData) {\n const path2d = new Path2D(pathData),\n matrix = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\").createSVGMatrix(),\n finalPath = new Path2D(),\n transform = matrix.scale(this._scale);\n if (finalPath.addPath) {\n finalPath.addPath(path2d, transform);\n path.path2d = finalPath;\n } else {\n delete path.path2d;\n }\n } else {\n delete path.path2d;\n }\n if (path.path2d ?? !this.raw) {\n continue;\n }\n path.path2d = new Path2D();\n const firstIndex = 0,\n firstPoint = this.raw[firstIndex];\n path.path2d.moveTo(firstPoint.x, firstPoint.y);\n this.raw.forEach((pos, i) => {\n if (i > firstIndex) {\n path.path2d?.lineTo(pos.x, pos.y);\n }\n });\n path.path2d.closePath();\n }\n };\n this._downloadSvgPath = async (svgUrl, force) => {\n const options = this._container.actualOptions.polygon;\n if (!options) {\n return;\n }\n const url = svgUrl ?? options.url,\n forceDownload = force ?? false;\n if (!url || this.paths !== undefined && !forceDownload) {\n return this.raw;\n }\n const req = await fetch(url);\n if (!req.ok) {\n throw new Error(`${_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.errorPrefix} occurred during polygon mask download`);\n }\n return this._parseSvgPath(await req.text(), force);\n };\n this._drawPoints = () => {\n if (!this.raw) {\n return;\n }\n for (const item of this.raw) {\n void this._container.particles.addParticle({\n x: item.x,\n y: item.y\n });\n }\n };\n this._getEquidistantPointByIndex = index => {\n const container = this._container,\n options = container.actualOptions,\n polygonMaskOptions = options.polygon;\n if (!polygonMaskOptions) {\n return;\n }\n if (!this.raw?.length || !this.paths?.length) {\n throw new Error(noPolygonDataLoaded);\n }\n let offset = 0,\n point;\n const baseAccumulator = 0,\n totalLength = this.paths.reduce((tot, path) => tot + path.length, baseAccumulator),\n distance = totalLength / options.particles.number.value;\n for (const path of this.paths) {\n const pathDistance = distance * index - offset;\n if (pathDistance <= path.length) {\n point = path.element.getPointAtLength(pathDistance);\n break;\n } else {\n offset += path.length;\n }\n }\n const scale = this._scale;\n return {\n x: (point?.x ?? origin.x) * scale + (this.offset?.x ?? origin.x),\n y: (point?.y ?? origin.y) * scale + (this.offset?.y ?? origin.y)\n };\n };\n this._getPointByIndex = index => {\n if (!this.raw?.length) {\n throw new Error(noPolygonDataLoaded);\n }\n const coords = this.raw[index % this.raw.length];\n return {\n x: coords.x,\n y: coords.y\n };\n };\n this._getRandomPoint = () => {\n if (!this.raw?.length) {\n throw new Error(noPolygonDataLoaded);\n }\n const coords = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.itemFromArray)(this.raw);\n return {\n x: coords.x,\n y: coords.y\n };\n };\n this._getRandomPointByLength = () => {\n const container = this._container,\n options = container.actualOptions.polygon;\n if (!options) {\n return;\n }\n if (!this.raw?.length || !this.paths?.length) {\n throw new Error(noPolygonDataLoaded);\n }\n const path = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.itemFromArray)(this.paths),\n offset = 1,\n distance = Math.floor((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * path.length) + offset,\n point = path.element.getPointAtLength(distance),\n scale = this._scale;\n return {\n x: point.x * scale + (this.offset?.x ?? origin.x),\n y: point.y * scale + (this.offset?.y ?? origin.y)\n };\n };\n this._initRawData = async force => {\n const options = this._container.actualOptions.polygon;\n if (!options) {\n return;\n }\n if (options.url) {\n this.raw = await this._downloadSvgPath(options.url, force);\n } else if (options.data) {\n const data = options.data;\n let svg;\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isString)(data)) {\n svg = data;\n } else {\n const getPath = p => `<path d=\"${p}\" />`,\n path = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isArray)(data.path) ? data.path.map(getPath).join(\"\") : getPath(data.path);\n const namespaces = 'xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"';\n svg = `<svg ${namespaces} width=\"${data.size.width}\" height=\"${data.size.height}\">${path}</svg>`;\n }\n this.raw = this._parseSvgPath(svg, force);\n }\n this._createPath2D();\n this._engine.dispatchEvent(\"polygonMaskLoaded\", {\n container: this._container\n });\n };\n this._parseSvgPath = (xml, force) => {\n const forceDownload = force ?? false;\n if (this.paths !== undefined && !forceDownload) {\n return this.raw;\n }\n const container = this._container,\n options = container.actualOptions.polygon;\n if (!options) {\n return;\n }\n const parser = new DOMParser(),\n doc = parser.parseFromString(xml, \"image/svg+xml\"),\n firstIndex = 0,\n svg = doc.getElementsByTagName(\"svg\")[firstIndex];\n let svgPaths = svg.getElementsByTagName(\"path\");\n if (!svgPaths.length) {\n svgPaths = doc.getElementsByTagName(\"path\");\n }\n this.paths = [];\n for (let i = 0; i < svgPaths.length; i++) {\n const path = svgPaths.item(i);\n if (path) {\n this.paths.push({\n element: path,\n length: path.getTotalLength()\n });\n }\n }\n const scale = this._scale;\n this.dimension.width = parseFloat(svg.getAttribute(\"width\") ?? \"0\") * scale;\n this.dimension.height = parseFloat(svg.getAttribute(\"height\") ?? \"0\") * scale;\n const position = options.position ?? {\n x: 50,\n y: 50\n },\n canvasSize = container.canvas.size;\n this.offset = {\n x: canvasSize.width * position.x / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator - this.dimension.width * half,\n y: canvasSize.height * position.y / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator - this.dimension.height * half\n };\n return (0,_utils_js__WEBPACK_IMPORTED_MODULE_2__.parsePaths)(this.paths, scale, this.offset);\n };\n this._polygonBounce = (particle, delta, direction) => {\n const options = this._container.actualOptions.polygon;\n if (!this.raw || !options?.enable || direction !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.top) {\n return false;\n }\n if (options.type === _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskType.inside || options.type === _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskType.outside) {\n let closest, dx, dy;\n const pos = particle.getPosition(),\n radius = particle.getRadius(),\n offset = 1;\n for (let i = 0, j = this.raw.length - offset; i < this.raw.length; j = i++) {\n const pi = this.raw[i],\n pj = this.raw[j];\n closest = (0,_utils_js__WEBPACK_IMPORTED_MODULE_2__.calcClosestPointOnSegment)(pi, pj, pos);\n const dist = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(pos, closest);\n [dx, dy] = [dist.dx, dist.dy];\n if (dist.distance < radius) {\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_2__.segmentBounce)(pi, pj, particle.velocity);\n return true;\n }\n }\n if (closest && dx !== undefined && dy !== undefined && !this._checkInsidePolygon(pos)) {\n const factor = {\n x: 1,\n y: 1\n },\n diameter = radius * double,\n inverse = -1;\n if (pos.x >= closest.x) {\n factor.x = -1;\n }\n if (pos.y >= closest.y) {\n factor.y = -1;\n }\n particle.position.x = closest.x + diameter * factor.x;\n particle.position.y = closest.y + diameter * factor.y;\n particle.velocity.mult(inverse);\n return true;\n }\n } else if (options.type === _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskType.inline && particle.initialPosition) {\n const dist = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistance)(particle.initialPosition, particle.getPosition()),\n {\n velocity\n } = particle;\n if (dist > this._moveRadius) {\n velocity.x = velocity.y * half - velocity.x;\n velocity.y = velocity.x * half - velocity.y;\n return true;\n }\n }\n return false;\n };\n this._randomPoint = () => {\n const container = this._container,\n options = container.actualOptions.polygon;\n if (!options) {\n return;\n }\n let position;\n if (options.type === _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskType.inline) {\n switch (options.inline.arrangement) {\n case _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskInlineArrangement.randomPoint:\n position = this._getRandomPoint();\n break;\n case _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskInlineArrangement.randomLength:\n position = this._getRandomPointByLength();\n break;\n case _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskInlineArrangement.equidistant:\n position = this._getEquidistantPointByIndex(container.particles.count);\n break;\n case _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskInlineArrangement.onePerPoint:\n case _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskInlineArrangement.perPoint:\n default:\n position = this._getPointByIndex(container.particles.count);\n }\n } else {\n const canvasSize = container.canvas.size;\n position = {\n x: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * canvasSize.width,\n y: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * canvasSize.height\n };\n }\n if (this._checkInsidePolygon(position)) {\n return position;\n } else {\n return this._randomPoint();\n }\n };\n this._container = container;\n this._engine = engine;\n this.dimension = {\n height: 0,\n width: 0\n };\n this._moveRadius = 0;\n this._scale = 1;\n }\n clickPositionValid(position) {\n const options = this._container.actualOptions.polygon;\n return !!options?.enable && options.type !== _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskType.none && options.type !== _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskType.inline && this._checkInsidePolygon(position);\n }\n draw(context) {\n if (!this.paths?.length) {\n return;\n }\n const options = this._container.actualOptions.polygon;\n if (!options?.enable) {\n return;\n }\n const polygonDraw = options.draw;\n if (!polygonDraw.enable) {\n return;\n }\n const rawData = this.raw;\n for (const path of this.paths) {\n const path2d = path.path2d;\n if (!context) {\n continue;\n }\n if (path2d && this.offset) {\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_2__.drawPolygonMaskPath)(this._engine, context, path2d, polygonDraw.stroke, this.offset);\n } else if (rawData) {\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_2__.drawPolygonMask)(this._engine, context, rawData, polygonDraw.stroke);\n }\n }\n }\n async init() {\n const container = this._container,\n polygonMaskOptions = container.actualOptions.polygon,\n pxRatio = container.retina.pixelRatio;\n if (!polygonMaskOptions) {\n return;\n }\n this._moveRadius = polygonMaskOptions.move.radius * pxRatio;\n this._scale = polygonMaskOptions.scale * pxRatio;\n if (polygonMaskOptions.enable) {\n await this._initRawData();\n }\n }\n particleBounce(particle, delta, direction) {\n return this._polygonBounce(particle, delta, direction);\n }\n particlePosition(position) {\n const options = this._container.actualOptions.polygon,\n defaultLength = 0;\n if (!(options?.enable && (this.raw?.length ?? defaultLength) > defaultLength)) {\n return;\n }\n return (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.deepExtend)({}, position ? position : this._randomPoint());\n }\n particlesInitialization() {\n const options = this._container.actualOptions.polygon;\n if (options?.enable && options.type === _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskType.inline && (options.inline.arrangement === _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskInlineArrangement.onePerPoint || options.inline.arrangement === _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskInlineArrangement.perPoint)) {\n this._drawPoints();\n return true;\n }\n return false;\n }\n resize() {\n const container = this._container,\n options = container.actualOptions.polygon;\n if (!(options?.enable && options.type !== _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskType.none)) {\n return;\n }\n if (this.redrawTimeout) {\n clearTimeout(this.redrawTimeout);\n }\n const timeout = 250;\n this.redrawTimeout = window.setTimeout(() => {\n void (async () => {\n await this._initRawData(true);\n await container.particles.redraw();\n })();\n }, timeout);\n }\n stop() {\n delete this.raw;\n delete this.paths;\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/PolygonMaskInstance.js?");
127
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskInstance: () => (/* binding */ PolygonMaskInstance)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ \"./dist/browser/utils.js\");\n/* harmony import */ var _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Enums/PolygonMaskInlineArrangement.js */ \"./dist/browser/Enums/PolygonMaskInlineArrangement.js\");\n/* harmony import */ var _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Enums/PolygonMaskType.js */ \"./dist/browser/Enums/PolygonMaskType.js\");\n\n\n\n\nconst noPolygonDataLoaded = `${_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.errorPrefix} No polygon data loaded.`,\n noPolygonFound = `${_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.errorPrefix} No polygon found, you need to specify SVG url in config.`,\n origin = {\n x: 0,\n y: 0\n },\n half = 0.5,\n double = 2;\nclass PolygonMaskInstance {\n constructor(container, engine) {\n this._checkInsidePolygon = position => {\n const container = this._container,\n options = container.actualOptions.polygon;\n if (!options?.enable || options.type === _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskType.none || options.type === _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskType.inline) {\n return true;\n }\n if (!this.raw) {\n throw new Error(noPolygonFound);\n }\n const canvasSize = container.canvas.size,\n x = position?.x ?? (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * canvasSize.width,\n y = position?.y ?? (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * canvasSize.height,\n indexOffset = 1;\n let inside = false;\n for (let i = 0, j = this.raw.length - indexOffset; i < this.raw.length; j = i++) {\n const pi = this.raw[i],\n pj = this.raw[j],\n intersect = pi.y > y !== pj.y > y && x < (pj.x - pi.x) * (y - pi.y) / (pj.y - pi.y) + pi.x;\n if (intersect) {\n inside = !inside;\n }\n }\n if (options.type === _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskType.inside) {\n return inside;\n } else {\n return options.type === _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskType.outside ? !inside : false;\n }\n };\n this._createPath2D = () => {\n const container = this._container,\n options = container.actualOptions.polygon;\n if (!options || !this.paths?.length) {\n return;\n }\n for (const path of this.paths) {\n const pathData = path.element?.getAttribute(\"d\");\n if (pathData) {\n const path2d = new Path2D(pathData),\n matrix = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\").createSVGMatrix(),\n finalPath = new Path2D(),\n transform = matrix.scale(this._scale);\n if (finalPath.addPath) {\n finalPath.addPath(path2d, transform);\n path.path2d = finalPath;\n } else {\n delete path.path2d;\n }\n } else {\n delete path.path2d;\n }\n if (path.path2d ?? !this.raw) {\n continue;\n }\n path.path2d = new Path2D();\n const firstIndex = 0,\n firstPoint = this.raw[firstIndex];\n path.path2d.moveTo(firstPoint.x, firstPoint.y);\n this.raw.forEach((pos, i) => {\n if (i > firstIndex) {\n path.path2d?.lineTo(pos.x, pos.y);\n }\n });\n path.path2d.closePath();\n }\n };\n this._downloadSvgPath = async (svgUrl, force) => {\n const options = this._container.actualOptions.polygon;\n if (!options) {\n return;\n }\n const url = svgUrl ?? options.url,\n forceDownload = force ?? false;\n if (!url || this.paths !== undefined && !forceDownload) {\n return this.raw;\n }\n const req = await fetch(url);\n if (!req.ok) {\n throw new Error(`${_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.errorPrefix} occurred during polygon mask download`);\n }\n return this._parseSvgPath(await req.text(), force);\n };\n this._drawPoints = () => {\n if (!this.raw) {\n return;\n }\n for (const item of this.raw) {\n void this._container.particles.addParticle({\n x: item.x,\n y: item.y\n });\n }\n };\n this._getEquidistantPointByIndex = index => {\n const container = this._container,\n options = container.actualOptions,\n polygonMaskOptions = options.polygon;\n if (!polygonMaskOptions) {\n return;\n }\n if (!this.raw?.length || !this.paths?.length) {\n throw new Error(noPolygonDataLoaded);\n }\n let offset = 0,\n point;\n const baseAccumulator = 0,\n totalLength = this.paths.reduce((tot, path) => tot + path.length, baseAccumulator),\n distance = totalLength / options.particles.number.value;\n for (const path of this.paths) {\n const pathDistance = distance * index - offset;\n if (pathDistance <= path.length) {\n point = path.element.getPointAtLength(pathDistance);\n break;\n } else {\n offset += path.length;\n }\n }\n const scale = this._scale;\n return {\n x: (point?.x ?? origin.x) * scale + (this.offset?.x ?? origin.x),\n y: (point?.y ?? origin.y) * scale + (this.offset?.y ?? origin.y)\n };\n };\n this._getPointByIndex = index => {\n if (!this.raw?.length) {\n throw new Error(noPolygonDataLoaded);\n }\n const coords = this.raw[index % this.raw.length];\n return {\n x: coords.x,\n y: coords.y\n };\n };\n this._getRandomPoint = () => {\n if (!this.raw?.length) {\n throw new Error(noPolygonDataLoaded);\n }\n const coords = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.itemFromArray)(this.raw);\n return {\n x: coords.x,\n y: coords.y\n };\n };\n this._getRandomPointByLength = () => {\n const container = this._container,\n options = container.actualOptions.polygon;\n if (!options) {\n return;\n }\n if (!this.raw?.length || !this.paths?.length) {\n throw new Error(noPolygonDataLoaded);\n }\n const path = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.itemFromArray)(this.paths),\n offset = 1,\n distance = Math.floor((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * path.length) + offset,\n point = path.element.getPointAtLength(distance),\n scale = this._scale;\n return {\n x: point.x * scale + (this.offset?.x ?? origin.x),\n y: point.y * scale + (this.offset?.y ?? origin.y)\n };\n };\n this._initRawData = async force => {\n const options = this._container.actualOptions.polygon;\n if (!options) {\n return;\n }\n if (options.url) {\n this.raw = await this._downloadSvgPath(options.url, force);\n } else if (options.data) {\n const data = options.data;\n let svg;\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isString)(data)) {\n svg = data;\n } else {\n const getPath = p => `<path d=\"${p}\" />`,\n path = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isArray)(data.path) ? data.path.map(getPath).join(\"\") : getPath(data.path);\n const namespaces = 'xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"';\n svg = `<svg ${namespaces} width=\"${data.size.width}\" height=\"${data.size.height}\">${path}</svg>`;\n }\n this.raw = this._parseSvgPath(svg, force);\n }\n this._createPath2D();\n this._engine.dispatchEvent(\"polygonMaskLoaded\", {\n container: this._container\n });\n };\n this._parseSvgPath = (xml, force) => {\n const forceDownload = force ?? false;\n if (this.paths !== undefined && !forceDownload) {\n return this.raw;\n }\n const container = this._container,\n options = container.actualOptions.polygon;\n if (!options) {\n return;\n }\n const parser = new DOMParser(),\n doc = parser.parseFromString(xml, \"image/svg+xml\"),\n firstIndex = 0,\n svg = doc.getElementsByTagName(\"svg\")[firstIndex];\n let svgPaths = svg.getElementsByTagName(\"path\");\n if (!svgPaths.length) {\n svgPaths = doc.getElementsByTagName(\"path\");\n }\n this.paths = [];\n for (let i = 0; i < svgPaths.length; i++) {\n const path = svgPaths.item(i);\n if (path) {\n this.paths.push({\n element: path,\n length: path.getTotalLength()\n });\n }\n }\n const scale = this._scale;\n this.dimension.width = parseFloat(svg.getAttribute(\"width\") ?? \"0\") * scale;\n this.dimension.height = parseFloat(svg.getAttribute(\"height\") ?? \"0\") * scale;\n const position = options.position ?? {\n x: 50,\n y: 50\n },\n canvasSize = container.canvas.size;\n this.offset = {\n x: canvasSize.width * position.x / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator - this.dimension.width * half,\n y: canvasSize.height * position.y / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator - this.dimension.height * half\n };\n return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parsePaths)(this.paths, scale, this.offset);\n };\n this._polygonBounce = (particle, delta, direction) => {\n const options = this._container.actualOptions.polygon;\n if (!this.raw || !options?.enable || direction !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.top) {\n return false;\n }\n if (options.type === _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskType.inside || options.type === _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskType.outside) {\n let closest, dx, dy;\n const pos = particle.getPosition(),\n radius = particle.getRadius(),\n offset = 1;\n for (let i = 0, j = this.raw.length - offset; i < this.raw.length; j = i++) {\n const pi = this.raw[i],\n pj = this.raw[j];\n closest = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.calcClosestPointOnSegment)(pi, pj, pos);\n const dist = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(pos, closest);\n [dx, dy] = [dist.dx, dist.dy];\n if (dist.distance < radius) {\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.segmentBounce)(pi, pj, particle.velocity);\n return true;\n }\n }\n if (closest && dx !== undefined && dy !== undefined && !this._checkInsidePolygon(pos)) {\n const factor = {\n x: 1,\n y: 1\n },\n diameter = radius * double,\n inverse = -1;\n if (pos.x >= closest.x) {\n factor.x = -1;\n }\n if (pos.y >= closest.y) {\n factor.y = -1;\n }\n particle.position.x = closest.x + diameter * factor.x;\n particle.position.y = closest.y + diameter * factor.y;\n particle.velocity.mult(inverse);\n return true;\n }\n } else if (options.type === _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskType.inline && particle.initialPosition) {\n const dist = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistance)(particle.initialPosition, particle.getPosition()),\n {\n velocity\n } = particle;\n if (dist > this._moveRadius) {\n velocity.x = velocity.y * half - velocity.x;\n velocity.y = velocity.x * half - velocity.y;\n return true;\n }\n }\n return false;\n };\n this._randomPoint = () => {\n const container = this._container,\n options = container.actualOptions.polygon;\n if (!options) {\n return;\n }\n let position;\n if (options.type === _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskType.inline) {\n switch (options.inline.arrangement) {\n case _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_2__.PolygonMaskInlineArrangement.randomPoint:\n position = this._getRandomPoint();\n break;\n case _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_2__.PolygonMaskInlineArrangement.randomLength:\n position = this._getRandomPointByLength();\n break;\n case _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_2__.PolygonMaskInlineArrangement.equidistant:\n position = this._getEquidistantPointByIndex(container.particles.count);\n break;\n case _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_2__.PolygonMaskInlineArrangement.onePerPoint:\n case _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_2__.PolygonMaskInlineArrangement.perPoint:\n default:\n position = this._getPointByIndex(container.particles.count);\n }\n } else {\n const canvasSize = container.canvas.size;\n position = {\n x: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * canvasSize.width,\n y: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * canvasSize.height\n };\n }\n if (this._checkInsidePolygon(position)) {\n return position;\n } else {\n return this._randomPoint();\n }\n };\n this._container = container;\n this._engine = engine;\n this.dimension = {\n height: 0,\n width: 0\n };\n this._moveRadius = 0;\n this._scale = 1;\n }\n clickPositionValid(position) {\n const options = this._container.actualOptions.polygon;\n return !!options?.enable && options.type !== _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskType.none && options.type !== _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskType.inline && this._checkInsidePolygon(position);\n }\n draw(context) {\n if (!this.paths?.length) {\n return;\n }\n const options = this._container.actualOptions.polygon;\n if (!options?.enable) {\n return;\n }\n const polygonDraw = options.draw;\n if (!polygonDraw.enable) {\n return;\n }\n const rawData = this.raw;\n for (const path of this.paths) {\n const path2d = path.path2d;\n if (!context) {\n continue;\n }\n if (path2d && this.offset) {\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.drawPolygonMaskPath)(this._engine, context, path2d, polygonDraw.stroke, this.offset);\n } else if (rawData) {\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.drawPolygonMask)(this._engine, context, rawData, polygonDraw.stroke);\n }\n }\n }\n async init() {\n const container = this._container,\n polygonMaskOptions = container.actualOptions.polygon,\n pxRatio = container.retina.pixelRatio;\n if (!polygonMaskOptions) {\n return;\n }\n this._moveRadius = polygonMaskOptions.move.radius * pxRatio;\n this._scale = polygonMaskOptions.scale * pxRatio;\n if (polygonMaskOptions.enable) {\n await this._initRawData();\n }\n }\n particleBounce(particle, delta, direction) {\n return this._polygonBounce(particle, delta, direction);\n }\n particlePosition(position) {\n const options = this._container.actualOptions.polygon,\n defaultLength = 0;\n if (!(options?.enable && (this.raw?.length ?? defaultLength) > defaultLength)) {\n return;\n }\n return (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.deepExtend)({}, position ? position : this._randomPoint());\n }\n particlesInitialization() {\n const options = this._container.actualOptions.polygon;\n if (options?.enable && options.type === _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskType.inline && (options.inline.arrangement === _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_2__.PolygonMaskInlineArrangement.onePerPoint || options.inline.arrangement === _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_2__.PolygonMaskInlineArrangement.perPoint)) {\n this._drawPoints();\n return true;\n }\n return false;\n }\n resize() {\n const container = this._container,\n options = container.actualOptions.polygon;\n if (!(options?.enable && options.type !== _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskType.none)) {\n return;\n }\n if (this.redrawTimeout) {\n clearTimeout(this.redrawTimeout);\n }\n const timeout = 250;\n this.redrawTimeout = setTimeout(() => {\n void (async () => {\n await this._initRawData(true);\n await container.particles.redraw();\n })();\n }, timeout);\n }\n stop() {\n delete this.raw;\n delete this.paths;\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/PolygonMaskInstance.js?\n}");
128
128
 
129
129
  /***/ }),
130
130
 
@@ -134,7 +134,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
134
134
  \*******************************************/
135
135
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
136
136
 
137
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskPlugin: () => (/* binding */ PolygonMaskPlugin)\n/* harmony export */ });\n/* harmony import */ var _Options_Classes_PolygonMask_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Options/Classes/PolygonMask.js */ \"./dist/browser/Options/Classes/PolygonMask.js\");\n/* harmony import */ var _PolygonMaskInstance_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PolygonMaskInstance.js */ \"./dist/browser/PolygonMaskInstance.js\");\n/* harmony import */ var _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Enums/PolygonMaskType.js */ \"./dist/browser/Enums/PolygonMaskType.js\");\n\n\n\nclass PolygonMaskPlugin {\n constructor(engine) {\n this.id = \"polygonMask\";\n this._engine = engine;\n }\n getPlugin(container) {\n return Promise.resolve(new _PolygonMaskInstance_js__WEBPACK_IMPORTED_MODULE_0__.PolygonMaskInstance(container, this._engine));\n }\n loadOptions(options, source) {\n if (!this.needsPlugin(options) && !this.needsPlugin(source)) {\n return;\n }\n let polygonOptions = options.polygon;\n if (polygonOptions?.load === undefined) {\n options.polygon = polygonOptions = new _Options_Classes_PolygonMask_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMask(this._engine);\n }\n polygonOptions.load(source?.polygon);\n }\n needsPlugin(options) {\n return options?.polygon?.enable ?? (options?.polygon?.type !== undefined && options.polygon.type !== _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_2__.PolygonMaskType.none);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/PolygonMaskPlugin.js?");
137
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskPlugin: () => (/* binding */ PolygonMaskPlugin)\n/* harmony export */ });\n/* harmony import */ var _Options_Classes_PolygonMask_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Options/Classes/PolygonMask.js */ \"./dist/browser/Options/Classes/PolygonMask.js\");\n/* harmony import */ var _PolygonMaskInstance_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PolygonMaskInstance.js */ \"./dist/browser/PolygonMaskInstance.js\");\n/* harmony import */ var _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Enums/PolygonMaskType.js */ \"./dist/browser/Enums/PolygonMaskType.js\");\n\n\n\nclass PolygonMaskPlugin {\n constructor(engine) {\n this.id = \"polygonMask\";\n this._engine = engine;\n }\n getPlugin(container) {\n return Promise.resolve(new _PolygonMaskInstance_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskInstance(container, this._engine));\n }\n loadOptions(options, source) {\n if (!this.needsPlugin(options) && !this.needsPlugin(source)) {\n return;\n }\n let polygonOptions = options.polygon;\n if (polygonOptions?.load === undefined) {\n options.polygon = polygonOptions = new _Options_Classes_PolygonMask_js__WEBPACK_IMPORTED_MODULE_0__.PolygonMask(this._engine);\n }\n polygonOptions.load(source?.polygon);\n }\n needsPlugin(options) {\n return options?.polygon?.enable ?? (options?.polygon?.type !== undefined && options.polygon.type !== _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_2__.PolygonMaskType.none);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/PolygonMaskPlugin.js?\n}");
138
138
 
139
139
  /***/ }),
140
140
 
@@ -144,7 +144,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
144
144
  \*******************************/
145
145
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
146
146
 
147
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskInlineArrangement: () => (/* reexport safe */ _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_2__.PolygonMaskInlineArrangement),\n/* harmony export */ PolygonMaskMoveType: () => (/* reexport safe */ _Enums_PolygonMaskMoveType_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskMoveType),\n/* harmony export */ PolygonMaskType: () => (/* reexport safe */ _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_4__.PolygonMaskType),\n/* harmony export */ loadPolygonMaskPlugin: () => (/* binding */ loadPolygonMaskPlugin)\n/* harmony export */ });\n/* harmony import */ var _pathseg_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pathseg.js */ \"./dist/browser/pathseg.js\");\n/* harmony import */ var _pathseg_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_pathseg_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _PolygonMaskPlugin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PolygonMaskPlugin.js */ \"./dist/browser/PolygonMaskPlugin.js\");\n/* harmony import */ var _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Enums/PolygonMaskInlineArrangement.js */ \"./dist/browser/Enums/PolygonMaskInlineArrangement.js\");\n/* harmony import */ var _Enums_PolygonMaskMoveType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Enums/PolygonMaskMoveType.js */ \"./dist/browser/Enums/PolygonMaskMoveType.js\");\n/* harmony import */ var _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Enums/PolygonMaskType.js */ \"./dist/browser/Enums/PolygonMaskType.js\");\n\n\nasync function loadPolygonMaskPlugin(engine, refresh = true) {\n engine.checkVersion(\"3.8.0\");\n await engine.addPlugin(new _PolygonMaskPlugin_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskPlugin(engine), refresh);\n}\n\n\n\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/index.js?");
147
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskInlineArrangement: () => (/* reexport safe */ _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_2__.PolygonMaskInlineArrangement),\n/* harmony export */ PolygonMaskMoveType: () => (/* reexport safe */ _Enums_PolygonMaskMoveType_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskMoveType),\n/* harmony export */ PolygonMaskType: () => (/* reexport safe */ _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_4__.PolygonMaskType),\n/* harmony export */ loadPolygonMaskPlugin: () => (/* binding */ loadPolygonMaskPlugin)\n/* harmony export */ });\n/* harmony import */ var _pathseg_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pathseg.js */ \"./dist/browser/pathseg.js\");\n/* harmony import */ var _pathseg_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_pathseg_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _PolygonMaskPlugin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PolygonMaskPlugin.js */ \"./dist/browser/PolygonMaskPlugin.js\");\n/* harmony import */ var _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Enums/PolygonMaskInlineArrangement.js */ \"./dist/browser/Enums/PolygonMaskInlineArrangement.js\");\n/* harmony import */ var _Enums_PolygonMaskMoveType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Enums/PolygonMaskMoveType.js */ \"./dist/browser/Enums/PolygonMaskMoveType.js\");\n/* harmony import */ var _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Enums/PolygonMaskType.js */ \"./dist/browser/Enums/PolygonMaskType.js\");\n\n\nasync function loadPolygonMaskPlugin(engine, refresh = true) {\n engine.checkVersion(\"3.9.0\");\n await engine.addPlugin(new _PolygonMaskPlugin_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskPlugin(engine), refresh);\n}\n\n\n\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/index.js?\n}");
148
148
 
149
149
  /***/ }),
150
150
 
@@ -154,7 +154,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
154
154
  \*********************************/
155
155
  /***/ (() => {
156
156
 
157
- eval("\n\n(function () {\n \"use strict\";\n\n try {\n if (typeof window === \"undefined\") return;\n if (!(\"SVGPathSeg\" in window)) {\n window.SVGPathSeg = function (type, typeAsLetter, owningPathSegList) {\n this.pathSegType = type;\n this.pathSegTypeAsLetter = typeAsLetter;\n this._owningPathSegList = owningPathSegList;\n };\n window.SVGPathSeg.prototype.classname = \"SVGPathSeg\";\n window.SVGPathSeg.PATHSEG_UNKNOWN = 0;\n window.SVGPathSeg.PATHSEG_CLOSEPATH = 1;\n window.SVGPathSeg.PATHSEG_MOVETO_ABS = 2;\n window.SVGPathSeg.PATHSEG_MOVETO_REL = 3;\n window.SVGPathSeg.PATHSEG_LINETO_ABS = 4;\n window.SVGPathSeg.PATHSEG_LINETO_REL = 5;\n window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS = 6;\n window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL = 7;\n window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS = 8;\n window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL = 9;\n window.SVGPathSeg.PATHSEG_ARC_ABS = 10;\n window.SVGPathSeg.PATHSEG_ARC_REL = 11;\n window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS = 12;\n window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL = 13;\n window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS = 14;\n window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL = 15;\n window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16;\n window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17;\n window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18;\n window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19;\n window.SVGPathSeg.prototype._segmentChanged = function () {\n if (this._owningPathSegList) this._owningPathSegList.segmentChanged(this);\n };\n window.SVGPathSegClosePath = function (owningPathSegList) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CLOSEPATH, \"z\", owningPathSegList);\n };\n window.SVGPathSegClosePath.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegClosePath.prototype.toString = function () {\n return \"[object SVGPathSegClosePath]\";\n };\n window.SVGPathSegClosePath.prototype._asPathString = function () {\n return this.pathSegTypeAsLetter;\n };\n window.SVGPathSegClosePath.prototype.clone = function () {\n return new window.SVGPathSegClosePath(undefined);\n };\n window.SVGPathSegMovetoAbs = function (owningPathSegList, x, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_MOVETO_ABS, \"M\", owningPathSegList);\n this._x = x;\n this._y = y;\n };\n window.SVGPathSegMovetoAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegMovetoAbs.prototype.toString = function () {\n return \"[object SVGPathSegMovetoAbs]\";\n };\n window.SVGPathSegMovetoAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;\n };\n window.SVGPathSegMovetoAbs.prototype.clone = function () {\n return new window.SVGPathSegMovetoAbs(undefined, this._x, this._y);\n };\n Object.defineProperty(window.SVGPathSegMovetoAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegMovetoAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegMovetoRel = function (owningPathSegList, x, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_MOVETO_REL, \"m\", owningPathSegList);\n this._x = x;\n this._y = y;\n };\n window.SVGPathSegMovetoRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegMovetoRel.prototype.toString = function () {\n return \"[object SVGPathSegMovetoRel]\";\n };\n window.SVGPathSegMovetoRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;\n };\n window.SVGPathSegMovetoRel.prototype.clone = function () {\n return new window.SVGPathSegMovetoRel(undefined, this._x, this._y);\n };\n Object.defineProperty(window.SVGPathSegMovetoRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegMovetoRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegLinetoAbs = function (owningPathSegList, x, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_ABS, \"L\", owningPathSegList);\n this._x = x;\n this._y = y;\n };\n window.SVGPathSegLinetoAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegLinetoAbs.prototype.toString = function () {\n return \"[object SVGPathSegLinetoAbs]\";\n };\n window.SVGPathSegLinetoAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;\n };\n window.SVGPathSegLinetoAbs.prototype.clone = function () {\n return new window.SVGPathSegLinetoAbs(undefined, this._x, this._y);\n };\n Object.defineProperty(window.SVGPathSegLinetoAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegLinetoAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegLinetoRel = function (owningPathSegList, x, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_REL, \"l\", owningPathSegList);\n this._x = x;\n this._y = y;\n };\n window.SVGPathSegLinetoRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegLinetoRel.prototype.toString = function () {\n return \"[object SVGPathSegLinetoRel]\";\n };\n window.SVGPathSegLinetoRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;\n };\n window.SVGPathSegLinetoRel.prototype.clone = function () {\n return new window.SVGPathSegLinetoRel(undefined, this._x, this._y);\n };\n Object.defineProperty(window.SVGPathSegLinetoRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegLinetoRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoCubicAbs = function (owningPathSegList, x, y, x1, y1, x2, y2) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS, \"C\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._x1 = x1;\n this._y1 = y1;\n this._x2 = x2;\n this._y2 = y2;\n };\n window.SVGPathSegCurvetoCubicAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoCubicAbs.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoCubicAbs]\";\n };\n window.SVGPathSegCurvetoCubicAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoCubicAbs.prototype.clone = function () {\n return new window.SVGPathSegCurvetoCubicAbs(undefined, this._x, this._y, this._x1, this._y1, this._x2, this._y2);\n };\n Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, \"x1\", {\n get: function () {\n return this._x1;\n },\n set: function (x1) {\n this._x1 = x1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, \"y1\", {\n get: function () {\n return this._y1;\n },\n set: function (y1) {\n this._y1 = y1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, \"x2\", {\n get: function () {\n return this._x2;\n },\n set: function (x2) {\n this._x2 = x2;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, \"y2\", {\n get: function () {\n return this._y2;\n },\n set: function (y2) {\n this._y2 = y2;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoCubicRel = function (owningPathSegList, x, y, x1, y1, x2, y2) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL, \"c\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._x1 = x1;\n this._y1 = y1;\n this._x2 = x2;\n this._y2 = y2;\n };\n window.SVGPathSegCurvetoCubicRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoCubicRel.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoCubicRel]\";\n };\n window.SVGPathSegCurvetoCubicRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoCubicRel.prototype.clone = function () {\n return new window.SVGPathSegCurvetoCubicRel(undefined, this._x, this._y, this._x1, this._y1, this._x2, this._y2);\n };\n Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, \"x1\", {\n get: function () {\n return this._x1;\n },\n set: function (x1) {\n this._x1 = x1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, \"y1\", {\n get: function () {\n return this._y1;\n },\n set: function (y1) {\n this._y1 = y1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, \"x2\", {\n get: function () {\n return this._x2;\n },\n set: function (x2) {\n this._x2 = x2;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, \"y2\", {\n get: function () {\n return this._y2;\n },\n set: function (y2) {\n this._y2 = y2;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoQuadraticAbs = function (owningPathSegList, x, y, x1, y1) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS, \"Q\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._x1 = x1;\n this._y1 = y1;\n };\n window.SVGPathSegCurvetoQuadraticAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoQuadraticAbs.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoQuadraticAbs]\";\n };\n window.SVGPathSegCurvetoQuadraticAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoQuadraticAbs.prototype.clone = function () {\n return new window.SVGPathSegCurvetoQuadraticAbs(undefined, this._x, this._y, this._x1, this._y1);\n };\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, \"x1\", {\n get: function () {\n return this._x1;\n },\n set: function (x1) {\n this._x1 = x1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, \"y1\", {\n get: function () {\n return this._y1;\n },\n set: function (y1) {\n this._y1 = y1;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoQuadraticRel = function (owningPathSegList, x, y, x1, y1) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL, \"q\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._x1 = x1;\n this._y1 = y1;\n };\n window.SVGPathSegCurvetoQuadraticRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoQuadraticRel.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoQuadraticRel]\";\n };\n window.SVGPathSegCurvetoQuadraticRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoQuadraticRel.prototype.clone = function () {\n return new window.SVGPathSegCurvetoQuadraticRel(undefined, this._x, this._y, this._x1, this._y1);\n };\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, \"x1\", {\n get: function () {\n return this._x1;\n },\n set: function (x1) {\n this._x1 = x1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, \"y1\", {\n get: function () {\n return this._y1;\n },\n set: function (y1) {\n this._y1 = y1;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegArcAbs = function (owningPathSegList, x, y, r1, r2, angle, largeArcFlag, sweepFlag) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_ARC_ABS, \"A\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._r1 = r1;\n this._r2 = r2;\n this._angle = angle;\n this._largeArcFlag = largeArcFlag;\n this._sweepFlag = sweepFlag;\n };\n window.SVGPathSegArcAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegArcAbs.prototype.toString = function () {\n return \"[object SVGPathSegArcAbs]\";\n };\n window.SVGPathSegArcAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag ? \"1\" : \"0\"} ${this._sweepFlag ? \"1\" : \"0\"} ${this._x} ${this._y}`;\n };\n window.SVGPathSegArcAbs.prototype.clone = function () {\n return new window.SVGPathSegArcAbs(undefined, this._x, this._y, this._r1, this._r2, this._angle, this._largeArcFlag, this._sweepFlag);\n };\n Object.defineProperty(window.SVGPathSegArcAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcAbs.prototype, \"r1\", {\n get: function () {\n return this._r1;\n },\n set: function (r1) {\n this._r1 = r1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcAbs.prototype, \"r2\", {\n get: function () {\n return this._r2;\n },\n set: function (r2) {\n this._r2 = r2;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcAbs.prototype, \"angle\", {\n get: function () {\n return this._angle;\n },\n set: function (angle) {\n this._angle = angle;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcAbs.prototype, \"largeArcFlag\", {\n get: function () {\n return this._largeArcFlag;\n },\n set: function (largeArcFlag) {\n this._largeArcFlag = largeArcFlag;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcAbs.prototype, \"sweepFlag\", {\n get: function () {\n return this._sweepFlag;\n },\n set: function (sweepFlag) {\n this._sweepFlag = sweepFlag;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegArcRel = function (owningPathSegList, x, y, r1, r2, angle, largeArcFlag, sweepFlag) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_ARC_REL, \"a\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._r1 = r1;\n this._r2 = r2;\n this._angle = angle;\n this._largeArcFlag = largeArcFlag;\n this._sweepFlag = sweepFlag;\n };\n window.SVGPathSegArcRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegArcRel.prototype.toString = function () {\n return \"[object SVGPathSegArcRel]\";\n };\n window.SVGPathSegArcRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag ? \"1\" : \"0\"} ${this._sweepFlag ? \"1\" : \"0\"} ${this._x} ${this._y}`;\n };\n window.SVGPathSegArcRel.prototype.clone = function () {\n return new window.SVGPathSegArcRel(undefined, this._x, this._y, this._r1, this._r2, this._angle, this._largeArcFlag, this._sweepFlag);\n };\n Object.defineProperty(window.SVGPathSegArcRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcRel.prototype, \"r1\", {\n get: function () {\n return this._r1;\n },\n set: function (r1) {\n this._r1 = r1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcRel.prototype, \"r2\", {\n get: function () {\n return this._r2;\n },\n set: function (r2) {\n this._r2 = r2;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcRel.prototype, \"angle\", {\n get: function () {\n return this._angle;\n },\n set: function (angle) {\n this._angle = angle;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcRel.prototype, \"largeArcFlag\", {\n get: function () {\n return this._largeArcFlag;\n },\n set: function (largeArcFlag) {\n this._largeArcFlag = largeArcFlag;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcRel.prototype, \"sweepFlag\", {\n get: function () {\n return this._sweepFlag;\n },\n set: function (sweepFlag) {\n this._sweepFlag = sweepFlag;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegLinetoHorizontalAbs = function (owningPathSegList, x) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS, \"H\", owningPathSegList);\n this._x = x;\n };\n window.SVGPathSegLinetoHorizontalAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegLinetoHorizontalAbs.prototype.toString = function () {\n return \"[object SVGPathSegLinetoHorizontalAbs]\";\n };\n window.SVGPathSegLinetoHorizontalAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x}`;\n };\n window.SVGPathSegLinetoHorizontalAbs.prototype.clone = function () {\n return new window.SVGPathSegLinetoHorizontalAbs(undefined, this._x);\n };\n Object.defineProperty(window.SVGPathSegLinetoHorizontalAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegLinetoHorizontalRel = function (owningPathSegList, x) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL, \"h\", owningPathSegList);\n this._x = x;\n };\n window.SVGPathSegLinetoHorizontalRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegLinetoHorizontalRel.prototype.toString = function () {\n return \"[object SVGPathSegLinetoHorizontalRel]\";\n };\n window.SVGPathSegLinetoHorizontalRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x}`;\n };\n window.SVGPathSegLinetoHorizontalRel.prototype.clone = function () {\n return new window.SVGPathSegLinetoHorizontalRel(undefined, this._x);\n };\n Object.defineProperty(window.SVGPathSegLinetoHorizontalRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegLinetoVerticalAbs = function (owningPathSegList, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS, \"V\", owningPathSegList);\n this._y = y;\n };\n window.SVGPathSegLinetoVerticalAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegLinetoVerticalAbs.prototype.toString = function () {\n return \"[object SVGPathSegLinetoVerticalAbs]\";\n };\n window.SVGPathSegLinetoVerticalAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._y}`;\n };\n window.SVGPathSegLinetoVerticalAbs.prototype.clone = function () {\n return new window.SVGPathSegLinetoVerticalAbs(undefined, this._y);\n };\n Object.defineProperty(window.SVGPathSegLinetoVerticalAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegLinetoVerticalRel = function (owningPathSegList, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL, \"v\", owningPathSegList);\n this._y = y;\n };\n window.SVGPathSegLinetoVerticalRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegLinetoVerticalRel.prototype.toString = function () {\n return \"[object SVGPathSegLinetoVerticalRel]\";\n };\n window.SVGPathSegLinetoVerticalRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._y}`;\n };\n window.SVGPathSegLinetoVerticalRel.prototype.clone = function () {\n return new window.SVGPathSegLinetoVerticalRel(undefined, this._y);\n };\n Object.defineProperty(window.SVGPathSegLinetoVerticalRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoCubicSmoothAbs = function (owningPathSegList, x, y, x2, y2) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS, \"S\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._x2 = x2;\n this._y2 = y2;\n };\n window.SVGPathSegCurvetoCubicSmoothAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoCubicSmoothAbs.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoCubicSmoothAbs]\";\n };\n window.SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoCubicSmoothAbs.prototype.clone = function () {\n return new window.SVGPathSegCurvetoCubicSmoothAbs(undefined, this._x, this._y, this._x2, this._y2);\n };\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, \"x2\", {\n get: function () {\n return this._x2;\n },\n set: function (x2) {\n this._x2 = x2;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, \"y2\", {\n get: function () {\n return this._y2;\n },\n set: function (y2) {\n this._y2 = y2;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoCubicSmoothRel = function (owningPathSegList, x, y, x2, y2) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL, \"s\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._x2 = x2;\n this._y2 = y2;\n };\n window.SVGPathSegCurvetoCubicSmoothRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoCubicSmoothRel.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoCubicSmoothRel]\";\n };\n window.SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoCubicSmoothRel.prototype.clone = function () {\n return new window.SVGPathSegCurvetoCubicSmoothRel(undefined, this._x, this._y, this._x2, this._y2);\n };\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, \"x2\", {\n get: function () {\n return this._x2;\n },\n set: function (x2) {\n this._x2 = x2;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, \"y2\", {\n get: function () {\n return this._y2;\n },\n set: function (y2) {\n this._y2 = y2;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoQuadraticSmoothAbs = function (owningPathSegList, x, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS, \"T\", owningPathSegList);\n this._x = x;\n this._y = y;\n };\n window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoQuadraticSmoothAbs]\";\n };\n window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone = function () {\n return new window.SVGPathSegCurvetoQuadraticSmoothAbs(undefined, this._x, this._y);\n };\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoQuadraticSmoothRel = function (owningPathSegList, x, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL, \"t\", owningPathSegList);\n this._x = x;\n this._y = y;\n };\n window.SVGPathSegCurvetoQuadraticSmoothRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoQuadraticSmoothRel]\";\n };\n window.SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone = function () {\n return new window.SVGPathSegCurvetoQuadraticSmoothRel(undefined, this._x, this._y);\n };\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathElement.prototype.createSVGPathSegClosePath = function () {\n return new window.SVGPathSegClosePath(undefined);\n };\n window.SVGPathElement.prototype.createSVGPathSegMovetoAbs = function (x, y) {\n return new window.SVGPathSegMovetoAbs(undefined, x, y);\n };\n window.SVGPathElement.prototype.createSVGPathSegMovetoRel = function (x, y) {\n return new window.SVGPathSegMovetoRel(undefined, x, y);\n };\n window.SVGPathElement.prototype.createSVGPathSegLinetoAbs = function (x, y) {\n return new window.SVGPathSegLinetoAbs(undefined, x, y);\n };\n window.SVGPathElement.prototype.createSVGPathSegLinetoRel = function (x, y) {\n return new window.SVGPathSegLinetoRel(undefined, x, y);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs = function (x, y, x1, y1, x2, y2) {\n return new window.SVGPathSegCurvetoCubicAbs(undefined, x, y, x1, y1, x2, y2);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel = function (x, y, x1, y1, x2, y2) {\n return new window.SVGPathSegCurvetoCubicRel(undefined, x, y, x1, y1, x2, y2);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs = function (x, y, x1, y1) {\n return new window.SVGPathSegCurvetoQuadraticAbs(undefined, x, y, x1, y1);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel = function (x, y, x1, y1) {\n return new window.SVGPathSegCurvetoQuadraticRel(undefined, x, y, x1, y1);\n };\n window.SVGPathElement.prototype.createSVGPathSegArcAbs = function (x, y, r1, r2, angle, largeArcFlag, sweepFlag) {\n return new window.SVGPathSegArcAbs(undefined, x, y, r1, r2, angle, largeArcFlag, sweepFlag);\n };\n window.SVGPathElement.prototype.createSVGPathSegArcRel = function (x, y, r1, r2, angle, largeArcFlag, sweepFlag) {\n return new window.SVGPathSegArcRel(undefined, x, y, r1, r2, angle, largeArcFlag, sweepFlag);\n };\n window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs = function (x) {\n return new window.SVGPathSegLinetoHorizontalAbs(undefined, x);\n };\n window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel = function (x) {\n return new window.SVGPathSegLinetoHorizontalRel(undefined, x);\n };\n window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs = function (y) {\n return new window.SVGPathSegLinetoVerticalAbs(undefined, y);\n };\n window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel = function (y) {\n return new window.SVGPathSegLinetoVerticalRel(undefined, y);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs = function (x, y, x2, y2) {\n return new window.SVGPathSegCurvetoCubicSmoothAbs(undefined, x, y, x2, y2);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel = function (x, y, x2, y2) {\n return new window.SVGPathSegCurvetoCubicSmoothRel(undefined, x, y, x2, y2);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs = function (x, y) {\n return new window.SVGPathSegCurvetoQuadraticSmoothAbs(undefined, x, y);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel = function (x, y) {\n return new window.SVGPathSegCurvetoQuadraticSmoothRel(undefined, x, y);\n };\n if (!(\"getPathSegAtLength\" in window.SVGPathElement.prototype)) {\n window.SVGPathElement.prototype.getPathSegAtLength = function (distance) {\n if (distance === undefined || !isFinite(distance)) throw \"Invalid arguments.\";\n const measurementElement = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n measurementElement.setAttribute(\"d\", this.getAttribute(\"d\"));\n let lastPathSegment = measurementElement.pathSegList.numberOfItems - 1;\n if (lastPathSegment <= 0) return 0;\n do {\n measurementElement.pathSegList.removeItem(lastPathSegment);\n if (distance > measurementElement.getTotalLength()) break;\n lastPathSegment--;\n } while (lastPathSegment > 0);\n return lastPathSegment;\n };\n }\n }\n if (!(\"SVGPathSegList\" in window) || !(\"appendItem\" in window.SVGPathSegList.prototype)) {\n window.SVGPathSegList = function (pathElement) {\n this._pathElement = pathElement;\n this._list = this._parsePath(this._pathElement.getAttribute(\"d\"));\n this._mutationObserverConfig = {\n attributes: true,\n attributeFilter: [\"d\"]\n };\n this._pathElementMutationObserver = new MutationObserver(this._updateListFromPathMutations.bind(this));\n this._pathElementMutationObserver.observe(this._pathElement, this._mutationObserverConfig);\n };\n window.SVGPathSegList.prototype.classname = \"SVGPathSegList\";\n Object.defineProperty(window.SVGPathSegList.prototype, \"numberOfItems\", {\n get: function () {\n this._checkPathSynchronizedToList();\n return this._list.length;\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegList.prototype, \"length\", {\n get: function () {\n this._checkPathSynchronizedToList();\n return this._list.length;\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathElement.prototype, \"pathSegList\", {\n get: function () {\n if (!this._pathSegList) this._pathSegList = new window.SVGPathSegList(this);\n return this._pathSegList;\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathElement.prototype, \"normalizedPathSegList\", {\n get: function () {\n return this.pathSegList;\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathElement.prototype, \"animatedPathSegList\", {\n get: function () {\n return this.pathSegList;\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathElement.prototype, \"animatedNormalizedPathSegList\", {\n get: function () {\n return this.pathSegList;\n },\n enumerable: true\n });\n window.SVGPathSegList.prototype._checkPathSynchronizedToList = function () {\n this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords());\n };\n window.SVGPathSegList.prototype._updateListFromPathMutations = function (mutationRecords) {\n if (!this._pathElement) return;\n let hasPathMutations = false;\n mutationRecords.forEach(function (record) {\n if (record.attributeName == \"d\") hasPathMutations = true;\n });\n if (hasPathMutations) this._list = this._parsePath(this._pathElement.getAttribute(\"d\"));\n };\n window.SVGPathSegList.prototype._writeListToPath = function () {\n this._pathElementMutationObserver.disconnect();\n this._pathElement.setAttribute(\"d\", window.SVGPathSegList._pathSegArrayAsString(this._list));\n this._pathElementMutationObserver.observe(this._pathElement, this._mutationObserverConfig);\n };\n window.SVGPathSegList.prototype.segmentChanged = function () {\n this._writeListToPath();\n };\n window.SVGPathSegList.prototype.clear = function () {\n this._checkPathSynchronizedToList();\n this._list.forEach(function (pathSeg) {\n pathSeg._owningPathSegList = null;\n });\n this._list = [];\n this._writeListToPath();\n };\n window.SVGPathSegList.prototype.initialize = function (newItem) {\n this._checkPathSynchronizedToList();\n this._list = [newItem];\n newItem._owningPathSegList = this;\n this._writeListToPath();\n return newItem;\n };\n window.SVGPathSegList.prototype._checkValidIndex = function (index) {\n if (isNaN(index) || index < 0 || index >= this.numberOfItems) throw \"INDEX_SIZE_ERR\";\n };\n window.SVGPathSegList.prototype.getItem = function (index) {\n this._checkPathSynchronizedToList();\n this._checkValidIndex(index);\n return this._list[index];\n };\n window.SVGPathSegList.prototype.insertItemBefore = function (newItem, index) {\n this._checkPathSynchronizedToList();\n if (index > this.numberOfItems) index = this.numberOfItems;\n if (newItem._owningPathSegList) {\n newItem = newItem.clone();\n }\n this._list.splice(index, 0, newItem);\n newItem._owningPathSegList = this;\n this._writeListToPath();\n return newItem;\n };\n window.SVGPathSegList.prototype.replaceItem = function (newItem, index) {\n this._checkPathSynchronizedToList();\n if (newItem._owningPathSegList) {\n newItem = newItem.clone();\n }\n this._checkValidIndex(index);\n this._list[index] = newItem;\n newItem._owningPathSegList = this;\n this._writeListToPath();\n return newItem;\n };\n window.SVGPathSegList.prototype.removeItem = function (index) {\n this._checkPathSynchronizedToList();\n this._checkValidIndex(index);\n const item = this._list[index];\n this._list.splice(index, 1);\n this._writeListToPath();\n return item;\n };\n window.SVGPathSegList.prototype.appendItem = function (newItem) {\n this._checkPathSynchronizedToList();\n if (newItem._owningPathSegList) {\n newItem = newItem.clone();\n }\n this._list.push(newItem);\n newItem._owningPathSegList = this;\n this._writeListToPath();\n return newItem;\n };\n window.SVGPathSegList._pathSegArrayAsString = function (pathSegArray) {\n let string = \"\";\n let first = true;\n pathSegArray.forEach(function (pathSeg) {\n if (first) {\n first = false;\n string += pathSeg._asPathString();\n } else {\n string += ` ${pathSeg._asPathString()}`;\n }\n });\n return string;\n };\n window.SVGPathSegList.prototype._parsePath = function (string) {\n if (!string || !string.length) return [];\n const owningPathSegList = this;\n const Builder = function () {\n this.pathSegList = [];\n };\n Builder.prototype.appendSegment = function (pathSeg) {\n this.pathSegList.push(pathSeg);\n };\n const Source = function (string) {\n this._string = string;\n this._currentIndex = 0;\n this._endIndex = this._string.length;\n this._previousCommand = window.SVGPathSeg.PATHSEG_UNKNOWN;\n this._skipOptionalSpaces();\n };\n Source.prototype._isCurrentSpace = function () {\n const character = this._string[this._currentIndex];\n return character <= \" \" && (character == \" \" || character == \"\\n\" || character == \"\\t\" || character == \"\\r\" || character == \"\\f\");\n };\n Source.prototype._skipOptionalSpaces = function () {\n while (this._currentIndex < this._endIndex && this._isCurrentSpace()) this._currentIndex++;\n return this._currentIndex < this._endIndex;\n };\n Source.prototype._skipOptionalSpacesOrDelimiter = function () {\n if (this._currentIndex < this._endIndex && !this._isCurrentSpace() && this._string.charAt(this._currentIndex) != \",\") return false;\n if (this._skipOptionalSpaces()) {\n if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == \",\") {\n this._currentIndex++;\n this._skipOptionalSpaces();\n }\n }\n return this._currentIndex < this._endIndex;\n };\n Source.prototype.hasMoreData = function () {\n return this._currentIndex < this._endIndex;\n };\n Source.prototype.peekSegmentType = function () {\n const lookahead = this._string[this._currentIndex];\n return this._pathSegTypeFromChar(lookahead);\n };\n Source.prototype._pathSegTypeFromChar = function (lookahead) {\n switch (lookahead) {\n case \"Z\":\n case \"z\":\n return window.SVGPathSeg.PATHSEG_CLOSEPATH;\n case \"M\":\n return window.SVGPathSeg.PATHSEG_MOVETO_ABS;\n case \"m\":\n return window.SVGPathSeg.PATHSEG_MOVETO_REL;\n case \"L\":\n return window.SVGPathSeg.PATHSEG_LINETO_ABS;\n case \"l\":\n return window.SVGPathSeg.PATHSEG_LINETO_REL;\n case \"C\":\n return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;\n case \"c\":\n return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;\n case \"Q\":\n return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;\n case \"q\":\n return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;\n case \"A\":\n return window.SVGPathSeg.PATHSEG_ARC_ABS;\n case \"a\":\n return window.SVGPathSeg.PATHSEG_ARC_REL;\n case \"H\":\n return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;\n case \"h\":\n return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;\n case \"V\":\n return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;\n case \"v\":\n return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;\n case \"S\":\n return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;\n case \"s\":\n return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;\n case \"T\":\n return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;\n case \"t\":\n return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;\n default:\n return window.SVGPathSeg.PATHSEG_UNKNOWN;\n }\n };\n Source.prototype._nextCommandHelper = function (lookahead, previousCommand) {\n if ((lookahead == \"+\" || lookahead == \"-\" || lookahead == \".\" || lookahead >= \"0\" && lookahead <= \"9\") && previousCommand != window.SVGPathSeg.PATHSEG_CLOSEPATH) {\n if (previousCommand == window.SVGPathSeg.PATHSEG_MOVETO_ABS) return window.SVGPathSeg.PATHSEG_LINETO_ABS;\n if (previousCommand == window.SVGPathSeg.PATHSEG_MOVETO_REL) return window.SVGPathSeg.PATHSEG_LINETO_REL;\n return previousCommand;\n }\n return window.SVGPathSeg.PATHSEG_UNKNOWN;\n };\n Source.prototype.initialCommandIsMoveTo = function () {\n if (!this.hasMoreData()) return true;\n const command = this.peekSegmentType();\n return command == window.SVGPathSeg.PATHSEG_MOVETO_ABS || command == window.SVGPathSeg.PATHSEG_MOVETO_REL;\n };\n Source.prototype._parseNumber = function () {\n let exponent = 0;\n let integer = 0;\n let frac = 1;\n let decimal = 0;\n let sign = 1;\n let expsign = 1;\n const startIndex = this._currentIndex;\n this._skipOptionalSpaces();\n if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == \"+\") this._currentIndex++;else if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == \"-\") {\n this._currentIndex++;\n sign = -1;\n }\n if (this._currentIndex == this._endIndex || (this._string.charAt(this._currentIndex) < \"0\" || this._string.charAt(this._currentIndex) > \"9\") && this._string.charAt(this._currentIndex) != \".\") return undefined;\n const startIntPartIndex = this._currentIndex;\n while (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= \"0\" && this._string.charAt(this._currentIndex) <= \"9\") this._currentIndex++;\n if (this._currentIndex != startIntPartIndex) {\n let scanIntPartIndex = this._currentIndex - 1;\n let multiplier = 1;\n while (scanIntPartIndex >= startIntPartIndex) {\n integer += multiplier * (this._string.charAt(scanIntPartIndex--) - \"0\");\n multiplier *= 10;\n }\n }\n if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == \".\") {\n this._currentIndex++;\n if (this._currentIndex >= this._endIndex || this._string.charAt(this._currentIndex) < \"0\" || this._string.charAt(this._currentIndex) > \"9\") return undefined;\n while (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= \"0\" && this._string.charAt(this._currentIndex) <= \"9\") {\n frac *= 10;\n decimal += (this._string.charAt(this._currentIndex) - \"0\") / frac;\n this._currentIndex += 1;\n }\n }\n if (this._currentIndex != startIndex && this._currentIndex + 1 < this._endIndex && (this._string.charAt(this._currentIndex) == \"e\" || this._string.charAt(this._currentIndex) == \"E\") && this._string.charAt(this._currentIndex + 1) != \"x\" && this._string.charAt(this._currentIndex + 1) != \"m\") {\n this._currentIndex++;\n if (this._string.charAt(this._currentIndex) == \"+\") {\n this._currentIndex++;\n } else if (this._string.charAt(this._currentIndex) == \"-\") {\n this._currentIndex++;\n expsign = -1;\n }\n if (this._currentIndex >= this._endIndex || this._string.charAt(this._currentIndex) < \"0\" || this._string.charAt(this._currentIndex) > \"9\") return undefined;\n while (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= \"0\" && this._string.charAt(this._currentIndex) <= \"9\") {\n exponent *= 10;\n exponent += this._string.charAt(this._currentIndex) - \"0\";\n this._currentIndex++;\n }\n }\n let number = integer + decimal;\n number *= sign;\n if (exponent) number *= Math.pow(10, expsign * exponent);\n if (startIndex == this._currentIndex) return undefined;\n this._skipOptionalSpacesOrDelimiter();\n return number;\n };\n Source.prototype._parseArcFlag = function () {\n if (this._currentIndex >= this._endIndex) return undefined;\n let flag = false;\n const flagChar = this._string.charAt(this._currentIndex++);\n if (flagChar == \"0\") flag = false;else if (flagChar == \"1\") flag = true;else return undefined;\n this._skipOptionalSpacesOrDelimiter();\n return flag;\n };\n Source.prototype.parseSegment = function () {\n const lookahead = this._string[this._currentIndex];\n let command = this._pathSegTypeFromChar(lookahead);\n if (command == window.SVGPathSeg.PATHSEG_UNKNOWN) {\n if (this._previousCommand == window.SVGPathSeg.PATHSEG_UNKNOWN) return null;\n command = this._nextCommandHelper(lookahead, this._previousCommand);\n if (command == window.SVGPathSeg.PATHSEG_UNKNOWN) return null;\n } else {\n this._currentIndex++;\n }\n this._previousCommand = command;\n let points;\n switch (command) {\n case window.SVGPathSeg.PATHSEG_MOVETO_REL:\n return new window.SVGPathSegMovetoRel(owningPathSegList, this._parseNumber(), this._parseNumber());\n case window.SVGPathSeg.PATHSEG_MOVETO_ABS:\n return new window.SVGPathSegMovetoAbs(owningPathSegList, this._parseNumber(), this._parseNumber());\n case window.SVGPathSeg.PATHSEG_LINETO_REL:\n return new window.SVGPathSegLinetoRel(owningPathSegList, this._parseNumber(), this._parseNumber());\n case window.SVGPathSeg.PATHSEG_LINETO_ABS:\n return new window.SVGPathSegLinetoAbs(owningPathSegList, this._parseNumber(), this._parseNumber());\n case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:\n return new window.SVGPathSegLinetoHorizontalRel(owningPathSegList, this._parseNumber());\n case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:\n return new window.SVGPathSegLinetoHorizontalAbs(owningPathSegList, this._parseNumber());\n case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:\n return new window.SVGPathSegLinetoVerticalRel(owningPathSegList, this._parseNumber());\n case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:\n return new window.SVGPathSegLinetoVerticalAbs(owningPathSegList, this._parseNumber());\n case window.SVGPathSeg.PATHSEG_CLOSEPATH:\n this._skipOptionalSpaces();\n return new window.SVGPathSegClosePath(owningPathSegList);\n case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:\n points = {\n x1: this._parseNumber(),\n y1: this._parseNumber(),\n x2: this._parseNumber(),\n y2: this._parseNumber(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegCurvetoCubicRel(owningPathSegList, points.x, points.y, points.x1, points.y1, points.x2, points.y2);\n case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:\n points = {\n x1: this._parseNumber(),\n y1: this._parseNumber(),\n x2: this._parseNumber(),\n y2: this._parseNumber(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegCurvetoCubicAbs(owningPathSegList, points.x, points.y, points.x1, points.y1, points.x2, points.y2);\n case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:\n points = {\n x2: this._parseNumber(),\n y2: this._parseNumber(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegCurvetoCubicSmoothRel(owningPathSegList, points.x, points.y, points.x2, points.y2);\n case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:\n points = {\n x2: this._parseNumber(),\n y2: this._parseNumber(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegCurvetoCubicSmoothAbs(owningPathSegList, points.x, points.y, points.x2, points.y2);\n case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:\n points = {\n x1: this._parseNumber(),\n y1: this._parseNumber(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegCurvetoQuadraticRel(owningPathSegList, points.x, points.y, points.x1, points.y1);\n case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:\n points = {\n x1: this._parseNumber(),\n y1: this._parseNumber(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegCurvetoQuadraticAbs(owningPathSegList, points.x, points.y, points.x1, points.y1);\n case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:\n return new window.SVGPathSegCurvetoQuadraticSmoothRel(owningPathSegList, this._parseNumber(), this._parseNumber());\n case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:\n return new window.SVGPathSegCurvetoQuadraticSmoothAbs(owningPathSegList, this._parseNumber(), this._parseNumber());\n case window.SVGPathSeg.PATHSEG_ARC_REL:\n points = {\n x1: this._parseNumber(),\n y1: this._parseNumber(),\n arcAngle: this._parseNumber(),\n arcLarge: this._parseArcFlag(),\n arcSweep: this._parseArcFlag(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegArcRel(owningPathSegList, points.x, points.y, points.x1, points.y1, points.arcAngle, points.arcLarge, points.arcSweep);\n case window.SVGPathSeg.PATHSEG_ARC_ABS:\n points = {\n x1: this._parseNumber(),\n y1: this._parseNumber(),\n arcAngle: this._parseNumber(),\n arcLarge: this._parseArcFlag(),\n arcSweep: this._parseArcFlag(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegArcAbs(owningPathSegList, points.x, points.y, points.x1, points.y1, points.arcAngle, points.arcLarge, points.arcSweep);\n default:\n throw \"Unknown path seg type.\";\n }\n };\n const builder = new Builder();\n const source = new Source(string);\n if (!source.initialCommandIsMoveTo()) return [];\n while (source.hasMoreData()) {\n const pathSeg = source.parseSegment();\n if (!pathSeg) return [];\n builder.appendSegment(pathSeg);\n }\n return builder.pathSegList;\n };\n }\n } catch (e) {\n console.warn(\"An error occurred in tsParticles pathseg polyfill. If the Polygon Mask is not working, please open an issue here: https://github.com/tsparticles/tsparticles\", e);\n }\n})();\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/pathseg.js?");
157
+ eval("{\n\n(function () {\n \"use strict\";\n\n try {\n if (typeof window === \"undefined\") return;\n if (!(\"SVGPathSeg\" in window)) {\n window.SVGPathSeg = function (type, typeAsLetter, owningPathSegList) {\n this.pathSegType = type;\n this.pathSegTypeAsLetter = typeAsLetter;\n this._owningPathSegList = owningPathSegList;\n };\n window.SVGPathSeg.prototype.classname = \"SVGPathSeg\";\n window.SVGPathSeg.PATHSEG_UNKNOWN = 0;\n window.SVGPathSeg.PATHSEG_CLOSEPATH = 1;\n window.SVGPathSeg.PATHSEG_MOVETO_ABS = 2;\n window.SVGPathSeg.PATHSEG_MOVETO_REL = 3;\n window.SVGPathSeg.PATHSEG_LINETO_ABS = 4;\n window.SVGPathSeg.PATHSEG_LINETO_REL = 5;\n window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS = 6;\n window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL = 7;\n window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS = 8;\n window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL = 9;\n window.SVGPathSeg.PATHSEG_ARC_ABS = 10;\n window.SVGPathSeg.PATHSEG_ARC_REL = 11;\n window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS = 12;\n window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL = 13;\n window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS = 14;\n window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL = 15;\n window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16;\n window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17;\n window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18;\n window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19;\n window.SVGPathSeg.prototype._segmentChanged = function () {\n if (this._owningPathSegList) this._owningPathSegList.segmentChanged(this);\n };\n window.SVGPathSegClosePath = function (owningPathSegList) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CLOSEPATH, \"z\", owningPathSegList);\n };\n window.SVGPathSegClosePath.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegClosePath.prototype.toString = function () {\n return \"[object SVGPathSegClosePath]\";\n };\n window.SVGPathSegClosePath.prototype._asPathString = function () {\n return this.pathSegTypeAsLetter;\n };\n window.SVGPathSegClosePath.prototype.clone = function () {\n return new window.SVGPathSegClosePath(undefined);\n };\n window.SVGPathSegMovetoAbs = function (owningPathSegList, x, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_MOVETO_ABS, \"M\", owningPathSegList);\n this._x = x;\n this._y = y;\n };\n window.SVGPathSegMovetoAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegMovetoAbs.prototype.toString = function () {\n return \"[object SVGPathSegMovetoAbs]\";\n };\n window.SVGPathSegMovetoAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;\n };\n window.SVGPathSegMovetoAbs.prototype.clone = function () {\n return new window.SVGPathSegMovetoAbs(undefined, this._x, this._y);\n };\n Object.defineProperty(window.SVGPathSegMovetoAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegMovetoAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegMovetoRel = function (owningPathSegList, x, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_MOVETO_REL, \"m\", owningPathSegList);\n this._x = x;\n this._y = y;\n };\n window.SVGPathSegMovetoRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegMovetoRel.prototype.toString = function () {\n return \"[object SVGPathSegMovetoRel]\";\n };\n window.SVGPathSegMovetoRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;\n };\n window.SVGPathSegMovetoRel.prototype.clone = function () {\n return new window.SVGPathSegMovetoRel(undefined, this._x, this._y);\n };\n Object.defineProperty(window.SVGPathSegMovetoRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegMovetoRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegLinetoAbs = function (owningPathSegList, x, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_ABS, \"L\", owningPathSegList);\n this._x = x;\n this._y = y;\n };\n window.SVGPathSegLinetoAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegLinetoAbs.prototype.toString = function () {\n return \"[object SVGPathSegLinetoAbs]\";\n };\n window.SVGPathSegLinetoAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;\n };\n window.SVGPathSegLinetoAbs.prototype.clone = function () {\n return new window.SVGPathSegLinetoAbs(undefined, this._x, this._y);\n };\n Object.defineProperty(window.SVGPathSegLinetoAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegLinetoAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegLinetoRel = function (owningPathSegList, x, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_REL, \"l\", owningPathSegList);\n this._x = x;\n this._y = y;\n };\n window.SVGPathSegLinetoRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegLinetoRel.prototype.toString = function () {\n return \"[object SVGPathSegLinetoRel]\";\n };\n window.SVGPathSegLinetoRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;\n };\n window.SVGPathSegLinetoRel.prototype.clone = function () {\n return new window.SVGPathSegLinetoRel(undefined, this._x, this._y);\n };\n Object.defineProperty(window.SVGPathSegLinetoRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegLinetoRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoCubicAbs = function (owningPathSegList, x, y, x1, y1, x2, y2) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS, \"C\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._x1 = x1;\n this._y1 = y1;\n this._x2 = x2;\n this._y2 = y2;\n };\n window.SVGPathSegCurvetoCubicAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoCubicAbs.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoCubicAbs]\";\n };\n window.SVGPathSegCurvetoCubicAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoCubicAbs.prototype.clone = function () {\n return new window.SVGPathSegCurvetoCubicAbs(undefined, this._x, this._y, this._x1, this._y1, this._x2, this._y2);\n };\n Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, \"x1\", {\n get: function () {\n return this._x1;\n },\n set: function (x1) {\n this._x1 = x1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, \"y1\", {\n get: function () {\n return this._y1;\n },\n set: function (y1) {\n this._y1 = y1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, \"x2\", {\n get: function () {\n return this._x2;\n },\n set: function (x2) {\n this._x2 = x2;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, \"y2\", {\n get: function () {\n return this._y2;\n },\n set: function (y2) {\n this._y2 = y2;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoCubicRel = function (owningPathSegList, x, y, x1, y1, x2, y2) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL, \"c\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._x1 = x1;\n this._y1 = y1;\n this._x2 = x2;\n this._y2 = y2;\n };\n window.SVGPathSegCurvetoCubicRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoCubicRel.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoCubicRel]\";\n };\n window.SVGPathSegCurvetoCubicRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoCubicRel.prototype.clone = function () {\n return new window.SVGPathSegCurvetoCubicRel(undefined, this._x, this._y, this._x1, this._y1, this._x2, this._y2);\n };\n Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, \"x1\", {\n get: function () {\n return this._x1;\n },\n set: function (x1) {\n this._x1 = x1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, \"y1\", {\n get: function () {\n return this._y1;\n },\n set: function (y1) {\n this._y1 = y1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, \"x2\", {\n get: function () {\n return this._x2;\n },\n set: function (x2) {\n this._x2 = x2;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, \"y2\", {\n get: function () {\n return this._y2;\n },\n set: function (y2) {\n this._y2 = y2;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoQuadraticAbs = function (owningPathSegList, x, y, x1, y1) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS, \"Q\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._x1 = x1;\n this._y1 = y1;\n };\n window.SVGPathSegCurvetoQuadraticAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoQuadraticAbs.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoQuadraticAbs]\";\n };\n window.SVGPathSegCurvetoQuadraticAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoQuadraticAbs.prototype.clone = function () {\n return new window.SVGPathSegCurvetoQuadraticAbs(undefined, this._x, this._y, this._x1, this._y1);\n };\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, \"x1\", {\n get: function () {\n return this._x1;\n },\n set: function (x1) {\n this._x1 = x1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, \"y1\", {\n get: function () {\n return this._y1;\n },\n set: function (y1) {\n this._y1 = y1;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoQuadraticRel = function (owningPathSegList, x, y, x1, y1) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL, \"q\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._x1 = x1;\n this._y1 = y1;\n };\n window.SVGPathSegCurvetoQuadraticRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoQuadraticRel.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoQuadraticRel]\";\n };\n window.SVGPathSegCurvetoQuadraticRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoQuadraticRel.prototype.clone = function () {\n return new window.SVGPathSegCurvetoQuadraticRel(undefined, this._x, this._y, this._x1, this._y1);\n };\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, \"x1\", {\n get: function () {\n return this._x1;\n },\n set: function (x1) {\n this._x1 = x1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, \"y1\", {\n get: function () {\n return this._y1;\n },\n set: function (y1) {\n this._y1 = y1;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegArcAbs = function (owningPathSegList, x, y, r1, r2, angle, largeArcFlag, sweepFlag) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_ARC_ABS, \"A\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._r1 = r1;\n this._r2 = r2;\n this._angle = angle;\n this._largeArcFlag = largeArcFlag;\n this._sweepFlag = sweepFlag;\n };\n window.SVGPathSegArcAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegArcAbs.prototype.toString = function () {\n return \"[object SVGPathSegArcAbs]\";\n };\n window.SVGPathSegArcAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag ? \"1\" : \"0\"} ${this._sweepFlag ? \"1\" : \"0\"} ${this._x} ${this._y}`;\n };\n window.SVGPathSegArcAbs.prototype.clone = function () {\n return new window.SVGPathSegArcAbs(undefined, this._x, this._y, this._r1, this._r2, this._angle, this._largeArcFlag, this._sweepFlag);\n };\n Object.defineProperty(window.SVGPathSegArcAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcAbs.prototype, \"r1\", {\n get: function () {\n return this._r1;\n },\n set: function (r1) {\n this._r1 = r1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcAbs.prototype, \"r2\", {\n get: function () {\n return this._r2;\n },\n set: function (r2) {\n this._r2 = r2;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcAbs.prototype, \"angle\", {\n get: function () {\n return this._angle;\n },\n set: function (angle) {\n this._angle = angle;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcAbs.prototype, \"largeArcFlag\", {\n get: function () {\n return this._largeArcFlag;\n },\n set: function (largeArcFlag) {\n this._largeArcFlag = largeArcFlag;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcAbs.prototype, \"sweepFlag\", {\n get: function () {\n return this._sweepFlag;\n },\n set: function (sweepFlag) {\n this._sweepFlag = sweepFlag;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegArcRel = function (owningPathSegList, x, y, r1, r2, angle, largeArcFlag, sweepFlag) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_ARC_REL, \"a\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._r1 = r1;\n this._r2 = r2;\n this._angle = angle;\n this._largeArcFlag = largeArcFlag;\n this._sweepFlag = sweepFlag;\n };\n window.SVGPathSegArcRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegArcRel.prototype.toString = function () {\n return \"[object SVGPathSegArcRel]\";\n };\n window.SVGPathSegArcRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag ? \"1\" : \"0\"} ${this._sweepFlag ? \"1\" : \"0\"} ${this._x} ${this._y}`;\n };\n window.SVGPathSegArcRel.prototype.clone = function () {\n return new window.SVGPathSegArcRel(undefined, this._x, this._y, this._r1, this._r2, this._angle, this._largeArcFlag, this._sweepFlag);\n };\n Object.defineProperty(window.SVGPathSegArcRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcRel.prototype, \"r1\", {\n get: function () {\n return this._r1;\n },\n set: function (r1) {\n this._r1 = r1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcRel.prototype, \"r2\", {\n get: function () {\n return this._r2;\n },\n set: function (r2) {\n this._r2 = r2;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcRel.prototype, \"angle\", {\n get: function () {\n return this._angle;\n },\n set: function (angle) {\n this._angle = angle;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcRel.prototype, \"largeArcFlag\", {\n get: function () {\n return this._largeArcFlag;\n },\n set: function (largeArcFlag) {\n this._largeArcFlag = largeArcFlag;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcRel.prototype, \"sweepFlag\", {\n get: function () {\n return this._sweepFlag;\n },\n set: function (sweepFlag) {\n this._sweepFlag = sweepFlag;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegLinetoHorizontalAbs = function (owningPathSegList, x) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS, \"H\", owningPathSegList);\n this._x = x;\n };\n window.SVGPathSegLinetoHorizontalAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegLinetoHorizontalAbs.prototype.toString = function () {\n return \"[object SVGPathSegLinetoHorizontalAbs]\";\n };\n window.SVGPathSegLinetoHorizontalAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x}`;\n };\n window.SVGPathSegLinetoHorizontalAbs.prototype.clone = function () {\n return new window.SVGPathSegLinetoHorizontalAbs(undefined, this._x);\n };\n Object.defineProperty(window.SVGPathSegLinetoHorizontalAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegLinetoHorizontalRel = function (owningPathSegList, x) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL, \"h\", owningPathSegList);\n this._x = x;\n };\n window.SVGPathSegLinetoHorizontalRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegLinetoHorizontalRel.prototype.toString = function () {\n return \"[object SVGPathSegLinetoHorizontalRel]\";\n };\n window.SVGPathSegLinetoHorizontalRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x}`;\n };\n window.SVGPathSegLinetoHorizontalRel.prototype.clone = function () {\n return new window.SVGPathSegLinetoHorizontalRel(undefined, this._x);\n };\n Object.defineProperty(window.SVGPathSegLinetoHorizontalRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegLinetoVerticalAbs = function (owningPathSegList, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS, \"V\", owningPathSegList);\n this._y = y;\n };\n window.SVGPathSegLinetoVerticalAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegLinetoVerticalAbs.prototype.toString = function () {\n return \"[object SVGPathSegLinetoVerticalAbs]\";\n };\n window.SVGPathSegLinetoVerticalAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._y}`;\n };\n window.SVGPathSegLinetoVerticalAbs.prototype.clone = function () {\n return new window.SVGPathSegLinetoVerticalAbs(undefined, this._y);\n };\n Object.defineProperty(window.SVGPathSegLinetoVerticalAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegLinetoVerticalRel = function (owningPathSegList, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL, \"v\", owningPathSegList);\n this._y = y;\n };\n window.SVGPathSegLinetoVerticalRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegLinetoVerticalRel.prototype.toString = function () {\n return \"[object SVGPathSegLinetoVerticalRel]\";\n };\n window.SVGPathSegLinetoVerticalRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._y}`;\n };\n window.SVGPathSegLinetoVerticalRel.prototype.clone = function () {\n return new window.SVGPathSegLinetoVerticalRel(undefined, this._y);\n };\n Object.defineProperty(window.SVGPathSegLinetoVerticalRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoCubicSmoothAbs = function (owningPathSegList, x, y, x2, y2) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS, \"S\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._x2 = x2;\n this._y2 = y2;\n };\n window.SVGPathSegCurvetoCubicSmoothAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoCubicSmoothAbs.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoCubicSmoothAbs]\";\n };\n window.SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoCubicSmoothAbs.prototype.clone = function () {\n return new window.SVGPathSegCurvetoCubicSmoothAbs(undefined, this._x, this._y, this._x2, this._y2);\n };\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, \"x2\", {\n get: function () {\n return this._x2;\n },\n set: function (x2) {\n this._x2 = x2;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, \"y2\", {\n get: function () {\n return this._y2;\n },\n set: function (y2) {\n this._y2 = y2;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoCubicSmoothRel = function (owningPathSegList, x, y, x2, y2) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL, \"s\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._x2 = x2;\n this._y2 = y2;\n };\n window.SVGPathSegCurvetoCubicSmoothRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoCubicSmoothRel.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoCubicSmoothRel]\";\n };\n window.SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoCubicSmoothRel.prototype.clone = function () {\n return new window.SVGPathSegCurvetoCubicSmoothRel(undefined, this._x, this._y, this._x2, this._y2);\n };\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, \"x2\", {\n get: function () {\n return this._x2;\n },\n set: function (x2) {\n this._x2 = x2;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, \"y2\", {\n get: function () {\n return this._y2;\n },\n set: function (y2) {\n this._y2 = y2;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoQuadraticSmoothAbs = function (owningPathSegList, x, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS, \"T\", owningPathSegList);\n this._x = x;\n this._y = y;\n };\n window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoQuadraticSmoothAbs]\";\n };\n window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone = function () {\n return new window.SVGPathSegCurvetoQuadraticSmoothAbs(undefined, this._x, this._y);\n };\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoQuadraticSmoothRel = function (owningPathSegList, x, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL, \"t\", owningPathSegList);\n this._x = x;\n this._y = y;\n };\n window.SVGPathSegCurvetoQuadraticSmoothRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoQuadraticSmoothRel]\";\n };\n window.SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone = function () {\n return new window.SVGPathSegCurvetoQuadraticSmoothRel(undefined, this._x, this._y);\n };\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathElement.prototype.createSVGPathSegClosePath = function () {\n return new window.SVGPathSegClosePath(undefined);\n };\n window.SVGPathElement.prototype.createSVGPathSegMovetoAbs = function (x, y) {\n return new window.SVGPathSegMovetoAbs(undefined, x, y);\n };\n window.SVGPathElement.prototype.createSVGPathSegMovetoRel = function (x, y) {\n return new window.SVGPathSegMovetoRel(undefined, x, y);\n };\n window.SVGPathElement.prototype.createSVGPathSegLinetoAbs = function (x, y) {\n return new window.SVGPathSegLinetoAbs(undefined, x, y);\n };\n window.SVGPathElement.prototype.createSVGPathSegLinetoRel = function (x, y) {\n return new window.SVGPathSegLinetoRel(undefined, x, y);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs = function (x, y, x1, y1, x2, y2) {\n return new window.SVGPathSegCurvetoCubicAbs(undefined, x, y, x1, y1, x2, y2);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel = function (x, y, x1, y1, x2, y2) {\n return new window.SVGPathSegCurvetoCubicRel(undefined, x, y, x1, y1, x2, y2);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs = function (x, y, x1, y1) {\n return new window.SVGPathSegCurvetoQuadraticAbs(undefined, x, y, x1, y1);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel = function (x, y, x1, y1) {\n return new window.SVGPathSegCurvetoQuadraticRel(undefined, x, y, x1, y1);\n };\n window.SVGPathElement.prototype.createSVGPathSegArcAbs = function (x, y, r1, r2, angle, largeArcFlag, sweepFlag) {\n return new window.SVGPathSegArcAbs(undefined, x, y, r1, r2, angle, largeArcFlag, sweepFlag);\n };\n window.SVGPathElement.prototype.createSVGPathSegArcRel = function (x, y, r1, r2, angle, largeArcFlag, sweepFlag) {\n return new window.SVGPathSegArcRel(undefined, x, y, r1, r2, angle, largeArcFlag, sweepFlag);\n };\n window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs = function (x) {\n return new window.SVGPathSegLinetoHorizontalAbs(undefined, x);\n };\n window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel = function (x) {\n return new window.SVGPathSegLinetoHorizontalRel(undefined, x);\n };\n window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs = function (y) {\n return new window.SVGPathSegLinetoVerticalAbs(undefined, y);\n };\n window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel = function (y) {\n return new window.SVGPathSegLinetoVerticalRel(undefined, y);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs = function (x, y, x2, y2) {\n return new window.SVGPathSegCurvetoCubicSmoothAbs(undefined, x, y, x2, y2);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel = function (x, y, x2, y2) {\n return new window.SVGPathSegCurvetoCubicSmoothRel(undefined, x, y, x2, y2);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs = function (x, y) {\n return new window.SVGPathSegCurvetoQuadraticSmoothAbs(undefined, x, y);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel = function (x, y) {\n return new window.SVGPathSegCurvetoQuadraticSmoothRel(undefined, x, y);\n };\n if (!(\"getPathSegAtLength\" in window.SVGPathElement.prototype)) {\n window.SVGPathElement.prototype.getPathSegAtLength = function (distance) {\n if (distance === undefined || !isFinite(distance)) throw \"Invalid arguments.\";\n const measurementElement = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n measurementElement.setAttribute(\"d\", this.getAttribute(\"d\"));\n let lastPathSegment = measurementElement.pathSegList.numberOfItems - 1;\n if (lastPathSegment <= 0) return 0;\n do {\n measurementElement.pathSegList.removeItem(lastPathSegment);\n if (distance > measurementElement.getTotalLength()) break;\n lastPathSegment--;\n } while (lastPathSegment > 0);\n return lastPathSegment;\n };\n }\n }\n if (!(\"SVGPathSegList\" in window) || !(\"appendItem\" in window.SVGPathSegList.prototype)) {\n window.SVGPathSegList = function (pathElement) {\n this._pathElement = pathElement;\n this._list = this._parsePath(this._pathElement.getAttribute(\"d\"));\n this._mutationObserverConfig = {\n attributes: true,\n attributeFilter: [\"d\"]\n };\n this._pathElementMutationObserver = new MutationObserver(this._updateListFromPathMutations.bind(this));\n this._pathElementMutationObserver.observe(this._pathElement, this._mutationObserverConfig);\n };\n window.SVGPathSegList.prototype.classname = \"SVGPathSegList\";\n Object.defineProperty(window.SVGPathSegList.prototype, \"numberOfItems\", {\n get: function () {\n this._checkPathSynchronizedToList();\n return this._list.length;\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegList.prototype, \"length\", {\n get: function () {\n this._checkPathSynchronizedToList();\n return this._list.length;\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathElement.prototype, \"pathSegList\", {\n get: function () {\n if (!this._pathSegList) this._pathSegList = new window.SVGPathSegList(this);\n return this._pathSegList;\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathElement.prototype, \"normalizedPathSegList\", {\n get: function () {\n return this.pathSegList;\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathElement.prototype, \"animatedPathSegList\", {\n get: function () {\n return this.pathSegList;\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathElement.prototype, \"animatedNormalizedPathSegList\", {\n get: function () {\n return this.pathSegList;\n },\n enumerable: true\n });\n window.SVGPathSegList.prototype._checkPathSynchronizedToList = function () {\n this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords());\n };\n window.SVGPathSegList.prototype._updateListFromPathMutations = function (mutationRecords) {\n if (!this._pathElement) return;\n let hasPathMutations = false;\n mutationRecords.forEach(function (record) {\n if (record.attributeName == \"d\") hasPathMutations = true;\n });\n if (hasPathMutations) this._list = this._parsePath(this._pathElement.getAttribute(\"d\"));\n };\n window.SVGPathSegList.prototype._writeListToPath = function () {\n this._pathElementMutationObserver.disconnect();\n this._pathElement.setAttribute(\"d\", window.SVGPathSegList._pathSegArrayAsString(this._list));\n this._pathElementMutationObserver.observe(this._pathElement, this._mutationObserverConfig);\n };\n window.SVGPathSegList.prototype.segmentChanged = function () {\n this._writeListToPath();\n };\n window.SVGPathSegList.prototype.clear = function () {\n this._checkPathSynchronizedToList();\n this._list.forEach(function (pathSeg) {\n pathSeg._owningPathSegList = null;\n });\n this._list = [];\n this._writeListToPath();\n };\n window.SVGPathSegList.prototype.initialize = function (newItem) {\n this._checkPathSynchronizedToList();\n this._list = [newItem];\n newItem._owningPathSegList = this;\n this._writeListToPath();\n return newItem;\n };\n window.SVGPathSegList.prototype._checkValidIndex = function (index) {\n if (isNaN(index) || index < 0 || index >= this.numberOfItems) throw \"INDEX_SIZE_ERR\";\n };\n window.SVGPathSegList.prototype.getItem = function (index) {\n this._checkPathSynchronizedToList();\n this._checkValidIndex(index);\n return this._list[index];\n };\n window.SVGPathSegList.prototype.insertItemBefore = function (newItem, index) {\n this._checkPathSynchronizedToList();\n if (index > this.numberOfItems) index = this.numberOfItems;\n if (newItem._owningPathSegList) {\n newItem = newItem.clone();\n }\n this._list.splice(index, 0, newItem);\n newItem._owningPathSegList = this;\n this._writeListToPath();\n return newItem;\n };\n window.SVGPathSegList.prototype.replaceItem = function (newItem, index) {\n this._checkPathSynchronizedToList();\n if (newItem._owningPathSegList) {\n newItem = newItem.clone();\n }\n this._checkValidIndex(index);\n this._list[index] = newItem;\n newItem._owningPathSegList = this;\n this._writeListToPath();\n return newItem;\n };\n window.SVGPathSegList.prototype.removeItem = function (index) {\n this._checkPathSynchronizedToList();\n this._checkValidIndex(index);\n const item = this._list[index];\n this._list.splice(index, 1);\n this._writeListToPath();\n return item;\n };\n window.SVGPathSegList.prototype.appendItem = function (newItem) {\n this._checkPathSynchronizedToList();\n if (newItem._owningPathSegList) {\n newItem = newItem.clone();\n }\n this._list.push(newItem);\n newItem._owningPathSegList = this;\n this._writeListToPath();\n return newItem;\n };\n window.SVGPathSegList._pathSegArrayAsString = function (pathSegArray) {\n let string = \"\";\n let first = true;\n pathSegArray.forEach(function (pathSeg) {\n if (first) {\n first = false;\n string += pathSeg._asPathString();\n } else {\n string += ` ${pathSeg._asPathString()}`;\n }\n });\n return string;\n };\n window.SVGPathSegList.prototype._parsePath = function (string) {\n if (!string || !string.length) return [];\n const owningPathSegList = this;\n const Builder = function () {\n this.pathSegList = [];\n };\n Builder.prototype.appendSegment = function (pathSeg) {\n this.pathSegList.push(pathSeg);\n };\n const Source = function (string) {\n this._string = string;\n this._currentIndex = 0;\n this._endIndex = this._string.length;\n this._previousCommand = window.SVGPathSeg.PATHSEG_UNKNOWN;\n this._skipOptionalSpaces();\n };\n Source.prototype._isCurrentSpace = function () {\n const character = this._string[this._currentIndex];\n return character <= \" \" && (character == \" \" || character == \"\\n\" || character == \"\\t\" || character == \"\\r\" || character == \"\\f\");\n };\n Source.prototype._skipOptionalSpaces = function () {\n while (this._currentIndex < this._endIndex && this._isCurrentSpace()) this._currentIndex++;\n return this._currentIndex < this._endIndex;\n };\n Source.prototype._skipOptionalSpacesOrDelimiter = function () {\n if (this._currentIndex < this._endIndex && !this._isCurrentSpace() && this._string.charAt(this._currentIndex) != \",\") return false;\n if (this._skipOptionalSpaces()) {\n if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == \",\") {\n this._currentIndex++;\n this._skipOptionalSpaces();\n }\n }\n return this._currentIndex < this._endIndex;\n };\n Source.prototype.hasMoreData = function () {\n return this._currentIndex < this._endIndex;\n };\n Source.prototype.peekSegmentType = function () {\n const lookahead = this._string[this._currentIndex];\n return this._pathSegTypeFromChar(lookahead);\n };\n Source.prototype._pathSegTypeFromChar = function (lookahead) {\n switch (lookahead) {\n case \"Z\":\n case \"z\":\n return window.SVGPathSeg.PATHSEG_CLOSEPATH;\n case \"M\":\n return window.SVGPathSeg.PATHSEG_MOVETO_ABS;\n case \"m\":\n return window.SVGPathSeg.PATHSEG_MOVETO_REL;\n case \"L\":\n return window.SVGPathSeg.PATHSEG_LINETO_ABS;\n case \"l\":\n return window.SVGPathSeg.PATHSEG_LINETO_REL;\n case \"C\":\n return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;\n case \"c\":\n return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;\n case \"Q\":\n return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;\n case \"q\":\n return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;\n case \"A\":\n return window.SVGPathSeg.PATHSEG_ARC_ABS;\n case \"a\":\n return window.SVGPathSeg.PATHSEG_ARC_REL;\n case \"H\":\n return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;\n case \"h\":\n return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;\n case \"V\":\n return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;\n case \"v\":\n return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;\n case \"S\":\n return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;\n case \"s\":\n return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;\n case \"T\":\n return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;\n case \"t\":\n return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;\n default:\n return window.SVGPathSeg.PATHSEG_UNKNOWN;\n }\n };\n Source.prototype._nextCommandHelper = function (lookahead, previousCommand) {\n if ((lookahead == \"+\" || lookahead == \"-\" || lookahead == \".\" || lookahead >= \"0\" && lookahead <= \"9\") && previousCommand != window.SVGPathSeg.PATHSEG_CLOSEPATH) {\n if (previousCommand == window.SVGPathSeg.PATHSEG_MOVETO_ABS) return window.SVGPathSeg.PATHSEG_LINETO_ABS;\n if (previousCommand == window.SVGPathSeg.PATHSEG_MOVETO_REL) return window.SVGPathSeg.PATHSEG_LINETO_REL;\n return previousCommand;\n }\n return window.SVGPathSeg.PATHSEG_UNKNOWN;\n };\n Source.prototype.initialCommandIsMoveTo = function () {\n if (!this.hasMoreData()) return true;\n const command = this.peekSegmentType();\n return command == window.SVGPathSeg.PATHSEG_MOVETO_ABS || command == window.SVGPathSeg.PATHSEG_MOVETO_REL;\n };\n Source.prototype._parseNumber = function () {\n let exponent = 0;\n let integer = 0;\n let frac = 1;\n let decimal = 0;\n let sign = 1;\n let expsign = 1;\n const startIndex = this._currentIndex;\n this._skipOptionalSpaces();\n if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == \"+\") this._currentIndex++;else if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == \"-\") {\n this._currentIndex++;\n sign = -1;\n }\n if (this._currentIndex == this._endIndex || (this._string.charAt(this._currentIndex) < \"0\" || this._string.charAt(this._currentIndex) > \"9\") && this._string.charAt(this._currentIndex) != \".\") return undefined;\n const startIntPartIndex = this._currentIndex;\n while (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= \"0\" && this._string.charAt(this._currentIndex) <= \"9\") this._currentIndex++;\n if (this._currentIndex != startIntPartIndex) {\n let scanIntPartIndex = this._currentIndex - 1;\n let multiplier = 1;\n while (scanIntPartIndex >= startIntPartIndex) {\n integer += multiplier * (this._string.charAt(scanIntPartIndex--) - \"0\");\n multiplier *= 10;\n }\n }\n if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == \".\") {\n this._currentIndex++;\n if (this._currentIndex >= this._endIndex || this._string.charAt(this._currentIndex) < \"0\" || this._string.charAt(this._currentIndex) > \"9\") return undefined;\n while (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= \"0\" && this._string.charAt(this._currentIndex) <= \"9\") {\n frac *= 10;\n decimal += (this._string.charAt(this._currentIndex) - \"0\") / frac;\n this._currentIndex += 1;\n }\n }\n if (this._currentIndex != startIndex && this._currentIndex + 1 < this._endIndex && (this._string.charAt(this._currentIndex) == \"e\" || this._string.charAt(this._currentIndex) == \"E\") && this._string.charAt(this._currentIndex + 1) != \"x\" && this._string.charAt(this._currentIndex + 1) != \"m\") {\n this._currentIndex++;\n if (this._string.charAt(this._currentIndex) == \"+\") {\n this._currentIndex++;\n } else if (this._string.charAt(this._currentIndex) == \"-\") {\n this._currentIndex++;\n expsign = -1;\n }\n if (this._currentIndex >= this._endIndex || this._string.charAt(this._currentIndex) < \"0\" || this._string.charAt(this._currentIndex) > \"9\") return undefined;\n while (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= \"0\" && this._string.charAt(this._currentIndex) <= \"9\") {\n exponent *= 10;\n exponent += this._string.charAt(this._currentIndex) - \"0\";\n this._currentIndex++;\n }\n }\n let number = integer + decimal;\n number *= sign;\n if (exponent) number *= Math.pow(10, expsign * exponent);\n if (startIndex == this._currentIndex) return undefined;\n this._skipOptionalSpacesOrDelimiter();\n return number;\n };\n Source.prototype._parseArcFlag = function () {\n if (this._currentIndex >= this._endIndex) return undefined;\n let flag = false;\n const flagChar = this._string.charAt(this._currentIndex++);\n if (flagChar == \"0\") flag = false;else if (flagChar == \"1\") flag = true;else return undefined;\n this._skipOptionalSpacesOrDelimiter();\n return flag;\n };\n Source.prototype.parseSegment = function () {\n const lookahead = this._string[this._currentIndex];\n let command = this._pathSegTypeFromChar(lookahead);\n if (command == window.SVGPathSeg.PATHSEG_UNKNOWN) {\n if (this._previousCommand == window.SVGPathSeg.PATHSEG_UNKNOWN) return null;\n command = this._nextCommandHelper(lookahead, this._previousCommand);\n if (command == window.SVGPathSeg.PATHSEG_UNKNOWN) return null;\n } else {\n this._currentIndex++;\n }\n this._previousCommand = command;\n let points;\n switch (command) {\n case window.SVGPathSeg.PATHSEG_MOVETO_REL:\n return new window.SVGPathSegMovetoRel(owningPathSegList, this._parseNumber(), this._parseNumber());\n case window.SVGPathSeg.PATHSEG_MOVETO_ABS:\n return new window.SVGPathSegMovetoAbs(owningPathSegList, this._parseNumber(), this._parseNumber());\n case window.SVGPathSeg.PATHSEG_LINETO_REL:\n return new window.SVGPathSegLinetoRel(owningPathSegList, this._parseNumber(), this._parseNumber());\n case window.SVGPathSeg.PATHSEG_LINETO_ABS:\n return new window.SVGPathSegLinetoAbs(owningPathSegList, this._parseNumber(), this._parseNumber());\n case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:\n return new window.SVGPathSegLinetoHorizontalRel(owningPathSegList, this._parseNumber());\n case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:\n return new window.SVGPathSegLinetoHorizontalAbs(owningPathSegList, this._parseNumber());\n case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:\n return new window.SVGPathSegLinetoVerticalRel(owningPathSegList, this._parseNumber());\n case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:\n return new window.SVGPathSegLinetoVerticalAbs(owningPathSegList, this._parseNumber());\n case window.SVGPathSeg.PATHSEG_CLOSEPATH:\n this._skipOptionalSpaces();\n return new window.SVGPathSegClosePath(owningPathSegList);\n case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:\n points = {\n x1: this._parseNumber(),\n y1: this._parseNumber(),\n x2: this._parseNumber(),\n y2: this._parseNumber(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegCurvetoCubicRel(owningPathSegList, points.x, points.y, points.x1, points.y1, points.x2, points.y2);\n case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:\n points = {\n x1: this._parseNumber(),\n y1: this._parseNumber(),\n x2: this._parseNumber(),\n y2: this._parseNumber(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegCurvetoCubicAbs(owningPathSegList, points.x, points.y, points.x1, points.y1, points.x2, points.y2);\n case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:\n points = {\n x2: this._parseNumber(),\n y2: this._parseNumber(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegCurvetoCubicSmoothRel(owningPathSegList, points.x, points.y, points.x2, points.y2);\n case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:\n points = {\n x2: this._parseNumber(),\n y2: this._parseNumber(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegCurvetoCubicSmoothAbs(owningPathSegList, points.x, points.y, points.x2, points.y2);\n case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:\n points = {\n x1: this._parseNumber(),\n y1: this._parseNumber(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegCurvetoQuadraticRel(owningPathSegList, points.x, points.y, points.x1, points.y1);\n case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:\n points = {\n x1: this._parseNumber(),\n y1: this._parseNumber(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegCurvetoQuadraticAbs(owningPathSegList, points.x, points.y, points.x1, points.y1);\n case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:\n return new window.SVGPathSegCurvetoQuadraticSmoothRel(owningPathSegList, this._parseNumber(), this._parseNumber());\n case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:\n return new window.SVGPathSegCurvetoQuadraticSmoothAbs(owningPathSegList, this._parseNumber(), this._parseNumber());\n case window.SVGPathSeg.PATHSEG_ARC_REL:\n points = {\n x1: this._parseNumber(),\n y1: this._parseNumber(),\n arcAngle: this._parseNumber(),\n arcLarge: this._parseArcFlag(),\n arcSweep: this._parseArcFlag(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegArcRel(owningPathSegList, points.x, points.y, points.x1, points.y1, points.arcAngle, points.arcLarge, points.arcSweep);\n case window.SVGPathSeg.PATHSEG_ARC_ABS:\n points = {\n x1: this._parseNumber(),\n y1: this._parseNumber(),\n arcAngle: this._parseNumber(),\n arcLarge: this._parseArcFlag(),\n arcSweep: this._parseArcFlag(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegArcAbs(owningPathSegList, points.x, points.y, points.x1, points.y1, points.arcAngle, points.arcLarge, points.arcSweep);\n default:\n throw \"Unknown path seg type.\";\n }\n };\n const builder = new Builder();\n const source = new Source(string);\n if (!source.initialCommandIsMoveTo()) return [];\n while (source.hasMoreData()) {\n const pathSeg = source.parseSegment();\n if (!pathSeg) return [];\n builder.appendSegment(pathSeg);\n }\n return builder.pathSegList;\n };\n }\n } catch (e) {\n console.warn(\"An error occurred in tsParticles pathseg polyfill. If the Polygon Mask is not working, please open an issue here: https://github.com/tsparticles/tsparticles\", e);\n }\n})();\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/pathseg.js?\n}");
158
158
 
159
159
  /***/ }),
160
160
 
@@ -164,7 +164,7 @@ eval("\n\n(function () {\n \"use strict\";\n\n try {\n if (typeof window ==
164
164
  \*******************************/
165
165
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
166
166
 
167
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ calcClosestPointOnSegment: () => (/* binding */ calcClosestPointOnSegment),\n/* harmony export */ drawPolygonMask: () => (/* binding */ drawPolygonMask),\n/* harmony export */ drawPolygonMaskPath: () => (/* binding */ drawPolygonMaskPath),\n/* harmony export */ parsePaths: () => (/* binding */ parsePaths),\n/* harmony export */ segmentBounce: () => (/* binding */ segmentBounce)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nconst squareExp = 2,\n inSegmentRange = {\n min: 0,\n max: 1\n },\n double = 2;\nfunction drawPolygonMask(engine, context, rawData, stroke) {\n const color = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.rangeColorToRgb)(engine, stroke.color);\n if (!color) {\n return;\n }\n const firstIndex = 0,\n firstItem = rawData[firstIndex];\n context.beginPath();\n context.moveTo(firstItem.x, firstItem.y);\n for (const item of rawData) {\n context.lineTo(item.x, item.y);\n }\n context.closePath();\n context.strokeStyle = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getStyleFromRgb)(color);\n context.lineWidth = stroke.width;\n context.stroke();\n}\nfunction drawPolygonMaskPath(engine, context, path, stroke, position) {\n const defaultTransform = {\n a: 1,\n b: 0,\n c: 0,\n d: 1\n };\n context.setTransform(defaultTransform.a, defaultTransform.b, defaultTransform.c, defaultTransform.d, position.x, position.y);\n const color = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.rangeColorToRgb)(engine, stroke.color);\n if (!color) {\n return;\n }\n context.strokeStyle = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getStyleFromRgb)(color, stroke.opacity);\n context.lineWidth = stroke.width;\n context.stroke(path);\n context.resetTransform();\n}\nfunction parsePaths(paths, scale, offset) {\n const res = [],\n defaultCount = 0;\n for (const path of paths) {\n const segments = path.element.pathSegList,\n len = segments?.numberOfItems ?? defaultCount,\n p = {\n x: 0,\n y: 0\n };\n for (let i = 0; i < len; i++) {\n const segment = segments?.getItem(i),\n svgPathSeg = window.SVGPathSeg;\n switch (segment?.pathSegType) {\n case svgPathSeg.PATHSEG_MOVETO_ABS:\n case svgPathSeg.PATHSEG_LINETO_ABS:\n case svgPathSeg.PATHSEG_CURVETO_CUBIC_ABS:\n case svgPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:\n case svgPathSeg.PATHSEG_ARC_ABS:\n case svgPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:\n case svgPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:\n {\n const absSeg = segment;\n p.x = absSeg.x;\n p.y = absSeg.y;\n break;\n }\n case svgPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:\n p.x = segment.x;\n break;\n case svgPathSeg.PATHSEG_LINETO_VERTICAL_ABS:\n p.y = segment.y;\n break;\n case svgPathSeg.PATHSEG_LINETO_REL:\n case svgPathSeg.PATHSEG_MOVETO_REL:\n case svgPathSeg.PATHSEG_CURVETO_CUBIC_REL:\n case svgPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:\n case svgPathSeg.PATHSEG_ARC_REL:\n case svgPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:\n case svgPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:\n {\n const relSeg = segment;\n p.x += relSeg.x;\n p.y += relSeg.y;\n break;\n }\n case svgPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:\n p.x += segment.x;\n break;\n case svgPathSeg.PATHSEG_LINETO_VERTICAL_REL:\n p.y += segment.y;\n break;\n case svgPathSeg.PATHSEG_UNKNOWN:\n case svgPathSeg.PATHSEG_CLOSEPATH:\n continue;\n }\n res.push({\n x: p.x * scale + offset.x,\n y: p.y * scale + offset.y\n });\n }\n }\n return res;\n}\nfunction calcClosestPointOnSegment(s1, s2, pos) {\n const {\n dx: dx1,\n dy: dy1\n } = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(pos, s1),\n {\n dx: dx2,\n dy: dy2\n } = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(s2, s1),\n t = (dx1 * dx2 + dy1 * dy2) / (dx2 ** squareExp + dy2 ** squareExp),\n res = {\n x: s1.x + dx2 * t,\n y: s1.y + dy2 * t,\n isOnSegment: t >= inSegmentRange.min && t <= inSegmentRange.max\n };\n if (t < inSegmentRange.min) {\n res.x = s1.x;\n res.y = s1.y;\n } else if (t > inSegmentRange.max) {\n res.x = s2.x;\n res.y = s2.y;\n }\n return res;\n}\nfunction segmentBounce(start, stop, velocity) {\n const {\n dx,\n dy\n } = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(start, stop),\n wallAngle = Math.atan2(dy, dx),\n wallNormal = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Vector.create(Math.sin(wallAngle), -Math.cos(wallAngle)),\n d = double * (velocity.x * wallNormal.x + velocity.y * wallNormal.y);\n wallNormal.multTo(d);\n velocity.subFrom(wallNormal);\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/utils.js?");
167
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ calcClosestPointOnSegment: () => (/* binding */ calcClosestPointOnSegment),\n/* harmony export */ drawPolygonMask: () => (/* binding */ drawPolygonMask),\n/* harmony export */ drawPolygonMaskPath: () => (/* binding */ drawPolygonMaskPath),\n/* harmony export */ parsePaths: () => (/* binding */ parsePaths),\n/* harmony export */ segmentBounce: () => (/* binding */ segmentBounce)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nconst squareExp = 2,\n inSegmentRange = {\n min: 0,\n max: 1\n },\n double = 2;\nfunction drawPolygonMask(engine, context, rawData, stroke) {\n const color = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.rangeColorToRgb)(engine, stroke.color);\n if (!color) {\n return;\n }\n const firstIndex = 0,\n firstItem = rawData[firstIndex];\n context.beginPath();\n context.moveTo(firstItem.x, firstItem.y);\n for (const item of rawData) {\n context.lineTo(item.x, item.y);\n }\n context.closePath();\n context.strokeStyle = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getStyleFromRgb)(color);\n context.lineWidth = stroke.width;\n context.stroke();\n}\nfunction drawPolygonMaskPath(engine, context, path, stroke, position) {\n const defaultTransform = {\n a: 1,\n b: 0,\n c: 0,\n d: 1\n };\n context.setTransform(defaultTransform.a, defaultTransform.b, defaultTransform.c, defaultTransform.d, position.x, position.y);\n const color = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.rangeColorToRgb)(engine, stroke.color);\n if (!color) {\n return;\n }\n context.strokeStyle = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getStyleFromRgb)(color, stroke.opacity);\n context.lineWidth = stroke.width;\n context.stroke(path);\n context.resetTransform();\n}\nfunction parsePaths(paths, scale, offset) {\n const res = [],\n defaultCount = 0;\n for (const path of paths) {\n const segments = path.element.pathSegList,\n len = segments?.numberOfItems ?? defaultCount,\n p = {\n x: 0,\n y: 0\n };\n for (let i = 0; i < len; i++) {\n const segment = segments?.getItem(i),\n svgPathSeg = window.SVGPathSeg;\n switch (segment?.pathSegType) {\n case svgPathSeg.PATHSEG_MOVETO_ABS:\n case svgPathSeg.PATHSEG_LINETO_ABS:\n case svgPathSeg.PATHSEG_CURVETO_CUBIC_ABS:\n case svgPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:\n case svgPathSeg.PATHSEG_ARC_ABS:\n case svgPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:\n case svgPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:\n {\n const absSeg = segment;\n p.x = absSeg.x;\n p.y = absSeg.y;\n break;\n }\n case svgPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:\n p.x = segment.x;\n break;\n case svgPathSeg.PATHSEG_LINETO_VERTICAL_ABS:\n p.y = segment.y;\n break;\n case svgPathSeg.PATHSEG_LINETO_REL:\n case svgPathSeg.PATHSEG_MOVETO_REL:\n case svgPathSeg.PATHSEG_CURVETO_CUBIC_REL:\n case svgPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:\n case svgPathSeg.PATHSEG_ARC_REL:\n case svgPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:\n case svgPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:\n {\n const relSeg = segment;\n p.x += relSeg.x;\n p.y += relSeg.y;\n break;\n }\n case svgPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:\n p.x += segment.x;\n break;\n case svgPathSeg.PATHSEG_LINETO_VERTICAL_REL:\n p.y += segment.y;\n break;\n case svgPathSeg.PATHSEG_UNKNOWN:\n case svgPathSeg.PATHSEG_CLOSEPATH:\n continue;\n }\n res.push({\n x: p.x * scale + offset.x,\n y: p.y * scale + offset.y\n });\n }\n }\n return res;\n}\nfunction calcClosestPointOnSegment(s1, s2, pos) {\n const {\n dx: dx1,\n dy: dy1\n } = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(pos, s1),\n {\n dx: dx2,\n dy: dy2\n } = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(s2, s1),\n t = (dx1 * dx2 + dy1 * dy2) / (dx2 ** squareExp + dy2 ** squareExp),\n res = {\n x: s1.x + dx2 * t,\n y: s1.y + dy2 * t,\n isOnSegment: t >= inSegmentRange.min && t <= inSegmentRange.max\n };\n if (t < inSegmentRange.min) {\n res.x = s1.x;\n res.y = s1.y;\n } else if (t > inSegmentRange.max) {\n res.x = s2.x;\n res.y = s2.y;\n }\n return res;\n}\nfunction segmentBounce(start, stop, velocity) {\n const {\n dx,\n dy\n } = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(start, stop),\n wallAngle = Math.atan2(dy, dx),\n wallNormal = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Vector.create(Math.sin(wallAngle), -Math.cos(wallAngle)),\n d = double * (velocity.x * wallNormal.x + velocity.y * wallNormal.y);\n wallNormal.multTo(d);\n velocity.subFrom(wallNormal);\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/utils.js?\n}");
168
168
 
169
169
  /***/ }),
170
170
 
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see tsparticles.plugin.polygon-mask.min.js.LICENSE.txt */
2
- !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],e);else{var n="object"==typeof exports?e(require("@tsparticles/engine")):e(t.window);for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(this,(t=>(()=>{var e={723:()=>{!function(){try{if("undefined"==typeof window)return;"SVGPathSeg"in window||(window.SVGPathSeg=function(t,e,n){this.pathSegType=t,this.pathSegTypeAsLetter=e,this._owningPathSegList=n},window.SVGPathSeg.prototype.classname="SVGPathSeg",window.SVGPathSeg.PATHSEG_UNKNOWN=0,window.SVGPathSeg.PATHSEG_CLOSEPATH=1,window.SVGPathSeg.PATHSEG_MOVETO_ABS=2,window.SVGPathSeg.PATHSEG_MOVETO_REL=3,window.SVGPathSeg.PATHSEG_LINETO_ABS=4,window.SVGPathSeg.PATHSEG_LINETO_REL=5,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS=6,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL=7,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS=8,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL=9,window.SVGPathSeg.PATHSEG_ARC_ABS=10,window.SVGPathSeg.PATHSEG_ARC_REL=11,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS=12,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL=13,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS=14,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL=15,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS=16,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL=17,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS=18,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL=19,window.SVGPathSeg.prototype._segmentChanged=function(){this._owningPathSegList&&this._owningPathSegList.segmentChanged(this)},window.SVGPathSegClosePath=function(t){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CLOSEPATH,"z",t)},window.SVGPathSegClosePath.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegClosePath.prototype.toString=function(){return"[object SVGPathSegClosePath]"},window.SVGPathSegClosePath.prototype._asPathString=function(){return this.pathSegTypeAsLetter},window.SVGPathSegClosePath.prototype.clone=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathSegMovetoAbs=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_ABS,"M",t),this._x=e,this._y=n},window.SVGPathSegMovetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoAbs.prototype.toString=function(){return"[object SVGPathSegMovetoAbs]"},window.SVGPathSegMovetoAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegMovetoAbs.prototype.clone=function(){return new window.SVGPathSegMovetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegMovetoRel=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_REL,"m",t),this._x=e,this._y=n},window.SVGPathSegMovetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoRel.prototype.toString=function(){return"[object SVGPathSegMovetoRel]"},window.SVGPathSegMovetoRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegMovetoRel.prototype.clone=function(){return new window.SVGPathSegMovetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoAbs=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_ABS,"L",t),this._x=e,this._y=n},window.SVGPathSegLinetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoAbs.prototype.toString=function(){return"[object SVGPathSegLinetoAbs]"},window.SVGPathSegLinetoAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegLinetoAbs.prototype.clone=function(){return new window.SVGPathSegLinetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoRel=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_REL,"l",t),this._x=e,this._y=n},window.SVGPathSegLinetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoRel.prototype.toString=function(){return"[object SVGPathSegLinetoRel]"},window.SVGPathSegLinetoRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegLinetoRel.prototype.clone=function(){return new window.SVGPathSegLinetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicAbs=function(t,e,n,i,o,r,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS,"C",t),this._x=e,this._y=n,this._x1=i,this._y1=o,this._x2=r,this._y2=s},window.SVGPathSegCurvetoCubicAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicAbs]"},window.SVGPathSegCurvetoCubicAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicAbs(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicRel=function(t,e,n,i,o,r,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL,"c",t),this._x=e,this._y=n,this._x1=i,this._y1=o,this._x2=r,this._y2=s},window.SVGPathSegCurvetoCubicRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicRel]"},window.SVGPathSegCurvetoCubicRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicRel(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticAbs=function(t,e,n,i,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS,"Q",t),this._x=e,this._y=n,this._x1=i,this._y1=o},window.SVGPathSegCurvetoQuadraticAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticAbs]"},window.SVGPathSegCurvetoQuadraticAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticRel=function(t,e,n,i,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL,"q",t),this._x=e,this._y=n,this._x1=i,this._y1=o},window.SVGPathSegCurvetoQuadraticRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticRel]"},window.SVGPathSegCurvetoQuadraticRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticRel(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcAbs=function(t,e,n,i,o,r,s,h){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_ABS,"A",t),this._x=e,this._y=n,this._r1=i,this._r2=o,this._angle=r,this._largeArcFlag=s,this._sweepFlag=h},window.SVGPathSegArcAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcAbs.prototype.toString=function(){return"[object SVGPathSegArcAbs]"},window.SVGPathSegArcAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag?"1":"0"} ${this._sweepFlag?"1":"0"} ${this._x} ${this._y}`},window.SVGPathSegArcAbs.prototype.clone=function(){return new window.SVGPathSegArcAbs(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcRel=function(t,e,n,i,o,r,s,h){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_REL,"a",t),this._x=e,this._y=n,this._r1=i,this._r2=o,this._angle=r,this._largeArcFlag=s,this._sweepFlag=h},window.SVGPathSegArcRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcRel.prototype.toString=function(){return"[object SVGPathSegArcRel]"},window.SVGPathSegArcRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag?"1":"0"} ${this._sweepFlag?"1":"0"} ${this._x} ${this._y}`},window.SVGPathSegArcRel.prototype.clone=function(){return new window.SVGPathSegArcRel(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS,"H",t),this._x=e},window.SVGPathSegLinetoHorizontalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalAbs]"},window.SVGPathSegLinetoHorizontalAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x}`},window.SVGPathSegLinetoHorizontalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalAbs(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL,"h",t),this._x=e},window.SVGPathSegLinetoHorizontalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalRel.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalRel]"},window.SVGPathSegLinetoHorizontalRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x}`},window.SVGPathSegLinetoHorizontalRel.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalRel(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS,"V",t),this._y=e},window.SVGPathSegLinetoVerticalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalAbs]"},window.SVGPathSegLinetoVerticalAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._y}`},window.SVGPathSegLinetoVerticalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalAbs(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL,"v",t),this._y=e},window.SVGPathSegLinetoVerticalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalRel.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalRel]"},window.SVGPathSegLinetoVerticalRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._y}`},window.SVGPathSegLinetoVerticalRel.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalRel(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothAbs=function(t,e,n,i,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS,"S",t),this._x=e,this._y=n,this._x2=i,this._y2=o},window.SVGPathSegCurvetoCubicSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothAbs]"},window.SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothRel=function(t,e,n,i,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL,"s",t),this._x=e,this._y=n,this._x2=i,this._y2=o},window.SVGPathSegCurvetoCubicSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothRel]"},window.SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothAbs=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS,"T",t),this._x=e,this._y=n},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothAbs]"},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothRel=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,"t",t),this._x=e,this._y=n},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothRel]"},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathElement.prototype.createSVGPathSegClosePath=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathElement.prototype.createSVGPathSegMovetoAbs=function(t,e){return new window.SVGPathSegMovetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegMovetoRel=function(t,e){return new window.SVGPathSegMovetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoAbs=function(t,e){return new window.SVGPathSegLinetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoRel=function(t,e){return new window.SVGPathSegLinetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs=function(t,e,n,i,o,r){return new window.SVGPathSegCurvetoCubicAbs(void 0,t,e,n,i,o,r)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel=function(t,e,n,i,o,r){return new window.SVGPathSegCurvetoCubicRel(void 0,t,e,n,i,o,r)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs=function(t,e,n,i){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,t,e,n,i)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel=function(t,e,n,i){return new window.SVGPathSegCurvetoQuadraticRel(void 0,t,e,n,i)},window.SVGPathElement.prototype.createSVGPathSegArcAbs=function(t,e,n,i,o,r,s){return new window.SVGPathSegArcAbs(void 0,t,e,n,i,o,r,s)},window.SVGPathElement.prototype.createSVGPathSegArcRel=function(t,e,n,i,o,r,s){return new window.SVGPathSegArcRel(void 0,t,e,n,i,o,r,s)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs=function(t){return new window.SVGPathSegLinetoHorizontalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel=function(t){return new window.SVGPathSegLinetoHorizontalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs=function(t){return new window.SVGPathSegLinetoVerticalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel=function(t){return new window.SVGPathSegLinetoVerticalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs=function(t,e,n,i){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,t,e,n,i)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel=function(t,e,n,i){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,t,e,n,i)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,t,e)},"getPathSegAtLength"in window.SVGPathElement.prototype||(window.SVGPathElement.prototype.getPathSegAtLength=function(t){if(void 0===t||!isFinite(t))throw"Invalid arguments.";const e=document.createElementNS("http://www.w3.org/2000/svg","path");e.setAttribute("d",this.getAttribute("d"));let n=e.pathSegList.numberOfItems-1;if(n<=0)return 0;do{if(e.pathSegList.removeItem(n),t>e.getTotalLength())break;n--}while(n>0);return n})),"SVGPathSegList"in window&&"appendItem"in window.SVGPathSegList.prototype||(window.SVGPathSegList=function(t){this._pathElement=t,this._list=this._parsePath(this._pathElement.getAttribute("d")),this._mutationObserverConfig={attributes:!0,attributeFilter:["d"]},this._pathElementMutationObserver=new MutationObserver(this._updateListFromPathMutations.bind(this)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.classname="SVGPathSegList",Object.defineProperty(window.SVGPathSegList.prototype,"numberOfItems",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathSegList.prototype,"length",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"pathSegList",{get:function(){return this._pathSegList||(this._pathSegList=new window.SVGPathSegList(this)),this._pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"normalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedNormalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),window.SVGPathSegList.prototype._checkPathSynchronizedToList=function(){this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords())},window.SVGPathSegList.prototype._updateListFromPathMutations=function(t){if(!this._pathElement)return;let e=!1;t.forEach((function(t){"d"==t.attributeName&&(e=!0)})),e&&(this._list=this._parsePath(this._pathElement.getAttribute("d")))},window.SVGPathSegList.prototype._writeListToPath=function(){this._pathElementMutationObserver.disconnect(),this._pathElement.setAttribute("d",window.SVGPathSegList._pathSegArrayAsString(this._list)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.segmentChanged=function(){this._writeListToPath()},window.SVGPathSegList.prototype.clear=function(){this._checkPathSynchronizedToList(),this._list.forEach((function(t){t._owningPathSegList=null})),this._list=[],this._writeListToPath()},window.SVGPathSegList.prototype.initialize=function(t){return this._checkPathSynchronizedToList(),this._list=[t],t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype._checkValidIndex=function(t){if(isNaN(t)||t<0||t>=this.numberOfItems)throw"INDEX_SIZE_ERR"},window.SVGPathSegList.prototype.getItem=function(t){return this._checkPathSynchronizedToList(),this._checkValidIndex(t),this._list[t]},window.SVGPathSegList.prototype.insertItemBefore=function(t,e){return this._checkPathSynchronizedToList(),e>this.numberOfItems&&(e=this.numberOfItems),t._owningPathSegList&&(t=t.clone()),this._list.splice(e,0,t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.replaceItem=function(t,e){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._checkValidIndex(e),this._list[e]=t,t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.removeItem=function(t){this._checkPathSynchronizedToList(),this._checkValidIndex(t);const e=this._list[t];return this._list.splice(t,1),this._writeListToPath(),e},window.SVGPathSegList.prototype.appendItem=function(t){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._list.push(t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList._pathSegArrayAsString=function(t){let e="",n=!0;return t.forEach((function(t){n?(n=!1,e+=t._asPathString()):e+=` ${t._asPathString()}`})),e},window.SVGPathSegList.prototype._parsePath=function(t){if(!t||!t.length)return[];const e=this,n=function(){this.pathSegList=[]};n.prototype.appendSegment=function(t){this.pathSegList.push(t)};const i=function(t){this._string=t,this._currentIndex=0,this._endIndex=this._string.length,this._previousCommand=window.SVGPathSeg.PATHSEG_UNKNOWN,this._skipOptionalSpaces()};i.prototype._isCurrentSpace=function(){const t=this._string[this._currentIndex];return t<=" "&&(" "==t||"\n"==t||"\t"==t||"\r"==t||"\f"==t)},i.prototype._skipOptionalSpaces=function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex++;return this._currentIndex<this._endIndex},i.prototype._skipOptionalSpacesOrDelimiter=function(){return!(this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&","!=this._string.charAt(this._currentIndex))&&(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&","==this._string.charAt(this._currentIndex)&&(this._currentIndex++,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},i.prototype.hasMoreData=function(){return this._currentIndex<this._endIndex},i.prototype.peekSegmentType=function(){const t=this._string[this._currentIndex];return this._pathSegTypeFromChar(t)},i.prototype._pathSegTypeFromChar=function(t){switch(t){case"Z":case"z":return window.SVGPathSeg.PATHSEG_CLOSEPATH;case"M":return window.SVGPathSeg.PATHSEG_MOVETO_ABS;case"m":return window.SVGPathSeg.PATHSEG_MOVETO_REL;case"L":return window.SVGPathSeg.PATHSEG_LINETO_ABS;case"l":return window.SVGPathSeg.PATHSEG_LINETO_REL;case"C":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;case"c":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;case"Q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;case"q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;case"A":return window.SVGPathSeg.PATHSEG_ARC_ABS;case"a":return window.SVGPathSeg.PATHSEG_ARC_REL;case"H":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;case"h":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;case"V":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;case"v":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;case"S":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;case"s":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;case"T":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;case"t":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;default:return window.SVGPathSeg.PATHSEG_UNKNOWN}},i.prototype._nextCommandHelper=function(t,e){return("+"==t||"-"==t||"."==t||t>="0"&&t<="9")&&e!=window.SVGPathSeg.PATHSEG_CLOSEPATH?e==window.SVGPathSeg.PATHSEG_MOVETO_ABS?window.SVGPathSeg.PATHSEG_LINETO_ABS:e==window.SVGPathSeg.PATHSEG_MOVETO_REL?window.SVGPathSeg.PATHSEG_LINETO_REL:e:window.SVGPathSeg.PATHSEG_UNKNOWN},i.prototype.initialCommandIsMoveTo=function(){if(!this.hasMoreData())return!0;const t=this.peekSegmentType();return t==window.SVGPathSeg.PATHSEG_MOVETO_ABS||t==window.SVGPathSeg.PATHSEG_MOVETO_REL},i.prototype._parseNumber=function(){let t=0,e=0,n=1,i=0,o=1,r=1;const s=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:this._currentIndex<this._endIndex&&"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,o=-1),this._currentIndex==this._endIndex||(this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")&&"."!=this._string.charAt(this._currentIndex))return;const h=this._currentIndex;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)this._currentIndex++;if(this._currentIndex!=h){let t=this._currentIndex-1,n=1;for(;t>=h;)e+=n*(this._string.charAt(t--)-"0"),n*=10}if(this._currentIndex<this._endIndex&&"."==this._string.charAt(this._currentIndex)){if(this._currentIndex++,this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)n*=10,i+=(this._string.charAt(this._currentIndex)-"0")/n,this._currentIndex+=1}if(this._currentIndex!=s&&this._currentIndex+1<this._endIndex&&("e"==this._string.charAt(this._currentIndex)||"E"==this._string.charAt(this._currentIndex))&&"x"!=this._string.charAt(this._currentIndex+1)&&"m"!=this._string.charAt(this._currentIndex+1)){if(this._currentIndex++,"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,r=-1),this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)t*=10,t+=this._string.charAt(this._currentIndex)-"0",this._currentIndex++}let a=e+i;return a*=o,t&&(a*=Math.pow(10,r*t)),s!=this._currentIndex?(this._skipOptionalSpacesOrDelimiter(),a):void 0},i.prototype._parseArcFlag=function(){if(this._currentIndex>=this._endIndex)return;let t=!1;const e=this._string.charAt(this._currentIndex++);if("0"==e)t=!1;else{if("1"!=e)return;t=!0}return this._skipOptionalSpacesOrDelimiter(),t},i.prototype.parseSegment=function(){const t=this._string[this._currentIndex];let n,i=this._pathSegTypeFromChar(t);if(i==window.SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand==window.SVGPathSeg.PATHSEG_UNKNOWN)return null;if(i=this._nextCommandHelper(t,this._previousCommand),i==window.SVGPathSeg.PATHSEG_UNKNOWN)return null}else this._currentIndex++;switch(this._previousCommand=i,i){case window.SVGPathSeg.PATHSEG_MOVETO_REL:return new window.SVGPathSegMovetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_MOVETO_ABS:return new window.SVGPathSegMovetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_REL:return new window.SVGPathSegLinetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_ABS:return new window.SVGPathSegLinetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new window.SVGPathSegLinetoHorizontalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new window.SVGPathSegLinetoHorizontalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new window.SVGPathSegLinetoVerticalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new window.SVGPathSegLinetoVerticalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_CLOSEPATH:return this._skipOptionalSpaces(),new window.SVGPathSegClosePath(e);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:return n={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicRel(e,n.x,n.y,n.x1,n.y1,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:return n={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicAbs(e,n.x,n.y,n.x1,n.y1,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:return n={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothRel(e,n.x,n.y,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:return n={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothAbs(e,n.x,n.y,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:return n={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticRel(e,n.x,n.y,n.x1,n.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:return n={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticAbs(e,n.x,n.y,n.x1,n.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new window.SVGPathSegCurvetoQuadraticSmoothRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new window.SVGPathSegCurvetoQuadraticSmoothAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_ARC_REL:return n={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcRel(e,n.x,n.y,n.x1,n.y1,n.arcAngle,n.arcLarge,n.arcSweep);case window.SVGPathSeg.PATHSEG_ARC_ABS:return n={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcAbs(e,n.x,n.y,n.x1,n.y1,n.arcAngle,n.arcLarge,n.arcSweep);default:throw"Unknown path seg type."}};const o=new n,r=new i(t);if(!r.initialCommandIsMoveTo())return[];for(;r.hasMoreData();){const t=r.parseSegment();if(!t)return[];o.appendSegment(t)}return o.pathSegList})}catch(t){console.warn("An error occurred in tsParticles pathseg polyfill. If the Polygon Mask is not working, please open an issue here: https://github.com/tsparticles/tsparticles",t)}}()},303:e=>{e.exports=t}},n={};function i(t){var o=n[t];if(void 0!==o)return o.exports;var r=n[t]={exports:{}};return e[t](r,r.exports,i),r.exports}i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{PolygonMaskInlineArrangement:()=>r,PolygonMaskMoveType:()=>s,PolygonMaskType:()=>h,loadPolygonMaskPlugin:()=>T});i(723);var r,s,h,a=i(303);class S{constructor(t){this._engine=t,this.color=new a.OptionsColor,this.width=.5,this.opacity=1}load(t){(0,a.isNull)(t)||(this.color=a.OptionsColor.create(this.color,t.color),(0,a.isString)(this.color.value)&&(this.opacity=(0,a.stringToAlpha)(this._engine,this.color.value)??this.opacity),void 0!==t.opacity&&(this.opacity=t.opacity),void 0!==t.width&&(this.width=t.width))}}class c{constructor(t){this.enable=!1,this.stroke=new S(t)}load(t){if((0,a.isNull)(t))return;void 0!==t.enable&&(this.enable=t.enable);const e=t.stroke;this.stroke.load(e)}}!function(t){t.equidistant="equidistant",t.onePerPoint="one-per-point",t.perPoint="per-point",t.randomLength="random-length",t.randomPoint="random-point"}(r||(r={}));class u{constructor(){this.arrangement=r.onePerPoint}load(t){(0,a.isNull)(t)||void 0!==t.arrangement&&(this.arrangement=t.arrangement)}}class w{constructor(){this.path=[],this.size={height:0,width:0}}load(t){(0,a.isNull)(t)||(void 0!==t.path&&(this.path=t.path),void 0!==t.size&&(void 0!==t.size.width&&(this.size.width=t.size.width),void 0!==t.size.height&&(this.size.height=t.size.height)))}}!function(t){t.path="path",t.radius="radius"}(s||(s={}));class g{constructor(){this.radius=10,this.type=s.path}load(t){(0,a.isNull)(t)||(void 0!==t.radius&&(this.radius=t.radius),void 0!==t.type&&(this.type=t.type))}}!function(t){t.inline="inline",t.inside="inside",t.outside="outside",t.none="none"}(h||(h={}));class _{constructor(t){this.draw=new c(t),this.enable=!1,this.inline=new u,this.move=new g,this.scale=1,this.type=h.none}load(t){(0,a.isNull)(t)||(this.draw.load(t.draw),this.inline.load(t.inline),this.move.load(t.move),void 0!==t.scale&&(this.scale=t.scale),void 0!==t.type&&(this.type=t.type),void 0!==t.enable?this.enable=t.enable:this.enable=this.type!==h.none,void 0!==t.url&&(this.url=t.url),void 0!==t.data&&((0,a.isString)(t.data)?this.data=t.data:(this.data=new w,this.data.load(t.data))),void 0!==t.position&&(this.position=(0,a.deepExtend)({},t.position)))}}const d=0,p=1;function P(t,e,n,i){const o=(0,a.rangeColorToRgb)(t,i.color);if(!o)return;const r=n[0];e.beginPath(),e.moveTo(r.x,r.y);for(const t of n)e.lineTo(t.x,t.y);e.closePath(),e.strokeStyle=(0,a.getStyleFromRgb)(o),e.lineWidth=i.width,e.stroke()}function l(t,e,n,i,o){const r=1,s=0,h=0,S=1;e.setTransform(r,s,h,S,o.x,o.y);const c=(0,a.rangeColorToRgb)(t,i.color);c&&(e.strokeStyle=(0,a.getStyleFromRgb)(c,i.opacity),e.lineWidth=i.width,e.stroke(n),e.resetTransform())}function y(t,e,n){const{dx:i,dy:o}=(0,a.getDistances)(n,t),{dx:r,dy:s}=(0,a.getDistances)(e,t),h=(i*r+o*s)/(r**2+s**2),S={x:t.x+r*h,y:t.y+s*h,isOnSegment:h>=d&&h<=p};return h<d?(S.x=t.x,S.y=t.y):h>p&&(S.x=e.x,S.y=e.y),S}function G(t,e,n){const{dx:i,dy:o}=(0,a.getDistances)(t,e),r=Math.atan2(o,i),s=a.Vector.create(Math.sin(r),-Math.cos(r)),h=2*(n.x*s.x+n.y*s.y);s.multTo(h),n.subFrom(s)}const V=`${a.errorPrefix} No polygon data loaded.`,A=`${a.errorPrefix} No polygon found, you need to specify SVG url in config.`,b=0,f=0,m=.5;class C{constructor(t,e){this._checkInsidePolygon=t=>{const e=this._container,n=e.actualOptions.polygon;if(!n?.enable||n.type===h.none||n.type===h.inline)return!0;if(!this.raw)throw new Error(A);const i=e.canvas.size,o=t?.x??(0,a.getRandom)()*i.width,r=t?.y??(0,a.getRandom)()*i.height;let s=!1;for(let t=0,e=this.raw.length-1;t<this.raw.length;e=t++){const n=this.raw[t],i=this.raw[e];n.y>r!=i.y>r&&o<(i.x-n.x)*(r-n.y)/(i.y-n.y)+n.x&&(s=!s)}return n.type===h.inside?s:n.type===h.outside&&!s},this._createPath2D=()=>{if(this._container.actualOptions.polygon&&this.paths?.length)for(const t of this.paths){const e=t.element?.getAttribute("d");if(e){const n=new Path2D(e),i=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGMatrix(),o=new Path2D,r=i.scale(this._scale);o.addPath?(o.addPath(n,r),t.path2d=o):delete t.path2d}else delete t.path2d;if(t.path2d??!this.raw)continue;t.path2d=new Path2D;const n=0,i=this.raw[n];t.path2d.moveTo(i.x,i.y),this.raw.forEach(((e,i)=>{i>n&&t.path2d?.lineTo(e.x,e.y)})),t.path2d.closePath()}},this._downloadSvgPath=async(t,e)=>{const n=this._container.actualOptions.polygon;if(!n)return;const i=t??n.url,o=e??!1;if(!i||void 0!==this.paths&&!o)return this.raw;const r=await fetch(i);if(!r.ok)throw new Error(`${a.errorPrefix} occurred during polygon mask download`);return this._parseSvgPath(await r.text(),e)},this._drawPoints=()=>{if(this.raw)for(const t of this.raw)this._container.particles.addParticle({x:t.x,y:t.y})},this._getEquidistantPointByIndex=t=>{const e=this._container.actualOptions;if(!e.polygon)return;if(!this.raw?.length||!this.paths?.length)throw new Error(V);let n,i=0;const o=this.paths.reduce(((t,e)=>t+e.length),0)/e.particles.number.value;for(const e of this.paths){const r=o*t-i;if(r<=e.length){n=e.element.getPointAtLength(r);break}i+=e.length}const r=this._scale;return{x:(n?.x??b)*r+(this.offset?.x??b),y:(n?.y??f)*r+(this.offset?.y??f)}},this._getPointByIndex=t=>{if(!this.raw?.length)throw new Error(V);const e=this.raw[t%this.raw.length];return{x:e.x,y:e.y}},this._getRandomPoint=()=>{if(!this.raw?.length)throw new Error(V);const t=(0,a.itemFromArray)(this.raw);return{x:t.x,y:t.y}},this._getRandomPointByLength=()=>{if(!this._container.actualOptions.polygon)return;if(!this.raw?.length||!this.paths?.length)throw new Error(V);const t=(0,a.itemFromArray)(this.paths),e=Math.floor((0,a.getRandom)()*t.length)+1,n=t.element.getPointAtLength(e),i=this._scale;return{x:n.x*i+(this.offset?.x??b),y:n.y*i+(this.offset?.y??f)}},this._initRawData=async t=>{const e=this._container.actualOptions.polygon;if(e){if(e.url)this.raw=await this._downloadSvgPath(e.url,t);else if(e.data){const n=e.data;let i;if((0,a.isString)(n))i=n;else{const t=t=>`<path d="${t}" />`,e=(0,a.isArray)(n.path)?n.path.map(t).join(""):t(n.path);i=`<svg ${'xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"'} width="${n.size.width}" height="${n.size.height}">${e}</svg>`}this.raw=this._parseSvgPath(i,t)}this._createPath2D(),this._engine.dispatchEvent("polygonMaskLoaded",{container:this._container})}},this._parseSvgPath=(t,e)=>{const n=e??!1;if(void 0!==this.paths&&!n)return this.raw;const i=this._container,o=i.actualOptions.polygon;if(!o)return;const r=(new DOMParser).parseFromString(t,"image/svg+xml"),s=r.getElementsByTagName("svg")[0];let h=s.getElementsByTagName("path");h.length||(h=r.getElementsByTagName("path")),this.paths=[];for(let t=0;t<h.length;t++){const e=h.item(t);e&&this.paths.push({element:e,length:e.getTotalLength()})}const S=this._scale;this.dimension.width=parseFloat(s.getAttribute("width")??"0")*S,this.dimension.height=parseFloat(s.getAttribute("height")??"0")*S;const c=o.position??{x:50,y:50},u=i.canvas.size;return this.offset={x:u.width*c.x/a.percentDenominator-this.dimension.width*m,y:u.height*c.y/a.percentDenominator-this.dimension.height*m},function(t,e,n){const i=[];for(const o of t){const t=o.element.pathSegList,r=t?.numberOfItems??0,s={x:0,y:0};for(let o=0;o<r;o++){const r=t?.getItem(o),h=window.SVGPathSeg;switch(r?.pathSegType){case h.PATHSEG_MOVETO_ABS:case h.PATHSEG_LINETO_ABS:case h.PATHSEG_CURVETO_CUBIC_ABS:case h.PATHSEG_CURVETO_QUADRATIC_ABS:case h.PATHSEG_ARC_ABS:case h.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:case h.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:{const t=r;s.x=t.x,s.y=t.y;break}case h.PATHSEG_LINETO_HORIZONTAL_ABS:s.x=r.x;break;case h.PATHSEG_LINETO_VERTICAL_ABS:s.y=r.y;break;case h.PATHSEG_LINETO_REL:case h.PATHSEG_MOVETO_REL:case h.PATHSEG_CURVETO_CUBIC_REL:case h.PATHSEG_CURVETO_QUADRATIC_REL:case h.PATHSEG_ARC_REL:case h.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:case h.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:{const t=r;s.x+=t.x,s.y+=t.y;break}case h.PATHSEG_LINETO_HORIZONTAL_REL:s.x+=r.x;break;case h.PATHSEG_LINETO_VERTICAL_REL:s.y+=r.y;break;case h.PATHSEG_UNKNOWN:case h.PATHSEG_CLOSEPATH:continue}i.push({x:s.x*e+n.x,y:s.y*e+n.y})}}return i}(this.paths,S,this.offset)},this._polygonBounce=(t,e,n)=>{const i=this._container.actualOptions.polygon;if(!this.raw||!i?.enable||n!==a.OutModeDirection.top)return!1;if(i.type===h.inside||i.type===h.outside){let e,n,i;const o=t.getPosition(),r=t.getRadius(),s=1;for(let h=0,S=this.raw.length-s;h<this.raw.length;S=h++){const s=this.raw[h],c=this.raw[S];e=y(s,c,o);const u=(0,a.getDistances)(o,e);if([n,i]=[u.dx,u.dy],u.distance<r)return G(s,c,t.velocity),!0}if(e&&void 0!==n&&void 0!==i&&!this._checkInsidePolygon(o)){const n={x:1,y:1},i=2*r,s=-1;return o.x>=e.x&&(n.x=-1),o.y>=e.y&&(n.y=-1),t.position.x=e.x+i*n.x,t.position.y=e.y+i*n.y,t.velocity.mult(s),!0}}else if(i.type===h.inline&&t.initialPosition){const e=(0,a.getDistance)(t.initialPosition,t.getPosition()),{velocity:n}=t;if(e>this._moveRadius)return n.x=n.y*m-n.x,n.y=n.x*m-n.y,!0}return!1},this._randomPoint=()=>{const t=this._container,e=t.actualOptions.polygon;if(!e)return;let n;if(e.type===h.inline)switch(e.inline.arrangement){case r.randomPoint:n=this._getRandomPoint();break;case r.randomLength:n=this._getRandomPointByLength();break;case r.equidistant:n=this._getEquidistantPointByIndex(t.particles.count);break;case r.onePerPoint:case r.perPoint:default:n=this._getPointByIndex(t.particles.count)}else{const e=t.canvas.size;n={x:(0,a.getRandom)()*e.width,y:(0,a.getRandom)()*e.height}}return this._checkInsidePolygon(n)?n:this._randomPoint()},this._container=t,this._engine=e,this.dimension={height:0,width:0},this._moveRadius=0,this._scale=1}clickPositionValid(t){const e=this._container.actualOptions.polygon;return!!e?.enable&&e.type!==h.none&&e.type!==h.inline&&this._checkInsidePolygon(t)}draw(t){if(!this.paths?.length)return;const e=this._container.actualOptions.polygon;if(!e?.enable)return;const n=e.draw;if(!n.enable)return;const i=this.raw;for(const e of this.paths){const o=e.path2d;t&&(o&&this.offset?l(this._engine,t,o,n.stroke,this.offset):i&&P(this._engine,t,i,n.stroke))}}async init(){const t=this._container,e=t.actualOptions.polygon,n=t.retina.pixelRatio;e&&(this._moveRadius=e.move.radius*n,this._scale=e.scale*n,e.enable&&await this._initRawData())}particleBounce(t,e,n){return this._polygonBounce(t,e,n)}particlePosition(t){const e=this._container.actualOptions.polygon;if(e?.enable&&(this.raw?.length??0)>0)return(0,a.deepExtend)({},t||this._randomPoint())}particlesInitialization(){const t=this._container.actualOptions.polygon;return!(!t?.enable||t.type!==h.inline||t.inline.arrangement!==r.onePerPoint&&t.inline.arrangement!==r.perPoint)&&(this._drawPoints(),!0)}resize(){const t=this._container,e=t.actualOptions.polygon;if(!e?.enable||e.type===h.none)return;this.redrawTimeout&&clearTimeout(this.redrawTimeout);this.redrawTimeout=window.setTimeout((()=>{(async()=>{await this._initRawData(!0),await t.particles.redraw()})()}),250)}stop(){delete this.raw,delete this.paths}}class x{constructor(t){this.id="polygonMask",this._engine=t}getPlugin(t){return Promise.resolve(new C(t,this._engine))}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let n=t.polygon;void 0===n?.load&&(t.polygon=n=new _(this._engine)),n.load(e?.polygon)}needsPlugin(t){return t?.polygon?.enable??(void 0!==t?.polygon?.type&&t.polygon.type!==h.none)}}async function T(t,e=!0){t.checkVersion("3.8.0"),await t.addPlugin(new x(t),e)}return o})()));
2
+ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],e);else{var n="object"==typeof exports?e(require("@tsparticles/engine")):e(t.window);for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(this,(t=>(()=>{var e={303:e=>{e.exports=t},551:()=>{!function(){try{if("undefined"==typeof window)return;"SVGPathSeg"in window||(window.SVGPathSeg=function(t,e,n){this.pathSegType=t,this.pathSegTypeAsLetter=e,this._owningPathSegList=n},window.SVGPathSeg.prototype.classname="SVGPathSeg",window.SVGPathSeg.PATHSEG_UNKNOWN=0,window.SVGPathSeg.PATHSEG_CLOSEPATH=1,window.SVGPathSeg.PATHSEG_MOVETO_ABS=2,window.SVGPathSeg.PATHSEG_MOVETO_REL=3,window.SVGPathSeg.PATHSEG_LINETO_ABS=4,window.SVGPathSeg.PATHSEG_LINETO_REL=5,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS=6,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL=7,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS=8,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL=9,window.SVGPathSeg.PATHSEG_ARC_ABS=10,window.SVGPathSeg.PATHSEG_ARC_REL=11,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS=12,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL=13,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS=14,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL=15,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS=16,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL=17,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS=18,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL=19,window.SVGPathSeg.prototype._segmentChanged=function(){this._owningPathSegList&&this._owningPathSegList.segmentChanged(this)},window.SVGPathSegClosePath=function(t){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CLOSEPATH,"z",t)},window.SVGPathSegClosePath.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegClosePath.prototype.toString=function(){return"[object SVGPathSegClosePath]"},window.SVGPathSegClosePath.prototype._asPathString=function(){return this.pathSegTypeAsLetter},window.SVGPathSegClosePath.prototype.clone=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathSegMovetoAbs=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_ABS,"M",t),this._x=e,this._y=n},window.SVGPathSegMovetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoAbs.prototype.toString=function(){return"[object SVGPathSegMovetoAbs]"},window.SVGPathSegMovetoAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegMovetoAbs.prototype.clone=function(){return new window.SVGPathSegMovetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegMovetoRel=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_REL,"m",t),this._x=e,this._y=n},window.SVGPathSegMovetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoRel.prototype.toString=function(){return"[object SVGPathSegMovetoRel]"},window.SVGPathSegMovetoRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegMovetoRel.prototype.clone=function(){return new window.SVGPathSegMovetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoAbs=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_ABS,"L",t),this._x=e,this._y=n},window.SVGPathSegLinetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoAbs.prototype.toString=function(){return"[object SVGPathSegLinetoAbs]"},window.SVGPathSegLinetoAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegLinetoAbs.prototype.clone=function(){return new window.SVGPathSegLinetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoRel=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_REL,"l",t),this._x=e,this._y=n},window.SVGPathSegLinetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoRel.prototype.toString=function(){return"[object SVGPathSegLinetoRel]"},window.SVGPathSegLinetoRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegLinetoRel.prototype.clone=function(){return new window.SVGPathSegLinetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicAbs=function(t,e,n,i,o,r,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS,"C",t),this._x=e,this._y=n,this._x1=i,this._y1=o,this._x2=r,this._y2=s},window.SVGPathSegCurvetoCubicAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicAbs]"},window.SVGPathSegCurvetoCubicAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicAbs(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicRel=function(t,e,n,i,o,r,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL,"c",t),this._x=e,this._y=n,this._x1=i,this._y1=o,this._x2=r,this._y2=s},window.SVGPathSegCurvetoCubicRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicRel]"},window.SVGPathSegCurvetoCubicRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicRel(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticAbs=function(t,e,n,i,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS,"Q",t),this._x=e,this._y=n,this._x1=i,this._y1=o},window.SVGPathSegCurvetoQuadraticAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticAbs]"},window.SVGPathSegCurvetoQuadraticAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticRel=function(t,e,n,i,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL,"q",t),this._x=e,this._y=n,this._x1=i,this._y1=o},window.SVGPathSegCurvetoQuadraticRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticRel]"},window.SVGPathSegCurvetoQuadraticRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticRel(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcAbs=function(t,e,n,i,o,r,s,h){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_ABS,"A",t),this._x=e,this._y=n,this._r1=i,this._r2=o,this._angle=r,this._largeArcFlag=s,this._sweepFlag=h},window.SVGPathSegArcAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcAbs.prototype.toString=function(){return"[object SVGPathSegArcAbs]"},window.SVGPathSegArcAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag?"1":"0"} ${this._sweepFlag?"1":"0"} ${this._x} ${this._y}`},window.SVGPathSegArcAbs.prototype.clone=function(){return new window.SVGPathSegArcAbs(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcRel=function(t,e,n,i,o,r,s,h){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_REL,"a",t),this._x=e,this._y=n,this._r1=i,this._r2=o,this._angle=r,this._largeArcFlag=s,this._sweepFlag=h},window.SVGPathSegArcRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcRel.prototype.toString=function(){return"[object SVGPathSegArcRel]"},window.SVGPathSegArcRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag?"1":"0"} ${this._sweepFlag?"1":"0"} ${this._x} ${this._y}`},window.SVGPathSegArcRel.prototype.clone=function(){return new window.SVGPathSegArcRel(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS,"H",t),this._x=e},window.SVGPathSegLinetoHorizontalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalAbs]"},window.SVGPathSegLinetoHorizontalAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x}`},window.SVGPathSegLinetoHorizontalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalAbs(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL,"h",t),this._x=e},window.SVGPathSegLinetoHorizontalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalRel.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalRel]"},window.SVGPathSegLinetoHorizontalRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x}`},window.SVGPathSegLinetoHorizontalRel.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalRel(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS,"V",t),this._y=e},window.SVGPathSegLinetoVerticalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalAbs]"},window.SVGPathSegLinetoVerticalAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._y}`},window.SVGPathSegLinetoVerticalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalAbs(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL,"v",t),this._y=e},window.SVGPathSegLinetoVerticalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalRel.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalRel]"},window.SVGPathSegLinetoVerticalRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._y}`},window.SVGPathSegLinetoVerticalRel.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalRel(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothAbs=function(t,e,n,i,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS,"S",t),this._x=e,this._y=n,this._x2=i,this._y2=o},window.SVGPathSegCurvetoCubicSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothAbs]"},window.SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothRel=function(t,e,n,i,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL,"s",t),this._x=e,this._y=n,this._x2=i,this._y2=o},window.SVGPathSegCurvetoCubicSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothRel]"},window.SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothAbs=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS,"T",t),this._x=e,this._y=n},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothAbs]"},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothRel=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,"t",t),this._x=e,this._y=n},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothRel]"},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathElement.prototype.createSVGPathSegClosePath=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathElement.prototype.createSVGPathSegMovetoAbs=function(t,e){return new window.SVGPathSegMovetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegMovetoRel=function(t,e){return new window.SVGPathSegMovetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoAbs=function(t,e){return new window.SVGPathSegLinetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoRel=function(t,e){return new window.SVGPathSegLinetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs=function(t,e,n,i,o,r){return new window.SVGPathSegCurvetoCubicAbs(void 0,t,e,n,i,o,r)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel=function(t,e,n,i,o,r){return new window.SVGPathSegCurvetoCubicRel(void 0,t,e,n,i,o,r)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs=function(t,e,n,i){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,t,e,n,i)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel=function(t,e,n,i){return new window.SVGPathSegCurvetoQuadraticRel(void 0,t,e,n,i)},window.SVGPathElement.prototype.createSVGPathSegArcAbs=function(t,e,n,i,o,r,s){return new window.SVGPathSegArcAbs(void 0,t,e,n,i,o,r,s)},window.SVGPathElement.prototype.createSVGPathSegArcRel=function(t,e,n,i,o,r,s){return new window.SVGPathSegArcRel(void 0,t,e,n,i,o,r,s)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs=function(t){return new window.SVGPathSegLinetoHorizontalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel=function(t){return new window.SVGPathSegLinetoHorizontalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs=function(t){return new window.SVGPathSegLinetoVerticalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel=function(t){return new window.SVGPathSegLinetoVerticalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs=function(t,e,n,i){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,t,e,n,i)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel=function(t,e,n,i){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,t,e,n,i)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,t,e)},"getPathSegAtLength"in window.SVGPathElement.prototype||(window.SVGPathElement.prototype.getPathSegAtLength=function(t){if(void 0===t||!isFinite(t))throw"Invalid arguments.";const e=document.createElementNS("http://www.w3.org/2000/svg","path");e.setAttribute("d",this.getAttribute("d"));let n=e.pathSegList.numberOfItems-1;if(n<=0)return 0;do{if(e.pathSegList.removeItem(n),t>e.getTotalLength())break;n--}while(n>0);return n})),"SVGPathSegList"in window&&"appendItem"in window.SVGPathSegList.prototype||(window.SVGPathSegList=function(t){this._pathElement=t,this._list=this._parsePath(this._pathElement.getAttribute("d")),this._mutationObserverConfig={attributes:!0,attributeFilter:["d"]},this._pathElementMutationObserver=new MutationObserver(this._updateListFromPathMutations.bind(this)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.classname="SVGPathSegList",Object.defineProperty(window.SVGPathSegList.prototype,"numberOfItems",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathSegList.prototype,"length",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"pathSegList",{get:function(){return this._pathSegList||(this._pathSegList=new window.SVGPathSegList(this)),this._pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"normalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedNormalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),window.SVGPathSegList.prototype._checkPathSynchronizedToList=function(){this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords())},window.SVGPathSegList.prototype._updateListFromPathMutations=function(t){if(!this._pathElement)return;let e=!1;t.forEach((function(t){"d"==t.attributeName&&(e=!0)})),e&&(this._list=this._parsePath(this._pathElement.getAttribute("d")))},window.SVGPathSegList.prototype._writeListToPath=function(){this._pathElementMutationObserver.disconnect(),this._pathElement.setAttribute("d",window.SVGPathSegList._pathSegArrayAsString(this._list)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.segmentChanged=function(){this._writeListToPath()},window.SVGPathSegList.prototype.clear=function(){this._checkPathSynchronizedToList(),this._list.forEach((function(t){t._owningPathSegList=null})),this._list=[],this._writeListToPath()},window.SVGPathSegList.prototype.initialize=function(t){return this._checkPathSynchronizedToList(),this._list=[t],t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype._checkValidIndex=function(t){if(isNaN(t)||t<0||t>=this.numberOfItems)throw"INDEX_SIZE_ERR"},window.SVGPathSegList.prototype.getItem=function(t){return this._checkPathSynchronizedToList(),this._checkValidIndex(t),this._list[t]},window.SVGPathSegList.prototype.insertItemBefore=function(t,e){return this._checkPathSynchronizedToList(),e>this.numberOfItems&&(e=this.numberOfItems),t._owningPathSegList&&(t=t.clone()),this._list.splice(e,0,t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.replaceItem=function(t,e){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._checkValidIndex(e),this._list[e]=t,t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.removeItem=function(t){this._checkPathSynchronizedToList(),this._checkValidIndex(t);const e=this._list[t];return this._list.splice(t,1),this._writeListToPath(),e},window.SVGPathSegList.prototype.appendItem=function(t){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._list.push(t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList._pathSegArrayAsString=function(t){let e="",n=!0;return t.forEach((function(t){n?(n=!1,e+=t._asPathString()):e+=` ${t._asPathString()}`})),e},window.SVGPathSegList.prototype._parsePath=function(t){if(!t||!t.length)return[];const e=this,n=function(){this.pathSegList=[]};n.prototype.appendSegment=function(t){this.pathSegList.push(t)};const i=function(t){this._string=t,this._currentIndex=0,this._endIndex=this._string.length,this._previousCommand=window.SVGPathSeg.PATHSEG_UNKNOWN,this._skipOptionalSpaces()};i.prototype._isCurrentSpace=function(){const t=this._string[this._currentIndex];return t<=" "&&(" "==t||"\n"==t||"\t"==t||"\r"==t||"\f"==t)},i.prototype._skipOptionalSpaces=function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex++;return this._currentIndex<this._endIndex},i.prototype._skipOptionalSpacesOrDelimiter=function(){return!(this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&","!=this._string.charAt(this._currentIndex))&&(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&","==this._string.charAt(this._currentIndex)&&(this._currentIndex++,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},i.prototype.hasMoreData=function(){return this._currentIndex<this._endIndex},i.prototype.peekSegmentType=function(){const t=this._string[this._currentIndex];return this._pathSegTypeFromChar(t)},i.prototype._pathSegTypeFromChar=function(t){switch(t){case"Z":case"z":return window.SVGPathSeg.PATHSEG_CLOSEPATH;case"M":return window.SVGPathSeg.PATHSEG_MOVETO_ABS;case"m":return window.SVGPathSeg.PATHSEG_MOVETO_REL;case"L":return window.SVGPathSeg.PATHSEG_LINETO_ABS;case"l":return window.SVGPathSeg.PATHSEG_LINETO_REL;case"C":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;case"c":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;case"Q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;case"q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;case"A":return window.SVGPathSeg.PATHSEG_ARC_ABS;case"a":return window.SVGPathSeg.PATHSEG_ARC_REL;case"H":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;case"h":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;case"V":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;case"v":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;case"S":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;case"s":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;case"T":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;case"t":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;default:return window.SVGPathSeg.PATHSEG_UNKNOWN}},i.prototype._nextCommandHelper=function(t,e){return("+"==t||"-"==t||"."==t||t>="0"&&t<="9")&&e!=window.SVGPathSeg.PATHSEG_CLOSEPATH?e==window.SVGPathSeg.PATHSEG_MOVETO_ABS?window.SVGPathSeg.PATHSEG_LINETO_ABS:e==window.SVGPathSeg.PATHSEG_MOVETO_REL?window.SVGPathSeg.PATHSEG_LINETO_REL:e:window.SVGPathSeg.PATHSEG_UNKNOWN},i.prototype.initialCommandIsMoveTo=function(){if(!this.hasMoreData())return!0;const t=this.peekSegmentType();return t==window.SVGPathSeg.PATHSEG_MOVETO_ABS||t==window.SVGPathSeg.PATHSEG_MOVETO_REL},i.prototype._parseNumber=function(){let t=0,e=0,n=1,i=0,o=1,r=1;const s=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:this._currentIndex<this._endIndex&&"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,o=-1),this._currentIndex==this._endIndex||(this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")&&"."!=this._string.charAt(this._currentIndex))return;const h=this._currentIndex;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)this._currentIndex++;if(this._currentIndex!=h){let t=this._currentIndex-1,n=1;for(;t>=h;)e+=n*(this._string.charAt(t--)-"0"),n*=10}if(this._currentIndex<this._endIndex&&"."==this._string.charAt(this._currentIndex)){if(this._currentIndex++,this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)n*=10,i+=(this._string.charAt(this._currentIndex)-"0")/n,this._currentIndex+=1}if(this._currentIndex!=s&&this._currentIndex+1<this._endIndex&&("e"==this._string.charAt(this._currentIndex)||"E"==this._string.charAt(this._currentIndex))&&"x"!=this._string.charAt(this._currentIndex+1)&&"m"!=this._string.charAt(this._currentIndex+1)){if(this._currentIndex++,"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,r=-1),this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)t*=10,t+=this._string.charAt(this._currentIndex)-"0",this._currentIndex++}let a=e+i;return a*=o,t&&(a*=Math.pow(10,r*t)),s!=this._currentIndex?(this._skipOptionalSpacesOrDelimiter(),a):void 0},i.prototype._parseArcFlag=function(){if(this._currentIndex>=this._endIndex)return;let t=!1;const e=this._string.charAt(this._currentIndex++);if("0"==e)t=!1;else{if("1"!=e)return;t=!0}return this._skipOptionalSpacesOrDelimiter(),t},i.prototype.parseSegment=function(){const t=this._string[this._currentIndex];let n,i=this._pathSegTypeFromChar(t);if(i==window.SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand==window.SVGPathSeg.PATHSEG_UNKNOWN)return null;if(i=this._nextCommandHelper(t,this._previousCommand),i==window.SVGPathSeg.PATHSEG_UNKNOWN)return null}else this._currentIndex++;switch(this._previousCommand=i,i){case window.SVGPathSeg.PATHSEG_MOVETO_REL:return new window.SVGPathSegMovetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_MOVETO_ABS:return new window.SVGPathSegMovetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_REL:return new window.SVGPathSegLinetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_ABS:return new window.SVGPathSegLinetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new window.SVGPathSegLinetoHorizontalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new window.SVGPathSegLinetoHorizontalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new window.SVGPathSegLinetoVerticalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new window.SVGPathSegLinetoVerticalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_CLOSEPATH:return this._skipOptionalSpaces(),new window.SVGPathSegClosePath(e);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:return n={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicRel(e,n.x,n.y,n.x1,n.y1,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:return n={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicAbs(e,n.x,n.y,n.x1,n.y1,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:return n={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothRel(e,n.x,n.y,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:return n={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothAbs(e,n.x,n.y,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:return n={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticRel(e,n.x,n.y,n.x1,n.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:return n={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticAbs(e,n.x,n.y,n.x1,n.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new window.SVGPathSegCurvetoQuadraticSmoothRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new window.SVGPathSegCurvetoQuadraticSmoothAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_ARC_REL:return n={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcRel(e,n.x,n.y,n.x1,n.y1,n.arcAngle,n.arcLarge,n.arcSweep);case window.SVGPathSeg.PATHSEG_ARC_ABS:return n={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcAbs(e,n.x,n.y,n.x1,n.y1,n.arcAngle,n.arcLarge,n.arcSweep);default:throw"Unknown path seg type."}};const o=new n,r=new i(t);if(!r.initialCommandIsMoveTo())return[];for(;r.hasMoreData();){const t=r.parseSegment();if(!t)return[];o.appendSegment(t)}return o.pathSegList})}catch(t){console.warn("An error occurred in tsParticles pathseg polyfill. If the Polygon Mask is not working, please open an issue here: https://github.com/tsparticles/tsparticles",t)}}()}},n={};function i(t){var o=n[t];if(void 0!==o)return o.exports;var r=n[t]={exports:{}};return e[t](r,r.exports,i),r.exports}i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{PolygonMaskInlineArrangement:()=>r,PolygonMaskMoveType:()=>s,PolygonMaskType:()=>h,loadPolygonMaskPlugin:()=>T});i(551);var r,s,h,a=i(303);class S{constructor(t){this._engine=t,this.color=new a.OptionsColor,this.width=.5,this.opacity=1}load(t){(0,a.isNull)(t)||(this.color=a.OptionsColor.create(this.color,t.color),(0,a.isString)(this.color.value)&&(this.opacity=(0,a.stringToAlpha)(this._engine,this.color.value)??this.opacity),void 0!==t.opacity&&(this.opacity=t.opacity),void 0!==t.width&&(this.width=t.width))}}class c{constructor(t){this.enable=!1,this.stroke=new S(t)}load(t){if((0,a.isNull)(t))return;void 0!==t.enable&&(this.enable=t.enable);const e=t.stroke;this.stroke.load(e)}}!function(t){t.equidistant="equidistant",t.onePerPoint="one-per-point",t.perPoint="per-point",t.randomLength="random-length",t.randomPoint="random-point"}(r||(r={}));class u{constructor(){this.arrangement=r.onePerPoint}load(t){(0,a.isNull)(t)||void 0!==t.arrangement&&(this.arrangement=t.arrangement)}}class w{constructor(){this.path=[],this.size={height:0,width:0}}load(t){(0,a.isNull)(t)||(void 0!==t.path&&(this.path=t.path),void 0!==t.size&&(void 0!==t.size.width&&(this.size.width=t.size.width),void 0!==t.size.height&&(this.size.height=t.size.height)))}}!function(t){t.path="path",t.radius="radius"}(s||(s={}));class g{constructor(){this.radius=10,this.type=s.path}load(t){(0,a.isNull)(t)||(void 0!==t.radius&&(this.radius=t.radius),void 0!==t.type&&(this.type=t.type))}}!function(t){t.inline="inline",t.inside="inside",t.outside="outside",t.none="none"}(h||(h={}));class _{constructor(t){this.draw=new c(t),this.enable=!1,this.inline=new u,this.move=new g,this.scale=1,this.type=h.none}load(t){(0,a.isNull)(t)||(this.draw.load(t.draw),this.inline.load(t.inline),this.move.load(t.move),void 0!==t.scale&&(this.scale=t.scale),void 0!==t.type&&(this.type=t.type),void 0!==t.enable?this.enable=t.enable:this.enable=this.type!==h.none,void 0!==t.url&&(this.url=t.url),void 0!==t.data&&((0,a.isString)(t.data)?this.data=t.data:(this.data=new w,this.data.load(t.data))),void 0!==t.position&&(this.position=(0,a.deepExtend)({},t.position)))}}const d=0,p=1;function P(t,e,n,i){const o=(0,a.rangeColorToRgb)(t,i.color);if(!o)return;const r=n[0];e.beginPath(),e.moveTo(r.x,r.y);for(const t of n)e.lineTo(t.x,t.y);e.closePath(),e.strokeStyle=(0,a.getStyleFromRgb)(o),e.lineWidth=i.width,e.stroke()}function l(t,e,n,i,o){const r=1,s=0,h=0,S=1;e.setTransform(r,s,h,S,o.x,o.y);const c=(0,a.rangeColorToRgb)(t,i.color);c&&(e.strokeStyle=(0,a.getStyleFromRgb)(c,i.opacity),e.lineWidth=i.width,e.stroke(n),e.resetTransform())}function y(t,e,n){const{dx:i,dy:o}=(0,a.getDistances)(n,t),{dx:r,dy:s}=(0,a.getDistances)(e,t),h=(i*r+o*s)/(r**2+s**2),S={x:t.x+r*h,y:t.y+s*h,isOnSegment:h>=d&&h<=p};return h<d?(S.x=t.x,S.y=t.y):h>p&&(S.x=e.x,S.y=e.y),S}function G(t,e,n){const{dx:i,dy:o}=(0,a.getDistances)(t,e),r=Math.atan2(o,i),s=a.Vector.create(Math.sin(r),-Math.cos(r)),h=2*(n.x*s.x+n.y*s.y);s.multTo(h),n.subFrom(s)}const V=`${a.errorPrefix} No polygon data loaded.`,A=`${a.errorPrefix} No polygon found, you need to specify SVG url in config.`,b=0,f=0,m=.5;class C{constructor(t,e){this._checkInsidePolygon=t=>{const e=this._container,n=e.actualOptions.polygon;if(!n?.enable||n.type===h.none||n.type===h.inline)return!0;if(!this.raw)throw new Error(A);const i=e.canvas.size,o=t?.x??(0,a.getRandom)()*i.width,r=t?.y??(0,a.getRandom)()*i.height;let s=!1;for(let t=0,e=this.raw.length-1;t<this.raw.length;e=t++){const n=this.raw[t],i=this.raw[e];n.y>r!=i.y>r&&o<(i.x-n.x)*(r-n.y)/(i.y-n.y)+n.x&&(s=!s)}return n.type===h.inside?s:n.type===h.outside&&!s},this._createPath2D=()=>{if(this._container.actualOptions.polygon&&this.paths?.length)for(const t of this.paths){const e=t.element?.getAttribute("d");if(e){const n=new Path2D(e),i=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGMatrix(),o=new Path2D,r=i.scale(this._scale);o.addPath?(o.addPath(n,r),t.path2d=o):delete t.path2d}else delete t.path2d;if(t.path2d??!this.raw)continue;t.path2d=new Path2D;const n=0,i=this.raw[n];t.path2d.moveTo(i.x,i.y),this.raw.forEach(((e,i)=>{i>n&&t.path2d?.lineTo(e.x,e.y)})),t.path2d.closePath()}},this._downloadSvgPath=async(t,e)=>{const n=this._container.actualOptions.polygon;if(!n)return;const i=t??n.url,o=e??!1;if(!i||void 0!==this.paths&&!o)return this.raw;const r=await fetch(i);if(!r.ok)throw new Error(`${a.errorPrefix} occurred during polygon mask download`);return this._parseSvgPath(await r.text(),e)},this._drawPoints=()=>{if(this.raw)for(const t of this.raw)this._container.particles.addParticle({x:t.x,y:t.y})},this._getEquidistantPointByIndex=t=>{const e=this._container.actualOptions;if(!e.polygon)return;if(!this.raw?.length||!this.paths?.length)throw new Error(V);let n,i=0;const o=this.paths.reduce(((t,e)=>t+e.length),0)/e.particles.number.value;for(const e of this.paths){const r=o*t-i;if(r<=e.length){n=e.element.getPointAtLength(r);break}i+=e.length}const r=this._scale;return{x:(n?.x??b)*r+(this.offset?.x??b),y:(n?.y??f)*r+(this.offset?.y??f)}},this._getPointByIndex=t=>{if(!this.raw?.length)throw new Error(V);const e=this.raw[t%this.raw.length];return{x:e.x,y:e.y}},this._getRandomPoint=()=>{if(!this.raw?.length)throw new Error(V);const t=(0,a.itemFromArray)(this.raw);return{x:t.x,y:t.y}},this._getRandomPointByLength=()=>{if(!this._container.actualOptions.polygon)return;if(!this.raw?.length||!this.paths?.length)throw new Error(V);const t=(0,a.itemFromArray)(this.paths),e=Math.floor((0,a.getRandom)()*t.length)+1,n=t.element.getPointAtLength(e),i=this._scale;return{x:n.x*i+(this.offset?.x??b),y:n.y*i+(this.offset?.y??f)}},this._initRawData=async t=>{const e=this._container.actualOptions.polygon;if(e){if(e.url)this.raw=await this._downloadSvgPath(e.url,t);else if(e.data){const n=e.data;let i;if((0,a.isString)(n))i=n;else{const t=t=>`<path d="${t}" />`,e=(0,a.isArray)(n.path)?n.path.map(t).join(""):t(n.path);i=`<svg ${'xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"'} width="${n.size.width}" height="${n.size.height}">${e}</svg>`}this.raw=this._parseSvgPath(i,t)}this._createPath2D(),this._engine.dispatchEvent("polygonMaskLoaded",{container:this._container})}},this._parseSvgPath=(t,e)=>{const n=e??!1;if(void 0!==this.paths&&!n)return this.raw;const i=this._container,o=i.actualOptions.polygon;if(!o)return;const r=(new DOMParser).parseFromString(t,"image/svg+xml"),s=r.getElementsByTagName("svg")[0];let h=s.getElementsByTagName("path");h.length||(h=r.getElementsByTagName("path")),this.paths=[];for(let t=0;t<h.length;t++){const e=h.item(t);e&&this.paths.push({element:e,length:e.getTotalLength()})}const S=this._scale;this.dimension.width=parseFloat(s.getAttribute("width")??"0")*S,this.dimension.height=parseFloat(s.getAttribute("height")??"0")*S;const c=o.position??{x:50,y:50},u=i.canvas.size;return this.offset={x:u.width*c.x/a.percentDenominator-this.dimension.width*m,y:u.height*c.y/a.percentDenominator-this.dimension.height*m},function(t,e,n){const i=[];for(const o of t){const t=o.element.pathSegList,r=t?.numberOfItems??0,s={x:0,y:0};for(let o=0;o<r;o++){const r=t?.getItem(o),h=window.SVGPathSeg;switch(r?.pathSegType){case h.PATHSEG_MOVETO_ABS:case h.PATHSEG_LINETO_ABS:case h.PATHSEG_CURVETO_CUBIC_ABS:case h.PATHSEG_CURVETO_QUADRATIC_ABS:case h.PATHSEG_ARC_ABS:case h.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:case h.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:{const t=r;s.x=t.x,s.y=t.y;break}case h.PATHSEG_LINETO_HORIZONTAL_ABS:s.x=r.x;break;case h.PATHSEG_LINETO_VERTICAL_ABS:s.y=r.y;break;case h.PATHSEG_LINETO_REL:case h.PATHSEG_MOVETO_REL:case h.PATHSEG_CURVETO_CUBIC_REL:case h.PATHSEG_CURVETO_QUADRATIC_REL:case h.PATHSEG_ARC_REL:case h.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:case h.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:{const t=r;s.x+=t.x,s.y+=t.y;break}case h.PATHSEG_LINETO_HORIZONTAL_REL:s.x+=r.x;break;case h.PATHSEG_LINETO_VERTICAL_REL:s.y+=r.y;break;case h.PATHSEG_UNKNOWN:case h.PATHSEG_CLOSEPATH:continue}i.push({x:s.x*e+n.x,y:s.y*e+n.y})}}return i}(this.paths,S,this.offset)},this._polygonBounce=(t,e,n)=>{const i=this._container.actualOptions.polygon;if(!this.raw||!i?.enable||n!==a.OutModeDirection.top)return!1;if(i.type===h.inside||i.type===h.outside){let e,n,i;const o=t.getPosition(),r=t.getRadius(),s=1;for(let h=0,S=this.raw.length-s;h<this.raw.length;S=h++){const s=this.raw[h],c=this.raw[S];e=y(s,c,o);const u=(0,a.getDistances)(o,e);if([n,i]=[u.dx,u.dy],u.distance<r)return G(s,c,t.velocity),!0}if(e&&void 0!==n&&void 0!==i&&!this._checkInsidePolygon(o)){const n={x:1,y:1},i=2*r,s=-1;return o.x>=e.x&&(n.x=-1),o.y>=e.y&&(n.y=-1),t.position.x=e.x+i*n.x,t.position.y=e.y+i*n.y,t.velocity.mult(s),!0}}else if(i.type===h.inline&&t.initialPosition){const e=(0,a.getDistance)(t.initialPosition,t.getPosition()),{velocity:n}=t;if(e>this._moveRadius)return n.x=n.y*m-n.x,n.y=n.x*m-n.y,!0}return!1},this._randomPoint=()=>{const t=this._container,e=t.actualOptions.polygon;if(!e)return;let n;if(e.type===h.inline)switch(e.inline.arrangement){case r.randomPoint:n=this._getRandomPoint();break;case r.randomLength:n=this._getRandomPointByLength();break;case r.equidistant:n=this._getEquidistantPointByIndex(t.particles.count);break;case r.onePerPoint:case r.perPoint:default:n=this._getPointByIndex(t.particles.count)}else{const e=t.canvas.size;n={x:(0,a.getRandom)()*e.width,y:(0,a.getRandom)()*e.height}}return this._checkInsidePolygon(n)?n:this._randomPoint()},this._container=t,this._engine=e,this.dimension={height:0,width:0},this._moveRadius=0,this._scale=1}clickPositionValid(t){const e=this._container.actualOptions.polygon;return!!e?.enable&&e.type!==h.none&&e.type!==h.inline&&this._checkInsidePolygon(t)}draw(t){if(!this.paths?.length)return;const e=this._container.actualOptions.polygon;if(!e?.enable)return;const n=e.draw;if(!n.enable)return;const i=this.raw;for(const e of this.paths){const o=e.path2d;t&&(o&&this.offset?l(this._engine,t,o,n.stroke,this.offset):i&&P(this._engine,t,i,n.stroke))}}async init(){const t=this._container,e=t.actualOptions.polygon,n=t.retina.pixelRatio;e&&(this._moveRadius=e.move.radius*n,this._scale=e.scale*n,e.enable&&await this._initRawData())}particleBounce(t,e,n){return this._polygonBounce(t,e,n)}particlePosition(t){const e=this._container.actualOptions.polygon;if(e?.enable&&(this.raw?.length??0)>0)return(0,a.deepExtend)({},t||this._randomPoint())}particlesInitialization(){const t=this._container.actualOptions.polygon;return!(!t?.enable||t.type!==h.inline||t.inline.arrangement!==r.onePerPoint&&t.inline.arrangement!==r.perPoint)&&(this._drawPoints(),!0)}resize(){const t=this._container,e=t.actualOptions.polygon;if(!e?.enable||e.type===h.none)return;this.redrawTimeout&&clearTimeout(this.redrawTimeout);this.redrawTimeout=setTimeout((()=>{(async()=>{await this._initRawData(!0),await t.particles.redraw()})()}),250)}stop(){delete this.raw,delete this.paths}}class x{constructor(t){this.id="polygonMask",this._engine=t}getPlugin(t){return Promise.resolve(new C(t,this._engine))}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let n=t.polygon;void 0===n?.load&&(t.polygon=n=new _(this._engine)),n.load(e?.polygon)}needsPlugin(t){return t?.polygon?.enable??(void 0!==t?.polygon?.type&&t.polygon.type!==h.none)}}async function T(t,e=!0){t.checkVersion("3.9.0"),await t.addPlugin(new x(t),e)}return o})()));
@@ -1 +1 @@
1
- /*! tsParticles Polygon Mask Plugin v3.8.0 by Matteo Bruni */
1
+ /*! tsParticles Polygon Mask Plugin v3.9.0 by Matteo Bruni */
@@ -6,7 +6,7 @@ export declare class PolygonMaskInstance implements IContainerPlugin {
6
6
  offset?: ICoordinates;
7
7
  paths?: ISvgPath[];
8
8
  raw?: ICoordinates[];
9
- redrawTimeout?: number;
9
+ redrawTimeout?: number | NodeJS.Timeout;
10
10
  private readonly _container;
11
11
  private readonly _engine;
12
12
  private _moveRadius;
@@ -388,7 +388,7 @@
388
388
  clearTimeout(this.redrawTimeout);
389
389
  }
390
390
  const timeout = 250;
391
- this.redrawTimeout = window.setTimeout(() => {
391
+ this.redrawTimeout = setTimeout(() => {
392
392
  void (async () => {
393
393
  await this._initRawData(true);
394
394
  await container.particles.redraw();
package/umd/index.js CHANGED
@@ -27,7 +27,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
27
27
  require("./pathseg.js");
28
28
  const PolygonMaskPlugin_js_1 = require("./PolygonMaskPlugin.js");
29
29
  async function loadPolygonMaskPlugin(engine, refresh = true) {
30
- engine.checkVersion("3.8.0");
30
+ engine.checkVersion("3.9.0");
31
31
  await engine.addPlugin(new PolygonMaskPlugin_js_1.PolygonMaskPlugin(engine), refresh);
32
32
  }
33
33
  __exportStar(require("./Enums/PolygonMaskInlineArrangement.js"), exports);