webim-adapter 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/webim-adapter.js +286 -228
- package/build/webim-embed.js +10 -8
- package/build/webim-ssr.js +288 -230
- package/package.json +1 -1
package/build/webim-ssr.js
CHANGED
|
@@ -157,58 +157,58 @@ function g(e) {
|
|
|
157
157
|
l,
|
|
158
158
|
u
|
|
159
159
|
].some((e) => e !== void 0) && d.push(`${m(s ?? 0)} ${m(c ?? 0)} ${m(l ?? 0)} ${u || "rgba(0, 0, 0, 0.35)"}`), d.length && (t.textShadow = d.join(", "));
|
|
160
|
-
let f = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}deg` : e, g = (e) => e.type === "move" ? `translate(${m(e.x ?? 0)}, ${m(e.y ?? 0)})` : e.type === "scale" ? `scale(${e.v ?? 1})` : e.type === "rotate" ? `rotate(${f(e.a ?? 0)})` : e.type === "skew" ? `skew(${f(e.x ?? 0)}, ${f(e.y ?? 0)})` : null, { transforms: _, translateX: v, translateY: y, scale: b, rotate: x, skewX: S, skewY:
|
|
160
|
+
let f = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}deg` : e, g = (e) => e.type === "move" ? `translate(${m(e.x ?? 0)}, ${m(e.y ?? 0)})` : e.type === "scale" ? `scale(${e.v ?? 1})` : e.type === "rotate" ? `rotate(${f(e.a ?? 0)})` : e.type === "skew" ? `skew(${f(e.x ?? 0)}, ${f(e.y ?? 0)})` : null, { transforms: _, translateX: v, translateY: y, scale: b, rotate: x, skewX: S, skewY: C } = t;
|
|
161
161
|
delete t.transforms, delete t.translateX, delete t.translateY, delete t.scale, delete t.rotate, delete t.skewX, delete t.skewY;
|
|
162
|
-
let
|
|
163
|
-
(v !== void 0 || y !== void 0) &&
|
|
164
|
-
let
|
|
162
|
+
let w = (Array.isArray(_) ? _ : []).filter((e) => e && e.on !== !1).map(g).filter(Boolean);
|
|
163
|
+
(v !== void 0 || y !== void 0) && w.push(`translate(${m(v ?? 0)}, ${m(y ?? 0)})`), b !== void 0 && w.push(`scale(${b})`), x !== void 0 && w.push(`rotate(${f(x)})`), (S !== void 0 || C !== void 0) && w.push(`skew(${f(S ?? 0)}, ${f(C ?? 0)})`), w.length && (t.transform = w.join(" "));
|
|
164
|
+
let T = (e) => `${e.inset ? "inset " : ""}${m(e.x ?? 0)} ${m(e.y ?? 0)} ${m(e.blur ?? 0)} ${m(e.spread ?? 0)} ${e.color || "rgba(15, 23, 42, 0.2)"}`, { shadows: ee, boxShadowX: te, boxShadowY: E, boxShadowBlur: D, boxShadowSpread: O, boxShadowColor: k, boxShadowInset: A } = t;
|
|
165
165
|
delete t.shadows, delete t.boxShadowX, delete t.boxShadowY, delete t.boxShadowBlur, delete t.boxShadowSpread, delete t.boxShadowColor, delete t.boxShadowInset;
|
|
166
|
-
let
|
|
166
|
+
let j = (Array.isArray(ee) ? ee : []).filter((e) => e && e.on !== !1).map(T);
|
|
167
167
|
[
|
|
168
|
+
te,
|
|
168
169
|
E,
|
|
169
170
|
D,
|
|
170
171
|
O,
|
|
171
172
|
k,
|
|
172
|
-
A
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
})
|
|
182
|
-
let te = (e) => e.type === "blur" ? `blur(${m(e.v ?? 0)})` : e.type === "hue-rotate" ? `hue-rotate(${f(e.v ?? 0)})` : `${e.type}(${e.v ?? 100}%)`, ne = (e) => (Array.isArray(e) ? e : []).filter((e) => e && e.on !== !1 && e.type).map(te), { filters: N, backdropFilters: P, filterBlur: F, filterGrayscale: I, filterBrightness: L, filterContrast: R, filterSaturate: z } = t;
|
|
173
|
+
A
|
|
174
|
+
].some((e) => e !== void 0) && j.push(T({
|
|
175
|
+
x: te,
|
|
176
|
+
y: E,
|
|
177
|
+
blur: D,
|
|
178
|
+
spread: O,
|
|
179
|
+
color: k,
|
|
180
|
+
inset: A
|
|
181
|
+
})), j.length && (t.boxShadow = j.join(", "));
|
|
182
|
+
let M = (e) => e.type === "blur" ? `blur(${m(e.v ?? 0)})` : e.type === "hue-rotate" ? `hue-rotate(${f(e.v ?? 0)})` : `${e.type}(${e.v ?? 100}%)`, N = (e) => (Array.isArray(e) ? e : []).filter((e) => e && e.on !== !1 && e.type).map(M), { filters: P, backdropFilters: F, filterBlur: I, filterGrayscale: L, filterBrightness: R, filterContrast: z, filterSaturate: B } = t;
|
|
183
183
|
delete t.filters, delete t.backdropFilters, delete t.filterBlur, delete t.filterGrayscale, delete t.filterBrightness, delete t.filterContrast, delete t.filterSaturate;
|
|
184
|
-
let
|
|
185
|
-
|
|
186
|
-
let
|
|
187
|
-
|
|
188
|
-
let { textStrokeWidth:
|
|
189
|
-
delete t.textStrokeWidth, delete t.textStrokeColor, (
|
|
190
|
-
let { clipText:
|
|
191
|
-
delete t.clipText,
|
|
192
|
-
let { transitions:
|
|
184
|
+
let V = N(P);
|
|
185
|
+
I !== void 0 && V.push(`blur(${m(I)})`), L !== void 0 && V.push(`grayscale(${L}%)`), R !== void 0 && V.push(`brightness(${R}%)`), z !== void 0 && V.push(`contrast(${z}%)`), B !== void 0 && V.push(`saturate(${B}%)`), V.length && (t.filter = V.join(" "));
|
|
186
|
+
let H = N(F);
|
|
187
|
+
H.length && (t.backdropFilter = H.join(" "), t.WebkitBackdropFilter = t.backdropFilter);
|
|
188
|
+
let { textStrokeWidth: ne, textStrokeColor: U } = t;
|
|
189
|
+
delete t.textStrokeWidth, delete t.textStrokeColor, (ne !== void 0 || U !== void 0) && (t.WebkitTextStroke = `${m(ne ?? 1)} ${U || "currentColor"}`);
|
|
190
|
+
let { clipText: W } = t;
|
|
191
|
+
delete t.clipText, W && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
|
|
192
|
+
let { transitions: re, transitionDuration: ie, transitionEasing: ae, transitionProperty: oe } = t, G = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
|
|
193
193
|
delete t.transitions, delete t.transitionDuration, delete t.transitionEasing, delete t.transitionProperty;
|
|
194
|
-
let
|
|
195
|
-
if (
|
|
194
|
+
let K = (Array.isArray(re) ? re : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${G(e.duration ?? 200)} ${e.easing || "ease"}`);
|
|
195
|
+
if (ie !== void 0 && K.push(`${oe || "all"} ${G(ie)} ${ae || "ease"}`), K.length && (t.transition = K.join(", ")), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
|
|
196
196
|
let e = `${i || "rgba(0,0,0,0.5)"}, ${a || "transparent"}`, o = n === "radial" ? `radial-gradient(circle, ${e})` : `linear-gradient(${r ?? 180}deg, ${e})`;
|
|
197
197
|
t.backgroundImage = t.backgroundImage ? `${o}, ${t.backgroundImage}` : o;
|
|
198
198
|
}
|
|
199
199
|
delete t.backgroundVideo;
|
|
200
|
-
let { overlayColor:
|
|
201
|
-
if (delete t.overlayColor, delete t.overlayOpacity,
|
|
202
|
-
let e = `color-mix(in srgb, ${
|
|
200
|
+
let { overlayColor: q, overlayOpacity: se } = t;
|
|
201
|
+
if (delete t.overlayColor, delete t.overlayOpacity, q) {
|
|
202
|
+
let e = `color-mix(in srgb, ${q} ${se ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
|
|
203
203
|
t.backgroundImage = t.backgroundImage ? `${n}, ${t.backgroundImage}` : n;
|
|
204
204
|
}
|
|
205
205
|
t.backgroundImage && (t.backgroundSize ??= "cover", t.backgroundPosition ??= "center", t.backgroundRepeat ??= "no-repeat");
|
|
206
|
-
let { backgroundLayers:
|
|
206
|
+
let { backgroundLayers: J } = t;
|
|
207
207
|
delete t.backgroundLayers;
|
|
208
|
-
let
|
|
209
|
-
if (
|
|
208
|
+
let Y = (Array.isArray(J) ? J : []).filter((e) => e && e.on !== !1);
|
|
209
|
+
if (Y.length) {
|
|
210
210
|
let e = [], n = [], r = [], i = [], a = [];
|
|
211
|
-
for (let t of
|
|
211
|
+
for (let t of Y) if (t.kind === "linear") e.push(`linear-gradient(${t.angle ?? 180}deg, ${t.from || "rgba(0,0,0,0.5)"}, ${t.to || "transparent"})`), n.push("auto"), r.push("0% 0%"), i.push("repeat"), a.push("scroll");
|
|
212
212
|
else if (t.kind === "radial") e.push(`radial-gradient(circle, ${t.from || "rgba(0,0,0,0.5)"}, ${t.to || "transparent"})`), n.push("auto"), r.push("0% 0%"), i.push("repeat"), a.push("scroll");
|
|
213
213
|
else {
|
|
214
214
|
if (!t.src) continue;
|
|
@@ -245,10 +245,30 @@ function S(e, t, n, r = !1) {
|
|
|
245
245
|
let i = Object.entries(g(t)).map(([e, t]) => `${x(e)}: ${t} !important;`).join(" ");
|
|
246
246
|
return i ? `[data-wb="${e}"]${r ? "" : n} { ${i} }` : "";
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function C(e, t, n) {
|
|
249
249
|
return Object.entries(_).map(([r, i]) => S(e, t?.[r], i, n === r)).filter(Boolean).join("\n");
|
|
250
250
|
}
|
|
251
|
-
|
|
251
|
+
var w = [
|
|
252
|
+
{
|
|
253
|
+
key: "tablet",
|
|
254
|
+
max: 991
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
key: "mobileLandscape",
|
|
258
|
+
max: 767
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
key: "mobile",
|
|
262
|
+
max: 478
|
|
263
|
+
}
|
|
264
|
+
], T = (e) => Object.entries(g(e)).map(([e, t]) => `${x(e)}: ${t} !important;`).join(" ");
|
|
265
|
+
function ee(e, t) {
|
|
266
|
+
return w.map(({ key: n, max: r }) => {
|
|
267
|
+
let i = t?.[n] ? T(t[n]) : "";
|
|
268
|
+
return i ? `@media (max-width: ${r}px) { [data-wb="${e}"] { ${i} } }` : "";
|
|
269
|
+
}).filter(Boolean).join("\n");
|
|
270
|
+
}
|
|
271
|
+
function te(e, t) {
|
|
252
272
|
let n = [], r = (e) => {
|
|
253
273
|
for (let [t, r] of Object.entries(e || {})) {
|
|
254
274
|
let e = ee(t, r.props);
|
|
@@ -259,7 +279,18 @@ function C(e, t) {
|
|
|
259
279
|
for (let e of Object.values(t || {})) r(e.template?.nodes);
|
|
260
280
|
return n.join("\n");
|
|
261
281
|
}
|
|
262
|
-
|
|
282
|
+
function E(e, t) {
|
|
283
|
+
let n = [], r = (e) => {
|
|
284
|
+
for (let [t, r] of Object.entries(e || {})) {
|
|
285
|
+
let e = C(t, r.props);
|
|
286
|
+
e && n.push(e);
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
r(e);
|
|
290
|
+
for (let e of Object.values(t || {})) r(e.template?.nodes);
|
|
291
|
+
return n.join("\n");
|
|
292
|
+
}
|
|
293
|
+
var D = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif", O = {
|
|
263
294
|
light: {
|
|
264
295
|
background: "#ffffff",
|
|
265
296
|
text: "#111827",
|
|
@@ -296,23 +327,23 @@ var w = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
|
|
|
296
327
|
contrastText: "#052e2b"
|
|
297
328
|
}
|
|
298
329
|
}
|
|
299
|
-
},
|
|
330
|
+
}, k = {
|
|
300
331
|
font: "system",
|
|
301
332
|
headingFont: "inherit",
|
|
302
|
-
light:
|
|
303
|
-
dark:
|
|
304
|
-
},
|
|
333
|
+
light: O.light,
|
|
334
|
+
dark: O.dark
|
|
335
|
+
}, A = {
|
|
305
336
|
system: {
|
|
306
337
|
label: "System",
|
|
307
|
-
value:
|
|
338
|
+
value: D
|
|
308
339
|
},
|
|
309
340
|
inter: {
|
|
310
341
|
label: "Inter",
|
|
311
|
-
value: `"Inter", ${
|
|
342
|
+
value: `"Inter", ${D}`
|
|
312
343
|
},
|
|
313
344
|
outfit: {
|
|
314
345
|
label: "Outfit",
|
|
315
|
-
value: `"Outfit", ${
|
|
346
|
+
value: `"Outfit", ${D}`
|
|
316
347
|
},
|
|
317
348
|
serif: {
|
|
318
349
|
label: "Serif",
|
|
@@ -322,7 +353,7 @@ var w = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
|
|
|
322
353
|
label: "Mono",
|
|
323
354
|
value: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"
|
|
324
355
|
}
|
|
325
|
-
},
|
|
356
|
+
}, j = (e, t) => A[e]?.value ?? t, M = (e, ...t) => {
|
|
326
357
|
let n = Object.assign({}, e, ...t);
|
|
327
358
|
return n.primary = {
|
|
328
359
|
...e.primary,
|
|
@@ -338,16 +369,16 @@ var w = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
|
|
|
338
369
|
}), {})
|
|
339
370
|
}, n;
|
|
340
371
|
};
|
|
341
|
-
function
|
|
372
|
+
function N(e) {
|
|
342
373
|
let { light: t, dark: n, font: r, headingFont: i, ...a } = e ?? {};
|
|
343
374
|
return {
|
|
344
|
-
font: r ??
|
|
345
|
-
headingFont: i ??
|
|
346
|
-
light:
|
|
347
|
-
dark:
|
|
375
|
+
font: r ?? k.font,
|
|
376
|
+
headingFont: i ?? k.headingFont,
|
|
377
|
+
light: M(O.light, a, t),
|
|
378
|
+
dark: M(O.dark, n)
|
|
348
379
|
};
|
|
349
380
|
}
|
|
350
|
-
function
|
|
381
|
+
function P(e) {
|
|
351
382
|
return {
|
|
352
383
|
"--page-bg": e.background,
|
|
353
384
|
"--page-text": e.text,
|
|
@@ -363,51 +394,51 @@ function j(e) {
|
|
|
363
394
|
"--page-secondary-contrast": e.secondary.contrastText
|
|
364
395
|
};
|
|
365
396
|
}
|
|
366
|
-
function
|
|
367
|
-
let t =
|
|
397
|
+
function F(e) {
|
|
398
|
+
let t = N(e);
|
|
368
399
|
return {
|
|
369
400
|
backgroundColor: "var(--page-bg)",
|
|
370
401
|
color: "var(--page-text)",
|
|
371
|
-
fontFamily:
|
|
372
|
-
"--page-heading-font": t.headingFont === "inherit" ? "inherit" :
|
|
402
|
+
fontFamily: j(t.font, D),
|
|
403
|
+
"--page-heading-font": t.headingFont === "inherit" ? "inherit" : j(t.headingFont, "inherit")
|
|
373
404
|
};
|
|
374
405
|
}
|
|
375
|
-
function
|
|
376
|
-
let n =
|
|
406
|
+
function I(e, t = "light") {
|
|
407
|
+
let n = N(e);
|
|
377
408
|
return {
|
|
378
|
-
...
|
|
379
|
-
...
|
|
409
|
+
...F(e),
|
|
410
|
+
...P(n[t] ?? n.light)
|
|
380
411
|
};
|
|
381
412
|
}
|
|
382
|
-
function
|
|
413
|
+
function L(e, t) {
|
|
383
414
|
return e?.themeRef && t?.[e.themeRef] || e?.theme;
|
|
384
415
|
}
|
|
385
416
|
//#endregion
|
|
386
417
|
//#region ../ui/src/components/builder/views.jsx
|
|
387
|
-
var
|
|
418
|
+
var R = n({
|
|
388
419
|
tenant: "",
|
|
389
420
|
apiUrl: "/api"
|
|
390
|
-
}),
|
|
421
|
+
}), z = {
|
|
391
422
|
margin: 0,
|
|
392
423
|
fontWeight: 700,
|
|
393
424
|
lineHeight: 1.2,
|
|
394
425
|
fontFamily: "var(--page-heading-font, inherit)"
|
|
395
|
-
},
|
|
426
|
+
}, B = { margin: 0 }, V = {
|
|
396
427
|
display: "inline-block",
|
|
397
428
|
textDecoration: "none",
|
|
398
429
|
cursor: "pointer",
|
|
399
430
|
backgroundColor: "var(--page-accent, #111827)",
|
|
400
431
|
color: "var(--page-accent-text, #ffffff)"
|
|
401
|
-
},
|
|
432
|
+
}, H = {
|
|
402
433
|
flexGrow: 1,
|
|
403
434
|
display: "flex",
|
|
404
435
|
flexDirection: "column",
|
|
405
436
|
position: "relative"
|
|
406
|
-
},
|
|
437
|
+
}, ne = {
|
|
407
438
|
display: "flex",
|
|
408
439
|
flexDirection: "column"
|
|
409
440
|
};
|
|
410
|
-
function
|
|
441
|
+
function U({ style: e }) {
|
|
411
442
|
let t = e?.backgroundVideo;
|
|
412
443
|
if (!t) return null;
|
|
413
444
|
let n = {
|
|
@@ -433,7 +464,7 @@ function z({ style: e }) {
|
|
|
433
464
|
background: r
|
|
434
465
|
} })] });
|
|
435
466
|
}
|
|
436
|
-
var
|
|
467
|
+
var W = (e, t) => e?.backgroundVideo ? {
|
|
437
468
|
position: "relative",
|
|
438
469
|
...t,
|
|
439
470
|
...g(e)
|
|
@@ -441,51 +472,58 @@ var B = (e, t) => e?.backgroundVideo ? {
|
|
|
441
472
|
...t,
|
|
442
473
|
...g(e)
|
|
443
474
|
};
|
|
444
|
-
function
|
|
475
|
+
function re({ style: e, nodeRef: t, children: n }) {
|
|
445
476
|
return /* @__PURE__ */ c("div", {
|
|
446
477
|
ref: t,
|
|
447
478
|
style: {
|
|
448
|
-
...
|
|
479
|
+
...H,
|
|
449
480
|
...g(e)
|
|
450
481
|
},
|
|
451
|
-
children: [/* @__PURE__ */ s(
|
|
482
|
+
children: [/* @__PURE__ */ s(U, { style: e }), n]
|
|
452
483
|
});
|
|
453
484
|
}
|
|
454
|
-
function
|
|
485
|
+
function ie({ style: e, nodeRef: t, children: n }) {
|
|
455
486
|
return /* @__PURE__ */ c("section", {
|
|
456
487
|
ref: t,
|
|
457
|
-
style:
|
|
458
|
-
children: [/* @__PURE__ */ s(
|
|
488
|
+
style: W(e, ne),
|
|
489
|
+
children: [/* @__PURE__ */ s(U, { style: e }), n]
|
|
459
490
|
});
|
|
460
491
|
}
|
|
461
|
-
function
|
|
492
|
+
function ae({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
493
|
+
let i = t ? {
|
|
494
|
+
position: "relative",
|
|
495
|
+
minHeight: 240
|
|
496
|
+
} : null;
|
|
462
497
|
return /* @__PURE__ */ c("div", {
|
|
463
|
-
ref:
|
|
464
|
-
style:
|
|
465
|
-
|
|
498
|
+
ref: n,
|
|
499
|
+
style: i ? {
|
|
500
|
+
...i,
|
|
501
|
+
...W(e)
|
|
502
|
+
} : W(e),
|
|
503
|
+
children: [/* @__PURE__ */ s(U, { style: e }), r]
|
|
466
504
|
});
|
|
467
505
|
}
|
|
468
|
-
function
|
|
506
|
+
function oe({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
|
|
469
507
|
return /* @__PURE__ */ s(n, {
|
|
470
508
|
ref: a,
|
|
471
509
|
style: {
|
|
472
|
-
...
|
|
510
|
+
...z,
|
|
473
511
|
...g(r)
|
|
474
512
|
},
|
|
475
|
-
children:
|
|
513
|
+
children: q(t, e, i)
|
|
476
514
|
});
|
|
477
515
|
}
|
|
478
|
-
var
|
|
479
|
-
fontFamily:
|
|
516
|
+
var G = {
|
|
517
|
+
fontFamily: A.mono.value,
|
|
480
518
|
background: "rgba(148, 163, 184, 0.18)",
|
|
481
519
|
padding: "1px 5px",
|
|
482
520
|
borderRadius: 4,
|
|
483
521
|
fontSize: "0.9em"
|
|
484
522
|
};
|
|
485
|
-
function
|
|
523
|
+
function K(e, t = [], n) {
|
|
486
524
|
let r = e;
|
|
487
525
|
return t.includes("sup") ? r = /* @__PURE__ */ s("sup", { children: r }) : t.includes("sub") && (r = /* @__PURE__ */ s("sub", { children: r })), t.includes("code") && (r = /* @__PURE__ */ s("code", {
|
|
488
|
-
style:
|
|
526
|
+
style: G,
|
|
489
527
|
children: r
|
|
490
528
|
})), t.includes("strike") && (r = /* @__PURE__ */ s("s", { children: r })), t.includes("underline") && (r = /* @__PURE__ */ s("u", { children: r })), t.includes("italic") && (r = /* @__PURE__ */ s("em", { children: r })), t.includes("bold") && (r = /* @__PURE__ */ s("strong", { children: r })), n && (r = /* @__PURE__ */ s("a", {
|
|
491
529
|
href: n,
|
|
@@ -493,13 +531,13 @@ function G(e, t = [], n) {
|
|
|
493
531
|
children: r
|
|
494
532
|
})), r;
|
|
495
533
|
}
|
|
496
|
-
function
|
|
534
|
+
function q(e, n, r) {
|
|
497
535
|
return e?.length ? e.map((e, n) => {
|
|
498
536
|
if (e.slot) return /* @__PURE__ */ s(t, { children: r?.[e.slot] ?? null }, n);
|
|
499
|
-
if (e.parts) return /* @__PURE__ */ s(t, { children:
|
|
537
|
+
if (e.parts) return /* @__PURE__ */ s(t, { children: q(e.parts, "", r) }, n);
|
|
500
538
|
let i = e.text;
|
|
501
539
|
return e.sup ? i = /* @__PURE__ */ s("sup", { children: i }) : e.sub && (i = /* @__PURE__ */ s("sub", { children: i })), e.code && (i = /* @__PURE__ */ s("code", {
|
|
502
|
-
style:
|
|
540
|
+
style: G,
|
|
503
541
|
children: i
|
|
504
542
|
})), e.strike && (i = /* @__PURE__ */ s("s", { children: i })), e.underline && (i = /* @__PURE__ */ s("u", { children: i })), e.italic && (i = /* @__PURE__ */ s("em", { children: i })), e.bold && (i = /* @__PURE__ */ s("strong", { children: i })), e.href && (i = /* @__PURE__ */ s("a", {
|
|
505
543
|
href: e.href,
|
|
@@ -508,13 +546,13 @@ function K(e, n, r) {
|
|
|
508
546
|
})), /* @__PURE__ */ s(t, { children: i }, n);
|
|
509
547
|
}) : n;
|
|
510
548
|
}
|
|
511
|
-
function
|
|
549
|
+
function se({ parts: e, text: t, marks: n, href: r, style: i }) {
|
|
512
550
|
return /* @__PURE__ */ s("span", {
|
|
513
551
|
style: g(i),
|
|
514
|
-
children: e?.length ?
|
|
552
|
+
children: e?.length ? q(e, t) : K(t, n, r)
|
|
515
553
|
});
|
|
516
554
|
}
|
|
517
|
-
var
|
|
555
|
+
var J = {
|
|
518
556
|
h1: 40,
|
|
519
557
|
h2: 32,
|
|
520
558
|
h3: 26,
|
|
@@ -522,7 +560,7 @@ var q = {
|
|
|
522
560
|
h5: 19,
|
|
523
561
|
h6: 16
|
|
524
562
|
};
|
|
525
|
-
function
|
|
563
|
+
function Y({ align: e = "center", width: t } = {}) {
|
|
526
564
|
let n = t ? `${t}%` : void 0;
|
|
527
565
|
return e === "full" ? { width: "100%" } : e === "left" ? {
|
|
528
566
|
float: "left",
|
|
@@ -545,8 +583,8 @@ function J({ align: e = "center", width: t } = {}) {
|
|
|
545
583
|
marginRight: "auto"
|
|
546
584
|
};
|
|
547
585
|
}
|
|
548
|
-
function
|
|
549
|
-
let r = n ?? ((e, n) =>
|
|
586
|
+
function ce(e = [], t, n) {
|
|
587
|
+
let r = n ?? ((e, n) => q(e, n, t));
|
|
550
588
|
return e.map((t, n) => {
|
|
551
589
|
let i = {
|
|
552
590
|
marginTop: 0,
|
|
@@ -568,7 +606,7 @@ function ae(e = [], t, n) {
|
|
|
568
606
|
marginLeft: 0,
|
|
569
607
|
marginRight: 0,
|
|
570
608
|
...i,
|
|
571
|
-
...
|
|
609
|
+
...Y(t)
|
|
572
610
|
},
|
|
573
611
|
children: [t.href ? /* @__PURE__ */ s("a", {
|
|
574
612
|
href: t.href,
|
|
@@ -585,15 +623,15 @@ function ae(e = [], t, n) {
|
|
|
585
623
|
})]
|
|
586
624
|
}, n);
|
|
587
625
|
}
|
|
588
|
-
if (t.type === "video") return
|
|
626
|
+
if (t.type === "video") return ye(t.url) ? /* @__PURE__ */ s("div", {
|
|
589
627
|
style: {
|
|
590
628
|
...i,
|
|
591
|
-
...
|
|
629
|
+
...Y({
|
|
592
630
|
align: t.align,
|
|
593
631
|
width: t.width ?? 100
|
|
594
632
|
})
|
|
595
633
|
},
|
|
596
|
-
children: /* @__PURE__ */ s(
|
|
634
|
+
children: /* @__PURE__ */ s(be, {
|
|
597
635
|
url: t.url,
|
|
598
636
|
autoplay: t.autoplay,
|
|
599
637
|
muted: t.muted,
|
|
@@ -622,17 +660,17 @@ function ae(e = [], t, n) {
|
|
|
622
660
|
}
|
|
623
661
|
if (t.type === "quote") return /* @__PURE__ */ s("blockquote", {
|
|
624
662
|
style: {
|
|
625
|
-
...
|
|
663
|
+
...ue,
|
|
626
664
|
...i
|
|
627
665
|
},
|
|
628
666
|
children: r(t.parts, t.text)
|
|
629
667
|
}, n);
|
|
630
|
-
if (
|
|
668
|
+
if (J[t.type]) {
|
|
631
669
|
let e = t.type;
|
|
632
670
|
return /* @__PURE__ */ s(e, {
|
|
633
671
|
style: {
|
|
634
|
-
...
|
|
635
|
-
fontSize:
|
|
672
|
+
...z,
|
|
673
|
+
fontSize: J[t.type],
|
|
636
674
|
...i
|
|
637
675
|
},
|
|
638
676
|
children: r(t.parts, t.text)
|
|
@@ -640,39 +678,39 @@ function ae(e = [], t, n) {
|
|
|
640
678
|
}
|
|
641
679
|
return /* @__PURE__ */ s("p", {
|
|
642
680
|
style: {
|
|
643
|
-
...
|
|
681
|
+
...B,
|
|
644
682
|
...i
|
|
645
683
|
},
|
|
646
684
|
children: r(t.parts, t.text)
|
|
647
685
|
}, n);
|
|
648
686
|
});
|
|
649
687
|
}
|
|
650
|
-
function
|
|
688
|
+
function le({ content: e, style: t, linked: n, nodeRef: r }) {
|
|
651
689
|
return /* @__PURE__ */ s("div", {
|
|
652
690
|
ref: r,
|
|
653
691
|
style: {
|
|
654
692
|
display: "flow-root",
|
|
655
693
|
...g(t)
|
|
656
694
|
},
|
|
657
|
-
children:
|
|
695
|
+
children: ce(e, n)
|
|
658
696
|
});
|
|
659
697
|
}
|
|
660
|
-
var
|
|
698
|
+
var ue = {
|
|
661
699
|
margin: 0,
|
|
662
700
|
padding: "8px 0 8px 20px",
|
|
663
701
|
borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
|
|
664
702
|
};
|
|
665
|
-
function
|
|
703
|
+
function de({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
666
704
|
return /* @__PURE__ */ s("blockquote", {
|
|
667
705
|
ref: i,
|
|
668
706
|
style: {
|
|
669
|
-
...
|
|
707
|
+
...ue,
|
|
670
708
|
...g(n)
|
|
671
709
|
},
|
|
672
|
-
children:
|
|
710
|
+
children: q(t, e, r)
|
|
673
711
|
});
|
|
674
712
|
}
|
|
675
|
-
function
|
|
713
|
+
function fe({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
676
714
|
return /* @__PURE__ */ s(e ? "ol" : "ul", {
|
|
677
715
|
ref: r,
|
|
678
716
|
style: {
|
|
@@ -682,53 +720,53 @@ function ce({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
|
682
720
|
},
|
|
683
721
|
children: t.map((e, t) => /* @__PURE__ */ s("li", {
|
|
684
722
|
style: { marginBottom: 4 },
|
|
685
|
-
children:
|
|
723
|
+
children: q(e.parts, e.text)
|
|
686
724
|
}, t))
|
|
687
725
|
});
|
|
688
726
|
}
|
|
689
|
-
function
|
|
727
|
+
function pe({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
690
728
|
return /* @__PURE__ */ s("p", {
|
|
691
729
|
ref: i,
|
|
692
730
|
style: {
|
|
693
|
-
...
|
|
731
|
+
...B,
|
|
694
732
|
...g(n)
|
|
695
733
|
},
|
|
696
|
-
children:
|
|
734
|
+
children: q(t, e, r)
|
|
697
735
|
});
|
|
698
736
|
}
|
|
699
|
-
var
|
|
737
|
+
var me = {
|
|
700
738
|
color: "var(--page-accent, inherit)",
|
|
701
739
|
textDecoration: "underline",
|
|
702
740
|
textUnderlineOffset: 3,
|
|
703
741
|
cursor: "pointer"
|
|
704
742
|
};
|
|
705
|
-
function
|
|
743
|
+
function he({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
706
744
|
return /* @__PURE__ */ s("a", {
|
|
707
745
|
ref: o,
|
|
708
746
|
href: n || "#",
|
|
709
747
|
target: r || void 0,
|
|
710
748
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
711
749
|
style: {
|
|
712
|
-
...
|
|
750
|
+
...me,
|
|
713
751
|
...g(i)
|
|
714
752
|
},
|
|
715
|
-
children:
|
|
753
|
+
children: q(t, e, a)
|
|
716
754
|
});
|
|
717
755
|
}
|
|
718
|
-
function
|
|
756
|
+
function ge({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
719
757
|
return /* @__PURE__ */ s("a", {
|
|
720
758
|
ref: o,
|
|
721
759
|
href: n || "#",
|
|
722
760
|
target: r || void 0,
|
|
723
761
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
724
762
|
style: {
|
|
725
|
-
...
|
|
763
|
+
...V,
|
|
726
764
|
...g(i)
|
|
727
765
|
},
|
|
728
|
-
children:
|
|
766
|
+
children: q(t, e, a)
|
|
729
767
|
});
|
|
730
768
|
}
|
|
731
|
-
function
|
|
769
|
+
function _e({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
732
770
|
return e ? /* @__PURE__ */ s("img", {
|
|
733
771
|
ref: r,
|
|
734
772
|
src: e,
|
|
@@ -740,7 +778,7 @@ function pe({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
|
740
778
|
}
|
|
741
779
|
}) : null;
|
|
742
780
|
}
|
|
743
|
-
function
|
|
781
|
+
function ve({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: c }) {
|
|
744
782
|
return e ? /* @__PURE__ */ s("video", {
|
|
745
783
|
ref: c,
|
|
746
784
|
src: e,
|
|
@@ -758,9 +796,9 @@ function me({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
|
|
|
758
796
|
}
|
|
759
797
|
}) : null;
|
|
760
798
|
}
|
|
761
|
-
var
|
|
762
|
-
function
|
|
763
|
-
let l =
|
|
799
|
+
var ye = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
|
|
800
|
+
function be({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: c }) {
|
|
801
|
+
let l = ye(e);
|
|
764
802
|
if (!l) return null;
|
|
765
803
|
let u = new URLSearchParams({ rel: "0" });
|
|
766
804
|
return t && u.set("autoplay", "1"), (n || t) && u.set("mute", "1"), i || u.set("controls", "0"), r && (u.set("loop", "1"), u.set("playlist", l)), Number(a) > 0 && u.set("start", String(Math.floor(Number(a)))), /* @__PURE__ */ s("div", {
|
|
@@ -786,7 +824,7 @@ function ge({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
|
|
|
786
824
|
})
|
|
787
825
|
});
|
|
788
826
|
}
|
|
789
|
-
function
|
|
827
|
+
function xe({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
|
|
790
828
|
return e ? /* @__PURE__ */ s("iframe", {
|
|
791
829
|
ref: i,
|
|
792
830
|
src: e,
|
|
@@ -802,7 +840,7 @@ function _e({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
|
|
|
802
840
|
}
|
|
803
841
|
}) : null;
|
|
804
842
|
}
|
|
805
|
-
function
|
|
843
|
+
function Se({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
806
844
|
let [o, c] = a(null);
|
|
807
845
|
return i(() => {
|
|
808
846
|
o && (o.innerHTML = e || "", t && o.querySelectorAll("script").forEach((e) => {
|
|
@@ -821,7 +859,7 @@ function ve({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
|
821
859
|
style: g(n)
|
|
822
860
|
});
|
|
823
861
|
}
|
|
824
|
-
function
|
|
862
|
+
function Ce({ height: e, nodeRef: t }) {
|
|
825
863
|
return /* @__PURE__ */ s("div", {
|
|
826
864
|
ref: t,
|
|
827
865
|
style: {
|
|
@@ -831,7 +869,7 @@ function ye({ height: e, nodeRef: t }) {
|
|
|
831
869
|
}
|
|
832
870
|
});
|
|
833
871
|
}
|
|
834
|
-
function
|
|
872
|
+
function we({ style: e, nodeRef: t }) {
|
|
835
873
|
return /* @__PURE__ */ s("div", {
|
|
836
874
|
ref: t,
|
|
837
875
|
style: {
|
|
@@ -842,7 +880,7 @@ function be({ style: e, nodeRef: t }) {
|
|
|
842
880
|
}
|
|
843
881
|
});
|
|
844
882
|
}
|
|
845
|
-
var
|
|
883
|
+
var Te = {
|
|
846
884
|
position: "absolute",
|
|
847
885
|
top: "50%",
|
|
848
886
|
transform: "translateY(-50%)",
|
|
@@ -859,7 +897,7 @@ var xe = {
|
|
|
859
897
|
alignItems: "center",
|
|
860
898
|
justifyContent: "center",
|
|
861
899
|
padding: 0
|
|
862
|
-
},
|
|
900
|
+
}, Ee = {
|
|
863
901
|
bottom: {
|
|
864
902
|
inset: "auto 0 0 0",
|
|
865
903
|
padding: "40px 24px 20px",
|
|
@@ -878,8 +916,8 @@ var xe = {
|
|
|
878
916
|
padding: 24,
|
|
879
917
|
textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
|
|
880
918
|
}
|
|
881
|
-
},
|
|
882
|
-
function
|
|
919
|
+
}, De = 48;
|
|
920
|
+
function Oe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: l = 320, swipe: u = !0, style: d, nodeRef: f }) {
|
|
883
921
|
let [p, m] = a(0), [h, _] = a(!1), [v, y] = a(null), b = e ? Math.min(p, e - 1) : 0;
|
|
884
922
|
if (i(() => {
|
|
885
923
|
if (!n || h || v || e < 2) return;
|
|
@@ -895,7 +933,7 @@ function we({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
895
933
|
let x = (t) => m((t + e) % e), S = () => {
|
|
896
934
|
if (!v) return;
|
|
897
935
|
let { dx: e } = v;
|
|
898
|
-
y(null), e < -48 ? x(b + 1) : e >
|
|
936
|
+
y(null), e < -48 ? x(b + 1) : e > De && x(b - 1);
|
|
899
937
|
};
|
|
900
938
|
return /* @__PURE__ */ c("div", {
|
|
901
939
|
ref: f,
|
|
@@ -943,7 +981,7 @@ function we({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
943
981
|
type: "button",
|
|
944
982
|
"aria-label": "Previous slide",
|
|
945
983
|
style: {
|
|
946
|
-
...
|
|
984
|
+
...Te,
|
|
947
985
|
left: 12
|
|
948
986
|
},
|
|
949
987
|
onClick: () => x(b - 1),
|
|
@@ -953,7 +991,7 @@ function we({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
953
991
|
type: "button",
|
|
954
992
|
"aria-label": "Next slide",
|
|
955
993
|
style: {
|
|
956
|
-
...
|
|
994
|
+
...Te,
|
|
957
995
|
right: 12
|
|
958
996
|
},
|
|
959
997
|
onClick: () => x(b + 1),
|
|
@@ -987,7 +1025,7 @@ function we({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
987
1025
|
] })]
|
|
988
1026
|
});
|
|
989
1027
|
}
|
|
990
|
-
var
|
|
1028
|
+
var ke = (e, t) => ({
|
|
991
1029
|
position: "absolute",
|
|
992
1030
|
inset: 0,
|
|
993
1031
|
backgroundImage: e ? `url(${e})` : "none",
|
|
@@ -995,18 +1033,18 @@ var Te = (e, t) => ({
|
|
|
995
1033
|
backgroundSize: "cover",
|
|
996
1034
|
backgroundPosition: "center"
|
|
997
1035
|
});
|
|
998
|
-
function
|
|
999
|
-
return e.length ? /* @__PURE__ */ s(
|
|
1036
|
+
function Ae({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
|
|
1037
|
+
return e.length ? /* @__PURE__ */ s(Oe, {
|
|
1000
1038
|
...r,
|
|
1001
1039
|
count: e.length,
|
|
1002
1040
|
renderSlide: (r) => {
|
|
1003
1041
|
let i = e[r];
|
|
1004
|
-
return /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s("div", { style:
|
|
1042
|
+
return /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s("div", { style: ke(i.image) }), (i.title || i.text) && /* @__PURE__ */ c("div", {
|
|
1005
1043
|
style: {
|
|
1006
1044
|
position: "absolute",
|
|
1007
1045
|
color: "#fff",
|
|
1008
1046
|
textAlign: n,
|
|
1009
|
-
...
|
|
1047
|
+
...Ee[t] ?? Ee.bottom
|
|
1010
1048
|
},
|
|
1011
1049
|
children: [i.title && /* @__PURE__ */ s("div", {
|
|
1012
1050
|
style: {
|
|
@@ -1026,13 +1064,13 @@ function Ee({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
|
|
|
1026
1064
|
}
|
|
1027
1065
|
}) : null;
|
|
1028
1066
|
}
|
|
1029
|
-
function
|
|
1030
|
-
return e.length ? /* @__PURE__ */ s(
|
|
1067
|
+
function je({ slides: e = [], linked: t, ...n }) {
|
|
1068
|
+
return e.length ? /* @__PURE__ */ s(Oe, {
|
|
1031
1069
|
...n,
|
|
1032
1070
|
count: e.length,
|
|
1033
1071
|
renderSlide: (n) => {
|
|
1034
1072
|
let r = e[n];
|
|
1035
|
-
return /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s("div", { style:
|
|
1073
|
+
return /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s("div", { style: ke(r.image, r.color) }), /* @__PURE__ */ s("div", {
|
|
1036
1074
|
style: {
|
|
1037
1075
|
position: "absolute",
|
|
1038
1076
|
inset: 0,
|
|
@@ -1049,14 +1087,14 @@ var X = {
|
|
|
1049
1087
|
textDecoration: "none",
|
|
1050
1088
|
fontSize: 14,
|
|
1051
1089
|
opacity: .85
|
|
1052
|
-
},
|
|
1090
|
+
}, Me = {
|
|
1053
1091
|
background: "var(--page-bg, #ffffff)",
|
|
1054
1092
|
color: "var(--page-text, #111827)",
|
|
1055
1093
|
border: "1px solid rgba(148, 163, 184, 0.25)",
|
|
1056
1094
|
boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
|
|
1057
1095
|
zIndex: 60
|
|
1058
1096
|
};
|
|
1059
|
-
function
|
|
1097
|
+
function Ne({ brand: e, logo: n, links: r = [], style: o, nodeRef: l, menu: u = "auto", breakpoint: d = 768 }) {
|
|
1060
1098
|
let [f, p] = a(null), [m, h] = a(!1), [_, v] = a(!1), [y, b] = a(null);
|
|
1061
1099
|
i(() => {
|
|
1062
1100
|
if (!f) return;
|
|
@@ -1167,7 +1205,7 @@ function ke({ brand: e, logo: n, links: r = [], style: o, nodeRef: l, menu: u =
|
|
|
1167
1205
|
]
|
|
1168
1206
|
}), y === e.key && (n ? /* @__PURE__ */ s("div", {
|
|
1169
1207
|
style: {
|
|
1170
|
-
...
|
|
1208
|
+
...Me,
|
|
1171
1209
|
position: "absolute",
|
|
1172
1210
|
left: 0,
|
|
1173
1211
|
right: 0,
|
|
@@ -1183,7 +1221,7 @@ function ke({ brand: e, logo: n, links: r = [], style: o, nodeRef: l, menu: u =
|
|
|
1183
1221
|
}))
|
|
1184
1222
|
}) : /* @__PURE__ */ s("div", {
|
|
1185
1223
|
style: {
|
|
1186
|
-
...
|
|
1224
|
+
...Me,
|
|
1187
1225
|
position: "absolute",
|
|
1188
1226
|
top: "100%",
|
|
1189
1227
|
left: 0,
|
|
@@ -1223,7 +1261,7 @@ function ke({ brand: e, logo: n, links: r = [], style: o, nodeRef: l, menu: u =
|
|
|
1223
1261
|
]
|
|
1224
1262
|
});
|
|
1225
1263
|
}
|
|
1226
|
-
function
|
|
1264
|
+
function Pe({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
1227
1265
|
let [i, o] = a(0), l = e.length ? Math.min(i, e.length - 1) : 0;
|
|
1228
1266
|
return e.length ? /* @__PURE__ */ c("div", {
|
|
1229
1267
|
ref: r,
|
|
@@ -1263,7 +1301,7 @@ function Ae({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
|
1263
1301
|
}, e.key))]
|
|
1264
1302
|
}) : null;
|
|
1265
1303
|
}
|
|
1266
|
-
function
|
|
1304
|
+
function Fe({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
|
|
1267
1305
|
let [o, l] = a(() => new Set(e.length ? [e[0].key] : []));
|
|
1268
1306
|
if (!e.length) return null;
|
|
1269
1307
|
let u = (e) => l((t) => {
|
|
@@ -1320,11 +1358,11 @@ function je({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }
|
|
|
1320
1358
|
})
|
|
1321
1359
|
});
|
|
1322
1360
|
}
|
|
1323
|
-
var
|
|
1361
|
+
var Ie = {
|
|
1324
1362
|
display: "flex",
|
|
1325
1363
|
flexDirection: "column",
|
|
1326
1364
|
gap: "12px"
|
|
1327
|
-
},
|
|
1365
|
+
}, Le = {
|
|
1328
1366
|
fontSize: "14px",
|
|
1329
1367
|
fontWeight: 500,
|
|
1330
1368
|
color: "var(--page-text, #111827)"
|
|
@@ -1338,19 +1376,19 @@ var Me = {
|
|
|
1338
1376
|
boxSizing: "border-box",
|
|
1339
1377
|
backgroundColor: "#ffffff",
|
|
1340
1378
|
color: "#111827"
|
|
1341
|
-
},
|
|
1379
|
+
}, Re = {
|
|
1342
1380
|
display: "flex",
|
|
1343
1381
|
alignItems: "center",
|
|
1344
1382
|
gap: "8px",
|
|
1345
1383
|
fontSize: "14px",
|
|
1346
1384
|
color: "var(--page-text, #111827)"
|
|
1347
|
-
},
|
|
1385
|
+
}, ze = (e) => e ? {
|
|
1348
1386
|
readOnly: !0,
|
|
1349
1387
|
tabIndex: -1,
|
|
1350
1388
|
onMouseDown: (e) => e.preventDefault()
|
|
1351
1389
|
} : {};
|
|
1352
|
-
function
|
|
1353
|
-
let { tenant: h, apiUrl: _ } = r(
|
|
1390
|
+
function Be({ style: e, action: t, method: n, name: i, enctype: o, formSlug: l, nodeRef: u, inert: d, children: f, linked: p, show: m }) {
|
|
1391
|
+
let { tenant: h, apiUrl: _ } = r(R), [v, y] = a("form"), b = d ? m || "form" : v;
|
|
1354
1392
|
return /* @__PURE__ */ c("div", {
|
|
1355
1393
|
ref: u,
|
|
1356
1394
|
style: g(e),
|
|
@@ -1396,7 +1434,7 @@ function Ie({ style: e, action: t, method: n, name: i, enctype: o, formSlug: l,
|
|
|
1396
1434
|
}
|
|
1397
1435
|
},
|
|
1398
1436
|
style: {
|
|
1399
|
-
...
|
|
1437
|
+
...Ie,
|
|
1400
1438
|
display: b === "success" ? "none" : "flex"
|
|
1401
1439
|
},
|
|
1402
1440
|
children: f
|
|
@@ -1415,17 +1453,17 @@ function Ie({ style: e, action: t, method: n, name: i, enctype: o, formSlug: l,
|
|
|
1415
1453
|
]
|
|
1416
1454
|
});
|
|
1417
1455
|
}
|
|
1418
|
-
function
|
|
1456
|
+
function Ve({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
|
|
1419
1457
|
return /* @__PURE__ */ s("label", {
|
|
1420
1458
|
ref: r,
|
|
1421
1459
|
style: {
|
|
1422
|
-
...
|
|
1460
|
+
...Le,
|
|
1423
1461
|
...g(n)
|
|
1424
1462
|
},
|
|
1425
|
-
children:
|
|
1463
|
+
children: q(t, e, i)
|
|
1426
1464
|
});
|
|
1427
1465
|
}
|
|
1428
|
-
function
|
|
1466
|
+
function He({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
|
|
1429
1467
|
return /* @__PURE__ */ s("input", {
|
|
1430
1468
|
ref: a,
|
|
1431
1469
|
type: e,
|
|
@@ -1436,10 +1474,10 @@ function Re({ type: e = "text", name: t, placeholder: n, required: r, style: i,
|
|
|
1436
1474
|
...Z,
|
|
1437
1475
|
...g(i)
|
|
1438
1476
|
},
|
|
1439
|
-
...
|
|
1477
|
+
...ze(o)
|
|
1440
1478
|
});
|
|
1441
1479
|
}
|
|
1442
|
-
function
|
|
1480
|
+
function Ue({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
|
|
1443
1481
|
return /* @__PURE__ */ s("textarea", {
|
|
1444
1482
|
ref: a,
|
|
1445
1483
|
name: e || void 0,
|
|
@@ -1451,14 +1489,14 @@ function ze({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
|
|
|
1451
1489
|
resize: "vertical",
|
|
1452
1490
|
...g(i)
|
|
1453
1491
|
},
|
|
1454
|
-
...
|
|
1492
|
+
...ze(o)
|
|
1455
1493
|
});
|
|
1456
1494
|
}
|
|
1457
|
-
function
|
|
1495
|
+
function We({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: l }) {
|
|
1458
1496
|
return /* @__PURE__ */ c("label", {
|
|
1459
1497
|
ref: o,
|
|
1460
1498
|
style: {
|
|
1461
|
-
...
|
|
1499
|
+
...Re,
|
|
1462
1500
|
...g(a)
|
|
1463
1501
|
},
|
|
1464
1502
|
children: [/* @__PURE__ */ s("input", {
|
|
@@ -1475,7 +1513,7 @@ function Be({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
|
|
|
1475
1513
|
}), t]
|
|
1476
1514
|
});
|
|
1477
1515
|
}
|
|
1478
|
-
function
|
|
1516
|
+
function Ge({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
|
|
1479
1517
|
return /* @__PURE__ */ c("select", {
|
|
1480
1518
|
ref: a,
|
|
1481
1519
|
name: e || void 0,
|
|
@@ -1498,7 +1536,7 @@ function Ve({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
1498
1536
|
}, t))]
|
|
1499
1537
|
});
|
|
1500
1538
|
}
|
|
1501
|
-
function
|
|
1539
|
+
function Ke({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: o, inert: l }) {
|
|
1502
1540
|
let [u, d] = a(null);
|
|
1503
1541
|
return /* @__PURE__ */ c("label", {
|
|
1504
1542
|
ref: o,
|
|
@@ -1530,12 +1568,12 @@ function He({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
|
|
|
1530
1568
|
]
|
|
1531
1569
|
});
|
|
1532
1570
|
}
|
|
1533
|
-
function
|
|
1571
|
+
function qe({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
1534
1572
|
return /* @__PURE__ */ s("button", {
|
|
1535
1573
|
ref: n,
|
|
1536
1574
|
type: r ? "button" : "submit",
|
|
1537
1575
|
style: {
|
|
1538
|
-
...
|
|
1576
|
+
...V,
|
|
1539
1577
|
border: 0,
|
|
1540
1578
|
cursor: "pointer",
|
|
1541
1579
|
alignSelf: "flex-start",
|
|
@@ -1544,46 +1582,64 @@ function Ue({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
|
1544
1582
|
children: e
|
|
1545
1583
|
});
|
|
1546
1584
|
}
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1585
|
+
function Je({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
1586
|
+
let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
|
|
1587
|
+
return /* @__PURE__ */ s("div", {
|
|
1588
|
+
ref: r,
|
|
1589
|
+
style: {
|
|
1590
|
+
display: "grid",
|
|
1591
|
+
gridTemplateColumns: `repeat(${Math.max(1, Number(e) || 1)}, minmax(0, 1fr))`,
|
|
1592
|
+
gap: 16,
|
|
1593
|
+
width: "100%",
|
|
1594
|
+
...g(n)
|
|
1595
|
+
},
|
|
1596
|
+
children: Array.from({ length: a }, (e, t) => /* @__PURE__ */ s("div", {
|
|
1597
|
+
style: { minWidth: 0 },
|
|
1598
|
+
children: i?.[`cell-${t}`] ?? null
|
|
1599
|
+
}, t))
|
|
1600
|
+
});
|
|
1601
|
+
}
|
|
1602
|
+
var Ye = {
|
|
1603
|
+
PageRoot: re,
|
|
1604
|
+
Section: ie,
|
|
1605
|
+
Container: ae,
|
|
1606
|
+
Heading: oe,
|
|
1607
|
+
TextBlock: pe,
|
|
1608
|
+
ButtonBlock: ge,
|
|
1609
|
+
ImageBlock: _e,
|
|
1610
|
+
Spacer: Ce,
|
|
1611
|
+
Divider: we,
|
|
1612
|
+
SliderBlock: Ae,
|
|
1613
|
+
CanvasSlider: je,
|
|
1614
|
+
TabsBlock: Pe,
|
|
1615
|
+
QuickStack: Je,
|
|
1616
|
+
AccordionBlock: Fe,
|
|
1617
|
+
NavbarBlock: Ne,
|
|
1618
|
+
ListBlock: fe,
|
|
1619
|
+
TextSpan: se,
|
|
1620
|
+
QuoteBlock: de,
|
|
1621
|
+
TextLink: he,
|
|
1622
|
+
RichTextBlock: le,
|
|
1623
|
+
RichContentBlock: le,
|
|
1624
|
+
VideoBlock: ve,
|
|
1625
|
+
YouTubeBlock: be,
|
|
1626
|
+
IframeBlock: xe,
|
|
1627
|
+
EmbedBlock: Se,
|
|
1628
|
+
FormBlock: Be,
|
|
1629
|
+
FormLabel: Ve,
|
|
1630
|
+
FormInput: He,
|
|
1631
|
+
FormTextarea: Ue,
|
|
1632
|
+
FormCheckbox: (e) => /* @__PURE__ */ s(We, {
|
|
1577
1633
|
kind: "checkbox",
|
|
1578
1634
|
...e
|
|
1579
1635
|
}),
|
|
1580
|
-
FormRadio: (e) => /* @__PURE__ */ s(
|
|
1636
|
+
FormRadio: (e) => /* @__PURE__ */ s(We, {
|
|
1581
1637
|
kind: "radio",
|
|
1582
1638
|
...e
|
|
1583
1639
|
}),
|
|
1584
|
-
FormSelect:
|
|
1585
|
-
FormFile:
|
|
1586
|
-
FormSubmit:
|
|
1640
|
+
FormSelect: Ge,
|
|
1641
|
+
FormFile: Ke,
|
|
1642
|
+
FormSubmit: qe
|
|
1587
1643
|
};
|
|
1588
1644
|
//#endregion
|
|
1589
1645
|
//#region ../ui/src/components/builder/render.jsx
|
|
@@ -1597,7 +1653,7 @@ function Q(e, n, r, i = /* @__PURE__ */ new Set()) {
|
|
|
1597
1653
|
let c = new Set(i).add(n);
|
|
1598
1654
|
return /* @__PURE__ */ s(t, { children: Q(o.template.rootId, o.template.nodes, r, c) }, e);
|
|
1599
1655
|
}
|
|
1600
|
-
let c =
|
|
1656
|
+
let c = Ye[o];
|
|
1601
1657
|
if (!c) return null;
|
|
1602
1658
|
let l = (a.nodes ?? []).map((e) => Q(e, n, r, i)).filter(Boolean), u = Object.entries(a.linkedNodes ?? {}), d = u.length ? Object.fromEntries(u.map(([e, t]) => [e, Q(t, n, r, i)])) : void 0;
|
|
1603
1659
|
return /* @__PURE__ */ s(c, {
|
|
@@ -1611,8 +1667,8 @@ function Q(e, n, r, i = /* @__PURE__ */ new Set()) {
|
|
|
1611
1667
|
}
|
|
1612
1668
|
//#endregion
|
|
1613
1669
|
//#region ../ui/src/components/builder/PageRenderer.jsx
|
|
1614
|
-
var
|
|
1615
|
-
function
|
|
1670
|
+
var Xe = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" ");
|
|
1671
|
+
function Ze({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, custom: o, tenant: l, apiUrl: d }) {
|
|
1616
1672
|
let p = o?.js?.trim();
|
|
1617
1673
|
if (i(() => {
|
|
1618
1674
|
if (!p) return;
|
|
@@ -1623,12 +1679,12 @@ function Ke({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
1623
1679
|
minHeight: "100%",
|
|
1624
1680
|
display: "flex",
|
|
1625
1681
|
flexDirection: "column"
|
|
1626
|
-
}, h = Q("ROOT", e, n), g =
|
|
1682
|
+
}, h = Q("ROOT", e, n), g = E(e, n), _ = te(e, n), v = o?.css?.trim(), y = f(e, n).map((e) => /* @__PURE__ */ s("link", {
|
|
1627
1683
|
rel: "stylesheet",
|
|
1628
1684
|
precedence: "default",
|
|
1629
1685
|
href: u(e)
|
|
1630
1686
|
}, e));
|
|
1631
|
-
if (r !== "auto") return /* @__PURE__ */ s(
|
|
1687
|
+
if (r !== "auto") return /* @__PURE__ */ s(R.Provider, {
|
|
1632
1688
|
value: {
|
|
1633
1689
|
tenant: l || "",
|
|
1634
1690
|
apiUrl: d || "/api"
|
|
@@ -1636,19 +1692,20 @@ function Ke({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
1636
1692
|
children: /* @__PURE__ */ c("div", {
|
|
1637
1693
|
style: {
|
|
1638
1694
|
...m,
|
|
1639
|
-
...
|
|
1695
|
+
...I(t, r),
|
|
1640
1696
|
...a
|
|
1641
1697
|
},
|
|
1642
1698
|
children: [
|
|
1643
|
-
|
|
1699
|
+
y,
|
|
1644
1700
|
g && /* @__PURE__ */ s("style", { children: g }),
|
|
1645
1701
|
_ && /* @__PURE__ */ s("style", { children: _ }),
|
|
1702
|
+
v && /* @__PURE__ */ s("style", { children: v }),
|
|
1646
1703
|
h
|
|
1647
1704
|
]
|
|
1648
1705
|
})
|
|
1649
1706
|
});
|
|
1650
|
-
let
|
|
1651
|
-
return /* @__PURE__ */ s(
|
|
1707
|
+
let b = N(t);
|
|
1708
|
+
return /* @__PURE__ */ s(R.Provider, {
|
|
1652
1709
|
value: {
|
|
1653
1710
|
tenant: l || "",
|
|
1654
1711
|
apiUrl: d || "/api"
|
|
@@ -1657,15 +1714,16 @@ function Ke({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
1657
1714
|
className: "webim-page",
|
|
1658
1715
|
style: {
|
|
1659
1716
|
...m,
|
|
1660
|
-
...
|
|
1717
|
+
...F(t),
|
|
1661
1718
|
...a
|
|
1662
1719
|
},
|
|
1663
1720
|
children: [
|
|
1664
|
-
/* @__PURE__ */ s("style", { children: `.webim-page { ${
|
|
1665
|
-
@media (prefers-color-scheme: dark) { .webim-page { ${
|
|
1666
|
-
|
|
1721
|
+
/* @__PURE__ */ s("style", { children: `.webim-page { ${Xe(P(b.light))} }
|
|
1722
|
+
@media (prefers-color-scheme: dark) { .webim-page { ${Xe(P(b.dark))} } }` }),
|
|
1723
|
+
y,
|
|
1667
1724
|
g && /* @__PURE__ */ s("style", { children: g }),
|
|
1668
1725
|
_ && /* @__PURE__ */ s("style", { children: _ }),
|
|
1726
|
+
v && /* @__PURE__ */ s("style", { children: v }),
|
|
1669
1727
|
h
|
|
1670
1728
|
]
|
|
1671
1729
|
})
|
|
@@ -1673,8 +1731,8 @@ function Ke({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
1673
1731
|
}
|
|
1674
1732
|
//#endregion
|
|
1675
1733
|
//#region src/WebimContent.jsx
|
|
1676
|
-
function
|
|
1677
|
-
return e?.blocks?.ROOT ? /* @__PURE__ */ s(
|
|
1734
|
+
function Qe({ bundle: e, mode: t = "auto", style: n }) {
|
|
1735
|
+
return e?.blocks?.ROOT ? /* @__PURE__ */ s(Ze, {
|
|
1678
1736
|
blocks: e.blocks,
|
|
1679
1737
|
theme: e.theme,
|
|
1680
1738
|
components: e.components,
|
|
@@ -1687,7 +1745,7 @@ function qe({ bundle: e, mode: t = "auto", style: n }) {
|
|
|
1687
1745
|
}
|
|
1688
1746
|
//#endregion
|
|
1689
1747
|
//#region src/bundle.js
|
|
1690
|
-
function
|
|
1748
|
+
function $e({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
1691
1749
|
let a = {
|
|
1692
1750
|
...t?.global ?? {},
|
|
1693
1751
|
...t?.tenant ?? {}
|
|
@@ -1697,7 +1755,7 @@ function Je({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
1697
1755
|
title: e.title,
|
|
1698
1756
|
slug: e.slug,
|
|
1699
1757
|
blocks: i && o.i18n?.[i]?.blocks || e.blocks,
|
|
1700
|
-
theme:
|
|
1758
|
+
theme: L(o, a.builder_themes?.themes),
|
|
1701
1759
|
components: a.builder_components?.components ?? {},
|
|
1702
1760
|
custom: o.custom,
|
|
1703
1761
|
seo: o.seo,
|
|
@@ -1708,16 +1766,16 @@ function Je({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
1708
1766
|
}
|
|
1709
1767
|
//#endregion
|
|
1710
1768
|
//#region src/fetchPage.js
|
|
1711
|
-
var
|
|
1769
|
+
var et = async (e) => {
|
|
1712
1770
|
let t = await e.json().catch(() => null);
|
|
1713
1771
|
if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
|
|
1714
1772
|
return t?.payload ?? t;
|
|
1715
1773
|
};
|
|
1716
|
-
async function
|
|
1774
|
+
async function tt({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, fetch: a }) {
|
|
1717
1775
|
if (!e) throw Error("fetchPage: apiUrl is required");
|
|
1718
1776
|
if (!n) throw Error("fetchPage: slug is required");
|
|
1719
|
-
let o = a ?? fetch, s = e.replace(/\/$/, ""), c = t ? { "x-tenant": t } : {}, [l, u] = await Promise.all([o(`${s}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: c }).then(
|
|
1720
|
-
return
|
|
1777
|
+
let o = a ?? fetch, s = e.replace(/\/$/, ""), c = t ? { "x-tenant": t } : {}, [l, u] = await Promise.all([o(`${s}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: c }).then(et), o(`${s}/settings/public`, { headers: c }).then(et)]);
|
|
1778
|
+
return $e({
|
|
1721
1779
|
page: l,
|
|
1722
1780
|
settings: u,
|
|
1723
1781
|
tenant: t,
|
|
@@ -1733,14 +1791,14 @@ var $ = (e) => String(e ?? "").replace(/[&<>"]/g, (e) => ({
|
|
|
1733
1791
|
">": ">",
|
|
1734
1792
|
"\"": """
|
|
1735
1793
|
})[e]);
|
|
1736
|
-
function
|
|
1737
|
-
return e(/* @__PURE__ */ s(
|
|
1794
|
+
function nt(t, { mode: n = "auto", style: r } = {}) {
|
|
1795
|
+
return e(/* @__PURE__ */ s(Qe, {
|
|
1738
1796
|
bundle: t,
|
|
1739
1797
|
mode: n,
|
|
1740
1798
|
style: r
|
|
1741
1799
|
}));
|
|
1742
1800
|
}
|
|
1743
|
-
function
|
|
1801
|
+
function rt(e, { mode: t = "auto", lang: n = "en" } = {}) {
|
|
1744
1802
|
let r = e.seo ?? {}, i = r.title || e.title || e.slug || "Page", a = e.custom?.js?.trim(), o = [
|
|
1745
1803
|
"<meta charset=\"utf-8\"/>",
|
|
1746
1804
|
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>",
|
|
@@ -1757,10 +1815,10 @@ function Qe(e, { mode: t = "auto", lang: n = "en" } = {}) {
|
|
|
1757
1815
|
${o}
|
|
1758
1816
|
</head>
|
|
1759
1817
|
<body>
|
|
1760
|
-
${
|
|
1818
|
+
${nt(e, { mode: t })}
|
|
1761
1819
|
${a ? `<script>${a.replaceAll("<\/script", "<\\/script")}<\/script>` : ""}
|
|
1762
1820
|
</body>
|
|
1763
1821
|
</html>`;
|
|
1764
1822
|
}
|
|
1765
1823
|
//#endregion
|
|
1766
|
-
export {
|
|
1824
|
+
export { $e as assembleBundle, tt as fetchPage, nt as renderBundleHtml, rt as renderPageDocument };
|