presenter 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/export.js +24 -24
- package/dist/export.js.map +1 -1
- package/dist/export.mjs +1167 -1137
- package/dist/export.mjs.map +1 -1
- package/dist/presenter.js +2 -2
- package/dist/presenter.js.map +1 -1
- package/dist/presenter.mjs +910 -873
- package/dist/presenter.mjs.map +1 -1
- package/dist/renderer/browser-canvas/BrowserCanvasRenderer.d.ts +2 -0
- package/dist/renderer/browser-canvas/utils/text/getTextUnitMeasurements.d.ts +6 -1
- package/dist/types/TextStyle.d.ts +2 -0
- package/dist/utils/objects/text/getTextScriptVariant.d.ts +8 -0
- package/package.json +1 -1
package/dist/presenter.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var k = (n, e, t) =>
|
|
4
|
-
const
|
|
1
|
+
var zt = Object.defineProperty;
|
|
2
|
+
var Ut = (n, e, t) => e in n ? zt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var k = (n, e, t) => Ut(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
const f0 = {
|
|
5
5
|
/** Represents an animated change in an object's properties. */
|
|
6
6
|
ANIMATE: "Animate",
|
|
7
7
|
/** Represents a pause in the animation timeline. */
|
|
@@ -9,10 +9,10 @@ const u0 = {
|
|
|
9
9
|
/** Represents an immediate update to an object's properties without animation. */
|
|
10
10
|
UPDATE: "Update"
|
|
11
11
|
};
|
|
12
|
-
function
|
|
12
|
+
function Yt(n) {
|
|
13
13
|
return n * n * n;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function Ht(n) {
|
|
16
16
|
return --n * n * n + 1;
|
|
17
17
|
}
|
|
18
18
|
function Xt(n) {
|
|
@@ -33,7 +33,7 @@ var J0 = 1.70158;
|
|
|
33
33
|
}
|
|
34
34
|
return t.overshoot = n, t;
|
|
35
35
|
})(J0);
|
|
36
|
-
var
|
|
36
|
+
var $t = (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;
|
|
@@ -43,18 +43,18 @@ var Ht = (function n(e) {
|
|
|
43
43
|
const tt = {
|
|
44
44
|
LINEAR: (n) => n,
|
|
45
45
|
CUBIC: Xt,
|
|
46
|
-
CUBIC_IN:
|
|
47
|
-
CUBIC_OUT:
|
|
48
|
-
BACK_IN_OUT:
|
|
49
|
-
},
|
|
46
|
+
CUBIC_IN: Yt,
|
|
47
|
+
CUBIC_OUT: Ht,
|
|
48
|
+
BACK_IN_OUT: $t.overshoot(0.8)
|
|
49
|
+
}, Gt = tt.LINEAR;
|
|
50
50
|
function et(n, e, t = {}) {
|
|
51
51
|
return {
|
|
52
|
-
type:
|
|
52
|
+
type: f0.ANIMATE,
|
|
53
53
|
object: n,
|
|
54
54
|
props: e,
|
|
55
55
|
delay: 0,
|
|
56
56
|
duration: 1e3,
|
|
57
|
-
easing:
|
|
57
|
+
easing: Gt,
|
|
58
58
|
block: !1,
|
|
59
59
|
interpolators: null,
|
|
60
60
|
isKey: !1,
|
|
@@ -62,14 +62,14 @@ function et(n, e, t = {}) {
|
|
|
62
62
|
...typeof t == "number" ? { duration: t } : t
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function pn(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 dn(n, e = {}) {
|
|
73
73
|
return et(n, { opacity: 0 }, {
|
|
74
74
|
duration: 500,
|
|
75
75
|
easing: tt.CUBIC,
|
|
@@ -78,7 +78,7 @@ function fn(n, e = {}) {
|
|
|
78
78
|
}
|
|
79
79
|
function Ct(n, e, t = {}) {
|
|
80
80
|
return {
|
|
81
|
-
type:
|
|
81
|
+
type: f0.UPDATE,
|
|
82
82
|
isKey: !1,
|
|
83
83
|
object: n,
|
|
84
84
|
props: e,
|
|
@@ -86,13 +86,13 @@ function Ct(n, e, t = {}) {
|
|
|
86
86
|
...t
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function xn(n) {
|
|
90
90
|
return Ct(n, { opacity: 0 });
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function yn(n) {
|
|
93
93
|
return Ct(n, { opacity: 1 });
|
|
94
94
|
}
|
|
95
|
-
const
|
|
95
|
+
const o0 = {
|
|
96
96
|
TOP_LEFT: "TopLeft",
|
|
97
97
|
TOP: "Top",
|
|
98
98
|
TOP_RIGHT: "TopRight",
|
|
@@ -102,11 +102,11 @@ const n0 = {
|
|
|
102
102
|
BOTTOM_LEFT: "BottomLeft",
|
|
103
103
|
BOTTOM: "Bottom",
|
|
104
104
|
BOTTOM_RIGHT: "BottomRight"
|
|
105
|
-
},
|
|
105
|
+
}, h0 = o0.TOP_LEFT;
|
|
106
106
|
function $(n, e = 0, t = 0, o = 1) {
|
|
107
107
|
if (typeof n == "string") {
|
|
108
108
|
const i = n.replace("#", ""), a = parseInt(i, 16);
|
|
109
|
-
return isNaN(a) ? (console.warn("Invalid hex color format:", n),
|
|
109
|
+
return isNaN(a) ? (console.warn("Invalid hex color format:", n), Q) : i.length === 6 ? {
|
|
110
110
|
red: a >> 16 & 255,
|
|
111
111
|
green: a >> 8 & 255,
|
|
112
112
|
blue: a & 255,
|
|
@@ -116,7 +116,7 @@ function $(n, e = 0, t = 0, o = 1) {
|
|
|
116
116
|
green: a >> 16 & 255,
|
|
117
117
|
blue: a >> 8 & 255,
|
|
118
118
|
alpha: (a & 255) / 255
|
|
119
|
-
} : (console.warn("Invalid hex color format:", n),
|
|
119
|
+
} : (console.warn("Invalid hex color format:", n), Q);
|
|
120
120
|
} else if (typeof n == "number")
|
|
121
121
|
return {
|
|
122
122
|
red: n,
|
|
@@ -138,12 +138,12 @@ $.GREEN = $(0, 255, 0);
|
|
|
138
138
|
$.RED = $(255, 0, 0);
|
|
139
139
|
$.TRANSPARENT = $(0, 0, 0, 0);
|
|
140
140
|
$.WHITE = $(255, 255, 255);
|
|
141
|
-
const
|
|
142
|
-
function
|
|
141
|
+
const Q = { red: 0, green: 0, blue: 0, alpha: 1 };
|
|
142
|
+
function St(n = null) {
|
|
143
143
|
return {
|
|
144
144
|
content: null,
|
|
145
145
|
setup: null,
|
|
146
|
-
anchor:
|
|
146
|
+
anchor: o0.TOP_LEFT,
|
|
147
147
|
height: 0,
|
|
148
148
|
width: 0,
|
|
149
149
|
x: 0,
|
|
@@ -151,51 +151,51 @@ function Et(n = null) {
|
|
|
151
151
|
...n
|
|
152
152
|
};
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function Et(n, e = null) {
|
|
155
155
|
return n.alpha * (e ?? 1);
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
const { red: t, green: o, blue: i } = n, a = t << 16 | o << 8 | i, s = Math.round(
|
|
157
|
+
function S0(n, e = null) {
|
|
158
|
+
const { red: t, green: o, blue: i } = n, a = t << 16 | o << 8 | i, s = Math.round(Et(n, e) * 255);
|
|
159
159
|
return `#${a.toString(16).padStart(6, "0")}${s !== 255 ? s.toString(16).padStart(2, "0") : ""}`;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function vn(n = null) {
|
|
162
162
|
const {
|
|
163
163
|
url: e = "https://wikipedia.org/",
|
|
164
164
|
backgroundColor: t = $.TRANSPARENT,
|
|
165
|
-
strokeColor: o =
|
|
165
|
+
strokeColor: o = Q,
|
|
166
166
|
strokeWidth: i = 0,
|
|
167
167
|
pointerEvents: a = "auto",
|
|
168
168
|
scale: s = 1,
|
|
169
|
-
anchor: r =
|
|
169
|
+
anchor: r = h0,
|
|
170
170
|
height: h = 1e3,
|
|
171
171
|
width: c = 1e3,
|
|
172
172
|
x: f = 0,
|
|
173
|
-
y:
|
|
173
|
+
y: d = 0
|
|
174
174
|
} = n || {}, l = document.createElement("iframe");
|
|
175
|
-
l.src = e, l.style.backgroundColor =
|
|
175
|
+
l.src = e, l.style.backgroundColor = S0(t), l.style.border = i > 0 ? `${i}px solid ${S0(o)}` : "none", l.style.pointerEvents = a;
|
|
176
176
|
const u = (100 / s).toFixed(3) + "%";
|
|
177
|
-
return l.style.height = i === 0 ? u : `calc(${u} - ${i * 2}px)`, l.style.width = i === 0 ? u : `calc(${u} - ${i * 2}px)`, l.style.transform = `scale(${s})`, l.style.transformOrigin = "top left",
|
|
177
|
+
return l.style.height = i === 0 ? u : `calc(${u} - ${i * 2}px)`, l.style.width = i === 0 ? u : `calc(${u} - ${i * 2}px)`, l.style.transform = `scale(${s})`, l.style.transformOrigin = "top left", St({
|
|
178
178
|
content: l,
|
|
179
179
|
anchor: r,
|
|
180
180
|
height: h,
|
|
181
181
|
width: c,
|
|
182
182
|
x: f,
|
|
183
|
-
y:
|
|
183
|
+
y: d
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
186
|
const x0 = {
|
|
187
187
|
LEFT: "left",
|
|
188
188
|
CENTER: "center",
|
|
189
189
|
RIGHT: "right"
|
|
190
|
-
},
|
|
191
|
-
function
|
|
190
|
+
}, Wt = x0.LEFT;
|
|
191
|
+
function s0(n, e) {
|
|
192
192
|
throw new Error("Unexpected value: " + n);
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function wn(n = null) {
|
|
195
195
|
const {
|
|
196
196
|
alignment: e = x0.LEFT,
|
|
197
197
|
scale: t = 1,
|
|
198
|
-
anchor: o =
|
|
198
|
+
anchor: o = h0,
|
|
199
199
|
height: i = 1e3,
|
|
200
200
|
width: a = 1e3,
|
|
201
201
|
x: s = 0,
|
|
@@ -214,16 +214,16 @@ function xn(n = null) {
|
|
|
214
214
|
f.style.transformOrigin = "top right";
|
|
215
215
|
break;
|
|
216
216
|
default:
|
|
217
|
-
|
|
217
|
+
s0(e);
|
|
218
218
|
}
|
|
219
219
|
c.appendChild(f);
|
|
220
|
-
const
|
|
220
|
+
const d = {
|
|
221
221
|
video: {
|
|
222
222
|
displaySurface: "window"
|
|
223
223
|
},
|
|
224
224
|
audio: !1
|
|
225
225
|
};
|
|
226
|
-
return navigator.mediaDevices.getDisplayMedia(
|
|
226
|
+
return navigator.mediaDevices.getDisplayMedia(d).then((l) => {
|
|
227
227
|
const u = l.getVideoTracks()[0];
|
|
228
228
|
u !== void 0 && (u.onended = function() {
|
|
229
229
|
f.style.display = "none";
|
|
@@ -234,7 +234,7 @@ function xn(n = null) {
|
|
|
234
234
|
f.srcObject.getTracks().forEach((u) => u.stop()), f.style.display = "none", f.srcObject = null;
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
|
-
return
|
|
237
|
+
return St({
|
|
238
238
|
content: null,
|
|
239
239
|
setup: h,
|
|
240
240
|
anchor: o,
|
|
@@ -244,7 +244,7 @@ function xn(n = null) {
|
|
|
244
244
|
y: r
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
|
-
const
|
|
247
|
+
const U = {
|
|
248
248
|
ARROW: "Arrow",
|
|
249
249
|
CIRCLE: "Circle",
|
|
250
250
|
GROUP: "Group",
|
|
@@ -258,19 +258,19 @@ const j = {
|
|
|
258
258
|
SVG: "SVG",
|
|
259
259
|
TEXT: "Text"
|
|
260
260
|
};
|
|
261
|
-
function
|
|
261
|
+
function l0(n) {
|
|
262
262
|
return {
|
|
263
|
-
objectType:
|
|
263
|
+
objectType: U.SLIDE_OBJECT,
|
|
264
264
|
opacity: 1,
|
|
265
265
|
...n
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function mn(n = null) {
|
|
269
269
|
const { arrowheadSize: e, width: t = 10, ...o } = n || {}, i = e ?? t * 4;
|
|
270
|
-
return
|
|
271
|
-
objectType:
|
|
270
|
+
return l0({
|
|
271
|
+
objectType: U.ARROW,
|
|
272
272
|
arrowheadSize: i,
|
|
273
|
-
color:
|
|
273
|
+
color: Q,
|
|
274
274
|
drawn: 1,
|
|
275
275
|
endX: 100,
|
|
276
276
|
endY: 100,
|
|
@@ -283,25 +283,25 @@ function yn(n = null) {
|
|
|
283
283
|
...o
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
|
-
const
|
|
287
|
-
function
|
|
288
|
-
return
|
|
289
|
-
objectType:
|
|
290
|
-
anchor:
|
|
291
|
-
strokeColor:
|
|
286
|
+
const Zt = 50;
|
|
287
|
+
function An(n = null) {
|
|
288
|
+
return l0({
|
|
289
|
+
objectType: U.CIRCLE,
|
|
290
|
+
anchor: h0,
|
|
291
|
+
strokeColor: Q,
|
|
292
292
|
strokeWidth: 0,
|
|
293
293
|
drawn: 1,
|
|
294
|
-
fillColor:
|
|
295
|
-
radius:
|
|
294
|
+
fillColor: Q,
|
|
295
|
+
radius: Zt,
|
|
296
296
|
x: 0,
|
|
297
297
|
y: 0,
|
|
298
298
|
...n
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
301
|
function st(n, e = null) {
|
|
302
|
-
return
|
|
303
|
-
objectType:
|
|
304
|
-
anchor:
|
|
302
|
+
return l0({
|
|
303
|
+
objectType: U.GROUP,
|
|
304
|
+
anchor: h0,
|
|
305
305
|
height: 0,
|
|
306
306
|
objects: n,
|
|
307
307
|
previewColor: null,
|
|
@@ -323,9 +323,9 @@ function st(n, e = null) {
|
|
|
323
323
|
...e
|
|
324
324
|
});
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function bn(n) {
|
|
327
327
|
const {
|
|
328
|
-
anchor: e =
|
|
328
|
+
anchor: e = h0,
|
|
329
329
|
cols: t = 1,
|
|
330
330
|
rows: o = 1,
|
|
331
331
|
gapX: i = 0,
|
|
@@ -335,40 +335,40 @@ function wn(n) {
|
|
|
335
335
|
height: h = 0,
|
|
336
336
|
x: c = 0,
|
|
337
337
|
y: f = 0,
|
|
338
|
-
objects:
|
|
338
|
+
objects: d = () => null
|
|
339
339
|
} = n, l = [], u = [];
|
|
340
|
-
let
|
|
341
|
-
for (let
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
let
|
|
345
|
-
for (let
|
|
346
|
-
const C =
|
|
347
|
-
|
|
340
|
+
let m = 0, y = 0;
|
|
341
|
+
for (let T = 0; T < o; T++) {
|
|
342
|
+
const S = [];
|
|
343
|
+
m = 0;
|
|
344
|
+
let P = 0;
|
|
345
|
+
for (let E = 0; E < t; E++) {
|
|
346
|
+
const C = d(T, E), O = typeof r == "function" ? r(T, E) : r, R = typeof h == "function" ? h(T, E) : h;
|
|
347
|
+
S.push(C), C != null && u.push(
|
|
348
348
|
st([C], {
|
|
349
|
-
x:
|
|
349
|
+
x: m,
|
|
350
350
|
y
|
|
351
351
|
})
|
|
352
|
-
),
|
|
352
|
+
), m += O + i, P = Math.max(P, R);
|
|
353
353
|
}
|
|
354
|
-
l.push(
|
|
354
|
+
l.push(S), y += P + a;
|
|
355
355
|
}
|
|
356
356
|
return {
|
|
357
357
|
grid: st(u, {
|
|
358
358
|
x: c,
|
|
359
359
|
y: f,
|
|
360
360
|
height: y - a,
|
|
361
|
-
width:
|
|
361
|
+
width: m - i,
|
|
362
362
|
anchor: e,
|
|
363
363
|
...s
|
|
364
364
|
}),
|
|
365
365
|
objects: l
|
|
366
366
|
};
|
|
367
367
|
}
|
|
368
|
-
function
|
|
369
|
-
return
|
|
370
|
-
objectType:
|
|
371
|
-
anchor:
|
|
368
|
+
function Mn(n = null) {
|
|
369
|
+
return l0({
|
|
370
|
+
objectType: U.IMAGE,
|
|
371
|
+
anchor: h0,
|
|
372
372
|
cornerRadius: 0,
|
|
373
373
|
height: 100,
|
|
374
374
|
imageId: "",
|
|
@@ -379,10 +379,10 @@ function mn(n = null) {
|
|
|
379
379
|
...n
|
|
380
380
|
});
|
|
381
381
|
}
|
|
382
|
-
function
|
|
383
|
-
return
|
|
384
|
-
objectType:
|
|
385
|
-
color:
|
|
382
|
+
function Ln(n = null) {
|
|
383
|
+
return l0({
|
|
384
|
+
objectType: U.LINE,
|
|
385
|
+
color: Q,
|
|
386
386
|
drawn: 1,
|
|
387
387
|
endX: 100,
|
|
388
388
|
endY: 100,
|
|
@@ -394,10 +394,10 @@ function An(n = null) {
|
|
|
394
394
|
...n
|
|
395
395
|
});
|
|
396
396
|
}
|
|
397
|
-
function
|
|
398
|
-
return
|
|
399
|
-
objectType:
|
|
400
|
-
anchor:
|
|
397
|
+
function Tn(n, e = null) {
|
|
398
|
+
return l0({
|
|
399
|
+
objectType: U.MASK,
|
|
400
|
+
anchor: h0,
|
|
401
401
|
height: 100,
|
|
402
402
|
objects: n,
|
|
403
403
|
preview: !1,
|
|
@@ -407,11 +407,11 @@ function Mn(n, e = null) {
|
|
|
407
407
|
...e
|
|
408
408
|
});
|
|
409
409
|
}
|
|
410
|
-
var
|
|
411
|
-
const e = (n && n.length > 0 ? n : "M0,0").match(
|
|
410
|
+
var Vt = Object.defineProperty, _ = (n, e) => Vt(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 }, Kt = /([astvzqmhlc])([^astvzqmhlc]*)/gi, Qt = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, Jt = _((n) => {
|
|
411
|
+
const e = (n && n.length > 0 ? n : "M0,0").match(Kt);
|
|
412
412
|
if (!e) throw new Error(`No path elements found in string ${n}`);
|
|
413
413
|
return e.reduce((t, o) => {
|
|
414
|
-
let i = o.charAt(0), a = i.toLowerCase(), s =
|
|
414
|
+
let i = o.charAt(0), a = i.toLowerCase(), s = te(o.substring(1));
|
|
415
415
|
if (a === "m" && s.length > 2 && (t.push([i, ...s.splice(0, 2)]), a = "l", i = i === "m" ? "l" : "L"), a.toLowerCase() === "a" && (s.length === 5 || s.length === 6)) {
|
|
416
416
|
const r = o.substring(1).trim().split(" ");
|
|
417
417
|
s = [Number(r[0]), Number(r[1]), Number(r[2]), Number(r[3].charAt(0)), Number(r[3].charAt(1)), Number(r[3].substring(2)), Number(r[4])];
|
|
@@ -426,10 +426,10 @@ var Zt = Object.defineProperty, _ = (n, e) => Zt(n, "name", { value: e, configur
|
|
|
426
426
|
}
|
|
427
427
|
return t;
|
|
428
428
|
}, []);
|
|
429
|
-
}, "default"),
|
|
430
|
-
const e = n.match(
|
|
429
|
+
}, "default"), te = _((n) => {
|
|
430
|
+
const e = n.match(Qt);
|
|
431
431
|
return e ? e.map(Number) : [];
|
|
432
|
-
}, "parseValues"), w0,
|
|
432
|
+
}, "parseValues"), w0, J = (w0 = class {
|
|
433
433
|
constructor(e, t, o, i) {
|
|
434
434
|
k(this, "x0");
|
|
435
435
|
k(this, "x1");
|
|
@@ -483,51 +483,51 @@ var Zt = Object.defineProperty, _ = (n, e) => Zt(n, "name", { value: e, configur
|
|
|
483
483
|
return { x: o.x, y: o.y, tangentX: t.x, tangentY: t.y };
|
|
484
484
|
}, "getPropertiesAtLength"));
|
|
485
485
|
this.x0 = e, this.y0 = t, this.rx = o, this.ry = i, this.xAxisRotate = a, this.LargeArcFlag = s, this.SweepFlag = r, this.x1 = h, this.y1 = c;
|
|
486
|
-
const f =
|
|
487
|
-
return ht({ x: e, y: t }, o, i, a, s, r, { x: h, y: c },
|
|
486
|
+
const f = ee(300, function(d) {
|
|
487
|
+
return ht({ x: e, y: t }, o, i, a, s, r, { x: h, y: c }, d);
|
|
488
488
|
});
|
|
489
489
|
this.length = f.arcLength;
|
|
490
490
|
}
|
|
491
491
|
}, _(m0, "Arc"), m0), ht = _((n, e, t, o, i, a, s, r) => {
|
|
492
|
-
e = Math.abs(e), t = Math.abs(t), o =
|
|
493
|
-
const h =
|
|
492
|
+
e = Math.abs(e), t = Math.abs(t), o = ne(o, 360);
|
|
493
|
+
const h = re(o);
|
|
494
494
|
if (n.x === s.x && n.y === s.y) return { x: n.x, y: n.y, ellipticalArcAngle: 0 };
|
|
495
495
|
if (e === 0 || t === 0) return { x: 0, y: 0, ellipticalArcAngle: 0 };
|
|
496
|
-
const c = (n.x - s.x) / 2, f = (n.y - s.y) / 2,
|
|
496
|
+
const c = (n.x - s.x) / 2, f = (n.y - s.y) / 2, d = { x: Math.cos(h) * c + Math.sin(h) * f, y: -Math.sin(h) * c + Math.cos(h) * f }, l = Math.pow(d.x, 2) / Math.pow(e, 2) + Math.pow(d.y, 2) / Math.pow(t, 2);
|
|
497
497
|
l > 1 && (e = Math.sqrt(l) * e, t = Math.sqrt(l) * t);
|
|
498
|
-
let u = (Math.pow(e, 2) * Math.pow(t, 2) - Math.pow(e, 2) * Math.pow(
|
|
498
|
+
let u = (Math.pow(e, 2) * Math.pow(t, 2) - Math.pow(e, 2) * Math.pow(d.y, 2) - Math.pow(t, 2) * Math.pow(d.x, 2)) / (Math.pow(e, 2) * Math.pow(d.y, 2) + Math.pow(t, 2) * Math.pow(d.x, 2));
|
|
499
499
|
u = u < 0 ? 0 : u;
|
|
500
|
-
const
|
|
501
|
-
let
|
|
502
|
-
!a &&
|
|
503
|
-
const C =
|
|
504
|
-
return { x: Math.cos(h) *
|
|
505
|
-
}, "pointOnEllipticalArc"),
|
|
500
|
+
const m = (i !== a ? 1 : -1) * Math.sqrt(u), y = m * (e * d.y / t), M = m * (-t * d.x / e), T = { 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 }, S = { x: (d.x - y) / e, y: (d.y - M) / t }, P = ct({ x: 1, y: 0 }, S);
|
|
501
|
+
let E = ct(S, { x: (-d.x - y) / e, y: (-d.y - M) / t });
|
|
502
|
+
!a && E > 0 ? E -= 2 * Math.PI : a && E < 0 && (E += 2 * Math.PI), E %= 2 * Math.PI;
|
|
503
|
+
const C = P + E * r, O = e * Math.cos(C), R = t * Math.sin(C);
|
|
504
|
+
return { x: Math.cos(h) * O - Math.sin(h) * R + T.x, y: Math.sin(h) * O + Math.cos(h) * R + T.y, ellipticalArcStartAngle: P, ellipticalArcEndAngle: P + E, ellipticalArcAngle: C, ellipticalArcCenter: T, resultantRx: e, resultantRy: t };
|
|
505
|
+
}, "pointOnEllipticalArc"), ee = _((n, e) => {
|
|
506
506
|
n = n ?? 500;
|
|
507
507
|
let t = 0;
|
|
508
508
|
const o = [], i = [];
|
|
509
509
|
let a, s = e(0);
|
|
510
510
|
for (let r = 0; r < n; r++) {
|
|
511
|
-
const h =
|
|
511
|
+
const h = ie(r * (1 / n), 0, 1);
|
|
512
512
|
a = e(h), t += lt(s, a), i.push([s, a]), o.push({ t: h, arcLength: t }), s = a;
|
|
513
513
|
}
|
|
514
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 };
|
|
515
|
-
}, "approximateArcLengthOfCurve"),
|
|
515
|
+
}, "approximateArcLengthOfCurve"), ne = _((n, e) => (n % e + e) % e, "mod"), re = _((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"), ie = _((n, e, t) => Math.min(Math.max(n, e), t), "clamp"), ct = _((n, e) => {
|
|
516
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)));
|
|
517
517
|
return (n.x * e.y - n.y * e.x < 0 ? -1 : 1) * Math.acos(t / o);
|
|
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) => kt([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) => {
|
|
518
|
+
}, "angleBetween"), oe = [[], [], [-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]], se = [[], [], [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]], ae = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], he = _((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"), le = _((n, e, t) => kt([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"), ce = _((n, e, t) => {
|
|
519
519
|
let o, i;
|
|
520
520
|
const a = t / 2;
|
|
521
521
|
o = 0;
|
|
522
|
-
for (let s = 0; s < 20; s++) i = a *
|
|
522
|
+
for (let s = 0; s < 20; s++) i = a * oe[20][s] + a, o += se[20][s] * It(n, e, i);
|
|
523
523
|
return a * o;
|
|
524
|
-
}, "getCubicArcLength"), kt = _((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"),
|
|
524
|
+
}, "getCubicArcLength"), kt = _((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"), ue = _((n, e, t) => {
|
|
525
525
|
t === void 0 && (t = 1);
|
|
526
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;
|
|
527
527
|
if (r === 0) return t * Math.sqrt(Math.pow(n[2] - n[0], 2) + Math.pow(e[2] - e[0], 2));
|
|
528
|
-
const f = h / (2 * r),
|
|
529
|
-
return Math.sqrt(r) / 2 * (
|
|
530
|
-
}, "getQuadraticArcLength"),
|
|
528
|
+
const f = h / (2 * r), d = t + f, l = c / r - f * f, u = d * d + l > 0 ? Math.sqrt(d * d + l) : 0, m = f * f + l > 0 ? Math.sqrt(f * f + l) : 0, y = f + Math.sqrt(f * f + l) !== 0 && (d + u) / (f + m) !== 0 ? l * Math.log(Math.abs((d + u) / (f + m))) : 0;
|
|
529
|
+
return Math.sqrt(r) / 2 * (d * u - f * m + y);
|
|
530
|
+
}, "getQuadraticArcLength"), fe = _((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
531
|
function It(n, e, t) {
|
|
532
532
|
const o = G0(1, t, n), i = G0(1, t, e), a = o * o + i * i;
|
|
533
533
|
return Math.sqrt(a);
|
|
@@ -539,7 +539,7 @@ var G0 = _((n, e, t) => {
|
|
|
539
539
|
if (o === 0) return 0;
|
|
540
540
|
if (n === 0) {
|
|
541
541
|
a = 0;
|
|
542
|
-
for (let s = 0; s <= o; s++) a +=
|
|
542
|
+
for (let s = 0; s <= o; s++) a += ae[o][s] * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
|
|
543
543
|
return a;
|
|
544
544
|
}
|
|
545
545
|
i = new Array(o);
|
|
@@ -557,7 +557,7 @@ var G0 = _((n, e, t) => {
|
|
|
557
557
|
if (s++, s > 500) break;
|
|
558
558
|
}
|
|
559
559
|
return i;
|
|
560
|
-
}, "t2length"), A0,
|
|
560
|
+
}, "t2length"), A0, c0 = (A0 = class {
|
|
561
561
|
constructor(e, t, o, i, a, s, r, h) {
|
|
562
562
|
k(this, "a");
|
|
563
563
|
k(this, "b");
|
|
@@ -586,9 +586,9 @@ var G0 = _((n, e, t) => {
|
|
|
586
586
|
}, "getPropertiesAtLength"));
|
|
587
587
|
k(this, "getC", _(() => this.c, "getC"));
|
|
588
588
|
k(this, "getD", _(() => this.d, "getD"));
|
|
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 =
|
|
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 = ce, this.getPoint = he, this.getDerivative = le, this.d = { x: r, y: h }) : (this.getArcLength = ue, this.getPoint = kt, this.getDerivative = fe, 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);
|
|
590
590
|
}
|
|
591
|
-
}, _(A0, "Bezier"), A0),
|
|
591
|
+
}, _(A0, "Bezier"), A0), b0, ge = (b0 = class {
|
|
592
592
|
constructor(e) {
|
|
593
593
|
k(this, "length", 0);
|
|
594
594
|
k(this, "partial_lengths", []);
|
|
@@ -628,60 +628,60 @@ var G0 = _((n, e, t) => {
|
|
|
628
628
|
}
|
|
629
629
|
return e;
|
|
630
630
|
}, "getParts"));
|
|
631
|
-
const t = Array.isArray(e) ? e :
|
|
631
|
+
const t = Array.isArray(e) ? e : Jt(e);
|
|
632
632
|
let o, i = [0, 0], a = [0, 0], s = [0, 0];
|
|
633
633
|
for (let r = 0; r < t.length; r++) {
|
|
634
634
|
if (t[r][0] === "M") i = [t[r][1], t[r][2]], s = [i[0], i[1]], this.functions.push(null), r === 0 && (this.initial_point = { x: t[r][1], y: t[r][2] });
|
|
635
635
|
else if (t[r][0] === "m") i = [t[r][1] + i[0], t[r][2] + i[1]], s = [i[0], i[1]], this.functions.push(null);
|
|
636
|
-
else if (t[r][0] === "L") this.length += Math.sqrt(Math.pow(i[0] - t[r][1], 2) + Math.pow(i[1] - t[r][2], 2)), this.functions.push(new
|
|
637
|
-
else if (t[r][0] === "l") this.length += Math.sqrt(Math.pow(t[r][1], 2) + Math.pow(t[r][2], 2)), this.functions.push(new
|
|
638
|
-
else if (t[r][0] === "H") this.length += Math.abs(i[0] - t[r][1]), this.functions.push(new
|
|
639
|
-
else if (t[r][0] === "h") this.length += Math.abs(t[r][1]), this.functions.push(new
|
|
640
|
-
else if (t[r][0] === "V") this.length += Math.abs(i[1] - t[r][1]), this.functions.push(new
|
|
641
|
-
else if (t[r][0] === "v") this.length += Math.abs(t[r][1]), this.functions.push(new
|
|
642
|
-
else if (t[r][0] === "z" || t[r][0] === "Z") this.length += Math.sqrt(Math.pow(s[0] - i[0], 2) + Math.pow(s[1] - i[1], 2)), this.functions.push(new
|
|
643
|
-
else if (t[r][0] === "C") o = new
|
|
644
|
-
else if (t[r][0] === "c") o = new
|
|
636
|
+
else if (t[r][0] === "L") this.length += Math.sqrt(Math.pow(i[0] - t[r][1], 2) + Math.pow(i[1] - t[r][2], 2)), this.functions.push(new J(i[0], t[r][1], i[1], t[r][2])), i = [t[r][1], t[r][2]];
|
|
637
|
+
else if (t[r][0] === "l") this.length += Math.sqrt(Math.pow(t[r][1], 2) + Math.pow(t[r][2], 2)), this.functions.push(new J(i[0], t[r][1] + i[0], i[1], t[r][2] + i[1])), i = [t[r][1] + i[0], t[r][2] + i[1]];
|
|
638
|
+
else if (t[r][0] === "H") this.length += Math.abs(i[0] - t[r][1]), this.functions.push(new J(i[0], t[r][1], i[1], i[1])), i[0] = t[r][1];
|
|
639
|
+
else if (t[r][0] === "h") this.length += Math.abs(t[r][1]), this.functions.push(new J(i[0], i[0] + t[r][1], i[1], i[1])), i[0] = t[r][1] + i[0];
|
|
640
|
+
else if (t[r][0] === "V") this.length += Math.abs(i[1] - t[r][1]), this.functions.push(new J(i[0], i[0], i[1], t[r][1])), i[1] = t[r][1];
|
|
641
|
+
else if (t[r][0] === "v") this.length += Math.abs(t[r][1]), this.functions.push(new J(i[0], i[0], i[1], i[1] + t[r][1])), i[1] = t[r][1] + i[1];
|
|
642
|
+
else if (t[r][0] === "z" || t[r][0] === "Z") this.length += Math.sqrt(Math.pow(s[0] - i[0], 2) + Math.pow(s[1] - i[1], 2)), this.functions.push(new J(i[0], s[0], i[1], s[1])), i = [s[0], s[1]];
|
|
643
|
+
else if (t[r][0] === "C") o = new c0(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4], t[r][5], t[r][6]), this.length += o.getTotalLength(), i = [t[r][5], t[r][6]], this.functions.push(o);
|
|
644
|
+
else if (t[r][0] === "c") o = new c0(i[0], i[1], i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4], i[0] + t[r][5], i[1] + t[r][6]), o.getTotalLength() > 0 ? (this.length += o.getTotalLength(), this.functions.push(o), i = [t[r][5] + i[0], t[r][6] + i[1]]) : this.functions.push(new J(i[0], i[0], i[1], i[1]));
|
|
645
645
|
else if (t[r][0] === "S") {
|
|
646
646
|
if (r > 0 && ["C", "c", "S", "s"].indexOf(t[r - 1][0]) > -1) {
|
|
647
647
|
if (o) {
|
|
648
648
|
const h = o.getC();
|
|
649
|
-
o = new
|
|
649
|
+
o = new c0(i[0], i[1], 2 * i[0] - h.x, 2 * i[1] - h.y, t[r][1], t[r][2], t[r][3], t[r][4]);
|
|
650
650
|
}
|
|
651
|
-
} else o = new
|
|
651
|
+
} else o = new c0(i[0], i[1], i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4]);
|
|
652
652
|
o && (this.length += o.getTotalLength(), i = [t[r][3], t[r][4]], this.functions.push(o));
|
|
653
653
|
} else if (t[r][0] === "s") {
|
|
654
654
|
if (r > 0 && ["C", "c", "S", "s"].indexOf(t[r - 1][0]) > -1) {
|
|
655
655
|
if (o) {
|
|
656
656
|
const h = o.getC(), c = o.getD();
|
|
657
|
-
o = new
|
|
657
|
+
o = new c0(i[0], i[1], i[0] + c.x - h.x, i[1] + c.y - h.y, i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4]);
|
|
658
658
|
}
|
|
659
|
-
} else o = new
|
|
659
|
+
} else o = new c0(i[0], i[1], i[0], i[1], i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4]);
|
|
660
660
|
o && (this.length += o.getTotalLength(), i = [t[r][3] + i[0], t[r][4] + i[1]], this.functions.push(o));
|
|
661
661
|
} else if (t[r][0] === "Q") {
|
|
662
662
|
if (i[0] === t[r][1] && i[1] === t[r][2]) {
|
|
663
|
-
const h = new
|
|
663
|
+
const h = new J(t[r][1], t[r][3], t[r][2], t[r][4]);
|
|
664
664
|
this.length += h.getTotalLength(), this.functions.push(h);
|
|
665
|
-
} else o = new
|
|
665
|
+
} else o = new c0(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4], void 0, void 0), this.length += o.getTotalLength(), this.functions.push(o);
|
|
666
666
|
i = [t[r][3], t[r][4]], a = [t[r][1], t[r][2]];
|
|
667
667
|
} else if (t[r][0] === "q") {
|
|
668
|
-
if (t[r][1] !== 0 || t[r][2] !== 0) o = new
|
|
668
|
+
if (t[r][1] !== 0 || t[r][2] !== 0) o = new c0(i[0], i[1], i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4], void 0, void 0), this.length += o.getTotalLength(), this.functions.push(o);
|
|
669
669
|
else {
|
|
670
|
-
const h = new
|
|
670
|
+
const h = new J(i[0] + t[r][1], i[0] + t[r][3], i[1] + t[r][2], i[1] + t[r][4]);
|
|
671
671
|
this.length += h.getTotalLength(), this.functions.push(h);
|
|
672
672
|
}
|
|
673
673
|
a = [i[0] + t[r][1], i[1] + t[r][2]], i = [t[r][3] + i[0], t[r][4] + i[1]];
|
|
674
674
|
} else if (t[r][0] === "T") {
|
|
675
|
-
if (r > 0 && ["Q", "q", "T", "t"].indexOf(t[r - 1][0]) > -1) o = new
|
|
675
|
+
if (r > 0 && ["Q", "q", "T", "t"].indexOf(t[r - 1][0]) > -1) o = new c0(i[0], i[1], 2 * i[0] - a[0], 2 * i[1] - a[1], t[r][1], t[r][2], void 0, void 0), this.functions.push(o), this.length += o.getTotalLength();
|
|
676
676
|
else {
|
|
677
|
-
const h = new
|
|
677
|
+
const h = new J(i[0], t[r][1], i[1], t[r][2]);
|
|
678
678
|
this.functions.push(h), this.length += h.getTotalLength();
|
|
679
679
|
}
|
|
680
680
|
a = [2 * i[0] - a[0], 2 * i[1] - a[1]], i = [t[r][1], t[r][2]];
|
|
681
681
|
} else if (t[r][0] === "t") {
|
|
682
|
-
if (r > 0 && ["Q", "q", "T", "t"].indexOf(t[r - 1][0]) > -1) o = new
|
|
682
|
+
if (r > 0 && ["Q", "q", "T", "t"].indexOf(t[r - 1][0]) > -1) o = new c0(i[0], i[1], 2 * i[0] - a[0], 2 * i[1] - a[1], i[0] + t[r][1], i[1] + t[r][2], void 0, void 0), this.length += o.getTotalLength(), this.functions.push(o);
|
|
683
683
|
else {
|
|
684
|
-
const h = new
|
|
684
|
+
const h = new J(i[0], i[0] + t[r][1], i[1], i[1] + t[r][2]);
|
|
685
685
|
this.length += h.getTotalLength(), this.functions.push(h);
|
|
686
686
|
}
|
|
687
687
|
a = [2 * i[0] - a[0], 2 * i[1] - a[1]], i = [t[r][1] + i[0], t[r][2] + i[1]];
|
|
@@ -695,7 +695,7 @@ var G0 = _((n, e, t) => {
|
|
|
695
695
|
this.partial_lengths.push(this.length);
|
|
696
696
|
}
|
|
697
697
|
}
|
|
698
|
-
}, _(
|
|
698
|
+
}, _(b0, "SVGPathProperties"), b0), M0, W0 = (M0 = class {
|
|
699
699
|
constructor(e) {
|
|
700
700
|
k(this, "inst");
|
|
701
701
|
k(this, "getTotalLength", _(() => this.inst.getTotalLength(), "getTotalLength"));
|
|
@@ -703,20 +703,20 @@ var G0 = _((n, e, t) => {
|
|
|
703
703
|
k(this, "getTangentAtLength", _((e) => this.inst.getTangentAtLength(e), "getTangentAtLength"));
|
|
704
704
|
k(this, "getPropertiesAtLength", _((e) => this.inst.getPropertiesAtLength(e), "getPropertiesAtLength"));
|
|
705
705
|
k(this, "getParts", _(() => this.inst.getParts(), "getParts"));
|
|
706
|
-
if (this.inst = new
|
|
706
|
+
if (this.inst = new ge(e), !(this instanceof W0)) return new W0(e);
|
|
707
707
|
}
|
|
708
|
-
}, _(
|
|
709
|
-
function
|
|
708
|
+
}, _(M0, "_svgPathProperties"), M0);
|
|
709
|
+
function pe(n = $.BLACK) {
|
|
710
710
|
return { ...n, alpha: 0 };
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function Pn(n = null) {
|
|
713
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();
|
|
714
|
-
return
|
|
715
|
-
objectType:
|
|
716
|
-
anchor:
|
|
717
|
-
strokeColor:
|
|
714
|
+
return l0({
|
|
715
|
+
objectType: U.PATH,
|
|
716
|
+
anchor: h0,
|
|
717
|
+
strokeColor: Q,
|
|
718
718
|
drawn: 1,
|
|
719
|
-
fillColor:
|
|
719
|
+
fillColor: pe(),
|
|
720
720
|
isRounded: !1,
|
|
721
721
|
height: t,
|
|
722
722
|
path: r,
|
|
@@ -730,10 +730,10 @@ function bn(n = null) {
|
|
|
730
730
|
...s
|
|
731
731
|
});
|
|
732
732
|
}
|
|
733
|
-
function
|
|
734
|
-
return
|
|
735
|
-
objectType:
|
|
736
|
-
strokeColor:
|
|
733
|
+
function Cn(n = null) {
|
|
734
|
+
return l0({
|
|
735
|
+
objectType: U.POLYGON,
|
|
736
|
+
strokeColor: Q,
|
|
737
737
|
strokeWidth: 0,
|
|
738
738
|
drawn: 1,
|
|
739
739
|
points: [
|
|
@@ -741,18 +741,18 @@ function Ln(n = null) {
|
|
|
741
741
|
{ x: 100, y: 0 },
|
|
742
742
|
{ x: 100, y: 100 }
|
|
743
743
|
],
|
|
744
|
-
fillColor:
|
|
744
|
+
fillColor: Q,
|
|
745
745
|
...n
|
|
746
746
|
});
|
|
747
747
|
}
|
|
748
|
-
function
|
|
749
|
-
return
|
|
750
|
-
objectType:
|
|
751
|
-
anchor:
|
|
752
|
-
strokeColor:
|
|
748
|
+
function Sn(n = null) {
|
|
749
|
+
return l0({
|
|
750
|
+
objectType: U.RECTANGLE,
|
|
751
|
+
anchor: h0,
|
|
752
|
+
strokeColor: Q,
|
|
753
753
|
strokeWidth: 0,
|
|
754
754
|
drawn: 1,
|
|
755
|
-
fillColor:
|
|
755
|
+
fillColor: Q,
|
|
756
756
|
height: 100,
|
|
757
757
|
cornerRadius: 0,
|
|
758
758
|
width: 100,
|
|
@@ -761,10 +761,10 @@ function Tn(n = null) {
|
|
|
761
761
|
...n
|
|
762
762
|
});
|
|
763
763
|
}
|
|
764
|
-
function
|
|
765
|
-
return
|
|
766
|
-
objectType:
|
|
767
|
-
anchor:
|
|
764
|
+
function En(n = null) {
|
|
765
|
+
return l0({
|
|
766
|
+
objectType: U.SVG,
|
|
767
|
+
anchor: h0,
|
|
768
768
|
height: 100,
|
|
769
769
|
svg: "",
|
|
770
770
|
width: 100,
|
|
@@ -773,11 +773,11 @@ function Pn(n = null) {
|
|
|
773
773
|
...n
|
|
774
774
|
});
|
|
775
775
|
}
|
|
776
|
-
const
|
|
776
|
+
const de = {
|
|
777
777
|
NORMAL: "normal",
|
|
778
778
|
ITALIC: "italic",
|
|
779
779
|
OBLIQUE: "oblique"
|
|
780
|
-
},
|
|
780
|
+
}, xe = de.NORMAL, ye = {
|
|
781
781
|
THIN: 100,
|
|
782
782
|
EXTRA_LIGHT: 200,
|
|
783
783
|
LIGHT: 300,
|
|
@@ -787,46 +787,48 @@ const p1 = {
|
|
|
787
787
|
BOLD: 700,
|
|
788
788
|
EXTRA_BOLD: 800,
|
|
789
789
|
BLACK: 900
|
|
790
|
-
},
|
|
791
|
-
color:
|
|
790
|
+
}, ve = ye.NORMAL, we = {
|
|
791
|
+
color: Q,
|
|
792
792
|
fontFamily: "sans-serif",
|
|
793
793
|
fontSize: 100,
|
|
794
|
-
fontStyle:
|
|
795
|
-
fontWeight:
|
|
796
|
-
ligatures: !1
|
|
794
|
+
fontStyle: xe,
|
|
795
|
+
fontWeight: ve,
|
|
796
|
+
ligatures: !1,
|
|
797
|
+
subscript: !1,
|
|
798
|
+
superscript: !1
|
|
797
799
|
};
|
|
798
800
|
function _t(n) {
|
|
799
801
|
return typeof n == "string" ? [[{ text: n }]] : n.map((e) => e.map((t) => typeof t == "string" ? { text: t } : t));
|
|
800
802
|
}
|
|
801
|
-
function
|
|
803
|
+
function me(n) {
|
|
802
804
|
return _t(n).reduce(
|
|
803
805
|
(t, o) => t + o.reduce((i, a) => i + a.text.length, 0),
|
|
804
806
|
0
|
|
805
807
|
);
|
|
806
808
|
}
|
|
807
|
-
function
|
|
808
|
-
return
|
|
809
|
-
objectType:
|
|
810
|
-
alignment:
|
|
811
|
-
anchor:
|
|
809
|
+
function Ae(n = "", e = null) {
|
|
810
|
+
return l0({
|
|
811
|
+
objectType: U.TEXT,
|
|
812
|
+
alignment: Wt,
|
|
813
|
+
anchor: h0,
|
|
812
814
|
length: null,
|
|
813
815
|
lineSpacing: 1,
|
|
814
816
|
text: n,
|
|
815
817
|
x: 0,
|
|
816
818
|
y: 0,
|
|
817
|
-
...
|
|
819
|
+
...we,
|
|
818
820
|
...e
|
|
819
821
|
});
|
|
820
822
|
}
|
|
821
|
-
|
|
823
|
+
Ae.writeOn = (n, e = {}) => et(
|
|
822
824
|
n,
|
|
823
825
|
{
|
|
824
|
-
length:
|
|
826
|
+
length: me(n.text)
|
|
825
827
|
},
|
|
826
828
|
e
|
|
827
829
|
);
|
|
828
830
|
let Z = null;
|
|
829
|
-
function
|
|
831
|
+
function be({ presentation: n, onNavigateToSlide: e }) {
|
|
830
832
|
if (Z !== null && !Z.closed) {
|
|
831
833
|
Z.focus();
|
|
832
834
|
return;
|
|
@@ -835,73 +837,73 @@ function A1({ presentation: n, onNavigateToSlide: e }) {
|
|
|
835
837
|
console.error("Failed to open navigator window.");
|
|
836
838
|
return;
|
|
837
839
|
}
|
|
838
|
-
const t =
|
|
840
|
+
const t = Me(n, e);
|
|
839
841
|
Z.document.title = n.title, Z.document.body.appendChild(t), Z.addEventListener("keyup", (o) => {
|
|
840
842
|
(o.key === "Escape" || o.key === "`") && (Z == null || Z.close(), Z = null);
|
|
841
843
|
});
|
|
842
844
|
}
|
|
843
|
-
function
|
|
845
|
+
function Me(n, e) {
|
|
844
846
|
const t = document.createElement("div");
|
|
845
847
|
return t.style.fontFamily = "Arial, sans-serif", n.slides.forEach((o, i) => {
|
|
846
|
-
const a =
|
|
848
|
+
const a = Le(o, i);
|
|
847
849
|
a.style.cursor = "pointer", a.addEventListener("click", (s) => {
|
|
848
850
|
s.shiftKey && (Z == null || Z.close()), e(i);
|
|
849
851
|
}), t.appendChild(a);
|
|
850
852
|
}), t;
|
|
851
853
|
}
|
|
852
|
-
function
|
|
854
|
+
function Le(n, e) {
|
|
853
855
|
const t = document.createElement("div");
|
|
854
856
|
return t.style.marginBottom = "8px", t.style.padding = "8px", t.style.backgroundColor = "#eceed7", t.style.borderRadius = "4px", t.style.userSelect = "none", t.innerHTML = `${e + 1}: ` + (n.title.length > 0 ? n.title : `Slide ${e + 1}`), t;
|
|
855
857
|
}
|
|
856
|
-
function
|
|
858
|
+
function a0(n = null) {
|
|
857
859
|
return {
|
|
858
860
|
height: 0,
|
|
859
861
|
width: 0,
|
|
860
862
|
...n
|
|
861
863
|
};
|
|
862
864
|
}
|
|
863
|
-
const
|
|
864
|
-
function
|
|
865
|
+
const Te = a0({ width: 0, height: 0 });
|
|
866
|
+
function Pe(n = null) {
|
|
865
867
|
return {
|
|
866
868
|
backgroundColor: $.WHITE,
|
|
867
869
|
slides: [],
|
|
868
870
|
title: "Presentation",
|
|
869
|
-
size:
|
|
871
|
+
size: a0({ width: 3840, height: 2160 }),
|
|
870
872
|
resources: {
|
|
871
873
|
images: {}
|
|
872
874
|
},
|
|
873
875
|
...n
|
|
874
876
|
};
|
|
875
877
|
}
|
|
876
|
-
function
|
|
878
|
+
function Ce(n) {
|
|
877
879
|
const e = Array.isArray(n) ? n : [n];
|
|
878
880
|
let t = 0, o = 0;
|
|
879
881
|
for (const i of e)
|
|
880
882
|
switch (i.type) {
|
|
881
|
-
case
|
|
883
|
+
case f0.PAUSE:
|
|
882
884
|
t += i.duration;
|
|
883
885
|
break;
|
|
884
|
-
case
|
|
886
|
+
case f0.ANIMATE:
|
|
885
887
|
o = Math.max(o, t + i.delay + i.duration), i.block && (t += i.delay + i.duration);
|
|
886
888
|
break;
|
|
887
|
-
case
|
|
889
|
+
case f0.UPDATE:
|
|
888
890
|
break;
|
|
889
891
|
default:
|
|
890
|
-
|
|
892
|
+
s0(i);
|
|
891
893
|
}
|
|
892
894
|
return o;
|
|
893
895
|
}
|
|
894
896
|
function nt(n, e = null) {
|
|
895
|
-
const { red: t, green: o, blue: i } = n, a =
|
|
897
|
+
const { red: t, green: o, blue: i } = n, a = Et(n, e);
|
|
896
898
|
return `rgba(${t}, ${o}, ${i}, ${a})`;
|
|
897
899
|
}
|
|
898
|
-
function
|
|
900
|
+
function Se(n) {
|
|
899
901
|
return n === document.body;
|
|
900
902
|
}
|
|
901
|
-
function
|
|
903
|
+
function Ee(n, e) {
|
|
902
904
|
const t = document.createElement("div");
|
|
903
|
-
if (t.style.width = "100%", t.style.aspectRatio = `${n.size.width} / ${n.size.height}`, t.style.position = "relative",
|
|
904
|
-
t.style.overflowY = "clip", document.title = n.title, document.documentElement.style.height = "100%", document.body.style.margin = "0", document.body.style.height = "100%", document.body.style.width = "100%", document.body.style.backgroundColor = "#000000";
|
|
905
|
+
if (t.style.width = "100%", t.style.aspectRatio = `${n.size.width} / ${n.size.height}`, t.style.position = "relative", Se(e)) {
|
|
906
|
+
t.style.top = "50%", t.style.transform = "translateY(-50%)", t.style.marginLeft = "auto", t.style.marginRight = "auto", t.style.overflowY = "clip", document.title = n.title, document.documentElement.style.height = "100%", document.body.style.margin = "0", document.body.style.height = "100%", document.body.style.width = "100%", document.body.style.backgroundColor = "#000000";
|
|
905
907
|
const o = n.size.height / n.size.width;
|
|
906
908
|
ut(t, o), window.matchMedia(`(min-aspect-ratio: ${n.size.width} / ${n.size.height})`).addEventListener("change", () => ut(t, o));
|
|
907
909
|
}
|
|
@@ -910,7 +912,7 @@ function E1(n, e) {
|
|
|
910
912
|
function ut(n, e) {
|
|
911
913
|
window.innerHeight / window.innerWidth > e ? (n.style.width = "100%", n.style.height = "auto") : (n.style.width = "auto", n.style.height = "100%");
|
|
912
914
|
}
|
|
913
|
-
const
|
|
915
|
+
const ke = {
|
|
914
916
|
check: (n) => typeof n == "object" && n !== null && typeof n.red == "number" && typeof n.green == "number" && typeof n.blue == "number" && typeof n.alpha == "number",
|
|
915
917
|
interpolate: (n, e, t) => ({
|
|
916
918
|
red: Math.round(n.red + (e.red - n.red) * t),
|
|
@@ -918,18 +920,18 @@ const S1 = {
|
|
|
918
920
|
blue: Math.round(n.blue + (e.blue - n.blue) * t),
|
|
919
921
|
alpha: n.alpha + (e.alpha - n.alpha) * t
|
|
920
922
|
})
|
|
921
|
-
},
|
|
923
|
+
}, Ie = {
|
|
922
924
|
check: (n) => !0,
|
|
923
925
|
interpolate: (n, e) => e
|
|
924
|
-
},
|
|
926
|
+
}, _e = {
|
|
925
927
|
check: (n) => typeof n == "number",
|
|
926
928
|
interpolate: (n, e, t) => n + (e - n) * t
|
|
927
929
|
}, ft = [
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
930
|
+
_e,
|
|
931
|
+
ke,
|
|
932
|
+
Ie
|
|
931
933
|
];
|
|
932
|
-
function
|
|
934
|
+
function Oe(n, e, t, o = null) {
|
|
933
935
|
if (t === 0)
|
|
934
936
|
return n;
|
|
935
937
|
if (t === 1)
|
|
@@ -958,7 +960,7 @@ function gt(n, e, t = null) {
|
|
|
958
960
|
if (t !== null && i > t)
|
|
959
961
|
break;
|
|
960
962
|
switch (a.type) {
|
|
961
|
-
case
|
|
963
|
+
case f0.ANIMATE: {
|
|
962
964
|
const s = n.get(a.object);
|
|
963
965
|
if (s === void 0)
|
|
964
966
|
break;
|
|
@@ -971,7 +973,7 @@ function gt(n, e, t = null) {
|
|
|
971
973
|
);
|
|
972
974
|
n.set(a.object, {
|
|
973
975
|
...s,
|
|
974
|
-
...
|
|
976
|
+
...Oe(
|
|
975
977
|
s,
|
|
976
978
|
a.props,
|
|
977
979
|
a.easing(h),
|
|
@@ -980,7 +982,7 @@ function gt(n, e, t = null) {
|
|
|
980
982
|
}), a.block && (i += a.delay + a.duration);
|
|
981
983
|
break;
|
|
982
984
|
}
|
|
983
|
-
case
|
|
985
|
+
case f0.UPDATE: {
|
|
984
986
|
const s = n.get(a.object);
|
|
985
987
|
if (s === void 0)
|
|
986
988
|
break;
|
|
@@ -990,18 +992,18 @@ function gt(n, e, t = null) {
|
|
|
990
992
|
});
|
|
991
993
|
break;
|
|
992
994
|
}
|
|
993
|
-
case
|
|
995
|
+
case f0.PAUSE:
|
|
994
996
|
i += a.duration;
|
|
995
997
|
break;
|
|
996
998
|
default:
|
|
997
|
-
|
|
999
|
+
s0(a);
|
|
998
1000
|
}
|
|
999
1001
|
}
|
|
1000
1002
|
}
|
|
1001
1003
|
function Ot(n) {
|
|
1002
1004
|
return "objects" in n ? n.objects.filter((e) => "objectType" in e) : [];
|
|
1003
1005
|
}
|
|
1004
|
-
function
|
|
1006
|
+
function Fe({
|
|
1005
1007
|
slide: n,
|
|
1006
1008
|
buildIndex: e,
|
|
1007
1009
|
buildTime: t
|
|
@@ -1025,10 +1027,10 @@ function O1({
|
|
|
1025
1027
|
}
|
|
1026
1028
|
return o;
|
|
1027
1029
|
}
|
|
1028
|
-
function
|
|
1030
|
+
function Re(n) {
|
|
1029
1031
|
const e = {};
|
|
1030
1032
|
function t(o) {
|
|
1031
|
-
if (o.objectType ===
|
|
1033
|
+
if (o.objectType === U.SVG) {
|
|
1032
1034
|
const a = o.svg;
|
|
1033
1035
|
a !== void 0 && a.length > 0 && (e[a] = a);
|
|
1034
1036
|
}
|
|
@@ -1041,7 +1043,7 @@ function F1(n) {
|
|
|
1041
1043
|
t(i);
|
|
1042
1044
|
return e;
|
|
1043
1045
|
}
|
|
1044
|
-
function
|
|
1046
|
+
function Ne(n) {
|
|
1045
1047
|
var o;
|
|
1046
1048
|
const { slides: e } = n, t = {
|
|
1047
1049
|
// First build of first slide
|
|
@@ -1080,8 +1082,8 @@ function N0(n, e, t, o) {
|
|
|
1080
1082
|
else
|
|
1081
1083
|
n[e] = { slideIndex: t, buildIndex: o };
|
|
1082
1084
|
}
|
|
1083
|
-
function
|
|
1084
|
-
t.shortcuts =
|
|
1085
|
+
function Be(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigator: s }) {
|
|
1086
|
+
t.shortcuts = Ne(n), e.addEventListener("mousemove", () => {
|
|
1085
1087
|
e.style.cursor = "auto";
|
|
1086
1088
|
}), e.addEventListener("keyup", (r) => {
|
|
1087
1089
|
if (r.code === "Escape") {
|
|
@@ -1117,7 +1119,7 @@ function N1(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigat
|
|
|
1117
1119
|
});
|
|
1118
1120
|
}
|
|
1119
1121
|
const d0 = "presenterState";
|
|
1120
|
-
function
|
|
1122
|
+
function qe(n, e) {
|
|
1121
1123
|
const t = localStorage.getItem(d0);
|
|
1122
1124
|
if (t === null)
|
|
1123
1125
|
return null;
|
|
@@ -1141,7 +1143,7 @@ function q1(n, e) {
|
|
|
1141
1143
|
buildIndex: r
|
|
1142
1144
|
});
|
|
1143
1145
|
}
|
|
1144
|
-
function
|
|
1146
|
+
function De({ title: n, slideIndex: e, buildIndex: t }) {
|
|
1145
1147
|
localStorage.setItem(
|
|
1146
1148
|
d0,
|
|
1147
1149
|
JSON.stringify({ title: n, slideIndex: e, buildIndex: t, timestamp: Date.now() })
|
|
@@ -1164,42 +1166,42 @@ const pt = Object.freeze({
|
|
|
1164
1166
|
Browser: "browser",
|
|
1165
1167
|
Node: "node"
|
|
1166
1168
|
};
|
|
1167
|
-
function
|
|
1169
|
+
function je(n, e) {
|
|
1168
1170
|
e.context.clearRect(0, 0, n.width, n.height);
|
|
1169
1171
|
}
|
|
1170
|
-
function
|
|
1172
|
+
function ze(n) {
|
|
1171
1173
|
const e = document.createElement("canvas");
|
|
1172
1174
|
return e.setAttribute("width", n.width.toString()), e.setAttribute("height", n.height.toString()), e.style.position = "absolute", e.style.width = "100%", e;
|
|
1173
1175
|
}
|
|
1174
|
-
const
|
|
1176
|
+
const g0 = {
|
|
1175
1177
|
Browser: "browser",
|
|
1176
1178
|
Node: "node"
|
|
1177
1179
|
};
|
|
1178
|
-
function
|
|
1180
|
+
function Ue(n) {
|
|
1179
1181
|
const e = new Path2D(n);
|
|
1180
1182
|
return {
|
|
1181
|
-
type:
|
|
1183
|
+
type: g0.Browser,
|
|
1182
1184
|
path: e
|
|
1183
1185
|
};
|
|
1184
1186
|
}
|
|
1185
|
-
function
|
|
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 },
|
|
1187
|
-
x:
|
|
1188
|
-
y:
|
|
1189
|
-
},
|
|
1190
|
-
x:
|
|
1191
|
-
y:
|
|
1192
|
-
},
|
|
1193
|
-
x:
|
|
1194
|
-
y:
|
|
1195
|
-
},
|
|
1196
|
-
x:
|
|
1197
|
-
y:
|
|
1187
|
+
function Ye(n) {
|
|
1188
|
+
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 }, d = 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, m = f.y - c.y, M = Math.hypot(u, m) * e, T = Math.cos(d), S = Math.sin(d), P = h ? { x: l.x - T * M / 2, y: l.y - S * M / 2 } : c, E = h ? { x: l.x + T * M / 2, y: l.y + S * M / 2 } : { x: c.x + T * M, y: c.y + S * M }, C = r ? Math.PI / 6 : Math.PI / 4.5, O = M < s * 2 ? M / 2 : s, R = {
|
|
1189
|
+
x: E.x - O * Math.cos(d - C),
|
|
1190
|
+
y: E.y - O * Math.sin(d - C)
|
|
1191
|
+
}, G = {
|
|
1192
|
+
x: E.x - O * Math.cos(d + C),
|
|
1193
|
+
y: E.y - O * Math.sin(d + C)
|
|
1194
|
+
}, z = {
|
|
1195
|
+
x: P.x + O * Math.cos(d - C),
|
|
1196
|
+
y: P.y + O * Math.sin(d - C)
|
|
1197
|
+
}, H = {
|
|
1198
|
+
x: P.x + O * Math.cos(d + C),
|
|
1199
|
+
y: P.y + O * Math.sin(d + C)
|
|
1198
1200
|
};
|
|
1199
1201
|
return {
|
|
1200
|
-
arrowPoints: [
|
|
1201
|
-
arrowheadPoints: [
|
|
1202
|
-
doubledArrowheadPoints: [
|
|
1202
|
+
arrowPoints: [P, E],
|
|
1203
|
+
arrowheadPoints: [R, E, G],
|
|
1204
|
+
doubledArrowheadPoints: [z, P, H]
|
|
1203
1205
|
};
|
|
1204
1206
|
}
|
|
1205
1207
|
function y0({
|
|
@@ -1224,19 +1226,19 @@ function y0({
|
|
|
1224
1226
|
]) : n.context.setLineDash([f, c - f]);
|
|
1225
1227
|
} else
|
|
1226
1228
|
n.context.setLineDash([]);
|
|
1227
|
-
if (n.context.lineWidth = h, n.context.strokeStyle =
|
|
1229
|
+
if (n.context.lineWidth = h, n.context.strokeStyle = S0(e, a), n.context.lineCap = i ? "round" : "butt", s === void 0) {
|
|
1228
1230
|
n.context.stroke();
|
|
1229
1231
|
return;
|
|
1230
1232
|
}
|
|
1231
1233
|
switch (n.type) {
|
|
1232
1234
|
case V.Browser:
|
|
1233
|
-
s.type ===
|
|
1235
|
+
s.type === g0.Browser ? n.context.stroke(s.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
|
|
1234
1236
|
break;
|
|
1235
1237
|
case V.Node:
|
|
1236
|
-
s.type ===
|
|
1238
|
+
s.type === g0.Node ? n.context.stroke(s.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
|
|
1237
1239
|
break;
|
|
1238
1240
|
default:
|
|
1239
|
-
|
|
1241
|
+
s0(n);
|
|
1240
1242
|
}
|
|
1241
1243
|
}
|
|
1242
1244
|
}
|
|
@@ -1247,16 +1249,16 @@ function v0({ ctx: n, path: e, color: t, opacity: o = null }) {
|
|
|
1247
1249
|
}
|
|
1248
1250
|
switch (n.type) {
|
|
1249
1251
|
case V.Browser:
|
|
1250
|
-
e.type ===
|
|
1252
|
+
e.type === g0.Browser ? n.context.fill(e.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
|
|
1251
1253
|
break;
|
|
1252
1254
|
case V.Node:
|
|
1253
|
-
e.type ===
|
|
1255
|
+
e.type === g0.Node ? n.context.fill(e.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
|
|
1254
1256
|
break;
|
|
1255
1257
|
default:
|
|
1256
|
-
|
|
1258
|
+
s0(n);
|
|
1257
1259
|
}
|
|
1258
1260
|
}
|
|
1259
|
-
function
|
|
1261
|
+
function B0(n, e) {
|
|
1260
1262
|
const t = e(), o = n[0];
|
|
1261
1263
|
if (o === void 0)
|
|
1262
1264
|
return { path: t, length: 0 };
|
|
@@ -1271,7 +1273,7 @@ function q0(n, e) {
|
|
|
1271
1273
|
}
|
|
1272
1274
|
return { path: t, length: i };
|
|
1273
1275
|
}
|
|
1274
|
-
const
|
|
1276
|
+
const He = ({
|
|
1275
1277
|
ctx: n,
|
|
1276
1278
|
object: e,
|
|
1277
1279
|
opacity: t,
|
|
@@ -1280,7 +1282,7 @@ const Y1 = ({
|
|
|
1280
1282
|
const i = e.opacity * t;
|
|
1281
1283
|
if (i === 0 || e.drawn === 0)
|
|
1282
1284
|
return;
|
|
1283
|
-
const { arrowPoints: a, arrowheadPoints: s, doubledArrowheadPoints: r } =
|
|
1285
|
+
const { arrowPoints: a, arrowheadPoints: s, doubledArrowheadPoints: r } = Ye(e), { path: h } = B0(a, o), { path: c } = B0(s, o);
|
|
1284
1286
|
if (y0({
|
|
1285
1287
|
color: e.color,
|
|
1286
1288
|
ctx: n,
|
|
@@ -1299,7 +1301,7 @@ const Y1 = ({
|
|
|
1299
1301
|
opacity: i,
|
|
1300
1302
|
width: e.width
|
|
1301
1303
|
}), e.isArrowheadDoubled) {
|
|
1302
|
-
const { path: f } =
|
|
1304
|
+
const { path: f } = B0(
|
|
1303
1305
|
r,
|
|
1304
1306
|
o
|
|
1305
1307
|
);
|
|
@@ -1317,14 +1319,14 @@ const Y1 = ({
|
|
|
1317
1319
|
});
|
|
1318
1320
|
}
|
|
1319
1321
|
};
|
|
1320
|
-
function
|
|
1322
|
+
function Xe(n, e) {
|
|
1321
1323
|
const t = n.radius - n.strokeWidth / 2;
|
|
1322
1324
|
if (t <= 0)
|
|
1323
1325
|
return;
|
|
1324
1326
|
const o = e(), i = -Math.PI / 2;
|
|
1325
1327
|
return o.path.arc(n.x, n.y, t, i, i + 2 * Math.PI), o;
|
|
1326
1328
|
}
|
|
1327
|
-
function
|
|
1329
|
+
function $e(n, e) {
|
|
1328
1330
|
const t = e(), o = -Math.PI / 2;
|
|
1329
1331
|
t.path.arc(n.x, n.y, n.radius, o, o + 2 * Math.PI);
|
|
1330
1332
|
const i = 2 * Math.PI * n.radius;
|
|
@@ -1333,16 +1335,16 @@ function H1(n, e) {
|
|
|
1333
1335
|
function Ft(n, e) {
|
|
1334
1336
|
switch (n.type) {
|
|
1335
1337
|
case V.Browser:
|
|
1336
|
-
e.type ===
|
|
1338
|
+
e.type === g0.Browser ? n.context.clip(e.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
|
|
1337
1339
|
break;
|
|
1338
1340
|
case V.Node:
|
|
1339
|
-
e.type ===
|
|
1341
|
+
e.type === g0.Node ? n.context.clip(e.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
|
|
1340
1342
|
break;
|
|
1341
1343
|
default:
|
|
1342
|
-
|
|
1344
|
+
s0(n);
|
|
1343
1345
|
}
|
|
1344
1346
|
}
|
|
1345
|
-
const
|
|
1347
|
+
const Ge = ({
|
|
1346
1348
|
ctx: n,
|
|
1347
1349
|
object: e,
|
|
1348
1350
|
opacity: t,
|
|
@@ -1351,9 +1353,9 @@ const $1 = ({
|
|
|
1351
1353
|
const i = e.opacity * t;
|
|
1352
1354
|
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1353
1355
|
return;
|
|
1354
|
-
const { path: a, length: s } =
|
|
1356
|
+
const { path: a, length: s } = $e(e, o);
|
|
1355
1357
|
if (i < 1 && e.strokeWidth > 0) {
|
|
1356
|
-
const r =
|
|
1358
|
+
const r = Xe(e, o);
|
|
1357
1359
|
r !== void 0 && (n.context.save(), Ft(n, r), v0({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
|
|
1358
1360
|
} else
|
|
1359
1361
|
v0({ ctx: n, path: a, color: e.fillColor, opacity: i });
|
|
@@ -1367,100 +1369,100 @@ const $1 = ({
|
|
|
1367
1369
|
width: e.strokeWidth
|
|
1368
1370
|
});
|
|
1369
1371
|
};
|
|
1370
|
-
function
|
|
1372
|
+
function X(n = null) {
|
|
1371
1373
|
return {
|
|
1372
1374
|
x: 0,
|
|
1373
1375
|
y: 0,
|
|
1374
1376
|
...n
|
|
1375
1377
|
};
|
|
1376
1378
|
}
|
|
1377
|
-
const
|
|
1378
|
-
function
|
|
1379
|
+
const We = X();
|
|
1380
|
+
function u0(n = null) {
|
|
1379
1381
|
return {
|
|
1380
|
-
origin:
|
|
1381
|
-
size:
|
|
1382
|
+
origin: We,
|
|
1383
|
+
size: Te,
|
|
1382
1384
|
...n
|
|
1383
1385
|
};
|
|
1384
1386
|
}
|
|
1385
|
-
|
|
1386
|
-
function
|
|
1387
|
+
u0();
|
|
1388
|
+
function p0(n, e, t) {
|
|
1387
1389
|
const { x: o, y: i } = n, { width: a, height: s } = t;
|
|
1388
1390
|
switch (e) {
|
|
1389
|
-
case
|
|
1390
|
-
return
|
|
1391
|
-
origin:
|
|
1391
|
+
case o0.TOP_LEFT:
|
|
1392
|
+
return u0({
|
|
1393
|
+
origin: X({ x: o, y: i }),
|
|
1392
1394
|
size: t
|
|
1393
1395
|
});
|
|
1394
|
-
case
|
|
1395
|
-
return
|
|
1396
|
-
origin:
|
|
1396
|
+
case o0.TOP:
|
|
1397
|
+
return u0({
|
|
1398
|
+
origin: X({ x: o - a / 2, y: i }),
|
|
1397
1399
|
size: t
|
|
1398
1400
|
});
|
|
1399
|
-
case
|
|
1400
|
-
return
|
|
1401
|
-
origin:
|
|
1401
|
+
case o0.TOP_RIGHT:
|
|
1402
|
+
return u0({
|
|
1403
|
+
origin: X({ x: o - a, y: i }),
|
|
1402
1404
|
size: t
|
|
1403
1405
|
});
|
|
1404
|
-
case
|
|
1405
|
-
return
|
|
1406
|
-
origin:
|
|
1406
|
+
case o0.LEFT:
|
|
1407
|
+
return u0({
|
|
1408
|
+
origin: X({ x: o, y: i - s / 2 }),
|
|
1407
1409
|
size: t
|
|
1408
1410
|
});
|
|
1409
|
-
case
|
|
1410
|
-
return
|
|
1411
|
-
origin:
|
|
1411
|
+
case o0.CENTER:
|
|
1412
|
+
return u0({
|
|
1413
|
+
origin: X({ x: o - a / 2, y: i - s / 2 }),
|
|
1412
1414
|
size: t
|
|
1413
1415
|
});
|
|
1414
|
-
case
|
|
1415
|
-
return
|
|
1416
|
-
origin:
|
|
1416
|
+
case o0.RIGHT:
|
|
1417
|
+
return u0({
|
|
1418
|
+
origin: X({ x: o - a, y: i - s / 2 }),
|
|
1417
1419
|
size: t
|
|
1418
1420
|
});
|
|
1419
|
-
case
|
|
1420
|
-
return
|
|
1421
|
-
origin:
|
|
1421
|
+
case o0.BOTTOM_LEFT:
|
|
1422
|
+
return u0({
|
|
1423
|
+
origin: X({ x: o, y: i - s }),
|
|
1422
1424
|
size: t
|
|
1423
1425
|
});
|
|
1424
|
-
case
|
|
1425
|
-
return
|
|
1426
|
-
origin:
|
|
1426
|
+
case o0.BOTTOM:
|
|
1427
|
+
return u0({
|
|
1428
|
+
origin: X({ x: o - a / 2, y: i - s }),
|
|
1427
1429
|
size: t
|
|
1428
1430
|
});
|
|
1429
|
-
case
|
|
1430
|
-
return
|
|
1431
|
-
origin:
|
|
1431
|
+
case o0.BOTTOM_RIGHT:
|
|
1432
|
+
return u0({
|
|
1433
|
+
origin: X({ x: o - a, y: i - s }),
|
|
1432
1434
|
size: t
|
|
1433
1435
|
});
|
|
1434
1436
|
default:
|
|
1435
|
-
|
|
1437
|
+
s0(e);
|
|
1436
1438
|
}
|
|
1437
1439
|
}
|
|
1438
|
-
const
|
|
1440
|
+
const Ze = ({
|
|
1439
1441
|
ctx: n,
|
|
1440
1442
|
object: e,
|
|
1441
1443
|
renderObject: t,
|
|
1442
1444
|
opacity: o
|
|
1443
1445
|
}) => {
|
|
1444
|
-
const i = e.scale * e.scaleX, a = e.scale * e.scaleY, s =
|
|
1445
|
-
|
|
1446
|
+
const i = e.scale * e.scaleX, a = e.scale * e.scaleY, s = p0(
|
|
1447
|
+
X({ x: e.x, y: e.y }),
|
|
1446
1448
|
e.anchor,
|
|
1447
|
-
|
|
1449
|
+
a0({
|
|
1448
1450
|
width: e.width * Math.abs(i),
|
|
1449
1451
|
height: e.height * Math.abs(a)
|
|
1450
1452
|
})
|
|
1451
|
-
), { rotation: r, rotateOriginX: h, rotateOriginY: c, skewOriginX: f, skewOriginY:
|
|
1453
|
+
), { rotation: r, rotateOriginX: h, rotateOriginY: c, skewOriginX: f, skewOriginY: d, skewX: l, skewY: u } = e;
|
|
1452
1454
|
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,
|
|
1455
|
+
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, d), n.context.transform(
|
|
1454
1456
|
1,
|
|
1455
1457
|
Math.tan(u * Math.PI / 180),
|
|
1456
1458
|
Math.tan(l * Math.PI / 180),
|
|
1457
1459
|
1,
|
|
1458
1460
|
0,
|
|
1459
1461
|
0
|
|
1460
|
-
), n.context.translate(-f, -
|
|
1461
|
-
for (const
|
|
1462
|
-
t(
|
|
1463
|
-
e.previewColor !== null && (n.context.fillStyle =
|
|
1462
|
+
), n.context.translate(-f, -d);
|
|
1463
|
+
for (const m of e.objects)
|
|
1464
|
+
t(m, o * e.opacity);
|
|
1465
|
+
e.previewColor !== null && (n.context.fillStyle = S0(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, d, e.skewOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), n.context.restore();
|
|
1464
1466
|
}
|
|
1465
1467
|
};
|
|
1466
1468
|
function rt(n, e, t, o, i = 0) {
|
|
@@ -1487,20 +1489,20 @@ function rt(n, e, t, o, i = 0) {
|
|
|
1487
1489
|
const s = 2 * (e.width + e.height - 4 * t) + 2 * Math.PI * t + i;
|
|
1488
1490
|
return { path: a, length: s };
|
|
1489
1491
|
}
|
|
1490
|
-
const
|
|
1492
|
+
const E0 = {
|
|
1491
1493
|
Browser: "browser",
|
|
1492
1494
|
Node: "node"
|
|
1493
|
-
},
|
|
1495
|
+
}, Ve = ({
|
|
1494
1496
|
ctx: n,
|
|
1495
1497
|
imageById: e,
|
|
1496
1498
|
object: t,
|
|
1497
1499
|
opacity: o,
|
|
1498
1500
|
createPath2D: i
|
|
1499
1501
|
}) => {
|
|
1500
|
-
const a =
|
|
1501
|
-
|
|
1502
|
+
const a = p0(
|
|
1503
|
+
X({ x: t.x, y: t.y }),
|
|
1502
1504
|
t.anchor,
|
|
1503
|
-
|
|
1505
|
+
a0({ width: t.width, height: t.height })
|
|
1504
1506
|
), s = e[t.imageId];
|
|
1505
1507
|
if (s !== void 0) {
|
|
1506
1508
|
if (n.context.save(), t.cornerRadius > 0) {
|
|
@@ -1512,18 +1514,18 @@ const S0 = {
|
|
|
1512
1514
|
);
|
|
1513
1515
|
switch (n.type) {
|
|
1514
1516
|
case V.Browser:
|
|
1515
|
-
r.path.type ===
|
|
1517
|
+
r.path.type === g0.Browser ? n.context.clip(r.path.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
|
|
1516
1518
|
break;
|
|
1517
1519
|
case V.Node:
|
|
1518
|
-
r.path.type ===
|
|
1520
|
+
r.path.type === g0.Node ? n.context.clip(r.path.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
|
|
1519
1521
|
break;
|
|
1520
1522
|
default:
|
|
1521
|
-
|
|
1523
|
+
s0(n);
|
|
1522
1524
|
}
|
|
1523
1525
|
}
|
|
1524
1526
|
switch (n.context.globalAlpha = o * t.opacity, n.context.imageSmoothingEnabled = t.smooth, n.type) {
|
|
1525
1527
|
case V.Browser:
|
|
1526
|
-
s.type ===
|
|
1528
|
+
s.type === E0.Browser ? n.context.drawImage(
|
|
1527
1529
|
s.image,
|
|
1528
1530
|
a.origin.x,
|
|
1529
1531
|
a.origin.y,
|
|
@@ -1532,7 +1534,7 @@ const S0 = {
|
|
|
1532
1534
|
) : console.warn("Attempted to use Node Image in Browser Canvas context");
|
|
1533
1535
|
break;
|
|
1534
1536
|
case V.Node:
|
|
1535
|
-
s.type ===
|
|
1537
|
+
s.type === E0.Node ? n.context.drawImage(
|
|
1536
1538
|
s.image,
|
|
1537
1539
|
a.origin.x,
|
|
1538
1540
|
a.origin.y,
|
|
@@ -1541,18 +1543,18 @@ const S0 = {
|
|
|
1541
1543
|
) : console.warn("Attempted to use Browser Image in Node Canvas context");
|
|
1542
1544
|
break;
|
|
1543
1545
|
default:
|
|
1544
|
-
|
|
1546
|
+
s0(n);
|
|
1545
1547
|
}
|
|
1546
1548
|
n.context.restore();
|
|
1547
1549
|
}
|
|
1548
1550
|
};
|
|
1549
|
-
function
|
|
1551
|
+
function Ke(n, e) {
|
|
1550
1552
|
const t = e();
|
|
1551
1553
|
t.path.moveTo(n.startX, n.startY), t.path.lineTo(n.endX, n.endY);
|
|
1552
1554
|
const o = Math.hypot(n.endX - n.startX, n.endY - n.startY);
|
|
1553
1555
|
return { path: t, length: o };
|
|
1554
1556
|
}
|
|
1555
|
-
const
|
|
1557
|
+
const Qe = ({
|
|
1556
1558
|
ctx: n,
|
|
1557
1559
|
object: e,
|
|
1558
1560
|
opacity: t,
|
|
@@ -1561,7 +1563,7 @@ const K1 = ({
|
|
|
1561
1563
|
const i = e.opacity * t;
|
|
1562
1564
|
if (i === 0 || e.drawn === 0)
|
|
1563
1565
|
return;
|
|
1564
|
-
const { path: a, length: s } =
|
|
1566
|
+
const { path: a, length: s } = Ke(e, o);
|
|
1565
1567
|
y0({
|
|
1566
1568
|
color: e.color,
|
|
1567
1569
|
ctx: n,
|
|
@@ -1573,23 +1575,23 @@ const K1 = ({
|
|
|
1573
1575
|
opacity: i,
|
|
1574
1576
|
width: e.width
|
|
1575
1577
|
});
|
|
1576
|
-
},
|
|
1578
|
+
}, Je = ({
|
|
1577
1579
|
ctx: n,
|
|
1578
1580
|
object: e,
|
|
1579
1581
|
opacity: t,
|
|
1580
1582
|
renderObject: o
|
|
1581
1583
|
}) => {
|
|
1582
1584
|
n.context.save();
|
|
1583
|
-
const i =
|
|
1584
|
-
|
|
1585
|
+
const i = p0(
|
|
1586
|
+
X({ x: e.x, y: e.y }),
|
|
1585
1587
|
e.anchor,
|
|
1586
|
-
|
|
1588
|
+
a0({ width: e.width, height: e.height })
|
|
1587
1589
|
);
|
|
1588
|
-
e.preview && (n.context.lineWidth = 4, n.context.strokeStyle =
|
|
1590
|
+
e.preview && (n.context.lineWidth = 4, n.context.strokeStyle = S0($.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();
|
|
1589
1591
|
for (const a of e.objects)
|
|
1590
1592
|
o(a, t * e.opacity);
|
|
1591
1593
|
n.context.restore();
|
|
1592
|
-
},
|
|
1594
|
+
}, t1 = ({
|
|
1593
1595
|
ctx: n,
|
|
1594
1596
|
object: e,
|
|
1595
1597
|
opacity: t,
|
|
@@ -1598,10 +1600,10 @@ const K1 = ({
|
|
|
1598
1600
|
const i = e.opacity * t;
|
|
1599
1601
|
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1600
1602
|
return;
|
|
1601
|
-
const { origin: a } =
|
|
1602
|
-
|
|
1603
|
+
const { origin: a } = p0(
|
|
1604
|
+
X({ x: e.x, y: e.y }),
|
|
1603
1605
|
e.anchor,
|
|
1604
|
-
|
|
1606
|
+
a0({ width: e.width, height: e.height })
|
|
1605
1607
|
), s = o(e.path);
|
|
1606
1608
|
n.context.save(), n.context.translate(a.x, a.y), n.context.scale(e.width / e.viewboxWidth, e.height / e.viewboxHeight), v0({
|
|
1607
1609
|
ctx: n,
|
|
@@ -1619,7 +1621,7 @@ const K1 = ({
|
|
|
1619
1621
|
width: e.strokeWidth
|
|
1620
1622
|
}), n.context.restore();
|
|
1621
1623
|
};
|
|
1622
|
-
function
|
|
1624
|
+
function e1(n, e) {
|
|
1623
1625
|
const t = e(), o = n.points, i = o[0];
|
|
1624
1626
|
if (i === void 0)
|
|
1625
1627
|
return { path: t, length: 0 };
|
|
@@ -1640,7 +1642,7 @@ function te(n, e) {
|
|
|
1640
1642
|
);
|
|
1641
1643
|
return a += r, { path: t, length: a };
|
|
1642
1644
|
}
|
|
1643
|
-
const
|
|
1645
|
+
const n1 = ({
|
|
1644
1646
|
ctx: n,
|
|
1645
1647
|
object: e,
|
|
1646
1648
|
opacity: t,
|
|
@@ -1649,7 +1651,7 @@ const ee = ({
|
|
|
1649
1651
|
const i = e.opacity * t;
|
|
1650
1652
|
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1651
1653
|
return;
|
|
1652
|
-
const { path: a, length: s } =
|
|
1654
|
+
const { path: a, length: s } = e1(e, o);
|
|
1653
1655
|
v0({
|
|
1654
1656
|
ctx: n,
|
|
1655
1657
|
path: a,
|
|
@@ -1665,15 +1667,15 @@ const ee = ({
|
|
|
1665
1667
|
width: e.strokeWidth
|
|
1666
1668
|
});
|
|
1667
1669
|
};
|
|
1668
|
-
function
|
|
1669
|
-
const t = n.strokeWidth / 2, { origin: o, size: i } =
|
|
1670
|
-
|
|
1670
|
+
function r1(n, e) {
|
|
1671
|
+
const t = n.strokeWidth / 2, { origin: o, size: i } = p0(
|
|
1672
|
+
X({ x: n.x, y: n.y }),
|
|
1671
1673
|
n.anchor,
|
|
1672
|
-
|
|
1674
|
+
a0({ width: n.width, height: n.height })
|
|
1673
1675
|
), a = i.width - n.strokeWidth, s = i.height - n.strokeWidth;
|
|
1674
1676
|
if (a <= 0 || s <= 0)
|
|
1675
1677
|
return;
|
|
1676
|
-
const r =
|
|
1678
|
+
const r = X({ x: o.x + t, y: o.y + t }), h = a0({ width: a, height: s }), c = Math.max(
|
|
1677
1679
|
0,
|
|
1678
1680
|
Math.min(n.cornerRadius - t, Math.min(a, s) / 2)
|
|
1679
1681
|
);
|
|
@@ -1682,11 +1684,11 @@ function ne(n, e) {
|
|
|
1682
1684
|
const f = e();
|
|
1683
1685
|
return f.path.moveTo(r.x, r.y), f.path.lineTo(r.x + a, r.y), f.path.lineTo(r.x + a, r.y + s), f.path.lineTo(r.x, r.y + s), f.path.closePath(), f;
|
|
1684
1686
|
}
|
|
1685
|
-
function
|
|
1686
|
-
const { origin: t, size: o } =
|
|
1687
|
-
|
|
1687
|
+
function i1(n, e) {
|
|
1688
|
+
const { origin: t, size: o } = p0(
|
|
1689
|
+
X({ x: n.x, y: n.y }),
|
|
1688
1690
|
n.anchor,
|
|
1689
|
-
|
|
1691
|
+
a0({ width: n.width, height: n.height })
|
|
1690
1692
|
), i = Math.max(
|
|
1691
1693
|
0,
|
|
1692
1694
|
Math.min(n.cornerRadius, Math.min(o.width, o.height) / 2)
|
|
@@ -1700,7 +1702,7 @@ function re(n, e) {
|
|
|
1700
1702
|
return { path: s, length: r };
|
|
1701
1703
|
}
|
|
1702
1704
|
}
|
|
1703
|
-
const
|
|
1705
|
+
const o1 = ({
|
|
1704
1706
|
ctx: n,
|
|
1705
1707
|
object: e,
|
|
1706
1708
|
opacity: t,
|
|
@@ -1709,9 +1711,9 @@ const ie = ({
|
|
|
1709
1711
|
const i = e.opacity * t;
|
|
1710
1712
|
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1711
1713
|
return;
|
|
1712
|
-
const { path: a, length: s } =
|
|
1714
|
+
const { path: a, length: s } = i1(e, o);
|
|
1713
1715
|
if (i < 1 && e.strokeWidth > 0) {
|
|
1714
|
-
const r =
|
|
1716
|
+
const r = r1(e, o);
|
|
1715
1717
|
r !== void 0 && (n.context.save(), Ft(n, r), v0({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
|
|
1716
1718
|
} else
|
|
1717
1719
|
v0({ ctx: n, path: a, color: e.fillColor, opacity: i });
|
|
@@ -1724,7 +1726,7 @@ const ie = ({
|
|
|
1724
1726
|
opacity: i,
|
|
1725
1727
|
width: e.strokeWidth
|
|
1726
1728
|
});
|
|
1727
|
-
},
|
|
1729
|
+
}, s1 = ({
|
|
1728
1730
|
ctx: n,
|
|
1729
1731
|
imageById: e,
|
|
1730
1732
|
object: t,
|
|
@@ -1736,14 +1738,14 @@ const ie = ({
|
|
|
1736
1738
|
const a = e[t.svg];
|
|
1737
1739
|
if (a === void 0)
|
|
1738
1740
|
return;
|
|
1739
|
-
const s =
|
|
1740
|
-
|
|
1741
|
+
const s = p0(
|
|
1742
|
+
X({ x: t.x, y: t.y }),
|
|
1741
1743
|
t.anchor,
|
|
1742
|
-
|
|
1744
|
+
a0({ width: t.width, height: t.height })
|
|
1743
1745
|
);
|
|
1744
1746
|
switch (n.context.save(), n.context.globalAlpha = i, n.type) {
|
|
1745
1747
|
case V.Browser:
|
|
1746
|
-
a.type ===
|
|
1748
|
+
a.type === E0.Browser && n.context.drawImage(
|
|
1747
1749
|
a.image,
|
|
1748
1750
|
s.origin.x,
|
|
1749
1751
|
s.origin.y,
|
|
@@ -1752,7 +1754,7 @@ const ie = ({
|
|
|
1752
1754
|
);
|
|
1753
1755
|
break;
|
|
1754
1756
|
case V.Node:
|
|
1755
|
-
a.type ===
|
|
1757
|
+
a.type === E0.Node && n.context.drawImage(
|
|
1756
1758
|
a.image,
|
|
1757
1759
|
s.origin.x,
|
|
1758
1760
|
s.origin.y,
|
|
@@ -1761,21 +1763,23 @@ const ie = ({
|
|
|
1761
1763
|
);
|
|
1762
1764
|
break;
|
|
1763
1765
|
default:
|
|
1764
|
-
|
|
1766
|
+
s0(n);
|
|
1765
1767
|
}
|
|
1766
1768
|
n.context.restore();
|
|
1767
1769
|
};
|
|
1768
|
-
function
|
|
1770
|
+
function a1(n) {
|
|
1769
1771
|
return {
|
|
1770
1772
|
color: n.color,
|
|
1771
1773
|
fontFamily: n.fontFamily,
|
|
1772
1774
|
fontSize: n.fontSize,
|
|
1773
1775
|
fontStyle: n.fontStyle,
|
|
1774
1776
|
fontWeight: n.fontWeight,
|
|
1775
|
-
ligatures: n.ligatures
|
|
1777
|
+
ligatures: n.ligatures,
|
|
1778
|
+
subscript: n.subscript,
|
|
1779
|
+
superscript: n.superscript
|
|
1776
1780
|
};
|
|
1777
1781
|
}
|
|
1778
|
-
function
|
|
1782
|
+
function h1(n, e = 1) {
|
|
1779
1783
|
const t = Math.max(...n.map((a) => a.reduce((s, r) => s + r.width, 0)));
|
|
1780
1784
|
let o = 0, i = 0;
|
|
1781
1785
|
for (let a = 0; a < n.length; a++) {
|
|
@@ -1790,101 +1794,126 @@ function ae(n, e = 1) {
|
|
|
1790
1794
|
width: t
|
|
1791
1795
|
};
|
|
1792
1796
|
}
|
|
1793
|
-
|
|
1797
|
+
const l1 = 0.7, c1 = 0.3;
|
|
1798
|
+
function Rt(n) {
|
|
1799
|
+
const e = n.superscript, t = n.subscript && !e;
|
|
1800
|
+
return !e && !t ? {
|
|
1801
|
+
baselineShift: 0,
|
|
1802
|
+
fontSize: n.fontSize,
|
|
1803
|
+
isSubscript: !1,
|
|
1804
|
+
isSuperscript: !1
|
|
1805
|
+
} : {
|
|
1806
|
+
baselineShift: n.fontSize * c1 * (e ? -1 : 1),
|
|
1807
|
+
fontSize: n.fontSize * l1,
|
|
1808
|
+
isSubscript: t,
|
|
1809
|
+
isSuperscript: e
|
|
1810
|
+
};
|
|
1811
|
+
}
|
|
1812
|
+
function u1(n) {
|
|
1794
1813
|
return {
|
|
1795
1814
|
width: n.width,
|
|
1796
1815
|
height: n.fontBoundingBoxAscent
|
|
1797
1816
|
};
|
|
1798
1817
|
}
|
|
1799
|
-
function
|
|
1800
|
-
|
|
1818
|
+
function Nt(n, e, t = 1) {
|
|
1819
|
+
const o = Rt(e);
|
|
1820
|
+
n.context.fillStyle = nt(e.color, t), n.context.font = `${e.fontStyle} ${e.fontWeight} ${o.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";
|
|
1801
1821
|
}
|
|
1802
|
-
function
|
|
1822
|
+
function f1(n, e, t) {
|
|
1803
1823
|
const o = [];
|
|
1804
1824
|
for (const i of n) {
|
|
1805
1825
|
const a = [];
|
|
1806
1826
|
for (const s of i) {
|
|
1807
1827
|
const { text: r, ...h } = s, c = { ...e, ...h };
|
|
1808
|
-
|
|
1809
|
-
const f = t.context.measureText(r);
|
|
1810
|
-
a.push(
|
|
1828
|
+
Nt(t, c);
|
|
1829
|
+
const f = t.context.measureText(r), d = u1(f), { baselineShift: l } = Rt(c), u = d.height + Math.max(0, -l), m = Math.max(0, l);
|
|
1830
|
+
a.push({
|
|
1831
|
+
...d,
|
|
1832
|
+
baselineShift: l,
|
|
1833
|
+
bottom: m,
|
|
1834
|
+
height: u + m,
|
|
1835
|
+
top: u
|
|
1836
|
+
});
|
|
1811
1837
|
}
|
|
1812
1838
|
o.push(a);
|
|
1813
1839
|
}
|
|
1814
1840
|
return o;
|
|
1815
1841
|
}
|
|
1816
|
-
const
|
|
1842
|
+
const g1 = ({ ctx: n, object: e, opacity: t }) => {
|
|
1817
1843
|
const o = e.opacity * t;
|
|
1818
1844
|
if (o === 0)
|
|
1819
1845
|
return;
|
|
1820
|
-
const { length: i } = e, a = _t(e.text), s =
|
|
1821
|
-
let f = c.origin.x,
|
|
1822
|
-
for (let
|
|
1823
|
-
const y = a[
|
|
1824
|
-
if (y == null ||
|
|
1846
|
+
const { length: i } = e, a = _t(e.text), s = a1(e), r = f1(a, s, n), h = h1(r, e.lineSpacing), c = p0(X({ x: e.x, y: e.y }), e.anchor, h);
|
|
1847
|
+
let f = c.origin.x, d = c.origin.y, l = 0, u = 0;
|
|
1848
|
+
for (let m = 0; m < a.length; m++) {
|
|
1849
|
+
const y = a[m], M = r[m];
|
|
1850
|
+
if (y == null || M == null) {
|
|
1825
1851
|
console.error("Could not determine text units or sizes for line");
|
|
1826
1852
|
continue;
|
|
1827
1853
|
}
|
|
1828
|
-
const
|
|
1854
|
+
const T = M.reduce((O, R) => O + R.width, 0), S = M.length === 0 ? u : M.reduce((O, R) => Math.max(O, R.top), 0), P = M.length === 0 ? 0 : M.reduce((O, R) => Math.max(O, R.bottom), 0), E = S + P;
|
|
1829
1855
|
switch (e.alignment) {
|
|
1830
1856
|
case x0.LEFT:
|
|
1831
1857
|
f = c.origin.x;
|
|
1832
1858
|
break;
|
|
1833
1859
|
case x0.CENTER:
|
|
1834
|
-
f = c.origin.x + (c.size.width -
|
|
1860
|
+
f = c.origin.x + (c.size.width - T) / 2;
|
|
1835
1861
|
break;
|
|
1836
1862
|
case x0.RIGHT:
|
|
1837
|
-
f = c.origin.x + (c.size.width -
|
|
1863
|
+
f = c.origin.x + (c.size.width - T);
|
|
1838
1864
|
break;
|
|
1839
1865
|
default:
|
|
1840
|
-
|
|
1866
|
+
s0(e.alignment);
|
|
1841
1867
|
break;
|
|
1842
1868
|
}
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1869
|
+
d += u * (e.lineSpacing - 1);
|
|
1870
|
+
const C = d + S;
|
|
1871
|
+
u = E;
|
|
1872
|
+
for (let O = 0; O < y.length && !(i !== null && l >= i); O++) {
|
|
1873
|
+
const R = y[O], G = M[O];
|
|
1874
|
+
if (R == null || G == null) {
|
|
1847
1875
|
console.error("Could not determine text unit or size for unit");
|
|
1848
1876
|
continue;
|
|
1849
1877
|
}
|
|
1850
|
-
const { text:
|
|
1851
|
-
let
|
|
1852
|
-
if (i !== null && l +
|
|
1853
|
-
const
|
|
1854
|
-
|
|
1878
|
+
const { text: z, ...H } = R;
|
|
1879
|
+
let t0;
|
|
1880
|
+
if (i !== null && l + z.length > i) {
|
|
1881
|
+
const K = i - l;
|
|
1882
|
+
t0 = z.slice(0, K);
|
|
1855
1883
|
}
|
|
1856
|
-
const
|
|
1857
|
-
l +=
|
|
1858
|
-
const
|
|
1859
|
-
|
|
1884
|
+
const e0 = t0 ?? z;
|
|
1885
|
+
l += e0.length;
|
|
1886
|
+
const n0 = { ...s, ...H };
|
|
1887
|
+
Nt(n, n0, o), n.context.fillText(e0, f, C + G.baselineShift), f += G.width;
|
|
1860
1888
|
}
|
|
1861
|
-
|
|
1862
|
-
}
|
|
1863
|
-
|
|
1864
|
-
[
|
|
1865
|
-
[
|
|
1866
|
-
[
|
|
1867
|
-
[
|
|
1868
|
-
[
|
|
1869
|
-
[
|
|
1870
|
-
[
|
|
1871
|
-
[
|
|
1872
|
-
[
|
|
1889
|
+
d += E;
|
|
1890
|
+
}
|
|
1891
|
+
}, p1 = {
|
|
1892
|
+
[U.ARROW]: He,
|
|
1893
|
+
[U.CIRCLE]: Ge,
|
|
1894
|
+
[U.GROUP]: Ze,
|
|
1895
|
+
[U.IMAGE]: Ve,
|
|
1896
|
+
[U.LINE]: Qe,
|
|
1897
|
+
[U.MASK]: Je,
|
|
1898
|
+
[U.PATH]: t1,
|
|
1899
|
+
[U.POLYGON]: n1,
|
|
1900
|
+
[U.RECTANGLE]: o1,
|
|
1901
|
+
[U.SLIDE_OBJECT]: () => {
|
|
1873
1902
|
},
|
|
1874
|
-
[
|
|
1875
|
-
[
|
|
1903
|
+
[U.SVG]: s1,
|
|
1904
|
+
[U.TEXT]: g1
|
|
1876
1905
|
};
|
|
1877
|
-
function
|
|
1906
|
+
function d1(n) {
|
|
1878
1907
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
1879
1908
|
return e.setAttribute("viewBox", `0 0 ${n.width} ${n.height}`), e.style.backgroundColor = "transparent", e.style.position = "absolute", e.style.width = "100%", e;
|
|
1880
1909
|
}
|
|
1881
|
-
function
|
|
1910
|
+
function x1(n, e) {
|
|
1882
1911
|
if (n === null)
|
|
1883
1912
|
return null;
|
|
1884
|
-
const t =
|
|
1885
|
-
|
|
1913
|
+
const t = p0(
|
|
1914
|
+
X({ x: e.x, y: e.y }),
|
|
1886
1915
|
e.anchor,
|
|
1887
|
-
|
|
1916
|
+
a0({ width: e.width, height: e.height })
|
|
1888
1917
|
), o = document.createElementNS("http://www.w3.org/2000/svg", "foreignObject");
|
|
1889
1918
|
o.setAttribute("x", t.origin.x.toString()), o.setAttribute("y", t.origin.y.toString()), o.setAttribute("width", e.width.toString()), o.setAttribute("height", e.height.toString());
|
|
1890
1919
|
const i = e.content;
|
|
@@ -1898,20 +1927,20 @@ function ge(n, e) {
|
|
|
1898
1927
|
a !== null && a(), n.removeChild(o);
|
|
1899
1928
|
};
|
|
1900
1929
|
}
|
|
1901
|
-
async function
|
|
1930
|
+
async function y1(n) {
|
|
1902
1931
|
if (Object.keys(n).length === 0)
|
|
1903
1932
|
return {};
|
|
1904
1933
|
const e = {}, t = (i) => new Promise((a, s) => {
|
|
1905
1934
|
const r = new Image();
|
|
1906
1935
|
if (r.onload = () => a(r), r.onerror = (c) => s(c), i.includes("</svg>")) {
|
|
1907
|
-
const c = i.replace(/<\?xml[^?]*\?>\s*/g, ""), f = new Blob([c], { type: "image/svg+xml;charset=utf-8" }),
|
|
1908
|
-
r.src =
|
|
1936
|
+
const c = i.replace(/<\?xml[^?]*\?>\s*/g, ""), f = new Blob([c], { type: "image/svg+xml;charset=utf-8" }), d = URL.createObjectURL(f);
|
|
1937
|
+
r.src = d;
|
|
1909
1938
|
} else
|
|
1910
1939
|
r.src = i;
|
|
1911
1940
|
}), o = Object.entries(n).map(async ([i, a]) => {
|
|
1912
1941
|
const s = await t(a);
|
|
1913
1942
|
e[i] = {
|
|
1914
|
-
type:
|
|
1943
|
+
type: E0.Browser,
|
|
1915
1944
|
image: s
|
|
1916
1945
|
};
|
|
1917
1946
|
});
|
|
@@ -1922,35 +1951,35 @@ async function pe(n) {
|
|
|
1922
1951
|
}
|
|
1923
1952
|
return e;
|
|
1924
1953
|
}
|
|
1925
|
-
class
|
|
1954
|
+
class kn {
|
|
1926
1955
|
constructor(e) {
|
|
1927
1956
|
const { objectRenderers: t, scale: o = 1, ...i } = e;
|
|
1928
1957
|
this.props = {
|
|
1929
|
-
presentation:
|
|
1958
|
+
presentation: Pe(),
|
|
1930
1959
|
element: document.body,
|
|
1931
1960
|
objectRenderers: {
|
|
1932
|
-
...
|
|
1961
|
+
...p1,
|
|
1933
1962
|
...t
|
|
1934
1963
|
},
|
|
1935
1964
|
cacheDurationMinutes: 15,
|
|
1936
|
-
scale:
|
|
1965
|
+
scale: v1(o),
|
|
1937
1966
|
...i
|
|
1938
1967
|
}, this.state = { ...pt };
|
|
1939
1968
|
}
|
|
1940
1969
|
/** Starts the presentation. */
|
|
1941
1970
|
async present() {
|
|
1942
|
-
const { presentation: e, element: t, scale: o } = this.props, i =
|
|
1971
|
+
const { presentation: e, element: t, scale: o } = this.props, i = ze(e.size), a = d1(e.size);
|
|
1943
1972
|
a.style.transformOrigin = "center center", a.style.transform = `scale(${o})`, this.state = {
|
|
1944
1973
|
...pt,
|
|
1945
|
-
imageById: await
|
|
1974
|
+
imageById: await y1({
|
|
1946
1975
|
...e.resources.images,
|
|
1947
|
-
...
|
|
1976
|
+
...Re(e)
|
|
1948
1977
|
}),
|
|
1949
1978
|
canvas: i,
|
|
1950
1979
|
extrasContainer: a
|
|
1951
1980
|
};
|
|
1952
|
-
const s =
|
|
1953
|
-
|
|
1981
|
+
const s = Ee(e, t);
|
|
1982
|
+
Be(e, t, this.state.shortcutState, {
|
|
1954
1983
|
onNext: (h) => this.next(h),
|
|
1955
1984
|
onPrevious: (h) => this.previous(h),
|
|
1956
1985
|
onRenderSlide: (h, c) => {
|
|
@@ -1959,52 +1988,52 @@ class Cn {
|
|
|
1959
1988
|
buildIndex: this.state.buildIndex
|
|
1960
1989
|
}, this.renderSlide(h ?? this.state.slideIndex, c);
|
|
1961
1990
|
},
|
|
1962
|
-
onShowNavigator: () =>
|
|
1991
|
+
onShowNavigator: () => be({
|
|
1963
1992
|
presentation: e,
|
|
1964
1993
|
onNavigateToSlide: (h) => this.renderSlide(h)
|
|
1965
1994
|
})
|
|
1966
1995
|
}), t.replaceChildren(), s.appendChild(i), s.appendChild(a), t.appendChild(s);
|
|
1967
|
-
const r =
|
|
1996
|
+
const r = qe(e, this.props.cacheDurationMinutes);
|
|
1968
1997
|
r !== null ? this.renderSlide(r.slideIndex, r.buildIndex) : this.renderSlide(0);
|
|
1969
1998
|
}
|
|
1970
1999
|
renderSlide(e, t = 0, o = null) {
|
|
1971
2000
|
const { objectRenderers: i, presentation: a, scale: s } = this.props, { canvas: r, imageById: h } = this.state, c = this.state.slideIndex !== e;
|
|
1972
|
-
this.state.slideIndex = e, this.state.buildIndex = t, o === null &&
|
|
2001
|
+
this.state.slideIndex = e, this.state.buildIndex = t, o === null && De({ title: a.title, slideIndex: e, buildIndex: t });
|
|
1973
2002
|
const f = a.slides[e];
|
|
1974
2003
|
if (f === void 0 || r === null)
|
|
1975
2004
|
return;
|
|
1976
2005
|
if (c || this.state.mountedExtrasCleanups.length === 0 && f.extras.length > 0) {
|
|
1977
|
-
for (const
|
|
1978
|
-
|
|
2006
|
+
for (const M of this.state.mountedExtrasCleanups)
|
|
2007
|
+
M();
|
|
1979
2008
|
this.state.mountedExtrasCleanups = [];
|
|
1980
|
-
for (const
|
|
1981
|
-
const
|
|
1982
|
-
|
|
2009
|
+
for (const M of f.extras) {
|
|
2010
|
+
const T = x1(this.state.extrasContainer, M);
|
|
2011
|
+
T !== null && this.state.mountedExtrasCleanups.push(T);
|
|
1983
2012
|
}
|
|
1984
2013
|
}
|
|
1985
|
-
const
|
|
1986
|
-
if (
|
|
2014
|
+
const d = r.getContext("2d");
|
|
2015
|
+
if (d === null)
|
|
1987
2016
|
return;
|
|
1988
2017
|
const l = {
|
|
1989
2018
|
type: V.Browser,
|
|
1990
|
-
context:
|
|
2019
|
+
context: d
|
|
1991
2020
|
};
|
|
1992
|
-
|
|
1993
|
-
const u =
|
|
2021
|
+
je(r, l);
|
|
2022
|
+
const u = Fe({
|
|
1994
2023
|
slide: f,
|
|
1995
2024
|
buildIndex: t,
|
|
1996
2025
|
buildTime: o
|
|
1997
2026
|
});
|
|
1998
2027
|
l.context.fillStyle = nt(a.backgroundColor), l.context.fillRect(0, 0, r.width, r.height);
|
|
1999
|
-
function
|
|
2000
|
-
const
|
|
2001
|
-
|
|
2028
|
+
function m(M, T) {
|
|
2029
|
+
const S = i[M.objectType], P = u.get(M);
|
|
2030
|
+
S === void 0 || P === void 0 || S({
|
|
2002
2031
|
ctx: l,
|
|
2003
2032
|
imageById: h,
|
|
2004
|
-
object:
|
|
2005
|
-
opacity:
|
|
2006
|
-
renderObject:
|
|
2007
|
-
createPath2D:
|
|
2033
|
+
object: P,
|
|
2034
|
+
opacity: T,
|
|
2035
|
+
renderObject: m,
|
|
2036
|
+
createPath2D: Ue
|
|
2008
2037
|
});
|
|
2009
2038
|
}
|
|
2010
2039
|
const y = s !== 1;
|
|
@@ -2012,8 +2041,8 @@ class Cn {
|
|
|
2012
2041
|
r.width * (1 - s) / 2,
|
|
2013
2042
|
r.height * (1 - s) / 2
|
|
2014
2043
|
), l.context.scale(s, s));
|
|
2015
|
-
for (const
|
|
2016
|
-
|
|
2044
|
+
for (const M of f.objects)
|
|
2045
|
+
m(M, 1);
|
|
2017
2046
|
y && l.context.restore();
|
|
2018
2047
|
}
|
|
2019
2048
|
next(e = !1) {
|
|
@@ -2024,8 +2053,8 @@ class Cn {
|
|
|
2024
2053
|
return;
|
|
2025
2054
|
const r = s.animations[a];
|
|
2026
2055
|
if (r !== void 0 && !e) {
|
|
2027
|
-
const h = performance.now(), c =
|
|
2028
|
-
const l =
|
|
2056
|
+
const h = performance.now(), c = Ce(r), f = (d) => {
|
|
2057
|
+
const l = d - h;
|
|
2029
2058
|
l < c ? (this.renderSlide(i, a + 1, l), this.state.currentAnimationId = requestAnimationFrame(f)) : this.renderSlide(i, a + 1, null);
|
|
2030
2059
|
};
|
|
2031
2060
|
this.state.currentAnimationId = requestAnimationFrame(f);
|
|
@@ -2041,21 +2070,29 @@ class Cn {
|
|
|
2041
2070
|
} else
|
|
2042
2071
|
this.renderSlide(0, 0);
|
|
2043
2072
|
}
|
|
2073
|
+
hasNext() {
|
|
2074
|
+
const { presentation: e } = this.props, { slideIndex: t, buildIndex: o } = this.state, i = e.slides[t];
|
|
2075
|
+
return i === void 0 ? !1 : i.animations[o] !== void 0 ? !0 : t + 1 < e.slides.length;
|
|
2076
|
+
}
|
|
2077
|
+
hasPrevious() {
|
|
2078
|
+
const { slideIndex: e, buildIndex: t } = this.state;
|
|
2079
|
+
return t > 0 || e > 0;
|
|
2080
|
+
}
|
|
2044
2081
|
}
|
|
2045
|
-
function
|
|
2082
|
+
function v1(n) {
|
|
2046
2083
|
return n <= 0 || n > 1 ? (console.warn(
|
|
2047
2084
|
`BrowserCanvasRenderer scale must be positive and no greater than 1. Received ${n}; using 1 instead.`
|
|
2048
2085
|
), 1) : n;
|
|
2049
2086
|
}
|
|
2050
|
-
function
|
|
2087
|
+
function In(n = 1e3) {
|
|
2051
2088
|
return {
|
|
2052
|
-
type:
|
|
2089
|
+
type: f0.PAUSE,
|
|
2053
2090
|
isKey: !1,
|
|
2054
2091
|
duration: n,
|
|
2055
2092
|
shortcut: null
|
|
2056
2093
|
};
|
|
2057
2094
|
}
|
|
2058
|
-
function
|
|
2095
|
+
function _n(n = null) {
|
|
2059
2096
|
return {
|
|
2060
2097
|
objects: [],
|
|
2061
2098
|
animations: [],
|
|
@@ -2068,31 +2105,31 @@ function Sn(n = null) {
|
|
|
2068
2105
|
...n
|
|
2069
2106
|
};
|
|
2070
2107
|
}
|
|
2071
|
-
function
|
|
2108
|
+
function On(n, e = {}) {
|
|
2072
2109
|
return {
|
|
2073
2110
|
...e,
|
|
2074
2111
|
text: n
|
|
2075
2112
|
};
|
|
2076
2113
|
}
|
|
2077
|
-
function
|
|
2114
|
+
function Fn(n = $.BLACK) {
|
|
2078
2115
|
return { ...n, alpha: 1 };
|
|
2079
2116
|
}
|
|
2080
|
-
function
|
|
2117
|
+
function w1(n) {
|
|
2081
2118
|
for (var e = -1, t = n.length, o, i = n[t - 1], a = 0; ++e < t; )
|
|
2082
2119
|
o = i, i = n[e], a += o[1] * i[0] - o[0] * i[1];
|
|
2083
2120
|
return a / 2;
|
|
2084
2121
|
}
|
|
2085
|
-
function
|
|
2122
|
+
function m1(n) {
|
|
2086
2123
|
for (var e = -1, t = n.length, o = n[t - 1], i, a, s = o[0], r = o[1], h = 0; ++e < t; )
|
|
2087
2124
|
i = s, a = r, o = n[e], s = o[0], r = o[1], i -= s, a -= r, h += Math.sqrt(i * i + a * a);
|
|
2088
2125
|
return h;
|
|
2089
2126
|
}
|
|
2090
|
-
function
|
|
2127
|
+
function A1(n) {
|
|
2091
2128
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
2092
2129
|
}
|
|
2093
|
-
var
|
|
2094
|
-
function
|
|
2095
|
-
if (dt) return
|
|
2130
|
+
var q0, dt;
|
|
2131
|
+
function b1() {
|
|
2132
|
+
if (dt) return q0;
|
|
2096
2133
|
dt = 1;
|
|
2097
2134
|
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 = [
|
|
2098
2135
|
5760,
|
|
@@ -2155,101 +2192,101 @@ function we() {
|
|
|
2155
2192
|
u.index++;
|
|
2156
2193
|
}
|
|
2157
2194
|
function c(u) {
|
|
2158
|
-
var
|
|
2159
|
-
if (
|
|
2195
|
+
var m = u.path.charCodeAt(u.index);
|
|
2196
|
+
if (m === 48) {
|
|
2160
2197
|
u.param = 0, u.index++;
|
|
2161
2198
|
return;
|
|
2162
2199
|
}
|
|
2163
|
-
if (
|
|
2200
|
+
if (m === 49) {
|
|
2164
2201
|
u.param = 1, u.index++;
|
|
2165
2202
|
return;
|
|
2166
2203
|
}
|
|
2167
2204
|
u.err = "SvgPath: arc flag can be 0 or 1 only (at pos " + u.index + ")";
|
|
2168
2205
|
}
|
|
2169
2206
|
function f(u) {
|
|
2170
|
-
var
|
|
2171
|
-
if (y >=
|
|
2207
|
+
var m = u.index, y = m, M = u.max, T = !1, S = !1, P = !1, E = !1, C;
|
|
2208
|
+
if (y >= M) {
|
|
2172
2209
|
u.err = "SvgPath: missed param (at pos " + y + ")";
|
|
2173
2210
|
return;
|
|
2174
2211
|
}
|
|
2175
|
-
if (C = u.path.charCodeAt(y), (C === 43 || C === 45) && (y++, C = y <
|
|
2212
|
+
if (C = u.path.charCodeAt(y), (C === 43 || C === 45) && (y++, C = y < M ? u.path.charCodeAt(y) : 0), !a(C) && C !== 46) {
|
|
2176
2213
|
u.err = "SvgPath: param should start with 0..9 or `.` (at pos " + y + ")";
|
|
2177
2214
|
return;
|
|
2178
2215
|
}
|
|
2179
2216
|
if (C !== 46) {
|
|
2180
|
-
if (
|
|
2181
|
-
u.err = "SvgPath: numbers started with `0` such as `09` are illegal (at pos " +
|
|
2217
|
+
if (T = C === 48, y++, C = y < M ? u.path.charCodeAt(y) : 0, T && y < M && C && a(C)) {
|
|
2218
|
+
u.err = "SvgPath: numbers started with `0` such as `09` are illegal (at pos " + m + ")";
|
|
2182
2219
|
return;
|
|
2183
2220
|
}
|
|
2184
|
-
for (; y <
|
|
2185
|
-
y++,
|
|
2186
|
-
C = y <
|
|
2221
|
+
for (; y < M && a(u.path.charCodeAt(y)); )
|
|
2222
|
+
y++, S = !0;
|
|
2223
|
+
C = y < M ? u.path.charCodeAt(y) : 0;
|
|
2187
2224
|
}
|
|
2188
2225
|
if (C === 46) {
|
|
2189
|
-
for (
|
|
2190
|
-
y++,
|
|
2191
|
-
C = y <
|
|
2226
|
+
for (E = !0, y++; a(u.path.charCodeAt(y)); )
|
|
2227
|
+
y++, P = !0;
|
|
2228
|
+
C = y < M ? u.path.charCodeAt(y) : 0;
|
|
2192
2229
|
}
|
|
2193
2230
|
if (C === 101 || C === 69) {
|
|
2194
|
-
if (
|
|
2231
|
+
if (E && !S && !P) {
|
|
2195
2232
|
u.err = "SvgPath: invalid float exponent (at pos " + y + ")";
|
|
2196
2233
|
return;
|
|
2197
2234
|
}
|
|
2198
|
-
if (y++, C = y <
|
|
2199
|
-
for (; y <
|
|
2235
|
+
if (y++, C = y < M ? u.path.charCodeAt(y) : 0, (C === 43 || C === 45) && y++, y < M && a(u.path.charCodeAt(y)))
|
|
2236
|
+
for (; y < M && a(u.path.charCodeAt(y)); )
|
|
2200
2237
|
y++;
|
|
2201
2238
|
else {
|
|
2202
2239
|
u.err = "SvgPath: invalid float exponent (at pos " + y + ")";
|
|
2203
2240
|
return;
|
|
2204
2241
|
}
|
|
2205
2242
|
}
|
|
2206
|
-
u.index = y, u.param = parseFloat(u.path.slice(
|
|
2207
|
-
}
|
|
2208
|
-
function
|
|
2209
|
-
var
|
|
2210
|
-
|
|
2211
|
-
var
|
|
2212
|
-
if (y === "m" &&
|
|
2213
|
-
u.result.push([
|
|
2243
|
+
u.index = y, u.param = parseFloat(u.path.slice(m, y)) + 0;
|
|
2244
|
+
}
|
|
2245
|
+
function d(u) {
|
|
2246
|
+
var m, y;
|
|
2247
|
+
m = u.path[u.segmentStart], y = m.toLowerCase();
|
|
2248
|
+
var M = u.data;
|
|
2249
|
+
if (y === "m" && M.length > 2 && (u.result.push([m, M[0], M[1]]), M = M.slice(2), y = "l", m = m === "m" ? "l" : "L"), y === "r")
|
|
2250
|
+
u.result.push([m].concat(M));
|
|
2214
2251
|
else
|
|
2215
|
-
for (;
|
|
2252
|
+
for (; M.length >= n[y] && (u.result.push([m].concat(M.splice(0, n[y]))), !!n[y]); )
|
|
2216
2253
|
;
|
|
2217
2254
|
}
|
|
2218
2255
|
function l(u) {
|
|
2219
|
-
var
|
|
2220
|
-
if (u.segmentStart = u.index, y = u.path.charCodeAt(u.index),
|
|
2256
|
+
var m = u.max, y, M, T, S, P;
|
|
2257
|
+
if (u.segmentStart = u.index, y = u.path.charCodeAt(u.index), M = i(y), !o(y)) {
|
|
2221
2258
|
u.err = "SvgPath: bad command " + u.path[u.index] + " (at pos " + u.index + ")";
|
|
2222
2259
|
return;
|
|
2223
2260
|
}
|
|
2224
|
-
if (
|
|
2225
|
-
|
|
2261
|
+
if (S = n[u.path[u.index].toLowerCase()], u.index++, h(u), u.data = [], !S) {
|
|
2262
|
+
d(u);
|
|
2226
2263
|
return;
|
|
2227
2264
|
}
|
|
2228
|
-
for (
|
|
2229
|
-
for (
|
|
2230
|
-
if (
|
|
2231
|
-
|
|
2265
|
+
for (T = !1; ; ) {
|
|
2266
|
+
for (P = S; P > 0; P--) {
|
|
2267
|
+
if (M && (P === 3 || P === 4) ? c(u) : f(u), u.err.length) {
|
|
2268
|
+
d(u);
|
|
2232
2269
|
return;
|
|
2233
2270
|
}
|
|
2234
|
-
u.data.push(u.param), h(u),
|
|
2271
|
+
u.data.push(u.param), h(u), T = !1, u.index < m && u.path.charCodeAt(u.index) === 44 && (u.index++, h(u), T = !0);
|
|
2235
2272
|
}
|
|
2236
|
-
if (!
|
|
2273
|
+
if (!T && (u.index >= u.max || !s(u.path.charCodeAt(u.index))))
|
|
2237
2274
|
break;
|
|
2238
2275
|
}
|
|
2239
|
-
|
|
2276
|
+
d(u);
|
|
2240
2277
|
}
|
|
2241
|
-
return
|
|
2242
|
-
var y = new r(
|
|
2243
|
-
for (h(y); y.index <
|
|
2278
|
+
return q0 = function(m) {
|
|
2279
|
+
var y = new r(m), M = y.max;
|
|
2280
|
+
for (h(y); y.index < M && !y.err.length; )
|
|
2244
2281
|
l(y);
|
|
2245
2282
|
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"), {
|
|
2246
2283
|
err: y.err,
|
|
2247
2284
|
segments: y.result
|
|
2248
2285
|
};
|
|
2249
|
-
},
|
|
2286
|
+
}, q0;
|
|
2250
2287
|
}
|
|
2251
2288
|
var D0, xt;
|
|
2252
|
-
function
|
|
2289
|
+
function Bt() {
|
|
2253
2290
|
if (xt) return D0;
|
|
2254
2291
|
xt = 1;
|
|
2255
2292
|
function n(t, o) {
|
|
@@ -2299,10 +2336,10 @@ function Nt() {
|
|
|
2299
2336
|
}, D0 = e, D0;
|
|
2300
2337
|
}
|
|
2301
2338
|
var j0, yt;
|
|
2302
|
-
function
|
|
2339
|
+
function M1() {
|
|
2303
2340
|
if (yt) return j0;
|
|
2304
2341
|
yt = 1;
|
|
2305
|
-
var n =
|
|
2342
|
+
var n = Bt(), e = {
|
|
2306
2343
|
matrix: !0,
|
|
2307
2344
|
scale: !0,
|
|
2308
2345
|
rotate: !0,
|
|
@@ -2345,7 +2382,7 @@ function me() {
|
|
|
2345
2382
|
}, j0;
|
|
2346
2383
|
}
|
|
2347
2384
|
var z0, vt;
|
|
2348
|
-
function
|
|
2385
|
+
function L1() {
|
|
2349
2386
|
if (vt) return z0;
|
|
2350
2387
|
vt = 1;
|
|
2351
2388
|
var n = Math.PI * 2;
|
|
@@ -2353,42 +2390,42 @@ function Ae() {
|
|
|
2353
2390
|
var h = i * r - a * s < 0 ? -1 : 1, c = i * s + a * r;
|
|
2354
2391
|
return c > 1 && (c = 1), c < -1 && (c = -1), h * Math.acos(c);
|
|
2355
2392
|
}
|
|
2356
|
-
function t(i, a, s, r, h, c, f,
|
|
2357
|
-
var
|
|
2358
|
-
|
|
2359
|
-
var C =
|
|
2360
|
-
return c === 0 &&
|
|
2393
|
+
function t(i, a, s, r, h, c, f, d, l, u) {
|
|
2394
|
+
var m = u * (i - s) / 2 + l * (a - r) / 2, y = -l * (i - s) / 2 + u * (a - r) / 2, M = f * f, T = d * d, S = m * m, P = y * y, E = M * T - M * P - T * S;
|
|
2395
|
+
E < 0 && (E = 0), E /= M * P + T * S, E = Math.sqrt(E) * (h === c ? -1 : 1);
|
|
2396
|
+
var C = E * f / d * y, O = E * -d / f * m, R = u * C - l * O + (i + s) / 2, G = l * C + u * O + (a + r) / 2, z = (m - C) / f, H = (y - O) / d, t0 = (-m - C) / f, e0 = (-y - O) / d, n0 = e(1, 0, z, H), K = e(z, H, t0, e0);
|
|
2397
|
+
return c === 0 && K > 0 && (K -= n), c === 1 && K < 0 && (K += n), [R, G, n0, K];
|
|
2361
2398
|
}
|
|
2362
2399
|
function o(i, a) {
|
|
2363
2400
|
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);
|
|
2364
2401
|
return [r, h, r - h * s, h + r * s, c + f * s, f - c * s, c, f];
|
|
2365
2402
|
}
|
|
2366
|
-
return z0 = function(a, s, r, h, c, f,
|
|
2367
|
-
var
|
|
2368
|
-
if (
|
|
2403
|
+
return z0 = function(a, s, r, h, c, f, d, l, u) {
|
|
2404
|
+
var m = Math.sin(u * n / 360), y = Math.cos(u * n / 360), M = y * (a - r) / 2 + m * (s - h) / 2, T = -m * (a - r) / 2 + y * (s - h) / 2;
|
|
2405
|
+
if (M === 0 && T === 0)
|
|
2369
2406
|
return [];
|
|
2370
|
-
if (
|
|
2407
|
+
if (d === 0 || l === 0)
|
|
2371
2408
|
return [];
|
|
2372
|
-
|
|
2373
|
-
var
|
|
2374
|
-
|
|
2375
|
-
var
|
|
2376
|
-
|
|
2377
|
-
for (var
|
|
2378
|
-
|
|
2379
|
-
return
|
|
2380
|
-
for (var
|
|
2381
|
-
var
|
|
2382
|
-
|
|
2383
|
-
var
|
|
2384
|
-
|
|
2409
|
+
d = Math.abs(d), l = Math.abs(l);
|
|
2410
|
+
var S = M * M / (d * d) + T * T / (l * l);
|
|
2411
|
+
S > 1 && (d *= Math.sqrt(S), l *= Math.sqrt(S));
|
|
2412
|
+
var P = t(a, s, r, h, c, f, d, l, m, y), E = [], C = P[2], O = P[3], R = Math.max(Math.ceil(Math.abs(O) / (n / 4)), 1);
|
|
2413
|
+
O /= R;
|
|
2414
|
+
for (var G = 0; G < R; G++)
|
|
2415
|
+
E.push(o(C, O)), C += O;
|
|
2416
|
+
return E.map(function(z) {
|
|
2417
|
+
for (var H = 0; H < z.length; H += 2) {
|
|
2418
|
+
var t0 = z[H + 0], e0 = z[H + 1];
|
|
2419
|
+
t0 *= d, e0 *= l;
|
|
2420
|
+
var n0 = y * t0 - m * e0, K = m * t0 + y * e0;
|
|
2421
|
+
z[H + 0] = n0 + P[0], z[H + 1] = K + P[1];
|
|
2385
2422
|
}
|
|
2386
|
-
return
|
|
2423
|
+
return z;
|
|
2387
2424
|
});
|
|
2388
2425
|
}, z0;
|
|
2389
2426
|
}
|
|
2390
2427
|
var U0, wt;
|
|
2391
|
-
function
|
|
2428
|
+
function T1() {
|
|
2392
2429
|
if (wt) return U0;
|
|
2393
2430
|
wt = 1;
|
|
2394
2431
|
var n = 1e-10, e = Math.PI / 180;
|
|
@@ -2406,21 +2443,21 @@ function Me() {
|
|
|
2406
2443
|
], r = s[0] * s[0] + s[2] * s[2], h = s[1] * s[1] + s[3] * s[3], c = ((s[0] - s[3]) * (s[0] - s[3]) + (s[2] + s[1]) * (s[2] + s[1])) * ((s[0] + s[3]) * (s[0] + s[3]) + (s[2] - s[1]) * (s[2] - s[1])), f = (r + h) / 2;
|
|
2407
2444
|
if (c < n * f)
|
|
2408
2445
|
return this.rx = this.ry = Math.sqrt(f), this.ax = 0, this;
|
|
2409
|
-
var
|
|
2446
|
+
var d = s[0] * s[1] + s[2] * s[3];
|
|
2410
2447
|
c = Math.sqrt(c);
|
|
2411
2448
|
var l = f + c / 2, u = f - c / 2;
|
|
2412
|
-
return this.ax = Math.abs(
|
|
2413
|
-
Math.abs(
|
|
2449
|
+
return this.ax = Math.abs(d) < n && Math.abs(l - h) < n ? 90 : Math.atan(
|
|
2450
|
+
Math.abs(d) > Math.abs(l - h) ? (l - r) / d : d / (l - h)
|
|
2414
2451
|
) * 180 / Math.PI, this.ax >= 0 ? (this.rx = Math.sqrt(l), this.ry = Math.sqrt(u)) : (this.ax += 90, this.rx = Math.sqrt(u), this.ry = Math.sqrt(l)), this;
|
|
2415
2452
|
}, t.prototype.isDegenerate = function() {
|
|
2416
2453
|
return this.rx < n * this.ry || this.ry < n * this.rx;
|
|
2417
2454
|
}, U0 = t, U0;
|
|
2418
2455
|
}
|
|
2419
2456
|
var Y0, mt;
|
|
2420
|
-
function
|
|
2457
|
+
function P1() {
|
|
2421
2458
|
if (mt) return Y0;
|
|
2422
2459
|
mt = 1;
|
|
2423
|
-
var n =
|
|
2460
|
+
var n = b1(), e = M1(), t = Bt(), o = L1(), i = T1();
|
|
2424
2461
|
function a(s) {
|
|
2425
2462
|
if (!(this instanceof a))
|
|
2426
2463
|
return new a(s);
|
|
@@ -2440,39 +2477,39 @@ function be() {
|
|
|
2440
2477
|
throw new Error("SvgPath.from: invalid param type " + s);
|
|
2441
2478
|
}, a.prototype.__matrix = function(s) {
|
|
2442
2479
|
var r = this, h;
|
|
2443
|
-
s.queue.length && this.iterate(function(c, f,
|
|
2444
|
-
var u,
|
|
2480
|
+
s.queue.length && this.iterate(function(c, f, d, l) {
|
|
2481
|
+
var u, m, y, M;
|
|
2445
2482
|
switch (c[0]) {
|
|
2446
2483
|
// Process 'assymetric' commands separately
|
|
2447
2484
|
case "v":
|
|
2448
|
-
u = s.calc(0, c[1], !0),
|
|
2485
|
+
u = s.calc(0, c[1], !0), m = u[0] === 0 ? ["v", u[1]] : ["l", u[0], u[1]];
|
|
2449
2486
|
break;
|
|
2450
2487
|
case "V":
|
|
2451
|
-
u = s.calc(
|
|
2488
|
+
u = s.calc(d, c[1], !1), m = u[0] === s.calc(d, l, !1)[0] ? ["V", u[1]] : ["L", u[0], u[1]];
|
|
2452
2489
|
break;
|
|
2453
2490
|
case "h":
|
|
2454
|
-
u = s.calc(c[1], 0, !0),
|
|
2491
|
+
u = s.calc(c[1], 0, !0), m = u[1] === 0 ? ["h", u[0]] : ["l", u[0], u[1]];
|
|
2455
2492
|
break;
|
|
2456
2493
|
case "H":
|
|
2457
|
-
u = s.calc(c[1], l, !1),
|
|
2494
|
+
u = s.calc(c[1], l, !1), m = u[1] === s.calc(d, l, !1)[1] ? ["H", u[0]] : ["L", u[0], u[1]];
|
|
2458
2495
|
break;
|
|
2459
2496
|
case "a":
|
|
2460
2497
|
case "A":
|
|
2461
|
-
var
|
|
2462
|
-
if (
|
|
2463
|
-
|
|
2498
|
+
var T = s.toArray(), S = i(c[1], c[2], c[3]).transform(T);
|
|
2499
|
+
if (T[0] * T[3] - T[1] * T[2] < 0 && (c[5] = c[5] ? "0" : "1"), u = s.calc(c[6], c[7], c[0] === "a"), c[0] === "A" && c[6] === d && c[7] === l || c[0] === "a" && c[6] === 0 && c[7] === 0) {
|
|
2500
|
+
m = [c[0] === "a" ? "l" : "L", u[0], u[1]];
|
|
2464
2501
|
break;
|
|
2465
2502
|
}
|
|
2466
|
-
|
|
2503
|
+
S.isDegenerate() ? m = [c[0] === "a" ? "l" : "L", u[0], u[1]] : m = [c[0], S.rx, S.ry, S.ax, c[4], c[5], u[0], u[1]];
|
|
2467
2504
|
break;
|
|
2468
2505
|
case "m":
|
|
2469
|
-
|
|
2506
|
+
M = f > 0, u = s.calc(c[1], c[2], M), m = ["m", u[0], u[1]];
|
|
2470
2507
|
break;
|
|
2471
2508
|
default:
|
|
2472
|
-
for (y = c[0],
|
|
2473
|
-
u = s.calc(c[h], c[h + 1],
|
|
2509
|
+
for (y = c[0], m = [y], M = y.toLowerCase() === y, h = 1; h < c.length; h += 2)
|
|
2510
|
+
u = s.calc(c[h], c[h + 1], M), m.push(u[0], u[1]);
|
|
2474
2511
|
}
|
|
2475
|
-
r.segments[f] =
|
|
2512
|
+
r.segments[f] = m;
|
|
2476
2513
|
}, !0);
|
|
2477
2514
|
}, a.prototype.__evaluateStack = function() {
|
|
2478
2515
|
var s, r;
|
|
@@ -2489,11 +2526,11 @@ function be() {
|
|
|
2489
2526
|
var s = "", r = "", h = !1;
|
|
2490
2527
|
this.__evaluateStack();
|
|
2491
2528
|
for (var c = 0, f = this.segments.length; c < f; c++) {
|
|
2492
|
-
var
|
|
2529
|
+
var d = this.segments[c], l = d[0];
|
|
2493
2530
|
l !== r || l === "m" || l === "M" ? (l === "m" && r === "z" && (s += " "), s += l, h = !1) : h = !0;
|
|
2494
|
-
for (var u = 1; u <
|
|
2495
|
-
var
|
|
2496
|
-
u === 1 ? h &&
|
|
2531
|
+
for (var u = 1; u < d.length; u++) {
|
|
2532
|
+
var m = d[u];
|
|
2533
|
+
u === 1 ? h && m >= 0 && (s += " ") : m >= 0 && (s += " "), s += m;
|
|
2497
2534
|
}
|
|
2498
2535
|
r = l;
|
|
2499
2536
|
}
|
|
@@ -2513,7 +2550,7 @@ function be() {
|
|
|
2513
2550
|
}, a.prototype.transform = function(s) {
|
|
2514
2551
|
return s.trim() ? (this.__stack.push(e(s)), this) : this;
|
|
2515
2552
|
}, a.prototype.round = function(s) {
|
|
2516
|
-
var r = 0, h = 0, c = 0, f = 0,
|
|
2553
|
+
var r = 0, h = 0, c = 0, f = 0, d;
|
|
2517
2554
|
return s = s || 0, this.__evaluateStack(), this.segments.forEach(function(l) {
|
|
2518
2555
|
var u = l[0].toLowerCase() === l[0];
|
|
2519
2556
|
switch (l[0]) {
|
|
@@ -2538,52 +2575,52 @@ function be() {
|
|
|
2538
2575
|
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);
|
|
2539
2576
|
return;
|
|
2540
2577
|
default:
|
|
2541
|
-
|
|
2578
|
+
d = l.length, u && (l[d - 2] += c, l[d - 1] += f), c = l[d - 2] - l[d - 2].toFixed(s), f = l[d - 1] - l[d - 1].toFixed(s), l.forEach(function(m, y) {
|
|
2542
2579
|
y && (l[y] = +l[y].toFixed(s));
|
|
2543
2580
|
});
|
|
2544
2581
|
return;
|
|
2545
2582
|
}
|
|
2546
2583
|
}), this;
|
|
2547
2584
|
}, a.prototype.iterate = function(s, r) {
|
|
2548
|
-
var h = this.segments, c = {}, f = !1,
|
|
2549
|
-
if (r || this.__evaluateStack(), h.forEach(function(
|
|
2550
|
-
var
|
|
2551
|
-
Array.isArray(
|
|
2552
|
-
var C =
|
|
2553
|
-
switch (
|
|
2585
|
+
var h = this.segments, c = {}, f = !1, d = 0, l = 0, u = 0, m = 0, y, M, T;
|
|
2586
|
+
if (r || this.__evaluateStack(), h.forEach(function(S, P) {
|
|
2587
|
+
var E = s(S, P, d, l);
|
|
2588
|
+
Array.isArray(E) && (c[P] = E, f = !0);
|
|
2589
|
+
var C = S[0] === S[0].toLowerCase();
|
|
2590
|
+
switch (S[0]) {
|
|
2554
2591
|
case "m":
|
|
2555
2592
|
case "M":
|
|
2556
|
-
|
|
2593
|
+
d = S[1] + (C ? d : 0), l = S[2] + (C ? l : 0), u = d, m = l;
|
|
2557
2594
|
return;
|
|
2558
2595
|
case "h":
|
|
2559
2596
|
case "H":
|
|
2560
|
-
|
|
2597
|
+
d = S[1] + (C ? d : 0);
|
|
2561
2598
|
return;
|
|
2562
2599
|
case "v":
|
|
2563
2600
|
case "V":
|
|
2564
|
-
l =
|
|
2601
|
+
l = S[1] + (C ? l : 0);
|
|
2565
2602
|
return;
|
|
2566
2603
|
case "z":
|
|
2567
2604
|
case "Z":
|
|
2568
|
-
|
|
2605
|
+
d = u, l = m;
|
|
2569
2606
|
return;
|
|
2570
2607
|
default:
|
|
2571
|
-
|
|
2608
|
+
d = S[S.length - 2] + (C ? d : 0), l = S[S.length - 1] + (C ? l : 0);
|
|
2572
2609
|
}
|
|
2573
2610
|
}), !f)
|
|
2574
2611
|
return this;
|
|
2575
|
-
for (
|
|
2612
|
+
for (T = [], y = 0; y < h.length; y++)
|
|
2576
2613
|
if (typeof c[y] < "u")
|
|
2577
|
-
for (
|
|
2578
|
-
|
|
2614
|
+
for (M = 0; M < c[y].length; M++)
|
|
2615
|
+
T.push(c[y][M]);
|
|
2579
2616
|
else
|
|
2580
|
-
|
|
2581
|
-
return this.segments =
|
|
2617
|
+
T.push(h[y]);
|
|
2618
|
+
return this.segments = T, this;
|
|
2582
2619
|
}, a.prototype.abs = function() {
|
|
2583
2620
|
return this.iterate(function(s, r, h, c) {
|
|
2584
|
-
var f = s[0],
|
|
2585
|
-
if (f !==
|
|
2586
|
-
switch (s[0] =
|
|
2621
|
+
var f = s[0], d = f.toUpperCase(), l;
|
|
2622
|
+
if (f !== d)
|
|
2623
|
+
switch (s[0] = d, f) {
|
|
2587
2624
|
case "v":
|
|
2588
2625
|
s[1] += c;
|
|
2589
2626
|
return;
|
|
@@ -2597,9 +2634,9 @@ function be() {
|
|
|
2597
2634
|
}, !0), this;
|
|
2598
2635
|
}, a.prototype.rel = function() {
|
|
2599
2636
|
return this.iterate(function(s, r, h, c) {
|
|
2600
|
-
var f = s[0],
|
|
2601
|
-
if (f !==
|
|
2602
|
-
switch (s[0] =
|
|
2637
|
+
var f = s[0], d = f.toLowerCase(), l;
|
|
2638
|
+
if (f !== d && !(r === 0 && f === "M"))
|
|
2639
|
+
switch (s[0] = d, f) {
|
|
2603
2640
|
case "V":
|
|
2604
2641
|
s[1] -= c;
|
|
2605
2642
|
return;
|
|
@@ -2613,25 +2650,25 @@ function be() {
|
|
|
2613
2650
|
}, !0), this;
|
|
2614
2651
|
}, a.prototype.unarc = function() {
|
|
2615
2652
|
return this.iterate(function(s, r, h, c) {
|
|
2616
|
-
var f,
|
|
2617
|
-
return
|
|
2653
|
+
var f, d, l, u = [], m = s[0];
|
|
2654
|
+
return m !== "A" && m !== "a" ? null : (m === "a" ? (d = h + s[6], l = c + s[7]) : (d = s[6], l = s[7]), f = o(h, c, d, 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) {
|
|
2618
2655
|
u.push(["C", y[2], y[3], y[4], y[5], y[6], y[7]]);
|
|
2619
2656
|
}), u));
|
|
2620
2657
|
}), this;
|
|
2621
2658
|
}, a.prototype.unshort = function() {
|
|
2622
|
-
var s = this.segments, r, h, c, f,
|
|
2623
|
-
return this.iterate(function(l, u,
|
|
2624
|
-
var
|
|
2625
|
-
u && (
|
|
2626
|
-
|
|
2659
|
+
var s = this.segments, r, h, c, f, d;
|
|
2660
|
+
return this.iterate(function(l, u, m, y) {
|
|
2661
|
+
var M = l[0], T = M.toUpperCase(), S;
|
|
2662
|
+
u && (T === "T" ? (S = M === "t", c = s[u - 1], c[0] === "Q" ? (r = c[1] - m, h = c[2] - y) : c[0] === "q" ? (r = c[1] - c[3], h = c[2] - c[4]) : (r = 0, h = 0), f = -r, d = -h, S || (f += m, d += y), s[u] = [
|
|
2663
|
+
S ? "q" : "Q",
|
|
2627
2664
|
f,
|
|
2628
|
-
|
|
2665
|
+
d,
|
|
2629
2666
|
l[1],
|
|
2630
2667
|
l[2]
|
|
2631
|
-
]) :
|
|
2632
|
-
|
|
2668
|
+
]) : T === "S" && (S = M === "s", c = s[u - 1], c[0] === "C" ? (r = c[3] - m, h = c[4] - y) : c[0] === "c" ? (r = c[3] - c[5], h = c[4] - c[6]) : (r = 0, h = 0), f = -r, d = -h, S || (f += m, d += y), s[u] = [
|
|
2669
|
+
S ? "c" : "C",
|
|
2633
2670
|
f,
|
|
2634
|
-
|
|
2671
|
+
d,
|
|
2635
2672
|
l[1],
|
|
2636
2673
|
l[2],
|
|
2637
2674
|
l[3],
|
|
@@ -2640,36 +2677,36 @@ function be() {
|
|
|
2640
2677
|
}), this;
|
|
2641
2678
|
}, Y0 = a, Y0;
|
|
2642
2679
|
}
|
|
2643
|
-
var
|
|
2644
|
-
function
|
|
2645
|
-
return At || (At = 1,
|
|
2680
|
+
var H0, At;
|
|
2681
|
+
function C1() {
|
|
2682
|
+
return At || (At = 1, H0 = P1()), H0;
|
|
2646
2683
|
}
|
|
2647
|
-
var
|
|
2648
|
-
const
|
|
2649
|
-
var
|
|
2650
|
-
function
|
|
2684
|
+
var S1 = C1();
|
|
2685
|
+
const E1 = /* @__PURE__ */ A1(S1);
|
|
2686
|
+
var X0 = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, k1 = /([astvzqmhlc])([^astvzqmhlc]*)/ig;
|
|
2687
|
+
function I1(n) {
|
|
2651
2688
|
var e = [];
|
|
2652
|
-
return n.replace(
|
|
2689
|
+
return n.replace(k1, function(t, o, i) {
|
|
2653
2690
|
var a = o.toLowerCase();
|
|
2654
|
-
for (i =
|
|
2655
|
-
if (i.length ===
|
|
2691
|
+
for (i = O1(i), a === "m" && i.length > 2 && (e.push([o].concat(i.splice(0, 2))), a = "l", o = o === "m" ? "l" : "L"); i.length >= 0; ) {
|
|
2692
|
+
if (i.length === X0[a])
|
|
2656
2693
|
return i.unshift(o), e.push(i);
|
|
2657
|
-
if (i.length <
|
|
2694
|
+
if (i.length < X0[a])
|
|
2658
2695
|
throw new Error("malformed path data");
|
|
2659
|
-
e.push([o].concat(i.splice(0,
|
|
2696
|
+
e.push([o].concat(i.splice(0, X0[a])));
|
|
2660
2697
|
}
|
|
2661
2698
|
}), e;
|
|
2662
2699
|
}
|
|
2663
|
-
var
|
|
2664
|
-
function
|
|
2665
|
-
var e = n.match(
|
|
2700
|
+
var _1 = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;
|
|
2701
|
+
function O1(n) {
|
|
2702
|
+
var e = n.match(_1);
|
|
2666
2703
|
return e ? e.map(Number) : [];
|
|
2667
2704
|
}
|
|
2668
|
-
function
|
|
2705
|
+
function i0(n, e, t, o, i, a, s, r) {
|
|
2669
2706
|
return new Z0(n, e, t, o, i, a, s, r);
|
|
2670
2707
|
}
|
|
2671
2708
|
function Z0(n, e, t, o, i, a, s, r) {
|
|
2672
|
-
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 =
|
|
2709
|
+
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 = Y1, this.getPoint = N1, this.getDerivative = R1) : (this.getArcLength = B1, this.getPoint = qt, this.getDerivative = F1), this.init();
|
|
2673
2710
|
}
|
|
2674
2711
|
Z0.prototype = {
|
|
2675
2712
|
constructor: Z0,
|
|
@@ -2731,13 +2768,13 @@ Z0.prototype = {
|
|
|
2731
2768
|
return { x: a.x, y: a.y, tangentX: i.x, tangentY: i.y };
|
|
2732
2769
|
}
|
|
2733
2770
|
};
|
|
2734
|
-
function
|
|
2771
|
+
function F1(n, e, t) {
|
|
2735
2772
|
return {
|
|
2736
2773
|
x: (1 - t) * 2 * (n[1] - n[0]) + t * 2 * (n[2] - n[1]),
|
|
2737
2774
|
y: (1 - t) * 2 * (e[1] - e[0]) + t * 2 * (e[2] - e[1])
|
|
2738
2775
|
};
|
|
2739
2776
|
}
|
|
2740
|
-
function
|
|
2777
|
+
function R1(n, e, t) {
|
|
2741
2778
|
var o = qt(
|
|
2742
2779
|
[3 * (n[1] - n[0]), 3 * (n[2] - n[1]), 3 * (n[3] - n[2])],
|
|
2743
2780
|
[3 * (e[1] - e[0]), 3 * (e[2] - e[1]), 3 * (e[3] - e[2])],
|
|
@@ -2747,8 +2784,8 @@ function _e(n, e, t) {
|
|
|
2747
2784
|
}
|
|
2748
2785
|
function $0(n, e, t, o, i) {
|
|
2749
2786
|
for (var a = 1, s = n / e, r = (n - t(o, i, s)) / e; a > 1e-3; ) {
|
|
2750
|
-
var h = t(o, i, s + r), c = t(o, i, s - r), f = Math.abs(n - h) / e,
|
|
2751
|
-
f < a ? (a = f, s += r) :
|
|
2787
|
+
var h = t(o, i, s + r), c = t(o, i, s - r), f = Math.abs(n - h) / e, d = Math.abs(n - c) / e;
|
|
2788
|
+
f < a ? (a = f, s += r) : d < a ? (a = d, s -= r) : r /= 2;
|
|
2752
2789
|
}
|
|
2753
2790
|
return s;
|
|
2754
2791
|
}
|
|
@@ -2756,21 +2793,21 @@ function qt(n, e, t) {
|
|
|
2756
2793
|
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];
|
|
2757
2794
|
return { x: o, y: i };
|
|
2758
2795
|
}
|
|
2759
|
-
function
|
|
2796
|
+
function N1(n, e, t) {
|
|
2760
2797
|
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];
|
|
2761
2798
|
return { x: o, y: i };
|
|
2762
2799
|
}
|
|
2763
|
-
function
|
|
2800
|
+
function B1(n, e, t) {
|
|
2764
2801
|
t === void 0 && (t = 1);
|
|
2765
2802
|
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;
|
|
2766
2803
|
if (r === 0)
|
|
2767
2804
|
return t * Math.sqrt(Math.pow(n[2] - n[0], 2) + Math.pow(e[2] - e[0], 2));
|
|
2768
|
-
var f = h / (2 * r),
|
|
2805
|
+
var f = h / (2 * r), d = c / r, l = t + f, u = d - f * f;
|
|
2769
2806
|
return Math.sqrt(r) / 2 * (l * Math.sqrt(l * l + u) - f * Math.sqrt(f * f + u) + u * Math.log(Math.abs(
|
|
2770
2807
|
(l + Math.sqrt(l * l + u)) / (f + Math.sqrt(f * f + u))
|
|
2771
2808
|
)));
|
|
2772
2809
|
}
|
|
2773
|
-
var
|
|
2810
|
+
var q1 = [
|
|
2774
2811
|
[],
|
|
2775
2812
|
[],
|
|
2776
2813
|
[-0.5773502691896257, 0.5773502691896257],
|
|
@@ -2796,7 +2833,7 @@ var Re = [
|
|
|
2796
2833
|
[-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],
|
|
2797
2834
|
[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],
|
|
2798
2835
|
[-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]
|
|
2799
|
-
],
|
|
2836
|
+
], D1 = [
|
|
2800
2837
|
[],
|
|
2801
2838
|
[],
|
|
2802
2839
|
[1, 1],
|
|
@@ -2822,9 +2859,9 @@ var Re = [
|
|
|
2822
2859
|
[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],
|
|
2823
2860
|
[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],
|
|
2824
2861
|
[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]
|
|
2825
|
-
],
|
|
2826
|
-
function
|
|
2827
|
-
return
|
|
2862
|
+
], j1 = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]];
|
|
2863
|
+
function z1(n, e) {
|
|
2864
|
+
return j1[n][e];
|
|
2828
2865
|
}
|
|
2829
2866
|
function V0(n, e, t) {
|
|
2830
2867
|
var o = t.length - 1, i, a, s;
|
|
@@ -2832,7 +2869,7 @@ function V0(n, e, t) {
|
|
|
2832
2869
|
return 0;
|
|
2833
2870
|
if (n === 0) {
|
|
2834
2871
|
for (a = 0, s = 0; s <= o; s++)
|
|
2835
|
-
a +=
|
|
2872
|
+
a += z1(o, s) * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
|
|
2836
2873
|
return a;
|
|
2837
2874
|
} else {
|
|
2838
2875
|
for (i = new Array(o), s = 0; s < o; s++)
|
|
@@ -2840,65 +2877,65 @@ function V0(n, e, t) {
|
|
|
2840
2877
|
return V0(n - 1, e, i);
|
|
2841
2878
|
}
|
|
2842
2879
|
}
|
|
2843
|
-
function
|
|
2880
|
+
function U1(n, e, t) {
|
|
2844
2881
|
var o = V0(1, t, n), i = V0(1, t, e), a = o * o + i * i;
|
|
2845
2882
|
return Math.sqrt(a);
|
|
2846
2883
|
}
|
|
2847
|
-
function
|
|
2884
|
+
function Y1(n, e, t) {
|
|
2848
2885
|
var o, i, a, s;
|
|
2849
2886
|
t === void 0 && (t = 1);
|
|
2850
2887
|
var r = 20;
|
|
2851
2888
|
for (o = t / 2, i = 0, a = 0; a < r; a++)
|
|
2852
|
-
s = o *
|
|
2889
|
+
s = o * q1[r][a] + o, i += D1[r][a] * U1(n, e, s);
|
|
2853
2890
|
return o * i;
|
|
2854
2891
|
}
|
|
2855
2892
|
var C0 = Math.PI * 2;
|
|
2856
|
-
function
|
|
2893
|
+
function bt(n, e, t, o) {
|
|
2857
2894
|
var i = n * o - e * t < 0 ? -1 : 1, a = n * t + e * o;
|
|
2858
2895
|
return a > 1 && (a = 1), a < -1 && (a = -1), i * Math.acos(a);
|
|
2859
2896
|
}
|
|
2860
|
-
function
|
|
2861
|
-
var f = c * (n - t) / 2 + h * (e - o) / 2,
|
|
2862
|
-
|
|
2863
|
-
var
|
|
2864
|
-
return a === 0 &&
|
|
2897
|
+
function H1(n, e, t, o, i, a, s, r, h, c) {
|
|
2898
|
+
var f = c * (n - t) / 2 + h * (e - o) / 2, d = -h * (n - t) / 2 + c * (e - o) / 2, l = s * s, u = r * r, m = f * f, y = d * d, M = l * u - l * y - u * m;
|
|
2899
|
+
M < 0 && (M = 0), M /= l * y + u * m, M = Math.sqrt(M) * (i === a ? -1 : 1);
|
|
2900
|
+
var T = M * s / r * d, S = M * -r / s * f, P = c * T - h * S + (n + t) / 2, E = h * T + c * S + (e + o) / 2, C = (f - T) / s, O = (d - S) / r, R = (-f - T) / s, G = (-d - S) / r, z = bt(1, 0, C, O), H = bt(C, O, R, G);
|
|
2901
|
+
return a === 0 && H > 0 && (H -= C0), a === 1 && H < 0 && (H += C0), [P, E, z, H];
|
|
2865
2902
|
}
|
|
2866
|
-
function
|
|
2903
|
+
function X1(n, e) {
|
|
2867
2904
|
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);
|
|
2868
2905
|
return [o, i, o - i * t, i + o * t, a + s * t, s - a * t, a, s];
|
|
2869
2906
|
}
|
|
2870
|
-
function
|
|
2871
|
-
var c = Math.sin(i * C0 / 360), f = Math.cos(i * C0 / 360),
|
|
2872
|
-
if (
|
|
2907
|
+
function $1(n, e, t, o, i, a, s, r, h) {
|
|
2908
|
+
var c = Math.sin(i * C0 / 360), f = Math.cos(i * C0 / 360), d = f * (n - r) / 2 + c * (e - h) / 2, l = -c * (n - r) / 2 + f * (e - h) / 2;
|
|
2909
|
+
if (d === 0 && l === 0)
|
|
2873
2910
|
return [];
|
|
2874
2911
|
if (t === 0 || o === 0)
|
|
2875
2912
|
return [];
|
|
2876
2913
|
t = Math.abs(t), o = Math.abs(o);
|
|
2877
|
-
var u =
|
|
2914
|
+
var u = d * d / (t * t) + l * l / (o * o);
|
|
2878
2915
|
u > 1 && (t *= Math.sqrt(u), o *= Math.sqrt(u));
|
|
2879
|
-
var
|
|
2880
|
-
|
|
2881
|
-
for (var
|
|
2882
|
-
y.push(
|
|
2883
|
-
return y.map(function(
|
|
2884
|
-
for (var C = 0; C <
|
|
2885
|
-
var
|
|
2886
|
-
|
|
2887
|
-
var
|
|
2888
|
-
|
|
2916
|
+
var m = H1(n, e, r, h, a, s, t, o, c, f), y = [], M = m[2], T = m[3], S = Math.max(Math.ceil(Math.abs(T) / (C0 / 4)), 1);
|
|
2917
|
+
T /= S;
|
|
2918
|
+
for (var P = 0; P < S; P++)
|
|
2919
|
+
y.push(X1(M, T)), M += T;
|
|
2920
|
+
return y.map(function(E) {
|
|
2921
|
+
for (var C = 0; C < E.length; C += 2) {
|
|
2922
|
+
var O = E[C + 0], R = E[C + 1];
|
|
2923
|
+
O *= t, R *= o;
|
|
2924
|
+
var G = f * O - c * R, z = c * O + f * R;
|
|
2925
|
+
E[C + 0] = G + m[0], E[C + 1] = z + m[1];
|
|
2889
2926
|
}
|
|
2890
|
-
return
|
|
2927
|
+
return E;
|
|
2891
2928
|
});
|
|
2892
2929
|
}
|
|
2893
|
-
function
|
|
2930
|
+
function Mt(n, e, t, o, i, a, s, r, h) {
|
|
2894
2931
|
return new K0(n, e, t, o, i, a, s, r, h);
|
|
2895
2932
|
}
|
|
2896
2933
|
function K0(n, e, t, o, i, a, s, r, h) {
|
|
2897
|
-
var c = 0, f = [],
|
|
2934
|
+
var c = 0, f = [], d = [], l = $1(n, e, t, o, i, a, s, r, h);
|
|
2898
2935
|
l.forEach(function(u) {
|
|
2899
|
-
var
|
|
2900
|
-
c += y, f.push(y),
|
|
2901
|
-
}), this.length = c, this.partialLengths = f, this.curves =
|
|
2936
|
+
var m = new i0(u[0], u[1], u[2], u[3], u[4], u[5], u[6], u[7]), y = m.getTotalLength();
|
|
2937
|
+
c += y, f.push(y), d.push(m);
|
|
2938
|
+
}), this.length = c, this.partialLengths = f, this.curves = d;
|
|
2902
2939
|
}
|
|
2903
2940
|
K0.prototype = {
|
|
2904
2941
|
constructor: K0,
|
|
@@ -2930,7 +2967,7 @@ K0.prototype = {
|
|
|
2930
2967
|
return { x: t.x, y: t.y, tangentX: e.x, tangentY: e.y };
|
|
2931
2968
|
}
|
|
2932
2969
|
};
|
|
2933
|
-
function
|
|
2970
|
+
function r0(n, e, t, o) {
|
|
2934
2971
|
return new k0(n, e, t, o);
|
|
2935
2972
|
}
|
|
2936
2973
|
function k0(n, e, t, o) {
|
|
@@ -2951,13 +2988,13 @@ k0.prototype.getPropertiesAtLength = function(n) {
|
|
|
2951
2988
|
var e = this.getPointAtLength(n), t = this.getTangentAtLength();
|
|
2952
2989
|
return { x: e.x, y: e.y, tangentX: t.x, tangentY: t.y };
|
|
2953
2990
|
};
|
|
2954
|
-
function
|
|
2991
|
+
function G1(n) {
|
|
2955
2992
|
var e = 0, t = [], o = [];
|
|
2956
2993
|
function i(s) {
|
|
2957
2994
|
if (!s)
|
|
2958
2995
|
return null;
|
|
2959
|
-
for (var r =
|
|
2960
|
-
r[l][0] === "M" ? (h = [r[l][1], r[l][2]],
|
|
2996
|
+
for (var r = I1(s), h = [0, 0], c = [0, 0], f, d, l = 0; l < r.length; l++)
|
|
2997
|
+
r[l][0] === "M" ? (h = [r[l][1], r[l][2]], d = [h[0], h[1]], o.push(null)) : r[l][0] === "m" ? (h = [r[l][1] + h[0], r[l][2] + h[1]], d = [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 r0(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 r0(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 r0(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 r0(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 r0(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 r0(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(d[0] - h[0], 2) + Math.pow(d[1] - h[1], 2)), o.push(new r0(h[0], d[0], h[1], d[1])), h = [d[0], d[1]]) : r[l][0] === "C" ? (f = new i0(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 i0(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 i0(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 i0(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 i0(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 i0(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 i0(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]) : f = new r0(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 r0(h[0] + r[l][1], h[0] + r[l][3], h[1] + r[l][2], h[1] + r[l][4]) : f = new i0(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 i0(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], r[l][1], r[l][2]) : f = new r0(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 i0(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 r0(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);
|
|
2961
2998
|
return i;
|
|
2962
2999
|
}
|
|
2963
3000
|
i.getTotalLength = function() {
|
|
@@ -2983,20 +3020,20 @@ function Xe(n) {
|
|
|
2983
3020
|
function O0(n, e) {
|
|
2984
3021
|
return Math.sqrt((n[0] - e[0]) * (n[0] - e[0]) + (n[1] - e[1]) * (n[1] - e[1]));
|
|
2985
3022
|
}
|
|
2986
|
-
function
|
|
3023
|
+
function Dt(n, e, t) {
|
|
2987
3024
|
return [n[0] + (e[0] - n[0]) * t, n[1] + (e[1] - n[1]) * t];
|
|
2988
3025
|
}
|
|
2989
|
-
function
|
|
3026
|
+
function W1(n, e) {
|
|
2990
3027
|
return O0(n, e) < 1e-9;
|
|
2991
3028
|
}
|
|
2992
|
-
function
|
|
2993
|
-
let o = n.map((i, a) =>
|
|
3029
|
+
function Z1(n, e, t) {
|
|
3030
|
+
let o = n.map((i, a) => V1(i, e[a]));
|
|
2994
3031
|
return function(i) {
|
|
2995
3032
|
let a = o.map((s) => s(i));
|
|
2996
|
-
return t ?
|
|
3033
|
+
return t ? J1(a) : a;
|
|
2997
3034
|
};
|
|
2998
3035
|
}
|
|
2999
|
-
function
|
|
3036
|
+
function V1(n, e) {
|
|
3000
3037
|
return function(t) {
|
|
3001
3038
|
return n.map((o, i) => o + t * (e[i] - o));
|
|
3002
3039
|
};
|
|
@@ -3009,20 +3046,20 @@ Example valid ways of supplying a shape would be:
|
|
|
3009
3046
|
[[0, 0], [10, 0], [10, 10]]
|
|
3010
3047
|
"M0,0 L10,0 L10,10Z"
|
|
3011
3048
|
`;
|
|
3012
|
-
function
|
|
3013
|
-
return new
|
|
3049
|
+
function K1(n) {
|
|
3050
|
+
return new E1(n).abs();
|
|
3014
3051
|
}
|
|
3015
|
-
function
|
|
3052
|
+
function Q1(n) {
|
|
3016
3053
|
return n.toString().split("M").map((e, t) => (e = e.trim(), t && e ? "M" + e : e)).filter((e) => e);
|
|
3017
3054
|
}
|
|
3018
|
-
function
|
|
3055
|
+
function J1(n) {
|
|
3019
3056
|
return "M" + n.join("L") + "Z";
|
|
3020
3057
|
}
|
|
3021
|
-
function
|
|
3022
|
-
let t =
|
|
3023
|
-
return
|
|
3058
|
+
function tn(n, e) {
|
|
3059
|
+
let t = K1(n);
|
|
3060
|
+
return en(t) || nn(t, e);
|
|
3024
3061
|
}
|
|
3025
|
-
function
|
|
3062
|
+
function en(n) {
|
|
3026
3063
|
let e = n.segments || [], t = [];
|
|
3027
3064
|
if (!e.length || e[0][0] !== "M")
|
|
3028
3065
|
return !1;
|
|
@@ -3041,11 +3078,11 @@ function Qe(n) {
|
|
|
3041
3078
|
}
|
|
3042
3079
|
return t.length ? { ring: t } : !1;
|
|
3043
3080
|
}
|
|
3044
|
-
function
|
|
3045
|
-
let t =
|
|
3081
|
+
function nn(n, e) {
|
|
3082
|
+
let t = Q1(n)[0], o = [], i, a, s = 3;
|
|
3046
3083
|
if (!t)
|
|
3047
3084
|
throw new TypeError(Q0);
|
|
3048
|
-
a =
|
|
3085
|
+
a = rn(t), i = a.getTotalLength(), e && _0(e) && e > 0 && (s = Math.max(s, Math.ceil(i / e)));
|
|
3049
3086
|
for (let r = 0; r < s; r++) {
|
|
3050
3087
|
let h = a.getPointAtLength(i * r / s);
|
|
3051
3088
|
o.push([h.x, h.y]);
|
|
@@ -3055,51 +3092,51 @@ function Je(n, e) {
|
|
|
3055
3092
|
skipBisect: !0
|
|
3056
3093
|
};
|
|
3057
3094
|
}
|
|
3058
|
-
function
|
|
3095
|
+
function rn(n) {
|
|
3059
3096
|
if (typeof window < "u" && window && window.document)
|
|
3060
3097
|
try {
|
|
3061
3098
|
let e = window.document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3062
3099
|
return e.setAttributeNS(null, "d", n), e;
|
|
3063
3100
|
} catch {
|
|
3064
3101
|
}
|
|
3065
|
-
return
|
|
3102
|
+
return G1(n);
|
|
3066
3103
|
}
|
|
3067
3104
|
function Lt(n, e) {
|
|
3068
|
-
const t = n.length + e, o =
|
|
3105
|
+
const t = n.length + e, o = m1(n) / e;
|
|
3069
3106
|
let i = 0, a = 0, s = o / 2;
|
|
3070
3107
|
for (; n.length < t; ) {
|
|
3071
3108
|
let r = n[i], h = n[(i + 1) % n.length], c = O0(r, h);
|
|
3072
3109
|
if (s <= a + c) {
|
|
3073
|
-
n.splice(i + 1, 0, c ?
|
|
3110
|
+
n.splice(i + 1, 0, c ? Dt(r, h, (s - a) / c) : r.slice(0)), s += o;
|
|
3074
3111
|
continue;
|
|
3075
3112
|
}
|
|
3076
3113
|
a += c, i++;
|
|
3077
3114
|
}
|
|
3078
3115
|
}
|
|
3079
|
-
function
|
|
3116
|
+
function on(n, e = 1 / 0) {
|
|
3080
3117
|
for (let t = 0; t < n.length; t++) {
|
|
3081
3118
|
let o = n[t], i = t === n.length - 1 ? n[0] : n[t + 1];
|
|
3082
3119
|
for (; O0(o, i) > e; )
|
|
3083
|
-
i =
|
|
3120
|
+
i = Dt(o, i, 0.5), n.splice(t + 1, 0, i);
|
|
3084
3121
|
}
|
|
3085
3122
|
}
|
|
3086
3123
|
function Tt(n, e) {
|
|
3087
3124
|
let t, o, i;
|
|
3088
3125
|
if (typeof n == "string") {
|
|
3089
|
-
let a =
|
|
3126
|
+
let a = tn(n, e);
|
|
3090
3127
|
n = a.ring, i = a.skipBisect;
|
|
3091
3128
|
} else if (!Array.isArray(n))
|
|
3092
3129
|
throw new TypeError(Q0);
|
|
3093
|
-
if (t = n.slice(0), !
|
|
3130
|
+
if (t = n.slice(0), !sn(t))
|
|
3094
3131
|
throw new TypeError(Q0);
|
|
3095
|
-
return t.length > 1 &&
|
|
3132
|
+
return t.length > 1 && W1(t[0], t[t.length - 1]) && t.pop(), o = w1(t), o > 0 && t.reverse(), !i && e && _0(e) && e > 0 && on(t, e), t;
|
|
3096
3133
|
}
|
|
3097
|
-
function
|
|
3134
|
+
function sn(n) {
|
|
3098
3135
|
return n.every(function(e) {
|
|
3099
3136
|
return Array.isArray(e) && e.length >= 2 && _0(e[0]) && _0(e[1]);
|
|
3100
3137
|
});
|
|
3101
3138
|
}
|
|
3102
|
-
function
|
|
3139
|
+
function an(n, e) {
|
|
3103
3140
|
let t = n.length, o = 1 / 0, i, a, s;
|
|
3104
3141
|
for (let r = 0; r < t; r++)
|
|
3105
3142
|
a = 0, e.forEach(function(h, c) {
|
|
@@ -3108,278 +3145,278 @@ function rn(n, e) {
|
|
|
3108
3145
|
}), a < o && (o = a, i = r);
|
|
3109
3146
|
i && (s = n.splice(0, i), n.splice(n.length, 0, ...s));
|
|
3110
3147
|
}
|
|
3111
|
-
function
|
|
3112
|
-
let i = Tt(n, t), a = Tt(e, t), s =
|
|
3148
|
+
function hn(n, e, { maxSegmentLength: t = 10, string: o = !0 } = {}) {
|
|
3149
|
+
let i = Tt(n, t), a = Tt(e, t), s = ln(i, a, o);
|
|
3113
3150
|
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);
|
|
3114
3151
|
}
|
|
3115
|
-
function
|
|
3152
|
+
function ln(n, e, t) {
|
|
3116
3153
|
let o;
|
|
3117
|
-
return o = n.length - e.length, Lt(n, o < 0 ? o * -1 : 0), Lt(e, o > 0 ? o : 0),
|
|
3154
|
+
return o = n.length - e.length, Lt(n, o < 0 ? o * -1 : 0), Lt(e, o > 0 ? o : 0), an(n, e), Z1(n, e, t);
|
|
3118
3155
|
}
|
|
3119
3156
|
var I0 = { exports: {} }, Pt;
|
|
3120
|
-
function
|
|
3157
|
+
function cn() {
|
|
3121
3158
|
if (Pt) return I0.exports;
|
|
3122
3159
|
Pt = 1, I0.exports = n, I0.exports.default = n;
|
|
3123
|
-
function n(g,
|
|
3160
|
+
function n(g, x, p) {
|
|
3124
3161
|
p = p || 2;
|
|
3125
|
-
var v =
|
|
3126
|
-
if (!
|
|
3127
|
-
var
|
|
3128
|
-
if (v && (
|
|
3129
|
-
|
|
3130
|
-
for (var
|
|
3131
|
-
|
|
3132
|
-
|
|
3162
|
+
var v = x && x.length, w = v ? x[0] * p : g.length, A = e(g, 0, w, p, !0), b = [];
|
|
3163
|
+
if (!A || A.next === A.prev) return b;
|
|
3164
|
+
var L, F, I, Y, D, N, W;
|
|
3165
|
+
if (v && (A = h(g, x, A, p)), g.length > 80 * p) {
|
|
3166
|
+
L = I = g[0], F = Y = g[1];
|
|
3167
|
+
for (var j = p; j < w; j += p)
|
|
3168
|
+
D = g[j], N = g[j + 1], D < L && (L = D), N < F && (F = N), D > I && (I = D), N > Y && (Y = N);
|
|
3169
|
+
W = Math.max(I - L, Y - F), W = W !== 0 ? 32767 / W : 0;
|
|
3133
3170
|
}
|
|
3134
|
-
return o(
|
|
3171
|
+
return o(A, b, p, L, F, W, 0), b;
|
|
3135
3172
|
}
|
|
3136
|
-
function e(g,
|
|
3137
|
-
var
|
|
3138
|
-
if (w === F0(g,
|
|
3139
|
-
for (
|
|
3173
|
+
function e(g, x, p, v, w) {
|
|
3174
|
+
var A, b;
|
|
3175
|
+
if (w === F0(g, x, p, v) > 0)
|
|
3176
|
+
for (A = x; A < p; A += v) b = e0(A, g[A], g[A + 1], b);
|
|
3140
3177
|
else
|
|
3141
|
-
for (
|
|
3142
|
-
return
|
|
3178
|
+
for (A = p - v; A >= x; A -= v) b = e0(A, g[A], g[A + 1], b);
|
|
3179
|
+
return b && E(b, b.next) && (n0(b), b = b.next), b;
|
|
3143
3180
|
}
|
|
3144
|
-
function t(g,
|
|
3181
|
+
function t(g, x) {
|
|
3145
3182
|
if (!g) return g;
|
|
3146
|
-
|
|
3183
|
+
x || (x = g);
|
|
3147
3184
|
var p = g, v;
|
|
3148
3185
|
do
|
|
3149
|
-
if (v = !1, !p.steiner && (
|
|
3150
|
-
if (
|
|
3186
|
+
if (v = !1, !p.steiner && (E(p, p.next) || P(p.prev, p, p.next) === 0)) {
|
|
3187
|
+
if (n0(p), p = x = p.prev, p === p.next) break;
|
|
3151
3188
|
v = !0;
|
|
3152
3189
|
} else
|
|
3153
3190
|
p = p.next;
|
|
3154
|
-
while (v || p !==
|
|
3155
|
-
return
|
|
3191
|
+
while (v || p !== x);
|
|
3192
|
+
return x;
|
|
3156
3193
|
}
|
|
3157
|
-
function o(g,
|
|
3194
|
+
function o(g, x, p, v, w, A, b) {
|
|
3158
3195
|
if (g) {
|
|
3159
|
-
!
|
|
3160
|
-
for (var
|
|
3161
|
-
if (
|
|
3162
|
-
|
|
3196
|
+
!b && A && u(g, v, w, A);
|
|
3197
|
+
for (var L = g, F, I; g.prev !== g.next; ) {
|
|
3198
|
+
if (F = g.prev, I = g.next, A ? a(g, v, w, A) : i(g)) {
|
|
3199
|
+
x.push(F.i / p | 0), x.push(g.i / p | 0), x.push(I.i / p | 0), n0(g), g = I.next, L = I.next;
|
|
3163
3200
|
continue;
|
|
3164
3201
|
}
|
|
3165
|
-
if (g = I, g ===
|
|
3166
|
-
|
|
3202
|
+
if (g = I, g === L) {
|
|
3203
|
+
b ? b === 1 ? (g = s(t(g), x, p), o(g, x, p, v, w, A, 2)) : b === 2 && r(g, x, p, v, w, A) : o(t(g), x, p, v, w, A, 1);
|
|
3167
3204
|
break;
|
|
3168
3205
|
}
|
|
3169
3206
|
}
|
|
3170
3207
|
}
|
|
3171
3208
|
}
|
|
3172
3209
|
function i(g) {
|
|
3173
|
-
var
|
|
3174
|
-
if (
|
|
3175
|
-
for (var w =
|
|
3176
|
-
if (
|
|
3177
|
-
|
|
3210
|
+
var x = g.prev, p = g, v = g.next;
|
|
3211
|
+
if (P(x, p, v) >= 0) return !1;
|
|
3212
|
+
for (var w = x.x, A = p.x, b = v.x, L = x.y, F = p.y, I = v.y, Y = w < A ? w < b ? w : b : A < b ? A : b, D = L < F ? L < I ? L : I : F < I ? F : I, N = w > A ? w > b ? w : b : A > b ? A : b, W = L > F ? L > I ? L : I : F > I ? F : I, j = v.next; j !== x; ) {
|
|
3213
|
+
if (j.x >= Y && j.x <= N && j.y >= D && j.y <= W && T(w, L, A, F, b, I, j.x, j.y) && P(j.prev, j, j.next) >= 0) return !1;
|
|
3214
|
+
j = j.next;
|
|
3178
3215
|
}
|
|
3179
3216
|
return !0;
|
|
3180
3217
|
}
|
|
3181
|
-
function a(g,
|
|
3182
|
-
var w = g.prev,
|
|
3183
|
-
if (
|
|
3184
|
-
for (var
|
|
3185
|
-
if (
|
|
3218
|
+
function a(g, x, p, v) {
|
|
3219
|
+
var w = g.prev, A = g, b = g.next;
|
|
3220
|
+
if (P(w, A, b) >= 0) return !1;
|
|
3221
|
+
for (var L = w.x, F = A.x, I = b.x, Y = w.y, D = A.y, N = b.y, W = L < F ? L < I ? L : I : F < I ? F : I, j = Y < D ? Y < N ? Y : N : D < N ? D : N, L0 = L > F ? L > I ? L : I : F > I ? F : I, T0 = Y > D ? Y > N ? Y : N : D > N ? D : N, it = y(W, j, x, p, v), ot = y(L0, T0, x, p, v), B = g.prevZ, q = g.nextZ; B && B.z >= it && q && q.z <= ot; ) {
|
|
3222
|
+
if (B.x >= W && B.x <= L0 && B.y >= j && B.y <= T0 && B !== w && B !== b && T(L, Y, F, D, I, N, B.x, B.y) && P(B.prev, B, B.next) >= 0 || (B = B.prevZ, q.x >= W && q.x <= L0 && q.y >= j && q.y <= T0 && q !== w && q !== b && T(L, Y, F, D, I, N, q.x, q.y) && P(q.prev, q, q.next) >= 0)) return !1;
|
|
3186
3223
|
q = q.nextZ;
|
|
3187
3224
|
}
|
|
3188
|
-
for (;
|
|
3189
|
-
if (
|
|
3190
|
-
|
|
3225
|
+
for (; B && B.z >= it; ) {
|
|
3226
|
+
if (B.x >= W && B.x <= L0 && B.y >= j && B.y <= T0 && B !== w && B !== b && T(L, Y, F, D, I, N, B.x, B.y) && P(B.prev, B, B.next) >= 0) return !1;
|
|
3227
|
+
B = B.prevZ;
|
|
3191
3228
|
}
|
|
3192
3229
|
for (; q && q.z <= ot; ) {
|
|
3193
|
-
if (q.x >=
|
|
3230
|
+
if (q.x >= W && q.x <= L0 && q.y >= j && q.y <= T0 && q !== w && q !== b && T(L, Y, F, D, I, N, q.x, q.y) && P(q.prev, q, q.next) >= 0) return !1;
|
|
3194
3231
|
q = q.nextZ;
|
|
3195
3232
|
}
|
|
3196
3233
|
return !0;
|
|
3197
3234
|
}
|
|
3198
|
-
function s(g,
|
|
3235
|
+
function s(g, x, p) {
|
|
3199
3236
|
var v = g;
|
|
3200
3237
|
do {
|
|
3201
|
-
var w = v.prev,
|
|
3202
|
-
!
|
|
3238
|
+
var w = v.prev, A = v.next.next;
|
|
3239
|
+
!E(w, A) && C(w, v, v.next, A) && z(w, A) && z(A, w) && (x.push(w.i / p | 0), x.push(v.i / p | 0), x.push(A.i / p | 0), n0(v), n0(v.next), v = g = A), v = v.next;
|
|
3203
3240
|
} while (v !== g);
|
|
3204
3241
|
return t(v);
|
|
3205
3242
|
}
|
|
3206
|
-
function r(g,
|
|
3207
|
-
var
|
|
3243
|
+
function r(g, x, p, v, w, A) {
|
|
3244
|
+
var b = g;
|
|
3208
3245
|
do {
|
|
3209
|
-
for (var
|
|
3210
|
-
if (
|
|
3211
|
-
var
|
|
3212
|
-
|
|
3246
|
+
for (var L = b.next.next; L !== b.prev; ) {
|
|
3247
|
+
if (b.i !== L.i && S(b, L)) {
|
|
3248
|
+
var F = t0(b, L);
|
|
3249
|
+
b = t(b, b.next), F = t(F, F.next), o(b, x, p, v, w, A, 0), o(F, x, p, v, w, A, 0);
|
|
3213
3250
|
return;
|
|
3214
3251
|
}
|
|
3215
|
-
|
|
3252
|
+
L = L.next;
|
|
3216
3253
|
}
|
|
3217
|
-
|
|
3218
|
-
} while (
|
|
3219
|
-
}
|
|
3220
|
-
function h(g,
|
|
3221
|
-
var w = [],
|
|
3222
|
-
for (
|
|
3223
|
-
|
|
3224
|
-
for (w.sort(c),
|
|
3225
|
-
p = f(w[
|
|
3254
|
+
b = b.next;
|
|
3255
|
+
} while (b !== g);
|
|
3256
|
+
}
|
|
3257
|
+
function h(g, x, p, v) {
|
|
3258
|
+
var w = [], A, b, L, F, I;
|
|
3259
|
+
for (A = 0, b = x.length; A < b; A++)
|
|
3260
|
+
L = x[A] * v, F = A < b - 1 ? x[A + 1] * v : g.length, I = e(g, L, F, v, !1), I === I.next && (I.steiner = !0), w.push(M(I));
|
|
3261
|
+
for (w.sort(c), A = 0; A < w.length; A++)
|
|
3262
|
+
p = f(w[A], p);
|
|
3226
3263
|
return p;
|
|
3227
3264
|
}
|
|
3228
|
-
function c(g,
|
|
3229
|
-
return g.x -
|
|
3265
|
+
function c(g, x) {
|
|
3266
|
+
return g.x - x.x;
|
|
3230
3267
|
}
|
|
3231
|
-
function f(g,
|
|
3232
|
-
var p =
|
|
3268
|
+
function f(g, x) {
|
|
3269
|
+
var p = d(g, x);
|
|
3233
3270
|
if (!p)
|
|
3234
|
-
return
|
|
3235
|
-
var v =
|
|
3271
|
+
return x;
|
|
3272
|
+
var v = t0(p, g);
|
|
3236
3273
|
return t(v, v.next), t(p, p.next);
|
|
3237
3274
|
}
|
|
3238
|
-
function
|
|
3239
|
-
var p =
|
|
3275
|
+
function d(g, x) {
|
|
3276
|
+
var p = x, v = g.x, w = g.y, A = -1 / 0, b;
|
|
3240
3277
|
do {
|
|
3241
3278
|
if (w <= p.y && w >= p.next.y && p.next.y !== p.y) {
|
|
3242
|
-
var
|
|
3243
|
-
if (
|
|
3244
|
-
return
|
|
3279
|
+
var L = p.x + (w - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
|
|
3280
|
+
if (L <= v && L > A && (A = L, b = p.x < p.next.x ? p : p.next, L === v))
|
|
3281
|
+
return b;
|
|
3245
3282
|
}
|
|
3246
3283
|
p = p.next;
|
|
3247
|
-
} while (p !==
|
|
3248
|
-
if (!
|
|
3249
|
-
var
|
|
3250
|
-
p =
|
|
3284
|
+
} while (p !== x);
|
|
3285
|
+
if (!b) return null;
|
|
3286
|
+
var F = b, I = b.x, Y = b.y, D = 1 / 0, N;
|
|
3287
|
+
p = b;
|
|
3251
3288
|
do
|
|
3252
|
-
v >= p.x && p.x >= I && v !== p.x &&
|
|
3253
|
-
while (p !==
|
|
3254
|
-
return
|
|
3289
|
+
v >= p.x && p.x >= I && v !== p.x && T(w < Y ? v : A, w, I, Y, w < Y ? A : v, w, p.x, p.y) && (N = Math.abs(w - p.y) / (v - p.x), z(p, g) && (N < D || N === D && (p.x > b.x || p.x === b.x && l(b, p))) && (b = p, D = N)), p = p.next;
|
|
3290
|
+
while (p !== F);
|
|
3291
|
+
return b;
|
|
3255
3292
|
}
|
|
3256
|
-
function l(g,
|
|
3257
|
-
return
|
|
3293
|
+
function l(g, x) {
|
|
3294
|
+
return P(g.prev, g, x.prev) < 0 && P(x.next, g, g.next) < 0;
|
|
3258
3295
|
}
|
|
3259
|
-
function u(g,
|
|
3296
|
+
function u(g, x, p, v) {
|
|
3260
3297
|
var w = g;
|
|
3261
3298
|
do
|
|
3262
|
-
w.z === 0 && (w.z = y(w.x, w.y,
|
|
3299
|
+
w.z === 0 && (w.z = y(w.x, w.y, x, p, v)), w.prevZ = w.prev, w.nextZ = w.next, w = w.next;
|
|
3263
3300
|
while (w !== g);
|
|
3264
|
-
w.prevZ.nextZ = null, w.prevZ = null,
|
|
3301
|
+
w.prevZ.nextZ = null, w.prevZ = null, m(w);
|
|
3265
3302
|
}
|
|
3266
|
-
function
|
|
3267
|
-
var
|
|
3303
|
+
function m(g) {
|
|
3304
|
+
var x, p, v, w, A, b, L, F, I = 1;
|
|
3268
3305
|
do {
|
|
3269
|
-
for (p = g, g = null,
|
|
3270
|
-
for (
|
|
3306
|
+
for (p = g, g = null, A = null, b = 0; p; ) {
|
|
3307
|
+
for (b++, v = p, L = 0, x = 0; x < I && (L++, v = v.nextZ, !!v); x++)
|
|
3271
3308
|
;
|
|
3272
|
-
for (
|
|
3273
|
-
|
|
3309
|
+
for (F = I; L > 0 || F > 0 && v; )
|
|
3310
|
+
L !== 0 && (F === 0 || !v || p.z <= v.z) ? (w = p, p = p.nextZ, L--) : (w = v, v = v.nextZ, F--), A ? A.nextZ = w : g = w, w.prevZ = A, A = w;
|
|
3274
3311
|
p = v;
|
|
3275
3312
|
}
|
|
3276
|
-
|
|
3277
|
-
} while (
|
|
3313
|
+
A.nextZ = null, I *= 2;
|
|
3314
|
+
} while (b > 1);
|
|
3278
3315
|
return g;
|
|
3279
3316
|
}
|
|
3280
|
-
function y(g,
|
|
3281
|
-
return g = (g - p) * w | 0,
|
|
3317
|
+
function y(g, x, p, v, w) {
|
|
3318
|
+
return g = (g - p) * w | 0, x = (x - v) * w | 0, g = (g | g << 8) & 16711935, g = (g | g << 4) & 252645135, g = (g | g << 2) & 858993459, g = (g | g << 1) & 1431655765, x = (x | x << 8) & 16711935, x = (x | x << 4) & 252645135, x = (x | x << 2) & 858993459, x = (x | x << 1) & 1431655765, g | x << 1;
|
|
3282
3319
|
}
|
|
3283
|
-
function
|
|
3284
|
-
var
|
|
3320
|
+
function M(g) {
|
|
3321
|
+
var x = g, p = g;
|
|
3285
3322
|
do
|
|
3286
|
-
(
|
|
3287
|
-
while (
|
|
3323
|
+
(x.x < p.x || x.x === p.x && x.y < p.y) && (p = x), x = x.next;
|
|
3324
|
+
while (x !== g);
|
|
3288
3325
|
return p;
|
|
3289
3326
|
}
|
|
3290
|
-
function
|
|
3291
|
-
return (w -
|
|
3327
|
+
function T(g, x, p, v, w, A, b, L) {
|
|
3328
|
+
return (w - b) * (x - L) >= (g - b) * (A - L) && (g - b) * (v - L) >= (p - b) * (x - L) && (p - b) * (A - L) >= (w - b) * (v - L);
|
|
3292
3329
|
}
|
|
3293
|
-
function
|
|
3294
|
-
return g.next.i !==
|
|
3295
|
-
(
|
|
3296
|
-
(
|
|
3297
|
-
|
|
3330
|
+
function S(g, x) {
|
|
3331
|
+
return g.next.i !== x.i && g.prev.i !== x.i && !G(g, x) && // dones't intersect other edges
|
|
3332
|
+
(z(g, x) && z(x, g) && H(g, x) && // locally visible
|
|
3333
|
+
(P(g.prev, g, x.prev) || P(g, x.prev, x)) || // does not create opposite-facing sectors
|
|
3334
|
+
E(g, x) && P(g.prev, g, g.next) > 0 && P(x.prev, x, x.next) > 0);
|
|
3298
3335
|
}
|
|
3299
|
-
function
|
|
3300
|
-
return (
|
|
3336
|
+
function P(g, x, p) {
|
|
3337
|
+
return (x.y - g.y) * (p.x - x.x) - (x.x - g.x) * (p.y - x.y);
|
|
3301
3338
|
}
|
|
3302
|
-
function
|
|
3303
|
-
return g.x ===
|
|
3339
|
+
function E(g, x) {
|
|
3340
|
+
return g.x === x.x && g.y === x.y;
|
|
3304
3341
|
}
|
|
3305
|
-
function C(g,
|
|
3306
|
-
var w =
|
|
3307
|
-
return !!(w !==
|
|
3342
|
+
function C(g, x, p, v) {
|
|
3343
|
+
var w = R(P(g, x, p)), A = R(P(g, x, v)), b = R(P(p, v, g)), L = R(P(p, v, x));
|
|
3344
|
+
return !!(w !== A && b !== L || w === 0 && O(g, p, x) || A === 0 && O(g, v, x) || b === 0 && O(p, g, v) || L === 0 && O(p, x, v));
|
|
3308
3345
|
}
|
|
3309
|
-
function
|
|
3310
|
-
return
|
|
3346
|
+
function O(g, x, p) {
|
|
3347
|
+
return x.x <= Math.max(g.x, p.x) && x.x >= Math.min(g.x, p.x) && x.y <= Math.max(g.y, p.y) && x.y >= Math.min(g.y, p.y);
|
|
3311
3348
|
}
|
|
3312
|
-
function
|
|
3349
|
+
function R(g) {
|
|
3313
3350
|
return g > 0 ? 1 : g < 0 ? -1 : 0;
|
|
3314
3351
|
}
|
|
3315
|
-
function
|
|
3352
|
+
function G(g, x) {
|
|
3316
3353
|
var p = g;
|
|
3317
3354
|
do {
|
|
3318
|
-
if (p.i !== g.i && p.next.i !== g.i && p.i !==
|
|
3355
|
+
if (p.i !== g.i && p.next.i !== g.i && p.i !== x.i && p.next.i !== x.i && C(p, p.next, g, x)) return !0;
|
|
3319
3356
|
p = p.next;
|
|
3320
3357
|
} while (p !== g);
|
|
3321
3358
|
return !1;
|
|
3322
3359
|
}
|
|
3323
|
-
function
|
|
3324
|
-
return
|
|
3360
|
+
function z(g, x) {
|
|
3361
|
+
return P(g.prev, g, g.next) < 0 ? P(g, x, g.next) >= 0 && P(g, g.prev, x) >= 0 : P(g, x, g.prev) < 0 || P(g, g.next, x) < 0;
|
|
3325
3362
|
}
|
|
3326
|
-
function
|
|
3327
|
-
var p = g, v = !1, w = (g.x +
|
|
3363
|
+
function H(g, x) {
|
|
3364
|
+
var p = g, v = !1, w = (g.x + x.x) / 2, A = (g.y + x.y) / 2;
|
|
3328
3365
|
do
|
|
3329
|
-
p.y >
|
|
3366
|
+
p.y > A != p.next.y > A && p.next.y !== p.y && w < (p.next.x - p.x) * (A - p.y) / (p.next.y - p.y) + p.x && (v = !v), p = p.next;
|
|
3330
3367
|
while (p !== g);
|
|
3331
3368
|
return v;
|
|
3332
3369
|
}
|
|
3333
|
-
function
|
|
3334
|
-
var p = new
|
|
3335
|
-
return g.next =
|
|
3370
|
+
function t0(g, x) {
|
|
3371
|
+
var p = new K(g.i, g.x, g.y), v = new K(x.i, x.x, x.y), w = g.next, A = x.prev;
|
|
3372
|
+
return g.next = x, x.prev = g, p.next = w, w.prev = p, v.next = p, p.prev = v, A.next = v, v.prev = A, v;
|
|
3336
3373
|
}
|
|
3337
|
-
function
|
|
3338
|
-
var w = new
|
|
3374
|
+
function e0(g, x, p, v) {
|
|
3375
|
+
var w = new K(g, x, p);
|
|
3339
3376
|
return v ? (w.next = v.next, w.prev = v, v.next.prev = w, v.next = w) : (w.prev = w, w.next = w), w;
|
|
3340
3377
|
}
|
|
3341
|
-
function
|
|
3378
|
+
function n0(g) {
|
|
3342
3379
|
g.next.prev = g.prev, g.prev.next = g.next, g.prevZ && (g.prevZ.nextZ = g.nextZ), g.nextZ && (g.nextZ.prevZ = g.prevZ);
|
|
3343
3380
|
}
|
|
3344
|
-
function
|
|
3345
|
-
this.i = g, this.x =
|
|
3381
|
+
function K(g, x, p) {
|
|
3382
|
+
this.i = g, this.x = x, this.y = p, this.prev = null, this.next = null, this.z = 0, this.prevZ = null, this.nextZ = null, this.steiner = !1;
|
|
3346
3383
|
}
|
|
3347
|
-
n.deviation = function(g,
|
|
3348
|
-
var w =
|
|
3384
|
+
n.deviation = function(g, x, p, v) {
|
|
3385
|
+
var w = x && x.length, A = w ? x[0] * p : g.length, b = Math.abs(F0(g, 0, A, p));
|
|
3349
3386
|
if (w)
|
|
3350
|
-
for (var
|
|
3351
|
-
var I =
|
|
3352
|
-
|
|
3387
|
+
for (var L = 0, F = x.length; L < F; L++) {
|
|
3388
|
+
var I = x[L] * p, Y = L < F - 1 ? x[L + 1] * p : g.length;
|
|
3389
|
+
b -= Math.abs(F0(g, I, Y, p));
|
|
3353
3390
|
}
|
|
3354
|
-
var
|
|
3355
|
-
for (
|
|
3356
|
-
var
|
|
3357
|
-
|
|
3358
|
-
(g[
|
|
3391
|
+
var D = 0;
|
|
3392
|
+
for (L = 0; L < v.length; L += 3) {
|
|
3393
|
+
var N = v[L] * p, W = v[L + 1] * p, j = v[L + 2] * p;
|
|
3394
|
+
D += Math.abs(
|
|
3395
|
+
(g[N] - g[j]) * (g[W + 1] - g[N + 1]) - (g[N] - g[W]) * (g[j + 1] - g[N + 1])
|
|
3359
3396
|
);
|
|
3360
3397
|
}
|
|
3361
|
-
return
|
|
3398
|
+
return b === 0 && D === 0 ? 0 : Math.abs((D - b) / b);
|
|
3362
3399
|
};
|
|
3363
|
-
function F0(g,
|
|
3364
|
-
for (var w = 0,
|
|
3365
|
-
w += (g[
|
|
3400
|
+
function F0(g, x, p, v) {
|
|
3401
|
+
for (var w = 0, A = x, b = p - v; A < p; A += v)
|
|
3402
|
+
w += (g[b] - g[A]) * (g[A + 1] + g[b + 1]), b = A;
|
|
3366
3403
|
return w;
|
|
3367
3404
|
}
|
|
3368
3405
|
return n.flatten = function(g) {
|
|
3369
|
-
for (var
|
|
3370
|
-
for (var
|
|
3371
|
-
for (var
|
|
3406
|
+
for (var x = g[0][0].length, p = { vertices: [], holes: [], dimensions: x }, v = 0, w = 0; w < g.length; w++) {
|
|
3407
|
+
for (var A = 0; A < g[w].length; A++)
|
|
3408
|
+
for (var b = 0; b < x; b++) p.vertices.push(g[w][A][b]);
|
|
3372
3409
|
w > 0 && (v += g[w - 1].length, p.holes.push(v));
|
|
3373
3410
|
}
|
|
3374
3411
|
return p;
|
|
3375
3412
|
}, I0.exports;
|
|
3376
3413
|
}
|
|
3377
|
-
|
|
3378
|
-
function
|
|
3414
|
+
cn();
|
|
3415
|
+
function jt(n, e) {
|
|
3379
3416
|
return n < e ? -1 : n > e ? 1 : n >= e ? 0 : NaN;
|
|
3380
3417
|
}
|
|
3381
|
-
function
|
|
3382
|
-
return n.length === 1 && (n =
|
|
3418
|
+
function un(n) {
|
|
3419
|
+
return n.length === 1 && (n = fn(n)), {
|
|
3383
3420
|
left: function(e, t, o, i) {
|
|
3384
3421
|
for (o == null && (o = 0), i == null && (i = e.length); o < i; ) {
|
|
3385
3422
|
var a = o + i >>> 1;
|
|
@@ -3396,31 +3433,31 @@ function hn(n) {
|
|
|
3396
3433
|
}
|
|
3397
3434
|
};
|
|
3398
3435
|
}
|
|
3399
|
-
function
|
|
3436
|
+
function fn(n) {
|
|
3400
3437
|
return function(e, t) {
|
|
3401
|
-
return
|
|
3438
|
+
return jt(n(e), t);
|
|
3402
3439
|
};
|
|
3403
3440
|
}
|
|
3404
|
-
|
|
3405
|
-
function
|
|
3406
|
-
const o =
|
|
3441
|
+
un(jt);
|
|
3442
|
+
function Rn(n, e, t = 3) {
|
|
3443
|
+
const o = hn(n, e, { maxSegmentLength: t });
|
|
3407
3444
|
return {
|
|
3408
3445
|
check: (i) => typeof i == "string",
|
|
3409
3446
|
interpolate: (i, a, s) => o(s)
|
|
3410
3447
|
};
|
|
3411
3448
|
}
|
|
3412
|
-
function
|
|
3449
|
+
function Nn(n) {
|
|
3413
3450
|
const e = (o) => n.width * o, t = (o) => n.height * o;
|
|
3414
3451
|
return {
|
|
3415
3452
|
scaleX: e,
|
|
3416
3453
|
scaleY: t,
|
|
3417
|
-
position: (o, i) =>
|
|
3454
|
+
position: (o, i) => X({
|
|
3418
3455
|
x: e(o),
|
|
3419
3456
|
y: t(i)
|
|
3420
3457
|
})
|
|
3421
3458
|
};
|
|
3422
3459
|
}
|
|
3423
|
-
function
|
|
3460
|
+
function Bn(n) {
|
|
3424
3461
|
const e = [];
|
|
3425
3462
|
if (n.isAllKey) {
|
|
3426
3463
|
for (let t = 0; t <= n.animations.length; t++)
|
|
@@ -3433,48 +3470,48 @@ function Fn(n) {
|
|
|
3433
3470
|
}
|
|
3434
3471
|
export {
|
|
3435
3472
|
x0 as Alignment,
|
|
3436
|
-
|
|
3473
|
+
o0 as Anchor,
|
|
3437
3474
|
et as Animate,
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3475
|
+
mn as Arrow,
|
|
3476
|
+
kn as BrowserCanvasRenderer,
|
|
3477
|
+
An as Circle,
|
|
3441
3478
|
$ as Color,
|
|
3442
3479
|
tt as Easing,
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3480
|
+
pn as FadeIn,
|
|
3481
|
+
dn as FadeOut,
|
|
3482
|
+
de as FontStyle,
|
|
3483
|
+
ye as FontWeight,
|
|
3484
|
+
bn as Grid,
|
|
3448
3485
|
st as Group,
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3486
|
+
xn as Hide,
|
|
3487
|
+
vn as IFrame,
|
|
3488
|
+
Mn as Image,
|
|
3489
|
+
Ln as Line,
|
|
3490
|
+
Tn as Mask,
|
|
3491
|
+
U as ObjectType,
|
|
3492
|
+
Fn as Opaque,
|
|
3493
|
+
Pn as Path,
|
|
3494
|
+
In as Pause,
|
|
3495
|
+
Cn as Polygon,
|
|
3496
|
+
X as Position,
|
|
3497
|
+
Pe as Presentation,
|
|
3498
|
+
Sn as Rectangle,
|
|
3499
|
+
En as SVG,
|
|
3500
|
+
wn as ScreenCapture,
|
|
3501
|
+
yn as Show,
|
|
3502
|
+
a0 as Size,
|
|
3503
|
+
_n as Slide,
|
|
3504
|
+
l0 as SlideObject,
|
|
3505
|
+
St as SlideWebExtra,
|
|
3506
|
+
Ae as Text,
|
|
3507
|
+
On as TextUnit,
|
|
3508
|
+
pe as Transparent,
|
|
3472
3509
|
Ct as Update,
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3510
|
+
Bn as getKeySlideBuildIndices,
|
|
3511
|
+
Nn as getSizingFunctions,
|
|
3512
|
+
Rn as getSmoothPathInterpolator,
|
|
3513
|
+
me as getTextContentLength,
|
|
3514
|
+
ke as interpolateColor,
|
|
3515
|
+
_e as interpolateNumber
|
|
3479
3516
|
};
|
|
3480
3517
|
//# sourceMappingURL=presenter.mjs.map
|