@rulecms/widget-vue 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,32 +1,32 @@
1
- var He = Object.defineProperty;
2
- var Ge = (e, t, n) => t in e ? He(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var me = (e, t, n) => Ge(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { defineComponent as D, reactive as ze, watch as De, provide as Ye, renderSlot as se, computed as m, openBlock as y, createElementBlock as b, normalizeStyle as S, normalizeClass as B, createBlock as A, resolveDynamicComponent as R, withCtx as F, createTextVNode as ie, toDisplayString as Y, createCommentVNode as W, Fragment as I, normalizeProps as Z, guardReactiveProps as ge, mergeProps as qe, resolveComponent as Xe, renderList as z, createVNode as ne, createElementVNode as $, ref as j, onMounted as Ze, onBeforeUnmount as xe, inject as Je, unref as T } from "vue";
5
- const V = "default";
6
- function Te(e, t) {
7
- return !(e != null && e.length) || e === V ? t : `${e}/${t}`;
1
+ var Qe = Object.defineProperty;
2
+ var et = (e, t, n) => t in e ? Qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var be = (e, t, n) => et(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { defineComponent as D, reactive as tt, watch as Le, provide as nt, renderSlot as re, computed as h, openBlock as y, createElementBlock as b, normalizeStyle as S, normalizeClass as K, createBlock as C, resolveDynamicComponent as W, withCtx as M, createTextVNode as le, toDisplayString as q, createCommentVNode as N, Fragment as A, normalizeProps as J, guardReactiveProps as we, mergeProps as ot, resolveComponent as st, createVNode as U, renderList as R, createElementVNode as $, ref as V, onMounted as it, onBeforeUnmount as $e, inject as rt, unref as x } from "vue";
5
+ const H = "default";
6
+ function Re(e, t) {
7
+ return !(e != null && e.length) || e === H ? t : `${e}/${t}`;
8
8
  }
9
- const Qe = `RuleCMS widget: this widget config uses components from the default component library, but no "default" library is registered. The default library is registered by the consumer app: add the RuleCMS default source components package as a direct dependency and register it, e.g. libraries: { default: sourceComponentsModule } (statically imported for SSR) or libraries: { default: () => import('<default source components package>') }. See the @rulecms/widget-vue README.`;
10
- function he(e) {
9
+ const lt = `RuleCMS widget: this widget config uses components from the default component library, but no "default" library is registered. The default library is registered by the consumer app: add the RuleCMS default source components package as a direct dependency and register it, e.g. libraries: { default: sourceComponentsModule } (statically imported for SSR) or libraries: { default: () => import('<default source components package>') }. See the @rulecms/widget-vue README.`;
10
+ function Ce(e) {
11
11
  if (!e || typeof e != "object")
12
12
  return !1;
13
13
  const t = e;
14
14
  return !!t.manifest && typeof t.manifest == "object" && !!t.components && typeof t.components == "object" && !Array.isArray(t.components);
15
15
  }
16
- function et(e) {
17
- if (he(e))
16
+ function ct(e) {
17
+ if (Ce(e))
18
18
  return e;
19
19
  const t = e;
20
- return he(t == null ? void 0 : t.default) ? t.default : null;
20
+ return Ce(t == null ? void 0 : t.default) ? t.default : null;
21
21
  }
22
- function J(e) {
23
- return e.usesDefaultLibrary ? [V, ...e.libraryIds] : [...e.libraryIds];
22
+ function Q(e) {
23
+ return e.usesDefaultLibrary ? [H, ...e.libraryIds] : [...e.libraryIds];
24
24
  }
25
- function be({ registrations: e, referenced: t }) {
26
- if (t.usesDefaultLibrary && !(e != null && e[V]))
27
- throw new Error(Qe);
25
+ function ve({ registrations: e, referenced: t }) {
26
+ if (t.usesDefaultLibrary && !(e != null && e[H]))
27
+ throw new Error(lt);
28
28
  }
29
- function tt(e) {
29
+ function at(e) {
30
30
  const t = [], n = /* @__PURE__ */ new Set();
31
31
  for (const o of e.values()) {
32
32
  if (typeof o.stylesheet != "string")
@@ -36,109 +36,109 @@ function tt(e) {
36
36
  }
37
37
  return t.length > 0 ? t : void 0;
38
38
  }
39
- function nt(e) {
39
+ function ut(e) {
40
40
  const t = {};
41
41
  for (const [o, s] of e) {
42
- const i = o === V;
43
- for (const [c, d] of Object.entries(s.components))
44
- t[i ? c : `${o}/${c}`] = d;
42
+ const i = o === H;
43
+ for (const [r, f] of Object.entries(s.components))
44
+ t[i ? r : `${o}/${r}`] = f;
45
45
  }
46
- const n = tt(e);
46
+ const n = at(e);
47
47
  return n ? { components: t, stylesheets: n } : { components: t };
48
48
  }
49
- function q() {
49
+ function X() {
50
50
  const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
51
51
  let s = 0;
52
- function i(r, l) {
53
- var f;
54
- e.get(r) !== l && ((f = l.manifest) != null && f.id && l.manifest.id !== r && console.warn(
55
- `RuleCMS widget: component library registered as "${r}" declares manifest id "${l.manifest.id}". The registered id wins for resolution.`
56
- ), e.set(r, l), s += 1);
52
+ function i(c, a) {
53
+ var u;
54
+ e.get(c) !== a && ((u = a.manifest) != null && u.id && a.manifest.id !== c && console.warn(
55
+ `RuleCMS widget: component library registered as "${c}" declares manifest id "${a.manifest.id}". The registered id wins for resolution.`
56
+ ), e.set(c, a), s += 1);
57
57
  }
58
- function c(r) {
59
- const l = J(r), f = [...l].sort().join("|"), u = o.get(f);
60
- if (u && u.loadedVersion === s)
61
- return u.plugin;
62
- const p = /* @__PURE__ */ new Map();
63
- for (const g of l) {
64
- const v = e.get(g);
65
- v && p.set(g, v);
58
+ function r(c) {
59
+ const a = Q(c), u = [...a].sort().join("|"), d = o.get(u);
60
+ if (d && d.loadedVersion === s)
61
+ return d.plugin;
62
+ const l = /* @__PURE__ */ new Map();
63
+ for (const p of a) {
64
+ const I = e.get(p);
65
+ I && l.set(p, I);
66
66
  }
67
- const h = nt(p);
68
- return o.set(f, { loadedVersion: s, plugin: h }), h;
67
+ const g = ut(l);
68
+ return o.set(u, { loadedVersion: s, plugin: g }), g;
69
69
  }
70
- function d(r) {
71
- be(r);
72
- const { registrations: l, referenced: f } = r;
73
- for (const u of J(f)) {
74
- if (e.has(u) || n.has(u))
70
+ function f(c) {
71
+ ve(c);
72
+ const { registrations: a, referenced: u } = c;
73
+ for (const d of Q(u)) {
74
+ if (e.has(d) || n.has(d))
75
75
  continue;
76
- const p = l == null ? void 0 : l[u];
77
- if (!p) {
76
+ const l = a == null ? void 0 : a[d];
77
+ if (!l) {
78
78
  console.error(
79
- `RuleCMS widget: no component library registered for libraryId "${u}"; its components will not render.`
80
- ), n.set(u, new Error(`No registration for libraryId "${u}"`));
79
+ `RuleCMS widget: no component library registered for libraryId "${d}"; its components will not render.`
80
+ ), n.set(d, new Error(`No registration for libraryId "${d}"`));
81
81
  continue;
82
82
  }
83
- if (typeof p == "function")
83
+ if (typeof l == "function")
84
84
  return null;
85
- i(u, p);
85
+ i(d, l);
86
86
  }
87
- return c(f);
87
+ return r(u);
88
88
  }
89
- async function a(r) {
90
- be(r);
91
- const { registrations: l, referenced: f } = r, u = J(f);
89
+ async function m(c) {
90
+ ve(c);
91
+ const { registrations: a, referenced: u } = c, d = Q(u);
92
92
  return await Promise.all(
93
- u.map(async (p) => {
94
- if (e.has(p) || n.has(p))
93
+ d.map(async (l) => {
94
+ if (e.has(l) || n.has(l))
95
95
  return;
96
- const h = l == null ? void 0 : l[p];
97
- if (!h) {
96
+ const g = a == null ? void 0 : a[l];
97
+ if (!g) {
98
98
  console.error(
99
- `RuleCMS widget: no component library registered for libraryId "${p}"; its components will not render.`
100
- ), n.set(p, new Error(`No registration for libraryId "${p}"`));
99
+ `RuleCMS widget: no component library registered for libraryId "${l}"; its components will not render.`
100
+ ), n.set(l, new Error(`No registration for libraryId "${l}"`));
101
101
  return;
102
102
  }
103
- if (typeof h != "function") {
104
- i(p, h);
103
+ if (typeof g != "function") {
104
+ i(l, g);
105
105
  return;
106
106
  }
107
- let g = t.get(p);
108
- g || (g = h().then((v) => {
109
- const C = et(v);
110
- if (!C)
107
+ let p = t.get(l);
108
+ p || (p = g().then((I) => {
109
+ const v = ct(I);
110
+ if (!v)
111
111
  throw new Error(
112
- `Registration for libraryId "${p}" did not resolve to a ComponentLibraryModule (expected { manifest, components }).`
112
+ `Registration for libraryId "${l}" did not resolve to a ComponentLibraryModule (expected { manifest, components }).`
113
113
  );
114
- i(p, C);
115
- }).catch((v) => {
116
- n.set(p, v), console.error(
117
- `RuleCMS widget: failed to load component library "${p}":`,
118
- v
114
+ i(l, v);
115
+ }).catch((I) => {
116
+ n.set(l, I), console.error(
117
+ `RuleCMS widget: failed to load component library "${l}":`,
118
+ I
119
119
  );
120
120
  }).finally(() => {
121
- t.delete(p);
122
- }), t.set(p, g)), await g;
121
+ t.delete(l);
122
+ }), t.set(l, p)), await p;
123
123
  })
124
- ), c(f);
124
+ ), r(u);
125
125
  }
126
- return { resolveSync: d, resolve: a };
126
+ return { resolveSync: f, resolve: m };
127
127
  }
128
- const Po = {
128
+ const Ko = {
129
129
  Preview: "Preview",
130
130
  Compose: "Compose",
131
131
  RenderedPage: "RenderedPage"
132
- }, re = {
132
+ }, ce = {
133
133
  DroppableBox: "droppable-box"
134
- }, we = {
134
+ }, Ae = {
135
135
  FlexStart: "flex-start",
136
136
  FlexEnd: "flex-end",
137
137
  Center: "center",
138
138
  SpaceBetween: "space-between",
139
139
  SpaceAround: "space-around",
140
140
  SpaceEvenly: "space-evenly"
141
- }, Eo = {
141
+ }, Uo = {
142
142
  FlexStart: "flex-start",
143
143
  FlexEnd: "flex-end",
144
144
  Center: "center",
@@ -146,49 +146,49 @@ const Po = {
146
146
  SpaceAround: "space-around",
147
147
  SpaceEvenly: "space-evenly",
148
148
  Stretch: "stretch"
149
- }, Q = "cssAttrArray", $o = {
149
+ }, oe = "cssAttrArray", Ho = {
150
150
  Phone: "phone",
151
151
  Tablet: "tablet",
152
152
  Desktop: "desktop"
153
- }, Pe = {
153
+ }, Me = {
154
154
  ComposerComponent: "ComposerWidget",
155
155
  Collection: "Collection",
156
156
  MoveComponentHandle: "MoveWidgetHandle"
157
- }, Ee = `${Pe.Collection}_`, ot = "dev.", st = "https://rulecms.com", it = "https://widget-cache.rulecms.com", rt = "/api/v1/c/widget/get", lt = "/api/v1/c/dev/widget/get";
158
- function L(e) {
159
- return typeof e == "string" && e.startsWith(ot);
157
+ }, Ne = `${Me.Collection}_`, dt = "dev.", pt = "https://rulecms.com", ft = "https://widget-cache.rulecms.com", yt = "/api/v1/c/widget/get", mt = "/api/v1/c/dev/widget/get";
158
+ function O(e) {
159
+ return typeof e == "string" && e.startsWith(dt);
160
160
  }
161
- function ct(e, t) {
162
- return t ? t.replace(/\/$/, "") : L(e) ? st : it;
161
+ function gt(e, t) {
162
+ return t ? t.replace(/\/$/, "") : O(e) ? pt : ft;
163
163
  }
164
- function $e({
164
+ function We({
165
165
  publishedKey: e,
166
166
  token: t,
167
167
  endpoint: n
168
168
  }) {
169
- const o = L(t), s = o ? lt : rt, i = o ? new URLSearchParams({ widgetKey: e, token: t }) : new URLSearchParams({ publishedKey: e, token: t });
170
- return `${ct(t, n)}${s}?${i.toString()}`;
169
+ const o = O(t), s = o ? mt : yt, i = o ? new URLSearchParams({ widgetKey: e, token: t }) : new URLSearchParams({ publishedKey: e, token: t });
170
+ return `${gt(t, n)}${s}?${i.toString()}`;
171
171
  }
172
- const Ro = ({ id: e, prefix: t }) => `${t}_${e}`, at = (e) => {
172
+ const zo = ({ id: e, prefix: t }) => `${t}_${e}`, ht = (e) => {
173
173
  if (!(e != null && e.length) || !e.includes("_")) {
174
174
  console.error(`Invalid drag item id: ${e}. Type does not exist.`);
175
175
  return;
176
176
  }
177
- return ut(e);
178
- }, Re = (e) => e.includes("_"), ut = (e) => {
177
+ return bt(e);
178
+ }, Oe = (e) => e.includes("_"), bt = (e) => {
179
179
  const t = e.indexOf("_"), n = e.substring(0, t), o = e.substring(t + 1);
180
180
  return {
181
181
  prefix: n,
182
182
  id: o
183
183
  };
184
- }, Le = (e) => {
185
- if (!Re(e))
184
+ }, je = (e) => {
185
+ if (!Oe(e))
186
186
  return;
187
- const n = at(e);
188
- return (n == null ? void 0 : n.prefix) === Pe.Collection || console.error(
187
+ const n = ht(e);
188
+ return (n == null ? void 0 : n.prefix) === Me.Collection || console.error(
189
189
  "getCollectionIdForCollectionType - Invalid component type: ${componentType}. Invalid prefix type."
190
190
  ), n == null ? void 0 : n.id;
191
- }, Lo = (e) => {
191
+ }, Go = (e) => {
192
192
  if (!(e != null && e.length)) {
193
193
  console.error("getNameAndInstanceIdFromWidgetKey: Missing widget key");
194
194
  return;
@@ -203,47 +203,47 @@ const Ro = ({ id: e, prefix: t }) => `${t}_${e}`, at = (e) => {
203
203
  return { name: n, instanceId: t[1] };
204
204
  const s = t[1].split("@");
205
205
  return { name: n, instanceId: s[0], parentId: s[1] };
206
- }, Mo = (e) => {
206
+ }, _o = (e) => {
207
207
  if (!(e != null && e.length))
208
208
  return { errorMessage: "getNameFromWidgetKey: Missing widget key" };
209
209
  const t = e.split("$");
210
210
  return t.length < 2 ? { errorMessage: "getNameFromWidgetKey: Invalid widget key format" } : { name: t[0] };
211
- }, dt = (e) => {
212
- var s, i, c, d;
211
+ }, wt = (e) => {
212
+ var s, i, r, f;
213
213
  if (!e)
214
214
  return { error: "getWidgetKeyForCollection: Missing collection" };
215
215
  if (!((s = e.name) != null && s.length))
216
216
  return { error: "getWidgetKeyForCollection: Missing collection name" };
217
217
  const t = (i = e.name) == null ? void 0 : i.trim().toLowerCase();
218
- if (!((c = e.id) != null && c.length))
218
+ if (!((r = e.id) != null && r.length))
219
219
  return { error: "getWidgetKeyForCollection: Missing collection id" };
220
- const o = ((d = e.parentId) == null ? void 0 : d.length) ? `${e.id}@${e.parentId}` : `${e.id}`;
220
+ const o = ((f = e.parentId) == null ? void 0 : f.length) ? `${e.id}@${e.parentId}` : `${e.id}`;
221
221
  return { data: `${t}$${o}` };
222
- }, pt = (e) => {
223
- var s, i, c, d;
222
+ }, Ct = (e) => {
223
+ var s, i, r, f;
224
224
  if (!e)
225
225
  return { error: "getWidgetKeyForPublishedCollection: Missing collection" };
226
226
  if (!((s = e.name) != null && s.length))
227
227
  return { error: "getWidgetKeyForPublishedCollection: Missing collection name" };
228
228
  const t = (i = e.name) == null ? void 0 : i.trim().toLowerCase();
229
- if (!((c = e.publishedKey) != null && c.length))
229
+ if (!((r = e.publishedKey) != null && r.length))
230
230
  return { error: "getWidgetKeyForPublishedCollection: Missing collection publishedKey" };
231
- const o = ((d = e.parentId) == null ? void 0 : d.length) ? `${e.publishedKey}@${e.parentId}` : `${e.publishedKey}`;
231
+ const o = ((f = e.parentId) == null ? void 0 : f.length) ? `${e.publishedKey}@${e.parentId}` : `${e.publishedKey}`;
232
232
  return { data: `${t}$${o}` };
233
- }, No = (e) => {
234
- const t = dt(e);
235
- return `${Ee}${t.data}`;
236
- }, Wo = (e) => {
237
- const t = pt(e);
238
- return `${Ee}${t.data}`;
239
- }, ft = "---", yt = "___";
240
- function mt(e, t) {
241
- return `${e}${ft}${t}`;
233
+ }, Yo = (e) => {
234
+ const t = wt(e);
235
+ return `${Ne}${t.data}`;
236
+ }, qo = (e) => {
237
+ const t = Ct(e);
238
+ return `${Ne}${t.data}`;
239
+ }, vt = "---", At = "___";
240
+ function It(e, t) {
241
+ return `${e}${vt}${t}`;
242
242
  }
243
- function _o(e, t, n) {
244
- return `${mt(e, t)}${yt}${n}`;
243
+ function Xo(e, t, n) {
244
+ return `${It(e, t)}${At}${n}`;
245
245
  }
246
- function Oo(e) {
246
+ function Zo(e) {
247
247
  const t = e.split(".");
248
248
  if (t.length !== 3)
249
249
  throw new Error(`Invalid version format: ${e}. Expected format: x.y.z`);
@@ -252,19 +252,19 @@ function Oo(e) {
252
252
  throw new Error(`Invalid patch version: ${t[2]}. Expected a number.`);
253
253
  return `${n}.${o}.${s + 1}`;
254
254
  }
255
- function le({
255
+ function ae({
256
256
  displayItemList: e,
257
257
  widgetCollections: t
258
258
  }) {
259
259
  const n = /* @__PURE__ */ new Set();
260
260
  let o = !1;
261
261
  const s = (i) => {
262
- var c, d, a;
263
- if ((c = i == null ? void 0 : i.rows) != null && c.length) {
264
- for (const r of i.rows)
265
- if ((d = r == null ? void 0 : r.columns) != null && d.length)
266
- for (const l of r.columns)
267
- l.collection && s(l.collection.collectionRows), !(!l.type || l.type === re.DroppableBox) && (Re(l.type) || (!((a = l.libraryId) != null && a.length) || l.libraryId === V ? o = !0 : n.add(l.libraryId)));
262
+ var r, f, m;
263
+ if ((r = i == null ? void 0 : i.rows) != null && r.length) {
264
+ for (const c of i.rows)
265
+ if ((f = c == null ? void 0 : c.columns) != null && f.length)
266
+ for (const a of c.columns)
267
+ a.collection && s(a.collection.collectionRows), !(!a.type || a.type === ce.DroppableBox) && (Oe(a.type) || (!((m = a.libraryId) != null && m.length) || a.libraryId === H ? o = !0 : n.add(a.libraryId)));
268
268
  }
269
269
  };
270
270
  s(e);
@@ -272,16 +272,16 @@ function le({
272
272
  s(i == null ? void 0 : i.collectionRows);
273
273
  return { libraryIds: Array.from(n), usesDefaultLibrary: o };
274
274
  }
275
- const Me = Symbol("rulecms-widget-context");
276
- function gt() {
275
+ const Be = Symbol("rulecms-widget-context");
276
+ function St() {
277
277
  return {
278
278
  token: "",
279
279
  endpoint: void 0,
280
280
  libraries: void 0,
281
- libraryRegistry: q()
281
+ libraryRegistry: X()
282
282
  };
283
283
  }
284
- const jo = /* @__PURE__ */ D({
284
+ const Jo = /* @__PURE__ */ D({
285
285
  __name: "RuleCMSWidgetProvider",
286
286
  props: {
287
287
  token: {},
@@ -289,97 +289,97 @@ const jo = /* @__PURE__ */ D({
289
289
  libraries: {}
290
290
  },
291
291
  setup(e) {
292
- const t = e, n = ze(gt());
293
- return De(
292
+ const t = e, n = tt(St());
293
+ return Le(
294
294
  () => [t.token, t.endpoint, t.libraries],
295
295
  () => {
296
296
  n.token = t.token, n.endpoint = t.endpoint, n.libraries = t.libraries;
297
297
  },
298
298
  { immediate: !0 }
299
- ), Ye(Me, n), (o, s) => se(o.$slots, "default");
299
+ ), nt(Be, n), (o, s) => re(o.$slots, "default");
300
300
  }
301
- }), ht = "1200px", Ne = "500px", We = "820px", Bo = ht, bt = "rulecms", wt = 1920, Ct = {
301
+ }), kt = "1200px", Fe = "500px", Ve = "820px", Qo = kt, Dt = "rulecms", Tt = 1920, xt = {
302
302
  f: "auto",
303
303
  q: "auto",
304
304
  c: "limit"
305
- }, vt = /^[A-Za-z0-9][A-Za-z0-9._\-/]*$/, At = 300, St = /^[A-Za-z0-9][A-Za-z0-9_-]*$/, It = 100, kt = /^https:\/\/[^\s"'()\\<>]+$/, Dt = 2e3, xt = /^[A-Za-z0-9_,.:\-/]*$/, Tt = 300, Pt = (e) => typeof e == "string" && e.length <= At && vt.test(e), Et = (e) => typeof e == "string" && e.length <= It && St.test(e), $t = (e) => typeof e == "string" && e.length <= Dt && kt.test(e), Rt = (e) => typeof e == "string" && e.length <= Tt && xt.test(e), Lt = (e) => Object.entries(e).map(([t, n]) => `${t}_${n}`).join(","), Mt = (e) => {
305
+ }, Et = /^[A-Za-z0-9][A-Za-z0-9._\-/]*$/, Pt = 300, Lt = /^[A-Za-z0-9][A-Za-z0-9_-]*$/, $t = 100, Rt = /^https:\/\/[^\s"'()\\<>]+$/, Mt = 2e3, Nt = /^[A-Za-z0-9_,.:\-/]*$/, Wt = 300, Ot = (e) => typeof e == "string" && e.length <= Pt && Et.test(e), jt = (e) => typeof e == "string" && e.length <= $t && Lt.test(e), Bt = (e) => typeof e == "string" && e.length <= Mt && Rt.test(e), Ft = (e) => typeof e == "string" && e.length <= Wt && Nt.test(e), Vt = (e) => Object.entries(e).map(([t, n]) => `${t}_${n}`).join(","), Kt = (e) => {
306
306
  const t = {};
307
307
  for (const n of e.split(",")) {
308
308
  const o = n.trim(), s = o.indexOf("_");
309
309
  s <= 0 || (t[o.slice(0, s)] = o.slice(s + 1));
310
310
  }
311
311
  return t;
312
- }, Nt = ({
312
+ }, Ut = ({
313
313
  publicId: e,
314
- cloudName: t = bt,
314
+ cloudName: t = Dt,
315
315
  transformations: n,
316
- width: o = wt
316
+ width: o = Tt
317
317
  }) => {
318
- const s = typeof n == "string" ? Mt(n) : n, i = {
319
- ...Ct,
318
+ const s = typeof n == "string" ? Kt(n) : n, i = {
319
+ ...xt,
320
320
  ...s,
321
321
  w: o
322
322
  };
323
323
  return encodeURI(
324
- `https://res.cloudinary.com/${t}/image/upload/${Lt(i)}/${e}`
324
+ `https://res.cloudinary.com/${t}/image/upload/${Vt(i)}/${e}`
325
325
  );
326
- }, Wt = /^--[A-Za-z0-9_-]+$/, _t = 200, _e = (e) => {
326
+ }, Ht = /^--[A-Za-z0-9_-]+$/, zt = 200, Ke = (e) => {
327
327
  if (typeof e != "string")
328
328
  return !1;
329
329
  const t = e.trim();
330
- return t.length <= _t && Wt.test(t);
330
+ return t.length <= zt && Ht.test(t);
331
331
  }, k = (e) => `var(${e.trim()})`, w = (e) => {
332
332
  if (typeof e != "object" || e === null || Array.isArray(e))
333
333
  return;
334
334
  const t = e.cssVariable;
335
335
  if (t != null)
336
- return _e(t) ? t.trim() : void 0;
337
- }, P = (e) => {
336
+ return Ke(t) ? t.trim() : void 0;
337
+ }, E = (e) => {
338
338
  if (typeof e != "object" || e === null || Array.isArray(e))
339
339
  return !1;
340
340
  const t = e.cssVariable;
341
- return t == null ? !1 : !_e(t);
342
- }, Fo = (e, t) => {
341
+ return t == null ? !1 : !Ke(t);
342
+ }, es = (e, t) => {
343
343
  const n = w(e);
344
344
  return n ? { [t]: k(n) } : void 0;
345
- }, Ot = (e) => {
346
- if (typeof e != "object" || e === null || Array.isArray(e) || P(e))
345
+ }, Gt = (e) => {
346
+ if (typeof e != "object" || e === null || Array.isArray(e) || E(e))
347
347
  return !1;
348
348
  if (w(e))
349
349
  return !0;
350
350
  const t = e;
351
- return t.source === "none" ? !0 : t.source === "url" ? $t(t.url) : t.source === "cloudinary" ? !Pt(t.publicId) || t.cloudName !== void 0 && t.cloudName !== null && !Et(t.cloudName) ? !1 : t.transformations === void 0 || t.transformations === null || Rt(t.transformations) : !1;
352
- }, jt = ["px", "%", "em", "rem", "vh", "vw"], ce = ["inherit", "unset"], Bt = ["allSides", "top", "right", "bottom", "left"], M = (e, t = {}) => {
351
+ return t.source === "none" ? !0 : t.source === "url" ? Bt(t.url) : t.source === "cloudinary" ? !Ot(t.publicId) || t.cloudName !== void 0 && t.cloudName !== null && !jt(t.cloudName) ? !1 : t.transformations === void 0 || t.transformations === null || Ft(t.transformations) : !1;
352
+ }, _t = ["px", "%", "em", "rem", "vh", "vw"], ue = ["inherit", "unset"], Yt = ["allSides", "top", "right", "bottom", "left"], j = (e, t = {}) => {
353
353
  if (typeof e != "object" || e === null || Array.isArray(e))
354
354
  return !1;
355
355
  const n = e;
356
- return P(e) ? !1 : w(e) ? !0 : n.unit === "auto" ? t.allowAuto !== !1 : n.unit === "keyword" ? t.allowKeywords !== !1 && ce.includes(n.keyword) : jt.includes(n.unit) ? typeof n.value != "number" || !Number.isFinite(n.value) ? !1 : t.allowNegative !== !1 || n.value >= 0 : !1;
357
- }, Ft = (e, t = {}) => {
356
+ return E(e) ? !1 : w(e) ? !0 : n.unit === "auto" ? t.allowAuto !== !1 : n.unit === "keyword" ? t.allowKeywords !== !1 && ue.includes(n.keyword) : _t.includes(n.unit) ? typeof n.value != "number" || !Number.isFinite(n.value) ? !1 : t.allowNegative !== !1 || n.value >= 0 : !1;
357
+ }, qt = (e, t = {}) => {
358
358
  if (typeof e != "object" || e === null || Array.isArray(e))
359
359
  return !1;
360
360
  const n = e;
361
- for (const o of Bt) {
361
+ for (const o of Yt) {
362
362
  const s = n[o];
363
- if (s != null && !M(s, t))
363
+ if (s != null && !j(s, t))
364
364
  return !1;
365
365
  }
366
366
  return !0;
367
- }, Vt = [...ce, "transparent", "currentColor"], Kt = /^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\([^)]+\)|hsla?\([^)]+\))$/, ae = (e) => {
367
+ }, Xt = [...ue, "transparent", "currentColor"], Zt = /^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\([^)]+\)|hsla?\([^)]+\))$/, de = (e) => {
368
368
  if (typeof e != "object" || e === null || Array.isArray(e))
369
369
  return !1;
370
370
  const t = e;
371
- return P(e) ? !1 : w(e) ? !0 : t.unit === "keyword" ? Vt.includes(t.keyword) : t.unit === "color" ? typeof t.value == "string" && Kt.test(t.value.trim()) : !1;
372
- }, ue = (e) => {
371
+ return E(e) ? !1 : w(e) ? !0 : t.unit === "keyword" ? Xt.includes(t.keyword) : t.unit === "color" ? typeof t.value == "string" && Zt.test(t.value.trim()) : !1;
372
+ }, pe = (e) => {
373
373
  const t = w(e);
374
374
  return t ? k(t) : "unit" in e ? e.unit === "keyword" ? e.keyword : e.value.trim() : "";
375
- }, Ut = (e, t) => typeof e == "object" && e !== null && !Array.isArray(e) ? !P(e) && !!w(e) : typeof e != "string" || !e.length ? !1 : t.includes(e) ? !0 : ce.includes(e), Ht = [
375
+ }, Jt = (e, t) => typeof e == "object" && e !== null && !Array.isArray(e) ? !E(e) && !!w(e) : typeof e != "string" || !e.length ? !1 : t.includes(e) ? !0 : ue.includes(e), Qt = [
376
376
  'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
377
377
  'Georgia, "Times New Roman", Times, serif',
378
378
  "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",
379
379
  "Arial, Helvetica, sans-serif",
380
380
  '"Helvetica Neue", Helvetica, Arial, sans-serif',
381
381
  "Verdana, Geneva, sans-serif"
382
- ], Gt = [
382
+ ], en = [
383
383
  "normal",
384
384
  "bold",
385
385
  "100",
@@ -391,19 +391,19 @@ const jo = /* @__PURE__ */ D({
391
391
  "700",
392
392
  "800",
393
393
  "900"
394
- ], zt = ["normal", "italic", "oblique"], Yt = [
394
+ ], tn = ["normal", "italic", "oblique"], nn = [
395
395
  "left",
396
396
  "center",
397
397
  "right",
398
398
  "justify",
399
399
  "start",
400
400
  "end"
401
- ], qt = [
401
+ ], on = [
402
402
  "none",
403
403
  "underline",
404
404
  "line-through",
405
405
  "overline"
406
- ], Xt = [
406
+ ], sn = [
407
407
  "none",
408
408
  "uppercase",
409
409
  "lowercase",
@@ -414,20 +414,20 @@ const jo = /* @__PURE__ */ D({
414
414
  "scroll",
415
415
  "auto",
416
416
  "clip"
417
- ], Zt = [
417
+ ], rn = ["auto", "none"], ln = [
418
418
  "flex-start",
419
419
  "flex-end",
420
420
  "center",
421
421
  "space-between",
422
422
  "space-around",
423
423
  "space-evenly"
424
- ], Jt = [
424
+ ], cn = [
425
425
  "flex-start",
426
426
  "flex-end",
427
427
  "center",
428
428
  "baseline",
429
429
  "stretch"
430
- ], Qt = ["wrap", "nowrap"], en = [
430
+ ], an = ["wrap", "nowrap"], un = [
431
431
  "flex-start",
432
432
  "flex-end",
433
433
  "center",
@@ -435,12 +435,12 @@ const jo = /* @__PURE__ */ D({
435
435
  "space-around",
436
436
  "space-evenly",
437
437
  "stretch"
438
- ], tn = [
438
+ ], dn = [
439
439
  "row",
440
440
  "row-reverse",
441
441
  "column",
442
442
  "column-reverse"
443
- ], nn = ["cover", "contain", "auto"], on = [
443
+ ], pn = ["cover", "contain", "auto"], fn = [
444
444
  "center center",
445
445
  "center top",
446
446
  "center bottom",
@@ -450,20 +450,20 @@ const jo = /* @__PURE__ */ D({
450
450
  "right center",
451
451
  "right top",
452
452
  "right bottom"
453
- ], sn = [
453
+ ], yn = [
454
454
  "no-repeat",
455
455
  "repeat",
456
456
  "repeat-x",
457
457
  "repeat-y",
458
458
  "space",
459
459
  "round"
460
- ], rn = [
460
+ ], mn = [
461
461
  "justifyContent",
462
462
  "alignItems",
463
463
  "flexWrap",
464
464
  "alignContent",
465
465
  "flexDirection"
466
- ], ln = [
466
+ ], gn = [
467
467
  "none",
468
468
  "solid",
469
469
  "dashed",
@@ -473,107 +473,107 @@ const jo = /* @__PURE__ */ D({
473
473
  "ridge",
474
474
  "inset",
475
475
  "outset"
476
- ], cn = (e) => typeof e == "object" && e !== null && !Array.isArray(e) ? !P(e) && !!w(e) : ln.includes(e), an = (e) => {
476
+ ], hn = (e) => typeof e == "object" && e !== null && !Array.isArray(e) ? !E(e) && !!w(e) : gn.includes(e), bn = (e) => {
477
477
  if (typeof e != "object" || e === null || Array.isArray(e))
478
478
  return !1;
479
479
  const t = e;
480
- return P(e) ? !1 : w(e) ? !0 : !(t.width !== void 0 && t.width !== null && !M(t.width, { allowAuto: !1, allowNegative: !1 }) || t.style !== void 0 && t.style !== null && !cn(t.style) || t.color !== void 0 && t.color !== null && !ae(t.color));
481
- }, un = {
480
+ return E(e) ? !1 : w(e) ? !0 : !(t.width !== void 0 && t.width !== null && !j(t.width, { allowAuto: !1, allowNegative: !1 }) || t.style !== void 0 && t.style !== null && !hn(t.style) || t.color !== void 0 && t.color !== null && !de(t.color));
481
+ }, wn = {
482
482
  allowAuto: !1,
483
483
  allowKeywords: !1,
484
484
  allowNegative: !0
485
- }, dn = {
485
+ }, Cn = {
486
486
  allowAuto: !1,
487
487
  allowKeywords: !1,
488
488
  allowNegative: !1
489
- }, pn = (e) => {
489
+ }, vn = (e) => {
490
490
  if (typeof e != "object" || e === null || Array.isArray(e))
491
491
  return !1;
492
492
  const t = e;
493
- if (P(e))
493
+ if (E(e))
494
494
  return !1;
495
495
  if (w(e))
496
496
  return !0;
497
497
  for (const n of ["offsetX", "offsetY", "spread"]) {
498
498
  const o = t[n];
499
- if (o != null && !M(o, un))
499
+ if (o != null && !j(o, wn))
500
500
  return !1;
501
501
  }
502
- return !(t.blur !== void 0 && t.blur !== null && !M(t.blur, dn) || t.color !== void 0 && t.color !== null && !ae(t.color) || t.inset !== void 0 && t.inset !== null && typeof t.inset != "boolean");
503
- }, fn = (e) => e ? e.cssVariable !== void 0 && e.cssVariable !== null || e.offsetX !== void 0 || e.offsetY !== void 0 || e.blur !== void 0 || e.spread !== void 0 || e.color !== void 0 : !1, yn = (e) => {
502
+ return !(t.blur !== void 0 && t.blur !== null && !j(t.blur, Cn) || t.color !== void 0 && t.color !== null && !de(t.color) || t.inset !== void 0 && t.inset !== null && typeof t.inset != "boolean");
503
+ }, An = (e) => e ? e.cssVariable !== void 0 && e.cssVariable !== null || e.offsetX !== void 0 || e.offsetY !== void 0 || e.blur !== void 0 || e.spread !== void 0 || e.color !== void 0 : !1, In = (e) => {
504
504
  if (typeof e != "object" || e === null || Array.isArray(e))
505
505
  return !1;
506
506
  const t = e;
507
- return P(e) ? !1 : w(e) ? !0 : t.unit === "number" ? typeof t.value == "number" && Number.isFinite(t.value) && t.value > 0 : M(e, { allowAuto: !1, allowNegative: !1 });
508
- }, mn = (e) => typeof e == "object" && e !== null && !Array.isArray(e) ? !P(e) && !!w(e) : typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= 1, gn = (e) => {
509
- if (!Ot(e))
507
+ return E(e) ? !1 : w(e) ? !0 : t.unit === "number" ? typeof t.value == "number" && Number.isFinite(t.value) && t.value > 0 : j(e, { allowAuto: !1, allowNegative: !1 });
508
+ }, Sn = (e) => typeof e == "object" && e !== null && !Array.isArray(e) ? !E(e) && !!w(e) : typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= 1, kn = (e) => {
509
+ if (!Gt(e))
510
510
  return {};
511
511
  const t = w(e);
512
512
  if (t)
513
513
  return { backgroundImage: k(t) };
514
514
  const n = e;
515
515
  return n.source === "none" ? { backgroundImage: "none" } : n.source === "url" ? { backgroundImage: `url("${n.url}")` } : {
516
- backgroundImage: `url("${Nt({
516
+ backgroundImage: `url("${Ut({
517
517
  publicId: n.publicId,
518
518
  cloudName: n.cloudName,
519
519
  transformations: n.transformations
520
520
  })}")`
521
521
  };
522
- }, N = (e) => {
522
+ }, B = (e) => {
523
523
  const t = w(e);
524
524
  return t ? k(t) : "unit" in e ? e.unit === "auto" ? "auto" : e.unit === "keyword" ? e.keyword : `${e.value}${e.unit}` : "";
525
- }, hn = (e) => {
526
- if (!an(e))
525
+ }, Dn = (e) => {
526
+ if (!bn(e))
527
527
  return {};
528
528
  const t = w(e);
529
529
  if (t)
530
530
  return { border: k(t) };
531
531
  const n = {};
532
- if (e.width && (n.borderWidth = N(e.width)), e.style) {
532
+ if (e.width && (n.borderWidth = B(e.width)), e.style) {
533
533
  const o = w(e.style);
534
534
  n.borderStyle = o ? k(o) : e.style;
535
535
  }
536
- return e.color && (n.borderColor = ue(e.color)), n;
537
- }, U = (e) => e ? N(e) : "0px", bn = (e) => {
538
- if (!pn(e) || !fn(e))
536
+ return e.color && (n.borderColor = pe(e.color)), n;
537
+ }, G = (e) => e ? B(e) : "0px", Tn = (e) => {
538
+ if (!vn(e) || !An(e))
539
539
  return {};
540
540
  const t = w(e);
541
541
  if (t)
542
542
  return { boxShadow: k(t) };
543
543
  const n = [
544
- U(e.offsetX),
545
- U(e.offsetY),
546
- U(e.blur),
547
- U(e.spread)
544
+ G(e.offsetX),
545
+ G(e.offsetY),
546
+ G(e.blur),
547
+ G(e.spread)
548
548
  ];
549
- return e.color && n.push(ue(e.color)), e.inset && n.unshift("inset"), { boxShadow: n.join(" ") };
550
- }, wn = (e) => `${e.charAt(0).toUpperCase()}${e.slice(1)}`, Cn = (e, t) => {
551
- if (!Ft(e))
549
+ return e.color && n.push(pe(e.color)), e.inset && n.unshift("inset"), { boxShadow: n.join(" ") };
550
+ }, xn = (e) => `${e.charAt(0).toUpperCase()}${e.slice(1)}`, En = (e, t) => {
551
+ if (!qt(e))
552
552
  return {};
553
553
  if (e.allSides)
554
- return { [t]: N(e.allSides) };
554
+ return { [t]: B(e.allSides) };
555
555
  const n = {};
556
556
  for (const o of ["top", "right", "bottom", "left"]) {
557
557
  const s = e[o];
558
- s && (n[`${t}${wn(o)}`] = N(s));
558
+ s && (n[`${t}${xn(o)}`] = B(s));
559
559
  }
560
560
  return n;
561
- }, vn = (e, t) => ae(e) ? { [t]: ue(e) } : {}, An = (e, t, n) => {
562
- if (!Ut(e, n))
561
+ }, Pn = (e, t) => de(e) ? { [t]: pe(e) } : {}, Ln = (e, t, n) => {
562
+ if (!Jt(e, n))
563
563
  return {};
564
564
  const o = w(e);
565
565
  return o ? { [t]: k(o) } : { [t]: e };
566
- }, Sn = (e, t, n = {}) => M(e, n) ? { [t]: N(e) } : {}, In = (e) => {
567
- if (!yn(e))
566
+ }, $n = (e, t, n = {}) => j(e, n) ? { [t]: B(e) } : {}, Rn = (e) => {
567
+ if (!In(e))
568
568
  return {};
569
569
  const t = w(e);
570
- return t ? { lineHeight: k(t) } : "unit" in e && e.unit === "number" ? { lineHeight: e.value } : { lineHeight: N(e) };
571
- }, kn = (e) => {
572
- if (!mn(e))
570
+ return t ? { lineHeight: k(t) } : "unit" in e && e.unit === "number" ? { lineHeight: e.value } : { lineHeight: B(e) };
571
+ }, Mn = (e) => {
572
+ if (!Sn(e))
573
573
  return {};
574
574
  const t = w(e);
575
575
  return t ? { opacity: k(t) } : { opacity: e };
576
- }, de = {
576
+ }, fe = {
577
577
  // Box spacing (4-sided)
578
578
  "margin-3-resolutions": { kind: "boxSpacing", cssProperty: "margin" },
579
579
  "padding-3-resolutions": { kind: "boxSpacing", cssProperty: "padding" },
@@ -627,27 +627,27 @@ const jo = /* @__PURE__ */ D({
627
627
  "justify-content-3-resolutions": {
628
628
  kind: "enum",
629
629
  cssProperty: "justifyContent",
630
- allowedValues: Zt
630
+ allowedValues: ln
631
631
  },
632
632
  "align-items-3-resolutions": {
633
633
  kind: "enum",
634
634
  cssProperty: "alignItems",
635
- allowedValues: Jt
635
+ allowedValues: cn
636
636
  },
637
637
  "flex-wrap-3-resolutions": {
638
638
  kind: "enum",
639
639
  cssProperty: "flexWrap",
640
- allowedValues: Qt
640
+ allowedValues: an
641
641
  },
642
642
  "align-content-3-resolutions": {
643
643
  kind: "enum",
644
644
  cssProperty: "alignContent",
645
- allowedValues: en
645
+ allowedValues: un
646
646
  },
647
647
  "flex-direction-3-resolutions": {
648
648
  kind: "enum",
649
649
  cssProperty: "flexDirection",
650
- allowedValues: tn
650
+ allowedValues: dn
651
651
  },
652
652
  // Overflow — shorthand and longhands are independent attributes; when
653
653
  // both are set, the browser's cascade decides the effective overflow.
@@ -667,6 +667,13 @@ const jo = /* @__PURE__ */ D({
667
667
  allowedValues: ee
668
668
  },
669
669
  // Color
670
+ // Pointer input. On an overlay layer this is lifted onto the absolutely
671
+ // positioned layer box — see resolveOverlayLayerPointerEvents.
672
+ "pointer-events-3-resolutions": {
673
+ kind: "enum",
674
+ cssProperty: "pointerEvents",
675
+ allowedValues: rn
676
+ },
670
677
  "background-color-3-resolutions": { kind: "color", cssProperty: "backgroundColor" },
671
678
  "color-3-resolutions": { kind: "color", cssProperty: "color" },
672
679
  // Background image and the painting properties that go with it. Independent
@@ -676,17 +683,17 @@ const jo = /* @__PURE__ */ D({
676
683
  "background-size-3-resolutions": {
677
684
  kind: "enum",
678
685
  cssProperty: "backgroundSize",
679
- allowedValues: nn
686
+ allowedValues: pn
680
687
  },
681
688
  "background-position-3-resolutions": {
682
689
  kind: "enum",
683
690
  cssProperty: "backgroundPosition",
684
- allowedValues: on
691
+ allowedValues: fn
685
692
  },
686
693
  "background-repeat-3-resolutions": {
687
694
  kind: "enum",
688
695
  cssProperty: "backgroundRepeat",
689
- allowedValues: sn
696
+ allowedValues: yn
690
697
  },
691
698
  // Opacity (0–1 number)
692
699
  "opacity-3-resolutions": { kind: "opacity" },
@@ -694,7 +701,7 @@ const jo = /* @__PURE__ */ D({
694
701
  "font-family-3-resolutions": {
695
702
  kind: "enum",
696
703
  cssProperty: "fontFamily",
697
- allowedValues: Ht
704
+ allowedValues: Qt
698
705
  },
699
706
  "font-size-3-resolutions": {
700
707
  kind: "length",
@@ -704,12 +711,12 @@ const jo = /* @__PURE__ */ D({
704
711
  "font-weight-3-resolutions": {
705
712
  kind: "enum",
706
713
  cssProperty: "fontWeight",
707
- allowedValues: Gt
714
+ allowedValues: en
708
715
  },
709
716
  "font-style-3-resolutions": {
710
717
  kind: "enum",
711
718
  cssProperty: "fontStyle",
712
- allowedValues: zt
719
+ allowedValues: tn
713
720
  },
714
721
  "line-height-3-resolutions": { kind: "lineHeight" },
715
722
  "letter-spacing-3-resolutions": {
@@ -720,68 +727,68 @@ const jo = /* @__PURE__ */ D({
720
727
  "text-align-3-resolutions": {
721
728
  kind: "enum",
722
729
  cssProperty: "textAlign",
723
- allowedValues: Yt
730
+ allowedValues: nn
724
731
  },
725
732
  "text-decoration-3-resolutions": {
726
733
  kind: "enum",
727
734
  cssProperty: "textDecoration",
728
- allowedValues: qt
735
+ allowedValues: on
729
736
  },
730
737
  "text-transform-3-resolutions": {
731
738
  kind: "enum",
732
739
  cssProperty: "textTransform",
733
- allowedValues: Xt
740
+ allowedValues: sn
734
741
  }
735
- }, Dn = (e, t) => {
736
- const n = de[e];
742
+ }, Nn = (e, t) => {
743
+ const n = fe[e];
737
744
  if (!n)
738
745
  return {};
739
746
  switch (n.kind) {
740
747
  case "boxSpacing":
741
- return Cn(t, n.cssProperty);
748
+ return En(t, n.cssProperty);
742
749
  case "length":
743
- return Sn(t, n.cssProperty, n.capabilities);
750
+ return $n(t, n.cssProperty, n.capabilities);
744
751
  case "border":
745
- return hn(t);
752
+ return Dn(t);
746
753
  case "boxShadow":
747
- return bn(t);
754
+ return Tn(t);
748
755
  case "color":
749
- return vn(t, n.cssProperty);
756
+ return Pn(t, n.cssProperty);
750
757
  case "opacity":
751
- return kn(t);
758
+ return Mn(t);
752
759
  case "enum":
753
- return An(t, n.cssProperty, n.allowedValues);
760
+ return Ln(t, n.cssProperty, n.allowedValues);
754
761
  case "lineHeight":
755
- return In(t);
762
+ return Rn(t);
756
763
  case "backgroundImage":
757
- return gn(t);
764
+ return kn(t);
758
765
  default:
759
766
  return {};
760
767
  }
761
- }, Vo = Object.fromEntries(
762
- Object.entries(de).filter(([, e]) => e.kind === "boxSpacing").map(([e, t]) => [
768
+ }, ts = Object.fromEntries(
769
+ Object.entries(fe).filter(([, e]) => e.kind === "boxSpacing").map(([e, t]) => [
763
770
  e,
764
771
  t.cssProperty
765
772
  ])
766
- ), xn = (e) => e != null && e !== "", Tn = (e) => e ? !rn.some(
767
- (n) => xn(e[n])
768
- ) || e.display === "flex" ? e : { ...e, display: "flex" } : {}, Pn = ({
773
+ ), Wn = (e) => e != null && e !== "", On = (e) => e ? !mn.some(
774
+ (n) => Wn(e[n])
775
+ ) || e.display === "flex" ? e : { ...e, display: "flex" } : {}, jn = ({
769
776
  dbEntryType: e,
770
777
  libraryId: t,
771
778
  sourceComponentsPlugin: n
772
779
  }) => {
773
780
  if (!(e != null && e.length))
774
781
  return;
775
- const o = n.components[Te(t, e)];
782
+ const o = n.components[Re(t, e)];
776
783
  if (!o || !("defaultAttributeValues" in o))
777
784
  return;
778
785
  const i = o.defaultAttributeValues;
779
786
  if (i != null && i.length)
780
- return i.reduce((c, d) => ({
781
- ...c,
782
- [d.name]: d.defaultValues
787
+ return i.reduce((r, f) => ({
788
+ ...r,
789
+ [f.name]: f.defaultValues
783
790
  }), {});
784
- }, _ = ({
791
+ }, L = ({
785
792
  deviceDisplayType: e,
786
793
  componentAttributes: t
787
794
  }) => {
@@ -793,8 +800,8 @@ const jo = /* @__PURE__ */ D({
793
800
  )) {
794
801
  if (!s.includes("3-resolutions") || !i)
795
802
  continue;
796
- const c = i.all, d = c ?? i[e.toLowerCase()];
797
- o[s] = d, de[s] && Object.assign(n, Dn(s, d));
803
+ const r = i.all, f = r ?? i[e.toLowerCase()];
804
+ o[s] = f, fe[s] && Object.assign(n, Nn(s, f));
798
805
  }
799
806
  return Object.keys(n).length || Object.keys(o).length ? {
800
807
  styles: Object.keys(n).length ? n : void 0,
@@ -802,86 +809,86 @@ const jo = /* @__PURE__ */ D({
802
809
  o
803
810
  ).length ? o : void 0
804
811
  } : void 0;
805
- }, En = ({
812
+ }, Bn = ({
806
813
  defaultAttributes: e,
807
814
  userModifiedAttributes: t
808
815
  }) => e ? t ? { ...e, ...t } : e : t;
809
- function G(e) {
816
+ function Y(e) {
810
817
  return e.componentAttributes ?? e.widgetAttributes;
811
818
  }
812
- function Ce({
819
+ function Ie({
813
820
  col: e,
814
821
  deviceDisplayType: t,
815
822
  isComposeMode: n,
816
823
  sourceComponentsPlugin: o
817
824
  }) {
818
- const s = G(e), i = Pn({
825
+ const s = Y(e), i = jn({
819
826
  dbEntryType: e.type,
820
827
  libraryId: e.libraryId,
821
828
  sourceComponentsPlugin: o
822
- }) || [], c = En({
829
+ }) || [], r = Bn({
823
830
  defaultAttributes: i,
824
831
  userModifiedAttributes: s
825
- }), { styles: d, componentAttributesSpecificToDeviceType: a } = _({
832
+ }), { styles: f, componentAttributesSpecificToDeviceType: m } = L({
826
833
  deviceDisplayType: t,
827
- componentAttributes: c
834
+ componentAttributes: r
828
835
  }) || {
829
836
  styles: void 0,
830
837
  componentAttributesSpecificToDeviceType: void 0
831
838
  };
832
- let r = {};
833
- const l = {};
834
- if (d)
835
- for (const [u, p] of Object.entries(d))
836
- n && l[u] || (r = {
837
- ...r,
838
- [u]: p
839
+ let c = {};
840
+ const a = {};
841
+ if (f)
842
+ for (const [d, l] of Object.entries(f))
843
+ n && a[d] || (c = {
844
+ ...c,
845
+ [d]: l
839
846
  });
840
- let f = G(e);
841
- for (const u in a)
842
- if (u.includes("3-resolutions")) {
843
- f = {
844
- ...G(e) || {},
845
- ...a || {}
847
+ let u = Y(e);
848
+ for (const d in m)
849
+ if (d.includes("3-resolutions")) {
850
+ u = {
851
+ ...Y(e) || {},
852
+ ...m || {}
846
853
  };
847
854
  break;
848
855
  }
849
856
  return {
850
- componentAttributesBasedOnDevice: f,
851
- componentStyles: Tn(r)
857
+ componentAttributesBasedOnDevice: u,
858
+ componentStyles: On(c)
852
859
  };
853
860
  }
854
- const $n = (e) => {
861
+ const Fn = (e) => {
855
862
  const t = (e == null ? void 0 : e.rows) || [];
856
863
  for (const n of t)
857
864
  if (((n == null ? void 0 : n.columns) || []).length > 0)
858
865
  return !0;
859
866
  return (e == null ? void 0 : e.containerAttributes) && Object.keys(e.containerAttributes).length > 0;
860
- }, Rn = "var(--sl-spacing-x-small)";
861
- function Ln(e) {
867
+ }, Vn = "var(--sl-spacing-x-small)";
868
+ function Kn(e) {
862
869
  return e != null && e.horizontalAlignment || e != null && e.verticalAlignment || e != null && e.flexWrap || e != null && e.gap || e != null && e.alignContent ? !0 : !!(e != null && e.rowAttributes && Object.keys(e.rowAttributes).length > 0);
863
870
  }
864
- function Mn({
871
+ function Un({
865
872
  row: e,
866
873
  deviceDisplayType: t
867
874
  }) {
868
875
  var o;
869
- const n = _({
876
+ const n = L({
870
877
  deviceDisplayType: t,
871
878
  componentAttributes: e.rowAttributes
872
879
  });
873
880
  return ((o = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : o["hide-component-3-resolutions"]) === "true";
874
881
  }
875
- function Nn({
882
+ function Hn({
876
883
  row: e,
877
884
  deviceDisplayType: t,
878
885
  isComposeMode: n
879
886
  }) {
880
- var p;
881
- const o = ((p = _({
887
+ var l;
888
+ const o = ((l = L({
882
889
  deviceDisplayType: t,
883
890
  componentAttributes: e.rowAttributes
884
- })) == null ? void 0 : p.styles) || {}, s = o.justifyContent ?? e.horizontalAlignment ?? we.Center, i = o.alignItems ?? e.verticalAlignment ?? we.Center, c = o.flexDirection ?? "row", d = o.gap ?? e.gap ?? Rn, a = n ? "nowrap" : o.flexWrap ?? e.flexWrap ?? "nowrap", r = o.alignContent ?? e.alignContent ?? void 0, l = /* @__PURE__ */ new Set([
891
+ })) == null ? void 0 : l.styles) || {}, s = o.justifyContent ?? e.horizontalAlignment ?? Ae.Center, i = o.alignItems ?? e.verticalAlignment ?? Ae.Center, r = o.flexDirection ?? "row", f = o.gap ?? e.gap ?? Vn, m = n ? "nowrap" : o.flexWrap ?? e.flexWrap ?? "nowrap", c = o.alignContent ?? e.alignContent ?? void 0, a = /* @__PURE__ */ new Set([
885
892
  "justifyContent",
886
893
  "alignItems",
887
894
  "flexDirection",
@@ -889,26 +896,26 @@ function Nn({
889
896
  "flexWrap",
890
897
  "alignContent",
891
898
  "display"
892
- ]), f = {};
893
- for (const [h, g] of Object.entries(o))
894
- l.has(h) || (f[h] = g);
895
- const u = {
899
+ ]), u = {};
900
+ for (const [g, p] of Object.entries(o))
901
+ a.has(g) || (u[g] = p);
902
+ const d = {
896
903
  display: "flex",
897
- flexDirection: c,
898
- gap: d,
899
- flexWrap: a,
904
+ flexDirection: r,
905
+ gap: f,
906
+ flexWrap: m,
900
907
  justifyContent: s,
901
908
  alignItems: i,
902
- ...f
909
+ ...u
903
910
  };
904
- return r !== void 0 && (u.alignContent = r), u;
911
+ return c !== void 0 && (d.alignContent = c), d;
905
912
  }
906
- const pe = "css-classes-3-resolutions", Wn = 500, _n = /[\x00-\x1f\x7f]/g, fe = (e) => {
913
+ const ye = "css-classes-3-resolutions", zn = 500, Gn = /[\x00-\x1f\x7f]/g, me = (e) => {
907
914
  if (typeof e != "string")
908
915
  return;
909
916
  const t = /* @__PURE__ */ new Set(), n = [];
910
917
  for (const s of e.split(/\s+/)) {
911
- const i = s.replace(_n, "");
918
+ const i = s.replace(Gn, "");
912
919
  i && (t.has(i) || (t.add(i), n.push(i)));
913
920
  }
914
921
  if (!n.length)
@@ -916,12 +923,12 @@ const pe = "css-classes-3-resolutions", Wn = 500, _n = /[\x00-\x1f\x7f]/g, fe =
916
923
  let o = "";
917
924
  for (const s of n) {
918
925
  const i = o ? `${o} ${s}` : s;
919
- if (i.length > Wn)
926
+ if (i.length > zn)
920
927
  break;
921
928
  o = i;
922
929
  }
923
930
  return o.length ? o : void 0;
924
- }, Oe = "hide-component-3-resolutions", On = [
931
+ }, Ue = "hide-component-3-resolutions", _n = "pointer-events-3-resolutions", Yn = [
925
932
  "width-3-resolutions",
926
933
  "min-width-3-resolutions",
927
934
  "max-width-3-resolutions",
@@ -936,22 +943,23 @@ const pe = "css-classes-3-resolutions", Wn = 500, _n = /[\x00-\x1f\x7f]/g, fe =
936
943
  "overflow-3-resolutions",
937
944
  "overflow-x-3-resolutions",
938
945
  "overflow-y-3-resolutions",
939
- Oe
940
- ], jn = new Set(
941
- On
946
+ Ue,
947
+ _n
948
+ ], qn = new Set(
949
+ Yn
942
950
  );
943
- function Bn({
951
+ function ge({
944
952
  containerAttributes: e,
945
953
  deviceDisplayType: t
946
954
  }) {
947
955
  var o;
948
- const n = _({
956
+ const n = L({
949
957
  deviceDisplayType: t,
950
958
  componentAttributes: e
951
959
  });
952
- return ((o = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : o[Oe]) === "true";
960
+ return ((o = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : o[Ue]) === "true";
953
961
  }
954
- function Fn({
962
+ function He({
955
963
  containerAttributes: e,
956
964
  deviceDisplayType: t,
957
965
  isComposeMode: n
@@ -961,24 +969,108 @@ function Fn({
961
969
  return { styles: {} };
962
970
  const o = n ? Object.fromEntries(
963
971
  Object.entries(e).filter(
964
- ([c]) => !jn.has(c)
972
+ ([r]) => !qn.has(r)
965
973
  )
966
- ) : e, s = _({
974
+ ) : e, s = L({
967
975
  deviceDisplayType: t,
968
976
  componentAttributes: o
969
977
  });
970
978
  return {
971
979
  styles: (s == null ? void 0 : s.styles) ?? {},
972
- cssClasses: fe(
973
- (i = s == null ? void 0 : s.componentAttributesSpecificToDeviceType) == null ? void 0 : i[pe]
980
+ cssClasses: me(
981
+ (i = s == null ? void 0 : s.componentAttributesSpecificToDeviceType) == null ? void 0 : i[ye]
974
982
  )
975
983
  };
976
984
  }
977
- function Vn(e) {
985
+ function Xn(e) {
978
986
  return Object.keys(e.styles).length > 0 || !!e.cssClasses;
979
987
  }
980
- const ye = "/";
981
- function Kn({
988
+ function ze({
989
+ containerAttributes: e,
990
+ widgetContainerStyles: t
991
+ }) {
992
+ return ((e == null ? void 0 : e[oe]) || []).some(
993
+ (o) => o.toLowerCase().startsWith("height:")
994
+ ) || t.styles.height !== void 0;
995
+ }
996
+ const Zn = "z-index-3-resolutions", Ge = 0;
997
+ function Jn(e) {
998
+ var t, n;
999
+ return !!((n = (t = e == null ? void 0 : e.overlayLayers) == null ? void 0 : t.layers) != null && n.length);
1000
+ }
1001
+ function Se({
1002
+ containerAttributes: e,
1003
+ deviceDisplayType: t
1004
+ }) {
1005
+ var s;
1006
+ const n = L({
1007
+ deviceDisplayType: t,
1008
+ componentAttributes: e
1009
+ }), o = (s = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : s[Zn];
1010
+ if (typeof o == "number" && Number.isFinite(o))
1011
+ return o;
1012
+ if (typeof o == "string" && o.trim().length) {
1013
+ const i = Number(o);
1014
+ if (Number.isFinite(i))
1015
+ return i;
1016
+ }
1017
+ return Ge;
1018
+ }
1019
+ function Qn(e, t) {
1020
+ return e + t + 1;
1021
+ }
1022
+ function eo({
1023
+ containerAttributes: e,
1024
+ deviceDisplayType: t
1025
+ }) {
1026
+ var s;
1027
+ const n = L({
1028
+ deviceDisplayType: t,
1029
+ componentAttributes: e
1030
+ }), o = (s = n == null ? void 0 : n.styles) == null ? void 0 : s.pointerEvents;
1031
+ return typeof o == "string" ? o : void 0;
1032
+ }
1033
+ function to({
1034
+ layer: e,
1035
+ deviceDisplayType: t
1036
+ }) {
1037
+ var n;
1038
+ return (n = e == null ? void 0 : e.rows) != null && n.length ? ge({
1039
+ containerAttributes: e.containerAttributes,
1040
+ deviceDisplayType: t
1041
+ }) : !0;
1042
+ }
1043
+ function no({
1044
+ isWithinCollection: e,
1045
+ baseDeclaresOwnHeight: t,
1046
+ baseZIndex: n
1047
+ }) {
1048
+ return {
1049
+ position: "relative",
1050
+ isolation: "isolate",
1051
+ display: "flex",
1052
+ flexDirection: "column",
1053
+ ...t ? {} : { height: e ? "auto" : "100%" },
1054
+ ...n === Ge ? {} : { zIndex: n }
1055
+ };
1056
+ }
1057
+ function oo({
1058
+ zIndex: e,
1059
+ pointerEvents: t
1060
+ }) {
1061
+ return {
1062
+ position: "absolute",
1063
+ top: 0,
1064
+ left: 0,
1065
+ width: "100%",
1066
+ height: "100%",
1067
+ boxSizing: "border-box",
1068
+ zIndex: e,
1069
+ ...t ? { pointerEvents: t } : {}
1070
+ };
1071
+ }
1072
+ const he = "/";
1073
+ function so({
982
1074
  componentProps: e,
983
1075
  ancestorColumnIds: t,
984
1076
  columnId: n
@@ -987,40 +1079,40 @@ function Kn({
987
1079
  return;
988
1080
  const o = [...t ?? [], n];
989
1081
  for (let s = 0; s < o.length; s += 1) {
990
- const i = o.slice(s).join(ye), c = e[i];
991
- if (c)
992
- return c;
1082
+ const i = o.slice(s).join(he), r = e[i];
1083
+ if (r)
1084
+ return r;
993
1085
  }
994
1086
  }
995
- function Un({
1087
+ function io({
996
1088
  displayItemList: e,
997
1089
  widgetCollections: t
998
1090
  }) {
999
1091
  const n = [], o = (s, i) => {
1000
- var c;
1001
- if ((c = s == null ? void 0 : s.rows) != null && c.length)
1002
- for (const d of s.rows)
1003
- for (const a of d.columns) {
1004
- if (!a.id || a.type === re.DroppableBox)
1092
+ var r;
1093
+ if ((r = s == null ? void 0 : s.rows) != null && r.length)
1094
+ for (const f of s.rows)
1095
+ for (const m of f.columns) {
1096
+ if (!m.id || m.type === ce.DroppableBox)
1005
1097
  continue;
1006
- const r = Le(a.type);
1007
- if (r != null && r.length) {
1008
- const l = a.collection ?? (t == null ? void 0 : t[r]);
1009
- l && !i.includes(a.id) && o(l.collectionRows, [...i, a.id]);
1098
+ const c = je(m.type);
1099
+ if (c != null && c.length) {
1100
+ const a = m.collection ?? (t == null ? void 0 : t[c]);
1101
+ a && !i.includes(m.id) && o(a.collectionRows, [...i, m.id]);
1010
1102
  continue;
1011
1103
  }
1012
1104
  n.push(
1013
- [...i, a.id].join(ye)
1105
+ [...i, m.id].join(he)
1014
1106
  );
1015
1107
  }
1016
1108
  };
1017
1109
  return o(e, []), n;
1018
1110
  }
1019
- function Hn(e, t) {
1020
- const n = `${ye}${e}`;
1111
+ function ro(e, t) {
1112
+ const n = `${he}${e}`;
1021
1113
  return t.some((o) => o === e || o.endsWith(n));
1022
1114
  }
1023
- function Gn({
1115
+ function lo({
1024
1116
  componentProps: e,
1025
1117
  displayItemList: t,
1026
1118
  widgetCollections: n
@@ -1028,13 +1120,13 @@ function Gn({
1028
1120
  const o = e ? Object.keys(e) : [];
1029
1121
  if (!o.length)
1030
1122
  return [];
1031
- const s = Un({
1123
+ const s = io({
1032
1124
  displayItemList: t,
1033
1125
  widgetCollections: n
1034
1126
  });
1035
- return o.filter((i) => !Hn(i, s));
1127
+ return o.filter((i) => !ro(i, s));
1036
1128
  }
1037
- function zn({
1129
+ function co({
1038
1130
  componentProps: e,
1039
1131
  displayItemList: t,
1040
1132
  widgetCollections: n,
@@ -1042,7 +1134,7 @@ function zn({
1042
1134
  }) {
1043
1135
  if (process.env.NODE_ENV === "production")
1044
1136
  return;
1045
- const s = Gn({
1137
+ const s = lo({
1046
1138
  componentProps: e,
1047
1139
  displayItemList: t,
1048
1140
  widgetCollections: n
@@ -1051,63 +1143,68 @@ function zn({
1051
1143
  `RuleCMSWidget "${o}": componentProps ${s.map((i) => `"${i}"`).join(", ")} ${s.length === 1 ? "matches" : "match"} no component in this widget, so those props were not passed to anything. Keys are column ids from the widget config — the composer's Modify drawer shows the id of the selected component.`
1052
1144
  );
1053
1145
  }
1054
- function Yn(e) {
1146
+ function ao(e) {
1055
1147
  return typeof e == "object" && e !== null && !Array.isArray(e);
1056
1148
  }
1057
- function qn(e) {
1149
+ function uo(e) {
1058
1150
  if (e.all !== void 0 && e.all !== null)
1059
1151
  return !1;
1060
1152
  const t = e.phone, n = e.tablet, o = e.desktop;
1061
1153
  return t !== n || t !== o || n !== o;
1062
1154
  }
1063
- function ve(e) {
1064
- var t;
1155
+ function se(e) {
1156
+ var t, n;
1065
1157
  if (!((t = e == null ? void 0 : e.rows) != null && t.length))
1066
1158
  return !1;
1067
- for (const n of e.rows) {
1068
- if (Ae(n.rowAttributes))
1159
+ if (te(e.containerAttributes))
1160
+ return !0;
1161
+ for (const o of e.rows) {
1162
+ if (te(o.rowAttributes))
1069
1163
  return !0;
1070
- for (const o of n.columns)
1071
- if (Ae(G(o)))
1164
+ for (const s of o.columns)
1165
+ if (te(Y(s)))
1072
1166
  return !0;
1073
1167
  }
1168
+ for (const o of ((n = e.overlayLayers) == null ? void 0 : n.layers) ?? [])
1169
+ if (se(o))
1170
+ return !0;
1074
1171
  return !1;
1075
1172
  }
1076
- function Ae(e) {
1173
+ function te(e) {
1077
1174
  if (!e)
1078
1175
  return !1;
1079
1176
  for (const [t, n] of Object.entries(e))
1080
- if (!(!t.includes("3-resolutions") || !Yn(n))) {
1177
+ if (!(!t.includes("3-resolutions") || !ao(n))) {
1081
1178
  if (t === "hide-component-3-resolutions") {
1082
1179
  const o = n, s = (i) => i === "true" || i === !0;
1083
1180
  if (s(o.phone) !== s(o.tablet) || s(o.phone) !== s(o.desktop))
1084
1181
  return !0;
1085
1182
  continue;
1086
1183
  }
1087
- if (qn(n))
1184
+ if (uo(n))
1088
1185
  return !0;
1089
1186
  }
1090
1187
  return !1;
1091
1188
  }
1092
- function Xn(e, t) {
1093
- if (ve(e))
1189
+ function po(e, t) {
1190
+ if (se(e))
1094
1191
  return !0;
1095
1192
  for (const n of Object.values(t))
1096
- if (ve(n.collectionRows))
1193
+ if (se(n.collectionRows))
1097
1194
  return !0;
1098
1195
  return !1;
1099
1196
  }
1100
- const je = parseInt(Ne, 10), Be = parseInt(We, 10), Zn = je + 1, Jn = Be + 1;
1101
- function Qn(e) {
1197
+ const _e = parseInt(Fe, 10), Ye = parseInt(Ve, 10), fo = _e + 1, yo = Ye + 1;
1198
+ function mo(e) {
1102
1199
  const t = `.${e}-phone`, n = `.${e}-tablet`, o = `.${e}-desktop`;
1103
1200
  return `
1104
1201
  ${t}, ${n}, ${o} { display: none; }
1105
- @media (max-width: ${je}px) { ${t} { display: block; } }
1106
- @media (min-width: ${Zn}px) and (max-width: ${Be}px) { ${n} { display: block; } }
1107
- @media (min-width: ${Jn}px) { ${o} { display: block; } }
1202
+ @media (max-width: ${_e}px) { ${t} { display: block; } }
1203
+ @media (min-width: ${fo}px) and (max-width: ${Ye}px) { ${n} { display: block; } }
1204
+ @media (min-width: ${yo}px) { ${o} { display: block; } }
1108
1205
  `.trim();
1109
1206
  }
1110
- function te(e) {
1207
+ function ne(e) {
1111
1208
  if (!e)
1112
1209
  throw new Error("Source components plugin is required, but no plugins were provided");
1113
1210
  const t = e.sourceComponents;
@@ -1121,7 +1218,7 @@ function te(e) {
1121
1218
  );
1122
1219
  return t;
1123
1220
  }
1124
- const eo = ["hidden"], to = /* @__PURE__ */ D({
1221
+ const go = ["hidden"], ke = /* @__PURE__ */ D({
1125
1222
  __name: "EmbedInVerticalContainer",
1126
1223
  props: {
1127
1224
  displayItemList: {},
@@ -1134,59 +1231,59 @@ const eo = ["hidden"], to = /* @__PURE__ */ D({
1134
1231
  const t = e;
1135
1232
  let n = 0;
1136
1233
  const o = `rulecms-vc-${++n}`;
1137
- function s(h, g, v) {
1138
- const C = h && !v ? 3 : 1;
1139
- return !!(g != null && g.length) && g.length > C;
1234
+ function s(g, p, I) {
1235
+ const v = g && !I ? 3 : 1;
1236
+ return !!(p != null && p.length) && p.length > v;
1140
1237
  }
1141
- const i = m(() => {
1142
- var g;
1143
- return (((g = t.displayItemList.containerAttributes) == null ? void 0 : g[Q]) || []).join(`;
1238
+ const i = h(() => {
1239
+ var p;
1240
+ return (((p = t.displayItemList.containerAttributes) == null ? void 0 : p[oe]) || []).join(`;
1144
1241
  `);
1145
- }), c = m(
1242
+ }), r = h(
1146
1243
  () => i.value ? `.${o} {
1147
1244
  ${i.value}
1148
1245
  }` : ""
1149
- ), d = m(
1150
- () => !t.isComposeMode && Bn({
1246
+ ), f = h(
1247
+ () => !t.isComposeMode && ge({
1151
1248
  containerAttributes: t.displayItemList.containerAttributes,
1152
1249
  deviceDisplayType: t.deviceDisplayType
1153
1250
  })
1154
- ), a = m(
1155
- () => Fn({
1251
+ ), m = h(
1252
+ () => He({
1156
1253
  containerAttributes: t.displayItemList.containerAttributes,
1157
1254
  deviceDisplayType: t.deviceDisplayType,
1158
1255
  isComposeMode: t.isComposeMode
1159
1256
  })
1160
- ), r = m(() => {
1161
- var v;
1162
- const h = ((v = t.displayItemList.containerAttributes) == null ? void 0 : v[Q]) || [], g = Vn(a.value);
1163
- return t.isComposeMode && !t.isWithinCollection || t.showDropContainers || h.length > 0 || g || s(t.isComposeMode, t.displayItemList.rows, t.isWithinCollection);
1164
- }), l = m(
1165
- () => [i.value ? o : void 0, a.value.cssClasses].filter(Boolean).join(" ")
1166
- ), f = m(() => {
1167
- var g;
1168
- return {
1169
- ...(((g = t.displayItemList.containerAttributes) == null ? void 0 : g[Q]) || []).some((v) => v.toLowerCase().startsWith("height:")) ? {} : { height: t.isWithinCollection ? "auto" : "100%" },
1170
- display: "flex",
1171
- flexDirection: "column",
1172
- ...a.value.styles
1173
- };
1174
- }), u = m(() => r.value ? l.value : ""), p = m(() => d.value ? { display: "none" } : r.value ? f.value : { display: "contents" });
1175
- return (h, g) => (y(), b("div", {
1176
- hidden: d.value || void 0,
1177
- class: B(u.value || void 0),
1178
- style: S(p.value)
1257
+ ), c = h(() => {
1258
+ var I;
1259
+ const g = ((I = t.displayItemList.containerAttributes) == null ? void 0 : I[oe]) || [], p = Xn(m.value);
1260
+ return t.isComposeMode && !t.isWithinCollection || t.showDropContainers || g.length > 0 || p || s(t.isComposeMode, t.displayItemList.rows, t.isWithinCollection);
1261
+ }), a = h(
1262
+ () => [i.value ? o : void 0, m.value.cssClasses].filter(Boolean).join(" ")
1263
+ ), u = h(() => ({
1264
+ ...ze({
1265
+ containerAttributes: t.displayItemList.containerAttributes,
1266
+ widgetContainerStyles: m.value
1267
+ }) ? {} : { height: t.isWithinCollection ? "auto" : "100%" },
1268
+ display: "flex",
1269
+ flexDirection: "column",
1270
+ ...m.value.styles
1271
+ })), d = h(() => c.value ? a.value : ""), l = h(() => f.value ? { display: "none" } : c.value ? u.value : { display: "contents" });
1272
+ return (g, p) => (y(), b("div", {
1273
+ hidden: f.value || void 0,
1274
+ class: K(d.value || void 0),
1275
+ style: S(l.value)
1179
1276
  }, [
1180
- i.value ? (y(), A(R("style"), { key: 0 }, {
1181
- default: F(() => [
1182
- ie(Y(c.value), 1)
1277
+ i.value ? (y(), C(W("style"), { key: 0 }, {
1278
+ default: M(() => [
1279
+ le(q(r.value), 1)
1183
1280
  ]),
1184
1281
  _: 1
1185
- })) : W("", !0),
1186
- se(h.$slots, "default")
1187
- ], 14, eo));
1282
+ })) : N("", !0),
1283
+ re(g.$slots, "default")
1284
+ ], 14, go));
1188
1285
  }
1189
- }), no = ["hidden"], oo = /* @__PURE__ */ D({
1286
+ }), ho = ["hidden"], De = /* @__PURE__ */ D({
1190
1287
  __name: "EmbedInRow",
1191
1288
  props: {
1192
1289
  row: {},
@@ -1197,40 +1294,40 @@ ${i.value}
1197
1294
  },
1198
1295
  setup(e) {
1199
1296
  const t = e;
1200
- function n(r, l, f) {
1201
- var p;
1202
- const u = r && !f ? 3 : 1;
1203
- return !!((p = l == null ? void 0 : l.columns) != null && p.length) && l.columns.length > u;
1297
+ function n(c, a, u) {
1298
+ var l;
1299
+ const d = c && !u ? 3 : 1;
1300
+ return !!((l = a == null ? void 0 : a.columns) != null && l.length) && a.columns.length > d;
1204
1301
  }
1205
- const o = m(
1206
- () => !t.isComposeMode && Mn({ row: t.row, deviceDisplayType: t.deviceDisplayType })
1207
- ), s = m(
1208
- () => t.showDropContainers || Ln(t.row) || n(t.isComposeMode, t.row, t.isWithinCollection)
1209
- ), i = m(
1210
- () => Nn({
1302
+ const o = h(
1303
+ () => !t.isComposeMode && Un({ row: t.row, deviceDisplayType: t.deviceDisplayType })
1304
+ ), s = h(
1305
+ () => t.showDropContainers || Kn(t.row) || n(t.isComposeMode, t.row, t.isWithinCollection)
1306
+ ), i = h(
1307
+ () => Hn({
1211
1308
  row: t.row,
1212
1309
  deviceDisplayType: t.deviceDisplayType,
1213
1310
  isComposeMode: t.isComposeMode
1214
1311
  })
1215
- ), c = m(() => {
1216
- var l;
1217
- const r = _({
1312
+ ), r = h(() => {
1313
+ var a;
1314
+ const c = L({
1218
1315
  deviceDisplayType: t.deviceDisplayType,
1219
1316
  componentAttributes: t.row.rowAttributes
1220
1317
  });
1221
- return fe(
1222
- (l = r == null ? void 0 : r.componentAttributesSpecificToDeviceType) == null ? void 0 : l[pe]
1318
+ return me(
1319
+ (a = c == null ? void 0 : c.componentAttributesSpecificToDeviceType) == null ? void 0 : a[ye]
1223
1320
  ) ?? "";
1224
- }), d = m(() => s.value ? c.value : ""), a = m(() => o.value ? { display: "none" } : s.value ? i.value : { display: "contents" });
1225
- return (r, l) => (y(), b("div", {
1321
+ }), f = h(() => s.value ? r.value : ""), m = h(() => o.value ? { display: "none" } : s.value ? i.value : { display: "contents" });
1322
+ return (c, a) => (y(), b("div", {
1226
1323
  hidden: o.value || void 0,
1227
- class: B(d.value || void 0),
1228
- style: S(a.value)
1324
+ class: K(f.value || void 0),
1325
+ style: S(m.value)
1229
1326
  }, [
1230
- se(r.$slots, "default")
1231
- ], 14, no));
1327
+ re(c.$slots, "default")
1328
+ ], 14, ho));
1232
1329
  }
1233
- }), Fe = [
1330
+ }), qe = [
1234
1331
  "minWidth",
1235
1332
  "maxWidth",
1236
1333
  "minHeight",
@@ -1282,20 +1379,20 @@ ${i.value}
1282
1379
  "textAlign",
1283
1380
  "textDecoration",
1284
1381
  "textTransform"
1285
- ], so = (e) => e != null && e !== "", io = (e) => e ? Fe.reduce(
1382
+ ], bo = (e) => e != null && e !== "", wo = (e) => e ? qe.reduce(
1286
1383
  (t, n) => {
1287
1384
  const o = e[n];
1288
- return so(o) && (t[n] = o), t;
1385
+ return bo(o) && (t[n] = o), t;
1289
1386
  },
1290
1387
  {}
1291
- ) : {}, ro = (e) => {
1388
+ ) : {}, Co = (e) => {
1292
1389
  if (!e)
1293
1390
  return;
1294
1391
  const t = { ...e };
1295
- for (const n of Fe)
1392
+ for (const n of qe)
1296
1393
  delete t[n];
1297
1394
  return Object.keys(t).length ? t : void 0;
1298
- }, lo = (e) => Object.keys(e).length > 0, co = (e, t) => {
1395
+ }, vo = (e) => Object.keys(e).length > 0, Ao = (e, t) => {
1299
1396
  const n = (e == null ? void 0 : e.noContainer) ?? !1, o = e == null ? void 0 : e.resolveNoContainer;
1300
1397
  if (typeof o != "function")
1301
1398
  return n;
@@ -1313,7 +1410,7 @@ ${i.value}
1313
1410
  );
1314
1411
  }
1315
1412
  return n;
1316
- }, ao = (e, t) => {
1413
+ }, Io = (e, t) => {
1317
1414
  const n = e == null ? void 0 : e.resolveRendersOwnElement;
1318
1415
  if (typeof n != "function")
1319
1416
  return !1;
@@ -1331,7 +1428,7 @@ ${i.value}
1331
1428
  );
1332
1429
  }
1333
1430
  return !1;
1334
- }, uo = /* @__PURE__ */ D({
1431
+ }, Te = /* @__PURE__ */ D({
1335
1432
  __name: "DisplayComponent",
1336
1433
  props: {
1337
1434
  componentType: {},
@@ -1339,53 +1436,55 @@ ${i.value}
1339
1436
  componentAttributes: {},
1340
1437
  components: {},
1341
1438
  styleProps: {},
1342
- widgetInstanceProps: {}
1439
+ widgetInstanceProps: {},
1440
+ mounts: {}
1343
1441
  },
1344
1442
  setup(e) {
1345
- const t = e, n = m(() => t.components[Te(t.libraryId, t.componentType)]), o = m(() => {
1346
- var h;
1347
- const p = (h = n.value) == null ? void 0 : h.card;
1348
- return p || (console.error(
1443
+ const t = e, n = h(() => t.components[Re(t.libraryId, t.componentType)]), o = h(() => {
1444
+ var g;
1445
+ const l = (g = n.value) == null ? void 0 : g.card;
1446
+ return l || (console.error(
1349
1447
  `DisplayComponent: Component with type ${t.componentType}${t.libraryId ? ` (library "${t.libraryId}")` : ""} not found in components`
1350
1448
  ), null);
1351
- }), s = m(() => ({
1449
+ }), s = h(() => ({
1352
1450
  componentAttributes: t.componentAttributes,
1353
1451
  styleProps: t.styleProps
1354
- })), i = m(
1355
- () => n.value ? co(n.value, s.value) : !1
1356
- ), c = m(() => io(t.styleProps)), d = m(
1357
- () => i.value ? ro(t.styleProps) : t.styleProps
1358
- ), a = m(
1452
+ })), i = h(
1453
+ () => n.value ? Ao(n.value, s.value) : !1
1454
+ ), r = h(() => wo(t.styleProps)), f = h(
1455
+ () => i.value ? Co(t.styleProps) : t.styleProps
1456
+ ), m = h(
1359
1457
  () => {
1360
- var p;
1361
- return fe((p = t.componentAttributes) == null ? void 0 : p[pe]);
1458
+ var l;
1459
+ return me((l = t.componentAttributes) == null ? void 0 : l[ye]);
1362
1460
  }
1363
- ), r = m(() => i.value && lo(c.value)), l = m(
1364
- () => !i.value || (n.value ? ao(n.value, s.value) : !1)
1365
- ), f = m(
1366
- () => !r.value && l.value ? a.value : void 0
1367
- ), u = m(() => ({
1461
+ ), c = h(() => i.value && vo(r.value)), a = h(
1462
+ () => !i.value || (n.value ? Io(n.value, s.value) : !1)
1463
+ ), u = h(
1464
+ () => !c.value && a.value ? m.value : void 0
1465
+ ), d = h(() => ({
1368
1466
  componentAttributes: t.componentAttributes,
1369
- styleProps: d.value,
1370
- className: f.value,
1371
- widgetInstanceProps: t.widgetInstanceProps
1467
+ styleProps: f.value,
1468
+ className: u.value,
1469
+ widgetInstanceProps: t.widgetInstanceProps,
1470
+ mounts: t.mounts
1372
1471
  }));
1373
- return (p, h) => o.value ? (y(), b(I, { key: 0 }, [
1374
- r.value ? (y(), b("div", {
1472
+ return (l, g) => o.value ? (y(), b(A, { key: 0 }, [
1473
+ c.value ? (y(), b("div", {
1375
1474
  key: 0,
1376
- class: B(a.value || void 0),
1377
- style: S(c.value)
1475
+ class: K(m.value || void 0),
1476
+ style: S(r.value)
1378
1477
  }, [
1379
- (y(), A(R(o.value), Z(ge(u.value)), null, 16))
1380
- ], 6)) : !l.value && a.value ? (y(), b("div", {
1478
+ (y(), C(W(o.value), J(we(d.value)), null, 16))
1479
+ ], 6)) : !a.value && m.value ? (y(), b("div", {
1381
1480
  key: 1,
1382
- class: B(a.value)
1481
+ class: K(m.value)
1383
1482
  }, [
1384
- (y(), A(R(o.value), Z(ge(u.value)), null, 16))
1385
- ], 2)) : (y(), A(R(o.value), Z(qe({ key: 2 }, u.value)), null, 16))
1386
- ], 64)) : W("", !0);
1483
+ (y(), C(W(o.value), J(we(d.value)), null, 16))
1484
+ ], 2)) : (y(), C(W(o.value), J(ot({ key: 2 }, d.value)), null, 16))
1485
+ ], 64)) : N("", !0);
1387
1486
  }
1388
- }), po = /* @__PURE__ */ D({
1487
+ }), So = ["data-rulecms-overlay-layer"], ko = /* @__PURE__ */ D({
1389
1488
  __name: "RenderComponentsInner",
1390
1489
  props: {
1391
1490
  displayItemList: {},
@@ -1397,80 +1496,198 @@ ${i.value}
1397
1496
  plugins: {},
1398
1497
  deviceDisplayType: {},
1399
1498
  componentProps: {},
1499
+ mounts: {},
1400
1500
  ancestorColumnIds: {}
1401
1501
  },
1402
1502
  setup(e) {
1403
- const t = e, n = () => te(t.plugins).components;
1404
- function o(a) {
1405
- if (t.isComposeMode && a.type === re.DroppableBox)
1503
+ const t = e, n = () => ne(t.plugins).components, o = h(
1504
+ () => !t.isComposeMode && Jn(t.displayItemList) && !ge({
1505
+ containerAttributes: t.displayItemList.containerAttributes,
1506
+ deviceDisplayType: t.deviceDisplayType
1507
+ })
1508
+ ), s = h(() => {
1509
+ const u = Se({
1510
+ containerAttributes: t.displayItemList.containerAttributes,
1511
+ deviceDisplayType: t.deviceDisplayType
1512
+ });
1513
+ return no({
1514
+ isWithinCollection: t.isWithinCollection,
1515
+ baseDeclaresOwnHeight: ze({
1516
+ containerAttributes: t.displayItemList.containerAttributes,
1517
+ widgetContainerStyles: He({
1518
+ containerAttributes: t.displayItemList.containerAttributes,
1519
+ deviceDisplayType: t.deviceDisplayType,
1520
+ isComposeMode: t.isComposeMode
1521
+ })
1522
+ }),
1523
+ baseZIndex: u
1524
+ });
1525
+ }), i = h(() => {
1526
+ var l;
1527
+ const u = ((l = t.displayItemList.overlayLayers) == null ? void 0 : l.layers) ?? [], d = Se({
1528
+ containerAttributes: t.displayItemList.containerAttributes,
1529
+ deviceDisplayType: t.deviceDisplayType
1530
+ });
1531
+ return u.flatMap((g, p) => to({ layer: g, deviceDisplayType: t.deviceDisplayType }) ? [] : [
1532
+ {
1533
+ index: p,
1534
+ layer: g,
1535
+ boxStyles: oo({
1536
+ zIndex: Qn(d, p),
1537
+ pointerEvents: eo({
1538
+ containerAttributes: g.containerAttributes,
1539
+ deviceDisplayType: t.deviceDisplayType
1540
+ })
1541
+ })
1542
+ }
1543
+ ]);
1544
+ });
1545
+ function r(u) {
1546
+ if (t.isComposeMode && u.type === ce.DroppableBox)
1406
1547
  return !1;
1407
- const { componentAttributesBasedOnDevice: r } = Ce({
1408
- col: a,
1548
+ const { componentAttributesBasedOnDevice: d } = Ie({
1549
+ col: u,
1409
1550
  deviceDisplayType: t.deviceDisplayType,
1410
1551
  isComposeMode: t.isComposeMode,
1411
- sourceComponentsPlugin: te(t.plugins)
1412
- }), l = !!r && r["hide-component-3-resolutions"] === "true";
1552
+ sourceComponentsPlugin: ne(t.plugins)
1553
+ }), l = !!d && d["hide-component-3-resolutions"] === "true";
1413
1554
  return !(!t.isComposeMode && l);
1414
1555
  }
1415
- function s(a) {
1416
- const { componentAttributesBasedOnDevice: r, componentStyles: l } = Ce({
1417
- col: a,
1556
+ function f(u) {
1557
+ const { componentAttributesBasedOnDevice: d, componentStyles: l } = Ie({
1558
+ col: u,
1418
1559
  deviceDisplayType: t.deviceDisplayType,
1419
1560
  isComposeMode: t.isComposeMode,
1420
- sourceComponentsPlugin: te(t.plugins)
1561
+ sourceComponentsPlugin: ne(t.plugins)
1421
1562
  });
1422
1563
  return {
1423
- componentAttributes: r,
1564
+ componentAttributes: d,
1424
1565
  styleProps: l
1425
1566
  };
1426
1567
  }
1427
- function i(a) {
1428
- const r = Le(a.type);
1429
- if (!(r != null && r.length))
1568
+ function m(u) {
1569
+ const d = je(u.type);
1570
+ if (!(d != null && d.length))
1430
1571
  return null;
1431
- const l = a.collection ?? t.widgetCollections[r];
1572
+ const l = u.collection ?? t.widgetCollections[d];
1432
1573
  if (!l)
1433
1574
  throw new Error(
1434
- `DisplayCollection - Collection with ID ${r} not found in widgetCollections. Available collections: ${Object.keys(t.widgetCollections).join(", ")}`
1575
+ `DisplayCollection - Collection with ID ${d} not found in widgetCollections. Available collections: ${Object.keys(t.widgetCollections).join(", ")}`
1435
1576
  );
1436
- return !l.collectionRows || !$n(l.collectionRows) ? null : l.collectionRows;
1577
+ return !l.collectionRows || !Fn(l.collectionRows) ? null : l.collectionRows;
1437
1578
  }
1438
- function c(a) {
1439
- return [...t.ancestorColumnIds ?? [], a];
1579
+ function c(u) {
1580
+ return [...t.ancestorColumnIds ?? [], u];
1440
1581
  }
1441
- function d(a) {
1442
- return Kn({
1582
+ function a(u) {
1583
+ return so({
1443
1584
  componentProps: t.componentProps,
1444
1585
  ancestorColumnIds: t.ancestorColumnIds,
1445
- columnId: a
1586
+ columnId: u
1446
1587
  });
1447
1588
  }
1448
- return (a, r) => {
1449
- const l = Xe("RenderComponentsInner", !0);
1450
- return y(), A(to, {
1589
+ return (u, d) => {
1590
+ const l = st("RenderComponentsInner", !0);
1591
+ return o.value ? (y(), b("div", {
1592
+ key: 0,
1593
+ style: S(s.value)
1594
+ }, [
1595
+ U(ke, {
1596
+ "display-item-list": e.displayItemList,
1597
+ "is-compose-mode": e.isComposeMode,
1598
+ "show-drop-containers": e.showDropContainers,
1599
+ "is-within-collection": e.isWithinCollection,
1600
+ "device-display-type": e.deviceDisplayType
1601
+ }, {
1602
+ default: M(() => [
1603
+ (y(!0), b(A, null, R(e.displayItemList.rows, (g) => (y(), C(De, {
1604
+ key: g.id,
1605
+ row: g,
1606
+ "is-compose-mode": e.isComposeMode,
1607
+ "show-drop-containers": e.showDropContainers,
1608
+ "is-within-collection": e.isWithinCollection,
1609
+ "device-display-type": e.deviceDisplayType
1610
+ }, {
1611
+ default: M(() => [
1612
+ (y(!0), b(A, null, R(g.columns, (p) => (y(), b(A, {
1613
+ key: p.id
1614
+ }, [
1615
+ r(p) ? (y(), b(A, { key: 0 }, [
1616
+ m(p) ? (y(), C(l, {
1617
+ key: 0,
1618
+ "display-item-list": m(p),
1619
+ "is-compose-mode": e.isComposeMode,
1620
+ "is-within-collection": !0,
1621
+ "widget-collections": e.widgetCollections,
1622
+ "show-drop-containers": e.showDropContainers,
1623
+ "redux-device-display-type": e.reduxDeviceDisplayType,
1624
+ plugins: e.plugins,
1625
+ "device-display-type": e.deviceDisplayType,
1626
+ "component-props": e.componentProps,
1627
+ mounts: e.mounts,
1628
+ "ancestor-column-ids": c(p.id)
1629
+ }, null, 8, ["display-item-list", "is-compose-mode", "widget-collections", "show-drop-containers", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "ancestor-column-ids"])) : (y(), C(Te, {
1630
+ key: 1,
1631
+ "component-type": p.type,
1632
+ "library-id": p.libraryId,
1633
+ "component-attributes": f(p).componentAttributes,
1634
+ components: n(),
1635
+ "style-props": f(p).styleProps,
1636
+ "widget-instance-props": a(p.id),
1637
+ mounts: e.mounts
1638
+ }, null, 8, ["component-type", "library-id", "component-attributes", "components", "style-props", "widget-instance-props", "mounts"]))
1639
+ ], 64)) : N("", !0)
1640
+ ], 64))), 128))
1641
+ ]),
1642
+ _: 2
1643
+ }, 1032, ["row", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]))), 128))
1644
+ ]),
1645
+ _: 1
1646
+ }, 8, ["display-item-list", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]),
1647
+ (y(!0), b(A, null, R(i.value, (g) => (y(), b("div", {
1648
+ key: g.index,
1649
+ "data-rulecms-overlay-layer": g.index,
1650
+ style: S(g.boxStyles)
1651
+ }, [
1652
+ U(l, {
1653
+ "display-item-list": g.layer,
1654
+ "is-compose-mode": e.isComposeMode,
1655
+ "is-within-collection": !1,
1656
+ "widget-collections": e.widgetCollections,
1657
+ "show-drop-containers": !1,
1658
+ "redux-device-display-type": e.reduxDeviceDisplayType,
1659
+ plugins: e.plugins,
1660
+ "device-display-type": e.deviceDisplayType,
1661
+ "component-props": e.componentProps,
1662
+ mounts: e.mounts,
1663
+ "ancestor-column-ids": e.ancestorColumnIds
1664
+ }, null, 8, ["display-item-list", "is-compose-mode", "widget-collections", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "ancestor-column-ids"])
1665
+ ], 12, So))), 128))
1666
+ ], 4)) : (y(), C(ke, {
1667
+ key: 1,
1451
1668
  "display-item-list": e.displayItemList,
1452
1669
  "is-compose-mode": e.isComposeMode,
1453
1670
  "show-drop-containers": e.showDropContainers,
1454
1671
  "is-within-collection": e.isWithinCollection,
1455
1672
  "device-display-type": e.deviceDisplayType
1456
1673
  }, {
1457
- default: F(() => [
1458
- (y(!0), b(I, null, z(e.displayItemList.rows, (f) => (y(), A(oo, {
1459
- key: f.id,
1460
- row: f,
1674
+ default: M(() => [
1675
+ (y(!0), b(A, null, R(e.displayItemList.rows, (g) => (y(), C(De, {
1676
+ key: g.id,
1677
+ row: g,
1461
1678
  "is-compose-mode": e.isComposeMode,
1462
1679
  "show-drop-containers": e.showDropContainers,
1463
1680
  "is-within-collection": e.isWithinCollection,
1464
1681
  "device-display-type": e.deviceDisplayType
1465
1682
  }, {
1466
- default: F(() => [
1467
- (y(!0), b(I, null, z(f.columns, (u) => (y(), b(I, {
1468
- key: u.id
1683
+ default: M(() => [
1684
+ (y(!0), b(A, null, R(g.columns, (p) => (y(), b(A, {
1685
+ key: p.id
1469
1686
  }, [
1470
- o(u) ? (y(), b(I, { key: 0 }, [
1471
- i(u) ? (y(), A(l, {
1687
+ r(p) ? (y(), b(A, { key: 0 }, [
1688
+ m(p) ? (y(), C(l, {
1472
1689
  key: 0,
1473
- "display-item-list": i(u),
1690
+ "display-item-list": m(p),
1474
1691
  "is-compose-mode": e.isComposeMode,
1475
1692
  "is-within-collection": !0,
1476
1693
  "widget-collections": e.widgetCollections,
@@ -1479,27 +1696,29 @@ ${i.value}
1479
1696
  plugins: e.plugins,
1480
1697
  "device-display-type": e.deviceDisplayType,
1481
1698
  "component-props": e.componentProps,
1482
- "ancestor-column-ids": c(u.id)
1483
- }, null, 8, ["display-item-list", "is-compose-mode", "widget-collections", "show-drop-containers", "redux-device-display-type", "plugins", "device-display-type", "component-props", "ancestor-column-ids"])) : (y(), A(uo, {
1699
+ mounts: e.mounts,
1700
+ "ancestor-column-ids": c(p.id)
1701
+ }, null, 8, ["display-item-list", "is-compose-mode", "widget-collections", "show-drop-containers", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "ancestor-column-ids"])) : (y(), C(Te, {
1484
1702
  key: 1,
1485
- "component-type": u.type,
1486
- "library-id": u.libraryId,
1487
- "component-attributes": s(u).componentAttributes,
1703
+ "component-type": p.type,
1704
+ "library-id": p.libraryId,
1705
+ "component-attributes": f(p).componentAttributes,
1488
1706
  components: n(),
1489
- "style-props": s(u).styleProps,
1490
- "widget-instance-props": d(u.id)
1491
- }, null, 8, ["component-type", "library-id", "component-attributes", "components", "style-props", "widget-instance-props"]))
1492
- ], 64)) : W("", !0)
1707
+ "style-props": f(p).styleProps,
1708
+ "widget-instance-props": a(p.id),
1709
+ mounts: e.mounts
1710
+ }, null, 8, ["component-type", "library-id", "component-attributes", "components", "style-props", "widget-instance-props", "mounts"]))
1711
+ ], 64)) : N("", !0)
1493
1712
  ], 64))), 128))
1494
1713
  ]),
1495
1714
  _: 2
1496
1715
  }, 1032, ["row", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]))), 128))
1497
1716
  ]),
1498
1717
  _: 1
1499
- }, 8, ["display-item-list", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]);
1718
+ }, 8, ["display-item-list", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]));
1500
1719
  };
1501
1720
  }
1502
- }), oe = /* @__PURE__ */ D({
1721
+ }), ie = /* @__PURE__ */ D({
1503
1722
  __name: "RenderComponentsForDevice",
1504
1723
  props: {
1505
1724
  displayItemList: {},
@@ -1511,12 +1730,13 @@ ${i.value}
1511
1730
  deviceDisplayType: {},
1512
1731
  plugins: {},
1513
1732
  componentProps: {},
1733
+ mounts: {},
1514
1734
  ancestorColumnIds: {}
1515
1735
  },
1516
1736
  setup(e) {
1517
1737
  return (t, n) => {
1518
1738
  var o, s;
1519
- return (s = (o = e.displayItemList) == null ? void 0 : o.rows) != null && s.length ? (y(), A(po, {
1739
+ return (s = (o = e.displayItemList) == null ? void 0 : o.rows) != null && s.length ? (y(), C(ko, {
1520
1740
  key: 0,
1521
1741
  "display-item-list": e.displayItemList,
1522
1742
  "is-compose-mode": e.isComposeMode,
@@ -1527,71 +1747,74 @@ ${i.value}
1527
1747
  plugins: e.plugins,
1528
1748
  "device-display-type": e.deviceDisplayType,
1529
1749
  "component-props": e.componentProps,
1750
+ mounts: e.mounts,
1530
1751
  "ancestor-column-ids": e.ancestorColumnIds
1531
- }, null, 8, ["display-item-list", "is-compose-mode", "is-within-collection", "widget-collections", "show-drop-containers", "redux-device-display-type", "plugins", "device-display-type", "component-props", "ancestor-column-ids"])) : W("", !0);
1752
+ }, null, 8, ["display-item-list", "is-compose-mode", "is-within-collection", "widget-collections", "show-drop-containers", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "ancestor-column-ids"])) : N("", !0);
1532
1753
  };
1533
1754
  }
1534
- }), Ve = /* @__PURE__ */ D({
1755
+ }), Xe = /* @__PURE__ */ D({
1535
1756
  __name: "LibraryStylesheets",
1536
1757
  props: {
1537
1758
  stylesheets: {}
1538
1759
  },
1539
1760
  setup(e) {
1540
- return (t, n) => (y(!0), b(I, null, z(e.stylesheets ?? [], (o) => (y(), A(R("style"), {
1761
+ return (t, n) => (y(!0), b(A, null, R(e.stylesheets ?? [], (o) => (y(), C(W("style"), {
1541
1762
  key: o,
1542
1763
  "data-rulecms-library-stylesheet": ""
1543
1764
  }, {
1544
- default: F(() => [
1545
- ie(Y(o), 1)
1765
+ default: M(() => [
1766
+ le(q(o), 1)
1546
1767
  ]),
1547
1768
  _: 2
1548
1769
  }, 1024))), 128));
1549
1770
  }
1550
- }), fo = /* @__PURE__ */ D({
1771
+ }), Do = /* @__PURE__ */ D({
1551
1772
  __name: "BreakpointVariantRender",
1552
1773
  props: {
1553
1774
  displayItemList: {},
1554
1775
  widgetCollections: {},
1555
1776
  plugins: {},
1556
1777
  componentProps: {},
1778
+ mounts: {},
1557
1779
  scopeIdInput: {}
1558
1780
  },
1559
1781
  setup(e) {
1560
1782
  const t = ["Phone", "Tablet", "Desktop"];
1561
1783
  let n = 0;
1562
- const o = e, s = `rulecms-bp-${++n}`, i = m(() => o.scopeIdInput ?? s), c = m(
1563
- () => Xn(o.displayItemList, o.widgetCollections)
1564
- ), d = m(() => Qn(i.value));
1565
- return (a, r) => {
1566
- var l;
1567
- return y(), b(I, null, [
1568
- ne(Ve, {
1569
- stylesheets: (l = e.plugins.sourceComponents) == null ? void 0 : l.stylesheets
1784
+ const o = e, s = `rulecms-bp-${++n}`, i = h(() => o.scopeIdInput ?? s), r = h(
1785
+ () => po(o.displayItemList, o.widgetCollections)
1786
+ ), f = h(() => mo(i.value));
1787
+ return (m, c) => {
1788
+ var a;
1789
+ return y(), b(A, null, [
1790
+ U(Xe, {
1791
+ stylesheets: (a = e.plugins.sourceComponents) == null ? void 0 : a.stylesheets
1570
1792
  }, null, 8, ["stylesheets"]),
1571
- c.value ? (y(), b(I, { key: 1 }, [
1572
- (y(), A(R("style"), null, {
1573
- default: F(() => [
1574
- ie(Y(d.value), 1)
1793
+ r.value ? (y(), b(A, { key: 1 }, [
1794
+ (y(), C(W("style"), null, {
1795
+ default: M(() => [
1796
+ le(q(f.value), 1)
1575
1797
  ]),
1576
1798
  _: 1
1577
1799
  })),
1578
- (y(), b(I, null, z(t, (f) => $("div", {
1579
- key: f,
1580
- class: B(`${i.value}-${f.toLowerCase()}`)
1800
+ (y(), b(A, null, R(t, (u) => $("div", {
1801
+ key: u,
1802
+ class: K(`${i.value}-${u.toLowerCase()}`)
1581
1803
  }, [
1582
- ne(oe, {
1804
+ U(ie, {
1583
1805
  "display-item-list": e.displayItemList,
1584
1806
  "is-compose-mode": !1,
1585
1807
  "is-within-collection": !1,
1586
1808
  "widget-collections": e.widgetCollections,
1587
1809
  "show-drop-containers": !1,
1588
1810
  "redux-device-display-type": "desktop",
1589
- "device-display-type": f,
1811
+ "device-display-type": u,
1590
1812
  plugins: e.plugins,
1591
- "component-props": e.componentProps
1592
- }, null, 8, ["display-item-list", "widget-collections", "device-display-type", "plugins", "component-props"])
1813
+ "component-props": e.componentProps,
1814
+ mounts: e.mounts
1815
+ }, null, 8, ["display-item-list", "widget-collections", "device-display-type", "plugins", "component-props", "mounts"])
1593
1816
  ], 2)), 64))
1594
- ], 64)) : (y(), A(oe, {
1817
+ ], 64)) : (y(), C(ie, {
1595
1818
  key: 0,
1596
1819
  "display-item-list": e.displayItemList,
1597
1820
  "is-compose-mode": !1,
@@ -1601,13 +1824,14 @@ ${i.value}
1601
1824
  "redux-device-display-type": "desktop",
1602
1825
  "device-display-type": "Desktop",
1603
1826
  plugins: e.plugins,
1604
- "component-props": e.componentProps
1605
- }, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props"]))
1827
+ "component-props": e.componentProps,
1828
+ mounts: e.mounts
1829
+ }, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts"]))
1606
1830
  ], 64);
1607
1831
  };
1608
1832
  }
1609
1833
  });
1610
- function yo(e, t, n) {
1834
+ function To(e, t, n) {
1611
1835
  if (e)
1612
1836
  return "Phone";
1613
1837
  if (t)
@@ -1615,7 +1839,7 @@ function yo(e, t, n) {
1615
1839
  const o = (n == null ? void 0 : n.toLowerCase()) || "desktop";
1616
1840
  return o === "phone" ? "Phone" : o === "tablet" ? "Tablet" : "Desktop";
1617
1841
  }
1618
- const mo = `(max-width: ${Ne})`, go = `(max-width: ${We})`, ho = /* @__PURE__ */ D({
1842
+ const xo = `(max-width: ${Fe})`, Eo = `(max-width: ${Ve})`, Po = /* @__PURE__ */ D({
1619
1843
  __name: "RenderComponents",
1620
1844
  props: {
1621
1845
  displayItemList: {},
@@ -1625,30 +1849,31 @@ const mo = `(max-width: ${Ne})`, go = `(max-width: ${We})`, ho = /* @__PURE__ */
1625
1849
  showDropContainers: { type: Boolean },
1626
1850
  reduxDeviceDisplayType: {},
1627
1851
  plugins: {},
1628
- componentProps: {}
1852
+ componentProps: {},
1853
+ mounts: {}
1629
1854
  },
1630
1855
  setup(e) {
1631
- const t = e, n = j("Desktop");
1856
+ const t = e, n = V("Desktop");
1632
1857
  let o, s;
1633
1858
  function i() {
1634
- n.value = yo(
1859
+ n.value = To(
1635
1860
  (o == null ? void 0 : o.matches) ?? !1,
1636
1861
  (s == null ? void 0 : s.matches) ?? !1,
1637
1862
  t.reduxDeviceDisplayType
1638
1863
  );
1639
1864
  }
1640
- return Ze(() => {
1641
- typeof matchMedia == "function" && (o = matchMedia(mo), s = matchMedia(go), o.addEventListener("change", i), s.addEventListener("change", i)), i();
1642
- }), xe(() => {
1865
+ return it(() => {
1866
+ typeof matchMedia == "function" && (o = matchMedia(xo), s = matchMedia(Eo), o.addEventListener("change", i), s.addEventListener("change", i)), i();
1867
+ }), $e(() => {
1643
1868
  o == null || o.removeEventListener("change", i), s == null || s.removeEventListener("change", i);
1644
- }), (c, d) => {
1645
- var a;
1646
- return y(), b(I, null, [
1647
- e.isWithinCollection ? W("", !0) : (y(), A(Ve, {
1869
+ }), (r, f) => {
1870
+ var m;
1871
+ return y(), b(A, null, [
1872
+ e.isWithinCollection ? N("", !0) : (y(), C(Xe, {
1648
1873
  key: 0,
1649
- stylesheets: (a = e.plugins.sourceComponents) == null ? void 0 : a.stylesheets
1874
+ stylesheets: (m = e.plugins.sourceComponents) == null ? void 0 : m.stylesheets
1650
1875
  }, null, 8, ["stylesheets"])),
1651
- ne(oe, {
1876
+ U(ie, {
1652
1877
  "display-item-list": e.displayItemList,
1653
1878
  "is-compose-mode": e.isComposeMode,
1654
1879
  "is-within-collection": e.isWithinCollection,
@@ -1657,82 +1882,83 @@ const mo = `(max-width: ${Ne})`, go = `(max-width: ${We})`, ho = /* @__PURE__ */
1657
1882
  "redux-device-display-type": e.reduxDeviceDisplayType,
1658
1883
  "device-display-type": n.value,
1659
1884
  plugins: e.plugins,
1660
- "component-props": e.componentProps
1661
- }, null, 8, ["display-item-list", "is-compose-mode", "is-within-collection", "widget-collections", "show-drop-containers", "redux-device-display-type", "device-display-type", "plugins", "component-props"])
1885
+ "component-props": e.componentProps,
1886
+ mounts: e.mounts
1887
+ }, null, 8, ["display-item-list", "is-compose-mode", "is-within-collection", "widget-collections", "show-drop-containers", "redux-device-display-type", "device-display-type", "plugins", "component-props", "mounts"])
1662
1888
  ], 64);
1663
1889
  };
1664
1890
  }
1665
1891
  });
1666
- function bo(e) {
1892
+ function Lo(e) {
1667
1893
  const t = {};
1668
1894
  return Object.entries(e).forEach(([n, o]) => {
1669
1895
  const s = { ...o };
1670
1896
  if (s.itemList)
1671
1897
  try {
1672
1898
  s.collectionRows = typeof s.itemList == "string" ? JSON.parse(s.itemList) : s.itemList;
1673
- } catch (c) {
1674
- console.error(`Failed to parse itemList for collection ${n}:`, c), s.collectionRows = { rows: [] };
1899
+ } catch (r) {
1900
+ console.error(`Failed to parse itemList for collection ${n}:`, r), s.collectionRows = { rows: [] };
1675
1901
  }
1676
1902
  let i = `${s.name}$${n}`;
1677
1903
  s.parentId && (i = `${i}@${s.parentId}`), t[i] = s;
1678
1904
  }), t;
1679
1905
  }
1680
- function wo(e) {
1906
+ function $o(e) {
1681
1907
  return typeof e.itemList == "string" ? JSON.parse(e.itemList) : e.itemList;
1682
1908
  }
1683
- function Ke(e) {
1909
+ function Ze(e) {
1684
1910
  return {
1685
- displayItemList: wo(e.widget),
1686
- widgetCollections: bo(e.childCollections),
1911
+ displayItemList: $o(e.widget),
1912
+ widgetCollections: Lo(e.childCollections),
1687
1913
  ...e.libraries ? { libraries: e.libraries } : {}
1688
1914
  };
1689
1915
  }
1690
- function Co(e) {
1691
- const t = e.registry ?? q(), n = le({
1916
+ function Ro(e) {
1917
+ const t = e.registry ?? X(), n = ae({
1692
1918
  displayItemList: e.displayItemList,
1693
1919
  widgetCollections: e.widgetCollections
1694
1920
  });
1695
1921
  return t.resolveSync({ registrations: e.libraries, referenced: n });
1696
1922
  }
1697
- function vo(e) {
1698
- const t = e.registry ?? q(), n = le({
1923
+ function Mo(e) {
1924
+ const t = e.registry ?? X(), n = ae({
1699
1925
  displayItemList: e.displayItemList,
1700
1926
  widgetCollections: e.widgetCollections
1701
1927
  });
1702
1928
  return t.resolve({ registrations: e.libraries, referenced: n });
1703
1929
  }
1704
- const Ao = {
1930
+ const No = {
1705
1931
  display: "flex",
1706
1932
  justifyContent: "center",
1707
1933
  alignItems: "center",
1708
1934
  padding: "3rem",
1709
1935
  color: "#e2e8f0"
1710
- }, So = {
1936
+ }, Wo = {
1711
1937
  display: "flex",
1712
1938
  alignItems: "center",
1713
1939
  gap: "1rem"
1714
- }, Io = {
1940
+ }, Oo = {
1715
1941
  width: "40px",
1716
1942
  height: "40px",
1717
1943
  border: "4px solid #4a5568",
1718
1944
  borderTopColor: "#63b3ed",
1719
1945
  borderRadius: "50%",
1720
1946
  animation: "spin 1s linear infinite"
1721
- }, Se = {
1947
+ }, xe = {
1722
1948
  padding: "1.5rem",
1723
1949
  backgroundColor: "#742a2a",
1724
1950
  border: "1px solid #9b2c2c",
1725
1951
  borderRadius: "8px",
1726
1952
  color: "#fed7d7"
1727
- }, Ie = {
1953
+ }, Ee = {
1728
1954
  fontSize: "16px",
1729
1955
  fontWeight: "600",
1730
1956
  marginBottom: "0.5rem",
1731
1957
  color: "#feb2b2"
1732
- }, ke = {
1958
+ }, Pe = {
1733
1959
  fontSize: "14px",
1734
1960
  color: "#fed7d7"
1735
- }, ko = `
1961
+ }, jo = `
1736
1962
  @keyframes spin {
1737
1963
  from {
1738
1964
  transform: rotate(0deg);
@@ -1741,7 +1967,7 @@ const Ao = {
1741
1967
  transform: rotate(360deg);
1742
1968
  }
1743
1969
  }
1744
- `, Ko = "data-rulecms-published-key", Do = ["data-rulecms-published-key"], Uo = /* @__PURE__ */ D({
1970
+ `, ns = "data-rulecms-published-key", Bo = ["data-rulecms-published-key"], os = /* @__PURE__ */ D({
1745
1971
  __name: "RuleCMSWidget",
1746
1972
  props: {
1747
1973
  publishedKey: {},
@@ -1750,97 +1976,98 @@ const Ao = {
1750
1976
  mode: { default: "client-fetch" },
1751
1977
  initialData: {},
1752
1978
  libraries: {},
1753
- componentProps: {}
1979
+ componentProps: {},
1980
+ mounts: {}
1754
1981
  },
1755
1982
  setup(e) {
1756
- const t = e, n = Je(Me, null), o = j(!1), s = j(null), i = j(null), c = j(null), d = m(() => t.mode === "pre-fetched"), a = m(() => ({
1757
- sourceComponents: c.value ?? void 0
1983
+ const t = e, n = rt(Be, null), o = V(!1), s = V(null), i = V(null), r = V(null), f = h(() => t.mode === "pre-fetched"), m = h(() => ({
1984
+ sourceComponents: r.value ?? void 0
1758
1985
  }));
1759
- let r = null, l = null, f = !1;
1760
- function u() {
1986
+ let c = null, a = null, u = !1;
1987
+ function d() {
1761
1988
  if (!i.value) {
1762
- c.value = null;
1989
+ r.value = null;
1763
1990
  return;
1764
1991
  }
1765
- const C = t.libraries ?? (n == null ? void 0 : n.libraries), x = n == null ? void 0 : n.libraryRegistry, O = Co({
1992
+ const v = t.libraries ?? (n == null ? void 0 : n.libraries), T = n == null ? void 0 : n.libraryRegistry, F = Ro({
1766
1993
  displayItemList: i.value.displayItemList,
1767
1994
  widgetCollections: i.value.widgetCollections,
1768
- libraries: C,
1769
- registry: x
1995
+ libraries: v,
1996
+ registry: T
1770
1997
  });
1771
- if (O) {
1772
- c.value = O;
1998
+ if (F) {
1999
+ r.value = F;
1773
2000
  return;
1774
2001
  }
1775
- vo({
2002
+ Mo({
1776
2003
  displayItemList: i.value.displayItemList,
1777
2004
  widgetCollections: i.value.widgetCollections,
1778
- libraries: C,
1779
- registry: x
1780
- }).then((X) => {
1781
- c.value = X;
2005
+ libraries: v,
2006
+ registry: T
2007
+ }).then((Z) => {
2008
+ r.value = Z;
1782
2009
  });
1783
2010
  }
1784
- function p() {
1785
- i.value && zn({
2011
+ function l() {
2012
+ i.value && co({
1786
2013
  componentProps: t.componentProps,
1787
2014
  displayItemList: i.value.displayItemList,
1788
2015
  widgetCollections: i.value.widgetCollections,
1789
2016
  publishedKey: t.publishedKey
1790
2017
  });
1791
2018
  }
1792
- function h() {
1793
- if (f || typeof document > "u")
2019
+ function g() {
2020
+ if (u || typeof document > "u")
1794
2021
  return;
1795
- const C = "rulecms-widget-spinner-styles";
1796
- if (!document.getElementById(C)) {
1797
- const x = document.createElement("style");
1798
- x.id = C, x.textContent = ko, document.head.appendChild(x);
2022
+ const v = "rulecms-widget-spinner-styles";
2023
+ if (!document.getElementById(v)) {
2024
+ const T = document.createElement("style");
2025
+ T.id = v, T.textContent = jo, document.head.appendChild(T);
1799
2026
  }
1800
- f = !0;
2027
+ u = !0;
1801
2028
  }
1802
- function g() {
1803
- const C = t.token ?? (n == null ? void 0 : n.token), x = t.endpoint ?? (n == null ? void 0 : n.endpoint);
1804
- if (!t.publishedKey || !C) {
1805
- s.value = t.publishedKey ? "Token is required. Provide it either directly as a prop (`token`) or via RuleCMSWidgetProvider." : L(C) ? "Widget key is required" : "Published key is required", i.value = null;
2029
+ function p() {
2030
+ const v = t.token ?? (n == null ? void 0 : n.token), T = t.endpoint ?? (n == null ? void 0 : n.endpoint);
2031
+ if (!t.publishedKey || !v) {
2032
+ s.value = t.publishedKey ? "Token is required. Provide it either directly as a prop (`token`) or via RuleCMSWidgetProvider." : O(v) ? "Widget key is required" : "Published key is required", i.value = null;
1806
2033
  return;
1807
2034
  }
1808
- const O = `${t.publishedKey}|${C}`;
1809
- if (l === O && i.value) {
1810
- u();
2035
+ const F = `${t.publishedKey}|${v}`;
2036
+ if (a === F && i.value) {
2037
+ d();
1811
2038
  return;
1812
2039
  }
1813
- r == null || r.abort(), r = new AbortController();
1814
- const X = r.signal;
1815
- l = O, o.value = !0, s.value = null;
1816
- const Ue = $e({ publishedKey: t.publishedKey, token: C, endpoint: x });
1817
- fetch(Ue, {
2040
+ c == null || c.abort(), c = new AbortController();
2041
+ const Z = c.signal;
2042
+ a = F, o.value = !0, s.value = null;
2043
+ const Je = We({ publishedKey: t.publishedKey, token: v, endpoint: T });
2044
+ fetch(Je, {
1818
2045
  method: "GET",
1819
2046
  headers: { "Content-Type": "application/json" },
1820
- ...L(C) ? { cache: "no-store" } : {},
1821
- signal: X
1822
- }).then(async (E) => {
1823
- if (E.ok) {
1824
- const K = await E.json();
1825
- K.success ? (i.value = Ke(K.data), s.value = null, u(), p()) : (s.value = "Failed to fetch widget data", i.value = null);
2047
+ ...O(v) ? { cache: "no-store" } : {},
2048
+ signal: Z
2049
+ }).then(async (P) => {
2050
+ if (P.ok) {
2051
+ const z = await P.json();
2052
+ z.success ? (i.value = Ze(z.data), s.value = null, d(), l()) : (s.value = "Failed to fetch widget data", i.value = null);
1826
2053
  } else {
1827
- const K = await E.json().catch(() => ({ error: "Unknown error" }));
1828
- s.value = K.error || `Request failed with status ${E.status}`, i.value = null;
2054
+ const z = await P.json().catch(() => ({ error: "Unknown error" }));
2055
+ s.value = z.error || `Request failed with status ${P.status}`, i.value = null;
1829
2056
  }
1830
- }).catch((E) => {
1831
- E instanceof DOMException && E.name === "AbortError" || (console.error("Error fetching widget:", E), s.value = "Failed to fetch widget", i.value = null);
2057
+ }).catch((P) => {
2058
+ P instanceof DOMException && P.name === "AbortError" || (console.error("Error fetching widget:", P), s.value = "Failed to fetch widget", i.value = null);
1832
2059
  }).finally(() => {
1833
2060
  o.value = !1;
1834
2061
  });
1835
2062
  }
1836
- function v() {
2063
+ function I() {
1837
2064
  if (t.mode === "pre-fetched") {
1838
- i.value = t.initialData ?? null, o.value = !1, s.value = null, u(), p();
2065
+ i.value = t.initialData ?? null, o.value = !1, s.value = null, d(), l();
1839
2066
  return;
1840
2067
  }
1841
- h(), g();
2068
+ g(), p();
1842
2069
  }
1843
- return De(
2070
+ return Le(
1844
2071
  () => [
1845
2072
  t.publishedKey,
1846
2073
  t.token,
@@ -1851,54 +2078,55 @@ const Ao = {
1851
2078
  t.componentProps
1852
2079
  ],
1853
2080
  () => {
1854
- v();
2081
+ I();
1855
2082
  },
1856
2083
  { immediate: !0 }
1857
- ), xe(() => {
1858
- r == null || r.abort();
1859
- }), (C, x) => (y(), b("span", {
2084
+ ), $e(() => {
2085
+ c == null || c.abort();
2086
+ }), (v, T) => (y(), b("span", {
1860
2087
  "data-rulecms-published-key": e.publishedKey,
1861
2088
  style: { display: "contents" }
1862
2089
  }, [
1863
2090
  e.mode !== "pre-fetched" && o.value ? (y(), b("div", {
1864
2091
  key: 0,
1865
- style: S(T(Ao))
2092
+ style: S(x(No))
1866
2093
  }, [
1867
2094
  $("div", {
1868
- style: S(T(So))
2095
+ style: S(x(Wo))
1869
2096
  }, [
1870
2097
  $("div", {
1871
- style: S(T(Io))
2098
+ style: S(x(Oo))
1872
2099
  }, null, 4)
1873
2100
  ], 4)
1874
2101
  ], 4)) : e.mode !== "pre-fetched" && s.value ? (y(), b("div", {
1875
2102
  key: 1,
1876
- style: S(T(Se))
2103
+ style: S(x(xe))
1877
2104
  }, [
1878
2105
  $("div", {
1879
- style: S(T(Ie))
2106
+ style: S(x(Ee))
1880
2107
  }, "Error Loading Widget", 4),
1881
2108
  $("div", {
1882
- style: S(T(ke))
1883
- }, Y(s.value), 5)
2109
+ style: S(x(Pe))
2110
+ }, q(s.value), 5)
1884
2111
  ], 4)) : e.mode !== "pre-fetched" && !i.value ? (y(), b("div", {
1885
2112
  key: 2,
1886
- style: S(T(Se))
2113
+ style: S(x(xe))
1887
2114
  }, [
1888
2115
  $("div", {
1889
- style: S(T(Ie))
2116
+ style: S(x(Ee))
1890
2117
  }, "No Widget Data", 4),
1891
2118
  $("div", {
1892
- style: S(T(ke))
2119
+ style: S(x(Pe))
1893
2120
  }, "No widget data available", 4)
1894
- ], 4)) : c.value && i.value ? (y(), b(I, { key: 3 }, [
1895
- d.value ? (y(), A(fo, {
2121
+ ], 4)) : r.value && i.value ? (y(), b(A, { key: 3 }, [
2122
+ f.value ? (y(), C(Do, {
1896
2123
  key: 0,
1897
2124
  "display-item-list": i.value.displayItemList,
1898
2125
  "widget-collections": i.value.widgetCollections,
1899
- plugins: a.value,
1900
- "component-props": e.componentProps
1901
- }, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props"])) : (y(), A(ho, {
2126
+ plugins: m.value,
2127
+ "component-props": e.componentProps,
2128
+ mounts: e.mounts
2129
+ }, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts"])) : (y(), C(Po, {
1902
2130
  key: 1,
1903
2131
  "display-item-list": i.value.displayItemList,
1904
2132
  "is-compose-mode": !1,
@@ -1906,189 +2134,202 @@ const Ao = {
1906
2134
  "widget-collections": i.value.widgetCollections,
1907
2135
  "show-drop-containers": !1,
1908
2136
  "redux-device-display-type": "desktop",
1909
- plugins: a.value,
1910
- "component-props": e.componentProps
1911
- }, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props"]))
1912
- ], 64)) : W("", !0)
1913
- ], 8, Do));
2137
+ plugins: m.value,
2138
+ "component-props": e.componentProps,
2139
+ mounts: e.mounts
2140
+ }, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts"]))
2141
+ ], 64)) : N("", !0)
2142
+ ], 8, Bo));
1914
2143
  }
1915
2144
  });
1916
- class H extends Error {
2145
+ class _ extends Error {
1917
2146
  constructor(n, o) {
1918
2147
  super(n);
1919
- me(this, "status");
2148
+ be(this, "status");
1920
2149
  this.name = "FetchRuleCMSWidgetError", this.status = o;
1921
2150
  }
1922
2151
  }
1923
- async function Ho(e) {
2152
+ async function ss(e) {
1924
2153
  const { publishedKey: t, token: n, endpoint: o, fetchOptions: s } = e;
1925
2154
  if (!t)
1926
- throw new H(
1927
- L(n) ? "Widget key is required" : "Published key is required"
2155
+ throw new _(
2156
+ O(n) ? "Widget key is required" : "Published key is required"
1928
2157
  );
1929
2158
  if (!n)
1930
- throw new H("Token is required");
1931
- const i = $e({ publishedKey: t, token: n, endpoint: o }), c = await fetch(i, {
2159
+ throw new _("Token is required");
2160
+ const i = We({ publishedKey: t, token: n, endpoint: o }), r = await fetch(i, {
1932
2161
  method: "GET",
1933
2162
  headers: { "Content-Type": "application/json" },
1934
- ...L(n) ? { cache: "no-store" } : {},
2163
+ ...O(n) ? { cache: "no-store" } : {},
1935
2164
  ...s
1936
2165
  });
1937
- if (!c.ok) {
1938
- const a = await c.json().catch(() => ({ error: "Unknown error" }));
1939
- throw new H(
1940
- a.error || `Request failed with status ${c.status}`,
1941
- c.status
2166
+ if (!r.ok) {
2167
+ const m = await r.json().catch(() => ({ error: "Unknown error" }));
2168
+ throw new _(
2169
+ m.error || `Request failed with status ${r.status}`,
2170
+ r.status
1942
2171
  );
1943
2172
  }
1944
- const d = await c.json();
1945
- if (!d.success)
1946
- throw new H("Failed to fetch widget data");
1947
- return Ke(d.data);
2173
+ const f = await r.json();
2174
+ if (!f.success)
2175
+ throw new _("Failed to fetch widget data");
2176
+ return Ze(f.data);
1948
2177
  }
1949
- async function Go(e) {
1950
- const { data: t, libraries: n } = e, o = le({
2178
+ async function is(e) {
2179
+ const { data: t, libraries: n } = e, o = ae({
1951
2180
  displayItemList: t.displayItemList,
1952
2181
  widgetCollections: t.widgetCollections
1953
2182
  });
1954
- return q().resolve({ registrations: n, referenced: o });
2183
+ return X().resolve({ registrations: n, referenced: o });
1955
2184
  }
1956
2185
  export {
1957
- Eo as AlignContentTypes,
1958
- fo as BreakpointVariantRender,
1959
- Ee as COLLECTION_TYPE_PREFIX,
1960
- ye as COMPONENT_PROPS_PATH_SEPARATOR,
1961
- pe as CSS_CLASSES_ATTRIBUTE_NAME,
1962
- _t as CSS_VARIABLE_NAME_MAX_LENGTH,
1963
- Wt as CSS_VARIABLE_NAME_PATTERN,
1964
- bt as DEFAULT_CLOUDINARY_CLOUD_NAME,
1965
- V as DEFAULT_LIBRARY_ID,
1966
- Rn as DEFAULT_ROW_GAP,
1967
- ot as DEV_CLIENT_TOKEN_PREFIX,
1968
- lt as DEV_WIDGET_API_PATH,
1969
- $o as DeviceDisplayTypes,
1970
- uo as DisplayComponent,
1971
- re as DisplayItemTypes,
1972
- Pe as DragItemIdPrefixTypes,
1973
- yt as EMBEDDED_KEY_SEPARATOR,
1974
- rn as FLEX_LAYOUT_STYLE_KEYS_THAT_DERIVE_DISPLAY,
1975
- H as FetchRuleCMSWidgetError,
1976
- Oe as HIDE_WIDGET_ATTRIBUTE_NAME,
1977
- we as JustifyContentTypes,
1978
- ft as PUBLISHED_KEY_SEPARATOR,
1979
- rt as PUBLISHED_WIDGET_API_PATH,
1980
- Po as PageViewTypes,
1981
- st as RULECMS_API_ORIGIN,
1982
- Ko as RULECMS_PUBLISHED_KEY_ATTRIBUTE,
1983
- Me as RULECMS_WIDGET_CONTEXT_KEY,
1984
- ho as RenderComponents,
1985
- oe as RenderComponentsForDevice,
1986
- po as RenderComponentsInner,
1987
- Uo as RuleCMSWidget,
1988
- jo as RuleCMSWidgetProvider,
1989
- On as WIDGET_ATTRIBUTES_IGNORED_IN_COMPOSE_MODE,
1990
- it as WIDGET_CACHE_API_ORIGIN,
1991
- en as alignContentAllowlist,
1992
- Jt as alignItemsAllowlist,
1993
- on as backgroundPositionAllowlist,
1994
- sn as backgroundRepeatAllowlist,
1995
- nn as backgroundSizeAllowlist,
1996
- ln as borderStyleKeywords,
1997
- Bt as boxSpacingSideKeys,
1998
- Vo as boxSpacingStyleAttributeEntries,
1999
- Nt as buildCloudinaryBackgroundUrl,
2000
- $e as buildWidgetFetchUrl,
2001
- Un as collectComponentInstancePaths,
2002
- le as collectReferencedLibraryIds,
2003
- nt as composeSourceComponentsPlugin,
2004
- q as createComponentLibraryRegistry,
2005
- Q as cssAttrArrayKey,
2006
- ht as defaultPageWidth,
2007
- Tn as deriveDisplayFlexIfNeeded,
2008
- Bo as desktopModeWidth,
2009
- Ho as fetchRuleCMSWidget,
2010
- Gn as findUnmatchedComponentPropsKeys,
2011
- tn as flexDirectionAllowlist,
2012
- Qt as flexWrapAllowlist,
2013
- Ht as fontFamilyAllowlist,
2014
- zt as fontStyleAllowlist,
2015
- Gt as fontWeightAllowlist,
2016
- gn as formatBackgroundImageStyles,
2017
- hn as formatBorderStyles,
2018
- bn as formatBoxShadowStyles,
2019
- Cn as formatBoxSpacingStyles,
2020
- vn as formatCssColorStyles,
2021
- ue as formatCssColorValue,
2022
- An as formatCssEnumStyles,
2023
- Sn as formatCssLengthStyles,
2186
+ Uo as AlignContentTypes,
2187
+ Do as BreakpointVariantRender,
2188
+ Ne as COLLECTION_TYPE_PREFIX,
2189
+ he as COMPONENT_PROPS_PATH_SEPARATOR,
2190
+ ye as CSS_CLASSES_ATTRIBUTE_NAME,
2191
+ zt as CSS_VARIABLE_NAME_MAX_LENGTH,
2192
+ Ht as CSS_VARIABLE_NAME_PATTERN,
2193
+ Ge as DEFAULT_BASE_Z_INDEX,
2194
+ Dt as DEFAULT_CLOUDINARY_CLOUD_NAME,
2195
+ H as DEFAULT_LIBRARY_ID,
2196
+ Vn as DEFAULT_ROW_GAP,
2197
+ dt as DEV_CLIENT_TOKEN_PREFIX,
2198
+ mt as DEV_WIDGET_API_PATH,
2199
+ Ho as DeviceDisplayTypes,
2200
+ Te as DisplayComponent,
2201
+ ce as DisplayItemTypes,
2202
+ Me as DragItemIdPrefixTypes,
2203
+ At as EMBEDDED_KEY_SEPARATOR,
2204
+ mn as FLEX_LAYOUT_STYLE_KEYS_THAT_DERIVE_DISPLAY,
2205
+ _ as FetchRuleCMSWidgetError,
2206
+ Ue as HIDE_WIDGET_ATTRIBUTE_NAME,
2207
+ Ae as JustifyContentTypes,
2208
+ _n as POINTER_EVENTS_ATTRIBUTE_NAME,
2209
+ vt as PUBLISHED_KEY_SEPARATOR,
2210
+ yt as PUBLISHED_WIDGET_API_PATH,
2211
+ Ko as PageViewTypes,
2212
+ pt as RULECMS_API_ORIGIN,
2213
+ ns as RULECMS_PUBLISHED_KEY_ATTRIBUTE,
2214
+ Be as RULECMS_WIDGET_CONTEXT_KEY,
2215
+ Po as RenderComponents,
2216
+ ie as RenderComponentsForDevice,
2217
+ ko as RenderComponentsInner,
2218
+ os as RuleCMSWidget,
2219
+ Jo as RuleCMSWidgetProvider,
2220
+ Yn as WIDGET_ATTRIBUTES_IGNORED_IN_COMPOSE_MODE,
2221
+ ft as WIDGET_CACHE_API_ORIGIN,
2222
+ Zn as Z_INDEX_WIDGET_ATTRIBUTE_NAME,
2223
+ un as alignContentAllowlist,
2224
+ cn as alignItemsAllowlist,
2225
+ fn as backgroundPositionAllowlist,
2226
+ yn as backgroundRepeatAllowlist,
2227
+ pn as backgroundSizeAllowlist,
2228
+ gn as borderStyleKeywords,
2229
+ Yt as boxSpacingSideKeys,
2230
+ ts as boxSpacingStyleAttributeEntries,
2231
+ Ut as buildCloudinaryBackgroundUrl,
2232
+ oo as buildOverlayLayerBoxStyles,
2233
+ no as buildOverlayStackStyles,
2234
+ We as buildWidgetFetchUrl,
2235
+ io as collectComponentInstancePaths,
2236
+ ae as collectReferencedLibraryIds,
2237
+ ut as composeSourceComponentsPlugin,
2238
+ X as createComponentLibraryRegistry,
2239
+ oe as cssAttrArrayKey,
2240
+ kt as defaultPageWidth,
2241
+ On as deriveDisplayFlexIfNeeded,
2242
+ Qo as desktopModeWidth,
2243
+ ss as fetchRuleCMSWidget,
2244
+ lo as findUnmatchedComponentPropsKeys,
2245
+ dn as flexDirectionAllowlist,
2246
+ an as flexWrapAllowlist,
2247
+ Qt as fontFamilyAllowlist,
2248
+ tn as fontStyleAllowlist,
2249
+ en as fontWeightAllowlist,
2250
+ kn as formatBackgroundImageStyles,
2251
+ Dn as formatBorderStyles,
2252
+ Tn as formatBoxShadowStyles,
2253
+ En as formatBoxSpacingStyles,
2254
+ Pn as formatCssColorStyles,
2255
+ pe as formatCssColorValue,
2256
+ Ln as formatCssEnumStyles,
2257
+ $n as formatCssLengthStyles,
2024
2258
  k as formatCssVariable,
2025
- Fo as formatCssVariableStyles,
2026
- In as formatLineHeightStyles,
2027
- Dn as formatObjectStyleAttribute,
2028
- kn as formatOpacityStyles,
2029
- N as formatSpacingSideValue,
2030
- mt as generatePublishedKey,
2031
- _o as generatePublishedKeyForEmbedded,
2032
- Le as getCollectionIdForCollectionType,
2033
- G as getColumnAttributes,
2034
- Ce as getComponentAttributesAndStyles,
2035
- te as getComponentsPluginFromPlugins,
2259
+ es as formatCssVariableStyles,
2260
+ Rn as formatLineHeightStyles,
2261
+ Nn as formatObjectStyleAttribute,
2262
+ Mn as formatOpacityStyles,
2263
+ B as formatSpacingSideValue,
2264
+ It as generatePublishedKey,
2265
+ Xo as generatePublishedKeyForEmbedded,
2266
+ je as getCollectionIdForCollectionType,
2267
+ Y as getColumnAttributes,
2268
+ Ie as getComponentAttributesAndStyles,
2269
+ ne as getComponentsPluginFromPlugins,
2036
2270
  w as getCssVariableFromLeaf,
2037
- Pn as getDefaultDimensionAttributes,
2038
- _ as getDeviceTypeBasedAttributes,
2039
- Ro as getDragItemId,
2040
- at as getDragItemPrefixAndId,
2041
- ut as getIdAndPrefix,
2042
- En as getMergedAttributes,
2043
- Lo as getNameAndInstanceIdFromWidgetKey,
2044
- Mo as getNameFromWidgetKey,
2045
- dt as getWidgetKeyForCollection,
2046
- No as getWidgetKeyForCollectionWithPrefix,
2047
- pt as getWidgetKeyForPublishedCollection,
2048
- Wo as getWidgetKeyForPublishedCollectionWithPrefix,
2049
- fn as hasBoxShadowLeaf,
2050
- Xn as hasDeviceDivergentValues,
2051
- P as hasInvalidCssVariable,
2052
- $n as hasItems,
2053
- Oo as incrementVersion,
2054
- Ot as isBackgroundImageValue,
2055
- cn as isBorderStyleValue,
2056
- an as isBorderValue,
2057
- pn as isBoxShadowValue,
2058
- Ft as isBoxSpacingValue,
2059
- Et as isCloudinaryCloudName,
2060
- Pt as isCloudinaryPublicId,
2061
- Rt as isCloudinaryTransformationString,
2062
- ae as isCssColorValue,
2063
- Ut as isCssEnumValue,
2064
- _e as isCssVariableName,
2065
- L as isDevClientToken,
2066
- yn as isLineHeightValue,
2067
- mn as isOpacityValue,
2068
- Mn as isRowHiddenForDevice,
2069
- $t as isSafeImageUrl,
2070
- M as isSpacingSideValue,
2071
- Bn as isWidgetHiddenForDevice,
2072
- Zt as justifyContentAllowlist,
2073
- fe as normalizeCssClasses,
2074
- de as objectStyleAttributeRegistry,
2271
+ jn as getDefaultDimensionAttributes,
2272
+ L as getDeviceTypeBasedAttributes,
2273
+ zo as getDragItemId,
2274
+ ht as getDragItemPrefixAndId,
2275
+ bt as getIdAndPrefix,
2276
+ Bn as getMergedAttributes,
2277
+ Go as getNameAndInstanceIdFromWidgetKey,
2278
+ _o as getNameFromWidgetKey,
2279
+ Qn as getOverlayLayerZIndex,
2280
+ wt as getWidgetKeyForCollection,
2281
+ Yo as getWidgetKeyForCollectionWithPrefix,
2282
+ Ct as getWidgetKeyForPublishedCollection,
2283
+ qo as getWidgetKeyForPublishedCollectionWithPrefix,
2284
+ An as hasBoxShadowLeaf,
2285
+ po as hasDeviceDivergentValues,
2286
+ E as hasInvalidCssVariable,
2287
+ Fn as hasItems,
2288
+ Jn as hasOverlayLayers,
2289
+ Zo as incrementVersion,
2290
+ Gt as isBackgroundImageValue,
2291
+ hn as isBorderStyleValue,
2292
+ bn as isBorderValue,
2293
+ vn as isBoxShadowValue,
2294
+ qt as isBoxSpacingValue,
2295
+ jt as isCloudinaryCloudName,
2296
+ Ot as isCloudinaryPublicId,
2297
+ Ft as isCloudinaryTransformationString,
2298
+ de as isCssColorValue,
2299
+ Jt as isCssEnumValue,
2300
+ Ke as isCssVariableName,
2301
+ O as isDevClientToken,
2302
+ In as isLineHeightValue,
2303
+ Sn as isOpacityValue,
2304
+ to as isOverlayLayerEmptyForDevice,
2305
+ Un as isRowHiddenForDevice,
2306
+ Bt as isSafeImageUrl,
2307
+ j as isSpacingSideValue,
2308
+ ge as isWidgetHiddenForDevice,
2309
+ ln as justifyContentAllowlist,
2310
+ me as normalizeCssClasses,
2311
+ fe as objectStyleAttributeRegistry,
2075
2312
  ee as overflowAllowlist,
2076
- Ne as phoneModeWidth,
2077
- Ke as prepareRuleCMSWidgetData,
2078
- Te as resolveKey,
2079
- Nn as resolveRowStyles,
2080
- ct as resolveWidgetApiOrigin,
2081
- Fn as resolveWidgetContainerStyles,
2082
- Kn as resolveWidgetInstanceProps,
2083
- Go as resolveWidgetLibraries,
2084
- Ln as rowBasedPropertiesAreAssigned,
2085
- ce as spacingKeywords,
2086
- jt as spacingLengthUnits,
2087
- We as tabletModeWidth,
2088
- Yt as textAlignAllowlist,
2089
- qt as textDecorationAllowlist,
2090
- Xt as textTransformAllowlist,
2091
- Re as typeHasPrefix,
2092
- zn as warnUnmatchedComponentProps,
2093
- Vn as widgetBasedPropertiesAreAssigned
2313
+ Fe as phoneModeWidth,
2314
+ rn as pointerEventsAllowlist,
2315
+ Ze as prepareRuleCMSWidgetData,
2316
+ Se as resolveBaseZIndex,
2317
+ Re as resolveKey,
2318
+ eo as resolveOverlayLayerPointerEvents,
2319
+ Hn as resolveRowStyles,
2320
+ gt as resolveWidgetApiOrigin,
2321
+ He as resolveWidgetContainerStyles,
2322
+ so as resolveWidgetInstanceProps,
2323
+ is as resolveWidgetLibraries,
2324
+ Kn as rowBasedPropertiesAreAssigned,
2325
+ ue as spacingKeywords,
2326
+ _t as spacingLengthUnits,
2327
+ Ve as tabletModeWidth,
2328
+ nn as textAlignAllowlist,
2329
+ on as textDecorationAllowlist,
2330
+ sn as textTransformAllowlist,
2331
+ Oe as typeHasPrefix,
2332
+ co as warnUnmatchedComponentProps,
2333
+ Xn as widgetBasedPropertiesAreAssigned,
2334
+ ze as widgetDeclaresOwnHeight
2094
2335
  };