presenter 0.7.3 → 0.7.5
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/dist/export.js +15 -15
- package/dist/export.js.map +1 -1
- package/dist/export.mjs +233 -226
- package/dist/export.mjs.map +1 -1
- package/dist/objects/Grid.d.ts +2 -0
- package/dist/objects/Group.d.ts +7 -0
- package/dist/presenter.js +2 -2
- package/dist/presenter.js.map +1 -1
- package/dist/presenter.mjs +581 -552
- package/dist/presenter.mjs.map +1 -1
- package/dist/renderer/browser-canvas/types/BrowserCanvasRendererProps.d.ts +1 -0
- package/dist/types/Update.d.ts +2 -1
- package/package.json +1 -1
package/dist/presenter.mjs
CHANGED
|
@@ -12,10 +12,10 @@ const u0 = {
|
|
|
12
12
|
function Ut(n) {
|
|
13
13
|
return n * n * n;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function Yt(n) {
|
|
16
16
|
return --n * n * n + 1;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Xt(n) {
|
|
19
19
|
return ((n *= 2) <= 1 ? n * n * n : (n -= 2) * n * n + 2) / 2;
|
|
20
20
|
}
|
|
21
21
|
var J0 = 1.70158;
|
|
@@ -33,7 +33,7 @@ var J0 = 1.70158;
|
|
|
33
33
|
}
|
|
34
34
|
return t.overshoot = n, t;
|
|
35
35
|
})(J0);
|
|
36
|
-
var
|
|
36
|
+
var Ht = (function n(e) {
|
|
37
37
|
e = +e;
|
|
38
38
|
function t(o) {
|
|
39
39
|
return ((o *= 2) < 1 ? o * o * ((e + 1) * o - e) : (o -= 2) * o * ((e + 1) * o + e) + 2) / 2;
|
|
@@ -42,11 +42,11 @@ var $t = (function n(e) {
|
|
|
42
42
|
})(J0);
|
|
43
43
|
const tt = {
|
|
44
44
|
LINEAR: (n) => n,
|
|
45
|
-
CUBIC:
|
|
45
|
+
CUBIC: Xt,
|
|
46
46
|
CUBIC_IN: Ut,
|
|
47
|
-
CUBIC_OUT:
|
|
48
|
-
BACK_IN_OUT:
|
|
49
|
-
},
|
|
47
|
+
CUBIC_OUT: Yt,
|
|
48
|
+
BACK_IN_OUT: Ht.overshoot(0.8)
|
|
49
|
+
}, $t = tt.LINEAR;
|
|
50
50
|
function et(n, e, t = {}) {
|
|
51
51
|
return {
|
|
52
52
|
type: u0.ANIMATE,
|
|
@@ -54,7 +54,7 @@ function et(n, e, t = {}) {
|
|
|
54
54
|
props: e,
|
|
55
55
|
delay: 0,
|
|
56
56
|
duration: 1e3,
|
|
57
|
-
easing:
|
|
57
|
+
easing: $t,
|
|
58
58
|
block: !1,
|
|
59
59
|
interpolators: null,
|
|
60
60
|
isKey: !1,
|
|
@@ -62,33 +62,34 @@ function et(n, e, t = {}) {
|
|
|
62
62
|
...typeof t == "number" ? { duration: t } : t
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function un(n, e = {}) {
|
|
66
66
|
return et(n, { opacity: 1 }, {
|
|
67
67
|
duration: 500,
|
|
68
68
|
easing: tt.CUBIC,
|
|
69
69
|
...typeof e == "number" ? { duration: e } : e
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function fn(n, e = {}) {
|
|
73
73
|
return et(n, { opacity: 0 }, {
|
|
74
74
|
duration: 500,
|
|
75
75
|
easing: tt.CUBIC,
|
|
76
76
|
...typeof e == "number" ? { duration: e } : e
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
function Ct(n, e) {
|
|
79
|
+
function Ct(n, e, t = {}) {
|
|
80
80
|
return {
|
|
81
81
|
type: u0.UPDATE,
|
|
82
82
|
isKey: !1,
|
|
83
83
|
object: n,
|
|
84
84
|
props: e,
|
|
85
|
-
shortcut: null
|
|
85
|
+
shortcut: null,
|
|
86
|
+
...t
|
|
86
87
|
};
|
|
87
88
|
}
|
|
88
|
-
function
|
|
89
|
+
function gn(n) {
|
|
89
90
|
return Ct(n, { opacity: 0 });
|
|
90
91
|
}
|
|
91
|
-
function
|
|
92
|
+
function pn(n) {
|
|
92
93
|
return Ct(n, { opacity: 1 });
|
|
93
94
|
}
|
|
94
95
|
const n0 = {
|
|
@@ -102,7 +103,7 @@ const n0 = {
|
|
|
102
103
|
BOTTOM: "Bottom",
|
|
103
104
|
BOTTOM_RIGHT: "BottomRight"
|
|
104
105
|
}, o0 = n0.TOP_LEFT;
|
|
105
|
-
function
|
|
106
|
+
function $(n, e = 0, t = 0, o = 1) {
|
|
106
107
|
if (typeof n == "string") {
|
|
107
108
|
const i = n.replace("#", ""), a = parseInt(i, 16);
|
|
108
109
|
return isNaN(a) ? (console.warn("Invalid hex color format:", n), K) : i.length === 6 ? {
|
|
@@ -131,12 +132,12 @@ function W(n, e = 0, t = 0, o = 1) {
|
|
|
131
132
|
...n
|
|
132
133
|
};
|
|
133
134
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
135
|
+
$.BLACK = $(0, 0, 0);
|
|
136
|
+
$.BLUE = $(0, 0, 255);
|
|
137
|
+
$.GREEN = $(0, 255, 0);
|
|
138
|
+
$.RED = $(255, 0, 0);
|
|
139
|
+
$.TRANSPARENT = $(0, 0, 0, 0);
|
|
140
|
+
$.WHITE = $(255, 255, 255);
|
|
140
141
|
const K = { red: 0, green: 0, blue: 0, alpha: 1 };
|
|
141
142
|
function Et(n = null) {
|
|
142
143
|
return {
|
|
@@ -157,10 +158,10 @@ function E0(n, e = null) {
|
|
|
157
158
|
const { red: t, green: o, blue: i } = n, a = t << 16 | o << 8 | i, s = Math.round(St(n, e) * 255);
|
|
158
159
|
return `#${a.toString(16).padStart(6, "0")}${s !== 255 ? s.toString(16).padStart(2, "0") : ""}`;
|
|
159
160
|
}
|
|
160
|
-
function
|
|
161
|
+
function dn(n = null) {
|
|
161
162
|
const {
|
|
162
163
|
url: e = "https://wikipedia.org/",
|
|
163
|
-
backgroundColor: t =
|
|
164
|
+
backgroundColor: t = $.TRANSPARENT,
|
|
164
165
|
borderColor: o = K,
|
|
165
166
|
borderWidth: i = 0,
|
|
166
167
|
pointerEvents: a = "auto",
|
|
@@ -186,11 +187,11 @@ const x0 = {
|
|
|
186
187
|
LEFT: "left",
|
|
187
188
|
CENTER: "center",
|
|
188
189
|
RIGHT: "right"
|
|
189
|
-
},
|
|
190
|
+
}, Gt = x0.LEFT;
|
|
190
191
|
function r0(n, e) {
|
|
191
192
|
throw new Error("Unexpected value: " + n);
|
|
192
193
|
}
|
|
193
|
-
function
|
|
194
|
+
function xn(n = null) {
|
|
194
195
|
const {
|
|
195
196
|
alignment: e = x0.LEFT,
|
|
196
197
|
scale: t = 1,
|
|
@@ -264,7 +265,7 @@ function s0(n) {
|
|
|
264
265
|
...n
|
|
265
266
|
};
|
|
266
267
|
}
|
|
267
|
-
function
|
|
268
|
+
function yn(n = null) {
|
|
268
269
|
const { arrowheadSize: e, width: t = 10, ...o } = n || {}, i = e ?? t * 4;
|
|
269
270
|
return s0({
|
|
270
271
|
objectType: j.ARROW,
|
|
@@ -282,8 +283,8 @@ function xn(n = null) {
|
|
|
282
283
|
...o
|
|
283
284
|
});
|
|
284
285
|
}
|
|
285
|
-
const
|
|
286
|
-
function
|
|
286
|
+
const Wt = 50;
|
|
287
|
+
function vn(n = null) {
|
|
287
288
|
return s0({
|
|
288
289
|
objectType: j.CIRCLE,
|
|
289
290
|
anchor: o0,
|
|
@@ -291,7 +292,7 @@ function yn(n = null) {
|
|
|
291
292
|
borderWidth: 0,
|
|
292
293
|
drawn: 1,
|
|
293
294
|
fill: K,
|
|
294
|
-
radius:
|
|
295
|
+
radius: Wt,
|
|
295
296
|
x: 0,
|
|
296
297
|
y: 0,
|
|
297
298
|
...n
|
|
@@ -308,54 +309,63 @@ function st(n, e = null) {
|
|
|
308
309
|
rotateOriginX: 0,
|
|
309
310
|
rotateOriginY: 0,
|
|
310
311
|
rotation: 0,
|
|
312
|
+
skewOriginPreviewSize: 0,
|
|
313
|
+
skewOriginX: 0,
|
|
314
|
+
skewOriginY: 0,
|
|
315
|
+
skewX: 0,
|
|
316
|
+
skewY: 0,
|
|
311
317
|
scale: 1,
|
|
318
|
+
scaleX: 1,
|
|
319
|
+
scaleY: 1,
|
|
312
320
|
width: 0,
|
|
313
321
|
x: 0,
|
|
314
322
|
y: 0,
|
|
315
323
|
...e
|
|
316
324
|
});
|
|
317
325
|
}
|
|
318
|
-
function
|
|
326
|
+
function wn(n) {
|
|
319
327
|
const {
|
|
320
328
|
anchor: e = o0,
|
|
321
329
|
cols: t = 1,
|
|
322
330
|
rows: o = 1,
|
|
323
331
|
gapX: i = 0,
|
|
324
332
|
gapY: a = 0,
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
C
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
333
|
+
groupProps: s = {},
|
|
334
|
+
width: r = 0,
|
|
335
|
+
height: h = 0,
|
|
336
|
+
x: c = 0,
|
|
337
|
+
y: f = 0,
|
|
338
|
+
objects: x = () => null
|
|
339
|
+
} = n, l = [], u = [];
|
|
340
|
+
let b = 0, y = 0;
|
|
341
|
+
for (let P = 0; P < o; P++) {
|
|
342
|
+
const E = [];
|
|
343
|
+
b = 0;
|
|
344
|
+
let L = 0;
|
|
345
|
+
for (let S = 0; S < t; S++) {
|
|
346
|
+
const C = x(P, S), R = typeof r == "function" ? r(P, S) : r, z = typeof h == "function" ? h(P, S) : h;
|
|
347
|
+
E.push(C), C != null && u.push(
|
|
348
|
+
st([C], {
|
|
349
|
+
x: b,
|
|
350
|
+
y
|
|
342
351
|
})
|
|
343
|
-
),
|
|
352
|
+
), b += R + i, L = Math.max(L, z);
|
|
344
353
|
}
|
|
345
|
-
|
|
354
|
+
l.push(E), y += L + a;
|
|
346
355
|
}
|
|
347
356
|
return {
|
|
348
|
-
grid: st(
|
|
349
|
-
x:
|
|
350
|
-
y:
|
|
351
|
-
height:
|
|
352
|
-
width:
|
|
353
|
-
anchor: e
|
|
357
|
+
grid: st(u, {
|
|
358
|
+
x: c,
|
|
359
|
+
y: f,
|
|
360
|
+
height: y - a,
|
|
361
|
+
width: b - i,
|
|
362
|
+
anchor: e,
|
|
363
|
+
...s
|
|
354
364
|
}),
|
|
355
|
-
objects:
|
|
365
|
+
objects: l
|
|
356
366
|
};
|
|
357
367
|
}
|
|
358
|
-
function
|
|
368
|
+
function mn(n = null) {
|
|
359
369
|
return s0({
|
|
360
370
|
objectType: j.IMAGE,
|
|
361
371
|
anchor: o0,
|
|
@@ -369,7 +379,7 @@ function wn(n = null) {
|
|
|
369
379
|
...n
|
|
370
380
|
});
|
|
371
381
|
}
|
|
372
|
-
function
|
|
382
|
+
function bn(n = null) {
|
|
373
383
|
return s0({
|
|
374
384
|
objectType: j.LINE,
|
|
375
385
|
color: K,
|
|
@@ -397,7 +407,7 @@ function An(n, e = null) {
|
|
|
397
407
|
...e
|
|
398
408
|
});
|
|
399
409
|
}
|
|
400
|
-
var Zt = Object.defineProperty,
|
|
410
|
+
var Zt = Object.defineProperty, _ = (n, e) => Zt(n, "name", { value: e, configurable: !0 }), P0 = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, Vt = /([astvzqmhlc])([^astvzqmhlc]*)/gi, Kt = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, Qt = _((n) => {
|
|
401
411
|
const e = (n && n.length > 0 ? n : "M0,0").match(Vt);
|
|
402
412
|
if (!e) throw new Error(`No path elements found in string ${n}`);
|
|
403
413
|
return e.reduce((t, o) => {
|
|
@@ -416,7 +426,7 @@ var Zt = Object.defineProperty, k = (n, e) => Zt(n, "name", { value: e, configur
|
|
|
416
426
|
}
|
|
417
427
|
return t;
|
|
418
428
|
}, []);
|
|
419
|
-
}, "default"), Jt =
|
|
429
|
+
}, "default"), Jt = _((n) => {
|
|
420
430
|
const e = n.match(Kt);
|
|
421
431
|
return e ? e.map(Number) : [];
|
|
422
432
|
}, "parseValues"), w0, Q = (w0 = class {
|
|
@@ -425,24 +435,24 @@ var Zt = Object.defineProperty, k = (n, e) => Zt(n, "name", { value: e, configur
|
|
|
425
435
|
I(this, "x1");
|
|
426
436
|
I(this, "y0");
|
|
427
437
|
I(this, "y1");
|
|
428
|
-
I(this, "getTotalLength",
|
|
429
|
-
I(this, "getPointAtLength",
|
|
438
|
+
I(this, "getTotalLength", _(() => Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2)), "getTotalLength"));
|
|
439
|
+
I(this, "getPointAtLength", _((e) => {
|
|
430
440
|
let t = e / Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2));
|
|
431
441
|
t = Number.isNaN(t) ? 1 : t;
|
|
432
442
|
const o = (this.x1 - this.x0) * t, i = (this.y1 - this.y0) * t;
|
|
433
443
|
return { x: this.x0 + o, y: this.y0 + i };
|
|
434
444
|
}, "getPointAtLength"));
|
|
435
|
-
I(this, "getTangentAtLength",
|
|
445
|
+
I(this, "getTangentAtLength", _((e) => {
|
|
436
446
|
const t = Math.sqrt((this.x1 - this.x0) * (this.x1 - this.x0) + (this.y1 - this.y0) * (this.y1 - this.y0));
|
|
437
447
|
return { x: (this.x1 - this.x0) / t, y: (this.y1 - this.y0) / t };
|
|
438
448
|
}, "getTangentAtLength"));
|
|
439
|
-
I(this, "getPropertiesAtLength",
|
|
449
|
+
I(this, "getPropertiesAtLength", _((e) => {
|
|
440
450
|
const t = this.getPointAtLength(e), o = this.getTangentAtLength(e);
|
|
441
451
|
return { x: t.x, y: t.y, tangentX: o.x, tangentY: o.y };
|
|
442
452
|
}, "getPropertiesAtLength"));
|
|
443
453
|
this.x0 = e, this.x1 = t, this.y0 = o, this.y1 = i;
|
|
444
454
|
}
|
|
445
|
-
},
|
|
455
|
+
}, _(w0, "LinearPosition"), w0), m0, at = (m0 = class {
|
|
446
456
|
constructor(e, t, o, i, a, s, r, h, c) {
|
|
447
457
|
I(this, "x0");
|
|
448
458
|
I(this, "y0");
|
|
@@ -454,13 +464,13 @@ var Zt = Object.defineProperty, k = (n, e) => Zt(n, "name", { value: e, configur
|
|
|
454
464
|
I(this, "x1");
|
|
455
465
|
I(this, "y1");
|
|
456
466
|
I(this, "length");
|
|
457
|
-
I(this, "getTotalLength",
|
|
458
|
-
I(this, "getPointAtLength",
|
|
467
|
+
I(this, "getTotalLength", _(() => this.length, "getTotalLength"));
|
|
468
|
+
I(this, "getPointAtLength", _((e) => {
|
|
459
469
|
e < 0 ? e = 0 : e > this.length && (e = this.length);
|
|
460
470
|
const t = ht({ x: this.x0, y: this.y0 }, this.rx, this.ry, this.xAxisRotate, this.LargeArcFlag, this.SweepFlag, { x: this.x1, y: this.y1 }, e / this.length);
|
|
461
471
|
return { x: t.x, y: t.y };
|
|
462
472
|
}, "getPointAtLength"));
|
|
463
|
-
I(this, "getTangentAtLength",
|
|
473
|
+
I(this, "getTangentAtLength", _((e) => {
|
|
464
474
|
e < 0 ? e = 0 : e > this.length && (e = this.length);
|
|
465
475
|
const t = 0.05, o = this.getPointAtLength(e);
|
|
466
476
|
let i;
|
|
@@ -468,7 +478,7 @@ var Zt = Object.defineProperty, k = (n, e) => Zt(n, "name", { value: e, configur
|
|
|
468
478
|
const a = i.x - o.x, s = i.y - o.y, r = Math.sqrt(a * a + s * s);
|
|
469
479
|
return e < this.length - t ? { x: -a / r, y: -s / r } : { x: a / r, y: s / r };
|
|
470
480
|
}, "getTangentAtLength"));
|
|
471
|
-
I(this, "getPropertiesAtLength",
|
|
481
|
+
I(this, "getPropertiesAtLength", _((e) => {
|
|
472
482
|
const t = this.getTangentAtLength(e), o = this.getPointAtLength(e);
|
|
473
483
|
return { x: o.x, y: o.y, tangentX: t.x, tangentY: t.y };
|
|
474
484
|
}, "getPropertiesAtLength"));
|
|
@@ -478,7 +488,7 @@ var Zt = Object.defineProperty, k = (n, e) => Zt(n, "name", { value: e, configur
|
|
|
478
488
|
});
|
|
479
489
|
this.length = f.arcLength;
|
|
480
490
|
}
|
|
481
|
-
},
|
|
491
|
+
}, _(m0, "Arc"), m0), ht = _((n, e, t, o, i, a, s, r) => {
|
|
482
492
|
e = Math.abs(e), t = Math.abs(t), o = e1(o, 360);
|
|
483
493
|
const h = n1(o);
|
|
484
494
|
if (n.x === s.x && n.y === s.y) return { x: n.x, y: n.y, ellipticalArcAngle: 0 };
|
|
@@ -487,12 +497,12 @@ var Zt = Object.defineProperty, k = (n, e) => Zt(n, "name", { value: e, configur
|
|
|
487
497
|
l > 1 && (e = Math.sqrt(l) * e, t = Math.sqrt(l) * t);
|
|
488
498
|
let u = (Math.pow(e, 2) * Math.pow(t, 2) - Math.pow(e, 2) * Math.pow(x.y, 2) - Math.pow(t, 2) * Math.pow(x.x, 2)) / (Math.pow(e, 2) * Math.pow(x.y, 2) + Math.pow(t, 2) * Math.pow(x.x, 2));
|
|
489
499
|
u = u < 0 ? 0 : u;
|
|
490
|
-
const
|
|
500
|
+
const b = (i !== a ? 1 : -1) * Math.sqrt(u), y = b * (e * x.y / t), M = b * (-t * x.x / e), P = { x: Math.cos(h) * y - Math.sin(h) * M + (n.x + s.x) / 2, y: Math.sin(h) * y + Math.cos(h) * M + (n.y + s.y) / 2 }, E = { x: (x.x - y) / e, y: (x.y - M) / t }, L = ct({ x: 1, y: 0 }, E);
|
|
491
501
|
let S = ct(E, { x: (-x.x - y) / e, y: (-x.y - M) / t });
|
|
492
502
|
!a && S > 0 ? S -= 2 * Math.PI : a && S < 0 && (S += 2 * Math.PI), S %= 2 * Math.PI;
|
|
493
|
-
const
|
|
494
|
-
return { x: Math.cos(h) *
|
|
495
|
-
}, "pointOnEllipticalArc"), t1 =
|
|
503
|
+
const C = L + S * r, R = e * Math.cos(C), z = t * Math.sin(C);
|
|
504
|
+
return { x: Math.cos(h) * R - Math.sin(h) * z + P.x, y: Math.sin(h) * R + Math.cos(h) * z + P.y, ellipticalArcStartAngle: L, ellipticalArcEndAngle: L + S, ellipticalArcAngle: C, ellipticalArcCenter: P, resultantRx: e, resultantRy: t };
|
|
505
|
+
}, "pointOnEllipticalArc"), t1 = _((n, e) => {
|
|
496
506
|
n = n ?? 500;
|
|
497
507
|
let t = 0;
|
|
498
508
|
const o = [], i = [];
|
|
@@ -502,28 +512,28 @@ var Zt = Object.defineProperty, k = (n, e) => Zt(n, "name", { value: e, configur
|
|
|
502
512
|
a = e(h), t += lt(s, a), i.push([s, a]), o.push({ t: h, arcLength: t }), s = a;
|
|
503
513
|
}
|
|
504
514
|
return a = e(1), i.push([s, a]), t += lt(s, a), o.push({ t: 1, arcLength: t }), { arcLength: t, arcLengthMap: o, approximationLines: i };
|
|
505
|
-
}, "approximateArcLengthOfCurve"), e1 =
|
|
515
|
+
}, "approximateArcLengthOfCurve"), e1 = _((n, e) => (n % e + e) % e, "mod"), n1 = _((n) => n * (Math.PI / 180), "toRadians"), lt = _((n, e) => Math.sqrt(Math.pow(e.x - n.x, 2) + Math.pow(e.y - n.y, 2)), "distance"), r1 = _((n, e, t) => Math.min(Math.max(n, e), t), "clamp"), ct = _((n, e) => {
|
|
506
516
|
const t = n.x * e.x + n.y * e.y, o = Math.sqrt((Math.pow(n.x, 2) + Math.pow(n.y, 2)) * (Math.pow(e.x, 2) + Math.pow(e.y, 2)));
|
|
507
517
|
return (n.x * e.y - n.y * e.x < 0 ? -1 : 1) * Math.acos(t / o);
|
|
508
|
-
}, "angleBetween"), i1 = [[], [], [-0.5773502691896257, 0.5773502691896258], [0, -0.7745966692414833, 0.7745966692414833], [-0.33998104358485626, 0.33998104358485626, -0.8611363115940526, 0.8611363115940526], [0, -0.5384693101056831, 0.5384693101056831, -0.906179845938664, 0.906179845938664], [0.6612093864662645, -0.6612093864662645, -0.2386191860831969, 0.2386191860831969, -0.932469514203152, 0.932469514203152], [0, 0.4058451513773972, -0.4058451513773972, -0.7415311855993945, 0.7415311855993945, -0.9491079123427585, 0.9491079123427585], [-0.1834346424956498, 0.1834346424956498, -0.525532409916329, 0.525532409916329, -0.7966664774136267, 0.7966664774136267, -0.9602898564975363, 0.9602898564975363], [0, -0.8360311073266358, 0.8360311073266358, -0.9681602395076261, 0.9681602395076261, -0.3242534234038089, 0.3242534234038089, -0.6133714327005904, 0.6133714327005904], [-0.14887433898163122, 0.14887433898163122, -0.4333953941292472, 0.4333953941292472, -0.6794095682990244, 0.6794095682990244, -0.8650633666889845, 0.8650633666889845, -0.9739065285171717, 0.9739065285171717], [0, -0.26954315595234496, 0.26954315595234496, -0.5190961292068118, 0.5190961292068118, -0.7301520055740494, 0.7301520055740494, -0.8870625997680953, 0.8870625997680953, -0.978228658146057, 0.978228658146057], [-0.1252334085114689, 0.1252334085114689, -0.3678314989981802, 0.3678314989981802, -0.5873179542866175, 0.5873179542866175, -0.7699026741943047, 0.7699026741943047, -0.9041172563704749, 0.9041172563704749, -0.9815606342467192, 0.9815606342467192], [0, -0.2304583159551348, 0.2304583159551348, -0.44849275103644687, 0.44849275103644687, -0.6423493394403402, 0.6423493394403402, -0.8015780907333099, 0.8015780907333099, -0.9175983992229779, 0.9175983992229779, -0.9841830547185881, 0.9841830547185881], [-0.10805494870734367, 0.10805494870734367, -0.31911236892788974, 0.31911236892788974, -0.5152486363581541, 0.5152486363581541, -0.6872929048116855, 0.6872929048116855, -0.827201315069765, 0.827201315069765, -0.9284348836635735, 0.9284348836635735, -0.9862838086968123, 0.9862838086968123], [0, -0.20119409399743451, 0.20119409399743451, -0.3941513470775634, 0.3941513470775634, -0.5709721726085388, 0.5709721726085388, -0.7244177313601701, 0.7244177313601701, -0.8482065834104272, 0.8482065834104272, -0.937273392400706, 0.937273392400706, -0.9879925180204854, 0.9879925180204854], [-0.09501250983763744, 0.09501250983763744, -0.2816035507792589, 0.2816035507792589, -0.45801677765722737, 0.45801677765722737, -0.6178762444026438, 0.6178762444026438, -0.755404408355003, 0.755404408355003, -0.8656312023878318, 0.8656312023878318, -0.9445750230732326, 0.9445750230732326, -0.9894009349916499, 0.9894009349916499], [0, -0.17848418149584785, 0.17848418149584785, -0.3512317634538763, 0.3512317634538763, -0.5126905370864769, 0.5126905370864769, -0.6576711592166907, 0.6576711592166907, -0.7815140038968014, 0.7815140038968014, -0.8802391537269859, 0.8802391537269859, -0.9506755217687678, 0.9506755217687678, -0.9905754753144174, 0.9905754753144174], [-0.0847750130417353, 0.0847750130417353, -0.2518862256915055, 0.2518862256915055, -0.41175116146284263, 0.41175116146284263, -0.5597708310739475, 0.5597708310739475, -0.6916870430603532, 0.6916870430603532, -0.8037049589725231, 0.8037049589725231, -0.8926024664975557, 0.8926024664975557, -0.9558239495713977, 0.9558239495713977, -0.9915651684209309, 0.9915651684209309], [0, -0.16035864564022537, 0.16035864564022537, -0.31656409996362983, 0.31656409996362983, -0.46457074137596094, 0.46457074137596094, -0.600545304661681, 0.600545304661681, -0.7209661773352294, 0.7209661773352294, -0.8227146565371428, 0.8227146565371428, -0.9031559036148179, 0.9031559036148179, -0.96020815213483, 0.96020815213483, -0.9924068438435844, 0.9924068438435844], [-0.07652652113349734, 0.07652652113349734, -0.22778585114164507, 0.22778585114164507, -0.37370608871541955, 0.37370608871541955, -0.5108670019508271, 0.5108670019508271, -0.636053680726515, 0.636053680726515, -0.7463319064601508, 0.7463319064601508, -0.8391169718222188, 0.8391169718222188, -0.912234428251326, 0.912234428251326, -0.9639719272779138, 0.9639719272779138, -0.9931285991850949, 0.9931285991850949], [0, -0.1455618541608951, 0.1455618541608951, -0.2880213168024011, 0.2880213168024011, -0.4243421202074388, 0.4243421202074388, -0.5516188358872198, 0.5516188358872198, -0.6671388041974123, 0.6671388041974123, -0.7684399634756779, 0.7684399634756779, -0.8533633645833173, 0.8533633645833173, -0.9200993341504008, 0.9200993341504008, -0.9672268385663063, 0.9672268385663063, -0.9937521706203895, 0.9937521706203895], [-0.06973927331972223, 0.06973927331972223, -0.20786042668822127, 0.20786042668822127, -0.34193582089208424, 0.34193582089208424, -0.469355837986757, 0.469355837986757, -0.5876404035069116, 0.5876404035069116, -0.6944872631866827, 0.6944872631866827, -0.7878168059792081, 0.7878168059792081, -0.8658125777203002, 0.8658125777203002, -0.926956772187174, 0.926956772187174, -0.9700604978354287, 0.9700604978354287, -0.9942945854823992, 0.9942945854823992], [0, -0.1332568242984661, 0.1332568242984661, -0.26413568097034495, 0.26413568097034495, -0.3903010380302908, 0.3903010380302908, -0.5095014778460075, 0.5095014778460075, -0.6196098757636461, 0.6196098757636461, -0.7186613631319502, 0.7186613631319502, -0.8048884016188399, 0.8048884016188399, -0.8767523582704416, 0.8767523582704416, -0.9329710868260161, 0.9329710868260161, -0.9725424712181152, 0.9725424712181152, -0.9947693349975522, 0.9947693349975522], [-0.06405689286260563, 0.06405689286260563, -0.1911188674736163, 0.1911188674736163, -0.3150426796961634, 0.3150426796961634, -0.4337935076260451, 0.4337935076260451, -0.5454214713888396, 0.5454214713888396, -0.6480936519369755, 0.6480936519369755, -0.7401241915785544, 0.7401241915785544, -0.820001985973903, 0.820001985973903, -0.8864155270044011, 0.8864155270044011, -0.9382745520027328, 0.9382745520027328, -0.9747285559713095, 0.9747285559713095, -0.9951872199970213, 0.9951872199970213]], o1 = [[], [], [1, 1], [0.8888888888888888, 0.5555555555555556, 0.5555555555555556], [0.6521451548625461, 0.6521451548625461, 0.34785484513745385, 0.34785484513745385], [0.5688888888888889, 0.47862867049936647, 0.47862867049936647, 0.23692688505618908, 0.23692688505618908], [0.3607615730481386, 0.3607615730481386, 0.46791393457269104, 0.46791393457269104, 0.17132449237917036, 0.17132449237917036], [0.4179591836734694, 0.3818300505051189, 0.3818300505051189, 0.27970539148927664, 0.27970539148927664, 0.1294849661688697, 0.1294849661688697], [0.362683783378362, 0.362683783378362, 0.31370664587788727, 0.31370664587788727, 0.22238103445337448, 0.22238103445337448, 0.10122853629037626, 0.10122853629037626], [0.3302393550012598, 0.1806481606948574, 0.1806481606948574, 0.08127438836157441, 0.08127438836157441, 0.31234707704000286, 0.31234707704000286, 0.26061069640293544, 0.26061069640293544], [0.29552422471475287, 0.29552422471475287, 0.26926671930999635, 0.26926671930999635, 0.21908636251598204, 0.21908636251598204, 0.1494513491505806, 0.1494513491505806, 0.06667134430868814, 0.06667134430868814], [0.2729250867779006, 0.26280454451024665, 0.26280454451024665, 0.23319376459199048, 0.23319376459199048, 0.18629021092773426, 0.18629021092773426, 0.1255803694649046, 0.1255803694649046, 0.05566856711617366, 0.05566856711617366], [0.24914704581340277, 0.24914704581340277, 0.2334925365383548, 0.2334925365383548, 0.20316742672306592, 0.20316742672306592, 0.16007832854334622, 0.16007832854334622, 0.10693932599531843, 0.10693932599531843, 0.04717533638651183, 0.04717533638651183], [0.2325515532308739, 0.22628318026289723, 0.22628318026289723, 0.2078160475368885, 0.2078160475368885, 0.17814598076194574, 0.17814598076194574, 0.13887351021978725, 0.13887351021978725, 0.09212149983772845, 0.09212149983772845, 0.04048400476531588, 0.04048400476531588], [0.2152638534631578, 0.2152638534631578, 0.2051984637212956, 0.2051984637212956, 0.18553839747793782, 0.18553839747793782, 0.15720316715819355, 0.15720316715819355, 0.12151857068790319, 0.12151857068790319, 0.08015808715976021, 0.08015808715976021, 0.03511946033175186, 0.03511946033175186], [0.2025782419255613, 0.19843148532711158, 0.19843148532711158, 0.1861610000155622, 0.1861610000155622, 0.16626920581699392, 0.16626920581699392, 0.13957067792615432, 0.13957067792615432, 0.10715922046717194, 0.10715922046717194, 0.07036604748810812, 0.07036604748810812, 0.03075324199611727, 0.03075324199611727], [0.1894506104550685, 0.1894506104550685, 0.18260341504492358, 0.18260341504492358, 0.16915651939500254, 0.16915651939500254, 0.14959598881657674, 0.14959598881657674, 0.12462897125553388, 0.12462897125553388, 0.09515851168249279, 0.09515851168249279, 0.062253523938647894, 0.062253523938647894, 0.027152459411754096, 0.027152459411754096], [0.17944647035620653, 0.17656270536699264, 0.17656270536699264, 0.16800410215645004, 0.16800410215645004, 0.15404576107681028, 0.15404576107681028, 0.13513636846852548, 0.13513636846852548, 0.11188384719340397, 0.11188384719340397, 0.08503614831717918, 0.08503614831717918, 0.0554595293739872, 0.0554595293739872, 0.02414830286854793, 0.02414830286854793], [0.1691423829631436, 0.1691423829631436, 0.16427648374583273, 0.16427648374583273, 0.15468467512626524, 0.15468467512626524, 0.14064291467065065, 0.14064291467065065, 0.12255520671147846, 0.12255520671147846, 0.10094204410628717, 0.10094204410628717, 0.07642573025488905, 0.07642573025488905, 0.0497145488949698, 0.0497145488949698, 0.02161601352648331, 0.02161601352648331], [0.1610544498487837, 0.15896884339395434, 0.15896884339395434, 0.15276604206585967, 0.15276604206585967, 0.1426067021736066, 0.1426067021736066, 0.12875396253933621, 0.12875396253933621, 0.11156664554733399, 0.11156664554733399, 0.09149002162245, 0.09149002162245, 0.06904454273764123, 0.06904454273764123, 0.0448142267656996, 0.0448142267656996, 0.019461788229726478, 0.019461788229726478], [0.15275338713072584, 0.15275338713072584, 0.14917298647260374, 0.14917298647260374, 0.14209610931838204, 0.14209610931838204, 0.13168863844917664, 0.13168863844917664, 0.11819453196151841, 0.11819453196151841, 0.10193011981724044, 0.10193011981724044, 0.08327674157670475, 0.08327674157670475, 0.06267204833410907, 0.06267204833410907, 0.04060142980038694, 0.04060142980038694, 0.017614007139152118, 0.017614007139152118], [0.14608113364969041, 0.14452440398997005, 0.14452440398997005, 0.13988739479107315, 0.13988739479107315, 0.13226893863333747, 0.13226893863333747, 0.12183141605372853, 0.12183141605372853, 0.10879729916714838, 0.10879729916714838, 0.09344442345603386, 0.09344442345603386, 0.0761001136283793, 0.0761001136283793, 0.057134425426857205, 0.057134425426857205, 0.036953789770852494, 0.036953789770852494, 0.016017228257774335, 0.016017228257774335], [0.13925187285563198, 0.13925187285563198, 0.13654149834601517, 0.13654149834601517, 0.13117350478706238, 0.13117350478706238, 0.12325237681051242, 0.12325237681051242, 0.11293229608053922, 0.11293229608053922, 0.10041414444288096, 0.10041414444288096, 0.08594160621706773, 0.08594160621706773, 0.06979646842452049, 0.06979646842452049, 0.052293335152683286, 0.052293335152683286, 0.03377490158481415, 0.03377490158481415, 0.0146279952982722, 0.0146279952982722], [0.13365457218610619, 0.1324620394046966, 0.1324620394046966, 0.12890572218808216, 0.12890572218808216, 0.12304908430672953, 0.12304908430672953, 0.11499664022241136, 0.11499664022241136, 0.10489209146454141, 0.10489209146454141, 0.09291576606003515, 0.09291576606003515, 0.07928141177671895, 0.07928141177671895, 0.06423242140852585, 0.06423242140852585, 0.04803767173108467, 0.04803767173108467, 0.030988005856979445, 0.030988005856979445, 0.013411859487141771, 0.013411859487141771], [0.12793819534675216, 0.12793819534675216, 0.1258374563468283, 0.1258374563468283, 0.12167047292780339, 0.12167047292780339, 0.1155056680537256, 0.1155056680537256, 0.10744427011596563, 0.10744427011596563, 0.09761865210411388, 0.09761865210411388, 0.08619016153195327, 0.08619016153195327, 0.0733464814110803, 0.0733464814110803, 0.05929858491543678, 0.05929858491543678, 0.04427743881741981, 0.04427743881741981, 0.028531388628933663, 0.028531388628933663, 0.0123412297999872, 0.0123412297999872]], s1 = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], a1 = k((n, e, t) => ({ x: (1 - t) * (1 - t) * (1 - t) * n[0] + 3 * (1 - t) * (1 - t) * t * n[1] + 3 * (1 - t) * t * t * n[2] + t * t * t * n[3], y: (1 - t) * (1 - t) * (1 - t) * e[0] + 3 * (1 - t) * (1 - t) * t * e[1] + 3 * (1 - t) * t * t * e[2] + t * t * t * e[3] }), "cubicPoint"), h1 = k((n, e, t) => It([3 * (n[1] - n[0]), 3 * (n[2] - n[1]), 3 * (n[3] - n[2])], [3 * (e[1] - e[0]), 3 * (e[2] - e[1]), 3 * (e[3] - e[2])], t), "cubicDerivative"), l1 = k((n, e, t) => {
|
|
518
|
+
}, "angleBetween"), i1 = [[], [], [-0.5773502691896257, 0.5773502691896258], [0, -0.7745966692414833, 0.7745966692414833], [-0.33998104358485626, 0.33998104358485626, -0.8611363115940526, 0.8611363115940526], [0, -0.5384693101056831, 0.5384693101056831, -0.906179845938664, 0.906179845938664], [0.6612093864662645, -0.6612093864662645, -0.2386191860831969, 0.2386191860831969, -0.932469514203152, 0.932469514203152], [0, 0.4058451513773972, -0.4058451513773972, -0.7415311855993945, 0.7415311855993945, -0.9491079123427585, 0.9491079123427585], [-0.1834346424956498, 0.1834346424956498, -0.525532409916329, 0.525532409916329, -0.7966664774136267, 0.7966664774136267, -0.9602898564975363, 0.9602898564975363], [0, -0.8360311073266358, 0.8360311073266358, -0.9681602395076261, 0.9681602395076261, -0.3242534234038089, 0.3242534234038089, -0.6133714327005904, 0.6133714327005904], [-0.14887433898163122, 0.14887433898163122, -0.4333953941292472, 0.4333953941292472, -0.6794095682990244, 0.6794095682990244, -0.8650633666889845, 0.8650633666889845, -0.9739065285171717, 0.9739065285171717], [0, -0.26954315595234496, 0.26954315595234496, -0.5190961292068118, 0.5190961292068118, -0.7301520055740494, 0.7301520055740494, -0.8870625997680953, 0.8870625997680953, -0.978228658146057, 0.978228658146057], [-0.1252334085114689, 0.1252334085114689, -0.3678314989981802, 0.3678314989981802, -0.5873179542866175, 0.5873179542866175, -0.7699026741943047, 0.7699026741943047, -0.9041172563704749, 0.9041172563704749, -0.9815606342467192, 0.9815606342467192], [0, -0.2304583159551348, 0.2304583159551348, -0.44849275103644687, 0.44849275103644687, -0.6423493394403402, 0.6423493394403402, -0.8015780907333099, 0.8015780907333099, -0.9175983992229779, 0.9175983992229779, -0.9841830547185881, 0.9841830547185881], [-0.10805494870734367, 0.10805494870734367, -0.31911236892788974, 0.31911236892788974, -0.5152486363581541, 0.5152486363581541, -0.6872929048116855, 0.6872929048116855, -0.827201315069765, 0.827201315069765, -0.9284348836635735, 0.9284348836635735, -0.9862838086968123, 0.9862838086968123], [0, -0.20119409399743451, 0.20119409399743451, -0.3941513470775634, 0.3941513470775634, -0.5709721726085388, 0.5709721726085388, -0.7244177313601701, 0.7244177313601701, -0.8482065834104272, 0.8482065834104272, -0.937273392400706, 0.937273392400706, -0.9879925180204854, 0.9879925180204854], [-0.09501250983763744, 0.09501250983763744, -0.2816035507792589, 0.2816035507792589, -0.45801677765722737, 0.45801677765722737, -0.6178762444026438, 0.6178762444026438, -0.755404408355003, 0.755404408355003, -0.8656312023878318, 0.8656312023878318, -0.9445750230732326, 0.9445750230732326, -0.9894009349916499, 0.9894009349916499], [0, -0.17848418149584785, 0.17848418149584785, -0.3512317634538763, 0.3512317634538763, -0.5126905370864769, 0.5126905370864769, -0.6576711592166907, 0.6576711592166907, -0.7815140038968014, 0.7815140038968014, -0.8802391537269859, 0.8802391537269859, -0.9506755217687678, 0.9506755217687678, -0.9905754753144174, 0.9905754753144174], [-0.0847750130417353, 0.0847750130417353, -0.2518862256915055, 0.2518862256915055, -0.41175116146284263, 0.41175116146284263, -0.5597708310739475, 0.5597708310739475, -0.6916870430603532, 0.6916870430603532, -0.8037049589725231, 0.8037049589725231, -0.8926024664975557, 0.8926024664975557, -0.9558239495713977, 0.9558239495713977, -0.9915651684209309, 0.9915651684209309], [0, -0.16035864564022537, 0.16035864564022537, -0.31656409996362983, 0.31656409996362983, -0.46457074137596094, 0.46457074137596094, -0.600545304661681, 0.600545304661681, -0.7209661773352294, 0.7209661773352294, -0.8227146565371428, 0.8227146565371428, -0.9031559036148179, 0.9031559036148179, -0.96020815213483, 0.96020815213483, -0.9924068438435844, 0.9924068438435844], [-0.07652652113349734, 0.07652652113349734, -0.22778585114164507, 0.22778585114164507, -0.37370608871541955, 0.37370608871541955, -0.5108670019508271, 0.5108670019508271, -0.636053680726515, 0.636053680726515, -0.7463319064601508, 0.7463319064601508, -0.8391169718222188, 0.8391169718222188, -0.912234428251326, 0.912234428251326, -0.9639719272779138, 0.9639719272779138, -0.9931285991850949, 0.9931285991850949], [0, -0.1455618541608951, 0.1455618541608951, -0.2880213168024011, 0.2880213168024011, -0.4243421202074388, 0.4243421202074388, -0.5516188358872198, 0.5516188358872198, -0.6671388041974123, 0.6671388041974123, -0.7684399634756779, 0.7684399634756779, -0.8533633645833173, 0.8533633645833173, -0.9200993341504008, 0.9200993341504008, -0.9672268385663063, 0.9672268385663063, -0.9937521706203895, 0.9937521706203895], [-0.06973927331972223, 0.06973927331972223, -0.20786042668822127, 0.20786042668822127, -0.34193582089208424, 0.34193582089208424, -0.469355837986757, 0.469355837986757, -0.5876404035069116, 0.5876404035069116, -0.6944872631866827, 0.6944872631866827, -0.7878168059792081, 0.7878168059792081, -0.8658125777203002, 0.8658125777203002, -0.926956772187174, 0.926956772187174, -0.9700604978354287, 0.9700604978354287, -0.9942945854823992, 0.9942945854823992], [0, -0.1332568242984661, 0.1332568242984661, -0.26413568097034495, 0.26413568097034495, -0.3903010380302908, 0.3903010380302908, -0.5095014778460075, 0.5095014778460075, -0.6196098757636461, 0.6196098757636461, -0.7186613631319502, 0.7186613631319502, -0.8048884016188399, 0.8048884016188399, -0.8767523582704416, 0.8767523582704416, -0.9329710868260161, 0.9329710868260161, -0.9725424712181152, 0.9725424712181152, -0.9947693349975522, 0.9947693349975522], [-0.06405689286260563, 0.06405689286260563, -0.1911188674736163, 0.1911188674736163, -0.3150426796961634, 0.3150426796961634, -0.4337935076260451, 0.4337935076260451, -0.5454214713888396, 0.5454214713888396, -0.6480936519369755, 0.6480936519369755, -0.7401241915785544, 0.7401241915785544, -0.820001985973903, 0.820001985973903, -0.8864155270044011, 0.8864155270044011, -0.9382745520027328, 0.9382745520027328, -0.9747285559713095, 0.9747285559713095, -0.9951872199970213, 0.9951872199970213]], o1 = [[], [], [1, 1], [0.8888888888888888, 0.5555555555555556, 0.5555555555555556], [0.6521451548625461, 0.6521451548625461, 0.34785484513745385, 0.34785484513745385], [0.5688888888888889, 0.47862867049936647, 0.47862867049936647, 0.23692688505618908, 0.23692688505618908], [0.3607615730481386, 0.3607615730481386, 0.46791393457269104, 0.46791393457269104, 0.17132449237917036, 0.17132449237917036], [0.4179591836734694, 0.3818300505051189, 0.3818300505051189, 0.27970539148927664, 0.27970539148927664, 0.1294849661688697, 0.1294849661688697], [0.362683783378362, 0.362683783378362, 0.31370664587788727, 0.31370664587788727, 0.22238103445337448, 0.22238103445337448, 0.10122853629037626, 0.10122853629037626], [0.3302393550012598, 0.1806481606948574, 0.1806481606948574, 0.08127438836157441, 0.08127438836157441, 0.31234707704000286, 0.31234707704000286, 0.26061069640293544, 0.26061069640293544], [0.29552422471475287, 0.29552422471475287, 0.26926671930999635, 0.26926671930999635, 0.21908636251598204, 0.21908636251598204, 0.1494513491505806, 0.1494513491505806, 0.06667134430868814, 0.06667134430868814], [0.2729250867779006, 0.26280454451024665, 0.26280454451024665, 0.23319376459199048, 0.23319376459199048, 0.18629021092773426, 0.18629021092773426, 0.1255803694649046, 0.1255803694649046, 0.05566856711617366, 0.05566856711617366], [0.24914704581340277, 0.24914704581340277, 0.2334925365383548, 0.2334925365383548, 0.20316742672306592, 0.20316742672306592, 0.16007832854334622, 0.16007832854334622, 0.10693932599531843, 0.10693932599531843, 0.04717533638651183, 0.04717533638651183], [0.2325515532308739, 0.22628318026289723, 0.22628318026289723, 0.2078160475368885, 0.2078160475368885, 0.17814598076194574, 0.17814598076194574, 0.13887351021978725, 0.13887351021978725, 0.09212149983772845, 0.09212149983772845, 0.04048400476531588, 0.04048400476531588], [0.2152638534631578, 0.2152638534631578, 0.2051984637212956, 0.2051984637212956, 0.18553839747793782, 0.18553839747793782, 0.15720316715819355, 0.15720316715819355, 0.12151857068790319, 0.12151857068790319, 0.08015808715976021, 0.08015808715976021, 0.03511946033175186, 0.03511946033175186], [0.2025782419255613, 0.19843148532711158, 0.19843148532711158, 0.1861610000155622, 0.1861610000155622, 0.16626920581699392, 0.16626920581699392, 0.13957067792615432, 0.13957067792615432, 0.10715922046717194, 0.10715922046717194, 0.07036604748810812, 0.07036604748810812, 0.03075324199611727, 0.03075324199611727], [0.1894506104550685, 0.1894506104550685, 0.18260341504492358, 0.18260341504492358, 0.16915651939500254, 0.16915651939500254, 0.14959598881657674, 0.14959598881657674, 0.12462897125553388, 0.12462897125553388, 0.09515851168249279, 0.09515851168249279, 0.062253523938647894, 0.062253523938647894, 0.027152459411754096, 0.027152459411754096], [0.17944647035620653, 0.17656270536699264, 0.17656270536699264, 0.16800410215645004, 0.16800410215645004, 0.15404576107681028, 0.15404576107681028, 0.13513636846852548, 0.13513636846852548, 0.11188384719340397, 0.11188384719340397, 0.08503614831717918, 0.08503614831717918, 0.0554595293739872, 0.0554595293739872, 0.02414830286854793, 0.02414830286854793], [0.1691423829631436, 0.1691423829631436, 0.16427648374583273, 0.16427648374583273, 0.15468467512626524, 0.15468467512626524, 0.14064291467065065, 0.14064291467065065, 0.12255520671147846, 0.12255520671147846, 0.10094204410628717, 0.10094204410628717, 0.07642573025488905, 0.07642573025488905, 0.0497145488949698, 0.0497145488949698, 0.02161601352648331, 0.02161601352648331], [0.1610544498487837, 0.15896884339395434, 0.15896884339395434, 0.15276604206585967, 0.15276604206585967, 0.1426067021736066, 0.1426067021736066, 0.12875396253933621, 0.12875396253933621, 0.11156664554733399, 0.11156664554733399, 0.09149002162245, 0.09149002162245, 0.06904454273764123, 0.06904454273764123, 0.0448142267656996, 0.0448142267656996, 0.019461788229726478, 0.019461788229726478], [0.15275338713072584, 0.15275338713072584, 0.14917298647260374, 0.14917298647260374, 0.14209610931838204, 0.14209610931838204, 0.13168863844917664, 0.13168863844917664, 0.11819453196151841, 0.11819453196151841, 0.10193011981724044, 0.10193011981724044, 0.08327674157670475, 0.08327674157670475, 0.06267204833410907, 0.06267204833410907, 0.04060142980038694, 0.04060142980038694, 0.017614007139152118, 0.017614007139152118], [0.14608113364969041, 0.14452440398997005, 0.14452440398997005, 0.13988739479107315, 0.13988739479107315, 0.13226893863333747, 0.13226893863333747, 0.12183141605372853, 0.12183141605372853, 0.10879729916714838, 0.10879729916714838, 0.09344442345603386, 0.09344442345603386, 0.0761001136283793, 0.0761001136283793, 0.057134425426857205, 0.057134425426857205, 0.036953789770852494, 0.036953789770852494, 0.016017228257774335, 0.016017228257774335], [0.13925187285563198, 0.13925187285563198, 0.13654149834601517, 0.13654149834601517, 0.13117350478706238, 0.13117350478706238, 0.12325237681051242, 0.12325237681051242, 0.11293229608053922, 0.11293229608053922, 0.10041414444288096, 0.10041414444288096, 0.08594160621706773, 0.08594160621706773, 0.06979646842452049, 0.06979646842452049, 0.052293335152683286, 0.052293335152683286, 0.03377490158481415, 0.03377490158481415, 0.0146279952982722, 0.0146279952982722], [0.13365457218610619, 0.1324620394046966, 0.1324620394046966, 0.12890572218808216, 0.12890572218808216, 0.12304908430672953, 0.12304908430672953, 0.11499664022241136, 0.11499664022241136, 0.10489209146454141, 0.10489209146454141, 0.09291576606003515, 0.09291576606003515, 0.07928141177671895, 0.07928141177671895, 0.06423242140852585, 0.06423242140852585, 0.04803767173108467, 0.04803767173108467, 0.030988005856979445, 0.030988005856979445, 0.013411859487141771, 0.013411859487141771], [0.12793819534675216, 0.12793819534675216, 0.1258374563468283, 0.1258374563468283, 0.12167047292780339, 0.12167047292780339, 0.1155056680537256, 0.1155056680537256, 0.10744427011596563, 0.10744427011596563, 0.09761865210411388, 0.09761865210411388, 0.08619016153195327, 0.08619016153195327, 0.0733464814110803, 0.0733464814110803, 0.05929858491543678, 0.05929858491543678, 0.04427743881741981, 0.04427743881741981, 0.028531388628933663, 0.028531388628933663, 0.0123412297999872, 0.0123412297999872]], s1 = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], a1 = _((n, e, t) => ({ x: (1 - t) * (1 - t) * (1 - t) * n[0] + 3 * (1 - t) * (1 - t) * t * n[1] + 3 * (1 - t) * t * t * n[2] + t * t * t * n[3], y: (1 - t) * (1 - t) * (1 - t) * e[0] + 3 * (1 - t) * (1 - t) * t * e[1] + 3 * (1 - t) * t * t * e[2] + t * t * t * e[3] }), "cubicPoint"), h1 = _((n, e, t) => It([3 * (n[1] - n[0]), 3 * (n[2] - n[1]), 3 * (n[3] - n[2])], [3 * (e[1] - e[0]), 3 * (e[2] - e[1]), 3 * (e[3] - e[2])], t), "cubicDerivative"), l1 = _((n, e, t) => {
|
|
509
519
|
let o, i;
|
|
510
520
|
const a = t / 2;
|
|
511
521
|
o = 0;
|
|
512
|
-
for (let s = 0; s < 20; s++) i = a * i1[20][s] + a, o += o1[20][s] *
|
|
522
|
+
for (let s = 0; s < 20; s++) i = a * i1[20][s] + a, o += o1[20][s] * kt(n, e, i);
|
|
513
523
|
return a * o;
|
|
514
|
-
}, "getCubicArcLength"), It =
|
|
524
|
+
}, "getCubicArcLength"), It = _((n, e, t) => ({ x: (1 - t) * (1 - t) * n[0] + 2 * (1 - t) * t * n[1] + t * t * n[2], y: (1 - t) * (1 - t) * e[0] + 2 * (1 - t) * t * e[1] + t * t * e[2] }), "quadraticPoint"), c1 = _((n, e, t) => {
|
|
515
525
|
t === void 0 && (t = 1);
|
|
516
526
|
const o = n[0] - 2 * n[1] + n[2], i = e[0] - 2 * e[1] + e[2], a = 2 * n[1] - 2 * n[0], s = 2 * e[1] - 2 * e[0], r = 4 * (o * o + i * i), h = 4 * (o * a + i * s), c = a * a + s * s;
|
|
517
527
|
if (r === 0) return t * Math.sqrt(Math.pow(n[2] - n[0], 2) + Math.pow(e[2] - e[0], 2));
|
|
518
|
-
const f = h / (2 * r), x = t + f, l = c / r - f * f, u = x * x + l > 0 ? Math.sqrt(x * x + l) : 0,
|
|
519
|
-
return Math.sqrt(r) / 2 * (x * u - f *
|
|
520
|
-
}, "getQuadraticArcLength"), u1 =
|
|
521
|
-
function
|
|
522
|
-
const o =
|
|
528
|
+
const f = h / (2 * r), x = t + f, l = c / r - f * f, u = x * x + l > 0 ? Math.sqrt(x * x + l) : 0, b = f * f + l > 0 ? Math.sqrt(f * f + l) : 0, y = f + Math.sqrt(f * f + l) !== 0 && (x + u) / (f + b) !== 0 ? l * Math.log(Math.abs((x + u) / (f + b))) : 0;
|
|
529
|
+
return Math.sqrt(r) / 2 * (x * u - f * b + y);
|
|
530
|
+
}, "getQuadraticArcLength"), u1 = _((n, e, t) => ({ x: 2 * (1 - t) * (n[1] - n[0]) + 2 * t * (n[2] - n[1]), y: 2 * (1 - t) * (e[1] - e[0]) + 2 * t * (e[2] - e[1]) }), "quadraticDerivative");
|
|
531
|
+
function kt(n, e, t) {
|
|
532
|
+
const o = G0(1, t, n), i = G0(1, t, e), a = o * o + i * i;
|
|
523
533
|
return Math.sqrt(a);
|
|
524
534
|
}
|
|
525
|
-
|
|
526
|
-
var
|
|
535
|
+
_(kt, "BFunc");
|
|
536
|
+
var G0 = _((n, e, t) => {
|
|
527
537
|
const o = t.length - 1;
|
|
528
538
|
let i, a;
|
|
529
539
|
if (o === 0) return 0;
|
|
@@ -534,8 +544,8 @@ var Y0 = k((n, e, t) => {
|
|
|
534
544
|
}
|
|
535
545
|
i = new Array(o);
|
|
536
546
|
for (let s = 0; s < o; s++) i[s] = o * (t[s + 1] - t[s]);
|
|
537
|
-
return
|
|
538
|
-
}, "getDerivative"),
|
|
547
|
+
return G0(n - 1, e, i);
|
|
548
|
+
}, "getDerivative"), F0 = _((n, e, t) => {
|
|
539
549
|
let o = 1, i = n / e, a = (n - t(i)) / e, s = 0;
|
|
540
550
|
for (; o > 1e-3; ) {
|
|
541
551
|
const r = t(i + a), h = Math.abs(n - r) / e;
|
|
@@ -547,7 +557,7 @@ var Y0 = k((n, e, t) => {
|
|
|
547
557
|
if (s++, s > 500) break;
|
|
548
558
|
}
|
|
549
559
|
return i;
|
|
550
|
-
}, "t2length"),
|
|
560
|
+
}, "t2length"), b0, h0 = (b0 = class {
|
|
551
561
|
constructor(e, t, o, i, a, s, r, h) {
|
|
552
562
|
I(this, "a");
|
|
553
563
|
I(this, "b");
|
|
@@ -557,59 +567,59 @@ var Y0 = k((n, e, t) => {
|
|
|
557
567
|
I(this, "getArcLength");
|
|
558
568
|
I(this, "getPoint");
|
|
559
569
|
I(this, "getDerivative");
|
|
560
|
-
I(this, "getTotalLength",
|
|
561
|
-
I(this, "getPointAtLength",
|
|
562
|
-
const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i =
|
|
570
|
+
I(this, "getTotalLength", _(() => this.length, "getTotalLength"));
|
|
571
|
+
I(this, "getPointAtLength", _((e) => {
|
|
572
|
+
const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = F0(e, this.length, (a) => this.getArcLength(t, o, a));
|
|
563
573
|
return this.getPoint(t, o, i);
|
|
564
574
|
}, "getPointAtLength"));
|
|
565
|
-
I(this, "getTangentAtLength",
|
|
566
|
-
const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i =
|
|
575
|
+
I(this, "getTangentAtLength", _((e) => {
|
|
576
|
+
const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = F0(e, this.length, (h) => this.getArcLength(t, o, h)), a = this.getDerivative(t, o, i), s = Math.sqrt(a.x * a.x + a.y * a.y);
|
|
567
577
|
let r;
|
|
568
578
|
return r = s > 0 ? { x: a.x / s, y: a.y / s } : { x: 0, y: 0 }, r;
|
|
569
579
|
}, "getTangentAtLength"));
|
|
570
|
-
I(this, "getPropertiesAtLength",
|
|
571
|
-
const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i =
|
|
580
|
+
I(this, "getPropertiesAtLength", _((e) => {
|
|
581
|
+
const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = F0(e, this.length, (c) => this.getArcLength(t, o, c)), a = this.getDerivative(t, o, i), s = Math.sqrt(a.x * a.x + a.y * a.y);
|
|
572
582
|
let r;
|
|
573
583
|
r = s > 0 ? { x: a.x / s, y: a.y / s } : { x: 0, y: 0 };
|
|
574
584
|
const h = this.getPoint(t, o, i);
|
|
575
585
|
return { x: h.x, y: h.y, tangentX: r.x, tangentY: r.y };
|
|
576
586
|
}, "getPropertiesAtLength"));
|
|
577
|
-
I(this, "getC",
|
|
578
|
-
I(this, "getD",
|
|
587
|
+
I(this, "getC", _(() => this.c, "getC"));
|
|
588
|
+
I(this, "getD", _(() => this.d, "getD"));
|
|
579
589
|
this.a = { x: e, y: t }, this.b = { x: o, y: i }, this.c = { x: a, y: s }, r !== void 0 && h !== void 0 ? (this.getArcLength = l1, this.getPoint = a1, this.getDerivative = h1, this.d = { x: r, y: h }) : (this.getArcLength = c1, this.getPoint = It, this.getDerivative = u1, this.d = { x: 0, y: 0 }), this.length = this.getArcLength([this.a.x, this.b.x, this.c.x, this.d.x], [this.a.y, this.b.y, this.c.y, this.d.y], 1);
|
|
580
590
|
}
|
|
581
|
-
},
|
|
591
|
+
}, _(b0, "Bezier"), b0), A0, f1 = (A0 = class {
|
|
582
592
|
constructor(e) {
|
|
583
593
|
I(this, "length", 0);
|
|
584
594
|
I(this, "partial_lengths", []);
|
|
585
595
|
I(this, "functions", []);
|
|
586
596
|
I(this, "initial_point", null);
|
|
587
|
-
I(this, "getPartAtLength",
|
|
597
|
+
I(this, "getPartAtLength", _((e) => {
|
|
588
598
|
e < 0 ? e = 0 : e > this.length && (e = this.length);
|
|
589
599
|
let t = this.partial_lengths.length - 1;
|
|
590
600
|
for (; this.partial_lengths[t] >= e && t > 0; ) t--;
|
|
591
601
|
return t++, { fraction: e - this.partial_lengths[t - 1], i: t };
|
|
592
602
|
}, "getPartAtLength"));
|
|
593
|
-
I(this, "getTotalLength",
|
|
594
|
-
I(this, "getPointAtLength",
|
|
603
|
+
I(this, "getTotalLength", _(() => this.length, "getTotalLength"));
|
|
604
|
+
I(this, "getPointAtLength", _((e) => {
|
|
595
605
|
const t = this.getPartAtLength(e), o = this.functions[t.i];
|
|
596
606
|
if (o) return o.getPointAtLength(t.fraction);
|
|
597
607
|
if (this.initial_point) return this.initial_point;
|
|
598
608
|
throw new Error("Wrong function at this part.");
|
|
599
609
|
}, "getPointAtLength"));
|
|
600
|
-
I(this, "getTangentAtLength",
|
|
610
|
+
I(this, "getTangentAtLength", _((e) => {
|
|
601
611
|
const t = this.getPartAtLength(e), o = this.functions[t.i];
|
|
602
612
|
if (o) return o.getTangentAtLength(t.fraction);
|
|
603
613
|
if (this.initial_point) return { x: 0, y: 0 };
|
|
604
614
|
throw new Error("Wrong function at this part.");
|
|
605
615
|
}, "getTangentAtLength"));
|
|
606
|
-
I(this, "getPropertiesAtLength",
|
|
616
|
+
I(this, "getPropertiesAtLength", _((e) => {
|
|
607
617
|
const t = this.getPartAtLength(e), o = this.functions[t.i];
|
|
608
618
|
if (o) return o.getPropertiesAtLength(t.fraction);
|
|
609
619
|
if (this.initial_point) return { x: this.initial_point.x, y: this.initial_point.y, tangentX: 0, tangentY: 0 };
|
|
610
620
|
throw new Error("Wrong function at this part.");
|
|
611
621
|
}, "getPropertiesAtLength"));
|
|
612
|
-
I(this, "getParts",
|
|
622
|
+
I(this, "getParts", _(() => {
|
|
613
623
|
const e = [];
|
|
614
624
|
for (let t = 0; t < this.functions.length; t++) if (this.functions[t] !== null) {
|
|
615
625
|
this.functions[t] = this.functions[t];
|
|
@@ -685,22 +695,22 @@ var Y0 = k((n, e, t) => {
|
|
|
685
695
|
this.partial_lengths.push(this.length);
|
|
686
696
|
}
|
|
687
697
|
}
|
|
688
|
-
},
|
|
698
|
+
}, _(A0, "SVGPathProperties"), A0), M0, W0 = (M0 = class {
|
|
689
699
|
constructor(e) {
|
|
690
700
|
I(this, "inst");
|
|
691
|
-
I(this, "getTotalLength",
|
|
692
|
-
I(this, "getPointAtLength",
|
|
693
|
-
I(this, "getTangentAtLength",
|
|
694
|
-
I(this, "getPropertiesAtLength",
|
|
695
|
-
I(this, "getParts",
|
|
696
|
-
if (this.inst = new f1(e), !(this instanceof
|
|
697
|
-
}
|
|
698
|
-
},
|
|
699
|
-
function g1(n =
|
|
701
|
+
I(this, "getTotalLength", _(() => this.inst.getTotalLength(), "getTotalLength"));
|
|
702
|
+
I(this, "getPointAtLength", _((e) => this.inst.getPointAtLength(e), "getPointAtLength"));
|
|
703
|
+
I(this, "getTangentAtLength", _((e) => this.inst.getTangentAtLength(e), "getTangentAtLength"));
|
|
704
|
+
I(this, "getPropertiesAtLength", _((e) => this.inst.getPropertiesAtLength(e), "getPropertiesAtLength"));
|
|
705
|
+
I(this, "getParts", _(() => this.inst.getParts(), "getParts"));
|
|
706
|
+
if (this.inst = new f1(e), !(this instanceof W0)) return new W0(e);
|
|
707
|
+
}
|
|
708
|
+
}, _(M0, "_svgPathProperties"), M0);
|
|
709
|
+
function g1(n = $.BLACK) {
|
|
700
710
|
return { ...n, alpha: 0 };
|
|
701
711
|
}
|
|
702
|
-
function
|
|
703
|
-
const { path: e, height: t = 100, width: o = 100, viewboxHeight: i, viewboxWidth: a, ...s } = n ?? {}, r = e ?? "M 0 0 L 100 100", c = new
|
|
712
|
+
function Mn(n = null) {
|
|
713
|
+
const { path: e, height: t = 100, width: o = 100, viewboxHeight: i, viewboxWidth: a, ...s } = n ?? {}, r = e ?? "M 0 0 L 100 100", c = new W0(r).getTotalLength();
|
|
704
714
|
return s0({
|
|
705
715
|
objectType: j.PATH,
|
|
706
716
|
anchor: o0,
|
|
@@ -720,7 +730,7 @@ function bn(n = null) {
|
|
|
720
730
|
...s
|
|
721
731
|
});
|
|
722
732
|
}
|
|
723
|
-
function
|
|
733
|
+
function Ln(n = null) {
|
|
724
734
|
return s0({
|
|
725
735
|
objectType: j.POLYGON,
|
|
726
736
|
borderColor: K,
|
|
@@ -735,7 +745,7 @@ function Mn(n = null) {
|
|
|
735
745
|
...n
|
|
736
746
|
});
|
|
737
747
|
}
|
|
738
|
-
function
|
|
748
|
+
function Tn(n = null) {
|
|
739
749
|
return s0({
|
|
740
750
|
objectType: j.RECTANGLE,
|
|
741
751
|
anchor: o0,
|
|
@@ -751,7 +761,7 @@ function Ln(n = null) {
|
|
|
751
761
|
...n
|
|
752
762
|
});
|
|
753
763
|
}
|
|
754
|
-
function
|
|
764
|
+
function Pn(n = null) {
|
|
755
765
|
return s0({
|
|
756
766
|
objectType: j.SVG,
|
|
757
767
|
anchor: o0,
|
|
@@ -785,11 +795,11 @@ const p1 = {
|
|
|
785
795
|
fontWeight: y1,
|
|
786
796
|
ligatures: !1
|
|
787
797
|
};
|
|
788
|
-
function
|
|
798
|
+
function _t(n) {
|
|
789
799
|
return typeof n == "string" ? [[{ text: n }]] : n.map((e) => e.map((t) => typeof t == "string" ? { text: t } : t));
|
|
790
800
|
}
|
|
791
801
|
function w1(n) {
|
|
792
|
-
return
|
|
802
|
+
return _t(n).reduce(
|
|
793
803
|
(t, o) => t + o.reduce((i, a) => i + a.text.length, 0),
|
|
794
804
|
0
|
|
795
805
|
);
|
|
@@ -797,7 +807,7 @@ function w1(n) {
|
|
|
797
807
|
function m1(n = "", e = null) {
|
|
798
808
|
return s0({
|
|
799
809
|
objectType: j.TEXT,
|
|
800
|
-
alignment:
|
|
810
|
+
alignment: Gt,
|
|
801
811
|
anchor: o0,
|
|
802
812
|
length: null,
|
|
803
813
|
lineSpacing: 1,
|
|
@@ -816,7 +826,7 @@ m1.writeOn = (n, e = {}) => et(
|
|
|
816
826
|
e
|
|
817
827
|
);
|
|
818
828
|
let Z = null;
|
|
819
|
-
function
|
|
829
|
+
function b1({ presentation: n, onNavigateToSlide: e }) {
|
|
820
830
|
if (Z !== null && !Z.closed) {
|
|
821
831
|
Z.focus();
|
|
822
832
|
return;
|
|
@@ -825,12 +835,12 @@ function A1({ presentation: n, onNavigateToSlide: e }) {
|
|
|
825
835
|
console.error("Failed to open navigator window.");
|
|
826
836
|
return;
|
|
827
837
|
}
|
|
828
|
-
const t =
|
|
838
|
+
const t = A1(n, e);
|
|
829
839
|
Z.document.title = n.title, Z.document.body.appendChild(t), Z.addEventListener("keyup", (o) => {
|
|
830
840
|
(o.key === "Escape" || o.key === "`") && (Z == null || Z.close(), Z = null);
|
|
831
841
|
});
|
|
832
842
|
}
|
|
833
|
-
function
|
|
843
|
+
function A1(n, e) {
|
|
834
844
|
const t = document.createElement("div");
|
|
835
845
|
return t.style.fontFamily = "Arial, sans-serif", n.slides.forEach((o, i) => {
|
|
836
846
|
const a = M1(o, i);
|
|
@@ -853,7 +863,7 @@ function i0(n = null) {
|
|
|
853
863
|
const L1 = i0({ width: 0, height: 0 });
|
|
854
864
|
function T1(n = null) {
|
|
855
865
|
return {
|
|
856
|
-
backgroundColor:
|
|
866
|
+
backgroundColor: $.WHITE,
|
|
857
867
|
slides: [],
|
|
858
868
|
title: "Presentation",
|
|
859
869
|
size: i0({ width: 3840, height: 2160 }),
|
|
@@ -911,15 +921,15 @@ const S1 = {
|
|
|
911
921
|
}, I1 = {
|
|
912
922
|
check: (n) => !0,
|
|
913
923
|
interpolate: (n, e) => e
|
|
914
|
-
},
|
|
924
|
+
}, k1 = {
|
|
915
925
|
check: (n) => typeof n == "number",
|
|
916
926
|
interpolate: (n, e, t) => n + (e - n) * t
|
|
917
927
|
}, ft = [
|
|
918
|
-
|
|
928
|
+
k1,
|
|
919
929
|
S1,
|
|
920
930
|
I1
|
|
921
931
|
];
|
|
922
|
-
function
|
|
932
|
+
function _1(n, e, t, o = null) {
|
|
923
933
|
if (t === 0)
|
|
924
934
|
return n;
|
|
925
935
|
if (t === 1)
|
|
@@ -961,7 +971,7 @@ function gt(n, e, t = null) {
|
|
|
961
971
|
);
|
|
962
972
|
n.set(a.object, {
|
|
963
973
|
...s,
|
|
964
|
-
...
|
|
974
|
+
..._1(
|
|
965
975
|
s,
|
|
966
976
|
a.props,
|
|
967
977
|
a.easing(h),
|
|
@@ -1015,7 +1025,7 @@ function O1({
|
|
|
1015
1025
|
}
|
|
1016
1026
|
return o;
|
|
1017
1027
|
}
|
|
1018
|
-
function
|
|
1028
|
+
function R1(n) {
|
|
1019
1029
|
const e = {};
|
|
1020
1030
|
function t(o) {
|
|
1021
1031
|
if (o.objectType === j.SVG) {
|
|
@@ -1031,7 +1041,7 @@ function F1(n) {
|
|
|
1031
1041
|
t(i);
|
|
1032
1042
|
return e;
|
|
1033
1043
|
}
|
|
1034
|
-
function
|
|
1044
|
+
function F1(n) {
|
|
1035
1045
|
var o;
|
|
1036
1046
|
const { slides: e } = n, t = {
|
|
1037
1047
|
// First build of first slide
|
|
@@ -1071,7 +1081,7 @@ function N0(n, e, t, o) {
|
|
|
1071
1081
|
n[e] = { slideIndex: t, buildIndex: o };
|
|
1072
1082
|
}
|
|
1073
1083
|
function N1(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigator: s }) {
|
|
1074
|
-
t.shortcuts =
|
|
1084
|
+
t.shortcuts = F1(n), e.addEventListener("mousemove", () => {
|
|
1075
1085
|
e.style.cursor = "auto";
|
|
1076
1086
|
}), e.addEventListener("keyup", (r) => {
|
|
1077
1087
|
if (r.code === "Escape") {
|
|
@@ -1173,23 +1183,23 @@ function z1(n) {
|
|
|
1173
1183
|
};
|
|
1174
1184
|
}
|
|
1175
1185
|
function U1(n) {
|
|
1176
|
-
const { drawn: e, startX: t, startY: o, endX: i, endY: a, arrowheadSize: s, isArrowheadFilled: r, isDrawnFromCenter: h } = n, c = { x: t, y: o }, f = { x: i, y: a }, x = Math.atan2(f.y - c.y, f.x - c.x), l = { x: c.x + (f.x - c.x) / 2, y: c.y + (f.y - c.y) / 2 }, u = f.x - c.x,
|
|
1177
|
-
x: S.x -
|
|
1178
|
-
y: S.y -
|
|
1186
|
+
const { drawn: e, startX: t, startY: o, endX: i, endY: a, arrowheadSize: s, isArrowheadFilled: r, isDrawnFromCenter: h } = n, c = { x: t, y: o }, f = { x: i, y: a }, x = Math.atan2(f.y - c.y, f.x - c.x), l = { x: c.x + (f.x - c.x) / 2, y: c.y + (f.y - c.y) / 2 }, u = f.x - c.x, b = f.y - c.y, M = Math.hypot(u, b) * e, P = Math.cos(x), E = Math.sin(x), L = h ? { x: l.x - P * M / 2, y: l.y - E * M / 2 } : c, S = h ? { x: l.x + P * M / 2, y: l.y + E * M / 2 } : { x: c.x + P * M, y: c.y + E * M }, C = r ? Math.PI / 6 : Math.PI / 4.5, R = M < s * 2 ? M / 2 : s, z = {
|
|
1187
|
+
x: S.x - R * Math.cos(x - C),
|
|
1188
|
+
y: S.y - R * Math.sin(x - C)
|
|
1189
|
+
}, W = {
|
|
1190
|
+
x: S.x - R * Math.cos(x + C),
|
|
1191
|
+
y: S.y - R * Math.sin(x + C)
|
|
1192
|
+
}, U = {
|
|
1193
|
+
x: L.x + R * Math.cos(x - C),
|
|
1194
|
+
y: L.y + R * Math.sin(x - C)
|
|
1179
1195
|
}, X = {
|
|
1180
|
-
x:
|
|
1181
|
-
y:
|
|
1182
|
-
}, z = {
|
|
1183
|
-
x: L.x + F * Math.cos(x - P),
|
|
1184
|
-
y: L.y + F * Math.sin(x - P)
|
|
1185
|
-
}, G = {
|
|
1186
|
-
x: L.x + F * Math.cos(x + P),
|
|
1187
|
-
y: L.y + F * Math.sin(x + P)
|
|
1196
|
+
x: L.x + R * Math.cos(x + C),
|
|
1197
|
+
y: L.y + R * Math.sin(x + C)
|
|
1188
1198
|
};
|
|
1189
1199
|
return {
|
|
1190
1200
|
arrowPoints: [L, S],
|
|
1191
|
-
arrowheadPoints: [
|
|
1192
|
-
doubledArrowheadPoints: [
|
|
1201
|
+
arrowheadPoints: [z, S, W],
|
|
1202
|
+
doubledArrowheadPoints: [U, L, X]
|
|
1193
1203
|
};
|
|
1194
1204
|
}
|
|
1195
1205
|
function y0({
|
|
@@ -1261,7 +1271,7 @@ function q0(n, e) {
|
|
|
1261
1271
|
}
|
|
1262
1272
|
return { path: t, length: i };
|
|
1263
1273
|
}
|
|
1264
|
-
const
|
|
1274
|
+
const Y1 = ({
|
|
1265
1275
|
ctx: n,
|
|
1266
1276
|
object: e,
|
|
1267
1277
|
opacity: t,
|
|
@@ -1307,20 +1317,20 @@ const H1 = ({
|
|
|
1307
1317
|
});
|
|
1308
1318
|
}
|
|
1309
1319
|
};
|
|
1310
|
-
function
|
|
1320
|
+
function X1(n, e) {
|
|
1311
1321
|
const t = n.radius - n.borderWidth / 2;
|
|
1312
1322
|
if (t <= 0)
|
|
1313
1323
|
return;
|
|
1314
1324
|
const o = e(), i = -Math.PI / 2;
|
|
1315
1325
|
return o.path.arc(n.x, n.y, t, i, i + 2 * Math.PI), o;
|
|
1316
1326
|
}
|
|
1317
|
-
function
|
|
1327
|
+
function H1(n, e) {
|
|
1318
1328
|
const t = e(), o = -Math.PI / 2;
|
|
1319
1329
|
t.path.arc(n.x, n.y, n.radius, o, o + 2 * Math.PI);
|
|
1320
1330
|
const i = 2 * Math.PI * n.radius;
|
|
1321
1331
|
return { path: t, length: i };
|
|
1322
1332
|
}
|
|
1323
|
-
function
|
|
1333
|
+
function Rt(n, e) {
|
|
1324
1334
|
switch (n.type) {
|
|
1325
1335
|
case V.Browser:
|
|
1326
1336
|
e.type === f0.Browser ? n.context.clip(e.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
|
|
@@ -1332,7 +1342,7 @@ function Ft(n, e) {
|
|
|
1332
1342
|
r0(n);
|
|
1333
1343
|
}
|
|
1334
1344
|
}
|
|
1335
|
-
const
|
|
1345
|
+
const $1 = ({
|
|
1336
1346
|
ctx: n,
|
|
1337
1347
|
object: e,
|
|
1338
1348
|
opacity: t,
|
|
@@ -1341,10 +1351,10 @@ const W1 = ({
|
|
|
1341
1351
|
const i = e.opacity * t;
|
|
1342
1352
|
if (i === 0 || e.drawn === 0 && e.fill.alpha === 0)
|
|
1343
1353
|
return;
|
|
1344
|
-
const { path: a, length: s } =
|
|
1354
|
+
const { path: a, length: s } = H1(e, o);
|
|
1345
1355
|
if (i < 1 && e.borderWidth > 0) {
|
|
1346
|
-
const r =
|
|
1347
|
-
r !== void 0 && (n.context.save(),
|
|
1356
|
+
const r = X1(e, o);
|
|
1357
|
+
r !== void 0 && (n.context.save(), Rt(n, r), v0({ ctx: n, path: a, color: e.fill, opacity: i }), n.context.restore());
|
|
1348
1358
|
} else
|
|
1349
1359
|
v0({ ctx: n, path: a, color: e.fill, opacity: i });
|
|
1350
1360
|
y0({
|
|
@@ -1357,17 +1367,17 @@ const W1 = ({
|
|
|
1357
1367
|
width: e.borderWidth
|
|
1358
1368
|
});
|
|
1359
1369
|
};
|
|
1360
|
-
function
|
|
1370
|
+
function H(n = null) {
|
|
1361
1371
|
return {
|
|
1362
1372
|
x: 0,
|
|
1363
1373
|
y: 0,
|
|
1364
1374
|
...n
|
|
1365
1375
|
};
|
|
1366
1376
|
}
|
|
1367
|
-
const
|
|
1377
|
+
const G1 = H();
|
|
1368
1378
|
function l0(n = null) {
|
|
1369
1379
|
return {
|
|
1370
|
-
origin:
|
|
1380
|
+
origin: G1,
|
|
1371
1381
|
size: L1,
|
|
1372
1382
|
...n
|
|
1373
1383
|
};
|
|
@@ -1378,72 +1388,79 @@ function g0(n, e, t) {
|
|
|
1378
1388
|
switch (e) {
|
|
1379
1389
|
case n0.TOP_LEFT:
|
|
1380
1390
|
return l0({
|
|
1381
|
-
origin:
|
|
1391
|
+
origin: H({ x: o, y: i }),
|
|
1382
1392
|
size: t
|
|
1383
1393
|
});
|
|
1384
1394
|
case n0.TOP:
|
|
1385
1395
|
return l0({
|
|
1386
|
-
origin:
|
|
1396
|
+
origin: H({ x: o - a / 2, y: i }),
|
|
1387
1397
|
size: t
|
|
1388
1398
|
});
|
|
1389
1399
|
case n0.TOP_RIGHT:
|
|
1390
1400
|
return l0({
|
|
1391
|
-
origin:
|
|
1401
|
+
origin: H({ x: o - a, y: i }),
|
|
1392
1402
|
size: t
|
|
1393
1403
|
});
|
|
1394
1404
|
case n0.LEFT:
|
|
1395
1405
|
return l0({
|
|
1396
|
-
origin:
|
|
1406
|
+
origin: H({ x: o, y: i - s / 2 }),
|
|
1397
1407
|
size: t
|
|
1398
1408
|
});
|
|
1399
1409
|
case n0.CENTER:
|
|
1400
1410
|
return l0({
|
|
1401
|
-
origin:
|
|
1411
|
+
origin: H({ x: o - a / 2, y: i - s / 2 }),
|
|
1402
1412
|
size: t
|
|
1403
1413
|
});
|
|
1404
1414
|
case n0.RIGHT:
|
|
1405
1415
|
return l0({
|
|
1406
|
-
origin:
|
|
1416
|
+
origin: H({ x: o - a, y: i - s / 2 }),
|
|
1407
1417
|
size: t
|
|
1408
1418
|
});
|
|
1409
1419
|
case n0.BOTTOM_LEFT:
|
|
1410
1420
|
return l0({
|
|
1411
|
-
origin:
|
|
1421
|
+
origin: H({ x: o, y: i - s }),
|
|
1412
1422
|
size: t
|
|
1413
1423
|
});
|
|
1414
1424
|
case n0.BOTTOM:
|
|
1415
1425
|
return l0({
|
|
1416
|
-
origin:
|
|
1426
|
+
origin: H({ x: o - a / 2, y: i - s }),
|
|
1417
1427
|
size: t
|
|
1418
1428
|
});
|
|
1419
1429
|
case n0.BOTTOM_RIGHT:
|
|
1420
1430
|
return l0({
|
|
1421
|
-
origin:
|
|
1431
|
+
origin: H({ x: o - a, y: i - s }),
|
|
1422
1432
|
size: t
|
|
1423
1433
|
});
|
|
1424
1434
|
default:
|
|
1425
1435
|
r0(e);
|
|
1426
1436
|
}
|
|
1427
1437
|
}
|
|
1428
|
-
const
|
|
1438
|
+
const W1 = ({
|
|
1429
1439
|
ctx: n,
|
|
1430
1440
|
object: e,
|
|
1431
1441
|
renderObject: t,
|
|
1432
1442
|
opacity: o
|
|
1433
1443
|
}) => {
|
|
1434
|
-
const i = g0(
|
|
1435
|
-
|
|
1444
|
+
const i = e.scale * e.scaleX, a = e.scale * e.scaleY, s = g0(
|
|
1445
|
+
H({ x: e.x, y: e.y }),
|
|
1436
1446
|
e.anchor,
|
|
1437
1447
|
i0({
|
|
1438
|
-
width: e.width *
|
|
1439
|
-
height: e.height *
|
|
1448
|
+
width: e.width * Math.abs(i),
|
|
1449
|
+
height: e.height * Math.abs(a)
|
|
1440
1450
|
})
|
|
1441
|
-
), { rotation:
|
|
1442
|
-
if (
|
|
1443
|
-
n.context.translate(
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1451
|
+
), { rotation: r, rotateOriginX: h, rotateOriginY: c, skewOriginX: f, skewOriginY: x, skewX: l, skewY: u } = e;
|
|
1452
|
+
if (!(i === 0 || a === 0)) {
|
|
1453
|
+
n.context.save(), n.context.translate(s.origin.x, s.origin.y), n.context.scale(i, a), n.context.translate(h, c), n.context.rotate(r * Math.PI / 180), n.context.translate(-h, -c), n.context.translate(f, x), n.context.transform(
|
|
1454
|
+
1,
|
|
1455
|
+
Math.tan(u * Math.PI / 180),
|
|
1456
|
+
Math.tan(l * Math.PI / 180),
|
|
1457
|
+
1,
|
|
1458
|
+
0,
|
|
1459
|
+
0
|
|
1460
|
+
), n.context.translate(-f, -x);
|
|
1461
|
+
for (const b of e.objects)
|
|
1462
|
+
t(b, o * e.opacity);
|
|
1463
|
+
e.previewColor !== null && (n.context.fillStyle = E0(e.previewColor), n.context.fillRect(0, 0, e.width, e.height)), e.rotateOriginPreviewSize > 0 && (n.context.fillStyle = "red", n.context.beginPath(), n.context.arc(h, c, e.rotateOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), e.skewOriginPreviewSize > 0 && (n.context.fillStyle = "blue", n.context.beginPath(), n.context.arc(f, x, e.skewOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), n.context.restore();
|
|
1447
1464
|
}
|
|
1448
1465
|
};
|
|
1449
1466
|
function rt(n, e, t, o, i = 0) {
|
|
@@ -1481,7 +1498,7 @@ const S0 = {
|
|
|
1481
1498
|
createPath2D: i
|
|
1482
1499
|
}) => {
|
|
1483
1500
|
const a = g0(
|
|
1484
|
-
|
|
1501
|
+
H({ x: t.x, y: t.y }),
|
|
1485
1502
|
t.anchor,
|
|
1486
1503
|
i0({ width: t.width, height: t.height })
|
|
1487
1504
|
), s = e[t.imageId];
|
|
@@ -1564,11 +1581,11 @@ const K1 = ({
|
|
|
1564
1581
|
}) => {
|
|
1565
1582
|
n.context.save();
|
|
1566
1583
|
const i = g0(
|
|
1567
|
-
|
|
1584
|
+
H({ x: e.x, y: e.y }),
|
|
1568
1585
|
e.anchor,
|
|
1569
1586
|
i0({ width: e.width, height: e.height })
|
|
1570
1587
|
);
|
|
1571
|
-
e.preview && (n.context.lineWidth = 4, n.context.strokeStyle = E0(
|
|
1588
|
+
e.preview && (n.context.lineWidth = 4, n.context.strokeStyle = E0($.RED), n.context.rect(i.origin.x, i.origin.y, i.size.width, i.size.height), n.context.stroke()), n.context.beginPath(), n.context.rect(i.origin.x, i.origin.y, i.size.width, i.size.height), n.context.closePath(), n.context.clip();
|
|
1572
1589
|
for (const a of e.objects)
|
|
1573
1590
|
o(a, t * e.opacity);
|
|
1574
1591
|
n.context.restore();
|
|
@@ -1582,7 +1599,7 @@ const K1 = ({
|
|
|
1582
1599
|
if (i === 0 || e.drawn === 0 && e.fill.alpha === 0)
|
|
1583
1600
|
return;
|
|
1584
1601
|
const { origin: a } = g0(
|
|
1585
|
-
|
|
1602
|
+
H({ x: e.x, y: e.y }),
|
|
1586
1603
|
e.anchor,
|
|
1587
1604
|
i0({ width: e.width, height: e.height })
|
|
1588
1605
|
), s = o(e.path);
|
|
@@ -1650,13 +1667,13 @@ const ee = ({
|
|
|
1650
1667
|
};
|
|
1651
1668
|
function ne(n, e) {
|
|
1652
1669
|
const t = n.borderWidth / 2, { origin: o, size: i } = g0(
|
|
1653
|
-
|
|
1670
|
+
H({ x: n.x, y: n.y }),
|
|
1654
1671
|
n.anchor,
|
|
1655
1672
|
i0({ width: n.width, height: n.height })
|
|
1656
1673
|
), a = i.width - n.borderWidth, s = i.height - n.borderWidth;
|
|
1657
1674
|
if (a <= 0 || s <= 0)
|
|
1658
1675
|
return;
|
|
1659
|
-
const r =
|
|
1676
|
+
const r = H({ x: o.x + t, y: o.y + t }), h = i0({ width: a, height: s }), c = Math.max(
|
|
1660
1677
|
0,
|
|
1661
1678
|
Math.min(n.rounding - t, Math.min(a, s) / 2)
|
|
1662
1679
|
);
|
|
@@ -1667,7 +1684,7 @@ function ne(n, e) {
|
|
|
1667
1684
|
}
|
|
1668
1685
|
function re(n, e) {
|
|
1669
1686
|
const { origin: t, size: o } = g0(
|
|
1670
|
-
|
|
1687
|
+
H({ x: n.x, y: n.y }),
|
|
1671
1688
|
n.anchor,
|
|
1672
1689
|
i0({ width: n.width, height: n.height })
|
|
1673
1690
|
), i = Math.max(0, Math.min(n.rounding, Math.min(o.width, o.height) / 2)), a = Math.min(n.borderWidth * 2, o.width - i);
|
|
@@ -1692,7 +1709,7 @@ const ie = ({
|
|
|
1692
1709
|
const { path: a, length: s } = re(e, o);
|
|
1693
1710
|
if (i < 1 && e.borderWidth > 0) {
|
|
1694
1711
|
const r = ne(e, o);
|
|
1695
|
-
r !== void 0 && (n.context.save(),
|
|
1712
|
+
r !== void 0 && (n.context.save(), Rt(n, r), v0({ ctx: n, path: a, color: e.fill, opacity: i }), n.context.restore());
|
|
1696
1713
|
} else
|
|
1697
1714
|
v0({ ctx: n, path: a, color: e.fill, opacity: i });
|
|
1698
1715
|
y0({
|
|
@@ -1717,7 +1734,7 @@ const ie = ({
|
|
|
1717
1734
|
if (a === void 0)
|
|
1718
1735
|
return;
|
|
1719
1736
|
const s = g0(
|
|
1720
|
-
|
|
1737
|
+
H({ x: t.x, y: t.y }),
|
|
1721
1738
|
t.anchor,
|
|
1722
1739
|
i0({ width: t.width, height: t.height })
|
|
1723
1740
|
);
|
|
@@ -1776,7 +1793,7 @@ function he(n) {
|
|
|
1776
1793
|
height: n.fontBoundingBoxAscent
|
|
1777
1794
|
};
|
|
1778
1795
|
}
|
|
1779
|
-
function
|
|
1796
|
+
function Ft(n, e, t = 1) {
|
|
1780
1797
|
n.context.fillStyle = nt(e.color, t), n.context.font = `${e.fontStyle} ${e.fontWeight} ${e.fontSize}px ${e.fontFamily}`, n.type === V.Browser ? n.context.textRendering = e.ligatures ? "optimizeLegibility" : "optimizeSpeed" : n.context.fontVariant = e.ligatures ? "common-ligatures" : "no-common-ligatures";
|
|
1781
1798
|
}
|
|
1782
1799
|
function le(n, e, t) {
|
|
@@ -1785,7 +1802,7 @@ function le(n, e, t) {
|
|
|
1785
1802
|
const a = [];
|
|
1786
1803
|
for (const s of i) {
|
|
1787
1804
|
const { text: r, ...h } = s, c = { ...e, ...h };
|
|
1788
|
-
|
|
1805
|
+
Ft(t, c);
|
|
1789
1806
|
const f = t.context.measureText(r);
|
|
1790
1807
|
a.push(he(f));
|
|
1791
1808
|
}
|
|
@@ -1797,24 +1814,24 @@ const ce = ({ ctx: n, object: e, opacity: t }) => {
|
|
|
1797
1814
|
const o = e.opacity * t;
|
|
1798
1815
|
if (o === 0)
|
|
1799
1816
|
return;
|
|
1800
|
-
const { length: i } = e, a =
|
|
1817
|
+
const { length: i } = e, a = _t(e.text), s = se(e), r = le(a, s, n), h = ae(r, e.lineSpacing), c = g0(H({ x: e.x, y: e.y }), e.anchor, h);
|
|
1801
1818
|
let f = c.origin.x, x = c.origin.y, l = 0, u = 0;
|
|
1802
|
-
for (let
|
|
1803
|
-
const y = a[
|
|
1819
|
+
for (let b = 0; b < a.length; b++) {
|
|
1820
|
+
const y = a[b], M = r[b];
|
|
1804
1821
|
if (y == null || M == null) {
|
|
1805
1822
|
console.error("Could not determine text units or sizes for line");
|
|
1806
1823
|
continue;
|
|
1807
1824
|
}
|
|
1808
|
-
const
|
|
1825
|
+
const P = M.reduce((L, S) => L + S.width, 0), E = M.length === 0 ? u : M.reduce((L, S) => Math.max(L, S.height), 0);
|
|
1809
1826
|
switch (e.alignment) {
|
|
1810
1827
|
case x0.LEFT:
|
|
1811
1828
|
f = c.origin.x;
|
|
1812
1829
|
break;
|
|
1813
1830
|
case x0.CENTER:
|
|
1814
|
-
f = c.origin.x + (c.size.width -
|
|
1831
|
+
f = c.origin.x + (c.size.width - P) / 2;
|
|
1815
1832
|
break;
|
|
1816
1833
|
case x0.RIGHT:
|
|
1817
|
-
f = c.origin.x + (c.size.width -
|
|
1834
|
+
f = c.origin.x + (c.size.width - P);
|
|
1818
1835
|
break;
|
|
1819
1836
|
default:
|
|
1820
1837
|
r0(e.alignment);
|
|
@@ -1822,27 +1839,27 @@ const ce = ({ ctx: n, object: e, opacity: t }) => {
|
|
|
1822
1839
|
}
|
|
1823
1840
|
x += E + u * (e.lineSpacing - 1), u = E;
|
|
1824
1841
|
for (let L = 0; L < y.length && !(i !== null && l >= i); L++) {
|
|
1825
|
-
const S = y[L],
|
|
1826
|
-
if (S == null ||
|
|
1842
|
+
const S = y[L], C = M[L];
|
|
1843
|
+
if (S == null || C == null) {
|
|
1827
1844
|
console.error("Could not determine text unit or size for unit");
|
|
1828
1845
|
continue;
|
|
1829
1846
|
}
|
|
1830
|
-
const { text:
|
|
1831
|
-
let
|
|
1832
|
-
if (i !== null && l +
|
|
1847
|
+
const { text: R, ...z } = S;
|
|
1848
|
+
let W;
|
|
1849
|
+
if (i !== null && l + R.length > i) {
|
|
1833
1850
|
const a0 = i - l;
|
|
1834
|
-
|
|
1851
|
+
W = R.slice(0, a0);
|
|
1835
1852
|
}
|
|
1836
|
-
const
|
|
1837
|
-
l +=
|
|
1838
|
-
const
|
|
1839
|
-
|
|
1853
|
+
const U = W ?? R;
|
|
1854
|
+
l += U.length;
|
|
1855
|
+
const X = { ...s, ...z };
|
|
1856
|
+
Ft(n, X, o), n.context.fillText(U, f, x), f += C.width;
|
|
1840
1857
|
}
|
|
1841
1858
|
}
|
|
1842
1859
|
}, ue = {
|
|
1843
|
-
[j.ARROW]:
|
|
1844
|
-
[j.CIRCLE]:
|
|
1845
|
-
[j.GROUP]:
|
|
1860
|
+
[j.ARROW]: Y1,
|
|
1861
|
+
[j.CIRCLE]: $1,
|
|
1862
|
+
[j.GROUP]: W1,
|
|
1846
1863
|
[j.IMAGE]: Z1,
|
|
1847
1864
|
[j.LINE]: K1,
|
|
1848
1865
|
[j.MASK]: Q1,
|
|
@@ -1862,7 +1879,7 @@ function ge(n, e) {
|
|
|
1862
1879
|
if (n === null)
|
|
1863
1880
|
return null;
|
|
1864
1881
|
const t = g0(
|
|
1865
|
-
|
|
1882
|
+
H({ x: e.x, y: e.y }),
|
|
1866
1883
|
e.anchor,
|
|
1867
1884
|
i0({ width: e.width, height: e.height })
|
|
1868
1885
|
), o = document.createElementNS("http://www.w3.org/2000/svg", "foreignObject");
|
|
@@ -1902,9 +1919,9 @@ async function pe(n) {
|
|
|
1902
1919
|
}
|
|
1903
1920
|
return e;
|
|
1904
1921
|
}
|
|
1905
|
-
class
|
|
1922
|
+
class Cn {
|
|
1906
1923
|
constructor(e) {
|
|
1907
|
-
const { objectRenderers: t,
|
|
1924
|
+
const { objectRenderers: t, scale: o = 1, ...i } = e;
|
|
1908
1925
|
this.props = {
|
|
1909
1926
|
presentation: T1(),
|
|
1910
1927
|
element: document.body,
|
|
@@ -1913,81 +1930,88 @@ class Pn {
|
|
|
1913
1930
|
...t
|
|
1914
1931
|
},
|
|
1915
1932
|
cacheDurationMinutes: 15,
|
|
1916
|
-
|
|
1933
|
+
scale: de(o),
|
|
1934
|
+
...i
|
|
1917
1935
|
}, this.state = { ...pt };
|
|
1918
1936
|
}
|
|
1919
1937
|
/** Starts the presentation. */
|
|
1920
1938
|
async present() {
|
|
1921
|
-
const { presentation: e, element: t } = this.props,
|
|
1922
|
-
this.state = {
|
|
1939
|
+
const { presentation: e, element: t, scale: o } = this.props, i = j1(e.size), a = fe(e.size);
|
|
1940
|
+
a.style.transformOrigin = "center center", a.style.transform = `scale(${o})`, this.state = {
|
|
1923
1941
|
...pt,
|
|
1924
1942
|
imageById: await pe({
|
|
1925
1943
|
...e.resources.images,
|
|
1926
|
-
...
|
|
1944
|
+
...R1(e)
|
|
1927
1945
|
}),
|
|
1928
|
-
canvas:
|
|
1929
|
-
extrasContainer:
|
|
1946
|
+
canvas: i,
|
|
1947
|
+
extrasContainer: a
|
|
1930
1948
|
};
|
|
1931
|
-
const
|
|
1949
|
+
const s = E1(e, t);
|
|
1932
1950
|
N1(e, t, this.state.shortcutState, {
|
|
1933
|
-
onNext: (
|
|
1934
|
-
onPrevious: (
|
|
1935
|
-
onRenderSlide: (
|
|
1951
|
+
onNext: (h) => this.next(h),
|
|
1952
|
+
onPrevious: (h) => this.previous(h),
|
|
1953
|
+
onRenderSlide: (h, c) => {
|
|
1936
1954
|
this.state.shortcutState.shortcuts.b = {
|
|
1937
1955
|
slideIndex: this.state.slideIndex,
|
|
1938
1956
|
buildIndex: this.state.buildIndex
|
|
1939
|
-
}, this.renderSlide(
|
|
1957
|
+
}, this.renderSlide(h ?? this.state.slideIndex, c);
|
|
1940
1958
|
},
|
|
1941
|
-
onShowNavigator: () =>
|
|
1959
|
+
onShowNavigator: () => b1({
|
|
1942
1960
|
presentation: e,
|
|
1943
|
-
onNavigateToSlide: (
|
|
1961
|
+
onNavigateToSlide: (h) => this.renderSlide(h)
|
|
1944
1962
|
})
|
|
1945
|
-
}), t.replaceChildren(),
|
|
1946
|
-
const
|
|
1947
|
-
|
|
1963
|
+
}), t.replaceChildren(), s.appendChild(i), s.appendChild(a), t.appendChild(s);
|
|
1964
|
+
const r = q1(e, this.props.cacheDurationMinutes);
|
|
1965
|
+
r !== null ? this.renderSlide(r.slideIndex, r.buildIndex) : this.renderSlide(0);
|
|
1948
1966
|
}
|
|
1949
1967
|
renderSlide(e, t = 0, o = null) {
|
|
1950
|
-
const { objectRenderers: i, presentation: a } = this.props, { canvas:
|
|
1968
|
+
const { objectRenderers: i, presentation: a, scale: s } = this.props, { canvas: r, imageById: h } = this.state, c = this.state.slideIndex !== e;
|
|
1951
1969
|
this.state.slideIndex = e, this.state.buildIndex = t, o === null && B1({ title: a.title, slideIndex: e, buildIndex: t });
|
|
1952
|
-
const
|
|
1953
|
-
if (
|
|
1970
|
+
const f = a.slides[e];
|
|
1971
|
+
if (f === void 0 || r === null)
|
|
1954
1972
|
return;
|
|
1955
|
-
if (
|
|
1956
|
-
for (const
|
|
1957
|
-
|
|
1973
|
+
if (c || this.state.mountedExtrasCleanups.length === 0 && f.extras.length > 0) {
|
|
1974
|
+
for (const M of this.state.mountedExtrasCleanups)
|
|
1975
|
+
M();
|
|
1958
1976
|
this.state.mountedExtrasCleanups = [];
|
|
1959
|
-
for (const
|
|
1960
|
-
const
|
|
1961
|
-
|
|
1977
|
+
for (const M of f.extras) {
|
|
1978
|
+
const P = ge(this.state.extrasContainer, M);
|
|
1979
|
+
P !== null && this.state.mountedExtrasCleanups.push(P);
|
|
1962
1980
|
}
|
|
1963
1981
|
}
|
|
1964
|
-
const
|
|
1965
|
-
if (
|
|
1982
|
+
const x = r.getContext("2d");
|
|
1983
|
+
if (x === null)
|
|
1966
1984
|
return;
|
|
1967
|
-
const
|
|
1985
|
+
const l = {
|
|
1968
1986
|
type: V.Browser,
|
|
1969
|
-
context:
|
|
1987
|
+
context: x
|
|
1970
1988
|
};
|
|
1971
|
-
D1(
|
|
1972
|
-
const
|
|
1973
|
-
slide:
|
|
1989
|
+
D1(r, l);
|
|
1990
|
+
const u = O1({
|
|
1991
|
+
slide: f,
|
|
1974
1992
|
buildIndex: t,
|
|
1975
1993
|
buildTime: o
|
|
1976
1994
|
});
|
|
1977
|
-
|
|
1978
|
-
function
|
|
1979
|
-
const
|
|
1980
|
-
|
|
1981
|
-
ctx:
|
|
1982
|
-
imageById:
|
|
1983
|
-
object:
|
|
1984
|
-
opacity:
|
|
1985
|
-
renderObject:
|
|
1995
|
+
l.context.fillStyle = nt(a.backgroundColor), l.context.fillRect(0, 0, r.width, r.height);
|
|
1996
|
+
function b(M, P) {
|
|
1997
|
+
const E = i[M.objectType], L = u.get(M);
|
|
1998
|
+
E === void 0 || L === void 0 || E({
|
|
1999
|
+
ctx: l,
|
|
2000
|
+
imageById: h,
|
|
2001
|
+
object: L,
|
|
2002
|
+
opacity: P,
|
|
2003
|
+
renderObject: b,
|
|
1986
2004
|
createPath2D: z1
|
|
1987
2005
|
});
|
|
1988
2006
|
}
|
|
1989
|
-
|
|
1990
|
-
|
|
2007
|
+
const y = s !== 1;
|
|
2008
|
+
y && (l.context.save(), l.context.translate(
|
|
2009
|
+
r.width * (1 - s) / 2,
|
|
2010
|
+
r.height * (1 - s) / 2
|
|
2011
|
+
), l.context.scale(s, s));
|
|
2012
|
+
for (const M of f.objects)
|
|
2013
|
+
b(M, 1);
|
|
2014
|
+
y && l.context.restore();
|
|
1991
2015
|
}
|
|
1992
2016
|
next(e = !1) {
|
|
1993
2017
|
const { presentation: t } = this.props, { currentAnimationId: o, slideIndex: i, buildIndex: a } = this.state;
|
|
@@ -2015,7 +2039,12 @@ class Pn {
|
|
|
2015
2039
|
this.renderSlide(0, 0);
|
|
2016
2040
|
}
|
|
2017
2041
|
}
|
|
2018
|
-
function
|
|
2042
|
+
function de(n) {
|
|
2043
|
+
return n <= 0 || n > 1 ? (console.warn(
|
|
2044
|
+
`BrowserCanvasRenderer scale must be positive and no greater than 1. Received ${n}; using 1 instead.`
|
|
2045
|
+
), 1) : n;
|
|
2046
|
+
}
|
|
2047
|
+
function En(n = 1e3) {
|
|
2019
2048
|
return {
|
|
2020
2049
|
type: u0.PAUSE,
|
|
2021
2050
|
isKey: !1,
|
|
@@ -2023,7 +2052,7 @@ function Cn(n = 1e3) {
|
|
|
2023
2052
|
shortcut: null
|
|
2024
2053
|
};
|
|
2025
2054
|
}
|
|
2026
|
-
function
|
|
2055
|
+
function Sn(n = null) {
|
|
2027
2056
|
return {
|
|
2028
2057
|
objects: [],
|
|
2029
2058
|
animations: [],
|
|
@@ -2036,30 +2065,30 @@ function En(n = null) {
|
|
|
2036
2065
|
...n
|
|
2037
2066
|
};
|
|
2038
2067
|
}
|
|
2039
|
-
function
|
|
2068
|
+
function In(n, e = {}) {
|
|
2040
2069
|
return {
|
|
2041
2070
|
...e,
|
|
2042
2071
|
text: n
|
|
2043
2072
|
};
|
|
2044
2073
|
}
|
|
2045
|
-
function
|
|
2074
|
+
function kn(n = $.BLACK) {
|
|
2046
2075
|
return { ...n, alpha: 1 };
|
|
2047
2076
|
}
|
|
2048
|
-
function
|
|
2077
|
+
function xe(n) {
|
|
2049
2078
|
for (var e = -1, t = n.length, o, i = n[t - 1], a = 0; ++e < t; )
|
|
2050
2079
|
o = i, i = n[e], a += o[1] * i[0] - o[0] * i[1];
|
|
2051
2080
|
return a / 2;
|
|
2052
2081
|
}
|
|
2053
|
-
function
|
|
2082
|
+
function ye(n) {
|
|
2054
2083
|
for (var e = -1, t = n.length, o = n[t - 1], i, a, s = o[0], r = o[1], h = 0; ++e < t; )
|
|
2055
2084
|
i = s, a = r, o = n[e], s = o[0], r = o[1], i -= s, a -= r, h += Math.sqrt(i * i + a * a);
|
|
2056
2085
|
return h;
|
|
2057
2086
|
}
|
|
2058
|
-
function
|
|
2087
|
+
function ve(n) {
|
|
2059
2088
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
2060
2089
|
}
|
|
2061
2090
|
var B0, dt;
|
|
2062
|
-
function
|
|
2091
|
+
function we() {
|
|
2063
2092
|
if (dt) return B0;
|
|
2064
2093
|
dt = 1;
|
|
2065
2094
|
var n = { a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0 }, e = [
|
|
@@ -2123,47 +2152,47 @@ function ve() {
|
|
|
2123
2152
|
u.index++;
|
|
2124
2153
|
}
|
|
2125
2154
|
function c(u) {
|
|
2126
|
-
var
|
|
2127
|
-
if (
|
|
2155
|
+
var b = u.path.charCodeAt(u.index);
|
|
2156
|
+
if (b === 48) {
|
|
2128
2157
|
u.param = 0, u.index++;
|
|
2129
2158
|
return;
|
|
2130
2159
|
}
|
|
2131
|
-
if (
|
|
2160
|
+
if (b === 49) {
|
|
2132
2161
|
u.param = 1, u.index++;
|
|
2133
2162
|
return;
|
|
2134
2163
|
}
|
|
2135
2164
|
u.err = "SvgPath: arc flag can be 0 or 1 only (at pos " + u.index + ")";
|
|
2136
2165
|
}
|
|
2137
2166
|
function f(u) {
|
|
2138
|
-
var
|
|
2167
|
+
var b = u.index, y = b, M = u.max, P = !1, E = !1, L = !1, S = !1, C;
|
|
2139
2168
|
if (y >= M) {
|
|
2140
2169
|
u.err = "SvgPath: missed param (at pos " + y + ")";
|
|
2141
2170
|
return;
|
|
2142
2171
|
}
|
|
2143
|
-
if (
|
|
2172
|
+
if (C = u.path.charCodeAt(y), (C === 43 || C === 45) && (y++, C = y < M ? u.path.charCodeAt(y) : 0), !a(C) && C !== 46) {
|
|
2144
2173
|
u.err = "SvgPath: param should start with 0..9 or `.` (at pos " + y + ")";
|
|
2145
2174
|
return;
|
|
2146
2175
|
}
|
|
2147
|
-
if (
|
|
2148
|
-
if (
|
|
2149
|
-
u.err = "SvgPath: numbers started with `0` such as `09` are illegal (at pos " +
|
|
2176
|
+
if (C !== 46) {
|
|
2177
|
+
if (P = C === 48, y++, C = y < M ? u.path.charCodeAt(y) : 0, P && y < M && C && a(C)) {
|
|
2178
|
+
u.err = "SvgPath: numbers started with `0` such as `09` are illegal (at pos " + b + ")";
|
|
2150
2179
|
return;
|
|
2151
2180
|
}
|
|
2152
2181
|
for (; y < M && a(u.path.charCodeAt(y)); )
|
|
2153
2182
|
y++, E = !0;
|
|
2154
|
-
|
|
2183
|
+
C = y < M ? u.path.charCodeAt(y) : 0;
|
|
2155
2184
|
}
|
|
2156
|
-
if (
|
|
2185
|
+
if (C === 46) {
|
|
2157
2186
|
for (S = !0, y++; a(u.path.charCodeAt(y)); )
|
|
2158
2187
|
y++, L = !0;
|
|
2159
|
-
|
|
2188
|
+
C = y < M ? u.path.charCodeAt(y) : 0;
|
|
2160
2189
|
}
|
|
2161
|
-
if (
|
|
2190
|
+
if (C === 101 || C === 69) {
|
|
2162
2191
|
if (S && !E && !L) {
|
|
2163
2192
|
u.err = "SvgPath: invalid float exponent (at pos " + y + ")";
|
|
2164
2193
|
return;
|
|
2165
2194
|
}
|
|
2166
|
-
if (y++,
|
|
2195
|
+
if (y++, C = y < M ? u.path.charCodeAt(y) : 0, (C === 43 || C === 45) && y++, y < M && a(u.path.charCodeAt(y)))
|
|
2167
2196
|
for (; y < M && a(u.path.charCodeAt(y)); )
|
|
2168
2197
|
y++;
|
|
2169
2198
|
else {
|
|
@@ -2171,20 +2200,20 @@ function ve() {
|
|
|
2171
2200
|
return;
|
|
2172
2201
|
}
|
|
2173
2202
|
}
|
|
2174
|
-
u.index = y, u.param = parseFloat(u.path.slice(
|
|
2203
|
+
u.index = y, u.param = parseFloat(u.path.slice(b, y)) + 0;
|
|
2175
2204
|
}
|
|
2176
2205
|
function x(u) {
|
|
2177
|
-
var
|
|
2178
|
-
|
|
2206
|
+
var b, y;
|
|
2207
|
+
b = u.path[u.segmentStart], y = b.toLowerCase();
|
|
2179
2208
|
var M = u.data;
|
|
2180
|
-
if (y === "m" && M.length > 2 && (u.result.push([
|
|
2181
|
-
u.result.push([
|
|
2209
|
+
if (y === "m" && M.length > 2 && (u.result.push([b, M[0], M[1]]), M = M.slice(2), y = "l", b = b === "m" ? "l" : "L"), y === "r")
|
|
2210
|
+
u.result.push([b].concat(M));
|
|
2182
2211
|
else
|
|
2183
|
-
for (; M.length >= n[y] && (u.result.push([
|
|
2212
|
+
for (; M.length >= n[y] && (u.result.push([b].concat(M.splice(0, n[y]))), !!n[y]); )
|
|
2184
2213
|
;
|
|
2185
2214
|
}
|
|
2186
2215
|
function l(u) {
|
|
2187
|
-
var
|
|
2216
|
+
var b = u.max, y, M, P, E, L;
|
|
2188
2217
|
if (u.segmentStart = u.index, y = u.path.charCodeAt(u.index), M = i(y), !o(y)) {
|
|
2189
2218
|
u.err = "SvgPath: bad command " + u.path[u.index] + " (at pos " + u.index + ")";
|
|
2190
2219
|
return;
|
|
@@ -2193,21 +2222,21 @@ function ve() {
|
|
|
2193
2222
|
x(u);
|
|
2194
2223
|
return;
|
|
2195
2224
|
}
|
|
2196
|
-
for (
|
|
2225
|
+
for (P = !1; ; ) {
|
|
2197
2226
|
for (L = E; L > 0; L--) {
|
|
2198
2227
|
if (M && (L === 3 || L === 4) ? c(u) : f(u), u.err.length) {
|
|
2199
2228
|
x(u);
|
|
2200
2229
|
return;
|
|
2201
2230
|
}
|
|
2202
|
-
u.data.push(u.param), h(u),
|
|
2231
|
+
u.data.push(u.param), h(u), P = !1, u.index < b && u.path.charCodeAt(u.index) === 44 && (u.index++, h(u), P = !0);
|
|
2203
2232
|
}
|
|
2204
|
-
if (!
|
|
2233
|
+
if (!P && (u.index >= u.max || !s(u.path.charCodeAt(u.index))))
|
|
2205
2234
|
break;
|
|
2206
2235
|
}
|
|
2207
2236
|
x(u);
|
|
2208
2237
|
}
|
|
2209
|
-
return B0 = function(
|
|
2210
|
-
var y = new r(
|
|
2238
|
+
return B0 = function(b) {
|
|
2239
|
+
var y = new r(b), M = y.max;
|
|
2211
2240
|
for (h(y); y.index < M && !y.err.length; )
|
|
2212
2241
|
l(y);
|
|
2213
2242
|
return y.result.length && ("mM".indexOf(y.result[0][0]) < 0 ? (y.err = "SvgPath: string should start with `M` or `m`", y.result = []) : y.result[0][0] = "M"), {
|
|
@@ -2267,7 +2296,7 @@ function Nt() {
|
|
|
2267
2296
|
}, D0 = e, D0;
|
|
2268
2297
|
}
|
|
2269
2298
|
var j0, yt;
|
|
2270
|
-
function
|
|
2299
|
+
function me() {
|
|
2271
2300
|
if (yt) return j0;
|
|
2272
2301
|
yt = 1;
|
|
2273
2302
|
var n = Nt(), e = {
|
|
@@ -2313,7 +2342,7 @@ function we() {
|
|
|
2313
2342
|
}, j0;
|
|
2314
2343
|
}
|
|
2315
2344
|
var z0, vt;
|
|
2316
|
-
function
|
|
2345
|
+
function be() {
|
|
2317
2346
|
if (vt) return z0;
|
|
2318
2347
|
vt = 1;
|
|
2319
2348
|
var n = Math.PI * 2;
|
|
@@ -2322,36 +2351,36 @@ function me() {
|
|
|
2322
2351
|
return c > 1 && (c = 1), c < -1 && (c = -1), h * Math.acos(c);
|
|
2323
2352
|
}
|
|
2324
2353
|
function t(i, a, s, r, h, c, f, x, l, u) {
|
|
2325
|
-
var
|
|
2326
|
-
S < 0 && (S = 0), S /= M * L +
|
|
2327
|
-
var
|
|
2328
|
-
return c === 0 && J > 0 && (J -= n), c === 1 && J < 0 && (J += n), [
|
|
2354
|
+
var b = u * (i - s) / 2 + l * (a - r) / 2, y = -l * (i - s) / 2 + u * (a - r) / 2, M = f * f, P = x * x, E = b * b, L = y * y, S = M * P - M * L - P * E;
|
|
2355
|
+
S < 0 && (S = 0), S /= M * L + P * E, S = Math.sqrt(S) * (h === c ? -1 : 1);
|
|
2356
|
+
var C = S * f / x * y, R = S * -x / f * b, z = u * C - l * R + (i + s) / 2, W = l * C + u * R + (a + r) / 2, U = (b - C) / f, X = (y - R) / x, a0 = (-b - C) / f, p0 = (-y - R) / x, c0 = e(1, 0, U, X), J = e(U, X, a0, p0);
|
|
2357
|
+
return c === 0 && J > 0 && (J -= n), c === 1 && J < 0 && (J += n), [z, W, c0, J];
|
|
2329
2358
|
}
|
|
2330
2359
|
function o(i, a) {
|
|
2331
2360
|
var s = 1.3333333333333333 * Math.tan(a / 4), r = Math.cos(i), h = Math.sin(i), c = Math.cos(i + a), f = Math.sin(i + a);
|
|
2332
2361
|
return [r, h, r - h * s, h + r * s, c + f * s, f - c * s, c, f];
|
|
2333
2362
|
}
|
|
2334
2363
|
return z0 = function(a, s, r, h, c, f, x, l, u) {
|
|
2335
|
-
var
|
|
2336
|
-
if (M === 0 &&
|
|
2364
|
+
var b = Math.sin(u * n / 360), y = Math.cos(u * n / 360), M = y * (a - r) / 2 + b * (s - h) / 2, P = -b * (a - r) / 2 + y * (s - h) / 2;
|
|
2365
|
+
if (M === 0 && P === 0)
|
|
2337
2366
|
return [];
|
|
2338
2367
|
if (x === 0 || l === 0)
|
|
2339
2368
|
return [];
|
|
2340
2369
|
x = Math.abs(x), l = Math.abs(l);
|
|
2341
|
-
var E = M * M / (x * x) +
|
|
2370
|
+
var E = M * M / (x * x) + P * P / (l * l);
|
|
2342
2371
|
E > 1 && (x *= Math.sqrt(E), l *= Math.sqrt(E));
|
|
2343
|
-
var L = t(a, s, r, h, c, f, x, l,
|
|
2344
|
-
|
|
2345
|
-
for (var
|
|
2346
|
-
S.push(o(
|
|
2347
|
-
return S.map(function(
|
|
2348
|
-
for (var
|
|
2349
|
-
var a0 =
|
|
2372
|
+
var L = t(a, s, r, h, c, f, x, l, b, y), S = [], C = L[2], R = L[3], z = Math.max(Math.ceil(Math.abs(R) / (n / 4)), 1);
|
|
2373
|
+
R /= z;
|
|
2374
|
+
for (var W = 0; W < z; W++)
|
|
2375
|
+
S.push(o(C, R)), C += R;
|
|
2376
|
+
return S.map(function(U) {
|
|
2377
|
+
for (var X = 0; X < U.length; X += 2) {
|
|
2378
|
+
var a0 = U[X + 0], p0 = U[X + 1];
|
|
2350
2379
|
a0 *= x, p0 *= l;
|
|
2351
|
-
var c0 = y * a0 -
|
|
2352
|
-
|
|
2380
|
+
var c0 = y * a0 - b * p0, J = b * a0 + y * p0;
|
|
2381
|
+
U[X + 0] = c0 + L[0], U[X + 1] = J + L[1];
|
|
2353
2382
|
}
|
|
2354
|
-
return
|
|
2383
|
+
return U;
|
|
2355
2384
|
});
|
|
2356
2385
|
}, z0;
|
|
2357
2386
|
}
|
|
@@ -2384,11 +2413,11 @@ function Ae() {
|
|
|
2384
2413
|
return this.rx < n * this.ry || this.ry < n * this.rx;
|
|
2385
2414
|
}, U0 = t, U0;
|
|
2386
2415
|
}
|
|
2387
|
-
var
|
|
2388
|
-
function
|
|
2389
|
-
if (mt) return
|
|
2416
|
+
var Y0, mt;
|
|
2417
|
+
function Me() {
|
|
2418
|
+
if (mt) return Y0;
|
|
2390
2419
|
mt = 1;
|
|
2391
|
-
var n =
|
|
2420
|
+
var n = we(), e = me(), t = Nt(), o = be(), i = Ae();
|
|
2392
2421
|
function a(s) {
|
|
2393
2422
|
if (!(this instanceof a))
|
|
2394
2423
|
return new a(s);
|
|
@@ -2409,38 +2438,38 @@ function be() {
|
|
|
2409
2438
|
}, a.prototype.__matrix = function(s) {
|
|
2410
2439
|
var r = this, h;
|
|
2411
2440
|
s.queue.length && this.iterate(function(c, f, x, l) {
|
|
2412
|
-
var u,
|
|
2441
|
+
var u, b, y, M;
|
|
2413
2442
|
switch (c[0]) {
|
|
2414
2443
|
// Process 'assymetric' commands separately
|
|
2415
2444
|
case "v":
|
|
2416
|
-
u = s.calc(0, c[1], !0),
|
|
2445
|
+
u = s.calc(0, c[1], !0), b = u[0] === 0 ? ["v", u[1]] : ["l", u[0], u[1]];
|
|
2417
2446
|
break;
|
|
2418
2447
|
case "V":
|
|
2419
|
-
u = s.calc(x, c[1], !1),
|
|
2448
|
+
u = s.calc(x, c[1], !1), b = u[0] === s.calc(x, l, !1)[0] ? ["V", u[1]] : ["L", u[0], u[1]];
|
|
2420
2449
|
break;
|
|
2421
2450
|
case "h":
|
|
2422
|
-
u = s.calc(c[1], 0, !0),
|
|
2451
|
+
u = s.calc(c[1], 0, !0), b = u[1] === 0 ? ["h", u[0]] : ["l", u[0], u[1]];
|
|
2423
2452
|
break;
|
|
2424
2453
|
case "H":
|
|
2425
|
-
u = s.calc(c[1], l, !1),
|
|
2454
|
+
u = s.calc(c[1], l, !1), b = u[1] === s.calc(x, l, !1)[1] ? ["H", u[0]] : ["L", u[0], u[1]];
|
|
2426
2455
|
break;
|
|
2427
2456
|
case "a":
|
|
2428
2457
|
case "A":
|
|
2429
|
-
var
|
|
2430
|
-
if (
|
|
2431
|
-
|
|
2458
|
+
var P = s.toArray(), E = i(c[1], c[2], c[3]).transform(P);
|
|
2459
|
+
if (P[0] * P[3] - P[1] * P[2] < 0 && (c[5] = c[5] ? "0" : "1"), u = s.calc(c[6], c[7], c[0] === "a"), c[0] === "A" && c[6] === x && c[7] === l || c[0] === "a" && c[6] === 0 && c[7] === 0) {
|
|
2460
|
+
b = [c[0] === "a" ? "l" : "L", u[0], u[1]];
|
|
2432
2461
|
break;
|
|
2433
2462
|
}
|
|
2434
|
-
E.isDegenerate() ?
|
|
2463
|
+
E.isDegenerate() ? b = [c[0] === "a" ? "l" : "L", u[0], u[1]] : b = [c[0], E.rx, E.ry, E.ax, c[4], c[5], u[0], u[1]];
|
|
2435
2464
|
break;
|
|
2436
2465
|
case "m":
|
|
2437
|
-
M = f > 0, u = s.calc(c[1], c[2], M),
|
|
2466
|
+
M = f > 0, u = s.calc(c[1], c[2], M), b = ["m", u[0], u[1]];
|
|
2438
2467
|
break;
|
|
2439
2468
|
default:
|
|
2440
|
-
for (y = c[0],
|
|
2441
|
-
u = s.calc(c[h], c[h + 1], M),
|
|
2469
|
+
for (y = c[0], b = [y], M = y.toLowerCase() === y, h = 1; h < c.length; h += 2)
|
|
2470
|
+
u = s.calc(c[h], c[h + 1], M), b.push(u[0], u[1]);
|
|
2442
2471
|
}
|
|
2443
|
-
r.segments[f] =
|
|
2472
|
+
r.segments[f] = b;
|
|
2444
2473
|
}, !0);
|
|
2445
2474
|
}, a.prototype.__evaluateStack = function() {
|
|
2446
2475
|
var s, r;
|
|
@@ -2460,8 +2489,8 @@ function be() {
|
|
|
2460
2489
|
var x = this.segments[c], l = x[0];
|
|
2461
2490
|
l !== r || l === "m" || l === "M" ? (l === "m" && r === "z" && (s += " "), s += l, h = !1) : h = !0;
|
|
2462
2491
|
for (var u = 1; u < x.length; u++) {
|
|
2463
|
-
var
|
|
2464
|
-
u === 1 ? h &&
|
|
2492
|
+
var b = x[u];
|
|
2493
|
+
u === 1 ? h && b >= 0 && (s += " ") : b >= 0 && (s += " "), s += b;
|
|
2465
2494
|
}
|
|
2466
2495
|
r = l;
|
|
2467
2496
|
}
|
|
@@ -2506,47 +2535,47 @@ function be() {
|
|
|
2506
2535
|
u && (l[6] += c, l[7] += f), c = l[6] - l[6].toFixed(s), f = l[7] - l[7].toFixed(s), l[1] = +l[1].toFixed(s), l[2] = +l[2].toFixed(s), l[3] = +l[3].toFixed(s + 2), l[6] = +l[6].toFixed(s), l[7] = +l[7].toFixed(s);
|
|
2507
2536
|
return;
|
|
2508
2537
|
default:
|
|
2509
|
-
x = l.length, u && (l[x - 2] += c, l[x - 1] += f), c = l[x - 2] - l[x - 2].toFixed(s), f = l[x - 1] - l[x - 1].toFixed(s), l.forEach(function(
|
|
2538
|
+
x = l.length, u && (l[x - 2] += c, l[x - 1] += f), c = l[x - 2] - l[x - 2].toFixed(s), f = l[x - 1] - l[x - 1].toFixed(s), l.forEach(function(b, y) {
|
|
2510
2539
|
y && (l[y] = +l[y].toFixed(s));
|
|
2511
2540
|
});
|
|
2512
2541
|
return;
|
|
2513
2542
|
}
|
|
2514
2543
|
}), this;
|
|
2515
2544
|
}, a.prototype.iterate = function(s, r) {
|
|
2516
|
-
var h = this.segments, c = {}, f = !1, x = 0, l = 0, u = 0,
|
|
2545
|
+
var h = this.segments, c = {}, f = !1, x = 0, l = 0, u = 0, b = 0, y, M, P;
|
|
2517
2546
|
if (r || this.__evaluateStack(), h.forEach(function(E, L) {
|
|
2518
2547
|
var S = s(E, L, x, l);
|
|
2519
2548
|
Array.isArray(S) && (c[L] = S, f = !0);
|
|
2520
|
-
var
|
|
2549
|
+
var C = E[0] === E[0].toLowerCase();
|
|
2521
2550
|
switch (E[0]) {
|
|
2522
2551
|
case "m":
|
|
2523
2552
|
case "M":
|
|
2524
|
-
x = E[1] + (
|
|
2553
|
+
x = E[1] + (C ? x : 0), l = E[2] + (C ? l : 0), u = x, b = l;
|
|
2525
2554
|
return;
|
|
2526
2555
|
case "h":
|
|
2527
2556
|
case "H":
|
|
2528
|
-
x = E[1] + (
|
|
2557
|
+
x = E[1] + (C ? x : 0);
|
|
2529
2558
|
return;
|
|
2530
2559
|
case "v":
|
|
2531
2560
|
case "V":
|
|
2532
|
-
l = E[1] + (
|
|
2561
|
+
l = E[1] + (C ? l : 0);
|
|
2533
2562
|
return;
|
|
2534
2563
|
case "z":
|
|
2535
2564
|
case "Z":
|
|
2536
|
-
x = u, l =
|
|
2565
|
+
x = u, l = b;
|
|
2537
2566
|
return;
|
|
2538
2567
|
default:
|
|
2539
|
-
x = E[E.length - 2] + (
|
|
2568
|
+
x = E[E.length - 2] + (C ? x : 0), l = E[E.length - 1] + (C ? l : 0);
|
|
2540
2569
|
}
|
|
2541
2570
|
}), !f)
|
|
2542
2571
|
return this;
|
|
2543
|
-
for (
|
|
2572
|
+
for (P = [], y = 0; y < h.length; y++)
|
|
2544
2573
|
if (typeof c[y] < "u")
|
|
2545
2574
|
for (M = 0; M < c[y].length; M++)
|
|
2546
|
-
|
|
2575
|
+
P.push(c[y][M]);
|
|
2547
2576
|
else
|
|
2548
|
-
|
|
2549
|
-
return this.segments =
|
|
2577
|
+
P.push(h[y]);
|
|
2578
|
+
return this.segments = P, this;
|
|
2550
2579
|
}, a.prototype.abs = function() {
|
|
2551
2580
|
return this.iterate(function(s, r, h, c) {
|
|
2552
2581
|
var f = s[0], x = f.toUpperCase(), l;
|
|
@@ -2581,22 +2610,22 @@ function be() {
|
|
|
2581
2610
|
}, !0), this;
|
|
2582
2611
|
}, a.prototype.unarc = function() {
|
|
2583
2612
|
return this.iterate(function(s, r, h, c) {
|
|
2584
|
-
var f, x, l, u = [],
|
|
2585
|
-
return
|
|
2613
|
+
var f, x, l, u = [], b = s[0];
|
|
2614
|
+
return b !== "A" && b !== "a" ? null : (b === "a" ? (x = h + s[6], l = c + s[7]) : (x = s[6], l = s[7]), f = o(h, c, x, l, s[4], s[5], s[1], s[2], s[3]), f.length === 0 ? [[s[0] === "a" ? "l" : "L", s[6], s[7]]] : (f.forEach(function(y) {
|
|
2586
2615
|
u.push(["C", y[2], y[3], y[4], y[5], y[6], y[7]]);
|
|
2587
2616
|
}), u));
|
|
2588
2617
|
}), this;
|
|
2589
2618
|
}, a.prototype.unshort = function() {
|
|
2590
2619
|
var s = this.segments, r, h, c, f, x;
|
|
2591
|
-
return this.iterate(function(l, u,
|
|
2592
|
-
var M = l[0],
|
|
2593
|
-
u && (
|
|
2620
|
+
return this.iterate(function(l, u, b, y) {
|
|
2621
|
+
var M = l[0], P = M.toUpperCase(), E;
|
|
2622
|
+
u && (P === "T" ? (E = M === "t", c = s[u - 1], c[0] === "Q" ? (r = c[1] - b, h = c[2] - y) : c[0] === "q" ? (r = c[1] - c[3], h = c[2] - c[4]) : (r = 0, h = 0), f = -r, x = -h, E || (f += b, x += y), s[u] = [
|
|
2594
2623
|
E ? "q" : "Q",
|
|
2595
2624
|
f,
|
|
2596
2625
|
x,
|
|
2597
2626
|
l[1],
|
|
2598
2627
|
l[2]
|
|
2599
|
-
]) :
|
|
2628
|
+
]) : P === "S" && (E = M === "s", c = s[u - 1], c[0] === "C" ? (r = c[3] - b, h = c[4] - y) : c[0] === "c" ? (r = c[3] - c[5], h = c[4] - c[6]) : (r = 0, h = 0), f = -r, x = -h, E || (f += b, x += y), s[u] = [
|
|
2600
2629
|
E ? "c" : "C",
|
|
2601
2630
|
f,
|
|
2602
2631
|
x,
|
|
@@ -2606,38 +2635,38 @@ function be() {
|
|
|
2606
2635
|
l[4]
|
|
2607
2636
|
]));
|
|
2608
2637
|
}), this;
|
|
2609
|
-
},
|
|
2638
|
+
}, Y0 = a, Y0;
|
|
2610
2639
|
}
|
|
2611
|
-
var
|
|
2612
|
-
function
|
|
2613
|
-
return
|
|
2640
|
+
var X0, bt;
|
|
2641
|
+
function Le() {
|
|
2642
|
+
return bt || (bt = 1, X0 = Me()), X0;
|
|
2614
2643
|
}
|
|
2615
|
-
var
|
|
2616
|
-
const
|
|
2617
|
-
var
|
|
2618
|
-
function
|
|
2644
|
+
var Te = Le();
|
|
2645
|
+
const Pe = /* @__PURE__ */ ve(Te);
|
|
2646
|
+
var H0 = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, Ce = /([astvzqmhlc])([^astvzqmhlc]*)/ig;
|
|
2647
|
+
function Ee(n) {
|
|
2619
2648
|
var e = [];
|
|
2620
|
-
return n.replace(
|
|
2649
|
+
return n.replace(Ce, function(t, o, i) {
|
|
2621
2650
|
var a = o.toLowerCase();
|
|
2622
|
-
for (i =
|
|
2623
|
-
if (i.length ===
|
|
2651
|
+
for (i = Ie(i), a === "m" && i.length > 2 && (e.push([o].concat(i.splice(0, 2))), a = "l", o = o === "m" ? "l" : "L"); i.length >= 0; ) {
|
|
2652
|
+
if (i.length === H0[a])
|
|
2624
2653
|
return i.unshift(o), e.push(i);
|
|
2625
|
-
if (i.length <
|
|
2654
|
+
if (i.length < H0[a])
|
|
2626
2655
|
throw new Error("malformed path data");
|
|
2627
|
-
e.push([o].concat(i.splice(0,
|
|
2656
|
+
e.push([o].concat(i.splice(0, H0[a])));
|
|
2628
2657
|
}
|
|
2629
2658
|
}), e;
|
|
2630
2659
|
}
|
|
2631
|
-
var
|
|
2632
|
-
function
|
|
2633
|
-
var e = n.match(
|
|
2660
|
+
var Se = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;
|
|
2661
|
+
function Ie(n) {
|
|
2662
|
+
var e = n.match(Se);
|
|
2634
2663
|
return e ? e.map(Number) : [];
|
|
2635
2664
|
}
|
|
2636
2665
|
function e0(n, e, t, o, i, a, s, r) {
|
|
2637
2666
|
return new Z0(n, e, t, o, i, a, s, r);
|
|
2638
2667
|
}
|
|
2639
2668
|
function Z0(n, e, t, o, i, a, s, r) {
|
|
2640
|
-
this.a = { x: n, y: e }, this.b = { x: t, y: o }, this.c = { x: i, y: a }, this.d = { x: s, y: r }, s != null && r !== null && r !== void 0 ? (this.getArcLength =
|
|
2669
|
+
this.a = { x: n, y: e }, this.b = { x: t, y: o }, this.c = { x: i, y: a }, this.d = { x: s, y: r }, s != null && r !== null && r !== void 0 ? (this.getArcLength = je, this.getPoint = Oe, this.getDerivative = _e) : (this.getArcLength = Re, this.getPoint = qt, this.getDerivative = ke), this.init();
|
|
2641
2670
|
}
|
|
2642
2671
|
Z0.prototype = {
|
|
2643
2672
|
constructor: Z0,
|
|
@@ -2651,7 +2680,7 @@ Z0.prototype = {
|
|
|
2651
2680
|
return this.length;
|
|
2652
2681
|
},
|
|
2653
2682
|
getPointAtLength: function(n) {
|
|
2654
|
-
var e =
|
|
2683
|
+
var e = $0(
|
|
2655
2684
|
n,
|
|
2656
2685
|
this.length,
|
|
2657
2686
|
this.getArcLength,
|
|
@@ -2665,7 +2694,7 @@ Z0.prototype = {
|
|
|
2665
2694
|
);
|
|
2666
2695
|
},
|
|
2667
2696
|
getTangentAtLength: function(n) {
|
|
2668
|
-
var e =
|
|
2697
|
+
var e = $0(
|
|
2669
2698
|
n,
|
|
2670
2699
|
this.length,
|
|
2671
2700
|
this.getArcLength,
|
|
@@ -2679,7 +2708,7 @@ Z0.prototype = {
|
|
|
2679
2708
|
return o > 0 ? i = { x: t.x / o, y: t.y / o } : i = { x: 0, y: 0 }, i;
|
|
2680
2709
|
},
|
|
2681
2710
|
getPropertiesAtLength: function(n) {
|
|
2682
|
-
var e =
|
|
2711
|
+
var e = $0(
|
|
2683
2712
|
n,
|
|
2684
2713
|
this.length,
|
|
2685
2714
|
this.getArcLength,
|
|
@@ -2699,7 +2728,7 @@ Z0.prototype = {
|
|
|
2699
2728
|
return { x: a.x, y: a.y, tangentX: i.x, tangentY: i.y };
|
|
2700
2729
|
}
|
|
2701
2730
|
};
|
|
2702
|
-
function
|
|
2731
|
+
function ke(n, e, t) {
|
|
2703
2732
|
return {
|
|
2704
2733
|
x: (1 - t) * 2 * (n[1] - n[0]) + t * 2 * (n[2] - n[1]),
|
|
2705
2734
|
y: (1 - t) * 2 * (e[1] - e[0]) + t * 2 * (e[2] - e[1])
|
|
@@ -2713,7 +2742,7 @@ function _e(n, e, t) {
|
|
|
2713
2742
|
);
|
|
2714
2743
|
return o;
|
|
2715
2744
|
}
|
|
2716
|
-
function
|
|
2745
|
+
function $0(n, e, t, o, i) {
|
|
2717
2746
|
for (var a = 1, s = n / e, r = (n - t(o, i, s)) / e; a > 1e-3; ) {
|
|
2718
2747
|
var h = t(o, i, s + r), c = t(o, i, s - r), f = Math.abs(n - h) / e, x = Math.abs(n - c) / e;
|
|
2719
2748
|
f < a ? (a = f, s += r) : x < a ? (a = x, s -= r) : r /= 2;
|
|
@@ -2724,11 +2753,11 @@ function qt(n, e, t) {
|
|
|
2724
2753
|
var o = (1 - t) * (1 - t) * n[0] + 2 * (1 - t) * t * n[1] + t * t * n[2], i = (1 - t) * (1 - t) * e[0] + 2 * (1 - t) * t * e[1] + t * t * e[2];
|
|
2725
2754
|
return { x: o, y: i };
|
|
2726
2755
|
}
|
|
2727
|
-
function
|
|
2756
|
+
function Oe(n, e, t) {
|
|
2728
2757
|
var o = (1 - t) * (1 - t) * (1 - t) * n[0] + 3 * (1 - t) * (1 - t) * t * n[1] + 3 * (1 - t) * t * t * n[2] + t * t * t * n[3], i = (1 - t) * (1 - t) * (1 - t) * e[0] + 3 * (1 - t) * (1 - t) * t * e[1] + 3 * (1 - t) * t * t * e[2] + t * t * t * e[3];
|
|
2729
2758
|
return { x: o, y: i };
|
|
2730
2759
|
}
|
|
2731
|
-
function
|
|
2760
|
+
function Re(n, e, t) {
|
|
2732
2761
|
t === void 0 && (t = 1);
|
|
2733
2762
|
var o = n[0] - 2 * n[1] + n[2], i = e[0] - 2 * e[1] + e[2], a = 2 * n[1] - 2 * n[0], s = 2 * e[1] - 2 * e[0], r = 4 * (o * o + i * i), h = 4 * (o * a + i * s), c = a * a + s * s;
|
|
2734
2763
|
if (r === 0)
|
|
@@ -2764,7 +2793,7 @@ var Fe = [
|
|
|
2764
2793
|
[-0.06973927331972223, 0.06973927331972223, -0.20786042668822127, 0.20786042668822127, -0.34193582089208424, 0.34193582089208424, -0.469355837986757, 0.469355837986757, -0.5876404035069116, 0.5876404035069116, -0.6944872631866827, 0.6944872631866827, -0.7878168059792081, 0.7878168059792081, -0.8658125777203002, 0.8658125777203002, -0.926956772187174, 0.926956772187174, -0.9700604978354287, 0.9700604978354287, -0.9942945854823992, 0.9942945854823992],
|
|
2765
2794
|
[0, -0.1332568242984661, 0.1332568242984661, -0.26413568097034495, 0.26413568097034495, -0.3903010380302908, 0.3903010380302908, -0.5095014778460075, 0.5095014778460075, -0.6196098757636461, 0.6196098757636461, -0.7186613631319502, 0.7186613631319502, -0.8048884016188399, 0.8048884016188399, -0.8767523582704416, 0.8767523582704416, -0.9329710868260161, 0.9329710868260161, -0.9725424712181152, 0.9725424712181152, -0.9947693349975522, 0.9947693349975522],
|
|
2766
2795
|
[-0.06405689286260563, 0.06405689286260563, -0.1911188674736163, 0.1911188674736163, -0.3150426796961634, 0.3150426796961634, -0.4337935076260451, 0.4337935076260451, -0.5454214713888396, 0.5454214713888396, -0.6480936519369755, 0.6480936519369755, -0.7401241915785544, 0.7401241915785544, -0.820001985973903, 0.820001985973903, -0.8864155270044011, 0.8864155270044011, -0.9382745520027328, 0.9382745520027328, -0.9747285559713095, 0.9747285559713095, -0.9951872199970213, 0.9951872199970213]
|
|
2767
|
-
],
|
|
2796
|
+
], Ne = [
|
|
2768
2797
|
[],
|
|
2769
2798
|
[],
|
|
2770
2799
|
[1, 1],
|
|
@@ -2790,9 +2819,9 @@ var Fe = [
|
|
|
2790
2819
|
[0.13925187285563198, 0.13925187285563198, 0.13654149834601517, 0.13654149834601517, 0.13117350478706238, 0.13117350478706238, 0.12325237681051242, 0.12325237681051242, 0.11293229608053922, 0.11293229608053922, 0.10041414444288096, 0.10041414444288096, 0.08594160621706773, 0.08594160621706773, 0.06979646842452049, 0.06979646842452049, 0.052293335152683286, 0.052293335152683286, 0.03377490158481415, 0.03377490158481415, 0.0146279952982722, 0.0146279952982722],
|
|
2791
2820
|
[0.13365457218610619, 0.1324620394046966, 0.1324620394046966, 0.12890572218808216, 0.12890572218808216, 0.12304908430672953, 0.12304908430672953, 0.11499664022241136, 0.11499664022241136, 0.10489209146454141, 0.10489209146454141, 0.09291576606003515, 0.09291576606003515, 0.07928141177671895, 0.07928141177671895, 0.06423242140852585, 0.06423242140852585, 0.04803767173108467, 0.04803767173108467, 0.030988005856979445, 0.030988005856979445, 0.013411859487141771, 0.013411859487141771],
|
|
2792
2821
|
[0.12793819534675216, 0.12793819534675216, 0.1258374563468283, 0.1258374563468283, 0.12167047292780339, 0.12167047292780339, 0.1155056680537256, 0.1155056680537256, 0.10744427011596563, 0.10744427011596563, 0.09761865210411388, 0.09761865210411388, 0.08619016153195327, 0.08619016153195327, 0.0733464814110803, 0.0733464814110803, 0.05929858491543678, 0.05929858491543678, 0.04427743881741981, 0.04427743881741981, 0.028531388628933663, 0.028531388628933663, 0.0123412297999872, 0.0123412297999872]
|
|
2793
|
-
],
|
|
2794
|
-
function
|
|
2795
|
-
return
|
|
2822
|
+
], qe = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]];
|
|
2823
|
+
function Be(n, e) {
|
|
2824
|
+
return qe[n][e];
|
|
2796
2825
|
}
|
|
2797
2826
|
function V0(n, e, t) {
|
|
2798
2827
|
var o = t.length - 1, i, a, s;
|
|
@@ -2800,7 +2829,7 @@ function V0(n, e, t) {
|
|
|
2800
2829
|
return 0;
|
|
2801
2830
|
if (n === 0) {
|
|
2802
2831
|
for (a = 0, s = 0; s <= o; s++)
|
|
2803
|
-
a +=
|
|
2832
|
+
a += Be(o, s) * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
|
|
2804
2833
|
return a;
|
|
2805
2834
|
} else {
|
|
2806
2835
|
for (i = new Array(o), s = 0; s < o; s++)
|
|
@@ -2808,34 +2837,34 @@ function V0(n, e, t) {
|
|
|
2808
2837
|
return V0(n - 1, e, i);
|
|
2809
2838
|
}
|
|
2810
2839
|
}
|
|
2811
|
-
function
|
|
2840
|
+
function De(n, e, t) {
|
|
2812
2841
|
var o = V0(1, t, n), i = V0(1, t, e), a = o * o + i * i;
|
|
2813
2842
|
return Math.sqrt(a);
|
|
2814
2843
|
}
|
|
2815
|
-
function
|
|
2844
|
+
function je(n, e, t) {
|
|
2816
2845
|
var o, i, a, s;
|
|
2817
2846
|
t === void 0 && (t = 1);
|
|
2818
2847
|
var r = 20;
|
|
2819
2848
|
for (o = t / 2, i = 0, a = 0; a < r; a++)
|
|
2820
|
-
s = o * Fe[r][a] + o, i +=
|
|
2849
|
+
s = o * Fe[r][a] + o, i += Ne[r][a] * De(n, e, s);
|
|
2821
2850
|
return o * i;
|
|
2822
2851
|
}
|
|
2823
2852
|
var C0 = Math.PI * 2;
|
|
2824
|
-
function
|
|
2853
|
+
function At(n, e, t, o) {
|
|
2825
2854
|
var i = n * o - e * t < 0 ? -1 : 1, a = n * t + e * o;
|
|
2826
2855
|
return a > 1 && (a = 1), a < -1 && (a = -1), i * Math.acos(a);
|
|
2827
2856
|
}
|
|
2828
|
-
function
|
|
2829
|
-
var f = c * (n - t) / 2 + h * (e - o) / 2, x = -h * (n - t) / 2 + c * (e - o) / 2, l = s * s, u = r * r,
|
|
2830
|
-
M < 0 && (M = 0), M /= l * y + u *
|
|
2831
|
-
var
|
|
2832
|
-
return a === 0 &&
|
|
2857
|
+
function ze(n, e, t, o, i, a, s, r, h, c) {
|
|
2858
|
+
var f = c * (n - t) / 2 + h * (e - o) / 2, x = -h * (n - t) / 2 + c * (e - o) / 2, l = s * s, u = r * r, b = f * f, y = x * x, M = l * u - l * y - u * b;
|
|
2859
|
+
M < 0 && (M = 0), M /= l * y + u * b, M = Math.sqrt(M) * (i === a ? -1 : 1);
|
|
2860
|
+
var P = M * s / r * x, E = M * -r / s * f, L = c * P - h * E + (n + t) / 2, S = h * P + c * E + (e + o) / 2, C = (f - P) / s, R = (x - E) / r, z = (-f - P) / s, W = (-x - E) / r, U = At(1, 0, C, R), X = At(C, R, z, W);
|
|
2861
|
+
return a === 0 && X > 0 && (X -= C0), a === 1 && X < 0 && (X += C0), [L, S, U, X];
|
|
2833
2862
|
}
|
|
2834
|
-
function
|
|
2863
|
+
function Ue(n, e) {
|
|
2835
2864
|
var t = 1.3333333333333333 * Math.tan(e / 4), o = Math.cos(n), i = Math.sin(n), a = Math.cos(n + e), s = Math.sin(n + e);
|
|
2836
2865
|
return [o, i, o - i * t, i + o * t, a + s * t, s - a * t, a, s];
|
|
2837
2866
|
}
|
|
2838
|
-
function
|
|
2867
|
+
function Ye(n, e, t, o, i, a, s, r, h) {
|
|
2839
2868
|
var c = Math.sin(i * C0 / 360), f = Math.cos(i * C0 / 360), x = f * (n - r) / 2 + c * (e - h) / 2, l = -c * (n - r) / 2 + f * (e - h) / 2;
|
|
2840
2869
|
if (x === 0 && l === 0)
|
|
2841
2870
|
return [];
|
|
@@ -2844,16 +2873,16 @@ function Ue(n, e, t, o, i, a, s, r, h) {
|
|
|
2844
2873
|
t = Math.abs(t), o = Math.abs(o);
|
|
2845
2874
|
var u = x * x / (t * t) + l * l / (o * o);
|
|
2846
2875
|
u > 1 && (t *= Math.sqrt(u), o *= Math.sqrt(u));
|
|
2847
|
-
var
|
|
2848
|
-
|
|
2876
|
+
var b = ze(n, e, r, h, a, s, t, o, c, f), y = [], M = b[2], P = b[3], E = Math.max(Math.ceil(Math.abs(P) / (C0 / 4)), 1);
|
|
2877
|
+
P /= E;
|
|
2849
2878
|
for (var L = 0; L < E; L++)
|
|
2850
|
-
y.push(
|
|
2879
|
+
y.push(Ue(M, P)), M += P;
|
|
2851
2880
|
return y.map(function(S) {
|
|
2852
|
-
for (var
|
|
2853
|
-
var
|
|
2854
|
-
|
|
2855
|
-
var
|
|
2856
|
-
S[
|
|
2881
|
+
for (var C = 0; C < S.length; C += 2) {
|
|
2882
|
+
var R = S[C + 0], z = S[C + 1];
|
|
2883
|
+
R *= t, z *= o;
|
|
2884
|
+
var W = f * R - c * z, U = c * R + f * z;
|
|
2885
|
+
S[C + 0] = W + b[0], S[C + 1] = U + b[1];
|
|
2857
2886
|
}
|
|
2858
2887
|
return S;
|
|
2859
2888
|
});
|
|
@@ -2862,10 +2891,10 @@ function Mt(n, e, t, o, i, a, s, r, h) {
|
|
|
2862
2891
|
return new K0(n, e, t, o, i, a, s, r, h);
|
|
2863
2892
|
}
|
|
2864
2893
|
function K0(n, e, t, o, i, a, s, r, h) {
|
|
2865
|
-
var c = 0, f = [], x = [], l =
|
|
2894
|
+
var c = 0, f = [], x = [], l = Ye(n, e, t, o, i, a, s, r, h);
|
|
2866
2895
|
l.forEach(function(u) {
|
|
2867
|
-
var
|
|
2868
|
-
c += y, f.push(y), x.push(
|
|
2896
|
+
var b = new e0(u[0], u[1], u[2], u[3], u[4], u[5], u[6], u[7]), y = b.getTotalLength();
|
|
2897
|
+
c += y, f.push(y), x.push(b);
|
|
2869
2898
|
}), this.length = c, this.partialLengths = f, this.curves = x;
|
|
2870
2899
|
}
|
|
2871
2900
|
K0.prototype = {
|
|
@@ -2919,12 +2948,12 @@ I0.prototype.getPropertiesAtLength = function(n) {
|
|
|
2919
2948
|
var e = this.getPointAtLength(n), t = this.getTangentAtLength();
|
|
2920
2949
|
return { x: e.x, y: e.y, tangentX: t.x, tangentY: t.y };
|
|
2921
2950
|
};
|
|
2922
|
-
function
|
|
2951
|
+
function Xe(n) {
|
|
2923
2952
|
var e = 0, t = [], o = [];
|
|
2924
2953
|
function i(s) {
|
|
2925
2954
|
if (!s)
|
|
2926
2955
|
return null;
|
|
2927
|
-
for (var r =
|
|
2956
|
+
for (var r = Ee(s), h = [0, 0], c = [0, 0], f, x, l = 0; l < r.length; l++)
|
|
2928
2957
|
r[l][0] === "M" ? (h = [r[l][1], r[l][2]], x = [h[0], h[1]], o.push(null)) : r[l][0] === "m" ? (h = [r[l][1] + h[0], r[l][2] + h[1]], x = [h[0], h[1]], o.push(null)) : r[l][0] === "L" ? (e = e + Math.sqrt(Math.pow(h[0] - r[l][1], 2) + Math.pow(h[1] - r[l][2], 2)), o.push(new t0(h[0], r[l][1], h[1], r[l][2])), h = [r[l][1], r[l][2]]) : r[l][0] === "l" ? (e = e + Math.sqrt(Math.pow(r[l][1], 2) + Math.pow(r[l][2], 2)), o.push(new t0(h[0], r[l][1] + h[0], h[1], r[l][2] + h[1])), h = [r[l][1] + h[0], r[l][2] + h[1]]) : r[l][0] === "H" ? (e = e + Math.abs(h[0] - r[l][1]), o.push(new t0(h[0], r[l][1], h[1], h[1])), h[0] = r[l][1]) : r[l][0] === "h" ? (e = e + Math.abs(r[l][1]), o.push(new t0(h[0], h[0] + r[l][1], h[1], h[1])), h[0] = r[l][1] + h[0]) : r[l][0] === "V" ? (e = e + Math.abs(h[1] - r[l][1]), o.push(new t0(h[0], h[0], h[1], r[l][1])), h[1] = r[l][1]) : r[l][0] === "v" ? (e = e + Math.abs(r[l][1]), o.push(new t0(h[0], h[0], h[1], h[1] + r[l][1])), h[1] = r[l][1] + h[1]) : r[l][0] === "z" || r[l][0] === "Z" ? (e = e + Math.sqrt(Math.pow(x[0] - h[0], 2) + Math.pow(x[1] - h[1], 2)), o.push(new t0(h[0], x[0], h[1], x[1])), h = [x[0], x[1]]) : r[l][0] === "C" ? (f = new e0(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], r[l][6]), e = e + f.getTotalLength(), h = [r[l][5], r[l][6]], o.push(f)) : r[l][0] === "c" ? (f = new e0(h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4], h[0] + r[l][5], h[1] + r[l][6]), e = e + f.getTotalLength(), h = [r[l][5] + h[0], r[l][6] + h[1]], o.push(f)) : r[l][0] === "S" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? f = new e0(h[0], h[1], 2 * h[0] - r[l - 1][r[l - 1].length - 4], 2 * h[1] - r[l - 1][r[l - 1].length - 3], r[l][1], r[l][2], r[l][3], r[l][4]) : f = new e0(h[0], h[1], h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]), e = e + f.getTotalLength(), h = [r[l][3], r[l][4]], o.push(f)) : r[l][0] === "s" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? f = new e0(h[0], h[1], h[0] + f.d.x - f.c.x, h[1] + f.d.y - f.c.y, h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]) : f = new e0(h[0], h[1], h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]), e = e + f.getTotalLength(), h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(f)) : r[l][0] === "Q" ? (h[0] != r[l][1] && h[1] != r[l][2] ? f = new e0(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]) : f = new t0(r[l][1], r[l][3], r[l][2], r[l][4]), e = e + f.getTotalLength(), o.push(f), h = [r[l][3], r[l][4]], c = [r[l][1], r[l][2]]) : r[l][0] === "q" ? (r[l][1] == 0 && r[l][2] == 0 ? f = new t0(h[0] + r[l][1], h[0] + r[l][3], h[1] + r[l][2], h[1] + r[l][4]) : f = new e0(h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]), e = e + f.getTotalLength(), c = [h[0] + r[l][1], h[1] + r[l][2]], h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(f)) : r[l][0] === "T" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? f = new e0(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], r[l][1], r[l][2]) : f = new t0(h[0], r[l][1], h[1], r[l][2]), o.push(f), e = e + f.getTotalLength(), c = [2 * h[0] - c[0], 2 * h[1] - c[1]], h = [r[l][1], r[l][2]]) : r[l][0] === "t" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? f = new e0(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], h[0] + r[l][1], h[1] + r[l][2]) : f = new t0(h[0], h[0] + r[l][1], h[1], h[1] + r[l][2]), e = e + f.getTotalLength(), c = [2 * h[0] - c[0], 2 * h[1] - c[1]], h = [r[l][1] + h[0], r[l][2] + h[0]], o.push(f)) : r[l][0] === "A" ? (f = new Mt(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], r[l][6], r[l][7]), e = e + f.getTotalLength(), h = [r[l][6], r[l][7]], o.push(f)) : r[l][0] === "a" && (f = new Mt(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], h[0] + r[l][6], h[1] + r[l][7]), e = e + f.getTotalLength(), h = [h[0] + r[l][6], h[1] + r[l][7]], o.push(f)), t.push(e);
|
|
2929
2958
|
return i;
|
|
2930
2959
|
}
|
|
@@ -2954,22 +2983,22 @@ function O0(n, e) {
|
|
|
2954
2983
|
function Bt(n, e, t) {
|
|
2955
2984
|
return [n[0] + (e[0] - n[0]) * t, n[1] + (e[1] - n[1]) * t];
|
|
2956
2985
|
}
|
|
2957
|
-
function
|
|
2986
|
+
function He(n, e) {
|
|
2958
2987
|
return O0(n, e) < 1e-9;
|
|
2959
2988
|
}
|
|
2960
2989
|
function $e(n, e, t) {
|
|
2961
|
-
let o = n.map((i, a) =>
|
|
2990
|
+
let o = n.map((i, a) => Ge(i, e[a]));
|
|
2962
2991
|
return function(i) {
|
|
2963
2992
|
let a = o.map((s) => s(i));
|
|
2964
|
-
return t ?
|
|
2993
|
+
return t ? Ve(a) : a;
|
|
2965
2994
|
};
|
|
2966
2995
|
}
|
|
2967
|
-
function
|
|
2996
|
+
function Ge(n, e) {
|
|
2968
2997
|
return function(t) {
|
|
2969
2998
|
return n.map((o, i) => o + t * (e[i] - o));
|
|
2970
2999
|
};
|
|
2971
3000
|
}
|
|
2972
|
-
function
|
|
3001
|
+
function _0(n) {
|
|
2973
3002
|
return typeof n == "number" && isFinite(n);
|
|
2974
3003
|
}
|
|
2975
3004
|
const Q0 = `All shapes must be supplied as arrays of [x, y] points or an SVG path string (https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d).
|
|
@@ -2977,20 +3006,20 @@ Example valid ways of supplying a shape would be:
|
|
|
2977
3006
|
[[0, 0], [10, 0], [10, 10]]
|
|
2978
3007
|
"M0,0 L10,0 L10,10Z"
|
|
2979
3008
|
`;
|
|
2980
|
-
function
|
|
2981
|
-
return new
|
|
3009
|
+
function We(n) {
|
|
3010
|
+
return new Pe(n).abs();
|
|
2982
3011
|
}
|
|
2983
|
-
function
|
|
3012
|
+
function Ze(n) {
|
|
2984
3013
|
return n.toString().split("M").map((e, t) => (e = e.trim(), t && e ? "M" + e : e)).filter((e) => e);
|
|
2985
3014
|
}
|
|
2986
|
-
function
|
|
3015
|
+
function Ve(n) {
|
|
2987
3016
|
return "M" + n.join("L") + "Z";
|
|
2988
3017
|
}
|
|
2989
|
-
function
|
|
2990
|
-
let t =
|
|
2991
|
-
return
|
|
3018
|
+
function Ke(n, e) {
|
|
3019
|
+
let t = We(n);
|
|
3020
|
+
return Qe(t) || Je(t, e);
|
|
2992
3021
|
}
|
|
2993
|
-
function
|
|
3022
|
+
function Qe(n) {
|
|
2994
3023
|
let e = n.segments || [], t = [];
|
|
2995
3024
|
if (!e.length || e[0][0] !== "M")
|
|
2996
3025
|
return !1;
|
|
@@ -3009,11 +3038,11 @@ function Ke(n) {
|
|
|
3009
3038
|
}
|
|
3010
3039
|
return t.length ? { ring: t } : !1;
|
|
3011
3040
|
}
|
|
3012
|
-
function
|
|
3013
|
-
let t =
|
|
3041
|
+
function Je(n, e) {
|
|
3042
|
+
let t = Ze(n)[0], o = [], i, a, s = 3;
|
|
3014
3043
|
if (!t)
|
|
3015
3044
|
throw new TypeError(Q0);
|
|
3016
|
-
a =
|
|
3045
|
+
a = tn(t), i = a.getTotalLength(), e && _0(e) && e > 0 && (s = Math.max(s, Math.ceil(i / e)));
|
|
3017
3046
|
for (let r = 0; r < s; r++) {
|
|
3018
3047
|
let h = a.getPointAtLength(i * r / s);
|
|
3019
3048
|
o.push([h.x, h.y]);
|
|
@@ -3023,17 +3052,17 @@ function Qe(n, e) {
|
|
|
3023
3052
|
skipBisect: !0
|
|
3024
3053
|
};
|
|
3025
3054
|
}
|
|
3026
|
-
function
|
|
3055
|
+
function tn(n) {
|
|
3027
3056
|
if (typeof window < "u" && window && window.document)
|
|
3028
3057
|
try {
|
|
3029
3058
|
let e = window.document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3030
3059
|
return e.setAttributeNS(null, "d", n), e;
|
|
3031
3060
|
} catch {
|
|
3032
3061
|
}
|
|
3033
|
-
return
|
|
3062
|
+
return Xe(n);
|
|
3034
3063
|
}
|
|
3035
3064
|
function Lt(n, e) {
|
|
3036
|
-
const t = n.length + e, o =
|
|
3065
|
+
const t = n.length + e, o = ye(n) / e;
|
|
3037
3066
|
let i = 0, a = 0, s = o / 2;
|
|
3038
3067
|
for (; n.length < t; ) {
|
|
3039
3068
|
let r = n[i], h = n[(i + 1) % n.length], c = O0(r, h);
|
|
@@ -3044,7 +3073,7 @@ function Lt(n, e) {
|
|
|
3044
3073
|
a += c, i++;
|
|
3045
3074
|
}
|
|
3046
3075
|
}
|
|
3047
|
-
function
|
|
3076
|
+
function en(n, e = 1 / 0) {
|
|
3048
3077
|
for (let t = 0; t < n.length; t++) {
|
|
3049
3078
|
let o = n[t], i = t === n.length - 1 ? n[0] : n[t + 1];
|
|
3050
3079
|
for (; O0(o, i) > e; )
|
|
@@ -3054,20 +3083,20 @@ function tn(n, e = 1 / 0) {
|
|
|
3054
3083
|
function Tt(n, e) {
|
|
3055
3084
|
let t, o, i;
|
|
3056
3085
|
if (typeof n == "string") {
|
|
3057
|
-
let a =
|
|
3086
|
+
let a = Ke(n, e);
|
|
3058
3087
|
n = a.ring, i = a.skipBisect;
|
|
3059
3088
|
} else if (!Array.isArray(n))
|
|
3060
3089
|
throw new TypeError(Q0);
|
|
3061
|
-
if (t = n.slice(0), !
|
|
3090
|
+
if (t = n.slice(0), !nn(t))
|
|
3062
3091
|
throw new TypeError(Q0);
|
|
3063
|
-
return t.length > 1 &&
|
|
3092
|
+
return t.length > 1 && He(t[0], t[t.length - 1]) && t.pop(), o = xe(t), o > 0 && t.reverse(), !i && e && _0(e) && e > 0 && en(t, e), t;
|
|
3064
3093
|
}
|
|
3065
|
-
function
|
|
3094
|
+
function nn(n) {
|
|
3066
3095
|
return n.every(function(e) {
|
|
3067
|
-
return Array.isArray(e) && e.length >= 2 &&
|
|
3096
|
+
return Array.isArray(e) && e.length >= 2 && _0(e[0]) && _0(e[1]);
|
|
3068
3097
|
});
|
|
3069
3098
|
}
|
|
3070
|
-
function
|
|
3099
|
+
function rn(n, e) {
|
|
3071
3100
|
let t = n.length, o = 1 / 0, i, a, s;
|
|
3072
3101
|
for (let r = 0; r < t; r++)
|
|
3073
3102
|
a = 0, e.forEach(function(h, c) {
|
|
@@ -3076,38 +3105,38 @@ function nn(n, e) {
|
|
|
3076
3105
|
}), a < o && (o = a, i = r);
|
|
3077
3106
|
i && (s = n.splice(0, i), n.splice(n.length, 0, ...s));
|
|
3078
3107
|
}
|
|
3079
|
-
function
|
|
3080
|
-
let i = Tt(n, t), a = Tt(e, t), s =
|
|
3108
|
+
function on(n, e, { maxSegmentLength: t = 10, string: o = !0 } = {}) {
|
|
3109
|
+
let i = Tt(n, t), a = Tt(e, t), s = sn(i, a, o);
|
|
3081
3110
|
return !o || typeof n != "string" && typeof e != "string" ? s : (r) => r < 1e-4 && typeof n == "string" ? n : 1 - r < 1e-4 && typeof e == "string" ? e : s(r);
|
|
3082
3111
|
}
|
|
3083
|
-
function
|
|
3112
|
+
function sn(n, e, t) {
|
|
3084
3113
|
let o;
|
|
3085
|
-
return o = n.length - e.length, Lt(n, o < 0 ? o * -1 : 0), Lt(e, o > 0 ? o : 0),
|
|
3114
|
+
return o = n.length - e.length, Lt(n, o < 0 ? o * -1 : 0), Lt(e, o > 0 ? o : 0), rn(n, e), $e(n, e, t);
|
|
3086
3115
|
}
|
|
3087
|
-
var
|
|
3088
|
-
function
|
|
3089
|
-
if (Pt) return
|
|
3090
|
-
Pt = 1,
|
|
3116
|
+
var k0 = { exports: {} }, Pt;
|
|
3117
|
+
function an() {
|
|
3118
|
+
if (Pt) return k0.exports;
|
|
3119
|
+
Pt = 1, k0.exports = n, k0.exports.default = n;
|
|
3091
3120
|
function n(g, d, p) {
|
|
3092
3121
|
p = p || 2;
|
|
3093
|
-
var v = d && d.length, w = v ? d[0] * p : g.length,
|
|
3094
|
-
if (!
|
|
3095
|
-
var T, O,
|
|
3096
|
-
if (v && (
|
|
3097
|
-
T =
|
|
3122
|
+
var v = d && d.length, w = v ? d[0] * p : g.length, m = e(g, 0, w, p, !0), A = [];
|
|
3123
|
+
if (!m || m.next === m.prev) return A;
|
|
3124
|
+
var T, O, k, Y, B, F, G;
|
|
3125
|
+
if (v && (m = h(g, d, m, p)), g.length > 80 * p) {
|
|
3126
|
+
T = k = g[0], O = Y = g[1];
|
|
3098
3127
|
for (var D = p; D < w; D += p)
|
|
3099
|
-
B = g[D],
|
|
3100
|
-
|
|
3128
|
+
B = g[D], F = g[D + 1], B < T && (T = B), F < O && (O = F), B > k && (k = B), F > Y && (Y = F);
|
|
3129
|
+
G = Math.max(k - T, Y - O), G = G !== 0 ? 32767 / G : 0;
|
|
3101
3130
|
}
|
|
3102
|
-
return o(
|
|
3131
|
+
return o(m, A, p, T, O, G, 0), A;
|
|
3103
3132
|
}
|
|
3104
3133
|
function e(g, d, p, v, w) {
|
|
3105
|
-
var
|
|
3106
|
-
if (w ===
|
|
3107
|
-
for (
|
|
3134
|
+
var m, A;
|
|
3135
|
+
if (w === R0(g, d, p, v) > 0)
|
|
3136
|
+
for (m = d; m < p; m += v) A = p0(m, g[m], g[m + 1], A);
|
|
3108
3137
|
else
|
|
3109
|
-
for (
|
|
3110
|
-
return
|
|
3138
|
+
for (m = p - v; m >= d; m -= v) A = p0(m, g[m], g[m + 1], A);
|
|
3139
|
+
return A && S(A, A.next) && (c0(A), A = A.next), A;
|
|
3111
3140
|
}
|
|
3112
3141
|
function t(g, d) {
|
|
3113
3142
|
if (!g) return g;
|
|
@@ -3122,16 +3151,16 @@ function sn() {
|
|
|
3122
3151
|
while (v || p !== d);
|
|
3123
3152
|
return d;
|
|
3124
3153
|
}
|
|
3125
|
-
function o(g, d, p, v, w,
|
|
3154
|
+
function o(g, d, p, v, w, m, A) {
|
|
3126
3155
|
if (g) {
|
|
3127
|
-
!
|
|
3128
|
-
for (var T = g, O,
|
|
3129
|
-
if (O = g.prev,
|
|
3130
|
-
d.push(O.i / p | 0), d.push(g.i / p | 0), d.push(
|
|
3156
|
+
!A && m && u(g, v, w, m);
|
|
3157
|
+
for (var T = g, O, k; g.prev !== g.next; ) {
|
|
3158
|
+
if (O = g.prev, k = g.next, m ? a(g, v, w, m) : i(g)) {
|
|
3159
|
+
d.push(O.i / p | 0), d.push(g.i / p | 0), d.push(k.i / p | 0), c0(g), g = k.next, T = k.next;
|
|
3131
3160
|
continue;
|
|
3132
3161
|
}
|
|
3133
|
-
if (g =
|
|
3134
|
-
|
|
3162
|
+
if (g = k, g === T) {
|
|
3163
|
+
A ? A === 1 ? (g = s(t(g), d, p), o(g, d, p, v, w, m, 2)) : A === 2 && r(g, d, p, v, w, m) : o(t(g), d, p, v, w, m, 1);
|
|
3135
3164
|
break;
|
|
3136
3165
|
}
|
|
3137
3166
|
}
|
|
@@ -3140,25 +3169,25 @@ function sn() {
|
|
|
3140
3169
|
function i(g) {
|
|
3141
3170
|
var d = g.prev, p = g, v = g.next;
|
|
3142
3171
|
if (L(d, p, v) >= 0) return !1;
|
|
3143
|
-
for (var w = d.x,
|
|
3144
|
-
if (D.x >=
|
|
3172
|
+
for (var w = d.x, m = p.x, A = v.x, T = d.y, O = p.y, k = v.y, Y = w < m ? w < A ? w : A : m < A ? m : A, B = T < O ? T < k ? T : k : O < k ? O : k, F = w > m ? w > A ? w : A : m > A ? m : A, G = T > O ? T > k ? T : k : O > k ? O : k, D = v.next; D !== d; ) {
|
|
3173
|
+
if (D.x >= Y && D.x <= F && D.y >= B && D.y <= G && P(w, T, m, O, A, k, D.x, D.y) && L(D.prev, D, D.next) >= 0) return !1;
|
|
3145
3174
|
D = D.next;
|
|
3146
3175
|
}
|
|
3147
3176
|
return !0;
|
|
3148
3177
|
}
|
|
3149
3178
|
function a(g, d, p, v) {
|
|
3150
|
-
var w = g.prev,
|
|
3151
|
-
if (L(w,
|
|
3152
|
-
for (var T = w.x, O =
|
|
3153
|
-
if (N.x >=
|
|
3179
|
+
var w = g.prev, m = g, A = g.next;
|
|
3180
|
+
if (L(w, m, A) >= 0) return !1;
|
|
3181
|
+
for (var T = w.x, O = m.x, k = A.x, Y = w.y, B = m.y, F = A.y, G = T < O ? T < k ? T : k : O < k ? O : k, D = Y < B ? Y < F ? Y : F : B < F ? B : F, L0 = T > O ? T > k ? T : k : O > k ? O : k, T0 = Y > B ? Y > F ? Y : F : B > F ? B : F, it = y(G, D, d, p, v), ot = y(L0, T0, d, p, v), N = g.prevZ, q = g.nextZ; N && N.z >= it && q && q.z <= ot; ) {
|
|
3182
|
+
if (N.x >= G && N.x <= L0 && N.y >= D && N.y <= T0 && N !== w && N !== A && P(T, Y, O, B, k, F, N.x, N.y) && L(N.prev, N, N.next) >= 0 || (N = N.prevZ, q.x >= G && q.x <= L0 && q.y >= D && q.y <= T0 && q !== w && q !== A && P(T, Y, O, B, k, F, q.x, q.y) && L(q.prev, q, q.next) >= 0)) return !1;
|
|
3154
3183
|
q = q.nextZ;
|
|
3155
3184
|
}
|
|
3156
3185
|
for (; N && N.z >= it; ) {
|
|
3157
|
-
if (N.x >=
|
|
3186
|
+
if (N.x >= G && N.x <= L0 && N.y >= D && N.y <= T0 && N !== w && N !== A && P(T, Y, O, B, k, F, N.x, N.y) && L(N.prev, N, N.next) >= 0) return !1;
|
|
3158
3187
|
N = N.prevZ;
|
|
3159
3188
|
}
|
|
3160
3189
|
for (; q && q.z <= ot; ) {
|
|
3161
|
-
if (q.x >=
|
|
3190
|
+
if (q.x >= G && q.x <= L0 && q.y >= D && q.y <= T0 && q !== w && q !== A && P(T, Y, O, B, k, F, q.x, q.y) && L(q.prev, q, q.next) >= 0) return !1;
|
|
3162
3191
|
q = q.nextZ;
|
|
3163
3192
|
}
|
|
3164
3193
|
return !0;
|
|
@@ -3166,31 +3195,31 @@ function sn() {
|
|
|
3166
3195
|
function s(g, d, p) {
|
|
3167
3196
|
var v = g;
|
|
3168
3197
|
do {
|
|
3169
|
-
var w = v.prev,
|
|
3170
|
-
!S(w,
|
|
3198
|
+
var w = v.prev, m = v.next.next;
|
|
3199
|
+
!S(w, m) && C(w, v, v.next, m) && U(w, m) && U(m, w) && (d.push(w.i / p | 0), d.push(v.i / p | 0), d.push(m.i / p | 0), c0(v), c0(v.next), v = g = m), v = v.next;
|
|
3171
3200
|
} while (v !== g);
|
|
3172
3201
|
return t(v);
|
|
3173
3202
|
}
|
|
3174
|
-
function r(g, d, p, v, w,
|
|
3175
|
-
var
|
|
3203
|
+
function r(g, d, p, v, w, m) {
|
|
3204
|
+
var A = g;
|
|
3176
3205
|
do {
|
|
3177
|
-
for (var T =
|
|
3178
|
-
if (
|
|
3179
|
-
var O = a0(
|
|
3180
|
-
|
|
3206
|
+
for (var T = A.next.next; T !== A.prev; ) {
|
|
3207
|
+
if (A.i !== T.i && E(A, T)) {
|
|
3208
|
+
var O = a0(A, T);
|
|
3209
|
+
A = t(A, A.next), O = t(O, O.next), o(A, d, p, v, w, m, 0), o(O, d, p, v, w, m, 0);
|
|
3181
3210
|
return;
|
|
3182
3211
|
}
|
|
3183
3212
|
T = T.next;
|
|
3184
3213
|
}
|
|
3185
|
-
|
|
3186
|
-
} while (
|
|
3214
|
+
A = A.next;
|
|
3215
|
+
} while (A !== g);
|
|
3187
3216
|
}
|
|
3188
3217
|
function h(g, d, p, v) {
|
|
3189
|
-
var w = [],
|
|
3190
|
-
for (
|
|
3191
|
-
T = d[
|
|
3192
|
-
for (w.sort(c),
|
|
3193
|
-
p = f(w[
|
|
3218
|
+
var w = [], m, A, T, O, k;
|
|
3219
|
+
for (m = 0, A = d.length; m < A; m++)
|
|
3220
|
+
T = d[m] * v, O = m < A - 1 ? d[m + 1] * v : g.length, k = e(g, T, O, v, !1), k === k.next && (k.steiner = !0), w.push(M(k));
|
|
3221
|
+
for (w.sort(c), m = 0; m < w.length; m++)
|
|
3222
|
+
p = f(w[m], p);
|
|
3194
3223
|
return p;
|
|
3195
3224
|
}
|
|
3196
3225
|
function c(g, d) {
|
|
@@ -3204,22 +3233,22 @@ function sn() {
|
|
|
3204
3233
|
return t(v, v.next), t(p, p.next);
|
|
3205
3234
|
}
|
|
3206
3235
|
function x(g, d) {
|
|
3207
|
-
var p = d, v = g.x, w = g.y,
|
|
3236
|
+
var p = d, v = g.x, w = g.y, m = -1 / 0, A;
|
|
3208
3237
|
do {
|
|
3209
3238
|
if (w <= p.y && w >= p.next.y && p.next.y !== p.y) {
|
|
3210
3239
|
var T = p.x + (w - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
|
|
3211
|
-
if (T <= v && T >
|
|
3212
|
-
return
|
|
3240
|
+
if (T <= v && T > m && (m = T, A = p.x < p.next.x ? p : p.next, T === v))
|
|
3241
|
+
return A;
|
|
3213
3242
|
}
|
|
3214
3243
|
p = p.next;
|
|
3215
3244
|
} while (p !== d);
|
|
3216
|
-
if (!
|
|
3217
|
-
var O =
|
|
3218
|
-
p =
|
|
3245
|
+
if (!A) return null;
|
|
3246
|
+
var O = A, k = A.x, Y = A.y, B = 1 / 0, F;
|
|
3247
|
+
p = A;
|
|
3219
3248
|
do
|
|
3220
|
-
v >= p.x && p.x >=
|
|
3249
|
+
v >= p.x && p.x >= k && v !== p.x && P(w < Y ? v : m, w, k, Y, w < Y ? m : v, w, p.x, p.y) && (F = Math.abs(w - p.y) / (v - p.x), U(p, g) && (F < B || F === B && (p.x > A.x || p.x === A.x && l(A, p))) && (A = p, B = F)), p = p.next;
|
|
3221
3250
|
while (p !== O);
|
|
3222
|
-
return
|
|
3251
|
+
return A;
|
|
3223
3252
|
}
|
|
3224
3253
|
function l(g, d) {
|
|
3225
3254
|
return L(g.prev, g, d.prev) < 0 && L(d.next, g, g.next) < 0;
|
|
@@ -3229,20 +3258,20 @@ function sn() {
|
|
|
3229
3258
|
do
|
|
3230
3259
|
w.z === 0 && (w.z = y(w.x, w.y, d, p, v)), w.prevZ = w.prev, w.nextZ = w.next, w = w.next;
|
|
3231
3260
|
while (w !== g);
|
|
3232
|
-
w.prevZ.nextZ = null, w.prevZ = null,
|
|
3261
|
+
w.prevZ.nextZ = null, w.prevZ = null, b(w);
|
|
3233
3262
|
}
|
|
3234
|
-
function
|
|
3235
|
-
var d, p, v, w,
|
|
3263
|
+
function b(g) {
|
|
3264
|
+
var d, p, v, w, m, A, T, O, k = 1;
|
|
3236
3265
|
do {
|
|
3237
|
-
for (p = g, g = null,
|
|
3238
|
-
for (
|
|
3266
|
+
for (p = g, g = null, m = null, A = 0; p; ) {
|
|
3267
|
+
for (A++, v = p, T = 0, d = 0; d < k && (T++, v = v.nextZ, !!v); d++)
|
|
3239
3268
|
;
|
|
3240
|
-
for (O =
|
|
3241
|
-
T !== 0 && (O === 0 || !v || p.z <= v.z) ? (w = p, p = p.nextZ, T--) : (w = v, v = v.nextZ, O--),
|
|
3269
|
+
for (O = k; T > 0 || O > 0 && v; )
|
|
3270
|
+
T !== 0 && (O === 0 || !v || p.z <= v.z) ? (w = p, p = p.nextZ, T--) : (w = v, v = v.nextZ, O--), m ? m.nextZ = w : g = w, w.prevZ = m, m = w;
|
|
3242
3271
|
p = v;
|
|
3243
3272
|
}
|
|
3244
|
-
|
|
3245
|
-
} while (
|
|
3273
|
+
m.nextZ = null, k *= 2;
|
|
3274
|
+
} while (A > 1);
|
|
3246
3275
|
return g;
|
|
3247
3276
|
}
|
|
3248
3277
|
function y(g, d, p, v, w) {
|
|
@@ -3255,12 +3284,12 @@ function sn() {
|
|
|
3255
3284
|
while (d !== g);
|
|
3256
3285
|
return p;
|
|
3257
3286
|
}
|
|
3258
|
-
function
|
|
3259
|
-
return (w -
|
|
3287
|
+
function P(g, d, p, v, w, m, A, T) {
|
|
3288
|
+
return (w - A) * (d - T) >= (g - A) * (m - T) && (g - A) * (v - T) >= (p - A) * (d - T) && (p - A) * (m - T) >= (w - A) * (v - T);
|
|
3260
3289
|
}
|
|
3261
3290
|
function E(g, d) {
|
|
3262
|
-
return g.next.i !== d.i && g.prev.i !== d.i && !
|
|
3263
|
-
(
|
|
3291
|
+
return g.next.i !== d.i && g.prev.i !== d.i && !W(g, d) && // dones't intersect other edges
|
|
3292
|
+
(U(g, d) && U(d, g) && X(g, d) && // locally visible
|
|
3264
3293
|
(L(g.prev, g, d.prev) || L(g, d.prev, d)) || // does not create opposite-facing sectors
|
|
3265
3294
|
S(g, d) && L(g.prev, g, g.next) > 0 && L(d.prev, d, d.next) > 0);
|
|
3266
3295
|
}
|
|
@@ -3270,37 +3299,37 @@ function sn() {
|
|
|
3270
3299
|
function S(g, d) {
|
|
3271
3300
|
return g.x === d.x && g.y === d.y;
|
|
3272
3301
|
}
|
|
3273
|
-
function
|
|
3274
|
-
var w =
|
|
3275
|
-
return !!(w !==
|
|
3302
|
+
function C(g, d, p, v) {
|
|
3303
|
+
var w = z(L(g, d, p)), m = z(L(g, d, v)), A = z(L(p, v, g)), T = z(L(p, v, d));
|
|
3304
|
+
return !!(w !== m && A !== T || w === 0 && R(g, p, d) || m === 0 && R(g, v, d) || A === 0 && R(p, g, v) || T === 0 && R(p, d, v));
|
|
3276
3305
|
}
|
|
3277
|
-
function
|
|
3306
|
+
function R(g, d, p) {
|
|
3278
3307
|
return d.x <= Math.max(g.x, p.x) && d.x >= Math.min(g.x, p.x) && d.y <= Math.max(g.y, p.y) && d.y >= Math.min(g.y, p.y);
|
|
3279
3308
|
}
|
|
3280
|
-
function
|
|
3309
|
+
function z(g) {
|
|
3281
3310
|
return g > 0 ? 1 : g < 0 ? -1 : 0;
|
|
3282
3311
|
}
|
|
3283
|
-
function
|
|
3312
|
+
function W(g, d) {
|
|
3284
3313
|
var p = g;
|
|
3285
3314
|
do {
|
|
3286
|
-
if (p.i !== g.i && p.next.i !== g.i && p.i !== d.i && p.next.i !== d.i &&
|
|
3315
|
+
if (p.i !== g.i && p.next.i !== g.i && p.i !== d.i && p.next.i !== d.i && C(p, p.next, g, d)) return !0;
|
|
3287
3316
|
p = p.next;
|
|
3288
3317
|
} while (p !== g);
|
|
3289
3318
|
return !1;
|
|
3290
3319
|
}
|
|
3291
|
-
function
|
|
3320
|
+
function U(g, d) {
|
|
3292
3321
|
return L(g.prev, g, g.next) < 0 ? L(g, d, g.next) >= 0 && L(g, g.prev, d) >= 0 : L(g, d, g.prev) < 0 || L(g, g.next, d) < 0;
|
|
3293
3322
|
}
|
|
3294
|
-
function
|
|
3295
|
-
var p = g, v = !1, w = (g.x + d.x) / 2,
|
|
3323
|
+
function X(g, d) {
|
|
3324
|
+
var p = g, v = !1, w = (g.x + d.x) / 2, m = (g.y + d.y) / 2;
|
|
3296
3325
|
do
|
|
3297
|
-
p.y >
|
|
3326
|
+
p.y > m != p.next.y > m && p.next.y !== p.y && w < (p.next.x - p.x) * (m - p.y) / (p.next.y - p.y) + p.x && (v = !v), p = p.next;
|
|
3298
3327
|
while (p !== g);
|
|
3299
3328
|
return v;
|
|
3300
3329
|
}
|
|
3301
3330
|
function a0(g, d) {
|
|
3302
|
-
var p = new J(g.i, g.x, g.y), v = new J(d.i, d.x, d.y), w = g.next,
|
|
3303
|
-
return g.next = d, d.prev = g, p.next = w, w.prev = p, v.next = p, p.prev = v,
|
|
3331
|
+
var p = new J(g.i, g.x, g.y), v = new J(d.i, d.x, d.y), w = g.next, m = d.prev;
|
|
3332
|
+
return g.next = d, d.prev = g, p.next = w, w.prev = p, v.next = p, p.prev = v, m.next = v, v.prev = m, v;
|
|
3304
3333
|
}
|
|
3305
3334
|
function p0(g, d, p, v) {
|
|
3306
3335
|
var w = new J(g, d, p);
|
|
@@ -3313,41 +3342,41 @@ function sn() {
|
|
|
3313
3342
|
this.i = g, this.x = d, this.y = p, this.prev = null, this.next = null, this.z = 0, this.prevZ = null, this.nextZ = null, this.steiner = !1;
|
|
3314
3343
|
}
|
|
3315
3344
|
n.deviation = function(g, d, p, v) {
|
|
3316
|
-
var w = d && d.length,
|
|
3345
|
+
var w = d && d.length, m = w ? d[0] * p : g.length, A = Math.abs(R0(g, 0, m, p));
|
|
3317
3346
|
if (w)
|
|
3318
3347
|
for (var T = 0, O = d.length; T < O; T++) {
|
|
3319
|
-
var
|
|
3320
|
-
|
|
3348
|
+
var k = d[T] * p, Y = T < O - 1 ? d[T + 1] * p : g.length;
|
|
3349
|
+
A -= Math.abs(R0(g, k, Y, p));
|
|
3321
3350
|
}
|
|
3322
3351
|
var B = 0;
|
|
3323
3352
|
for (T = 0; T < v.length; T += 3) {
|
|
3324
|
-
var
|
|
3353
|
+
var F = v[T] * p, G = v[T + 1] * p, D = v[T + 2] * p;
|
|
3325
3354
|
B += Math.abs(
|
|
3326
|
-
(g[
|
|
3355
|
+
(g[F] - g[D]) * (g[G + 1] - g[F + 1]) - (g[F] - g[G]) * (g[D + 1] - g[F + 1])
|
|
3327
3356
|
);
|
|
3328
3357
|
}
|
|
3329
|
-
return
|
|
3358
|
+
return A === 0 && B === 0 ? 0 : Math.abs((B - A) / A);
|
|
3330
3359
|
};
|
|
3331
|
-
function
|
|
3332
|
-
for (var w = 0,
|
|
3333
|
-
w += (g[
|
|
3360
|
+
function R0(g, d, p, v) {
|
|
3361
|
+
for (var w = 0, m = d, A = p - v; m < p; m += v)
|
|
3362
|
+
w += (g[A] - g[m]) * (g[m + 1] + g[A + 1]), A = m;
|
|
3334
3363
|
return w;
|
|
3335
3364
|
}
|
|
3336
3365
|
return n.flatten = function(g) {
|
|
3337
3366
|
for (var d = g[0][0].length, p = { vertices: [], holes: [], dimensions: d }, v = 0, w = 0; w < g.length; w++) {
|
|
3338
|
-
for (var
|
|
3339
|
-
for (var
|
|
3367
|
+
for (var m = 0; m < g[w].length; m++)
|
|
3368
|
+
for (var A = 0; A < d; A++) p.vertices.push(g[w][m][A]);
|
|
3340
3369
|
w > 0 && (v += g[w - 1].length, p.holes.push(v));
|
|
3341
3370
|
}
|
|
3342
3371
|
return p;
|
|
3343
|
-
},
|
|
3372
|
+
}, k0.exports;
|
|
3344
3373
|
}
|
|
3345
|
-
|
|
3374
|
+
an();
|
|
3346
3375
|
function Dt(n, e) {
|
|
3347
3376
|
return n < e ? -1 : n > e ? 1 : n >= e ? 0 : NaN;
|
|
3348
3377
|
}
|
|
3349
|
-
function
|
|
3350
|
-
return n.length === 1 && (n =
|
|
3378
|
+
function hn(n) {
|
|
3379
|
+
return n.length === 1 && (n = ln(n)), {
|
|
3351
3380
|
left: function(e, t, o, i) {
|
|
3352
3381
|
for (o == null && (o = 0), i == null && (i = e.length); o < i; ) {
|
|
3353
3382
|
var a = o + i >>> 1;
|
|
@@ -3364,31 +3393,31 @@ function an(n) {
|
|
|
3364
3393
|
}
|
|
3365
3394
|
};
|
|
3366
3395
|
}
|
|
3367
|
-
function
|
|
3396
|
+
function ln(n) {
|
|
3368
3397
|
return function(e, t) {
|
|
3369
3398
|
return Dt(n(e), t);
|
|
3370
3399
|
};
|
|
3371
3400
|
}
|
|
3372
|
-
|
|
3401
|
+
hn(Dt);
|
|
3373
3402
|
function _n(n, e, t = 3) {
|
|
3374
|
-
const o =
|
|
3403
|
+
const o = on(n, e, { maxSegmentLength: t });
|
|
3375
3404
|
return {
|
|
3376
3405
|
check: (i) => typeof i == "string",
|
|
3377
3406
|
interpolate: (i, a, s) => o(s)
|
|
3378
3407
|
};
|
|
3379
3408
|
}
|
|
3380
|
-
function
|
|
3409
|
+
function On(n) {
|
|
3381
3410
|
const e = (o) => n.width * o, t = (o) => n.height * o;
|
|
3382
3411
|
return {
|
|
3383
3412
|
scaleX: e,
|
|
3384
3413
|
scaleY: t,
|
|
3385
|
-
position: (o, i) =>
|
|
3414
|
+
position: (o, i) => H({
|
|
3386
3415
|
x: e(o),
|
|
3387
3416
|
y: t(i)
|
|
3388
3417
|
})
|
|
3389
3418
|
};
|
|
3390
3419
|
}
|
|
3391
|
-
function
|
|
3420
|
+
function Rn(n) {
|
|
3392
3421
|
const e = [];
|
|
3393
3422
|
if (n.isAllKey) {
|
|
3394
3423
|
for (let t = 0; t <= n.animations.length; t++)
|
|
@@ -3403,46 +3432,46 @@ export {
|
|
|
3403
3432
|
x0 as Alignment,
|
|
3404
3433
|
n0 as Anchor,
|
|
3405
3434
|
et as Animate,
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3435
|
+
yn as Arrow,
|
|
3436
|
+
Cn as BrowserCanvasRenderer,
|
|
3437
|
+
vn as Circle,
|
|
3438
|
+
$ as Color,
|
|
3410
3439
|
tt as Easing,
|
|
3411
|
-
|
|
3412
|
-
|
|
3440
|
+
un as FadeIn,
|
|
3441
|
+
fn as FadeOut,
|
|
3413
3442
|
p1 as FontStyle,
|
|
3414
3443
|
x1 as FontWeight,
|
|
3415
|
-
|
|
3444
|
+
wn as Grid,
|
|
3416
3445
|
st as Group,
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3446
|
+
gn as Hide,
|
|
3447
|
+
dn as IFrame,
|
|
3448
|
+
mn as Image,
|
|
3449
|
+
bn as Line,
|
|
3421
3450
|
An as Mask,
|
|
3422
3451
|
j as ObjectType,
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3452
|
+
kn as Opaque,
|
|
3453
|
+
Mn as Path,
|
|
3454
|
+
En as Pause,
|
|
3455
|
+
Ln as Polygon,
|
|
3456
|
+
H as Position,
|
|
3428
3457
|
T1 as Presentation,
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3458
|
+
Tn as Rectangle,
|
|
3459
|
+
Pn as SVG,
|
|
3460
|
+
xn as ScreenCapture,
|
|
3461
|
+
pn as Show,
|
|
3433
3462
|
i0 as Size,
|
|
3434
|
-
|
|
3463
|
+
Sn as Slide,
|
|
3435
3464
|
s0 as SlideObject,
|
|
3436
3465
|
Et as SlideWebExtra,
|
|
3437
3466
|
m1 as Text,
|
|
3438
|
-
|
|
3467
|
+
In as TextUnit,
|
|
3439
3468
|
g1 as Transparent,
|
|
3440
3469
|
Ct as Update,
|
|
3441
|
-
|
|
3442
|
-
|
|
3470
|
+
Rn as getKeySlideBuildIndices,
|
|
3471
|
+
On as getSizingFunctions,
|
|
3443
3472
|
_n as getSmoothPathInterpolator,
|
|
3444
3473
|
w1 as getTextContentLength,
|
|
3445
3474
|
S1 as interpolateColor,
|
|
3446
|
-
|
|
3475
|
+
k1 as interpolateNumber
|
|
3447
3476
|
};
|
|
3448
3477
|
//# sourceMappingURL=presenter.mjs.map
|