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