vue-wswg-editor 0.0.14 → 0.0.16

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.
@@ -1,4 +1,4 @@
1
- import { shallowRef as Gt, ref as j, markRaw as Jt, defineComponent as _, computed as Y, onMounted as Bt, onBeforeUnmount as rr, createElementBlock as o, openBlock as X, createElementVNode as c, toDisplayString as U, createVNode as h, unref as G, withDirectives as lt, vModelText as Zt, Fragment as tt, renderList as nt, createBlock as ut, mergeModels as Tt, useModel as rt, onBeforeMount as $t, normalizeClass as I, createCommentVNode as B, vModelSelect as ne, watch as ot, withModifiers as Pt, createTextVNode as Xe, resolveDynamicComponent as Yt, mergeProps as kt, vModelDynamic as $r, vModelCheckbox as Pr, vModelRadio as _r, renderSlot as Or, getCurrentScope as tf, onScopeDispose as ef, toValue as qt, useTemplateRef as rf, nextTick as It, withCtx as xr, normalizeStyle as Lr, createApp as ff, h as Dt } from "vue";
1
+ import { shallowRef as Gt, ref as j, markRaw as Jt, defineComponent as _, computed as Y, onMounted as Rt, onBeforeUnmount as rr, createElementBlock as X, openBlock as o, createElementVNode as i, toDisplayString as U, createVNode as h, unref as G, withDirectives as lt, vModelText as Zt, Fragment as tt, renderList as nt, createBlock as ut, mergeModels as Tt, useModel as rt, onBeforeMount as $t, normalizeClass as I, createCommentVNode as R, vModelSelect as ne, watch as Xt, withModifiers as Pt, createTextVNode as oe, resolveDynamicComponent as Yt, mergeProps as kt, vModelDynamic as $r, vModelCheckbox as Pr, vModelRadio as _r, renderSlot as Or, getCurrentScope as tf, onScopeDispose as ef, toValue as qt, useTemplateRef as rf, nextTick as It, withCtx as xr, normalizeStyle as Lr, createApp as ff, h as Dt } from "vue";
2
2
  const fv = {
3
3
  custom: (t = {}) => ({
4
4
  type: "custom",
@@ -87,7 +87,7 @@ const fv = {
87
87
  ...e
88
88
  })
89
89
  };
90
- function Vr(t) {
90
+ function mr(t) {
91
91
  const e = /* @__PURE__ */ new Set();
92
92
  e.add(t);
93
93
  const r = t.replace(/([A-Z])/g, "_$1").replace(/-/g, "_").toLowerCase().replace(/^_+/, "");
@@ -104,7 +104,7 @@ function fr(t) {
104
104
  const r = t.replace(/[^a-zA-Z0-9]+/g, " ").trim().split(/\s+/).flatMap((f) => f.split(/([A-Z][a-z]*)/).filter(Boolean));
105
105
  return r.length === 0 ? "" : r[0].toLowerCase() + r.slice(1).map((f) => f.charAt(0).toUpperCase() + f.slice(1).toLowerCase()).join("");
106
106
  }
107
- function mr(t) {
107
+ function Vr(t) {
108
108
  if (!t) return "";
109
109
  const r = t.replace(/[_-]/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").split(/\s+/).filter(Boolean);
110
110
  return r.length === 0 ? "" : r.map((f) => f.charAt(0).toUpperCase() + f.slice(1).toLowerCase()).join(" ");
@@ -204,7 +204,7 @@ async function vv() {
204
204
  throw console.error("[vue-wswg-editor:registry] Error during registry initialization:", t), t;
205
205
  }
206
206
  }
207
- const mt = Gt({}), zt = Gt({}), Ht = Gt({}), ye = Gt({}), ae = Gt(void 0);
207
+ const Vt = Gt({}), zt = Gt({}), Ht = Gt({}), ye = Gt({}), ae = Gt(void 0);
208
208
  let Ee = null, Qe = null;
209
209
  function De(t) {
210
210
  if (t && typeof t != "function") {
@@ -218,8 +218,8 @@ function De(t) {
218
218
  }
219
219
  }
220
220
  async function bf() {
221
- Object.keys(mt.value).forEach((e) => {
222
- delete mt.value[e];
221
+ Object.keys(Vt.value).forEach((e) => {
222
+ delete Vt.value[e];
223
223
  });
224
224
  const { modules: t } = await import("vue-wswg-editor:themes");
225
225
  for (const [e, r] of Object.entries(t)) {
@@ -240,24 +240,24 @@ async function bf() {
240
240
  tags: n.tags || [],
241
241
  license: n.license || ""
242
242
  };
243
- mt.value[a] = u;
243
+ Vt.value[a] = u;
244
244
  }
245
- if (Object.keys(mt.value).length === 0) {
245
+ if (Object.keys(Vt.value).length === 0) {
246
246
  console.error("[vue-wswg-editor:registry] No themes found");
247
247
  return;
248
248
  }
249
249
  }
250
250
  function av() {
251
- return Object.values(mt.value);
251
+ return Object.values(Vt.value);
252
252
  }
253
253
  function vr() {
254
254
  if (!ae.value)
255
255
  throw new Error("No active theme found");
256
- return mt.value[ae.value];
256
+ return Vt.value[ae.value];
257
257
  }
258
258
  async function pf(t) {
259
- if (!t || !mt.value[t]) {
260
- const e = Object.keys(mt.value)[0];
259
+ if (!t || !Vt.value[t]) {
260
+ const e = Object.keys(Vt.value)[0];
261
261
  if (!e)
262
262
  throw new Error("[vue-wswg-editor:registry] No themes found. Cannot set active theme.");
263
263
  ae.value = e, console.warn(
@@ -266,7 +266,7 @@ async function pf(t) {
266
266
  } else
267
267
  ae.value = t;
268
268
  }
269
- async function Xf() {
269
+ async function of() {
270
270
  const { modules: t } = await import("vue-wswg-editor:thumbnails");
271
271
  Qe = t;
272
272
  }
@@ -302,14 +302,14 @@ async function Pf() {
302
302
  }
303
303
  }
304
304
  function Nr(t) {
305
- const e = Vr(t);
305
+ const e = mr(t);
306
306
  for (const r of e) {
307
307
  const f = zt.value[r];
308
308
  if (f)
309
309
  return f;
310
310
  }
311
311
  }
312
- async function of() {
312
+ async function Xf() {
313
313
  Object.keys(ye.value).forEach((n) => {
314
314
  delete ye.value[n];
315
315
  });
@@ -360,7 +360,7 @@ async function sf() {
360
360
  }
361
361
  }
362
362
  function Ut(t) {
363
- const e = Vr(t);
363
+ const e = mr(t);
364
364
  for (const r of e) {
365
365
  const f = Ht.value[r];
366
366
  if (f)
@@ -378,9 +378,9 @@ function Tf(t) {
378
378
  return r.default;
379
379
  }
380
380
  async function Wf(t) {
381
- await Pf(), t && (await of(), await Af(), await Xf()), await sf();
381
+ await Pf(), t && (await Xf(), await Af(), await of()), await sf();
382
382
  }
383
- async function Ve(t, e = !0) {
383
+ async function me(t, e = !0) {
384
384
  try {
385
385
  await bf(), await pf(t), await Wf(e);
386
386
  } catch (r) {
@@ -471,7 +471,7 @@ async function Sf(t, e = "blocks") {
471
471
  for (const v of f) {
472
472
  const l = v.type, a = Ut(l);
473
473
  if (r[l] = {
474
- title: (a == null ? void 0 : a.label) || mr(l),
474
+ title: (a == null ? void 0 : a.label) || Vr(l),
475
475
  isValid: !0,
476
476
  errors: {}
477
477
  }, Object.keys((a == null ? void 0 : a.fields) || {}).length !== 0)
@@ -518,19 +518,19 @@ const Hf = /* @__PURE__ */ _({
518
518
  let a = null, u = null;
519
519
  function d(b) {
520
520
  v.value = !0, b.preventDefault();
521
- const p = b.clientX, i = n.value;
522
- function A(s) {
521
+ const p = b.clientX, c = n.value;
522
+ function s(T) {
523
523
  if (!v.value) return;
524
- const y = s.clientX - p, S = Math.max(300, Math.min(800, i - y));
525
- n.value = S, r("sidebarWidth", S);
524
+ const W = T.clientX - p, y = Math.max(300, Math.min(800, c - W));
525
+ n.value = y, r("sidebarWidth", y);
526
526
  }
527
- function T() {
528
- v.value = !1, document.removeEventListener("mousemove", A), document.removeEventListener("mouseup", T), document.body.style.cursor = "", document.body.style.userSelect = "";
527
+ function A() {
528
+ v.value = !1, document.removeEventListener("mousemove", s), document.removeEventListener("mouseup", A), document.body.style.cursor = "", document.body.style.userSelect = "";
529
529
  }
530
- document.addEventListener("mousemove", A), document.addEventListener("mouseup", T), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
530
+ document.addEventListener("mousemove", s), document.addEventListener("mouseup", A), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
531
531
  }
532
532
  const P = Y(() => l.value > 0 ? `${l.value}px` : "0px");
533
- return Bt(() => {
533
+ return Rt(() => {
534
534
  u = () => {
535
535
  const p = document.getElementById("page-preview-container");
536
536
  p && (l.value = p.offsetWidth);
@@ -541,16 +541,16 @@ const Hf = /* @__PURE__ */ _({
541
541
  }), a.observe(b)), window.addEventListener("resize", u);
542
542
  }), rr(() => {
543
543
  a && (a.disconnect(), a = null), u && (window.removeEventListener("resize", u), u = null);
544
- }), (b, p) => (X(), o("div", { class: "resize-handle-wrapper group" }, [
545
- c("div", {
544
+ }), (b, p) => (o(), X("div", { class: "resize-handle-wrapper group" }, [
545
+ i("div", {
546
546
  id: "page-builder-resize-handle",
547
547
  ref_key: "resizeHandle",
548
548
  ref: f,
549
549
  class: "resize-handle shrink-0 cursor-col-resize transition-colors duration-200",
550
550
  onMousedown: d
551
551
  }, null, 544),
552
- c("span", { class: "viewport-size absolute right-1 top-1 opacity-0 transition-opacity duration-200 group-hover:opacity-100" }, [
553
- c("div", { class: "rounded-sm bg-yellow-400 px-1.5 py-1 font-mono text-xs font-medium text-gray-900" }, U(P.value), 1)
552
+ i("span", { class: "viewport-size absolute right-1 top-1 opacity-0 transition-opacity duration-200 group-hover:opacity-100" }, [
553
+ i("div", { class: "rounded-sm bg-yellow-400 px-1.5 py-1 font-mono text-xs font-medium text-gray-900" }, U(P.value), 1)
554
554
  ])
555
555
  ]));
556
556
  }
@@ -561,7 +561,7 @@ const Hf = /* @__PURE__ */ _({
561
561
  return r;
562
562
  }, jf = /* @__PURE__ */ Wt(Hf, [["__scopeId", "data-v-72eeade4"]]);
563
563
  function Of(t, e) {
564
- return X(), o("svg", {
564
+ return o(), X("svg", {
565
565
  xmlns: "http://www.w3.org/2000/svg",
566
566
  fill: "none",
567
567
  viewBox: "0 0 24 24",
@@ -570,7 +570,7 @@ function Of(t, e) {
570
570
  "aria-hidden": "true",
571
571
  "data-slot": "icon"
572
572
  }, [
573
- c("path", {
573
+ i("path", {
574
574
  "stroke-linecap": "round",
575
575
  "stroke-linejoin": "round",
576
576
  d: "M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"
@@ -578,7 +578,7 @@ function Of(t, e) {
578
578
  ]);
579
579
  }
580
580
  function xf(t, e) {
581
- return X(), o("svg", {
581
+ return o(), X("svg", {
582
582
  xmlns: "http://www.w3.org/2000/svg",
583
583
  fill: "none",
584
584
  viewBox: "0 0 24 24",
@@ -587,7 +587,7 @@ function xf(t, e) {
587
587
  "aria-hidden": "true",
588
588
  "data-slot": "icon"
589
589
  }, [
590
- c("path", {
590
+ i("path", {
591
591
  "stroke-linecap": "round",
592
592
  "stroke-linejoin": "round",
593
593
  d: "m4.5 19.5 15-15m0 0H8.25m11.25 0v11.25"
@@ -595,7 +595,7 @@ function xf(t, e) {
595
595
  ]);
596
596
  }
597
597
  function Lf(t, e) {
598
- return X(), o("svg", {
598
+ return o(), X("svg", {
599
599
  xmlns: "http://www.w3.org/2000/svg",
600
600
  fill: "none",
601
601
  viewBox: "0 0 24 24",
@@ -604,15 +604,15 @@ function Lf(t, e) {
604
604
  "aria-hidden": "true",
605
605
  "data-slot": "icon"
606
606
  }, [
607
- c("path", {
607
+ i("path", {
608
608
  "stroke-linecap": "round",
609
609
  "stroke-linejoin": "round",
610
610
  d: "M4.5 10.5 12 3m0 0 7.5 7.5M12 3v18"
611
611
  })
612
612
  ]);
613
613
  }
614
- function Vf(t, e) {
615
- return X(), o("svg", {
614
+ function mf(t, e) {
615
+ return o(), X("svg", {
616
616
  xmlns: "http://www.w3.org/2000/svg",
617
617
  fill: "none",
618
618
  viewBox: "0 0 24 24",
@@ -621,15 +621,15 @@ function Vf(t, e) {
621
621
  "aria-hidden": "true",
622
622
  "data-slot": "icon"
623
623
  }, [
624
- c("path", {
624
+ i("path", {
625
625
  "stroke-linecap": "round",
626
626
  "stroke-linejoin": "round",
627
627
  d: "M3 7.5 7.5 3m0 0L12 7.5M7.5 3v13.5m13.5 0L16.5 21m0 0L12 16.5m4.5 4.5V7.5"
628
628
  })
629
629
  ]);
630
630
  }
631
- function mf(t, e) {
632
- return X(), o("svg", {
631
+ function Vf(t, e) {
632
+ return o(), X("svg", {
633
633
  xmlns: "http://www.w3.org/2000/svg",
634
634
  fill: "none",
635
635
  viewBox: "0 0 24 24",
@@ -638,7 +638,7 @@ function mf(t, e) {
638
638
  "aria-hidden": "true",
639
639
  "data-slot": "icon"
640
640
  }, [
641
- c("path", {
641
+ i("path", {
642
642
  "stroke-linecap": "round",
643
643
  "stroke-linejoin": "round",
644
644
  d: "M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0-3.75-3.75M17.25 21 21 17.25"
@@ -646,7 +646,7 @@ function mf(t, e) {
646
646
  ]);
647
647
  }
648
648
  function Nf(t, e) {
649
- return X(), o("svg", {
649
+ return o(), X("svg", {
650
650
  xmlns: "http://www.w3.org/2000/svg",
651
651
  fill: "none",
652
652
  viewBox: "0 0 24 24",
@@ -655,7 +655,7 @@ function Nf(t, e) {
655
655
  "aria-hidden": "true",
656
656
  "data-slot": "icon"
657
657
  }, [
658
- c("path", {
658
+ i("path", {
659
659
  "stroke-linecap": "round",
660
660
  "stroke-linejoin": "round",
661
661
  d: "M3 4.5h14.25M3 9h9.75M3 13.5h5.25m5.25-.75L17.25 9m0 0L21 12.75M17.25 9v12"
@@ -663,7 +663,7 @@ function Nf(t, e) {
663
663
  ]);
664
664
  }
665
665
  function kf(t, e) {
666
- return X(), o("svg", {
666
+ return o(), X("svg", {
667
667
  xmlns: "http://www.w3.org/2000/svg",
668
668
  fill: "none",
669
669
  viewBox: "0 0 24 24",
@@ -672,7 +672,7 @@ function kf(t, e) {
672
672
  "aria-hidden": "true",
673
673
  "data-slot": "icon"
674
674
  }, [
675
- c("path", {
675
+ i("path", {
676
676
  "stroke-linecap": "round",
677
677
  "stroke-linejoin": "round",
678
678
  d: "m19.5 8.25-7.5 7.5-7.5-7.5"
@@ -680,7 +680,7 @@ function kf(t, e) {
680
680
  ]);
681
681
  }
682
682
  function qf(t, e) {
683
- return X(), o("svg", {
683
+ return o(), X("svg", {
684
684
  xmlns: "http://www.w3.org/2000/svg",
685
685
  fill: "none",
686
686
  viewBox: "0 0 24 24",
@@ -689,7 +689,7 @@ function qf(t, e) {
689
689
  "aria-hidden": "true",
690
690
  "data-slot": "icon"
691
691
  }, [
692
- c("path", {
692
+ i("path", {
693
693
  "stroke-linecap": "round",
694
694
  "stroke-linejoin": "round",
695
695
  d: "m4.5 15.75 7.5-7.5 7.5 7.5"
@@ -697,7 +697,7 @@ function qf(t, e) {
697
697
  ]);
698
698
  }
699
699
  function Jf(t, e) {
700
- return X(), o("svg", {
700
+ return o(), X("svg", {
701
701
  xmlns: "http://www.w3.org/2000/svg",
702
702
  fill: "none",
703
703
  viewBox: "0 0 24 24",
@@ -706,12 +706,12 @@ function Jf(t, e) {
706
706
  "aria-hidden": "true",
707
707
  "data-slot": "icon"
708
708
  }, [
709
- c("path", {
709
+ i("path", {
710
710
  "stroke-linecap": "round",
711
711
  "stroke-linejoin": "round",
712
712
  d: "M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"
713
713
  }),
714
- c("path", {
714
+ i("path", {
715
715
  "stroke-linecap": "round",
716
716
  "stroke-linejoin": "round",
717
717
  d: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
@@ -719,7 +719,7 @@ function Jf(t, e) {
719
719
  ]);
720
720
  }
721
721
  function Df(t, e) {
722
- return X(), o("svg", {
722
+ return o(), X("svg", {
723
723
  xmlns: "http://www.w3.org/2000/svg",
724
724
  fill: "none",
725
725
  viewBox: "0 0 24 24",
@@ -728,7 +728,7 @@ function Df(t, e) {
728
728
  "aria-hidden": "true",
729
729
  "data-slot": "icon"
730
730
  }, [
731
- c("path", {
731
+ i("path", {
732
732
  "stroke-linecap": "round",
733
733
  "stroke-linejoin": "round",
734
734
  d: "M9 17.25v1.007a3 3 0 0 1-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0 1 15 18.257V17.25m6-12V15a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 15V5.25m18 0A2.25 2.25 0 0 0 18.75 3H5.25A2.25 2.25 0 0 0 3 5.25m18 0V12a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 12V5.25"
@@ -736,7 +736,7 @@ function Df(t, e) {
736
736
  ]);
737
737
  }
738
738
  function Kf(t, e) {
739
- return X(), o("svg", {
739
+ return o(), X("svg", {
740
740
  xmlns: "http://www.w3.org/2000/svg",
741
741
  fill: "none",
742
742
  viewBox: "0 0 24 24",
@@ -745,7 +745,7 @@ function Kf(t, e) {
745
745
  "aria-hidden": "true",
746
746
  "data-slot": "icon"
747
747
  }, [
748
- c("path", {
748
+ i("path", {
749
749
  "stroke-linecap": "round",
750
750
  "stroke-linejoin": "round",
751
751
  d: "m21 7.5-2.25-1.313M21 7.5v2.25m0-2.25-2.25 1.313M3 7.5l2.25-1.313M3 7.5l2.25 1.313M3 7.5v2.25m9 3 2.25-1.313M12 12.75l-2.25-1.313M12 12.75V15m0 6.75 2.25-1.313M12 21.75V19.5m0 2.25-2.25-1.313m0-16.875L12 2.25l2.25 1.313M21 14.25v2.25l-2.25 1.313m-13.5 0L3 16.5v-2.25"
@@ -753,7 +753,7 @@ function Kf(t, e) {
753
753
  ]);
754
754
  }
755
755
  function gf(t, e) {
756
- return X(), o("svg", {
756
+ return o(), X("svg", {
757
757
  xmlns: "http://www.w3.org/2000/svg",
758
758
  fill: "none",
759
759
  viewBox: "0 0 24 24",
@@ -762,15 +762,15 @@ function gf(t, e) {
762
762
  "aria-hidden": "true",
763
763
  "data-slot": "icon"
764
764
  }, [
765
- c("path", {
765
+ i("path", {
766
766
  "stroke-linecap": "round",
767
767
  "stroke-linejoin": "round",
768
768
  d: "M10.5 1.5H8.25A2.25 2.25 0 0 0 6 3.75v16.5a2.25 2.25 0 0 0 2.25 2.25h7.5A2.25 2.25 0 0 0 18 20.25V3.75a2.25 2.25 0 0 0-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3"
769
769
  })
770
770
  ]);
771
771
  }
772
- function or(t, e) {
773
- return X(), o("svg", {
772
+ function Xr(t, e) {
773
+ return o(), X("svg", {
774
774
  xmlns: "http://www.w3.org/2000/svg",
775
775
  fill: "none",
776
776
  viewBox: "0 0 24 24",
@@ -779,7 +779,7 @@ function or(t, e) {
779
779
  "aria-hidden": "true",
780
780
  "data-slot": "icon"
781
781
  }, [
782
- c("path", {
782
+ i("path", {
783
783
  "stroke-linecap": "round",
784
784
  "stroke-linejoin": "round",
785
785
  d: "m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"
@@ -787,7 +787,7 @@ function or(t, e) {
787
787
  ]);
788
788
  }
789
789
  function hf(t, e) {
790
- return X(), o("svg", {
790
+ return o(), X("svg", {
791
791
  xmlns: "http://www.w3.org/2000/svg",
792
792
  fill: "none",
793
793
  viewBox: "0 0 24 24",
@@ -796,7 +796,7 @@ function hf(t, e) {
796
796
  "aria-hidden": "true",
797
797
  "data-slot": "icon"
798
798
  }, [
799
- c("path", {
799
+ i("path", {
800
800
  "stroke-linecap": "round",
801
801
  "stroke-linejoin": "round",
802
802
  d: "M13.181 8.68a4.503 4.503 0 0 1 1.903 6.405m-9.768-2.782L3.56 14.06a4.5 4.5 0 0 0 6.364 6.365l3.129-3.129m5.614-5.615 1.757-1.757a4.5 4.5 0 0 0-6.364-6.365l-4.5 4.5c-.258.26-.479.541-.661.84m1.903 6.405a4.495 4.495 0 0 1-1.242-.88 4.483 4.483 0 0 1-1.062-1.683m6.587 2.345 5.907 5.907m-5.907-5.907L8.898 8.898M2.991 2.99 8.898 8.9"
@@ -804,7 +804,7 @@ function hf(t, e) {
804
804
  ]);
805
805
  }
806
806
  function Uf(t, e) {
807
- return X(), o("svg", {
807
+ return o(), X("svg", {
808
808
  xmlns: "http://www.w3.org/2000/svg",
809
809
  fill: "none",
810
810
  viewBox: "0 0 24 24",
@@ -813,7 +813,7 @@ function Uf(t, e) {
813
813
  "aria-hidden": "true",
814
814
  "data-slot": "icon"
815
815
  }, [
816
- c("path", {
816
+ i("path", {
817
817
  "stroke-linecap": "round",
818
818
  "stroke-linejoin": "round",
819
819
  d: "M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"
@@ -821,7 +821,7 @@ function Uf(t, e) {
821
821
  ]);
822
822
  }
823
823
  function kr(t, e) {
824
- return X(), o("svg", {
824
+ return o(), X("svg", {
825
825
  xmlns: "http://www.w3.org/2000/svg",
826
826
  fill: "none",
827
827
  viewBox: "0 0 24 24",
@@ -830,7 +830,7 @@ function kr(t, e) {
830
830
  "aria-hidden": "true",
831
831
  "data-slot": "icon"
832
832
  }, [
833
- c("path", {
833
+ i("path", {
834
834
  "stroke-linecap": "round",
835
835
  "stroke-linejoin": "round",
836
836
  d: "M12 4.5v15m7.5-7.5h-15"
@@ -838,7 +838,7 @@ function kr(t, e) {
838
838
  ]);
839
839
  }
840
840
  function Gf(t, e) {
841
- return X(), o("svg", {
841
+ return o(), X("svg", {
842
842
  xmlns: "http://www.w3.org/2000/svg",
843
843
  fill: "none",
844
844
  viewBox: "0 0 24 24",
@@ -847,15 +847,15 @@ function Gf(t, e) {
847
847
  "aria-hidden": "true",
848
848
  "data-slot": "icon"
849
849
  }, [
850
- c("path", {
850
+ i("path", {
851
851
  "stroke-linecap": "round",
852
852
  "stroke-linejoin": "round",
853
853
  d: "m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"
854
854
  })
855
855
  ]);
856
856
  }
857
- function Bf(t, e) {
858
- return X(), o("svg", {
857
+ function Rf(t, e) {
858
+ return o(), X("svg", {
859
859
  xmlns: "http://www.w3.org/2000/svg",
860
860
  fill: "none",
861
861
  viewBox: "0 0 24 24",
@@ -864,14 +864,14 @@ function Bf(t, e) {
864
864
  "aria-hidden": "true",
865
865
  "data-slot": "icon"
866
866
  }, [
867
- c("path", {
867
+ i("path", {
868
868
  "stroke-linecap": "round",
869
869
  "stroke-linejoin": "round",
870
870
  d: "M6 18 18 6M6 6l12 12"
871
871
  })
872
872
  ]);
873
873
  }
874
- const Rf = /* @__PURE__ */ _({
874
+ const Bf = /* @__PURE__ */ _({
875
875
  __name: "AddBlockItem",
876
876
  props: {
877
877
  block: {}
@@ -885,34 +885,34 @@ const Rf = /* @__PURE__ */ _({
885
885
  const u = v.target;
886
886
  u != null && u.hasAttribute("data-prevent-drop") && v.dataTransfer.setData("prevent-drop", "true");
887
887
  }
888
- return (v, l) => (X(), o("div", {
888
+ return (v, l) => (o(), X("div", {
889
889
  "data-block-type": t.block.type,
890
890
  draggable: "true",
891
891
  class: "cursor-pointer rounded-md border border-gray-300 bg-zinc-50 p-2 text-sm text-zinc-900 hover:border-zinc-400 hover:text-zinc-900",
892
892
  onDragstart: l[1] || (l[1] = (a) => n(a, t.block))
893
893
  }, [
894
- f.value ? (X(), o("div", {
894
+ f.value ? (o(), X("div", {
895
895
  key: 0,
896
896
  class: "w-full overflow-hidden rounded-md bg-neutral-100"
897
897
  }, [
898
- c("img", {
898
+ i("img", {
899
899
  src: f.value,
900
900
  alt: t.block.label || t.block.type,
901
901
  class: "mx-auto mb-2 h-28 w-auto object-contain",
902
902
  onError: l[0] || (l[0] = (a) => r.value = !0)
903
903
  }, null, 40, ["src", "alt"])
904
- ])) : t.block.emoji ? (X(), o("div", {
904
+ ])) : t.block.emoji ? (o(), X("div", {
905
905
  key: 1,
906
906
  class: "mb-2 flex h-28 w-full items-center justify-center rounded-md bg-zinc-200"
907
907
  }, [
908
- c("span", { class: "text-2xl" }, U(t.block.emoji), 1)
909
- ])) : (X(), o("div", {
908
+ i("span", { class: "text-2xl" }, U(t.block.emoji), 1)
909
+ ])) : (o(), X("div", {
910
910
  key: 2,
911
911
  class: "mb-2 flex h-28 w-full items-center justify-center rounded-md bg-zinc-200"
912
912
  }, [
913
913
  h(G(Kf), { class: "size-6 text-zinc-400" })
914
914
  ])),
915
- c("p", { class: "text-sm" }, U(t.block.label), 1)
915
+ i("p", { class: "text-sm" }, U(t.block.label), 1)
916
916
  ], 40, ["data-block-type"]));
917
917
  }
918
918
  });
@@ -922,7 +922,7 @@ const Rf = /* @__PURE__ */ _({
922
922
  * @author owenm <owen23355@gmail.com>
923
923
  * @license MIT
924
924
  */
925
- function cr(t, e) {
925
+ function ir(t, e) {
926
926
  var r = Object.keys(t);
927
927
  if (Object.getOwnPropertySymbols) {
928
928
  var f = Object.getOwnPropertySymbols(t);
@@ -935,9 +935,9 @@ function cr(t, e) {
935
935
  function St(t) {
936
936
  for (var e = 1; e < arguments.length; e++) {
937
937
  var r = arguments[e] != null ? arguments[e] : {};
938
- e % 2 ? cr(Object(r), !0).forEach(function(f) {
938
+ e % 2 ? ir(Object(r), !0).forEach(function(f) {
939
939
  Ff(t, f, r[f]);
940
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : cr(Object(r)).forEach(function(f) {
940
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : ir(Object(r)).forEach(function(f) {
941
941
  Object.defineProperty(t, f, Object.getOwnPropertyDescriptor(r, f));
942
942
  });
943
943
  }
@@ -991,7 +991,7 @@ function jt(t) {
991
991
  if (typeof window < "u" && window.navigator)
992
992
  return !!/* @__PURE__ */ navigator.userAgent.match(t);
993
993
  }
994
- var xt = jt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), oe = jt(/Edge/i), ir = jt(/firefox/i), le = jt(/safari/i) && !jt(/chrome/i) && !jt(/android/i), ar = jt(/iP(ad|od|hone)/i), qr = jt(/chrome/i) && jt(/android/i), Jr = {
994
+ var xt = jt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Xe = jt(/Edge/i), cr = jt(/firefox/i), le = jt(/safari/i) && !jt(/chrome/i) && !jt(/android/i), ar = jt(/iP(ad|od|hone)/i), qr = jt(/chrome/i) && jt(/android/i), Jr = {
995
995
  capture: !1,
996
996
  passive: !1
997
997
  };
@@ -1001,7 +1001,7 @@ function D(t, e, r) {
1001
1001
  function J(t, e, r) {
1002
1002
  t.removeEventListener(e, r, !xt && Jr);
1003
1003
  }
1004
- function me(t, e) {
1004
+ function Ve(t, e) {
1005
1005
  if (e) {
1006
1006
  if (e[0] === ">" && (e = e.substring(1)), t)
1007
1007
  try {
@@ -1024,7 +1024,7 @@ function At(t, e, r, f) {
1024
1024
  if (t) {
1025
1025
  r = r || document;
1026
1026
  do {
1027
- if (e != null && (e[0] === ">" ? t.parentNode === r && me(t, e) : me(t, e)) || f && t === r)
1027
+ if (e != null && (e[0] === ">" ? t.parentNode === r && Ve(t, e) : Ve(t, e)) || f && t === r)
1028
1028
  return t;
1029
1029
  if (t === r) break;
1030
1030
  } while (t = Dr(t));
@@ -1041,7 +1041,7 @@ function pt(t, e, r) {
1041
1041
  t.className = (f + (r ? " " + e : "")).replace(sr, " ");
1042
1042
  }
1043
1043
  }
1044
- function L(t, e, r) {
1044
+ function m(t, e, r) {
1045
1045
  var f = t && t.style;
1046
1046
  if (f) {
1047
1047
  if (r === void 0)
@@ -1055,7 +1055,7 @@ function Et(t, e) {
1055
1055
  r = t;
1056
1056
  else
1057
1057
  do {
1058
- var f = L(t, "transform");
1058
+ var f = m(t, "transform");
1059
1059
  f && f !== "none" && (r = f + " " + r);
1060
1060
  } while (!e && (t = t.parentNode));
1061
1061
  var n = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
@@ -1080,15 +1080,15 @@ function Q(t, e, r, f, n) {
1080
1080
  var v, l, a, u, d, P, b;
1081
1081
  if (t !== window && t.parentNode && t !== wt() ? (v = t.getBoundingClientRect(), l = v.top, a = v.left, u = v.bottom, d = v.right, P = v.height, b = v.width) : (l = 0, a = 0, u = window.innerHeight, d = window.innerWidth, P = window.innerHeight, b = window.innerWidth), (e || r) && t !== window && (n = n || t.parentNode, !xt))
1082
1082
  do
1083
- if (n && n.getBoundingClientRect && (L(n, "transform") !== "none" || r && L(n, "position") !== "static")) {
1083
+ if (n && n.getBoundingClientRect && (m(n, "transform") !== "none" || r && m(n, "position") !== "static")) {
1084
1084
  var p = n.getBoundingClientRect();
1085
- l -= p.top + parseInt(L(n, "border-top-width")), a -= p.left + parseInt(L(n, "border-left-width")), u = l + v.height, d = a + v.width;
1085
+ l -= p.top + parseInt(m(n, "border-top-width")), a -= p.left + parseInt(m(n, "border-left-width")), u = l + v.height, d = a + v.width;
1086
1086
  break;
1087
1087
  }
1088
1088
  while (n = n.parentNode);
1089
1089
  if (f && t !== window) {
1090
- var i = Et(n || t), A = i && i.a, T = i && i.d;
1091
- i && (l /= T, a /= A, b /= A, P /= T, u = l + P, d = a + b);
1090
+ var c = Et(n || t), s = c && c.a, A = c && c.d;
1091
+ c && (l /= A, a /= s, b /= s, P /= A, u = l + P, d = a + b);
1092
1092
  }
1093
1093
  return {
1094
1094
  top: l,
@@ -1111,7 +1111,7 @@ function Ar(t, e, r) {
1111
1111
  }
1112
1112
  function Qt(t, e, r, f) {
1113
1113
  for (var n = 0, v = 0, l = t.children; v < l.length; ) {
1114
- if (l[v].style.display !== "none" && l[v] !== O.ghost && (f || l[v] !== O.dragged) && At(l[v], r.draggable, t, !1)) {
1114
+ if (l[v].style.display !== "none" && l[v] !== x.ghost && (f || l[v] !== x.dragged) && At(l[v], r.draggable, t, !1)) {
1115
1115
  if (n === e)
1116
1116
  return l[v];
1117
1117
  n++;
@@ -1121,16 +1121,16 @@ function Qt(t, e, r, f) {
1121
1121
  return null;
1122
1122
  }
1123
1123
  function lr(t, e) {
1124
- for (var r = t.lastElementChild; r && (r === O.ghost || L(r, "display") === "none" || e && !me(r, e)); )
1124
+ for (var r = t.lastElementChild; r && (r === x.ghost || m(r, "display") === "none" || e && !Ve(r, e)); )
1125
1125
  r = r.previousElementSibling;
1126
1126
  return r || null;
1127
1127
  }
1128
- function it(t, e) {
1128
+ function ct(t, e) {
1129
1129
  var r = 0;
1130
1130
  if (!t || !t.parentNode)
1131
1131
  return -1;
1132
1132
  for (; t = t.previousElementSibling; )
1133
- t.nodeName.toUpperCase() !== "TEMPLATE" && t !== O.clone && (!e || me(t, e)) && r++;
1133
+ t.nodeName.toUpperCase() !== "TEMPLATE" && t !== x.clone && (!e || Ve(t, e)) && r++;
1134
1134
  return r;
1135
1135
  }
1136
1136
  function Tr(t) {
@@ -1155,7 +1155,7 @@ function Nt(t, e) {
1155
1155
  var r = t, f = !1;
1156
1156
  do
1157
1157
  if (r.clientWidth < r.scrollWidth || r.clientHeight < r.scrollHeight) {
1158
- var n = L(r);
1158
+ var n = m(r);
1159
1159
  if (r.clientWidth < r.scrollWidth && (n.overflowX == "auto" || n.overflowX == "scroll") || r.clientHeight < r.scrollHeight && (n.overflowY == "auto" || n.overflowY == "scroll")) {
1160
1160
  if (!r.getBoundingClientRect || r === document.body) return wt();
1161
1161
  if (f || e) return r;
@@ -1213,7 +1213,7 @@ function Qf() {
1213
1213
  if (t = [], !!this.options.animation) {
1214
1214
  var f = [].slice.call(this.el.children);
1215
1215
  f.forEach(function(n) {
1216
- if (!(L(n, "display") === "none" || n === O.ghost)) {
1216
+ if (!(m(n, "display") === "none" || n === x.ghost)) {
1217
1217
  t.push({
1218
1218
  target: n,
1219
1219
  rect: Q(n)
@@ -1244,9 +1244,9 @@ function Qf() {
1244
1244
  }
1245
1245
  var v = !1, l = 0;
1246
1246
  t.forEach(function(a) {
1247
- var u = 0, d = a.target, P = d.fromRect, b = Q(d), p = d.prevFromRect, i = d.prevToRect, A = a.rect, T = Et(d, !0);
1248
- T && (b.top -= T.f, b.left -= T.e), d.toRect = b, d.thisAnimationDuration && he(p, b) && !he(P, b) && // Make sure animatingRect is on line between toRect & fromRect
1249
- (A.top - b.top) / (A.left - b.left) === (P.top - b.top) / (P.left - b.left) && (u = _f(A, p, i, n.options)), he(b, P) || (d.prevFromRect = P, d.prevToRect = b, u || (u = n.options.animation), n.animate(d, A, b, u)), u && (v = !0, l = Math.max(l, u), clearTimeout(d.animationResetTimer), d.animationResetTimer = setTimeout(function() {
1247
+ var u = 0, d = a.target, P = d.fromRect, b = Q(d), p = d.prevFromRect, c = d.prevToRect, s = a.rect, A = Et(d, !0);
1248
+ A && (b.top -= A.f, b.left -= A.e), d.toRect = b, d.thisAnimationDuration && he(p, b) && !he(P, b) && // Make sure animatingRect is on line between toRect & fromRect
1249
+ (s.top - b.top) / (s.left - b.left) === (P.top - b.top) / (P.left - b.left) && (u = _f(s, p, c, n.options)), he(b, P) || (d.prevFromRect = P, d.prevToRect = b, u || (u = n.options.animation), n.animate(d, s, b, u)), u && (v = !0, l = Math.max(l, u), clearTimeout(d.animationResetTimer), d.animationResetTimer = setTimeout(function() {
1250
1250
  d.animationTime = 0, d.prevFromRect = null, d.fromRect = null, d.prevToRect = null, d.thisAnimationDuration = null;
1251
1251
  }, u), d.thisAnimationDuration = u);
1252
1252
  }), clearTimeout(e), v ? e = setTimeout(function() {
@@ -1255,10 +1255,10 @@ function Qf() {
1255
1255
  },
1256
1256
  animate: function(f, n, v, l) {
1257
1257
  if (l) {
1258
- L(f, "transition", ""), L(f, "transform", "");
1258
+ m(f, "transition", ""), m(f, "transform", "");
1259
1259
  var a = Et(this.el), u = a && a.a, d = a && a.d, P = (n.left - v.left) / (u || 1), b = (n.top - v.top) / (d || 1);
1260
- f.animatingX = !!P, f.animatingY = !!b, L(f, "transform", "translate3d(" + P + "px," + b + "px,0)"), this.forRepaintDummy = $f(f), L(f, "transition", "transform " + l + "ms" + (this.options.easing ? " " + this.options.easing : "")), L(f, "transform", "translate3d(0,0,0)"), typeof f.animated == "number" && clearTimeout(f.animated), f.animated = setTimeout(function() {
1261
- L(f, "transition", ""), L(f, "transform", ""), f.animated = !1, f.animatingX = !1, f.animatingY = !1;
1260
+ f.animatingX = !!P, f.animatingY = !!b, m(f, "transform", "translate3d(" + P + "px," + b + "px,0)"), this.forRepaintDummy = $f(f), m(f, "transition", "transform " + l + "ms" + (this.options.easing ? " " + this.options.easing : "")), m(f, "transform", "translate3d(0,0,0)"), typeof f.animated == "number" && clearTimeout(f.animated), f.animated = setTimeout(function() {
1261
+ m(f, "transition", ""), m(f, "transform", ""), f.animated = !1, f.animatingX = !1, f.animatingY = !1;
1262
1262
  }, l);
1263
1263
  }
1264
1264
  }
@@ -1270,16 +1270,16 @@ function $f(t) {
1270
1270
  function _f(t, e, r, f) {
1271
1271
  return Math.sqrt(Math.pow(e.top - t.top, 2) + Math.pow(e.left - t.left, 2)) / Math.sqrt(Math.pow(e.top - r.top, 2) + Math.pow(e.left - r.left, 2)) * f.animation;
1272
1272
  }
1273
- var Rt = [], Ue = {
1273
+ var Bt = [], Ue = {
1274
1274
  initializeByDefault: !0
1275
- }, ce = {
1275
+ }, ie = {
1276
1276
  mount: function(e) {
1277
1277
  for (var r in Ue)
1278
1278
  Ue.hasOwnProperty(r) && !(r in e) && (e[r] = Ue[r]);
1279
- Rt.forEach(function(f) {
1279
+ Bt.forEach(function(f) {
1280
1280
  if (f.pluginName === e.pluginName)
1281
1281
  throw "Sortable: Cannot mount plugin ".concat(e.pluginName, " more than once");
1282
- }), Rt.push(e);
1282
+ }), Bt.push(e);
1283
1283
  },
1284
1284
  pluginEvent: function(e, r, f) {
1285
1285
  var n = this;
@@ -1287,7 +1287,7 @@ var Rt = [], Ue = {
1287
1287
  n.eventCanceled = !0;
1288
1288
  };
1289
1289
  var v = e + "Global";
1290
- Rt.forEach(function(l) {
1290
+ Bt.forEach(function(l) {
1291
1291
  r[l.pluginName] && (r[l.pluginName][v] && r[l.pluginName][v](St({
1292
1292
  sortable: r
1293
1293
  }, f)), r.options[l.pluginName] && r[l.pluginName][e] && r[l.pluginName][e](St({
@@ -1296,7 +1296,7 @@ var Rt = [], Ue = {
1296
1296
  });
1297
1297
  },
1298
1298
  initializePlugins: function(e, r, f, n) {
1299
- Rt.forEach(function(a) {
1299
+ Bt.forEach(function(a) {
1300
1300
  var u = a.pluginName;
1301
1301
  if (!(!e.options[u] && !a.initializeByDefault)) {
1302
1302
  var d = new a(e, r, e.options);
@@ -1311,57 +1311,57 @@ var Rt = [], Ue = {
1311
1311
  },
1312
1312
  getEventProperties: function(e, r) {
1313
1313
  var f = {};
1314
- return Rt.forEach(function(n) {
1314
+ return Bt.forEach(function(n) {
1315
1315
  typeof n.eventProperties == "function" && Ot(f, n.eventProperties.call(r[n.pluginName], e));
1316
1316
  }), f;
1317
1317
  },
1318
1318
  modifyOption: function(e, r, f) {
1319
1319
  var n;
1320
- return Rt.forEach(function(v) {
1320
+ return Bt.forEach(function(v) {
1321
1321
  e[v.pluginName] && v.optionListeners && typeof v.optionListeners[r] == "function" && (n = v.optionListeners[r].call(e[v.pluginName], f));
1322
1322
  }), n;
1323
1323
  }
1324
1324
  };
1325
1325
  function tn(t) {
1326
- var e = t.sortable, r = t.rootEl, f = t.name, n = t.targetEl, v = t.cloneEl, l = t.toEl, a = t.fromEl, u = t.oldIndex, d = t.newIndex, P = t.oldDraggableIndex, b = t.newDraggableIndex, p = t.originalEvent, i = t.putSortable, A = t.extraEventProperties;
1326
+ var e = t.sortable, r = t.rootEl, f = t.name, n = t.targetEl, v = t.cloneEl, l = t.toEl, a = t.fromEl, u = t.oldIndex, d = t.newIndex, P = t.oldDraggableIndex, b = t.newDraggableIndex, p = t.originalEvent, c = t.putSortable, s = t.extraEventProperties;
1327
1327
  if (e = e || r && r[bt], !!e) {
1328
- var T, s = e.options, y = "on" + f.charAt(0).toUpperCase() + f.substr(1);
1329
- window.CustomEvent && !xt && !oe ? T = new CustomEvent(f, {
1328
+ var A, T = e.options, W = "on" + f.charAt(0).toUpperCase() + f.substr(1);
1329
+ window.CustomEvent && !xt && !Xe ? A = new CustomEvent(f, {
1330
1330
  bubbles: !0,
1331
1331
  cancelable: !0
1332
- }) : (T = document.createEvent("Event"), T.initEvent(f, !0, !0)), T.to = l || r, T.from = a || r, T.item = n || r, T.clone = v, T.oldIndex = u, T.newIndex = d, T.oldDraggableIndex = P, T.newDraggableIndex = b, T.originalEvent = p, T.pullMode = i ? i.lastPutMode : void 0;
1333
- var S = St(St({}, A), ce.getEventProperties(f, e));
1334
- for (var N in S)
1335
- T[N] = S[N];
1336
- r && r.dispatchEvent(T), s[y] && s[y].call(e, T);
1332
+ }) : (A = document.createEvent("Event"), A.initEvent(f, !0, !0)), A.to = l || r, A.from = a || r, A.item = n || r, A.clone = v, A.oldIndex = u, A.newIndex = d, A.oldDraggableIndex = P, A.newDraggableIndex = b, A.originalEvent = p, A.pullMode = c ? c.lastPutMode : void 0;
1333
+ var y = St(St({}, s), ie.getEventProperties(f, e));
1334
+ for (var O in y)
1335
+ A[O] = y[O];
1336
+ r && r.dispatchEvent(A), T[W] && T[W].call(e, A);
1337
1337
  }
1338
1338
  }
1339
1339
  var en = ["evt"], dt = function(e, r) {
1340
1340
  var f = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = f.evt, v = Cf(f, en);
1341
- ce.pluginEvent.bind(O)(e, r, St({
1342
- dragEl: w,
1341
+ ie.pluginEvent.bind(x)(e, r, St({
1342
+ dragEl: S,
1343
1343
  parentEl: M,
1344
- ghostEl: m,
1344
+ ghostEl: N,
1345
1345
  rootEl: Z,
1346
1346
  nextEl: ht,
1347
1347
  lastDownEl: He,
1348
1348
  cloneEl: C,
1349
- cloneHidden: Vt,
1349
+ cloneHidden: mt,
1350
1350
  dragStarted: te,
1351
1351
  putSortable: et,
1352
- activeSortable: O.active,
1352
+ activeSortable: x.active,
1353
1353
  originalEvent: n,
1354
1354
  oldIndex: Mt,
1355
1355
  oldDraggableIndex: de,
1356
- newIndex: Xt,
1356
+ newIndex: ot,
1357
1357
  newDraggableIndex: Lt,
1358
1358
  hideGhostForTarget: Zr,
1359
1359
  unhideGhostForTarget: Cr,
1360
1360
  cloneNowHidden: function() {
1361
- Vt = !0;
1361
+ mt = !0;
1362
1362
  },
1363
1363
  cloneNowShown: function() {
1364
- Vt = !1;
1364
+ mt = !1;
1365
1365
  },
1366
1366
  dispatchSortableEvent: function(a) {
1367
1367
  at({
@@ -1376,23 +1376,23 @@ function at(t) {
1376
1376
  tn(St({
1377
1377
  putSortable: et,
1378
1378
  cloneEl: C,
1379
- targetEl: w,
1379
+ targetEl: S,
1380
1380
  rootEl: Z,
1381
1381
  oldIndex: Mt,
1382
1382
  oldDraggableIndex: de,
1383
- newIndex: Xt,
1383
+ newIndex: ot,
1384
1384
  newDraggableIndex: Lt
1385
1385
  }, t));
1386
1386
  }
1387
- var w, M, m, Z, ht, He, C, Vt, Mt, Xt, de, Lt, se, et, Ct = !1, Ne = !1, ke = [], Kt, st, Ge, Be, Wr, wr, te, Ft, be, pe = !1, Ae = !1, je, ft, Re = [], $e = !1, qe = [], Ke = typeof document < "u", Te = ar, Sr = oe || xt ? "cssFloat" : "float", rn = Ke && !qr && !ar && "draggable" in document.createElement("div"), Br = function() {
1387
+ var S, M, N, Z, ht, He, C, mt, Mt, ot, de, Lt, se, et, Ct = !1, Ne = !1, ke = [], Kt, st, Ge, Re, Wr, wr, te, Ft, be, pe = !1, Ae = !1, je, ft, Be = [], $e = !1, qe = [], Ke = typeof document < "u", Te = ar, Sr = Xe || xt ? "cssFloat" : "float", rn = Ke && !qr && !ar && "draggable" in document.createElement("div"), Rr = function() {
1388
1388
  if (Ke) {
1389
1389
  if (xt)
1390
1390
  return !1;
1391
1391
  var t = document.createElement("x");
1392
1392
  return t.style.cssText = "pointer-events:auto", t.style.pointerEvents === "auto";
1393
1393
  }
1394
- }(), Rr = function(e, r) {
1395
- var f = L(e), n = parseInt(f.width) - parseInt(f.paddingLeft) - parseInt(f.paddingRight) - parseInt(f.borderLeftWidth) - parseInt(f.borderRightWidth), v = Qt(e, 0, r), l = Qt(e, 1, r), a = v && L(v), u = l && L(l), d = a && parseInt(a.marginLeft) + parseInt(a.marginRight) + Q(v).width, P = u && parseInt(u.marginLeft) + parseInt(u.marginRight) + Q(l).width;
1394
+ }(), Br = function(e, r) {
1395
+ var f = m(e), n = parseInt(f.width) - parseInt(f.paddingLeft) - parseInt(f.paddingRight) - parseInt(f.borderLeftWidth) - parseInt(f.borderRightWidth), v = Qt(e, 0, r), l = Qt(e, 1, r), a = v && m(v), u = l && m(l), d = a && parseInt(a.marginLeft) + parseInt(a.marginRight) + Q(v).width, P = u && parseInt(u.marginLeft) + parseInt(u.marginRight) + Q(l).width;
1396
1396
  if (f.display === "flex")
1397
1397
  return f.flexDirection === "column" || f.flexDirection === "column-reverse" ? "vertical" : "horizontal";
1398
1398
  if (f.display === "grid")
@@ -1436,16 +1436,16 @@ var w, M, m, Z, ht, He, C, Vt, Mt, Xt, de, Lt, se, et, Ct = !1, Ne = !1, ke = []
1436
1436
  name: n
1437
1437
  }), f.name = n.name, f.checkPull = r(n.pull, !0), f.checkPut = r(n.put), f.revertClone = n.revertClone, e.group = f;
1438
1438
  }, Zr = function() {
1439
- !Br && m && L(m, "display", "none");
1439
+ !Rr && N && m(N, "display", "none");
1440
1440
  }, Cr = function() {
1441
- !Br && m && L(m, "display", "");
1441
+ !Rr && N && m(N, "display", "");
1442
1442
  };
1443
1443
  Ke && !qr && document.addEventListener("click", function(t) {
1444
1444
  if (Ne)
1445
1445
  return t.preventDefault(), t.stopPropagation && t.stopPropagation(), t.stopImmediatePropagation && t.stopImmediatePropagation(), Ne = !1, !1;
1446
1446
  }, !0);
1447
1447
  var gt = function(e) {
1448
- if (w) {
1448
+ if (S) {
1449
1449
  e = e.touches ? e.touches[0] : e;
1450
1450
  var r = nn(e.clientX, e.clientY);
1451
1451
  if (r) {
@@ -1456,9 +1456,9 @@ var gt = function(e) {
1456
1456
  }
1457
1457
  }
1458
1458
  }, vn = function(e) {
1459
- w && w.parentNode[bt]._isOutsideThisEl(e.target);
1459
+ S && S.parentNode[bt]._isOutsideThisEl(e.target);
1460
1460
  };
1461
- function O(t, e) {
1461
+ function x(t, e) {
1462
1462
  if (!(t && t.nodeType && t.nodeType === 1))
1463
1463
  throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));
1464
1464
  this.el = t, this.options = e = Ot({}, e), t[bt] = this;
@@ -1477,7 +1477,7 @@ function O(t, e) {
1477
1477
  // will be set to same as swapThreshold if default
1478
1478
  removeCloneOnHide: !0,
1479
1479
  direction: function() {
1480
- return Rr(t, this.options);
1480
+ return Br(t, this.options);
1481
1481
  },
1482
1482
  ghostClass: "sortable-ghost",
1483
1483
  chosenClass: "sortable-chosen",
@@ -1505,10 +1505,10 @@ function O(t, e) {
1505
1505
  y: 0
1506
1506
  },
1507
1507
  // Disabled on Safari: #1571; Enabled on Safari IOS: #2244
1508
- supportPointer: O.supportPointer !== !1 && "PointerEvent" in window && (!le || ar),
1508
+ supportPointer: x.supportPointer !== !1 && "PointerEvent" in window && (!le || ar),
1509
1509
  emptyInsertThreshold: 5
1510
1510
  };
1511
- ce.initializePlugins(this, t, r);
1511
+ ie.initializePlugins(this, t, r);
1512
1512
  for (var f in r)
1513
1513
  !(f in e) && (e[f] = r[f]);
1514
1514
  Fr(e);
@@ -1516,20 +1516,20 @@ function O(t, e) {
1516
1516
  n.charAt(0) === "_" && typeof this[n] == "function" && (this[n] = this[n].bind(this));
1517
1517
  this.nativeDraggable = e.forceFallback ? !1 : rn, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ? D(t, "pointerdown", this._onTapStart) : (D(t, "mousedown", this._onTapStart), D(t, "touchstart", this._onTapStart)), this.nativeDraggable && (D(t, "dragover", this), D(t, "dragenter", this)), ke.push(this.el), e.store && e.store.get && this.sort(e.store.get(this) || []), Ot(this, Qf());
1518
1518
  }
1519
- O.prototype = /** @lends Sortable.prototype */
1519
+ x.prototype = /** @lends Sortable.prototype */
1520
1520
  {
1521
- constructor: O,
1521
+ constructor: x,
1522
1522
  _isOutsideThisEl: function(e) {
1523
1523
  !this.el.contains(e) && e !== this.el && (Ft = null);
1524
1524
  },
1525
1525
  _getDirection: function(e, r) {
1526
- return typeof this.options.direction == "function" ? this.options.direction.call(this, e, r, w) : this.options.direction;
1526
+ return typeof this.options.direction == "function" ? this.options.direction.call(this, e, r, S) : this.options.direction;
1527
1527
  },
1528
1528
  _onTapStart: function(e) {
1529
1529
  if (e.cancelable) {
1530
1530
  var r = this, f = this.el, n = this.options, v = n.preventOnFilter, l = e.type, a = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, u = (a || e).target, d = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || u, P = n.filter;
1531
- if (Pn(f), !w && !(/mousedown|pointerdown/.test(l) && e.button !== 0 || n.disabled) && !d.isContentEditable && !(!this.nativeDraggable && le && u && u.tagName.toUpperCase() === "SELECT") && (u = At(u, n.draggable, f, !1), !(u && u.animated) && He !== u)) {
1532
- if (Mt = it(u), de = it(u, n.draggable), typeof P == "function") {
1531
+ if (Pn(f), !S && !(/mousedown|pointerdown/.test(l) && e.button !== 0 || n.disabled) && !d.isContentEditable && !(!this.nativeDraggable && le && u && u.tagName.toUpperCase() === "SELECT") && (u = At(u, n.draggable, f, !1), !(u && u.animated) && He !== u)) {
1532
+ if (Mt = ct(u), de = ct(u, n.draggable), typeof P == "function") {
1533
1533
  if (P.call(this, e, u, this)) {
1534
1534
  at({
1535
1535
  sortable: r,
@@ -1565,30 +1565,30 @@ O.prototype = /** @lends Sortable.prototype */
1565
1565
  },
1566
1566
  _prepareDragStart: function(e, r, f) {
1567
1567
  var n = this, v = n.el, l = n.options, a = v.ownerDocument, u;
1568
- if (f && !w && f.parentNode === v) {
1568
+ if (f && !S && f.parentNode === v) {
1569
1569
  var d = Q(f);
1570
- if (Z = v, w = f, M = w.parentNode, ht = w.nextSibling, He = f, se = l.group, O.dragged = w, Kt = {
1571
- target: w,
1570
+ if (Z = v, S = f, M = S.parentNode, ht = S.nextSibling, He = f, se = l.group, x.dragged = S, Kt = {
1571
+ target: S,
1572
1572
  clientX: (r || e).clientX,
1573
1573
  clientY: (r || e).clientY
1574
- }, Wr = Kt.clientX - d.left, wr = Kt.clientY - d.top, this._lastX = (r || e).clientX, this._lastY = (r || e).clientY, w.style["will-change"] = "all", u = function() {
1574
+ }, Wr = Kt.clientX - d.left, wr = Kt.clientY - d.top, this._lastX = (r || e).clientX, this._lastY = (r || e).clientY, S.style["will-change"] = "all", u = function() {
1575
1575
  if (dt("delayEnded", n, {
1576
1576
  evt: e
1577
- }), O.eventCanceled) {
1577
+ }), x.eventCanceled) {
1578
1578
  n._onDrop();
1579
1579
  return;
1580
1580
  }
1581
- n._disableDelayedDragEvents(), !ir && n.nativeDraggable && (w.draggable = !0), n._triggerDragStart(e, r), at({
1581
+ n._disableDelayedDragEvents(), !cr && n.nativeDraggable && (S.draggable = !0), n._triggerDragStart(e, r), at({
1582
1582
  sortable: n,
1583
1583
  name: "choose",
1584
1584
  originalEvent: e
1585
- }), pt(w, l.chosenClass, !0);
1585
+ }), pt(S, l.chosenClass, !0);
1586
1586
  }, l.ignore.split(",").forEach(function(P) {
1587
- Kr(w, P.trim(), Fe);
1588
- }), D(a, "dragover", gt), D(a, "mousemove", gt), D(a, "touchmove", gt), l.supportPointer ? (D(a, "pointerup", n._onDrop), !this.nativeDraggable && D(a, "pointercancel", n._onDrop)) : (D(a, "mouseup", n._onDrop), D(a, "touchend", n._onDrop), D(a, "touchcancel", n._onDrop)), ir && this.nativeDraggable && (this.options.touchStartThreshold = 4, w.draggable = !0), dt("delayStart", this, {
1587
+ Kr(S, P.trim(), Fe);
1588
+ }), D(a, "dragover", gt), D(a, "mousemove", gt), D(a, "touchmove", gt), l.supportPointer ? (D(a, "pointerup", n._onDrop), !this.nativeDraggable && D(a, "pointercancel", n._onDrop)) : (D(a, "mouseup", n._onDrop), D(a, "touchend", n._onDrop), D(a, "touchcancel", n._onDrop)), cr && this.nativeDraggable && (this.options.touchStartThreshold = 4, S.draggable = !0), dt("delayStart", this, {
1589
1589
  evt: e
1590
- }), l.delay && (!l.delayOnTouchOnly || r) && (!this.nativeDraggable || !(oe || xt))) {
1591
- if (O.eventCanceled) {
1590
+ }), l.delay && (!l.delayOnTouchOnly || r) && (!this.nativeDraggable || !(Xe || xt))) {
1591
+ if (x.eventCanceled) {
1592
1592
  this._onDrop();
1593
1593
  return;
1594
1594
  }
@@ -1602,14 +1602,14 @@ O.prototype = /** @lends Sortable.prototype */
1602
1602
  Math.max(Math.abs(r.clientX - this._lastX), Math.abs(r.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
1603
1603
  },
1604
1604
  _disableDelayedDrag: function() {
1605
- w && Fe(w), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
1605
+ S && Fe(S), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
1606
1606
  },
1607
1607
  _disableDelayedDragEvents: function() {
1608
1608
  var e = this.el.ownerDocument;
1609
1609
  J(e, "mouseup", this._disableDelayedDrag), J(e, "touchend", this._disableDelayedDrag), J(e, "touchcancel", this._disableDelayedDrag), J(e, "pointerup", this._disableDelayedDrag), J(e, "pointercancel", this._disableDelayedDrag), J(e, "mousemove", this._delayedDragTouchMoveHandler), J(e, "touchmove", this._delayedDragTouchMoveHandler), J(e, "pointermove", this._delayedDragTouchMoveHandler);
1610
1610
  },
1611
1611
  _triggerDragStart: function(e, r) {
1612
- r = r || e.pointerType == "touch" && e, !this.nativeDraggable || r ? this.options.supportPointer ? D(document, "pointermove", this._onTouchMove) : r ? D(document, "touchmove", this._onTouchMove) : D(document, "mousemove", this._onTouchMove) : (D(w, "dragend", this), D(Z, "dragstart", this._onDragStart));
1612
+ r = r || e.pointerType == "touch" && e, !this.nativeDraggable || r ? this.options.supportPointer ? D(document, "pointermove", this._onTouchMove) : r ? D(document, "touchmove", this._onTouchMove) : D(document, "mousemove", this._onTouchMove) : (D(S, "dragend", this), D(Z, "dragstart", this._onDragStart));
1613
1613
  try {
1614
1614
  document.selection ? Oe(function() {
1615
1615
  document.selection.empty();
@@ -1618,12 +1618,12 @@ O.prototype = /** @lends Sortable.prototype */
1618
1618
  }
1619
1619
  },
1620
1620
  _dragStarted: function(e, r) {
1621
- if (Ct = !1, Z && w) {
1621
+ if (Ct = !1, Z && S) {
1622
1622
  dt("dragStarted", this, {
1623
1623
  evt: r
1624
1624
  }), this.nativeDraggable && D(document, "dragover", vn);
1625
1625
  var f = this.options;
1626
- !e && pt(w, f.dragClass, !1), pt(w, f.ghostClass, !0), O.active = this, e && this._appendGhost(), at({
1626
+ !e && pt(S, f.dragClass, !1), pt(S, f.ghostClass, !0), x.active = this, e && this._appendGhost(), at({
1627
1627
  sortable: this,
1628
1628
  name: "start",
1629
1629
  originalEvent: r
@@ -1636,7 +1636,7 @@ O.prototype = /** @lends Sortable.prototype */
1636
1636
  this._lastX = st.clientX, this._lastY = st.clientY, Zr();
1637
1637
  for (var e = document.elementFromPoint(st.clientX, st.clientY), r = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(st.clientX, st.clientY), e !== r); )
1638
1638
  r = e;
1639
- if (w.parentNode[bt]._isOutsideThisEl(e), r)
1639
+ if (S.parentNode[bt]._isOutsideThisEl(e), r)
1640
1640
  do {
1641
1641
  if (r[bt]) {
1642
1642
  var f = void 0;
@@ -1655,14 +1655,14 @@ O.prototype = /** @lends Sortable.prototype */
1655
1655
  },
1656
1656
  _onTouchMove: function(e) {
1657
1657
  if (Kt) {
1658
- var r = this.options, f = r.fallbackTolerance, n = r.fallbackOffset, v = e.touches ? e.touches[0] : e, l = m && Et(m, !0), a = m && l && l.a, u = m && l && l.d, d = Te && ft && Tr(ft), P = (v.clientX - Kt.clientX + n.x) / (a || 1) + (d ? d[0] - Re[0] : 0) / (a || 1), b = (v.clientY - Kt.clientY + n.y) / (u || 1) + (d ? d[1] - Re[1] : 0) / (u || 1);
1659
- if (!O.active && !Ct) {
1658
+ var r = this.options, f = r.fallbackTolerance, n = r.fallbackOffset, v = e.touches ? e.touches[0] : e, l = N && Et(N, !0), a = N && l && l.a, u = N && l && l.d, d = Te && ft && Tr(ft), P = (v.clientX - Kt.clientX + n.x) / (a || 1) + (d ? d[0] - Be[0] : 0) / (a || 1), b = (v.clientY - Kt.clientY + n.y) / (u || 1) + (d ? d[1] - Be[1] : 0) / (u || 1);
1659
+ if (!x.active && !Ct) {
1660
1660
  if (f && Math.max(Math.abs(v.clientX - this._lastX), Math.abs(v.clientY - this._lastY)) < f)
1661
1661
  return;
1662
1662
  this._onDragStart(e, !0);
1663
1663
  }
1664
- if (m) {
1665
- l ? (l.e += P - (Ge || 0), l.f += b - (Be || 0)) : l = {
1664
+ if (N) {
1665
+ l ? (l.e += P - (Ge || 0), l.f += b - (Re || 0)) : l = {
1666
1666
  a: 1,
1667
1667
  b: 0,
1668
1668
  c: 0,
@@ -1671,120 +1671,120 @@ O.prototype = /** @lends Sortable.prototype */
1671
1671
  f: b
1672
1672
  };
1673
1673
  var p = "matrix(".concat(l.a, ",").concat(l.b, ",").concat(l.c, ",").concat(l.d, ",").concat(l.e, ",").concat(l.f, ")");
1674
- L(m, "webkitTransform", p), L(m, "mozTransform", p), L(m, "msTransform", p), L(m, "transform", p), Ge = P, Be = b, st = v;
1674
+ m(N, "webkitTransform", p), m(N, "mozTransform", p), m(N, "msTransform", p), m(N, "transform", p), Ge = P, Re = b, st = v;
1675
1675
  }
1676
1676
  e.cancelable && e.preventDefault();
1677
1677
  }
1678
1678
  },
1679
1679
  _appendGhost: function() {
1680
- if (!m) {
1681
- var e = this.options.fallbackOnBody ? document.body : Z, r = Q(w, !0, Te, !0, e), f = this.options;
1680
+ if (!N) {
1681
+ var e = this.options.fallbackOnBody ? document.body : Z, r = Q(S, !0, Te, !0, e), f = this.options;
1682
1682
  if (Te) {
1683
- for (ft = e; L(ft, "position") === "static" && L(ft, "transform") === "none" && ft !== document; )
1683
+ for (ft = e; m(ft, "position") === "static" && m(ft, "transform") === "none" && ft !== document; )
1684
1684
  ft = ft.parentNode;
1685
- ft !== document.body && ft !== document.documentElement ? (ft === document && (ft = wt()), r.top += ft.scrollTop, r.left += ft.scrollLeft) : ft = wt(), Re = Tr(ft);
1685
+ ft !== document.body && ft !== document.documentElement ? (ft === document && (ft = wt()), r.top += ft.scrollTop, r.left += ft.scrollLeft) : ft = wt(), Be = Tr(ft);
1686
1686
  }
1687
- m = w.cloneNode(!0), pt(m, f.ghostClass, !1), pt(m, f.fallbackClass, !0), pt(m, f.dragClass, !0), L(m, "transition", ""), L(m, "transform", ""), L(m, "box-sizing", "border-box"), L(m, "margin", 0), L(m, "top", r.top), L(m, "left", r.left), L(m, "width", r.width), L(m, "height", r.height), L(m, "opacity", "0.8"), L(m, "position", Te ? "absolute" : "fixed"), L(m, "zIndex", "100000"), L(m, "pointerEvents", "none"), O.ghost = m, e.appendChild(m), L(m, "transform-origin", Wr / parseInt(m.style.width) * 100 + "% " + wr / parseInt(m.style.height) * 100 + "%");
1687
+ N = S.cloneNode(!0), pt(N, f.ghostClass, !1), pt(N, f.fallbackClass, !0), pt(N, f.dragClass, !0), m(N, "transition", ""), m(N, "transform", ""), m(N, "box-sizing", "border-box"), m(N, "margin", 0), m(N, "top", r.top), m(N, "left", r.left), m(N, "width", r.width), m(N, "height", r.height), m(N, "opacity", "0.8"), m(N, "position", Te ? "absolute" : "fixed"), m(N, "zIndex", "100000"), m(N, "pointerEvents", "none"), x.ghost = N, e.appendChild(N), m(N, "transform-origin", Wr / parseInt(N.style.width) * 100 + "% " + wr / parseInt(N.style.height) * 100 + "%");
1688
1688
  }
1689
1689
  },
1690
1690
  _onDragStart: function(e, r) {
1691
1691
  var f = this, n = e.dataTransfer, v = f.options;
1692
1692
  if (dt("dragStart", this, {
1693
1693
  evt: e
1694
- }), O.eventCanceled) {
1694
+ }), x.eventCanceled) {
1695
1695
  this._onDrop();
1696
1696
  return;
1697
1697
  }
1698
- dt("setupClone", this), O.eventCanceled || (C = Ur(w), C.removeAttribute("id"), C.draggable = !1, C.style["will-change"] = "", this._hideClone(), pt(C, this.options.chosenClass, !1), O.clone = C), f.cloneId = Oe(function() {
1699
- dt("clone", f), !O.eventCanceled && (f.options.removeCloneOnHide || Z.insertBefore(C, w), f._hideClone(), at({
1698
+ dt("setupClone", this), x.eventCanceled || (C = Ur(S), C.removeAttribute("id"), C.draggable = !1, C.style["will-change"] = "", this._hideClone(), pt(C, this.options.chosenClass, !1), x.clone = C), f.cloneId = Oe(function() {
1699
+ dt("clone", f), !x.eventCanceled && (f.options.removeCloneOnHide || Z.insertBefore(C, S), f._hideClone(), at({
1700
1700
  sortable: f,
1701
1701
  name: "clone"
1702
1702
  }));
1703
- }), !r && pt(w, v.dragClass, !0), r ? (Ne = !0, f._loopId = setInterval(f._emulateDragOver, 50)) : (J(document, "mouseup", f._onDrop), J(document, "touchend", f._onDrop), J(document, "touchcancel", f._onDrop), n && (n.effectAllowed = "move", v.setData && v.setData.call(f, n, w)), D(document, "drop", f), L(w, "transform", "translateZ(0)")), Ct = !0, f._dragStartId = Oe(f._dragStarted.bind(f, r, e)), D(document, "selectstart", f), te = !0, window.getSelection().removeAllRanges(), le && L(document.body, "user-select", "none");
1703
+ }), !r && pt(S, v.dragClass, !0), r ? (Ne = !0, f._loopId = setInterval(f._emulateDragOver, 50)) : (J(document, "mouseup", f._onDrop), J(document, "touchend", f._onDrop), J(document, "touchcancel", f._onDrop), n && (n.effectAllowed = "move", v.setData && v.setData.call(f, n, S)), D(document, "drop", f), m(S, "transform", "translateZ(0)")), Ct = !0, f._dragStartId = Oe(f._dragStarted.bind(f, r, e)), D(document, "selectstart", f), te = !0, window.getSelection().removeAllRanges(), le && m(document.body, "user-select", "none");
1704
1704
  },
1705
1705
  // Returns true - if no further action is needed (either inserted or another condition)
1706
1706
  _onDragOver: function(e) {
1707
- var r = this.el, f = e.target, n, v, l, a = this.options, u = a.group, d = O.active, P = se === u, b = a.sort, p = et || d, i, A = this, T = !1;
1707
+ var r = this.el, f = e.target, n, v, l, a = this.options, u = a.group, d = x.active, P = se === u, b = a.sort, p = et || d, c, s = this, A = !1;
1708
1708
  if ($e) return;
1709
- function s(yt, _t) {
1710
- dt(yt, A, St({
1709
+ function T(yt, _t) {
1710
+ dt(yt, s, St({
1711
1711
  evt: e,
1712
1712
  isOwner: P,
1713
- axis: i ? "vertical" : "horizontal",
1713
+ axis: c ? "vertical" : "horizontal",
1714
1714
  revert: l,
1715
1715
  dragRect: n,
1716
1716
  targetRect: v,
1717
1717
  canSort: b,
1718
1718
  fromSortable: p,
1719
1719
  target: f,
1720
- completed: S,
1721
- onMove: function(Xr, Qr) {
1722
- return We(Z, r, w, n, Xr, Q(Xr), e, Qr);
1720
+ completed: y,
1721
+ onMove: function(or, Qr) {
1722
+ return We(Z, r, S, n, or, Q(or), e, Qr);
1723
1723
  },
1724
- changed: N
1724
+ changed: O
1725
1725
  }, _t));
1726
1726
  }
1727
- function y() {
1728
- s("dragOverAnimationCapture"), A.captureAnimationState(), A !== p && p.captureAnimationState();
1727
+ function W() {
1728
+ T("dragOverAnimationCapture"), s.captureAnimationState(), s !== p && p.captureAnimationState();
1729
1729
  }
1730
- function S(yt) {
1731
- return s("dragOverCompleted", {
1730
+ function y(yt) {
1731
+ return T("dragOverCompleted", {
1732
1732
  insertion: yt
1733
- }), yt && (P ? d._hideClone() : d._showClone(A), A !== p && (pt(w, et ? et.options.ghostClass : d.options.ghostClass, !1), pt(w, a.ghostClass, !0)), et !== A && A !== O.active ? et = A : A === O.active && et && (et = null), p === A && (A._ignoreWhileAnimating = f), A.animateAll(function() {
1734
- s("dragOverAnimationComplete"), A._ignoreWhileAnimating = null;
1735
- }), A !== p && (p.animateAll(), p._ignoreWhileAnimating = null)), (f === w && !w.animated || f === r && !f.animated) && (Ft = null), !a.dragoverBubble && !e.rootEl && f !== document && (w.parentNode[bt]._isOutsideThisEl(e.target), !yt && gt(e)), !a.dragoverBubble && e.stopPropagation && e.stopPropagation(), T = !0;
1733
+ }), yt && (P ? d._hideClone() : d._showClone(s), s !== p && (pt(S, et ? et.options.ghostClass : d.options.ghostClass, !1), pt(S, a.ghostClass, !0)), et !== s && s !== x.active ? et = s : s === x.active && et && (et = null), p === s && (s._ignoreWhileAnimating = f), s.animateAll(function() {
1734
+ T("dragOverAnimationComplete"), s._ignoreWhileAnimating = null;
1735
+ }), s !== p && (p.animateAll(), p._ignoreWhileAnimating = null)), (f === S && !S.animated || f === r && !f.animated) && (Ft = null), !a.dragoverBubble && !e.rootEl && f !== document && (S.parentNode[bt]._isOutsideThisEl(e.target), !yt && gt(e)), !a.dragoverBubble && e.stopPropagation && e.stopPropagation(), A = !0;
1736
1736
  }
1737
- function N() {
1738
- Xt = it(w), Lt = it(w, a.draggable), at({
1739
- sortable: A,
1737
+ function O() {
1738
+ ot = ct(S), Lt = ct(S, a.draggable), at({
1739
+ sortable: s,
1740
1740
  name: "change",
1741
1741
  toEl: r,
1742
- newIndex: Xt,
1742
+ newIndex: ot,
1743
1743
  newDraggableIndex: Lt,
1744
1744
  originalEvent: e
1745
1745
  });
1746
1746
  }
1747
- if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), f = At(f, a.draggable, r, !0), s("dragOver"), O.eventCanceled) return T;
1748
- if (w.contains(e.target) || f.animated && f.animatingX && f.animatingY || A._ignoreWhileAnimating === f)
1749
- return S(!1);
1750
- if (Ne = !1, d && !a.disabled && (P ? b || (l = M !== Z) : et === this || (this.lastPutMode = se.checkPull(this, d, w, e)) && u.checkPut(this, d, w, e))) {
1751
- if (i = this._getDirection(e, f) === "vertical", n = Q(w), s("dragOverValid"), O.eventCanceled) return T;
1747
+ if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), f = At(f, a.draggable, r, !0), T("dragOver"), x.eventCanceled) return A;
1748
+ if (S.contains(e.target) || f.animated && f.animatingX && f.animatingY || s._ignoreWhileAnimating === f)
1749
+ return y(!1);
1750
+ if (Ne = !1, d && !a.disabled && (P ? b || (l = M !== Z) : et === this || (this.lastPutMode = se.checkPull(this, d, S, e)) && u.checkPut(this, d, S, e))) {
1751
+ if (c = this._getDirection(e, f) === "vertical", n = Q(S), T("dragOverValid"), x.eventCanceled) return A;
1752
1752
  if (l)
1753
- return M = Z, y(), this._hideClone(), s("revert"), O.eventCanceled || (ht ? Z.insertBefore(w, ht) : Z.appendChild(w)), S(!0);
1754
- var H = lr(r, a.draggable);
1755
- if (!H || dn(e, i, this) && !H.animated) {
1756
- if (H === w)
1757
- return S(!1);
1758
- if (H && r === e.target && (f = H), f && (v = Q(f)), We(Z, r, w, n, f, v, e, !!f) !== !1)
1759
- return y(), H && H.nextSibling ? r.insertBefore(w, H.nextSibling) : r.appendChild(w), M = r, N(), S(!0);
1760
- } else if (H && un(e, i, this)) {
1753
+ return M = Z, W(), this._hideClone(), T("revert"), x.eventCanceled || (ht ? Z.insertBefore(S, ht) : Z.appendChild(S)), y(!0);
1754
+ var z = lr(r, a.draggable);
1755
+ if (!z || dn(e, c, this) && !z.animated) {
1756
+ if (z === S)
1757
+ return y(!1);
1758
+ if (z && r === e.target && (f = z), f && (v = Q(f)), We(Z, r, S, n, f, v, e, !!f) !== !1)
1759
+ return W(), z && z.nextSibling ? r.insertBefore(S, z.nextSibling) : r.appendChild(S), M = r, O(), y(!0);
1760
+ } else if (z && un(e, c, this)) {
1761
1761
  var k = Qt(r, 0, a, !0);
1762
- if (k === w)
1763
- return S(!1);
1764
- if (f = k, v = Q(f), We(Z, r, w, n, f, v, e, !1) !== !1)
1765
- return y(), r.insertBefore(w, k), M = r, N(), S(!0);
1762
+ if (k === S)
1763
+ return y(!1);
1764
+ if (f = k, v = Q(f), We(Z, r, S, n, f, v, e, !1) !== !1)
1765
+ return W(), r.insertBefore(S, k), M = r, O(), y(!0);
1766
1766
  } else if (f.parentNode === r) {
1767
1767
  v = Q(f);
1768
- var z = 0, x, W = w.parentNode !== r, V = !fn(w.animated && w.toRect || n, f.animated && f.toRect || v, i), q = i ? "top" : "left", K = Ar(f, "top", "top") || Ar(w, "top", "top"), R = K ? K.scrollTop : void 0;
1769
- Ft !== f && (x = v[q], pe = !1, Ae = !V && a.invertSwap || W), z = bn(e, f, v, i, V ? 1 : a.swapThreshold, a.invertedSwapThreshold == null ? a.swapThreshold : a.invertedSwapThreshold, Ae, Ft === f);
1768
+ var H = 0, L, w = S.parentNode !== r, V = !fn(S.animated && S.toRect || n, f.animated && f.toRect || v, c), q = c ? "top" : "left", K = Ar(f, "top", "top") || Ar(S, "top", "top"), B = K ? K.scrollTop : void 0;
1769
+ Ft !== f && (L = v[q], pe = !1, Ae = !V && a.invertSwap || w), H = bn(e, f, v, c, V ? 1 : a.swapThreshold, a.invertedSwapThreshold == null ? a.swapThreshold : a.invertedSwapThreshold, Ae, Ft === f);
1770
1770
  var F;
1771
- if (z !== 0) {
1772
- var g = it(w);
1771
+ if (H !== 0) {
1772
+ var g = ct(S);
1773
1773
  do
1774
- g -= z, F = M.children[g];
1775
- while (F && (L(F, "display") === "none" || F === m));
1774
+ g -= H, F = M.children[g];
1775
+ while (F && (m(F, "display") === "none" || F === N));
1776
1776
  }
1777
- if (z === 0 || F === f)
1778
- return S(!1);
1779
- Ft = f, be = z;
1777
+ if (H === 0 || F === f)
1778
+ return y(!1);
1779
+ Ft = f, be = H;
1780
1780
  var vt = f.nextElementSibling, $ = !1;
1781
- $ = z === 1;
1782
- var ct = We(Z, r, w, n, f, v, e, $);
1783
- if (ct !== !1)
1784
- return (ct === 1 || ct === -1) && ($ = ct === 1), $e = !0, setTimeout(ln, 30), y(), $ && !vt ? r.appendChild(w) : f.parentNode.insertBefore(w, $ ? vt : f), K && hr(K, 0, R - K.scrollTop), M = w.parentNode, x !== void 0 && !Ae && (je = Math.abs(x - Q(f)[q])), N(), S(!0);
1781
+ $ = H === 1;
1782
+ var it = We(Z, r, S, n, f, v, e, $);
1783
+ if (it !== !1)
1784
+ return (it === 1 || it === -1) && ($ = it === 1), $e = !0, setTimeout(ln, 30), W(), $ && !vt ? r.appendChild(S) : f.parentNode.insertBefore(S, $ ? vt : f), K && hr(K, 0, B - K.scrollTop), M = S.parentNode, L !== void 0 && !Ae && (je = Math.abs(L - Q(f)[q])), O(), y(!0);
1785
1785
  }
1786
- if (r.contains(w))
1787
- return S(!1);
1786
+ if (r.contains(S))
1787
+ return y(!1);
1788
1788
  }
1789
1789
  return !1;
1790
1790
  },
@@ -1798,20 +1798,20 @@ O.prototype = /** @lends Sortable.prototype */
1798
1798
  },
1799
1799
  _onDrop: function(e) {
1800
1800
  var r = this.el, f = this.options;
1801
- if (Xt = it(w), Lt = it(w, f.draggable), dt("drop", this, {
1801
+ if (ot = ct(S), Lt = ct(S, f.draggable), dt("drop", this, {
1802
1802
  evt: e
1803
- }), M = w && w.parentNode, Xt = it(w), Lt = it(w, f.draggable), O.eventCanceled) {
1803
+ }), M = S && S.parentNode, ot = ct(S), Lt = ct(S, f.draggable), x.eventCanceled) {
1804
1804
  this._nulling();
1805
1805
  return;
1806
1806
  }
1807
- Ct = !1, Ae = !1, pe = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), _e(this.cloneId), _e(this._dragStartId), this.nativeDraggable && (J(document, "drop", this), J(r, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), le && L(document.body, "user-select", ""), L(w, "transform", ""), e && (te && (e.cancelable && e.preventDefault(), !f.dropBubble && e.stopPropagation()), m && m.parentNode && m.parentNode.removeChild(m), (Z === M || et && et.lastPutMode !== "clone") && C && C.parentNode && C.parentNode.removeChild(C), w && (this.nativeDraggable && J(w, "dragend", this), Fe(w), w.style["will-change"] = "", te && !Ct && pt(w, et ? et.options.ghostClass : this.options.ghostClass, !1), pt(w, this.options.chosenClass, !1), at({
1807
+ Ct = !1, Ae = !1, pe = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), _e(this.cloneId), _e(this._dragStartId), this.nativeDraggable && (J(document, "drop", this), J(r, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), le && m(document.body, "user-select", ""), m(S, "transform", ""), e && (te && (e.cancelable && e.preventDefault(), !f.dropBubble && e.stopPropagation()), N && N.parentNode && N.parentNode.removeChild(N), (Z === M || et && et.lastPutMode !== "clone") && C && C.parentNode && C.parentNode.removeChild(C), S && (this.nativeDraggable && J(S, "dragend", this), Fe(S), S.style["will-change"] = "", te && !Ct && pt(S, et ? et.options.ghostClass : this.options.ghostClass, !1), pt(S, this.options.chosenClass, !1), at({
1808
1808
  sortable: this,
1809
1809
  name: "unchoose",
1810
1810
  toEl: M,
1811
1811
  newIndex: null,
1812
1812
  newDraggableIndex: null,
1813
1813
  originalEvent: e
1814
- }), Z !== M ? (Xt >= 0 && (at({
1814
+ }), Z !== M ? (ot >= 0 && (at({
1815
1815
  rootEl: M,
1816
1816
  name: "add",
1817
1817
  toEl: M,
@@ -1833,7 +1833,7 @@ O.prototype = /** @lends Sortable.prototype */
1833
1833
  name: "sort",
1834
1834
  toEl: M,
1835
1835
  originalEvent: e
1836
- })), et && et.save()) : Xt !== Mt && Xt >= 0 && (at({
1836
+ })), et && et.save()) : ot !== Mt && ot >= 0 && (at({
1837
1837
  sortable: this,
1838
1838
  name: "update",
1839
1839
  toEl: M,
@@ -1843,7 +1843,7 @@ O.prototype = /** @lends Sortable.prototype */
1843
1843
  name: "sort",
1844
1844
  toEl: M,
1845
1845
  originalEvent: e
1846
- })), O.active && ((Xt == null || Xt === -1) && (Xt = Mt, Lt = de), at({
1846
+ })), x.active && ((ot == null || ot === -1) && (ot = Mt, Lt = de), at({
1847
1847
  sortable: this,
1848
1848
  name: "end",
1849
1849
  toEl: M,
@@ -1851,9 +1851,9 @@ O.prototype = /** @lends Sortable.prototype */
1851
1851
  }), this.save()))), this._nulling();
1852
1852
  },
1853
1853
  _nulling: function() {
1854
- dt("nulling", this), Z = w = M = m = ht = C = He = Vt = Kt = st = te = Xt = Lt = Mt = de = Ft = be = et = se = O.dragged = O.ghost = O.clone = O.active = null, qe.forEach(function(e) {
1854
+ dt("nulling", this), Z = S = M = N = ht = C = He = mt = Kt = st = te = ot = Lt = Mt = de = Ft = be = et = se = x.dragged = x.ghost = x.clone = x.active = null, qe.forEach(function(e) {
1855
1855
  e.checked = !0;
1856
- }), qe.length = Ge = Be = 0;
1856
+ }), qe.length = Ge = Re = 0;
1857
1857
  },
1858
1858
  handleEvent: function(e) {
1859
1859
  switch (e.type) {
@@ -1863,7 +1863,7 @@ O.prototype = /** @lends Sortable.prototype */
1863
1863
  break;
1864
1864
  case "dragenter":
1865
1865
  case "dragover":
1866
- w && (this._onDragOver(e), an(e));
1866
+ S && (this._onDragOver(e), an(e));
1867
1867
  break;
1868
1868
  case "selectstart":
1869
1869
  e.preventDefault();
@@ -1876,7 +1876,7 @@ O.prototype = /** @lends Sortable.prototype */
1876
1876
  */
1877
1877
  toArray: function() {
1878
1878
  for (var e = [], r, f = this.el.children, n = 0, v = f.length, l = this.options; n < v; n++)
1879
- r = f[n], At(r, l.draggable, this.el, !1) && e.push(r.getAttribute(l.dataIdAttr) || Xn(r));
1879
+ r = f[n], At(r, l.draggable, this.el, !1) && e.push(r.getAttribute(l.dataIdAttr) || on(r));
1880
1880
  return e;
1881
1881
  },
1882
1882
  /**
@@ -1918,7 +1918,7 @@ O.prototype = /** @lends Sortable.prototype */
1918
1918
  var f = this.options;
1919
1919
  if (r === void 0)
1920
1920
  return f[e];
1921
- var n = ce.modifyOption(this, e, r);
1921
+ var n = ie.modifyOption(this, e, r);
1922
1922
  typeof n < "u" ? f[e] = n : f[e] = r, e === "group" && Fr(f);
1923
1923
  },
1924
1924
  /**
@@ -1932,9 +1932,9 @@ O.prototype = /** @lends Sortable.prototype */
1932
1932
  }), this._onDrop(), this._disableDelayedDragEvents(), ke.splice(ke.indexOf(this.el), 1), this.el = e = null;
1933
1933
  },
1934
1934
  _hideClone: function() {
1935
- if (!Vt) {
1936
- if (dt("hideClone", this), O.eventCanceled) return;
1937
- L(C, "display", "none"), this.options.removeCloneOnHide && C.parentNode && C.parentNode.removeChild(C), Vt = !0;
1935
+ if (!mt) {
1936
+ if (dt("hideClone", this), x.eventCanceled) return;
1937
+ m(C, "display", "none"), this.options.removeCloneOnHide && C.parentNode && C.parentNode.removeChild(C), mt = !0;
1938
1938
  }
1939
1939
  },
1940
1940
  _showClone: function(e) {
@@ -1942,9 +1942,9 @@ O.prototype = /** @lends Sortable.prototype */
1942
1942
  this._hideClone();
1943
1943
  return;
1944
1944
  }
1945
- if (Vt) {
1946
- if (dt("showClone", this), O.eventCanceled) return;
1947
- w.parentNode == Z && !this.options.group.revertClone ? Z.insertBefore(C, w) : ht ? Z.insertBefore(C, ht) : Z.appendChild(C), this.options.group.revertClone && this.animate(w, C), L(C, "display", ""), Vt = !1;
1945
+ if (mt) {
1946
+ if (dt("showClone", this), x.eventCanceled) return;
1947
+ S.parentNode == Z && !this.options.group.revertClone ? Z.insertBefore(C, S) : ht ? Z.insertBefore(C, ht) : Z.appendChild(C), this.options.group.revertClone && this.animate(S, C), m(C, "display", ""), mt = !1;
1948
1948
  }
1949
1949
  }
1950
1950
  };
@@ -1953,7 +1953,7 @@ function an(t) {
1953
1953
  }
1954
1954
  function We(t, e, r, f, n, v, l, a) {
1955
1955
  var u, d = t[bt], P = d.options.onMove, b;
1956
- return window.CustomEvent && !xt && !oe ? u = new CustomEvent("move", {
1956
+ return window.CustomEvent && !xt && !Xe ? u = new CustomEvent("move", {
1957
1957
  bubbles: !0,
1958
1958
  cancelable: !0
1959
1959
  }) : (u = document.createEvent("Event"), u.initEvent("move", !0, !0)), u.to = e, u.from = t, u.dragged = r, u.draggedRect = f, u.related = n || e, u.relatedRect = v || Q(e), u.willInsertAfter = a, u.originalEvent = l, t.dispatchEvent(u), P && (b = P.call(d, u, l)), b;
@@ -1965,11 +1965,11 @@ function ln() {
1965
1965
  $e = !1;
1966
1966
  }
1967
1967
  function un(t, e, r) {
1968
- var f = Q(Qt(r.el, 0, r.options, !0)), n = Gr(r.el, r.options, m), v = 10;
1968
+ var f = Q(Qt(r.el, 0, r.options, !0)), n = Gr(r.el, r.options, N), v = 10;
1969
1969
  return e ? t.clientX < n.left - v || t.clientY < f.top && t.clientX < f.right : t.clientY < n.top - v || t.clientY < f.bottom && t.clientX < f.left;
1970
1970
  }
1971
1971
  function dn(t, e, r) {
1972
- var f = Q(lr(r.el, r.options.draggable)), n = Gr(r.el, r.options, m), v = 10;
1972
+ var f = Q(lr(r.el, r.options.draggable)), n = Gr(r.el, r.options, N), v = 10;
1973
1973
  return e ? t.clientX > n.right + v || t.clientY > f.bottom && t.clientX > f.left : t.clientY > n.bottom + v || t.clientX > f.right && t.clientY > f.top;
1974
1974
  }
1975
1975
  function bn(t, e, r, f, n, v, l, a) {
@@ -1986,9 +1986,9 @@ function bn(t, e, r, f, n, v, l, a) {
1986
1986
  return p = p || l, p && (u < P + d * v / 2 || u > b - d * v / 2) ? u > P + d / 2 ? 1 : -1 : 0;
1987
1987
  }
1988
1988
  function pn(t) {
1989
- return it(w) < it(t) ? 1 : -1;
1989
+ return ct(S) < ct(t) ? 1 : -1;
1990
1990
  }
1991
- function Xn(t) {
1991
+ function on(t) {
1992
1992
  for (var e = t.tagName + t.className + t.src + t.href + t.textContent, r = e.length, f = 0; r--; )
1993
1993
  f += e.charCodeAt(r);
1994
1994
  return f.toString(36);
@@ -2007,12 +2007,12 @@ function _e(t) {
2007
2007
  return clearTimeout(t);
2008
2008
  }
2009
2009
  Ke && D(document, "touchmove", function(t) {
2010
- (O.active || Ct) && t.cancelable && t.preventDefault();
2010
+ (x.active || Ct) && t.cancelable && t.preventDefault();
2011
2011
  });
2012
- O.utils = {
2012
+ x.utils = {
2013
2013
  on: D,
2014
2014
  off: J,
2015
- css: L,
2015
+ css: m,
2016
2016
  find: Kr,
2017
2017
  is: function(e, r) {
2018
2018
  return !!At(e, r, e, !1);
@@ -2022,31 +2022,31 @@ O.utils = {
2022
2022
  closest: At,
2023
2023
  toggleClass: pt,
2024
2024
  clone: Ur,
2025
- index: it,
2025
+ index: ct,
2026
2026
  nextTick: Oe,
2027
2027
  cancelNextTick: _e,
2028
- detectDirection: Rr,
2028
+ detectDirection: Br,
2029
2029
  getChild: Qt,
2030
2030
  expando: bt
2031
2031
  };
2032
- O.get = function(t) {
2032
+ x.get = function(t) {
2033
2033
  return t[bt];
2034
2034
  };
2035
- O.mount = function() {
2035
+ x.mount = function() {
2036
2036
  for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++)
2037
2037
  e[r] = arguments[r];
2038
2038
  e[0].constructor === Array && (e = e[0]), e.forEach(function(f) {
2039
2039
  if (!f.prototype || !f.prototype.constructor)
2040
2040
  throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(f));
2041
- f.utils && (O.utils = St(St({}, O.utils), f.utils)), ce.mount(f);
2041
+ f.utils && (x.utils = St(St({}, x.utils), f.utils)), ie.mount(f);
2042
2042
  });
2043
2043
  };
2044
- O.create = function(t, e) {
2045
- return new O(t, e);
2044
+ x.create = function(t, e) {
2045
+ return new x(t, e);
2046
2046
  };
2047
- O.version = Mf;
2047
+ x.version = Mf;
2048
2048
  var E = [], ee, tr, er = !1, Ze, Ce, Je, re;
2049
- function on() {
2049
+ function Xn() {
2050
2050
  function t() {
2051
2051
  this.defaults = {
2052
2052
  scroll: !0,
@@ -2078,7 +2078,7 @@ function on() {
2078
2078
  },
2079
2079
  _handleAutoScroll: function(r, f) {
2080
2080
  var n = this, v = (r.touches ? r.touches[0] : r).clientX, l = (r.touches ? r.touches[0] : r).clientY, a = document.elementFromPoint(v, l);
2081
- if (Je = r, f || this.options.forceAutoScrollFallback || oe || xt || le) {
2081
+ if (Je = r, f || this.options.forceAutoScrollFallback || Xe || xt || le) {
2082
2082
  Me(r, this.options, a, f);
2083
2083
  var u = Nt(a, !0);
2084
2084
  er && (!re || v !== Ze || l !== Ce) && (re && yr(), re = setInterval(function() {
@@ -2112,16 +2112,16 @@ var Me = gr(function(t, e, r, f) {
2112
2112
  tr !== r && (tr = r, xe(), ee = e.scroll, P = e.scrollFn, ee === !0 && (ee = Nt(r, !0)));
2113
2113
  var b = 0, p = ee;
2114
2114
  do {
2115
- var i = p, A = Q(i), T = A.top, s = A.bottom, y = A.left, S = A.right, N = A.width, H = A.height, k = void 0, z = void 0, x = i.scrollWidth, W = i.scrollHeight, V = L(i), q = i.scrollLeft, K = i.scrollTop;
2116
- i === u ? (k = N < x && (V.overflowX === "auto" || V.overflowX === "scroll" || V.overflowX === "visible"), z = H < W && (V.overflowY === "auto" || V.overflowY === "scroll" || V.overflowY === "visible")) : (k = N < x && (V.overflowX === "auto" || V.overflowX === "scroll"), z = H < W && (V.overflowY === "auto" || V.overflowY === "scroll"));
2117
- var R = k && (Math.abs(S - n) <= l && q + N < x) - (Math.abs(y - n) <= l && !!q), F = z && (Math.abs(s - v) <= l && K + H < W) - (Math.abs(T - v) <= l && !!K);
2115
+ var c = p, s = Q(c), A = s.top, T = s.bottom, W = s.left, y = s.right, O = s.width, z = s.height, k = void 0, H = void 0, L = c.scrollWidth, w = c.scrollHeight, V = m(c), q = c.scrollLeft, K = c.scrollTop;
2116
+ c === u ? (k = O < L && (V.overflowX === "auto" || V.overflowX === "scroll" || V.overflowX === "visible"), H = z < w && (V.overflowY === "auto" || V.overflowY === "scroll" || V.overflowY === "visible")) : (k = O < L && (V.overflowX === "auto" || V.overflowX === "scroll"), H = z < w && (V.overflowY === "auto" || V.overflowY === "scroll"));
2117
+ var B = k && (Math.abs(y - n) <= l && q + O < L) - (Math.abs(W - n) <= l && !!q), F = H && (Math.abs(T - v) <= l && K + z < w) - (Math.abs(A - v) <= l && !!K);
2118
2118
  if (!E[b])
2119
2119
  for (var g = 0; g <= b; g++)
2120
2120
  E[g] || (E[g] = {});
2121
- (E[b].vx != R || E[b].vy != F || E[b].el !== i) && (E[b].el = i, E[b].vx = R, E[b].vy = F, clearInterval(E[b].pid), (R != 0 || F != 0) && (d = !0, E[b].pid = setInterval((function() {
2122
- f && this.layer === 0 && O.active._onTouchMove(Je);
2121
+ (E[b].vx != B || E[b].vy != F || E[b].el !== c) && (E[b].el = c, E[b].vx = B, E[b].vy = F, clearInterval(E[b].pid), (B != 0 || F != 0) && (d = !0, E[b].pid = setInterval((function() {
2122
+ f && this.layer === 0 && x.active._onTouchMove(Je);
2123
2123
  var vt = E[this.layer].vy ? E[this.layer].vy * a : 0, $ = E[this.layer].vx ? E[this.layer].vx * a : 0;
2124
- typeof P == "function" && P.call(O.dragged.parentNode[bt], $, vt, t, Je, E[this.layer].el) !== "continue" || hr(E[this.layer].el, $, vt);
2124
+ typeof P == "function" && P.call(x.dragged.parentNode[bt], $, vt, t, Je, E[this.layer].el) !== "continue" || hr(E[this.layer].el, $, vt);
2125
2125
  }).bind({
2126
2126
  layer: b
2127
2127
  }), 24))), b++;
@@ -2171,8 +2171,8 @@ dr.prototype = {
2171
2171
  Ot(dr, {
2172
2172
  pluginName: "removeOnSpill"
2173
2173
  });
2174
- O.mount(new on());
2175
- O.mount(dr, ur);
2174
+ x.mount(new Xn());
2175
+ x.mount(dr, ur);
2176
2176
  const cn = /* @__PURE__ */ _({
2177
2177
  __name: "BlockBrowser",
2178
2178
  setup(t) {
@@ -2182,7 +2182,7 @@ const cn = /* @__PURE__ */ _({
2182
2182
  }) : []), f = Y(() => Ht.value ? Object.values(Ht.value).length : 0);
2183
2183
  function n() {
2184
2184
  const v = document.getElementById("available-blocks-list");
2185
- v && f.value && new O(v, {
2185
+ v && f.value && new x(v, {
2186
2186
  animation: 150,
2187
2187
  ghostClass: "sortable-ghost",
2188
2188
  chosenClass: "sortable-chosen",
@@ -2195,11 +2195,11 @@ const cn = /* @__PURE__ */ _({
2195
2195
  sort: !1
2196
2196
  });
2197
2197
  }
2198
- return Bt(() => {
2198
+ return Rt(() => {
2199
2199
  n();
2200
- }), (v, l) => (X(), o("div", { class: "block-browser" }, [
2201
- c("div", { class: "block-browser-header border-b border-gray-300 bg-white px-5 py-3" }, [
2202
- lt(c("input", {
2200
+ }), (v, l) => (o(), X("div", { class: "block-browser" }, [
2201
+ i("div", { class: "block-browser-header border-b border-gray-300 bg-white px-5 py-3" }, [
2202
+ lt(i("input", {
2203
2203
  "onUpdate:modelValue": l[0] || (l[0] = (a) => e.value = a),
2204
2204
  type: "text",
2205
2205
  placeholder: "Search blocks",
@@ -2208,25 +2208,25 @@ const cn = /* @__PURE__ */ _({
2208
2208
  [Zt, e.value]
2209
2209
  ])
2210
2210
  ]),
2211
- f.value ? r.value.length ? (X(), o("div", {
2211
+ f.value ? r.value.length ? (o(), X("div", {
2212
2212
  key: 2,
2213
2213
  id: "available-blocks-list",
2214
2214
  class: "available-blocks-grid"
2215
2215
  }, [
2216
- (X(!0), o(tt, null, nt(r.value, (a) => (X(), ut(Rf, {
2216
+ (o(!0), X(tt, null, nt(r.value, (a) => (o(), ut(Bf, {
2217
2217
  key: a.type,
2218
2218
  block: a
2219
2219
  }, null, 8, ["block"]))), 128))
2220
- ])) : (X(), o("div", {
2220
+ ])) : (o(), X("div", {
2221
2221
  key: 1,
2222
2222
  class: "p-5 text-center text-sm text-zinc-500"
2223
- }, "No blocks found")) : (X(), o("div", {
2223
+ }, "No blocks found")) : (o(), X("div", {
2224
2224
  key: 0,
2225
2225
  class: "p-5 text-center text-sm text-zinc-500"
2226
2226
  }, [
2227
- c("p", null, "Create your first block to get started."),
2228
- c("p", { class: "mt-3" }, [
2229
- c("a", {
2227
+ i("p", null, "Create your first block to get started."),
2228
+ i("p", { class: "mt-3" }, [
2229
+ i("a", {
2230
2230
  href: "https://github.com/sano-io/page-builder/tree/main/blocks",
2231
2231
  target: "_blank",
2232
2232
  class: "text-blue-600 underline underline-offset-2 hover:text-blue-800"
@@ -2263,133 +2263,133 @@ const cn = /* @__PURE__ */ _({
2263
2263
  function v() {
2264
2264
  if (e.fieldConfig.maxItems && f.value.length >= e.fieldConfig.maxItems)
2265
2265
  return;
2266
- const b = crypto.randomUUID(), p = typeof e.fieldConfig.default == "object" ? e.fieldConfig.default : {}, i = { id: b, ...p };
2267
- f.value = [...f.value, i], n.value.push(b);
2266
+ const b = crypto.randomUUID(), p = typeof e.fieldConfig.default == "object" ? e.fieldConfig.default : {}, c = { id: b, ...p };
2267
+ f.value = [...f.value, c], n.value.push(b);
2268
2268
  }
2269
2269
  function l(b) {
2270
- var i;
2270
+ var c;
2271
2271
  if (e.fieldConfig.minItems && f.value.length <= e.fieldConfig.minItems)
2272
2272
  return;
2273
- const p = (i = f.value[b]) == null ? void 0 : i.id;
2274
- f.value = f.value.filter((A, T) => T !== b), p && (n.value = n.value.filter((A) => A !== p));
2273
+ const p = (c = f.value[b]) == null ? void 0 : c.id;
2274
+ f.value = f.value.filter((s, A) => A !== b), p && (n.value = n.value.filter((s) => s !== p));
2275
2275
  }
2276
2276
  function a(b) {
2277
2277
  if (b > 0) {
2278
- const p = [...f.value], [i] = p.splice(b, 1);
2279
- p.splice(b - 1, 0, i), f.value = p;
2278
+ const p = [...f.value], [c] = p.splice(b, 1);
2279
+ p.splice(b - 1, 0, c), f.value = p;
2280
2280
  }
2281
2281
  }
2282
2282
  function u(b) {
2283
2283
  if (b < f.value.length - 1) {
2284
- const p = [...f.value], [i] = p.splice(b, 1);
2285
- p.splice(b + 1, 0, i), f.value = p;
2284
+ const p = [...f.value], [c] = p.splice(b, 1);
2285
+ p.splice(b + 1, 0, c), f.value = p;
2286
2286
  }
2287
2287
  }
2288
2288
  function d(b) {
2289
2289
  n.value.includes(b) ? n.value = n.value.filter((p) => p !== b) : n.value.push(b);
2290
2290
  }
2291
2291
  const P = Y(() => !e.editable || !!(e.fieldConfig.maxItems && f.value.length >= e.fieldConfig.maxItems));
2292
- return (b, p) => (X(), o("div", { class: "repeater-field" }, [
2293
- f.value.length === 0 ? (X(), o("div", {
2292
+ return (b, p) => (o(), X("div", { class: "repeater-field" }, [
2293
+ f.value.length === 0 ? (o(), X("div", {
2294
2294
  key: 0,
2295
2295
  class: "empty-state bg-zinc-50 px-4 py-5 text-center text-sm text-neutral-500"
2296
2296
  }, [
2297
- c("p", { class: "underline underline-offset-2" }, "No items yet."),
2298
- t.editable ? (X(), o("button", {
2297
+ i("p", { class: "underline underline-offset-2" }, "No items yet."),
2298
+ t.editable ? (o(), X("button", {
2299
2299
  key: 0,
2300
2300
  disabled: !!(t.fieldConfig.maxItems && f.value.length >= t.fieldConfig.maxItems),
2301
2301
  class: "mx-auto mt-4 flex items-center gap-1 rounded-md border border-blue-200 bg-blue-50 px-2.5 py-1.5 text-sm text-blue-500 transition-all duration-200 hover:bg-blue-100 hover:text-blue-700",
2302
2302
  onClick: v
2303
2303
  }, [
2304
- c("span", null, "Add item"),
2305
- c("span", null, "+")
2306
- ], 8, ["disabled"])) : (X(), o("p", {
2304
+ i("span", null, "Add item"),
2305
+ i("span", null, "+")
2306
+ ], 8, ["disabled"])) : (o(), X("p", {
2307
2307
  key: 1,
2308
2308
  class: "text-sm text-neutral-500"
2309
2309
  }, "Enter edit mode to add items."))
2310
- ])) : (X(), o("div", {
2310
+ ])) : (o(), X("div", {
2311
2311
  key: 1,
2312
2312
  class: "repeater-items space-y-2"
2313
2313
  }, [
2314
- (X(!0), o(tt, null, nt(f.value, (i, A) => (X(), o("div", {
2315
- key: `${t.fieldName}-item-${A}`,
2316
- class: I(["repeater-item overflow-hidden rounded-lg border border-gray-300 bg-white hover:border-zinc-300 hover:shadow-sm", { "is-open": n.value.includes(i.id) }])
2314
+ (o(!0), X(tt, null, nt(f.value, (c, s) => (o(), X("div", {
2315
+ key: `${t.fieldName}-item-${s}`,
2316
+ class: I(["repeater-item overflow-hidden rounded-lg border border-gray-300 bg-white hover:border-zinc-300 hover:shadow-sm", { "is-open": n.value.includes(c.id) }])
2317
2317
  }, [
2318
- c("div", { class: "repeater-item-header flex items-center gap-2 bg-zinc-50 p-3" }, [
2319
- c("button", {
2318
+ i("div", { class: "repeater-item-header flex items-center gap-2 bg-zinc-50 p-3" }, [
2319
+ i("button", {
2320
2320
  class: "text-zinc-500 hover:text-zinc-700",
2321
2321
  title: "Toggle item",
2322
- onClick: (T) => d(i.id)
2322
+ onClick: (A) => d(c.id)
2323
2323
  }, [
2324
- n.value.includes(i.id) ? (X(), ut(G(qf), {
2324
+ n.value.includes(c.id) ? (o(), ut(G(qf), {
2325
2325
  key: 1,
2326
2326
  class: "size-4"
2327
- })) : (X(), ut(G(kf), {
2327
+ })) : (o(), ut(G(kf), {
2328
2328
  key: 0,
2329
2329
  class: "size-4"
2330
2330
  }))
2331
2331
  ], 8, ["onClick"]),
2332
- c("h4", { class: "mr-auto text-sm font-medium text-gray-700" }, [
2333
- t.fieldConfig.repeaterFieldLabel ? (X(), o("span", { key: 0 }, U(i[t.fieldConfig.repeaterFieldLabel] || `Item ${A + 1}`), 1)) : (X(), o("span", { key: 1 }, " Item " + U(A + 1), 1))
2332
+ i("h4", { class: "mr-auto text-sm font-medium text-gray-700" }, [
2333
+ t.fieldConfig.repeaterFieldLabel ? (o(), X("span", { key: 0 }, U(c[t.fieldConfig.repeaterFieldLabel] || `Item ${s + 1}`), 1)) : (o(), X("span", { key: 1 }, " Item " + U(s + 1), 1))
2334
2334
  ]),
2335
- t.editable ? (X(), o("div", {
2335
+ t.editable ? (o(), X("div", {
2336
2336
  key: 0,
2337
2337
  class: "flex items-center gap-2"
2338
2338
  }, [
2339
- A > 0 ? (X(), o("button", {
2339
+ s > 0 ? (o(), X("button", {
2340
2340
  key: 0,
2341
2341
  disabled: !t.editable,
2342
2342
  title: "Move item up",
2343
- onClick: (T) => a(A)
2343
+ onClick: (A) => a(s)
2344
2344
  }, [
2345
2345
  h(G(Nf), { class: "size-4" })
2346
- ], 8, ["disabled", "onClick"])) : B("", !0),
2347
- A < f.value.length - 1 ? (X(), o("button", {
2346
+ ], 8, ["disabled", "onClick"])) : R("", !0),
2347
+ s < f.value.length - 1 ? (o(), X("button", {
2348
2348
  key: 1,
2349
2349
  title: "Move item down",
2350
- onClick: (T) => u(A)
2350
+ onClick: (A) => u(s)
2351
2351
  }, [
2352
- h(G(mf), { class: "size-4" })
2353
- ], 8, ["onClick"])) : B("", !0),
2354
- c("button", {
2352
+ h(G(Vf), { class: "size-4" })
2353
+ ], 8, ["onClick"])) : R("", !0),
2354
+ i("button", {
2355
2355
  class: "text-red-600 hover:text-red-700",
2356
2356
  title: "Remove item",
2357
- onClick: (T) => l(A)
2357
+ onClick: (A) => l(s)
2358
2358
  }, [
2359
- h(G(Bf), { class: "size-4" })
2359
+ h(G(Rf), { class: "size-4" })
2360
2360
  ], 8, ["onClick"])
2361
- ])) : B("", !0)
2361
+ ])) : R("", !0)
2362
2362
  ]),
2363
- c("div", { class: "repeater-item-fields flex flex-col gap-3" }, [
2364
- (X(!0), o(tt, null, nt(t.fieldConfig.repeaterFields, (T, s) => (X(), ut(Yr, {
2365
- key: `${t.fieldName}-${A}-${s}`,
2366
- modelValue: f.value[A][s],
2367
- "onUpdate:modelValue": (y) => f.value[A][s] = y,
2368
- fieldConfig: T,
2369
- fieldName: s,
2363
+ i("div", { class: "repeater-item-fields flex flex-col gap-3" }, [
2364
+ (o(!0), X(tt, null, nt(t.fieldConfig.repeaterFields, (A, T) => (o(), ut(Yr, {
2365
+ key: `${t.fieldName}-${s}-${T}`,
2366
+ modelValue: f.value[s][T],
2367
+ "onUpdate:modelValue": (W) => f.value[s][T] = W,
2368
+ fieldConfig: A,
2369
+ fieldName: T,
2370
2370
  editable: t.editable
2371
2371
  }, null, 8, ["modelValue", "onUpdate:modelValue", "fieldConfig", "fieldName", "editable"]))), 128))
2372
2372
  ])
2373
2373
  ], 2))), 128))
2374
2374
  ])),
2375
- c("div", { class: "mt-3 flex justify-between gap-2" }, [
2376
- t.fieldConfig.minItems && f.value.length === t.fieldConfig.minItems ? (X(), o("div", {
2375
+ i("div", { class: "mt-3 flex justify-between gap-2" }, [
2376
+ t.fieldConfig.minItems && f.value.length === t.fieldConfig.minItems ? (o(), X("div", {
2377
2377
  key: 0,
2378
2378
  class: "mt-2 text-xs text-amber-600"
2379
- }, " Minimum " + U(t.fieldConfig.minItems) + " item" + U(t.fieldConfig.minItems > 1 ? "s" : "") + " required ", 1)) : B("", !0),
2380
- t.fieldConfig.maxItems && f.value.length >= t.fieldConfig.maxItems ? (X(), o("div", {
2379
+ }, " Minimum " + U(t.fieldConfig.minItems) + " item" + U(t.fieldConfig.minItems > 1 ? "s" : "") + " required ", 1)) : R("", !0),
2380
+ t.fieldConfig.maxItems && f.value.length >= t.fieldConfig.maxItems ? (o(), X("div", {
2381
2381
  key: 1,
2382
2382
  class: "mt-2 text-xs text-amber-600"
2383
- }, " Maximum " + U(t.fieldConfig.maxItems) + " item" + U(t.fieldConfig.maxItems > 1 ? "s" : "") + " allowed ", 1)) : B("", !0),
2384
- t.editable && f.value.length ? (X(), o("button", {
2383
+ }, " Maximum " + U(t.fieldConfig.maxItems) + " item" + U(t.fieldConfig.maxItems > 1 ? "s" : "") + " allowed ", 1)) : R("", !0),
2384
+ t.editable && f.value.length ? (o(), X("button", {
2385
2385
  key: 2,
2386
2386
  disabled: P.value,
2387
2387
  class: I(["ml-auto mt-1 flex items-center gap-1 rounded-md border border-blue-200 bg-blue-50 px-2.5 py-1.5 text-sm text-blue-500 transition-all duration-200 hover:bg-blue-100 hover:text-blue-700", { "cursor-not-allowed opacity-50": P.value }]),
2388
2388
  onClick: v
2389
2389
  }, [
2390
- c("span", null, "Add item"),
2390
+ i("span", null, "Add item"),
2391
2391
  h(G(kr), { class: "size-4" })
2392
- ], 10, ["disabled"])) : B("", !0)
2392
+ ], 10, ["disabled"])) : R("", !0)
2393
2393
  ])
2394
2394
  ]));
2395
2395
  }
@@ -2413,21 +2413,21 @@ const cn = /* @__PURE__ */ _({
2413
2413
  }, l = () => {
2414
2414
  f.value && (n.value = { top: f.value, bottom: f.value });
2415
2415
  };
2416
- return Bt(() => {
2416
+ return Rt(() => {
2417
2417
  var a, u, d;
2418
2418
  ((a = n.value) == null ? void 0 : a.top) === ((u = n.value) == null ? void 0 : u.bottom) && (r.value = !0, f.value = ((d = n.value) == null ? void 0 : d.top) || e.fieldConfig.default || ""), (!n.value || !n.value.top || !n.value.bottom) && (n.value = { top: e.fieldConfig.default || "", bottom: e.fieldConfig.default || "" });
2419
- }), (a, u) => (X(), o("div", {
2419
+ }), (a, u) => (o(), X("div", {
2420
2420
  class: I(["margin-field flex gap-2", r.value ? "" : "items-start"])
2421
2421
  }, [
2422
- r.value ? (X(), o("div", {
2422
+ r.value ? (o(), X("div", {
2423
2423
  key: 0,
2424
2424
  class: "field-wrapper relative flex-1",
2425
2425
  title: "Top & Bottom Margin"
2426
2426
  }, [
2427
- c("span", { class: "pointer-events-none absolute left-0 top-0 inline-flex h-full items-center border-r border-gray-300 px-3 text-xs" }, [
2428
- h(G(Vf), { class: "size-3" })
2427
+ i("span", { class: "pointer-events-none absolute left-0 top-0 inline-flex h-full items-center border-r border-gray-300 px-3 text-xs" }, [
2428
+ h(G(mf), { class: "size-3" })
2429
2429
  ]),
2430
- lt(c("select", {
2430
+ lt(i("select", {
2431
2431
  "onUpdate:modelValue": u[0] || (u[0] = (d) => f.value = d),
2432
2432
  class: "form-control",
2433
2433
  style: { "padding-left": "3rem" },
@@ -2435,32 +2435,32 @@ const cn = /* @__PURE__ */ _({
2435
2435
  disabled: !t.editable,
2436
2436
  onChange: l
2437
2437
  }, [
2438
- (X(!0), o(tt, null, nt(t.fieldConfig.options, (d) => (X(), o("option", {
2438
+ (o(!0), X(tt, null, nt(t.fieldConfig.options, (d) => (o(), X("option", {
2439
2439
  key: d.value,
2440
2440
  value: d.value
2441
2441
  }, U(d.label), 9, ["value"]))), 128))
2442
2442
  ], 40, ["placeholder", "disabled"]), [
2443
2443
  [ne, f.value]
2444
2444
  ])
2445
- ])) : n.value ? (X(), o("div", {
2445
+ ])) : n.value ? (o(), X("div", {
2446
2446
  key: 1,
2447
2447
  class: "flex flex-1 gap-2"
2448
2448
  }, [
2449
- c("div", {
2449
+ i("div", {
2450
2450
  class: "field-wrapper relative flex-1",
2451
2451
  title: "Top Margin"
2452
2452
  }, [
2453
- c("span", { class: "pointer-events-none absolute left-0 top-0 inline-flex h-full items-center justify-center border-r border-gray-300 px-3 text-xs" }, [
2453
+ i("span", { class: "pointer-events-none absolute left-0 top-0 inline-flex h-full items-center justify-center border-r border-gray-300 px-3 text-xs" }, [
2454
2454
  h(G(Lf), { class: "size-3" })
2455
2455
  ]),
2456
- lt(c("select", {
2456
+ lt(i("select", {
2457
2457
  "onUpdate:modelValue": u[1] || (u[1] = (d) => n.value.top = d),
2458
2458
  class: "form-control",
2459
2459
  style: { "padding-left": "3rem" },
2460
2460
  placeholder: t.fieldConfig.placeholder,
2461
2461
  disabled: !t.editable
2462
2462
  }, [
2463
- (X(!0), o(tt, null, nt(t.fieldConfig.options, (d) => (X(), o("option", {
2463
+ (o(!0), X(tt, null, nt(t.fieldConfig.options, (d) => (o(), X("option", {
2464
2464
  key: d.value,
2465
2465
  value: d.value
2466
2466
  }, U(d.label), 9, ["value"]))), 128))
@@ -2468,21 +2468,21 @@ const cn = /* @__PURE__ */ _({
2468
2468
  [ne, n.value.top]
2469
2469
  ])
2470
2470
  ]),
2471
- c("div", {
2471
+ i("div", {
2472
2472
  class: "field-wrapper relative flex-1",
2473
2473
  title: "Bottom Margin"
2474
2474
  }, [
2475
- c("span", { class: "pointer-events-none absolute left-0 top-0 inline-flex h-full items-center justify-center border-r border-gray-300 px-3 text-xs" }, [
2475
+ i("span", { class: "pointer-events-none absolute left-0 top-0 inline-flex h-full items-center justify-center border-r border-gray-300 px-3 text-xs" }, [
2476
2476
  h(G(Of), { class: "size-3" })
2477
2477
  ]),
2478
- lt(c("select", {
2478
+ lt(i("select", {
2479
2479
  "onUpdate:modelValue": u[2] || (u[2] = (d) => n.value.bottom = d),
2480
2480
  class: "form-control",
2481
2481
  style: { "padding-left": "3rem" },
2482
2482
  placeholder: t.fieldConfig.placeholder,
2483
2483
  disabled: !t.editable
2484
2484
  }, [
2485
- (X(!0), o(tt, null, nt(t.fieldConfig.options, (d) => (X(), o("option", {
2485
+ (o(!0), X(tt, null, nt(t.fieldConfig.options, (d) => (o(), X("option", {
2486
2486
  key: d.value,
2487
2487
  value: d.value
2488
2488
  }, U(d.label), 9, ["value"]))), 128))
@@ -2490,8 +2490,8 @@ const cn = /* @__PURE__ */ _({
2490
2490
  [ne, n.value.bottom]
2491
2491
  ])
2492
2492
  ])
2493
- ])) : B("", !0),
2494
- t.editable ? (X(), o("button", {
2493
+ ])) : R("", !0),
2494
+ t.editable ? (o(), X("button", {
2495
2495
  key: 2,
2496
2496
  title: "Link Margin (Top & Bottom)",
2497
2497
  class: I([
@@ -2500,14 +2500,14 @@ const cn = /* @__PURE__ */ _({
2500
2500
  ]),
2501
2501
  onClick: v
2502
2502
  }, [
2503
- r.value ? (X(), ut(G(Uf), {
2503
+ r.value ? (o(), ut(G(Uf), {
2504
2504
  key: 0,
2505
2505
  class: "size-4"
2506
- })) : (X(), ut(G(hf), {
2506
+ })) : (o(), ut(G(hf), {
2507
2507
  key: 1,
2508
2508
  class: "size-4"
2509
2509
  }))
2510
- ], 2)) : B("", !0)
2510
+ ], 2)) : R("", !0)
2511
2511
  ], 2));
2512
2512
  }
2513
2513
  }), wn = /* @__PURE__ */ Wt(Wn, [["__scopeId", "data-v-a88a6b3c"]]), Sn = /* @__PURE__ */ _({
@@ -2522,47 +2522,47 @@ const cn = /* @__PURE__ */ _({
2522
2522
  emits: ["update:modelValue"],
2523
2523
  setup(t, { emit: e }) {
2524
2524
  const r = t, f = e, n = j(null), v = j(r.modelValue || null), l = j(!1), a = j(!1), u = j(null), d = j(null);
2525
- ot(
2525
+ Xt(
2526
2526
  () => r.modelValue,
2527
- (H) => {
2528
- v.value = H || null;
2527
+ (z) => {
2528
+ v.value = z || null;
2529
2529
  }
2530
- ), ot(v, (H) => {
2531
- f("update:modelValue", H);
2530
+ ), Xt(v, (z) => {
2531
+ f("update:modelValue", z);
2532
2532
  });
2533
2533
  function P() {
2534
- var H;
2535
- !r.editable || l.value || (H = n.value) == null || H.click();
2534
+ var z;
2535
+ !r.editable || l.value || (z = n.value) == null || z.click();
2536
2536
  }
2537
- function b(H) {
2538
- var x;
2539
- const z = (x = H.target.files) == null ? void 0 : x[0];
2540
- z && s(z);
2537
+ function b(z) {
2538
+ var L;
2539
+ const H = (L = z.target.files) == null ? void 0 : L[0];
2540
+ H && T(H);
2541
2541
  }
2542
- function p(H) {
2543
- !r.editable || l.value || (H.preventDefault(), a.value = !0);
2542
+ function p(z) {
2543
+ !r.editable || l.value || (z.preventDefault(), a.value = !0);
2544
2544
  }
2545
- function i() {
2545
+ function c() {
2546
2546
  a.value = !1;
2547
2547
  }
2548
- function A(H) {
2549
- var z;
2548
+ function s(z) {
2549
+ var H;
2550
2550
  if (!r.editable || l.value) return;
2551
- H.preventDefault(), a.value = !1;
2552
- const k = (z = H.dataTransfer) == null ? void 0 : z.files[0];
2553
- k && s(k);
2551
+ z.preventDefault(), a.value = !1;
2552
+ const k = (H = z.dataTransfer) == null ? void 0 : H.files[0];
2553
+ k && T(k);
2554
2554
  }
2555
- function T(H) {
2556
- return u.value = null, r.acceptedTypes.includes(H.type) ? H.size / (1024 * 1024) > r.maxSizeMB ? (u.value = `File size exceeds ${r.maxSizeMB}MB limit`, !1) : !0 : (u.value = `File type not supported. Accepted types: ${r.acceptedTypes.join(", ")}`, !1);
2555
+ function A(z) {
2556
+ return u.value = null, r.acceptedTypes.includes(z.type) ? z.size / (1024 * 1024) > r.maxSizeMB ? (u.value = `File size exceeds ${r.maxSizeMB}MB limit`, !1) : !0 : (u.value = `File type not supported. Accepted types: ${r.acceptedTypes.join(", ")}`, !1);
2557
2557
  }
2558
- async function s(H) {
2559
- if (T(H)) {
2560
- d.value = H, l.value = !0, u.value = null;
2558
+ async function T(z) {
2559
+ if (A(z)) {
2560
+ d.value = z, l.value = !0, u.value = null;
2561
2561
  try {
2562
- const k = URL.createObjectURL(H);
2562
+ const k = URL.createObjectURL(z);
2563
2563
  v.value = k;
2564
- const z = await y(H);
2565
- z ? (URL.revokeObjectURL(k), v.value = z) : u.value = "Upload failed. Please try again.";
2564
+ const H = await W(z);
2565
+ H ? (URL.revokeObjectURL(k), v.value = H) : u.value = "Upload failed. Please try again.";
2566
2566
  } catch (k) {
2567
2567
  console.error("File upload error:", k), u.value = k instanceof Error ? k.message : "Upload failed. Please try again.";
2568
2568
  } finally {
@@ -2570,46 +2570,46 @@ const cn = /* @__PURE__ */ _({
2570
2570
  }
2571
2571
  }
2572
2572
  }
2573
- async function y(H) {
2574
- return r.uploadUrl ? S(H, r.uploadUrl) : new Promise((k) => {
2575
- const z = new FileReader();
2576
- z.onload = (x) => {
2573
+ async function W(z) {
2574
+ return r.uploadUrl ? y(z, r.uploadUrl) : new Promise((k) => {
2575
+ const H = new FileReader();
2576
+ H.onload = (L) => {
2577
2577
  var V;
2578
- const W = (V = x.target) == null ? void 0 : V.result;
2579
- k(W);
2580
- }, z.onerror = () => {
2578
+ const w = (V = L.target) == null ? void 0 : V.result;
2579
+ k(w);
2580
+ }, H.onerror = () => {
2581
2581
  k(null);
2582
- }, z.readAsDataURL(H);
2582
+ }, H.readAsDataURL(z);
2583
2583
  });
2584
2584
  }
2585
- async function S(H, k) {
2585
+ async function y(z, k) {
2586
2586
  try {
2587
- const z = new FormData();
2588
- z.append("file", H);
2589
- const x = await fetch(k, {
2587
+ const H = new FormData();
2588
+ H.append("file", z);
2589
+ const L = await fetch(k, {
2590
2590
  method: "POST",
2591
- body: z
2591
+ body: H
2592
2592
  });
2593
- if (!x.ok)
2594
- throw new Error(`Upload failed: ${x.statusText}`);
2595
- const W = await x.json();
2596
- return W.url || W.imageUrl || W.path || null;
2597
- } catch (z) {
2598
- throw console.error("Custom upload error:", z), z;
2593
+ if (!L.ok)
2594
+ throw new Error(`Upload failed: ${L.statusText}`);
2595
+ const w = await L.json();
2596
+ return w.url || w.imageUrl || w.path || null;
2597
+ } catch (H) {
2598
+ throw console.error("Custom upload error:", H), H;
2599
2599
  }
2600
2600
  }
2601
- function N() {
2601
+ function O() {
2602
2602
  !r.editable || l.value || (v.value && v.value.startsWith("blob:") && URL.revokeObjectURL(v.value), v.value = null, d.value = null, u.value = null, n.value && (n.value.value = ""));
2603
2603
  }
2604
- return (H, k) => (X(), o("div", { class: "image-upload-field mb-2" }, [
2605
- v.value && t.editable ? (X(), o("div", {
2604
+ return (z, k) => (o(), X("div", { class: "image-upload-field mb-2" }, [
2605
+ v.value && t.editable ? (o(), X("div", {
2606
2606
  key: 0,
2607
2607
  class: "flex gap-2",
2608
2608
  onDragover: Pt(p, ["prevent"]),
2609
- onDragleave: Pt(i, ["prevent"]),
2610
- onDrop: Pt(A, ["prevent"])
2609
+ onDragleave: Pt(c, ["prevent"]),
2610
+ onDrop: Pt(s, ["prevent"])
2611
2611
  }, [
2612
- c("input", {
2612
+ i("input", {
2613
2613
  ref_key: "fileInputRef",
2614
2614
  ref: n,
2615
2615
  type: "file",
@@ -2618,19 +2618,19 @@ const cn = /* @__PURE__ */ _({
2618
2618
  disabled: l.value || !t.editable,
2619
2619
  onChange: b
2620
2620
  }, null, 40, ["disabled"]),
2621
- c("div", { class: "relative shrink-0" }, [
2622
- c("img", {
2621
+ i("div", { class: "relative shrink-0" }, [
2622
+ i("img", {
2623
2623
  src: v.value,
2624
2624
  alt: "Uploaded image",
2625
2625
  class: "size-16 rounded border border-gray-300 object-cover"
2626
2626
  }, null, 8, ["src"]),
2627
- c("button", {
2627
+ i("button", {
2628
2628
  type: "button",
2629
2629
  class: "absolute -right-1 -top-1 rounded-full bg-red-500 p-0.5 text-white shadow-sm hover:bg-red-600",
2630
2630
  title: "Remove image",
2631
- onClick: Pt(N, ["stop"])
2631
+ onClick: Pt(O, ["stop"])
2632
2632
  }, [
2633
- (X(), o("svg", {
2633
+ (o(), X("svg", {
2634
2634
  xmlns: "http://www.w3.org/2000/svg",
2635
2635
  fill: "none",
2636
2636
  viewBox: "0 0 24 24",
@@ -2638,7 +2638,7 @@ const cn = /* @__PURE__ */ _({
2638
2638
  stroke: "currentColor",
2639
2639
  class: "size-3"
2640
2640
  }, [
2641
- c("path", {
2641
+ i("path", {
2642
2642
  "stroke-linecap": "round",
2643
2643
  "stroke-linejoin": "round",
2644
2644
  d: "M6 18L18 6M6 6l12 12"
@@ -2646,7 +2646,7 @@ const cn = /* @__PURE__ */ _({
2646
2646
  ]))
2647
2647
  ])
2648
2648
  ]),
2649
- c("button", {
2649
+ i("button", {
2650
2650
  type: "button",
2651
2651
  class: I([
2652
2652
  "flex-1rounded w-full rounded border px-3 py-1.5 text-xs font-medium text-gray-700 transition-colors",
@@ -2656,20 +2656,20 @@ const cn = /* @__PURE__ */ _({
2656
2656
  ]),
2657
2657
  onClick: P,
2658
2658
  onDragover: Pt(p, ["prevent"]),
2659
- onDragleave: Pt(i, ["prevent"]),
2660
- onDrop: Pt(A, ["prevent"])
2659
+ onDragleave: Pt(c, ["prevent"]),
2660
+ onDrop: Pt(s, ["prevent"])
2661
2661
  }, [
2662
- l.value ? (X(), o("span", {
2662
+ l.value ? (o(), X("span", {
2663
2663
  key: 1,
2664
2664
  class: "flex items-center justify-center gap-1.5"
2665
2665
  }, [
2666
- (X(), o("svg", {
2666
+ (o(), X("svg", {
2667
2667
  class: "size-3.5 animate-spin text-blue-500",
2668
2668
  xmlns: "http://www.w3.org/2000/svg",
2669
2669
  fill: "none",
2670
2670
  viewBox: "0 0 24 24"
2671
2671
  }, [
2672
- c("circle", {
2672
+ i("circle", {
2673
2673
  class: "opacity-25",
2674
2674
  cx: "12",
2675
2675
  cy: "12",
@@ -2677,18 +2677,18 @@ const cn = /* @__PURE__ */ _({
2677
2677
  stroke: "currentColor",
2678
2678
  "stroke-width": "4"
2679
2679
  }),
2680
- c("path", {
2680
+ i("path", {
2681
2681
  class: "opacity-75",
2682
2682
  fill: "currentColor",
2683
2683
  d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
2684
2684
  })
2685
2685
  ])),
2686
- Xe(" Uploading... ")
2687
- ])) : (X(), o("span", {
2686
+ oe(" Uploading... ")
2687
+ ])) : (o(), X("span", {
2688
2688
  key: 0,
2689
2689
  class: "flex items-center justify-center gap-1.5"
2690
2690
  }, [
2691
- (X(), o("svg", {
2691
+ (o(), X("svg", {
2692
2692
  xmlns: "http://www.w3.org/2000/svg",
2693
2693
  fill: "none",
2694
2694
  viewBox: "0 0 24 24",
@@ -2696,16 +2696,16 @@ const cn = /* @__PURE__ */ _({
2696
2696
  stroke: "currentColor",
2697
2697
  class: "size-3.5"
2698
2698
  }, [
2699
- c("path", {
2699
+ i("path", {
2700
2700
  "stroke-linecap": "round",
2701
2701
  "stroke-linejoin": "round",
2702
2702
  d: "M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5"
2703
2703
  })
2704
2704
  ])),
2705
- Xe(" Replace image ")
2705
+ oe(" Replace image ")
2706
2706
  ]))
2707
2707
  ], 34)
2708
- ], 32)) : t.editable ? (X(), o("div", {
2708
+ ], 32)) : t.editable ? (o(), X("div", {
2709
2709
  key: 1,
2710
2710
  class: I([
2711
2711
  "relative cursor-pointer rounded border border-dashed transition-colors",
@@ -2714,10 +2714,10 @@ const cn = /* @__PURE__ */ _({
2714
2714
  ]),
2715
2715
  onClick: P,
2716
2716
  onDragover: Pt(p, ["prevent"]),
2717
- onDragleave: Pt(i, ["prevent"]),
2718
- onDrop: Pt(A, ["prevent"])
2717
+ onDragleave: Pt(c, ["prevent"]),
2718
+ onDrop: Pt(s, ["prevent"])
2719
2719
  }, [
2720
- c("input", {
2720
+ i("input", {
2721
2721
  ref_key: "fileInputRef",
2722
2722
  ref: n,
2723
2723
  type: "file",
@@ -2726,15 +2726,15 @@ const cn = /* @__PURE__ */ _({
2726
2726
  disabled: l.value || !t.editable,
2727
2727
  onChange: b
2728
2728
  }, null, 40, ["disabled"]),
2729
- c("div", { class: "flex items-center justify-center gap-2 p-3" }, [
2730
- l.value ? (X(), o("svg", {
2729
+ i("div", { class: "flex items-center justify-center gap-2 p-3" }, [
2730
+ l.value ? (o(), X("svg", {
2731
2731
  key: 1,
2732
2732
  class: "size-4 animate-spin text-blue-500",
2733
2733
  xmlns: "http://www.w3.org/2000/svg",
2734
2734
  fill: "none",
2735
2735
  viewBox: "0 0 24 24"
2736
2736
  }, [
2737
- c("circle", {
2737
+ i("circle", {
2738
2738
  class: "opacity-25",
2739
2739
  cx: "12",
2740
2740
  cy: "12",
@@ -2742,12 +2742,12 @@ const cn = /* @__PURE__ */ _({
2742
2742
  stroke: "currentColor",
2743
2743
  "stroke-width": "4"
2744
2744
  }),
2745
- c("path", {
2745
+ i("path", {
2746
2746
  class: "opacity-75",
2747
2747
  fill: "currentColor",
2748
2748
  d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
2749
2749
  })
2750
- ])) : (X(), o("svg", {
2750
+ ])) : (o(), X("svg", {
2751
2751
  key: 0,
2752
2752
  xmlns: "http://www.w3.org/2000/svg",
2753
2753
  fill: "none",
@@ -2756,38 +2756,38 @@ const cn = /* @__PURE__ */ _({
2756
2756
  stroke: "currentColor",
2757
2757
  class: "size-4 text-gray-400"
2758
2758
  }, [
2759
- c("path", {
2759
+ i("path", {
2760
2760
  "stroke-linecap": "round",
2761
2761
  "stroke-linejoin": "round",
2762
2762
  d: "M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5"
2763
2763
  })
2764
2764
  ])),
2765
- l.value ? (X(), o("span", {
2765
+ l.value ? (o(), X("span", {
2766
2766
  key: 3,
2767
2767
  class: "text-xs font-medium text-blue-600"
2768
- }, "Uploading...")) : (X(), o("span", {
2768
+ }, "Uploading...")) : (o(), X("span", {
2769
2769
  key: 2,
2770
2770
  class: "text-xs font-medium text-gray-700"
2771
2771
  }, "Click to upload image"))
2772
2772
  ])
2773
- ], 34)) : v.value ? (X(), o("div", {
2773
+ ], 34)) : v.value ? (o(), X("div", {
2774
2774
  key: 2,
2775
2775
  class: "flex items-center gap-2"
2776
2776
  }, [
2777
- c("img", {
2777
+ i("img", {
2778
2778
  src: v.value,
2779
2779
  alt: "Image",
2780
2780
  class: "size-16 rounded border border-gray-300 object-cover"
2781
2781
  }, null, 8, ["src"]),
2782
- c("span", { class: "text-xs text-gray-500" }, "Image uploaded")
2783
- ])) : (X(), o("div", {
2782
+ i("span", { class: "text-xs text-gray-500" }, "Image uploaded")
2783
+ ])) : (o(), X("div", {
2784
2784
  key: 3,
2785
2785
  class: "rounded border border-gray-200 bg-gray-50 p-2 text-center text-xs text-gray-400"
2786
2786
  }, "No image")),
2787
- u.value ? (X(), o("div", {
2787
+ u.value ? (o(), X("div", {
2788
2788
  key: 4,
2789
2789
  class: "mt-1.5 rounded bg-red-50 px-2 py-1 text-xs text-red-600"
2790
- }, U(u.value), 1)) : B("", !0)
2790
+ }, U(u.value), 1)) : R("", !0)
2791
2791
  ]));
2792
2792
  }
2793
2793
  }), yn = /* @__PURE__ */ Wt(Sn, [["__scopeId", "data-v-ec4440b5"]]), zn = /* @__PURE__ */ _({
@@ -2837,7 +2837,7 @@ const cn = /* @__PURE__ */ _({
2837
2837
  function d() {
2838
2838
  e.value = null;
2839
2839
  }
2840
- return ot(
2840
+ return Xt(
2841
2841
  e,
2842
2842
  async () => {
2843
2843
  r.editable && await u();
@@ -2845,67 +2845,67 @@ const cn = /* @__PURE__ */ _({
2845
2845
  {
2846
2846
  immediate: !0
2847
2847
  }
2848
- ), (P, b) => (X(), o("div", { class: "editor-field-node" }, [
2849
- c("div", { class: "mb-1 flex items-center gap-1.5" }, [
2850
- c("label", { class: "mr-auto text-sm font-medium first-letter:uppercase" }, [
2851
- Xe(U(t.fieldConfig.label || t.fieldName) + " ", 1),
2852
- t.fieldConfig.required ? (X(), o("span", {
2848
+ ), (P, b) => (o(), X("div", { class: "editor-field-node" }, [
2849
+ i("div", { class: "mb-1 flex items-center gap-1.5" }, [
2850
+ i("label", { class: "mr-auto text-sm font-medium first-letter:uppercase" }, [
2851
+ oe(U(t.fieldConfig.label || t.fieldName) + " ", 1),
2852
+ t.fieldConfig.required ? (o(), X("span", {
2853
2853
  key: 0,
2854
2854
  class: "prop-required ml-1 text-red-600"
2855
- }, "*")) : B("", !0)
2855
+ }, "*")) : R("", !0)
2856
2856
  ]),
2857
- a.value ? (X(), o("div", {
2857
+ a.value ? (o(), X("div", {
2858
2858
  key: 0,
2859
2859
  class: "cursor-pointer rounded-full bg-zinc-100 px-2 py-0.5 text-xs text-zinc-600 hover:bg-zinc-200 hover:text-zinc-600",
2860
2860
  onClick: d
2861
2861
  }, [
2862
- c("span", null, "Clear")
2863
- ])) : B("", !0),
2864
- t.fieldConfig.description && t.fieldConfig.type !== "info" ? (X(), o("div", {
2862
+ i("span", null, "Clear")
2863
+ ])) : R("", !0),
2864
+ t.fieldConfig.description && t.fieldConfig.type !== "info" ? (o(), X("div", {
2865
2865
  key: 1,
2866
2866
  title: t.fieldConfig.description,
2867
2867
  class: "cursor-default"
2868
2868
  }, [
2869
- h(G(or), { class: "size-4 text-zinc-500" })
2870
- ], 8, ["title"])) : B("", !0)
2869
+ h(G(Xr), { class: "size-4 text-zinc-500" })
2870
+ ], 8, ["title"])) : R("", !0)
2871
2871
  ]),
2872
- t.fieldConfig.component ? (X(), ut(Yt(t.fieldConfig.component), kt({
2872
+ t.fieldConfig.component ? (o(), ut(Yt(t.fieldConfig.component), kt({
2873
2873
  key: 0,
2874
2874
  modelValue: e.value,
2875
2875
  "onUpdate:modelValue": b[0] || (b[0] = (p) => e.value = p),
2876
2876
  editable: t.editable
2877
- }, t.fieldConfig), null, 16, ["modelValue", "editable"])) : ["text", "number", "email", "url"].includes(t.fieldConfig.type) ? lt((X(), o("input", kt({
2877
+ }, t.fieldConfig), null, 16, ["modelValue", "editable"])) : ["text", "number", "email", "url"].includes(t.fieldConfig.type) ? lt((o(), X("input", kt({
2878
2878
  key: 1,
2879
2879
  "onUpdate:modelValue": b[1] || (b[1] = (p) => l.value = p),
2880
2880
  class: "form-control mb-1",
2881
2881
  disabled: !t.editable
2882
2882
  }, t.fieldConfig), null, 16, ["disabled"])), [
2883
2883
  [$r, l.value]
2884
- ]) : t.fieldConfig.type === "textarea" ? lt((X(), o("textarea", kt({
2884
+ ]) : t.fieldConfig.type === "textarea" ? lt((o(), X("textarea", kt({
2885
2885
  key: 2,
2886
2886
  "onUpdate:modelValue": b[2] || (b[2] = (p) => l.value = p),
2887
2887
  class: "form-control",
2888
2888
  disabled: !t.editable
2889
2889
  }, t.fieldConfig), null, 16, ["disabled"])), [
2890
2890
  [Zt, l.value]
2891
- ]) : t.fieldConfig.type === "select" ? lt((X(), o("select", {
2891
+ ]) : t.fieldConfig.type === "select" ? lt((o(), X("select", {
2892
2892
  key: 3,
2893
2893
  "onUpdate:modelValue": b[3] || (b[3] = (p) => l.value = p),
2894
2894
  class: "form-control",
2895
2895
  placeholder: t.fieldConfig.placeholder,
2896
2896
  disabled: !t.editable
2897
2897
  }, [
2898
- (X(!0), o(tt, null, nt(t.fieldConfig.options, (p) => (X(), o("option", {
2898
+ (o(!0), X(tt, null, nt(t.fieldConfig.options, (p) => (o(), X("option", {
2899
2899
  key: p.value,
2900
2900
  value: p.value
2901
2901
  }, U(p.label), 9, ["value"]))), 128))
2902
2902
  ], 8, ["placeholder", "disabled"])), [
2903
2903
  [ne, l.value]
2904
- ]) : t.fieldConfig.type === "color" ? (X(), o("div", {
2904
+ ]) : t.fieldConfig.type === "color" ? (o(), X("div", {
2905
2905
  key: 4,
2906
2906
  class: "flex gap-2"
2907
2907
  }, [
2908
- lt(c("input", {
2908
+ lt(i("input", {
2909
2909
  "onUpdate:modelValue": b[4] || (b[4] = (p) => e.value = p),
2910
2910
  type: "color",
2911
2911
  class: "form-control size-10 shrink-0",
@@ -2913,7 +2913,7 @@ const cn = /* @__PURE__ */ _({
2913
2913
  }, null, 8, ["disabled"]), [
2914
2914
  [Zt, e.value]
2915
2915
  ]),
2916
- lt(c("input", {
2916
+ lt(i("input", {
2917
2917
  "onUpdate:modelValue": b[5] || (b[5] = (p) => e.value = p),
2918
2918
  type: "text",
2919
2919
  class: "form-control",
@@ -2921,12 +2921,12 @@ const cn = /* @__PURE__ */ _({
2921
2921
  }, null, 8, ["disabled"]), [
2922
2922
  [Zt, e.value]
2923
2923
  ])
2924
- ])) : t.fieldConfig.type === "range" ? (X(), o("div", {
2924
+ ])) : t.fieldConfig.type === "range" ? (o(), X("div", {
2925
2925
  key: 5,
2926
2926
  class: "flex items-center gap-2"
2927
2927
  }, [
2928
- c("span", { class: "rounded-full bg-zinc-100 px-2 py-1 text-sm font-bold text-zinc-600" }, U(e.value) + U(t.fieldConfig.valueSuffix || ""), 1),
2929
- lt(c("input", {
2928
+ i("span", { class: "rounded-full bg-zinc-100 px-2 py-1 text-sm font-bold text-zinc-600" }, U(e.value) + U(t.fieldConfig.valueSuffix || ""), 1),
2929
+ lt(i("input", {
2930
2930
  "onUpdate:modelValue": b[6] || (b[6] = (p) => e.value = p),
2931
2931
  type: "range",
2932
2932
  class: "form-control",
@@ -2937,17 +2937,17 @@ const cn = /* @__PURE__ */ _({
2937
2937
  }, null, 8, ["min", "max", "step", "disabled"]), [
2938
2938
  [Zt, e.value]
2939
2939
  ])
2940
- ])) : t.fieldConfig.type === "checkbox" ? (X(), o("div", {
2940
+ ])) : t.fieldConfig.type === "checkbox" ? (o(), X("div", {
2941
2941
  key: 6,
2942
2942
  class: "form-control flex flex-col gap-2"
2943
2943
  }, [
2944
- (X(!0), o(tt, null, nt(t.fieldConfig.options, (p) => (X(), o("label", {
2944
+ (o(!0), X(tt, null, nt(t.fieldConfig.options, (p) => (o(), X("label", {
2945
2945
  key: `${t.fieldName}_${p.value}`,
2946
2946
  class: "flex cursor-pointer items-center gap-2 rounded-md border border-gray-300 p-2"
2947
2947
  }, [
2948
- lt(c("input", {
2948
+ lt(i("input", {
2949
2949
  id: `${t.fieldName}_${p.value}`,
2950
- "onUpdate:modelValue": b[7] || (b[7] = (i) => n.value = i),
2950
+ "onUpdate:modelValue": b[7] || (b[7] = (c) => n.value = c),
2951
2951
  value: p.value,
2952
2952
  type: "checkbox",
2953
2953
  class: "form-control appearance-none",
@@ -2955,23 +2955,23 @@ const cn = /* @__PURE__ */ _({
2955
2955
  }, null, 8, ["id", "value", "disabled"]), [
2956
2956
  [Pr, n.value]
2957
2957
  ]),
2958
- c("span", { class: "text-sm" }, U(p.label), 1)
2958
+ i("span", { class: "text-sm" }, U(p.label), 1)
2959
2959
  ]))), 128))
2960
- ])) : t.fieldConfig.type === "radio" ? (X(), o("div", {
2960
+ ])) : t.fieldConfig.type === "radio" ? (o(), X("div", {
2961
2961
  key: 7,
2962
2962
  class: "form-control flex flex-col gap-2"
2963
2963
  }, [
2964
- (X(!0), o(tt, null, nt(t.fieldConfig.options, (p) => (X(), o("div", {
2964
+ (o(!0), X(tt, null, nt(t.fieldConfig.options, (p) => (o(), X("div", {
2965
2965
  key: `${t.fieldName}_${p.value}`
2966
2966
  }, [
2967
- c("label", {
2967
+ i("label", {
2968
2968
  for: `${t.fieldName}_${p.value}`,
2969
2969
  class: "has-checked:border-blue-600 has-checked:ring-1 has-checked:ring-blue-600 flex cursor-pointer items-center justify-between gap-4 rounded border border-gray-300 bg-white p-3 text-sm font-medium shadow-sm transition-colors hover:bg-gray-50"
2970
2970
  }, [
2971
- c("p", { class: "text-gray-700" }, U(p.label), 1),
2972
- lt(c("input", {
2971
+ i("p", { class: "text-gray-700" }, U(p.label), 1),
2972
+ lt(i("input", {
2973
2973
  id: `${t.fieldName}_${p.value}`,
2974
- "onUpdate:modelValue": b[8] || (b[8] = (i) => e.value = i),
2974
+ "onUpdate:modelValue": b[8] || (b[8] = (c) => e.value = c),
2975
2975
  type: "radio",
2976
2976
  name: t.fieldName,
2977
2977
  class: "sr-only",
@@ -2982,12 +2982,12 @@ const cn = /* @__PURE__ */ _({
2982
2982
  ])
2983
2983
  ], 8, ["for"])
2984
2984
  ]))), 128))
2985
- ])) : t.fieldConfig.type === "boolean" ? (X(), o("label", {
2985
+ ])) : t.fieldConfig.type === "boolean" ? (o(), X("label", {
2986
2986
  key: 8,
2987
2987
  for: t.fieldName,
2988
2988
  class: "has-checked:bg-emerald-700 w-13 relative block h-7 cursor-pointer rounded-full bg-gray-300 transition-colors [-webkit-tap-highlight-color:transparent] hover:bg-gray-400/75 has-[:checked]:hover:bg-emerald-800"
2989
2989
  }, [
2990
- lt(c("input", {
2990
+ lt(i("input", {
2991
2991
  id: t.fieldName,
2992
2992
  "onUpdate:modelValue": b[9] || (b[9] = (p) => e.value = p),
2993
2993
  type: "checkbox",
@@ -2996,8 +2996,8 @@ const cn = /* @__PURE__ */ _({
2996
2996
  }, null, 8, ["id", "disabled"]), [
2997
2997
  [Pr, e.value]
2998
2998
  ]),
2999
- c("span", { class: "absolute inset-y-0 start-0 m-1 size-5 rounded-full bg-white transition-[inset-inline-start] peer-checked:start-6" })
3000
- ], 8, ["for"])) : t.fieldConfig.type === "repeater" ? (X(), o("div", { key: 9 }, [
2999
+ i("span", { class: "absolute inset-y-0 start-0 m-1 size-5 rounded-full bg-white transition-[inset-inline-start] peer-checked:start-6" })
3000
+ ], 8, ["for"])) : t.fieldConfig.type === "repeater" ? (o(), X("div", { key: 9 }, [
3001
3001
  h(Tn, {
3002
3002
  modelValue: e.value,
3003
3003
  "onUpdate:modelValue": b[10] || (b[10] = (p) => e.value = p),
@@ -3005,8 +3005,8 @@ const cn = /* @__PURE__ */ _({
3005
3005
  fieldName: t.fieldName,
3006
3006
  editable: t.editable
3007
3007
  }, null, 8, ["modelValue", "fieldConfig", "fieldName", "editable"])
3008
- ])) : t.fieldConfig.type === "object" && t.fieldConfig.objectFields ? (X(), o("div", { key: 10 }, [
3009
- c("div", { class: "mt-3 border-t border-gray-300 pt-3" }, [
3008
+ ])) : t.fieldConfig.type === "object" && t.fieldConfig.objectFields ? (o(), X("div", { key: 10 }, [
3009
+ i("div", { class: "mt-3 border-t border-gray-300 pt-3" }, [
3010
3010
  h(br, {
3011
3011
  modelValue: v.value,
3012
3012
  "onUpdate:modelValue": b[11] || (b[11] = (p) => v.value = p),
@@ -3015,7 +3015,7 @@ const cn = /* @__PURE__ */ _({
3015
3015
  nested: !0
3016
3016
  }, null, 8, ["modelValue", "fields", "editable"])
3017
3017
  ])
3018
- ])) : t.fieldConfig.type === "image" ? (X(), o("div", { key: 11 }, [
3018
+ ])) : t.fieldConfig.type === "image" ? (o(), X("div", { key: 11 }, [
3019
3019
  h(yn, {
3020
3020
  modelValue: e.value,
3021
3021
  "onUpdate:modelValue": b[12] || (b[12] = (p) => e.value = p),
@@ -3023,7 +3023,7 @@ const cn = /* @__PURE__ */ _({
3023
3023
  fieldName: t.fieldName,
3024
3024
  editable: t.editable
3025
3025
  }, null, 8, ["modelValue", "fieldConfig", "fieldName", "editable"])
3026
- ])) : t.fieldConfig.type === "margin" ? (X(), o("div", { key: 12 }, [
3026
+ ])) : t.fieldConfig.type === "margin" ? (o(), X("div", { key: 12 }, [
3027
3027
  h(wn, {
3028
3028
  modelValue: e.value,
3029
3029
  "onUpdate:modelValue": b[13] || (b[13] = (p) => e.value = p),
@@ -3031,13 +3031,13 @@ const cn = /* @__PURE__ */ _({
3031
3031
  fieldName: t.fieldName,
3032
3032
  editable: t.editable
3033
3033
  }, null, 8, ["modelValue", "fieldConfig", "fieldName", "editable"])
3034
- ])) : t.fieldConfig.type === "info" ? (X(), o("div", {
3034
+ ])) : t.fieldConfig.type === "info" ? (o(), X("div", {
3035
3035
  key: 13,
3036
3036
  class: "font-base mt-1 rounded-md bg-zinc-100 p-2 text-sm text-zinc-600 md:p-3"
3037
3037
  }, [
3038
- h(G(or), { class: "float-left mr-1 mt-0.5 inline-block size-4" }),
3039
- Xe(" " + U(t.fieldConfig.description), 1)
3040
- ])) : lt((X(), o("input", {
3038
+ h(G(Xr), { class: "float-left mr-1 mt-0.5 inline-block size-4" }),
3039
+ oe(" " + U(t.fieldConfig.description), 1)
3040
+ ])) : lt((o(), X("input", {
3041
3041
  key: 14,
3042
3042
  "onUpdate:modelValue": b[14] || (b[14] = (p) => l.value = p),
3043
3043
  type: "text",
@@ -3046,10 +3046,10 @@ const cn = /* @__PURE__ */ _({
3046
3046
  }, null, 8, ["disabled"])), [
3047
3047
  [Zt, l.value]
3048
3048
  ]),
3049
- f.value && typeof f.value == "string" ? (X(), o("div", {
3049
+ f.value && typeof f.value == "string" ? (o(), X("div", {
3050
3050
  key: 15,
3051
3051
  class: "rounded-sm bg-red-50 p-2 px-3 text-xs text-red-600"
3052
- }, U(f.value), 1)) : B("", !0)
3052
+ }, U(f.value), 1)) : R("", !0)
3053
3053
  ]));
3054
3054
  }
3055
3055
  }), Yr = /* @__PURE__ */ Wt(zn, [["__scopeId", "data-v-99e3a7ae"]]), br = /* @__PURE__ */ _({
@@ -3074,31 +3074,31 @@ const cn = /* @__PURE__ */ _({
3074
3074
  const a = (u = t.fields[l]) == null ? void 0 : u.group;
3075
3075
  return a && !v.includes(a) && v.push(a), v;
3076
3076
  }, []) : []);
3077
- return ot(n, () => {
3077
+ return Xt(n, () => {
3078
3078
  n.value.length > 0 && (t.activeTab && n.value.includes(t.activeTab) ? r.value = t.activeTab : r.value = n.value[0] || "");
3079
- }), ot(
3079
+ }), Xt(
3080
3080
  () => t.activeTab,
3081
3081
  (v) => {
3082
3082
  v && n.value.includes(v) && (r.value = v);
3083
3083
  }
3084
3084
  ), $t(() => {
3085
3085
  n.value.length > 0 && (t.activeTab && n.value.includes(t.activeTab) ? r.value = t.activeTab : r.value = n.value[0] || "");
3086
- }), (v, l) => (X(), o("div", { class: "section-editor-fields" }, [
3087
- n.value.length ? (X(), o("div", {
3086
+ }), (v, l) => (o(), X("div", { class: "section-editor-fields" }, [
3087
+ n.value.length ? (o(), X("div", {
3088
3088
  key: 0,
3089
3089
  class: I(["field-group-tabs flex gap-2 overflow-x-auto border-b border-gray-300", t.nested ? "px-0 pt-0" : "px-5 pt-3"])
3090
3090
  }, [
3091
- (X(!0), o(tt, null, nt(n.value, (a) => (X(), o("button", {
3091
+ (o(!0), X(tt, null, nt(n.value, (a) => (o(), X("button", {
3092
3092
  key: `fg_${a}`,
3093
3093
  class: I(["field-group-tab rounded-t-md border border-zinc-200 bg-zinc-100 px-4 py-2 text-sm first-letter:uppercase", { "bg-zinc-00 border-b-transparent !bg-white": r.value === a }]),
3094
3094
  onClick: (u) => r.value = a
3095
3095
  }, U(a), 11, ["onClick"]))), 128))
3096
- ], 2)) : B("", !0),
3097
- e.value && Object.keys(f.value).length > 0 ? (X(), o("div", {
3096
+ ], 2)) : R("", !0),
3097
+ e.value && Object.keys(f.value).length > 0 ? (o(), X("div", {
3098
3098
  key: 1,
3099
3099
  class: I(["flex flex-col gap-3", t.nested ? "p-0" : "p-5"])
3100
3100
  }, [
3101
- (X(!0), o(tt, null, nt(f.value, (a, u) => (X(), o("div", {
3101
+ (o(!0), X(tt, null, nt(f.value, (a, u) => (o(), X("div", {
3102
3102
  key: u,
3103
3103
  class: "prop-field"
3104
3104
  }, [
@@ -3110,12 +3110,12 @@ const cn = /* @__PURE__ */ _({
3110
3110
  editable: t.editable
3111
3111
  }, null, 8, ["modelValue", "onUpdate:modelValue", "fieldConfig", "fieldName", "editable"])
3112
3112
  ]))), 128))
3113
- ], 2)) : (X(), o("div", {
3113
+ ], 2)) : (o(), X("div", {
3114
3114
  key: 2,
3115
3115
  class: I(t.nested ? "p-0" : "p-5")
3116
3116
  }, [
3117
- c("div", { class: "rounded-lg bg-zinc-100 px-4 py-3 text-sm font-medium text-zinc-600" }, [
3118
- c("p", null, U(t.isLayoutBlock ? "No settings available for this layout." : "No options available for this block."), 1)
3117
+ i("div", { class: "rounded-lg bg-zinc-100 px-4 py-3 text-sm font-medium text-zinc-600" }, [
3118
+ i("p", null, U(t.isLayoutBlock ? "No settings available for this layout." : "No options available for this block."), 1)
3119
3119
  ])
3120
3120
  ], 2))
3121
3121
  ]));
@@ -3143,7 +3143,7 @@ const cn = /* @__PURE__ */ _({
3143
3143
  } : {
3144
3144
  id: b.id,
3145
3145
  name: b.type,
3146
- label: mr(b.type)
3146
+ label: Vr(b.type)
3147
3147
  };
3148
3148
  }) : [];
3149
3149
  });
@@ -3152,7 +3152,7 @@ const cn = /* @__PURE__ */ _({
3152
3152
  }
3153
3153
  function d() {
3154
3154
  const P = document.getElementById("page-blocks-list");
3155
- P && new O(P, {
3155
+ P && new x(P, {
3156
3156
  animation: 150,
3157
3157
  ghostClass: "sortable-ghost",
3158
3158
  chosenClass: "sortable-chosen",
@@ -3161,38 +3161,38 @@ const cn = /* @__PURE__ */ _({
3161
3161
  v.value = !0;
3162
3162
  },
3163
3163
  onEnd: (b) => {
3164
- var A, T, s, y;
3164
+ var s, A, T, W;
3165
3165
  v.value = !1;
3166
- const { oldIndex: p, newIndex: i } = b;
3167
- if (p !== i) {
3168
- const S = (T = (A = f.value) == null ? void 0 : A[l.blocksKey]) == null ? void 0 : T.splice(p, 1)[0];
3169
- (y = (s = f.value) == null ? void 0 : s[l.blocksKey]) == null || y.splice(i, 0, S);
3166
+ const { oldIndex: p, newIndex: c } = b;
3167
+ if (p !== c) {
3168
+ const y = (A = (s = f.value) == null ? void 0 : s[l.blocksKey]) == null ? void 0 : A.splice(p, 1)[0];
3169
+ (W = (T = f.value) == null ? void 0 : T[l.blocksKey]) == null || W.splice(c, 0, y);
3170
3170
  }
3171
3171
  }
3172
3172
  });
3173
3173
  }
3174
- return Bt(() => {
3174
+ return Rt(() => {
3175
3175
  d();
3176
3176
  }), (P, b) => {
3177
3177
  var p;
3178
- return X(), o("div", {
3178
+ return o(), X("div", {
3179
3179
  id: "page-blocks-list",
3180
3180
  class: "flex flex-col gap-1 p-5"
3181
3181
  }, [
3182
- (p = a.value) != null && p.length ? (X(!0), o(tt, { key: 0 }, nt(a.value, (i) => (X(), o("div", {
3183
- key: i.id,
3182
+ (p = a.value) != null && p.length ? (o(!0), X(tt, { key: 0 }, nt(a.value, (c) => (o(), X("div", {
3183
+ key: c.id,
3184
3184
  "data-prevent-drop": "true",
3185
- class: I([{ "bg-blue-100 text-blue-600": n.value === i.id }, "block-item -mx-2.5 flex cursor-pointer items-center gap-1 rounded-md p-2.5 text-sm text-neutral-900"]),
3186
- onMouseenter: (A) => u(i.id),
3187
- onMouseleave: b[0] || (b[0] = (A) => u(null)),
3188
- onClick: (A) => r("block-click", i)
3185
+ class: I([{ "bg-blue-100 text-blue-600": n.value === c.id }, "block-item -mx-2.5 flex cursor-pointer items-center gap-1 rounded-md p-2.5 text-sm text-neutral-900"]),
3186
+ onMouseenter: (s) => u(c.id),
3187
+ onMouseleave: b[0] || (b[0] = (s) => u(null)),
3188
+ onClick: (s) => r("block-click", c)
3189
3189
  }, [
3190
- c("p", null, U(i.label || i.type), 1),
3191
- i.__file ? B("", !0) : (X(), o("span", {
3190
+ i("p", null, U(c.label || c.type), 1),
3191
+ c.__file ? R("", !0) : (o(), X("span", {
3192
3192
  key: 0,
3193
3193
  class: "ml-auto rounded-full bg-zinc-100 px-2 py-0.5 text-xs text-zinc-500"
3194
3194
  }, "Not registered"))
3195
- ], 42, ["onMouseenter", "onClick"]))), 128)) : (X(), o("p", {
3195
+ ], 42, ["onMouseenter", "onClick"]))), 128)) : (o(), X("p", {
3196
3196
  key: 1,
3197
3197
  class: "bg-zinc-100 p-5 text-center text-sm text-zinc-500"
3198
3198
  }, "No blocks added yet."))
@@ -3218,32 +3218,32 @@ const cn = /* @__PURE__ */ _({
3218
3218
  }
3219
3219
  return $t(() => {
3220
3220
  f.value[v.settingsKey] || (f.value[v.settingsKey] = {});
3221
- }), Bt(() => {
3221
+ }), Rt(() => {
3222
3222
  a();
3223
- }), (u, d) => (X(), o("div", { class: "page-settings" }, [
3224
- c("div", { class: "flex items-start justify-between border-b border-gray-300 bg-white p-5" }, [
3225
- c("div", null, [
3226
- c("button", {
3223
+ }), (u, d) => (o(), X("div", { class: "page-settings" }, [
3224
+ i("div", { class: "flex items-start justify-between border-b border-gray-300 bg-white p-5" }, [
3225
+ i("div", null, [
3226
+ i("button", {
3227
3227
  class: "cursor-pointer text-sm text-zinc-500 hover:text-zinc-900 hover:underline",
3228
3228
  onClick: d[0] || (d[0] = (P) => r("close"))
3229
3229
  }, " ← Back "),
3230
- c("h4", { class: "mt-1 text-lg font-bold" }, "Page settings")
3230
+ i("h4", { class: "mt-1 text-lg font-bold" }, "Page settings")
3231
3231
  ])
3232
3232
  ]),
3233
- l.value.length > 1 ? (X(), o("div", {
3233
+ l.value.length > 1 ? (o(), X("div", {
3234
3234
  key: 0,
3235
3235
  class: "border-b border-gray-300 p-5"
3236
3236
  }, [
3237
- c("div", { class: "editor-field-node" }, [
3238
- c("div", { class: "mb-1.5 flex items-center gap-1.5" }, [
3239
- c("label", { class: "mr-auto font-medium first-letter:uppercase" }, "Page layout")
3237
+ i("div", { class: "editor-field-node" }, [
3238
+ i("div", { class: "mb-1.5 flex items-center gap-1.5" }, [
3239
+ i("label", { class: "mr-auto font-medium first-letter:uppercase" }, "Page layout")
3240
3240
  ]),
3241
- lt(c("select", {
3241
+ lt(i("select", {
3242
3242
  "onUpdate:modelValue": d[1] || (d[1] = (P) => f.value[t.settingsKey].layout = P),
3243
3243
  class: "form-control w-full rounded-md border border-gray-300 p-2",
3244
3244
  onChange: a
3245
3245
  }, [
3246
- (X(!0), o(tt, null, nt(l.value, (P) => (X(), o("option", {
3246
+ (o(!0), X(tt, null, nt(l.value, (P) => (o(), X("option", {
3247
3247
  key: `layout-${P.__name}`,
3248
3248
  value: P.__name
3249
3249
  }, U(P.label), 9, ["value"]))), 128))
@@ -3251,8 +3251,8 @@ const cn = /* @__PURE__ */ _({
3251
3251
  [ne, f.value[t.settingsKey].layout]
3252
3252
  ])
3253
3253
  ])
3254
- ])) : B("", !0),
3255
- c("div", { class: "editor-field-node" }, [
3254
+ ])) : R("", !0),
3255
+ i("div", { class: "editor-field-node" }, [
3256
3256
  h(br, {
3257
3257
  modelValue: f.value[t.settingsKey],
3258
3258
  "onUpdate:modelValue": d[2] || (d[2] = (P) => f.value[t.settingsKey] = P),
@@ -3279,13 +3279,13 @@ const cn = /* @__PURE__ */ _({
3279
3279
  emits: ["update:editorViewport", "update:activeBlock", "update:showPageSettings"],
3280
3280
  setup(t) {
3281
3281
  const e = rt(t, "editorViewport"), r = rt(t, "activeBlock"), f = rt(t, "showPageSettings");
3282
- return (n, v) => (X(), o("div", { class: "flex divide-x divide-gray-300 border-b border-gray-300" }, [
3282
+ return (n, v) => (o(), X("div", { class: "flex divide-x divide-gray-300 border-b border-gray-300" }, [
3283
3283
  Or(n.$slots, "default"),
3284
- t.hasPageSettings ? (X(), o("div", {
3284
+ t.hasPageSettings ? (o(), X("div", {
3285
3285
  key: 0,
3286
3286
  class: "ml-auto inline-flex gap-2 px-5 py-2.5"
3287
3287
  }, [
3288
- c("button", {
3288
+ i("button", {
3289
3289
  class: I([
3290
3290
  "inline-flex items-center rounded-md border border-gray-300 px-3 py-2 text-xs",
3291
3291
  f.value ? "bg-blue-50 text-blue-700 border-blue-800/20" : "bg-zinc-50 text-zinc-500 hover:border-zinc-400 hover:text-zinc-900"
@@ -3297,9 +3297,9 @@ const cn = /* @__PURE__ */ _({
3297
3297
  }, [
3298
3298
  h(G(Jf), { class: "size-4" })
3299
3299
  ], 2)
3300
- ])) : B("", !0),
3301
- c("div", { class: "inline-flex gap-2 px-5 py-2.5" }, [
3302
- c("button", {
3300
+ ])) : R("", !0),
3301
+ i("div", { class: "inline-flex gap-2 px-5 py-2.5" }, [
3302
+ i("button", {
3303
3303
  class: I([
3304
3304
  "inline-flex items-center rounded-md border border-gray-300 px-3 py-2 text-xs",
3305
3305
  e.value === "mobile" ? "bg-blue-50 text-blue-700 border-blue-800/20" : "bg-zinc-50 text-zinc-500 hover:border-zinc-400 hover:text-zinc-900"
@@ -3309,7 +3309,7 @@ const cn = /* @__PURE__ */ _({
3309
3309
  }, [
3310
3310
  h(G(gf), { class: "size-4" })
3311
3311
  ], 2),
3312
- c("button", {
3312
+ i("button", {
3313
3313
  class: I([
3314
3314
  "inline-flex items-center rounded-md border border-gray-300 px-3 py-2 text-xs",
3315
3315
  e.value === "desktop" ? "bg-blue-50 text-blue-700 border-blue-800/20" : "bg-zinc-50 text-zinc-500 hover:border-zinc-400 hover:text-zinc-900"
@@ -3347,53 +3347,53 @@ const cn = /* @__PURE__ */ _({
3347
3347
  emits: ["update:modelValue", "update:activeBlock", "update:hoveredBlockId", "update:showPageSettings", "update:showAddBlockMenu", "update:editorViewport"],
3348
3348
  setup(t) {
3349
3349
  const e = rt(t, "modelValue"), r = rt(t, "activeBlock"), f = rt(t, "hoveredBlockId"), n = rt(t, "showPageSettings"), v = rt(t, "showAddBlockMenu"), l = rt(t, "editorViewport"), a = t, u = Y(() => {
3350
- var s, y;
3350
+ var T, W;
3351
3351
  if (!r.value)
3352
3352
  return null;
3353
3353
  const p = r.value.type;
3354
3354
  if (!p)
3355
3355
  return r.value;
3356
- const i = Ut(p);
3357
- if (!i)
3356
+ const c = Ut(p);
3357
+ if (!c)
3358
3358
  return r.value;
3359
- const A = r.value.id, T = ((y = (s = e.value) == null ? void 0 : s[a.blocksKey]) == null ? void 0 : y.find((S) => S.id === A)) || r.value;
3359
+ const s = r.value.id, A = ((W = (T = e.value) == null ? void 0 : T[a.blocksKey]) == null ? void 0 : W.find((y) => y.id === s)) || r.value;
3360
3360
  return new Proxy({}, {
3361
- get(S, N) {
3362
- return N === "data" ? new Proxy(T, {
3363
- get(H, k) {
3364
- return H[k];
3361
+ get(y, O) {
3362
+ return O === "data" ? new Proxy(A, {
3363
+ get(z, k) {
3364
+ return z[k];
3365
3365
  },
3366
- set(H, k, z) {
3367
- return H[k] = z, r.value && (r.value[k] = z), !0;
3366
+ set(z, k, H) {
3367
+ return z[k] = H, r.value && (r.value[k] = H), !0;
3368
3368
  },
3369
- has(H, k) {
3370
- return k in H;
3369
+ has(z, k) {
3370
+ return k in z;
3371
3371
  },
3372
- ownKeys(H) {
3373
- return Object.keys(H);
3372
+ ownKeys(z) {
3373
+ return Object.keys(z);
3374
3374
  },
3375
- getOwnPropertyDescriptor(H, k) {
3376
- return Object.getOwnPropertyDescriptor(H, k);
3375
+ getOwnPropertyDescriptor(z, k) {
3376
+ return Object.getOwnPropertyDescriptor(z, k);
3377
3377
  }
3378
- }) : i[N];
3378
+ }) : c[O];
3379
3379
  },
3380
- set(S, N) {
3381
- return N in i;
3380
+ set(y, O) {
3381
+ return O in c;
3382
3382
  },
3383
- has(S, N) {
3384
- return N === "data" || N in i;
3383
+ has(y, O) {
3384
+ return O === "data" || O in c;
3385
3385
  },
3386
3386
  ownKeys() {
3387
- return ["data", ...Object.keys(i)];
3387
+ return ["data", ...Object.keys(c)];
3388
3388
  },
3389
- getOwnPropertyDescriptor(S, N) {
3390
- if (N === "data")
3389
+ getOwnPropertyDescriptor(y, O) {
3390
+ if (O === "data")
3391
3391
  return {
3392
3392
  enumerable: !0,
3393
3393
  configurable: !0
3394
3394
  };
3395
- if (N in i)
3396
- return Object.getOwnPropertyDescriptor(i, N);
3395
+ if (O in c)
3396
+ return Object.getOwnPropertyDescriptor(c, O);
3397
3397
  }
3398
3398
  });
3399
3399
  });
@@ -3404,93 +3404,93 @@ const cn = /* @__PURE__ */ _({
3404
3404
  a.editable && (v.value = !0);
3405
3405
  }
3406
3406
  async function b() {
3407
- var y, S, N, H;
3407
+ var W, y, O, z;
3408
3408
  if (!a.editable) return;
3409
- const p = ((y = u.value) == null ? void 0 : y.label) || ((S = u.value) == null ? void 0 : S.type);
3409
+ const p = ((W = u.value) == null ? void 0 : W.label) || ((y = u.value) == null ? void 0 : y.type);
3410
3410
  if (!window.confirm(
3411
3411
  `Are you sure you want to delete this ${p} block?
3412
3412
 
3413
3413
  This action cannot be undone.`
3414
3414
  )) return;
3415
- const A = (N = r.value) == null ? void 0 : N.id;
3416
- if (!A || !((H = e.value) != null && H[a.blocksKey])) return;
3417
- const T = e.value[a.blocksKey], s = T.findIndex((k) => k.id === A);
3418
- s !== -1 && T.splice(s, 1), r.value = null, f.value = null, v.value = !1;
3415
+ const s = (O = r.value) == null ? void 0 : O.id;
3416
+ if (!s || !((z = e.value) != null && z[a.blocksKey])) return;
3417
+ const A = e.value[a.blocksKey], T = A.findIndex((k) => k.id === s);
3418
+ T !== -1 && A.splice(T, 1), r.value = null, f.value = null, v.value = !1;
3419
3419
  }
3420
- return (p, i) => {
3421
- var A, T;
3422
- return X(), o("div", { class: "page-builder-sidebar" }, [
3420
+ return (p, c) => {
3421
+ var s, A;
3422
+ return o(), X("div", { class: "page-builder-sidebar" }, [
3423
3423
  h(xn, {
3424
3424
  editorViewport: l.value,
3425
- "onUpdate:editorViewport": i[0] || (i[0] = (s) => l.value = s),
3425
+ "onUpdate:editorViewport": c[0] || (c[0] = (T) => l.value = T),
3426
3426
  showPageSettings: n.value,
3427
- "onUpdate:showPageSettings": i[1] || (i[1] = (s) => n.value = s),
3427
+ "onUpdate:showPageSettings": c[1] || (c[1] = (T) => n.value = T),
3428
3428
  activeBlock: r.value,
3429
- "onUpdate:activeBlock": i[2] || (i[2] = (s) => r.value = s),
3429
+ "onUpdate:activeBlock": c[2] || (c[2] = (T) => r.value = T),
3430
3430
  class: "z-12 sticky top-0 bg-white",
3431
3431
  hasPageSettings: t.hasPageSettings
3432
3432
  }, null, 8, ["editorViewport", "showPageSettings", "activeBlock", "hasPageSettings"]),
3433
- n.value ? (X(), ut(On, {
3433
+ n.value ? (o(), ut(On, {
3434
3434
  key: 0,
3435
3435
  modelValue: e.value,
3436
- "onUpdate:modelValue": i[3] || (i[3] = (s) => e.value = s),
3436
+ "onUpdate:modelValue": c[3] || (c[3] = (T) => e.value = T),
3437
3437
  editable: t.editable,
3438
3438
  settingsKey: t.settingsKey,
3439
3439
  activeTab: t.activeSettingsTab,
3440
- onClose: i[4] || (i[4] = (s) => n.value = !1)
3441
- }, null, 8, ["modelValue", "editable", "settingsKey", "activeTab"])) : r.value ? (X(), o("div", { key: 1 }, [
3442
- c("div", { class: "flex items-start justify-between border-b border-gray-300 bg-white p-5" }, [
3443
- c("div", null, [
3444
- c("button", {
3440
+ onClose: c[4] || (c[4] = (T) => n.value = !1)
3441
+ }, null, 8, ["modelValue", "editable", "settingsKey", "activeTab"])) : r.value ? (o(), X("div", { key: 1 }, [
3442
+ i("div", { class: "flex items-start justify-between border-b border-gray-300 bg-white p-5" }, [
3443
+ i("div", null, [
3444
+ i("button", {
3445
3445
  class: "cursor-pointer text-sm text-zinc-500 hover:text-zinc-900 hover:underline",
3446
- onClick: i[5] || (i[5] = (s) => r.value = null)
3446
+ onClick: c[5] || (c[5] = (T) => r.value = null)
3447
3447
  }, " ← Back "),
3448
- c("h4", { class: "mt-1 text-lg font-bold" }, U(u.value.label || u.value.type), 1)
3448
+ i("h4", { class: "mt-1 text-lg font-bold" }, U(u.value.label || u.value.type), 1)
3449
3449
  ]),
3450
- r.value && t.editable ? (X(), o("button", {
3450
+ r.value && t.editable ? (o(), X("button", {
3451
3451
  key: 0,
3452
3452
  class: "inline-flex size-7 cursor-pointer items-center justify-center rounded-md border border-gray-300 bg-zinc-100 text-zinc-500 hover:border-red-200 hover:bg-red-100 hover:text-red-600",
3453
3453
  title: "Delete block",
3454
3454
  onClick: b
3455
3455
  }, [
3456
3456
  h(G(Gf), { class: "size-4" })
3457
- ])) : B("", !0)
3457
+ ])) : R("", !0)
3458
3458
  ]),
3459
3459
  h(br, {
3460
3460
  modelValue: u.value.data,
3461
- "onUpdate:modelValue": i[6] || (i[6] = (s) => u.value.data = s),
3461
+ "onUpdate:modelValue": c[6] || (c[6] = (T) => u.value.data = T),
3462
3462
  fields: u.value.fields,
3463
3463
  editable: t.editable
3464
3464
  }, null, 8, ["modelValue", "fields", "editable"])
3465
- ])) : v.value ? (X(), o("div", { key: 2 }, [
3466
- c("div", { class: "flex items-center justify-between border-b border-gray-300 bg-white p-5" }, [
3467
- c("div", null, [
3468
- c("button", {
3465
+ ])) : v.value ? (o(), X("div", { key: 2 }, [
3466
+ i("div", { class: "flex items-center justify-between border-b border-gray-300 bg-white p-5" }, [
3467
+ i("div", null, [
3468
+ i("button", {
3469
3469
  class: "cursor-pointer text-sm text-zinc-500 hover:text-zinc-900 hover:underline",
3470
- onClick: i[7] || (i[7] = (s) => v.value = !1)
3470
+ onClick: c[7] || (c[7] = (T) => v.value = !1)
3471
3471
  }, " ← Back "),
3472
- c("h4", { class: "mt-1 text-lg font-bold" }, "Add block")
3472
+ i("h4", { class: "mt-1 text-lg font-bold" }, "Add block")
3473
3473
  ])
3474
3474
  ]),
3475
3475
  h(sn)
3476
- ])) : (X(), o("div", { key: 3 }, [
3477
- c("div", { class: "flex items-center justify-between border-b border-gray-300 bg-white p-5" }, [
3478
- c("h4", { class: "text-lg font-bold" }, "Blocks (" + U((T = (A = e.value) == null ? void 0 : A[t.blocksKey]) == null ? void 0 : T.length) + ")", 1),
3479
- t.editable ? (X(), o("button", {
3476
+ ])) : (o(), X("div", { key: 3 }, [
3477
+ i("div", { class: "flex items-center justify-between border-b border-gray-300 bg-white p-5" }, [
3478
+ i("h4", { class: "text-lg font-bold" }, "Blocks (" + U((A = (s = e.value) == null ? void 0 : s[t.blocksKey]) == null ? void 0 : A.length) + ")", 1),
3479
+ t.editable ? (o(), X("button", {
3480
3480
  key: 0,
3481
3481
  class: "inline-flex items-center gap-1.5 rounded-md border border-gray-300 bg-zinc-50 px-3 py-2 text-xs text-zinc-500 hover:border-zinc-400 hover:text-zinc-900 active:border-blue-600 active:bg-blue-50 active:text-blue-600",
3482
3482
  title: "Add block",
3483
3483
  onClick: P
3484
3484
  }, [
3485
- c("span", null, "Add block"),
3485
+ i("span", null, "Add block"),
3486
3486
  h(G(kr), { class: "size-3" })
3487
- ])) : B("", !0)
3487
+ ])) : R("", !0)
3488
3488
  ]),
3489
3489
  h(Hn, {
3490
3490
  modelValue: e.value,
3491
- "onUpdate:modelValue": i[8] || (i[8] = (s) => e.value = s),
3491
+ "onUpdate:modelValue": c[8] || (c[8] = (T) => e.value = T),
3492
3492
  hoveredBlockId: f.value,
3493
- "onUpdate:hoveredBlockId": i[9] || (i[9] = (s) => f.value = s),
3493
+ "onUpdate:hoveredBlockId": c[9] || (c[9] = (T) => f.value = T),
3494
3494
  editable: t.editable,
3495
3495
  blocksKey: t.blocksKey,
3496
3496
  settingsKey: t.settingsKey,
@@ -3500,17 +3500,17 @@ This action cannot be undone.`
3500
3500
  ]);
3501
3501
  };
3502
3502
  }
3503
- }), Vn = /* @__PURE__ */ Wt(Ln, [["__scopeId", "data-v-07ebdb36"]]), mn = /* @__PURE__ */ _({
3503
+ }), mn = /* @__PURE__ */ Wt(Ln, [["__scopeId", "data-v-07ebdb36"]]), Vn = /* @__PURE__ */ _({
3504
3504
  __name: "BrowserNavigation",
3505
3505
  props: {
3506
3506
  url: {}
3507
3507
  },
3508
3508
  setup(t) {
3509
- return (e, r) => (X(), o("div", { class: "browser-navigation-bar" }, [
3510
- c("div", { class: "flex items-center justify-between bg-zinc-600 px-5 py-4" }, [
3511
- c("div", { class: "flex w-full items-center gap-2 rounded-md bg-zinc-700 px-4 py-1.5 text-sm text-zinc-300" }, [
3512
- c("span", { class: "block flex-1 truncate" }, U(t.url), 1),
3513
- c("a", {
3509
+ return (e, r) => (o(), X("div", { class: "browser-navigation-bar" }, [
3510
+ i("div", { class: "flex items-center justify-between bg-zinc-600 px-5 py-4" }, [
3511
+ i("div", { class: "flex w-full items-center gap-2 rounded-md bg-zinc-700 px-4 py-1.5 text-sm text-zinc-300" }, [
3512
+ i("span", { class: "block flex-1 truncate" }, U(t.url), 1),
3513
+ i("a", {
3514
3514
  href: t.url,
3515
3515
  target: "_blank",
3516
3516
  title: "Open in new tab",
@@ -3585,42 +3585,73 @@ function qn(t) {
3585
3585
  window.__VUE_PROD_DEVTOOLS__ = false;
3586
3586
  window.__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = false;
3587
3587
  <\/script>`, a = t ? `<script type="module">
3588
+ console.info('[iframe] Script module starting...');
3589
+ console.info('[iframe] Module URL:', '${t}');
3590
+
3588
3591
  import { createApp } from 'vue';
3592
+ console.info('[iframe] Vue imported successfully');
3593
+
3589
3594
  import * as VueRouter from 'vue-router';
3595
+ console.info('[iframe] VueRouter imported successfully');
3590
3596
  // Make vue-router available globally so it can be accessed in the iframe app
3591
3597
  window.VueRouter = VueRouter;
3592
3598
 
3599
+ console.info('[iframe] Attempting to import createIframeApp from:', '${t}');
3593
3600
  import { createIframeApp } from '${t}';
3601
+ console.info('[iframe] createIframeApp imported successfully');
3594
3602
 
3595
3603
  const appEl = document.getElementById('app');
3604
+ console.info('[iframe] App element found:', appEl);
3596
3605
  if (appEl) {
3597
- createIframeApp(appEl).catch(error => {
3598
- console.error('Failed to create iframe app:', error);
3606
+ console.info('[iframe] Calling createIframeApp...');
3607
+ createIframeApp(appEl).then(() => {
3608
+ console.info('[iframe] createIframeApp completed successfully');
3609
+ }).catch(error => {
3610
+ console.error('[iframe] Failed to create iframe app:', error);
3611
+ console.error('[iframe] Error stack:', error.stack);
3599
3612
  });
3613
+ } else {
3614
+ console.error('[iframe] App element (#app) not found!');
3600
3615
  }
3601
3616
  <\/script>` : `<script type="module">
3602
3617
  // Fallback: Wait for parent to send module URL via postMessage
3618
+ console.info('[iframe] Fallback script module starting...');
3603
3619
  import { createApp } from 'vue';
3620
+ console.info('[iframe] Vue imported successfully (fallback)');
3604
3621
  import * as VueRouter from 'vue-router';
3622
+ console.info('[iframe] VueRouter imported successfully (fallback)');
3605
3623
  // Make vue-router available globally so it can be imported in the iframe app
3606
3624
  window.VueRouter = VueRouter;
3607
3625
 
3608
3626
  let appInitialized = false;
3609
3627
 
3610
3628
  window.addEventListener('message', async (event) => {
3629
+ console.info('[iframe] Received message:', event.data);
3611
3630
  if (event.data.type === 'INIT_IFRAME_APP' && event.data.moduleUrl && !appInitialized) {
3612
3631
  appInitialized = true;
3632
+ console.info('[iframe] Initializing app with module URL:', event.data.moduleUrl);
3613
3633
  try {
3614
3634
  const { createIframeApp } = await import(event.data.moduleUrl);
3635
+ console.info('[iframe] createIframeApp imported successfully (fallback)');
3615
3636
  const appEl = document.getElementById('app');
3637
+ console.info('[iframe] App element found (fallback):', appEl);
3616
3638
  if (appEl) {
3617
- createIframeApp(appEl);
3639
+ console.info('[iframe] Calling createIframeApp (fallback)...');
3640
+ createIframeApp(appEl).then(() => {
3641
+ console.info('[iframe] createIframeApp completed successfully (fallback)');
3642
+ }).catch(error => {
3643
+ console.error('[iframe] createIframeApp failed (fallback):', error);
3644
+ });
3645
+ } else {
3646
+ console.error('[iframe] App element not found (fallback)!');
3618
3647
  }
3619
3648
  } catch (error) {
3620
- console.error('Failed to load iframe app module:', error);
3649
+ console.error('[iframe] Failed to load iframe app module:', error);
3650
+ console.error('[iframe] Error stack:', error.stack);
3621
3651
  // Fallback: create minimal Vue app
3622
3652
  const appEl = document.getElementById('app');
3623
3653
  if (appEl) {
3654
+ console.info('[iframe] Creating fallback Vue app');
3624
3655
  createApp({
3625
3656
  template: '<div class="p-4">Loading preview...</div>'
3626
3657
  }).mount(appEl);
@@ -3631,7 +3662,10 @@ function qn(t) {
3631
3662
 
3632
3663
  // Notify parent that we're ready to receive module URL
3633
3664
  if (window.parent) {
3665
+ console.info('[iframe] Notifying parent that iframe is ready for app');
3634
3666
  window.parent.postMessage({ type: 'IFRAME_READY_FOR_APP' }, '*');
3667
+ } else {
3668
+ console.warn('[iframe] window.parent is not available');
3635
3669
  }
3636
3670
  <\/script>`;
3637
3671
  return `<!DOCTYPE html>
@@ -3689,20 +3723,20 @@ function Ir(t) {
3689
3723
  return;
3690
3724
  }
3691
3725
  }
3692
- function ie(t, e) {
3693
- if (!t || !t.contentWindow) {
3694
- console.warn("Cannot send message: iframe not ready");
3726
+ function ce(t, e) {
3727
+ if (console.info("[parent] sendToIframe called:", e.type), !t || !t.contentWindow) {
3728
+ console.warn("[parent] Cannot send message: iframe not ready");
3695
3729
  return;
3696
3730
  }
3697
3731
  const r = Ir(e);
3698
3732
  if (!r) {
3699
- console.error("Failed to serialize message for postMessage");
3733
+ console.error("[parent] Failed to serialize message for postMessage");
3700
3734
  return;
3701
3735
  }
3702
3736
  try {
3703
- t.contentWindow.postMessage(r, "*");
3737
+ console.info("[parent] Posting message to iframe:", e.type, r), t.contentWindow.postMessage(r, "*"), console.info("[parent] Message posted successfully");
3704
3738
  } catch (f) {
3705
- console.error("Error sending message to iframe:", f);
3739
+ console.error("[parent] Error sending message to iframe:", f);
3706
3740
  }
3707
3741
  }
3708
3742
  function Jn(t, e, r, f, n) {
@@ -3713,28 +3747,28 @@ function Jn(t, e, r, f, n) {
3713
3747
  settingsKey: f,
3714
3748
  theme: n
3715
3749
  };
3716
- ie(t, l);
3750
+ ce(t, l);
3717
3751
  }
3718
3752
  function Dn(t, e) {
3719
- ie(t, {
3753
+ ce(t, {
3720
3754
  type: "SET_ACTIVE_BLOCK",
3721
3755
  block: e
3722
3756
  });
3723
3757
  }
3724
3758
  function Kn(t, e) {
3725
- ie(t, {
3759
+ ce(t, {
3726
3760
  type: "SET_HOVERED_BLOCK",
3727
3761
  blockId: e
3728
3762
  });
3729
3763
  }
3730
3764
  function zr(t, e) {
3731
- ie(t, {
3765
+ ce(t, {
3732
3766
  type: "SET_SETTINGS_OPEN",
3733
3767
  settingsOpen: e
3734
3768
  });
3735
3769
  }
3736
3770
  function gn(t, e) {
3737
- ie(t, {
3771
+ ce(t, {
3738
3772
  type: "SCROLL_TO_BLOCK",
3739
3773
  blockId: e
3740
3774
  });
@@ -3782,20 +3816,20 @@ function Un(t, e) {
3782
3816
  function Gn(t, e) {
3783
3817
  return tf() ? (ef(t, e), !0) : !1;
3784
3818
  }
3785
- const Bn = typeof window < "u" && typeof document < "u";
3819
+ const Rn = typeof window < "u" && typeof document < "u";
3786
3820
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
3787
- const Rn = Object.prototype.toString, Fn = (t) => Rn.call(t) === "[object Object]", we = () => {
3821
+ const Bn = Object.prototype.toString, Fn = (t) => Bn.call(t) === "[object Object]", we = () => {
3788
3822
  };
3789
3823
  function Ye(t) {
3790
3824
  return Array.isArray(t) ? t : [t];
3791
3825
  }
3792
3826
  function Zn(t, e, r) {
3793
- return ot(t, e, {
3827
+ return Xt(t, e, {
3794
3828
  ...r,
3795
3829
  immediate: !0
3796
3830
  });
3797
3831
  }
3798
- const pr = Bn ? window : void 0;
3832
+ const pr = Rn ? window : void 0;
3799
3833
  function fe(t) {
3800
3834
  var e;
3801
3835
  const r = qt(t);
@@ -3818,7 +3852,7 @@ function Le(...t) {
3818
3852
  }, ([a, u, d, P]) => {
3819
3853
  if (r(), !(a != null && a.length) || !(u != null && u.length) || !(d != null && d.length)) return;
3820
3854
  const b = Fn(P) ? { ...P } : P;
3821
- e.push(...a.flatMap((p) => u.flatMap((i) => d.map((A) => f(p, i, A, b)))));
3855
+ e.push(...a.flatMap((p) => u.flatMap((c) => d.map((s) => f(p, c, s, b)))));
3822
3856
  }, { flush: "post" }), l = () => {
3823
3857
  v(), r();
3824
3858
  };
@@ -3832,62 +3866,62 @@ function Cn(t, e, r = {}) {
3832
3866
  trigger: we
3833
3867
  } : we;
3834
3868
  let u = !0;
3835
- const d = (s) => qt(n).some((y) => {
3836
- if (typeof y == "string") return Array.from(f.document.querySelectorAll(y)).some((S) => S === s.target || s.composedPath().includes(S));
3869
+ const d = (T) => qt(n).some((W) => {
3870
+ if (typeof W == "string") return Array.from(f.document.querySelectorAll(W)).some((y) => y === T.target || T.composedPath().includes(y));
3837
3871
  {
3838
- const S = fe(y);
3839
- return S && (s.target === S || s.composedPath().includes(S));
3872
+ const y = fe(W);
3873
+ return y && (T.target === y || T.composedPath().includes(y));
3840
3874
  }
3841
3875
  });
3842
- function P(s) {
3843
- const y = qt(s);
3844
- return y && y.$.subTree.shapeFlag === 16;
3876
+ function P(T) {
3877
+ const W = qt(T);
3878
+ return W && W.$.subTree.shapeFlag === 16;
3845
3879
  }
3846
- function b(s, y) {
3847
- const S = qt(s), N = S.$.subTree && S.$.subTree.children;
3848
- return N == null || !Array.isArray(N) ? !1 : N.some((H) => H.el === y.target || y.composedPath().includes(H.el));
3880
+ function b(T, W) {
3881
+ const y = qt(T), O = y.$.subTree && y.$.subTree.children;
3882
+ return O == null || !Array.isArray(O) ? !1 : O.some((z) => z.el === W.target || W.composedPath().includes(z.el));
3849
3883
  }
3850
- const p = (s) => {
3851
- const y = fe(t);
3852
- if (s.target != null && !(!(y instanceof Element) && P(t) && b(t, s)) && !(!y || y === s.target || s.composedPath().includes(y))) {
3853
- if ("detail" in s && s.detail === 0 && (u = !d(s)), !u) {
3884
+ const p = (T) => {
3885
+ const W = fe(t);
3886
+ if (T.target != null && !(!(W instanceof Element) && P(t) && b(t, T)) && !(!W || W === T.target || T.composedPath().includes(W))) {
3887
+ if ("detail" in T && T.detail === 0 && (u = !d(T)), !u) {
3854
3888
  u = !0;
3855
3889
  return;
3856
3890
  }
3857
- e(s);
3891
+ e(T);
3858
3892
  }
3859
3893
  };
3860
- let i = !1;
3861
- const A = [
3862
- Le(f, "click", (s) => {
3863
- i || (i = !0, setTimeout(() => {
3864
- i = !1;
3865
- }, 0), p(s));
3894
+ let c = !1;
3895
+ const s = [
3896
+ Le(f, "click", (T) => {
3897
+ c || (c = !0, setTimeout(() => {
3898
+ c = !1;
3899
+ }, 0), p(T));
3866
3900
  }, {
3867
3901
  passive: !0,
3868
3902
  capture: v
3869
3903
  }),
3870
- Le(f, "pointerdown", (s) => {
3871
- const y = fe(t);
3872
- u = !d(s) && !!(y && !s.composedPath().includes(y));
3904
+ Le(f, "pointerdown", (T) => {
3905
+ const W = fe(t);
3906
+ u = !d(T) && !!(W && !T.composedPath().includes(W));
3873
3907
  }, { passive: !0 }),
3874
- l && Le(f, "blur", (s) => {
3908
+ l && Le(f, "blur", (T) => {
3875
3909
  setTimeout(() => {
3876
- var y;
3877
- const S = fe(t);
3878
- ((y = f.document.activeElement) === null || y === void 0 ? void 0 : y.tagName) === "IFRAME" && !(S != null && S.contains(f.document.activeElement)) && e(s);
3910
+ var W;
3911
+ const y = fe(t);
3912
+ ((W = f.document.activeElement) === null || W === void 0 ? void 0 : W.tagName) === "IFRAME" && !(y != null && y.contains(f.document.activeElement)) && e(T);
3879
3913
  }, 0);
3880
3914
  }, { passive: !0 })
3881
- ].filter(Boolean), T = () => A.forEach((s) => s());
3915
+ ].filter(Boolean), A = () => s.forEach((T) => T());
3882
3916
  return a ? {
3883
- stop: T,
3917
+ stop: A,
3884
3918
  cancel: () => {
3885
3919
  u = !1;
3886
3920
  },
3887
- trigger: (s) => {
3888
- u = !0, p(s), u = !1;
3921
+ trigger: (T) => {
3922
+ u = !0, p(T), u = !1;
3889
3923
  }
3890
- } : T;
3924
+ } : A;
3891
3925
  }
3892
3926
  function Mn(t) {
3893
3927
  return typeof t == "function" ? t : typeof t == "string" ? (e) => e.key === t : Array.isArray(t) ? (e) => t.includes(e.key) : () => !0;
@@ -3913,14 +3947,14 @@ const Yn = /* @__PURE__ */ _({
3913
3947
  const r = e, f = t, n = rf("blockComponentRef"), v = Y(() => Ut(f.block.type) || void 0);
3914
3948
  function l(a) {
3915
3949
  var b, p;
3916
- const u = ((b = a.margin) == null ? void 0 : b.top) || "none", d = ((p = a.margin) == null ? void 0 : p.bottom) || "none", P = (i, A) => `margin-${A}-${i === "small" ? "sm" : i === "medium" ? "md" : i === "large" ? "lg" : i}`;
3950
+ const u = ((b = a.margin) == null ? void 0 : b.top) || "none", d = ((p = a.margin) == null ? void 0 : p.bottom) || "none", P = (c, s) => `margin-${s}-${c === "small" ? "sm" : c === "medium" ? "md" : c === "large" ? "lg" : c}`;
3917
3951
  return [P(u, "top"), P(d, "bottom")].join(" ");
3918
3952
  }
3919
3953
  return Er("Escape", () => {
3920
3954
  f.activeBlock && r("clickBlock", null);
3921
3955
  }), (a, u) => {
3922
3956
  var d, P;
3923
- return X(), o("div", {
3957
+ return o(), X("div", {
3924
3958
  class: I(["block-wrapper", {
3925
3959
  [l(t.block)]: !0,
3926
3960
  "active-block": ((d = t.activeBlock) == null ? void 0 : d.id) === t.block.id,
@@ -3929,32 +3963,32 @@ const Yn = /* @__PURE__ */ _({
3929
3963
  "data-block-index": t.blockIndex,
3930
3964
  "data-block-id": t.block.id
3931
3965
  }, [
3932
- v.value ? (X(), o("div", {
3966
+ v.value ? (o(), X("div", {
3933
3967
  key: 0,
3934
3968
  class: "block-component",
3935
3969
  onMouseenter: u[0] || (u[0] = (b) => r("hoverBlock", t.block.id)),
3936
3970
  onMouseleave: u[1] || (u[1] = (b) => r("hoverBlock", null)),
3937
3971
  onClick: u[2] || (u[2] = (b) => r("clickBlock", t.block))
3938
3972
  }, [
3939
- ((P = t.activeBlock) == null ? void 0 : P.id) === t.block.id ? (X(), o("div", {
3973
+ ((P = t.activeBlock) == null ? void 0 : P.id) === t.block.id ? (o(), X("div", {
3940
3974
  key: 0,
3941
3975
  class: "editing-badge absolute right-2 top-2 z-40 rounded-full px-2 py-1 text-xs text-white"
3942
3976
  }, [
3943
- c("span", null, "Editing")
3944
- ])) : B("", !0),
3945
- (X(), ut(Yt(v.value), kt(t.block, {
3977
+ i("span", null, "Editing")
3978
+ ])) : R("", !0),
3979
+ (o(), ut(Yt(v.value), kt(t.block, {
3946
3980
  ref_key: "blockComponentRef",
3947
3981
  ref: n
3948
3982
  }), null, 16))
3949
- ], 32)) : (X(), o("div", {
3983
+ ], 32)) : (o(), X("div", {
3950
3984
  key: 1,
3951
3985
  class: "block-not-found px-3 py-2",
3952
3986
  onMouseenter: u[3] || (u[3] = (b) => r("hoverBlock", t.block.id)),
3953
3987
  onMouseleave: u[4] || (u[4] = (b) => r("hoverBlock", null))
3954
3988
  }, [
3955
- c("div", { class: "rounded-lg bg-zinc-200 p-5 px-3 text-center text-sm text-zinc-600" }, [
3956
- c("p", { class: "mb-2" }, "Block not registered"),
3957
- c("span", { class: "rounded-full bg-zinc-300 px-2 py-1 text-zinc-600" }, U(G(fr)(t.block.type)), 1)
3989
+ i("div", { class: "rounded-lg bg-zinc-200 p-5 px-3 text-center text-sm text-zinc-600" }, [
3990
+ i("p", { class: "mb-2" }, "Block not registered"),
3991
+ i("span", { class: "rounded-full bg-zinc-300 px-2 py-1 text-zinc-600" }, U(G(fr)(t.block.type)), 1)
3958
3992
  ])
3959
3993
  ], 32))
3960
3994
  ], 10, ["data-block-index", "data-block-id"]);
@@ -3983,7 +4017,7 @@ const Yn = /* @__PURE__ */ _({
3983
4017
  const d = u.dataTransfer.getData("block-type");
3984
4018
  d && f("blockAdded", d);
3985
4019
  }
3986
- return (u, d) => t.editable ? (X(), o("div", {
4020
+ return (u, d) => t.editable ? (o(), X("div", {
3987
4021
  key: 0,
3988
4022
  class: I(["relative p-5 py-12 text-center transition-all duration-200", { "dropzone-active": r.value }]),
3989
4023
  onDragover: Pt(n, ["prevent"]),
@@ -3991,31 +4025,31 @@ const Yn = /* @__PURE__ */ _({
3991
4025
  onDragleave: l,
3992
4026
  onDrop: Pt(a, ["prevent"])
3993
4027
  }, [
3994
- r.value ? (X(), o("div", {
4028
+ r.value ? (o(), X("div", {
3995
4029
  key: 0,
3996
4030
  class: "absolute inset-0 z-10 flex items-center justify-center rounded-lg border-2 border-dashed border-blue-500 bg-blue-50/80 backdrop-blur-sm"
3997
4031
  }, [
3998
- c("div", { class: "text-center" }, [
3999
- c("p", { class: "text-lg font-semibold text-blue-700" }, "Drop block here"),
4000
- c("p", { class: "mt-1 text-sm text-blue-600" }, "Release to add your first block")
4032
+ i("div", { class: "text-center" }, [
4033
+ i("p", { class: "text-lg font-semibold text-blue-700" }, "Drop block here"),
4034
+ i("p", { class: "mt-1 text-sm text-blue-600" }, "Release to add your first block")
4001
4035
  ])
4002
- ])) : B("", !0),
4003
- c("h2", { class: "mb-3 text-xl font-bold" }, "No blocks found"),
4004
- t.editable ? (X(), o("p", {
4036
+ ])) : R("", !0),
4037
+ i("h2", { class: "mb-3 text-xl font-bold" }, "No blocks found"),
4038
+ t.editable ? (o(), X("p", {
4005
4039
  key: 1,
4006
4040
  class: "mb-9 inline-flex items-center gap-1.5 rounded-md border border-gray-300 bg-zinc-50 px-3 py-2 text-sm text-zinc-500"
4007
- }, " Add a block to get started ")) : B("", !0),
4008
- c("img", {
4041
+ }, " Add a block to get started ")) : R("", !0),
4042
+ i("img", {
4009
4043
  src: G(Hr),
4010
4044
  alt: "Empty state",
4011
4045
  class: "mx-auto h-auto w-full max-w-xs"
4012
4046
  }, null, 8, ["src"])
4013
- ], 34)) : (X(), o("div", {
4047
+ ], 34)) : (o(), X("div", {
4014
4048
  key: 1,
4015
4049
  class: "p-5 py-12 text-center"
4016
4050
  }, [
4017
- c("h2", { class: "mb-3 text-xl font-bold" }, "No blocks found"),
4018
- c("img", {
4051
+ i("h2", { class: "mb-3 text-xl font-bold" }, "No blocks found"),
4052
+ i("img", {
4019
4053
  src: G(Hr),
4020
4054
  alt: "Empty state",
4021
4055
  class: "mx-auto h-auto w-full max-w-xs"
@@ -4039,35 +4073,35 @@ const Yn = /* @__PURE__ */ _({
4039
4073
  if (r.value)
4040
4074
  return Nr(e.layout);
4041
4075
  });
4042
- function u(W) {
4076
+ function u(w) {
4043
4077
  p({
4044
4078
  type: "BLOCK_CLICK",
4045
- block: W
4079
+ block: w
4046
4080
  });
4047
4081
  }
4048
- function d(W) {
4082
+ function d(w) {
4049
4083
  p({
4050
4084
  type: "BLOCK_HOVER",
4051
- blockId: W
4085
+ blockId: w
4052
4086
  });
4053
4087
  }
4054
- function P(W) {
4088
+ function P(w) {
4055
4089
  p({
4056
4090
  type: "BLOCK_ADD",
4057
- blockType: W
4091
+ blockType: w
4058
4092
  });
4059
4093
  }
4060
- function b(W) {
4094
+ function b(w) {
4061
4095
  try {
4062
- return JSON.parse(JSON.stringify(W));
4096
+ return JSON.parse(JSON.stringify(w));
4063
4097
  } catch (V) {
4064
4098
  console.warn("[iframe] Failed to serialize data for postMessage:", V);
4065
4099
  return;
4066
4100
  }
4067
4101
  }
4068
- function p(W) {
4102
+ function p(w) {
4069
4103
  if (window.parent) {
4070
- const V = b(W);
4104
+ const V = b(w);
4071
4105
  if (!V) {
4072
4106
  console.error("[iframe] Failed to serialize message for postMessage");
4073
4107
  return;
@@ -4076,80 +4110,80 @@ const Yn = /* @__PURE__ */ _({
4076
4110
  } else
4077
4111
  console.error("[iframe] No parent window found");
4078
4112
  }
4079
- let i = null;
4080
- function A() {
4113
+ let c = null;
4114
+ function s() {
4081
4115
  if (!f.value) {
4082
4116
  console.error("[iframe] EditorPageRenderer: No editor reference found");
4083
4117
  return;
4084
4118
  }
4085
- i = (W) => {
4086
- const q = W.target.closest("[data-partial]");
4119
+ c = (w) => {
4120
+ const q = w.target.closest("[data-partial]");
4087
4121
  q && p({
4088
4122
  type: "CLICK_PARTIAL",
4089
4123
  partial: q.getAttribute("data-partial")
4090
4124
  });
4091
- }, f.value.addEventListener("click", i);
4125
+ }, f.value.addEventListener("click", c);
4092
4126
  }
4093
- const T = j(null), s = j(!1), y = j(null), S = j(null);
4094
- function N(W) {
4127
+ const A = j(null), T = j(!1), W = j(null), y = j(null);
4128
+ function O(w) {
4095
4129
  var q;
4096
- n.value || document.querySelector(".sortable-drag, .sortable-ghost") || (q = W.dataTransfer) != null && q.types.includes("block-type") && (s.value = !0, W.preventDefault(), W.stopPropagation());
4130
+ n.value || document.querySelector(".sortable-drag, .sortable-ghost") || (q = w.dataTransfer) != null && q.types.includes("block-type") && (T.value = !0, w.preventDefault(), w.stopPropagation());
4097
4131
  }
4098
- function H(W) {
4132
+ function z(w) {
4099
4133
  if (n.value)
4100
4134
  return;
4101
- const V = W.relatedTarget, q = W.currentTarget;
4102
- q != null && q.contains(V) || (s.value = !1, y.value = null, S.value = null);
4135
+ const V = w.relatedTarget, q = w.currentTarget;
4136
+ q != null && q.contains(V) || (T.value = !1, W.value = null, y.value = null);
4103
4137
  }
4104
- function k(W) {
4138
+ function k(w) {
4105
4139
  var F;
4106
- if (n.value || document.querySelector(".sortable-drag, .sortable-ghost") || !((F = W.dataTransfer) != null && F.types.includes("block-type")))
4140
+ if (n.value || document.querySelector(".sortable-drag, .sortable-ghost") || !((F = w.dataTransfer) != null && F.types.includes("block-type")))
4107
4141
  return;
4108
- if (W.preventDefault(), W.stopPropagation(), W.dataTransfer && (W.dataTransfer.dropEffect = "move"), !e.blocks || e.blocks.length === 0) {
4109
- y.value = 0, S.value = 0;
4142
+ if (w.preventDefault(), w.stopPropagation(), w.dataTransfer && (w.dataTransfer.dropEffect = "move"), !e.blocks || e.blocks.length === 0) {
4143
+ W.value = 0, y.value = 0;
4110
4144
  return;
4111
4145
  }
4112
- const K = W.target.closest("[data-block-id]"), R = T.value;
4113
- if (R)
4146
+ const K = w.target.closest("[data-block-id]"), B = A.value;
4147
+ if (B)
4114
4148
  if (K) {
4115
4149
  const g = K.getAttribute("data-block-id");
4116
4150
  if (g) {
4117
4151
  const vt = e.blocks.findIndex(($) => $.id === g);
4118
4152
  if (vt !== -1) {
4119
- const $ = K.getBoundingClientRect(), ct = R.getBoundingClientRect(), yt = W.clientY, _t = $.top + $.height / 2;
4120
- yt < _t ? (y.value = vt, S.value = $.top - ct.top - 2) : (y.value = vt + 1, S.value = $.bottom - ct.top - 2);
4153
+ const $ = K.getBoundingClientRect(), it = B.getBoundingClientRect(), yt = w.clientY, _t = $.top + $.height / 2;
4154
+ yt < _t ? (W.value = vt, y.value = $.top - it.top - 2) : (W.value = vt + 1, y.value = $.bottom - it.top - 2);
4121
4155
  }
4122
4156
  }
4123
4157
  } else {
4124
- y.value = e.blocks.length;
4125
- const g = R.getBoundingClientRect();
4126
- S.value = g.height - 2;
4158
+ W.value = e.blocks.length;
4159
+ const g = B.getBoundingClientRect();
4160
+ y.value = g.height - 2;
4127
4161
  }
4128
4162
  }
4129
- function z(W) {
4130
- var R;
4131
- if (n.value || document.querySelector(".sortable-drag, .sortable-ghost") || !((R = W.dataTransfer) != null && R.types.includes("block-type")))
4163
+ function H(w) {
4164
+ var B;
4165
+ if (n.value || document.querySelector(".sortable-drag, .sortable-ghost") || !((B = w.dataTransfer) != null && B.types.includes("block-type")))
4132
4166
  return;
4133
- if (W.preventDefault(), W.stopPropagation(), !W.dataTransfer) {
4134
- s.value = !1, y.value = null, S.value = null;
4167
+ if (w.preventDefault(), w.stopPropagation(), !w.dataTransfer) {
4168
+ T.value = !1, W.value = null, y.value = null;
4135
4169
  return;
4136
4170
  }
4137
- const q = W.dataTransfer.getData("block-type") || W.dataTransfer.getData("text/plain");
4171
+ const q = w.dataTransfer.getData("block-type") || w.dataTransfer.getData("text/plain");
4138
4172
  if (!q) {
4139
- s.value = !1, y.value = null, S.value = null;
4173
+ T.value = !1, W.value = null, y.value = null;
4140
4174
  return;
4141
4175
  }
4142
4176
  let K;
4143
4177
  if (!e.blocks || e.blocks.length === 0)
4144
4178
  K = 0;
4145
4179
  else {
4146
- const g = W.target.closest("[data-block-id]");
4180
+ const g = w.target.closest("[data-block-id]");
4147
4181
  if (g) {
4148
4182
  const vt = g.getAttribute("data-block-id");
4149
4183
  if (vt) {
4150
- const $ = e.blocks.findIndex((ct) => ct.id === vt);
4184
+ const $ = e.blocks.findIndex((it) => it.id === vt);
4151
4185
  if ($ !== -1) {
4152
- const ct = g.getBoundingClientRect(), yt = W.clientY, _t = ct.top + ct.height / 2;
4186
+ const it = g.getBoundingClientRect(), yt = w.clientY, _t = it.top + it.height / 2;
4153
4187
  K = yt < _t ? $ : $ + 1;
4154
4188
  } else
4155
4189
  K = e.blocks.length;
@@ -4158,13 +4192,13 @@ const Yn = /* @__PURE__ */ _({
4158
4192
  } else
4159
4193
  K = e.blocks.length;
4160
4194
  }
4161
- s.value = !1, y.value = null, S.value = null, p({
4195
+ T.value = !1, W.value = null, y.value = null, p({
4162
4196
  type: "BLOCK_ADD",
4163
4197
  blockType: q,
4164
4198
  index: K
4165
4199
  });
4166
4200
  }
4167
- async function x() {
4201
+ async function L() {
4168
4202
  var q, K;
4169
4203
  if (n.value || l.value)
4170
4204
  return;
@@ -4172,24 +4206,24 @@ const Yn = /* @__PURE__ */ _({
4172
4206
  console.warn("Cannot initialize Sortable: layout component is not set");
4173
4207
  return;
4174
4208
  }
4175
- const W = (q = e.blocks) == null ? void 0 : q.length;
4176
- if (!W || W === 0) {
4209
+ const w = (q = e.blocks) == null ? void 0 : q.length;
4210
+ if (!w || w === 0) {
4177
4211
  console.warn("Cannot initialize Sortable: no blocks exist");
4178
4212
  return;
4179
4213
  }
4180
- const V = T.value || document.getElementById("page-blocks-wrapper");
4214
+ const V = A.value || document.getElementById("page-blocks-wrapper");
4181
4215
  if (!V) {
4182
4216
  console.warn("page-blocks-wrapper element not found. Conditions:", {
4183
4217
  hasLayout: !!a.value,
4184
4218
  blockCount: (K = e.blocks) == null ? void 0 : K.length,
4185
- hasRef: !!T.value,
4219
+ hasRef: !!A.value,
4186
4220
  pageViewportExists: !!document.getElementById("page-viewport")
4187
4221
  });
4188
4222
  return;
4189
4223
  }
4190
4224
  if (v.value) {
4191
- const { el: R } = v.value;
4192
- if (R && R.isConnected && R === V)
4225
+ const { el: B } = v.value;
4226
+ if (B && B.isConnected && B === V)
4193
4227
  return;
4194
4228
  try {
4195
4229
  v.value.destroy();
@@ -4199,7 +4233,7 @@ const Yn = /* @__PURE__ */ _({
4199
4233
  }
4200
4234
  l.value = !0;
4201
4235
  try {
4202
- v.value = new O(V, {
4236
+ v.value = new x(V, {
4203
4237
  animation: 150,
4204
4238
  ghostClass: "sortable-ghost",
4205
4239
  chosenClass: "sortable-chosen",
@@ -4214,16 +4248,16 @@ const Yn = /* @__PURE__ */ _({
4214
4248
  onStart: () => {
4215
4249
  n.value = !0;
4216
4250
  },
4217
- onAdd: (R) => {
4218
- const { item: F, newIndex: g } = R, vt = F.getAttribute("data-block-type");
4251
+ onAdd: (B) => {
4252
+ const { item: F, newIndex: g } = B, vt = F.getAttribute("data-block-type");
4219
4253
  vt && (p({
4220
4254
  type: "BLOCK_ADD",
4221
4255
  blockType: vt,
4222
4256
  index: g
4223
4257
  }), F.remove());
4224
4258
  },
4225
- onEnd: async (R) => {
4226
- const { oldIndex: F, newIndex: g } = R;
4259
+ onEnd: async (B) => {
4260
+ const { oldIndex: F, newIndex: g } = B;
4227
4261
  F != null && g !== null && g !== void 0 && F !== g && p({
4228
4262
  type: "BLOCK_REORDER",
4229
4263
  oldIndex: F,
@@ -4236,60 +4270,60 @@ const Yn = /* @__PURE__ */ _({
4236
4270
  }
4237
4271
  }
4238
4272
  return $t(async () => {
4239
- r.value = !1, await Ve(e.theme, !1), r.value = !0, A();
4240
- }), ot(
4273
+ r.value = !1, await me(e.theme, !1), r.value = !0, s();
4274
+ }), Xt(
4241
4275
  [() => e.blocks, () => a.value, () => r.value],
4242
- async ([W, V, q]) => {
4243
- q && V && W && W.length > 0 && (await It(), await x());
4276
+ async ([w, V, q]) => {
4277
+ q && V && w && w.length > 0 && (await It(), await L());
4244
4278
  },
4245
4279
  { immediate: !0 }
4246
- ), Bt(async () => {
4247
- e.blocks && e.blocks.length > 0 && a.value && r.value && (await It(), await x());
4280
+ ), Rt(async () => {
4281
+ e.blocks && e.blocks.length > 0 && a.value && r.value && (await It(), await L());
4248
4282
  }), rr(() => {
4249
- if (i && f.value && (f.value.removeEventListener("click", i), i = null), v.value) {
4283
+ if (c && f.value && (f.value.removeEventListener("click", c), c = null), v.value) {
4250
4284
  try {
4251
4285
  v.value.destroy();
4252
4286
  } catch {
4253
4287
  }
4254
4288
  v.value = null;
4255
4289
  }
4256
- }), (W, V) => (X(), o("div", {
4290
+ }), (w, V) => (o(), X("div", {
4257
4291
  id: "page-viewport",
4258
4292
  ref_key: "editorRef",
4259
4293
  ref: f,
4260
4294
  class: I(["page-renderer-wrapper relative", { "settings-open": t.settingsOpen }])
4261
4295
  }, [
4262
- r.value ? (X(), o(tt, { key: 0 }, [
4263
- a.value ? (X(), ut(Yt(a.value), kt({ key: 0 }, t.settings, { blocks: t.blocks }), {
4296
+ r.value ? (o(), X(tt, { key: 0 }, [
4297
+ a.value ? (o(), ut(Yt(a.value), kt({ key: 0 }, t.settings, { blocks: t.blocks }), {
4264
4298
  default: xr(() => {
4265
4299
  var q;
4266
4300
  return [
4267
- (q = t.blocks) != null && q.length ? (X(), o("div", {
4301
+ (q = t.blocks) != null && q.length ? (o(), X("div", {
4268
4302
  key: 1,
4269
4303
  id: "page-blocks-wrapper",
4270
4304
  ref_key: "pageBlocksWrapperRef",
4271
- ref: T,
4272
- class: I(["relative", { "drag-over": s.value }]),
4273
- onDragenter: N,
4274
- onDragleave: H,
4305
+ ref: A,
4306
+ class: I(["relative", { "drag-over": T.value }]),
4307
+ onDragenter: O,
4308
+ onDragleave: z,
4275
4309
  onDragover: k,
4276
- onDrop: z
4310
+ onDrop: H
4277
4311
  }, [
4278
- s.value && y.value !== null && S.value !== null ? (X(), o("div", {
4312
+ T.value && W.value !== null && y.value !== null ? (o(), X("div", {
4279
4313
  key: 0,
4280
4314
  class: "drop-indicator",
4281
- style: Lr({ top: S.value + "px" })
4315
+ style: Lr({ top: y.value + "px" })
4282
4316
  }, [
4283
- c("div", { class: "drop-indicator-line" }),
4284
- c("div", { class: "drop-indicator-label" }, "Drop here"),
4285
- c("div", { class: "drop-indicator-line" })
4286
- ], 4)) : B("", !0),
4287
- (X(!0), o(tt, null, nt(t.blocks, (K, R) => (X(), o("div", {
4317
+ i("div", { class: "drop-indicator-line" }),
4318
+ i("div", { class: "drop-indicator-label" }, "Drop here"),
4319
+ i("div", { class: "drop-indicator-line" })
4320
+ ], 4)) : R("", !0),
4321
+ (o(!0), X(tt, null, nt(t.blocks, (K, B) => (o(), X("div", {
4288
4322
  key: K.id
4289
4323
  }, [
4290
4324
  h(In, {
4291
4325
  block: K,
4292
- blockIndex: R,
4326
+ blockIndex: B,
4293
4327
  activeBlock: t.activeBlock,
4294
4328
  editable: t.editable,
4295
4329
  hoveredBlockId: t.hoveredBlockId,
@@ -4297,7 +4331,7 @@ const Yn = /* @__PURE__ */ _({
4297
4331
  onClickBlock: u
4298
4332
  }, null, 8, ["block", "blockIndex", "activeBlock", "editable", "hoveredBlockId"])
4299
4333
  ]))), 128))
4300
- ], 34)) : (X(), ut(En, {
4334
+ ], 34)) : (o(), ut(En, {
4301
4335
  key: 0,
4302
4336
  editable: t.editable,
4303
4337
  onBlockAdded: P
@@ -4305,12 +4339,12 @@ const Yn = /* @__PURE__ */ _({
4305
4339
  ];
4306
4340
  }),
4307
4341
  _: 1
4308
- }, 16, ["blocks"])) : (X(), o("div", {
4342
+ }, 16, ["blocks"])) : (o(), X("div", {
4309
4343
  key: 1,
4310
4344
  class: "rounded-b-lg bg-white px-5 py-12 md:py-20"
4311
4345
  }, [
4312
- c("div", { class: "mx-auto max-w-md pb-7 text-center" }, [
4313
- (X(), o("svg", {
4346
+ i("div", { class: "mx-auto max-w-md pb-7 text-center" }, [
4347
+ (o(), X("svg", {
4314
4348
  xmlns: "http://www.w3.org/2000/svg",
4315
4349
  fill: "none",
4316
4350
  viewBox: "0 0 24 24",
@@ -4318,28 +4352,28 @@ const Yn = /* @__PURE__ */ _({
4318
4352
  stroke: "currentColor",
4319
4353
  class: "mx-auto size-20 text-gray-400"
4320
4354
  }, [
4321
- c("path", {
4355
+ i("path", {
4322
4356
  "stroke-linecap": "round",
4323
4357
  "stroke-linejoin": "round",
4324
4358
  d: "M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"
4325
4359
  })
4326
4360
  ])),
4327
- c("h2", { class: "text-2xl font-bold text-gray-900" }, "No layout found"),
4328
- c("p", { class: "mt-4 text-pretty text-gray-700" }, " Get started by creating your first layout. It only takes a few seconds. "),
4329
- c("p", { class: "mt-6 text-sm text-gray-700" }, [
4330
- c("a", {
4361
+ i("h2", { class: "text-2xl font-bold text-gray-900" }, "No layout found"),
4362
+ i("p", { class: "mt-4 text-pretty text-gray-700" }, " Get started by creating your first layout. It only takes a few seconds. "),
4363
+ i("p", { class: "mt-6 text-sm text-gray-700" }, [
4364
+ i("a", {
4331
4365
  href: "#",
4332
4366
  class: "underline hover:text-gray-900"
4333
4367
  }, "Learn how"),
4334
- Xe(" or "),
4335
- c("a", {
4368
+ oe(" or "),
4369
+ i("a", {
4336
4370
  href: "#",
4337
4371
  class: "underline hover:text-gray-900"
4338
4372
  }, "view examples")
4339
4373
  ])
4340
4374
  ])
4341
4375
  ]))
4342
- ], 64)) : B("", !0)
4376
+ ], 64)) : R("", !0)
4343
4377
  ], 2));
4344
4378
  }
4345
4379
  }), jr = /* @__PURE__ */ Wt(Qn, [["__scopeId", "data-v-d3e4c269"]]);
@@ -4347,70 +4381,87 @@ function $n() {
4347
4381
  return import.meta.url;
4348
4382
  }
4349
4383
  async function dv(t) {
4384
+ console.info("[iframe] createIframeApp called with container:", t), console.info("[iframe] Container element:", t.tagName, t.id, t.className);
4350
4385
  const e = j(null), r = j(null), f = j(null), n = j(!1), v = j("blocks"), l = j("settings"), a = j("default");
4351
- function u(A) {
4386
+ console.info("[iframe] State initialized");
4387
+ function u(s) {
4352
4388
  try {
4353
- return JSON.parse(JSON.stringify(A));
4389
+ return JSON.parse(JSON.stringify(s));
4354
4390
  } catch {
4355
4391
  return;
4356
4392
  }
4357
4393
  }
4358
- function d(A) {
4394
+ function d(s) {
4359
4395
  if (window.parent) {
4360
- const T = u(A);
4361
- if (!T)
4396
+ const A = u(s);
4397
+ if (!A)
4362
4398
  return;
4363
- window.parent.postMessage(T, "*");
4399
+ window.parent.postMessage(A, "*");
4364
4400
  }
4365
4401
  }
4366
- window.addEventListener("message", (A) => {
4367
- const T = A.data;
4368
- if (!(!T || !T.type))
4369
- switch (T.type) {
4402
+ console.info("[iframe] Setting up message listener"), window.addEventListener("message", (s) => {
4403
+ const A = s.data;
4404
+ if (console.info("[iframe] Received message:", A == null ? void 0 : A.type, A), !(!A || !A.type))
4405
+ switch (A.type) {
4370
4406
  case "UPDATE_PAGE_DATA":
4371
- T.pageData && (e.value = T.pageData), T.blocksKey && (v.value = T.blocksKey), T.settingsKey && (l.value = T.settingsKey), T.theme && (a.value = T.theme);
4407
+ console.info("[iframe] UPDATE_PAGE_DATA received", {
4408
+ hasPageData: !!A.pageData,
4409
+ blocksKey: A.blocksKey,
4410
+ settingsKey: A.settingsKey,
4411
+ theme: A.theme
4412
+ }), A.pageData && (e.value = A.pageData, console.info("[iframe] pageData updated:", e.value)), A.blocksKey && (v.value = A.blocksKey), A.settingsKey && (l.value = A.settingsKey), A.theme && (a.value = A.theme);
4372
4413
  break;
4373
4414
  case "SET_ACTIVE_BLOCK":
4374
- r.value = T.block;
4415
+ r.value = A.block;
4375
4416
  break;
4376
4417
  case "SET_HOVERED_BLOCK":
4377
- f.value = T.blockId;
4418
+ f.value = A.blockId;
4378
4419
  break;
4379
4420
  case "SET_SETTINGS_OPEN":
4380
- n.value = T.settingsOpen;
4421
+ n.value = A.settingsOpen;
4381
4422
  break;
4382
4423
  case "SCROLL_TO_BLOCK": {
4383
- const s = document.querySelector(`[data-block-id="${T.blockId}"]`);
4384
- s && s.scrollIntoView({ behavior: "smooth", block: "center" });
4424
+ const T = document.querySelector(`[data-block-id="${A.blockId}"]`);
4425
+ T && T.scrollIntoView({ behavior: "smooth", block: "center" });
4385
4426
  break;
4386
4427
  }
4387
4428
  }
4388
- });
4429
+ }), console.info("[iframe] Creating Vue app...");
4389
4430
  const P = ff({
4390
4431
  components: {
4391
4432
  EditorPageRenderer: jr
4392
4433
  },
4393
4434
  setup() {
4394
- const A = j(!1);
4395
- return ot(
4435
+ console.info("[iframe] Vue app setup() called");
4436
+ const s = j(!1);
4437
+ return console.info("[iframe] Setting up pageData watcher"), Xt(
4396
4438
  () => e.value,
4397
- async (T) => {
4398
- T && T[v.value] ? (await new Promise((s) => setTimeout(s, 200)), A.value = !0) : A.value = !1;
4439
+ async (A) => {
4440
+ console.info("[iframe] pageData watcher triggered:", {
4441
+ hasNewPageData: !!A,
4442
+ blocksKey: v.value,
4443
+ hasBlocks: !!(A && A[v.value])
4444
+ }), A && A[v.value] ? (console.info("[iframe] Waiting 200ms for PageRenderer to load blocks..."), await new Promise((T) => setTimeout(T, 200)), s.value = !0, console.info("[iframe] isPageReady set to true")) : (s.value = !1, console.info("[iframe] isPageReady set to false (no pageData)"));
4399
4445
  },
4400
4446
  { immediate: !0 }
4401
4447
  ), () => {
4402
- var S;
4403
- const T = e.value, y = T && T[v.value] && T ? T[v.value] : [];
4404
- return A.value && T ? Dt(jr, {
4405
- blocks: y,
4406
- layout: (S = T[l.value]) == null ? void 0 : S.layout,
4407
- settings: T[l.value],
4448
+ var y;
4449
+ const A = e.value, T = A && A[v.value], W = T && A ? A[v.value] : [];
4450
+ return console.info("[iframe] Render function called:", {
4451
+ isPageReady: s.value,
4452
+ hasPageData: !!A,
4453
+ hasBlocks: T,
4454
+ blocksCount: (W == null ? void 0 : W.length) || 0
4455
+ }), s.value && A ? (console.info("[iframe] Rendering EditorPageRenderer"), Dt(jr, {
4456
+ blocks: W,
4457
+ layout: (y = A[l.value]) == null ? void 0 : y.layout,
4458
+ settings: A[l.value],
4408
4459
  activeBlock: r.value,
4409
4460
  hoveredBlockId: f.value,
4410
4461
  settingsOpen: n.value,
4411
4462
  editable: !0,
4412
4463
  theme: a.value
4413
- }) : Dt("div", { class: "bg-white px-5 py-12 md:py-20" }, [
4464
+ })) : (console.info("[iframe] Rendering loading state"), Dt("div", { class: "bg-white px-5 py-12 md:py-20" }, [
4414
4465
  Dt("div", { class: "mx-auto max-w-md pb-7 text-center" }, [
4415
4466
  Dt(
4416
4467
  "svg",
@@ -4438,27 +4489,33 @@ async function dv(t) {
4438
4489
  ),
4439
4490
  Dt("span", { class: "mt-4 text-gray-700" }, "Loading preview...")
4440
4491
  ])
4441
- ]);
4492
+ ]));
4442
4493
  };
4443
4494
  }
4444
4495
  }), b = new Function("modulePath", "return import(modulePath)");
4496
+ console.info("[iframe] Attempting to install @vueuse/head plugin...");
4445
4497
  try {
4446
- const A = await b("@vueuse/head");
4447
- if (A && typeof A.createHead == "function") {
4448
- const T = A.createHead();
4449
- P.use(T);
4450
- }
4451
- } catch {
4498
+ const s = await b("@vueuse/head");
4499
+ if (s && typeof s.createHead == "function") {
4500
+ console.info("[iframe] @vueuse/head found, installing plugin");
4501
+ const A = s.createHead();
4502
+ P.use(A), console.info("[iframe] @vueuse/head plugin installed");
4503
+ } else
4504
+ console.info("[iframe] @vueuse/head module found but createHead is not a function");
4505
+ } catch (s) {
4506
+ console.info("[iframe] @vueuse/head not available (this is OK):", s);
4452
4507
  }
4453
- let p = null, i = !1;
4508
+ console.info("[iframe] Attempting to install vue-router...");
4509
+ let p = null, c = !1;
4454
4510
  try {
4455
- p = await import("vue-router");
4456
- } catch {
4457
- p = typeof window < "u" ? window.VueRouter : null;
4511
+ console.info("[iframe] Trying to import vue-router dynamically..."), p = await b("vue-router"), console.info("[iframe] vue-router imported successfully:", !!p);
4512
+ } catch (s) {
4513
+ console.info("[iframe] Dynamic import failed, trying CDN version:", s), p = typeof window < "u" ? window.VueRouter : null, console.info("[iframe] VueRouter from window:", !!p);
4458
4514
  }
4459
4515
  if (p && typeof p.createRouter == "function")
4460
4516
  try {
4461
- const A = p.createRouter({
4517
+ console.info("[iframe] Creating vue-router instance...");
4518
+ const s = p.createRouter({
4462
4519
  history: p.createMemoryHistory(),
4463
4520
  routes: [
4464
4521
  {
@@ -4470,24 +4527,29 @@ async function dv(t) {
4470
4527
  component: { template: "<div></div>" }
4471
4528
  }
4472
4529
  ]
4473
- }), T = A.resolve.bind(A);
4474
- A.resolve = (y) => {
4475
- const S = T(y);
4476
- return S.route && (!S.route.matched || S.route.matched.length === 0) && (S.route.matched = [
4530
+ });
4531
+ console.info("[iframe] Router created, setting up resolve override...");
4532
+ const A = s.resolve.bind(s);
4533
+ s.resolve = (W) => {
4534
+ const y = A(W);
4535
+ return y.route && (!y.route.matched || y.route.matched.length === 0) && (y.route.matched = [
4477
4536
  {
4478
- path: S.route.path || "/",
4479
- name: S.route.name,
4480
- meta: S.route.meta || {},
4537
+ path: y.route.path || "/",
4538
+ name: y.route.name,
4539
+ meta: y.route.meta || {},
4481
4540
  components: {},
4482
4541
  children: []
4483
4542
  }
4484
- ]), S;
4485
- }, P.use(A), await A.isReady();
4486
- const s = A.currentRoute.value;
4487
- s && (!s.matched || s.matched.length === 0) && await A.push("/"), i = !0;
4488
- } catch {
4543
+ ]), y;
4544
+ }, console.info("[iframe] Installing router on app..."), P.use(s), console.info("[iframe] Waiting for router to be ready..."), await s.isReady(), console.info("[iframe] Router is ready");
4545
+ const T = s.currentRoute.value;
4546
+ T && (!T.matched || T.matched.length === 0) && (console.info("[iframe] Navigating to / to ensure route has matched array"), await s.push("/")), c = !0, console.info("[iframe] Router installed successfully");
4547
+ } catch (s) {
4548
+ console.error("[iframe] Failed to install router:", s);
4489
4549
  }
4490
- return i || console.warn("[iframe preview] Router was not installed - RouterLink components will fail"), P.mount(t), d({ type: "IFRAME_READY" }), P;
4550
+ else
4551
+ console.info("[iframe] VueRouter not available or createRouter is not a function");
4552
+ return c || console.warn("[iframe preview] Router was not installed - RouterLink components will fail"), console.info("[iframe] Mounting app to container..."), console.info("[iframe] Container before mount:", t.innerHTML), P.mount(t), console.info("[iframe] App mounted successfully"), console.info("[iframe] Container after mount:", t.innerHTML), console.info("[iframe] Sending IFRAME_READY message to parent"), d({ type: "IFRAME_READY" }), P;
4491
4553
  }
4492
4554
  const _n = /* @__PURE__ */ _({
4493
4555
  __name: "IframePreview",
@@ -4506,84 +4568,115 @@ const _n = /* @__PURE__ */ _({
4506
4568
  setup(t, { emit: e }) {
4507
4569
  const r = $n(), f = t, n = e, v = j(null), l = j(null), a = j(!1), u = j(""), d = Y(() => f.blocksKey || "blocks"), P = Y(() => f.settingsKey || "settings");
4508
4570
  function b() {
4509
- const s = qn(r), y = new Blob([s], { type: "text/html" });
4510
- return URL.createObjectURL(y);
4571
+ var W, y;
4572
+ if (console.info("[parent] Iframe load event fired"), console.info("[parent] Iframe ref:", v.value), console.info("[parent] Iframe contentWindow:", (W = v.value) == null ? void 0 : W.contentWindow), (y = v.value) != null && y.contentWindow)
4573
+ try {
4574
+ console.info("[parent] Iframe document:", v.value.contentWindow.document), console.info("[parent] Iframe document body:", v.value.contentWindow.document.body), console.info(
4575
+ "[parent] Iframe document body innerHTML length:",
4576
+ v.value.contentWindow.document.body.innerHTML.length
4577
+ );
4578
+ } catch (O) {
4579
+ console.info("[parent] Cannot access iframe document (cross-origin?):", O);
4580
+ }
4511
4581
  }
4512
- async function p() {
4513
- !v.value || !a.value || !f.pageData || !f.pageData[d.value] || (await It(), Jn(v.value, f.pageData, d.value, P.value, f.theme || "default"));
4582
+ function p() {
4583
+ console.info("[parent] Creating iframe src, module URL:", r);
4584
+ const W = qn(r), y = new Blob([W], { type: "text/html" }), O = URL.createObjectURL(y);
4585
+ return console.info("[parent] Iframe blob URL created:", O), O;
4514
4586
  }
4515
- let i = null;
4587
+ async function c() {
4588
+ if (console.info("[parent] updateIframeContent called", {
4589
+ hasIframeRef: !!v.value,
4590
+ iframeReady: a.value,
4591
+ hasPageData: !!f.pageData,
4592
+ hasBlocks: !!(f.pageData && f.pageData[d.value])
4593
+ }), !v.value || !a.value) {
4594
+ console.info("[parent] Skipping update - iframe not ready");
4595
+ return;
4596
+ }
4597
+ if (!f.pageData || !f.pageData[d.value]) {
4598
+ console.info("[parent] Skipping update - no pageData or blocks");
4599
+ return;
4600
+ }
4601
+ await It(), console.info("[parent] Sending pageData update to iframe"), Jn(v.value, f.pageData, d.value, P.value, f.theme || "default");
4602
+ }
4603
+ let s = null;
4516
4604
  function A() {
4517
- i = (s) => {
4605
+ console.info("[parent] Setting up message listener"), s = (W) => {
4518
4606
  var y;
4519
- s.source === ((y = v.value) == null ? void 0 : y.contentWindow) && Un(s, {
4520
- onBlockClick: (S, N) => {
4521
- n("click-block", N);
4607
+ if (W.source !== ((y = v.value) == null ? void 0 : y.contentWindow)) {
4608
+ console.info("[parent] Ignoring message from different source");
4609
+ return;
4610
+ }
4611
+ console.info("[parent] Received message from iframe:", W.data), Un(W, {
4612
+ onBlockClick: (O, z) => {
4613
+ n("click-block", z);
4522
4614
  },
4523
- onBlockHover: (S) => {
4524
- n("hover-block", S);
4615
+ onBlockHover: (O) => {
4616
+ n("hover-block", O);
4525
4617
  },
4526
- onBlockReorder: (S, N) => {
4527
- n("block-reorder", S, N);
4618
+ onBlockReorder: (O, z) => {
4619
+ n("block-reorder", O, z);
4528
4620
  },
4529
- onBlockAdd: (S, N) => {
4530
- n("block-add", S, N);
4621
+ onBlockAdd: (O, z) => {
4622
+ n("block-add", O, z);
4531
4623
  },
4532
- onPartialClick: (S) => {
4533
- n("click-partial", S);
4624
+ onPartialClick: (O) => {
4625
+ n("click-partial", O);
4534
4626
  },
4535
4627
  onIframeReady: () => {
4536
- a.value = !0, setTimeout(() => {
4537
- p(), v.value && f.settingsOpen !== void 0 && zr(v.value, f.settingsOpen);
4628
+ console.info("[parent] IFRAME_READY received, setting iframeReady to true"), a.value = !0, setTimeout(() => {
4629
+ console.info("[parent] Timeout completed, calling updateIframeContent"), c(), v.value && f.settingsOpen !== void 0 && (console.info("[parent] Sending initial settingsOpen state"), zr(v.value, f.settingsOpen));
4538
4630
  }, 100);
4539
4631
  }
4540
4632
  });
4541
- }, window.addEventListener("message", i);
4633
+ }, window.addEventListener("message", s), console.info("[parent] Message listener added");
4542
4634
  }
4543
4635
  function T() {
4544
- i && (window.removeEventListener("message", i), i = null);
4636
+ s && (window.removeEventListener("message", s), s = null);
4545
4637
  }
4546
- return ot(
4638
+ return Xt(
4547
4639
  [() => f.pageData, () => f.theme],
4548
4640
  async () => {
4549
- await It(), p();
4641
+ await It(), c();
4550
4642
  },
4551
4643
  { deep: !0 }
4552
- ), ot(
4644
+ ), Xt(
4553
4645
  () => f.activeBlock,
4554
- async (s) => {
4555
- v.value && a.value && (Dn(v.value, s || null), s != null && s.id && (await It(), gn(v.value, s.id)));
4646
+ async (W) => {
4647
+ v.value && a.value && (Dn(v.value, W || null), W != null && W.id && (await It(), gn(v.value, W.id)));
4556
4648
  }
4557
- ), ot(
4649
+ ), Xt(
4558
4650
  () => f.hoveredBlockId,
4559
- (s) => {
4560
- v.value && a.value && Kn(v.value, s);
4651
+ (W) => {
4652
+ v.value && a.value && Kn(v.value, W);
4561
4653
  }
4562
- ), ot(
4654
+ ), Xt(
4563
4655
  () => f.settingsOpen,
4564
- (s) => {
4565
- v.value && a.value && zr(v.value, s ?? !1);
4656
+ (W) => {
4657
+ v.value && a.value && zr(v.value, W ?? !1);
4566
4658
  }
4567
- ), Bt(() => {
4568
- u.value = b(), A();
4659
+ ), Rt(() => {
4660
+ console.info("[parent] IframePreview component mounted"), u.value = p(), console.info("[parent] Iframe src set:", u.value), A();
4569
4661
  }), rr(() => {
4570
4662
  T(), u.value.startsWith("blob:") && URL.revokeObjectURL(u.value);
4571
- }), (s, y) => (X(), o("div", {
4663
+ }), (W, y) => (o(), X("div", {
4572
4664
  ref_key: "containerRef",
4573
4665
  ref: l,
4574
4666
  class: "iframe-preview-container"
4575
4667
  }, [
4576
- c("iframe", {
4668
+ i("iframe", {
4577
4669
  ref_key: "iframeRef",
4578
4670
  ref: v,
4579
4671
  title: "Page preview",
4580
4672
  src: u.value,
4581
4673
  class: "iframe-preview",
4582
- frameborder: "0"
4583
- }, null, 8, ["src"])
4674
+ frameborder: "0",
4675
+ onLoad: b
4676
+ }, null, 40, ["src"])
4584
4677
  ], 512));
4585
4678
  }
4586
- }), tv = /* @__PURE__ */ Wt(_n, [["__scopeId", "data-v-24174304"]]), bv = /* @__PURE__ */ _({
4679
+ }), tv = /* @__PURE__ */ Wt(_n, [["__scopeId", "data-v-e68cfe9f"]]), bv = /* @__PURE__ */ _({
4587
4680
  __name: "WswgPageBuilder",
4588
4681
  props: /* @__PURE__ */ Tt({
4589
4682
  editable: { type: Boolean, default: !1 },
@@ -4601,30 +4694,30 @@ const _n = /* @__PURE__ */ _({
4601
4694
  emits: ["update:modelValue"],
4602
4695
  setup(t) {
4603
4696
  const e = t, r = j("desktop"), f = j(!1), n = j(!1), v = j(null), l = j(!1), a = j(null), u = j(void 0), d = j(380), P = j(null), b = j(!1), p = rt(t, "modelValue");
4604
- function i(z) {
4605
- d.value = z;
4697
+ function c(H) {
4698
+ d.value = H;
4606
4699
  }
4607
- const A = Y(() => {
4608
- var z, x;
4609
- return !!(Object.keys(zt).length > 1 || (z = p.value) != null && z[e.settingsKey] && Object.keys((x = p.value) == null ? void 0 : x[e.settingsKey]).length > 0);
4700
+ const s = Y(() => {
4701
+ var H, L;
4702
+ return !!(Object.keys(zt).length > 1 || (H = p.value) != null && H[e.settingsKey] && Object.keys((L = p.value) == null ? void 0 : L[e.settingsKey]).length > 0);
4610
4703
  });
4611
- function T(z) {
4612
- v.value = z, f.value = !1, a.value = null, n.value = !1;
4704
+ function A(H) {
4705
+ v.value = H, f.value = !1, a.value = null, n.value = !1;
4613
4706
  }
4614
- async function s(z, x) {
4707
+ async function T(H, L) {
4615
4708
  if (!p.value) return;
4616
4709
  p.value[e.blocksKey] || (p.value[e.blocksKey] = []);
4617
- const W = {
4710
+ const w = {
4618
4711
  id: `block-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,
4619
- type: z,
4712
+ type: H,
4620
4713
  margin: e.defaultBlockMargin ? { top: e.defaultBlockMargin, bottom: e.defaultBlockMargin } : void 0
4621
- }, V = Ut(z);
4714
+ }, V = Ut(H);
4622
4715
  return V != null && V.props && Object.entries(V.props).forEach(([q, K]) => {
4623
- K.default && (typeof K.default == "function" ? W[q] = K.default() : W[q] = K.default);
4624
- }), x !== void 0 ? p.value[e.blocksKey].splice(x, 0, W) : p.value[e.blocksKey].push(W), v.value = W, n.value = !1, W;
4716
+ K.default && (typeof K.default == "function" ? w[q] = K.default() : w[q] = K.default);
4717
+ }), L !== void 0 ? p.value[e.blocksKey].splice(L, 0, w) : p.value[e.blocksKey].push(w), v.value = w, n.value = !1, w;
4625
4718
  }
4626
- function y(z) {
4627
- l.value || (a.value = z);
4719
+ function W(H) {
4720
+ l.value || (a.value = H);
4628
4721
  }
4629
4722
  Er("Escape", () => {
4630
4723
  v.value = null, a.value = null, n.value = !1, f.value = !1, u.value = void 0;
@@ -4635,53 +4728,53 @@ const _n = /* @__PURE__ */ _({
4635
4728
  },
4636
4729
  { ignore: ["#page-builder-sidebar", "#page-builder-resize-handle"] }
4637
4730
  ), $t(async () => {
4638
- await Ve(e.theme, !0), k();
4639
- }), ot(
4731
+ await me(e.theme, !0), k();
4732
+ }), Xt(
4640
4733
  () => e.theme,
4641
- async (z) => {
4642
- b.value = !0, await Ve(z, !0), k(), b.value = !1;
4734
+ async (H) => {
4735
+ b.value = !0, await me(H, !0), k(), b.value = !1;
4643
4736
  }
4644
4737
  );
4645
- function S(z, x) {
4738
+ function y(H, L) {
4646
4739
  var q;
4647
4740
  if (!((q = p.value) != null && q[e.blocksKey])) return;
4648
- const W = p.value[e.blocksKey];
4649
- if (z < 0 || z >= W.length || x < 0 || x >= W.length)
4741
+ const w = p.value[e.blocksKey];
4742
+ if (H < 0 || H >= w.length || L < 0 || L >= w.length)
4650
4743
  return;
4651
- const V = W[z];
4652
- W.splice(z, 1), W.splice(x, 0, V);
4744
+ const V = w[H];
4745
+ w.splice(H, 1), w.splice(L, 0, V);
4653
4746
  }
4654
- function N(z, x) {
4655
- s(z, x);
4747
+ function O(H, L) {
4748
+ T(H, L);
4656
4749
  }
4657
- function H(z) {
4658
- const x = z !== null && z !== "";
4659
- f.value = !0, v.value = null, a.value = null, n.value = !1, x && z ? u.value = z : u.value = void 0;
4750
+ function z(H) {
4751
+ const L = H !== null && H !== "";
4752
+ f.value = !0, v.value = null, a.value = null, n.value = !1, L && H ? u.value = H : u.value = void 0;
4660
4753
  }
4661
4754
  function k() {
4662
- var z, x, W, V, q, K, R, F;
4663
- if (p.value || (p.value = {}), (z = p.value) != null && z[e.settingsKey] || p.value && (p.value[e.settingsKey] = {}), !((W = (x = p.value) == null ? void 0 : x[e.settingsKey]) != null && W.layout)) {
4755
+ var H, L, w, V, q, K, B, F;
4756
+ if (p.value || (p.value = {}), (H = p.value) != null && H[e.settingsKey] || p.value && (p.value[e.settingsKey] = {}), !((w = (L = p.value) == null ? void 0 : L[e.settingsKey]) != null && w.layout)) {
4664
4757
  const g = (V = p.value) == null ? void 0 : V[e.settingsKey];
4665
4758
  g && typeof g.layout != "string" && (g.layout = "default");
4666
4759
  }
4667
4760
  if ((K = (q = p.value) == null ? void 0 : q[e.settingsKey]) != null && K.layout) {
4668
- const g = (R = p.value) == null ? void 0 : R[e.settingsKey];
4761
+ const g = (B = p.value) == null ? void 0 : B[e.settingsKey];
4669
4762
  g && (typeof g.layout != "string" ? g.layout = "default" : zt.value[g.layout] || (g.layout = "default"));
4670
4763
  }
4671
4764
  (F = p.value) != null && F[e.blocksKey] || p.value && (p.value[e.blocksKey] = []);
4672
4765
  }
4673
- return (z, x) => (X(), o("div", {
4766
+ return (H, L) => (o(), X("div", {
4674
4767
  class: I(["wswg-page-builder", { "settings-open": f.value }])
4675
4768
  }, [
4676
- t.loading || b.value ? Or(z.$slots, "loading", { key: 0 }, () => [
4677
- c("div", { class: "wswg-page-builder-loading flex h-full flex-col items-center justify-center gap-4" }, [
4678
- (X(), o("svg", {
4769
+ t.loading || b.value ? Or(H.$slots, "loading", { key: 0 }, () => [
4770
+ i("div", { class: "wswg-page-builder-loading flex h-full flex-col items-center justify-center gap-4" }, [
4771
+ (o(), X("svg", {
4679
4772
  class: "mx-auto size-8 animate-spin text-blue-600",
4680
4773
  xmlns: "http://www.w3.org/2000/svg",
4681
4774
  fill: "none",
4682
4775
  viewBox: "0 0 24 24"
4683
4776
  }, [
4684
- c("circle", {
4777
+ i("circle", {
4685
4778
  class: "opacity-25",
4686
4779
  cx: "12",
4687
4780
  cy: "12",
@@ -4689,29 +4782,29 @@ const _n = /* @__PURE__ */ _({
4689
4782
  stroke: "currentColor",
4690
4783
  "stroke-width": "4"
4691
4784
  }),
4692
- c("path", {
4785
+ i("path", {
4693
4786
  class: "opacity-75",
4694
4787
  fill: "currentColor",
4695
4788
  d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
4696
4789
  })
4697
4790
  ])),
4698
- c("span", null, "Loading editor...")
4791
+ i("span", null, "Loading editor...")
4699
4792
  ])
4700
- ]) : (X(), o("div", {
4793
+ ]) : (o(), X("div", {
4701
4794
  key: 1,
4702
4795
  class: "wswg-page-builder-body"
4703
4796
  }, [
4704
- c("div", { class: "wswg-page-builder-preview overflow-y-auto" }, [
4705
- c("div", {
4797
+ i("div", { class: "wswg-page-builder-preview overflow-y-auto" }, [
4798
+ i("div", {
4706
4799
  id: "page-preview-container",
4707
4800
  class: I(["mx-auto flex flex-col overflow-hidden rounded-lg bg-white transition-all duration-300", { "w-full": r.value === "desktop", "w-96": r.value === "mobile" }]),
4708
4801
  style: { height: "-webkit-fill-available" }
4709
4802
  }, [
4710
- t.showBrowserBar ? (X(), ut(mn, {
4803
+ t.showBrowserBar ? (o(), ut(Vn, {
4711
4804
  key: 0,
4712
4805
  class: "browser-navigation-bar",
4713
4806
  url: t.url
4714
- }, null, 8, ["url"])) : B("", !0),
4807
+ }, null, 8, ["url"])) : R("", !0),
4715
4808
  h(tv, {
4716
4809
  ref_key: "previewRef",
4717
4810
  ref: P,
@@ -4724,34 +4817,34 @@ const _n = /* @__PURE__ */ _({
4724
4817
  settingsKey: t.settingsKey,
4725
4818
  settingsOpen: f.value,
4726
4819
  theme: t.theme,
4727
- onHoverBlock: y,
4728
- onClickBlock: T,
4729
- onBlockReorder: S,
4730
- onBlockAdd: N,
4731
- onClickPartial: H
4820
+ onHoverBlock: W,
4821
+ onClickBlock: A,
4822
+ onBlockReorder: y,
4823
+ onBlockAdd: O,
4824
+ onClickPartial: z
4732
4825
  }, null, 8, ["pageData", "activeBlock", "hoveredBlockId", "viewport", "editable", "blocksKey", "settingsKey", "settingsOpen", "theme"])
4733
4826
  ], 2)
4734
4827
  ]),
4735
- h(jf, { onSidebarWidth: i }),
4736
- c("div", {
4828
+ h(jf, { onSidebarWidth: c }),
4829
+ i("div", {
4737
4830
  id: "page-builder-sidebar",
4738
4831
  class: "page-builder-sidebar-wrapper bg-white",
4739
4832
  style: Lr({ width: d.value + "px" })
4740
4833
  }, [
4741
- h(Vn, {
4834
+ h(mn, {
4742
4835
  modelValue: p.value,
4743
- "onUpdate:modelValue": x[0] || (x[0] = (W) => p.value = W),
4836
+ "onUpdate:modelValue": L[0] || (L[0] = (w) => p.value = w),
4744
4837
  activeBlock: v.value,
4745
- "onUpdate:activeBlock": x[1] || (x[1] = (W) => v.value = W),
4838
+ "onUpdate:activeBlock": L[1] || (L[1] = (w) => v.value = w),
4746
4839
  hoveredBlockId: a.value,
4747
- "onUpdate:hoveredBlockId": x[2] || (x[2] = (W) => a.value = W),
4840
+ "onUpdate:hoveredBlockId": L[2] || (L[2] = (w) => a.value = w),
4748
4841
  showPageSettings: f.value,
4749
- "onUpdate:showPageSettings": x[3] || (x[3] = (W) => f.value = W),
4842
+ "onUpdate:showPageSettings": L[3] || (L[3] = (w) => f.value = w),
4750
4843
  showAddBlockMenu: n.value,
4751
- "onUpdate:showAddBlockMenu": x[4] || (x[4] = (W) => n.value = W),
4844
+ "onUpdate:showAddBlockMenu": L[4] || (L[4] = (w) => n.value = w),
4752
4845
  editorViewport: r.value,
4753
- "onUpdate:editorViewport": x[5] || (x[5] = (W) => r.value = W),
4754
- hasPageSettings: A.value,
4846
+ "onUpdate:editorViewport": L[5] || (L[5] = (w) => r.value = w),
4847
+ hasPageSettings: s.value,
4755
4848
  editable: t.editable,
4756
4849
  blocksKey: t.blocksKey,
4757
4850
  settingsKey: t.settingsKey,
@@ -4781,40 +4874,40 @@ const _n = /* @__PURE__ */ _({
4781
4874
  return [u(l, "top"), u(a, "bottom")].join(" ");
4782
4875
  }
4783
4876
  return $t(async () => {
4784
- r.value = !1, await Ve(e.theme, !1), r.value = !0;
4785
- }), (v, l) => (X(), o("div", {
4877
+ r.value = !1, await me(e.theme, !1), r.value = !0;
4878
+ }), (v, l) => (o(), X("div", {
4786
4879
  id: "page-viewport",
4787
4880
  class: "page-renderer-wrapper relative"
4788
4881
  }, [
4789
- r.value ? (X(), o(tt, { key: 0 }, [
4790
- t.withLayout && f.value ? (X(), ut(Yt(f.value), kt({ key: 0 }, t.settings, { blocks: t.blocks }), {
4882
+ r.value ? (o(), X(tt, { key: 0 }, [
4883
+ t.withLayout && f.value ? (o(), ut(Yt(f.value), kt({ key: 0 }, t.settings, { blocks: t.blocks }), {
4791
4884
  default: xr(() => [
4792
- c("div", { id: "page-blocks-wrapper" }, [
4793
- (X(!0), o(tt, null, nt(t.blocks, (a) => (X(), o("div", {
4885
+ i("div", { id: "page-blocks-wrapper" }, [
4886
+ (o(!0), X(tt, null, nt(t.blocks, (a) => (o(), X("div", {
4794
4887
  key: a.id,
4795
4888
  class: I(["block-wrapper", { [n(a)]: !0 }])
4796
4889
  }, [
4797
- (X(), ut(Yt(G(Ut)(a.type)), kt({ ref_for: !0 }, a, {
4890
+ (o(), ut(Yt(G(Ut)(a.type)), kt({ ref_for: !0 }, a, {
4798
4891
  key: `block-${a.id}`
4799
4892
  }), null, 16))
4800
4893
  ], 2))), 128))
4801
4894
  ])
4802
4895
  ]),
4803
4896
  _: 1
4804
- }, 16, ["blocks"])) : (X(), o("div", {
4897
+ }, 16, ["blocks"])) : (o(), X("div", {
4805
4898
  key: 1,
4806
4899
  id: "page-blocks-wrapper"
4807
4900
  }, [
4808
- (X(!0), o(tt, null, nt(t.blocks, (a) => (X(), o("div", {
4901
+ (o(!0), X(tt, null, nt(t.blocks, (a) => (o(), X("div", {
4809
4902
  key: a.id,
4810
4903
  class: I(["block-wrapper", { [n(a)]: !0 }])
4811
4904
  }, [
4812
- (X(), ut(Yt(G(Ut)(a.type)), kt({ ref_for: !0 }, a, {
4905
+ (o(), ut(Yt(G(Ut)(a.type)), kt({ ref_for: !0 }, a, {
4813
4906
  key: `block-${a.id}`
4814
4907
  }), null, 16))
4815
4908
  ], 2))), 128))
4816
4909
  ]))
4817
- ], 64)) : B("", !0)
4910
+ ], 64)) : R("", !0)
4818
4911
  ]));
4819
4912
  }
4820
4913
  });