@useknest/widget-web 0.2.0 → 0.2.1
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/dist/widget.js +311 -311
- package/dist/widget.umd.js +40 -40
- package/package.json +1 -1
package/dist/widget.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add("5");
|
|
2
|
-
const xs = 1, As = 2, Jl = 4,
|
|
2
|
+
const xs = 1, As = 2, Jl = 4, kd = 8, Ed = 16, Sd = 1, Td = 2, Yl = "[", $r = "[!", sa = "]", pn = {}, ye = Symbol(), xd = "http://www.w3.org/1999/xhtml", Xl = !1;
|
|
3
3
|
var ia = Array.isArray, Ad = Array.prototype.indexOf, aa = Array.from, cs = Object.keys, Qn = Object.defineProperty, Jn = Object.getOwnPropertyDescriptor, Rd = Object.getOwnPropertyDescriptors, Od = Object.prototype, Id = Array.prototype, Zl = Object.getPrototypeOf, Xa = Object.isExtensible;
|
|
4
4
|
const $d = () => {
|
|
5
5
|
};
|
|
@@ -16,7 +16,7 @@ function Ql() {
|
|
|
16
16
|
});
|
|
17
17
|
return { promise: n, resolve: t, reject: e };
|
|
18
18
|
}
|
|
19
|
-
const De = 2, oa = 4, la = 8,
|
|
19
|
+
const De = 2, oa = 4, la = 8, kn = 16, Lt = 32, Gt = 64, ca = 128, Ze = 256, us = 512, Ae = 1024, Je = 2048, Kt = 4096, ct = 8192, En = 16384, ua = 32768, Rs = 65536, Qa = 1 << 17, Pd = 1 << 18, Sn = 1 << 19, Nd = 1 << 20, wi = 1 << 21, Os = 1 << 22, dn = 1 << 23, ns = Symbol("$state"), Ld = Symbol("legacy props"), jd = Symbol(""), mr = new class extends Error {
|
|
20
20
|
name = "StaleReactionError";
|
|
21
21
|
message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
|
|
22
22
|
}(), da = 3, Tn = 8;
|
|
@@ -208,7 +208,7 @@ function ac(t) {
|
|
|
208
208
|
}));
|
|
209
209
|
}
|
|
210
210
|
const qr = /* @__PURE__ */ new Set();
|
|
211
|
-
let ie = null, rs = null,
|
|
211
|
+
let ie = null, rs = null, ki = /* @__PURE__ */ new Set(), vt = [], Cs = null, Ei = !1, Yn = !1;
|
|
212
212
|
class We {
|
|
213
213
|
/**
|
|
214
214
|
* The current values of any sources that are updated in this batch
|
|
@@ -307,7 +307,7 @@ class We {
|
|
|
307
307
|
for (var n = e.first; n !== null; ) {
|
|
308
308
|
var r = n.f, s = (r & (Lt | Gt)) !== 0, i = s && (r & Ae) !== 0, a = i || (r & ct) !== 0 || this.skipped_effects.has(n);
|
|
309
309
|
if (!a && n.fn !== null) {
|
|
310
|
-
s ? n.f ^= Ae : (r & oa) !== 0 ? this.#r.push(n) : (r & Ae) === 0 && ((r & Os) !== 0 && n.b?.is_pending() ? this.#l.push(n) : Us(n) && ((n.f &
|
|
310
|
+
s ? n.f ^= Ae : (r & oa) !== 0 ? this.#r.push(n) : (r & Ae) === 0 && ((r & Os) !== 0 && n.b?.is_pending() ? this.#l.push(n) : Us(n) && ((n.f & kn) !== 0 && this.#n.push(n), xr(n)));
|
|
311
311
|
var o = n.first;
|
|
312
312
|
if (o !== null) {
|
|
313
313
|
n = o;
|
|
@@ -348,8 +348,8 @@ class We {
|
|
|
348
348
|
return;
|
|
349
349
|
} else this.#u === 0 && this.#h();
|
|
350
350
|
this.deactivate();
|
|
351
|
-
for (const e of
|
|
352
|
-
if (
|
|
351
|
+
for (const e of ki)
|
|
352
|
+
if (ki.delete(e), e(), ie !== null)
|
|
353
353
|
break;
|
|
354
354
|
}
|
|
355
355
|
/**
|
|
@@ -440,7 +440,7 @@ function _e(t) {
|
|
|
440
440
|
}
|
|
441
441
|
function oc() {
|
|
442
442
|
var t = Xn;
|
|
443
|
-
|
|
443
|
+
Ei = !0;
|
|
444
444
|
try {
|
|
445
445
|
var e = 0;
|
|
446
446
|
for (ro(!0); vt.length > 0; ) {
|
|
@@ -452,7 +452,7 @@ function oc() {
|
|
|
452
452
|
n.process(vt), Bt.clear();
|
|
453
453
|
}
|
|
454
454
|
} finally {
|
|
455
|
-
|
|
455
|
+
Ei = !1, ro(t), Cs = null;
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
458
|
function eh() {
|
|
@@ -468,7 +468,7 @@ function eo(t) {
|
|
|
468
468
|
if (e !== 0) {
|
|
469
469
|
for (var n = 0; n < e; ) {
|
|
470
470
|
var r = t[n++];
|
|
471
|
-
if ((r.f & (
|
|
471
|
+
if ((r.f & (En | ct)) === 0 && Us(r) && (rn = [], xr(r), r.deps === null && r.first === null && r.nodes_start === null && (r.teardown === null && r.ac === null ? xc(r) : r.fn = null), rn?.length > 0)) {
|
|
472
472
|
Bt.clear();
|
|
473
473
|
for (const s of rn)
|
|
474
474
|
xr(s);
|
|
@@ -485,7 +485,7 @@ function lc(t) {
|
|
|
485
485
|
(n & De) !== 0 ? lc(
|
|
486
486
|
/** @type {Derived} */
|
|
487
487
|
e
|
|
488
|
-
) : (n & (Os |
|
|
488
|
+
) : (n & (Os | kn)) !== 0 && (Pe(e, Je), mn(
|
|
489
489
|
/** @type {Effect} */
|
|
490
490
|
e
|
|
491
491
|
));
|
|
@@ -495,7 +495,7 @@ function mn(t) {
|
|
|
495
495
|
for (var e = Cs = t; e.parent !== null; ) {
|
|
496
496
|
e = e.parent;
|
|
497
497
|
var n = e.f;
|
|
498
|
-
if (
|
|
498
|
+
if (Ei && e === U && (n & kn) !== 0)
|
|
499
499
|
return;
|
|
500
500
|
if ((n & (Gt | Lt)) !== 0) {
|
|
501
501
|
if ((n & Ae) === 0) return;
|
|
@@ -654,7 +654,7 @@ class sh {
|
|
|
654
654
|
* @param {1 | -1} d
|
|
655
655
|
*/
|
|
656
656
|
update_pending_count(e) {
|
|
657
|
-
this.#m(e), this.#d += e,
|
|
657
|
+
this.#m(e), this.#d += e, ki.add(this.#_);
|
|
658
658
|
}
|
|
659
659
|
get_effect_pending() {
|
|
660
660
|
return this.#v(), w(
|
|
@@ -738,7 +738,7 @@ function ah(t, e, n) {
|
|
|
738
738
|
try {
|
|
739
739
|
n([...t.map(r), ...l]);
|
|
740
740
|
} catch (c) {
|
|
741
|
-
(i.f &
|
|
741
|
+
(i.f & En) === 0 && er(c, i);
|
|
742
742
|
}
|
|
743
743
|
o && ze(!1), s?.deactivate(), cc();
|
|
744
744
|
}).catch((l) => {
|
|
@@ -903,7 +903,7 @@ function hc(t, e = !1, n = !0) {
|
|
|
903
903
|
function O(t, e, n = !1) {
|
|
904
904
|
q !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
905
905
|
// to ensure we error if state is set inside an inspect effect
|
|
906
|
-
(!lt || (q.f & Qa) !== 0) && rc() && (q.f & (De |
|
|
906
|
+
(!lt || (q.f & Qa) !== 0) && rc() && (q.f & (De | kn | Os | Qa)) !== 0 && !Ot?.includes(t) && Gd();
|
|
907
907
|
let r = n ? xt(e) : e;
|
|
908
908
|
return At(t, r);
|
|
909
909
|
}
|
|
@@ -931,7 +931,7 @@ function fc(t, e) {
|
|
|
931
931
|
/** @type {Derived} */
|
|
932
932
|
i,
|
|
933
933
|
Kt
|
|
934
|
-
) : o && ((a &
|
|
934
|
+
) : o && ((a & kn) !== 0 && rn !== null && rn.push(
|
|
935
935
|
/** @type {Effect} */
|
|
936
936
|
i
|
|
937
937
|
), mn(
|
|
@@ -1264,7 +1264,7 @@ function mh(t) {
|
|
|
1264
1264
|
}) : (Ve(e), r(void 0));
|
|
1265
1265
|
});
|
|
1266
1266
|
}
|
|
1267
|
-
function
|
|
1267
|
+
function kc(t) {
|
|
1268
1268
|
return wt(oa, t, !1);
|
|
1269
1269
|
}
|
|
1270
1270
|
function _h(t) {
|
|
@@ -1279,13 +1279,13 @@ function xe(t, e = [], n = []) {
|
|
|
1279
1279
|
});
|
|
1280
1280
|
}
|
|
1281
1281
|
function js(t, e = 0) {
|
|
1282
|
-
var n = wt(
|
|
1282
|
+
var n = wt(kn | e, t, !0);
|
|
1283
1283
|
return n;
|
|
1284
1284
|
}
|
|
1285
1285
|
function He(t, e = !0) {
|
|
1286
1286
|
return wt(Lt | Sn, t, !0, e);
|
|
1287
1287
|
}
|
|
1288
|
-
function
|
|
1288
|
+
function Ec(t) {
|
|
1289
1289
|
var e = t.teardown;
|
|
1290
1290
|
if (e !== null) {
|
|
1291
1291
|
const n = xn, r = q;
|
|
@@ -1320,12 +1320,12 @@ function Ve(t, e = !0) {
|
|
|
1320
1320
|
t.nodes_start,
|
|
1321
1321
|
/** @type {TemplateNode} */
|
|
1322
1322
|
t.nodes_end
|
|
1323
|
-
), n = !0), Sc(t, e && !n), ds(t, 0), Pe(t,
|
|
1323
|
+
), n = !0), Sc(t, e && !n), ds(t, 0), Pe(t, En);
|
|
1324
1324
|
var r = t.transitions;
|
|
1325
1325
|
if (r !== null)
|
|
1326
1326
|
for (const i of r)
|
|
1327
1327
|
i.stop();
|
|
1328
|
-
|
|
1328
|
+
Ec(t);
|
|
1329
1329
|
var s = t.parent;
|
|
1330
1330
|
s !== null && s.first !== null && xc(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes_start = t.nodes_end = t.ac = null;
|
|
1331
1331
|
}
|
|
@@ -1423,7 +1423,7 @@ function Us(t) {
|
|
|
1423
1423
|
var n = t.deps, r = (e & Ze) !== 0;
|
|
1424
1424
|
if (n !== null) {
|
|
1425
1425
|
var s, i, a = (e & us) !== 0, o = r && U !== null && !Mt, l = n.length;
|
|
1426
|
-
if ((a || o) && (U === null || (U.f &
|
|
1426
|
+
if ((a || o) && (U === null || (U.f & En) === 0)) {
|
|
1427
1427
|
var c = (
|
|
1428
1428
|
/** @type {Derived} */
|
|
1429
1429
|
t
|
|
@@ -1532,12 +1532,12 @@ function ds(t, e) {
|
|
|
1532
1532
|
}
|
|
1533
1533
|
function xr(t) {
|
|
1534
1534
|
var e = t.f;
|
|
1535
|
-
if ((e &
|
|
1535
|
+
if ((e & En) === 0) {
|
|
1536
1536
|
Pe(t, Ae);
|
|
1537
1537
|
var n = U, r = Xn;
|
|
1538
1538
|
U = t, Xn = !0;
|
|
1539
1539
|
try {
|
|
1540
|
-
(e &
|
|
1540
|
+
(e & kn) !== 0 ? vh(t) : Sc(t), Ec(t);
|
|
1541
1541
|
var s = Pc(t);
|
|
1542
1542
|
t.teardown = typeof s == "function" ? s : null, t.wv = Ic;
|
|
1543
1543
|
var i;
|
|
@@ -1553,7 +1553,7 @@ async function wh() {
|
|
|
1553
1553
|
function w(t) {
|
|
1554
1554
|
var e = t.f, n = (e & De) !== 0;
|
|
1555
1555
|
if (q !== null && !lt) {
|
|
1556
|
-
var r = U !== null && (U.f &
|
|
1556
|
+
var r = U !== null && (U.f & En) !== 0;
|
|
1557
1557
|
if (!r && !Ot?.includes(t)) {
|
|
1558
1558
|
var s = q.deps;
|
|
1559
1559
|
if ((q.f & wi) !== 0)
|
|
@@ -1607,12 +1607,12 @@ function Fs(t) {
|
|
|
1607
1607
|
lt = e;
|
|
1608
1608
|
}
|
|
1609
1609
|
}
|
|
1610
|
-
const
|
|
1610
|
+
const kh = -7169;
|
|
1611
1611
|
function Pe(t, e) {
|
|
1612
|
-
t.f = t.f &
|
|
1612
|
+
t.f = t.f & kh | e;
|
|
1613
1613
|
}
|
|
1614
1614
|
const Lc = /* @__PURE__ */ new Set(), Ti = /* @__PURE__ */ new Set();
|
|
1615
|
-
function
|
|
1615
|
+
function Eh(t) {
|
|
1616
1616
|
if (!N) return;
|
|
1617
1617
|
t.removeAttribute("onload"), t.removeAttribute("onerror");
|
|
1618
1618
|
const e = t.__e;
|
|
@@ -1958,8 +1958,8 @@ function le(t, e, n = !1) {
|
|
|
1958
1958
|
if (a === (a = f)) return;
|
|
1959
1959
|
let _ = !1;
|
|
1960
1960
|
if (N) {
|
|
1961
|
-
const
|
|
1962
|
-
!!a ===
|
|
1961
|
+
const k = ec(r) === $r;
|
|
1962
|
+
!!a === k && (r = Sr(), Te(r), ze(!1), _ = !0);
|
|
1963
1963
|
}
|
|
1964
1964
|
var v = vc(), S = r;
|
|
1965
1965
|
if (v && (u = document.createDocumentFragment(), u.append(S = Nt())), a ? s ??= m && He(() => m(S)) : i ??= m && He(() => m(S)), v) {
|
|
@@ -2047,26 +2047,26 @@ function vr(t, e, n, r, s, i = null) {
|
|
|
2047
2047
|
p !== (S === 0) && (a = Sr(), Te(a), ze(!1), g = !0);
|
|
2048
2048
|
}
|
|
2049
2049
|
if (N) {
|
|
2050
|
-
for (var y = null,
|
|
2050
|
+
for (var y = null, k, b = 0; b < S; b++) {
|
|
2051
2051
|
if (M.nodeType === Tn && /** @type {Comment} */
|
|
2052
2052
|
M.data === sa) {
|
|
2053
2053
|
a = /** @type {Comment} */
|
|
2054
2054
|
M, g = !0, ze(!1);
|
|
2055
2055
|
break;
|
|
2056
2056
|
}
|
|
2057
|
-
var
|
|
2058
|
-
|
|
2057
|
+
var E = m[b], A = r(E, b);
|
|
2058
|
+
k = Ai(
|
|
2059
2059
|
M,
|
|
2060
2060
|
o,
|
|
2061
2061
|
y,
|
|
2062
2062
|
null,
|
|
2063
|
-
|
|
2063
|
+
E,
|
|
2064
2064
|
A,
|
|
2065
2065
|
b,
|
|
2066
2066
|
s,
|
|
2067
2067
|
e,
|
|
2068
2068
|
n
|
|
2069
|
-
), o.items.set(A,
|
|
2069
|
+
), o.items.set(A, k), y = k;
|
|
2070
2070
|
}
|
|
2071
2071
|
S > 0 && Te(Sr());
|
|
2072
2072
|
}
|
|
@@ -2078,21 +2078,21 @@ function vr(t, e, n, r, s, i = null) {
|
|
|
2078
2078
|
ie
|
|
2079
2079
|
);
|
|
2080
2080
|
for (b = 0; b < S; b += 1) {
|
|
2081
|
-
|
|
2081
|
+
E = m[b], A = r(E, b);
|
|
2082
2082
|
var $ = o.items.get(A) ?? h.get(A);
|
|
2083
|
-
$ ? (e & (xs | As)) !== 0 && Fc($,
|
|
2083
|
+
$ ? (e & (xs | As)) !== 0 && Fc($, E, b, e) : (k = Ai(
|
|
2084
2084
|
null,
|
|
2085
2085
|
o,
|
|
2086
2086
|
null,
|
|
2087
2087
|
null,
|
|
2088
|
-
|
|
2088
|
+
E,
|
|
2089
2089
|
A,
|
|
2090
2090
|
b,
|
|
2091
2091
|
s,
|
|
2092
2092
|
e,
|
|
2093
2093
|
n,
|
|
2094
2094
|
!0
|
|
2095
|
-
), h.set(A,
|
|
2095
|
+
), h.set(A, k)), T.add(A);
|
|
2096
2096
|
}
|
|
2097
2097
|
for (const [H, ce] of o.items)
|
|
2098
2098
|
T.has(H) || x.skipped_effects.add(ce.e);
|
|
@@ -2103,15 +2103,15 @@ function vr(t, e, n, r, s, i = null) {
|
|
|
2103
2103
|
}), N && (a = M);
|
|
2104
2104
|
}
|
|
2105
2105
|
function Ph(t, e, n, r, s, i, a, o, l) {
|
|
2106
|
-
var c = (a &
|
|
2106
|
+
var c = (a & kd) !== 0, u = (a & (xs | As)) !== 0, d = e.length, h = n.items, f = n.first, m = f, _, v = null, S, g = [], p = [], y, k, b, E;
|
|
2107
2107
|
if (c)
|
|
2108
|
-
for (
|
|
2109
|
-
y = e[
|
|
2110
|
-
for (
|
|
2111
|
-
if (y = e[
|
|
2112
|
-
var A = r.get(
|
|
2108
|
+
for (E = 0; E < d; E += 1)
|
|
2109
|
+
y = e[E], k = o(y, E), b = h.get(k), b !== void 0 && (b.a?.measure(), (S ??= /* @__PURE__ */ new Set()).add(b));
|
|
2110
|
+
for (E = 0; E < d; E += 1) {
|
|
2111
|
+
if (y = e[E], k = o(y, E), b = h.get(k), b === void 0) {
|
|
2112
|
+
var A = r.get(k);
|
|
2113
2113
|
if (A !== void 0) {
|
|
2114
|
-
r.delete(
|
|
2114
|
+
r.delete(k), h.set(k, A);
|
|
2115
2115
|
var T = v ? v.next : m;
|
|
2116
2116
|
gt(n, v, A), gt(n, A, T), ni(A, T, s), v = A;
|
|
2117
2117
|
} else {
|
|
@@ -2125,17 +2125,17 @@ function Ph(t, e, n, r, s, i, a, o, l) {
|
|
|
2125
2125
|
v,
|
|
2126
2126
|
v === null ? n.first : v.next,
|
|
2127
2127
|
y,
|
|
2128
|
-
E,
|
|
2129
2128
|
k,
|
|
2129
|
+
E,
|
|
2130
2130
|
i,
|
|
2131
2131
|
a,
|
|
2132
2132
|
l
|
|
2133
2133
|
);
|
|
2134
2134
|
}
|
|
2135
|
-
h.set(
|
|
2135
|
+
h.set(k, v), g = [], p = [], m = v.next;
|
|
2136
2136
|
continue;
|
|
2137
2137
|
}
|
|
2138
|
-
if (u && Fc(b, y,
|
|
2138
|
+
if (u && Fc(b, y, E, a), (b.e.f & ct) !== 0 && (Ds(b.e), c && (b.a?.unfix(), (S ??= /* @__PURE__ */ new Set()).delete(b))), b !== m) {
|
|
2139
2139
|
if (_ !== void 0 && _.has(b)) {
|
|
2140
2140
|
if (g.length < p.length) {
|
|
2141
2141
|
var $ = p[0], H;
|
|
@@ -2145,12 +2145,12 @@ function Ph(t, e, n, r, s, i, a, o, l) {
|
|
|
2145
2145
|
ni(g[H], $, s);
|
|
2146
2146
|
for (H = 0; H < p.length; H += 1)
|
|
2147
2147
|
_.delete(p[H]);
|
|
2148
|
-
gt(n, ce.prev, we.next), gt(n, v, ce), gt(n, we, $), m = $, v = we,
|
|
2148
|
+
gt(n, ce.prev, we.next), gt(n, v, ce), gt(n, we, $), m = $, v = we, E -= 1, g = [], p = [];
|
|
2149
2149
|
} else
|
|
2150
2150
|
_.delete(b), ni(b, m, s), gt(n, b.prev, b.next), gt(n, b, v === null ? n.first : v.next), gt(n, v, b), v = b;
|
|
2151
2151
|
continue;
|
|
2152
2152
|
}
|
|
2153
|
-
for (g = [], p = []; m !== null && m.k !==
|
|
2153
|
+
for (g = [], p = []; m !== null && m.k !== k; )
|
|
2154
2154
|
(m.e.f & ct) === 0 && (_ ??= /* @__PURE__ */ new Set()).add(m), p.push(m), m = m.next;
|
|
2155
2155
|
if (m === null)
|
|
2156
2156
|
continue;
|
|
@@ -2165,10 +2165,10 @@ function Ph(t, e, n, r, s, i, a, o, l) {
|
|
|
2165
2165
|
if (pe > 0) {
|
|
2166
2166
|
var Fe = (a & Jl) !== 0 && d === 0 ? s : null;
|
|
2167
2167
|
if (c) {
|
|
2168
|
-
for (
|
|
2169
|
-
ae[
|
|
2170
|
-
for (
|
|
2171
|
-
ae[
|
|
2168
|
+
for (E = 0; E < pe; E += 1)
|
|
2169
|
+
ae[E].a?.measure();
|
|
2170
|
+
for (E = 0; E < pe; E += 1)
|
|
2171
|
+
ae[E].a?.fix();
|
|
2172
2172
|
}
|
|
2173
2173
|
Ch(n, ae, Fe);
|
|
2174
2174
|
}
|
|
@@ -2190,7 +2190,7 @@ function Fc(t, e, n, r) {
|
|
|
2190
2190
|
) : t.i = n;
|
|
2191
2191
|
}
|
|
2192
2192
|
function Ai(t, e, n, r, s, i, a, o, l, c, u) {
|
|
2193
|
-
var d = (l & xs) !== 0, h = (l &
|
|
2193
|
+
var d = (l & xs) !== 0, h = (l & Ed) === 0, f = d ? h ? /* @__PURE__ */ hc(s, !1, !1) : Pt(s) : s, m = (l & As) === 0 ? a : Pt(a), _ = {
|
|
2194
2194
|
i: m,
|
|
2195
2195
|
v: f,
|
|
2196
2196
|
k: i,
|
|
@@ -2284,7 +2284,7 @@ function Nh(t, e, n = !1, r = !1, s = !1) {
|
|
|
2284
2284
|
});
|
|
2285
2285
|
}
|
|
2286
2286
|
function Mc(t, e) {
|
|
2287
|
-
|
|
2287
|
+
kc(() => {
|
|
2288
2288
|
var n = t.getRootNode(), r = (
|
|
2289
2289
|
/** @type {ShadowRoot} */
|
|
2290
2290
|
n.host ? (
|
|
@@ -2422,7 +2422,7 @@ function ho(t, e) {
|
|
|
2422
2422
|
return t === e || t?.[ns] === e;
|
|
2423
2423
|
}
|
|
2424
2424
|
function fo(t = {}, e, n, r) {
|
|
2425
|
-
return
|
|
2425
|
+
return kc(() => {
|
|
2426
2426
|
var s, i;
|
|
2427
2427
|
return Ls(() => {
|
|
2428
2428
|
s = i, i = [], Fs(() => {
|
|
@@ -2462,7 +2462,7 @@ function Se(t, e, n, r) {
|
|
|
2462
2462
|
const m = f ? w(u) : h;
|
|
2463
2463
|
return O(u, m), c = !0, s !== void 0 && (s = m), h;
|
|
2464
2464
|
}
|
|
2465
|
-
return xn && c || (d.f &
|
|
2465
|
+
return xn && c || (d.f & En) !== 0 ? u.v : w(u);
|
|
2466
2466
|
})
|
|
2467
2467
|
);
|
|
2468
2468
|
}
|
|
@@ -2886,7 +2886,7 @@ function Yh(t) {
|
|
|
2886
2886
|
});
|
|
2887
2887
|
}), n;
|
|
2888
2888
|
}
|
|
2889
|
-
var
|
|
2889
|
+
var ke = {}, Ln = {}, jn = {}, Dn = {}, Un = {}, Fn = {}, Xh = function() {
|
|
2890
2890
|
if (typeof self < "u")
|
|
2891
2891
|
return self;
|
|
2892
2892
|
if (typeof window < "u")
|
|
@@ -2959,8 +2959,8 @@ function Gc() {
|
|
|
2959
2959
|
const b = await c.text();
|
|
2960
2960
|
b === "" || (this.headers.get("Accept") === "text/csv" || this.headers.get("Accept") && (!((u = this.headers.get("Accept")) === null || u === void 0) && u.includes("application/vnd.pgrst.plan+text")) ? _ = b : _ = JSON.parse(b));
|
|
2961
2961
|
}
|
|
2962
|
-
const y = (d = this.headers.get("Prefer")) === null || d === void 0 ? void 0 : d.match(/count=(exact|planned|estimated)/),
|
|
2963
|
-
y &&
|
|
2962
|
+
const y = (d = this.headers.get("Prefer")) === null || d === void 0 ? void 0 : d.match(/count=(exact|planned|estimated)/), k = (h = c.headers.get("content-range")) === null || h === void 0 ? void 0 : h.split("/");
|
|
2963
|
+
y && k && k.length > 1 && (v = parseInt(k[1])), this.isMaybeSingle && this.method === "GET" && Array.isArray(_) && (_.length > 1 ? (m = {
|
|
2964
2964
|
// https://github.com/PostgREST/postgrest/blob/a867d79c42419af16c18c3fb019eba8df992626f/src/PostgREST/Error.hs#L553
|
|
2965
2965
|
code: "PGRST116",
|
|
2966
2966
|
details: `Results contain ${_.length} rows, application/vnd.pgrst.object+json requires 1 row`,
|
|
@@ -3746,10 +3746,10 @@ function Vc() {
|
|
|
3746
3746
|
}
|
|
3747
3747
|
return jn.default = n, jn;
|
|
3748
3748
|
}
|
|
3749
|
-
var
|
|
3749
|
+
var ko;
|
|
3750
3750
|
function nf() {
|
|
3751
|
-
if (
|
|
3752
|
-
|
|
3751
|
+
if (ko) return Ln;
|
|
3752
|
+
ko = 1;
|
|
3753
3753
|
var t = Ln && Ln.__importDefault || function(s) {
|
|
3754
3754
|
return s && s.__esModule ? s : { default: s };
|
|
3755
3755
|
};
|
|
@@ -3840,33 +3840,33 @@ function nf() {
|
|
|
3840
3840
|
}
|
|
3841
3841
|
return Ln.default = r, Ln;
|
|
3842
3842
|
}
|
|
3843
|
-
var
|
|
3843
|
+
var Eo;
|
|
3844
3844
|
function rf() {
|
|
3845
|
-
if (
|
|
3846
|
-
|
|
3847
|
-
var t =
|
|
3845
|
+
if (Eo) return ke;
|
|
3846
|
+
Eo = 1;
|
|
3847
|
+
var t = ke && ke.__importDefault || function(o) {
|
|
3848
3848
|
return o && o.__esModule ? o : { default: o };
|
|
3849
3849
|
};
|
|
3850
|
-
Object.defineProperty(
|
|
3850
|
+
Object.defineProperty(ke, "__esModule", { value: !0 }), ke.PostgrestError = ke.PostgrestBuilder = ke.PostgrestTransformBuilder = ke.PostgrestFilterBuilder = ke.PostgrestQueryBuilder = ke.PostgrestClient = void 0;
|
|
3851
3851
|
const e = t(nf());
|
|
3852
|
-
|
|
3852
|
+
ke.PostgrestClient = e.default;
|
|
3853
3853
|
const n = t(Vc());
|
|
3854
|
-
|
|
3854
|
+
ke.PostgrestQueryBuilder = n.default;
|
|
3855
3855
|
const r = t(va());
|
|
3856
|
-
|
|
3856
|
+
ke.PostgrestFilterBuilder = r.default;
|
|
3857
3857
|
const s = t(Kc());
|
|
3858
|
-
|
|
3858
|
+
ke.PostgrestTransformBuilder = s.default;
|
|
3859
3859
|
const i = t(Gc());
|
|
3860
|
-
|
|
3860
|
+
ke.PostgrestBuilder = i.default;
|
|
3861
3861
|
const a = t(Wc());
|
|
3862
|
-
return
|
|
3862
|
+
return ke.PostgrestError = a.default, ke.default = {
|
|
3863
3863
|
PostgrestClient: e.default,
|
|
3864
3864
|
PostgrestQueryBuilder: n.default,
|
|
3865
3865
|
PostgrestFilterBuilder: r.default,
|
|
3866
3866
|
PostgrestTransformBuilder: s.default,
|
|
3867
3867
|
PostgrestBuilder: i.default,
|
|
3868
3868
|
PostgrestError: a.default
|
|
3869
|
-
},
|
|
3869
|
+
}, ke;
|
|
3870
3870
|
}
|
|
3871
3871
|
var sf = rf();
|
|
3872
3872
|
const af = /* @__PURE__ */ Jh(sf), {
|
|
@@ -4329,10 +4329,10 @@ var wr;
|
|
|
4329
4329
|
(function(t) {
|
|
4330
4330
|
t.BROADCAST = "broadcast", t.PRESENCE = "presence", t.POSTGRES_CHANGES = "postgres_changes", t.SYSTEM = "system";
|
|
4331
4331
|
})(wr || (wr = {}));
|
|
4332
|
-
var
|
|
4332
|
+
var Et;
|
|
4333
4333
|
(function(t) {
|
|
4334
4334
|
t.SUBSCRIBED = "SUBSCRIBED", t.TIMED_OUT = "TIMED_OUT", t.CLOSED = "CLOSED", t.CHANNEL_ERROR = "CHANNEL_ERROR";
|
|
4335
|
-
})(
|
|
4335
|
+
})(Et || (Et = {}));
|
|
4336
4336
|
class ba {
|
|
4337
4337
|
constructor(e, n = { config: {} }, r) {
|
|
4338
4338
|
var s, i;
|
|
@@ -4365,29 +4365,29 @@ class ba {
|
|
|
4365
4365
|
postgres_changes: c,
|
|
4366
4366
|
private: l
|
|
4367
4367
|
};
|
|
4368
|
-
this.socket.accessTokenValue && (d.access_token = this.socket.accessTokenValue), this._onError((f) => e?.(
|
|
4368
|
+
this.socket.accessTokenValue && (d.access_token = this.socket.accessTokenValue), this._onError((f) => e?.(Et.CHANNEL_ERROR, f)), this._onClose(() => e?.(Et.CLOSED)), this.updateJoinPayload(Object.assign({ config: h }, d)), this.joinedOnce = !0, this._rejoin(n), this.joinPush.receive("ok", async ({ postgres_changes: f }) => {
|
|
4369
4369
|
var m;
|
|
4370
4370
|
if (this.socket.setAuth(), f === void 0) {
|
|
4371
|
-
e?.(
|
|
4371
|
+
e?.(Et.SUBSCRIBED);
|
|
4372
4372
|
return;
|
|
4373
4373
|
} else {
|
|
4374
4374
|
const _ = this.bindings.postgres_changes, v = (m = _?.length) !== null && m !== void 0 ? m : 0, S = [];
|
|
4375
4375
|
for (let g = 0; g < v; g++) {
|
|
4376
|
-
const p = _[g], { filter: { event: y, schema:
|
|
4377
|
-
if (A && A.event === y && A.schema ===
|
|
4376
|
+
const p = _[g], { filter: { event: y, schema: k, table: b, filter: E } } = p, A = f && f[g];
|
|
4377
|
+
if (A && A.event === y && A.schema === k && A.table === b && A.filter === E)
|
|
4378
4378
|
S.push(Object.assign(Object.assign({}, p), { id: A.id }));
|
|
4379
4379
|
else {
|
|
4380
|
-
this.unsubscribe(), this.state = be.errored, e?.(
|
|
4380
|
+
this.unsubscribe(), this.state = be.errored, e?.(Et.CHANNEL_ERROR, new Error("mismatch between server and client bindings for postgres changes"));
|
|
4381
4381
|
return;
|
|
4382
4382
|
}
|
|
4383
4383
|
}
|
|
4384
|
-
this.bindings.postgres_changes = S, e && e(
|
|
4384
|
+
this.bindings.postgres_changes = S, e && e(Et.SUBSCRIBED);
|
|
4385
4385
|
return;
|
|
4386
4386
|
}
|
|
4387
4387
|
}).receive("error", (f) => {
|
|
4388
|
-
this.state = be.errored, e?.(
|
|
4388
|
+
this.state = be.errored, e?.(Et.CHANNEL_ERROR, new Error(JSON.stringify(Object.values(f).join(", ") || "error")));
|
|
4389
4389
|
}).receive("timeout", () => {
|
|
4390
|
-
e?.(
|
|
4390
|
+
e?.(Et.TIMED_OUT);
|
|
4391
4391
|
});
|
|
4392
4392
|
}
|
|
4393
4393
|
return this;
|
|
@@ -4547,8 +4547,8 @@ class ba {
|
|
|
4547
4547
|
var m, _, v, S, g, p;
|
|
4548
4548
|
if (["broadcast", "presence", "postgres_changes"].includes(a))
|
|
4549
4549
|
if ("id" in f) {
|
|
4550
|
-
const y = f.id,
|
|
4551
|
-
return y && ((_ = n.ids) === null || _ === void 0 ? void 0 : _.includes(y)) && (
|
|
4550
|
+
const y = f.id, k = (m = f.filter) === null || m === void 0 ? void 0 : m.event;
|
|
4551
|
+
return y && ((_ = n.ids) === null || _ === void 0 ? void 0 : _.includes(y)) && (k === "*" || k?.toLocaleLowerCase() === ((v = n.data) === null || v === void 0 ? void 0 : v.type.toLocaleLowerCase()));
|
|
4552
4552
|
} else {
|
|
4553
4553
|
const y = (g = (S = f?.filter) === null || S === void 0 ? void 0 : S.event) === null || g === void 0 ? void 0 : g.toLocaleLowerCase();
|
|
4554
4554
|
return y === "*" || y === ((p = n?.event) === null || p === void 0 ? void 0 : p.toLocaleLowerCase());
|
|
@@ -4663,7 +4663,7 @@ const ai = () => {
|
|
|
4663
4663
|
HEARTBEAT_INTERVAL: 25e3,
|
|
4664
4664
|
RECONNECT_DELAY: 10,
|
|
4665
4665
|
HEARTBEAT_TIMEOUT_FALLBACK: 100
|
|
4666
|
-
}, wf = [1e3, 2e3, 5e3, 1e4],
|
|
4666
|
+
}, wf = [1e3, 2e3, 5e3, 1e4], kf = 1e4, Ef = `
|
|
4667
4667
|
addEventListener("message", (e) => {
|
|
4668
4668
|
if (e.data.event === "start") {
|
|
4669
4669
|
setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
|
|
@@ -5028,7 +5028,7 @@ Option 2: Install and provide the "ws" package:
|
|
|
5028
5028
|
if (e)
|
|
5029
5029
|
n = e;
|
|
5030
5030
|
else {
|
|
5031
|
-
const r = new Blob([
|
|
5031
|
+
const r = new Blob([Ef], { type: "application/javascript" });
|
|
5032
5032
|
n = URL.createObjectURL(r);
|
|
5033
5033
|
}
|
|
5034
5034
|
return n;
|
|
@@ -5106,7 +5106,7 @@ Option 2: Install and provide the "ws" package:
|
|
|
5106
5106
|
*/
|
|
5107
5107
|
_initializeOptions(e) {
|
|
5108
5108
|
var n, r, s, i, a, o, l, c, u;
|
|
5109
|
-
if (this.transport = (n = e?.transport) !== null && n !== void 0 ? n : null, this.timeout = (r = e?.timeout) !== null && r !== void 0 ? r : Oi, this.heartbeatIntervalMs = (s = e?.heartbeatIntervalMs) !== null && s !== void 0 ? s : Wr.HEARTBEAT_INTERVAL, this.worker = (i = e?.worker) !== null && i !== void 0 ? i : !1, this.accessToken = (a = e?.accessToken) !== null && a !== void 0 ? a : null, this.heartbeatCallback = (o = e?.heartbeatCallback) !== null && o !== void 0 ? o : ai, e?.params && (this.params = e.params), e?.logger && (this.logger = e.logger), (e?.logLevel || e?.log_level) && (this.logLevel = e.logLevel || e.log_level, this.params = Object.assign(Object.assign({}, this.params), { log_level: this.logLevel })), this.reconnectAfterMs = (l = e?.reconnectAfterMs) !== null && l !== void 0 ? l : ((d) => wf[d - 1] ||
|
|
5109
|
+
if (this.transport = (n = e?.transport) !== null && n !== void 0 ? n : null, this.timeout = (r = e?.timeout) !== null && r !== void 0 ? r : Oi, this.heartbeatIntervalMs = (s = e?.heartbeatIntervalMs) !== null && s !== void 0 ? s : Wr.HEARTBEAT_INTERVAL, this.worker = (i = e?.worker) !== null && i !== void 0 ? i : !1, this.accessToken = (a = e?.accessToken) !== null && a !== void 0 ? a : null, this.heartbeatCallback = (o = e?.heartbeatCallback) !== null && o !== void 0 ? o : ai, e?.params && (this.params = e.params), e?.logger && (this.logger = e.logger), (e?.logLevel || e?.log_level) && (this.logLevel = e.logLevel || e.log_level, this.params = Object.assign(Object.assign({}, this.params), { log_level: this.logLevel })), this.reconnectAfterMs = (l = e?.reconnectAfterMs) !== null && l !== void 0 ? l : ((d) => wf[d - 1] || kf), this.encode = (c = e?.encode) !== null && c !== void 0 ? c : ((d, h) => h(JSON.stringify(d))), this.decode = (u = e?.decode) !== null && u !== void 0 ? u : this.serializer.decode.bind(this.serializer), this.worker) {
|
|
5110
5110
|
if (typeof window < "u" && !window.Worker)
|
|
5111
5111
|
throw new Error("Web Worker is not supported");
|
|
5112
5112
|
this.workerUrl = e?.workerUrl;
|
|
@@ -6451,10 +6451,10 @@ function wp(t, e) {
|
|
|
6451
6451
|
})();
|
|
6452
6452
|
});
|
|
6453
6453
|
}
|
|
6454
|
-
function
|
|
6454
|
+
function kp(t) {
|
|
6455
6455
|
return ("0" + t.toString(16)).substr(-2);
|
|
6456
6456
|
}
|
|
6457
|
-
function
|
|
6457
|
+
function Ep() {
|
|
6458
6458
|
const e = new Uint32Array(56);
|
|
6459
6459
|
if (typeof crypto > "u") {
|
|
6460
6460
|
const n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~", r = n.length;
|
|
@@ -6463,7 +6463,7 @@ function kp() {
|
|
|
6463
6463
|
s += n.charAt(Math.floor(Math.random() * r));
|
|
6464
6464
|
return s;
|
|
6465
6465
|
}
|
|
6466
|
-
return crypto.getRandomValues(e), Array.from(e,
|
|
6466
|
+
return crypto.getRandomValues(e), Array.from(e, kp).join("");
|
|
6467
6467
|
}
|
|
6468
6468
|
async function Sp(t) {
|
|
6469
6469
|
const n = new TextEncoder().encode(t), r = await crypto.subtle.digest("SHA-256", n), s = new Uint8Array(r);
|
|
@@ -6476,7 +6476,7 @@ async function Tp(t) {
|
|
|
6476
6476
|
return btoa(n).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
6477
6477
|
}
|
|
6478
6478
|
async function qn(t, e, n = !1) {
|
|
6479
|
-
const r =
|
|
6479
|
+
const r = Ep();
|
|
6480
6480
|
let s = r;
|
|
6481
6481
|
n && (s += "/PASSWORD_RECOVERY"), await Vn(t, `${e}-code-verifier`, s);
|
|
6482
6482
|
const i = await Tp(r);
|
|
@@ -8004,20 +8004,20 @@ class Rr {
|
|
|
8004
8004
|
throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");
|
|
8005
8005
|
p = v;
|
|
8006
8006
|
}
|
|
8007
|
-
const y = new URL((n = g?.url) !== null && n !== void 0 ? n : window.location.href),
|
|
8007
|
+
const y = new URL((n = g?.url) !== null && n !== void 0 ? n : window.location.href), k = await p.request({
|
|
8008
8008
|
method: "eth_requestAccounts"
|
|
8009
8009
|
}).then((T) => T).catch(() => {
|
|
8010
8010
|
throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid");
|
|
8011
8011
|
});
|
|
8012
|
-
if (!
|
|
8012
|
+
if (!k || k.length === 0)
|
|
8013
8013
|
throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");
|
|
8014
|
-
const b = au(
|
|
8015
|
-
let
|
|
8016
|
-
if (!
|
|
8014
|
+
const b = au(k[0]);
|
|
8015
|
+
let E = (r = g?.signInWithEthereum) === null || r === void 0 ? void 0 : r.chainId;
|
|
8016
|
+
if (!E) {
|
|
8017
8017
|
const T = await p.request({
|
|
8018
8018
|
method: "eth_chainId"
|
|
8019
8019
|
});
|
|
8020
|
-
|
|
8020
|
+
E = Hp(T);
|
|
8021
8021
|
}
|
|
8022
8022
|
const A = {
|
|
8023
8023
|
domain: y.host,
|
|
@@ -8025,7 +8025,7 @@ class Rr {
|
|
|
8025
8025
|
statement: S,
|
|
8026
8026
|
uri: y.href,
|
|
8027
8027
|
version: "1",
|
|
8028
|
-
chainId:
|
|
8028
|
+
chainId: E,
|
|
8029
8029
|
nonce: (s = g?.signInWithEthereum) === null || s === void 0 ? void 0 : s.nonce,
|
|
8030
8030
|
issuedAt: (a = (i = g?.signInWithEthereum) === null || i === void 0 ? void 0 : i.issuedAt) !== null && a !== void 0 ? a : /* @__PURE__ */ new Date(),
|
|
8031
8031
|
expirationTime: (o = g?.signInWithEthereum) === null || o === void 0 ? void 0 : o.expirationTime,
|
|
@@ -8083,34 +8083,34 @@ class Rr {
|
|
|
8083
8083
|
throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");
|
|
8084
8084
|
y = S;
|
|
8085
8085
|
}
|
|
8086
|
-
const
|
|
8086
|
+
const k = new URL((n = p?.url) !== null && n !== void 0 ? n : window.location.href);
|
|
8087
8087
|
if ("signIn" in y && y.signIn) {
|
|
8088
8088
|
const b = await y.signIn(Object.assign(Object.assign(Object.assign({ issuedAt: (/* @__PURE__ */ new Date()).toISOString() }, p?.signInWithSolana), {
|
|
8089
8089
|
// non-overridable properties
|
|
8090
8090
|
version: "1",
|
|
8091
|
-
domain:
|
|
8092
|
-
uri:
|
|
8091
|
+
domain: k.host,
|
|
8092
|
+
uri: k.href
|
|
8093
8093
|
}), g ? { statement: g } : null));
|
|
8094
|
-
let
|
|
8094
|
+
let E;
|
|
8095
8095
|
if (Array.isArray(b) && b[0] && typeof b[0] == "object")
|
|
8096
|
-
|
|
8096
|
+
E = b[0];
|
|
8097
8097
|
else if (b && typeof b == "object" && "signedMessage" in b && "signature" in b)
|
|
8098
|
-
|
|
8098
|
+
E = b;
|
|
8099
8099
|
else
|
|
8100
8100
|
throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");
|
|
8101
|
-
if ("signedMessage" in
|
|
8102
|
-
m = typeof
|
|
8101
|
+
if ("signedMessage" in E && "signature" in E && (typeof E.signedMessage == "string" || E.signedMessage instanceof Uint8Array) && E.signature instanceof Uint8Array)
|
|
8102
|
+
m = typeof E.signedMessage == "string" ? E.signedMessage : new TextDecoder().decode(E.signedMessage), _ = E.signature;
|
|
8103
8103
|
else
|
|
8104
8104
|
throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields");
|
|
8105
8105
|
} else {
|
|
8106
8106
|
if (!("signMessage" in y) || typeof y.signMessage != "function" || !("publicKey" in y) || typeof y != "object" || !y.publicKey || !("toBase58" in y.publicKey) || typeof y.publicKey.toBase58 != "function")
|
|
8107
8107
|
throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");
|
|
8108
8108
|
m = [
|
|
8109
|
-
`${
|
|
8109
|
+
`${k.host} wants you to sign in with your Solana account:`,
|
|
8110
8110
|
y.publicKey.toBase58(),
|
|
8111
8111
|
...g ? ["", g, ""] : [""],
|
|
8112
8112
|
"Version: 1",
|
|
8113
|
-
`URI: ${
|
|
8113
|
+
`URI: ${k.href}`,
|
|
8114
8114
|
`Issued At: ${(s = (r = p?.signInWithSolana) === null || r === void 0 ? void 0 : r.issuedAt) !== null && s !== void 0 ? s : (/* @__PURE__ */ new Date()).toISOString()}`,
|
|
8115
8115
|
...!((i = p?.signInWithSolana) === null || i === void 0) && i.notBefore ? [`Not Before: ${p.signInWithSolana.notBefore}`] : [],
|
|
8116
8116
|
...!((a = p?.signInWithSolana) === null || a === void 0) && a.expirationTime ? [`Expiration Time: ${p.signInWithSolana.expirationTime}`] : [],
|
|
@@ -8119,7 +8119,7 @@ class Rr {
|
|
|
8119
8119
|
...!((c = p?.signInWithSolana) === null || c === void 0) && c.requestId ? [`Request ID: ${p.signInWithSolana.requestId}`] : [],
|
|
8120
8120
|
...!((d = (u = p?.signInWithSolana) === null || u === void 0 ? void 0 : u.resources) === null || d === void 0) && d.length ? [
|
|
8121
8121
|
"Resources",
|
|
8122
|
-
...p.signInWithSolana.resources.map((
|
|
8122
|
+
...p.signInWithSolana.resources.map((E) => `- ${E}`)
|
|
8123
8123
|
] : []
|
|
8124
8124
|
].join(`
|
|
8125
8125
|
`);
|
|
@@ -9625,7 +9625,7 @@ var Rn = wa();
|
|
|
9625
9625
|
function cu(t) {
|
|
9626
9626
|
Rn = t;
|
|
9627
9627
|
}
|
|
9628
|
-
var
|
|
9628
|
+
var kr = { exec: () => null };
|
|
9629
9629
|
function G(t, e = "") {
|
|
9630
9630
|
let n = typeof t == "string" ? t : t.source, r = { replace: (s, i) => {
|
|
9631
9631
|
let a = typeof i == "string" ? i : i.source;
|
|
@@ -9639,8 +9639,8 @@ var pg = (() => {
|
|
|
9639
9639
|
} catch {
|
|
9640
9640
|
return !1;
|
|
9641
9641
|
}
|
|
9642
|
-
})(), $e = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (t) => new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}#`), htmlBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}<(?:[a-z].*>|!--)`, "i") }, gg = /^(?:[ \t]*(?:\n|$))+/, mg = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, _g = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Nr = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, vg = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,
|
|
9643
|
-
]`).replace("lheading", du).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Ag = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Rg = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, fu = /^( {2,}|\\)\n(?!\s*$)/, Og = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, qs = /[\p{P}\p{S}]/u, Aa = /[\s\p{P}\p{S}]/u, pu = /[^\s\p{P}\p{S}]/u, Ig = G(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Aa).getRegex(), gu = /(?!~)[\p{P}\p{S}]/u, $g = /(?!~)[\s\p{P}\p{S}]/u, Cg = /(?:[^\s\p{P}\p{S}]|~)/u, Pg = G(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", pg ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), mu = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Ng = G(mu, "u").replace(/punct/g, qs).getRegex(), Lg = G(mu, "u").replace(/punct/g, gu).getRegex(), _u = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", jg = G(_u, "gu").replace(/notPunctSpace/g, pu).replace(/punctSpace/g, Aa).replace(/punct/g, qs).getRegex(), Dg = G(_u, "gu").replace(/notPunctSpace/g, Cg).replace(/punctSpace/g, $g).replace(/punct/g, gu).getRegex(), Ug = G("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, pu).replace(/punctSpace/g, Aa).replace(/punct/g, qs).getRegex(), Fg = G(/\\(punct)/, "gu").replace(/punct/g, qs).getRegex(), Mg = G(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Bg = G(Ta).replace("(?:-->|$)", "-->").getRegex(), qg = G("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Bg).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), _s = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Hg = G(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", _s).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), vu = G(/^!?\[(label)\]\[(ref)\]/).replace("label", _s).replace("ref", Sa).getRegex(), bu = G(/^!?\[(ref)\](?:\[\])?/).replace("ref", Sa).getRegex(), zg = G("reflink|nolink(?!\\()", "g").replace("reflink", vu).replace("nolink", bu).getRegex(), Bo = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Ra = { _backpedal:
|
|
9642
|
+
})(), $e = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (t) => new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}#`), htmlBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}<(?:[a-z].*>|!--)`, "i") }, gg = /^(?:[ \t]*(?:\n|$))+/, mg = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, _g = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Nr = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, vg = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, ka = /(?:[*+-]|\d{1,9}[.)])/, uu = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, du = G(uu).replace(/bull/g, ka).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), bg = G(uu).replace(/bull/g, ka).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Ea = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, yg = /^[^\n]+/, Sa = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, wg = G(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Sa).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), kg = G(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, ka).getRegex(), Bs = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Ta = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Eg = G("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", Ta).replace("tag", Bs).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), hu = G(Ea).replace("hr", Nr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Bs).getRegex(), Sg = G(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", hu).getRegex(), xa = { blockquote: Sg, code: mg, def: wg, fences: _g, heading: vg, hr: Nr, html: Eg, lheading: du, list: kg, newline: gg, paragraph: hu, table: kr, text: yg }, Mo = G("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Nr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Bs).getRegex(), Tg = { ...xa, lheading: bg, table: Mo, paragraph: G(Ea).replace("hr", Nr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Mo).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Bs).getRegex() }, xg = { ...xa, html: G(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Ta).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: kr, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: G(Ea).replace("hr", Nr).replace("heading", ` *#{1,6} *[^
|
|
9643
|
+
]`).replace("lheading", du).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Ag = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Rg = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, fu = /^( {2,}|\\)\n(?!\s*$)/, Og = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, qs = /[\p{P}\p{S}]/u, Aa = /[\s\p{P}\p{S}]/u, pu = /[^\s\p{P}\p{S}]/u, Ig = G(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Aa).getRegex(), gu = /(?!~)[\p{P}\p{S}]/u, $g = /(?!~)[\s\p{P}\p{S}]/u, Cg = /(?:[^\s\p{P}\p{S}]|~)/u, Pg = G(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", pg ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), mu = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Ng = G(mu, "u").replace(/punct/g, qs).getRegex(), Lg = G(mu, "u").replace(/punct/g, gu).getRegex(), _u = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", jg = G(_u, "gu").replace(/notPunctSpace/g, pu).replace(/punctSpace/g, Aa).replace(/punct/g, qs).getRegex(), Dg = G(_u, "gu").replace(/notPunctSpace/g, Cg).replace(/punctSpace/g, $g).replace(/punct/g, gu).getRegex(), Ug = G("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, pu).replace(/punctSpace/g, Aa).replace(/punct/g, qs).getRegex(), Fg = G(/\\(punct)/, "gu").replace(/punct/g, qs).getRegex(), Mg = G(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Bg = G(Ta).replace("(?:-->|$)", "-->").getRegex(), qg = G("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Bg).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), _s = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Hg = G(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", _s).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), vu = G(/^!?\[(label)\]\[(ref)\]/).replace("label", _s).replace("ref", Sa).getRegex(), bu = G(/^!?\[(ref)\](?:\[\])?/).replace("ref", Sa).getRegex(), zg = G("reflink|nolink(?!\\()", "g").replace("reflink", vu).replace("nolink", bu).getRegex(), Bo = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Ra = { _backpedal: kr, anyPunctuation: Fg, autolink: Mg, blockSkip: Pg, br: fu, code: Rg, del: kr, emStrongLDelim: Ng, emStrongRDelimAst: jg, emStrongRDelimUnd: Ug, escape: Ag, link: Hg, nolink: bu, punctuation: Ig, reflink: vu, reflinkSearch: zg, tag: qg, text: Og, url: kr }, Wg = { ...Ra, link: G(/^!?\[(label)\]\((.*?)\)/).replace("label", _s).getRegex(), reflink: G(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", _s).getRegex() }, Fi = { ...Ra, emStrongRDelimAst: Dg, emStrongLDelim: Lg, url: G(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Bo).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: G(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Bo).getRegex() }, Gg = { ...Fi, br: G(fu).replace("{2,}", "*").getRegex(), text: G(Fi.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, Vr = { normal: xa, gfm: Tg, pedantic: xg }, ur = { normal: Ra, gfm: Fi, breaks: Gg, pedantic: Wg }, Kg = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, qo = (t) => Kg[t];
|
|
9644
9644
|
function pt(t, e) {
|
|
9645
9645
|
if (e) {
|
|
9646
9646
|
if ($e.escapeTest.test(t)) return t.replace($e.escapeReplace, qo);
|
|
@@ -9798,20 +9798,20 @@ ${u}` : u;
|
|
|
9798
9798
|
`, 1)[0], f = !d.trim(), m = 0;
|
|
9799
9799
|
if (this.options.pedantic ? (m = 2, u = d.trimStart()) : f ? m = e[1].length + 1 : (m = e[2].search(this.rules.other.nonSpaceChar), m = m > 4 ? 1 : m, u = d.slice(m), m += e[1].length), f && this.rules.other.blankLine.test(h) && (c += h + `
|
|
9800
9800
|
`, t = t.substring(h.length + 1), l = !0), !l) {
|
|
9801
|
-
let S = this.rules.other.nextBulletRegex(m), g = this.rules.other.hrRegex(m), p = this.rules.other.fencesBeginRegex(m), y = this.rules.other.headingBeginRegex(m),
|
|
9801
|
+
let S = this.rules.other.nextBulletRegex(m), g = this.rules.other.hrRegex(m), p = this.rules.other.fencesBeginRegex(m), y = this.rules.other.headingBeginRegex(m), k = this.rules.other.htmlBeginRegex(m);
|
|
9802
9802
|
for (; t; ) {
|
|
9803
9803
|
let b = t.split(`
|
|
9804
|
-
`, 1)[0],
|
|
9805
|
-
if (h = b, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "),
|
|
9806
|
-
if (
|
|
9807
|
-
` +
|
|
9804
|
+
`, 1)[0], E;
|
|
9805
|
+
if (h = b, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "), E = h) : E = h.replace(this.rules.other.tabCharGlobal, " "), p.test(h) || y.test(h) || k.test(h) || S.test(h) || g.test(h)) break;
|
|
9806
|
+
if (E.search(this.rules.other.nonSpaceChar) >= m || !h.trim()) u += `
|
|
9807
|
+
` + E.slice(m);
|
|
9808
9808
|
else {
|
|
9809
9809
|
if (f || d.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || p.test(d) || y.test(d) || g.test(d)) break;
|
|
9810
9810
|
u += `
|
|
9811
9811
|
` + h;
|
|
9812
9812
|
}
|
|
9813
9813
|
!f && !h.trim() && (f = !0), c += b + `
|
|
9814
|
-
`, t = t.substring(b.length + 1), d =
|
|
9814
|
+
`, t = t.substring(b.length + 1), d = E.slice(m);
|
|
9815
9815
|
}
|
|
9816
9816
|
}
|
|
9817
9817
|
s.loose || (a ? s.loose = !0 : this.rules.other.doubleBlankLine.test(c) && (a = !0));
|
|
@@ -10777,7 +10777,7 @@ const C = {
|
|
|
10777
10777
|
/** Log an error. */
|
|
10778
10778
|
error: rm
|
|
10779
10779
|
}, wu = 50, vn = "?", Go = /\(error: (.*)\)/, Ko = /captureMessage|captureException/;
|
|
10780
|
-
function
|
|
10780
|
+
function ku(...t) {
|
|
10781
10781
|
const e = t.sort((n, r) => n[0] - r[0]).map((n) => n[1]);
|
|
10782
10782
|
return (n, r = 0, s = 0) => {
|
|
10783
10783
|
const i = [], a = n.split(`
|
|
@@ -10803,7 +10803,7 @@ function Eu(...t) {
|
|
|
10803
10803
|
};
|
|
10804
10804
|
}
|
|
10805
10805
|
function sm(t) {
|
|
10806
|
-
return Array.isArray(t) ?
|
|
10806
|
+
return Array.isArray(t) ? ku(...t) : t;
|
|
10807
10807
|
}
|
|
10808
10808
|
function im(t) {
|
|
10809
10809
|
if (!t.length)
|
|
@@ -10895,9 +10895,9 @@ function cm() {
|
|
|
10895
10895
|
return ut("unhandledrejection", t), gi ? gi.apply(this, arguments) : !0;
|
|
10896
10896
|
}, Z.onunhandledrejection.__SENTRY_INSTRUMENTED__ = !0;
|
|
10897
10897
|
}
|
|
10898
|
-
const
|
|
10898
|
+
const Eu = Object.prototype.toString;
|
|
10899
10899
|
function Ca(t) {
|
|
10900
|
-
switch (
|
|
10900
|
+
switch (Eu.call(t)) {
|
|
10901
10901
|
case "[object Error]":
|
|
10902
10902
|
case "[object Exception]":
|
|
10903
10903
|
case "[object DOMException]":
|
|
@@ -10908,7 +10908,7 @@ function Ca(t) {
|
|
|
10908
10908
|
}
|
|
10909
10909
|
}
|
|
10910
10910
|
function lr(t, e) {
|
|
10911
|
-
return
|
|
10911
|
+
return Eu.call(t) === `[object ${e}]`;
|
|
10912
10912
|
}
|
|
10913
10913
|
function Su(t) {
|
|
10914
10914
|
return lr(t, "ErrorEvent");
|
|
@@ -11209,7 +11209,7 @@ const Iu = 1e3;
|
|
|
11209
11209
|
function jr() {
|
|
11210
11210
|
return Date.now() / Iu;
|
|
11211
11211
|
}
|
|
11212
|
-
function
|
|
11212
|
+
function km() {
|
|
11213
11213
|
const { performance: t } = Z;
|
|
11214
11214
|
if (!t?.now || !t.timeOrigin)
|
|
11215
11215
|
return jr;
|
|
@@ -11218,9 +11218,9 @@ function Em() {
|
|
|
11218
11218
|
}
|
|
11219
11219
|
let tl;
|
|
11220
11220
|
function $t() {
|
|
11221
|
-
return (tl ?? (tl =
|
|
11221
|
+
return (tl ?? (tl = km()))();
|
|
11222
11222
|
}
|
|
11223
|
-
function
|
|
11223
|
+
function Em(t) {
|
|
11224
11224
|
const e = $t(), n = {
|
|
11225
11225
|
sid: Qe(),
|
|
11226
11226
|
init: !0,
|
|
@@ -12132,7 +12132,7 @@ function w_(t) {
|
|
|
12132
12132
|
n.set(s, r), r += s.length;
|
|
12133
12133
|
return n;
|
|
12134
12134
|
}
|
|
12135
|
-
function
|
|
12135
|
+
function k_(t) {
|
|
12136
12136
|
const e = typeof t.data == "string" ? Wi(t.data) : t.data;
|
|
12137
12137
|
return [
|
|
12138
12138
|
{
|
|
@@ -12145,7 +12145,7 @@ function E_(t) {
|
|
|
12145
12145
|
e
|
|
12146
12146
|
];
|
|
12147
12147
|
}
|
|
12148
|
-
const
|
|
12148
|
+
const E_ = {
|
|
12149
12149
|
session: "session",
|
|
12150
12150
|
sessions: "session",
|
|
12151
12151
|
attachment: "attachment",
|
|
@@ -12164,7 +12164,7 @@ const k_ = {
|
|
|
12164
12164
|
log: "log_item"
|
|
12165
12165
|
};
|
|
12166
12166
|
function hl(t) {
|
|
12167
|
-
return
|
|
12167
|
+
return E_[t];
|
|
12168
12168
|
}
|
|
12169
12169
|
function Mu(t) {
|
|
12170
12170
|
if (!t?.sdk)
|
|
@@ -12207,7 +12207,7 @@ function yn(t) {
|
|
|
12207
12207
|
e(t);
|
|
12208
12208
|
});
|
|
12209
12209
|
}
|
|
12210
|
-
function
|
|
12210
|
+
function ks(t) {
|
|
12211
12211
|
return new Wt((e, n) => {
|
|
12212
12212
|
n(t);
|
|
12213
12213
|
});
|
|
@@ -12513,7 +12513,7 @@ function qu(t, e) {
|
|
|
12513
12513
|
return Jt().captureEvent(t, e);
|
|
12514
12514
|
}
|
|
12515
12515
|
function _l(t) {
|
|
12516
|
-
const e = Ur(), n = Jt(), { userAgent: r } = Z.navigator || {}, s =
|
|
12516
|
+
const e = Ur(), n = Jt(), { userAgent: r } = Z.navigator || {}, s = Em({
|
|
12517
12517
|
user: n.getUser() || e.getUser(),
|
|
12518
12518
|
...r && { userAgent: r },
|
|
12519
12519
|
...t
|
|
@@ -12665,7 +12665,7 @@ function nv(t) {
|
|
|
12665
12665
|
measurements: t.measurements
|
|
12666
12666
|
};
|
|
12667
12667
|
}
|
|
12668
|
-
const wl = "Not capturing exception because it's already been captured.",
|
|
12668
|
+
const wl = "Not capturing exception because it's already been captured.", kl = "Discarded session because of missing or non-string release", Ku = Symbol.for("SentryInternalError"), Vu = Symbol.for("SentryDoNotSendEventError");
|
|
12669
12669
|
function as(t) {
|
|
12670
12670
|
return {
|
|
12671
12671
|
message: t,
|
|
@@ -12678,7 +12678,7 @@ function _i(t) {
|
|
|
12678
12678
|
[Vu]: !0
|
|
12679
12679
|
};
|
|
12680
12680
|
}
|
|
12681
|
-
function
|
|
12681
|
+
function El(t) {
|
|
12682
12682
|
return !!t && typeof t == "object" && Ku in t;
|
|
12683
12683
|
}
|
|
12684
12684
|
function Sl(t) {
|
|
@@ -12873,7 +12873,7 @@ class rv {
|
|
|
12873
12873
|
this.emit("beforeSendEvent", e, n);
|
|
12874
12874
|
let r = A_(e, this._dsn, this._options._metadata, this._options.tunnel);
|
|
12875
12875
|
for (const i of n.attachments || [])
|
|
12876
|
-
r = b_(r,
|
|
12876
|
+
r = b_(r, k_(i));
|
|
12877
12877
|
const s = this.sendEnvelope(r);
|
|
12878
12878
|
s && s.then((i) => this.emit("afterSendEvent", e, i), null);
|
|
12879
12879
|
}
|
|
@@ -12885,13 +12885,13 @@ class rv {
|
|
|
12885
12885
|
if ("aggregates" in e) {
|
|
12886
12886
|
const i = e.attrs || {};
|
|
12887
12887
|
if (!i.release && !n) {
|
|
12888
|
-
D && C.warn(
|
|
12888
|
+
D && C.warn(kl);
|
|
12889
12889
|
return;
|
|
12890
12890
|
}
|
|
12891
12891
|
i.release = i.release || n, i.environment = i.environment || r, e.attrs = i;
|
|
12892
12892
|
} else {
|
|
12893
12893
|
if (!e.release && !n) {
|
|
12894
|
-
D && C.warn(
|
|
12894
|
+
D && C.warn(kl);
|
|
12895
12895
|
return;
|
|
12896
12896
|
}
|
|
12897
12897
|
e.release = e.release || n, e.environment = e.environment || r;
|
|
@@ -13025,7 +13025,7 @@ class rv {
|
|
|
13025
13025
|
return D && Ki(e) && C.log(`Captured error event \`${Gu(e)[0] || "<unknown>"}\``), this._processEvent(e, n, r, s).then(
|
|
13026
13026
|
(i) => i.event_id,
|
|
13027
13027
|
(i) => {
|
|
13028
|
-
D && (Sl(i) ? C.log(i.message) :
|
|
13028
|
+
D && (Sl(i) ? C.log(i.message) : El(i) ? C.warn(i.message) : C.warn(i));
|
|
13029
13029
|
}
|
|
13030
13030
|
);
|
|
13031
13031
|
}
|
|
@@ -13045,7 +13045,7 @@ class rv {
|
|
|
13045
13045
|
_processEvent(e, n, r, s) {
|
|
13046
13046
|
const i = this.getOptions(), { sampleRate: a } = i, o = Ju(e), l = Ki(e), c = e.type || "error", u = `before send for type \`${c}\``, d = typeof a > "u" ? void 0 : Jm(a);
|
|
13047
13047
|
if (l && typeof d == "number" && Math.random() > d)
|
|
13048
|
-
return this.recordDroppedEvent("sample_rate", "error"),
|
|
13048
|
+
return this.recordDroppedEvent("sample_rate", "error"), ks(
|
|
13049
13049
|
_i(
|
|
13050
13050
|
`Discarding event because it's not included in the random sample (sampling rate = ${a})`
|
|
13051
13051
|
)
|
|
@@ -13081,7 +13081,7 @@ class rv {
|
|
|
13081
13081
|
}
|
|
13082
13082
|
return this.sendEvent(f, n), f;
|
|
13083
13083
|
}).then(null, (f) => {
|
|
13084
|
-
throw Sl(f) ||
|
|
13084
|
+
throw Sl(f) || El(f) ? f : (this.captureException(f, {
|
|
13085
13085
|
data: {
|
|
13086
13086
|
__sentry__: !0
|
|
13087
13087
|
},
|
|
@@ -13243,7 +13243,7 @@ function dv(t) {
|
|
|
13243
13243
|
}
|
|
13244
13244
|
function s(a) {
|
|
13245
13245
|
if (!n())
|
|
13246
|
-
return
|
|
13246
|
+
return ks(Xu);
|
|
13247
13247
|
const o = a();
|
|
13248
13248
|
return e.indexOf(o) === -1 && e.push(o), o.then(() => r(o)).then(
|
|
13249
13249
|
null,
|
|
@@ -13362,18 +13362,18 @@ function wv(t, e, n = [e], r = "npm") {
|
|
|
13362
13362
|
version: fn
|
|
13363
13363
|
}), t._metadata = s;
|
|
13364
13364
|
}
|
|
13365
|
-
const
|
|
13365
|
+
const kv = 100;
|
|
13366
13366
|
function wn(t, e) {
|
|
13367
13367
|
const n = Ne(), r = Ur();
|
|
13368
13368
|
if (!n) return;
|
|
13369
|
-
const { beforeBreadcrumb: s = null, maxBreadcrumbs: i =
|
|
13369
|
+
const { beforeBreadcrumb: s = null, maxBreadcrumbs: i = kv } = n.getOptions();
|
|
13370
13370
|
if (i <= 0) return;
|
|
13371
13371
|
const o = { timestamp: jr(), ...t }, l = s ? or(() => s(o, e)) : o;
|
|
13372
13372
|
l !== null && (n.emit && n.emit("beforeAddBreadcrumb", l, e), r.addBreadcrumb(l, i));
|
|
13373
13373
|
}
|
|
13374
13374
|
let Tl;
|
|
13375
|
-
const
|
|
13376
|
-
name:
|
|
13375
|
+
const Ev = "FunctionToString", xl = /* @__PURE__ */ new WeakMap(), Sv = (() => ({
|
|
13376
|
+
name: Ev,
|
|
13377
13377
|
setupOnce() {
|
|
13378
13378
|
Tl = Function.prototype.toString;
|
|
13379
13379
|
try {
|
|
@@ -13466,7 +13466,7 @@ Event: ${on(
|
|
|
13466
13466
|
Event: ${on(
|
|
13467
13467
|
t
|
|
13468
13468
|
)}.
|
|
13469
|
-
Url: ${
|
|
13469
|
+
Url: ${Es(t)}`
|
|
13470
13470
|
), !0;
|
|
13471
13471
|
if (!Nv(t, e.allowUrls))
|
|
13472
13472
|
return D && C.warn(
|
|
@@ -13474,7 +13474,7 @@ Url: ${ks(t)}`
|
|
|
13474
13474
|
Event: ${on(
|
|
13475
13475
|
t
|
|
13476
13476
|
)}.
|
|
13477
|
-
Url: ${
|
|
13477
|
+
Url: ${Es(t)}`
|
|
13478
13478
|
), !0;
|
|
13479
13479
|
}
|
|
13480
13480
|
return !1;
|
|
@@ -13491,13 +13491,13 @@ function Cv(t, e) {
|
|
|
13491
13491
|
function Pv(t, e) {
|
|
13492
13492
|
if (!e?.length)
|
|
13493
13493
|
return !1;
|
|
13494
|
-
const n =
|
|
13494
|
+
const n = Es(t);
|
|
13495
13495
|
return n ? Ks(n, e) : !1;
|
|
13496
13496
|
}
|
|
13497
13497
|
function Nv(t, e) {
|
|
13498
13498
|
if (!e?.length)
|
|
13499
13499
|
return !0;
|
|
13500
|
-
const n =
|
|
13500
|
+
const n = Es(t);
|
|
13501
13501
|
return n ? Ks(n, e) : !0;
|
|
13502
13502
|
}
|
|
13503
13503
|
function Lv(t = []) {
|
|
@@ -13508,7 +13508,7 @@ function Lv(t = []) {
|
|
|
13508
13508
|
}
|
|
13509
13509
|
return null;
|
|
13510
13510
|
}
|
|
13511
|
-
function
|
|
13511
|
+
function Es(t) {
|
|
13512
13512
|
try {
|
|
13513
13513
|
const n = [...t.exception?.values ?? []].reverse().find((r) => r.mechanism?.parent_id === void 0 && r.stacktrace?.frames?.length)?.stacktrace?.frames;
|
|
13514
13514
|
return n ? Lv(n) : null;
|
|
@@ -14092,15 +14092,15 @@ function wb(t) {
|
|
|
14092
14092
|
}
|
|
14093
14093
|
return !0;
|
|
14094
14094
|
}
|
|
14095
|
-
function
|
|
14095
|
+
function kb(t, e) {
|
|
14096
14096
|
return t !== "keypress" ? !1 : e?.tagName ? !(e.tagName === "INPUT" || e.tagName === "TEXTAREA" || e.isContentEditable) : !0;
|
|
14097
14097
|
}
|
|
14098
14098
|
function Pl(t, e = !1) {
|
|
14099
14099
|
return (n) => {
|
|
14100
14100
|
if (!n || n._sentryCaptured)
|
|
14101
14101
|
return;
|
|
14102
|
-
const r =
|
|
14103
|
-
if (
|
|
14102
|
+
const r = Eb(n);
|
|
14103
|
+
if (kb(n.type, r))
|
|
14104
14104
|
return;
|
|
14105
14105
|
bn(n, "_sentryCaptured", !0), r && !r._sentryId && bn(r, "_sentryId", Qe());
|
|
14106
14106
|
const s = n.type === "keypress" ? "input" : n.type;
|
|
@@ -14109,7 +14109,7 @@ function Pl(t, e = !1) {
|
|
|
14109
14109
|
}, vb);
|
|
14110
14110
|
};
|
|
14111
14111
|
}
|
|
14112
|
-
function
|
|
14112
|
+
function Eb(t) {
|
|
14113
14113
|
try {
|
|
14114
14114
|
return t.target;
|
|
14115
14115
|
} catch {
|
|
@@ -14265,7 +14265,7 @@ function Ib(t, e = xb("fetch")) {
|
|
|
14265
14265
|
...t.fetchOptions
|
|
14266
14266
|
};
|
|
14267
14267
|
if (!e)
|
|
14268
|
-
return Nl("fetch"),
|
|
14268
|
+
return Nl("fetch"), ks("No fetch implementation available");
|
|
14269
14269
|
try {
|
|
14270
14270
|
return e(t.url, o).then((l) => (n -= a, r--, {
|
|
14271
14271
|
statusCode: l.status,
|
|
@@ -14275,7 +14275,7 @@ function Ib(t, e = xb("fetch")) {
|
|
|
14275
14275
|
}
|
|
14276
14276
|
}));
|
|
14277
14277
|
} catch (l) {
|
|
14278
|
-
return Nl("fetch"), n -= a, r--,
|
|
14278
|
+
return Nl("fetch"), n -= a, r--, ks(l);
|
|
14279
14279
|
}
|
|
14280
14280
|
}
|
|
14281
14281
|
return vv(t, s);
|
|
@@ -14315,7 +14315,7 @@ const Pb = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, Nb = /^\s*at (?:(.+?\)(?: \
|
|
|
14315
14315
|
let r = e[3], s = e[1] || vn;
|
|
14316
14316
|
return [s, r] = sd(s, r), ta(r, s, e[4] ? +e[4] : void 0, e[5] ? +e[5] : void 0);
|
|
14317
14317
|
}
|
|
14318
|
-
}, Bb = [Cb, Mb], qb = [Db, Bb], Hb =
|
|
14318
|
+
}, Bb = [Cb, Mb], qb = [Db, Bb], Hb = ku(...qb), sd = (t, e) => {
|
|
14319
14319
|
const n = t.indexOf("safari-extension") !== -1, r = t.indexOf("safari-web-extension") !== -1;
|
|
14320
14320
|
return n || r ? [
|
|
14321
14321
|
t.indexOf("@") !== -1 ? t.split("@")[0] : vn,
|
|
@@ -14779,8 +14779,8 @@ const _y = () => ({
|
|
|
14779
14779
|
);
|
|
14780
14780
|
}
|
|
14781
14781
|
};
|
|
14782
|
-
}),
|
|
14783
|
-
function
|
|
14782
|
+
}), ky = wy;
|
|
14783
|
+
function Ey() {
|
|
14784
14784
|
return Sy() ? (Js && or(() => {
|
|
14785
14785
|
console.error(
|
|
14786
14786
|
"[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/"
|
|
@@ -14805,14 +14805,14 @@ function Ty(t) {
|
|
|
14805
14805
|
ny(),
|
|
14806
14806
|
id(),
|
|
14807
14807
|
dy(),
|
|
14808
|
-
|
|
14808
|
+
ky(),
|
|
14809
14809
|
Hv(),
|
|
14810
14810
|
_y(),
|
|
14811
14811
|
ly()
|
|
14812
14812
|
];
|
|
14813
14813
|
}
|
|
14814
14814
|
function xy(t = {}) {
|
|
14815
|
-
const e = !t.skipBrowserExtensionCheck &&
|
|
14815
|
+
const e = !t.skipBrowserExtensionCheck && Ey(), n = {
|
|
14816
14816
|
...t,
|
|
14817
14817
|
enabled: e ? !1 : t.enabled,
|
|
14818
14818
|
stackParser: sm(t.stackParser || Hb),
|
|
@@ -15119,26 +15119,26 @@ function ew() {
|
|
|
15119
15119
|
*/
|
|
15120
15120
|
clone: function g(p, y) {
|
|
15121
15121
|
y = y || {};
|
|
15122
|
-
var
|
|
15122
|
+
var k, b;
|
|
15123
15123
|
switch (o.util.type(p)) {
|
|
15124
15124
|
case "Object":
|
|
15125
15125
|
if (b = o.util.objId(p), y[b])
|
|
15126
15126
|
return y[b];
|
|
15127
|
-
|
|
15128
|
-
{}, y[b] =
|
|
15129
|
-
for (var
|
|
15130
|
-
p.hasOwnProperty(
|
|
15127
|
+
k = /** @type {Record<string, any>} */
|
|
15128
|
+
{}, y[b] = k;
|
|
15129
|
+
for (var E in p)
|
|
15130
|
+
p.hasOwnProperty(E) && (k[E] = g(p[E], y));
|
|
15131
15131
|
return (
|
|
15132
15132
|
/** @type {any} */
|
|
15133
|
-
|
|
15133
|
+
k
|
|
15134
15134
|
);
|
|
15135
15135
|
case "Array":
|
|
15136
|
-
return b = o.util.objId(p), y[b] ? y[b] : (
|
|
15136
|
+
return b = o.util.objId(p), y[b] ? y[b] : (k = [], y[b] = k, /** @type {Array} */
|
|
15137
15137
|
/** @type {any} */
|
|
15138
15138
|
p.forEach(function(A, T) {
|
|
15139
|
-
|
|
15139
|
+
k[T] = g(A, y);
|
|
15140
15140
|
}), /** @type {any} */
|
|
15141
|
-
|
|
15141
|
+
k);
|
|
15142
15142
|
default:
|
|
15143
15143
|
return p;
|
|
15144
15144
|
}
|
|
@@ -15187,8 +15187,8 @@ function ew() {
|
|
|
15187
15187
|
);
|
|
15188
15188
|
try {
|
|
15189
15189
|
throw new Error();
|
|
15190
|
-
} catch (
|
|
15191
|
-
var g = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(
|
|
15190
|
+
} catch (k) {
|
|
15191
|
+
var g = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(k.stack) || [])[1];
|
|
15192
15192
|
if (g) {
|
|
15193
15193
|
var p = document.getElementsByTagName("script");
|
|
15194
15194
|
for (var y in p)
|
|
@@ -15218,11 +15218,11 @@ function ew() {
|
|
|
15218
15218
|
* @returns {boolean}
|
|
15219
15219
|
*/
|
|
15220
15220
|
isActive: function(g, p, y) {
|
|
15221
|
-
for (var
|
|
15221
|
+
for (var k = "no-" + p; g; ) {
|
|
15222
15222
|
var b = g.classList;
|
|
15223
15223
|
if (b.contains(p))
|
|
15224
15224
|
return !0;
|
|
15225
|
-
if (b.contains(
|
|
15225
|
+
if (b.contains(k))
|
|
15226
15226
|
return !1;
|
|
15227
15227
|
g = g.parentElement;
|
|
15228
15228
|
}
|
|
@@ -15274,8 +15274,8 @@ function ew() {
|
|
|
15274
15274
|
*/
|
|
15275
15275
|
extend: function(g, p) {
|
|
15276
15276
|
var y = o.util.clone(o.languages[g]);
|
|
15277
|
-
for (var
|
|
15278
|
-
y[
|
|
15277
|
+
for (var k in p)
|
|
15278
|
+
y[k] = p[k];
|
|
15279
15279
|
return y;
|
|
15280
15280
|
},
|
|
15281
15281
|
/**
|
|
@@ -15353,31 +15353,31 @@ function ew() {
|
|
|
15353
15353
|
* @returns {Grammar} The new grammar object.
|
|
15354
15354
|
* @public
|
|
15355
15355
|
*/
|
|
15356
|
-
insertBefore: function(g, p, y,
|
|
15357
|
-
|
|
15356
|
+
insertBefore: function(g, p, y, k) {
|
|
15357
|
+
k = k || /** @type {any} */
|
|
15358
15358
|
o.languages;
|
|
15359
|
-
var b =
|
|
15359
|
+
var b = k[g], E = {};
|
|
15360
15360
|
for (var A in b)
|
|
15361
15361
|
if (b.hasOwnProperty(A)) {
|
|
15362
15362
|
if (A == p)
|
|
15363
15363
|
for (var T in y)
|
|
15364
|
-
y.hasOwnProperty(T) && (
|
|
15365
|
-
y.hasOwnProperty(A) || (
|
|
15364
|
+
y.hasOwnProperty(T) && (E[T] = y[T]);
|
|
15365
|
+
y.hasOwnProperty(A) || (E[A] = b[A]);
|
|
15366
15366
|
}
|
|
15367
|
-
var x =
|
|
15368
|
-
return
|
|
15369
|
-
H === x && $ != g && (this[$] =
|
|
15370
|
-
}),
|
|
15367
|
+
var x = k[g];
|
|
15368
|
+
return k[g] = E, o.languages.DFS(o.languages, function($, H) {
|
|
15369
|
+
H === x && $ != g && (this[$] = E);
|
|
15370
|
+
}), E;
|
|
15371
15371
|
},
|
|
15372
15372
|
// Traverse a language definition with Depth First Search
|
|
15373
|
-
DFS: function g(p, y,
|
|
15373
|
+
DFS: function g(p, y, k, b) {
|
|
15374
15374
|
b = b || {};
|
|
15375
|
-
var
|
|
15375
|
+
var E = o.util.objId;
|
|
15376
15376
|
for (var A in p)
|
|
15377
15377
|
if (p.hasOwnProperty(A)) {
|
|
15378
|
-
y.call(p, A, p[A],
|
|
15378
|
+
y.call(p, A, p[A], k || A);
|
|
15379
15379
|
var T = p[A], x = o.util.type(T);
|
|
15380
|
-
x === "Object" && !b[
|
|
15380
|
+
x === "Object" && !b[E(T)] ? (b[E(T)] = !0, g(T, y, null, b)) : x === "Array" && !b[E(T)] && (b[E(T)] = !0, g(T, y, A, b));
|
|
15381
15381
|
}
|
|
15382
15382
|
}
|
|
15383
15383
|
},
|
|
@@ -15413,14 +15413,14 @@ function ew() {
|
|
|
15413
15413
|
* @public
|
|
15414
15414
|
*/
|
|
15415
15415
|
highlightAllUnder: function(g, p, y) {
|
|
15416
|
-
var
|
|
15416
|
+
var k = {
|
|
15417
15417
|
callback: y,
|
|
15418
15418
|
container: g,
|
|
15419
15419
|
selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
|
|
15420
15420
|
};
|
|
15421
|
-
o.hooks.run("before-highlightall",
|
|
15422
|
-
for (var b = 0,
|
|
15423
|
-
o.highlightElement(
|
|
15421
|
+
o.hooks.run("before-highlightall", k), k.elements = Array.prototype.slice.apply(k.container.querySelectorAll(k.selector)), o.hooks.run("before-all-elements-highlight", k);
|
|
15422
|
+
for (var b = 0, E; E = k.elements[b++]; )
|
|
15423
|
+
o.highlightElement(E, p === !0, k.callback);
|
|
15424
15424
|
},
|
|
15425
15425
|
/**
|
|
15426
15426
|
* Highlights the code inside a single element.
|
|
@@ -15451,20 +15451,20 @@ function ew() {
|
|
|
15451
15451
|
* @public
|
|
15452
15452
|
*/
|
|
15453
15453
|
highlightElement: function(g, p, y) {
|
|
15454
|
-
var
|
|
15455
|
-
o.util.setLanguage(g,
|
|
15456
|
-
var
|
|
15457
|
-
|
|
15454
|
+
var k = o.util.getLanguage(g), b = o.languages[k];
|
|
15455
|
+
o.util.setLanguage(g, k);
|
|
15456
|
+
var E = g.parentElement;
|
|
15457
|
+
E && E.nodeName.toLowerCase() === "pre" && o.util.setLanguage(E, k);
|
|
15458
15458
|
var A = g.textContent, T = {
|
|
15459
15459
|
element: g,
|
|
15460
|
-
language:
|
|
15460
|
+
language: k,
|
|
15461
15461
|
grammar: b,
|
|
15462
15462
|
code: A
|
|
15463
15463
|
};
|
|
15464
15464
|
function x(H) {
|
|
15465
15465
|
T.highlightedCode = H, o.hooks.run("before-insert", T), T.element.innerHTML = T.highlightedCode, o.hooks.run("after-highlight", T), o.hooks.run("complete", T), y && y.call(T.element);
|
|
15466
15466
|
}
|
|
15467
|
-
if (o.hooks.run("before-sanity-check", T),
|
|
15467
|
+
if (o.hooks.run("before-sanity-check", T), E = T.element.parentElement, E && E.nodeName.toLowerCase() === "pre" && !E.hasAttribute("tabindex") && E.setAttribute("tabindex", "0"), !T.code) {
|
|
15468
15468
|
o.hooks.run("complete", T), y && y.call(T.element);
|
|
15469
15469
|
return;
|
|
15470
15470
|
}
|
|
@@ -15505,14 +15505,14 @@ function ew() {
|
|
|
15505
15505
|
* Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
|
|
15506
15506
|
*/
|
|
15507
15507
|
highlight: function(g, p, y) {
|
|
15508
|
-
var
|
|
15508
|
+
var k = {
|
|
15509
15509
|
code: g,
|
|
15510
15510
|
grammar: p,
|
|
15511
15511
|
language: y
|
|
15512
15512
|
};
|
|
15513
|
-
if (o.hooks.run("before-tokenize",
|
|
15514
|
-
throw new Error('The language "' +
|
|
15515
|
-
return
|
|
15513
|
+
if (o.hooks.run("before-tokenize", k), !k.grammar)
|
|
15514
|
+
throw new Error('The language "' + k.language + '" has no grammar.');
|
|
15515
|
+
return k.tokens = o.tokenize(k.code, k.grammar), o.hooks.run("after-tokenize", k), l.stringify(o.util.encode(k.tokens), k.language);
|
|
15516
15516
|
},
|
|
15517
15517
|
/**
|
|
15518
15518
|
* This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
|
|
@@ -15541,8 +15541,8 @@ function ew() {
|
|
|
15541
15541
|
tokenize: function(g, p) {
|
|
15542
15542
|
var y = p.rest;
|
|
15543
15543
|
if (y) {
|
|
15544
|
-
for (var
|
|
15545
|
-
p[
|
|
15544
|
+
for (var k in y)
|
|
15545
|
+
p[k] = y[k];
|
|
15546
15546
|
delete p.rest;
|
|
15547
15547
|
}
|
|
15548
15548
|
var b = new d();
|
|
@@ -15583,24 +15583,24 @@ function ew() {
|
|
|
15583
15583
|
run: function(g, p) {
|
|
15584
15584
|
var y = o.hooks.all[g];
|
|
15585
15585
|
if (!(!y || !y.length))
|
|
15586
|
-
for (var
|
|
15586
|
+
for (var k = 0, b; b = y[k++]; )
|
|
15587
15587
|
b(p);
|
|
15588
15588
|
}
|
|
15589
15589
|
},
|
|
15590
15590
|
Token: l
|
|
15591
15591
|
};
|
|
15592
15592
|
r.Prism = o;
|
|
15593
|
-
function l(g, p, y,
|
|
15594
|
-
this.type = g, this.content = p, this.alias = y, this.length = (
|
|
15593
|
+
function l(g, p, y, k) {
|
|
15594
|
+
this.type = g, this.content = p, this.alias = y, this.length = (k || "").length | 0;
|
|
15595
15595
|
}
|
|
15596
15596
|
l.stringify = function g(p, y) {
|
|
15597
15597
|
if (typeof p == "string")
|
|
15598
15598
|
return p;
|
|
15599
15599
|
if (Array.isArray(p)) {
|
|
15600
|
-
var
|
|
15600
|
+
var k = "";
|
|
15601
15601
|
return p.forEach(function(x) {
|
|
15602
|
-
|
|
15603
|
-
}),
|
|
15602
|
+
k += g(x, y);
|
|
15603
|
+
}), k;
|
|
15604
15604
|
}
|
|
15605
15605
|
var b = {
|
|
15606
15606
|
type: p.type,
|
|
@@ -15609,36 +15609,36 @@ function ew() {
|
|
|
15609
15609
|
classes: ["token", p.type],
|
|
15610
15610
|
attributes: {},
|
|
15611
15611
|
language: y
|
|
15612
|
-
},
|
|
15613
|
-
|
|
15612
|
+
}, E = p.alias;
|
|
15613
|
+
E && (Array.isArray(E) ? Array.prototype.push.apply(b.classes, E) : b.classes.push(E)), o.hooks.run("wrap", b);
|
|
15614
15614
|
var A = "";
|
|
15615
15615
|
for (var T in b.attributes)
|
|
15616
15616
|
A += " " + T + '="' + (b.attributes[T] || "").replace(/"/g, """) + '"';
|
|
15617
15617
|
return "<" + b.tag + ' class="' + b.classes.join(" ") + '"' + A + ">" + b.content + "</" + b.tag + ">";
|
|
15618
15618
|
};
|
|
15619
|
-
function c(g, p, y,
|
|
15619
|
+
function c(g, p, y, k) {
|
|
15620
15620
|
g.lastIndex = p;
|
|
15621
15621
|
var b = g.exec(y);
|
|
15622
|
-
if (b &&
|
|
15623
|
-
var
|
|
15624
|
-
b.index +=
|
|
15622
|
+
if (b && k && b[1]) {
|
|
15623
|
+
var E = b[1].length;
|
|
15624
|
+
b.index += E, b[0] = b[0].slice(E);
|
|
15625
15625
|
}
|
|
15626
15626
|
return b;
|
|
15627
15627
|
}
|
|
15628
|
-
function u(g, p, y,
|
|
15628
|
+
function u(g, p, y, k, b, E) {
|
|
15629
15629
|
for (var A in y)
|
|
15630
15630
|
if (!(!y.hasOwnProperty(A) || !y[A])) {
|
|
15631
15631
|
var T = y[A];
|
|
15632
15632
|
T = Array.isArray(T) ? T : [T];
|
|
15633
15633
|
for (var x = 0; x < T.length; ++x) {
|
|
15634
|
-
if (
|
|
15634
|
+
if (E && E.cause == A + "," + x)
|
|
15635
15635
|
return;
|
|
15636
15636
|
var $ = T[x], H = $.inside, ce = !!$.lookbehind, we = !!$.greedy, ae = $.alias;
|
|
15637
15637
|
if (we && !$.pattern.global) {
|
|
15638
15638
|
var pe = $.pattern.toString().match(/[imsuy]*$/)[0];
|
|
15639
15639
|
$.pattern = RegExp($.pattern.source, pe + "g");
|
|
15640
15640
|
}
|
|
15641
|
-
for (var Fe = $.pattern || $, K =
|
|
15641
|
+
for (var Fe = $.pattern || $, K = k.next, oe = b; K !== p.tail && !(E && oe >= E.reach); oe += K.value.length, K = K.next) {
|
|
15642
15642
|
var ue = K.value;
|
|
15643
15643
|
if (p.length > g.length)
|
|
15644
15644
|
return;
|
|
@@ -15657,17 +15657,17 @@ function ew() {
|
|
|
15657
15657
|
de--, ue = g.slice(oe, R), re.index -= oe;
|
|
15658
15658
|
} else if (re = c(Fe, 0, ue, ce), !re)
|
|
15659
15659
|
continue;
|
|
15660
|
-
var B = re.index, te = re[0],
|
|
15661
|
-
|
|
15660
|
+
var B = re.index, te = re[0], Ee = ue.slice(0, B), ne = ue.slice(B + te.length), he = oe + ue.length;
|
|
15661
|
+
E && he > E.reach && (E.reach = he);
|
|
15662
15662
|
var tt = K.prev;
|
|
15663
|
-
|
|
15663
|
+
Ee && (tt = h(p, tt, Ee), oe += Ee.length), f(p, tt, de);
|
|
15664
15664
|
var se = new l(A, H ? o.tokenize(te, H) : te, ae, te);
|
|
15665
15665
|
if (K = h(p, tt, se), ne && h(p, K, ne), de > 1) {
|
|
15666
15666
|
var Yt = {
|
|
15667
15667
|
cause: A + "," + x,
|
|
15668
15668
|
reach: he
|
|
15669
15669
|
};
|
|
15670
|
-
u(g, p, y, K.prev, oe, Yt),
|
|
15670
|
+
u(g, p, y, K.prev, oe, Yt), E && Yt.reach > E.reach && (E.reach = Yt.reach);
|
|
15671
15671
|
}
|
|
15672
15672
|
}
|
|
15673
15673
|
}
|
|
@@ -15679,13 +15679,13 @@ function ew() {
|
|
|
15679
15679
|
g.next = p, this.head = g, this.tail = p, this.length = 0;
|
|
15680
15680
|
}
|
|
15681
15681
|
function h(g, p, y) {
|
|
15682
|
-
var
|
|
15683
|
-
return p.next = b,
|
|
15682
|
+
var k = p.next, b = { value: y, prev: p, next: k };
|
|
15683
|
+
return p.next = b, k.prev = b, g.length++, b;
|
|
15684
15684
|
}
|
|
15685
15685
|
function f(g, p, y) {
|
|
15686
|
-
for (var
|
|
15687
|
-
|
|
15688
|
-
p.next =
|
|
15686
|
+
for (var k = p.next, b = 0; b < y && k !== g.tail; b++)
|
|
15687
|
+
k = k.next;
|
|
15688
|
+
p.next = k, k.prev = p, g.length -= b;
|
|
15689
15689
|
}
|
|
15690
15690
|
function m(g) {
|
|
15691
15691
|
for (var p = [], y = g.head.next; y !== g.tail; )
|
|
@@ -15694,8 +15694,8 @@ function ew() {
|
|
|
15694
15694
|
}
|
|
15695
15695
|
if (!r.document)
|
|
15696
15696
|
return r.addEventListener && (o.disableWorkerMessageHandler || r.addEventListener("message", function(g) {
|
|
15697
|
-
var p = JSON.parse(g.data), y = p.language,
|
|
15698
|
-
r.postMessage(o.highlight(
|
|
15697
|
+
var p = JSON.parse(g.data), y = p.language, k = p.code, b = p.immediateClose;
|
|
15698
|
+
r.postMessage(o.highlight(k, o.languages[y], y)), b && r.close();
|
|
15699
15699
|
}, !1)), o;
|
|
15700
15700
|
var _ = o.util.currentScript();
|
|
15701
15701
|
_ && (o.filename = _.src, _.hasAttribute("data-manual") && (o.manual = !0));
|
|
@@ -16129,14 +16129,14 @@ function ew() {
|
|
|
16129
16129
|
p = a[y] || y;
|
|
16130
16130
|
}
|
|
16131
16131
|
n.util.setLanguage(S, p), n.util.setLanguage(v, p);
|
|
16132
|
-
var
|
|
16133
|
-
|
|
16132
|
+
var k = n.plugins.autoloader;
|
|
16133
|
+
k && k.loadLanguages(p), h(
|
|
16134
16134
|
g,
|
|
16135
16135
|
function(b) {
|
|
16136
16136
|
v.setAttribute(o, c);
|
|
16137
|
-
var
|
|
16138
|
-
if (
|
|
16139
|
-
var A = b.split(/\r\n?|\n/g), T =
|
|
16137
|
+
var E = f(v.getAttribute("data-range"));
|
|
16138
|
+
if (E) {
|
|
16139
|
+
var A = b.split(/\r\n?|\n/g), T = E[0], x = E[1] == null ? A.length : E[1];
|
|
16140
16140
|
T < 0 && (T += A.length), T = Math.max(0, Math.min(T - 1, A.length)), x < 0 && (x += A.length), x = Math.max(0, Math.min(x, A.length)), b = A.slice(T, x).join(`
|
|
16141
16141
|
`), v.hasAttribute("data-start") || v.setAttribute("data-start", String(T + 1));
|
|
16142
16142
|
}
|
|
@@ -16965,7 +16965,7 @@ function _w(t, e, n) {
|
|
|
16965
16965
|
}), i.unsubscribe();
|
|
16966
16966
|
};
|
|
16967
16967
|
}
|
|
16968
|
-
const vw = "knest-widget-chat-", bw = 14400 * 1e3, yw = 300,
|
|
16968
|
+
const vw = "knest-widget-chat-", bw = 14400 * 1e3, yw = 300, Er = /* @__PURE__ */ new Map();
|
|
16969
16969
|
function Ts(t) {
|
|
16970
16970
|
return vw + t;
|
|
16971
16971
|
}
|
|
@@ -16979,23 +16979,23 @@ function ww(t) {
|
|
|
16979
16979
|
return null;
|
|
16980
16980
|
}
|
|
16981
16981
|
}
|
|
16982
|
-
function
|
|
16982
|
+
function kw(t, e) {
|
|
16983
16983
|
try {
|
|
16984
16984
|
localStorage.setItem(Ts(t), JSON.stringify(e));
|
|
16985
16985
|
} catch {
|
|
16986
16986
|
}
|
|
16987
16987
|
}
|
|
16988
|
-
function
|
|
16989
|
-
const n =
|
|
16988
|
+
function Ew(t, e) {
|
|
16989
|
+
const n = Er.get(t);
|
|
16990
16990
|
n !== void 0 && clearTimeout(n);
|
|
16991
16991
|
const r = setTimeout(() => {
|
|
16992
|
-
|
|
16992
|
+
kw(t, e), Er.delete(t);
|
|
16993
16993
|
}, yw);
|
|
16994
|
-
|
|
16994
|
+
Er.set(t, r);
|
|
16995
16995
|
}
|
|
16996
16996
|
function Sw(t) {
|
|
16997
|
-
const e =
|
|
16998
|
-
e !== void 0 && (clearTimeout(e),
|
|
16997
|
+
const e = Er.get(t);
|
|
16998
|
+
e !== void 0 && (clearTimeout(e), Er.delete(t));
|
|
16999
16999
|
try {
|
|
17000
17000
|
localStorage.removeItem(Ts(t));
|
|
17001
17001
|
} catch {
|
|
@@ -17008,21 +17008,21 @@ function xw() {
|
|
|
17008
17008
|
function Vl() {
|
|
17009
17009
|
document.body.style.overflow = "";
|
|
17010
17010
|
}
|
|
17011
|
-
var Aw = /* @__PURE__ */ Y('<div class="user-avatar svelte-19vup0k">AI</div>'), Rw = /* @__PURE__ */ Y('<img alt="Avatar" class="avatar-img svelte-19vup0k"/>'), Ow = /* @__PURE__ */ Y('<div class="user-avatar svelte-19vup0k">U</div>'), Iw = /* @__PURE__ */ Y('<div class="message-avatar svelte-19vup0k"><!></div>'), $w = /* @__PURE__ */ Y('<div class="loading svelte-19vup0k"><div class="dot svelte-19vup0k"></div> <div class="dot svelte-19vup0k"></div> <div class="dot svelte-19vup0k"></div></div>'), Cw = /* @__PURE__ */ Y('<a target="_blank" rel="noopener noreferrer" class="attachment-image-link svelte-19vup0k"><img class="attachment-image svelte-19vup0k"/></a>'), Pw = /* @__PURE__ */ Y('<a target="_blank" rel="noopener noreferrer"><svg class="attachment-file-icon svelte-19vup0k" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" class="svelte-19vup0k"></path></svg> <span class="attachment-file-name svelte-19vup0k"> </span> <span class="attachment-file-size svelte-19vup0k"> </span></a>'), Nw = /* @__PURE__ */ Y('<div class="attachments svelte-19vup0k"></div>'), Lw = /* @__PURE__ */ Y('<div class="source-breadcrumb svelte-19vup0k"> </div>'), jw = /* @__PURE__ */ Y('<a target="_blank" rel="noopener noreferrer" class="source-item svelte-19vup0k"><svg class="source-icon svelte-19vup0k" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.746 0 3.332.477 4.5 1.253v13C19.832 18.477 18.246 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" class="svelte-19vup0k"></path></svg> <div class="source-text svelte-19vup0k"><!> <div class="source-title svelte-19vup0k"> </div></div></a>'), Dw = /* @__PURE__ */ Y('<div class="sources svelte-19vup0k"><div class="sources-label svelte-19vup0k">Sources</div> <!></div>'), Uw = /* @__PURE__ */ Y('<div class="message-wrapper svelte-19vup0k"><div class="message svelte-19vup0k"><!> <div class="message-content svelte-19vup0k"><!> <!> <!></div></div></div>');
|
|
17011
|
+
var Aw = /* @__PURE__ */ Y('<div class="knest-user-avatar svelte-19vup0k">AI</div>'), Rw = /* @__PURE__ */ Y('<img alt="Avatar" class="knest-avatar-img svelte-19vup0k"/>'), Ow = /* @__PURE__ */ Y('<div class="knest-user-avatar svelte-19vup0k">U</div>'), Iw = /* @__PURE__ */ Y('<div class="knest-message-avatar svelte-19vup0k"><!></div>'), $w = /* @__PURE__ */ Y('<div class="knest-loading svelte-19vup0k"><div class="knest-dot svelte-19vup0k"></div> <div class="knest-dot svelte-19vup0k"></div> <div class="knest-dot svelte-19vup0k"></div></div>'), Cw = /* @__PURE__ */ Y('<a target="_blank" rel="noopener noreferrer" class="knest-attachment-image-link svelte-19vup0k"><img class="knest-attachment-image svelte-19vup0k"/></a>'), Pw = /* @__PURE__ */ Y('<a target="_blank" rel="noopener noreferrer"><svg class="knest-attachment-file-icon svelte-19vup0k" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" class="svelte-19vup0k"></path></svg> <span class="knest-attachment-file-name svelte-19vup0k"> </span> <span class="knest-attachment-file-size svelte-19vup0k"> </span></a>'), Nw = /* @__PURE__ */ Y('<div class="knest-attachments svelte-19vup0k"></div>'), Lw = /* @__PURE__ */ Y('<div class="knest-source-breadcrumb svelte-19vup0k"> </div>'), jw = /* @__PURE__ */ Y('<a target="_blank" rel="noopener noreferrer" class="knest-source-item svelte-19vup0k"><svg class="knest-source-icon svelte-19vup0k" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.746 0 3.332.477 4.5 1.253v13C19.832 18.477 18.246 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" class="svelte-19vup0k"></path></svg> <div class="knest-source-text svelte-19vup0k"><!> <div class="knest-source-title svelte-19vup0k"> </div></div></a>'), Dw = /* @__PURE__ */ Y('<div class="knest-sources svelte-19vup0k"><div class="knest-sources-label svelte-19vup0k">Sources</div> <!></div>'), Uw = /* @__PURE__ */ Y('<div class="knest-message-wrapper svelte-19vup0k"><div class="knest-message svelte-19vup0k"><!> <div class="knest-message-content svelte-19vup0k"><!> <!> <!></div></div></div>');
|
|
17012
17012
|
const Fw = {
|
|
17013
17013
|
hash: "svelte-19vup0k",
|
|
17014
|
-
code: `.message-wrapper.svelte-19vup0k {display:flex;flex-direction:column;}.message.svelte-19vup0k {display:flex;gap:1rem;padding:1.25rem 1.5rem;align-items:center;}.message-avatar.svelte-19vup0k {display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;flex-shrink:0;}.avatar-img.svelte-19vup0k {width:100%;height:100%;border-radius:0.25rem;object-fit:contain;}.user-avatar.svelte-19vup0k {width:2rem;height:2rem;border-radius:0.25rem;display:flex;align-items:center;justify-content:center;color:white;font-size:0.875rem;font-weight:500;}.message-content.svelte-19vup0k {flex:1;min-width:0;}.message-content.svelte-19vup0k p {margin:0 0 0.5rem 0;font-size:0.875rem;line-height:1.625;color:inherit;word-wrap:break-word;}.message-content.svelte-19vup0k p:last-child {margin-bottom:0;}.message-content.svelte-19vup0k code {background-color:#f3f4f6;padding:0.125rem 0.375rem;border-radius:0.25rem;font-family:ui-monospace, monospace;font-size:0.8125rem;color:#ef4444;}.message-content.svelte-19vup0k pre {background-color:#1f2937;color:#f9fafb;padding:12px;border-radius:6px;overflow-x:auto;margin:8px 0;font-size:0.8125rem;line-height:1.5;}.message-content.svelte-19vup0k pre code {background-color:transparent;padding:0;color:inherit;font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;}
|
|
17014
|
+
code: `.knest-message-wrapper.svelte-19vup0k {display:flex;flex-direction:column;}.knest-message.svelte-19vup0k {display:flex;gap:1rem;padding:1.25rem 1.5rem;align-items:center;}.knest-message-avatar.svelte-19vup0k {display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;flex-shrink:0;}.knest-avatar-img.svelte-19vup0k {width:100%;height:100%;border-radius:0.25rem;object-fit:contain;}.knest-user-avatar.svelte-19vup0k {width:2rem;height:2rem;border-radius:0.25rem;display:flex;align-items:center;justify-content:center;color:white;font-size:0.875rem;font-weight:500;}.knest-message-content.svelte-19vup0k {flex:1;min-width:0;}.knest-message-content.svelte-19vup0k p {margin:0 0 0.5rem 0;font-size:0.875rem;line-height:1.625;color:inherit;word-wrap:break-word;}.knest-message-content.svelte-19vup0k p:last-child {margin-bottom:0;}.knest-message-content.svelte-19vup0k code {background-color:#f3f4f6;padding:0.125rem 0.375rem;border-radius:0.25rem;font-family:ui-monospace, monospace;font-size:0.8125rem;color:#ef4444;}.knest-message-content.svelte-19vup0k pre {background-color:#1f2937;color:#f9fafb;padding:12px;border-radius:6px;overflow-x:auto;margin:8px 0;font-size:0.8125rem;line-height:1.5;}.knest-message-content.svelte-19vup0k pre code {background-color:transparent;padding:0;color:inherit;font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;}
|
|
17015
17015
|
|
|
17016
|
-
/* Prism.js syntax highlighting - GitHub Dark theme */.message-content.svelte-19vup0k .token.keyword,
|
|
17017
|
-
.message-content.svelte-19vup0k .token.builtin,
|
|
17018
|
-
.message-content.svelte-19vup0k .token.tag {color:#ff7b72;}.message-content.svelte-19vup0k .token.string,
|
|
17019
|
-
.message-content.svelte-19vup0k .token.attr-value {color:#a5d6ff;}.message-content.svelte-19vup0k .token.number,
|
|
17020
|
-
.message-content.svelte-19vup0k .token.boolean {color:#79c0ff;}.message-content.svelte-19vup0k .token.function,
|
|
17021
|
-
.message-content.svelte-19vup0k .token.class-name {color:#d2a8ff;}.message-content.svelte-19vup0k .token.comment {color:#8b949e;font-style:italic;}.message-content.svelte-19vup0k .token.variable,
|
|
17022
|
-
.message-content.svelte-19vup0k .token.property {color:#ffa657;}.message-content.svelte-19vup0k .token.operator,
|
|
17023
|
-
.message-content.svelte-19vup0k .token.punctuation {color:#c9d1d9;}.message-content.svelte-19vup0k a {color:inherit;text-decoration:underline;}.message-content.svelte-19vup0k ul,
|
|
17024
|
-
.message-content.svelte-19vup0k ol {margin:8px 0;padding-left:24px;}.message-content.svelte-19vup0k li {margin:4px 0;color:inherit;}.message-content.svelte-19vup0k strong {font-weight:600;color:inherit;}.message-content.svelte-19vup0k em {font-style:italic;}.loading.svelte-19vup0k {display:flex;gap:0.25rem;align-items:center;}.dot.svelte-19vup0k {width:0.5rem;height:0.5rem;background:#9ca3af;border-radius:50%;
|
|
17025
|
-
animation: svelte-19vup0k-bounce 1.4s infinite ease-in-out both;}.dot.svelte-19vup0k:nth-child(2) {animation-delay:0.16s;}.dot.svelte-19vup0k:nth-child(3) {animation-delay:0.32s;}
|
|
17016
|
+
/* Prism.js syntax highlighting - GitHub Dark theme */.knest-message-content.svelte-19vup0k .token.keyword,
|
|
17017
|
+
.knest-message-content.svelte-19vup0k .token.builtin,
|
|
17018
|
+
.knest-message-content.svelte-19vup0k .token.tag {color:#ff7b72;}.knest-message-content.svelte-19vup0k .token.string,
|
|
17019
|
+
.knest-message-content.svelte-19vup0k .token.attr-value {color:#a5d6ff;}.knest-message-content.svelte-19vup0k .token.number,
|
|
17020
|
+
.knest-message-content.svelte-19vup0k .token.boolean {color:#79c0ff;}.knest-message-content.svelte-19vup0k .token.function,
|
|
17021
|
+
.knest-message-content.svelte-19vup0k .token.class-name {color:#d2a8ff;}.knest-message-content.svelte-19vup0k .token.comment {color:#8b949e;font-style:italic;}.knest-message-content.svelte-19vup0k .token.variable,
|
|
17022
|
+
.knest-message-content.svelte-19vup0k .token.property {color:#ffa657;}.knest-message-content.svelte-19vup0k .token.operator,
|
|
17023
|
+
.knest-message-content.svelte-19vup0k .token.punctuation {color:#c9d1d9;}.knest-message-content.svelte-19vup0k a {color:inherit;text-decoration:underline;}.knest-message-content.svelte-19vup0k ul,
|
|
17024
|
+
.knest-message-content.svelte-19vup0k ol {margin:8px 0;padding-left:24px;}.knest-message-content.svelte-19vup0k li {margin:4px 0;font-size:0.875rem;color:inherit;}.knest-message-content.svelte-19vup0k strong {font-weight:600;color:inherit;}.knest-message-content.svelte-19vup0k em {font-style:italic;}.knest-loading.svelte-19vup0k {display:flex;gap:0.25rem;align-items:center;}.knest-dot.svelte-19vup0k {width:0.5rem;height:0.5rem;background:#9ca3af;border-radius:50%;
|
|
17025
|
+
animation: svelte-19vup0k-bounce 1.4s infinite ease-in-out both;}.knest-dot.svelte-19vup0k:nth-child(2) {animation-delay:0.16s;}.knest-dot.svelte-19vup0k:nth-child(3) {animation-delay:0.32s;}
|
|
17026
17026
|
|
|
17027
17027
|
@keyframes svelte-19vup0k-bounce {
|
|
17028
17028
|
0%,
|
|
@@ -17033,7 +17033,7 @@ const Fw = {
|
|
|
17033
17033
|
40% {
|
|
17034
17034
|
transform: scale(1);
|
|
17035
17035
|
}
|
|
17036
|
-
}.attachments.svelte-19vup0k {display:flex;flex-direction:column;gap:0.5rem;margin-top:0.5rem;}.attachment-image-link.svelte-19vup0k {display:inline-block;}.attachment-image.svelte-19vup0k {max-width:240px;border-radius:0.5rem;display:block;}.attachment-file.svelte-19vup0k {display:inline-flex;align-items:center;gap:0.375rem;padding:0.375rem 0.625rem;border:1px solid #e5e7eb;border-radius:9999px;background:#f9fafb;text-decoration:none;font-size:0.8125rem;color:#374151;transition:background 0.15s;}.attachment-file.svelte-19vup0k:hover:not(.disabled) {background:#f3f4f6;}.attachment-file.disabled.svelte-19vup0k {opacity:0.5;pointer-events:none;}.attachment-file-icon.svelte-19vup0k {width:0.875rem;height:0.875rem;color:#6b7280;flex-shrink:0;}.attachment-file-name.svelte-19vup0k {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:160px;}.attachment-file-size.svelte-19vup0k {color:#9ca3af;flex-shrink:0;}.sources.svelte-19vup0k {margin-top:0.75rem;}.sources-label.svelte-19vup0k {font-size:0.75rem;font-weight:500;color:#6b7280;margin-bottom:0.5rem;}.source-item.svelte-19vup0k {display:flex;gap:0.5rem;padding:0.5rem 0.75rem;margin-bottom:0.25rem;border:1px solid #e5e7eb;border-radius:0.375rem;background:#f9fafb;text-decoration:none;transition:all 0.15s;}.source-item.svelte-19vup0k:hover {border-color:#d1d5db;background:#f3f4f6;}.source-icon.svelte-19vup0k {width:1rem;height:1rem;color:#6b7280;flex-shrink:0;}.source-text.svelte-19vup0k {flex:1;min-width:0;}.source-breadcrumb.svelte-19vup0k {font-size:0.75rem;color:#6b7280;margin-bottom:0.125rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.source-title.svelte-19vup0k {font-size:0.875rem;font-weight:500;color:#374151;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}`
|
|
17036
|
+
}.knest-attachments.svelte-19vup0k {display:flex;flex-direction:column;gap:0.5rem;margin-top:0.5rem;}.knest-attachment-image-link.svelte-19vup0k {display:inline-block;}.knest-attachment-image.svelte-19vup0k {max-width:240px;border-radius:0.5rem;display:block;}.knest-attachment-file.svelte-19vup0k {display:inline-flex;align-items:center;gap:0.375rem;padding:0.375rem 0.625rem;border:1px solid #e5e7eb;border-radius:9999px;background:#f9fafb;text-decoration:none;font-size:0.8125rem;color:#374151;transition:background 0.15s;}.knest-attachment-file.svelte-19vup0k:hover:not(.knest-disabled) {background:#f3f4f6;}.knest-attachment-file.knest-disabled.svelte-19vup0k {opacity:0.5;pointer-events:none;}.knest-attachment-file-icon.svelte-19vup0k {width:0.875rem;height:0.875rem;color:#6b7280;flex-shrink:0;}.knest-attachment-file-name.svelte-19vup0k {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:160px;}.knest-attachment-file-size.svelte-19vup0k {color:#9ca3af;flex-shrink:0;}.knest-sources.svelte-19vup0k {margin-top:0.75rem;}.knest-sources-label.svelte-19vup0k {font-size:0.75rem;font-weight:500;color:#6b7280;margin-bottom:0.5rem;}.knest-source-item.svelte-19vup0k {display:flex;gap:0.5rem;padding:0.5rem 0.75rem;margin-bottom:0.25rem;border:1px solid #e5e7eb;border-radius:0.375rem;background:#f9fafb;text-decoration:none;transition:all 0.15s;}.knest-source-item.svelte-19vup0k:hover {border-color:#d1d5db;background:#f3f4f6;}.knest-source-icon.svelte-19vup0k {width:1rem;height:1rem;color:#6b7280;flex-shrink:0;}.knest-source-text.svelte-19vup0k {flex:1;min-width:0;}.knest-source-breadcrumb.svelte-19vup0k {font-size:0.75rem;color:#6b7280;margin-bottom:0.125rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.knest-source-title.svelte-19vup0k {font-size:0.875rem;font-weight:500;color:#374151;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}`
|
|
17037
17037
|
};
|
|
17038
17038
|
function hd(t, e) {
|
|
17039
17039
|
Is(e, !0), Mc(t, Fw);
|
|
@@ -17108,7 +17108,7 @@ function hd(t, e) {
|
|
|
17108
17108
|
xe(() => hs(de, `background-color: ${i() ?? ""}`)), L(ue, de);
|
|
17109
17109
|
}, oe = (ue) => {
|
|
17110
17110
|
var de = Rw();
|
|
17111
|
-
xe(() => Xe(de, "src", s())), jc("error", de, d),
|
|
17111
|
+
xe(() => Xe(de, "src", s())), jc("error", de, d), Eh(de), L(ue, de);
|
|
17112
17112
|
};
|
|
17113
17113
|
le(Fe, (ue) => {
|
|
17114
17114
|
w(c) ? ue(K) : ue(oe, !1);
|
|
@@ -17134,17 +17134,17 @@ function hd(t, e) {
|
|
|
17134
17134
|
var y = (x) => {
|
|
17135
17135
|
var $ = $w();
|
|
17136
17136
|
L(x, $);
|
|
17137
|
-
},
|
|
17137
|
+
}, k = (x) => {
|
|
17138
17138
|
var $ = Tt(), H = it($);
|
|
17139
17139
|
Nh(H, () => ow(n().content)), L(x, $);
|
|
17140
17140
|
};
|
|
17141
17141
|
le(p, (x) => {
|
|
17142
|
-
!n().content && r() && n().role === "assistant" ? x(y) : x(
|
|
17142
|
+
!n().content && r() && n().role === "assistant" ? x(y) : x(k, !1);
|
|
17143
17143
|
});
|
|
17144
17144
|
}
|
|
17145
17145
|
var b = ee(p, 2);
|
|
17146
17146
|
{
|
|
17147
|
-
var
|
|
17147
|
+
var E = (x) => {
|
|
17148
17148
|
var $ = Nw();
|
|
17149
17149
|
vr($, 21, () => n().attachments, (H) => H.storagePath, (H, ce) => {
|
|
17150
17150
|
var we = Tt(), ae = it(we);
|
|
@@ -17155,9 +17155,9 @@ function hd(t, e) {
|
|
|
17155
17155
|
var Le = Tt(), R = it(Le);
|
|
17156
17156
|
{
|
|
17157
17157
|
var F = (B) => {
|
|
17158
|
-
var te = Cw(),
|
|
17158
|
+
var te = Cw(), Ee = J(te);
|
|
17159
17159
|
z(te), xe(() => {
|
|
17160
|
-
Xe(te, "href", w(re)), Xe(
|
|
17160
|
+
Xe(te, "href", w(re)), Xe(Ee, "src", w(re)), Xe(Ee, "alt", w(ce).fileName);
|
|
17161
17161
|
}), L(B, te);
|
|
17162
17162
|
};
|
|
17163
17163
|
le(R, (B) => {
|
|
@@ -17173,13 +17173,13 @@ function hd(t, e) {
|
|
|
17173
17173
|
let R;
|
|
17174
17174
|
var F = ee(J(Le), 2), B = J(F, !0);
|
|
17175
17175
|
z(F);
|
|
17176
|
-
var te = ee(F, 2),
|
|
17176
|
+
var te = ee(F, 2), Ee = J(te, !0);
|
|
17177
17177
|
z(te), z(Le), xe(
|
|
17178
17178
|
(ne, he) => {
|
|
17179
|
-
Xe(Le, "href", w(re) || "#"), R = Bc(Le, 1, "attachment-file svelte-19vup0k", null, R, ne), _t(B, w(ce).fileName), _t(
|
|
17179
|
+
Xe(Le, "href", w(re) || "#"), R = Bc(Le, 1, "knest-attachment-file svelte-19vup0k", null, R, ne), _t(B, w(ce).fileName), _t(Ee, he);
|
|
17180
17180
|
},
|
|
17181
17181
|
[
|
|
17182
|
-
() => ({ disabled: !w(re) }),
|
|
17182
|
+
() => ({ "knest-disabled": !w(re) }),
|
|
17183
17183
|
() => lw(w(ce).fileSize)
|
|
17184
17184
|
]
|
|
17185
17185
|
), L(de, Le);
|
|
@@ -17193,7 +17193,7 @@ function hd(t, e) {
|
|
|
17193
17193
|
}), z($), L(x, $);
|
|
17194
17194
|
};
|
|
17195
17195
|
le(b, (x) => {
|
|
17196
|
-
n().attachments && n().attachments.length > 0 && x(
|
|
17196
|
+
n().attachments && n().attachments.length > 0 && x(E);
|
|
17197
17197
|
});
|
|
17198
17198
|
}
|
|
17199
17199
|
var A = ee(b, 2);
|
|
@@ -17250,27 +17250,27 @@ function Mw(t, e, n, r, s, i, a, o, l, c) {
|
|
|
17250
17250
|
!0
|
|
17251
17251
|
), O(i, ""), O(a, [], !0), O(o, null), O(l, !1), O(c, !1);
|
|
17252
17252
|
}
|
|
17253
|
-
var Bw = /* @__PURE__ */ Y('<div class="loading-container svelte-7fg7a1"><div class="loading-content svelte-7fg7a1"><div class="spinner-ring svelte-7fg7a1"></div> <p class="loading-text svelte-7fg7a1">Loading chat...</p></div></div>'), qw = /* @__PURE__ */ Y('<div class="error-container svelte-7fg7a1"><div class="error-content svelte-7fg7a1"><p class="error-text svelte-7fg7a1"> </p></div></div>'), Hw = /* @__PURE__ */ Y('<div class="separator svelte-7fg7a1"></div>'), zw = /* @__PURE__ */ Y("<!> <!>", 1), Ww = (t, e, n) => e(w(n)), Gw = /* @__PURE__ */ Y('<button class="example-btn svelte-7fg7a1"> </button>'), Kw = /* @__PURE__ */ Y('<div class="examples svelte-7fg7a1"><h3 class="svelte-7fg7a1">Example Questions</h3> <!></div>'), Vw = /* @__PURE__ */ Y('<p class="human-takeover-caption svelte-7fg7a1"> </p>'), Jw = /* @__PURE__ */ Y('<p class="presence-caption svelte-7fg7a1"><span class="online-dot svelte-7fg7a1"></span> </p>'), Yw = /* @__PURE__ */ Y('<span class="file-chip svelte-7fg7a1"> <button type="button" class="chip-remove svelte-7fg7a1">×</button></span>'), Xw = /* @__PURE__ */ Y('<div class="file-preview svelte-7fg7a1"></div>'), Zw = /* @__PURE__ */ Y('<p class="attach-error svelte-7fg7a1"> </p>'), Qw = (t, e) => w(e)?.click(), e0 = (t, e) => e(), t0 = /* @__PURE__ */ Y('<div class="reset-row svelte-7fg7a1"><button class="reset-btn svelte-7fg7a1">Clear chat</button></div>'), n0 = /* @__PURE__ */ Y('<div class="footer svelte-7fg7a1"><a href="https://useknest.com" target="_blank" rel="noopener noreferrer" class="powered-by svelte-7fg7a1"><span>Powered by</span> <svg width="14" height="14" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="16" cy="16" r="3" fill="currentColor"></circle><path d="M16 6 A10 10 0 0 1 26 16" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" fill="none"></path><path d="M26 16 A10 10 0 0 1 16 26" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" fill="none"></path><path d="M16 26 A10 10 0 0 1 6 16" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" fill="none"></path><path d="M6 16 A10 10 0 0 1 16 6" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" fill="none"></path><circle cx="16" cy="5" r="2" fill="currentColor"></circle><circle cx="27" cy="16" r="2" fill="currentColor"></circle><circle cx="16" cy="27" r="2" fill="currentColor"></circle><circle cx="5" cy="16" r="2" fill="currentColor"></circle><circle cx="23" cy="9" r="1.5" fill="currentColor"></circle><circle cx="23" cy="23" r="1.5" fill="currentColor"></circle><circle cx="9" cy="23" r="1.5" fill="currentColor"></circle><circle cx="9" cy="9" r="1.5" fill="currentColor"></circle></svg> <span>Knest</span></a></div>'), r0 = /* @__PURE__ */ Y('<div class="messages-container svelte-7fg7a1"><!> <!> <!> <div class="svelte-7fg7a1"></div></div> <div class="input-section svelte-7fg7a1"><!> <input type="file" multiple style="display:none"/> <!> <!> <div class="input-wrapper svelte-7fg7a1"><input type="text" placeholder="Ask me anything..." class="input-field svelte-7fg7a1"/> <button class="attach-btn svelte-7fg7a1" type="button" aria-label="Attach file"><svg class="attach-icon svelte-7fg7a1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13"></path></svg></button> <button class="send-btn svelte-7fg7a1" aria-label="Send message"><svg class="send-icon svelte-7fg7a1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8"></path></svg></button></div> <!> <!></div>', 1), s0 = /* @__PURE__ */ Y('<div class="chat-card svelte-7fg7a1"><!></div>'), i0 = (t, e) => O(e, !1), a0 = /* @__PURE__ */ Y('<div class="bubble-panel svelte-7fg7a1"><button class="bubble-close-btn svelte-7fg7a1" aria-label="Close chat"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg></button> <!></div>'), o0 = (t, e) => O(e, !w(e)), l0 = /* @__PURE__ */ ga('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" class="bubble-spinner svelte-7fg7a1"><circle cx="12" cy="12" r="9" stroke="currentColor" stroke-opacity="0.25" stroke-width="3" fill="none"></circle><path d="M12 3a9 9 0 0 1 9 9" stroke="currentColor" stroke-width="3" stroke-linecap="round" fill="none"></path></svg>'), c0 = /* @__PURE__ */ ga('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg>'), u0 = /* @__PURE__ */ ga('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"></path></svg>'), d0 = /* @__PURE__ */ Y('<div><!> <button class="bubble-button svelte-7fg7a1"><!></button></div>');
|
|
17253
|
+
var Bw = /* @__PURE__ */ Y('<div class="knest-loading-container svelte-7fg7a1"><div class="knest-loading-content svelte-7fg7a1"><div class="knest-spinner-ring svelte-7fg7a1"></div> <p class="knest-loading-text svelte-7fg7a1">Loading chat...</p></div></div>'), qw = /* @__PURE__ */ Y('<div class="knest-error-container svelte-7fg7a1"><div class="knest-error-content svelte-7fg7a1"><p class="knest-error-text svelte-7fg7a1"> </p></div></div>'), Hw = /* @__PURE__ */ Y('<div class="knest-separator svelte-7fg7a1"></div>'), zw = /* @__PURE__ */ Y("<!> <!>", 1), Ww = (t, e, n) => e(w(n)), Gw = /* @__PURE__ */ Y('<button class="knest-example-btn svelte-7fg7a1"> </button>'), Kw = /* @__PURE__ */ Y('<div class="knest-examples svelte-7fg7a1"><h3 class="svelte-7fg7a1">Example Questions</h3> <!></div>'), Vw = /* @__PURE__ */ Y('<p class="knest-human-takeover-caption svelte-7fg7a1"> </p>'), Jw = /* @__PURE__ */ Y('<p class="knest-presence-caption svelte-7fg7a1"><span class="knest-online-dot svelte-7fg7a1"></span> </p>'), Yw = /* @__PURE__ */ Y('<span class="knest-file-chip svelte-7fg7a1"> <button type="button" class="knest-chip-remove svelte-7fg7a1">×</button></span>'), Xw = /* @__PURE__ */ Y('<div class="knest-file-preview svelte-7fg7a1"></div>'), Zw = /* @__PURE__ */ Y('<p class="knest-attach-error svelte-7fg7a1"> </p>'), Qw = (t, e) => w(e)?.click(), e0 = (t, e) => e(), t0 = /* @__PURE__ */ Y('<div class="knest-reset-row svelte-7fg7a1"><button class="knest-reset-btn svelte-7fg7a1">Clear chat</button></div>'), n0 = /* @__PURE__ */ Y('<div class="knest-footer svelte-7fg7a1"><a href="https://useknest.com" target="_blank" rel="noopener noreferrer" class="knest-powered-by svelte-7fg7a1"><span>Powered by</span> <svg width="14" height="14" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="16" cy="16" r="3" fill="currentColor"></circle><path d="M16 6 A10 10 0 0 1 26 16" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" fill="none"></path><path d="M26 16 A10 10 0 0 1 16 26" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" fill="none"></path><path d="M16 26 A10 10 0 0 1 6 16" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" fill="none"></path><path d="M6 16 A10 10 0 0 1 16 6" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" fill="none"></path><circle cx="16" cy="5" r="2" fill="currentColor"></circle><circle cx="27" cy="16" r="2" fill="currentColor"></circle><circle cx="16" cy="27" r="2" fill="currentColor"></circle><circle cx="5" cy="16" r="2" fill="currentColor"></circle><circle cx="23" cy="9" r="1.5" fill="currentColor"></circle><circle cx="23" cy="23" r="1.5" fill="currentColor"></circle><circle cx="9" cy="23" r="1.5" fill="currentColor"></circle><circle cx="9" cy="9" r="1.5" fill="currentColor"></circle></svg> <span>Knest</span></a></div>'), r0 = /* @__PURE__ */ Y('<div class="knest-messages-container svelte-7fg7a1"><!> <!> <!> <div class="svelte-7fg7a1"></div></div> <div class="knest-input-section svelte-7fg7a1"><!> <input type="file" multiple style="display:none"/> <!> <!> <div class="knest-input-wrapper svelte-7fg7a1"><input type="text" placeholder="Ask me anything..." class="knest-input-field svelte-7fg7a1"/> <button class="knest-attach-btn svelte-7fg7a1" type="button" aria-label="Attach file"><svg class="knest-attach-icon svelte-7fg7a1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13"></path></svg></button> <button class="knest-send-btn svelte-7fg7a1" aria-label="Send message"><svg class="knest-send-icon svelte-7fg7a1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8"></path></svg></button></div> <!> <!></div>', 1), s0 = /* @__PURE__ */ Y('<div class="knest-chat-card svelte-7fg7a1"><!></div>'), i0 = (t, e) => O(e, !1), a0 = /* @__PURE__ */ Y('<div class="knest-bubble-panel svelte-7fg7a1"><button class="knest-bubble-close-btn svelte-7fg7a1" aria-label="Close chat"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg></button> <!></div>'), o0 = (t, e) => O(e, !w(e)), l0 = /* @__PURE__ */ ga('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" class="knest-bubble-spinner svelte-7fg7a1"><circle cx="12" cy="12" r="9" stroke="currentColor" stroke-opacity="0.25" stroke-width="3" fill="none"></circle><path d="M12 3a9 9 0 0 1 9 9" stroke="currentColor" stroke-width="3" stroke-linecap="round" fill="none"></path></svg>'), c0 = /* @__PURE__ */ ga('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg>'), u0 = /* @__PURE__ */ ga('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"></path></svg>'), d0 = /* @__PURE__ */ Y('<div><!> <button class="knest-bubble-button svelte-7fg7a1"><!></button></div>');
|
|
17254
17254
|
const h0 = {
|
|
17255
17255
|
hash: "svelte-7fg7a1",
|
|
17256
17256
|
code: `:host {display:block;font-family:system-ui,
|
|
17257
17257
|
-apple-system,
|
|
17258
|
-
sans-serif;}.chat-card.svelte-7fg7a1 {display:flex;flex-direction:column;height:600px;background:white;color:#374151;border-radius:1rem;box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1);overflow:hidden;}.loading-container.svelte-7fg7a1 {display:flex;align-items:center;justify-content:center;height:100%;background:linear-gradient(135deg, #fdfbf7 0%, #ffffff 100%);}.loading-content.svelte-7fg7a1 {display:flex;flex-direction:column;align-items:center;gap:1.5rem;}.spinner-ring.svelte-7fg7a1 {width:3rem;height:3rem;border:3px solid #f3f4f6;border-top-color:#3b82f6;border-radius:50%;
|
|
17258
|
+
sans-serif;}.knest-chat-card.svelte-7fg7a1 {display:flex;flex-direction:column;height:600px;background:white;color:#374151;border-radius:1rem;box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1);overflow:hidden;}.knest-loading-container.svelte-7fg7a1 {display:flex;align-items:center;justify-content:center;height:100%;background:linear-gradient(135deg, #fdfbf7 0%, #ffffff 100%);}.knest-loading-content.svelte-7fg7a1 {display:flex;flex-direction:column;align-items:center;gap:1.5rem;}.knest-spinner-ring.svelte-7fg7a1 {width:3rem;height:3rem;border:3px solid #f3f4f6;border-top-color:#3b82f6;border-radius:50%;
|
|
17259
17259
|
animation: svelte-7fg7a1-spin 0.8s linear infinite;}
|
|
17260
17260
|
|
|
17261
17261
|
@keyframes svelte-7fg7a1-spin {
|
|
17262
17262
|
to {
|
|
17263
17263
|
transform: rotate(360deg);
|
|
17264
17264
|
}
|
|
17265
|
-
}.loading-text.svelte-7fg7a1 {font-size:0.875rem;font-weight:500;color:#6b7280;margin:0;}.error-container.svelte-7fg7a1 {display:flex;align-items:center;justify-content:center;height:100%;background:linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);padding:2rem;}.error-content.svelte-7fg7a1 {text-align:center;max-width:300px;}.error-text.svelte-7fg7a1 {font-size:0.875rem;color:#991b1b;margin:0;line-height:1.5;}.messages-container.svelte-7fg7a1 {flex:1;overflow-y:auto;}.separator.svelte-7fg7a1 {margin:0 1.5rem;border-bottom:1px solid #e5e7eb;}.examples.svelte-7fg7a1 {border-top:1px solid #e5e7eb;padding:1.25rem 1.5rem;}.examples.svelte-7fg7a1 h3:where(.svelte-7fg7a1) {font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:#6b7280;margin:0 0 1rem 0;}.example-btn.svelte-7fg7a1 {width:100%;padding:0.75rem;margin-bottom:0.75rem;border:1px solid #e5e7eb;border-radius:0.5rem;background:white;text-align:left;font-size:0.875rem;color:#374151;cursor:pointer;transition:background 0.15s;}.example-btn.svelte-7fg7a1:hover {background:#f9fafb;}.presence-caption.svelte-7fg7a1 {display:flex;align-items:center;gap:0.375rem;font-size:0.75rem;color:#6b7280;margin:0 0 0.375rem 0;}.online-dot.svelte-7fg7a1 {display:inline-block;width:8px;height:8px;border-radius:50%;background:#22c55e;flex-shrink:0;}.human-takeover-caption.svelte-7fg7a1 {font-size:0.75rem;color:#9ca3af;text-align:center;margin:0.75rem 0 0 0;}.input-section.svelte-7fg7a1 {border-top:1px solid #f3f4f6;padding:1rem;}.input-wrapper.svelte-7fg7a1 {display:flex;align-items:center;gap:0.5rem;}.input-field.svelte-7fg7a1 {flex:1;padding:0.75rem 1rem;border:1px solid #e5e7eb;border-radius:0.5rem;background:#f9fafb;font-size:0.875rem;color:#374151;outline:none;}.input-field.svelte-7fg7a1:focus {background:white;border-color:#d1d5db;}.input-field.svelte-7fg7a1:disabled {opacity:0.5;}.attach-btn.svelte-7fg7a1 {width:2.5rem;height:2.5rem;display:flex;align-items:center;justify-content:center;border:none;border-radius:0.5rem;background:#e5e7eb;color:#6b7280;cursor:pointer;transition:background 0.15s;flex-shrink:0;}.attach-btn.svelte-7fg7a1:hover:not(:disabled) {background:#d1d5db;}.attach-btn.svelte-7fg7a1:disabled {opacity:0.4;cursor:not-allowed;}.attach-icon.svelte-7fg7a1 {width:1rem;height:1rem;}.file-preview.svelte-7fg7a1 {display:flex;flex-wrap:wrap;gap:0.375rem;margin-bottom:0.5rem;}.file-chip.svelte-7fg7a1 {display:inline-flex;align-items:center;gap:0.25rem;padding:0.25rem 0.5rem;background:#f3f4f6;border:1px solid #e5e7eb;border-radius:9999px;font-size:0.75rem;color:#374151;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.chip-remove.svelte-7fg7a1 {background:none;border:none;padding:0;font-size:1rem;line-height:1;color:#9ca3af;cursor:pointer;flex-shrink:0;}.chip-remove.svelte-7fg7a1:hover {color:#374151;}.attach-error.svelte-7fg7a1 {font-size:0.75rem;color:#dc2626;margin:0 0 0.375rem 0;}.send-btn.svelte-7fg7a1 {width:2.5rem;height:2.5rem;display:flex;align-items:center;justify-content:center;border:none;border-radius:0.5rem;background:#e5e7eb;color:#6b7280;cursor:pointer;transition:background 0.15s;}.send-btn.svelte-7fg7a1:hover:not(:disabled) {background:#d1d5db;}.send-btn.svelte-7fg7a1:disabled {opacity:0.5;cursor:not-allowed;}.send-icon.svelte-7fg7a1 {width:1rem;height:1rem;}.reset-row.svelte-7fg7a1 {display:flex;justify-content:center;margin-top:0.5rem;}.reset-btn.svelte-7fg7a1 {background:none;border:none;padding:0;font-size:0.75rem;color:#9ca3af;cursor:pointer;transition:color 0.15s;}.reset-btn.svelte-7fg7a1:hover {color:#6b7280;}.footer.svelte-7fg7a1 {margin-top:0.75rem;display:flex;justify-content:center;}.powered-by.svelte-7fg7a1 {display:flex;align-items:center;gap:0.125rem;font-size:0.75rem;color:#6b7280;text-decoration:none;transition:color 0.15s;}.powered-by.svelte-7fg7a1:hover {color:#374151;text-decoration:underline;}
|
|
17265
|
+
}.knest-loading-text.svelte-7fg7a1 {font-size:0.875rem;font-weight:500;color:#6b7280;margin:0;}.knest-error-container.svelte-7fg7a1 {display:flex;align-items:center;justify-content:center;height:100%;background:linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);padding:2rem;}.knest-error-content.svelte-7fg7a1 {text-align:center;max-width:300px;}.knest-error-text.svelte-7fg7a1 {font-size:0.875rem;color:#991b1b;margin:0;line-height:1.5;}.knest-messages-container.svelte-7fg7a1 {flex:1;overflow-y:auto;}.knest-separator.svelte-7fg7a1 {margin:0 1.5rem;border-bottom:1px solid #e5e7eb;}.knest-examples.svelte-7fg7a1 {border-top:1px solid #e5e7eb;padding:1.25rem 1.5rem;}.knest-examples.svelte-7fg7a1 h3:where(.svelte-7fg7a1) {font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:#6b7280;margin:0 0 1rem 0;}.knest-example-btn.svelte-7fg7a1 {width:100%;padding:0.75rem;margin-bottom:0.75rem;border:1px solid #e5e7eb;border-radius:0.5rem;background:white;text-align:left;font-size:0.875rem;color:#374151;cursor:pointer;transition:background 0.15s;}.knest-example-btn.svelte-7fg7a1:hover {background:#f9fafb;}.knest-presence-caption.svelte-7fg7a1 {display:flex;align-items:center;gap:0.375rem;font-size:0.75rem;color:#6b7280;margin:0 0 0.375rem 0;}.knest-online-dot.svelte-7fg7a1 {display:inline-block;width:8px;height:8px;border-radius:50%;background:#22c55e;flex-shrink:0;}.knest-human-takeover-caption.svelte-7fg7a1 {font-size:0.75rem;color:#9ca3af;text-align:center;margin:0.75rem 0 0 0;}.knest-input-section.svelte-7fg7a1 {border-top:1px solid #f3f4f6;padding:1rem;}.knest-input-wrapper.svelte-7fg7a1 {display:flex;align-items:center;gap:0.5rem;}.knest-input-field.svelte-7fg7a1 {flex:1;padding:0.75rem 1rem;border:1px solid #e5e7eb;border-radius:0.5rem;background:#f9fafb;font-size:0.875rem;color:#374151;outline:none;}.knest-input-field.svelte-7fg7a1:focus {background:white;border-color:#d1d5db;}.knest-input-field.svelte-7fg7a1:disabled {opacity:0.5;}.knest-attach-btn.svelte-7fg7a1 {width:2.5rem;height:2.5rem;display:flex;align-items:center;justify-content:center;border:none;border-radius:0.5rem;background:#e5e7eb;color:#6b7280;cursor:pointer;transition:background 0.15s;flex-shrink:0;}.knest-attach-btn.svelte-7fg7a1:hover:not(:disabled) {background:#d1d5db;}.knest-attach-btn.svelte-7fg7a1:disabled {opacity:0.4;cursor:not-allowed;}.knest-attach-icon.svelte-7fg7a1 {width:1rem;height:1rem;}.knest-file-preview.svelte-7fg7a1 {display:flex;flex-wrap:wrap;gap:0.375rem;margin-bottom:0.5rem;}.knest-file-chip.svelte-7fg7a1 {display:inline-flex;align-items:center;gap:0.25rem;padding:0.25rem 0.5rem;background:#f3f4f6;border:1px solid #e5e7eb;border-radius:9999px;font-size:0.75rem;color:#374151;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.knest-chip-remove.svelte-7fg7a1 {background:none;border:none;padding:0;font-size:1rem;line-height:1;color:#9ca3af;cursor:pointer;flex-shrink:0;}.knest-chip-remove.svelte-7fg7a1:hover {color:#374151;}.knest-attach-error.svelte-7fg7a1 {font-size:0.75rem;color:#dc2626;margin:0 0 0.375rem 0;}.knest-send-btn.svelte-7fg7a1 {width:2.5rem;height:2.5rem;display:flex;align-items:center;justify-content:center;border:none;border-radius:0.5rem;background:#e5e7eb;color:#6b7280;cursor:pointer;transition:background 0.15s;}.knest-send-btn.svelte-7fg7a1:hover:not(:disabled) {background:#d1d5db;}.knest-send-btn.svelte-7fg7a1:disabled {opacity:0.5;cursor:not-allowed;}.knest-send-icon.svelte-7fg7a1 {width:1rem;height:1rem;}.knest-reset-row.svelte-7fg7a1 {display:flex;justify-content:center;margin-top:0.5rem;}.knest-reset-btn.svelte-7fg7a1 {background:none;border:none;padding:0;font-size:0.75rem;color:#9ca3af;cursor:pointer;transition:color 0.15s;}.knest-reset-btn.svelte-7fg7a1:hover {color:#6b7280;}.knest-footer.svelte-7fg7a1 {margin-top:0.75rem;display:flex;justify-content:center;}.knest-powered-by.svelte-7fg7a1 {display:flex;align-items:center;gap:0.125rem;font-size:0.75rem;color:#6b7280;text-decoration:none;transition:color 0.15s;}.knest-powered-by.svelte-7fg7a1:hover {color:#374151;text-decoration:underline;}
|
|
17266
17266
|
|
|
17267
|
-
/* Bubble Mode */.bubble-container.svelte-7fg7a1 {position:fixed;bottom:24px;right:24px;z-index:2147483647; /* WIDGET_Z_INDEX from widget-core/constants.ts */display:flex;flex-direction:column;align-items:flex-end;gap:16px;}.bubble-button.svelte-7fg7a1 {width:56px;height:56px;border-radius:50%;border:none;color:white;cursor:pointer;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);display:flex;align-items:center;justify-content:center;transition:transform 0.2s,
|
|
17268
|
-
box-shadow 0.2s;}.bubble-button.svelte-7fg7a1:hover {transform:scale(1.05);box-shadow:0 6px 16px rgba(0, 0, 0, 0.2);}.bubble-spinner.svelte-7fg7a1 {
|
|
17269
|
-
animation: svelte-7fg7a1-spin 1s linear infinite;}.bubble-panel.svelte-7fg7a1 {position:relative;width:380px;height:520px;max-width:calc(100vw - 48px);max-height:calc(100vh - 100px);border-radius:1rem;border:1px solid rgba(0, 0, 0, 0.1);box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1);overflow:hidden;}.bubble-panel.svelte-7fg7a1 .chat-card:where(.svelte-7fg7a1) {height:100%;}.bubble-close-btn.svelte-7fg7a1 {display:none;position:absolute;top:0.75rem;right:0.75rem;z-index:2147483646; /* WIDGET_CLOSE_BTN_Z_INDEX from widget-core/constants.ts */width:2rem;height:2rem;align-items:center;justify-content:center;border:none;border-radius:50%;background:rgba(0, 0, 0, 0.06);color:#374151;cursor:pointer;}.bubble-close-btn.svelte-7fg7a1:hover {background:rgba(0, 0, 0, 0.12);}
|
|
17267
|
+
/* Bubble Mode */.knest-bubble-container.svelte-7fg7a1 {position:fixed;bottom:24px;right:24px;z-index:2147483647; /* WIDGET_Z_INDEX from widget-core/constants.ts */display:flex;flex-direction:column;align-items:flex-end;gap:16px;}.knest-bubble-button.svelte-7fg7a1 {width:56px;height:56px;border-radius:50%;border:none;color:white;cursor:pointer;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);display:flex;align-items:center;justify-content:center;transition:transform 0.2s,
|
|
17268
|
+
box-shadow 0.2s;}.knest-bubble-button.svelte-7fg7a1:hover {transform:scale(1.05);box-shadow:0 6px 16px rgba(0, 0, 0, 0.2);}.knest-bubble-spinner.svelte-7fg7a1 {
|
|
17269
|
+
animation: svelte-7fg7a1-spin 1s linear infinite;}.knest-bubble-panel.svelte-7fg7a1 {position:relative;width:380px;height:520px;max-width:calc(100vw - 48px);max-height:calc(100vh - 100px);border-radius:1rem;border:1px solid rgba(0, 0, 0, 0.1);box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1);overflow:hidden;}.knest-bubble-panel.svelte-7fg7a1 .knest-chat-card:where(.svelte-7fg7a1) {height:100%;}.knest-bubble-close-btn.svelte-7fg7a1 {display:none;position:absolute;top:0.75rem;right:0.75rem;z-index:2147483646; /* WIDGET_CLOSE_BTN_Z_INDEX from widget-core/constants.ts */width:2rem;height:2rem;align-items:center;justify-content:center;border:none;border-radius:50%;background:rgba(0, 0, 0, 0.06);color:#374151;cursor:pointer;}.knest-bubble-close-btn.svelte-7fg7a1:hover {background:rgba(0, 0, 0, 0.12);}
|
|
17270
17270
|
|
|
17271
|
-
@media (max-width: 440px) {.bubble-container.bubble-open.svelte-7fg7a1 {inset:0;bottom:0;right:0;}.bubble-container.bubble-open.svelte-7fg7a1 .bubble-button:where(.svelte-7fg7a1) {display:none;}.bubble-panel.svelte-7fg7a1 {width:100%;height:100dvh;max-width:none;max-height:none;border-radius:0;border:none;box-shadow:none;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);}.bubble-panel.svelte-7fg7a1 .chat-card:where(.svelte-7fg7a1) {border-radius:0;box-shadow:none;}.bubble-close-btn.svelte-7fg7a1 {display:flex;}.bubble-panel.svelte-7fg7a1 .messages-container:where(.svelte-7fg7a1) > :where(.svelte-7fg7a1):first-child {padding-right:2.5rem;}
|
|
17271
|
+
@media (max-width: 440px) {.knest-bubble-container.knest-bubble-open.svelte-7fg7a1 {inset:0;bottom:0;right:0;}.knest-bubble-container.knest-bubble-open.svelte-7fg7a1 .knest-bubble-button:where(.svelte-7fg7a1) {display:none;}.knest-bubble-panel.svelte-7fg7a1 {width:100%;height:100dvh;max-width:none;max-height:none;border-radius:0;border:none;box-shadow:none;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);}.knest-bubble-panel.svelte-7fg7a1 .knest-chat-card:where(.svelte-7fg7a1) {border-radius:0;box-shadow:none;}.knest-bubble-close-btn.svelte-7fg7a1 {display:flex;}.knest-bubble-panel.svelte-7fg7a1 .knest-messages-container:where(.svelte-7fg7a1) > :where(.svelte-7fg7a1):first-child {padding-right:2.5rem;}
|
|
17272
17272
|
|
|
17273
|
-
/* iOS Safari auto-zooms on inputs with font-size < 16px. */.input-field.svelte-7fg7a1 {font-size:1rem;}
|
|
17273
|
+
/* iOS Safari auto-zooms on inputs with font-size < 16px. */.knest-input-field.svelte-7fg7a1 {font-size:1rem;}
|
|
17274
17274
|
}`
|
|
17275
17275
|
};
|
|
17276
17276
|
function fd(t, e) {
|
|
@@ -17281,15 +17281,15 @@ function fd(t, e) {
|
|
|
17281
17281
|
var te = (ne) => {
|
|
17282
17282
|
var he = Bw();
|
|
17283
17283
|
L(ne, he);
|
|
17284
|
-
},
|
|
17284
|
+
}, Ee = (ne) => {
|
|
17285
17285
|
var he = Tt(), tt = it(he);
|
|
17286
17286
|
{
|
|
17287
17287
|
var se = (ve) => {
|
|
17288
|
-
var Oe = qw(), nt = J(Oe),
|
|
17289
|
-
z(
|
|
17288
|
+
var Oe = qw(), nt = J(Oe), kt = J(nt), $n = J(kt, !0);
|
|
17289
|
+
z(kt), z(nt), z(Oe), xe(() => _t($n, od)), L(ve, Oe);
|
|
17290
17290
|
}, Yt = (ve) => {
|
|
17291
|
-
var Oe = r0(), nt = it(Oe),
|
|
17292
|
-
vr(
|
|
17291
|
+
var Oe = r0(), nt = it(Oe), kt = J(nt);
|
|
17292
|
+
vr(kt, 19, () => w(_), (j, V) => j.id ?? V, (j, V, Me) => {
|
|
17293
17293
|
var Xt = zw(), Zt = it(Xt);
|
|
17294
17294
|
{
|
|
17295
17295
|
let ft = /* @__PURE__ */ Pn(() => !w(V).content && w(S) && w(V).role === "assistant"), Qs = /* @__PURE__ */ Pn(() => o()?.baseUrl);
|
|
@@ -17326,7 +17326,7 @@ function fd(t, e) {
|
|
|
17326
17326
|
}
|
|
17327
17327
|
L(j, Xt);
|
|
17328
17328
|
});
|
|
17329
|
-
var $n = ee(
|
|
17329
|
+
var $n = ee(kt, 2);
|
|
17330
17330
|
{
|
|
17331
17331
|
var jt = (j) => {
|
|
17332
17332
|
var V = Kw(), Me = ee(J(V), 2);
|
|
@@ -17371,7 +17371,7 @@ function fd(t, e) {
|
|
|
17371
17371
|
{
|
|
17372
17372
|
var _d = (j) => {
|
|
17373
17373
|
var V = Xw();
|
|
17374
|
-
vr(V, 21, () => w(
|
|
17374
|
+
vr(V, 21, () => w(E), lo, (Me, Xt, Zt) => {
|
|
17375
17375
|
var Qt = Yw(), ht = J(Qt), ft = ee(ht);
|
|
17376
17376
|
ft.__click = () => ae(Zt), z(Qt), xe(() => {
|
|
17377
17377
|
_t(ht, `${w(Xt).name ?? ""} `), Xe(ft, "aria-label", `Remove ${w(Xt).name ?? ""}`);
|
|
@@ -17379,7 +17379,7 @@ function fd(t, e) {
|
|
|
17379
17379
|
}), z(V), L(j, V);
|
|
17380
17380
|
};
|
|
17381
17381
|
le(Ka, (j) => {
|
|
17382
|
-
w(
|
|
17382
|
+
w(E).length > 0 && j(_d);
|
|
17383
17383
|
});
|
|
17384
17384
|
}
|
|
17385
17385
|
var Va = ee(Ka, 2);
|
|
@@ -17409,7 +17409,7 @@ function fd(t, e) {
|
|
|
17409
17409
|
_,
|
|
17410
17410
|
l,
|
|
17411
17411
|
v,
|
|
17412
|
-
|
|
17412
|
+
E,
|
|
17413
17413
|
T,
|
|
17414
17414
|
$,
|
|
17415
17415
|
H
|
|
@@ -17449,17 +17449,17 @@ function fd(t, e) {
|
|
|
17449
17449
|
L(ne, he);
|
|
17450
17450
|
};
|
|
17451
17451
|
le(B, (ne) => {
|
|
17452
|
-
w(c) ? ne(te) : ne(
|
|
17452
|
+
w(c) ? ne(te) : ne(Ee, !1);
|
|
17453
17453
|
});
|
|
17454
17454
|
}
|
|
17455
17455
|
z(F), L(R, F);
|
|
17456
17456
|
};
|
|
17457
|
-
let r = Se(e, "publishableApiKey"), s = Se(e, "mode", 7, Ss), i = Se(e, "defaultOpen", 7, !1), a = Se(e, "user"), o = Se(e, "_internal"), l = /* @__PURE__ */ X(null), c = /* @__PURE__ */ X(!0), u = /* @__PURE__ */ X(null), d = /* @__PURE__ */ X(!1), h = /* @__PURE__ */ Pn(() => w(l)?.avatarUrl || Py), f = /* @__PURE__ */ Pn(() => w(l)?.exampleQuestions || Ny), m = /* @__PURE__ */ Pn(() => w(l)?.brandColor || na), _ = /* @__PURE__ */ X(xt([])), v = /* @__PURE__ */ X(""), S = /* @__PURE__ */ X(!1), g = /* @__PURE__ */ X(void 0), p = /* @__PURE__ */ X(void 0), y = /* @__PURE__ */ X(xt(i())),
|
|
17457
|
+
let r = Se(e, "publishableApiKey"), s = Se(e, "mode", 7, Ss), i = Se(e, "defaultOpen", 7, !1), a = Se(e, "user"), o = Se(e, "_internal"), l = /* @__PURE__ */ X(null), c = /* @__PURE__ */ X(!0), u = /* @__PURE__ */ X(null), d = /* @__PURE__ */ X(!1), h = /* @__PURE__ */ Pn(() => w(l)?.avatarUrl || Py), f = /* @__PURE__ */ Pn(() => w(l)?.exampleQuestions || Ny), m = /* @__PURE__ */ Pn(() => w(l)?.brandColor || na), _ = /* @__PURE__ */ X(xt([])), v = /* @__PURE__ */ X(""), S = /* @__PURE__ */ X(!1), g = /* @__PURE__ */ X(void 0), p = /* @__PURE__ */ X(void 0), y = /* @__PURE__ */ X(xt(i())), k = /* @__PURE__ */ X(!1), b = null, E = /* @__PURE__ */ X(xt([])), A = /* @__PURE__ */ X(!1), T = /* @__PURE__ */ X(null), x = /* @__PURE__ */ X(void 0), $ = /* @__PURE__ */ X(!1), H = /* @__PURE__ */ X(!1);
|
|
17458
17458
|
$h(() => {
|
|
17459
17459
|
typeof requestIdleCallback < "u" ? requestIdleCallback(() => Gl()) : setTimeout(() => Gl(), 0);
|
|
17460
17460
|
}), Gn(() => {
|
|
17461
|
-
if (!r() || w(
|
|
17462
|
-
O(
|
|
17461
|
+
if (!r() || w(k)) return;
|
|
17462
|
+
O(k, !0);
|
|
17463
17463
|
const R = o()?.supabaseUrl || Ay, F = o()?.supabasePublishableKey || Ry;
|
|
17464
17464
|
b = Jy(R, F), ce();
|
|
17465
17465
|
});
|
|
@@ -17519,18 +17519,18 @@ function fd(t, e) {
|
|
|
17519
17519
|
function we(R) {
|
|
17520
17520
|
const F = R.target, B = Array.from(F.files || []);
|
|
17521
17521
|
F.value = "", O(T, null);
|
|
17522
|
-
for (const
|
|
17523
|
-
const ne = cw(
|
|
17522
|
+
for (const Ee of B) {
|
|
17523
|
+
const ne = cw(Ee);
|
|
17524
17524
|
if (ne) {
|
|
17525
17525
|
O(T, ne, !0);
|
|
17526
17526
|
return;
|
|
17527
17527
|
}
|
|
17528
17528
|
}
|
|
17529
|
-
const te = Uy - w(
|
|
17530
|
-
O(
|
|
17529
|
+
const te = Uy - w(E).length;
|
|
17530
|
+
O(E, [...w(E), ...B.slice(0, te)], !0);
|
|
17531
17531
|
}
|
|
17532
17532
|
function ae(R) {
|
|
17533
|
-
O(
|
|
17533
|
+
O(E, w(E).filter((F, B) => B !== R), !0);
|
|
17534
17534
|
}
|
|
17535
17535
|
async function pe(R) {
|
|
17536
17536
|
const F = R ?? w(v);
|
|
@@ -17538,10 +17538,10 @@ function fd(t, e) {
|
|
|
17538
17538
|
const B = F.trim();
|
|
17539
17539
|
O(v, ""), O(S, !0), O(T, null);
|
|
17540
17540
|
let te = [];
|
|
17541
|
-
if (w(
|
|
17541
|
+
if (w(E).length > 0 && w(p)) {
|
|
17542
17542
|
O(A, !0);
|
|
17543
17543
|
try {
|
|
17544
|
-
te = await Promise.all(w(
|
|
17544
|
+
te = await Promise.all(w(E).map((se) => hw({
|
|
17545
17545
|
publishableApiKey: r(),
|
|
17546
17546
|
threadId: w(p),
|
|
17547
17547
|
file: se,
|
|
@@ -17551,9 +17551,9 @@ function fd(t, e) {
|
|
|
17551
17551
|
Kl(se instanceof Error ? se.message : "Upload failed", { threadId: w(p), baseUrl: o()?.baseUrl }), O(T, se instanceof Error ? se.message : "Upload failed.", !0), O(S, !1), O(A, !1);
|
|
17552
17552
|
return;
|
|
17553
17553
|
}
|
|
17554
|
-
O(A, !1), O(
|
|
17554
|
+
O(A, !1), O(E, [], !0);
|
|
17555
17555
|
}
|
|
17556
|
-
const
|
|
17556
|
+
const Ee = te.length > 0 ? { attachments: te } : void 0;
|
|
17557
17557
|
O(
|
|
17558
17558
|
_,
|
|
17559
17559
|
[
|
|
@@ -17574,7 +17574,7 @@ function fd(t, e) {
|
|
|
17574
17574
|
content: B,
|
|
17575
17575
|
threadId: w(p),
|
|
17576
17576
|
baseUrl: o()?.baseUrl,
|
|
17577
|
-
metadata:
|
|
17577
|
+
metadata: Ee,
|
|
17578
17578
|
user: a(),
|
|
17579
17579
|
callbacks: {
|
|
17580
17580
|
onInit: (se) => {
|
|
@@ -17638,7 +17638,7 @@ function fd(t, e) {
|
|
|
17638
17638
|
}
|
|
17639
17639
|
Gn(() => {
|
|
17640
17640
|
const R = w(_), F = w(p), B = w(v);
|
|
17641
|
-
R.length <= 1 && !B ||
|
|
17641
|
+
R.length <= 1 && !B || Ew(r(), {
|
|
17642
17642
|
threadId: F,
|
|
17643
17643
|
messages: R,
|
|
17644
17644
|
input: B,
|
|
@@ -17687,19 +17687,19 @@ function fd(t, e) {
|
|
|
17687
17687
|
const F = /* @__PURE__ */ Pn(() => w(c) ? "#9ca3af" : w(m));
|
|
17688
17688
|
var B = d0();
|
|
17689
17689
|
let te;
|
|
17690
|
-
var
|
|
17690
|
+
var Ee = J(B);
|
|
17691
17691
|
{
|
|
17692
17692
|
var ne = (ve) => {
|
|
17693
17693
|
var Oe = a0(), nt = J(Oe);
|
|
17694
17694
|
nt.__click = [i0, y];
|
|
17695
|
-
var
|
|
17696
|
-
n(
|
|
17695
|
+
var kt = ee(nt, 2);
|
|
17696
|
+
n(kt), z(Oe), L(ve, Oe);
|
|
17697
17697
|
};
|
|
17698
|
-
le(
|
|
17698
|
+
le(Ee, (ve) => {
|
|
17699
17699
|
w(y) && ve(ne);
|
|
17700
17700
|
});
|
|
17701
17701
|
}
|
|
17702
|
-
var he = ee(
|
|
17702
|
+
var he = ee(Ee, 2);
|
|
17703
17703
|
he.__click = [o0, y];
|
|
17704
17704
|
var tt = J(he);
|
|
17705
17705
|
{
|
|
@@ -17709,7 +17709,7 @@ function fd(t, e) {
|
|
|
17709
17709
|
}, Yt = (ve) => {
|
|
17710
17710
|
var Oe = Tt(), nt = it(Oe);
|
|
17711
17711
|
{
|
|
17712
|
-
var
|
|
17712
|
+
var kt = (jt) => {
|
|
17713
17713
|
var Cn = c0();
|
|
17714
17714
|
L(jt, Cn);
|
|
17715
17715
|
}, $n = (jt) => {
|
|
@@ -17719,7 +17719,7 @@ function fd(t, e) {
|
|
|
17719
17719
|
le(
|
|
17720
17720
|
nt,
|
|
17721
17721
|
(jt) => {
|
|
17722
|
-
w(y) ? jt(
|
|
17722
|
+
w(y) ? jt(kt) : jt($n, !1);
|
|
17723
17723
|
},
|
|
17724
17724
|
!0
|
|
17725
17725
|
);
|
|
@@ -17732,9 +17732,9 @@ function fd(t, e) {
|
|
|
17732
17732
|
}
|
|
17733
17733
|
z(he), z(B), xe(
|
|
17734
17734
|
(ve) => {
|
|
17735
|
-
te = Bc(B, 1, "bubble-container svelte-7fg7a1", null, te, ve), Xe(he, "aria-label", w(c) ? "Loading chat" : w(y) ? "Close chat" : "Open chat"), hs(he, `background-color: ${w(F) ?? ""}`);
|
|
17735
|
+
te = Bc(B, 1, "knest-bubble-container svelte-7fg7a1", null, te, ve), Xe(he, "aria-label", w(c) ? "Loading chat" : w(y) ? "Close chat" : "Open chat"), hs(he, `background-color: ${w(F) ?? ""}`);
|
|
17736
17736
|
},
|
|
17737
|
-
[() => ({ "bubble-open": w(y) })]
|
|
17737
|
+
[() => ({ "knest-bubble-open": w(y) })]
|
|
17738
17738
|
), L(R, B);
|
|
17739
17739
|
};
|
|
17740
17740
|
le(de, (R) => {
|