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