@rulecms/widget-vue 0.4.0 → 0.5.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,29 +1,29 @@
1
1
  var Qe = Object.defineProperty;
2
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}`;
3
+ var we = (e, t, n) => et(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { defineComponent as k, reactive as tt, watch as $e, provide as nt, renderSlot as le, computed as h, openBlock as y, createElementBlock as b, normalizeStyle as S, normalizeClass as U, createBlock as w, resolveDynamicComponent as O, withCtx as $, createTextVNode as X, toDisplayString as H, createCommentVNode as R, Fragment as A, normalizeProps as Q, guardReactiveProps as Ce, mergeProps as ot, resolveComponent as st, createVNode as V, renderList as W, createElementVNode as N, ref as K, onMounted as it, onBeforeUnmount as Re, inject as rt, unref as x } from "vue";
5
+ const _ = "default";
6
+ function Me(e, t) {
7
+ return !(e != null && e.length) || e === _ ? t : `${e}/${t}`;
8
8
  }
9
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) {
10
+ function ve(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
16
  function ct(e) {
17
- if (Ce(e))
17
+ if (ve(e))
18
18
  return e;
19
19
  const t = e;
20
- return Ce(t == null ? void 0 : t.default) ? t.default : null;
20
+ return ve(t == null ? void 0 : t.default) ? t.default : null;
21
21
  }
22
- function Q(e) {
23
- return e.usesDefaultLibrary ? [H, ...e.libraryIds] : [...e.libraryIds];
22
+ function ee(e) {
23
+ return e.usesDefaultLibrary ? [_, ...e.libraryIds] : [...e.libraryIds];
24
24
  }
25
- function ve({ registrations: e, referenced: t }) {
26
- if (t.usesDefaultLibrary && !(e != null && e[H]))
25
+ function Ae({ registrations: e, referenced: t }) {
26
+ if (t.usesDefaultLibrary && !(e != null && e[_]))
27
27
  throw new Error(lt);
28
28
  }
29
29
  function at(e) {
@@ -39,58 +39,58 @@ function at(e) {
39
39
  function ut(e) {
40
40
  const t = {};
41
41
  for (const [o, s] of e) {
42
- const i = o === H;
43
- for (const [r, f] of Object.entries(s.components))
44
- t[i ? r : `${o}/${r}`] = f;
42
+ const i = o === _;
43
+ for (const [r, u] of Object.entries(s.components))
44
+ t[i ? r : `${o}/${r}`] = u;
45
45
  }
46
46
  const n = at(e);
47
47
  return n ? { components: t, stylesheets: n } : { components: t };
48
48
  }
49
- function X() {
49
+ function Z() {
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
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(
53
+ var d;
54
+ e.get(c) !== a && ((d = a.manifest) != null && d.id && a.manifest.id !== c && console.warn(
55
55
  `RuleCMS widget: component library registered as "${c}" declares manifest id "${a.manifest.id}". The registered id wins for resolution.`
56
56
  ), e.set(c, a), s += 1);
57
57
  }
58
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;
59
+ const a = ee(c), d = [...a].sort().join("|"), p = o.get(d);
60
+ if (p && p.loadedVersion === s)
61
+ return p.plugin;
62
62
  const l = /* @__PURE__ */ new Map();
63
- for (const p of a) {
64
- const I = e.get(p);
65
- I && l.set(p, I);
63
+ for (const f of a) {
64
+ const I = e.get(f);
65
+ I && l.set(f, I);
66
66
  }
67
67
  const g = ut(l);
68
- return o.set(u, { loadedVersion: s, plugin: g }), g;
68
+ return o.set(d, { loadedVersion: s, plugin: g }), g;
69
69
  }
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))
70
+ function u(c) {
71
+ Ae(c);
72
+ const { registrations: a, referenced: d } = c;
73
+ for (const p of ee(d)) {
74
+ if (e.has(p) || n.has(p))
75
75
  continue;
76
- const l = a == null ? void 0 : a[d];
76
+ const l = a == null ? void 0 : a[p];
77
77
  if (!l) {
78
78
  console.error(
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}"`));
79
+ `RuleCMS widget: no component library registered for libraryId "${p}"; its components will not render.`
80
+ ), n.set(p, new Error(`No registration for libraryId "${p}"`));
81
81
  continue;
82
82
  }
83
83
  if (typeof l == "function")
84
84
  return null;
85
- i(d, l);
85
+ i(p, l);
86
86
  }
87
- return r(u);
87
+ return r(d);
88
88
  }
89
89
  async function m(c) {
90
- ve(c);
91
- const { registrations: a, referenced: u } = c, d = Q(u);
90
+ Ae(c);
91
+ const { registrations: a, referenced: d } = c, p = ee(d);
92
92
  return await Promise.all(
93
- d.map(async (l) => {
93
+ p.map(async (l) => {
94
94
  if (e.has(l) || n.has(l))
95
95
  return;
96
96
  const g = a == null ? void 0 : a[l];
@@ -104,8 +104,8 @@ function X() {
104
104
  i(l, g);
105
105
  return;
106
106
  }
107
- let p = t.get(l);
108
- p || (p = g().then((I) => {
107
+ let f = t.get(l);
108
+ f || (f = g().then((I) => {
109
109
  const v = ct(I);
110
110
  if (!v)
111
111
  throw new Error(
@@ -119,26 +119,26 @@ function X() {
119
119
  );
120
120
  }).finally(() => {
121
121
  t.delete(l);
122
- }), t.set(l, p)), await p;
122
+ }), t.set(l, f)), await f;
123
123
  })
124
- ), r(u);
124
+ ), r(d);
125
125
  }
126
- return { resolveSync: f, resolve: m };
126
+ return { resolveSync: u, resolve: m };
127
127
  }
128
- const Ko = {
128
+ const Go = {
129
129
  Preview: "Preview",
130
130
  Compose: "Compose",
131
131
  RenderedPage: "RenderedPage"
132
132
  }, ce = {
133
133
  DroppableBox: "droppable-box"
134
- }, Ae = {
134
+ }, Ie = {
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
- }, Uo = {
141
+ }, Yo = {
142
142
  FlexStart: "flex-start",
143
143
  FlexEnd: "flex-end",
144
144
  Center: "center",
@@ -146,49 +146,49 @@ const Ko = {
146
146
  SpaceAround: "space-around",
147
147
  SpaceEvenly: "space-evenly",
148
148
  Stretch: "stretch"
149
- }, oe = "cssAttrArray", Ho = {
149
+ }, se = "cssAttrArray", qo = {
150
150
  Phone: "phone",
151
151
  Tablet: "tablet",
152
152
  Desktop: "desktop"
153
- }, Me = {
153
+ }, Ne = {
154
154
  ComposerComponent: "ComposerWidget",
155
155
  Collection: "Collection",
156
156
  MoveComponentHandle: "MoveWidgetHandle"
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) {
157
+ }, We = `${Ne.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 j(e) {
159
159
  return typeof e == "string" && e.startsWith(dt);
160
160
  }
161
161
  function gt(e, t) {
162
- return t ? t.replace(/\/$/, "") : O(e) ? pt : ft;
162
+ return t ? t.replace(/\/$/, "") : j(e) ? pt : ft;
163
163
  }
164
- function We({
164
+ function Oe({
165
165
  publishedKey: e,
166
166
  token: t,
167
167
  endpoint: n
168
168
  }) {
169
- const o = O(t), s = o ? mt : yt, i = o ? new URLSearchParams({ widgetKey: e, token: t }) : new URLSearchParams({ publishedKey: e, token: t });
169
+ const o = j(t), s = o ? mt : yt, i = o ? new URLSearchParams({ widgetKey: e, token: t }) : new URLSearchParams({ publishedKey: e, token: t });
170
170
  return `${gt(t, n)}${s}?${i.toString()}`;
171
171
  }
172
- const zo = ({ id: e, prefix: t }) => `${t}_${e}`, ht = (e) => {
172
+ const Xo = ({ 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
177
  return bt(e);
178
- }, Oe = (e) => e.includes("_"), bt = (e) => {
178
+ }, Ve = (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
184
  }, je = (e) => {
185
- if (!Oe(e))
185
+ if (!Ve(e))
186
186
  return;
187
187
  const n = ht(e);
188
- return (n == null ? void 0 : n.prefix) === Me.Collection || console.error(
188
+ return (n == null ? void 0 : n.prefix) === Ne.Collection || console.error(
189
189
  "getCollectionIdForCollectionType - Invalid component type: ${componentType}. Invalid prefix type."
190
190
  ), n == null ? void 0 : n.id;
191
- }, Go = (e) => {
191
+ }, Zo = (e) => {
192
192
  if (!(e != null && e.length)) {
193
193
  console.error("getNameAndInstanceIdFromWidgetKey: Missing widget key");
194
194
  return;
@@ -203,13 +203,13 @@ const zo = ({ id: e, prefix: t }) => `${t}_${e}`, ht = (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
- }, _o = (e) => {
206
+ }, Jo = (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
211
  }, wt = (e) => {
212
- var s, i, r, f;
212
+ var s, i, r, u;
213
213
  if (!e)
214
214
  return { error: "getWidgetKeyForCollection: Missing collection" };
215
215
  if (!((s = e.name) != null && s.length))
@@ -217,10 +217,10 @@ const zo = ({ id: e, prefix: t }) => `${t}_${e}`, ht = (e) => {
217
217
  const t = (i = e.name) == null ? void 0 : i.trim().toLowerCase();
218
218
  if (!((r = e.id) != null && r.length))
219
219
  return { error: "getWidgetKeyForCollection: Missing collection id" };
220
- const o = ((f = e.parentId) == null ? void 0 : f.length) ? `${e.id}@${e.parentId}` : `${e.id}`;
220
+ const o = ((u = e.parentId) == null ? void 0 : u.length) ? `${e.id}@${e.parentId}` : `${e.id}`;
221
221
  return { data: `${t}$${o}` };
222
222
  }, Ct = (e) => {
223
- var s, i, r, f;
223
+ var s, i, r, u;
224
224
  if (!e)
225
225
  return { error: "getWidgetKeyForPublishedCollection: Missing collection" };
226
226
  if (!((s = e.name) != null && s.length))
@@ -228,22 +228,22 @@ const zo = ({ id: e, prefix: t }) => `${t}_${e}`, ht = (e) => {
228
228
  const t = (i = e.name) == null ? void 0 : i.trim().toLowerCase();
229
229
  if (!((r = e.publishedKey) != null && r.length))
230
230
  return { error: "getWidgetKeyForPublishedCollection: Missing collection publishedKey" };
231
- const o = ((f = e.parentId) == null ? void 0 : f.length) ? `${e.publishedKey}@${e.parentId}` : `${e.publishedKey}`;
231
+ const o = ((u = e.parentId) == null ? void 0 : u.length) ? `${e.publishedKey}@${e.parentId}` : `${e.publishedKey}`;
232
232
  return { data: `${t}$${o}` };
233
- }, Yo = (e) => {
233
+ }, Qo = (e) => {
234
234
  const t = wt(e);
235
- return `${Ne}${t.data}`;
236
- }, qo = (e) => {
235
+ return `${We}${t.data}`;
236
+ }, es = (e) => {
237
237
  const t = Ct(e);
238
- return `${Ne}${t.data}`;
238
+ return `${We}${t.data}`;
239
239
  }, vt = "---", At = "___";
240
240
  function It(e, t) {
241
241
  return `${e}${vt}${t}`;
242
242
  }
243
- function Xo(e, t, n) {
243
+ function ts(e, t, n) {
244
244
  return `${It(e, t)}${At}${n}`;
245
245
  }
246
- function Zo(e) {
246
+ function ns(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`);
@@ -259,12 +259,12 @@ function ae({
259
259
  const n = /* @__PURE__ */ new Set();
260
260
  let o = !1;
261
261
  const s = (i) => {
262
- var r, f, m;
262
+ var r, u, m;
263
263
  if ((r = i == null ? void 0 : i.rows) != null && r.length) {
264
264
  for (const c of i.rows)
265
- if ((f = c == null ? void 0 : c.columns) != null && f.length)
265
+ if ((u = c == null ? void 0 : c.columns) != null && u.length)
266
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)));
267
+ a.collection && s(a.collection.collectionRows), !(!a.type || a.type === ce.DroppableBox) && (Ve(a.type) || (!((m = a.libraryId) != null && m.length) || a.libraryId === _ ? o = !0 : n.add(a.libraryId)));
268
268
  }
269
269
  };
270
270
  s(e);
@@ -278,10 +278,10 @@ function St() {
278
278
  token: "",
279
279
  endpoint: void 0,
280
280
  libraries: void 0,
281
- libraryRegistry: X()
281
+ libraryRegistry: Z()
282
282
  };
283
283
  }
