@snowcone-app/canvas 0.46.7 → 0.46.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ContextualToolbars-BA0QCFF7.js → ContextualToolbars-BG90V6-s.js} +3 -3
- package/dist/ContextualToolbars-BG90V6-s.js.map +1 -0
- package/dist/{EditorCanvasImpl-DsAgLgmR.js → EditorCanvasImpl-C7y7UNl1.js} +5 -5
- package/dist/{EditorCanvasImpl-DsAgLgmR.js.map → EditorCanvasImpl-C7y7UNl1.js.map} +1 -1
- package/dist/{ImagePanel-DXQO8eOD.js → ImagePanel-BaEJnUvS.js} +3 -3
- package/dist/ImagePanel-BaEJnUvS.js.map +1 -0
- package/dist/{SnowconeCanvas-d8JHL7mC.js → SnowconeCanvas-C6FmL0pj.js} +6 -6
- package/dist/{SnowconeCanvas-d8JHL7mC.js.map → SnowconeCanvas-C6FmL0pj.js.map} +1 -1
- package/dist/advanced.mjs +64 -64
- package/dist/advanced.mjs.map +1 -1
- package/dist/compose-Ce53EW1v.js +100 -0
- package/dist/compose-Ce53EW1v.js.map +1 -0
- package/dist/{custom-icons-3gVIcPLj.js → custom-icons-BA-MX7Y2.js} +2 -2
- package/dist/{custom-icons-3gVIcPLj.js.map → custom-icons-BA-MX7Y2.js.map} +1 -1
- package/dist/{embed-CG-lFuZn.js → embed-CYlEe_Xv.js} +155 -156
- package/dist/embed-CYlEe_Xv.js.map +1 -0
- package/dist/embed.mjs +44 -44
- package/dist/icons/Icon.d.ts +2 -0
- package/dist/index.mjs +56 -56
- package/dist/{template-fields-C2JnjdcI.js → template-fields-3CH15MFC.js} +2 -2
- package/dist/{template-fields-C2JnjdcI.js.map → template-fields-3CH15MFC.js.map} +1 -1
- package/dist/{useCommands--GNTAyjd.js → useCommands-C6nE770t.js} +705 -715
- package/dist/useCommands-C6nE770t.js.map +1 -0
- package/dist/{validation-9BuyvBcJ.js → validation-C3FHoCbQ.js} +7 -7
- package/dist/{validation-9BuyvBcJ.js.map → validation-C3FHoCbQ.js.map} +1 -1
- package/example/package.json +1 -1
- package/package.json +3 -3
- package/dist/ContextualToolbars-BA0QCFF7.js.map +0 -1
- package/dist/ImagePanel-DXQO8eOD.js.map +0 -1
- package/dist/compose-DtQL_oit.js +0 -85
- package/dist/compose-DtQL_oit.js.map +0 -1
- package/dist/embed-CG-lFuZn.js.map +0 -1
- package/dist/useCommands--GNTAyjd.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
|
-
import ne, { useRef as V, useState as B, useCallback as N, useMemo as X, useEffect as q, forwardRef as
|
|
4
|
-
import { b as Yt, w as
|
|
5
|
-
import { G as Ie, c as Qe, q as rt, Z as
|
|
6
|
-
import { R as
|
|
7
|
-
import { createPortal as
|
|
3
|
+
import ne, { useRef as V, useState as B, useCallback as N, useMemo as X, useEffect as q, forwardRef as Pn, createElement as Sn, useLayoutEffect as $n, memo as Qo, useReducer as Zo, useContext as Be, createContext as Je, cloneElement as ei, useId as Pr, useSyncExternalStore as $r } from "react";
|
|
4
|
+
import { b as Yt, w as ti, o as ni, x as Hr, m as ri, q as oi } from "./design-builder-HKRo18WT.js";
|
|
5
|
+
import { G as Ie, c as Qe, q as rt, Z as ii, aV as ln, I as si, P as ai, S as li, T as ci, aW as di, K as ui, aX as fi, aY as hi, U as sr } from "./FontAnalyzer-CLMJi2Sw.js";
|
|
6
|
+
import { R as gi, I as cn, a as dn } from "./ExportManager-DEJgxB0S.js";
|
|
7
|
+
import { createPortal as Hn, 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 pi } 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 mi = {
|
|
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,
|
|
@@ -531,23 +531,10 @@ const yi = {
|
|
|
531
531
|
width: 15,
|
|
532
532
|
height: 15
|
|
533
533
|
}
|
|
534
|
-
},
|
|
535
|
-
async function bi() {
|
|
536
|
-
if (!Gr) return;
|
|
537
|
-
const { addIcon: e } = await Promise.resolve().then(() => bs);
|
|
538
|
-
for (const [t, n] of Object.entries(yi))
|
|
539
|
-
e(t, n);
|
|
540
|
-
}
|
|
541
|
-
let un = !1;
|
|
542
|
-
function pc() {
|
|
543
|
-
un || !Gr || (un = !0, bi().catch(() => {
|
|
544
|
-
un = !1;
|
|
545
|
-
}));
|
|
546
|
-
}
|
|
547
|
-
const re = Qe("Layers"), wi = 150;
|
|
534
|
+
}, re = Qe("Layers"), vi = 150;
|
|
548
535
|
async function ar(e, t = 64, n = "transparent") {
|
|
549
536
|
try {
|
|
550
|
-
const r =
|
|
537
|
+
const r = gi();
|
|
551
538
|
return r && r(e, {
|
|
552
539
|
width: t,
|
|
553
540
|
height: t,
|
|
@@ -558,7 +545,7 @@ async function ar(e, t = 64, n = "transparent") {
|
|
|
558
545
|
return re.error("Failed to generate preview:", r), null;
|
|
559
546
|
}
|
|
560
547
|
}
|
|
561
|
-
function
|
|
548
|
+
function Gr(e, t, n, r, o, i = 0, s = null) {
|
|
562
549
|
return (i > 0 ? e : e.filter((l) => {
|
|
563
550
|
const c = l.parentId ?? null;
|
|
564
551
|
return l instanceof Ie, c === null;
|
|
@@ -578,7 +565,7 @@ function _r(e, t, n, r, o, i = 0, s = null) {
|
|
|
578
565
|
await o(l.id);
|
|
579
566
|
}
|
|
580
567
|
};
|
|
581
|
-
return c && l instanceof Ie && (d.children =
|
|
568
|
+
return c && l instanceof Ie && (d.children = Gr(
|
|
582
569
|
l.children,
|
|
583
570
|
t,
|
|
584
571
|
n,
|
|
@@ -589,13 +576,13 @@ function _r(e, t, n, r, o, i = 0, s = null) {
|
|
|
589
576
|
)), d;
|
|
590
577
|
});
|
|
591
578
|
}
|
|
592
|
-
function
|
|
579
|
+
function _r(e) {
|
|
593
580
|
const t = [];
|
|
594
581
|
for (const n of e)
|
|
595
|
-
t.push(n), n.children && t.push(...
|
|
582
|
+
t.push(n), n.children && t.push(..._r(n.children));
|
|
596
583
|
return t;
|
|
597
584
|
}
|
|
598
|
-
function
|
|
585
|
+
function yi(e = {}) {
|
|
599
586
|
var Oe;
|
|
600
587
|
const {
|
|
601
588
|
artboardId: t,
|
|
@@ -626,13 +613,13 @@ function xi(e = {}) {
|
|
|
626
613
|
x = x.filter((R) => C.includes(R.id));
|
|
627
614
|
}
|
|
628
615
|
return n || (x = x.filter((C) => C.visible !== !1)), x;
|
|
629
|
-
}, [s, L, n, c]), D = X(() =>
|
|
616
|
+
}, [s, L, n, c]), D = X(() => Gr(
|
|
630
617
|
v,
|
|
631
618
|
a,
|
|
632
619
|
l,
|
|
633
620
|
g.current,
|
|
634
621
|
E
|
|
635
|
-
), [v, a, l, E, m]), w = X(() =>
|
|
622
|
+
), [v, a, l, E, m]), w = X(() => _r(D), [D]), A = X(() => w.filter((x) => x.isSelected), [w]), T = N((x, C = !1) => {
|
|
636
623
|
C ? l.includes(x) ? h(l.filter((R) => R !== x)) : h([...l, x]) : u(x);
|
|
637
624
|
}, [l, h, u]), O = N((x) => {
|
|
638
625
|
h(x);
|
|
@@ -796,7 +783,7 @@ function xi(e = {}) {
|
|
|
796
783
|
if (!i) return;
|
|
797
784
|
const x = setTimeout(() => {
|
|
798
785
|
De();
|
|
799
|
-
},
|
|
786
|
+
}, vi);
|
|
800
787
|
return () => clearTimeout(x);
|
|
801
788
|
}, [i, De]);
|
|
802
789
|
const ee = N(() => {
|
|
@@ -915,7 +902,7 @@ function xi(e = {}) {
|
|
|
915
902
|
layerCount: w.length
|
|
916
903
|
};
|
|
917
904
|
}
|
|
918
|
-
class
|
|
905
|
+
class bi {
|
|
919
906
|
constructor() {
|
|
920
907
|
this.isProtectedFlag = !1, this.timeout = null, this.timeoutDuration = 5e3;
|
|
921
908
|
}
|
|
@@ -951,8 +938,8 @@ class ki {
|
|
|
951
938
|
return this.isProtectedFlag;
|
|
952
939
|
}
|
|
953
940
|
}
|
|
954
|
-
const
|
|
955
|
-
function
|
|
941
|
+
const wi = new bi();
|
|
942
|
+
function xi(e, t) {
|
|
956
943
|
const n = e.icons, r = e.aliases || /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
|
|
957
944
|
function i(s) {
|
|
958
945
|
if (n[s]) return o[s] = [];
|
|
@@ -965,7 +952,7 @@ function Si(e, t) {
|
|
|
965
952
|
}
|
|
966
953
|
return Object.keys(n).concat(Object.keys(r)).forEach(i), o;
|
|
967
954
|
}
|
|
968
|
-
const
|
|
955
|
+
const Wr = Object.freeze({
|
|
969
956
|
left: 0,
|
|
970
957
|
top: 0,
|
|
971
958
|
width: 16,
|
|
@@ -974,26 +961,26 @@ const qr = Object.freeze({
|
|
|
974
961
|
rotate: 0,
|
|
975
962
|
vFlip: !1,
|
|
976
963
|
hFlip: !1
|
|
977
|
-
}),
|
|
978
|
-
...
|
|
964
|
+
}), Bn = Object.freeze({
|
|
965
|
+
...Wr,
|
|
979
966
|
...Bt
|
|
980
|
-
}),
|
|
981
|
-
...
|
|
967
|
+
}), En = Object.freeze({
|
|
968
|
+
...Bn,
|
|
982
969
|
body: "",
|
|
983
970
|
hidden: !1
|
|
984
971
|
});
|
|
985
|
-
function
|
|
972
|
+
function ki(e, t) {
|
|
986
973
|
const n = {};
|
|
987
974
|
!e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
|
|
988
975
|
const r = ((e.rotate || 0) + (t.rotate || 0)) % 4;
|
|
989
976
|
return r && (n.rotate = r), n;
|
|
990
977
|
}
|
|
991
978
|
function lr(e, t) {
|
|
992
|
-
const n =
|
|
993
|
-
for (const r in
|
|
979
|
+
const n = ki(e, t);
|
|
980
|
+
for (const r in En) 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]);
|
|
994
981
|
return n;
|
|
995
982
|
}
|
|
996
|
-
function
|
|
983
|
+
function Ci(e, t, n) {
|
|
997
984
|
const r = e.icons, o = e.aliases || /* @__PURE__ */ Object.create(null);
|
|
998
985
|
let i = {};
|
|
999
986
|
function s(a) {
|
|
@@ -1001,47 +988,47 @@ function Ai(e, t, n) {
|
|
|
1001
988
|
}
|
|
1002
989
|
return s(t), n.forEach(s), lr(e, i);
|
|
1003
990
|
}
|
|
1004
|
-
function
|
|
991
|
+
function qr(e, t) {
|
|
1005
992
|
const n = [];
|
|
1006
993
|
if (typeof e != "object" || typeof e.icons != "object") return n;
|
|
1007
994
|
e.not_found instanceof Array && e.not_found.forEach((o) => {
|
|
1008
995
|
t(o, null), n.push(o);
|
|
1009
996
|
});
|
|
1010
|
-
const r =
|
|
997
|
+
const r = xi(e);
|
|
1011
998
|
for (const o in r) {
|
|
1012
999
|
const i = r[o];
|
|
1013
|
-
i && (t(o,
|
|
1000
|
+
i && (t(o, Ci(e, o, i)), n.push(o));
|
|
1014
1001
|
}
|
|
1015
1002
|
return n;
|
|
1016
1003
|
}
|
|
1017
|
-
const
|
|
1004
|
+
const Si = {
|
|
1018
1005
|
provider: "",
|
|
1019
1006
|
aliases: {},
|
|
1020
1007
|
not_found: {},
|
|
1021
|
-
...
|
|
1008
|
+
...Wr
|
|
1022
1009
|
};
|
|
1023
|
-
function
|
|
1010
|
+
function un(e, t) {
|
|
1024
1011
|
for (const n in t) if (n in e && typeof e[n] != typeof t[n]) return !1;
|
|
1025
1012
|
return !0;
|
|
1026
1013
|
}
|
|
1027
|
-
function
|
|
1014
|
+
function Yr(e) {
|
|
1028
1015
|
if (typeof e != "object" || e === null) return null;
|
|
1029
1016
|
const t = e;
|
|
1030
|
-
if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !
|
|
1017
|
+
if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !un(e, Si)) return null;
|
|
1031
1018
|
const n = t.icons;
|
|
1032
1019
|
for (const o in n) {
|
|
1033
1020
|
const i = n[o];
|
|
1034
|
-
if (!o || typeof i.body != "string" || !
|
|
1021
|
+
if (!o || typeof i.body != "string" || !un(i, En)) return null;
|
|
1035
1022
|
}
|
|
1036
1023
|
const r = t.aliases || /* @__PURE__ */ Object.create(null);
|
|
1037
1024
|
for (const o in r) {
|
|
1038
1025
|
const i = r[o], s = i.parent;
|
|
1039
|
-
if (!o || typeof s != "string" || !n[s] && !r[s] || !
|
|
1026
|
+
if (!o || typeof s != "string" || !n[s] && !r[s] || !un(i, En)) return null;
|
|
1040
1027
|
}
|
|
1041
1028
|
return t;
|
|
1042
1029
|
}
|
|
1043
1030
|
const cr = /* @__PURE__ */ Object.create(null);
|
|
1044
|
-
function
|
|
1031
|
+
function Ei(e, t) {
|
|
1045
1032
|
return {
|
|
1046
1033
|
provider: e,
|
|
1047
1034
|
prefix: t,
|
|
@@ -1051,14 +1038,14 @@ function Di(e, t) {
|
|
|
1051
1038
|
}
|
|
1052
1039
|
function it(e, t) {
|
|
1053
1040
|
const n = cr[e] || (cr[e] = /* @__PURE__ */ Object.create(null));
|
|
1054
|
-
return n[t] || (n[t] =
|
|
1041
|
+
return n[t] || (n[t] = Ei(e, t));
|
|
1055
1042
|
}
|
|
1056
|
-
function
|
|
1057
|
-
return
|
|
1043
|
+
function Kr(e, t) {
|
|
1044
|
+
return Yr(t) ? qr(t, (n, r) => {
|
|
1058
1045
|
r ? e.icons[n] = r : e.missing.add(n);
|
|
1059
1046
|
}) : [];
|
|
1060
1047
|
}
|
|
1061
|
-
function
|
|
1048
|
+
function Ai(e, t, n) {
|
|
1062
1049
|
try {
|
|
1063
1050
|
if (typeof n.body == "string")
|
|
1064
1051
|
return e.icons[t] = { ...n }, !0;
|
|
@@ -1066,7 +1053,7 @@ function Li(e, t, n) {
|
|
|
1066
1053
|
}
|
|
1067
1054
|
return !1;
|
|
1068
1055
|
}
|
|
1069
|
-
const
|
|
1056
|
+
const Xr = /^[a-z0-9]+(-[a-z0-9]+)*$/, Kt = (e, t, n, r = "") => {
|
|
1070
1057
|
const o = e.split(":");
|
|
1071
1058
|
if (e.slice(0, 1) === "@") {
|
|
1072
1059
|
if (o.length < 2 || o.length > 3) return null;
|
|
@@ -1101,7 +1088,7 @@ const Jr = /^[a-z0-9]+(-[a-z0-9]+)*$/, Kt = (e, t, n, r = "") => {
|
|
|
1101
1088
|
return null;
|
|
1102
1089
|
}, Pt = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
|
|
1103
1090
|
let xt = !1;
|
|
1104
|
-
function
|
|
1091
|
+
function Jr(e) {
|
|
1105
1092
|
return typeof e == "boolean" && (xt = e), xt;
|
|
1106
1093
|
}
|
|
1107
1094
|
function dr(e) {
|
|
@@ -1111,18 +1098,18 @@ function dr(e) {
|
|
|
1111
1098
|
return n.icons[r] || (n.missing.has(r) ? null : void 0);
|
|
1112
1099
|
}
|
|
1113
1100
|
}
|
|
1114
|
-
function
|
|
1101
|
+
function Vn(e, t) {
|
|
1115
1102
|
const n = Kt(e, !0, xt);
|
|
1116
1103
|
if (!n) return !1;
|
|
1117
1104
|
const r = it(n.provider, n.prefix);
|
|
1118
|
-
return t ?
|
|
1105
|
+
return t ? Ai(r, n.name, t) : (r.missing.add(n.name), !0);
|
|
1119
1106
|
}
|
|
1120
|
-
function
|
|
1107
|
+
function Qr(e, t) {
|
|
1121
1108
|
if (typeof e != "object") return !1;
|
|
1122
1109
|
if (typeof t != "string" && (t = e.provider || ""), xt && !t && !e.prefix) {
|
|
1123
1110
|
let o = !1;
|
|
1124
|
-
return
|
|
1125
|
-
|
|
1111
|
+
return Yr(e) && (e.prefix = "", qr(e, (i, s) => {
|
|
1112
|
+
Vn(i, s) && (o = !0);
|
|
1126
1113
|
})), o;
|
|
1127
1114
|
}
|
|
1128
1115
|
const n = e.prefix;
|
|
@@ -1131,23 +1118,23 @@ function eo(e, t) {
|
|
|
1131
1118
|
name: "a"
|
|
1132
1119
|
})) return !1;
|
|
1133
1120
|
const r = it(t, n);
|
|
1134
|
-
return !!
|
|
1121
|
+
return !!Kr(r, e);
|
|
1135
1122
|
}
|
|
1136
|
-
const
|
|
1123
|
+
const Zr = Object.freeze({
|
|
1137
1124
|
width: null,
|
|
1138
1125
|
height: null
|
|
1139
|
-
}),
|
|
1140
|
-
...
|
|
1126
|
+
}), eo = Object.freeze({
|
|
1127
|
+
...Zr,
|
|
1141
1128
|
...Bt
|
|
1142
|
-
}),
|
|
1143
|
-
function
|
|
1129
|
+
}), Mi = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Di = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
1130
|
+
function An(e, t, n) {
|
|
1144
1131
|
if (t === 1) return e;
|
|
1145
1132
|
if (n = n || 100, typeof e == "number") return Math.ceil(e * t * n) / n;
|
|
1146
1133
|
if (typeof e != "string") return e;
|
|
1147
|
-
const r = e.split(
|
|
1134
|
+
const r = e.split(Mi);
|
|
1148
1135
|
if (r === null || !r.length) return e;
|
|
1149
1136
|
const o = [];
|
|
1150
|
-
let i = r.shift(), s =
|
|
1137
|
+
let i = r.shift(), s = Di.test(i);
|
|
1151
1138
|
for (; ; ) {
|
|
1152
1139
|
if (s) {
|
|
1153
1140
|
const a = parseFloat(i);
|
|
@@ -1157,7 +1144,7 @@ function Mn(e, t, n) {
|
|
|
1157
1144
|
s = !s;
|
|
1158
1145
|
}
|
|
1159
1146
|
}
|
|
1160
|
-
function
|
|
1147
|
+
function Li(e, t = "defs") {
|
|
1161
1148
|
let n = "";
|
|
1162
1149
|
const r = e.indexOf("<" + t);
|
|
1163
1150
|
for (; r >= 0; ) {
|
|
@@ -1172,20 +1159,20 @@ function Ri(e, t = "defs") {
|
|
|
1172
1159
|
content: e
|
|
1173
1160
|
};
|
|
1174
1161
|
}
|
|
1175
|
-
function
|
|
1162
|
+
function Ti(e, t) {
|
|
1176
1163
|
return e ? "<defs>" + e + "</defs>" + t : t;
|
|
1177
1164
|
}
|
|
1178
|
-
function
|
|
1179
|
-
const r =
|
|
1180
|
-
return
|
|
1165
|
+
function Ii(e, t, n) {
|
|
1166
|
+
const r = Li(e);
|
|
1167
|
+
return Ti(r.defs, t + r.content + n);
|
|
1181
1168
|
}
|
|
1182
|
-
const
|
|
1183
|
-
function
|
|
1169
|
+
const Ri = (e) => e === "unset" || e === "undefined" || e === "none";
|
|
1170
|
+
function to(e, t) {
|
|
1184
1171
|
const n = {
|
|
1185
|
-
...
|
|
1172
|
+
...Bn,
|
|
1186
1173
|
...e
|
|
1187
1174
|
}, r = {
|
|
1188
|
-
...
|
|
1175
|
+
...eo,
|
|
1189
1176
|
...t
|
|
1190
1177
|
}, o = {
|
|
1191
1178
|
left: n.left,
|
|
@@ -1210,13 +1197,13 @@ function ro(e, t) {
|
|
|
1210
1197
|
L = o.width / 2 + o.left, g.unshift("rotate(-90 " + L.toString() + " " + L.toString() + ")");
|
|
1211
1198
|
break;
|
|
1212
1199
|
}
|
|
1213
|
-
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)), g.length && (i =
|
|
1200
|
+
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)), g.length && (i = Ii(i, '<g transform="' + g.join(" ") + '">', "</g>"));
|
|
1214
1201
|
});
|
|
1215
1202
|
const s = r.width, a = r.height, l = o.width, c = o.height;
|
|
1216
1203
|
let u, d;
|
|
1217
|
-
s === null ? (d = a === null ? "1em" : a === "auto" ? c : a, u =
|
|
1204
|
+
s === null ? (d = a === null ? "1em" : a === "auto" ? c : a, u = An(d, l / c)) : (u = s === "auto" ? l : s, d = a === null ? An(u, c / l) : a === "auto" ? c : a);
|
|
1218
1205
|
const h = {}, p = (y, g) => {
|
|
1219
|
-
|
|
1206
|
+
Ri(g) || (h[y] = g.toString());
|
|
1220
1207
|
};
|
|
1221
1208
|
p("width", u), p("height", d);
|
|
1222
1209
|
const k = [
|
|
@@ -1231,25 +1218,25 @@ function ro(e, t) {
|
|
|
1231
1218
|
body: i
|
|
1232
1219
|
};
|
|
1233
1220
|
}
|
|
1234
|
-
const
|
|
1235
|
-
let
|
|
1236
|
-
function
|
|
1221
|
+
const Ni = /\sid="(\S+)"/g, zi = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
|
|
1222
|
+
let Oi = 0;
|
|
1223
|
+
function no(e, t = zi) {
|
|
1237
1224
|
const n = [];
|
|
1238
1225
|
let r;
|
|
1239
|
-
for (; r =
|
|
1226
|
+
for (; r = Ni.exec(e); ) n.push(r[1]);
|
|
1240
1227
|
if (!n.length) return e;
|
|
1241
1228
|
const o = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
|
|
1242
1229
|
return n.forEach((i) => {
|
|
1243
|
-
const s = typeof t == "function" ? t(i) : t + (
|
|
1230
|
+
const s = typeof t == "function" ? t(i) : t + (Oi++).toString(), a = i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1244
1231
|
e = e.replace(new RegExp('([#;"])(' + a + ')([")]|\\.[a-z])', "g"), "$1" + s + o + "$3");
|
|
1245
1232
|
}), e = e.replace(new RegExp(o, "g"), ""), e;
|
|
1246
1233
|
}
|
|
1247
|
-
const
|
|
1248
|
-
function
|
|
1249
|
-
|
|
1234
|
+
const Mn = /* @__PURE__ */ Object.create(null);
|
|
1235
|
+
function Fi(e, t) {
|
|
1236
|
+
Mn[e] = t;
|
|
1250
1237
|
}
|
|
1251
|
-
function
|
|
1252
|
-
return
|
|
1238
|
+
function Dn(e) {
|
|
1239
|
+
return Mn[e] || Mn[""];
|
|
1253
1240
|
}
|
|
1254
1241
|
function Un(e) {
|
|
1255
1242
|
let t;
|
|
@@ -1269,22 +1256,22 @@ function Un(e) {
|
|
|
1269
1256
|
const Gn = /* @__PURE__ */ Object.create(null), ht = ["https://api.simplesvg.com", "https://api.unisvg.com"], $t = [];
|
|
1270
1257
|
for (; ht.length > 0; ) ht.length === 1 || Math.random() > 0.5 ? $t.push(ht.shift()) : $t.push(ht.pop());
|
|
1271
1258
|
Gn[""] = Un({ resources: ["https://api.iconify.design"].concat($t) });
|
|
1272
|
-
function
|
|
1259
|
+
function ro(e, t) {
|
|
1273
1260
|
const n = Un(t);
|
|
1274
1261
|
return n === null ? !1 : (Gn[e] = n, !0);
|
|
1275
1262
|
}
|
|
1276
1263
|
function _n(e) {
|
|
1277
1264
|
return Gn[e];
|
|
1278
1265
|
}
|
|
1279
|
-
const
|
|
1266
|
+
const ji = () => {
|
|
1280
1267
|
let e;
|
|
1281
1268
|
try {
|
|
1282
1269
|
if (e = fetch, typeof e == "function") return e;
|
|
1283
1270
|
} catch {
|
|
1284
1271
|
}
|
|
1285
1272
|
};
|
|
1286
|
-
let ur =
|
|
1287
|
-
function
|
|
1273
|
+
let ur = ji();
|
|
1274
|
+
function Pi(e, t) {
|
|
1288
1275
|
const n = _n(e);
|
|
1289
1276
|
if (!n) return 0;
|
|
1290
1277
|
let r;
|
|
@@ -1299,11 +1286,11 @@ function Bi(e, t) {
|
|
|
1299
1286
|
}
|
|
1300
1287
|
return r;
|
|
1301
1288
|
}
|
|
1302
|
-
function
|
|
1289
|
+
function $i(e) {
|
|
1303
1290
|
return e === 404;
|
|
1304
1291
|
}
|
|
1305
|
-
const
|
|
1306
|
-
const r = [], o =
|
|
1292
|
+
const Hi = (e, t, n) => {
|
|
1293
|
+
const r = [], o = Pi(e, t), i = "icons";
|
|
1307
1294
|
let s = {
|
|
1308
1295
|
type: i,
|
|
1309
1296
|
provider: e,
|
|
@@ -1319,19 +1306,19 @@ const Ui = (e, t, n) => {
|
|
|
1319
1306
|
}, a = l.length), s.icons.push(l);
|
|
1320
1307
|
}), r.push(s), r;
|
|
1321
1308
|
};
|
|
1322
|
-
function
|
|
1309
|
+
function Bi(e) {
|
|
1323
1310
|
if (typeof e == "string") {
|
|
1324
1311
|
const t = _n(e);
|
|
1325
1312
|
if (t) return t.path;
|
|
1326
1313
|
}
|
|
1327
1314
|
return "/";
|
|
1328
1315
|
}
|
|
1329
|
-
const
|
|
1316
|
+
const Vi = (e, t, n) => {
|
|
1330
1317
|
if (!ur) {
|
|
1331
1318
|
n("abort", 424);
|
|
1332
1319
|
return;
|
|
1333
1320
|
}
|
|
1334
|
-
let r =
|
|
1321
|
+
let r = Bi(t.provider);
|
|
1335
1322
|
switch (t.type) {
|
|
1336
1323
|
case "icons": {
|
|
1337
1324
|
const i = t.prefix, a = t.icons.join(","), l = new URLSearchParams({ icons: a });
|
|
@@ -1352,7 +1339,7 @@ const _i = (e, t, n) => {
|
|
|
1352
1339
|
const s = i.status;
|
|
1353
1340
|
if (s !== 200) {
|
|
1354
1341
|
setTimeout(() => {
|
|
1355
|
-
n(
|
|
1342
|
+
n($i(s) ? "abort" : "next", s);
|
|
1356
1343
|
});
|
|
1357
1344
|
return;
|
|
1358
1345
|
}
|
|
@@ -1370,17 +1357,17 @@ const _i = (e, t, n) => {
|
|
|
1370
1357
|
}).catch(() => {
|
|
1371
1358
|
n("next", o);
|
|
1372
1359
|
});
|
|
1373
|
-
},
|
|
1374
|
-
prepare:
|
|
1375
|
-
send:
|
|
1360
|
+
}, Ui = {
|
|
1361
|
+
prepare: Hi,
|
|
1362
|
+
send: Vi
|
|
1376
1363
|
};
|
|
1377
|
-
function
|
|
1364
|
+
function oo(e, t) {
|
|
1378
1365
|
e.forEach((n) => {
|
|
1379
1366
|
const r = n.loaderCallbacks;
|
|
1380
1367
|
r && (n.loaderCallbacks = r.filter((o) => o.id !== t));
|
|
1381
1368
|
});
|
|
1382
1369
|
}
|
|
1383
|
-
function
|
|
1370
|
+
function Gi(e) {
|
|
1384
1371
|
e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
|
|
1385
1372
|
e.pendingCallbacksFlag = !1;
|
|
1386
1373
|
const t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
|
|
@@ -1405,13 +1392,13 @@ function qi(e) {
|
|
|
1405
1392
|
else
|
|
1406
1393
|
return n = !0, !0;
|
|
1407
1394
|
return !1;
|
|
1408
|
-
}), s.pending.length !== a && (n ||
|
|
1395
|
+
}), s.pending.length !== a && (n || oo([e], i.id), i.callback(s.loaded.slice(0), s.missing.slice(0), s.pending.slice(0), i.abort));
|
|
1409
1396
|
});
|
|
1410
1397
|
}));
|
|
1411
1398
|
}
|
|
1412
|
-
let
|
|
1413
|
-
function
|
|
1414
|
-
const r =
|
|
1399
|
+
let _i = 0;
|
|
1400
|
+
function Wi(e, t, n) {
|
|
1401
|
+
const r = _i++, o = oo.bind(null, n, r);
|
|
1415
1402
|
if (!t.pending.length) return o;
|
|
1416
1403
|
const i = {
|
|
1417
1404
|
id: r,
|
|
@@ -1423,7 +1410,7 @@ function Ki(e, t, n) {
|
|
|
1423
1410
|
(s.loaderCallbacks || (s.loaderCallbacks = [])).push(i);
|
|
1424
1411
|
}), o;
|
|
1425
1412
|
}
|
|
1426
|
-
function
|
|
1413
|
+
function qi(e) {
|
|
1427
1414
|
const t = {
|
|
1428
1415
|
loaded: [],
|
|
1429
1416
|
missing: [],
|
|
@@ -1449,14 +1436,14 @@ function Xi(e) {
|
|
|
1449
1436
|
u.push(d);
|
|
1450
1437
|
}), t;
|
|
1451
1438
|
}
|
|
1452
|
-
function
|
|
1439
|
+
function Yi(e, t = !0, n = !1) {
|
|
1453
1440
|
const r = [];
|
|
1454
1441
|
return e.forEach((o) => {
|
|
1455
1442
|
const i = typeof o == "string" ? Kt(o, t, n) : o;
|
|
1456
1443
|
i && r.push(i);
|
|
1457
1444
|
}), r;
|
|
1458
1445
|
}
|
|
1459
|
-
const
|
|
1446
|
+
const Ki = {
|
|
1460
1447
|
resources: [],
|
|
1461
1448
|
index: 0,
|
|
1462
1449
|
timeout: 2e3,
|
|
@@ -1464,7 +1451,7 @@ const Qi = {
|
|
|
1464
1451
|
random: !1,
|
|
1465
1452
|
dataAfterTimeout: !1
|
|
1466
1453
|
};
|
|
1467
|
-
function
|
|
1454
|
+
function Xi(e, t, n, r) {
|
|
1468
1455
|
const o = e.resources.length, i = e.random ? Math.floor(Math.random() * o) : e.index;
|
|
1469
1456
|
let s;
|
|
1470
1457
|
if (e.random) {
|
|
@@ -1562,9 +1549,9 @@ function Zi(e, t, n, r) {
|
|
|
1562
1549
|
}
|
|
1563
1550
|
return setTimeout(I), m;
|
|
1564
1551
|
}
|
|
1565
|
-
function
|
|
1552
|
+
function io(e) {
|
|
1566
1553
|
const t = {
|
|
1567
|
-
...
|
|
1554
|
+
...Ki,
|
|
1568
1555
|
...e
|
|
1569
1556
|
};
|
|
1570
1557
|
let n = [];
|
|
@@ -1572,7 +1559,7 @@ function ao(e) {
|
|
|
1572
1559
|
n = n.filter((a) => a().status === "pending");
|
|
1573
1560
|
}
|
|
1574
1561
|
function o(a, l, c) {
|
|
1575
|
-
const u =
|
|
1562
|
+
const u = Xi(t, a, l, (d, h) => {
|
|
1576
1563
|
r(), c && c(d, h);
|
|
1577
1564
|
});
|
|
1578
1565
|
return n.push(u), u;
|
|
@@ -1592,33 +1579,33 @@ function ao(e) {
|
|
|
1592
1579
|
}
|
|
1593
1580
|
function fr() {
|
|
1594
1581
|
}
|
|
1595
|
-
const
|
|
1596
|
-
function
|
|
1597
|
-
if (!
|
|
1582
|
+
const fn = /* @__PURE__ */ Object.create(null);
|
|
1583
|
+
function Ji(e) {
|
|
1584
|
+
if (!fn[e]) {
|
|
1598
1585
|
const t = _n(e);
|
|
1599
1586
|
if (!t) return;
|
|
1600
|
-
const n =
|
|
1587
|
+
const n = io(t), r = {
|
|
1601
1588
|
config: t,
|
|
1602
1589
|
redundancy: n
|
|
1603
1590
|
};
|
|
1604
|
-
|
|
1591
|
+
fn[e] = r;
|
|
1605
1592
|
}
|
|
1606
|
-
return
|
|
1593
|
+
return fn[e];
|
|
1607
1594
|
}
|
|
1608
|
-
function
|
|
1595
|
+
function Qi(e, t, n) {
|
|
1609
1596
|
let r, o;
|
|
1610
1597
|
if (typeof e == "string") {
|
|
1611
|
-
const i =
|
|
1598
|
+
const i = Dn(e);
|
|
1612
1599
|
if (!i)
|
|
1613
1600
|
return n(void 0, 424), fr;
|
|
1614
1601
|
o = i.send;
|
|
1615
|
-
const s =
|
|
1602
|
+
const s = Ji(e);
|
|
1616
1603
|
s && (r = s.redundancy);
|
|
1617
1604
|
} else {
|
|
1618
1605
|
const i = Un(e);
|
|
1619
1606
|
if (i) {
|
|
1620
|
-
r =
|
|
1621
|
-
const s = e.resources ? e.resources[0] : "", a =
|
|
1607
|
+
r = io(i);
|
|
1608
|
+
const s = e.resources ? e.resources[0] : "", a = Dn(s);
|
|
1622
1609
|
a && (o = a.send);
|
|
1623
1610
|
}
|
|
1624
1611
|
}
|
|
@@ -1626,15 +1613,15 @@ function ts(e, t, n) {
|
|
|
1626
1613
|
}
|
|
1627
1614
|
function hr() {
|
|
1628
1615
|
}
|
|
1629
|
-
function
|
|
1616
|
+
function Zi(e) {
|
|
1630
1617
|
e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
|
|
1631
|
-
e.iconsLoaderFlag = !1,
|
|
1618
|
+
e.iconsLoaderFlag = !1, Gi(e);
|
|
1632
1619
|
}));
|
|
1633
1620
|
}
|
|
1634
|
-
function
|
|
1621
|
+
function es(e) {
|
|
1635
1622
|
const t = [], n = [];
|
|
1636
1623
|
return e.forEach((r) => {
|
|
1637
|
-
(r.match(
|
|
1624
|
+
(r.match(Xr) ? t : n).push(r);
|
|
1638
1625
|
}), {
|
|
1639
1626
|
valid: t,
|
|
1640
1627
|
invalid: n
|
|
@@ -1648,14 +1635,14 @@ function gt(e, t, n) {
|
|
|
1648
1635
|
});
|
|
1649
1636
|
}
|
|
1650
1637
|
if (n && typeof n == "object") try {
|
|
1651
|
-
if (!
|
|
1638
|
+
if (!Kr(e, n).length) {
|
|
1652
1639
|
r();
|
|
1653
1640
|
return;
|
|
1654
1641
|
}
|
|
1655
1642
|
} catch (o) {
|
|
1656
1643
|
console.error(o);
|
|
1657
1644
|
}
|
|
1658
|
-
r(),
|
|
1645
|
+
r(), Zi(e);
|
|
1659
1646
|
}
|
|
1660
1647
|
function gr(e, t) {
|
|
1661
1648
|
e instanceof Promise ? e.then((n) => {
|
|
@@ -1664,7 +1651,7 @@ function gr(e, t) {
|
|
|
1664
1651
|
t(null);
|
|
1665
1652
|
}) : t(e);
|
|
1666
1653
|
}
|
|
1667
|
-
function
|
|
1654
|
+
function ts(e, t) {
|
|
1668
1655
|
e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
|
|
1669
1656
|
e.iconsQueueFlag = !1;
|
|
1670
1657
|
const { provider: n, prefix: r } = e, o = e.iconsToLoad;
|
|
@@ -1689,22 +1676,22 @@ function os(e, t) {
|
|
|
1689
1676
|
});
|
|
1690
1677
|
return;
|
|
1691
1678
|
}
|
|
1692
|
-
const { valid: s, invalid: a } =
|
|
1679
|
+
const { valid: s, invalid: a } = es(o);
|
|
1693
1680
|
if (a.length && gt(e, a, null), !s.length) return;
|
|
1694
|
-
const l = r.match(
|
|
1681
|
+
const l = r.match(Xr) ? Dn(n) : null;
|
|
1695
1682
|
if (!l) {
|
|
1696
1683
|
gt(e, s, null);
|
|
1697
1684
|
return;
|
|
1698
1685
|
}
|
|
1699
1686
|
l.prepare(n, r, s).forEach((u) => {
|
|
1700
|
-
|
|
1687
|
+
Qi(n, u, (d) => {
|
|
1701
1688
|
gt(e, u.icons, d);
|
|
1702
1689
|
});
|
|
1703
1690
|
});
|
|
1704
1691
|
}));
|
|
1705
1692
|
}
|
|
1706
|
-
const
|
|
1707
|
-
const n =
|
|
1693
|
+
const so = (e, t) => {
|
|
1694
|
+
const n = Yi(e, !0, Jr()), r = qi(n);
|
|
1708
1695
|
if (!r.pending.length) {
|
|
1709
1696
|
let l = !0;
|
|
1710
1697
|
return t && setTimeout(() => {
|
|
@@ -1726,20 +1713,20 @@ const lo = (e, t) => {
|
|
|
1726
1713
|
p.has(d) || (p.add(d), o[c][u].push(d));
|
|
1727
1714
|
}), i.forEach((l) => {
|
|
1728
1715
|
const c = o[l.provider][l.prefix];
|
|
1729
|
-
c.length &&
|
|
1730
|
-
}), t ?
|
|
1716
|
+
c.length && ts(l, c);
|
|
1717
|
+
}), t ? Wi(t, r, i) : hr;
|
|
1731
1718
|
};
|
|
1732
|
-
function
|
|
1719
|
+
function ns(e, t) {
|
|
1733
1720
|
const n = { ...e };
|
|
1734
1721
|
for (const r in t) {
|
|
1735
1722
|
const o = t[r], i = typeof o;
|
|
1736
|
-
r in
|
|
1723
|
+
r in Zr ? (o === null || o && (i === "string" || i === "number")) && (n[r] = o) : i === typeof n[r] && (n[r] = r === "rotate" ? o % 4 : o);
|
|
1737
1724
|
}
|
|
1738
1725
|
return n;
|
|
1739
1726
|
}
|
|
1740
|
-
const
|
|
1741
|
-
function
|
|
1742
|
-
t.split(
|
|
1727
|
+
const rs = /[\s,]+/;
|
|
1728
|
+
function os(e, t) {
|
|
1729
|
+
t.split(rs).forEach((n) => {
|
|
1743
1730
|
switch (n.trim()) {
|
|
1744
1731
|
case "horizontal":
|
|
1745
1732
|
e.hFlip = !0;
|
|
@@ -1750,7 +1737,7 @@ function as(e, t) {
|
|
|
1750
1737
|
}
|
|
1751
1738
|
});
|
|
1752
1739
|
}
|
|
1753
|
-
function
|
|
1740
|
+
function is(e, t = 0) {
|
|
1754
1741
|
const n = e.replace(/^-?[0-9.]*/, "");
|
|
1755
1742
|
function r(o) {
|
|
1756
1743
|
for (; o < 0; ) o += 4;
|
|
@@ -1775,69 +1762,69 @@ function ls(e, t = 0) {
|
|
|
1775
1762
|
}
|
|
1776
1763
|
return t;
|
|
1777
1764
|
}
|
|
1778
|
-
function
|
|
1765
|
+
function ss(e, t) {
|
|
1779
1766
|
let n = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
|
|
1780
1767
|
for (const r in t) n += " " + r + '="' + t[r] + '"';
|
|
1781
1768
|
return '<svg xmlns="http://www.w3.org/2000/svg"' + n + ">" + e + "</svg>";
|
|
1782
1769
|
}
|
|
1783
|
-
function
|
|
1770
|
+
function as(e) {
|
|
1784
1771
|
return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
|
|
1785
1772
|
}
|
|
1786
|
-
function
|
|
1787
|
-
return "data:image/svg+xml," +
|
|
1773
|
+
function ls(e) {
|
|
1774
|
+
return "data:image/svg+xml," + as(e);
|
|
1788
1775
|
}
|
|
1789
|
-
function
|
|
1790
|
-
return 'url("' +
|
|
1776
|
+
function cs(e) {
|
|
1777
|
+
return 'url("' + ls(e) + '")';
|
|
1791
1778
|
}
|
|
1792
1779
|
let vt;
|
|
1793
|
-
function
|
|
1780
|
+
function ds() {
|
|
1794
1781
|
try {
|
|
1795
1782
|
vt = window.trustedTypes.createPolicy("iconify", { createHTML: (e) => e });
|
|
1796
1783
|
} catch {
|
|
1797
1784
|
vt = null;
|
|
1798
1785
|
}
|
|
1799
1786
|
}
|
|
1800
|
-
function
|
|
1801
|
-
return vt === void 0 &&
|
|
1787
|
+
function us(e) {
|
|
1788
|
+
return vt === void 0 && ds(), vt ? vt.createHTML(e) : e;
|
|
1802
1789
|
}
|
|
1803
|
-
const
|
|
1804
|
-
...
|
|
1790
|
+
const ao = {
|
|
1791
|
+
...eo,
|
|
1805
1792
|
inline: !1
|
|
1806
|
-
},
|
|
1793
|
+
}, fs = {
|
|
1807
1794
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1808
1795
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1809
1796
|
"aria-hidden": !0,
|
|
1810
1797
|
role: "img"
|
|
1811
|
-
},
|
|
1798
|
+
}, hs = {
|
|
1812
1799
|
display: "inline-block"
|
|
1813
|
-
},
|
|
1800
|
+
}, Ln = {
|
|
1814
1801
|
backgroundColor: "currentColor"
|
|
1815
|
-
},
|
|
1802
|
+
}, lo = {
|
|
1816
1803
|
backgroundColor: "transparent"
|
|
1817
1804
|
}, pr = {
|
|
1818
1805
|
Image: "var(--svg)",
|
|
1819
1806
|
Repeat: "no-repeat",
|
|
1820
1807
|
Size: "100% 100%"
|
|
1821
1808
|
}, mr = {
|
|
1822
|
-
WebkitMask:
|
|
1823
|
-
mask:
|
|
1824
|
-
background:
|
|
1809
|
+
WebkitMask: Ln,
|
|
1810
|
+
mask: Ln,
|
|
1811
|
+
background: lo
|
|
1825
1812
|
};
|
|
1826
1813
|
for (const e in mr) {
|
|
1827
1814
|
const t = mr[e];
|
|
1828
1815
|
for (const n in pr)
|
|
1829
1816
|
t[e + n] = pr[n];
|
|
1830
1817
|
}
|
|
1831
|
-
const
|
|
1832
|
-
...
|
|
1818
|
+
const gs = {
|
|
1819
|
+
...ao,
|
|
1833
1820
|
inline: !0
|
|
1834
1821
|
};
|
|
1835
1822
|
function vr(e) {
|
|
1836
1823
|
return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
|
|
1837
1824
|
}
|
|
1838
|
-
const
|
|
1839
|
-
const r = t.inline ?
|
|
1840
|
-
...i === "svg" ?
|
|
1825
|
+
const ps = (e, t, n) => {
|
|
1826
|
+
const r = t.inline ? gs : ao, o = ns(r, t), i = t.mode || "svg", s = {}, a = t.style || {}, l = {
|
|
1827
|
+
...i === "svg" ? fs : {}
|
|
1841
1828
|
};
|
|
1842
1829
|
if (n) {
|
|
1843
1830
|
const g = Kt(n, !1, !0);
|
|
@@ -1880,7 +1867,7 @@ const ys = (e, t, n) => {
|
|
|
1880
1867
|
break;
|
|
1881
1868
|
// Flip as string: 'horizontal,vertical'
|
|
1882
1869
|
case "flip":
|
|
1883
|
-
typeof m == "string" &&
|
|
1870
|
+
typeof m == "string" && os(o, m);
|
|
1884
1871
|
break;
|
|
1885
1872
|
// Color: copy to style
|
|
1886
1873
|
case "color":
|
|
@@ -1888,7 +1875,7 @@ const ys = (e, t, n) => {
|
|
|
1888
1875
|
break;
|
|
1889
1876
|
// Rotation as string
|
|
1890
1877
|
case "rotate":
|
|
1891
|
-
typeof m == "string" ? o[g] =
|
|
1878
|
+
typeof m == "string" ? o[g] = is(m) : typeof m == "number" && (o[g] = m);
|
|
1892
1879
|
break;
|
|
1893
1880
|
// Remove aria-hidden
|
|
1894
1881
|
case "ariaHidden":
|
|
@@ -1900,7 +1887,7 @@ const ys = (e, t, n) => {
|
|
|
1900
1887
|
r[g] === void 0 && (l[g] = m);
|
|
1901
1888
|
}
|
|
1902
1889
|
}
|
|
1903
|
-
const c =
|
|
1890
|
+
const c = to(e, o), u = c.attributes;
|
|
1904
1891
|
if (o.inline && (s.verticalAlign = "-0.125em"), i === "svg") {
|
|
1905
1892
|
l.style = {
|
|
1906
1893
|
...s,
|
|
@@ -1908,26 +1895,26 @@ const ys = (e, t, n) => {
|
|
|
1908
1895
|
}, Object.assign(l, u);
|
|
1909
1896
|
let g = 0, m = t.id;
|
|
1910
1897
|
return typeof m == "string" && (m = m.replace(/-/g, "_")), l.dangerouslySetInnerHTML = {
|
|
1911
|
-
__html:
|
|
1912
|
-
},
|
|
1898
|
+
__html: us(no(c.body, m ? () => m + "ID" + g++ : "iconifyReact"))
|
|
1899
|
+
}, Sn("svg", l);
|
|
1913
1900
|
}
|
|
1914
|
-
const { body: d, width: h, height: p } = e, k = i === "mask" || (i === "bg" ? !1 : d.indexOf("currentColor") !== -1), y =
|
|
1901
|
+
const { body: d, width: h, height: p } = e, k = i === "mask" || (i === "bg" ? !1 : d.indexOf("currentColor") !== -1), y = ss(d, {
|
|
1915
1902
|
...u,
|
|
1916
1903
|
width: h + "",
|
|
1917
1904
|
height: p + ""
|
|
1918
1905
|
});
|
|
1919
1906
|
return l.style = {
|
|
1920
1907
|
...s,
|
|
1921
|
-
"--svg":
|
|
1908
|
+
"--svg": cs(y),
|
|
1922
1909
|
width: vr(u.width),
|
|
1923
1910
|
height: vr(u.height),
|
|
1924
|
-
...
|
|
1925
|
-
...k ?
|
|
1911
|
+
...hs,
|
|
1912
|
+
...k ? Ln : lo,
|
|
1926
1913
|
...a
|
|
1927
|
-
},
|
|
1914
|
+
}, Sn("span", l);
|
|
1928
1915
|
};
|
|
1929
|
-
|
|
1930
|
-
|
|
1916
|
+
Jr(!0);
|
|
1917
|
+
Fi("", Ui);
|
|
1931
1918
|
if (typeof document < "u" && typeof window < "u") {
|
|
1932
1919
|
const e = window;
|
|
1933
1920
|
if (e.IconifyPreload !== void 0) {
|
|
@@ -1937,7 +1924,7 @@ if (typeof document < "u" && typeof window < "u") {
|
|
|
1937
1924
|
// Check if item is an object and not null/array
|
|
1938
1925
|
(typeof r != "object" || r === null || r instanceof Array || // Check for 'icons' and 'prefix'
|
|
1939
1926
|
typeof r.icons != "object" || typeof r.prefix != "string" || // Add icon set
|
|
1940
|
-
!
|
|
1927
|
+
!Qr(r)) && console.error(n);
|
|
1941
1928
|
} catch {
|
|
1942
1929
|
console.error(n);
|
|
1943
1930
|
}
|
|
@@ -1952,14 +1939,14 @@ if (typeof document < "u" && typeof window < "u") {
|
|
|
1952
1939
|
const o = t[n];
|
|
1953
1940
|
if (typeof o != "object" || !o || o.resources === void 0)
|
|
1954
1941
|
continue;
|
|
1955
|
-
|
|
1942
|
+
ro(n, o) || console.error(r);
|
|
1956
1943
|
} catch {
|
|
1957
1944
|
console.error(r);
|
|
1958
1945
|
}
|
|
1959
1946
|
}
|
|
1960
1947
|
}
|
|
1961
1948
|
}
|
|
1962
|
-
function
|
|
1949
|
+
function co(e) {
|
|
1963
1950
|
const [t, n] = B(!!e.ssr), [r, o] = B({});
|
|
1964
1951
|
function i(p) {
|
|
1965
1952
|
if (p) {
|
|
@@ -2005,7 +1992,7 @@ function fo(e) {
|
|
|
2005
1992
|
data: y
|
|
2006
1993
|
}))
|
|
2007
1994
|
if (y === void 0) {
|
|
2008
|
-
const g =
|
|
1995
|
+
const g = so([k], u);
|
|
2009
1996
|
o({
|
|
2010
1997
|
callback: g
|
|
2011
1998
|
});
|
|
@@ -2015,39 +2002,42 @@ function fo(e) {
|
|
|
2015
2002
|
t && u();
|
|
2016
2003
|
}, [e.icon, t]);
|
|
2017
2004
|
const { name: d, data: h } = s;
|
|
2018
|
-
return h ?
|
|
2019
|
-
...
|
|
2005
|
+
return h ? ps({
|
|
2006
|
+
...Bn,
|
|
2020
2007
|
...h
|
|
2021
|
-
}, e, d) : e.children ? e.children : e.fallback ? e.fallback :
|
|
2008
|
+
}, e, d) : e.children ? e.children : e.fallback ? e.fallback : Sn("span", {});
|
|
2022
2009
|
}
|
|
2023
|
-
const $ =
|
|
2010
|
+
const $ = Pn((e, t) => co({
|
|
2024
2011
|
...e,
|
|
2025
2012
|
_ref: t
|
|
2026
2013
|
}));
|
|
2027
|
-
|
|
2014
|
+
Pn((e, t) => co({
|
|
2028
2015
|
inline: !0,
|
|
2029
2016
|
...e,
|
|
2030
2017
|
_ref: t
|
|
2031
2018
|
}));
|
|
2032
|
-
const
|
|
2019
|
+
const uc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2033
2020
|
__proto__: null,
|
|
2034
2021
|
Icon: $,
|
|
2035
|
-
addAPIProvider:
|
|
2036
|
-
addCollection:
|
|
2037
|
-
addIcon:
|
|
2038
|
-
buildIcon:
|
|
2039
|
-
calculateSize:
|
|
2040
|
-
loadIcons:
|
|
2041
|
-
replaceIDs:
|
|
2042
|
-
}, Symbol.toStringTag, { value: "Module" }))
|
|
2022
|
+
addAPIProvider: ro,
|
|
2023
|
+
addCollection: Qr,
|
|
2024
|
+
addIcon: Vn,
|
|
2025
|
+
buildIcon: to,
|
|
2026
|
+
calculateSize: An,
|
|
2027
|
+
loadIcons: so,
|
|
2028
|
+
replaceIDs: no
|
|
2029
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
2030
|
+
if (typeof window < "u")
|
|
2031
|
+
for (const [e, t] of Object.entries(mi)) Vn(e, t);
|
|
2032
|
+
const ms = Vr({ prefix: "sc" });
|
|
2043
2033
|
function Re(...e) {
|
|
2044
|
-
return
|
|
2034
|
+
return ms(Br(e));
|
|
2045
2035
|
}
|
|
2046
|
-
const
|
|
2047
|
-
function
|
|
2048
|
-
return F.useContext(
|
|
2036
|
+
const uo = F.createContext({ variant: "transparent" });
|
|
2037
|
+
function vs() {
|
|
2038
|
+
return F.useContext(uo);
|
|
2049
2039
|
}
|
|
2050
|
-
const
|
|
2040
|
+
const ys = Ur("", {
|
|
2051
2041
|
variants: {
|
|
2052
2042
|
variant: {
|
|
2053
2043
|
transparent: "sc:bg-transparent",
|
|
@@ -2058,14 +2048,14 @@ const ks = Ur("", {
|
|
|
2058
2048
|
defaultVariants: {
|
|
2059
2049
|
variant: "default"
|
|
2060
2050
|
}
|
|
2061
|
-
}),
|
|
2051
|
+
}), fo = F.forwardRef(
|
|
2062
2052
|
({ className: e, variant: t = "default", asChild: n = !1, children: r, ...o }, i) => {
|
|
2063
|
-
const s = n ?
|
|
2064
|
-
return /* @__PURE__ */ f(
|
|
2053
|
+
const s = n ? pi : "div";
|
|
2054
|
+
return /* @__PURE__ */ f(uo.Provider, { value: { variant: t ?? "default" }, children: /* @__PURE__ */ f(s, { ref: i, className: Re(ys({ variant: t }), e), ...o, children: r }) });
|
|
2065
2055
|
}
|
|
2066
2056
|
);
|
|
2067
|
-
|
|
2068
|
-
const
|
|
2057
|
+
fo.displayName = "Surface";
|
|
2058
|
+
const bs = Ur(
|
|
2069
2059
|
"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",
|
|
2070
2060
|
{
|
|
2071
2061
|
variants: {
|
|
@@ -2112,7 +2102,7 @@ const Cs = Ur(
|
|
|
2112
2102
|
}
|
|
2113
2103
|
), st = F.forwardRef(
|
|
2114
2104
|
({ className: e, variant: t, size: n, onPress: r, isPending: o, onClick: i, disabled: s, selected: a, children: l, ...c }, u) => {
|
|
2115
|
-
const { variant: d } =
|
|
2105
|
+
const { variant: d } = vs(), h = d === "default", p = d === "secondary", k = (g) => {
|
|
2116
2106
|
r && r(g), i && i(g);
|
|
2117
2107
|
}, y = {
|
|
2118
2108
|
secondary: t === "secondary" && (p ? "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),
|
|
@@ -2124,7 +2114,7 @@ const Cs = Ur(
|
|
|
2124
2114
|
"button",
|
|
2125
2115
|
{
|
|
2126
2116
|
className: Re(
|
|
2127
|
-
|
|
2117
|
+
bs({ variant: t, size: n }),
|
|
2128
2118
|
y.secondary,
|
|
2129
2119
|
y.field,
|
|
2130
2120
|
y.ghost,
|
|
@@ -2142,14 +2132,14 @@ const Cs = Ur(
|
|
|
2142
2132
|
}
|
|
2143
2133
|
);
|
|
2144
2134
|
st.displayName = "Button";
|
|
2145
|
-
const
|
|
2135
|
+
const ho = F.createContext(null);
|
|
2146
2136
|
function Wn() {
|
|
2147
|
-
const e = F.useContext(
|
|
2137
|
+
const e = F.useContext(ho);
|
|
2148
2138
|
if (!e)
|
|
2149
2139
|
throw new Error("Drawer components must be used within a Drawer");
|
|
2150
2140
|
return e;
|
|
2151
2141
|
}
|
|
2152
|
-
function
|
|
2142
|
+
function go({
|
|
2153
2143
|
open: e,
|
|
2154
2144
|
defaultOpen: t = !1,
|
|
2155
2145
|
onOpenChange: n,
|
|
@@ -2169,10 +2159,10 @@ function mo({
|
|
|
2169
2159
|
}, c);
|
|
2170
2160
|
return () => clearTimeout(d);
|
|
2171
2161
|
} else u.current && (u.current = !1, document.documentElement.hasAttribute("data-drawer-open") && (document.documentElement.removeAttribute("data-drawer-open"), window.dispatchEvent(new CustomEvent("drawer-close"))));
|
|
2172
|
-
}, [a]), /* @__PURE__ */ f(
|
|
2162
|
+
}, [a]), /* @__PURE__ */ f(ho.Provider, { value: { open: a, onOpenChange: l }, children: r });
|
|
2173
2163
|
}
|
|
2174
|
-
|
|
2175
|
-
const
|
|
2164
|
+
go.displayName = "Drawer";
|
|
2165
|
+
const ws = F.forwardRef(
|
|
2176
2166
|
({ asChild: e, onClick: t, children: n, ...r }, o) => {
|
|
2177
2167
|
const { onOpenChange: i } = Wn(), s = (a) => {
|
|
2178
2168
|
t == null || t(a), i(!0);
|
|
@@ -2185,8 +2175,8 @@ const Ss = F.forwardRef(
|
|
|
2185
2175
|
) : /* @__PURE__ */ f("button", { ref: o, onClick: s, ...r, children: n });
|
|
2186
2176
|
}
|
|
2187
2177
|
);
|
|
2188
|
-
|
|
2189
|
-
const
|
|
2178
|
+
ws.displayName = "DrawerTrigger";
|
|
2179
|
+
const xs = F.forwardRef(
|
|
2190
2180
|
({ asChild: e, onClick: t, children: n, ...r }, o) => {
|
|
2191
2181
|
const { onOpenChange: i } = Wn(), s = (a) => {
|
|
2192
2182
|
t == null || t(a), i(!1);
|
|
@@ -2199,8 +2189,8 @@ const Es = F.forwardRef(
|
|
|
2199
2189
|
) : /* @__PURE__ */ f("button", { ref: o, onClick: s, ...r, children: n });
|
|
2200
2190
|
}
|
|
2201
2191
|
);
|
|
2202
|
-
|
|
2203
|
-
const
|
|
2192
|
+
xs.displayName = "DrawerClose";
|
|
2193
|
+
const po = F.forwardRef(
|
|
2204
2194
|
({
|
|
2205
2195
|
className: e,
|
|
2206
2196
|
children: t,
|
|
@@ -2332,7 +2322,7 @@ const vo = F.forwardRef(
|
|
|
2332
2322
|
const Se = _ || w, ye = {
|
|
2333
2323
|
"--animation-duration": `${p}ms`
|
|
2334
2324
|
};
|
|
2335
|
-
return
|
|
2325
|
+
return Hn(
|
|
2336
2326
|
// The .sc-root wrapper is load-bearing: a body portal escapes the
|
|
2337
2327
|
// editor's .sc-root scope, so without it every scoped theme token
|
|
2338
2328
|
// (--sc-spacing-*, --sc-color-*, --sc-z-*) inside the drawer resolves
|
|
@@ -2392,7 +2382,7 @@ const vo = F.forwardRef(
|
|
|
2392
2382
|
top: n === "bottom" ? ke : 0,
|
|
2393
2383
|
transition: "top 10ms ease-out"
|
|
2394
2384
|
},
|
|
2395
|
-
children: /* @__PURE__ */ f(
|
|
2385
|
+
children: /* @__PURE__ */ f(fo, { asChild: !0, variant: "default", children: /* @__PURE__ */ j(
|
|
2396
2386
|
"div",
|
|
2397
2387
|
{
|
|
2398
2388
|
ref: Y,
|
|
@@ -2497,8 +2487,8 @@ const vo = F.forwardRef(
|
|
|
2497
2487
|
);
|
|
2498
2488
|
}
|
|
2499
2489
|
);
|
|
2500
|
-
|
|
2501
|
-
const
|
|
2490
|
+
po.displayName = "DrawerContent";
|
|
2491
|
+
const mo = F.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(
|
|
2502
2492
|
"h2",
|
|
2503
2493
|
{
|
|
2504
2494
|
ref: n,
|
|
@@ -2509,8 +2499,8 @@ const yo = F.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(
|
|
|
2509
2499
|
...t
|
|
2510
2500
|
}
|
|
2511
2501
|
));
|
|
2512
|
-
|
|
2513
|
-
const
|
|
2502
|
+
mo.displayName = "DrawerTitle";
|
|
2503
|
+
const vo = F.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(
|
|
2514
2504
|
"p",
|
|
2515
2505
|
{
|
|
2516
2506
|
ref: n,
|
|
@@ -2518,8 +2508,8 @@ const bo = F.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(
|
|
|
2518
2508
|
...t
|
|
2519
2509
|
}
|
|
2520
2510
|
));
|
|
2521
|
-
|
|
2522
|
-
const
|
|
2511
|
+
vo.displayName = "DrawerDescription";
|
|
2512
|
+
const ks = ot.Provider, Cs = ot.Root, Xt = ot.Trigger, At = F.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ f(ot.Portal, { children: /* @__PURE__ */ f(
|
|
2523
2513
|
ot.Content,
|
|
2524
2514
|
{
|
|
2525
2515
|
ref: r,
|
|
@@ -2534,14 +2524,14 @@ const As = ot.Provider, Ms = ot.Root, Xt = ot.Trigger, At = F.forwardRef(({ clas
|
|
|
2534
2524
|
}
|
|
2535
2525
|
) }));
|
|
2536
2526
|
At.displayName = ot.Content.displayName;
|
|
2537
|
-
const
|
|
2527
|
+
const Ss = ({ children: e, delayDuration: t, delay: n, ...r }) => /* @__PURE__ */ f(ks, { children: /* @__PURE__ */ f(Cs, { delayDuration: n ?? t ?? 200, ...r, children: e }) }), qn = Object.assign(Ss, {
|
|
2538
2528
|
Trigger: Xt,
|
|
2539
2529
|
Content: At
|
|
2540
|
-
}),
|
|
2541
|
-
function
|
|
2542
|
-
return
|
|
2530
|
+
}), Es = Vr({ prefix: "sc" });
|
|
2531
|
+
function Tn(...e) {
|
|
2532
|
+
return Es(Br(e));
|
|
2543
2533
|
}
|
|
2544
|
-
const
|
|
2534
|
+
const As = {
|
|
2545
2535
|
"gravity-ui": 1.2,
|
|
2546
2536
|
// Thinner strokes need +20% (20px → 24px)
|
|
2547
2537
|
lucide: 1,
|
|
@@ -2559,11 +2549,11 @@ const Ts = {
|
|
|
2559
2549
|
// Filled variants are heavy
|
|
2560
2550
|
"simple-icons": 0.95,
|
|
2561
2551
|
"eos-icons": 1
|
|
2562
|
-
},
|
|
2552
|
+
}, Ms = 1, Ds = {
|
|
2563
2553
|
"gravity-ui:arrow-rotate-left": { x: 4, y: 4 },
|
|
2564
2554
|
"gravity-ui:arrow-rotate-right": { x: -4, y: 4 },
|
|
2565
2555
|
"gravity-ui:sparkles": { x: 2, y: -2 }
|
|
2566
|
-
},
|
|
2556
|
+
}, Ls = {
|
|
2567
2557
|
xs: 12,
|
|
2568
2558
|
sm: 16,
|
|
2569
2559
|
md: 20,
|
|
@@ -2571,35 +2561,35 @@ const Ts = {
|
|
|
2571
2561
|
xl: 32,
|
|
2572
2562
|
toolbar: { mobile: 24, desktop: 20 }
|
|
2573
2563
|
};
|
|
2574
|
-
function
|
|
2564
|
+
function Ts(e) {
|
|
2575
2565
|
const t = e.indexOf(":");
|
|
2576
2566
|
return t === -1 ? "" : e.substring(0, t);
|
|
2577
2567
|
}
|
|
2578
|
-
function
|
|
2579
|
-
return
|
|
2568
|
+
function Is(e) {
|
|
2569
|
+
return As[e] ?? Ms;
|
|
2580
2570
|
}
|
|
2581
|
-
function
|
|
2582
|
-
return
|
|
2571
|
+
function Rs(e) {
|
|
2572
|
+
return Ds[e] ?? null;
|
|
2583
2573
|
}
|
|
2584
|
-
function
|
|
2585
|
-
const n =
|
|
2574
|
+
function hn(e, t) {
|
|
2575
|
+
const n = Is(t);
|
|
2586
2576
|
return Math.round(e * n);
|
|
2587
2577
|
}
|
|
2588
|
-
const
|
|
2578
|
+
const yo = ({
|
|
2589
2579
|
icon: e,
|
|
2590
2580
|
size: t = "md",
|
|
2591
2581
|
className: n
|
|
2592
2582
|
}) => {
|
|
2593
|
-
const r =
|
|
2583
|
+
const r = Ts(e), o = Ls[t], i = Rs(e);
|
|
2594
2584
|
if (typeof o == "object") {
|
|
2595
|
-
const l =
|
|
2585
|
+
const l = hn(o.mobile, r), c = hn(o.desktop, r), u = i ? {
|
|
2596
2586
|
x: i.x * l / 20,
|
|
2597
2587
|
y: i.y * l / 20
|
|
2598
2588
|
} : null;
|
|
2599
2589
|
return /* @__PURE__ */ f(
|
|
2600
2590
|
"span",
|
|
2601
2591
|
{
|
|
2602
|
-
className:
|
|
2592
|
+
className: Tn("sc-normalized-icon-responsive sc:inline-flex", n),
|
|
2603
2593
|
style: {
|
|
2604
2594
|
"--icon-size-mobile": `${l}px`,
|
|
2605
2595
|
"--icon-size-desktop": `${c}px`,
|
|
@@ -2618,14 +2608,14 @@ const wo = ({
|
|
|
2618
2608
|
}
|
|
2619
2609
|
);
|
|
2620
2610
|
}
|
|
2621
|
-
const s =
|
|
2611
|
+
const s = hn(o, r), a = i ? {
|
|
2622
2612
|
x: i.x * s / 20,
|
|
2623
2613
|
y: i.y * s / 20
|
|
2624
2614
|
} : null;
|
|
2625
2615
|
return /* @__PURE__ */ f(
|
|
2626
2616
|
"span",
|
|
2627
2617
|
{
|
|
2628
|
-
className:
|
|
2618
|
+
className: Tn("sc:inline-flex", n),
|
|
2629
2619
|
style: { width: `${s}px`, height: `${s}px` },
|
|
2630
2620
|
children: /* @__PURE__ */ f(
|
|
2631
2621
|
$,
|
|
@@ -2639,8 +2629,8 @@ const wo = ({
|
|
|
2639
2629
|
}
|
|
2640
2630
|
);
|
|
2641
2631
|
};
|
|
2642
|
-
|
|
2643
|
-
const
|
|
2632
|
+
yo.displayName = "NormalizedIcon";
|
|
2633
|
+
const In = ne.forwardRef(
|
|
2644
2634
|
({
|
|
2645
2635
|
icon: e,
|
|
2646
2636
|
onClick: t,
|
|
@@ -2667,8 +2657,8 @@ const Rn = ne.forwardRef(
|
|
|
2667
2657
|
"data-active": n,
|
|
2668
2658
|
"data-testid": a,
|
|
2669
2659
|
onMouseLeave: u,
|
|
2670
|
-
className:
|
|
2671
|
-
children: typeof e == "string" ? /* @__PURE__ */ f(
|
|
2660
|
+
className: Tn(c),
|
|
2661
|
+
children: typeof e == "string" ? /* @__PURE__ */ f(yo, { icon: e, size: "toolbar" }) : e
|
|
2672
2662
|
}
|
|
2673
2663
|
);
|
|
2674
2664
|
return !r || i ? h : /* @__PURE__ */ j(qn, { delay: o, children: [
|
|
@@ -2677,7 +2667,7 @@ const Rn = ne.forwardRef(
|
|
|
2677
2667
|
] });
|
|
2678
2668
|
}
|
|
2679
2669
|
);
|
|
2680
|
-
|
|
2670
|
+
In.displayName = "ToolbarButton";
|
|
2681
2671
|
const G = {
|
|
2682
2672
|
// Navigation/Actions
|
|
2683
2673
|
plus: "lucide:plus",
|
|
@@ -2776,7 +2766,7 @@ const G = {
|
|
|
2776
2766
|
n && /* @__PURE__ */ f("span", { className: "sc:ml-auto sc:text-sm sc:text-text-muted", children: n }),
|
|
2777
2767
|
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" }) })
|
|
2778
2768
|
] });
|
|
2779
|
-
},
|
|
2769
|
+
}, gn = Qe("useArtboards"), Ns = () => {
|
|
2780
2770
|
const {
|
|
2781
2771
|
artboards: e,
|
|
2782
2772
|
artboardManager: t,
|
|
@@ -2824,7 +2814,7 @@ const G = {
|
|
|
2824
2814
|
}, [t, n]), d = N((g) => {
|
|
2825
2815
|
const m = e.find((S) => S.id === g);
|
|
2826
2816
|
if (!m) {
|
|
2827
|
-
|
|
2817
|
+
gn.warn(`[useArtboards] Artboard ${g} not found`);
|
|
2828
2818
|
return;
|
|
2829
2819
|
}
|
|
2830
2820
|
t.createArtboard({
|
|
@@ -2837,14 +2827,14 @@ const G = {
|
|
|
2837
2827
|
}, [e, t, n]), h = N((g, m) => {
|
|
2838
2828
|
const S = e.find((M) => M.id === g);
|
|
2839
2829
|
if (!S) {
|
|
2840
|
-
|
|
2830
|
+
gn.warn(`[useArtboards] Artboard ${g} not found`);
|
|
2841
2831
|
return;
|
|
2842
2832
|
}
|
|
2843
2833
|
S.name = m, n();
|
|
2844
2834
|
}, [e, n]), p = N((g, m) => {
|
|
2845
2835
|
const S = e.find((M) => M.id === g);
|
|
2846
2836
|
if (!S) {
|
|
2847
|
-
|
|
2837
|
+
gn.warn(`[useArtboards] Artboard ${g} not found`);
|
|
2848
2838
|
return;
|
|
2849
2839
|
}
|
|
2850
2840
|
m.name !== void 0 && (S.name = m.name), m.width !== void 0 && (S.width = m.width), m.height !== void 0 && (S.height = m.height), m.backgroundColor !== void 0 && (S.backgroundColor = m.backgroundColor), m.clipShape !== void 0 && (S.clipShape = m.clipShape), "distressTexture" in m && (S.distressTexture = m.distressTexture ? { ...m.distressTexture } : void 0), n();
|
|
@@ -2890,13 +2880,13 @@ function Kn(e) {
|
|
|
2890
2880
|
function Mt(e) {
|
|
2891
2881
|
return at(e) ? !1 : e instanceof Ce(e).HTMLElement;
|
|
2892
2882
|
}
|
|
2893
|
-
function
|
|
2883
|
+
function bo(e) {
|
|
2894
2884
|
return e instanceof Ce(e).SVGElement;
|
|
2895
2885
|
}
|
|
2896
2886
|
function lt(e) {
|
|
2897
|
-
return e ? at(e) ? e.document : Yn(e) ? Kn(e) ? e : Mt(e) ||
|
|
2887
|
+
return e ? at(e) ? e.document : Yn(e) ? Kn(e) ? e : Mt(e) || bo(e) ? e.ownerDocument : document : document : document;
|
|
2898
2888
|
}
|
|
2899
|
-
const _e = Jt ?
|
|
2889
|
+
const _e = Jt ? $n : q;
|
|
2900
2890
|
function Qt(e) {
|
|
2901
2891
|
const t = V(e);
|
|
2902
2892
|
return _e(() => {
|
|
@@ -2907,7 +2897,7 @@ function Qt(e) {
|
|
|
2907
2897
|
return t.current == null ? void 0 : t.current(...r);
|
|
2908
2898
|
}, []);
|
|
2909
2899
|
}
|
|
2910
|
-
function
|
|
2900
|
+
function zs() {
|
|
2911
2901
|
const e = V(null), t = N((r, o) => {
|
|
2912
2902
|
e.current = setInterval(r, o);
|
|
2913
2903
|
}, []), n = N(() => {
|
|
@@ -2949,16 +2939,16 @@ function Ut(e) {
|
|
|
2949
2939
|
t.current = e;
|
|
2950
2940
|
}, [e]), t.current;
|
|
2951
2941
|
}
|
|
2952
|
-
let
|
|
2942
|
+
let pn = {};
|
|
2953
2943
|
function Zt(e, t) {
|
|
2954
2944
|
return X(() => {
|
|
2955
2945
|
if (t)
|
|
2956
2946
|
return t;
|
|
2957
|
-
const n =
|
|
2958
|
-
return
|
|
2947
|
+
const n = pn[e] == null ? 0 : pn[e] + 1;
|
|
2948
|
+
return pn[e] = n, e + "-" + n;
|
|
2959
2949
|
}, [e, t]);
|
|
2960
2950
|
}
|
|
2961
|
-
function
|
|
2951
|
+
function wo(e) {
|
|
2962
2952
|
return function(t) {
|
|
2963
2953
|
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
|
|
2964
2954
|
r[o - 1] = arguments[o];
|
|
@@ -2974,8 +2964,8 @@ function ko(e) {
|
|
|
2974
2964
|
});
|
|
2975
2965
|
};
|
|
2976
2966
|
}
|
|
2977
|
-
const nt = /* @__PURE__ */
|
|
2978
|
-
function
|
|
2967
|
+
const nt = /* @__PURE__ */ wo(1), Ct = /* @__PURE__ */ wo(-1);
|
|
2968
|
+
function Os(e) {
|
|
2979
2969
|
return "clientX" in e && "clientY" in e;
|
|
2980
2970
|
}
|
|
2981
2971
|
function Xn(e) {
|
|
@@ -2986,7 +2976,7 @@ function Xn(e) {
|
|
|
2986
2976
|
} = Ce(e.target);
|
|
2987
2977
|
return t && e instanceof t;
|
|
2988
2978
|
}
|
|
2989
|
-
function
|
|
2979
|
+
function Fs(e) {
|
|
2990
2980
|
if (!e)
|
|
2991
2981
|
return !1;
|
|
2992
2982
|
const {
|
|
@@ -2995,7 +2985,7 @@ function Hs(e) {
|
|
|
2995
2985
|
return t && e instanceof t;
|
|
2996
2986
|
}
|
|
2997
2987
|
function Gt(e) {
|
|
2998
|
-
if (
|
|
2988
|
+
if (Fs(e)) {
|
|
2999
2989
|
if (e.touches && e.touches.length) {
|
|
3000
2990
|
const {
|
|
3001
2991
|
clientX: t,
|
|
@@ -3016,7 +3006,7 @@ function Gt(e) {
|
|
|
3016
3006
|
};
|
|
3017
3007
|
}
|
|
3018
3008
|
}
|
|
3019
|
-
return
|
|
3009
|
+
return Os(e) ? {
|
|
3020
3010
|
x: e.clientX,
|
|
3021
3011
|
y: e.clientY
|
|
3022
3012
|
} : null;
|
|
@@ -3061,23 +3051,23 @@ const St = /* @__PURE__ */ Object.freeze({
|
|
|
3061
3051
|
}
|
|
3062
3052
|
}
|
|
3063
3053
|
}), yr = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
|
|
3064
|
-
function
|
|
3054
|
+
function js(e) {
|
|
3065
3055
|
return e.matches(yr) ? e : e.querySelector(yr);
|
|
3066
3056
|
}
|
|
3067
|
-
const
|
|
3057
|
+
const Ps = {
|
|
3068
3058
|
display: "none"
|
|
3069
3059
|
};
|
|
3070
|
-
function
|
|
3060
|
+
function $s(e) {
|
|
3071
3061
|
let {
|
|
3072
3062
|
id: t,
|
|
3073
3063
|
value: n
|
|
3074
3064
|
} = e;
|
|
3075
3065
|
return ne.createElement("div", {
|
|
3076
3066
|
id: t,
|
|
3077
|
-
style:
|
|
3067
|
+
style: Ps
|
|
3078
3068
|
}, n);
|
|
3079
3069
|
}
|
|
3080
|
-
function
|
|
3070
|
+
function Hs(e) {
|
|
3081
3071
|
let {
|
|
3082
3072
|
id: t,
|
|
3083
3073
|
announcement: n,
|
|
@@ -3105,7 +3095,7 @@ function Gs(e) {
|
|
|
3105
3095
|
"aria-atomic": !0
|
|
3106
3096
|
}, n);
|
|
3107
3097
|
}
|
|
3108
|
-
function
|
|
3098
|
+
function Bs() {
|
|
3109
3099
|
const [e, t] = B("");
|
|
3110
3100
|
return {
|
|
3111
3101
|
announce: N((r) => {
|
|
@@ -3114,16 +3104,16 @@ function _s() {
|
|
|
3114
3104
|
announcement: e
|
|
3115
3105
|
};
|
|
3116
3106
|
}
|
|
3117
|
-
const
|
|
3118
|
-
function
|
|
3119
|
-
const t = Be(
|
|
3107
|
+
const xo = /* @__PURE__ */ Je(null);
|
|
3108
|
+
function Vs(e) {
|
|
3109
|
+
const t = Be(xo);
|
|
3120
3110
|
q(() => {
|
|
3121
3111
|
if (!t)
|
|
3122
3112
|
throw new Error("useDndMonitor must be used within a children of <DndContext>");
|
|
3123
3113
|
return t(e);
|
|
3124
3114
|
}, [e, t]);
|
|
3125
3115
|
}
|
|
3126
|
-
function
|
|
3116
|
+
function Us() {
|
|
3127
3117
|
const [e] = B(() => /* @__PURE__ */ new Set()), t = N((r) => (e.add(r), () => e.delete(r)), [e]);
|
|
3128
3118
|
return [N((r) => {
|
|
3129
3119
|
let {
|
|
@@ -3136,13 +3126,13 @@ function qs() {
|
|
|
3136
3126
|
});
|
|
3137
3127
|
}, [e]), t];
|
|
3138
3128
|
}
|
|
3139
|
-
const
|
|
3129
|
+
const Gs = {
|
|
3140
3130
|
draggable: `
|
|
3141
3131
|
To pick up a draggable item, press the space bar.
|
|
3142
3132
|
While dragging, use the arrow keys to move the item.
|
|
3143
3133
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
3144
3134
|
`
|
|
3145
|
-
},
|
|
3135
|
+
}, _s = {
|
|
3146
3136
|
onDragStart(e) {
|
|
3147
3137
|
let {
|
|
3148
3138
|
active: t
|
|
@@ -3170,20 +3160,20 @@ const Ys = {
|
|
|
3170
3160
|
return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
|
|
3171
3161
|
}
|
|
3172
3162
|
};
|
|
3173
|
-
function
|
|
3163
|
+
function Ws(e) {
|
|
3174
3164
|
let {
|
|
3175
|
-
announcements: t =
|
|
3165
|
+
announcements: t = _s,
|
|
3176
3166
|
container: n,
|
|
3177
3167
|
hiddenTextDescribedById: r,
|
|
3178
|
-
screenReaderInstructions: o =
|
|
3168
|
+
screenReaderInstructions: o = Gs
|
|
3179
3169
|
} = e;
|
|
3180
3170
|
const {
|
|
3181
3171
|
announce: i,
|
|
3182
3172
|
announcement: s
|
|
3183
|
-
} =
|
|
3173
|
+
} = Bs(), a = Zt("DndLiveRegion"), [l, c] = B(!1);
|
|
3184
3174
|
if (q(() => {
|
|
3185
3175
|
c(!0);
|
|
3186
|
-
}, []),
|
|
3176
|
+
}, []), Vs(X(() => ({
|
|
3187
3177
|
onDragStart(d) {
|
|
3188
3178
|
let {
|
|
3189
3179
|
active: h
|
|
@@ -3234,14 +3224,14 @@ function Xs(e) {
|
|
|
3234
3224
|
}
|
|
3235
3225
|
}), [i, t])), !l)
|
|
3236
3226
|
return null;
|
|
3237
|
-
const u = ne.createElement(ne.Fragment, null, ne.createElement(
|
|
3227
|
+
const u = ne.createElement(ne.Fragment, null, ne.createElement($s, {
|
|
3238
3228
|
id: r,
|
|
3239
3229
|
value: o.draggable
|
|
3240
|
-
}), ne.createElement(
|
|
3230
|
+
}), ne.createElement(Hs, {
|
|
3241
3231
|
id: a,
|
|
3242
3232
|
announcement: s
|
|
3243
3233
|
}));
|
|
3244
|
-
return n ?
|
|
3234
|
+
return n ? Hn(u, n) : u;
|
|
3245
3235
|
}
|
|
3246
3236
|
var ce;
|
|
3247
3237
|
(function(e) {
|
|
@@ -3259,7 +3249,7 @@ function br(e, t) {
|
|
|
3259
3249
|
[e, t]
|
|
3260
3250
|
);
|
|
3261
3251
|
}
|
|
3262
|
-
function
|
|
3252
|
+
function qs() {
|
|
3263
3253
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
3264
3254
|
t[n] = arguments[n];
|
|
3265
3255
|
return X(
|
|
@@ -3275,7 +3265,7 @@ const Fe = /* @__PURE__ */ Object.freeze({
|
|
|
3275
3265
|
function Jn(e, t) {
|
|
3276
3266
|
return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2));
|
|
3277
3267
|
}
|
|
3278
|
-
function
|
|
3268
|
+
function Ys(e, t) {
|
|
3279
3269
|
const n = Gt(e);
|
|
3280
3270
|
if (!n)
|
|
3281
3271
|
return "0 0";
|
|
@@ -3297,7 +3287,7 @@ function Qn(e, t) {
|
|
|
3297
3287
|
} = t;
|
|
3298
3288
|
return n - r;
|
|
3299
3289
|
}
|
|
3300
|
-
function
|
|
3290
|
+
function Ks(e, t) {
|
|
3301
3291
|
let {
|
|
3302
3292
|
data: {
|
|
3303
3293
|
value: n
|
|
@@ -3309,7 +3299,7 @@ function Zs(e, t) {
|
|
|
3309
3299
|
} = t;
|
|
3310
3300
|
return r - n;
|
|
3311
3301
|
}
|
|
3312
|
-
function
|
|
3302
|
+
function Rn(e) {
|
|
3313
3303
|
let {
|
|
3314
3304
|
left: t,
|
|
3315
3305
|
top: n,
|
|
@@ -3330,7 +3320,7 @@ function Nn(e) {
|
|
|
3330
3320
|
y: n + r
|
|
3331
3321
|
}];
|
|
3332
3322
|
}
|
|
3333
|
-
function
|
|
3323
|
+
function ko(e, t) {
|
|
3334
3324
|
if (!e || e.length === 0)
|
|
3335
3325
|
return null;
|
|
3336
3326
|
const [n] = e;
|
|
@@ -3342,7 +3332,7 @@ function wr(e, t, n) {
|
|
|
3342
3332
|
y: n + e.height * 0.5
|
|
3343
3333
|
};
|
|
3344
3334
|
}
|
|
3345
|
-
const
|
|
3335
|
+
const Xs = (e) => {
|
|
3346
3336
|
let {
|
|
3347
3337
|
collisionRect: t,
|
|
3348
3338
|
droppableRects: n,
|
|
@@ -3365,19 +3355,19 @@ const ea = (e) => {
|
|
|
3365
3355
|
}
|
|
3366
3356
|
}
|
|
3367
3357
|
return i.sort(Qn);
|
|
3368
|
-
},
|
|
3358
|
+
}, Js = (e) => {
|
|
3369
3359
|
let {
|
|
3370
3360
|
collisionRect: t,
|
|
3371
3361
|
droppableRects: n,
|
|
3372
3362
|
droppableContainers: r
|
|
3373
3363
|
} = e;
|
|
3374
|
-
const o =
|
|
3364
|
+
const o = Rn(t), i = [];
|
|
3375
3365
|
for (const s of r) {
|
|
3376
3366
|
const {
|
|
3377
3367
|
id: a
|
|
3378
3368
|
} = s, l = n.get(a);
|
|
3379
3369
|
if (l) {
|
|
3380
|
-
const c =
|
|
3370
|
+
const c = Rn(l), u = o.reduce((h, p, k) => h + Jn(c[k], p), 0), d = Number((u / 4).toFixed(4));
|
|
3381
3371
|
i.push({
|
|
3382
3372
|
id: a,
|
|
3383
3373
|
data: {
|
|
@@ -3389,7 +3379,7 @@ const ea = (e) => {
|
|
|
3389
3379
|
}
|
|
3390
3380
|
return i.sort(Qn);
|
|
3391
3381
|
};
|
|
3392
|
-
function
|
|
3382
|
+
function Qs(e, t) {
|
|
3393
3383
|
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;
|
|
3394
3384
|
if (r < o && n < i) {
|
|
3395
3385
|
const l = t.width * t.height, c = e.width * e.height, u = s * a, d = u / (l + c - u);
|
|
@@ -3397,7 +3387,7 @@ function na(e, t) {
|
|
|
3397
3387
|
}
|
|
3398
3388
|
return 0;
|
|
3399
3389
|
}
|
|
3400
|
-
const
|
|
3390
|
+
const Zs = (e) => {
|
|
3401
3391
|
let {
|
|
3402
3392
|
collisionRect: t,
|
|
3403
3393
|
droppableRects: n,
|
|
@@ -3409,7 +3399,7 @@ const ra = (e) => {
|
|
|
3409
3399
|
id: s
|
|
3410
3400
|
} = i, a = n.get(s);
|
|
3411
3401
|
if (a) {
|
|
3412
|
-
const l =
|
|
3402
|
+
const l = Qs(a, t);
|
|
3413
3403
|
l > 0 && o.push({
|
|
3414
3404
|
id: s,
|
|
3415
3405
|
data: {
|
|
@@ -3419,9 +3409,9 @@ const ra = (e) => {
|
|
|
3419
3409
|
});
|
|
3420
3410
|
}
|
|
3421
3411
|
}
|
|
3422
|
-
return o.sort(
|
|
3412
|
+
return o.sort(Ks);
|
|
3423
3413
|
};
|
|
3424
|
-
function
|
|
3414
|
+
function ea(e, t) {
|
|
3425
3415
|
const {
|
|
3426
3416
|
top: n,
|
|
3427
3417
|
left: r,
|
|
@@ -3430,7 +3420,7 @@ function oa(e, t) {
|
|
|
3430
3420
|
} = t;
|
|
3431
3421
|
return n <= e.y && e.y <= o && r <= e.x && e.x <= i;
|
|
3432
3422
|
}
|
|
3433
|
-
const
|
|
3423
|
+
const ta = (e) => {
|
|
3434
3424
|
let {
|
|
3435
3425
|
droppableContainers: t,
|
|
3436
3426
|
droppableRects: n,
|
|
@@ -3443,8 +3433,8 @@ const ia = (e) => {
|
|
|
3443
3433
|
const {
|
|
3444
3434
|
id: s
|
|
3445
3435
|
} = i, a = n.get(s);
|
|
3446
|
-
if (a &&
|
|
3447
|
-
const c =
|
|
3436
|
+
if (a && ea(r, a)) {
|
|
3437
|
+
const c = Rn(a).reduce((d, h) => d + Jn(r, h), 0), u = Number((c / 4).toFixed(4));
|
|
3448
3438
|
o.push({
|
|
3449
3439
|
id: s,
|
|
3450
3440
|
data: {
|
|
@@ -3456,20 +3446,20 @@ const ia = (e) => {
|
|
|
3456
3446
|
}
|
|
3457
3447
|
return o.sort(Qn);
|
|
3458
3448
|
};
|
|
3459
|
-
function
|
|
3449
|
+
function na(e, t, n) {
|
|
3460
3450
|
return {
|
|
3461
3451
|
...e,
|
|
3462
3452
|
scaleX: t && n ? t.width / n.width : 1,
|
|
3463
3453
|
scaleY: t && n ? t.height / n.height : 1
|
|
3464
3454
|
};
|
|
3465
3455
|
}
|
|
3466
|
-
function
|
|
3456
|
+
function Co(e, t) {
|
|
3467
3457
|
return e && t ? {
|
|
3468
3458
|
x: e.left - t.left,
|
|
3469
3459
|
y: e.top - t.top
|
|
3470
3460
|
} : Fe;
|
|
3471
3461
|
}
|
|
3472
|
-
function
|
|
3462
|
+
function ra(e) {
|
|
3473
3463
|
return function(n) {
|
|
3474
3464
|
for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
|
|
3475
3465
|
o[i - 1] = arguments[i];
|
|
@@ -3484,8 +3474,8 @@ function aa(e) {
|
|
|
3484
3474
|
});
|
|
3485
3475
|
};
|
|
3486
3476
|
}
|
|
3487
|
-
const
|
|
3488
|
-
function
|
|
3477
|
+
const oa = /* @__PURE__ */ ra(1);
|
|
3478
|
+
function So(e) {
|
|
3489
3479
|
if (e.startsWith("matrix3d(")) {
|
|
3490
3480
|
const t = e.slice(9, -1).split(/, /);
|
|
3491
3481
|
return {
|
|
@@ -3505,8 +3495,8 @@ function Ao(e) {
|
|
|
3505
3495
|
}
|
|
3506
3496
|
return null;
|
|
3507
3497
|
}
|
|
3508
|
-
function
|
|
3509
|
-
const r =
|
|
3498
|
+
function ia(e, t, n) {
|
|
3499
|
+
const r = So(t);
|
|
3510
3500
|
if (!r)
|
|
3511
3501
|
return e;
|
|
3512
3502
|
const {
|
|
@@ -3524,18 +3514,18 @@ function ca(e, t, n) {
|
|
|
3524
3514
|
left: l
|
|
3525
3515
|
};
|
|
3526
3516
|
}
|
|
3527
|
-
const
|
|
3517
|
+
const sa = {
|
|
3528
3518
|
ignoreTransform: !1
|
|
3529
3519
|
};
|
|
3530
3520
|
function Lt(e, t) {
|
|
3531
|
-
t === void 0 && (t =
|
|
3521
|
+
t === void 0 && (t = sa);
|
|
3532
3522
|
let n = e.getBoundingClientRect();
|
|
3533
3523
|
if (t.ignoreTransform) {
|
|
3534
3524
|
const {
|
|
3535
3525
|
transform: c,
|
|
3536
3526
|
transformOrigin: u
|
|
3537
3527
|
} = Ce(e).getComputedStyle(e);
|
|
3538
|
-
c && (n =
|
|
3528
|
+
c && (n = ia(n, c, u));
|
|
3539
3529
|
}
|
|
3540
3530
|
const {
|
|
3541
3531
|
top: r,
|
|
@@ -3559,7 +3549,7 @@ function xr(e) {
|
|
|
3559
3549
|
ignoreTransform: !0
|
|
3560
3550
|
});
|
|
3561
3551
|
}
|
|
3562
|
-
function
|
|
3552
|
+
function aa(e) {
|
|
3563
3553
|
const t = e.innerWidth, n = e.innerHeight;
|
|
3564
3554
|
return {
|
|
3565
3555
|
top: 0,
|
|
@@ -3570,10 +3560,10 @@ function ua(e) {
|
|
|
3570
3560
|
height: n
|
|
3571
3561
|
};
|
|
3572
3562
|
}
|
|
3573
|
-
function
|
|
3563
|
+
function la(e, t) {
|
|
3574
3564
|
return t === void 0 && (t = Ce(e).getComputedStyle(e)), t.position === "fixed";
|
|
3575
3565
|
}
|
|
3576
|
-
function
|
|
3566
|
+
function ca(e, t) {
|
|
3577
3567
|
t === void 0 && (t = Ce(e).getComputedStyle(e));
|
|
3578
3568
|
const n = /(auto|scroll|overlay)/;
|
|
3579
3569
|
return ["overflow", "overflowX", "overflowY"].some((o) => {
|
|
@@ -3588,44 +3578,44 @@ function en(e, t) {
|
|
|
3588
3578
|
return n;
|
|
3589
3579
|
if (Kn(o) && o.scrollingElement != null && !n.includes(o.scrollingElement))
|
|
3590
3580
|
return n.push(o.scrollingElement), n;
|
|
3591
|
-
if (!Mt(o) ||
|
|
3581
|
+
if (!Mt(o) || bo(o) || n.includes(o))
|
|
3592
3582
|
return n;
|
|
3593
3583
|
const i = Ce(e).getComputedStyle(o);
|
|
3594
|
-
return o !== e &&
|
|
3584
|
+
return o !== e && ca(o, i) && n.push(o), la(o, i) ? n : r(o.parentNode);
|
|
3595
3585
|
}
|
|
3596
3586
|
return e ? r(e) : n;
|
|
3597
3587
|
}
|
|
3598
|
-
function
|
|
3588
|
+
function Eo(e) {
|
|
3599
3589
|
const [t] = en(e, 1);
|
|
3600
3590
|
return t ?? null;
|
|
3601
3591
|
}
|
|
3602
|
-
function
|
|
3592
|
+
function mn(e) {
|
|
3603
3593
|
return !Jt || !e ? null : at(e) ? e : Yn(e) ? Kn(e) || e === lt(e).scrollingElement ? window : Mt(e) ? e : null : null;
|
|
3604
3594
|
}
|
|
3605
|
-
function
|
|
3595
|
+
function Ao(e) {
|
|
3606
3596
|
return at(e) ? e.scrollX : e.scrollLeft;
|
|
3607
3597
|
}
|
|
3608
|
-
function
|
|
3598
|
+
function Mo(e) {
|
|
3609
3599
|
return at(e) ? e.scrollY : e.scrollTop;
|
|
3610
3600
|
}
|
|
3611
|
-
function
|
|
3601
|
+
function Nn(e) {
|
|
3612
3602
|
return {
|
|
3613
|
-
x:
|
|
3614
|
-
y:
|
|
3603
|
+
x: Ao(e),
|
|
3604
|
+
y: Mo(e)
|
|
3615
3605
|
};
|
|
3616
3606
|
}
|
|
3617
3607
|
var ge;
|
|
3618
3608
|
(function(e) {
|
|
3619
3609
|
e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
|
|
3620
3610
|
})(ge || (ge = {}));
|
|
3621
|
-
function
|
|
3611
|
+
function Do(e) {
|
|
3622
3612
|
return !Jt || !e ? !1 : e === document.scrollingElement;
|
|
3623
3613
|
}
|
|
3624
|
-
function
|
|
3614
|
+
function Lo(e) {
|
|
3625
3615
|
const t = {
|
|
3626
3616
|
x: 0,
|
|
3627
3617
|
y: 0
|
|
3628
|
-
}, n =
|
|
3618
|
+
}, n = Do(e) ? {
|
|
3629
3619
|
height: window.innerHeight,
|
|
3630
3620
|
width: window.innerWidth
|
|
3631
3621
|
} : {
|
|
@@ -3644,24 +3634,24 @@ function Io(e) {
|
|
|
3644
3634
|
minScroll: t
|
|
3645
3635
|
};
|
|
3646
3636
|
}
|
|
3647
|
-
const
|
|
3637
|
+
const da = {
|
|
3648
3638
|
x: 0.2,
|
|
3649
3639
|
y: 0.2
|
|
3650
3640
|
};
|
|
3651
|
-
function
|
|
3641
|
+
function ua(e, t, n, r, o) {
|
|
3652
3642
|
let {
|
|
3653
3643
|
top: i,
|
|
3654
3644
|
left: s,
|
|
3655
3645
|
right: a,
|
|
3656
3646
|
bottom: l
|
|
3657
3647
|
} = n;
|
|
3658
|
-
r === void 0 && (r = 10), o === void 0 && (o =
|
|
3648
|
+
r === void 0 && (r = 10), o === void 0 && (o = da);
|
|
3659
3649
|
const {
|
|
3660
3650
|
isTop: c,
|
|
3661
3651
|
isBottom: u,
|
|
3662
3652
|
isLeft: d,
|
|
3663
3653
|
isRight: h
|
|
3664
|
-
} =
|
|
3654
|
+
} = Lo(e), p = {
|
|
3665
3655
|
x: 0,
|
|
3666
3656
|
y: 0
|
|
3667
3657
|
}, k = {
|
|
@@ -3676,7 +3666,7 @@ function pa(e, t, n, r, o) {
|
|
|
3676
3666
|
speed: k
|
|
3677
3667
|
};
|
|
3678
3668
|
}
|
|
3679
|
-
function
|
|
3669
|
+
function fa(e) {
|
|
3680
3670
|
if (e === document.scrollingElement) {
|
|
3681
3671
|
const {
|
|
3682
3672
|
innerWidth: i,
|
|
@@ -3706,16 +3696,16 @@ function ma(e) {
|
|
|
3706
3696
|
height: e.clientHeight
|
|
3707
3697
|
};
|
|
3708
3698
|
}
|
|
3709
|
-
function
|
|
3710
|
-
return e.reduce((t, n) => nt(t,
|
|
3699
|
+
function To(e) {
|
|
3700
|
+
return e.reduce((t, n) => nt(t, Nn(n)), Fe);
|
|
3711
3701
|
}
|
|
3712
|
-
function
|
|
3713
|
-
return e.reduce((t, n) => t +
|
|
3702
|
+
function ha(e) {
|
|
3703
|
+
return e.reduce((t, n) => t + Ao(n), 0);
|
|
3714
3704
|
}
|
|
3715
|
-
function
|
|
3716
|
-
return e.reduce((t, n) => t +
|
|
3705
|
+
function ga(e) {
|
|
3706
|
+
return e.reduce((t, n) => t + Mo(n), 0);
|
|
3717
3707
|
}
|
|
3718
|
-
function
|
|
3708
|
+
function Io(e, t) {
|
|
3719
3709
|
if (t === void 0 && (t = Lt), !e)
|
|
3720
3710
|
return;
|
|
3721
3711
|
const {
|
|
@@ -3724,20 +3714,20 @@ function No(e, t) {
|
|
|
3724
3714
|
bottom: o,
|
|
3725
3715
|
right: i
|
|
3726
3716
|
} = t(e);
|
|
3727
|
-
|
|
3717
|
+
Eo(e) && (o <= 0 || i <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
|
|
3728
3718
|
block: "center",
|
|
3729
3719
|
inline: "center"
|
|
3730
3720
|
});
|
|
3731
3721
|
}
|
|
3732
|
-
const
|
|
3722
|
+
const pa = [["x", ["left", "right"], ha], ["y", ["top", "bottom"], ga]];
|
|
3733
3723
|
class Zn {
|
|
3734
3724
|
constructor(t, n) {
|
|
3735
3725
|
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;
|
|
3736
|
-
const r = en(n), o =
|
|
3726
|
+
const r = en(n), o = To(r);
|
|
3737
3727
|
this.rect = {
|
|
3738
3728
|
...t
|
|
3739
3729
|
}, this.width = t.width, this.height = t.height;
|
|
3740
|
-
for (const [i, s, a] of
|
|
3730
|
+
for (const [i, s, a] of pa)
|
|
3741
3731
|
for (const l of s)
|
|
3742
3732
|
Object.defineProperty(this, l, {
|
|
3743
3733
|
get: () => {
|
|
@@ -3765,13 +3755,13 @@ class yt {
|
|
|
3765
3755
|
(o = this.target) == null || o.addEventListener(t, n, r), this.listeners.push([t, n, r]);
|
|
3766
3756
|
}
|
|
3767
3757
|
}
|
|
3768
|
-
function
|
|
3758
|
+
function ma(e) {
|
|
3769
3759
|
const {
|
|
3770
3760
|
EventTarget: t
|
|
3771
3761
|
} = Ce(e);
|
|
3772
3762
|
return e instanceof t ? e : lt(e);
|
|
3773
3763
|
}
|
|
3774
|
-
function
|
|
3764
|
+
function vn(e, t) {
|
|
3775
3765
|
const n = Math.abs(e.x), r = Math.abs(e.y);
|
|
3776
3766
|
return typeof t == "number" ? Math.sqrt(n ** 2 + r ** 2) > t : "x" in t && "y" in t ? n > t.x && r > t.y : "x" in t ? n > t.x : "y" in t ? r > t.y : !1;
|
|
3777
3767
|
}
|
|
@@ -3782,18 +3772,18 @@ var Ne;
|
|
|
3782
3772
|
function kr(e) {
|
|
3783
3773
|
e.preventDefault();
|
|
3784
3774
|
}
|
|
3785
|
-
function
|
|
3775
|
+
function va(e) {
|
|
3786
3776
|
e.stopPropagation();
|
|
3787
3777
|
}
|
|
3788
3778
|
var U;
|
|
3789
3779
|
(function(e) {
|
|
3790
3780
|
e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
|
|
3791
3781
|
})(U || (U = {}));
|
|
3792
|
-
const
|
|
3782
|
+
const Ro = {
|
|
3793
3783
|
start: [U.Space, U.Enter],
|
|
3794
3784
|
cancel: [U.Esc],
|
|
3795
3785
|
end: [U.Space, U.Enter, U.Tab]
|
|
3796
|
-
},
|
|
3786
|
+
}, ya = (e, t) => {
|
|
3797
3787
|
let {
|
|
3798
3788
|
currentCoordinates: n
|
|
3799
3789
|
} = t;
|
|
@@ -3838,7 +3828,7 @@ class er {
|
|
|
3838
3828
|
activeNode: t,
|
|
3839
3829
|
onStart: n
|
|
3840
3830
|
} = this.props, r = t.node.current;
|
|
3841
|
-
r &&
|
|
3831
|
+
r && Io(r), n(Fe);
|
|
3842
3832
|
}
|
|
3843
3833
|
handleKeyDown(t) {
|
|
3844
3834
|
if (Xn(t)) {
|
|
@@ -3847,8 +3837,8 @@ class er {
|
|
|
3847
3837
|
context: r,
|
|
3848
3838
|
options: o
|
|
3849
3839
|
} = this.props, {
|
|
3850
|
-
keyboardCodes: i =
|
|
3851
|
-
coordinateGetter: s =
|
|
3840
|
+
keyboardCodes: i = Ro,
|
|
3841
|
+
coordinateGetter: s = ya,
|
|
3852
3842
|
scrollBehavior: a = "smooth"
|
|
3853
3843
|
} = o, {
|
|
3854
3844
|
code: l
|
|
@@ -3888,7 +3878,7 @@ class er {
|
|
|
3888
3878
|
isBottom: L,
|
|
3889
3879
|
maxScroll: I,
|
|
3890
3880
|
minScroll: b
|
|
3891
|
-
} =
|
|
3881
|
+
} = Lo(y), E = fa(y), v = {
|
|
3892
3882
|
x: Math.min(g === U.Right ? E.right - E.width / 2 : E.right, Math.max(g === U.Right ? E.left : E.left + E.width / 2, d.x)),
|
|
3893
3883
|
y: Math.min(g === U.Down ? E.bottom - E.height / 2 : E.bottom, Math.max(g === U.Down ? E.top : E.top + E.height / 2, d.y))
|
|
3894
3884
|
}, D = g === U.Right && !S || g === U.Left && !M, w = g === U.Down && !L || g === U.Up && !m;
|
|
@@ -3952,7 +3942,7 @@ er.activators = [{
|
|
|
3952
3942
|
eventName: "onKeyDown",
|
|
3953
3943
|
handler: (e, t, n) => {
|
|
3954
3944
|
let {
|
|
3955
|
-
keyboardCodes: r =
|
|
3945
|
+
keyboardCodes: r = Ro,
|
|
3956
3946
|
onActivation: o
|
|
3957
3947
|
} = t, {
|
|
3958
3948
|
active: i
|
|
@@ -3978,7 +3968,7 @@ function Sr(e) {
|
|
|
3978
3968
|
class tr {
|
|
3979
3969
|
constructor(t, n, r) {
|
|
3980
3970
|
var o;
|
|
3981
|
-
r === void 0 && (r =
|
|
3971
|
+
r === void 0 && (r = ma(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;
|
|
3982
3972
|
const {
|
|
3983
3973
|
event: i
|
|
3984
3974
|
} = t, {
|
|
@@ -4032,7 +4022,7 @@ class tr {
|
|
|
4032
4022
|
} = this, {
|
|
4033
4023
|
onStart: n
|
|
4034
4024
|
} = this.props;
|
|
4035
|
-
t && (this.activated = !0, this.documentListeners.add(Ne.Click,
|
|
4025
|
+
t && (this.activated = !0, this.documentListeners.add(Ne.Click, va, {
|
|
4036
4026
|
capture: !0
|
|
4037
4027
|
}), this.removeTextSelection(), this.documentListeners.add(Ne.SelectionChange, this.removeTextSelection), n(t));
|
|
4038
4028
|
}
|
|
@@ -4053,12 +4043,12 @@ class tr {
|
|
|
4053
4043
|
const l = (n = Gt(t)) != null ? n : Fe, c = Ct(o, l);
|
|
4054
4044
|
if (!r && a) {
|
|
4055
4045
|
if (Cr(a)) {
|
|
4056
|
-
if (a.tolerance != null &&
|
|
4046
|
+
if (a.tolerance != null && vn(c, a.tolerance))
|
|
4057
4047
|
return this.handleCancel();
|
|
4058
|
-
if (
|
|
4048
|
+
if (vn(c, a.distance))
|
|
4059
4049
|
return this.handleStart();
|
|
4060
4050
|
}
|
|
4061
|
-
if (Sr(a) &&
|
|
4051
|
+
if (Sr(a) && vn(c, a.tolerance))
|
|
4062
4052
|
return this.handleCancel();
|
|
4063
4053
|
this.handlePending(a, c);
|
|
4064
4054
|
return;
|
|
@@ -4087,7 +4077,7 @@ class tr {
|
|
|
4087
4077
|
(t = this.document.getSelection()) == null || t.removeAllRanges();
|
|
4088
4078
|
}
|
|
4089
4079
|
}
|
|
4090
|
-
const
|
|
4080
|
+
const ba = {
|
|
4091
4081
|
cancel: {
|
|
4092
4082
|
name: "pointercancel"
|
|
4093
4083
|
},
|
|
@@ -4103,7 +4093,7 @@ class nr extends tr {
|
|
|
4103
4093
|
const {
|
|
4104
4094
|
event: n
|
|
4105
4095
|
} = t, r = lt(n.target);
|
|
4106
|
-
super(t,
|
|
4096
|
+
super(t, ba, r);
|
|
4107
4097
|
}
|
|
4108
4098
|
}
|
|
4109
4099
|
nr.activators = [{
|
|
@@ -4119,7 +4109,7 @@ nr.activators = [{
|
|
|
4119
4109
|
}), !0);
|
|
4120
4110
|
}
|
|
4121
4111
|
}];
|
|
4122
|
-
const
|
|
4112
|
+
const wa = {
|
|
4123
4113
|
move: {
|
|
4124
4114
|
name: "mousemove"
|
|
4125
4115
|
},
|
|
@@ -4127,16 +4117,16 @@ const Sa = {
|
|
|
4127
4117
|
name: "mouseup"
|
|
4128
4118
|
}
|
|
4129
4119
|
};
|
|
4130
|
-
var
|
|
4120
|
+
var zn;
|
|
4131
4121
|
(function(e) {
|
|
4132
4122
|
e[e.RightClick = 2] = "RightClick";
|
|
4133
|
-
})(
|
|
4134
|
-
class
|
|
4123
|
+
})(zn || (zn = {}));
|
|
4124
|
+
class xa extends tr {
|
|
4135
4125
|
constructor(t) {
|
|
4136
|
-
super(t,
|
|
4126
|
+
super(t, wa, lt(t.event.target));
|
|
4137
4127
|
}
|
|
4138
4128
|
}
|
|
4139
|
-
|
|
4129
|
+
xa.activators = [{
|
|
4140
4130
|
eventName: "onMouseDown",
|
|
4141
4131
|
handler: (e, t) => {
|
|
4142
4132
|
let {
|
|
@@ -4144,12 +4134,12 @@ Ea.activators = [{
|
|
|
4144
4134
|
} = e, {
|
|
4145
4135
|
onActivation: r
|
|
4146
4136
|
} = t;
|
|
4147
|
-
return n.button ===
|
|
4137
|
+
return n.button === zn.RightClick ? !1 : (r == null || r({
|
|
4148
4138
|
event: n
|
|
4149
4139
|
}), !0);
|
|
4150
4140
|
}
|
|
4151
4141
|
}];
|
|
4152
|
-
const
|
|
4142
|
+
const yn = {
|
|
4153
4143
|
cancel: {
|
|
4154
4144
|
name: "touchcancel"
|
|
4155
4145
|
},
|
|
@@ -4160,22 +4150,22 @@ const bn = {
|
|
|
4160
4150
|
name: "touchend"
|
|
4161
4151
|
}
|
|
4162
4152
|
};
|
|
4163
|
-
class
|
|
4153
|
+
class ka extends tr {
|
|
4164
4154
|
constructor(t) {
|
|
4165
|
-
super(t,
|
|
4155
|
+
super(t, yn);
|
|
4166
4156
|
}
|
|
4167
4157
|
static setup() {
|
|
4168
|
-
return window.addEventListener(
|
|
4158
|
+
return window.addEventListener(yn.move.name, t, {
|
|
4169
4159
|
capture: !1,
|
|
4170
4160
|
passive: !1
|
|
4171
4161
|
}), function() {
|
|
4172
|
-
window.removeEventListener(
|
|
4162
|
+
window.removeEventListener(yn.move.name, t);
|
|
4173
4163
|
};
|
|
4174
4164
|
function t() {
|
|
4175
4165
|
}
|
|
4176
4166
|
}
|
|
4177
4167
|
}
|
|
4178
|
-
|
|
4168
|
+
ka.activators = [{
|
|
4179
4169
|
eventName: "onTouchStart",
|
|
4180
4170
|
handler: (e, t) => {
|
|
4181
4171
|
let {
|
|
@@ -4199,7 +4189,7 @@ var Wt;
|
|
|
4199
4189
|
(function(e) {
|
|
4200
4190
|
e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
4201
4191
|
})(Wt || (Wt = {}));
|
|
4202
|
-
function
|
|
4192
|
+
function Ca(e) {
|
|
4203
4193
|
let {
|
|
4204
4194
|
acceleration: t,
|
|
4205
4195
|
activator: n = bt.Pointer,
|
|
@@ -4214,10 +4204,10 @@ function Ma(e) {
|
|
|
4214
4204
|
delta: d,
|
|
4215
4205
|
threshold: h
|
|
4216
4206
|
} = e;
|
|
4217
|
-
const p =
|
|
4207
|
+
const p = Ea({
|
|
4218
4208
|
delta: d,
|
|
4219
4209
|
disabled: !i
|
|
4220
|
-
}), [k, y] =
|
|
4210
|
+
}), [k, y] = zs(), g = V({
|
|
4221
4211
|
x: 0,
|
|
4222
4212
|
y: 0
|
|
4223
4213
|
}), m = V({
|
|
@@ -4257,7 +4247,7 @@ function Ma(e) {
|
|
|
4257
4247
|
const {
|
|
4258
4248
|
direction: D,
|
|
4259
4249
|
speed: w
|
|
4260
|
-
} =
|
|
4250
|
+
} = ua(b, v, S, t, h);
|
|
4261
4251
|
for (const A of ["x", "y"])
|
|
4262
4252
|
p[A][D[A]] || (w[A] = 0, D[A] = 0);
|
|
4263
4253
|
if (w.x > 0 || w.y > 0) {
|
|
@@ -4294,7 +4284,7 @@ function Ma(e) {
|
|
|
4294
4284
|
]
|
|
4295
4285
|
);
|
|
4296
4286
|
}
|
|
4297
|
-
const
|
|
4287
|
+
const Sa = {
|
|
4298
4288
|
x: {
|
|
4299
4289
|
[ge.Backward]: !1,
|
|
4300
4290
|
[ge.Forward]: !1
|
|
@@ -4304,7 +4294,7 @@ const Da = {
|
|
|
4304
4294
|
[ge.Forward]: !1
|
|
4305
4295
|
}
|
|
4306
4296
|
};
|
|
4307
|
-
function
|
|
4297
|
+
function Ea(e) {
|
|
4308
4298
|
let {
|
|
4309
4299
|
delta: t,
|
|
4310
4300
|
disabled: n
|
|
@@ -4312,7 +4302,7 @@ function La(e) {
|
|
|
4312
4302
|
const r = Ut(t);
|
|
4313
4303
|
return Dt((o) => {
|
|
4314
4304
|
if (n || !r || !o)
|
|
4315
|
-
return
|
|
4305
|
+
return Sa;
|
|
4316
4306
|
const i = {
|
|
4317
4307
|
x: Math.sign(t.x - r.x),
|
|
4318
4308
|
y: Math.sign(t.y - r.y)
|
|
@@ -4329,14 +4319,14 @@ function La(e) {
|
|
|
4329
4319
|
};
|
|
4330
4320
|
}, [n, t, r]);
|
|
4331
4321
|
}
|
|
4332
|
-
function
|
|
4322
|
+
function Aa(e, t) {
|
|
4333
4323
|
const n = t != null ? e.get(t) : void 0, r = n ? n.node.current : null;
|
|
4334
4324
|
return Dt((o) => {
|
|
4335
4325
|
var i;
|
|
4336
4326
|
return t == null ? null : (i = r ?? o) != null ? i : null;
|
|
4337
4327
|
}, [r, t]);
|
|
4338
4328
|
}
|
|
4339
|
-
function
|
|
4329
|
+
function Ma(e, t) {
|
|
4340
4330
|
return X(() => e.reduce((n, r) => {
|
|
4341
4331
|
const {
|
|
4342
4332
|
sensor: o
|
|
@@ -4351,12 +4341,12 @@ var Et;
|
|
|
4351
4341
|
(function(e) {
|
|
4352
4342
|
e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
|
|
4353
4343
|
})(Et || (Et = {}));
|
|
4354
|
-
var
|
|
4344
|
+
var On;
|
|
4355
4345
|
(function(e) {
|
|
4356
4346
|
e.Optimized = "optimized";
|
|
4357
|
-
})(
|
|
4347
|
+
})(On || (On = {}));
|
|
4358
4348
|
const Er = /* @__PURE__ */ new Map();
|
|
4359
|
-
function
|
|
4349
|
+
function Da(e, t) {
|
|
4360
4350
|
let {
|
|
4361
4351
|
dragging: n,
|
|
4362
4352
|
dependencies: r,
|
|
@@ -4428,10 +4418,10 @@ function Ra(e, t) {
|
|
|
4428
4418
|
function rr(e, t) {
|
|
4429
4419
|
return Dt((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
|
|
4430
4420
|
}
|
|
4431
|
-
function
|
|
4421
|
+
function La(e, t) {
|
|
4432
4422
|
return rr(e, t);
|
|
4433
4423
|
}
|
|
4434
|
-
function
|
|
4424
|
+
function Ta(e) {
|
|
4435
4425
|
let {
|
|
4436
4426
|
callback: t,
|
|
4437
4427
|
disabled: n
|
|
@@ -4465,11 +4455,11 @@ function tn(e) {
|
|
|
4465
4455
|
);
|
|
4466
4456
|
return q(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
|
|
4467
4457
|
}
|
|
4468
|
-
function
|
|
4458
|
+
function Ia(e) {
|
|
4469
4459
|
return new Zn(Lt(e), e);
|
|
4470
4460
|
}
|
|
4471
4461
|
function Ar(e, t, n) {
|
|
4472
|
-
t === void 0 && (t =
|
|
4462
|
+
t === void 0 && (t = Ia);
|
|
4473
4463
|
const [r, o] = B(null);
|
|
4474
4464
|
function i() {
|
|
4475
4465
|
o((l) => {
|
|
@@ -4483,7 +4473,7 @@ function Ar(e, t, n) {
|
|
|
4483
4473
|
return JSON.stringify(l) === JSON.stringify(u) ? l : u;
|
|
4484
4474
|
});
|
|
4485
4475
|
}
|
|
4486
|
-
const s =
|
|
4476
|
+
const s = Ta({
|
|
4487
4477
|
callback(l) {
|
|
4488
4478
|
if (e)
|
|
4489
4479
|
for (const c of l) {
|
|
@@ -4507,31 +4497,31 @@ function Ar(e, t, n) {
|
|
|
4507
4497
|
})) : (a == null || a.disconnect(), s == null || s.disconnect());
|
|
4508
4498
|
}, [e]), r;
|
|
4509
4499
|
}
|
|
4510
|
-
function
|
|
4500
|
+
function Ra(e) {
|
|
4511
4501
|
const t = rr(e);
|
|
4512
|
-
return
|
|
4502
|
+
return Co(e, t);
|
|
4513
4503
|
}
|
|
4514
4504
|
const Mr = [];
|
|
4515
|
-
function
|
|
4505
|
+
function Na(e) {
|
|
4516
4506
|
const t = V(e), n = Dt((r) => e ? r && r !== Mr && e && t.current && e.parentNode === t.current.parentNode ? r : en(e) : Mr, [e]);
|
|
4517
4507
|
return q(() => {
|
|
4518
4508
|
t.current = e;
|
|
4519
4509
|
}, [e]), n;
|
|
4520
4510
|
}
|
|
4521
|
-
function
|
|
4511
|
+
function za(e) {
|
|
4522
4512
|
const [t, n] = B(null), r = V(e), o = N((i) => {
|
|
4523
|
-
const s =
|
|
4524
|
-
s && n((a) => a ? (a.set(s,
|
|
4513
|
+
const s = mn(i.target);
|
|
4514
|
+
s && n((a) => a ? (a.set(s, Nn(s)), new Map(a)) : null);
|
|
4525
4515
|
}, []);
|
|
4526
4516
|
return q(() => {
|
|
4527
4517
|
const i = r.current;
|
|
4528
4518
|
if (e !== i) {
|
|
4529
4519
|
s(i);
|
|
4530
4520
|
const a = e.map((l) => {
|
|
4531
|
-
const c =
|
|
4521
|
+
const c = mn(l);
|
|
4532
4522
|
return c ? (c.addEventListener("scroll", o, {
|
|
4533
4523
|
passive: !0
|
|
4534
|
-
}), [c,
|
|
4524
|
+
}), [c, Nn(c)]) : null;
|
|
4535
4525
|
}).filter((l) => l != null);
|
|
4536
4526
|
n(a.length ? new Map(a) : null), r.current = e;
|
|
4537
4527
|
}
|
|
@@ -4540,11 +4530,11 @@ function Pa(e) {
|
|
|
4540
4530
|
};
|
|
4541
4531
|
function s(a) {
|
|
4542
4532
|
a.forEach((l) => {
|
|
4543
|
-
const c =
|
|
4533
|
+
const c = mn(l);
|
|
4544
4534
|
c == null || c.removeEventListener("scroll", o);
|
|
4545
4535
|
});
|
|
4546
4536
|
}
|
|
4547
|
-
}, [o, e]), X(() => e.length ? t ? Array.from(t.values()).reduce((i, s) => nt(i, s), Fe) :
|
|
4537
|
+
}, [o, e]), X(() => e.length ? t ? Array.from(t.values()).reduce((i, s) => nt(i, s), Fe) : To(e) : Fe, [e, t]);
|
|
4548
4538
|
}
|
|
4549
4539
|
function Dr(e, t) {
|
|
4550
4540
|
t === void 0 && (t = []);
|
|
@@ -4560,7 +4550,7 @@ function Dr(e, t) {
|
|
|
4560
4550
|
r && !n.current && (n.current = e), !r && n.current && (n.current = null);
|
|
4561
4551
|
}, [e]), n.current ? Ct(e, n.current) : Fe;
|
|
4562
4552
|
}
|
|
4563
|
-
function
|
|
4553
|
+
function Oa(e) {
|
|
4564
4554
|
q(
|
|
4565
4555
|
() => {
|
|
4566
4556
|
if (!Jt)
|
|
@@ -4586,7 +4576,7 @@ function $a(e) {
|
|
|
4586
4576
|
})
|
|
4587
4577
|
);
|
|
4588
4578
|
}
|
|
4589
|
-
function
|
|
4579
|
+
function Fa(e, t) {
|
|
4590
4580
|
return X(() => e.reduce((n, r) => {
|
|
4591
4581
|
let {
|
|
4592
4582
|
eventName: o,
|
|
@@ -4597,15 +4587,15 @@ function Ha(e, t) {
|
|
|
4597
4587
|
}, n;
|
|
4598
4588
|
}, {}), [e, t]);
|
|
4599
4589
|
}
|
|
4600
|
-
function
|
|
4601
|
-
return X(() => e ?
|
|
4590
|
+
function No(e) {
|
|
4591
|
+
return X(() => e ? aa(e) : null, [e]);
|
|
4602
4592
|
}
|
|
4603
4593
|
const Lr = [];
|
|
4604
|
-
function
|
|
4594
|
+
function ja(e, t) {
|
|
4605
4595
|
t === void 0 && (t = Lt);
|
|
4606
|
-
const [n] = e, r =
|
|
4596
|
+
const [n] = e, r = No(n ? Ce(n) : null), [o, i] = B(Lr);
|
|
4607
4597
|
function s() {
|
|
4608
|
-
i(() => e.length ? e.map((l) =>
|
|
4598
|
+
i(() => e.length ? e.map((l) => Do(l) ? r : new Zn(t(l), l)) : Lr);
|
|
4609
4599
|
}
|
|
4610
4600
|
const a = tn({
|
|
4611
4601
|
callback: s
|
|
@@ -4614,7 +4604,7 @@ function Ba(e, t) {
|
|
|
4614
4604
|
a == null || a.disconnect(), s(), e.forEach((l) => a == null ? void 0 : a.observe(l));
|
|
4615
4605
|
}, [e]), o;
|
|
4616
4606
|
}
|
|
4617
|
-
function
|
|
4607
|
+
function zo(e) {
|
|
4618
4608
|
if (!e)
|
|
4619
4609
|
return null;
|
|
4620
4610
|
if (e.children.length > 1)
|
|
@@ -4622,7 +4612,7 @@ function Fo(e) {
|
|
|
4622
4612
|
const t = e.children[0];
|
|
4623
4613
|
return Mt(t) ? t : e;
|
|
4624
4614
|
}
|
|
4625
|
-
function
|
|
4615
|
+
function Pa(e) {
|
|
4626
4616
|
let {
|
|
4627
4617
|
measure: t
|
|
4628
4618
|
} = e;
|
|
@@ -4644,7 +4634,7 @@ function Va(e) {
|
|
|
4644
4634
|
}, [t]), i = tn({
|
|
4645
4635
|
callback: o
|
|
4646
4636
|
}), s = N((c) => {
|
|
4647
|
-
const u =
|
|
4637
|
+
const u = zo(c);
|
|
4648
4638
|
i == null || i.disconnect(), u && (i == null || i.observe(u)), r(u ? t(u) : null);
|
|
4649
4639
|
}, [t, i]), [a, l] = Vt(s);
|
|
4650
4640
|
return X(() => ({
|
|
@@ -4653,13 +4643,13 @@ function Va(e) {
|
|
|
4653
4643
|
setRef: l
|
|
4654
4644
|
}), [n, a, l]);
|
|
4655
4645
|
}
|
|
4656
|
-
const
|
|
4646
|
+
const $a = [{
|
|
4657
4647
|
sensor: nr,
|
|
4658
4648
|
options: {}
|
|
4659
4649
|
}, {
|
|
4660
4650
|
sensor: er,
|
|
4661
4651
|
options: {}
|
|
4662
|
-
}],
|
|
4652
|
+
}], Ha = {
|
|
4663
4653
|
current: {}
|
|
4664
4654
|
}, Ht = {
|
|
4665
4655
|
draggable: {
|
|
@@ -4668,7 +4658,7 @@ const Ua = [{
|
|
|
4668
4658
|
droppable: {
|
|
4669
4659
|
measure: xr,
|
|
4670
4660
|
strategy: Et.WhileDragging,
|
|
4671
|
-
frequency:
|
|
4661
|
+
frequency: On.Optimized
|
|
4672
4662
|
},
|
|
4673
4663
|
dragOverlay: {
|
|
4674
4664
|
measure: Lt
|
|
@@ -4695,7 +4685,7 @@ class wt extends Map {
|
|
|
4695
4685
|
return (n = (r = this.get(t)) == null ? void 0 : r.node.current) != null ? n : void 0;
|
|
4696
4686
|
}
|
|
4697
4687
|
}
|
|
4698
|
-
const
|
|
4688
|
+
const Ba = {
|
|
4699
4689
|
activatorEvent: null,
|
|
4700
4690
|
active: null,
|
|
4701
4691
|
activeNode: null,
|
|
@@ -4719,7 +4709,7 @@ const _a = {
|
|
|
4719
4709
|
measureDroppableContainers: _t,
|
|
4720
4710
|
windowRect: null,
|
|
4721
4711
|
measuringScheduled: !1
|
|
4722
|
-
},
|
|
4712
|
+
}, Oo = {
|
|
4723
4713
|
activatorEvent: null,
|
|
4724
4714
|
activators: [],
|
|
4725
4715
|
active: null,
|
|
@@ -4731,8 +4721,8 @@ const _a = {
|
|
|
4731
4721
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
4732
4722
|
over: null,
|
|
4733
4723
|
measureDroppableContainers: _t
|
|
4734
|
-
}, Tt = /* @__PURE__ */ Je(
|
|
4735
|
-
function
|
|
4724
|
+
}, Tt = /* @__PURE__ */ Je(Oo), Fo = /* @__PURE__ */ Je(Ba);
|
|
4725
|
+
function Va() {
|
|
4736
4726
|
return {
|
|
4737
4727
|
draggable: {
|
|
4738
4728
|
active: null,
|
|
@@ -4751,7 +4741,7 @@ function Wa() {
|
|
|
4751
4741
|
}
|
|
4752
4742
|
};
|
|
4753
4743
|
}
|
|
4754
|
-
function
|
|
4744
|
+
function Ua(e, t) {
|
|
4755
4745
|
switch (t.type) {
|
|
4756
4746
|
case ce.DragStart:
|
|
4757
4747
|
return {
|
|
@@ -4844,7 +4834,7 @@ function qa(e, t) {
|
|
|
4844
4834
|
return e;
|
|
4845
4835
|
}
|
|
4846
4836
|
}
|
|
4847
|
-
function
|
|
4837
|
+
function Ga(e) {
|
|
4848
4838
|
let {
|
|
4849
4839
|
disabled: t
|
|
4850
4840
|
} = e;
|
|
@@ -4870,7 +4860,7 @@ function Ya(e) {
|
|
|
4870
4860
|
for (const u of [l.current, c.current]) {
|
|
4871
4861
|
if (!u)
|
|
4872
4862
|
continue;
|
|
4873
|
-
const d =
|
|
4863
|
+
const d = js(u);
|
|
4874
4864
|
if (d) {
|
|
4875
4865
|
d.focus();
|
|
4876
4866
|
break;
|
|
@@ -4880,7 +4870,7 @@ function Ya(e) {
|
|
|
4880
4870
|
}
|
|
4881
4871
|
}, [r, t, o, s, i]), null;
|
|
4882
4872
|
}
|
|
4883
|
-
function
|
|
4873
|
+
function jo(e, t) {
|
|
4884
4874
|
let {
|
|
4885
4875
|
transform: n,
|
|
4886
4876
|
...r
|
|
@@ -4890,7 +4880,7 @@ function $o(e, t) {
|
|
|
4890
4880
|
...r
|
|
4891
4881
|
}), n) : n;
|
|
4892
4882
|
}
|
|
4893
|
-
function
|
|
4883
|
+
function _a(e) {
|
|
4894
4884
|
return X(
|
|
4895
4885
|
() => ({
|
|
4896
4886
|
draggable: {
|
|
@@ -4910,7 +4900,7 @@ function Ka(e) {
|
|
|
4910
4900
|
[e == null ? void 0 : e.draggable, e == null ? void 0 : e.droppable, e == null ? void 0 : e.dragOverlay]
|
|
4911
4901
|
);
|
|
4912
4902
|
}
|
|
4913
|
-
function
|
|
4903
|
+
function Wa(e) {
|
|
4914
4904
|
let {
|
|
4915
4905
|
activeNode: t,
|
|
4916
4906
|
measure: n,
|
|
@@ -4934,9 +4924,9 @@ function Xa(e) {
|
|
|
4934
4924
|
const c = t == null ? void 0 : t.node.current;
|
|
4935
4925
|
if (!c || c.isConnected === !1)
|
|
4936
4926
|
return;
|
|
4937
|
-
const u = n(c), d =
|
|
4927
|
+
const u = n(c), d = Co(u, r);
|
|
4938
4928
|
if (s || (d.x = 0), a || (d.y = 0), i.current = !0, Math.abs(d.x) > 0 || Math.abs(d.y) > 0) {
|
|
4939
|
-
const h =
|
|
4929
|
+
const h = Eo(c);
|
|
4940
4930
|
h && h.scrollBy({
|
|
4941
4931
|
top: d.y,
|
|
4942
4932
|
left: d.x
|
|
@@ -4953,20 +4943,20 @@ var Ke;
|
|
|
4953
4943
|
(function(e) {
|
|
4954
4944
|
e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
|
|
4955
4945
|
})(Ke || (Ke = {}));
|
|
4956
|
-
const
|
|
4946
|
+
const qa = /* @__PURE__ */ Qo(function(t) {
|
|
4957
4947
|
var n, r, o, i;
|
|
4958
4948
|
let {
|
|
4959
4949
|
id: s,
|
|
4960
4950
|
accessibility: a,
|
|
4961
4951
|
autoScroll: l = !0,
|
|
4962
4952
|
children: c,
|
|
4963
|
-
sensors: u =
|
|
4964
|
-
collisionDetection: d =
|
|
4953
|
+
sensors: u = $a,
|
|
4954
|
+
collisionDetection: d = Zs,
|
|
4965
4955
|
measuring: h,
|
|
4966
4956
|
modifiers: p,
|
|
4967
4957
|
...k
|
|
4968
4958
|
} = t;
|
|
4969
|
-
const y =
|
|
4959
|
+
const y = Zo(Ua, void 0, Va), [g, m] = y, [S, M] = Us(), [L, I] = B(Ke.Uninitialized), b = L === Ke.Initialized, {
|
|
4970
4960
|
draggable: {
|
|
4971
4961
|
active: E,
|
|
4972
4962
|
nodes: v,
|
|
@@ -4983,19 +4973,19 @@ const Ja = /* @__PURE__ */ ei(function(t) {
|
|
|
4983
4973
|
return E != null ? {
|
|
4984
4974
|
id: E,
|
|
4985
4975
|
// It's possible for the active node to unmount while dragging
|
|
4986
|
-
data: (we = A == null ? void 0 : A.data) != null ? we :
|
|
4976
|
+
data: (we = A == null ? void 0 : A.data) != null ? we : Ha,
|
|
4987
4977
|
rect: T
|
|
4988
4978
|
} : null;
|
|
4989
|
-
}, [E, A]), W = V(null), [ae, _] = B(null), [J, Y] = B(null), te = kt(k, Object.values(k)), pe = Zt("DndDescribedBy", s), xe = X(() => w.getEnabled(), [w]), ie =
|
|
4979
|
+
}, [E, A]), W = V(null), [ae, _] = B(null), [J, Y] = B(null), te = kt(k, Object.values(k)), pe = Zt("DndDescribedBy", s), xe = X(() => w.getEnabled(), [w]), ie = _a(h), {
|
|
4990
4980
|
droppableRects: de,
|
|
4991
4981
|
measureDroppableContainers: je,
|
|
4992
4982
|
measuringScheduled: ze
|
|
4993
|
-
} =
|
|
4983
|
+
} = Da(xe, {
|
|
4994
4984
|
dragging: b,
|
|
4995
4985
|
dependencies: [D.x, D.y],
|
|
4996
4986
|
config: ie.droppable
|
|
4997
|
-
}), le =
|
|
4998
|
-
|
|
4987
|
+
}), le = Aa(v, E), De = X(() => J ? Gt(J) : null, [J]), ee = Jo(), se = La(le, ie.draggable.measure);
|
|
4988
|
+
Wa({
|
|
4999
4989
|
activeNode: E != null ? v.get(E) : null,
|
|
5000
4990
|
config: ee.layoutShiftCompensation,
|
|
5001
4991
|
initialRect: se,
|
|
@@ -5015,9 +5005,9 @@ const Ja = /* @__PURE__ */ ei(function(t) {
|
|
|
5015
5005
|
over: null,
|
|
5016
5006
|
scrollableAncestors: [],
|
|
5017
5007
|
scrollAdjustedTranslate: null
|
|
5018
|
-
}), Ze = w.getNodeFor((n = ve.current.over) == null ? void 0 : n.id), ue =
|
|
5008
|
+
}), Ze = w.getNodeFor((n = ve.current.over) == null ? void 0 : n.id), ue = Pa({
|
|
5019
5009
|
measure: ie.dragOverlay.measure
|
|
5020
|
-
}), Ve = (r = ue.nodeRef.current) != null ? r : le, Oe = b ? (o = ue.rect) != null ? o : P : null, x = !!(ue.nodeRef.current && ue.rect), C =
|
|
5010
|
+
}), Ve = (r = ue.nodeRef.current) != null ? r : le, Oe = b ? (o = ue.rect) != null ? o : P : null, x = !!(ue.nodeRef.current && ue.rect), C = Ra(x ? null : P), R = No(Ve ? Ce(Ve) : null), z = Na(b ? Ze ?? le : null), Z = ja(z), H = jo(p, {
|
|
5021
5011
|
transform: {
|
|
5022
5012
|
x: D.x - C.x,
|
|
5023
5013
|
y: D.y - C.y,
|
|
@@ -5034,13 +5024,13 @@ const Ja = /* @__PURE__ */ ei(function(t) {
|
|
|
5034
5024
|
scrollableAncestors: z,
|
|
5035
5025
|
scrollableAncestorRects: Z,
|
|
5036
5026
|
windowRect: R
|
|
5037
|
-
}), Q = De ? nt(De, D) : null, fe =
|
|
5027
|
+
}), Q = De ? nt(De, D) : null, fe = za(z), Le = Dr(fe), oe = Dr(fe, [P]), Se = nt(H, Le), ye = Oe ? oa(Oe, H) : null, K = O && ye ? d({
|
|
5038
5028
|
active: O,
|
|
5039
5029
|
collisionRect: ye,
|
|
5040
5030
|
droppableRects: de,
|
|
5041
5031
|
droppableContainers: xe,
|
|
5042
5032
|
pointerCoordinates: Q
|
|
5043
|
-
}) : null, he =
|
|
5033
|
+
}) : null, he = ko(K, "id"), [be, It] = B(null), on = x ? H : nt(H, oe), Rt = na(on, (i = be == null ? void 0 : be.rect) != null ? i : null, P), ct = V(null), Nt = N(
|
|
5044
5034
|
(we, Ee) => {
|
|
5045
5035
|
let {
|
|
5046
5036
|
sensor: Ae,
|
|
@@ -5180,8 +5170,8 @@ const Ja = /* @__PURE__ */ ei(function(t) {
|
|
|
5180
5170
|
we(Ae, Ee.options, Pe) === !0 && (Te.dndKit = {
|
|
5181
5171
|
capturedBy: Ee.sensor
|
|
5182
5172
|
}, W.current = We, Nt(Ae, Ee));
|
|
5183
|
-
}, [v, Nt]), Ot =
|
|
5184
|
-
|
|
5173
|
+
}, [v, Nt]), Ot = Ma(u, zt);
|
|
5174
|
+
Oa(u), _e(() => {
|
|
5185
5175
|
P && L === Ke.Initializing && I(Ke.Initialized);
|
|
5186
5176
|
}, [P, L]), q(
|
|
5187
5177
|
() => {
|
|
@@ -5270,7 +5260,7 @@ const Ja = /* @__PURE__ */ ei(function(t) {
|
|
|
5270
5260
|
initial: Oe,
|
|
5271
5261
|
translated: ye
|
|
5272
5262
|
};
|
|
5273
|
-
}, [O, le, K, ye, v, Ve, Oe, de, w, be, z, Se]),
|
|
5263
|
+
}, [O, le, K, ye, v, Ve, Oe, de, w, be, z, Se]), Ca({
|
|
5274
5264
|
...ee,
|
|
5275
5265
|
delta: D,
|
|
5276
5266
|
draggingRect: ye,
|
|
@@ -5278,7 +5268,7 @@ const Ja = /* @__PURE__ */ ei(function(t) {
|
|
|
5278
5268
|
scrollableAncestors: z,
|
|
5279
5269
|
scrollableAncestorRects: Z
|
|
5280
5270
|
});
|
|
5281
|
-
const
|
|
5271
|
+
const Ko = X(() => ({
|
|
5282
5272
|
active: O,
|
|
5283
5273
|
activeNode: le,
|
|
5284
5274
|
activeNodeRect: P,
|
|
@@ -5296,7 +5286,7 @@ const Ja = /* @__PURE__ */ ei(function(t) {
|
|
|
5296
5286
|
measuringConfiguration: ie,
|
|
5297
5287
|
measuringScheduled: ze,
|
|
5298
5288
|
windowRect: R
|
|
5299
|
-
}), [O, le, P, J, K, ke, ue, v, w, de, be, je, z, Z, ie, ze, R]),
|
|
5289
|
+
}), [O, le, P, J, K, ke, ue, v, w, de, be, je, z, Z, ie, ze, R]), Xo = X(() => ({
|
|
5300
5290
|
activatorEvent: J,
|
|
5301
5291
|
activators: Ot,
|
|
5302
5292
|
active: O,
|
|
@@ -5309,21 +5299,21 @@ const Ja = /* @__PURE__ */ ei(function(t) {
|
|
|
5309
5299
|
over: be,
|
|
5310
5300
|
measureDroppableContainers: je
|
|
5311
5301
|
}), [J, Ot, O, P, m, pe, v, be, je]);
|
|
5312
|
-
return ne.createElement(
|
|
5302
|
+
return ne.createElement(xo.Provider, {
|
|
5313
5303
|
value: M
|
|
5314
5304
|
}, ne.createElement(Tt.Provider, {
|
|
5315
|
-
value:
|
|
5316
|
-
}, ne.createElement(
|
|
5317
|
-
value:
|
|
5305
|
+
value: Xo
|
|
5306
|
+
}, ne.createElement(Fo.Provider, {
|
|
5307
|
+
value: Ko
|
|
5318
5308
|
}, ne.createElement(nn.Provider, {
|
|
5319
5309
|
value: Rt
|
|
5320
|
-
}, c)), ne.createElement(
|
|
5310
|
+
}, c)), ne.createElement(Ga, {
|
|
5321
5311
|
disabled: (a == null ? void 0 : a.restoreFocus) === !1
|
|
5322
|
-
})), ne.createElement(
|
|
5312
|
+
})), ne.createElement(Ws, {
|
|
5323
5313
|
...a,
|
|
5324
5314
|
hiddenTextDescribedById: pe
|
|
5325
5315
|
}));
|
|
5326
|
-
function
|
|
5316
|
+
function Jo() {
|
|
5327
5317
|
const we = (ae == null ? void 0 : ae.autoScrollEnabled) === !1, Ee = typeof l == "object" ? l.enabled === !1 : l === !1, Ae = b && !we && !Ee;
|
|
5328
5318
|
return typeof l == "object" ? {
|
|
5329
5319
|
...l,
|
|
@@ -5332,15 +5322,15 @@ const Ja = /* @__PURE__ */ ei(function(t) {
|
|
|
5332
5322
|
enabled: Ae
|
|
5333
5323
|
};
|
|
5334
5324
|
}
|
|
5335
|
-
}),
|
|
5336
|
-
function
|
|
5325
|
+
}), Ya = /* @__PURE__ */ Je(null), Tr = "button", Ka = "Draggable";
|
|
5326
|
+
function Xa(e) {
|
|
5337
5327
|
let {
|
|
5338
5328
|
id: t,
|
|
5339
5329
|
data: n,
|
|
5340
5330
|
disabled: r = !1,
|
|
5341
5331
|
attributes: o
|
|
5342
5332
|
} = e;
|
|
5343
|
-
const i = Zt(
|
|
5333
|
+
const i = Zt(Ka), {
|
|
5344
5334
|
activators: s,
|
|
5345
5335
|
activatorEvent: a,
|
|
5346
5336
|
active: l,
|
|
@@ -5352,7 +5342,7 @@ function el(e) {
|
|
|
5352
5342
|
role: p = Tr,
|
|
5353
5343
|
roleDescription: k = "draggable",
|
|
5354
5344
|
tabIndex: y = 0
|
|
5355
|
-
} = o ?? {}, g = (l == null ? void 0 : l.id) === t, m = Be(g ? nn :
|
|
5345
|
+
} = o ?? {}, g = (l == null ? void 0 : l.id) === t, m = Be(g ? nn : Ya), [S, M] = Vt(), [L, I] = Vt(), b = Fa(s, t), E = kt(n);
|
|
5356
5346
|
_e(
|
|
5357
5347
|
() => (d.set(t, {
|
|
5358
5348
|
id: t,
|
|
@@ -5389,20 +5379,20 @@ function el(e) {
|
|
|
5389
5379
|
transform: m
|
|
5390
5380
|
};
|
|
5391
5381
|
}
|
|
5392
|
-
function
|
|
5393
|
-
return Be(
|
|
5382
|
+
function Ja() {
|
|
5383
|
+
return Be(Fo);
|
|
5394
5384
|
}
|
|
5395
|
-
const
|
|
5385
|
+
const Qa = "Droppable", Za = {
|
|
5396
5386
|
timeout: 25
|
|
5397
5387
|
};
|
|
5398
|
-
function
|
|
5388
|
+
function Po(e) {
|
|
5399
5389
|
let {
|
|
5400
5390
|
data: t,
|
|
5401
5391
|
disabled: n = !1,
|
|
5402
5392
|
id: r,
|
|
5403
5393
|
resizeObserverConfig: o
|
|
5404
5394
|
} = e;
|
|
5405
|
-
const i = Zt(
|
|
5395
|
+
const i = Zt(Qa), {
|
|
5406
5396
|
active: s,
|
|
5407
5397
|
dispatch: a,
|
|
5408
5398
|
over: l,
|
|
@@ -5414,7 +5404,7 @@ function Ho(e) {
|
|
|
5414
5404
|
updateMeasurementsFor: y,
|
|
5415
5405
|
timeout: g
|
|
5416
5406
|
} = {
|
|
5417
|
-
...
|
|
5407
|
+
...Za,
|
|
5418
5408
|
...o
|
|
5419
5409
|
}, m = kt(y ?? r), S = N(
|
|
5420
5410
|
() => {
|
|
@@ -5470,7 +5460,7 @@ function Ho(e) {
|
|
|
5470
5460
|
setNodeRef: b
|
|
5471
5461
|
};
|
|
5472
5462
|
}
|
|
5473
|
-
function
|
|
5463
|
+
function el(e) {
|
|
5474
5464
|
let {
|
|
5475
5465
|
animation: t,
|
|
5476
5466
|
children: n
|
|
@@ -5487,30 +5477,30 @@ function ol(e) {
|
|
|
5487
5477
|
Promise.resolve(t(c, i)).then(() => {
|
|
5488
5478
|
o(null);
|
|
5489
5479
|
});
|
|
5490
|
-
}, [t, r, i]), ne.createElement(ne.Fragment, null, n, r ?
|
|
5480
|
+
}, [t, r, i]), ne.createElement(ne.Fragment, null, n, r ? ei(r, {
|
|
5491
5481
|
ref: s
|
|
5492
5482
|
}) : null);
|
|
5493
5483
|
}
|
|
5494
|
-
const
|
|
5484
|
+
const tl = {
|
|
5495
5485
|
x: 0,
|
|
5496
5486
|
y: 0,
|
|
5497
5487
|
scaleX: 1,
|
|
5498
5488
|
scaleY: 1
|
|
5499
5489
|
};
|
|
5500
|
-
function
|
|
5490
|
+
function nl(e) {
|
|
5501
5491
|
let {
|
|
5502
5492
|
children: t
|
|
5503
5493
|
} = e;
|
|
5504
5494
|
return ne.createElement(Tt.Provider, {
|
|
5505
|
-
value:
|
|
5495
|
+
value: Oo
|
|
5506
5496
|
}, ne.createElement(nn.Provider, {
|
|
5507
|
-
value:
|
|
5497
|
+
value: tl
|
|
5508
5498
|
}, t));
|
|
5509
5499
|
}
|
|
5510
|
-
const
|
|
5500
|
+
const rl = {
|
|
5511
5501
|
position: "fixed",
|
|
5512
5502
|
touchAction: "none"
|
|
5513
|
-
},
|
|
5503
|
+
}, ol = (e) => Xn(e) ? "transform 250ms ease" : void 0, il = /* @__PURE__ */ Pn((e, t) => {
|
|
5514
5504
|
let {
|
|
5515
5505
|
as: n,
|
|
5516
5506
|
activatorEvent: r,
|
|
@@ -5520,7 +5510,7 @@ const al = {
|
|
|
5520
5510
|
rect: a,
|
|
5521
5511
|
style: l,
|
|
5522
5512
|
transform: c,
|
|
5523
|
-
transition: u =
|
|
5513
|
+
transition: u = ol
|
|
5524
5514
|
} = e;
|
|
5525
5515
|
if (!a)
|
|
5526
5516
|
return null;
|
|
@@ -5529,13 +5519,13 @@ const al = {
|
|
|
5529
5519
|
scaleX: 1,
|
|
5530
5520
|
scaleY: 1
|
|
5531
5521
|
}, h = {
|
|
5532
|
-
...
|
|
5522
|
+
...rl,
|
|
5533
5523
|
width: a.width,
|
|
5534
5524
|
height: a.height,
|
|
5535
5525
|
top: a.top,
|
|
5536
5526
|
left: a.left,
|
|
5537
5527
|
transform: St.Transform.toString(d),
|
|
5538
|
-
transformOrigin: o && r ?
|
|
5528
|
+
transformOrigin: o && r ? Ys(r, a) : void 0,
|
|
5539
5529
|
transition: typeof u == "function" ? u(r) : u,
|
|
5540
5530
|
...l
|
|
5541
5531
|
};
|
|
@@ -5544,7 +5534,7 @@ const al = {
|
|
|
5544
5534
|
style: h,
|
|
5545
5535
|
ref: t
|
|
5546
5536
|
}, i);
|
|
5547
|
-
}),
|
|
5537
|
+
}), sl = (e) => (t) => {
|
|
5548
5538
|
let {
|
|
5549
5539
|
active: n,
|
|
5550
5540
|
dragOverlay: r
|
|
@@ -5564,7 +5554,7 @@ const al = {
|
|
|
5564
5554
|
n.node.style.setProperty(l, c);
|
|
5565
5555
|
s != null && s.active && n.node.classList.remove(s.active);
|
|
5566
5556
|
};
|
|
5567
|
-
},
|
|
5557
|
+
}, al = (e) => {
|
|
5568
5558
|
let {
|
|
5569
5559
|
transform: {
|
|
5570
5560
|
initial: t,
|
|
@@ -5576,11 +5566,11 @@ const al = {
|
|
|
5576
5566
|
}, {
|
|
5577
5567
|
transform: St.Transform.toString(n)
|
|
5578
5568
|
}];
|
|
5579
|
-
},
|
|
5569
|
+
}, ll = {
|
|
5580
5570
|
duration: 250,
|
|
5581
5571
|
easing: "ease",
|
|
5582
|
-
keyframes:
|
|
5583
|
-
sideEffects: /* @__PURE__ */
|
|
5572
|
+
keyframes: al,
|
|
5573
|
+
sideEffects: /* @__PURE__ */ sl({
|
|
5584
5574
|
styles: {
|
|
5585
5575
|
active: {
|
|
5586
5576
|
opacity: "0"
|
|
@@ -5588,7 +5578,7 @@ const al = {
|
|
|
5588
5578
|
}
|
|
5589
5579
|
})
|
|
5590
5580
|
};
|
|
5591
|
-
function
|
|
5581
|
+
function cl(e) {
|
|
5592
5582
|
let {
|
|
5593
5583
|
config: t,
|
|
5594
5584
|
draggableNodes: n,
|
|
@@ -5604,16 +5594,16 @@ function hl(e) {
|
|
|
5604
5594
|
const l = a.node.current;
|
|
5605
5595
|
if (!l)
|
|
5606
5596
|
return;
|
|
5607
|
-
const c =
|
|
5597
|
+
const c = zo(s);
|
|
5608
5598
|
if (!c)
|
|
5609
5599
|
return;
|
|
5610
5600
|
const {
|
|
5611
5601
|
transform: u
|
|
5612
|
-
} = Ce(s).getComputedStyle(s), d =
|
|
5602
|
+
} = Ce(s).getComputedStyle(s), d = So(u);
|
|
5613
5603
|
if (!d)
|
|
5614
5604
|
return;
|
|
5615
|
-
const h = typeof t == "function" ? t :
|
|
5616
|
-
return
|
|
5605
|
+
const h = typeof t == "function" ? t : dl(t);
|
|
5606
|
+
return Io(l, o.draggable.measure), h({
|
|
5617
5607
|
active: {
|
|
5618
5608
|
id: i,
|
|
5619
5609
|
data: a.data,
|
|
@@ -5631,14 +5621,14 @@ function hl(e) {
|
|
|
5631
5621
|
});
|
|
5632
5622
|
});
|
|
5633
5623
|
}
|
|
5634
|
-
function
|
|
5624
|
+
function dl(e) {
|
|
5635
5625
|
const {
|
|
5636
5626
|
duration: t,
|
|
5637
5627
|
easing: n,
|
|
5638
5628
|
sideEffects: r,
|
|
5639
5629
|
keyframes: o
|
|
5640
5630
|
} = {
|
|
5641
|
-
...
|
|
5631
|
+
...ll,
|
|
5642
5632
|
...e
|
|
5643
5633
|
};
|
|
5644
5634
|
return (i) => {
|
|
@@ -5688,13 +5678,13 @@ function gl(e) {
|
|
|
5688
5678
|
};
|
|
5689
5679
|
}
|
|
5690
5680
|
let Ir = 0;
|
|
5691
|
-
function
|
|
5681
|
+
function ul(e) {
|
|
5692
5682
|
return X(() => {
|
|
5693
5683
|
if (e != null)
|
|
5694
5684
|
return Ir++, Ir;
|
|
5695
5685
|
}, [e]);
|
|
5696
5686
|
}
|
|
5697
|
-
const
|
|
5687
|
+
const fl = /* @__PURE__ */ ne.memo((e) => {
|
|
5698
5688
|
let {
|
|
5699
5689
|
adjustScale: t = !1,
|
|
5700
5690
|
children: n,
|
|
@@ -5719,7 +5709,7 @@ const ml = /* @__PURE__ */ ne.memo((e) => {
|
|
|
5719
5709
|
scrollableAncestors: M,
|
|
5720
5710
|
scrollableAncestorRects: L,
|
|
5721
5711
|
windowRect: I
|
|
5722
|
-
} =
|
|
5712
|
+
} = Ja(), b = Be(nn), E = ul(d == null ? void 0 : d.id), v = jo(s, {
|
|
5723
5713
|
activatorEvent: u,
|
|
5724
5714
|
active: d,
|
|
5725
5715
|
activeNodeRect: h,
|
|
@@ -5731,15 +5721,15 @@ const ml = /* @__PURE__ */ ne.memo((e) => {
|
|
|
5731
5721
|
scrollableAncestorRects: L,
|
|
5732
5722
|
transform: b,
|
|
5733
5723
|
windowRect: I
|
|
5734
|
-
}), D = rr(h), w =
|
|
5724
|
+
}), D = rr(h), w = cl({
|
|
5735
5725
|
config: r,
|
|
5736
5726
|
draggableNodes: k,
|
|
5737
5727
|
droppableContainers: y,
|
|
5738
5728
|
measuringConfiguration: S
|
|
5739
5729
|
}), A = D ? g.setRef : void 0;
|
|
5740
|
-
return ne.createElement(
|
|
5730
|
+
return ne.createElement(nl, null, ne.createElement(el, {
|
|
5741
5731
|
animation: w
|
|
5742
|
-
}, d && E ? ne.createElement(
|
|
5732
|
+
}, d && E ? ne.createElement(il, {
|
|
5743
5733
|
key: E,
|
|
5744
5734
|
id: d.id,
|
|
5745
5735
|
ref: A,
|
|
@@ -5762,7 +5752,7 @@ function qt(e) {
|
|
|
5762
5752
|
const t = e.data.current;
|
|
5763
5753
|
return !!(t && "sortable" in t && typeof t.sortable == "object" && "containerId" in t.sortable && "items" in t.sortable && "index" in t.sortable);
|
|
5764
5754
|
}
|
|
5765
|
-
const
|
|
5755
|
+
const hl = [U.Down, U.Right, U.Up, U.Left], gl = (e, t) => {
|
|
5766
5756
|
let {
|
|
5767
5757
|
context: {
|
|
5768
5758
|
active: n,
|
|
@@ -5773,7 +5763,7 @@ const vl = [U.Down, U.Right, U.Up, U.Left], yl = (e, t) => {
|
|
|
5773
5763
|
scrollableAncestors: a
|
|
5774
5764
|
}
|
|
5775
5765
|
} = t;
|
|
5776
|
-
if (
|
|
5766
|
+
if (hl.includes(e.code)) {
|
|
5777
5767
|
if (e.preventDefault(), !n || !r)
|
|
5778
5768
|
return;
|
|
5779
5769
|
const l = [];
|
|
@@ -5797,16 +5787,16 @@ const vl = [U.Down, U.Right, U.Up, U.Left], yl = (e, t) => {
|
|
|
5797
5787
|
break;
|
|
5798
5788
|
}
|
|
5799
5789
|
});
|
|
5800
|
-
const c =
|
|
5790
|
+
const c = Js({
|
|
5801
5791
|
collisionRect: r,
|
|
5802
5792
|
droppableRects: o,
|
|
5803
5793
|
droppableContainers: l
|
|
5804
5794
|
});
|
|
5805
|
-
let u =
|
|
5795
|
+
let u = ko(c, "id");
|
|
5806
5796
|
if (u === (s == null ? void 0 : s.id) && c.length > 1 && (u = c[1].id), u != null) {
|
|
5807
5797
|
const d = i.get(n.id), h = i.get(u), p = h ? o.get(h.id) : null, k = h == null ? void 0 : h.node.current;
|
|
5808
5798
|
if (k && p && d && h) {
|
|
5809
|
-
const g = en(k).some((b, E) => a[E] !== b), m =
|
|
5799
|
+
const g = en(k).some((b, E) => a[E] !== b), m = $o(d, h), S = pl(d, h), M = g || !m ? {
|
|
5810
5800
|
x: 0,
|
|
5811
5801
|
y: 0
|
|
5812
5802
|
} : {
|
|
@@ -5821,11 +5811,11 @@ const vl = [U.Down, U.Right, U.Up, U.Left], yl = (e, t) => {
|
|
|
5821
5811
|
}
|
|
5822
5812
|
}
|
|
5823
5813
|
};
|
|
5824
|
-
function
|
|
5814
|
+
function $o(e, t) {
|
|
5825
5815
|
return !qt(e) || !qt(t) ? !1 : e.data.current.sortable.containerId === t.data.current.sortable.containerId;
|
|
5826
5816
|
}
|
|
5827
|
-
function
|
|
5828
|
-
return !qt(e) || !qt(t) ||
|
|
5817
|
+
function pl(e, t) {
|
|
5818
|
+
return !qt(e) || !qt(t) || !$o(e, t) ? !1 : e.data.current.sortable.index < t.data.current.sortable.index;
|
|
5829
5819
|
}
|
|
5830
5820
|
function Rr(e) {
|
|
5831
5821
|
var n;
|
|
@@ -5833,7 +5823,7 @@ function Rr(e) {
|
|
|
5833
5823
|
const t = (n = e[0].data) == null ? void 0 : n.zone;
|
|
5834
5824
|
return t === "before" || t === "after" || t === "into" ? t : null;
|
|
5835
5825
|
}
|
|
5836
|
-
function
|
|
5826
|
+
function ml(e) {
|
|
5837
5827
|
const {
|
|
5838
5828
|
onReorder: t,
|
|
5839
5829
|
onGroupReorder: n,
|
|
@@ -5841,14 +5831,14 @@ function wl(e) {
|
|
|
5841
5831
|
onDropIntoGroupAtPosition: o,
|
|
5842
5832
|
onRemoveFromGroup: i,
|
|
5843
5833
|
findParentGroup: s
|
|
5844
|
-
} = e, [a, l] = B(null), [c, u] = B(null), [d, h] = B(null), p = V(null), k =
|
|
5834
|
+
} = e, [a, l] = B(null), [c, u] = B(null), [d, h] = B(null), p = V(null), k = qs(
|
|
5845
5835
|
br(nr, {
|
|
5846
5836
|
activationConstraint: {
|
|
5847
5837
|
distance: 5
|
|
5848
5838
|
}
|
|
5849
5839
|
}),
|
|
5850
5840
|
br(er, {
|
|
5851
|
-
coordinateGetter:
|
|
5841
|
+
coordinateGetter: gl
|
|
5852
5842
|
})
|
|
5853
5843
|
), y = N((I) => {
|
|
5854
5844
|
l(String(I.active.id));
|
|
@@ -5913,11 +5903,11 @@ function wl(e) {
|
|
|
5913
5903
|
onDragCancel: L
|
|
5914
5904
|
};
|
|
5915
5905
|
}
|
|
5916
|
-
const
|
|
5906
|
+
const vl = (e) => {
|
|
5917
5907
|
var h, p;
|
|
5918
5908
|
const { pointerCoordinates: t, droppableContainers: n, droppableRects: r } = e;
|
|
5919
|
-
let o =
|
|
5920
|
-
if (o.length === 0 && (o =
|
|
5909
|
+
let o = ta(e);
|
|
5910
|
+
if (o.length === 0 && (o = Xs(e)), o.length === 0 || !t) return o;
|
|
5921
5911
|
const i = o[0];
|
|
5922
5912
|
if (String(i.id).startsWith("group-footer::"))
|
|
5923
5913
|
return [{ ...i, data: { ...i.data, zone: "after" } }];
|
|
@@ -5929,7 +5919,7 @@ const xl = (e) => {
|
|
|
5929
5919
|
...i,
|
|
5930
5920
|
data: { ...i.data, zone: d }
|
|
5931
5921
|
}];
|
|
5932
|
-
},
|
|
5922
|
+
}, yl = ({
|
|
5933
5923
|
layer: e,
|
|
5934
5924
|
isOver: t,
|
|
5935
5925
|
dropPosition: n,
|
|
@@ -5943,7 +5933,7 @@ const xl = (e) => {
|
|
|
5943
5933
|
onDelete: u,
|
|
5944
5934
|
deleteSuppressed: d
|
|
5945
5935
|
}) => {
|
|
5946
|
-
const { attributes: h, listeners: p, setNodeRef: k, isDragging: y } =
|
|
5936
|
+
const { attributes: h, listeners: p, setNodeRef: k, isDragging: y } = Xa({ id: e.id }), { setNodeRef: g } = Po({ id: e.id, data: { isGroup: !!e.isGroup } }), m = N((D) => {
|
|
5947
5937
|
k(D), g(D);
|
|
5948
5938
|
}, [k, g]), S = e.isGroup, M = e.depth > 0, L = M ? e.depth * 24 : 0, I = {
|
|
5949
5939
|
opacity: y ? 0.3 : 1,
|
|
@@ -6114,8 +6104,8 @@ const xl = (e) => {
|
|
|
6114
6104
|
title: e,
|
|
6115
6105
|
children: r
|
|
6116
6106
|
}
|
|
6117
|
-
),
|
|
6118
|
-
const { setNodeRef: r } =
|
|
6107
|
+
), bl = ({ groupId: e, isOver: t, depth: n }) => {
|
|
6108
|
+
const { setNodeRef: r } = Po({ id: `group-footer::${e}` }), o = (n + 1) * 24;
|
|
6119
6109
|
return /* @__PURE__ */ f(
|
|
6120
6110
|
"div",
|
|
6121
6111
|
{
|
|
@@ -6130,7 +6120,7 @@ const xl = (e) => {
|
|
|
6130
6120
|
}
|
|
6131
6121
|
}
|
|
6132
6122
|
);
|
|
6133
|
-
},
|
|
6123
|
+
}, wl = ({ layer: e, showPreviewImages: t, previewDisplaySize: n }) => /* @__PURE__ */ j(
|
|
6134
6124
|
"div",
|
|
6135
6125
|
{
|
|
6136
6126
|
style: {
|
|
@@ -6180,7 +6170,7 @@ const xl = (e) => {
|
|
|
6180
6170
|
/* @__PURE__ */ f("span", { style: { fontSize: 13, color: "var(--foreground, #333)" }, children: e.name })
|
|
6181
6171
|
]
|
|
6182
6172
|
}
|
|
6183
|
-
),
|
|
6173
|
+
), xl = ({
|
|
6184
6174
|
width: e = 250,
|
|
6185
6175
|
height: t,
|
|
6186
6176
|
showPreviewImages: n = !0,
|
|
@@ -6191,7 +6181,7 @@ const xl = (e) => {
|
|
|
6191
6181
|
showHeader: a = !0,
|
|
6192
6182
|
...l
|
|
6193
6183
|
}) => {
|
|
6194
|
-
const { activeArtboard: c } =
|
|
6184
|
+
const { activeArtboard: c } = Ns(), u = (c == null ? void 0 : c.previewBackgroundColor) || (c == null ? void 0 : c.backgroundColor) || "transparent", d = 80, h = 160, {
|
|
6195
6185
|
layers: p,
|
|
6196
6186
|
flatLayers: k,
|
|
6197
6187
|
selectLayer: y,
|
|
@@ -6207,7 +6197,7 @@ const xl = (e) => {
|
|
|
6207
6197
|
findElementById: D,
|
|
6208
6198
|
findParentGroup: w,
|
|
6209
6199
|
generateAllPreviews: A
|
|
6210
|
-
} =
|
|
6200
|
+
} = yi({
|
|
6211
6201
|
...l,
|
|
6212
6202
|
previewSize: h,
|
|
6213
6203
|
previewBackgroundColor: u
|
|
@@ -6215,7 +6205,7 @@ const xl = (e) => {
|
|
|
6215
6205
|
q(() => {
|
|
6216
6206
|
n && k.length > 0 && A();
|
|
6217
6207
|
}, [n, k.length, u, A]);
|
|
6218
|
-
const T =
|
|
6208
|
+
const T = ti(), O = N(
|
|
6219
6209
|
(ee) => {
|
|
6220
6210
|
var se;
|
|
6221
6211
|
return T((se = D(ee.id)) == null ? void 0 : se.name);
|
|
@@ -6233,7 +6223,7 @@ const xl = (e) => {
|
|
|
6233
6223
|
ke && !ve ? E(ee, se, P) : L(ee, se, P);
|
|
6234
6224
|
},
|
|
6235
6225
|
[w, E, L]
|
|
6236
|
-
), _ =
|
|
6226
|
+
), _ = ml({
|
|
6237
6227
|
onReorder: ae,
|
|
6238
6228
|
onDropIntoGroup: b,
|
|
6239
6229
|
onDropIntoGroupAtPosition: (ee, se) => b(ee, se),
|
|
@@ -6242,7 +6232,7 @@ const xl = (e) => {
|
|
|
6242
6232
|
findParentGroup: w
|
|
6243
6233
|
}), J = (ee) => [...ee].reverse().map((P) => /* @__PURE__ */ j(ne.Fragment, { children: [
|
|
6244
6234
|
/* @__PURE__ */ f(
|
|
6245
|
-
|
|
6235
|
+
yl,
|
|
6246
6236
|
{
|
|
6247
6237
|
layer: P,
|
|
6248
6238
|
isOver: _.overId === P.id,
|
|
@@ -6260,7 +6250,7 @@ const xl = (e) => {
|
|
|
6260
6250
|
),
|
|
6261
6251
|
P.children && J(P.children),
|
|
6262
6252
|
P.isGroup && /* @__PURE__ */ f(
|
|
6263
|
-
|
|
6253
|
+
bl,
|
|
6264
6254
|
{
|
|
6265
6255
|
groupId: P.id,
|
|
6266
6256
|
isOver: _.overId === `group-footer::${P.id}`,
|
|
@@ -6269,7 +6259,7 @@ const xl = (e) => {
|
|
|
6269
6259
|
)
|
|
6270
6260
|
] }, P.id)), Y = (ee) => [...ee].reverse().map((P) => /* @__PURE__ */ j(ne.Fragment, { children: [
|
|
6271
6261
|
/* @__PURE__ */ f(
|
|
6272
|
-
|
|
6262
|
+
kl,
|
|
6273
6263
|
{
|
|
6274
6264
|
layer: P,
|
|
6275
6265
|
showPreviewImages: n,
|
|
@@ -6346,10 +6336,10 @@ const xl = (e) => {
|
|
|
6346
6336
|
),
|
|
6347
6337
|
/* @__PURE__ */ j("div", { style: { flex: 1, overflow: "auto", minHeight: 0 }, children: [
|
|
6348
6338
|
p.length > 0 ? r ? /* @__PURE__ */ j(
|
|
6349
|
-
|
|
6339
|
+
qa,
|
|
6350
6340
|
{
|
|
6351
6341
|
sensors: _.sensors,
|
|
6352
|
-
collisionDetection:
|
|
6342
|
+
collisionDetection: vl,
|
|
6353
6343
|
onDragStart: _.onDragStart,
|
|
6354
6344
|
onDragMove: _.onDragMove,
|
|
6355
6345
|
onDragOver: _.onDragOver,
|
|
@@ -6357,8 +6347,8 @@ const xl = (e) => {
|
|
|
6357
6347
|
onDragCancel: _.onDragCancel,
|
|
6358
6348
|
children: [
|
|
6359
6349
|
J(p),
|
|
6360
|
-
/* @__PURE__ */ f(
|
|
6361
|
-
|
|
6350
|
+
/* @__PURE__ */ f(fl, { dropAnimation: null, children: te ? /* @__PURE__ */ f(
|
|
6351
|
+
wl,
|
|
6362
6352
|
{
|
|
6363
6353
|
layer: te,
|
|
6364
6354
|
showPreviewImages: n,
|
|
@@ -6395,7 +6385,7 @@ const xl = (e) => {
|
|
|
6395
6385
|
]
|
|
6396
6386
|
}
|
|
6397
6387
|
);
|
|
6398
|
-
},
|
|
6388
|
+
}, kl = ({ layer: e, showPreviewImages: t, previewDisplaySize: n, onSelect: r, onToggleVisibility: o, onToggleLock: i, onDuplicate: s, onDelete: a, deleteSuppressed: l }) => {
|
|
6399
6389
|
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 = {
|
|
6400
6390
|
paddingLeft: u + 8,
|
|
6401
6391
|
paddingRight: 8,
|
|
@@ -6480,7 +6470,7 @@ const xl = (e) => {
|
|
|
6480
6470
|
] })
|
|
6481
6471
|
] }, e.id);
|
|
6482
6472
|
};
|
|
6483
|
-
class
|
|
6473
|
+
class fc {
|
|
6484
6474
|
constructor() {
|
|
6485
6475
|
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));
|
|
6486
6476
|
}
|
|
@@ -6581,9 +6571,9 @@ class mc {
|
|
|
6581
6571
|
for (const t of [...this.listeners]) t();
|
|
6582
6572
|
}
|
|
6583
6573
|
}
|
|
6584
|
-
const
|
|
6574
|
+
const Ho = Je(null);
|
|
6585
6575
|
function or(e) {
|
|
6586
|
-
const t = Be(
|
|
6576
|
+
const t = Be(Ho);
|
|
6587
6577
|
if (!t)
|
|
6588
6578
|
throw new rt(
|
|
6589
6579
|
"E_OUTSIDE_ROOT",
|
|
@@ -6594,36 +6584,36 @@ function or(e) {
|
|
|
6594
6584
|
}
|
|
6595
6585
|
function ir(e) {
|
|
6596
6586
|
const t = or(e), n = Pr();
|
|
6597
|
-
|
|
6587
|
+
$n(
|
|
6598
6588
|
() => t.registry.requireCanvas(n, e),
|
|
6599
6589
|
[t.registry, n, e]
|
|
6600
6590
|
);
|
|
6601
6591
|
}
|
|
6602
6592
|
function rn(e, t) {
|
|
6603
|
-
const n = Be(
|
|
6593
|
+
const n = Be(Ho), r = (n == null ? void 0 : n.registry) ?? null, o = Pr(), i = t == null ? void 0 : t.mockupId, s = t == null ? void 0 : t.floatingToolbar, a = X(
|
|
6604
6594
|
() => ({
|
|
6605
6595
|
...i !== void 0 ? { mockupId: i } : {},
|
|
6606
6596
|
...s !== void 0 ? { floatingToolbar: s } : {}
|
|
6607
6597
|
}),
|
|
6608
6598
|
[i, s]
|
|
6609
6599
|
);
|
|
6610
|
-
|
|
6600
|
+
$n(() => {
|
|
6611
6601
|
if (r)
|
|
6612
6602
|
return r.registerPart(o, e, a);
|
|
6613
6603
|
}, [r, o, e, a]);
|
|
6614
6604
|
}
|
|
6615
|
-
function
|
|
6605
|
+
function hc(e) {
|
|
6616
6606
|
return {
|
|
6617
6607
|
reportInvariant(t) {
|
|
6618
|
-
if (
|
|
6608
|
+
if (ii()) throw t;
|
|
6619
6609
|
e(t);
|
|
6620
6610
|
},
|
|
6621
6611
|
reportRuntimeError(t) {
|
|
6622
|
-
|
|
6612
|
+
ni(t), e(t);
|
|
6623
6613
|
}
|
|
6624
6614
|
};
|
|
6625
6615
|
}
|
|
6626
|
-
function
|
|
6616
|
+
function Cl(e) {
|
|
6627
6617
|
const { elements: t } = e.getState();
|
|
6628
6618
|
return t.map((n, r) => {
|
|
6629
6619
|
const o = n, i = o.transformType ?? "custom", s = o.name ?? i.charAt(0).toUpperCase() + i.slice(1);
|
|
@@ -6635,23 +6625,23 @@ function Ml(e) {
|
|
|
6635
6625
|
};
|
|
6636
6626
|
});
|
|
6637
6627
|
}
|
|
6638
|
-
function
|
|
6628
|
+
function Sl(e) {
|
|
6639
6629
|
const t = V(null), n = () => {
|
|
6640
6630
|
var i;
|
|
6641
|
-
const r =
|
|
6631
|
+
const r = Cl(e), o = r.map((s) => `${s.key}|${s.kind}|${s.visible}`).join(`
|
|
6642
6632
|
`);
|
|
6643
6633
|
return ((i = t.current) == null ? void 0 : i.key) !== o && (t.current = { key: o, rows: r }), t.current.rows;
|
|
6644
6634
|
};
|
|
6645
6635
|
return $r(e.subscribe, n, n);
|
|
6646
6636
|
}
|
|
6647
|
-
function
|
|
6637
|
+
function El(e) {
|
|
6648
6638
|
return e === "image" ? G.image : e === "shape" ? G.shapes : e === "group" ? "lucide:folder-open" : G.text;
|
|
6649
6639
|
}
|
|
6650
|
-
function
|
|
6640
|
+
function Al({
|
|
6651
6641
|
store: e,
|
|
6652
6642
|
direction: t
|
|
6653
6643
|
}) {
|
|
6654
|
-
const r = [...
|
|
6644
|
+
const r = [...Sl(e)].reverse();
|
|
6655
6645
|
return /* @__PURE__ */ f(
|
|
6656
6646
|
"div",
|
|
6657
6647
|
{
|
|
@@ -6675,7 +6665,7 @@ function Tl({
|
|
|
6675
6665
|
opacity: o.visible ? 1 : 0.4
|
|
6676
6666
|
},
|
|
6677
6667
|
children: [
|
|
6678
|
-
/* @__PURE__ */ f($, { icon:
|
|
6668
|
+
/* @__PURE__ */ f($, { icon: El(o.kind), style: { fontSize: 18, color: "var(--text-secondary, #888)", flexShrink: 0 } }),
|
|
6679
6669
|
/* @__PURE__ */ f(
|
|
6680
6670
|
"span",
|
|
6681
6671
|
{
|
|
@@ -6696,7 +6686,7 @@ function Tl({
|
|
|
6696
6686
|
}
|
|
6697
6687
|
);
|
|
6698
6688
|
}
|
|
6699
|
-
function
|
|
6689
|
+
function gc({
|
|
6700
6690
|
direction: e = "vertical",
|
|
6701
6691
|
className: t,
|
|
6702
6692
|
style: n
|
|
@@ -6708,9 +6698,9 @@ function yc({
|
|
|
6708
6698
|
() => o.hasCanvas(),
|
|
6709
6699
|
() => o.hasCanvas()
|
|
6710
6700
|
);
|
|
6711
|
-
return /* @__PURE__ */ f("div", { "data-sc-part": "layers", "data-sc-direction": e, className: t, style: n, children: i ? /* @__PURE__ */ f(
|
|
6701
|
+
return /* @__PURE__ */ f("div", { "data-sc-part": "layers", "data-sc-direction": e, className: t, style: n, children: i ? /* @__PURE__ */ f(xl, { style: { width: "100%" } }) : /* @__PURE__ */ f(Al, { store: r.store, direction: e }) });
|
|
6712
6702
|
}
|
|
6713
|
-
const
|
|
6703
|
+
const Bo = ({
|
|
6714
6704
|
trigger: e,
|
|
6715
6705
|
children: t,
|
|
6716
6706
|
isOpen: n,
|
|
@@ -6723,7 +6713,7 @@ const Uo = ({
|
|
|
6723
6713
|
contentClassName: c = ""
|
|
6724
6714
|
}) => {
|
|
6725
6715
|
const u = V(null), d = V(null), h = V(null), [p, k] = B({}), [y, g] = B(!1), m = (M) => {
|
|
6726
|
-
M.stopPropagation(), !n && a &&
|
|
6716
|
+
M.stopPropagation(), !n && a && wi.protectNextClick(), r(!n);
|
|
6727
6717
|
};
|
|
6728
6718
|
q(() => {
|
|
6729
6719
|
if (!n) return;
|
|
@@ -6795,12 +6785,12 @@ const Uo = ({
|
|
|
6795
6785
|
);
|
|
6796
6786
|
return /* @__PURE__ */ j("div", { className: `sc:relative sc:inline-flex ${l}`.trim(), ref: u, children: [
|
|
6797
6787
|
/* @__PURE__ */ f("div", { ref: d, onClick: m, children: e }),
|
|
6798
|
-
S &&
|
|
6788
|
+
S && Hn(
|
|
6799
6789
|
/* @__PURE__ */ f("div", { className: "sc-root", style: { display: "contents" }, children: S }),
|
|
6800
6790
|
document.body
|
|
6801
6791
|
)
|
|
6802
6792
|
] });
|
|
6803
|
-
},
|
|
6793
|
+
}, Fn = ({ children: e, className: t = "", minWidth: n = "160px", maxHeight: r }) => {
|
|
6804
6794
|
const o = r ? `max-h-[${r}]` : "", i = { minWidth: n };
|
|
6805
6795
|
return /* @__PURE__ */ f(
|
|
6806
6796
|
"div",
|
|
@@ -6811,7 +6801,7 @@ const Uo = ({
|
|
|
6811
6801
|
children: e
|
|
6812
6802
|
}
|
|
6813
6803
|
);
|
|
6814
|
-
},
|
|
6804
|
+
}, Vo = [
|
|
6815
6805
|
{ type: "custom", label: "Text", icon: /* @__PURE__ */ f($, { icon: G.text, className: "sc:size-[18px]" }) },
|
|
6816
6806
|
{ type: "image", label: "Image", icon: /* @__PURE__ */ f($, { icon: G.image, className: "sc:size-[18px]" }) },
|
|
6817
6807
|
{ type: "shape", label: "Shape", icon: /* @__PURE__ */ f($, { icon: G.shapes, className: "sc:size-[18px]" }) },
|
|
@@ -6819,7 +6809,7 @@ const Uo = ({
|
|
|
6819
6809
|
{ type: "wave", label: "Wave Text", icon: /* @__PURE__ */ f($, { icon: "lucide:waves", className: "sc:size-[18px]" }) },
|
|
6820
6810
|
{ type: "arch", label: "Arch Text", icon: /* @__PURE__ */ f($, { icon: "lucide:arrow-up-from-dot", className: "sc:size-[18px]" }) }
|
|
6821
6811
|
];
|
|
6822
|
-
function
|
|
6812
|
+
function Ml() {
|
|
6823
6813
|
const [e, t] = ne.useState(!1);
|
|
6824
6814
|
return ne.useEffect(() => {
|
|
6825
6815
|
if (typeof document > "u") return;
|
|
@@ -6832,7 +6822,7 @@ function Il() {
|
|
|
6832
6822
|
}), () => r.disconnect();
|
|
6833
6823
|
}, []), e;
|
|
6834
6824
|
}
|
|
6835
|
-
const
|
|
6825
|
+
const Dl = ({
|
|
6836
6826
|
isOpen: e,
|
|
6837
6827
|
onClose: t,
|
|
6838
6828
|
title: n,
|
|
@@ -6851,14 +6841,14 @@ const Rl = ({
|
|
|
6851
6841
|
disableOverflowHidden: y = !1,
|
|
6852
6842
|
"data-testid": g
|
|
6853
6843
|
}) => {
|
|
6854
|
-
const m = i === "bottom" ? s || a : void 0, M =
|
|
6844
|
+
const m = i === "bottom" ? s || a : void 0, M = Ml() ? 0.65 : 0.4;
|
|
6855
6845
|
return /* @__PURE__ */ f(
|
|
6856
|
-
|
|
6846
|
+
go,
|
|
6857
6847
|
{
|
|
6858
6848
|
open: e,
|
|
6859
6849
|
onOpenChange: (L) => !L && t(),
|
|
6860
6850
|
children: /* @__PURE__ */ j(
|
|
6861
|
-
|
|
6851
|
+
po,
|
|
6862
6852
|
{
|
|
6863
6853
|
placement: i,
|
|
6864
6854
|
width: l,
|
|
@@ -6876,8 +6866,8 @@ const Rl = ({
|
|
|
6876
6866
|
"data-testid": g,
|
|
6877
6867
|
"data-preserve-selection": !0,
|
|
6878
6868
|
children: [
|
|
6879
|
-
/* @__PURE__ */ f(
|
|
6880
|
-
r && /* @__PURE__ */ f(
|
|
6869
|
+
/* @__PURE__ */ f(mo, { className: "sc:sr-only", children: n }),
|
|
6870
|
+
r && /* @__PURE__ */ f(vo, { className: "sc:sr-only", children: r }),
|
|
6881
6871
|
k ? (
|
|
6882
6872
|
// Custom scroll control - children manage their own scrolling
|
|
6883
6873
|
/* @__PURE__ */ j("div", { className: "sc:flex sc:flex-col sc:flex-1 sc:min-h-0", children: [
|
|
@@ -6928,7 +6918,7 @@ const Rl = ({
|
|
|
6928
6918
|
)
|
|
6929
6919
|
}
|
|
6930
6920
|
);
|
|
6931
|
-
},
|
|
6921
|
+
}, Ll = ({ className: e }) => /* @__PURE__ */ f(
|
|
6932
6922
|
"svg",
|
|
6933
6923
|
{
|
|
6934
6924
|
className: e,
|
|
@@ -6941,7 +6931,7 @@ const Rl = ({
|
|
|
6941
6931
|
"aria-hidden": !0,
|
|
6942
6932
|
children: /* @__PURE__ */ f("path", { d: "M12 2L21 8L18 19L6 19L3 8L12 2Z" })
|
|
6943
6933
|
}
|
|
6944
|
-
),
|
|
6934
|
+
), Tl = ({ className: e }) => /* @__PURE__ */ f(
|
|
6945
6935
|
"svg",
|
|
6946
6936
|
{
|
|
6947
6937
|
className: e,
|
|
@@ -6952,15 +6942,15 @@ const Rl = ({
|
|
|
6952
6942
|
"aria-hidden": !0,
|
|
6953
6943
|
children: /* @__PURE__ */ f("ellipse", { cx: "12", cy: "12", rx: "9", ry: "6" })
|
|
6954
6944
|
}
|
|
6955
|
-
),
|
|
6945
|
+
), jn = "sc:size-10", Il = [
|
|
6956
6946
|
{ id: "rectangle", label: "Rectangle", icon: "lucide:square" },
|
|
6957
6947
|
{ id: "circle", label: "Circle", icon: "lucide:circle" },
|
|
6958
|
-
{ id: "ellipse", label: "Ellipse", reactIcon: /* @__PURE__ */ f(
|
|
6948
|
+
{ id: "ellipse", label: "Ellipse", reactIcon: /* @__PURE__ */ f(Tl, { className: jn }) },
|
|
6959
6949
|
{ id: "triangle", label: "Triangle", icon: "lucide:triangle" },
|
|
6960
|
-
{ id: "polygon", label: "Polygon", reactIcon: /* @__PURE__ */ f(
|
|
6950
|
+
{ id: "polygon", label: "Polygon", reactIcon: /* @__PURE__ */ f(Ll, { className: jn }) },
|
|
6961
6951
|
{ id: "star", label: "Star", icon: "lucide:star" },
|
|
6962
6952
|
{ id: "line", label: "Line", icon: "lucide:minus" }
|
|
6963
|
-
],
|
|
6953
|
+
], Uo = ({
|
|
6964
6954
|
isOpen: e,
|
|
6965
6955
|
onClose: t,
|
|
6966
6956
|
onSelectType: n,
|
|
@@ -6970,7 +6960,7 @@ const Rl = ({
|
|
|
6970
6960
|
n(a), t();
|
|
6971
6961
|
};
|
|
6972
6962
|
return /* @__PURE__ */ j(
|
|
6973
|
-
|
|
6963
|
+
Dl,
|
|
6974
6964
|
{
|
|
6975
6965
|
isOpen: e,
|
|
6976
6966
|
onClose: t,
|
|
@@ -6999,7 +6989,7 @@ const Rl = ({
|
|
|
6999
6989
|
{
|
|
7000
6990
|
className: "sc:grid sc:grid-cols-3 sc:gap-2 sc:p-4",
|
|
7001
6991
|
"data-testid": "shape-type-list",
|
|
7002
|
-
children:
|
|
6992
|
+
children: Il.map((a) => {
|
|
7003
6993
|
const l = a.id === r;
|
|
7004
6994
|
return /* @__PURE__ */ j(
|
|
7005
6995
|
"button",
|
|
@@ -7014,7 +7004,7 @@ const Rl = ({
|
|
|
7014
7004
|
"span",
|
|
7015
7005
|
{
|
|
7016
7006
|
className: l ? "sc:text-primary" : "sc:text-foreground/85",
|
|
7017
|
-
children: a.reactIcon ? a.reactIcon : /* @__PURE__ */ f($, { icon: a.icon, className:
|
|
7007
|
+
children: a.reactIcon ? a.reactIcon : /* @__PURE__ */ f($, { icon: a.icon, className: jn })
|
|
7018
7008
|
}
|
|
7019
7009
|
),
|
|
7020
7010
|
/* @__PURE__ */ f(
|
|
@@ -7034,7 +7024,7 @@ const Rl = ({
|
|
|
7034
7024
|
]
|
|
7035
7025
|
}
|
|
7036
7026
|
);
|
|
7037
|
-
},
|
|
7027
|
+
}, bn = Qe("MenuButton"), Rl = ({
|
|
7038
7028
|
isLayersPanelOpen: e = !1,
|
|
7039
7029
|
onToggleLayersPanel: t,
|
|
7040
7030
|
onOpenImageBrowser: n,
|
|
@@ -7049,7 +7039,7 @@ const Rl = ({
|
|
|
7049
7039
|
const { ExportManager: v } = await import("./ExportManager-DEJgxB0S.js").then((T) => T._), { artboardManager: D, elements: w } = a(), A = D.getAllArtboards();
|
|
7050
7040
|
v.exportToJSON(A, w, D), c(!1);
|
|
7051
7041
|
} catch (v) {
|
|
7052
|
-
|
|
7042
|
+
bn.error("Failed to save workspace:", v), alert("Failed to save workspace. Please try again.");
|
|
7053
7043
|
}
|
|
7054
7044
|
}, g = () => {
|
|
7055
7045
|
var v;
|
|
@@ -7084,7 +7074,7 @@ This will replace your current workspace. Continue?`
|
|
|
7084
7074
|
} else
|
|
7085
7075
|
alert(`Failed to load: ${A.error || "Unknown error"}`);
|
|
7086
7076
|
} catch (A) {
|
|
7087
|
-
|
|
7077
|
+
bn.error("Failed to load workspace:", A), alert("Failed to load workspace. Please check the file and try again.");
|
|
7088
7078
|
}
|
|
7089
7079
|
k.current && (k.current.value = "");
|
|
7090
7080
|
}
|
|
@@ -7107,7 +7097,7 @@ This will replace your current workspace. Continue?`
|
|
|
7107
7097
|
transparentBackground: !1
|
|
7108
7098
|
}), c(!1);
|
|
7109
7099
|
} catch (T) {
|
|
7110
|
-
|
|
7100
|
+
bn.error("Failed to export artboard:", T), alert("Failed to export artboard. Please try again.");
|
|
7111
7101
|
}
|
|
7112
7102
|
}, M = async (v) => {
|
|
7113
7103
|
if (v === "image" && n) {
|
|
@@ -7121,10 +7111,10 @@ This will replace your current workspace. Continue?`
|
|
|
7121
7111
|
await a().handleAddElement(v), c(!1), d(!1);
|
|
7122
7112
|
}, L = async (v) => {
|
|
7123
7113
|
p(!1), await a().handleAddElement("shape", { shapeType: v });
|
|
7124
|
-
}, I =
|
|
7114
|
+
}, I = Vo, b = () => /* @__PURE__ */ f("div", { className: "sc:my-xs sc:h-px sc:bg-border-primary" });
|
|
7125
7115
|
return /* @__PURE__ */ j(an, { children: [
|
|
7126
7116
|
/* @__PURE__ */ f(
|
|
7127
|
-
|
|
7117
|
+
Bo,
|
|
7128
7118
|
{
|
|
7129
7119
|
trigger: /* @__PURE__ */ j(qn, { delayDuration: 0, children: [
|
|
7130
7120
|
/* @__PURE__ */ f(Xt, { asChild: !0, children: /* @__PURE__ */ f(
|
|
@@ -7143,7 +7133,7 @@ This will replace your current workspace. Continue?`
|
|
|
7143
7133
|
onToggle: c,
|
|
7144
7134
|
position: "bottom",
|
|
7145
7135
|
align: "end",
|
|
7146
|
-
children: /* @__PURE__ */ j(
|
|
7136
|
+
children: /* @__PURE__ */ j(Fn, { minWidth: "200px", children: [
|
|
7147
7137
|
/* @__PURE__ */ j(
|
|
7148
7138
|
"div",
|
|
7149
7139
|
{
|
|
@@ -7161,7 +7151,7 @@ This will replace your current workspace. Continue?`
|
|
|
7161
7151
|
top: 0,
|
|
7162
7152
|
zIndex: "var(--sc-z-sticky)"
|
|
7163
7153
|
},
|
|
7164
|
-
children: /* @__PURE__ */ f(
|
|
7154
|
+
children: /* @__PURE__ */ f(Fn, { minWidth: "180px", children: I.map((v) => /* @__PURE__ */ f(
|
|
7165
7155
|
Xe,
|
|
7166
7156
|
{
|
|
7167
7157
|
icon: v.icon,
|
|
@@ -7218,7 +7208,7 @@ This will replace your current workspace. Continue?`
|
|
|
7218
7208
|
}
|
|
7219
7209
|
),
|
|
7220
7210
|
/* @__PURE__ */ f(
|
|
7221
|
-
|
|
7211
|
+
Uo,
|
|
7222
7212
|
{
|
|
7223
7213
|
isOpen: h,
|
|
7224
7214
|
onClose: () => p(!1),
|
|
@@ -7227,7 +7217,7 @@ This will replace your current workspace. Continue?`
|
|
|
7227
7217
|
)
|
|
7228
7218
|
] });
|
|
7229
7219
|
};
|
|
7230
|
-
function
|
|
7220
|
+
function Go({
|
|
7231
7221
|
part: e,
|
|
7232
7222
|
isOpen: t,
|
|
7233
7223
|
onOpenChange: n
|
|
@@ -7236,7 +7226,7 @@ function Wo({
|
|
|
7236
7226
|
return q(() => {
|
|
7237
7227
|
if (!t || o) return;
|
|
7238
7228
|
let s = !1;
|
|
7239
|
-
return import("./ImagePanel-
|
|
7229
|
+
return import("./ImagePanel-BaEJnUvS.js").then(
|
|
7240
7230
|
(a) => {
|
|
7241
7231
|
s || i(() => a.ImagePanel);
|
|
7242
7232
|
},
|
|
@@ -7254,13 +7244,13 @@ function Wo({
|
|
|
7254
7244
|
};
|
|
7255
7245
|
}, [t, o, r]), o ? /* @__PURE__ */ f(o, { isOpen: t, onOpenChange: n }) : null;
|
|
7256
7246
|
}
|
|
7257
|
-
function
|
|
7247
|
+
function pc({ className: e, style: t }) {
|
|
7258
7248
|
ir("Editor.Menu"), rn("Editor.Menu");
|
|
7259
7249
|
const [n, r] = B(!1);
|
|
7260
7250
|
return /* @__PURE__ */ j("div", { "data-sc-part": "menu", className: e, style: t, children: [
|
|
7261
|
-
/* @__PURE__ */ f(
|
|
7251
|
+
/* @__PURE__ */ f(Rl, { onOpenImageBrowser: () => r(!0) }),
|
|
7262
7252
|
/* @__PURE__ */ f(
|
|
7263
|
-
|
|
7253
|
+
Go,
|
|
7264
7254
|
{
|
|
7265
7255
|
part: "Editor.Menu",
|
|
7266
7256
|
isOpen: n,
|
|
@@ -7269,11 +7259,11 @@ function bc({ className: e, style: t }) {
|
|
|
7269
7259
|
)
|
|
7270
7260
|
] });
|
|
7271
7261
|
}
|
|
7272
|
-
const
|
|
7273
|
-
const { undo: e, redo: t, canUndo: n, canRedo: r } =
|
|
7262
|
+
const Nl = () => {
|
|
7263
|
+
const { undo: e, redo: t, canUndo: n, canRedo: r } = ri();
|
|
7274
7264
|
return /* @__PURE__ */ j("div", { className: "sc-undo-redo", style: { display: "inline-flex", gap: 4 }, children: [
|
|
7275
7265
|
/* @__PURE__ */ f(
|
|
7276
|
-
|
|
7266
|
+
In,
|
|
7277
7267
|
{
|
|
7278
7268
|
icon: G.undo,
|
|
7279
7269
|
onClick: e,
|
|
@@ -7283,7 +7273,7 @@ const jl = () => {
|
|
|
7283
7273
|
}
|
|
7284
7274
|
),
|
|
7285
7275
|
/* @__PURE__ */ f(
|
|
7286
|
-
|
|
7276
|
+
In,
|
|
7287
7277
|
{
|
|
7288
7278
|
icon: G.redo,
|
|
7289
7279
|
onClick: t,
|
|
@@ -7294,10 +7284,10 @@ const jl = () => {
|
|
|
7294
7284
|
)
|
|
7295
7285
|
] });
|
|
7296
7286
|
};
|
|
7297
|
-
function
|
|
7298
|
-
return ir("Editor.History"), rn("Editor.History"), /* @__PURE__ */ f("div", { "data-sc-part": "history", className: e, style: t, children: /* @__PURE__ */ f(
|
|
7287
|
+
function mc({ className: e, style: t }) {
|
|
7288
|
+
return ir("Editor.History"), rn("Editor.History"), /* @__PURE__ */ f("div", { "data-sc-part": "history", className: e, style: t, children: /* @__PURE__ */ f(Nl, {}) });
|
|
7299
7289
|
}
|
|
7300
|
-
function
|
|
7290
|
+
function vc({ className: e, style: t }) {
|
|
7301
7291
|
ir("Editor.Add"), rn("Editor.Add");
|
|
7302
7292
|
const { get: n } = Hr(), [r, o] = B(!1), [i, s] = B(!1), [a, l] = B(!1), c = async (d) => {
|
|
7303
7293
|
if (o(!1), d === "shape") {
|
|
@@ -7314,7 +7304,7 @@ function xc({ className: e, style: t }) {
|
|
|
7314
7304
|
};
|
|
7315
7305
|
return /* @__PURE__ */ j("div", { "data-sc-part": "add", className: e, style: t, children: [
|
|
7316
7306
|
/* @__PURE__ */ f(
|
|
7317
|
-
|
|
7307
|
+
Bo,
|
|
7318
7308
|
{
|
|
7319
7309
|
trigger: /* @__PURE__ */ j(qn, { delayDuration: 0, children: [
|
|
7320
7310
|
/* @__PURE__ */ f(Xt, { asChild: !0, children: /* @__PURE__ */ f(st, { variant: "ghost", size: "icon", "aria-label": "Add element", children: /* @__PURE__ */ f($, { icon: G.plus, className: "sc:size-6" }) }) }),
|
|
@@ -7324,7 +7314,7 @@ function xc({ className: e, style: t }) {
|
|
|
7324
7314
|
onToggle: o,
|
|
7325
7315
|
position: "bottom",
|
|
7326
7316
|
align: "start",
|
|
7327
|
-
children: /* @__PURE__ */ f(
|
|
7317
|
+
children: /* @__PURE__ */ f(Fn, { minWidth: "180px", children: Vo.map((d) => /* @__PURE__ */ f(
|
|
7328
7318
|
Xe,
|
|
7329
7319
|
{
|
|
7330
7320
|
icon: d.icon,
|
|
@@ -7336,7 +7326,7 @@ function xc({ className: e, style: t }) {
|
|
|
7336
7326
|
}
|
|
7337
7327
|
),
|
|
7338
7328
|
/* @__PURE__ */ f(
|
|
7339
|
-
|
|
7329
|
+
Uo,
|
|
7340
7330
|
{
|
|
7341
7331
|
isOpen: i,
|
|
7342
7332
|
onClose: () => s(!1),
|
|
@@ -7344,7 +7334,7 @@ function xc({ className: e, style: t }) {
|
|
|
7344
7334
|
}
|
|
7345
7335
|
),
|
|
7346
7336
|
/* @__PURE__ */ f(
|
|
7347
|
-
|
|
7337
|
+
Go,
|
|
7348
7338
|
{
|
|
7349
7339
|
part: "Editor.Add",
|
|
7350
7340
|
isOpen: a,
|
|
@@ -7353,8 +7343,8 @@ function xc({ className: e, style: t }) {
|
|
|
7353
7343
|
)
|
|
7354
7344
|
] });
|
|
7355
7345
|
}
|
|
7356
|
-
const
|
|
7357
|
-
function
|
|
7346
|
+
const zl = Qe("useExport");
|
|
7347
|
+
function yc() {
|
|
7358
7348
|
const {
|
|
7359
7349
|
artboards: e,
|
|
7360
7350
|
artboardManager: t,
|
|
@@ -7482,7 +7472,7 @@ function kc() {
|
|
|
7482
7472
|
xe[ie] = de;
|
|
7483
7473
|
d((ie) => ({ ...ie, ...xe })), W && W(xe);
|
|
7484
7474
|
} catch (te) {
|
|
7485
|
-
|
|
7475
|
+
zl.error("[useExport] Continuous export error:", te);
|
|
7486
7476
|
}
|
|
7487
7477
|
};
|
|
7488
7478
|
(async () => {
|
|
@@ -7507,7 +7497,7 @@ function kc() {
|
|
|
7507
7497
|
workerStats: h
|
|
7508
7498
|
};
|
|
7509
7499
|
}
|
|
7510
|
-
async function
|
|
7500
|
+
async function _o(e, t) {
|
|
7511
7501
|
try {
|
|
7512
7502
|
const n = await e.json();
|
|
7513
7503
|
if (n && typeof n == "object") {
|
|
@@ -7519,7 +7509,7 @@ async function qo(e, t) {
|
|
|
7519
7509
|
}
|
|
7520
7510
|
return t;
|
|
7521
7511
|
}
|
|
7522
|
-
function
|
|
7512
|
+
function Ol(e) {
|
|
7523
7513
|
return {
|
|
7524
7514
|
async search({ query: t, page: n, perPage: r = 30 }) {
|
|
7525
7515
|
const o = new URLSearchParams({
|
|
@@ -7531,7 +7521,7 @@ function $l(e) {
|
|
|
7531
7521
|
credentials: "same-origin"
|
|
7532
7522
|
});
|
|
7533
7523
|
if (!s.ok)
|
|
7534
|
-
throw new Error(await
|
|
7524
|
+
throw new Error(await _o(s, `Image search failed (${s.status})`));
|
|
7535
7525
|
return await s.json();
|
|
7536
7526
|
},
|
|
7537
7527
|
trackSelect(t) {
|
|
@@ -7550,7 +7540,7 @@ function $l(e) {
|
|
|
7550
7540
|
}
|
|
7551
7541
|
};
|
|
7552
7542
|
}
|
|
7553
|
-
function
|
|
7543
|
+
function Fl(e) {
|
|
7554
7544
|
return {
|
|
7555
7545
|
async generate({ prompt: t, width: n, height: r, numberResults: o }) {
|
|
7556
7546
|
const i = await fetch(e, {
|
|
@@ -7560,13 +7550,13 @@ function Hl(e) {
|
|
|
7560
7550
|
body: JSON.stringify({ prompt: t, width: n, height: r, numberResults: o })
|
|
7561
7551
|
});
|
|
7562
7552
|
if (!i.ok)
|
|
7563
|
-
throw new Error(await
|
|
7553
|
+
throw new Error(await _o(i, `Image generation failed (${i.status})`));
|
|
7564
7554
|
const s = await i.json();
|
|
7565
7555
|
return { images: s.images ?? (s.imageUrl ? [{ imageUrl: s.imageUrl }] : []) };
|
|
7566
7556
|
}
|
|
7567
7557
|
};
|
|
7568
7558
|
}
|
|
7569
|
-
function
|
|
7559
|
+
function jl(e) {
|
|
7570
7560
|
const t = "/api/image-proxy?url=";
|
|
7571
7561
|
if (!e || !e.startsWith(t)) return e;
|
|
7572
7562
|
try {
|
|
@@ -7575,9 +7565,9 @@ function Bl(e) {
|
|
|
7575
7565
|
return e;
|
|
7576
7566
|
}
|
|
7577
7567
|
}
|
|
7578
|
-
function
|
|
7568
|
+
function Pl(e) {
|
|
7579
7569
|
return async function(n) {
|
|
7580
|
-
const r =
|
|
7570
|
+
const r = jl(n);
|
|
7581
7571
|
if (!/^https?:\/\//.test(r))
|
|
7582
7572
|
throw new Error("Background removal isn't available for this image yet");
|
|
7583
7573
|
const o = await fetch(e, {
|
|
@@ -7591,7 +7581,7 @@ function Vl(e) {
|
|
|
7591
7581
|
return i.imageUrl;
|
|
7592
7582
|
};
|
|
7593
7583
|
}
|
|
7594
|
-
function
|
|
7584
|
+
function $l(e) {
|
|
7595
7585
|
return async function(n) {
|
|
7596
7586
|
if (!/^https?:\/\//.test(n)) return n;
|
|
7597
7587
|
const r = await fetch(e, {
|
|
@@ -7605,16 +7595,16 @@ function Ul(e) {
|
|
|
7605
7595
|
return o.imageUrl;
|
|
7606
7596
|
};
|
|
7607
7597
|
}
|
|
7608
|
-
const
|
|
7609
|
-
function
|
|
7598
|
+
const Wo = {}, qo = Je(Wo);
|
|
7599
|
+
function bc({ services: e, children: t }) {
|
|
7610
7600
|
const n = X(() => e ? {
|
|
7611
|
-
imageSearch: e.imageSearch ?? (e.imageSearchUrl ?
|
|
7612
|
-
generate: e.generate ?? (e.generateUrl ?
|
|
7601
|
+
imageSearch: e.imageSearch ?? (e.imageSearchUrl ? Ol(e.imageSearchUrl) : void 0),
|
|
7602
|
+
generate: e.generate ?? (e.generateUrl ? Fl(e.generateUrl) : void 0),
|
|
7613
7603
|
vectors: e.vectors,
|
|
7614
|
-
removeBackground: e.removeBackground ?? (e.bgRemoveUrl ?
|
|
7615
|
-
ingestImage: e.ingestImage ?? (e.ingestImageUrl ?
|
|
7604
|
+
removeBackground: e.removeBackground ?? (e.bgRemoveUrl ? Pl(e.bgRemoveUrl) : void 0),
|
|
7605
|
+
ingestImage: e.ingestImage ?? (e.ingestImageUrl ? $l(e.ingestImageUrl) : void 0),
|
|
7616
7606
|
onFontUpload: e.onFontUpload
|
|
7617
|
-
} :
|
|
7607
|
+
} : Wo, [
|
|
7618
7608
|
e == null ? void 0 : e.imageSearch,
|
|
7619
7609
|
e == null ? void 0 : e.imageSearchUrl,
|
|
7620
7610
|
e == null ? void 0 : e.generate,
|
|
@@ -7626,14 +7616,14 @@ function Cc({ services: e, children: t }) {
|
|
|
7626
7616
|
e == null ? void 0 : e.ingestImage,
|
|
7627
7617
|
e == null ? void 0 : e.onFontUpload
|
|
7628
7618
|
]);
|
|
7629
|
-
return /* @__PURE__ */ f(
|
|
7619
|
+
return /* @__PURE__ */ f(qo.Provider, { value: n, children: t });
|
|
7630
7620
|
}
|
|
7631
|
-
function
|
|
7632
|
-
return Be(
|
|
7621
|
+
function wc() {
|
|
7622
|
+
return Be(qo);
|
|
7633
7623
|
}
|
|
7634
7624
|
const Nr = Qe("GoogleFontsService");
|
|
7635
7625
|
let tt = [], pt = null;
|
|
7636
|
-
async function
|
|
7626
|
+
async function Hl() {
|
|
7637
7627
|
return tt.length > 0 ? tt : pt || (pt = fetch("/google-fonts.json").then((e) => {
|
|
7638
7628
|
if (!e.ok)
|
|
7639
7629
|
throw new Error(`HTTP error! status: ${e.status}`);
|
|
@@ -7646,10 +7636,10 @@ async function Gl() {
|
|
|
7646
7636
|
popularity: t.popularity
|
|
7647
7637
|
})) : Nr.error("Unexpected API response structure:", e), tt)).catch((e) => (Nr.error("Error fetching Google Fonts:", e), pt = null, [])), pt);
|
|
7648
7638
|
}
|
|
7649
|
-
function
|
|
7639
|
+
function wn() {
|
|
7650
7640
|
return tt;
|
|
7651
7641
|
}
|
|
7652
|
-
function
|
|
7642
|
+
function Bl() {
|
|
7653
7643
|
return tt.length > 0;
|
|
7654
7644
|
}
|
|
7655
7645
|
function zr(e) {
|
|
@@ -7662,7 +7652,7 @@ function zr(e) {
|
|
|
7662
7652
|
}[e.toLowerCase()] || "display";
|
|
7663
7653
|
}
|
|
7664
7654
|
const Or = Qe("UnifiedFontService");
|
|
7665
|
-
class
|
|
7655
|
+
class Vl {
|
|
7666
7656
|
constructor() {
|
|
7667
7657
|
this.searchCache = /* @__PURE__ */ new Map(), this.previewFontLinks = /* @__PURE__ */ new Set();
|
|
7668
7658
|
}
|
|
@@ -7674,7 +7664,7 @@ class Wl {
|
|
|
7674
7664
|
*/
|
|
7675
7665
|
async initialize() {
|
|
7676
7666
|
try {
|
|
7677
|
-
await
|
|
7667
|
+
await Hl();
|
|
7678
7668
|
} catch (t) {
|
|
7679
7669
|
Or.error("Failed to initialize UnifiedFontService:", t);
|
|
7680
7670
|
}
|
|
@@ -7683,7 +7673,7 @@ class Wl {
|
|
|
7683
7673
|
* Check if fonts are loaded
|
|
7684
7674
|
*/
|
|
7685
7675
|
isFontsLoaded() {
|
|
7686
|
-
return
|
|
7676
|
+
return Bl();
|
|
7687
7677
|
}
|
|
7688
7678
|
// ========================================
|
|
7689
7679
|
// Font Retrieval
|
|
@@ -7693,7 +7683,7 @@ class Wl {
|
|
|
7693
7683
|
* Returns system fonts + Google Fonts (deduplicated)
|
|
7694
7684
|
*/
|
|
7695
7685
|
getAllFonts() {
|
|
7696
|
-
const t = ln.filter((r) => !r.googleFont), n = this.mapGoogleFonts(
|
|
7686
|
+
const t = ln.filter((r) => !r.googleFont), n = this.mapGoogleFonts(wn());
|
|
7697
7687
|
return this.mergeFonts([...t, ...n]);
|
|
7698
7688
|
}
|
|
7699
7689
|
/**
|
|
@@ -7714,7 +7704,7 @@ class Wl {
|
|
|
7714
7704
|
const n = `search:${t.toLowerCase()}`;
|
|
7715
7705
|
if (this.searchCache.has(n))
|
|
7716
7706
|
return this.searchCache.get(n);
|
|
7717
|
-
const r = t.toLowerCase().trim(), o =
|
|
7707
|
+
const r = t.toLowerCase().trim(), o = wn().filter((s) => s.family.toLowerCase().includes(r)).map((s) => this.mapGoogleFont(s)), i = this.mergeFonts(o);
|
|
7718
7708
|
return this.searchCache.set(n, i), i;
|
|
7719
7709
|
}
|
|
7720
7710
|
/**
|
|
@@ -7726,7 +7716,7 @@ class Wl {
|
|
|
7726
7716
|
const n = `category:${t}`;
|
|
7727
7717
|
if (this.searchCache.has(n))
|
|
7728
7718
|
return this.searchCache.get(n);
|
|
7729
|
-
const r =
|
|
7719
|
+
const r = wn().filter((i) => zr(i.category) === t).map((i) => this.mapGoogleFont(i)), o = this.mergeFonts(r);
|
|
7730
7720
|
return this.searchCache.set(n, o), o;
|
|
7731
7721
|
}
|
|
7732
7722
|
/**
|
|
@@ -7867,36 +7857,36 @@ class Wl {
|
|
|
7867
7857
|
};
|
|
7868
7858
|
}
|
|
7869
7859
|
}
|
|
7870
|
-
const
|
|
7871
|
-
function
|
|
7872
|
-
return e instanceof
|
|
7860
|
+
const xc = new Vl();
|
|
7861
|
+
function Yo(e) {
|
|
7862
|
+
return e instanceof ci;
|
|
7873
7863
|
}
|
|
7874
|
-
function
|
|
7875
|
-
return e instanceof
|
|
7864
|
+
function Ul(e) {
|
|
7865
|
+
return e instanceof si;
|
|
7876
7866
|
}
|
|
7877
|
-
function
|
|
7878
|
-
return e instanceof
|
|
7867
|
+
function Gl(e) {
|
|
7868
|
+
return e instanceof li;
|
|
7879
7869
|
}
|
|
7880
|
-
function
|
|
7870
|
+
function _l(e) {
|
|
7881
7871
|
return e instanceof Ie;
|
|
7882
7872
|
}
|
|
7883
|
-
function
|
|
7884
|
-
return e instanceof
|
|
7873
|
+
function Wl(e) {
|
|
7874
|
+
return e instanceof ai;
|
|
7885
7875
|
}
|
|
7886
|
-
function
|
|
7887
|
-
return
|
|
7876
|
+
function ql(e) {
|
|
7877
|
+
return Yo(e) ? "text" : Ul(e) ? "image" : Gl(e) ? "shape" : _l(e) ? "group" : Wl(e) ? "path" : null;
|
|
7888
7878
|
}
|
|
7889
|
-
const mt = ["x", "y", "rotation", "opacity", "name", "visible", "locked"],
|
|
7890
|
-
text: [...mt, ...
|
|
7891
|
-
shape: [...mt, ...
|
|
7892
|
-
image: [...mt, ...
|
|
7879
|
+
const mt = ["x", "y", "rotation", "opacity", "name", "visible", "locked"], Yl = ["text", "fontSize", "color", "fontFamily", "bold", "italic", "textAlign"], Kl = ["fillColor", "fill", "width", "height"], Xl = ["imageUrl", "width", "height", "adjustments"], Jl = {
|
|
7880
|
+
text: [...mt, ...Yl],
|
|
7881
|
+
shape: [...mt, ...Kl],
|
|
7882
|
+
image: [...mt, ...Xl],
|
|
7893
7883
|
group: [...mt],
|
|
7894
7884
|
path: [...mt]
|
|
7895
|
-
},
|
|
7885
|
+
}, xn = ["left", "center", "right"], jt = ["brightness", "contrast", "saturation"], kn = 3;
|
|
7896
7886
|
function He(e, t) {
|
|
7897
7887
|
return new rt("E_INVALID_PATCH", e, { ...t, docSlug: "embed-mode" });
|
|
7898
7888
|
}
|
|
7899
|
-
function
|
|
7889
|
+
function Cn(e, t, n) {
|
|
7900
7890
|
if (typeof t != "number" || !Number.isFinite(t))
|
|
7901
7891
|
throw He(
|
|
7902
7892
|
`patch key "${e}" must be a finite number, got ${JSON.stringify(t)} (element kind: ${n}).`,
|
|
@@ -7910,8 +7900,8 @@ function Fr(e, t, n, r) {
|
|
|
7910
7900
|
{ key: e, kind: r, value: t }
|
|
7911
7901
|
);
|
|
7912
7902
|
}
|
|
7913
|
-
function
|
|
7914
|
-
const n =
|
|
7903
|
+
function Ql(e, t) {
|
|
7904
|
+
const n = oi(t), r = n ? t.name : t;
|
|
7915
7905
|
if (!n) {
|
|
7916
7906
|
const a = e.get(r);
|
|
7917
7907
|
if (a) return a;
|
|
@@ -7925,11 +7915,11 @@ function nc(e, t) {
|
|
|
7925
7915
|
{ layerName: r, validNames: s, validIds: i.map((a) => a.id), docSlug: "embed-mode" }
|
|
7926
7916
|
);
|
|
7927
7917
|
}
|
|
7928
|
-
function
|
|
7929
|
-
const n =
|
|
7918
|
+
function Zl(e, t) {
|
|
7919
|
+
const n = ql(e);
|
|
7930
7920
|
if (!n)
|
|
7931
7921
|
throw He("target is not a patchable editor element.", { kind: null });
|
|
7932
|
-
const r =
|
|
7922
|
+
const r = Jl[n];
|
|
7933
7923
|
for (const [o, i] of Object.entries(t))
|
|
7934
7924
|
if (i !== void 0) {
|
|
7935
7925
|
if (!r.includes(o))
|
|
@@ -7941,10 +7931,10 @@ function rc(e, t) {
|
|
|
7941
7931
|
case "x":
|
|
7942
7932
|
case "y":
|
|
7943
7933
|
case "rotation":
|
|
7944
|
-
|
|
7934
|
+
Cn(o, i, n);
|
|
7945
7935
|
break;
|
|
7946
7936
|
case "opacity":
|
|
7947
|
-
if (
|
|
7937
|
+
if (Cn(o, i, n), i < 0 || i > 1)
|
|
7948
7938
|
throw He(`opacity must be between 0 and 1, got ${i} (element kind: ${n}).`, {
|
|
7949
7939
|
key: o,
|
|
7950
7940
|
kind: n,
|
|
@@ -7954,7 +7944,7 @@ function rc(e, t) {
|
|
|
7954
7944
|
case "fontSize":
|
|
7955
7945
|
case "width":
|
|
7956
7946
|
case "height":
|
|
7957
|
-
if (
|
|
7947
|
+
if (Cn(o, i, n), i <= 0)
|
|
7958
7948
|
throw He(`${o} must be > 0, got ${i} (element kind: ${n}).`, { key: o, kind: n, value: i });
|
|
7959
7949
|
break;
|
|
7960
7950
|
case "name":
|
|
@@ -7972,26 +7962,26 @@ function rc(e, t) {
|
|
|
7972
7962
|
Fr(o, i, "boolean", n);
|
|
7973
7963
|
break;
|
|
7974
7964
|
case "fill":
|
|
7975
|
-
|
|
7965
|
+
di(i);
|
|
7976
7966
|
break;
|
|
7977
7967
|
case "textAlign":
|
|
7978
|
-
if (typeof i != "string" || !
|
|
7968
|
+
if (typeof i != "string" || !xn.includes(i))
|
|
7979
7969
|
throw He(
|
|
7980
|
-
`textAlign must be one of ${JSON.stringify(
|
|
7981
|
-
{ key: o, kind: n, value: i, validKeys:
|
|
7970
|
+
`textAlign must be one of ${JSON.stringify(xn)}, got ${JSON.stringify(i)}.`,
|
|
7971
|
+
{ key: o, kind: n, value: i, validKeys: xn }
|
|
7982
7972
|
);
|
|
7983
7973
|
break;
|
|
7984
7974
|
case "adjustments": {
|
|
7985
7975
|
if (typeof i != "object" || i === null || Array.isArray(i))
|
|
7986
7976
|
throw He(
|
|
7987
|
-
`adjustments must be an object { brightness, contrast, saturation } (each 0..${
|
|
7977
|
+
`adjustments must be an object { brightness, contrast, saturation } (each 0..${kn}, 1 = neutral), got ${JSON.stringify(i)} (element kind: ${n}).`,
|
|
7988
7978
|
{ key: o, kind: n, value: i }
|
|
7989
7979
|
);
|
|
7990
7980
|
for (const a of jt) {
|
|
7991
7981
|
const l = i[a];
|
|
7992
|
-
if (typeof l != "number" || !Number.isFinite(l) || l < 0 || l >
|
|
7982
|
+
if (typeof l != "number" || !Number.isFinite(l) || l < 0 || l > kn)
|
|
7993
7983
|
throw He(
|
|
7994
|
-
`adjustments.${a} must be a finite number between 0 and ${
|
|
7984
|
+
`adjustments.${a} must be a finite number between 0 and ${kn} (1 = neutral), got ${JSON.stringify(l)} (element kind: ${n}).`,
|
|
7995
7985
|
{ key: `adjustments.${a}`, kind: n, value: l }
|
|
7996
7986
|
);
|
|
7997
7987
|
}
|
|
@@ -8007,17 +7997,17 @@ function rc(e, t) {
|
|
|
8007
7997
|
}
|
|
8008
7998
|
return n;
|
|
8009
7999
|
}
|
|
8010
|
-
function
|
|
8000
|
+
function ec(e, t) {
|
|
8011
8001
|
let n = !1;
|
|
8012
|
-
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),
|
|
8013
|
-
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 && (
|
|
8002
|
+
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), Yo(e))
|
|
8003
|
+
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 && (ui.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 };
|
|
8014
8004
|
const r = e;
|
|
8015
8005
|
if (t.width !== void 0 && (r.transformData.width = t.width), t.height !== void 0 && (r.transformData.height = t.height), t.fillColor !== void 0) {
|
|
8016
8006
|
const o = e.transformData;
|
|
8017
8007
|
o.fillColor = t.fillColor, delete o.fill;
|
|
8018
8008
|
}
|
|
8019
|
-
if (t.fill !== void 0 && (e.transformData.fill =
|
|
8020
|
-
const o = e, i =
|
|
8009
|
+
if (t.fill !== void 0 && (e.transformData.fill = fi(t.fill)), t.adjustments !== void 0) {
|
|
8010
|
+
const o = e, i = hi(t.adjustments);
|
|
8021
8011
|
i ? o.transformData.adjustments = i : delete o.transformData.adjustments;
|
|
8022
8012
|
}
|
|
8023
8013
|
if (t.imageUrl !== void 0) {
|
|
@@ -8027,7 +8017,7 @@ function oc(e, t) {
|
|
|
8027
8017
|
return { needsImageLoad: n };
|
|
8028
8018
|
}
|
|
8029
8019
|
const jr = Qe("useCommands");
|
|
8030
|
-
function
|
|
8020
|
+
function kc() {
|
|
8031
8021
|
const e = Yt(), {
|
|
8032
8022
|
undo: t,
|
|
8033
8023
|
redo: n,
|
|
@@ -8052,10 +8042,10 @@ function Ac() {
|
|
|
8052
8042
|
const M = V(null), L = N(
|
|
8053
8043
|
(E, v, D) => {
|
|
8054
8044
|
const w = m.current;
|
|
8055
|
-
let A =
|
|
8045
|
+
let A = Ql(w, E);
|
|
8056
8046
|
const T = y.getArtboardIdForElement(A.id) ?? y.getActiveArtboardId(), O = T ? g.peekArtboard(T) : null;
|
|
8057
|
-
O instanceof sr && O.elementId === A.id && O.newElement && (A = O.newElement),
|
|
8058
|
-
const W = A.clone(), { needsImageLoad: ae } =
|
|
8047
|
+
O instanceof sr && O.elementId === A.id && O.newElement && (A = O.newElement), Zl(A, v);
|
|
8048
|
+
const W = A.clone(), { needsImageLoad: ae } = ec(W, v);
|
|
8059
8049
|
if (ae) {
|
|
8060
8050
|
const J = W;
|
|
8061
8051
|
J.onLoadCallback = (Y) => {
|
|
@@ -8105,59 +8095,59 @@ function Ac() {
|
|
|
8105
8095
|
};
|
|
8106
8096
|
}
|
|
8107
8097
|
export {
|
|
8108
|
-
|
|
8098
|
+
uc as $,
|
|
8109
8099
|
ir as A,
|
|
8110
8100
|
st as B,
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
|
|
8101
|
+
bc as C,
|
|
8102
|
+
Dl as D,
|
|
8103
|
+
Ho as E,
|
|
8104
|
+
vc as F,
|
|
8105
|
+
pc as G,
|
|
8106
|
+
mc as H,
|
|
8117
8107
|
$ as I,
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8108
|
+
gc as J,
|
|
8109
|
+
ql as K,
|
|
8110
|
+
xl as L,
|
|
8111
|
+
Rl as M,
|
|
8112
|
+
_l as N,
|
|
8113
|
+
Ul as O,
|
|
8114
|
+
Wl as P,
|
|
8115
|
+
Gl as Q,
|
|
8116
|
+
Yo as R,
|
|
8117
|
+
Uo as S,
|
|
8128
8118
|
qn as T,
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8119
|
+
xc as U,
|
|
8120
|
+
uo as V,
|
|
8121
|
+
ks as W,
|
|
8122
|
+
In as X,
|
|
8123
|
+
go as Y,
|
|
8124
|
+
po as Z,
|
|
8125
|
+
mo as _,
|
|
8126
|
+
Re as a,
|
|
8127
|
+
wc as b,
|
|
8128
|
+
mi as c,
|
|
8129
|
+
Ns as d,
|
|
8130
|
+
$l as e,
|
|
8131
|
+
Pl as f,
|
|
8132
|
+
Fl as g,
|
|
8133
|
+
Ol as h,
|
|
8144
8134
|
G as i,
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
|
|
8149
|
-
|
|
8150
|
-
|
|
8151
|
-
|
|
8135
|
+
kc as j,
|
|
8136
|
+
yc as k,
|
|
8137
|
+
yi as l,
|
|
8138
|
+
Tn as m,
|
|
8139
|
+
fc as n,
|
|
8140
|
+
hc as o,
|
|
8141
|
+
Bo as p,
|
|
8152
8142
|
Xt as q,
|
|
8153
8143
|
At as r,
|
|
8154
|
-
|
|
8155
|
-
|
|
8156
|
-
|
|
8144
|
+
wi as s,
|
|
8145
|
+
Fn as t,
|
|
8146
|
+
vs as u,
|
|
8157
8147
|
Xe as v,
|
|
8158
|
-
|
|
8159
|
-
|
|
8148
|
+
fo as w,
|
|
8149
|
+
ys as x,
|
|
8160
8150
|
or as y,
|
|
8161
8151
|
rn as z
|
|
8162
8152
|
};
|
|
8163
|
-
//# sourceMappingURL=useCommands
|
|
8153
|
+
//# sourceMappingURL=useCommands-C6nE770t.js.map
|