@liforma/client 0.4.5 → 0.4.6
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/CHANGELOG.md +12 -0
- package/dist/next/index.js +5 -2
- package/dist/next/index.js.map +1 -1
- package/dist/next/v2/embed/iframeHost.d.ts +2 -1
- package/dist/next/v2/embed/iframeHost.d.ts.map +1 -1
- package/dist/next/v2/embed/protocol.d.ts +4 -1
- package/dist/next/v2/embed/protocol.d.ts.map +1 -1
- package/dist/next/v2/experience.d.ts +7 -2
- package/dist/next/v2/experience.d.ts.map +1 -1
- package/dist/next/v2/types/sessionInteraction.d.ts +30 -0
- package/dist/next/v2/types/sessionInteraction.d.ts.map +1 -1
- package/dist/npm/index.js +5 -2
- package/dist/npm/index.js.map +1 -1
- package/dist/npm/v2/embed/iframeHost.d.ts +2 -1
- package/dist/npm/v2/embed/iframeHost.d.ts.map +1 -1
- package/dist/npm/v2/embed/protocol.d.ts +4 -1
- package/dist/npm/v2/embed/protocol.d.ts.map +1 -1
- package/dist/npm/v2/experience.d.ts +7 -2
- package/dist/npm/v2/experience.d.ts.map +1 -1
- package/dist/npm/v2/index.d.ts +1 -1
- package/dist/npm/v2/index.d.ts.map +1 -1
- package/dist/npm/v2/npm.d.ts +1 -1
- package/dist/npm/v2/npm.d.ts.map +1 -1
- package/dist/npm/v2/types/sessionInteraction.d.ts +30 -0
- package/dist/npm/v2/types/sessionInteraction.d.ts.map +1 -1
- package/dist/react/component/experienceComponentRuntime.d.ts +1 -0
- package/dist/react/component/experienceComponentRuntime.d.ts.map +1 -1
- package/dist/react/component/experienceComponentTypes.d.ts +5 -0
- package/dist/react/component/experienceComponentTypes.d.ts.map +1 -1
- package/dist/react/index.js +100 -94
- package/dist/react/index.js.map +1 -1
- package/dist/react/react/Experience.d.ts.map +1 -1
- package/dist/react/v2/embed/iframeHost.d.ts +2 -1
- package/dist/react/v2/embed/iframeHost.d.ts.map +1 -1
- package/dist/react/v2/embed/protocol.d.ts +4 -1
- package/dist/react/v2/embed/protocol.d.ts.map +1 -1
- package/dist/react/v2/experience.d.ts +7 -2
- package/dist/react/v2/experience.d.ts.map +1 -1
- package/dist/react/v2/types/sessionInteraction.d.ts +30 -0
- package/dist/react/v2/types/sessionInteraction.d.ts.map +1 -1
- package/dist/sdk/v2/client.js +2 -2
- package/dist/sdk/v2/client.js.map +1 -1
- package/dist/svelte/Experience.svelte +2 -0
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -234,6 +234,7 @@ function N(e = () => ({}), t = () => ({})) {
|
|
|
234
234
|
container: n,
|
|
235
235
|
fit: d.fit,
|
|
236
236
|
startButton: d.startButton,
|
|
237
|
+
theme: d.theme,
|
|
237
238
|
showFeedback: d.showFeedback,
|
|
238
239
|
closeButton: d.closeButton,
|
|
239
240
|
returnUrl: f,
|
|
@@ -327,42 +328,44 @@ function ee(e, t) {
|
|
|
327
328
|
//#endregion
|
|
328
329
|
//#region src/react/Experience.tsx
|
|
329
330
|
var te = e(function(e, a) {
|
|
330
|
-
let { returnUrl: c, fit: l, startButton: u,
|
|
331
|
+
let { returnUrl: c, fit: l, startButton: u, theme: p, showFeedback: m, closeButton: h, onReady: g, onStarted: y, onUserTranscript: b, onUserSpeechStarted: x, onUserSpeechEnded: S, onCharacterSpeechStarted: C, onCharacterSpeechEnded: w, onCharacterFocusChanged: T, onConversationUpdate: E, onMessage: k, onListeningState: A, onActivityChange: j, onFeedback: M, onFeedbackFailed: P, onConversationProcessorError: F, onPlayerStatusChange: I, onStateUpdate: te, onClose: ne, onError: L } = e, re = o({}), ie = o({
|
|
331
332
|
fit: l,
|
|
332
333
|
startButton: u,
|
|
333
|
-
|
|
334
|
-
|
|
334
|
+
theme: p,
|
|
335
|
+
showFeedback: m,
|
|
336
|
+
closeButton: h,
|
|
335
337
|
returnUrl: c
|
|
336
|
-
}), R = o(N(() =>
|
|
337
|
-
|
|
338
|
+
}), R = o(N(() => re.current, () => ie.current)), z = o(null), [B, ae] = s(!1), [V, oe] = s(null), se = o(null), ce = o(null), H = v(e);
|
|
339
|
+
ie.current = {
|
|
338
340
|
fit: l,
|
|
339
341
|
startButton: u,
|
|
340
|
-
|
|
341
|
-
|
|
342
|
+
theme: p,
|
|
343
|
+
showFeedback: m,
|
|
344
|
+
closeButton: h,
|
|
342
345
|
returnUrl: c
|
|
343
|
-
},
|
|
344
|
-
onReady:
|
|
345
|
-
onStarted:
|
|
346
|
-
onUserTranscript:
|
|
347
|
-
onUserSpeechStarted:
|
|
348
|
-
onUserSpeechEnded:
|
|
349
|
-
onCharacterSpeechStarted:
|
|
350
|
-
onCharacterSpeechEnded:
|
|
351
|
-
onCharacterFocusChanged:
|
|
352
|
-
onConversationUpdate:
|
|
353
|
-
onMessage:
|
|
354
|
-
onListeningState:
|
|
355
|
-
onActivityChange:
|
|
356
|
-
onFeedback:
|
|
357
|
-
onFeedbackFailed:
|
|
358
|
-
onConversationProcessorError:
|
|
359
|
-
onPlayerStatusChange:
|
|
360
|
-
onStateUpdate:
|
|
361
|
-
onClose:
|
|
362
|
-
onError:
|
|
346
|
+
}, re.current = {
|
|
347
|
+
onReady: g,
|
|
348
|
+
onStarted: y,
|
|
349
|
+
onUserTranscript: b,
|
|
350
|
+
onUserSpeechStarted: x,
|
|
351
|
+
onUserSpeechEnded: S,
|
|
352
|
+
onCharacterSpeechStarted: C,
|
|
353
|
+
onCharacterSpeechEnded: w,
|
|
354
|
+
onCharacterFocusChanged: T,
|
|
355
|
+
onConversationUpdate: E,
|
|
356
|
+
onMessage: k,
|
|
357
|
+
onListeningState: A,
|
|
358
|
+
onActivityChange: j,
|
|
359
|
+
onFeedback: M,
|
|
360
|
+
onFeedbackFailed: P,
|
|
361
|
+
onConversationProcessorError: F,
|
|
362
|
+
onPlayerStatusChange: I,
|
|
363
|
+
onStateUpdate: te,
|
|
364
|
+
onClose: ne,
|
|
365
|
+
onError: L
|
|
363
366
|
};
|
|
364
|
-
let
|
|
365
|
-
|
|
367
|
+
let le = t((e) => {
|
|
368
|
+
se.current = e, ae(e !== null);
|
|
366
369
|
}, []);
|
|
367
370
|
return r(a, () => ({
|
|
368
371
|
ready: () => {
|
|
@@ -394,30 +397,30 @@ var te = e(function(e, a) {
|
|
|
394
397
|
conversion: (e) => R.current.withSession((t) => t.conversion(e)),
|
|
395
398
|
end: () => R.current.withSession((e) => e.end())
|
|
396
399
|
}), []), i(() => {
|
|
397
|
-
if (!
|
|
398
|
-
let t =
|
|
400
|
+
if (!B || !se.current) return;
|
|
401
|
+
let t = se.current, n = R.current, r;
|
|
399
402
|
try {
|
|
400
403
|
r = { options: _(e) };
|
|
401
404
|
} catch (e) {
|
|
402
405
|
r = { error: O(e) };
|
|
403
406
|
}
|
|
404
|
-
let i = n.activateGeneration(t, r, c,
|
|
407
|
+
let i = n.activateGeneration(t, r, c, oe);
|
|
405
408
|
return z.current = i, () => {
|
|
406
409
|
n.cancelGeneration(i), z.current === i && (z.current = null);
|
|
407
410
|
};
|
|
408
411
|
}, [
|
|
409
|
-
|
|
410
|
-
|
|
412
|
+
B,
|
|
413
|
+
H,
|
|
411
414
|
c
|
|
412
415
|
]), n(() => {
|
|
413
416
|
let e = R.current.getActiveInstance();
|
|
414
417
|
e && e.setFit(l ?? "full");
|
|
415
418
|
}, [l]), n(() => {
|
|
416
|
-
let e =
|
|
417
|
-
if (!e || (e.replaceChildren(), !
|
|
418
|
-
let t = ee(e,
|
|
419
|
+
let e = ce.current;
|
|
420
|
+
if (!e || (e.replaceChildren(), !V)) return;
|
|
421
|
+
let t = ee(e, V);
|
|
419
422
|
return () => t.remove();
|
|
420
|
-
}, [
|
|
423
|
+
}, [V]), /* @__PURE__ */ f("div", {
|
|
421
424
|
className: "liforma-experience-shell",
|
|
422
425
|
style: {
|
|
423
426
|
position: "relative",
|
|
@@ -426,17 +429,17 @@ var te = e(function(e, a) {
|
|
|
426
429
|
minHeight: "inherit"
|
|
427
430
|
},
|
|
428
431
|
children: [/* @__PURE__ */ d("div", {
|
|
429
|
-
ref:
|
|
432
|
+
ref: ce,
|
|
430
433
|
className: "liforma-experience-error-host",
|
|
431
|
-
"aria-hidden":
|
|
434
|
+
"aria-hidden": V ? void 0 : !0,
|
|
432
435
|
style: {
|
|
433
436
|
position: "absolute",
|
|
434
437
|
inset: 0,
|
|
435
438
|
zIndex: 20,
|
|
436
|
-
pointerEvents:
|
|
439
|
+
pointerEvents: V ? "auto" : "none"
|
|
437
440
|
}
|
|
438
441
|
}), /* @__PURE__ */ d("div", {
|
|
439
|
-
ref:
|
|
442
|
+
ref: le,
|
|
440
443
|
className: "liforma-experience-host",
|
|
441
444
|
style: {
|
|
442
445
|
position: "absolute",
|
|
@@ -453,27 +456,27 @@ function ne(e) {
|
|
|
453
456
|
}
|
|
454
457
|
//#endregion
|
|
455
458
|
//#region src/thumbnail/toGalleryThumbUrl.ts
|
|
456
|
-
var L = /(\/avatars\/[^/]+\/)(\d+)(\/)/i, re = /_CH(\.webp)/i,
|
|
457
|
-
function
|
|
459
|
+
var L = /(\/avatars\/[^/]+\/)(\d+)(\/)/i, re = /_CH(\.webp)/i, ie = /(-)(\d+x\d+)(\.webp)(\?|$)/i;
|
|
460
|
+
function R(e) {
|
|
458
461
|
let t = e.trim();
|
|
459
462
|
if (!t) return t;
|
|
460
463
|
let n = t.replace(L, (e, t, n, r) => n === "256" ? `${t}${n}${r}` : `${t}256${r}`);
|
|
461
|
-
return n = n.replace(re, "_neutral$1"), n = n.replace(
|
|
464
|
+
return n = n.replace(re, "_neutral$1"), n = n.replace(ie, (e, t, n, r, i) => n === "256x256" ? `${t}${n}${r}${i}` : `${t}256x256${r}${i}`), n;
|
|
462
465
|
}
|
|
463
|
-
function
|
|
466
|
+
function z(e) {
|
|
464
467
|
let t = e.avatarImage?.trim() || e.galleryThumb?.avatarImage?.trim() || "";
|
|
465
468
|
if (!t) return null;
|
|
466
469
|
let n = e.backgroundImage?.trim() || e.galleryThumb?.backgroundImage?.trim() || "", r = e.foregroundImage?.trim() || e.galleryThumb?.foregroundImage?.trim() || "", i = e.fallbackImage?.trim() || "";
|
|
467
470
|
return {
|
|
468
|
-
avatarImage:
|
|
469
|
-
...n ? { backgroundImage:
|
|
470
|
-
...r ? { foregroundImage:
|
|
471
|
-
...i ? { fallbackImage:
|
|
471
|
+
avatarImage: R(t),
|
|
472
|
+
...n ? { backgroundImage: R(n) } : {},
|
|
473
|
+
...r ? { foregroundImage: R(r) } : {},
|
|
474
|
+
...i ? { fallbackImage: R(i) } : {}
|
|
472
475
|
};
|
|
473
476
|
}
|
|
474
477
|
//#endregion
|
|
475
478
|
//#region src/shims/localStack.ts
|
|
476
|
-
function
|
|
479
|
+
function B() {
|
|
477
480
|
if (globalThis.__LIFORMA_STACK === "local") return !0;
|
|
478
481
|
if (typeof location > "u") return !1;
|
|
479
482
|
try {
|
|
@@ -484,13 +487,13 @@ function ae() {
|
|
|
484
487
|
}
|
|
485
488
|
//#endregion
|
|
486
489
|
//#region src/thumbnail/hostedLaunchUrl.ts
|
|
487
|
-
var
|
|
490
|
+
var ae = "https://player.liforma.ai", V = "http://localhost:3002";
|
|
488
491
|
function oe(e) {
|
|
489
492
|
return e.href?.trim() ? "anchor" : e.hasClickHandler ? "button" : e.experienceId?.trim() ? "anchor" : "presentational";
|
|
490
493
|
}
|
|
491
494
|
function se(e) {
|
|
492
495
|
let t = e?.trim();
|
|
493
|
-
return t ? t.replace(/\/$/, "") :
|
|
496
|
+
return t ? t.replace(/\/$/, "") : B() ? V : ae;
|
|
494
497
|
}
|
|
495
498
|
function ce(e) {
|
|
496
499
|
let t = e.experienceId.trim(), n = se(e.playerBaseUrl), r = new URL(`${n}/${encodeURIComponent(t)}`), i = e.returnUrl?.trim();
|
|
@@ -671,7 +674,7 @@ function ke(e, t) {
|
|
|
671
674
|
return `${e} liforma-et__media${t ? " liforma-et__media--ready" : ""}`;
|
|
672
675
|
}
|
|
673
676
|
function Ae(e) {
|
|
674
|
-
let { galleryThumb: t, avatarImage: r, backgroundImage: i, foregroundImage: c, alt: l, experienceId: p, href: m, target: h, rel: g, onClick: _, returnUrl: v, playerBaseUrl: y, parallax: b = !0, fit: x = "full", lazy: S = !0, className: C = "", fallbackImage: w } = e, T = a(() =>
|
|
677
|
+
let { galleryThumb: t, avatarImage: r, backgroundImage: i, foregroundImage: c, alt: l, experienceId: p, href: m, target: h, rel: g, onClick: _, returnUrl: v, playerBaseUrl: y, parallax: b = !0, fit: x = "full", lazy: S = !0, className: C = "", fallbackImage: w } = e, T = a(() => z({
|
|
675
678
|
galleryThumb: t,
|
|
676
679
|
avatarImage: r,
|
|
677
680
|
backgroundImage: i,
|
|
@@ -687,7 +690,7 @@ function Ae(e) {
|
|
|
687
690
|
href: m,
|
|
688
691
|
hasClickHandler: typeof _ == "function",
|
|
689
692
|
experienceId: p
|
|
690
|
-
}), D = E === "anchor" && !m?.trim() && !!p?.trim(), O = !!T?.backgroundImage, k = b !== !1, A = o(null), j = o(!1), [M, N] = s(!S), [P, F] = s(!1), [I, ee] = s(!1), [te, L] = s(0), [re,
|
|
693
|
+
}), D = E === "anchor" && !m?.trim() && !!p?.trim(), O = !!T?.backgroundImage, k = b !== !1, A = o(null), j = o(!1), [M, N] = s(!S), [P, F] = s(!1), [I, ee] = s(!1), [te, L] = s(0), [re, ie] = s(0), [R, B] = s(!1), [ae, V] = s(!1), [se, ce] = s(!1), [le, U] = s(!1), [ue, de] = s(), W = T ? R && T.fallbackImage ? T.fallbackImage : T.avatarImage : "";
|
|
691
694
|
n(() => {
|
|
692
695
|
Oe(Ee);
|
|
693
696
|
}, []), n(() => {
|
|
@@ -705,7 +708,7 @@ function Ae(e) {
|
|
|
705
708
|
y,
|
|
706
709
|
D
|
|
707
710
|
]), n(() => {
|
|
708
|
-
V(!1), ce(!1), U(!1),
|
|
711
|
+
V(!1), ce(!1), U(!1), B(!1);
|
|
709
712
|
}, [
|
|
710
713
|
T?.backgroundImage,
|
|
711
714
|
T?.foregroundImage,
|
|
@@ -730,7 +733,7 @@ function Ae(e) {
|
|
|
730
733
|
let e = A.current;
|
|
731
734
|
if (!(!e || !k)) return we(e, {
|
|
732
735
|
onParallax: (e) => {
|
|
733
|
-
ee(!0), j.current || (L(e),
|
|
736
|
+
ee(!0), j.current || (L(e), ie(0));
|
|
734
737
|
},
|
|
735
738
|
pointerActive: () => j.current
|
|
736
739
|
});
|
|
@@ -743,10 +746,10 @@ function Ae(e) {
|
|
|
743
746
|
let fe = (e) => {
|
|
744
747
|
if (!k || I) return;
|
|
745
748
|
let t = e.currentTarget.getBoundingClientRect();
|
|
746
|
-
t.width <= 0 || t.height <= 0 || (L(((e.clientX - t.left) / t.width - .5) * 2),
|
|
749
|
+
t.width <= 0 || t.height <= 0 || (L(((e.clientX - t.left) / t.width - .5) * 2), ie(((e.clientY - t.top) / t.height - .5) * 2));
|
|
747
750
|
}, pe = (e) => {
|
|
748
751
|
let t = j.current;
|
|
749
|
-
j.current = !1, F(!1), I && t ? (L(ye(e.getBoundingClientRect(), window.innerHeight)),
|
|
752
|
+
j.current = !1, F(!1), I && t ? (L(ye(e.getBoundingClientRect(), window.innerHeight)), ie(0)) : I || (L(0), ie(0));
|
|
750
753
|
}, me = (e) => {
|
|
751
754
|
if (!k) return;
|
|
752
755
|
j.current = !0, e.pointerType === "mouse" && F(!0);
|
|
@@ -765,7 +768,7 @@ function Ae(e) {
|
|
|
765
768
|
}
|
|
766
769
|
};
|
|
767
770
|
if (!T) return null;
|
|
768
|
-
let ge = k && (P || I), ve = M && (se ||
|
|
771
|
+
let ge = k && (P || I), ve = M && (se || ae || le), G = [
|
|
769
772
|
"liforma-et",
|
|
770
773
|
O ? "liforma-et--scene" : "",
|
|
771
774
|
ne(x),
|
|
@@ -785,7 +788,7 @@ function Ae(e) {
|
|
|
785
788
|
"aria-hidden": "true"
|
|
786
789
|
}),
|
|
787
790
|
M && T.backgroundImage ? /* @__PURE__ */ d("img", {
|
|
788
|
-
className: ke("liforma-et__background",
|
|
791
|
+
className: ke("liforma-et__background", ae),
|
|
789
792
|
src: T.backgroundImage,
|
|
790
793
|
alt: "",
|
|
791
794
|
decoding: "async",
|
|
@@ -805,7 +808,7 @@ function Ae(e) {
|
|
|
805
808
|
},
|
|
806
809
|
onLoad: () => ce(!0),
|
|
807
810
|
onError: () => {
|
|
808
|
-
T.fallbackImage ?
|
|
811
|
+
T.fallbackImage ? B(!0) : ce(!0);
|
|
809
812
|
}
|
|
810
813
|
}) : null,
|
|
811
814
|
M && T.foregroundImage ? /* @__PURE__ */ d("img", {
|
|
@@ -828,7 +831,7 @@ function Ae(e) {
|
|
|
828
831
|
},
|
|
829
832
|
onPointerMove: fe,
|
|
830
833
|
onPointerLeave: () => {
|
|
831
|
-
j.current || (F(!1), I || (L(0),
|
|
834
|
+
j.current || (F(!1), I || (L(0), ie(0)));
|
|
832
835
|
}
|
|
833
836
|
}, q = (e) => {
|
|
834
837
|
A.current = e;
|
|
@@ -888,7 +891,7 @@ function Ie() {
|
|
|
888
891
|
return t ? t.replace(/\/$/, "") : null;
|
|
889
892
|
}
|
|
890
893
|
function Le() {
|
|
891
|
-
return Ie() || (
|
|
894
|
+
return Ie() || (B() ? Fe : Pe);
|
|
892
895
|
}
|
|
893
896
|
//#endregion
|
|
894
897
|
//#region src/v2/api/fetchExperiencePreview.ts
|
|
@@ -1332,7 +1335,7 @@ function xt(e) {
|
|
|
1332
1335
|
function St(e, t, n) {
|
|
1333
1336
|
let r = e.trim();
|
|
1334
1337
|
if (!r) throw Error("createLaunchMessage requires a non-empty launch string.");
|
|
1335
|
-
let i = n?.startButton, a = n?.showFeedback;
|
|
1338
|
+
let i = n?.startButton, a = n?.theme, o = n?.showFeedback;
|
|
1336
1339
|
return {
|
|
1337
1340
|
type: "launch",
|
|
1338
1341
|
schemaVersion: 2,
|
|
@@ -1340,7 +1343,8 @@ function St(e, t, n) {
|
|
|
1340
1343
|
launch: r,
|
|
1341
1344
|
...t === void 0 ? {} : { session: t },
|
|
1342
1345
|
...i ? { startButton: i } : {},
|
|
1343
|
-
...a
|
|
1346
|
+
...a ? { theme: a } : {},
|
|
1347
|
+
...o === void 0 ? {} : { showFeedback: o }
|
|
1344
1348
|
}
|
|
1345
1349
|
};
|
|
1346
1350
|
}
|
|
@@ -1819,7 +1823,7 @@ function It() {
|
|
|
1819
1823
|
}
|
|
1820
1824
|
function Lt() {
|
|
1821
1825
|
let e = It();
|
|
1822
|
-
return e ? e.endsWith("/embed") ? e : `${e}/embed` :
|
|
1826
|
+
return e ? e.endsWith("/embed") ? e : `${e}/embed` : B() ? Ft : Pt;
|
|
1823
1827
|
}
|
|
1824
1828
|
function Rt(e, t) {
|
|
1825
1829
|
return e?.trim() || t?.trim() || void 0;
|
|
@@ -2738,9 +2742,11 @@ var An = class e {
|
|
|
2738
2742
|
if (!g) throw f.destroy(), this.iframeHost === f && (this.iframeHost = null), Error("Session Launch response did not include a launch token.");
|
|
2739
2743
|
return this.launchToken = g, _ ? (this.resolvedSession = _, this.bootstrap.kind === "launch" && tt(_), f.postLaunch(g, _, {
|
|
2740
2744
|
startButton: e.startButton,
|
|
2745
|
+
theme: e.theme,
|
|
2741
2746
|
showFeedback: e.showFeedback
|
|
2742
2747
|
}), u.setValue(_)) : f.postLaunch(g, void 0, {
|
|
2743
2748
|
startButton: e.startButton,
|
|
2749
|
+
theme: e.theme,
|
|
2744
2750
|
showFeedback: e.showFeedback
|
|
2745
2751
|
}), await Promise.race([s, new Promise((e, t) => {
|
|
2746
2752
|
setTimeout(() => t(/* @__PURE__ */ Error("Timed out waiting for player loading UI.")), 12e4);
|
|
@@ -2917,7 +2923,7 @@ function $(e) {
|
|
|
2917
2923
|
var Gn = "<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 0 0-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 0 0-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 0 0-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 0 0-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 0 0 1.066-2.573c-.94-1.543.826-3.31 2.37-2.37c1 .608 2.296.07 2.572-1.065\"/><path d=\"M9 12a3 3 0 1 0 6 0a3 3 0 0 0-6 0\"/></svg>", Kn = "<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"M18.3 5.71a1 1 0 0 0-1.41 0L12 10.59 7.11 5.7A1 1 0 0 0 5.7 7.11L10.59 12l-4.9 4.89a1 1 0 1 0 1.42 1.42L12 13.41l4.89 4.9a1 1 0 0 0 1.42-1.42L13.41 12l4.9-4.89a1 1 0 0 0-.01-1.4Z\"/></svg>", qn = "<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M18 10h-4V6m6-2l-6 6m-8 4h4v4m0-4l-6 6\"/></svg>", Jn = "<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M16 4h4v4m-6 2l6-6M8 20H4v-4m0 4l6-6\"/></svg>";
|
|
2918
2924
|
function Yn(e, t, n) {
|
|
2919
2925
|
Oe(Ee);
|
|
2920
|
-
let r =
|
|
2926
|
+
let r = z({
|
|
2921
2927
|
galleryThumb: t.galleryThumb,
|
|
2922
2928
|
avatarImage: t.avatarImage,
|
|
2923
2929
|
backgroundImage: t.backgroundImage,
|
|
@@ -3011,14 +3017,14 @@ function Qn(e, t) {
|
|
|
3011
3017
|
v.className = "liforma-ew__stage";
|
|
3012
3018
|
let y = document.createElement("div");
|
|
3013
3019
|
y.className = "liforma-ew__status", y.hidden = !0, f.append(v, y), u.append(d, f), a.append(o, l, u, p), e.replaceChildren(a);
|
|
3014
|
-
let b = null, x = !1, S = !1, C = !1, w = !1, T = !1, E = !1, D = !1, O = 0, k = "", A = null, j = null, M = null, N = null, P = null, F = null, I = null, ee = 0, te = 0, ne = null, L = !1, re = new AbortController(),
|
|
3020
|
+
let b = null, x = !1, S = !1, C = !1, w = !1, T = !1, E = !1, D = !1, O = 0, k = "", A = null, j = null, M = null, N = null, P = null, F = null, I = null, ee = 0, te = 0, ne = null, L = !1, re = new AbortController(), ie = t.parallax !== !1, R = () => {
|
|
3015
3021
|
let e = a.dataset.state;
|
|
3016
3022
|
return e === "expanded" || e === "docked" || e === "collapsed" ? e : "collapsed";
|
|
3017
|
-
},
|
|
3023
|
+
}, z = () => {
|
|
3018
3024
|
M !== null && (clearTimeout(M), M = null);
|
|
3019
|
-
}, ae = () => {
|
|
3020
|
-
N !== null && (clearTimeout(N), N = null), a.classList.remove("liforma-ew--layout-settling");
|
|
3021
3025
|
}, B = () => {
|
|
3026
|
+
N !== null && (clearTimeout(N), N = null), a.classList.remove("liforma-ew--layout-settling");
|
|
3027
|
+
}, ae = () => {
|
|
3022
3028
|
for (let e of [
|
|
3023
3029
|
f,
|
|
3024
3030
|
l,
|
|
@@ -3033,11 +3039,11 @@ function Qn(e, t) {
|
|
|
3033
3039
|
let a = p.offsetWidth || 120;
|
|
3034
3040
|
p.style.left = `${e + n - a - 10}px`, p.style.top = `${t + 10}px`, p.style.right = "auto", p.style.bottom = "auto", p.style.width = "auto", p.style.height = "auto";
|
|
3035
3041
|
}, oe = (e, t) => {
|
|
3036
|
-
if (
|
|
3042
|
+
if (R() !== "docked") return;
|
|
3037
3043
|
let n = zn(), r = Vn(e - ee, t - te, n);
|
|
3038
3044
|
P = r.left, F = r.top, V(r.left, r.top, n.width, n.height);
|
|
3039
3045
|
}, se = (e, t) => {
|
|
3040
|
-
if (
|
|
3046
|
+
if (R() !== "docked" || !Number.isFinite(e) || !Number.isFinite(t) || e === 0 && t === 0) return;
|
|
3041
3047
|
let n = zn(), r = P ?? f.getBoundingClientRect().left, i = F ?? f.getBoundingClientRect().top, a = Vn(r + e, i + t, n);
|
|
3042
3048
|
P = a.left, F = a.top, V(a.left, a.top, n.width, n.height);
|
|
3043
3049
|
}, ce = (e) => {
|
|
@@ -3047,12 +3053,12 @@ function Qn(e, t) {
|
|
|
3047
3053
|
let t = ne;
|
|
3048
3054
|
I = null, ne = null, p.classList.remove("liforma-ew__toolbar--dragging"), a.classList.remove("liforma-ew--dock-dragging"), t === "toolbar" && L && (L = !1, window.removeEventListener("pointermove", ce), window.removeEventListener("pointerup", H), window.removeEventListener("pointercancel", H));
|
|
3049
3055
|
}, le = (e, t, n) => {
|
|
3050
|
-
if (S ||
|
|
3056
|
+
if (S || R() !== "docked" || !Hn() || I !== null) return;
|
|
3051
3057
|
I = n, ne = "toolbar", p.classList.add("liforma-ew__toolbar--dragging"), a.classList.add("liforma-ew--dock-dragging");
|
|
3052
3058
|
let r = f.getBoundingClientRect();
|
|
3053
3059
|
ee = e - r.left, te = t - r.top, L || (L = !0, window.addEventListener("pointermove", ce), window.addEventListener("pointerup", H), window.addEventListener("pointercancel", H));
|
|
3054
3060
|
}, U = (e) => {
|
|
3055
|
-
if (S ||
|
|
3061
|
+
if (S || R() !== "docked" || !Hn() || I !== null) return;
|
|
3056
3062
|
I = e.pointerId, ne = "player", p.classList.add("liforma-ew__toolbar--dragging"), a.classList.add("liforma-ew--dock-dragging");
|
|
3057
3063
|
let t = f.getBoundingClientRect();
|
|
3058
3064
|
P = t.left, F = t.top;
|
|
@@ -3061,7 +3067,7 @@ function Qn(e, t) {
|
|
|
3061
3067
|
}, de = (e) => {
|
|
3062
3068
|
ne === "player" && (I === null || e.pointerId !== I || H());
|
|
3063
3069
|
}, W = () => {
|
|
3064
|
-
let e = Hn(), t =
|
|
3070
|
+
let e = Hn(), t = R();
|
|
3065
3071
|
if (!e || t !== "expanded" && t !== "docked") {
|
|
3066
3072
|
h.hidden = !0;
|
|
3067
3073
|
return;
|
|
@@ -3077,7 +3083,7 @@ function Qn(e, t) {
|
|
|
3077
3083
|
});
|
|
3078
3084
|
});
|
|
3079
3085
|
}, me = (e) => {
|
|
3080
|
-
if (
|
|
3086
|
+
if (B(), a.classList.remove("liforma-ew--session-revealed"), a.classList.add("liforma-ew--layout-settling"), e(), !D) {
|
|
3081
3087
|
a.classList.remove("liforma-ew--layout-settling");
|
|
3082
3088
|
return;
|
|
3083
3089
|
}
|
|
@@ -3089,7 +3095,7 @@ function Qn(e, t) {
|
|
|
3089
3095
|
a.classList.remove("liforma-ew--layout-settling"), pe();
|
|
3090
3096
|
}, 220);
|
|
3091
3097
|
}, he = () => (a.classList.add("liforma-ew--session-concealing"), a.classList.remove("liforma-ew--session-revealed"), new Promise((e) => {
|
|
3092
|
-
|
|
3098
|
+
z(), M = setTimeout(() => {
|
|
3093
3099
|
M = null, a.classList.remove("liforma-ew--session-concealing"), e();
|
|
3094
3100
|
}, 280);
|
|
3095
3101
|
})), ge = {
|
|
@@ -3116,7 +3122,7 @@ function Qn(e, t) {
|
|
|
3116
3122
|
w = !0, a.dataset.warm = "true", l.hidden = !1, D || (o.tabIndex = -1, o.setAttribute("aria-hidden", "true")), t.onPrefetchReady?.();
|
|
3117
3123
|
}, be = (e) => {
|
|
3118
3124
|
A?.(), A = null;
|
|
3119
|
-
let t = Yn(s, e, { parallax:
|
|
3125
|
+
let t = Yn(s, e, { parallax: ie });
|
|
3120
3126
|
return t ? (A = t, !0) : !1;
|
|
3121
3127
|
}, K = () => {
|
|
3122
3128
|
if (be(ge)) {
|
|
@@ -3148,7 +3154,7 @@ function Qn(e, t) {
|
|
|
3148
3154
|
startButton: Xn(t),
|
|
3149
3155
|
...t.showFeedback === void 0 ? {} : { showFeedback: t.showFeedback }
|
|
3150
3156
|
}), q = (e = !0) => {
|
|
3151
|
-
o.hidden = !0, u.hidden = !1, p.hidden = !1, u.setAttribute("aria-modal", "true"),
|
|
3157
|
+
o.hidden = !0, u.hidden = !1, p.hidden = !1, u.setAttribute("aria-modal", "true"), ae(), a.dataset.state = "expanded", _e(null), typeof document < "u" && (k = document.body.style.overflow, document.body.style.overflow = "hidden"), W(), e && t.onExpanded?.();
|
|
3152
3158
|
}, Ce = () => {
|
|
3153
3159
|
o.hidden = !0, u.hidden = !1, p.hidden = !1, u.setAttribute("aria-modal", "false"), a.dataset.state = "docked", _e(null), typeof document < "u" && (document.body.style.overflow = k), fe(!0), W(), b?.setWidgetChrome("docked");
|
|
3154
3160
|
}, we = (e) => {
|
|
@@ -3160,9 +3166,9 @@ function Qn(e, t) {
|
|
|
3160
3166
|
S || t.onFeedbackFailed?.(e);
|
|
3161
3167
|
});
|
|
3162
3168
|
}, Te = () => {
|
|
3163
|
-
|
|
3169
|
+
B(), u.hidden = !0, p.hidden = !0, ae(), a.dataset.state = "collapsed", a.classList.remove("liforma-ew--session-revealed"), a.classList.remove("liforma-ew--session-concealing"), g.setAttribute("aria-pressed", "false"), o.hidden = !1, o.tabIndex = 0, o.removeAttribute("aria-hidden"), C && (o.disabled = !1), _e(null), typeof document < "u" && (document.body.style.overflow = k), W();
|
|
3164
3170
|
}, Ee = () => {
|
|
3165
|
-
|
|
3171
|
+
z(), B(), O += 1, x = !1, w = !1, T = !1, E = !1, D = !1;
|
|
3166
3172
|
let e = b;
|
|
3167
3173
|
b = null, e?.destroy(), v.replaceChildren(), l.replaceChildren(), l.hidden = !0, delete a.dataset.warm, delete a.dataset.live, a.classList.remove("liforma-ew--session-revealed");
|
|
3168
3174
|
}, De = () => {
|
|
@@ -3177,19 +3183,19 @@ function Qn(e, t) {
|
|
|
3177
3183
|
Ee(), Te(), t.onCollapsed?.(), t.onClose?.();
|
|
3178
3184
|
}
|
|
3179
3185
|
}, Oe = () => {
|
|
3180
|
-
S || Hn() &&
|
|
3186
|
+
S || Hn() && R() === "expanded" && me(() => {
|
|
3181
3187
|
Ce();
|
|
3182
3188
|
});
|
|
3183
3189
|
}, ke = () => {
|
|
3184
|
-
S ||
|
|
3185
|
-
|
|
3190
|
+
S || R() === "docked" && (H(), me(() => {
|
|
3191
|
+
ae(), q(!1), b?.setWidgetChrome("expanded");
|
|
3186
3192
|
}));
|
|
3187
3193
|
}, Ae = () => {
|
|
3188
|
-
!b || !D || (
|
|
3194
|
+
!b || !D || (z(), a.classList.remove("liforma-ew--session-revealed"), q(), b.setWidgetChrome("expanded"), x = !1, pe());
|
|
3189
3195
|
}, Me = () => {
|
|
3190
|
-
!b || !E || D || (
|
|
3196
|
+
!b || !E || D || (z(), a.classList.remove("liforma-ew--session-revealed"), q(), x = !1, w || b.setWidgetChrome("expanded"));
|
|
3191
3197
|
}, Pe = (e) => {
|
|
3192
|
-
S || e !== O && !D || (
|
|
3198
|
+
S || e !== O && !D || (z(), a.classList.remove("liforma-ew--session-revealed"), q(), x = !1, D && pe());
|
|
3193
3199
|
}, Fe = () => {
|
|
3194
3200
|
if (S || T || w || b || $(a.dataset.state)) return;
|
|
3195
3201
|
T = !0;
|
|
@@ -3312,22 +3318,22 @@ function Qn(e, t) {
|
|
|
3312
3318
|
Ie();
|
|
3313
3319
|
}
|
|
3314
3320
|
}, Re = (e) => {
|
|
3315
|
-
if (e.stopPropagation(),
|
|
3321
|
+
if (e.stopPropagation(), R() === "expanded") {
|
|
3316
3322
|
Oe();
|
|
3317
3323
|
return;
|
|
3318
3324
|
}
|
|
3319
|
-
|
|
3325
|
+
R() === "docked" && ke();
|
|
3320
3326
|
}, J = (e) => {
|
|
3321
3327
|
g.setAttribute("aria-pressed", e ? "true" : "false");
|
|
3322
3328
|
}, Be = (e) => {
|
|
3323
3329
|
e.stopPropagation(), $(a.dataset.state) && b?.toggleAudioSettings();
|
|
3324
3330
|
}, Ve = (e) => {
|
|
3325
|
-
|
|
3331
|
+
R() === "docked" && Hn() && (e.target?.closest("button") || (e.preventDefault(), le(e.clientX, e.clientY, e.pointerId)));
|
|
3326
3332
|
}, He = (e) => {
|
|
3327
3333
|
e.key === "Escape" && $(a.dataset.state) && (e.preventDefault(), De());
|
|
3328
3334
|
}, Ue = () => {
|
|
3329
3335
|
if (!S) {
|
|
3330
|
-
if (
|
|
3336
|
+
if (R() === "docked") {
|
|
3331
3337
|
if (!Hn()) {
|
|
3332
3338
|
ke();
|
|
3333
3339
|
return;
|
|
@@ -3341,7 +3347,7 @@ function Qn(e, t) {
|
|
|
3341
3347
|
}
|
|
3342
3348
|
}, Y = typeof window < "u" ? window.matchMedia(Mn) : null, We = () => {
|
|
3343
3349
|
if (!S) {
|
|
3344
|
-
if (
|
|
3350
|
+
if (R() === "docked" && !Hn()) {
|
|
3345
3351
|
ke();
|
|
3346
3352
|
return;
|
|
3347
3353
|
}
|