@levo-so/site-runtime 0.3.1 → 0.3.8
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/CollectionField-C-6a1ud4.js +270 -0
- package/{CollectionInput-B1qV4QEH.js → CollectionInput-BJ__qcbk.js} +40 -40
- package/DateTimeWidget-hFjcn3o6.js +255 -0
- package/Dialog-dT7y641z.js +130 -0
- package/KBChatWidget-ClHFDgJ5.js +1026 -0
- package/LevoProvider-Bsjkcwc8.js +20 -0
- package/PhoneWidget-BmBO-kvA.js +99 -0
- package/{Popover-q5dL7y0W.js → Popover-3N88sRp4.js} +20 -20
- package/{PopupRenderer-Bncp54gB-DuCULkBK.js → PopupBody-DZVwDLkg-Cfy3lWGs.js} +201 -910
- package/PopupRenderer-BjW1jg70-W2y-PEPH.js +387 -0
- package/{RichTextWidget-D-mGlES0.js → RichTextWidget-DkKHEq4j.js} +142 -141
- package/ThemeProvider-DutrjSTF.js +116 -0
- package/{Tooltip-BIgrpetu.js → Tooltip-CQB0LyxK.js} +20 -20
- package/VerifyButton-BUT70lgz.js +192 -0
- package/{theme.cssm-2YTdd8Yh.js → createThemeExtension-4AUn51iJ.js} +2 -2
- package/dist-CRDgdAkQ.js +3631 -0
- package/dist-DPmVG7VB.js +79 -0
- package/index.d.ts +575 -3
- package/index.js +1217 -722
- package/inlineBaseTheme-BB9e6h5f.js +9 -0
- package/inlineCollectionTheme-CWcMCUti.js +19 -0
- package/{kbChat-AUJxjURc.js → kbChat-C00LVlxP.js} +53 -48
- package/{nodeAlignment-Cn6xNtOP.js → nodeAlignment-BnJljFlw.js} +13 -13
- package/package.json +9 -9
- package/pillChrome-BAu5AfCT.js +30 -0
- package/popupState-JmpeKzgM-qhNTV79U.js +229 -0
- package/popups.js +1 -1
- package/react-CV3jf2mc.js +74 -0
- package/rteTheme.cssm-xg0gJ28J.js +4 -0
- package/styles.css +1 -1
- package/theme.cssm-DUzmx76l.js +4 -0
- package/{inlineCollectionTheme-D2w17LHX.js → themeVars.cssm-ByhhC2Jm.js} +18 -33
- package/usePopupRedirect-BThP_YPW-COUseDik.js +80 -0
- package/CollectionField-CzS-34zx.js +0 -270
- package/DateTimeWidget-C1jHOtz7.js +0 -255
- package/Dialog-CzVhHLEY.js +0 -145
- package/KBChatWidget-D7F9LRwI.js +0 -1078
- package/PhoneWidget-_nw97rkI.js +0 -99
- package/ThemeProvider-BQmIB5tr.js +0 -116
- package/VerifyButton-BkP98H17.js +0 -191
- package/dist-CJknSbJK.js +0 -80
- package/dist-DBbiX2ST.js +0 -3556
- package/inlineBaseTheme-DS-AfUHi.js +0 -9
- package/pillChrome-AhXOWXIb.js +0 -20
- /package/{es-iCqKQf1c.js → es-CztjLuNy.js} +0 -0
|
@@ -1,221 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import { Fragment as te, jsx as
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { Superscript as Ae } from "@tiptap/extension-superscript";
|
|
24
|
-
import { Typography as je } from "@tiptap/extension-typography";
|
|
25
|
-
import { UniqueID as Me } from "@tiptap/extension-unique-id";
|
|
26
|
-
//#region ../../libraries/levocn/dist/theme/utils/googleFonts.js
|
|
27
|
-
var Ne = "wght@300;400;500;600;700;900", Pe = (e) => !!e && e !== "inherit" && !e.includes(",") && !e.includes("var("), Fe = (...e) => {
|
|
28
|
-
let t = Array.from(new Set(e.filter((e) => typeof e == "string").map((e) => e.trim()).filter(Pe)));
|
|
29
|
-
return t.length === 0 ? null : `https://fonts.googleapis.com/css2?${t.map((e) => `family=${e.replace(/ /g, "+")}:${Ne}`).join("&")}&display=swap`;
|
|
30
|
-
}, Ie = (e) => {
|
|
31
|
-
if (document.querySelector(`link[rel="preconnect"][href="${e}"]`)) return;
|
|
32
|
-
let t = document.createElement("link");
|
|
33
|
-
t.rel = "preconnect", t.href = e, t.crossOrigin = "anonymous", document.head.appendChild(t);
|
|
34
|
-
}, Le = (e) => {
|
|
35
|
-
let t = `family=${e.replace(/ /g, "+")}:`;
|
|
36
|
-
return Array.from(document.querySelectorAll("link[rel=\"stylesheet\"][href*=\"fonts.googleapis.com\"]")).some((e) => e.href.includes(t));
|
|
37
|
-
}, Re = (...e) => {
|
|
38
|
-
let t = N(5), n = e, r;
|
|
39
|
-
t[0] === n ? r = t[1] : (r = n.filter(ze).map(Be).join("|"), t[0] = n, t[1] = r);
|
|
40
|
-
let i = r, a, o;
|
|
41
|
-
t[2] === i ? (a = t[3], o = t[4]) : (a = () => {
|
|
42
|
-
let e = Fe(...(i ? i.split("|") : []).filter(Ve));
|
|
43
|
-
if (!e) return;
|
|
44
|
-
Ie("https://fonts.googleapis.com"), Ie("https://fonts.gstatic.com");
|
|
45
|
-
let t = document.createElement("link");
|
|
46
|
-
t.rel = "stylesheet", t.href = e, t.crossOrigin = "anonymous", t.setAttribute("data-levo-fonts", e), document.head.appendChild(t);
|
|
47
|
-
}, o = [i], t[2] = i, t[3] = a, t[4] = o), D(a, o);
|
|
48
|
-
};
|
|
49
|
-
function ze(e) {
|
|
50
|
-
return typeof e == "string" && e.trim() !== "";
|
|
51
|
-
}
|
|
52
|
-
function Be(e) {
|
|
53
|
-
return e.trim();
|
|
54
|
-
}
|
|
55
|
-
function Ve(e) {
|
|
56
|
-
return !Le(e);
|
|
57
|
-
}
|
|
58
|
-
//#endregion
|
|
59
|
-
//#region ../../node_modules/.pnpm/nanostores@0.11.4/node_modules/nanostores/clean-stores/index.js
|
|
60
|
-
var He = Symbol("clean"), H = [], U = 0, Ue = 4, We = 0, W = (e) => {
|
|
61
|
-
let t = [], n = {
|
|
62
|
-
get() {
|
|
63
|
-
return n.lc || n.listen(() => {})(), n.value;
|
|
64
|
-
},
|
|
65
|
-
lc: 0,
|
|
66
|
-
listen(e) {
|
|
67
|
-
return n.lc = t.push(e), () => {
|
|
68
|
-
for (let t = U + Ue; t < H.length;) H[t] === e ? H.splice(t, Ue) : t += Ue;
|
|
69
|
-
let r = t.indexOf(e);
|
|
70
|
-
~r && (t.splice(r, 1), --n.lc || n.off());
|
|
71
|
-
};
|
|
72
|
-
},
|
|
73
|
-
notify(e, r) {
|
|
74
|
-
We++;
|
|
75
|
-
let i = !H.length;
|
|
76
|
-
for (let i of t) H.push(i, n.value, e, r);
|
|
77
|
-
if (i) {
|
|
78
|
-
for (U = 0; U < H.length; U += Ue) H[U](H[U + 1], H[U + 2], H[U + 3]);
|
|
79
|
-
H.length = 0;
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
off() {},
|
|
83
|
-
set(e) {
|
|
84
|
-
let t = n.value;
|
|
85
|
-
t !== e && (n.value = e, n.notify(t));
|
|
86
|
-
},
|
|
87
|
-
subscribe(e) {
|
|
88
|
-
let t = n.listen(e);
|
|
89
|
-
return e(n.value), t;
|
|
90
|
-
},
|
|
91
|
-
value: e
|
|
92
|
-
};
|
|
93
|
-
return process.env.NODE_ENV !== "production" && (n[He] = () => {
|
|
94
|
-
t = [], n.lc = 0, n.off();
|
|
95
|
-
}), n;
|
|
96
|
-
}, Ge = 5, G = 6, Ke = 10, qe = (e, t, n, r) => (e.events = e.events || {}, e.events[n + Ke] || (e.events[n + Ke] = r((t) => {
|
|
97
|
-
e.events[n].reduceRight((e, t) => (t(e), e), {
|
|
98
|
-
shared: {},
|
|
99
|
-
...t
|
|
100
|
-
});
|
|
101
|
-
})), e.events[n] = e.events[n] || [], e.events[n].push(t), () => {
|
|
102
|
-
let r = e.events[n], i = r.indexOf(t);
|
|
103
|
-
r.splice(i, 1), r.length || (delete e.events[n], e.events[n + Ke](), delete e.events[n + Ke]);
|
|
104
|
-
}), Je = 1e3, Ye = (e, t) => qe(e, (n) => {
|
|
105
|
-
let r = t(n);
|
|
106
|
-
r && e.events[G].push(r);
|
|
107
|
-
}, Ge, (t) => {
|
|
108
|
-
let n = e.listen;
|
|
109
|
-
e.listen = (...r) => (!e.lc && !e.active && (e.active = !0, t()), n(...r));
|
|
110
|
-
let r = e.off;
|
|
111
|
-
if (e.events[G] = [], e.off = () => {
|
|
112
|
-
r(), setTimeout(() => {
|
|
113
|
-
if (e.active && !e.lc) {
|
|
114
|
-
e.active = !1;
|
|
115
|
-
for (let t of e.events[G]) t();
|
|
116
|
-
e.events[G] = [];
|
|
117
|
-
}
|
|
118
|
-
}, Je);
|
|
119
|
-
}, process.env.NODE_ENV !== "production") {
|
|
120
|
-
let t = e[He];
|
|
121
|
-
e[He] = () => {
|
|
122
|
-
for (let t of e.events[G]) t();
|
|
123
|
-
e.events[G] = [], e.active = !1, t();
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
return () => {
|
|
127
|
-
e.listen = n, e.off = r;
|
|
128
|
-
};
|
|
129
|
-
}), Xe = (e, t, n) => {
|
|
130
|
-
Array.isArray(e) || (e = [e]);
|
|
131
|
-
let r, i, a = () => {
|
|
132
|
-
if (i === We) return;
|
|
133
|
-
i = We;
|
|
134
|
-
let n = e.map((e) => e.get());
|
|
135
|
-
if (!r || n.some((e, t) => e !== r[t])) {
|
|
136
|
-
r = n;
|
|
137
|
-
let e = t(...n);
|
|
138
|
-
e && e.then && e.t ? e.then((e) => {
|
|
139
|
-
r === n && o.set(e);
|
|
140
|
-
}) : (o.set(e), i = We);
|
|
141
|
-
}
|
|
142
|
-
}, o = W(void 0), s = o.get;
|
|
143
|
-
o.get = () => (a(), s());
|
|
144
|
-
let c, l = n ? () => {
|
|
145
|
-
clearTimeout(c), c = setTimeout(a);
|
|
146
|
-
} : a;
|
|
147
|
-
return Ye(o, () => {
|
|
148
|
-
let t = e.map((e) => e.listen(l));
|
|
149
|
-
return a(), () => {
|
|
150
|
-
for (let e of t) e();
|
|
151
|
-
};
|
|
152
|
-
}), o;
|
|
153
|
-
}, Ze = (e, t) => Xe(e, t);
|
|
154
|
-
//#endregion
|
|
155
|
-
//#region ../../node_modules/.pnpm/nanostores@0.11.4/node_modules/nanostores/listen-keys/index.js
|
|
156
|
-
function Qe(e, t, n) {
|
|
157
|
-
let r = new Set(t).add(void 0);
|
|
158
|
-
return e.listen((e, t, i) => {
|
|
159
|
-
r.has(i) && n(e, t, i);
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
//#endregion
|
|
163
|
-
//#region ../../node_modules/.pnpm/@nanostores+persistent@1.3.3_nanostores@0.11.4/node_modules/@nanostores/persistent/index.js
|
|
164
|
-
var $e = (e) => e, K = {}, et = {
|
|
165
|
-
addEventListener() {},
|
|
166
|
-
removeEventListener() {}
|
|
167
|
-
};
|
|
168
|
-
function tt() {
|
|
169
|
-
try {
|
|
170
|
-
return typeof localStorage < "u";
|
|
171
|
-
} catch {
|
|
172
|
-
return !1;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
tt() && (K = localStorage), typeof window < "u" && (et = {
|
|
176
|
-
addEventListener(e, t, n) {
|
|
177
|
-
window.addEventListener("storage", t), window.addEventListener("pageshow", n);
|
|
178
|
-
},
|
|
179
|
-
removeEventListener(e, t, n) {
|
|
180
|
-
window.removeEventListener("storage", t), window.removeEventListener("pageshow", n);
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
function nt(e, t = void 0, n = {}) {
|
|
184
|
-
let r = n.encode || $e, i = n.decode || $e, a = K[e], o = W(e in K ? i(a) : t), s = o.set;
|
|
185
|
-
o.set = (t) => {
|
|
186
|
-
a = r(t), a === void 0 ? delete K[e] : K[e] = a, s(t);
|
|
187
|
-
};
|
|
188
|
-
function c(n) {
|
|
189
|
-
n.key === e ? n.newValue === null ? s(t) : s(i(n.newValue)) : K[e] || s(t);
|
|
190
|
-
}
|
|
191
|
-
function l() {
|
|
192
|
-
a !== K[e] && o.set(e in K ? i(K[e]) : t);
|
|
193
|
-
}
|
|
194
|
-
return Ye(o, () => {
|
|
195
|
-
if (l(), n.listen !== !1) return et.addEventListener(e, c, l), () => {
|
|
196
|
-
et.removeEventListener(e, c, l);
|
|
197
|
-
};
|
|
198
|
-
}), o;
|
|
199
|
-
}
|
|
200
|
-
//#endregion
|
|
1
|
+
import { r as e } from "./ThemeProvider-DutrjSTF.js";
|
|
2
|
+
import { t } from "./LevoProvider-Bsjkcwc8.js";
|
|
3
|
+
import { i as n, r, t as i } from "./Dialog-dT7y641z.js";
|
|
4
|
+
import { t as a } from "./inlineCollectionTheme-CWcMCUti.js";
|
|
5
|
+
import { _ as o, a as s, d as c, g as l, i as u, l as d, r as f } from "./usePopupRedirect-BThP_YPW-COUseDik.js";
|
|
6
|
+
import { n as p, r as m, t as h } from "./nodeAlignment-BnJljFlw.js";
|
|
7
|
+
import { c as ee } from "react/compiler-runtime";
|
|
8
|
+
import g from "clsx";
|
|
9
|
+
import { Fragment as te, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
10
|
+
import y, { Suspense as b, lazy as x, useMemo as S, useState as ne } from "react";
|
|
11
|
+
import { IconCheck as re, IconCopy as ie } from "@tabler/icons-react";
|
|
12
|
+
import { Extension as C, Mark as w, Node as T, getAttributesFromExtensions as E, getExtensionField as D, getSchema as O, getSchemaByResolvedExtensions as k, getStyleProperty as A, markInputRule as j, markPasteRule as M, mergeAttributes as N, resolveExtensions as ae, splitExtensions as oe, textblockTypeInputRule as se } from "@tiptap/core";
|
|
13
|
+
import { DOMParser as ce, Node as P } from "@tiptap/pm/model";
|
|
14
|
+
import { jsx as F } from "@tiptap/core/jsx-runtime";
|
|
15
|
+
import { BulletList as I, ListItem as L, OrderedList as R } from "@tiptap/extension-list";
|
|
16
|
+
import { Color as z, TextStyle as B } from "@tiptap/extension-text-style";
|
|
17
|
+
import { Document as V } from "@tiptap/extension-document";
|
|
18
|
+
import { Link as H } from "@tiptap/extension-link";
|
|
19
|
+
import { Subscript as U } from "@tiptap/extension-subscript";
|
|
20
|
+
import { Superscript as W } from "@tiptap/extension-superscript";
|
|
21
|
+
import { Typography as G } from "@tiptap/extension-typography";
|
|
22
|
+
import { UniqueID as le } from "@tiptap/extension-unique-id";
|
|
201
23
|
//#region ../../node_modules/.pnpm/@tiptap+html@3.23.5_@tiptap+core@3.23.5_@tiptap+pm@3.23.5__@tiptap+pm@3.23.5_happy-dom@20.9.0/node_modules/@tiptap/html/dist/index.js
|
|
202
|
-
function
|
|
24
|
+
function ue(e, t, n) {
|
|
203
25
|
if (typeof window > "u") throw Error("generateJSON can only be used in a browser environment\nIf you want to use this in a Node environment, use the `@tiptap/html/server` import instead.");
|
|
204
|
-
let r =
|
|
26
|
+
let r = O(t), i = new window.DOMParser().parseFromString(e, "text/html");
|
|
205
27
|
if (!i) throw Error("Failed to parse HTML string");
|
|
206
|
-
return
|
|
28
|
+
return ce.fromSchema(r).parse(i.body, n).toJSON();
|
|
207
29
|
}
|
|
208
30
|
//#endregion
|
|
209
31
|
//#region ../../node_modules/.pnpm/@tiptap+static-renderer@3.23.5_@tiptap+core@3.23.5_@tiptap+pm@3.23.5__@tiptap+pm@3.23.5_b87ef4cd4355051c9859f15a0f52cacb/node_modules/@tiptap/static-renderer/dist/pm/react/index.js
|
|
210
|
-
function
|
|
32
|
+
function de(e, t, n) {
|
|
211
33
|
let r = e.attrs;
|
|
212
|
-
return r ? t.filter((t) => t.type === (typeof e.type == "string" ? e.type : e.type.name) ? n ? t.attribute.rendered : !0 : !1).map((e) => e.attribute.renderHTML && e.attribute.renderHTML(r) || { [e.name]: e.name in r ? r[e.name] : e.attribute.default }).reduce((e, t) =>
|
|
34
|
+
return r ? t.filter((t) => t.type === (typeof e.type == "string" ? e.type : e.type.name) ? n ? t.attribute.rendered : !0 : !1).map((e) => e.attribute.renderHTML && e.attribute.renderHTML(r) || { [e.name]: e.name in r ? r[e.name] : e.attribute.default }).reduce((e, t) => N(e, t), {}) : {};
|
|
213
35
|
}
|
|
214
|
-
function
|
|
215
|
-
return
|
|
36
|
+
function K(e, t) {
|
|
37
|
+
return de(e, t, !0);
|
|
216
38
|
}
|
|
217
|
-
function
|
|
218
|
-
let i =
|
|
39
|
+
function fe(e, t, n, r) {
|
|
40
|
+
let i = D(t, "renderHTML", {
|
|
219
41
|
name: t.name,
|
|
220
42
|
options: t.options,
|
|
221
43
|
storage: t.storage,
|
|
@@ -225,7 +47,7 @@ function ot(e, t, n, r) {
|
|
|
225
47
|
try {
|
|
226
48
|
return e(i({
|
|
227
49
|
node: r,
|
|
228
|
-
HTMLAttributes:
|
|
50
|
+
HTMLAttributes: K(r, n)
|
|
229
51
|
}))(a);
|
|
230
52
|
} catch (e) {
|
|
231
53
|
throw Error(`[tiptap error]: Node ${t.name} cannot be rendered, it's "renderToHTML" method threw an error: ${e.message}`, { cause: e });
|
|
@@ -234,8 +56,8 @@ function ot(e, t, n, r) {
|
|
|
234
56
|
throw Error(`[tiptap error]: Node ${t.name} cannot be rendered, it is missing a "renderToHTML" method, please implement it or override the corresponding "nodeMapping" method to have a custom rendering`);
|
|
235
57
|
}];
|
|
236
58
|
}
|
|
237
|
-
function
|
|
238
|
-
let i =
|
|
59
|
+
function pe(e, t, n, r) {
|
|
60
|
+
let i = D(t, "renderHTML", {
|
|
239
61
|
name: t.name,
|
|
240
62
|
options: t.options,
|
|
241
63
|
storage: t.storage,
|
|
@@ -245,7 +67,7 @@ function st(e, t, n, r) {
|
|
|
245
67
|
try {
|
|
246
68
|
return e(i({
|
|
247
69
|
mark: r,
|
|
248
|
-
HTMLAttributes:
|
|
70
|
+
HTMLAttributes: K(r, n)
|
|
249
71
|
}))(a);
|
|
250
72
|
} catch (e) {
|
|
251
73
|
throw Error(`[tiptap error]: Mark ${t.name} cannot be rendered, it's "renderToHTML" method threw an error: ${e.message}`, { cause: e });
|
|
@@ -254,23 +76,23 @@ function st(e, t, n, r) {
|
|
|
254
76
|
throw Error(`Node ${t.name} cannot be rendered, it is missing a "renderToHTML" method`);
|
|
255
77
|
}];
|
|
256
78
|
}
|
|
257
|
-
function
|
|
258
|
-
i =
|
|
259
|
-
let o =
|
|
260
|
-
return r instanceof
|
|
79
|
+
function me({ renderer: e, domOutputSpecToElement: t, mapDefinedTypes: n, content: r, extensions: i, options: a }) {
|
|
80
|
+
i = ae(i);
|
|
81
|
+
let o = E(i), { nodeExtensions: s, markExtensions: c } = oe(i);
|
|
82
|
+
return r instanceof P || (r = P.fromJSON(k(i), r)), e({
|
|
261
83
|
...a,
|
|
262
84
|
nodeMapping: {
|
|
263
|
-
...Object.fromEntries(s.filter((e) => e.name in n ? !1 : a?.nodeMapping ? !(e.name in a.nodeMapping) : !0).map((e) =>
|
|
85
|
+
...Object.fromEntries(s.filter((e) => e.name in n ? !1 : a?.nodeMapping ? !(e.name in a.nodeMapping) : !0).map((e) => fe(t, e, o, a))),
|
|
264
86
|
...n,
|
|
265
87
|
...a?.nodeMapping
|
|
266
88
|
},
|
|
267
89
|
markMapping: {
|
|
268
|
-
...Object.fromEntries(c.filter((e) => a?.markMapping ? !(e.name in a.markMapping) : !0).map((e) =>
|
|
90
|
+
...Object.fromEntries(c.filter((e) => a?.markMapping ? !(e.name in a.markMapping) : !0).map((e) => pe(t, e, o, a))),
|
|
269
91
|
...a?.markMapping
|
|
270
92
|
}
|
|
271
93
|
})({ content: r });
|
|
272
94
|
}
|
|
273
|
-
function
|
|
95
|
+
function he(e, { nodeMapping: t, markMapping: n, unhandledNode: r, unhandledMark: i }) {
|
|
274
96
|
return function a({ content: o, parent: s }) {
|
|
275
97
|
let c = typeof o.type == "string" ? o.type : o.type.name, l = t[c] ?? r;
|
|
276
98
|
if (!l) throw Error(`missing handler for node type ${c}`);
|
|
@@ -306,9 +128,9 @@ function lt(e, { nodeMapping: t, markMapping: n, unhandledNode: r, unhandledMark
|
|
|
306
128
|
}, u) : u;
|
|
307
129
|
};
|
|
308
130
|
}
|
|
309
|
-
function
|
|
131
|
+
function ge(e) {
|
|
310
132
|
let t = 0;
|
|
311
|
-
return
|
|
133
|
+
return he(({ component: e, props: { children: n, ...r } }) => y.createElement(e, Object.assign(r, { key: t++ }), [].concat(n)), e);
|
|
312
134
|
}
|
|
313
135
|
function q(e, t) {
|
|
314
136
|
return e ? Object.entries(e).reduce((e, [t, n]) => {
|
|
@@ -330,18 +152,18 @@ function J(e, t = 0) {
|
|
|
330
152
|
if (typeof e == "string") return () => e;
|
|
331
153
|
if (typeof e == "object" && "length" in e) {
|
|
332
154
|
let [n, r, i, ...a] = e, o = n.split(" ");
|
|
333
|
-
if (o.length > 1 && (n = o[1], r === void 0 && (r = { xmlns: o[0] }), r === 0 && (r = { xmlns: o[0] }, i = 0), typeof r == "object" && (r = Object.assign(r, { xmlns: o[0] }))), r === void 0) return () =>
|
|
334
|
-
if (r === 0) return (e) =>
|
|
335
|
-
if (typeof r == "object") return Array.isArray(r) ? i === void 0 || i === 0 ? (e) =>
|
|
155
|
+
if (o.length > 1 && (n = o[1], r === void 0 && (r = { xmlns: o[0] }), r === 0 && (r = { xmlns: o[0] }, i = 0), typeof r == "object" && (r = Object.assign(r, { xmlns: o[0] }))), r === void 0) return () => y.createElement(n, q(void 0, t.toString()));
|
|
156
|
+
if (r === 0) return (e) => y.createElement(n, q(void 0, t.toString()), e);
|
|
157
|
+
if (typeof r == "object") return Array.isArray(r) ? i === void 0 || i === 0 ? (e) => y.createElement(n, q(void 0, t.toString()), J(r, t++)(e)) : (e) => y.createElement(n, q(void 0, t.toString()), J(r)(e), [i].concat(a).map((n) => J(n, t++)(e))) : i === void 0 ? () => y.createElement(n, q(r, t.toString())) : i === 0 ? (e) => y.createElement(n, q(r, t.toString()), e) : (e) => y.createElement(n, q(r, t.toString()), [i].concat(a).map((n) => J(n, t++)(e)));
|
|
336
158
|
}
|
|
337
159
|
throw Error("[tiptap error]: Unsupported DomOutputSpec type, check the `renderHTML` method output or implement a node mapping", { cause: e });
|
|
338
160
|
}
|
|
339
|
-
function
|
|
340
|
-
return
|
|
341
|
-
renderer:
|
|
161
|
+
function _e({ content: e, extensions: t, options: n }) {
|
|
162
|
+
return me({
|
|
163
|
+
renderer: ge,
|
|
342
164
|
domOutputSpecToElement: J,
|
|
343
165
|
mapDefinedTypes: {
|
|
344
|
-
doc: ({ children: e }) =>
|
|
166
|
+
doc: ({ children: e }) => y.createElement(y.Fragment, {}, e),
|
|
345
167
|
text: ({ node: e }) => e.text ?? ""
|
|
346
168
|
},
|
|
347
169
|
content: e,
|
|
@@ -351,7 +173,7 @@ function dt({ content: e, extensions: t, options: n }) {
|
|
|
351
173
|
}
|
|
352
174
|
//#endregion
|
|
353
175
|
//#region ../../node_modules/.pnpm/@tiptap+extension-bold@3.23.5_@tiptap+core@3.23.5_@tiptap+pm@3.23.5_/node_modules/@tiptap/extension-bold/dist/index.js
|
|
354
|
-
var
|
|
176
|
+
var ve = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, ye = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, be = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, xe = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, Se = w.create({
|
|
355
177
|
name: "bold",
|
|
356
178
|
addOptions() {
|
|
357
179
|
return { HTMLAttributes: {} };
|
|
@@ -374,9 +196,9 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
374
196
|
];
|
|
375
197
|
},
|
|
376
198
|
renderHTML({ HTMLAttributes: e }) {
|
|
377
|
-
return /* @__PURE__ */
|
|
378
|
-
...
|
|
379
|
-
children: /* @__PURE__ */
|
|
199
|
+
return /* @__PURE__ */ F("strong", {
|
|
200
|
+
...N(this.options.HTMLAttributes, e),
|
|
201
|
+
children: /* @__PURE__ */ F("slot", {})
|
|
380
202
|
});
|
|
381
203
|
},
|
|
382
204
|
markdownTokenName: "strong",
|
|
@@ -400,24 +222,24 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
400
222
|
};
|
|
401
223
|
},
|
|
402
224
|
addInputRules() {
|
|
403
|
-
return [
|
|
404
|
-
find:
|
|
225
|
+
return [j({
|
|
226
|
+
find: ve,
|
|
405
227
|
type: this.type
|
|
406
|
-
}),
|
|
407
|
-
find:
|
|
228
|
+
}), j({
|
|
229
|
+
find: be,
|
|
408
230
|
type: this.type
|
|
409
231
|
})];
|
|
410
232
|
},
|
|
411
233
|
addPasteRules() {
|
|
412
|
-
return [
|
|
413
|
-
find:
|
|
234
|
+
return [M({
|
|
235
|
+
find: ye,
|
|
414
236
|
type: this.type
|
|
415
|
-
}),
|
|
416
|
-
find:
|
|
237
|
+
}), M({
|
|
238
|
+
find: xe,
|
|
417
239
|
type: this.type
|
|
418
240
|
})];
|
|
419
241
|
}
|
|
420
|
-
}),
|
|
242
|
+
}), Ce = /(^|[^`])`([^`]+)`(?!`)$/, we = /(^|[^`])`([^`]+)`(?!`)/g, Te = w.create({
|
|
421
243
|
name: "code",
|
|
422
244
|
addOptions() {
|
|
423
245
|
return { HTMLAttributes: {} };
|
|
@@ -431,7 +253,7 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
431
253
|
renderHTML({ HTMLAttributes: e }) {
|
|
432
254
|
return [
|
|
433
255
|
"code",
|
|
434
|
-
|
|
256
|
+
N(this.options.HTMLAttributes, e),
|
|
435
257
|
0
|
|
436
258
|
];
|
|
437
259
|
},
|
|
@@ -452,18 +274,18 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
452
274
|
return { "Mod-e": () => this.editor.commands.toggleCode() };
|
|
453
275
|
},
|
|
454
276
|
addInputRules() {
|
|
455
|
-
return [
|
|
456
|
-
find:
|
|
277
|
+
return [j({
|
|
278
|
+
find: Ce,
|
|
457
279
|
type: this.type
|
|
458
280
|
})];
|
|
459
281
|
},
|
|
460
282
|
addPasteRules() {
|
|
461
|
-
return [
|
|
462
|
-
find:
|
|
283
|
+
return [M({
|
|
284
|
+
find: we,
|
|
463
285
|
type: this.type
|
|
464
286
|
})];
|
|
465
287
|
}
|
|
466
|
-
}),
|
|
288
|
+
}), Ee = T.create({
|
|
467
289
|
name: "hardBreak",
|
|
468
290
|
markdownTokenName: "br",
|
|
469
291
|
addOptions() {
|
|
@@ -480,7 +302,7 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
480
302
|
return [{ tag: "br" }];
|
|
481
303
|
},
|
|
482
304
|
renderHTML({ HTMLAttributes: e }) {
|
|
483
|
-
return ["br",
|
|
305
|
+
return ["br", N(this.options.HTMLAttributes, e)];
|
|
484
306
|
},
|
|
485
307
|
renderText() {
|
|
486
308
|
return "\n";
|
|
@@ -507,7 +329,7 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
507
329
|
"Shift-Enter": () => this.editor.commands.setHardBreak()
|
|
508
330
|
};
|
|
509
331
|
}
|
|
510
|
-
}),
|
|
332
|
+
}), De = T.create({
|
|
511
333
|
name: "heading",
|
|
512
334
|
addOptions() {
|
|
513
335
|
return {
|
|
@@ -540,7 +362,7 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
540
362
|
renderHTML({ node: e, HTMLAttributes: t }) {
|
|
541
363
|
return [
|
|
542
364
|
`h${this.options.levels.includes(e.attrs.level) ? e.attrs.level : this.options.levels[0]}`,
|
|
543
|
-
|
|
365
|
+
N(this.options.HTMLAttributes, t),
|
|
544
366
|
0
|
|
545
367
|
];
|
|
546
368
|
},
|
|
@@ -562,13 +384,13 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
562
384
|
}), {});
|
|
563
385
|
},
|
|
564
386
|
addInputRules() {
|
|
565
|
-
return this.options.levels.map((e) =>
|
|
387
|
+
return this.options.levels.map((e) => se({
|
|
566
388
|
find: RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),
|
|
567
389
|
type: this.type,
|
|
568
390
|
getAttributes: { level: e }
|
|
569
391
|
}));
|
|
570
392
|
}
|
|
571
|
-
}),
|
|
393
|
+
}), Oe = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/, ke = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g, Ae = w.create({
|
|
572
394
|
name: "highlight",
|
|
573
395
|
addOptions() {
|
|
574
396
|
return {
|
|
@@ -579,7 +401,7 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
579
401
|
addAttributes() {
|
|
580
402
|
return this.options.multicolor ? { color: {
|
|
581
403
|
default: null,
|
|
582
|
-
parseHTML: (e) => e.getAttribute("data-color") ||
|
|
404
|
+
parseHTML: (e) => e.getAttribute("data-color") || A(e, "background-color") || e.style.backgroundColor,
|
|
583
405
|
renderHTML: (e) => e.color ? {
|
|
584
406
|
"data-color": e.color,
|
|
585
407
|
style: `background-color: ${e.color}; color: inherit`
|
|
@@ -592,7 +414,7 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
592
414
|
renderHTML({ HTMLAttributes: e }) {
|
|
593
415
|
return [
|
|
594
416
|
"mark",
|
|
595
|
-
|
|
417
|
+
N(this.options.HTMLAttributes, e),
|
|
596
418
|
0
|
|
597
419
|
];
|
|
598
420
|
},
|
|
@@ -626,18 +448,18 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
626
448
|
return { "Mod-Shift-h": () => this.editor.commands.toggleHighlight() };
|
|
627
449
|
},
|
|
628
450
|
addInputRules() {
|
|
629
|
-
return [
|
|
630
|
-
find:
|
|
451
|
+
return [j({
|
|
452
|
+
find: Oe,
|
|
631
453
|
type: this.type
|
|
632
454
|
})];
|
|
633
455
|
},
|
|
634
456
|
addPasteRules() {
|
|
635
|
-
return [
|
|
636
|
-
find:
|
|
457
|
+
return [M({
|
|
458
|
+
find: ke,
|
|
637
459
|
type: this.type
|
|
638
460
|
})];
|
|
639
461
|
}
|
|
640
|
-
}),
|
|
462
|
+
}), je = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, Me = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, Ne = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, Pe = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, Fe = w.create({
|
|
641
463
|
name: "italic",
|
|
642
464
|
addOptions() {
|
|
643
465
|
return { HTMLAttributes: {} };
|
|
@@ -659,7 +481,7 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
659
481
|
renderHTML({ HTMLAttributes: e }) {
|
|
660
482
|
return [
|
|
661
483
|
"em",
|
|
662
|
-
|
|
484
|
+
N(this.options.HTMLAttributes, e),
|
|
663
485
|
0
|
|
664
486
|
];
|
|
665
487
|
},
|
|
@@ -684,24 +506,24 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
684
506
|
};
|
|
685
507
|
},
|
|
686
508
|
addInputRules() {
|
|
687
|
-
return [
|
|
688
|
-
find:
|
|
509
|
+
return [j({
|
|
510
|
+
find: je,
|
|
689
511
|
type: this.type
|
|
690
|
-
}),
|
|
691
|
-
find:
|
|
512
|
+
}), j({
|
|
513
|
+
find: Ne,
|
|
692
514
|
type: this.type
|
|
693
515
|
})];
|
|
694
516
|
},
|
|
695
517
|
addPasteRules() {
|
|
696
|
-
return [
|
|
697
|
-
find:
|
|
518
|
+
return [M({
|
|
519
|
+
find: Me,
|
|
698
520
|
type: this.type
|
|
699
|
-
}),
|
|
700
|
-
find:
|
|
521
|
+
}), M({
|
|
522
|
+
find: Pe,
|
|
701
523
|
type: this.type
|
|
702
524
|
})];
|
|
703
525
|
}
|
|
704
|
-
}), Y = " ",
|
|
526
|
+
}), Y = " ", X = "\xA0", Ie = T.create({
|
|
705
527
|
name: "paragraph",
|
|
706
528
|
priority: 1e3,
|
|
707
529
|
addOptions() {
|
|
@@ -715,7 +537,7 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
715
537
|
renderHTML({ HTMLAttributes: e }) {
|
|
716
538
|
return [
|
|
717
539
|
"p",
|
|
718
|
-
|
|
540
|
+
N(this.options.HTMLAttributes, e),
|
|
719
541
|
0
|
|
720
542
|
];
|
|
721
543
|
},
|
|
@@ -723,7 +545,7 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
723
545
|
let n = e.tokens || [];
|
|
724
546
|
if (n.length === 1 && n[0].type === "image") return t.parseChildren([n[0]]);
|
|
725
547
|
let r = t.parseInline(n);
|
|
726
|
-
return n.length === 1 && n[0].type === "text" && (n[0].raw === Y || n[0].text === Y || n[0].raw ===
|
|
548
|
+
return n.length === 1 && n[0].type === "text" && (n[0].raw === Y || n[0].text === Y || n[0].raw === X || n[0].text === X) && r.length === 1 && r[0].type === "text" && (r[0].text === Y || r[0].text === X) ? t.createNode("paragraph", void 0, []) : t.createNode("paragraph", void 0, r);
|
|
727
549
|
},
|
|
728
550
|
renderMarkdown: (e, t, n) => {
|
|
729
551
|
if (!e) return "";
|
|
@@ -740,7 +562,7 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
740
562
|
addKeyboardShortcuts() {
|
|
741
563
|
return { "Mod-Alt-0": () => this.editor.commands.setParagraph() };
|
|
742
564
|
}
|
|
743
|
-
}),
|
|
565
|
+
}), Le = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, Re = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, ze = w.create({
|
|
744
566
|
name: "strike",
|
|
745
567
|
addOptions() {
|
|
746
568
|
return { HTMLAttributes: {} };
|
|
@@ -760,7 +582,7 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
760
582
|
renderHTML({ HTMLAttributes: e }) {
|
|
761
583
|
return [
|
|
762
584
|
"s",
|
|
763
|
-
|
|
585
|
+
N(this.options.HTMLAttributes, e),
|
|
764
586
|
0
|
|
765
587
|
];
|
|
766
588
|
},
|
|
@@ -778,18 +600,18 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
778
600
|
return { "Mod-Shift-s": () => this.editor.commands.toggleStrike() };
|
|
779
601
|
},
|
|
780
602
|
addInputRules() {
|
|
781
|
-
return [
|
|
782
|
-
find:
|
|
603
|
+
return [j({
|
|
604
|
+
find: Le,
|
|
783
605
|
type: this.type
|
|
784
606
|
})];
|
|
785
607
|
},
|
|
786
608
|
addPasteRules() {
|
|
787
|
-
return [
|
|
788
|
-
find:
|
|
609
|
+
return [M({
|
|
610
|
+
find: Re,
|
|
789
611
|
type: this.type
|
|
790
612
|
})];
|
|
791
613
|
}
|
|
792
|
-
}),
|
|
614
|
+
}), Be = T.create({
|
|
793
615
|
name: "text",
|
|
794
616
|
group: "inline",
|
|
795
617
|
parseMarkdown: (e) => ({
|
|
@@ -797,7 +619,7 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
797
619
|
text: e.text || ""
|
|
798
620
|
}),
|
|
799
621
|
renderMarkdown: (e) => e.text || ""
|
|
800
|
-
}),
|
|
622
|
+
}), Ve = w.create({
|
|
801
623
|
name: "underline",
|
|
802
624
|
addOptions() {
|
|
803
625
|
return { HTMLAttributes: {} };
|
|
@@ -812,7 +634,7 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
812
634
|
renderHTML({ HTMLAttributes: e }) {
|
|
813
635
|
return [
|
|
814
636
|
"u",
|
|
815
|
-
|
|
637
|
+
N(this.options.HTMLAttributes, e),
|
|
816
638
|
0
|
|
817
639
|
];
|
|
818
640
|
},
|
|
@@ -853,7 +675,7 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
853
675
|
"Mod-U": () => this.editor.commands.toggleUnderline()
|
|
854
676
|
};
|
|
855
677
|
}
|
|
856
|
-
}),
|
|
678
|
+
}), He = {
|
|
857
679
|
100: "1f4af",
|
|
858
680
|
1234: "1f522",
|
|
859
681
|
regional_indicator_a: "🇦",
|
|
@@ -2787,7 +2609,7 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
2787
2609
|
england: "1f3f4-e0067-e0062-e0065-e006e-e0067-e007f",
|
|
2788
2610
|
scotland: "1f3f4-e0067-e0062-e0073-e0063-e0074-e007f",
|
|
2789
2611
|
wales: "1f3f4-e0067-e0062-e0077-e006c-e0073-e007f"
|
|
2790
|
-
},
|
|
2612
|
+
}, Ue = "https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64", Z = (e) => /^[A-Fa-f0-9-]+$/.test(e), We = T.create({
|
|
2791
2613
|
name: "emoji",
|
|
2792
2614
|
inline: !0,
|
|
2793
2615
|
group: "inline",
|
|
@@ -2804,12 +2626,12 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
2804
2626
|
return [{ tag: "span[data-type=\"emoji\"]" }];
|
|
2805
2627
|
},
|
|
2806
2628
|
renderHTML({ HTMLAttributes: e, node: t }) {
|
|
2807
|
-
let n =
|
|
2808
|
-
return i ?
|
|
2629
|
+
let n = N(e, { "data-type": "emoji" }), r = t.attrs.name, i = r ? He[r] : void 0;
|
|
2630
|
+
return i ? Z(i) ? [
|
|
2809
2631
|
"span",
|
|
2810
2632
|
n,
|
|
2811
2633
|
["img", {
|
|
2812
|
-
src: `${
|
|
2634
|
+
src: `${Ue}/${i}.png`,
|
|
2813
2635
|
draggable: "false",
|
|
2814
2636
|
loading: "lazy",
|
|
2815
2637
|
align: "absmiddle",
|
|
@@ -2825,7 +2647,7 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
2825
2647
|
`:${r || "emoji"}:`
|
|
2826
2648
|
];
|
|
2827
2649
|
}
|
|
2828
|
-
}),
|
|
2650
|
+
}), Ge = C.create({
|
|
2829
2651
|
name: "fontSize",
|
|
2830
2652
|
addOptions() {
|
|
2831
2653
|
return { types: ["textStyle"] };
|
|
@@ -2846,669 +2668,138 @@ var ft = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, pt = /(?:^|\s)(
|
|
|
2846
2668
|
unsetFontSize: () => ({ chain: e }) => e().setMark("textStyle", { fontSize: null }).removeEmptyTextStyle().run()
|
|
2847
2669
|
};
|
|
2848
2670
|
}
|
|
2849
|
-
}),
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
let r = k();
|
|
2854
|
-
r.current = e.get();
|
|
2855
|
-
let i = T((n) => (Ht(r, n)(e.value), t?.length > 0 ? Qe(e, t, Ht(r, n)) : e.listen(Ht(r, n))), n), a = () => r.current;
|
|
2856
|
-
return A(i, a, a);
|
|
2857
|
-
}
|
|
2858
|
-
//#endregion
|
|
2859
|
-
//#region ../../libraries/popups/dist/PopupRenderer-Bncp54gB.js
|
|
2860
|
-
var Wt = /* @__PURE__ */ e({
|
|
2861
|
-
_: () => rn,
|
|
2862
|
-
c: () => Tn,
|
|
2863
|
-
d: () => wn,
|
|
2864
|
-
f: () => xn,
|
|
2865
|
-
g: () => tn,
|
|
2866
|
-
h: () => X,
|
|
2867
|
-
i: () => Gn,
|
|
2868
|
-
l: () => Sn,
|
|
2869
|
-
m: () => nn,
|
|
2870
|
-
n: () => fr,
|
|
2871
|
-
o: () => Hn,
|
|
2872
|
-
p: () => en,
|
|
2873
|
-
r: () => Kn,
|
|
2874
|
-
s: () => Q,
|
|
2875
|
-
t: () => mr,
|
|
2876
|
-
u: () => yn,
|
|
2877
|
-
v: () => vn,
|
|
2878
|
-
y: () => gn
|
|
2879
|
-
}), Gt = Object.defineProperty, Kt = (e, t) => {
|
|
2880
|
-
let n = {};
|
|
2881
|
-
for (var r in e) Gt(n, r, {
|
|
2882
|
-
get: e[r],
|
|
2883
|
-
enumerable: !0
|
|
2884
|
-
});
|
|
2885
|
-
return t || Gt(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
2886
|
-
}, qt = 6e4, Jt = "lv_popups_session", Yt = {
|
|
2887
|
-
active_popup_id: null,
|
|
2888
|
-
shown_popup_ids: [],
|
|
2889
|
-
last_closed_at: null
|
|
2890
|
-
}, Xt = nt("lv_popups_state", {}, {
|
|
2891
|
-
encode: JSON.stringify,
|
|
2892
|
-
decode: JSON.parse
|
|
2893
|
-
}), Zt = (e) => {
|
|
2894
|
-
if (!e) return Yt;
|
|
2895
|
-
try {
|
|
2896
|
-
return JSON.parse(e);
|
|
2897
|
-
} catch {
|
|
2898
|
-
return Yt;
|
|
2899
|
-
}
|
|
2900
|
-
}, X = W((() => {
|
|
2901
|
-
if (typeof sessionStorage > "u") return Yt;
|
|
2902
|
-
try {
|
|
2903
|
-
return Zt(sessionStorage.getItem(Jt));
|
|
2904
|
-
} catch {
|
|
2905
|
-
return Yt;
|
|
2906
|
-
}
|
|
2907
|
-
})()), Qt = X.set;
|
|
2908
|
-
X.set = (e) => {
|
|
2909
|
-
Qt(e);
|
|
2910
|
-
try {
|
|
2911
|
-
sessionStorage.setItem(Jt, JSON.stringify(e));
|
|
2912
|
-
} catch {}
|
|
2913
|
-
};
|
|
2914
|
-
var $t = Ze([X, Xt], (e, t) => ({
|
|
2915
|
-
active_popup_id: e.active_popup_id,
|
|
2916
|
-
shown_popup_ids: e.shown_popup_ids,
|
|
2917
|
-
last_closed_at: e.last_closed_at,
|
|
2918
|
-
previous_popups: t
|
|
2919
|
-
})), en = W([]), tn = (e) => {
|
|
2920
|
-
en.set(e);
|
|
2921
|
-
}, nn = W(!0), rn = (e) => {
|
|
2922
|
-
nn.set(e);
|
|
2923
|
-
}, an = () => $t.get(), on = (e, t) => e.includes(t) ? e : [...e, t], sn = "manual", cn = () => sn, ln = null, un = () => ln, dn = [], Z = null, fn = () => {
|
|
2924
|
-
if (Z) return;
|
|
2925
|
-
let { last_closed_at: e } = X.get();
|
|
2926
|
-
if (!e) return;
|
|
2927
|
-
let t = qt - (Date.now() - e);
|
|
2928
|
-
if (t <= 0) {
|
|
2929
|
-
pn();
|
|
2930
|
-
return;
|
|
2931
|
-
}
|
|
2932
|
-
Z = setTimeout(() => {
|
|
2933
|
-
Z = null, pn();
|
|
2934
|
-
}, t);
|
|
2935
|
-
}, pn = () => {
|
|
2936
|
-
let e = X.get();
|
|
2937
|
-
if (!e.active_popup_id) {
|
|
2938
|
-
if (e.last_closed_at && Date.now() - e.last_closed_at < 6e4) {
|
|
2939
|
-
fn();
|
|
2940
|
-
return;
|
|
2941
|
-
}
|
|
2942
|
-
for (; dn.length > 0;) {
|
|
2943
|
-
let e = dn.shift();
|
|
2944
|
-
if (gn(e.popup, { trigger_type: e.trigger_type })) return;
|
|
2945
|
-
}
|
|
2946
|
-
}
|
|
2947
|
-
}, mn = (e, t) => {
|
|
2948
|
-
dn.some((t) => t.popup.id === e.id) || (dn.push({
|
|
2949
|
-
popup: e,
|
|
2950
|
-
trigger_type: t
|
|
2951
|
-
}), fn());
|
|
2952
|
-
}, hn = (e, t) => {
|
|
2953
|
-
let n = an();
|
|
2954
|
-
if (t?.type === "always") return !n.shown_popup_ids.includes(e);
|
|
2955
|
-
let r = n.previous_popups[e];
|
|
2956
|
-
return r ? !t || t.type === "once" ? !1 : t.type === "interval" && t.interval_ms ? Date.now() - r.triggered_at >= t.interval_ms : !0 : !0;
|
|
2957
|
-
}, gn = (e, t = {}) => {
|
|
2958
|
-
let { force: n = !1, trigger_type: r = "manual" } = t, i = e.id, a = e.settings?.display_frequency, o = X.get();
|
|
2959
|
-
return o.active_popup_id === i ? !0 : !n && (o.active_popup_id || o.last_closed_at && Date.now() - o.last_closed_at < 6e4 || !hn(i, a)) ? !1 : (Z &&= (clearTimeout(Z), null), sn = r, ln = Date.now(), X.set({
|
|
2960
|
-
active_popup_id: i,
|
|
2961
|
-
shown_popup_ids: on(o.shown_popup_ids, i),
|
|
2962
|
-
last_closed_at: o.last_closed_at
|
|
2963
|
-
}), a?.type !== "always" && Xt.set({
|
|
2964
|
-
...Xt.get(),
|
|
2965
|
-
[i]: { triggered_at: Date.now() }
|
|
2966
|
-
}), !0);
|
|
2967
|
-
}, _n = (e, t = {}) => {
|
|
2968
|
-
let { trigger_type: n = "manual" } = t;
|
|
2969
|
-
return gn(e, { trigger_type: n }) ? !0 : (hn(e.id, e.settings?.display_frequency) && mn(e, n), !1);
|
|
2970
|
-
}, vn = (e) => {
|
|
2971
|
-
let t = X.get();
|
|
2972
|
-
t.active_popup_id === e && (sn = "manual", ln = null, X.set({
|
|
2973
|
-
...t,
|
|
2974
|
-
active_popup_id: null,
|
|
2975
|
-
last_closed_at: Date.now()
|
|
2976
|
-
}), setTimeout(pn, 0));
|
|
2977
|
-
}, yn = F({
|
|
2978
|
-
defaultClassName: "_1gklknd4",
|
|
2979
|
-
variantClassNames: {
|
|
2980
|
-
placement: {
|
|
2981
|
-
popup: "_1gklknd5",
|
|
2982
|
-
slide_in: "_1gklknd6"
|
|
2983
|
-
},
|
|
2984
|
-
position: {
|
|
2985
|
-
"top-left": "_1gklknd7",
|
|
2986
|
-
"top-right": "_1gklknd8",
|
|
2987
|
-
"bottom-left": "_1gklknd9",
|
|
2988
|
-
"bottom-right": "_1gklknda"
|
|
2989
|
-
}
|
|
2990
|
-
},
|
|
2991
|
-
defaultVariants: { placement: "popup" },
|
|
2992
|
-
compoundVariants: []
|
|
2993
|
-
}), bn = "_1gklkndb", xn = "_1gklkndc", Sn = "_1gklkndd", Cn = F({
|
|
2994
|
-
defaultClassName: "_1gklknde",
|
|
2995
|
-
variantClassNames: { size: {
|
|
2996
|
-
small: "_1gklkndf",
|
|
2997
|
-
medium: "_1gklkndg",
|
|
2998
|
-
large: "_1gklkndh",
|
|
2999
|
-
xlarge: "_1gklkndi"
|
|
3000
|
-
} },
|
|
3001
|
-
defaultVariants: { size: "medium" },
|
|
3002
|
-
compoundVariants: []
|
|
3003
|
-
}), wn = "_1gklkndl", Tn = "_1gklkndm", En = C(null), Dn = (e) => {
|
|
3004
|
-
let t = N(6), { popup: n, callbacks: r, children: i } = e, a;
|
|
3005
|
-
t[0] !== r || t[1] !== n ? (a = {
|
|
3006
|
-
popup: n,
|
|
3007
|
-
callbacks: r
|
|
3008
|
-
}, t[0] = r, t[1] = n, t[2] = a) : a = t[2];
|
|
3009
|
-
let o;
|
|
3010
|
-
return t[3] !== i || t[4] !== a ? (o = /* @__PURE__ */ j(En.Provider, {
|
|
3011
|
-
value: a,
|
|
3012
|
-
children: i
|
|
3013
|
-
}), t[3] = i, t[4] = a, t[5] = o) : o = t[5], o;
|
|
3014
|
-
}, On = () => {
|
|
3015
|
-
let e = E(En);
|
|
3016
|
-
if (!e) throw Error("usePopupContext must be used within a PopupProvider");
|
|
3017
|
-
return e;
|
|
3018
|
-
}, kn = () => E(En), An = () => {
|
|
3019
|
-
let e = N(2), t = kn(), n;
|
|
3020
|
-
return e[0] === t ? n = e[1] : (n = (e) => {
|
|
3021
|
-
let n = e === void 0 ? "programmatic" : e;
|
|
3022
|
-
if (!t || an().active_popup_id !== t.popup.id) return;
|
|
3023
|
-
let r = un();
|
|
3024
|
-
t.callbacks?.onPopupClose?.(t.popup, {
|
|
3025
|
-
trigger_type: cn(),
|
|
3026
|
-
dismiss_reason: n,
|
|
3027
|
-
time_shown_ms: r ? Date.now() - r : null
|
|
3028
|
-
}), vn(t.popup.id);
|
|
3029
|
-
}, e[0] = t, e[1] = n), n;
|
|
3030
|
-
}, jn = "zv6sjd4", Mn = "zv6sjd5", Nn = "zv6sjd6", Pn = [
|
|
2671
|
+
}), Q = [
|
|
2672
|
+
V,
|
|
2673
|
+
Ie,
|
|
2674
|
+
Be,
|
|
3031
2675
|
De,
|
|
3032
|
-
jt,
|
|
3033
|
-
Ft,
|
|
3034
|
-
xt,
|
|
3035
|
-
gt,
|
|
3036
|
-
kt,
|
|
3037
|
-
Pt,
|
|
3038
|
-
yt,
|
|
3039
2676
|
Se,
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
bt,
|
|
3043
|
-
It,
|
|
3044
|
-
Oe.configure({ openOnClick: !1 }),
|
|
3045
|
-
Ee,
|
|
3046
|
-
Vt,
|
|
3047
|
-
je,
|
|
3048
|
-
Ae,
|
|
3049
|
-
ke,
|
|
2677
|
+
Fe,
|
|
2678
|
+
ze,
|
|
3050
2679
|
Te,
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
2680
|
+
I,
|
|
2681
|
+
R,
|
|
2682
|
+
L,
|
|
2683
|
+
Ee,
|
|
2684
|
+
Ve,
|
|
2685
|
+
H.configure({ openOnClick: !1 }),
|
|
2686
|
+
B,
|
|
2687
|
+
Ge,
|
|
2688
|
+
G,
|
|
2689
|
+
W,
|
|
2690
|
+
U,
|
|
2691
|
+
z,
|
|
2692
|
+
Ae.configure({ multicolor: !0 }),
|
|
2693
|
+
We,
|
|
2694
|
+
h,
|
|
2695
|
+
le.configure({ types: [
|
|
3055
2696
|
"paragraph",
|
|
3056
2697
|
"heading",
|
|
3057
2698
|
"bulletList",
|
|
3058
2699
|
"orderedList"
|
|
3059
2700
|
] })
|
|
3060
|
-
],
|
|
3061
|
-
let i =
|
|
2701
|
+
], $ = (e) => ue(e, Q), Ke = ({ content: e, className: t, ref: n, ...r }) => {
|
|
2702
|
+
let i = S(() => e ? typeof e == "string" ? e ? $(e) : null : e.json && Object.keys(e.json).length > 0 ? e.json : e.html ? $(e.html) : null : null, [e]), a = S(() => i ? _e({
|
|
3062
2703
|
content: i,
|
|
3063
|
-
extensions:
|
|
2704
|
+
extensions: Q
|
|
3064
2705
|
}) : null, [i]);
|
|
3065
|
-
return a ? /* @__PURE__ */
|
|
2706
|
+
return a ? /* @__PURE__ */ _("div", {
|
|
3066
2707
|
ref: n,
|
|
3067
|
-
className:
|
|
2708
|
+
className: g(m, t),
|
|
3068
2709
|
...r,
|
|
3069
2710
|
children: a
|
|
3070
2711
|
}) : null;
|
|
3071
|
-
},
|
|
3072
|
-
left:
|
|
3073
|
-
center:
|
|
3074
|
-
right:
|
|
3075
|
-
},
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
if (m.action?.type !== "redirect" || !m.action.copyValue) return;
|
|
3081
|
-
let e = m.action.copyValue;
|
|
2712
|
+
}, qe = /* @__PURE__ */ o({ PopupBody: () => Qe }), Je = x(() => import("./dist-CRDgdAkQ.js").then((e) => e.t).then((e) => ({ default: e.CollectionFormBuilder }))), Ye = p({ baseSpacing: ".625rem" }), Xe = { style: a({ form: { gap: "1rem" } }) }, Ze = {
|
|
2713
|
+
left: d,
|
|
2714
|
+
center: f,
|
|
2715
|
+
right: u
|
|
2716
|
+
}, Qe = (a) => {
|
|
2717
|
+
let o = ee(33), { popup: u, disableInteraction: d } = a, f = s(), p = f?.callbacks?.onAction, m = l(u), h = !f, { content: g } = u, { workspace: y } = t(), [x, S] = ne(!1), C;
|
|
2718
|
+
o[0] !== g.action || o[1] !== p || o[2] !== u ? (C = () => {
|
|
2719
|
+
if (g.action?.type !== "redirect" || !g.action.copyValue) return;
|
|
2720
|
+
let e = g.action.copyValue;
|
|
3082
2721
|
navigator.clipboard.writeText(e).then(() => {
|
|
3083
|
-
|
|
2722
|
+
S(!0), setTimeout(() => S(!1), 2e3), p?.(u, {
|
|
3084
2723
|
action_type: "copy",
|
|
3085
2724
|
copy_value: e
|
|
3086
2725
|
});
|
|
3087
2726
|
});
|
|
3088
|
-
},
|
|
3089
|
-
let
|
|
3090
|
-
|
|
3091
|
-
let C = x, w;
|
|
3092
|
-
t[6] !== C || t[7] !== m.coverImage || t[8] !== m.coverImageFocus || t[9] !== s ? (w = m.coverImage && /* @__PURE__ */ j("div", {
|
|
3093
|
-
className: "_1gklkndj",
|
|
3094
|
-
style: { aspectRatio: C },
|
|
3095
|
-
children: /* @__PURE__ */ j("img", {
|
|
3096
|
-
src: m.coverImage.location,
|
|
3097
|
-
srcSet: Bn(s),
|
|
3098
|
-
alt: "",
|
|
3099
|
-
className: "_1gklkndk",
|
|
3100
|
-
style: m.coverImageFocus ? { objectPosition: m.coverImageFocus.replace("-", " ") } : void 0
|
|
3101
|
-
})
|
|
3102
|
-
}), t[6] = C, t[7] = m.coverImage, t[8] = m.coverImageFocus, t[9] = s, t[10] = w) : w = t[10];
|
|
3103
|
-
let T = m.size ?? "medium", E;
|
|
3104
|
-
t[11] === T ? E = t[12] : (E = Cn({ size: T }), t[11] = T, t[12] = E);
|
|
3105
|
-
let D;
|
|
3106
|
-
t[13] === a ? D = t[14] : (D = a ? { pointerEvents: "none" } : void 0, t[13] = a, t[14] = D);
|
|
2727
|
+
}, o[0] = g.action, o[1] = p, o[2] = u, o[3] = C) : C = o[3];
|
|
2728
|
+
let w = C, T = g.align ?? "left", E = g.size ?? "medium", D;
|
|
2729
|
+
o[4] === E ? D = o[5] : (D = c({ size: E }), o[4] = E, o[5] = D);
|
|
3107
2730
|
let O;
|
|
3108
|
-
|
|
3109
|
-
className: "zv6sjd0",
|
|
3110
|
-
style: { textAlign: b },
|
|
3111
|
-
children: [m.heading && /* @__PURE__ */ j(i, { children: m.heading }), m.description && /* @__PURE__ */ j(c, { children: m.description })]
|
|
3112
|
-
}), t[15] = b, t[16] = m.description, t[17] = m.heading, t[18] = O) : O = t[18];
|
|
2731
|
+
o[6] === d ? O = o[7] : (O = d ? { pointerEvents: "none" } : void 0, o[6] = d, o[7] = O);
|
|
3113
2732
|
let k;
|
|
3114
|
-
|
|
3115
|
-
className: "
|
|
3116
|
-
|
|
3117
|
-
|
|
2733
|
+
o[8] !== T || o[9] !== g.description || o[10] !== g.heading ? (k = (g.heading || g.description) && /* @__PURE__ */ v(i, {
|
|
2734
|
+
className: "zv6sjd4",
|
|
2735
|
+
style: { textAlign: T },
|
|
2736
|
+
children: [g.heading && /* @__PURE__ */ _(n, { children: g.heading }), g.description && /* @__PURE__ */ _(r, { children: g.description })]
|
|
2737
|
+
}), o[8] = T, o[9] = g.description, o[10] = g.heading, o[11] = k) : k = o[11];
|
|
3118
2738
|
let A;
|
|
3119
|
-
|
|
3120
|
-
className: "
|
|
3121
|
-
|
|
3122
|
-
|
|
2739
|
+
o[12] === g.body ? A = o[13] : (A = (g.body?.html || g.body?.json) && /* @__PURE__ */ _(Ke, {
|
|
2740
|
+
className: "zv6sjd5",
|
|
2741
|
+
style: Ye,
|
|
2742
|
+
content: g.body
|
|
2743
|
+
}), o[12] = g.body, o[13] = A);
|
|
2744
|
+
let j;
|
|
2745
|
+
o[14] !== T || o[15] !== g.action || o[16] !== h || o[17] !== p || o[18] !== u || o[19] !== y ? (j = g.action?.type === "form" && /* @__PURE__ */ _("div", {
|
|
2746
|
+
className: "zv6sjd7",
|
|
2747
|
+
children: /* @__PURE__ */ _(b, { children: /* @__PURE__ */ _(Je, {
|
|
2748
|
+
collection_id: g.action.collectionKey,
|
|
2749
|
+
formVariant: g.action.formVariant,
|
|
2750
|
+
theme: Xe,
|
|
3123
2751
|
uiConfig: {
|
|
3124
2752
|
hideFormHeading: !0,
|
|
3125
2753
|
hideSectionHeadings: !0
|
|
3126
2754
|
},
|
|
2755
|
+
successConfig: g.action.successRedirectUrl ? { action: {
|
|
2756
|
+
type: "redirect",
|
|
2757
|
+
value: g.action.successRedirectUrl
|
|
2758
|
+
} } : void 0,
|
|
3127
2759
|
submitButtonConfig: {
|
|
3128
2760
|
show: !0,
|
|
3129
|
-
text:
|
|
3130
|
-
styles:
|
|
2761
|
+
text: g.action.label || "Submit",
|
|
2762
|
+
styles: g.action.fullWidth && (g.action.formVariant ?? "default") === "default" ? "zv6sjdb" : Ze[T]
|
|
3131
2763
|
},
|
|
3132
|
-
workspace_id:
|
|
3133
|
-
containerStyles: "
|
|
3134
|
-
preview:
|
|
2764
|
+
workspace_id: y,
|
|
2765
|
+
containerStyles: "zv6sjd6",
|
|
2766
|
+
preview: h,
|
|
3135
2767
|
onSuccess: () => {
|
|
3136
|
-
|
|
2768
|
+
g.action?.type === "form" && p?.(u, {
|
|
3137
2769
|
action_type: "form_submit",
|
|
3138
|
-
collection_key:
|
|
2770
|
+
collection_key: g.action.collectionKey
|
|
3139
2771
|
});
|
|
3140
2772
|
}
|
|
3141
2773
|
}) })
|
|
3142
|
-
}),
|
|
3143
|
-
let
|
|
3144
|
-
|
|
2774
|
+
}), o[14] = T, o[15] = g.action, o[16] = h, o[17] = p, o[18] = u, o[19] = y, o[20] = j) : j = o[20];
|
|
2775
|
+
let M;
|
|
2776
|
+
o[21] !== g.action || o[22] !== x || o[23] !== w || o[24] !== m ? (M = g.action?.type === "redirect" && /* @__PURE__ */ v(te, { children: [g.action.copyValue && /* @__PURE__ */ v("button", {
|
|
3145
2777
|
type: "button",
|
|
3146
|
-
className: "
|
|
3147
|
-
onClick:
|
|
3148
|
-
children: [/* @__PURE__ */
|
|
3149
|
-
className: "
|
|
3150
|
-
children:
|
|
3151
|
-
}),
|
|
2778
|
+
className: "zv6sjdd",
|
|
2779
|
+
onClick: w,
|
|
2780
|
+
children: [/* @__PURE__ */ _("span", {
|
|
2781
|
+
className: "zv6sjde",
|
|
2782
|
+
children: g.action.copyValue
|
|
2783
|
+
}), _(x ? re : ie, {
|
|
3152
2784
|
size: 18,
|
|
3153
|
-
className: "
|
|
2785
|
+
className: "zv6sjdf"
|
|
3154
2786
|
})]
|
|
3155
|
-
}), /* @__PURE__ */
|
|
3156
|
-
className: "
|
|
3157
|
-
onClick: () =>
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
children: m.action.label || "Button"
|
|
3165
|
-
})] }), t[28] = d, t[29] = m.action, t[30] = g, t[31] = y, t[32] = l, t[33] = s, t[34] = P) : P = t[34];
|
|
3166
|
-
let F;
|
|
3167
|
-
t[35] !== P || t[36] !== E || t[37] !== D || t[38] !== O || t[39] !== k || t[40] !== A ? (F = /* @__PURE__ */ M("div", {
|
|
3168
|
-
className: E,
|
|
3169
|
-
style: D,
|
|
2787
|
+
}), /* @__PURE__ */ _(e, {
|
|
2788
|
+
className: "zv6sjdc",
|
|
2789
|
+
onClick: () => m?.(),
|
|
2790
|
+
children: g.action.label || "Button"
|
|
2791
|
+
})] }), o[21] = g.action, o[22] = x, o[23] = w, o[24] = m, o[25] = M) : M = o[25];
|
|
2792
|
+
let N;
|
|
2793
|
+
return o[26] !== D || o[27] !== O || o[28] !== k || o[29] !== A || o[30] !== j || o[31] !== M ? (N = /* @__PURE__ */ v("div", {
|
|
2794
|
+
className: D,
|
|
2795
|
+
style: O,
|
|
3170
2796
|
children: [
|
|
3171
|
-
O,
|
|
3172
2797
|
k,
|
|
3173
2798
|
A,
|
|
3174
|
-
|
|
2799
|
+
j,
|
|
2800
|
+
M
|
|
3175
2801
|
]
|
|
3176
|
-
}),
|
|
3177
|
-
let I;
|
|
3178
|
-
return t[42] !== F || t[43] !== w ? (I = /* @__PURE__ */ M("div", {
|
|
3179
|
-
className: bn,
|
|
3180
|
-
children: [w, F]
|
|
3181
|
-
}), t[42] = F, t[43] = w, t[44] = I) : I = t[44], I;
|
|
3182
|
-
}, $ = (e) => {
|
|
3183
|
-
if (e == null) return;
|
|
3184
|
-
if (typeof e == "string") return e;
|
|
3185
|
-
if (typeof e != "object") return;
|
|
3186
|
-
let t = e;
|
|
3187
|
-
if (typeof t.l != "number" || typeof t.c != "number" || typeof t.h != "number") return;
|
|
3188
|
-
let n = (e) => Math.round(e * 1e4) / 1e4, r = n(t.l), i = n(t.c), a = n(t.h), o = typeof t.alpha == "number" ? n(t.alpha) : 1;
|
|
3189
|
-
return o < 1 ? `oklch(${r} ${i} ${a} / ${o})` : `oklch(${r} ${i} ${a})`;
|
|
3190
|
-
}, Vn = (e) => {
|
|
3191
|
-
let t = e.colors;
|
|
3192
|
-
return !t || typeof t != "object" ? !1 : Object.values(t).some((e) => e != null);
|
|
3193
|
-
}, Hn = (e) => {
|
|
3194
|
-
if (!e || !Vn(e)) return null;
|
|
3195
|
-
let t = e.colors, n = t?.brand ?? {}, r = e.fonts, i = e.sizes;
|
|
3196
|
-
return {
|
|
3197
|
-
colors: {
|
|
3198
|
-
brand: {
|
|
3199
|
-
main: $(n.main) ?? "",
|
|
3200
|
-
foreground: $(n.foreground) ?? ""
|
|
3201
|
-
},
|
|
3202
|
-
text1: $(t.text1) ?? "",
|
|
3203
|
-
text2: $(t.text2) ?? "",
|
|
3204
|
-
page: $(t.page) ?? "",
|
|
3205
|
-
border: $(t.border) ?? ""
|
|
3206
|
-
},
|
|
3207
|
-
fonts: {
|
|
3208
|
-
heading: r?.heading ?? "inherit",
|
|
3209
|
-
body: r?.body ?? "inherit"
|
|
3210
|
-
},
|
|
3211
|
-
sizes: { radius: i?.radius ?? "4px" }
|
|
3212
|
-
};
|
|
3213
|
-
}, Un = (e) => {
|
|
3214
|
-
if (e) return {
|
|
3215
|
-
colors: {
|
|
3216
|
-
primary: e.colors?.brand?.main,
|
|
3217
|
-
primaryForeground: e.colors?.brand?.foreground,
|
|
3218
|
-
foreground: e.colors?.text1,
|
|
3219
|
-
text: e.colors?.text1,
|
|
3220
|
-
heading: e.colors?.text1,
|
|
3221
|
-
mutedForeground: e.colors?.text2,
|
|
3222
|
-
background: e.colors?.page,
|
|
3223
|
-
card: e.colors?.page,
|
|
3224
|
-
cardForeground: e.colors?.text1,
|
|
3225
|
-
popover: e.colors?.page,
|
|
3226
|
-
popoverForeground: e.colors?.text1,
|
|
3227
|
-
border: e.colors?.border,
|
|
3228
|
-
input: e.colors?.page,
|
|
3229
|
-
inputForeground: e.colors?.text1
|
|
3230
|
-
},
|
|
3231
|
-
fonts: e.fonts,
|
|
3232
|
-
radius: e.sizes?.radius
|
|
3233
|
-
};
|
|
3234
|
-
}, Wn = (e) => g(Un(e)), Gn = (e) => {
|
|
3235
|
-
let t = N(21), n, r, i, a, o;
|
|
3236
|
-
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5]) : ({children: n, popupTheme: r, siteTheme: a, style: o, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o);
|
|
3237
|
-
let s;
|
|
3238
|
-
t[6] !== r || t[7] !== a ? (s = r ?? (a ? Hn(a) : null), t[6] = r, t[7] = a, t[8] = s) : s = t[8];
|
|
3239
|
-
let c = s;
|
|
3240
|
-
Re(c?.fonts?.heading, c?.fonts?.body);
|
|
3241
|
-
let l;
|
|
3242
|
-
t[9] === Symbol.for("react.memo_cache_sentinel") ? (l = P(h, y), t[9] = l) : l = t[9];
|
|
3243
|
-
let u, d;
|
|
3244
|
-
t[10] === Symbol.for("react.memo_cache_sentinel") ? (u = v({ baseSpacing: ".625rem" }), d = m({ form: { gap: "1rem" } }), t[10] = u, t[11] = d) : (u = t[10], d = t[11]);
|
|
3245
|
-
let p;
|
|
3246
|
-
t[12] === c ? p = t[13] : (p = Wn(c), t[12] = c, t[13] = p);
|
|
3247
|
-
let g;
|
|
3248
|
-
t[14] !== o || t[15] !== p ? (g = {
|
|
3249
|
-
...u,
|
|
3250
|
-
...d,
|
|
3251
|
-
...p,
|
|
3252
|
-
...o
|
|
3253
|
-
}, t[14] = o, t[15] = p, t[16] = g) : g = t[16];
|
|
3254
|
-
let _;
|
|
3255
|
-
return t[17] !== n || t[18] !== i || t[19] !== g ? (_ = /* @__PURE__ */ j(f, {
|
|
3256
|
-
className: l,
|
|
3257
|
-
cssReset: !0,
|
|
3258
|
-
style: g,
|
|
3259
|
-
...i,
|
|
3260
|
-
children: n
|
|
3261
|
-
}), t[17] = n, t[18] = i, t[19] = g, t[20] = _) : _ = t[20], _;
|
|
3262
|
-
}, Kn = (e) => e.content.position || "top-right", qn = (e) => {
|
|
3263
|
-
switch (e) {
|
|
3264
|
-
case "close-press": return "close_button";
|
|
3265
|
-
case "outside-press": return "outside_click";
|
|
3266
|
-
case "escape-key": return "escape_key";
|
|
3267
|
-
default: return "programmatic";
|
|
3268
|
-
}
|
|
3269
|
-
}, Jn = () => {
|
|
3270
|
-
let e = N(32), { popup: r, callbacks: i } = On(), { placement: o, id: c } = r, u = Ut($t).active_popup_id === c, f = k(!1), p, m;
|
|
3271
|
-
e[0] !== i || e[1] !== u || e[2] !== r ? (p = () => {
|
|
3272
|
-
u && !f.current && (f.current = !0, i?.onPopupOpen?.(r, { trigger_type: cn() })), u || (f.current = !1);
|
|
3273
|
-
}, m = [
|
|
3274
|
-
u,
|
|
3275
|
-
r,
|
|
3276
|
-
i
|
|
3277
|
-
], e[0] = i, e[1] = u, e[2] = r, e[3] = p, e[4] = m) : (p = e[3], m = e[4]), D(p, m);
|
|
3278
|
-
let h = An(), g, _, v, y, b, x, S, C;
|
|
3279
|
-
if (e[5] !== h || e[6] !== u || e[7] !== o || e[8] !== r) {
|
|
3280
|
-
let i = Kn(r), c = o === "popup", f = o === "slide_in";
|
|
3281
|
-
_ = s, b = u, e[17] === h ? x = e[18] : (x = (e, t) => !e && h(qn(t?.reason)), e[17] = h, e[18] = x), S = c, C = !c, g = n, e[19] === c ? v = e[20] : (v = c && /* @__PURE__ */ j(a, {}), e[19] = c, e[20] = v), y = c ? /* @__PURE__ */ j(d, {
|
|
3282
|
-
className: xn,
|
|
3283
|
-
children: /* @__PURE__ */ M(l.Popup, {
|
|
3284
|
-
className: yn({ placement: o }),
|
|
3285
|
-
children: [/* @__PURE__ */ j(t, {
|
|
3286
|
-
variant: "ghost",
|
|
3287
|
-
size: "icon-xs",
|
|
3288
|
-
className: Tn,
|
|
3289
|
-
"aria-label": "Close popup",
|
|
3290
|
-
children: /* @__PURE__ */ j(I, { size: 16 })
|
|
3291
|
-
}), /* @__PURE__ */ j(Q, {})]
|
|
3292
|
-
})
|
|
3293
|
-
}) : /* @__PURE__ */ M(l.Popup, {
|
|
3294
|
-
className: P(yn({
|
|
3295
|
-
placement: o,
|
|
3296
|
-
position: i
|
|
3297
|
-
}), f && "_1gklkndd"),
|
|
3298
|
-
children: [/* @__PURE__ */ j(t, {
|
|
3299
|
-
variant: "ghost",
|
|
3300
|
-
size: "icon-xs",
|
|
3301
|
-
className: Tn,
|
|
3302
|
-
"aria-label": "Close popup",
|
|
3303
|
-
children: /* @__PURE__ */ j(I, { size: 16 })
|
|
3304
|
-
}), /* @__PURE__ */ j(Q, {})]
|
|
3305
|
-
}), e[5] = h, e[6] = u, e[7] = o, e[8] = r, e[9] = g, e[10] = _, e[11] = v, e[12] = y, e[13] = b, e[14] = x, e[15] = S, e[16] = C;
|
|
3306
|
-
} else g = e[9], _ = e[10], v = e[11], y = e[12], b = e[13], x = e[14], S = e[15], C = e[16];
|
|
3307
|
-
let w;
|
|
3308
|
-
e[21] !== g || e[22] !== v || e[23] !== y ? (w = /* @__PURE__ */ M(g, { children: [v, y] }), e[21] = g, e[22] = v, e[23] = y, e[24] = w) : w = e[24];
|
|
3309
|
-
let T;
|
|
3310
|
-
return e[25] !== _ || e[26] !== b || e[27] !== x || e[28] !== S || e[29] !== C || e[30] !== w ? (T = /* @__PURE__ */ j(_, {
|
|
3311
|
-
open: b,
|
|
3312
|
-
onOpenChange: x,
|
|
3313
|
-
modal: S,
|
|
3314
|
-
disablePointerDismissal: C,
|
|
3315
|
-
children: w
|
|
3316
|
-
}), e[25] = _, e[26] = b, e[27] = x, e[28] = S, e[29] = C, e[30] = w, e[31] = T) : T = e[31], T;
|
|
3317
|
-
}, Yn = 3e4, Xn = 5e3, Zn = 5e3, Qn = 100, $n = .5, er = 5, tr = (e) => {
|
|
3318
|
-
if (typeof document > "u") return () => {};
|
|
3319
|
-
let t = !1, n = Date.now(), r = [], i = 0, a = null, o = () => Date.now() - n >= Yn, s = () => {
|
|
3320
|
-
t || (t = !0, c(), e());
|
|
3321
|
-
}, c = () => {
|
|
3322
|
-
a &&= (clearTimeout(a), null);
|
|
3323
|
-
}, l = () => {
|
|
3324
|
-
if (r.length < 2) return 0;
|
|
3325
|
-
let e = r[0], t = r[r.length - 1], n = t.t - e.t;
|
|
3326
|
-
return n === 0 ? 0 : (e.y - t.y) / n;
|
|
3327
|
-
}, u = () => r.reduce((e, t) => t.y > e ? t.y : e, 0), d = (e) => {
|
|
3328
|
-
r.push({
|
|
3329
|
-
y: e.clientY,
|
|
3330
|
-
t: Date.now()
|
|
3331
|
-
}), r.length > er && r.shift();
|
|
3332
|
-
}, f = (e) => {
|
|
3333
|
-
t || !o() || e.clientY > 0 || u() < Qn || Date.now() - i < Zn || l() < $n || (c(), a = setTimeout(s, Xn));
|
|
3334
|
-
}, p = () => {
|
|
3335
|
-
c();
|
|
3336
|
-
}, m = () => {
|
|
3337
|
-
i = Date.now();
|
|
3338
|
-
}, h = oe.listen((e) => {
|
|
3339
|
-
o() && (e === "hidden" || e === "frozen") && s();
|
|
3340
|
-
});
|
|
3341
|
-
return document.addEventListener("mousemove", d, { passive: !0 }), document.addEventListener("mouseleave", f), document.addEventListener("mouseenter", p), window.addEventListener("scroll", m, { passive: !0 }), () => {
|
|
3342
|
-
c(), document.removeEventListener("mousemove", d), document.removeEventListener("mouseleave", f), document.removeEventListener("mouseenter", p), window.removeEventListener("scroll", m), h();
|
|
3343
|
-
};
|
|
3344
|
-
}, nr = (e, t) => {
|
|
3345
|
-
if (!e) return null;
|
|
3346
|
-
let n = setTimeout(() => _n(t, { trigger_type: "time_on_page" }), e);
|
|
3347
|
-
return () => clearTimeout(n);
|
|
3348
|
-
}, rr = (e, t) => {
|
|
3349
|
-
if (e === void 0) return null;
|
|
3350
|
-
let n = !1;
|
|
3351
|
-
return se.listen((r) => {
|
|
3352
|
-
n || r.depth >= e && (n = !0, _n(t, { trigger_type: "scroll_depth" }));
|
|
3353
|
-
});
|
|
3354
|
-
}, ir = (e) => {
|
|
3355
|
-
let t = !1;
|
|
3356
|
-
return ie.listen((n) => {
|
|
3357
|
-
t || n.status === "idle" && (t = !0, _n(e, { trigger_type: "inactivity" }));
|
|
3358
|
-
});
|
|
3359
|
-
}, ar = (e, t) => {
|
|
3360
|
-
let n = N(11), r = t === void 0 ? !0 : t, { triggers: i, id: a } = e, o = Ut(ae), s;
|
|
3361
|
-
n[0] === Symbol.for("react.memo_cache_sentinel") ? (s = [], n[0] = s) : s = n[0];
|
|
3362
|
-
let c = k(s), l;
|
|
3363
|
-
n[1] !== r || n[2] !== o || n[3] !== e || n[4] !== i ? (l = () => {
|
|
3364
|
-
if (!r || !o || !i) return;
|
|
3365
|
-
let t = [];
|
|
3366
|
-
if (i.time_on_page.enabled) {
|
|
3367
|
-
let n = nr(i.time_on_page.delay_ms, e);
|
|
3368
|
-
n && t.push(n);
|
|
3369
|
-
}
|
|
3370
|
-
if (i.scroll_depth.enabled) {
|
|
3371
|
-
let n = rr(i.scroll_depth.percent, e);
|
|
3372
|
-
n && t.push(n);
|
|
3373
|
-
}
|
|
3374
|
-
return i.exit_intent.enabled && t.push(tr(() => _n(e, { trigger_type: "exit_intent" }))), i.inactivity.enabled && t.push(ir(e)), c.current = t, () => {
|
|
3375
|
-
t.forEach(or), c.current = [];
|
|
3376
|
-
};
|
|
3377
|
-
}, n[1] = r, n[2] = o, n[3] = e, n[4] = i, n[5] = l) : l = n[5];
|
|
3378
|
-
let u;
|
|
3379
|
-
n[6] !== r || n[7] !== o || n[8] !== a || n[9] !== i ? (u = [
|
|
3380
|
-
r,
|
|
3381
|
-
o,
|
|
3382
|
-
a,
|
|
3383
|
-
i
|
|
3384
|
-
], n[6] = r, n[7] = o, n[8] = a, n[9] = i, n[10] = u) : u = n[10], D(l, u);
|
|
2802
|
+
}), o[26] = D, o[27] = O, o[28] = k, o[29] = A, o[30] = j, o[31] = M, o[32] = N) : N = o[32], N;
|
|
3385
2803
|
};
|
|
3386
|
-
function or(e) {
|
|
3387
|
-
return e();
|
|
3388
|
-
}
|
|
3389
|
-
var sr = (e, t) => {
|
|
3390
|
-
switch (e.match_type) {
|
|
3391
|
-
case "is_all_pages": return !0;
|
|
3392
|
-
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;
|
|
3393
|
-
case "contains": return e.value != null && t.path.includes(e.value);
|
|
3394
|
-
case "begins_with": return e.value != null && t.path.startsWith(e.value);
|
|
3395
|
-
default: return !1;
|
|
3396
|
-
}
|
|
3397
|
-
}, cr = (e, t) => {
|
|
3398
|
-
switch (e.match_type) {
|
|
3399
|
-
case "exact": return t === e.value;
|
|
3400
|
-
case "contains": return t.includes(e.value);
|
|
3401
|
-
case "domain": try {
|
|
3402
|
-
let n = new URL(t).hostname, r = e.value.toLowerCase();
|
|
3403
|
-
return n === r || n.endsWith(`.${r}`);
|
|
3404
|
-
} catch {
|
|
3405
|
-
return !1;
|
|
3406
|
-
}
|
|
3407
|
-
default: return !1;
|
|
3408
|
-
}
|
|
3409
|
-
}, lr = (e, t, n) => {
|
|
3410
|
-
let r = e.pages?.exclude ?? [];
|
|
3411
|
-
if (r.length > 0 && r.some((e) => sr(e, t))) return !1;
|
|
3412
|
-
let i = e.pages?.include ?? [];
|
|
3413
|
-
if (i.length > 0 && !i.some((e) => sr(e, t))) return !1;
|
|
3414
|
-
let a = e.referrer?.include ?? [];
|
|
3415
|
-
if (a.length > 0 && (!n || !a.some((e) => cr(e, n)))) return !1;
|
|
3416
|
-
let o = e.referrer?.exclude ?? [];
|
|
3417
|
-
return !(o.length > 0 && n && o.some((e) => cr(e, n)));
|
|
3418
|
-
}, ur = (e) => {
|
|
3419
|
-
let t = N(4), { pageId: n } = e, { popup: r } = On(), i;
|
|
3420
|
-
bb0: {
|
|
3421
|
-
if (!r.target) {
|
|
3422
|
-
i = !0;
|
|
3423
|
-
break bb0;
|
|
3424
|
-
}
|
|
3425
|
-
if (typeof window > "u") {
|
|
3426
|
-
i = !1;
|
|
3427
|
-
break bb0;
|
|
3428
|
-
}
|
|
3429
|
-
let e;
|
|
3430
|
-
if (t[0] !== n || t[1] !== r.target) {
|
|
3431
|
-
let i = ce.get().identity?.referrer?.raw || document.referrer || null, a = new URL(window.location.href, window.location.origin);
|
|
3432
|
-
e = lr(r.target, {
|
|
3433
|
-
pageId: n,
|
|
3434
|
-
path: a.pathname
|
|
3435
|
-
}, i), t[0] = n, t[1] = r.target, t[2] = e;
|
|
3436
|
-
} else e = t[2];
|
|
3437
|
-
i = e;
|
|
3438
|
-
}
|
|
3439
|
-
let a = i;
|
|
3440
|
-
if (ar(r, a), !a) return null;
|
|
3441
|
-
let o;
|
|
3442
|
-
return t[3] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ j(Jn, {}), t[3] = o) : o = t[3], o;
|
|
3443
|
-
}, dr = () => {
|
|
3444
|
-
let e = se.get(), t = ie.get();
|
|
3445
|
-
return {
|
|
3446
|
-
trigger_scroll_depth: e.depth,
|
|
3447
|
-
trigger_scroll_speed: e.speedCategory,
|
|
3448
|
-
trigger_scroll_direction: e.direction,
|
|
3449
|
-
trigger_activity_status: t.status,
|
|
3450
|
-
trigger_activity_seconds: t.seconds,
|
|
3451
|
-
trigger_tab_count: le()
|
|
3452
|
-
};
|
|
3453
|
-
}, fr = (e) => {
|
|
3454
|
-
let t = N(16), { popups: n, pageId: r } = e, i = o(), a, s;
|
|
3455
|
-
t[0] === n ? (a = t[1], s = t[2]) : (a = () => {
|
|
3456
|
-
tn(n), rn(!1);
|
|
3457
|
-
}, s = [n], t[0] = n, t[1] = a, t[2] = s), D(a, s);
|
|
3458
|
-
let c;
|
|
3459
|
-
t[3] === i ? c = t[4] : (c = (e, t) => {
|
|
3460
|
-
!i || typeof i.track != "function" || i?.track(e, t);
|
|
3461
|
-
}, t[3] = i, t[4] = c);
|
|
3462
|
-
let l = c, u = pr, d;
|
|
3463
|
-
t[5] === l ? d = t[6] : (d = {
|
|
3464
|
-
onPopupOpen: (e, t) => {
|
|
3465
|
-
l("popup.view", {
|
|
3466
|
-
...u(e),
|
|
3467
|
-
trigger_type: t.trigger_type,
|
|
3468
|
-
language: e.language,
|
|
3469
|
-
...dr()
|
|
3470
|
-
});
|
|
3471
|
-
},
|
|
3472
|
-
onPopupClose: (e, t) => {
|
|
3473
|
-
l("popup.close", {
|
|
3474
|
-
...u(e),
|
|
3475
|
-
trigger_type: t.trigger_type,
|
|
3476
|
-
dismiss_reason: t.dismiss_reason,
|
|
3477
|
-
time_shown_ms: t.time_shown_ms
|
|
3478
|
-
});
|
|
3479
|
-
},
|
|
3480
|
-
onAction: (e, t) => {
|
|
3481
|
-
l("popup.action", {
|
|
3482
|
-
...u(e),
|
|
3483
|
-
...t
|
|
3484
|
-
});
|
|
3485
|
-
}
|
|
3486
|
-
}, t[5] = l, t[6] = d);
|
|
3487
|
-
let f = d, p;
|
|
3488
|
-
if (t[7] !== f || t[8] !== r || t[9] !== n) {
|
|
3489
|
-
let e;
|
|
3490
|
-
t[11] !== f || t[12] !== r ? (e = (e) => /* @__PURE__ */ j(Gn, {
|
|
3491
|
-
popupTheme: e.theme,
|
|
3492
|
-
siteTheme: e.site?.theme,
|
|
3493
|
-
children: /* @__PURE__ */ j(Dn, {
|
|
3494
|
-
popup: e,
|
|
3495
|
-
callbacks: f,
|
|
3496
|
-
children: /* @__PURE__ */ j(ur, { pageId: r })
|
|
3497
|
-
})
|
|
3498
|
-
}, e.id), t[11] = f, t[12] = r, t[13] = e) : e = t[13], p = n.map(e), t[7] = f, t[8] = r, t[9] = n, t[10] = p;
|
|
3499
|
-
} else p = t[10];
|
|
3500
|
-
let m;
|
|
3501
|
-
return t[14] === p ? m = t[15] : (m = /* @__PURE__ */ j(te, { children: p }), t[14] = p, t[15] = m), m;
|
|
3502
|
-
};
|
|
3503
|
-
function pr(e) {
|
|
3504
|
-
return {
|
|
3505
|
-
resource: "builder.popup",
|
|
3506
|
-
identifier: e.id,
|
|
3507
|
-
popup_title: e.title,
|
|
3508
|
-
placement: e.placement,
|
|
3509
|
-
popup_action_kind: e.content.action?.type || "none"
|
|
3510
|
-
};
|
|
3511
|
-
}
|
|
3512
|
-
var mr = /* @__PURE__ */ Kt({ PopupRenderer: () => fr });
|
|
3513
2804
|
//#endregion
|
|
3514
|
-
export {
|
|
2805
|
+
export { qe as n };
|