@levo-so/studio 0.3.20 → 0.3.22

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.
Files changed (69) hide show
  1. package/BillingStep-ioR7mSo5.js +249 -0
  2. package/BookingCard-DEkBXh7O.js +646 -0
  3. package/DateTimeWidget-B-dajfHj.js +253 -0
  4. package/{EntryCard-9yv0KJTB.js → EntryCard-CZfljZAY.js} +4 -4
  5. package/{KBChatWidget-D39Z3HIl.js → KBChatWidget-BXRRgelS.js} +1 -1
  6. package/{LoginCard-D9vEC_g0.js → LoginCard-BVjeN1J0.js} +3 -3
  7. package/{LoginForm-kI_b_7Tc.js → LoginForm-DQVwLQCx.js} +19 -19
  8. package/{LoginModal-C-9BhmoO.js → LoginModal-C6TdAh-0.js} +5 -6
  9. package/{MessageCard-Nsxr98n6.js → MessageCard-B5MbVDJ8.js} +2 -2
  10. package/{MessageFooter-K4Zd_eFO.js → MessageFooter-DrlKXE9a.js} +1 -2
  11. package/{PendingApprovalCard-CzoBgYNy.js → PendingApprovalCard-5iFAeE1s.js} +3 -3
  12. package/{PhoneWidget-BtMMfGLu.js → PhoneWidget-B4KHlFjT.js} +6 -7
  13. package/{Popover-Iis-qOn1.js → Popover-y8XkbYNh.js} +7 -7
  14. package/{PopupBody-BI-MJqmd-B3ltSYMP.js → PopupBody-DWM55Zh5-DuOPsCAn.js} +53 -55
  15. package/PopupDialog-DwAAJ8JS-9xm5jrXW.js +261 -0
  16. package/PopupRenderer-BVtV4b9I-BdPryfLY.js +208 -0
  17. package/{ProfileCard-Chg20HBa.js → ProfileCard-WgFT-T4U.js} +5 -5
  18. package/{RichTextWidget-C3Y-0pNy.js → RichTextWidget-DKYm1cSW.js} +120 -123
  19. package/{Spinner-D5spB_Mv.js → Spinner-LdYfm4S7.js} +1 -1
  20. package/{VerifyButton-BwTbzSwS.js → VerifyButton-CNq78zG4.js} +5 -7
  21. package/collection.d.ts +9 -1
  22. package/collection.js +1 -1
  23. package/dialog-CU5nHKc5.js +119 -0
  24. package/dist-IMRD6dob.js +3858 -0
  25. package/index.js +3280 -2848
  26. package/{inlineRteTheme-BOAno9MG.js → inlineRteTheme-DFg69bqP.js} +50 -37
  27. package/{kbChat-zXbn56Zb.js → kbChat-eFsau7hG.js} +2 -2
  28. package/package.json +42 -43
  29. package/{pillChrome-QDjBETmP.js → pillChrome-Dy3ApFI5.js} +5 -5
  30. package/price-BUDkN5Me.js +823 -0
  31. package/script.esm-uVCZU25S.js +62 -0
  32. package/studio.css +1 -1
  33. package/themeMapping-DH_NoXK8-H-EHXbBt.js +156 -0
  34. package/useCheckout-gscmzFLD.js +179 -0
  35. package/useLogin-BYVekOp9.js +237 -0
  36. package/AuthProvider-B5NfFwbG.js +0 -118
  37. package/BillingStep-BTDOMFHV.js +0 -181
  38. package/Button-DXLWW3dp.js +0 -504
  39. package/CollectionField-BZmxRB5D.js +0 -270
  40. package/CollectionInput-DyNbxIZ8.js +0 -147
  41. package/DateTimeWidget-Bt1UcCnx.js +0 -255
  42. package/Dialog-CPE8yUqK.js +0 -130
  43. package/ModalManager-CzH36UIk.js +0 -32
  44. package/PopupRenderer-D66Gx63H-ChI4WBer.js +0 -389
  45. package/RteThemeProvider-owl5oajj.js +0 -20
  46. package/ThemeProvider-CqPHzkW9.js +0 -116
  47. package/Tooltip-DHU1QD-n.js +0 -67
  48. package/authentication-BXQbxiPP.js +0 -36
  49. package/bookingCard-g0n3ksiC.js +0 -605
  50. package/createThemeExtension-C0PSYy0J.js +0 -15
  51. package/dialog-8LH_ihs4.js +0 -92
  52. package/dist-Dijjo-5m.js +0 -3794
  53. package/generateRadiusScale-RROt8ppa.js +0 -71
  54. package/inlineCollectionTheme-uhBXoF1F.js +0 -19
  55. package/popupState-JmpeKzgM-UECLsSbL.js +0 -100
  56. package/rteTheme.cssm-W4gTOijw.js +0 -4
  57. package/theme.cssm-Czj9sF4X.js +0 -4
  58. package/themeMapping-Bi9Rcr5G-C7UXWE6o.js +0 -61
  59. package/useCheckout-DFalmfEQ.js +0 -161
  60. package/useLogin-CfnGrLdO.js +0 -127
  61. package/usePopupRedirect-CAAdcpaW-DdME0F7f.js +0 -82
  62. /package/{Beams-WJN38XSv.js → Beams-KsU_ixpY.js} +0 -0
  63. /package/{Dots-DggLz5I7.js → Dots-C_ja_PPu.js} +0 -0
  64. /package/{Gradient-BSWJAu0a.js → Gradient-CDGFLaA-.js} +0 -0
  65. /package/{Grid-BFKl0MUt.js → Grid-C22rTkrs.js} +0 -0
  66. /package/{Waves-BPEgTYoO.js → Waves-Cl5rKcFJ.js} +0 -0
  67. /package/{card-5ooLmYSr.js → card-BIebVDA0.js} +0 -0
  68. /package/{cn-B6c1DjO_.js → cn-CzJDhklM.js} +0 -0
  69. /package/{fontSize-B-ba6pvx.js → fontSize-DowUyWe-.js} +0 -0
