@brainbase-labs/chat-widget 0.1.17 → 0.1.18
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/embed/index.js +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +110 -110
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/styles.css +1 -1
package/dist/index.js
CHANGED
|
@@ -242,7 +242,7 @@ function Vr(e) {
|
|
|
242
242
|
l,
|
|
243
243
|
a
|
|
244
244
|
]
|
|
245
|
-
),
|
|
245
|
+
), j = ge(async () => {
|
|
246
246
|
if (!E) return;
|
|
247
247
|
const C = {
|
|
248
248
|
sessionId: E,
|
|
@@ -271,7 +271,7 @@ function Vr(e) {
|
|
|
271
271
|
error: _,
|
|
272
272
|
sessionId: E,
|
|
273
273
|
sendMessage: R,
|
|
274
|
-
endSession:
|
|
274
|
+
endSession: j,
|
|
275
275
|
clearMessages: N,
|
|
276
276
|
startNewSession: V
|
|
277
277
|
};
|
|
@@ -1809,7 +1809,7 @@ function vi() {
|
|
|
1809
1809
|
function R() {
|
|
1810
1810
|
U(t);
|
|
1811
1811
|
}
|
|
1812
|
-
function
|
|
1812
|
+
function j(L) {
|
|
1813
1813
|
var y;
|
|
1814
1814
|
for (L = L || []; y = N(); )
|
|
1815
1815
|
y !== !1 && L.push(y);
|
|
@@ -1843,9 +1843,9 @@ function vi() {
|
|
|
1843
1843
|
}
|
|
1844
1844
|
function z() {
|
|
1845
1845
|
var L = [];
|
|
1846
|
-
|
|
1846
|
+
j(L);
|
|
1847
1847
|
for (var y; y = C(); )
|
|
1848
|
-
y !== !1 && (L.push(y),
|
|
1848
|
+
y !== !1 && (L.push(y), j(L));
|
|
1849
1849
|
return L;
|
|
1850
1850
|
}
|
|
1851
1851
|
return R(), z();
|
|
@@ -2071,11 +2071,11 @@ function sr(e, n, t) {
|
|
|
2071
2071
|
if (n.type === "element")
|
|
2072
2072
|
return Ri(e, n, t);
|
|
2073
2073
|
if (n.type === "mdxFlowExpression" || n.type === "mdxTextExpression")
|
|
2074
|
-
return
|
|
2074
|
+
return ji(e, n);
|
|
2075
2075
|
if (n.type === "mdxJsxFlowElement" || n.type === "mdxJsxTextElement")
|
|
2076
2076
|
return Hi(e, n, t);
|
|
2077
2077
|
if (n.type === "mdxjsEsm")
|
|
2078
|
-
return
|
|
2078
|
+
return $i(e, n);
|
|
2079
2079
|
if (n.type === "root")
|
|
2080
2080
|
return Vi(e, n, t);
|
|
2081
2081
|
if (n.type === "text")
|
|
@@ -2091,7 +2091,7 @@ function Ri(e, n, t) {
|
|
|
2091
2091
|
return typeof c == "string" ? !mi(c) : !0;
|
|
2092
2092
|
})), ur(e, l, o, n), Yn(l, a), e.ancestors.pop(), e.schema = r, e.create(n, o, l, t);
|
|
2093
2093
|
}
|
|
2094
|
-
function
|
|
2094
|
+
function ji(e, n) {
|
|
2095
2095
|
if (n.data && n.data.estree && e.evaluater) {
|
|
2096
2096
|
const r = n.data.estree.body[0];
|
|
2097
2097
|
return r.type, /** @type {Child | undefined} */
|
|
@@ -2099,7 +2099,7 @@ function $i(e, n) {
|
|
|
2099
2099
|
}
|
|
2100
2100
|
nn(e, n.position);
|
|
2101
2101
|
}
|
|
2102
|
-
function
|
|
2102
|
+
function $i(e, n) {
|
|
2103
2103
|
if (n.data && n.data.estree && e.evaluater)
|
|
2104
2104
|
return (
|
|
2105
2105
|
/** @type {Child | undefined} */
|
|
@@ -2458,7 +2458,7 @@ function Ee(e) {
|
|
|
2458
2458
|
return t !== null && t > -1 && e.test(String.fromCharCode(t));
|
|
2459
2459
|
}
|
|
2460
2460
|
}
|
|
2461
|
-
function
|
|
2461
|
+
function je(e) {
|
|
2462
2462
|
const n = [];
|
|
2463
2463
|
let t = -1, r = 0, i = 0;
|
|
2464
2464
|
for (; ++t < e.length; ) {
|
|
@@ -2609,18 +2609,18 @@ function mo(e) {
|
|
|
2609
2609
|
)
|
|
2610
2610
|
return;
|
|
2611
2611
|
const B = n.events.length;
|
|
2612
|
-
let U = B, R,
|
|
2612
|
+
let U = B, R, j;
|
|
2613
2613
|
for (; U--; )
|
|
2614
2614
|
if (n.events[U][0] === "exit" && n.events[U][1].type === "chunkFlow") {
|
|
2615
2615
|
if (R) {
|
|
2616
|
-
|
|
2616
|
+
j = n.events[U][1].end;
|
|
2617
2617
|
break;
|
|
2618
2618
|
}
|
|
2619
2619
|
R = !0;
|
|
2620
2620
|
}
|
|
2621
2621
|
for (b(r), k = B; k < n.events.length; )
|
|
2622
2622
|
n.events[k][1].end = {
|
|
2623
|
-
|
|
2623
|
+
...j
|
|
2624
2624
|
}, k++;
|
|
2625
2625
|
ke(n.events, U + 1, 0, n.events.slice(B)), n.events.length = k;
|
|
2626
2626
|
}
|
|
@@ -2920,8 +2920,8 @@ function vo(e, n, t) {
|
|
|
2920
2920
|
}
|
|
2921
2921
|
function V(k, B, U) {
|
|
2922
2922
|
let R = 0;
|
|
2923
|
-
return
|
|
2924
|
-
function
|
|
2923
|
+
return j;
|
|
2924
|
+
function j(y) {
|
|
2925
2925
|
return k.enter("lineEnding"), k.consume(y), k.exit("lineEnding"), N;
|
|
2926
2926
|
}
|
|
2927
2927
|
function N(y) {
|
|
@@ -3249,16 +3249,16 @@ function Oo(e, n) {
|
|
|
3249
3249
|
return s;
|
|
3250
3250
|
}
|
|
3251
3251
|
const Fo = {
|
|
3252
|
-
resolve:
|
|
3253
|
-
tokenize:
|
|
3252
|
+
resolve: jo,
|
|
3253
|
+
tokenize: $o
|
|
3254
3254
|
}, Ro = {
|
|
3255
3255
|
partial: !0,
|
|
3256
3256
|
tokenize: Ho
|
|
3257
3257
|
};
|
|
3258
|
-
function
|
|
3258
|
+
function jo(e) {
|
|
3259
3259
|
return gr(e), e;
|
|
3260
3260
|
}
|
|
3261
|
-
function
|
|
3261
|
+
function $o(e, n) {
|
|
3262
3262
|
let t;
|
|
3263
3263
|
return r;
|
|
3264
3264
|
function r(a) {
|
|
@@ -3612,10 +3612,10 @@ function rl(e, n, t) {
|
|
|
3612
3612
|
return d === 62 ? (e.consume(d), r.interrupt ? n : C) : t(d);
|
|
3613
3613
|
}
|
|
3614
3614
|
function P(d) {
|
|
3615
|
-
return W(d) ? (e.consume(d), P) :
|
|
3615
|
+
return W(d) ? (e.consume(d), P) : j(d);
|
|
3616
3616
|
}
|
|
3617
3617
|
function v(d) {
|
|
3618
|
-
return d === 47 ? (e.consume(d),
|
|
3618
|
+
return d === 47 ? (e.consume(d), j) : d === 58 || d === 95 || xe(d) ? (e.consume(d), F) : W(d) ? (e.consume(d), v) : j(d);
|
|
3619
3619
|
}
|
|
3620
3620
|
function F(d) {
|
|
3621
3621
|
return d === 45 || d === 46 || d === 58 || d === 95 || se(d) ? (e.consume(d), F) : V(d);
|
|
@@ -3635,7 +3635,7 @@ function rl(e, n, t) {
|
|
|
3635
3635
|
function R(d) {
|
|
3636
3636
|
return d === 47 || d === 62 || W(d) ? v(d) : t(d);
|
|
3637
3637
|
}
|
|
3638
|
-
function
|
|
3638
|
+
function j(d) {
|
|
3639
3639
|
return d === 62 ? (e.consume(d), N) : t(d);
|
|
3640
3640
|
}
|
|
3641
3641
|
function N(d) {
|
|
@@ -3759,10 +3759,10 @@ function al(e, n, t) {
|
|
|
3759
3759
|
return f === 45 || se(f) ? (e.consume(f), U) : f === 47 || f === 62 || ie(f) ? R(f) : t(f);
|
|
3760
3760
|
}
|
|
3761
3761
|
function R(f) {
|
|
3762
|
-
return f === 47 ? (e.consume(f), A) : f === 58 || f === 95 || xe(f) ? (e.consume(f),
|
|
3762
|
+
return f === 47 ? (e.consume(f), A) : f === 58 || f === 95 || xe(f) ? (e.consume(f), j) : M(f) ? (l = R, T(f)) : W(f) ? (e.consume(f), R) : A(f);
|
|
3763
3763
|
}
|
|
3764
|
-
function
|
|
3765
|
-
return f === 45 || f === 46 || f === 58 || f === 95 || se(f) ? (e.consume(f),
|
|
3764
|
+
function j(f) {
|
|
3765
|
+
return f === 45 || f === 46 || f === 58 || f === 95 || se(f) ? (e.consume(f), j) : N(f);
|
|
3766
3766
|
}
|
|
3767
3767
|
function N(f) {
|
|
3768
3768
|
return f === 61 ? (e.consume(f), C) : M(f) ? (l = N, T(f)) : W(f) ? (e.consume(f), N) : R(f);
|
|
@@ -4265,11 +4265,11 @@ const Fl = {
|
|
|
4265
4265
|
62: fr
|
|
4266
4266
|
}, Rl = {
|
|
4267
4267
|
91: Vo
|
|
4268
|
-
},
|
|
4268
|
+
}, jl = {
|
|
4269
4269
|
[-2]: Cn,
|
|
4270
4270
|
[-1]: Cn,
|
|
4271
4271
|
32: Cn
|
|
4272
|
-
},
|
|
4272
|
+
}, $l = {
|
|
4273
4273
|
35: Ko,
|
|
4274
4274
|
42: hn,
|
|
4275
4275
|
45: [Tt, hn],
|
|
@@ -4306,8 +4306,8 @@ const Fl = {
|
|
|
4306
4306
|
contentInitial: Rl,
|
|
4307
4307
|
disable: Wl,
|
|
4308
4308
|
document: Fl,
|
|
4309
|
-
flow:
|
|
4310
|
-
flowInitial:
|
|
4309
|
+
flow: $l,
|
|
4310
|
+
flowInitial: jl,
|
|
4311
4311
|
insideSpan: Ul,
|
|
4312
4312
|
string: Hl,
|
|
4313
4313
|
text: Vl
|
|
@@ -4371,7 +4371,7 @@ function Xl(e, n, t) {
|
|
|
4371
4371
|
};
|
|
4372
4372
|
}
|
|
4373
4373
|
function I(N) {
|
|
4374
|
-
i[N.line] = N.column,
|
|
4374
|
+
i[N.line] = N.column, j();
|
|
4375
4375
|
}
|
|
4376
4376
|
function E() {
|
|
4377
4377
|
let N;
|
|
@@ -4388,7 +4388,7 @@ function Xl(e, n, t) {
|
|
|
4388
4388
|
u = u(N);
|
|
4389
4389
|
}
|
|
4390
4390
|
function P(N) {
|
|
4391
|
-
M(N) ? (r.line++, r.column = 1, r.offset += N === -3 ? 2 : 1,
|
|
4391
|
+
M(N) ? (r.line++, r.column = 1, r.offset += N === -3 ? 2 : 1, j()) : N !== -1 && (r.column++, r.offset++), r._bufferIndex < 0 ? r._index++ : (r._bufferIndex++, r._bufferIndex === // Points w/ non-negative `_bufferIndex` reference
|
|
4392
4392
|
// strings.
|
|
4393
4393
|
/** @type {string} */
|
|
4394
4394
|
l[r._index].length && (r._bufferIndex = -1, r._index++)), s.previous = N;
|
|
@@ -4422,8 +4422,8 @@ function Xl(e, n, t) {
|
|
|
4422
4422
|
])
|
|
4423
4423
|
) : J(L);
|
|
4424
4424
|
function J(G) {
|
|
4425
|
-
return
|
|
4426
|
-
function
|
|
4425
|
+
return $e;
|
|
4426
|
+
function $e(Ce) {
|
|
4427
4427
|
const Pe = Ce !== null && G[Ce], Ae = Ce !== null && G.null, on = [
|
|
4428
4428
|
// To do: add more extension tests.
|
|
4429
4429
|
/* c8 ignore next 2 */
|
|
@@ -4437,8 +4437,8 @@ function Xl(e, n, t) {
|
|
|
4437
4437
|
return T = G, q = 0, G.length === 0 ? A : d(G[q]);
|
|
4438
4438
|
}
|
|
4439
4439
|
function d(G) {
|
|
4440
|
-
return
|
|
4441
|
-
function
|
|
4440
|
+
return $e;
|
|
4441
|
+
function $e(Ce) {
|
|
4442
4442
|
return f = R(), Q = G, G.partial || (s.currentConstruct = G), G.name && s.parser.constructs.disable.null.includes(G.name) ? ve() : G.tokenize.call(
|
|
4443
4443
|
// If we do have fields, create an object w/ `context` as its
|
|
4444
4444
|
// prototype.
|
|
@@ -4468,10 +4468,10 @@ function Xl(e, n, t) {
|
|
|
4468
4468
|
restore: A
|
|
4469
4469
|
};
|
|
4470
4470
|
function A() {
|
|
4471
|
-
r = N, s.previous = C, s.currentConstruct = z, s.events.length = L, a = y,
|
|
4471
|
+
r = N, s.previous = C, s.currentConstruct = z, s.events.length = L, a = y, j();
|
|
4472
4472
|
}
|
|
4473
4473
|
}
|
|
4474
|
-
function
|
|
4474
|
+
function j() {
|
|
4475
4475
|
r.line in i && r.column < 2 && (r.column = i[r.line], r.offset += i[r.line] - 1);
|
|
4476
4476
|
}
|
|
4477
4477
|
}
|
|
@@ -4654,7 +4654,7 @@ function ia(e) {
|
|
|
4654
4654
|
resourceTitleString: l,
|
|
4655
4655
|
setextHeading: o(rt),
|
|
4656
4656
|
strong: o(Rr),
|
|
4657
|
-
thematicBreak: o(
|
|
4657
|
+
thematicBreak: o($r)
|
|
4658
4658
|
},
|
|
4659
4659
|
exit: {
|
|
4660
4660
|
atxHeading: c(),
|
|
@@ -4663,20 +4663,20 @@ function ia(e) {
|
|
|
4663
4663
|
autolinkEmail: Pe,
|
|
4664
4664
|
autolinkProtocol: Ce,
|
|
4665
4665
|
blockQuote: c(),
|
|
4666
|
-
characterEscapeValue:
|
|
4666
|
+
characterEscapeValue: j,
|
|
4667
4667
|
characterReferenceMarkerHexadecimal: ve,
|
|
4668
4668
|
characterReferenceMarkerNumeric: ve,
|
|
4669
4669
|
characterReferenceValue: G,
|
|
4670
|
-
characterReference:
|
|
4670
|
+
characterReference: $e,
|
|
4671
4671
|
codeFenced: c(E),
|
|
4672
4672
|
codeFencedFence: I,
|
|
4673
4673
|
codeFencedFenceInfo: h,
|
|
4674
4674
|
codeFencedFenceMeta: _,
|
|
4675
|
-
codeFlowValue:
|
|
4675
|
+
codeFlowValue: j,
|
|
4676
4676
|
codeIndented: c(b),
|
|
4677
4677
|
codeText: c(y),
|
|
4678
|
-
codeTextData:
|
|
4679
|
-
data:
|
|
4678
|
+
codeTextData: j,
|
|
4679
|
+
data: j,
|
|
4680
4680
|
definition: c(),
|
|
4681
4681
|
definitionDestinationString: F,
|
|
4682
4682
|
definitionLabelString: P,
|
|
@@ -4685,9 +4685,9 @@ function ia(e) {
|
|
|
4685
4685
|
hardBreakEscape: c(C),
|
|
4686
4686
|
hardBreakTrailing: c(C),
|
|
4687
4687
|
htmlFlow: c(z),
|
|
4688
|
-
htmlFlowData:
|
|
4688
|
+
htmlFlowData: j,
|
|
4689
4689
|
htmlText: c(L),
|
|
4690
|
-
htmlTextData:
|
|
4690
|
+
htmlTextData: j,
|
|
4691
4691
|
image: c(T),
|
|
4692
4692
|
label: Q,
|
|
4693
4693
|
labelText: q,
|
|
@@ -4725,14 +4725,14 @@ function ia(e) {
|
|
|
4725
4725
|
buffer: l,
|
|
4726
4726
|
resume: u,
|
|
4727
4727
|
data: t
|
|
4728
|
-
},
|
|
4728
|
+
}, $ = [];
|
|
4729
4729
|
let Y = -1;
|
|
4730
4730
|
for (; ++Y < g.length; )
|
|
4731
4731
|
if (g[Y][1].type === "listOrdered" || g[Y][1].type === "listUnordered")
|
|
4732
4732
|
if (g[Y][0] === "enter")
|
|
4733
|
-
|
|
4733
|
+
$.push(Y);
|
|
4734
4734
|
else {
|
|
4735
|
-
const de =
|
|
4735
|
+
const de = $.pop();
|
|
4736
4736
|
Y = i(g, de, Y);
|
|
4737
4737
|
}
|
|
4738
4738
|
for (Y = -1; ++Y < g.length; ) {
|
|
@@ -4761,9 +4761,9 @@ function ia(e) {
|
|
|
4761
4761
|
return S;
|
|
4762
4762
|
}
|
|
4763
4763
|
function i(g, S, D) {
|
|
4764
|
-
let
|
|
4765
|
-
for (;
|
|
4766
|
-
const le = g[
|
|
4764
|
+
let $ = S - 1, Y = -1, de = !1, Le, be, He, Ve;
|
|
4765
|
+
for (; ++$ <= D; ) {
|
|
4766
|
+
const le = g[$];
|
|
4767
4767
|
switch (le[1].type) {
|
|
4768
4768
|
case "listUnordered":
|
|
4769
4769
|
case "listOrdered":
|
|
@@ -4772,7 +4772,7 @@ function ia(e) {
|
|
|
4772
4772
|
break;
|
|
4773
4773
|
}
|
|
4774
4774
|
case "lineEndingBlank": {
|
|
4775
|
-
le[0] === "enter" && (Le && !Ve && !Y && !He && (He =
|
|
4775
|
+
le[0] === "enter" && (Le && !Ve && !Y && !He && (He = $), Ve = void 0);
|
|
4776
4776
|
break;
|
|
4777
4777
|
}
|
|
4778
4778
|
case "linePrefix":
|
|
@@ -4786,7 +4786,7 @@ function ia(e) {
|
|
|
4786
4786
|
}
|
|
4787
4787
|
if (!Y && le[0] === "enter" && le[1].type === "listItemPrefix" || Y === -1 && le[0] === "exit" && (le[1].type === "listUnordered" || le[1].type === "listOrdered")) {
|
|
4788
4788
|
if (Le) {
|
|
4789
|
-
let ze =
|
|
4789
|
+
let ze = $;
|
|
4790
4790
|
for (be = void 0; ze--; ) {
|
|
4791
4791
|
const we = g[ze];
|
|
4792
4792
|
if (we[1].type === "lineEnding" || we[1].type === "lineEndingBlank") {
|
|
@@ -4794,7 +4794,7 @@ function ia(e) {
|
|
|
4794
4794
|
be && (g[be][1].type = "lineEndingBlank", de = !0), we[1].type = "lineEnding", be = ze;
|
|
4795
4795
|
} else if (!(we[1].type === "linePrefix" || we[1].type === "blockQuotePrefix" || we[1].type === "blockQuotePrefixWhitespace" || we[1].type === "blockQuoteMarker" || we[1].type === "listItemIndent")) break;
|
|
4796
4796
|
}
|
|
4797
|
-
He && (!be || He < be) && (Le._spread = !0), Le.end = Object.assign({}, be ? g[be][1].start : le[1].end), g.splice(be ||
|
|
4797
|
+
He && (!be || He < be) && (Le._spread = !0), Le.end = Object.assign({}, be ? g[be][1].start : le[1].end), g.splice(be || $, 0, ["exit", Le, le[2]]), $++, D++;
|
|
4798
4798
|
}
|
|
4799
4799
|
if (le[1].type === "listItemPrefix") {
|
|
4800
4800
|
const ze = {
|
|
@@ -4804,7 +4804,7 @@ function ia(e) {
|
|
|
4804
4804
|
// @ts-expect-error: we’ll add `end` in a second.
|
|
4805
4805
|
end: void 0
|
|
4806
4806
|
};
|
|
4807
|
-
Le = ze, g.splice(
|
|
4807
|
+
Le = ze, g.splice($, 0, ["enter", ze, le[2]]), $++, D++, He = void 0, Ve = !0;
|
|
4808
4808
|
}
|
|
4809
4809
|
}
|
|
4810
4810
|
}
|
|
@@ -4812,8 +4812,8 @@ function ia(e) {
|
|
|
4812
4812
|
}
|
|
4813
4813
|
function o(g, S) {
|
|
4814
4814
|
return D;
|
|
4815
|
-
function D(
|
|
4816
|
-
a.call(this, g(
|
|
4815
|
+
function D($) {
|
|
4816
|
+
a.call(this, g($), $), S && S.call(this, $);
|
|
4817
4817
|
}
|
|
4818
4818
|
}
|
|
4819
4819
|
function l() {
|
|
@@ -4836,9 +4836,9 @@ function ia(e) {
|
|
|
4836
4836
|
}
|
|
4837
4837
|
}
|
|
4838
4838
|
function s(g, S) {
|
|
4839
|
-
const D = this.stack.pop(),
|
|
4840
|
-
if (
|
|
4841
|
-
|
|
4839
|
+
const D = this.stack.pop(), $ = this.tokenStack.pop();
|
|
4840
|
+
if ($)
|
|
4841
|
+
$[0].type !== g.type && (S ? S.call(this, g, $[0]) : ($[1] || Pt).call(this, g, $[0]));
|
|
4842
4842
|
else throw new Error("Cannot close `" + g.type + "` (" + Qe({
|
|
4843
4843
|
start: g.start,
|
|
4844
4844
|
end: g.end
|
|
@@ -4907,14 +4907,14 @@ function ia(e) {
|
|
|
4907
4907
|
}
|
|
4908
4908
|
function R(g) {
|
|
4909
4909
|
const D = this.stack[this.stack.length - 1].children;
|
|
4910
|
-
let
|
|
4911
|
-
(
|
|
4910
|
+
let $ = D[D.length - 1];
|
|
4911
|
+
(!$ || $.type !== "text") && ($ = jr(), $.position = {
|
|
4912
4912
|
start: _e(g.start),
|
|
4913
4913
|
// @ts-expect-error: we’ll add `end` later.
|
|
4914
4914
|
end: void 0
|
|
4915
|
-
}, D.push(
|
|
4915
|
+
}, D.push($)), this.stack.push($);
|
|
4916
4916
|
}
|
|
4917
|
-
function
|
|
4917
|
+
function j(g) {
|
|
4918
4918
|
const S = this.stack.pop();
|
|
4919
4919
|
S.value += this.sliceSerialize(g), S.position.end = _e(g.end);
|
|
4920
4920
|
}
|
|
@@ -4925,7 +4925,7 @@ function ia(e) {
|
|
|
4925
4925
|
D.position.end = _e(g.end), this.data.atHardBreak = void 0;
|
|
4926
4926
|
return;
|
|
4927
4927
|
}
|
|
4928
|
-
!this.data.setextHeadingSlurpLineEnding && n.canContainEols.includes(S.type) && (R.call(this, g),
|
|
4928
|
+
!this.data.setextHeadingSlurpLineEnding && n.canContainEols.includes(S.type) && (R.call(this, g), j.call(this, g));
|
|
4929
4929
|
}
|
|
4930
4930
|
function C() {
|
|
4931
4931
|
this.data.atHardBreak = !0;
|
|
@@ -4967,8 +4967,8 @@ function ia(e) {
|
|
|
4967
4967
|
function Q() {
|
|
4968
4968
|
const g = this.stack[this.stack.length - 1], S = this.resume(), D = this.stack[this.stack.length - 1];
|
|
4969
4969
|
if (this.data.inReference = !0, D.type === "link") {
|
|
4970
|
-
const
|
|
4971
|
-
D.children =
|
|
4970
|
+
const $ = g.children;
|
|
4971
|
+
D.children = $;
|
|
4972
4972
|
} else
|
|
4973
4973
|
D.alt = S;
|
|
4974
4974
|
}
|
|
@@ -4995,22 +4995,22 @@ function ia(e) {
|
|
|
4995
4995
|
}
|
|
4996
4996
|
function G(g) {
|
|
4997
4997
|
const S = this.sliceSerialize(g), D = this.data.characterReferenceType;
|
|
4998
|
-
let
|
|
4999
|
-
D ? (
|
|
4998
|
+
let $;
|
|
4999
|
+
D ? ($ = hr(S, D === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : $ = Kn(S);
|
|
5000
5000
|
const Y = this.stack[this.stack.length - 1];
|
|
5001
|
-
Y.value +=
|
|
5001
|
+
Y.value += $;
|
|
5002
5002
|
}
|
|
5003
|
-
function
|
|
5003
|
+
function $e(g) {
|
|
5004
5004
|
const S = this.stack.pop();
|
|
5005
5005
|
S.position.end = _e(g.end);
|
|
5006
5006
|
}
|
|
5007
5007
|
function Ce(g) {
|
|
5008
|
-
|
|
5008
|
+
j.call(this, g);
|
|
5009
5009
|
const S = this.stack[this.stack.length - 1];
|
|
5010
5010
|
S.url = this.sliceSerialize(g);
|
|
5011
5011
|
}
|
|
5012
5012
|
function Pe(g) {
|
|
5013
|
-
|
|
5013
|
+
j.call(this, g);
|
|
5014
5014
|
const S = this.stack[this.stack.length - 1];
|
|
5015
5015
|
S.url = "mailto:" + this.sliceSerialize(g);
|
|
5016
5016
|
}
|
|
@@ -5113,13 +5113,13 @@ function ia(e) {
|
|
|
5113
5113
|
children: []
|
|
5114
5114
|
};
|
|
5115
5115
|
}
|
|
5116
|
-
function
|
|
5116
|
+
function jr() {
|
|
5117
5117
|
return {
|
|
5118
5118
|
type: "text",
|
|
5119
5119
|
value: ""
|
|
5120
5120
|
};
|
|
5121
5121
|
}
|
|
5122
|
-
function
|
|
5122
|
+
function $r() {
|
|
5123
5123
|
return {
|
|
5124
5124
|
type: "thematicBreak"
|
|
5125
5125
|
};
|
|
@@ -5234,7 +5234,7 @@ function pa(e, n) {
|
|
|
5234
5234
|
return e.patch(n, t), e.applyData(n, t);
|
|
5235
5235
|
}
|
|
5236
5236
|
function ha(e, n) {
|
|
5237
|
-
const t = typeof e.options.clobberPrefix == "string" ? e.options.clobberPrefix : "user-content-", r = String(n.identifier).toUpperCase(), i =
|
|
5237
|
+
const t = typeof e.options.clobberPrefix == "string" ? e.options.clobberPrefix : "user-content-", r = String(n.identifier).toUpperCase(), i = je(r.toLowerCase()), o = e.footnoteOrder.indexOf(r);
|
|
5238
5238
|
let l, a = e.footnoteCounts.get(r);
|
|
5239
5239
|
a === void 0 ? (a = 0, e.footnoteOrder.push(r), l = e.footnoteOrder.length) : l = o + 1, a += 1, e.footnoteCounts.set(r, a);
|
|
5240
5240
|
const c = {
|
|
@@ -5286,13 +5286,13 @@ function ma(e, n) {
|
|
|
5286
5286
|
const t = String(n.identifier).toUpperCase(), r = e.definitionById.get(t);
|
|
5287
5287
|
if (!r)
|
|
5288
5288
|
return Sr(e, n);
|
|
5289
|
-
const i = { src:
|
|
5289
|
+
const i = { src: je(r.url || ""), alt: n.alt };
|
|
5290
5290
|
r.title !== null && r.title !== void 0 && (i.title = r.title);
|
|
5291
5291
|
const o = { type: "element", tagName: "img", properties: i, children: [] };
|
|
5292
5292
|
return e.patch(n, o), e.applyData(n, o);
|
|
5293
5293
|
}
|
|
5294
5294
|
function ga(e, n) {
|
|
5295
|
-
const t = { src:
|
|
5295
|
+
const t = { src: je(n.url) };
|
|
5296
5296
|
n.alt !== null && n.alt !== void 0 && (t.alt = n.alt), n.title !== null && n.title !== void 0 && (t.title = n.title);
|
|
5297
5297
|
const r = { type: "element", tagName: "img", properties: t, children: [] };
|
|
5298
5298
|
return e.patch(n, r), e.applyData(n, r);
|
|
@@ -5312,7 +5312,7 @@ function xa(e, n) {
|
|
|
5312
5312
|
const t = String(n.identifier).toUpperCase(), r = e.definitionById.get(t);
|
|
5313
5313
|
if (!r)
|
|
5314
5314
|
return Sr(e, n);
|
|
5315
|
-
const i = { href:
|
|
5315
|
+
const i = { href: je(r.url || "") };
|
|
5316
5316
|
r.title !== null && r.title !== void 0 && (i.title = r.title);
|
|
5317
5317
|
const o = {
|
|
5318
5318
|
type: "element",
|
|
@@ -5323,7 +5323,7 @@ function xa(e, n) {
|
|
|
5323
5323
|
return e.patch(n, o), e.applyData(n, o);
|
|
5324
5324
|
}
|
|
5325
5325
|
function ka(e, n) {
|
|
5326
|
-
const t = { href:
|
|
5326
|
+
const t = { href: je(n.url) };
|
|
5327
5327
|
n.title !== null && n.title !== void 0 && (t.title = n.title);
|
|
5328
5328
|
const r = {
|
|
5329
5329
|
type: "element",
|
|
@@ -5724,7 +5724,7 @@ function Ra(e) {
|
|
|
5724
5724
|
);
|
|
5725
5725
|
if (!s)
|
|
5726
5726
|
continue;
|
|
5727
|
-
const u = e.all(s), p = String(s.identifier).toUpperCase(), m =
|
|
5727
|
+
const u = e.all(s), p = String(s.identifier).toUpperCase(), m = je(p.toLowerCase());
|
|
5728
5728
|
let h = 0;
|
|
5729
5729
|
const _ = [], I = e.footnoteCounts.get(p);
|
|
5730
5730
|
for (; I !== void 0 && ++h <= I; ) {
|
|
@@ -5805,10 +5805,10 @@ const Tr = (
|
|
|
5805
5805
|
if (typeof e == "function")
|
|
5806
5806
|
return yn(e);
|
|
5807
5807
|
if (typeof e == "object")
|
|
5808
|
-
return Array.isArray(e) ?
|
|
5808
|
+
return Array.isArray(e) ? ja(e) : (
|
|
5809
5809
|
// Cast because `ReadonlyArray` goes into the above but `isArray`
|
|
5810
5810
|
// narrows to `Array`.
|
|
5811
|
-
|
|
5811
|
+
$a(
|
|
5812
5812
|
/** @type {Props} */
|
|
5813
5813
|
e
|
|
5814
5814
|
)
|
|
@@ -5818,7 +5818,7 @@ const Tr = (
|
|
|
5818
5818
|
throw new Error("Expected function, string, or object as test");
|
|
5819
5819
|
})
|
|
5820
5820
|
);
|
|
5821
|
-
function
|
|
5821
|
+
function ja(e) {
|
|
5822
5822
|
const n = [];
|
|
5823
5823
|
let t = -1;
|
|
5824
5824
|
for (; ++t < e.length; )
|
|
@@ -5831,7 +5831,7 @@ function $a(e) {
|
|
|
5831
5831
|
return !1;
|
|
5832
5832
|
}
|
|
5833
5833
|
}
|
|
5834
|
-
function
|
|
5834
|
+
function $a(e) {
|
|
5835
5835
|
const n = (
|
|
5836
5836
|
/** @type {Record<string, unknown>} */
|
|
5837
5837
|
e
|
|
@@ -6024,7 +6024,7 @@ function Rt(e) {
|
|
|
6024
6024
|
n++, t = e.charCodeAt(n);
|
|
6025
6025
|
return e.slice(n);
|
|
6026
6026
|
}
|
|
6027
|
-
function
|
|
6027
|
+
function jt(e, n) {
|
|
6028
6028
|
const t = Qa(e, n), r = t.one(e, void 0), i = Ra(t), o = Array.isArray(r) ? { type: "root", children: r } : r || { type: "root", children: [] };
|
|
6029
6029
|
return i && o.children.push({ type: "text", value: `
|
|
6030
6030
|
` }, i), o;
|
|
@@ -6033,17 +6033,17 @@ function ns(e, n) {
|
|
|
6033
6033
|
return e && "run" in e ? async function(t, r) {
|
|
6034
6034
|
const i = (
|
|
6035
6035
|
/** @type {HastRoot} */
|
|
6036
|
-
|
|
6036
|
+
jt(t, { file: r, ...n })
|
|
6037
6037
|
);
|
|
6038
6038
|
await e.run(i, r);
|
|
6039
6039
|
} : function(t, r) {
|
|
6040
6040
|
return (
|
|
6041
6041
|
/** @type {HastRoot} */
|
|
6042
|
-
|
|
6042
|
+
jt(t, { file: r, ...e || n })
|
|
6043
6043
|
);
|
|
6044
6044
|
};
|
|
6045
6045
|
}
|
|
6046
|
-
function
|
|
6046
|
+
function $t(e) {
|
|
6047
6047
|
if (e)
|
|
6048
6048
|
throw e;
|
|
6049
6049
|
}
|
|
@@ -6089,7 +6089,7 @@ function ts() {
|
|
|
6089
6089
|
}
|
|
6090
6090
|
var rs = ts();
|
|
6091
6091
|
const In = /* @__PURE__ */ ir(rs);
|
|
6092
|
-
function
|
|
6092
|
+
function jn(e) {
|
|
6093
6093
|
if (typeof e != "object" || e === null)
|
|
6094
6094
|
return !1;
|
|
6095
6095
|
const n = Object.getPrototypeOf(e);
|
|
@@ -6264,14 +6264,14 @@ const hs = { cwd: fs };
|
|
|
6264
6264
|
function fs() {
|
|
6265
6265
|
return "/";
|
|
6266
6266
|
}
|
|
6267
|
-
function
|
|
6267
|
+
function $n(e) {
|
|
6268
6268
|
return !!(e !== null && typeof e == "object" && "href" in e && e.href && "protocol" in e && e.protocol && // @ts-expect-error: indexing is fine.
|
|
6269
6269
|
e.auth === void 0);
|
|
6270
6270
|
}
|
|
6271
6271
|
function ds(e) {
|
|
6272
6272
|
if (typeof e == "string")
|
|
6273
6273
|
e = new URL(e);
|
|
6274
|
-
else if (
|
|
6274
|
+
else if (!$n(e)) {
|
|
6275
6275
|
const n = new TypeError(
|
|
6276
6276
|
'The "path" argument must be of type string or an instance of URL. Received `' + e + "`"
|
|
6277
6277
|
);
|
|
@@ -6340,7 +6340,7 @@ class Ar {
|
|
|
6340
6340
|
*/
|
|
6341
6341
|
constructor(n) {
|
|
6342
6342
|
let t;
|
|
6343
|
-
n ?
|
|
6343
|
+
n ? $n(n) ? t = { path: n } : typeof n == "string" || gs(n) ? t = { value: n } : t = n : t = {}, this.cwd = "cwd" in t ? "" : hs.cwd(), this.data = {}, this.history = [], this.messages = [], this.value, this.map, this.result, this.stored;
|
|
6344
6344
|
let r = -1;
|
|
6345
6345
|
for (; ++r < En.length; ) {
|
|
6346
6346
|
const o = En[r];
|
|
@@ -6448,7 +6448,7 @@ class Ar {
|
|
|
6448
6448
|
* Nothing.
|
|
6449
6449
|
*/
|
|
6450
6450
|
set path(n) {
|
|
6451
|
-
|
|
6451
|
+
$n(n) && (n = ds(n)), Ln(n, "path"), this.path !== n && this.history.push(n);
|
|
6452
6452
|
}
|
|
6453
6453
|
/**
|
|
6454
6454
|
* Get the stem (basename w/o extname) (example: `'index.min'`).
|
|
@@ -6975,7 +6975,7 @@ class tt extends ys {
|
|
|
6975
6975
|
let t = !1, r;
|
|
6976
6976
|
return this.freeze(), Tn("processSync", this.parser || this.Parser), Nn("processSync", this.compiler || this.Compiler), this.process(n, i), qt("processSync", "process", t), r;
|
|
6977
6977
|
function i(o, l) {
|
|
6978
|
-
t = !0,
|
|
6978
|
+
t = !0, $t(o), r = l;
|
|
6979
6979
|
}
|
|
6980
6980
|
}
|
|
6981
6981
|
/**
|
|
@@ -7053,7 +7053,7 @@ class tt extends ys {
|
|
|
7053
7053
|
let r = !1, i;
|
|
7054
7054
|
return this.run(n, t, o), qt("runSync", "run", r), i;
|
|
7055
7055
|
function o(l, a) {
|
|
7056
|
-
|
|
7056
|
+
$t(l), i = a, r = !0;
|
|
7057
7057
|
}
|
|
7058
7058
|
}
|
|
7059
7059
|
/**
|
|
@@ -7200,7 +7200,7 @@ class tt extends ys {
|
|
|
7200
7200
|
else if (u.length > 0) {
|
|
7201
7201
|
let [h, ..._] = u;
|
|
7202
7202
|
const I = r[m][1];
|
|
7203
|
-
|
|
7203
|
+
jn(I) && jn(h) && (h = In(!0, I, h)), r[m] = [s, h, ..._];
|
|
7204
7204
|
}
|
|
7205
7205
|
}
|
|
7206
7206
|
}
|
|
@@ -7221,7 +7221,7 @@ function Pn(e, n) {
|
|
|
7221
7221
|
);
|
|
7222
7222
|
}
|
|
7223
7223
|
function Ut(e) {
|
|
7224
|
-
if (
|
|
7224
|
+
if (!jn(e) || typeof e.type != "string")
|
|
7225
7225
|
throw new TypeError("Expected node, got `" + e + "`");
|
|
7226
7226
|
}
|
|
7227
7227
|
function qt(e, n, t) {
|
|
@@ -7328,7 +7328,7 @@ function Ns(e) {
|
|
|
7328
7328
|
Ss.test(e.slice(0, n)) ? e : ""
|
|
7329
7329
|
);
|
|
7330
7330
|
}
|
|
7331
|
-
const Ps = "_messageWrapper_1thak_1", As = "_user_1thak_19", zs = "_assistant_1thak_24", Ms = "_avatar_1thak_28", Ds = "_avatarPlaceholder_1thak_43", Bs = "_brainbaseLogo_1thak_53", Os = "_messageBubble_1thak_58", Fs = "_error_1thak_76", Rs = "_content_1thak_81",
|
|
7331
|
+
const Ps = "_messageWrapper_1thak_1", As = "_user_1thak_19", zs = "_assistant_1thak_24", Ms = "_avatar_1thak_28", Ds = "_avatarPlaceholder_1thak_43", Bs = "_brainbaseLogo_1thak_53", Os = "_messageBubble_1thak_58", Fs = "_error_1thak_76", Rs = "_content_1thak_81", js = "_markdown_1thak_92", $s = "_cursor_1thak_183", Hs = "_errorIndicator_1thak_202", ce = {
|
|
7332
7332
|
messageWrapper: Ps,
|
|
7333
7333
|
user: As,
|
|
7334
7334
|
assistant: zs,
|
|
@@ -7338,8 +7338,8 @@ const Ps = "_messageWrapper_1thak_1", As = "_user_1thak_19", zs = "_assistant_1t
|
|
|
7338
7338
|
messageBubble: Os,
|
|
7339
7339
|
error: Fs,
|
|
7340
7340
|
content: Rs,
|
|
7341
|
-
markdown:
|
|
7342
|
-
cursor:
|
|
7341
|
+
markdown: js,
|
|
7342
|
+
cursor: $s,
|
|
7343
7343
|
errorIndicator: Hs
|
|
7344
7344
|
}, Vs = ({
|
|
7345
7345
|
message: e,
|
|
@@ -7461,7 +7461,7 @@ const Ps = "_messageWrapper_1thak_1", As = "_user_1thak_19", zs = "_assistant_1t
|
|
|
7461
7461
|
/* @__PURE__ */ x("span", { className: Se.dot }),
|
|
7462
7462
|
/* @__PURE__ */ x("span", { className: Se.dot })
|
|
7463
7463
|
] })
|
|
7464
|
-
] }), uu = "
|
|
7464
|
+
] }), uu = "_messageList_9tkjc_1", cu = "_emptyState_9tkjc_30", pu = "_emptyIcon_9tkjc_41", hu = "_emptyText_9tkjc_53", un = {
|
|
7465
7465
|
messageList: uu,
|
|
7466
7466
|
emptyState: cu,
|
|
7467
7467
|
emptyIcon: pu,
|
|
@@ -7779,10 +7779,10 @@ const Ps = "_messageWrapper_1thak_1", As = "_user_1thak_19", zs = "_assistant_1t
|
|
|
7779
7779
|
t > 0 && /* @__PURE__ */ x("span", { className: pn.unreadBadge, children: t > 9 ? "9+" : t })
|
|
7780
7780
|
]
|
|
7781
7781
|
}
|
|
7782
|
-
), Ru = "_container_kgfgt_1",
|
|
7782
|
+
), Ru = "_container_kgfgt_1", ju = "_header_kgfgt_25", $u = "_logoWrapper_kgfgt_38", Hu = "_logo_kgfgt_38", Vu = "_closeButton_kgfgt_51", Uu = "_content_kgfgt_74", qu = "_iconWrapper_kgfgt_84", Wu = "_errorIcon_kgfgt_95", Yu = "_title_kgfgt_101", Xu = "_description_kgfgt_109", Ku = "_retryButton_kgfgt_117", Qu = "_footer_kgfgt_139", Zu = "_poweredBy_kgfgt_146", Ju = "_footerLogo_kgfgt_160", ne = {
|
|
7783
7783
|
container: Ru,
|
|
7784
|
-
header:
|
|
7785
|
-
logoWrapper:
|
|
7784
|
+
header: ju,
|
|
7785
|
+
logoWrapper: $u,
|
|
7786
7786
|
logo: Hu,
|
|
7787
7787
|
closeButton: Vu,
|
|
7788
7788
|
content: Uu,
|
|
@@ -7949,12 +7949,12 @@ const Ps = "_messageWrapper_1thak_1", As = "_user_1thak_19", zs = "_assistant_1t
|
|
|
7949
7949
|
onMessage: _,
|
|
7950
7950
|
onError: I
|
|
7951
7951
|
}) => {
|
|
7952
|
-
const [E, b] = he(o), [P, v] = he(null), [F, V] = he(!0), [k, B] = he(null), [U, R] = he(),
|
|
7953
|
-
if (!(
|
|
7952
|
+
const [E, b] = he(o), [P, v] = he(null), [F, V] = he(!0), [k, B] = he(null), [U, R] = he(), j = Te(!1), N = xn(() => t ? Yr({}, r) : Ur(n), [t, r, n]), C = ge(async () => {
|
|
7953
|
+
if (!(j.current && P)) {
|
|
7954
7954
|
V(!0), B(null), R(void 0);
|
|
7955
7955
|
try {
|
|
7956
7956
|
const f = await N.getDeploymentConfig(e);
|
|
7957
|
-
v(f),
|
|
7957
|
+
v(f), j.current = !0;
|
|
7958
7958
|
} catch (f) {
|
|
7959
7959
|
const J = f instanceof Error ? f : new Error("Failed to load config");
|
|
7960
7960
|
J.message.includes("404") ? (B("not_found"), R("The chat widget with this embed ID was not found.")) : J.message.includes("Failed to fetch") || J.message.includes("network") ? B("network") : B("unknown"), t && (v({
|
|
@@ -7965,14 +7965,14 @@ const Ps = "_messageWrapper_1thak_1", As = "_user_1thak_19", zs = "_assistant_1t
|
|
|
7965
7965
|
primaryColor: "#1a1a2e",
|
|
7966
7966
|
agentName: "AI Assistant",
|
|
7967
7967
|
styling: {}
|
|
7968
|
-
}), B(null),
|
|
7968
|
+
}), B(null), j.current = !0), I == null || I(J);
|
|
7969
7969
|
} finally {
|
|
7970
7970
|
V(!1);
|
|
7971
7971
|
}
|
|
7972
7972
|
}
|
|
7973
7973
|
}, [e, t, N, I, P]);
|
|
7974
7974
|
Ge(() => {
|
|
7975
|
-
|
|
7975
|
+
j.current = !1, C();
|
|
7976
7976
|
}, [e, t, N]);
|
|
7977
7977
|
const z = xn(() => {
|
|
7978
7978
|
const f = P ?? {
|