@snowcone-app/canvas 0.31.0 → 0.33.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 +11 -0
- package/STYLING_CONTRACT.md +5 -3
- package/dist/{CanvasRenderer-hpJ05JGO.js → CanvasRenderer-1j-twIbs.js} +443 -431
- package/dist/{CanvasRenderer-hpJ05JGO.js.map → CanvasRenderer-1j-twIbs.js.map} +1 -1
- package/dist/{CanvasStateV1-jLOibojY.js → CanvasStateV1-BmC1JfPv.js} +810 -802
- package/dist/{CanvasStateV1-jLOibojY.js.map → CanvasStateV1-BmC1JfPv.js.map} +1 -1
- package/dist/ContextualToolbars-CLDFENZq.js +6532 -0
- package/dist/ContextualToolbars-CLDFENZq.js.map +1 -0
- package/dist/{EditorCanvasImpl-P2GHPNA3.js → EditorCanvasImpl-XP_t-tNl.js} +7 -7
- package/dist/{EditorCanvasImpl-P2GHPNA3.js.map → EditorCanvasImpl-XP_t-tNl.js.map} +1 -1
- package/dist/{ExportManager-Bkzzyxgw.js → ExportManager-Ci81K6xA.js} +662 -518
- package/dist/ExportManager-Ci81K6xA.js.map +1 -0
- package/dist/{FontAnalyzer-BYhwxDhe.js → FontAnalyzer-BrKY6XYn.js} +1256 -1146
- package/dist/FontAnalyzer-BrKY6XYn.js.map +1 -0
- package/dist/{ImagePanel-CEr0_FYy.js → ImagePanel-ntJBepby.js} +6 -6
- package/dist/{ImagePanel-CEr0_FYy.js.map → ImagePanel-ntJBepby.js.map} +1 -1
- package/dist/{SnowconeCanvas-Fa0isFpO.js → SnowconeCanvas-wMLBZJ9z.js} +10 -10
- package/dist/{SnowconeCanvas-Fa0isFpO.js.map → SnowconeCanvas-wMLBZJ9z.js.map} +1 -1
- package/dist/advanced.mjs +14 -14
- package/dist/components/ImageToolbar.d.ts +8 -0
- package/dist/components/ShapeToolbar.d.ts +8 -0
- package/dist/components/TextToolbar.d.ts +5 -1
- package/dist/components/toolbars/EmbeddedToolbarLayout.d.ts +6 -0
- package/dist/components/toolbars/FloatingPanels.d.ts +10 -0
- package/dist/components/toolbars/GroupElementToolbar.d.ts +8 -0
- package/dist/components/toolbars/SecondaryPanels.d.ts +37 -1
- package/dist/components/toolbars/alignButtons.d.ts +13 -0
- package/dist/components/toolbars/index.d.ts +5 -3
- package/dist/core/BaseElement.d.ts +2 -1
- package/dist/core/shape-fill.d.ts +31 -0
- package/dist/{custom-icons-Co4rcW0S.js → custom-icons-DTWtkJ9N.js} +2 -2
- package/dist/{custom-icons-Co4rcW0S.js.map → custom-icons-DTWtkJ9N.js.map} +1 -1
- package/dist/{design-builder-CBG2hKc8.js → design-builder-BpbYUYtK.js} +55 -55
- package/dist/{design-builder-CBG2hKc8.js.map → design-builder-BpbYUYtK.js.map} +1 -1
- package/dist/{embed-D4TIzO7g.js → embed-VTcnrkRj.js} +10 -10
- package/dist/{embed-D4TIzO7g.js.map → embed-VTcnrkRj.js.map} +1 -1
- package/dist/embed.mjs +7 -7
- package/dist/errors/editorError.d.ts +7 -0
- package/dist/{guards-DgZuwVgu.js → guards-BhaQgJrE.js} +2 -2
- package/dist/{guards-DgZuwVgu.js.map → guards-BhaQgJrE.js.map} +1 -1
- package/dist/hooks/elementPatch.d.ts +8 -3
- package/dist/index.mjs +9 -9
- package/dist/internals.mjs +123 -123
- package/dist/internals.mjs.map +1 -1
- package/dist/rendering/LayerEffectsRenderer.d.ts +24 -0
- package/dist/rendering/renderer-types.d.ts +3 -1
- package/dist/state/CanvasStateV1.d.ts +17 -0
- package/dist/style.css +1 -1
- package/dist/{template-fields-CvFcr5zy.js → template-fields-D-2oLhCi.js} +5 -5
- package/dist/{template-fields-CvFcr5zy.js.map → template-fields-D-2oLhCi.js.map} +1 -1
- package/dist/testing.mjs +3 -3
- package/dist/types/index.d.ts +84 -1
- package/dist/types/public.d.ts +3 -2
- package/dist/{useCommands-bPXY9rCh.js → useCommands-DwnZHUg8.js} +435 -418
- package/dist/useCommands-DwnZHUg8.js.map +1 -0
- package/dist/{usePieceGuideBundle-Bj98nPk0.js → usePieceGuideBundle-CnSmYrmM.js} +2 -2
- package/dist/{usePieceGuideBundle-Bj98nPk0.js.map → usePieceGuideBundle-CnSmYrmM.js.map} +1 -1
- package/dist/utils/featureApplied.d.ts +4 -0
- package/dist/{validation-CsTlSvJJ.js → validation-CSa86fDE.js} +11 -11
- package/dist/{validation-CsTlSvJJ.js.map → validation-CSa86fDE.js.map} +1 -1
- 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-DRbuUE7W.js +0 -6061
- package/dist/ContextualToolbars-DRbuUE7W.js.map +0 -1
- package/dist/ExportManager-Bkzzyxgw.js.map +0 -1
- package/dist/FontAnalyzer-BYhwxDhe.js.map +0 -1
- package/dist/useCommands-bPXY9rCh.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as f, jsxs as j, Fragment as an } from "react/jsx-runtime";
|
|
2
2
|
import * as F from "react";
|
|
3
3
|
import ne, { useRef as V, useState as B, useCallback as N, useMemo as J, useEffect as Y, forwardRef as $n, createElement as En, useLayoutEffect as Hn, memo as ei, useReducer as ti, useContext as Be, createContext as Xe, cloneElement as ni, useId as Pr, useSyncExternalStore as $r } from "react";
|
|
4
|
-
import { u as qt, k as ri, r as oi, m as Hr, f as ii, i as si } from "./design-builder-
|
|
5
|
-
import { G as Re, c as Qe, E as rt, D as ai, H as ln, I as li, P as ci, S as di, T as ui,
|
|
6
|
-
import { g as
|
|
4
|
+
import { u as qt, k as ri, r as oi, m as Hr, f as ii, i as si } from "./design-builder-BpbYUYtK.js";
|
|
5
|
+
import { G as Re, c as Qe, E as rt, D as ai, H as ln, I as li, P as ci, S as di, T as ui, J as fi, C as hi, K as pi, L as gi, U as sr } from "./FontAnalyzer-BrKY6XYn.js";
|
|
6
|
+
import { g as mi, I as cn, E as dn } from "./ExportManager-Ci81K6xA.js";
|
|
7
7
|
import { createPortal as Bn, unstable_batchedUpdates as Ft } from "react-dom";
|
|
8
8
|
import { clsx as Br } from "clsx";
|
|
9
9
|
import { extendTailwindMerge as Vr } from "tailwind-merge";
|
|
10
|
-
import { Slot as
|
|
10
|
+
import { Slot as vi } from "@radix-ui/react-slot";
|
|
11
11
|
import { cva as Ur } from "class-variance-authority";
|
|
12
12
|
import * as ot from "@radix-ui/react-tooltip";
|
|
13
|
-
const
|
|
13
|
+
const yi = {
|
|
14
14
|
"eos-icons:loading": {
|
|
15
15
|
body: '<path fill="currentColor" d="M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z" opacity=".5"/><path fill="currentColor" d="M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z"><animateTransform attributeName="transform" dur="1s" from="0 12 12" repeatCount="indefinite" to="360 12 12" type="rotate"/></path>',
|
|
16
16
|
width: 24,
|
|
@@ -71,6 +71,11 @@ const mi = {
|
|
|
71
71
|
width: 24,
|
|
72
72
|
height: 24
|
|
73
73
|
},
|
|
74
|
+
"gravity-ui:circles-intersection": {
|
|
75
|
+
body: '<path fill="currentColor" fill-rule="evenodd" d="M6.576 11.854a4 4 0 1 1 0-7.707A5.48 5.48 0 0 0 5 8c0 1.5.601 2.861 1.576 3.854M8 12.9a5.5 5.5 0 1 1 0-9.8a5.5 5.5 0 1 1 0 9.8m1.424-8.754A4.003 4.003 0 0 1 14.5 8a4 4 0 0 1-5.076 3.854A5.48 5.48 0 0 0 11 8c0-1.5-.601-2.861-1.576-3.854M8 4.877C8.914 5.61 9.5 6.737 9.5 8s-.586 2.39-1.5 3.123A4 4 0 0 1 6.5 8c0-1.263.586-2.39 1.5-3.123" clip-rule="evenodd"/>',
|
|
76
|
+
width: 24,
|
|
77
|
+
height: 24
|
|
78
|
+
},
|
|
74
79
|
"gravity-ui:copy": {
|
|
75
80
|
body: '<path fill="currentColor" fill-rule="evenodd" d="M12 2.5H8A1.5 1.5 0 0 0 6.5 4v1H8a3 3 0 0 1 3 3v1.5h1A1.5 1.5 0 0 0 13.5 8V4A1.5 1.5 0 0 0 12 2.5M11 11h1a3 3 0 0 0 3-3V4a3 3 0 0 0-3-3H8a3 3 0 0 0-3 3v1H4a3 3 0 0 0-3 3v4a3 3 0 0 0 3 3h4a3 3 0 0 0 3-3zM4 6.5h4A1.5 1.5 0 0 1 9.5 8v4A1.5 1.5 0 0 1 8 13.5H4A1.5 1.5 0 0 1 2.5 12V8A1.5 1.5 0 0 1 4 6.5" clip-rule="evenodd"/>',
|
|
76
81
|
width: 24,
|
|
@@ -171,6 +176,11 @@ const mi = {
|
|
|
171
176
|
width: 24,
|
|
172
177
|
height: 24
|
|
173
178
|
},
|
|
179
|
+
"gravity-ui:square-dashed-circle": {
|
|
180
|
+
body: '<path fill="currentColor" fill-rule="evenodd" d="M3 4.5A1.5 1.5 0 0 1 4.5 3h1.75a.75.75 0 0 0 0-1.5H4.5a3 3 0 0 0-3 3v1.75a.75.75 0 0 0 1.5 0zm6.75-3a.75.75 0 0 0 0 1.5h1.75A1.5 1.5 0 0 1 13 4.5v1.75a.75.75 0 0 0 1.5 0V4.5a3 3 0 0 0-3-3zM3 9.75a.75.75 0 0 0-1.5 0v1.75a3 3 0 0 0 3 3h1.75a.75.75 0 0 0 0-1.5H4.5A1.5 1.5 0 0 1 3 11.5zm11.5 0a.75.75 0 0 0-1.5 0v1.75a1.5 1.5 0 0 1-1.5 1.5H9.75a.75.75 0 0 0 0 1.5h1.75a3 3 0 0 0 3-3zM10 8a2 2 0 1 1-4 0a2 2 0 0 1 4 0m1.5 0a3.5 3.5 0 1 1-7 0a3.5 3.5 0 0 1 7 0" clip-rule="evenodd"/>',
|
|
181
|
+
width: 24,
|
|
182
|
+
height: 24
|
|
183
|
+
},
|
|
174
184
|
"gravity-ui:text": {
|
|
175
185
|
body: '<path fill="currentColor" fill-rule="evenodd" d="M3.279 2.544A.75.75 0 0 1 4 2h8a.75.75 0 0 1 .721.544l.5 1.75a.75.75 0 1 1-1.442.412L11.434 3.5H8.75l-.004 9H9.5a.75.75 0 0 1 0 1.5h-3a.75.75 0 0 1 0-1.5h.746l.004-9H4.566L4.22 4.706a.75.75 0 1 1-1.442-.412z" clip-rule="evenodd"/>',
|
|
176
186
|
width: 24,
|
|
@@ -527,22 +537,22 @@ const mi = {
|
|
|
527
537
|
height: 15
|
|
528
538
|
}
|
|
529
539
|
}, Gr = typeof window < "u";
|
|
530
|
-
async function
|
|
540
|
+
async function bi() {
|
|
531
541
|
if (!Gr) return;
|
|
532
|
-
const { addIcon: e } = await Promise.resolve().then(() =>
|
|
533
|
-
for (const [t, n] of Object.entries(
|
|
542
|
+
const { addIcon: e } = await Promise.resolve().then(() => vs);
|
|
543
|
+
for (const [t, n] of Object.entries(yi))
|
|
534
544
|
e(t, n);
|
|
535
545
|
}
|
|
536
546
|
let un = !1;
|
|
537
|
-
function
|
|
538
|
-
un || !Gr || (un = !0,
|
|
547
|
+
function pc() {
|
|
548
|
+
un || !Gr || (un = !0, bi().catch(() => {
|
|
539
549
|
un = !1;
|
|
540
550
|
}));
|
|
541
551
|
}
|
|
542
|
-
const re = Qe("Layers"),
|
|
552
|
+
const re = Qe("Layers"), wi = 150;
|
|
543
553
|
async function ar(e, t = 64, n = "transparent") {
|
|
544
554
|
try {
|
|
545
|
-
const r =
|
|
555
|
+
const r = mi();
|
|
546
556
|
return r && r(e, {
|
|
547
557
|
width: t,
|
|
548
558
|
height: t,
|
|
@@ -590,7 +600,7 @@ function Wr(e) {
|
|
|
590
600
|
t.push(n), n.children && t.push(...Wr(n.children));
|
|
591
601
|
return t;
|
|
592
602
|
}
|
|
593
|
-
function
|
|
603
|
+
function xi(e = {}) {
|
|
594
604
|
var Oe;
|
|
595
605
|
const {
|
|
596
606
|
artboardId: t,
|
|
@@ -791,7 +801,7 @@ function bi(e = {}) {
|
|
|
791
801
|
if (!i) return;
|
|
792
802
|
const x = setTimeout(() => {
|
|
793
803
|
De();
|
|
794
|
-
},
|
|
804
|
+
}, wi);
|
|
795
805
|
return () => clearTimeout(x);
|
|
796
806
|
}, [i, De]);
|
|
797
807
|
const ee = N(() => {
|
|
@@ -910,7 +920,7 @@ function bi(e = {}) {
|
|
|
910
920
|
layerCount: w.length
|
|
911
921
|
};
|
|
912
922
|
}
|
|
913
|
-
function
|
|
923
|
+
function ki(e, t) {
|
|
914
924
|
const n = e.icons, r = e.aliases || /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
|
|
915
925
|
function i(s) {
|
|
916
926
|
if (n[s]) return o[s] = [];
|
|
@@ -940,18 +950,18 @@ const Yr = Object.freeze({
|
|
|
940
950
|
body: "",
|
|
941
951
|
hidden: !1
|
|
942
952
|
});
|
|
943
|
-
function
|
|
953
|
+
function Ci(e, t) {
|
|
944
954
|
const n = {};
|
|
945
955
|
!e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
|
|
946
956
|
const r = ((e.rotate || 0) + (t.rotate || 0)) % 4;
|
|
947
957
|
return r && (n.rotate = r), n;
|
|
948
958
|
}
|
|
949
959
|
function lr(e, t) {
|
|
950
|
-
const n =
|
|
960
|
+
const n = Ci(e, t);
|
|
951
961
|
for (const r in An) r in Bt ? r in e && !(r in n) && (n[r] = Bt[r]) : r in t ? n[r] = t[r] : r in e && (n[r] = e[r]);
|
|
952
962
|
return n;
|
|
953
963
|
}
|
|
954
|
-
function
|
|
964
|
+
function Si(e, t, n) {
|
|
955
965
|
const r = e.icons, o = e.aliases || /* @__PURE__ */ Object.create(null);
|
|
956
966
|
let i = {};
|
|
957
967
|
function s(a) {
|
|
@@ -965,14 +975,14 @@ function qr(e, t) {
|
|
|
965
975
|
e.not_found instanceof Array && e.not_found.forEach((o) => {
|
|
966
976
|
t(o, null), n.push(o);
|
|
967
977
|
});
|
|
968
|
-
const r =
|
|
978
|
+
const r = ki(e);
|
|
969
979
|
for (const o in r) {
|
|
970
980
|
const i = r[o];
|
|
971
|
-
i && (t(o,
|
|
981
|
+
i && (t(o, Si(e, o, i)), n.push(o));
|
|
972
982
|
}
|
|
973
983
|
return n;
|
|
974
984
|
}
|
|
975
|
-
const
|
|
985
|
+
const Ei = {
|
|
976
986
|
provider: "",
|
|
977
987
|
aliases: {},
|
|
978
988
|
not_found: {},
|
|
@@ -985,7 +995,7 @@ function fn(e, t) {
|
|
|
985
995
|
function Kr(e) {
|
|
986
996
|
if (typeof e != "object" || e === null) return null;
|
|
987
997
|
const t = e;
|
|
988
|
-
if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !fn(e,
|
|
998
|
+
if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !fn(e, Ei)) return null;
|
|
989
999
|
const n = t.icons;
|
|
990
1000
|
for (const o in n) {
|
|
991
1001
|
const i = n[o];
|
|
@@ -999,7 +1009,7 @@ function Kr(e) {
|
|
|
999
1009
|
return t;
|
|
1000
1010
|
}
|
|
1001
1011
|
const cr = /* @__PURE__ */ Object.create(null);
|
|
1002
|
-
function
|
|
1012
|
+
function Ai(e, t) {
|
|
1003
1013
|
return {
|
|
1004
1014
|
provider: e,
|
|
1005
1015
|
prefix: t,
|
|
@@ -1009,14 +1019,14 @@ function Si(e, t) {
|
|
|
1009
1019
|
}
|
|
1010
1020
|
function it(e, t) {
|
|
1011
1021
|
const n = cr[e] || (cr[e] = /* @__PURE__ */ Object.create(null));
|
|
1012
|
-
return n[t] || (n[t] =
|
|
1022
|
+
return n[t] || (n[t] = Ai(e, t));
|
|
1013
1023
|
}
|
|
1014
1024
|
function Jr(e, t) {
|
|
1015
1025
|
return Kr(t) ? qr(t, (n, r) => {
|
|
1016
1026
|
r ? e.icons[n] = r : e.missing.add(n);
|
|
1017
1027
|
}) : [];
|
|
1018
1028
|
}
|
|
1019
|
-
function
|
|
1029
|
+
function Mi(e, t, n) {
|
|
1020
1030
|
try {
|
|
1021
1031
|
if (typeof n.body == "string")
|
|
1022
1032
|
return e.icons[t] = { ...n }, !0;
|
|
@@ -1073,7 +1083,7 @@ function Zr(e, t) {
|
|
|
1073
1083
|
const n = Kt(e, !0, xt);
|
|
1074
1084
|
if (!n) return !1;
|
|
1075
1085
|
const r = it(n.provider, n.prefix);
|
|
1076
|
-
return t ?
|
|
1086
|
+
return t ? Mi(r, n.name, t) : (r.missing.add(n.name), !0);
|
|
1077
1087
|
}
|
|
1078
1088
|
function eo(e, t) {
|
|
1079
1089
|
if (typeof e != "object") return !1;
|
|
@@ -1097,15 +1107,15 @@ const to = Object.freeze({
|
|
|
1097
1107
|
}), no = Object.freeze({
|
|
1098
1108
|
...to,
|
|
1099
1109
|
...Bt
|
|
1100
|
-
}),
|
|
1110
|
+
}), Di = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Li = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
1101
1111
|
function Mn(e, t, n) {
|
|
1102
1112
|
if (t === 1) return e;
|
|
1103
1113
|
if (n = n || 100, typeof e == "number") return Math.ceil(e * t * n) / n;
|
|
1104
1114
|
if (typeof e != "string") return e;
|
|
1105
|
-
const r = e.split(
|
|
1115
|
+
const r = e.split(Di);
|
|
1106
1116
|
if (r === null || !r.length) return e;
|
|
1107
1117
|
const o = [];
|
|
1108
|
-
let i = r.shift(), s =
|
|
1118
|
+
let i = r.shift(), s = Li.test(i);
|
|
1109
1119
|
for (; ; ) {
|
|
1110
1120
|
if (s) {
|
|
1111
1121
|
const a = parseFloat(i);
|
|
@@ -1115,7 +1125,7 @@ function Mn(e, t, n) {
|
|
|
1115
1125
|
s = !s;
|
|
1116
1126
|
}
|
|
1117
1127
|
}
|
|
1118
|
-
function
|
|
1128
|
+
function Ti(e, t = "defs") {
|
|
1119
1129
|
let n = "";
|
|
1120
1130
|
const r = e.indexOf("<" + t);
|
|
1121
1131
|
for (; r >= 0; ) {
|
|
@@ -1130,14 +1140,14 @@ function Di(e, t = "defs") {
|
|
|
1130
1140
|
content: e
|
|
1131
1141
|
};
|
|
1132
1142
|
}
|
|
1133
|
-
function
|
|
1143
|
+
function Ri(e, t) {
|
|
1134
1144
|
return e ? "<defs>" + e + "</defs>" + t : t;
|
|
1135
1145
|
}
|
|
1136
|
-
function
|
|
1137
|
-
const r =
|
|
1138
|
-
return
|
|
1146
|
+
function Ii(e, t, n) {
|
|
1147
|
+
const r = Ti(e);
|
|
1148
|
+
return Ri(r.defs, t + r.content + n);
|
|
1139
1149
|
}
|
|
1140
|
-
const
|
|
1150
|
+
const Ni = (e) => e === "unset" || e === "undefined" || e === "none";
|
|
1141
1151
|
function ro(e, t) {
|
|
1142
1152
|
const n = {
|
|
1143
1153
|
...Vn,
|
|
@@ -1168,13 +1178,13 @@ function ro(e, t) {
|
|
|
1168
1178
|
L = o.width / 2 + o.left, p.unshift("rotate(-90 " + L.toString() + " " + L.toString() + ")");
|
|
1169
1179
|
break;
|
|
1170
1180
|
}
|
|
1171
|
-
M % 2 === 1 && (o.left !== o.top && (L = o.left, o.left = o.top, o.top = L), o.width !== o.height && (L = o.width, o.width = o.height, o.height = L)), p.length && (i =
|
|
1181
|
+
M % 2 === 1 && (o.left !== o.top && (L = o.left, o.left = o.top, o.top = L), o.width !== o.height && (L = o.width, o.width = o.height, o.height = L)), p.length && (i = Ii(i, '<g transform="' + p.join(" ") + '">', "</g>"));
|
|
1172
1182
|
});
|
|
1173
1183
|
const s = r.width, a = r.height, l = o.width, c = o.height;
|
|
1174
1184
|
let u, d;
|
|
1175
1185
|
s === null ? (d = a === null ? "1em" : a === "auto" ? c : a, u = Mn(d, l / c)) : (u = s === "auto" ? l : s, d = a === null ? Mn(u, c / l) : a === "auto" ? c : a);
|
|
1176
1186
|
const h = {}, g = (y, p) => {
|
|
1177
|
-
|
|
1187
|
+
Ni(p) || (h[y] = p.toString());
|
|
1178
1188
|
};
|
|
1179
1189
|
g("width", u), g("height", d);
|
|
1180
1190
|
const k = [
|
|
@@ -1189,21 +1199,21 @@ function ro(e, t) {
|
|
|
1189
1199
|
body: i
|
|
1190
1200
|
};
|
|
1191
1201
|
}
|
|
1192
|
-
const
|
|
1193
|
-
let
|
|
1194
|
-
function oo(e, t =
|
|
1202
|
+
const zi = /\sid="(\S+)"/g, Oi = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
|
|
1203
|
+
let Fi = 0;
|
|
1204
|
+
function oo(e, t = Oi) {
|
|
1195
1205
|
const n = [];
|
|
1196
1206
|
let r;
|
|
1197
|
-
for (; r =
|
|
1207
|
+
for (; r = zi.exec(e); ) n.push(r[1]);
|
|
1198
1208
|
if (!n.length) return e;
|
|
1199
1209
|
const o = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
|
|
1200
1210
|
return n.forEach((i) => {
|
|
1201
|
-
const s = typeof t == "function" ? t(i) : t + (
|
|
1211
|
+
const s = typeof t == "function" ? t(i) : t + (Fi++).toString(), a = i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1202
1212
|
e = e.replace(new RegExp('([#;"])(' + a + ')([")]|\\.[a-z])', "g"), "$1" + s + o + "$3");
|
|
1203
1213
|
}), e = e.replace(new RegExp(o, "g"), ""), e;
|
|
1204
1214
|
}
|
|
1205
1215
|
const Dn = /* @__PURE__ */ Object.create(null);
|
|
1206
|
-
function
|
|
1216
|
+
function ji(e, t) {
|
|
1207
1217
|
Dn[e] = t;
|
|
1208
1218
|
}
|
|
1209
1219
|
function Ln(e) {
|
|
@@ -1234,15 +1244,15 @@ function io(e, t) {
|
|
|
1234
1244
|
function _n(e) {
|
|
1235
1245
|
return Gn[e];
|
|
1236
1246
|
}
|
|
1237
|
-
const
|
|
1247
|
+
const Pi = () => {
|
|
1238
1248
|
let e;
|
|
1239
1249
|
try {
|
|
1240
1250
|
if (e = fetch, typeof e == "function") return e;
|
|
1241
1251
|
} catch {
|
|
1242
1252
|
}
|
|
1243
1253
|
};
|
|
1244
|
-
let ur =
|
|
1245
|
-
function
|
|
1254
|
+
let ur = Pi();
|
|
1255
|
+
function $i(e, t) {
|
|
1246
1256
|
const n = _n(e);
|
|
1247
1257
|
if (!n) return 0;
|
|
1248
1258
|
let r;
|
|
@@ -1257,11 +1267,11 @@ function ji(e, t) {
|
|
|
1257
1267
|
}
|
|
1258
1268
|
return r;
|
|
1259
1269
|
}
|
|
1260
|
-
function
|
|
1270
|
+
function Hi(e) {
|
|
1261
1271
|
return e === 404;
|
|
1262
1272
|
}
|
|
1263
|
-
const
|
|
1264
|
-
const r = [], o =
|
|
1273
|
+
const Bi = (e, t, n) => {
|
|
1274
|
+
const r = [], o = $i(e, t), i = "icons";
|
|
1265
1275
|
let s = {
|
|
1266
1276
|
type: i,
|
|
1267
1277
|
provider: e,
|
|
@@ -1277,19 +1287,19 @@ const $i = (e, t, n) => {
|
|
|
1277
1287
|
}, a = l.length), s.icons.push(l);
|
|
1278
1288
|
}), r.push(s), r;
|
|
1279
1289
|
};
|
|
1280
|
-
function
|
|
1290
|
+
function Vi(e) {
|
|
1281
1291
|
if (typeof e == "string") {
|
|
1282
1292
|
const t = _n(e);
|
|
1283
1293
|
if (t) return t.path;
|
|
1284
1294
|
}
|
|
1285
1295
|
return "/";
|
|
1286
1296
|
}
|
|
1287
|
-
const
|
|
1297
|
+
const Ui = (e, t, n) => {
|
|
1288
1298
|
if (!ur) {
|
|
1289
1299
|
n("abort", 424);
|
|
1290
1300
|
return;
|
|
1291
1301
|
}
|
|
1292
|
-
let r =
|
|
1302
|
+
let r = Vi(t.provider);
|
|
1293
1303
|
switch (t.type) {
|
|
1294
1304
|
case "icons": {
|
|
1295
1305
|
const i = t.prefix, a = t.icons.join(","), l = new URLSearchParams({ icons: a });
|
|
@@ -1310,7 +1320,7 @@ const Bi = (e, t, n) => {
|
|
|
1310
1320
|
const s = i.status;
|
|
1311
1321
|
if (s !== 200) {
|
|
1312
1322
|
setTimeout(() => {
|
|
1313
|
-
n(
|
|
1323
|
+
n(Hi(s) ? "abort" : "next", s);
|
|
1314
1324
|
});
|
|
1315
1325
|
return;
|
|
1316
1326
|
}
|
|
@@ -1328,9 +1338,9 @@ const Bi = (e, t, n) => {
|
|
|
1328
1338
|
}).catch(() => {
|
|
1329
1339
|
n("next", o);
|
|
1330
1340
|
});
|
|
1331
|
-
},
|
|
1332
|
-
prepare:
|
|
1333
|
-
send:
|
|
1341
|
+
}, Gi = {
|
|
1342
|
+
prepare: Bi,
|
|
1343
|
+
send: Ui
|
|
1334
1344
|
};
|
|
1335
1345
|
function so(e, t) {
|
|
1336
1346
|
e.forEach((n) => {
|
|
@@ -1338,7 +1348,7 @@ function so(e, t) {
|
|
|
1338
1348
|
r && (n.loaderCallbacks = r.filter((o) => o.id !== t));
|
|
1339
1349
|
});
|
|
1340
1350
|
}
|
|
1341
|
-
function
|
|
1351
|
+
function _i(e) {
|
|
1342
1352
|
e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
|
|
1343
1353
|
e.pendingCallbacksFlag = !1;
|
|
1344
1354
|
const t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
|
|
@@ -1367,9 +1377,9 @@ function Ui(e) {
|
|
|
1367
1377
|
});
|
|
1368
1378
|
}));
|
|
1369
1379
|
}
|
|
1370
|
-
let
|
|
1371
|
-
function
|
|
1372
|
-
const r =
|
|
1380
|
+
let Wi = 0;
|
|
1381
|
+
function Yi(e, t, n) {
|
|
1382
|
+
const r = Wi++, o = so.bind(null, n, r);
|
|
1373
1383
|
if (!t.pending.length) return o;
|
|
1374
1384
|
const i = {
|
|
1375
1385
|
id: r,
|
|
@@ -1381,7 +1391,7 @@ function _i(e, t, n) {
|
|
|
1381
1391
|
(s.loaderCallbacks || (s.loaderCallbacks = [])).push(i);
|
|
1382
1392
|
}), o;
|
|
1383
1393
|
}
|
|
1384
|
-
function
|
|
1394
|
+
function qi(e) {
|
|
1385
1395
|
const t = {
|
|
1386
1396
|
loaded: [],
|
|
1387
1397
|
missing: [],
|
|
@@ -1407,14 +1417,14 @@ function Wi(e) {
|
|
|
1407
1417
|
u.push(d);
|
|
1408
1418
|
}), t;
|
|
1409
1419
|
}
|
|
1410
|
-
function
|
|
1420
|
+
function Ki(e, t = !0, n = !1) {
|
|
1411
1421
|
const r = [];
|
|
1412
1422
|
return e.forEach((o) => {
|
|
1413
1423
|
const i = typeof o == "string" ? Kt(o, t, n) : o;
|
|
1414
1424
|
i && r.push(i);
|
|
1415
1425
|
}), r;
|
|
1416
1426
|
}
|
|
1417
|
-
const
|
|
1427
|
+
const Ji = {
|
|
1418
1428
|
resources: [],
|
|
1419
1429
|
index: 0,
|
|
1420
1430
|
timeout: 2e3,
|
|
@@ -1422,7 +1432,7 @@ const qi = {
|
|
|
1422
1432
|
random: !1,
|
|
1423
1433
|
dataAfterTimeout: !1
|
|
1424
1434
|
};
|
|
1425
|
-
function
|
|
1435
|
+
function Xi(e, t, n, r) {
|
|
1426
1436
|
const o = e.resources.length, i = e.random ? Math.floor(Math.random() * o) : e.index;
|
|
1427
1437
|
let s;
|
|
1428
1438
|
if (e.random) {
|
|
@@ -1522,7 +1532,7 @@ function Ki(e, t, n, r) {
|
|
|
1522
1532
|
}
|
|
1523
1533
|
function ao(e) {
|
|
1524
1534
|
const t = {
|
|
1525
|
-
...
|
|
1535
|
+
...Ji,
|
|
1526
1536
|
...e
|
|
1527
1537
|
};
|
|
1528
1538
|
let n = [];
|
|
@@ -1530,7 +1540,7 @@ function ao(e) {
|
|
|
1530
1540
|
n = n.filter((a) => a().status === "pending");
|
|
1531
1541
|
}
|
|
1532
1542
|
function o(a, l, c) {
|
|
1533
|
-
const u =
|
|
1543
|
+
const u = Xi(t, a, l, (d, h) => {
|
|
1534
1544
|
r(), c && c(d, h);
|
|
1535
1545
|
});
|
|
1536
1546
|
return n.push(u), u;
|
|
@@ -1551,7 +1561,7 @@ function ao(e) {
|
|
|
1551
1561
|
function fr() {
|
|
1552
1562
|
}
|
|
1553
1563
|
const hn = /* @__PURE__ */ Object.create(null);
|
|
1554
|
-
function
|
|
1564
|
+
function Qi(e) {
|
|
1555
1565
|
if (!hn[e]) {
|
|
1556
1566
|
const t = _n(e);
|
|
1557
1567
|
if (!t) return;
|
|
@@ -1563,14 +1573,14 @@ function Ji(e) {
|
|
|
1563
1573
|
}
|
|
1564
1574
|
return hn[e];
|
|
1565
1575
|
}
|
|
1566
|
-
function
|
|
1576
|
+
function Zi(e, t, n) {
|
|
1567
1577
|
let r, o;
|
|
1568
1578
|
if (typeof e == "string") {
|
|
1569
1579
|
const i = Ln(e);
|
|
1570
1580
|
if (!i)
|
|
1571
1581
|
return n(void 0, 424), fr;
|
|
1572
1582
|
o = i.send;
|
|
1573
|
-
const s =
|
|
1583
|
+
const s = Qi(e);
|
|
1574
1584
|
s && (r = s.redundancy);
|
|
1575
1585
|
} else {
|
|
1576
1586
|
const i = Un(e);
|
|
@@ -1584,12 +1594,12 @@ function Xi(e, t, n) {
|
|
|
1584
1594
|
}
|
|
1585
1595
|
function hr() {
|
|
1586
1596
|
}
|
|
1587
|
-
function
|
|
1597
|
+
function es(e) {
|
|
1588
1598
|
e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
|
|
1589
|
-
e.iconsLoaderFlag = !1,
|
|
1599
|
+
e.iconsLoaderFlag = !1, _i(e);
|
|
1590
1600
|
}));
|
|
1591
1601
|
}
|
|
1592
|
-
function
|
|
1602
|
+
function ts(e) {
|
|
1593
1603
|
const t = [], n = [];
|
|
1594
1604
|
return e.forEach((r) => {
|
|
1595
1605
|
(r.match(Xr) ? t : n).push(r);
|
|
@@ -1613,7 +1623,7 @@ function pt(e, t, n) {
|
|
|
1613
1623
|
} catch (o) {
|
|
1614
1624
|
console.error(o);
|
|
1615
1625
|
}
|
|
1616
|
-
r(),
|
|
1626
|
+
r(), es(e);
|
|
1617
1627
|
}
|
|
1618
1628
|
function pr(e, t) {
|
|
1619
1629
|
e instanceof Promise ? e.then((n) => {
|
|
@@ -1622,7 +1632,7 @@ function pr(e, t) {
|
|
|
1622
1632
|
t(null);
|
|
1623
1633
|
}) : t(e);
|
|
1624
1634
|
}
|
|
1625
|
-
function
|
|
1635
|
+
function ns(e, t) {
|
|
1626
1636
|
e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
|
|
1627
1637
|
e.iconsQueueFlag = !1;
|
|
1628
1638
|
const { provider: n, prefix: r } = e, o = e.iconsToLoad;
|
|
@@ -1647,7 +1657,7 @@ function es(e, t) {
|
|
|
1647
1657
|
});
|
|
1648
1658
|
return;
|
|
1649
1659
|
}
|
|
1650
|
-
const { valid: s, invalid: a } =
|
|
1660
|
+
const { valid: s, invalid: a } = ts(o);
|
|
1651
1661
|
if (a.length && pt(e, a, null), !s.length) return;
|
|
1652
1662
|
const l = r.match(Xr) ? Ln(n) : null;
|
|
1653
1663
|
if (!l) {
|
|
@@ -1655,14 +1665,14 @@ function es(e, t) {
|
|
|
1655
1665
|
return;
|
|
1656
1666
|
}
|
|
1657
1667
|
l.prepare(n, r, s).forEach((u) => {
|
|
1658
|
-
|
|
1668
|
+
Zi(n, u, (d) => {
|
|
1659
1669
|
pt(e, u.icons, d);
|
|
1660
1670
|
});
|
|
1661
1671
|
});
|
|
1662
1672
|
}));
|
|
1663
1673
|
}
|
|
1664
1674
|
const lo = (e, t) => {
|
|
1665
|
-
const n =
|
|
1675
|
+
const n = Ki(e, !0, Qr()), r = qi(n);
|
|
1666
1676
|
if (!r.pending.length) {
|
|
1667
1677
|
let l = !0;
|
|
1668
1678
|
return t && setTimeout(() => {
|
|
@@ -1684,10 +1694,10 @@ const lo = (e, t) => {
|
|
|
1684
1694
|
g.has(d) || (g.add(d), o[c][u].push(d));
|
|
1685
1695
|
}), i.forEach((l) => {
|
|
1686
1696
|
const c = o[l.provider][l.prefix];
|
|
1687
|
-
c.length &&
|
|
1688
|
-
}), t ?
|
|
1697
|
+
c.length && ns(l, c);
|
|
1698
|
+
}), t ? Yi(t, r, i) : hr;
|
|
1689
1699
|
};
|
|
1690
|
-
function
|
|
1700
|
+
function rs(e, t) {
|
|
1691
1701
|
const n = { ...e };
|
|
1692
1702
|
for (const r in t) {
|
|
1693
1703
|
const o = t[r], i = typeof o;
|
|
@@ -1695,9 +1705,9 @@ function ts(e, t) {
|
|
|
1695
1705
|
}
|
|
1696
1706
|
return n;
|
|
1697
1707
|
}
|
|
1698
|
-
const
|
|
1699
|
-
function
|
|
1700
|
-
t.split(
|
|
1708
|
+
const os = /[\s,]+/;
|
|
1709
|
+
function is(e, t) {
|
|
1710
|
+
t.split(os).forEach((n) => {
|
|
1701
1711
|
switch (n.trim()) {
|
|
1702
1712
|
case "horizontal":
|
|
1703
1713
|
e.hFlip = !0;
|
|
@@ -1708,7 +1718,7 @@ function rs(e, t) {
|
|
|
1708
1718
|
}
|
|
1709
1719
|
});
|
|
1710
1720
|
}
|
|
1711
|
-
function
|
|
1721
|
+
function ss(e, t = 0) {
|
|
1712
1722
|
const n = e.replace(/^-?[0-9.]*/, "");
|
|
1713
1723
|
function r(o) {
|
|
1714
1724
|
for (; o < 0; ) o += 4;
|
|
@@ -1733,40 +1743,40 @@ function os(e, t = 0) {
|
|
|
1733
1743
|
}
|
|
1734
1744
|
return t;
|
|
1735
1745
|
}
|
|
1736
|
-
function
|
|
1746
|
+
function as(e, t) {
|
|
1737
1747
|
let n = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
|
|
1738
1748
|
for (const r in t) n += " " + r + '="' + t[r] + '"';
|
|
1739
1749
|
return '<svg xmlns="http://www.w3.org/2000/svg"' + n + ">" + e + "</svg>";
|
|
1740
1750
|
}
|
|
1741
|
-
function
|
|
1751
|
+
function ls(e) {
|
|
1742
1752
|
return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
|
|
1743
1753
|
}
|
|
1744
|
-
function
|
|
1745
|
-
return "data:image/svg+xml," +
|
|
1754
|
+
function cs(e) {
|
|
1755
|
+
return "data:image/svg+xml," + ls(e);
|
|
1746
1756
|
}
|
|
1747
|
-
function
|
|
1748
|
-
return 'url("' +
|
|
1757
|
+
function ds(e) {
|
|
1758
|
+
return 'url("' + cs(e) + '")';
|
|
1749
1759
|
}
|
|
1750
1760
|
let vt;
|
|
1751
|
-
function
|
|
1761
|
+
function us() {
|
|
1752
1762
|
try {
|
|
1753
1763
|
vt = window.trustedTypes.createPolicy("iconify", { createHTML: (e) => e });
|
|
1754
1764
|
} catch {
|
|
1755
1765
|
vt = null;
|
|
1756
1766
|
}
|
|
1757
1767
|
}
|
|
1758
|
-
function
|
|
1759
|
-
return vt === void 0 &&
|
|
1768
|
+
function fs(e) {
|
|
1769
|
+
return vt === void 0 && us(), vt ? vt.createHTML(e) : e;
|
|
1760
1770
|
}
|
|
1761
1771
|
const co = {
|
|
1762
1772
|
...no,
|
|
1763
1773
|
inline: !1
|
|
1764
|
-
},
|
|
1774
|
+
}, hs = {
|
|
1765
1775
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1766
1776
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1767
1777
|
"aria-hidden": !0,
|
|
1768
1778
|
role: "img"
|
|
1769
|
-
},
|
|
1779
|
+
}, ps = {
|
|
1770
1780
|
display: "inline-block"
|
|
1771
1781
|
}, Tn = {
|
|
1772
1782
|
backgroundColor: "currentColor"
|
|
@@ -1786,16 +1796,16 @@ for (const e in mr) {
|
|
|
1786
1796
|
for (const n in gr)
|
|
1787
1797
|
t[e + n] = gr[n];
|
|
1788
1798
|
}
|
|
1789
|
-
const
|
|
1799
|
+
const gs = {
|
|
1790
1800
|
...co,
|
|
1791
1801
|
inline: !0
|
|
1792
1802
|
};
|
|
1793
1803
|
function vr(e) {
|
|
1794
1804
|
return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
|
|
1795
1805
|
}
|
|
1796
|
-
const
|
|
1797
|
-
const r = t.inline ?
|
|
1798
|
-
...i === "svg" ?
|
|
1806
|
+
const ms = (e, t, n) => {
|
|
1807
|
+
const r = t.inline ? gs : co, o = rs(r, t), i = t.mode || "svg", s = {}, a = t.style || {}, l = {
|
|
1808
|
+
...i === "svg" ? hs : {}
|
|
1799
1809
|
};
|
|
1800
1810
|
if (n) {
|
|
1801
1811
|
const p = Kt(n, !1, !0);
|
|
@@ -1838,7 +1848,7 @@ const ps = (e, t, n) => {
|
|
|
1838
1848
|
break;
|
|
1839
1849
|
// Flip as string: 'horizontal,vertical'
|
|
1840
1850
|
case "flip":
|
|
1841
|
-
typeof m == "string" &&
|
|
1851
|
+
typeof m == "string" && is(o, m);
|
|
1842
1852
|
break;
|
|
1843
1853
|
// Color: copy to style
|
|
1844
1854
|
case "color":
|
|
@@ -1846,7 +1856,7 @@ const ps = (e, t, n) => {
|
|
|
1846
1856
|
break;
|
|
1847
1857
|
// Rotation as string
|
|
1848
1858
|
case "rotate":
|
|
1849
|
-
typeof m == "string" ? o[p] =
|
|
1859
|
+
typeof m == "string" ? o[p] = ss(m) : typeof m == "number" && (o[p] = m);
|
|
1850
1860
|
break;
|
|
1851
1861
|
// Remove aria-hidden
|
|
1852
1862
|
case "ariaHidden":
|
|
@@ -1866,26 +1876,26 @@ const ps = (e, t, n) => {
|
|
|
1866
1876
|
}, Object.assign(l, u);
|
|
1867
1877
|
let p = 0, m = t.id;
|
|
1868
1878
|
return typeof m == "string" && (m = m.replace(/-/g, "_")), l.dangerouslySetInnerHTML = {
|
|
1869
|
-
__html:
|
|
1879
|
+
__html: fs(oo(c.body, m ? () => m + "ID" + p++ : "iconifyReact"))
|
|
1870
1880
|
}, En("svg", l);
|
|
1871
1881
|
}
|
|
1872
|
-
const { body: d, width: h, height: g } = e, k = i === "mask" || (i === "bg" ? !1 : d.indexOf("currentColor") !== -1), y =
|
|
1882
|
+
const { body: d, width: h, height: g } = e, k = i === "mask" || (i === "bg" ? !1 : d.indexOf("currentColor") !== -1), y = as(d, {
|
|
1873
1883
|
...u,
|
|
1874
1884
|
width: h + "",
|
|
1875
1885
|
height: g + ""
|
|
1876
1886
|
});
|
|
1877
1887
|
return l.style = {
|
|
1878
1888
|
...s,
|
|
1879
|
-
"--svg":
|
|
1889
|
+
"--svg": ds(y),
|
|
1880
1890
|
width: vr(u.width),
|
|
1881
1891
|
height: vr(u.height),
|
|
1882
|
-
...
|
|
1892
|
+
...ps,
|
|
1883
1893
|
...k ? Tn : uo,
|
|
1884
1894
|
...a
|
|
1885
1895
|
}, En("span", l);
|
|
1886
1896
|
};
|
|
1887
1897
|
Qr(!0);
|
|
1888
|
-
|
|
1898
|
+
ji("", Gi);
|
|
1889
1899
|
if (typeof document < "u" && typeof window < "u") {
|
|
1890
1900
|
const e = window;
|
|
1891
1901
|
if (e.IconifyPreload !== void 0) {
|
|
@@ -1973,7 +1983,7 @@ function fo(e) {
|
|
|
1973
1983
|
t && u();
|
|
1974
1984
|
}, [e.icon, t]);
|
|
1975
1985
|
const { name: d, data: h } = s;
|
|
1976
|
-
return h ?
|
|
1986
|
+
return h ? ms({
|
|
1977
1987
|
...Vn,
|
|
1978
1988
|
...h
|
|
1979
1989
|
}, e, d) : e.children ? e.children : e.fallback ? e.fallback : En("span", {});
|
|
@@ -1987,7 +1997,7 @@ $n((e, t) => fo({
|
|
|
1987
1997
|
...e,
|
|
1988
1998
|
_ref: t
|
|
1989
1999
|
}));
|
|
1990
|
-
const
|
|
2000
|
+
const vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1991
2001
|
__proto__: null,
|
|
1992
2002
|
Icon: $,
|
|
1993
2003
|
addAPIProvider: io,
|
|
@@ -1998,7 +2008,7 @@ const gs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1998
2008
|
loadIcons: lo,
|
|
1999
2009
|
replaceIDs: oo
|
|
2000
2010
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2001
|
-
class
|
|
2011
|
+
class ys {
|
|
2002
2012
|
constructor() {
|
|
2003
2013
|
this.isProtectedFlag = !1, this.timeout = null, this.timeoutDuration = 5e3;
|
|
2004
2014
|
}
|
|
@@ -2034,15 +2044,15 @@ class ms {
|
|
|
2034
2044
|
return this.isProtectedFlag;
|
|
2035
2045
|
}
|
|
2036
2046
|
}
|
|
2037
|
-
const
|
|
2047
|
+
const bs = new ys(), ws = Vr({ prefix: "sc" });
|
|
2038
2048
|
function Ie(...e) {
|
|
2039
|
-
return
|
|
2049
|
+
return ws(Br(e));
|
|
2040
2050
|
}
|
|
2041
2051
|
const ho = F.createContext({ variant: "transparent" });
|
|
2042
|
-
function
|
|
2052
|
+
function xs() {
|
|
2043
2053
|
return F.useContext(ho);
|
|
2044
2054
|
}
|
|
2045
|
-
const
|
|
2055
|
+
const ks = Ur("", {
|
|
2046
2056
|
variants: {
|
|
2047
2057
|
variant: {
|
|
2048
2058
|
transparent: "sc:bg-transparent",
|
|
@@ -2055,12 +2065,12 @@ const ws = Ur("", {
|
|
|
2055
2065
|
}
|
|
2056
2066
|
}), po = F.forwardRef(
|
|
2057
2067
|
({ className: e, variant: t = "default", asChild: n = !1, children: r, ...o }, i) => {
|
|
2058
|
-
const s = n ?
|
|
2059
|
-
return /* @__PURE__ */ f(ho.Provider, { value: { variant: t ?? "default" }, children: /* @__PURE__ */ f(s, { ref: i, className: Ie(
|
|
2068
|
+
const s = n ? vi : "div";
|
|
2069
|
+
return /* @__PURE__ */ f(ho.Provider, { value: { variant: t ?? "default" }, children: /* @__PURE__ */ f(s, { ref: i, className: Ie(ks({ variant: t }), e), ...o, children: r }) });
|
|
2060
2070
|
}
|
|
2061
2071
|
);
|
|
2062
2072
|
po.displayName = "Surface";
|
|
2063
|
-
const
|
|
2073
|
+
const Cs = Ur(
|
|
2064
2074
|
"sc:inline-flex sc:items-center sc:justify-center sc:gap-2 sc:rounded-button sc:text-sm sc:transition-colors sc:focus-visible:outline-none sc:disabled:pointer-events-none sc:disabled:opacity-50 sc:font-button",
|
|
2065
2075
|
{
|
|
2066
2076
|
variants: {
|
|
@@ -2107,7 +2117,7 @@ const xs = Ur(
|
|
|
2107
2117
|
}
|
|
2108
2118
|
), st = F.forwardRef(
|
|
2109
2119
|
({ className: e, variant: t, size: n, onPress: r, isPending: o, onClick: i, disabled: s, selected: a, children: l, ...c }, u) => {
|
|
2110
|
-
const { variant: d } =
|
|
2120
|
+
const { variant: d } = xs(), h = d === "default", g = d === "secondary", k = (p) => {
|
|
2111
2121
|
r && r(p), i && i(p);
|
|
2112
2122
|
}, y = {
|
|
2113
2123
|
secondary: t === "secondary" && (g ? "sc:bg-[var(--color-default-on-surface)] sc:hover:bg-[var(--color-default-on-surface)]/80" : h ? "sc:dark:bg-[var(--color-default-on-surface)] sc:dark:hover:bg-[var(--color-default-on-surface)]/80" : !1),
|
|
@@ -2119,7 +2129,7 @@ const xs = Ur(
|
|
|
2119
2129
|
"button",
|
|
2120
2130
|
{
|
|
2121
2131
|
className: Ie(
|
|
2122
|
-
|
|
2132
|
+
Cs({ variant: t, size: n }),
|
|
2123
2133
|
y.secondary,
|
|
2124
2134
|
y.field,
|
|
2125
2135
|
y.ghost,
|
|
@@ -2167,7 +2177,7 @@ function mo({
|
|
|
2167
2177
|
}, [a]), /* @__PURE__ */ f(go.Provider, { value: { open: a, onOpenChange: l }, children: r });
|
|
2168
2178
|
}
|
|
2169
2179
|
mo.displayName = "Drawer";
|
|
2170
|
-
const
|
|
2180
|
+
const Ss = F.forwardRef(
|
|
2171
2181
|
({ asChild: e, onClick: t, children: n, ...r }, o) => {
|
|
2172
2182
|
const { onOpenChange: i } = Wn(), s = (a) => {
|
|
2173
2183
|
t == null || t(a), i(!0);
|
|
@@ -2180,8 +2190,8 @@ const ks = F.forwardRef(
|
|
|
2180
2190
|
) : /* @__PURE__ */ f("button", { ref: o, onClick: s, ...r, children: n });
|
|
2181
2191
|
}
|
|
2182
2192
|
);
|
|
2183
|
-
|
|
2184
|
-
const
|
|
2193
|
+
Ss.displayName = "DrawerTrigger";
|
|
2194
|
+
const Es = F.forwardRef(
|
|
2185
2195
|
({ asChild: e, onClick: t, children: n, ...r }, o) => {
|
|
2186
2196
|
const { onOpenChange: i } = Wn(), s = (a) => {
|
|
2187
2197
|
t == null || t(a), i(!1);
|
|
@@ -2194,7 +2204,7 @@ const Cs = F.forwardRef(
|
|
|
2194
2204
|
) : /* @__PURE__ */ f("button", { ref: o, onClick: s, ...r, children: n });
|
|
2195
2205
|
}
|
|
2196
2206
|
);
|
|
2197
|
-
|
|
2207
|
+
Es.displayName = "DrawerClose";
|
|
2198
2208
|
const vo = F.forwardRef(
|
|
2199
2209
|
({
|
|
2200
2210
|
className: e,
|
|
@@ -2514,7 +2524,7 @@ const bo = F.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(
|
|
|
2514
2524
|
}
|
|
2515
2525
|
));
|
|
2516
2526
|
bo.displayName = "DrawerDescription";
|
|
2517
|
-
const
|
|
2527
|
+
const As = ot.Provider, Ms = ot.Root, Jt = ot.Trigger, At = F.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ f(ot.Portal, { children: /* @__PURE__ */ f(
|
|
2518
2528
|
ot.Content,
|
|
2519
2529
|
{
|
|
2520
2530
|
ref: r,
|
|
@@ -2529,14 +2539,14 @@ const Ss = ot.Provider, Es = ot.Root, Jt = ot.Trigger, At = F.forwardRef(({ clas
|
|
|
2529
2539
|
}
|
|
2530
2540
|
) }));
|
|
2531
2541
|
At.displayName = ot.Content.displayName;
|
|
2532
|
-
const
|
|
2542
|
+
const Ds = ({ children: e, delayDuration: t, delay: n, ...r }) => /* @__PURE__ */ f(As, { children: /* @__PURE__ */ f(Ms, { delayDuration: n ?? t ?? 200, ...r, children: e }) }), Yn = Object.assign(Ds, {
|
|
2533
2543
|
Trigger: Jt,
|
|
2534
2544
|
Content: At
|
|
2535
|
-
}),
|
|
2545
|
+
}), Ls = Vr({ prefix: "sc" });
|
|
2536
2546
|
function Rn(...e) {
|
|
2537
|
-
return
|
|
2547
|
+
return Ls(Br(e));
|
|
2538
2548
|
}
|
|
2539
|
-
const
|
|
2549
|
+
const Ts = {
|
|
2540
2550
|
"gravity-ui": 1.2,
|
|
2541
2551
|
// Thinner strokes need +20% (20px → 24px)
|
|
2542
2552
|
lucide: 1,
|
|
@@ -2554,11 +2564,11 @@ const Ds = {
|
|
|
2554
2564
|
// Filled variants are heavy
|
|
2555
2565
|
"simple-icons": 0.95,
|
|
2556
2566
|
"eos-icons": 1
|
|
2557
|
-
},
|
|
2567
|
+
}, Rs = 1, Is = {
|
|
2558
2568
|
"gravity-ui:arrow-rotate-left": { x: 4, y: 4 },
|
|
2559
2569
|
"gravity-ui:arrow-rotate-right": { x: -4, y: 4 },
|
|
2560
2570
|
"gravity-ui:sparkles": { x: 2, y: -2 }
|
|
2561
|
-
},
|
|
2571
|
+
}, Ns = {
|
|
2562
2572
|
xs: 12,
|
|
2563
2573
|
sm: 16,
|
|
2564
2574
|
md: 20,
|
|
@@ -2566,18 +2576,18 @@ const Ds = {
|
|
|
2566
2576
|
xl: 32,
|
|
2567
2577
|
toolbar: { mobile: 24, desktop: 20 }
|
|
2568
2578
|
};
|
|
2569
|
-
function
|
|
2579
|
+
function zs(e) {
|
|
2570
2580
|
const t = e.indexOf(":");
|
|
2571
2581
|
return t === -1 ? "" : e.substring(0, t);
|
|
2572
2582
|
}
|
|
2573
|
-
function
|
|
2574
|
-
return
|
|
2583
|
+
function Os(e) {
|
|
2584
|
+
return Ts[e] ?? Rs;
|
|
2575
2585
|
}
|
|
2576
|
-
function
|
|
2577
|
-
return
|
|
2586
|
+
function Fs(e) {
|
|
2587
|
+
return Is[e] ?? null;
|
|
2578
2588
|
}
|
|
2579
2589
|
function pn(e, t) {
|
|
2580
|
-
const n =
|
|
2590
|
+
const n = Os(t);
|
|
2581
2591
|
return Math.round(e * n);
|
|
2582
2592
|
}
|
|
2583
2593
|
const wo = ({
|
|
@@ -2585,7 +2595,7 @@ const wo = ({
|
|
|
2585
2595
|
size: t = "md",
|
|
2586
2596
|
className: n
|
|
2587
2597
|
}) => {
|
|
2588
|
-
const r =
|
|
2598
|
+
const r = zs(e), o = Ns[t], i = Fs(e);
|
|
2589
2599
|
if (typeof o == "object") {
|
|
2590
2600
|
const l = pn(o.mobile, r), c = pn(o.desktop, r), u = i ? {
|
|
2591
2601
|
x: i.x * l / 20,
|
|
@@ -2771,7 +2781,7 @@ const G = {
|
|
|
2771
2781
|
n && /* @__PURE__ */ f("span", { className: "sc:ml-auto sc:text-sm sc:text-text-muted", children: n }),
|
|
2772
2782
|
r && !n && /* @__PURE__ */ f("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "sc:ml-auto sc:shrink-0", children: /* @__PURE__ */ f("path", { d: "M13 4L6 11L3 8", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
2773
2783
|
] });
|
|
2774
|
-
}, gn = Qe("useArtboards"),
|
|
2784
|
+
}, gn = Qe("useArtboards"), js = () => {
|
|
2775
2785
|
const {
|
|
2776
2786
|
artboards: e,
|
|
2777
2787
|
artboardManager: t,
|
|
@@ -2902,7 +2912,7 @@ function Qt(e) {
|
|
|
2902
2912
|
return t.current == null ? void 0 : t.current(...r);
|
|
2903
2913
|
}, []);
|
|
2904
2914
|
}
|
|
2905
|
-
function
|
|
2915
|
+
function Ps() {
|
|
2906
2916
|
const e = V(null), t = N((r, o) => {
|
|
2907
2917
|
e.current = setInterval(r, o);
|
|
2908
2918
|
}, []), n = N(() => {
|
|
@@ -2970,7 +2980,7 @@ function ko(e) {
|
|
|
2970
2980
|
};
|
|
2971
2981
|
}
|
|
2972
2982
|
const nt = /* @__PURE__ */ ko(1), Ct = /* @__PURE__ */ ko(-1);
|
|
2973
|
-
function
|
|
2983
|
+
function $s(e) {
|
|
2974
2984
|
return "clientX" in e && "clientY" in e;
|
|
2975
2985
|
}
|
|
2976
2986
|
function Jn(e) {
|
|
@@ -2981,7 +2991,7 @@ function Jn(e) {
|
|
|
2981
2991
|
} = Ce(e.target);
|
|
2982
2992
|
return t && e instanceof t;
|
|
2983
2993
|
}
|
|
2984
|
-
function
|
|
2994
|
+
function Hs(e) {
|
|
2985
2995
|
if (!e)
|
|
2986
2996
|
return !1;
|
|
2987
2997
|
const {
|
|
@@ -2990,7 +3000,7 @@ function Ps(e) {
|
|
|
2990
3000
|
return t && e instanceof t;
|
|
2991
3001
|
}
|
|
2992
3002
|
function Gt(e) {
|
|
2993
|
-
if (
|
|
3003
|
+
if (Hs(e)) {
|
|
2994
3004
|
if (e.touches && e.touches.length) {
|
|
2995
3005
|
const {
|
|
2996
3006
|
clientX: t,
|
|
@@ -3011,7 +3021,7 @@ function Gt(e) {
|
|
|
3011
3021
|
};
|
|
3012
3022
|
}
|
|
3013
3023
|
}
|
|
3014
|
-
return
|
|
3024
|
+
return $s(e) ? {
|
|
3015
3025
|
x: e.clientX,
|
|
3016
3026
|
y: e.clientY
|
|
3017
3027
|
} : null;
|
|
@@ -3056,23 +3066,23 @@ const St = /* @__PURE__ */ Object.freeze({
|
|
|
3056
3066
|
}
|
|
3057
3067
|
}
|
|
3058
3068
|
}), yr = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
|
|
3059
|
-
function
|
|
3069
|
+
function Bs(e) {
|
|
3060
3070
|
return e.matches(yr) ? e : e.querySelector(yr);
|
|
3061
3071
|
}
|
|
3062
|
-
const
|
|
3072
|
+
const Vs = {
|
|
3063
3073
|
display: "none"
|
|
3064
3074
|
};
|
|
3065
|
-
function
|
|
3075
|
+
function Us(e) {
|
|
3066
3076
|
let {
|
|
3067
3077
|
id: t,
|
|
3068
3078
|
value: n
|
|
3069
3079
|
} = e;
|
|
3070
3080
|
return ne.createElement("div", {
|
|
3071
3081
|
id: t,
|
|
3072
|
-
style:
|
|
3082
|
+
style: Vs
|
|
3073
3083
|
}, n);
|
|
3074
3084
|
}
|
|
3075
|
-
function
|
|
3085
|
+
function Gs(e) {
|
|
3076
3086
|
let {
|
|
3077
3087
|
id: t,
|
|
3078
3088
|
announcement: n,
|
|
@@ -3100,7 +3110,7 @@ function Vs(e) {
|
|
|
3100
3110
|
"aria-atomic": !0
|
|
3101
3111
|
}, n);
|
|
3102
3112
|
}
|
|
3103
|
-
function
|
|
3113
|
+
function _s() {
|
|
3104
3114
|
const [e, t] = B("");
|
|
3105
3115
|
return {
|
|
3106
3116
|
announce: N((r) => {
|
|
@@ -3110,7 +3120,7 @@ function Us() {
|
|
|
3110
3120
|
};
|
|
3111
3121
|
}
|
|
3112
3122
|
const Co = /* @__PURE__ */ Xe(null);
|
|
3113
|
-
function
|
|
3123
|
+
function Ws(e) {
|
|
3114
3124
|
const t = Be(Co);
|
|
3115
3125
|
Y(() => {
|
|
3116
3126
|
if (!t)
|
|
@@ -3118,7 +3128,7 @@ function Gs(e) {
|
|
|
3118
3128
|
return t(e);
|
|
3119
3129
|
}, [e, t]);
|
|
3120
3130
|
}
|
|
3121
|
-
function
|
|
3131
|
+
function Ys() {
|
|
3122
3132
|
const [e] = B(() => /* @__PURE__ */ new Set()), t = N((r) => (e.add(r), () => e.delete(r)), [e]);
|
|
3123
3133
|
return [N((r) => {
|
|
3124
3134
|
let {
|
|
@@ -3131,13 +3141,13 @@ function _s() {
|
|
|
3131
3141
|
});
|
|
3132
3142
|
}, [e]), t];
|
|
3133
3143
|
}
|
|
3134
|
-
const
|
|
3144
|
+
const qs = {
|
|
3135
3145
|
draggable: `
|
|
3136
3146
|
To pick up a draggable item, press the space bar.
|
|
3137
3147
|
While dragging, use the arrow keys to move the item.
|
|
3138
3148
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
3139
3149
|
`
|
|
3140
|
-
},
|
|
3150
|
+
}, Ks = {
|
|
3141
3151
|
onDragStart(e) {
|
|
3142
3152
|
let {
|
|
3143
3153
|
active: t
|
|
@@ -3165,20 +3175,20 @@ const Ws = {
|
|
|
3165
3175
|
return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
|
|
3166
3176
|
}
|
|
3167
3177
|
};
|
|
3168
|
-
function
|
|
3178
|
+
function Js(e) {
|
|
3169
3179
|
let {
|
|
3170
|
-
announcements: t =
|
|
3180
|
+
announcements: t = Ks,
|
|
3171
3181
|
container: n,
|
|
3172
3182
|
hiddenTextDescribedById: r,
|
|
3173
|
-
screenReaderInstructions: o =
|
|
3183
|
+
screenReaderInstructions: o = qs
|
|
3174
3184
|
} = e;
|
|
3175
3185
|
const {
|
|
3176
3186
|
announce: i,
|
|
3177
3187
|
announcement: s
|
|
3178
|
-
} =
|
|
3188
|
+
} = _s(), a = Zt("DndLiveRegion"), [l, c] = B(!1);
|
|
3179
3189
|
if (Y(() => {
|
|
3180
3190
|
c(!0);
|
|
3181
|
-
}, []),
|
|
3191
|
+
}, []), Ws(J(() => ({
|
|
3182
3192
|
onDragStart(d) {
|
|
3183
3193
|
let {
|
|
3184
3194
|
active: h
|
|
@@ -3229,10 +3239,10 @@ function qs(e) {
|
|
|
3229
3239
|
}
|
|
3230
3240
|
}), [i, t])), !l)
|
|
3231
3241
|
return null;
|
|
3232
|
-
const u = ne.createElement(ne.Fragment, null, ne.createElement(
|
|
3242
|
+
const u = ne.createElement(ne.Fragment, null, ne.createElement(Us, {
|
|
3233
3243
|
id: r,
|
|
3234
3244
|
value: o.draggable
|
|
3235
|
-
}), ne.createElement(
|
|
3245
|
+
}), ne.createElement(Gs, {
|
|
3236
3246
|
id: a,
|
|
3237
3247
|
announcement: s
|
|
3238
3248
|
}));
|
|
@@ -3254,7 +3264,7 @@ function br(e, t) {
|
|
|
3254
3264
|
[e, t]
|
|
3255
3265
|
);
|
|
3256
3266
|
}
|
|
3257
|
-
function
|
|
3267
|
+
function Xs() {
|
|
3258
3268
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
3259
3269
|
t[n] = arguments[n];
|
|
3260
3270
|
return J(
|
|
@@ -3270,7 +3280,7 @@ const Fe = /* @__PURE__ */ Object.freeze({
|
|
|
3270
3280
|
function Xn(e, t) {
|
|
3271
3281
|
return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2));
|
|
3272
3282
|
}
|
|
3273
|
-
function
|
|
3283
|
+
function Qs(e, t) {
|
|
3274
3284
|
const n = Gt(e);
|
|
3275
3285
|
if (!n)
|
|
3276
3286
|
return "0 0";
|
|
@@ -3292,7 +3302,7 @@ function Qn(e, t) {
|
|
|
3292
3302
|
} = t;
|
|
3293
3303
|
return n - r;
|
|
3294
3304
|
}
|
|
3295
|
-
function
|
|
3305
|
+
function Zs(e, t) {
|
|
3296
3306
|
let {
|
|
3297
3307
|
data: {
|
|
3298
3308
|
value: n
|
|
@@ -3337,7 +3347,7 @@ function wr(e, t, n) {
|
|
|
3337
3347
|
y: n + e.height * 0.5
|
|
3338
3348
|
};
|
|
3339
3349
|
}
|
|
3340
|
-
const
|
|
3350
|
+
const ea = (e) => {
|
|
3341
3351
|
let {
|
|
3342
3352
|
collisionRect: t,
|
|
3343
3353
|
droppableRects: n,
|
|
@@ -3360,7 +3370,7 @@ const Qs = (e) => {
|
|
|
3360
3370
|
}
|
|
3361
3371
|
}
|
|
3362
3372
|
return i.sort(Qn);
|
|
3363
|
-
},
|
|
3373
|
+
}, ta = (e) => {
|
|
3364
3374
|
let {
|
|
3365
3375
|
collisionRect: t,
|
|
3366
3376
|
droppableRects: n,
|
|
@@ -3384,7 +3394,7 @@ const Qs = (e) => {
|
|
|
3384
3394
|
}
|
|
3385
3395
|
return i.sort(Qn);
|
|
3386
3396
|
};
|
|
3387
|
-
function
|
|
3397
|
+
function na(e, t) {
|
|
3388
3398
|
const n = Math.max(t.top, e.top), r = Math.max(t.left, e.left), o = Math.min(t.left + t.width, e.left + e.width), i = Math.min(t.top + t.height, e.top + e.height), s = o - r, a = i - n;
|
|
3389
3399
|
if (r < o && n < i) {
|
|
3390
3400
|
const l = t.width * t.height, c = e.width * e.height, u = s * a, d = u / (l + c - u);
|
|
@@ -3392,7 +3402,7 @@ function ea(e, t) {
|
|
|
3392
3402
|
}
|
|
3393
3403
|
return 0;
|
|
3394
3404
|
}
|
|
3395
|
-
const
|
|
3405
|
+
const ra = (e) => {
|
|
3396
3406
|
let {
|
|
3397
3407
|
collisionRect: t,
|
|
3398
3408
|
droppableRects: n,
|
|
@@ -3404,7 +3414,7 @@ const ta = (e) => {
|
|
|
3404
3414
|
id: s
|
|
3405
3415
|
} = i, a = n.get(s);
|
|
3406
3416
|
if (a) {
|
|
3407
|
-
const l =
|
|
3417
|
+
const l = na(a, t);
|
|
3408
3418
|
l > 0 && o.push({
|
|
3409
3419
|
id: s,
|
|
3410
3420
|
data: {
|
|
@@ -3414,9 +3424,9 @@ const ta = (e) => {
|
|
|
3414
3424
|
});
|
|
3415
3425
|
}
|
|
3416
3426
|
}
|
|
3417
|
-
return o.sort(
|
|
3427
|
+
return o.sort(Zs);
|
|
3418
3428
|
};
|
|
3419
|
-
function
|
|
3429
|
+
function oa(e, t) {
|
|
3420
3430
|
const {
|
|
3421
3431
|
top: n,
|
|
3422
3432
|
left: r,
|
|
@@ -3425,7 +3435,7 @@ function na(e, t) {
|
|
|
3425
3435
|
} = t;
|
|
3426
3436
|
return n <= e.y && e.y <= o && r <= e.x && e.x <= i;
|
|
3427
3437
|
}
|
|
3428
|
-
const
|
|
3438
|
+
const ia = (e) => {
|
|
3429
3439
|
let {
|
|
3430
3440
|
droppableContainers: t,
|
|
3431
3441
|
droppableRects: n,
|
|
@@ -3438,7 +3448,7 @@ const ra = (e) => {
|
|
|
3438
3448
|
const {
|
|
3439
3449
|
id: s
|
|
3440
3450
|
} = i, a = n.get(s);
|
|
3441
|
-
if (a &&
|
|
3451
|
+
if (a && oa(r, a)) {
|
|
3442
3452
|
const c = Nn(a).reduce((d, h) => d + Xn(r, h), 0), u = Number((c / 4).toFixed(4));
|
|
3443
3453
|
o.push({
|
|
3444
3454
|
id: s,
|
|
@@ -3451,7 +3461,7 @@ const ra = (e) => {
|
|
|
3451
3461
|
}
|
|
3452
3462
|
return o.sort(Qn);
|
|
3453
3463
|
};
|
|
3454
|
-
function
|
|
3464
|
+
function sa(e, t, n) {
|
|
3455
3465
|
return {
|
|
3456
3466
|
...e,
|
|
3457
3467
|
scaleX: t && n ? t.width / n.width : 1,
|
|
@@ -3464,7 +3474,7 @@ function Eo(e, t) {
|
|
|
3464
3474
|
y: e.top - t.top
|
|
3465
3475
|
} : Fe;
|
|
3466
3476
|
}
|
|
3467
|
-
function
|
|
3477
|
+
function aa(e) {
|
|
3468
3478
|
return function(n) {
|
|
3469
3479
|
for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
|
|
3470
3480
|
o[i - 1] = arguments[i];
|
|
@@ -3479,7 +3489,7 @@ function ia(e) {
|
|
|
3479
3489
|
});
|
|
3480
3490
|
};
|
|
3481
3491
|
}
|
|
3482
|
-
const
|
|
3492
|
+
const la = /* @__PURE__ */ aa(1);
|
|
3483
3493
|
function Ao(e) {
|
|
3484
3494
|
if (e.startsWith("matrix3d(")) {
|
|
3485
3495
|
const t = e.slice(9, -1).split(/, /);
|
|
@@ -3500,7 +3510,7 @@ function Ao(e) {
|
|
|
3500
3510
|
}
|
|
3501
3511
|
return null;
|
|
3502
3512
|
}
|
|
3503
|
-
function
|
|
3513
|
+
function ca(e, t, n) {
|
|
3504
3514
|
const r = Ao(t);
|
|
3505
3515
|
if (!r)
|
|
3506
3516
|
return e;
|
|
@@ -3519,18 +3529,18 @@ function aa(e, t, n) {
|
|
|
3519
3529
|
left: l
|
|
3520
3530
|
};
|
|
3521
3531
|
}
|
|
3522
|
-
const
|
|
3532
|
+
const da = {
|
|
3523
3533
|
ignoreTransform: !1
|
|
3524
3534
|
};
|
|
3525
3535
|
function Lt(e, t) {
|
|
3526
|
-
t === void 0 && (t =
|
|
3536
|
+
t === void 0 && (t = da);
|
|
3527
3537
|
let n = e.getBoundingClientRect();
|
|
3528
3538
|
if (t.ignoreTransform) {
|
|
3529
3539
|
const {
|
|
3530
3540
|
transform: c,
|
|
3531
3541
|
transformOrigin: u
|
|
3532
3542
|
} = Ce(e).getComputedStyle(e);
|
|
3533
|
-
c && (n =
|
|
3543
|
+
c && (n = ca(n, c, u));
|
|
3534
3544
|
}
|
|
3535
3545
|
const {
|
|
3536
3546
|
top: r,
|
|
@@ -3554,7 +3564,7 @@ function xr(e) {
|
|
|
3554
3564
|
ignoreTransform: !0
|
|
3555
3565
|
});
|
|
3556
3566
|
}
|
|
3557
|
-
function
|
|
3567
|
+
function ua(e) {
|
|
3558
3568
|
const t = e.innerWidth, n = e.innerHeight;
|
|
3559
3569
|
return {
|
|
3560
3570
|
top: 0,
|
|
@@ -3565,10 +3575,10 @@ function ca(e) {
|
|
|
3565
3575
|
height: n
|
|
3566
3576
|
};
|
|
3567
3577
|
}
|
|
3568
|
-
function
|
|
3578
|
+
function fa(e, t) {
|
|
3569
3579
|
return t === void 0 && (t = Ce(e).getComputedStyle(e)), t.position === "fixed";
|
|
3570
3580
|
}
|
|
3571
|
-
function
|
|
3581
|
+
function ha(e, t) {
|
|
3572
3582
|
t === void 0 && (t = Ce(e).getComputedStyle(e));
|
|
3573
3583
|
const n = /(auto|scroll|overlay)/;
|
|
3574
3584
|
return ["overflow", "overflowX", "overflowY"].some((o) => {
|
|
@@ -3586,7 +3596,7 @@ function en(e, t) {
|
|
|
3586
3596
|
if (!Mt(o) || xo(o) || n.includes(o))
|
|
3587
3597
|
return n;
|
|
3588
3598
|
const i = Ce(e).getComputedStyle(o);
|
|
3589
|
-
return o !== e &&
|
|
3599
|
+
return o !== e && ha(o, i) && n.push(o), fa(o, i) ? n : r(o.parentNode);
|
|
3590
3600
|
}
|
|
3591
3601
|
return e ? r(e) : n;
|
|
3592
3602
|
}
|
|
@@ -3639,18 +3649,18 @@ function Ro(e) {
|
|
|
3639
3649
|
minScroll: t
|
|
3640
3650
|
};
|
|
3641
3651
|
}
|
|
3642
|
-
const
|
|
3652
|
+
const pa = {
|
|
3643
3653
|
x: 0.2,
|
|
3644
3654
|
y: 0.2
|
|
3645
3655
|
};
|
|
3646
|
-
function
|
|
3656
|
+
function ga(e, t, n, r, o) {
|
|
3647
3657
|
let {
|
|
3648
3658
|
top: i,
|
|
3649
3659
|
left: s,
|
|
3650
3660
|
right: a,
|
|
3651
3661
|
bottom: l
|
|
3652
3662
|
} = n;
|
|
3653
|
-
r === void 0 && (r = 10), o === void 0 && (o =
|
|
3663
|
+
r === void 0 && (r = 10), o === void 0 && (o = pa);
|
|
3654
3664
|
const {
|
|
3655
3665
|
isTop: c,
|
|
3656
3666
|
isBottom: u,
|
|
@@ -3671,7 +3681,7 @@ function ha(e, t, n, r, o) {
|
|
|
3671
3681
|
speed: k
|
|
3672
3682
|
};
|
|
3673
3683
|
}
|
|
3674
|
-
function
|
|
3684
|
+
function ma(e) {
|
|
3675
3685
|
if (e === document.scrollingElement) {
|
|
3676
3686
|
const {
|
|
3677
3687
|
innerWidth: i,
|
|
@@ -3704,10 +3714,10 @@ function pa(e) {
|
|
|
3704
3714
|
function Io(e) {
|
|
3705
3715
|
return e.reduce((t, n) => nt(t, zn(n)), Fe);
|
|
3706
3716
|
}
|
|
3707
|
-
function
|
|
3717
|
+
function va(e) {
|
|
3708
3718
|
return e.reduce((t, n) => t + Do(n), 0);
|
|
3709
3719
|
}
|
|
3710
|
-
function
|
|
3720
|
+
function ya(e) {
|
|
3711
3721
|
return e.reduce((t, n) => t + Lo(n), 0);
|
|
3712
3722
|
}
|
|
3713
3723
|
function No(e, t) {
|
|
@@ -3724,7 +3734,7 @@ function No(e, t) {
|
|
|
3724
3734
|
inline: "center"
|
|
3725
3735
|
});
|
|
3726
3736
|
}
|
|
3727
|
-
const
|
|
3737
|
+
const ba = [["x", ["left", "right"], va], ["y", ["top", "bottom"], ya]];
|
|
3728
3738
|
class Zn {
|
|
3729
3739
|
constructor(t, n) {
|
|
3730
3740
|
this.rect = void 0, this.width = void 0, this.height = void 0, this.top = void 0, this.bottom = void 0, this.right = void 0, this.left = void 0;
|
|
@@ -3732,7 +3742,7 @@ class Zn {
|
|
|
3732
3742
|
this.rect = {
|
|
3733
3743
|
...t
|
|
3734
3744
|
}, this.width = t.width, this.height = t.height;
|
|
3735
|
-
for (const [i, s, a] of
|
|
3745
|
+
for (const [i, s, a] of ba)
|
|
3736
3746
|
for (const l of s)
|
|
3737
3747
|
Object.defineProperty(this, l, {
|
|
3738
3748
|
get: () => {
|
|
@@ -3760,7 +3770,7 @@ class yt {
|
|
|
3760
3770
|
(o = this.target) == null || o.addEventListener(t, n, r), this.listeners.push([t, n, r]);
|
|
3761
3771
|
}
|
|
3762
3772
|
}
|
|
3763
|
-
function
|
|
3773
|
+
function wa(e) {
|
|
3764
3774
|
const {
|
|
3765
3775
|
EventTarget: t
|
|
3766
3776
|
} = Ce(e);
|
|
@@ -3777,7 +3787,7 @@ var Ne;
|
|
|
3777
3787
|
function kr(e) {
|
|
3778
3788
|
e.preventDefault();
|
|
3779
3789
|
}
|
|
3780
|
-
function
|
|
3790
|
+
function xa(e) {
|
|
3781
3791
|
e.stopPropagation();
|
|
3782
3792
|
}
|
|
3783
3793
|
var U;
|
|
@@ -3788,7 +3798,7 @@ const zo = {
|
|
|
3788
3798
|
start: [U.Space, U.Enter],
|
|
3789
3799
|
cancel: [U.Esc],
|
|
3790
3800
|
end: [U.Space, U.Enter, U.Tab]
|
|
3791
|
-
},
|
|
3801
|
+
}, ka = (e, t) => {
|
|
3792
3802
|
let {
|
|
3793
3803
|
currentCoordinates: n
|
|
3794
3804
|
} = t;
|
|
@@ -3843,7 +3853,7 @@ class er {
|
|
|
3843
3853
|
options: o
|
|
3844
3854
|
} = this.props, {
|
|
3845
3855
|
keyboardCodes: i = zo,
|
|
3846
|
-
coordinateGetter: s =
|
|
3856
|
+
coordinateGetter: s = ka,
|
|
3847
3857
|
scrollBehavior: a = "smooth"
|
|
3848
3858
|
} = o, {
|
|
3849
3859
|
code: l
|
|
@@ -3883,7 +3893,7 @@ class er {
|
|
|
3883
3893
|
isBottom: L,
|
|
3884
3894
|
maxScroll: R,
|
|
3885
3895
|
minScroll: b
|
|
3886
|
-
} = Ro(y), E =
|
|
3896
|
+
} = Ro(y), E = ma(y), v = {
|
|
3887
3897
|
x: Math.min(p === U.Right ? E.right - E.width / 2 : E.right, Math.max(p === U.Right ? E.left : E.left + E.width / 2, d.x)),
|
|
3888
3898
|
y: Math.min(p === U.Down ? E.bottom - E.height / 2 : E.bottom, Math.max(p === U.Down ? E.top : E.top + E.height / 2, d.y))
|
|
3889
3899
|
}, D = p === U.Right && !S || p === U.Left && !M, w = p === U.Down && !L || p === U.Up && !m;
|
|
@@ -3973,7 +3983,7 @@ function Sr(e) {
|
|
|
3973
3983
|
class tr {
|
|
3974
3984
|
constructor(t, n, r) {
|
|
3975
3985
|
var o;
|
|
3976
|
-
r === void 0 && (r =
|
|
3986
|
+
r === void 0 && (r = wa(t.event.target)), this.props = void 0, this.events = void 0, this.autoScrollEnabled = !0, this.document = void 0, this.activated = !1, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = t, this.events = n;
|
|
3977
3987
|
const {
|
|
3978
3988
|
event: i
|
|
3979
3989
|
} = t, {
|
|
@@ -4027,7 +4037,7 @@ class tr {
|
|
|
4027
4037
|
} = this, {
|
|
4028
4038
|
onStart: n
|
|
4029
4039
|
} = this.props;
|
|
4030
|
-
t && (this.activated = !0, this.documentListeners.add(Ne.Click,
|
|
4040
|
+
t && (this.activated = !0, this.documentListeners.add(Ne.Click, xa, {
|
|
4031
4041
|
capture: !0
|
|
4032
4042
|
}), this.removeTextSelection(), this.documentListeners.add(Ne.SelectionChange, this.removeTextSelection), n(t));
|
|
4033
4043
|
}
|
|
@@ -4082,7 +4092,7 @@ class tr {
|
|
|
4082
4092
|
(t = this.document.getSelection()) == null || t.removeAllRanges();
|
|
4083
4093
|
}
|
|
4084
4094
|
}
|
|
4085
|
-
const
|
|
4095
|
+
const Ca = {
|
|
4086
4096
|
cancel: {
|
|
4087
4097
|
name: "pointercancel"
|
|
4088
4098
|
},
|
|
@@ -4098,7 +4108,7 @@ class nr extends tr {
|
|
|
4098
4108
|
const {
|
|
4099
4109
|
event: n
|
|
4100
4110
|
} = t, r = lt(n.target);
|
|
4101
|
-
super(t,
|
|
4111
|
+
super(t, Ca, r);
|
|
4102
4112
|
}
|
|
4103
4113
|
}
|
|
4104
4114
|
nr.activators = [{
|
|
@@ -4114,7 +4124,7 @@ nr.activators = [{
|
|
|
4114
4124
|
}), !0);
|
|
4115
4125
|
}
|
|
4116
4126
|
}];
|
|
4117
|
-
const
|
|
4127
|
+
const Sa = {
|
|
4118
4128
|
move: {
|
|
4119
4129
|
name: "mousemove"
|
|
4120
4130
|
},
|
|
@@ -4126,12 +4136,12 @@ var On;
|
|
|
4126
4136
|
(function(e) {
|
|
4127
4137
|
e[e.RightClick = 2] = "RightClick";
|
|
4128
4138
|
})(On || (On = {}));
|
|
4129
|
-
class
|
|
4139
|
+
class Ea extends tr {
|
|
4130
4140
|
constructor(t) {
|
|
4131
|
-
super(t,
|
|
4141
|
+
super(t, Sa, lt(t.event.target));
|
|
4132
4142
|
}
|
|
4133
4143
|
}
|
|
4134
|
-
|
|
4144
|
+
Ea.activators = [{
|
|
4135
4145
|
eventName: "onMouseDown",
|
|
4136
4146
|
handler: (e, t) => {
|
|
4137
4147
|
let {
|
|
@@ -4155,7 +4165,7 @@ const bn = {
|
|
|
4155
4165
|
name: "touchend"
|
|
4156
4166
|
}
|
|
4157
4167
|
};
|
|
4158
|
-
class
|
|
4168
|
+
class Aa extends tr {
|
|
4159
4169
|
constructor(t) {
|
|
4160
4170
|
super(t, bn);
|
|
4161
4171
|
}
|
|
@@ -4170,7 +4180,7 @@ class Sa extends tr {
|
|
|
4170
4180
|
}
|
|
4171
4181
|
}
|
|
4172
4182
|
}
|
|
4173
|
-
|
|
4183
|
+
Aa.activators = [{
|
|
4174
4184
|
eventName: "onTouchStart",
|
|
4175
4185
|
handler: (e, t) => {
|
|
4176
4186
|
let {
|
|
@@ -4194,7 +4204,7 @@ var Wt;
|
|
|
4194
4204
|
(function(e) {
|
|
4195
4205
|
e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
4196
4206
|
})(Wt || (Wt = {}));
|
|
4197
|
-
function
|
|
4207
|
+
function Ma(e) {
|
|
4198
4208
|
let {
|
|
4199
4209
|
acceleration: t,
|
|
4200
4210
|
activator: n = bt.Pointer,
|
|
@@ -4209,10 +4219,10 @@ function Ea(e) {
|
|
|
4209
4219
|
delta: d,
|
|
4210
4220
|
threshold: h
|
|
4211
4221
|
} = e;
|
|
4212
|
-
const g =
|
|
4222
|
+
const g = La({
|
|
4213
4223
|
delta: d,
|
|
4214
4224
|
disabled: !i
|
|
4215
|
-
}), [k, y] =
|
|
4225
|
+
}), [k, y] = Ps(), p = V({
|
|
4216
4226
|
x: 0,
|
|
4217
4227
|
y: 0
|
|
4218
4228
|
}), m = V({
|
|
@@ -4252,7 +4262,7 @@ function Ea(e) {
|
|
|
4252
4262
|
const {
|
|
4253
4263
|
direction: D,
|
|
4254
4264
|
speed: w
|
|
4255
|
-
} =
|
|
4265
|
+
} = ga(b, v, S, t, h);
|
|
4256
4266
|
for (const A of ["x", "y"])
|
|
4257
4267
|
g[A][D[A]] || (w[A] = 0, D[A] = 0);
|
|
4258
4268
|
if (w.x > 0 || w.y > 0) {
|
|
@@ -4289,7 +4299,7 @@ function Ea(e) {
|
|
|
4289
4299
|
]
|
|
4290
4300
|
);
|
|
4291
4301
|
}
|
|
4292
|
-
const
|
|
4302
|
+
const Da = {
|
|
4293
4303
|
x: {
|
|
4294
4304
|
[pe.Backward]: !1,
|
|
4295
4305
|
[pe.Forward]: !1
|
|
@@ -4299,7 +4309,7 @@ const Aa = {
|
|
|
4299
4309
|
[pe.Forward]: !1
|
|
4300
4310
|
}
|
|
4301
4311
|
};
|
|
4302
|
-
function
|
|
4312
|
+
function La(e) {
|
|
4303
4313
|
let {
|
|
4304
4314
|
delta: t,
|
|
4305
4315
|
disabled: n
|
|
@@ -4307,7 +4317,7 @@ function Ma(e) {
|
|
|
4307
4317
|
const r = Ut(t);
|
|
4308
4318
|
return Dt((o) => {
|
|
4309
4319
|
if (n || !r || !o)
|
|
4310
|
-
return
|
|
4320
|
+
return Da;
|
|
4311
4321
|
const i = {
|
|
4312
4322
|
x: Math.sign(t.x - r.x),
|
|
4313
4323
|
y: Math.sign(t.y - r.y)
|
|
@@ -4324,14 +4334,14 @@ function Ma(e) {
|
|
|
4324
4334
|
};
|
|
4325
4335
|
}, [n, t, r]);
|
|
4326
4336
|
}
|
|
4327
|
-
function
|
|
4337
|
+
function Ta(e, t) {
|
|
4328
4338
|
const n = t != null ? e.get(t) : void 0, r = n ? n.node.current : null;
|
|
4329
4339
|
return Dt((o) => {
|
|
4330
4340
|
var i;
|
|
4331
4341
|
return t == null ? null : (i = r ?? o) != null ? i : null;
|
|
4332
4342
|
}, [r, t]);
|
|
4333
4343
|
}
|
|
4334
|
-
function
|
|
4344
|
+
function Ra(e, t) {
|
|
4335
4345
|
return J(() => e.reduce((n, r) => {
|
|
4336
4346
|
const {
|
|
4337
4347
|
sensor: o
|
|
@@ -4351,7 +4361,7 @@ var Fn;
|
|
|
4351
4361
|
e.Optimized = "optimized";
|
|
4352
4362
|
})(Fn || (Fn = {}));
|
|
4353
4363
|
const Er = /* @__PURE__ */ new Map();
|
|
4354
|
-
function
|
|
4364
|
+
function Ia(e, t) {
|
|
4355
4365
|
let {
|
|
4356
4366
|
dragging: n,
|
|
4357
4367
|
dependencies: r,
|
|
@@ -4423,10 +4433,10 @@ function Ta(e, t) {
|
|
|
4423
4433
|
function rr(e, t) {
|
|
4424
4434
|
return Dt((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
|
|
4425
4435
|
}
|
|
4426
|
-
function
|
|
4436
|
+
function Na(e, t) {
|
|
4427
4437
|
return rr(e, t);
|
|
4428
4438
|
}
|
|
4429
|
-
function
|
|
4439
|
+
function za(e) {
|
|
4430
4440
|
let {
|
|
4431
4441
|
callback: t,
|
|
4432
4442
|
disabled: n
|
|
@@ -4460,11 +4470,11 @@ function tn(e) {
|
|
|
4460
4470
|
);
|
|
4461
4471
|
return Y(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
|
|
4462
4472
|
}
|
|
4463
|
-
function
|
|
4473
|
+
function Oa(e) {
|
|
4464
4474
|
return new Zn(Lt(e), e);
|
|
4465
4475
|
}
|
|
4466
4476
|
function Ar(e, t, n) {
|
|
4467
|
-
t === void 0 && (t =
|
|
4477
|
+
t === void 0 && (t = Oa);
|
|
4468
4478
|
const [r, o] = B(null);
|
|
4469
4479
|
function i() {
|
|
4470
4480
|
o((l) => {
|
|
@@ -4478,7 +4488,7 @@ function Ar(e, t, n) {
|
|
|
4478
4488
|
return JSON.stringify(l) === JSON.stringify(u) ? l : u;
|
|
4479
4489
|
});
|
|
4480
4490
|
}
|
|
4481
|
-
const s =
|
|
4491
|
+
const s = za({
|
|
4482
4492
|
callback(l) {
|
|
4483
4493
|
if (e)
|
|
4484
4494
|
for (const c of l) {
|
|
@@ -4502,18 +4512,18 @@ function Ar(e, t, n) {
|
|
|
4502
4512
|
})) : (a == null || a.disconnect(), s == null || s.disconnect());
|
|
4503
4513
|
}, [e]), r;
|
|
4504
4514
|
}
|
|
4505
|
-
function
|
|
4515
|
+
function Fa(e) {
|
|
4506
4516
|
const t = rr(e);
|
|
4507
4517
|
return Eo(e, t);
|
|
4508
4518
|
}
|
|
4509
4519
|
const Mr = [];
|
|
4510
|
-
function
|
|
4520
|
+
function ja(e) {
|
|
4511
4521
|
const t = V(e), n = Dt((r) => e ? r && r !== Mr && e && t.current && e.parentNode === t.current.parentNode ? r : en(e) : Mr, [e]);
|
|
4512
4522
|
return Y(() => {
|
|
4513
4523
|
t.current = e;
|
|
4514
4524
|
}, [e]), n;
|
|
4515
4525
|
}
|
|
4516
|
-
function
|
|
4526
|
+
function Pa(e) {
|
|
4517
4527
|
const [t, n] = B(null), r = V(e), o = N((i) => {
|
|
4518
4528
|
const s = vn(i.target);
|
|
4519
4529
|
s && n((a) => a ? (a.set(s, zn(s)), new Map(a)) : null);
|
|
@@ -4555,7 +4565,7 @@ function Dr(e, t) {
|
|
|
4555
4565
|
r && !n.current && (n.current = e), !r && n.current && (n.current = null);
|
|
4556
4566
|
}, [e]), n.current ? Ct(e, n.current) : Fe;
|
|
4557
4567
|
}
|
|
4558
|
-
function
|
|
4568
|
+
function $a(e) {
|
|
4559
4569
|
Y(
|
|
4560
4570
|
() => {
|
|
4561
4571
|
if (!Xt)
|
|
@@ -4581,7 +4591,7 @@ function ja(e) {
|
|
|
4581
4591
|
})
|
|
4582
4592
|
);
|
|
4583
4593
|
}
|
|
4584
|
-
function
|
|
4594
|
+
function Ha(e, t) {
|
|
4585
4595
|
return J(() => e.reduce((n, r) => {
|
|
4586
4596
|
let {
|
|
4587
4597
|
eventName: o,
|
|
@@ -4593,10 +4603,10 @@ function Pa(e, t) {
|
|
|
4593
4603
|
}, {}), [e, t]);
|
|
4594
4604
|
}
|
|
4595
4605
|
function Oo(e) {
|
|
4596
|
-
return J(() => e ?
|
|
4606
|
+
return J(() => e ? ua(e) : null, [e]);
|
|
4597
4607
|
}
|
|
4598
4608
|
const Lr = [];
|
|
4599
|
-
function
|
|
4609
|
+
function Ba(e, t) {
|
|
4600
4610
|
t === void 0 && (t = Lt);
|
|
4601
4611
|
const [n] = e, r = Oo(n ? Ce(n) : null), [o, i] = B(Lr);
|
|
4602
4612
|
function s() {
|
|
@@ -4617,7 +4627,7 @@ function Fo(e) {
|
|
|
4617
4627
|
const t = e.children[0];
|
|
4618
4628
|
return Mt(t) ? t : e;
|
|
4619
4629
|
}
|
|
4620
|
-
function
|
|
4630
|
+
function Va(e) {
|
|
4621
4631
|
let {
|
|
4622
4632
|
measure: t
|
|
4623
4633
|
} = e;
|
|
@@ -4648,13 +4658,13 @@ function Ha(e) {
|
|
|
4648
4658
|
setRef: l
|
|
4649
4659
|
}), [n, a, l]);
|
|
4650
4660
|
}
|
|
4651
|
-
const
|
|
4661
|
+
const Ua = [{
|
|
4652
4662
|
sensor: nr,
|
|
4653
4663
|
options: {}
|
|
4654
4664
|
}, {
|
|
4655
4665
|
sensor: er,
|
|
4656
4666
|
options: {}
|
|
4657
|
-
}],
|
|
4667
|
+
}], Ga = {
|
|
4658
4668
|
current: {}
|
|
4659
4669
|
}, Ht = {
|
|
4660
4670
|
draggable: {
|
|
@@ -4690,7 +4700,7 @@ class wt extends Map {
|
|
|
4690
4700
|
return (n = (r = this.get(t)) == null ? void 0 : r.node.current) != null ? n : void 0;
|
|
4691
4701
|
}
|
|
4692
4702
|
}
|
|
4693
|
-
const
|
|
4703
|
+
const _a = {
|
|
4694
4704
|
activatorEvent: null,
|
|
4695
4705
|
active: null,
|
|
4696
4706
|
activeNode: null,
|
|
@@ -4726,8 +4736,8 @@ const Ua = {
|
|
|
4726
4736
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
4727
4737
|
over: null,
|
|
4728
4738
|
measureDroppableContainers: _t
|
|
4729
|
-
}, Tt = /* @__PURE__ */ Xe(jo), Po = /* @__PURE__ */ Xe(
|
|
4730
|
-
function
|
|
4739
|
+
}, Tt = /* @__PURE__ */ Xe(jo), Po = /* @__PURE__ */ Xe(_a);
|
|
4740
|
+
function Wa() {
|
|
4731
4741
|
return {
|
|
4732
4742
|
draggable: {
|
|
4733
4743
|
active: null,
|
|
@@ -4746,7 +4756,7 @@ function Ga() {
|
|
|
4746
4756
|
}
|
|
4747
4757
|
};
|
|
4748
4758
|
}
|
|
4749
|
-
function
|
|
4759
|
+
function Ya(e, t) {
|
|
4750
4760
|
switch (t.type) {
|
|
4751
4761
|
case ce.DragStart:
|
|
4752
4762
|
return {
|
|
@@ -4839,7 +4849,7 @@ function _a(e, t) {
|
|
|
4839
4849
|
return e;
|
|
4840
4850
|
}
|
|
4841
4851
|
}
|
|
4842
|
-
function
|
|
4852
|
+
function qa(e) {
|
|
4843
4853
|
let {
|
|
4844
4854
|
disabled: t
|
|
4845
4855
|
} = e;
|
|
@@ -4865,7 +4875,7 @@ function Wa(e) {
|
|
|
4865
4875
|
for (const u of [l.current, c.current]) {
|
|
4866
4876
|
if (!u)
|
|
4867
4877
|
continue;
|
|
4868
|
-
const d =
|
|
4878
|
+
const d = Bs(u);
|
|
4869
4879
|
if (d) {
|
|
4870
4880
|
d.focus();
|
|
4871
4881
|
break;
|
|
@@ -4885,7 +4895,7 @@ function $o(e, t) {
|
|
|
4885
4895
|
...r
|
|
4886
4896
|
}), n) : n;
|
|
4887
4897
|
}
|
|
4888
|
-
function
|
|
4898
|
+
function Ka(e) {
|
|
4889
4899
|
return J(
|
|
4890
4900
|
() => ({
|
|
4891
4901
|
draggable: {
|
|
@@ -4905,7 +4915,7 @@ function Ya(e) {
|
|
|
4905
4915
|
[e == null ? void 0 : e.draggable, e == null ? void 0 : e.droppable, e == null ? void 0 : e.dragOverlay]
|
|
4906
4916
|
);
|
|
4907
4917
|
}
|
|
4908
|
-
function
|
|
4918
|
+
function Ja(e) {
|
|
4909
4919
|
let {
|
|
4910
4920
|
activeNode: t,
|
|
4911
4921
|
measure: n,
|
|
@@ -4948,20 +4958,20 @@ var Ke;
|
|
|
4948
4958
|
(function(e) {
|
|
4949
4959
|
e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
|
|
4950
4960
|
})(Ke || (Ke = {}));
|
|
4951
|
-
const
|
|
4961
|
+
const Xa = /* @__PURE__ */ ei(function(t) {
|
|
4952
4962
|
var n, r, o, i;
|
|
4953
4963
|
let {
|
|
4954
4964
|
id: s,
|
|
4955
4965
|
accessibility: a,
|
|
4956
4966
|
autoScroll: l = !0,
|
|
4957
4967
|
children: c,
|
|
4958
|
-
sensors: u =
|
|
4959
|
-
collisionDetection: d =
|
|
4968
|
+
sensors: u = Ua,
|
|
4969
|
+
collisionDetection: d = ra,
|
|
4960
4970
|
measuring: h,
|
|
4961
4971
|
modifiers: g,
|
|
4962
4972
|
...k
|
|
4963
4973
|
} = t;
|
|
4964
|
-
const y = ti(
|
|
4974
|
+
const y = ti(Ya, void 0, Wa), [p, m] = y, [S, M] = Ys(), [L, R] = B(Ke.Uninitialized), b = L === Ke.Initialized, {
|
|
4965
4975
|
draggable: {
|
|
4966
4976
|
active: E,
|
|
4967
4977
|
nodes: v,
|
|
@@ -4978,19 +4988,19 @@ const Ka = /* @__PURE__ */ ei(function(t) {
|
|
|
4978
4988
|
return E != null ? {
|
|
4979
4989
|
id: E,
|
|
4980
4990
|
// It's possible for the active node to unmount while dragging
|
|
4981
|
-
data: (we = A == null ? void 0 : A.data) != null ? we :
|
|
4991
|
+
data: (we = A == null ? void 0 : A.data) != null ? we : Ga,
|
|
4982
4992
|
rect: T
|
|
4983
4993
|
} : null;
|
|
4984
|
-
}, [E, A]), W = V(null), [ae, _] = B(null), [X, q] = B(null), te = kt(k, Object.values(k)), ge = Zt("DndDescribedBy", s), xe = J(() => w.getEnabled(), [w]), ie =
|
|
4994
|
+
}, [E, A]), W = V(null), [ae, _] = B(null), [X, q] = B(null), te = kt(k, Object.values(k)), ge = Zt("DndDescribedBy", s), xe = J(() => w.getEnabled(), [w]), ie = Ka(h), {
|
|
4985
4995
|
droppableRects: de,
|
|
4986
4996
|
measureDroppableContainers: je,
|
|
4987
4997
|
measuringScheduled: ze
|
|
4988
|
-
} =
|
|
4998
|
+
} = Ia(xe, {
|
|
4989
4999
|
dragging: b,
|
|
4990
5000
|
dependencies: [D.x, D.y],
|
|
4991
5001
|
config: ie.droppable
|
|
4992
|
-
}), le =
|
|
4993
|
-
|
|
5002
|
+
}), le = Ta(v, E), De = J(() => X ? Gt(X) : null, [X]), ee = Zo(), se = Na(le, ie.draggable.measure);
|
|
5003
|
+
Ja({
|
|
4994
5004
|
activeNode: E != null ? v.get(E) : null,
|
|
4995
5005
|
config: ee.layoutShiftCompensation,
|
|
4996
5006
|
initialRect: se,
|
|
@@ -5010,9 +5020,9 @@ const Ka = /* @__PURE__ */ ei(function(t) {
|
|
|
5010
5020
|
over: null,
|
|
5011
5021
|
scrollableAncestors: [],
|
|
5012
5022
|
scrollAdjustedTranslate: null
|
|
5013
|
-
}), Ze = w.getNodeFor((n = ve.current.over) == null ? void 0 : n.id), ue =
|
|
5023
|
+
}), Ze = w.getNodeFor((n = ve.current.over) == null ? void 0 : n.id), ue = Va({
|
|
5014
5024
|
measure: ie.dragOverlay.measure
|
|
5015
|
-
}), Ve = (r = ue.nodeRef.current) != null ? r : le, Oe = b ? (o = ue.rect) != null ? o : P : null, x = !!(ue.nodeRef.current && ue.rect), C =
|
|
5025
|
+
}), Ve = (r = ue.nodeRef.current) != null ? r : le, Oe = b ? (o = ue.rect) != null ? o : P : null, x = !!(ue.nodeRef.current && ue.rect), C = Fa(x ? null : P), I = Oo(Ve ? Ce(Ve) : null), z = ja(b ? Ze ?? le : null), Z = Ba(z), H = $o(g, {
|
|
5016
5026
|
transform: {
|
|
5017
5027
|
x: D.x - C.x,
|
|
5018
5028
|
y: D.y - C.y,
|
|
@@ -5029,13 +5039,13 @@ const Ka = /* @__PURE__ */ ei(function(t) {
|
|
|
5029
5039
|
scrollableAncestors: z,
|
|
5030
5040
|
scrollableAncestorRects: Z,
|
|
5031
5041
|
windowRect: I
|
|
5032
|
-
}), Q = De ? nt(De, D) : null, fe =
|
|
5042
|
+
}), Q = De ? nt(De, D) : null, fe = Pa(z), Le = Dr(fe), oe = Dr(fe, [P]), Se = nt(H, Le), ye = Oe ? la(Oe, H) : null, K = O && ye ? d({
|
|
5033
5043
|
active: O,
|
|
5034
5044
|
collisionRect: ye,
|
|
5035
5045
|
droppableRects: de,
|
|
5036
5046
|
droppableContainers: xe,
|
|
5037
5047
|
pointerCoordinates: Q
|
|
5038
|
-
}) : null, he = So(K, "id"), [be, Rt] = B(null), on = x ? H : nt(H, oe), It =
|
|
5048
|
+
}) : null, he = So(K, "id"), [be, Rt] = B(null), on = x ? H : nt(H, oe), It = sa(on, (i = be == null ? void 0 : be.rect) != null ? i : null, P), ct = V(null), Nt = N(
|
|
5039
5049
|
(we, Ee) => {
|
|
5040
5050
|
let {
|
|
5041
5051
|
sensor: Ae,
|
|
@@ -5175,8 +5185,8 @@ const Ka = /* @__PURE__ */ ei(function(t) {
|
|
|
5175
5185
|
we(Ae, Ee.options, Pe) === !0 && (Te.dndKit = {
|
|
5176
5186
|
capturedBy: Ee.sensor
|
|
5177
5187
|
}, W.current = We, Nt(Ae, Ee));
|
|
5178
|
-
}, [v, Nt]), Ot =
|
|
5179
|
-
|
|
5188
|
+
}, [v, Nt]), Ot = Ra(u, zt);
|
|
5189
|
+
$a(u), _e(() => {
|
|
5180
5190
|
P && L === Ke.Initializing && R(Ke.Initialized);
|
|
5181
5191
|
}, [P, L]), Y(
|
|
5182
5192
|
() => {
|
|
@@ -5265,7 +5275,7 @@ const Ka = /* @__PURE__ */ ei(function(t) {
|
|
|
5265
5275
|
initial: Oe,
|
|
5266
5276
|
translated: ye
|
|
5267
5277
|
};
|
|
5268
|
-
}, [O, le, K, ye, v, Ve, Oe, de, w, be, z, Se]),
|
|
5278
|
+
}, [O, le, K, ye, v, Ve, Oe, de, w, be, z, Se]), Ma({
|
|
5269
5279
|
...ee,
|
|
5270
5280
|
delta: D,
|
|
5271
5281
|
draggingRect: ye,
|
|
@@ -5312,9 +5322,9 @@ const Ka = /* @__PURE__ */ ei(function(t) {
|
|
|
5312
5322
|
value: Xo
|
|
5313
5323
|
}, ne.createElement(nn.Provider, {
|
|
5314
5324
|
value: It
|
|
5315
|
-
}, c)), ne.createElement(
|
|
5325
|
+
}, c)), ne.createElement(qa, {
|
|
5316
5326
|
disabled: (a == null ? void 0 : a.restoreFocus) === !1
|
|
5317
|
-
})), ne.createElement(
|
|
5327
|
+
})), ne.createElement(Js, {
|
|
5318
5328
|
...a,
|
|
5319
5329
|
hiddenTextDescribedById: ge
|
|
5320
5330
|
}));
|
|
@@ -5327,15 +5337,15 @@ const Ka = /* @__PURE__ */ ei(function(t) {
|
|
|
5327
5337
|
enabled: Ae
|
|
5328
5338
|
};
|
|
5329
5339
|
}
|
|
5330
|
-
}),
|
|
5331
|
-
function
|
|
5340
|
+
}), Qa = /* @__PURE__ */ Xe(null), Tr = "button", Za = "Draggable";
|
|
5341
|
+
function el(e) {
|
|
5332
5342
|
let {
|
|
5333
5343
|
id: t,
|
|
5334
5344
|
data: n,
|
|
5335
5345
|
disabled: r = !1,
|
|
5336
5346
|
attributes: o
|
|
5337
5347
|
} = e;
|
|
5338
|
-
const i = Zt(
|
|
5348
|
+
const i = Zt(Za), {
|
|
5339
5349
|
activators: s,
|
|
5340
5350
|
activatorEvent: a,
|
|
5341
5351
|
active: l,
|
|
@@ -5347,7 +5357,7 @@ function Qa(e) {
|
|
|
5347
5357
|
role: g = Tr,
|
|
5348
5358
|
roleDescription: k = "draggable",
|
|
5349
5359
|
tabIndex: y = 0
|
|
5350
|
-
} = o ?? {}, p = (l == null ? void 0 : l.id) === t, m = Be(p ? nn :
|
|
5360
|
+
} = o ?? {}, p = (l == null ? void 0 : l.id) === t, m = Be(p ? nn : Qa), [S, M] = Vt(), [L, R] = Vt(), b = Ha(s, t), E = kt(n);
|
|
5351
5361
|
_e(
|
|
5352
5362
|
() => (d.set(t, {
|
|
5353
5363
|
id: t,
|
|
@@ -5384,10 +5394,10 @@ function Qa(e) {
|
|
|
5384
5394
|
transform: m
|
|
5385
5395
|
};
|
|
5386
5396
|
}
|
|
5387
|
-
function
|
|
5397
|
+
function tl() {
|
|
5388
5398
|
return Be(Po);
|
|
5389
5399
|
}
|
|
5390
|
-
const
|
|
5400
|
+
const nl = "Droppable", rl = {
|
|
5391
5401
|
timeout: 25
|
|
5392
5402
|
};
|
|
5393
5403
|
function Ho(e) {
|
|
@@ -5397,7 +5407,7 @@ function Ho(e) {
|
|
|
5397
5407
|
id: r,
|
|
5398
5408
|
resizeObserverConfig: o
|
|
5399
5409
|
} = e;
|
|
5400
|
-
const i = Zt(
|
|
5410
|
+
const i = Zt(nl), {
|
|
5401
5411
|
active: s,
|
|
5402
5412
|
dispatch: a,
|
|
5403
5413
|
over: l,
|
|
@@ -5409,7 +5419,7 @@ function Ho(e) {
|
|
|
5409
5419
|
updateMeasurementsFor: y,
|
|
5410
5420
|
timeout: p
|
|
5411
5421
|
} = {
|
|
5412
|
-
...
|
|
5422
|
+
...rl,
|
|
5413
5423
|
...o
|
|
5414
5424
|
}, m = kt(y ?? r), S = N(
|
|
5415
5425
|
() => {
|
|
@@ -5465,7 +5475,7 @@ function Ho(e) {
|
|
|
5465
5475
|
setNodeRef: b
|
|
5466
5476
|
};
|
|
5467
5477
|
}
|
|
5468
|
-
function
|
|
5478
|
+
function ol(e) {
|
|
5469
5479
|
let {
|
|
5470
5480
|
animation: t,
|
|
5471
5481
|
children: n
|
|
@@ -5486,26 +5496,26 @@ function nl(e) {
|
|
|
5486
5496
|
ref: s
|
|
5487
5497
|
}) : null);
|
|
5488
5498
|
}
|
|
5489
|
-
const
|
|
5499
|
+
const il = {
|
|
5490
5500
|
x: 0,
|
|
5491
5501
|
y: 0,
|
|
5492
5502
|
scaleX: 1,
|
|
5493
5503
|
scaleY: 1
|
|
5494
5504
|
};
|
|
5495
|
-
function
|
|
5505
|
+
function sl(e) {
|
|
5496
5506
|
let {
|
|
5497
5507
|
children: t
|
|
5498
5508
|
} = e;
|
|
5499
5509
|
return ne.createElement(Tt.Provider, {
|
|
5500
5510
|
value: jo
|
|
5501
5511
|
}, ne.createElement(nn.Provider, {
|
|
5502
|
-
value:
|
|
5512
|
+
value: il
|
|
5503
5513
|
}, t));
|
|
5504
5514
|
}
|
|
5505
|
-
const
|
|
5515
|
+
const al = {
|
|
5506
5516
|
position: "fixed",
|
|
5507
5517
|
touchAction: "none"
|
|
5508
|
-
},
|
|
5518
|
+
}, ll = (e) => Jn(e) ? "transform 250ms ease" : void 0, cl = /* @__PURE__ */ $n((e, t) => {
|
|
5509
5519
|
let {
|
|
5510
5520
|
as: n,
|
|
5511
5521
|
activatorEvent: r,
|
|
@@ -5515,7 +5525,7 @@ const il = {
|
|
|
5515
5525
|
rect: a,
|
|
5516
5526
|
style: l,
|
|
5517
5527
|
transform: c,
|
|
5518
|
-
transition: u =
|
|
5528
|
+
transition: u = ll
|
|
5519
5529
|
} = e;
|
|
5520
5530
|
if (!a)
|
|
5521
5531
|
return null;
|
|
@@ -5524,13 +5534,13 @@ const il = {
|
|
|
5524
5534
|
scaleX: 1,
|
|
5525
5535
|
scaleY: 1
|
|
5526
5536
|
}, h = {
|
|
5527
|
-
...
|
|
5537
|
+
...al,
|
|
5528
5538
|
width: a.width,
|
|
5529
5539
|
height: a.height,
|
|
5530
5540
|
top: a.top,
|
|
5531
5541
|
left: a.left,
|
|
5532
5542
|
transform: St.Transform.toString(d),
|
|
5533
|
-
transformOrigin: o && r ?
|
|
5543
|
+
transformOrigin: o && r ? Qs(r, a) : void 0,
|
|
5534
5544
|
transition: typeof u == "function" ? u(r) : u,
|
|
5535
5545
|
...l
|
|
5536
5546
|
};
|
|
@@ -5539,7 +5549,7 @@ const il = {
|
|
|
5539
5549
|
style: h,
|
|
5540
5550
|
ref: t
|
|
5541
5551
|
}, i);
|
|
5542
|
-
}),
|
|
5552
|
+
}), dl = (e) => (t) => {
|
|
5543
5553
|
let {
|
|
5544
5554
|
active: n,
|
|
5545
5555
|
dragOverlay: r
|
|
@@ -5559,7 +5569,7 @@ const il = {
|
|
|
5559
5569
|
n.node.style.setProperty(l, c);
|
|
5560
5570
|
s != null && s.active && n.node.classList.remove(s.active);
|
|
5561
5571
|
};
|
|
5562
|
-
},
|
|
5572
|
+
}, ul = (e) => {
|
|
5563
5573
|
let {
|
|
5564
5574
|
transform: {
|
|
5565
5575
|
initial: t,
|
|
@@ -5571,11 +5581,11 @@ const il = {
|
|
|
5571
5581
|
}, {
|
|
5572
5582
|
transform: St.Transform.toString(n)
|
|
5573
5583
|
}];
|
|
5574
|
-
},
|
|
5584
|
+
}, fl = {
|
|
5575
5585
|
duration: 250,
|
|
5576
5586
|
easing: "ease",
|
|
5577
|
-
keyframes:
|
|
5578
|
-
sideEffects: /* @__PURE__ */
|
|
5587
|
+
keyframes: ul,
|
|
5588
|
+
sideEffects: /* @__PURE__ */ dl({
|
|
5579
5589
|
styles: {
|
|
5580
5590
|
active: {
|
|
5581
5591
|
opacity: "0"
|
|
@@ -5583,7 +5593,7 @@ const il = {
|
|
|
5583
5593
|
}
|
|
5584
5594
|
})
|
|
5585
5595
|
};
|
|
5586
|
-
function
|
|
5596
|
+
function hl(e) {
|
|
5587
5597
|
let {
|
|
5588
5598
|
config: t,
|
|
5589
5599
|
draggableNodes: n,
|
|
@@ -5607,7 +5617,7 @@ function ul(e) {
|
|
|
5607
5617
|
} = Ce(s).getComputedStyle(s), d = Ao(u);
|
|
5608
5618
|
if (!d)
|
|
5609
5619
|
return;
|
|
5610
|
-
const h = typeof t == "function" ? t :
|
|
5620
|
+
const h = typeof t == "function" ? t : pl(t);
|
|
5611
5621
|
return No(l, o.draggable.measure), h({
|
|
5612
5622
|
active: {
|
|
5613
5623
|
id: i,
|
|
@@ -5626,14 +5636,14 @@ function ul(e) {
|
|
|
5626
5636
|
});
|
|
5627
5637
|
});
|
|
5628
5638
|
}
|
|
5629
|
-
function
|
|
5639
|
+
function pl(e) {
|
|
5630
5640
|
const {
|
|
5631
5641
|
duration: t,
|
|
5632
5642
|
easing: n,
|
|
5633
5643
|
sideEffects: r,
|
|
5634
5644
|
keyframes: o
|
|
5635
5645
|
} = {
|
|
5636
|
-
...
|
|
5646
|
+
...fl,
|
|
5637
5647
|
...e
|
|
5638
5648
|
};
|
|
5639
5649
|
return (i) => {
|
|
@@ -5683,13 +5693,13 @@ function fl(e) {
|
|
|
5683
5693
|
};
|
|
5684
5694
|
}
|
|
5685
5695
|
let Rr = 0;
|
|
5686
|
-
function
|
|
5696
|
+
function gl(e) {
|
|
5687
5697
|
return J(() => {
|
|
5688
5698
|
if (e != null)
|
|
5689
5699
|
return Rr++, Rr;
|
|
5690
5700
|
}, [e]);
|
|
5691
5701
|
}
|
|
5692
|
-
const
|
|
5702
|
+
const ml = /* @__PURE__ */ ne.memo((e) => {
|
|
5693
5703
|
let {
|
|
5694
5704
|
adjustScale: t = !1,
|
|
5695
5705
|
children: n,
|
|
@@ -5714,7 +5724,7 @@ const pl = /* @__PURE__ */ ne.memo((e) => {
|
|
|
5714
5724
|
scrollableAncestors: M,
|
|
5715
5725
|
scrollableAncestorRects: L,
|
|
5716
5726
|
windowRect: R
|
|
5717
|
-
} =
|
|
5727
|
+
} = tl(), b = Be(nn), E = gl(d == null ? void 0 : d.id), v = $o(s, {
|
|
5718
5728
|
activatorEvent: u,
|
|
5719
5729
|
active: d,
|
|
5720
5730
|
activeNodeRect: h,
|
|
@@ -5726,15 +5736,15 @@ const pl = /* @__PURE__ */ ne.memo((e) => {
|
|
|
5726
5736
|
scrollableAncestorRects: L,
|
|
5727
5737
|
transform: b,
|
|
5728
5738
|
windowRect: R
|
|
5729
|
-
}), D = rr(h), w =
|
|
5739
|
+
}), D = rr(h), w = hl({
|
|
5730
5740
|
config: r,
|
|
5731
5741
|
draggableNodes: k,
|
|
5732
5742
|
droppableContainers: y,
|
|
5733
5743
|
measuringConfiguration: S
|
|
5734
5744
|
}), A = D ? p.setRef : void 0;
|
|
5735
|
-
return ne.createElement(
|
|
5745
|
+
return ne.createElement(sl, null, ne.createElement(ol, {
|
|
5736
5746
|
animation: w
|
|
5737
|
-
}, d && E ? ne.createElement(
|
|
5747
|
+
}, d && E ? ne.createElement(cl, {
|
|
5738
5748
|
key: E,
|
|
5739
5749
|
id: d.id,
|
|
5740
5750
|
ref: A,
|
|
@@ -5757,7 +5767,7 @@ function Yt(e) {
|
|
|
5757
5767
|
const t = e.data.current;
|
|
5758
5768
|
return !!(t && "sortable" in t && typeof t.sortable == "object" && "containerId" in t.sortable && "items" in t.sortable && "index" in t.sortable);
|
|
5759
5769
|
}
|
|
5760
|
-
const
|
|
5770
|
+
const vl = [U.Down, U.Right, U.Up, U.Left], yl = (e, t) => {
|
|
5761
5771
|
let {
|
|
5762
5772
|
context: {
|
|
5763
5773
|
active: n,
|
|
@@ -5768,7 +5778,7 @@ const gl = [U.Down, U.Right, U.Up, U.Left], ml = (e, t) => {
|
|
|
5768
5778
|
scrollableAncestors: a
|
|
5769
5779
|
}
|
|
5770
5780
|
} = t;
|
|
5771
|
-
if (
|
|
5781
|
+
if (vl.includes(e.code)) {
|
|
5772
5782
|
if (e.preventDefault(), !n || !r)
|
|
5773
5783
|
return;
|
|
5774
5784
|
const l = [];
|
|
@@ -5792,7 +5802,7 @@ const gl = [U.Down, U.Right, U.Up, U.Left], ml = (e, t) => {
|
|
|
5792
5802
|
break;
|
|
5793
5803
|
}
|
|
5794
5804
|
});
|
|
5795
|
-
const c =
|
|
5805
|
+
const c = ta({
|
|
5796
5806
|
collisionRect: r,
|
|
5797
5807
|
droppableRects: o,
|
|
5798
5808
|
droppableContainers: l
|
|
@@ -5801,7 +5811,7 @@ const gl = [U.Down, U.Right, U.Up, U.Left], ml = (e, t) => {
|
|
|
5801
5811
|
if (u === (s == null ? void 0 : s.id) && c.length > 1 && (u = c[1].id), u != null) {
|
|
5802
5812
|
const d = i.get(n.id), h = i.get(u), g = h ? o.get(h.id) : null, k = h == null ? void 0 : h.node.current;
|
|
5803
5813
|
if (k && g && d && h) {
|
|
5804
|
-
const p = en(k).some((b, E) => a[E] !== b), m = Bo(d, h), S =
|
|
5814
|
+
const p = en(k).some((b, E) => a[E] !== b), m = Bo(d, h), S = bl(d, h), M = p || !m ? {
|
|
5805
5815
|
x: 0,
|
|
5806
5816
|
y: 0
|
|
5807
5817
|
} : {
|
|
@@ -5819,7 +5829,7 @@ const gl = [U.Down, U.Right, U.Up, U.Left], ml = (e, t) => {
|
|
|
5819
5829
|
function Bo(e, t) {
|
|
5820
5830
|
return !Yt(e) || !Yt(t) ? !1 : e.data.current.sortable.containerId === t.data.current.sortable.containerId;
|
|
5821
5831
|
}
|
|
5822
|
-
function
|
|
5832
|
+
function bl(e, t) {
|
|
5823
5833
|
return !Yt(e) || !Yt(t) || !Bo(e, t) ? !1 : e.data.current.sortable.index < t.data.current.sortable.index;
|
|
5824
5834
|
}
|
|
5825
5835
|
function Ir(e) {
|
|
@@ -5828,7 +5838,7 @@ function Ir(e) {
|
|
|
5828
5838
|
const t = (n = e[0].data) == null ? void 0 : n.zone;
|
|
5829
5839
|
return t === "before" || t === "after" || t === "into" ? t : null;
|
|
5830
5840
|
}
|
|
5831
|
-
function
|
|
5841
|
+
function wl(e) {
|
|
5832
5842
|
const {
|
|
5833
5843
|
onReorder: t,
|
|
5834
5844
|
onGroupReorder: n,
|
|
@@ -5836,14 +5846,14 @@ function yl(e) {
|
|
|
5836
5846
|
onDropIntoGroupAtPosition: o,
|
|
5837
5847
|
onRemoveFromGroup: i,
|
|
5838
5848
|
findParentGroup: s
|
|
5839
|
-
} = e, [a, l] = B(null), [c, u] = B(null), [d, h] = B(null), g = V(null), k =
|
|
5849
|
+
} = e, [a, l] = B(null), [c, u] = B(null), [d, h] = B(null), g = V(null), k = Xs(
|
|
5840
5850
|
br(nr, {
|
|
5841
5851
|
activationConstraint: {
|
|
5842
5852
|
distance: 5
|
|
5843
5853
|
}
|
|
5844
5854
|
}),
|
|
5845
5855
|
br(er, {
|
|
5846
|
-
coordinateGetter:
|
|
5856
|
+
coordinateGetter: yl
|
|
5847
5857
|
})
|
|
5848
5858
|
), y = N((R) => {
|
|
5849
5859
|
l(String(R.active.id));
|
|
@@ -5908,11 +5918,11 @@ function yl(e) {
|
|
|
5908
5918
|
onDragCancel: L
|
|
5909
5919
|
};
|
|
5910
5920
|
}
|
|
5911
|
-
const
|
|
5921
|
+
const xl = (e) => {
|
|
5912
5922
|
var h, g;
|
|
5913
5923
|
const { pointerCoordinates: t, droppableContainers: n, droppableRects: r } = e;
|
|
5914
|
-
let o =
|
|
5915
|
-
if (o.length === 0 && (o =
|
|
5924
|
+
let o = ia(e);
|
|
5925
|
+
if (o.length === 0 && (o = ea(e)), o.length === 0 || !t) return o;
|
|
5916
5926
|
const i = o[0];
|
|
5917
5927
|
if (String(i.id).startsWith("group-footer::"))
|
|
5918
5928
|
return [{ ...i, data: { ...i.data, zone: "after" } }];
|
|
@@ -5924,7 +5934,7 @@ const bl = (e) => {
|
|
|
5924
5934
|
...i,
|
|
5925
5935
|
data: { ...i.data, zone: d }
|
|
5926
5936
|
}];
|
|
5927
|
-
},
|
|
5937
|
+
}, kl = ({
|
|
5928
5938
|
layer: e,
|
|
5929
5939
|
isOver: t,
|
|
5930
5940
|
dropPosition: n,
|
|
@@ -5938,7 +5948,7 @@ const bl = (e) => {
|
|
|
5938
5948
|
onDelete: u,
|
|
5939
5949
|
deleteSuppressed: d
|
|
5940
5950
|
}) => {
|
|
5941
|
-
const { attributes: h, listeners: g, setNodeRef: k, isDragging: y } =
|
|
5951
|
+
const { attributes: h, listeners: g, setNodeRef: k, isDragging: y } = el({ id: e.id }), { setNodeRef: p } = Ho({ id: e.id, data: { isGroup: !!e.isGroup } }), m = N((D) => {
|
|
5942
5952
|
k(D), p(D);
|
|
5943
5953
|
}, [k, p]), S = e.isGroup, M = e.depth > 0, L = M ? e.depth * 24 : 0, R = {
|
|
5944
5954
|
opacity: y ? 0.3 : 1,
|
|
@@ -6109,7 +6119,7 @@ const bl = (e) => {
|
|
|
6109
6119
|
title: e,
|
|
6110
6120
|
children: r
|
|
6111
6121
|
}
|
|
6112
|
-
),
|
|
6122
|
+
), Cl = ({ groupId: e, isOver: t, depth: n }) => {
|
|
6113
6123
|
const { setNodeRef: r } = Ho({ id: `group-footer::${e}` }), o = (n + 1) * 24;
|
|
6114
6124
|
return /* @__PURE__ */ f(
|
|
6115
6125
|
"div",
|
|
@@ -6125,7 +6135,7 @@ const bl = (e) => {
|
|
|
6125
6135
|
}
|
|
6126
6136
|
}
|
|
6127
6137
|
);
|
|
6128
|
-
},
|
|
6138
|
+
}, Sl = ({ layer: e, showPreviewImages: t, previewDisplaySize: n }) => /* @__PURE__ */ j(
|
|
6129
6139
|
"div",
|
|
6130
6140
|
{
|
|
6131
6141
|
style: {
|
|
@@ -6175,7 +6185,7 @@ const bl = (e) => {
|
|
|
6175
6185
|
/* @__PURE__ */ f("span", { style: { fontSize: 13, color: "var(--foreground, #333)" }, children: e.name })
|
|
6176
6186
|
]
|
|
6177
6187
|
}
|
|
6178
|
-
),
|
|
6188
|
+
), El = ({
|
|
6179
6189
|
width: e = 250,
|
|
6180
6190
|
height: t,
|
|
6181
6191
|
showPreviewImages: n = !0,
|
|
@@ -6186,7 +6196,7 @@ const bl = (e) => {
|
|
|
6186
6196
|
showHeader: a = !0,
|
|
6187
6197
|
...l
|
|
6188
6198
|
}) => {
|
|
6189
|
-
const { activeArtboard: c } =
|
|
6199
|
+
const { activeArtboard: c } = js(), u = (c == null ? void 0 : c.previewBackgroundColor) || (c == null ? void 0 : c.backgroundColor) || "transparent", d = 80, h = 160, {
|
|
6190
6200
|
layers: g,
|
|
6191
6201
|
flatLayers: k,
|
|
6192
6202
|
selectLayer: y,
|
|
@@ -6202,7 +6212,7 @@ const bl = (e) => {
|
|
|
6202
6212
|
findElementById: D,
|
|
6203
6213
|
findParentGroup: w,
|
|
6204
6214
|
generateAllPreviews: A
|
|
6205
|
-
} =
|
|
6215
|
+
} = xi({
|
|
6206
6216
|
...l,
|
|
6207
6217
|
previewSize: h,
|
|
6208
6218
|
previewBackgroundColor: u
|
|
@@ -6228,7 +6238,7 @@ const bl = (e) => {
|
|
|
6228
6238
|
ke && !ve ? E(ee, se, P) : L(ee, se, P);
|
|
6229
6239
|
},
|
|
6230
6240
|
[w, E, L]
|
|
6231
|
-
), _ =
|
|
6241
|
+
), _ = wl({
|
|
6232
6242
|
onReorder: ae,
|
|
6233
6243
|
onDropIntoGroup: b,
|
|
6234
6244
|
onDropIntoGroupAtPosition: (ee, se) => b(ee, se),
|
|
@@ -6237,7 +6247,7 @@ const bl = (e) => {
|
|
|
6237
6247
|
findParentGroup: w
|
|
6238
6248
|
}), X = (ee) => [...ee].reverse().map((P) => /* @__PURE__ */ j(ne.Fragment, { children: [
|
|
6239
6249
|
/* @__PURE__ */ f(
|
|
6240
|
-
|
|
6250
|
+
kl,
|
|
6241
6251
|
{
|
|
6242
6252
|
layer: P,
|
|
6243
6253
|
isOver: _.overId === P.id,
|
|
@@ -6255,7 +6265,7 @@ const bl = (e) => {
|
|
|
6255
6265
|
),
|
|
6256
6266
|
P.children && X(P.children),
|
|
6257
6267
|
P.isGroup && /* @__PURE__ */ f(
|
|
6258
|
-
|
|
6268
|
+
Cl,
|
|
6259
6269
|
{
|
|
6260
6270
|
groupId: P.id,
|
|
6261
6271
|
isOver: _.overId === `group-footer::${P.id}`,
|
|
@@ -6264,7 +6274,7 @@ const bl = (e) => {
|
|
|
6264
6274
|
)
|
|
6265
6275
|
] }, P.id)), q = (ee) => [...ee].reverse().map((P) => /* @__PURE__ */ j(ne.Fragment, { children: [
|
|
6266
6276
|
/* @__PURE__ */ f(
|
|
6267
|
-
|
|
6277
|
+
Al,
|
|
6268
6278
|
{
|
|
6269
6279
|
layer: P,
|
|
6270
6280
|
showPreviewImages: n,
|
|
@@ -6341,10 +6351,10 @@ const bl = (e) => {
|
|
|
6341
6351
|
),
|
|
6342
6352
|
/* @__PURE__ */ j("div", { style: { flex: 1, overflow: "auto", minHeight: 0 }, children: [
|
|
6343
6353
|
g.length > 0 ? r ? /* @__PURE__ */ j(
|
|
6344
|
-
|
|
6354
|
+
Xa,
|
|
6345
6355
|
{
|
|
6346
6356
|
sensors: _.sensors,
|
|
6347
|
-
collisionDetection:
|
|
6357
|
+
collisionDetection: xl,
|
|
6348
6358
|
onDragStart: _.onDragStart,
|
|
6349
6359
|
onDragMove: _.onDragMove,
|
|
6350
6360
|
onDragOver: _.onDragOver,
|
|
@@ -6352,8 +6362,8 @@ const bl = (e) => {
|
|
|
6352
6362
|
onDragCancel: _.onDragCancel,
|
|
6353
6363
|
children: [
|
|
6354
6364
|
X(g),
|
|
6355
|
-
/* @__PURE__ */ f(
|
|
6356
|
-
|
|
6365
|
+
/* @__PURE__ */ f(ml, { dropAnimation: null, children: te ? /* @__PURE__ */ f(
|
|
6366
|
+
Sl,
|
|
6357
6367
|
{
|
|
6358
6368
|
layer: te,
|
|
6359
6369
|
showPreviewImages: n,
|
|
@@ -6390,7 +6400,7 @@ const bl = (e) => {
|
|
|
6390
6400
|
]
|
|
6391
6401
|
}
|
|
6392
6402
|
);
|
|
6393
|
-
},
|
|
6403
|
+
}, Al = ({ layer: e, showPreviewImages: t, previewDisplaySize: n, onSelect: r, onToggleVisibility: o, onToggleLock: i, onDuplicate: s, onDelete: a, deleteSuppressed: l }) => {
|
|
6394
6404
|
const c = e.depth > 0, u = c ? e.depth * 24 : 0, d = e.isSelected ? { outline: "3px solid var(--primary, var(--accent-primary, #007AFF))", outlineOffset: "2px" } : {}, h = {
|
|
6395
6405
|
paddingLeft: u + 8,
|
|
6396
6406
|
paddingRight: 8,
|
|
@@ -6475,7 +6485,7 @@ const bl = (e) => {
|
|
|
6475
6485
|
] })
|
|
6476
6486
|
] }, e.id);
|
|
6477
6487
|
};
|
|
6478
|
-
class
|
|
6488
|
+
class gc {
|
|
6479
6489
|
constructor() {
|
|
6480
6490
|
this.canvasIds = /* @__PURE__ */ new Set(), this.requirements = /* @__PURE__ */ new Map(), this.textFields = /* @__PURE__ */ new Map(), this.controls = /* @__PURE__ */ new Map(), this.parts = /* @__PURE__ */ new Map(), this.bridge = null, this.listeners = /* @__PURE__ */ new Set(), this.version = 0, this.getVersion = () => this.version, this.subscribe = (t) => (this.listeners.add(t), () => this.listeners.delete(t));
|
|
6481
6491
|
}
|
|
@@ -6607,7 +6617,7 @@ function rn(e, t) {
|
|
|
6607
6617
|
return r.registerPart(o, e, a);
|
|
6608
6618
|
}, [r, o, e, a]);
|
|
6609
6619
|
}
|
|
6610
|
-
function
|
|
6620
|
+
function mc(e) {
|
|
6611
6621
|
return {
|
|
6612
6622
|
reportInvariant(t) {
|
|
6613
6623
|
if (ai()) throw t;
|
|
@@ -6618,7 +6628,7 @@ function pc(e) {
|
|
|
6618
6628
|
}
|
|
6619
6629
|
};
|
|
6620
6630
|
}
|
|
6621
|
-
function
|
|
6631
|
+
function Ml(e) {
|
|
6622
6632
|
const { elements: t } = e.getState();
|
|
6623
6633
|
return t.map((n, r) => {
|
|
6624
6634
|
const o = n, i = o.transformType ?? "custom", s = o.name ?? i.charAt(0).toUpperCase() + i.slice(1);
|
|
@@ -6630,23 +6640,23 @@ function El(e) {
|
|
|
6630
6640
|
};
|
|
6631
6641
|
});
|
|
6632
6642
|
}
|
|
6633
|
-
function
|
|
6643
|
+
function Dl(e) {
|
|
6634
6644
|
const t = V(null), n = () => {
|
|
6635
6645
|
var i;
|
|
6636
|
-
const r =
|
|
6646
|
+
const r = Ml(e), o = r.map((s) => `${s.key}|${s.kind}|${s.visible}`).join(`
|
|
6637
6647
|
`);
|
|
6638
6648
|
return ((i = t.current) == null ? void 0 : i.key) !== o && (t.current = { key: o, rows: r }), t.current.rows;
|
|
6639
6649
|
};
|
|
6640
6650
|
return $r(e.subscribe, n, n);
|
|
6641
6651
|
}
|
|
6642
|
-
function
|
|
6652
|
+
function Ll(e) {
|
|
6643
6653
|
return e === "image" ? G.image : e === "shape" ? G.shapes : e === "group" ? "lucide:folder-open" : G.text;
|
|
6644
6654
|
}
|
|
6645
|
-
function
|
|
6655
|
+
function Tl({
|
|
6646
6656
|
store: e,
|
|
6647
6657
|
direction: t
|
|
6648
6658
|
}) {
|
|
6649
|
-
const r = [...
|
|
6659
|
+
const r = [...Dl(e)].reverse();
|
|
6650
6660
|
return /* @__PURE__ */ f(
|
|
6651
6661
|
"div",
|
|
6652
6662
|
{
|
|
@@ -6670,7 +6680,7 @@ function Dl({
|
|
|
6670
6680
|
opacity: o.visible ? 1 : 0.4
|
|
6671
6681
|
},
|
|
6672
6682
|
children: [
|
|
6673
|
-
/* @__PURE__ */ f($, { icon:
|
|
6683
|
+
/* @__PURE__ */ f($, { icon: Ll(o.kind), style: { fontSize: 18, color: "var(--text-secondary, #888)", flexShrink: 0 } }),
|
|
6674
6684
|
/* @__PURE__ */ f(
|
|
6675
6685
|
"span",
|
|
6676
6686
|
{
|
|
@@ -6691,7 +6701,7 @@ function Dl({
|
|
|
6691
6701
|
}
|
|
6692
6702
|
);
|
|
6693
6703
|
}
|
|
6694
|
-
function
|
|
6704
|
+
function vc({
|
|
6695
6705
|
direction: e = "vertical",
|
|
6696
6706
|
className: t,
|
|
6697
6707
|
style: n
|
|
@@ -6703,7 +6713,7 @@ function gc({
|
|
|
6703
6713
|
() => o.hasCanvas(),
|
|
6704
6714
|
() => o.hasCanvas()
|
|
6705
6715
|
);
|
|
6706
|
-
return /* @__PURE__ */ f("div", { "data-sc-part": "layers", "data-sc-direction": e, className: t, style: n, children: i ? /* @__PURE__ */ f(
|
|
6716
|
+
return /* @__PURE__ */ f("div", { "data-sc-part": "layers", "data-sc-direction": e, className: t, style: n, children: i ? /* @__PURE__ */ f(El, { style: { width: "100%" } }) : /* @__PURE__ */ f(Tl, { store: r.store, direction: e }) });
|
|
6707
6717
|
}
|
|
6708
6718
|
const Uo = ({
|
|
6709
6719
|
trigger: e,
|
|
@@ -6718,7 +6728,7 @@ const Uo = ({
|
|
|
6718
6728
|
contentClassName: c = ""
|
|
6719
6729
|
}) => {
|
|
6720
6730
|
const u = V(null), d = V(null), h = V(null), [g, k] = B({}), [y, p] = B(!1), m = (M) => {
|
|
6721
|
-
M.stopPropagation(), !n && a &&
|
|
6731
|
+
M.stopPropagation(), !n && a && bs.protectNextClick(), r(!n);
|
|
6722
6732
|
};
|
|
6723
6733
|
Y(() => {
|
|
6724
6734
|
if (!n) return;
|
|
@@ -6814,7 +6824,7 @@ const Uo = ({
|
|
|
6814
6824
|
{ type: "wave", label: "Wave Text", icon: /* @__PURE__ */ f($, { icon: "lucide:waves", className: "sc:size-[18px]" }) },
|
|
6815
6825
|
{ type: "arch", label: "Arch Text", icon: /* @__PURE__ */ f($, { icon: "lucide:arrow-up-from-dot", className: "sc:size-[18px]" }) }
|
|
6816
6826
|
];
|
|
6817
|
-
function
|
|
6827
|
+
function Rl() {
|
|
6818
6828
|
const [e, t] = ne.useState(!1);
|
|
6819
6829
|
return ne.useEffect(() => {
|
|
6820
6830
|
if (typeof document > "u") return;
|
|
@@ -6827,7 +6837,7 @@ function Ll() {
|
|
|
6827
6837
|
}), () => r.disconnect();
|
|
6828
6838
|
}, []), e;
|
|
6829
6839
|
}
|
|
6830
|
-
const
|
|
6840
|
+
const Il = ({
|
|
6831
6841
|
isOpen: e,
|
|
6832
6842
|
onClose: t,
|
|
6833
6843
|
title: n,
|
|
@@ -6846,7 +6856,7 @@ const Tl = ({
|
|
|
6846
6856
|
disableOverflowHidden: y = !1,
|
|
6847
6857
|
"data-testid": p
|
|
6848
6858
|
}) => {
|
|
6849
|
-
const m = i === "bottom" ? s || a : void 0, M =
|
|
6859
|
+
const m = i === "bottom" ? s || a : void 0, M = Rl() ? 0.65 : 0.4;
|
|
6850
6860
|
return /* @__PURE__ */ f(
|
|
6851
6861
|
mo,
|
|
6852
6862
|
{
|
|
@@ -6923,7 +6933,7 @@ const Tl = ({
|
|
|
6923
6933
|
)
|
|
6924
6934
|
}
|
|
6925
6935
|
);
|
|
6926
|
-
},
|
|
6936
|
+
}, Nl = ({ className: e }) => /* @__PURE__ */ f(
|
|
6927
6937
|
"svg",
|
|
6928
6938
|
{
|
|
6929
6939
|
className: e,
|
|
@@ -6936,7 +6946,7 @@ const Tl = ({
|
|
|
6936
6946
|
"aria-hidden": !0,
|
|
6937
6947
|
children: /* @__PURE__ */ f("path", { d: "M12 2L21 8L18 19L6 19L3 8L12 2Z" })
|
|
6938
6948
|
}
|
|
6939
|
-
),
|
|
6949
|
+
), zl = ({ className: e }) => /* @__PURE__ */ f(
|
|
6940
6950
|
"svg",
|
|
6941
6951
|
{
|
|
6942
6952
|
className: e,
|
|
@@ -6947,12 +6957,12 @@ const Tl = ({
|
|
|
6947
6957
|
"aria-hidden": !0,
|
|
6948
6958
|
children: /* @__PURE__ */ f("ellipse", { cx: "12", cy: "12", rx: "9", ry: "6" })
|
|
6949
6959
|
}
|
|
6950
|
-
), Pn = "sc:size-10",
|
|
6960
|
+
), Pn = "sc:size-10", Ol = [
|
|
6951
6961
|
{ id: "rectangle", label: "Rectangle", icon: "lucide:square" },
|
|
6952
6962
|
{ id: "circle", label: "Circle", icon: "lucide:circle" },
|
|
6953
|
-
{ id: "ellipse", label: "Ellipse", reactIcon: /* @__PURE__ */ f(
|
|
6963
|
+
{ id: "ellipse", label: "Ellipse", reactIcon: /* @__PURE__ */ f(zl, { className: Pn }) },
|
|
6954
6964
|
{ id: "triangle", label: "Triangle", icon: "lucide:triangle" },
|
|
6955
|
-
{ id: "polygon", label: "Polygon", reactIcon: /* @__PURE__ */ f(
|
|
6965
|
+
{ id: "polygon", label: "Polygon", reactIcon: /* @__PURE__ */ f(Nl, { className: Pn }) },
|
|
6956
6966
|
{ id: "star", label: "Star", icon: "lucide:star" },
|
|
6957
6967
|
{ id: "line", label: "Line", icon: "lucide:minus" }
|
|
6958
6968
|
], _o = ({
|
|
@@ -6965,7 +6975,7 @@ const Tl = ({
|
|
|
6965
6975
|
n(a), t();
|
|
6966
6976
|
};
|
|
6967
6977
|
return /* @__PURE__ */ j(
|
|
6968
|
-
|
|
6978
|
+
Il,
|
|
6969
6979
|
{
|
|
6970
6980
|
isOpen: e,
|
|
6971
6981
|
onClose: t,
|
|
@@ -6994,7 +7004,7 @@ const Tl = ({
|
|
|
6994
7004
|
{
|
|
6995
7005
|
className: "sc:grid sc:grid-cols-3 sc:gap-2 sc:p-4",
|
|
6996
7006
|
"data-testid": "shape-type-list",
|
|
6997
|
-
children:
|
|
7007
|
+
children: Ol.map((a) => {
|
|
6998
7008
|
const l = a.id === r;
|
|
6999
7009
|
return /* @__PURE__ */ j(
|
|
7000
7010
|
"button",
|
|
@@ -7029,7 +7039,7 @@ const Tl = ({
|
|
|
7029
7039
|
]
|
|
7030
7040
|
}
|
|
7031
7041
|
);
|
|
7032
|
-
}, wn = Qe("MenuButton"),
|
|
7042
|
+
}, wn = Qe("MenuButton"), Fl = ({
|
|
7033
7043
|
isLayersPanelOpen: e = !1,
|
|
7034
7044
|
onToggleLayersPanel: t,
|
|
7035
7045
|
onOpenImageBrowser: n,
|
|
@@ -7041,7 +7051,7 @@ const Tl = ({
|
|
|
7041
7051
|
var E;
|
|
7042
7052
|
const { get: a } = Hr(), [l, c] = B(!1), [u, d] = B(!1), [h, g] = B(!1), k = V(null), y = async () => {
|
|
7043
7053
|
try {
|
|
7044
|
-
const { ExportManager: v } = await import("./ExportManager-
|
|
7054
|
+
const { ExportManager: v } = await import("./ExportManager-Ci81K6xA.js").then((T) => T.Z), { artboardManager: D, elements: w } = a(), A = D.getAllArtboards();
|
|
7045
7055
|
v.exportToJSON(A, w, D), c(!1);
|
|
7046
7056
|
} catch (v) {
|
|
7047
7057
|
wn.error("Failed to save workspace:", v), alert("Failed to save workspace. Please try again.");
|
|
@@ -7095,7 +7105,7 @@ This will replace your current workspace. Continue?`
|
|
|
7095
7105
|
return;
|
|
7096
7106
|
}
|
|
7097
7107
|
try {
|
|
7098
|
-
const { ExportManager: T } = await import("./ExportManager-
|
|
7108
|
+
const { ExportManager: T } = await import("./ExportManager-Ci81K6xA.js").then((O) => O.Z);
|
|
7099
7109
|
await T.exportArtboardToImage(A, D, w.current, {
|
|
7100
7110
|
format: "png",
|
|
7101
7111
|
scale: 2,
|
|
@@ -7231,7 +7241,7 @@ function Wo({
|
|
|
7231
7241
|
return Y(() => {
|
|
7232
7242
|
if (!t || o) return;
|
|
7233
7243
|
let s = !1;
|
|
7234
|
-
return import("./ImagePanel-
|
|
7244
|
+
return import("./ImagePanel-ntJBepby.js").then(
|
|
7235
7245
|
(a) => {
|
|
7236
7246
|
s || i(() => a.ImagePanel);
|
|
7237
7247
|
},
|
|
@@ -7249,11 +7259,11 @@ function Wo({
|
|
|
7249
7259
|
};
|
|
7250
7260
|
}, [t, o, r]), o ? /* @__PURE__ */ f(o, { isOpen: t, onOpenChange: n }) : null;
|
|
7251
7261
|
}
|
|
7252
|
-
function
|
|
7262
|
+
function yc({ className: e, style: t }) {
|
|
7253
7263
|
ir("Editor.Menu"), rn("Editor.Menu");
|
|
7254
7264
|
const [n, r] = B(!1);
|
|
7255
7265
|
return /* @__PURE__ */ j("div", { "data-sc-part": "menu", className: e, style: t, children: [
|
|
7256
|
-
/* @__PURE__ */ f(
|
|
7266
|
+
/* @__PURE__ */ f(Fl, { onOpenImageBrowser: () => r(!0) }),
|
|
7257
7267
|
/* @__PURE__ */ f(
|
|
7258
7268
|
Wo,
|
|
7259
7269
|
{
|
|
@@ -7264,7 +7274,7 @@ function mc({ className: e, style: t }) {
|
|
|
7264
7274
|
)
|
|
7265
7275
|
] });
|
|
7266
7276
|
}
|
|
7267
|
-
const
|
|
7277
|
+
const jl = () => {
|
|
7268
7278
|
const { undo: e, redo: t, canUndo: n, canRedo: r } = ii();
|
|
7269
7279
|
return /* @__PURE__ */ j("div", { className: "sc-undo-redo", style: { display: "inline-flex", gap: 4 }, children: [
|
|
7270
7280
|
/* @__PURE__ */ f(
|
|
@@ -7289,10 +7299,10 @@ const Ol = () => {
|
|
|
7289
7299
|
)
|
|
7290
7300
|
] });
|
|
7291
7301
|
};
|
|
7292
|
-
function
|
|
7293
|
-
return ir("Editor.History"), rn("Editor.History"), /* @__PURE__ */ f("div", { "data-sc-part": "history", className: e, style: t, children: /* @__PURE__ */ f(
|
|
7302
|
+
function bc({ className: e, style: t }) {
|
|
7303
|
+
return ir("Editor.History"), rn("Editor.History"), /* @__PURE__ */ f("div", { "data-sc-part": "history", className: e, style: t, children: /* @__PURE__ */ f(jl, {}) });
|
|
7294
7304
|
}
|
|
7295
|
-
function
|
|
7305
|
+
function wc({ className: e, style: t }) {
|
|
7296
7306
|
ir("Editor.Add"), rn("Editor.Add");
|
|
7297
7307
|
const { get: n } = Hr(), [r, o] = B(!1), [i, s] = B(!1), [a, l] = B(!1), c = async (d) => {
|
|
7298
7308
|
if (o(!1), d === "shape") {
|
|
@@ -7348,8 +7358,8 @@ function yc({ className: e, style: t }) {
|
|
|
7348
7358
|
)
|
|
7349
7359
|
] });
|
|
7350
7360
|
}
|
|
7351
|
-
const
|
|
7352
|
-
function
|
|
7361
|
+
const Pl = Qe("useExport");
|
|
7362
|
+
function xc() {
|
|
7353
7363
|
const {
|
|
7354
7364
|
artboards: e,
|
|
7355
7365
|
artboardManager: t,
|
|
@@ -7477,7 +7487,7 @@ function bc() {
|
|
|
7477
7487
|
xe[ie] = de;
|
|
7478
7488
|
d((ie) => ({ ...ie, ...xe })), W && W(xe);
|
|
7479
7489
|
} catch (te) {
|
|
7480
|
-
|
|
7490
|
+
Pl.error("[useExport] Continuous export error:", te);
|
|
7481
7491
|
}
|
|
7482
7492
|
};
|
|
7483
7493
|
(async () => {
|
|
@@ -7514,7 +7524,7 @@ async function Yo(e, t) {
|
|
|
7514
7524
|
}
|
|
7515
7525
|
return t;
|
|
7516
7526
|
}
|
|
7517
|
-
function
|
|
7527
|
+
function $l(e) {
|
|
7518
7528
|
return {
|
|
7519
7529
|
async search({ query: t, page: n, perPage: r = 30 }) {
|
|
7520
7530
|
const o = new URLSearchParams({
|
|
@@ -7545,7 +7555,7 @@ function jl(e) {
|
|
|
7545
7555
|
}
|
|
7546
7556
|
};
|
|
7547
7557
|
}
|
|
7548
|
-
function
|
|
7558
|
+
function Hl(e) {
|
|
7549
7559
|
return {
|
|
7550
7560
|
async generate({ prompt: t, width: n, height: r, numberResults: o }) {
|
|
7551
7561
|
const i = await fetch(e, {
|
|
@@ -7561,7 +7571,7 @@ function Pl(e) {
|
|
|
7561
7571
|
}
|
|
7562
7572
|
};
|
|
7563
7573
|
}
|
|
7564
|
-
function
|
|
7574
|
+
function Bl(e) {
|
|
7565
7575
|
const t = "/api/image-proxy?url=";
|
|
7566
7576
|
if (!e || !e.startsWith(t)) return e;
|
|
7567
7577
|
try {
|
|
@@ -7570,9 +7580,9 @@ function $l(e) {
|
|
|
7570
7580
|
return e;
|
|
7571
7581
|
}
|
|
7572
7582
|
}
|
|
7573
|
-
function
|
|
7583
|
+
function Vl(e) {
|
|
7574
7584
|
return async function(n) {
|
|
7575
|
-
const r =
|
|
7585
|
+
const r = Bl(n);
|
|
7576
7586
|
if (!/^https?:\/\//.test(r))
|
|
7577
7587
|
throw new Error("Background removal isn't available for this image yet");
|
|
7578
7588
|
const o = await fetch(e, {
|
|
@@ -7587,12 +7597,12 @@ function Hl(e) {
|
|
|
7587
7597
|
};
|
|
7588
7598
|
}
|
|
7589
7599
|
const qo = {}, Ko = Xe(qo);
|
|
7590
|
-
function
|
|
7600
|
+
function kc({ services: e, children: t }) {
|
|
7591
7601
|
const n = J(() => e ? {
|
|
7592
|
-
imageSearch: e.imageSearch ?? (e.imageSearchUrl ?
|
|
7593
|
-
generate: e.generate ?? (e.generateUrl ?
|
|
7602
|
+
imageSearch: e.imageSearch ?? (e.imageSearchUrl ? $l(e.imageSearchUrl) : void 0),
|
|
7603
|
+
generate: e.generate ?? (e.generateUrl ? Hl(e.generateUrl) : void 0),
|
|
7594
7604
|
vectors: e.vectors,
|
|
7595
|
-
removeBackground: e.removeBackground ?? (e.bgRemoveUrl ?
|
|
7605
|
+
removeBackground: e.removeBackground ?? (e.bgRemoveUrl ? Vl(e.bgRemoveUrl) : void 0),
|
|
7596
7606
|
onFontUpload: e.onFontUpload
|
|
7597
7607
|
} : qo, [
|
|
7598
7608
|
e == null ? void 0 : e.imageSearch,
|
|
@@ -7606,12 +7616,12 @@ function wc({ services: e, children: t }) {
|
|
|
7606
7616
|
]);
|
|
7607
7617
|
return /* @__PURE__ */ f(Ko.Provider, { value: n, children: t });
|
|
7608
7618
|
}
|
|
7609
|
-
function
|
|
7619
|
+
function Cc() {
|
|
7610
7620
|
return Be(Ko);
|
|
7611
7621
|
}
|
|
7612
7622
|
const Nr = Qe("GoogleFontsService");
|
|
7613
7623
|
let tt = [], gt = null;
|
|
7614
|
-
async function
|
|
7624
|
+
async function Ul() {
|
|
7615
7625
|
return tt.length > 0 ? tt : gt || (gt = fetch("/google-fonts.json").then((e) => {
|
|
7616
7626
|
if (!e.ok)
|
|
7617
7627
|
throw new Error(`HTTP error! status: ${e.status}`);
|
|
@@ -7627,7 +7637,7 @@ async function Bl() {
|
|
|
7627
7637
|
function xn() {
|
|
7628
7638
|
return tt;
|
|
7629
7639
|
}
|
|
7630
|
-
function
|
|
7640
|
+
function Gl() {
|
|
7631
7641
|
return tt.length > 0;
|
|
7632
7642
|
}
|
|
7633
7643
|
function zr(e) {
|
|
@@ -7640,7 +7650,7 @@ function zr(e) {
|
|
|
7640
7650
|
}[e.toLowerCase()] || "display";
|
|
7641
7651
|
}
|
|
7642
7652
|
const Or = Qe("UnifiedFontService");
|
|
7643
|
-
class
|
|
7653
|
+
class _l {
|
|
7644
7654
|
constructor() {
|
|
7645
7655
|
this.searchCache = /* @__PURE__ */ new Map(), this.previewFontLinks = /* @__PURE__ */ new Set();
|
|
7646
7656
|
}
|
|
@@ -7652,7 +7662,7 @@ class Ul {
|
|
|
7652
7662
|
*/
|
|
7653
7663
|
async initialize() {
|
|
7654
7664
|
try {
|
|
7655
|
-
await
|
|
7665
|
+
await Ul();
|
|
7656
7666
|
} catch (t) {
|
|
7657
7667
|
Or.error("Failed to initialize UnifiedFontService:", t);
|
|
7658
7668
|
}
|
|
@@ -7661,7 +7671,7 @@ class Ul {
|
|
|
7661
7671
|
* Check if fonts are loaded
|
|
7662
7672
|
*/
|
|
7663
7673
|
isFontsLoaded() {
|
|
7664
|
-
return
|
|
7674
|
+
return Gl();
|
|
7665
7675
|
}
|
|
7666
7676
|
// ========================================
|
|
7667
7677
|
// Font Retrieval
|
|
@@ -7845,29 +7855,29 @@ class Ul {
|
|
|
7845
7855
|
};
|
|
7846
7856
|
}
|
|
7847
7857
|
}
|
|
7848
|
-
const
|
|
7858
|
+
const Sc = new _l();
|
|
7849
7859
|
function Jo(e) {
|
|
7850
7860
|
return e instanceof ui;
|
|
7851
7861
|
}
|
|
7852
|
-
function
|
|
7862
|
+
function Wl(e) {
|
|
7853
7863
|
return e instanceof li;
|
|
7854
7864
|
}
|
|
7855
|
-
function
|
|
7865
|
+
function Yl(e) {
|
|
7856
7866
|
return e instanceof di;
|
|
7857
7867
|
}
|
|
7858
|
-
function
|
|
7868
|
+
function ql(e) {
|
|
7859
7869
|
return e instanceof Re;
|
|
7860
7870
|
}
|
|
7861
|
-
function
|
|
7871
|
+
function Kl(e) {
|
|
7862
7872
|
return e instanceof ci;
|
|
7863
7873
|
}
|
|
7864
|
-
function
|
|
7865
|
-
return Jo(e) ? "text" :
|
|
7874
|
+
function Jl(e) {
|
|
7875
|
+
return Jo(e) ? "text" : Wl(e) ? "image" : Yl(e) ? "shape" : ql(e) ? "group" : Kl(e) ? "path" : null;
|
|
7866
7876
|
}
|
|
7867
|
-
const mt = ["x", "y", "rotation", "opacity", "name", "visible", "locked"],
|
|
7868
|
-
text: [...mt, ...
|
|
7869
|
-
shape: [...mt, ...
|
|
7870
|
-
image: [...mt, ...
|
|
7877
|
+
const mt = ["x", "y", "rotation", "opacity", "name", "visible", "locked"], Xl = ["text", "fontSize", "color", "fontFamily", "bold", "italic", "textAlign"], Ql = ["fillColor", "fill", "width", "height"], Zl = ["imageUrl", "width", "height", "adjustments"], ec = {
|
|
7878
|
+
text: [...mt, ...Xl],
|
|
7879
|
+
shape: [...mt, ...Ql],
|
|
7880
|
+
image: [...mt, ...Zl],
|
|
7871
7881
|
group: [...mt],
|
|
7872
7882
|
path: [...mt]
|
|
7873
7883
|
}, kn = ["left", "center", "right"], jt = ["brightness", "contrast", "saturation"], Cn = 3;
|
|
@@ -7888,7 +7898,7 @@ function Fr(e, t, n, r) {
|
|
|
7888
7898
|
{ key: e, kind: r, value: t }
|
|
7889
7899
|
);
|
|
7890
7900
|
}
|
|
7891
|
-
function
|
|
7901
|
+
function tc(e, t) {
|
|
7892
7902
|
const n = si(t), r = n ? t.name : t;
|
|
7893
7903
|
if (!n) {
|
|
7894
7904
|
const a = e.get(r);
|
|
@@ -7903,11 +7913,11 @@ function Zl(e, t) {
|
|
|
7903
7913
|
{ layerName: r, validNames: s, validIds: i.map((a) => a.id), docSlug: "embed-mode" }
|
|
7904
7914
|
);
|
|
7905
7915
|
}
|
|
7906
|
-
function
|
|
7907
|
-
const n =
|
|
7916
|
+
function nc(e, t) {
|
|
7917
|
+
const n = Jl(e);
|
|
7908
7918
|
if (!n)
|
|
7909
7919
|
throw He("target is not a patchable editor element.", { kind: null });
|
|
7910
|
-
const r =
|
|
7920
|
+
const r = ec[n];
|
|
7911
7921
|
for (const [o, i] of Object.entries(t))
|
|
7912
7922
|
if (i !== void 0) {
|
|
7913
7923
|
if (!r.includes(o))
|
|
@@ -7949,6 +7959,9 @@ function ec(e, t) {
|
|
|
7949
7959
|
case "italic":
|
|
7950
7960
|
Fr(o, i, "boolean", n);
|
|
7951
7961
|
break;
|
|
7962
|
+
case "fill":
|
|
7963
|
+
fi(i);
|
|
7964
|
+
break;
|
|
7952
7965
|
case "textAlign":
|
|
7953
7966
|
if (typeof i != "string" || !kn.includes(i))
|
|
7954
7967
|
throw He(
|
|
@@ -7982,13 +7995,17 @@ function ec(e, t) {
|
|
|
7982
7995
|
}
|
|
7983
7996
|
return n;
|
|
7984
7997
|
}
|
|
7985
|
-
function
|
|
7998
|
+
function rc(e, t) {
|
|
7986
7999
|
let n = !1;
|
|
7987
8000
|
if (t.x !== void 0 && (e.x = t.x), t.y !== void 0 && (e.y = t.y), t.rotation !== void 0 && e.setRotation(t.rotation), t.opacity !== void 0 && (e.opacity = t.opacity), t.name !== void 0 && (e.name = t.name), t.visible !== void 0 && (e.visible = t.visible), t.locked !== void 0 && (e.locked = t.locked), Jo(e))
|
|
7988
|
-
return t.text !== void 0 && e.setText(t.text), t.fontSize !== void 0 && e.setFontSize(t.fontSize), t.color !== void 0 && e.setColor(t.color), t.fontFamily !== void 0 && t.fontFamily !== e.fontFamily && (
|
|
8001
|
+
return t.text !== void 0 && e.setText(t.text), t.fontSize !== void 0 && e.setFontSize(t.fontSize), t.color !== void 0 && e.setColor(t.color), t.fontFamily !== void 0 && t.fontFamily !== e.fontFamily && (hi.clearCache(e.fontFamily), e.fontFamily = t.fontFamily), t.bold !== void 0 && (e.bold = t.bold), t.italic !== void 0 && (e.italic = t.italic), t.textAlign !== void 0 && (e.textAlign = t.textAlign), { needsImageLoad: n };
|
|
7989
8002
|
const r = e;
|
|
7990
|
-
if (t.width !== void 0 && (r.transformData.width = t.width), t.height !== void 0 && (r.transformData.height = t.height), t.fillColor !== void 0
|
|
7991
|
-
const o = e
|
|
8003
|
+
if (t.width !== void 0 && (r.transformData.width = t.width), t.height !== void 0 && (r.transformData.height = t.height), t.fillColor !== void 0) {
|
|
8004
|
+
const o = e.transformData;
|
|
8005
|
+
o.fillColor = t.fillColor, delete o.fill;
|
|
8006
|
+
}
|
|
8007
|
+
if (t.fill !== void 0 && (e.transformData.fill = pi(t.fill)), t.adjustments !== void 0) {
|
|
8008
|
+
const o = e, i = gi(t.adjustments);
|
|
7992
8009
|
i ? o.transformData.adjustments = i : delete o.transformData.adjustments;
|
|
7993
8010
|
}
|
|
7994
8011
|
if (t.imageUrl !== void 0) {
|
|
@@ -7998,7 +8015,7 @@ function tc(e, t) {
|
|
|
7998
8015
|
return { needsImageLoad: n };
|
|
7999
8016
|
}
|
|
8000
8017
|
const jr = Qe("useCommands");
|
|
8001
|
-
function
|
|
8018
|
+
function Ec() {
|
|
8002
8019
|
const e = qt(), {
|
|
8003
8020
|
undo: t,
|
|
8004
8021
|
redo: n,
|
|
@@ -8023,10 +8040,10 @@ function Cc() {
|
|
|
8023
8040
|
const M = V(null), L = N(
|
|
8024
8041
|
(E, v, D) => {
|
|
8025
8042
|
const w = m.current;
|
|
8026
|
-
let A =
|
|
8043
|
+
let A = tc(w, E);
|
|
8027
8044
|
const T = y.getArtboardIdForElement(A.id) ?? y.getActiveArtboardId(), O = T ? p.peekArtboard(T) : null;
|
|
8028
|
-
O instanceof sr && O.elementId === A.id && O.newElement && (A = O.newElement),
|
|
8029
|
-
const W = A.clone(), { needsImageLoad: ae } =
|
|
8045
|
+
O instanceof sr && O.elementId === A.id && O.newElement && (A = O.newElement), nc(A, v);
|
|
8046
|
+
const W = A.clone(), { needsImageLoad: ae } = rc(W, v);
|
|
8030
8047
|
if (ae) {
|
|
8031
8048
|
const X = W;
|
|
8032
8049
|
X.onLoadCallback = (q) => {
|
|
@@ -8076,57 +8093,57 @@ function Cc() {
|
|
|
8076
8093
|
};
|
|
8077
8094
|
}
|
|
8078
8095
|
export {
|
|
8079
|
-
|
|
8096
|
+
Jl as A,
|
|
8080
8097
|
st as B,
|
|
8081
|
-
|
|
8098
|
+
kc as C,
|
|
8082
8099
|
Uo as D,
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
|
|
8086
|
-
|
|
8100
|
+
gc as E,
|
|
8101
|
+
ql as F,
|
|
8102
|
+
Wl as G,
|
|
8103
|
+
Kl as H,
|
|
8087
8104
|
$ as I,
|
|
8088
|
-
|
|
8105
|
+
Yl as J,
|
|
8089
8106
|
Jo as K,
|
|
8090
|
-
|
|
8091
|
-
|
|
8107
|
+
El as L,
|
|
8108
|
+
Fl as M,
|
|
8092
8109
|
Ie as N,
|
|
8093
8110
|
G as O,
|
|
8094
|
-
|
|
8111
|
+
As as P,
|
|
8095
8112
|
mo as Q,
|
|
8096
8113
|
vo as R,
|
|
8097
8114
|
_o as S,
|
|
8098
8115
|
Yn as T,
|
|
8099
|
-
|
|
8116
|
+
Sc as U,
|
|
8100
8117
|
yo as V,
|
|
8101
|
-
|
|
8118
|
+
Il as W,
|
|
8102
8119
|
ho as X,
|
|
8103
8120
|
Rn as Y,
|
|
8104
8121
|
In as Z,
|
|
8105
|
-
|
|
8106
|
-
|
|
8107
|
-
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
8111
|
-
|
|
8112
|
-
|
|
8122
|
+
Hl as a,
|
|
8123
|
+
$l as b,
|
|
8124
|
+
Vl as c,
|
|
8125
|
+
Cc as d,
|
|
8126
|
+
pc as e,
|
|
8127
|
+
Ec as f,
|
|
8128
|
+
xc as g,
|
|
8129
|
+
xi as h,
|
|
8113
8130
|
Jt as i,
|
|
8114
8131
|
At as j,
|
|
8115
|
-
|
|
8132
|
+
bs as k,
|
|
8116
8133
|
jn as l,
|
|
8117
8134
|
Je as m,
|
|
8118
8135
|
po as n,
|
|
8119
|
-
|
|
8120
|
-
|
|
8136
|
+
xs as o,
|
|
8137
|
+
mc as p,
|
|
8121
8138
|
Vo as q,
|
|
8122
8139
|
or as r,
|
|
8123
|
-
|
|
8140
|
+
ks as s,
|
|
8124
8141
|
rn as t,
|
|
8125
|
-
|
|
8142
|
+
js as u,
|
|
8126
8143
|
ir as v,
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
|
|
8144
|
+
wc as w,
|
|
8145
|
+
yc as x,
|
|
8146
|
+
bc as y,
|
|
8147
|
+
vc as z
|
|
8131
8148
|
};
|
|
8132
|
-
//# sourceMappingURL=useCommands-
|
|
8149
|
+
//# sourceMappingURL=useCommands-DwnZHUg8.js.map
|