@rulecms/widget-vue 0.7.0 → 0.8.1
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.cjs +38 -38
- package/dist/index.d.ts +219 -10
- package/dist/index.js +1506 -1237
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
const
|
|
6
|
-
function
|
|
7
|
-
return !(e != null && e.length) || e ===
|
|
8
|
-
}
|
|
9
|
-
const
|
|
10
|
-
function
|
|
1
|
+
var Yt = Object.defineProperty;
|
|
2
|
+
var Xt = (e, t, n) => t in e ? Yt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var Ne = (e, t, n) => Xt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { defineComponent as S, reactive as Jt, watch as ot, provide as qt, renderSlot as ke, computed as m, openBlock as p, createElementBlock as w, normalizeStyle as D, normalizeClass as oe, createBlock as v, resolveDynamicComponent as x, unref as T, createCommentVNode as I, Fragment as k, normalizeProps as he, guardReactiveProps as We, mergeProps as Zt, resolveComponent as Qt, createVNode as R, withCtx as re, renderList as U, createElementVNode as K, ref as H, onMounted as en, onBeforeUnmount as st, inject as tn, toDisplayString as nn } from "vue";
|
|
5
|
+
const se = "default";
|
|
6
|
+
function it(e, t) {
|
|
7
|
+
return !(e != null && e.length) || e === se ? t : `${e}/${t}`;
|
|
8
|
+
}
|
|
9
|
+
const on = `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 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
|
-
function
|
|
17
|
-
if (
|
|
16
|
+
function sn(e) {
|
|
17
|
+
if (Ve(e))
|
|
18
18
|
return e;
|
|
19
19
|
const t = e;
|
|
20
|
-
return
|
|
20
|
+
return Ve(t == null ? void 0 : t.default) ? t.default : null;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
return e.usesDefaultLibrary ? [
|
|
22
|
+
function ge(e) {
|
|
23
|
+
return e.usesDefaultLibrary ? [se, ...e.libraryIds] : [...e.libraryIds];
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
if (t.usesDefaultLibrary && !(e != null && e[
|
|
27
|
-
throw new Error(
|
|
25
|
+
function Fe({ registrations: e, referenced: t }) {
|
|
26
|
+
if (t.usesDefaultLibrary && !(e != null && e[se]))
|
|
27
|
+
throw new Error(on);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function rn(e) {
|
|
30
30
|
const t = [], n = /* @__PURE__ */ new Set();
|
|
31
31
|
for (const o of e.values()) {
|
|
32
32
|
if (typeof o.stylesheet != "string")
|
|
@@ -36,109 +36,109 @@ function _t(e) {
|
|
|
36
36
|
}
|
|
37
37
|
return t.length > 0 ? t : void 0;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function ln(e) {
|
|
40
40
|
const t = {};
|
|
41
41
|
for (const [o, s] of e) {
|
|
42
|
-
const i = o ===
|
|
43
|
-
for (const [
|
|
44
|
-
t[i ?
|
|
42
|
+
const i = o === se;
|
|
43
|
+
for (const [l, r] of Object.entries(s.components))
|
|
44
|
+
t[i ? l : `${o}/${l}`] = r;
|
|
45
45
|
}
|
|
46
|
-
const n =
|
|
46
|
+
const n = rn(e);
|
|
47
47
|
return n ? { components: t, stylesheets: n } : { components: t };
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function de() {
|
|
50
50
|
const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
51
51
|
let s = 0;
|
|
52
|
-
function i(
|
|
53
|
-
var
|
|
54
|
-
e.get(
|
|
55
|
-
`RuleCMS widget: component library registered as "${
|
|
56
|
-
), e.set(
|
|
52
|
+
function i(a, c) {
|
|
53
|
+
var f;
|
|
54
|
+
e.get(a) !== c && ((f = c.manifest) != null && f.id && c.manifest.id !== a && console.warn(
|
|
55
|
+
`RuleCMS widget: component library registered as "${a}" declares manifest id "${c.manifest.id}". The registered id wins for resolution.`
|
|
56
|
+
), e.set(a, c), s += 1);
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
61
|
-
return
|
|
62
|
-
const
|
|
63
|
-
for (const
|
|
64
|
-
const
|
|
65
|
-
|
|
58
|
+
function l(a) {
|
|
59
|
+
const c = ge(a), f = [...c].sort().join("|"), h = o.get(f);
|
|
60
|
+
if (h && h.loadedVersion === s)
|
|
61
|
+
return h.plugin;
|
|
62
|
+
const u = /* @__PURE__ */ new Map();
|
|
63
|
+
for (const b of c) {
|
|
64
|
+
const C = e.get(b);
|
|
65
|
+
C && u.set(b, C);
|
|
66
66
|
}
|
|
67
|
-
const
|
|
68
|
-
return o.set(
|
|
67
|
+
const y = ln(u);
|
|
68
|
+
return o.set(f, { loadedVersion: s, plugin: y }), y;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
|
|
72
|
-
const { registrations:
|
|
73
|
-
for (const
|
|
74
|
-
if (e.has(
|
|
70
|
+
function r(a) {
|
|
71
|
+
Fe(a);
|
|
72
|
+
const { registrations: c, referenced: f } = a;
|
|
73
|
+
for (const h of ge(f)) {
|
|
74
|
+
if (e.has(h) || n.has(h))
|
|
75
75
|
continue;
|
|
76
|
-
const
|
|
77
|
-
if (!
|
|
76
|
+
const u = c == null ? void 0 : c[h];
|
|
77
|
+
if (!u) {
|
|
78
78
|
console.error(
|
|
79
|
-
`RuleCMS widget: no component library registered for libraryId "${
|
|
80
|
-
), n.set(
|
|
79
|
+
`RuleCMS widget: no component library registered for libraryId "${h}"; its components will not render.`
|
|
80
|
+
), n.set(h, new Error(`No registration for libraryId "${h}"`));
|
|
81
81
|
continue;
|
|
82
82
|
}
|
|
83
|
-
if (typeof
|
|
83
|
+
if (typeof u == "function")
|
|
84
84
|
return null;
|
|
85
|
-
i(
|
|
85
|
+
i(h, u);
|
|
86
86
|
}
|
|
87
|
-
return
|
|
87
|
+
return l(f);
|
|
88
88
|
}
|
|
89
|
-
async function
|
|
90
|
-
|
|
91
|
-
const { registrations:
|
|
89
|
+
async function d(a) {
|
|
90
|
+
Fe(a);
|
|
91
|
+
const { registrations: c, referenced: f } = a, h = ge(f);
|
|
92
92
|
return await Promise.all(
|
|
93
|
-
|
|
94
|
-
if (e.has(
|
|
93
|
+
h.map(async (u) => {
|
|
94
|
+
if (e.has(u) || n.has(u))
|
|
95
95
|
return;
|
|
96
|
-
const
|
|
97
|
-
if (!
|
|
96
|
+
const y = c == null ? void 0 : c[u];
|
|
97
|
+
if (!y) {
|
|
98
98
|
console.error(
|
|
99
|
-
`RuleCMS widget: no component library registered for libraryId "${
|
|
100
|
-
), n.set(
|
|
99
|
+
`RuleCMS widget: no component library registered for libraryId "${u}"; its components will not render.`
|
|
100
|
+
), n.set(u, new Error(`No registration for libraryId "${u}"`));
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
|
-
if (typeof
|
|
104
|
-
i(
|
|
103
|
+
if (typeof y != "function") {
|
|
104
|
+
i(u, y);
|
|
105
105
|
return;
|
|
106
106
|
}
|
|
107
|
-
let
|
|
108
|
-
|
|
109
|
-
const
|
|
110
|
-
if (!
|
|
107
|
+
let b = t.get(u);
|
|
108
|
+
b || (b = y().then((C) => {
|
|
109
|
+
const g = sn(C);
|
|
110
|
+
if (!g)
|
|
111
111
|
throw new Error(
|
|
112
|
-
`Registration for libraryId "${
|
|
112
|
+
`Registration for libraryId "${u}" did not resolve to a ComponentLibraryModule (expected { manifest, components }).`
|
|
113
113
|
);
|
|
114
|
-
i(
|
|
115
|
-
}).catch((
|
|
116
|
-
n.set(
|
|
117
|
-
`RuleCMS widget: failed to load component library "${
|
|
118
|
-
|
|
114
|
+
i(u, g);
|
|
115
|
+
}).catch((C) => {
|
|
116
|
+
n.set(u, C), console.error(
|
|
117
|
+
`RuleCMS widget: failed to load component library "${u}":`,
|
|
118
|
+
C
|
|
119
119
|
);
|
|
120
120
|
}).finally(() => {
|
|
121
|
-
t.delete(
|
|
122
|
-
}), t.set(
|
|
121
|
+
t.delete(u);
|
|
122
|
+
}), t.set(u, b)), await b;
|
|
123
123
|
})
|
|
124
|
-
),
|
|
124
|
+
), l(f);
|
|
125
125
|
}
|
|
126
|
-
return { resolveSync:
|
|
126
|
+
return { resolveSync: r, resolve: d };
|
|
127
127
|
}
|
|
128
|
-
const
|
|
128
|
+
const Be = {
|
|
129
129
|
Preview: "Preview",
|
|
130
130
|
Compose: "Compose",
|
|
131
131
|
RenderedPage: "RenderedPage"
|
|
132
|
-
},
|
|
132
|
+
}, Ie = {
|
|
133
133
|
DroppableBox: "droppable-box"
|
|
134
|
-
},
|
|
134
|
+
}, Ke = {
|
|
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
|
-
},
|
|
141
|
+
}, Vr = {
|
|
142
142
|
FlexStart: "flex-start",
|
|
143
143
|
FlexEnd: "flex-end",
|
|
144
144
|
Center: "center",
|
|
@@ -146,49 +146,56 @@ const nr = {
|
|
|
146
146
|
SpaceAround: "space-around",
|
|
147
147
|
SpaceEvenly: "space-evenly",
|
|
148
148
|
Stretch: "stretch"
|
|
149
|
-
},
|
|
149
|
+
}, ve = "cssAttrArray", Fr = {
|
|
150
150
|
Phone: "phone",
|
|
151
151
|
Tablet: "tablet",
|
|
152
152
|
Desktop: "desktop"
|
|
153
|
-
},
|
|
153
|
+
}, rt = {
|
|
154
154
|
ComposerComponent: "ComposerWidget",
|
|
155
155
|
Collection: "Collection",
|
|
156
156
|
MoveComponentHandle: "MoveWidgetHandle"
|
|
157
|
-
},
|
|
158
|
-
function
|
|
159
|
-
return typeof e == "string" && e.startsWith(
|
|
157
|
+
}, lt = `${rt.Collection}_`, cn = "dev.", an = "https://rulecms.com", un = "https://widget-cache.rulecms.com", dn = "/api/v1/c/widget/get", pn = "/api/v1/c/dev/widget/get", fn = "/api/v1/c/widget/resolve", yn = "/api/v1/c/dev/widget/resolve";
|
|
158
|
+
function F(e) {
|
|
159
|
+
return typeof e == "string" && e.startsWith(cn);
|
|
160
160
|
}
|
|
161
|
-
function
|
|
162
|
-
return t ? t.replace(/\/$/, "") :
|
|
161
|
+
function ct(e, t) {
|
|
162
|
+
return t ? t.replace(/\/$/, "") : F(e) ? an : un;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function at({
|
|
165
165
|
publishedKey: e,
|
|
166
166
|
token: t,
|
|
167
167
|
endpoint: n
|
|
168
168
|
}) {
|
|
169
|
-
const o =
|
|
170
|
-
return `${
|
|
169
|
+
const o = F(t), s = o ? pn : dn, i = o ? new URLSearchParams({ widgetKey: e, token: t }) : new URLSearchParams({ publishedKey: e, token: t });
|
|
170
|
+
return `${ct(t, n)}${s}?${i.toString()}`;
|
|
171
|
+
}
|
|
172
|
+
function ut({
|
|
173
|
+
token: e,
|
|
174
|
+
endpoint: t
|
|
175
|
+
}) {
|
|
176
|
+
const n = F(e) ? yn : fn;
|
|
177
|
+
return `${ct(e, t)}${n}`;
|
|
171
178
|
}
|
|
172
|
-
const
|
|
179
|
+
const Br = ({ id: e, prefix: t }) => `${t}_${e}`, mn = (e) => {
|
|
173
180
|
if (!(e != null && e.length) || !e.includes("_")) {
|
|
174
181
|
console.error(`Invalid drag item id: ${e}. Type does not exist.`);
|
|
175
182
|
return;
|
|
176
183
|
}
|
|
177
|
-
return
|
|
178
|
-
},
|
|
184
|
+
return hn(e);
|
|
185
|
+
}, dt = (e) => e.includes("_"), hn = (e) => {
|
|
179
186
|
const t = e.indexOf("_"), n = e.substring(0, t), o = e.substring(t + 1);
|
|
180
187
|
return {
|
|
181
188
|
prefix: n,
|
|
182
189
|
id: o
|
|
183
190
|
};
|
|
184
|
-
},
|
|
185
|
-
if (!
|
|
191
|
+
}, pt = (e) => {
|
|
192
|
+
if (!dt(e))
|
|
186
193
|
return;
|
|
187
|
-
const n =
|
|
188
|
-
return (n == null ? void 0 : n.prefix) ===
|
|
194
|
+
const n = mn(e);
|
|
195
|
+
return (n == null ? void 0 : n.prefix) === rt.Collection || console.error(
|
|
189
196
|
"getCollectionIdForCollectionType - Invalid component type: ${componentType}. Invalid prefix type."
|
|
190
197
|
), n == null ? void 0 : n.id;
|
|
191
|
-
},
|
|
198
|
+
}, Kr = (e) => {
|
|
192
199
|
if (!(e != null && e.length)) {
|
|
193
200
|
console.error("getNameAndInstanceIdFromWidgetKey: Missing widget key");
|
|
194
201
|
return;
|
|
@@ -203,47 +210,47 @@ const ir = ({ id: e, prefix: t }) => `${t}_${e}`, Kt = (e) => {
|
|
|
203
210
|
return { name: n, instanceId: t[1] };
|
|
204
211
|
const s = t[1].split("@");
|
|
205
212
|
return { name: n, instanceId: s[0], parentId: s[1] };
|
|
206
|
-
},
|
|
213
|
+
}, Hr = (e) => {
|
|
207
214
|
if (!(e != null && e.length))
|
|
208
215
|
return { errorMessage: "getNameFromWidgetKey: Missing widget key" };
|
|
209
216
|
const t = e.split("$");
|
|
210
217
|
return t.length < 2 ? { errorMessage: "getNameFromWidgetKey: Invalid widget key format" } : { name: t[0] };
|
|
211
|
-
},
|
|
212
|
-
var s, i,
|
|
218
|
+
}, gn = (e) => {
|
|
219
|
+
var s, i, l, r;
|
|
213
220
|
if (!e)
|
|
214
221
|
return { error: "getWidgetKeyForCollection: Missing collection" };
|
|
215
222
|
if (!((s = e.name) != null && s.length))
|
|
216
223
|
return { error: "getWidgetKeyForCollection: Missing collection name" };
|
|
217
224
|
const t = (i = e.name) == null ? void 0 : i.trim().toLowerCase();
|
|
218
|
-
if (!((
|
|
225
|
+
if (!((l = e.id) != null && l.length))
|
|
219
226
|
return { error: "getWidgetKeyForCollection: Missing collection id" };
|
|
220
|
-
const o = ((
|
|
227
|
+
const o = ((r = e.parentId) == null ? void 0 : r.length) ? `${e.id}@${e.parentId}` : `${e.id}`;
|
|
221
228
|
return { data: `${t}$${o}` };
|
|
222
|
-
},
|
|
223
|
-
var s, i,
|
|
229
|
+
}, bn = (e) => {
|
|
230
|
+
var s, i, l, r;
|
|
224
231
|
if (!e)
|
|
225
232
|
return { error: "getWidgetKeyForPublishedCollection: Missing collection" };
|
|
226
233
|
if (!((s = e.name) != null && s.length))
|
|
227
234
|
return { error: "getWidgetKeyForPublishedCollection: Missing collection name" };
|
|
228
235
|
const t = (i = e.name) == null ? void 0 : i.trim().toLowerCase();
|
|
229
|
-
if (!((
|
|
236
|
+
if (!((l = e.publishedKey) != null && l.length))
|
|
230
237
|
return { error: "getWidgetKeyForPublishedCollection: Missing collection publishedKey" };
|
|
231
|
-
const o = ((
|
|
238
|
+
const o = ((r = e.parentId) == null ? void 0 : r.length) ? `${e.publishedKey}@${e.parentId}` : `${e.publishedKey}`;
|
|
232
239
|
return { data: `${t}$${o}` };
|
|
233
|
-
},
|
|
234
|
-
const t =
|
|
235
|
-
return `${
|
|
236
|
-
},
|
|
237
|
-
const t =
|
|
238
|
-
return `${
|
|
239
|
-
},
|
|
240
|
-
function
|
|
241
|
-
return `${e}${
|
|
242
|
-
}
|
|
243
|
-
function
|
|
244
|
-
return `${
|
|
245
|
-
}
|
|
246
|
-
function
|
|
240
|
+
}, Ur = (e) => {
|
|
241
|
+
const t = gn(e);
|
|
242
|
+
return `${lt}${t.data}`;
|
|
243
|
+
}, zr = (e) => {
|
|
244
|
+
const t = bn(e);
|
|
245
|
+
return `${lt}${t.data}`;
|
|
246
|
+
}, Ae = "---", Cn = "___";
|
|
247
|
+
function wn(e, t) {
|
|
248
|
+
return `${e}${Ae}${t}`;
|
|
249
|
+
}
|
|
250
|
+
function Gr(e, t, n) {
|
|
251
|
+
return `${wn(e, t)}${Cn}${n}`;
|
|
252
|
+
}
|
|
253
|
+
function Yr(e) {
|
|
247
254
|
const t = e.split(".");
|
|
248
255
|
if (t.length !== 3)
|
|
249
256
|
throw new Error(`Invalid version format: ${e}. Expected format: x.y.z`);
|
|
@@ -252,19 +259,19 @@ function dr(e) {
|
|
|
252
259
|
throw new Error(`Invalid patch version: ${t[2]}. Expected a number.`);
|
|
253
260
|
return `${n}.${o}.${s + 1}`;
|
|
254
261
|
}
|
|
255
|
-
function
|
|
262
|
+
function Pe({
|
|
256
263
|
displayItemList: e,
|
|
257
264
|
widgetCollections: t
|
|
258
265
|
}) {
|
|
259
266
|
const n = /* @__PURE__ */ new Set();
|
|
260
267
|
let o = !1;
|
|
261
268
|
const s = (i) => {
|
|
262
|
-
var
|
|
263
|
-
if ((
|
|
264
|
-
for (const
|
|
265
|
-
if ((
|
|
266
|
-
for (const
|
|
267
|
-
|
|
269
|
+
var l, r, d;
|
|
270
|
+
if ((l = i == null ? void 0 : i.rows) != null && l.length) {
|
|
271
|
+
for (const a of i.rows)
|
|
272
|
+
if ((r = a == null ? void 0 : a.columns) != null && r.length)
|
|
273
|
+
for (const c of a.columns)
|
|
274
|
+
c.collection && s(c.collection.collectionRows), !(!c.type || c.type === Ie.DroppableBox) && (dt(c.type) || (!((d = c.libraryId) != null && d.length) || c.libraryId === se ? o = !0 : n.add(c.libraryId)));
|
|
268
275
|
}
|
|
269
276
|
};
|
|
270
277
|
s(e);
|
|
@@ -272,16 +279,16 @@ function ye({
|
|
|
272
279
|
s(i == null ? void 0 : i.collectionRows);
|
|
273
280
|
return { libraryIds: Array.from(n), usesDefaultLibrary: o };
|
|
274
281
|
}
|
|
275
|
-
const
|
|
276
|
-
function
|
|
282
|
+
const ft = Symbol("rulecms-widget-context");
|
|
283
|
+
function vn() {
|
|
277
284
|
return {
|
|
278
285
|
token: "",
|
|
279
286
|
endpoint: void 0,
|
|
280
287
|
libraries: void 0,
|
|
281
|
-
libraryRegistry:
|
|
288
|
+
libraryRegistry: de()
|
|
282
289
|
};
|
|
283
290
|
}
|
|
284
|
-
const
|
|
291
|
+
const Xr = /* @__PURE__ */ S({
|
|
285
292
|
__name: "RuleCMSWidgetProvider",
|
|
286
293
|
props: {
|
|
287
294
|
token: {},
|
|
@@ -289,97 +296,97 @@ const pr = /* @__PURE__ */ A({
|
|
|
289
296
|
libraries: {}
|
|
290
297
|
},
|
|
291
298
|
setup(e) {
|
|
292
|
-
const t = e, n =
|
|
293
|
-
return
|
|
299
|
+
const t = e, n = Jt(vn());
|
|
300
|
+
return ot(
|
|
294
301
|
() => [t.token, t.endpoint, t.libraries],
|
|
295
302
|
() => {
|
|
296
303
|
n.token = t.token, n.endpoint = t.endpoint, n.libraries = t.libraries;
|
|
297
304
|
},
|
|
298
305
|
{ immediate: !0 }
|
|
299
|
-
),
|
|
306
|
+
), qt(ft, n), (o, s) => ke(o.$slots, "default");
|
|
300
307
|
}
|
|
301
|
-
}),
|
|
308
|
+
}), An = "1200px", yt = "500px", mt = "820px", Jr = An, Tn = "rulecms", En = 1920, Sn = {
|
|
302
309
|
f: "auto",
|
|
303
310
|
q: "auto",
|
|
304
311
|
c: "limit"
|
|
305
|
-
},
|
|
312
|
+
}, kn = /^[A-Za-z0-9][A-Za-z0-9._\-/]*$/, In = 300, Pn = /^[A-Za-z0-9][A-Za-z0-9_-]*$/, Dn = 100, xn = /^https:\/\/[^\s"'()\\<>]+$/, Ln = 2e3, $n = /^[A-Za-z0-9_,.:\-/]*$/, Rn = 300, Mn = (e) => typeof e == "string" && e.length <= In && kn.test(e), On = (e) => typeof e == "string" && e.length <= Dn && Pn.test(e), _n = (e) => typeof e == "string" && e.length <= Ln && xn.test(e), jn = (e) => typeof e == "string" && e.length <= Rn && $n.test(e), Nn = (e) => Object.entries(e).map(([t, n]) => `${t}_${n}`).join(","), Wn = (e) => {
|
|
306
313
|
const t = {};
|
|
307
314
|
for (const n of e.split(",")) {
|
|
308
315
|
const o = n.trim(), s = o.indexOf("_");
|
|
309
316
|
s <= 0 || (t[o.slice(0, s)] = o.slice(s + 1));
|
|
310
317
|
}
|
|
311
318
|
return t;
|
|
312
|
-
},
|
|
319
|
+
}, Vn = ({
|
|
313
320
|
publicId: e,
|
|
314
|
-
cloudName: t =
|
|
321
|
+
cloudName: t = Tn,
|
|
315
322
|
transformations: n,
|
|
316
|
-
width: o =
|
|
323
|
+
width: o = En
|
|
317
324
|
}) => {
|
|
318
|
-
const s = typeof n == "string" ?
|
|
319
|
-
...
|
|
325
|
+
const s = typeof n == "string" ? Wn(n) : n, i = {
|
|
326
|
+
...Sn,
|
|
320
327
|
...s,
|
|
321
328
|
w: o
|
|
322
329
|
};
|
|
323
330
|
return encodeURI(
|
|
324
|
-
`https://res.cloudinary.com/${t}/image/upload/${
|
|
331
|
+
`https://res.cloudinary.com/${t}/image/upload/${Nn(i)}/${e}`
|
|
325
332
|
);
|
|
326
|
-
},
|
|
333
|
+
}, Fn = /^--[A-Za-z0-9_-]+$/, Bn = 200, q = (e) => {
|
|
327
334
|
if (typeof e != "string")
|
|
328
335
|
return !1;
|
|
329
336
|
const t = e.trim();
|
|
330
|
-
return t.length <=
|
|
331
|
-
},
|
|
337
|
+
return t.length <= Bn && Fn.test(t);
|
|
338
|
+
}, N = (e) => `var(${e.trim()})`, E = (e) => {
|
|
332
339
|
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
333
340
|
return;
|
|
334
341
|
const t = e.cssVariable;
|
|
335
342
|
if (t != null)
|
|
336
|
-
return
|
|
337
|
-
},
|
|
343
|
+
return q(t) ? t.trim() : void 0;
|
|
344
|
+
}, V = (e) => {
|
|
338
345
|
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
339
346
|
return !1;
|
|
340
347
|
const t = e.cssVariable;
|
|
341
|
-
return t == null ? !1 : !
|
|
342
|
-
},
|
|
343
|
-
const n =
|
|
344
|
-
return n ? { [t]:
|
|
345
|
-
},
|
|
346
|
-
if (typeof e != "object" || e === null || Array.isArray(e) ||
|
|
348
|
+
return t == null ? !1 : !q(t);
|
|
349
|
+
}, qr = (e, t) => {
|
|
350
|
+
const n = E(e);
|
|
351
|
+
return n ? { [t]: N(n) } : void 0;
|
|
352
|
+
}, Kn = (e) => {
|
|
353
|
+
if (typeof e != "object" || e === null || Array.isArray(e) || V(e))
|
|
347
354
|
return !1;
|
|
348
|
-
if (
|
|
355
|
+
if (E(e))
|
|
349
356
|
return !0;
|
|
350
357
|
const t = e;
|
|
351
|
-
return t.source === "none" ? !0 : t.source === "url" ?
|
|
352
|
-
},
|
|
358
|
+
return t.source === "none" ? !0 : t.source === "url" ? _n(t.url) : t.source === "cloudinary" ? !Mn(t.publicId) || t.cloudName !== void 0 && t.cloudName !== null && !On(t.cloudName) ? !1 : t.transformations === void 0 || t.transformations === null || jn(t.transformations) : !1;
|
|
359
|
+
}, Hn = ["px", "%", "em", "rem", "vh", "vw"], De = ["inherit", "unset"], Un = ["allSides", "top", "right", "bottom", "left"], X = (e, t = {}) => {
|
|
353
360
|
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
354
361
|
return !1;
|
|
355
362
|
const n = e;
|
|
356
|
-
return
|
|
357
|
-
},
|
|
363
|
+
return V(e) ? !1 : E(e) ? !0 : n.unit === "auto" ? t.allowAuto !== !1 : n.unit === "keyword" ? t.allowKeywords !== !1 && De.includes(n.keyword) : Hn.includes(n.unit) ? typeof n.value != "number" || !Number.isFinite(n.value) ? !1 : t.allowNegative !== !1 || n.value >= 0 : !1;
|
|
364
|
+
}, zn = (e, t = {}) => {
|
|
358
365
|
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
359
366
|
return !1;
|
|
360
367
|
const n = e;
|
|
361
|
-
for (const o of
|
|
368
|
+
for (const o of Un) {
|
|
362
369
|
const s = n[o];
|
|
363
|
-
if (s != null && !
|
|
370
|
+
if (s != null && !X(s, t))
|
|
364
371
|
return !1;
|
|
365
372
|
}
|
|
366
373
|
return !0;
|
|
367
|
-
},
|
|
374
|
+
}, Gn = [...De, "transparent", "currentColor"], Yn = /^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\([^)]+\)|hsla?\([^)]+\))$/, xe = (e) => {
|
|
368
375
|
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
369
376
|
return !1;
|
|
370
377
|
const t = e;
|
|
371
|
-
return
|
|
372
|
-
},
|
|
373
|
-
const t =
|
|
374
|
-
return t ?
|
|
375
|
-
},
|
|
378
|
+
return V(e) ? !1 : E(e) ? !0 : t.unit === "keyword" ? Gn.includes(t.keyword) : t.unit === "color" ? typeof t.value == "string" && Yn.test(t.value.trim()) : !1;
|
|
379
|
+
}, Le = (e) => {
|
|
380
|
+
const t = E(e);
|
|
381
|
+
return t ? N(t) : "unit" in e ? e.unit === "keyword" ? e.keyword : e.value.trim() : "";
|
|
382
|
+
}, Xn = (e, t) => typeof e == "object" && e !== null && !Array.isArray(e) ? !V(e) && !!E(e) : typeof e != "string" || !e.length ? !1 : t.includes(e) ? !0 : De.includes(e), Jn = [
|
|
376
383
|
'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
|
|
377
384
|
'Georgia, "Times New Roman", Times, serif',
|
|
378
385
|
"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",
|
|
379
386
|
"Arial, Helvetica, sans-serif",
|
|
380
387
|
'"Helvetica Neue", Helvetica, Arial, sans-serif',
|
|
381
388
|
"Verdana, Geneva, sans-serif"
|
|
382
|
-
],
|
|
389
|
+
], qn = [
|
|
383
390
|
"normal",
|
|
384
391
|
"bold",
|
|
385
392
|
"100",
|
|
@@ -391,43 +398,43 @@ const pr = /* @__PURE__ */ A({
|
|
|
391
398
|
"700",
|
|
392
399
|
"800",
|
|
393
400
|
"900"
|
|
394
|
-
],
|
|
401
|
+
], Zn = ["normal", "italic", "oblique"], Qn = [
|
|
395
402
|
"left",
|
|
396
403
|
"center",
|
|
397
404
|
"right",
|
|
398
405
|
"justify",
|
|
399
406
|
"start",
|
|
400
407
|
"end"
|
|
401
|
-
],
|
|
408
|
+
], eo = [
|
|
402
409
|
"none",
|
|
403
410
|
"underline",
|
|
404
411
|
"line-through",
|
|
405
412
|
"overline"
|
|
406
|
-
],
|
|
413
|
+
], to = [
|
|
407
414
|
"none",
|
|
408
415
|
"uppercase",
|
|
409
416
|
"lowercase",
|
|
410
417
|
"capitalize"
|
|
411
|
-
],
|
|
418
|
+
], be = [
|
|
412
419
|
"visible",
|
|
413
420
|
"hidden",
|
|
414
421
|
"scroll",
|
|
415
422
|
"auto",
|
|
416
423
|
"clip"
|
|
417
|
-
],
|
|
424
|
+
], no = ["auto", "none"], oo = [
|
|
418
425
|
"flex-start",
|
|
419
426
|
"flex-end",
|
|
420
427
|
"center",
|
|
421
428
|
"space-between",
|
|
422
429
|
"space-around",
|
|
423
430
|
"space-evenly"
|
|
424
|
-
],
|
|
431
|
+
], so = [
|
|
425
432
|
"flex-start",
|
|
426
433
|
"flex-end",
|
|
427
434
|
"center",
|
|
428
435
|
"baseline",
|
|
429
436
|
"stretch"
|
|
430
|
-
],
|
|
437
|
+
], io = ["wrap", "nowrap"], ro = [
|
|
431
438
|
"flex-start",
|
|
432
439
|
"flex-end",
|
|
433
440
|
"center",
|
|
@@ -435,12 +442,12 @@ const pr = /* @__PURE__ */ A({
|
|
|
435
442
|
"space-around",
|
|
436
443
|
"space-evenly",
|
|
437
444
|
"stretch"
|
|
438
|
-
],
|
|
445
|
+
], lo = [
|
|
439
446
|
"row",
|
|
440
447
|
"row-reverse",
|
|
441
448
|
"column",
|
|
442
449
|
"column-reverse"
|
|
443
|
-
],
|
|
450
|
+
], co = ["cover", "contain", "auto"], ao = [
|
|
444
451
|
"center center",
|
|
445
452
|
"center top",
|
|
446
453
|
"center bottom",
|
|
@@ -450,20 +457,20 @@ const pr = /* @__PURE__ */ A({
|
|
|
450
457
|
"right center",
|
|
451
458
|
"right top",
|
|
452
459
|
"right bottom"
|
|
453
|
-
],
|
|
460
|
+
], uo = [
|
|
454
461
|
"no-repeat",
|
|
455
462
|
"repeat",
|
|
456
463
|
"repeat-x",
|
|
457
464
|
"repeat-y",
|
|
458
465
|
"space",
|
|
459
466
|
"round"
|
|
460
|
-
],
|
|
467
|
+
], po = [
|
|
461
468
|
"justifyContent",
|
|
462
469
|
"alignItems",
|
|
463
470
|
"flexWrap",
|
|
464
471
|
"alignContent",
|
|
465
472
|
"flexDirection"
|
|
466
|
-
],
|
|
473
|
+
], fo = [
|
|
467
474
|
"none",
|
|
468
475
|
"solid",
|
|
469
476
|
"dashed",
|
|
@@ -473,107 +480,107 @@ const pr = /* @__PURE__ */ A({
|
|
|
473
480
|
"ridge",
|
|
474
481
|
"inset",
|
|
475
482
|
"outset"
|
|
476
|
-
],
|
|
483
|
+
], yo = (e) => typeof e == "object" && e !== null && !Array.isArray(e) ? !V(e) && !!E(e) : fo.includes(e), mo = (e) => {
|
|
477
484
|
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
478
485
|
return !1;
|
|
479
486
|
const t = e;
|
|
480
|
-
return
|
|
481
|
-
},
|
|
487
|
+
return V(e) ? !1 : E(e) ? !0 : !(t.width !== void 0 && t.width !== null && !X(t.width, { allowAuto: !1, allowNegative: !1 }) || t.style !== void 0 && t.style !== null && !yo(t.style) || t.color !== void 0 && t.color !== null && !xe(t.color));
|
|
488
|
+
}, ho = {
|
|
482
489
|
allowAuto: !1,
|
|
483
490
|
allowKeywords: !1,
|
|
484
491
|
allowNegative: !0
|
|
485
|
-
},
|
|
492
|
+
}, go = {
|
|
486
493
|
allowAuto: !1,
|
|
487
494
|
allowKeywords: !1,
|
|
488
495
|
allowNegative: !1
|
|
489
|
-
},
|
|
496
|
+
}, bo = (e) => {
|
|
490
497
|
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
491
498
|
return !1;
|
|
492
499
|
const t = e;
|
|
493
|
-
if (
|
|
500
|
+
if (V(e))
|
|
494
501
|
return !1;
|
|
495
|
-
if (
|
|
502
|
+
if (E(e))
|
|
496
503
|
return !0;
|
|
497
504
|
for (const n of ["offsetX", "offsetY", "spread"]) {
|
|
498
505
|
const o = t[n];
|
|
499
|
-
if (o != null && !
|
|
506
|
+
if (o != null && !X(o, ho))
|
|
500
507
|
return !1;
|
|
501
508
|
}
|
|
502
|
-
return !(t.blur !== void 0 && t.blur !== null && !
|
|
503
|
-
},
|
|
509
|
+
return !(t.blur !== void 0 && t.blur !== null && !X(t.blur, go) || t.color !== void 0 && t.color !== null && !xe(t.color) || t.inset !== void 0 && t.inset !== null && typeof t.inset != "boolean");
|
|
510
|
+
}, Co = (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, wo = (e) => {
|
|
504
511
|
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
505
512
|
return !1;
|
|
506
513
|
const t = e;
|
|
507
|
-
return
|
|
508
|
-
},
|
|
509
|
-
if (!
|
|
514
|
+
return V(e) ? !1 : E(e) ? !0 : t.unit === "number" ? typeof t.value == "number" && Number.isFinite(t.value) && t.value > 0 : X(e, { allowAuto: !1, allowNegative: !1 });
|
|
515
|
+
}, vo = (e) => typeof e == "object" && e !== null && !Array.isArray(e) ? !V(e) && !!E(e) : typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= 1, Ao = (e) => {
|
|
516
|
+
if (!Kn(e))
|
|
510
517
|
return {};
|
|
511
|
-
const t =
|
|
518
|
+
const t = E(e);
|
|
512
519
|
if (t)
|
|
513
|
-
return { backgroundImage:
|
|
520
|
+
return { backgroundImage: N(t) };
|
|
514
521
|
const n = e;
|
|
515
522
|
return n.source === "none" ? { backgroundImage: "none" } : n.source === "url" ? { backgroundImage: `url("${n.url}")` } : {
|
|
516
|
-
backgroundImage: `url("${
|
|
523
|
+
backgroundImage: `url("${Vn({
|
|
517
524
|
publicId: n.publicId,
|
|
518
525
|
cloudName: n.cloudName,
|
|
519
526
|
transformations: n.transformations
|
|
520
527
|
})}")`
|
|
521
528
|
};
|
|
522
|
-
},
|
|
523
|
-
const t =
|
|
524
|
-
return t ?
|
|
525
|
-
},
|
|
526
|
-
if (!
|
|
529
|
+
}, J = (e) => {
|
|
530
|
+
const t = E(e);
|
|
531
|
+
return t ? N(t) : "unit" in e ? e.unit === "auto" ? "auto" : e.unit === "keyword" ? e.keyword : `${e.value}${e.unit}` : "";
|
|
532
|
+
}, To = (e) => {
|
|
533
|
+
if (!mo(e))
|
|
527
534
|
return {};
|
|
528
|
-
const t =
|
|
535
|
+
const t = E(e);
|
|
529
536
|
if (t)
|
|
530
|
-
return { border:
|
|
537
|
+
return { border: N(t) };
|
|
531
538
|
const n = {};
|
|
532
|
-
if (e.width && (n.borderWidth =
|
|
533
|
-
const o =
|
|
534
|
-
n.borderStyle = o ?
|
|
539
|
+
if (e.width && (n.borderWidth = J(e.width)), e.style) {
|
|
540
|
+
const o = E(e.style);
|
|
541
|
+
n.borderStyle = o ? N(o) : e.style;
|
|
535
542
|
}
|
|
536
|
-
return e.color && (n.borderColor =
|
|
537
|
-
},
|
|
538
|
-
if (!
|
|
543
|
+
return e.color && (n.borderColor = Le(e.color)), n;
|
|
544
|
+
}, le = (e) => e ? J(e) : "0px", Eo = (e) => {
|
|
545
|
+
if (!bo(e) || !Co(e))
|
|
539
546
|
return {};
|
|
540
|
-
const t =
|
|
547
|
+
const t = E(e);
|
|
541
548
|
if (t)
|
|
542
|
-
return { boxShadow:
|
|
549
|
+
return { boxShadow: N(t) };
|
|
543
550
|
const n = [
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
551
|
+
le(e.offsetX),
|
|
552
|
+
le(e.offsetY),
|
|
553
|
+
le(e.blur),
|
|
554
|
+
le(e.spread)
|
|
548
555
|
];
|
|
549
|
-
return e.color && n.push(
|
|
550
|
-
},
|
|
551
|
-
if (!
|
|
556
|
+
return e.color && n.push(Le(e.color)), e.inset && n.unshift("inset"), { boxShadow: n.join(" ") };
|
|
557
|
+
}, So = (e) => `${e.charAt(0).toUpperCase()}${e.slice(1)}`, ko = (e, t) => {
|
|
558
|
+
if (!zn(e))
|
|
552
559
|
return {};
|
|
553
560
|
if (e.allSides)
|
|
554
|
-
return { [t]:
|
|
561
|
+
return { [t]: J(e.allSides) };
|
|
555
562
|
const n = {};
|
|
556
563
|
for (const o of ["top", "right", "bottom", "left"]) {
|
|
557
564
|
const s = e[o];
|
|
558
|
-
s && (n[`${t}${
|
|
565
|
+
s && (n[`${t}${So(o)}`] = J(s));
|
|
559
566
|
}
|
|
560
567
|
return n;
|
|
561
|
-
},
|
|
562
|
-
if (!
|
|
568
|
+
}, Io = (e, t) => xe(e) ? { [t]: Le(e) } : {}, Po = (e, t, n) => {
|
|
569
|
+
if (!Xn(e, n))
|
|
563
570
|
return {};
|
|
564
|
-
const o =
|
|
565
|
-
return o ? { [t]:
|
|
566
|
-
},
|
|
567
|
-
if (!
|
|
571
|
+
const o = E(e);
|
|
572
|
+
return o ? { [t]: N(o) } : { [t]: e };
|
|
573
|
+
}, Do = (e, t, n = {}) => X(e, n) ? { [t]: J(e) } : {}, xo = (e) => {
|
|
574
|
+
if (!wo(e))
|
|
568
575
|
return {};
|
|
569
|
-
const t =
|
|
570
|
-
return t ? { lineHeight:
|
|
571
|
-
},
|
|
572
|
-
if (!
|
|
576
|
+
const t = E(e);
|
|
577
|
+
return t ? { lineHeight: N(t) } : "unit" in e && e.unit === "number" ? { lineHeight: e.value } : { lineHeight: J(e) };
|
|
578
|
+
}, Lo = (e) => {
|
|
579
|
+
if (!vo(e))
|
|
573
580
|
return {};
|
|
574
|
-
const t =
|
|
575
|
-
return t ? { opacity:
|
|
576
|
-
},
|
|
581
|
+
const t = E(e);
|
|
582
|
+
return t ? { opacity: N(t) } : { opacity: e };
|
|
583
|
+
}, $e = {
|
|
577
584
|
// Box spacing (4-sided)
|
|
578
585
|
"margin-3-resolutions": { kind: "boxSpacing", cssProperty: "margin" },
|
|
579
586
|
"padding-3-resolutions": { kind: "boxSpacing", cssProperty: "padding" },
|
|
@@ -627,44 +634,44 @@ const pr = /* @__PURE__ */ A({
|
|
|
627
634
|
"justify-content-3-resolutions": {
|
|
628
635
|
kind: "enum",
|
|
629
636
|
cssProperty: "justifyContent",
|
|
630
|
-
allowedValues:
|
|
637
|
+
allowedValues: oo
|
|
631
638
|
},
|
|
632
639
|
"align-items-3-resolutions": {
|
|
633
640
|
kind: "enum",
|
|
634
641
|
cssProperty: "alignItems",
|
|
635
|
-
allowedValues:
|
|
642
|
+
allowedValues: so
|
|
636
643
|
},
|
|
637
644
|
"flex-wrap-3-resolutions": {
|
|
638
645
|
kind: "enum",
|
|
639
646
|
cssProperty: "flexWrap",
|
|
640
|
-
allowedValues:
|
|
647
|
+
allowedValues: io
|
|
641
648
|
},
|
|
642
649
|
"align-content-3-resolutions": {
|
|
643
650
|
kind: "enum",
|
|
644
651
|
cssProperty: "alignContent",
|
|
645
|
-
allowedValues:
|
|
652
|
+
allowedValues: ro
|
|
646
653
|
},
|
|
647
654
|
"flex-direction-3-resolutions": {
|
|
648
655
|
kind: "enum",
|
|
649
656
|
cssProperty: "flexDirection",
|
|
650
|
-
allowedValues:
|
|
657
|
+
allowedValues: lo
|
|
651
658
|
},
|
|
652
659
|
// Overflow — shorthand and longhands are independent attributes; when
|
|
653
660
|
// both are set, the browser's cascade decides the effective overflow.
|
|
654
661
|
"overflow-3-resolutions": {
|
|
655
662
|
kind: "enum",
|
|
656
663
|
cssProperty: "overflow",
|
|
657
|
-
allowedValues:
|
|
664
|
+
allowedValues: be
|
|
658
665
|
},
|
|
659
666
|
"overflow-x-3-resolutions": {
|
|
660
667
|
kind: "enum",
|
|
661
668
|
cssProperty: "overflowX",
|
|
662
|
-
allowedValues:
|
|
669
|
+
allowedValues: be
|
|
663
670
|
},
|
|
664
671
|
"overflow-y-3-resolutions": {
|
|
665
672
|
kind: "enum",
|
|
666
673
|
cssProperty: "overflowY",
|
|
667
|
-
allowedValues:
|
|
674
|
+
allowedValues: be
|
|
668
675
|
},
|
|
669
676
|
// Color
|
|
670
677
|
// Pointer input. On an overlay layer this is lifted onto the absolutely
|
|
@@ -672,7 +679,7 @@ const pr = /* @__PURE__ */ A({
|
|
|
672
679
|
"pointer-events-3-resolutions": {
|
|
673
680
|
kind: "enum",
|
|
674
681
|
cssProperty: "pointerEvents",
|
|
675
|
-
allowedValues:
|
|
682
|
+
allowedValues: no
|
|
676
683
|
},
|
|
677
684
|
"background-color-3-resolutions": { kind: "color", cssProperty: "backgroundColor" },
|
|
678
685
|
"color-3-resolutions": { kind: "color", cssProperty: "color" },
|
|
@@ -683,17 +690,17 @@ const pr = /* @__PURE__ */ A({
|
|
|
683
690
|
"background-size-3-resolutions": {
|
|
684
691
|
kind: "enum",
|
|
685
692
|
cssProperty: "backgroundSize",
|
|
686
|
-
allowedValues:
|
|
693
|
+
allowedValues: co
|
|
687
694
|
},
|
|
688
695
|
"background-position-3-resolutions": {
|
|
689
696
|
kind: "enum",
|
|
690
697
|
cssProperty: "backgroundPosition",
|
|
691
|
-
allowedValues:
|
|
698
|
+
allowedValues: ao
|
|
692
699
|
},
|
|
693
700
|
"background-repeat-3-resolutions": {
|
|
694
701
|
kind: "enum",
|
|
695
702
|
cssProperty: "backgroundRepeat",
|
|
696
|
-
allowedValues:
|
|
703
|
+
allowedValues: uo
|
|
697
704
|
},
|
|
698
705
|
// Opacity (0–1 number)
|
|
699
706
|
"opacity-3-resolutions": { kind: "opacity" },
|
|
@@ -701,7 +708,7 @@ const pr = /* @__PURE__ */ A({
|
|
|
701
708
|
"font-family-3-resolutions": {
|
|
702
709
|
kind: "enum",
|
|
703
710
|
cssProperty: "fontFamily",
|
|
704
|
-
allowedValues:
|
|
711
|
+
allowedValues: Jn
|
|
705
712
|
},
|
|
706
713
|
"font-size-3-resolutions": {
|
|
707
714
|
kind: "length",
|
|
@@ -711,12 +718,12 @@ const pr = /* @__PURE__ */ A({
|
|
|
711
718
|
"font-weight-3-resolutions": {
|
|
712
719
|
kind: "enum",
|
|
713
720
|
cssProperty: "fontWeight",
|
|
714
|
-
allowedValues:
|
|
721
|
+
allowedValues: qn
|
|
715
722
|
},
|
|
716
723
|
"font-style-3-resolutions": {
|
|
717
724
|
kind: "enum",
|
|
718
725
|
cssProperty: "fontStyle",
|
|
719
|
-
allowedValues:
|
|
726
|
+
allowedValues: Zn
|
|
720
727
|
},
|
|
721
728
|
"line-height-3-resolutions": { kind: "lineHeight" },
|
|
722
729
|
"letter-spacing-3-resolutions": {
|
|
@@ -727,68 +734,68 @@ const pr = /* @__PURE__ */ A({
|
|
|
727
734
|
"text-align-3-resolutions": {
|
|
728
735
|
kind: "enum",
|
|
729
736
|
cssProperty: "textAlign",
|
|
730
|
-
allowedValues:
|
|
737
|
+
allowedValues: Qn
|
|
731
738
|
},
|
|
732
739
|
"text-decoration-3-resolutions": {
|
|
733
740
|
kind: "enum",
|
|
734
741
|
cssProperty: "textDecoration",
|
|
735
|
-
allowedValues:
|
|
742
|
+
allowedValues: eo
|
|
736
743
|
},
|
|
737
744
|
"text-transform-3-resolutions": {
|
|
738
745
|
kind: "enum",
|
|
739
746
|
cssProperty: "textTransform",
|
|
740
|
-
allowedValues:
|
|
747
|
+
allowedValues: to
|
|
741
748
|
}
|
|
742
|
-
},
|
|
743
|
-
const n =
|
|
749
|
+
}, $o = (e, t) => {
|
|
750
|
+
const n = $e[e];
|
|
744
751
|
if (!n)
|
|
745
752
|
return {};
|
|
746
753
|
switch (n.kind) {
|
|
747
754
|
case "boxSpacing":
|
|
748
|
-
return
|
|
755
|
+
return ko(t, n.cssProperty);
|
|
749
756
|
case "length":
|
|
750
|
-
return
|
|
757
|
+
return Do(t, n.cssProperty, n.capabilities);
|
|
751
758
|
case "border":
|
|
752
|
-
return
|
|
759
|
+
return To(t);
|
|
753
760
|
case "boxShadow":
|
|
754
|
-
return
|
|
761
|
+
return Eo(t);
|
|
755
762
|
case "color":
|
|
756
|
-
return
|
|
763
|
+
return Io(t, n.cssProperty);
|
|
757
764
|
case "opacity":
|
|
758
|
-
return
|
|
765
|
+
return Lo(t);
|
|
759
766
|
case "enum":
|
|
760
|
-
return
|
|
767
|
+
return Po(t, n.cssProperty, n.allowedValues);
|
|
761
768
|
case "lineHeight":
|
|
762
|
-
return
|
|
769
|
+
return xo(t);
|
|
763
770
|
case "backgroundImage":
|
|
764
|
-
return
|
|
771
|
+
return Ao(t);
|
|
765
772
|
default:
|
|
766
773
|
return {};
|
|
767
774
|
}
|
|
768
|
-
},
|
|
769
|
-
Object.entries(
|
|
775
|
+
}, Zr = Object.fromEntries(
|
|
776
|
+
Object.entries($e).filter(([, e]) => e.kind === "boxSpacing").map(([e, t]) => [
|
|
770
777
|
e,
|
|
771
778
|
t.cssProperty
|
|
772
779
|
])
|
|
773
|
-
),
|
|
774
|
-
(n) =>
|
|
775
|
-
) || e.display === "flex" ? e : { ...e, display: "flex" } : {},
|
|
780
|
+
), Ro = (e) => e != null && e !== "", Mo = (e) => e ? !po.some(
|
|
781
|
+
(n) => Ro(e[n])
|
|
782
|
+
) || e.display === "flex" ? e : { ...e, display: "flex" } : {}, Oo = ({
|
|
776
783
|
dbEntryType: e,
|
|
777
784
|
libraryId: t,
|
|
778
785
|
sourceComponentsPlugin: n
|
|
779
786
|
}) => {
|
|
780
787
|
if (!(e != null && e.length))
|
|
781
788
|
return;
|
|
782
|
-
const o = n.components[
|
|
789
|
+
const o = n.components[it(t, e)];
|
|
783
790
|
if (!o || !("defaultAttributeValues" in o))
|
|
784
791
|
return;
|
|
785
792
|
const i = o.defaultAttributeValues;
|
|
786
793
|
if (i != null && i.length)
|
|
787
|
-
return i.reduce((
|
|
788
|
-
...
|
|
789
|
-
[
|
|
794
|
+
return i.reduce((l, r) => ({
|
|
795
|
+
...l,
|
|
796
|
+
[r.name]: r.defaultValues
|
|
790
797
|
}), {});
|
|
791
|
-
},
|
|
798
|
+
}, B = ({
|
|
792
799
|
deviceDisplayType: e,
|
|
793
800
|
componentAttributes: t
|
|
794
801
|
}) => {
|
|
@@ -800,8 +807,8 @@ const pr = /* @__PURE__ */ A({
|
|
|
800
807
|
)) {
|
|
801
808
|
if (!s.includes("3-resolutions") || !i)
|
|
802
809
|
continue;
|
|
803
|
-
const
|
|
804
|
-
o[s] =
|
|
810
|
+
const l = i.all, r = l ?? i[e.toLowerCase()];
|
|
811
|
+
o[s] = r, $e[s] && Object.assign(n, $o(s, r));
|
|
805
812
|
}
|
|
806
813
|
return Object.keys(n).length || Object.keys(o).length ? {
|
|
807
814
|
styles: Object.keys(n).length ? n : void 0,
|
|
@@ -809,94 +816,94 @@ const pr = /* @__PURE__ */ A({
|
|
|
809
816
|
o
|
|
810
817
|
).length ? o : void 0
|
|
811
818
|
} : void 0;
|
|
812
|
-
},
|
|
819
|
+
}, _o = ({
|
|
813
820
|
defaultAttributes: e,
|
|
814
821
|
userModifiedAttributes: t
|
|
815
822
|
}) => e ? t ? { ...e, ...t } : e : t;
|
|
816
|
-
function
|
|
823
|
+
function ae(e) {
|
|
817
824
|
return e.componentAttributes ?? e.widgetAttributes;
|
|
818
825
|
}
|
|
819
|
-
function
|
|
826
|
+
function He({
|
|
820
827
|
col: e,
|
|
821
828
|
deviceDisplayType: t,
|
|
822
829
|
isComposeMode: n,
|
|
823
830
|
sourceComponentsPlugin: o
|
|
824
831
|
}) {
|
|
825
|
-
const s =
|
|
832
|
+
const s = ae(e), i = Oo({
|
|
826
833
|
dbEntryType: e.type,
|
|
827
834
|
libraryId: e.libraryId,
|
|
828
835
|
sourceComponentsPlugin: o
|
|
829
|
-
}) || [],
|
|
836
|
+
}) || [], l = _o({
|
|
830
837
|
defaultAttributes: i,
|
|
831
838
|
userModifiedAttributes: s
|
|
832
|
-
}), { styles:
|
|
839
|
+
}), { styles: r, componentAttributesSpecificToDeviceType: d } = B({
|
|
833
840
|
deviceDisplayType: t,
|
|
834
|
-
componentAttributes:
|
|
841
|
+
componentAttributes: l
|
|
835
842
|
}) || {
|
|
836
843
|
styles: void 0,
|
|
837
844
|
componentAttributesSpecificToDeviceType: void 0
|
|
838
845
|
};
|
|
839
|
-
let
|
|
840
|
-
const
|
|
841
|
-
if (
|
|
842
|
-
for (const [
|
|
843
|
-
n &&
|
|
844
|
-
...
|
|
845
|
-
[
|
|
846
|
+
let a = {};
|
|
847
|
+
const c = {};
|
|
848
|
+
if (r)
|
|
849
|
+
for (const [u, y] of Object.entries(r))
|
|
850
|
+
n && c[u] || (a = {
|
|
851
|
+
...a,
|
|
852
|
+
[u]: y
|
|
846
853
|
});
|
|
847
|
-
let
|
|
848
|
-
for (const
|
|
849
|
-
if (
|
|
850
|
-
|
|
851
|
-
...
|
|
852
|
-
...
|
|
854
|
+
let f = ae(e);
|
|
855
|
+
for (const u in d)
|
|
856
|
+
if (u.includes("3-resolutions")) {
|
|
857
|
+
f = {
|
|
858
|
+
...ae(e) || {},
|
|
859
|
+
...d || {}
|
|
853
860
|
};
|
|
854
861
|
break;
|
|
855
862
|
}
|
|
856
|
-
const
|
|
857
|
-
if (n &&
|
|
858
|
-
const
|
|
859
|
-
return delete
|
|
860
|
-
componentAttributesBasedOnDevice:
|
|
861
|
-
componentStyles:
|
|
863
|
+
const h = Mo(a);
|
|
864
|
+
if (n && h.pointerEvents !== void 0) {
|
|
865
|
+
const u = { ...h };
|
|
866
|
+
return delete u.pointerEvents, {
|
|
867
|
+
componentAttributesBasedOnDevice: f,
|
|
868
|
+
componentStyles: u
|
|
862
869
|
};
|
|
863
870
|
}
|
|
864
871
|
return {
|
|
865
|
-
componentAttributesBasedOnDevice:
|
|
866
|
-
componentStyles:
|
|
872
|
+
componentAttributesBasedOnDevice: f,
|
|
873
|
+
componentStyles: h
|
|
867
874
|
};
|
|
868
875
|
}
|
|
869
|
-
const
|
|
876
|
+
const jo = (e) => {
|
|
870
877
|
const t = (e == null ? void 0 : e.rows) || [];
|
|
871
878
|
for (const n of t)
|
|
872
879
|
if (((n == null ? void 0 : n.columns) || []).length > 0)
|
|
873
880
|
return !0;
|
|
874
881
|
return (e == null ? void 0 : e.containerAttributes) && Object.keys(e.containerAttributes).length > 0;
|
|
875
|
-
},
|
|
876
|
-
function
|
|
882
|
+
}, No = "var(--sl-spacing-x-small)";
|
|
883
|
+
function Wo(e) {
|
|
877
884
|
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);
|
|
878
885
|
}
|
|
879
|
-
function
|
|
886
|
+
function Vo({
|
|
880
887
|
row: e,
|
|
881
888
|
deviceDisplayType: t
|
|
882
889
|
}) {
|
|
883
890
|
var o;
|
|
884
|
-
const n =
|
|
891
|
+
const n = B({
|
|
885
892
|
deviceDisplayType: t,
|
|
886
893
|
componentAttributes: e.rowAttributes
|
|
887
894
|
});
|
|
888
895
|
return ((o = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : o["hide-component-3-resolutions"]) === "true";
|
|
889
896
|
}
|
|
890
|
-
function
|
|
897
|
+
function Fo({
|
|
891
898
|
row: e,
|
|
892
899
|
deviceDisplayType: t,
|
|
893
900
|
isComposeMode: n
|
|
894
901
|
}) {
|
|
895
|
-
var
|
|
896
|
-
const o = ((
|
|
902
|
+
var u;
|
|
903
|
+
const o = ((u = B({
|
|
897
904
|
deviceDisplayType: t,
|
|
898
905
|
componentAttributes: e.rowAttributes
|
|
899
|
-
})) == null ? void 0 :
|
|
906
|
+
})) == null ? void 0 : u.styles) || {}, s = o.justifyContent ?? e.horizontalAlignment ?? Ke.Center, i = o.alignItems ?? e.verticalAlignment ?? Ke.Center, l = o.flexDirection ?? "row", r = o.gap ?? e.gap ?? No, d = n ? "nowrap" : o.flexWrap ?? e.flexWrap ?? "nowrap", a = o.alignContent ?? e.alignContent ?? void 0, c = /* @__PURE__ */ new Set([
|
|
900
907
|
"justifyContent",
|
|
901
908
|
"alignItems",
|
|
902
909
|
"flexDirection",
|
|
@@ -904,26 +911,26 @@ function go({
|
|
|
904
911
|
"flexWrap",
|
|
905
912
|
"alignContent",
|
|
906
913
|
"display"
|
|
907
|
-
]),
|
|
908
|
-
for (const [
|
|
909
|
-
|
|
910
|
-
const
|
|
914
|
+
]), f = {};
|
|
915
|
+
for (const [y, b] of Object.entries(o))
|
|
916
|
+
c.has(y) || (f[y] = b);
|
|
917
|
+
const h = {
|
|
911
918
|
display: "flex",
|
|
912
|
-
flexDirection:
|
|
913
|
-
gap:
|
|
914
|
-
flexWrap:
|
|
919
|
+
flexDirection: l,
|
|
920
|
+
gap: r,
|
|
921
|
+
flexWrap: d,
|
|
915
922
|
justifyContent: s,
|
|
916
923
|
alignItems: i,
|
|
917
|
-
...
|
|
924
|
+
...f
|
|
918
925
|
};
|
|
919
|
-
return
|
|
926
|
+
return a !== void 0 && (h.alignContent = a), h;
|
|
920
927
|
}
|
|
921
|
-
const
|
|
928
|
+
const Re = "css-classes-3-resolutions", Bo = 500, Ko = /[\x00-\x1f\x7f]/g, Me = (e) => {
|
|
922
929
|
if (typeof e != "string")
|
|
923
930
|
return;
|
|
924
931
|
const t = /* @__PURE__ */ new Set(), n = [];
|
|
925
932
|
for (const s of e.split(/\s+/)) {
|
|
926
|
-
const i = s.replace(
|
|
933
|
+
const i = s.replace(Ko, "");
|
|
927
934
|
i && (t.has(i) || (t.add(i), n.push(i)));
|
|
928
935
|
}
|
|
929
936
|
if (!n.length)
|
|
@@ -931,12 +938,12 @@ const Ce = "css-classes-3-resolutions", bo = 500, Co = /[\x00-\x1f\x7f]/g, we =
|
|
|
931
938
|
let o = "";
|
|
932
939
|
for (const s of n) {
|
|
933
940
|
const i = o ? `${o} ${s}` : s;
|
|
934
|
-
if (i.length >
|
|
941
|
+
if (i.length > Bo)
|
|
935
942
|
break;
|
|
936
943
|
o = i;
|
|
937
944
|
}
|
|
938
945
|
return o.length ? o : void 0;
|
|
939
|
-
},
|
|
946
|
+
}, ht = "hide-component-3-resolutions", Ho = "pointer-events-3-resolutions", Uo = [
|
|
940
947
|
"width-3-resolutions",
|
|
941
948
|
"min-width-3-resolutions",
|
|
942
949
|
"max-width-3-resolutions",
|
|
@@ -951,23 +958,23 @@ const Ce = "css-classes-3-resolutions", bo = 500, Co = /[\x00-\x1f\x7f]/g, we =
|
|
|
951
958
|
"overflow-3-resolutions",
|
|
952
959
|
"overflow-x-3-resolutions",
|
|
953
960
|
"overflow-y-3-resolutions",
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
],
|
|
957
|
-
|
|
961
|
+
ht,
|
|
962
|
+
Ho
|
|
963
|
+
], zo = new Set(
|
|
964
|
+
Uo
|
|
958
965
|
);
|
|
959
|
-
function
|
|
966
|
+
function Oe({
|
|
960
967
|
containerAttributes: e,
|
|
961
968
|
deviceDisplayType: t
|
|
962
969
|
}) {
|
|
963
970
|
var o;
|
|
964
|
-
const n =
|
|
971
|
+
const n = B({
|
|
965
972
|
deviceDisplayType: t,
|
|
966
973
|
componentAttributes: e
|
|
967
974
|
});
|
|
968
|
-
return ((o = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : o[
|
|
975
|
+
return ((o = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : o[ht]) === "true";
|
|
969
976
|
}
|
|
970
|
-
function
|
|
977
|
+
function gt({
|
|
971
978
|
containerAttributes: e,
|
|
972
979
|
deviceDisplayType: t,
|
|
973
980
|
isComposeMode: n
|
|
@@ -977,44 +984,44 @@ function et({
|
|
|
977
984
|
return { styles: {} };
|
|
978
985
|
const o = n ? Object.fromEntries(
|
|
979
986
|
Object.entries(e).filter(
|
|
980
|
-
([
|
|
987
|
+
([l]) => !zo.has(l)
|
|
981
988
|
)
|
|
982
|
-
) : e, s =
|
|
989
|
+
) : e, s = B({
|
|
983
990
|
deviceDisplayType: t,
|
|
984
991
|
componentAttributes: o
|
|
985
992
|
});
|
|
986
993
|
return {
|
|
987
994
|
styles: (s == null ? void 0 : s.styles) ?? {},
|
|
988
|
-
cssClasses:
|
|
989
|
-
(i = s == null ? void 0 : s.componentAttributesSpecificToDeviceType) == null ? void 0 : i[
|
|
995
|
+
cssClasses: Me(
|
|
996
|
+
(i = s == null ? void 0 : s.componentAttributesSpecificToDeviceType) == null ? void 0 : i[Re]
|
|
990
997
|
)
|
|
991
998
|
};
|
|
992
999
|
}
|
|
993
|
-
function
|
|
1000
|
+
function Go(e) {
|
|
994
1001
|
return Object.keys(e.styles).length > 0 || !!e.cssClasses;
|
|
995
1002
|
}
|
|
996
|
-
function
|
|
1003
|
+
function bt({
|
|
997
1004
|
containerAttributes: e,
|
|
998
1005
|
widgetContainerStyles: t
|
|
999
1006
|
}) {
|
|
1000
|
-
return ((e == null ? void 0 : e[
|
|
1007
|
+
return ((e == null ? void 0 : e[ve]) || []).some(
|
|
1001
1008
|
(o) => o.toLowerCase().startsWith("height:")
|
|
1002
1009
|
) || t.styles.height !== void 0;
|
|
1003
1010
|
}
|
|
1004
|
-
const
|
|
1005
|
-
function
|
|
1011
|
+
const Yo = "z-index-3-resolutions", Ct = 0;
|
|
1012
|
+
function Xo(e) {
|
|
1006
1013
|
var t, n;
|
|
1007
1014
|
return !!((n = (t = e == null ? void 0 : e.overlayLayers) == null ? void 0 : t.layers) != null && n.length);
|
|
1008
1015
|
}
|
|
1009
|
-
function
|
|
1016
|
+
function Ue({
|
|
1010
1017
|
containerAttributes: e,
|
|
1011
1018
|
deviceDisplayType: t
|
|
1012
1019
|
}) {
|
|
1013
1020
|
var s;
|
|
1014
|
-
const n =
|
|
1021
|
+
const n = B({
|
|
1015
1022
|
deviceDisplayType: t,
|
|
1016
1023
|
componentAttributes: e
|
|
1017
|
-
}), o = (s = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : s[
|
|
1024
|
+
}), o = (s = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : s[Yo];
|
|
1018
1025
|
if (typeof o == "number" && Number.isFinite(o))
|
|
1019
1026
|
return o;
|
|
1020
1027
|
if (typeof o == "string" && o.trim().length) {
|
|
@@ -1022,33 +1029,33 @@ function Oe({
|
|
|
1022
1029
|
if (Number.isFinite(i))
|
|
1023
1030
|
return i;
|
|
1024
1031
|
}
|
|
1025
|
-
return
|
|
1032
|
+
return Ct;
|
|
1026
1033
|
}
|
|
1027
|
-
function
|
|
1034
|
+
function Jo(e, t) {
|
|
1028
1035
|
return e + t + 1;
|
|
1029
1036
|
}
|
|
1030
|
-
function
|
|
1037
|
+
function qo({
|
|
1031
1038
|
containerAttributes: e,
|
|
1032
1039
|
deviceDisplayType: t
|
|
1033
1040
|
}) {
|
|
1034
1041
|
var s;
|
|
1035
|
-
const n =
|
|
1042
|
+
const n = B({
|
|
1036
1043
|
deviceDisplayType: t,
|
|
1037
1044
|
componentAttributes: e
|
|
1038
1045
|
}), o = (s = n == null ? void 0 : n.styles) == null ? void 0 : s.pointerEvents;
|
|
1039
1046
|
return typeof o == "string" ? o : void 0;
|
|
1040
1047
|
}
|
|
1041
|
-
function
|
|
1048
|
+
function Zo({
|
|
1042
1049
|
layer: e,
|
|
1043
1050
|
deviceDisplayType: t
|
|
1044
1051
|
}) {
|
|
1045
1052
|
var n;
|
|
1046
|
-
return (n = e == null ? void 0 : e.rows) != null && n.length ?
|
|
1053
|
+
return (n = e == null ? void 0 : e.rows) != null && n.length ? Oe({
|
|
1047
1054
|
containerAttributes: e.containerAttributes,
|
|
1048
1055
|
deviceDisplayType: t
|
|
1049
1056
|
}) : !0;
|
|
1050
1057
|
}
|
|
1051
|
-
function
|
|
1058
|
+
function Qo({
|
|
1052
1059
|
isWithinCollection: e,
|
|
1053
1060
|
baseDeclaresOwnHeight: t,
|
|
1054
1061
|
baseZIndex: n
|
|
@@ -1059,10 +1066,10 @@ function Do({
|
|
|
1059
1066
|
display: "flex",
|
|
1060
1067
|
flexDirection: "column",
|
|
1061
1068
|
...t ? {} : { height: e ? "auto" : "100%" },
|
|
1062
|
-
...n ===
|
|
1069
|
+
...n === Ct ? {} : { zIndex: n }
|
|
1063
1070
|
};
|
|
1064
1071
|
}
|
|
1065
|
-
function
|
|
1072
|
+
function es({
|
|
1066
1073
|
zIndex: e,
|
|
1067
1074
|
pointerEvents: t
|
|
1068
1075
|
}) {
|
|
@@ -1077,8 +1084,8 @@ function $o({
|
|
|
1077
1084
|
...t ? { pointerEvents: t } : {}
|
|
1078
1085
|
};
|
|
1079
1086
|
}
|
|
1080
|
-
const
|
|
1081
|
-
function
|
|
1087
|
+
const pe = "/";
|
|
1088
|
+
function ts({
|
|
1082
1089
|
componentProps: e,
|
|
1083
1090
|
ancestorColumnIds: t,
|
|
1084
1091
|
columnId: n
|
|
@@ -1087,40 +1094,50 @@ function Lo({
|
|
|
1087
1094
|
return;
|
|
1088
1095
|
const o = [...t ?? [], n];
|
|
1089
1096
|
for (let s = 0; s < o.length; s += 1) {
|
|
1090
|
-
const i = o.slice(s).join(
|
|
1091
|
-
if (
|
|
1092
|
-
return
|
|
1097
|
+
const i = o.slice(s).join(pe), l = e[i];
|
|
1098
|
+
if (l)
|
|
1099
|
+
return l;
|
|
1093
1100
|
}
|
|
1094
1101
|
}
|
|
1095
|
-
|
|
1102
|
+
const ze = "placeholderValues";
|
|
1103
|
+
function ns({
|
|
1104
|
+
widgetInstanceProps: e,
|
|
1105
|
+
placeholderValues: t
|
|
1106
|
+
}) {
|
|
1107
|
+
return t === void 0 || e != null && Object.prototype.hasOwnProperty.call(e, ze) ? e : {
|
|
1108
|
+
...e,
|
|
1109
|
+
[ze]: t
|
|
1110
|
+
};
|
|
1111
|
+
}
|
|
1112
|
+
function os({
|
|
1096
1113
|
displayItemList: e,
|
|
1097
1114
|
widgetCollections: t
|
|
1098
1115
|
}) {
|
|
1099
1116
|
const n = [], o = (s, i) => {
|
|
1100
|
-
var
|
|
1101
|
-
if ((
|
|
1102
|
-
for (const
|
|
1103
|
-
for (const
|
|
1104
|
-
if (!
|
|
1117
|
+
var l;
|
|
1118
|
+
if ((l = s == null ? void 0 : s.rows) != null && l.length)
|
|
1119
|
+
for (const r of s.rows)
|
|
1120
|
+
for (const d of r.columns) {
|
|
1121
|
+
if (!d.id || d.type === Ie.DroppableBox)
|
|
1105
1122
|
continue;
|
|
1106
|
-
const
|
|
1107
|
-
if (
|
|
1108
|
-
const
|
|
1109
|
-
|
|
1123
|
+
const a = pt(d.type);
|
|
1124
|
+
if (a != null && a.length) {
|
|
1125
|
+
const c = d.collection ?? (t == null ? void 0 : t[a]);
|
|
1126
|
+
c && !i.includes(d.id) && o(c.collectionRows, [...i, d.id]);
|
|
1110
1127
|
continue;
|
|
1111
1128
|
}
|
|
1112
1129
|
n.push(
|
|
1113
|
-
[...i,
|
|
1130
|
+
[...i, d.id].join(pe)
|
|
1114
1131
|
);
|
|
1115
1132
|
}
|
|
1116
1133
|
};
|
|
1117
1134
|
return o(e, []), n;
|
|
1118
1135
|
}
|
|
1119
|
-
function
|
|
1120
|
-
const n = `${
|
|
1136
|
+
function ss(e, t) {
|
|
1137
|
+
const n = `${pe}${e}`;
|
|
1121
1138
|
return t.some((o) => o === e || o.endsWith(n));
|
|
1122
1139
|
}
|
|
1123
|
-
function
|
|
1140
|
+
function is({
|
|
1124
1141
|
componentProps: e,
|
|
1125
1142
|
displayItemList: t,
|
|
1126
1143
|
widgetCollections: n
|
|
@@ -1128,13 +1145,13 @@ function Oo({
|
|
|
1128
1145
|
const o = e ? Object.keys(e) : [];
|
|
1129
1146
|
if (!o.length)
|
|
1130
1147
|
return [];
|
|
1131
|
-
const s =
|
|
1148
|
+
const s = os({
|
|
1132
1149
|
displayItemList: t,
|
|
1133
1150
|
widgetCollections: n
|
|
1134
1151
|
});
|
|
1135
|
-
return o.filter((i) => !
|
|
1152
|
+
return o.filter((i) => !ss(i, s));
|
|
1136
1153
|
}
|
|
1137
|
-
function
|
|
1154
|
+
function rs({
|
|
1138
1155
|
componentProps: e,
|
|
1139
1156
|
displayItemList: t,
|
|
1140
1157
|
widgetCollections: n,
|
|
@@ -1142,7 +1159,7 @@ function _o({
|
|
|
1142
1159
|
}) {
|
|
1143
1160
|
if (process.env.NODE_ENV === "production")
|
|
1144
1161
|
return;
|
|
1145
|
-
const s =
|
|
1162
|
+
const s = is({
|
|
1146
1163
|
componentProps: e,
|
|
1147
1164
|
displayItemList: t,
|
|
1148
1165
|
widgetCollections: n
|
|
@@ -1151,68 +1168,83 @@ function _o({
|
|
|
1151
1168
|
`RuleCMSWidget "${o}": componentProps ${s.map((i) => `"${i}"`).join(", ")} ${s.length === 1 ? "matches" : "match"} no component in this widget, so those props were not passed to anything. Keys are column ids from the widget config — the composer's Modify drawer shows the id of the selected component.`
|
|
1152
1169
|
);
|
|
1153
1170
|
}
|
|
1154
|
-
function
|
|
1171
|
+
function ls(e) {
|
|
1155
1172
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
1156
1173
|
}
|
|
1157
|
-
function
|
|
1174
|
+
function cs(e) {
|
|
1158
1175
|
if (e.all !== void 0 && e.all !== null)
|
|
1159
1176
|
return !1;
|
|
1160
1177
|
const t = e.phone, n = e.tablet, o = e.desktop;
|
|
1161
1178
|
return t !== n || t !== o || n !== o;
|
|
1162
1179
|
}
|
|
1163
|
-
function
|
|
1180
|
+
function Te(e) {
|
|
1164
1181
|
var t, n;
|
|
1165
1182
|
if (!((t = e == null ? void 0 : e.rows) != null && t.length))
|
|
1166
1183
|
return !1;
|
|
1167
|
-
if (
|
|
1184
|
+
if (Ce(e.containerAttributes))
|
|
1168
1185
|
return !0;
|
|
1169
1186
|
for (const o of e.rows) {
|
|
1170
|
-
if (
|
|
1187
|
+
if (Ce(o.rowAttributes))
|
|
1171
1188
|
return !0;
|
|
1172
1189
|
for (const s of o.columns)
|
|
1173
|
-
if (
|
|
1190
|
+
if (Ce(ae(s)))
|
|
1174
1191
|
return !0;
|
|
1175
1192
|
}
|
|
1176
1193
|
for (const o of ((n = e.overlayLayers) == null ? void 0 : n.layers) ?? [])
|
|
1177
|
-
if (
|
|
1194
|
+
if (Te(o))
|
|
1178
1195
|
return !0;
|
|
1179
1196
|
return !1;
|
|
1180
1197
|
}
|
|
1181
|
-
function
|
|
1198
|
+
function Ce(e) {
|
|
1182
1199
|
if (!e)
|
|
1183
1200
|
return !1;
|
|
1184
1201
|
for (const [t, n] of Object.entries(e))
|
|
1185
|
-
if (!(!t.includes("3-resolutions") || !
|
|
1202
|
+
if (!(!t.includes("3-resolutions") || !ls(n))) {
|
|
1186
1203
|
if (t === "hide-component-3-resolutions") {
|
|
1187
1204
|
const o = n, s = (i) => i === "true" || i === !0;
|
|
1188
1205
|
if (s(o.phone) !== s(o.tablet) || s(o.phone) !== s(o.desktop))
|
|
1189
1206
|
return !0;
|
|
1190
1207
|
continue;
|
|
1191
1208
|
}
|
|
1192
|
-
if (
|
|
1209
|
+
if (cs(n))
|
|
1193
1210
|
return !0;
|
|
1194
1211
|
}
|
|
1195
1212
|
return !1;
|
|
1196
1213
|
}
|
|
1197
|
-
function
|
|
1198
|
-
if (
|
|
1214
|
+
function as(e, t) {
|
|
1215
|
+
if (Te(e))
|
|
1199
1216
|
return !0;
|
|
1200
1217
|
for (const n of Object.values(t))
|
|
1201
|
-
if (
|
|
1218
|
+
if (Te(n.collectionRows))
|
|
1202
1219
|
return !0;
|
|
1203
1220
|
return !1;
|
|
1204
1221
|
}
|
|
1205
|
-
const
|
|
1206
|
-
function
|
|
1222
|
+
const wt = parseInt(yt, 10), vt = parseInt(mt, 10), us = wt + 1, ds = vt + 1;
|
|
1223
|
+
function ps(e) {
|
|
1207
1224
|
const t = `.${e}-phone`, n = `.${e}-tablet`, o = `.${e}-desktop`;
|
|
1208
1225
|
return `
|
|
1209
1226
|
${t}, ${n}, ${o} { display: none; }
|
|
1210
|
-
@media (max-width: ${
|
|
1211
|
-
@media (min-width: ${
|
|
1212
|
-
@media (min-width: ${
|
|
1227
|
+
@media (max-width: ${wt}px) { ${t} { display: block; } }
|
|
1228
|
+
@media (min-width: ${us}px) and (max-width: ${vt}px) { ${n} { display: block; } }
|
|
1229
|
+
@media (min-width: ${ds}px) { ${o} { display: block; } }
|
|
1213
1230
|
`.trim();
|
|
1214
1231
|
}
|
|
1215
|
-
|
|
1232
|
+
const fs = /(<\/|<)(s)(tyle)/gi;
|
|
1233
|
+
function _(e) {
|
|
1234
|
+
return e.replace(
|
|
1235
|
+
fs,
|
|
1236
|
+
(t, n, o, s) => `${n}${o === "s" ? "\\73 " : "\\53 "}${s}`
|
|
1237
|
+
);
|
|
1238
|
+
}
|
|
1239
|
+
const ys = (e) => {
|
|
1240
|
+
let t = 3735928559, n = 1103547991;
|
|
1241
|
+
for (let o = 0; o < e.length; o += 1) {
|
|
1242
|
+
const s = e.charCodeAt(o);
|
|
1243
|
+
t = Math.imul(t ^ s, 2654435761), n = Math.imul(n ^ s, 1597334677);
|
|
1244
|
+
}
|
|
1245
|
+
return t = Math.imul(t ^ t >>> 16, 2246822507), t ^= Math.imul(n ^ n >>> 13, 3266489909), n = Math.imul(n ^ n >>> 16, 2246822507), n ^= Math.imul(t ^ t >>> 13, 3266489909), 4294967296 * (2097151 & n) + (t >>> 0);
|
|
1246
|
+
}, At = (e, t) => `${e}-${ys(t).toString(36)}`;
|
|
1247
|
+
function we(e) {
|
|
1216
1248
|
if (!e)
|
|
1217
1249
|
throw new Error("Source components plugin is required, but no plugins were provided");
|
|
1218
1250
|
const t = e.sourceComponents;
|
|
@@ -1226,7 +1258,7 @@ function le(e) {
|
|
|
1226
1258
|
);
|
|
1227
1259
|
return t;
|
|
1228
1260
|
}
|
|
1229
|
-
const
|
|
1261
|
+
const ms = ["hidden"], Ge = /* @__PURE__ */ S({
|
|
1230
1262
|
__name: "EmbedInVerticalContainer",
|
|
1231
1263
|
props: {
|
|
1232
1264
|
displayItemList: {},
|
|
@@ -1237,61 +1269,57 @@ const Bo = ["hidden"], _e = /* @__PURE__ */ A({
|
|
|
1237
1269
|
},
|
|
1238
1270
|
setup(e) {
|
|
1239
1271
|
const t = e;
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
const w = h && !S ? 3 : 1;
|
|
1244
|
-
return !!(m != null && m.length) && m.length > w;
|
|
1272
|
+
function n(u, y, b) {
|
|
1273
|
+
const C = u && !b ? 3 : 1;
|
|
1274
|
+
return !!(y != null && y.length) && y.length > C;
|
|
1245
1275
|
}
|
|
1246
|
-
const
|
|
1247
|
-
var
|
|
1248
|
-
return (((
|
|
1276
|
+
const o = m(() => {
|
|
1277
|
+
var y;
|
|
1278
|
+
return (((y = t.displayItemList.containerAttributes) == null ? void 0 : y[ve]) || []).join(`;
|
|
1249
1279
|
`);
|
|
1250
|
-
}),
|
|
1251
|
-
() =>
|
|
1252
|
-
${
|
|
1280
|
+
}), s = m(() => At("rulecms-vc", o.value)), i = m(
|
|
1281
|
+
() => o.value ? `.${s.value} {
|
|
1282
|
+
${o.value}
|
|
1253
1283
|
}` : ""
|
|
1254
|
-
), l =
|
|
1255
|
-
() => !t.isComposeMode &&
|
|
1284
|
+
), l = m(
|
|
1285
|
+
() => !t.isComposeMode && Oe({
|
|
1256
1286
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1257
1287
|
deviceDisplayType: t.deviceDisplayType
|
|
1258
1288
|
})
|
|
1259
|
-
),
|
|
1260
|
-
() =>
|
|
1289
|
+
), r = m(
|
|
1290
|
+
() => gt({
|
|
1261
1291
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1262
1292
|
deviceDisplayType: t.deviceDisplayType,
|
|
1263
1293
|
isComposeMode: t.isComposeMode
|
|
1264
1294
|
})
|
|
1265
|
-
),
|
|
1266
|
-
var
|
|
1267
|
-
const
|
|
1268
|
-
return t.isComposeMode && !t.isWithinCollection || t.showDropContainers ||
|
|
1269
|
-
}), a =
|
|
1270
|
-
() => [
|
|
1271
|
-
),
|
|
1272
|
-
...
|
|
1295
|
+
), d = m(() => {
|
|
1296
|
+
var b;
|
|
1297
|
+
const u = ((b = t.displayItemList.containerAttributes) == null ? void 0 : b[ve]) || [], y = Go(r.value);
|
|
1298
|
+
return t.isComposeMode && !t.isWithinCollection || t.showDropContainers || u.length > 0 || y || n(t.isComposeMode, t.displayItemList.rows, t.isWithinCollection);
|
|
1299
|
+
}), a = m(
|
|
1300
|
+
() => [o.value ? s.value : void 0, r.value.cssClasses].filter(Boolean).join(" ")
|
|
1301
|
+
), c = m(() => ({
|
|
1302
|
+
...bt({
|
|
1273
1303
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1274
|
-
widgetContainerStyles:
|
|
1304
|
+
widgetContainerStyles: r.value
|
|
1275
1305
|
}) ? {} : { height: t.isWithinCollection ? "auto" : "100%" },
|
|
1276
1306
|
display: "flex",
|
|
1277
1307
|
flexDirection: "column",
|
|
1278
|
-
...
|
|
1279
|
-
})),
|
|
1280
|
-
return (
|
|
1308
|
+
...r.value.styles
|
|
1309
|
+
})), f = m(() => d.value ? a.value : ""), h = m(() => l.value ? { display: "none" } : d.value ? c.value : { display: "contents" });
|
|
1310
|
+
return (u, y) => (p(), w("div", {
|
|
1281
1311
|
hidden: l.value || void 0,
|
|
1282
|
-
class:
|
|
1283
|
-
style:
|
|
1312
|
+
class: oe(f.value || void 0),
|
|
1313
|
+
style: D(h.value)
|
|
1284
1314
|
}, [
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
pe(h.$slots, "default")
|
|
1292
|
-
], 14, Bo));
|
|
1315
|
+
o.value ? (p(), v(x("style"), {
|
|
1316
|
+
key: 0,
|
|
1317
|
+
innerHTML: T(_)(i.value)
|
|
1318
|
+
}, null, 8, ["innerHTML"])) : I("", !0),
|
|
1319
|
+
ke(u.$slots, "default")
|
|
1320
|
+
], 14, ms));
|
|
1293
1321
|
}
|
|
1294
|
-
}),
|
|
1322
|
+
}), hs = ["hidden"], Ye = /* @__PURE__ */ S({
|
|
1295
1323
|
__name: "EmbedInRow",
|
|
1296
1324
|
props: {
|
|
1297
1325
|
row: {},
|
|
@@ -1302,40 +1330,40 @@ ${i.value}
|
|
|
1302
1330
|
},
|
|
1303
1331
|
setup(e) {
|
|
1304
1332
|
const t = e;
|
|
1305
|
-
function n(
|
|
1306
|
-
var
|
|
1307
|
-
const
|
|
1308
|
-
return !!((
|
|
1333
|
+
function n(a, c, f) {
|
|
1334
|
+
var u;
|
|
1335
|
+
const h = a && !f ? 3 : 1;
|
|
1336
|
+
return !!((u = c == null ? void 0 : c.columns) != null && u.length) && c.columns.length > h;
|
|
1309
1337
|
}
|
|
1310
|
-
const o =
|
|
1311
|
-
() => !t.isComposeMode &&
|
|
1312
|
-
), s =
|
|
1313
|
-
() => t.showDropContainers ||
|
|
1314
|
-
), i =
|
|
1315
|
-
() =>
|
|
1338
|
+
const o = m(
|
|
1339
|
+
() => !t.isComposeMode && Vo({ row: t.row, deviceDisplayType: t.deviceDisplayType })
|
|
1340
|
+
), s = m(
|
|
1341
|
+
() => t.showDropContainers || Wo(t.row) || n(t.isComposeMode, t.row, t.isWithinCollection)
|
|
1342
|
+
), i = m(
|
|
1343
|
+
() => Fo({
|
|
1316
1344
|
row: t.row,
|
|
1317
1345
|
deviceDisplayType: t.deviceDisplayType,
|
|
1318
1346
|
isComposeMode: t.isComposeMode
|
|
1319
1347
|
})
|
|
1320
|
-
),
|
|
1321
|
-
var
|
|
1322
|
-
const
|
|
1348
|
+
), l = m(() => {
|
|
1349
|
+
var c;
|
|
1350
|
+
const a = B({
|
|
1323
1351
|
deviceDisplayType: t.deviceDisplayType,
|
|
1324
1352
|
componentAttributes: t.row.rowAttributes
|
|
1325
1353
|
});
|
|
1326
|
-
return
|
|
1327
|
-
(
|
|
1354
|
+
return Me(
|
|
1355
|
+
(c = a == null ? void 0 : a.componentAttributesSpecificToDeviceType) == null ? void 0 : c[Re]
|
|
1328
1356
|
) ?? "";
|
|
1329
|
-
}),
|
|
1330
|
-
return (
|
|
1357
|
+
}), r = m(() => s.value ? l.value : ""), d = m(() => o.value ? { display: "none" } : s.value ? i.value : { display: "contents" });
|
|
1358
|
+
return (a, c) => (p(), w("div", {
|
|
1331
1359
|
hidden: o.value || void 0,
|
|
1332
|
-
class:
|
|
1333
|
-
style:
|
|
1360
|
+
class: oe(r.value || void 0),
|
|
1361
|
+
style: D(d.value)
|
|
1334
1362
|
}, [
|
|
1335
|
-
|
|
1336
|
-
], 14,
|
|
1363
|
+
ke(a.$slots, "default")
|
|
1364
|
+
], 14, hs));
|
|
1337
1365
|
}
|
|
1338
|
-
}),
|
|
1366
|
+
}), Tt = [
|
|
1339
1367
|
"minWidth",
|
|
1340
1368
|
"maxWidth",
|
|
1341
1369
|
"minHeight",
|
|
@@ -1387,20 +1415,20 @@ ${i.value}
|
|
|
1387
1415
|
"textAlign",
|
|
1388
1416
|
"textDecoration",
|
|
1389
1417
|
"textTransform"
|
|
1390
|
-
],
|
|
1418
|
+
], gs = (e) => e != null && e !== "", bs = (e) => e ? Tt.reduce(
|
|
1391
1419
|
(t, n) => {
|
|
1392
1420
|
const o = e[n];
|
|
1393
|
-
return
|
|
1421
|
+
return gs(o) && (t[n] = o), t;
|
|
1394
1422
|
},
|
|
1395
1423
|
{}
|
|
1396
|
-
) : {},
|
|
1424
|
+
) : {}, Cs = (e) => {
|
|
1397
1425
|
if (!e)
|
|
1398
1426
|
return;
|
|
1399
1427
|
const t = { ...e };
|
|
1400
|
-
for (const n of
|
|
1428
|
+
for (const n of Tt)
|
|
1401
1429
|
delete t[n];
|
|
1402
1430
|
return Object.keys(t).length ? t : void 0;
|
|
1403
|
-
},
|
|
1431
|
+
}, ws = (e) => Object.keys(e).length > 0, vs = (e, t) => {
|
|
1404
1432
|
const n = (e == null ? void 0 : e.noContainer) ?? !1, o = e == null ? void 0 : e.resolveNoContainer;
|
|
1405
1433
|
if (typeof o != "function")
|
|
1406
1434
|
return n;
|
|
@@ -1418,7 +1446,7 @@ ${i.value}
|
|
|
1418
1446
|
);
|
|
1419
1447
|
}
|
|
1420
1448
|
return n;
|
|
1421
|
-
},
|
|
1449
|
+
}, As = (e, t) => {
|
|
1422
1450
|
const n = e == null ? void 0 : e.resolveRendersOwnElement;
|
|
1423
1451
|
if (typeof n != "function")
|
|
1424
1452
|
return !1;
|
|
@@ -1436,7 +1464,7 @@ ${i.value}
|
|
|
1436
1464
|
);
|
|
1437
1465
|
}
|
|
1438
1466
|
return !1;
|
|
1439
|
-
},
|
|
1467
|
+
}, Xe = /* @__PURE__ */ S({
|
|
1440
1468
|
__name: "DisplayComponent",
|
|
1441
1469
|
props: {
|
|
1442
1470
|
componentType: {},
|
|
@@ -1445,54 +1473,58 @@ ${i.value}
|
|
|
1445
1473
|
components: {},
|
|
1446
1474
|
styleProps: {},
|
|
1447
1475
|
widgetInstanceProps: {},
|
|
1476
|
+
pageViewType: {},
|
|
1477
|
+
columnPath: {},
|
|
1448
1478
|
mounts: {}
|
|
1449
1479
|
},
|
|
1450
1480
|
setup(e) {
|
|
1451
|
-
const t = e, n =
|
|
1452
|
-
var
|
|
1453
|
-
const
|
|
1454
|
-
return
|
|
1481
|
+
const t = e, n = m(() => t.components[it(t.libraryId, t.componentType)]), o = m(() => {
|
|
1482
|
+
var y;
|
|
1483
|
+
const u = (y = n.value) == null ? void 0 : y.card;
|
|
1484
|
+
return u || (console.error(
|
|
1455
1485
|
`DisplayComponent: Component with type ${t.componentType}${t.libraryId ? ` (library "${t.libraryId}")` : ""} not found in components`
|
|
1456
1486
|
), null);
|
|
1457
|
-
}), s =
|
|
1487
|
+
}), s = m(() => ({
|
|
1458
1488
|
componentAttributes: t.componentAttributes,
|
|
1459
1489
|
styleProps: t.styleProps
|
|
1460
|
-
})), i =
|
|
1461
|
-
() => n.value ?
|
|
1462
|
-
),
|
|
1463
|
-
() => i.value ?
|
|
1464
|
-
),
|
|
1490
|
+
})), i = m(
|
|
1491
|
+
() => n.value ? vs(n.value, s.value) : !1
|
|
1492
|
+
), l = m(() => bs(t.styleProps)), r = m(
|
|
1493
|
+
() => i.value ? Cs(t.styleProps) : t.styleProps
|
|
1494
|
+
), d = m(
|
|
1465
1495
|
() => {
|
|
1466
|
-
var
|
|
1467
|
-
return
|
|
1496
|
+
var u;
|
|
1497
|
+
return Me((u = t.componentAttributes) == null ? void 0 : u[Re]);
|
|
1468
1498
|
}
|
|
1469
|
-
),
|
|
1470
|
-
() => !i.value || (n.value ?
|
|
1471
|
-
),
|
|
1472
|
-
() => !
|
|
1473
|
-
),
|
|
1499
|
+
), a = m(() => i.value && ws(l.value)), c = m(
|
|
1500
|
+
() => !i.value || (n.value ? As(n.value, s.value) : !1)
|
|
1501
|
+
), f = m(
|
|
1502
|
+
() => !a.value && c.value ? d.value : void 0
|
|
1503
|
+
), h = m(() => ({
|
|
1474
1504
|
componentAttributes: t.componentAttributes,
|
|
1475
|
-
styleProps:
|
|
1476
|
-
className:
|
|
1505
|
+
styleProps: r.value,
|
|
1506
|
+
className: f.value,
|
|
1477
1507
|
widgetInstanceProps: t.widgetInstanceProps,
|
|
1508
|
+
pageViewType: t.pageViewType,
|
|
1509
|
+
columnPath: t.columnPath,
|
|
1478
1510
|
mounts: t.mounts
|
|
1479
1511
|
}));
|
|
1480
|
-
return (
|
|
1481
|
-
|
|
1512
|
+
return (u, y) => o.value ? (p(), w(k, { key: 0 }, [
|
|
1513
|
+
a.value ? (p(), w("div", {
|
|
1482
1514
|
key: 0,
|
|
1483
|
-
class:
|
|
1484
|
-
style:
|
|
1515
|
+
class: oe(d.value || void 0),
|
|
1516
|
+
style: D(l.value)
|
|
1485
1517
|
}, [
|
|
1486
|
-
(
|
|
1487
|
-
], 6)) : !
|
|
1518
|
+
(p(), v(x(o.value), he(We(h.value)), null, 16))
|
|
1519
|
+
], 6)) : !c.value && d.value ? (p(), w("div", {
|
|
1488
1520
|
key: 1,
|
|
1489
|
-
class:
|
|
1521
|
+
class: oe(d.value)
|
|
1490
1522
|
}, [
|
|
1491
|
-
(
|
|
1492
|
-
], 2)) : (
|
|
1493
|
-
], 64)) :
|
|
1523
|
+
(p(), v(x(o.value), he(We(h.value)), null, 16))
|
|
1524
|
+
], 2)) : (p(), v(x(o.value), he(Zt({ key: 2 }, h.value)), null, 16))
|
|
1525
|
+
], 64)) : I("", !0);
|
|
1494
1526
|
}
|
|
1495
|
-
}),
|
|
1527
|
+
}), Ts = ["data-rulecms-overlay-layer"], Es = /* @__PURE__ */ S({
|
|
1496
1528
|
__name: "RenderComponentsInner",
|
|
1497
1529
|
props: {
|
|
1498
1530
|
displayItemList: {},
|
|
@@ -1505,125 +1537,136 @@ ${i.value}
|
|
|
1505
1537
|
deviceDisplayType: {},
|
|
1506
1538
|
componentProps: {},
|
|
1507
1539
|
mounts: {},
|
|
1540
|
+
placeholderValues: {},
|
|
1508
1541
|
ancestorColumnIds: {}
|
|
1509
1542
|
},
|
|
1510
1543
|
setup(e) {
|
|
1511
|
-
const t = e, n = () =>
|
|
1512
|
-
() => !t.isComposeMode &&
|
|
1544
|
+
const t = e, n = () => we(t.plugins).components, o = m(
|
|
1545
|
+
() => !t.isComposeMode && Xo(t.displayItemList) && !Oe({
|
|
1513
1546
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1514
1547
|
deviceDisplayType: t.deviceDisplayType
|
|
1515
1548
|
})
|
|
1516
|
-
), s =
|
|
1517
|
-
const
|
|
1549
|
+
), s = m(() => {
|
|
1550
|
+
const u = Ue({
|
|
1518
1551
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1519
1552
|
deviceDisplayType: t.deviceDisplayType
|
|
1520
1553
|
});
|
|
1521
|
-
return
|
|
1554
|
+
return Qo({
|
|
1522
1555
|
isWithinCollection: t.isWithinCollection,
|
|
1523
|
-
baseDeclaresOwnHeight:
|
|
1556
|
+
baseDeclaresOwnHeight: bt({
|
|
1524
1557
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1525
|
-
widgetContainerStyles:
|
|
1558
|
+
widgetContainerStyles: gt({
|
|
1526
1559
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1527
1560
|
deviceDisplayType: t.deviceDisplayType,
|
|
1528
1561
|
isComposeMode: t.isComposeMode
|
|
1529
1562
|
})
|
|
1530
1563
|
}),
|
|
1531
|
-
baseZIndex:
|
|
1564
|
+
baseZIndex: u
|
|
1532
1565
|
});
|
|
1533
|
-
}), i =
|
|
1534
|
-
var
|
|
1535
|
-
const
|
|
1566
|
+
}), i = m(() => {
|
|
1567
|
+
var b;
|
|
1568
|
+
const u = ((b = t.displayItemList.overlayLayers) == null ? void 0 : b.layers) ?? [], y = Ue({
|
|
1536
1569
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1537
1570
|
deviceDisplayType: t.deviceDisplayType
|
|
1538
1571
|
});
|
|
1539
|
-
return
|
|
1572
|
+
return u.flatMap((C, g) => Zo({ layer: C, deviceDisplayType: t.deviceDisplayType }) ? [] : [
|
|
1540
1573
|
{
|
|
1541
|
-
index:
|
|
1542
|
-
layer:
|
|
1543
|
-
boxStyles:
|
|
1544
|
-
zIndex:
|
|
1545
|
-
pointerEvents:
|
|
1546
|
-
containerAttributes:
|
|
1574
|
+
index: g,
|
|
1575
|
+
layer: C,
|
|
1576
|
+
boxStyles: es({
|
|
1577
|
+
zIndex: Jo(y, g),
|
|
1578
|
+
pointerEvents: qo({
|
|
1579
|
+
containerAttributes: C.containerAttributes,
|
|
1547
1580
|
deviceDisplayType: t.deviceDisplayType
|
|
1548
1581
|
})
|
|
1549
1582
|
})
|
|
1550
1583
|
}
|
|
1551
1584
|
]);
|
|
1552
1585
|
});
|
|
1553
|
-
function
|
|
1554
|
-
if (t.isComposeMode &&
|
|
1586
|
+
function l(u) {
|
|
1587
|
+
if (t.isComposeMode && u.type === Ie.DroppableBox)
|
|
1555
1588
|
return !1;
|
|
1556
|
-
const { componentAttributesBasedOnDevice: y } =
|
|
1557
|
-
col:
|
|
1589
|
+
const { componentAttributesBasedOnDevice: y } = He({
|
|
1590
|
+
col: u,
|
|
1558
1591
|
deviceDisplayType: t.deviceDisplayType,
|
|
1559
1592
|
isComposeMode: t.isComposeMode,
|
|
1560
|
-
sourceComponentsPlugin:
|
|
1561
|
-
}),
|
|
1562
|
-
return !(!t.isComposeMode &&
|
|
1593
|
+
sourceComponentsPlugin: we(t.plugins)
|
|
1594
|
+
}), b = !!y && y["hide-component-3-resolutions"] === "true";
|
|
1595
|
+
return !(!t.isComposeMode && b);
|
|
1563
1596
|
}
|
|
1564
|
-
function
|
|
1565
|
-
const { componentAttributesBasedOnDevice: y, componentStyles:
|
|
1566
|
-
col:
|
|
1597
|
+
function r(u) {
|
|
1598
|
+
const { componentAttributesBasedOnDevice: y, componentStyles: b } = He({
|
|
1599
|
+
col: u,
|
|
1567
1600
|
deviceDisplayType: t.deviceDisplayType,
|
|
1568
1601
|
isComposeMode: t.isComposeMode,
|
|
1569
|
-
sourceComponentsPlugin:
|
|
1602
|
+
sourceComponentsPlugin: we(t.plugins)
|
|
1570
1603
|
});
|
|
1571
1604
|
return {
|
|
1572
1605
|
componentAttributes: y,
|
|
1573
|
-
styleProps:
|
|
1606
|
+
styleProps: b
|
|
1574
1607
|
};
|
|
1575
1608
|
}
|
|
1576
|
-
function u
|
|
1577
|
-
const y =
|
|
1609
|
+
function d(u) {
|
|
1610
|
+
const y = pt(u.type);
|
|
1578
1611
|
if (!(y != null && y.length))
|
|
1579
1612
|
return null;
|
|
1580
|
-
const
|
|
1581
|
-
if (!
|
|
1613
|
+
const b = u.collection ?? t.widgetCollections[y];
|
|
1614
|
+
if (!b)
|
|
1582
1615
|
throw new Error(
|
|
1583
1616
|
`DisplayCollection - Collection with ID ${y} not found in widgetCollections. Available collections: ${Object.keys(t.widgetCollections).join(", ")}`
|
|
1584
1617
|
);
|
|
1585
|
-
return !
|
|
1618
|
+
return !b.collectionRows || !jo(b.collectionRows) ? null : b.collectionRows;
|
|
1586
1619
|
}
|
|
1587
|
-
function
|
|
1588
|
-
return [...t.ancestorColumnIds ?? [],
|
|
1620
|
+
function a(u) {
|
|
1621
|
+
return [...t.ancestorColumnIds ?? [], u];
|
|
1589
1622
|
}
|
|
1590
|
-
function
|
|
1591
|
-
return
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1623
|
+
function c() {
|
|
1624
|
+
return t.isComposeMode ? Be.Compose : Be.RenderedPage;
|
|
1625
|
+
}
|
|
1626
|
+
function f(u) {
|
|
1627
|
+
if (!(t.isComposeMode || !u))
|
|
1628
|
+
return [...t.ancestorColumnIds ?? [], u].join(pe);
|
|
1629
|
+
}
|
|
1630
|
+
function h(u) {
|
|
1631
|
+
return ns({
|
|
1632
|
+
widgetInstanceProps: ts({
|
|
1633
|
+
componentProps: t.componentProps,
|
|
1634
|
+
ancestorColumnIds: t.ancestorColumnIds,
|
|
1635
|
+
columnId: u
|
|
1636
|
+
}),
|
|
1637
|
+
placeholderValues: t.isComposeMode ? void 0 : t.placeholderValues
|
|
1595
1638
|
});
|
|
1596
1639
|
}
|
|
1597
|
-
return (
|
|
1598
|
-
const
|
|
1599
|
-
return o.value ? (
|
|
1640
|
+
return (u, y) => {
|
|
1641
|
+
const b = Qt("RenderComponentsInner", !0);
|
|
1642
|
+
return o.value ? (p(), w("div", {
|
|
1600
1643
|
key: 0,
|
|
1601
|
-
style:
|
|
1644
|
+
style: D(s.value)
|
|
1602
1645
|
}, [
|
|
1603
|
-
|
|
1646
|
+
R(Ge, {
|
|
1604
1647
|
"display-item-list": e.displayItemList,
|
|
1605
1648
|
"is-compose-mode": e.isComposeMode,
|
|
1606
1649
|
"show-drop-containers": e.showDropContainers,
|
|
1607
1650
|
"is-within-collection": e.isWithinCollection,
|
|
1608
1651
|
"device-display-type": e.deviceDisplayType
|
|
1609
1652
|
}, {
|
|
1610
|
-
default:
|
|
1611
|
-
(
|
|
1612
|
-
key:
|
|
1613
|
-
row:
|
|
1653
|
+
default: re(() => [
|
|
1654
|
+
(p(!0), w(k, null, U(e.displayItemList.rows, (C) => (p(), v(Ye, {
|
|
1655
|
+
key: C.id,
|
|
1656
|
+
row: C,
|
|
1614
1657
|
"is-compose-mode": e.isComposeMode,
|
|
1615
1658
|
"show-drop-containers": e.showDropContainers,
|
|
1616
1659
|
"is-within-collection": e.isWithinCollection,
|
|
1617
1660
|
"device-display-type": e.deviceDisplayType
|
|
1618
1661
|
}, {
|
|
1619
|
-
default:
|
|
1620
|
-
(
|
|
1621
|
-
key:
|
|
1662
|
+
default: re(() => [
|
|
1663
|
+
(p(!0), w(k, null, U(C.columns, (g) => (p(), w(k, {
|
|
1664
|
+
key: g.id
|
|
1622
1665
|
}, [
|
|
1623
|
-
|
|
1624
|
-
|
|
1666
|
+
l(g) ? (p(), w(k, { key: 0 }, [
|
|
1667
|
+
d(g) ? (p(), v(b, {
|
|
1625
1668
|
key: 0,
|
|
1626
|
-
"display-item-list":
|
|
1669
|
+
"display-item-list": d(g),
|
|
1627
1670
|
"is-compose-mode": e.isComposeMode,
|
|
1628
1671
|
"is-within-collection": !0,
|
|
1629
1672
|
"widget-collections": e.widgetCollections,
|
|
@@ -1633,18 +1676,21 @@ ${i.value}
|
|
|
1633
1676
|
"device-display-type": e.deviceDisplayType,
|
|
1634
1677
|
"component-props": e.componentProps,
|
|
1635
1678
|
mounts: e.mounts,
|
|
1636
|
-
"
|
|
1637
|
-
|
|
1679
|
+
"placeholder-values": e.placeholderValues,
|
|
1680
|
+
"ancestor-column-ids": a(g.id)
|
|
1681
|
+
}, null, 8, ["display-item-list", "is-compose-mode", "widget-collections", "show-drop-containers", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "placeholder-values", "ancestor-column-ids"])) : (p(), v(Xe, {
|
|
1638
1682
|
key: 1,
|
|
1639
|
-
"component-type":
|
|
1640
|
-
"library-id":
|
|
1641
|
-
"component-attributes":
|
|
1683
|
+
"component-type": g.type,
|
|
1684
|
+
"library-id": g.libraryId,
|
|
1685
|
+
"component-attributes": r(g).componentAttributes,
|
|
1642
1686
|
components: n(),
|
|
1643
|
-
"style-props":
|
|
1644
|
-
"widget-instance-props":
|
|
1687
|
+
"style-props": r(g).styleProps,
|
|
1688
|
+
"widget-instance-props": h(g.id),
|
|
1689
|
+
"page-view-type": c(),
|
|
1690
|
+
"column-path": f(g.id),
|
|
1645
1691
|
mounts: e.mounts
|
|
1646
|
-
}, null, 8, ["component-type", "library-id", "component-attributes", "components", "style-props", "widget-instance-props", "mounts"]))
|
|
1647
|
-
], 64)) :
|
|
1692
|
+
}, null, 8, ["component-type", "library-id", "component-attributes", "components", "style-props", "widget-instance-props", "page-view-type", "column-path", "mounts"]))
|
|
1693
|
+
], 64)) : I("", !0)
|
|
1648
1694
|
], 64))), 128))
|
|
1649
1695
|
]),
|
|
1650
1696
|
_: 2
|
|
@@ -1652,13 +1698,13 @@ ${i.value}
|
|
|
1652
1698
|
]),
|
|
1653
1699
|
_: 1
|
|
1654
1700
|
}, 8, ["display-item-list", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]),
|
|
1655
|
-
(
|
|
1656
|
-
key:
|
|
1657
|
-
"data-rulecms-overlay-layer":
|
|
1658
|
-
style:
|
|
1701
|
+
(p(!0), w(k, null, U(i.value, (C) => (p(), w("div", {
|
|
1702
|
+
key: C.index,
|
|
1703
|
+
"data-rulecms-overlay-layer": C.index,
|
|
1704
|
+
style: D(C.boxStyles)
|
|
1659
1705
|
}, [
|
|
1660
|
-
|
|
1661
|
-
"display-item-list":
|
|
1706
|
+
R(b, {
|
|
1707
|
+
"display-item-list": C.layer,
|
|
1662
1708
|
"is-compose-mode": e.isComposeMode,
|
|
1663
1709
|
"is-within-collection": !1,
|
|
1664
1710
|
"widget-collections": e.widgetCollections,
|
|
@@ -1668,10 +1714,11 @@ ${i.value}
|
|
|
1668
1714
|
"device-display-type": e.deviceDisplayType,
|
|
1669
1715
|
"component-props": e.componentProps,
|
|
1670
1716
|
mounts: e.mounts,
|
|
1717
|
+
"placeholder-values": e.placeholderValues,
|
|
1671
1718
|
"ancestor-column-ids": e.ancestorColumnIds
|
|
1672
|
-
}, null, 8, ["display-item-list", "is-compose-mode", "widget-collections", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "ancestor-column-ids"])
|
|
1673
|
-
], 12,
|
|
1674
|
-
], 4)) : (
|
|
1719
|
+
}, null, 8, ["display-item-list", "is-compose-mode", "widget-collections", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "placeholder-values", "ancestor-column-ids"])
|
|
1720
|
+
], 12, Ts))), 128))
|
|
1721
|
+
], 4)) : (p(), v(Ge, {
|
|
1675
1722
|
key: 1,
|
|
1676
1723
|
"display-item-list": e.displayItemList,
|
|
1677
1724
|
"is-compose-mode": e.isComposeMode,
|
|
@@ -1679,23 +1726,23 @@ ${i.value}
|
|
|
1679
1726
|
"is-within-collection": e.isWithinCollection,
|
|
1680
1727
|
"device-display-type": e.deviceDisplayType
|
|
1681
1728
|
}, {
|
|
1682
|
-
default:
|
|
1683
|
-
(
|
|
1684
|
-
key:
|
|
1685
|
-
row:
|
|
1729
|
+
default: re(() => [
|
|
1730
|
+
(p(!0), w(k, null, U(e.displayItemList.rows, (C) => (p(), v(Ye, {
|
|
1731
|
+
key: C.id,
|
|
1732
|
+
row: C,
|
|
1686
1733
|
"is-compose-mode": e.isComposeMode,
|
|
1687
1734
|
"show-drop-containers": e.showDropContainers,
|
|
1688
1735
|
"is-within-collection": e.isWithinCollection,
|
|
1689
1736
|
"device-display-type": e.deviceDisplayType
|
|
1690
1737
|
}, {
|
|
1691
|
-
default:
|
|
1692
|
-
(
|
|
1693
|
-
key:
|
|
1738
|
+
default: re(() => [
|
|
1739
|
+
(p(!0), w(k, null, U(C.columns, (g) => (p(), w(k, {
|
|
1740
|
+
key: g.id
|
|
1694
1741
|
}, [
|
|
1695
|
-
|
|
1696
|
-
|
|
1742
|
+
l(g) ? (p(), w(k, { key: 0 }, [
|
|
1743
|
+
d(g) ? (p(), v(b, {
|
|
1697
1744
|
key: 0,
|
|
1698
|
-
"display-item-list":
|
|
1745
|
+
"display-item-list": d(g),
|
|
1699
1746
|
"is-compose-mode": e.isComposeMode,
|
|
1700
1747
|
"is-within-collection": !0,
|
|
1701
1748
|
"widget-collections": e.widgetCollections,
|
|
@@ -1705,18 +1752,21 @@ ${i.value}
|
|
|
1705
1752
|
"device-display-type": e.deviceDisplayType,
|
|
1706
1753
|
"component-props": e.componentProps,
|
|
1707
1754
|
mounts: e.mounts,
|
|
1708
|
-
"
|
|
1709
|
-
|
|
1755
|
+
"placeholder-values": e.placeholderValues,
|
|
1756
|
+
"ancestor-column-ids": a(g.id)
|
|
1757
|
+
}, null, 8, ["display-item-list", "is-compose-mode", "widget-collections", "show-drop-containers", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "placeholder-values", "ancestor-column-ids"])) : (p(), v(Xe, {
|
|
1710
1758
|
key: 1,
|
|
1711
|
-
"component-type":
|
|
1712
|
-
"library-id":
|
|
1713
|
-
"component-attributes":
|
|
1759
|
+
"component-type": g.type,
|
|
1760
|
+
"library-id": g.libraryId,
|
|
1761
|
+
"component-attributes": r(g).componentAttributes,
|
|
1714
1762
|
components: n(),
|
|
1715
|
-
"style-props":
|
|
1716
|
-
"widget-instance-props":
|
|
1763
|
+
"style-props": r(g).styleProps,
|
|
1764
|
+
"widget-instance-props": h(g.id),
|
|
1765
|
+
"page-view-type": c(),
|
|
1766
|
+
"column-path": f(g.id),
|
|
1717
1767
|
mounts: e.mounts
|
|
1718
|
-
}, null, 8, ["component-type", "library-id", "component-attributes", "components", "style-props", "widget-instance-props", "mounts"]))
|
|
1719
|
-
], 64)) :
|
|
1768
|
+
}, null, 8, ["component-type", "library-id", "component-attributes", "components", "style-props", "widget-instance-props", "page-view-type", "column-path", "mounts"]))
|
|
1769
|
+
], 64)) : I("", !0)
|
|
1720
1770
|
], 64))), 128))
|
|
1721
1771
|
]),
|
|
1722
1772
|
_: 2
|
|
@@ -1726,7 +1776,7 @@ ${i.value}
|
|
|
1726
1776
|
}, 8, ["display-item-list", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]));
|
|
1727
1777
|
};
|
|
1728
1778
|
}
|
|
1729
|
-
}),
|
|
1779
|
+
}), Ee = /* @__PURE__ */ S({
|
|
1730
1780
|
__name: "RenderComponentsForDevice",
|
|
1731
1781
|
props: {
|
|
1732
1782
|
displayItemList: {},
|
|
@@ -1739,12 +1789,13 @@ ${i.value}
|
|
|
1739
1789
|
plugins: {},
|
|
1740
1790
|
componentProps: {},
|
|
1741
1791
|
mounts: {},
|
|
1792
|
+
placeholderValues: {},
|
|
1742
1793
|
ancestorColumnIds: {}
|
|
1743
1794
|
},
|
|
1744
1795
|
setup(e) {
|
|
1745
1796
|
return (t, n) => {
|
|
1746
1797
|
var o, s;
|
|
1747
|
-
return (s = (o = e.displayItemList) == null ? void 0 : o.rows) != null && s.length ? (
|
|
1798
|
+
return (s = (o = e.displayItemList) == null ? void 0 : o.rows) != null && s.length ? (p(), v(Es, {
|
|
1748
1799
|
key: 0,
|
|
1749
1800
|
"display-item-list": e.displayItemList,
|
|
1750
1801
|
"is-compose-mode": e.isComposeMode,
|
|
@@ -1756,27 +1807,24 @@ ${i.value}
|
|
|
1756
1807
|
"device-display-type": e.deviceDisplayType,
|
|
1757
1808
|
"component-props": e.componentProps,
|
|
1758
1809
|
mounts: e.mounts,
|
|
1810
|
+
"placeholder-values": e.placeholderValues,
|
|
1759
1811
|
"ancestor-column-ids": e.ancestorColumnIds
|
|
1760
|
-
}, 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"])) :
|
|
1812
|
+
}, 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", "placeholder-values", "ancestor-column-ids"])) : I("", !0);
|
|
1761
1813
|
};
|
|
1762
1814
|
}
|
|
1763
|
-
}),
|
|
1815
|
+
}), Et = /* @__PURE__ */ S({
|
|
1764
1816
|
__name: "LibraryStylesheets",
|
|
1765
1817
|
props: {
|
|
1766
1818
|
stylesheets: {}
|
|
1767
1819
|
},
|
|
1768
1820
|
setup(e) {
|
|
1769
|
-
return (t, n) => (
|
|
1770
|
-
key:
|
|
1771
|
-
"data-rulecms-library-stylesheet": ""
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
R(L(o), 1)
|
|
1775
|
-
]),
|
|
1776
|
-
_: 2
|
|
1777
|
-
}, 1024))), 128));
|
|
1821
|
+
return (t, n) => (p(!0), w(k, null, U(e.stylesheets ?? [], (o, s) => (p(), v(x("style"), {
|
|
1822
|
+
key: s,
|
|
1823
|
+
"data-rulecms-library-stylesheet": "",
|
|
1824
|
+
innerHTML: T(_)(o)
|
|
1825
|
+
}, null, 8, ["innerHTML"]))), 128));
|
|
1778
1826
|
}
|
|
1779
|
-
}),
|
|
1827
|
+
}), Ss = /* @__PURE__ */ S({
|
|
1780
1828
|
__name: "BreakpointVariantRender",
|
|
1781
1829
|
props: {
|
|
1782
1830
|
displayItemList: {},
|
|
@@ -1784,45 +1832,44 @@ ${i.value}
|
|
|
1784
1832
|
plugins: {},
|
|
1785
1833
|
componentProps: {},
|
|
1786
1834
|
mounts: {},
|
|
1835
|
+
placeholderValues: {},
|
|
1787
1836
|
scopeIdInput: {}
|
|
1788
1837
|
},
|
|
1789
1838
|
setup(e) {
|
|
1790
|
-
const t = ["Phone", "Tablet", "Desktop"]
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
() =>
|
|
1794
|
-
), l =
|
|
1795
|
-
return (
|
|
1839
|
+
const t = ["Phone", "Tablet", "Desktop"], n = e, o = m(
|
|
1840
|
+
() => At("rulecms-bp", JSON.stringify(n.displayItemList))
|
|
1841
|
+
), s = m(() => n.scopeIdInput ?? o.value), i = m(
|
|
1842
|
+
() => as(n.displayItemList, n.widgetCollections)
|
|
1843
|
+
), l = m(() => ps(s.value));
|
|
1844
|
+
return (r, d) => {
|
|
1796
1845
|
var a;
|
|
1797
|
-
return
|
|
1798
|
-
|
|
1846
|
+
return p(), w(k, null, [
|
|
1847
|
+
R(Et, {
|
|
1799
1848
|
stylesheets: (a = e.plugins.sourceComponents) == null ? void 0 : a.stylesheets
|
|
1800
1849
|
}, null, 8, ["stylesheets"]),
|
|
1801
|
-
|
|
1802
|
-
(
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
(f(), b(E, null, F(t, (p) => V("div", {
|
|
1809
|
-
key: p,
|
|
1810
|
-
class: G(`${i.value}-${p.toLowerCase()}`)
|
|
1850
|
+
i.value ? (p(), w(k, { key: 1 }, [
|
|
1851
|
+
(p(), v(x("style"), {
|
|
1852
|
+
innerHTML: T(_)(l.value)
|
|
1853
|
+
}, null, 8, ["innerHTML"])),
|
|
1854
|
+
(p(), w(k, null, U(t, (c) => K("div", {
|
|
1855
|
+
key: c,
|
|
1856
|
+
class: oe(`${s.value}-${c.toLowerCase()}`)
|
|
1811
1857
|
}, [
|
|
1812
|
-
|
|
1858
|
+
R(Ee, {
|
|
1813
1859
|
"display-item-list": e.displayItemList,
|
|
1814
1860
|
"is-compose-mode": !1,
|
|
1815
1861
|
"is-within-collection": !1,
|
|
1816
1862
|
"widget-collections": e.widgetCollections,
|
|
1817
1863
|
"show-drop-containers": !1,
|
|
1818
1864
|
"redux-device-display-type": "desktop",
|
|
1819
|
-
"device-display-type":
|
|
1865
|
+
"device-display-type": c,
|
|
1820
1866
|
plugins: e.plugins,
|
|
1821
1867
|
"component-props": e.componentProps,
|
|
1822
|
-
mounts: e.mounts
|
|
1823
|
-
|
|
1868
|
+
mounts: e.mounts,
|
|
1869
|
+
"placeholder-values": e.placeholderValues
|
|
1870
|
+
}, null, 8, ["display-item-list", "widget-collections", "device-display-type", "plugins", "component-props", "mounts", "placeholder-values"])
|
|
1824
1871
|
], 2)), 64))
|
|
1825
|
-
], 64)) : (
|
|
1872
|
+
], 64)) : (p(), v(Ee, {
|
|
1826
1873
|
key: 0,
|
|
1827
1874
|
"display-item-list": e.displayItemList,
|
|
1828
1875
|
"is-compose-mode": !1,
|
|
@@ -1833,13 +1880,14 @@ ${i.value}
|
|
|
1833
1880
|
"device-display-type": "Desktop",
|
|
1834
1881
|
plugins: e.plugins,
|
|
1835
1882
|
"component-props": e.componentProps,
|
|
1836
|
-
mounts: e.mounts
|
|
1837
|
-
|
|
1883
|
+
mounts: e.mounts,
|
|
1884
|
+
"placeholder-values": e.placeholderValues
|
|
1885
|
+
}, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts", "placeholder-values"]))
|
|
1838
1886
|
], 64);
|
|
1839
1887
|
};
|
|
1840
1888
|
}
|
|
1841
1889
|
});
|
|
1842
|
-
function
|
|
1890
|
+
function ks(e, t, n) {
|
|
1843
1891
|
if (e)
|
|
1844
1892
|
return "Phone";
|
|
1845
1893
|
if (t)
|
|
@@ -1847,7 +1895,7 @@ function Qo(e, t, n) {
|
|
|
1847
1895
|
const o = (n == null ? void 0 : n.toLowerCase()) || "desktop";
|
|
1848
1896
|
return o === "phone" ? "Phone" : o === "tablet" ? "Tablet" : "Desktop";
|
|
1849
1897
|
}
|
|
1850
|
-
const
|
|
1898
|
+
const Is = `(max-width: ${yt})`, Ps = `(max-width: ${mt})`, Ds = /* @__PURE__ */ S({
|
|
1851
1899
|
__name: "RenderComponents",
|
|
1852
1900
|
props: {
|
|
1853
1901
|
displayItemList: {},
|
|
@@ -1858,30 +1906,31 @@ const es = `(max-width: ${Ze})`, ts = `(max-width: ${qe})`, ns = /* @__PURE__ */
|
|
|
1858
1906
|
reduxDeviceDisplayType: {},
|
|
1859
1907
|
plugins: {},
|
|
1860
1908
|
componentProps: {},
|
|
1861
|
-
mounts: {}
|
|
1909
|
+
mounts: {},
|
|
1910
|
+
placeholderValues: {}
|
|
1862
1911
|
},
|
|
1863
1912
|
setup(e) {
|
|
1864
|
-
const t = e, n =
|
|
1913
|
+
const t = e, n = H("Desktop");
|
|
1865
1914
|
let o, s;
|
|
1866
1915
|
function i() {
|
|
1867
|
-
n.value =
|
|
1916
|
+
n.value = ks(
|
|
1868
1917
|
(o == null ? void 0 : o.matches) ?? !1,
|
|
1869
1918
|
(s == null ? void 0 : s.matches) ?? !1,
|
|
1870
1919
|
t.reduxDeviceDisplayType
|
|
1871
1920
|
);
|
|
1872
1921
|
}
|
|
1873
|
-
return
|
|
1874
|
-
typeof matchMedia == "function" && (o = matchMedia(
|
|
1875
|
-
}),
|
|
1922
|
+
return en(() => {
|
|
1923
|
+
typeof matchMedia == "function" && (o = matchMedia(Is), s = matchMedia(Ps), o.addEventListener("change", i), s.addEventListener("change", i)), i();
|
|
1924
|
+
}), st(() => {
|
|
1876
1925
|
o == null || o.removeEventListener("change", i), s == null || s.removeEventListener("change", i);
|
|
1877
|
-
}), (
|
|
1878
|
-
var
|
|
1879
|
-
return
|
|
1880
|
-
e.isWithinCollection ?
|
|
1926
|
+
}), (l, r) => {
|
|
1927
|
+
var d;
|
|
1928
|
+
return p(), w(k, null, [
|
|
1929
|
+
e.isWithinCollection ? I("", !0) : (p(), v(Et, {
|
|
1881
1930
|
key: 0,
|
|
1882
|
-
stylesheets: (
|
|
1931
|
+
stylesheets: (d = e.plugins.sourceComponents) == null ? void 0 : d.stylesheets
|
|
1883
1932
|
}, null, 8, ["stylesheets"])),
|
|
1884
|
-
|
|
1933
|
+
R(Ee, {
|
|
1885
1934
|
"display-item-list": e.displayItemList,
|
|
1886
1935
|
"is-compose-mode": e.isComposeMode,
|
|
1887
1936
|
"is-within-collection": e.isWithinCollection,
|
|
@@ -1891,20 +1940,24 @@ const es = `(max-width: ${Ze})`, ts = `(max-width: ${qe})`, ns = /* @__PURE__ */
|
|
|
1891
1940
|
"device-display-type": n.value,
|
|
1892
1941
|
plugins: e.plugins,
|
|
1893
1942
|
"component-props": e.componentProps,
|
|
1894
|
-
mounts: e.mounts
|
|
1895
|
-
|
|
1943
|
+
mounts: e.mounts,
|
|
1944
|
+
"placeholder-values": e.placeholderValues
|
|
1945
|
+
}, null, 8, ["display-item-list", "is-compose-mode", "is-within-collection", "widget-collections", "show-drop-containers", "redux-device-display-type", "device-display-type", "plugins", "component-props", "mounts", "placeholder-values"])
|
|
1896
1946
|
], 64);
|
|
1897
1947
|
};
|
|
1898
1948
|
}
|
|
1899
1949
|
});
|
|
1900
|
-
function
|
|
1950
|
+
function St(e) {
|
|
1901
1951
|
return e !== !1;
|
|
1902
1952
|
}
|
|
1903
|
-
const
|
|
1953
|
+
const xs = ["utilities", "components"], Ls = new Set(xs), kt = (e) => typeof e == "string" && Ls.has(e), $s = (e) => e.split(`
|
|
1904
1954
|
`).map((t) => t.length > 0 ? ` ${t}` : t).join(`
|
|
1905
|
-
`),
|
|
1906
|
-
${
|
|
1907
|
-
}` : e : null,
|
|
1955
|
+
`), Rs = (e, t) => e ? kt(t) ? `@layer ${t} {
|
|
1956
|
+
${$s(e)}
|
|
1957
|
+
}` : e : null, Ms = (e) => e.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), Os = (e) => {
|
|
1958
|
+
const t = e.replace(/[^A-Za-z0-9_-]/g, (n) => `\\${n}`);
|
|
1959
|
+
return /^[0-9]/.test(t) ? `\\3${t[0]} ${t.slice(1)}` : /^-[0-9]/.test(t) ? `-\\3${t[1]} ${t.slice(2)}` : t;
|
|
1960
|
+
}, _s = ["</", "<script", "@import", "javascript:", "vbscript:", "expression("], js = /[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/, Ns = /[\s{};"]/, Ws = /^[A-Za-z0-9_:%./[\]%-]+$/, Vs = (e) => {
|
|
1908
1961
|
let t = 0;
|
|
1909
1962
|
for (const n of e)
|
|
1910
1963
|
if (n === "{")
|
|
@@ -1912,43 +1965,43 @@ ${is(e)}
|
|
|
1912
1965
|
else if (n === "}" && (t -= 1, t < 0))
|
|
1913
1966
|
return !1;
|
|
1914
1967
|
return t === 0;
|
|
1915
|
-
},
|
|
1968
|
+
}, Fs = (e) => {
|
|
1916
1969
|
const t = e.startsWith(".") ? e.slice(1) : e;
|
|
1917
|
-
return !t || t.length > 200 || t.startsWith(".") ||
|
|
1918
|
-
},
|
|
1970
|
+
return !t || t.length > 200 || t.startsWith(".") || Ns.test(t) ? !1 : Ws.test(t);
|
|
1971
|
+
}, Bs = (e) => {
|
|
1919
1972
|
const t = e.trim();
|
|
1920
|
-
if (!t || t.length > 4e3 ||
|
|
1973
|
+
if (!t || t.length > 4e3 || js.test(t) || !Vs(t))
|
|
1921
1974
|
return !1;
|
|
1922
1975
|
const n = t.toLowerCase();
|
|
1923
|
-
return !
|
|
1924
|
-
},
|
|
1976
|
+
return !_s.some((o) => n.includes(o));
|
|
1977
|
+
}, Ks = (e) => {
|
|
1925
1978
|
if (!e)
|
|
1926
1979
|
return {};
|
|
1927
1980
|
const t = {};
|
|
1928
1981
|
for (const [n, o] of Object.entries(e)) {
|
|
1929
1982
|
const s = n.startsWith(".") ? n.slice(1) : n.trim();
|
|
1930
|
-
if (!
|
|
1983
|
+
if (!Fs(s) || typeof o != "string")
|
|
1931
1984
|
continue;
|
|
1932
1985
|
const i = o.trim();
|
|
1933
|
-
|
|
1986
|
+
Bs(i) && (t[s] = i);
|
|
1934
1987
|
}
|
|
1935
1988
|
return t;
|
|
1936
|
-
},
|
|
1989
|
+
}, Hs = (e) => e.split(`
|
|
1937
1990
|
`).map((t) => ` ${t}`).join(`
|
|
1938
|
-
`),
|
|
1939
|
-
if (!
|
|
1991
|
+
`), Us = (e, t, n, o) => {
|
|
1992
|
+
if (!St(n))
|
|
1940
1993
|
return null;
|
|
1941
|
-
const s =
|
|
1994
|
+
const s = Ks(t), i = Object.keys(s);
|
|
1942
1995
|
if (i.length === 0 || !e)
|
|
1943
1996
|
return null;
|
|
1944
|
-
const
|
|
1945
|
-
(
|
|
1946
|
-
${
|
|
1997
|
+
const l = `[data-rulecms-published-key="${Ms(e)}"]`, r = i.map(
|
|
1998
|
+
(d) => `${l} .${Os(d)} {
|
|
1999
|
+
${Hs(s[d])}
|
|
1947
2000
|
}`
|
|
1948
2001
|
).join(`
|
|
1949
2002
|
`);
|
|
1950
|
-
return
|
|
1951
|
-
},
|
|
2003
|
+
return Rs(r, o);
|
|
2004
|
+
}, zs = /* @__PURE__ */ S({
|
|
1952
2005
|
__name: "ProjectCssClassesStylesheet",
|
|
1953
2006
|
props: {
|
|
1954
2007
|
publishedKey: {},
|
|
@@ -1956,29 +2009,25 @@ ${gs(s[u])}
|
|
|
1956
2009
|
classLayer: {}
|
|
1957
2010
|
},
|
|
1958
2011
|
setup(e) {
|
|
1959
|
-
const t = e, n =
|
|
1960
|
-
() =>
|
|
2012
|
+
const t = e, n = m(
|
|
2013
|
+
() => Us(
|
|
1961
2014
|
t.publishedKey,
|
|
1962
2015
|
t.classes,
|
|
1963
2016
|
void 0,
|
|
1964
2017
|
t.classLayer
|
|
1965
2018
|
)
|
|
1966
2019
|
);
|
|
1967
|
-
return (o, s) => n.value ? (
|
|
2020
|
+
return (o, s) => n.value ? (p(), v(x("style"), {
|
|
1968
2021
|
key: 0,
|
|
1969
|
-
"data-rulecms-project-class-definitions": ""
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
R(L(n.value), 1)
|
|
1973
|
-
]),
|
|
1974
|
-
_: 1
|
|
1975
|
-
})) : k("", !0);
|
|
2022
|
+
"data-rulecms-project-class-definitions": "",
|
|
2023
|
+
innerHTML: T(_)(n.value)
|
|
2024
|
+
}, null, 8, ["innerHTML"])) : I("", !0);
|
|
1976
2025
|
}
|
|
1977
2026
|
});
|
|
1978
|
-
function
|
|
2027
|
+
function _e(e) {
|
|
1979
2028
|
return e !== !1;
|
|
1980
2029
|
}
|
|
1981
|
-
const
|
|
2030
|
+
const It = (e) => e.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), Gs = /* @__PURE__ */ new Set([
|
|
1982
2031
|
"serif",
|
|
1983
2032
|
"sans-serif",
|
|
1984
2033
|
"monospace",
|
|
@@ -1992,84 +2041,84 @@ const at = (e) => e.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), ws = /* @__PURE
|
|
|
1992
2041
|
"emoji",
|
|
1993
2042
|
"math",
|
|
1994
2043
|
"fangsong"
|
|
1995
|
-
]),
|
|
2044
|
+
]), Ys = /^[a-zA-Z_\u00A0-\uFFFF-][a-zA-Z0-9_\u00A0-\uFFFF-]*$/, Xs = /url\(|@|[{};\\<>]|javascript:/i, Js = /url\(|@|[{};\\<>]|javascript:|expression\(/i, qs = /^--[A-Za-z_][\w-]*$/, Zs = /^[A-Za-z0-9 ]+$/, Qs = /* @__PURE__ */ new Set([100, 200, 300, 400, 500, 600, 700, 800, 900]), ei = 4, ti = 8, ni = 255, Se = (e) => Gs.has(e.toLowerCase()) || Ys.test(e) ? e : `"${e.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`, Je = (e) => typeof e == "string" && e.trim() !== "" && e.trim().length <= 80 && !e.includes(",") && !Xs.test(e), oi = (e) => typeof e == "string" && qs.test(e.trim()) && e.trim().length <= 80, si = (e) => typeof e == "string" && e.trim() !== "" && e.trim().length <= 400 && !Js.test(e), ii = (e) => typeof e != "number" || !Number.isInteger(e) || e < 0 || e > ni ? null : e, ri = (e, t, n) => {
|
|
1996
2045
|
if (!Array.isArray(e))
|
|
1997
2046
|
return [];
|
|
1998
2047
|
const o = [];
|
|
1999
2048
|
for (const s of e) {
|
|
2000
|
-
if (!s || typeof s != "object" || o.length >=
|
|
2049
|
+
if (!s || typeof s != "object" || o.length >= ei)
|
|
2001
2050
|
continue;
|
|
2002
2051
|
const i = s;
|
|
2003
|
-
if (
|
|
2052
|
+
if (!oi(i.name))
|
|
2004
2053
|
continue;
|
|
2005
|
-
const
|
|
2006
|
-
if (t.has(
|
|
2054
|
+
const l = i.name.trim();
|
|
2055
|
+
if (t.has(l))
|
|
2007
2056
|
continue;
|
|
2008
|
-
const
|
|
2009
|
-
for (const
|
|
2010
|
-
if (
|
|
2057
|
+
const r = [], d = /* @__PURE__ */ new Set();
|
|
2058
|
+
for (const c of i.overrideColors ?? []) {
|
|
2059
|
+
if (r.length >= ti)
|
|
2011
2060
|
break;
|
|
2012
|
-
const
|
|
2013
|
-
|
|
2061
|
+
const f = ii(c == null ? void 0 : c.index);
|
|
2062
|
+
f === null || d.has(f) || !si(c == null ? void 0 : c.color) || (d.add(f), r.push({ index: f, color: c.color.trim() }));
|
|
2014
2063
|
}
|
|
2015
|
-
|
|
2016
|
-
const
|
|
2017
|
-
|
|
2018
|
-
name:
|
|
2019
|
-
...
|
|
2020
|
-
...
|
|
2064
|
+
r.sort((c, f) => c.index - f.index);
|
|
2065
|
+
const a = i.applyToWidget === !0 && !n.current;
|
|
2066
|
+
a && (n.current = !0), t.add(l), o.push({
|
|
2067
|
+
name: l,
|
|
2068
|
+
...r.length > 0 ? { overrideColors: r } : {},
|
|
2069
|
+
...a ? { applyToWidget: !0 } : {}
|
|
2021
2070
|
});
|
|
2022
2071
|
}
|
|
2023
2072
|
return o;
|
|
2024
|
-
},
|
|
2025
|
-
var
|
|
2073
|
+
}, fe = (e) => {
|
|
2074
|
+
var l;
|
|
2026
2075
|
if (!Array.isArray(e))
|
|
2027
2076
|
return [];
|
|
2028
2077
|
const t = [], n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), s = { current: !1 };
|
|
2029
2078
|
let i = !1;
|
|
2030
|
-
for (const
|
|
2031
|
-
if (!
|
|
2079
|
+
for (const r of e) {
|
|
2080
|
+
if (!r || !Je(r.family))
|
|
2032
2081
|
continue;
|
|
2033
|
-
const
|
|
2034
|
-
if (n.has(
|
|
2082
|
+
const d = r.family.trim(), a = d.toLowerCase();
|
|
2083
|
+
if (n.has(a) || t.length >= 12)
|
|
2035
2084
|
continue;
|
|
2036
|
-
const
|
|
2037
|
-
let
|
|
2038
|
-
if (((
|
|
2039
|
-
if (!
|
|
2085
|
+
const c = (r.fallbacks ?? []).filter(Je).slice(0, 8), f = typeof r.cssVariable == "string" && q(r.cssVariable.trim()) ? r.cssVariable.trim() : void 0;
|
|
2086
|
+
let h = { kind: "stack-only" };
|
|
2087
|
+
if (((l = r.source) == null ? void 0 : l.kind) === "google") {
|
|
2088
|
+
if (!Zs.test(d))
|
|
2040
2089
|
continue;
|
|
2041
|
-
const
|
|
2042
|
-
if (
|
|
2090
|
+
const C = (Array.isArray(r.source.weights) ? r.source.weights : []).filter((g) => typeof g == "number" && Qs.has(g)).filter((g, Z, ye) => ye.indexOf(g) === Z).sort((g, Z) => g - Z);
|
|
2091
|
+
if (C.length === 0)
|
|
2043
2092
|
continue;
|
|
2044
|
-
|
|
2093
|
+
h = { kind: "google", weights: C };
|
|
2045
2094
|
}
|
|
2046
|
-
n.add(
|
|
2047
|
-
const
|
|
2048
|
-
|
|
2049
|
-
const
|
|
2095
|
+
n.add(a);
|
|
2096
|
+
const u = r.applyToWidget === !0 && !i;
|
|
2097
|
+
u && (i = !0);
|
|
2098
|
+
const y = ri(r.palettes, o, s);
|
|
2050
2099
|
t.push({
|
|
2051
|
-
family:
|
|
2052
|
-
...
|
|
2053
|
-
fallbacks:
|
|
2054
|
-
applyToWidget:
|
|
2055
|
-
source:
|
|
2056
|
-
...
|
|
2100
|
+
family: d,
|
|
2101
|
+
...f ? { cssVariable: f } : {},
|
|
2102
|
+
fallbacks: c,
|
|
2103
|
+
applyToWidget: u,
|
|
2104
|
+
source: h,
|
|
2105
|
+
...y.length > 0 ? { palettes: y } : {}
|
|
2057
2106
|
});
|
|
2058
2107
|
}
|
|
2059
2108
|
return t;
|
|
2060
|
-
},
|
|
2061
|
-
const t =
|
|
2109
|
+
}, li = (e) => {
|
|
2110
|
+
const t = fe(e).filter((n) => n.source.kind === "google").map((n) => {
|
|
2062
2111
|
const o = n.source.kind === "google" ? n.source.weights.join(";") : "400";
|
|
2063
2112
|
return `family=${n.family.replace(/ /g, "+")}:wght@${o}`;
|
|
2064
2113
|
});
|
|
2065
2114
|
return t.length === 0 ? null : `https://fonts.googleapis.com/css2?${t.join("&")}&display=swap`;
|
|
2066
|
-
},
|
|
2115
|
+
}, ci = (e) => [Se(e.family), ...(e.fallbacks ?? []).map(Se)].join(", "), ai = (e) => {
|
|
2067
2116
|
const t = [];
|
|
2068
2117
|
for (const n of e)
|
|
2069
2118
|
for (const o of n.palettes ?? []) {
|
|
2070
|
-
const s = [` font-family: ${
|
|
2119
|
+
const s = [` font-family: ${Se(n.family)};`];
|
|
2071
2120
|
if (o.overrideColors && o.overrideColors.length > 0) {
|
|
2072
|
-
const i = o.overrideColors.map((
|
|
2121
|
+
const i = o.overrideColors.map((l) => `${l.index} ${l.color}`).join(", ");
|
|
2073
2122
|
s.push(` override-colors: ${i};`);
|
|
2074
2123
|
}
|
|
2075
2124
|
t.push(`@font-palette-values ${o.name} {
|
|
@@ -2080,66 +2129,62 @@ ${s.join(`
|
|
|
2080
2129
|
return t.length > 0 ? t.join(`
|
|
2081
2130
|
|
|
2082
2131
|
`) : null;
|
|
2083
|
-
},
|
|
2132
|
+
}, ui = (e) => {
|
|
2084
2133
|
for (const t of e)
|
|
2085
2134
|
for (const n of t.palettes ?? [])
|
|
2086
2135
|
if (n.applyToWidget)
|
|
2087
2136
|
return n.name;
|
|
2088
|
-
},
|
|
2089
|
-
if (!
|
|
2137
|
+
}, di = (e, t, n) => {
|
|
2138
|
+
if (!_e(n) || !e)
|
|
2090
2139
|
return null;
|
|
2091
|
-
const o =
|
|
2092
|
-
for (const
|
|
2093
|
-
const
|
|
2094
|
-
|
|
2095
|
-
` font-family: ${
|
|
2140
|
+
const o = fe(t), s = [];
|
|
2141
|
+
for (const a of o) {
|
|
2142
|
+
const c = ci(a);
|
|
2143
|
+
a.cssVariable && s.push(` ${a.cssVariable}: ${c};`), a.applyToWidget && s.push(
|
|
2144
|
+
` font-family: ${a.cssVariable ? `var(${a.cssVariable})` : c};`
|
|
2096
2145
|
);
|
|
2097
2146
|
}
|
|
2098
|
-
const i =
|
|
2147
|
+
const i = ui(o);
|
|
2099
2148
|
i && s.push(` font-palette: ${i};`);
|
|
2100
|
-
const
|
|
2149
|
+
const l = ai(o), r = `[data-rulecms-published-key="${It(e)}"] > *`, d = s.length > 0 ? `${r} {
|
|
2101
2150
|
${s.join(`
|
|
2102
2151
|
`)}
|
|
2103
2152
|
}` : null;
|
|
2104
|
-
return !
|
|
2153
|
+
return !l && !d ? null : l ? d ? `${l}
|
|
2105
2154
|
|
|
2106
|
-
${
|
|
2107
|
-
},
|
|
2155
|
+
${d}` : l : d;
|
|
2156
|
+
}, pi = ["href"], fi = /* @__PURE__ */ S({
|
|
2108
2157
|
__name: "ProjectCssFontsStylesheet",
|
|
2109
2158
|
props: {
|
|
2110
2159
|
publishedKey: {},
|
|
2111
2160
|
fonts: {},
|
|
2112
|
-
includeFontFaces: { type: [Boolean, null] }
|
|
2161
|
+
includeFontFaces: { type: [Boolean, null], default: void 0 }
|
|
2113
2162
|
},
|
|
2114
2163
|
setup(e) {
|
|
2115
|
-
const t = e, n =
|
|
2116
|
-
() =>
|
|
2117
|
-
), s =
|
|
2118
|
-
() =>
|
|
2164
|
+
const t = e, n = m(() => fe(t.fonts)), o = m(
|
|
2165
|
+
() => _e(t.includeFontFaces) ? li(n.value) : null
|
|
2166
|
+
), s = m(
|
|
2167
|
+
() => di(t.publishedKey, n.value, t.includeFontFaces)
|
|
2119
2168
|
);
|
|
2120
|
-
return (i,
|
|
2121
|
-
o.value ? (
|
|
2169
|
+
return (i, l) => (p(), w(k, null, [
|
|
2170
|
+
o.value ? (p(), w("link", {
|
|
2122
2171
|
key: 0,
|
|
2123
2172
|
rel: "stylesheet",
|
|
2124
2173
|
href: o.value,
|
|
2125
2174
|
"data-rulecms-project-fonts": ""
|
|
2126
|
-
}, null, 8,
|
|
2127
|
-
s.value ? (
|
|
2175
|
+
}, null, 8, pi)) : I("", !0),
|
|
2176
|
+
s.value ? (p(), v(x("style"), {
|
|
2128
2177
|
key: 1,
|
|
2129
|
-
"data-rulecms-project-fonts": ""
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
R(L(s.value), 1)
|
|
2133
|
-
]),
|
|
2134
|
-
_: 1
|
|
2135
|
-
})) : k("", !0)
|
|
2178
|
+
"data-rulecms-project-fonts": "",
|
|
2179
|
+
innerHTML: T(_)(s.value)
|
|
2180
|
+
}, null, 8, ["innerHTML"])) : I("", !0)
|
|
2136
2181
|
], 64));
|
|
2137
2182
|
}
|
|
2138
2183
|
});
|
|
2139
|
-
function
|
|
2184
|
+
function Pt(e) {
|
|
2140
2185
|
return e !== !1;
|
|
2141
2186
|
}
|
|
2142
|
-
const
|
|
2187
|
+
const yi = 80, mi = 4e3, hi = 32, Dt = [
|
|
2143
2188
|
"url(",
|
|
2144
2189
|
"@import",
|
|
2145
2190
|
"@font-face",
|
|
@@ -2150,7 +2195,7 @@ const Fs = 80, Bs = 4e3, Ks = 32, dt = [
|
|
|
2150
2195
|
"javascript:",
|
|
2151
2196
|
"expression(",
|
|
2152
2197
|
"behavior:"
|
|
2153
|
-
],
|
|
2198
|
+
], gi = /[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/, bi = /^[A-Za-z_][\w-]*$/, Ci = (e) => {
|
|
2154
2199
|
let t = 0;
|
|
2155
2200
|
for (const n of e)
|
|
2156
2201
|
if (n === "{")
|
|
@@ -2158,12 +2203,12 @@ const Fs = 80, Bs = 4e3, Ks = 32, dt = [
|
|
|
2158
2203
|
else if (n === "}" && (t -= 1, t < 0))
|
|
2159
2204
|
return !1;
|
|
2160
2205
|
return t === 0;
|
|
2161
|
-
},
|
|
2162
|
-
if (!e || e.length >
|
|
2206
|
+
}, wi = (e) => {
|
|
2207
|
+
if (!e || e.length > yi || e.includes("@") || e.includes(".") || /\s/.test(e))
|
|
2163
2208
|
return !1;
|
|
2164
2209
|
const t = e.toLowerCase();
|
|
2165
|
-
return
|
|
2166
|
-
},
|
|
2210
|
+
return Dt.some((n) => t.includes(n)) ? !1 : bi.test(e);
|
|
2211
|
+
}, vi = (e) => {
|
|
2167
2212
|
const t = e.trim();
|
|
2168
2213
|
if (t === "")
|
|
2169
2214
|
return !1;
|
|
@@ -2175,7 +2220,7 @@ const Fs = 80, Bs = 4e3, Ks = 32, dt = [
|
|
|
2175
2220
|
return !1;
|
|
2176
2221
|
const s = Number(o[1]);
|
|
2177
2222
|
return s >= 0 && s <= 100;
|
|
2178
|
-
},
|
|
2223
|
+
}, Ai = (e) => {
|
|
2179
2224
|
let t = 0;
|
|
2180
2225
|
const n = e.length;
|
|
2181
2226
|
let o = 0;
|
|
@@ -2185,137 +2230,129 @@ const Fs = 80, Bs = 4e3, Ks = 32, dt = [
|
|
|
2185
2230
|
};
|
|
2186
2231
|
for (s(); t < n; ) {
|
|
2187
2232
|
const i = e.indexOf("{", t);
|
|
2188
|
-
if (i === -1 || !e.slice(t, i).trim().split(",").every((
|
|
2233
|
+
if (i === -1 || !e.slice(t, i).trim().split(",").every((a) => vi(a)))
|
|
2189
2234
|
return !1;
|
|
2190
2235
|
t = i + 1;
|
|
2191
|
-
const
|
|
2192
|
-
if (
|
|
2236
|
+
const r = e.indexOf("}", t);
|
|
2237
|
+
if (r === -1)
|
|
2193
2238
|
return !1;
|
|
2194
|
-
const
|
|
2195
|
-
if (
|
|
2239
|
+
const d = e.slice(t, r);
|
|
2240
|
+
if (d.includes("{") || d.includes("}") || d.includes("@"))
|
|
2196
2241
|
return !1;
|
|
2197
|
-
t =
|
|
2242
|
+
t = r + 1, o += 1, s();
|
|
2198
2243
|
}
|
|
2199
2244
|
return o > 0;
|
|
2200
|
-
},
|
|
2245
|
+
}, Ti = (e) => {
|
|
2201
2246
|
const t = e.trim();
|
|
2202
|
-
if (!t || t.length >
|
|
2247
|
+
if (!t || t.length > mi || gi.test(t) || !Ci(t))
|
|
2203
2248
|
return !1;
|
|
2204
2249
|
const n = t.toLowerCase();
|
|
2205
|
-
return
|
|
2206
|
-
},
|
|
2250
|
+
return Dt.some((o) => n.includes(o)) || t.includes("@") ? !1 : Ai(t);
|
|
2251
|
+
}, xt = (e) => {
|
|
2207
2252
|
if (!e)
|
|
2208
2253
|
return {};
|
|
2209
2254
|
const t = {};
|
|
2210
2255
|
for (const [n, o] of Object.entries(e)) {
|
|
2211
2256
|
const s = n.trim();
|
|
2212
|
-
if (!
|
|
2257
|
+
if (!wi(s) || t[s] !== void 0 || typeof o != "string")
|
|
2213
2258
|
continue;
|
|
2214
2259
|
const i = o.trim();
|
|
2215
|
-
if (
|
|
2260
|
+
if (Ti(i) && (t[s] = i, Object.keys(t).length === hi))
|
|
2216
2261
|
break;
|
|
2217
2262
|
}
|
|
2218
2263
|
return Object.fromEntries(
|
|
2219
2264
|
Object.entries(t).sort(([n], [o]) => n.localeCompare(o))
|
|
2220
2265
|
);
|
|
2221
|
-
},
|
|
2266
|
+
}, Ei = (e) => e.split(`
|
|
2222
2267
|
`).map((t) => ` ${t}`).join(`
|
|
2223
|
-
`),
|
|
2224
|
-
if (!
|
|
2268
|
+
`), Si = (e, t, n) => {
|
|
2269
|
+
if (!Pt(n))
|
|
2225
2270
|
return null;
|
|
2226
|
-
const o =
|
|
2271
|
+
const o = xt(t), s = Object.keys(o);
|
|
2227
2272
|
return s.length === 0 ? null : s.map((i) => `@keyframes ${i} {
|
|
2228
|
-
${
|
|
2273
|
+
${Ei(o[i])}
|
|
2229
2274
|
}`).join(`
|
|
2230
2275
|
|
|
2231
2276
|
`);
|
|
2232
|
-
},
|
|
2277
|
+
}, ki = /* @__PURE__ */ S({
|
|
2233
2278
|
__name: "ProjectCssKeyframesStylesheet",
|
|
2234
2279
|
props: {
|
|
2235
2280
|
publishedKey: {},
|
|
2236
2281
|
keyframes: {}
|
|
2237
2282
|
},
|
|
2238
2283
|
setup(e) {
|
|
2239
|
-
const t = e, n =
|
|
2240
|
-
() =>
|
|
2284
|
+
const t = e, n = m(
|
|
2285
|
+
() => Si(t.publishedKey, t.keyframes)
|
|
2241
2286
|
);
|
|
2242
|
-
return (o, s) => n.value ? (
|
|
2287
|
+
return (o, s) => n.value ? (p(), v(x("style"), {
|
|
2243
2288
|
key: 0,
|
|
2244
|
-
"data-rulecms-project-keyframes": ""
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
R(L(n.value), 1)
|
|
2248
|
-
]),
|
|
2249
|
-
_: 1
|
|
2250
|
-
})) : k("", !0);
|
|
2289
|
+
"data-rulecms-project-keyframes": "",
|
|
2290
|
+
innerHTML: T(_)(n.value)
|
|
2291
|
+
}, null, 8, ["innerHTML"])) : I("", !0);
|
|
2251
2292
|
}
|
|
2252
|
-
}),
|
|
2293
|
+
}), Lt = (e) => e !== !1, Ii = 80, Pi = 2e3, Di = 16, $t = ["url(", "@", "</", "<script", "javascript:", "expression("], xi = /[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/, Li = /^--[A-Za-z_][\w-]*$/, $i = (e) => {
|
|
2253
2294
|
for (const t of e)
|
|
2254
2295
|
if (t === "{" || t === "}")
|
|
2255
2296
|
return !1;
|
|
2256
2297
|
return !0;
|
|
2257
|
-
},
|
|
2258
|
-
if (!e || e.length >
|
|
2298
|
+
}, Ri = (e) => {
|
|
2299
|
+
if (!e || e.length > Ii || e.includes("@") || e.includes(".") || /\s/.test(e))
|
|
2259
2300
|
return !1;
|
|
2260
2301
|
const t = e.toLowerCase();
|
|
2261
|
-
return
|
|
2262
|
-
},
|
|
2302
|
+
return $t.some((n) => t.includes(n)) ? !1 : Li.test(e);
|
|
2303
|
+
}, Mi = (e) => {
|
|
2263
2304
|
const t = e.trim();
|
|
2264
|
-
if (!t || t.length >
|
|
2305
|
+
if (!t || t.length > Pi || xi.test(t) || !$i(t))
|
|
2265
2306
|
return !1;
|
|
2266
2307
|
const n = t.toLowerCase();
|
|
2267
|
-
return
|
|
2268
|
-
},
|
|
2308
|
+
return !$t.some((o) => n.includes(o));
|
|
2309
|
+
}, Rt = (e) => {
|
|
2269
2310
|
if (!e)
|
|
2270
2311
|
return {};
|
|
2271
2312
|
const t = {};
|
|
2272
2313
|
for (const [n, o] of Object.entries(e)) {
|
|
2273
2314
|
const s = n.trim();
|
|
2274
|
-
if (!
|
|
2315
|
+
if (!Ri(s) || t[s] !== void 0 || typeof o != "string")
|
|
2275
2316
|
continue;
|
|
2276
2317
|
const i = o.trim();
|
|
2277
|
-
if (
|
|
2318
|
+
if (Mi(i) && (t[s] = i, Object.keys(t).length === Di))
|
|
2278
2319
|
break;
|
|
2279
2320
|
}
|
|
2280
2321
|
return Object.fromEntries(
|
|
2281
2322
|
Object.entries(t).sort(([n], [o]) => n.localeCompare(o))
|
|
2282
2323
|
);
|
|
2283
|
-
},
|
|
2324
|
+
}, Oi = (e) => e.split(`
|
|
2284
2325
|
`).map((t) => ` ${t}`).join(`
|
|
2285
|
-
`),
|
|
2286
|
-
if (!
|
|
2326
|
+
`), _i = (e, t, n) => {
|
|
2327
|
+
if (!Lt(n))
|
|
2287
2328
|
return null;
|
|
2288
|
-
const o =
|
|
2329
|
+
const o = Rt(t), s = Object.keys(o);
|
|
2289
2330
|
return s.length === 0 ? null : s.map((i) => `@position-try ${i} {
|
|
2290
|
-
${
|
|
2331
|
+
${Oi(o[i])}
|
|
2291
2332
|
}`).join(`
|
|
2292
2333
|
|
|
2293
2334
|
`);
|
|
2294
|
-
},
|
|
2335
|
+
}, ji = /* @__PURE__ */ S({
|
|
2295
2336
|
__name: "ProjectCssPositionTryStylesheet",
|
|
2296
2337
|
props: {
|
|
2297
2338
|
publishedKey: {},
|
|
2298
2339
|
positionTry: {}
|
|
2299
2340
|
},
|
|
2300
2341
|
setup(e) {
|
|
2301
|
-
const t = e, n =
|
|
2302
|
-
() =>
|
|
2342
|
+
const t = e, n = m(
|
|
2343
|
+
() => _i(t.publishedKey, t.positionTry)
|
|
2303
2344
|
);
|
|
2304
|
-
return (o, s) => n.value ? (
|
|
2345
|
+
return (o, s) => n.value ? (p(), v(x("style"), {
|
|
2305
2346
|
key: 0,
|
|
2306
|
-
"data-rulecms-project-position-try": ""
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
R(L(n.value), 1)
|
|
2310
|
-
]),
|
|
2311
|
-
_: 1
|
|
2312
|
-
})) : k("", !0);
|
|
2347
|
+
"data-rulecms-project-position-try": "",
|
|
2348
|
+
innerHTML: T(_)(n.value)
|
|
2349
|
+
}, null, 8, ["innerHTML"])) : I("", !0);
|
|
2313
2350
|
}
|
|
2314
2351
|
});
|
|
2315
|
-
function
|
|
2352
|
+
function Mt(e) {
|
|
2316
2353
|
return e !== !1;
|
|
2317
2354
|
}
|
|
2318
|
-
const
|
|
2355
|
+
const Ni = [
|
|
2319
2356
|
"*",
|
|
2320
2357
|
"<number>",
|
|
2321
2358
|
"<integer>",
|
|
@@ -2327,18 +2364,18 @@ const di = [
|
|
|
2327
2364
|
"<time>",
|
|
2328
2365
|
"<transform-function>",
|
|
2329
2366
|
"<transform-list>"
|
|
2330
|
-
],
|
|
2367
|
+
], Wi = new Set(Ni), Vi = /[{};]/, Fi = 200, Bi = 200, Ki = (e) => typeof e == "string" && Wi.has(e), Hi = (e, t) => t !== "*" && e === "" ? !1 : t === "*" && e === "" ? !0 : !(e.length > Bi || Vi.test(e) || e.includes("url(") || e.includes("@")), Ot = (e) => {
|
|
2331
2368
|
if (!Array.isArray(e))
|
|
2332
2369
|
return [];
|
|
2333
2370
|
const t = [], n = /* @__PURE__ */ new Set();
|
|
2334
2371
|
for (const o of e) {
|
|
2335
|
-
if (!o || typeof o.name != "string" || !
|
|
2372
|
+
if (!o || typeof o.name != "string" || !q(o.name.trim()))
|
|
2336
2373
|
continue;
|
|
2337
2374
|
const s = o.name.trim();
|
|
2338
|
-
if (n.has(s) || t.length >=
|
|
2375
|
+
if (n.has(s) || t.length >= Fi || !Ki(o.syntax) || typeof o.inherits != "boolean")
|
|
2339
2376
|
continue;
|
|
2340
2377
|
const i = typeof o.initialValue == "string" ? o.initialValue.trim() : "";
|
|
2341
|
-
|
|
2378
|
+
Hi(i, o.syntax) && (n.add(s), t.push({
|
|
2342
2379
|
name: s,
|
|
2343
2380
|
syntax: o.syntax,
|
|
2344
2381
|
inherits: o.inherits,
|
|
@@ -2346,7 +2383,7 @@ const di = [
|
|
|
2346
2383
|
}));
|
|
2347
2384
|
}
|
|
2348
2385
|
return t;
|
|
2349
|
-
},
|
|
2386
|
+
}, Ui = (e) => {
|
|
2350
2387
|
const t = [
|
|
2351
2388
|
`@property ${e.name} {`,
|
|
2352
2389
|
` syntax: "${e.syntax}";`,
|
|
@@ -2354,311 +2391,384 @@ const di = [
|
|
|
2354
2391
|
];
|
|
2355
2392
|
return e.initialValue !== "" && t.push(` initial-value: ${e.initialValue};`), t.push("}"), t.join(`
|
|
2356
2393
|
`);
|
|
2357
|
-
},
|
|
2358
|
-
if (!
|
|
2394
|
+
}, zi = (e, t, n) => {
|
|
2395
|
+
if (!Mt(n))
|
|
2359
2396
|
return null;
|
|
2360
|
-
const o =
|
|
2361
|
-
return o.length === 0 ? null : o.map(
|
|
2397
|
+
const o = Ot(t);
|
|
2398
|
+
return o.length === 0 ? null : o.map(Ui).join(`
|
|
2362
2399
|
|
|
2363
2400
|
`);
|
|
2364
|
-
},
|
|
2401
|
+
}, Gi = /* @__PURE__ */ S({
|
|
2365
2402
|
__name: "ProjectCssPropertiesStylesheet",
|
|
2366
2403
|
props: {
|
|
2367
2404
|
publishedKey: {},
|
|
2368
2405
|
cssProperties: {}
|
|
2369
2406
|
},
|
|
2370
2407
|
setup(e) {
|
|
2371
|
-
const t = e, n =
|
|
2372
|
-
() =>
|
|
2408
|
+
const t = e, n = m(
|
|
2409
|
+
() => zi(t.publishedKey, t.cssProperties)
|
|
2373
2410
|
);
|
|
2374
|
-
return (o, s) => n.value ? (
|
|
2411
|
+
return (o, s) => n.value ? (p(), v(x("style"), {
|
|
2375
2412
|
key: 0,
|
|
2376
|
-
"data-rulecms-project-css-properties": ""
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
R(L(n.value), 1)
|
|
2380
|
-
]),
|
|
2381
|
-
_: 1
|
|
2382
|
-
})) : k("", !0);
|
|
2413
|
+
"data-rulecms-project-css-properties": "",
|
|
2414
|
+
innerHTML: T(_)(n.value)
|
|
2415
|
+
}, null, 8, ["innerHTML"])) : I("", !0);
|
|
2383
2416
|
}
|
|
2384
2417
|
});
|
|
2385
|
-
function
|
|
2418
|
+
function _t(e) {
|
|
2386
2419
|
return e !== !1;
|
|
2387
2420
|
}
|
|
2388
|
-
const
|
|
2421
|
+
const jt = (e) => e.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), Yi = /[{};]/, Xi = (e) => {
|
|
2389
2422
|
if (!e)
|
|
2390
2423
|
return {};
|
|
2391
2424
|
const t = {};
|
|
2392
2425
|
for (const [n, o] of Object.entries(e)) {
|
|
2393
|
-
if (!
|
|
2426
|
+
if (!q(n) || typeof o != "string")
|
|
2394
2427
|
continue;
|
|
2395
2428
|
const s = o.trim();
|
|
2396
|
-
s === "" ||
|
|
2429
|
+
s === "" || Yi.test(s) || (t[n.trim()] = s);
|
|
2397
2430
|
}
|
|
2398
2431
|
return t;
|
|
2399
|
-
},
|
|
2400
|
-
if (!
|
|
2432
|
+
}, Ji = (e, t, n) => {
|
|
2433
|
+
if (!_t(n))
|
|
2401
2434
|
return null;
|
|
2402
|
-
const o =
|
|
2435
|
+
const o = Xi(t), s = Object.keys(o);
|
|
2403
2436
|
if (s.length === 0 || !e)
|
|
2404
2437
|
return null;
|
|
2405
|
-
const i = `[data-rulecms-published-key="${
|
|
2438
|
+
const i = `[data-rulecms-published-key="${jt(e)}"] > *`, l = s.sort((r, d) => r.localeCompare(d)).map((r) => ` ${r}: ${o[r]};`).join(`
|
|
2406
2439
|
`);
|
|
2407
2440
|
return `${i} {
|
|
2408
|
-
${
|
|
2441
|
+
${l}
|
|
2409
2442
|
}`;
|
|
2410
2443
|
};
|
|
2411
|
-
function
|
|
2444
|
+
function Nt(e) {
|
|
2412
2445
|
return e !== !1;
|
|
2413
2446
|
}
|
|
2414
|
-
const
|
|
2447
|
+
const qi = 5, Zi = 200, Qi = [
|
|
2415
2448
|
{ kind: "prefers-color-scheme", value: "dark" },
|
|
2416
2449
|
{ kind: "prefers-color-scheme", value: "light" },
|
|
2417
2450
|
{ kind: "html-class", value: "dark" },
|
|
2418
2451
|
{ kind: "data-theme", value: "dark" },
|
|
2419
2452
|
{ kind: "data-theme", value: "light" }
|
|
2420
|
-
],
|
|
2453
|
+
], er = /[{};]/, tr = (e) => {
|
|
2421
2454
|
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
2422
2455
|
return !1;
|
|
2423
2456
|
const t = e;
|
|
2424
|
-
return
|
|
2457
|
+
return Qi.some(
|
|
2425
2458
|
(n) => n.kind === t.kind && n.value === t.value
|
|
2426
2459
|
);
|
|
2427
|
-
},
|
|
2460
|
+
}, nr = (e) => {
|
|
2428
2461
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
2429
2462
|
return {};
|
|
2430
2463
|
const t = {};
|
|
2431
2464
|
for (const [n, o] of Object.entries(e)) {
|
|
2432
|
-
if (!
|
|
2465
|
+
if (!q(n) || typeof o != "string")
|
|
2433
2466
|
continue;
|
|
2434
2467
|
const s = o.trim();
|
|
2435
|
-
s === "" ||
|
|
2468
|
+
s === "" || er.test(s) || s.includes("url(") || s.includes("@") || (t[n.trim()] = s);
|
|
2436
2469
|
}
|
|
2437
2470
|
return Object.fromEntries(
|
|
2438
2471
|
Object.entries(t).sort(([n], [o]) => n.localeCompare(o))
|
|
2439
2472
|
);
|
|
2440
|
-
},
|
|
2473
|
+
}, Wt = (e) => {
|
|
2441
2474
|
if (!Array.isArray(e))
|
|
2442
2475
|
return [];
|
|
2443
2476
|
const t = [], n = /* @__PURE__ */ new Set();
|
|
2444
2477
|
let o = 0;
|
|
2445
2478
|
for (const s of e) {
|
|
2446
|
-
if (!s || !
|
|
2479
|
+
if (!s || !tr(s.condition))
|
|
2447
2480
|
continue;
|
|
2448
2481
|
const i = `${s.condition.kind}:${s.condition.value}`;
|
|
2449
2482
|
if (n.has(i))
|
|
2450
2483
|
continue;
|
|
2451
|
-
const
|
|
2452
|
-
if (!(Object.keys(
|
|
2484
|
+
const l = nr(s.variables), r = o + Object.keys(l).length;
|
|
2485
|
+
if (!(Object.keys(l).length === 0 || r > Zi) && (n.add(i), o = r, t.push({ condition: s.condition, variables: l }), t.length === qi))
|
|
2453
2486
|
break;
|
|
2454
2487
|
}
|
|
2455
2488
|
return t;
|
|
2456
|
-
},
|
|
2489
|
+
}, or = (e, t) => {
|
|
2457
2490
|
const n = Object.entries(e).map(([o, s]) => ` ${o}: ${s};`);
|
|
2458
2491
|
return `${t} {
|
|
2459
2492
|
${n.join(`
|
|
2460
2493
|
`)}
|
|
2461
2494
|
}`;
|
|
2462
|
-
},
|
|
2495
|
+
}, sr = (e) => e.split(`
|
|
2463
2496
|
`).map((t) => ` ${t}`).join(`
|
|
2464
|
-
`),
|
|
2465
|
-
const n =
|
|
2497
|
+
`), ir = (e, t) => {
|
|
2498
|
+
const n = or(e.variables, t), { kind: o, value: s } = e.condition;
|
|
2466
2499
|
return o === "prefers-color-scheme" ? `@media (prefers-color-scheme: ${s}) {
|
|
2467
|
-
${
|
|
2500
|
+
${sr(n)}
|
|
2468
2501
|
}` : o === "html-class" ? `html.${s} ${n}` : `[data-theme="${s}"] ${n}`;
|
|
2469
|
-
},
|
|
2470
|
-
if (!
|
|
2502
|
+
}, rr = (e, t, n) => {
|
|
2503
|
+
if (!Nt(n) || !e)
|
|
2471
2504
|
return null;
|
|
2472
|
-
const o =
|
|
2505
|
+
const o = Wt(t);
|
|
2473
2506
|
if (o.length === 0)
|
|
2474
2507
|
return null;
|
|
2475
|
-
const s = `[data-rulecms-published-key="${
|
|
2476
|
-
return o.map((i) =>
|
|
2508
|
+
const s = `[data-rulecms-published-key="${jt(e)}"] > *`;
|
|
2509
|
+
return o.map((i) => ir(i, s)).join(`
|
|
2477
2510
|
|
|
2478
2511
|
`);
|
|
2479
|
-
},
|
|
2512
|
+
}, lr = /* @__PURE__ */ S({
|
|
2480
2513
|
__name: "ProjectCssThemesStylesheet",
|
|
2481
2514
|
props: {
|
|
2482
2515
|
publishedKey: {},
|
|
2483
2516
|
themes: {}
|
|
2484
2517
|
},
|
|
2485
2518
|
setup(e) {
|
|
2486
|
-
const t = e, n =
|
|
2487
|
-
() =>
|
|
2519
|
+
const t = e, n = m(
|
|
2520
|
+
() => rr(t.publishedKey, t.themes)
|
|
2488
2521
|
);
|
|
2489
|
-
return (o, s) => n.value ? (
|
|
2522
|
+
return (o, s) => n.value ? (p(), v(x("style"), {
|
|
2490
2523
|
key: 0,
|
|
2491
|
-
"data-rulecms-project-themes": ""
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
R(L(n.value), 1)
|
|
2495
|
-
]),
|
|
2496
|
-
_: 1
|
|
2497
|
-
})) : k("", !0);
|
|
2524
|
+
"data-rulecms-project-themes": "",
|
|
2525
|
+
innerHTML: T(_)(n.value)
|
|
2526
|
+
}, null, 8, ["innerHTML"])) : I("", !0);
|
|
2498
2527
|
}
|
|
2499
|
-
}),
|
|
2528
|
+
}), cr = /* @__PURE__ */ S({
|
|
2500
2529
|
__name: "ProjectCssVariablesStylesheet",
|
|
2501
2530
|
props: {
|
|
2502
2531
|
publishedKey: {},
|
|
2503
2532
|
variables: {}
|
|
2504
2533
|
},
|
|
2505
2534
|
setup(e) {
|
|
2506
|
-
const t = e, n =
|
|
2507
|
-
() =>
|
|
2535
|
+
const t = e, n = m(
|
|
2536
|
+
() => Ji(t.publishedKey, t.variables)
|
|
2508
2537
|
);
|
|
2509
|
-
return (o, s) => n.value ? (
|
|
2538
|
+
return (o, s) => n.value ? (p(), v(x("style"), {
|
|
2510
2539
|
key: 0,
|
|
2511
|
-
"data-rulecms-project-css-variables": ""
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
R(L(n.value), 1)
|
|
2515
|
-
]),
|
|
2516
|
-
_: 1
|
|
2517
|
-
})) : k("", !0);
|
|
2540
|
+
"data-rulecms-project-css-variables": "",
|
|
2541
|
+
innerHTML: T(_)(n.value)
|
|
2542
|
+
}, null, 8, ["innerHTML"])) : I("", !0);
|
|
2518
2543
|
}
|
|
2519
2544
|
});
|
|
2520
|
-
function
|
|
2545
|
+
function Vt(e) {
|
|
2521
2546
|
return e !== !1;
|
|
2522
2547
|
}
|
|
2523
|
-
const
|
|
2548
|
+
const ar = [
|
|
2524
2549
|
"light",
|
|
2525
2550
|
"dark",
|
|
2526
2551
|
"light dark"
|
|
2527
|
-
],
|
|
2552
|
+
], ur = ["auto", "thin", "none"], dr = new Set(ar), pr = new Set(ur), fr = /[{};]|url\(|@/i, yr = (e) => typeof e == "string" && e.trim() !== "" && e.trim().length <= 400 && !fr.test(e), ce = (e) => yr(e) ? e.trim() : void 0, Ft = (e) => {
|
|
2528
2553
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
2529
2554
|
return null;
|
|
2530
|
-
const t =
|
|
2531
|
-
...typeof e.colorScheme == "string" &&
|
|
2555
|
+
const t = ce(e.selectionBackground), n = ce(e.selectionColor), o = ce(e.caretColor), s = ce(e.scrollbarColor), i = {
|
|
2556
|
+
...typeof e.colorScheme == "string" && dr.has(e.colorScheme) ? { colorScheme: e.colorScheme } : {},
|
|
2532
2557
|
...t ? { selectionBackground: t } : {},
|
|
2533
2558
|
...n ? { selectionColor: n } : {},
|
|
2534
2559
|
...o ? { caretColor: o } : {},
|
|
2535
2560
|
...s ? { scrollbarColor: s } : {},
|
|
2536
|
-
...typeof e.scrollbarWidth == "string" &&
|
|
2561
|
+
...typeof e.scrollbarWidth == "string" && pr.has(e.scrollbarWidth) ? { scrollbarWidth: e.scrollbarWidth } : {}
|
|
2537
2562
|
};
|
|
2538
2563
|
return Object.keys(i).length > 0 ? i : null;
|
|
2539
|
-
},
|
|
2540
|
-
if (!
|
|
2564
|
+
}, mr = (e, t, n) => {
|
|
2565
|
+
if (!Vt(n) || !e)
|
|
2541
2566
|
return null;
|
|
2542
|
-
const o =
|
|
2567
|
+
const o = Ft(t);
|
|
2543
2568
|
if (!o)
|
|
2544
2569
|
return null;
|
|
2545
|
-
const s = `[data-rulecms-published-key="${
|
|
2570
|
+
const s = `[data-rulecms-published-key="${It(e)}"]`, i = [];
|
|
2546
2571
|
o.colorScheme && i.push(` color-scheme: ${o.colorScheme};`), o.caretColor && i.push(` caret-color: ${o.caretColor};`), o.scrollbarWidth && i.push(` scrollbar-width: ${o.scrollbarWidth};`), o.scrollbarColor && i.push(` scrollbar-color: ${o.scrollbarColor};`);
|
|
2547
|
-
const r = [];
|
|
2548
|
-
o.selectionBackground && r.push(` background: ${o.selectionBackground};`), o.selectionColor && r.push(` color: ${o.selectionColor};`);
|
|
2549
2572
|
const l = [];
|
|
2550
|
-
|
|
2573
|
+
o.selectionBackground && l.push(` background: ${o.selectionBackground};`), o.selectionColor && l.push(` color: ${o.selectionColor};`);
|
|
2574
|
+
const r = [];
|
|
2575
|
+
return i.length > 0 && r.push(`${s} > * {
|
|
2551
2576
|
${i.join(`
|
|
2552
2577
|
`)}
|
|
2553
|
-
}`),
|
|
2554
|
-
${
|
|
2578
|
+
}`), l.length > 0 && r.push(`${s} > * ::selection {
|
|
2579
|
+
${l.join(`
|
|
2555
2580
|
`)}
|
|
2556
|
-
}`),
|
|
2581
|
+
}`), r.length > 0 ? r.join(`
|
|
2557
2582
|
`) : null;
|
|
2558
|
-
},
|
|
2583
|
+
}, hr = /* @__PURE__ */ S({
|
|
2559
2584
|
__name: "ProjectCssWidgetChromeStylesheet",
|
|
2560
2585
|
props: {
|
|
2561
2586
|
publishedKey: {},
|
|
2562
2587
|
widgetChrome: {}
|
|
2563
2588
|
},
|
|
2564
2589
|
setup(e) {
|
|
2565
|
-
const t = e, n =
|
|
2566
|
-
() =>
|
|
2590
|
+
const t = e, n = m(
|
|
2591
|
+
() => mr(t.publishedKey, t.widgetChrome)
|
|
2567
2592
|
);
|
|
2568
|
-
return (o, s) => n.value ? (
|
|
2593
|
+
return (o, s) => n.value ? (p(), v(x("style"), {
|
|
2569
2594
|
key: 0,
|
|
2570
|
-
"data-rulecms-project-widget-chrome": ""
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
R(L(n.value), 1)
|
|
2574
|
-
]),
|
|
2575
|
-
_: 1
|
|
2576
|
-
})) : k("", !0);
|
|
2595
|
+
"data-rulecms-project-widget-chrome": "",
|
|
2596
|
+
innerHTML: T(_)(n.value)
|
|
2597
|
+
}, null, 8, ["innerHTML"])) : I("", !0);
|
|
2577
2598
|
}
|
|
2578
2599
|
});
|
|
2579
|
-
function
|
|
2600
|
+
function gr(e) {
|
|
2580
2601
|
return e !== !1;
|
|
2581
2602
|
}
|
|
2582
|
-
function
|
|
2603
|
+
function br(e) {
|
|
2583
2604
|
const t = {};
|
|
2584
2605
|
return Object.entries(e).forEach(([n, o]) => {
|
|
2585
2606
|
const s = { ...o };
|
|
2586
2607
|
if (s.itemList)
|
|
2587
2608
|
try {
|
|
2588
2609
|
s.collectionRows = typeof s.itemList == "string" ? JSON.parse(s.itemList) : s.itemList;
|
|
2589
|
-
} catch (
|
|
2590
|
-
console.error(`Failed to parse itemList for collection ${n}:`,
|
|
2610
|
+
} catch (l) {
|
|
2611
|
+
console.error(`Failed to parse itemList for collection ${n}:`, l), s.collectionRows = { rows: [] };
|
|
2591
2612
|
}
|
|
2592
2613
|
let i = `${s.name}$${n}`;
|
|
2593
2614
|
s.parentId && (i = `${i}@${s.parentId}`), t[i] = s;
|
|
2594
2615
|
}), t;
|
|
2595
2616
|
}
|
|
2596
|
-
function
|
|
2617
|
+
function Cr(e) {
|
|
2597
2618
|
return typeof e.itemList == "string" ? JSON.parse(e.itemList) : e.itemList;
|
|
2598
2619
|
}
|
|
2599
|
-
function
|
|
2600
|
-
const t =
|
|
2620
|
+
function je(e) {
|
|
2621
|
+
const t = fe(e.fontFaces), n = xt(e.keyframes), o = Wt(e.themes), s = Ot(e.cssProperties), i = Ft(e.widgetChrome), l = Rt(e.positionTry), r = gr(e.includeClassLayer) && kt(e.classLayer) ? e.classLayer : void 0;
|
|
2601
2622
|
return {
|
|
2602
|
-
displayItemList:
|
|
2603
|
-
widgetCollections:
|
|
2623
|
+
displayItemList: Cr(e.widget),
|
|
2624
|
+
widgetCollections: br(e.childCollections),
|
|
2604
2625
|
...e.libraries ? { libraries: e.libraries } : {},
|
|
2605
|
-
...
|
|
2606
|
-
...
|
|
2607
|
-
...
|
|
2608
|
-
...
|
|
2609
|
-
...
|
|
2610
|
-
...
|
|
2611
|
-
...
|
|
2612
|
-
...
|
|
2613
|
-
...
|
|
2626
|
+
..._t(e.includeCssVariables) && e.cssVariables && Object.keys(e.cssVariables).length > 0 ? { cssVariables: e.cssVariables } : {},
|
|
2627
|
+
...St(e.includeClassDefinitions) && e.classDefinitions && Object.keys(e.classDefinitions).length > 0 ? { classDefinitions: e.classDefinitions } : {},
|
|
2628
|
+
..._e(e.includeFontFaces) && t.length > 0 ? { fontFaces: t } : {},
|
|
2629
|
+
...Pt(e.includeKeyframes) && Object.keys(n).length > 0 ? { keyframes: n } : {},
|
|
2630
|
+
...Nt(e.includeThemes) && o.length > 0 ? { themes: o } : {},
|
|
2631
|
+
...Mt(e.includeCssProperties) && s.length > 0 ? { cssProperties: s } : {},
|
|
2632
|
+
...Vt(e.includeWidgetChrome) && i ? { widgetChrome: i } : {},
|
|
2633
|
+
...r ? { classLayer: r } : {},
|
|
2634
|
+
...Lt(e.includePositionTry) && Object.keys(l).length > 0 ? { positionTry: l } : {}
|
|
2614
2635
|
};
|
|
2615
2636
|
}
|
|
2616
|
-
function
|
|
2617
|
-
const t = e.registry ??
|
|
2637
|
+
function wr(e) {
|
|
2638
|
+
const t = e.registry ?? de(), n = Pe({
|
|
2618
2639
|
displayItemList: e.displayItemList,
|
|
2619
2640
|
widgetCollections: e.widgetCollections
|
|
2620
2641
|
});
|
|
2621
2642
|
return t.resolveSync({ registrations: e.libraries, referenced: n });
|
|
2622
2643
|
}
|
|
2623
|
-
function
|
|
2624
|
-
const t = e.registry ??
|
|
2644
|
+
function vr(e) {
|
|
2645
|
+
const t = e.registry ?? de(), n = Pe({
|
|
2625
2646
|
displayItemList: e.displayItemList,
|
|
2626
2647
|
widgetCollections: e.widgetCollections
|
|
2627
2648
|
});
|
|
2628
2649
|
return t.resolve({ registrations: e.libraries, referenced: n });
|
|
2629
2650
|
}
|
|
2630
|
-
|
|
2651
|
+
function Ar(e) {
|
|
2652
|
+
const t = e.lastIndexOf(Ae);
|
|
2653
|
+
return t === -1 ? e : e.slice(t + Ae.length);
|
|
2654
|
+
}
|
|
2655
|
+
const Tr = "text/plain";
|
|
2656
|
+
function Er({
|
|
2657
|
+
token: e,
|
|
2658
|
+
rulesetPublishedKey: t,
|
|
2659
|
+
params: n
|
|
2660
|
+
}) {
|
|
2661
|
+
return F(e) ? {
|
|
2662
|
+
token: e,
|
|
2663
|
+
rulesetKey: Ar(t),
|
|
2664
|
+
...n ? { params: n } : {}
|
|
2665
|
+
} : {
|
|
2666
|
+
token: e,
|
|
2667
|
+
rulesetPublishedKey: t,
|
|
2668
|
+
...n ? { params: n } : {},
|
|
2669
|
+
mode: "payload"
|
|
2670
|
+
};
|
|
2671
|
+
}
|
|
2672
|
+
function Bt({
|
|
2673
|
+
contentType: e = Tr,
|
|
2674
|
+
...t
|
|
2675
|
+
}) {
|
|
2676
|
+
return {
|
|
2677
|
+
method: "POST",
|
|
2678
|
+
headers: { "Content-Type": e },
|
|
2679
|
+
body: JSON.stringify(Er(t))
|
|
2680
|
+
};
|
|
2681
|
+
}
|
|
2682
|
+
const qe = "rulecms_anon_id";
|
|
2683
|
+
function Ze() {
|
|
2684
|
+
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e) => {
|
|
2685
|
+
const t = Math.random() * 16 | 0;
|
|
2686
|
+
return (e === "x" ? t : t & 3 | 8).toString(16);
|
|
2687
|
+
});
|
|
2688
|
+
}
|
|
2689
|
+
function Sr() {
|
|
2690
|
+
if (!(typeof window > "u"))
|
|
2691
|
+
try {
|
|
2692
|
+
const e = window.localStorage.getItem(qe);
|
|
2693
|
+
if (e)
|
|
2694
|
+
return e;
|
|
2695
|
+
const t = Ze();
|
|
2696
|
+
return window.localStorage.setItem(qe, t), t;
|
|
2697
|
+
} catch {
|
|
2698
|
+
return Ze();
|
|
2699
|
+
}
|
|
2700
|
+
}
|
|
2701
|
+
function Kt(e) {
|
|
2702
|
+
return e >= 500;
|
|
2703
|
+
}
|
|
2704
|
+
function kr(e) {
|
|
2705
|
+
if (!(e != null && e.success) || !e.data)
|
|
2706
|
+
return null;
|
|
2707
|
+
const { selection: t, ...n } = e.data;
|
|
2708
|
+
return { raw: n, selection: t };
|
|
2709
|
+
}
|
|
2710
|
+
function Ir(e, t) {
|
|
2711
|
+
if (!(e != null && e.resolution) || !e.widget)
|
|
2712
|
+
return null;
|
|
2713
|
+
const { resolution: n, ...o } = e, s = {
|
|
2714
|
+
rulesetPublishedKey: t,
|
|
2715
|
+
outcome: n.outcome,
|
|
2716
|
+
ruleId: n.ruleId ?? null,
|
|
2717
|
+
variantId: n.variantId ?? null,
|
|
2718
|
+
widgetKey: n.widgetKey,
|
|
2719
|
+
widgetPublishedKey: n.widgetPublishedKey
|
|
2720
|
+
};
|
|
2721
|
+
return { raw: o, selection: s };
|
|
2722
|
+
}
|
|
2723
|
+
function Ht({
|
|
2724
|
+
token: e,
|
|
2725
|
+
rulesetPublishedKey: t,
|
|
2726
|
+
body: n
|
|
2727
|
+
}) {
|
|
2728
|
+
return F(e) ? Ir(n, t) : kr(n);
|
|
2729
|
+
}
|
|
2730
|
+
function Pr(e) {
|
|
2731
|
+
return JSON.stringify(e, (t, n) => {
|
|
2732
|
+
if (n === null || typeof n != "object" || Array.isArray(n))
|
|
2733
|
+
return n;
|
|
2734
|
+
const o = {};
|
|
2735
|
+
for (const s of Object.keys(n).sort())
|
|
2736
|
+
o[s] = n[s];
|
|
2737
|
+
return o;
|
|
2738
|
+
});
|
|
2739
|
+
}
|
|
2740
|
+
const Dr = {
|
|
2631
2741
|
display: "flex",
|
|
2632
2742
|
justifyContent: "center",
|
|
2633
2743
|
alignItems: "center",
|
|
2634
2744
|
padding: "3rem",
|
|
2635
2745
|
color: "#e2e8f0"
|
|
2636
|
-
},
|
|
2746
|
+
}, xr = {
|
|
2637
2747
|
display: "flex",
|
|
2638
2748
|
alignItems: "center",
|
|
2639
2749
|
gap: "1rem"
|
|
2640
|
-
},
|
|
2750
|
+
}, Lr = {
|
|
2641
2751
|
width: "40px",
|
|
2642
2752
|
height: "40px",
|
|
2643
2753
|
border: "4px solid #4a5568",
|
|
2644
2754
|
borderTopColor: "#63b3ed",
|
|
2645
2755
|
borderRadius: "50%",
|
|
2646
2756
|
animation: "spin 1s linear infinite"
|
|
2647
|
-
},
|
|
2757
|
+
}, Qe = {
|
|
2648
2758
|
padding: "1.5rem",
|
|
2649
2759
|
backgroundColor: "#742a2a",
|
|
2650
2760
|
border: "1px solid #9b2c2c",
|
|
2651
2761
|
borderRadius: "8px",
|
|
2652
2762
|
color: "#fed7d7"
|
|
2653
|
-
},
|
|
2763
|
+
}, et = {
|
|
2654
2764
|
fontSize: "16px",
|
|
2655
2765
|
fontWeight: "600",
|
|
2656
2766
|
marginBottom: "0.5rem",
|
|
2657
2767
|
color: "#feb2b2"
|
|
2658
|
-
},
|
|
2768
|
+
}, tt = {
|
|
2659
2769
|
fontSize: "14px",
|
|
2660
2770
|
color: "#fed7d7"
|
|
2661
|
-
},
|
|
2771
|
+
}, $r = `
|
|
2662
2772
|
@keyframes spin {
|
|
2663
2773
|
from {
|
|
2664
2774
|
transform: rotate(0deg);
|
|
@@ -2667,109 +2777,176 @@ const Xi = {
|
|
|
2667
2777
|
transform: rotate(360deg);
|
|
2668
2778
|
}
|
|
2669
2779
|
}
|
|
2670
|
-
`,
|
|
2780
|
+
`, Qr = "data-rulecms-published-key", Rr = ["data-rulecms-published-key"], el = /* @__PURE__ */ S({
|
|
2671
2781
|
__name: "RuleCMSWidget",
|
|
2672
2782
|
props: {
|
|
2673
2783
|
publishedKey: {},
|
|
2784
|
+
rulesetPublishedKey: {},
|
|
2785
|
+
params: {},
|
|
2786
|
+
anonymousId: { type: [String, Boolean], default: void 0 },
|
|
2787
|
+
fallbackPublishedKey: {},
|
|
2788
|
+
contentType: {},
|
|
2674
2789
|
token: {},
|
|
2675
2790
|
endpoint: {},
|
|
2676
2791
|
mode: { default: "client-fetch" },
|
|
2677
2792
|
initialData: {},
|
|
2678
2793
|
libraries: {},
|
|
2679
2794
|
componentProps: {},
|
|
2680
|
-
mounts: {}
|
|
2795
|
+
mounts: {},
|
|
2796
|
+
placeholderValues: {},
|
|
2797
|
+
onSelection: {}
|
|
2681
2798
|
},
|
|
2682
2799
|
setup(e) {
|
|
2683
|
-
const t = e, n =
|
|
2684
|
-
sourceComponents:
|
|
2685
|
-
}));
|
|
2686
|
-
let
|
|
2687
|
-
function
|
|
2800
|
+
const t = e, n = tn(ft, null), o = H(!0), s = H(null), i = H(null), l = H(null), r = H(null), d = H(""), a = m(() => t.mode === "pre-fetched"), c = m(() => ({
|
|
2801
|
+
sourceComponents: l.value ?? void 0
|
|
2802
|
+
})), f = m(() => t.publishedKey || d.value);
|
|
2803
|
+
let h = null, u = null, y = !1, b = 0;
|
|
2804
|
+
function C() {
|
|
2688
2805
|
if (!i.value) {
|
|
2689
|
-
|
|
2806
|
+
l.value = null;
|
|
2690
2807
|
return;
|
|
2691
2808
|
}
|
|
2692
|
-
const
|
|
2809
|
+
const P = t.libraries ?? (n == null ? void 0 : n.libraries), L = n == null ? void 0 : n.libraryRegistry, W = wr({
|
|
2693
2810
|
displayItemList: i.value.displayItemList,
|
|
2694
2811
|
widgetCollections: i.value.widgetCollections,
|
|
2695
|
-
libraries:
|
|
2696
|
-
registry:
|
|
2812
|
+
libraries: P,
|
|
2813
|
+
registry: L
|
|
2697
2814
|
});
|
|
2698
|
-
if (
|
|
2699
|
-
|
|
2815
|
+
if (W) {
|
|
2816
|
+
l.value = W;
|
|
2700
2817
|
return;
|
|
2701
2818
|
}
|
|
2702
|
-
|
|
2819
|
+
vr({
|
|
2703
2820
|
displayItemList: i.value.displayItemList,
|
|
2704
2821
|
widgetCollections: i.value.widgetCollections,
|
|
2705
|
-
libraries:
|
|
2706
|
-
registry:
|
|
2707
|
-
}).then((
|
|
2708
|
-
|
|
2822
|
+
libraries: P,
|
|
2823
|
+
registry: L
|
|
2824
|
+
}).then((M) => {
|
|
2825
|
+
l.value = M;
|
|
2709
2826
|
});
|
|
2710
2827
|
}
|
|
2711
|
-
function
|
|
2712
|
-
i.value &&
|
|
2828
|
+
function g() {
|
|
2829
|
+
i.value && rs({
|
|
2713
2830
|
componentProps: t.componentProps,
|
|
2714
2831
|
displayItemList: i.value.displayItemList,
|
|
2715
2832
|
widgetCollections: i.value.widgetCollections,
|
|
2716
|
-
publishedKey:
|
|
2833
|
+
publishedKey: f.value
|
|
2717
2834
|
});
|
|
2718
2835
|
}
|
|
2719
|
-
function
|
|
2720
|
-
if (
|
|
2836
|
+
function Z() {
|
|
2837
|
+
if (y || typeof document > "u")
|
|
2721
2838
|
return;
|
|
2722
|
-
const
|
|
2723
|
-
if (!document.getElementById(
|
|
2724
|
-
const
|
|
2725
|
-
|
|
2839
|
+
const P = "rulecms-widget-spinner-styles";
|
|
2840
|
+
if (!document.getElementById(P)) {
|
|
2841
|
+
const L = document.createElement("style");
|
|
2842
|
+
L.id = P, L.textContent = $r, document.head.appendChild(L);
|
|
2726
2843
|
}
|
|
2727
|
-
|
|
2844
|
+
y = !0;
|
|
2728
2845
|
}
|
|
2729
|
-
function
|
|
2730
|
-
const
|
|
2731
|
-
if (!t.publishedKey || !
|
|
2732
|
-
s.value =
|
|
2846
|
+
function ye() {
|
|
2847
|
+
const P = t.token ?? (n == null ? void 0 : n.token), L = t.endpoint ?? (n == null ? void 0 : n.endpoint), W = F(P), M = t.rulesetPublishedKey;
|
|
2848
|
+
if (!t.publishedKey && !M || !P) {
|
|
2849
|
+
!t.publishedKey && !M ? s.value = M !== void 0 ? W ? "Ruleset key is required" : "Ruleset published key is required" : W ? "Widget key is required" : "Published key is required" : s.value = "Token is required. Provide it either directly as a prop (`token`) or via RuleCMSWidgetProvider.", i.value = null, o.value = !1;
|
|
2733
2850
|
return;
|
|
2734
2851
|
}
|
|
2735
|
-
const
|
|
2736
|
-
|
|
2737
|
-
|
|
2852
|
+
const G = Pr(t.params), ee = JSON.stringify({
|
|
2853
|
+
publishedKey: t.publishedKey,
|
|
2854
|
+
rulesetPublishedKey: M,
|
|
2855
|
+
token: P,
|
|
2856
|
+
endpoint: L,
|
|
2857
|
+
paramsKey: G,
|
|
2858
|
+
anonymousId: t.anonymousId,
|
|
2859
|
+
fallbackPublishedKey: t.fallbackPublishedKey,
|
|
2860
|
+
contentType: t.contentType
|
|
2861
|
+
});
|
|
2862
|
+
if (u === ee && i.value) {
|
|
2863
|
+
o.value = !1, C();
|
|
2738
2864
|
return;
|
|
2739
2865
|
}
|
|
2740
|
-
|
|
2741
|
-
const
|
|
2742
|
-
|
|
2743
|
-
const
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2866
|
+
h == null || h.abort(), h = new AbortController();
|
|
2867
|
+
const te = h.signal;
|
|
2868
|
+
u = ee, o.value = !0, s.value = null;
|
|
2869
|
+
const ie = ++b, ne = async (A) => (await A.json().catch(() => ({ error: "Unknown error" }))).error || `Request failed with status ${A.status}`, Y = async (A) => {
|
|
2870
|
+
const O = at({ publishedKey: A, token: P, endpoint: L }), j = await fetch(O, {
|
|
2871
|
+
method: "GET",
|
|
2872
|
+
...W ? { cache: "no-store" } : {},
|
|
2873
|
+
signal: te
|
|
2874
|
+
});
|
|
2875
|
+
if (!j.ok)
|
|
2876
|
+
throw new Q(await ne(j));
|
|
2877
|
+
const $ = await j.json();
|
|
2878
|
+
if (!$.success)
|
|
2879
|
+
throw new Q("Failed to fetch widget data");
|
|
2880
|
+
return $.data;
|
|
2881
|
+
};
|
|
2882
|
+
(M ? (async () => {
|
|
2883
|
+
const A = G ? JSON.parse(G) : {};
|
|
2884
|
+
if (t.anonymousId !== !1) {
|
|
2885
|
+
if (typeof t.anonymousId == "string")
|
|
2886
|
+
A.anonId = A.anonId ?? t.anonymousId;
|
|
2887
|
+
else if (A.anonId == null) {
|
|
2888
|
+
const $ = Sr();
|
|
2889
|
+
$ && (A.anonId = $);
|
|
2890
|
+
}
|
|
2891
|
+
}
|
|
2892
|
+
let O;
|
|
2893
|
+
try {
|
|
2894
|
+
O = await fetch(ut({ token: P, endpoint: L }), {
|
|
2895
|
+
...Bt({
|
|
2896
|
+
token: P,
|
|
2897
|
+
rulesetPublishedKey: M,
|
|
2898
|
+
params: A,
|
|
2899
|
+
contentType: t.contentType
|
|
2900
|
+
}),
|
|
2901
|
+
signal: te
|
|
2902
|
+
});
|
|
2903
|
+
} catch ($) {
|
|
2904
|
+
if ($ instanceof DOMException && $.name === "AbortError")
|
|
2905
|
+
throw $;
|
|
2906
|
+
if (t.fallbackPublishedKey)
|
|
2907
|
+
return { raw: await Y(t.fallbackPublishedKey), selection: null };
|
|
2908
|
+
throw $;
|
|
2756
2909
|
}
|
|
2757
|
-
|
|
2758
|
-
|
|
2910
|
+
if (!O.ok) {
|
|
2911
|
+
if (t.fallbackPublishedKey && Kt(O.status))
|
|
2912
|
+
return { raw: await Y(t.fallbackPublishedKey), selection: null };
|
|
2913
|
+
throw new Q(await ne(O));
|
|
2914
|
+
}
|
|
2915
|
+
const j = Ht({
|
|
2916
|
+
token: P,
|
|
2917
|
+
rulesetPublishedKey: M,
|
|
2918
|
+
body: await O.json()
|
|
2919
|
+
});
|
|
2920
|
+
if (!j)
|
|
2921
|
+
throw new Q("Failed to fetch widget data");
|
|
2922
|
+
return { raw: j.raw, selection: j.selection };
|
|
2923
|
+
})() : Y(t.publishedKey).then((A) => ({
|
|
2924
|
+
raw: A,
|
|
2925
|
+
selection: null
|
|
2926
|
+
}))).then(({ raw: A, selection: O }) => {
|
|
2927
|
+
var j, $;
|
|
2928
|
+
i.value = je(A), d.value = ((j = A.widget) == null ? void 0 : j.publishedKey) ?? "", r.value = O, s.value = null, C(), g(), O && (($ = t.onSelection) == null || $.call(t, O));
|
|
2929
|
+
}).catch((A) => {
|
|
2930
|
+
A instanceof DOMException && A.name === "AbortError" || (console.error("Error fetching widget:", A), s.value = A instanceof Q ? A.message : "Failed to fetch widget", i.value = null, r.value = null);
|
|
2759
2931
|
}).finally(() => {
|
|
2760
|
-
o.value = !1;
|
|
2932
|
+
b === ie && (o.value = !1);
|
|
2761
2933
|
});
|
|
2762
2934
|
}
|
|
2763
|
-
function
|
|
2935
|
+
function Gt() {
|
|
2764
2936
|
if (t.mode === "pre-fetched") {
|
|
2765
|
-
i.value = t.initialData ?? null, o.value = !1, s.value = null,
|
|
2937
|
+
i.value = t.initialData ?? null, o.value = !1, s.value = null, C(), g();
|
|
2766
2938
|
return;
|
|
2767
2939
|
}
|
|
2768
|
-
|
|
2940
|
+
Z(), ye();
|
|
2769
2941
|
}
|
|
2770
|
-
|
|
2942
|
+
ot(
|
|
2771
2943
|
() => [
|
|
2772
2944
|
t.publishedKey,
|
|
2945
|
+
t.rulesetPublishedKey,
|
|
2946
|
+
t.params,
|
|
2947
|
+
t.anonymousId,
|
|
2948
|
+
t.fallbackPublishedKey,
|
|
2949
|
+
t.contentType,
|
|
2773
2950
|
t.token,
|
|
2774
2951
|
t.endpoint,
|
|
2775
2952
|
t.mode,
|
|
@@ -2778,90 +2955,97 @@ const Xi = {
|
|
|
2778
2955
|
t.componentProps
|
|
2779
2956
|
],
|
|
2780
2957
|
() => {
|
|
2781
|
-
|
|
2958
|
+
Gt();
|
|
2782
2959
|
},
|
|
2783
2960
|
{ immediate: !0 }
|
|
2784
|
-
),
|
|
2785
|
-
|
|
2786
|
-
})
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
"
|
|
2961
|
+
), st(() => {
|
|
2962
|
+
h == null || h.abort();
|
|
2963
|
+
});
|
|
2964
|
+
class Q extends Error {
|
|
2965
|
+
constructor(L) {
|
|
2966
|
+
super(L), this.name = "FetchWidgetMessage";
|
|
2967
|
+
}
|
|
2968
|
+
}
|
|
2969
|
+
return (P, L) => {
|
|
2970
|
+
var W, M, G, ee, te, ie, ne, Y, me;
|
|
2971
|
+
return p(), w("span", {
|
|
2972
|
+
"data-rulecms-published-key": f.value,
|
|
2790
2973
|
style: { display: "contents" }
|
|
2791
2974
|
}, [
|
|
2792
|
-
|
|
2793
|
-
"published-key":
|
|
2794
|
-
fonts: (
|
|
2975
|
+
R(fi, {
|
|
2976
|
+
"published-key": f.value,
|
|
2977
|
+
fonts: (W = i.value) == null ? void 0 : W.fontFaces
|
|
2795
2978
|
}, null, 8, ["published-key", "fonts"]),
|
|
2796
|
-
|
|
2797
|
-
"published-key":
|
|
2798
|
-
keyframes: (
|
|
2979
|
+
R(ki, {
|
|
2980
|
+
"published-key": f.value,
|
|
2981
|
+
keyframes: (M = i.value) == null ? void 0 : M.keyframes
|
|
2799
2982
|
}, null, 8, ["published-key", "keyframes"]),
|
|
2800
|
-
|
|
2801
|
-
"published-key":
|
|
2802
|
-
themes: (
|
|
2983
|
+
R(lr, {
|
|
2984
|
+
"published-key": f.value,
|
|
2985
|
+
themes: (G = i.value) == null ? void 0 : G.themes
|
|
2803
2986
|
}, null, 8, ["published-key", "themes"]),
|
|
2804
|
-
|
|
2805
|
-
"published-key":
|
|
2806
|
-
"css-properties": (
|
|
2987
|
+
R(Gi, {
|
|
2988
|
+
"published-key": f.value,
|
|
2989
|
+
"css-properties": (ee = i.value) == null ? void 0 : ee.cssProperties
|
|
2807
2990
|
}, null, 8, ["published-key", "css-properties"]),
|
|
2808
|
-
|
|
2809
|
-
"published-key":
|
|
2810
|
-
"widget-chrome": (
|
|
2991
|
+
R(hr, {
|
|
2992
|
+
"published-key": f.value,
|
|
2993
|
+
"widget-chrome": (te = i.value) == null ? void 0 : te.widgetChrome
|
|
2811
2994
|
}, null, 8, ["published-key", "widget-chrome"]),
|
|
2812
|
-
|
|
2813
|
-
"published-key":
|
|
2814
|
-
"position-try": (
|
|
2995
|
+
R(ji, {
|
|
2996
|
+
"published-key": f.value,
|
|
2997
|
+
"position-try": (ie = i.value) == null ? void 0 : ie.positionTry
|
|
2815
2998
|
}, null, 8, ["published-key", "position-try"]),
|
|
2816
|
-
|
|
2817
|
-
"published-key":
|
|
2818
|
-
variables: (
|
|
2999
|
+
R(cr, {
|
|
3000
|
+
"published-key": f.value,
|
|
3001
|
+
variables: (ne = i.value) == null ? void 0 : ne.cssVariables
|
|
2819
3002
|
}, null, 8, ["published-key", "variables"]),
|
|
2820
|
-
|
|
2821
|
-
"published-key":
|
|
2822
|
-
classes: (
|
|
2823
|
-
"class-layer": (
|
|
3003
|
+
R(zs, {
|
|
3004
|
+
"published-key": f.value,
|
|
3005
|
+
classes: (Y = i.value) == null ? void 0 : Y.classDefinitions,
|
|
3006
|
+
"class-layer": (me = i.value) == null ? void 0 : me.classLayer
|
|
2824
3007
|
}, null, 8, ["published-key", "classes", "class-layer"]),
|
|
2825
|
-
e.mode !== "pre-fetched" && o.value ? (
|
|
3008
|
+
e.mode !== "pre-fetched" && o.value ? (p(), w("div", {
|
|
2826
3009
|
key: 0,
|
|
2827
|
-
style:
|
|
3010
|
+
style: D(T(Dr))
|
|
2828
3011
|
}, [
|
|
2829
|
-
|
|
2830
|
-
style:
|
|
3012
|
+
K("div", {
|
|
3013
|
+
style: D(T(xr))
|
|
2831
3014
|
}, [
|
|
2832
|
-
|
|
2833
|
-
style:
|
|
3015
|
+
K("div", {
|
|
3016
|
+
style: D(T(Lr))
|
|
2834
3017
|
}, null, 4)
|
|
2835
3018
|
], 4)
|
|
2836
|
-
], 4)) : e.mode !== "pre-fetched" && s.value ? (
|
|
3019
|
+
], 4)) : e.mode !== "pre-fetched" && s.value ? (p(), w("div", {
|
|
2837
3020
|
key: 1,
|
|
2838
|
-
style:
|
|
3021
|
+
style: D(T(Qe))
|
|
2839
3022
|
}, [
|
|
2840
|
-
|
|
2841
|
-
style:
|
|
3023
|
+
K("div", {
|
|
3024
|
+
style: D(T(et))
|
|
2842
3025
|
}, "Error Loading Widget", 4),
|
|
2843
|
-
|
|
2844
|
-
style:
|
|
2845
|
-
},
|
|
2846
|
-
], 4)) : e.mode !== "pre-fetched" && !i.value ? (
|
|
3026
|
+
K("div", {
|
|
3027
|
+
style: D(T(tt))
|
|
3028
|
+
}, nn(s.value), 5)
|
|
3029
|
+
], 4)) : e.mode !== "pre-fetched" && !i.value ? (p(), w("div", {
|
|
2847
3030
|
key: 2,
|
|
2848
|
-
style:
|
|
3031
|
+
style: D(T(Qe))
|
|
2849
3032
|
}, [
|
|
2850
|
-
|
|
2851
|
-
style:
|
|
3033
|
+
K("div", {
|
|
3034
|
+
style: D(T(et))
|
|
2852
3035
|
}, "No Widget Data", 4),
|
|
2853
|
-
|
|
2854
|
-
style:
|
|
3036
|
+
K("div", {
|
|
3037
|
+
style: D(T(tt))
|
|
2855
3038
|
}, "No widget data available", 4)
|
|
2856
|
-
], 4)) :
|
|
2857
|
-
|
|
3039
|
+
], 4)) : l.value && i.value ? (p(), w(k, { key: 3 }, [
|
|
3040
|
+
a.value ? (p(), v(Ss, {
|
|
2858
3041
|
key: 0,
|
|
2859
3042
|
"display-item-list": i.value.displayItemList,
|
|
2860
3043
|
"widget-collections": i.value.widgetCollections,
|
|
2861
|
-
plugins:
|
|
3044
|
+
plugins: c.value,
|
|
2862
3045
|
"component-props": e.componentProps,
|
|
2863
|
-
mounts: e.mounts
|
|
2864
|
-
|
|
3046
|
+
mounts: e.mounts,
|
|
3047
|
+
"placeholder-values": e.placeholderValues
|
|
3048
|
+
}, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts", "placeholder-values"])) : (p(), v(Ds, {
|
|
2865
3049
|
key: 1,
|
|
2866
3050
|
"display-item-list": i.value.displayItemList,
|
|
2867
3051
|
"is-compose-mode": !1,
|
|
@@ -2869,203 +3053,288 @@ const Xi = {
|
|
|
2869
3053
|
"widget-collections": i.value.widgetCollections,
|
|
2870
3054
|
"show-drop-containers": !1,
|
|
2871
3055
|
"redux-device-display-type": "desktop",
|
|
2872
|
-
plugins:
|
|
3056
|
+
plugins: c.value,
|
|
2873
3057
|
"component-props": e.componentProps,
|
|
2874
|
-
mounts: e.mounts
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
3058
|
+
mounts: e.mounts,
|
|
3059
|
+
"placeholder-values": e.placeholderValues
|
|
3060
|
+
}, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts", "placeholder-values"]))
|
|
3061
|
+
], 64)) : I("", !0)
|
|
3062
|
+
], 8, Rr);
|
|
2878
3063
|
};
|
|
2879
3064
|
}
|
|
2880
|
-
});
|
|
2881
|
-
class
|
|
3065
|
+
}), Mr = 6e4;
|
|
3066
|
+
class z extends Error {
|
|
2882
3067
|
constructor(n, o) {
|
|
2883
3068
|
super(n);
|
|
2884
|
-
|
|
3069
|
+
Ne(this, "status");
|
|
2885
3070
|
this.name = "FetchRuleCMSWidgetError", this.status = o;
|
|
2886
3071
|
}
|
|
2887
3072
|
}
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
3073
|
+
const ue = /* @__PURE__ */ new Map();
|
|
3074
|
+
function tl() {
|
|
3075
|
+
ue.clear();
|
|
3076
|
+
}
|
|
3077
|
+
function nt(e) {
|
|
3078
|
+
const t = e == null ? void 0 : e.cache;
|
|
3079
|
+
return t === "no-store" || t === "reload" || t === "no-cache";
|
|
3080
|
+
}
|
|
3081
|
+
function Or(e, t) {
|
|
3082
|
+
const n = ue.get(e);
|
|
3083
|
+
if (n) {
|
|
3084
|
+
if (n.expiresAt <= t) {
|
|
3085
|
+
ue.delete(e);
|
|
3086
|
+
return;
|
|
3087
|
+
}
|
|
3088
|
+
return n.data;
|
|
3089
|
+
}
|
|
3090
|
+
}
|
|
3091
|
+
async function Ut(e) {
|
|
3092
|
+
return (await e.json().catch(() => ({ error: "Unknown error" }))).error || `Request failed with status ${e.status}`;
|
|
3093
|
+
}
|
|
3094
|
+
async function zt({
|
|
3095
|
+
publishedKey: e,
|
|
3096
|
+
token: t,
|
|
3097
|
+
endpoint: n,
|
|
3098
|
+
fetchOptions: o
|
|
3099
|
+
}) {
|
|
3100
|
+
const s = at({ publishedKey: e, token: t, endpoint: n }), i = F(t), l = Date.now();
|
|
3101
|
+
if (!i && !nt(o)) {
|
|
3102
|
+
const c = Or(s, l);
|
|
3103
|
+
if (c)
|
|
3104
|
+
return c;
|
|
3105
|
+
}
|
|
3106
|
+
const r = await fetch(s, {
|
|
2897
3107
|
method: "GET",
|
|
2898
|
-
|
|
2899
|
-
...
|
|
2900
|
-
...s
|
|
3108
|
+
...i ? { cache: "no-store" } : {},
|
|
3109
|
+
...o
|
|
2901
3110
|
});
|
|
2902
|
-
if (!r.ok)
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
3111
|
+
if (!r.ok)
|
|
3112
|
+
throw new z(await Ut(r), r.status);
|
|
3113
|
+
const d = await r.json();
|
|
3114
|
+
if (!d.success)
|
|
3115
|
+
throw new z("Failed to fetch widget data");
|
|
3116
|
+
const a = je(d.data);
|
|
3117
|
+
return !i && !nt(o) && ue.set(s, {
|
|
3118
|
+
expiresAt: l + Mr,
|
|
3119
|
+
data: a
|
|
3120
|
+
}), a;
|
|
3121
|
+
}
|
|
3122
|
+
async function _r(e) {
|
|
3123
|
+
const { rulesetPublishedKey: t, params: n, fallbackPublishedKey: o, contentType: s, token: i, endpoint: l, fetchOptions: r } = e, d = () => zt({
|
|
3124
|
+
publishedKey: o,
|
|
3125
|
+
token: i,
|
|
3126
|
+
endpoint: l,
|
|
3127
|
+
fetchOptions: r
|
|
3128
|
+
});
|
|
3129
|
+
let a;
|
|
3130
|
+
try {
|
|
3131
|
+
a = await fetch(ut({ token: i, endpoint: l }), {
|
|
3132
|
+
...Bt({
|
|
3133
|
+
token: i,
|
|
3134
|
+
rulesetPublishedKey: t,
|
|
3135
|
+
params: n,
|
|
3136
|
+
contentType: s
|
|
3137
|
+
}),
|
|
3138
|
+
...r
|
|
3139
|
+
});
|
|
3140
|
+
} catch (f) {
|
|
3141
|
+
if (o)
|
|
3142
|
+
return d();
|
|
3143
|
+
throw f;
|
|
3144
|
+
}
|
|
3145
|
+
if (!a.ok) {
|
|
3146
|
+
if (o && Kt(a.status))
|
|
3147
|
+
return d();
|
|
3148
|
+
throw new z(await Ut(a), a.status);
|
|
3149
|
+
}
|
|
3150
|
+
const c = Ht({
|
|
3151
|
+
token: i,
|
|
3152
|
+
rulesetPublishedKey: t,
|
|
3153
|
+
body: await a.json()
|
|
3154
|
+
});
|
|
3155
|
+
if (!c)
|
|
3156
|
+
throw new z("Failed to fetch widget data");
|
|
3157
|
+
return { ...je(c.raw), selection: c.selection };
|
|
3158
|
+
}
|
|
3159
|
+
async function nl(e) {
|
|
3160
|
+
const { publishedKey: t, rulesetPublishedKey: n, token: o } = e;
|
|
3161
|
+
if (!t && !n) {
|
|
3162
|
+
const s = F(o);
|
|
3163
|
+
throw n !== void 0 ? new z(
|
|
3164
|
+
s ? "Ruleset key is required" : "Ruleset published key is required"
|
|
3165
|
+
) : new z(
|
|
3166
|
+
s ? "Widget key is required" : "Published key is required"
|
|
2907
3167
|
);
|
|
2908
3168
|
}
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
return Et(l.data);
|
|
3169
|
+
if (!o)
|
|
3170
|
+
throw new z("Token is required");
|
|
3171
|
+
return e.rulesetPublishedKey ? _r(e) : zt(e);
|
|
2913
3172
|
}
|
|
2914
|
-
async function
|
|
2915
|
-
const { data: t, libraries: n } = e, o =
|
|
3173
|
+
async function ol(e) {
|
|
3174
|
+
const { data: t, libraries: n } = e, o = Pe({
|
|
2916
3175
|
displayItemList: t.displayItemList,
|
|
2917
3176
|
widgetCollections: t.widgetCollections
|
|
2918
3177
|
});
|
|
2919
|
-
return
|
|
3178
|
+
return de().resolve({ registrations: n, referenced: o });
|
|
2920
3179
|
}
|
|
2921
3180
|
export {
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
Oe as
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3181
|
+
Vr as AlignContentTypes,
|
|
3182
|
+
Ss as BreakpointVariantRender,
|
|
3183
|
+
lt as COLLECTION_TYPE_PREFIX,
|
|
3184
|
+
pe as COMPONENT_PROPS_PATH_SEPARATOR,
|
|
3185
|
+
Re as CSS_CLASSES_ATTRIBUTE_NAME,
|
|
3186
|
+
Bn as CSS_VARIABLE_NAME_MAX_LENGTH,
|
|
3187
|
+
Fn as CSS_VARIABLE_NAME_PATTERN,
|
|
3188
|
+
Ct as DEFAULT_BASE_Z_INDEX,
|
|
3189
|
+
Tn as DEFAULT_CLOUDINARY_CLOUD_NAME,
|
|
3190
|
+
se as DEFAULT_LIBRARY_ID,
|
|
3191
|
+
Mr as DEFAULT_PUBLISHED_WIDGET_CACHE_MS,
|
|
3192
|
+
No as DEFAULT_ROW_GAP,
|
|
3193
|
+
cn as DEV_CLIENT_TOKEN_PREFIX,
|
|
3194
|
+
pn as DEV_WIDGET_API_PATH,
|
|
3195
|
+
yn as DEV_WIDGET_RESOLVE_API_PATH,
|
|
3196
|
+
Fr as DeviceDisplayTypes,
|
|
3197
|
+
Xe as DisplayComponent,
|
|
3198
|
+
Ie as DisplayItemTypes,
|
|
3199
|
+
rt as DragItemIdPrefixTypes,
|
|
3200
|
+
Cn as EMBEDDED_KEY_SEPARATOR,
|
|
3201
|
+
po as FLEX_LAYOUT_STYLE_KEYS_THAT_DERIVE_DISPLAY,
|
|
3202
|
+
z as FetchRuleCMSWidgetError,
|
|
3203
|
+
ht as HIDE_WIDGET_ATTRIBUTE_NAME,
|
|
3204
|
+
Ke as JustifyContentTypes,
|
|
3205
|
+
Ho as POINTER_EVENTS_ATTRIBUTE_NAME,
|
|
3206
|
+
Ae as PUBLISHED_KEY_SEPARATOR,
|
|
3207
|
+
dn as PUBLISHED_WIDGET_API_PATH,
|
|
3208
|
+
fn as PUBLISHED_WIDGET_RESOLVE_API_PATH,
|
|
3209
|
+
Be as PageViewTypes,
|
|
3210
|
+
qe as RULECMS_ANONYMOUS_ID_STORAGE_KEY,
|
|
3211
|
+
an as RULECMS_API_ORIGIN,
|
|
3212
|
+
Qr as RULECMS_PUBLISHED_KEY_ATTRIBUTE,
|
|
3213
|
+
ft as RULECMS_WIDGET_CONTEXT_KEY,
|
|
3214
|
+
Ds as RenderComponents,
|
|
3215
|
+
Ee as RenderComponentsForDevice,
|
|
3216
|
+
Es as RenderComponentsInner,
|
|
3217
|
+
el as RuleCMSWidget,
|
|
3218
|
+
Xr as RuleCMSWidgetProvider,
|
|
3219
|
+
Uo as WIDGET_ATTRIBUTES_IGNORED_IN_COMPOSE_MODE,
|
|
3220
|
+
un as WIDGET_CACHE_API_ORIGIN,
|
|
3221
|
+
ze as WIDGET_PLACEHOLDER_VALUES_KEY,
|
|
3222
|
+
Yo as Z_INDEX_WIDGET_ATTRIBUTE_NAME,
|
|
3223
|
+
ro as alignContentAllowlist,
|
|
3224
|
+
so as alignItemsAllowlist,
|
|
3225
|
+
ao as backgroundPositionAllowlist,
|
|
3226
|
+
uo as backgroundRepeatAllowlist,
|
|
3227
|
+
co as backgroundSizeAllowlist,
|
|
3228
|
+
fo as borderStyleKeywords,
|
|
3229
|
+
Un as boxSpacingSideKeys,
|
|
3230
|
+
Zr as boxSpacingStyleAttributeEntries,
|
|
3231
|
+
Vn as buildCloudinaryBackgroundUrl,
|
|
3232
|
+
es as buildOverlayLayerBoxStyles,
|
|
3233
|
+
Qo as buildOverlayStackStyles,
|
|
3234
|
+
at as buildWidgetFetchUrl,
|
|
3235
|
+
ut as buildWidgetResolveUrl,
|
|
3236
|
+
tl as clearPublishedWidgetFetchCache,
|
|
3237
|
+
os as collectComponentInstancePaths,
|
|
3238
|
+
Pe as collectReferencedLibraryIds,
|
|
3239
|
+
ln as composeSourceComponentsPlugin,
|
|
3240
|
+
de as createComponentLibraryRegistry,
|
|
3241
|
+
ve as cssAttrArrayKey,
|
|
3242
|
+
An as defaultPageWidth,
|
|
3243
|
+
Mo as deriveDisplayFlexIfNeeded,
|
|
3244
|
+
Jr as desktopModeWidth,
|
|
3245
|
+
nl as fetchRuleCMSWidget,
|
|
3246
|
+
is as findUnmatchedComponentPropsKeys,
|
|
3247
|
+
lo as flexDirectionAllowlist,
|
|
3248
|
+
io as flexWrapAllowlist,
|
|
3249
|
+
Jn as fontFamilyAllowlist,
|
|
3250
|
+
Zn as fontStyleAllowlist,
|
|
3251
|
+
qn as fontWeightAllowlist,
|
|
3252
|
+
Ao as formatBackgroundImageStyles,
|
|
3253
|
+
To as formatBorderStyles,
|
|
3254
|
+
Eo as formatBoxShadowStyles,
|
|
3255
|
+
ko as formatBoxSpacingStyles,
|
|
3256
|
+
Io as formatCssColorStyles,
|
|
3257
|
+
Le as formatCssColorValue,
|
|
3258
|
+
Po as formatCssEnumStyles,
|
|
3259
|
+
Do as formatCssLengthStyles,
|
|
3260
|
+
N as formatCssVariable,
|
|
3261
|
+
qr as formatCssVariableStyles,
|
|
3262
|
+
xo as formatLineHeightStyles,
|
|
3263
|
+
$o as formatObjectStyleAttribute,
|
|
3264
|
+
Lo as formatOpacityStyles,
|
|
3265
|
+
J as formatSpacingSideValue,
|
|
3266
|
+
wn as generatePublishedKey,
|
|
3267
|
+
Gr as generatePublishedKeyForEmbedded,
|
|
3268
|
+
pt as getCollectionIdForCollectionType,
|
|
3269
|
+
ae as getColumnAttributes,
|
|
3270
|
+
He as getComponentAttributesAndStyles,
|
|
3271
|
+
we as getComponentsPluginFromPlugins,
|
|
3272
|
+
E as getCssVariableFromLeaf,
|
|
3273
|
+
Oo as getDefaultDimensionAttributes,
|
|
3274
|
+
B as getDeviceTypeBasedAttributes,
|
|
3275
|
+
Br as getDragItemId,
|
|
3276
|
+
mn as getDragItemPrefixAndId,
|
|
3277
|
+
hn as getIdAndPrefix,
|
|
3278
|
+
_o as getMergedAttributes,
|
|
3279
|
+
Kr as getNameAndInstanceIdFromWidgetKey,
|
|
3280
|
+
Hr as getNameFromWidgetKey,
|
|
3281
|
+
Sr as getOrCreateAnonymousId,
|
|
3282
|
+
Jo as getOverlayLayerZIndex,
|
|
3283
|
+
gn as getWidgetKeyForCollection,
|
|
3284
|
+
Ur as getWidgetKeyForCollectionWithPrefix,
|
|
3285
|
+
bn as getWidgetKeyForPublishedCollection,
|
|
3286
|
+
zr as getWidgetKeyForPublishedCollectionWithPrefix,
|
|
3287
|
+
Co as hasBoxShadowLeaf,
|
|
3288
|
+
as as hasDeviceDivergentValues,
|
|
3289
|
+
V as hasInvalidCssVariable,
|
|
3290
|
+
jo as hasItems,
|
|
3291
|
+
Xo as hasOverlayLayers,
|
|
3292
|
+
Yr as incrementVersion,
|
|
3293
|
+
Kn as isBackgroundImageValue,
|
|
3294
|
+
yo as isBorderStyleValue,
|
|
3295
|
+
mo as isBorderValue,
|
|
3296
|
+
bo as isBoxShadowValue,
|
|
3297
|
+
zn as isBoxSpacingValue,
|
|
3298
|
+
On as isCloudinaryCloudName,
|
|
3299
|
+
Mn as isCloudinaryPublicId,
|
|
3300
|
+
jn as isCloudinaryTransformationString,
|
|
3301
|
+
xe as isCssColorValue,
|
|
3302
|
+
Xn as isCssEnumValue,
|
|
3303
|
+
q as isCssVariableName,
|
|
3304
|
+
F as isDevClientToken,
|
|
3305
|
+
wo as isLineHeightValue,
|
|
3306
|
+
vo as isOpacityValue,
|
|
3307
|
+
Zo as isOverlayLayerEmptyForDevice,
|
|
3308
|
+
Vo as isRowHiddenForDevice,
|
|
3309
|
+
_n as isSafeImageUrl,
|
|
3310
|
+
X as isSpacingSideValue,
|
|
3311
|
+
Oe as isWidgetHiddenForDevice,
|
|
3312
|
+
oo as justifyContentAllowlist,
|
|
3313
|
+
Me as normalizeCssClasses,
|
|
3314
|
+
$e as objectStyleAttributeRegistry,
|
|
3315
|
+
be as overflowAllowlist,
|
|
3316
|
+
yt as phoneModeWidth,
|
|
3317
|
+
no as pointerEventsAllowlist,
|
|
3318
|
+
je as prepareRuleCMSWidgetData,
|
|
3319
|
+
Ue as resolveBaseZIndex,
|
|
3320
|
+
it as resolveKey,
|
|
3321
|
+
qo as resolveOverlayLayerPointerEvents,
|
|
3322
|
+
Fo as resolveRowStyles,
|
|
3323
|
+
ct as resolveWidgetApiOrigin,
|
|
3324
|
+
gt as resolveWidgetContainerStyles,
|
|
3325
|
+
ts as resolveWidgetInstanceProps,
|
|
3326
|
+
ol as resolveWidgetLibraries,
|
|
3327
|
+
Wo as rowBasedPropertiesAreAssigned,
|
|
3328
|
+
De as spacingKeywords,
|
|
3329
|
+
Hn as spacingLengthUnits,
|
|
3330
|
+
Pr as stableJsonStringify,
|
|
3331
|
+
mt as tabletModeWidth,
|
|
3332
|
+
Qn as textAlignAllowlist,
|
|
3333
|
+
eo as textDecorationAllowlist,
|
|
3334
|
+
to as textTransformAllowlist,
|
|
3335
|
+
dt as typeHasPrefix,
|
|
3336
|
+
rs as warnUnmatchedComponentProps,
|
|
3337
|
+
Go as widgetBasedPropertiesAreAssigned,
|
|
3338
|
+
bt as widgetDeclaresOwnHeight,
|
|
3339
|
+
ns as withWidgetPlaceholderValues
|
|
3071
3340
|
};
|