284
- const Jo = /* @__PURE__ */ D({
284
+ const os = /* @__PURE__ */ k({
285
285
  __name: "RuleCMSWidgetProvider",
286
286
  props: {
287
287
  token: {},
@@ -290,19 +290,19 @@ const Jo = /* @__PURE__ */ D({
290
290
  },
291
291
  setup(e) {
292
292
  const t = e, n = tt(St());
293
- return Le(
293
+ return $e(
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
- ), nt(Be, n), (o, s) => re(o.$slots, "default");
299
+ ), nt(Be, n), (o, s) => le(o.$slots, "default");
300
300
  }
301
- }), kt = "1200px", Fe = "500px", Ve = "820px", Qo = kt, Dt = "rulecms", Tt = 1920, xt = {
301
+ }), kt = "1200px", Fe = "500px", Ke = "820px", ss = kt, Dt = "rulecms", Tt = 1920, xt = {
302
302
  f: "auto",
303
303
  q: "auto",
304
304
  c: "limit"
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) => {
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), Vt = (e) => typeof e == "string" && e.length <= $t && Lt.test(e), jt = (e) => typeof e == "string" && e.length <= Mt && Rt.test(e), Bt = (e) => typeof e == "string" && e.length <= Wt && Nt.test(e), Ft = (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("_");
@@ -321,58 +321,58 @@ const Jo = /* @__PURE__ */ D({
321
321
  w: o
322
322
  };
323
323
  return encodeURI(
324
- `https://res.cloudinary.com/${t}/image/upload/${Vt(i)}/${e}`
324
+ `https://res.cloudinary.com/${t}/image/upload/${Ft(i)}/${e}`
325
325
  );
326
- }, Ht = /^--[A-Za-z0-9_-]+$/, zt = 200, Ke = (e) => {
326
+ }, Ht = /^--[A-Za-z0-9_-]+$/, _t = 200, ue = (e) => {
327
327
  if (typeof e != "string")
328
328
  return !1;
329
329
  const t = e.trim();
330
- return t.length <= zt && Ht.test(t);
331
- }, k = (e) => `var(${e.trim()})`, w = (e) => {
330
+ return t.length <= _t && Ht.test(t);
331
+ }, D = (e) => `var(${e.trim()})`, C = (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 Ke(t) ? t.trim() : void 0;
336
+ return ue(t) ? t.trim() : void 0;
337
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 : !Ke(t);
342
- }, es = (e, t) => {
343
- const n = w(e);
344
- return n ? { [t]: k(n) } : void 0;
345
- }, Gt = (e) => {
341
+ return t == null ? !1 : !ue(t);
342
+ }, is = (e, t) => {
343
+ const n = C(e);
344
+ return n ? { [t]: D(n) } : void 0;
345
+ }, zt = (e) => {
346
346
  if (typeof e != "object" || e === null || Array.isArray(e) || E(e))
347
347
  return !1;
348
- if (w(e))
348
+ if (C(e))
349
349
  return !0;
350
350
  const t = e;
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 = {}) => {
351
+ return t.source === "none" ? !0 : t.source === "url" ? jt(t.url) : t.source === "cloudinary" ? !Ot(t.publicId) || t.cloudName !== void 0 && t.cloudName !== null && !Vt(t.cloudName) ? !1 : t.transformations === void 0 || t.transformations === null || Bt(t.transformations) : !1;
352
+ }, Gt = ["px", "%", "em", "rem", "vh", "vw"], de = ["inherit", "unset"], Yt = ["allSides", "top", "right", "bottom", "left"], B = (e, t = {}) => {
353
353
  if (typeof e != "object" || e === null || Array.isArray(e))
354
354
  return !1;
355
355
  const n = e;
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;
356
+ return E(e) ? !1 : C(e) ? !0 : n.unit === "auto" ? t.allowAuto !== !1 : n.unit === "keyword" ? t.allowKeywords !== !1 && de.includes(n.keyword) : Gt.includes(n.unit) ? typeof n.value != "number" || !Number.isFinite(n.value) ? !1 : t.allowNegative !== !1 || n.value >= 0 : !1;
357
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
361
  for (const o of Yt) {
362
362
  const s = n[o];
363
- if (s != null && !j(s, t))
363
+ if (s != null && !B(s, t))
364
364
  return !1;
365
365
  }
366
366
  return !0;
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) => {
367
+ }, Xt = [...de, "transparent", "currentColor"], Zt = /^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\([^)]+\)|hsla?\([^)]+\))$/, pe = (e) => {
368
368
  if (typeof e != "object" || e === null || Array.isArray(e))
369
369
  return !1;
370
370
  const t = 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
- const t = w(e);
374
- return t ? k(t) : "unit" in e ? e.unit === "keyword" ? e.keyword : e.value.trim() : "";
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 = [
371
+ return E(e) ? !1 : C(e) ? !0 : t.unit === "keyword" ? Xt.includes(t.keyword) : t.unit === "color" ? typeof t.value == "string" && Zt.test(t.value.trim()) : !1;
372
+ }, fe = (e) => {
373
+ const t = C(e);
374
+ return t ? D(t) : "unit" in e ? e.unit === "keyword" ? e.keyword : e.value.trim() : "";
375
+ }, Jt = (e, t) => typeof e == "object" && e !== null && !Array.isArray(e) ? !E(e) && !!C(e) : typeof e != "string" || !e.length ? !1 : t.includes(e) ? !0 : de.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",
@@ -408,7 +408,7 @@ const Jo = /* @__PURE__ */ D({
408
408
  "uppercase",
409
409
  "lowercase",
410
410
  "capitalize"
411
- ], ee = [
411
+ ], te = [
412
412
  "visible",
413
413
  "hidden",
414
414
  "scroll",
@@ -473,11 +473,11 @@ const Jo = /* @__PURE__ */ D({
473
473
  "ridge",
474
474
  "inset",
475
475
  "outset"
476
- ], hn = (e) => typeof e == "object" && e !== null && !Array.isArray(e) ? !E(e) && !!w(e) : gn.includes(e), bn = (e) => {
476
+ ], hn = (e) => typeof e == "object" && e !== null && !Array.isArray(e) ? !E(e) && !!C(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 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));
480
+ return E(e) ? !1 : C(e) ? !0 : !(t.width !== void 0 && t.width !== null && !B(t.width, { allowAuto: !1, allowNegative: !1 }) || t.style !== void 0 && t.style !== null && !hn(t.style) || t.color !== void 0 && t.color !== null && !pe(t.color));
481
481
  }, wn = {
482
482
  allowAuto: !1,
483
483
  allowKeywords: !1,
@@ -492,25 +492,25 @@ const Jo = /* @__PURE__ */ D({
492
492
  const t = e;
493
493
  if (E(e))
494
494
  return !1;
495
- if (w(e))
495
+ if (C(e))
496
496
  return !0;
497
497
  for (const n of ["offsetX", "offsetY", "spread"]) {
498
498
  const o = t[n];
499
- if (o != null && !j(o, wn))
499
+ if (o != null && !B(o, wn))
500
500
  return !1;
501
501
  }
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");
502
+ return !(t.blur !== void 0 && t.blur !== null && !B(t.blur, Cn) || t.color !== void 0 && t.color !== null && !pe(t.color) || t.inset !== void 0 && t.inset !== null && typeof t.inset != "boolean");
503
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 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))
507
+ return E(e) ? !1 : C(e) ? !0 : t.unit === "number" ? typeof t.value == "number" && Number.isFinite(t.value) && t.value > 0 : B(e, { allowAuto: !1, allowNegative: !1 });
508
+ }, Sn = (e) => typeof e == "object" && e !== null && !Array.isArray(e) ? !E(e) && !!C(e) : typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= 1, kn = (e) => {
509
+ if (!zt(e))
510
510
  return {};
511
- const t = w(e);
511
+ const t = C(e);
512
512
  if (t)
513
- return { backgroundImage: k(t) };
513
+ return { backgroundImage: D(t) };
514
514
  const n = e;
515
515
  return n.source === "none" ? { backgroundImage: "none" } : n.source === "url" ? { backgroundImage: `url("${n.url}")` } : {
516
516
  backgroundImage: `url("${Ut({
@@ -519,61 +519,61 @@ const Jo = /* @__PURE__ */ D({
519
519
  transformations: n.transformations
520
520
  })}")`
521
521
  };
522
- }, B = (e) => {
523
- const t = w(e);
524
- return t ? k(t) : "unit" in e ? e.unit === "auto" ? "auto" : e.unit === "keyword" ? e.keyword : `${e.value}${e.unit}` : "";
522
+ }, F = (e) => {
523
+ const t = C(e);
524
+ return t ? D(t) : "unit" in e ? e.unit === "auto" ? "auto" : e.unit === "keyword" ? e.keyword : `${e.value}${e.unit}` : "";
525
525
  }, Dn = (e) => {
526
526
  if (!bn(e))
527
527
  return {};
528
- const t = w(e);
528
+ const t = C(e);
529
529
  if (t)
530
- return { border: k(t) };
530
+ return { border: D(t) };
531
531
  const n = {};
532
- if (e.width && (n.borderWidth = B(e.width)), e.style) {
533
- const o = w(e.style);
534
- n.borderStyle = o ? k(o) : e.style;
532
+ if (e.width && (n.borderWidth = F(e.width)), e.style) {
533
+ const o = C(e.style);
534
+ n.borderStyle = o ? D(o) : e.style;
535
535
  }
536
- return e.color && (n.borderColor = pe(e.color)), n;
537
- }, G = (e) => e ? B(e) : "0px", Tn = (e) => {
536
+ return e.color && (n.borderColor = fe(e.color)), n;
537
+ }, G = (e) => e ? F(e) : "0px", Tn = (e) => {
538
538
  if (!vn(e) || !An(e))
539
539
  return {};
540
- const t = w(e);
540
+ const t = C(e);
541
541
  if (t)
542
- return { boxShadow: k(t) };
542
+ return { boxShadow: D(t) };
543
543
  const n = [
544
544
  G(e.offsetX),
545
545
  G(e.offsetY),
546
546
  G(e.blur),
547
547
  G(e.spread)
548
548
  ];
549
- return e.color && n.push(pe(e.color)), e.inset && n.unshift("inset"), { boxShadow: n.join(" ") };
549
+ return e.color && n.push(fe(e.color)), e.inset && n.unshift("inset"), { boxShadow: n.join(" ") };
550
550
  }, xn = (e) => `${e.charAt(0).toUpperCase()}${e.slice(1)}`, En = (e, t) => {
551
551
  if (!qt(e))
552
552
  return {};
553
553
  if (e.allSides)
554
- return { [t]: B(e.allSides) };
554
+ return { [t]: F(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}${xn(o)}`] = B(s));
558
+ s && (n[`${t}${xn(o)}`] = F(s));
559
559
  }
560
560
  return n;
561
- }, Pn = (e, t) => de(e) ? { [t]: pe(e) } : {}, Ln = (e, t, n) => {
561
+ }, Pn = (e, t) => pe(e) ? { [t]: fe(e) } : {}, Ln = (e, t, n) => {
562
562
  if (!Jt(e, n))
563
563
  return {};
564
- const o = w(e);
565
- return o ? { [t]: k(o) } : { [t]: e };
566
- }, $n = (e, t, n = {}) => j(e, n) ? { [t]: B(e) } : {}, Rn = (e) => {
564
+ const o = C(e);
565
+ return o ? { [t]: D(o) } : { [t]: e };
566
+ }, $n = (e, t, n = {}) => B(e, n) ? { [t]: F(e) } : {}, Rn = (e) => {
567
567
  if (!In(e))
568
568
  return {};
569
- const t = w(e);
570
- return t ? { lineHeight: k(t) } : "unit" in e && e.unit === "number" ? { lineHeight: e.value } : { lineHeight: B(e) };
569
+ const t = C(e);
570
+ return t ? { lineHeight: D(t) } : "unit" in e && e.unit === "number" ? { lineHeight: e.value } : { lineHeight: F(e) };
571
571
  }, Mn = (e) => {
572
572
  if (!Sn(e))
573
573
  return {};
574
- const t = w(e);
575
- return t ? { opacity: k(t) } : { opacity: e };
576
- }, fe = {
574
+ const t = C(e);
575
+ return t ? { opacity: D(t) } : { opacity: e };
576
+ }, ye = {
577
577
  // Box spacing (4-sided)
578
578
  "margin-3-resolutions": { kind: "boxSpacing", cssProperty: "margin" },
579
579
  "padding-3-resolutions": { kind: "boxSpacing", cssProperty: "padding" },
@@ -654,17 +654,17 @@ const Jo = /* @__PURE__ */ D({
654
654
  "overflow-3-resolutions": {
655
655
  kind: "enum",
656
656
  cssProperty: "overflow",
657
- allowedValues: ee
657
+ allowedValues: te
658
658
  },
659
659
  "overflow-x-3-resolutions": {
660
660
  kind: "enum",
661
661
  cssProperty: "overflowX",
662
- allowedValues: ee
662
+ allowedValues: te
663
663
  },
664
664
  "overflow-y-3-resolutions": {
665
665
  kind: "enum",
666
666
  cssProperty: "overflowY",
667
- allowedValues: ee
667
+ allowedValues: te
668
668
  },
669
669
  // Color
670
670
  // Pointer input. On an overlay layer this is lifted onto the absolutely
@@ -740,7 +740,7 @@ const Jo = /* @__PURE__ */ D({
740
740
  allowedValues: sn
741
741
  }
742
742
  }, Nn = (e, t) => {
743
- const n = fe[e];
743
+ const n = ye[e];
744
744
  if (!n)
745
745
  return {};
746
746
  switch (n.kind) {
@@ -765,30 +765,30 @@ const Jo = /* @__PURE__ */ D({
765
765
  default:
766
766
  return {};
767
767
  }
768
- }, ts = Object.fromEntries(
769
- Object.entries(fe).filter(([, e]) => e.kind === "boxSpacing").map(([e, t]) => [
768
+ }, rs = Object.fromEntries(
769
+ Object.entries(ye).filter(([, e]) => e.kind === "boxSpacing").map(([e, t]) => [
770
770
  e,
771
771
  t.cssProperty
772
772
  ])
773
773
  ), Wn = (e) => e != null && e !== "", On = (e) => e ? !mn.some(
774
774
  (n) => Wn(e[n])
775
- ) || e.display === "flex" ? e : { ...e, display: "flex" } : {}, jn = ({
775
+ ) || e.display === "flex" ? e : { ...e, display: "flex" } : {}, Vn = ({
776
776
  dbEntryType: e,
777
777
  libraryId: t,
778
778
  sourceComponentsPlugin: n
779
779
  }) => {
780
780
  if (!(e != null && e.length))
781
781
  return;
782
- const o = n.components[Re(t, e)];
782
+ const o = n.components[Me(t, e)];
783
783
  if (!o || !("defaultAttributeValues" in o))
784
784
  return;
785
785
  const i = o.defaultAttributeValues;
786
786
  if (i != null && i.length)
787
- return i.reduce((r, f) => ({
787
+ return i.reduce((r, u) => ({
788
788
  ...r,
789
- [f.name]: f.defaultValues
789
+ [u.name]: u.defaultValues
790
790
  }), {});
791
- }, L = ({
791
+ }, M = ({
792
792
  deviceDisplayType: e,
793
793
  componentAttributes: t
794
794
  }) => {
@@ -800,8 +800,8 @@ const Jo = /* @__PURE__ */ D({
800
800
  )) {
801
801
  if (!s.includes("3-resolutions") || !i)
802
802
  continue;
803
- const r = i.all, f = r ?? i[e.toLowerCase()];
804
- o[s] = f, fe[s] && Object.assign(n, Nn(s, f));
803
+ const r = i.all, u = r ?? i[e.toLowerCase()];
804
+ o[s] = u, ye[s] && Object.assign(n, Nn(s, u));
805
805
  }
806
806
  return Object.keys(n).length || Object.keys(o).length ? {
807
807
  styles: Object.keys(n).length ? n : void 0,
@@ -809,27 +809,27 @@ const Jo = /* @__PURE__ */ D({
809
809
  o
810
810
  ).length ? o : void 0
811
811
  } : void 0;
812
- }, Bn = ({
812
+ }, jn = ({
813
813
  defaultAttributes: e,
814
814
  userModifiedAttributes: t
815
815
  }) => e ? t ? { ...e, ...t } : e : t;
816
- function Y(e) {
816
+ function q(e) {
817
817
  return e.componentAttributes ?? e.widgetAttributes;
818
818
  }
819
- function Ie({
819
+ function Se({
820
820
  col: e,
821
821
  deviceDisplayType: t,
822
822
  isComposeMode: n,
823
823
  sourceComponentsPlugin: o
824
824
  }) {
825
- const s = Y(e), i = jn({
825
+ const s = q(e), i = Vn({
826
826
  dbEntryType: e.type,
827
827
  libraryId: e.libraryId,
828
828
  sourceComponentsPlugin: o
829
- }) || [], r = Bn({
829
+ }) || [], r = jn({
830
830
  defaultAttributes: i,
831
831
  userModifiedAttributes: s
832
- }), { styles: f, componentAttributesSpecificToDeviceType: m } = L({
832
+ }), { styles: u, componentAttributesSpecificToDeviceType: m } = M({
833
833
  deviceDisplayType: t,
834
834
  componentAttributes: r
835
835
  }) || {
@@ -838,33 +838,33 @@ function Ie({
838
838
  };
839
839
  let c = {};
840
840
  const a = {};
841
- if (f)
842
- for (const [d, l] of Object.entries(f))
843
- n && a[d] || (c = {
841
+ if (u)
842
+ for (const [p, l] of Object.entries(u))
843
+ n && a[p] || (c = {
844
844
  ...c,
845
- [d]: l
845
+ [p]: l
846
846
  });
847
- let u = Y(e);
848
- for (const d in m)
849
- if (d.includes("3-resolutions")) {
850
- u = {
851
- ...Y(e) || {},
847
+ let d = q(e);
848
+ for (const p in m)
849
+ if (p.includes("3-resolutions")) {
850
+ d = {
851
+ ...q(e) || {},
852
852
  ...m || {}
853
853
  };
854
854
  break;
855
855
  }
856
856
  return {
857
- componentAttributesBasedOnDevice: u,
857
+ componentAttributesBasedOnDevice: d,
858
858
  componentStyles: On(c)
859
859
  };
860
860
  }
861
- const Fn = (e) => {
861
+ const Bn = (e) => {
862
862
  const t = (e == null ? void 0 : e.rows) || [];
863
863
  for (const n of t)
864
864
  if (((n == null ? void 0 : n.columns) || []).length > 0)
865
865
  return !0;
866
866
  return (e == null ? void 0 : e.containerAttributes) && Object.keys(e.containerAttributes).length > 0;
867
- }, Vn = "var(--sl-spacing-x-small)";
867
+ }, Fn = "var(--sl-spacing-x-small)";
868
868
  function Kn(e) {
869
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);
870
870
  }
@@ -873,7 +873,7 @@ function Un({
873
873
  deviceDisplayType: t
874
874
  }) {
875
875
  var o;
876
- const n = L({
876
+ const n = M({
877
877
  deviceDisplayType: t,
878
878
  componentAttributes: e.rowAttributes
879
879
  });
@@ -885,10 +885,10 @@ function Hn({
885
885
  isComposeMode: n
886
886
  }) {
887
887
  var l;
888
- const o = ((l = L({
888
+ const o = ((l = M({
889
889
  deviceDisplayType: t,
890
890
  componentAttributes: e.rowAttributes
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([
891
+ })) == null ? void 0 : l.styles) || {}, s = o.justifyContent ?? e.horizontalAlignment ?? Ie.Center, i = o.alignItems ?? e.verticalAlignment ?? Ie.Center, r = o.flexDirection ?? "row", u = o.gap ?? e.gap ?? Fn, m = n ? "nowrap" : o.flexWrap ?? e.flexWrap ?? "nowrap", c = o.alignContent ?? e.alignContent ?? void 0, a = /* @__PURE__ */ new Set([
892
892
  "justifyContent",
893
893
  "alignItems",
894
894
  "flexDirection",
@@ -896,26 +896,26 @@ function Hn({
896
896
  "flexWrap",
897
897
  "alignContent",
898
898
  "display"
899
- ]), u = {};
900
- for (const [g, p] of Object.entries(o))
901
- a.has(g) || (u[g] = p);
902
- const d = {
899
+ ]), d = {};
900
+ for (const [g, f] of Object.entries(o))
901
+ a.has(g) || (d[g] = f);
902
+ const p = {
903
903
  display: "flex",
904
904
  flexDirection: r,
905
- gap: f,
905
+ gap: u,
906
906
  flexWrap: m,
907
907
  justifyContent: s,
908
908
  alignItems: i,
909
- ...u
909
+ ...d
910
910
  };
911
- return c !== void 0 && (d.alignContent = c), d;
911
+ return c !== void 0 && (p.alignContent = c), p;
912
912
  }
913
- const ye = "css-classes-3-resolutions", zn = 500, Gn = /[\x00-\x1f\x7f]/g, me = (e) => {
913
+ const me = "css-classes-3-resolutions", _n = 500, zn = /[\x00-\x1f\x7f]/g, ge = (e) => {
914
914
  if (typeof e != "string")
915
915
  return;
916
916
  const t = /* @__PURE__ */ new Set(), n = [];
917
917
  for (const s of e.split(/\s+/)) {
918
- const i = s.replace(Gn, "");
918
+ const i = s.replace(zn, "");
919
919
  i && (t.has(i) || (t.add(i), n.push(i)));
920
920
  }
921
921
  if (!n.length)
@@ -923,12 +923,12 @@ const ye = "css-classes-3-resolutions", zn = 500, Gn = /[\x00-\x1f\x7f]/g, me =
923
923
  let o = "";
924
924
  for (const s of n) {
925
925
  const i = o ? `${o} ${s}` : s;
926
- if (i.length > zn)
926
+ if (i.length > _n)
927
927
  break;
928
928
  o = i;
929
929
  }
930
930
  return o.length ? o : void 0;
931
- }, Ue = "hide-component-3-resolutions", _n = "pointer-events-3-resolutions", Yn = [
931
+ }, Ue = "hide-component-3-resolutions", Gn = "pointer-events-3-resolutions", Yn = [
932
932
  "width-3-resolutions",
933
933
  "min-width-3-resolutions",
934
934
  "max-width-3-resolutions",
@@ -944,16 +944,16 @@ const ye = "css-classes-3-resolutions", zn = 500, Gn = /[\x00-\x1f\x7f]/g, me =
944
944
  "overflow-x-3-resolutions",
945
945
  "overflow-y-3-resolutions",
946
946
  Ue,
947
- _n
947
+ Gn
948
948
  ], qn = new Set(
949
949
  Yn
950
950
  );
951
- function ge({
951
+ function he({
952
952
  containerAttributes: e,
953
953
  deviceDisplayType: t
954
954
  }) {
955
955
  var o;
956
- const n = L({
956
+ const n = M({
957
957
  deviceDisplayType: t,
958
958
  componentAttributes: e
959
959
  });
@@ -971,39 +971,39 @@ function He({
971
971
  Object.entries(e).filter(
972
972
  ([r]) => !qn.has(r)
973
973
  )
974
- ) : e, s = L({
974
+ ) : e, s = M({
975
975
  deviceDisplayType: t,
976
976
  componentAttributes: o
977
977
  });
978
978
  return {
979
979
  styles: (s == null ? void 0 : s.styles) ?? {},
980
- cssClasses: me(
981
- (i = s == null ? void 0 : s.componentAttributesSpecificToDeviceType) == null ? void 0 : i[ye]
980
+ cssClasses: ge(
981
+ (i = s == null ? void 0 : s.componentAttributesSpecificToDeviceType) == null ? void 0 : i[me]
982
982
  )
983
983
  };
984
984
  }
985
985
  function Xn(e) {
986
986
  return Object.keys(e.styles).length > 0 || !!e.cssClasses;
987
987
  }
988
- function ze({
988
+ function _e({
989
989
  containerAttributes: e,
990
990
  widgetContainerStyles: t
991
991
  }) {
992
- return ((e == null ? void 0 : e[oe]) || []).some(
992
+ return ((e == null ? void 0 : e[se]) || []).some(
993
993
  (o) => o.toLowerCase().startsWith("height:")
994
994
  ) || t.styles.height !== void 0;
995
995
  }
996
- const Zn = "z-index-3-resolutions", Ge = 0;
996
+ const Zn = "z-index-3-resolutions", ze = 0;
997
997
  function Jn(e) {
998
998
  var t, n;
999
999
  return !!((n = (t = e == null ? void 0 : e.overlayLayers) == null ? void 0 : t.layers) != null && n.length);
1000
1000
  }
1001
- function Se({
1001
+ function ke({
1002
1002
  containerAttributes: e,
1003
1003
  deviceDisplayType: t
1004
1004
  }) {
1005
1005
  var s;
1006
- const n = L({
1006
+ const n = M({
1007
1007
  deviceDisplayType: t,
1008
1008
  componentAttributes: e
1009
1009
  }), o = (s = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : s[Zn];
@@ -1014,7 +1014,7 @@ function Se({
1014
1014
  if (Number.isFinite(i))
1015
1015
  return i;
1016
1016
  }
1017
- return Ge;
1017
+ return ze;
1018
1018
  }
1019
1019
  function Qn(e, t) {
1020
1020
  return e + t + 1;
@@ -1024,7 +1024,7 @@ function eo({
1024
1024
  deviceDisplayType: t
1025
1025
  }) {
1026
1026
  var s;
1027
- const n = L({
1027
+ const n = M({
1028
1028
  deviceDisplayType: t,
1029
1029
  componentAttributes: e
1030
1030
  }), o = (s = n == null ? void 0 : n.styles) == null ? void 0 : s.pointerEvents;
@@ -1035,7 +1035,7 @@ function to({
1035
1035
  deviceDisplayType: t
1036
1036
  }) {
1037
1037
  var n;
1038
- return (n = e == null ? void 0 : e.rows) != null && n.length ? ge({
1038
+ return (n = e == null ? void 0 : e.rows) != null && n.length ? he({
1039
1039
  containerAttributes: e.containerAttributes,
1040
1040
  deviceDisplayType: t
1041
1041
  }) : !0;
@@ -1051,7 +1051,7 @@ function no({
1051
1051
  display: "flex",
1052
1052
  flexDirection: "column",
1053
1053
  ...t ? {} : { height: e ? "auto" : "100%" },
1054
- ...n === Ge ? {} : { zIndex: n }
1054
+ ...n === ze ? {} : { zIndex: n }
1055
1055
  };
1056
1056
  }
1057
1057
  function oo({
@@ -1069,7 +1069,7 @@ function oo({
1069
1069
  ...t ? { pointerEvents: t } : {}
1070
1070
  };
1071
1071
  }
1072
- const he = "/";
1072
+ const be = "/";
1073
1073
  function so({
1074
1074
  componentProps: e,
1075
1075
  ancestorColumnIds: t,
@@ -1079,7 +1079,7 @@ function so({
1079
1079
  return;
1080
1080
  const o = [...t ?? [], n];
1081
1081
  for (let s = 0; s < o.length; s += 1) {
1082
- const i = o.slice(s).join(he), r = e[i];
1082
+ const i = o.slice(s).join(be), r = e[i];
1083
1083
  if (r)
1084
1084
  return r;
1085
1085
  }
@@ -1091,8 +1091,8 @@ function io({
1091
1091
  const n = [], o = (s, i) => {
1092
1092
  var r;
1093
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) {
1094
+ for (const u of s.rows)
1095
+ for (const m of u.columns) {
1096
1096
  if (!m.id || m.type === ce.DroppableBox)
1097
1097
  continue;
1098
1098
  const c = je(m.type);
@@ -1102,14 +1102,14 @@ function io({
1102
1102
  continue;
1103
1103
  }
1104
1104
  n.push(
1105
- [...i, m.id].join(he)
1105
+ [...i, m.id].join(be)
1106
1106
  );
1107
1107
  }
1108
1108
  };
1109
1109
  return o(e, []), n;
1110
1110
  }
1111
1111
  function ro(e, t) {
1112
- const n = `${he}${e}`;
1112
+ const n = `${be}${e}`;
1113
1113
  return t.some((o) => o === e || o.endsWith(n));
1114
1114
  }
1115
1115
  function lo({
@@ -1152,25 +1152,25 @@ function uo(e) {
1152
1152
  const t = e.phone, n = e.tablet, o = e.desktop;
1153
1153
  return t !== n || t !== o || n !== o;
1154
1154
  }
1155
- function se(e) {
1155
+ function ie(e) {
1156
1156
  var t, n;
1157
1157
  if (!((t = e == null ? void 0 : e.rows) != null && t.length))
1158
1158
  return !1;
1159
- if (te(e.containerAttributes))
1159
+ if (ne(e.containerAttributes))
1160
1160
  return !0;
1161
1161
  for (const o of e.rows) {
1162
- if (te(o.rowAttributes))
1162
+ if (ne(o.rowAttributes))
1163
1163
  return !0;
1164
1164
  for (const s of o.columns)
1165
- if (te(Y(s)))
1165
+ if (ne(q(s)))
1166
1166
  return !0;
1167
1167
  }
1168
1168
  for (const o of ((n = e.overlayLayers) == null ? void 0 : n.layers) ?? [])
1169
- if (se(o))
1169
+ if (ie(o))
1170
1170
  return !0;
1171
1171
  return !1;
1172
1172
  }
1173
- function te(e) {
1173
+ function ne(e) {
1174
1174
  if (!e)
1175
1175
  return !1;
1176
1176
  for (const [t, n] of Object.entries(e))
@@ -1187,24 +1187,24 @@ function te(e) {
1187
1187
  return !1;
1188
1188
  }
1189
1189
  function po(e, t) {
1190
- if (se(e))
1190
+ if (ie(e))
1191
1191
  return !0;
1192
1192
  for (const n of Object.values(t))
1193
- if (se(n.collectionRows))
1193
+ if (ie(n.collectionRows))
1194
1194
  return !0;
1195
1195
  return !1;
1196
1196
  }
1197
- const _e = parseInt(Fe, 10), Ye = parseInt(Ve, 10), fo = _e + 1, yo = Ye + 1;
1197
+ const Ge = parseInt(Fe, 10), Ye = parseInt(Ke, 10), fo = Ge + 1, yo = Ye + 1;
1198
1198
  function mo(e) {
1199
1199
  const t = `.${e}-phone`, n = `.${e}-tablet`, o = `.${e}-desktop`;
1200
1200
  return `
1201
1201
  ${t}, ${n}, ${o} { display: none; }
1202
- @media (max-width: ${_e}px) { ${t} { display: block; } }
1202
+ @media (max-width: ${Ge}px) { ${t} { display: block; } }
1203
1203
  @media (min-width: ${fo}px) and (max-width: ${Ye}px) { ${n} { display: block; } }
1204
1204
  @media (min-width: ${yo}px) { ${o} { display: block; } }
1205
1205
  `.trim();
1206
1206
  }
1207
- function ne(e) {
1207
+ function oe(e) {
1208
1208
  if (!e)
1209
1209
  throw new Error("Source components plugin is required, but no plugins were provided");
1210
1210
  const t = e.sourceComponents;
@@ -1218,7 +1218,7 @@ function ne(e) {
1218
1218
  );
1219
1219
  return t;
1220
1220
  }
1221
- const go = ["hidden"], ke = /* @__PURE__ */ D({
1221
+ const go = ["hidden"], De = /* @__PURE__ */ k({
1222
1222
  __name: "EmbedInVerticalContainer",
1223
1223
  props: {
1224
1224
  displayItemList: {},
@@ -1231,20 +1231,20 @@ const go = ["hidden"], ke = /* @__PURE__ */ D({
1231
1231
  const t = e;
1232
1232
  let n = 0;
1233
1233
  const o = `rulecms-vc-${++n}`;
1234
- function s(g, p, I) {
1234
+ function s(g, f, I) {
1235
1235
  const v = g && !I ? 3 : 1;
1236
- return !!(p != null && p.length) && p.length > v;
1236
+ return !!(f != null && f.length) && f.length > v;
1237
1237
  }
1238
1238
  const i = h(() => {
1239
- var p;
1240
- return (((p = t.displayItemList.containerAttributes) == null ? void 0 : p[oe]) || []).join(`;
1239
+ var f;
1240
+ return (((f = t.displayItemList.containerAttributes) == null ? void 0 : f[se]) || []).join(`;
1241
1241
  `);
1242
1242
  }), r = h(
1243
1243
  () => i.value ? `.${o} {
1244
1244
  ${i.value}
1245
1245
  }` : ""
1246
- ), f = h(
1247
- () => !t.isComposeMode && ge({
1246
+ ), u = h(
1247
+ () => !t.isComposeMode && he({
1248
1248
  containerAttributes: t.displayItemList.containerAttributes,
1249
1249
  deviceDisplayType: t.deviceDisplayType
1250
1250
  })
@@ -1256,34 +1256,34 @@ ${i.value}
1256
1256
  })
1257
1257
  ), c = h(() => {
1258
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);
1259
+ const g = ((I = t.displayItemList.containerAttributes) == null ? void 0 : I[se]) || [], f = Xn(m.value);
1260
+ return t.isComposeMode && !t.isWithinCollection || t.showDropContainers || g.length > 0 || f || s(t.isComposeMode, t.displayItemList.rows, t.isWithinCollection);
1261
1261
  }), a = h(
1262
1262
  () => [i.value ? o : void 0, m.value.cssClasses].filter(Boolean).join(" ")
1263
- ), u = h(() => ({
1264
- ...ze({
1263
+ ), d = h(() => ({
1264
+ ..._e({
1265
1265
  containerAttributes: t.displayItemList.containerAttributes,
1266
1266
  widgetContainerStyles: m.value
1267
1267
  }) ? {} : { height: t.isWithinCollection ? "auto" : "100%" },
1268
1268
  display: "flex",
1269
1269
  flexDirection: "column",
1270
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),
1271
+ })), p = h(() => c.value ? a.value : ""), l = h(() => u.value ? { display: "none" } : c.value ? d.value : { display: "contents" });
1272
+ return (g, f) => (y(), b("div", {
1273
+ hidden: u.value || void 0,
1274
+ class: U(p.value || void 0),
1275
1275
  style: S(l.value)
1276
1276
  }, [
1277
- i.value ? (y(), C(W("style"), { key: 0 }, {
1278
- default: M(() => [
1279
- le(q(r.value), 1)
1277
+ i.value ? (y(), w(O("style"), { key: 0 }, {
1278
+ default: $(() => [
1279
+ X(H(r.value), 1)
1280
1280
  ]),
1281
1281
  _: 1
1282
- })) : N("", !0),
1283
- re(g.$slots, "default")
1282
+ })) : R("", !0),
1283
+ le(g.$slots, "default")
1284
1284
  ], 14, go));
1285
1285
  }
1286
- }), ho = ["hidden"], De = /* @__PURE__ */ D({
1286
+ }), ho = ["hidden"], Te = /* @__PURE__ */ k({
1287
1287
  __name: "EmbedInRow",
1288
1288
  props: {
1289
1289
  row: {},
@@ -1294,10 +1294,10 @@ ${i.value}
1294
1294
  },
1295
1295
  setup(e) {
1296
1296
  const t = e;
1297
- function n(c, a, u) {
1297
+ function n(c, a, d) {
1298
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;
1299
+ const p = c && !d ? 3 : 1;
1300
+ return !!((l = a == null ? void 0 : a.columns) != null && l.length) && a.columns.length > p;
1301
1301
  }
1302
1302
  const o = h(
1303
1303
  () => !t.isComposeMode && Un({ row: t.row, deviceDisplayType: t.deviceDisplayType })
@@ -1311,20 +1311,20 @@ ${i.value}
1311
1311
  })
1312
1312
  ), r = h(() => {
1313
1313
  var a;
1314
- const c = L({
1314
+ const c = M({
1315
1315
  deviceDisplayType: t.deviceDisplayType,
1316
1316
  componentAttributes: t.row.rowAttributes
1317
1317
  });
1318
- return me(
1319
- (a = c == null ? void 0 : c.componentAttributesSpecificToDeviceType) == null ? void 0 : a[ye]
1318
+ return ge(
1319
+ (a = c == null ? void 0 : c.componentAttributesSpecificToDeviceType) == null ? void 0 : a[me]
1320
1320
  ) ?? "";
1321
- }), f = h(() => s.value ? r.value : ""), m = h(() => o.value ? { display: "none" } : s.value ? i.value : { display: "contents" });
1321
+ }), u = h(() => s.value ? r.value : ""), m = h(() => o.value ? { display: "none" } : s.value ? i.value : { display: "contents" });
1322
1322
  return (c, a) => (y(), b("div", {
1323
1323
  hidden: o.value || void 0,
1324
- class: K(f.value || void 0),
1324
+ class: U(u.value || void 0),
1325
1325
  style: S(m.value)
1326
1326
  }, [
1327
- re(c.$slots, "default")
1327
+ le(c.$slots, "default")
1328
1328
  ], 14, ho));
1329
1329
  }
1330
1330
  }), qe = [
@@ -1428,7 +1428,7 @@ ${i.value}
1428
1428
  );
1429
1429
  }
1430
1430
  return !1;
1431
- }, Te = /* @__PURE__ */ D({
1431
+ }, xe = /* @__PURE__ */ k({
1432
1432
  __name: "DisplayComponent",
1433
1433
  props: {
1434
1434
  componentType: {},
@@ -1440,7 +1440,7 @@ ${i.value}
1440
1440
  mounts: {}
1441
1441
  },
1442
1442
  setup(e) {
1443
- const t = e, n = h(() => t.components[Re(t.libraryId, t.componentType)]), o = h(() => {
1443
+ const t = e, n = h(() => t.components[Me(t.libraryId, t.componentType)]), o = h(() => {
1444
1444
  var g;
1445
1445
  const l = (g = n.value) == null ? void 0 : g.card;
1446
1446
  return l || (console.error(
@@ -1451,40 +1451,40 @@ ${i.value}
1451
1451
  styleProps: t.styleProps
1452
1452
  })), i = h(
1453
1453
  () => n.value ? Ao(n.value, s.value) : !1
1454
- ), r = h(() => wo(t.styleProps)), f = h(
1454
+ ), r = h(() => wo(t.styleProps)), u = h(
1455
1455
  () => i.value ? Co(t.styleProps) : t.styleProps
1456
1456
  ), m = h(
1457
1457
  () => {
1458
1458
  var l;
1459
- return me((l = t.componentAttributes) == null ? void 0 : l[ye]);
1459
+ return ge((l = t.componentAttributes) == null ? void 0 : l[me]);
1460
1460
  }
1461
1461
  ), c = h(() => i.value && vo(r.value)), a = h(
1462
1462
  () => !i.value || (n.value ? Io(n.value, s.value) : !1)
1463
- ), u = h(
1463
+ ), d = h(
1464
1464
  () => !c.value && a.value ? m.value : void 0
1465
- ), d = h(() => ({
1465
+ ), p = h(() => ({
1466
1466
  componentAttributes: t.componentAttributes,
1467
- styleProps: f.value,
1468
- className: u.value,
1467
+ styleProps: u.value,
1468
+ className: d.value,
1469
1469
  widgetInstanceProps: t.widgetInstanceProps,
1470
1470
  mounts: t.mounts
1471
1471
  }));
1472
1472
  return (l, g) => o.value ? (y(), b(A, { key: 0 }, [
1473
1473
  c.value ? (y(), b("div", {
1474
1474
  key: 0,
1475
- class: K(m.value || void 0),
1475
+ class: U(m.value || void 0),
1476
1476
  style: S(r.value)
1477
1477
  }, [
1478
- (y(), C(W(o.value), J(we(d.value)), null, 16))
1478
+ (y(), w(O(o.value), Q(Ce(p.value)), null, 16))
1479
1479
  ], 6)) : !a.value && m.value ? (y(), b("div", {
1480
1480
  key: 1,
1481
- class: K(m.value)
1481
+ class: U(m.value)
1482
1482
  }, [
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);
1483
+ (y(), w(O(o.value), Q(Ce(p.value)), null, 16))
1484
+ ], 2)) : (y(), w(O(o.value), Q(ot({ key: 2 }, p.value)), null, 16))
1485
+ ], 64)) : R("", !0);
1486
1486
  }
1487
- }), So = ["data-rulecms-overlay-layer"], ko = /* @__PURE__ */ D({
1487
+ }), So = ["data-rulecms-overlay-layer"], ko = /* @__PURE__ */ k({
1488
1488
  __name: "RenderComponentsInner",
1489
1489
  props: {
1490
1490
  displayItemList: {},
@@ -1500,19 +1500,19 @@ ${i.value}
1500
1500
  ancestorColumnIds: {}
1501
1501
  },
1502
1502
  setup(e) {
1503
- const t = e, n = () => ne(t.plugins).components, o = h(
1504
- () => !t.isComposeMode && Jn(t.displayItemList) && !ge({
1503
+ const t = e, n = () => oe(t.plugins).components, o = h(
1504
+ () => !t.isComposeMode && Jn(t.displayItemList) && !he({
1505
1505
  containerAttributes: t.displayItemList.containerAttributes,
1506
1506
  deviceDisplayType: t.deviceDisplayType
1507
1507
  })
1508
1508
  ), s = h(() => {
1509
- const u = Se({
1509
+ const d = ke({
1510
1510
  containerAttributes: t.displayItemList.containerAttributes,
1511
1511
  deviceDisplayType: t.deviceDisplayType
1512
1512
  });
1513
1513
  return no({
1514
1514
  isWithinCollection: t.isWithinCollection,
1515
- baseDeclaresOwnHeight: ze({
1515
+ baseDeclaresOwnHeight: _e({
1516
1516
  containerAttributes: t.displayItemList.containerAttributes,
1517
1517
  widgetContainerStyles: He({
1518
1518
  containerAttributes: t.displayItemList.containerAttributes,
@@ -1520,20 +1520,20 @@ ${i.value}
1520
1520
  isComposeMode: t.isComposeMode
1521
1521
  })
1522
1522
  }),
1523
- baseZIndex: u
1523
+ baseZIndex: d
1524
1524
  });
1525
1525
  }), i = h(() => {
1526
1526
  var l;
1527
- const u = ((l = t.displayItemList.overlayLayers) == null ? void 0 : l.layers) ?? [], d = Se({
1527
+ const d = ((l = t.displayItemList.overlayLayers) == null ? void 0 : l.layers) ?? [], p = ke({
1528
1528
  containerAttributes: t.displayItemList.containerAttributes,
1529
1529
  deviceDisplayType: t.deviceDisplayType
1530
1530
  });
1531
- return u.flatMap((g, p) => to({ layer: g, deviceDisplayType: t.deviceDisplayType }) ? [] : [
1531
+ return d.flatMap((g, f) => to({ layer: g, deviceDisplayType: t.deviceDisplayType }) ? [] : [
1532
1532
  {
1533
- index: p,
1533
+ index: f,
1534
1534
  layer: g,
1535
1535
  boxStyles: oo({
1536
- zIndex: Qn(d, p),
1536
+ zIndex: Qn(p, f),
1537
1537
  pointerEvents: eo({
1538
1538
  containerAttributes: g.containerAttributes,
1539
1539
  deviceDisplayType: t.deviceDisplayType
@@ -1542,65 +1542,65 @@ ${i.value}
1542
1542
  }
1543
1543
  ]);
1544
1544
  });
1545
- function r(u) {
1546
- if (t.isComposeMode && u.type === ce.DroppableBox)
1545
+ function r(d) {
1546
+ if (t.isComposeMode && d.type === ce.DroppableBox)
1547
1547
  return !1;
1548
- const { componentAttributesBasedOnDevice: d } = Ie({
1549
- col: u,
1548
+ const { componentAttributesBasedOnDevice: p } = Se({
1549
+ col: d,
1550
1550
  deviceDisplayType: t.deviceDisplayType,
1551
1551
  isComposeMode: t.isComposeMode,
1552
- sourceComponentsPlugin: ne(t.plugins)
1553
- }), l = !!d && d["hide-component-3-resolutions"] === "true";
1552
+ sourceComponentsPlugin: oe(t.plugins)
1553
+ }), l = !!p && p["hide-component-3-resolutions"] === "true";
1554
1554
  return !(!t.isComposeMode && l);
1555
1555
  }
1556
- function f(u) {
1557
- const { componentAttributesBasedOnDevice: d, componentStyles: l } = Ie({
1558
- col: u,
1556
+ function u(d) {
1557
+ const { componentAttributesBasedOnDevice: p, componentStyles: l } = Se({
1558
+ col: d,
1559
1559
  deviceDisplayType: t.deviceDisplayType,
1560
1560
  isComposeMode: t.isComposeMode,
1561
- sourceComponentsPlugin: ne(t.plugins)
1561
+ sourceComponentsPlugin: oe(t.plugins)
1562
1562
  });
1563
1563
  return {
1564
- componentAttributes: d,
1564
+ componentAttributes: p,
1565
1565
  styleProps: l
1566
1566
  };
1567
1567
  }
1568
- function m(u) {
1569
- const d = je(u.type);
1570
- if (!(d != null && d.length))
1568
+ function m(d) {
1569
+ const p = je(d.type);
1570
+ if (!(p != null && p.length))
1571
1571
  return null;
1572
- const l = u.collection ?? t.widgetCollections[d];
1572
+ const l = d.collection ?? t.widgetCollections[p];
1573
1573
  if (!l)
1574
1574
  throw new Error(
1575
- `DisplayCollection - Collection with ID ${d} not found in widgetCollections. Available collections: ${Object.keys(t.widgetCollections).join(", ")}`
1575
+ `DisplayCollection - Collection with ID ${p} not found in widgetCollections. Available collections: ${Object.keys(t.widgetCollections).join(", ")}`
1576
1576
  );
1577
- return !l.collectionRows || !Fn(l.collectionRows) ? null : l.collectionRows;
1577
+ return !l.collectionRows || !Bn(l.collectionRows) ? null : l.collectionRows;
1578
1578
  }
1579
- function c(u) {
1580
- return [...t.ancestorColumnIds ?? [], u];
1579
+ function c(d) {
1580
+ return [...t.ancestorColumnIds ?? [], d];
1581
1581
  }
1582
- function a(u) {
1582
+ function a(d) {
1583
1583
  return so({
1584
1584
  componentProps: t.componentProps,
1585
1585
  ancestorColumnIds: t.ancestorColumnIds,
1586
- columnId: u
1586
+ columnId: d
1587
1587
  });
1588
1588
  }
1589
- return (u, d) => {
1589
+ return (d, p) => {
1590
1590
  const l = st("RenderComponentsInner", !0);
1591
1591
  return o.value ? (y(), b("div", {
1592
1592
  key: 0,
1593
1593
  style: S(s.value)
1594
1594
  }, [
1595
- U(ke, {
1595
+ V(De, {
1596
1596
  "display-item-list": e.displayItemList,
1597
1597
  "is-compose-mode": e.isComposeMode,
1598
1598
  "show-drop-containers": e.showDropContainers,
1599
1599
  "is-within-collection": e.isWithinCollection,
1600
1600
  "device-display-type": e.deviceDisplayType
1601
1601
  }, {
1602
- default: M(() => [
1603
- (y(!0), b(A, null, R(e.displayItemList.rows, (g) => (y(), C(De, {
1602
+ default: $(() => [
1603
+ (y(!0), b(A, null, W(e.displayItemList.rows, (g) => (y(), w(Te, {
1604
1604
  key: g.id,
1605
1605
  row: g,
1606
1606
  "is-compose-mode": e.isComposeMode,
@@ -1608,14 +1608,14 @@ ${i.value}
1608
1608
  "is-within-collection": e.isWithinCollection,
1609
1609
  "device-display-type": e.deviceDisplayType
1610
1610
  }, {
1611
- default: M(() => [
1612
- (y(!0), b(A, null, R(g.columns, (p) => (y(), b(A, {
1613
- key: p.id
1611
+ default: $(() => [
1612
+ (y(!0), b(A, null, W(g.columns, (f) => (y(), b(A, {
1613
+ key: f.id
1614
1614
  }, [
1615
- r(p) ? (y(), b(A, { key: 0 }, [
1616
- m(p) ? (y(), C(l, {
1615
+ r(f) ? (y(), b(A, { key: 0 }, [
1616
+ m(f) ? (y(), w(l, {
1617
1617
  key: 0,
1618
- "display-item-list": m(p),
1618
+ "display-item-list": m(f),
1619
1619
  "is-compose-mode": e.isComposeMode,
1620
1620
  "is-within-collection": !0,
1621
1621
  "widget-collections": e.widgetCollections,
@@ -1625,18 +1625,18 @@ ${i.value}
1625
1625
  "device-display-type": e.deviceDisplayType,
1626
1626
  "component-props": e.componentProps,
1627
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, {
1628
+ "ancestor-column-ids": c(f.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(), w(xe, {
1630
1630
  key: 1,
1631
- "component-type": p.type,
1632
- "library-id": p.libraryId,
1633
- "component-attributes": f(p).componentAttributes,
1631
+ "component-type": f.type,
1632
+ "library-id": f.libraryId,
1633
+ "component-attributes": u(f).componentAttributes,
1634
1634
  components: n(),
1635
- "style-props": f(p).styleProps,
1636
- "widget-instance-props": a(p.id),
1635
+ "style-props": u(f).styleProps,
1636
+ "widget-instance-props": a(f.id),
1637
1637
  mounts: e.mounts
1638
1638
  }, null, 8, ["component-type", "library-id", "component-attributes", "components", "style-props", "widget-instance-props", "mounts"]))
1639
- ], 64)) : N("", !0)
1639
+ ], 64)) : R("", !0)
1640
1640
  ], 64))), 128))
1641
1641
  ]),
1642
1642
  _: 2
@@ -1644,12 +1644,12 @@ ${i.value}
1644
1644
  ]),
1645
1645
  _: 1
1646
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", {
1647
+ (y(!0), b(A, null, W(i.value, (g) => (y(), b("div", {
1648
1648
  key: g.index,
1649
1649
  "data-rulecms-overlay-layer": g.index,
1650
1650
  style: S(g.boxStyles)
1651
1651
  }, [
1652
- U(l, {
1652
+ V(l, {
1653
1653
  "display-item-list": g.layer,
1654
1654
  "is-compose-mode": e.isComposeMode,
1655
1655
  "is-within-collection": !1,
@@ -1663,7 +1663,7 @@ ${i.value}
1663
1663
  "ancestor-column-ids": e.ancestorColumnIds
1664
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
1665
  ], 12, So))), 128))
1666
- ], 4)) : (y(), C(ke, {
1666
+ ], 4)) : (y(), w(De, {
1667
1667
  key: 1,
1668
1668
  "display-item-list": e.displayItemList,
1669
1669
  "is-compose-mode": e.isComposeMode,
@@ -1671,8 +1671,8 @@ ${i.value}
1671
1671
  "is-within-collection": e.isWithinCollection,
1672
1672
  "device-display-type": e.deviceDisplayType
1673
1673
  }, {
1674
- default: M(() => [
1675
- (y(!0), b(A, null, R(e.displayItemList.rows, (g) => (y(), C(De, {
1674
+ default: $(() => [
1675
+ (y(!0), b(A, null, W(e.displayItemList.rows, (g) => (y(), w(Te, {
1676
1676
  key: g.id,
1677
1677
  row: g,
1678
1678
  "is-compose-mode": e.isComposeMode,
@@ -1680,14 +1680,14 @@ ${i.value}
1680
1680
  "is-within-collection": e.isWithinCollection,
1681
1681
  "device-display-type": e.deviceDisplayType
1682
1682
  }, {
1683
- default: M(() => [
1684
- (y(!0), b(A, null, R(g.columns, (p) => (y(), b(A, {
1685
- key: p.id
1683
+ default: $(() => [
1684
+ (y(!0), b(A, null, W(g.columns, (f) => (y(), b(A, {
1685
+ key: f.id
1686
1686
  }, [
1687
- r(p) ? (y(), b(A, { key: 0 }, [
1688
- m(p) ? (y(), C(l, {
1687
+ r(f) ? (y(), b(A, { key: 0 }, [
1688
+ m(f) ? (y(), w(l, {
1689
1689
  key: 0,
1690
- "display-item-list": m(p),
1690
+ "display-item-list": m(f),
1691
1691
  "is-compose-mode": e.isComposeMode,
1692
1692
  "is-within-collection": !0,
1693
1693
  "widget-collections": e.widgetCollections,
@@ -1697,18 +1697,18 @@ ${i.value}
1697
1697
  "device-display-type": e.deviceDisplayType,
1698
1698
  "component-props": e.componentProps,
1699
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, {
1700
+ "ancestor-column-ids": c(f.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(), w(xe, {
1702
1702
  key: 1,
1703
- "component-type": p.type,
1704
- "library-id": p.libraryId,
1705
- "component-attributes": f(p).componentAttributes,
1703
+ "component-type": f.type,
1704
+ "library-id": f.libraryId,
1705
+ "component-attributes": u(f).componentAttributes,
1706
1706
  components: n(),
1707
- "style-props": f(p).styleProps,
1708
- "widget-instance-props": a(p.id),
1707
+ "style-props": u(f).styleProps,
1708
+ "widget-instance-props": a(f.id),
1709
1709
  mounts: e.mounts
1710
1710
  }, null, 8, ["component-type", "library-id", "component-attributes", "components", "style-props", "widget-instance-props", "mounts"]))
1711
- ], 64)) : N("", !0)
1711
+ ], 64)) : R("", !0)
1712
1712
  ], 64))), 128))
1713
1713
  ]),
1714
1714
  _: 2
@@ -1718,7 +1718,7 @@ ${i.value}
1718
1718
  }, 8, ["display-item-list", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]));
1719
1719
  };
1720
1720
  }
1721
- }), ie = /* @__PURE__ */ D({
1721
+ }), re = /* @__PURE__ */ k({
1722
1722
  __name: "RenderComponentsForDevice",
1723
1723
  props: {
1724
1724
  displayItemList: {},
@@ -1736,7 +1736,7 @@ ${i.value}
1736
1736
  setup(e) {
1737
1737
  return (t, n) => {
1738
1738
  var o, s;
1739
- return (s = (o = e.displayItemList) == null ? void 0 : o.rows) != null && s.length ? (y(), C(ko, {
1739
+ return (s = (o = e.displayItemList) == null ? void 0 : o.rows) != null && s.length ? (y(), w(ko, {
1740
1740
  key: 0,
1741
1741
  "display-item-list": e.displayItemList,
1742
1742
  "is-compose-mode": e.isComposeMode,
@@ -1749,26 +1749,26 @@ ${i.value}
1749
1749
  "component-props": e.componentProps,
1750
1750
  mounts: e.mounts,
1751
1751
  "ancestor-column-ids": e.ancestorColumnIds
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);
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"])) : R("", !0);
1753
1753
  };
1754
1754
  }
1755
- }), Xe = /* @__PURE__ */ D({
1755
+ }), Xe = /* @__PURE__ */ k({
1756
1756
  __name: "LibraryStylesheets",
1757
1757
  props: {
1758
1758
  stylesheets: {}
1759
1759
  },
1760
1760
  setup(e) {
1761
- return (t, n) => (y(!0), b(A, null, R(e.stylesheets ?? [], (o) => (y(), C(W("style"), {
1761
+ return (t, n) => (y(!0), b(A, null, W(e.stylesheets ?? [], (o) => (y(), w(O("style"), {
1762
1762
  key: o,
1763
1763
  "data-rulecms-library-stylesheet": ""
1764
1764
  }, {
1765
- default: M(() => [
1766
- le(q(o), 1)
1765
+ default: $(() => [
1766
+ X(H(o), 1)
1767
1767
  ]),
1768
1768
  _: 2
1769
1769
  }, 1024))), 128));
1770
1770
  }
1771
- }), Do = /* @__PURE__ */ D({
1771
+ }), Do = /* @__PURE__ */ k({
1772
1772
  __name: "BreakpointVariantRender",
1773
1773
  props: {
1774
1774
  displayItemList: {},
@@ -1783,38 +1783,38 @@ ${i.value}
1783
1783
  let n = 0;
1784
1784
  const o = e, s = `rulecms-bp-${++n}`, i = h(() => o.scopeIdInput ?? s), r = h(
1785
1785
  () => po(o.displayItemList, o.widgetCollections)
1786
- ), f = h(() => mo(i.value));
1786
+ ), u = h(() => mo(i.value));
1787
1787
  return (m, c) => {
1788
1788
  var a;
1789
1789
  return y(), b(A, null, [
1790
- U(Xe, {
1790
+ V(Xe, {
1791
1791
  stylesheets: (a = e.plugins.sourceComponents) == null ? void 0 : a.stylesheets
1792
1792
  }, null, 8, ["stylesheets"]),
1793
1793
  r.value ? (y(), b(A, { key: 1 }, [
1794
- (y(), C(W("style"), null, {
1795
- default: M(() => [
1796
- le(q(f.value), 1)
1794
+ (y(), w(O("style"), null, {
1795
+ default: $(() => [
1796
+ X(H(u.value), 1)
1797
1797
  ]),
1798
1798
  _: 1
1799
1799
  })),
1800
- (y(), b(A, null, R(t, (u) => $("div", {
1801
- key: u,
1802
- class: K(`${i.value}-${u.toLowerCase()}`)
1800
+ (y(), b(A, null, W(t, (d) => N("div", {
1801
+ key: d,
1802
+ class: U(`${i.value}-${d.toLowerCase()}`)
1803
1803
  }, [
1804
- U(ie, {
1804
+ V(re, {
1805
1805
  "display-item-list": e.displayItemList,
1806
1806
  "is-compose-mode": !1,
1807
1807
  "is-within-collection": !1,
1808
1808
  "widget-collections": e.widgetCollections,
1809
1809
  "show-drop-containers": !1,
1810
1810
  "redux-device-display-type": "desktop",
1811
- "device-display-type": u,
1811
+ "device-display-type": d,
1812
1812
  plugins: e.plugins,
1813
1813
  "component-props": e.componentProps,
1814
1814
  mounts: e.mounts
1815
1815
  }, null, 8, ["display-item-list", "widget-collections", "device-display-type", "plugins", "component-props", "mounts"])
1816
1816
  ], 2)), 64))
1817
- ], 64)) : (y(), C(ie, {
1817
+ ], 64)) : (y(), w(re, {
1818
1818
  key: 0,
1819
1819
  "display-item-list": e.displayItemList,
1820
1820
  "is-compose-mode": !1,
@@ -1839,7 +1839,7 @@ function To(e, t, n) {
1839
1839
  const o = (n == null ? void 0 : n.toLowerCase()) || "desktop";
1840
1840
  return o === "phone" ? "Phone" : o === "tablet" ? "Tablet" : "Desktop";
1841
1841
  }
1842
- const xo = `(max-width: ${Fe})`, Eo = `(max-width: ${Ve})`, Po = /* @__PURE__ */ D({
1842
+ const xo = `(max-width: ${Fe})`, Eo = `(max-width: ${Ke})`, Po = /* @__PURE__ */ k({
1843
1843
  __name: "RenderComponents",
1844
1844
  props: {
1845
1845
  displayItemList: {},
@@ -1853,7 +1853,7 @@ const xo = `(max-width: ${Fe})`, Eo = `(max-width: ${Ve})`, Po = /* @__PURE__ */
1853
1853
  mounts: {}
1854
1854
  },
1855
1855
  setup(e) {
1856
- const t = e, n = V("Desktop");
1856
+ const t = e, n = K("Desktop");
1857
1857
  let o, s;
1858
1858
  function i() {
1859
1859
  n.value = To(
@@ -1864,16 +1864,16 @@ const xo = `(max-width: ${Fe})`, Eo = `(max-width: ${Ve})`, Po = /* @__PURE__ */
1864
1864
  }
1865
1865
  return it(() => {
1866
1866
  typeof matchMedia == "function" && (o = matchMedia(xo), s = matchMedia(Eo), o.addEventListener("change", i), s.addEventListener("change", i)), i();
1867
- }), $e(() => {
1867
+ }), Re(() => {
1868
1868
  o == null || o.removeEventListener("change", i), s == null || s.removeEventListener("change", i);
1869
- }), (r, f) => {
1869
+ }), (r, u) => {
1870
1870
  var m;
1871
1871
  return y(), b(A, null, [
1872
- e.isWithinCollection ? N("", !0) : (y(), C(Xe, {
1872
+ e.isWithinCollection ? R("", !0) : (y(), w(Xe, {
1873
1873
  key: 0,
1874
1874
  stylesheets: (m = e.plugins.sourceComponents) == null ? void 0 : m.stylesheets
1875
1875
  }, null, 8, ["stylesheets"])),
1876
- U(ie, {
1876
+ V(re, {
1877
1877
  "display-item-list": e.displayItemList,
1878
1878
  "is-compose-mode": e.isComposeMode,
1879
1879
  "is-within-collection": e.isWithinCollection,
@@ -1888,8 +1888,48 @@ const xo = `(max-width: ${Fe})`, Eo = `(max-width: ${Ve})`, Po = /* @__PURE__ */
1888
1888
  ], 64);
1889
1889
  };
1890
1890
  }
1891
+ }), Lo = (e) => e.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), $o = /[{};]/, Ro = (e) => {
1892
+ if (!e)
1893
+ return {};
1894
+ const t = {};
1895
+ for (const [n, o] of Object.entries(e)) {
1896
+ if (!ue(n) || typeof o != "string")
1897
+ continue;
1898
+ const s = o.trim();
1899
+ s === "" || $o.test(s) || (t[n.trim()] = s);
1900
+ }
1901
+ return t;
1902
+ }, Mo = (e, t) => {
1903
+ const n = Ro(t), o = Object.keys(n);
1904
+ if (o.length === 0 || !e)
1905
+ return null;
1906
+ const s = `[data-rulecms-published-key="${Lo(e)}"] > *`, i = o.sort((r, u) => r.localeCompare(u)).map((r) => ` ${r}: ${n[r]};`).join(`
1907
+ `);
1908
+ return `${s} {
1909
+ ${i}
1910
+ }`;
1911
+ }, No = /* @__PURE__ */ k({
1912
+ __name: "ProjectCssVariablesStylesheet",
1913
+ props: {
1914
+ publishedKey: {},
1915
+ variables: {}
1916
+ },
1917
+ setup(e) {
1918
+ const t = e, n = h(
1919
+ () => Mo(t.publishedKey, t.variables)
1920
+ );
1921
+ return (o, s) => n.value ? (y(), w(O("style"), {
1922
+ key: 0,
1923
+ "data-rulecms-project-css-variables": ""
1924
+ }, {
1925
+ default: $(() => [
1926
+ X(H(n.value), 1)
1927
+ ]),
1928
+ _: 1
1929
+ })) : R("", !0);
1930
+ }
1891
1931
  });
1892
- function Lo(e) {
1932
+ function Wo(e) {
1893
1933
  const t = {};
1894
1934
  return Object.entries(e).forEach(([n, o]) => {
1895
1935
  const s = { ...o };
@@ -1903,62 +1943,63 @@ function Lo(e) {
1903
1943
  s.parentId && (i = `${i}@${s.parentId}`), t[i] = s;
1904
1944
  }), t;
1905
1945
  }
1906
- function $o(e) {
1946
+ function Oo(e) {
1907
1947
  return typeof e.itemList == "string" ? JSON.parse(e.itemList) : e.itemList;
1908
1948
  }
1909
1949
  function Ze(e) {
1910
1950
  return {
1911
- displayItemList: $o(e.widget),
1912
- widgetCollections: Lo(e.childCollections),
1913
- ...e.libraries ? { libraries: e.libraries } : {}
1951
+ displayItemList: Oo(e.widget),
1952
+ widgetCollections: Wo(e.childCollections),
1953
+ ...e.libraries ? { libraries: e.libraries } : {},
1954
+ ...e.cssVariables && Object.keys(e.cssVariables).length > 0 ? { cssVariables: e.cssVariables } : {}
1914
1955
  };
1915
1956
  }
1916
- function Ro(e) {
1917
- const t = e.registry ?? X(), n = ae({
1957
+ function Vo(e) {
1958
+ const t = e.registry ?? Z(), n = ae({
1918
1959
  displayItemList: e.displayItemList,
1919
1960
  widgetCollections: e.widgetCollections
1920
1961
  });
1921
1962
  return t.resolveSync({ registrations: e.libraries, referenced: n });
1922
1963
  }
1923
- function Mo(e) {
1924
- const t = e.registry ?? X(), n = ae({
1964
+ function jo(e) {
1965
+ const t = e.registry ?? Z(), n = ae({
1925
1966
  displayItemList: e.displayItemList,
1926
1967
  widgetCollections: e.widgetCollections
1927
1968
  });
1928
1969
  return t.resolve({ registrations: e.libraries, referenced: n });
1929
1970
  }
1930
- const No = {
1971
+ const Bo = {
1931
1972
  display: "flex",
1932
1973
  justifyContent: "center",
1933
1974
  alignItems: "center",
1934
1975
  padding: "3rem",
1935
1976
  color: "#e2e8f0"
1936
- }, Wo = {
1977
+ }, Fo = {
1937
1978
  display: "flex",
1938
1979
  alignItems: "center",
1939
1980
  gap: "1rem"
1940
- }, Oo = {
1981
+ }, Ko = {
1941
1982
  width: "40px",
1942
1983
  height: "40px",
1943
1984
  border: "4px solid #4a5568",
1944
1985
  borderTopColor: "#63b3ed",
1945
1986
  borderRadius: "50%",
1946
1987
  animation: "spin 1s linear infinite"
1947
- }, xe = {
1988
+ }, Ee = {
1948
1989
  padding: "1.5rem",
1949
1990
  backgroundColor: "#742a2a",
1950
1991
  border: "1px solid #9b2c2c",
1951
1992
  borderRadius: "8px",
1952
1993
  color: "#fed7d7"
1953
- }, Ee = {
1994
+ }, Pe = {
1954
1995
  fontSize: "16px",
1955
1996
  fontWeight: "600",
1956
1997
  marginBottom: "0.5rem",
1957
1998
  color: "#feb2b2"
1958
- }, Pe = {
1999
+ }, Le = {
1959
2000
  fontSize: "14px",
1960
2001
  color: "#fed7d7"
1961
- }, jo = `
2002
+ }, Uo = `
1962
2003
  @keyframes spin {
1963
2004
  from {
1964
2005
  transform: rotate(0deg);
@@ -1967,7 +2008,7 @@ const No = {
1967
2008
  transform: rotate(360deg);
1968
2009
  }
1969
2010
  }
1970
- `, ns = "data-rulecms-published-key", Bo = ["data-rulecms-published-key"], os = /* @__PURE__ */ D({
2011
+ `, ls = "data-rulecms-published-key", Ho = ["data-rulecms-published-key"], cs = /* @__PURE__ */ k({
1971
2012
  __name: "RuleCMSWidget",
1972
2013
  props: {
1973
2014
  publishedKey: {},
@@ -1980,32 +2021,32 @@ const No = {
1980
2021
  mounts: {}
1981
2022
  },
1982
2023
  setup(e) {
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(() => ({
2024
+ const t = e, n = rt(Be, null), o = K(!1), s = K(null), i = K(null), r = K(null), u = h(() => t.mode === "pre-fetched"), m = h(() => ({
1984
2025
  sourceComponents: r.value ?? void 0
1985
2026
  }));
1986
- let c = null, a = null, u = !1;
1987
- function d() {
2027
+ let c = null, a = null, d = !1;
2028
+ function p() {
1988
2029
  if (!i.value) {
1989
2030
  r.value = null;
1990
2031
  return;
1991
2032
  }
1992
- const v = t.libraries ?? (n == null ? void 0 : n.libraries), T = n == null ? void 0 : n.libraryRegistry, F = Ro({
2033
+ const v = t.libraries ?? (n == null ? void 0 : n.libraries), T = n == null ? void 0 : n.libraryRegistry, P = Vo({
1993
2034
  displayItemList: i.value.displayItemList,
1994
2035
  widgetCollections: i.value.widgetCollections,
1995
2036
  libraries: v,
1996
2037
  registry: T
1997
2038
  });
1998
- if (F) {
1999
- r.value = F;
2039
+ if (P) {
2040
+ r.value = P;
2000
2041
  return;
2001
2042
  }
2002
- Mo({
2043
+ jo({
2003
2044
  displayItemList: i.value.displayItemList,
2004
2045
  widgetCollections: i.value.widgetCollections,
2005
2046
  libraries: v,
2006
2047
  registry: T
2007
- }).then((Z) => {
2008
- r.value = Z;
2048
+ }).then((J) => {
2049
+ r.value = J;
2009
2050
  });
2010
2051
  }
2011
2052
  function l() {
@@ -2017,57 +2058,57 @@ const No = {
2017
2058
  });
2018
2059
  }
2019
2060
  function g() {
2020
- if (u || typeof document > "u")
2061
+ if (d || typeof document > "u")
2021
2062
  return;
2022
2063
  const v = "rulecms-widget-spinner-styles";
2023
2064
  if (!document.getElementById(v)) {
2024
2065
  const T = document.createElement("style");
2025
- T.id = v, T.textContent = jo, document.head.appendChild(T);
2066
+ T.id = v, T.textContent = Uo, document.head.appendChild(T);
2026
2067
  }
2027
- u = !0;
2068
+ d = !0;
2028
2069
  }
2029
- function p() {
2070
+ function f() {
2030
2071
  const v = t.token ?? (n == null ? void 0 : n.token), T = t.endpoint ?? (n == null ? void 0 : n.endpoint);
2031
2072
  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;
2073
+ s.value = t.publishedKey ? "Token is required. Provide it either directly as a prop (`token`) or via RuleCMSWidgetProvider." : j(v) ? "Widget key is required" : "Published key is required", i.value = null;
2033
2074
  return;
2034
2075
  }
2035
- const F = `${t.publishedKey}|${v}`;
2036
- if (a === F && i.value) {
2037
- d();
2076
+ const P = `${t.publishedKey}|${v}`;
2077
+ if (a === P && i.value) {
2078
+ p();
2038
2079
  return;
2039
2080
  }
2040
2081
  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 });
2082
+ const J = c.signal;
2083
+ a = P, o.value = !0, s.value = null;
2084
+ const Je = Oe({ publishedKey: t.publishedKey, token: v, endpoint: T });
2044
2085
  fetch(Je, {
2045
2086
  method: "GET",
2046
2087
  headers: { "Content-Type": "application/json" },
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);
2088
+ ...j(v) ? { cache: "no-store" } : {},
2089
+ signal: J
2090
+ }).then(async (L) => {
2091
+ if (L.ok) {
2092
+ const z = await L.json();
2093
+ z.success ? (i.value = Ze(z.data), s.value = null, p(), l()) : (s.value = "Failed to fetch widget data", i.value = null);
2053
2094
  } else {
2054
- const z = await P.json().catch(() => ({ error: "Unknown error" }));
2055
- s.value = z.error || `Request failed with status ${P.status}`, i.value = null;
2095
+ const z = await L.json().catch(() => ({ error: "Unknown error" }));
2096
+ s.value = z.error || `Request failed with status ${L.status}`, i.value = null;
2056
2097
  }
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);
2098
+ }).catch((L) => {
2099
+ L instanceof DOMException && L.name === "AbortError" || (console.error("Error fetching widget:", L), s.value = "Failed to fetch widget", i.value = null);
2059
2100
  }).finally(() => {
2060
2101
  o.value = !1;
2061
2102
  });
2062
2103
  }
2063
2104
  function I() {
2064
2105
  if (t.mode === "pre-fetched") {
2065
- i.value = t.initialData ?? null, o.value = !1, s.value = null, d(), l();
2106
+ i.value = t.initialData ?? null, o.value = !1, s.value = null, p(), l();
2066
2107
  return;
2067
2108
  }
2068
- g(), p();
2109
+ g(), f();
2069
2110
  }
2070
- return Le(
2111
+ return $e(
2071
2112
  () => [
2072
2113
  t.publishedKey,
2073
2114
  t.token,
@@ -2081,142 +2122,149 @@ const No = {
2081
2122
  I();
2082
2123
  },
2083
2124
  { immediate: !0 }
2084
- ), $e(() => {
2125
+ ), Re(() => {
2085
2126
  c == null || c.abort();
2086
- }), (v, T) => (y(), b("span", {
2087
- "data-rulecms-published-key": e.publishedKey,
2088
- style: { display: "contents" }
2089
- }, [
2090
- e.mode !== "pre-fetched" && o.value ? (y(), b("div", {
2091
- key: 0,
2092
- style: S(x(No))
2127
+ }), (v, T) => {
2128
+ var P;
2129
+ return y(), b("span", {
2130
+ "data-rulecms-published-key": e.publishedKey,
2131
+ style: { display: "contents" }
2093
2132
  }, [
2094
- $("div", {
2095
- style: S(x(Wo))
2133
+ V(No, {
2134
+ "published-key": e.publishedKey,
2135
+ variables: (P = i.value) == null ? void 0 : P.cssVariables
2136
+ }, null, 8, ["published-key", "variables"]),
2137
+ e.mode !== "pre-fetched" && o.value ? (y(), b("div", {
2138
+ key: 0,
2139
+ style: S(x(Bo))
2096
2140
  }, [
2097
- $("div", {
2098
- style: S(x(Oo))
2099
- }, null, 4)
2100
- ], 4)
2101
- ], 4)) : e.mode !== "pre-fetched" && s.value ? (y(), b("div", {
2102
- key: 1,
2103
- style: S(x(xe))
2104
- }, [
2105
- $("div", {
2141
+ N("div", {
2142
+ style: S(x(Fo))
2143
+ }, [
2144
+ N("div", {
2145
+ style: S(x(Ko))
2146
+ }, null, 4)
2147
+ ], 4)
2148
+ ], 4)) : e.mode !== "pre-fetched" && s.value ? (y(), b("div", {
2149
+ key: 1,
2106
2150
  style: S(x(Ee))
2107
- }, "Error Loading Widget", 4),
2108
- $("div", {
2109
- style: S(x(Pe))
2110
- }, q(s.value), 5)
2111
- ], 4)) : e.mode !== "pre-fetched" && !i.value ? (y(), b("div", {
2112
- key: 2,
2113
- style: S(x(xe))
2114
- }, [
2115
- $("div", {
2151
+ }, [
2152
+ N("div", {
2153
+ style: S(x(Pe))
2154
+ }, "Error Loading Widget", 4),
2155
+ N("div", {
2156
+ style: S(x(Le))
2157
+ }, H(s.value), 5)
2158
+ ], 4)) : e.mode !== "pre-fetched" && !i.value ? (y(), b("div", {
2159
+ key: 2,
2116
2160
  style: S(x(Ee))
2117
- }, "No Widget Data", 4),
2118
- $("div", {
2119
- style: S(x(Pe))
2120
- }, "No widget data available", 4)
2121
- ], 4)) : r.value && i.value ? (y(), b(A, { key: 3 }, [
2122
- f.value ? (y(), C(Do, {
2123
- key: 0,
2124
- "display-item-list": i.value.displayItemList,
2125
- "widget-collections": i.value.widgetCollections,
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, {
2130
- key: 1,
2131
- "display-item-list": i.value.displayItemList,
2132
- "is-compose-mode": !1,
2133
- "is-within-collection": !1,
2134
- "widget-collections": i.value.widgetCollections,
2135
- "show-drop-containers": !1,
2136
- "redux-device-display-type": "desktop",
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));
2161
+ }, [
2162
+ N("div", {
2163
+ style: S(x(Pe))
2164
+ }, "No Widget Data", 4),
2165
+ N("div", {
2166
+ style: S(x(Le))
2167
+ }, "No widget data available", 4)
2168
+ ], 4)) : r.value && i.value ? (y(), b(A, { key: 3 }, [
2169
+ u.value ? (y(), w(Do, {
2170
+ key: 0,
2171
+ "display-item-list": i.value.displayItemList,
2172
+ "widget-collections": i.value.widgetCollections,
2173
+ plugins: m.value,
2174
+ "component-props": e.componentProps,
2175
+ mounts: e.mounts
2176
+ }, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts"])) : (y(), w(Po, {
2177
+ key: 1,
2178
+ "display-item-list": i.value.displayItemList,
2179
+ "is-compose-mode": !1,
2180
+ "is-within-collection": !1,
2181
+ "widget-collections": i.value.widgetCollections,
2182
+ "show-drop-containers": !1,
2183
+ "redux-device-display-type": "desktop",
2184
+ plugins: m.value,
2185
+ "component-props": e.componentProps,
2186
+ mounts: e.mounts
2187
+ }, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts"]))
2188
+ ], 64)) : R("", !0)
2189
+ ], 8, Ho);
2190
+ };
2143
2191
  }
2144
2192
  });
2145
- class _ extends Error {
2193
+ class Y extends Error {
2146
2194
  constructor(n, o) {
2147
2195
  super(n);
2148
- be(this, "status");
2196
+ we(this, "status");
2149
2197
  this.name = "FetchRuleCMSWidgetError", this.status = o;
2150
2198
  }
2151
2199
  }
2152
- async function ss(e) {
2200
+ async function as(e) {
2153
2201
  const { publishedKey: t, token: n, endpoint: o, fetchOptions: s } = e;
2154
2202
  if (!t)
2155
- throw new _(
2156
- O(n) ? "Widget key is required" : "Published key is required"
2203
+ throw new Y(
2204
+ j(n) ? "Widget key is required" : "Published key is required"
2157
2205
  );
2158
2206
  if (!n)
2159
- throw new _("Token is required");
2160
- const i = We({ publishedKey: t, token: n, endpoint: o }), r = await fetch(i, {
2207
+ throw new Y("Token is required");
2208
+ const i = Oe({ publishedKey: t, token: n, endpoint: o }), r = await fetch(i, {
2161
2209
  method: "GET",
2162
2210
  headers: { "Content-Type": "application/json" },
2163
- ...O(n) ? { cache: "no-store" } : {},
2211
+ ...j(n) ? { cache: "no-store" } : {},
2164
2212
  ...s
2165
2213
  });
2166
2214
  if (!r.ok) {
2167
2215
  const m = await r.json().catch(() => ({ error: "Unknown error" }));
2168
- throw new _(
2216
+ throw new Y(
2169
2217
  m.error || `Request failed with status ${r.status}`,
2170
2218
  r.status
2171
2219
  );
2172
2220
  }
2173
- const f = await r.json();
2174
- if (!f.success)
2175
- throw new _("Failed to fetch widget data");
2176
- return Ze(f.data);
2221
+ const u = await r.json();
2222
+ if (!u.success)
2223
+ throw new Y("Failed to fetch widget data");
2224
+ return Ze(u.data);
2177
2225
  }
2178
- async function is(e) {
2226
+ async function us(e) {
2179
2227
  const { data: t, libraries: n } = e, o = ae({
2180
2228
  displayItemList: t.displayItemList,
2181
2229
  widgetCollections: t.widgetCollections
2182
2230
  });
2183
- return X().resolve({ registrations: n, referenced: o });
2231
+ return Z().resolve({ registrations: n, referenced: o });
2184
2232
  }
2185
2233
  export {
2186
- Uo as AlignContentTypes,
2234
+ Yo as AlignContentTypes,
2187
2235
  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,
2236
+ We as COLLECTION_TYPE_PREFIX,
2237
+ be as COMPONENT_PROPS_PATH_SEPARATOR,
2238
+ me as CSS_CLASSES_ATTRIBUTE_NAME,
2239
+ _t as CSS_VARIABLE_NAME_MAX_LENGTH,
2192
2240
  Ht as CSS_VARIABLE_NAME_PATTERN,
2193
- Ge as DEFAULT_BASE_Z_INDEX,
2241
+ ze as DEFAULT_BASE_Z_INDEX,
2194
2242
  Dt as DEFAULT_CLOUDINARY_CLOUD_NAME,
2195
- H as DEFAULT_LIBRARY_ID,
2196
- Vn as DEFAULT_ROW_GAP,
2243
+ _ as DEFAULT_LIBRARY_ID,
2244
+ Fn as DEFAULT_ROW_GAP,
2197
2245
  dt as DEV_CLIENT_TOKEN_PREFIX,
2198
2246
  mt as DEV_WIDGET_API_PATH,
2199
- Ho as DeviceDisplayTypes,
2200
- Te as DisplayComponent,
2247
+ qo as DeviceDisplayTypes,
2248
+ xe as DisplayComponent,
2201
2249
  ce as DisplayItemTypes,
2202
- Me as DragItemIdPrefixTypes,
2250
+ Ne as DragItemIdPrefixTypes,
2203
2251
  At as EMBEDDED_KEY_SEPARATOR,
2204
2252
  mn as FLEX_LAYOUT_STYLE_KEYS_THAT_DERIVE_DISPLAY,
2205
- _ as FetchRuleCMSWidgetError,
2253
+ Y as FetchRuleCMSWidgetError,
2206
2254
  Ue as HIDE_WIDGET_ATTRIBUTE_NAME,
2207
- Ae as JustifyContentTypes,
2208
- _n as POINTER_EVENTS_ATTRIBUTE_NAME,
2255
+ Ie as JustifyContentTypes,
2256
+ Gn as POINTER_EVENTS_ATTRIBUTE_NAME,
2209
2257
  vt as PUBLISHED_KEY_SEPARATOR,
2210
2258
  yt as PUBLISHED_WIDGET_API_PATH,
2211
- Ko as PageViewTypes,
2259
+ Go as PageViewTypes,
2212
2260
  pt as RULECMS_API_ORIGIN,
2213
- ns as RULECMS_PUBLISHED_KEY_ATTRIBUTE,
2261
+ ls as RULECMS_PUBLISHED_KEY_ATTRIBUTE,
2214
2262
  Be as RULECMS_WIDGET_CONTEXT_KEY,
2215
2263
  Po as RenderComponents,
2216
- ie as RenderComponentsForDevice,
2264
+ re as RenderComponentsForDevice,
2217
2265
  ko as RenderComponentsInner,
2218
- os as RuleCMSWidget,
2219
- Jo as RuleCMSWidgetProvider,
2266
+ cs as RuleCMSWidget,
2267
+ os as RuleCMSWidgetProvider,
2220
2268
  Yn as WIDGET_ATTRIBUTES_IGNORED_IN_COMPOSE_MODE,
2221
2269
  ft as WIDGET_CACHE_API_ORIGIN,
2222
2270
  Zn as Z_INDEX_WIDGET_ATTRIBUTE_NAME,
@@ -2227,20 +2275,20 @@ export {
2227
2275
  pn as backgroundSizeAllowlist,
2228
2276
  gn as borderStyleKeywords,
2229
2277
  Yt as boxSpacingSideKeys,
2230
- ts as boxSpacingStyleAttributeEntries,
2278
+ rs as boxSpacingStyleAttributeEntries,
2231
2279
  Ut as buildCloudinaryBackgroundUrl,
2232
2280
  oo as buildOverlayLayerBoxStyles,
2233
2281
  no as buildOverlayStackStyles,
2234
- We as buildWidgetFetchUrl,
2282
+ Oe as buildWidgetFetchUrl,
2235
2283
  io as collectComponentInstancePaths,
2236
2284
  ae as collectReferencedLibraryIds,
2237
2285
  ut as composeSourceComponentsPlugin,
2238
- X as createComponentLibraryRegistry,
2239
- oe as cssAttrArrayKey,
2286
+ Z as createComponentLibraryRegistry,
2287
+ se as cssAttrArrayKey,
2240
2288
  kt as defaultPageWidth,
2241
2289
  On as deriveDisplayFlexIfNeeded,
2242
- Qo as desktopModeWidth,
2243
- ss as fetchRuleCMSWidget,
2290
+ ss as desktopModeWidth,
2291
+ as as fetchRuleCMSWidget,
2244
2292
  lo as findUnmatchedComponentPropsKeys,
2245
2293
  dn as flexDirectionAllowlist,
2246
2294
  an as flexWrapAllowlist,
@@ -2252,84 +2300,84 @@ export {
2252
2300
  Tn as formatBoxShadowStyles,
2253
2301
  En as formatBoxSpacingStyles,
2254
2302
  Pn as formatCssColorStyles,
2255
- pe as formatCssColorValue,
2303
+ fe as formatCssColorValue,
2256
2304
  Ln as formatCssEnumStyles,
2257
2305
  $n as formatCssLengthStyles,
2258
- k as formatCssVariable,
2259
- es as formatCssVariableStyles,
2306
+ D as formatCssVariable,
2307
+ is as formatCssVariableStyles,
2260
2308
  Rn as formatLineHeightStyles,
2261
2309
  Nn as formatObjectStyleAttribute,
2262
2310
  Mn as formatOpacityStyles,
2263
- B as formatSpacingSideValue,
2311
+ F as formatSpacingSideValue,
2264
2312
  It as generatePublishedKey,
2265
- Xo as generatePublishedKeyForEmbedded,
2313
+ ts as generatePublishedKeyForEmbedded,
2266
2314
  je as getCollectionIdForCollectionType,
2267
- Y as getColumnAttributes,
2268
- Ie as getComponentAttributesAndStyles,
2269
- ne as getComponentsPluginFromPlugins,
2270
- w as getCssVariableFromLeaf,
2271
- jn as getDefaultDimensionAttributes,
2272
- L as getDeviceTypeBasedAttributes,
2273
- zo as getDragItemId,
2315
+ q as getColumnAttributes,
2316
+ Se as getComponentAttributesAndStyles,
2317
+ oe as getComponentsPluginFromPlugins,
2318
+ C as getCssVariableFromLeaf,
2319
+ Vn as getDefaultDimensionAttributes,
2320
+ M as getDeviceTypeBasedAttributes,
2321
+ Xo as getDragItemId,
2274
2322
  ht as getDragItemPrefixAndId,
2275
2323
  bt as getIdAndPrefix,
2276
- Bn as getMergedAttributes,
2277
- Go as getNameAndInstanceIdFromWidgetKey,
2278
- _o as getNameFromWidgetKey,
2324
+ jn as getMergedAttributes,
2325
+ Zo as getNameAndInstanceIdFromWidgetKey,
2326
+ Jo as getNameFromWidgetKey,
2279
2327
  Qn as getOverlayLayerZIndex,
2280
2328
  wt as getWidgetKeyForCollection,
2281
- Yo as getWidgetKeyForCollectionWithPrefix,
2329
+ Qo as getWidgetKeyForCollectionWithPrefix,
2282
2330
  Ct as getWidgetKeyForPublishedCollection,
2283
- qo as getWidgetKeyForPublishedCollectionWithPrefix,
2331
+ es as getWidgetKeyForPublishedCollectionWithPrefix,
2284
2332
  An as hasBoxShadowLeaf,
2285
2333
  po as hasDeviceDivergentValues,
2286
2334
  E as hasInvalidCssVariable,
2287
- Fn as hasItems,
2335
+ Bn as hasItems,
2288
2336
  Jn as hasOverlayLayers,
2289
- Zo as incrementVersion,
2290
- Gt as isBackgroundImageValue,
2337
+ ns as incrementVersion,
2338
+ zt as isBackgroundImageValue,
2291
2339
  hn as isBorderStyleValue,
2292
2340
  bn as isBorderValue,
2293
2341
  vn as isBoxShadowValue,
2294
2342
  qt as isBoxSpacingValue,
2295
- jt as isCloudinaryCloudName,
2343
+ Vt as isCloudinaryCloudName,
2296
2344
  Ot as isCloudinaryPublicId,
2297
- Ft as isCloudinaryTransformationString,
2298
- de as isCssColorValue,
2345
+ Bt as isCloudinaryTransformationString,
2346
+ pe as isCssColorValue,
2299
2347
  Jt as isCssEnumValue,
2300
- Ke as isCssVariableName,
2301
- O as isDevClientToken,
2348
+ ue as isCssVariableName,
2349
+ j as isDevClientToken,
2302
2350
  In as isLineHeightValue,
2303
2351
  Sn as isOpacityValue,
2304
2352
  to as isOverlayLayerEmptyForDevice,
2305
2353
  Un as isRowHiddenForDevice,
2306
- Bt as isSafeImageUrl,
2307
- j as isSpacingSideValue,
2308
- ge as isWidgetHiddenForDevice,
2354
+ jt as isSafeImageUrl,
2355
+ B as isSpacingSideValue,
2356
+ he as isWidgetHiddenForDevice,
2309
2357
  ln as justifyContentAllowlist,
2310
- me as normalizeCssClasses,
2311
- fe as objectStyleAttributeRegistry,
2312
- ee as overflowAllowlist,
2358
+ ge as normalizeCssClasses,
2359
+ ye as objectStyleAttributeRegistry,
2360
+ te as overflowAllowlist,
2313
2361
  Fe as phoneModeWidth,
2314
2362
  rn as pointerEventsAllowlist,
2315
2363
  Ze as prepareRuleCMSWidgetData,
2316
- Se as resolveBaseZIndex,
2317
- Re as resolveKey,
2364
+ ke as resolveBaseZIndex,
2365
+ Me as resolveKey,
2318
2366
  eo as resolveOverlayLayerPointerEvents,
2319
2367
  Hn as resolveRowStyles,
2320
2368
  gt as resolveWidgetApiOrigin,
2321
2369
  He as resolveWidgetContainerStyles,
2322
2370
  so as resolveWidgetInstanceProps,
2323
- is as resolveWidgetLibraries,
2371
+ us as resolveWidgetLibraries,
2324
2372
  Kn as rowBasedPropertiesAreAssigned,
2325
- ue as spacingKeywords,
2326
- _t as spacingLengthUnits,
2327
- Ve as tabletModeWidth,
2373
+ de as spacingKeywords,
2374
+ Gt as spacingLengthUnits,
2375
+ Ke as tabletModeWidth,
2328
2376
  nn as textAlignAllowlist,
2329
2377
  on as textDecorationAllowlist,
2330
2378
  sn as textTransformAllowlist,
2331
- Oe as typeHasPrefix,
2379
+ Ve as typeHasPrefix,
2332
2380
  co as warnUnmatchedComponentProps,
2333
2381
  Xn as widgetBasedPropertiesAreAssigned,
2334
- ze as widgetDeclaresOwnHeight
2382
+ _e as widgetDeclaresOwnHeight
2335
2383
  };