@snowcone-app/canvas 0.29.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ERROR_CONTRACT.md +13 -0
- package/STYLING_CONTRACT.md +2 -2
- package/dist/{CanvasRenderer-_lFoIoz5.js → CanvasRenderer-hpJ05JGO.js} +4 -4
- package/dist/{CanvasRenderer-_lFoIoz5.js.map → CanvasRenderer-hpJ05JGO.js.map} +1 -1
- package/dist/{CanvasStateV1-BMxr6xb8.js → CanvasStateV1-jLOibojY.js} +876 -844
- package/dist/{CanvasStateV1-BMxr6xb8.js.map → CanvasStateV1-jLOibojY.js.map} +1 -1
- package/dist/ContextualToolbars-DRbuUE7W.js +6061 -0
- package/dist/ContextualToolbars-DRbuUE7W.js.map +1 -0
- package/dist/{EditorCanvasImpl-BNz8TPFs.js → EditorCanvasImpl-P2GHPNA3.js} +19 -20
- package/dist/{EditorCanvasImpl-BNz8TPFs.js.map → EditorCanvasImpl-P2GHPNA3.js.map} +1 -1
- package/dist/{ExportManager-B8Td7uR5.js → ExportManager-Bkzzyxgw.js} +973 -576
- package/dist/ExportManager-Bkzzyxgw.js.map +1 -0
- package/dist/{FontAnalyzer-D4Sg-P6_.js → FontAnalyzer-BYhwxDhe.js} +542 -477
- package/dist/FontAnalyzer-BYhwxDhe.js.map +1 -0
- package/dist/{ImagePanel-CN2Bu3hf.js → ImagePanel-CEr0_FYy.js} +38 -38
- package/dist/{ImagePanel-CN2Bu3hf.js.map → ImagePanel-CEr0_FYy.js.map} +1 -1
- package/dist/SnowconeCanvas-Fa0isFpO.js +1192 -0
- package/dist/SnowconeCanvas-Fa0isFpO.js.map +1 -0
- package/dist/advanced.mjs +14 -14
- package/dist/api/embed.d.ts +2 -0
- package/dist/api/stable.d.ts +2 -0
- package/dist/components/CanvasContextMenu.d.ts +15 -0
- package/dist/components/CanvasEditor/hooks/useCanvasInteraction.d.ts +27 -0
- package/dist/components/CanvasEditor.d.ts +8 -0
- package/dist/components/ImageToolbar.d.ts +4 -0
- package/dist/components/embed/SnowconeCanvas.d.ts +13 -0
- package/dist/components/embed/kernel.d.ts +8 -0
- package/dist/components/toolbars/EmbeddedToolbarLayout.d.ts +2 -0
- package/dist/components/toolbars/SecondaryPanels.d.ts +17 -1
- package/dist/components/toolbars/index.d.ts +2 -2
- package/dist/components/ui/SliderRow.d.ts +6 -0
- package/dist/components/ui/icons.d.ts +2 -0
- package/dist/components/ui/toolbar-button.d.ts +2 -2
- package/dist/contexts/CanvasServicesContext.d.ts +17 -0
- package/dist/contexts/EditorContext.d.ts +7 -0
- package/dist/core/image-adjustments.d.ts +32 -0
- package/dist/{custom-icons-B5TRC1Ed.js → custom-icons-Co4rcW0S.js} +7 -7
- package/dist/{custom-icons-B5TRC1Ed.js.map → custom-icons-Co4rcW0S.js.map} +1 -1
- package/dist/design-builder-CBG2hKc8.js +1672 -0
- package/dist/design-builder-CBG2hKc8.js.map +1 -0
- package/dist/{embed-BTRtoktw.js → embed-D4TIzO7g.js} +20 -20
- package/dist/{embed-BTRtoktw.js.map → embed-D4TIzO7g.js.map} +1 -1
- package/dist/embed.mjs +51 -46
- package/dist/embed.mjs.map +1 -1
- package/dist/errors/editorError.d.ts +8 -0
- package/dist/{guards-uQtEQJbs.js → guards-DgZuwVgu.js} +2 -2
- package/dist/{guards-uQtEQJbs.js.map → guards-DgZuwVgu.js.map} +1 -1
- package/dist/hooks/elementPatch.d.ts +7 -2
- package/dist/hooks/useKeyboardShortcuts.d.ts +15 -2
- package/dist/hooks/useLayers.d.ts +2 -0
- package/dist/index.mjs +57 -52
- package/dist/index.mjs.map +1 -1
- package/dist/internals.mjs +201 -132
- package/dist/internals.mjs.map +1 -1
- package/dist/rendering/element-painters.d.ts +0 -13
- package/dist/rendering/element-serializer.d.ts +3 -1
- package/dist/rendering/image-adjustments.d.ts +24 -0
- package/dist/rendering/renderer-types.d.ts +8 -1
- package/dist/state/CanvasStateV1.d.ts +36 -3
- package/dist/state/index.d.ts +2 -2
- package/dist/template-fields-CvFcr5zy.js +505 -0
- package/dist/template-fields-CvFcr5zy.js.map +1 -0
- package/dist/testing.mjs +46 -47
- package/dist/testing.mjs.map +1 -1
- package/dist/types/index.d.ts +21 -0
- package/dist/{UnifiedFontService-CgYnYTj7.js → useCommands-bPXY9rCh.js} +2429 -2145
- package/dist/useCommands-bPXY9rCh.js.map +1 -0
- package/dist/{usePieceGuideBundle-CTQszfKA.js → usePieceGuideBundle-Bj98nPk0.js} +2 -2
- package/dist/{usePieceGuideBundle-CTQszfKA.js.map → usePieceGuideBundle-Bj98nPk0.js.map} +1 -1
- package/dist/utils/custom-fonts.d.ts +99 -0
- package/dist/utils/featureApplied.d.ts +2 -0
- package/dist/validation-CsTlSvJJ.js +8686 -0
- package/dist/validation-CsTlSvJJ.js.map +1 -0
- package/dist/workers/export-protocol.d.ts +13 -0
- package/dist/workers/export-worker.bundle.string.d.ts +1 -1
- package/example/package.json +1 -1
- package/package.json +1 -1
- package/dist/ContextualToolbars-0jWvnQgp.js +0 -5833
- package/dist/ContextualToolbars-0jWvnQgp.js.map +0 -1
- package/dist/ExportManager-B8Td7uR5.js.map +0 -1
- package/dist/FontAnalyzer-D4Sg-P6_.js.map +0 -1
- package/dist/SnowconeCanvas-CR_LdRFP.js +0 -1173
- package/dist/SnowconeCanvas-CR_LdRFP.js.map +0 -1
- package/dist/UnifiedFontService-CgYnYTj7.js.map +0 -1
- package/dist/design-builder-COj0zkxu.js +0 -470
- package/dist/design-builder-COj0zkxu.js.map +0 -1
- package/dist/editorErrors-CCvoKj_P.js +0 -1219
- package/dist/editorErrors-CCvoKj_P.js.map +0 -1
- package/dist/template-fields-BLRp84Ny.js +0 -716
- package/dist/template-fields-BLRp84Ny.js.map +0 -1
- package/dist/validation-eCebhplp.js +0 -8402
- package/dist/validation-eCebhplp.js.map +0 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
function
|
|
1
|
+
function ne(r) {
|
|
2
2
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
3
3
|
}
|
|
4
|
-
var
|
|
5
|
-
function
|
|
4
|
+
var Wt = { exports: {} }, O = Wt.exports = {}, X, N;
|
|
5
|
+
function Ct() {
|
|
6
6
|
throw new Error("setTimeout has not been defined");
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function vt() {
|
|
9
9
|
throw new Error("clearTimeout has not been defined");
|
|
10
10
|
}
|
|
11
11
|
(function() {
|
|
12
12
|
try {
|
|
13
|
-
typeof setTimeout == "function" ? X = setTimeout : X =
|
|
13
|
+
typeof setTimeout == "function" ? X = setTimeout : X = Ct;
|
|
14
14
|
} catch {
|
|
15
|
-
X =
|
|
15
|
+
X = Ct;
|
|
16
16
|
}
|
|
17
17
|
try {
|
|
18
|
-
typeof clearTimeout == "function" ?
|
|
18
|
+
typeof clearTimeout == "function" ? N = clearTimeout : N = vt;
|
|
19
19
|
} catch {
|
|
20
|
-
|
|
20
|
+
N = vt;
|
|
21
21
|
}
|
|
22
22
|
})();
|
|
23
|
-
function
|
|
23
|
+
function zt(r) {
|
|
24
24
|
if (X === setTimeout)
|
|
25
25
|
return setTimeout(r, 0);
|
|
26
|
-
if ((X ===
|
|
26
|
+
if ((X === Ct || !X) && setTimeout)
|
|
27
27
|
return X = setTimeout, setTimeout(r, 0);
|
|
28
28
|
try {
|
|
29
29
|
return X(r, 0);
|
|
@@ -35,35 +35,35 @@ function Pt(r) {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
if (
|
|
38
|
+
function ae(r) {
|
|
39
|
+
if (N === clearTimeout)
|
|
40
40
|
return clearTimeout(r);
|
|
41
|
-
if ((
|
|
42
|
-
return
|
|
41
|
+
if ((N === vt || !N) && clearTimeout)
|
|
42
|
+
return N = clearTimeout, clearTimeout(r);
|
|
43
43
|
try {
|
|
44
|
-
return
|
|
44
|
+
return N(r);
|
|
45
45
|
} catch {
|
|
46
46
|
try {
|
|
47
|
-
return
|
|
47
|
+
return N.call(null, r);
|
|
48
48
|
} catch {
|
|
49
|
-
return
|
|
49
|
+
return N.call(this, r);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
var _ = [], K = !1, V, dt = -1;
|
|
54
|
-
function
|
|
55
|
-
!K || !V || (K = !1, V.length ? _ = V.concat(_) : dt = -1, _.length &&
|
|
54
|
+
function he() {
|
|
55
|
+
!K || !V || (K = !1, V.length ? _ = V.concat(_) : dt = -1, _.length && Xt());
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function Xt() {
|
|
58
58
|
if (!K) {
|
|
59
|
-
var r =
|
|
59
|
+
var r = zt(he);
|
|
60
60
|
K = !0;
|
|
61
61
|
for (var t = _.length; t; ) {
|
|
62
62
|
for (V = _, _ = []; ++dt < t; )
|
|
63
63
|
V && V[dt].run();
|
|
64
64
|
dt = -1, t = _.length;
|
|
65
65
|
}
|
|
66
|
-
V = null, K = !1,
|
|
66
|
+
V = null, K = !1, ae(r);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
O.nextTick = function(r) {
|
|
@@ -71,12 +71,12 @@ O.nextTick = function(r) {
|
|
|
71
71
|
if (arguments.length > 1)
|
|
72
72
|
for (var e = 1; e < arguments.length; e++)
|
|
73
73
|
t[e - 1] = arguments[e];
|
|
74
|
-
_.push(new
|
|
74
|
+
_.push(new Nt(r, t)), _.length === 1 && !K && zt(Xt);
|
|
75
75
|
};
|
|
76
|
-
function
|
|
76
|
+
function Nt(r, t) {
|
|
77
77
|
this.fun = r, this.array = t;
|
|
78
78
|
}
|
|
79
|
-
|
|
79
|
+
Nt.prototype.run = function() {
|
|
80
80
|
this.fun.apply(null, this.array);
|
|
81
81
|
};
|
|
82
82
|
O.title = "browser";
|
|
@@ -85,17 +85,17 @@ O.env = {};
|
|
|
85
85
|
O.argv = [];
|
|
86
86
|
O.version = "";
|
|
87
87
|
O.versions = {};
|
|
88
|
-
function
|
|
89
|
-
}
|
|
90
|
-
O.on =
|
|
91
|
-
O.addListener =
|
|
92
|
-
O.once =
|
|
93
|
-
O.off =
|
|
94
|
-
O.removeListener =
|
|
95
|
-
O.removeAllListeners =
|
|
96
|
-
O.emit =
|
|
97
|
-
O.prependListener =
|
|
98
|
-
O.prependOnceListener =
|
|
88
|
+
function Y() {
|
|
89
|
+
}
|
|
90
|
+
O.on = Y;
|
|
91
|
+
O.addListener = Y;
|
|
92
|
+
O.once = Y;
|
|
93
|
+
O.off = Y;
|
|
94
|
+
O.removeListener = Y;
|
|
95
|
+
O.removeAllListeners = Y;
|
|
96
|
+
O.emit = Y;
|
|
97
|
+
O.prependListener = Y;
|
|
98
|
+
O.prependOnceListener = Y;
|
|
99
99
|
O.listeners = function(r) {
|
|
100
100
|
return [];
|
|
101
101
|
};
|
|
@@ -111,12 +111,12 @@ O.chdir = function(r) {
|
|
|
111
111
|
O.umask = function() {
|
|
112
112
|
return 0;
|
|
113
113
|
};
|
|
114
|
-
var
|
|
115
|
-
const
|
|
116
|
-
let
|
|
114
|
+
var le = Wt.exports;
|
|
115
|
+
const ft = /* @__PURE__ */ ne(le);
|
|
116
|
+
let Bt = 1;
|
|
117
117
|
class nt {
|
|
118
118
|
constructor(t = {}) {
|
|
119
|
-
this.transformType = "artboard", this.id = t.id || `artboard-${
|
|
119
|
+
this.transformType = "artboard", this.id = t.id || `artboard-${Bt++}`, this.name = t.name || `Artboard ${Bt}`, this.x = t.x !== void 0 ? t.x : 0, this.y = t.y !== void 0 ? t.y : 0, this.width = t.width || 1920, this.height = t.height || 1080, this.backgroundColor = t.backgroundColor || "#ffffff", t.backgroundType ? this.backgroundType = t.backgroundType : t.backgroundColor === "transparent" ? this.backgroundType = "transparent" : t.backgroundTexture ? this.backgroundType = "texture" : this.backgroundType = "color", this.backgroundTexture = t.backgroundTexture, this.exportBackground = t.exportBackground ?? !1, this.clipShape = t.clipShape, this.previewBackgroundColor = t.previewBackgroundColor, this.role = t.role, this.distressTexture = t.distressTexture ? { ...t.distressTexture } : void 0, this.imageMask = t.imageMask ? { ...t.imageMask } : void 0, this.elementIds = new Set(t.elementIds || []);
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
122
122
|
* Get bounding box of the artboard
|
|
@@ -274,7 +274,7 @@ class nt {
|
|
|
274
274
|
this.x = t, this.y = e;
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
|
-
class
|
|
277
|
+
class ri {
|
|
278
278
|
constructor() {
|
|
279
279
|
this.artboards = /* @__PURE__ */ new Map(), this.elementToArtboard = /* @__PURE__ */ new Map(), this.activeArtboardId = null;
|
|
280
280
|
}
|
|
@@ -521,7 +521,7 @@ const I = {
|
|
|
521
521
|
return t > 180 && (t -= 360), t;
|
|
522
522
|
}
|
|
523
523
|
};
|
|
524
|
-
let
|
|
524
|
+
let ce = 1;
|
|
525
525
|
class Q {
|
|
526
526
|
/** Whether this element clips content below it (derived from blendMode === 'clip') */
|
|
527
527
|
get isClipping() {
|
|
@@ -531,7 +531,7 @@ class Q {
|
|
|
531
531
|
t ? (this.blendMode = "clip", this.knockoutParts || (this.knockoutParts = { fill: !0, scope: "group" })) : this.blendMode === "clip" && (this.blendMode = "normal");
|
|
532
532
|
}
|
|
533
533
|
constructor(t = {}) {
|
|
534
|
-
this.id = t.id || `element-${
|
|
534
|
+
this.id = t.id || `element-${ce++}`, this.x = t.x !== void 0 ? t.x : 100, this.y = t.y !== void 0 ? t.y : 100, this.rotation = t.rotation !== void 0 ? t.rotation : 0, this.opacity = t.opacity !== void 0 ? t.opacity : 1, this.transformType = t.transformType || "custom", this.transformData = t.transformData || {}, this.blendMode = t.blendMode, this.knockoutParts = t.knockoutParts, this.stroke = t.stroke, this.masks = t.masks, this.distressEffect = t.distressEffect, t.isClipping && !t.blendMode && (this.blendMode = "clip", this.knockoutParts || (this.knockoutParts = { fill: !0, scope: "group" })), this.name = t.name, this.visible = t.visible !== void 0 ? t.visible : !0, this.locked = t.locked !== void 0 ? t.locked : !1;
|
|
535
535
|
}
|
|
536
536
|
/**
|
|
537
537
|
* Get visual bounding box (tight fit around actual rendered content)
|
|
@@ -791,7 +791,7 @@ class P {
|
|
|
791
791
|
return new P(t);
|
|
792
792
|
}
|
|
793
793
|
}
|
|
794
|
-
const
|
|
794
|
+
const de = [
|
|
795
795
|
// Bold/Display Fonts - Perfect for statements and headlines (49 fonts)
|
|
796
796
|
{
|
|
797
797
|
name: "Bebas Neue",
|
|
@@ -2267,10 +2267,10 @@ const he = [
|
|
|
2267
2267
|
description: "Humanist monospace"
|
|
2268
2268
|
}
|
|
2269
2269
|
];
|
|
2270
|
-
function
|
|
2271
|
-
return
|
|
2270
|
+
function ge() {
|
|
2271
|
+
return de.map((r) => r.name);
|
|
2272
2272
|
}
|
|
2273
|
-
const
|
|
2273
|
+
const ni = {
|
|
2274
2274
|
system: "System Fonts",
|
|
2275
2275
|
display: "Bold & Display",
|
|
2276
2276
|
"sans-serif": "Sans Serif",
|
|
@@ -2282,26 +2282,26 @@ const ei = {
|
|
|
2282
2282
|
decorative: "Decorative & Unique",
|
|
2283
2283
|
monospace: "Monospace"
|
|
2284
2284
|
};
|
|
2285
|
-
function
|
|
2285
|
+
function _t(r) {
|
|
2286
2286
|
if (typeof window > "u" || typeof document > "u")
|
|
2287
2287
|
return "oklch(0% 0 0)";
|
|
2288
2288
|
const t = r || document.documentElement;
|
|
2289
2289
|
return getComputedStyle(t).getPropertyValue("--accent").trim() || "oklch(0% 0 0)";
|
|
2290
2290
|
}
|
|
2291
|
-
function
|
|
2291
|
+
function fe(r) {
|
|
2292
2292
|
return typeof window > "u" || typeof document > "u" ? "light" : document.documentElement.getAttribute("data-theme") || "light";
|
|
2293
2293
|
}
|
|
2294
|
-
function
|
|
2295
|
-
return
|
|
2294
|
+
function Yt() {
|
|
2295
|
+
return fe().includes("dark") ? "#60a5fa" : "#3b82f6";
|
|
2296
2296
|
}
|
|
2297
|
-
function
|
|
2297
|
+
function ai(r) {
|
|
2298
2298
|
if (typeof window > "u" || typeof document > "u")
|
|
2299
2299
|
return "#FF0000";
|
|
2300
2300
|
const t = r || document.documentElement;
|
|
2301
2301
|
return getComputedStyle(t).getPropertyValue("--color-spacing-indicator").trim() || "#FF0000";
|
|
2302
2302
|
}
|
|
2303
|
-
function
|
|
2304
|
-
const e =
|
|
2303
|
+
function hi(r = 0.1, t) {
|
|
2304
|
+
const e = _t(t);
|
|
2305
2305
|
if (e.startsWith("oklch("))
|
|
2306
2306
|
return `${e.slice(0, -1)} / ${r})`;
|
|
2307
2307
|
if (e.startsWith("#")) {
|
|
@@ -2310,71 +2310,71 @@ function si(r = 0.1, t) {
|
|
|
2310
2310
|
}
|
|
2311
2311
|
return e;
|
|
2312
2312
|
}
|
|
2313
|
-
function
|
|
2313
|
+
function li(r) {
|
|
2314
2314
|
if (typeof window > "u" || typeof document > "u")
|
|
2315
2315
|
return "oklch(0% 0 0 / 0.45)";
|
|
2316
2316
|
const t = r || document.documentElement;
|
|
2317
2317
|
return getComputedStyle(t).getPropertyValue("--color-text-selection").trim() || "oklch(0% 0 0 / 0.45)";
|
|
2318
2318
|
}
|
|
2319
|
-
function
|
|
2319
|
+
function ci(r) {
|
|
2320
2320
|
if (typeof window > "u" || typeof document > "u")
|
|
2321
2321
|
return "#b5f747";
|
|
2322
2322
|
const t = r || document.documentElement;
|
|
2323
2323
|
return getComputedStyle(t).getPropertyValue("--color-accent-hover").trim() || "#b5f747";
|
|
2324
2324
|
}
|
|
2325
|
-
function
|
|
2325
|
+
function ue(r) {
|
|
2326
2326
|
if (typeof window > "u" || typeof document > "u")
|
|
2327
2327
|
return "oklch(0.2103 0.0059 285.89)";
|
|
2328
2328
|
const t = r || document.documentElement;
|
|
2329
2329
|
return getComputedStyle(t).getPropertyValue("--foreground").trim() || "oklch(0.2103 0.0059 285.89)";
|
|
2330
2330
|
}
|
|
2331
|
-
function
|
|
2331
|
+
function di(r) {
|
|
2332
2332
|
if (typeof window > "u" || typeof document > "u")
|
|
2333
2333
|
return "oklch(0.9607 0 0)";
|
|
2334
2334
|
const t = r || document.documentElement;
|
|
2335
2335
|
return getComputedStyle(t).getPropertyValue("--background").trim() || "oklch(0.9607 0 0)";
|
|
2336
2336
|
}
|
|
2337
|
-
function
|
|
2338
|
-
const t =
|
|
2337
|
+
function gi(r) {
|
|
2338
|
+
const t = ue(r);
|
|
2339
2339
|
return t.startsWith("oklch(") ? `${t.slice(0, -1)} / 0.2)` : "rgba(0,0,0,0.2)";
|
|
2340
2340
|
}
|
|
2341
|
-
function
|
|
2341
|
+
function fi(r) {
|
|
2342
2342
|
if (typeof window > "u" || typeof document > "u")
|
|
2343
2343
|
return "oklch(0% 0 0 / 0.2)";
|
|
2344
2344
|
const t = document.documentElement;
|
|
2345
2345
|
return getComputedStyle(t).getPropertyValue("--divider").trim() || "oklch(0% 0 0 / 0.2)";
|
|
2346
2346
|
}
|
|
2347
|
-
function
|
|
2347
|
+
function ui(r) {
|
|
2348
2348
|
if (typeof window > "u" || typeof document > "u")
|
|
2349
2349
|
return "oklch(0% 0 0 / 0.5)";
|
|
2350
2350
|
const t = document.documentElement, e = getComputedStyle(t).getPropertyValue("--foreground").trim();
|
|
2351
2351
|
return e.startsWith("oklch(") ? `${e.slice(0, -1)} / 0.5)` : e || "oklch(0% 0 0 / 0.5)";
|
|
2352
2352
|
}
|
|
2353
|
-
function
|
|
2353
|
+
function mi(r) {
|
|
2354
2354
|
if (typeof window > "u" || typeof document > "u")
|
|
2355
2355
|
return "#b5f747";
|
|
2356
2356
|
const t = document.documentElement;
|
|
2357
2357
|
return getComputedStyle(t).getPropertyValue("--color-accent-hover-border").trim() || "#b5f747";
|
|
2358
2358
|
}
|
|
2359
|
-
function
|
|
2359
|
+
function pi(r) {
|
|
2360
2360
|
if (typeof window > "u" || typeof document > "u")
|
|
2361
2361
|
return "oklch(0.2103 0.0059 285.89)";
|
|
2362
2362
|
const t = document.documentElement;
|
|
2363
2363
|
return getComputedStyle(t).getPropertyValue("--foreground").trim() || "oklch(0.2103 0.0059 285.89)";
|
|
2364
2364
|
}
|
|
2365
|
-
function
|
|
2365
|
+
function yi(r) {
|
|
2366
2366
|
if (typeof window > "u" || typeof document > "u")
|
|
2367
2367
|
return "oklch(1 0 0)";
|
|
2368
2368
|
const t = document.documentElement;
|
|
2369
2369
|
return getComputedStyle(t).getPropertyValue("--background").trim() || "oklch(1 0 0)";
|
|
2370
2370
|
}
|
|
2371
|
-
function
|
|
2371
|
+
function wi(r) {
|
|
2372
2372
|
if (typeof window > "u" || typeof document > "u")
|
|
2373
2373
|
return "oklch(0.2103 0.0059 285.89 / 0.5)";
|
|
2374
2374
|
const t = document.documentElement, e = getComputedStyle(t).getPropertyValue("--foreground").trim();
|
|
2375
2375
|
return e.startsWith("oklch(") ? `${e.slice(0, -1)} / 0.5)` : e || "oklch(0.2103 0.0059 285.89 / 0.5)";
|
|
2376
2376
|
}
|
|
2377
|
-
const
|
|
2377
|
+
const bi = 1, xi = "#ffffff", me = 20, Si = 6, Ci = 24, pe = 16, ye = 36, we = 24, vi = 4, Ti = "#FFFFFF", Fi = 2, Ai = 0.1, Mi = ge(), Di = [8, 10, 12, 14, 16, 18, 20, 24, 28, 32, 36, 48, 64, 72, 96, 128], j = 0, Ut = 1.2, Gt = 50, be = 8, xe = 999, Se = /* @__PURE__ */ new Set([
|
|
2378
2378
|
"Arial",
|
|
2379
2379
|
"Arial Black",
|
|
2380
2380
|
"Verdana",
|
|
@@ -2395,12 +2395,12 @@ const ui = 1, mi = "#ffffff", ge = 20, pi = 6, yi = 24, fe = 16, ue = 36, me = 2
|
|
|
2395
2395
|
"Monaco",
|
|
2396
2396
|
"Consolas",
|
|
2397
2397
|
"Courier"
|
|
2398
|
-
]),
|
|
2399
|
-
var
|
|
2400
|
-
class
|
|
2398
|
+
]), Ce = 0.3;
|
|
2399
|
+
var ve = /* @__PURE__ */ ((r) => (r[r.DEBUG = 0] = "DEBUG", r[r.INFO = 1] = "INFO", r[r.WARN = 2] = "WARN", r[r.ERROR = 3] = "ERROR", r[r.NONE = 4] = "NONE", r))(ve || {});
|
|
2400
|
+
class Te {
|
|
2401
2401
|
constructor() {
|
|
2402
2402
|
var t;
|
|
2403
|
-
this.level = 0, this.enabled = typeof
|
|
2403
|
+
this.level = 0, this.enabled = typeof ft < "u" && ((t = ft.env) == null ? void 0 : t.NODE_ENV) !== "production";
|
|
2404
2404
|
}
|
|
2405
2405
|
// Only enabled in development by default
|
|
2406
2406
|
/**
|
|
@@ -2454,10 +2454,10 @@ class Se {
|
|
|
2454
2454
|
* Create a scoped logger with a prefix for a specific module
|
|
2455
2455
|
*/
|
|
2456
2456
|
scope(t) {
|
|
2457
|
-
return new
|
|
2457
|
+
return new Fe(this, t);
|
|
2458
2458
|
}
|
|
2459
2459
|
}
|
|
2460
|
-
class
|
|
2460
|
+
class Fe {
|
|
2461
2461
|
constructor(t, e) {
|
|
2462
2462
|
this.logger = t, this.scopeName = e;
|
|
2463
2463
|
}
|
|
@@ -2474,18 +2474,18 @@ class Ce {
|
|
|
2474
2474
|
this.logger.error(`[${this.scopeName}] ${t}`, ...e);
|
|
2475
2475
|
}
|
|
2476
2476
|
}
|
|
2477
|
-
const
|
|
2478
|
-
function
|
|
2479
|
-
return
|
|
2480
|
-
|
|
2477
|
+
const Ae = new Te(), pt = (r) => Ae.scope(r), Me = pt("ImageLoadEvents"), Tt = /* @__PURE__ */ new Set();
|
|
2478
|
+
function Ii(r) {
|
|
2479
|
+
return Tt.add(r), () => {
|
|
2480
|
+
Tt.delete(r);
|
|
2481
2481
|
};
|
|
2482
2482
|
}
|
|
2483
2483
|
function et(r) {
|
|
2484
|
-
|
|
2484
|
+
Tt.forEach((t) => {
|
|
2485
2485
|
try {
|
|
2486
2486
|
t(r);
|
|
2487
2487
|
} catch (e) {
|
|
2488
|
-
|
|
2488
|
+
Me.error("Listener error:", e);
|
|
2489
2489
|
}
|
|
2490
2490
|
});
|
|
2491
2491
|
}
|
|
@@ -2571,26 +2571,62 @@ class J {
|
|
|
2571
2571
|
this.cache.clear();
|
|
2572
2572
|
}
|
|
2573
2573
|
}
|
|
2574
|
-
const
|
|
2574
|
+
const ki = Object.freeze({
|
|
2575
|
+
brightness: 1,
|
|
2576
|
+
contrast: 1,
|
|
2577
|
+
saturation: 1
|
|
2578
|
+
}), xt = 1e-3;
|
|
2579
|
+
function Dt(r) {
|
|
2580
|
+
return r ? Math.abs(r.brightness - 1) < xt && Math.abs(r.contrast - 1) < xt && Math.abs(r.saturation - 1) < xt : !0;
|
|
2581
|
+
}
|
|
2582
|
+
function De(r) {
|
|
2583
|
+
if (Dt(r)) return;
|
|
2584
|
+
const t = (e) => Math.round(e * 100) / 100;
|
|
2585
|
+
return {
|
|
2586
|
+
brightness: t(r.brightness),
|
|
2587
|
+
contrast: t(r.contrast),
|
|
2588
|
+
saturation: t(r.saturation)
|
|
2589
|
+
};
|
|
2590
|
+
}
|
|
2591
|
+
function Ei(r) {
|
|
2592
|
+
if (Dt(r)) return "neutral";
|
|
2593
|
+
const t = r;
|
|
2594
|
+
return `b${t.brightness}c${t.contrast}s${t.saturation}`;
|
|
2595
|
+
}
|
|
2596
|
+
let Ft = null;
|
|
2597
|
+
function Oi(r) {
|
|
2598
|
+
Ft = r;
|
|
2599
|
+
}
|
|
2600
|
+
function Ie(r, t) {
|
|
2601
|
+
if (Dt(t)) return r;
|
|
2602
|
+
if (!Ft)
|
|
2603
|
+
throw new Error(
|
|
2604
|
+
"[image-adjustments] no adjusted-source provider registered. Painting an image with non-neutral adjustments requires the rendering engine: import 'src/rendering/image-adjustments.js' (rendering/element-painters does this for every paint driver; a direct element.render() call in a test must import it too)."
|
|
2605
|
+
);
|
|
2606
|
+
return Ft(r, t);
|
|
2607
|
+
}
|
|
2608
|
+
const it = pt("ImageElement"), Rt = 3e4, Ht = 3, ke = 1e3;
|
|
2575
2609
|
function x(r) {
|
|
2576
2610
|
return r.transformData;
|
|
2577
2611
|
}
|
|
2578
|
-
class
|
|
2612
|
+
class yt extends Q {
|
|
2579
2613
|
// Track URL acquired from ImageCache for release on destroy
|
|
2580
2614
|
constructor(t = {}) {
|
|
2581
|
-
var
|
|
2615
|
+
var i, s, o, a, n, h, l, c, g, d, f;
|
|
2582
2616
|
super(t), this.svgBlobUrl = null, this.loadTimeoutId = null, this.retryAttempt = 0, this.cachedImageUrl = null, this.transformType = "image", this.transformData = {
|
|
2583
2617
|
type: "image",
|
|
2584
|
-
width: ((
|
|
2585
|
-
height: ((
|
|
2586
|
-
cropX: ((
|
|
2587
|
-
cropY: ((
|
|
2588
|
-
cropWidth: ((
|
|
2589
|
-
cropHeight: ((
|
|
2590
|
-
flipHorizontal: ((
|
|
2591
|
-
flipVertical: ((
|
|
2592
|
-
borderRadius: ((
|
|
2593
|
-
}
|
|
2618
|
+
width: ((i = t.transformData) == null ? void 0 : i.width) || 200,
|
|
2619
|
+
height: ((s = t.transformData) == null ? void 0 : s.height) || 200,
|
|
2620
|
+
cropX: ((o = t.transformData) == null ? void 0 : o.cropX) ?? 0,
|
|
2621
|
+
cropY: ((a = t.transformData) == null ? void 0 : a.cropY) ?? 0,
|
|
2622
|
+
cropWidth: ((n = t.transformData) == null ? void 0 : n.cropWidth) ?? 1,
|
|
2623
|
+
cropHeight: ((h = t.transformData) == null ? void 0 : h.cropHeight) ?? 1,
|
|
2624
|
+
flipHorizontal: ((l = t.transformData) == null ? void 0 : l.flipHorizontal) ?? !1,
|
|
2625
|
+
flipVertical: ((c = t.transformData) == null ? void 0 : c.flipVertical) ?? !1,
|
|
2626
|
+
borderRadius: ((g = t.transformData) == null ? void 0 : g.borderRadius) ?? 0
|
|
2627
|
+
};
|
|
2628
|
+
const e = De((d = t.transformData) == null ? void 0 : d.adjustments);
|
|
2629
|
+
e && (this.transformData.adjustments = e), this.imageUrl = t.imageUrl || "", this.imageLoaded = !1, this.imageElement = null, this.imageAspectRatio = t.imageAspectRatio || 1, this.isSvg = ((f = t.imageUrl) == null ? void 0 : f.toLowerCase().endsWith(".svg")) || !1, this.preserveDimensions = t.preserveDimensions ?? !1, this.imageLoadState = t.imageUrl ? "loading" : "loaded", this.imageLoadError = null, this.isCropping = !1, this.onLoadCallback = t.onLoadCallback || null, this.imageUrl && this.loadImage(this.imageUrl);
|
|
2594
2630
|
}
|
|
2595
2631
|
/**
|
|
2596
2632
|
* Load image from URL
|
|
@@ -2638,21 +2674,21 @@ class pt extends Q {
|
|
|
2638
2674
|
}, this.loadTimeoutId = setTimeout(() => {
|
|
2639
2675
|
if (s) return;
|
|
2640
2676
|
o(), i.src = "";
|
|
2641
|
-
const l = new Error(`Image load timed out after ${
|
|
2677
|
+
const l = new Error(`Image load timed out after ${Rt}ms: ${t}`);
|
|
2642
2678
|
this.handleLoadFailure(t, l);
|
|
2643
|
-
},
|
|
2679
|
+
}, Rt), (!i.src || i.src !== t) && (i.src = t), !s && i.complete && i.naturalWidth > 0 && ((h = i.onload) == null || h.call(i, new Event("load")));
|
|
2644
2680
|
}
|
|
2645
2681
|
/**
|
|
2646
2682
|
* Handle a load failure - either retry with backoff or set error state.
|
|
2647
2683
|
*/
|
|
2648
2684
|
handleLoadFailure(t, e) {
|
|
2649
|
-
if (this.retryAttempt++, this.retryAttempt <
|
|
2650
|
-
const i =
|
|
2685
|
+
if (this.retryAttempt++, this.retryAttempt < Ht) {
|
|
2686
|
+
const i = ke * Math.pow(2, this.retryAttempt - 1);
|
|
2651
2687
|
it.warn(`Image load attempt ${this.retryAttempt} failed, retrying in ${i}ms:`, t), this.imageLoadState = "retrying", this.imageLoadError = e, et(this.id), this.loadTimeoutId = setTimeout(() => {
|
|
2652
2688
|
this.attemptLoadRegularImage(t);
|
|
2653
2689
|
}, i);
|
|
2654
2690
|
} else
|
|
2655
|
-
it.error(`Image load failed after ${
|
|
2691
|
+
it.error(`Image load failed after ${Ht} attempts:`, t), this.imageLoaded = !1, this.imageLoadState = "error", this.imageLoadError = e, et(this.id);
|
|
2656
2692
|
}
|
|
2657
2693
|
/**
|
|
2658
2694
|
* Clear any pending load timeout
|
|
@@ -2789,57 +2825,61 @@ class pt extends Q {
|
|
|
2789
2825
|
this.renderPlaceholder(t);
|
|
2790
2826
|
return;
|
|
2791
2827
|
}
|
|
2828
|
+
const s = Ie(
|
|
2829
|
+
this.imageElement,
|
|
2830
|
+
this.transformData.adjustments
|
|
2831
|
+
), o = s.width, a = s.height;
|
|
2792
2832
|
t.save(), this.opacity !== void 0 && this.opacity !== 1 && (t.globalAlpha = this.opacity), t.translate(this.x, this.y), t.rotate(I.toRadians(this.rotation));
|
|
2793
|
-
const
|
|
2794
|
-
if (t.scale(
|
|
2795
|
-
const
|
|
2796
|
-
if (
|
|
2833
|
+
const n = this.transformData.flipHorizontal ? -1 : 1, h = this.transformData.flipVertical ? -1 : 1;
|
|
2834
|
+
if (t.scale(n, h), this.isCropping) {
|
|
2835
|
+
const l = this.transformData.width * this.transformData.cropWidth, c = this.transformData.height * this.transformData.cropHeight, g = this.transformData.width / 2 - (this.transformData.cropX * this.transformData.width + l / 2), d = this.transformData.height / 2 - (this.transformData.cropY * this.transformData.height + c / 2), f = g - this.transformData.width / 2, u = d - this.transformData.height / 2, m = this.transformData.borderRadius || 0;
|
|
2836
|
+
if (m > 0) {
|
|
2797
2837
|
t.save();
|
|
2798
|
-
const
|
|
2799
|
-
|
|
2838
|
+
const p = Math.min(
|
|
2839
|
+
m / 100 * Math.min(this.transformData.width, this.transformData.height),
|
|
2800
2840
|
this.transformData.width / 2,
|
|
2801
2841
|
this.transformData.height / 2
|
|
2802
2842
|
);
|
|
2803
|
-
t.beginPath(), t.roundRect(
|
|
2843
|
+
t.beginPath(), t.roundRect(f, u, this.transformData.width, this.transformData.height, p), t.clip();
|
|
2804
2844
|
}
|
|
2805
2845
|
t.drawImage(
|
|
2806
|
-
|
|
2846
|
+
s,
|
|
2807
2847
|
0,
|
|
2808
2848
|
0,
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2849
|
+
o,
|
|
2850
|
+
a,
|
|
2851
|
+
f,
|
|
2852
|
+
u,
|
|
2813
2853
|
this.transformData.width,
|
|
2814
2854
|
this.transformData.height
|
|
2815
|
-
),
|
|
2855
|
+
), m > 0 && t.restore();
|
|
2816
2856
|
} else if (this.masks && this.masks.length > 0) {
|
|
2817
|
-
const
|
|
2857
|
+
const l = this.transformData.width * this.transformData.cropWidth, c = this.transformData.height * this.transformData.cropHeight, g = -l / 2, d = -c / 2, f = g - this.transformData.cropX * this.transformData.width, u = d - this.transformData.cropY * this.transformData.height;
|
|
2818
2858
|
t.drawImage(
|
|
2819
|
-
|
|
2859
|
+
s,
|
|
2820
2860
|
0,
|
|
2821
2861
|
0,
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2862
|
+
o,
|
|
2863
|
+
a,
|
|
2864
|
+
f,
|
|
2865
|
+
u,
|
|
2826
2866
|
this.transformData.width,
|
|
2827
2867
|
this.transformData.height
|
|
2828
2868
|
);
|
|
2829
2869
|
} else {
|
|
2830
|
-
const
|
|
2870
|
+
const l = this.transformData.width * this.transformData.cropWidth, c = this.transformData.height * this.transformData.cropHeight, g = -l / 2, d = -c / 2, f = this.transformData.borderRadius || 0;
|
|
2831
2871
|
t.save();
|
|
2832
|
-
const
|
|
2833
|
-
t.beginPath(), t.roundRect(
|
|
2834
|
-
const
|
|
2872
|
+
const u = Math.min(f / 100 * Math.min(l, c), l / 2, c / 2);
|
|
2873
|
+
t.beginPath(), t.roundRect(g, d, l, c, u), t.clip();
|
|
2874
|
+
const m = g - this.transformData.cropX * this.transformData.width, p = d - this.transformData.cropY * this.transformData.height;
|
|
2835
2875
|
t.drawImage(
|
|
2836
|
-
|
|
2876
|
+
s,
|
|
2837
2877
|
0,
|
|
2838
2878
|
0,
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2879
|
+
o,
|
|
2880
|
+
a,
|
|
2881
|
+
m,
|
|
2882
|
+
p,
|
|
2843
2883
|
this.transformData.width,
|
|
2844
2884
|
this.transformData.height
|
|
2845
2885
|
), t.restore();
|
|
@@ -2889,14 +2929,14 @@ class pt extends Q {
|
|
|
2889
2929
|
h === "top-left" ? (u = x(s).width / 2, m = x(s).height / 2) : h === "top-right" ? (u = -x(s).width / 2, m = x(s).height / 2) : h === "bottom-left" ? (u = x(s).width / 2, m = -x(s).height / 2) : h === "bottom-right" ? (u = -x(s).width / 2, m = -x(s).height / 2) : h === "middle-left" ? (u = x(s).width / 2, m = 0) : h === "middle-right" ? (u = -x(s).width / 2, m = 0) : h === "middle-top" ? (u = 0, m = x(s).height / 2) : h === "middle-bottom" && (u = 0, m = -x(s).height / 2);
|
|
2890
2930
|
const y = P.fromSnapshot(s).localDeltaToWorld(u, m), w = y.dx, S = y.dy;
|
|
2891
2931
|
d = c + w, f = g + S;
|
|
2892
|
-
let b = 0,
|
|
2893
|
-
h === "top-left" ? (b = this.transformData.width / 2,
|
|
2894
|
-
const M = new P(this).localDeltaToWorld(b,
|
|
2932
|
+
let b = 0, v = 0;
|
|
2933
|
+
h === "top-left" ? (b = this.transformData.width / 2, v = this.transformData.height / 2) : h === "top-right" ? (b = -this.transformData.width / 2, v = this.transformData.height / 2) : h === "bottom-left" ? (b = this.transformData.width / 2, v = -this.transformData.height / 2) : h === "bottom-right" ? (b = -this.transformData.width / 2, v = -this.transformData.height / 2) : h === "middle-left" ? (b = this.transformData.width / 2, v = 0) : h === "middle-right" ? (b = -this.transformData.width / 2, v = 0) : h === "middle-top" ? (b = 0, v = this.transformData.height / 2) : h === "middle-bottom" && (b = 0, v = -this.transformData.height / 2);
|
|
2934
|
+
const M = new P(this).localDeltaToWorld(b, v), F = M.dx, T = M.dy, D = d - F, U = f - T;
|
|
2895
2935
|
if (this.isCropping) {
|
|
2896
2936
|
const B = s.x, A = s.y, k = x(s).cropWidth * x(s).width, R = x(s).cropHeight * x(s).height;
|
|
2897
2937
|
this.x = B, this.y = A;
|
|
2898
|
-
const H = k / this.transformData.width, E = R / this.transformData.height, W = B - D, z = A - U,
|
|
2899
|
-
this.transformData.cropX =
|
|
2938
|
+
const H = k / this.transformData.width, E = R / this.transformData.height, W = B - D, z = A - U, Ot = new P(this).worldDeltaToLocal(W, z), te = Ot.dx, ee = Ot.dy, ie = this.transformData.width / 2 + te, se = this.transformData.height / 2 + ee, oe = ie / this.transformData.width - H / 2, re = se / this.transformData.height - E / 2;
|
|
2939
|
+
this.transformData.cropX = oe, this.transformData.cropY = re, this.transformData.cropWidth = H, this.transformData.cropHeight = E;
|
|
2900
2940
|
} else {
|
|
2901
2941
|
const B = (this.transformData.cropX + this.transformData.cropWidth / 2) * this.transformData.width - this.transformData.width / 2, A = (this.transformData.cropY + this.transformData.cropHeight / 2) * this.transformData.height - this.transformData.height / 2, k = B, R = A, E = new P(this).localDeltaToWorld(k, R), W = E.dx, z = E.dy;
|
|
2902
2942
|
this.x = D + W, this.y = U + z;
|
|
@@ -2998,7 +3038,7 @@ class pt extends Q {
|
|
|
2998
3038
|
if (!this.isCropping) return null;
|
|
2999
3039
|
const s = this.getCropBoxBounds();
|
|
3000
3040
|
if (!s) return null;
|
|
3001
|
-
const o = this.worldToLocal(t, e), a = 1 / i, n =
|
|
3041
|
+
const o = this.worldToLocal(t, e), a = 1 / i, n = pe * a, h = ye * a, l = we * a, c = [
|
|
3002
3042
|
{ x: s.x, y: s.y, anchor: "top-left" },
|
|
3003
3043
|
{ x: s.x + s.width, y: s.y, anchor: "top-right" },
|
|
3004
3044
|
{ x: s.x, y: s.y + s.height, anchor: "bottom-left" },
|
|
@@ -3189,7 +3229,7 @@ class pt extends Q {
|
|
|
3189
3229
|
* Clone this element
|
|
3190
3230
|
*/
|
|
3191
3231
|
clone() {
|
|
3192
|
-
const t = this.toJSON(), { imageUrl: e, ...i } = t, s = new
|
|
3232
|
+
const t = this.toJSON(), { imageUrl: e, ...i } = t, s = new yt(i);
|
|
3193
3233
|
return s.imageUrl = this.imageUrl, s.imageElement = this.imageElement, s.imageLoaded = this.imageLoaded, s.imageAspectRatio = this.imageAspectRatio, s.isCropping = this.isCropping, s.onLoadCallback = this.onLoadCallback, s.isSvg = this.isSvg, s.imageLoadState = this.imageLoadState, s.imageLoadError = this.imageLoadError, s.preserveDimensions = this.preserveDimensions, s;
|
|
3194
3234
|
}
|
|
3195
3235
|
/**
|
|
@@ -3212,7 +3252,12 @@ class pt extends Q {
|
|
|
3212
3252
|
imageAspectRatio: this.imageAspectRatio,
|
|
3213
3253
|
preserveDimensions: this.preserveDimensions,
|
|
3214
3254
|
// dimension lock for cover crop must survive save→load
|
|
3215
|
-
transformData: {
|
|
3255
|
+
transformData: {
|
|
3256
|
+
...this.transformData,
|
|
3257
|
+
// Deep-copy the nested adjustments object so serialized state (and
|
|
3258
|
+
// clones built from it) never alias this element's live state.
|
|
3259
|
+
...this.transformData.adjustments ? { adjustments: { ...this.transformData.adjustments } } : {}
|
|
3260
|
+
}
|
|
3216
3261
|
};
|
|
3217
3262
|
}
|
|
3218
3263
|
/**
|
|
@@ -3224,27 +3269,27 @@ class pt extends Q {
|
|
|
3224
3269
|
this.clearLoadTimeout(), this.releaseImageCache(), this.revokeSvgBlobUrl(), this.imageElement = null, this.onLoadCallback = null, this.imageLoadError = null;
|
|
3225
3270
|
}
|
|
3226
3271
|
}
|
|
3227
|
-
const
|
|
3228
|
-
let
|
|
3229
|
-
function
|
|
3272
|
+
const $t = /* @__PURE__ */ new Map();
|
|
3273
|
+
let At = null;
|
|
3274
|
+
function Vt(r) {
|
|
3230
3275
|
return new Error(
|
|
3231
3276
|
`[paint-registry] no painter registered for ${r}. Element painting requires the rendering engine: import 'src/rendering/element-painters.js' (every paint driver — CanvasRenderer, ExportManager, ElementPreviewRenderer — does this; a direct element.render() call in a test must import it too).`
|
|
3232
3277
|
);
|
|
3233
3278
|
}
|
|
3234
|
-
function
|
|
3235
|
-
|
|
3279
|
+
function Bi(r, t) {
|
|
3280
|
+
$t.set(r, t);
|
|
3236
3281
|
}
|
|
3237
3282
|
function gt(r) {
|
|
3238
|
-
const t =
|
|
3239
|
-
if (!t) throw
|
|
3283
|
+
const t = $t.get(r);
|
|
3284
|
+
if (!t) throw Vt(`text transform "${r}"`);
|
|
3240
3285
|
return t;
|
|
3241
3286
|
}
|
|
3242
|
-
function
|
|
3243
|
-
|
|
3287
|
+
function Ri(r) {
|
|
3288
|
+
At = r;
|
|
3244
3289
|
}
|
|
3245
|
-
function
|
|
3246
|
-
if (!
|
|
3247
|
-
return
|
|
3290
|
+
function Ee() {
|
|
3291
|
+
if (!At) throw Vt("group clipping");
|
|
3292
|
+
return At;
|
|
3248
3293
|
}
|
|
3249
3294
|
class L {
|
|
3250
3295
|
constructor(t = []) {
|
|
@@ -3442,65 +3487,65 @@ class L {
|
|
|
3442
3487
|
return new L(t.spans);
|
|
3443
3488
|
}
|
|
3444
3489
|
}
|
|
3445
|
-
function
|
|
3490
|
+
function Hi(r) {
|
|
3446
3491
|
return r.type === "custom";
|
|
3447
3492
|
}
|
|
3448
|
-
function
|
|
3493
|
+
function Pi(r) {
|
|
3449
3494
|
return r.type === "circle";
|
|
3450
3495
|
}
|
|
3451
|
-
function
|
|
3496
|
+
function Li(r) {
|
|
3452
3497
|
return r.type === "arch";
|
|
3453
3498
|
}
|
|
3454
|
-
function
|
|
3499
|
+
function Wi(r) {
|
|
3455
3500
|
return r.type === "wave";
|
|
3456
3501
|
}
|
|
3457
|
-
function
|
|
3502
|
+
function zi(r) {
|
|
3458
3503
|
return r.type === "flag";
|
|
3459
3504
|
}
|
|
3460
|
-
function
|
|
3505
|
+
function Xi(r) {
|
|
3461
3506
|
return r.type === "image";
|
|
3462
3507
|
}
|
|
3463
|
-
function
|
|
3508
|
+
function Ni(r) {
|
|
3464
3509
|
return r.type === "group";
|
|
3465
3510
|
}
|
|
3466
|
-
function
|
|
3511
|
+
function _i(r) {
|
|
3467
3512
|
return r.transformType !== "image" && r.transformType !== "group";
|
|
3468
3513
|
}
|
|
3469
|
-
function
|
|
3514
|
+
function Yi(r) {
|
|
3470
3515
|
return r.transformType === "image";
|
|
3471
3516
|
}
|
|
3472
|
-
function
|
|
3517
|
+
function Ui(r) {
|
|
3473
3518
|
return r.transformType === "custom";
|
|
3474
3519
|
}
|
|
3475
|
-
function
|
|
3520
|
+
function Gi(r) {
|
|
3476
3521
|
return r.transformType === "circle";
|
|
3477
3522
|
}
|
|
3478
|
-
function
|
|
3523
|
+
function $i(r) {
|
|
3479
3524
|
return r.transformType === "group";
|
|
3480
3525
|
}
|
|
3481
|
-
function
|
|
3526
|
+
function Vi(r) {
|
|
3482
3527
|
return r.transformType === "shape";
|
|
3483
3528
|
}
|
|
3484
|
-
function
|
|
3529
|
+
function Ji(r) {
|
|
3485
3530
|
return r.transformType === "path";
|
|
3486
3531
|
}
|
|
3487
|
-
function
|
|
3532
|
+
function qi(r) {
|
|
3488
3533
|
return r.type === "shape";
|
|
3489
3534
|
}
|
|
3490
|
-
function
|
|
3535
|
+
function ji(r) {
|
|
3491
3536
|
return r.type === "path";
|
|
3492
3537
|
}
|
|
3493
|
-
function
|
|
3538
|
+
function Zi(r) {
|
|
3494
3539
|
var t;
|
|
3495
3540
|
return ((t = r.stroke) == null ? void 0 : t.enabled) === !0;
|
|
3496
3541
|
}
|
|
3497
|
-
function
|
|
3542
|
+
function Ki(r) {
|
|
3498
3543
|
return Array.isArray(r.masks) && r.masks.length > 0;
|
|
3499
3544
|
}
|
|
3500
|
-
function
|
|
3545
|
+
function Qi(r) {
|
|
3501
3546
|
return r.blendMode === "knockout" || r.blendMode === "clip";
|
|
3502
3547
|
}
|
|
3503
|
-
function
|
|
3548
|
+
function ts(r) {
|
|
3504
3549
|
var t;
|
|
3505
3550
|
return ((t = r.distressEffect) == null ? void 0 : t.enabled) === !0;
|
|
3506
3551
|
}
|
|
@@ -3612,7 +3657,7 @@ class q extends Q {
|
|
|
3612
3657
|
* Update font size
|
|
3613
3658
|
*/
|
|
3614
3659
|
setFontSize(t) {
|
|
3615
|
-
this.fontSize = Math.max(
|
|
3660
|
+
this.fontSize = Math.max(be, Math.min(xe, t));
|
|
3616
3661
|
}
|
|
3617
3662
|
/**
|
|
3618
3663
|
* Update color
|
|
@@ -3646,20 +3691,20 @@ class q extends Q {
|
|
|
3646
3691
|
};
|
|
3647
3692
|
}
|
|
3648
3693
|
}
|
|
3649
|
-
function
|
|
3694
|
+
function Oe(r) {
|
|
3650
3695
|
return Array.from(r).length;
|
|
3651
3696
|
}
|
|
3652
|
-
function
|
|
3653
|
-
return e ? r + e *
|
|
3697
|
+
function wt(r, t, e) {
|
|
3698
|
+
return e ? r + e * Oe(t) : r;
|
|
3654
3699
|
}
|
|
3655
|
-
function
|
|
3700
|
+
function Be(r, t, e) {
|
|
3656
3701
|
const i = Array.from(t), s = [0];
|
|
3657
3702
|
let o = "";
|
|
3658
3703
|
for (let a = 0; a < i.length; a++)
|
|
3659
3704
|
o += i[a], s.push(r.measureText(o).width + e * (a + 1));
|
|
3660
3705
|
return s;
|
|
3661
3706
|
}
|
|
3662
|
-
function
|
|
3707
|
+
function Re(r, t, e) {
|
|
3663
3708
|
switch (r.textAlign) {
|
|
3664
3709
|
case "center":
|
|
3665
3710
|
return t - e / 2;
|
|
@@ -3670,26 +3715,26 @@ function Ie(r, t, e) {
|
|
|
3670
3715
|
return t;
|
|
3671
3716
|
}
|
|
3672
3717
|
}
|
|
3673
|
-
function
|
|
3718
|
+
function Jt(r, t, e, i, s, o) {
|
|
3674
3719
|
if (!o || e.length === 0) {
|
|
3675
3720
|
t[r](e, i, s);
|
|
3676
3721
|
return;
|
|
3677
3722
|
}
|
|
3678
|
-
const a =
|
|
3723
|
+
const a = Be(t, e, o), n = a[a.length - 1], h = Re(t, i, n), l = t.textAlign;
|
|
3679
3724
|
t.textAlign = "left";
|
|
3680
3725
|
const c = Array.from(e);
|
|
3681
3726
|
for (let g = 0; g < c.length; g++)
|
|
3682
3727
|
t[r](c[g], h + a[g], s);
|
|
3683
3728
|
t.textAlign = l;
|
|
3684
3729
|
}
|
|
3685
|
-
function
|
|
3686
|
-
|
|
3730
|
+
function es(r, t, e, i, s) {
|
|
3731
|
+
Jt("fillText", r, t, e, i, s);
|
|
3687
3732
|
}
|
|
3688
|
-
function
|
|
3689
|
-
|
|
3733
|
+
function is(r, t, e, i, s) {
|
|
3734
|
+
Jt("strokeText", r, t, e, i, s);
|
|
3690
3735
|
}
|
|
3691
3736
|
let ht = null;
|
|
3692
|
-
function
|
|
3737
|
+
function bt() {
|
|
3693
3738
|
if (!ht)
|
|
3694
3739
|
if (typeof document < "u")
|
|
3695
3740
|
ht = document.createElement("canvas");
|
|
@@ -3703,10 +3748,10 @@ function at(r, t, e = !1, i = !1) {
|
|
|
3703
3748
|
const s = [];
|
|
3704
3749
|
return i && s.push("italic"), e && s.push("bold"), s.push(`${r}px`), s.push(t), s.join(" ");
|
|
3705
3750
|
}
|
|
3706
|
-
function
|
|
3707
|
-
const c =
|
|
3751
|
+
function It(r, t, e, i, s = !1, o = !1, a, n = !1, h) {
|
|
3752
|
+
const c = bt().getContext("2d");
|
|
3708
3753
|
c.font = at(e, i, s, o);
|
|
3709
|
-
const g = (h == null ? void 0 : h.letterSpacing) ?? 0, d = (A) =>
|
|
3754
|
+
const g = (h == null ? void 0 : h.letterSpacing) ?? 0, d = (A) => wt(c.measureText(A).width, A, g);
|
|
3710
3755
|
if (r.trim().length === 0)
|
|
3711
3756
|
return [r];
|
|
3712
3757
|
if (r.includes(`
|
|
@@ -3714,7 +3759,7 @@ function Ft(r, t, e, i, s = !1, o = !1, a, n = !1, h) {
|
|
|
3714
3759
|
const A = r.split(`
|
|
3715
3760
|
`), k = [];
|
|
3716
3761
|
for (let R = 0; R < A.length; R++) {
|
|
3717
|
-
const H = A[R], E =
|
|
3762
|
+
const H = A[R], E = It(H, t, e, i, s, o, void 0, n, h);
|
|
3718
3763
|
k.push(...E);
|
|
3719
3764
|
}
|
|
3720
3765
|
return k;
|
|
@@ -3730,78 +3775,78 @@ function Ft(r, t, e, i, s = !1, o = !1, a, n = !1, h) {
|
|
|
3730
3775
|
}
|
|
3731
3776
|
return A.length > 0 && (A[0] = m + A[0], A[A.length - 1] = A[A.length - 1] + p), A;
|
|
3732
3777
|
}
|
|
3733
|
-
const S = w.join(" "), b = m + S + p,
|
|
3734
|
-
if (
|
|
3778
|
+
const S = w.join(" "), b = m + S + p, v = d(b), C = t < 200, F = n ? 0 : Math.max(20, t * (n ? 0 : C ? 0.08 : 0.05));
|
|
3779
|
+
if (v <= t + F)
|
|
3735
3780
|
return [b];
|
|
3736
|
-
const
|
|
3781
|
+
const T = [];
|
|
3737
3782
|
let D = "";
|
|
3738
3783
|
const B = n ? 0 : Math.max(15, t * (n ? 0 : C ? 0.05 : 0.03));
|
|
3739
3784
|
for (let A = 0; A < w.length; A++) {
|
|
3740
3785
|
const k = w[A];
|
|
3741
3786
|
if (d(k) > t + B) {
|
|
3742
|
-
D.length > 0 && (
|
|
3787
|
+
D.length > 0 && (T.push(D), D = "");
|
|
3743
3788
|
const H = Array.from(k);
|
|
3744
3789
|
let E = "";
|
|
3745
3790
|
for (const W of H) {
|
|
3746
3791
|
const z = E + W;
|
|
3747
|
-
d(z) > t + B && E.length > 0 ? (
|
|
3792
|
+
d(z) > t + B && E.length > 0 ? (T.push(E), E = W) : E = z;
|
|
3748
3793
|
}
|
|
3749
3794
|
D = E;
|
|
3750
3795
|
} else {
|
|
3751
3796
|
const H = D.length > 0 ? D + " " + k : k;
|
|
3752
|
-
d(H) > t + B && D.length > 0 ? (
|
|
3797
|
+
d(H) > t + B && D.length > 0 ? (T.push(D), D = k) : D = H;
|
|
3753
3798
|
}
|
|
3754
3799
|
}
|
|
3755
|
-
if (D.length > 0 &&
|
|
3800
|
+
if (D.length > 0 && T.push(D), T.length > 0) {
|
|
3756
3801
|
if (m.length > 0) {
|
|
3757
|
-
const A = m +
|
|
3758
|
-
d(A) > t + B ?
|
|
3802
|
+
const A = m + T[0];
|
|
3803
|
+
d(A) > t + B ? T.unshift(m) : T[0] = A;
|
|
3759
3804
|
}
|
|
3760
3805
|
if (p.length > 0) {
|
|
3761
|
-
const A =
|
|
3762
|
-
d(k) > t + B ?
|
|
3806
|
+
const A = T.length - 1, k = T[A] + p;
|
|
3807
|
+
d(k) > t + B ? T.push(p) : T[A] = k;
|
|
3763
3808
|
}
|
|
3764
3809
|
}
|
|
3765
|
-
return
|
|
3810
|
+
return T;
|
|
3766
3811
|
}
|
|
3767
|
-
function
|
|
3768
|
-
const n =
|
|
3769
|
-
return n.font = at(t, e, i, s),
|
|
3812
|
+
function Pt(r, t, e, i = !1, s = !1, o = 0) {
|
|
3813
|
+
const n = bt().getContext("2d");
|
|
3814
|
+
return n.font = at(t, e, i, s), wt(n.measureText(r).width, r, o);
|
|
3770
3815
|
}
|
|
3771
|
-
function
|
|
3772
|
-
const o =
|
|
3816
|
+
function Mt(r, t, e = !1, i = !1) {
|
|
3817
|
+
const o = bt().getContext("2d");
|
|
3773
3818
|
o.font = at(r, t, e, i);
|
|
3774
3819
|
const n = o.measureText("ÁÉÍgjpqy"), h = n.actualBoundingBoxAscent || r * 0.8, l = n.actualBoundingBoxDescent || r * 0.2, c = h + l;
|
|
3775
3820
|
return { ascent: h, descent: l, height: c };
|
|
3776
3821
|
}
|
|
3777
|
-
function
|
|
3778
|
-
const l = (h == null ? void 0 : h.letterSpacing) ?? 0, c =
|
|
3779
|
-
`), d = c.map((b,
|
|
3780
|
-
isParagraphStart: !g &&
|
|
3781
|
-
isParagraphEnd: !g &&
|
|
3782
|
-
})), u =
|
|
3822
|
+
function Lt(r, t, e, i, s = !1, o = !1, a, n = !1, h) {
|
|
3823
|
+
const l = (h == null ? void 0 : h.letterSpacing) ?? 0, c = It(r, t, e, i, s, o, a, n, h), g = r.includes(`
|
|
3824
|
+
`), d = c.map((b, v) => ({
|
|
3825
|
+
isParagraphStart: !g && v === 0,
|
|
3826
|
+
isParagraphEnd: !g && v === c.length - 1
|
|
3827
|
+
})), u = bt().getContext("2d");
|
|
3783
3828
|
u.font = at(e, i, s, o);
|
|
3784
3829
|
let m = 0;
|
|
3785
|
-
const p =
|
|
3830
|
+
const p = Mt(e, i, s, o);
|
|
3786
3831
|
let y = 0;
|
|
3787
|
-
c.forEach((b,
|
|
3788
|
-
const C = d[
|
|
3832
|
+
c.forEach((b, v) => {
|
|
3833
|
+
const C = d[v].isParagraphStart, M = d[v].isParagraphEnd;
|
|
3789
3834
|
let F = b;
|
|
3790
3835
|
if (!C) {
|
|
3791
|
-
const
|
|
3836
|
+
const T = b.match(/^ +/), D = T ? T[0].length : 0;
|
|
3792
3837
|
D > 0 && (F = F.substring(D));
|
|
3793
3838
|
}
|
|
3794
3839
|
if (!M) {
|
|
3795
|
-
const
|
|
3840
|
+
const T = F.match(/ +$/), D = T ? T[0].length : 0;
|
|
3796
3841
|
D > 0 && (F = F.substring(0, F.length - D));
|
|
3797
3842
|
}
|
|
3798
3843
|
if (y++, F.length > 0) {
|
|
3799
|
-
const
|
|
3800
|
-
m = Math.max(m,
|
|
3844
|
+
const T = wt(u.measureText(F).width, F, l);
|
|
3845
|
+
m = Math.max(m, T);
|
|
3801
3846
|
}
|
|
3802
3847
|
});
|
|
3803
3848
|
let w;
|
|
3804
|
-
const S = (h == null ? void 0 : h.lineHeight) ??
|
|
3849
|
+
const S = (h == null ? void 0 : h.lineHeight) ?? Ut;
|
|
3805
3850
|
if (y === 1)
|
|
3806
3851
|
w = p.height;
|
|
3807
3852
|
else if (y === 0)
|
|
@@ -3817,7 +3862,7 @@ function Rt(r, t, e, i, s = !1, o = !1, a, n = !1, h) {
|
|
|
3817
3862
|
};
|
|
3818
3863
|
}
|
|
3819
3864
|
let lt = null;
|
|
3820
|
-
function
|
|
3865
|
+
function He() {
|
|
3821
3866
|
if (!lt)
|
|
3822
3867
|
if (typeof OffscreenCanvas < "u")
|
|
3823
3868
|
lt = new OffscreenCanvas(1, 1).getContext("2d");
|
|
@@ -3827,10 +3872,10 @@ function ke() {
|
|
|
3827
3872
|
throw new Error("No canvas context available");
|
|
3828
3873
|
return lt;
|
|
3829
3874
|
}
|
|
3830
|
-
function
|
|
3831
|
-
const i =
|
|
3832
|
-
const w = y.fontSize || e.fontSize, S = y.fontFamily || e.fontFamily, b = y.bold !== void 0 ? y.bold : e.bold || !1,
|
|
3833
|
-
return i.font = at(w, S, b,
|
|
3875
|
+
function Pe(r, t, e) {
|
|
3876
|
+
const i = He(), s = [], o = (p, y) => {
|
|
3877
|
+
const w = y.fontSize || e.fontSize, S = y.fontFamily || e.fontFamily, b = y.bold !== void 0 ? y.bold : e.bold || !1, v = y.italic !== void 0 ? y.italic : e.italic || !1, C = y.letterSpacing !== void 0 ? y.letterSpacing : e.letterSpacing ?? 0;
|
|
3878
|
+
return i.font = at(w, S, b, v), wt(i.measureText(p).width, p, C);
|
|
3834
3879
|
}, a = (p, y) => p.fontSize === y.fontSize && p.fontFamily === y.fontFamily && p.color === y.color && p.bold === y.bold && p.italic === y.italic && p.underline === y.underline && p.strikethrough === y.strikethrough && p.letterSpacing === y.letterSpacing, n = [];
|
|
3835
3880
|
r.forEach((p) => {
|
|
3836
3881
|
n.length > 0 && a(n[n.length - 1].style, p.style) ? n[n.length - 1].text += p.text : n.push({ text: p.text, style: p.style });
|
|
@@ -3860,21 +3905,21 @@ function Ee(r, t, e) {
|
|
|
3860
3905
|
M !== S ? (w.push({ text: b, style: n[S].style }), b = h[C], S = M) : b += h[C];
|
|
3861
3906
|
}
|
|
3862
3907
|
b.length > 0 && w.push({ text: b, style: n[S].style });
|
|
3863
|
-
const
|
|
3908
|
+
const v = w.reduce((C, M) => C + o(M.text, M.style), 0);
|
|
3864
3909
|
if (p.text === " ") {
|
|
3865
3910
|
if (f.length > 0) {
|
|
3866
3911
|
const C = f[f.length - 1];
|
|
3867
3912
|
a(C.style, w[0].style) ? C.text += " " : f.push({ text: " ", style: w[0].style });
|
|
3868
3913
|
} else
|
|
3869
3914
|
f.push({ text: " ", style: w[0].style });
|
|
3870
|
-
u +=
|
|
3871
|
-
} else if (
|
|
3915
|
+
u += v;
|
|
3916
|
+
} else if (v > t) {
|
|
3872
3917
|
f.length > 0 && m();
|
|
3873
3918
|
for (const C of w) {
|
|
3874
3919
|
const M = Array.from(C.text);
|
|
3875
3920
|
let F = "";
|
|
3876
|
-
for (const
|
|
3877
|
-
const D = o(
|
|
3921
|
+
for (const T of M) {
|
|
3922
|
+
const D = o(T, C.style);
|
|
3878
3923
|
if (u + D > t && u > 0) {
|
|
3879
3924
|
if (F.length > 0) {
|
|
3880
3925
|
if (f.length > 0) {
|
|
@@ -3886,26 +3931,26 @@ function Ee(r, t, e) {
|
|
|
3886
3931
|
}
|
|
3887
3932
|
m();
|
|
3888
3933
|
}
|
|
3889
|
-
F +=
|
|
3934
|
+
F += T, u += D;
|
|
3890
3935
|
}
|
|
3891
3936
|
if (F.length > 0)
|
|
3892
3937
|
if (f.length > 0) {
|
|
3893
|
-
const
|
|
3894
|
-
a(
|
|
3938
|
+
const T = f[f.length - 1];
|
|
3939
|
+
a(T.style, C.style) ? T.text += F : f.push({ text: F, style: C.style });
|
|
3895
3940
|
} else
|
|
3896
3941
|
f.push({ text: F, style: C.style });
|
|
3897
3942
|
}
|
|
3898
3943
|
} else
|
|
3899
|
-
u +
|
|
3944
|
+
u + v > t && f.length > 0 && m(), w.forEach((C) => {
|
|
3900
3945
|
if (f.length > 0) {
|
|
3901
3946
|
const M = f[f.length - 1];
|
|
3902
3947
|
a(M.style, C.style) ? M.text += C.text : f.push({ ...C });
|
|
3903
3948
|
} else
|
|
3904
3949
|
f.push({ ...C });
|
|
3905
|
-
}), u +=
|
|
3950
|
+
}), u += v;
|
|
3906
3951
|
}), m(), s.length === 0 && s.push([]), s;
|
|
3907
3952
|
}
|
|
3908
|
-
function
|
|
3953
|
+
function Le(r) {
|
|
3909
3954
|
const t = [];
|
|
3910
3955
|
let e = [];
|
|
3911
3956
|
return r.spans.forEach((i) => {
|
|
@@ -3919,10 +3964,10 @@ function Oe(r) {
|
|
|
3919
3964
|
function st(r) {
|
|
3920
3965
|
return typeof r.width == "number" ? r.width : void 0;
|
|
3921
3966
|
}
|
|
3922
|
-
function
|
|
3967
|
+
function qt(r, t) {
|
|
3923
3968
|
r.width = t;
|
|
3924
3969
|
}
|
|
3925
|
-
function
|
|
3970
|
+
function We(r, t, e) {
|
|
3926
3971
|
const i = e.transformData, s = st(i), o = s !== void 0 ? s : e.width ?? 0, a = t / o, n = e.fontSize ?? r.fontSize, h = n * a;
|
|
3927
3972
|
let l;
|
|
3928
3973
|
if (h < 16 ? l = Math.round(h) : l = Math.round(h * 2) / 2, r.setFontSize(l), e.richText && e.richText instanceof L && typeof r.setRichText == "function") {
|
|
@@ -3937,31 +3982,31 @@ function Be(r, t, e) {
|
|
|
3937
3982
|
const c = r.transformData;
|
|
3938
3983
|
if (st(c) !== void 0 && s !== void 0) {
|
|
3939
3984
|
const d = n > 0 ? l / n : a, f = s * d;
|
|
3940
|
-
|
|
3985
|
+
qt(c, Math.max(20, Math.ceil(f)));
|
|
3941
3986
|
}
|
|
3942
3987
|
}
|
|
3943
|
-
function
|
|
3988
|
+
function ze(r, t, e, i) {
|
|
3944
3989
|
if (t !== "middle-left" && t !== "middle-right")
|
|
3945
3990
|
return;
|
|
3946
3991
|
r.fontSize = i.fontSize ?? r.fontSize;
|
|
3947
3992
|
const s = r.transformData;
|
|
3948
3993
|
if (st(s) !== void 0) {
|
|
3949
|
-
|
|
3994
|
+
qt(s, Math.max(Gt, e));
|
|
3950
3995
|
const a = I.toRadiansInverse(r.rotation), n = Math.cos(a), h = Math.sin(a), l = i.transformData, g = st(l) ?? i.width ?? 0, f = (st(s) ?? 0) - g;
|
|
3951
3996
|
t === "middle-left" ? (r.x = i.x - f / 2 * n, r.y = i.y - f / 2 * h) : t === "middle-right" && (r.x = i.x + f / 2 * n, r.y = i.y + f / 2 * h);
|
|
3952
3997
|
}
|
|
3953
3998
|
}
|
|
3954
|
-
function
|
|
3999
|
+
function jt(r, t, e, i, s) {
|
|
3955
4000
|
const o = t.includes("top") || t.includes("bottom"), a = t.includes("middle");
|
|
3956
|
-
o ?
|
|
4001
|
+
o ? We(r, e, s) : a && ze(r, t, e, s);
|
|
3957
4002
|
}
|
|
3958
|
-
class
|
|
4003
|
+
class Xe extends q {
|
|
3959
4004
|
// Temporary property used during resize operations only
|
|
3960
4005
|
constructor(t = {}) {
|
|
3961
4006
|
super(t), this.transformType = "custom";
|
|
3962
4007
|
const e = t.transformData, i = (e == null ? void 0 : e.width) !== void 0 ? e.width : Math.max(
|
|
3963
|
-
|
|
3964
|
-
|
|
4008
|
+
Gt,
|
|
4009
|
+
Pt(this.text, this.fontSize, this.fontFamily, this.bold, this.italic, this.letterSpacing ?? 0) + j * 2
|
|
3965
4010
|
);
|
|
3966
4011
|
this.transformData = {
|
|
3967
4012
|
type: "custom",
|
|
@@ -3974,9 +4019,9 @@ class He extends q {
|
|
|
3974
4019
|
* Returns the total height based on the tallest font in each line
|
|
3975
4020
|
*/
|
|
3976
4021
|
calculateRichTextHeight() {
|
|
3977
|
-
const t = this.getRichText(), e = this.transformData.width - j * 2, i =
|
|
4022
|
+
const t = this.getRichText(), e = this.transformData.width - j * 2, i = Le(t), s = [];
|
|
3978
4023
|
if (i.forEach((h) => {
|
|
3979
|
-
|
|
4024
|
+
Pe(h, e, {
|
|
3980
4025
|
fontSize: this.fontSize,
|
|
3981
4026
|
fontFamily: this.fontFamily,
|
|
3982
4027
|
bold: this.bold,
|
|
@@ -3990,15 +4035,15 @@ class He extends q {
|
|
|
3990
4035
|
let o = 0, a = 0;
|
|
3991
4036
|
s.forEach((h) => {
|
|
3992
4037
|
h.forEach((l) => {
|
|
3993
|
-
const c = l.style.fontSize !== void 0 ? l.style.fontSize : this.fontSize, g = l.style.fontFamily !== void 0 ? l.style.fontFamily : this.fontFamily, d = l.style.bold !== void 0 ? l.style.bold : this.bold, f = l.style.italic !== void 0 ? l.style.italic : this.italic, u =
|
|
4038
|
+
const c = l.style.fontSize !== void 0 ? l.style.fontSize : this.fontSize, g = l.style.fontFamily !== void 0 ? l.style.fontFamily : this.fontFamily, d = l.style.bold !== void 0 ? l.style.bold : this.bold, f = l.style.italic !== void 0 ? l.style.italic : this.italic, u = Mt(c, g, d, f);
|
|
3994
4039
|
o = Math.max(o, u.height), a = Math.max(a, u.ascent);
|
|
3995
4040
|
});
|
|
3996
4041
|
});
|
|
3997
|
-
const n = this.fontSize * (this.lineHeight ??
|
|
4042
|
+
const n = this.fontSize * (this.lineHeight ?? Ut);
|
|
3998
4043
|
if (s.length === 1)
|
|
3999
4044
|
return o;
|
|
4000
4045
|
{
|
|
4001
|
-
const h =
|
|
4046
|
+
const h = Mt(this.fontSize, this.fontFamily, this.bold, this.italic), l = (s.length - 1) * n + h.height, c = Math.max(0, a - h.ascent), g = Math.max(0, o - a - (h.height - h.ascent));
|
|
4002
4047
|
return l + c + g;
|
|
4003
4048
|
}
|
|
4004
4049
|
}
|
|
@@ -4020,7 +4065,7 @@ class He extends q {
|
|
|
4020
4065
|
getBoundingBox() {
|
|
4021
4066
|
const t = this.transformData.width - j * 2;
|
|
4022
4067
|
let e;
|
|
4023
|
-
return this.hasPerCharacterFormatting() ? e = this.calculateRichTextHeight() : e =
|
|
4068
|
+
return this.hasPerCharacterFormatting() ? e = this.calculateRichTextHeight() : e = Lt(
|
|
4024
4069
|
this.text,
|
|
4025
4070
|
t,
|
|
4026
4071
|
this.fontSize,
|
|
@@ -4047,7 +4092,7 @@ class He extends q {
|
|
|
4047
4092
|
getVisualBoundingBox() {
|
|
4048
4093
|
const t = this.transformData.width - j * 2;
|
|
4049
4094
|
let e;
|
|
4050
|
-
this.hasPerCharacterFormatting() ? e = this.calculateRichTextHeight() : e =
|
|
4095
|
+
this.hasPerCharacterFormatting() ? e = this.calculateRichTextHeight() : e = Lt(
|
|
4051
4096
|
this.text,
|
|
4052
4097
|
t,
|
|
4053
4098
|
this.fontSize,
|
|
@@ -4114,7 +4159,7 @@ class He extends q {
|
|
|
4114
4159
|
* Override getTransformStartData to capture initial line count
|
|
4115
4160
|
*/
|
|
4116
4161
|
getTransformStartData() {
|
|
4117
|
-
const t = super.getTransformStartData(), e = this.transformData.width - j * 2, i =
|
|
4162
|
+
const t = super.getTransformStartData(), e = this.transformData.width - j * 2, i = It(this.text, e, this.fontSize, this.fontFamily, this.bold, this.italic, void 0, !1, {
|
|
4118
4163
|
letterSpacing: this.letterSpacing
|
|
4119
4164
|
});
|
|
4120
4165
|
return t.lineCount = i.length, t;
|
|
@@ -4125,8 +4170,8 @@ class He extends q {
|
|
|
4125
4170
|
* Side handles: only width changes - text re-wraps naturally
|
|
4126
4171
|
*/
|
|
4127
4172
|
resize(t, e, i, s) {
|
|
4128
|
-
if (t === "top-left" || t === "top-right" || t === "bottom-left" || t === "bottom-right" || (this._lockedLineCount = void 0),
|
|
4129
|
-
const n =
|
|
4173
|
+
if (t === "top-left" || t === "top-right" || t === "bottom-left" || t === "bottom-right" || (this._lockedLineCount = void 0), jt(this, t, e, i, s), this._lockedLineCount !== void 0 && this._lockedLineCount > 0) {
|
|
4174
|
+
const n = Pt(
|
|
4130
4175
|
this.text,
|
|
4131
4176
|
this.fontSize,
|
|
4132
4177
|
this.fontFamily,
|
|
@@ -4178,7 +4223,7 @@ class He extends q {
|
|
|
4178
4223
|
};
|
|
4179
4224
|
}
|
|
4180
4225
|
}
|
|
4181
|
-
function
|
|
4226
|
+
function Ne(r, t, e, i) {
|
|
4182
4227
|
const s = I.toRadians(i), o = Math.cos(s), a = Math.sin(s);
|
|
4183
4228
|
let n = 0, h = 0;
|
|
4184
4229
|
e === "top-left" ? (n = r.width, h = r.height) : e === "top-right" ? (n = 0, h = r.height) : e === "bottom-left" ? (n = r.width, h = 0) : e === "bottom-right" && (n = 0, h = 0);
|
|
@@ -4188,14 +4233,14 @@ function Pe(r, t, e, i) {
|
|
|
4188
4233
|
const f = l - (g * o - d * a), u = c - (g * a + d * o);
|
|
4189
4234
|
return { x: f, y: u };
|
|
4190
4235
|
}
|
|
4191
|
-
function
|
|
4192
|
-
const s = r.width / 2, o = r.height +
|
|
4236
|
+
function ss(r, t, e, i = 1) {
|
|
4237
|
+
const s = r.width / 2, o = r.height + me / i, a = r.x + s, n = r.y + o, h = I.toRadians(t), l = Math.cos(h), c = Math.sin(h), g = a - e.x, d = n - e.y, f = g * l - d * c, u = g * c + d * l;
|
|
4193
4238
|
return {
|
|
4194
4239
|
x: e.x + f,
|
|
4195
4240
|
y: e.y + u
|
|
4196
4241
|
};
|
|
4197
4242
|
}
|
|
4198
|
-
function
|
|
4243
|
+
function os(r, t, e) {
|
|
4199
4244
|
const i = I.toRadians(t), s = Math.cos(i), o = Math.sin(i), a = (c, g) => {
|
|
4200
4245
|
const d = r.x + c, f = r.y + g, u = d - e.x, m = f - e.y, p = u * s - m * o, y = u * o + m * s;
|
|
4201
4246
|
return {
|
|
@@ -4203,7 +4248,7 @@ function ji(r, t, e) {
|
|
|
4203
4248
|
y: e.y + y
|
|
4204
4249
|
};
|
|
4205
4250
|
}, { width: n, height: h } = r, l = (c, g, d, f) => {
|
|
4206
|
-
const u = a(d, f), m =
|
|
4251
|
+
const u = a(d, f), m = _e(
|
|
4207
4252
|
u.x,
|
|
4208
4253
|
u.y,
|
|
4209
4254
|
e.x,
|
|
@@ -4232,11 +4277,11 @@ function ji(r, t, e) {
|
|
|
4232
4277
|
l("edge", "middle-bottom", n / 2, h)
|
|
4233
4278
|
];
|
|
4234
4279
|
}
|
|
4235
|
-
function
|
|
4280
|
+
function rs(r, t, e, i, s) {
|
|
4236
4281
|
const o = r - e, a = t - i;
|
|
4237
4282
|
return o * o + a * a <= s * s;
|
|
4238
4283
|
}
|
|
4239
|
-
function
|
|
4284
|
+
function ns(r, t, e, i) {
|
|
4240
4285
|
const s = I.toRadiansInverse(i), o = Math.cos(s), a = Math.sin(s), n = r - e.x, h = t - e.y, l = n * o - h * a, c = n * a + h * o;
|
|
4241
4286
|
return l >= 0 && l <= e.width && c >= 0 && c <= e.height;
|
|
4242
4287
|
}
|
|
@@ -4244,19 +4289,19 @@ function tt(r, t, e = "Arial", i = !1, s = !1) {
|
|
|
4244
4289
|
const a = document.createElement("canvas").getContext("2d"), n = i ? "bold" : "normal", h = s ? "italic" : "normal";
|
|
4245
4290
|
return a.font = `${h} ${n} ${t}px ${e}`, a.measureText(r).width;
|
|
4246
4291
|
}
|
|
4247
|
-
function
|
|
4292
|
+
function as(r) {
|
|
4248
4293
|
return {
|
|
4249
4294
|
x: r.x + r.width / 2,
|
|
4250
4295
|
y: r.y + r.height / 2
|
|
4251
4296
|
};
|
|
4252
4297
|
}
|
|
4253
|
-
function
|
|
4298
|
+
function hs(r, t, e, i) {
|
|
4254
4299
|
return Math.atan2(i - t, e - r);
|
|
4255
4300
|
}
|
|
4256
|
-
function
|
|
4301
|
+
function ls(r, t, e) {
|
|
4257
4302
|
return Math.abs(r - t) <= e;
|
|
4258
4303
|
}
|
|
4259
|
-
function
|
|
4304
|
+
function _e(r, t, e, i, s, o = 0, a = "") {
|
|
4260
4305
|
const n = r - e, h = t - i;
|
|
4261
4306
|
let l = Math.atan2(h, n) * (180 / Math.PI);
|
|
4262
4307
|
if (l = (l % 360 + 360) % 360, s === "corner") {
|
|
@@ -4273,17 +4318,17 @@ function Le(r, t, e, i, s, o = 0, a = "") {
|
|
|
4273
4318
|
return c >= 45 && c < 135 ? "ns-resize" : "ew-resize";
|
|
4274
4319
|
}
|
|
4275
4320
|
}
|
|
4276
|
-
function
|
|
4321
|
+
function Ye(r) {
|
|
4277
4322
|
if (!r.getTransform)
|
|
4278
4323
|
return 1;
|
|
4279
4324
|
const t = r.getTransform();
|
|
4280
4325
|
return Math.sqrt(t.a * t.a + t.b * t.b);
|
|
4281
4326
|
}
|
|
4282
|
-
function
|
|
4283
|
-
const i =
|
|
4327
|
+
function cs(r, t, e = []) {
|
|
4328
|
+
const i = Ye(r);
|
|
4284
4329
|
r.lineWidth = i > 0 ? t / i : t, e.length > 0 && r.setLineDash(i > 0 ? e.map((s) => s / i) : e);
|
|
4285
4330
|
}
|
|
4286
|
-
class
|
|
4331
|
+
class Ue extends q {
|
|
4287
4332
|
constructor(t = {}) {
|
|
4288
4333
|
super(t), this.transformType = "circle";
|
|
4289
4334
|
const e = t.transformData;
|
|
@@ -4339,7 +4384,7 @@ class ze extends q {
|
|
|
4339
4384
|
resize(t, e, i, s) {
|
|
4340
4385
|
const o = s.transformData, a = (e + i) / 2, n = (s.width + s.height) / 2, h = a / n, l = o.scale * h, c = Math.max(0.1, Math.min(10, l));
|
|
4341
4386
|
this.transformData.scale = c;
|
|
4342
|
-
const g = this.getBoundingBox(), d =
|
|
4387
|
+
const g = this.getBoundingBox(), d = Ne(
|
|
4343
4388
|
{
|
|
4344
4389
|
x: s.x - o.radius * o.scale,
|
|
4345
4390
|
y: s.y - o.radius * o.scale,
|
|
@@ -4413,7 +4458,7 @@ class ze extends q {
|
|
|
4413
4458
|
};
|
|
4414
4459
|
}
|
|
4415
4460
|
}
|
|
4416
|
-
class
|
|
4461
|
+
class Ge extends q {
|
|
4417
4462
|
constructor(t = {}) {
|
|
4418
4463
|
super(t), this.transformType = "arch";
|
|
4419
4464
|
const e = t.transformData;
|
|
@@ -4447,8 +4492,8 @@ class Xe extends q {
|
|
|
4447
4492
|
{ x: p / 2, y: n }
|
|
4448
4493
|
// bottom-right
|
|
4449
4494
|
].forEach((C) => {
|
|
4450
|
-
const M = C.x, F = C.y + b * o * C.x,
|
|
4451
|
-
h = Math.min(h,
|
|
4495
|
+
const M = C.x, F = C.y + b * o * C.x, T = y + M, D = S + F;
|
|
4496
|
+
h = Math.min(h, T), l = Math.max(l, T), c = Math.min(c, D), g = Math.max(g, D);
|
|
4452
4497
|
}), d += p;
|
|
4453
4498
|
});
|
|
4454
4499
|
const f = 2;
|
|
@@ -4518,14 +4563,14 @@ const ot = {
|
|
|
4518
4563
|
frequency: 2,
|
|
4519
4564
|
// Standard flag frequency
|
|
4520
4565
|
width: 200
|
|
4521
|
-
},
|
|
4566
|
+
}, $e = {
|
|
4522
4567
|
archHeight: 0.5
|
|
4523
|
-
},
|
|
4568
|
+
}, Ve = {
|
|
4524
4569
|
leanAmount: 0
|
|
4525
|
-
},
|
|
4570
|
+
}, Je = {
|
|
4526
4571
|
ascendAngle: -15
|
|
4527
4572
|
};
|
|
4528
|
-
class
|
|
4573
|
+
class qe extends q {
|
|
4529
4574
|
constructor(t = {}) {
|
|
4530
4575
|
super(t), this.transformType = "wave";
|
|
4531
4576
|
const e = t.transformData;
|
|
@@ -4560,7 +4605,7 @@ class Ue extends q {
|
|
|
4560
4605
|
{ x: u / 2, y: o }
|
|
4561
4606
|
// bottom-right
|
|
4562
4607
|
].forEach((b) => {
|
|
4563
|
-
const
|
|
4608
|
+
const v = b.x, C = b.y + w * Ce * b.x, M = m + v, F = y + C;
|
|
4564
4609
|
a = Math.min(a, M), n = Math.max(n, M), h = Math.min(h, F), l = Math.max(l, F);
|
|
4565
4610
|
}), c += u;
|
|
4566
4611
|
});
|
|
@@ -4573,7 +4618,7 @@ class Ue extends q {
|
|
|
4573
4618
|
};
|
|
4574
4619
|
}
|
|
4575
4620
|
resize(t, e, i, s) {
|
|
4576
|
-
|
|
4621
|
+
jt(this, t, e, i, s);
|
|
4577
4622
|
}
|
|
4578
4623
|
getEnabledAnchors() {
|
|
4579
4624
|
return ["top-left", "top-right", "bottom-left", "bottom-right"];
|
|
@@ -4594,7 +4639,7 @@ class Ue extends q {
|
|
|
4594
4639
|
};
|
|
4595
4640
|
}
|
|
4596
4641
|
}
|
|
4597
|
-
class
|
|
4642
|
+
class je extends q {
|
|
4598
4643
|
constructor(t = {}) {
|
|
4599
4644
|
super(t), this.transformType = "flag";
|
|
4600
4645
|
const e = t.transformData;
|
|
@@ -4618,7 +4663,7 @@ class Ge extends q {
|
|
|
4618
4663
|
const t = this.text.split(""), e = t.map((f) => tt(f, this.fontSize, this.fontFamily)), i = e.reduce((f, u) => f + u, 0), s = 0.3, a = this.fontSize / 2;
|
|
4619
4664
|
let n = 1 / 0, h = -1 / 0, l = 1 / 0, c = -1 / 0, g = -i / 2;
|
|
4620
4665
|
t.forEach((f, u) => {
|
|
4621
|
-
const m = e[u], p = g + m / 2, y = p / (this.transformData.width / 2), w = Math.abs(y), S = this.transformData.amplitude * w, b = S * this.fontSize * Math.sin(this.transformData.frequency * Math.PI * y),
|
|
4666
|
+
const m = e[u], p = g + m / 2, y = p / (this.transformData.width / 2), w = Math.abs(y), S = this.transformData.amplitude * w, b = S * this.fontSize * Math.sin(this.transformData.frequency * Math.PI * y), v = S * this.transformData.frequency * Math.PI * Math.cos(this.transformData.frequency * Math.PI * y), C = this.transformData.amplitude * Math.sign(y) * Math.sin(this.transformData.frequency * Math.PI * y), M = v + C;
|
|
4622
4667
|
[
|
|
4623
4668
|
{ x: -m / 2, y: -a },
|
|
4624
4669
|
// top-left
|
|
@@ -4628,8 +4673,8 @@ class Ge extends q {
|
|
|
4628
4673
|
// bottom-left
|
|
4629
4674
|
{ x: m / 2, y: a }
|
|
4630
4675
|
// bottom-right
|
|
4631
|
-
].forEach((
|
|
4632
|
-
const D =
|
|
4676
|
+
].forEach((T) => {
|
|
4677
|
+
const D = T.x, U = T.y + M * s * T.x, B = p + D, A = b + U;
|
|
4633
4678
|
n = Math.min(n, B), h = Math.max(h, B), l = Math.min(l, A), c = Math.max(c, A);
|
|
4634
4679
|
}), g += m;
|
|
4635
4680
|
});
|
|
@@ -4690,7 +4735,7 @@ class Ge extends q {
|
|
|
4690
4735
|
};
|
|
4691
4736
|
}
|
|
4692
4737
|
}
|
|
4693
|
-
class
|
|
4738
|
+
class Ze extends q {
|
|
4694
4739
|
constructor(t = {}) {
|
|
4695
4740
|
super(t), this.transformType = "lean";
|
|
4696
4741
|
const e = t.transformData;
|
|
@@ -4780,7 +4825,7 @@ class $e extends q {
|
|
|
4780
4825
|
};
|
|
4781
4826
|
}
|
|
4782
4827
|
}
|
|
4783
|
-
class
|
|
4828
|
+
class Ke extends q {
|
|
4784
4829
|
constructor(t = {}) {
|
|
4785
4830
|
super(t), this.transformType = "ascend";
|
|
4786
4831
|
const e = t.transformData;
|
|
@@ -4813,9 +4858,9 @@ class Ve extends q {
|
|
|
4813
4858
|
// bottom-left
|
|
4814
4859
|
{ x: y / 2, y: h }
|
|
4815
4860
|
// bottom-right
|
|
4816
|
-
].forEach((
|
|
4817
|
-
const C =
|
|
4818
|
-
l = Math.min(l, F), c = Math.max(c, F), g = Math.min(g,
|
|
4861
|
+
].forEach((v) => {
|
|
4862
|
+
const C = v.x, M = v.y + o * a * v.x, F = w + C, T = S + M;
|
|
4863
|
+
l = Math.min(l, F), c = Math.max(c, F), g = Math.min(g, T), d = Math.max(d, T);
|
|
4819
4864
|
}), f += y;
|
|
4820
4865
|
});
|
|
4821
4866
|
const u = 2;
|
|
@@ -4873,7 +4918,7 @@ class Ve extends q {
|
|
|
4873
4918
|
};
|
|
4874
4919
|
}
|
|
4875
4920
|
}
|
|
4876
|
-
class
|
|
4921
|
+
class kt extends Q {
|
|
4877
4922
|
constructor(t = {}) {
|
|
4878
4923
|
var i, s, o, a, n, h, l, c, g, d, f;
|
|
4879
4924
|
super(t), this.transformType = "shape";
|
|
@@ -4890,7 +4935,7 @@ class At extends Q {
|
|
|
4890
4935
|
sides: ((l = t.transformData) == null ? void 0 : l.sides) ?? 5,
|
|
4891
4936
|
points: ((c = t.transformData) == null ? void 0 : c.points) ?? 5,
|
|
4892
4937
|
innerRadius: ((g = t.transformData) == null ? void 0 : g.innerRadius) ?? 0.4,
|
|
4893
|
-
fillColor: ((d = t.transformData) == null ? void 0 : d.fillColor) ||
|
|
4938
|
+
fillColor: ((d = t.transformData) == null ? void 0 : d.fillColor) || Yt(),
|
|
4894
4939
|
fillOpacity: ((f = t.transformData) == null ? void 0 : f.fillOpacity) ?? 1
|
|
4895
4940
|
};
|
|
4896
4941
|
}
|
|
@@ -5338,7 +5383,7 @@ class At extends Q {
|
|
|
5338
5383
|
* Clone this element
|
|
5339
5384
|
*/
|
|
5340
5385
|
clone() {
|
|
5341
|
-
return new
|
|
5386
|
+
return new kt(this.toJSON());
|
|
5342
5387
|
}
|
|
5343
5388
|
/**
|
|
5344
5389
|
* Serialize to JSON
|
|
@@ -5360,7 +5405,7 @@ class At extends Q {
|
|
|
5360
5405
|
};
|
|
5361
5406
|
}
|
|
5362
5407
|
}
|
|
5363
|
-
class
|
|
5408
|
+
class Et extends Q {
|
|
5364
5409
|
constructor(t = {}) {
|
|
5365
5410
|
var e, i, s, o, a, n, h, l, c, g;
|
|
5366
5411
|
super(t), this.transformType = "path", this.transformData = {
|
|
@@ -5370,7 +5415,7 @@ class Mt extends Q {
|
|
|
5370
5415
|
width: ((s = t.transformData) == null ? void 0 : s.width) || 200,
|
|
5371
5416
|
height: ((o = t.transformData) == null ? void 0 : o.height) || 200,
|
|
5372
5417
|
fillEnabled: ((a = t.transformData) == null ? void 0 : a.fillEnabled) ?? !1,
|
|
5373
|
-
fillColor: ((n = t.transformData) == null ? void 0 : n.fillColor) ||
|
|
5418
|
+
fillColor: ((n = t.transformData) == null ? void 0 : n.fillColor) || Yt(),
|
|
5374
5419
|
fillOpacity: ((h = t.transformData) == null ? void 0 : h.fillOpacity) ?? 1,
|
|
5375
5420
|
strokeEnabled: ((l = t.transformData) == null ? void 0 : l.strokeEnabled) ?? !0,
|
|
5376
5421
|
strokeColor: ((c = t.transformData) == null ? void 0 : c.strokeColor) || "#000000",
|
|
@@ -5447,8 +5492,8 @@ class Mt extends Q {
|
|
|
5447
5492
|
x: u.x + (((c = u.handleIn) == null ? void 0 : c.x) || 0),
|
|
5448
5493
|
y: u.y + (((g = u.handleIn) == null ? void 0 : g.y) || 0)
|
|
5449
5494
|
}, S = { x: u.x, y: u.y }, b = 20;
|
|
5450
|
-
for (let
|
|
5451
|
-
const C =
|
|
5495
|
+
for (let v = 0; v <= b; v++) {
|
|
5496
|
+
const C = v / b, M = this.bezierPoint(p, y, w, S, C);
|
|
5452
5497
|
e = Math.min(e, M.x), i = Math.min(i, M.y), s = Math.max(s, M.x), o = Math.max(o, M.y);
|
|
5453
5498
|
}
|
|
5454
5499
|
}
|
|
@@ -5636,7 +5681,7 @@ class Mt extends Q {
|
|
|
5636
5681
|
* Clone this element
|
|
5637
5682
|
*/
|
|
5638
5683
|
clone() {
|
|
5639
|
-
return new
|
|
5684
|
+
return new Et(this.toJSON());
|
|
5640
5685
|
}
|
|
5641
5686
|
/**
|
|
5642
5687
|
* Serialize to JSON
|
|
@@ -5666,7 +5711,7 @@ class Mt extends Q {
|
|
|
5666
5711
|
};
|
|
5667
5712
|
}
|
|
5668
5713
|
}
|
|
5669
|
-
const
|
|
5714
|
+
const Qe = {
|
|
5670
5715
|
circle: [
|
|
5671
5716
|
{
|
|
5672
5717
|
key: "reverse",
|
|
@@ -5679,7 +5724,7 @@ const Je = {
|
|
|
5679
5724
|
{
|
|
5680
5725
|
key: "archHeight",
|
|
5681
5726
|
label: "Arch Height",
|
|
5682
|
-
defaultInternalValue:
|
|
5727
|
+
defaultInternalValue: $e.archHeight,
|
|
5683
5728
|
// Slider 0-100 maps to internal -1 to 1
|
|
5684
5729
|
toSlider: (r) => (r + 1) / 2 * 100,
|
|
5685
5730
|
fromSlider: (r) => r / 100 * 2 - 1,
|
|
@@ -5732,7 +5777,7 @@ const Je = {
|
|
|
5732
5777
|
{
|
|
5733
5778
|
key: "leanAmount",
|
|
5734
5779
|
label: "Lean Amount",
|
|
5735
|
-
defaultInternalValue:
|
|
5780
|
+
defaultInternalValue: Ve.leanAmount,
|
|
5736
5781
|
// Slider 0-100 maps to internal -0.5 to 0.5
|
|
5737
5782
|
// Display as -100% to 100%
|
|
5738
5783
|
toSlider: (r) => (r + 0.5) * 100,
|
|
@@ -5744,7 +5789,7 @@ const Je = {
|
|
|
5744
5789
|
{
|
|
5745
5790
|
key: "ascendAngle",
|
|
5746
5791
|
label: "Ascend Amount",
|
|
5747
|
-
defaultInternalValue:
|
|
5792
|
+
defaultInternalValue: Je.ascendAngle,
|
|
5748
5793
|
// Slider 0-100 maps to internal angle +30° to -30°
|
|
5749
5794
|
// Display: slider 0 = -100% (down), slider 50 = 0%, slider 100 = +100% (up)
|
|
5750
5795
|
toSlider: (r) => (30 - r) / 60 * 100,
|
|
@@ -5820,53 +5865,53 @@ const Je = {
|
|
|
5820
5865
|
toDisplay: (r) => `${(r * 100).toFixed(0)}%`
|
|
5821
5866
|
}
|
|
5822
5867
|
]
|
|
5823
|
-
},
|
|
5824
|
-
{ id: "custom", label: "CUSTOM", Component:
|
|
5868
|
+
}, Zt = [
|
|
5869
|
+
{ id: "custom", label: "CUSTOM", Component: Xe },
|
|
5825
5870
|
// NOTE: distort transform is not yet implemented. Removed from registry
|
|
5826
5871
|
// to prevent it from appearing in UI that iterates over registered transforms.
|
|
5827
5872
|
// Re-add with a valid Component when implementation is ready.
|
|
5828
|
-
{ id: "circle", label: "CIRCLE", Component:
|
|
5829
|
-
{ id: "lean", label: "LEAN", Component:
|
|
5830
|
-
{ id: "arch", label: "ARCH", Component:
|
|
5831
|
-
{ id: "ascend", label: "ASCEND", Component:
|
|
5832
|
-
{ id: "wave", label: "WAVE", Component:
|
|
5833
|
-
{ id: "flag", label: "FLAG", Component:
|
|
5834
|
-
{ id: "shape", label: "SHAPE", Component:
|
|
5835
|
-
{ id: "path", label: "PATH", Component:
|
|
5836
|
-
{ id: "image", label: "IMAGE", Component:
|
|
5873
|
+
{ id: "circle", label: "CIRCLE", Component: Ue },
|
|
5874
|
+
{ id: "lean", label: "LEAN", Component: Ze },
|
|
5875
|
+
{ id: "arch", label: "ARCH", Component: Ge },
|
|
5876
|
+
{ id: "ascend", label: "ASCEND", Component: Ke },
|
|
5877
|
+
{ id: "wave", label: "WAVE", Component: qe },
|
|
5878
|
+
{ id: "flag", label: "FLAG", Component: je },
|
|
5879
|
+
{ id: "shape", label: "SHAPE", Component: kt },
|
|
5880
|
+
{ id: "path", label: "PATH", Component: Et },
|
|
5881
|
+
{ id: "image", label: "IMAGE", Component: yt },
|
|
5837
5882
|
// Use a getter to break circular dependency: GroupElement imports getTransformById
|
|
5838
5883
|
// from this module, so GroupElement may be in the TDZ during module evaluation.
|
|
5839
5884
|
// The getter defers access until runtime when both modules are fully initialized.
|
|
5840
5885
|
{ id: "group", label: "GROUP", get Component() {
|
|
5841
|
-
return
|
|
5886
|
+
return mt;
|
|
5842
5887
|
} }
|
|
5843
|
-
],
|
|
5844
|
-
function
|
|
5845
|
-
if (
|
|
5888
|
+
], Kt = new Set(Zt.map((r) => r.id)), ut = /* @__PURE__ */ new Map();
|
|
5889
|
+
function ds(r, t) {
|
|
5890
|
+
if (Kt.has(r))
|
|
5846
5891
|
throw new Error(
|
|
5847
5892
|
`Cannot register transform type "${r}": conflicts with built-in type`
|
|
5848
5893
|
);
|
|
5849
|
-
if (
|
|
5894
|
+
if (ut.has(r))
|
|
5850
5895
|
throw new Error(
|
|
5851
5896
|
`Cannot register transform type "${r}": already registered as a custom type`
|
|
5852
5897
|
);
|
|
5853
|
-
|
|
5898
|
+
ut.set(r, t);
|
|
5854
5899
|
}
|
|
5855
|
-
function
|
|
5856
|
-
if (
|
|
5900
|
+
function gs(r) {
|
|
5901
|
+
if (Kt.has(r))
|
|
5857
5902
|
throw new Error(
|
|
5858
5903
|
`Cannot unregister transform type "${r}": built-in types cannot be removed`
|
|
5859
5904
|
);
|
|
5860
|
-
return
|
|
5905
|
+
return ut.delete(r);
|
|
5861
5906
|
}
|
|
5862
|
-
function
|
|
5863
|
-
const t =
|
|
5864
|
-
return t ||
|
|
5907
|
+
function ti(r) {
|
|
5908
|
+
const t = Zt.find((e) => e.id === r);
|
|
5909
|
+
return t || ut.get(r);
|
|
5865
5910
|
}
|
|
5866
|
-
function
|
|
5867
|
-
return
|
|
5911
|
+
function fs(r) {
|
|
5912
|
+
return Qe[r] || [];
|
|
5868
5913
|
}
|
|
5869
|
-
class
|
|
5914
|
+
class mt extends Q {
|
|
5870
5915
|
constructor(t = {}) {
|
|
5871
5916
|
super(t), this.isGroup = !0, this._baseBBoxWidth = 0, this._baseBBoxHeight = 0, this._rotationCenterX = 0, this._rotationCenterY = 0, this.transformType = "group";
|
|
5872
5917
|
const e = t.children || [];
|
|
@@ -5881,7 +5926,7 @@ class ut extends Q {
|
|
|
5881
5926
|
*/
|
|
5882
5927
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- JSON deserialization: config comes from toJSON() and constructors accept Partial<Config> with varying signatures
|
|
5883
5928
|
_reconstructChildFromJSON(t) {
|
|
5884
|
-
const e = t.transformType || t.type, i =
|
|
5929
|
+
const e = t.transformType || t.type, i = ti(e);
|
|
5885
5930
|
if (!i || !i.Component)
|
|
5886
5931
|
throw new Error(`Unknown transform type: ${e}`);
|
|
5887
5932
|
return new i.Component(t);
|
|
@@ -5968,7 +6013,7 @@ class ut extends Q {
|
|
|
5968
6013
|
*/
|
|
5969
6014
|
render(t, e = !1, i = !1) {
|
|
5970
6015
|
const s = this.children.filter((a) => a.visible !== !1);
|
|
5971
|
-
s.some((a) => a.isClipping) ?
|
|
6016
|
+
s.some((a) => a.isClipping) ? Ee()(t, s) : s.forEach((a) => {
|
|
5972
6017
|
a.render(t, !1);
|
|
5973
6018
|
}), e ? this._renderGroupOutline(t, 1) : i && this._renderGroupOutline(t, 0.3);
|
|
5974
6019
|
}
|
|
@@ -5978,7 +6023,7 @@ class ut extends Q {
|
|
|
5978
6023
|
*/
|
|
5979
6024
|
_renderGroupOutline(t, e = 1) {
|
|
5980
6025
|
const i = this.getOrientedBoundingBox();
|
|
5981
|
-
t.save(), t.globalAlpha = e, t.strokeStyle =
|
|
6026
|
+
t.save(), t.globalAlpha = e, t.strokeStyle = _t(), t.lineWidth = 2, t.setLineDash([5, 5]);
|
|
5982
6027
|
const s = this._rotationCenterX || this.x, o = this._rotationCenterY || this.y;
|
|
5983
6028
|
this.rotation !== 0 && (t.translate(s, o), t.rotate(-this.rotation * Math.PI / 180), t.translate(-s, -o)), t.strokeRect(i.x, i.y, i.width, i.height), t.setLineDash([]), t.restore();
|
|
5984
6029
|
}
|
|
@@ -6055,16 +6100,16 @@ class ut extends Q {
|
|
|
6055
6100
|
}
|
|
6056
6101
|
const c = -s.rotation * Math.PI / 180, g = Math.cos(c), d = Math.sin(c), f = s.x + (h * g - l * d), u = s.y + (h * d + l * g);
|
|
6057
6102
|
this.children.forEach((y, w) => {
|
|
6058
|
-
const S = s.childrenStartData[w], b = S.x - f,
|
|
6059
|
-
if (y.x = C, y.y = M, y instanceof
|
|
6060
|
-
const F = S.transformData,
|
|
6061
|
-
y.transformData.width =
|
|
6062
|
-
} else if (y instanceof
|
|
6063
|
-
const F = (S.width ?? 0) * n,
|
|
6064
|
-
y.resize(t, F,
|
|
6103
|
+
const S = s.childrenStartData[w], b = S.x - f, v = S.y - u, C = f + b * n, M = u + v * n;
|
|
6104
|
+
if (y.x = C, y.y = M, y instanceof yt) {
|
|
6105
|
+
const F = S.transformData, T = F.width * n, D = F.height * n;
|
|
6106
|
+
y.transformData.width = T, y.transformData.height = D;
|
|
6107
|
+
} else if (y instanceof mt) {
|
|
6108
|
+
const F = (S.width ?? 0) * n, T = (S.height ?? 0) * n;
|
|
6109
|
+
y.resize(t, F, T, S);
|
|
6065
6110
|
} else {
|
|
6066
|
-
const F = (S.width ?? 0) * n,
|
|
6067
|
-
y.resize(t, F,
|
|
6111
|
+
const F = (S.width ?? 0) * n, T = (S.height ?? 0) * n;
|
|
6112
|
+
y.resize(t, F, T, S);
|
|
6068
6113
|
}
|
|
6069
6114
|
}), this._baseBBoxWidth = s.width * n, this._baseBBoxHeight = s.height * n;
|
|
6070
6115
|
const m = s.x - f, p = s.y - u;
|
|
@@ -6121,7 +6166,7 @@ class ut extends Q {
|
|
|
6121
6166
|
* Clone the group (deep copy with children)
|
|
6122
6167
|
*/
|
|
6123
6168
|
clone() {
|
|
6124
|
-
const t = this.children.map((i) => i.clone()), e = new
|
|
6169
|
+
const t = this.children.map((i) => i.clone()), e = new mt({
|
|
6125
6170
|
id: this.id,
|
|
6126
6171
|
x: this.x,
|
|
6127
6172
|
y: this.y,
|
|
@@ -6311,6 +6356,18 @@ class Z {
|
|
|
6311
6356
|
return t.byId = new Map(this.byId), t.order = [...this.order], t;
|
|
6312
6357
|
}
|
|
6313
6358
|
}
|
|
6359
|
+
class us extends Error {
|
|
6360
|
+
constructor(t, e, i = {}) {
|
|
6361
|
+
super(`[Editor] ${t}: ${e}`), this.name = "EditorError", this.code = t, this.data = { code: t, ...i };
|
|
6362
|
+
}
|
|
6363
|
+
}
|
|
6364
|
+
function ms(r) {
|
|
6365
|
+
return r instanceof Error && r.name === "EditorError" && "code" in r;
|
|
6366
|
+
}
|
|
6367
|
+
function ps() {
|
|
6368
|
+
var r;
|
|
6369
|
+
return typeof ft < "u" && ((r = ft.env) == null ? void 0 : r.NODE_ENV) !== "production";
|
|
6370
|
+
}
|
|
6314
6371
|
class $ {
|
|
6315
6372
|
/**
|
|
6316
6373
|
* Execute the command
|
|
@@ -6325,7 +6382,7 @@ class $ {
|
|
|
6325
6382
|
throw new Error("Command.undo() must be implemented");
|
|
6326
6383
|
}
|
|
6327
6384
|
}
|
|
6328
|
-
class
|
|
6385
|
+
class ys extends $ {
|
|
6329
6386
|
constructor(t, e, i, s) {
|
|
6330
6387
|
super(), this.elementId = t, this.oldElement = e ? e.clone() : null, this.newElement = i ? i.clone() : null, this.onUpdate = s;
|
|
6331
6388
|
}
|
|
@@ -6336,7 +6393,7 @@ class ns extends $ {
|
|
|
6336
6393
|
this.oldElement && this.onUpdate(this.oldElement);
|
|
6337
6394
|
}
|
|
6338
6395
|
}
|
|
6339
|
-
class
|
|
6396
|
+
class ws extends $ {
|
|
6340
6397
|
constructor(t, e, i) {
|
|
6341
6398
|
super(), this.element = t.clone(), this.onAdd = e, this.onRemove = i;
|
|
6342
6399
|
}
|
|
@@ -6347,7 +6404,7 @@ class as extends $ {
|
|
|
6347
6404
|
this.onRemove(this.element.id);
|
|
6348
6405
|
}
|
|
6349
6406
|
}
|
|
6350
|
-
class
|
|
6407
|
+
class bs extends $ {
|
|
6351
6408
|
constructor(t, e, i) {
|
|
6352
6409
|
super(), this.element = t.clone(), this.onAdd = e, this.onRemove = i;
|
|
6353
6410
|
}
|
|
@@ -6358,7 +6415,7 @@ class hs extends $ {
|
|
|
6358
6415
|
this.onAdd(this.element);
|
|
6359
6416
|
}
|
|
6360
6417
|
}
|
|
6361
|
-
class
|
|
6418
|
+
class ei extends $ {
|
|
6362
6419
|
constructor(t) {
|
|
6363
6420
|
super(), this.commands = t;
|
|
6364
6421
|
}
|
|
@@ -6390,7 +6447,7 @@ class ct {
|
|
|
6390
6447
|
executeBatch(t) {
|
|
6391
6448
|
if (t.length === 0)
|
|
6392
6449
|
return;
|
|
6393
|
-
const e = new
|
|
6450
|
+
const e = new ei(t);
|
|
6394
6451
|
this.execute(e);
|
|
6395
6452
|
}
|
|
6396
6453
|
/**
|
|
@@ -6435,7 +6492,7 @@ class ct {
|
|
|
6435
6492
|
};
|
|
6436
6493
|
}
|
|
6437
6494
|
}
|
|
6438
|
-
class
|
|
6495
|
+
class xs extends $ {
|
|
6439
6496
|
constructor(t, e) {
|
|
6440
6497
|
super(), this.artboard = t.clone(), this.artboardManager = e;
|
|
6441
6498
|
}
|
|
@@ -6455,7 +6512,7 @@ class ls extends $ {
|
|
|
6455
6512
|
this.artboardManager.deleteArtboard(this.artboard.id);
|
|
6456
6513
|
}
|
|
6457
6514
|
}
|
|
6458
|
-
class
|
|
6515
|
+
class Ss extends $ {
|
|
6459
6516
|
constructor(t, e) {
|
|
6460
6517
|
super(), this.artboard = t.clone(), this.artboardManager = e, this.elementsOnArtboard = t.getElementIds();
|
|
6461
6518
|
}
|
|
@@ -6478,7 +6535,7 @@ class cs extends $ {
|
|
|
6478
6535
|
});
|
|
6479
6536
|
}
|
|
6480
6537
|
}
|
|
6481
|
-
class
|
|
6538
|
+
class Cs extends $ {
|
|
6482
6539
|
constructor(t, e, i, s) {
|
|
6483
6540
|
super(), this.artboardId = t, this.oldProperties = { ...e }, this.newProperties = { ...i }, this.artboardManager = s;
|
|
6484
6541
|
}
|
|
@@ -6489,7 +6546,7 @@ class ds extends $ {
|
|
|
6489
6546
|
this.artboardManager.updateArtboard(this.artboardId, this.oldProperties);
|
|
6490
6547
|
}
|
|
6491
6548
|
}
|
|
6492
|
-
class
|
|
6549
|
+
class vs extends $ {
|
|
6493
6550
|
constructor(t, e, i, s, o) {
|
|
6494
6551
|
super(), this.draggedId = t, this.targetId = e, this.position = i, this.oldOrder = [...s], this.onReorder = o, this.newOrder = this.calculateNewOrder();
|
|
6495
6552
|
}
|
|
@@ -6509,8 +6566,8 @@ class gs extends $ {
|
|
|
6509
6566
|
this.onReorder(this.oldOrder);
|
|
6510
6567
|
}
|
|
6511
6568
|
}
|
|
6512
|
-
const
|
|
6513
|
-
class
|
|
6569
|
+
const ii = pt("HybridHistoryManager");
|
|
6570
|
+
class Ts {
|
|
6514
6571
|
constructor(t, e = 50) {
|
|
6515
6572
|
this.commandExecutedCallbacks = [], this.globalHistory = new ct(e), this.artboardHistories = /* @__PURE__ */ new Map(), this.lastOperation = null, this.artboardManager = t, this.maxHistorySize = e;
|
|
6516
6573
|
}
|
|
@@ -6532,7 +6589,7 @@ class fs {
|
|
|
6532
6589
|
try {
|
|
6533
6590
|
s(t, e, i);
|
|
6534
6591
|
} catch (o) {
|
|
6535
|
-
|
|
6592
|
+
ii.error("Error in command executed callback:", o);
|
|
6536
6593
|
}
|
|
6537
6594
|
}
|
|
6538
6595
|
/**
|
|
@@ -6804,12 +6861,12 @@ class fs {
|
|
|
6804
6861
|
return this.canRedoGlobal() ? "Redo artboard operation" : "Nothing to redo";
|
|
6805
6862
|
}
|
|
6806
6863
|
}
|
|
6807
|
-
const G =
|
|
6808
|
-
let
|
|
6809
|
-
async function
|
|
6810
|
-
return
|
|
6864
|
+
const G = pt("FontAnalyzer");
|
|
6865
|
+
let St = null;
|
|
6866
|
+
async function si() {
|
|
6867
|
+
return St || (St = await import("./browser-module-DFvKXBUE.js")), St;
|
|
6811
6868
|
}
|
|
6812
|
-
class
|
|
6869
|
+
class oi {
|
|
6813
6870
|
constructor() {
|
|
6814
6871
|
this.fontCache = /* @__PURE__ */ new Map(), this.failedFonts = /* @__PURE__ */ new Set(), this.CACHE_DURATION = 1e3 * 60 * 30, this.MAX_CACHE_SIZE = 5;
|
|
6815
6872
|
}
|
|
@@ -6829,7 +6886,7 @@ class Qe {
|
|
|
6829
6886
|
* Check if a font is a system font
|
|
6830
6887
|
*/
|
|
6831
6888
|
isSystemFont(t) {
|
|
6832
|
-
return
|
|
6889
|
+
return Se.has(t);
|
|
6833
6890
|
}
|
|
6834
6891
|
/**
|
|
6835
6892
|
* Get Google Fonts API URL for a specific font family
|
|
@@ -6877,7 +6934,7 @@ class Qe {
|
|
|
6877
6934
|
const a = await fetch(o);
|
|
6878
6935
|
if (!a.ok)
|
|
6879
6936
|
return G.error(`Font fetch failed: ${a.status} ${a.statusText}`), this.failedFonts.add(i), null;
|
|
6880
|
-
const n = await a.arrayBuffer(), h = new Uint8Array(n), c = (await
|
|
6937
|
+
const n = await a.arrayBuffer(), h = new Uint8Array(n), c = (await si()).create(h), g = "fonts" in c ? c.fonts[0] : c;
|
|
6881
6938
|
return this.fontCache.set(i, {
|
|
6882
6939
|
font: g,
|
|
6883
6940
|
url: o,
|
|
@@ -7022,13 +7079,13 @@ class Qe {
|
|
|
7022
7079
|
const S = w.coverage;
|
|
7023
7080
|
if (!S) continue;
|
|
7024
7081
|
if (this.getCoverageIndex(S, n.id) !== -1) {
|
|
7025
|
-
const
|
|
7026
|
-
|
|
7027
|
-
glyphIndex:
|
|
7082
|
+
const v = this.getSubstituteGlyph(w, n.id);
|
|
7083
|
+
v !== null && o.push({
|
|
7084
|
+
glyphIndex: v,
|
|
7028
7085
|
unicode: e,
|
|
7029
7086
|
name: `${e} (${m})`,
|
|
7030
7087
|
category: this.categorizeFeature(m),
|
|
7031
|
-
previewDataUrl: this.generateGlyphPreview(s,
|
|
7088
|
+
previewDataUrl: this.generateGlyphPreview(s, v, 80)
|
|
7032
7089
|
});
|
|
7033
7090
|
}
|
|
7034
7091
|
}
|
|
@@ -7036,9 +7093,9 @@ class Qe {
|
|
|
7036
7093
|
for (const w of y.subtables || []) {
|
|
7037
7094
|
const S = w.coverage;
|
|
7038
7095
|
if (!S) continue;
|
|
7039
|
-
const b = this.getCoverageIndex(S, n.id),
|
|
7040
|
-
if (b !== -1 &&
|
|
7041
|
-
const C =
|
|
7096
|
+
const b = this.getCoverageIndex(S, n.id), v = w;
|
|
7097
|
+
if (b !== -1 && v.alternateSets) {
|
|
7098
|
+
const C = v.alternateSets[b];
|
|
7042
7099
|
if (C)
|
|
7043
7100
|
for (const M of C)
|
|
7044
7101
|
o.push({
|
|
@@ -7228,126 +7285,134 @@ class Qe {
|
|
|
7228
7285
|
};
|
|
7229
7286
|
}
|
|
7230
7287
|
}
|
|
7231
|
-
const
|
|
7288
|
+
const Fs = new oi();
|
|
7232
7289
|
export {
|
|
7233
|
-
|
|
7290
|
+
ve as $,
|
|
7234
7291
|
nt as A,
|
|
7235
7292
|
Q as B,
|
|
7236
|
-
|
|
7237
|
-
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
|
|
7241
|
-
|
|
7242
|
-
|
|
7243
|
-
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
|
|
7250
|
-
|
|
7293
|
+
Fs as C,
|
|
7294
|
+
ps as D,
|
|
7295
|
+
us as E,
|
|
7296
|
+
Di as F,
|
|
7297
|
+
mt as G,
|
|
7298
|
+
de as H,
|
|
7299
|
+
yt as I,
|
|
7300
|
+
De as J,
|
|
7301
|
+
Dt as K,
|
|
7302
|
+
Ei as L,
|
|
7303
|
+
Oi as M,
|
|
7304
|
+
Ge as N,
|
|
7305
|
+
ri as O,
|
|
7306
|
+
Et as P,
|
|
7307
|
+
Ke as Q,
|
|
7251
7308
|
L as R,
|
|
7252
|
-
|
|
7309
|
+
kt as S,
|
|
7253
7310
|
q as T,
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
|
|
7289
|
-
|
|
7290
|
-
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
|
|
7298
|
-
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
|
|
7319
|
-
|
|
7320
|
-
|
|
7321
|
-
|
|
7322
|
-
|
|
7323
|
-
|
|
7324
|
-
|
|
7325
|
-
|
|
7326
|
-
|
|
7327
|
-
|
|
7328
|
-
|
|
7329
|
-
|
|
7330
|
-
|
|
7331
|
-
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
|
|
7337
|
-
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
Yi as
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7311
|
+
ys as U,
|
|
7312
|
+
Ue as V,
|
|
7313
|
+
Xe as W,
|
|
7314
|
+
Z as X,
|
|
7315
|
+
je as Y,
|
|
7316
|
+
Ts as Z,
|
|
7317
|
+
Ze as _,
|
|
7318
|
+
Ki as a,
|
|
7319
|
+
Si as a$,
|
|
7320
|
+
qe as a0,
|
|
7321
|
+
Ne as a1,
|
|
7322
|
+
os as a2,
|
|
7323
|
+
ss as a3,
|
|
7324
|
+
rs as a4,
|
|
7325
|
+
ns as a5,
|
|
7326
|
+
Ae as a6,
|
|
7327
|
+
Le as a7,
|
|
7328
|
+
Pe as a8,
|
|
7329
|
+
at as a9,
|
|
7330
|
+
pi as aA,
|
|
7331
|
+
_t as aB,
|
|
7332
|
+
yi as aC,
|
|
7333
|
+
wi as aD,
|
|
7334
|
+
I as aE,
|
|
7335
|
+
P as aF,
|
|
7336
|
+
Ai as aG,
|
|
7337
|
+
cs as aH,
|
|
7338
|
+
me as aI,
|
|
7339
|
+
hi as aJ,
|
|
7340
|
+
mi as aK,
|
|
7341
|
+
hs as aL,
|
|
7342
|
+
pe as aM,
|
|
7343
|
+
as as aN,
|
|
7344
|
+
_e as aO,
|
|
7345
|
+
ls as aP,
|
|
7346
|
+
vi as aQ,
|
|
7347
|
+
fi as aR,
|
|
7348
|
+
ui as aS,
|
|
7349
|
+
gi as aT,
|
|
7350
|
+
ue as aU,
|
|
7351
|
+
di as aV,
|
|
7352
|
+
ci as aW,
|
|
7353
|
+
ai as aX,
|
|
7354
|
+
Fi as aY,
|
|
7355
|
+
Ti as aZ,
|
|
7356
|
+
li as a_,
|
|
7357
|
+
Pt as aa,
|
|
7358
|
+
Mt as ab,
|
|
7359
|
+
Lt as ac,
|
|
7360
|
+
Ut as ad,
|
|
7361
|
+
is as ae,
|
|
7362
|
+
j as af,
|
|
7363
|
+
wt as ag,
|
|
7364
|
+
es as ah,
|
|
7365
|
+
Ce as ai,
|
|
7366
|
+
Bi as aj,
|
|
7367
|
+
Ri as ak,
|
|
7368
|
+
J as al,
|
|
7369
|
+
ws as am,
|
|
7370
|
+
bs as an,
|
|
7371
|
+
xs as ao,
|
|
7372
|
+
Ss as ap,
|
|
7373
|
+
Cs as aq,
|
|
7374
|
+
vs as ar,
|
|
7375
|
+
be as as,
|
|
7376
|
+
xe as at,
|
|
7377
|
+
xi as au,
|
|
7378
|
+
$e as av,
|
|
7379
|
+
ot as aw,
|
|
7380
|
+
Ii as ax,
|
|
7381
|
+
It as ay,
|
|
7382
|
+
Yt as az,
|
|
7383
|
+
Zi as b,
|
|
7384
|
+
Ci as b0,
|
|
7385
|
+
bi as b1,
|
|
7386
|
+
ni as b2,
|
|
7387
|
+
Zt as b3,
|
|
7388
|
+
fs as b4,
|
|
7389
|
+
Mi as b5,
|
|
7390
|
+
Ve as b6,
|
|
7391
|
+
rt as b7,
|
|
7392
|
+
ki as b8,
|
|
7393
|
+
pt as c,
|
|
7394
|
+
Gi as d,
|
|
7395
|
+
Pi as e,
|
|
7396
|
+
Ui as f,
|
|
7397
|
+
ti as g,
|
|
7398
|
+
ts as h,
|
|
7399
|
+
Li as i,
|
|
7400
|
+
Hi as j,
|
|
7401
|
+
zi as k,
|
|
7402
|
+
$i as l,
|
|
7403
|
+
Ni as m,
|
|
7404
|
+
Yi as n,
|
|
7405
|
+
Xi as o,
|
|
7406
|
+
Qi as p,
|
|
7407
|
+
Ji as q,
|
|
7408
|
+
ds as r,
|
|
7409
|
+
ji as s,
|
|
7410
|
+
Vi as t,
|
|
7411
|
+
gs as u,
|
|
7412
|
+
qi as v,
|
|
7413
|
+
_i as w,
|
|
7414
|
+
Wi as x,
|
|
7415
|
+
ms as y,
|
|
7416
|
+
ft as z
|
|
7352
7417
|
};
|
|
7353
|
-
//# sourceMappingURL=FontAnalyzer-
|
|
7418
|
+
//# sourceMappingURL=FontAnalyzer-BYhwxDhe.js.map
|