@levo-so/studio 0.3.8 → 0.3.9
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/{BillingStep-vBBLXLzk.js → BillingStep-CvRmZGdq.js} +1 -1
- package/{Button-BZDul09m.js → Button-Dza3e6Mv.js} +1 -1
- package/{EntryCard-DLPs2PaP.js → EntryCard-BpcaCqXU.js} +1 -1
- package/{KBChatWidget-B-SNBtoX.js → KBChatWidget-Cgsubvuk.js} +10 -9
- package/{LoginCard-EtzpuqYB.js → LoginCard-B_anBE4b.js} +1 -1
- package/{PendingApprovalCard-CCbhY8p3.js → PendingApprovalCard-DbYp0nSk.js} +1 -1
- package/{PopupBody-DZVwDLkg-PiECxgmc.js → PopupBody-BI-MJqmd-BrzdFaaE.js} +47 -44
- package/{PopupRenderer-BjW1jg70-C1UDgSfJ.js → PopupRenderer-D66Gx63H-GHfJebm6.js} +140 -139
- package/{ProfileCard-DzEBPrax.js → ProfileCard-DmAnVf5R.js} +1 -1
- package/{bookingCard-kEYdGZJ-.js → bookingCard-CLhIpOpR.js} +2 -2
- package/collection.js +1 -1
- package/{dist-2bXx8eVI.js → dist-D5mTOitS.js} +74 -57
- package/index.d.ts +14 -0
- package/index.js +2557 -2244
- package/{kbChat-zJcrfsqJ.js → kbChat-QDHdRejh.js} +1 -1
- package/package.json +41 -41
- package/studio.css +1 -1
- package/{usePopupRedirect-BThP_YPW-jXtfhYu6.js → usePopupRedirect-CAAdcpaW-DdME0F7f.js} +14 -12
|
@@ -4,54 +4,54 @@ import { n as o, t as s } from "./themeMapping-Bi9Rcr5G-C7UXWE6o.js";
|
|
|
4
4
|
import { t as c } from "./theme.cssm-Czj9sF4X.js";
|
|
5
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
6
|
import { t as h } from "./rteTheme.cssm-W4gTOijw.js";
|
|
7
|
-
import {
|
|
8
|
-
import { c as
|
|
9
|
-
import { $activity as
|
|
10
|
-
import { useLevoInsights as
|
|
11
|
-
import { Suspense as
|
|
12
|
-
import { Fragment as
|
|
13
|
-
import { useStore as
|
|
14
|
-
import
|
|
15
|
-
import { IconX as
|
|
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
16
|
//#region ../../libraries/levocn/dist/theme/utils/googleFonts.js
|
|
17
|
-
var
|
|
18
|
-
let t = Array.from(new Set(e.filter((e) => typeof e == "string").map((e) => e.trim()).filter(
|
|
19
|
-
return t.length === 0 ? null : `https://fonts.googleapis.com/css2?${t.map((e) => `family=${e.replace(/ /g, "+")}:${
|
|
20
|
-
},
|
|
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
21
|
if (document.querySelector(`link[rel="preconnect"][href="${e}"]`)) return;
|
|
22
22
|
let t = document.createElement("link");
|
|
23
23
|
t.rel = "preconnect", t.href = e, t.crossOrigin = "anonymous", document.head.appendChild(t);
|
|
24
|
-
},
|
|
24
|
+
}, q = (e) => {
|
|
25
25
|
let t = `family=${e.replace(/ /g, "+")}:`;
|
|
26
26
|
return Array.from(document.querySelectorAll("link[rel=\"stylesheet\"][href*=\"fonts.googleapis.com\"]")).some((e) => e.href.includes(t));
|
|
27
|
-
},
|
|
28
|
-
let t =
|
|
29
|
-
t[0] === n ? r = t[1] : (r = n.filter(
|
|
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
30
|
let i = r, a, o;
|
|
31
31
|
t[2] === i ? (a = t[3], o = t[4]) : (a = () => {
|
|
32
|
-
let e =
|
|
32
|
+
let e = G(...(i ? i.split("|") : []).filter(X));
|
|
33
33
|
if (!e) return;
|
|
34
|
-
|
|
34
|
+
K("https://fonts.googleapis.com"), K("https://fonts.gstatic.com");
|
|
35
35
|
let t = document.createElement("link");
|
|
36
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),
|
|
37
|
+
}, o = [i], t[2] = i, t[3] = a, t[4] = o), I(a, o);
|
|
38
38
|
};
|
|
39
|
-
function
|
|
39
|
+
function Y(e) {
|
|
40
40
|
return typeof e == "string" && e.trim() !== "";
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function ae(e) {
|
|
43
43
|
return e.trim();
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
return !
|
|
45
|
+
function X(e) {
|
|
46
|
+
return !q(e);
|
|
47
47
|
}
|
|
48
48
|
//#endregion
|
|
49
|
-
//#region ../../libraries/popups/dist/PopupDialog-
|
|
49
|
+
//#region ../../libraries/popups/dist/PopupDialog-DeOpYgDM.js
|
|
50
50
|
var oe = (e) => (e ?? "16:9").replace(":", " / "), se = (e) => {
|
|
51
51
|
if (e.content.coverImage?.srcset) return Object.entries(e.content.coverImage.srcset).filter(([e]) => e !== "path").map(([e, t]) => `${t} ${e}`).join(", ");
|
|
52
52
|
}, ce = (e) => {
|
|
53
|
-
let t =
|
|
54
|
-
t[0] !== a.coverImage || t[1] !== a.coverImageFocus || t[2] !== n ? (c = a.coverImage && /* @__PURE__ */
|
|
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
55
|
src: a.coverImage.location,
|
|
56
56
|
srcSet: se(n),
|
|
57
57
|
alt: "",
|
|
@@ -63,32 +63,32 @@ var oe = (e) => (e ?? "16:9").replace(":", " / "), se = (e) => {
|
|
|
63
63
|
let d;
|
|
64
64
|
t[6] === u ? d = t[7] : (d = { aspectRatio: u }, t[6] = u, t[7] = d);
|
|
65
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__ */
|
|
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
67
|
type: "button",
|
|
68
|
-
className:
|
|
68
|
+
className: V("_1gklkndj", "_1gklkndk"),
|
|
69
69
|
style: f,
|
|
70
70
|
onClick: o ?? void 0,
|
|
71
71
|
"aria-label": a.action?.type === "redirect" ? a.action.label : void 0,
|
|
72
72
|
children: l
|
|
73
|
-
}) : /* @__PURE__ */
|
|
73
|
+
}) : /* @__PURE__ */ R("div", {
|
|
74
74
|
className: "_1gklkndj",
|
|
75
75
|
style: f,
|
|
76
76
|
children: l
|
|
77
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
78
|
let m;
|
|
79
|
-
return t[15] !== i || t[16] !== p ? (m = /* @__PURE__ */
|
|
80
|
-
className:
|
|
79
|
+
return t[15] !== i || t[16] !== p ? (m = /* @__PURE__ */ z("div", {
|
|
80
|
+
className: _,
|
|
81
81
|
children: [p, i]
|
|
82
82
|
}), t[15] = i, t[16] = p, t[17] = m) : m = t[17], m;
|
|
83
83
|
}, le = (e) => {
|
|
84
|
-
let t =
|
|
84
|
+
let t = D(19), n, r, i, l, u;
|
|
85
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
86
|
let d;
|
|
87
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
88
|
let f = d;
|
|
89
|
-
|
|
89
|
+
J(f?.fonts?.heading, f?.fonts?.body);
|
|
90
90
|
let p;
|
|
91
|
-
t[9] === Symbol.for("react.memo_cache_sentinel") ? (p =
|
|
91
|
+
t[9] === Symbol.for("react.memo_cache_sentinel") ? (p = V(c, h), t[9] = p) : p = t[9];
|
|
92
92
|
let m;
|
|
93
93
|
t[10] === f ? m = t[11] : (m = s(f), t[10] = f, t[11] = m);
|
|
94
94
|
let g;
|
|
@@ -97,20 +97,20 @@ var oe = (e) => (e ?? "16:9").replace(":", " / "), se = (e) => {
|
|
|
97
97
|
...u
|
|
98
98
|
}, t[12] = u, t[13] = m, t[14] = g) : g = t[14];
|
|
99
99
|
let _;
|
|
100
|
-
return t[15] !== n || t[16] !== i || t[17] !== g ? (_ = /* @__PURE__ */
|
|
100
|
+
return t[15] !== n || t[16] !== i || t[17] !== g ? (_ = /* @__PURE__ */ R(a, {
|
|
101
101
|
className: p,
|
|
102
102
|
cssReset: !0,
|
|
103
103
|
style: g,
|
|
104
104
|
...i,
|
|
105
105
|
children: n
|
|
106
106
|
}), t[15] = n, t[16] = i, t[17] = g, t[18] = _) : _ = t[18], _;
|
|
107
|
-
},
|
|
108
|
-
let t =
|
|
109
|
-
t[0] === r ? i = t[1] : (i =
|
|
107
|
+
}, ue = F(() => import("./PopupBody-BI-MJqmd-BrzdFaaE.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
110
|
let a, o, s;
|
|
111
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */
|
|
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
112
|
let c;
|
|
113
|
-
return t[5] === i ? c = t[6] : (c = /* @__PURE__ */
|
|
113
|
+
return t[5] === i ? c = t[6] : (c = /* @__PURE__ */ z("div", {
|
|
114
114
|
className: i,
|
|
115
115
|
children: [
|
|
116
116
|
a,
|
|
@@ -119,78 +119,78 @@ var oe = (e) => (e ?? "16:9").replace(":", " / "), se = (e) => {
|
|
|
119
119
|
]
|
|
120
120
|
}), t[5] = i, t[6] = c), c;
|
|
121
121
|
}, Z = () => {
|
|
122
|
-
let e =
|
|
123
|
-
e[0] === t.content.size ? n = e[1] : (n = /* @__PURE__ */
|
|
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
124
|
let r;
|
|
125
|
-
e[2] ===
|
|
125
|
+
e[2] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ R(ue, {}), e[2] = r) : r = e[2];
|
|
126
126
|
let i;
|
|
127
|
-
e[
|
|
127
|
+
e[3] === n ? i = e[4] : (i = /* @__PURE__ */ R(P, {
|
|
128
128
|
fallback: n,
|
|
129
129
|
children: r
|
|
130
|
-
}), e[
|
|
130
|
+
}), e[3] = n, e[4] = i);
|
|
131
131
|
let a;
|
|
132
|
-
return e[
|
|
132
|
+
return e[5] !== t || e[6] !== i ? (a = /* @__PURE__ */ R(ce, {
|
|
133
133
|
popup: t,
|
|
134
134
|
children: i
|
|
135
|
-
}), e[
|
|
136
|
-
},
|
|
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
137
|
switch (e) {
|
|
138
138
|
case "close-press": return "close_button";
|
|
139
139
|
case "outside-press": return "outside_click";
|
|
140
140
|
case "escape-key": return "escape_key";
|
|
141
141
|
default: return "programmatic";
|
|
142
142
|
}
|
|
143
|
-
},
|
|
144
|
-
let n =
|
|
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
145
|
n[0] !== i || n[1] !== s || n[2] !== r ? (h = () => {
|
|
146
146
|
s && !c.current && (c.current = !0, i?.onPopupOpen?.(r, { trigger_type: t() })), s || (c.current = !1);
|
|
147
147
|
}, g = [
|
|
148
148
|
s,
|
|
149
149
|
r,
|
|
150
150
|
i
|
|
151
|
-
], n[0] = i, n[1] = s, n[2] = r, n[3] = h, n[4] = g) : (h = n[3], g = n[4]),
|
|
152
|
-
let
|
|
153
|
-
if (n[5] !==
|
|
154
|
-
let e =
|
|
155
|
-
b = f,
|
|
156
|
-
className:
|
|
157
|
-
children: /* @__PURE__ */
|
|
158
|
-
className:
|
|
159
|
-
children: [/* @__PURE__ */
|
|
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
160
|
variant: "ghost",
|
|
161
161
|
size: "icon-xs",
|
|
162
|
-
className:
|
|
162
|
+
className: v,
|
|
163
163
|
"aria-label": "Close popup",
|
|
164
|
-
children: /* @__PURE__ */
|
|
165
|
-
}), /* @__PURE__ */
|
|
164
|
+
children: /* @__PURE__ */ R(H, { size: 16 })
|
|
165
|
+
}), /* @__PURE__ */ R(Z, {})]
|
|
166
166
|
})
|
|
167
|
-
}) : /* @__PURE__ */
|
|
168
|
-
className:
|
|
167
|
+
}) : /* @__PURE__ */ z(p.Popup, {
|
|
168
|
+
className: V(x({
|
|
169
169
|
placement: a,
|
|
170
170
|
position: e
|
|
171
171
|
}), i && "_1gklkndd"),
|
|
172
|
-
children: [/* @__PURE__ */
|
|
172
|
+
children: [/* @__PURE__ */ R(l, {
|
|
173
173
|
variant: "ghost",
|
|
174
174
|
size: "icon-xs",
|
|
175
|
-
className:
|
|
175
|
+
className: v,
|
|
176
176
|
"aria-label": "Close popup",
|
|
177
|
-
children: /* @__PURE__ */
|
|
178
|
-
}), /* @__PURE__ */
|
|
179
|
-
}), n[5] =
|
|
180
|
-
} else y = n[9], b = n[10],
|
|
181
|
-
let
|
|
182
|
-
n[21] !== y || n[22] !==
|
|
183
|
-
let
|
|
184
|
-
return n[25] !== b || n[26] !==
|
|
185
|
-
open:
|
|
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
186
|
onOpenChange: E,
|
|
187
|
-
modal:
|
|
188
|
-
disablePointerDismissal:
|
|
189
|
-
children:
|
|
190
|
-
}), n[25] = b, n[26] =
|
|
191
|
-
},
|
|
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
192
|
if (typeof document > "u") return () => {};
|
|
193
|
-
let t = !1, n = Date.now(), r = [], i = 0, a = null, o = () => Date.now() - n >=
|
|
193
|
+
let t = !1, n = Date.now(), r = [], i = 0, a = null, o = () => Date.now() - n >= he, s = () => {
|
|
194
194
|
t || (t = !0, c(), e());
|
|
195
195
|
}, c = () => {
|
|
196
196
|
a &&= (clearTimeout(a), null);
|
|
@@ -202,51 +202,51 @@ var oe = (e) => (e ?? "16:9").replace(":", " / "), se = (e) => {
|
|
|
202
202
|
r.push({
|
|
203
203
|
y: e.clientY,
|
|
204
204
|
t: Date.now()
|
|
205
|
-
}), r.length >
|
|
205
|
+
}), r.length > be && r.shift();
|
|
206
206
|
}, f = (e) => {
|
|
207
|
-
t || !o() || e.clientY > 0 || u() <
|
|
207
|
+
t || !o() || e.clientY > 0 || u() < ve || Date.now() - i < _e || l() < ye || (c(), a = setTimeout(s, ge));
|
|
208
208
|
}, p = () => {
|
|
209
209
|
c();
|
|
210
210
|
}, m = () => {
|
|
211
211
|
i = Date.now();
|
|
212
|
-
}, h =
|
|
212
|
+
}, h = A.listen((e) => {
|
|
213
213
|
o() && (e === "hidden" || e === "frozen") && s();
|
|
214
214
|
});
|
|
215
215
|
return document.addEventListener("mousemove", d, { passive: !0 }), document.addEventListener("mouseleave", f), document.addEventListener("mouseenter", p), window.addEventListener("scroll", m, { passive: !0 }), () => {
|
|
216
216
|
c(), document.removeEventListener("mousemove", d), document.removeEventListener("mouseleave", f), document.removeEventListener("mouseenter", p), window.removeEventListener("scroll", m), h();
|
|
217
217
|
};
|
|
218
|
-
},
|
|
218
|
+
}, Se = (e, t) => {
|
|
219
219
|
if (!e) return null;
|
|
220
220
|
let n = setTimeout(() => r(t, { trigger_type: "time_on_page" }), e);
|
|
221
221
|
return () => clearTimeout(n);
|
|
222
|
-
},
|
|
222
|
+
}, Ce = (e, t) => {
|
|
223
223
|
if (e === void 0) return null;
|
|
224
224
|
let n = !1;
|
|
225
|
-
return
|
|
225
|
+
return j.listen((i) => {
|
|
226
226
|
n || i.depth >= e && (n = !0, r(t, { trigger_type: "scroll_depth" }));
|
|
227
227
|
});
|
|
228
|
-
},
|
|
228
|
+
}, we = (e) => {
|
|
229
229
|
let t = !1;
|
|
230
|
-
return
|
|
230
|
+
return O.listen((n) => {
|
|
231
231
|
t || n.status === "idle" && (t = !0, r(e, { trigger_type: "inactivity" }));
|
|
232
232
|
});
|
|
233
|
-
},
|
|
234
|
-
let n =
|
|
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
235
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (c = [], n[0] = c) : c = n[0];
|
|
236
|
-
let l =
|
|
236
|
+
let l = L(c), u;
|
|
237
237
|
n[1] !== i || n[2] !== s || n[3] !== e || n[4] !== a ? (u = () => {
|
|
238
238
|
if (!i || !s || !a) return;
|
|
239
239
|
let t = [];
|
|
240
240
|
if (a.time_on_page.enabled) {
|
|
241
|
-
let n =
|
|
241
|
+
let n = Se(a.time_on_page.delay_ms, e);
|
|
242
242
|
n && t.push(n);
|
|
243
243
|
}
|
|
244
244
|
if (a.scroll_depth.enabled) {
|
|
245
|
-
let n =
|
|
245
|
+
let n = Ce(a.scroll_depth.percent, e);
|
|
246
246
|
n && t.push(n);
|
|
247
247
|
}
|
|
248
|
-
return a.exit_intent.enabled && t.push(
|
|
249
|
-
t.forEach(
|
|
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
250
|
};
|
|
251
251
|
}, n[1] = i, n[2] = s, n[3] = e, n[4] = a, n[5] = u) : u = n[5];
|
|
252
252
|
let d;
|
|
@@ -255,9 +255,9 @@ var oe = (e) => (e ?? "16:9").replace(":", " / "), se = (e) => {
|
|
|
255
255
|
s,
|
|
256
256
|
o,
|
|
257
257
|
a
|
|
258
|
-
], n[6] = i, n[7] = s, n[8] = o, n[9] = a, n[10] = d) : d = n[10],
|
|
258
|
+
], n[6] = i, n[7] = s, n[8] = o, n[9] = a, n[10] = d) : d = n[10], I(u, d);
|
|
259
259
|
};
|
|
260
|
-
function
|
|
260
|
+
function Ee(e) {
|
|
261
261
|
return e();
|
|
262
262
|
}
|
|
263
263
|
var Q = (e, t) => {
|
|
@@ -280,7 +280,7 @@ var Q = (e, t) => {
|
|
|
280
280
|
}
|
|
281
281
|
default: return !1;
|
|
282
282
|
}
|
|
283
|
-
},
|
|
283
|
+
}, De = (e, t, n) => {
|
|
284
284
|
let r = e.pages?.exclude ?? [];
|
|
285
285
|
if (r.length > 0 && r.some((e) => Q(e, t))) return !1;
|
|
286
286
|
let i = e.pages?.include ?? [];
|
|
@@ -289,8 +289,8 @@ var Q = (e, t) => {
|
|
|
289
289
|
if (a.length > 0 && (!n || !a.some((e) => $(e, n)))) return !1;
|
|
290
290
|
let o = e.referrer?.exclude ?? [];
|
|
291
291
|
return !(o.length > 0 && n && o.some((e) => $(e, n)));
|
|
292
|
-
},
|
|
293
|
-
let t =
|
|
292
|
+
}, Oe = (e) => {
|
|
293
|
+
let t = D(4), { pageId: n } = e, { popup: r } = S(), i;
|
|
294
294
|
bb0: {
|
|
295
295
|
if (!r.target) {
|
|
296
296
|
i = !0;
|
|
@@ -302,8 +302,8 @@ var Q = (e, t) => {
|
|
|
302
302
|
}
|
|
303
303
|
let e;
|
|
304
304
|
if (t[0] !== n || t[1] !== r.target) {
|
|
305
|
-
let i =
|
|
306
|
-
e =
|
|
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
307
|
pageId: n,
|
|
308
308
|
path: a.pathname
|
|
309
309
|
}, i), t[0] = n, t[1] = r.target, t[2] = e;
|
|
@@ -311,70 +311,71 @@ var Q = (e, t) => {
|
|
|
311
311
|
i = e;
|
|
312
312
|
}
|
|
313
313
|
let a = i;
|
|
314
|
-
if (
|
|
314
|
+
if (Te(r, a), !a) return null;
|
|
315
315
|
let o;
|
|
316
|
-
return t[3] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */
|
|
317
|
-
},
|
|
318
|
-
let e =
|
|
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
319
|
return {
|
|
320
320
|
trigger_scroll_depth: e.depth,
|
|
321
321
|
trigger_scroll_speed: e.speedCategory,
|
|
322
322
|
trigger_scroll_direction: e.direction,
|
|
323
323
|
trigger_activity_status: t.status,
|
|
324
324
|
trigger_activity_seconds: t.seconds,
|
|
325
|
-
trigger_tab_count:
|
|
325
|
+
trigger_tab_count: ne()
|
|
326
326
|
};
|
|
327
|
-
},
|
|
328
|
-
let t =
|
|
329
|
-
t[0] === r ? (
|
|
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
330
|
i(r), n(!1);
|
|
331
|
-
},
|
|
332
|
-
let
|
|
333
|
-
t[3] === o ?
|
|
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
334
|
!o || typeof o.track != "function" || o?.track(e, t);
|
|
335
|
-
}, t[3] = o, t[4] =
|
|
336
|
-
let
|
|
337
|
-
t[5] ===
|
|
335
|
+
}, t[3] = o, t[4] = u);
|
|
336
|
+
let d = u, f = je, p;
|
|
337
|
+
t[5] === d ? p = t[6] : (p = {
|
|
338
338
|
onPopupOpen: (e, t) => {
|
|
339
|
-
|
|
340
|
-
...
|
|
339
|
+
d("popup.view", {
|
|
340
|
+
...f(e),
|
|
341
341
|
trigger_type: t.trigger_type,
|
|
342
342
|
language: e.language,
|
|
343
|
-
...
|
|
343
|
+
...ke()
|
|
344
344
|
});
|
|
345
345
|
},
|
|
346
346
|
onPopupClose: (e, t) => {
|
|
347
|
-
|
|
348
|
-
...
|
|
347
|
+
d("popup.close", {
|
|
348
|
+
...f(e),
|
|
349
349
|
trigger_type: t.trigger_type,
|
|
350
350
|
dismiss_reason: t.dismiss_reason,
|
|
351
351
|
time_shown_ms: t.time_shown_ms
|
|
352
352
|
});
|
|
353
353
|
},
|
|
354
354
|
onAction: (e, t) => {
|
|
355
|
-
|
|
356
|
-
...
|
|
355
|
+
d("popup.action", {
|
|
356
|
+
...f(e),
|
|
357
357
|
...t
|
|
358
358
|
});
|
|
359
359
|
}
|
|
360
|
-
}, t[5] =
|
|
361
|
-
let
|
|
362
|
-
if (t[7] !==
|
|
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
363
|
let e;
|
|
364
|
-
t[
|
|
364
|
+
t[12] !== m || t[13] !== s || t[14] !== a ? (e = (e) => /* @__PURE__ */ R(le, {
|
|
365
365
|
popupTheme: e.theme,
|
|
366
366
|
siteTheme: e.site?.theme,
|
|
367
|
-
children: /* @__PURE__ */
|
|
367
|
+
children: /* @__PURE__ */ R(w, {
|
|
368
368
|
popup: e,
|
|
369
|
-
callbacks:
|
|
370
|
-
|
|
369
|
+
callbacks: m,
|
|
370
|
+
client: s,
|
|
371
|
+
children: /* @__PURE__ */ R(Oe, { pageId: a })
|
|
371
372
|
})
|
|
372
|
-
}, e.id), t[
|
|
373
|
-
} else
|
|
374
|
-
let
|
|
375
|
-
return t[
|
|
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;
|
|
376
377
|
};
|
|
377
|
-
function
|
|
378
|
+
function je(e) {
|
|
378
379
|
return {
|
|
379
380
|
resource: "builder.popup",
|
|
380
381
|
identifier: e.id,
|
|
@@ -383,6 +384,6 @@ function Ae(e) {
|
|
|
383
384
|
popup_action_kind: e.content.action?.type || "none"
|
|
384
385
|
};
|
|
385
386
|
}
|
|
386
|
-
var
|
|
387
|
+
var Me = /* @__PURE__ */ y({ PopupRenderer: () => Ae });
|
|
387
388
|
//#endregion
|
|
388
|
-
export {
|
|
389
|
+
export { Me as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./Button-
|
|
2
|
+
import { t as e } from "./Button-Dza3e6Mv.js";
|
|
3
3
|
import { n as t } from "./AuthProvider-B5NfFwbG.js";
|
|
4
4
|
import { t as n } from "./cn-B6c1DjO_.js";
|
|
5
5
|
import { n as r, t as i } from "./StripePaymentModal-CiKqmQwK.js";
|
|
6
|
-
import { BillingStep as a } from "./BillingStep-
|
|
6
|
+
import { BillingStep as a } from "./BillingStep-CvRmZGdq.js";
|
|
7
7
|
import { errorHandler as o, useLevo as s } from "@levo-so/react";
|
|
8
8
|
import { useEffect as c, useRef as l, useState as u } from "react";
|
|
9
9
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
package/collection.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o } from "./dist-
|
|
1
|
+
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o } from "./dist-D5mTOitS.js";
|
|
2
2
|
export { t as CollectionForm, a as CollectionFormBuilder, r as CollectionFormRenderer, n as FormBuilder, i as LevoFormProvider, e as useLevoForm, o as useLevoFormContext };
|