@mypixia/simplex-designer 2.0.7 → 2.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,8 +1,8 @@
1
- import Qe, { useState as N, useRef as gt, useEffect as rt, useMemo as ie, forwardRef as $e, useCallback as at, useReducer as He, useImperativeHandle as Ge } from "react";
2
- import _e from "qrcode";
3
- import Ye from "react-barcode";
1
+ import $e, { useState as N, useRef as gt, useEffect as rt, useMemo as ie, forwardRef as He, useCallback as at, useReducer as Ge, useImperativeHandle as _e } from "react";
2
+ import Ye from "qrcode";
3
+ import qe from "react-barcode";
4
4
  import oe from "axios";
5
- import './index_external.css';var Et = { exports: {} }, jt = {};
5
+ import './index_external.css';var Et = { exports: {} }, Tt = {};
6
6
  /**
7
7
  * @license React
8
8
  * react-jsx-runtime.production.js
@@ -13,8 +13,8 @@ import './index_external.css';var Et = { exports: {} }, jt = {};
13
13
  * LICENSE file in the root directory of this source tree.
14
14
  */
15
15
  var re;
16
- function qe() {
17
- if (re) return jt;
16
+ function Ve() {
17
+ if (re) return Tt;
18
18
  re = 1;
19
19
  var f = Symbol.for("react.transitional.element"), o = Symbol.for("react.fragment");
20
20
  function a(l, s, g) {
@@ -32,9 +32,9 @@ function qe() {
32
32
  props: g
33
33
  };
34
34
  }
35
- return jt.Fragment = o, jt.jsx = a, jt.jsxs = a, jt;
35
+ return Tt.Fragment = o, Tt.jsx = a, Tt.jsxs = a, Tt;
36
36
  }
37
- var Tt = {};
37
+ var jt = {};
38
38
  /**
39
39
  * @license React
40
40
  * react-jsx-runtime.development.js
@@ -45,12 +45,12 @@ var Tt = {};
45
45
  * LICENSE file in the root directory of this source tree.
46
46
  */
47
47
  var ae;
48
- function Ve() {
48
+ function Xe() {
49
49
  return ae || (ae = 1, process.env.NODE_ENV !== "production" && function() {
50
50
  function f(y) {
51
51
  if (y == null) return null;
52
52
  if (typeof y == "function")
53
- return y.$$typeof === _ ? null : y.displayName || y.name || null;
53
+ return y.$$typeof === G ? null : y.displayName || y.name || null;
54
54
  if (typeof y == "string") return y;
55
55
  switch (y) {
56
56
  case p:
@@ -102,11 +102,11 @@ function Ve() {
102
102
  }
103
103
  if (D) {
104
104
  D = console;
105
- var L = D.error, H = typeof Symbol == "function" && Symbol.toStringTag && y[Symbol.toStringTag] || y.constructor.name || "Object";
105
+ var L = D.error, $ = typeof Symbol == "function" && Symbol.toStringTag && y[Symbol.toStringTag] || y.constructor.name || "Object";
106
106
  return L.call(
107
107
  D,
108
108
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
109
- H
109
+ $
110
110
  ), o(y);
111
111
  }
112
112
  }
@@ -153,13 +153,13 @@ function Ve() {
153
153
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
154
154
  )), y = this.props.ref, y !== void 0 ? y : null;
155
155
  }
156
- function F(y, D, L, H, G, it, J, q) {
156
+ function C(y, D, L, $, _, it, J, q) {
157
157
  return L = it.ref, y = {
158
158
  $$typeof: B,
159
159
  type: y,
160
160
  key: D,
161
161
  props: it,
162
- _owner: G
162
+ _owner: _
163
163
  }, (L !== void 0 ? L : null) !== null ? Object.defineProperty(y, "ref", {
164
164
  enumerable: !1,
165
165
  get: c
@@ -185,13 +185,13 @@ function Ve() {
185
185
  value: q
186
186
  }), Object.freeze && (Object.freeze(y.props), Object.freeze(y)), y;
187
187
  }
188
- function I(y, D, L, H, G, it, J, q) {
188
+ function I(y, D, L, $, _, it, J, q) {
189
189
  var U = D.children;
190
190
  if (U !== void 0)
191
- if (H)
191
+ if ($)
192
192
  if (nt(U)) {
193
- for (H = 0; H < U.length; H++)
194
- E(U[H]);
193
+ for ($ = 0; $ < U.length; $++)
194
+ E(U[$]);
195
195
  Object.freeze && Object.freeze(U);
196
196
  } else
197
197
  console.error(
@@ -203,18 +203,18 @@ function Ve() {
203
203
  var K = Object.keys(D).filter(function(pt) {
204
204
  return pt !== "key";
205
205
  });
206
- H = 0 < K.length ? "{key: someKey, " + K.join(": ..., ") + ": ...}" : "{key: someKey}", et[U + H] || (K = 0 < K.length ? "{" + K.join(": ..., ") + ": ...}" : "{}", console.error(
206
+ $ = 0 < K.length ? "{key: someKey, " + K.join(": ..., ") + ": ...}" : "{key: someKey}", et[U + $] || (K = 0 < K.length ? "{" + K.join(": ..., ") + ": ...}" : "{}", console.error(
207
207
  `A props object containing a "key" prop is being spread into JSX:
208
208
  let props = %s;
209
209
  <%s {...props} />
210
210
  React keys must be passed directly to JSX without using spread:
211
211
  let props = %s;
212
212
  <%s key={someKey} {...props} />`,
213
- H,
213
+ $,
214
214
  U,
215
215
  K,
216
216
  U
217
- ), et[U + H] = !0);
217
+ ), et[U + $] = !0);
218
218
  }
219
219
  if (U = null, L !== void 0 && (a(L), U = "" + L), h(D) && (a(D.key), U = "" + D.key), "key" in D) {
220
220
  L = {};
@@ -224,11 +224,11 @@ React keys must be passed directly to JSX without using spread:
224
224
  return U && n(
225
225
  L,
226
226
  typeof y == "function" ? y.displayName || y.name || "Unknown" : y
227
- ), F(
227
+ ), C(
228
228
  y,
229
229
  U,
230
230
  it,
231
- G,
231
+ _,
232
232
  s(),
233
233
  L,
234
234
  J,
@@ -238,50 +238,50 @@ React keys must be passed directly to JSX without using spread:
238
238
  function E(y) {
239
239
  typeof y == "object" && y !== null && y.$$typeof === B && y._store && (y._store.validated = 1);
240
240
  }
241
- var m = Qe, B = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), X = Symbol.for("react.profiler"), T = Symbol.for("react.consumer"), O = Symbol.for("react.context"), k = Symbol.for("react.forward_ref"), Z = Symbol.for("react.suspense"), W = Symbol.for("react.suspense_list"), xt = Symbol.for("react.memo"), Q = Symbol.for("react.lazy"), ft = Symbol.for("react.activity"), _ = Symbol.for("react.client.reference"), st = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, M = Object.prototype.hasOwnProperty, nt = Array.isArray, tt = console.createTask ? console.createTask : function() {
241
+ var u = $e, B = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), X = Symbol.for("react.profiler"), T = Symbol.for("react.consumer"), O = Symbol.for("react.context"), k = Symbol.for("react.forward_ref"), Z = Symbol.for("react.suspense"), W = Symbol.for("react.suspense_list"), xt = Symbol.for("react.memo"), Q = Symbol.for("react.lazy"), ft = Symbol.for("react.activity"), G = Symbol.for("react.client.reference"), st = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, M = Object.prototype.hasOwnProperty, nt = Array.isArray, tt = console.createTask ? console.createTask : function() {
242
242
  return null;
243
243
  };
244
- m = {
244
+ u = {
245
245
  "react-stack-bottom-frame": function(y) {
246
246
  return y();
247
247
  }
248
248
  };
249
- var ct, Y = {}, P = m["react-stack-bottom-frame"].bind(
250
- m,
249
+ var ct, Y = {}, P = u["react-stack-bottom-frame"].bind(
250
+ u,
251
251
  g
252
- )(), C = tt(l(g)), et = {};
253
- Tt.Fragment = p, Tt.jsx = function(y, D, L, H, G) {
252
+ )(), F = tt(l(g)), et = {};
253
+ jt.Fragment = p, jt.jsx = function(y, D, L, $, _) {
254
254
  var it = 1e4 > st.recentlyCreatedOwnerStacks++;
255
255
  return I(
256
256
  y,
257
257
  D,
258
258
  L,
259
259
  !1,
260
- H,
261
- G,
260
+ $,
261
+ _,
262
262
  it ? Error("react-stack-top-frame") : P,
263
- it ? tt(l(y)) : C
263
+ it ? tt(l(y)) : F
264
264
  );
265
- }, Tt.jsxs = function(y, D, L, H, G) {
265
+ }, jt.jsxs = function(y, D, L, $, _) {
266
266
  var it = 1e4 > st.recentlyCreatedOwnerStacks++;
267
267
  return I(
268
268
  y,
269
269
  D,
270
270
  L,
271
271
  !0,
272
- H,
273
- G,
272
+ $,
273
+ _,
274
274
  it ? Error("react-stack-top-frame") : P,
275
- it ? tt(l(y)) : C
275
+ it ? tt(l(y)) : F
276
276
  );
277
277
  };
278
- }()), Tt;
278
+ }()), jt;
279
279
  }
280
280
  var se;
281
- function Xe() {
282
- return se || (se = 1, process.env.NODE_ENV === "production" ? Et.exports = qe() : Et.exports = Ve()), Et.exports;
281
+ function Je() {
282
+ return se || (se = 1, process.env.NODE_ENV === "production" ? Et.exports = Ve() : Et.exports = Xe()), Et.exports;
283
283
  }
284
- var i = Xe();
284
+ var i = Je();
285
285
  const Ut = {
286
286
  business: {
287
287
  name: "Business & Office",
@@ -378,25 +378,25 @@ const Ut = {
378
378
  ...o,
379
379
  category: f.name
380
380
  }))
381
- ), Je = (f) => ne().filter(
381
+ ), Ke = (f) => ne().filter(
382
382
  (a) => a.name.toLowerCase().includes(f.toLowerCase()) || a.category.toLowerCase().includes(f.toLowerCase())
383
- ), Ke = ({ onSelectIcon: f, disabled: o = !1 }) => {
383
+ ), Ze = ({ onSelectIcon: f, disabled: o = !1 }) => {
384
384
  const [a, l] = N(!1), [s, g] = N(""), [h, n] = N("all"), c = gt(null);
385
385
  rt(() => {
386
- const m = (B) => {
386
+ const u = (B) => {
387
387
  c.current && !c.current.contains(B.target) && l(!1);
388
388
  };
389
- return document.addEventListener("mousedown", m), () => document.removeEventListener("mousedown", m);
389
+ return document.addEventListener("mousedown", u), () => document.removeEventListener("mousedown", u);
390
390
  }, []);
391
- const F = (m) => {
392
- f(m), l(!1), g("");
391
+ const C = (u) => {
392
+ f(u), l(!1), g("");
393
393
  }, E = (() => {
394
- let m = ne();
395
- if (s.trim() && (m = Je(s)), h !== "all") {
394
+ let u = ne();
395
+ if (s.trim() && (u = Ke(s)), h !== "all") {
396
396
  const B = Ut[h];
397
- B && (m = m.filter((j) => j.category === B.name));
397
+ B && (u = u.filter((j) => j.category === B.name));
398
398
  }
399
- return m;
399
+ return u;
400
400
  })();
401
401
  return /* @__PURE__ */ i.jsxs("div", { className: "icon-selector", ref: c, children: [
402
402
  /* @__PURE__ */ i.jsxs(
@@ -421,7 +421,7 @@ const Ut = {
421
421
  type: "text",
422
422
  placeholder: "Search icons...",
423
423
  value: s,
424
- onChange: (m) => g(m.target.value),
424
+ onChange: (u) => g(u.target.value),
425
425
  className: "icon-search"
426
426
  }
427
427
  ),
@@ -429,27 +429,27 @@ const Ut = {
429
429
  "select",
430
430
  {
431
431
  value: h,
432
- onChange: (m) => n(m.target.value),
432
+ onChange: (u) => n(u.target.value),
433
433
  className: "category-select",
434
434
  children: [
435
435
  /* @__PURE__ */ i.jsx("option", { value: "all", children: "All Categories" }),
436
- Object.entries(Ut).map(([m, B]) => /* @__PURE__ */ i.jsx("option", { value: m, children: B.name }, m))
436
+ Object.entries(Ut).map(([u, B]) => /* @__PURE__ */ i.jsx("option", { value: u, children: B.name }, u))
437
437
  ]
438
438
  }
439
439
  )
440
440
  ] }),
441
- /* @__PURE__ */ i.jsx("div", { className: "icon-grid", children: E.length === 0 ? /* @__PURE__ */ i.jsx("div", { className: "no-icons", children: s ? "No icons found" : "No icons in this category" }) : E.map((m, B) => /* @__PURE__ */ i.jsxs(
441
+ /* @__PURE__ */ i.jsx("div", { className: "icon-grid", children: E.length === 0 ? /* @__PURE__ */ i.jsx("div", { className: "no-icons", children: s ? "No icons found" : "No icons in this category" }) : E.map((u, B) => /* @__PURE__ */ i.jsxs(
442
442
  "button",
443
443
  {
444
444
  className: "icon-item",
445
- onClick: () => F(m),
446
- title: `${m.name} (${m.category})`,
445
+ onClick: () => C(u),
446
+ title: `${u.name} (${u.category})`,
447
447
  children: [
448
- /* @__PURE__ */ i.jsx("span", { className: "icon-symbol", children: m.symbol }),
449
- /* @__PURE__ */ i.jsx("span", { className: "icon-name", children: m.name })
448
+ /* @__PURE__ */ i.jsx("span", { className: "icon-symbol", children: u.symbol }),
449
+ /* @__PURE__ */ i.jsx("span", { className: "icon-name", children: u.name })
450
450
  ]
451
451
  },
452
- `${m.name}-${B}`
452
+ `${u.name}-${B}`
453
453
  )) }),
454
454
  /* @__PURE__ */ i.jsx("div", { className: "icon-dropdown-footer", children: /* @__PURE__ */ i.jsxs("span", { className: "icon-count", children: [
455
455
  E.length,
@@ -458,8 +458,8 @@ const Ut = {
458
458
  ] }) })
459
459
  ] })
460
460
  ] });
461
- }, Ze = ({ isOpen: f, onClose: o, onAddQRCode: a, theme: l }) => {
462
- const [s, g] = N(""), [h, n] = N(""), [c, F] = N(200), [I, E] = N("M"), m = () => {
461
+ }, ti = ({ isOpen: f, onClose: o, onAddQRCode: a, theme: l }) => {
462
+ const [s, g] = N(""), [h, n] = N(""), [c, C] = N(200), [I, E] = N("M"), u = () => {
463
463
  if (!s.trim()) return;
464
464
  const p = {
465
465
  width: c,
@@ -472,7 +472,7 @@ const Ut = {
472
472
  light: "#FFFFFF"
473
473
  }
474
474
  };
475
- _e.toDataURL(s, p, (v, X) => {
475
+ Ye.toDataURL(s, p, (v, X) => {
476
476
  if (v) {
477
477
  console.error("QR Code generation error:", v);
478
478
  return;
@@ -534,7 +534,7 @@ const Ut = {
534
534
  type: "number",
535
535
  id: "qr-size",
536
536
  value: c,
537
- onChange: (p) => F(Math.max(50, Math.min(500, parseInt(p.target.value) || 200))),
537
+ onChange: (p) => C(Math.max(50, Math.min(500, parseInt(p.target.value) || 200))),
538
538
  min: "50",
539
539
  max: "500"
540
540
  }
@@ -562,7 +562,7 @@ const Ut = {
562
562
  "button",
563
563
  {
564
564
  className: "qr-btn qr-btn-generate",
565
- onClick: m,
565
+ onClick: u,
566
566
  disabled: !s.trim(),
567
567
  children: "Generate QR Code"
568
568
  }
@@ -585,8 +585,8 @@ const Ut = {
585
585
  ] })
586
586
  ] })
587
587
  ] }) }) : null;
588
- }, ti = ({ isOpen: f, onClose: o, onAddBarcode: a, theme: l }) => {
589
- const [s, g] = N(""), [h, n] = N("CODE128"), [c, F] = N(null), [I, E] = N(2), [m, B] = N(100), [j, p] = N(20), [v, X] = N("center"), [T, O] = N("bottom"), [k, Z] = N(10), W = gt(null), xt = [
588
+ }, ei = ({ isOpen: f, onClose: o, onAddBarcode: a, theme: l }) => {
589
+ const [s, g] = N(""), [h, n] = N("CODE128"), [c, C] = N(null), [I, E] = N(2), [u, B] = N(100), [j, p] = N(20), [v, X] = N("center"), [T, O] = N("bottom"), [k, Z] = N(10), W = gt(null), xt = [
590
590
  { value: "CODE128", label: "CODE128 (Most Common)" },
591
591
  { value: "EAN13", label: "EAN-13 (European Article Number)" },
592
592
  { value: "EAN8", label: "EAN-8 (Short EAN)" },
@@ -599,13 +599,13 @@ const Ut = {
599
599
  ], Q = () => {
600
600
  if (s.trim())
601
601
  try {
602
- F(/* @__PURE__ */ i.jsx(
603
- Ye,
602
+ C(/* @__PURE__ */ i.jsx(
603
+ qe,
604
604
  {
605
605
  value: s,
606
606
  format: h,
607
607
  width: I,
608
- height: m,
608
+ height: u,
609
609
  fontSize: j,
610
610
  textAlign: v,
611
611
  textPosition: T,
@@ -626,11 +626,11 @@ const Ut = {
626
626
  console.error("No SVG element found in barcode");
627
627
  return;
628
628
  }
629
- const P = document.createElement("canvas"), C = P.getContext("2d"), et = Y.getBoundingClientRect(), y = ((nt = (M = Y.width) == null ? void 0 : M.baseVal) == null ? void 0 : nt.value) || et.width || 200, D = ((ct = (tt = Y.height) == null ? void 0 : tt.baseVal) == null ? void 0 : ct.value) || et.height || 100;
629
+ const P = document.createElement("canvas"), F = P.getContext("2d"), et = Y.getBoundingClientRect(), y = ((nt = (M = Y.width) == null ? void 0 : M.baseVal) == null ? void 0 : nt.value) || et.width || 200, D = ((ct = (tt = Y.height) == null ? void 0 : tt.baseVal) == null ? void 0 : ct.value) || et.height || 100;
630
630
  P.width = y, P.height = D;
631
- const L = new XMLSerializer().serializeToString(Y), H = new Blob([L], { type: "image/svg+xml;charset=utf-8" }), G = URL.createObjectURL(H), it = new Image();
631
+ const L = new XMLSerializer().serializeToString(Y), $ = new Blob([L], { type: "image/svg+xml;charset=utf-8" }), _ = URL.createObjectURL($), it = new Image();
632
632
  it.onload = () => {
633
- C.drawImage(it, 0, 0);
633
+ F.drawImage(it, 0, 0);
634
634
  const J = P.toDataURL("image/png"), q = new Image();
635
635
  q.onload = () => {
636
636
  a({
@@ -643,14 +643,14 @@ const Ut = {
643
643
  x: 100,
644
644
  y: 100,
645
645
  imageObject: q
646
- }), _();
647
- }, q.src = J, URL.revokeObjectURL(G);
648
- }, it.src = G;
646
+ }), G();
647
+ }, q.src = J, URL.revokeObjectURL(_);
648
+ }, it.src = _;
649
649
  } catch (Y) {
650
650
  console.error("Error adding barcode to canvas:", Y), alert("Failed to add barcode to canvas. Please try again.");
651
651
  }
652
- }, _ = () => {
653
- g(""), F(null), n("CODE128"), E(2), B(100), p(20), o();
652
+ }, G = () => {
653
+ g(""), C(null), n("CODE128"), E(2), B(100), p(20), o();
654
654
  }, st = (M) => ({
655
655
  CODE128: "Supports all ASCII characters. Most versatile format.",
656
656
  EAN13: "Requires exactly 12 digits (13th is checksum). Used for retail products.",
@@ -662,14 +662,14 @@ const Ut = {
662
662
  pharmacode: "Numbers 3-131070. Used in pharmaceutical industry.",
663
663
  codabar: "Supports 0-9, A-D, and symbols. Used in libraries."
664
664
  })[M] || "";
665
- return f ? /* @__PURE__ */ i.jsx("div", { className: "barcode-modal-overlay", onClick: _, children: /* @__PURE__ */ i.jsxs("div", { className: "barcode-modal-content", onClick: (M) => M.stopPropagation(), children: [
665
+ return f ? /* @__PURE__ */ i.jsx("div", { className: "barcode-modal-overlay", onClick: G, children: /* @__PURE__ */ i.jsxs("div", { className: "barcode-modal-content", onClick: (M) => M.stopPropagation(), children: [
666
666
  /* @__PURE__ */ i.jsxs("div", { className: "barcode-modal-header", children: [
667
667
  /* @__PURE__ */ i.jsx("h3", { children: "Generate Barcode" }),
668
668
  /* @__PURE__ */ i.jsx(
669
669
  "button",
670
670
  {
671
671
  className: "barcode-modal-close",
672
- onClick: _,
672
+ onClick: G,
673
673
  "aria-label": "Close",
674
674
  children: "×"
675
675
  }
@@ -731,12 +731,12 @@ const Ut = {
731
731
  id: "barcode-height",
732
732
  min: "50",
733
733
  max: "200",
734
- value: m,
734
+ value: u,
735
735
  onChange: (M) => B(parseInt(M.target.value))
736
736
  }
737
737
  ),
738
738
  /* @__PURE__ */ i.jsxs("span", { className: "range-value", children: [
739
- m,
739
+ u,
740
740
  "px"
741
741
  ] })
742
742
  ] }),
@@ -801,7 +801,7 @@ const Ut = {
801
801
  ] })
802
802
  ] })
803
803
  ] }) }) : null;
804
- }, ei = ({ theme: f }) => /* @__PURE__ */ i.jsxs("div", { className: "premium-feature-container", style: {
804
+ }, ii = ({ theme: f }) => /* @__PURE__ */ i.jsxs("div", { className: "premium-feature-container", style: {
805
805
  padding: "20px",
806
806
  backgroundColor: "#f8f9fa",
807
807
  borderRadius: "8px",
@@ -864,8 +864,8 @@ const Ut = {
864
864
  100% { transform: rotate(360deg); }
865
865
  }
866
866
  ` })
867
- ] }), ii = ({ isOpen: f, onClose: o, onAddSticker: a, theme: l, apiKey: s, apiEndpoint: g }) => {
868
- const [h, n] = N([]), [c, F] = N(!1), [I, E] = N(null), [m, B] = N(""), [j, p] = N(""), [v, X] = N({});
867
+ ] }), oi = ({ isOpen: f, onClose: o, onAddSticker: a, theme: l, apiKey: s, apiEndpoint: g }) => {
868
+ const [h, n] = N([]), [c, C] = N(!1), [I, E] = N(null), [u, B] = N(""), [j, p] = N(""), [v, X] = N({});
869
869
  gt(null);
870
870
  const [T, O] = N(!1), [k, Z] = N(!1), [W, xt] = N(!1), Q = `${g}/api/v1/designer`;
871
871
  rt(() => {
@@ -873,8 +873,8 @@ const Ut = {
873
873
  }, [f, s]);
874
874
  const ft = async () => {
875
875
  const P = sessionStorage.getItem("apc_x_sub_status");
876
- P === "active" ? (O(!0), Z(!0), st()) : P === "inactive" ? (O(!1), Z(!0)) : (xt(!0), await _());
877
- }, _ = async () => {
876
+ P === "active" ? (O(!0), Z(!0), st()) : P === "inactive" ? (O(!1), Z(!0)) : (xt(!0), await G());
877
+ }, G = async () => {
878
878
  if (!s) {
879
879
  O(!1), Z(!0), xt(!1);
880
880
  return;
@@ -882,8 +882,8 @@ const Ut = {
882
882
  const P = `${Q}/get-subscription-status/${s}`;
883
883
  try {
884
884
  (await oe.get(P)).data.object === "active" ? (sessionStorage.setItem("apc_x_sub_status", "active"), O(!0), st()) : (sessionStorage.setItem("apc_x_sub_status", "inactive"), O(!1));
885
- } catch (C) {
886
- console.error("Subscription check failed:", C), sessionStorage.setItem("apc_x_sub_status", "inactive"), O(!1);
885
+ } catch (F) {
886
+ console.error("Subscription check failed:", F), sessionStorage.setItem("apc_x_sub_status", "inactive"), O(!1);
887
887
  } finally {
888
888
  xt(!1), Z(!0);
889
889
  }
@@ -891,51 +891,51 @@ const Ut = {
891
891
  const P = sessionStorage.getItem("apc_stickers");
892
892
  if (P)
893
893
  try {
894
- const C = JSON.parse(P);
895
- n(C);
894
+ const F = JSON.parse(P);
895
+ n(F);
896
896
  return;
897
897
  } catch {
898
898
  console.warn("Failed to parse cached stickers, fetching fresh data");
899
899
  }
900
- F(!0), E(null);
900
+ C(!0), E(null);
901
901
  try {
902
- const C = await oe.get(`${Q}/get-stickers`);
903
- if (C.data && C.data.object && C.data.object.contents) {
904
- const et = C.data.object.contents;
902
+ const F = await oe.get(`${Q}/get-stickers`);
903
+ if (F.data && F.data.object && F.data.object.contents) {
904
+ const et = F.data.object.contents;
905
905
  n(et), sessionStorage.setItem("apc_stickers", JSON.stringify(et));
906
906
  } else
907
907
  throw new Error("Invalid response format");
908
- } catch (C) {
909
- console.error("Error fetching stickers:", C), E("Failed to load stickers. Please try again.");
908
+ } catch (F) {
909
+ console.error("Error fetching stickers:", F), E("Failed to load stickers. Please try again.");
910
910
  } finally {
911
- F(!1);
911
+ C(!1);
912
912
  }
913
- }, M = (P, C) => {
913
+ }, M = (P, F) => {
914
914
  a({
915
915
  type: "sticker",
916
916
  src: P,
917
- name: C,
917
+ name: F,
918
918
  width: 100,
919
919
  height: 100,
920
920
  x: 100,
921
921
  y: 100
922
922
  }), o();
923
923
  }, nt = (P) => {
924
- X((C) => ({
925
- ...C,
926
- [P]: !C[P]
924
+ X((F) => ({
925
+ ...F,
926
+ [P]: !F[P]
927
927
  }));
928
928
  }, tt = (P) => {
929
- const C = {};
929
+ const F = {};
930
930
  return P.forEach((et) => {
931
931
  const y = et.name.split("/");
932
- let D = C;
933
- y.forEach((L, H) => {
934
- D[L] || (D[L] = H === y.length - 1 ? et : {}), D = D[L];
932
+ let D = F;
933
+ y.forEach((L, $) => {
934
+ D[L] || (D[L] = $ === y.length - 1 ? et : {}), D = D[L];
935
935
  });
936
- }), C;
937
- }, ct = (P, C = "", et = 0) => /* @__PURE__ */ i.jsx("div", { className: "sticker-tree-level", style: { paddingLeft: `${et * 15}px` }, children: Object.keys(P).map((y) => {
938
- const D = `${C}/${y}`, L = v[D];
936
+ }), F;
937
+ }, ct = (P, F = "", et = 0) => /* @__PURE__ */ i.jsx("div", { className: "sticker-tree-level", style: { paddingLeft: `${et * 15}px` }, children: Object.keys(P).map((y) => {
938
+ const D = `${F}/${y}`, L = v[D];
939
939
  return P[y].type === "image" ? !j || y.toLowerCase().includes(j.toLowerCase()) ? /* @__PURE__ */ i.jsx(
940
940
  "div",
941
941
  {
@@ -947,8 +947,8 @@ const Ut = {
947
947
  src: P[y].url,
948
948
  alt: y,
949
949
  loading: "lazy",
950
- onError: (G) => {
951
- G.target.style.display = "none";
950
+ onError: (_) => {
951
+ _.target.style.display = "none";
952
952
  }
953
953
  }
954
954
  ) })
@@ -986,7 +986,7 @@ const Ut = {
986
986
  ] }),
987
987
  /* @__PURE__ */ i.jsxs("div", { className: "sticker-modal-body", children: [
988
988
  W && /* @__PURE__ */ i.jsx(le, {}),
989
- !T && !W && k && /* @__PURE__ */ i.jsx(ei, { theme: l }),
989
+ !T && !W && k && /* @__PURE__ */ i.jsx(ii, { theme: l }),
990
990
  T && k && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
991
991
  /* @__PURE__ */ i.jsx("div", { className: "sticker-modal-controls", children: /* @__PURE__ */ i.jsx("div", { className: "search-container", children: /* @__PURE__ */ i.jsx(
992
992
  "input",
@@ -1007,7 +1007,7 @@ const Ut = {
1007
1007
  ] })
1008
1008
  ] })
1009
1009
  ] }) }) : null;
1010
- }, oi = [
1010
+ }, ri = [
1011
1011
  // FLORAL DESIGNS (40 items)
1012
1012
  {
1013
1013
  id: 1,
@@ -2559,10 +2559,10 @@ const Ut = {
2559
2559
  category: "Geometric",
2560
2560
  description: "Complex mandala flower pattern"
2561
2561
  }
2562
- ], ri = ({ isOpen: f, onClose: o, onAddEmbroidery: a, theme: l, apiKey: s, apiEndpoint: g }) => {
2563
- const [h, n] = N([]), [c, F] = N(!1), [I, E] = N(null), [m, B] = N(""), [j, p] = N("All"), v = gt(null), X = ["All", "Floral", "Nature", "Geometric", "Traditional", "Sports", "Hobbies", "Food", "Symbols", "Holiday", "Text"];
2562
+ ], ai = ({ isOpen: f, onClose: o, onAddEmbroidery: a, theme: l, apiKey: s, apiEndpoint: g }) => {
2563
+ const [h, n] = N([]), [c, C] = N(!1), [I, E] = N(null), [u, B] = N(""), [j, p] = N("All"), v = gt(null), X = ["All", "Floral", "Nature", "Geometric", "Traditional", "Sports", "Hobbies", "Food", "Symbols", "Holiday", "Text"];
2564
2564
  rt(() => {
2565
- f && n(oi);
2565
+ f && n(ri);
2566
2566
  }, [f]);
2567
2567
  const T = (k) => {
2568
2568
  a({
@@ -2577,7 +2577,7 @@ const Ut = {
2577
2577
  y: 100
2578
2578
  }), o();
2579
2579
  }, O = h.filter((k) => {
2580
- const Z = !m || k.name.toLowerCase().includes(m.toLowerCase()) || k.description.toLowerCase().includes(m.toLowerCase()), W = j === "All" || k.category === j;
2580
+ const Z = !u || k.name.toLowerCase().includes(u.toLowerCase()) || k.description.toLowerCase().includes(u.toLowerCase()), W = j === "All" || k.category === j;
2581
2581
  return Z && W;
2582
2582
  });
2583
2583
  return f ? /* @__PURE__ */ i.jsx("div", { className: "embroidery-modal-overlay", onClick: o, children: /* @__PURE__ */ i.jsxs(
@@ -2605,7 +2605,7 @@ const Ut = {
2605
2605
  {
2606
2606
  type: "text",
2607
2607
  placeholder: "Search embroidery designs...",
2608
- value: m,
2608
+ value: u,
2609
2609
  onChange: (k) => B(k.target.value),
2610
2610
  className: "embroidery-search"
2611
2611
  }
@@ -4601,19 +4601,19 @@ const Ut = {
4601
4601
  fill: "#8B0000",
4602
4602
  textAlign: "center"
4603
4603
  }
4604
- ], ai = ({ isOpen: f, onClose: o, onAddText: a, theme: l }) => {
4604
+ ], si = ({ isOpen: f, onClose: o, onAddText: a, theme: l }) => {
4605
4605
  const [s, g] = N(""), [h, n] = N("All"), c = ie(() => {
4606
- const m = Nt.reduce((B, j) => (B[j.category] = (B[j.category] || 0) + 1, B), {});
4606
+ const u = Nt.reduce((B, j) => (B[j.category] = (B[j.category] || 0) + 1, B), {});
4607
4607
  return [
4608
4608
  { name: "All", count: Nt.length },
4609
- ...Object.entries(m).map(([B, j]) => ({ name: B, count: j }))
4609
+ ...Object.entries(u).map(([B, j]) => ({ name: B, count: j }))
4610
4610
  ];
4611
- }, [Nt]), F = ie(() => Nt.filter((m) => {
4612
- const B = !s || m.text.toLowerCase().includes(s.toLowerCase()) || m.category.toLowerCase().includes(s.toLowerCase()), j = h === "All" || m.category === h;
4611
+ }, [Nt]), C = ie(() => Nt.filter((u) => {
4612
+ const B = !s || u.text.toLowerCase().includes(s.toLowerCase()) || u.category.toLowerCase().includes(s.toLowerCase()), j = h === "All" || u.category === h;
4613
4613
  return B && j;
4614
- }), [Nt, s, h]), I = (m) => {
4614
+ }), [Nt, s, h]), I = (u) => {
4615
4615
  const B = {
4616
- ...m,
4616
+ ...u,
4617
4617
  x: 100,
4618
4618
  y: 100
4619
4619
  };
@@ -4628,7 +4628,7 @@ const Ut = {
4628
4628
  y: 100
4629
4629
  }), o();
4630
4630
  };
4631
- return f ? /* @__PURE__ */ i.jsx("div", { className: "text-templates-modal-overlay", onClick: o, children: /* @__PURE__ */ i.jsxs("div", { className: "text-templates-modal", onClick: (m) => m.stopPropagation(), children: [
4631
+ return f ? /* @__PURE__ */ i.jsx("div", { className: "text-templates-modal-overlay", onClick: o, children: /* @__PURE__ */ i.jsxs("div", { className: "text-templates-modal", onClick: (u) => u.stopPropagation(), children: [
4632
4632
  /* @__PURE__ */ i.jsxs("div", { className: "modal-header", children: [
4633
4633
  /* @__PURE__ */ i.jsx("h2", { children: "Text Templates" }),
4634
4634
  /* @__PURE__ */ i.jsx("button", { className: "close-btn", onClick: o, "aria-label": "Close", children: "×" })
@@ -4640,25 +4640,25 @@ const Ut = {
4640
4640
  type: "text",
4641
4641
  placeholder: "Search templates...",
4642
4642
  value: s,
4643
- onChange: (m) => g(m.target.value),
4643
+ onChange: (u) => g(u.target.value),
4644
4644
  className: "search-input"
4645
4645
  }
4646
4646
  ) }),
4647
- /* @__PURE__ */ i.jsx("div", { className: "category-tabs", children: c.map((m) => /* @__PURE__ */ i.jsxs(
4647
+ /* @__PURE__ */ i.jsx("div", { className: "category-tabs", children: c.map((u) => /* @__PURE__ */ i.jsxs(
4648
4648
  "button",
4649
4649
  {
4650
- className: `category-tab ${h === m.name ? "active" : ""}`,
4651
- onClick: () => n(m.name),
4650
+ className: `category-tab ${h === u.name ? "active" : ""}`,
4651
+ onClick: () => n(u.name),
4652
4652
  children: [
4653
- m.name,
4653
+ u.name,
4654
4654
  /* @__PURE__ */ i.jsxs("span", { className: "count", children: [
4655
4655
  "(",
4656
- m.count,
4656
+ u.count,
4657
4657
  ")"
4658
4658
  ] })
4659
4659
  ]
4660
4660
  },
4661
- m.name
4661
+ u.name
4662
4662
  )) })
4663
4663
  ] }),
4664
4664
  /* @__PURE__ */ i.jsxs("div", { className: "templates-grid", children: [
@@ -4666,48 +4666,48 @@ const Ut = {
4666
4666
  /* @__PURE__ */ i.jsx("div", { className: "custom-icon", children: "✏️" }),
4667
4667
  /* @__PURE__ */ i.jsx("div", { className: "custom-label", children: "Create Custom Text" })
4668
4668
  ] }) }),
4669
- F.map((m) => /* @__PURE__ */ i.jsxs(
4669
+ C.map((u) => /* @__PURE__ */ i.jsxs(
4670
4670
  "div",
4671
4671
  {
4672
4672
  className: "template-item",
4673
- onClick: () => I(m),
4673
+ onClick: () => I(u),
4674
4674
  children: [
4675
4675
  /* @__PURE__ */ i.jsx(
4676
4676
  "div",
4677
4677
  {
4678
4678
  className: "template-preview",
4679
4679
  style: {
4680
- fontFamily: m.fontFamily,
4681
- fontSize: `${Math.min(m.fontSize * 0.6, 18)}px`,
4682
- fontWeight: m.fontWeight,
4683
- fontStyle: m.fontStyle,
4684
- color: m.fill,
4685
- backgroundColor: m.hasBackground ? m.backgroundColor : "transparent",
4686
- textAlign: m.textAlign || "left",
4687
- textTransform: m.textTransform || "none",
4688
- letterSpacing: m.letterSpacing ? `${m.letterSpacing}px` : "normal",
4689
- textShadow: m.hasTextShadow ? `${m.textShadowX}px ${m.textShadowY}px ${m.textShadowBlur}px ${m.textShadowColor}` : "none"
4680
+ fontFamily: u.fontFamily,
4681
+ fontSize: `${Math.min(u.fontSize * 0.6, 18)}px`,
4682
+ fontWeight: u.fontWeight,
4683
+ fontStyle: u.fontStyle,
4684
+ color: u.fill,
4685
+ backgroundColor: u.hasBackground ? u.backgroundColor : "transparent",
4686
+ textAlign: u.textAlign || "left",
4687
+ textTransform: u.textTransform || "none",
4688
+ letterSpacing: u.letterSpacing ? `${u.letterSpacing}px` : "normal",
4689
+ textShadow: u.hasTextShadow ? `${u.textShadowX}px ${u.textShadowY}px ${u.textShadowBlur}px ${u.textShadowColor}` : "none"
4690
4690
  },
4691
- children: m.text
4691
+ children: u.text
4692
4692
  }
4693
4693
  ),
4694
4694
  /* @__PURE__ */ i.jsxs("div", { className: "template-info", children: [
4695
- /* @__PURE__ */ i.jsx("span", { className: "template-category", children: m.category }),
4696
- /* @__PURE__ */ i.jsx("span", { className: "template-font", children: m.fontFamily })
4695
+ /* @__PURE__ */ i.jsx("span", { className: "template-category", children: u.category }),
4696
+ /* @__PURE__ */ i.jsx("span", { className: "template-font", children: u.fontFamily })
4697
4697
  ] })
4698
4698
  ]
4699
4699
  },
4700
- m.id
4700
+ u.id
4701
4701
  ))
4702
4702
  ] }),
4703
4703
  /* @__PURE__ */ i.jsx("div", { className: "modal-footer", children: /* @__PURE__ */ i.jsxs("div", { className: "results-count", children: [
4704
- F.length,
4704
+ C.length,
4705
4705
  " template",
4706
- F.length !== 1 ? "s" : "",
4706
+ C.length !== 1 ? "s" : "",
4707
4707
  " found"
4708
4708
  ] }) })
4709
4709
  ] }) }) : null;
4710
- }, si = ({
4710
+ }, li = ({
4711
4711
  onAddElement: f,
4712
4712
  onDeleteElement: o,
4713
4713
  onDuplicateElement: a,
@@ -4717,10 +4717,10 @@ const Ut = {
4717
4717
  onToggleRulers: h,
4718
4718
  onToggleSnap: n,
4719
4719
  onImageUpload: c,
4720
- canUndo: F,
4720
+ canUndo: C,
4721
4721
  canRedo: I,
4722
4722
  showGrid: E,
4723
- showRulers: m,
4723
+ showRulers: u,
4724
4724
  snapToGrid: B,
4725
4725
  selectedElement: j,
4726
4726
  theme: p,
@@ -4728,10 +4728,10 @@ const Ut = {
4728
4728
  apiKey: X,
4729
4729
  apiEndpoint: T
4730
4730
  }) => {
4731
- const [O, k] = N(!1), [Z, W] = N(!1), [xt, Q] = N(!1), [ft, _] = N(!1), [st, M] = N(!1), [nt, tt] = N(!1), [ct, Y] = N(!1), P = (U) => {
4731
+ const [O, k] = N(!1), [Z, W] = N(!1), [xt, Q] = N(!1), [ft, G] = N(!1), [st, M] = N(!1), [nt, tt] = N(!1), [ct, Y] = N(!1), P = (U) => {
4732
4732
  const K = U.target.files[0];
4733
4733
  K && K.type.startsWith("image/") && c(K), U.target.value = "";
4734
- }, C = (U) => {
4734
+ }, F = (U) => {
4735
4735
  f("icon", {
4736
4736
  iconData: U,
4737
4737
  text: U.symbol,
@@ -4747,9 +4747,9 @@ const Ut = {
4747
4747
  f("sticker", U);
4748
4748
  }, L = (U) => {
4749
4749
  f("embroidery", U);
4750
- }, H = (U, K) => {
4750
+ }, $ = (U, K) => {
4751
4751
  f(U, K);
4752
- }, G = () => {
4752
+ }, _ = () => {
4753
4753
  tt(!nt), Y(!1);
4754
4754
  }, it = () => {
4755
4755
  Y(!ct), tt(!1);
@@ -4766,7 +4766,7 @@ const Ut = {
4766
4766
  {
4767
4767
  className: "toolbar-btn compact",
4768
4768
  onClick: l,
4769
- disabled: !F || v,
4769
+ disabled: !C || v,
4770
4770
  title: "Undo (Ctrl+Z)",
4771
4771
  children: [
4772
4772
  /* @__PURE__ */ i.jsx("span", { className: "icon", children: "↶" }),
@@ -4797,7 +4797,7 @@ const Ut = {
4797
4797
  className: "toolbar-btn compact dropdown-trigger",
4798
4798
  disabled: v,
4799
4799
  title: "Add Text",
4800
- onClick: G,
4800
+ onClick: _,
4801
4801
  children: [
4802
4802
  /* @__PURE__ */ i.jsx("span", { className: "icon", children: "𝐓" }),
4803
4803
  /* @__PURE__ */ i.jsx("span", { className: "label", children: "Text" }),
@@ -4896,7 +4896,7 @@ const Ut = {
4896
4896
  )
4897
4897
  ] }),
4898
4898
  /* @__PURE__ */ i.jsx("div", { className: "toolbar-separator" }),
4899
- /* @__PURE__ */ i.jsx(Ke, { onSelectIcon: C, theme: p, disabled: v }),
4899
+ /* @__PURE__ */ i.jsx(Ze, { onSelectIcon: F, theme: p, disabled: v }),
4900
4900
  /* @__PURE__ */ i.jsxs(
4901
4901
  "button",
4902
4902
  {
@@ -4943,7 +4943,7 @@ const Ut = {
4943
4943
  "button",
4944
4944
  {
4945
4945
  className: "toolbar-btn compact",
4946
- onClick: () => _(!0),
4946
+ onClick: () => G(!0),
4947
4947
  disabled: v,
4948
4948
  title: "Add Embroidery Design",
4949
4949
  children: [
@@ -5000,7 +5000,7 @@ const Ut = {
5000
5000
  /* @__PURE__ */ i.jsxs(
5001
5001
  "button",
5002
5002
  {
5003
- className: `toolbar-btn compact ${m ? "active" : ""}`,
5003
+ className: `toolbar-btn compact ${u ? "active" : ""}`,
5004
5004
  onClick: h,
5005
5005
  title: "Toggle Rulers",
5006
5006
  children: [
@@ -5024,7 +5024,7 @@ const Ut = {
5024
5024
  ] })
5025
5025
  ] }),
5026
5026
  /* @__PURE__ */ i.jsx(
5027
- Ze,
5027
+ ti,
5028
5028
  {
5029
5029
  isOpen: O,
5030
5030
  onClose: () => k(!1),
@@ -5033,7 +5033,7 @@ const Ut = {
5033
5033
  }
5034
5034
  ),
5035
5035
  /* @__PURE__ */ i.jsx(
5036
- ti,
5036
+ ei,
5037
5037
  {
5038
5038
  isOpen: Z,
5039
5039
  onClose: () => W(!1),
@@ -5042,7 +5042,7 @@ const Ut = {
5042
5042
  }
5043
5043
  ),
5044
5044
  /* @__PURE__ */ i.jsx(
5045
- ii,
5045
+ oi,
5046
5046
  {
5047
5047
  isOpen: xt,
5048
5048
  onClose: () => Q(!1),
@@ -5053,10 +5053,10 @@ const Ut = {
5053
5053
  }
5054
5054
  ),
5055
5055
  /* @__PURE__ */ i.jsx(
5056
- ri,
5056
+ ai,
5057
5057
  {
5058
5058
  isOpen: ft,
5059
- onClose: () => _(!1),
5059
+ onClose: () => G(!1),
5060
5060
  onAddEmbroidery: L,
5061
5061
  theme: p,
5062
5062
  apiKey: X,
@@ -5064,16 +5064,16 @@ const Ut = {
5064
5064
  }
5065
5065
  ),
5066
5066
  /* @__PURE__ */ i.jsx(
5067
- ai,
5067
+ si,
5068
5068
  {
5069
5069
  isOpen: st,
5070
5070
  onClose: () => M(!1),
5071
- onAddText: H,
5071
+ onAddText: $,
5072
5072
  theme: p
5073
5073
  }
5074
5074
  )
5075
5075
  ] });
5076
- }, li = ({
5076
+ }, ni = ({
5077
5077
  selectedElement: f,
5078
5078
  onUpdate: o,
5079
5079
  onMoveLayer: a,
@@ -5552,7 +5552,7 @@ const Ut = {
5552
5552
  ] })
5553
5553
  ] })
5554
5554
  ] });
5555
- }, F = () => /* @__PURE__ */ i.jsxs("div", { className: "property-group", children: [
5555
+ }, C = () => /* @__PURE__ */ i.jsxs("div", { className: "property-group", children: [
5556
5556
  /* @__PURE__ */ i.jsx("h4", { children: "Shape Properties" }),
5557
5557
  /* @__PURE__ */ i.jsxs("div", { className: "property-row", children: [
5558
5558
  /* @__PURE__ */ i.jsx("label", { children: "Fill Color" }),
@@ -5717,7 +5717,7 @@ const Ut = {
5717
5717
  "°"
5718
5718
  ] })
5719
5719
  ] })
5720
- ] }), m = () => /* @__PURE__ */ i.jsxs("div", { className: "property-group", children: [
5720
+ ] }), u = () => /* @__PURE__ */ i.jsxs("div", { className: "property-group", children: [
5721
5721
  /* @__PURE__ */ i.jsx("h4", { children: "Line Properties" }),
5722
5722
  /* @__PURE__ */ i.jsxs("div", { className: "property-row", children: [
5723
5723
  /* @__PURE__ */ i.jsxs("div", { className: "input-group", children: [
@@ -5804,9 +5804,9 @@ const Ut = {
5804
5804
  ] }),
5805
5805
  /* @__PURE__ */ i.jsxs("div", { className: "panel-content", children: [
5806
5806
  f.type === "text" && c(),
5807
- j.includes(f.type) && F(),
5807
+ j.includes(f.type) && C(),
5808
5808
  f.type === "image" && I(),
5809
- f.type === "horizontalLine" && m(),
5809
+ f.type === "horizontalLine" && u(),
5810
5810
  E(),
5811
5811
  B(),
5812
5812
  /* @__PURE__ */ i.jsx("div", { className: "property-group", children: /* @__PURE__ */ i.jsxs(
@@ -5822,7 +5822,7 @@ const Ut = {
5822
5822
  ) })
5823
5823
  ] })
5824
5824
  ] });
5825
- }, ni = ({
5825
+ }, ci = ({
5826
5826
  elements: f,
5827
5827
  selectedElement: o,
5828
5828
  onSelectElement: a,
@@ -5830,7 +5830,7 @@ const Ut = {
5830
5830
  onDeleteElement: s,
5831
5831
  theme: g
5832
5832
  }) => {
5833
- const h = (c, F) => {
5833
+ const h = (c, C) => {
5834
5834
  switch (c) {
5835
5835
  case "text":
5836
5836
  return "T";
@@ -5872,14 +5872,14 @@ const Ut = {
5872
5872
  return "?";
5873
5873
  }
5874
5874
  }, n = (c) => {
5875
- var F, I;
5875
+ var C, I;
5876
5876
  if (c.type === "text")
5877
- return c.isIcon && c.iconData ? `Icon: ${c.iconData.name}` : ((F = c.text) == null ? void 0 : F.substring(0, 20)) + (((I = c.text) == null ? void 0 : I.length) > 20 ? "..." : "") || "Text";
5877
+ return c.isIcon && c.iconData ? `Icon: ${c.iconData.name}` : ((C = c.text) == null ? void 0 : C.substring(0, 20)) + (((I = c.text) == null ? void 0 : I.length) > 20 ? "..." : "") || "Text";
5878
5878
  if (c.type === "qrcode")
5879
5879
  return `QR Code: ${(c.data || "").substring(0, 15) + ((c.data || "").length > 15 ? "..." : "")}`;
5880
5880
  if (c.type === "barcode") {
5881
- const E = c.format || "CODE128", m = c.data || "";
5882
- return `Barcode (${E}): ${m.substring(0, 10) + (m.length > 10 ? "..." : "")}`;
5881
+ const E = c.format || "CODE128", u = c.data || "";
5882
+ return `Barcode (${E}): ${u.substring(0, 10) + (u.length > 10 ? "..." : "")}`;
5883
5883
  }
5884
5884
  return c.type === "sticker" ? `Sticker: ${(c.name || "Untitled").substring(0, 15)}` : c.type === "embroidery" ? `Embroidery: ${(c.name || "Design").substring(0, 15)}` : c.type.charAt(0).toUpperCase() + c.type.slice(1);
5885
5885
  };
@@ -5888,7 +5888,7 @@ const Ut = {
5888
5888
  /* @__PURE__ */ i.jsx("h3", { children: "Layers" }),
5889
5889
  /* @__PURE__ */ i.jsx("span", { className: "layer-count", children: f.length })
5890
5890
  ] }),
5891
- /* @__PURE__ */ i.jsx("div", { className: "layers-list", children: f.length === 0 ? /* @__PURE__ */ i.jsx("div", { className: "no-layers", children: "No elements added yet" }) : [...f].reverse().map((c, F) => /* @__PURE__ */ i.jsxs(
5891
+ /* @__PURE__ */ i.jsx("div", { className: "layers-list", children: f.length === 0 ? /* @__PURE__ */ i.jsx("div", { className: "no-layers", children: "No elements added yet" }) : [...f].reverse().map((c, C) => /* @__PURE__ */ i.jsxs(
5892
5892
  "div",
5893
5893
  {
5894
5894
  className: `layer-item ${(o == null ? void 0 : o.id) === c.id ? "selected" : ""}`,
@@ -5906,7 +5906,7 @@ const Ut = {
5906
5906
  onClick: (I) => {
5907
5907
  I.stopPropagation(), l(c.id, "up");
5908
5908
  },
5909
- disabled: F === 0,
5909
+ disabled: C === 0,
5910
5910
  title: "Move Up",
5911
5911
  children: "↑"
5912
5912
  }
@@ -5918,7 +5918,7 @@ const Ut = {
5918
5918
  onClick: (I) => {
5919
5919
  I.stopPropagation(), l(c.id, "down");
5920
5920
  },
5921
- disabled: F === f.length - 1,
5921
+ disabled: C === f.length - 1,
5922
5922
  title: "Move Down",
5923
5923
  children: "↓"
5924
5924
  }
@@ -5941,22 +5941,22 @@ const Ut = {
5941
5941
  )) })
5942
5942
  ] });
5943
5943
  };
5944
- class ci {
5944
+ class di {
5945
5945
  constructor() {
5946
5946
  this.canvas = document.createElement("canvas"), this.ctx = this.canvas.getContext("2d");
5947
5947
  }
5948
5948
  // Add this method to the ExportManager class
5949
5949
  async exportAllSections(o, a, l, s, g = "png", h = !0, n = null) {
5950
5950
  const c = {};
5951
- for (const F of a) {
5952
- const I = F.id || F.sectionName, E = o[I];
5951
+ for (const C of a) {
5952
+ const I = C.id || C.sectionName, E = o[I];
5953
5953
  if (!E || !E.elements || E.elements.length === 0) {
5954
5954
  console.log(`Skipping section ${I} - no elements`);
5955
5955
  continue;
5956
5956
  }
5957
5957
  if (this.canvas.width = l, this.canvas.height = s, this.ctx.clearRect(0, 0, l, s), h) {
5958
- let B = F.image || F.sectionImage;
5959
- if (n && n.sectionImage && (F.sectionName === "Front" || n.sections && Object.keys(n.sections).includes(F.sectionName)) && (B = n.sectionImage), B)
5958
+ let B = C.image || C.sectionImage;
5959
+ if (n && n.sectionImage && (C.sectionName === "Front" || n.sections && Object.keys(n.sections).includes(C.sectionName)) && (B = n.sectionImage), B)
5960
5960
  try {
5961
5961
  const j = await this.loadImage(B);
5962
5962
  await this.processImageColor(j, E.selectedColor || "#FFFFFF"), this.ctx.drawImage(this.processedImage, 0, 0, l, s);
@@ -5967,10 +5967,10 @@ class ci {
5967
5967
  this.ctx.clearRect(0, 0, l, s);
5968
5968
  for (const B of E.elements)
5969
5969
  await this.drawElement(B);
5970
- const m = this.canvas.toDataURL(`image/${g}`, g === "jpeg" ? 0.9 : void 0);
5970
+ const u = this.canvas.toDataURL(`image/${g}`, g === "jpeg" ? 0.9 : void 0);
5971
5971
  c[I] = {
5972
- dataUrl: m,
5973
- blob: await this.dataUrlToBlob(m)
5972
+ dataUrl: u,
5973
+ blob: await this.dataUrlToBlob(u)
5974
5974
  };
5975
5975
  }
5976
5976
  return c;
@@ -6010,11 +6010,11 @@ class ci {
6010
6010
  console.warn("Invalid target color:", a);
6011
6011
  return;
6012
6012
  }
6013
- const { r: c, g: F, b: I } = n;
6013
+ const { r: c, g: C, b: I } = n;
6014
6014
  for (let E = 0; E < h.length; E += 4) {
6015
6015
  if (h[E + 3] === 0) continue;
6016
6016
  const B = this.getLuma(h[E], h[E + 1], h[E + 2]);
6017
- h[E] = Math.round(c * B), h[E + 1] = Math.round(F * B), h[E + 2] = Math.round(I * B);
6017
+ h[E] = Math.round(c * B), h[E + 1] = Math.round(C * B), h[E + 2] = Math.round(I * B);
6018
6018
  }
6019
6019
  return s.putImageData(g, 0, 0), this.processedImage = new Image(), new Promise((E) => {
6020
6020
  this.processedImage.onload = () => {
@@ -6109,7 +6109,7 @@ class ci {
6109
6109
  const a = o.width / 2, l = o.height / 2, s = Math.min(o.width, o.height) / 2, g = s * 0.4, h = o.numPoints || 5;
6110
6110
  this.ctx.beginPath();
6111
6111
  for (let n = 0; n < h * 2; n++) {
6112
- const c = n % 2 === 0 ? s : g, F = n * Math.PI / h, I = a + Math.cos(F) * c, E = l + Math.sin(F) * c;
6112
+ const c = n % 2 === 0 ? s : g, C = n * Math.PI / h, I = a + Math.cos(C) * c, E = l + Math.sin(C) * c;
6113
6113
  n === 0 ? this.ctx.moveTo(I, E) : this.ctx.lineTo(I, E);
6114
6114
  }
6115
6115
  this.ctx.closePath(), o.fill && o.fill !== "transparent" && (this.ctx.fillStyle = o.fill, this.ctx.fill()), o.stroke && o.strokeWidth > 0 && (this.ctx.strokeStyle = o.stroke, this.ctx.lineWidth = o.strokeWidth, this.ctx.stroke());
@@ -6143,8 +6143,8 @@ class ci {
6143
6143
  const a = o.width / 2, l = o.height / 2, s = Math.min(o.width, o.height) / 2, g = 6;
6144
6144
  this.ctx.beginPath();
6145
6145
  for (let h = 0; h < g; h++) {
6146
- const n = h * 2 * Math.PI / g - Math.PI / 2, c = a + s * Math.cos(n), F = l + s * Math.sin(n);
6147
- h === 0 ? this.ctx.moveTo(c, F) : this.ctx.lineTo(c, F);
6146
+ const n = h * 2 * Math.PI / g - Math.PI / 2, c = a + s * Math.cos(n), C = l + s * Math.sin(n);
6147
+ h === 0 ? this.ctx.moveTo(c, C) : this.ctx.lineTo(c, C);
6148
6148
  }
6149
6149
  this.ctx.closePath(), o.fill && o.fill !== "transparent" && (this.ctx.fillStyle = o.fill, this.ctx.fill()), o.stroke && o.strokeWidth > 0 && (this.ctx.strokeStyle = o.stroke, this.ctx.lineWidth = o.strokeWidth, this.ctx.stroke());
6150
6150
  }
@@ -6152,8 +6152,8 @@ class ci {
6152
6152
  const a = o.width / 2, l = o.height / 2, s = Math.min(o.width, o.height) / 2, g = 5;
6153
6153
  this.ctx.beginPath();
6154
6154
  for (let h = 0; h < g; h++) {
6155
- const n = h * 2 * Math.PI / g - Math.PI / 2, c = a + s * Math.cos(n), F = l + s * Math.sin(n);
6156
- h === 0 ? this.ctx.moveTo(c, F) : this.ctx.lineTo(c, F);
6155
+ const n = h * 2 * Math.PI / g - Math.PI / 2, c = a + s * Math.cos(n), C = l + s * Math.sin(n);
6156
+ h === 0 ? this.ctx.moveTo(c, C) : this.ctx.lineTo(c, C);
6157
6157
  }
6158
6158
  this.ctx.closePath(), o.fill && o.fill !== "transparent" && (this.ctx.fillStyle = o.fill, this.ctx.fill()), o.stroke && o.strokeWidth > 0 && (this.ctx.strokeStyle = o.stroke, this.ctx.lineWidth = o.strokeWidth, this.ctx.stroke());
6159
6159
  }
@@ -6322,10 +6322,10 @@ class ci {
6322
6322
  }
6323
6323
  // Export all sections as JSON with File objects
6324
6324
  async exportAllSectionsAsJSON(o, a, l, s, g = "png", h = null) {
6325
- var m, B;
6326
- const n = [], c = [], F = {};
6325
+ var u, B;
6326
+ const n = [], c = [], C = {};
6327
6327
  for (const j of a) {
6328
- const p = j.id || j.sectionName, v = o[p];
6328
+ const p = j.sectionName, v = o[p];
6329
6329
  if (!v || !v.elements || v.elements.length === 0) {
6330
6330
  console.log(`Skipping section ${p} - no elements`);
6331
6331
  continue;
@@ -6344,7 +6344,7 @@ class ci {
6344
6344
  canvasWidth: l,
6345
6345
  canvasHeight: s
6346
6346
  };
6347
- F[p] = T;
6347
+ C[p] = T;
6348
6348
  const O = await this.exportSectionAsBlob(
6349
6349
  v,
6350
6350
  j,
@@ -6388,13 +6388,13 @@ class ci {
6388
6388
  });
6389
6389
  }
6390
6390
  }
6391
- let I = ((m = a[0]) == null ? void 0 : m.image) || ((B = a[0]) == null ? void 0 : B.sectionImage);
6391
+ let I = ((u = a[0]) == null ? void 0 : u.image) || ((B = a[0]) == null ? void 0 : B.sectionImage);
6392
6392
  if (h && h.sectionImage) {
6393
6393
  const j = a[0];
6394
6394
  j && (j.sectionName === "Front" || h.sections && Object.keys(h.sections).includes(j.sectionName)) && (I = h.sectionImage);
6395
6395
  }
6396
6396
  const E = {
6397
- sections: F,
6397
+ sections: C,
6398
6398
  canvasWidth: l,
6399
6399
  canvasHeight: s,
6400
6400
  sectionImage: I,
@@ -6430,10 +6430,10 @@ class ci {
6430
6430
  let c = a.image || a.sectionImage;
6431
6431
  if (n && n.sectionImage && (a.sectionName === "Front" || n.sections && Object.keys(n.sections).includes(a.sectionName)) && (c = n.sectionImage), c)
6432
6432
  try {
6433
- const F = await this.loadImage(c);
6434
- await this.processImageColor(F, o.selectedColor || "#FFFFFF"), this.ctx.drawImage(this.processedImage, 0, 0, l, s);
6435
- } catch (F) {
6436
- console.warn("Failed to load background image:", F);
6433
+ const C = await this.loadImage(c);
6434
+ await this.processImageColor(C, o.selectedColor || "#FFFFFF"), this.ctx.drawImage(this.processedImage, 0, 0, l, s);
6435
+ } catch (C) {
6436
+ console.warn("Failed to load background image:", C);
6437
6437
  }
6438
6438
  } else
6439
6439
  this.ctx.clearRect(0, 0, l, s);
@@ -6468,7 +6468,7 @@ class ci {
6468
6468
  sectionName: s,
6469
6469
  image: g,
6470
6470
  sectionImage: g
6471
- }, c = [], F = [], I = await this.exportSectionAsBlob(
6471
+ }, c = [], C = [], I = await this.exportSectionAsBlob(
6472
6472
  h,
6473
6473
  n,
6474
6474
  o.canvasWidth,
@@ -6505,12 +6505,12 @@ class ci {
6505
6505
  `${s}-print.${a}`,
6506
6506
  `image/${a}`
6507
6507
  );
6508
- F.push({
6508
+ C.push({
6509
6509
  sectionName: s,
6510
6510
  sectionImage: v
6511
6511
  });
6512
6512
  }
6513
- const m = {
6513
+ const u = {
6514
6514
  sections: { [s]: h },
6515
6515
  canvasWidth: o.canvasWidth,
6516
6516
  canvasHeight: o.canvasHeight,
@@ -6538,12 +6538,12 @@ class ci {
6538
6538
  };
6539
6539
  return {
6540
6540
  fullDesign: c,
6541
- printReady: F,
6542
- designFile: JSON.stringify(m)
6541
+ printReady: C,
6542
+ designFile: JSON.stringify(u)
6543
6543
  };
6544
6544
  }
6545
6545
  }
6546
- class di {
6546
+ class fi {
6547
6547
  constructor(o = "localStorage") {
6548
6548
  this.storage = o === "sessionStorage" ? sessionStorage : localStorage, this.STORAGE_PREFIX = "mypixia_canvas_", this.DESIGNS_LIST_KEY = "mypixia_saved_designs";
6549
6549
  }
@@ -6733,7 +6733,7 @@ class di {
6733
6733
  return "Unknown";
6734
6734
  }
6735
6735
  }
6736
- const fi = $e((f, o) => {
6736
+ const hi = He((f, o) => {
6737
6737
  const {
6738
6738
  theme: a = {
6739
6739
  primaryColor: "#000000",
@@ -6764,19 +6764,19 @@ const fi = $e((f, o) => {
6764
6764
  ]
6765
6765
  },
6766
6766
  initFile: g
6767
- } = f, [h, n] = N([]), [c, F] = N(null), [I, E] = N(!1), [m, B] = N(!1), [j, p] = N(!1), [v, X] = N({ x: 0, y: 0 }), [T, O] = N(null), [k, Z] = N(800), [W, xt] = N(600), [Q, ft] = N(1), [_, st] = N(s.colorSettings[0]), [M, nt] = N(!1), [tt, ct] = N(!0), [Y, P] = N(!0), [C, et] = N(s.sections[0]), [y, D] = N(!1), [L, H] = N({}), [G, it] = N([]), [J, q] = N(-1), [U] = N(new di("localStorage")), K = gt(null), kt = gt(null), pt = gt(null), wt = gt(null), Ot = gt(null), Bt = gt(new ci()), zt = gt(!1), [yt, ce] = N(null), lt = at(() => {
6767
+ } = f, [h, n] = N([]), [c, C] = N(null), [I, E] = N(!1), [u, B] = N(!1), [j, p] = N(!1), [v, X] = N({ x: 0, y: 0 }), [T, O] = N(null), [k, Z] = N(800), [W, xt] = N(600), [Q, ft] = N(1), [G, st] = N(s.colorSettings[0]), [M, nt] = N(!1), [tt, ct] = N(!0), [Y, P] = N(!0), [F, et] = N(s.sections[0]), [y, D] = N(!1), [L, $] = N({}), [_, it] = N([]), [J, q] = N(-1), [U] = N(new fi("localStorage")), K = gt(null), kt = gt(null), pt = gt(null), wt = gt(null), Ot = gt(null), Bt = gt(new di()), zt = gt(!1), [yt, ce] = N(null), lt = at(() => {
6768
6768
  const e = {
6769
6769
  elements: JSON.parse(JSON.stringify(h)),
6770
6770
  selectedElement: c ? { ...c } : null,
6771
6771
  timestamp: Date.now()
6772
- }, t = G.slice(0, J + 1);
6772
+ }, t = _.slice(0, J + 1);
6773
6773
  t.push(e), t.length > 50 ? t.shift() : q(J + 1), it(t);
6774
- }, [h, c, G, J]), St = at(() => ({
6774
+ }, [h, c, _, J]), St = at(() => ({
6775
6775
  elements: h,
6776
6776
  canvasWidth: k,
6777
6777
  canvasHeight: W,
6778
- selectedColor: _,
6779
- activeSection: C,
6778
+ selectedColor: G,
6779
+ activeSection: F,
6780
6780
  product: s,
6781
6781
  sectionDesigns: L,
6782
6782
  zoomLevel: Q,
@@ -6785,21 +6785,21 @@ const fi = $e((f, o) => {
6785
6785
  selectedElement: c ? { ...c } : null,
6786
6786
  canvasRef: K
6787
6787
  // Include reference for thumbnail generation
6788
- }), [h, k, W, _, C, s, L, Q, M, Y, c]);
6788
+ }), [h, k, W, G, F, s, L, Q, M, Y, c]);
6789
6789
  rt(() => {
6790
6790
  const t = setTimeout(async () => {
6791
- if (h.length === 0 && G.length <= 1) {
6791
+ if (h.length === 0 && _.length <= 1) {
6792
6792
  if (g)
6793
6793
  try {
6794
6794
  const A = await fetch(g);
6795
6795
  if (A.ok) {
6796
6796
  const z = await A.text();
6797
6797
  if (z.trim()) {
6798
- const $ = JSON.parse(z.trim());
6799
- if (console.log("Loading design from file:", $), ce($), $.sections && typeof $.sections == "object") {
6800
- const dt = Object.keys($.sections)[0], ot = $.sections[dt];
6798
+ const H = JSON.parse(z.trim());
6799
+ if (console.log("Loading design from file:", H), ce(H), H.sections && typeof H.sections == "object") {
6800
+ const dt = Object.keys(H.sections)[0], ot = H.sections[dt];
6801
6801
  if (ot && ot.elements) {
6802
- n(ot.elements || []), Z(ot.canvasWidth || 800), xt(ot.canvasHeight || 600), st(ot.selectedColor || s.colorSettings[0]), ft(ot.zoomLevel || 1), nt(ot.showGrid || !1), P(ot.snapToGrid || !0), F(null), $.sections && H($.sections);
6802
+ n(ot.elements || []), Z(ot.canvasWidth || 800), xt(ot.canvasHeight || 600), st(ot.selectedColor || s.colorSettings[0]), ft(ot.zoomLevel || 1), nt(ot.showGrid || !1), P(ot.snapToGrid || !0), C(null), H.sections && $(H.sections);
6803
6803
  const Rt = s.sections.find((Dt) => Dt.sectionName === dt);
6804
6804
  Rt && et(Rt), it([]), q(-1), setTimeout(() => {
6805
6805
  lt();
@@ -6837,7 +6837,7 @@ const fi = $e((f, o) => {
6837
6837
  rotation: 0,
6838
6838
  opacity: 1
6839
6839
  };
6840
- n([R]), F(R), setTimeout(() => {
6840
+ n([R]), C(R), setTimeout(() => {
6841
6841
  lt();
6842
6842
  }, 100);
6843
6843
  }
@@ -6847,12 +6847,12 @@ const fi = $e((f, o) => {
6847
6847
  const Wt = at((e = "png", t = !0) => {
6848
6848
  const r = St();
6849
6849
  return s.sections, Bt.current.exportAllSections(
6850
- { [(C == null ? void 0 : C.sectionName) || "main"]: r },
6850
+ { [(F == null ? void 0 : F.sectionName) || "main"]: r },
6851
6851
  [{
6852
- id: (C == null ? void 0 : C.sectionName) || "main",
6853
- sectionName: (C == null ? void 0 : C.sectionName) || "main",
6854
- image: C == null ? void 0 : C.sectionImage,
6855
- sectionImage: C == null ? void 0 : C.sectionImage
6852
+ id: (F == null ? void 0 : F.sectionName) || "main",
6853
+ sectionName: (F == null ? void 0 : F.sectionName) || "main",
6854
+ image: F == null ? void 0 : F.sectionImage,
6855
+ sectionImage: F == null ? void 0 : F.sectionImage
6856
6856
  }],
6857
6857
  k,
6858
6858
  W,
@@ -6860,7 +6860,7 @@ const fi = $e((f, o) => {
6860
6860
  t,
6861
6861
  yt
6862
6862
  );
6863
- }, [St, s.sections, C, k, W]), de = [
6863
+ }, [St, s.sections, F, k, W]), de = [
6864
6864
  "Arial",
6865
6865
  "Helvetica",
6866
6866
  "Times New Roman",
@@ -6884,10 +6884,10 @@ const fi = $e((f, o) => {
6884
6884
  const e = document.createElement("canvas");
6885
6885
  e.width = k, e.height = W, Ot.current = e;
6886
6886
  }, [k, W]), rt(() => {
6887
- G.length === 0 && lt();
6887
+ _.length === 0 && lt();
6888
6888
  }, []);
6889
- const At = (e, t, r, d, x, u) => {
6890
- e.beginPath(), e.moveTo(t + u, r), e.lineTo(t + d - u, r), e.quadraticCurveTo(t + d, r, t + d, r + u), e.lineTo(t + d, r + x - u), e.quadraticCurveTo(t + d, r + x, t + d - u, r + x), e.lineTo(t + u, r + x), e.quadraticCurveTo(t, r + x, t, r + x - u), e.lineTo(t, r + u), e.quadraticCurveTo(t, r, t + u, r), e.closePath();
6889
+ const At = (e, t, r, d, x, m) => {
6890
+ e.beginPath(), e.moveTo(t + m, r), e.lineTo(t + d - m, r), e.quadraticCurveTo(t + d, r, t + d, r + m), e.lineTo(t + d, r + x - m), e.quadraticCurveTo(t + d, r + x, t + d - m, r + x), e.lineTo(t + m, r + x), e.quadraticCurveTo(t, r + x, t, r + x - m), e.lineTo(t, r + m), e.quadraticCurveTo(t, r, t + m, r), e.closePath();
6891
6891
  }, Qt = (e, t) => {
6892
6892
  if (!t.isIcon)
6893
6893
  return {
@@ -6899,11 +6899,11 @@ const fi = $e((f, o) => {
6899
6899
  cy: t.y + t.height / 2
6900
6900
  };
6901
6901
  e.save(), e.font = `${t.fontStyle || ""} ${t.fontWeight || ""} ${t.fontSize}px ${t.fontFamily}`, e.textBaseline = "alphabetic", e.textAlign = "left";
6902
- const r = e.measureText(t.text), d = r.actualBoundingBoxAscent ?? t.fontSize * 0.8, x = r.actualBoundingBoxDescent ?? t.fontSize * 0.2, u = r.actualBoundingBoxLeft ?? 0, w = r.actualBoundingBoxRight ?? r.width, S = u + w, b = d + x, R = t.x, A = t.y, z = R - S / 2 - u, $ = A - b / 2 - d;
6903
- return e.restore(), { x: z, y: $, width: S, height: b, cx: R, cy: A };
6902
+ const r = e.measureText(t.text), d = r.actualBoundingBoxAscent ?? t.fontSize * 0.8, x = r.actualBoundingBoxDescent ?? t.fontSize * 0.2, m = r.actualBoundingBoxLeft ?? 0, w = r.actualBoundingBoxRight ?? r.width, S = m + w, b = d + x, R = t.x, A = t.y, z = R - S / 2 - m, H = A - b / 2 - d;
6903
+ return e.restore(), { x: z, y: H, width: S, height: b, cx: R, cy: A };
6904
6904
  }, fe = (e, t) => {
6905
6905
  if (!t) return;
6906
- const r = 8, d = 8, x = 4, u = 30, w = Qt(e, t), S = t.isIcon ? Math.max(r, 12) : r, b = {
6906
+ const r = 8, d = 8, x = 4, m = 30, w = Qt(e, t), S = t.isIcon ? Math.max(r, 12) : r, b = {
6907
6907
  x: -w.width / 2 - S,
6908
6908
  y: -w.height / 2 - S,
6909
6909
  w: w.width + S * 2,
@@ -6928,29 +6928,29 @@ const fi = $e((f, o) => {
6928
6928
  { x: b.x + b.w, y: b.y },
6929
6929
  { x: b.x + b.w, y: b.y + b.h },
6930
6930
  { x: b.x, y: b.y + b.h }
6931
- ].forEach(($) => {
6931
+ ].forEach((H) => {
6932
6932
  e.fillStyle = "rgba(0,0,0,.2)", e.fillRect(
6933
- $.x - d / 2 + 1,
6934
- $.y - d / 2 + 1,
6933
+ H.x - d / 2 + 1,
6934
+ H.y - d / 2 + 1,
6935
6935
  d,
6936
6936
  d
6937
6937
  ), e.fillStyle = "#ffffff", e.fillRect(
6938
- $.x - d / 2,
6939
- $.y - d / 2,
6938
+ H.x - d / 2,
6939
+ H.y - d / 2,
6940
6940
  d,
6941
6941
  d
6942
6942
  ), e.strokeStyle = "#3b82f6", e.lineWidth = 1, e.strokeRect(
6943
- $.x - d / 2,
6944
- $.y - d / 2,
6943
+ H.x - d / 2,
6944
+ H.y - d / 2,
6945
6945
  d,
6946
6946
  d
6947
6947
  );
6948
6948
  });
6949
- const A = 0, z = b.y - u;
6949
+ const A = 0, z = b.y - m;
6950
6950
  e.strokeStyle = "#3b82f6", e.lineWidth = 1, e.setLineDash([2, 2]), e.beginPath(), e.moveTo(A, z + 12), e.lineTo(A, b.y), e.stroke(), e.setLineDash([]), e.beginPath(), e.arc(A, z, 12, 0, 2 * Math.PI), e.fillStyle = "#f59e0b", e.fill(), e.strokeStyle = "#ffffff", e.lineWidth = 2, e.stroke(), e.strokeStyle = "#ffffff", e.lineWidth = 2, e.beginPath(), e.arc(A, z, 6, -Math.PI / 2, Math.PI, !1), e.stroke(), e.beginPath(), e.moveTo(A - 6, z), e.lineTo(A - 3, z - 3), e.lineTo(A - 3, z + 3), e.closePath(), e.fillStyle = "#ffffff", e.fill(), e.restore();
6951
6951
  }, he = (e, t) => {
6952
6952
  if (!t) return [];
6953
- const r = Qt(e, t), d = t.isIcon ? Math.max(8, 12) : 8, x = 8, u = 30, w = (t.rotation || 0) * Math.PI / 180, S = {
6953
+ const r = Qt(e, t), d = t.isIcon ? Math.max(8, 12) : 8, x = 8, m = 30, w = (t.rotation || 0) * Math.PI / 180, S = {
6954
6954
  x: -r.width / 2 - d,
6955
6955
  y: -r.height / 2 - d,
6956
6956
  w: r.width + d * 2,
@@ -6960,7 +6960,7 @@ const fi = $e((f, o) => {
6960
6960
  { x: S.x + S.w, y: S.y, type: "ne-resize" },
6961
6961
  { x: S.x + S.w, y: S.y + S.h, type: "se-resize" },
6962
6962
  { x: S.x, y: S.y + S.h, type: "sw-resize" },
6963
- { x: 0, y: S.y - u, type: "rotate" }
6963
+ { x: 0, y: S.y - m, type: "rotate" }
6964
6964
  ], R = Math.cos(w), A = Math.sin(w);
6965
6965
  return b.map((z) => ({
6966
6966
  x: r.cx + (z.x * R - z.y * A),
@@ -6972,8 +6972,8 @@ const fi = $e((f, o) => {
6972
6972
  if (!r) return null;
6973
6973
  const d = K.current;
6974
6974
  if (!d) return null;
6975
- const x = d.getContext("2d"), u = he(x, r);
6976
- for (const w of u) {
6975
+ const x = d.getContext("2d"), m = he(x, r);
6976
+ for (const w of m) {
6977
6977
  const S = e - w.x, b = t - w.y;
6978
6978
  if (Math.sqrt(S * S + b * b) <= w.size / 2)
6979
6979
  return w.type;
@@ -6981,39 +6981,39 @@ const fi = $e((f, o) => {
6981
6981
  return null;
6982
6982
  }, Ft = at(() => {
6983
6983
  if (J > 0) {
6984
- const e = G[J - 1];
6985
- n(e.elements), F(e.selectedElement), q(J - 1);
6984
+ const e = _[J - 1];
6985
+ n(e.elements), C(e.selectedElement), q(J - 1);
6986
6986
  }
6987
- }, [G, J]), bt = at(() => {
6988
- if (J < G.length - 1) {
6989
- const e = G[J + 1];
6990
- n(e.elements), F(e.selectedElement), q(J + 1);
6987
+ }, [_, J]), bt = at(() => {
6988
+ if (J < _.length - 1) {
6989
+ const e = _[J + 1];
6990
+ n(e.elements), C(e.selectedElement), q(J + 1);
6991
6991
  }
6992
- }, [G, J]), ut = (e) => Y ? Math.round(e / It) * It : e;
6992
+ }, [_, J]), mt = (e) => Y ? Math.round(e / It) * It : e;
6993
6993
  rt(() => {
6994
- if (C != null && C.sectionImage) {
6994
+ if (F != null && F.sectionImage) {
6995
6995
  pt.current = null, wt.current = null;
6996
6996
  const e = K.current;
6997
6997
  if (e && e.getContext("2d").clearRect(0, 0, k, W), g && !yt)
6998
6998
  return;
6999
6999
  const t = new Image();
7000
7000
  t.crossOrigin = "anonymous", t.onload = () => {
7001
- pt.current = t, Xt(t, _);
7001
+ pt.current = t, Xt(t, G);
7002
7002
  }, t.onerror = () => {
7003
- console.error("Failed to load background image:", C.sectionImage), V();
7003
+ console.error("Failed to load background image:", F.sectionImage), V();
7004
7004
  };
7005
- let r = C.sectionImage;
7006
- yt && yt.sectionImage && (C.sectionName === "Front" || yt.sections && Object.keys(yt.sections).includes(C.sectionName)) && (r = yt.sectionImage), t.src = r;
7005
+ let r = F.sectionImage;
7006
+ yt && yt.sectionImage && (F.sectionName === "Front" || yt.sections && Object.keys(yt.sections).includes(F.sectionName)) && (r = yt.sectionImage), t.src = r;
7007
7007
  } else
7008
7008
  pt.current = null, wt.current = null, V();
7009
- }, [C, _, yt]), rt(() => {
7009
+ }, [F, G, yt]), rt(() => {
7010
7010
  const e = (t) => {
7011
7011
  const r = document.activeElement;
7012
7012
  if (!(r && (r.tagName === "INPUT" || r.tagName === "TEXTAREA" || r.tagName === "SELECT" || r.isContentEditable))) {
7013
7013
  if ((t.key === "Delete" || t.key === "Backspace") && c && !l) {
7014
7014
  t.preventDefault();
7015
7015
  const x = c;
7016
- n((u) => u.filter((w) => w.id !== x.id)), F(null), lt();
7016
+ n((m) => m.filter((w) => w.id !== x.id)), C(null), lt();
7017
7017
  }
7018
7018
  if (t.ctrlKey || t.metaKey)
7019
7019
  switch (t.key) {
@@ -7073,10 +7073,10 @@ const fi = $e((f, o) => {
7073
7073
  Ce(e, t);
7074
7074
  break;
7075
7075
  case "pentagon":
7076
- je(e, t);
7076
+ Te(e, t);
7077
7077
  break;
7078
7078
  case "heart":
7079
- Te(e, t);
7079
+ je(e, t);
7080
7080
  break;
7081
7081
  case "oval":
7082
7082
  Ne(e, t);
@@ -7088,10 +7088,10 @@ const fi = $e((f, o) => {
7088
7088
  Re(e, t);
7089
7089
  break;
7090
7090
  case "qrcode":
7091
- ue(e, t);
7091
+ me(e, t);
7092
7092
  break;
7093
7093
  case "barcode":
7094
- me(e, t);
7094
+ ue(e, t);
7095
7095
  break;
7096
7096
  case "sticker":
7097
7097
  De(e, t);
@@ -7104,7 +7104,7 @@ const fi = $e((f, o) => {
7104
7104
  break;
7105
7105
  }
7106
7106
  e.restore();
7107
- }, me = (e, t) => {
7107
+ }, ue = (e, t) => {
7108
7108
  if (t.imageObject)
7109
7109
  e.drawImage(t.imageObject, 0, 0, t.width, t.height);
7110
7110
  else if (t.src && !t.imageLoading) {
@@ -7124,7 +7124,7 @@ const fi = $e((f, o) => {
7124
7124
  );
7125
7125
  }, r.src = t.src, e.fillStyle = "#f0f0f0", e.fillRect(0, 0, t.width, t.height), e.strokeStyle = "#ccc", e.strokeRect(0, 0, t.width, t.height), e.fillStyle = "#666", e.font = "12px Arial", e.textAlign = "center", e.textBaseline = "middle", e.fillText("Loading...", t.width / 2, t.height / 2);
7126
7126
  } else t.imageLoading ? (e.fillStyle = "#f0f0f0", e.fillRect(0, 0, t.width, t.height), e.strokeStyle = "#ccc", e.strokeRect(0, 0, t.width, t.height), e.fillStyle = "#666", e.font = "12px Arial", e.textAlign = "center", e.textBaseline = "middle", e.fillText("Loading...", t.width / 2, t.height / 2)) : (e.fillStyle = "#f0f0f0", e.fillRect(0, 0, t.width, t.height), e.strokeStyle = "#ccc", e.strokeRect(0, 0, t.width, t.height), e.fillStyle = "#666", e.font = "12px Arial", e.textAlign = "center", e.textBaseline = "middle", e.fillText("No Barcode", t.width / 2, t.height / 2));
7127
- }, ue = (e, t) => {
7127
+ }, me = (e, t) => {
7128
7128
  if (t.imageObject)
7129
7129
  e.drawImage(t.imageObject, 0, 0, t.width, t.height);
7130
7130
  else if (t.src && !t.imageLoading) {
@@ -7161,22 +7161,22 @@ const fi = $e((f, o) => {
7161
7161
  }
7162
7162
  e.font = `${t.fontStyle || "normal"} ${t.fontWeight || "normal"} ${t.fontSize || 20}px ${t.fontFamily || "Arial"}`, e.fillStyle = t.fill || "#000000", e.textAlign = t.textAlign || "left", e.textBaseline = "top", t.opacity !== void 0 && (e.globalAlpha = t.opacity), t.stroke && t.strokeWidth > 0 && (e.strokeStyle = t.stroke, e.lineWidth = t.strokeWidth);
7163
7163
  const d = r.split(`
7164
- `), x = (t.fontSize || 20) * (t.lineHeight || 1.2), u = Math.max(...d.map((S) => e.measureText(S).width)), w = d.length * x;
7164
+ `), x = (t.fontSize || 20) * (t.lineHeight || 1.2), m = Math.max(...d.map((S) => e.measureText(S).width)), w = d.length * x;
7165
7165
  if (t.backgroundColor && t.backgroundColor !== "transparent") {
7166
7166
  e.fillStyle = t.backgroundColor;
7167
7167
  const S = t.backgroundPadding || 4;
7168
7168
  e.fillRect(
7169
7169
  -S,
7170
7170
  -S,
7171
- u + S * 2,
7171
+ m + S * 2,
7172
7172
  w + S * 2
7173
7173
  ), e.fillStyle = t.fill || "#000000";
7174
7174
  }
7175
7175
  d.forEach((S, b) => {
7176
7176
  const R = b * x, A = e.measureText(S).width;
7177
7177
  t.stroke && t.strokeWidth > 0 && e.strokeText(S, 0, R), e.fillText(S, 0, R);
7178
- const z = t.fontSize || 20, $ = t.decorationColor || t.fill || "#000000", dt = Math.max(1, z / 20);
7179
- if (e.strokeStyle = $, e.lineWidth = dt, t.textDecoration === "underline" || t.underline) {
7178
+ const z = t.fontSize || 20, H = t.decorationColor || t.fill || "#000000", dt = Math.max(1, z / 20);
7179
+ if (e.strokeStyle = H, e.lineWidth = dt, t.textDecoration === "underline" || t.underline) {
7180
7180
  const ot = R + z + 2;
7181
7181
  e.beginPath(), e.moveTo(0, ot), e.lineTo(A, ot), e.stroke();
7182
7182
  }
@@ -7214,10 +7214,10 @@ const fi = $e((f, o) => {
7214
7214
  const r = t.width / 2;
7215
7215
  t.height / 2, e.beginPath(), e.moveTo(r, 0), e.lineTo(0, t.height), e.lineTo(t.width, t.height), e.closePath(), t.fill && t.fill !== "transparent" && (e.fillStyle = t.fill, e.fill()), t.stroke && t.strokeWidth > 0 && (e.strokeStyle = t.stroke, e.lineWidth = t.strokeWidth, e.stroke());
7216
7216
  }, ke = (e, t) => {
7217
- const r = t.width / 2, d = t.height / 2, x = Math.min(t.width, t.height) / 2, u = x * 0.4, w = t.numPoints || 5;
7217
+ const r = t.width / 2, d = t.height / 2, x = Math.min(t.width, t.height) / 2, m = x * 0.4, w = t.numPoints || 5;
7218
7218
  e.beginPath();
7219
7219
  for (let S = 0; S < w * 2; S++) {
7220
- const b = S % 2 === 0 ? x : u, R = S * Math.PI / w, A = r + Math.cos(R) * b, z = d + Math.sin(R) * b;
7220
+ const b = S % 2 === 0 ? x : m, R = S * Math.PI / w, A = r + Math.cos(R) * b, z = d + Math.sin(R) * b;
7221
7221
  S === 0 ? e.moveTo(A, z) : e.lineTo(A, z);
7222
7222
  }
7223
7223
  e.closePath(), t.fill && t.fill !== "transparent" && (e.fillStyle = t.fill, e.fill()), t.stroke && t.strokeWidth > 0 && (e.strokeStyle = t.stroke, e.lineWidth = t.strokeWidth, e.stroke());
@@ -7228,57 +7228,57 @@ const fi = $e((f, o) => {
7228
7228
  const r = t.width / 2, d = t.height / 2;
7229
7229
  e.beginPath(), e.moveTo(r, 0), e.lineTo(t.width, d), e.lineTo(r, t.height), e.lineTo(0, d), e.closePath(), t.fill && t.fill !== "transparent" && (e.fillStyle = t.fill, e.fill()), t.stroke && t.strokeWidth > 0 && (e.strokeStyle = t.stroke, e.lineWidth = t.strokeWidth, e.stroke());
7230
7230
  }, Ce = (e, t) => {
7231
- const r = t.width / 2, d = t.height / 2, x = Math.min(t.width, t.height) / 2, u = 6;
7231
+ const r = t.width / 2, d = t.height / 2, x = Math.min(t.width, t.height) / 2, m = 6;
7232
7232
  e.beginPath();
7233
- for (let w = 0; w < u; w++) {
7234
- const S = w * 2 * Math.PI / u - Math.PI / 2, b = r + x * Math.cos(S), R = d + x * Math.sin(S);
7233
+ for (let w = 0; w < m; w++) {
7234
+ const S = w * 2 * Math.PI / m - Math.PI / 2, b = r + x * Math.cos(S), R = d + x * Math.sin(S);
7235
7235
  w === 0 ? e.moveTo(b, R) : e.lineTo(b, R);
7236
7236
  }
7237
7237
  e.closePath(), t.fill && t.fill !== "transparent" && (e.fillStyle = t.fill, e.fill()), t.stroke && t.strokeWidth > 0 && (e.strokeStyle = t.stroke, e.lineWidth = t.strokeWidth, e.stroke());
7238
- }, je = (e, t) => {
7239
- const r = t.width / 2, d = t.height / 2, x = Math.min(t.width, t.height) / 2, u = 5;
7238
+ }, Te = (e, t) => {
7239
+ const r = t.width / 2, d = t.height / 2, x = Math.min(t.width, t.height) / 2, m = 5;
7240
7240
  e.beginPath();
7241
- for (let w = 0; w < u; w++) {
7242
- const S = w * 2 * Math.PI / u - Math.PI / 2, b = r + x * Math.cos(S), R = d + x * Math.sin(S);
7241
+ for (let w = 0; w < m; w++) {
7242
+ const S = w * 2 * Math.PI / m - Math.PI / 2, b = r + x * Math.cos(S), R = d + x * Math.sin(S);
7243
7243
  w === 0 ? e.moveTo(b, R) : e.lineTo(b, R);
7244
7244
  }
7245
7245
  e.closePath(), t.fill && t.fill !== "transparent" && (e.fillStyle = t.fill, e.fill()), t.stroke && t.strokeWidth > 0 && (e.strokeStyle = t.stroke, e.lineWidth = t.strokeWidth, e.stroke());
7246
- }, Te = (e, t) => {
7247
- const r = t.width, d = t.height, x = 0, u = 0;
7246
+ }, je = (e, t) => {
7247
+ const r = t.width, d = t.height, x = 0, m = 0;
7248
7248
  e.beginPath();
7249
7249
  const w = d * 0.3;
7250
- e.moveTo(x + r / 2, u + w), e.bezierCurveTo(
7250
+ e.moveTo(x + r / 2, m + w), e.bezierCurveTo(
7251
7251
  x + r / 2,
7252
- u,
7252
+ m,
7253
7253
  x,
7254
- u,
7254
+ m,
7255
7255
  x,
7256
- u + w
7256
+ m + w
7257
7257
  ), e.bezierCurveTo(
7258
7258
  x,
7259
- u + (d + w) / 2,
7259
+ m + (d + w) / 2,
7260
7260
  x + r / 2,
7261
- u + (d + w) / 2,
7261
+ m + (d + w) / 2,
7262
7262
  x + r / 2,
7263
- u + d
7263
+ m + d
7264
7264
  ), e.bezierCurveTo(
7265
7265
  x + r / 2,
7266
- u + (d + w) / 2,
7266
+ m + (d + w) / 2,
7267
7267
  x + r,
7268
- u + (d + w) / 2,
7268
+ m + (d + w) / 2,
7269
7269
  x + r,
7270
- u + w
7270
+ m + w
7271
7271
  ), e.bezierCurveTo(
7272
7272
  x + r,
7273
- u,
7273
+ m,
7274
7274
  x + r / 2,
7275
- u,
7275
+ m,
7276
7276
  x + r / 2,
7277
- u + w
7277
+ m + w
7278
7278
  ), e.closePath(), t.fill && t.fill !== "transparent" && (e.fillStyle = t.fill, e.fill()), t.stroke && t.strokeWidth > 0 && (e.strokeStyle = t.stroke, e.lineWidth = t.strokeWidth, e.stroke());
7279
7279
  }, Ne = (e, t) => {
7280
- const r = t.width / 2, d = t.height / 2, x = t.width / 2, u = t.height / 2;
7281
- e.beginPath(), e.ellipse(r, d, x, u, 0, 0, 2 * Math.PI), t.fill && t.fill !== "transparent" && (e.fillStyle = t.fill, e.fill()), t.stroke && t.strokeWidth > 0 && (e.strokeStyle = t.stroke, e.lineWidth = t.strokeWidth, e.stroke());
7280
+ const r = t.width / 2, d = t.height / 2, x = t.width / 2, m = t.height / 2;
7281
+ e.beginPath(), e.ellipse(r, d, x, m, 0, 0, 2 * Math.PI), t.fill && t.fill !== "transparent" && (e.fillStyle = t.fill, e.fill()), t.stroke && t.strokeWidth > 0 && (e.strokeStyle = t.stroke, e.lineWidth = t.strokeWidth, e.stroke());
7282
7282
  }, Ie = (e, t) => {
7283
7283
  const r = Math.min(t.width, t.height) * 0.1;
7284
7284
  At(e, 0, 0, t.width, t.height, r), t.fill && t.fill !== "transparent" && (e.fillStyle = t.fill, e.fill()), t.stroke && t.strokeWidth > 0 && (e.strokeStyle = t.stroke, e.lineWidth = t.strokeWidth, e.stroke());
@@ -7343,13 +7343,13 @@ const fi = $e((f, o) => {
7343
7343
  e.fillStyle = "#f9f9f9", e.fillRect(0, 0, t.width, t.height), e.strokeStyle = "#ddd", e.lineWidth = 2, e.strokeRect(0, 0, t.width, t.height), e.fillStyle = "#999", e.font = "24px Arial", e.textAlign = "center", e.textBaseline = "middle", e.fillText("🧵", t.width / 2, t.height / 2 - 10), e.fillStyle = "#666", e.font = "12px Arial", e.fillText(r, t.width / 2, t.height / 2 + 15);
7344
7344
  }, Ht = (e, t, r) => {
7345
7345
  if (!r) return !1;
7346
- const d = r.x + r.width / 2, x = r.y + r.height / 2, u = e - d, w = t - x, S = -(r.rotation || 0) * Math.PI / 180, b = Math.cos(S), R = Math.sin(S), A = u * b - w * R, z = u * R + w * b, $ = r.width / 2, dt = r.height / 2;
7347
- return A >= -$ && A <= $ && z >= -dt && z <= dt;
7346
+ const d = r.x + r.width / 2, x = r.y + r.height / 2, m = e - d, w = t - x, S = -(r.rotation || 0) * Math.PI / 180, b = Math.cos(S), R = Math.sin(S), A = m * b - w * R, z = m * R + w * b, H = r.width / 2, dt = r.height / 2;
7347
+ return A >= -H && A <= H && z >= -dt && z <= dt;
7348
7348
  }, Be = at(() => {
7349
- (I || m || j) && lt(), E(!1), B(!1), p(!1), O(null);
7349
+ (I || u || j) && lt(), E(!1), B(!1), p(!1), O(null);
7350
7350
  const e = K.current;
7351
7351
  e && (e.style.cursor = "default");
7352
- }, [I, m, j, lt]);
7352
+ }, [I, u, j, lt]);
7353
7353
  rt(() => {
7354
7354
  const e = (t) => {
7355
7355
  if (l) return;
@@ -7357,22 +7357,22 @@ const fi = $e((f, o) => {
7357
7357
  if (!(r && (r.tagName === "INPUT" || r.tagName === "TEXTAREA" || r.tagName === "SELECT" || r.isContentEditable)) && ((t.ctrlKey || t.metaKey) && (t.key === "z" && !t.shiftKey ? (t.preventDefault(), Ft()) : (t.key === "z" && t.shiftKey || t.key === "y") && (t.preventDefault(), bt())), (t.key === "Delete" || t.key === "Backspace") && c && (Mt(c.id), t.preventDefault()), (t.ctrlKey || t.metaKey) && t.key === "d" && c && (_t(c.id), t.preventDefault()), c && ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(t.key))) {
7358
7358
  t.preventDefault();
7359
7359
  const x = t.shiftKey ? 10 : 1;
7360
- let u = {};
7360
+ let m = {};
7361
7361
  switch (t.key) {
7362
7362
  case "ArrowUp":
7363
- u.y = c.y - x;
7363
+ m.y = c.y - x;
7364
7364
  break;
7365
7365
  case "ArrowDown":
7366
- u.y = c.y + x;
7366
+ m.y = c.y + x;
7367
7367
  break;
7368
7368
  case "ArrowLeft":
7369
- u.x = c.x - x;
7369
+ m.x = c.x - x;
7370
7370
  break;
7371
7371
  case "ArrowRight":
7372
- u.x = c.x + x;
7372
+ m.x = c.x + x;
7373
7373
  break;
7374
7374
  }
7375
- Gt(c.id, u), lt();
7375
+ Gt(c.id, m), lt();
7376
7376
  }
7377
7377
  };
7378
7378
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
@@ -7432,13 +7432,13 @@ const fi = $e((f, o) => {
7432
7432
  console.warn(`Unknown element type: ${e}`);
7433
7433
  return;
7434
7434
  }
7435
- n((d) => [...d, r]), F(r), lt();
7435
+ n((d) => [...d, r]), C(r), lt();
7436
7436
  }, Gt = (e, t) => {
7437
7437
  n((r) => r.map(
7438
7438
  (d) => d.id === e ? { ...d, ...t } : d
7439
- )), c && c.id === e && F((r) => ({ ...r, ...t }));
7439
+ )), c && c.id === e && C((r) => ({ ...r, ...t }));
7440
7440
  }, Mt = at(() => {
7441
- c && (n((e) => e.filter((t) => t.id !== c.id)), F(null), lt());
7441
+ c && (n((e) => e.filter((t) => t.id !== c.id)), C(null), lt());
7442
7442
  }, [c, lt]), _t = (e) => {
7443
7443
  const t = h.find((r) => r.id === e);
7444
7444
  if (t) {
@@ -7448,28 +7448,39 @@ const fi = $e((f, o) => {
7448
7448
  x: t.x + 20,
7449
7449
  y: t.y + 20
7450
7450
  };
7451
- n((d) => [...d, r]), F(r), lt();
7451
+ n((d) => [...d, r]), C(r), lt();
7452
7452
  }
7453
7453
  }, Yt = (e, t) => {
7454
- const r = h.findIndex((u) => u.id === e);
7454
+ const r = h.findIndex((m) => m.id === e);
7455
7455
  if (r === -1) return;
7456
7456
  const d = [...h], x = d[r];
7457
7457
  t === "up" && r < d.length - 1 ? (d[r] = d[r + 1], d[r + 1] = x) : t === "down" && r > 0 ? (d[r] = d[r - 1], d[r - 1] = x) : t === "top" ? (d.splice(r, 1), d.push(x)) : t === "bottom" && (d.splice(r, 1), d.unshift(x)), n(d), lt();
7458
7458
  };
7459
7459
  at(() => {
7460
- C && H((e) => ({
7460
+ F && $((e) => ({
7461
7461
  ...e,
7462
- [C.sectionName]: {
7462
+ [F.sectionName]: {
7463
7463
  elements: [...h],
7464
- selectedColor: _
7464
+ selectedColor: G
7465
7465
  }
7466
7466
  }));
7467
- }, [C, h, _]);
7468
- const [, We] = He((e) => e + 1, 0);
7467
+ }, [F, h, G]);
7468
+ const [, We] = Ge((e) => e + 1, 0);
7469
7469
  setTimeout(() => {
7470
7470
  We();
7471
- }, 20), Ge(o, () => ({
7471
+ }, 20);
7472
+ const Me = at(() => {
7473
+ F && $((e) => ({
7474
+ ...e,
7475
+ [F.sectionName]: {
7476
+ elements: [...h],
7477
+ selectedColor: G
7478
+ }
7479
+ }));
7480
+ }, [F, h, G]);
7481
+ _e(o, () => ({
7472
7482
  handleSectionChange: qt,
7483
+ flushCurrentSectionDesign: Me,
7473
7484
  // Export methods that return download-ready data
7474
7485
  exportPrintReady: async (e = "png") => await Wt(e, !1),
7475
7486
  exportFullDesign: async (e = "png") => await Wt(e, !0),
@@ -7480,24 +7491,23 @@ const fi = $e((f, o) => {
7480
7491
  // NEW: Export methods that return JSON with File objects
7481
7492
  exportAllDesignsAsJSON: async (e = "png") => {
7482
7493
  try {
7483
- const t = St();
7484
- console.log("canvas data to export: ", t);
7485
- const r = {}, d = (C == null ? void 0 : C.sectionName) || "main";
7486
- r[d] = {
7494
+ const t = St(), r = (F == null ? void 0 : F.sectionName) || "main", d = {
7487
7495
  elements: t.elements,
7488
7496
  selectedColor: t.selectedColor,
7489
7497
  canvasWidth: t.canvasWidth,
7490
7498
  canvasHeight: t.canvasHeight
7491
- }, t.sectionDesigns && typeof t.sectionDesigns == "object" && Object.assign(r, t.sectionDesigns);
7492
- const x = s.sections && s.sections.length > 0 ? s.sections : [{
7493
- id: d,
7494
- sectionName: d,
7495
- image: C == null ? void 0 : C.sectionImage,
7496
- sectionImage: C == null ? void 0 : C.sectionImage
7499
+ }, x = {
7500
+ ...t.sectionDesigns || {},
7501
+ [r]: d
7502
+ }, m = s.sections && s.sections.length > 0 ? s.sections : [{
7503
+ id: r,
7504
+ sectionName: r,
7505
+ image: F == null ? void 0 : F.sectionImage,
7506
+ sectionImage: F == null ? void 0 : F.sectionImage
7497
7507
  }];
7498
7508
  return await Bt.current.exportAllSectionsAsJSON(
7499
- r,
7500
7509
  x,
7510
+ m,
7501
7511
  k,
7502
7512
  W,
7503
7513
  e,
@@ -7516,7 +7526,7 @@ const fi = $e((f, o) => {
7516
7526
  }
7517
7527
  }
7518
7528
  }));
7519
- const mt = gt(null), Lt = gt(!1), V = at(() => {
7529
+ const ut = gt(null), Lt = gt(!1), V = at(() => {
7520
7530
  const e = K.current;
7521
7531
  if (!e || Lt.current) return;
7522
7532
  Lt.current = !0;
@@ -7525,8 +7535,8 @@ const fi = $e((f, o) => {
7525
7535
  t.save(), t.globalAlpha = r.opacity || 1, ye(t, r), t.restore();
7526
7536
  }), c && fe(t, c), Lt.current = !1;
7527
7537
  }, [h, c, k, W, M]), vt = at(() => {
7528
- mt.current && cancelAnimationFrame(mt.current), mt.current = requestAnimationFrame(() => {
7529
- V(), mt.current = null;
7538
+ ut.current && cancelAnimationFrame(ut.current), ut.current = requestAnimationFrame(() => {
7539
+ V(), ut.current = null;
7530
7540
  });
7531
7541
  }, [V]);
7532
7542
  rt(() => {
@@ -7534,15 +7544,15 @@ const fi = $e((f, o) => {
7534
7544
  }, [h, c, k, W, M, vt]), rt(() => {
7535
7545
  wt.current && vt();
7536
7546
  }, [wt.current, vt]), rt(() => () => {
7537
- mt.current && cancelAnimationFrame(mt.current);
7547
+ ut.current && cancelAnimationFrame(ut.current);
7538
7548
  }, []);
7539
7549
  const Pt = at(() => {
7540
- V(), (I || m || j) && (mt.current = requestAnimationFrame(Pt));
7541
- }, [V, I, m, j]);
7550
+ V(), (I || u || j) && (ut.current = requestAnimationFrame(Pt));
7551
+ }, [V, I, u, j]);
7542
7552
  rt(() => {
7543
- I || m || j ? Pt() : (mt.current && (cancelAnimationFrame(mt.current), mt.current = null), vt());
7544
- }, [I, m, j, Pt, vt]);
7545
- const Me = at((e) => {
7553
+ I || u || j ? Pt() : (ut.current && (cancelAnimationFrame(ut.current), ut.current = null), vt());
7554
+ }, [I, u, j, Pt, vt]);
7555
+ const Le = at((e) => {
7546
7556
  if (l) return;
7547
7557
  const r = K.current.getBoundingClientRect(), d = (e.clientX - r.left) / Q, x = (e.clientY - r.top) / Q;
7548
7558
  if (X({ x: d, y: x }), c) {
@@ -7569,58 +7579,58 @@ const fi = $e((f, o) => {
7569
7579
  return;
7570
7580
  }
7571
7581
  }
7572
- let u = null;
7582
+ let m = null;
7573
7583
  for (let w = h.length - 1; w >= 0; w--)
7574
7584
  if (Ht(d, x, h[w])) {
7575
- u = h[w];
7585
+ m = h[w];
7576
7586
  break;
7577
7587
  }
7578
- u ? (F(u), E(!0), X({
7588
+ m ? (C(m), E(!0), X({
7579
7589
  x: d,
7580
7590
  y: x,
7581
- offsetX: d - u.x,
7582
- offsetY: x - u.y
7583
- })) : F(null), V();
7584
- }, [l, Q, c, h, V]), Le = at((e) => {
7591
+ offsetX: d - m.x,
7592
+ offsetY: x - m.y
7593
+ })) : C(null), V();
7594
+ }, [l, Q, c, h, V]), Pe = at((e) => {
7585
7595
  if (l) return;
7586
7596
  const t = K.current, r = t.getBoundingClientRect(), d = (e.clientX - r.left) / Q, x = (e.clientY - r.top) / Q;
7587
- if (c && !I && !m && !j) {
7588
- const u = $t(d, x, c);
7589
- u ? u === "rotate" ? t.style.cursor = "grab" : t.style.cursor = u : Ht(d, x, c) ? t.style.cursor = "move" : t.style.cursor = "default";
7597
+ if (c && !I && !u && !j) {
7598
+ const m = $t(d, x, c);
7599
+ m ? m === "rotate" ? t.style.cursor = "grab" : t.style.cursor = m : Ht(d, x, c) ? t.style.cursor = "move" : t.style.cursor = "default";
7590
7600
  } else
7591
7601
  t.style.cursor = I ? "grabbing" : "default";
7592
7602
  if (j && c) {
7593
- const u = c.x + c.width / 2, w = c.y + c.height / 2, b = Math.atan2(x - w, d - u) * 180 / Math.PI - v.initialAngle;
7603
+ const m = c.x + c.width / 2, w = c.y + c.height / 2, b = Math.atan2(x - w, d - m) * 180 / Math.PI - v.initialAngle;
7594
7604
  let R = v.initialRotation + b;
7595
7605
  e.shiftKey && (R = Math.round(R / 15) * 15), R = (R % 360 + 360) % 360, n(
7596
7606
  (A) => A.map(
7597
7607
  (z) => z.id === c.id ? { ...z, rotation: R } : z
7598
7608
  )
7599
- ), F((A) => ({ ...A, rotation: R })), V();
7609
+ ), C((A) => ({ ...A, rotation: R })), V();
7600
7610
  return;
7601
7611
  }
7602
- if (m && c && T) {
7603
- const u = d - v.x, w = x - v.y;
7612
+ if (u && c && T) {
7613
+ const m = d - v.x, w = x - v.y;
7604
7614
  let S = v.initialWidth, b = v.initialHeight, R = v.initialX, A = v.initialY;
7605
7615
  switch (T) {
7606
7616
  case "se-resize":
7607
- S = Math.max(20, v.initialWidth + u), b = Math.max(20, v.initialHeight + w);
7617
+ S = Math.max(20, v.initialWidth + m), b = Math.max(20, v.initialHeight + w);
7608
7618
  break;
7609
7619
  case "sw-resize":
7610
- S = Math.max(20, v.initialWidth - u), b = Math.max(20, v.initialHeight + w), R = v.initialX + (v.initialWidth - S);
7620
+ S = Math.max(20, v.initialWidth - m), b = Math.max(20, v.initialHeight + w), R = v.initialX + (v.initialWidth - S);
7611
7621
  break;
7612
7622
  case "ne-resize":
7613
- S = Math.max(20, v.initialWidth + u), b = Math.max(20, v.initialHeight - w), A = v.initialY + (v.initialHeight - b);
7623
+ S = Math.max(20, v.initialWidth + m), b = Math.max(20, v.initialHeight - w), A = v.initialY + (v.initialHeight - b);
7614
7624
  break;
7615
7625
  case "nw-resize":
7616
- S = Math.max(20, v.initialWidth - u), b = Math.max(20, v.initialHeight - w), R = v.initialX + (v.initialWidth - S), A = v.initialY + (v.initialHeight - b);
7626
+ S = Math.max(20, v.initialWidth - m), b = Math.max(20, v.initialHeight - w), R = v.initialX + (v.initialWidth - S), A = v.initialY + (v.initialHeight - b);
7617
7627
  break;
7618
7628
  }
7619
7629
  if (e.shiftKey && c.type !== "text") {
7620
- const $ = v.initialWidth / v.initialHeight;
7621
- T.includes("e"), b = S / $, T.includes("n") && (A = v.initialY + (v.initialHeight - b));
7630
+ const H = v.initialWidth / v.initialHeight;
7631
+ T.includes("e"), b = S / H, T.includes("n") && (A = v.initialY + (v.initialHeight - b));
7622
7632
  }
7623
- Y && (R = ut(R), A = ut(A), S = ut(S), b = ut(b));
7633
+ Y && (R = mt(R), A = mt(A), S = mt(S), b = mt(b));
7624
7634
  const z = {
7625
7635
  ...c,
7626
7636
  x: R,
@@ -7629,37 +7639,37 @@ const fi = $e((f, o) => {
7629
7639
  height: b
7630
7640
  };
7631
7641
  n(
7632
- ($) => $.map(
7642
+ (H) => H.map(
7633
7643
  (dt) => dt.id === c.id ? z : dt
7634
7644
  )
7635
- ), F(z), V();
7645
+ ), C(z), V();
7636
7646
  return;
7637
7647
  }
7638
7648
  if (I && c) {
7639
- let u = d - v.offsetX, w = x - v.offsetY;
7640
- Y && (u = ut(u), w = ut(w)), u = Math.max(0, Math.min(k - c.width, u)), w = Math.max(0, Math.min(W - c.height, w));
7649
+ let m = d - v.offsetX, w = x - v.offsetY;
7650
+ Y && (m = mt(m), w = mt(w)), m = Math.max(0, Math.min(k - c.width, m)), w = Math.max(0, Math.min(W - c.height, w));
7641
7651
  const S = {
7642
7652
  ...c,
7643
- x: u,
7653
+ x: m,
7644
7654
  y: w
7645
7655
  };
7646
7656
  n(
7647
7657
  (b) => b.map(
7648
7658
  (R) => R.id === c.id ? S : R
7649
7659
  )
7650
- ), F(S), V();
7660
+ ), C(S), V();
7651
7661
  }
7652
- }, [l, Q, c, I, m, j, T, v, Y, k, W, h, V]), qt = at((e) => {
7653
- C && H((r) => ({
7662
+ }, [l, Q, c, I, u, j, T, v, Y, k, W, h, V]), qt = at((e) => {
7663
+ F && $((r) => ({
7654
7664
  ...r,
7655
- [C.sectionName]: {
7665
+ [F.sectionName]: {
7656
7666
  elements: h.map((d) => d.type === "image" ? {
7657
7667
  ...d,
7658
7668
  // Keep the image data reference
7659
7669
  imageData: d.imageData,
7660
7670
  src: d.src
7661
7671
  } : d),
7662
- selectedColor: _
7672
+ selectedColor: G
7663
7673
  }
7664
7674
  }));
7665
7675
  const t = L[e.sectionName];
@@ -7669,7 +7679,7 @@ const fi = $e((f, o) => {
7669
7679
  const x = new Image();
7670
7680
  return x.onload = () => {
7671
7681
  n(
7672
- (u) => u.map(
7682
+ (m) => m.map(
7673
7683
  (w) => w.id === d.id ? { ...w, imageData: x } : w
7674
7684
  )
7675
7685
  ), V();
@@ -7677,11 +7687,11 @@ const fi = $e((f, o) => {
7677
7687
  }
7678
7688
  return d;
7679
7689
  });
7680
- n(r), st(t.selectedColor || _);
7690
+ n(r), st(t.selectedColor || G);
7681
7691
  } else
7682
7692
  n([]);
7683
- et(e), F(null);
7684
- }, [C, h, _, L, V]), Pe = at((e) => {
7693
+ et(e), C(null);
7694
+ }, [F, h, G, L, V]), Ue = at((e) => {
7685
7695
  if (e && e.type.startsWith("image/")) {
7686
7696
  const t = new FileReader();
7687
7697
  t.onload = (r) => {
@@ -7690,8 +7700,8 @@ const fi = $e((f, o) => {
7690
7700
  const x = {
7691
7701
  id: ht(),
7692
7702
  type: "image",
7693
- x: ut(k / 2 - 100),
7694
- y: ut(W / 2 - 100),
7703
+ x: mt(k / 2 - 100),
7704
+ y: mt(W / 2 - 100),
7695
7705
  width: Math.min(d.width, 200),
7696
7706
  // Limit initial size
7697
7707
  height: Math.min(d.height, 200),
@@ -7700,8 +7710,8 @@ const fi = $e((f, o) => {
7700
7710
  src: r.target.result,
7701
7711
  originalWidth: d.width,
7702
7712
  originalHeight: d.height
7703
- }, u = d.width / d.height;
7704
- x.width / x.height !== u && (x.width / u <= 200 ? x.height = x.width / u : x.width = x.height * u), n((w) => [...w, x]), F(x), lt();
7713
+ }, m = d.width / d.height;
7714
+ x.width / x.height !== m && (x.width / m <= 200 ? x.height = x.width / m : x.width = x.height * m), n((w) => [...w, x]), C(x), lt();
7705
7715
  }, d.onerror = () => {
7706
7716
  console.error("Failed to load uploaded image"), alert("Failed to load the uploaded image. Please try again.");
7707
7717
  }, d.src = r.target.result;
@@ -7710,8 +7720,8 @@ const fi = $e((f, o) => {
7710
7720
  }, t.readAsDataURL(e);
7711
7721
  } else
7712
7722
  alert("Please select a valid image file.");
7713
- }, [k, W, ut, ht, lt]), Vt = at(
7714
- Ue(() => {
7723
+ }, [k, W, mt, ht, lt]), Vt = at(
7724
+ Oe(() => {
7715
7725
  V();
7716
7726
  }, 16),
7717
7727
  // 60fps limit
@@ -7720,33 +7730,33 @@ const fi = $e((f, o) => {
7720
7730
  rt(() => {
7721
7731
  zt.current || Vt();
7722
7732
  }, [h, c, M, Vt]);
7723
- function Ue(e, t) {
7733
+ function Oe(e, t) {
7724
7734
  let r;
7725
7735
  return function(...x) {
7726
- const u = () => {
7736
+ const m = () => {
7727
7737
  clearTimeout(r), e(...x);
7728
7738
  };
7729
- clearTimeout(r), r = setTimeout(u, t);
7739
+ clearTimeout(r), r = setTimeout(m, t);
7730
7740
  };
7731
7741
  }
7732
7742
  rt(() => {
7733
- pt.current && Xt(pt.current, _);
7734
- }, [_]), rt(() => {
7743
+ pt.current && Xt(pt.current, G);
7744
+ }, [G]), rt(() => {
7735
7745
  V();
7736
7746
  }, [V]);
7737
- const Oe = (e, t, r) => (0.2126 * e + 0.7152 * t + 0.0722 * r) / 255, Xt = at((e, t) => {
7747
+ const Qe = (e, t, r) => (0.2126 * e + 0.7152 * t + 0.0722 * r) / 255, Xt = at((e, t) => {
7738
7748
  const r = Ot.current, d = r.getContext("2d");
7739
7749
  r.width = k, r.height = W, d.clearRect(0, 0, k, W), d.drawImage(e, 0, 0, k, W);
7740
- const x = d.getImageData(0, 0, k, W), u = x.data, w = ge(t);
7750
+ const x = d.getImageData(0, 0, k, W), m = x.data, w = ge(t);
7741
7751
  if (!w) {
7742
7752
  zt.current = !1;
7743
7753
  return;
7744
7754
  }
7745
7755
  const { r: S, g: b, b: R } = w;
7746
- for (let z = 0; z < u.length; z += 4) {
7747
- if (u[z + 3] === 0) continue;
7748
- const dt = Oe(u[z], u[z + 1], u[z + 2]);
7749
- u[z] = Math.round(S * dt), u[z + 1] = Math.round(b * dt), u[z + 2] = Math.round(R * dt);
7756
+ for (let z = 0; z < m.length; z += 4) {
7757
+ if (m[z + 3] === 0) continue;
7758
+ const dt = Qe(m[z], m[z + 1], m[z + 2]);
7759
+ m[z] = Math.round(S * dt), m[z + 1] = Math.round(b * dt), m[z + 2] = Math.round(R * dt);
7750
7760
  }
7751
7761
  d.putImageData(x, 0, 0);
7752
7762
  const A = new Image();
@@ -7758,9 +7768,9 @@ const fi = $e((f, o) => {
7758
7768
  const t = document.querySelector(".ruler-horizontal"), r = document.querySelector(".ruler-vertical");
7759
7769
  if (!t || !r)
7760
7770
  return { horizontal: [], vertical: [] };
7761
- const d = t.getBoundingClientRect(), x = r.getBoundingClientRect(), u = d.width, w = x.height, S = 50, b = [], R = [];
7762
- for (let A = S; A <= u; A += S)
7763
- A <= u - 20 && b.push({
7771
+ const d = t.getBoundingClientRect(), x = r.getBoundingClientRect(), m = d.width, w = x.height, S = 50, b = [], R = [];
7772
+ for (let A = S; A <= m; A += S)
7773
+ A <= m - 20 && b.push({
7764
7774
  position: A,
7765
7775
  value: Math.round(A / e)
7766
7776
  });
@@ -7796,7 +7806,7 @@ const fi = $e((f, o) => {
7796
7806
  }
7797
7807
  }, [tt, y, Q]), /* @__PURE__ */ i.jsxs("div", { className: "pure-canvas-designer", children: [
7798
7808
  /* @__PURE__ */ i.jsx("div", { className: "designer-header", children: /* @__PURE__ */ i.jsx(
7799
- si,
7809
+ li,
7800
7810
  {
7801
7811
  onAddElement: ze,
7802
7812
  onDeleteElement: () => c && Mt(c.id),
@@ -7806,9 +7816,9 @@ const fi = $e((f, o) => {
7806
7816
  onToggleGrid: () => nt(!M),
7807
7817
  onToggleRulers: () => ct(!tt),
7808
7818
  onToggleSnap: () => P(!Y),
7809
- onImageUpload: Pe,
7819
+ onImageUpload: Ue,
7810
7820
  canUndo: J > 0,
7811
- canRedo: J < G.length - 1,
7821
+ canRedo: J < _.length - 1,
7812
7822
  showGrid: M,
7813
7823
  showRulers: tt,
7814
7824
  snapToGrid: Y,
@@ -7846,8 +7856,8 @@ const fi = $e((f, o) => {
7846
7856
  ref: K,
7847
7857
  width: k,
7848
7858
  height: W,
7849
- onMouseDown: Me,
7850
- onMouseMove: Le,
7859
+ onMouseDown: Le,
7860
+ onMouseMove: Pe,
7851
7861
  onMouseUp: Be,
7852
7862
  style: {
7853
7863
  border: "1px solid #e2e8f0",
@@ -7859,7 +7869,7 @@ const fi = $e((f, o) => {
7859
7869
  ) }),
7860
7870
  /* @__PURE__ */ i.jsxs("div", { className: "side-panels", children: [
7861
7871
  /* @__PURE__ */ i.jsx(
7862
- li,
7872
+ ni,
7863
7873
  {
7864
7874
  selectedElement: c,
7865
7875
  onUpdate: Gt,
@@ -7869,11 +7879,11 @@ const fi = $e((f, o) => {
7869
7879
  }
7870
7880
  ),
7871
7881
  /* @__PURE__ */ i.jsx(
7872
- ni,
7882
+ ci,
7873
7883
  {
7874
7884
  elements: h,
7875
7885
  selectedElement: c,
7876
- onSelectElement: F,
7886
+ onSelectElement: C,
7877
7887
  onMoveLayer: Yt,
7878
7888
  onDeleteElement: Mt,
7879
7889
  theme: a
@@ -7892,7 +7902,7 @@ const fi = $e((f, o) => {
7892
7902
  return /* @__PURE__ */ i.jsxs(
7893
7903
  "div",
7894
7904
  {
7895
- className: `section-thumbnail compact ${C.sectionName === e.sectionName ? "active" : ""}`,
7905
+ className: `section-thumbnail compact ${F.sectionName === e.sectionName ? "active" : ""}`,
7896
7906
  onClick: (r) => {
7897
7907
  r.stopPropagation();
7898
7908
  const d = s.sections.find((x) => x.sectionName === e.sectionName);
@@ -7928,7 +7938,7 @@ const fi = $e((f, o) => {
7928
7938
  s.colorSettings.slice(0, 3).map((e, t) => /* @__PURE__ */ i.jsxs(
7929
7939
  "div",
7930
7940
  {
7931
- className: `color-swatch-enhanced compact ${_ === e ? "active" : ""}`,
7941
+ className: `color-swatch-enhanced compact ${G === e ? "active" : ""}`,
7932
7942
  onClick: (r) => {
7933
7943
  r.stopPropagation(), st(e);
7934
7944
  },
@@ -7941,7 +7951,7 @@ const fi = $e((f, o) => {
7941
7951
  style: { backgroundColor: e }
7942
7952
  }
7943
7953
  ),
7944
- _ === e && /* @__PURE__ */ i.jsx("div", { className: "color-selection-ring compact" })
7954
+ G === e && /* @__PURE__ */ i.jsx("div", { className: "color-selection-ring compact" })
7945
7955
  ]
7946
7956
  },
7947
7957
  e
@@ -7967,7 +7977,7 @@ const fi = $e((f, o) => {
7967
7977
  /* @__PURE__ */ i.jsx("div", { className: "color-dropdown-menu", style: { display: "none" }, children: s.colorSettings.slice(3).map((e, t) => /* @__PURE__ */ i.jsxs(
7968
7978
  "div",
7969
7979
  {
7970
- className: `color-swatch-dropdown ${_ === e ? "active" : ""}`,
7980
+ className: `color-swatch-dropdown ${G === e ? "active" : ""}`,
7971
7981
  onClick: (r) => {
7972
7982
  r.stopPropagation(), st(e), r.currentTarget.parentElement.style.display = "none";
7973
7983
  },
@@ -8056,7 +8066,7 @@ const fi = $e((f, o) => {
8056
8066
  ] })
8057
8067
  ] });
8058
8068
  });
8059
- fi.displayName = "Mypixia";
8069
+ hi.displayName = "Mypixia";
8060
8070
  export {
8061
- fi as default
8071
+ hi as default
8062
8072
  };