@snowcone-app/canvas 0.46.3 → 0.46.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/{CanvasRenderer-B8BADU_r.js → CanvasRenderer-CmIQSVCK.js} +4 -4
  2. package/dist/{CanvasRenderer-B8BADU_r.js.map → CanvasRenderer-CmIQSVCK.js.map} +1 -1
  3. package/dist/{ContextualToolbars-5tHC6s0Y.js → ContextualToolbars-Dmo86Wd2.js} +323 -322
  4. package/dist/{ContextualToolbars-5tHC6s0Y.js.map → ContextualToolbars-Dmo86Wd2.js.map} +1 -1
  5. package/dist/{EditorCanvasImpl-CrP9FSoY.js → EditorCanvasImpl-BHa8q4iO.js} +16 -15
  6. package/dist/{EditorCanvasImpl-CrP9FSoY.js.map → EditorCanvasImpl-BHa8q4iO.js.map} +1 -1
  7. package/dist/{ExportManager-xRsXgyNo.js → ExportManager-DEJgxB0S.js} +79 -78
  8. package/dist/{ExportManager-xRsXgyNo.js.map → ExportManager-DEJgxB0S.js.map} +1 -1
  9. package/dist/{FontAnalyzer-Ds3Wdba7.js → FontAnalyzer-CLMJi2Sw.js} +374 -409
  10. package/dist/FontAnalyzer-CLMJi2Sw.js.map +1 -0
  11. package/dist/{ImagePanel-bW3yr6Ac.js → ImagePanel-4fHABjNT.js} +6 -6
  12. package/dist/{ImagePanel-bW3yr6Ac.js.map → ImagePanel-4fHABjNT.js.map} +1 -1
  13. package/dist/{SnowconeCanvas-crxPwbib.js → SnowconeCanvas-GPag5BXG.js} +10 -10
  14. package/dist/{SnowconeCanvas-crxPwbib.js.map → SnowconeCanvas-GPag5BXG.js.map} +1 -1
  15. package/dist/advanced.mjs +54 -54
  16. package/dist/core/image-adjustments.d.ts +2 -4
  17. package/dist/core/masked-crop.d.ts +3 -55
  18. package/dist/{custom-icons-DQRp8GhF.js → custom-icons-Dt0Y4VSn.js} +2 -2
  19. package/dist/{custom-icons-DQRp8GhF.js.map → custom-icons-Dt0Y4VSn.js.map} +1 -1
  20. package/dist/design-builder-HKRo18WT.js +1798 -0
  21. package/dist/design-builder-HKRo18WT.js.map +1 -0
  22. package/dist/{embed-D0f-YvCl.js → embed-DhjsJ3ni.js} +10 -10
  23. package/dist/{embed-D0f-YvCl.js.map → embed-DhjsJ3ni.js.map} +1 -1
  24. package/dist/embed.mjs +35 -36
  25. package/dist/embed.mjs.map +1 -1
  26. package/dist/{export-worker.bundle.string-BL30CYzH.js → export-worker.bundle.string-CyMb_XjB.js} +27 -25
  27. package/dist/{export-worker.bundle.string-BL30CYzH.js.map → export-worker.bundle.string-CyMb_XjB.js.map} +1 -1
  28. package/dist/{guards-DwYEoqcn.js → guards-Dk86a-kH.js} +2 -2
  29. package/dist/{guards-DwYEoqcn.js.map → guards-Dk86a-kH.js.map} +1 -1
  30. package/dist/index.mjs +43 -43
  31. package/dist/internals.mjs +150 -149
  32. package/dist/internals.mjs.map +1 -1
  33. package/dist/rendering/serialize-for-server.d.ts +4 -91
  34. package/dist/state/CanvasStateV1.d.ts +1 -363
  35. package/dist/{CanvasStateV1-BlDWgOzV.js → template-fields-CKEuUmTM.js} +1997 -1835
  36. package/dist/template-fields-CKEuUmTM.js.map +1 -0
  37. package/dist/testing.mjs +61 -60
  38. package/dist/testing.mjs.map +1 -1
  39. package/dist/{useCommands-F-b_SwW-.js → useCommands-BI7O5Lf0.js} +225 -225
  40. package/dist/{useCommands-F-b_SwW-.js.map → useCommands-BI7O5Lf0.js.map} +1 -1
  41. package/dist/{usePieceGuideBundle-BWdobHQE.js → usePieceGuideBundle-DJfjOVEd.js} +2 -2
  42. package/dist/{usePieceGuideBundle-BWdobHQE.js.map → usePieceGuideBundle-DJfjOVEd.js.map} +1 -1
  43. package/dist/utils/custom-fonts.d.ts +2 -16
  44. package/dist/{validation-hn5ZX8Po.js → validation-au_-Sj-A.js} +11 -11
  45. package/dist/{validation-hn5ZX8Po.js.map → validation-au_-Sj-A.js.map} +1 -1
  46. package/dist/workers/export-worker.bundle.string.d.ts +1 -1
  47. package/example/package.json +1 -1
  48. package/package.json +3 -2
  49. package/dist/CanvasStateV1-BlDWgOzV.js.map +0 -1
  50. package/dist/FontAnalyzer-Ds3Wdba7.js.map +0 -1
  51. package/dist/design-builder-sH53Og6j.js +0 -1870
  52. package/dist/design-builder-sH53Og6j.js.map +0 -1
  53. package/dist/template-fields-BaQG0CJY.js +0 -559
  54. package/dist/template-fields-BaQG0CJY.js.map +0 -1
@@ -1,18 +1,19 @@
1
1
  import { jsx as t, jsxs as p, Fragment as Ve } from "react/jsx-runtime";
2
2
  import * as re from "react";
3
3
  import Le, { useRef as W, useEffect as G, useCallback as S, useState as N, useLayoutEffect as Uo, useMemo as We, memo as Bo, useSyncExternalStore as Mr } from "react";
4
- import { createPortal as jo } from "react-dom";
5
- import { b as Zt, e as $o, c as Er, v as Ir } from "./design-builder-sH53Og6j.js";
6
- import { u as Ho, I as Q, c as De, V as Rr, i as de, m as wt, B as J, W as Lr, T as pe, q as me, r as he, X as j, w as Vt, a as Wo, U as tt, D as zr, C as Ar, j as Fr, S as Or } from "./useCommands-F-b_SwW-.js";
7
- import { R as xs, L as Ne, a as _r, I as Ur, T as ct } from "./custom-icons-DQRp8GhF.js";
8
- import { I as Xe, c as Pt, i as Vo, aZ as Yo, b2 as Xo, a_ as To, b3 as Br, Z as jr, b4 as $r, b5 as Hr, b6 as Wr, b7 as Vr, b8 as No, Y as So, X as Yr, G as Et, T as je, q as Xr, S as Xs, P as qo, t as qr, b9 as Ko, ba as Kr, b1 as Gr } from "./FontAnalyzer-Ds3Wdba7.js";
4
+ import { createPortal as $o } from "react-dom";
5
+ import { b as Pt, e as jo, c as Er, n as Ir } from "./design-builder-HKRo18WT.js";
6
+ import { u as Ho, I as Q, c as De, V as Rr, i as de, m as wt, B as J, W as Lr, T as pe, q as me, r as he, X as $, w as Vt, a as Wo, U as tt, D as zr, C as Ar, j as Fr, S as Or } from "./useCommands-BI7O5Lf0.js";
7
+ import { R as xs, L as Ne, a as _r, I as Ur, T as ct } from "./custom-icons-Dt0Y4VSn.js";
8
+ import { I as Xe, c as Zt, aU as Vo, aZ as Yo, aV as To, a_ as Br, Y as $r, a$ as jr, b0 as Hr, b1 as Wr, b2 as Vr, b3 as No, X as So, V as Yr, G as Et, T as $e, o as Xr, S as Xs, P as Xo, q as qr, b4 as Kr, aY as Gr } from "./FontAnalyzer-CLMJi2Sw.js";
9
+ import { isNeutralAdjustments as qo, NEUTRAL_ADJUSTMENTS as Ko } from "@snowcone-app/design/wire";
9
10
  import * as It from "@radix-ui/react-popover";
10
11
  import * as pt from "@radix-ui/react-slider";
11
- import { T as Do, S as Go, U as qs, V as Ks, X as Zo, Y as Gs, G as js, H as Zr, J as Pr, K as Jr, Z as Mo } from "./ExportManager-xRsXgyNo.js";
12
+ import { T as Do, S as Go, U as qs, V as Ks, X as Po, Y as Gs, G as $s, H as Pr, J as Zr, K as Jr, Z as Mo } from "./ExportManager-DEJgxB0S.js";
12
13
  import * as on from "@radix-ui/react-collapsible";
13
- import * as Zs from "@radix-ui/react-switch";
14
- import * as Ps from "@radix-ui/react-checkbox";
15
- import * as Po from "@radix-ui/react-separator";
14
+ import * as Ps from "@radix-ui/react-switch";
15
+ import * as Zs from "@radix-ui/react-checkbox";
16
+ import * as Zo from "@radix-ui/react-separator";
16
17
  import * as Se from "@radix-ui/react-select";
17
18
  import { i as Qr, c as ei, e as ti, m as si, a as ni } from "./adjust-CDVzlVBY.js";
18
19
  const oi = 25e5, ai = "E_ENGRAVE_PICTURE_LOAD", ci = { style: "photo", amount: 0, invert: !1 };
@@ -51,13 +52,13 @@ async function ri(e) {
51
52
  const i = a.getContext("2d", { willReadFrequently: !0 });
52
53
  return i ? (i.drawImage(s, 0, 0, o, c), Qr({ data: i.getImageData(0, 0, o, c).data }) ? "original" : "photo") : "photo";
53
54
  }
54
- const ii = Pt("EngraveSync");
55
+ const ii = Zt("EngraveSync");
55
56
  function ta(e, s, n, o) {
56
57
  const c = e.clone();
57
58
  return c.imageUrl = s, c.transformData = { ...c.transformData, engrave: { ...n } }, c.imageLoaded = !1, c.imageElement = null, c.onLoadCallback = (a) => o(a), c.loadImage(s), c;
58
59
  }