@@ -1,130 +0,0 @@
1
- import { r as e, t } from "./ThemeProvider-CqPHzkW9.js";
2
- import { c as n } from "react/compiler-runtime";
3
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
4
- import a from "clsx";
5
- import { IconX as o } from "@tabler/icons-react";
6
- import { Dialog as s } from "@base-ui/react/dialog";
7
- //#region ../../libraries/levocn/dist/ui/dialog/Dialog.cssm.js
8
- var c = "ch8h0x0", l = "ch8h0x1", u = "ch8h0x2", d = "ch8h0x3", f = "ch8h0x5", p = "ch8h0x6", m = (e) => {
9
- let t = n(4), i;
10
- t[0] === e ? i = t[1] : ({...i} = e, t[0] = e, t[1] = i);
11
- let a;
12
- return t[2] === i ? a = t[3] : (a = /* @__PURE__ */ r(s.Root, {
13
- "data-slot": "dialog",
14
- ...i
15
- }), t[2] = i, t[3] = a), a;
16
- }, h = (e) => {
17
- let i = n(5), a;
18
- i[0] === e ? a = i[1] : ({...a} = e, i[0] = e, i[1] = a);
19
- let { portalRef: o } = t(), c;
20
- return i[2] !== o || i[3] !== a ? (c = /* @__PURE__ */ r(s.Portal, {
21
- container: o,
22
- ...a
23
- }), i[2] = o, i[3] = a, i[4] = c) : c = i[4], c;
24
- }, g = (e) => {
25
- let t = n(8), i, o;
26
- t[0] === e ? (i = t[1], o = t[2]) : ({className: i, ...o} = e, t[0] = e, t[1] = i, t[2] = o);
27
- let c;
28
- t[3] === i ? c = t[4] : (c = a(l, i), t[3] = i, t[4] = c);
29
- let u;
30
- return t[5] !== o || t[6] !== c ? (u = /* @__PURE__ */ r(s.Viewport, {
31
- "data-slot": "dialog-viewport",
32
- className: c,
33
- ...o
34
- }), t[5] = o, t[6] = c, t[7] = u) : u = t[7], u;
35
- }, _ = (t) => {
36
- let i = n(10), a, o, c;
37
- i[0] === t ? (a = i[1], o = i[2], c = i[3]) : ({variant: c, size: o, ...a} = t, i[0] = t, i[1] = a, i[2] = o, i[3] = c);
38
- let l;
39
- i[4] !== o || i[5] !== c ? (l = /* @__PURE__ */ r(e, {
40
- variant: c,
41
- size: o
42
- }), i[4] = o, i[5] = c, i[6] = l) : l = i[6];
43
- let u;
44
- return i[7] !== a || i[8] !== l ? (u = /* @__PURE__ */ r(s.Close, {
45
- "data-slot": "dialog-close",
46
- render: l,
47
- ...a
48
- }), i[7] = a, i[8] = l, i[9] = u) : u = i[9], u;
49
- }, v = (e) => {
50
- let t = n(8), i, o;
51
- t[0] === e ? (i = t[1], o = t[2]) : ({className: i, ...o} = e, t[0] = e, t[1] = i, t[2] = o);
52
- let l;
53
- t[3] === i ? l = t[4] : (l = a(c, i), t[3] = i, t[4] = l);
54
- let u;
55
- return t[5] !== o || t[6] !== l ? (u = /* @__PURE__ */ r(s.Backdrop, {
56
- "data-slot": "dialog-backdrop",
57
- className: l,
58
- ...o
59
- }), t[5] = o, t[6] = l, t[7] = u) : u = t[7], u;
60
- }, y = (t) => {
61
- let c = n(14), l, d, f, p;
62
- c[0] === t ? (l = c[1], d = c[2], f = c[3], p = c[4]) : ({className: d, children: l, showCloseButton: p, ...f} = t, c[0] = t, c[1] = l, c[2] = d, c[3] = f, c[4] = p);
63
- let m = p === void 0 ? !0 : p, h;
64
- c[5] === d ? h = c[6] : (h = a(u, d), c[5] = d, c[6] = h);
65
- let g;
66
- c[7] === m ? g = c[8] : (g = m && /* @__PURE__ */ r(s.Close, {
67
- "data-slot": "dialog-close",
68
- render: /* @__PURE__ */ r(e, {
69
- variant: "ghost",
70
- size: "icon-sm",
71
- className: "ch8h0x7",
72
- "aria-label": "Close"
73
- }),
74
- children: /* @__PURE__ */ r(o, { size: 16 })
75
- }), c[7] = m, c[8] = g);
76
- let _;
77
- return c[9] !== l || c[10] !== f || c[11] !== h || c[12] !== g ? (_ = /* @__PURE__ */ i(s.Popup, {
78
- "data-slot": "dialog-popup",
79
- className: h,
80
- ...f,
81
- children: [l, g]
82
- }), c[9] = l, c[10] = f, c[11] = h, c[12] = g, c[13] = _) : _ = c[13], _;
83
- }, b = (e) => {
84
- let t = n(8), i, o;
85
- t[0] === e ? (i = t[1], o = t[2]) : ({className: i, ...o} = e, t[0] = e, t[1] = i, t[2] = o);
86
- let s;
87
- t[3] === i ? s = t[4] : (s = a(d, i), t[3] = i, t[4] = s);
88
- let c;
89
- return t[5] !== o || t[6] !== s ? (c = /* @__PURE__ */ r("div", {
90
- "data-slot": "dialog-header",
91
- className: s,
92
- ...o
93
- }), t[5] = o, t[6] = s, t[7] = c) : c = t[7], c;
94
- }, x = (e) => {
95
- let t = n(8), i, o;
96
- t[0] === e ? (i = t[1], o = t[2]) : ({className: i, ...o} = e, t[0] = e, t[1] = i, t[2] = o);
97
- let c;
98
- t[3] === i ? c = t[4] : (c = a(f, i), t[3] = i, t[4] = c);
99
- let l;
100
- return t[5] !== o || t[6] !== c ? (l = /* @__PURE__ */ r(s.Title, {
101
- "data-slot": "dialog-title",
102
- className: c,
103
- ...o
104
- }), t[5] = o, t[6] = c, t[7] = l) : l = t[7], l;
105
- }, S = (e) => {
106
- let t = n(8), i, o;
107
- t[0] === e ? (i = t[1], o = t[2]) : ({className: i, ...o} = e, t[0] = e, t[1] = i, t[2] = o);
108
- let c;
109
- t[3] === i ? c = t[4] : (c = a(p, i), t[3] = i, t[4] = c);
110
- let l;
111
- return t[5] !== o || t[6] !== c ? (l = /* @__PURE__ */ r(s.Description, {
112
- "data-slot": "dialog-description",
113
- className: c,
114
- ...o
115
- }), t[5] = o, t[6] = c, t[7] = l) : l = t[7], l;
116
- }, C = (e) => {
117
- let t = n(11), a, o, s, c;
118
- t[0] === e ? (a = t[1], o = t[2], s = t[3], c = t[4]) : ({className: o, children: a, showCloseButton: c, ...s} = e, t[0] = e, t[1] = a, t[2] = o, t[3] = s, t[4] = c);
119
- let l = c === void 0 ? !0 : c, u;
120
- t[5] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ r(v, {}), t[5] = u) : u = t[5];
121
- let d;
122
- return t[6] !== a || t[7] !== o || t[8] !== s || t[9] !== l ? (d = /* @__PURE__ */ i(h, { children: [u, /* @__PURE__ */ r(g, { children: /* @__PURE__ */ r(y, {
123
- className: o,
124
- showCloseButton: l,
125
- ...s,
126
- children: a
127
- }) })] }), t[6] = a, t[7] = o, t[8] = s, t[9] = l, t[10] = d) : d = t[10], d;
128
- };
129
- //#endregion
130
- export { _ as a, h as c, x as i, v as l, C as n, m as o, S as r, s, b as t, g as u };
@@ -1,32 +0,0 @@
1
- "use client";
2
- import { Suspense as e, createContext as t, lazy as n, useCallback as r, useContext as i, useState as a } from "react";
3
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
4
- //#region src/context/ModalManager.tsx
5
- var c = n(() => import("./LoginModal-C-9BhmoO.js")), l = t({
6
- availableModals: ["login"],
7
- openModals: { key: null },
8
- openModal: () => ({}),
9
- closeModal: () => ({})
10
- }), u = ({ children: t, siteName: n }) => {
11
- let [i, u] = a({ key: null }), d = r((e, t) => u(() => ({
12
- key: e,
13
- config: t
14
- })), []);
15
- return /* @__PURE__ */ s(l.Provider, {
16
- value: {
17
- openModals: i,
18
- openModal: d,
19
- closeModal: () => u(() => ({ key: null })),
20
- availableModals: ["login"]
21
- },
22
- children: [i.key === "login" && /* @__PURE__ */ o(e, {
23
- fallback: null,
24
- children: /* @__PURE__ */ o(c, { config: {
25
- ...i.config,
26
- oAuthTitle: n ?? ""
27
- } })
28
- }), t]
29
- });
30
- }, d = () => i(l);
31
- //#endregion
32
- export { d as n, u as t };
@@ -1,389 +0,0 @@
1
- import { d as e, f as t, l as n, n as r, o as i } from "./popupState-JmpeKzgM-UECLsSbL.js";
2
- import { n as a } from "./ThemeProvider-CqPHzkW9.js";
3
- import { n as o, t as s } from "./themeMapping-Bi9Rcr5G-C7UXWE6o.js";
4
- import { t as c } from "./theme.cssm-Czj9sF4X.js";
5
- import { a as l, c as u, l as d, o as f, s as p, u as m } from "./Dialog-CPE8yUqK.js";
6
- import { t as h } from "./rteTheme.cssm-W4gTOijw.js";
7
- import { a as g, d as _, f as v, g as y, h as b, l as x, m as S, n as C, o as w, p as T, s as ee, t as te, u as E } from "./usePopupRedirect-CAAdcpaW-DdME0F7f.js";
8
- import { c as D } from "react/compiler-runtime";
9
- import { $activity as O, $isIdentityContextReady as k, $pageLifecycle as A, $scrollBehavior as j, $session as M, getTabCount as ne } from "@levo-so/insights/stores";
10
- import { useLevo as re, useLevoInsights as N } from "@levo-so/react";
11
- import { Suspense as P, lazy as F, useEffect as I, useRef as L } from "react";
12
- import { Fragment as ie, jsx as R, jsxs as z } from "react/jsx-runtime";
13
- import { useStore as B } from "@nanostores/react";
14
- import V from "clsx";
15
- import { IconX as H } from "@tabler/icons-react";
16
- //#region ../../libraries/levocn/dist/theme/utils/googleFonts.js
17
- var U = "wght@300;400;500;600;700;900", W = (e) => !!e && e !== "inherit" && !e.includes(",") && !e.includes("var("), G = (...e) => {
18
- let t = Array.from(new Set(e.filter((e) => typeof e == "string").map((e) => e.trim()).filter(W)));
19
- return t.length === 0 ? null : `https://fonts.googleapis.com/css2?${t.map((e) => `family=${e.replace(/ /g, "+")}:${U}`).join("&")}&display=swap`;
20
- }, K = (e) => {
21
- if (document.querySelector(`link[rel="preconnect"][href="${e}"]`)) return;
22
- let t = document.createElement("link");
23
- t.rel = "preconnect", t.href = e, t.crossOrigin = "anonymous", document.head.appendChild(t);
24
- }, q = (e) => {
25
- let t = `family=${e.replace(/ /g, "+")}:`;
26
- return Array.from(document.querySelectorAll("link[rel=\"stylesheet\"][href*=\"fonts.googleapis.com\"]")).some((e) => e.href.includes(t));
27
- }, J = (...e) => {
28
- let t = D(5), n = e, r;
29
- t[0] === n ? r = t[1] : (r = n.filter(Y).map(ae).join("|"), t[0] = n, t[1] = r);
30
- let i = r, a, o;
31
- t[2] === i ? (a = t[3], o = t[4]) : (a = () => {
32
- let e = G(...(i ? i.split("|") : []).filter(X));
33
- if (!e) return;
34
- K("https://fonts.googleapis.com"), K("https://fonts.gstatic.com");
35
- let t = document.createElement("link");
36
- t.rel = "stylesheet", t.href = e, t.crossOrigin = "anonymous", t.setAttribute("data-levo-fonts", e), document.head.appendChild(t);
37
- }, o = [i], t[2] = i, t[3] = a, t[4] = o), I(a, o);
38
- };
39
- function Y(e) {
40
- return typeof e == "string" && e.trim() !== "";
41
- }
42
- function ae(e) {
43
- return e.trim();
44
- }
45
- function X(e) {
46
- return !q(e);
47
- }
48
- //#endregion
49
- //#region ../../libraries/popups/dist/PopupDialog-DeOpYgDM.js
50
- var oe = (e) => (e ?? "16:9").replace(":", " / "), se = (e) => {
51
- if (e.content.coverImage?.srcset) return Object.entries(e.content.coverImage.srcset).filter(([e]) => e !== "path").map(([e, t]) => `${t} ${e}`).join(", ");
52
- }, ce = (e) => {
53
- let t = D(18), { popup: n, disableInteraction: r, children: i } = e, { content: a } = n, o = b(n), s = !!o && !r, c;
54
- t[0] !== a.coverImage || t[1] !== a.coverImageFocus || t[2] !== n ? (c = a.coverImage && /* @__PURE__ */ R("img", {
55
- src: a.coverImage.location,
56
- srcSet: se(n),
57
- alt: "",
58
- className: "_1gklkndl",
59
- style: a.coverImageFocus ? { objectPosition: a.coverImageFocus.replace("-", " ") } : void 0
60
- }), t[0] = a.coverImage, t[1] = a.coverImageFocus, t[2] = n, t[3] = c) : c = t[3];
61
- let l = c, u;
62
- t[4] === a.coverImageRatio ? u = t[5] : (u = oe(a.coverImageRatio), t[4] = a.coverImageRatio, t[5] = u);
63
- let d;
64
- t[6] === u ? d = t[7] : (d = { aspectRatio: u }, t[6] = u, t[7] = d);
65
- let f = d, p;
66
- t[8] !== a.action || t[9] !== a.coverImage || t[10] !== s || t[11] !== l || t[12] !== f || t[13] !== o ? (p = a.coverImage && (s ? /* @__PURE__ */ R("button", {
67
- type: "button",
68
- className: V("_1gklkndj", "_1gklkndk"),
69
- style: f,
70
- onClick: o ?? void 0,
71
- "aria-label": a.action?.type === "redirect" ? a.action.label : void 0,
72
- children: l
73
- }) : /* @__PURE__ */ R("div", {
74
- className: "_1gklkndj",
75
- style: f,
76
- children: l
77
- })), t[8] = a.action, t[9] = a.coverImage, t[10] = s, t[11] = l, t[12] = f, t[13] = o, t[14] = p) : p = t[14];
78
- let m;
79
- return t[15] !== i || t[16] !== p ? (m = /* @__PURE__ */ z("div", {
80
- className: _,
81
- children: [p, i]
82
- }), t[15] = i, t[16] = p, t[17] = m) : m = t[17], m;
83
- }, le = (e) => {
84
- let t = D(19), n, r, i, l, u;
85
- t[0] === e ? (n = t[1], r = t[2], i = t[3], l = t[4], u = t[5]) : ({children: n, popupTheme: r, siteTheme: l, style: u, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = l, t[5] = u);
86
- let d;
87
- t[6] !== r || t[7] !== l ? (d = r ?? (l ? o(l) : null), t[6] = r, t[7] = l, t[8] = d) : d = t[8];
88
- let f = d;
89
- J(f?.fonts?.heading, f?.fonts?.body);
90
- let p;
91
- t[9] === Symbol.for("react.memo_cache_sentinel") ? (p = V(c, h), t[9] = p) : p = t[9];
92
- let m;
93
- t[10] === f ? m = t[11] : (m = s(f), t[10] = f, t[11] = m);
94
- let g;
95
- t[12] !== u || t[13] !== m ? (g = {
96
- ...m,
97
- ...u
98
- }, t[12] = u, t[13] = m, t[14] = g) : g = t[14];
99
- let _;
100
- return t[15] !== n || t[16] !== i || t[17] !== g ? (_ = /* @__PURE__ */ R(a, {
101
- className: p,
102
- cssReset: !0,
103
- style: g,
104
- ...i,
105
- children: n
106
- }), t[15] = n, t[16] = i, t[17] = g, t[18] = _) : _ = t[18], _;
107
- }, ue = F(() => import("./PopupBody-BI-MJqmd-B3ltSYMP.js").then((e) => e.n).then((e) => ({ default: e.PopupBody }))), de = (e) => {
108
- let t = D(7), { size: n } = e, r = n ?? "medium", i;
109
- t[0] === r ? i = t[1] : (i = E({ size: r }), t[0] = r, t[1] = i);
110
- let a, o, s;
111
- t[2] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ R("div", { className: T }), o = /* @__PURE__ */ R("div", { className: g }), s = /* @__PURE__ */ R("div", { className: C }), t[2] = a, t[3] = o, t[4] = s) : (a = t[2], o = t[3], s = t[4]);
112
- let c;
113
- return t[5] === i ? c = t[6] : (c = /* @__PURE__ */ z("div", {
114
- className: i,
115
- children: [
116
- a,
117
- o,
118
- s
119
- ]
120
- }), t[5] = i, t[6] = c), c;
121
- }, Z = () => {
122
- let e = D(8), { popup: t } = S(), n;
123
- e[0] === t.content.size ? n = e[1] : (n = /* @__PURE__ */ R(de, { size: t.content.size }), e[0] = t.content.size, e[1] = n);
124
- let r;
125
- e[2] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ R(ue, {}), e[2] = r) : r = e[2];
126
- let i;
127
- e[3] === n ? i = e[4] : (i = /* @__PURE__ */ R(P, {
128
- fallback: n,
129
- children: r
130
- }), e[3] = n, e[4] = i);
131
- let a;
132
- return e[5] !== t || e[6] !== i ? (a = /* @__PURE__ */ R(ce, {
133
- popup: t,
134
- children: i
135
- }), e[5] = t, e[6] = i, e[7] = a) : a = e[7], a;
136
- }, fe = (e) => e.content.position || "top-right", pe = (e) => {
137
- switch (e) {
138
- case "close-press": return "close_button";
139
- case "outside-press": return "outside_click";
140
- case "escape-key": return "escape_key";
141
- default: return "programmatic";
142
- }
143
- }, me = () => {
144
- let n = D(32), { popup: r, callbacks: i } = S(), { placement: a, id: o } = r, s = B(e).active_popup_id === o, c = L(!1), h, g;
145
- n[0] !== i || n[1] !== s || n[2] !== r ? (h = () => {
146
- s && !c.current && (c.current = !0, i?.onPopupOpen?.(r, { trigger_type: t() })), s || (c.current = !1);
147
- }, g = [
148
- s,
149
- r,
150
- i
151
- ], n[0] = i, n[1] = s, n[2] = r, n[3] = h, n[4] = g) : (h = n[3], g = n[4]), I(h, g);
152
- let _ = te(), y, b, C, w, T, E, O, k;
153
- if (n[5] !== _ || n[6] !== s || n[7] !== a || n[8] !== r) {
154
- let e = fe(r), t = a === "popup", i = a === "slide_in";
155
- b = f, T = s, n[17] === _ ? E = n[18] : (E = (e, t) => !e && _(pe(t?.reason)), n[17] = _, n[18] = E), O = t, k = !t, y = u, n[19] === t ? C = n[20] : (C = t && /* @__PURE__ */ R(d, {}), n[19] = t, n[20] = C), w = t ? /* @__PURE__ */ R(m, {
156
- className: ee,
157
- children: /* @__PURE__ */ z(p.Popup, {
158
- className: x({ placement: a }),
159
- children: [/* @__PURE__ */ R(l, {
160
- variant: "ghost",
161
- size: "icon-xs",
162
- className: v,
163
- "aria-label": "Close popup",
164
- children: /* @__PURE__ */ R(H, { size: 16 })
165
- }), /* @__PURE__ */ R(Z, {})]
166
- })
167
- }) : /* @__PURE__ */ z(p.Popup, {
168
- className: V(x({
169
- placement: a,
170
- position: e
171
- }), i && "_1gklkndd"),
172
- children: [/* @__PURE__ */ R(l, {
173
- variant: "ghost",
174
- size: "icon-xs",
175
- className: v,
176
- "aria-label": "Close popup",
177
- children: /* @__PURE__ */ R(H, { size: 16 })
178
- }), /* @__PURE__ */ R(Z, {})]
179
- }), n[5] = _, n[6] = s, n[7] = a, n[8] = r, n[9] = y, n[10] = b, n[11] = C, n[12] = w, n[13] = T, n[14] = E, n[15] = O, n[16] = k;
180
- } else y = n[9], b = n[10], C = n[11], w = n[12], T = n[13], E = n[14], O = n[15], k = n[16];
181
- let A;
182
- n[21] !== y || n[22] !== C || n[23] !== w ? (A = /* @__PURE__ */ z(y, { children: [C, w] }), n[21] = y, n[22] = C, n[23] = w, n[24] = A) : A = n[24];
183
- let j;
184
- return n[25] !== b || n[26] !== T || n[27] !== E || n[28] !== O || n[29] !== k || n[30] !== A ? (j = /* @__PURE__ */ R(b, {
185
- open: T,
186
- onOpenChange: E,
187
- modal: O,
188
- disablePointerDismissal: k,
189
- children: A
190
- }), n[25] = b, n[26] = T, n[27] = E, n[28] = O, n[29] = k, n[30] = A, n[31] = j) : j = n[31], j;
191
- }, he = 3e4, ge = 5e3, _e = 5e3, ve = 100, ye = .5, be = 5, xe = (e) => {
192
- if (typeof document > "u") return () => {};
193
- let t = !1, n = Date.now(), r = [], i = 0, a = null, o = () => Date.now() - n >= he, s = () => {
194
- t || (t = !0, c(), e());
195
- }, c = () => {
196
- a &&= (clearTimeout(a), null);
197
- }, l = () => {
198
- if (r.length < 2) return 0;
199
- let e = r[0], t = r[r.length - 1], n = t.t - e.t;
200
- return n === 0 ? 0 : (e.y - t.y) / n;
201
- }, u = () => r.reduce((e, t) => t.y > e ? t.y : e, 0), d = (e) => {
202
- r.push({
203
- y: e.clientY,
204
- t: Date.now()
205
- }), r.length > be && r.shift();
206
- }, f = (e) => {
207
- t || !o() || e.clientY > 0 || u() < ve || Date.now() - i < _e || l() < ye || (c(), a = setTimeout(s, ge));
208
- }, p = () => {
209
- c();
210
- }, m = () => {
211
- i = Date.now();
212
- }, h = A.listen((e) => {
213
- o() && (e === "hidden" || e === "frozen") && s();
214
- });
215
- return document.addEventListener("mousemove", d, { passive: !0 }), document.addEventListener("mouseleave", f), document.addEventListener("mouseenter", p), window.addEventListener("scroll", m, { passive: !0 }), () => {
216
- c(), document.removeEventListener("mousemove", d), document.removeEventListener("mouseleave", f), document.removeEventListener("mouseenter", p), window.removeEventListener("scroll", m), h();
217
- };
218
- }, Se = (e, t) => {
219
- if (!e) return null;
220
- let n = setTimeout(() => r(t, { trigger_type: "time_on_page" }), e);
221
- return () => clearTimeout(n);
222
- }, Ce = (e, t) => {
223
- if (e === void 0) return null;
224
- let n = !1;
225
- return j.listen((i) => {
226
- n || i.depth >= e && (n = !0, r(t, { trigger_type: "scroll_depth" }));
227
- });
228
- }, we = (e) => {
229
- let t = !1;
230
- return O.listen((n) => {
231
- t || n.status === "idle" && (t = !0, r(e, { trigger_type: "inactivity" }));
232
- });
233
- }, Te = (e, t) => {
234
- let n = D(11), i = t === void 0 ? !0 : t, { triggers: a, id: o } = e, s = B(k), c;
235
- n[0] === Symbol.for("react.memo_cache_sentinel") ? (c = [], n[0] = c) : c = n[0];
236
- let l = L(c), u;
237
- n[1] !== i || n[2] !== s || n[3] !== e || n[4] !== a ? (u = () => {
238
- if (!i || !s || !a) return;
239
- let t = [];
240
- if (a.time_on_page.enabled) {
241
- let n = Se(a.time_on_page.delay_ms, e);
242
- n && t.push(n);
243
- }
244
- if (a.scroll_depth.enabled) {
245
- let n = Ce(a.scroll_depth.percent, e);
246
- n && t.push(n);
247
- }
248
- return a.exit_intent.enabled && t.push(xe(() => r(e, { trigger_type: "exit_intent" }))), a.inactivity.enabled && t.push(we(e)), l.current = t, () => {
249
- t.forEach(Ee), l.current = [];
250
- };
251
- }, n[1] = i, n[2] = s, n[3] = e, n[4] = a, n[5] = u) : u = n[5];
252
- let d;
253
- n[6] !== i || n[7] !== s || n[8] !== o || n[9] !== a ? (d = [
254
- i,
255
- s,
256
- o,
257
- a
258
- ], n[6] = i, n[7] = s, n[8] = o, n[9] = a, n[10] = d) : d = n[10], I(u, d);
259
- };
260
- function Ee(e) {
261
- return e();
262
- }
263
- var Q = (e, t) => {
264
- switch (e.match_type) {
265
- case "is_all_pages": return !0;
266
- case "is": return e.page_id ? t.pageId === e.page_id ? e.value == null || e.value === t.path : !1 : e.value != null && e.value === t.path;
267
- case "contains": return e.value != null && t.path.includes(e.value);
268
- case "begins_with": return e.value != null && t.path.startsWith(e.value);
269
- default: return !1;
270
- }
271
- }, $ = (e, t) => {
272
- switch (e.match_type) {
273
- case "exact": return t === e.value;
274
- case "contains": return t.includes(e.value);
275
- case "domain": try {
276
- let n = new URL(t).hostname, r = e.value.toLowerCase();
277
- return n === r || n.endsWith(`.${r}`);
278
- } catch {
279
- return !1;
280
- }
281
- default: return !1;
282
- }
283
- }, De = (e, t, n) => {
284
- let r = e.pages?.exclude ?? [];
285
- if (r.length > 0 && r.some((e) => Q(e, t))) return !1;
286
- let i = e.pages?.include ?? [];
287
- if (i.length > 0 && !i.some((e) => Q(e, t))) return !1;
288
- let a = e.referrer?.include ?? [];
289
- if (a.length > 0 && (!n || !a.some((e) => $(e, n)))) return !1;
290
- let o = e.referrer?.exclude ?? [];
291
- return !(o.length > 0 && n && o.some((e) => $(e, n)));
292
- }, Oe = (e) => {
293
- let t = D(4), { pageId: n } = e, { popup: r } = S(), i;
294
- bb0: {
295
- if (!r.target) {
296
- i = !0;
297
- break bb0;
298
- }
299
- if (typeof window > "u") {
300
- i = !1;
301
- break bb0;
302
- }
303
- let e;
304
- if (t[0] !== n || t[1] !== r.target) {
305
- let i = M.get().identity?.referrer?.raw || document.referrer || null, a = new URL(window.location.href, window.location.origin);
306
- e = De(r.target, {
307
- pageId: n,
308
- path: a.pathname
309
- }, i), t[0] = n, t[1] = r.target, t[2] = e;
310
- } else e = t[2];
311
- i = e;
312
- }
313
- let a = i;
314
- if (Te(r, a), !a) return null;
315
- let o;
316
- return t[3] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ R(me, {}), t[3] = o) : o = t[3], o;
317
- }, ke = () => {
318
- let e = j.get(), t = O.get();
319
- return {
320
- trigger_scroll_depth: e.depth,
321
- trigger_scroll_speed: e.speedCategory,
322
- trigger_scroll_direction: e.direction,
323
- trigger_activity_status: t.status,
324
- trigger_activity_seconds: t.seconds,
325
- trigger_tab_count: ne()
326
- };
327
- }, Ae = (e) => {
328
- let t = D(18), { popups: r, pageId: a } = e, o = N(), s = re(), c, l;
329
- t[0] === r ? (c = t[1], l = t[2]) : (c = () => {
330
- i(r), n(!1);
331
- }, l = [r], t[0] = r, t[1] = c, t[2] = l), I(c, l);
332
- let u;
333
- t[3] === o ? u = t[4] : (u = (e, t) => {
334
- !o || typeof o.track != "function" || o?.track(e, t);
335
- }, t[3] = o, t[4] = u);
336
- let d = u, f = je, p;
337
- t[5] === d ? p = t[6] : (p = {
338
- onPopupOpen: (e, t) => {
339
- d("popup.view", {
340
- ...f(e),
341
- trigger_type: t.trigger_type,
342
- language: e.language,
343
- ...ke()
344
- });
345
- },
346
- onPopupClose: (e, t) => {
347
- d("popup.close", {
348
- ...f(e),
349
- trigger_type: t.trigger_type,
350
- dismiss_reason: t.dismiss_reason,
351
- time_shown_ms: t.time_shown_ms
352
- });
353
- },
354
- onAction: (e, t) => {
355
- d("popup.action", {
356
- ...f(e),
357
- ...t
358
- });
359
- }
360
- }, t[5] = d, t[6] = p);
361
- let m = p, h;
362
- if (t[7] !== m || t[8] !== s || t[9] !== a || t[10] !== r) {
363
- let e;
364
- t[12] !== m || t[13] !== s || t[14] !== a ? (e = (e) => /* @__PURE__ */ R(le, {
365
- popupTheme: e.theme,
366
- siteTheme: e.site?.theme,
367
- children: /* @__PURE__ */ R(w, {
368
- popup: e,
369
- callbacks: m,
370
- client: s,
371
- children: /* @__PURE__ */ R(Oe, { pageId: a })
372
- })
373
- }, e.id), t[12] = m, t[13] = s, t[14] = a, t[15] = e) : e = t[15], h = r.map(e), t[7] = m, t[8] = s, t[9] = a, t[10] = r, t[11] = h;
374
- } else h = t[11];
375
- let g;
376
- return t[16] === h ? g = t[17] : (g = /* @__PURE__ */ R(ie, { children: h }), t[16] = h, t[17] = g), g;
377
- };
378
- function je(e) {
379
- return {
380
- resource: "builder.popup",
381
- identifier: e.id,
382
- popup_title: e.title,
383
- placement: e.placement,
384
- popup_action_kind: e.content.action?.type || "none"
385
- };
386
- }
387
- var Me = /* @__PURE__ */ y({ PopupRenderer: () => Ae });
388
- //#endregion
389
- export { Me as t };
@@ -1,20 +0,0 @@
1
- import { n as e } from "./ThemeProvider-CqPHzkW9.js";
2
- import { t } from "./theme.cssm-Czj9sF4X.js";
3
- import { t as n } from "./rteTheme.cssm-W4gTOijw.js";
4
- import { c as r } from "react/compiler-runtime";
5
- import { jsx as i } from "react/jsx-runtime";
6
- import a from "clsx";
7
- //#region ../../libraries/editor-core/dist/theme/RteThemeProvider.js
8
- var o = (o) => {
9
- let s = r(7), { children: c, theme: l } = o, u = l?.className, d;
10
- s[0] === u ? d = s[1] : (d = a(t, n, u), s[0] = u, s[1] = d);
11
- let f = l?.style, p = l?.portalToThemeRoot, m;
12
- return s[2] !== c || s[3] !== d || s[4] !== f || s[5] !== p ? (m = /* @__PURE__ */ i(e, {
13
- className: d,
14
- style: f,
15
- portalToThemeRoot: p,
16
- children: c
17
- }), s[2] = c, s[3] = d, s[4] = f, s[5] = p, s[6] = m) : m = s[6], m;
18
- };
19
- //#endregion
20
- export { o as t };
@@ -1,116 +0,0 @@
1
- import { c as e } from "react/compiler-runtime";
2
- import { createContext as t, useContext as n, useEffect as r, useMemo as i, useRef as a } from "react";
3
- import { jsx as o } from "react/jsx-runtime";
4
- import s from "clsx";
5
- import { createRuntimeFn as c } from "@vanilla-extract/recipes/createRuntimeFn";
6
- //#region ../../libraries/levocn/dist/styles/reset.cssm.js
7
- var l = "_1er5g5a0", u = c({
8
- defaultClassName: "_1a7d0ek1 _1a7d0ek0",
9
- variantClassNames: {
10
- variant: {
11
- default: "_1a7d0ek2",
12
- outline: "_1a7d0ek3",
13
- secondary: "_1a7d0ek4",
14
- ghost: "_1a7d0ek5",
15
- destructive: "_1a7d0ek6",
16
- link: "_1a7d0ek7"
17
- },
18
- size: {
19
- default: "_1a7d0ek8",
20
- xs: "_1a7d0ek9",
21
- sm: "_1a7d0eka",
22
- lg: "_1a7d0ekb",
23
- icon: "_1a7d0ekc",
24
- "icon-xs": "_1a7d0ekd",
25
- "icon-sm": "_1a7d0eke",
26
- "icon-lg": "_1a7d0ekf"
27
- }
28
- },
29
- defaultVariants: {
30
- variant: "default",
31
- size: "default"
32
- },
33
- compoundVariants: []
34
- }), d = (t) => {
35
- let n = e(14), r, i, a, c, l;
36
- n[0] === t ? (r = n[1], i = n[2], a = n[3], c = n[4], l = n[5]) : ({className: r, variant: l, size: a, type: c, ...i} = t, n[0] = t, n[1] = r, n[2] = i, n[3] = a, n[4] = c, n[5] = l);
37
- let d = c === void 0 ? "button" : c, f;
38
- n[6] !== r || n[7] !== a || n[8] !== l ? (f = s(u({
39
- variant: l,
40
- size: a
41
- }), r), n[6] = r, n[7] = a, n[8] = l, n[9] = f) : f = n[9];
42
- let p;
43
- return n[10] !== i || n[11] !== f || n[12] !== d ? (p = /* @__PURE__ */ o("button", {
44
- "data-slot": "button",
45
- type: d,
46
- className: f,
47
- ...i
48
- }), n[10] = i, n[11] = f, n[12] = d, n[13] = p) : p = n[13], p;
49
- }, f = /* @__PURE__ */ new Set(), p = {}, m = t(null), h = () => {
50
- let t = e(1), r = n(m);
51
- if (!r) {
52
- let e;
53
- return t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = {
54
- portalRef: { current: null },
55
- classes: f,
56
- overrides: p
57
- }, t[0] = e) : e = t[0], e;
58
- }
59
- return r;
60
- }, g = ({ children: e, cssReset: t, className: c, style: u, portalToThemeRoot: d, ...h }) => {
61
- let g = n(m), _ = a(null), v = !g && t !== !1 ? l : "", y = g?.classes ?? f, b = g?.overrides ?? p, x = i(() => {
62
- let e = c ? c.split(/\s+/).filter(Boolean) : [], t = new Set(y);
63
- for (let n of e) t.add(n);
64
- return {
65
- portalRef: _,
66
- classes: t,
67
- overrides: {
68
- ...b,
69
- ...u
70
- }
71
- };
72
- }, [
73
- y,
74
- c,
75
- b,
76
- u
77
- ]);
78
- r(() => {
79
- if (d) return;
80
- let e = document.createElement("div");
81
- return document.body.appendChild(e), _.current = e, () => {
82
- document.body.removeChild(e), _.current = null;
83
- };
84
- }, [d]), r(() => {
85
- if (d) return;
86
- let e = _.current;
87
- if (!e) return;
88
- e.className = s(v, ...x.classes), e.style.cssText = "";
89
- let t = {
90
- display: "contents",
91
- ...x.overrides
92
- };
93
- for (let [n, r] of Object.entries(t)) r != null && e.style.setProperty(n, String(r));
94
- }, [
95
- x.classes,
96
- x.overrides,
97
- v,
98
- d
99
- ]);
100
- let S = s(v, ...c ? c.split(/\s+/).filter((e) => e && !y.has(e)) : []);
101
- return /* @__PURE__ */ o(m.Provider, {
102
- value: x,
103
- children: /* @__PURE__ */ o("div", {
104
- ...d ? { ref: _ } : {},
105
- ...S ? { className: S } : {},
106
- style: {
107
- display: "contents",
108
- ...u
109
- },
110
- ...h,
111
- children: e
112
- })
113
- });
114
- };
115
- //#endregion
116
- export { u as i, g as n, d as r, h as t };