@eloquentai/chat-sdk 0.33.15-dev → 0.33.16-dev
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.
|
@@ -5,12 +5,12 @@ import { useState as Ee, forwardRef as Te, createContext as Br, useContext as Ur
|
|
|
5
5
|
import * as Qa from "react-dom";
|
|
6
6
|
try {
|
|
7
7
|
let e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, t = new e.Error().stack;
|
|
8
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "
|
|
8
|
+
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "92b623a6-b00d-419f-bba2-e71dcdbe7984", e._sentryDebugIdIdentifier = "sentry-dbid-92b623a6-b00d-419f-bba2-e71dcdbe7984");
|
|
9
9
|
} catch {
|
|
10
10
|
}
|
|
11
11
|
{
|
|
12
12
|
let e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
13
|
-
e.SENTRY_RELEASE = { id: "
|
|
13
|
+
e.SENTRY_RELEASE = { id: "310eb4465ae6575816a8cac018a7a914bbf3b540" };
|
|
14
14
|
}
|
|
15
15
|
function Za(e) {
|
|
16
16
|
var t, n, r = "";
|
|
@@ -3844,7 +3844,7 @@ function Ds(e, t) {
|
|
|
3844
3844
|
return w.useReducer((n, r) => t[n][r] ?? n, e);
|
|
3845
3845
|
}
|
|
3846
3846
|
oe(Ds, "useStateMachine");
|
|
3847
|
-
var Ls = "ScrollArea", [Ns,
|
|
3847
|
+
var Ls = "ScrollArea", [Ns, SS] = /* @__PURE__ */ Hr(Ls), [bp, at] = Ns(Ls), Os = /* @__PURE__ */ w.forwardRef(
|
|
3848
3848
|
/* @__PURE__ */ oe(function(t, n) {
|
|
3849
3849
|
const {
|
|
3850
3850
|
__scopeScrollArea: r,
|
|
@@ -5442,7 +5442,7 @@ var Bh = function(e) {
|
|
|
5442
5442
|
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Hh(r, o, n, "aria-hidden")) : function() {
|
|
5443
5443
|
return null;
|
|
5444
5444
|
};
|
|
5445
|
-
}, Vh = Object.defineProperty, st = (e, t) => Vh(e, "name", { value: t, configurable: !0 }), Ri = "Dialog", [bu,
|
|
5445
|
+
}, Vh = Object.defineProperty, st = (e, t) => Vh(e, "name", { value: t, configurable: !0 }), Ri = "Dialog", [bu, CS] = /* @__PURE__ */ Hr(Ri), [$h, Ct] = bu(Ri), Wh = /* @__PURE__ */ st((e) => {
|
|
5446
5446
|
const {
|
|
5447
5447
|
__scopeDialog: t,
|
|
5448
5448
|
children: n,
|
|
@@ -16985,6 +16985,12 @@ function Qi(e) {
|
|
|
16985
16985
|
return (n + 0.05) / 0.05 >= r * Xk ? "#000000" : "#ffffff";
|
|
16986
16986
|
}
|
|
16987
16987
|
const Kk = "eloq:h-[0.42em] eloq:w-[0.42em] eloq:rounded-full eloq:bg-gray-400 eloq:dark:bg-gray-200 eloq:animate-thinking-dot eloq:motion-reduce:animate-none eloq:motion-reduce:opacity-70", Qk = 2e3, Zk = /* @__PURE__ */ new Set(["Routing"]), Jk = /^Thinking\.+$/;
|
|
16988
|
+
function ev(e) {
|
|
16989
|
+
let t = e.length;
|
|
16990
|
+
for (; t > 0 && e.charCodeAt(t - 1) === 46; )
|
|
16991
|
+
t--;
|
|
16992
|
+
return e.slice(0, t);
|
|
16993
|
+
}
|
|
16988
16994
|
function Ia({
|
|
16989
16995
|
messageData: e,
|
|
16990
16996
|
isBot: t,
|
|
@@ -17006,7 +17012,7 @@ function Ia({
|
|
|
17006
17012
|
return () => clearTimeout(E);
|
|
17007
17013
|
}, [f]);
|
|
17008
17014
|
const d = Zk.has(
|
|
17009
|
-
e.content
|
|
17015
|
+
ev(e.content)
|
|
17010
17016
|
), h = !!(t && e.isThinking), b = h && !f && !d, y = Vk(
|
|
17011
17017
|
b ? e.content.replace(Jk, "Thinking") : "",
|
|
17012
17018
|
b
|
|
@@ -17117,7 +17123,7 @@ const Bc = "eloq:p-4 eloq:flex eloq:flex-row eloq:items-center eloq:justify-betw
|
|
|
17117
17123
|
"eloq:rounded-2xl eloq:border": !t
|
|
17118
17124
|
}
|
|
17119
17125
|
);
|
|
17120
|
-
function
|
|
17126
|
+
function tv({
|
|
17121
17127
|
className: e,
|
|
17122
17128
|
message: t,
|
|
17123
17129
|
nextMessage: n,
|
|
@@ -17207,7 +17213,7 @@ function ev({
|
|
|
17207
17213
|
o
|
|
17208
17214
|
);
|
|
17209
17215
|
}
|
|
17210
|
-
function
|
|
17216
|
+
function nv({
|
|
17211
17217
|
value: e,
|
|
17212
17218
|
onChange: t,
|
|
17213
17219
|
disabled: n = !1
|
|
@@ -17245,16 +17251,16 @@ function tv({
|
|
|
17245
17251
|
}
|
|
17246
17252
|
);
|
|
17247
17253
|
}
|
|
17248
|
-
function
|
|
17254
|
+
function rv({ onRate: e }) {
|
|
17249
17255
|
const [t, n] = Ee(0), [r, o] = Ee(!1);
|
|
17250
17256
|
return /* @__PURE__ */ v("div", { className: "eloq:flex eloq:justify-center eloq:pt-2 eloq:pb-2", children: /* @__PURE__ */ ne("div", { className: "eloq:rounded-2xl eloq:bg-muted eloq:px-4 eloq:py-3 eloq:flex eloq:flex-col eloq:items-center eloq:gap-1.5", children: [
|
|
17251
17257
|
/* @__PURE__ */ v("p", { className: "eloq:text-sm eloq:font-medium eloq:text-foreground", children: r ? "Thanks for your feedback!" : "How was your experience" }),
|
|
17252
|
-
/* @__PURE__ */ v(
|
|
17258
|
+
/* @__PURE__ */ v(nv, { value: t, onChange: (l) => {
|
|
17253
17259
|
n(l), o(!0), e(l);
|
|
17254
17260
|
} })
|
|
17255
17261
|
] }) });
|
|
17256
17262
|
}
|
|
17257
|
-
const
|
|
17263
|
+
const ov = Br(null), iv = {
|
|
17258
17264
|
isVisible: !1,
|
|
17259
17265
|
content: null,
|
|
17260
17266
|
showCognition: () => {
|
|
@@ -17262,11 +17268,11 @@ const rv = Br(null), ov = {
|
|
|
17262
17268
|
hideCognition: () => {
|
|
17263
17269
|
}
|
|
17264
17270
|
};
|
|
17265
|
-
function iv() {
|
|
17266
|
-
return Ur(rv) ?? ov;
|
|
17267
|
-
}
|
|
17268
17271
|
function lv() {
|
|
17269
|
-
|
|
17272
|
+
return Ur(ov) ?? iv;
|
|
17273
|
+
}
|
|
17274
|
+
function av() {
|
|
17275
|
+
const e = on(), t = lv(), n = _t(null), r = _t(!0), o = _t(0), [i, l] = Ee(!1), [a, s] = Ee(!1), u = (d) => d.scrollHeight - d.scrollTop <= d.clientHeight + 60, f = (d) => {
|
|
17270
17276
|
const h = d.target;
|
|
17271
17277
|
u(h) ? (l(!1), s(!1)) : (l(!0), s(!0));
|
|
17272
17278
|
}, c = xf((d = "smooth") => {
|
|
@@ -17321,7 +17327,7 @@ function lv() {
|
|
|
17321
17327
|
const y = Array.isArray(d) ? d.map((E) => E.id).join("-") : d.id;
|
|
17322
17328
|
if (!Array.isArray(d) && d.isRatingRequest)
|
|
17323
17329
|
return /* @__PURE__ */ v(
|
|
17324
|
-
|
|
17330
|
+
rv,
|
|
17325
17331
|
{
|
|
17326
17332
|
onRate: (E) => e.onRateChat?.(E)
|
|
17327
17333
|
},
|
|
@@ -17329,7 +17335,7 @@ function lv() {
|
|
|
17329
17335
|
);
|
|
17330
17336
|
const k = e.suggestedMessages && !!e.suggestedMessageTexts?.length && !e.messages?.some((E) => E.sender === "user");
|
|
17331
17337
|
return /* @__PURE__ */ v(
|
|
17332
|
-
|
|
17338
|
+
tv,
|
|
17333
17339
|
{
|
|
17334
17340
|
message: d,
|
|
17335
17341
|
nextMessage: b[h + 1],
|
|
@@ -17361,10 +17367,10 @@ function Ra(e, t) {
|
|
|
17361
17367
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
17362
17368
|
return r;
|
|
17363
17369
|
}
|
|
17364
|
-
function
|
|
17370
|
+
function sv(e) {
|
|
17365
17371
|
if (Array.isArray(e)) return e;
|
|
17366
17372
|
}
|
|
17367
|
-
function
|
|
17373
|
+
function uv(e, t) {
|
|
17368
17374
|
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
17369
17375
|
if (n != null) {
|
|
17370
17376
|
var r, o, i, l, a = [], s = !0, u = !1;
|
|
@@ -17382,21 +17388,21 @@ function sv(e, t) {
|
|
|
17382
17388
|
return a;
|
|
17383
17389
|
}
|
|
17384
17390
|
}
|
|
17385
|
-
function
|
|
17391
|
+
function cv() {
|
|
17386
17392
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
17387
17393
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
17388
17394
|
}
|
|
17389
|
-
function cv(e, t) {
|
|
17390
|
-
return av(e) || sv(e, t) || fv(e, t) || uv();
|
|
17391
|
-
}
|
|
17392
17395
|
function fv(e, t) {
|
|
17396
|
+
return sv(e) || uv(e, t) || dv(e, t) || cv();
|
|
17397
|
+
}
|
|
17398
|
+
function dv(e, t) {
|
|
17393
17399
|
if (e) {
|
|
17394
17400
|
if (typeof e == "string") return Ra(e, t);
|
|
17395
17401
|
var n = {}.toString.call(e).slice(8, -1);
|
|
17396
17402
|
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Ra(e, t) : void 0;
|
|
17397
17403
|
}
|
|
17398
17404
|
}
|
|
17399
|
-
const Vc = Object.entries, Pa = Object.setPrototypeOf,
|
|
17405
|
+
const Vc = Object.entries, Pa = Object.setPrototypeOf, pv = Object.isFrozen, hv = Object.getPrototypeOf, mv = Object.getOwnPropertyDescriptor;
|
|
17400
17406
|
let Se = Object.freeze, Ae = Object.seal, vn = Object.create, $c = typeof Reflect < "u" && Reflect, ci = $c.apply, fi = $c.construct;
|
|
17401
17407
|
Se || (Se = function(t) {
|
|
17402
17408
|
return t;
|
|
@@ -17414,7 +17420,7 @@ fi || (fi = function(t) {
|
|
|
17414
17420
|
r[o - 1] = arguments[o];
|
|
17415
17421
|
return new t(...r);
|
|
17416
17422
|
});
|
|
17417
|
-
const Qt = ke(Array.prototype.forEach),
|
|
17423
|
+
const Qt = ke(Array.prototype.forEach), gv = ke(Array.prototype.lastIndexOf), Da = ke(Array.prototype.pop), Fn = ke(Array.prototype.push), bv = ke(Array.prototype.splice), Cn = Array.isArray, Hn = ke(String.prototype.toLowerCase), Ro = ke(String.prototype.toString), La = ke(String.prototype.match), Bn = ke(String.prototype.replace), Na = ke(String.prototype.indexOf), yv = ke(String.prototype.trim), wv = ke(Number.prototype.toString), xv = ke(Boolean.prototype.toString), Oa = typeof BigInt > "u" ? null : ke(BigInt.prototype.toString), Ma = typeof Symbol > "u" ? null : ke(Symbol.prototype.toString), $e = ke(Object.prototype.hasOwnProperty), Un = ke(Object.prototype.toString), De = ke(RegExp.prototype.test), Xt = kv(TypeError);
|
|
17418
17424
|
function ke(e) {
|
|
17419
17425
|
return function(t) {
|
|
17420
17426
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
@@ -17423,7 +17429,7 @@ function ke(e) {
|
|
|
17423
17429
|
return ci(e, t, r);
|
|
17424
17430
|
};
|
|
17425
17431
|
}
|
|
17426
|
-
function
|
|
17432
|
+
function kv(e) {
|
|
17427
17433
|
return function() {
|
|
17428
17434
|
for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
|
|
17429
17435
|
n[r] = arguments[r];
|
|
@@ -17439,13 +17445,13 @@ function ae(e, t) {
|
|
|
17439
17445
|
let o = t[r];
|
|
17440
17446
|
if (typeof o == "string") {
|
|
17441
17447
|
const i = n(o);
|
|
17442
|
-
i !== o && (
|
|
17448
|
+
i !== o && (pv(t) || (t[r] = i), o = i);
|
|
17443
17449
|
}
|
|
17444
17450
|
e[o] = !0;
|
|
17445
17451
|
}
|
|
17446
17452
|
return e;
|
|
17447
17453
|
}
|
|
17448
|
-
function
|
|
17454
|
+
function vv(e) {
|
|
17449
17455
|
for (let t = 0; t < e.length; t++)
|
|
17450
17456
|
$e(e, t) || (e[t] = null);
|
|
17451
17457
|
return e;
|
|
@@ -17453,20 +17459,20 @@ function kv(e) {
|
|
|
17453
17459
|
function Ze(e) {
|
|
17454
17460
|
const t = vn(null);
|
|
17455
17461
|
for (const r of Vc(e)) {
|
|
17456
|
-
var n =
|
|
17462
|
+
var n = fv(r, 2);
|
|
17457
17463
|
const o = n[0], i = n[1];
|
|
17458
|
-
$e(e, o) && (Cn(i) ? t[o] =
|
|
17464
|
+
$e(e, o) && (Cn(i) ? t[o] = vv(i) : i && typeof i == "object" && i.constructor === Object ? t[o] = Ze(i) : t[o] = i);
|
|
17459
17465
|
}
|
|
17460
17466
|
return t;
|
|
17461
17467
|
}
|
|
17462
|
-
function
|
|
17468
|
+
function Sv(e) {
|
|
17463
17469
|
switch (typeof e) {
|
|
17464
17470
|
case "string":
|
|
17465
17471
|
return e;
|
|
17466
17472
|
case "number":
|
|
17467
|
-
return yv(e);
|
|
17468
|
-
case "boolean":
|
|
17469
17473
|
return wv(e);
|
|
17474
|
+
case "boolean":
|
|
17475
|
+
return xv(e);
|
|
17470
17476
|
case "bigint":
|
|
17471
17477
|
return Oa ? Oa(e) : "0";
|
|
17472
17478
|
case "symbol":
|
|
@@ -17490,34 +17496,34 @@ function vv(e) {
|
|
|
17490
17496
|
}
|
|
17491
17497
|
function ft(e, t) {
|
|
17492
17498
|
for (; e !== null; ) {
|
|
17493
|
-
const r =
|
|
17499
|
+
const r = mv(e, t);
|
|
17494
17500
|
if (r) {
|
|
17495
17501
|
if (r.get)
|
|
17496
17502
|
return ke(r.get);
|
|
17497
17503
|
if (typeof r.value == "function")
|
|
17498
17504
|
return ke(r.value);
|
|
17499
17505
|
}
|
|
17500
|
-
e =
|
|
17506
|
+
e = hv(e);
|
|
17501
17507
|
}
|
|
17502
17508
|
function n() {
|
|
17503
17509
|
return null;
|
|
17504
17510
|
}
|
|
17505
17511
|
return n;
|
|
17506
17512
|
}
|
|
17507
|
-
function
|
|
17513
|
+
function Cv(e) {
|
|
17508
17514
|
try {
|
|
17509
17515
|
return De(e, ""), !0;
|
|
17510
17516
|
} catch {
|
|
17511
17517
|
return !1;
|
|
17512
17518
|
}
|
|
17513
17519
|
}
|
|
17514
|
-
const za = Se(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Po = Se(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Do = Se(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]),
|
|
17520
|
+
const za = Se(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Po = Se(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Do = Se(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Ev = Se(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Lo = Se(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Av = Se(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Fa = Se(["#text"]), Ba = Se(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), No = Se(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dominant-baseline", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "pointer-events", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-orientation", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "vector-effect", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Ua = Se(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), _r = Se(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Tv = Ae(/{{[\w\W]*|^[\w\W]*}}/g), qv = Ae(/<%[\w\W]*|^[\w\W]*%>/g), _v = Ae(/\${[\w\W]*/g), Iv = Ae(/^data-[\-\w.\u00B7-\uFFFF]+$/), Rv = Ae(/^aria-[\-\w]+$/), Ha = Ae(
|
|
17515
17521
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
17516
17522
|
// eslint-disable-line no-useless-escape
|
|
17517
|
-
),
|
|
17523
|
+
), Pv = Ae(/^(?:\w+script|data):/i), Dv = Ae(
|
|
17518
17524
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
17519
17525
|
// eslint-disable-line no-control-regex
|
|
17520
|
-
),
|
|
17526
|
+
), Lv = Ae(/^html$/i), Nv = Ae(/^[a-z][.\w]*(-[.\w]+)+$/i), ja = Ae(/<[/\w!]/g), Va = Ae(/<[/\w]/g), Ov = Ae(/<\/no(script|embed|frames)/i), Mv = Ae(/\/>/i), Ke = {
|
|
17521
17527
|
element: 1,
|
|
17522
17528
|
attribute: 2,
|
|
17523
17529
|
text: 3,
|
|
@@ -17533,14 +17539,14 @@ const za = Se(["a", "abbr", "acronym", "address", "area", "article", "aside", "a
|
|
|
17533
17539
|
documentFragment: 11,
|
|
17534
17540
|
notation: 12
|
|
17535
17541
|
// Deprecated
|
|
17536
|
-
}, Wc = ["style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript"],
|
|
17542
|
+
}, Wc = ["style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript"], zv = Se(ae({}, Wc)), Fv = (function() {
|
|
17537
17543
|
const e = {};
|
|
17538
17544
|
return Qt(Wc, (t) => {
|
|
17539
17545
|
e[t] = Ae(new RegExp("</" + t + "(?=[\\t\\n\\f\\r />])", "i"));
|
|
17540
17546
|
}), Se(e);
|
|
17541
|
-
})(),
|
|
17547
|
+
})(), Bv = function() {
|
|
17542
17548
|
return typeof window > "u" ? null : window;
|
|
17543
|
-
},
|
|
17549
|
+
}, Uv = function(t, n) {
|
|
17544
17550
|
if (typeof t != "object" || typeof t.createPolicy != "function")
|
|
17545
17551
|
return null;
|
|
17546
17552
|
let r = null;
|
|
@@ -17578,7 +17584,7 @@ const za = Se(["a", "abbr", "acronym", "address", "area", "article", "aside", "a
|
|
|
17578
17584
|
return o && typeof o == "object" ? Ze(o) : r();
|
|
17579
17585
|
};
|
|
17580
17586
|
function Gc() {
|
|
17581
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
17587
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Bv();
|
|
17582
17588
|
const t = (L) => Gc(L);
|
|
17583
17589
|
if (t.version = "3.4.14", t.removed = [], !e || !e.document || e.document.nodeType !== Ke.document || !e.Element)
|
|
17584
17590
|
return t.isSupported = !1, t;
|
|
@@ -17615,11 +17621,11 @@ function Gc() {
|
|
|
17615
17621
|
K--;
|
|
17616
17622
|
}
|
|
17617
17623
|
}, ce = function() {
|
|
17618
|
-
return R || (M =
|
|
17624
|
+
return R || (M = Uv(c, o), R = !0), M;
|
|
17619
17625
|
}, we = n, qe = we.implementation, g = we.createNodeIterator, _e = we.createDocumentFragment, Ue = we.getElementsByTagName, x = r.importNode;
|
|
17620
17626
|
let J = $a();
|
|
17621
17627
|
t.isSupported = typeof Vc == "function" && typeof k == "function" && qe && qe.createHTMLDocument !== void 0;
|
|
17622
|
-
const ge =
|
|
17628
|
+
const ge = Tv, ie = qv, et = _v, Xe = Iv, fe = Rv, ut = Pv, tt = Dv, Lt = Nv;
|
|
17623
17629
|
let Nt = Ha, ue = null;
|
|
17624
17630
|
const an = ae({}, [...za, ...Po, ...Do, ...Lo, ...Fa]);
|
|
17625
17631
|
let de = null;
|
|
@@ -17736,7 +17742,7 @@ function Gc() {
|
|
|
17736
17742
|
transform: ye
|
|
17737
17743
|
}), _n = Bt(m, "FORBID_ATTR", Ze({}), {
|
|
17738
17744
|
transform: ye
|
|
17739
|
-
}), un = $e(m, "USE_PROFILES") ? m.USE_PROFILES && typeof m.USE_PROFILES == "object" ? Ze(m.USE_PROFILES) : m.USE_PROFILES : !1, or = m.ALLOW_ARIA_ATTR !== !1, In = m.ALLOW_DATA_ATTR !== !1, ir = m.ALLOW_UNKNOWN_PROTOCOLS || !1, lr = m.ALLOW_SELF_CLOSE_IN_ATTR !== !1, q = m.SAFE_FOR_TEMPLATES || !1, O = m.SAFE_FOR_XML !== !1, G = m.WHOLE_DOCUMENT || !1, Re = m.RETURN_DOM || !1, gt = m.RETURN_DOM_FRAGMENT || !1, bt = m.RETURN_TRUSTED_TYPE || !1, ct = m.FORCE_BODY || !1, Pe = m.SANITIZE_DOM !== !1, At = m.SANITIZE_NAMED_PROPS || !1, Xr = m.KEEP_CONTENT !== !1, Kr = m.IN_PLACE || !1, Nt =
|
|
17745
|
+
}), un = $e(m, "USE_PROFILES") ? m.USE_PROFILES && typeof m.USE_PROFILES == "object" ? Ze(m.USE_PROFILES) : m.USE_PROFILES : !1, or = m.ALLOW_ARIA_ATTR !== !1, In = m.ALLOW_DATA_ATTR !== !1, ir = m.ALLOW_UNKNOWN_PROTOCOLS || !1, lr = m.ALLOW_SELF_CLOSE_IN_ATTR !== !1, q = m.SAFE_FOR_TEMPLATES || !1, O = m.SAFE_FOR_XML !== !1, G = m.WHOLE_DOCUMENT || !1, Re = m.RETURN_DOM || !1, gt = m.RETURN_DOM_FRAGMENT || !1, bt = m.RETURN_TRUSTED_TYPE || !1, ct = m.FORCE_BODY || !1, Pe = m.SANITIZE_DOM !== !1, At = m.SANITIZE_NAMED_PROPS || !1, Xr = m.KEEP_CONTENT !== !1, Kr = m.IN_PLACE || !1, Nt = Cv(m.ALLOWED_URI_REGEXP) ? m.ALLOWED_URI_REGEXP : Ha, fn = typeof m.NAMESPACE == "string" ? m.NAMESPACE : yt, Jr = Oo(
|
|
17740
17746
|
m,
|
|
17741
17747
|
"MATHML_TEXT_INTEGRATION_POINTS",
|
|
17742
17748
|
() => ae({}, rl)
|
|
@@ -17762,7 +17768,7 @@ function Gc() {
|
|
|
17762
17768
|
}
|
|
17763
17769
|
} else m.TRUSTED_TYPES_POLICY === null ? (F = void 0, C = "") : (F === void 0 && (F = ce()), F && typeof C == "string" && (C = z("")));
|
|
17764
17770
|
Se && Se(m), dn = m;
|
|
17765
|
-
}, ll = ae({}, [...Po, ...Do, ...
|
|
17771
|
+
}, ll = ae({}, [...Po, ...Do, ...Ev]), al = ae({}, [...Lo, ...Av]), uf = function(m, S, _) {
|
|
17766
17772
|
return S.namespaceURI === yt ? m === "svg" : S.namespaceURI === ar ? m === "svg" && (_ === "annotation-xml" || Jr[_]) : !!ll[m];
|
|
17767
17773
|
}, cf = function(m, S, _) {
|
|
17768
17774
|
return S.namespaceURI === yt ? m === "math" : S.namespaceURI === sr ? m === "math" && eo[_] : !!al[m];
|
|
@@ -17990,7 +17996,7 @@ function Gc() {
|
|
|
17990
17996
|
});
|
|
17991
17997
|
}
|
|
17992
17998
|
const mf = function(m, S) {
|
|
17993
|
-
return !!(O && m.hasChildNodes() && !Pn(m.firstElementChild) && De(ja, m.textContent) && De(ja, m.innerHTML) || O && m.namespaceURI === yt &&
|
|
17999
|
+
return !!(O && m.hasChildNodes() && !Pn(m.firstElementChild) && De(ja, m.textContent) && De(ja, m.innerHTML) || O && m.namespaceURI === yt && zv[S] && (Pn(m.firstElementChild) || typeof m.textContent == "string" && De(Fv[S], m.textContent)) || m.nodeType === Ke.processingInstruction || O && m.nodeType === Ke.comment && De(Va, m.data));
|
|
17994
18000
|
}, pr = function(m, S) {
|
|
17995
18001
|
if (m instanceof RegExp)
|
|
17996
18002
|
return De(m, S);
|
|
@@ -18035,7 +18041,7 @@ function Gc() {
|
|
|
18035
18041
|
const $ = gf(m, _, S);
|
|
18036
18042
|
return $ === !1 && wt(J.afterSanitizeElements, m, null), $;
|
|
18037
18043
|
}
|
|
18038
|
-
if (U(m) === Ke.element && !df(m) || (_ === "noscript" || _ === "noembed" || _ === "noframes") && De(
|
|
18044
|
+
if (U(m) === Ke.element && !df(m) || (_ === "noscript" || _ === "noembed" || _ === "noframes") && De(Ov, m.innerHTML))
|
|
18039
18045
|
return Mt(m), !0;
|
|
18040
18046
|
if (q && m.nodeType === Ke.text) {
|
|
18041
18047
|
const $ = fr(m.textContent);
|
|
@@ -18091,7 +18097,7 @@ function Gc() {
|
|
|
18091
18097
|
const $ = ye(m.nodeName);
|
|
18092
18098
|
for (; B--; ) {
|
|
18093
18099
|
const Y = S[B], me = Y.name, be = Y.namespaceURI, He = Y.value, je = ye(me), oo = He;
|
|
18094
|
-
let Oe = me === "value" ? oo :
|
|
18100
|
+
let Oe = me === "value" ? oo : yv(oo);
|
|
18095
18101
|
if (_.attrName = je, _.attrValue = Oe, _.keepAttr = !0, _.forceKeepAttr = void 0, wt(J.uponSanitizeAttribute, m, _), Oe = _.attrValue, At && (je === "id" || je === "name") && Na(Oe, rt) !== 0 && ($t(me, m, Y), Oe = rt + Oe), O && De(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, Oe)) {
|
|
18096
18102
|
$t(me, m, Y);
|
|
18097
18103
|
continue;
|
|
@@ -18105,7 +18111,7 @@ function Gc() {
|
|
|
18105
18111
|
$t(me, m, Y);
|
|
18106
18112
|
continue;
|
|
18107
18113
|
}
|
|
18108
|
-
if (!lr && De(
|
|
18114
|
+
if (!lr && De(Mv, Oe)) {
|
|
18109
18115
|
$t(me, m, Y);
|
|
18110
18116
|
continue;
|
|
18111
18117
|
}
|
|
@@ -18168,7 +18174,7 @@ function Gc() {
|
|
|
18168
18174
|
};
|
|
18169
18175
|
return t.sanitize = function(L) {
|
|
18170
18176
|
let m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, S = null, _ = null, B = null, $ = null;
|
|
18171
|
-
if (Qr = !L, Qr && (L = "<!-->"), typeof L != "string" && !Pn(L) && (L =
|
|
18177
|
+
if (Qr = !L, Qr && (L = "<!-->"), typeof L != "string" && !Pn(L) && (L = Sv(L), typeof L != "string"))
|
|
18172
18178
|
throw Xt("dirty is not a string, aborting");
|
|
18173
18179
|
if (!t.isSupported)
|
|
18174
18180
|
return L;
|
|
@@ -18222,7 +18228,7 @@ function Gc() {
|
|
|
18222
18228
|
return (de.shadowroot || de.shadowrootmode) && ($ = x.call(r, $, !0)), $;
|
|
18223
18229
|
}
|
|
18224
18230
|
let be = G ? S.outerHTML : S.innerHTML;
|
|
18225
|
-
return G && ue["!doctype"] && S.ownerDocument && S.ownerDocument.doctype && S.ownerDocument.doctype.name && De(
|
|
18231
|
+
return G && ue["!doctype"] && S.ownerDocument && S.ownerDocument.doctype && S.ownerDocument.doctype.name && De(Lv, S.ownerDocument.doctype.name) && (be = "<!DOCTYPE " + S.ownerDocument.doctype.name + `>
|
|
18226
18232
|
` + be), q && (be = fr(be)), F && bt ? z(be) : be;
|
|
18227
18233
|
}, t.setConfig = function() {
|
|
18228
18234
|
let L = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
@@ -18238,8 +18244,8 @@ function Gc() {
|
|
|
18238
18244
|
}, t.removeHook = function(L, m) {
|
|
18239
18245
|
if ($e(J, L)) {
|
|
18240
18246
|
if (m !== void 0) {
|
|
18241
|
-
const S =
|
|
18242
|
-
return S === -1 ? void 0 :
|
|
18247
|
+
const S = gv(J[L], m);
|
|
18248
|
+
return S === -1 ? void 0 : bv(J[L], S, 1)[0];
|
|
18243
18249
|
}
|
|
18244
18250
|
return Da(J[L]);
|
|
18245
18251
|
}
|
|
@@ -18264,9 +18270,9 @@ const Yc = Te(
|
|
|
18264
18270
|
)
|
|
18265
18271
|
);
|
|
18266
18272
|
Yc.displayName = "Textarea";
|
|
18267
|
-
const
|
|
18268
|
-
function
|
|
18269
|
-
const t =
|
|
18273
|
+
const Hv = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
18274
|
+
function jv(e) {
|
|
18275
|
+
const t = Hv.exec(e.trim());
|
|
18270
18276
|
if (!t) return null;
|
|
18271
18277
|
let n = t[1];
|
|
18272
18278
|
return n.length === 3 && (n = n.split("").map((r) => r + r).join("")), [
|
|
@@ -18275,7 +18281,7 @@ function Hv(e) {
|
|
|
18275
18281
|
Number.parseInt(n.slice(4, 6), 16)
|
|
18276
18282
|
];
|
|
18277
18283
|
}
|
|
18278
|
-
function
|
|
18284
|
+
function Vv([e, t, n]) {
|
|
18279
18285
|
const r = e / 255, o = t / 255, i = n / 255, l = Math.max(r, o, i), a = Math.min(r, o, i), s = l - a, u = (l + a) / 2;
|
|
18280
18286
|
if (s === 0)
|
|
18281
18287
|
return { hue: 0, saturation: 0, lightness: u };
|
|
@@ -18291,11 +18297,11 @@ function Wa({ hue: e, saturation: t, lightness: n }) {
|
|
|
18291
18297
|
n * 100
|
|
18292
18298
|
)}%)`;
|
|
18293
18299
|
}
|
|
18294
|
-
function
|
|
18295
|
-
const t = e ?
|
|
18300
|
+
function $v(e) {
|
|
18301
|
+
const t = e ? jv(e) : null;
|
|
18296
18302
|
if (!t)
|
|
18297
18303
|
return { strong: "hsl(0 0% 62%)", soft: "hsl(0 0% 82%)" };
|
|
18298
|
-
const { hue: n, saturation: r, lightness: o } =
|
|
18304
|
+
const { hue: n, saturation: r, lightness: o } = Vv(t), i = {
|
|
18299
18305
|
hue: n,
|
|
18300
18306
|
saturation: Ir(Math.max(r * 1.35, r + 0.25)),
|
|
18301
18307
|
lightness: Math.min(Ir(o + 0.45), 0.95)
|
|
@@ -18306,7 +18312,7 @@ function Vv(e) {
|
|
|
18306
18312
|
};
|
|
18307
18313
|
return { strong: Wa(i), soft: Wa(l) };
|
|
18308
18314
|
}
|
|
18309
|
-
function
|
|
18315
|
+
function Wv() {
|
|
18310
18316
|
const e = _t(!1), t = _t(0), n = _t(0);
|
|
18311
18317
|
return {
|
|
18312
18318
|
onMouseDown: (a) => {
|
|
@@ -18328,18 +18334,18 @@ function $v() {
|
|
|
18328
18334
|
}
|
|
18329
18335
|
};
|
|
18330
18336
|
}
|
|
18331
|
-
const
|
|
18332
|
-
function
|
|
18337
|
+
const Gv = 1100, Ga = 4e3, Yv = 9e3;
|
|
18338
|
+
function Xv(e) {
|
|
18333
18339
|
const [t, n] = Ee(!1);
|
|
18334
18340
|
return Ht(() => {
|
|
18335
18341
|
if (!e) return;
|
|
18336
18342
|
let r, o = !1;
|
|
18337
18343
|
const i = () => {
|
|
18338
|
-
const l = Ga + Math.random() * (
|
|
18344
|
+
const l = Ga + Math.random() * (Yv - Ga);
|
|
18339
18345
|
r = setTimeout(() => {
|
|
18340
18346
|
o || (n(!0), r = setTimeout(() => {
|
|
18341
18347
|
o || (n(!1), i());
|
|
18342
|
-
},
|
|
18348
|
+
}, Gv));
|
|
18343
18349
|
}, l);
|
|
18344
18350
|
};
|
|
18345
18351
|
return i(), () => {
|
|
@@ -18347,7 +18353,7 @@ function Yv(e) {
|
|
|
18347
18353
|
};
|
|
18348
18354
|
}, [e]), t;
|
|
18349
18355
|
}
|
|
18350
|
-
function
|
|
18356
|
+
function Kv() {
|
|
18351
18357
|
const [e, t] = Ee(!1), n = _t(null);
|
|
18352
18358
|
return { scrollContainerRef: (o) => {
|
|
18353
18359
|
if (n.current?.disconnect(), n.current = null, !o) return;
|
|
@@ -18362,12 +18368,12 @@ function Xv() {
|
|
|
18362
18368
|
}
|
|
18363
18369
|
}, hasOverflow: e };
|
|
18364
18370
|
}
|
|
18365
|
-
function
|
|
18366
|
-
const t = on(), n = xi(), r =
|
|
18371
|
+
function Qv({ onSelect: e }) {
|
|
18372
|
+
const t = on(), n = xi(), r = Wv(), { scrollContainerRef: o, hasOverflow: i } = Kv(), l = !!t.messages?.some(
|
|
18367
18373
|
(b) => b.sender === "user"
|
|
18368
|
-
), a = t.suggestedMessageTexts ?? [], s = !!t.suggestedMessages && a.length > 0 && !l, u = !!t.hasSuggestedMessageAura && s, f = !!t.hasSuggestedMessageShine && s, c =
|
|
18374
|
+
), a = t.suggestedMessageTexts ?? [], s = !!t.suggestedMessages && a.length > 0 && !l, u = !!t.hasSuggestedMessageAura && s, f = !!t.hasSuggestedMessageShine && s, c = Xv(f);
|
|
18369
18375
|
if (!s) return null;
|
|
18370
|
-
const p = u ?
|
|
18376
|
+
const p = u ? $v(n.suggestedMessageBubbleColor || n.userBubbleColor) : null, d = n.suggestedMessageBubbleColor ? {
|
|
18371
18377
|
backgroundColor: n.suggestedMessageBubbleColor,
|
|
18372
18378
|
color: n.suggestedMessageBubbleTextColor || Qi(n.suggestedMessageBubbleColor)
|
|
18373
18379
|
} : void 0, h = (b, y = {
|
|
@@ -18456,7 +18462,7 @@ const Ya = {
|
|
|
18456
18462
|
5032: "I am sorry this service is currently unavailable, please try again later.",
|
|
18457
18463
|
5001: "We are currently facing technical difficulties. Please try again later.",
|
|
18458
18464
|
DEFAULT: "Something went wrong. Please try again later."
|
|
18459
|
-
},
|
|
18465
|
+
}, Zv = (e) => Ya[e] || Ya.DEFAULT, Jv = Br({
|
|
18460
18466
|
error: null,
|
|
18461
18467
|
hideSdk: !1,
|
|
18462
18468
|
publishApiError: () => {
|
|
@@ -18467,13 +18473,13 @@ const Ya = {
|
|
|
18467
18473
|
},
|
|
18468
18474
|
clearError: () => {
|
|
18469
18475
|
}
|
|
18470
|
-
}),
|
|
18471
|
-
const e = Ur(
|
|
18476
|
+
}), eS = () => {
|
|
18477
|
+
const e = Ur(Jv);
|
|
18472
18478
|
if (e === void 0)
|
|
18473
18479
|
throw new Error("useError must be used within an ErrorProvider");
|
|
18474
18480
|
return e;
|
|
18475
|
-
},
|
|
18476
|
-
const n = Number(t.response.errors[0].error_code), r =
|
|
18481
|
+
}, ES = (e) => (t) => {
|
|
18482
|
+
const n = Number(t.response.errors[0].error_code), r = Zv(n);
|
|
18477
18483
|
e({ code: n, message: r });
|
|
18478
18484
|
}, Xa = {
|
|
18479
18485
|
warning: {
|
|
@@ -18504,7 +18510,7 @@ const Ya = {
|
|
|
18504
18510
|
iconColor: "eloq:text-green-500 eloq:dark:text-green-400",
|
|
18505
18511
|
icon: qd
|
|
18506
18512
|
}
|
|
18507
|
-
},
|
|
18513
|
+
}, tS = ({ message: e, type: t }) => {
|
|
18508
18514
|
const n = Xa[t] || Xa.warning, r = n.icon;
|
|
18509
18515
|
return /* @__PURE__ */ ne(
|
|
18510
18516
|
"div",
|
|
@@ -18520,15 +18526,15 @@ const Ya = {
|
|
|
18520
18526
|
Fr.isSupported && Fr.addHook("afterSanitizeAttributes", (e) => {
|
|
18521
18527
|
e.tagName === "A" && (e.setAttribute("rel", "noopener noreferrer"), e.hasAttribute("target") && e.setAttribute("target", "_blank"));
|
|
18522
18528
|
});
|
|
18523
|
-
const
|
|
18524
|
-
function
|
|
18529
|
+
const nS = "eloq:bg-card eloq:rounded-3xl eloq:shadow-[0_0_4px_0_rgba(0,0,0,0.20)] eloq:dark:shadow-none eloq:dark:border eloq:dark:border-border", rS = "eloq:w-full eloq:rounded-t-2xl eloq:bg-cream eloq:border-t eloq:border-x eloq:border-border eloq:px-5 eloq:pt-5 eloq:pb-4 eloq:shadow-[0_-8px_24px_rgba(0,0,0,0.08)] eloq:dark:shadow-none", oS = "eloq:flex eloq:items-center eloq:justify-between eloq:w-[70%] eloq:m-auto eloq:rounded-full eloq:py-2 eloq:pl-4 eloq:pr-2 eloq:text-sm eloq:font-semibold eloq:transition-opacity eloq:hover:opacity-90 eloq:focus-visible:outline-none eloq:focus-visible:ring-2 eloq:focus-visible:ring-primary eloq:focus-visible:ring-offset-2", iS = "eloq:bg-cream", lS = "eloq:bg-muted-foreground eloq:dark:bg-muted eloq:dark:text-muted-foreground/50";
|
|
18530
|
+
function aS() {
|
|
18525
18531
|
const [e, t] = Ee(!1);
|
|
18526
18532
|
return Ht(() => {
|
|
18527
18533
|
t(!0);
|
|
18528
18534
|
}, []), e && Fr.isSupported;
|
|
18529
18535
|
}
|
|
18530
|
-
function
|
|
18531
|
-
const { error: e } =
|
|
18536
|
+
function sS() {
|
|
18537
|
+
const { error: e } = eS(), t = !!e, n = on(), r = _t(null), [o, i] = Ee(""), l = xi(), a = !!n.messages?.some((b) => b.isRatingRequest), s = n.keyboardInset ?? 0, u = aS(), f = l.userBubbleTextColor || Qi(l.userBubbleColor), c = () => o.trim() && !t && !a ? {
|
|
18532
18538
|
backgroundColor: l.userBubbleColor,
|
|
18533
18539
|
color: f
|
|
18534
18540
|
} : {}, p = (b) => {
|
|
@@ -18557,7 +18563,7 @@ function aS() {
|
|
|
18557
18563
|
n.isChatClosed ? /* @__PURE__ */ v("div", { className: "eloq:w-full eloq:z-20 eloq:animate-slide-up-in", children: /* @__PURE__ */ ne(
|
|
18558
18564
|
"div",
|
|
18559
18565
|
{
|
|
18560
|
-
className:
|
|
18566
|
+
className: rS,
|
|
18561
18567
|
role: "status",
|
|
18562
18568
|
"aria-live": "polite",
|
|
18563
18569
|
children: [
|
|
@@ -18567,7 +18573,7 @@ function aS() {
|
|
|
18567
18573
|
{
|
|
18568
18574
|
type: "button",
|
|
18569
18575
|
onClick: () => n.onStartNewChat?.(),
|
|
18570
|
-
className:
|
|
18576
|
+
className: oS,
|
|
18571
18577
|
style: {
|
|
18572
18578
|
backgroundColor: l.userBubbleColor,
|
|
18573
18579
|
color: f
|
|
@@ -18581,21 +18587,21 @@ function aS() {
|
|
|
18581
18587
|
]
|
|
18582
18588
|
}
|
|
18583
18589
|
) }) : /* @__PURE__ */ ne(tn, { children: [
|
|
18584
|
-
/* @__PURE__ */ v(
|
|
18590
|
+
/* @__PURE__ */ v(Qv, { onSelect: p }),
|
|
18585
18591
|
/* @__PURE__ */ ne(
|
|
18586
18592
|
"div",
|
|
18587
18593
|
{
|
|
18588
18594
|
className: "eloq:flex eloq:flex-col eloq:w-full eloq:items-center eloq:px-4 eloq:mx-1 eloq:pb-4 eloq:-mt-6 eloq:z-20",
|
|
18589
18595
|
style: s ? { transform: `translateY(-${s}px)` } : void 0,
|
|
18590
18596
|
children: [
|
|
18591
|
-
t && /* @__PURE__ */ v(
|
|
18597
|
+
t && /* @__PURE__ */ v(tS, { message: e.message, type: "error" }),
|
|
18592
18598
|
/* @__PURE__ */ ne(
|
|
18593
18599
|
"form",
|
|
18594
18600
|
{
|
|
18595
18601
|
className: "eloq:relative eloq:flex eloq:items-center eloq:w-full eloq:m-0",
|
|
18596
18602
|
onSubmit: d,
|
|
18597
18603
|
children: [
|
|
18598
|
-
/* @__PURE__ */ v("div", { className: Z("eloq:flex-1",
|
|
18604
|
+
/* @__PURE__ */ v("div", { className: Z("eloq:flex-1", nS), children: /* @__PURE__ */ v(
|
|
18599
18605
|
Yc,
|
|
18600
18606
|
{
|
|
18601
18607
|
ref: r,
|
|
@@ -18630,7 +18636,7 @@ function aS() {
|
|
|
18630
18636
|
disabled: !o.trim() || t || a,
|
|
18631
18637
|
className: Z(
|
|
18632
18638
|
"eloq:absolute eloq:top-0 eloq:bottom-2 eloq:right-2 eloq:self-end eloq:p-2 eloq:text-muted eloq:rounded-full eloq:transition-colors",
|
|
18633
|
-
o.trim() && !t ? "eloq:text-primary-foreground" :
|
|
18639
|
+
o.trim() && !t ? "eloq:text-primary-foreground" : lS
|
|
18634
18640
|
),
|
|
18635
18641
|
style: c(),
|
|
18636
18642
|
children: /* @__PURE__ */ v(vd, { className: "eloq:h-4 eloq:w-4" })
|
|
@@ -18648,7 +18654,7 @@ function aS() {
|
|
|
18648
18654
|
{
|
|
18649
18655
|
className: Z(
|
|
18650
18656
|
"eloq:w-full eloq:flex eloq:flex-col eloq:items-center eloq:justify-center eloq:space-x-2 eloq:px-0",
|
|
18651
|
-
|
|
18657
|
+
iS
|
|
18652
18658
|
),
|
|
18653
18659
|
children: [
|
|
18654
18660
|
/* @__PURE__ */ ne("div", { className: "eloq:w-full eloq:flex eloq:items-center eloq:justify-center eloq:space-x-2 eloq:py-1", children: [
|
|
@@ -18679,16 +18685,16 @@ function aS() {
|
|
|
18679
18685
|
)
|
|
18680
18686
|
] });
|
|
18681
18687
|
}
|
|
18682
|
-
var
|
|
18688
|
+
var uS = Object.defineProperty, Rt = (e, t) => uS(e, "name", { value: t, configurable: !0 }), Xc = "Avatar", [cS, AS] = /* @__PURE__ */ Hr(Xc), fS = [
|
|
18683
18689
|
0,
|
|
18684
18690
|
() => {
|
|
18685
18691
|
}
|
|
18686
|
-
], [
|
|
18692
|
+
], [dS, Kc] = cS(Xc), Qc = /* @__PURE__ */ w.forwardRef(
|
|
18687
18693
|
// blank line to reduce diff noise
|
|
18688
18694
|
/* @__PURE__ */ Rt(function(t, n) {
|
|
18689
18695
|
const { __scopeAvatar: r, ...o } = t, [i, l] = w.useState("idle"), [a, s] = tf();
|
|
18690
18696
|
return /* @__PURE__ */ v(
|
|
18691
|
-
|
|
18697
|
+
dS,
|
|
18692
18698
|
{
|
|
18693
18699
|
scope: r,
|
|
18694
18700
|
imageLoadingStatus: i,
|
|
@@ -18699,9 +18705,9 @@ var sS = Object.defineProperty, Rt = (e, t) => sS(e, "name", { value: t, configu
|
|
|
18699
18705
|
}
|
|
18700
18706
|
);
|
|
18701
18707
|
}, "Avatar")
|
|
18702
|
-
),
|
|
18708
|
+
), pS = "AvatarImage", Zc = /* @__PURE__ */ w.forwardRef(
|
|
18703
18709
|
/* @__PURE__ */ Rt(function(t, n) {
|
|
18704
|
-
const { __scopeAvatar: r, src: o, onLoadingStatusChange: i, ...l } = t, a = Kc(
|
|
18710
|
+
const { __scopeAvatar: r, src: o, onLoadingStatusChange: i, ...l } = t, a = Kc(pS, r);
|
|
18705
18711
|
a.setImageCount;
|
|
18706
18712
|
const s = ef(o, {
|
|
18707
18713
|
referrerPolicy: l.referrerPolicy,
|
|
@@ -18716,9 +18722,9 @@ var sS = Object.defineProperty, Rt = (e, t) => sS(e, "name", { value: t, configu
|
|
|
18716
18722
|
f.current = s, s !== c && u(s);
|
|
18717
18723
|
}, [s, u]), s === "loaded" ? /* @__PURE__ */ v(Be.img, { ...l, ref: n, src: o }) : null;
|
|
18718
18724
|
}, "AvatarImage")
|
|
18719
|
-
),
|
|
18725
|
+
), hS = "AvatarFallback", Jc = /* @__PURE__ */ w.forwardRef(
|
|
18720
18726
|
/* @__PURE__ */ Rt(function(t, n) {
|
|
18721
|
-
const { __scopeAvatar: r, delayMs: o, ...i } = t, l = Kc(
|
|
18727
|
+
const { __scopeAvatar: r, delayMs: o, ...i } = t, l = Kc(hS, r), [a, s] = w.useState(o === void 0);
|
|
18722
18728
|
return w.useEffect(() => {
|
|
18723
18729
|
if (o !== void 0) {
|
|
18724
18730
|
const u = window.setTimeout(() => s(!0), o);
|
|
@@ -18753,12 +18759,12 @@ function di(e) {
|
|
|
18753
18759
|
}
|
|
18754
18760
|
Rt(di, "getImageLoadingStatus");
|
|
18755
18761
|
function tf() {
|
|
18756
|
-
return
|
|
18762
|
+
return fS;
|
|
18757
18763
|
}
|
|
18758
18764
|
Rt(tf, "useImageCount");
|
|
18759
|
-
function
|
|
18765
|
+
function mS(e) {
|
|
18760
18766
|
}
|
|
18761
|
-
Rt(
|
|
18767
|
+
Rt(mS, "useUpdateImageCount");
|
|
18762
18768
|
const nf = Te(({ className: e, ...t }, n) => /* @__PURE__ */ v(
|
|
18763
18769
|
Qc,
|
|
18764
18770
|
{
|
|
@@ -18771,7 +18777,7 @@ const nf = Te(({ className: e, ...t }, n) => /* @__PURE__ */ v(
|
|
|
18771
18777
|
}
|
|
18772
18778
|
));
|
|
18773
18779
|
nf.displayName = Qc.displayName;
|
|
18774
|
-
const
|
|
18780
|
+
const gS = Te(({ className: e, ...t }, n) => /* @__PURE__ */ v(
|
|
18775
18781
|
Zc,
|
|
18776
18782
|
{
|
|
18777
18783
|
ref: n,
|
|
@@ -18779,8 +18785,8 @@ const mS = Te(({ className: e, ...t }, n) => /* @__PURE__ */ v(
|
|
|
18779
18785
|
...t
|
|
18780
18786
|
}
|
|
18781
18787
|
));
|
|
18782
|
-
|
|
18783
|
-
const
|
|
18788
|
+
gS.displayName = Zc.displayName;
|
|
18789
|
+
const bS = Te(({ className: e, ...t }, n) => /* @__PURE__ */ v(
|
|
18784
18790
|
Jc,
|
|
18785
18791
|
{
|
|
18786
18792
|
ref: n,
|
|
@@ -18791,14 +18797,14 @@ const gS = Te(({ className: e, ...t }, n) => /* @__PURE__ */ v(
|
|
|
18791
18797
|
...t
|
|
18792
18798
|
}
|
|
18793
18799
|
));
|
|
18794
|
-
|
|
18795
|
-
const
|
|
18796
|
-
function
|
|
18800
|
+
bS.displayName = Jc.displayName;
|
|
18801
|
+
const yS = "eloq:shadow-[0_3px_4px_-2px_rgba(0,0,0,0.04)] eloq:dark:shadow-none eloq:dark:border-b eloq:dark:border-border", Ka = "eloq:text-gray-400 eloq:hover:text-gray-600 eloq:dark:hover:text-gray-300 eloq:p-2";
|
|
18802
|
+
function wS({
|
|
18797
18803
|
onCleanChat: e,
|
|
18798
18804
|
onClose: t
|
|
18799
18805
|
}) {
|
|
18800
18806
|
const n = on(), r = n.hasCleanChatButton ?? n.cleanChatButton ?? !0, o = n.hasCloseButton ?? n.closeButton ?? !0;
|
|
18801
|
-
return /* @__PURE__ */ ne(bi, { className: Z(Bc,
|
|
18807
|
+
return /* @__PURE__ */ ne(bi, { className: Z(Bc, yS), children: [
|
|
18802
18808
|
/* @__PURE__ */ ne("div", { className: Uc, children: [
|
|
18803
18809
|
/* @__PURE__ */ v(nf, { className: "eloq:h-10 eloq:w-10", children: /* @__PURE__ */ v(
|
|
18804
18810
|
mi,
|
|
@@ -18819,7 +18825,7 @@ function yS({
|
|
|
18819
18825
|
] })
|
|
18820
18826
|
] });
|
|
18821
18827
|
}
|
|
18822
|
-
function
|
|
18828
|
+
function TS(e) {
|
|
18823
18829
|
const {
|
|
18824
18830
|
isOpen: t = !1,
|
|
18825
18831
|
isMobile: n,
|
|
@@ -18844,14 +18850,14 @@ function AS(e) {
|
|
|
18844
18850
|
}
|
|
18845
18851
|
),
|
|
18846
18852
|
/* @__PURE__ */ v(
|
|
18847
|
-
|
|
18853
|
+
wS,
|
|
18848
18854
|
{
|
|
18849
18855
|
onCleanChat: () => r?.(),
|
|
18850
18856
|
onClose: () => o?.()
|
|
18851
18857
|
}
|
|
18852
18858
|
),
|
|
18853
|
-
/* @__PURE__ */ v(
|
|
18854
|
-
/* @__PURE__ */ v(
|
|
18859
|
+
/* @__PURE__ */ v(av, {}),
|
|
18860
|
+
/* @__PURE__ */ v(sS, {})
|
|
18855
18861
|
] });
|
|
18856
18862
|
return /* @__PURE__ */ v(md, { ...i, children: /* @__PURE__ */ v(Dp, { ...e, children: /* @__PURE__ */ v(
|
|
18857
18863
|
"main",
|
|
@@ -18878,7 +18884,7 @@ function kt({ className: e, ...t }) {
|
|
|
18878
18884
|
}
|
|
18879
18885
|
);
|
|
18880
18886
|
}
|
|
18881
|
-
function
|
|
18887
|
+
function xS(e, t) {
|
|
18882
18888
|
const [n, r] = Ee(e);
|
|
18883
18889
|
return Ht(() => {
|
|
18884
18890
|
const o = setTimeout(() => {
|
|
@@ -18889,12 +18895,12 @@ function wS(e, t) {
|
|
|
18889
18895
|
};
|
|
18890
18896
|
}, [e, t]), n;
|
|
18891
18897
|
}
|
|
18892
|
-
function
|
|
18898
|
+
function qS({
|
|
18893
18899
|
isOpen: e = !1,
|
|
18894
18900
|
isMobile: t,
|
|
18895
18901
|
skipAnimation: n = !1
|
|
18896
18902
|
}) {
|
|
18897
|
-
const r =
|
|
18903
|
+
const r = xS(e, 10), o = jc({
|
|
18898
18904
|
isOpen: n ? e : r,
|
|
18899
18905
|
isMobile: t,
|
|
18900
18906
|
skipAnimation: n
|
|
@@ -18927,25 +18933,25 @@ function TS({
|
|
|
18927
18933
|
] }, "chat-interface-skeleton");
|
|
18928
18934
|
}
|
|
18929
18935
|
export {
|
|
18930
|
-
|
|
18931
|
-
|
|
18932
|
-
|
|
18933
|
-
|
|
18936
|
+
ov as A,
|
|
18937
|
+
tS as B,
|
|
18938
|
+
TS as C,
|
|
18939
|
+
Jv as E,
|
|
18934
18940
|
mi as L,
|
|
18935
18941
|
Uk as M,
|
|
18936
|
-
|
|
18937
|
-
|
|
18942
|
+
rv as R,
|
|
18943
|
+
qS as S,
|
|
18938
18944
|
md as T,
|
|
18939
18945
|
ms as X,
|
|
18940
18946
|
Dp as a,
|
|
18941
|
-
|
|
18947
|
+
tv as b,
|
|
18942
18948
|
Z as c,
|
|
18943
|
-
|
|
18944
|
-
|
|
18945
|
-
|
|
18949
|
+
eS as d,
|
|
18950
|
+
Zv as e,
|
|
18951
|
+
lv as f,
|
|
18946
18952
|
Qi as g,
|
|
18947
|
-
|
|
18948
|
-
|
|
18953
|
+
xS as h,
|
|
18954
|
+
ES as i,
|
|
18949
18955
|
xi as u
|
|
18950
18956
|
};
|
|
18951
|
-
//# sourceMappingURL=skeleton-
|
|
18957
|
+
//# sourceMappingURL=skeleton-BMlUaxMi.js.map
|