tsparticles 2.0.6 → 2.1.2

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.
package/939.js DELETED
@@ -1,1780 +0,0 @@
1
- /*!
2
- * Author : Matteo Bruni
3
- * MIT license: https://opensource.org/licenses/MIT
4
- * Demo / Generator : https://particles.js.org/
5
- * GitHub : https://www.github.com/matteobruni/tsparticles
6
- * How to use? : Check the GitHub README
7
- * v2.0.6
8
- */
9
- "use strict";
10
- (this["webpackChunktsparticles"] = this["webpackChunktsparticles"] || []).push([[939],{
11
-
12
- /***/ 939:
13
- /***/ (() => {
14
-
15
-
16
-
17
- (function () {
18
- "use strict";
19
-
20
- try {
21
- if (typeof window === "undefined") return;
22
-
23
- if (!("SVGPathSeg" in window)) {
24
- window.SVGPathSeg = function (type, typeAsLetter, owningPathSegList) {
25
- this.pathSegType = type;
26
- this.pathSegTypeAsLetter = typeAsLetter;
27
- this._owningPathSegList = owningPathSegList;
28
- };
29
-
30
- window.SVGPathSeg.prototype.classname = "SVGPathSeg";
31
- window.SVGPathSeg.PATHSEG_UNKNOWN = 0;
32
- window.SVGPathSeg.PATHSEG_CLOSEPATH = 1;
33
- window.SVGPathSeg.PATHSEG_MOVETO_ABS = 2;
34
- window.SVGPathSeg.PATHSEG_MOVETO_REL = 3;
35
- window.SVGPathSeg.PATHSEG_LINETO_ABS = 4;
36
- window.SVGPathSeg.PATHSEG_LINETO_REL = 5;
37
- window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS = 6;
38
- window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL = 7;
39
- window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS = 8;
40
- window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL = 9;
41
- window.SVGPathSeg.PATHSEG_ARC_ABS = 10;
42
- window.SVGPathSeg.PATHSEG_ARC_REL = 11;
43
- window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS = 12;
44
- window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL = 13;
45
- window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS = 14;
46
- window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL = 15;
47
- window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16;
48
- window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17;
49
- window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18;
50
- window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19;
51
-
52
- window.SVGPathSeg.prototype._segmentChanged = function () {
53
- if (this._owningPathSegList) this._owningPathSegList.segmentChanged(this);
54
- };
55
-
56
- window.SVGPathSegClosePath = function (owningPathSegList) {
57
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CLOSEPATH, "z", owningPathSegList);
58
- };
59
-
60
- window.SVGPathSegClosePath.prototype = Object.create(window.SVGPathSeg.prototype);
61
-
62
- window.SVGPathSegClosePath.prototype.toString = function () {
63
- return "[object SVGPathSegClosePath]";
64
- };
65
-
66
- window.SVGPathSegClosePath.prototype._asPathString = function () {
67
- return this.pathSegTypeAsLetter;
68
- };
69
-
70
- window.SVGPathSegClosePath.prototype.clone = function () {
71
- return new window.SVGPathSegClosePath(undefined);
72
- };
73
-
74
- window.SVGPathSegMovetoAbs = function (owningPathSegList, x, y) {
75
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_MOVETO_ABS, "M", owningPathSegList);
76
- this._x = x;
77
- this._y = y;
78
- };
79
-
80
- window.SVGPathSegMovetoAbs.prototype = Object.create(window.SVGPathSeg.prototype);
81
-
82
- window.SVGPathSegMovetoAbs.prototype.toString = function () {
83
- return "[object SVGPathSegMovetoAbs]";
84
- };
85
-
86
- window.SVGPathSegMovetoAbs.prototype._asPathString = function () {
87
- return this.pathSegTypeAsLetter + " " + this._x + " " + this._y;
88
- };
89
-
90
- window.SVGPathSegMovetoAbs.prototype.clone = function () {
91
- return new window.SVGPathSegMovetoAbs(undefined, this._x, this._y);
92
- };
93
-
94
- Object.defineProperty(window.SVGPathSegMovetoAbs.prototype, "x", {
95
- get: function () {
96
- return this._x;
97
- },
98
- set: function (x) {
99
- this._x = x;
100
-
101
- this._segmentChanged();
102
- },
103
- enumerable: true
104
- });
105
- Object.defineProperty(window.SVGPathSegMovetoAbs.prototype, "y", {
106
- get: function () {
107
- return this._y;
108
- },
109
- set: function (y) {
110
- this._y = y;
111
-
112
- this._segmentChanged();
113
- },
114
- enumerable: true
115
- });
116
-
117
- window.SVGPathSegMovetoRel = function (owningPathSegList, x, y) {
118
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_MOVETO_REL, "m", owningPathSegList);
119
- this._x = x;
120
- this._y = y;
121
- };
122
-
123
- window.SVGPathSegMovetoRel.prototype = Object.create(window.SVGPathSeg.prototype);
124
-
125
- window.SVGPathSegMovetoRel.prototype.toString = function () {
126
- return "[object SVGPathSegMovetoRel]";
127
- };
128
-
129
- window.SVGPathSegMovetoRel.prototype._asPathString = function () {
130
- return this.pathSegTypeAsLetter + " " + this._x + " " + this._y;
131
- };
132
-
133
- window.SVGPathSegMovetoRel.prototype.clone = function () {
134
- return new window.SVGPathSegMovetoRel(undefined, this._x, this._y);
135
- };
136
-
137
- Object.defineProperty(window.SVGPathSegMovetoRel.prototype, "x", {
138
- get: function () {
139
- return this._x;
140
- },
141
- set: function (x) {
142
- this._x = x;
143
-
144
- this._segmentChanged();
145
- },
146
- enumerable: true
147
- });
148
- Object.defineProperty(window.SVGPathSegMovetoRel.prototype, "y", {
149
- get: function () {
150
- return this._y;
151
- },
152
- set: function (y) {
153
- this._y = y;
154
-
155
- this._segmentChanged();
156
- },
157
- enumerable: true
158
- });
159
-
160
- window.SVGPathSegLinetoAbs = function (owningPathSegList, x, y) {
161
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_ABS, "L", owningPathSegList);
162
- this._x = x;
163
- this._y = y;
164
- };
165
-
166
- window.SVGPathSegLinetoAbs.prototype = Object.create(window.SVGPathSeg.prototype);
167
-
168
- window.SVGPathSegLinetoAbs.prototype.toString = function () {
169
- return "[object SVGPathSegLinetoAbs]";
170
- };
171
-
172
- window.SVGPathSegLinetoAbs.prototype._asPathString = function () {
173
- return this.pathSegTypeAsLetter + " " + this._x + " " + this._y;
174
- };
175
-
176
- window.SVGPathSegLinetoAbs.prototype.clone = function () {
177
- return new window.SVGPathSegLinetoAbs(undefined, this._x, this._y);
178
- };
179
-
180
- Object.defineProperty(window.SVGPathSegLinetoAbs.prototype, "x", {
181
- get: function () {
182
- return this._x;
183
- },
184
- set: function (x) {
185
- this._x = x;
186
-
187
- this._segmentChanged();
188
- },
189
- enumerable: true
190
- });
191
- Object.defineProperty(window.SVGPathSegLinetoAbs.prototype, "y", {
192
- get: function () {
193
- return this._y;
194
- },
195
- set: function (y) {
196
- this._y = y;
197
-
198
- this._segmentChanged();
199
- },
200
- enumerable: true
201
- });
202
-
203
- window.SVGPathSegLinetoRel = function (owningPathSegList, x, y) {
204
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_REL, "l", owningPathSegList);
205
- this._x = x;
206
- this._y = y;
207
- };
208
-
209
- window.SVGPathSegLinetoRel.prototype = Object.create(window.SVGPathSeg.prototype);
210
-
211
- window.SVGPathSegLinetoRel.prototype.toString = function () {
212
- return "[object SVGPathSegLinetoRel]";
213
- };
214
-
215
- window.SVGPathSegLinetoRel.prototype._asPathString = function () {
216
- return this.pathSegTypeAsLetter + " " + this._x + " " + this._y;
217
- };
218
-
219
- window.SVGPathSegLinetoRel.prototype.clone = function () {
220
- return new window.SVGPathSegLinetoRel(undefined, this._x, this._y);
221
- };
222
-
223
- Object.defineProperty(window.SVGPathSegLinetoRel.prototype, "x", {
224
- get: function () {
225
- return this._x;
226
- },
227
- set: function (x) {
228
- this._x = x;
229
-
230
- this._segmentChanged();
231
- },
232
- enumerable: true
233
- });
234
- Object.defineProperty(window.SVGPathSegLinetoRel.prototype, "y", {
235
- get: function () {
236
- return this._y;
237
- },
238
- set: function (y) {
239
- this._y = y;
240
-
241
- this._segmentChanged();
242
- },
243
- enumerable: true
244
- });
245
-
246
- window.SVGPathSegCurvetoCubicAbs = function (owningPathSegList, x, y, x1, y1, x2, y2) {
247
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS, "C", owningPathSegList);
248
- this._x = x;
249
- this._y = y;
250
- this._x1 = x1;
251
- this._y1 = y1;
252
- this._x2 = x2;
253
- this._y2 = y2;
254
- };
255
-
256
- window.SVGPathSegCurvetoCubicAbs.prototype = Object.create(window.SVGPathSeg.prototype);
257
-
258
- window.SVGPathSegCurvetoCubicAbs.prototype.toString = function () {
259
- return "[object SVGPathSegCurvetoCubicAbs]";
260
- };
261
-
262
- window.SVGPathSegCurvetoCubicAbs.prototype._asPathString = function () {
263
- return this.pathSegTypeAsLetter + " " + this._x1 + " " + this._y1 + " " + this._x2 + " " + this._y2 + " " + this._x + " " + this._y;
264
- };
265
-
266
- window.SVGPathSegCurvetoCubicAbs.prototype.clone = function () {
267
- return new window.SVGPathSegCurvetoCubicAbs(undefined, this._x, this._y, this._x1, this._y1, this._x2, this._y2);
268
- };
269
-
270
- Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "x", {
271
- get: function () {
272
- return this._x;
273
- },
274
- set: function (x) {
275
- this._x = x;
276
-
277
- this._segmentChanged();
278
- },
279
- enumerable: true
280
- });
281
- Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "y", {
282
- get: function () {
283
- return this._y;
284
- },
285
- set: function (y) {
286
- this._y = y;
287
-
288
- this._segmentChanged();
289
- },
290
- enumerable: true
291
- });
292
- Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "x1", {
293
- get: function () {
294
- return this._x1;
295
- },
296
- set: function (x1) {
297
- this._x1 = x1;
298
-
299
- this._segmentChanged();
300
- },
301
- enumerable: true
302
- });
303
- Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "y1", {
304
- get: function () {
305
- return this._y1;
306
- },
307
- set: function (y1) {
308
- this._y1 = y1;
309
-
310
- this._segmentChanged();
311
- },
312
- enumerable: true
313
- });
314
- Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "x2", {
315
- get: function () {
316
- return this._x2;
317
- },
318
- set: function (x2) {
319
- this._x2 = x2;
320
-
321
- this._segmentChanged();
322
- },
323
- enumerable: true
324
- });
325
- Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "y2", {
326
- get: function () {
327
- return this._y2;
328
- },
329
- set: function (y2) {
330
- this._y2 = y2;
331
-
332
- this._segmentChanged();
333
- },
334
- enumerable: true
335
- });
336
-
337
- window.SVGPathSegCurvetoCubicRel = function (owningPathSegList, x, y, x1, y1, x2, y2) {
338
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL, "c", owningPathSegList);
339
- this._x = x;
340
- this._y = y;
341
- this._x1 = x1;
342
- this._y1 = y1;
343
- this._x2 = x2;
344
- this._y2 = y2;
345
- };
346
-
347
- window.SVGPathSegCurvetoCubicRel.prototype = Object.create(window.SVGPathSeg.prototype);
348
-
349
- window.SVGPathSegCurvetoCubicRel.prototype.toString = function () {
350
- return "[object SVGPathSegCurvetoCubicRel]";
351
- };
352
-
353
- window.SVGPathSegCurvetoCubicRel.prototype._asPathString = function () {
354
- return this.pathSegTypeAsLetter + " " + this._x1 + " " + this._y1 + " " + this._x2 + " " + this._y2 + " " + this._x + " " + this._y;
355
- };
356
-
357
- window.SVGPathSegCurvetoCubicRel.prototype.clone = function () {
358
- return new window.SVGPathSegCurvetoCubicRel(undefined, this._x, this._y, this._x1, this._y1, this._x2, this._y2);
359
- };
360
-
361
- Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "x", {
362
- get: function () {
363
- return this._x;
364
- },
365
- set: function (x) {
366
- this._x = x;
367
-
368
- this._segmentChanged();
369
- },
370
- enumerable: true
371
- });
372
- Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "y", {
373
- get: function () {
374
- return this._y;
375
- },
376
- set: function (y) {
377
- this._y = y;
378
-
379
- this._segmentChanged();
380
- },
381
- enumerable: true
382
- });
383
- Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "x1", {
384
- get: function () {
385
- return this._x1;
386
- },
387
- set: function (x1) {
388
- this._x1 = x1;
389
-
390
- this._segmentChanged();
391
- },
392
- enumerable: true
393
- });
394
- Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "y1", {
395
- get: function () {
396
- return this._y1;
397
- },
398
- set: function (y1) {
399
- this._y1 = y1;
400
-
401
- this._segmentChanged();
402
- },
403
- enumerable: true
404
- });
405
- Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "x2", {
406
- get: function () {
407
- return this._x2;
408
- },
409
- set: function (x2) {
410
- this._x2 = x2;
411
-
412
- this._segmentChanged();
413
- },
414
- enumerable: true
415
- });
416
- Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "y2", {
417
- get: function () {
418
- return this._y2;
419
- },
420
- set: function (y2) {
421
- this._y2 = y2;
422
-
423
- this._segmentChanged();
424
- },
425
- enumerable: true
426
- });
427
-
428
- window.SVGPathSegCurvetoQuadraticAbs = function (owningPathSegList, x, y, x1, y1) {
429
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS, "Q", owningPathSegList);
430
- this._x = x;
431
- this._y = y;
432
- this._x1 = x1;
433
- this._y1 = y1;
434
- };
435
-
436
- window.SVGPathSegCurvetoQuadraticAbs.prototype = Object.create(window.SVGPathSeg.prototype);
437
-
438
- window.SVGPathSegCurvetoQuadraticAbs.prototype.toString = function () {
439
- return "[object SVGPathSegCurvetoQuadraticAbs]";
440
- };
441
-
442
- window.SVGPathSegCurvetoQuadraticAbs.prototype._asPathString = function () {
443
- return this.pathSegTypeAsLetter + " " + this._x1 + " " + this._y1 + " " + this._x + " " + this._y;
444
- };
445
-
446
- window.SVGPathSegCurvetoQuadraticAbs.prototype.clone = function () {
447
- return new window.SVGPathSegCurvetoQuadraticAbs(undefined, this._x, this._y, this._x1, this._y1);
448
- };
449
-
450
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, "x", {
451
- get: function () {
452
- return this._x;
453
- },
454
- set: function (x) {
455
- this._x = x;
456
-
457
- this._segmentChanged();
458
- },
459
- enumerable: true
460
- });
461
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, "y", {
462
- get: function () {
463
- return this._y;
464
- },
465
- set: function (y) {
466
- this._y = y;
467
-
468
- this._segmentChanged();
469
- },
470
- enumerable: true
471
- });
472
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, "x1", {
473
- get: function () {
474
- return this._x1;
475
- },
476
- set: function (x1) {
477
- this._x1 = x1;
478
-
479
- this._segmentChanged();
480
- },
481
- enumerable: true
482
- });
483
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, "y1", {
484
- get: function () {
485
- return this._y1;
486
- },
487
- set: function (y1) {
488
- this._y1 = y1;
489
-
490
- this._segmentChanged();
491
- },
492
- enumerable: true
493
- });
494
-
495
- window.SVGPathSegCurvetoQuadraticRel = function (owningPathSegList, x, y, x1, y1) {
496
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL, "q", owningPathSegList);
497
- this._x = x;
498
- this._y = y;
499
- this._x1 = x1;
500
- this._y1 = y1;
501
- };
502
-
503
- window.SVGPathSegCurvetoQuadraticRel.prototype = Object.create(window.SVGPathSeg.prototype);
504
-
505
- window.SVGPathSegCurvetoQuadraticRel.prototype.toString = function () {
506
- return "[object SVGPathSegCurvetoQuadraticRel]";
507
- };
508
-
509
- window.SVGPathSegCurvetoQuadraticRel.prototype._asPathString = function () {
510
- return this.pathSegTypeAsLetter + " " + this._x1 + " " + this._y1 + " " + this._x + " " + this._y;
511
- };
512
-
513
- window.SVGPathSegCurvetoQuadraticRel.prototype.clone = function () {
514
- return new window.SVGPathSegCurvetoQuadraticRel(undefined, this._x, this._y, this._x1, this._y1);
515
- };
516
-
517
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, "x", {
518
- get: function () {
519
- return this._x;
520
- },
521
- set: function (x) {
522
- this._x = x;
523
-
524
- this._segmentChanged();
525
- },
526
- enumerable: true
527
- });
528
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, "y", {
529
- get: function () {
530
- return this._y;
531
- },
532
- set: function (y) {
533
- this._y = y;
534
-
535
- this._segmentChanged();
536
- },
537
- enumerable: true
538
- });
539
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, "x1", {
540
- get: function () {
541
- return this._x1;
542
- },
543
- set: function (x1) {
544
- this._x1 = x1;
545
-
546
- this._segmentChanged();
547
- },
548
- enumerable: true
549
- });
550
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, "y1", {
551
- get: function () {
552
- return this._y1;
553
- },
554
- set: function (y1) {
555
- this._y1 = y1;
556
-
557
- this._segmentChanged();
558
- },
559
- enumerable: true
560
- });
561
-
562
- window.SVGPathSegArcAbs = function (owningPathSegList, x, y, r1, r2, angle, largeArcFlag, sweepFlag) {
563
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_ARC_ABS, "A", owningPathSegList);
564
- this._x = x;
565
- this._y = y;
566
- this._r1 = r1;
567
- this._r2 = r2;
568
- this._angle = angle;
569
- this._largeArcFlag = largeArcFlag;
570
- this._sweepFlag = sweepFlag;
571
- };
572
-
573
- window.SVGPathSegArcAbs.prototype = Object.create(window.SVGPathSeg.prototype);
574
-
575
- window.SVGPathSegArcAbs.prototype.toString = function () {
576
- return "[object SVGPathSegArcAbs]";
577
- };
578
-
579
- window.SVGPathSegArcAbs.prototype._asPathString = function () {
580
- return this.pathSegTypeAsLetter + " " + this._r1 + " " + this._r2 + " " + this._angle + " " + (this._largeArcFlag ? "1" : "0") + " " + (this._sweepFlag ? "1" : "0") + " " + this._x + " " + this._y;
581
- };
582
-
583
- window.SVGPathSegArcAbs.prototype.clone = function () {
584
- return new window.SVGPathSegArcAbs(undefined, this._x, this._y, this._r1, this._r2, this._angle, this._largeArcFlag, this._sweepFlag);
585
- };
586
-
587
- Object.defineProperty(window.SVGPathSegArcAbs.prototype, "x", {
588
- get: function () {
589
- return this._x;
590
- },
591
- set: function (x) {
592
- this._x = x;
593
-
594
- this._segmentChanged();
595
- },
596
- enumerable: true
597
- });
598
- Object.defineProperty(window.SVGPathSegArcAbs.prototype, "y", {
599
- get: function () {
600
- return this._y;
601
- },
602
- set: function (y) {
603
- this._y = y;
604
-
605
- this._segmentChanged();
606
- },
607
- enumerable: true
608
- });
609
- Object.defineProperty(window.SVGPathSegArcAbs.prototype, "r1", {
610
- get: function () {
611
- return this._r1;
612
- },
613
- set: function (r1) {
614
- this._r1 = r1;
615
-
616
- this._segmentChanged();
617
- },
618
- enumerable: true
619
- });
620
- Object.defineProperty(window.SVGPathSegArcAbs.prototype, "r2", {
621
- get: function () {
622
- return this._r2;
623
- },
624
- set: function (r2) {
625
- this._r2 = r2;
626
-
627
- this._segmentChanged();
628
- },
629
- enumerable: true
630
- });
631
- Object.defineProperty(window.SVGPathSegArcAbs.prototype, "angle", {
632
- get: function () {
633
- return this._angle;
634
- },
635
- set: function (angle) {
636
- this._angle = angle;
637
-
638
- this._segmentChanged();
639
- },
640
- enumerable: true
641
- });
642
- Object.defineProperty(window.SVGPathSegArcAbs.prototype, "largeArcFlag", {
643
- get: function () {
644
- return this._largeArcFlag;
645
- },
646
- set: function (largeArcFlag) {
647
- this._largeArcFlag = largeArcFlag;
648
-
649
- this._segmentChanged();
650
- },
651
- enumerable: true
652
- });
653
- Object.defineProperty(window.SVGPathSegArcAbs.prototype, "sweepFlag", {
654
- get: function () {
655
- return this._sweepFlag;
656
- },
657
- set: function (sweepFlag) {
658
- this._sweepFlag = sweepFlag;
659
-
660
- this._segmentChanged();
661
- },
662
- enumerable: true
663
- });
664
-
665
- window.SVGPathSegArcRel = function (owningPathSegList, x, y, r1, r2, angle, largeArcFlag, sweepFlag) {
666
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_ARC_REL, "a", owningPathSegList);
667
- this._x = x;
668
- this._y = y;
669
- this._r1 = r1;
670
- this._r2 = r2;
671
- this._angle = angle;
672
- this._largeArcFlag = largeArcFlag;
673
- this._sweepFlag = sweepFlag;
674
- };
675
-
676
- window.SVGPathSegArcRel.prototype = Object.create(window.SVGPathSeg.prototype);
677
-
678
- window.SVGPathSegArcRel.prototype.toString = function () {
679
- return "[object SVGPathSegArcRel]";
680
- };
681
-
682
- window.SVGPathSegArcRel.prototype._asPathString = function () {
683
- return this.pathSegTypeAsLetter + " " + this._r1 + " " + this._r2 + " " + this._angle + " " + (this._largeArcFlag ? "1" : "0") + " " + (this._sweepFlag ? "1" : "0") + " " + this._x + " " + this._y;
684
- };
685
-
686
- window.SVGPathSegArcRel.prototype.clone = function () {
687
- return new window.SVGPathSegArcRel(undefined, this._x, this._y, this._r1, this._r2, this._angle, this._largeArcFlag, this._sweepFlag);
688
- };
689
-
690
- Object.defineProperty(window.SVGPathSegArcRel.prototype, "x", {
691
- get: function () {
692
- return this._x;
693
- },
694
- set: function (x) {
695
- this._x = x;
696
-
697
- this._segmentChanged();
698
- },
699
- enumerable: true
700
- });
701
- Object.defineProperty(window.SVGPathSegArcRel.prototype, "y", {
702
- get: function () {
703
- return this._y;
704
- },
705
- set: function (y) {
706
- this._y = y;
707
-
708
- this._segmentChanged();
709
- },
710
- enumerable: true
711
- });
712
- Object.defineProperty(window.SVGPathSegArcRel.prototype, "r1", {
713
- get: function () {
714
- return this._r1;
715
- },
716
- set: function (r1) {
717
- this._r1 = r1;
718
-
719
- this._segmentChanged();
720
- },
721
- enumerable: true
722
- });
723
- Object.defineProperty(window.SVGPathSegArcRel.prototype, "r2", {
724
- get: function () {
725
- return this._r2;
726
- },
727
- set: function (r2) {
728
- this._r2 = r2;
729
-
730
- this._segmentChanged();
731
- },
732
- enumerable: true
733
- });
734
- Object.defineProperty(window.SVGPathSegArcRel.prototype, "angle", {
735
- get: function () {
736
- return this._angle;
737
- },
738
- set: function (angle) {
739
- this._angle = angle;
740
-
741
- this._segmentChanged();
742
- },
743
- enumerable: true
744
- });
745
- Object.defineProperty(window.SVGPathSegArcRel.prototype, "largeArcFlag", {
746
- get: function () {
747
- return this._largeArcFlag;
748
- },
749
- set: function (largeArcFlag) {
750
- this._largeArcFlag = largeArcFlag;
751
-
752
- this._segmentChanged();
753
- },
754
- enumerable: true
755
- });
756
- Object.defineProperty(window.SVGPathSegArcRel.prototype, "sweepFlag", {
757
- get: function () {
758
- return this._sweepFlag;
759
- },
760
- set: function (sweepFlag) {
761
- this._sweepFlag = sweepFlag;
762
-
763
- this._segmentChanged();
764
- },
765
- enumerable: true
766
- });
767
-
768
- window.SVGPathSegLinetoHorizontalAbs = function (owningPathSegList, x) {
769
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS, "H", owningPathSegList);
770
- this._x = x;
771
- };
772
-
773
- window.SVGPathSegLinetoHorizontalAbs.prototype = Object.create(window.SVGPathSeg.prototype);
774
-
775
- window.SVGPathSegLinetoHorizontalAbs.prototype.toString = function () {
776
- return "[object SVGPathSegLinetoHorizontalAbs]";
777
- };
778
-
779
- window.SVGPathSegLinetoHorizontalAbs.prototype._asPathString = function () {
780
- return this.pathSegTypeAsLetter + " " + this._x;
781
- };
782
-
783
- window.SVGPathSegLinetoHorizontalAbs.prototype.clone = function () {
784
- return new window.SVGPathSegLinetoHorizontalAbs(undefined, this._x);
785
- };
786
-
787
- Object.defineProperty(window.SVGPathSegLinetoHorizontalAbs.prototype, "x", {
788
- get: function () {
789
- return this._x;
790
- },
791
- set: function (x) {
792
- this._x = x;
793
-
794
- this._segmentChanged();
795
- },
796
- enumerable: true
797
- });
798
-
799
- window.SVGPathSegLinetoHorizontalRel = function (owningPathSegList, x) {
800
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL, "h", owningPathSegList);
801
- this._x = x;
802
- };
803
-
804
- window.SVGPathSegLinetoHorizontalRel.prototype = Object.create(window.SVGPathSeg.prototype);
805
-
806
- window.SVGPathSegLinetoHorizontalRel.prototype.toString = function () {
807
- return "[object SVGPathSegLinetoHorizontalRel]";
808
- };
809
-
810
- window.SVGPathSegLinetoHorizontalRel.prototype._asPathString = function () {
811
- return this.pathSegTypeAsLetter + " " + this._x;
812
- };
813
-
814
- window.SVGPathSegLinetoHorizontalRel.prototype.clone = function () {
815
- return new window.SVGPathSegLinetoHorizontalRel(undefined, this._x);
816
- };
817
-
818
- Object.defineProperty(window.SVGPathSegLinetoHorizontalRel.prototype, "x", {
819
- get: function () {
820
- return this._x;
821
- },
822
- set: function (x) {
823
- this._x = x;
824
-
825
- this._segmentChanged();
826
- },
827
- enumerable: true
828
- });
829
-
830
- window.SVGPathSegLinetoVerticalAbs = function (owningPathSegList, y) {
831
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS, "V", owningPathSegList);
832
- this._y = y;
833
- };
834
-
835
- window.SVGPathSegLinetoVerticalAbs.prototype = Object.create(window.SVGPathSeg.prototype);
836
-
837
- window.SVGPathSegLinetoVerticalAbs.prototype.toString = function () {
838
- return "[object SVGPathSegLinetoVerticalAbs]";
839
- };
840
-
841
- window.SVGPathSegLinetoVerticalAbs.prototype._asPathString = function () {
842
- return this.pathSegTypeAsLetter + " " + this._y;
843
- };
844
-
845
- window.SVGPathSegLinetoVerticalAbs.prototype.clone = function () {
846
- return new window.SVGPathSegLinetoVerticalAbs(undefined, this._y);
847
- };
848
-
849
- Object.defineProperty(window.SVGPathSegLinetoVerticalAbs.prototype, "y", {
850
- get: function () {
851
- return this._y;
852
- },
853
- set: function (y) {
854
- this._y = y;
855
-
856
- this._segmentChanged();
857
- },
858
- enumerable: true
859
- });
860
-
861
- window.SVGPathSegLinetoVerticalRel = function (owningPathSegList, y) {
862
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL, "v", owningPathSegList);
863
- this._y = y;
864
- };
865
-
866
- window.SVGPathSegLinetoVerticalRel.prototype = Object.create(window.SVGPathSeg.prototype);
867
-
868
- window.SVGPathSegLinetoVerticalRel.prototype.toString = function () {
869
- return "[object SVGPathSegLinetoVerticalRel]";
870
- };
871
-
872
- window.SVGPathSegLinetoVerticalRel.prototype._asPathString = function () {
873
- return this.pathSegTypeAsLetter + " " + this._y;
874
- };
875
-
876
- window.SVGPathSegLinetoVerticalRel.prototype.clone = function () {
877
- return new window.SVGPathSegLinetoVerticalRel(undefined, this._y);
878
- };
879
-
880
- Object.defineProperty(window.SVGPathSegLinetoVerticalRel.prototype, "y", {
881
- get: function () {
882
- return this._y;
883
- },
884
- set: function (y) {
885
- this._y = y;
886
-
887
- this._segmentChanged();
888
- },
889
- enumerable: true
890
- });
891
-
892
- window.SVGPathSegCurvetoCubicSmoothAbs = function (owningPathSegList, x, y, x2, y2) {
893
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS, "S", owningPathSegList);
894
- this._x = x;
895
- this._y = y;
896
- this._x2 = x2;
897
- this._y2 = y2;
898
- };
899
-
900
- window.SVGPathSegCurvetoCubicSmoothAbs.prototype = Object.create(window.SVGPathSeg.prototype);
901
-
902
- window.SVGPathSegCurvetoCubicSmoothAbs.prototype.toString = function () {
903
- return "[object SVGPathSegCurvetoCubicSmoothAbs]";
904
- };
905
-
906
- window.SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString = function () {
907
- return this.pathSegTypeAsLetter + " " + this._x2 + " " + this._y2 + " " + this._x + " " + this._y;
908
- };
909
-
910
- window.SVGPathSegCurvetoCubicSmoothAbs.prototype.clone = function () {
911
- return new window.SVGPathSegCurvetoCubicSmoothAbs(undefined, this._x, this._y, this._x2, this._y2);
912
- };
913
-
914
- Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, "x", {
915
- get: function () {
916
- return this._x;
917
- },
918
- set: function (x) {
919
- this._x = x;
920
-
921
- this._segmentChanged();
922
- },
923
- enumerable: true
924
- });
925
- Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, "y", {
926
- get: function () {
927
- return this._y;
928
- },
929
- set: function (y) {
930
- this._y = y;
931
-
932
- this._segmentChanged();
933
- },
934
- enumerable: true
935
- });
936
- Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, "x2", {
937
- get: function () {
938
- return this._x2;
939
- },
940
- set: function (x2) {
941
- this._x2 = x2;
942
-
943
- this._segmentChanged();
944
- },
945
- enumerable: true
946
- });
947
- Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, "y2", {
948
- get: function () {
949
- return this._y2;
950
- },
951
- set: function (y2) {
952
- this._y2 = y2;
953
-
954
- this._segmentChanged();
955
- },
956
- enumerable: true
957
- });
958
-
959
- window.SVGPathSegCurvetoCubicSmoothRel = function (owningPathSegList, x, y, x2, y2) {
960
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL, "s", owningPathSegList);
961
- this._x = x;
962
- this._y = y;
963
- this._x2 = x2;
964
- this._y2 = y2;
965
- };
966
-
967
- window.SVGPathSegCurvetoCubicSmoothRel.prototype = Object.create(window.SVGPathSeg.prototype);
968
-
969
- window.SVGPathSegCurvetoCubicSmoothRel.prototype.toString = function () {
970
- return "[object SVGPathSegCurvetoCubicSmoothRel]";
971
- };
972
-
973
- window.SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString = function () {
974
- return this.pathSegTypeAsLetter + " " + this._x2 + " " + this._y2 + " " + this._x + " " + this._y;
975
- };
976
-
977
- window.SVGPathSegCurvetoCubicSmoothRel.prototype.clone = function () {
978
- return new window.SVGPathSegCurvetoCubicSmoothRel(undefined, this._x, this._y, this._x2, this._y2);
979
- };
980
-
981
- Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, "x", {
982
- get: function () {
983
- return this._x;
984
- },
985
- set: function (x) {
986
- this._x = x;
987
-
988
- this._segmentChanged();
989
- },
990
- enumerable: true
991
- });
992
- Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, "y", {
993
- get: function () {
994
- return this._y;
995
- },
996
- set: function (y) {
997
- this._y = y;
998
-
999
- this._segmentChanged();
1000
- },
1001
- enumerable: true
1002
- });
1003
- Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, "x2", {
1004
- get: function () {
1005
- return this._x2;
1006
- },
1007
- set: function (x2) {
1008
- this._x2 = x2;
1009
-
1010
- this._segmentChanged();
1011
- },
1012
- enumerable: true
1013
- });
1014
- Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, "y2", {
1015
- get: function () {
1016
- return this._y2;
1017
- },
1018
- set: function (y2) {
1019
- this._y2 = y2;
1020
-
1021
- this._segmentChanged();
1022
- },
1023
- enumerable: true
1024
- });
1025
-
1026
- window.SVGPathSegCurvetoQuadraticSmoothAbs = function (owningPathSegList, x, y) {
1027
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS, "T", owningPathSegList);
1028
- this._x = x;
1029
- this._y = y;
1030
- };
1031
-
1032
- window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype = Object.create(window.SVGPathSeg.prototype);
1033
-
1034
- window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString = function () {
1035
- return "[object SVGPathSegCurvetoQuadraticSmoothAbs]";
1036
- };
1037
-
1038
- window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString = function () {
1039
- return this.pathSegTypeAsLetter + " " + this._x + " " + this._y;
1040
- };
1041
-
1042
- window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone = function () {
1043
- return new window.SVGPathSegCurvetoQuadraticSmoothAbs(undefined, this._x, this._y);
1044
- };
1045
-
1046
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype, "x", {
1047
- get: function () {
1048
- return this._x;
1049
- },
1050
- set: function (x) {
1051
- this._x = x;
1052
-
1053
- this._segmentChanged();
1054
- },
1055
- enumerable: true
1056
- });
1057
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype, "y", {
1058
- get: function () {
1059
- return this._y;
1060
- },
1061
- set: function (y) {
1062
- this._y = y;
1063
-
1064
- this._segmentChanged();
1065
- },
1066
- enumerable: true
1067
- });
1068
-
1069
- window.SVGPathSegCurvetoQuadraticSmoothRel = function (owningPathSegList, x, y) {
1070
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL, "t", owningPathSegList);
1071
- this._x = x;
1072
- this._y = y;
1073
- };
1074
-
1075
- window.SVGPathSegCurvetoQuadraticSmoothRel.prototype = Object.create(window.SVGPathSeg.prototype);
1076
-
1077
- window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString = function () {
1078
- return "[object SVGPathSegCurvetoQuadraticSmoothRel]";
1079
- };
1080
-
1081
- window.SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString = function () {
1082
- return this.pathSegTypeAsLetter + " " + this._x + " " + this._y;
1083
- };
1084
-
1085
- window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone = function () {
1086
- return new window.SVGPathSegCurvetoQuadraticSmoothRel(undefined, this._x, this._y);
1087
- };
1088
-
1089
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype, "x", {
1090
- get: function () {
1091
- return this._x;
1092
- },
1093
- set: function (x) {
1094
- this._x = x;
1095
-
1096
- this._segmentChanged();
1097
- },
1098
- enumerable: true
1099
- });
1100
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype, "y", {
1101
- get: function () {
1102
- return this._y;
1103
- },
1104
- set: function (y) {
1105
- this._y = y;
1106
-
1107
- this._segmentChanged();
1108
- },
1109
- enumerable: true
1110
- });
1111
-
1112
- window.SVGPathElement.prototype.createSVGPathSegClosePath = function () {
1113
- return new window.SVGPathSegClosePath(undefined);
1114
- };
1115
-
1116
- window.SVGPathElement.prototype.createSVGPathSegMovetoAbs = function (x, y) {
1117
- return new window.SVGPathSegMovetoAbs(undefined, x, y);
1118
- };
1119
-
1120
- window.SVGPathElement.prototype.createSVGPathSegMovetoRel = function (x, y) {
1121
- return new window.SVGPathSegMovetoRel(undefined, x, y);
1122
- };
1123
-
1124
- window.SVGPathElement.prototype.createSVGPathSegLinetoAbs = function (x, y) {
1125
- return new window.SVGPathSegLinetoAbs(undefined, x, y);
1126
- };
1127
-
1128
- window.SVGPathElement.prototype.createSVGPathSegLinetoRel = function (x, y) {
1129
- return new window.SVGPathSegLinetoRel(undefined, x, y);
1130
- };
1131
-
1132
- window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs = function (x, y, x1, y1, x2, y2) {
1133
- return new window.SVGPathSegCurvetoCubicAbs(undefined, x, y, x1, y1, x2, y2);
1134
- };
1135
-
1136
- window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel = function (x, y, x1, y1, x2, y2) {
1137
- return new window.SVGPathSegCurvetoCubicRel(undefined, x, y, x1, y1, x2, y2);
1138
- };
1139
-
1140
- window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs = function (x, y, x1, y1) {
1141
- return new window.SVGPathSegCurvetoQuadraticAbs(undefined, x, y, x1, y1);
1142
- };
1143
-
1144
- window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel = function (x, y, x1, y1) {
1145
- return new window.SVGPathSegCurvetoQuadraticRel(undefined, x, y, x1, y1);
1146
- };
1147
-
1148
- window.SVGPathElement.prototype.createSVGPathSegArcAbs = function (x, y, r1, r2, angle, largeArcFlag, sweepFlag) {
1149
- return new window.SVGPathSegArcAbs(undefined, x, y, r1, r2, angle, largeArcFlag, sweepFlag);
1150
- };
1151
-
1152
- window.SVGPathElement.prototype.createSVGPathSegArcRel = function (x, y, r1, r2, angle, largeArcFlag, sweepFlag) {
1153
- return new window.SVGPathSegArcRel(undefined, x, y, r1, r2, angle, largeArcFlag, sweepFlag);
1154
- };
1155
-
1156
- window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs = function (x) {
1157
- return new window.SVGPathSegLinetoHorizontalAbs(undefined, x);
1158
- };
1159
-
1160
- window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel = function (x) {
1161
- return new window.SVGPathSegLinetoHorizontalRel(undefined, x);
1162
- };
1163
-
1164
- window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs = function (y) {
1165
- return new window.SVGPathSegLinetoVerticalAbs(undefined, y);
1166
- };
1167
-
1168
- window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel = function (y) {
1169
- return new window.SVGPathSegLinetoVerticalRel(undefined, y);
1170
- };
1171
-
1172
- window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs = function (x, y, x2, y2) {
1173
- return new window.SVGPathSegCurvetoCubicSmoothAbs(undefined, x, y, x2, y2);
1174
- };
1175
-
1176
- window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel = function (x, y, x2, y2) {
1177
- return new window.SVGPathSegCurvetoCubicSmoothRel(undefined, x, y, x2, y2);
1178
- };
1179
-
1180
- window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs = function (x, y) {
1181
- return new window.SVGPathSegCurvetoQuadraticSmoothAbs(undefined, x, y);
1182
- };
1183
-
1184
- window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel = function (x, y) {
1185
- return new window.SVGPathSegCurvetoQuadraticSmoothRel(undefined, x, y);
1186
- };
1187
-
1188
- if (!("getPathSegAtLength" in window.SVGPathElement.prototype)) {
1189
- window.SVGPathElement.prototype.getPathSegAtLength = function (distance) {
1190
- if (distance === undefined || !isFinite(distance)) throw "Invalid arguments.";
1191
- const measurementElement = document.createElementNS("http://www.w3.org/2000/svg", "path");
1192
- measurementElement.setAttribute("d", this.getAttribute("d"));
1193
- let lastPathSegment = measurementElement.pathSegList.numberOfItems - 1;
1194
- if (lastPathSegment <= 0) return 0;
1195
-
1196
- do {
1197
- measurementElement.pathSegList.removeItem(lastPathSegment);
1198
- if (distance > measurementElement.getTotalLength()) break;
1199
- lastPathSegment--;
1200
- } while (lastPathSegment > 0);
1201
-
1202
- return lastPathSegment;
1203
- };
1204
- }
1205
- }
1206
-
1207
- if (!("SVGPathSegList" in window) || !("appendItem" in window.SVGPathSegList.prototype)) {
1208
- window.SVGPathSegList = function (pathElement) {
1209
- this._pathElement = pathElement;
1210
- this._list = this._parsePath(this._pathElement.getAttribute("d"));
1211
- this._mutationObserverConfig = {
1212
- attributes: true,
1213
- attributeFilter: ["d"]
1214
- };
1215
- this._pathElementMutationObserver = new MutationObserver(this._updateListFromPathMutations.bind(this));
1216
-
1217
- this._pathElementMutationObserver.observe(this._pathElement, this._mutationObserverConfig);
1218
- };
1219
-
1220
- window.SVGPathSegList.prototype.classname = "SVGPathSegList";
1221
- Object.defineProperty(window.SVGPathSegList.prototype, "numberOfItems", {
1222
- get: function () {
1223
- this._checkPathSynchronizedToList();
1224
-
1225
- return this._list.length;
1226
- },
1227
- enumerable: true
1228
- });
1229
- Object.defineProperty(window.SVGPathSegList.prototype, "length", {
1230
- get: function () {
1231
- this._checkPathSynchronizedToList();
1232
-
1233
- return this._list.length;
1234
- },
1235
- enumerable: true
1236
- });
1237
- Object.defineProperty(window.SVGPathElement.prototype, "pathSegList", {
1238
- get: function () {
1239
- if (!this._pathSegList) this._pathSegList = new window.SVGPathSegList(this);
1240
- return this._pathSegList;
1241
- },
1242
- enumerable: true
1243
- });
1244
- Object.defineProperty(window.SVGPathElement.prototype, "normalizedPathSegList", {
1245
- get: function () {
1246
- return this.pathSegList;
1247
- },
1248
- enumerable: true
1249
- });
1250
- Object.defineProperty(window.SVGPathElement.prototype, "animatedPathSegList", {
1251
- get: function () {
1252
- return this.pathSegList;
1253
- },
1254
- enumerable: true
1255
- });
1256
- Object.defineProperty(window.SVGPathElement.prototype, "animatedNormalizedPathSegList", {
1257
- get: function () {
1258
- return this.pathSegList;
1259
- },
1260
- enumerable: true
1261
- });
1262
-
1263
- window.SVGPathSegList.prototype._checkPathSynchronizedToList = function () {
1264
- this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords());
1265
- };
1266
-
1267
- window.SVGPathSegList.prototype._updateListFromPathMutations = function (mutationRecords) {
1268
- if (!this._pathElement) return;
1269
- let hasPathMutations = false;
1270
- mutationRecords.forEach(function (record) {
1271
- if (record.attributeName == "d") hasPathMutations = true;
1272
- });
1273
- if (hasPathMutations) this._list = this._parsePath(this._pathElement.getAttribute("d"));
1274
- };
1275
-
1276
- window.SVGPathSegList.prototype._writeListToPath = function () {
1277
- this._pathElementMutationObserver.disconnect();
1278
-
1279
- this._pathElement.setAttribute("d", window.SVGPathSegList._pathSegArrayAsString(this._list));
1280
-
1281
- this._pathElementMutationObserver.observe(this._pathElement, this._mutationObserverConfig);
1282
- };
1283
-
1284
- window.SVGPathSegList.prototype.segmentChanged = function (pathSeg) {
1285
- this._writeListToPath();
1286
- };
1287
-
1288
- window.SVGPathSegList.prototype.clear = function () {
1289
- this._checkPathSynchronizedToList();
1290
-
1291
- this._list.forEach(function (pathSeg) {
1292
- pathSeg._owningPathSegList = null;
1293
- });
1294
-
1295
- this._list = [];
1296
-
1297
- this._writeListToPath();
1298
- };
1299
-
1300
- window.SVGPathSegList.prototype.initialize = function (newItem) {
1301
- this._checkPathSynchronizedToList();
1302
-
1303
- this._list = [newItem];
1304
- newItem._owningPathSegList = this;
1305
-
1306
- this._writeListToPath();
1307
-
1308
- return newItem;
1309
- };
1310
-
1311
- window.SVGPathSegList.prototype._checkValidIndex = function (index) {
1312
- if (isNaN(index) || index < 0 || index >= this.numberOfItems) throw "INDEX_SIZE_ERR";
1313
- };
1314
-
1315
- window.SVGPathSegList.prototype.getItem = function (index) {
1316
- this._checkPathSynchronizedToList();
1317
-
1318
- this._checkValidIndex(index);
1319
-
1320
- return this._list[index];
1321
- };
1322
-
1323
- window.SVGPathSegList.prototype.insertItemBefore = function (newItem, index) {
1324
- this._checkPathSynchronizedToList();
1325
-
1326
- if (index > this.numberOfItems) index = this.numberOfItems;
1327
-
1328
- if (newItem._owningPathSegList) {
1329
- newItem = newItem.clone();
1330
- }
1331
-
1332
- this._list.splice(index, 0, newItem);
1333
-
1334
- newItem._owningPathSegList = this;
1335
-
1336
- this._writeListToPath();
1337
-
1338
- return newItem;
1339
- };
1340
-
1341
- window.SVGPathSegList.prototype.replaceItem = function (newItem, index) {
1342
- this._checkPathSynchronizedToList();
1343
-
1344
- if (newItem._owningPathSegList) {
1345
- newItem = newItem.clone();
1346
- }
1347
-
1348
- this._checkValidIndex(index);
1349
-
1350
- this._list[index] = newItem;
1351
- newItem._owningPathSegList = this;
1352
-
1353
- this._writeListToPath();
1354
-
1355
- return newItem;
1356
- };
1357
-
1358
- window.SVGPathSegList.prototype.removeItem = function (index) {
1359
- this._checkPathSynchronizedToList();
1360
-
1361
- this._checkValidIndex(index);
1362
-
1363
- const item = this._list[index];
1364
-
1365
- this._list.splice(index, 1);
1366
-
1367
- this._writeListToPath();
1368
-
1369
- return item;
1370
- };
1371
-
1372
- window.SVGPathSegList.prototype.appendItem = function (newItem) {
1373
- this._checkPathSynchronizedToList();
1374
-
1375
- if (newItem._owningPathSegList) {
1376
- newItem = newItem.clone();
1377
- }
1378
-
1379
- this._list.push(newItem);
1380
-
1381
- newItem._owningPathSegList = this;
1382
-
1383
- this._writeListToPath();
1384
-
1385
- return newItem;
1386
- };
1387
-
1388
- window.SVGPathSegList._pathSegArrayAsString = function (pathSegArray) {
1389
- let string = "";
1390
- let first = true;
1391
- pathSegArray.forEach(function (pathSeg) {
1392
- if (first) {
1393
- first = false;
1394
- string += pathSeg._asPathString();
1395
- } else {
1396
- string += " " + pathSeg._asPathString();
1397
- }
1398
- });
1399
- return string;
1400
- };
1401
-
1402
- window.SVGPathSegList.prototype._parsePath = function (string) {
1403
- if (!string || string.length == 0) return [];
1404
- const owningPathSegList = this;
1405
-
1406
- const Builder = function () {
1407
- this.pathSegList = [];
1408
- };
1409
-
1410
- Builder.prototype.appendSegment = function (pathSeg) {
1411
- this.pathSegList.push(pathSeg);
1412
- };
1413
-
1414
- const Source = function (string) {
1415
- this._string = string;
1416
- this._currentIndex = 0;
1417
- this._endIndex = this._string.length;
1418
- this._previousCommand = window.SVGPathSeg.PATHSEG_UNKNOWN;
1419
-
1420
- this._skipOptionalSpaces();
1421
- };
1422
-
1423
- Source.prototype._isCurrentSpace = function () {
1424
- const character = this._string[this._currentIndex];
1425
- return character <= " " && (character == " " || character == "\n" || character == "\t" || character == "\r" || character == "\f");
1426
- };
1427
-
1428
- Source.prototype._skipOptionalSpaces = function () {
1429
- while (this._currentIndex < this._endIndex && this._isCurrentSpace()) this._currentIndex++;
1430
-
1431
- return this._currentIndex < this._endIndex;
1432
- };
1433
-
1434
- Source.prototype._skipOptionalSpacesOrDelimiter = function () {
1435
- if (this._currentIndex < this._endIndex && !this._isCurrentSpace() && this._string.charAt(this._currentIndex) != ",") return false;
1436
-
1437
- if (this._skipOptionalSpaces()) {
1438
- if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == ",") {
1439
- this._currentIndex++;
1440
-
1441
- this._skipOptionalSpaces();
1442
- }
1443
- }
1444
-
1445
- return this._currentIndex < this._endIndex;
1446
- };
1447
-
1448
- Source.prototype.hasMoreData = function () {
1449
- return this._currentIndex < this._endIndex;
1450
- };
1451
-
1452
- Source.prototype.peekSegmentType = function () {
1453
- const lookahead = this._string[this._currentIndex];
1454
- return this._pathSegTypeFromChar(lookahead);
1455
- };
1456
-
1457
- Source.prototype._pathSegTypeFromChar = function (lookahead) {
1458
- switch (lookahead) {
1459
- case "Z":
1460
- case "z":
1461
- return window.SVGPathSeg.PATHSEG_CLOSEPATH;
1462
-
1463
- case "M":
1464
- return window.SVGPathSeg.PATHSEG_MOVETO_ABS;
1465
-
1466
- case "m":
1467
- return window.SVGPathSeg.PATHSEG_MOVETO_REL;
1468
-
1469
- case "L":
1470
- return window.SVGPathSeg.PATHSEG_LINETO_ABS;
1471
-
1472
- case "l":
1473
- return window.SVGPathSeg.PATHSEG_LINETO_REL;
1474
-
1475
- case "C":
1476
- return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;
1477
-
1478
- case "c":
1479
- return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;
1480
-
1481
- case "Q":
1482
- return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;
1483
-
1484
- case "q":
1485
- return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;
1486
-
1487
- case "A":
1488
- return window.SVGPathSeg.PATHSEG_ARC_ABS;
1489
-
1490
- case "a":
1491
- return window.SVGPathSeg.PATHSEG_ARC_REL;
1492
-
1493
- case "H":
1494
- return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;
1495
-
1496
- case "h":
1497
- return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;
1498
-
1499
- case "V":
1500
- return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;
1501
-
1502
- case "v":
1503
- return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;
1504
-
1505
- case "S":
1506
- return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;
1507
-
1508
- case "s":
1509
- return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;
1510
-
1511
- case "T":
1512
- return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;
1513
-
1514
- case "t":
1515
- return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;
1516
-
1517
- default:
1518
- return window.SVGPathSeg.PATHSEG_UNKNOWN;
1519
- }
1520
- };
1521
-
1522
- Source.prototype._nextCommandHelper = function (lookahead, previousCommand) {
1523
- if ((lookahead == "+" || lookahead == "-" || lookahead == "." || lookahead >= "0" && lookahead <= "9") && previousCommand != window.SVGPathSeg.PATHSEG_CLOSEPATH) {
1524
- if (previousCommand == window.SVGPathSeg.PATHSEG_MOVETO_ABS) return window.SVGPathSeg.PATHSEG_LINETO_ABS;
1525
- if (previousCommand == window.SVGPathSeg.PATHSEG_MOVETO_REL) return window.SVGPathSeg.PATHSEG_LINETO_REL;
1526
- return previousCommand;
1527
- }
1528
-
1529
- return window.SVGPathSeg.PATHSEG_UNKNOWN;
1530
- };
1531
-
1532
- Source.prototype.initialCommandIsMoveTo = function () {
1533
- if (!this.hasMoreData()) return true;
1534
- const command = this.peekSegmentType();
1535
- return command == window.SVGPathSeg.PATHSEG_MOVETO_ABS || command == window.SVGPathSeg.PATHSEG_MOVETO_REL;
1536
- };
1537
-
1538
- Source.prototype._parseNumber = function () {
1539
- let exponent = 0;
1540
- let integer = 0;
1541
- let frac = 1;
1542
- let decimal = 0;
1543
- let sign = 1;
1544
- let expsign = 1;
1545
- const startIndex = this._currentIndex;
1546
-
1547
- this._skipOptionalSpaces();
1548
-
1549
- if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == "+") this._currentIndex++;else if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == "-") {
1550
- this._currentIndex++;
1551
- sign = -1;
1552
- }
1553
- if (this._currentIndex == this._endIndex || (this._string.charAt(this._currentIndex) < "0" || this._string.charAt(this._currentIndex) > "9") && this._string.charAt(this._currentIndex) != ".") return undefined;
1554
- const startIntPartIndex = this._currentIndex;
1555
-
1556
- while (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= "0" && this._string.charAt(this._currentIndex) <= "9") this._currentIndex++;
1557
-
1558
- if (this._currentIndex != startIntPartIndex) {
1559
- let scanIntPartIndex = this._currentIndex - 1;
1560
- let multiplier = 1;
1561
-
1562
- while (scanIntPartIndex >= startIntPartIndex) {
1563
- integer += multiplier * (this._string.charAt(scanIntPartIndex--) - "0");
1564
- multiplier *= 10;
1565
- }
1566
- }
1567
-
1568
- if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == ".") {
1569
- this._currentIndex++;
1570
- if (this._currentIndex >= this._endIndex || this._string.charAt(this._currentIndex) < "0" || this._string.charAt(this._currentIndex) > "9") return undefined;
1571
-
1572
- while (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= "0" && this._string.charAt(this._currentIndex) <= "9") {
1573
- frac *= 10;
1574
- decimal += (this._string.charAt(this._currentIndex) - "0") / frac;
1575
- this._currentIndex += 1;
1576
- }
1577
- }
1578
-
1579
- 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") {
1580
- this._currentIndex++;
1581
-
1582
- if (this._string.charAt(this._currentIndex) == "+") {
1583
- this._currentIndex++;
1584
- } else if (this._string.charAt(this._currentIndex) == "-") {
1585
- this._currentIndex++;
1586
- expsign = -1;
1587
- }
1588
-
1589
- if (this._currentIndex >= this._endIndex || this._string.charAt(this._currentIndex) < "0" || this._string.charAt(this._currentIndex) > "9") return undefined;
1590
-
1591
- while (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= "0" && this._string.charAt(this._currentIndex) <= "9") {
1592
- exponent *= 10;
1593
- exponent += this._string.charAt(this._currentIndex) - "0";
1594
- this._currentIndex++;
1595
- }
1596
- }
1597
-
1598
- let number = integer + decimal;
1599
- number *= sign;
1600
- if (exponent) number *= Math.pow(10, expsign * exponent);
1601
- if (startIndex == this._currentIndex) return undefined;
1602
-
1603
- this._skipOptionalSpacesOrDelimiter();
1604
-
1605
- return number;
1606
- };
1607
-
1608
- Source.prototype._parseArcFlag = function () {
1609
- if (this._currentIndex >= this._endIndex) return undefined;
1610
- let flag = false;
1611
-
1612
- const flagChar = this._string.charAt(this._currentIndex++);
1613
-
1614
- if (flagChar == "0") flag = false;else if (flagChar == "1") flag = true;else return undefined;
1615
-
1616
- this._skipOptionalSpacesOrDelimiter();
1617
-
1618
- return flag;
1619
- };
1620
-
1621
- Source.prototype.parseSegment = function () {
1622
- const lookahead = this._string[this._currentIndex];
1623
-
1624
- let command = this._pathSegTypeFromChar(lookahead);
1625
-
1626
- if (command == window.SVGPathSeg.PATHSEG_UNKNOWN) {
1627
- if (this._previousCommand == window.SVGPathSeg.PATHSEG_UNKNOWN) return null;
1628
- command = this._nextCommandHelper(lookahead, this._previousCommand);
1629
- if (command == window.SVGPathSeg.PATHSEG_UNKNOWN) return null;
1630
- } else {
1631
- this._currentIndex++;
1632
- }
1633
-
1634
- this._previousCommand = command;
1635
- let points;
1636
-
1637
- switch (command) {
1638
- case window.SVGPathSeg.PATHSEG_MOVETO_REL:
1639
- return new window.SVGPathSegMovetoRel(owningPathSegList, this._parseNumber(), this._parseNumber());
1640
-
1641
- case window.SVGPathSeg.PATHSEG_MOVETO_ABS:
1642
- return new window.SVGPathSegMovetoAbs(owningPathSegList, this._parseNumber(), this._parseNumber());
1643
-
1644
- case window.SVGPathSeg.PATHSEG_LINETO_REL:
1645
- return new window.SVGPathSegLinetoRel(owningPathSegList, this._parseNumber(), this._parseNumber());
1646
-
1647
- case window.SVGPathSeg.PATHSEG_LINETO_ABS:
1648
- return new window.SVGPathSegLinetoAbs(owningPathSegList, this._parseNumber(), this._parseNumber());
1649
-
1650
- case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:
1651
- return new window.SVGPathSegLinetoHorizontalRel(owningPathSegList, this._parseNumber());
1652
-
1653
- case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:
1654
- return new window.SVGPathSegLinetoHorizontalAbs(owningPathSegList, this._parseNumber());
1655
-
1656
- case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:
1657
- return new window.SVGPathSegLinetoVerticalRel(owningPathSegList, this._parseNumber());
1658
-
1659
- case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:
1660
- return new window.SVGPathSegLinetoVerticalAbs(owningPathSegList, this._parseNumber());
1661
-
1662
- case window.SVGPathSeg.PATHSEG_CLOSEPATH:
1663
- this._skipOptionalSpaces();
1664
-
1665
- return new window.SVGPathSegClosePath(owningPathSegList);
1666
-
1667
- case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:
1668
- points = {
1669
- x1: this._parseNumber(),
1670
- y1: this._parseNumber(),
1671
- x2: this._parseNumber(),
1672
- y2: this._parseNumber(),
1673
- x: this._parseNumber(),
1674
- y: this._parseNumber()
1675
- };
1676
- return new window.SVGPathSegCurvetoCubicRel(owningPathSegList, points.x, points.y, points.x1, points.y1, points.x2, points.y2);
1677
-
1678
- case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:
1679
- points = {
1680
- x1: this._parseNumber(),
1681
- y1: this._parseNumber(),
1682
- x2: this._parseNumber(),
1683
- y2: this._parseNumber(),
1684
- x: this._parseNumber(),
1685
- y: this._parseNumber()
1686
- };
1687
- return new window.SVGPathSegCurvetoCubicAbs(owningPathSegList, points.x, points.y, points.x1, points.y1, points.x2, points.y2);
1688
-
1689
- case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:
1690
- points = {
1691
- x2: this._parseNumber(),
1692
- y2: this._parseNumber(),
1693
- x: this._parseNumber(),
1694
- y: this._parseNumber()
1695
- };
1696
- return new window.SVGPathSegCurvetoCubicSmoothRel(owningPathSegList, points.x, points.y, points.x2, points.y2);
1697
-
1698
- case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:
1699
- points = {
1700
- x2: this._parseNumber(),
1701
- y2: this._parseNumber(),
1702
- x: this._parseNumber(),
1703
- y: this._parseNumber()
1704
- };
1705
- return new window.SVGPathSegCurvetoCubicSmoothAbs(owningPathSegList, points.x, points.y, points.x2, points.y2);
1706
-
1707
- case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:
1708
- points = {
1709
- x1: this._parseNumber(),
1710
- y1: this._parseNumber(),
1711
- x: this._parseNumber(),
1712
- y: this._parseNumber()
1713
- };
1714
- return new window.SVGPathSegCurvetoQuadraticRel(owningPathSegList, points.x, points.y, points.x1, points.y1);
1715
-
1716
- case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:
1717
- points = {
1718
- x1: this._parseNumber(),
1719
- y1: this._parseNumber(),
1720
- x: this._parseNumber(),
1721
- y: this._parseNumber()
1722
- };
1723
- return new window.SVGPathSegCurvetoQuadraticAbs(owningPathSegList, points.x, points.y, points.x1, points.y1);
1724
-
1725
- case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:
1726
- return new window.SVGPathSegCurvetoQuadraticSmoothRel(owningPathSegList, this._parseNumber(), this._parseNumber());
1727
-
1728
- case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:
1729
- return new window.SVGPathSegCurvetoQuadraticSmoothAbs(owningPathSegList, this._parseNumber(), this._parseNumber());
1730
-
1731
- case window.SVGPathSeg.PATHSEG_ARC_REL:
1732
- points = {
1733
- x1: this._parseNumber(),
1734
- y1: this._parseNumber(),
1735
- arcAngle: this._parseNumber(),
1736
- arcLarge: this._parseArcFlag(),
1737
- arcSweep: this._parseArcFlag(),
1738
- x: this._parseNumber(),
1739
- y: this._parseNumber()
1740
- };
1741
- return new window.SVGPathSegArcRel(owningPathSegList, points.x, points.y, points.x1, points.y1, points.arcAngle, points.arcLarge, points.arcSweep);
1742
-
1743
- case window.SVGPathSeg.PATHSEG_ARC_ABS:
1744
- points = {
1745
- x1: this._parseNumber(),
1746
- y1: this._parseNumber(),
1747
- arcAngle: this._parseNumber(),
1748
- arcLarge: this._parseArcFlag(),
1749
- arcSweep: this._parseArcFlag(),
1750
- x: this._parseNumber(),
1751
- y: this._parseNumber()
1752
- };
1753
- return new window.SVGPathSegArcAbs(owningPathSegList, points.x, points.y, points.x1, points.y1, points.arcAngle, points.arcLarge, points.arcSweep);
1754
-
1755
- default:
1756
- throw "Unknown path seg type.";
1757
- }
1758
- };
1759
-
1760
- const builder = new Builder();
1761
- const source = new Source(string);
1762
- if (!source.initialCommandIsMoveTo()) return [];
1763
-
1764
- while (source.hasMoreData()) {
1765
- const pathSeg = source.parseSegment();
1766
- if (!pathSeg) return [];
1767
- builder.appendSegment(pathSeg);
1768
- }
1769
-
1770
- return builder.pathSegList;
1771
- };
1772
- }
1773
- } catch (e) {
1774
- console.warn("An error occurred in tsParticles pathseg polyfill. If the Polygon Mask is not working, please open an issue here: https://github.com/matteobruni/tsparticles", e);
1775
- }
1776
- })();
1777
-
1778
- /***/ })
1779
-
1780
- }]);