59
- function dd() {
60
- const { elements: e, artboards: s, artboardManager: n, setElements: o } = Zt(), c = W(/* @__PURE__ */ new Set()), a = W(/* @__PURE__ */ new Set());
60
+ function ud() {
61
+ const { elements: e, artboards: s, artboardManager: n, setElements: o } = Pt(), c = W(/* @__PURE__ */ new Set()), a = W(/* @__PURE__ */ new Set());
61
62
  return G(() => {
62
63
  for (const i of s) {
63
64
  const u = i.engrave;
@@ -96,7 +97,7 @@ const Kt = re.forwardRef(
96
97
  ({ className: e, checked: s, variant: n, ...o }, c) => {
97
98
  const a = Ho(), i = n ?? (a.variant === "default" ? "filled" : "default");
98
99
  return /* @__PURE__ */ t(
99
- Ps.Root,
100
+ Zs.Root,
100
101
  {
101
102
  ref: c,
102
103
  className: De(
@@ -113,7 +114,7 @@ const Kt = re.forwardRef(
113
114
  checked: s,
114
115
  ...o,
115
116
  children: /* @__PURE__ */ t(
116
- Ps.Indicator,
117
+ Zs.Indicator,
117
118
  {
118
119
  className: De(
119
120
  "sc:flex sc:items-center sc:justify-center sc:text-current",
@@ -127,7 +128,7 @@ const Kt = re.forwardRef(
127
128
  );
128
129
  }
129
130
  );
130
- Kt.displayName = Ps.Root.displayName;
131
+ Kt.displayName = Zs.Root.displayName;
131
132
  const sa = re.forwardRef(({ className: e, ...s }, n) => /* @__PURE__ */ t(
132
133
  on.Root,
133
134
  {
@@ -149,7 +150,7 @@ const li = on.Trigger, na = re.forwardRef(({ className: e, ...s }, n) => /* @__P
149
150
  }
150
151
  ));
151
152
  na.displayName = "CollapsibleContent";
152
- const oa = sa, aa = li, ca = na, di = It.Root, Pe = It.Trigger, ui = It.Anchor, qe = re.forwardRef(({ className: e, align: s = "center", sideOffset: n = 4, preserveSelection: o, maxZIndex: c, children: a, style: i, ...u }, g) => /* @__PURE__ */ t(It.Portal, { children: /* @__PURE__ */ t(Rr.Provider, { value: { variant: "default" }, children: /* @__PURE__ */ t(
153
+ const oa = sa, aa = li, ca = na, di = It.Root, Ze = It.Trigger, ui = It.Anchor, qe = re.forwardRef(({ className: e, align: s = "center", sideOffset: n = 4, preserveSelection: o, maxZIndex: c, children: a, style: i, ...u }, g) => /* @__PURE__ */ t(It.Portal, { children: /* @__PURE__ */ t(Rr.Provider, { value: { variant: "default" }, children: /* @__PURE__ */ t(
153
154
  It.Content,
154
155
  {
155
156
  ref: g,
@@ -172,7 +173,7 @@ const oa = sa, aa = li, ca = na, di = It.Root, Pe = It.Trigger, ui = It.Anchor,
172
173
  ) }) }));
173
174
  qe.displayName = It.Content.displayName;
174
175
  const fi = ({ children: e, open: s, onOpenChange: n, ...o }) => /* @__PURE__ */ t(di, { open: s, onOpenChange: n, ...o, children: e }), st = Object.assign(fi, {
175
- Trigger: Pe,
176
+ Trigger: Ze,
176
177
  Content: qe,
177
178
  Anchor: ui,
178
179
  // HeroUI uses Dialog for the content wrapper - map to Content
@@ -292,7 +293,7 @@ ua.displayName = Se.Item.displayName;
292
293
  const gi = re.forwardRef(({ className: e, ...s }, n) => /* @__PURE__ */ t(Se.Separator, { ref: n, className: De("sc:bg-divider sc:mx-2 sc:my-1 sc:h-px", e), ...s }));
293
294
  gi.displayName = Se.Separator.displayName;
294
295
  const Yt = re.forwardRef(({ className: e, orientation: s = "horizontal", decorative: n = !0, ...o }, c) => /* @__PURE__ */ t(
295
- Po.Root,
296
+ Zo.Root,
296
297
  {
297
298
  ref: c,
298
299
  decorative: n,
@@ -305,7 +306,7 @@ const Yt = re.forwardRef(({ className: e, orientation: s = "horizontal", decorat
305
306
  ...o
306
307
  }
307
308
  ));
308
- Yt.displayName = Po.Root.displayName;
309
+ Yt.displayName = Zo.Root.displayName;
309
310
  const fa = re.createContext(null), pa = re.forwardRef(
310
311
  ({ className: e, children: s, ...n }, o) => /* @__PURE__ */ t(
311
312
  pt.Track,
@@ -416,7 +417,7 @@ const ye = Object.assign(ba, {
416
417
  Output: ga
417
418
  }), mt = re.forwardRef(
418
419
  ({ className: e, ...s }, n) => /* @__PURE__ */ t(
419
- Zs.Root,
420
+ Ps.Root,
420
421
  {
421
422
  className: De(
422
423
  "sc:peer sc:inline-flex sc:h-7 sc:w-12 sc:md:h-5 sc:md:w-9 sc:shrink-0 sc:cursor-pointer sc:items-center sc:rounded-full sc:border-2 sc:border-transparent sc:shadow-sm sc:transition-colors",
@@ -428,7 +429,7 @@ const ye = Object.assign(ba, {
428
429
  ...s,
429
430
  ref: n,
430
431
  children: /* @__PURE__ */ t(
431
- Zs.Thumb,
432
+ Ps.Thumb,
432
433
  {
433
434
  className: De(
434
435
  "sc:pointer-events-none sc:block sc:h-6 sc:w-6 sc:md:h-4 sc:md:w-4 sc:rounded-full sc:bg-background sc:shadow-lg sc:ring-0 sc:transition-transform",
@@ -439,7 +440,7 @@ const ye = Object.assign(ba, {
439
440
  }
440
441
  )
441
442
  );
442
- mt.displayName = Zs.Root.displayName;
443
+ mt.displayName = Ps.Root.displayName;
443
444
  const Js = ({
444
445
  icon: e,
445
446
  label: s,
@@ -862,8 +863,8 @@ const Rt = Bo(({
862
863
  }, [e]);
863
864
  const L = (X) => {
864
865
  D.current = !0, C(X), y(X);
865
- const Z = Date.now(), Y = Z - M.current;
866
- Y >= 16 ? (T.current({ target: { value: X } }), M.current = Z, E.current && (clearTimeout(E.current), E.current = null)) : (E.current && clearTimeout(E.current), E.current = setTimeout(() => {
866
+ const P = Date.now(), Y = P - M.current;
867
+ Y >= 16 ? (T.current({ target: { value: X } }), M.current = P, E.current && (clearTimeout(E.current), E.current = null)) : (E.current && clearTimeout(E.current), E.current = setTimeout(() => {
867
868
  T.current({ target: { value: X } }), M.current = Date.now(), E.current = null, D.current = !1;
868
869
  }, 16 - Y));
869
870
  }, q = W(k);
@@ -880,9 +881,9 @@ const Rt = Bo(({
880
881
  E.current && clearTimeout(E.current);
881
882
  }, []);
882
883
  const U = (X) => {
883
- const Z = X.target.value;
884
- y(Z);
885
- const Y = /^#?([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})$/, ie = Z.startsWith("#") ? Z : `#${Z}`;
884
+ const P = X.target.value;
885
+ y(P);
886
+ const Y = /^#?([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})$/, ie = P.startsWith("#") ? P : `#${P}`;
886
887
  Y.test(ie) && T.current({ target: { value: ie } });
887
888
  }, B = (X) => {
888
889
  L(X);
@@ -934,7 +935,7 @@ const Rt = Bo(({
934
935
  ] }),
935
936
  n.length > 0 && /* @__PURE__ */ p("div", { className: "sc:flex sc:flex-col sc:gap-1.5", children: [
936
937
  /* @__PURE__ */ t("div", { className: "sc:text-sm sc:font-medium sc:text-foreground/60", children: "Document colors" }),
937
- /* @__PURE__ */ t("div", { className: "sc:grid sc:grid-cols-8 sc:gap-1", children: n.map((X, Z) => /* @__PURE__ */ t(
938
+ /* @__PURE__ */ t("div", { className: "sc:grid sc:grid-cols-8 sc:gap-1", children: n.map((X, P) => /* @__PURE__ */ t(
938
939
  "button",
939
940
  {
940
941
  className: `sc:h-6 sc:w-6 sc:cursor-pointer sc:rounded sc:border-2 sc:transition-all sc:duration-150 sc:hover:scale-110 ${X === e ? "sc:border-primary" : "sc:border-transparent"}`,
@@ -942,12 +943,12 @@ const Rt = Bo(({
942
943
  onClick: () => B(X),
943
944
  "aria-label": X
944
945
  },
945
- Z
946
+ P
946
947
  )) })
947
948
  ] }),
948
949
  o.length > 0 && /* @__PURE__ */ p("div", { className: "sc:flex sc:flex-col sc:gap-1.5", children: [
949
950
  /* @__PURE__ */ t("div", { className: "sc:text-sm sc:font-medium sc:text-foreground/60", children: "Image colors" }),
950
- /* @__PURE__ */ t("div", { className: "sc:grid sc:grid-cols-8 sc:gap-1", children: o.map((X, Z) => /* @__PURE__ */ t(
951
+ /* @__PURE__ */ t("div", { className: "sc:grid sc:grid-cols-8 sc:gap-1", children: o.map((X, P) => /* @__PURE__ */ t(
951
952
  "button",
952
953
  {
953
954
  className: `sc:h-6 sc:w-6 sc:cursor-pointer sc:rounded sc:border-2 sc:transition-all sc:duration-150 sc:hover:scale-110 ${X === e ? "sc:border-primary" : "sc:border-transparent"}`,
@@ -955,12 +956,12 @@ const Rt = Bo(({
955
956
  onClick: () => B(X),
956
957
  "aria-label": X
957
958
  },
958
- `img-${Z}`
959
+ `img-${P}`
959
960
  )) })
960
961
  ] })
961
962
  ] });
962
963
  return m ? ue : /* @__PURE__ */ p(st, { open: I, onOpenChange: z, children: [
963
- /* @__PURE__ */ t(Pe, { asChild: !0, children: /* @__PURE__ */ t(
964
+ /* @__PURE__ */ t(Ze, { asChild: !0, children: /* @__PURE__ */ t(
964
965
  "button",
965
966
  {
966
967
  className: a ? "sc:flex sc:items-center sc:justify-center sc:bg-transparent sc:border-0 sc:p-0 sc:cursor-pointer sc:rounded-md sc:hover:opacity-80 sc:transition-opacity" : "sc-toolbar-btn",
@@ -1000,7 +1001,7 @@ function zi({ onClick: e }) {
1000
1001
  /* @__PURE__ */ t(he, { children: "Back" })
1001
1002
  ] }) });
1002
1003
  }
1003
- const $t = 1e-3;
1004
+ const jt = 1e-3;
1004
1005
  function ks(e) {
1005
1006
  var c, a, i;
1006
1007
  if (!e)
@@ -1020,18 +1021,18 @@ function ks(e) {
1020
1021
  };
1021
1022
  const s = e.transformData, { letterSpacing: n, lineHeight: o } = e;
1022
1023
  return {
1023
- rotation: Math.abs(e.rotation ?? 0) > $t,
1024
- opacity: (e.opacity ?? 1) < 1 - $t,
1024
+ rotation: Math.abs(e.rotation ?? 0) > jt,
1025
+ opacity: (e.opacity ?? 1) < 1 - jt,
1025
1026
  stroke: ((c = e.stroke) == null ? void 0 : c.enabled) === !0,
1026
1027
  knockout: e.blendMode === "knockout" || e.blendMode === "clip",
1027
1028
  distress: ((a = e.distressEffect) == null ? void 0 : a.enabled) === !0,
1028
1029
  imageMask: !!e.masks && e.masks.length > 0,
1029
1030
  shadow: ((i = e.shadow) == null ? void 0 : i.enabled) === !0,
1030
- blendMode: Yo(e.blendMode),
1031
+ blendMode: Vo(e.blendMode),
1031
1032
  cornerRadius: ((s == null ? void 0 : s.borderRadius) ?? 0) > 0,
1032
- adjustments: !Vo(s == null ? void 0 : s.adjustments),
1033
- shapeTransparency: ((s == null ? void 0 : s.fillOpacity) ?? 1) < 1 - $t,
1034
- typography: Math.abs(n ?? 0) > $t || o !== void 0 && Math.abs(o - 1.2) > $t
1033
+ adjustments: !qo(s == null ? void 0 : s.adjustments),
1034
+ shapeTransparency: ((s == null ? void 0 : s.fillOpacity) ?? 1) < 1 - jt,
1035
+ typography: Math.abs(n ?? 0) > jt || o !== void 0 && Math.abs(o - 1.2) > jt
1035
1036
  };
1036
1037
  }
1037
1038
  const Ai = ({
@@ -1066,12 +1067,12 @@ const Ai = ({
1066
1067
  onBlendModeToggle: se,
1067
1068
  knockoutExpanded: ue = !1,
1068
1069
  onKnockoutToggle: X,
1069
- distressTextureExpanded: Z = !1,
1070
+ distressTextureExpanded: P = !1,
1070
1071
  onDistressTextureToggle: Y,
1071
1072
  imageMaskExpanded: ie = !1,
1072
1073
  onImageMaskToggle: O
1073
1074
  }) => {
1074
- const [ne, xe] = N(!1), [V, fe] = N(!1), [Me, Ce] = N(!1), [ze, Ee] = N(!1), [we, Ie] = N(!1), [_e, h] = N(!1), [w, R] = N(!1), [$, K] = N(!1), [Re, H] = N(!1), [le, Je] = N(!1), [Te, He] = N(!1), [ot, Qe] = N(!1), [it, ht] = N(!1), [Lt, at] = N(!1), l = e.isCropping, P = ks(e), gt = () => {
1075
+ const [ne, xe] = N(!1), [V, fe] = N(!1), [Me, Ce] = N(!1), [ze, Ee] = N(!1), [we, Ie] = N(!1), [_e, h] = N(!1), [w, R] = N(!1), [j, K] = N(!1), [Re, H] = N(!1), [le, Je] = N(!1), [Te, He] = N(!1), [ot, Qe] = N(!1), [it, ht] = N(!1), [Lt, at] = N(!1), l = e.isCropping, Z = ks(e), gt = () => {
1075
1076
  if (Ie(!0), l) {
1076
1077
  const ve = e.clone();
1077
1078
  ve.exitCropMode(), s(ve);
@@ -1080,7 +1081,7 @@ const Ai = ({
1080
1081
  ve.enterCropMode(), s(ve);
1081
1082
  }
1082
1083
  k == null || k();
1083
- }, $e = () => {
1084
+ }, je = () => {
1084
1085
  const ve = e.clone();
1085
1086
  ve.transformData.flipHorizontal = !ve.transformData.flipHorizontal, s(ve);
1086
1087
  }, et = () => {
@@ -1089,7 +1090,7 @@ const Ai = ({
1089
1090
  };
1090
1091
  return /* @__PURE__ */ p("div", { className: "sc-toolbar-items", children: [
1091
1092
  i && /* @__PURE__ */ t(
1092
- j,
1093
+ $,
1093
1094
  {
1094
1095
  icon: "lucide:image",
1095
1096
  onClick: () => {
@@ -1101,7 +1102,7 @@ const Ai = ({
1101
1102
  }
1102
1103
  ),
1103
1104
  u && /* @__PURE__ */ t(
1104
- j,
1105
+ $,
1105
1106
  {
1106
1107
  icon: g ? /* @__PURE__ */ t(Q, { icon: "eos-icons:loading", className: "sc:size-6 sc:md:size-5 sc:animate-spin" }) : "gravity-ui:magic-wand",
1107
1108
  onClick: () => {
@@ -1124,7 +1125,7 @@ const Ai = ({
1124
1125
  }
1125
1126
  ),
1126
1127
  /* @__PURE__ */ t(
1127
- j,
1128
+ $,
1128
1129
  {
1129
1130
  icon: "lucide:crop",
1130
1131
  onClick: gt,
@@ -1134,10 +1135,10 @@ const Ai = ({
1134
1135
  active: l || y
1135
1136
  }
1136
1137
  ),
1137
- /* @__PURE__ */ t(j, { icon: "lucide:flip-horizontal-2", onClick: $e, tooltip: "Flip Horizontal" }),
1138
- /* @__PURE__ */ t(j, { icon: "lucide:flip-vertical-2", onClick: et, tooltip: "Flip Vertical" }),
1138
+ /* @__PURE__ */ t($, { icon: "lucide:flip-horizontal-2", onClick: je, tooltip: "Flip Horizontal" }),
1139
+ /* @__PURE__ */ t($, { icon: "lucide:flip-vertical-2", onClick: et, tooltip: "Flip Vertical" }),
1139
1140
  D && /* @__PURE__ */ t(
1140
- j,
1141
+ $,
1141
1142
  {
1142
1143
  icon: "gravity-ui:sliders",
1143
1144
  onClick: D,
@@ -1149,7 +1150,7 @@ const Ai = ({
1149
1150
  }
1150
1151
  ),
1151
1152
  M && /* @__PURE__ */ t(
1152
- j,
1153
+ $,
1153
1154
  {
1154
1155
  icon: "gravity-ui:sliders",
1155
1156
  onClick: () => {
@@ -1158,13 +1159,13 @@ const Ai = ({
1158
1159
  onMouseLeave: () => h(!1),
1159
1160
  tooltip: "Adjust",
1160
1161
  tooltipDisabled: _e || C,
1161
- active: C || P.adjustments,
1162
+ active: C || Z.adjustments,
1162
1163
  "data-testid": "toolbar-adjust",
1163
1164
  "aria-label": "Adjust"
1164
1165
  }
1165
1166
  ),
1166
1167
  /* @__PURE__ */ t(
1167
- j,
1168
+ $,
1168
1169
  {
1169
1170
  icon: /* @__PURE__ */ t(xs, { size: 20, className: "sc:md:size-5" }),
1170
1171
  onClick: () => {
@@ -1173,11 +1174,11 @@ const Ai = ({
1173
1174
  onMouseLeave: () => R(!1),
1174
1175
  tooltip: "Rotate",
1175
1176
  tooltipDisabled: w || T,
1176
- active: T || P.rotation
1177
+ active: T || Z.rotation
1177
1178
  }
1178
1179
  ),
1179
1180
  /* @__PURE__ */ t(
1180
- j,
1181
+ $,
1181
1182
  {
1182
1183
  icon: "lucide:blend",
1183
1184
  onClick: () => {
@@ -1185,12 +1186,12 @@ const Ai = ({
1185
1186
  },
1186
1187
  onMouseLeave: () => K(!1),
1187
1188
  tooltip: "Transparency",
1188
- tooltipDisabled: $ || z,
1189
- active: z || P.opacity
1189
+ tooltipDisabled: j || z,
1190
+ active: z || Z.opacity
1190
1191
  }
1191
1192
  ),
1192
1193
  /* @__PURE__ */ t(
1193
- j,
1194
+ $,
1194
1195
  {
1195
1196
  icon: "lucide:square-round-corner",
1196
1197
  onClick: () => {
@@ -1199,11 +1200,11 @@ const Ai = ({
1199
1200
  onMouseLeave: () => Ee(!1),
1200
1201
  tooltip: "Corner Radius",
1201
1202
  tooltipDisabled: ze || b,
1202
- active: b || P.cornerRadius
1203
+ active: b || Z.cornerRadius
1203
1204
  }
1204
1205
  ),
1205
1206
  X && /* @__PURE__ */ t(
1206
- j,
1207
+ $,
1207
1208
  {
1208
1209
  icon: "lucide:scissors",
1209
1210
  onClick: () => {
@@ -1212,11 +1213,11 @@ const Ai = ({
1212
1213
  onMouseLeave: () => Qe(!1),
1213
1214
  tooltip: "Clip / Knockout",
1214
1215
  tooltipDisabled: ot || ue,
1215
- active: ue || P.knockout
1216
+ active: ue || Z.knockout
1216
1217
  }
1217
1218
  ),
1218
1219
  Y && /* @__PURE__ */ t(
1219
- j,
1220
+ $,
1220
1221
  {
1221
1222
  icon: "lucide:stamp",
1222
1223
  onClick: () => {
@@ -1224,12 +1225,12 @@ const Ai = ({
1224
1225
  },
1225
1226
  onMouseLeave: () => ht(!1),
1226
1227
  tooltip: "Distress Texture",
1227
- tooltipDisabled: it || Z,
1228
- active: Z || P.distress
1228
+ tooltipDisabled: it || P,
1229
+ active: P || Z.distress
1229
1230
  }
1230
1231
  ),
1231
1232
  O && /* @__PURE__ */ t(
1232
- j,
1233
+ $,
1233
1234
  {
1234
1235
  icon: "lucide:venetian-mask",
1235
1236
  onClick: () => {
@@ -1238,11 +1239,11 @@ const Ai = ({
1238
1239
  onMouseLeave: () => at(!1),
1239
1240
  tooltip: "Image Mask",
1240
1241
  tooltipDisabled: Lt || ie,
1241
- active: ie || P.imageMask
1242
+ active: ie || Z.imageMask
1242
1243
  }
1243
1244
  ),
1244
1245
  U && /* @__PURE__ */ t(
1245
- j,
1246
+ $,
1246
1247
  {
1247
1248
  icon: "lucide:pen-line",
1248
1249
  onClick: () => {
@@ -1251,11 +1252,11 @@ const Ai = ({
1251
1252
  onMouseLeave: () => H(!1),
1252
1253
  tooltip: "Stroke",
1253
1254
  tooltipDisabled: Re || q,
1254
- active: q || P.stroke
1255
+ active: q || Z.stroke
1255
1256
  }
1256
1257
  ),
1257
1258
  oe && /* @__PURE__ */ t(
1258
- j,
1259
+ $,
1259
1260
  {
1260
1261
  icon: "gravity-ui:square-dashed-circle",
1261
1262
  onClick: () => {
@@ -1264,11 +1265,11 @@ const Ai = ({
1264
1265
  onMouseLeave: () => Je(!1),
1265
1266
  tooltip: "Shadow",
1266
1267
  tooltipDisabled: le || B,
1267
- active: B || P.shadow
1268
+ active: B || Z.shadow
1268
1269
  }
1269
1270
  ),
1270
1271
  se && /* @__PURE__ */ t(
1271
- j,
1272
+ $,
1272
1273
  {
1273
1274
  icon: "gravity-ui:circles-intersection",
1274
1275
  onClick: () => {
@@ -1277,11 +1278,11 @@ const Ai = ({
1277
1278
  onMouseLeave: () => He(!1),
1278
1279
  tooltip: "Blend Mode",
1279
1280
  tooltipDisabled: Te || ee,
1280
- active: ee || P.blendMode
1281
+ active: ee || Z.blendMode
1281
1282
  }
1282
1283
  ),
1283
1284
  (c || a || v) && /* @__PURE__ */ p(st, { open: ne, onOpenChange: xe, children: [
1284
- /* @__PURE__ */ t(Pe, { asChild: !0, children: /* @__PURE__ */ t("button", { className: "sc-toolbar-btn", "aria-label": "More options", children: /* @__PURE__ */ t(Q, { icon: "lucide:ellipsis-vertical", className: "sc:size-6" }) }) }),
1285
+ /* @__PURE__ */ t(Ze, { asChild: !0, children: /* @__PURE__ */ t("button", { className: "sc-toolbar-btn", "aria-label": "More options", children: /* @__PURE__ */ t(Q, { icon: "lucide:ellipsis-vertical", className: "sc:size-6" }) }) }),
1285
1286
  /* @__PURE__ */ t(qe, { align: "end", className: "sc:w-auto sc:p-1", maxZIndex: !0, children: /* @__PURE__ */ p("div", { className: "sc:flex sc:items-center sc:gap-1", children: [
1286
1287
  c && /* @__PURE__ */ p(pe, { delayDuration: 300, children: [
1287
1288
  /* @__PURE__ */ t(me, { asChild: !0, children: /* @__PURE__ */ t(
@@ -1378,14 +1379,14 @@ const Ai = ({
1378
1379
  onShadowToggle: se,
1379
1380
  blendModeExpanded: ue = !1,
1380
1381
  onBlendModeToggle: X,
1381
- knockoutExpanded: Z = !1,
1382
+ knockoutExpanded: P = !1,
1382
1383
  onKnockoutToggle: Y,
1383
1384
  distressTextureExpanded: ie = !1,
1384
1385
  onDistressTextureToggle: O,
1385
1386
  imageMaskExpanded: ne = !1,
1386
1387
  onImageMaskToggle: xe
1387
1388
  }) => {
1388
- const [V, fe] = N(!1), [Me, Ce] = N(!1), [ze, Ee] = N(!1), [we, Ie] = N(!1), [_e, h] = N(!1), [w, R] = N(!1), [$, K] = N(!1), [Re, H] = N(!1), [le, Je] = N(!1), [Te, He] = N(!1), [ot, Qe] = N(!1), [it, ht] = N(!1), [Lt, at] = N(!1), [l, P] = N(!1), [gt, $e] = N(!1), et = We(() => sn.map((Nt) => Nt.color), []), ve = We(() => n && n.length > 0 ? n : et, [n, et]), Ke = ks(e), kt = (Nt) => {
1389
+ const [V, fe] = N(!1), [Me, Ce] = N(!1), [ze, Ee] = N(!1), [we, Ie] = N(!1), [_e, h] = N(!1), [w, R] = N(!1), [j, K] = N(!1), [Re, H] = N(!1), [le, Je] = N(!1), [Te, He] = N(!1), [ot, Qe] = N(!1), [it, ht] = N(!1), [Lt, at] = N(!1), [l, Z] = N(!1), [gt, je] = N(!1), et = We(() => sn.map((Nt) => Nt.color), []), ve = We(() => n && n.length > 0 ? n : et, [n, et]), Ke = ks(e), kt = (Nt) => {
1389
1390
  const dt = e.clone();
1390
1391
  dt.transformData.fillColor = Nt.target.value, delete dt.transformData.fill, s(dt);
1391
1392
  }, Tt = {
@@ -1399,7 +1400,7 @@ const Ai = ({
1399
1400
  }, lt = e.transformData.shapeType, Jt = Tt[lt] || "Shape";
1400
1401
  return /* @__PURE__ */ p("div", { className: "sc-toolbar-items", children: [
1401
1402
  g && /* @__PURE__ */ t(
1402
- j,
1403
+ $,
1403
1404
  {
1404
1405
  icon: de.shapes,
1405
1406
  onClick: () => {
@@ -1425,7 +1426,7 @@ const Ai = ({
1425
1426
  "div",
1426
1427
  {
1427
1428
  className: "sc:h-6 sc:w-6 sc:rounded-md sc:border sc:border-border-primary",
1428
- style: { background: Xo(e.transformData.fill, e.transformData.fillColor) }
1429
+ style: { background: Yo(e.transformData.fill, e.transformData.fillColor) }
1429
1430
  }
1430
1431
  )
1431
1432
  }
@@ -1445,7 +1446,7 @@ const Ai = ({
1445
1446
  /* @__PURE__ */ t(he, { children: "Fill Color" })
1446
1447
  ] }),
1447
1448
  e.transformData.shapeType === "rectangle" && y && /* @__PURE__ */ t(
1448
- j,
1449
+ $,
1449
1450
  {
1450
1451
  icon: "lucide:square-round-corner",
1451
1452
  onClick: () => {
@@ -1458,7 +1459,7 @@ const Ai = ({
1458
1459
  }
1459
1460
  ),
1460
1461
  e.transformData.shapeType === "polygon" && E && /* @__PURE__ */ t(
1461
- j,
1462
+ $,
1462
1463
  {
1463
1464
  icon: "healthicons:polygon",
1464
1465
  onClick: () => {
@@ -1471,7 +1472,7 @@ const Ai = ({
1471
1472
  }
1472
1473
  ),
1473
1474
  e.transformData.shapeType === "star" && T && /* @__PURE__ */ t(
1474
- j,
1475
+ $,
1475
1476
  {
1476
1477
  icon: "material-symbols:award-star-outline",
1477
1478
  onClick: () => {
@@ -1479,12 +1480,12 @@ const Ai = ({
1479
1480
  },
1480
1481
  onMouseLeave: () => K(!1),
1481
1482
  tooltip: "Points",
1482
- tooltipDisabled: $ || D,
1483
+ tooltipDisabled: j || D,
1483
1484
  active: D
1484
1485
  }
1485
1486
  ),
1486
1487
  e.transformData.shapeType === "star" && z && /* @__PURE__ */ t(
1487
- j,
1488
+ $,
1488
1489
  {
1489
1490
  icon: "lucide:circle-dashed",
1490
1491
  onClick: () => {
@@ -1497,7 +1498,7 @@ const Ai = ({
1497
1498
  }
1498
1499
  ),
1499
1500
  C && /* @__PURE__ */ t(
1500
- j,
1501
+ $,
1501
1502
  {
1502
1503
  icon: "lucide:blend",
1503
1504
  onClick: () => {
@@ -1510,7 +1511,7 @@ const Ai = ({
1510
1511
  }
1511
1512
  ),
1512
1513
  b && /* @__PURE__ */ t(
1513
- j,
1514
+ $,
1514
1515
  {
1515
1516
  icon: /* @__PURE__ */ t(xs, { size: 20, className: "sc:md:size-5" }),
1516
1517
  onClick: () => {
@@ -1523,7 +1524,7 @@ const Ai = ({
1523
1524
  }
1524
1525
  ),
1525
1526
  Y && /* @__PURE__ */ t(
1526
- j,
1527
+ $,
1527
1528
  {
1528
1529
  icon: "lucide:scissors",
1529
1530
  onClick: () => {
@@ -1531,38 +1532,38 @@ const Ai = ({
1531
1532
  },
1532
1533
  onMouseLeave: () => at(!1),
1533
1534
  tooltip: "Clip / Knockout",
1534
- tooltipDisabled: Lt || Z,
1535
- active: Z || Ke.knockout
1535
+ tooltipDisabled: Lt || P,
1536
+ active: P || Ke.knockout
1536
1537
  }
1537
1538
  ),
1538
1539
  O && /* @__PURE__ */ t(
1539
- j,
1540
+ $,
1540
1541
  {
1541
1542
  icon: "lucide:stamp",
1542
1543
  onClick: () => {
1543
- P(!0), O();
1544
+ Z(!0), O();
1544
1545
  },
1545
- onMouseLeave: () => P(!1),
1546
+ onMouseLeave: () => Z(!1),
1546
1547
  tooltip: "Distress Texture",
1547
1548
  tooltipDisabled: l || ie,
1548
1549
  active: ie || Ke.distress
1549
1550
  }
1550
1551
  ),
1551
1552
  xe && /* @__PURE__ */ t(
1552
- j,
1553
+ $,
1553
1554
  {
1554
1555
  icon: "lucide:venetian-mask",
1555
1556
  onClick: () => {
1556
- $e(!0), xe();
1557
+ je(!0), xe();
1557
1558
  },
1558
- onMouseLeave: () => $e(!1),
1559
+ onMouseLeave: () => je(!1),
1559
1560
  tooltip: "Image Mask",
1560
1561
  tooltipDisabled: gt || ne,
1561
1562
  active: ne || Ke.imageMask
1562
1563
  }
1563
1564
  ),
1564
1565
  oe && /* @__PURE__ */ t(
1565
- j,
1566
+ $,
1566
1567
  {
1567
1568
  icon: "lucide:pen-line",
1568
1569
  onClick: () => {
@@ -1575,7 +1576,7 @@ const Ai = ({
1575
1576
  }
1576
1577
  ),
1577
1578
  se && /* @__PURE__ */ t(
1578
- j,
1579
+ $,
1579
1580
  {
1580
1581
  icon: "gravity-ui:square-dashed-circle",
1581
1582
  onClick: () => {
@@ -1588,7 +1589,7 @@ const Ai = ({
1588
1589
  }
1589
1590
  ),
1590
1591
  X && /* @__PURE__ */ t(
1591
- j,
1592
+ $,
1592
1593
  {
1593
1594
  icon: "gravity-ui:circles-intersection",
1594
1595
  onClick: () => {
@@ -1601,7 +1602,7 @@ const Ai = ({
1601
1602
  }
1602
1603
  ),
1603
1604
  (i || u || m) && /* @__PURE__ */ p(st, { open: V, onOpenChange: fe, children: [
1604
- /* @__PURE__ */ t(Pe, { asChild: !0, children: /* @__PURE__ */ t("button", { className: "sc-toolbar-btn", "aria-label": "More options", children: /* @__PURE__ */ t(Q, { icon: "lucide:ellipsis-vertical", className: "sc:size-6" }) }) }),
1605
+ /* @__PURE__ */ t(Ze, { asChild: !0, children: /* @__PURE__ */ t("button", { className: "sc-toolbar-btn", "aria-label": "More options", children: /* @__PURE__ */ t(Q, { icon: "lucide:ellipsis-vertical", className: "sc:size-6" }) }) }),
1605
1606
  /* @__PURE__ */ t(qe, { align: "end", className: "sc:w-auto sc:p-1", maxZIndex: !0, children: /* @__PURE__ */ p("div", { className: "sc:flex sc:items-center sc:gap-1", children: [
1606
1607
  i && /* @__PURE__ */ p(pe, { delayDuration: 300, children: [
1607
1608
  /* @__PURE__ */ t(me, { asChild: !0, children: /* @__PURE__ */ t(
@@ -1695,7 +1696,7 @@ const Ai = ({
1695
1696
  /* @__PURE__ */ t(he, { children: E ? "Disable Stroke" : "Enable Stroke" })
1696
1697
  ] }),
1697
1698
  E && /* @__PURE__ */ p(st, { open: c, onOpenChange: a, children: [
1698
- /* @__PURE__ */ t(Pe, { asChild: !0, children: /* @__PURE__ */ t(
1699
+ /* @__PURE__ */ t(Ze, { asChild: !0, children: /* @__PURE__ */ t(
1699
1700
  "button",
1700
1701
  {
1701
1702
  className: "sc:w-8 sc:h-8 sc:p-xs sc:rounded-md sc:border-2 sc:border-border-primary sc:cursor-pointer sc:transition-transform sc:hover:scale-105",
@@ -1726,7 +1727,7 @@ const Ai = ({
1726
1727
  ] }) })
1727
1728
  ] }),
1728
1729
  E && /* @__PURE__ */ p(st, { open: g, onOpenChange: m, children: [
1729
- /* @__PURE__ */ t(Pe, { asChild: !0, children: /* @__PURE__ */ p(J, { variant: "ghost", className: "sc:px-xl sc:text-base", children: [
1730
+ /* @__PURE__ */ t(Ze, { asChild: !0, children: /* @__PURE__ */ p(J, { variant: "ghost", className: "sc:px-xl sc:text-base", children: [
1730
1731
  T,
1731
1732
  "px"
1732
1733
  ] }) }),
@@ -1762,7 +1763,7 @@ const Ai = ({
1762
1763
  /* @__PURE__ */ t(he, { children: D ? "Disable Fill" : "Enable Fill" })
1763
1764
  ] }),
1764
1765
  D && /* @__PURE__ */ p(st, { open: i, onOpenChange: u, children: [
1765
- /* @__PURE__ */ t(Pe, { asChild: !0, children: /* @__PURE__ */ t(
1766
+ /* @__PURE__ */ t(Ze, { asChild: !0, children: /* @__PURE__ */ t(
1766
1767
  "button",
1767
1768
  {
1768
1769
  className: "sc:w-8 sc:h-8 sc:p-xs sc:rounded-md sc:border-2 sc:border-border-primary sc:cursor-pointer sc:transition-transform sc:hover:scale-105",
@@ -1839,7 +1840,7 @@ const Ai = ({
1839
1840
  }
1840
1841
  }, E = s === "transparent";
1841
1842
  return /* @__PURE__ */ p(st, { open: i, onOpenChange: u, children: [
1842
- /* @__PURE__ */ t(Pe, { asChild: !0, children: /* @__PURE__ */ t(J, { variant: i ? "default" : "ghost", "aria-label": "Background", children: /* @__PURE__ */ t(Q, { icon: de.palette, className: "sc:size-[18px]" }) }) }),
1843
+ /* @__PURE__ */ t(Ze, { asChild: !0, children: /* @__PURE__ */ t(J, { variant: i ? "default" : "ghost", "aria-label": "Background", children: /* @__PURE__ */ t(Q, { icon: de.palette, className: "sc:size-[18px]" }) }) }),
1843
1844
  /* @__PURE__ */ t(qe, { className: "sc:w-auto sc:p-3", children: /* @__PURE__ */ p("div", { className: "sc:flex sc:min-w-[220px] sc:flex-col sc:gap-3", children: [
1844
1845
  /* @__PURE__ */ p("div", { className: "sc:flex sc:gap-1 sc:border-b sc:border-divider sc:pb-3", children: [
1845
1846
  /* @__PURE__ */ t(
@@ -1990,7 +1991,7 @@ const Ta = ({ distressTexture: e, onChange: s }) => {
1990
1991
  ] })
1991
1992
  ] });
1992
1993
  }, Na = ({ imageMask: e, onChange: s }) => {
1993
- Zo();
1994
+ Po();
1994
1995
  const n = (e == null ? void 0 : e.enabled) || !1, o = (e == null ? void 0 : e.imageUrl) || "", c = (e == null ? void 0 : e.maskType) || "clip", a = (e == null ? void 0 : e.opacity) ?? 100, i = (e == null ? void 0 : e.inverted) ?? !1, u = Gs.map((y) => ({ id: y.imageUrl, name: y.name, thumbnailUrl: y.thumbnailUrl })), g = (y) => {
1995
1996
  if (y) {
1996
1997
  const k = o || Gs[0].imageUrl;
@@ -2178,7 +2179,7 @@ const Ta = ({ distressTexture: e, onChange: s }) => {
2178
2179
  ] }),
2179
2180
  /* @__PURE__ */ t(Yt, { orientation: "vertical", className: "sc:h-6" }),
2180
2181
  /* @__PURE__ */ p(st, { open: v, onOpenChange: b, children: [
2181
- /* @__PURE__ */ t(Pe, { asChild: !0, children: /* @__PURE__ */ t(J, { variant: v ? "default" : "ghost", "aria-label": "More options", children: /* @__PURE__ */ t(Q, { icon: de.menu, className: "sc:size-6" }) }) }),
2182
+ /* @__PURE__ */ t(Ze, { asChild: !0, children: /* @__PURE__ */ t(J, { variant: v ? "default" : "ghost", "aria-label": "More options", children: /* @__PURE__ */ t(Q, { icon: de.menu, className: "sc:size-6" }) }) }),
2182
2183
  /* @__PURE__ */ t(qe, { align: "end", children: /* @__PURE__ */ p("div", { className: "sc:flex sc:flex-col sc:gap-2 sc:min-w-[240px]", children: [
2183
2184
  /* @__PURE__ */ p("div", { className: "sc:flex sc:items-center sc:gap-3", children: [
2184
2185
  /* @__PURE__ */ t(
@@ -2217,7 +2218,7 @@ function Ui(e) {
2217
2218
  return !n || n < 983040 || n > 1048573;
2218
2219
  }).join("");
2219
2220
  }
2220
- const Ht = Pt("FontBrowserDrawer"), Bi = ({
2221
+ const Ht = Zt("FontBrowserDrawer"), Bi = ({
2221
2222
  value: e,
2222
2223
  onChange: s,
2223
2224
  fontFamilies: n,
@@ -2228,16 +2229,16 @@ const Ht = Pt("FontBrowserDrawer"), Bi = ({
2228
2229
  elements: u
2229
2230
  }) => {
2230
2231
  const g = W(null), [m, v] = N(""), [b, x] = N("all"), [y, k] = N(0), [C, M] = N("name"), [E, D] = N("medium"), [T, I] = N("masonry"), [z, L] = N(/* @__PURE__ */ new Set()), q = W([]), U = W(!1), { onFontUpload: B } = Wo(), oe = Mr(
2231
- js.subscribe,
2232
- js.list,
2233
- js.list
2234
- ), ee = W(null), [se, ue] = N(!1), [X, Z] = N(
2232
+ $s.subscribe,
2233
+ $s.list,
2234
+ $s.list
2235
+ ), ee = W(null), [se, ue] = N(!1), [X, P] = N(
2235
2236
  null
2236
2237
  ), Y = We(() => {
2237
2238
  const h = /* @__PURE__ */ new Set(), w = [];
2238
2239
  for (const R of oe) {
2239
- const $ = R.family.trim().toLowerCase();
2240
- h.has($) || (h.add($), w.push(R.family));
2240
+ const j = R.family.trim().toLowerCase();
2241
+ h.has(j) || (h.add(j), w.push(R.family));
2241
2242
  }
2242
2243
  return w;
2243
2244
  }, [oe]), ie = We(
@@ -2245,9 +2246,9 @@ const Ht = Pt("FontBrowserDrawer"), Bi = ({
2245
2246
  [Y]
2246
2247
  );
2247
2248
  G(() => {
2248
- !o || oe.length === 0 || Zr(oe, {
2249
+ !o || oe.length === 0 || Pr(oe, {
2249
2250
  onLoadError: (h) => {
2250
- Ht.error("Custom font failed to load:", h), Z({ code: h.code, message: h.message });
2251
+ Ht.error("Custom font failed to load:", h), P({ code: h.code, message: h.message });
2251
2252
  }
2252
2253
  });
2253
2254
  }, [o, oe]);
@@ -2255,19 +2256,19 @@ const Ht = Pt("FontBrowserDrawer"), Bi = ({
2255
2256
  var R;
2256
2257
  const w = (R = h.target.files) == null ? void 0 : R[0];
2257
2258
  if (h.target.value = "", !(!w || !B)) {
2258
- ue(!0), Z(null);
2259
+ ue(!0), P(null);
2259
2260
  try {
2260
- const $ = await B(w), K = {
2261
- family: $.family,
2262
- url: $.url,
2263
- ...$.weight !== void 0 && { weight: $.weight },
2264
- ...$.style !== void 0 && { style: $.style }
2261
+ const j = await B(w), K = {
2262
+ family: j.family,
2263
+ url: j.url,
2264
+ ...j.weight !== void 0 && { weight: j.weight },
2265
+ ...j.style !== void 0 && { style: j.style }
2265
2266
  };
2266
- await Pr(K), Jr([K]), s({ target: { value: K.family } }), setTimeout(() => c(!1), 0);
2267
- } catch ($) {
2268
- Ht.error("Font upload failed:", $), Z({
2269
- code: jr($) ? $.code : void 0,
2270
- message: $ instanceof Error ? $.message : String($)
2267
+ await Zr(K), Jr([K]), s({ target: { value: K.family } }), setTimeout(() => c(!1), 0);
2268
+ } catch (j) {
2269
+ Ht.error("Font upload failed:", j), P({
2270
+ code: $r(j) ? j.code : void 0,
2271
+ message: j instanceof Error ? j.message : String(j)
2271
2272
  });
2272
2273
  } finally {
2273
2274
  ue(!1);
@@ -2320,16 +2321,16 @@ const Ht = Pt("FontBrowserDrawer"), Bi = ({
2320
2321
  q.current = [];
2321
2322
  const R = tt.getAllFonts();
2322
2323
  await Promise.all(
2323
- w.map(async ($) => {
2324
- const K = R.find((Re) => Re.name === $);
2325
- K && !z.has($) && await fe(K);
2324
+ w.map(async (j) => {
2325
+ const K = R.find((Re) => Re.name === j);
2326
+ K && !z.has(j) && await fe(K);
2326
2327
  })
2327
2328
  ), U.current = !1;
2328
2329
  })();
2329
2330
  }, [z]);
2330
2331
  const Me = (h) => {
2331
2332
  const w = z.has(h), R = q.current.includes(h);
2332
- !w && !R && (q.current.push(h), !U.current && q.current.length === 1 && L(($) => new Set($)));
2333
+ !w && !R && (q.current.push(h), !U.current && q.current.length === 1 && L((j) => new Set(j)));
2333
2334
  };
2334
2335
  G(() => {
2335
2336
  o && setTimeout(() => {
@@ -2344,7 +2345,7 @@ const Ht = Pt("FontBrowserDrawer"), Bi = ({
2344
2345
  m.trim() && x("all");
2345
2346
  }, [m]);
2346
2347
  const Ce = async (h) => {
2347
- const R = tt.getAllFonts().find(($) => $.name === h);
2348
+ const R = tt.getAllFonts().find((j) => j.name === h);
2348
2349
  if (R)
2349
2350
  try {
2350
2351
  await fe(R, !0);
@@ -2354,7 +2355,7 @@ const Ht = Pt("FontBrowserDrawer"), Bi = ({
2354
2355
  s({ target: { value: h } }), setTimeout(() => c(!1), 0);
2355
2356
  }, ze = Le.memo(
2356
2357
  ({ font: h, isUsedInDocument: w = !1 }) => {
2357
- const R = W(null), $ = e === h.name, K = z.has(h.name);
2358
+ const R = W(null), j = e === h.name, K = z.has(h.name);
2358
2359
  G(() => {
2359
2360
  if (!R.current) return;
2360
2361
  const Te = new IntersectionObserver(
@@ -2374,9 +2375,9 @@ const Ht = Pt("FontBrowserDrawer"), Bi = ({
2374
2375
  Vt,
2375
2376
  {
2376
2377
  ref: (Te) => {
2377
- $ && g && (g.current = Te), R.current = Te;
2378
+ j && g && (g.current = Te), R.current = Te;
2378
2379
  },
2379
- className: `sc:relative sc:flex sc:cursor-pointer sc:flex-col sc:justify-center sc:rounded-lg sc:border-2 sc:text-left ${T === "masonry" ? "sc:w-fit" : "sc:min-w-0"} ${$ ? "sc:border-accent" : "sc:hover:border-muted sc:border-transparent"}`,
2380
+ className: `sc:relative sc:flex sc:cursor-pointer sc:flex-col sc:justify-center sc:rounded-lg sc:border-2 sc:text-left ${T === "masonry" ? "sc:w-fit" : "sc:min-w-0"} ${j ? "sc:border-accent" : "sc:hover:border-muted sc:border-transparent"}`,
2380
2381
  onClick: le ? void 0 : () => Ce(h.name),
2381
2382
  role: le ? void 0 : "button",
2382
2383
  "aria-label": le ? void 0 : `Select ${h.name} font`,
@@ -2437,9 +2438,9 @@ const Ht = Pt("FontBrowserDrawer"), Bi = ({
2437
2438
  Vt,
2438
2439
  {
2439
2440
  ref: (Te) => {
2440
- $ && g && (g.current = Te), R.current = Te;
2441
+ j && g && (g.current = Te), R.current = Te;
2441
2442
  },
2442
- className: `sc:relative sc:flex sc:cursor-pointer sc:flex-col sc:justify-center sc:rounded-lg sc:border-2 sc:text-left ${T === "masonry" ? "sc:w-fit" : "sc:min-w-0"} ${$ ? "sc:border-accent" : "sc:hover:border-muted sc:border-transparent"}`,
2443
+ className: `sc:relative sc:flex sc:cursor-pointer sc:flex-col sc:justify-center sc:rounded-lg sc:border-2 sc:text-left ${T === "masonry" ? "sc:w-fit" : "sc:min-w-0"} ${j ? "sc:border-accent" : "sc:hover:border-muted sc:border-transparent"}`,
2443
2444
  style: {
2444
2445
  minHeight: `${H ? 48 * V : 36 * V}px`,
2445
2446
  padding: `${6 * V}px ${10 * V}px`,
@@ -2490,12 +2491,12 @@ const Ht = Pt("FontBrowserDrawer"), Bi = ({
2490
2491
  ), Ee = We(() => {
2491
2492
  if (!u) return /* @__PURE__ */ new Set();
2492
2493
  const h = /* @__PURE__ */ new Set(), w = (R) => {
2493
- const $ = R.fontFamily, K = R.text;
2494
- $ && K && Ui(K).trim().length > 0 && h.add($);
2494
+ const j = R.fontFamily, K = R.text;
2495
+ j && K && Ui(K).trim().length > 0 && h.add(j);
2495
2496
  };
2496
2497
  return u.forEach((R) => {
2497
- w(R), R.children && Array.isArray(R.children) && R.children.forEach(($) => {
2498
- w($);
2498
+ w(R), R.children && Array.isArray(R.children) && R.children.forEach((j) => {
2499
+ w(j);
2499
2500
  });
2500
2501
  }), h;
2501
2502
  }, [u]), we = We(() => {
@@ -2508,13 +2509,13 @@ const Ht = Pt("FontBrowserDrawer"), Bi = ({
2508
2509
  } else
2509
2510
  R.push(H);
2510
2511
  });
2511
- let $ = h.filter((H) => !Ee.has(H.name));
2512
- if (b !== "all" && ($ = $.filter((H) => H.category === b)), m) {
2512
+ let j = h.filter((H) => !Ee.has(H.name));
2513
+ if (b !== "all" && (j = j.filter((H) => H.category === b)), m) {
2513
2514
  const H = m.toLowerCase();
2514
- $ = $.filter((le) => le.name.toLowerCase().includes(H));
2515
+ j = j.filter((le) => le.name.toLowerCase().includes(H));
2515
2516
  }
2516
2517
  const K = [], Re = [];
2517
- return $.forEach((H) => {
2518
+ return j.forEach((H) => {
2518
2519
  w.has(H.name) ? K.push(H) : Re.push(H);
2519
2520
  }), R.sort((H, le) => H.name.localeCompare(le.name)), K.sort((H, le) => H.name.localeCompare(le.name)), Re.sort((H, le) => H.name.localeCompare(le.name)), { usedFonts: R, recommendedFonts: K, otherFonts: Re };
2520
2521
  }, [m, b, y, Ee, ie]), Ie = (h, w = !1) => T === "masonry" ? /* @__PURE__ */ t("div", { className: "sc:flex sc:flex-wrap sc:content-start sc:items-start sc:gap-2 sc:px-4 sc:pb-4", children: h.map((R) => /* @__PURE__ */ t(ze, { font: R, isUsedInDocument: w }, R.name)) }) : /* @__PURE__ */ t(
@@ -2755,7 +2756,7 @@ const Ht = Pt("FontBrowserDrawer"), Bi = ({
2755
2756
  }
2756
2757
  )
2757
2758
  ] });
2758
- }, ji = Pt("TransformControlPanel"), $i = ({ element: e, controls: s, onUpdate: n }) => {
2759
+ }, $i = Zt("TransformControlPanel"), ji = ({ element: e, controls: s, onUpdate: n }) => {
2759
2760
  const [o, c] = N({});
2760
2761
  return /* @__PURE__ */ t("div", { className: "sc:w-full sc:space-y-4", children: s.map((a) => {
2761
2762
  const i = e.transformData[a.key] ?? a.defaultInternalValue ?? a.defaultValue;
@@ -2776,7 +2777,7 @@ const Ht = Pt("FontBrowserDrawer"), Bi = ({
2776
2777
  ] }, a.key);
2777
2778
  const u = typeof i == "number" && !isNaN(i) ? i : a.defaultInternalValue ?? 0, g = o[a.key] !== void 0 ? o[a.key] : u, m = a.toSlider ? a.toSlider(g) : g, v = (b) => {
2778
2779
  const x = a.fromSlider ? a.fromSlider(b) : b;
2779
- return typeof x != "number" || isNaN(x) ? (ji.warn("Invalid internalValue:", x, "for control:", a.key), "0") : a.toDisplay ? a.toDisplay(x) : "isPercentage" in a && a.isPercentage ? `${(x * 100).toFixed(0)}%` : x.toFixed(1);
2780
+ return typeof x != "number" || isNaN(x) ? ($i.warn("Invalid internalValue:", x, "for control:", a.key), "0") : a.toDisplay ? a.toDisplay(x) : "isPercentage" in a && a.isPercentage ? `${(x * 100).toFixed(0)}%` : x.toFixed(1);
2780
2781
  };
2781
2782
  return /* @__PURE__ */ p("div", { className: "sc:flex sc:flex-col sc:gap-sm", children: [
2782
2783
  /* @__PURE__ */ p("div", { className: "sc:flex sc:justify-between", children: [
@@ -2813,13 +2814,13 @@ const Ht = Pt("FontBrowserDrawer"), Bi = ({
2813
2814
  isOpen: o,
2814
2815
  onOpenChange: c
2815
2816
  }) => {
2816
- const [a, i] = N(!1), u = o !== void 0 ? o : a, g = c || i, m = e.transformType, v = Hr(m), b = $r.filter(
2817
+ const [a, i] = N(!1), u = o !== void 0 ? o : a, g = c || i, m = e.transformType, v = Hr(m), b = jr.filter(
2817
2818
  (y) => y.Component && y.id !== "image" && y.id !== "group" && y.id !== "shape" && y.id !== "path"
2818
2819
  ), x = (y) => {
2819
2820
  y !== m && s(y);
2820
2821
  };
2821
2822
  return /* @__PURE__ */ p(st, { open: u, onOpenChange: g, children: [
2822
- /* @__PURE__ */ t(Pe, { asChild: !0, children: /* @__PURE__ */ t("button", { className: "sc-toolbar-btn", "aria-label": "Text Effects", children: /* @__PURE__ */ t(Q, { icon: de.wand, className: "sc:size-6" }) }) }),
2823
+ /* @__PURE__ */ t(Ze, { asChild: !0, children: /* @__PURE__ */ t("button", { className: "sc-toolbar-btn", "aria-label": "Text Effects", children: /* @__PURE__ */ t(Q, { icon: de.wand, className: "sc:size-6" }) }) }),
2823
2824
  /* @__PURE__ */ t(qe, { align: "start", className: "sc:w-[280px] sc:p-0", maxZIndex: !0, children: /* @__PURE__ */ p("div", { className: "sc:space-y-4 sc:p-6", children: [
2824
2825
  /* @__PURE__ */ p("div", { className: "sc:space-y-2", children: [
2825
2826
  /* @__PURE__ */ t(Ne, { children: "Text Effect" }),
@@ -2828,13 +2829,13 @@ const Ht = Pt("FontBrowserDrawer"), Bi = ({
2828
2829
  /* @__PURE__ */ t(da, { style: { zIndex: 2147483647 }, children: b.map((y) => /* @__PURE__ */ t(ua, { value: y.id, children: y.label }, y.id)) })
2829
2830
  ] })
2830
2831
  ] }),
2831
- v.length > 0 && /* @__PURE__ */ t($i, { element: e, controls: v, onUpdate: n })
2832
+ v.length > 0 && /* @__PURE__ */ t(ji, { element: e, controls: v, onUpdate: n })
2832
2833
  ] }) })
2833
2834
  ] });
2834
2835
  }, Wi = ({ items: e }) => {
2835
2836
  const [s, n] = N(!1);
2836
2837
  return /* @__PURE__ */ p(st, { open: s, onOpenChange: n, children: [
2837
- /* @__PURE__ */ t(Pe, { asChild: !0, children: /* @__PURE__ */ t("button", { className: "sc-toolbar-btn", "aria-label": "More options", children: /* @__PURE__ */ t(Q, { icon: de.moreHorizontal, className: "sc:size-6" }) }) }),
2838
+ /* @__PURE__ */ t(Ze, { asChild: !0, children: /* @__PURE__ */ t("button", { className: "sc-toolbar-btn", "aria-label": "More options", children: /* @__PURE__ */ t(Q, { icon: de.moreHorizontal, className: "sc:size-6" }) }) }),
2838
2839
  /* @__PURE__ */ t(qe, { align: "start", className: "sc:w-auto sc:p-1", maxZIndex: !0, children: /* @__PURE__ */ t("div", { className: "sc:flex sc:items-center sc:gap-1", children: e.map((o, c) => /* @__PURE__ */ p(pe, { delay: 300, children: [
2839
2840
  /* @__PURE__ */ t(me, { asChild: !0, children: /* @__PURE__ */ t(
2840
2841
  J,
@@ -2878,7 +2879,7 @@ function Vi({ colorPickerValue: e, isActive: s, onClick: n }) {
2878
2879
  }
2879
2880
  function Yi({ toolbar: e }) {
2880
2881
  return /* @__PURE__ */ t(
2881
- j,
2882
+ $,
2882
2883
  {
2883
2884
  icon: de.bold,
2884
2885
  onClick: e.handleBoldToggle,
@@ -2889,7 +2890,7 @@ function Yi({ toolbar: e }) {
2889
2890
  }
2890
2891
  function Xi({ toolbar: e }) {
2891
2892
  return /* @__PURE__ */ t(
2892
- j,
2893
+ $,
2893
2894
  {
2894
2895
  icon: de.italic,
2895
2896
  onClick: e.handleItalicToggle,
@@ -2900,7 +2901,7 @@ function Xi({ toolbar: e }) {
2900
2901
  }
2901
2902
  function qi({ toolbar: e }) {
2902
2903
  return /* @__PURE__ */ t(
2903
- j,
2904
+ $,
2904
2905
  {
2905
2906
  icon: de.underline,
2906
2907
  onClick: e.handleUnderlineToggle,
@@ -2911,7 +2912,7 @@ function qi({ toolbar: e }) {
2911
2912
  }
2912
2913
  function Ki({ toolbar: e }) {
2913
2914
  return /* @__PURE__ */ t(
2914
- j,
2915
+ $,
2915
2916
  {
2916
2917
  icon: "lucide:case-upper",
2917
2918
  onClick: e.handleLetterCaseToggle,
@@ -2923,7 +2924,7 @@ function Ki({ toolbar: e }) {
2923
2924
  function Gi({ toolbar: e }) {
2924
2925
  const { textAlign: s, handleTextAlignToggle: n } = e, o = s === "left" ? de.alignLeft : s === "center" ? de.alignCenter : de.alignRight;
2925
2926
  return /* @__PURE__ */ t(
2926
- j,
2927
+ $,
2927
2928
  {
2928
2929
  icon: o,
2929
2930
  onClick: n,
@@ -2931,12 +2932,12 @@ function Gi({ toolbar: e }) {
2931
2932
  }
2932
2933
  );
2933
2934
  }
2934
- function Zi({ onMoveForward: e, onMoveBackward: s, onDelete: n, onOpenChange: o }) {
2935
+ function Pi({ onMoveForward: e, onMoveBackward: s, onDelete: n, onOpenChange: o }) {
2935
2936
  const [c, a] = N(!1), i = (u) => {
2936
2937
  a(u), o == null || o(u);
2937
2938
  };
2938
2939
  return /* @__PURE__ */ p(st, { open: c, onOpenChange: i, children: [
2939
- /* @__PURE__ */ t(Pe, { asChild: !0, children: /* @__PURE__ */ t("button", { className: "sc-toolbar-btn", "aria-label": "More options", children: /* @__PURE__ */ t(Q, { icon: "lucide:ellipsis-vertical", className: "sc:size-6" }) }) }),
2940
+ /* @__PURE__ */ t(Ze, { asChild: !0, children: /* @__PURE__ */ t("button", { className: "sc-toolbar-btn", "aria-label": "More options", children: /* @__PURE__ */ t(Q, { icon: "lucide:ellipsis-vertical", className: "sc:size-6" }) }) }),
2940
2941
  /* @__PURE__ */ t(qe, { align: "end", className: "sc:w-auto sc:p-1", maxZIndex: !0, children: /* @__PURE__ */ p("div", { className: "sc:flex sc:items-center sc:gap-1", children: [
2941
2942
  /* @__PURE__ */ p(pe, { delayDuration: 300, children: [
2942
2943
  /* @__PURE__ */ t(me, { asChild: !0, children: /* @__PURE__ */ t(
@@ -2986,7 +2987,7 @@ function Zi({ onMoveForward: e, onMoveBackward: s, onDelete: n, onOpenChange: o
2986
2987
  ] }) })
2987
2988
  ] });
2988
2989
  }
2989
- function Pi({
2990
+ function Zi({
2990
2991
  toolbar: e,
2991
2992
  stableElementId: s,
2992
2993
  viewportWidth: n = window.innerWidth,
@@ -3018,7 +3019,7 @@ function Pi({
3018
3019
  elementForProperties: se,
3019
3020
  elements: ue,
3020
3021
  isTransformMenuOpen: X,
3021
- onTransformMenuOpenChange: Z,
3022
+ onTransformMenuOpenChange: P,
3022
3023
  elementUpdateHandler: Y,
3023
3024
  showUngroupButton: ie = !1,
3024
3025
  onUngroup: O,
@@ -3026,7 +3027,7 @@ function Pi({
3026
3027
  onFontBrowserToggle: xe,
3027
3028
  onTextMoreMenuOpenChange: V
3028
3029
  }) {
3029
- const [fe, Me] = N(!1), [Ce, ze] = N(!1), [Ee, we] = N(!1), [Ie, _e] = N(!1), h = ks(se), [w, R] = N(!1), [$, K] = N(!1), [Re, H] = N(!1), [le, Je] = N(!1), [Te, He] = N(!1), [ot, Qe] = N(!1);
3030
+ const [fe, Me] = N(!1), [Ce, ze] = N(!1), [Ee, we] = N(!1), [Ie, _e] = N(!1), h = ks(se), [w, R] = N(!1), [j, K] = N(!1), [Re, H] = N(!1), [le, Je] = N(!1), [Te, He] = N(!1), [ot, Qe] = N(!1);
3030
3031
  return /* @__PURE__ */ p("div", { className: "sc-toolbar-items", children: [
3031
3032
  /* @__PURE__ */ t(
3032
3033
  Bi,
@@ -3042,7 +3043,7 @@ function Pi({
3042
3043
  }
3043
3044
  ),
3044
3045
  /* @__PURE__ */ t(
3045
- j,
3046
+ $,
3046
3047
  {
3047
3048
  icon: "lucide:a-large-small",
3048
3049
  onClick: () => {
@@ -3074,11 +3075,11 @@ function Pi({
3074
3075
  onTransformTypeChange: e.handleTransformTypeChange,
3075
3076
  onElementUpdate: Y,
3076
3077
  isOpen: X,
3077
- onOpenChange: Z
3078
+ onOpenChange: P
3078
3079
  }
3079
3080
  ),
3080
3081
  y && /* @__PURE__ */ t(
3081
- j,
3082
+ $,
3082
3083
  {
3083
3084
  icon: "lucide:pen-line",
3084
3085
  onClick: () => {
@@ -3091,7 +3092,7 @@ function Pi({
3091
3092
  }
3092
3093
  ),
3093
3094
  /* @__PURE__ */ t(
3094
- j,
3095
+ $,
3095
3096
  {
3096
3097
  icon: /* @__PURE__ */ t(xs, { size: 20, className: "sc:md:size-5" }),
3097
3098
  onClick: () => {
@@ -3104,7 +3105,7 @@ function Pi({
3104
3105
  }
3105
3106
  ),
3106
3107
  /* @__PURE__ */ t(
3107
- j,
3108
+ $,
3108
3109
  {
3109
3110
  icon: "lucide:blend",
3110
3111
  onClick: () => {
@@ -3117,7 +3118,7 @@ function Pi({
3117
3118
  }
3118
3119
  ),
3119
3120
  C && /* @__PURE__ */ t(
3120
- j,
3121
+ $,
3121
3122
  {
3122
3123
  icon: "gravity-ui:square-dashed-circle",
3123
3124
  onClick: () => {
@@ -3125,12 +3126,12 @@ function Pi({
3125
3126
  },
3126
3127
  onMouseLeave: () => K(!1),
3127
3128
  tooltip: "Shadow",
3128
- tooltipDisabled: $ || k,
3129
+ tooltipDisabled: j || k,
3129
3130
  active: k || h.shadow
3130
3131
  }
3131
3132
  ),
3132
3133
  E && /* @__PURE__ */ t(
3133
- j,
3134
+ $,
3134
3135
  {
3135
3136
  icon: "gravity-ui:circles-intersection",
3136
3137
  onClick: () => {
@@ -3143,7 +3144,7 @@ function Pi({
3143
3144
  }
3144
3145
  ),
3145
3146
  T && /* @__PURE__ */ t(
3146
- j,
3147
+ $,
3147
3148
  {
3148
3149
  icon: "lucide:scissors",
3149
3150
  onClick: () => {
@@ -3156,7 +3157,7 @@ function Pi({
3156
3157
  }
3157
3158
  ),
3158
3159
  z && /* @__PURE__ */ t(
3159
- j,
3160
+ $,
3160
3161
  {
3161
3162
  icon: "lucide:stamp",
3162
3163
  onClick: () => {
@@ -3169,7 +3170,7 @@ function Pi({
3169
3170
  }
3170
3171
  ),
3171
3172
  q && /* @__PURE__ */ t(
3172
- j,
3173
+ $,
3173
3174
  {
3174
3175
  icon: "lucide:venetian-mask",
3175
3176
  onClick: () => {
@@ -3182,7 +3183,7 @@ function Pi({
3182
3183
  }
3183
3184
  ),
3184
3185
  /* @__PURE__ */ t(
3185
- j,
3186
+ $,
3186
3187
  {
3187
3188
  icon: "lucide:flag",
3188
3189
  onClick: () => {
@@ -3197,7 +3198,7 @@ function Pi({
3197
3198
  ),
3198
3199
  U && /* @__PURE__ */ t(Wi, { items: U() }),
3199
3200
  /* @__PURE__ */ t(
3200
- Zi,
3201
+ Pi,
3201
3202
  {
3202
3203
  onMoveForward: B,
3203
3204
  onMoveBackward: oe,
@@ -3279,12 +3280,12 @@ function el(e = {}) {
3279
3280
  selectedElement: n,
3280
3281
  activeChildElement: o,
3281
3282
  handleElementUpdate: c
3282
- } = Zt(), a = o || n, i = S(
3283
+ } = Pt(), a = o || n, i = S(
3283
3284
  (h) => {
3284
3285
  if (n)
3285
3286
  if (o) {
3286
3287
  if (!(n instanceof Et)) return;
3287
- const w = n.clone(), R = w.children.findIndex(($) => $.id === o.id);
3288
+ const w = n.clone(), R = w.children.findIndex((j) => j.id === o.id);
3288
3289
  R !== -1 && (w.children[R] = h, c(w));
3289
3290
  } else
3290
3291
  c(h);
@@ -3292,32 +3293,32 @@ function el(e = {}) {
3292
3293
  [n, o, c]
3293
3294
  ), u = a == null ? void 0 : a.id, g = W(void 0), [m, v] = N(32), [b, x] = N("#333333"), [y, k] = N("Arial"), [C, M] = N("center");
3294
3295
  G(() => {
3295
- u !== g.current && (g.current = u, a && a instanceof je && (a.transformType === "circle" && "getEffectiveFontSize" in a ? v(Math.round(a.getEffectiveFontSize())) : a.fontSize !== void 0 && v(Math.round(a.fontSize)), a.color !== void 0 && x(a.color), a.fontFamily !== void 0 && k(a.fontFamily), M(a.textAlign || "center")));
3296
+ u !== g.current && (g.current = u, a && a instanceof $e && (a.transformType === "circle" && "getEffectiveFontSize" in a ? v(Math.round(a.getEffectiveFontSize())) : a.fontSize !== void 0 && v(Math.round(a.fontSize)), a.color !== void 0 && x(a.color), a.fontFamily !== void 0 && k(a.fontFamily), M(a.textAlign || "center")));
3296
3297
  }, [u, a]);
3297
- const E = m, D = b, T = y, I = C, z = a instanceof je ? a : null, L = (z == null ? void 0 : z.letterSpacing) ?? 0, q = (z == null ? void 0 : z.lineHeight) ?? 1.2, U = (z == null ? void 0 : z.bold) ?? !1, B = (z == null ? void 0 : z.italic) ?? !1, oe = (z == null ? void 0 : z.underline) ?? !1, ee = (z == null ? void 0 : z.letterCase) ?? "none", se = S(
3298
+ const E = m, D = b, T = y, I = C, z = a instanceof $e ? a : null, L = (z == null ? void 0 : z.letterSpacing) ?? 0, q = (z == null ? void 0 : z.lineHeight) ?? 1.2, U = (z == null ? void 0 : z.bold) ?? !1, B = (z == null ? void 0 : z.italic) ?? !1, oe = (z == null ? void 0 : z.underline) ?? !1, ee = (z == null ? void 0 : z.letterCase) ?? "none", se = S(
3298
3299
  (h) => {
3299
- if (v(h), !a || !(a instanceof je)) return;
3300
+ if (v(h), !a || !(a instanceof $e)) return;
3300
3301
  const w = a.clone();
3301
3302
  w.transformType === "circle" && "setEffectiveFontSize" in w ? w.setEffectiveFontSize(h) : w.setFontSize(h), w.richText && w.richText.clearStyleProperty("fontSize"), i(w);
3302
3303
  },
3303
3304
  [a, i]
3304
3305
  ), ue = S(
3305
3306
  (h) => {
3306
- if (k(h), !a || !(a instanceof je)) return;
3307
+ if (k(h), !a || !(a instanceof $e)) return;
3307
3308
  const w = a.clone();
3308
3309
  w.fontFamily = h, w.richText && w.richText.clearStyleProperty("fontFamily"), i(w);
3309
3310
  },
3310
3311
  [a, i]
3311
3312
  ), X = S(
3312
3313
  (h) => {
3313
- if (x(h), !a || !(a instanceof je)) return;
3314
+ if (x(h), !a || !(a instanceof $e)) return;
3314
3315
  const w = a.clone();
3315
3316
  w.color = h, w.richText && w.richText.clearStyleProperty("color"), i(w);
3316
3317
  },
3317
3318
  [a, i]
3318
- ), Z = S(
3319
+ ), P = S(
3319
3320
  (h) => {
3320
- if (M(h), !a || !(a instanceof je)) return;
3321
+ if (M(h), !a || !(a instanceof $e)) return;
3321
3322
  const w = a.clone();
3322
3323
  w.textAlign = h, i(w);
3323
3324
  },
@@ -3341,14 +3342,14 @@ function el(e = {}) {
3341
3342
  s.current.applyTextFormatting({ letterSpacing: h });
3342
3343
  return;
3343
3344
  }
3344
- if (!a || !(a instanceof je)) return;
3345
+ if (!a || !(a instanceof $e)) return;
3345
3346
  const w = a.clone();
3346
3347
  w.letterSpacing = h, w.richText && w.richText.clearStyleProperty("letterSpacing"), i(w);
3347
3348
  },
3348
3349
  [a, i, s]
3349
3350
  ), ne = S(
3350
3351
  (h) => {
3351
- if (!a || !(a instanceof je)) return;
3352
+ if (!a || !(a instanceof $e)) return;
3352
3353
  const w = a.clone();
3353
3354
  w.lineHeight = h, i(w);
3354
3355
  },
@@ -3361,9 +3362,9 @@ function el(e = {}) {
3361
3362
  [ue, s]
3362
3363
  ), V = S(
3363
3364
  (h) => {
3364
- var $;
3365
+ var j;
3365
3366
  const w = h.target.value;
3366
- (($ = s == null ? void 0 : s.current) == null ? void 0 : $.isEditingText()) && (s != null && s.current) ? s.current.applyTextFormatting({ color: w }) : X(w);
3367
+ ((j = s == null ? void 0 : s.current) == null ? void 0 : j.isEditingText()) && (s != null && s.current) ? s.current.applyTextFormatting({ color: w }) : X(w);
3367
3368
  },
3368
3369
  [X, s]
3369
3370
  ), fe = S(() => {
@@ -3371,7 +3372,7 @@ function el(e = {}) {
3371
3372
  if ((h = s == null ? void 0 : s.current) != null && h.isEditingText())
3372
3373
  s.current.toggleFormattingProperty("bold");
3373
3374
  else {
3374
- if (!a || !(a instanceof je)) return;
3375
+ if (!a || !(a instanceof $e)) return;
3375
3376
  const w = a.clone();
3376
3377
  w.bold = !U, w.richText && w.richText.clearStyleProperty("bold"), i(w);
3377
3378
  }
@@ -3380,7 +3381,7 @@ function el(e = {}) {
3380
3381
  if ((h = s == null ? void 0 : s.current) != null && h.isEditingText())
3381
3382
  s.current.toggleFormattingProperty("italic");
3382
3383
  else {
3383
- if (!a || !(a instanceof je)) return;
3384
+ if (!a || !(a instanceof $e)) return;
3384
3385
  const w = a.clone();
3385
3386
  w.italic = !B, w.richText && w.richText.clearStyleProperty("italic"), i(w);
3386
3387
  }
@@ -3389,7 +3390,7 @@ function el(e = {}) {
3389
3390
  if ((h = s == null ? void 0 : s.current) != null && h.isEditingText())
3390
3391
  s.current.toggleFormattingProperty("underline");
3391
3392
  else {
3392
- if (!a || !(a instanceof je)) return;
3393
+ if (!a || !(a instanceof $e)) return;
3393
3394
  const w = a.clone();
3394
3395
  w.underline = !oe, w.richText && w.richText.clearStyleProperty("underline"), i(w);
3395
3396
  }
@@ -3399,11 +3400,11 @@ function el(e = {}) {
3399
3400
  w.letterCase = h, i(w);
3400
3401
  }, [ee, a, i]), Ee = S(() => ee === "uppercase", [ee]), we = S(() => {
3401
3402
  const h = ["left", "center", "right"], w = h.indexOf(I), R = h[(w + 1) % h.length];
3402
- Z(R);
3403
- }, [I, Z]), Ie = S(() => {
3404
- var h, w, R, $;
3403
+ P(R);
3404
+ }, [I, P]), Ie = S(() => {
3405
+ var h, w, R, j;
3405
3406
  if ((w = (h = s == null ? void 0 : s.current) == null ? void 0 : h.isEditingText) != null && w.call(h)) {
3406
- const K = ($ = (R = s.current).getSelectionStyle) == null ? void 0 : $.call(R);
3407
+ const K = (j = (R = s.current).getSelectionStyle) == null ? void 0 : j.call(R);
3407
3408
  if (K)
3408
3409
  return {
3409
3410
  fontFamily: K.fontFamily ?? T,
@@ -3459,7 +3460,7 @@ function el(e = {}) {
3459
3460
  handleTransformTypeChange: _e
3460
3461
  };
3461
3462
  }
3462
- const tl = Pt("useLayerPreview");
3463
+ const tl = Zt("useLayerPreview");
3463
3464
  function sl(e) {
3464
3465
  var v, b, x, y, k;
3465
3466
  const { element: s, size: n = 148, backgroundColor: o = "transparent", enabled: c = !0 } = e, [a, i] = N(null), [u, g] = N(!1), m = W(null);
@@ -3511,16 +3512,16 @@ function sl(e) {
3511
3512
  s.rotation,
3512
3513
  // Reference comparison is sufficient — elements are cloned before modification
3513
3514
  s.transformData,
3514
- s instanceof je ? s.text : null,
3515
- s instanceof je ? s.fontSize : null,
3516
- s instanceof je ? s.fontFamily : null,
3517
- s instanceof je ? s.color : null,
3515
+ s instanceof $e ? s.text : null,
3516
+ s instanceof $e ? s.fontSize : null,
3517
+ s instanceof $e ? s.fontFamily : null,
3518
+ s instanceof $e ? s.color : null,
3518
3519
  s instanceof Xe ? s.imageUrl : null,
3519
3520
  s instanceof Xe ? s.imageLoaded : null,
3520
3521
  s instanceof Xe ? s.isCropping : null,
3521
3522
  s instanceof Xs ? (v = s.transformData) == null ? void 0 : v.fillColor : null,
3522
3523
  s instanceof Xs ? (b = s.transformData) == null ? void 0 : b.fill : null,
3523
- s instanceof qo ? (y = (x = s.transformData) == null ? void 0 : x.points) == null ? void 0 : y.length : null,
3524
+ s instanceof Xo ? (y = (x = s.transformData) == null ? void 0 : x.points) == null ? void 0 : y.length : null,
3524
3525
  s instanceof Et ? (k = s.children) == null ? void 0 : k.length : null
3525
3526
  ]), { previewUrl: a, isLoading: u };
3526
3527
  }
@@ -3540,7 +3541,7 @@ function nl({
3540
3541
  }
3541
3542
  ),
3542
3543
  /* @__PURE__ */ t(
3543
- j,
3544
+ $,
3544
3545
  {
3545
3546
  icon: /* @__PURE__ */ t(al, { locked: o }),
3546
3547
  onClick: s,
@@ -3691,7 +3692,7 @@ function il(e, s) {
3691
3692
  return m;
3692
3693
  }
3693
3694
  function Da() {
3694
- const { elements: e, multiSelection: s, selectedElement: n, artboardManager: o, executeCommandBatch: c, setElements: a } = Zt(), i = We(() => (s.length > 0 ? e.filter((b) => s.includes(b.id)) : n ? [n] : []).filter((b) => !b.locked), [e, s, n]), u = S(
3695
+ const { elements: e, multiSelection: s, selectedElement: n, artboardManager: o, executeCommandBatch: c, setElements: a } = Pt(), i = We(() => (s.length > 0 ? e.filter((b) => s.includes(b.id)) : n ? [n] : []).filter((b) => !b.locked), [e, s, n]), u = S(
3695
3696
  (v) => {
3696
3697
  if (v.length === 0) return;
3697
3698
  const b = new Map(i.map((y) => [y.id, y])), x = v.flatMap((y) => {
@@ -3759,7 +3760,7 @@ const Ma = [
3759
3760
  artboardScreenBounds: s,
3760
3761
  partAttr: n
3761
3762
  }) => {
3762
- const { elements: o, multiSelection: c, artboardManager: a, canvasRef: i, canvasEditorRef: u } = Zt(), { panOffset: g } = $o(), { canAlign: m, canDistribute: v, align: b, distribute: x } = Da(), y = W(null), [k, C] = N(null), M = We(() => {
3763
+ const { elements: o, multiSelection: c, artboardManager: a, canvasRef: i, canvasEditorRef: u } = Pt(), { panOffset: g } = jo(), { canAlign: m, canDistribute: v, align: b, distribute: x } = Da(), y = W(null), [k, C] = N(null), M = We(() => {
3763
3764
  const T = o.filter((I) => c.includes(I.id)).map((I) => ({ id: I.id, x: I.x, y: I.y, bbox: I.getBoundingBox() }));
3764
3765
  return Sa(T);
3765
3766
  }, [o, c]);
@@ -3777,13 +3778,13 @@ const Ma = [
3777
3778
  const fe = oe.getBoundingClientRect();
3778
3779
  ee = fe.left + (M.x - q) * B, se = fe.top + (M.y - U) * B;
3779
3780
  } else s ? (ee = s.left + (M.x - q) * B, se = s.top + (M.y - U) * B) : (ee = window.innerWidth / 2 - M.width * B / 2, se = window.innerHeight / 2 - M.height * B / 2);
3780
- const ue = M.width * B, X = M.height * B, Z = 12;
3781
- let Y = se - z - Z, ie = ee + ue / 2;
3781
+ const ue = M.width * B, X = M.height * B, P = 12;
3782
+ let Y = se - z - P, ie = ee + ue / 2;
3782
3783
  if (I > 0) {
3783
3784
  const Me = I / 2 + 20, Ce = window.innerWidth - I / 2 - 20;
3784
3785
  ie = Math.max(Me, Math.min(Ce, ie));
3785
3786
  }
3786
- Y < 10 && (Y = se + X + Z), Y = Math.min(Y, window.innerHeight - z - 10), Y = Math.max(10, Y), C({ top: Y, left: ie });
3787
+ Y < 10 && (Y = se + X + P), Y = Math.min(Y, window.innerHeight - z - 10), Y = Math.max(10, Y), C({ top: Y, left: ie });
3787
3788
  };
3788
3789
  return T(), window.addEventListener("resize", T), window.addEventListener("scroll", T, { passive: !0, capture: !0 }), () => {
3789
3790
  window.removeEventListener("resize", T), window.removeEventListener("scroll", T, { capture: !0 });
@@ -3815,7 +3816,7 @@ const Ma = [
3815
3816
  style: E,
3816
3817
  children: /* @__PURE__ */ p("div", { className: "sc-toolbar-items", children: [
3817
3818
  Ma.map(({ mode: T, icon: I, label: z }) => /* @__PURE__ */ t(
3818
- j,
3819
+ $,
3819
3820
  {
3820
3821
  icon: I,
3821
3822
  onClick: () => b(T),
@@ -3825,7 +3826,7 @@ const Ma = [
3825
3826
  T
3826
3827
  )),
3827
3828
  v && ll.map(({ mode: T, icon: I, label: z }) => /* @__PURE__ */ t(
3828
- j,
3829
+ $,
3829
3830
  {
3830
3831
  icon: I,
3831
3832
  onClick: () => x(T),
@@ -3837,7 +3838,7 @@ const Ma = [
3837
3838
  ] })
3838
3839
  }
3839
3840
  );
3840
- return e === "floating" ? jo(D, document.body) : D;
3841
+ return e === "floating" ? $o(D, document.body) : D;
3841
3842
  }, ul = ({
3842
3843
  element: e,
3843
3844
  rotationExpanded: s = !1,
@@ -3858,10 +3859,10 @@ const Ma = [
3858
3859
  onImageMaskToggle: M,
3859
3860
  onUngroup: E
3860
3861
  }) => {
3861
- const [D, T] = N(!1), [I, z] = N(!1), [L, q] = N(!1), [U, B] = N(!1), [oe, ee] = N(!1), [se, ue] = N(!1), [X, Z] = N(!1), [Y, ie] = N(!1), O = ks(e ?? null);
3862
+ const [D, T] = N(!1), [I, z] = N(!1), [L, q] = N(!1), [U, B] = N(!1), [oe, ee] = N(!1), [se, ue] = N(!1), [X, P] = N(!1), [Y, ie] = N(!1), O = ks(e ?? null);
3862
3863
  return /* @__PURE__ */ p("div", { className: "sc-toolbar-items", children: [
3863
3864
  /* @__PURE__ */ t(
3864
- j,
3865
+ $,
3865
3866
  {
3866
3867
  icon: /* @__PURE__ */ t(xs, { size: 20, className: "sc:md:size-5" }),
3867
3868
  onClick: () => {
@@ -3874,7 +3875,7 @@ const Ma = [
3874
3875
  }
3875
3876
  ),
3876
3877
  /* @__PURE__ */ t(
3877
- j,
3878
+ $,
3878
3879
  {
3879
3880
  icon: "lucide:blend",
3880
3881
  onClick: () => {
@@ -3887,7 +3888,7 @@ const Ma = [
3887
3888
  }
3888
3889
  ),
3889
3890
  i && /* @__PURE__ */ t(
3890
- j,
3891
+ $,
3891
3892
  {
3892
3893
  icon: "lucide:pen-line",
3893
3894
  onClick: () => {
@@ -3900,7 +3901,7 @@ const Ma = [
3900
3901
  }
3901
3902
  ),
3902
3903
  g && /* @__PURE__ */ t(
3903
- j,
3904
+ $,
3904
3905
  {
3905
3906
  icon: "gravity-ui:square-dashed-circle",
3906
3907
  onClick: () => {
@@ -3913,7 +3914,7 @@ const Ma = [
3913
3914
  }
3914
3915
  ),
3915
3916
  v && /* @__PURE__ */ t(
3916
- j,
3917
+ $,
3917
3918
  {
3918
3919
  icon: "gravity-ui:circles-intersection",
3919
3920
  onClick: () => {
@@ -3926,7 +3927,7 @@ const Ma = [
3926
3927
  }
3927
3928
  ),
3928
3929
  x && /* @__PURE__ */ t(
3929
- j,
3930
+ $,
3930
3931
  {
3931
3932
  icon: "lucide:scissors",
3932
3933
  onClick: () => {
@@ -3939,20 +3940,20 @@ const Ma = [
3939
3940
  }
3940
3941
  ),
3941
3942
  k && /* @__PURE__ */ t(
3942
- j,
3943
+ $,
3943
3944
  {
3944
3945
  icon: "lucide:stamp",
3945
3946
  onClick: () => {
3946
- Z(!0), k();
3947
+ P(!0), k();
3947
3948
  },
3948
- onMouseLeave: () => Z(!1),
3949
+ onMouseLeave: () => P(!1),
3949
3950
  tooltip: "Distress Texture",
3950
3951
  tooltipDisabled: X || y,
3951
3952
  active: y || O.distress
3952
3953
  }
3953
3954
  ),
3954
3955
  M && /* @__PURE__ */ t(
3955
- j,
3956
+ $,
3956
3957
  {
3957
3958
  icon: "lucide:venetian-mask",
3958
3959
  onClick: () => {
@@ -3970,7 +3971,7 @@ const Ma = [
3970
3971
  ] })
3971
3972
  ] });
3972
3973
  };
3973
- function $s({ children: e, className: s }) {
3974
+ function js({ children: e, className: s }) {
3974
3975
  const n = W(null);
3975
3976
  return G(() => {
3976
3977
  const o = n.current;
@@ -4066,7 +4067,7 @@ const Hs = 1e3, vs = ({ element: e, onElementUpdate: s, className: n }) => {
4066
4067
  }
4067
4068
  )
4068
4069
  ] }),
4069
- /* @__PURE__ */ t($s, { children: /* @__PURE__ */ p(
4070
+ /* @__PURE__ */ t(js, { children: /* @__PURE__ */ p(
4070
4071
  ye,
4071
4072
  {
4072
4073
  "aria-label": "Photo zoom",
@@ -4135,7 +4136,7 @@ const Hs = 1e3, vs = ({ element: e, onElementUpdate: s, className: n }) => {
4135
4136
  }
4136
4137
  )
4137
4138
  ] }),
4138
- /* @__PURE__ */ t($s, { children: /* @__PURE__ */ p(
4139
+ /* @__PURE__ */ t(js, { children: /* @__PURE__ */ p(
4139
4140
  ye,
4140
4141
  {
4141
4142
  value: [u * 100],
@@ -4165,7 +4166,7 @@ const Hs = 1e3, vs = ({ element: e, onElementUpdate: s, className: n }) => {
4165
4166
  }
4166
4167
  )
4167
4168
  ] }),
4168
- /* @__PURE__ */ t($s, { children: /* @__PURE__ */ p(
4169
+ /* @__PURE__ */ t(js, { children: /* @__PURE__ */ p(
4169
4170
  ye,
4170
4171
  {
4171
4172
  value: [g * 100],
@@ -4184,7 +4185,7 @@ const Hs = 1e3, vs = ({ element: e, onElementUpdate: s, className: n }) => {
4184
4185
  ] }) })
4185
4186
  }
4186
4187
  );
4187
- }, ud = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4188
+ }, fd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4188
4189
  __proto__: null,
4189
4190
  CropPanel: vs,
4190
4191
  default: vs
@@ -4197,7 +4198,7 @@ const Hs = 1e3, vs = ({ element: e, onElementUpdate: s, className: n }) => {
4197
4198
  children: /* @__PURE__ */ t("div", { className: Oe, children: /* @__PURE__ */ t(ge, { label: "Radius", value: e, onChange: s, min: 0, max: 50, unit: "%" }) })
4198
4199
  }
4199
4200
  ), Ia = ({ onAlign: e }) => /* @__PURE__ */ t("div", { className: "align-panel sc:flex sc:flex-col", "data-preserve-selection": !0, style: { touchAction: "pan-y" }, children: /* @__PURE__ */ t("div", { className: Oe, children: /* @__PURE__ */ t("div", { className: "sc:flex sc:items-center sc:justify-center sc:gap-1", children: Ma.map(({ mode: s, icon: n, label: o }) => /* @__PURE__ */ t(
4200
- j,
4201
+ $,
4201
4202
  {
4202
4203
  icon: n,
4203
4204
  onClick: () => e(s),
@@ -4227,7 +4228,7 @@ const Hs = 1e3, vs = ({ element: e, onElementUpdate: s, className: n }) => {
4227
4228
  className: "sc:flex-1"
4228
4229
  }
4229
4230
  ),
4230
- /* @__PURE__ */ t("div", { className: "sc:pb-0.5", children: /* @__PURE__ */ t(j, { icon: de.rotateCcwSquare, onClick: n, tooltip: "Rotate 90° CCW" }) })
4231
+ /* @__PURE__ */ t("div", { className: "sc:pb-0.5", children: /* @__PURE__ */ t($, { icon: de.rotateCcwSquare, onClick: n, tooltip: "Rotate 90° CCW" }) })
4231
4232
  ] }) })
4232
4233
  }
4233
4234
  ), ml = ({
@@ -4324,7 +4325,7 @@ const Hs = 1e3, vs = ({ element: e, onElementUpdate: s, className: n }) => {
4324
4325
  ) })
4325
4326
  }
4326
4327
  ), gl = ({ adjustments: e, onChange: s, onChangeEnd: n, onReset: o }) => {
4327
- const c = e ?? { ...Ko }, a = Vo(e), i = (u, g) => /* @__PURE__ */ t("div", { "data-testid": `adjust-${g}`, children: /* @__PURE__ */ t(
4328
+ const c = e ?? { ...Ko }, a = qo(e), i = (u, g) => /* @__PURE__ */ t("div", { "data-testid": `adjust-${g}`, children: /* @__PURE__ */ t(
4328
4329
  ge,
4329
4330
  {
4330
4331
  label: u,
@@ -4660,7 +4661,7 @@ const Hs = 1e3, vs = ({ element: e, onElementUpdate: s, className: n }) => {
4660
4661
  onInvertedChange: u,
4661
4662
  onAdjustPhoto: g
4662
4663
  }) => {
4663
- Zo();
4664
+ Po();
4664
4665
  const m = Gs.map((v) => ({ id: v.imageUrl, name: v.name, thumbnailUrl: v.thumbnailUrl }));
4665
4666
  return /* @__PURE__ */ t(
4666
4667
  "div",
@@ -5110,7 +5111,7 @@ const Hs = 1e3, vs = ({ element: e, onElementUpdate: s, className: n }) => {
5110
5111
  cropPanelContent: se,
5111
5112
  rotationPanel: ue,
5112
5113
  opacityPanel: X,
5113
- adjustPanel: Z,
5114
+ adjustPanel: P,
5114
5115
  fontSizePanel: Y,
5115
5116
  shapeCornerRadiusPanel: ie,
5116
5117
  shapeTransparencyPanel: O,
@@ -5162,7 +5163,7 @@ const Hs = 1e3, vs = ({ element: e, onElementUpdate: s, className: n }) => {
5162
5163
  /* @__PURE__ */ t(Fe, { isOpen: g, children: se }),
5163
5164
  /* @__PURE__ */ t(Fe, { isOpen: m, children: ue }),
5164
5165
  /* @__PURE__ */ t(Fe, { isOpen: v, children: X }),
5165
- /* @__PURE__ */ t(Fe, { isOpen: b, children: Z }),
5166
+ /* @__PURE__ */ t(Fe, { isOpen: b, children: P }),
5166
5167
  /* @__PURE__ */ t(Fe, { isOpen: x, children: Y }),
5167
5168
  /* @__PURE__ */ t(Fe, { isOpen: y, children: ie }),
5168
5169
  /* @__PURE__ */ t(Fe, { isOpen: k, children: O }),
@@ -5253,7 +5254,7 @@ const Hs = 1e3, vs = ({ element: e, onElementUpdate: s, className: n }) => {
5253
5254
  function Ra(e, s) {
5254
5255
  var o;
5255
5256
  const n = e.stroke;
5256
- if (n != null && n.enabled && rt(n.color) && s.add(n.color), e instanceof je) {
5257
+ if (n != null && n.enabled && rt(n.color) && s.add(n.color), e instanceof $e) {
5257
5258
  rt(e.color) && s.add(e.color);
5258
5259
  const c = e.richText;
5259
5260
  if (c != null && c.spans)
@@ -5275,7 +5276,7 @@ function Ra(e, s) {
5275
5276
  rt(a) && s.add(a);
5276
5277
  return;
5277
5278
  }
5278
- if (e instanceof qo) {
5279
+ if (e instanceof Xo) {
5279
5280
  const c = e.transformData;
5280
5281
  c.fillEnabled && rt(c.fillColor) && s.add(c.fillColor), c.strokeEnabled && rt(c.strokeColor) && s.add(c.strokeColor);
5281
5282
  return;
@@ -5286,7 +5287,7 @@ function Ra(e, s) {
5286
5287
  return;
5287
5288
  }
5288
5289
  }
5289
- function jl(e, s) {
5290
+ function $l(e, s) {
5290
5291
  const n = /* @__PURE__ */ new Set();
5291
5292
  for (const o of e) Ra(o, n);
5292
5293
  if (s)
@@ -5304,7 +5305,7 @@ function nn(e) {
5304
5305
  u.r < s && (s = u.r), u.r > n && (n = u.r), u.g < o && (o = u.g), u.g > c && (c = u.g), u.b < a && (a = u.b), u.b > i && (i = u.b);
5305
5306
  return { rRange: n - s, gRange: c - o, bRange: i - a };
5306
5307
  }
5307
- function $l(e) {
5308
+ function jl(e) {
5308
5309
  const s = Math.max(e.rRange, e.gRange, e.bRange);
5309
5310
  return e.rRange === s ? "r" : e.gRange === s ? "g" : "b";
5310
5311
  }
@@ -5312,7 +5313,7 @@ function Hl(e) {
5312
5313
  return Math.max(e.rRange, e.gRange, e.bRange);
5313
5314
  }
5314
5315
  function Wl(e) {
5315
- const s = $l(e), n = e.pixels.slice().sort((i, u) => i[s] - u[s]), o = n.length >> 1, c = n.slice(0, o), a = n.slice(o);
5316
+ const s = jl(e), n = e.pixels.slice().sort((i, u) => i[s] - u[s]), o = n.length >> 1, c = n.slice(0, o), a = n.slice(o);
5316
5317
  return [
5317
5318
  { pixels: c, ...nn(c) },
5318
5319
  { pixels: a, ...nn(a) }
@@ -5380,7 +5381,7 @@ function Gl(e, s = 5) {
5380
5381
  const c = o.map((a) => Vl(a.pixels));
5381
5382
  return ql(c, s, 50).map(Kl);
5382
5383
  }
5383
- async function Zl(e, s = 5) {
5384
+ async function Pl(e, s = 5) {
5384
5385
  if (!e) return [];
5385
5386
  const n = bs.get(e);
5386
5387
  if (n) return n;
@@ -5388,7 +5389,7 @@ async function Zl(e, s = 5) {
5388
5389
  if (o) return o;
5389
5390
  const c = (async () => {
5390
5391
  try {
5391
- const a = await Pl(e), i = 48, g = (typeof OffscreenCanvas < "u" ? new OffscreenCanvas(i, i) : (() => {
5392
+ const a = await Zl(e), i = 48, g = (typeof OffscreenCanvas < "u" ? new OffscreenCanvas(i, i) : (() => {
5392
5393
  const x = document.createElement("canvas");
5393
5394
  return x.width = i, x.height = i, x;
5394
5395
  })()).getContext("2d");
@@ -5412,7 +5413,7 @@ async function Zl(e, s = 5) {
5412
5413
  })();
5413
5414
  return Ws.set(e, c), c;
5414
5415
  }
5415
- function Pl(e) {
5416
+ function Zl(e) {
5416
5417
  return new Promise((s, n) => {
5417
5418
  const o = new Image();
5418
5419
  o.crossOrigin = "anonymous", o.onload = () => s(o), o.onerror = () => n(new Error(`Failed to load image: ${e}`)), o.src = e;
@@ -5429,14 +5430,14 @@ async function Jl(e, s = 5) {
5429
5430
  for (const g of e) c(g);
5430
5431
  if (n.length === 0) return [];
5431
5432
  const a = await Promise.all(
5432
- n.map((g) => Zl(g, s))
5433
+ n.map((g) => Pl(g, s))
5433
5434
  ), i = [], u = /* @__PURE__ */ new Set();
5434
5435
  for (const g of a)
5435
5436
  for (const m of g)
5436
5437
  u.has(m) || (u.add(m), i.push(m));
5437
5438
  return i;
5438
5439
  }
5439
- const Ys = Pt("ContextualToolbars"), Ql = "Background removal is temporarily unavailable.";
5440
+ const Ys = Zt("ContextualToolbars"), Ql = "Background removal is temporarily unavailable.";
5440
5441
  function Oo(e, s) {
5441
5442
  const n = e instanceof Error ? e.message : "";
5442
5443
  return !n || /VITE_|NEXT_PUBLIC_|\.env/i.test(n) ? s : n;
@@ -5472,11 +5473,11 @@ const _o = ({ services: e, ...s }) => {
5472
5473
  partAttr: U
5473
5474
  }) => {
5474
5475
  var Jn, Qn, eo, to, so, no, oo, ao, co, ro, io, lo, uo, fo, po, mo, ho, go, bo, yo, vo, xo;
5475
- const { panOffset: B } = $o(), { multiSelection: oe, setSelectedId: ee } = Er(), {
5476
+ const { panOffset: B } = jo(), { multiSelection: oe, setSelectedId: ee } = Er(), {
5476
5477
  expandedPanelType: se,
5477
5478
  setExpandedPanelType: ue,
5478
5479
  setIsToolbarMenuOpen: X,
5479
- isRotating: Z
5480
+ isRotating: P
5480
5481
  } = Ir(), {
5481
5482
  elements: Y,
5482
5483
  setElements: ie,
@@ -5492,16 +5493,16 @@ const _o = ({ services: e, ...s }) => {
5492
5493
  executeAddElement: we,
5493
5494
  executeReorderElement: Ie,
5494
5495
  refreshArtboards: _e
5495
- } = Zt(), { removeBackground: h } = Wo(), w = el({ canvasEditorRef: Me }), [R, $] = N("root"), [K, Re] = N(null), [H, le] = N(null), [Je, Te] = N(!1), [He, ot] = N(!1), [Qe] = N(!1), [it, ht] = N(!1), [Lt, at] = N(!1), [l, P] = N(() => k && {
5496
+ } = Pt(), { removeBackground: h } = Wo(), w = el({ canvasEditorRef: Me }), [R, j] = N("root"), [K, Re] = N(null), [H, le] = N(null), [Je, Te] = N(!1), [He, ot] = N(!1), [Qe] = N(!1), [it, ht] = N(!1), [Lt, at] = N(!1), [l, Z] = N(() => k && {
5496
5497
  cornerRadius: { type: "cornerRadius", icon: "lucide:square-round-corner", label: "Corner Radius" },
5497
5498
  crop: { type: "crop", icon: "lucide:crop", label: "Crop" },
5498
5499
  rotation: { type: "rotation", icon: de.rotateLeft, label: "Rotate" },
5499
5500
  opacity: { type: "opacity", icon: "lucide:blend", label: "Transparency" },
5500
5501
  effects: { type: "effects", icon: "lucide:sparkles", label: "Effects" }
5501
- }[k] || null), [gt, $e] = N(!1), [et, ve] = N(!1), [Ke, kt] = N(!1), [Tt, lt] = N(!1), [Jt, Nt] = N(null), [dt, St] = N(null), [ut, cn] = N({ width: 0, height: 0 }), bt = W(null), yt = W(null), Ts = W(0), rn = W(!1), ln = W(!1), Ns = W(null), La = W(void 0), Qt = W(null), dn = W(se), un = W(void 0), fn = W(void 0), pn = W(!1), mn = W(!1), za = W(!!k), hn = W(!1), gn = W(l), bn = W(null), yn = W(() => {
5502
+ }[k] || null), [gt, je] = N(!1), [et, ve] = N(!1), [Ke, kt] = N(!1), [Tt, lt] = N(!1), [Jt, Nt] = N(null), [dt, St] = N(null), [ut, cn] = N({ width: 0, height: 0 }), bt = W(null), yt = W(null), Ts = W(0), rn = W(!1), ln = W(!1), Ns = W(null), La = W(void 0), Qt = W(null), dn = W(se), un = W(void 0), fn = W(void 0), pn = W(!1), mn = W(!1), za = W(!!k), hn = W(!1), gn = W(l), bn = W(null), yn = W(() => {
5502
5503
  }), Ss = W(void 0), vn = W(void 0);
5503
- mn.current = Z;
5504
- const d = ne || O, es = d == null ? void 0 : d.id, vt = O == null ? void 0 : O.id, zt = d == null ? void 0 : d.transformType, { fontColor: Ds, getEffectiveStyle: Aa, handleFontColorChange: Ms } = w, At = !!(O && !Z), _ = S(
5504
+ mn.current = P;
5505
+ const d = ne || O, es = d == null ? void 0 : d.id, vt = O == null ? void 0 : O.id, zt = d == null ? void 0 : d.transformType, { fontColor: Ds, getEffectiveStyle: Aa, handleFontColorChange: Ms } = w, At = !!(O && !P), _ = S(
5505
5506
  (r) => {
5506
5507
  if (O)
5507
5508
  if (ne) {
@@ -5607,14 +5608,14 @@ const _o = ({ services: e, ...s }) => {
5607
5608
  f.transformData.fillOpacity = r, _(f);
5608
5609
  },
5609
5610
  [d, _]
5610
- ), ja = S(
5611
+ ), $a = S(
5611
5612
  (r) => {
5612
5613
  if (!d || d.transformType !== "shape") return;
5613
5614
  const f = d.clone();
5614
5615
  f.transformData.sides = r, _(f);
5615
5616
  },
5616
5617
  [d, _]
5617
- ), $a = S(
5618
+ ), ja = S(
5618
5619
  (r) => {
5619
5620
  if (!d || d.transformType !== "shape") return;
5620
5621
  const f = d.clone();
@@ -5643,33 +5644,33 @@ const _o = ({ services: e, ...s }) => {
5643
5644
  },
5644
5645
  [d, _]
5645
5646
  ), { canAlign: Ya, align: Dn } = Da(), Xa = S(() => {
5646
- P(
5647
+ Z(
5647
5648
  (r) => (r == null ? void 0 : r.type) === "align" ? null : { type: "align", icon: "gravity-ui:objects-align-center-vertical", label: "Position" }
5648
5649
  );
5649
5650
  }, []), qa = S(() => {
5650
- E ? E() : P(
5651
+ E ? E() : Z(
5651
5652
  (r) => (r == null ? void 0 : r.type) === "cornerRadius" ? null : { type: "cornerRadius", icon: "lucide:square-round-corner", label: "Corner Radius" }
5652
5653
  );
5653
5654
  }, [E]), Ka = S(() => {
5654
- M ? M() : P((r) => (r == null ? void 0 : r.type) === "crop" ? null : { type: "crop", icon: "lucide:crop", label: "Crop" });
5655
+ M ? M() : Z((r) => (r == null ? void 0 : r.type) === "crop" ? null : { type: "crop", icon: "lucide:crop", label: "Crop" });
5655
5656
  }, [M]), ns = S(() => {
5656
- P(
5657
+ Z(
5657
5658
  (r) => (r == null ? void 0 : r.type) === "rotation" ? null : { type: "rotation", icon: de.rotateLeft, label: "Rotate" }
5658
5659
  );
5659
5660
  }, []), Is = S(() => {
5660
- P(
5661
+ Z(
5661
5662
  (r) => (r == null ? void 0 : r.type) === "opacity" ? null : { type: "opacity", icon: "lucide:blend", label: "Transparency" }
5662
5663
  );
5663
5664
  }, []), Ga = S(() => {
5664
- P(
5665
+ Z(
5665
5666
  (r) => (r == null ? void 0 : r.type) === "adjust" ? null : { type: "adjust", icon: "gravity-ui:sliders", label: "Adjust" }
5666
5667
  );
5667
- }, []), Za = S(() => {
5668
- P(
5668
+ }, []), Pa = S(() => {
5669
+ Z(
5669
5670
  (r) => (r == null ? void 0 : r.type) === "adjust" ? null : { type: "adjust", icon: "gravity-ui:sliders", label: "Engrave" }
5670
5671
  );
5671
- }, []), Pa = S(() => {
5672
- P(
5672
+ }, []), Za = S(() => {
5673
+ Z(
5673
5674
  (r) => (r == null ? void 0 : r.type) === "fontSize" ? null : { type: "fontSize", icon: "lucide:type", label: "Font Size" }
5674
5675
  );
5675
5676
  }, []), Ja = S(
@@ -5682,55 +5683,55 @@ const _o = ({ services: e, ...s }) => {
5682
5683
  },
5683
5684
  [d, _]
5684
5685
  ), Qa = ((Qn = d == null ? void 0 : d.transformData) == null ? void 0 : Qn.width) ?? null, Mn = (d == null ? void 0 : d.transformType) === "custom", ec = Mn ? w.letterSpacing : null, tc = Mn ? w.lineHeight : null, sc = S(() => {
5685
- P(
5686
+ Z(
5686
5687
  (r) => (r == null ? void 0 : r.type) === "shapeCornerRadius" ? null : { type: "shapeCornerRadius", icon: "lucide:square-round-corner", label: "Corner Radius" }
5687
5688
  );
5688
5689
  }, []), nc = S(() => {
5689
- P(
5690
+ Z(
5690
5691
  (r) => (r == null ? void 0 : r.type) === "shapeTransparency" ? null : { type: "shapeTransparency", icon: "lucide:blend", label: "Transparency" }
5691
5692
  );
5692
5693
  }, []), oc = S(() => {
5693
- P(
5694
+ Z(
5694
5695
  (r) => (r == null ? void 0 : r.type) === "shapeSides" ? null : { type: "shapeSides", icon: "lucide:hexagon", label: "Sides" }
5695
5696
  );
5696
5697
  }, []), ac = S(() => {
5697
- P(
5698
+ Z(
5698
5699
  (r) => (r == null ? void 0 : r.type) === "shapePoints" ? null : { type: "shapePoints", icon: "lucide:star", label: "Points" }
5699
5700
  );
5700
5701
  }, []), cc = S(() => {
5701
- P(
5702
+ Z(
5702
5703
  (r) => (r == null ? void 0 : r.type) === "shapeInnerRadius" ? null : { type: "shapeInnerRadius", icon: "lucide:circle-dashed", label: "Inner Radius" }
5703
5704
  );
5704
5705
  }, []), rc = S(() => {
5705
- P(
5706
+ Z(
5706
5707
  (r) => (r == null ? void 0 : r.type) === "shapeColor" ? null : { type: "shapeColor", icon: "lucide:paint-bucket", label: "Fill Color" }
5707
5708
  );
5708
5709
  }, []), ic = S(() => {
5709
- P(
5710
+ Z(
5710
5711
  (r) => (r == null ? void 0 : r.type) === "textColor" ? null : { type: "textColor", icon: de.palette, label: "Font Color" }
5711
5712
  );
5712
5713
  }, []), os = S(() => {
5713
- P(
5714
+ Z(
5714
5715
  (r) => (r == null ? void 0 : r.type) === "compositing" ? null : { type: "compositing", icon: "lucide:scissors", label: "Clip / Knockout" }
5715
5716
  );
5716
5717
  }, []), as = S(() => {
5717
- P(
5718
+ Z(
5718
5719
  (r) => (r == null ? void 0 : r.type) === "distressTexture" ? null : { type: "distressTexture", icon: "lucide:stamp", label: "Distress Texture" }
5719
5720
  );
5720
5721
  }, []), cs = S(() => {
5721
- P(
5722
+ Z(
5722
5723
  (r) => (r == null ? void 0 : r.type) === "imageMask" ? null : { type: "imageMask", icon: "lucide:venetian-mask", label: "Image Mask" }
5723
5724
  );
5724
5725
  }, []), rs = S(() => {
5725
- P(
5726
+ Z(
5726
5727
  (r) => (r == null ? void 0 : r.type) === "stroke" ? null : { type: "stroke", icon: "lucide:pen-line", label: "Stroke" }
5727
5728
  );
5728
5729
  }, []), is = S(() => {
5729
- P(
5730
+ Z(
5730
5731
  (r) => (r == null ? void 0 : r.type) === "shadow" ? null : { type: "shadow", icon: "gravity-ui:square-dashed-circle", label: "Shadow" }
5731
5732
  );
5732
5733
  }, []), ls = S(() => {
5733
- P(
5734
+ Z(
5734
5735
  (r) => (r == null ? void 0 : r.type) === "blendMode" ? null : { type: "blendMode", icon: "gravity-ui:circles-intersection", label: "Blend Mode" }
5735
5736
  );
5736
5737
  }, []), lc = S(() => {
@@ -5741,7 +5742,7 @@ const _o = ({ services: e, ...s }) => {
5741
5742
  f.exitCropMode(), _(f);
5742
5743
  }
5743
5744
  }
5744
- P(null);
5745
+ Z(null);
5745
5746
  }, [l, d, _]), ds = S(() => {
5746
5747
  if (!O) return;
5747
5748
  const r = Y.findIndex((f) => f.id === O.id);
@@ -5903,7 +5904,7 @@ const _o = ({ services: e, ...s }) => {
5903
5904
  const f = r.clone();
5904
5905
  f.enterCropMode(), _(f);
5905
5906
  }
5906
- M ? M() : P({ type: "crop", icon: "lucide:crop", label: "Crop" });
5907
+ M ? M() : Z({ type: "crop", icon: "lucide:crop", label: "Crop" });
5907
5908
  }, [d, _, M]), Tc = S(
5908
5909
  (r) => {
5909
5910
  if (!d) return;
@@ -5967,7 +5968,7 @@ const _o = ({ services: e, ...s }) => {
5967
5968
  const r = dn.current, f = se;
5968
5969
  if (r !== f) {
5969
5970
  if (dn.current = f, r !== null && f === null && l !== null) {
5970
- Qt.current = null, P(null);
5971
+ Qt.current = null, Z(null);
5971
5972
  return;
5972
5973
  }
5973
5974
  if (f !== null && (l == null ? void 0 : l.type) !== f) {
@@ -5994,18 +5995,18 @@ const _o = ({ services: e, ...s }) => {
5994
5995
  distressTexture: { type: "distressTexture", icon: "lucide:stamp", label: "Distress Texture" },
5995
5996
  imageMask: { type: "imageMask", icon: "lucide:venetian-mask", label: "Image Mask" }
5996
5997
  }[f];
5997
- F && (Qt.current = f, P(F));
5998
+ F && (Qt.current = f, Z(F));
5998
5999
  }
5999
6000
  }
6000
6001
  }, [se, l]), G(() => {
6001
6002
  X(l !== null || K !== null || He || Qe || it || R !== "root");
6002
6003
  }, [l, K, He, Qe, it, R, X]), G(() => {
6003
- k || (Ss.current !== void 0 && Ss.current !== vt && P(null), Ss.current = vt);
6004
+ k || (Ss.current !== void 0 && Ss.current !== vt && Z(null), Ss.current = vt);
6004
6005
  }, [vt, k]), G(() => {
6005
6006
  z && O && (L == null || L(!1));
6006
6007
  }, [z, O, L]), G(() => {
6007
6008
  const r = (d == null ? void 0 : d.transformType) === "image" ? d.isCropping : !1;
6008
- (l == null ? void 0 : l.type) === "crop" && vn.current === !0 && r === !1 && P(null), vn.current = r;
6009
+ (l == null ? void 0 : l.type) === "crop" && vn.current === !0 && r === !1 && Z(null), vn.current = r;
6009
6010
  }, [d, l == null ? void 0 : l.type]), G(() => {
6010
6011
  gn.current = l, bn.current = d ?? null, yn.current = _;
6011
6012
  }), G(() => {
@@ -6074,16 +6075,16 @@ const _o = ({ services: e, ...s }) => {
6074
6075
  y: xt.y,
6075
6076
  width: (Dt == null ? void 0 : Dt.width) || 100,
6076
6077
  height: (Dt == null ? void 0 : Dt.height) || 50
6077
- }, Mt = V.getActiveArtboard(), Co = (Mt == null ? void 0 : Mt.x) || 0, wo = (Mt == null ? void 0 : Mt.y) || 0, Ze = ((ke = (ce = Me == null ? void 0 : Me.current) == null ? void 0 : ce.getZoom) == null ? void 0 : ke.call(ce)) || 1;
6078
+ }, Mt = V.getActiveArtboard(), Co = (Mt == null ? void 0 : Mt.x) || 0, wo = (Mt == null ? void 0 : Mt.y) || 0, Pe = ((ke = (ce = Me == null ? void 0 : Me.current) == null ? void 0 : ce.getZoom) == null ? void 0 : ke.call(ce)) || 1;
6078
6079
  let ps, Bt, ms, hs;
6079
6080
  if (Ut) {
6080
- const jt = Ut.getBoundingClientRect();
6081
- ps = jt.left + (Ge.x - Co) * Ze, Bt = jt.top + (Ge.y - wo) * Ze, ms = Ge.width * Ze, hs = Ge.height * Ze;
6081
+ const $t = Ut.getBoundingClientRect();
6082
+ ps = $t.left + (Ge.x - Co) * Pe, Bt = $t.top + (Ge.y - wo) * Pe, ms = Ge.width * Pe, hs = Ge.height * Pe;
6082
6083
  } else if (v)
6083
- ps = v.left + (Ge.x - Co) * Ze, Bt = v.top + (Ge.y - wo) * Ze, ms = Ge.width * Ze, hs = Ge.height * Ze;
6084
+ ps = v.left + (Ge.x - Co) * Pe, Bt = v.top + (Ge.y - wo) * Pe, ms = Ge.width * Pe, hs = Ge.height * Pe;
6084
6085
  else {
6085
- const jt = window.innerWidth / 2, Bs = window.innerHeight / 2;
6086
- ps = jt - Ge.width * Ze / 2, Bt = Bs - Ge.height * Ze / 2, ms = Ge.width * Ze, hs = Ge.height * Ze;
6086
+ const $t = window.innerWidth / 2, Bs = window.innerHeight / 2;
6087
+ ps = $t - Ge.width * Pe / 2, Bt = Bs - Ge.height * Pe / 2, ms = Ge.width * Pe, hs = Ge.height * Pe;
6087
6088
  }
6088
6089
  const ko = 12, Tr = Bt, Nr = ps + ms / 2;
6089
6090
  let Ct = Tr - nt - ko, Us = Nr;
@@ -6106,7 +6107,7 @@ const _o = ({ services: e, ...s }) => {
6106
6107
  (r) => Ms(r),
6107
6108
  [Ms]
6108
6109
  ), In = We(
6109
- () => jl(Y, fe),
6110
+ () => $l(Y, fe),
6110
6111
  [Y, fe]
6111
6112
  ), Rn = We(() => {
6112
6113
  const r = new Set(In);
@@ -6145,36 +6146,36 @@ const _o = ({ services: e, ...s }) => {
6145
6146
  }
6146
6147
  }, []);
6147
6148
  G(() => {
6148
- const r = pn.current, f = Z;
6149
- !r && f && H && (Ns.current = { ...H }), r && !f && (Ns.current = null), pn.current = Z;
6150
- }, [Z, H]), G(() => {
6149
+ const r = pn.current, f = P;
6150
+ !r && f && H && (Ns.current = { ...H }), r && !f && (Ns.current = null), pn.current = P;
6151
+ }, [P, H]), G(() => {
6151
6152
  const r = rn.current, f = un.current;
6152
6153
  if (rn.current = At, un.current = vt, !r && At) {
6153
6154
  if (kt(!0), e === "embedded") {
6154
- lt(!1), $e(!0), ve(!1);
6155
+ lt(!1), je(!0), ve(!1);
6155
6156
  const A = setTimeout(() => {
6156
- $e(!1);
6157
+ je(!1);
6157
6158
  }, 200);
6158
6159
  return () => clearTimeout(A);
6159
6160
  }
6160
- lt(!0), $e(!1), ve(!1);
6161
+ lt(!0), je(!1), ve(!1);
6161
6162
  return;
6162
6163
  }
6163
6164
  if (r && At && f !== vt && vt !== void 0) {
6164
6165
  if (e === "embedded") {
6165
- $e(!1);
6166
+ je(!1);
6166
6167
  return;
6167
6168
  }
6168
- lt(!0), $e(!1), ve(!1);
6169
+ lt(!0), je(!1), ve(!1);
6169
6170
  return;
6170
6171
  }
6171
6172
  if (r && !At) {
6172
- if (Z) {
6173
- kt(!1), $e(!1), ve(!1), lt(!1);
6173
+ if (P) {
6174
+ kt(!1), je(!1), ve(!1), lt(!1);
6174
6175
  return;
6175
6176
  }
6176
6177
  if (e === "embedded") {
6177
- if (ve(!0), $e(!1), yt.current) {
6178
+ if (ve(!0), je(!1), yt.current) {
6178
6179
  const te = yt.current.offsetHeight;
6179
6180
  St(te), requestAnimationFrame(() => {
6180
6181
  St(0);
@@ -6185,17 +6186,17 @@ const _o = ({ services: e, ...s }) => {
6185
6186
  }, 200);
6186
6187
  return () => clearTimeout(F);
6187
6188
  }
6188
- ve(!0), $e(!1), lt(!1);
6189
+ ve(!0), je(!1), lt(!1);
6189
6190
  const A = setTimeout(() => {
6190
6191
  kt(!1), ve(!1), le(null), Nt(null);
6191
6192
  }, 150);
6192
6193
  return () => clearTimeout(A);
6193
6194
  }
6194
- }, [At, Z, vt, e, zt]), G(() => {
6195
+ }, [At, P, vt, e, zt]), G(() => {
6195
6196
  if (Tt && H && Jt === es) {
6196
- lt(!1), $e(!0);
6197
+ lt(!1), je(!0);
6197
6198
  const r = setTimeout(() => {
6198
- $e(!1);
6199
+ je(!1);
6199
6200
  }, 200);
6200
6201
  return () => clearTimeout(r);
6201
6202
  }
@@ -6267,7 +6268,7 @@ const _o = ({ services: e, ...s }) => {
6267
6268
  }
6268
6269
  ),
6269
6270
  R === "root" && d && Ya && /* @__PURE__ */ t(
6270
- j,
6271
+ $,
6271
6272
  {
6272
6273
  icon: "gravity-ui:objects-align-center-vertical",
6273
6274
  onClick: Xa,
@@ -6297,7 +6298,7 @@ const _o = ({ services: e, ...s }) => {
6297
6298
  adjustExpanded: (l == null ? void 0 : l.type) === "adjust",
6298
6299
  onAdjustToggle: Ue ? void 0 : Ga,
6299
6300
  engraveExpanded: (l == null ? void 0 : l.type) === "adjust",
6300
- onEngraveToggle: Ue ? Za : void 0,
6301
+ onEngraveToggle: Ue ? Pa : void 0,
6301
6302
  rotationExpanded: (l == null ? void 0 : l.type) === "rotation",
6302
6303
  onRotationToggle: ns,
6303
6304
  opacityExpanded: (l == null ? void 0 : l.type) === "opacity",
@@ -6391,7 +6392,7 @@ const _o = ({ services: e, ...s }) => {
6391
6392
  }
6392
6393
  ),
6393
6394
  R === "root" && d && d.transformType !== "image" && d.transformType !== "group" && d.transformType !== "shape" && d.transformType !== "path" && /* @__PURE__ */ t(
6394
- Pi,
6395
+ Zi,
6395
6396
  {
6396
6397
  toolbar: w,
6397
6398
  stableElementId: es,
@@ -6410,7 +6411,7 @@ const _o = ({ services: e, ...s }) => {
6410
6411
  expandedPanel: l,
6411
6412
  onRotationToggle: ns,
6412
6413
  onOpacityToggle: Is,
6413
- onFontSizeToggle: Pa,
6414
+ onFontSizeToggle: Za,
6414
6415
  knockoutExpanded: (l == null ? void 0 : l.type) === "compositing",
6415
6416
  onKnockoutToggle: os,
6416
6417
  distressTextureExpanded: (l == null ? void 0 : l.type) === "distressTexture",
@@ -6434,7 +6435,7 @@ const _o = ({ services: e, ...s }) => {
6434
6435
  }
6435
6436
  ),
6436
6437
  R === "color" && /* @__PURE__ */ p("div", { className: "sc-toolbar-items", children: [
6437
- /* @__PURE__ */ t(zi, { onClick: () => $("root") }),
6438
+ /* @__PURE__ */ t(zi, { onClick: () => j("root") }),
6438
6439
  /* @__PURE__ */ p("div", { className: "sc-toolbar-scroll", children: [
6439
6440
  /* @__PURE__ */ t(
6440
6441
  "input",
@@ -6463,14 +6464,14 @@ const _o = ({ services: e, ...s }) => {
6463
6464
  "data-preserve-selection": !0,
6464
6465
  style: {
6465
6466
  ...Fc,
6466
- opacity: Z ? 0 : 1,
6467
+ opacity: P ? 0 : 1,
6467
6468
  // Embedded (docked) mode is visually transparent chrome — its empty
6468
6469
  // regions (flex gaps, leftover row width when the strip wraps) must
6469
6470
  // not swallow pointer events meant for the canvas behind it. The
6470
6471
  // root opts out and App.css re-enables hits on the actual controls
6471
6472
  // (.sc-toolbar-regular-content > *, .sc-toolbar-collapsed-header).
6472
6473
  // Floating mode keeps its opaque pill fully interactive.
6473
- pointerEvents: Z || e === "embedded" ? "none" : "auto",
6474
+ pointerEvents: P || e === "embedded" ? "none" : "auto",
6474
6475
  transition: "opacity 0.05s ease-out"
6475
6476
  },
6476
6477
  "data-entering": gt ? "" : void 0,
@@ -6486,7 +6487,7 @@ const _o = ({ services: e, ...s }) => {
6486
6487
  panelType: l.type,
6487
6488
  defaultIcon: l.icon,
6488
6489
  textColorValue: zs,
6489
- shapeFillColor: ae ? Xo((eo = ae.transformData) == null ? void 0 : eo.fill, (to = ae.transformData) == null ? void 0 : to.fillColor) : void 0
6490
+ shapeFillColor: ae ? Yo((eo = ae.transformData) == null ? void 0 : eo.fill, (to = ae.transformData) == null ? void 0 : to.fillColor) : void 0
6490
6491
  }
6491
6492
  ),
6492
6493
  label: l.label,
@@ -6496,7 +6497,7 @@ const _o = ({ services: e, ...s }) => {
6496
6497
  ) })
6497
6498
  ] })
6498
6499
  }
6499
- ) : null, As = (l == null ? void 0 : l.type) === "align", Fs = (l == null ? void 0 : l.type) === "cornerRadius", Os = (l == null ? void 0 : l.type) === "crop", Fn = (l == null ? void 0 : l.type) === "rotation", On = (l == null ? void 0 : l.type) === "opacity", _s = (l == null ? void 0 : l.type) === "adjust", _n = (l == null ? void 0 : l.type) === "fontSize", Un = (l == null ? void 0 : l.type) === "shapeCornerRadius", Bn = (l == null ? void 0 : l.type) === "shapeTransparency", jn = (l == null ? void 0 : l.type) === "shapeSides", $n = (l == null ? void 0 : l.type) === "shapePoints", Hn = (l == null ? void 0 : l.type) === "shapeInnerRadius", Wn = (l == null ? void 0 : l.type) === "shapeColor", Vn = (l == null ? void 0 : l.type) === "textColor", Yn = (l == null ? void 0 : l.type) === "compositing", Xn = (l == null ? void 0 : l.type) === "distressTexture", qn = (l == null ? void 0 : l.type) === "stroke", Kn = (l == null ? void 0 : l.type) === "shadow", Gn = (l == null ? void 0 : l.type) === "blendMode", Zn = (l == null ? void 0 : l.type) === "imageMask", Pn = (d == null ? void 0 : d.transformType) === "image" && ((so = d.transformData) == null ? void 0 : so.borderRadius) || 0, _c = (d == null ? void 0 : d.rotation) || 0, Uc = (d == null ? void 0 : d.opacity) ?? 1, Bc = ((no = ae == null ? void 0 : ae.transformData) == null ? void 0 : no.borderRadius) || 0, jc = ((oo = ae == null ? void 0 : ae.transformData) == null ? void 0 : oo.fillOpacity) ?? 1, $c = ((ao = ae == null ? void 0 : ae.transformData) == null ? void 0 : ao.sides) || 5, Hc = ((co = ae == null ? void 0 : ae.transformData) == null ? void 0 : co.points) || 5, Wc = ((ro = ae == null ? void 0 : ae.transformData) == null ? void 0 : ro.innerRadius) || 0.4, Vc = ((io = ae == null ? void 0 : ae.transformData) == null ? void 0 : io.fillColor) || "#3b82f6", Yc = (lo = ae == null ? void 0 : ae.transformData) == null ? void 0 : lo.fill, Xc = ((uo = d == null ? void 0 : d.knockoutParts) == null ? void 0 : uo.fill) ?? !1, qc = ((fo = d == null ? void 0 : d.knockoutParts) == null ? void 0 : fo.stroke) ?? !1, Kc = ((po = d == null ? void 0 : d.knockoutParts) == null ? void 0 : po.scope) ?? "group", Gc = (d == null ? void 0 : d.blendMode) === "clip" ? "clip" : "knockout", Zc = As && d ? /* @__PURE__ */ t(Ia, { onAlign: Dn }) : null, Pc = Fs && (d == null ? void 0 : d.transformType) === "image" ? /* @__PURE__ */ t(fl, { value: Pn, onChange: xn }) : null, Jc = Os && (d == null ? void 0 : d.transformType) === "image" ? /* @__PURE__ */ t(Ll, { element: d, onElementUpdate: _ }) : null, Qc = Fn && d ? /* @__PURE__ */ t(pl, { value: _c, onChange: uc, onRotate90: fc }) : null, er = On && d ? /* @__PURE__ */ t(hl, { value: Uc, onChange: pc }) : null, tr = (d == null ? void 0 : d.transformType) === "image" ? (mo = d.transformData) == null ? void 0 : mo.adjustments : void 0, sr = _s && (d == null ? void 0 : d.transformType) === "image" && Ue ? /* @__PURE__ */ t(
6500
+ ) : null, As = (l == null ? void 0 : l.type) === "align", Fs = (l == null ? void 0 : l.type) === "cornerRadius", Os = (l == null ? void 0 : l.type) === "crop", Fn = (l == null ? void 0 : l.type) === "rotation", On = (l == null ? void 0 : l.type) === "opacity", _s = (l == null ? void 0 : l.type) === "adjust", _n = (l == null ? void 0 : l.type) === "fontSize", Un = (l == null ? void 0 : l.type) === "shapeCornerRadius", Bn = (l == null ? void 0 : l.type) === "shapeTransparency", $n = (l == null ? void 0 : l.type) === "shapeSides", jn = (l == null ? void 0 : l.type) === "shapePoints", Hn = (l == null ? void 0 : l.type) === "shapeInnerRadius", Wn = (l == null ? void 0 : l.type) === "shapeColor", Vn = (l == null ? void 0 : l.type) === "textColor", Yn = (l == null ? void 0 : l.type) === "compositing", Xn = (l == null ? void 0 : l.type) === "distressTexture", qn = (l == null ? void 0 : l.type) === "stroke", Kn = (l == null ? void 0 : l.type) === "shadow", Gn = (l == null ? void 0 : l.type) === "blendMode", Pn = (l == null ? void 0 : l.type) === "imageMask", Zn = (d == null ? void 0 : d.transformType) === "image" && ((so = d.transformData) == null ? void 0 : so.borderRadius) || 0, _c = (d == null ? void 0 : d.rotation) || 0, Uc = (d == null ? void 0 : d.opacity) ?? 1, Bc = ((no = ae == null ? void 0 : ae.transformData) == null ? void 0 : no.borderRadius) || 0, $c = ((oo = ae == null ? void 0 : ae.transformData) == null ? void 0 : oo.fillOpacity) ?? 1, jc = ((ao = ae == null ? void 0 : ae.transformData) == null ? void 0 : ao.sides) || 5, Hc = ((co = ae == null ? void 0 : ae.transformData) == null ? void 0 : co.points) || 5, Wc = ((ro = ae == null ? void 0 : ae.transformData) == null ? void 0 : ro.innerRadius) || 0.4, Vc = ((io = ae == null ? void 0 : ae.transformData) == null ? void 0 : io.fillColor) || "#3b82f6", Yc = (lo = ae == null ? void 0 : ae.transformData) == null ? void 0 : lo.fill, Xc = ((uo = d == null ? void 0 : d.knockoutParts) == null ? void 0 : uo.fill) ?? !1, qc = ((fo = d == null ? void 0 : d.knockoutParts) == null ? void 0 : fo.stroke) ?? !1, Kc = ((po = d == null ? void 0 : d.knockoutParts) == null ? void 0 : po.scope) ?? "group", Gc = (d == null ? void 0 : d.blendMode) === "clip" ? "clip" : "knockout", Pc = As && d ? /* @__PURE__ */ t(Ia, { onAlign: Dn }) : null, Zc = Fs && (d == null ? void 0 : d.transformType) === "image" ? /* @__PURE__ */ t(fl, { value: Zn, onChange: xn }) : null, Jc = Os && (d == null ? void 0 : d.transformType) === "image" ? /* @__PURE__ */ t(Ll, { element: d, onElementUpdate: _ }) : null, Qc = Fn && d ? /* @__PURE__ */ t(pl, { value: _c, onChange: uc, onRotate90: fc }) : null, er = On && d ? /* @__PURE__ */ t(hl, { value: Uc, onChange: pc }) : null, tr = (d == null ? void 0 : d.transformType) === "image" ? (mo = d.transformData) == null ? void 0 : mo.adjustments : void 0, sr = _s && (d == null ? void 0 : d.transformType) === "image" && Ue ? /* @__PURE__ */ t(
6500
6501
  Al,
6501
6502
  {
6502
6503
  settings: (ho = d.transformData) == null ? void 0 : ho.engrave,
@@ -6530,7 +6531,7 @@ const _o = ({ services: e, ...s }) => {
6530
6531
  lineHeightValue: tc,
6531
6532
  onLineHeightChange: w.handleLineHeightChange
6532
6533
  }
6533
- ) : null, or = Un && ae ? /* @__PURE__ */ t(bl, { value: Bc, onChange: Ua }) : null, ar = Bn && ae ? /* @__PURE__ */ t(yl, { value: jc, onChange: Ba }) : null, cr = jn && ae ? /* @__PURE__ */ t(vl, { value: $c, onChange: ja }) : null, rr = $n && ae ? /* @__PURE__ */ t(xl, { value: Hc, onChange: $a }) : null, ir = Hn && ae ? /* @__PURE__ */ t(Cl, { value: Wc, onChange: Ha }) : null, lr = Wn && ae ? /* @__PURE__ */ t(kl, { value: Vc, onChange: Wa, fill: Yc, onFillChange: Va, documentColors: Ot, imageColors: _t }) : null, dr = Vn && d ? /* @__PURE__ */ t(Tl, { value: zs, onChange: Lc, documentColors: Ot, imageColors: _t }) : null, ur = Yn && d ? /* @__PURE__ */ t(
6534
+ ) : null, or = Un && ae ? /* @__PURE__ */ t(bl, { value: Bc, onChange: Ua }) : null, ar = Bn && ae ? /* @__PURE__ */ t(yl, { value: $c, onChange: Ba }) : null, cr = $n && ae ? /* @__PURE__ */ t(vl, { value: jc, onChange: $a }) : null, rr = jn && ae ? /* @__PURE__ */ t(xl, { value: Hc, onChange: ja }) : null, ir = Hn && ae ? /* @__PURE__ */ t(Cl, { value: Wc, onChange: Ha }) : null, lr = Wn && ae ? /* @__PURE__ */ t(kl, { value: Vc, onChange: Wa, fill: Yc, onFillChange: Va, documentColors: Ot, imageColors: _t }) : null, dr = Vn && d ? /* @__PURE__ */ t(Tl, { value: zs, onChange: Lc, documentColors: Ot, imageColors: _t }) : null, ur = Yn && d ? /* @__PURE__ */ t(
6534
6535
  Nl,
6535
6536
  {
6536
6537
  mode: Gc,
@@ -6561,7 +6562,7 @@ const _o = ({ services: e, ...s }) => {
6561
6562
  ) : null, mr = Gn && d ? /* @__PURE__ */ t(
6562
6563
  Rl,
6563
6564
  {
6564
- blendMode: Yo(d.blendMode) ? d.blendMode : "normal",
6565
+ blendMode: Vo(d.blendMode) ? d.blendMode : "normal",
6565
6566
  onChange: Ec
6566
6567
  }
6567
6568
  ) : null, hr = Xn && d ? /* @__PURE__ */ t(
@@ -6572,7 +6573,7 @@ const _o = ({ services: e, ...s }) => {
6572
6573
  onTextureChange: xc,
6573
6574
  onOpacityChange: Cc
6574
6575
  }
6575
- ) : null, Ye = (vo = d == null ? void 0 : d.masks) == null ? void 0 : vo.find((r) => r.id === "quick-image-mask"), gr = Zn && d ? /* @__PURE__ */ t(
6576
+ ) : null, Ye = (vo = d == null ? void 0 : d.masks) == null ? void 0 : vo.find((r) => r.id === "quick-image-mask"), gr = Pn && d ? /* @__PURE__ */ t(
6576
6577
  Dl,
6577
6578
  {
6578
6579
  imageUrl: ((xo = Ye == null ? void 0 : Ye.maskElement) == null ? void 0 : xo.imageUrl) ?? "",
@@ -6657,8 +6658,8 @@ const _o = ({ services: e, ...s }) => {
6657
6658
  isFontSizePanelOpen: _n,
6658
6659
  isShapeCornerRadiusPanelOpen: Un,
6659
6660
  isShapeTransparencyPanelOpen: Bn,
6660
- isShapeSidesPanelOpen: jn,
6661
- isShapePointsPanelOpen: $n,
6661
+ isShapeSidesPanelOpen: $n,
6662
+ isShapePointsPanelOpen: jn,
6662
6663
  isShapeInnerRadiusPanelOpen: Hn,
6663
6664
  isShapeColorPanelOpen: Wn,
6664
6665
  isTextColorPanelOpen: Vn,
@@ -6667,8 +6668,8 @@ const _o = ({ services: e, ...s }) => {
6667
6668
  isBlendModePanelOpen: Gn,
6668
6669
  isKnockoutPanelOpen: Yn,
6669
6670
  isDistressTexturePanelOpen: Xn,
6670
- isImageMaskPanelOpen: Zn,
6671
- cornerRadiusPanel: Pc,
6671
+ isImageMaskPanelOpen: Pn,
6672
+ cornerRadiusPanel: Zc,
6672
6673
  cropPanelContent: Jc,
6673
6674
  rotationPanel: Qc,
6674
6675
  opacityPanel: er,
@@ -6686,7 +6687,7 @@ const _o = ({ services: e, ...s }) => {
6686
6687
  blendModePanel: mr,
6687
6688
  knockoutPanel: ur,
6688
6689
  distressTexturePanel: hr,
6689
- alignPanel: Zc,
6690
+ alignPanel: Pc,
6690
6691
  imageMaskPanel: gr
6691
6692
  }
6692
6693
  ) : null, xr = ut.width > 0 ? Math.max(ut.width, 200) : 280, Cr = e === "floating" && Fs && (d == null ? void 0 : d.transformType) === "image" && H ? /* @__PURE__ */ t(
@@ -6695,7 +6696,7 @@ const _o = ({ services: e, ...s }) => {
6695
6696
  toolbarPosition: H,
6696
6697
  toolbarHeight: ut.height || 56,
6697
6698
  panelWidth: xr,
6698
- value: Pn,
6699
+ value: Zn,
6699
6700
  onChange: xn
6700
6701
  }
6701
6702
  ) : null, wr = e === "floating" && Os && (d == null ? void 0 : d.transformType) === "image" && H ? /* @__PURE__ */ t(
@@ -6715,7 +6716,7 @@ const _o = ({ services: e, ...s }) => {
6715
6716
  }
6716
6717
  ) : null;
6717
6718
  return /* @__PURE__ */ p(Ve, { children: [
6718
- e === "floating" && typeof document < "u" ? jo(
6719
+ e === "floating" && typeof document < "u" ? $o(
6719
6720
  /* @__PURE__ */ p(Ve, { children: [
6720
6721
  An,
6721
6722
  Cr,
@@ -6766,7 +6767,7 @@ const _o = ({ services: e, ...s }) => {
6766
6767
  }
6767
6768
  )
6768
6769
  ] });
6769
- }, fd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6770
+ }, pd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6770
6771
  __proto__: null,
6771
6772
  ContextualToolbars: _o,
6772
6773
  default: _o
@@ -6776,7 +6777,7 @@ export {
6776
6777
  ka as B,
6777
6778
  _o as C,
6778
6779
  oa as D,
6779
- dd as E,
6780
+ ud as E,
6780
6781
  Bi as F,
6781
6782
  Ai as I,
6782
6783
  Wi as M,
@@ -6785,24 +6786,24 @@ export {
6785
6786
  Gi as T,
6786
6787
  qi as U,
6787
6788
  vs as a,
6788
- Pe as b,
6789
+ Ze as b,
6789
6790
  qe as c,
6790
6791
  Yi as d,
6791
6792
  Rt as e,
6792
6793
  Vi as f,
6793
6794
  Xi as g,
6794
6795
  Oi as h,
6795
- Zi as i,
6796
- Pi as j,
6797
- $i as k,
6796
+ Pi as i,
6797
+ Zi as j,
6798
+ ji as k,
6798
6799
  Ki as l,
6799
6800
  el as m,
6800
6801
  aa as n,
6801
6802
  mt as o,
6802
6803
  ca as p,
6803
6804
  ye as q,
6804
- ud as r,
6805
- fd as s,
6805
+ fd as r,
6806
+ pd as s,
6806
6807
  sl as u
6807
6808
  };
6808
- //# sourceMappingURL=ContextualToolbars-5tHC6s0Y.js.map
6809
+ //# sourceMappingURL=ContextualToolbars-Dmo86Wd2.js.map