@eloquentai/chat-sdk 0.37.0-dev.2 → 0.37.0-dev.4
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/components/chat/history-reconciliation.d.ts +33 -0
- package/dist/components/chat/hooks/use-realtime-socket.d.ts +9 -4
- package/dist/components/chat/message-mapping.d.ts +0 -8
- package/dist/contexts/error-handling/error-context.d.ts +1 -1
- package/dist/contexts/error-handling/error-provider.d.ts +2 -1
- package/dist/index.css +1 -1
- package/dist/index.mjs +1023 -1011
- package/dist/index.mjs.map +1 -1
- package/dist/lib/error-reporting.d.ts +25 -0
- package/dist/lib/http.d.ts +12 -2
- package/dist/lib/message-key.d.ts +6 -0
- package/dist/{skeleton-Dtc-r9SI.js → skeleton-DW1aw7Tu.js} +2473 -2457
- package/dist/skeleton-DW1aw7Tu.js.map +1 -0
- package/dist/types/message.d.ts +8 -0
- package/dist/ui.mjs +1 -1
- package/package.json +1 -1
- package/dist/index-hFbiYJI3.js +0 -4165
- package/dist/index-hFbiYJI3.js.map +0 -1
- package/dist/instrumentation.d.ts +0 -1
- package/dist/skeleton-Dtc-r9SI.js.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,39 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { jsx as I, jsxs as Ce, Fragment as Qt } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as I, jsxs as ke, Fragment as Tt } from "react/jsx-runtime";
|
|
4
3
|
import { useState as C, useCallback as v, useEffect as K, useMemo as tt, useRef as $ } from "react";
|
|
5
|
-
import { createPortal as ot, flushSync as
|
|
4
|
+
import { createPortal as ot, flushSync as Mt } from "react-dom";
|
|
5
|
+
import { L as At, c as Be, u as Pt, g as Ot, X as Ut, i as jt, A as Dt, d as F, e as Ke, f as $t, h as Bt, r as Lt, t as Nt, j as Zt, N as at, k as Le, l as Kt, H as Vt, w as ct, m as Wt, s as Ht, n as Ft, o as Jt, E as Gt, p as Yt, S as Xt, C as Qt, T as eo } from "./skeleton-DW1aw7Tu.js";
|
|
6
6
|
import to from "react-dom/client";
|
|
7
7
|
try {
|
|
8
8
|
let e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, t = new e.Error().stack;
|
|
9
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "
|
|
9
|
+
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "581abdff-289a-451e-abf3-6b54231017ba", e._sentryDebugIdIdentifier = "sentry-dbid-581abdff-289a-451e-abf3-6b54231017ba");
|
|
10
10
|
} catch {
|
|
11
11
|
}
|
|
12
|
-
if (typeof window < "u") {
|
|
13
|
-
const e = "development";
|
|
14
|
-
import("./index-hFbiYJI3.js").then(({ init: t }) => {
|
|
15
|
-
t({
|
|
16
|
-
dsn: void 0,
|
|
17
|
-
environment: e,
|
|
18
|
-
sendDefaultPii: !1,
|
|
19
|
-
debug: !1,
|
|
20
|
-
enabled: !0,
|
|
21
|
-
beforeSend(o) {
|
|
22
|
-
const r = /* @__PURE__ */ new Set([
|
|
23
|
-
"authorization",
|
|
24
|
-
"cookie",
|
|
25
|
-
"x-api-key",
|
|
26
|
-
"x-auth-token"
|
|
27
|
-
]), n = o.request?.headers;
|
|
28
|
-
if (n)
|
|
29
|
-
for (const a of Object.keys(n))
|
|
30
|
-
r.has(a.toLowerCase()) && (n[a] = "[Filtered]");
|
|
31
|
-
return o.request && (o.request.data = "[Filtered]"), o;
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
const Je = '/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--eloq-aura-angle:0deg}}}@layer theme{:root,:host{--eloq-font-sans:system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--eloq-font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--eloq-color-red-50:oklch(97.1% .013 17.38);--eloq-color-red-200:oklch(88.5% .062 18.334);--eloq-color-red-400:oklch(70.4% .191 22.216);--eloq-color-red-500:oklch(63.7% .237 25.331);--eloq-color-red-800:oklch(44.4% .177 26.899);--eloq-color-amber-50:oklch(98.7% .022 95.277);--eloq-color-amber-200:oklch(92.4% .12 95.746);--eloq-color-amber-400:oklch(82.8% .189 84.429);--eloq-color-amber-500:oklch(76.9% .188 70.08);--eloq-color-amber-800:oklch(47.3% .137 46.201);--eloq-color-yellow-400:oklch(85.2% .199 91.936);--eloq-color-green-50:oklch(98.2% .018 155.826);--eloq-color-green-200:oklch(92.5% .084 155.995);--eloq-color-green-400:oklch(79.2% .209 151.711);--eloq-color-green-500:oklch(72.3% .219 149.579);--eloq-color-green-800:oklch(44.8% .119 151.328);--eloq-color-blue-50:oklch(97% .014 254.604);--eloq-color-blue-200:oklch(88.2% .059 254.128);--eloq-color-blue-400:oklch(70.7% .165 254.624);--eloq-color-blue-500:oklch(62.3% .214 259.815);--eloq-color-blue-800:oklch(42.4% .199 265.638);--eloq-color-gray-100:oklch(96.7% .003 264.542);--eloq-color-gray-200:oklch(92.8% .006 264.531);--eloq-color-gray-300:oklch(87.2% .01 258.338);--eloq-color-gray-400:oklch(70.7% .022 261.325);--eloq-color-gray-500:oklch(55.1% .027 264.364);--eloq-color-gray-600:oklch(44.6% .03 256.802);--eloq-color-gray-900:oklch(21% .034 264.665);--eloq-color-black:#000;--eloq-color-white:#fff;--eloq-spacing:.25rem;--eloq-container-xs:20rem;--eloq-text-xs:.75rem;--eloq-text-xs--line-height:calc(1 / .75);--eloq-text-sm:.875rem;--eloq-text-sm--line-height:calc(1.25 / .875);--eloq-text-base:1rem;--eloq-text-base--line-height: 1.5 ;--eloq-text-2xl:1.5rem;--eloq-text-2xl--line-height:calc(2 / 1.5);--eloq-font-weight-medium:500;--eloq-font-weight-semibold:600;--eloq-tracking-tight:-.025em;--eloq-leading-relaxed:1.625;--eloq-radius-sm:calc(var(--radius) - 4px);--eloq-radius-md:calc(var(--radius) - 2px);--eloq-radius-lg:var(--radius);--eloq-radius-xl:.75rem;--eloq-radius-2xl:1rem;--eloq-radius-3xl:1.5rem;--eloq-drop-shadow-lg:0 4px 4px #00000026;--eloq-drop-shadow-xl:0 9px 7px #0000001a;--eloq-ease-out:cubic-bezier(0, 0, .2, 1);--eloq-animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--eloq-default-transition-duration:.15s;--eloq-default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--eloq-default-font-family:var(--eloq-font-sans);--eloq-default-mono-font-family:var(--eloq-font-mono);--eloq-animate-panel-in:panel-in .35s cubic-bezier(.16, 1, .3, 1) both;--eloq-animate-panel-out:panel-out .25s cubic-bezier(.4, 0, 1, 1) both;--eloq-animate-panel-fade-in:fade-in .35s ease-out both;--eloq-animate-panel-fade-out:fade-out .25s ease-in both;--eloq-animate-message-fade-in:fade-in .3s ease-out both;--eloq-animate-thinking-dot:thinking-dot 1.2s ease-in-out infinite;--eloq-animate-thinking-shimmer:thinking-shimmer 1.8s linear infinite;--eloq-animate-regenerating:regenerating-sweep 1.2s linear infinite;--eloq-animate-text-in:fade-in .35s ease-out both;--eloq-animate-message-in:message-in .3s ease-out both;--eloq-animate-slide-up-in:slide-up-in .3s ease-out both}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--eloq-default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--eloq-default-font-feature-settings,normal);font-variation-settings:var(--eloq-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--eloq-default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--eloq-default-mono-font-feature-settings,normal);font-variation-settings:var(--eloq-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:root{--background:0 0% 100%;--foreground:0 0% 3.9%;--card:0 0% 100%;--card-foreground:0 0% 3.9%;--popover:0 0% 100%;--popover-foreground:0 0% 3.9%;--primary:267 56% 46%;--primary-foreground:0 0% 98%;--secondary:0 0% 96.1%;--secondary-foreground:0 0% 9%;--muted:0 0% 96.1%;--muted-foreground:0 0% 45.1%;--accent:0 0% 96.1%;--accent-foreground:0 0% 9%;--destructive:0 84.2% 60.2%;--destructive-foreground:0 0% 98%;--border:0 0% 89.8%;--input:0 0% 89.8%;--ring:0 0% 3.9%;--cream:37.5 44% 96.5%;--chart-1:12 76% 61%;--chart-2:173 58% 39%;--chart-3:197 37% 24%;--chart-4:43 74% 66%;--chart-5:27 87% 67%;--radius:.5rem}.dark{--background:262 50% 10%;--foreground:262 5% 90%;--card:262 50% 10%;--card-foreground:262 5% 90%;--popover:262 50% 5%;--popover-foreground:262 5% 90%;--primary:262 62% 70%;--primary-foreground:0 0% 100%;--primary-dark:262 62% 60%;--secondary:262 30% 30%;--secondary-foreground:0 0% 100%;--secondary-dark:262 30% 20%;--secondary-light:262 30% 40%;--tertiary:267 56% 46%;--tertiary-foreground:0 0% 100%;--tertiary-dark:267 38% 25%;--tertiary-light:263 100% 85%;--muted:224 30% 25%;--muted-foreground:262 5% 90%;--accent:224 30% 25%;--accent-foreground:262 5% 100%;--accent-dark:224 30% 15%;--destructive:0 100% 30%;--destructive-foreground:262 5% 90%;--border:0 0% 30%;--input:262 30% 25%;--ring:262 62% 71%;--cream:257 28% 20%;--radius:.5rem;--sidebar-background:var(--background);--sidebar-foreground:var(--foreground);--sidebar-primary:var(--primary);--sidebar-primary-foreground:var(--primary-foreground);--sidebar-accent:var(--accent);--sidebar-accent-foreground:var(--accent-foreground);--sidebar-border:var(--border);--sidebar-ring:var(--ring)}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}}@layer components;@layer utilities{.eloq\\:pointer-events-none{pointer-events:none}.eloq\\:invisible{visibility:hidden}.eloq\\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.eloq\\:absolute{position:absolute}.eloq\\:relative{position:relative}.eloq\\:inset-0{inset:0}.eloq\\:inset-0\\.5{inset:calc(var(--eloq-spacing) * .5)}.eloq\\:inset-x-0{inset-inline:0}.eloq\\:end-full{inset-inline-end:100%}.eloq\\:top-0{top:0}.eloq\\:top-0\\.5{top:calc(var(--eloq-spacing) * .5)}.eloq\\:top-1\\/2{top:50%}.eloq\\:top-\\[2px\\]{top:2px}.eloq\\:-right-\\[9px\\]{right:-9px}.eloq\\:right-0\\.5{right:calc(var(--eloq-spacing) * .5)}.eloq\\:right-2{right:calc(var(--eloq-spacing) * 2)}.eloq\\:right-16{right:calc(var(--eloq-spacing) * 16)}.eloq\\:right-\\[2px\\]{right:2px}.eloq\\:bottom-0{bottom:0}.eloq\\:bottom-1{bottom:var(--eloq-spacing)}.eloq\\:bottom-2{bottom:calc(var(--eloq-spacing) * 2)}.eloq\\:bottom-10{bottom:calc(var(--eloq-spacing) * 10)}.eloq\\:left-0{left:0}.eloq\\:left-2{left:calc(var(--eloq-spacing) * 2)}.eloq\\:left-\\[calc\\(50\\%-0\\.75rem\\)\\]{left:calc(50% - .75rem)}.eloq\\:z-10{z-index:10}.eloq\\:z-20{z-index:20}.eloq\\:z-30{z-index:30}.eloq\\:m-0{margin:0}.eloq\\:m-auto{margin:auto}.eloq\\:mx-1{margin-inline:var(--eloq-spacing)}.eloq\\:mx-auto{margin-inline:auto}.eloq\\:my-2{margin-block:calc(var(--eloq-spacing) * 2)}.eloq\\:my-4{margin-block:calc(var(--eloq-spacing) * 4)}.eloq\\:me-1{margin-inline-end:var(--eloq-spacing)}.eloq\\:-mt-2{margin-top:calc(var(--eloq-spacing) * -2)}.eloq\\:-mt-6{margin-top:calc(var(--eloq-spacing) * -6)}.eloq\\:-mt-20{margin-top:calc(var(--eloq-spacing) * -20)}.eloq\\:mt-1{margin-top:var(--eloq-spacing)}.eloq\\:mt-2{margin-top:calc(var(--eloq-spacing) * 2)}.eloq\\:mt-10{margin-top:calc(var(--eloq-spacing) * 10)}.eloq\\:mr-1{margin-right:var(--eloq-spacing)}.eloq\\:mr-\\[2px\\]{margin-right:2px}.eloq\\:mb-1{margin-bottom:var(--eloq-spacing)}.eloq\\:mb-3{margin-bottom:calc(var(--eloq-spacing) * 3)}.eloq\\:mb-4{margin-bottom:calc(var(--eloq-spacing) * 4)}.eloq\\:mb-10{margin-bottom:calc(var(--eloq-spacing) * 10)}.eloq\\:ml-0{margin-left:0}.eloq\\:ml-1{margin-left:var(--eloq-spacing)}.eloq\\:ml-5{margin-left:calc(var(--eloq-spacing) * 5)}.eloq\\:box-content{box-sizing:content-box}.eloq\\:block{display:block}.eloq\\:flex{display:flex}.eloq\\:hidden{display:none}.eloq\\:inline-flex{display:inline-flex}.eloq\\:field-sizing-content{field-sizing:content}.eloq\\:aspect-square{aspect-ratio:1}.eloq\\:h-1{height:var(--eloq-spacing)}.eloq\\:h-2\\.5{height:calc(var(--eloq-spacing) * 2.5)}.eloq\\:h-3{height:calc(var(--eloq-spacing) * 3)}.eloq\\:h-4{height:calc(var(--eloq-spacing) * 4)}.eloq\\:h-5{height:calc(var(--eloq-spacing) * 5)}.eloq\\:h-6{height:calc(var(--eloq-spacing) * 6)}.eloq\\:h-8{height:calc(var(--eloq-spacing) * 8)}.eloq\\:h-10{height:calc(var(--eloq-spacing) * 10)}.eloq\\:h-12{height:calc(var(--eloq-spacing) * 12)}.eloq\\:h-14{height:calc(var(--eloq-spacing) * 14)}.eloq\\:h-16{height:calc(var(--eloq-spacing) * 16)}.eloq\\:h-\\[0\\.42em\\]{height:.42em}.eloq\\:h-\\[160px\\]{height:160px}.eloq\\:h-\\[220px\\]{height:220px}.eloq\\:h-\\[560px\\]{height:560px}.eloq\\:h-\\[600px\\]{height:600px}.eloq\\:h-full{height:100%}.eloq\\:max-h-\\[132px\\]{max-height:132px}.eloq\\:min-h-6{min-height:calc(var(--eloq-spacing) * 6)}.eloq\\:min-h-\\[48px\\]{min-height:48px}.eloq\\:min-h-\\[80px\\]{min-height:80px}.eloq\\:w-2\\.5{width:calc(var(--eloq-spacing) * 2.5)}.eloq\\:w-2\\/3{width:66.6667%}.eloq\\:w-3{width:calc(var(--eloq-spacing) * 3)}.eloq\\:w-4{width:calc(var(--eloq-spacing) * 4)}.eloq\\:w-5{width:calc(var(--eloq-spacing) * 5)}.eloq\\:w-6{width:calc(var(--eloq-spacing) * 6)}.eloq\\:w-8{width:calc(var(--eloq-spacing) * 8)}.eloq\\:w-10{width:calc(var(--eloq-spacing) * 10)}.eloq\\:w-12{width:calc(var(--eloq-spacing) * 12)}.eloq\\:w-14{width:calc(var(--eloq-spacing) * 14)}.eloq\\:w-16{width:calc(var(--eloq-spacing) * 16)}.eloq\\:w-24{width:calc(var(--eloq-spacing) * 24)}.eloq\\:w-32{width:calc(var(--eloq-spacing) * 32)}.eloq\\:w-48{width:calc(var(--eloq-spacing) * 48)}.eloq\\:w-\\[0\\.42em\\]{width:.42em}.eloq\\:w-\\[70\\%\\]{width:70%}.eloq\\:w-\\[320px\\]{width:320px}.eloq\\:w-\\[340px\\]{width:340px}.eloq\\:w-\\[348px\\]{width:348px}.eloq\\:w-\\[380px\\]{width:380px}.eloq\\:w-\\[420px\\]{width:420px}.eloq\\:w-full{width:100%}.eloq\\:max-w-\\[75\\%\\]{max-width:75%}.eloq\\:max-w-\\[88\\%\\]{max-width:88%}.eloq\\:max-w-full{max-width:100%}.eloq\\:max-w-xs{max-width:var(--eloq-container-xs)}.eloq\\:min-w-0{min-width:0}.eloq\\:min-w-6{min-width:calc(var(--eloq-spacing) * 6)}.eloq\\:min-w-min{min-width:min-content}.eloq\\:flex-1{flex:1}.eloq\\:flex-none{flex:none}.eloq\\:flex-shrink-0,.eloq\\:shrink-0{flex-shrink:0}.eloq\\:flex-grow{flex-grow:1}.eloq\\:origin-bottom-right{transform-origin:100% 100%}.eloq\\:translate-x-0{--tw-translate-x:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:translate-x-8{--tw-translate-x:calc(var(--eloq-spacing) * 8);translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:-scale-x-100{--tw-scale-x: -100% ;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:scale-\\[0\\.05\\]{scale:.05}.eloq\\:transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.eloq\\:animate-message-in{animation:var(--eloq-animate-message-in)}.eloq\\:animate-panel-in{animation:var(--eloq-animate-panel-in)}.eloq\\:animate-panel-out{animation:var(--eloq-animate-panel-out)}.eloq\\:animate-pulse{animation:var(--eloq-animate-pulse)}.eloq\\:animate-regenerating{animation:var(--eloq-animate-regenerating)}.eloq\\:animate-text-in{animation:var(--eloq-animate-text-in)}.eloq\\:animate-thinking-shimmer{animation:var(--eloq-animate-thinking-shimmer)}.eloq\\:cursor-default{cursor:default}.eloq\\:cursor-grab{cursor:grab}.eloq\\:cursor-pointer{cursor:pointer}.eloq\\:touch-none{touch-action:none}.eloq\\:resize-none{resize:none}.eloq\\:list-decimal{list-style-type:decimal}.eloq\\:list-disc{list-style-type:disc}.eloq\\:flex-col{flex-direction:column}.eloq\\:flex-row{flex-direction:row}.eloq\\:flex-wrap{flex-wrap:wrap}.eloq\\:items-center{align-items:center}.eloq\\:items-end{align-items:flex-end}.eloq\\:items-start{align-items:flex-start}.eloq\\:justify-between{justify-content:space-between}.eloq\\:justify-center{justify-content:center}.eloq\\:justify-end{justify-content:flex-end}.eloq\\:justify-start{justify-content:flex-start}.eloq\\:gap-1{gap:var(--eloq-spacing)}.eloq\\:gap-1\\.5{gap:calc(var(--eloq-spacing) * 1.5)}.eloq\\:gap-2{gap:calc(var(--eloq-spacing) * 2)}.eloq\\:gap-3{gap:calc(var(--eloq-spacing) * 3)}.eloq\\:gap-\\[0\\.25em\\]{gap:.25em}:where(.eloq\\:space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block:0}:where(.eloq\\:space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--eloq-spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--eloq-spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(var(--eloq-spacing) * var(--tw-space-x-reverse));margin-inline-end:calc(var(--eloq-spacing) * calc(1 - var(--tw-space-x-reverse)))}:where(.eloq\\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--eloq-spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--eloq-spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}:where(.eloq\\:space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--eloq-spacing) * 3) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--eloq-spacing) * 3) * calc(1 - var(--tw-space-x-reverse)))}.eloq\\:self-end{align-self:flex-end}.eloq\\:self-stretch{align-self:stretch}.eloq\\:overflow-hidden{overflow:hidden}.eloq\\:overflow-x-auto{overflow-x:auto}.eloq\\:overscroll-contain{overscroll-behavior:contain}.eloq\\:rounded{border-radius:.25rem}.eloq\\:rounded-2xl{border-radius:var(--eloq-radius-2xl)}.eloq\\:rounded-3xl{border-radius:var(--eloq-radius-3xl)}.eloq\\:rounded-\\[inherit\\]{border-radius:inherit}.eloq\\:rounded-full{border-radius:3.40282e38px}.eloq\\:rounded-lg{border-radius:var(--eloq-radius-lg)}.eloq\\:rounded-md{border-radius:var(--eloq-radius-md)}.eloq\\:rounded-none{border-radius:0}.eloq\\:rounded-sm{border-radius:var(--eloq-radius-sm)}.eloq\\:rounded-xl{border-radius:var(--eloq-radius-xl)}.eloq\\:rounded-t-2xl{border-top-left-radius:var(--eloq-radius-2xl);border-top-right-radius:var(--eloq-radius-2xl)}.eloq\\:border{border-style:var(--tw-border-style);border-width:1px}.eloq\\:border-0{border-style:var(--tw-border-style);border-width:0}.eloq\\:border-2{border-style:var(--tw-border-style);border-width:2px}.eloq\\:border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.eloq\\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.eloq\\:border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.eloq\\:border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.eloq\\:border-dashed{--tw-border-style:dashed;border-style:dashed}.eloq\\:border-amber-400{border-color:var(--eloq-color-amber-400)}.eloq\\:border-blue-500{border-color:var(--eloq-color-blue-500)}.eloq\\:border-border{border-color:hsl(var(--border))}.eloq\\:border-current{border-color:currentColor}.eloq\\:border-green-500{border-color:var(--eloq-color-green-500)}.eloq\\:border-input{border-color:hsl(var(--input))}.eloq\\:border-red-500{border-color:var(--eloq-color-red-500)}.eloq\\:border-t-transparent{border-top-color:#0000}.eloq\\:border-l-transparent{border-left-color:#0000}.eloq\\:bg-\\[\\#0a0a0a\\]{background-color:#0a0a0a}.eloq\\:bg-\\[\\#000\\]{background-color:#000}.eloq\\:bg-\\[\\#fff\\]{background-color:#fff}.eloq\\:bg-amber-50{background-color:var(--eloq-color-amber-50)}.eloq\\:bg-background{background-color:hsl(var(--background))}.eloq\\:bg-black\\/20{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-black\\/20{background-color:color-mix(in oklab,var(--eloq-color-black) 20%,transparent)}}.eloq\\:bg-black\\/60{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-black\\/60{background-color:color-mix(in oklab,var(--eloq-color-black) 60%,transparent)}}.eloq\\:bg-blue-50{background-color:var(--eloq-color-blue-50)}.eloq\\:bg-border{background-color:hsl(var(--border))}.eloq\\:bg-card{background-color:hsl(var(--card))}.eloq\\:bg-cream{background-color:hsl(var(--cream))}.eloq\\:bg-gray-400{background-color:var(--eloq-color-gray-400)}.eloq\\:bg-gray-900{background-color:var(--eloq-color-gray-900)}.eloq\\:bg-green-50{background-color:var(--eloq-color-green-50)}.eloq\\:bg-muted{background-color:hsl(var(--muted))}.eloq\\:bg-muted-foreground{background-color:hsl(var(--muted-foreground))}.eloq\\:bg-primary{background-color:hsl(var(--primary))}.eloq\\:bg-red-50{background-color:var(--eloq-color-red-50)}.eloq\\:bg-white,.eloq\\:bg-white\\/20{background-color:var(--eloq-color-white)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-white\\/20{background-color:color-mix(in oklab,var(--eloq-color-white) 20%,transparent)}}.eloq\\:fill-none{fill:none}.eloq\\:fill-yellow-400{fill:var(--eloq-color-yellow-400)}.eloq\\:object-contain{object-fit:contain}.eloq\\:object-cover{object-fit:cover}.eloq\\:p-0{padding:0}.eloq\\:p-0\\.5{padding:calc(var(--eloq-spacing) * .5)}.eloq\\:p-1{padding:var(--eloq-spacing)}.eloq\\:p-2{padding:calc(var(--eloq-spacing) * 2)}.eloq\\:p-3{padding:calc(var(--eloq-spacing) * 3)}.eloq\\:p-4{padding:calc(var(--eloq-spacing) * 4)}.eloq\\:p-6{padding:calc(var(--eloq-spacing) * 6)}.eloq\\:p-\\[1px\\]{padding:1px}.eloq\\:p-\\[7px\\]{padding:7px}.eloq\\:px-0{padding-inline:0}.eloq\\:px-1\\.5{padding-inline:calc(var(--eloq-spacing) * 1.5)}.eloq\\:px-2{padding-inline:calc(var(--eloq-spacing) * 2)}.eloq\\:px-3{padding-inline:calc(var(--eloq-spacing) * 3)}.eloq\\:px-4{padding-inline:calc(var(--eloq-spacing) * 4)}.eloq\\:px-5{padding-inline:calc(var(--eloq-spacing) * 5)}.eloq\\:px-\\[12px\\]{padding-inline:12px}.eloq\\:px-\\[16px\\]{padding-inline:16px}.eloq\\:py-0\\.5{padding-block:calc(var(--eloq-spacing) * .5)}.eloq\\:py-1{padding-block:var(--eloq-spacing)}.eloq\\:py-1\\.5{padding-block:calc(var(--eloq-spacing) * 1.5)}.eloq\\:py-2{padding-block:calc(var(--eloq-spacing) * 2)}.eloq\\:py-3{padding-block:calc(var(--eloq-spacing) * 3)}.eloq\\:py-3\\.5{padding-block:calc(var(--eloq-spacing) * 3.5)}.eloq\\:py-\\[8px\\]{padding-block:8px}.eloq\\:py-\\[12px\\]{padding-block:12px}.eloq\\:pt-0{padding-top:0}.eloq\\:pt-2{padding-top:calc(var(--eloq-spacing) * 2)}.eloq\\:pt-4{padding-top:calc(var(--eloq-spacing) * 4)}.eloq\\:pt-5{padding-top:calc(var(--eloq-spacing) * 5)}.eloq\\:pt-6{padding-top:calc(var(--eloq-spacing) * 6)}.eloq\\:pt-10{padding-top:calc(var(--eloq-spacing) * 10)}.eloq\\:pt-24{padding-top:calc(var(--eloq-spacing) * 24)}.eloq\\:pr-2{padding-right:calc(var(--eloq-spacing) * 2)}.eloq\\:pr-4{padding-right:calc(var(--eloq-spacing) * 4)}.eloq\\:pr-12{padding-right:calc(var(--eloq-spacing) * 12)}.eloq\\:pb-2{padding-bottom:calc(var(--eloq-spacing) * 2)}.eloq\\:pb-4{padding-bottom:calc(var(--eloq-spacing) * 4)}.eloq\\:pb-10{padding-bottom:calc(var(--eloq-spacing) * 10)}.eloq\\:pb-14{padding-bottom:calc(var(--eloq-spacing) * 14)}.eloq\\:pl-3{padding-left:calc(var(--eloq-spacing) * 3)}.eloq\\:pl-4{padding-left:calc(var(--eloq-spacing) * 4)}.eloq\\:pl-11{padding-left:calc(var(--eloq-spacing) * 11)}.eloq\\:text-center{text-align:center}.eloq\\:text-left{text-align:left}.eloq\\:text-2xl{font-size:var(--eloq-text-2xl);line-height:var(--tw-leading,var(--eloq-text-2xl--line-height))}.eloq\\:text-base{font-size:var(--eloq-text-base);line-height:var(--tw-leading,var(--eloq-text-base--line-height))}.eloq\\:text-sm{font-size:var(--eloq-text-sm);line-height:var(--tw-leading,var(--eloq-text-sm--line-height))}.eloq\\:text-xs{font-size:var(--eloq-text-xs);line-height:var(--tw-leading,var(--eloq-text-xs--line-height))}.eloq\\:text-\\[10px\\]{font-size:10px}.eloq\\:leading-5{--tw-leading:calc(var(--eloq-spacing) * 5);line-height:calc(var(--eloq-spacing) * 5)}.eloq\\:leading-none{--tw-leading:1;line-height:1}.eloq\\:leading-relaxed{--tw-leading:var(--eloq-leading-relaxed);line-height:var(--eloq-leading-relaxed)}.eloq\\:font-medium{--tw-font-weight:var(--eloq-font-weight-medium);font-weight:var(--eloq-font-weight-medium)}.eloq\\:font-semibold{--tw-font-weight:var(--eloq-font-weight-semibold);font-weight:var(--eloq-font-weight-semibold)}.eloq\\:tracking-tight{--tw-tracking:var(--eloq-tracking-tight);letter-spacing:var(--eloq-tracking-tight)}.eloq\\:whitespace-nowrap{white-space:nowrap}.eloq\\:text-\\[\\#000\\]{color:#000}.eloq\\:text-\\[\\#fff\\]{color:#fff}.eloq\\:text-amber-500{color:var(--eloq-color-amber-500)}.eloq\\:text-amber-800{color:var(--eloq-color-amber-800)}.eloq\\:text-blue-500{color:var(--eloq-color-blue-500)}.eloq\\:text-blue-800{color:var(--eloq-color-blue-800)}.eloq\\:text-card-foreground{color:hsl(var(--card-foreground))}.eloq\\:text-destructive{color:hsl(var(--destructive))}.eloq\\:text-foreground{color:hsl(var(--foreground))}.eloq\\:text-gray-300{color:var(--eloq-color-gray-300)}.eloq\\:text-gray-400{color:var(--eloq-color-gray-400)}.eloq\\:text-gray-500{color:var(--eloq-color-gray-500)}.eloq\\:text-green-500{color:var(--eloq-color-green-500)}.eloq\\:text-green-800{color:var(--eloq-color-green-800)}.eloq\\:text-muted{color:hsl(var(--muted))}.eloq\\:text-muted-foreground{color:hsl(var(--muted-foreground))}.eloq\\:text-primary{color:hsl(var(--primary))}.eloq\\:text-primary-foreground{color:hsl(var(--primary-foreground))}.eloq\\:text-red-500{color:var(--eloq-color-red-500)}.eloq\\:text-red-800{color:var(--eloq-color-red-800)}.eloq\\:text-white{color:var(--eloq-color-white)}.eloq\\:text-yellow-400{color:var(--eloq-color-yellow-400)}.eloq\\:italic{font-style:italic}.eloq\\:underline{text-decoration-line:underline}.eloq\\:opacity-0{opacity:0}.eloq\\:opacity-50{opacity:.5}.eloq\\:opacity-70{opacity:.7}.eloq\\:opacity-75{opacity:.75}.eloq\\:opacity-100{opacity:1}.eloq\\:shadow-\\[0_-8px_24px_rgba\\(0\\,0\\,0\\,0\\.08\\)\\]{--tw-shadow:0 -8px 24px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:shadow-\\[0_0_4px_0_rgba\\(0\\,0\\,0\\,0\\.20\\)\\]{--tw-shadow:0 0 4px 0 var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:shadow-\\[0_3px_4px_-2px_rgba\\(0\\,0\\,0\\,0\\.04\\)\\]{--tw-shadow:0 3px 4px -2px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.eloq\\:outline-2{outline-style:var(--tw-outline-style);outline-width:2px}.eloq\\:outline-offset-2{outline-offset:2px}.eloq\\:outline-transparent{outline-color:#0000}.eloq\\:drop-shadow-lg{--tw-drop-shadow-size:drop-shadow(0 4px 4px var(--tw-drop-shadow-color,#00000026));--tw-drop-shadow:drop-shadow(var(--eloq-drop-shadow-lg));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.eloq\\:transition-\\[outline-color\\]{transition-property:outline-color;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-\\[visibility\\]{transition-property:visibility;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-\\[width\\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:delay-100{transition-delay:.1s}.eloq\\:duration-0{--tw-duration:0s;transition-duration:0s}.eloq\\:duration-150{--tw-duration:.15s;transition-duration:.15s}.eloq\\:duration-200{--tw-duration:.2s;transition-duration:.2s}.eloq\\:duration-300{--tw-duration:.3s;transition-duration:.3s}.eloq\\:duration-500{--tw-duration:.5s;transition-duration:.5s}.eloq\\:ease-out{--tw-ease:var(--eloq-ease-out);transition-timing-function:var(--eloq-ease-out)}.eloq\\:outline-none{--tw-outline-style:none;outline-style:none}.eloq\\:select-none{-webkit-user-select:none;user-select:none}.eloq\\:group-focus-visible\\:block:is(:where(.eloq\\:group):focus-visible *){display:block}.eloq\\:placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.eloq\\:last\\:mb-0:last-child{margin-bottom:0}@media(hover:hover){.eloq\\:hover\\:bg-black\\/5:hover{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:hover\\:bg-black\\/5:hover{background-color:color-mix(in oklab,var(--eloq-color-black) 5%,transparent)}}.eloq\\:hover\\:bg-black\\/80:hover{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:hover\\:bg-black\\/80:hover{background-color:color-mix(in oklab,var(--eloq-color-black) 80%,transparent)}}.eloq\\:hover\\:bg-muted:hover{background-color:hsl(var(--muted))}.eloq\\:hover\\:text-foreground:hover{color:hsl(var(--foreground))}.eloq\\:hover\\:text-gray-600:hover{color:var(--eloq-color-gray-600)}.eloq\\:hover\\:text-primary:hover{color:hsl(var(--primary))}.eloq\\:hover\\:opacity-80:hover{opacity:.8}.eloq\\:hover\\:opacity-90:hover{opacity:.9}.eloq\\:hover\\:opacity-100:hover{opacity:1}.eloq\\:hover\\:drop-shadow-xl:hover{--tw-drop-shadow-size:drop-shadow(0 9px 7px var(--tw-drop-shadow-color,#0000001a));--tw-drop-shadow:drop-shadow(var(--eloq-drop-shadow-xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.eloq\\:focus-visible\\:opacity-100:focus-visible{opacity:1}.eloq\\:focus-visible\\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:focus-visible\\:ring-muted:focus-visible{--tw-ring-color:hsl(var(--muted))}.eloq\\:focus-visible\\:ring-primary:focus-visible{--tw-ring-color:hsl(var(--primary))}.eloq\\:focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.eloq\\:focus-visible\\:outline-hidden:focus-visible{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.eloq\\:focus-visible\\:outline-hidden:focus-visible{outline-offset:2px;outline:2px solid #0000}}.eloq\\:focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.eloq\\:focus-visible\\:-outline-offset-4:focus-visible{outline-offset:-4px}.eloq\\:focus-visible\\:outline-current:focus-visible{outline-color:currentColor}.eloq\\:focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.eloq\\:focus-visible\\:outline-solid:focus-visible{--tw-outline-style:solid;outline-style:solid}.eloq\\:active\\:cursor-grabbing:active{cursor:grabbing}.eloq\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.eloq\\:disabled\\:opacity-50:disabled{opacity:.5}.eloq\\:has-focus-visible\\:outline-2:has(:focus-visible){outline-style:var(--tw-outline-style);outline-width:2px}.eloq\\:has-focus-visible\\:outline-offset-1:has(:focus-visible){outline-offset:1px}.eloq\\:has-focus-visible\\:outline-ring:has(:focus-visible){outline-color:hsl(var(--ring))}@media(prefers-reduced-motion:no-preference){.eloq\\:motion-safe\\:translate-x-8{--tw-translate-x:calc(var(--eloq-spacing) * 8);translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:motion-safe\\:scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:motion-safe\\:animate-slide-up-in{animation:var(--eloq-animate-slide-up-in)}.eloq\\:motion-safe\\:animate-thinking-dot{animation:var(--eloq-animate-thinking-dot)}}@media(prefers-reduced-motion:reduce){.eloq\\:motion-reduce\\:animate-message-fade-in{animation:var(--eloq-animate-message-fade-in)}.eloq\\:motion-reduce\\:animate-none{animation:none}.eloq\\:motion-reduce\\:animate-panel-fade-in{animation:var(--eloq-animate-panel-fade-in)}.eloq\\:motion-reduce\\:animate-panel-fade-out{animation:var(--eloq-animate-panel-fade-out)}.eloq\\:motion-reduce\\:opacity-70{opacity:.7}}@media(min-width:40rem){.eloq\\:sm\\:text-sm{font-size:var(--eloq-text-sm);line-height:var(--tw-leading,var(--eloq-text-sm--line-height))}}@media(min-width:48rem){.eloq\\:md\\:text-sm{font-size:var(--eloq-text-sm);line-height:var(--tw-leading,var(--eloq-text-sm--line-height))}}.eloq\\:dark\\:border:is(.dark *){border-style:var(--tw-border-style);border-width:1px}.eloq\\:dark\\:border-b:is(.dark *){border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.eloq\\:dark\\:border-border:is(.dark *){border-color:hsl(var(--border))}.eloq\\:dark\\:bg-amber-400\\/10:is(.dark *){background-color:var(--eloq-color-amber-400)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-amber-400\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-amber-400) 10%,transparent)}}.eloq\\:dark\\:bg-blue-500\\/10:is(.dark *){background-color:var(--eloq-color-blue-500)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-blue-500\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-blue-500) 10%,transparent)}}.eloq\\:dark\\:bg-card:is(.dark *){background-color:hsl(var(--card))}.eloq\\:dark\\:bg-gray-100:is(.dark *){background-color:var(--eloq-color-gray-100)}.eloq\\:dark\\:bg-gray-200:is(.dark *){background-color:var(--eloq-color-gray-200)}.eloq\\:dark\\:bg-green-500\\/10:is(.dark *){background-color:var(--eloq-color-green-500)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-green-500\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-green-500) 10%,transparent)}}.eloq\\:dark\\:bg-muted:is(.dark *){background-color:hsl(var(--muted))}.eloq\\:dark\\:bg-red-500\\/10:is(.dark *){background-color:var(--eloq-color-red-500)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-red-500\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-red-500) 10%,transparent)}}.eloq\\:dark\\:text-amber-200:is(.dark *){color:var(--eloq-color-amber-200)}.eloq\\:dark\\:text-amber-400:is(.dark *){color:var(--eloq-color-amber-400)}.eloq\\:dark\\:text-blue-200:is(.dark *){color:var(--eloq-color-blue-200)}.eloq\\:dark\\:text-blue-400:is(.dark *){color:var(--eloq-color-blue-400)}.eloq\\:dark\\:text-gray-500:is(.dark *){color:var(--eloq-color-gray-500)}.eloq\\:dark\\:text-gray-900:is(.dark *){color:var(--eloq-color-gray-900)}.eloq\\:dark\\:text-green-200:is(.dark *){color:var(--eloq-color-green-200)}.eloq\\:dark\\:text-green-400:is(.dark *){color:var(--eloq-color-green-400)}.eloq\\:dark\\:text-muted-foreground:is(.dark *),.eloq\\:dark\\:text-muted-foreground\\/50:is(.dark *){color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:text-muted-foreground\\/50:is(.dark *){color:color-mix(in oklab,hsl(var(--muted-foreground)) 50%,transparent)}}.eloq\\:dark\\:text-red-200:is(.dark *){color:var(--eloq-color-red-200)}.eloq\\:dark\\:text-red-400:is(.dark *){color:var(--eloq-color-red-400)}.eloq\\:dark\\:shadow-none:is(.dark *){--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@media(hover:hover){.eloq\\:dark\\:hover\\:bg-white\\/10:is(.dark *):hover{background-color:var(--eloq-color-white)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:hover\\:bg-white\\/10:is(.dark *):hover{background-color:color-mix(in oklab,var(--eloq-color-white) 10%,transparent)}}.eloq\\:dark\\:hover\\:text-gray-300:is(.dark *):hover{color:var(--eloq-color-gray-300)}.eloq\\:dark\\:hover\\:text-primary:is(.dark *):hover{color:hsl(var(--primary))}}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}}body{background-color:#0000}.eloquent-chat{font-family:system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol}.collapse{visibility:unset!important}.eloq-wrap-anywhere{overflow-wrap:anywhere}.eloq-thin-scrollbar{scrollbar-width:thin;scrollbar-color:hsl(var(--border)) transparent}.eloq-thin-scrollbar::-webkit-scrollbar{width:8px;height:8px}.eloq-thin-scrollbar::-webkit-scrollbar-thumb{background-color:hsl(var(--border));border-radius:9999px}.eloq-thin-scrollbar::-webkit-scrollbar-track{background-color:#0000}.eloq-test-mode-stripe{background:repeating-linear-gradient(-45deg,#f6e05e,#f6e05e 10px,#000 10px 20px)}.eloq-thinking-shimmer{--eloq-thinking-base:#9ca3af;--eloq-thinking-highlight:#4b5563;background:linear-gradient(90deg,var(--eloq-thinking-base) 0%,var(--eloq-thinking-base) 35%,var(--eloq-thinking-highlight) 50%,var(--eloq-thinking-base) 65%,var(--eloq-thinking-base) 100%);color:#0000;background-size:200% 100%;-webkit-background-clip:text;background-clip:text}.dark .eloq-thinking-shimmer{--eloq-thinking-base:#6b7280;--eloq-thinking-highlight:#e5e7eb}@media(prefers-reduced-motion:reduce){.eloq-thinking-shimmer{color:var(--eloq-thinking-base);background:0 0}}.eloq-regenerating-text{opacity:.4;transition:opacity .25s ease-out}.eloq-regenerating-sweep{border-radius:inherit;pointer-events:none;background:linear-gradient(100deg,#0000 30%,#ffffff8c,#0000 70%) 0 0/200% 100%;position:absolute;inset:0}.dark .eloq-regenerating-sweep{background-image:linear-gradient(100deg,#0000 30%,#ffffff1f,#0000 70%)}@media(prefers-reduced-motion:reduce){.eloq-regenerating-sweep{display:none}}@property --eloq-aura-angle{syntax:"<angle>";inherits:false;initial-value:0deg}.eloq-aura{--eloq-aura-strong:#9e9e9e;--eloq-aura-soft:#d1d1d1;background:conic-gradient(from var(--eloq-aura-angle),var(--eloq-aura-strong),var(--eloq-aura-soft),var(--eloq-aura-strong));border-radius:9999px;padding:2px;animation:2.6s linear infinite eloq-aura-spin;position:relative}@keyframes eloq-aura-spin{to{--eloq-aura-angle:360deg}}.eloq-aura-shine{border-radius:inherit;pointer-events:none;position:absolute;inset:0;overflow:hidden}.eloq-aura-shine:after{content:"";background:linear-gradient(90deg,#0000,#fffc,#0000);width:18%;position:absolute;top:-20%;bottom:-20%;left:0;transform:translate(-200%)skew(-20deg)}.eloq-aura-shine--active:after{animation:1.1s ease-in-out both eloq-aura-shine-sweep}@keyframes eloq-aura-shine-sweep{0%{transform:translate(-200%)skew(-20deg)}to{transform:translate(700%)skew(-20deg)}}@media(prefers-reduced-motion:reduce){.eloq-aura{animation:none}.eloq-aura-shine:after,.eloq-aura-shine--active:after{opacity:0;animation:none}}@keyframes panel-in{0%{opacity:0;transform:scale(.05)}to{opacity:1;transform:scale(1)}}@keyframes thinking-dot{0%,60%,to{opacity:.45;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}@keyframes regenerating-sweep{0%{background-position:150% 0}to{background-position:-50% 0}}@keyframes thinking-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@keyframes panel-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.05)}}@keyframes message-in{0%{opacity:0;transform:translateY(.5rem)}to{opacity:1;transform:translateY(0)}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}@keyframes slide-up-in{0%{transform:translateY(100%)}to{transform:translateY(0)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}', oo = "@media(prefers-reduced-motion:no-preference){.eloquentai-chat-launcher{transition:transform .2s ease-in-out}.eloquentai-chat-launcher:hover{transform:scale(1.1)}}", ro = [
|
|
12
|
+
const Je = '/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--eloq-aura-angle:0deg}}}@layer theme{:root,:host{--eloq-font-sans:system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--eloq-font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--eloq-color-red-50:oklch(97.1% .013 17.38);--eloq-color-red-200:oklch(88.5% .062 18.334);--eloq-color-red-400:oklch(70.4% .191 22.216);--eloq-color-red-500:oklch(63.7% .237 25.331);--eloq-color-red-800:oklch(44.4% .177 26.899);--eloq-color-amber-50:oklch(98.7% .022 95.277);--eloq-color-amber-200:oklch(92.4% .12 95.746);--eloq-color-amber-400:oklch(82.8% .189 84.429);--eloq-color-amber-500:oklch(76.9% .188 70.08);--eloq-color-amber-800:oklch(47.3% .137 46.201);--eloq-color-yellow-400:oklch(85.2% .199 91.936);--eloq-color-green-50:oklch(98.2% .018 155.826);--eloq-color-green-200:oklch(92.5% .084 155.995);--eloq-color-green-400:oklch(79.2% .209 151.711);--eloq-color-green-500:oklch(72.3% .219 149.579);--eloq-color-green-800:oklch(44.8% .119 151.328);--eloq-color-blue-50:oklch(97% .014 254.604);--eloq-color-blue-200:oklch(88.2% .059 254.128);--eloq-color-blue-400:oklch(70.7% .165 254.624);--eloq-color-blue-500:oklch(62.3% .214 259.815);--eloq-color-blue-800:oklch(42.4% .199 265.638);--eloq-color-gray-100:oklch(96.7% .003 264.542);--eloq-color-gray-200:oklch(92.8% .006 264.531);--eloq-color-gray-300:oklch(87.2% .01 258.338);--eloq-color-gray-400:oklch(70.7% .022 261.325);--eloq-color-gray-500:oklch(55.1% .027 264.364);--eloq-color-gray-600:oklch(44.6% .03 256.802);--eloq-color-gray-900:oklch(21% .034 264.665);--eloq-color-black:#000;--eloq-color-white:#fff;--eloq-spacing:.25rem;--eloq-container-xs:20rem;--eloq-text-xs:.75rem;--eloq-text-xs--line-height:calc(1 / .75);--eloq-text-sm:.875rem;--eloq-text-sm--line-height:calc(1.25 / .875);--eloq-text-base:1rem;--eloq-text-base--line-height: 1.5 ;--eloq-text-2xl:1.5rem;--eloq-text-2xl--line-height:calc(2 / 1.5);--eloq-font-weight-medium:500;--eloq-font-weight-semibold:600;--eloq-tracking-tight:-.025em;--eloq-leading-relaxed:1.625;--eloq-radius-sm:calc(var(--radius) - 4px);--eloq-radius-md:calc(var(--radius) - 2px);--eloq-radius-lg:var(--radius);--eloq-radius-xl:.75rem;--eloq-radius-2xl:1rem;--eloq-radius-3xl:1.5rem;--eloq-drop-shadow-lg:0 4px 4px #00000026;--eloq-drop-shadow-xl:0 9px 7px #0000001a;--eloq-ease-out:cubic-bezier(0, 0, .2, 1);--eloq-animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--eloq-default-transition-duration:.15s;--eloq-default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--eloq-default-font-family:var(--eloq-font-sans);--eloq-default-mono-font-family:var(--eloq-font-mono);--eloq-animate-panel-in:panel-in .35s cubic-bezier(.16, 1, .3, 1) both;--eloq-animate-panel-out:panel-out .25s cubic-bezier(.4, 0, 1, 1) both;--eloq-animate-panel-fade-in:fade-in .35s ease-out both;--eloq-animate-panel-fade-out:fade-out .25s ease-in both;--eloq-animate-message-fade-in:fade-in .3s ease-out both;--eloq-animate-thinking-dot:thinking-dot 1.2s ease-in-out infinite;--eloq-animate-thinking-shimmer:thinking-shimmer 1.8s linear infinite;--eloq-animate-regenerating:regenerating-sweep 1.2s linear infinite;--eloq-animate-text-in:fade-in .35s ease-out both;--eloq-animate-message-in:message-in .3s ease-out both;--eloq-animate-slide-up-in:slide-up-in .3s ease-out both}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--eloq-default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--eloq-default-font-feature-settings,normal);font-variation-settings:var(--eloq-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--eloq-default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--eloq-default-mono-font-feature-settings,normal);font-variation-settings:var(--eloq-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:root{--background:0 0% 100%;--foreground:0 0% 3.9%;--card:0 0% 100%;--card-foreground:0 0% 3.9%;--popover:0 0% 100%;--popover-foreground:0 0% 3.9%;--primary:267 56% 46%;--primary-foreground:0 0% 98%;--secondary:0 0% 96.1%;--secondary-foreground:0 0% 9%;--muted:0 0% 96.1%;--muted-foreground:0 0% 45.1%;--accent:0 0% 96.1%;--accent-foreground:0 0% 9%;--destructive:0 84.2% 60.2%;--destructive-foreground:0 0% 98%;--border:0 0% 89.8%;--input:0 0% 89.8%;--ring:0 0% 3.9%;--cream:37.5 44% 96.5%;--chart-1:12 76% 61%;--chart-2:173 58% 39%;--chart-3:197 37% 24%;--chart-4:43 74% 66%;--chart-5:27 87% 67%;--radius:.5rem}.dark{--background:262 50% 10%;--foreground:262 5% 90%;--card:262 50% 10%;--card-foreground:262 5% 90%;--popover:262 50% 5%;--popover-foreground:262 5% 90%;--primary:262 62% 70%;--primary-foreground:0 0% 100%;--primary-dark:262 62% 60%;--secondary:262 30% 30%;--secondary-foreground:0 0% 100%;--secondary-dark:262 30% 20%;--secondary-light:262 30% 40%;--tertiary:267 56% 46%;--tertiary-foreground:0 0% 100%;--tertiary-dark:267 38% 25%;--tertiary-light:263 100% 85%;--muted:224 30% 25%;--muted-foreground:262 5% 90%;--accent:224 30% 25%;--accent-foreground:262 5% 100%;--accent-dark:224 30% 15%;--destructive:0 100% 30%;--destructive-foreground:262 5% 90%;--border:0 0% 30%;--input:262 30% 25%;--ring:262 62% 71%;--cream:257 28% 20%;--radius:.5rem;--sidebar-background:var(--background);--sidebar-foreground:var(--foreground);--sidebar-primary:var(--primary);--sidebar-primary-foreground:var(--primary-foreground);--sidebar-accent:var(--accent);--sidebar-accent-foreground:var(--accent-foreground);--sidebar-border:var(--border);--sidebar-ring:var(--ring)}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}}@layer components;@layer utilities{.eloq\\:pointer-events-none{pointer-events:none}.eloq\\:invisible{visibility:hidden}.eloq\\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.eloq\\:absolute{position:absolute}.eloq\\:relative{position:relative}.eloq\\:inset-0{inset:0}.eloq\\:inset-0\\.5{inset:calc(var(--eloq-spacing) * .5)}.eloq\\:inset-x-0{inset-inline:0}.eloq\\:end-full{inset-inline-end:100%}.eloq\\:top-0{top:0}.eloq\\:top-0\\.5{top:calc(var(--eloq-spacing) * .5)}.eloq\\:top-1\\/2{top:50%}.eloq\\:top-\\[2px\\]{top:2px}.eloq\\:-right-\\[9px\\]{right:-9px}.eloq\\:right-0\\.5{right:calc(var(--eloq-spacing) * .5)}.eloq\\:right-2{right:calc(var(--eloq-spacing) * 2)}.eloq\\:right-16{right:calc(var(--eloq-spacing) * 16)}.eloq\\:right-\\[2px\\]{right:2px}.eloq\\:bottom-0{bottom:0}.eloq\\:bottom-1{bottom:var(--eloq-spacing)}.eloq\\:bottom-2{bottom:calc(var(--eloq-spacing) * 2)}.eloq\\:bottom-10{bottom:calc(var(--eloq-spacing) * 10)}.eloq\\:left-0{left:0}.eloq\\:left-2{left:calc(var(--eloq-spacing) * 2)}.eloq\\:left-\\[calc\\(50\\%-0\\.75rem\\)\\]{left:calc(50% - .75rem)}.eloq\\:z-10{z-index:10}.eloq\\:z-20{z-index:20}.eloq\\:z-30{z-index:30}.eloq\\:m-0{margin:0}.eloq\\:m-auto{margin:auto}.eloq\\:mx-1{margin-inline:var(--eloq-spacing)}.eloq\\:mx-auto{margin-inline:auto}.eloq\\:my-2{margin-block:calc(var(--eloq-spacing) * 2)}.eloq\\:my-4{margin-block:calc(var(--eloq-spacing) * 4)}.eloq\\:me-1{margin-inline-end:var(--eloq-spacing)}.eloq\\:-mt-2{margin-top:calc(var(--eloq-spacing) * -2)}.eloq\\:-mt-6{margin-top:calc(var(--eloq-spacing) * -6)}.eloq\\:-mt-20{margin-top:calc(var(--eloq-spacing) * -20)}.eloq\\:mt-1{margin-top:var(--eloq-spacing)}.eloq\\:mt-2{margin-top:calc(var(--eloq-spacing) * 2)}.eloq\\:mt-10{margin-top:calc(var(--eloq-spacing) * 10)}.eloq\\:mr-1{margin-right:var(--eloq-spacing)}.eloq\\:mr-\\[2px\\]{margin-right:2px}.eloq\\:mb-1{margin-bottom:var(--eloq-spacing)}.eloq\\:mb-3{margin-bottom:calc(var(--eloq-spacing) * 3)}.eloq\\:mb-4{margin-bottom:calc(var(--eloq-spacing) * 4)}.eloq\\:mb-10{margin-bottom:calc(var(--eloq-spacing) * 10)}.eloq\\:ml-0{margin-left:0}.eloq\\:ml-1{margin-left:var(--eloq-spacing)}.eloq\\:ml-5{margin-left:calc(var(--eloq-spacing) * 5)}.eloq\\:box-content{box-sizing:content-box}.eloq\\:block{display:block}.eloq\\:flex{display:flex}.eloq\\:hidden{display:none}.eloq\\:inline-flex{display:inline-flex}.eloq\\:field-sizing-content{field-sizing:content}.eloq\\:aspect-square{aspect-ratio:1}.eloq\\:h-1{height:var(--eloq-spacing)}.eloq\\:h-2\\.5{height:calc(var(--eloq-spacing) * 2.5)}.eloq\\:h-3{height:calc(var(--eloq-spacing) * 3)}.eloq\\:h-4{height:calc(var(--eloq-spacing) * 4)}.eloq\\:h-5{height:calc(var(--eloq-spacing) * 5)}.eloq\\:h-6{height:calc(var(--eloq-spacing) * 6)}.eloq\\:h-8{height:calc(var(--eloq-spacing) * 8)}.eloq\\:h-10{height:calc(var(--eloq-spacing) * 10)}.eloq\\:h-12{height:calc(var(--eloq-spacing) * 12)}.eloq\\:h-14{height:calc(var(--eloq-spacing) * 14)}.eloq\\:h-16{height:calc(var(--eloq-spacing) * 16)}.eloq\\:h-\\[0\\.42em\\]{height:.42em}.eloq\\:h-\\[160px\\]{height:160px}.eloq\\:h-\\[220px\\]{height:220px}.eloq\\:h-\\[560px\\]{height:560px}.eloq\\:h-\\[600px\\]{height:600px}.eloq\\:h-full{height:100%}.eloq\\:max-h-\\[132px\\]{max-height:132px}.eloq\\:min-h-6{min-height:calc(var(--eloq-spacing) * 6)}.eloq\\:min-h-\\[48px\\]{min-height:48px}.eloq\\:min-h-\\[80px\\]{min-height:80px}.eloq\\:w-2\\.5{width:calc(var(--eloq-spacing) * 2.5)}.eloq\\:w-2\\/3{width:66.6667%}.eloq\\:w-3{width:calc(var(--eloq-spacing) * 3)}.eloq\\:w-4{width:calc(var(--eloq-spacing) * 4)}.eloq\\:w-5{width:calc(var(--eloq-spacing) * 5)}.eloq\\:w-6{width:calc(var(--eloq-spacing) * 6)}.eloq\\:w-8{width:calc(var(--eloq-spacing) * 8)}.eloq\\:w-10{width:calc(var(--eloq-spacing) * 10)}.eloq\\:w-12{width:calc(var(--eloq-spacing) * 12)}.eloq\\:w-14{width:calc(var(--eloq-spacing) * 14)}.eloq\\:w-16{width:calc(var(--eloq-spacing) * 16)}.eloq\\:w-24{width:calc(var(--eloq-spacing) * 24)}.eloq\\:w-32{width:calc(var(--eloq-spacing) * 32)}.eloq\\:w-48{width:calc(var(--eloq-spacing) * 48)}.eloq\\:w-\\[0\\.42em\\]{width:.42em}.eloq\\:w-\\[70\\%\\]{width:70%}.eloq\\:w-\\[320px\\]{width:320px}.eloq\\:w-\\[340px\\]{width:340px}.eloq\\:w-\\[348px\\]{width:348px}.eloq\\:w-\\[380px\\]{width:380px}.eloq\\:w-\\[420px\\]{width:420px}.eloq\\:w-full{width:100%}.eloq\\:max-w-\\[75\\%\\]{max-width:75%}.eloq\\:max-w-\\[88\\%\\]{max-width:88%}.eloq\\:max-w-full{max-width:100%}.eloq\\:max-w-xs{max-width:var(--eloq-container-xs)}.eloq\\:min-w-0{min-width:0}.eloq\\:min-w-6{min-width:calc(var(--eloq-spacing) * 6)}.eloq\\:min-w-min{min-width:min-content}.eloq\\:flex-1{flex:1}.eloq\\:flex-none{flex:none}.eloq\\:flex-shrink-0,.eloq\\:shrink-0{flex-shrink:0}.eloq\\:flex-grow{flex-grow:1}.eloq\\:origin-bottom-right{transform-origin:100% 100%}.eloq\\:translate-x-0{--tw-translate-x:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:translate-x-8{--tw-translate-x:calc(var(--eloq-spacing) * 8);translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:-scale-x-100{--tw-scale-x: -100% ;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:scale-\\[0\\.05\\]{scale:.05}.eloq\\:transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.eloq\\:animate-message-in{animation:var(--eloq-animate-message-in)}.eloq\\:animate-panel-in{animation:var(--eloq-animate-panel-in)}.eloq\\:animate-panel-out{animation:var(--eloq-animate-panel-out)}.eloq\\:animate-pulse{animation:var(--eloq-animate-pulse)}.eloq\\:animate-regenerating{animation:var(--eloq-animate-regenerating)}.eloq\\:animate-text-in{animation:var(--eloq-animate-text-in)}.eloq\\:animate-thinking-shimmer{animation:var(--eloq-animate-thinking-shimmer)}.eloq\\:cursor-default{cursor:default}.eloq\\:cursor-grab{cursor:grab}.eloq\\:cursor-pointer{cursor:pointer}.eloq\\:touch-none{touch-action:none}.eloq\\:resize-none{resize:none}.eloq\\:list-decimal{list-style-type:decimal}.eloq\\:list-disc{list-style-type:disc}.eloq\\:flex-col{flex-direction:column}.eloq\\:flex-row{flex-direction:row}.eloq\\:flex-wrap{flex-wrap:wrap}.eloq\\:items-center{align-items:center}.eloq\\:items-end{align-items:flex-end}.eloq\\:items-start{align-items:flex-start}.eloq\\:justify-between{justify-content:space-between}.eloq\\:justify-center{justify-content:center}.eloq\\:justify-end{justify-content:flex-end}.eloq\\:justify-start{justify-content:flex-start}.eloq\\:gap-1{gap:var(--eloq-spacing)}.eloq\\:gap-1\\.5{gap:calc(var(--eloq-spacing) * 1.5)}.eloq\\:gap-2{gap:calc(var(--eloq-spacing) * 2)}.eloq\\:gap-3{gap:calc(var(--eloq-spacing) * 3)}.eloq\\:gap-\\[0\\.25em\\]{gap:.25em}:where(.eloq\\:space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block:0}:where(.eloq\\:space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--eloq-spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--eloq-spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--eloq-spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--eloq-spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.eloq\\:space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(var(--eloq-spacing) * var(--tw-space-x-reverse));margin-inline-end:calc(var(--eloq-spacing) * calc(1 - var(--tw-space-x-reverse)))}:where(.eloq\\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--eloq-spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--eloq-spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}:where(.eloq\\:space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--eloq-spacing) * 3) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--eloq-spacing) * 3) * calc(1 - var(--tw-space-x-reverse)))}.eloq\\:self-end{align-self:flex-end}.eloq\\:self-stretch{align-self:stretch}.eloq\\:overflow-hidden{overflow:hidden}.eloq\\:overflow-x-auto{overflow-x:auto}.eloq\\:overscroll-contain{overscroll-behavior:contain}.eloq\\:rounded{border-radius:.25rem}.eloq\\:rounded-2xl{border-radius:var(--eloq-radius-2xl)}.eloq\\:rounded-3xl{border-radius:var(--eloq-radius-3xl)}.eloq\\:rounded-\\[inherit\\]{border-radius:inherit}.eloq\\:rounded-full{border-radius:3.40282e38px}.eloq\\:rounded-lg{border-radius:var(--eloq-radius-lg)}.eloq\\:rounded-md{border-radius:var(--eloq-radius-md)}.eloq\\:rounded-none{border-radius:0}.eloq\\:rounded-sm{border-radius:var(--eloq-radius-sm)}.eloq\\:rounded-xl{border-radius:var(--eloq-radius-xl)}.eloq\\:rounded-t-2xl{border-top-left-radius:var(--eloq-radius-2xl);border-top-right-radius:var(--eloq-radius-2xl)}.eloq\\:border{border-style:var(--tw-border-style);border-width:1px}.eloq\\:border-0{border-style:var(--tw-border-style);border-width:0}.eloq\\:border-2{border-style:var(--tw-border-style);border-width:2px}.eloq\\:border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.eloq\\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.eloq\\:border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.eloq\\:border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.eloq\\:border-dashed{--tw-border-style:dashed;border-style:dashed}.eloq\\:border-amber-400{border-color:var(--eloq-color-amber-400)}.eloq\\:border-blue-500{border-color:var(--eloq-color-blue-500)}.eloq\\:border-border{border-color:hsl(var(--border))}.eloq\\:border-current{border-color:currentColor}.eloq\\:border-green-500{border-color:var(--eloq-color-green-500)}.eloq\\:border-input{border-color:hsl(var(--input))}.eloq\\:border-red-500{border-color:var(--eloq-color-red-500)}.eloq\\:border-t-transparent{border-top-color:#0000}.eloq\\:border-l-transparent{border-left-color:#0000}.eloq\\:bg-\\[\\#0a0a0a\\]{background-color:#0a0a0a}.eloq\\:bg-\\[\\#000\\]{background-color:#000}.eloq\\:bg-\\[\\#fff\\]{background-color:#fff}.eloq\\:bg-amber-50{background-color:var(--eloq-color-amber-50)}.eloq\\:bg-background{background-color:hsl(var(--background))}.eloq\\:bg-black\\/20{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-black\\/20{background-color:color-mix(in oklab,var(--eloq-color-black) 20%,transparent)}}.eloq\\:bg-black\\/60{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-black\\/60{background-color:color-mix(in oklab,var(--eloq-color-black) 60%,transparent)}}.eloq\\:bg-blue-50{background-color:var(--eloq-color-blue-50)}.eloq\\:bg-border{background-color:hsl(var(--border))}.eloq\\:bg-card{background-color:hsl(var(--card))}.eloq\\:bg-cream{background-color:hsl(var(--cream))}.eloq\\:bg-gray-400{background-color:var(--eloq-color-gray-400)}.eloq\\:bg-gray-900{background-color:var(--eloq-color-gray-900)}.eloq\\:bg-green-50{background-color:var(--eloq-color-green-50)}.eloq\\:bg-muted{background-color:hsl(var(--muted))}.eloq\\:bg-muted-foreground{background-color:hsl(var(--muted-foreground))}.eloq\\:bg-primary{background-color:hsl(var(--primary))}.eloq\\:bg-red-50{background-color:var(--eloq-color-red-50)}.eloq\\:bg-white,.eloq\\:bg-white\\/20{background-color:var(--eloq-color-white)}@supports (color:color-mix(in lab,red,red)){.eloq\\:bg-white\\/20{background-color:color-mix(in oklab,var(--eloq-color-white) 20%,transparent)}}.eloq\\:fill-none{fill:none}.eloq\\:fill-yellow-400{fill:var(--eloq-color-yellow-400)}.eloq\\:object-contain{object-fit:contain}.eloq\\:object-cover{object-fit:cover}.eloq\\:p-0{padding:0}.eloq\\:p-0\\.5{padding:calc(var(--eloq-spacing) * .5)}.eloq\\:p-1{padding:var(--eloq-spacing)}.eloq\\:p-2{padding:calc(var(--eloq-spacing) * 2)}.eloq\\:p-3{padding:calc(var(--eloq-spacing) * 3)}.eloq\\:p-4{padding:calc(var(--eloq-spacing) * 4)}.eloq\\:p-6{padding:calc(var(--eloq-spacing) * 6)}.eloq\\:p-\\[1px\\]{padding:1px}.eloq\\:p-\\[7px\\]{padding:7px}.eloq\\:px-0{padding-inline:0}.eloq\\:px-1\\.5{padding-inline:calc(var(--eloq-spacing) * 1.5)}.eloq\\:px-2{padding-inline:calc(var(--eloq-spacing) * 2)}.eloq\\:px-3{padding-inline:calc(var(--eloq-spacing) * 3)}.eloq\\:px-4{padding-inline:calc(var(--eloq-spacing) * 4)}.eloq\\:px-5{padding-inline:calc(var(--eloq-spacing) * 5)}.eloq\\:px-\\[12px\\]{padding-inline:12px}.eloq\\:px-\\[16px\\]{padding-inline:16px}.eloq\\:py-0\\.5{padding-block:calc(var(--eloq-spacing) * .5)}.eloq\\:py-1{padding-block:var(--eloq-spacing)}.eloq\\:py-1\\.5{padding-block:calc(var(--eloq-spacing) * 1.5)}.eloq\\:py-2{padding-block:calc(var(--eloq-spacing) * 2)}.eloq\\:py-3{padding-block:calc(var(--eloq-spacing) * 3)}.eloq\\:py-3\\.5{padding-block:calc(var(--eloq-spacing) * 3.5)}.eloq\\:py-\\[8px\\]{padding-block:8px}.eloq\\:py-\\[12px\\]{padding-block:12px}.eloq\\:pt-0{padding-top:0}.eloq\\:pt-2{padding-top:calc(var(--eloq-spacing) * 2)}.eloq\\:pt-4{padding-top:calc(var(--eloq-spacing) * 4)}.eloq\\:pt-5{padding-top:calc(var(--eloq-spacing) * 5)}.eloq\\:pt-6{padding-top:calc(var(--eloq-spacing) * 6)}.eloq\\:pt-10{padding-top:calc(var(--eloq-spacing) * 10)}.eloq\\:pt-24{padding-top:calc(var(--eloq-spacing) * 24)}.eloq\\:pr-2{padding-right:calc(var(--eloq-spacing) * 2)}.eloq\\:pr-4{padding-right:calc(var(--eloq-spacing) * 4)}.eloq\\:pr-12{padding-right:calc(var(--eloq-spacing) * 12)}.eloq\\:pb-2{padding-bottom:calc(var(--eloq-spacing) * 2)}.eloq\\:pb-4{padding-bottom:calc(var(--eloq-spacing) * 4)}.eloq\\:pb-10{padding-bottom:calc(var(--eloq-spacing) * 10)}.eloq\\:pb-14{padding-bottom:calc(var(--eloq-spacing) * 14)}.eloq\\:pl-3{padding-left:calc(var(--eloq-spacing) * 3)}.eloq\\:pl-4{padding-left:calc(var(--eloq-spacing) * 4)}.eloq\\:pl-11{padding-left:calc(var(--eloq-spacing) * 11)}.eloq\\:text-center{text-align:center}.eloq\\:text-left{text-align:left}.eloq\\:text-2xl{font-size:var(--eloq-text-2xl);line-height:var(--tw-leading,var(--eloq-text-2xl--line-height))}.eloq\\:text-base{font-size:var(--eloq-text-base);line-height:var(--tw-leading,var(--eloq-text-base--line-height))}.eloq\\:text-sm{font-size:var(--eloq-text-sm);line-height:var(--tw-leading,var(--eloq-text-sm--line-height))}.eloq\\:text-xs{font-size:var(--eloq-text-xs);line-height:var(--tw-leading,var(--eloq-text-xs--line-height))}.eloq\\:text-\\[10px\\]{font-size:10px}.eloq\\:leading-5{--tw-leading:calc(var(--eloq-spacing) * 5);line-height:calc(var(--eloq-spacing) * 5)}.eloq\\:leading-none{--tw-leading:1;line-height:1}.eloq\\:leading-relaxed{--tw-leading:var(--eloq-leading-relaxed);line-height:var(--eloq-leading-relaxed)}.eloq\\:font-medium{--tw-font-weight:var(--eloq-font-weight-medium);font-weight:var(--eloq-font-weight-medium)}.eloq\\:font-semibold{--tw-font-weight:var(--eloq-font-weight-semibold);font-weight:var(--eloq-font-weight-semibold)}.eloq\\:tracking-tight{--tw-tracking:var(--eloq-tracking-tight);letter-spacing:var(--eloq-tracking-tight)}.eloq\\:whitespace-nowrap{white-space:nowrap}.eloq\\:text-\\[\\#000\\]{color:#000}.eloq\\:text-\\[\\#fff\\]{color:#fff}.eloq\\:text-amber-500{color:var(--eloq-color-amber-500)}.eloq\\:text-amber-800{color:var(--eloq-color-amber-800)}.eloq\\:text-blue-500{color:var(--eloq-color-blue-500)}.eloq\\:text-blue-800{color:var(--eloq-color-blue-800)}.eloq\\:text-card-foreground{color:hsl(var(--card-foreground))}.eloq\\:text-destructive{color:hsl(var(--destructive))}.eloq\\:text-foreground{color:hsl(var(--foreground))}.eloq\\:text-gray-300{color:var(--eloq-color-gray-300)}.eloq\\:text-gray-400{color:var(--eloq-color-gray-400)}.eloq\\:text-gray-500{color:var(--eloq-color-gray-500)}.eloq\\:text-green-500{color:var(--eloq-color-green-500)}.eloq\\:text-green-800{color:var(--eloq-color-green-800)}.eloq\\:text-muted{color:hsl(var(--muted))}.eloq\\:text-muted-foreground{color:hsl(var(--muted-foreground))}.eloq\\:text-primary{color:hsl(var(--primary))}.eloq\\:text-primary-foreground{color:hsl(var(--primary-foreground))}.eloq\\:text-red-500{color:var(--eloq-color-red-500)}.eloq\\:text-red-800{color:var(--eloq-color-red-800)}.eloq\\:text-white{color:var(--eloq-color-white)}.eloq\\:text-yellow-400{color:var(--eloq-color-yellow-400)}.eloq\\:italic{font-style:italic}.eloq\\:underline{text-decoration-line:underline}.eloq\\:opacity-0{opacity:0}.eloq\\:opacity-50{opacity:.5}.eloq\\:opacity-70{opacity:.7}.eloq\\:opacity-75{opacity:.75}.eloq\\:opacity-100{opacity:1}.eloq\\:shadow-\\[0_-8px_24px_rgba\\(0\\,0\\,0\\,0\\.08\\)\\]{--tw-shadow:0 -8px 24px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:shadow-\\[0_0_4px_0_rgba\\(0\\,0\\,0\\,0\\.20\\)\\]{--tw-shadow:0 0 4px 0 var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:shadow-\\[0_3px_4px_-2px_rgba\\(0\\,0\\,0\\,0\\.04\\)\\]{--tw-shadow:0 3px 4px -2px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.eloq\\:outline-2{outline-style:var(--tw-outline-style);outline-width:2px}.eloq\\:outline-offset-2{outline-offset:2px}.eloq\\:outline-transparent{outline-color:#0000}.eloq\\:drop-shadow-lg{--tw-drop-shadow-size:drop-shadow(0 4px 4px var(--tw-drop-shadow-color,#00000026));--tw-drop-shadow:drop-shadow(var(--eloq-drop-shadow-lg));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.eloq\\:transition-\\[outline-color\\]{transition-property:outline-color;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-\\[visibility\\]{transition-property:visibility;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-\\[width\\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--eloq-default-transition-timing-function));transition-duration:var(--tw-duration,var(--eloq-default-transition-duration))}.eloq\\:delay-100{transition-delay:.1s}.eloq\\:duration-0{--tw-duration:0s;transition-duration:0s}.eloq\\:duration-150{--tw-duration:.15s;transition-duration:.15s}.eloq\\:duration-200{--tw-duration:.2s;transition-duration:.2s}.eloq\\:duration-300{--tw-duration:.3s;transition-duration:.3s}.eloq\\:duration-500{--tw-duration:.5s;transition-duration:.5s}.eloq\\:ease-out{--tw-ease:var(--eloq-ease-out);transition-timing-function:var(--eloq-ease-out)}.eloq\\:outline-none{--tw-outline-style:none;outline-style:none}.eloq\\:select-none{-webkit-user-select:none;user-select:none}.eloq\\:group-focus-visible\\:block:is(:where(.eloq\\:group):focus-visible *){display:block}.eloq\\:placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.eloq\\:last\\:mb-0:last-child{margin-bottom:0}@media(hover:hover){.eloq\\:hover\\:bg-black\\/5:hover{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:hover\\:bg-black\\/5:hover{background-color:color-mix(in oklab,var(--eloq-color-black) 5%,transparent)}}.eloq\\:hover\\:bg-black\\/80:hover{background-color:var(--eloq-color-black)}@supports (color:color-mix(in lab,red,red)){.eloq\\:hover\\:bg-black\\/80:hover{background-color:color-mix(in oklab,var(--eloq-color-black) 80%,transparent)}}.eloq\\:hover\\:bg-muted:hover{background-color:hsl(var(--muted))}.eloq\\:hover\\:bg-red-500:hover{background-color:var(--eloq-color-red-500)}.eloq\\:hover\\:text-foreground:hover{color:hsl(var(--foreground))}.eloq\\:hover\\:text-gray-600:hover{color:var(--eloq-color-gray-600)}.eloq\\:hover\\:text-primary:hover{color:hsl(var(--primary))}.eloq\\:hover\\:opacity-80:hover{opacity:.8}.eloq\\:hover\\:opacity-90:hover{opacity:.9}.eloq\\:hover\\:opacity-100:hover{opacity:1}.eloq\\:hover\\:drop-shadow-xl:hover{--tw-drop-shadow-size:drop-shadow(0 9px 7px var(--tw-drop-shadow-color,#0000001a));--tw-drop-shadow:drop-shadow(var(--eloq-drop-shadow-xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.eloq\\:focus-visible\\:opacity-100:focus-visible{opacity:1}.eloq\\:focus-visible\\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.eloq\\:focus-visible\\:ring-muted:focus-visible{--tw-ring-color:hsl(var(--muted))}.eloq\\:focus-visible\\:ring-primary:focus-visible{--tw-ring-color:hsl(var(--primary))}.eloq\\:focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.eloq\\:focus-visible\\:outline-hidden:focus-visible{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.eloq\\:focus-visible\\:outline-hidden:focus-visible{outline-offset:2px;outline:2px solid #0000}}.eloq\\:focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.eloq\\:focus-visible\\:-outline-offset-4:focus-visible{outline-offset:-4px}.eloq\\:focus-visible\\:outline-current:focus-visible{outline-color:currentColor}.eloq\\:focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.eloq\\:focus-visible\\:outline-solid:focus-visible{--tw-outline-style:solid;outline-style:solid}.eloq\\:active\\:cursor-grabbing:active{cursor:grabbing}.eloq\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.eloq\\:disabled\\:opacity-50:disabled{opacity:.5}.eloq\\:has-focus-visible\\:outline-2:has(:focus-visible){outline-style:var(--tw-outline-style);outline-width:2px}.eloq\\:has-focus-visible\\:outline-offset-1:has(:focus-visible){outline-offset:1px}.eloq\\:has-focus-visible\\:outline-ring:has(:focus-visible){outline-color:hsl(var(--ring))}@media(prefers-reduced-motion:no-preference){.eloq\\:motion-safe\\:translate-x-8{--tw-translate-x:calc(var(--eloq-spacing) * 8);translate:var(--tw-translate-x) var(--tw-translate-y)}.eloq\\:motion-safe\\:scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.eloq\\:motion-safe\\:animate-slide-up-in{animation:var(--eloq-animate-slide-up-in)}.eloq\\:motion-safe\\:animate-thinking-dot{animation:var(--eloq-animate-thinking-dot)}}@media(prefers-reduced-motion:reduce){.eloq\\:motion-reduce\\:animate-message-fade-in{animation:var(--eloq-animate-message-fade-in)}.eloq\\:motion-reduce\\:animate-none{animation:none}.eloq\\:motion-reduce\\:animate-panel-fade-in{animation:var(--eloq-animate-panel-fade-in)}.eloq\\:motion-reduce\\:animate-panel-fade-out{animation:var(--eloq-animate-panel-fade-out)}.eloq\\:motion-reduce\\:opacity-70{opacity:.7}}@media(min-width:40rem){.eloq\\:sm\\:text-sm{font-size:var(--eloq-text-sm);line-height:var(--tw-leading,var(--eloq-text-sm--line-height))}}@media(min-width:48rem){.eloq\\:md\\:text-sm{font-size:var(--eloq-text-sm);line-height:var(--tw-leading,var(--eloq-text-sm--line-height))}}.eloq\\:dark\\:border:is(.dark *){border-style:var(--tw-border-style);border-width:1px}.eloq\\:dark\\:border-b:is(.dark *){border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.eloq\\:dark\\:border-border:is(.dark *){border-color:hsl(var(--border))}.eloq\\:dark\\:bg-amber-400\\/10:is(.dark *){background-color:var(--eloq-color-amber-400)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-amber-400\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-amber-400) 10%,transparent)}}.eloq\\:dark\\:bg-blue-500\\/10:is(.dark *){background-color:var(--eloq-color-blue-500)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-blue-500\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-blue-500) 10%,transparent)}}.eloq\\:dark\\:bg-card:is(.dark *){background-color:hsl(var(--card))}.eloq\\:dark\\:bg-gray-100:is(.dark *){background-color:var(--eloq-color-gray-100)}.eloq\\:dark\\:bg-gray-200:is(.dark *){background-color:var(--eloq-color-gray-200)}.eloq\\:dark\\:bg-green-500\\/10:is(.dark *){background-color:var(--eloq-color-green-500)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-green-500\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-green-500) 10%,transparent)}}.eloq\\:dark\\:bg-muted:is(.dark *){background-color:hsl(var(--muted))}.eloq\\:dark\\:bg-red-500\\/10:is(.dark *){background-color:var(--eloq-color-red-500)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:bg-red-500\\/10:is(.dark *){background-color:color-mix(in oklab,var(--eloq-color-red-500) 10%,transparent)}}.eloq\\:dark\\:text-amber-200:is(.dark *){color:var(--eloq-color-amber-200)}.eloq\\:dark\\:text-amber-400:is(.dark *){color:var(--eloq-color-amber-400)}.eloq\\:dark\\:text-blue-200:is(.dark *){color:var(--eloq-color-blue-200)}.eloq\\:dark\\:text-blue-400:is(.dark *){color:var(--eloq-color-blue-400)}.eloq\\:dark\\:text-gray-500:is(.dark *){color:var(--eloq-color-gray-500)}.eloq\\:dark\\:text-gray-900:is(.dark *){color:var(--eloq-color-gray-900)}.eloq\\:dark\\:text-green-200:is(.dark *){color:var(--eloq-color-green-200)}.eloq\\:dark\\:text-green-400:is(.dark *){color:var(--eloq-color-green-400)}.eloq\\:dark\\:text-muted-foreground:is(.dark *),.eloq\\:dark\\:text-muted-foreground\\/50:is(.dark *){color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:text-muted-foreground\\/50:is(.dark *){color:color-mix(in oklab,hsl(var(--muted-foreground)) 50%,transparent)}}.eloq\\:dark\\:text-red-200:is(.dark *){color:var(--eloq-color-red-200)}.eloq\\:dark\\:text-red-400:is(.dark *){color:var(--eloq-color-red-400)}.eloq\\:dark\\:shadow-none:is(.dark *){--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@media(hover:hover){.eloq\\:dark\\:hover\\:bg-white\\/10:is(.dark *):hover{background-color:var(--eloq-color-white)}@supports (color:color-mix(in lab,red,red)){.eloq\\:dark\\:hover\\:bg-white\\/10:is(.dark *):hover{background-color:color-mix(in oklab,var(--eloq-color-white) 10%,transparent)}}.eloq\\:dark\\:hover\\:text-gray-300:is(.dark *):hover{color:var(--eloq-color-gray-300)}.eloq\\:dark\\:hover\\:text-primary:is(.dark *):hover{color:hsl(var(--primary))}}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}}body{background-color:#0000}.eloquent-chat{font-family:system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol}.collapse{visibility:unset!important}.eloq-wrap-anywhere{overflow-wrap:anywhere}.eloq-thin-scrollbar{scrollbar-width:thin;scrollbar-color:hsl(var(--border)) transparent}.eloq-thin-scrollbar::-webkit-scrollbar{width:8px;height:8px}.eloq-thin-scrollbar::-webkit-scrollbar-thumb{background-color:hsl(var(--border));border-radius:9999px}.eloq-thin-scrollbar::-webkit-scrollbar-track{background-color:#0000}.eloq-test-mode-stripe{background:repeating-linear-gradient(-45deg,#f6e05e,#f6e05e 10px,#000 10px 20px)}.eloq-thinking-shimmer{--eloq-thinking-base:#9ca3af;--eloq-thinking-highlight:#4b5563;background:linear-gradient(90deg,var(--eloq-thinking-base) 0%,var(--eloq-thinking-base) 35%,var(--eloq-thinking-highlight) 50%,var(--eloq-thinking-base) 65%,var(--eloq-thinking-base) 100%);color:#0000;background-size:200% 100%;-webkit-background-clip:text;background-clip:text}.dark .eloq-thinking-shimmer{--eloq-thinking-base:#6b7280;--eloq-thinking-highlight:#e5e7eb}@media(prefers-reduced-motion:reduce){.eloq-thinking-shimmer{color:var(--eloq-thinking-base);background:0 0}}.eloq-regenerating-text{opacity:.4;transition:opacity .25s ease-out}.eloq-regenerating-sweep{border-radius:inherit;pointer-events:none;background:linear-gradient(100deg,#0000 30%,#ffffff8c,#0000 70%) 0 0/200% 100%;position:absolute;inset:0}.dark .eloq-regenerating-sweep{background-image:linear-gradient(100deg,#0000 30%,#ffffff1f,#0000 70%)}@media(prefers-reduced-motion:reduce){.eloq-regenerating-sweep{display:none}}@property --eloq-aura-angle{syntax:"<angle>";inherits:false;initial-value:0deg}.eloq-aura{--eloq-aura-strong:#9e9e9e;--eloq-aura-soft:#d1d1d1;background:conic-gradient(from var(--eloq-aura-angle),var(--eloq-aura-strong),var(--eloq-aura-soft),var(--eloq-aura-strong));border-radius:9999px;padding:2px;animation:2.6s linear infinite eloq-aura-spin;position:relative}@keyframes eloq-aura-spin{to{--eloq-aura-angle:360deg}}.eloq-aura-shine{border-radius:inherit;pointer-events:none;position:absolute;inset:0;overflow:hidden}.eloq-aura-shine:after{content:"";background:linear-gradient(90deg,#0000,#fffc,#0000);width:18%;position:absolute;top:-20%;bottom:-20%;left:0;transform:translate(-200%)skew(-20deg)}.eloq-aura-shine--active:after{animation:1.1s ease-in-out both eloq-aura-shine-sweep}@keyframes eloq-aura-shine-sweep{0%{transform:translate(-200%)skew(-20deg)}to{transform:translate(700%)skew(-20deg)}}@media(prefers-reduced-motion:reduce){.eloq-aura{animation:none}.eloq-aura-shine:after,.eloq-aura-shine--active:after{opacity:0;animation:none}}@keyframes panel-in{0%{opacity:0;transform:scale(.05)}to{opacity:1;transform:scale(1)}}@keyframes thinking-dot{0%,60%,to{opacity:.45;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}@keyframes regenerating-sweep{0%{background-position:150% 0}to{background-position:-50% 0}}@keyframes thinking-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@keyframes panel-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.05)}}@keyframes message-in{0%{opacity:0;transform:translateY(.5rem)}to{opacity:1;transform:translateY(0)}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}@keyframes slide-up-in{0%{transform:translateY(100%)}to{transform:translateY(0)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}', oo = "@media(prefers-reduced-motion:no-preference){.eloquentai-chat-launcher{transition:transform .2s ease-in-out}.eloquentai-chat-launcher:hover{transform:scale(1.1)}}", ro = [
|
|
37
13
|
"button",
|
|
38
14
|
"a[href]",
|
|
39
15
|
"input",
|
|
@@ -51,13 +27,13 @@ function ao({
|
|
|
51
27
|
isDarkMode: o = !1
|
|
52
28
|
}) {
|
|
53
29
|
const r = o ? "#fff" : "#000", n = o ? "#000000" : "#ffffff";
|
|
54
|
-
return /* @__PURE__ */ I("div", { className: "eloq:absolute eloq:inset-0 eloq:m-auto eloq:flex eloq:items-center eloq:justify-center eloq:overflow-hidden", children: /* @__PURE__ */
|
|
30
|
+
return /* @__PURE__ */ I("div", { className: "eloq:absolute eloq:inset-0 eloq:m-auto eloq:flex eloq:items-center eloq:justify-center eloq:overflow-hidden", children: /* @__PURE__ */ ke(
|
|
55
31
|
"button",
|
|
56
32
|
{
|
|
57
33
|
type: "button",
|
|
58
34
|
"aria-label": "Open chat",
|
|
59
35
|
"aria-expanded": e,
|
|
60
|
-
className:
|
|
36
|
+
className: Be(
|
|
61
37
|
"eloq:group eloq:chat-bubble eloq:relative eloq:flex eloq:items-center eloq:justify-center eloq:w-12 eloq:h-12 eloq:rounded-full eloq:cursor-pointer",
|
|
62
38
|
// The ring below replaces the UA outline, which would be drawn
|
|
63
39
|
// outside the circle and clipped by the 48px launcher iframe.
|
|
@@ -77,7 +53,7 @@ function ao({
|
|
|
77
53
|
{
|
|
78
54
|
"aria-hidden": !0,
|
|
79
55
|
className: "eloq:absolute eloq:inset-0 eloq:flex eloq:justify-center eloq:items-center eloq:m-auto",
|
|
80
|
-
children: /* @__PURE__ */ I(
|
|
56
|
+
children: /* @__PURE__ */ I(At, { bgColor: r, fgColor: n })
|
|
81
57
|
}
|
|
82
58
|
),
|
|
83
59
|
/* @__PURE__ */ I(
|
|
@@ -92,15 +68,15 @@ function ao({
|
|
|
92
68
|
) });
|
|
93
69
|
}
|
|
94
70
|
function Ge({ children: e, head: t, frameRef: o, ...r }) {
|
|
95
|
-
const [n, a] = C(null),
|
|
71
|
+
const [n, a] = C(null), l = v(
|
|
96
72
|
(i) => {
|
|
97
73
|
a(i), o && (o.current = i);
|
|
98
74
|
},
|
|
99
75
|
[o]
|
|
100
|
-
), s = n?.contentWindow?.document?.head,
|
|
101
|
-
return /* @__PURE__ */
|
|
76
|
+
), s = n?.contentWindow?.document?.head, u = n?.contentWindow?.document?.body;
|
|
77
|
+
return /* @__PURE__ */ ke("iframe", { ...r, ref: l, children: [
|
|
102
78
|
s && ot(t, s),
|
|
103
|
-
|
|
79
|
+
u && ot(e, u)
|
|
104
80
|
] });
|
|
105
81
|
}
|
|
106
82
|
function io({ children: e, container: t }) {
|
|
@@ -113,18 +89,18 @@ function so({
|
|
|
113
89
|
onMessageClick: r,
|
|
114
90
|
autoHideDelay: n
|
|
115
91
|
}) {
|
|
116
|
-
const [a,
|
|
92
|
+
const [a, l] = C(!1), [s, u] = C("entering"), [i, d] = C(!1), p = Pt();
|
|
117
93
|
if (K(() => {
|
|
118
94
|
if (t) {
|
|
119
|
-
|
|
95
|
+
l(!0), u("entering");
|
|
120
96
|
const h = setTimeout(() => {
|
|
121
|
-
|
|
97
|
+
u("visible");
|
|
122
98
|
}, 50);
|
|
123
99
|
return () => clearTimeout(h);
|
|
124
100
|
} else {
|
|
125
|
-
|
|
101
|
+
u("exiting");
|
|
126
102
|
const h = setTimeout(() => {
|
|
127
|
-
|
|
103
|
+
l(!1), u("entering");
|
|
128
104
|
}, 300);
|
|
129
105
|
return () => clearTimeout(h);
|
|
130
106
|
}
|
|
@@ -132,20 +108,20 @@ function so({
|
|
|
132
108
|
if (!t || i) return;
|
|
133
109
|
let h = !1, f;
|
|
134
110
|
const g = setTimeout(() => {
|
|
135
|
-
h = !0,
|
|
111
|
+
h = !0, u("exiting"), f = setTimeout(() => {
|
|
136
112
|
o();
|
|
137
113
|
}, 300);
|
|
138
114
|
}, n);
|
|
139
115
|
return () => {
|
|
140
|
-
clearTimeout(g), clearTimeout(f), h &&
|
|
116
|
+
clearTimeout(g), clearTimeout(f), h && u("visible");
|
|
141
117
|
};
|
|
142
118
|
}, [t, i, o, n]), !a)
|
|
143
119
|
return null;
|
|
144
|
-
const
|
|
120
|
+
const c = p.botBubbleTextColor || Ot(p.botBubbleColor);
|
|
145
121
|
return /* @__PURE__ */ I(
|
|
146
122
|
"div",
|
|
147
123
|
{
|
|
148
|
-
className:
|
|
124
|
+
className: Be(
|
|
149
125
|
// right-16 leaves a ~7px gap between the tail tip and the launcher
|
|
150
126
|
// circle's edge — the tail points at it without sliding underneath.
|
|
151
127
|
"eloq:absolute eloq:right-16 eloq:bottom-0 eloq:max-w-xs eloq:transform eloq:transition-all eloq:duration-500 eloq:ease-out",
|
|
@@ -155,20 +131,20 @@ function so({
|
|
|
155
131
|
s === "visible" && "eloq:translate-x-0 eloq:opacity-100 eloq:scale-100",
|
|
156
132
|
s === "exiting" && "eloq:opacity-0 eloq:motion-safe:translate-x-8 eloq:motion-safe:scale-95"
|
|
157
133
|
),
|
|
158
|
-
children: /* @__PURE__ */
|
|
134
|
+
children: /* @__PURE__ */ ke(
|
|
159
135
|
"div",
|
|
160
136
|
{
|
|
161
137
|
className: "eloq:relative eloq:drop-shadow-lg eloq:hover:drop-shadow-xl eloq:transition-all eloq:duration-300",
|
|
162
|
-
onFocus: () =>
|
|
138
|
+
onFocus: () => d(!0),
|
|
163
139
|
onBlur: (h) => {
|
|
164
|
-
h.currentTarget.contains(h.relatedTarget) ||
|
|
140
|
+
h.currentTarget.contains(h.relatedTarget) || d(!1);
|
|
165
141
|
},
|
|
166
142
|
children: [
|
|
167
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ ke(
|
|
168
144
|
"button",
|
|
169
145
|
{
|
|
170
146
|
type: "button",
|
|
171
|
-
className:
|
|
147
|
+
className: Be(
|
|
172
148
|
// block/w-full/text-left undo the UA button's inline-block,
|
|
173
149
|
// centred layout so it lays out like the div it replaced.
|
|
174
150
|
"eloq:relative eloq:block eloq:w-full eloq:rounded-lg eloq:border eloq:p-3 eloq:text-left eloq:cursor-pointer",
|
|
@@ -178,12 +154,12 @@ function so({
|
|
|
178
154
|
"eloq:focus-visible:outline-2 eloq:focus-visible:outline-solid eloq:focus-visible:outline-current eloq:focus-visible:-outline-offset-4"
|
|
179
155
|
),
|
|
180
156
|
style: {
|
|
181
|
-
backgroundColor:
|
|
182
|
-
color:
|
|
157
|
+
backgroundColor: p.botBubbleColor,
|
|
158
|
+
color: c
|
|
183
159
|
},
|
|
184
160
|
onClick: r,
|
|
185
161
|
children: [
|
|
186
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ ke(
|
|
187
163
|
"svg",
|
|
188
164
|
{
|
|
189
165
|
"aria-hidden": !0,
|
|
@@ -194,7 +170,7 @@ function so({
|
|
|
194
170
|
"path",
|
|
195
171
|
{
|
|
196
172
|
d: "M5.75,0s0,.36,0,.51c-.09,4.52-5.74,10.64-5.74,10.64,8.19.02,10.54-2.26,10.54-2.26h0c-1.6-2.96-3.19-5.92-4.79-8.88Z",
|
|
197
|
-
fill:
|
|
173
|
+
fill: p.botBubbleColor,
|
|
198
174
|
strokeWidth: 2,
|
|
199
175
|
vectorEffect: "non-scaling-stroke",
|
|
200
176
|
style: { stroke: "hsl(var(--border))" }
|
|
@@ -207,13 +183,13 @@ function so({
|
|
|
207
183
|
y: "-1",
|
|
208
184
|
width: "6",
|
|
209
185
|
height: "14",
|
|
210
|
-
fill:
|
|
186
|
+
fill: p.botBubbleColor
|
|
211
187
|
}
|
|
212
188
|
)
|
|
213
189
|
]
|
|
214
190
|
}
|
|
215
191
|
),
|
|
216
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ ke("span", { className: "eloq:block eloq:text-sm eloq:leading-relaxed eloq:pr-4", children: [
|
|
217
193
|
e,
|
|
218
194
|
/* @__PURE__ */ I("span", { className: "eloq:sr-only", children: " (open chat)" })
|
|
219
195
|
] })
|
|
@@ -230,9 +206,9 @@ function so({
|
|
|
230
206
|
style: {
|
|
231
207
|
// Follows the bubble's computed text colour, so the X blends
|
|
232
208
|
// with the message on any bubble background (and dark mode).
|
|
233
|
-
color:
|
|
209
|
+
color: c
|
|
234
210
|
},
|
|
235
|
-
children: /* @__PURE__ */ I(
|
|
211
|
+
children: /* @__PURE__ */ I(Ut, { "aria-hidden": !0, className: "eloq:w-2.5 eloq:h-2.5", strokeWidth: 1.75 })
|
|
236
212
|
}
|
|
237
213
|
)
|
|
238
214
|
]
|
|
@@ -294,7 +270,7 @@ function po() {
|
|
|
294
270
|
t[r] = o;
|
|
295
271
|
}), t;
|
|
296
272
|
}
|
|
297
|
-
const ho = "eloquent-ai::conversation-data",
|
|
273
|
+
const ho = "eloquent-ai::conversation-data", Me = typeof window < "u", fo = 1800 * 1e3;
|
|
298
274
|
function it({ appId: e }) {
|
|
299
275
|
const t = tt(() => `${ho}-${e}`, [e]), o = tt(
|
|
300
276
|
() => ({
|
|
@@ -306,7 +282,7 @@ function it({ appId: e }) {
|
|
|
306
282
|
[]
|
|
307
283
|
), r = v(() => {
|
|
308
284
|
try {
|
|
309
|
-
if (!
|
|
285
|
+
if (!Me) return o;
|
|
310
286
|
const i = localStorage.getItem(t);
|
|
311
287
|
return i ? JSON.parse(i) : o;
|
|
312
288
|
} catch (i) {
|
|
@@ -323,14 +299,14 @@ function it({ appId: e }) {
|
|
|
323
299
|
return console.error("Error checking conversation expiration:", i), !0;
|
|
324
300
|
}
|
|
325
301
|
}, [r]), a = v(
|
|
326
|
-
(i,
|
|
302
|
+
(i, d, p, c, h) => {
|
|
327
303
|
try {
|
|
328
|
-
if (!
|
|
304
|
+
if (!Me) return;
|
|
329
305
|
const f = {
|
|
330
306
|
conversationId: i,
|
|
331
|
-
userId:
|
|
332
|
-
deviceId:
|
|
333
|
-
messages: go(
|
|
307
|
+
userId: d,
|
|
308
|
+
deviceId: c,
|
|
309
|
+
messages: go(p),
|
|
334
310
|
lastActivity: Date.now(),
|
|
335
311
|
chatToken: h
|
|
336
312
|
};
|
|
@@ -340,9 +316,9 @@ function it({ appId: e }) {
|
|
|
340
316
|
}
|
|
341
317
|
},
|
|
342
318
|
[t]
|
|
343
|
-
),
|
|
319
|
+
), l = v(() => {
|
|
344
320
|
try {
|
|
345
|
-
if (!
|
|
321
|
+
if (!Me) return;
|
|
346
322
|
const i = r();
|
|
347
323
|
localStorage.setItem(
|
|
348
324
|
t,
|
|
@@ -356,16 +332,16 @@ function it({ appId: e }) {
|
|
|
356
332
|
}
|
|
357
333
|
}, [t, r]), s = v(() => {
|
|
358
334
|
try {
|
|
359
|
-
if (!
|
|
335
|
+
if (!Me) return;
|
|
360
336
|
const i = localStorage.getItem(t);
|
|
361
337
|
if (i) {
|
|
362
|
-
const
|
|
338
|
+
const d = JSON.parse(i);
|
|
363
339
|
localStorage.setItem(
|
|
364
340
|
t,
|
|
365
341
|
JSON.stringify({
|
|
366
342
|
...o,
|
|
367
|
-
deviceId:
|
|
368
|
-
userId:
|
|
343
|
+
deviceId: d.deviceId,
|
|
344
|
+
userId: d.userId
|
|
369
345
|
})
|
|
370
346
|
);
|
|
371
347
|
}
|
|
@@ -375,9 +351,9 @@ function it({ appId: e }) {
|
|
|
375
351
|
i
|
|
376
352
|
);
|
|
377
353
|
}
|
|
378
|
-
}, [t, o]),
|
|
354
|
+
}, [t, o]), u = v(() => {
|
|
379
355
|
try {
|
|
380
|
-
if (!
|
|
356
|
+
if (!Me) return;
|
|
381
357
|
const i = r();
|
|
382
358
|
i.conversationId && (i.lastActivity = Date.now(), localStorage.setItem(t, JSON.stringify(i)));
|
|
383
359
|
} catch (i) {
|
|
@@ -389,14 +365,14 @@ function it({ appId: e }) {
|
|
|
389
365
|
saveChatData: a,
|
|
390
366
|
clearChatData: s,
|
|
391
367
|
getSavedChatData: r,
|
|
392
|
-
updateLastActivity:
|
|
393
|
-
markChatClosed:
|
|
368
|
+
updateLastActivity: u,
|
|
369
|
+
markChatClosed: l
|
|
394
370
|
};
|
|
395
371
|
}
|
|
396
372
|
function go(e) {
|
|
397
373
|
return e.flatMap((t) => {
|
|
398
374
|
if (!t.attachments) return [t];
|
|
399
|
-
const o = t.attachments.filter((r) =>
|
|
375
|
+
const o = t.attachments.filter((r) => jt(r.url)).map(({ url: r, mimeType: n, name: a }) => ({ url: r, mimeType: n, name: a }));
|
|
400
376
|
return o.length > 0 ? [{ ...t, attachments: o }] : t.content ? [{ ...t, attachments: void 0 }] : [];
|
|
401
377
|
});
|
|
402
378
|
}
|
|
@@ -425,114 +401,114 @@ function _o(e) {
|
|
|
425
401
|
channel: r,
|
|
426
402
|
onEvent: n,
|
|
427
403
|
onDisconnect: a,
|
|
428
|
-
createWebSocket:
|
|
429
|
-
} = e, s = xo(t, o),
|
|
430
|
-
return new Promise((
|
|
431
|
-
let
|
|
404
|
+
createWebSocket: l = (d, p) => new WebSocket(d, p)
|
|
405
|
+
} = e, s = xo(t, o), u = yo(t), i = crypto.randomUUID();
|
|
406
|
+
return new Promise((d, p) => {
|
|
407
|
+
let c;
|
|
432
408
|
try {
|
|
433
|
-
|
|
409
|
+
c = l(u, [
|
|
434
410
|
mo,
|
|
435
411
|
ko(s)
|
|
436
412
|
]);
|
|
437
|
-
} catch (
|
|
438
|
-
|
|
413
|
+
} catch (m) {
|
|
414
|
+
p(m instanceof Error ? m : new Error(String(m)));
|
|
439
415
|
return;
|
|
440
416
|
}
|
|
441
|
-
let h = "connecting", f = !1, g = vo,
|
|
417
|
+
let h = "connecting", f = !1, g = vo, R = Date.now(), q = null, z = null;
|
|
442
418
|
const A = () => {
|
|
443
|
-
|
|
444
|
-
},
|
|
419
|
+
q && (clearTimeout(q), q = null), z && (clearInterval(z), z = null);
|
|
420
|
+
}, E = (m) => {
|
|
445
421
|
if (h === "closed") return;
|
|
446
|
-
const
|
|
422
|
+
const y = h === "established";
|
|
447
423
|
h = "closed", A();
|
|
448
424
|
try {
|
|
449
|
-
|
|
425
|
+
c.close();
|
|
450
426
|
} catch {
|
|
451
427
|
}
|
|
452
|
-
f || (
|
|
453
|
-
},
|
|
454
|
-
|
|
455
|
-
},
|
|
456
|
-
|
|
457
|
-
|
|
428
|
+
f || (y ? a(m) : p(new Error(m)));
|
|
429
|
+
}, O = (m) => {
|
|
430
|
+
c.readyState === qo && c.send(JSON.stringify(m));
|
|
431
|
+
}, U = (m) => {
|
|
432
|
+
q && clearTimeout(q), q = setTimeout(() => {
|
|
433
|
+
E(`Timed out waiting for ${m}`);
|
|
458
434
|
}, bo);
|
|
459
435
|
};
|
|
460
|
-
|
|
461
|
-
h !== "closed" && (
|
|
462
|
-
}),
|
|
436
|
+
c.addEventListener("open", () => {
|
|
437
|
+
h !== "closed" && (O({ type: "connection_init" }), U("connection_ack"));
|
|
438
|
+
}), c.addEventListener("message", (m) => {
|
|
463
439
|
if (h === "closed") return;
|
|
464
|
-
let
|
|
440
|
+
let y;
|
|
465
441
|
try {
|
|
466
|
-
|
|
442
|
+
y = JSON.parse(String(m.data));
|
|
467
443
|
} catch {
|
|
468
444
|
console.warn("[EloquentChatSDK] Unparseable realtime frame ignored");
|
|
469
445
|
return;
|
|
470
446
|
}
|
|
471
|
-
switch (
|
|
447
|
+
switch (y.type) {
|
|
472
448
|
case "connection_ack": {
|
|
473
449
|
if (h !== "connecting") return;
|
|
474
|
-
h = "subscribing", typeof
|
|
450
|
+
h = "subscribing", typeof y.connectionTimeoutMs == "number" && (g = y.connectionTimeoutMs), O({
|
|
475
451
|
type: "subscribe",
|
|
476
452
|
id: i,
|
|
477
453
|
channel: r,
|
|
478
454
|
authorization: s
|
|
479
|
-
}),
|
|
455
|
+
}), U("subscribe_success");
|
|
480
456
|
return;
|
|
481
457
|
}
|
|
482
458
|
case "connection_error": {
|
|
483
|
-
|
|
459
|
+
E(`Connection error: ${Ye(y.errors)}`);
|
|
484
460
|
return;
|
|
485
461
|
}
|
|
486
462
|
case "subscribe_success": {
|
|
487
|
-
if (h !== "subscribing" ||
|
|
488
|
-
h = "established",
|
|
489
|
-
Date.now() -
|
|
490
|
-
}, wo),
|
|
463
|
+
if (h !== "subscribing" || y.id !== i) return;
|
|
464
|
+
h = "established", q && (clearTimeout(q), q = null), R = Date.now(), z = setInterval(() => {
|
|
465
|
+
Date.now() - R > g && E("Keep-alive timeout");
|
|
466
|
+
}, wo), d({
|
|
491
467
|
close: () => {
|
|
492
|
-
f = !0,
|
|
468
|
+
f = !0, O({ type: "unsubscribe", id: i }), E("Closed by client");
|
|
493
469
|
}
|
|
494
470
|
});
|
|
495
471
|
return;
|
|
496
472
|
}
|
|
497
473
|
case "subscribe_error": {
|
|
498
|
-
if (
|
|
499
|
-
|
|
474
|
+
if (y.id !== i) return;
|
|
475
|
+
E(`Subscribe error: ${Ye(y.errors)}`);
|
|
500
476
|
return;
|
|
501
477
|
}
|
|
502
478
|
case "ka": {
|
|
503
|
-
|
|
479
|
+
R = Date.now();
|
|
504
480
|
return;
|
|
505
481
|
}
|
|
506
482
|
case "data": {
|
|
507
|
-
if (
|
|
508
|
-
|
|
509
|
-
let
|
|
510
|
-
if (typeof
|
|
483
|
+
if (y.id !== i) return;
|
|
484
|
+
R = Date.now();
|
|
485
|
+
let _ = y.event;
|
|
486
|
+
if (typeof _ == "string")
|
|
511
487
|
try {
|
|
512
|
-
|
|
488
|
+
_ = JSON.parse(_);
|
|
513
489
|
} catch {
|
|
514
490
|
console.warn(
|
|
515
491
|
"[EloquentChatSDK] Unparseable realtime event ignored"
|
|
516
492
|
);
|
|
517
493
|
return;
|
|
518
494
|
}
|
|
519
|
-
n(
|
|
495
|
+
n(_);
|
|
520
496
|
return;
|
|
521
497
|
}
|
|
522
498
|
case "broadcast_error": {
|
|
523
499
|
console.warn(
|
|
524
500
|
"[EloquentChatSDK] Realtime broadcast error:",
|
|
525
|
-
Ye(
|
|
501
|
+
Ye(y.errors)
|
|
526
502
|
);
|
|
527
503
|
return;
|
|
528
504
|
}
|
|
529
505
|
default:
|
|
530
506
|
return;
|
|
531
507
|
}
|
|
532
|
-
}),
|
|
533
|
-
|
|
534
|
-
}),
|
|
535
|
-
|
|
508
|
+
}), c.addEventListener("close", () => {
|
|
509
|
+
E("WebSocket closed");
|
|
510
|
+
}), c.addEventListener("error", () => {
|
|
511
|
+
E("WebSocket error");
|
|
536
512
|
});
|
|
537
513
|
});
|
|
538
514
|
}
|
|
@@ -555,7 +531,7 @@ function Ct(e) {
|
|
|
555
531
|
const t = e.startsWith("^") ? 1 : 0, o = e.endsWith("$") ? e.length - 1 : e.length;
|
|
556
532
|
return e.slice(t, o);
|
|
557
533
|
}
|
|
558
|
-
function
|
|
534
|
+
function Ro(e, t, o) {
|
|
559
535
|
Object.defineProperty(e, t, {
|
|
560
536
|
value: o,
|
|
561
537
|
writable: !0,
|
|
@@ -568,7 +544,7 @@ const St = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
|
568
544
|
function rt(e) {
|
|
569
545
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
570
546
|
}
|
|
571
|
-
function
|
|
547
|
+
function Eo(e) {
|
|
572
548
|
if (rt(e) === !1)
|
|
573
549
|
return !1;
|
|
574
550
|
const t = e.constructor;
|
|
@@ -584,7 +560,7 @@ function zo(e, t, o) {
|
|
|
584
560
|
const r = new e._zod.constr(t ?? e._zod.def);
|
|
585
561
|
return (!t || o?.parent) && (r._zod.parent = e), r;
|
|
586
562
|
}
|
|
587
|
-
function
|
|
563
|
+
function Ce(e) {
|
|
588
564
|
const t = e;
|
|
589
565
|
if (!t)
|
|
590
566
|
return {};
|
|
@@ -600,7 +576,7 @@ function Ie(e) {
|
|
|
600
576
|
function To(e) {
|
|
601
577
|
return Object.keys(e).filter((t) => e[t]._zod.optin !== void 0 && e[t]._zod.optout === "optional");
|
|
602
578
|
}
|
|
603
|
-
function
|
|
579
|
+
function _e(e, t = 0) {
|
|
604
580
|
if (e.aborted === !0)
|
|
605
581
|
return !0;
|
|
606
582
|
for (let o = t; o < e.issues.length; o++)
|
|
@@ -616,13 +592,13 @@ function Mo(e, t = 0) {
|
|
|
616
592
|
return !0;
|
|
617
593
|
return !1;
|
|
618
594
|
}
|
|
619
|
-
function
|
|
595
|
+
function Pe(e, t) {
|
|
620
596
|
return t.map((o) => {
|
|
621
597
|
var r;
|
|
622
598
|
return (r = o).path ?? (r.path = []), o.path.unshift(e), o;
|
|
623
599
|
});
|
|
624
600
|
}
|
|
625
|
-
function
|
|
601
|
+
function Ae(e) {
|
|
626
602
|
return typeof e == "string" ? e : e?.message;
|
|
627
603
|
}
|
|
628
604
|
function pt(e, t, o) {
|
|
@@ -630,14 +606,14 @@ function pt(e, t, o) {
|
|
|
630
606
|
for (let n = t; n < e.length; n++)
|
|
631
607
|
(r = e[n]).schema ?? (r.schema = o);
|
|
632
608
|
}
|
|
633
|
-
function
|
|
609
|
+
function Se(e, t, o) {
|
|
634
610
|
var r;
|
|
635
611
|
const n = e.inst?._zod?.traits;
|
|
636
612
|
n?.has("$ZodType") && (n.has("$ZodCheck") ? (r = e).schema ?? (r.schema = e.inst) : e.schema = e.inst);
|
|
637
|
-
const a = e.schema !== e.inst ? e.schema?._zod.def?.error : void 0,
|
|
638
|
-
for (const
|
|
639
|
-
|
|
640
|
-
return s.path ?? (s.path = []), s.message =
|
|
613
|
+
const a = e.schema !== e.inst ? e.schema?._zod.def?.error : void 0, l = e.message ? e.message : Ae(e.inst?._zod.def?.error?.(e)) ?? Ae(a?.(e)) ?? Ae(t?.error?.(e)) ?? Ae(o.customError?.(e)) ?? Ae(o.localeError?.(e)) ?? "Invalid input", s = {};
|
|
614
|
+
for (const u of Object.keys(e))
|
|
615
|
+
u === "inst" || u === "schema" || u === "continue" || u === "input" || u === "__proto__" || (s[u] = e[u]);
|
|
616
|
+
return s.path ?? (s.path = []), s.message = l, t?.reportInput && (s.input = e.input), s;
|
|
641
617
|
}
|
|
642
618
|
function Ao(e, t) {
|
|
643
619
|
for (const o in t) {
|
|
@@ -645,20 +621,20 @@ function Ao(e, t) {
|
|
|
645
621
|
r.get ? Object.defineProperty(e, o, { ...r, enumerable: !1 }) : Oo(e, o, r.value);
|
|
646
622
|
}
|
|
647
623
|
}
|
|
648
|
-
function
|
|
624
|
+
function Ue(e, t, o, r = !0) {
|
|
649
625
|
return Object.defineProperty(e, t, { configurable: !0, writable: !0, enumerable: r, value: o }), o;
|
|
650
626
|
}
|
|
651
627
|
function Po(e, t, o) {
|
|
652
|
-
return
|
|
628
|
+
return Ue(e, t, o, !1);
|
|
653
629
|
}
|
|
654
630
|
function Oo(e, t, o) {
|
|
655
631
|
Object.defineProperty(e, t, {
|
|
656
632
|
configurable: !0,
|
|
657
633
|
get() {
|
|
658
|
-
return this == null ? o :
|
|
634
|
+
return this == null ? o : Ue(this, t, o.bind(this));
|
|
659
635
|
},
|
|
660
636
|
set(r) {
|
|
661
|
-
|
|
637
|
+
Ue(this, t, r);
|
|
662
638
|
}
|
|
663
639
|
});
|
|
664
640
|
}
|
|
@@ -666,14 +642,14 @@ function Uo(e, t) {
|
|
|
666
642
|
const o = Object.getPrototypeOf(e);
|
|
667
643
|
return t in o ? void 0 : o;
|
|
668
644
|
}
|
|
669
|
-
let Xe,
|
|
645
|
+
let Xe, qe = !1;
|
|
670
646
|
const jo = {
|
|
671
647
|
configurable: !0,
|
|
672
648
|
get() {
|
|
673
|
-
|
|
649
|
+
qe = !0;
|
|
674
650
|
}
|
|
675
651
|
};
|
|
676
|
-
function
|
|
652
|
+
function be(e, t, o) {
|
|
677
653
|
const r = Object.getPrototypeOf(e._zod);
|
|
678
654
|
if (t in r && Xe !== e._zod) {
|
|
679
655
|
Xe = void 0;
|
|
@@ -683,13 +659,13 @@ function me(e, t, o) {
|
|
|
683
659
|
configurable: !0,
|
|
684
660
|
get() {
|
|
685
661
|
Object.defineProperty(this, t, jo);
|
|
686
|
-
const n =
|
|
687
|
-
|
|
662
|
+
const n = qe;
|
|
663
|
+
qe = !1;
|
|
688
664
|
try {
|
|
689
665
|
const a = o(this);
|
|
690
|
-
return
|
|
666
|
+
return qe ? delete this[t] : Object.defineProperty(this, t, { configurable: !0, writable: !0, value: a }), qe = qe || n, a;
|
|
691
667
|
} catch (a) {
|
|
692
|
-
throw delete this[t],
|
|
668
|
+
throw delete this[t], qe = qe || n, a;
|
|
693
669
|
}
|
|
694
670
|
},
|
|
695
671
|
set(n) {
|
|
@@ -734,64 +710,64 @@ function $o(e) {
|
|
|
734
710
|
}
|
|
735
711
|
function Q(e, t, o, r) {
|
|
736
712
|
const n = {};
|
|
737
|
-
function a(
|
|
738
|
-
this.def =
|
|
713
|
+
function a(c) {
|
|
714
|
+
this.def = c, this.constr = p, this.traits = /* @__PURE__ */ new Set();
|
|
739
715
|
}
|
|
740
716
|
a.prototype = n;
|
|
741
|
-
const
|
|
742
|
-
function
|
|
743
|
-
if (
|
|
744
|
-
if (
|
|
717
|
+
const l = o, s = l && /* @__PURE__ */ new WeakSet();
|
|
718
|
+
function u(c, h) {
|
|
719
|
+
if (c._zod) {
|
|
720
|
+
if (c._zod.traits.has(e))
|
|
745
721
|
return;
|
|
746
722
|
} else {
|
|
747
723
|
Qe.value = new a(h);
|
|
748
724
|
try {
|
|
749
|
-
Object.defineProperty(
|
|
725
|
+
Object.defineProperty(c, "_zod", Qe);
|
|
750
726
|
} finally {
|
|
751
727
|
Qe.value = void 0;
|
|
752
728
|
}
|
|
753
729
|
}
|
|
754
|
-
if (
|
|
755
|
-
const g = Object.getPrototypeOf(
|
|
756
|
-
let
|
|
757
|
-
for (;
|
|
758
|
-
|
|
759
|
-
const z =
|
|
760
|
-
s.has(z) || (s.add(z), Ao(z,
|
|
730
|
+
if (c._zod.traits.add(e), t(c, h), s) {
|
|
731
|
+
const g = Object.getPrototypeOf(c), R = c._zod.constr.prototype;
|
|
732
|
+
let q = g;
|
|
733
|
+
for (; q && q !== R; )
|
|
734
|
+
q = Object.getPrototypeOf(q);
|
|
735
|
+
const z = q ?? g;
|
|
736
|
+
s.has(z) || (s.add(z), Ao(z, l));
|
|
761
737
|
}
|
|
762
|
-
const f =
|
|
738
|
+
const f = p.prototype;
|
|
763
739
|
for (const g in f)
|
|
764
|
-
Object.prototype.hasOwnProperty.call(f, g) && (g in
|
|
740
|
+
Object.prototype.hasOwnProperty.call(f, g) && (g in c || (c[g] = f[g].bind(c)));
|
|
765
741
|
}
|
|
766
742
|
const i = r?.Parent ?? Object;
|
|
767
|
-
class
|
|
743
|
+
class d extends i {
|
|
768
744
|
}
|
|
769
|
-
Object.defineProperty(
|
|
770
|
-
function
|
|
771
|
-
const h = r?.Parent ? $o(
|
|
772
|
-
|
|
745
|
+
Object.defineProperty(d, "name", { value: e });
|
|
746
|
+
function p(c) {
|
|
747
|
+
const h = r?.Parent ? $o(d) : this;
|
|
748
|
+
u(h, c);
|
|
773
749
|
const f = h._zod.deferred;
|
|
774
750
|
if (f) {
|
|
775
|
-
for (const
|
|
776
|
-
|
|
751
|
+
for (const R of f)
|
|
752
|
+
R();
|
|
777
753
|
h._zod.deferred = void 0;
|
|
778
754
|
}
|
|
779
755
|
const g = globalThis.__zod_globalConfig?.postProcessor;
|
|
780
756
|
return g && g(h), h;
|
|
781
757
|
}
|
|
782
|
-
return Object.defineProperty(
|
|
783
|
-
value: (
|
|
784
|
-
}), Object.defineProperty(
|
|
758
|
+
return Object.defineProperty(p, "init", { value: u }), Object.defineProperty(p, Symbol.hasInstance, {
|
|
759
|
+
value: (c) => r?.Parent && c instanceof r.Parent ? !0 : c?._zod?.traits?.has(e)
|
|
760
|
+
}), Object.defineProperty(p, "name", { value: e }), p;
|
|
785
761
|
}
|
|
786
|
-
class
|
|
762
|
+
class Oe extends Error {
|
|
787
763
|
constructor() {
|
|
788
764
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
789
765
|
}
|
|
790
766
|
}
|
|
791
767
|
(ht = globalThis).__zod_globalConfig ?? (ht.__zod_globalConfig = {});
|
|
792
|
-
const
|
|
793
|
-
function
|
|
794
|
-
return e && Object.assign(
|
|
768
|
+
const Ne = globalThis.__zod_globalConfig;
|
|
769
|
+
function ye(e) {
|
|
770
|
+
return e && Object.assign(Ne, e), Ne;
|
|
795
771
|
}
|
|
796
772
|
function Bo() {
|
|
797
773
|
const e = this._zod;
|
|
@@ -819,43 +795,43 @@ const No = {
|
|
|
819
795
|
Object.defineProperty(this, "toString", { value: r, configurable: !0, writable: !0 });
|
|
820
796
|
}
|
|
821
797
|
}));
|
|
822
|
-
},
|
|
798
|
+
}, Ve = Q("$ZodError", Zo, void 0, {
|
|
823
799
|
Parent: Error
|
|
824
800
|
}), Ko = (e) => {
|
|
825
801
|
const t = (o, r, n, a) => {
|
|
826
|
-
const
|
|
802
|
+
const l = n ? { ...n, async: !1 } : { async: !1 }, s = o._zod.run({ value: r, issues: [] }, l);
|
|
827
803
|
if (s instanceof Promise)
|
|
828
|
-
throw new
|
|
804
|
+
throw new Oe();
|
|
829
805
|
if (s.issues.length) {
|
|
830
|
-
const
|
|
831
|
-
throw St(
|
|
806
|
+
const u = new (a?.Err ?? e)(s.issues.map((i) => Se(i, l, ye())));
|
|
807
|
+
throw St(u, a?.callee ?? t), u;
|
|
832
808
|
}
|
|
833
809
|
return s.value;
|
|
834
810
|
};
|
|
835
811
|
return t;
|
|
836
|
-
}, Vo = /* @__PURE__ */ Ko(
|
|
812
|
+
}, Vo = /* @__PURE__ */ Ko(Ve), Wo = (e) => {
|
|
837
813
|
const t = async (o, r, n, a) => {
|
|
838
|
-
const
|
|
839
|
-
let s = o._zod.run({ value: r, issues: [] },
|
|
814
|
+
const l = n ? { ...n, async: !0 } : { async: !0 };
|
|
815
|
+
let s = o._zod.run({ value: r, issues: [] }, l);
|
|
840
816
|
if (s instanceof Promise && (s = await s), s.issues.length) {
|
|
841
|
-
const
|
|
842
|
-
throw St(
|
|
817
|
+
const u = new (a?.Err ?? e)(s.issues.map((i) => Se(i, l, ye())));
|
|
818
|
+
throw St(u, a?.callee ?? t), u;
|
|
843
819
|
}
|
|
844
820
|
return s.value;
|
|
845
821
|
};
|
|
846
822
|
return t;
|
|
847
|
-
},
|
|
823
|
+
}, Ho = /* @__PURE__ */ Wo(Ve), Fo = (e) => (t, o, r) => {
|
|
848
824
|
const n = r ? { ...r, async: !1 } : { async: !1 }, a = t._zod.run({ value: o, issues: [] }, n);
|
|
849
825
|
if (a instanceof Promise)
|
|
850
|
-
throw new
|
|
826
|
+
throw new Oe();
|
|
851
827
|
return a.issues.length ? It(e, a.issues, n) : { success: !0, data: a.value };
|
|
852
|
-
}, Jo = /* @__PURE__ */
|
|
828
|
+
}, Jo = /* @__PURE__ */ Fo(Ve);
|
|
853
829
|
function It(e, t, o) {
|
|
854
830
|
let r;
|
|
855
831
|
return {
|
|
856
832
|
success: !1,
|
|
857
833
|
get error() {
|
|
858
|
-
return r || (r = new e(t.map((n) =>
|
|
834
|
+
return r || (r = new e(t.map((n) => Se(n, o, ye()))), t = void 0, o = void 0), r;
|
|
859
835
|
},
|
|
860
836
|
set error(n) {
|
|
861
837
|
r = n, t = void 0, o = void 0;
|
|
@@ -866,71 +842,71 @@ const Go = (e) => async (t, o, r) => {
|
|
|
866
842
|
const n = r ? { ...r, async: !0 } : { async: !0 };
|
|
867
843
|
let a = t._zod.run({ value: o, issues: [] }, n);
|
|
868
844
|
return a instanceof Promise && (a = await a), a.issues.length ? It(e, a.issues, n) : { success: !0, data: a.value };
|
|
869
|
-
}, Yo = /* @__PURE__ */ Go(
|
|
845
|
+
}, Yo = /* @__PURE__ */ Go(Ve), Xo = /^[\s\S]{0,}$/, Qo = /^-?\d+(?:\.\d+)?$/, er = /^null$/i, tr = {
|
|
870
846
|
major: 4,
|
|
871
847
|
minor: 6,
|
|
872
848
|
patch: 7
|
|
873
|
-
},
|
|
849
|
+
}, xe = /* @__PURE__ */ Q("$ZodType", (e, t) => {
|
|
874
850
|
var o;
|
|
875
851
|
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = tr;
|
|
876
852
|
const r = e._zod.def.checks, n = e._zod.traits.has("$ZodCheck") ? [e, ...r ?? []] : r?.length ? [...r] : [];
|
|
877
853
|
for (const a of n)
|
|
878
|
-
for (const
|
|
879
|
-
|
|
854
|
+
for (const l of a._zod.onattach)
|
|
855
|
+
l(e);
|
|
880
856
|
if (n.length === 0)
|
|
881
857
|
(o = e._zod).deferred ?? (o.deferred = []), e._zod.deferred?.push(() => {
|
|
882
858
|
e._zod.run = e._zod.parse;
|
|
883
859
|
});
|
|
884
860
|
else {
|
|
885
|
-
const a = (s,
|
|
861
|
+
const a = (s, u, i) => {
|
|
886
862
|
if (s.memo)
|
|
887
863
|
return s;
|
|
888
|
-
let
|
|
889
|
-
for (const
|
|
890
|
-
if (
|
|
891
|
-
if (Mo(s) || !
|
|
864
|
+
let d = _e(s), p;
|
|
865
|
+
for (const c of u) {
|
|
866
|
+
if (c._zod.def.when) {
|
|
867
|
+
if (Mo(s) || !c._zod.def.when(s))
|
|
892
868
|
continue;
|
|
893
|
-
} else if (
|
|
869
|
+
} else if (d)
|
|
894
870
|
continue;
|
|
895
|
-
const h = s.issues.length, f =
|
|
871
|
+
const h = s.issues.length, f = c._zod.check(s);
|
|
896
872
|
if (f instanceof Promise && i?.async === !1)
|
|
897
|
-
throw new
|
|
898
|
-
if (
|
|
899
|
-
|
|
900
|
-
await f, s.issues.length !== h && (pt(s.issues, h, e),
|
|
873
|
+
throw new Oe();
|
|
874
|
+
if (p || f instanceof Promise)
|
|
875
|
+
p = (p ?? Promise.resolve()).then(async () => {
|
|
876
|
+
await f, s.issues.length !== h && (pt(s.issues, h, e), d || (d = _e(s, h)));
|
|
901
877
|
});
|
|
902
878
|
else {
|
|
903
879
|
if (s.issues.length === h)
|
|
904
880
|
continue;
|
|
905
|
-
pt(s.issues, h, e),
|
|
881
|
+
pt(s.issues, h, e), d || (d = _e(s, h));
|
|
906
882
|
}
|
|
907
883
|
}
|
|
908
|
-
return
|
|
909
|
-
},
|
|
910
|
-
if (
|
|
884
|
+
return p ? p.then(() => s) : s;
|
|
885
|
+
}, l = (s, u, i) => {
|
|
886
|
+
if (_e(s))
|
|
911
887
|
return s.aborted = !0, s;
|
|
912
|
-
const
|
|
913
|
-
if (
|
|
888
|
+
const d = a(u, n, i);
|
|
889
|
+
if (d instanceof Promise) {
|
|
914
890
|
if (i.async === !1)
|
|
915
|
-
throw new
|
|
916
|
-
return
|
|
891
|
+
throw new Oe();
|
|
892
|
+
return d.then((p) => e._zod.parse(p, i));
|
|
917
893
|
}
|
|
918
|
-
return e._zod.parse(
|
|
894
|
+
return e._zod.parse(d, i);
|
|
919
895
|
};
|
|
920
|
-
e._zod.run = (s,
|
|
921
|
-
if (
|
|
922
|
-
return e._zod.parse(s,
|
|
923
|
-
if (
|
|
924
|
-
const
|
|
925
|
-
return
|
|
896
|
+
e._zod.run = (s, u) => {
|
|
897
|
+
if (u.skipChecks)
|
|
898
|
+
return e._zod.parse(s, u);
|
|
899
|
+
if (u.direction === "backward") {
|
|
900
|
+
const d = e._zod.parse({ value: s.value, issues: [] }, { ...u, skipChecks: !0 });
|
|
901
|
+
return d instanceof Promise ? d.then((p) => l(p, s, u)) : l(d, s, u);
|
|
926
902
|
}
|
|
927
|
-
const i = e._zod.parse(s,
|
|
903
|
+
const i = e._zod.parse(s, u);
|
|
928
904
|
if (i instanceof Promise) {
|
|
929
|
-
if (
|
|
930
|
-
throw new
|
|
931
|
-
return i.then((
|
|
905
|
+
if (u.async === !1)
|
|
906
|
+
throw new Oe();
|
|
907
|
+
return i.then((d) => a(d, n, u));
|
|
932
908
|
}
|
|
933
|
-
return a(i, n,
|
|
909
|
+
return a(i, n, u);
|
|
934
910
|
};
|
|
935
911
|
}
|
|
936
912
|
}, {
|
|
@@ -939,12 +915,12 @@ const Go = (e) => async (t, o, r) => {
|
|
|
939
915
|
return Po(this, "~standard", rr(this));
|
|
940
916
|
},
|
|
941
917
|
set "~standard"(e) {
|
|
942
|
-
|
|
918
|
+
Ue(this, "~standard", e);
|
|
943
919
|
}
|
|
944
|
-
}),
|
|
920
|
+
}), Rt = (e, t) => e.issues.length ? { issues: e.issues.map((o) => Se(o, t, ye())) } : { value: e.value };
|
|
945
921
|
async function or(e, t) {
|
|
946
922
|
const o = { async: !0 };
|
|
947
|
-
return
|
|
923
|
+
return Rt(await e._zod.run({ value: t, issues: [] }, o), o);
|
|
948
924
|
}
|
|
949
925
|
function rr(e) {
|
|
950
926
|
return {
|
|
@@ -953,7 +929,7 @@ function rr(e) {
|
|
|
953
929
|
try {
|
|
954
930
|
const r = e._zod.run({ value: t, issues: [] }, o);
|
|
955
931
|
if (!(r instanceof Promise))
|
|
956
|
-
return
|
|
932
|
+
return Rt(r, o);
|
|
957
933
|
} catch {
|
|
958
934
|
}
|
|
959
935
|
return or(e, t);
|
|
@@ -963,7 +939,7 @@ function rr(e) {
|
|
|
963
939
|
};
|
|
964
940
|
}
|
|
965
941
|
const nr = /* @__PURE__ */ Q("$ZodString", (e, t) => {
|
|
966
|
-
|
|
942
|
+
xe.init(e, t), e._zod.pattern = t.pattern ?? Xo, e._zod.parse = (o, r) => {
|
|
967
943
|
if (t.coerce)
|
|
968
944
|
try {
|
|
969
945
|
o.value = String(o.value);
|
|
@@ -977,7 +953,7 @@ const nr = /* @__PURE__ */ Q("$ZodString", (e, t) => {
|
|
|
977
953
|
}), o;
|
|
978
954
|
};
|
|
979
955
|
}), ar = /* @__PURE__ */ Q("$ZodNull", (e, t) => {
|
|
980
|
-
|
|
956
|
+
xe.init(e, t), e._zod.pattern = er, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (o, r) => {
|
|
981
957
|
const n = o.value;
|
|
982
958
|
return n === null || o.issues.push({
|
|
983
959
|
expected: "null",
|
|
@@ -987,15 +963,15 @@ const nr = /* @__PURE__ */ Q("$ZodString", (e, t) => {
|
|
|
987
963
|
}), o;
|
|
988
964
|
};
|
|
989
965
|
});
|
|
990
|
-
function
|
|
991
|
-
const
|
|
992
|
-
if (!(!
|
|
966
|
+
function Ze(e, t, o, r, n, a) {
|
|
967
|
+
const l = o in r, s = a === "optional";
|
|
968
|
+
if (!(!l && s && n === "optional")) {
|
|
993
969
|
if (e.issues.length) {
|
|
994
|
-
if (n !== void 0 && s && !
|
|
970
|
+
if (n !== void 0 && s && !l)
|
|
995
971
|
return;
|
|
996
|
-
t.issues.push(...
|
|
972
|
+
t.issues.push(...Pe(o, e.issues));
|
|
997
973
|
}
|
|
998
|
-
if (!
|
|
974
|
+
if (!l && n === void 0) {
|
|
999
975
|
e.issues.length || t.issues.push({
|
|
1000
976
|
code: "invalid_type",
|
|
1001
977
|
expected: "nonoptional",
|
|
@@ -1004,15 +980,15 @@ function Ke(e, t, o, r, n, a) {
|
|
|
1004
980
|
});
|
|
1005
981
|
return;
|
|
1006
982
|
}
|
|
1007
|
-
e.value === void 0 ? (
|
|
983
|
+
e.value === void 0 ? (l || n === "defaulted" && !s) && (t.value[o] = void 0) : t.value[o] = e.value;
|
|
1008
984
|
}
|
|
1009
985
|
}
|
|
1010
986
|
const ir = [];
|
|
1011
987
|
function sr(e) {
|
|
1012
988
|
const t = Object.keys(e.shape), o = Object.getOwnPropertySymbols(e.shape), r = o.length ? o : ir, n = r.length ? [...t, ...r] : t;
|
|
1013
|
-
for (const
|
|
1014
|
-
if (!e.shape?.[
|
|
1015
|
-
throw new Error(`Invalid element at key "${String(
|
|
989
|
+
for (const l of n)
|
|
990
|
+
if (!e.shape?.[l]?._zod?.traits?.has("$ZodType"))
|
|
991
|
+
throw new Error(`Invalid element at key "${String(l)}": expected a Zod schema`);
|
|
1016
992
|
const a = To(e.shape);
|
|
1017
993
|
return {
|
|
1018
994
|
...e,
|
|
@@ -1024,27 +1000,27 @@ function sr(e) {
|
|
|
1024
1000
|
optionalKeys: new Set(a)
|
|
1025
1001
|
};
|
|
1026
1002
|
}
|
|
1027
|
-
function lr(e, t, o, r, n, a,
|
|
1028
|
-
const s = [],
|
|
1003
|
+
function lr(e, t, o, r, n, a, l) {
|
|
1004
|
+
const s = [], u = n.keySet, i = n.catchall._zod, d = i.def.type, p = i.optin, c = i.optout;
|
|
1029
1005
|
let h = 0;
|
|
1030
1006
|
for (const f in t) {
|
|
1031
|
-
if (
|
|
1032
|
-
if (
|
|
1007
|
+
if (l && o.issues.length !== h) {
|
|
1008
|
+
if (_e(o, h))
|
|
1033
1009
|
break;
|
|
1034
1010
|
h = o.issues.length;
|
|
1035
1011
|
}
|
|
1036
|
-
if (
|
|
1012
|
+
if (u.has(f))
|
|
1037
1013
|
continue;
|
|
1038
1014
|
if (f === "__proto__") {
|
|
1039
|
-
|
|
1015
|
+
d === "never" && s.push(f);
|
|
1040
1016
|
continue;
|
|
1041
1017
|
}
|
|
1042
|
-
if (
|
|
1018
|
+
if (d === "never") {
|
|
1043
1019
|
s.push(f);
|
|
1044
1020
|
continue;
|
|
1045
1021
|
}
|
|
1046
1022
|
const g = i.run({ value: t[f], issues: [] }, r);
|
|
1047
|
-
g instanceof Promise ? e.push(g.then((
|
|
1023
|
+
g instanceof Promise ? e.push(g.then((R) => Ze(R, o, f, t, p, c))) : Ze(g, o, f, t, p, c);
|
|
1048
1024
|
}
|
|
1049
1025
|
return s.length && o.issues.push({
|
|
1050
1026
|
code: "unrecognized_keys",
|
|
@@ -1056,76 +1032,76 @@ function lr(e, t, o, r, n, a, u) {
|
|
|
1056
1032
|
}), e.length ? Promise.all(e).then(() => o) : o;
|
|
1057
1033
|
}
|
|
1058
1034
|
const cr = /* @__PURE__ */ Q("$ZodObject", (e, t) => {
|
|
1059
|
-
|
|
1035
|
+
xe.init(e, t);
|
|
1060
1036
|
const o = Object.getOwnPropertyDescriptor(t, "shape"), r = o?.get ? o.get.raw : t.shape ?? {};
|
|
1061
1037
|
if (r) {
|
|
1062
1038
|
const i = () => {
|
|
1063
|
-
const
|
|
1064
|
-
return Object.defineProperty(t, "shape", { value:
|
|
1039
|
+
const d = { ...r };
|
|
1040
|
+
return Object.defineProperty(t, "shape", { value: d }), i.raw = d, d;
|
|
1065
1041
|
};
|
|
1066
1042
|
i.raw = r, Object.defineProperty(t, "shape", { get: i });
|
|
1067
1043
|
}
|
|
1068
1044
|
const n = Io(() => sr(t));
|
|
1069
|
-
|
|
1070
|
-
const
|
|
1071
|
-
for (const
|
|
1072
|
-
const h = c
|
|
1045
|
+
be(e, "propValues", (i) => {
|
|
1046
|
+
const d = i.def.shape, p = {};
|
|
1047
|
+
for (const c in d) {
|
|
1048
|
+
const h = d[c]._zod;
|
|
1073
1049
|
if (h.values) {
|
|
1074
|
-
Object.prototype.hasOwnProperty.call(
|
|
1050
|
+
Object.prototype.hasOwnProperty.call(p, c) || Ro(p, c, /* @__PURE__ */ new Set());
|
|
1075
1051
|
for (const f of h.values)
|
|
1076
|
-
|
|
1077
|
-
h.optin !== void 0 &&
|
|
1052
|
+
p[c].add(f);
|
|
1053
|
+
h.optin !== void 0 && p[c].add(void 0);
|
|
1078
1054
|
}
|
|
1079
1055
|
}
|
|
1080
|
-
return
|
|
1056
|
+
return p;
|
|
1081
1057
|
});
|
|
1082
|
-
const a = rt,
|
|
1058
|
+
const a = rt, l = t.catchall;
|
|
1083
1059
|
let s;
|
|
1084
|
-
const
|
|
1085
|
-
|
|
1060
|
+
const u = Ne.memoizer;
|
|
1061
|
+
u?.attach(e), e._zod.parse = (i, d) => {
|
|
1086
1062
|
s ?? (s = n.value);
|
|
1087
|
-
const
|
|
1088
|
-
if (!a(
|
|
1063
|
+
const p = i.value;
|
|
1064
|
+
if (!a(p))
|
|
1089
1065
|
return i.issues.push({
|
|
1090
1066
|
expected: "object",
|
|
1091
1067
|
code: "invalid_type",
|
|
1092
|
-
input:
|
|
1068
|
+
input: p,
|
|
1093
1069
|
inst: e
|
|
1094
1070
|
}), i;
|
|
1095
|
-
i.value =
|
|
1096
|
-
const
|
|
1071
|
+
i.value = u ? u.alloc(e, i, {}, d) : {};
|
|
1072
|
+
const c = [], h = s.shape, f = d?.abortEarly;
|
|
1097
1073
|
let g = i.issues.length;
|
|
1098
|
-
for (const
|
|
1074
|
+
for (const R of s.allKeys) {
|
|
1099
1075
|
if (f && i.issues.length !== g) {
|
|
1100
|
-
if (
|
|
1076
|
+
if (_e(i, g))
|
|
1101
1077
|
break;
|
|
1102
1078
|
g = i.issues.length;
|
|
1103
1079
|
}
|
|
1104
|
-
if (
|
|
1080
|
+
if (R === "__proto__")
|
|
1105
1081
|
continue;
|
|
1106
|
-
const
|
|
1107
|
-
|
|
1082
|
+
const q = h[R], z = q._zod.optin, A = q._zod.optout, E = q._zod.run({ value: p[R], issues: [] }, d);
|
|
1083
|
+
E instanceof Promise ? c.push(E.then((O) => Ze(O, i, R, p, z, A))) : Ze(E, i, R, p, z, A);
|
|
1108
1084
|
}
|
|
1109
|
-
return
|
|
1085
|
+
return l ? lr(c, p, i, d, n.value, e, f === !0) : c.length ? Promise.all(c).then(() => i) : i;
|
|
1110
1086
|
};
|
|
1111
1087
|
});
|
|
1112
1088
|
function mt(e, t, o, r) {
|
|
1113
1089
|
for (const a of e)
|
|
1114
1090
|
if (a.issues.length === 0)
|
|
1115
1091
|
return t.value = a.value, t;
|
|
1116
|
-
const n = e.filter((a) => !
|
|
1092
|
+
const n = e.filter((a) => !_e(a));
|
|
1117
1093
|
return n.length === 1 ? (t.value = n[0].value, n[0]) : (t.issues.push({
|
|
1118
1094
|
code: "invalid_union",
|
|
1119
1095
|
input: t.value,
|
|
1120
1096
|
inst: o,
|
|
1121
|
-
errors: e.map((a) => a.issues.map((
|
|
1097
|
+
errors: e.map((a) => a.issues.map((l) => Se(l, r, ye())))
|
|
1122
1098
|
}), t);
|
|
1123
1099
|
}
|
|
1124
1100
|
const ur = /* @__PURE__ */ Q("$ZodUnion", (e, t) => {
|
|
1125
|
-
|
|
1101
|
+
xe.init(e, t), be(e, "optin", (r) => r.def.options.some((n) => n._zod.optin === "defaulted") ? "defaulted" : r.def.options.some((n) => n._zod.optin !== void 0) ? "optional" : void 0), be(e, "optout", (r) => r.def.options.some((n) => n._zod.optout === "optional") ? "optional" : void 0), be(e, "values", (r) => {
|
|
1126
1102
|
if (r.def.options.every((n) => n._zod.values))
|
|
1127
1103
|
return new Set(r.def.options.flatMap((n) => Array.from(n._zod.values)));
|
|
1128
|
-
}),
|
|
1104
|
+
}), be(e, "pattern", (r) => {
|
|
1129
1105
|
if (r.def.options.every((n) => n._zod.pattern)) {
|
|
1130
1106
|
const n = r.def.options.map((a) => a._zod.pattern);
|
|
1131
1107
|
return new RegExp(`^(${n.map((a) => Ct(a.source)).join("|")})$`);
|
|
@@ -1136,73 +1112,73 @@ const ur = /* @__PURE__ */ Q("$ZodUnion", (e, t) => {
|
|
|
1136
1112
|
if (o)
|
|
1137
1113
|
return o(r, n);
|
|
1138
1114
|
let a = !1;
|
|
1139
|
-
const
|
|
1115
|
+
const l = [];
|
|
1140
1116
|
for (const s of t.options) {
|
|
1141
|
-
const
|
|
1117
|
+
const u = s._zod.run({
|
|
1142
1118
|
value: r.value,
|
|
1143
1119
|
issues: []
|
|
1144
1120
|
}, n);
|
|
1145
|
-
if (
|
|
1146
|
-
|
|
1121
|
+
if (u instanceof Promise)
|
|
1122
|
+
l.push(u), a = !0;
|
|
1147
1123
|
else {
|
|
1148
|
-
if (
|
|
1149
|
-
return
|
|
1150
|
-
|
|
1124
|
+
if (u.issues.length === 0)
|
|
1125
|
+
return u;
|
|
1126
|
+
l.push(u);
|
|
1151
1127
|
}
|
|
1152
1128
|
}
|
|
1153
|
-
return a ? Promise.all(
|
|
1129
|
+
return a ? Promise.all(l).then((s) => mt(s, r, e, n)) : mt(l, r, e, n);
|
|
1154
1130
|
};
|
|
1155
1131
|
}), dr = /* @__PURE__ */ Q("$ZodRecord", (e, t) => {
|
|
1156
|
-
|
|
1157
|
-
const o =
|
|
1132
|
+
xe.init(e, t);
|
|
1133
|
+
const o = Ne.memoizer;
|
|
1158
1134
|
o?.attach(e), e._zod.parse = (r, n) => {
|
|
1159
1135
|
const a = r.value;
|
|
1160
|
-
if (!
|
|
1136
|
+
if (!Eo(a))
|
|
1161
1137
|
return r.issues.push({
|
|
1162
1138
|
expected: "record",
|
|
1163
1139
|
code: "invalid_type",
|
|
1164
1140
|
input: a,
|
|
1165
1141
|
inst: e
|
|
1166
1142
|
}), r;
|
|
1167
|
-
const
|
|
1143
|
+
const l = [], s = t.keyType._zod.values;
|
|
1168
1144
|
if (s && !t.partial) {
|
|
1169
1145
|
r.value = o ? o.alloc(e, r, {}, n) : {};
|
|
1170
|
-
const
|
|
1171
|
-
for (const
|
|
1172
|
-
if (typeof
|
|
1173
|
-
if (
|
|
1146
|
+
const u = /* @__PURE__ */ new Set();
|
|
1147
|
+
for (const d of s)
|
|
1148
|
+
if (typeof d == "string" || typeof d == "number" || typeof d == "symbol") {
|
|
1149
|
+
if (u.add(typeof d == "number" ? d.toString() : d), d === "__proto__")
|
|
1174
1150
|
continue;
|
|
1175
|
-
const
|
|
1176
|
-
if (
|
|
1151
|
+
const p = t.keyType._zod.run({ value: d, issues: [] }, n);
|
|
1152
|
+
if (p instanceof Promise)
|
|
1177
1153
|
throw new Error("Async schemas not supported in object keys currently");
|
|
1178
|
-
if (
|
|
1154
|
+
if (p.issues.length) {
|
|
1179
1155
|
r.issues.push({
|
|
1180
1156
|
code: "invalid_key",
|
|
1181
1157
|
origin: "record",
|
|
1182
|
-
issues:
|
|
1183
|
-
input:
|
|
1184
|
-
path: [
|
|
1158
|
+
issues: p.issues.map((f) => Se(f, n, ye())),
|
|
1159
|
+
input: d,
|
|
1160
|
+
path: [d],
|
|
1185
1161
|
inst: e
|
|
1186
1162
|
});
|
|
1187
1163
|
continue;
|
|
1188
1164
|
}
|
|
1189
|
-
const
|
|
1190
|
-
if (
|
|
1165
|
+
const c = p.value;
|
|
1166
|
+
if (c === "__proto__")
|
|
1191
1167
|
continue;
|
|
1192
|
-
const h = t.valueType._zod.run({ value: a[
|
|
1193
|
-
h instanceof Promise ?
|
|
1194
|
-
f.issues.length && r.issues.push(...
|
|
1195
|
-
})) : (h.issues.length && r.issues.push(...
|
|
1168
|
+
const h = t.valueType._zod.run({ value: a[d], issues: [] }, n);
|
|
1169
|
+
h instanceof Promise ? l.push(h.then((f) => {
|
|
1170
|
+
f.issues.length && r.issues.push(...Pe(d, f.issues)), r.value[c] = f.value;
|
|
1171
|
+
})) : (h.issues.length && r.issues.push(...Pe(d, h.issues)), r.value[c] = h.value);
|
|
1196
1172
|
}
|
|
1197
1173
|
let i;
|
|
1198
|
-
for (const
|
|
1199
|
-
if (!
|
|
1174
|
+
for (const d in a)
|
|
1175
|
+
if (!u.has(d))
|
|
1200
1176
|
if (t.mode === "loose") {
|
|
1201
|
-
if (
|
|
1177
|
+
if (d === "__proto__")
|
|
1202
1178
|
continue;
|
|
1203
|
-
r.value[
|
|
1179
|
+
r.value[d] = a[d];
|
|
1204
1180
|
} else
|
|
1205
|
-
i = i ?? [], i.push(
|
|
1181
|
+
i = i ?? [], i.push(d);
|
|
1206
1182
|
i && i.length > 0 && r.issues.push({
|
|
1207
1183
|
code: "unrecognized_keys",
|
|
1208
1184
|
input: a,
|
|
@@ -1212,52 +1188,52 @@ const ur = /* @__PURE__ */ Q("$ZodUnion", (e, t) => {
|
|
|
1212
1188
|
});
|
|
1213
1189
|
} else {
|
|
1214
1190
|
r.value = o ? o.alloc(e, r, {}, n) : {};
|
|
1215
|
-
let
|
|
1191
|
+
let u;
|
|
1216
1192
|
for (const i of Reflect.ownKeys(a)) {
|
|
1217
1193
|
if (i === "__proto__" || !Object.prototype.propertyIsEnumerable.call(a, i))
|
|
1218
1194
|
continue;
|
|
1219
|
-
let
|
|
1220
|
-
if (
|
|
1195
|
+
let d = t.keyType._zod.run({ value: i, issues: [] }, n);
|
|
1196
|
+
if (d instanceof Promise)
|
|
1221
1197
|
throw new Error("Async schemas not supported in object keys currently");
|
|
1222
|
-
if (typeof i == "string" && Qo.test(i) &&
|
|
1198
|
+
if (typeof i == "string" && Qo.test(i) && d.issues.length) {
|
|
1223
1199
|
const f = t.keyType._zod.run({ value: Number(i), issues: [] }, n);
|
|
1224
1200
|
if (f instanceof Promise)
|
|
1225
1201
|
throw new Error("Async schemas not supported in object keys currently");
|
|
1226
|
-
f.issues.length === 0 && (
|
|
1202
|
+
f.issues.length === 0 && (d = f);
|
|
1227
1203
|
}
|
|
1228
|
-
if (
|
|
1229
|
-
t.mode === "loose" ? r.value[i] = a[i] : s ? (
|
|
1204
|
+
if (d.issues.length) {
|
|
1205
|
+
t.mode === "loose" ? r.value[i] = a[i] : s ? (u = u ?? [], u.push(i)) : r.issues.push({
|
|
1230
1206
|
code: "invalid_key",
|
|
1231
1207
|
origin: "record",
|
|
1232
|
-
issues:
|
|
1208
|
+
issues: d.issues.map((f) => Se(f, n, ye())),
|
|
1233
1209
|
input: i,
|
|
1234
1210
|
path: [i],
|
|
1235
1211
|
inst: e
|
|
1236
1212
|
});
|
|
1237
1213
|
continue;
|
|
1238
1214
|
}
|
|
1239
|
-
const
|
|
1240
|
-
if (
|
|
1215
|
+
const c = d.value;
|
|
1216
|
+
if (c === "__proto__")
|
|
1241
1217
|
continue;
|
|
1242
1218
|
const h = t.valueType._zod.run({ value: a[i], issues: [] }, n);
|
|
1243
|
-
h instanceof Promise ?
|
|
1244
|
-
f.issues.length && r.issues.push(...
|
|
1245
|
-
})) : (h.issues.length && r.issues.push(...
|
|
1219
|
+
h instanceof Promise ? l.push(h.then((f) => {
|
|
1220
|
+
f.issues.length && r.issues.push(...Pe(i, f.issues)), r.value[c] = f.value;
|
|
1221
|
+
})) : (h.issues.length && r.issues.push(...Pe(i, h.issues)), r.value[c] = h.value);
|
|
1246
1222
|
}
|
|
1247
|
-
|
|
1223
|
+
u && u.length > 0 && r.issues.push({
|
|
1248
1224
|
code: "unrecognized_keys",
|
|
1249
1225
|
input: a,
|
|
1250
1226
|
inst: e,
|
|
1251
|
-
keys:
|
|
1227
|
+
keys: u,
|
|
1252
1228
|
continue: !0
|
|
1253
1229
|
});
|
|
1254
1230
|
}
|
|
1255
|
-
return
|
|
1231
|
+
return l.length ? Promise.all(l).then(() => r) : r;
|
|
1256
1232
|
};
|
|
1257
1233
|
}), pr = /* @__PURE__ */ Q("$ZodLiteral", (e, t) => {
|
|
1258
|
-
|
|
1234
|
+
xe.init(e, t);
|
|
1259
1235
|
const o = new Set(t.values);
|
|
1260
|
-
e._zod.values = o,
|
|
1236
|
+
e._zod.values = o, be(e, "pattern", (r) => {
|
|
1261
1237
|
const n = r.def.values;
|
|
1262
1238
|
return new RegExp(n.length ? `^(${n.map((a) => typeof a == "string" ? dt(a) : a ? dt(a.toString()) : String(a)).join("|")})$` : "^[^\\s\\S]$");
|
|
1263
1239
|
}), e._zod.parse = (r, n) => {
|
|
@@ -1270,42 +1246,42 @@ const ur = /* @__PURE__ */ Q("$ZodUnion", (e, t) => {
|
|
|
1270
1246
|
}), r;
|
|
1271
1247
|
};
|
|
1272
1248
|
}), hr = /* @__PURE__ */ Q("$ZodNullable", (e, t) => {
|
|
1273
|
-
|
|
1249
|
+
xe.init(e, t), be(e, "optin", (o) => o.def.innerType._zod.optin), be(e, "optout", (o) => o.def.innerType._zod.optout), be(e, "pattern", (o) => {
|
|
1274
1250
|
const r = o.def.innerType._zod.pattern;
|
|
1275
1251
|
return r ? new RegExp(`^(${Ct(r.source)}|null)$`) : void 0;
|
|
1276
|
-
}),
|
|
1252
|
+
}), be(e, "values", (o) => o.def.innerType._zod.values ? /* @__PURE__ */ new Set([...o.def.innerType._zod.values, null]) : void 0), e._zod.parse = (o, r) => o.value === null ? o : t.innerType._zod.run(o, r);
|
|
1277
1253
|
});
|
|
1278
1254
|
function fr(e) {
|
|
1279
1255
|
return e.checks && (e.checks = [...e.checks]), e;
|
|
1280
1256
|
}
|
|
1281
1257
|
// @__NO_SIDE_EFFECTS__
|
|
1282
1258
|
function gr(e, t) {
|
|
1283
|
-
return new e(fr({ type: "string", ...
|
|
1259
|
+
return new e(fr({ type: "string", ...Ce(t) }));
|
|
1284
1260
|
}
|
|
1285
1261
|
// @__NO_SIDE_EFFECTS__
|
|
1286
1262
|
function mr(e, t) {
|
|
1287
1263
|
return new e({
|
|
1288
1264
|
type: "null",
|
|
1289
|
-
...
|
|
1265
|
+
...Ce(t)
|
|
1290
1266
|
});
|
|
1291
1267
|
}
|
|
1292
|
-
const
|
|
1268
|
+
const Ie = /* @__PURE__ */ Q("ZodMiniType", (e, t) => {
|
|
1293
1269
|
if (!e._zod)
|
|
1294
1270
|
throw new Error("Uninitialized schema in ZodMiniType.");
|
|
1295
|
-
|
|
1271
|
+
xe.init(e, t), e.def = t, e.type = t.type;
|
|
1296
1272
|
}, {
|
|
1297
1273
|
// `with` is an alias for `check`: the same function object, not a wrapper.
|
|
1298
1274
|
get with() {
|
|
1299
1275
|
return this.check;
|
|
1300
1276
|
},
|
|
1301
1277
|
set with(e) {
|
|
1302
|
-
|
|
1278
|
+
Ue(this, "with", e);
|
|
1303
1279
|
},
|
|
1304
1280
|
parse(e, t) {
|
|
1305
1281
|
return Vo(this, e, t, { callee: this.parse });
|
|
1306
1282
|
},
|
|
1307
1283
|
parseAsync(e, t) {
|
|
1308
|
-
return
|
|
1284
|
+
return Ho(this, e, t, { callee: this.parseAsync });
|
|
1309
1285
|
},
|
|
1310
1286
|
safeParse(e, t) {
|
|
1311
1287
|
return Jo(this, e, t);
|
|
@@ -1336,44 +1312,44 @@ const Re = /* @__PURE__ */ Q("ZodMiniType", (e, t) => {
|
|
|
1336
1312
|
return t.length === 0 ? e(this) : e(this, ...t);
|
|
1337
1313
|
}
|
|
1338
1314
|
}), br = /* @__PURE__ */ Q("ZodMiniString", (e, t) => {
|
|
1339
|
-
nr.init(e, t),
|
|
1315
|
+
nr.init(e, t), Ie.init(e, t);
|
|
1340
1316
|
});
|
|
1341
1317
|
// @__NO_SIDE_EFFECTS__
|
|
1342
1318
|
function T(e) {
|
|
1343
1319
|
return /* @__PURE__ */ gr(br, e);
|
|
1344
1320
|
}
|
|
1345
1321
|
const vr = /* @__PURE__ */ Q("ZodMiniNull", (e, t) => {
|
|
1346
|
-
ar.init(e, t),
|
|
1322
|
+
ar.init(e, t), Ie.init(e, t);
|
|
1347
1323
|
});
|
|
1348
1324
|
// @__NO_SIDE_EFFECTS__
|
|
1349
1325
|
function wr(e) {
|
|
1350
1326
|
return /* @__PURE__ */ mr(vr, e);
|
|
1351
1327
|
}
|
|
1352
1328
|
const qr = /* @__PURE__ */ Q("ZodMiniObject", (e, t) => {
|
|
1353
|
-
cr.init(e, t),
|
|
1329
|
+
cr.init(e, t), Ie.init(e, t), Do(e, "shape", (o) => o._zod.def.shape, !1);
|
|
1354
1330
|
});
|
|
1355
1331
|
// @__NO_SIDE_EFFECTS__
|
|
1356
1332
|
function B(e, t) {
|
|
1357
1333
|
const o = {
|
|
1358
1334
|
type: "object",
|
|
1359
1335
|
shape: e ?? {},
|
|
1360
|
-
...
|
|
1336
|
+
...Ce(t)
|
|
1361
1337
|
};
|
|
1362
1338
|
return new qr(o);
|
|
1363
1339
|
}
|
|
1364
1340
|
const yr = /* @__PURE__ */ Q("ZodMiniUnion", (e, t) => {
|
|
1365
|
-
ur.init(e, t),
|
|
1341
|
+
ur.init(e, t), Ie.init(e, t);
|
|
1366
1342
|
});
|
|
1367
1343
|
// @__NO_SIDE_EFFECTS__
|
|
1368
1344
|
function xr(e, t) {
|
|
1369
1345
|
return new yr({
|
|
1370
1346
|
type: "union",
|
|
1371
1347
|
options: e,
|
|
1372
|
-
...
|
|
1348
|
+
...Ce(t)
|
|
1373
1349
|
});
|
|
1374
1350
|
}
|
|
1375
1351
|
const bt = /* @__PURE__ */ Q("ZodMiniRecord", (e, t) => {
|
|
1376
|
-
dr.init(e, t),
|
|
1352
|
+
dr.init(e, t), Ie.init(e, t);
|
|
1377
1353
|
});
|
|
1378
1354
|
// @__NO_SIDE_EFFECTS__
|
|
1379
1355
|
function kr(e, t, o) {
|
|
@@ -1381,27 +1357,27 @@ function kr(e, t, o) {
|
|
|
1381
1357
|
type: "record",
|
|
1382
1358
|
keyType: /* @__PURE__ */ T(),
|
|
1383
1359
|
valueType: e,
|
|
1384
|
-
...
|
|
1360
|
+
...Ce(t)
|
|
1385
1361
|
}) : new bt({
|
|
1386
1362
|
type: "record",
|
|
1387
1363
|
keyType: e,
|
|
1388
1364
|
valueType: t,
|
|
1389
|
-
...
|
|
1365
|
+
...Ce(o)
|
|
1390
1366
|
});
|
|
1391
1367
|
}
|
|
1392
1368
|
const _r = /* @__PURE__ */ Q("ZodMiniLiteral", (e, t) => {
|
|
1393
|
-
pr.init(e, t),
|
|
1369
|
+
pr.init(e, t), Ie.init(e, t);
|
|
1394
1370
|
});
|
|
1395
1371
|
// @__NO_SIDE_EFFECTS__
|
|
1396
|
-
function
|
|
1372
|
+
function ge(e, t) {
|
|
1397
1373
|
return new _r({
|
|
1398
1374
|
type: "literal",
|
|
1399
1375
|
values: Array.isArray(e) ? e : [e],
|
|
1400
|
-
...
|
|
1376
|
+
...Ce(t)
|
|
1401
1377
|
});
|
|
1402
1378
|
}
|
|
1403
1379
|
const Cr = /* @__PURE__ */ Q("ZodMiniNullable", (e, t) => {
|
|
1404
|
-
hr.init(e, t),
|
|
1380
|
+
hr.init(e, t), Ie.init(e, t);
|
|
1405
1381
|
});
|
|
1406
1382
|
// @__NO_SIDE_EFFECTS__
|
|
1407
1383
|
function st(e) {
|
|
@@ -1410,37 +1386,37 @@ function st(e) {
|
|
|
1410
1386
|
innerType: e
|
|
1411
1387
|
});
|
|
1412
1388
|
}
|
|
1413
|
-
|
|
1389
|
+
ye({ jitless: !0 });
|
|
1414
1390
|
const Sr = /* @__PURE__ */ B({
|
|
1415
|
-
type: /* @__PURE__ */
|
|
1391
|
+
type: /* @__PURE__ */ ge("utterance"),
|
|
1416
1392
|
content: /* @__PURE__ */ T(),
|
|
1417
1393
|
role: /* @__PURE__ */ T()
|
|
1418
1394
|
}), Ir = /* @__PURE__ */ B({
|
|
1419
|
-
type: /* @__PURE__ */
|
|
1420
|
-
content: /* @__PURE__ */ T()
|
|
1421
|
-
}), Er = /* @__PURE__ */ B({
|
|
1422
|
-
type: /* @__PURE__ */ fe("chat_closed_expired"),
|
|
1395
|
+
type: /* @__PURE__ */ ge("agent_cognition"),
|
|
1423
1396
|
content: /* @__PURE__ */ T()
|
|
1424
1397
|
}), Rr = /* @__PURE__ */ B({
|
|
1425
|
-
type: /* @__PURE__ */
|
|
1398
|
+
type: /* @__PURE__ */ ge("chat_closed_expired"),
|
|
1399
|
+
content: /* @__PURE__ */ T()
|
|
1400
|
+
}), Er = /* @__PURE__ */ B({
|
|
1401
|
+
type: /* @__PURE__ */ ge("agent_captured_url"),
|
|
1426
1402
|
content: /* @__PURE__ */ T()
|
|
1427
1403
|
}), zr = /* @__PURE__ */ B({
|
|
1428
|
-
type: /* @__PURE__ */
|
|
1404
|
+
type: /* @__PURE__ */ ge("agent_topic"),
|
|
1429
1405
|
content: /* @__PURE__ */ T()
|
|
1430
1406
|
}), Tr = /* @__PURE__ */ B({
|
|
1431
|
-
type: /* @__PURE__ */
|
|
1407
|
+
type: /* @__PURE__ */ ge("agent_summary"),
|
|
1432
1408
|
content: /* @__PURE__ */ T()
|
|
1433
1409
|
}), Mr = /* @__PURE__ */ B({
|
|
1434
|
-
type: /* @__PURE__ */
|
|
1410
|
+
type: /* @__PURE__ */ ge("chat_rating"),
|
|
1435
1411
|
content: /* @__PURE__ */ T()
|
|
1436
1412
|
}), Ar = /* @__PURE__ */ B({
|
|
1437
|
-
type: /* @__PURE__ */
|
|
1413
|
+
type: /* @__PURE__ */ ge("breadcrumb"),
|
|
1438
1414
|
content: /* @__PURE__ */ T()
|
|
1439
1415
|
}), Pr = /* @__PURE__ */ B({
|
|
1440
|
-
type: /* @__PURE__ */
|
|
1416
|
+
type: /* @__PURE__ */ ge("chat_escalated"),
|
|
1441
1417
|
content: /* @__PURE__ */ wr()
|
|
1442
1418
|
}), Or = /* @__PURE__ */ B({
|
|
1443
|
-
type: /* @__PURE__ */
|
|
1419
|
+
type: /* @__PURE__ */ ge("error"),
|
|
1444
1420
|
code: /* @__PURE__ */ T()
|
|
1445
1421
|
}), Ur = /* @__PURE__ */ B({
|
|
1446
1422
|
message_id: /* @__PURE__ */ st(/* @__PURE__ */ T()),
|
|
@@ -1455,10 +1431,10 @@ const Sr = /* @__PURE__ */ B({
|
|
|
1455
1431
|
}), $r = /* @__PURE__ */ B({
|
|
1456
1432
|
message_id: /* @__PURE__ */ st(/* @__PURE__ */ T()),
|
|
1457
1433
|
created_at: /* @__PURE__ */ T(),
|
|
1458
|
-
data:
|
|
1434
|
+
data: Rr
|
|
1459
1435
|
}), Br = /* @__PURE__ */ B({
|
|
1460
1436
|
created_at: /* @__PURE__ */ T(),
|
|
1461
|
-
data:
|
|
1437
|
+
data: Er
|
|
1462
1438
|
}), Lr = /* @__PURE__ */ B({
|
|
1463
1439
|
created_at: /* @__PURE__ */ T(),
|
|
1464
1440
|
data: zr
|
|
@@ -1486,12 +1462,12 @@ const Sr = /* @__PURE__ */ B({
|
|
|
1486
1462
|
Zr,
|
|
1487
1463
|
Kr,
|
|
1488
1464
|
Vr
|
|
1489
|
-
]),
|
|
1465
|
+
]), Hr = /* @__PURE__ */ B({
|
|
1490
1466
|
url: /* @__PURE__ */ T(),
|
|
1491
|
-
mimeType: /* @__PURE__ */
|
|
1467
|
+
mimeType: /* @__PURE__ */ ge(Dt),
|
|
1492
1468
|
name: /* @__PURE__ */ T()
|
|
1493
|
-
}),
|
|
1494
|
-
data:
|
|
1469
|
+
}), Fr = /* @__PURE__ */ B({
|
|
1470
|
+
data: Hr
|
|
1495
1471
|
}), Jr = /* @__PURE__ */ B({
|
|
1496
1472
|
data: /* @__PURE__ */ B({ urls: /* @__PURE__ */ kr(/* @__PURE__ */ T(), /* @__PURE__ */ T()) })
|
|
1497
1473
|
}), Gr = 500, Yr = 3e4, Xr = 6e4, Qr = 1e4, en = 12e4;
|
|
@@ -1500,105 +1476,105 @@ function tn({
|
|
|
1500
1476
|
chatId: t,
|
|
1501
1477
|
messages: o,
|
|
1502
1478
|
onMessage: r,
|
|
1503
|
-
|
|
1479
|
+
onHistory: n,
|
|
1504
1480
|
onCognition: a,
|
|
1505
|
-
onCognitionComplete:
|
|
1481
|
+
onCognitionComplete: l,
|
|
1506
1482
|
onError: s,
|
|
1507
|
-
onChatClosed:
|
|
1483
|
+
onChatClosed: u,
|
|
1508
1484
|
onAgentCapturedUrl: i,
|
|
1509
|
-
onAgentTopic:
|
|
1510
|
-
onAgentSummary:
|
|
1511
|
-
onRatingRequest:
|
|
1485
|
+
onAgentTopic: d,
|
|
1486
|
+
onAgentSummary: p,
|
|
1487
|
+
onRatingRequest: c,
|
|
1512
1488
|
onBreadcrumb: h,
|
|
1513
1489
|
fetchHistory: f,
|
|
1514
1490
|
getChatToken: g,
|
|
1515
|
-
backupPollingInterval:
|
|
1491
|
+
backupPollingInterval: R = Xr
|
|
1516
1492
|
}) {
|
|
1517
|
-
const
|
|
1493
|
+
const q = $(/* @__PURE__ */ new Set());
|
|
1518
1494
|
K(() => {
|
|
1519
|
-
for (const
|
|
1520
|
-
|
|
1495
|
+
for (const P of o)
|
|
1496
|
+
P.id && q.current.add(P.id);
|
|
1521
1497
|
}, [o]);
|
|
1522
|
-
const z = $(null), A = $(null),
|
|
1498
|
+
const z = $(null), A = $(null), E = $(0), O = $(null), U = $(null), m = $(null), y = $(null), _ = $(0), oe = $(!1), ee = $(!1), de = F(r), ae = F(n), D = F(a), J = F(l), N = F(s), H = F(u), re = F(i), le = F(d), G = F(p), ie = F(c), Y = F(h), ce = F(f), ve = F(g), { publishError: pe } = Ke(), ne = e?.app_sync_url, he = e?.app_sync_api_key, b = !!(ne && he), x = F(ne), j = F(he), M = v(() => {
|
|
1523
1499
|
z.current && (z.current.close(), z.current = null);
|
|
1524
|
-
}, []),
|
|
1525
|
-
|
|
1526
|
-
}, []),
|
|
1527
|
-
|
|
1528
|
-
}, []),
|
|
1529
|
-
|
|
1530
|
-
}, [
|
|
1531
|
-
|
|
1532
|
-
}, []),
|
|
1533
|
-
}),
|
|
1534
|
-
async (
|
|
1535
|
-
|
|
1536
|
-
const
|
|
1537
|
-
if (!
|
|
1500
|
+
}, []), k = v(() => {
|
|
1501
|
+
U.current && (clearInterval(U.current), U.current = null);
|
|
1502
|
+
}, []), S = v(() => {
|
|
1503
|
+
_.current = 0, m.current && (clearInterval(m.current), m.current = null), y.current && (clearTimeout(y.current), y.current = null);
|
|
1504
|
+
}, []), w = v(() => {
|
|
1505
|
+
_.current = Math.max(0, _.current - 1), _.current === 0 && S();
|
|
1506
|
+
}, [S]), Z = v(() => {
|
|
1507
|
+
O.current && (clearTimeout(O.current), O.current = null);
|
|
1508
|
+
}, []), X = $(() => {
|
|
1509
|
+
}), V = v(
|
|
1510
|
+
async (P) => {
|
|
1511
|
+
M();
|
|
1512
|
+
const se = x.current, we = j.current;
|
|
1513
|
+
if (!se || !we)
|
|
1538
1514
|
throw new Error("Cannot connect: AppSync settings not available");
|
|
1539
|
-
const
|
|
1540
|
-
httpEndpoint:
|
|
1541
|
-
auth:
|
|
1542
|
-
channel: `/default/chat/${
|
|
1515
|
+
const te = ve.current(), Fe = await _o({
|
|
1516
|
+
httpEndpoint: se,
|
|
1517
|
+
auth: te ? { authorizationToken: te } : { apiKey: we },
|
|
1518
|
+
channel: `/default/chat/${P}`,
|
|
1543
1519
|
onDisconnect: () => {
|
|
1544
|
-
z.current = null,
|
|
1520
|
+
z.current = null, X.current();
|
|
1545
1521
|
},
|
|
1546
|
-
onEvent: (
|
|
1547
|
-
const
|
|
1548
|
-
if (!
|
|
1549
|
-
console.error("Invalid conversation response:",
|
|
1522
|
+
onEvent: (je) => {
|
|
1523
|
+
const Te = Wr.safeParse(je);
|
|
1524
|
+
if (!Te.success) {
|
|
1525
|
+
console.error("Invalid conversation response:", Te.error);
|
|
1550
1526
|
return;
|
|
1551
1527
|
}
|
|
1552
|
-
const
|
|
1553
|
-
switch (
|
|
1528
|
+
const me = Te.data;
|
|
1529
|
+
switch (me.data.type) {
|
|
1554
1530
|
case "utterance": {
|
|
1555
|
-
const
|
|
1556
|
-
if (
|
|
1531
|
+
const L = me, ue = L.message_id ?? crypto.randomUUID();
|
|
1532
|
+
if (q.current.has(ue))
|
|
1557
1533
|
return;
|
|
1558
|
-
|
|
1534
|
+
q.current.add(ue), w(), J.current(), de.current(
|
|
1559
1535
|
{
|
|
1560
|
-
message_id:
|
|
1536
|
+
message_id: ue,
|
|
1561
1537
|
response: {
|
|
1562
|
-
id:
|
|
1563
|
-
type:
|
|
1564
|
-
content:
|
|
1538
|
+
id: ue,
|
|
1539
|
+
type: L.data.type,
|
|
1540
|
+
content: L.data.content
|
|
1565
1541
|
}
|
|
1566
1542
|
},
|
|
1567
|
-
|
|
1543
|
+
P
|
|
1568
1544
|
);
|
|
1569
1545
|
return;
|
|
1570
1546
|
}
|
|
1571
1547
|
case "error": {
|
|
1572
|
-
const
|
|
1573
|
-
pe({ code:
|
|
1548
|
+
const ue = parseInt(me.data.code);
|
|
1549
|
+
pe({ code: ue, message: $t(ue) }), N.current?.();
|
|
1574
1550
|
return;
|
|
1575
1551
|
}
|
|
1576
1552
|
case "agent_cognition": {
|
|
1577
|
-
const
|
|
1578
|
-
D.current(
|
|
1553
|
+
const L = me;
|
|
1554
|
+
D.current(L.data.content);
|
|
1579
1555
|
return;
|
|
1580
1556
|
}
|
|
1581
1557
|
case "agent_captured_url": {
|
|
1582
|
-
const
|
|
1583
|
-
|
|
1558
|
+
const L = me;
|
|
1559
|
+
re.current?.(L.data.content);
|
|
1584
1560
|
return;
|
|
1585
1561
|
}
|
|
1586
1562
|
case "agent_topic": {
|
|
1587
|
-
const
|
|
1588
|
-
|
|
1563
|
+
const L = me;
|
|
1564
|
+
le.current?.(L.data.content);
|
|
1589
1565
|
return;
|
|
1590
1566
|
}
|
|
1591
1567
|
case "agent_summary": {
|
|
1592
|
-
const
|
|
1593
|
-
G.current?.(
|
|
1568
|
+
const L = me;
|
|
1569
|
+
G.current?.(L.data.content);
|
|
1594
1570
|
return;
|
|
1595
1571
|
}
|
|
1596
1572
|
case "chat_closed_expired": {
|
|
1597
|
-
|
|
1573
|
+
H.current?.(), ie.current?.();
|
|
1598
1574
|
return;
|
|
1599
1575
|
}
|
|
1600
1576
|
case "chat_rating": {
|
|
1601
|
-
|
|
1577
|
+
ie.current?.();
|
|
1602
1578
|
return;
|
|
1603
1579
|
}
|
|
1604
1580
|
case "breadcrumb": {
|
|
@@ -1606,133 +1582,121 @@ function tn({
|
|
|
1606
1582
|
return;
|
|
1607
1583
|
}
|
|
1608
1584
|
case "chat_escalated": {
|
|
1609
|
-
|
|
1585
|
+
H.current?.(), ie.current?.();
|
|
1610
1586
|
return;
|
|
1611
1587
|
}
|
|
1612
1588
|
default:
|
|
1613
1589
|
console.warn(
|
|
1614
1590
|
"Unknown notification type:",
|
|
1615
|
-
|
|
1591
|
+
me.data.type
|
|
1616
1592
|
);
|
|
1617
1593
|
}
|
|
1618
1594
|
}
|
|
1619
1595
|
});
|
|
1620
|
-
z.current =
|
|
1596
|
+
z.current = Fe;
|
|
1621
1597
|
},
|
|
1622
1598
|
// The *Ref entries are latest-refs (stable identities); listed to satisfy
|
|
1623
1599
|
// exhaustive-deps, which can't see that useLatestRef returns a ref.
|
|
1624
1600
|
[
|
|
1625
|
-
|
|
1626
|
-
|
|
1601
|
+
M,
|
|
1602
|
+
w,
|
|
1627
1603
|
pe,
|
|
1628
1604
|
x,
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1605
|
+
j,
|
|
1606
|
+
ve,
|
|
1607
|
+
de,
|
|
1632
1608
|
D,
|
|
1633
1609
|
J,
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1610
|
+
N,
|
|
1611
|
+
H,
|
|
1612
|
+
re,
|
|
1613
|
+
le,
|
|
1638
1614
|
G,
|
|
1639
|
-
|
|
1615
|
+
ie,
|
|
1640
1616
|
Y
|
|
1641
1617
|
]
|
|
1642
|
-
),
|
|
1643
|
-
async (
|
|
1644
|
-
let
|
|
1618
|
+
), W = v(
|
|
1619
|
+
async (P) => {
|
|
1620
|
+
let se;
|
|
1645
1621
|
try {
|
|
1646
|
-
|
|
1647
|
-
} catch (
|
|
1648
|
-
console.warn("Backup poll failed:",
|
|
1622
|
+
se = await ce.current(P);
|
|
1623
|
+
} catch (te) {
|
|
1624
|
+
console.warn("Backup poll failed:", te);
|
|
1649
1625
|
return;
|
|
1650
1626
|
}
|
|
1651
|
-
if (A.current !==
|
|
1652
|
-
const we =
|
|
1653
|
-
(
|
|
1627
|
+
if (A.current !== P) return;
|
|
1628
|
+
const we = se.filter(
|
|
1629
|
+
(te) => (te.role === "user" || te.role === "assistant") && !!te.message_id
|
|
1654
1630
|
);
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
const _e = we[Ae - 1]?.message_id ?? null, qe = { message_id: F.message_id, response: F.response };
|
|
1659
|
-
if (F.role === "user") {
|
|
1660
|
-
ie.current?.(
|
|
1661
|
-
qe,
|
|
1662
|
-
M,
|
|
1663
|
-
_e,
|
|
1664
|
-
F.created_at
|
|
1665
|
-
);
|
|
1666
|
-
return;
|
|
1667
|
-
}
|
|
1668
|
-
w.current.add(F.message_id), L(), ae.current(qe, M, _e);
|
|
1669
|
-
});
|
|
1631
|
+
for (const te of we)
|
|
1632
|
+
te.role !== "assistant" || q.current.has(te.message_id) || (q.current.add(te.message_id), w());
|
|
1633
|
+
ae.current(we, P);
|
|
1670
1634
|
},
|
|
1671
|
-
[
|
|
1672
|
-
),
|
|
1673
|
-
(
|
|
1674
|
-
|
|
1675
|
-
() =>
|
|
1676
|
-
|
|
1635
|
+
[ce, ae, w]
|
|
1636
|
+
), fe = v(
|
|
1637
|
+
(P) => {
|
|
1638
|
+
k(), U.current = setInterval(
|
|
1639
|
+
() => W(P),
|
|
1640
|
+
R
|
|
1677
1641
|
);
|
|
1678
1642
|
},
|
|
1679
|
-
[
|
|
1680
|
-
),
|
|
1681
|
-
function
|
|
1682
|
-
if (!
|
|
1643
|
+
[k, W, R]
|
|
1644
|
+
), Re = v(
|
|
1645
|
+
function P() {
|
|
1646
|
+
if (!oe.current || ee.current || O.current)
|
|
1683
1647
|
return;
|
|
1684
|
-
const
|
|
1685
|
-
if (!
|
|
1648
|
+
const se = A.current;
|
|
1649
|
+
if (!se) return;
|
|
1686
1650
|
const we = Math.min(
|
|
1687
|
-
Gr * Math.pow(2,
|
|
1651
|
+
Gr * Math.pow(2, E.current),
|
|
1688
1652
|
Yr
|
|
1689
1653
|
);
|
|
1690
|
-
|
|
1691
|
-
|
|
1654
|
+
E.current += 1, O.current = setTimeout(async () => {
|
|
1655
|
+
O.current = null, ee.current = !0;
|
|
1692
1656
|
try {
|
|
1693
|
-
await
|
|
1657
|
+
await V(se), E.current = 0, ee.current = !1, await W(se);
|
|
1694
1658
|
} catch {
|
|
1695
|
-
ee.current = !1,
|
|
1659
|
+
ee.current = !1, P();
|
|
1696
1660
|
}
|
|
1697
1661
|
}, we);
|
|
1698
1662
|
},
|
|
1699
|
-
[
|
|
1663
|
+
[V, W]
|
|
1700
1664
|
);
|
|
1701
1665
|
K(() => {
|
|
1702
|
-
|
|
1666
|
+
X.current = Re;
|
|
1703
1667
|
});
|
|
1704
|
-
const
|
|
1705
|
-
async (
|
|
1706
|
-
if (!
|
|
1668
|
+
const Ee = v(
|
|
1669
|
+
async (P) => {
|
|
1670
|
+
if (!b || !P)
|
|
1707
1671
|
throw new Error(
|
|
1708
1672
|
"Cannot connect: AppSync settings not ready or missing chatId"
|
|
1709
1673
|
);
|
|
1710
|
-
|
|
1674
|
+
Z(), oe.current = !0, A.current = P, E.current = 0, fe(P), await V(P);
|
|
1711
1675
|
},
|
|
1712
|
-
[
|
|
1713
|
-
),
|
|
1714
|
-
|
|
1715
|
-
}, [
|
|
1716
|
-
const
|
|
1717
|
-
if (!
|
|
1718
|
-
const
|
|
1719
|
-
|
|
1720
|
-
() =>
|
|
1676
|
+
[b, Z, V, fe]
|
|
1677
|
+
), ze = v(() => {
|
|
1678
|
+
oe.current = !1, A.current = null, E.current = 0, Z(), k(), S(), M();
|
|
1679
|
+
}, [Z, k, S, M]), We = v(() => {
|
|
1680
|
+
const P = A.current;
|
|
1681
|
+
if (!P) return;
|
|
1682
|
+
const se = _.current + 1;
|
|
1683
|
+
S(), _.current = se, m.current = setInterval(
|
|
1684
|
+
() => W(P),
|
|
1721
1685
|
Qr
|
|
1722
|
-
),
|
|
1723
|
-
|
|
1686
|
+
), y.current = setTimeout(
|
|
1687
|
+
S,
|
|
1724
1688
|
en
|
|
1725
1689
|
);
|
|
1726
|
-
}, [
|
|
1727
|
-
|
|
1690
|
+
}, [W, S]), He = v(() => {
|
|
1691
|
+
q.current.clear();
|
|
1728
1692
|
}, []);
|
|
1729
1693
|
return K(() => {
|
|
1730
|
-
!t || !
|
|
1731
|
-
console.error("Failed to eagerly connect:",
|
|
1732
|
-
}).then(() =>
|
|
1733
|
-
}, [t,
|
|
1734
|
-
|
|
1735
|
-
}, [
|
|
1694
|
+
!t || !b || A.current === t || Ee(t).catch((P) => {
|
|
1695
|
+
console.error("Failed to eagerly connect:", P), A.current === t && (oe.current = !0, X.current());
|
|
1696
|
+
}).then(() => W(t));
|
|
1697
|
+
}, [t, b, Ee, W]), K(() => () => {
|
|
1698
|
+
ze();
|
|
1699
|
+
}, [ze]), { connect: Ee, disconnect: ze, clearProcessedIds: He, expectReply: We };
|
|
1736
1700
|
}
|
|
1737
1701
|
function on(e) {
|
|
1738
1702
|
return {
|
|
@@ -1742,30 +1706,7 @@ function on(e) {
|
|
|
1742
1706
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1743
1707
|
};
|
|
1744
1708
|
}
|
|
1745
|
-
function rn(e
|
|
1746
|
-
return {
|
|
1747
|
-
id: e.message_id,
|
|
1748
|
-
content: e.response.content,
|
|
1749
|
-
sender: "user",
|
|
1750
|
-
timestamp: t
|
|
1751
|
-
};
|
|
1752
|
-
}
|
|
1753
|
-
function vt(e, t, o) {
|
|
1754
|
-
const r = (a) => [
|
|
1755
|
-
...e.slice(0, a),
|
|
1756
|
-
t,
|
|
1757
|
-
...e.slice(a)
|
|
1758
|
-
];
|
|
1759
|
-
if (o === null) {
|
|
1760
|
-
const a = e.findIndex(
|
|
1761
|
-
(u) => !u.isWelcomeMessage
|
|
1762
|
-
);
|
|
1763
|
-
return r(a === -1 ? e.length : a);
|
|
1764
|
-
}
|
|
1765
|
-
const n = o ? e.findIndex((a) => a.id === o) : -1;
|
|
1766
|
-
return n === -1 ? [...e, t] : r(n + 1);
|
|
1767
|
-
}
|
|
1768
|
-
function nn(e) {
|
|
1709
|
+
function rn(e) {
|
|
1769
1710
|
return {
|
|
1770
1711
|
id: crypto.randomUUID(),
|
|
1771
1712
|
content: e,
|
|
@@ -1774,7 +1715,7 @@ function nn(e) {
|
|
|
1774
1715
|
isWelcomeMessage: !0
|
|
1775
1716
|
};
|
|
1776
1717
|
}
|
|
1777
|
-
function
|
|
1718
|
+
function nn() {
|
|
1778
1719
|
return {
|
|
1779
1720
|
id: crypto.randomUUID(),
|
|
1780
1721
|
content: "",
|
|
@@ -1783,15 +1724,16 @@ function an() {
|
|
|
1783
1724
|
isRatingRequest: !0
|
|
1784
1725
|
};
|
|
1785
1726
|
}
|
|
1786
|
-
function
|
|
1727
|
+
function an() {
|
|
1787
1728
|
return {
|
|
1788
1729
|
id: crypto.randomUUID(),
|
|
1789
1730
|
content: "This conversation is closed, please start a new chat.",
|
|
1790
1731
|
sender: "assistant",
|
|
1791
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1732
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1733
|
+
isNotice: !0
|
|
1792
1734
|
};
|
|
1793
1735
|
}
|
|
1794
|
-
function
|
|
1736
|
+
function sn(e, t) {
|
|
1795
1737
|
return {
|
|
1796
1738
|
...e,
|
|
1797
1739
|
id: crypto.randomUUID(),
|
|
@@ -1808,12 +1750,12 @@ function ln(e, t) {
|
|
|
1808
1750
|
} : {}
|
|
1809
1751
|
};
|
|
1810
1752
|
}
|
|
1811
|
-
function
|
|
1753
|
+
function vt(e, t, o) {
|
|
1812
1754
|
return e.map(
|
|
1813
1755
|
(r) => r.id === t ? o(r) : r
|
|
1814
1756
|
);
|
|
1815
1757
|
}
|
|
1816
|
-
function
|
|
1758
|
+
function ln(e, t, o) {
|
|
1817
1759
|
return {
|
|
1818
1760
|
...e,
|
|
1819
1761
|
attachments: e.attachments?.map(
|
|
@@ -1821,53 +1763,102 @@ function cn(e, t, o) {
|
|
|
1821
1763
|
)
|
|
1822
1764
|
};
|
|
1823
1765
|
}
|
|
1824
|
-
function
|
|
1766
|
+
function cn(e, t) {
|
|
1825
1767
|
return e.flatMap((o) => o.id !== t ? [o] : o.content ? [{ ...o, attachments: void 0 }] : []);
|
|
1826
1768
|
}
|
|
1827
|
-
function
|
|
1769
|
+
function un(e) {
|
|
1770
|
+
return !!e.isWelcomeMessage || !!e.isThinking || !!e.isRatingRequest || !!e.isNotice;
|
|
1771
|
+
}
|
|
1772
|
+
function dn(e) {
|
|
1773
|
+
return {
|
|
1774
|
+
id: e.message_id,
|
|
1775
|
+
content: e.response.content,
|
|
1776
|
+
sender: e.role,
|
|
1777
|
+
timestamp: e.created_at
|
|
1778
|
+
};
|
|
1779
|
+
}
|
|
1780
|
+
function wt(e, t) {
|
|
1781
|
+
const o = new Set(t.map((s) => s.message_id)), r = [...e], n = [], a = [];
|
|
1782
|
+
let l = -1;
|
|
1783
|
+
for (const s of t) {
|
|
1784
|
+
const u = r.findIndex(({ id: c }) => c === s.message_id);
|
|
1785
|
+
if (u !== -1) {
|
|
1786
|
+
l = u;
|
|
1787
|
+
continue;
|
|
1788
|
+
}
|
|
1789
|
+
const i = pn(r, l, s.role, o);
|
|
1790
|
+
if (i !== -1) {
|
|
1791
|
+
const c = r[i];
|
|
1792
|
+
r[i] = {
|
|
1793
|
+
...c,
|
|
1794
|
+
id: s.message_id,
|
|
1795
|
+
localId: c.localId ?? c.id,
|
|
1796
|
+
...c.sender === "user" && { isNew: !1 }
|
|
1797
|
+
}, a.push([c.id, s.message_id]), l = i;
|
|
1798
|
+
continue;
|
|
1799
|
+
}
|
|
1800
|
+
const d = l === -1 ? hn(r) : l + 1, p = dn(s);
|
|
1801
|
+
r.splice(d, 0, p), s.role === "assistant" && n.push(p), l = d;
|
|
1802
|
+
}
|
|
1803
|
+
return { messages: r, addedReplies: n, confirmedIds: a };
|
|
1804
|
+
}
|
|
1805
|
+
function pn(e, t, o, r) {
|
|
1806
|
+
for (let n = t + 1; n < e.length; n++) {
|
|
1807
|
+
const a = e[n];
|
|
1808
|
+
if (!un(a)) {
|
|
1809
|
+
if (r.has(a.id)) return -1;
|
|
1810
|
+
if (a.sender === o && !a.isFailed) return n;
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
return -1;
|
|
1814
|
+
}
|
|
1815
|
+
function hn(e) {
|
|
1816
|
+
const t = e.findIndex((o) => !o.isWelcomeMessage);
|
|
1817
|
+
return t === -1 ? e.length : t;
|
|
1818
|
+
}
|
|
1819
|
+
function fn({
|
|
1828
1820
|
appId: e,
|
|
1829
1821
|
userId: t,
|
|
1830
1822
|
userName: o,
|
|
1831
1823
|
userData: r,
|
|
1832
1824
|
externalId: n,
|
|
1833
1825
|
deviceId: a,
|
|
1834
|
-
apiClient:
|
|
1826
|
+
apiClient: l,
|
|
1835
1827
|
chatSettings: s,
|
|
1836
|
-
messages:
|
|
1828
|
+
messages: u,
|
|
1837
1829
|
setMessages: i,
|
|
1838
|
-
currentChat:
|
|
1839
|
-
setCurrentChat:
|
|
1840
|
-
onChatClosed:
|
|
1830
|
+
currentChat: d,
|
|
1831
|
+
setCurrentChat: p,
|
|
1832
|
+
onChatClosed: c,
|
|
1841
1833
|
isChatClosed: h,
|
|
1842
1834
|
onAgentMessage: f
|
|
1843
1835
|
}) {
|
|
1844
|
-
const { saveChatData: g, clearChatData:
|
|
1836
|
+
const { saveChatData: g, clearChatData: R, updateLastActivity: q, markChatClosed: z } = it({
|
|
1845
1837
|
appId: e
|
|
1846
|
-
}), { publishApiError: A, publishNetworkError:
|
|
1847
|
-
(
|
|
1848
|
-
if (!
|
|
1849
|
-
const
|
|
1850
|
-
(
|
|
1851
|
-
),
|
|
1852
|
-
(
|
|
1838
|
+
}), { publishApiError: A, publishNetworkError: E } = Ke(), { showCognition: O, hideCognition: U } = Bt(), m = F(l), y = F(u), _ = $(0), oe = v(
|
|
1839
|
+
(b, x) => {
|
|
1840
|
+
if (!b.response.content) return;
|
|
1841
|
+
const j = !!s?.welcome_message && b.response.content === s.welcome_message, M = y.current.some(
|
|
1842
|
+
(w) => w.isRatingRequest
|
|
1843
|
+
), k = y.current.some(
|
|
1844
|
+
(w) => w.id === b.message_id
|
|
1853
1845
|
);
|
|
1854
|
-
!
|
|
1855
|
-
const
|
|
1856
|
-
i((
|
|
1857
|
-
if (
|
|
1858
|
-
return
|
|
1859
|
-
const
|
|
1860
|
-
|
|
1861
|
-
on(
|
|
1862
|
-
|
|
1863
|
-
);
|
|
1846
|
+
!j && !M && !k && f?.();
|
|
1847
|
+
const S = _.current;
|
|
1848
|
+
i((w) => {
|
|
1849
|
+
if (_.current !== S || w.some((V) => V.isRatingRequest) || w.some((V) => V.id === b.message_id) || s?.welcome_message && b.response.content === s.welcome_message)
|
|
1850
|
+
return w;
|
|
1851
|
+
const X = [
|
|
1852
|
+
...w.filter((V) => !V.isThinking),
|
|
1853
|
+
on(b)
|
|
1854
|
+
];
|
|
1864
1855
|
return g(
|
|
1865
1856
|
x,
|
|
1866
1857
|
t,
|
|
1867
|
-
|
|
1858
|
+
X,
|
|
1868
1859
|
a,
|
|
1869
|
-
|
|
1870
|
-
),
|
|
1860
|
+
m.current?.getChatToken()
|
|
1861
|
+
), X;
|
|
1871
1862
|
});
|
|
1872
1863
|
},
|
|
1873
1864
|
[
|
|
@@ -1876,78 +1867,90 @@ function dn({
|
|
|
1876
1867
|
g,
|
|
1877
1868
|
i,
|
|
1878
1869
|
t,
|
|
1879
|
-
|
|
1880
|
-
|
|
1870
|
+
m,
|
|
1871
|
+
y,
|
|
1881
1872
|
f
|
|
1882
1873
|
]
|
|
1883
1874
|
), ee = v(
|
|
1884
|
-
(
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1875
|
+
(b, x) => {
|
|
1876
|
+
const j = y.current.some(
|
|
1877
|
+
(w) => w.isRatingRequest
|
|
1878
|
+
), M = b.filter(
|
|
1879
|
+
(w) => !(w.role === "assistant" && (j || s?.welcome_message && w.response.content === s.welcome_message))
|
|
1880
|
+
);
|
|
1881
|
+
wt(y.current, M).addedReplies.length > 0 && f?.();
|
|
1882
|
+
const S = _.current;
|
|
1883
|
+
i((w) => {
|
|
1884
|
+
if (_.current !== S) return w;
|
|
1885
|
+
const { messages: Z, addedReplies: X, confirmedIds: V } = wt(
|
|
1886
|
+
w,
|
|
1887
|
+
M
|
|
1896
1888
|
);
|
|
1889
|
+
if (X.length === 0 && V.length === 0) return w;
|
|
1890
|
+
const W = X.length > 0 ? Z.filter((fe) => !fe.isThinking) : Z;
|
|
1897
1891
|
return g(
|
|
1898
1892
|
x,
|
|
1899
1893
|
t,
|
|
1900
|
-
|
|
1894
|
+
W,
|
|
1901
1895
|
a,
|
|
1902
|
-
|
|
1903
|
-
),
|
|
1896
|
+
m.current?.getChatToken()
|
|
1897
|
+
), W;
|
|
1904
1898
|
});
|
|
1905
1899
|
},
|
|
1906
|
-
[
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1900
|
+
[
|
|
1901
|
+
s,
|
|
1902
|
+
a,
|
|
1903
|
+
g,
|
|
1904
|
+
i,
|
|
1905
|
+
t,
|
|
1906
|
+
m,
|
|
1907
|
+
y,
|
|
1908
|
+
f
|
|
1909
|
+
]
|
|
1910
|
+
), de = v(() => {
|
|
1911
|
+
U(), i((b) => b.filter((x) => !x.isThinking));
|
|
1912
|
+
}, [i, U]), ae = v(() => {
|
|
1913
|
+
i((b) => [...b.filter((j) => !j.isRatingRequest), nn()]);
|
|
1911
1914
|
}, [i]);
|
|
1912
1915
|
K(() => {
|
|
1913
|
-
}, [
|
|
1916
|
+
}, [ae]);
|
|
1914
1917
|
const D = v(
|
|
1915
|
-
(
|
|
1916
|
-
[
|
|
1917
|
-
), J = v(() =>
|
|
1918
|
-
z(),
|
|
1919
|
-
}, [z,
|
|
1918
|
+
(b) => m.current ? m.current.getChatHistory(b) : Promise.resolve([]),
|
|
1919
|
+
[m]
|
|
1920
|
+
), J = v(() => m.current?.getChatToken() ?? null, [m]), N = v(() => {
|
|
1921
|
+
z(), c?.();
|
|
1922
|
+
}, [z, c]), { connect: H, disconnect: re, clearProcessedIds: le, expectReply: G } = tn({
|
|
1920
1923
|
chatSettings: s,
|
|
1921
|
-
chatId:
|
|
1922
|
-
messages:
|
|
1923
|
-
onMessage:
|
|
1924
|
-
|
|
1925
|
-
onCognition:
|
|
1926
|
-
onCognitionComplete:
|
|
1927
|
-
onError:
|
|
1928
|
-
onChatClosed:
|
|
1929
|
-
onRatingRequest:
|
|
1930
|
-
onBreadcrumb:
|
|
1924
|
+
chatId: d?.id ?? null,
|
|
1925
|
+
messages: u,
|
|
1926
|
+
onMessage: oe,
|
|
1927
|
+
onHistory: ee,
|
|
1928
|
+
onCognition: O,
|
|
1929
|
+
onCognitionComplete: U,
|
|
1930
|
+
onError: de,
|
|
1931
|
+
onChatClosed: N,
|
|
1932
|
+
onRatingRequest: ae,
|
|
1933
|
+
onBreadcrumb: N,
|
|
1931
1934
|
fetchHistory: D,
|
|
1932
1935
|
getChatToken: J
|
|
1933
|
-
}),
|
|
1934
|
-
|
|
1935
|
-
(
|
|
1936
|
-
),
|
|
1936
|
+
}), ie = v(() => {
|
|
1937
|
+
_.current += 1, U(), re(), le(), Lt(u), i(
|
|
1938
|
+
(b) => b.filter((x) => Array.isArray(x) ? !1 : x.isWelcomeMessage)
|
|
1939
|
+
), R(), p(null);
|
|
1937
1940
|
}, [
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1941
|
+
U,
|
|
1942
|
+
re,
|
|
1943
|
+
le,
|
|
1944
|
+
u,
|
|
1945
|
+
R,
|
|
1943
1946
|
i,
|
|
1944
|
-
|
|
1947
|
+
p
|
|
1945
1948
|
]), Y = v(
|
|
1946
|
-
(
|
|
1949
|
+
(b, x) => i((j) => vt(j, b, x)),
|
|
1947
1950
|
[i]
|
|
1948
|
-
),
|
|
1949
|
-
async (
|
|
1950
|
-
const x = await
|
|
1951
|
+
), ce = v(
|
|
1952
|
+
async (b) => {
|
|
1953
|
+
const x = await b.createConversation({
|
|
1951
1954
|
userId: n || t,
|
|
1952
1955
|
deviceId: a,
|
|
1953
1956
|
userName: o,
|
|
@@ -1956,121 +1959,122 @@ function dn({
|
|
|
1956
1959
|
searchParams: po()
|
|
1957
1960
|
}
|
|
1958
1961
|
});
|
|
1959
|
-
|
|
1962
|
+
p({ id: x.chat_id });
|
|
1960
1963
|
try {
|
|
1961
|
-
await
|
|
1962
|
-
} catch (
|
|
1964
|
+
await H(x.chat_id);
|
|
1965
|
+
} catch (j) {
|
|
1963
1966
|
console.warn(
|
|
1964
1967
|
"Failed to connect realtime channel, continuing with REST-only delivery:",
|
|
1965
|
-
|
|
1968
|
+
j
|
|
1966
1969
|
);
|
|
1967
1970
|
}
|
|
1968
1971
|
return x.chat_id;
|
|
1969
1972
|
},
|
|
1970
|
-
[n, t, a, o, r,
|
|
1971
|
-
),
|
|
1972
|
-
(
|
|
1973
|
-
|
|
1974
|
-
({ file:
|
|
1973
|
+
[n, t, a, o, r, p, H]
|
|
1974
|
+
), ve = v(
|
|
1975
|
+
(b, x, j, M) => Promise.all(
|
|
1976
|
+
j.map(
|
|
1977
|
+
({ file: k }, S) => b.uploadAttachment({
|
|
1975
1978
|
conversationId: x,
|
|
1976
|
-
file:
|
|
1977
|
-
onProgress: (
|
|
1978
|
-
|
|
1979
|
-
(
|
|
1979
|
+
file: k,
|
|
1980
|
+
onProgress: (w) => Y(
|
|
1981
|
+
M,
|
|
1982
|
+
(Z) => ln(Z, S, w)
|
|
1980
1983
|
)
|
|
1981
|
-
}).catch((
|
|
1982
|
-
throw
|
|
1984
|
+
}).catch((w) => {
|
|
1985
|
+
throw Nt(w, k.name);
|
|
1983
1986
|
})
|
|
1984
1987
|
)
|
|
1985
1988
|
),
|
|
1986
1989
|
[Y]
|
|
1987
1990
|
), pe = v(
|
|
1988
|
-
(
|
|
1989
|
-
|
|
1990
|
-
const
|
|
1991
|
-
if (
|
|
1992
|
-
|
|
1991
|
+
(b, x, j, M) => {
|
|
1992
|
+
U(), M && i((S) => cn(S, j)), i((S) => S.filter((w) => !w.isThinking));
|
|
1993
|
+
const k = () => Y(j, (S) => ({ ...S, isFailed: !0 }));
|
|
1994
|
+
if (b instanceof Zt) {
|
|
1995
|
+
k();
|
|
1993
1996
|
return;
|
|
1994
1997
|
}
|
|
1995
|
-
if (
|
|
1996
|
-
|
|
1998
|
+
if (b instanceof at || b instanceof Le && b.status === 403) {
|
|
1999
|
+
E();
|
|
1997
2000
|
return;
|
|
1998
2001
|
}
|
|
1999
|
-
A(
|
|
2002
|
+
A(b), b instanceof Le && // A 401 means an expired or closed chat token: drop the session so
|
|
2000
2003
|
// the next send starts a fresh one, as for a client-side expiry.
|
|
2001
|
-
(
|
|
2004
|
+
(b.status >= 500 || b.status === 401) ? (p(null), R(), i((S) => S.filter((w) => w.id !== j)), x.reset()) : k();
|
|
2002
2005
|
},
|
|
2003
2006
|
[
|
|
2004
|
-
|
|
2007
|
+
U,
|
|
2005
2008
|
i,
|
|
2006
2009
|
Y,
|
|
2007
|
-
|
|
2010
|
+
E,
|
|
2008
2011
|
A,
|
|
2009
|
-
|
|
2010
|
-
|
|
2012
|
+
p,
|
|
2013
|
+
R
|
|
2011
2014
|
]
|
|
2012
|
-
),
|
|
2013
|
-
async (
|
|
2014
|
-
if (!
|
|
2015
|
+
), ne = v(
|
|
2016
|
+
async (b, x = []) => {
|
|
2017
|
+
if (!l || u.some((k) => k.isRatingRequest)) return;
|
|
2015
2018
|
if (h) {
|
|
2016
|
-
i((
|
|
2019
|
+
i((k) => [...k, an()]);
|
|
2017
2020
|
return;
|
|
2018
2021
|
}
|
|
2019
|
-
const
|
|
2020
|
-
i((
|
|
2022
|
+
const j = _.current, M = sn(b, x);
|
|
2023
|
+
i((k) => [...k, M]), q();
|
|
2021
2024
|
try {
|
|
2022
|
-
const
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
+
const k = d?.id || await ce(l), S = await ve(
|
|
2026
|
+
l,
|
|
2027
|
+
k,
|
|
2025
2028
|
x,
|
|
2026
|
-
|
|
2029
|
+
M.id
|
|
2027
2030
|
);
|
|
2028
|
-
|
|
2029
|
-
...
|
|
2030
|
-
attachments:
|
|
2031
|
+
S.length > 0 && Y(M.id, (Z) => ({
|
|
2032
|
+
...Z,
|
|
2033
|
+
attachments: Kt(S, x)
|
|
2031
2034
|
}));
|
|
2032
|
-
const
|
|
2033
|
-
text:
|
|
2034
|
-
attachments:
|
|
2035
|
-
conversationId:
|
|
2035
|
+
const w = await l.replyToConversation({
|
|
2036
|
+
text: b.content,
|
|
2037
|
+
attachments: S,
|
|
2038
|
+
conversationId: k,
|
|
2036
2039
|
userId: n || t,
|
|
2037
2040
|
deviceId: a,
|
|
2038
2041
|
userName: o,
|
|
2039
2042
|
userData: r
|
|
2040
2043
|
});
|
|
2041
|
-
i((
|
|
2042
|
-
if (
|
|
2043
|
-
const W =
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2044
|
+
i((Z) => {
|
|
2045
|
+
if (_.current !== j) return Z;
|
|
2046
|
+
const X = Z.some((W) => W.id === M.id) ? M.id : w.message_id, V = vt(Z, X, (W) => ({
|
|
2047
|
+
...W,
|
|
2048
|
+
id: w.message_id,
|
|
2049
|
+
localId: W.localId ?? W.id,
|
|
2050
|
+
isNew: !1
|
|
2051
|
+
}));
|
|
2048
2052
|
return g(
|
|
2049
|
-
|
|
2053
|
+
k,
|
|
2050
2054
|
t,
|
|
2051
|
-
|
|
2055
|
+
V,
|
|
2052
2056
|
a,
|
|
2053
|
-
|
|
2054
|
-
),
|
|
2057
|
+
l.getChatToken()
|
|
2058
|
+
), V;
|
|
2055
2059
|
}), G();
|
|
2056
|
-
} catch (
|
|
2060
|
+
} catch (k) {
|
|
2057
2061
|
throw pe(
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2062
|
+
k,
|
|
2063
|
+
l,
|
|
2064
|
+
M.id,
|
|
2061
2065
|
x.length > 0
|
|
2062
|
-
),
|
|
2066
|
+
), k;
|
|
2063
2067
|
}
|
|
2064
2068
|
},
|
|
2065
2069
|
[
|
|
2066
|
-
u,
|
|
2067
2070
|
l,
|
|
2071
|
+
u,
|
|
2068
2072
|
h,
|
|
2069
2073
|
i,
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
+
q,
|
|
2075
|
+
d?.id,
|
|
2076
|
+
ce,
|
|
2077
|
+
ve,
|
|
2074
2078
|
Y,
|
|
2075
2079
|
g,
|
|
2076
2080
|
G,
|
|
@@ -2082,35 +2086,35 @@ function dn({
|
|
|
2082
2086
|
r
|
|
2083
2087
|
]
|
|
2084
2088
|
), he = v(
|
|
2085
|
-
async (
|
|
2086
|
-
const x =
|
|
2087
|
-
!
|
|
2089
|
+
async (b) => {
|
|
2090
|
+
const x = d?.id;
|
|
2091
|
+
!m.current || !x || await m.current.addRating(x, b);
|
|
2088
2092
|
},
|
|
2089
|
-
[
|
|
2093
|
+
[d?.id, m]
|
|
2090
2094
|
);
|
|
2091
2095
|
return {
|
|
2092
|
-
onCleanMessages:
|
|
2093
|
-
onSendMessage:
|
|
2096
|
+
onCleanMessages: ie,
|
|
2097
|
+
onSendMessage: ne,
|
|
2094
2098
|
onRateChat: he
|
|
2095
2099
|
};
|
|
2096
2100
|
}
|
|
2097
|
-
const
|
|
2098
|
-
function
|
|
2099
|
-
return typeof window > "u" || typeof import.meta > "u" ? "" :
|
|
2101
|
+
const gn = { BASE_URL: "/", DEV: !1, MODE: "dev", PROD: !0, SSR: !1, VITE_API_URL: "https://chat.eloquentai.dev", VITE_CDN_URL: "https://cdn.eloquentai.dev", VITE_ENVIRONMENT: "dev", VITE_REGION_API_URL: "https://region.eloquentai.dev", VITE_SENTRY_DSN: "" };
|
|
2102
|
+
function Et(e) {
|
|
2103
|
+
return typeof window > "u" || typeof import.meta > "u" ? "" : gn[e] || "";
|
|
2100
2104
|
}
|
|
2101
|
-
const
|
|
2102
|
-
function
|
|
2103
|
-
return
|
|
2105
|
+
const mn = Et("VITE_API_URL"), bn = Et("VITE_REGION_API_URL");
|
|
2106
|
+
function vn() {
|
|
2107
|
+
return mn || "";
|
|
2104
2108
|
}
|
|
2105
|
-
function
|
|
2106
|
-
return
|
|
2109
|
+
function wn() {
|
|
2110
|
+
return bn || "";
|
|
2107
2111
|
}
|
|
2108
|
-
class
|
|
2112
|
+
class qn {
|
|
2109
2113
|
httpClient;
|
|
2110
2114
|
userId = null;
|
|
2111
2115
|
conversationId = null;
|
|
2112
2116
|
constructor(t) {
|
|
2113
|
-
this.userId = t.userId || null, this.httpClient = new
|
|
2117
|
+
this.userId = t.userId || null, this.httpClient = new Vt(t);
|
|
2114
2118
|
}
|
|
2115
2119
|
getUserData() {
|
|
2116
2120
|
return {
|
|
@@ -2137,7 +2141,7 @@ class bn {
|
|
|
2137
2141
|
* Get organization data by app ID
|
|
2138
2142
|
*/
|
|
2139
2143
|
async getOrganizationByAppId(t) {
|
|
2140
|
-
const o =
|
|
2144
|
+
const o = wn();
|
|
2141
2145
|
return await this.httpClient.getExternal(
|
|
2142
2146
|
`${o}/by-app-id/${t}`
|
|
2143
2147
|
);
|
|
@@ -2184,7 +2188,7 @@ class bn {
|
|
|
2184
2188
|
o,
|
|
2185
2189
|
t.onProgress
|
|
2186
2190
|
);
|
|
2187
|
-
return
|
|
2191
|
+
return Fr.parse(r).data;
|
|
2188
2192
|
}
|
|
2189
2193
|
async getAttachmentUrls(t, o) {
|
|
2190
2194
|
const r = await this.httpClient.post(
|
|
@@ -2209,60 +2213,60 @@ class bn {
|
|
|
2209
2213
|
)).data;
|
|
2210
2214
|
}
|
|
2211
2215
|
}
|
|
2212
|
-
const
|
|
2216
|
+
const yn = {
|
|
2213
2217
|
retries: 3,
|
|
2214
2218
|
minDelayMs: 200,
|
|
2215
2219
|
maxDelayMs: 1e3,
|
|
2216
2220
|
factor: 2
|
|
2217
2221
|
};
|
|
2218
|
-
function
|
|
2219
|
-
return e instanceof at ? !0 : e instanceof
|
|
2222
|
+
function xn(e) {
|
|
2223
|
+
return e instanceof at ? !0 : e instanceof Le ? e.status === 429 || e.status >= 500 : !1;
|
|
2220
2224
|
}
|
|
2221
|
-
function
|
|
2225
|
+
function kn(e, t) {
|
|
2222
2226
|
const o = t.minDelayMs * t.factor ** e, r = Math.min(o, t.maxDelayMs);
|
|
2223
2227
|
return Math.random() * r;
|
|
2224
2228
|
}
|
|
2225
2229
|
async function qt(e, t = {}) {
|
|
2226
|
-
const o = { ...
|
|
2230
|
+
const o = { ...yn, ...t };
|
|
2227
2231
|
for (let r = 0; ; r++)
|
|
2228
2232
|
try {
|
|
2229
2233
|
return await e();
|
|
2230
2234
|
} catch (n) {
|
|
2231
|
-
if (r >= o.retries || !
|
|
2235
|
+
if (r >= o.retries || !xn(n))
|
|
2232
2236
|
throw n;
|
|
2233
2237
|
await new Promise(
|
|
2234
|
-
(a) => setTimeout(a,
|
|
2238
|
+
(a) => setTimeout(a, kn(r, o))
|
|
2235
2239
|
);
|
|
2236
2240
|
}
|
|
2237
2241
|
}
|
|
2238
|
-
const
|
|
2239
|
-
function
|
|
2242
|
+
const De = /* @__PURE__ */ new Map(), $e = /* @__PURE__ */ new Map();
|
|
2243
|
+
function _n(e, t, o) {
|
|
2240
2244
|
const r = o?.dedupe !== !1, [n, a] = C(
|
|
2241
|
-
() =>
|
|
2242
|
-
), { publishApiError:
|
|
2243
|
-
$(() => (
|
|
2244
|
-
|
|
2245
|
+
() => De.get(e)
|
|
2246
|
+
), { publishApiError: l, publishNetworkError: s } = Ke(), [u, i] = C(void 0), [d, p] = C(!1), c = $(!0);
|
|
2247
|
+
$(() => (c.current = !0, () => {
|
|
2248
|
+
c.current = !1;
|
|
2245
2249
|
}));
|
|
2246
2250
|
const h = v(async () => {
|
|
2247
|
-
if (
|
|
2248
|
-
const f =
|
|
2251
|
+
if (De.has(e)) {
|
|
2252
|
+
const f = De.get(e);
|
|
2249
2253
|
return a(f), f;
|
|
2250
2254
|
}
|
|
2251
|
-
|
|
2255
|
+
p(!0), i(void 0);
|
|
2252
2256
|
try {
|
|
2253
|
-
if (r &&
|
|
2254
|
-
return await
|
|
2257
|
+
if (r && $e.has(e))
|
|
2258
|
+
return await $e.get(e);
|
|
2255
2259
|
const f = t();
|
|
2256
|
-
r &&
|
|
2260
|
+
r && $e.set(e, f);
|
|
2257
2261
|
const g = await f;
|
|
2258
|
-
return
|
|
2262
|
+
return De.set(e, g), c.current && a(g), g;
|
|
2259
2263
|
} catch (f) {
|
|
2260
|
-
throw f instanceof at || f instanceof
|
|
2264
|
+
throw f instanceof at || f instanceof Le && f.status === 403 ? s() : l(f), c.current && i(f), f;
|
|
2261
2265
|
} finally {
|
|
2262
|
-
|
|
2266
|
+
$e.delete(e), c.current && p(!1);
|
|
2263
2267
|
}
|
|
2264
|
-
}, [e, r, t,
|
|
2265
|
-
return { data: n, error:
|
|
2268
|
+
}, [e, r, t, l, s]);
|
|
2269
|
+
return { data: n, error: u, isLoading: d, fetch: h };
|
|
2266
2270
|
}
|
|
2267
2271
|
function yt(e, t) {
|
|
2268
2272
|
const o = e?.deviceId || crypto.randomUUID();
|
|
@@ -2272,11 +2276,11 @@ function yt(e, t) {
|
|
|
2272
2276
|
deviceId: o
|
|
2273
2277
|
} : t ? { userId: t, externalId: t, deviceId: o } : { userId: crypto.randomUUID(), externalId: null, deviceId: o };
|
|
2274
2278
|
}
|
|
2275
|
-
function
|
|
2279
|
+
function Cn(e) {
|
|
2276
2280
|
const { appId: t, initialUserId: o } = e, { getSavedChatData: r } = it({ appId: t }), [n, a] = C(
|
|
2277
2281
|
() => yt(r(), o)
|
|
2278
|
-
), [
|
|
2279
|
-
return
|
|
2282
|
+
), [l, s] = C(o);
|
|
2283
|
+
return l !== o && (s(o), a(yt(r(), o))), {
|
|
2280
2284
|
// Identity is available synchronously; kept in the contract because
|
|
2281
2285
|
// consumers (SDK boot) still key off it.
|
|
2282
2286
|
isReady: !0,
|
|
@@ -2285,7 +2289,7 @@ function xn(e) {
|
|
|
2285
2289
|
externalId: n.externalId
|
|
2286
2290
|
};
|
|
2287
2291
|
}
|
|
2288
|
-
function
|
|
2292
|
+
function Sn({
|
|
2289
2293
|
apiUrl: e,
|
|
2290
2294
|
appId: t,
|
|
2291
2295
|
initialUserId: o,
|
|
@@ -2294,120 +2298,120 @@ function kn({
|
|
|
2294
2298
|
}) {
|
|
2295
2299
|
const {
|
|
2296
2300
|
userId: a,
|
|
2297
|
-
externalId:
|
|
2301
|
+
externalId: l,
|
|
2298
2302
|
deviceId: s,
|
|
2299
|
-
isReady:
|
|
2300
|
-
} =
|
|
2303
|
+
isReady: u
|
|
2304
|
+
} = Cn({ appId: t, initialUserId: o }), { isChatExpired: i, clearChatData: d, getSavedChatData: p } = it({
|
|
2301
2305
|
appId: t
|
|
2302
|
-
}), { current:
|
|
2303
|
-
new
|
|
2304
|
-
baseURL:
|
|
2306
|
+
}), { current: c } = $(e || vn()), [h] = C(
|
|
2307
|
+
new qn({
|
|
2308
|
+
baseURL: c,
|
|
2305
2309
|
appId: t
|
|
2306
2310
|
})
|
|
2307
|
-
), [f, g] = C(null), [
|
|
2311
|
+
), [f, g] = C(null), [R, q] = C(null), [z, A] = C([]), [E, O] = C(!1), [U, m] = C(!1), [y, _] = C(!0), ee = _n(`sdk-boot-${t}`, () => h.boot()).fetch;
|
|
2308
2312
|
K(() => {
|
|
2309
2313
|
if (i())
|
|
2310
|
-
|
|
2314
|
+
d();
|
|
2311
2315
|
else {
|
|
2312
2316
|
const {
|
|
2313
|
-
conversationId:
|
|
2317
|
+
conversationId: ae,
|
|
2314
2318
|
userId: D,
|
|
2315
2319
|
messages: J,
|
|
2316
|
-
isChatClosed:
|
|
2317
|
-
chatToken:
|
|
2318
|
-
} =
|
|
2319
|
-
|
|
2320
|
-
id:
|
|
2321
|
-
}), h.setChatToken(
|
|
2320
|
+
isChatClosed: N,
|
|
2321
|
+
chatToken: H
|
|
2322
|
+
} = p();
|
|
2323
|
+
ae && D && (q({
|
|
2324
|
+
id: ae
|
|
2325
|
+
}), h.setChatToken(H ?? null), J && J.length > 0 && A(J), N && m(!0));
|
|
2322
2326
|
}
|
|
2323
|
-
}, [
|
|
2324
|
-
const
|
|
2327
|
+
}, [p, i, d, h]);
|
|
2328
|
+
const de = $(!1);
|
|
2325
2329
|
return K(() => {
|
|
2326
|
-
if (
|
|
2327
|
-
|
|
2330
|
+
if (de.current) return;
|
|
2331
|
+
de.current = !0, (async () => {
|
|
2328
2332
|
const [D, J] = await ct(
|
|
2329
2333
|
qt(() => h.getOrganizationByAppId(t))
|
|
2330
2334
|
);
|
|
2331
2335
|
if (J) {
|
|
2332
|
-
console.error("Failed to fetch organization data:", J),
|
|
2336
|
+
console.error("Failed to fetch organization data:", J), _(!1), O(!0);
|
|
2333
2337
|
return;
|
|
2334
2338
|
}
|
|
2335
2339
|
h.setRegion(D.region);
|
|
2336
|
-
const [
|
|
2337
|
-
if (
|
|
2338
|
-
|
|
2340
|
+
const [N, H] = await ct(qt(ee));
|
|
2341
|
+
if (H) {
|
|
2342
|
+
_(!1), O(!0);
|
|
2339
2343
|
return;
|
|
2340
2344
|
}
|
|
2341
2345
|
const {
|
|
2342
|
-
conversationId:
|
|
2343
|
-
userId:
|
|
2346
|
+
conversationId: re,
|
|
2347
|
+
userId: le,
|
|
2344
2348
|
messages: G
|
|
2345
|
-
} =
|
|
2346
|
-
|
|
2347
|
-
await
|
|
2349
|
+
} = p();
|
|
2350
|
+
re && le && G.some(Wt) && A(
|
|
2351
|
+
await Ht(h, re, G)
|
|
2348
2352
|
);
|
|
2349
|
-
const
|
|
2350
|
-
g(
|
|
2353
|
+
const ie = N.chat_settings.welcome_message;
|
|
2354
|
+
g(N.chat_settings), _(N.chat_settings.is_active ?? !0), ie && A((Y) => Y.length > 0 || Y.some((ce) => ce.isWelcomeMessage) ? Y : [rn(ie)]), O(!0);
|
|
2351
2355
|
})();
|
|
2352
|
-
}, [
|
|
2356
|
+
}, [u, h, t, ee, p]), {
|
|
2353
2357
|
userId: a,
|
|
2354
2358
|
userName: r,
|
|
2355
2359
|
userData: n,
|
|
2356
|
-
externalId:
|
|
2360
|
+
externalId: l,
|
|
2357
2361
|
deviceId: s,
|
|
2358
2362
|
apiClient: h,
|
|
2359
2363
|
chatSettings: f,
|
|
2360
|
-
currentChat:
|
|
2364
|
+
currentChat: R,
|
|
2361
2365
|
messages: z,
|
|
2362
|
-
isReady:
|
|
2363
|
-
isChatClosed:
|
|
2364
|
-
isChatActive:
|
|
2366
|
+
isReady: E,
|
|
2367
|
+
isChatClosed: U,
|
|
2368
|
+
isChatActive: y
|
|
2365
2369
|
};
|
|
2366
2370
|
}
|
|
2367
2371
|
const zt = "(max-width: 640px)";
|
|
2368
|
-
function
|
|
2372
|
+
function In() {
|
|
2369
2373
|
return typeof window > "u" ? !1 : window.matchMedia(zt).matches;
|
|
2370
2374
|
}
|
|
2371
|
-
function
|
|
2372
|
-
const [t, o] = C(
|
|
2375
|
+
function Rn(e) {
|
|
2376
|
+
const [t, o] = C(In), [r, n] = C(
|
|
2373
2377
|
null
|
|
2374
|
-
), a = e ?? t,
|
|
2378
|
+
), a = e ?? t, l = typeof window > "u";
|
|
2375
2379
|
return K(() => {
|
|
2376
|
-
if (
|
|
2377
|
-
const s = window.matchMedia(zt),
|
|
2380
|
+
if (l) return;
|
|
2381
|
+
const s = window.matchMedia(zt), u = (i) => {
|
|
2378
2382
|
o(i.matches);
|
|
2379
2383
|
};
|
|
2380
|
-
return
|
|
2381
|
-
}, [
|
|
2382
|
-
if (
|
|
2384
|
+
return u(s), s.addEventListener("change", u), () => s.removeEventListener("change", u);
|
|
2385
|
+
}, [l]), K(() => {
|
|
2386
|
+
if (l) return;
|
|
2383
2387
|
const s = document.createElement("div");
|
|
2384
2388
|
return s.className = "eloquent-ai-chat-portal", s.style.position = "relative", s.style.zIndex = "30", document.body.appendChild(s), n(s), () => {
|
|
2385
2389
|
s.parentElement && s.parentElement.removeChild(s);
|
|
2386
2390
|
};
|
|
2387
|
-
}, [
|
|
2391
|
+
}, [l]), {
|
|
2388
2392
|
isMobileScreen: t,
|
|
2389
2393
|
isMobile: a,
|
|
2390
2394
|
portalContainer: r
|
|
2391
2395
|
};
|
|
2392
2396
|
}
|
|
2393
|
-
const xt = 1245,
|
|
2397
|
+
const xt = 1245, En = [
|
|
2394
2398
|
[2.32, 0.4],
|
|
2395
2399
|
[4.25, 0.18]
|
|
2396
|
-
],
|
|
2400
|
+
], zn = [
|
|
2397
2401
|
{ start: 0, duration: 0.22, level: 0.45 },
|
|
2398
2402
|
{ start: 0.16, duration: 0.2, level: 0.25 }
|
|
2399
|
-
],
|
|
2403
|
+
], Tn = 0.3, Mn = 3e-3, kt = 1e-4;
|
|
2400
2404
|
function _t(e, t, o, r, n, a) {
|
|
2401
|
-
const
|
|
2402
|
-
|
|
2405
|
+
const l = e.createOscillator(), s = e.createGain();
|
|
2406
|
+
l.type = "sine", l.frequency.setValueAtTime(o, n), s.gain.setValueAtTime(kt, n), s.gain.exponentialRampToValueAtTime(r, n + Mn), s.gain.exponentialRampToValueAtTime(kt, n + a), l.connect(s).connect(t), l.start(n), l.stop(n + a + 0.05);
|
|
2403
2407
|
}
|
|
2404
|
-
function
|
|
2408
|
+
function An(e) {
|
|
2405
2409
|
const t = e.createGain();
|
|
2406
|
-
t.gain.value =
|
|
2410
|
+
t.gain.value = Tn;
|
|
2407
2411
|
const o = e.createBiquadFilter();
|
|
2408
2412
|
o.type = "lowpass", o.frequency.value = 6e3, t.connect(o).connect(e.destination);
|
|
2409
2413
|
const r = e.currentTime + 0.02;
|
|
2410
|
-
|
|
2414
|
+
zn.forEach((n) => {
|
|
2411
2415
|
_t(
|
|
2412
2416
|
e,
|
|
2413
2417
|
t,
|
|
@@ -2415,227 +2419,230 @@ function zn(e) {
|
|
|
2415
2419
|
n.level,
|
|
2416
2420
|
r + n.start,
|
|
2417
2421
|
n.duration
|
|
2418
|
-
),
|
|
2422
|
+
), En.forEach(([a, l]) => {
|
|
2419
2423
|
_t(
|
|
2420
2424
|
e,
|
|
2421
2425
|
t,
|
|
2422
2426
|
xt * a,
|
|
2423
|
-
n.level *
|
|
2427
|
+
n.level * l,
|
|
2424
2428
|
r + n.start,
|
|
2425
2429
|
n.duration * 0.35
|
|
2426
2430
|
);
|
|
2427
2431
|
});
|
|
2428
2432
|
});
|
|
2429
2433
|
}
|
|
2430
|
-
const nt = "eloquentai:notification-sound-muted",
|
|
2431
|
-
function
|
|
2434
|
+
const nt = "eloquentai:notification-sound-muted", Pn = 3e3;
|
|
2435
|
+
function On() {
|
|
2432
2436
|
try {
|
|
2433
2437
|
return window.localStorage.getItem(nt) === "true";
|
|
2434
2438
|
} catch {
|
|
2435
2439
|
return !1;
|
|
2436
2440
|
}
|
|
2437
2441
|
}
|
|
2438
|
-
function
|
|
2442
|
+
function Un(e) {
|
|
2439
2443
|
try {
|
|
2440
2444
|
e ? window.localStorage.setItem(nt, "true") : window.localStorage.removeItem(nt);
|
|
2441
2445
|
} catch {
|
|
2442
2446
|
}
|
|
2443
2447
|
}
|
|
2444
|
-
function
|
|
2448
|
+
function jn(e) {
|
|
2445
2449
|
return document.visibilityState === "visible" && document.hasFocus() && e;
|
|
2446
2450
|
}
|
|
2447
|
-
function
|
|
2451
|
+
function Dn() {
|
|
2448
2452
|
const e = window.webkitAudioContext;
|
|
2449
2453
|
return window.AudioContext ?? e ?? null;
|
|
2450
2454
|
}
|
|
2451
|
-
function
|
|
2455
|
+
function $n({
|
|
2452
2456
|
isEnabled: e,
|
|
2453
2457
|
isOpen: t
|
|
2454
2458
|
}) {
|
|
2455
|
-
const [o, r] = C(
|
|
2459
|
+
const [o, r] = C(On), n = $(null), a = $(0), l = F(t), s = F(o), u = v(() => {
|
|
2456
2460
|
if (!e) return;
|
|
2457
|
-
const
|
|
2458
|
-
if (!
|
|
2461
|
+
const p = Dn();
|
|
2462
|
+
if (!p) return;
|
|
2459
2463
|
try {
|
|
2460
|
-
n.current ??= new
|
|
2464
|
+
n.current ??= new p();
|
|
2461
2465
|
} catch {
|
|
2462
2466
|
return;
|
|
2463
2467
|
}
|
|
2464
|
-
const
|
|
2465
|
-
(
|
|
2468
|
+
const c = n.current.state;
|
|
2469
|
+
(c === "suspended" || c === "interrupted") && n.current.resume().catch(() => {
|
|
2466
2470
|
});
|
|
2467
2471
|
}, [e]);
|
|
2468
2472
|
K(() => {
|
|
2469
2473
|
if (!e) return;
|
|
2470
|
-
const
|
|
2471
|
-
return window.addEventListener("pointerdown",
|
|
2472
|
-
window.removeEventListener("pointerdown",
|
|
2474
|
+
const p = { capture: !0 }, c = () => u();
|
|
2475
|
+
return window.addEventListener("pointerdown", c, p), window.addEventListener("keydown", c, p), () => {
|
|
2476
|
+
window.removeEventListener("pointerdown", c, p), window.removeEventListener("keydown", c, p);
|
|
2473
2477
|
};
|
|
2474
|
-
}, [e,
|
|
2478
|
+
}, [e, u]);
|
|
2475
2479
|
const i = v(() => {
|
|
2476
|
-
if (!e || s.current ||
|
|
2477
|
-
const
|
|
2478
|
-
if (!
|
|
2479
|
-
const
|
|
2480
|
-
|
|
2481
|
-
}, [e, s,
|
|
2482
|
-
r((
|
|
2480
|
+
if (!e || s.current || jn(l.current)) return;
|
|
2481
|
+
const p = n.current;
|
|
2482
|
+
if (!p || p.state !== "running") return;
|
|
2483
|
+
const c = Date.now();
|
|
2484
|
+
c - a.current < Pn || (a.current = c, An(p));
|
|
2485
|
+
}, [e, s, l]), d = v(() => {
|
|
2486
|
+
r((p) => !p);
|
|
2483
2487
|
}, []);
|
|
2484
2488
|
return K(() => {
|
|
2485
|
-
|
|
2486
|
-
}, [o]), { notify: i, unlock:
|
|
2489
|
+
Un(o);
|
|
2490
|
+
}, [o]), { notify: i, unlock: u, isMuted: o, toggleMuted: d };
|
|
2487
2491
|
}
|
|
2488
|
-
const
|
|
2489
|
-
function
|
|
2492
|
+
const Bn = 2, Ln = (e) => `eloquent-ai:chat-widget-closed-${e}`;
|
|
2493
|
+
function Nn({
|
|
2490
2494
|
environment: e,
|
|
2491
2495
|
apiUrl: t,
|
|
2492
2496
|
appId: o,
|
|
2493
2497
|
userId: r,
|
|
2494
2498
|
userName: n,
|
|
2495
2499
|
userData: a,
|
|
2496
|
-
chatProps:
|
|
2500
|
+
chatProps: l,
|
|
2497
2501
|
isMobile: s,
|
|
2498
|
-
isInitiallyOpen:
|
|
2502
|
+
isInitiallyOpen: u,
|
|
2499
2503
|
hasCloseButton: i,
|
|
2500
|
-
hasCleanChatButton:
|
|
2504
|
+
hasCleanChatButton: d,
|
|
2501
2505
|
// Deprecated aliases, kept until hosts migrate to the is/has names above.
|
|
2502
|
-
initialOpen:
|
|
2503
|
-
closeButton:
|
|
2506
|
+
initialOpen: p,
|
|
2507
|
+
closeButton: c,
|
|
2504
2508
|
cleanChatButton: h,
|
|
2505
2509
|
proactiveMessageHideDelay: f = 5e3,
|
|
2506
2510
|
isAlwaysOpen: g = !1,
|
|
2507
|
-
hasCleanChatButtonOverride:
|
|
2511
|
+
hasCleanChatButtonOverride: R
|
|
2508
2512
|
}) {
|
|
2509
|
-
const { isMobile:
|
|
2513
|
+
const { isMobile: q, portalContainer: z } = Rn(s), {
|
|
2510
2514
|
userId: A,
|
|
2511
|
-
externalId:
|
|
2512
|
-
deviceId:
|
|
2513
|
-
apiClient:
|
|
2514
|
-
chatSettings:
|
|
2515
|
-
currentChat:
|
|
2516
|
-
messages:
|
|
2517
|
-
isReady:
|
|
2515
|
+
externalId: E,
|
|
2516
|
+
deviceId: O,
|
|
2517
|
+
apiClient: U,
|
|
2518
|
+
chatSettings: m,
|
|
2519
|
+
currentChat: y,
|
|
2520
|
+
messages: _,
|
|
2521
|
+
isReady: oe,
|
|
2518
2522
|
isChatClosed: ee,
|
|
2519
|
-
isChatActive:
|
|
2520
|
-
} =
|
|
2523
|
+
isChatActive: de
|
|
2524
|
+
} = Sn({
|
|
2521
2525
|
apiUrl: t,
|
|
2522
2526
|
appId: o,
|
|
2523
2527
|
initialUserId: r,
|
|
2524
2528
|
userName: n,
|
|
2525
2529
|
userData: a
|
|
2526
|
-
})
|
|
2530
|
+
});
|
|
2527
2531
|
K(() => {
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2532
|
+
}, [E, A, O, e]);
|
|
2533
|
+
const ae = uo({ chatProps: l, chatSettings: m }), D = u ?? p ?? !1, J = i ?? c ?? !0, N = d ?? h ?? !0, H = Ln(o), [re, le] = C(() => g ? !0 : ut(H) === "true" || q ? !1 : D ?? q), [G, ie] = C(!1);
|
|
2534
|
+
K(() => {
|
|
2535
|
+
if (!oe || G || (ie(!0), g)) return;
|
|
2536
|
+
const L = m?.initial_open;
|
|
2537
|
+
L != null && (q || L && ut(H) === "true" || le(L));
|
|
2531
2538
|
}, [
|
|
2532
|
-
|
|
2539
|
+
oe,
|
|
2533
2540
|
G,
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2541
|
+
m?.initial_open,
|
|
2542
|
+
q,
|
|
2543
|
+
H,
|
|
2537
2544
|
g
|
|
2538
2545
|
]);
|
|
2539
|
-
const Y =
|
|
2540
|
-
isEnabled:
|
|
2541
|
-
isOpen:
|
|
2542
|
-
}), { unlock: he } =
|
|
2543
|
-
(
|
|
2544
|
-
g || (he(),
|
|
2545
|
-
const lt = typeof
|
|
2546
|
-
return lt ? co(
|
|
2546
|
+
const Y = m?.initial_open ?? D, ce = m?.close_button ?? J, ve = R ?? m?.clean_chat_button ?? N, pe = m?.proactive_message_hide_delay ?? f, ne = $n({
|
|
2547
|
+
isEnabled: m?.notification_sound !== !1,
|
|
2548
|
+
isOpen: re
|
|
2549
|
+
}), { unlock: he } = ne, b = v(
|
|
2550
|
+
(L) => {
|
|
2551
|
+
g || (he(), le((ue) => {
|
|
2552
|
+
const lt = typeof L == "function" ? L(ue) : L;
|
|
2553
|
+
return lt ? co(H) : lo(H, "true", Bn), lt;
|
|
2547
2554
|
}));
|
|
2548
2555
|
},
|
|
2549
|
-
[
|
|
2550
|
-
), x =
|
|
2551
|
-
|
|
2552
|
-
), [
|
|
2553
|
-
|
|
2554
|
-
const [
|
|
2555
|
-
|
|
2556
|
-
const [
|
|
2557
|
-
|
|
2558
|
-
const
|
|
2559
|
-
|
|
2560
|
-
}, []), [
|
|
2561
|
-
text:
|
|
2562
|
-
isVisible:
|
|
2556
|
+
[H, g, he]
|
|
2557
|
+
), x = Ft(re, 400), [j, M] = C(
|
|
2558
|
+
l?.messages ?? []
|
|
2559
|
+
), [k, S] = C(y), [w, Z] = C(!1), [X, V] = C(_);
|
|
2560
|
+
X !== _ && (V(_), _.length > 0 && M(_));
|
|
2561
|
+
const [W, fe] = C(y);
|
|
2562
|
+
W !== y && (fe(y), y && S(y));
|
|
2563
|
+
const [Re, Ee] = C(ee);
|
|
2564
|
+
Re !== ee && (Ee(ee), ee && Z(!0));
|
|
2565
|
+
const ze = v(() => {
|
|
2566
|
+
Z(!0);
|
|
2567
|
+
}, []), [We, He] = C(!1), P = oe && m?.auto_display_welcome_message && m?.welcome_message ? m.welcome_message : "", se = {
|
|
2568
|
+
text: P,
|
|
2569
|
+
isVisible: P !== "" && !We,
|
|
2563
2570
|
autoHideDelay: pe
|
|
2564
|
-
}, { onSendMessage: we, onCleanMessages:
|
|
2571
|
+
}, { onSendMessage: we, onCleanMessages: te, onRateChat: Fe } = fn({
|
|
2565
2572
|
appId: o,
|
|
2566
2573
|
userId: A,
|
|
2567
2574
|
userName: n,
|
|
2568
2575
|
userData: a,
|
|
2569
|
-
externalId:
|
|
2570
|
-
deviceId:
|
|
2571
|
-
apiClient:
|
|
2572
|
-
chatSettings:
|
|
2573
|
-
setMessages:
|
|
2574
|
-
messages:
|
|
2575
|
-
currentChat:
|
|
2576
|
-
setCurrentChat:
|
|
2577
|
-
onChatClosed:
|
|
2578
|
-
isChatClosed:
|
|
2579
|
-
onAgentMessage:
|
|
2576
|
+
externalId: E,
|
|
2577
|
+
deviceId: O,
|
|
2578
|
+
apiClient: U,
|
|
2579
|
+
chatSettings: m,
|
|
2580
|
+
setMessages: M,
|
|
2581
|
+
messages: j,
|
|
2582
|
+
currentChat: k,
|
|
2583
|
+
setCurrentChat: S,
|
|
2584
|
+
onChatClosed: ze,
|
|
2585
|
+
isChatClosed: w,
|
|
2586
|
+
onAgentMessage: ne.notify
|
|
2580
2587
|
});
|
|
2581
2588
|
K(() => {
|
|
2582
|
-
|
|
2583
|
-
}, [
|
|
2584
|
-
|
|
2585
|
-
}, [
|
|
2586
|
-
const
|
|
2589
|
+
_.length > 0 && M(_);
|
|
2590
|
+
}, [_]), K(() => {
|
|
2591
|
+
y && S(y);
|
|
2592
|
+
}, [y]);
|
|
2593
|
+
const je = $(null);
|
|
2587
2594
|
K(() => {
|
|
2588
|
-
if (!
|
|
2589
|
-
const
|
|
2595
|
+
if (!k || !E || !U) return;
|
|
2596
|
+
const L = {
|
|
2590
2597
|
userId: A,
|
|
2591
2598
|
userName: n,
|
|
2592
2599
|
userData: a,
|
|
2593
|
-
externalId:
|
|
2594
|
-
deviceId:
|
|
2595
|
-
conversationId:
|
|
2596
|
-
},
|
|
2597
|
-
|
|
2600
|
+
externalId: E,
|
|
2601
|
+
deviceId: O,
|
|
2602
|
+
conversationId: k.id
|
|
2603
|
+
}, ue = JSON.stringify(L);
|
|
2604
|
+
je.current !== ue && (je.current = ue, U.identifyUser(L));
|
|
2598
2605
|
}, [
|
|
2599
|
-
|
|
2606
|
+
E,
|
|
2600
2607
|
A,
|
|
2601
2608
|
n,
|
|
2602
2609
|
a,
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2610
|
+
O,
|
|
2611
|
+
k,
|
|
2612
|
+
U
|
|
2606
2613
|
]);
|
|
2607
|
-
const
|
|
2608
|
-
|
|
2609
|
-
}, [
|
|
2614
|
+
const Te = v(() => {
|
|
2615
|
+
te(), Z(!1);
|
|
2616
|
+
}, [te]), me = v(() => {
|
|
2610
2617
|
He(!0);
|
|
2611
2618
|
}, []);
|
|
2612
2619
|
return {
|
|
2613
|
-
isReady:
|
|
2614
|
-
isChatActive:
|
|
2620
|
+
isReady: oe,
|
|
2621
|
+
isChatActive: de,
|
|
2615
2622
|
isInitiallyOpen: Y,
|
|
2616
|
-
hasCloseButton:
|
|
2617
|
-
hasCleanChatButton:
|
|
2618
|
-
isMobile:
|
|
2619
|
-
chatId:
|
|
2620
|
-
chatInterfaceProps:
|
|
2621
|
-
chatOpen:
|
|
2623
|
+
hasCloseButton: ce,
|
|
2624
|
+
hasCleanChatButton: ve,
|
|
2625
|
+
isMobile: q,
|
|
2626
|
+
chatId: k?.id ?? null,
|
|
2627
|
+
chatInterfaceProps: ae,
|
|
2628
|
+
chatOpen: re,
|
|
2622
2629
|
chatOpenDebounced: x,
|
|
2623
|
-
messages:
|
|
2630
|
+
messages: j,
|
|
2624
2631
|
portalContainer: z,
|
|
2625
2632
|
onSendMessage: we,
|
|
2626
|
-
setChatOpen:
|
|
2627
|
-
onCleanMessages:
|
|
2628
|
-
proactiveMessage:
|
|
2629
|
-
hideProactiveMessage:
|
|
2630
|
-
isChatClosed:
|
|
2631
|
-
onStartNewChat:
|
|
2632
|
-
onRateChat:
|
|
2633
|
+
setChatOpen: b,
|
|
2634
|
+
onCleanMessages: te,
|
|
2635
|
+
proactiveMessage: se,
|
|
2636
|
+
hideProactiveMessage: me,
|
|
2637
|
+
isChatClosed: w,
|
|
2638
|
+
onStartNewChat: Te,
|
|
2639
|
+
onRateChat: Fe,
|
|
2633
2640
|
unlockSound: he,
|
|
2634
|
-
isSoundMuted:
|
|
2635
|
-
toggleSound:
|
|
2641
|
+
isSoundMuted: ne.isMuted,
|
|
2642
|
+
toggleSound: ne.toggleMuted
|
|
2636
2643
|
};
|
|
2637
2644
|
}
|
|
2638
|
-
function
|
|
2645
|
+
function Zn(e) {
|
|
2639
2646
|
const [t, o] = C(0);
|
|
2640
2647
|
return K(() => {
|
|
2641
2648
|
const r = window.visualViewport;
|
|
@@ -2652,7 +2659,7 @@ function Bn(e) {
|
|
|
2652
2659
|
};
|
|
2653
2660
|
}, [e]), t;
|
|
2654
2661
|
}
|
|
2655
|
-
function
|
|
2662
|
+
function Kn(e) {
|
|
2656
2663
|
K(() => {
|
|
2657
2664
|
if (!e) return;
|
|
2658
2665
|
const { body: t } = document, o = window.scrollY, r = {
|
|
@@ -2667,122 +2674,127 @@ function Ln(e) {
|
|
|
2667
2674
|
};
|
|
2668
2675
|
}, [e]);
|
|
2669
2676
|
}
|
|
2670
|
-
function
|
|
2671
|
-
const [e, t] = C(!1), [o, r] = C(null), n = $(null), a = $(null),
|
|
2672
|
-
const i = (
|
|
2673
|
-
r(
|
|
2677
|
+
function Vn() {
|
|
2678
|
+
const [e, t] = C(!1), [o, r] = C(null), n = $(null), a = $(null), l = v((u) => {
|
|
2679
|
+
const i = (d) => {
|
|
2680
|
+
r(d), t(!0), a.current = null, n.current && clearTimeout(n.current), n.current = setTimeout(() => {
|
|
2674
2681
|
n.current = null;
|
|
2675
|
-
const
|
|
2676
|
-
|
|
2682
|
+
const p = a.current;
|
|
2683
|
+
p && i(p);
|
|
2677
2684
|
}, 1e3);
|
|
2678
2685
|
};
|
|
2679
|
-
n.current ? a.current =
|
|
2686
|
+
n.current ? a.current = u : i(u);
|
|
2680
2687
|
}, []), s = v(() => {
|
|
2681
2688
|
n.current && (clearTimeout(n.current), n.current = null), a.current = null, t(!1), r(null);
|
|
2682
2689
|
}, []);
|
|
2683
2690
|
return {
|
|
2684
2691
|
isVisible: e,
|
|
2685
2692
|
content: o,
|
|
2686
|
-
showCognition:
|
|
2693
|
+
showCognition: l,
|
|
2687
2694
|
hideCognition: s
|
|
2688
2695
|
};
|
|
2689
2696
|
}
|
|
2690
|
-
function
|
|
2697
|
+
function Wn({
|
|
2691
2698
|
children: e
|
|
2692
2699
|
}) {
|
|
2693
|
-
const t =
|
|
2694
|
-
return /* @__PURE__ */ I(
|
|
2695
|
-
}
|
|
2696
|
-
const
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2700
|
+
const t = Vn();
|
|
2701
|
+
return /* @__PURE__ */ I(Jt.Provider, { value: t, children: e });
|
|
2702
|
+
}
|
|
2703
|
+
const Hn = ({
|
|
2704
|
+
appId: e,
|
|
2705
|
+
children: t
|
|
2706
|
+
}) => {
|
|
2707
|
+
const [o, r] = C(null), [n, a] = C(!1), l = (c, h) => {
|
|
2708
|
+
r(c);
|
|
2709
|
+
}, p = {
|
|
2710
|
+
error: o,
|
|
2711
|
+
hideSdk: n,
|
|
2712
|
+
publishApiError: (c) => l(Yt(c)),
|
|
2713
|
+
publishError: (c) => l(c),
|
|
2714
|
+
publishNetworkError: () => a(!0),
|
|
2715
|
+
clearError: () => r(null)
|
|
2704
2716
|
};
|
|
2705
|
-
return /* @__PURE__ */ I(
|
|
2706
|
-
},
|
|
2707
|
-
function
|
|
2717
|
+
return /* @__PURE__ */ I(Gt.Provider, { value: p, children: t });
|
|
2718
|
+
}, Fn = 100;
|
|
2719
|
+
function Jn({
|
|
2708
2720
|
appId: e,
|
|
2709
2721
|
userId: t,
|
|
2710
2722
|
userName: o,
|
|
2711
2723
|
userData: r,
|
|
2712
2724
|
chatProps: n,
|
|
2713
2725
|
proactiveMessageHideDelay: a = 5e3,
|
|
2714
|
-
isMobile:
|
|
2726
|
+
isMobile: l,
|
|
2715
2727
|
hasCloseButton: s,
|
|
2716
|
-
hasCleanChatButton:
|
|
2728
|
+
hasCleanChatButton: u,
|
|
2717
2729
|
isInitiallyOpen: i,
|
|
2718
2730
|
// Deprecated aliases, resolved in useChat (new name wins).
|
|
2719
|
-
closeButton:
|
|
2720
|
-
cleanChatButton:
|
|
2721
|
-
initialOpen:
|
|
2731
|
+
closeButton: d,
|
|
2732
|
+
cleanChatButton: p,
|
|
2733
|
+
initialOpen: c,
|
|
2722
2734
|
INTERNAL_ONLY_CHAT_INTERFACE_ONLY: h = !1,
|
|
2723
2735
|
INTERNAL_ONLY_SHOW_CLEAN_CHAT_BUTTON: f = void 0,
|
|
2724
2736
|
INTERNAL_ONLY_BLOCK_STYLE: g = !1,
|
|
2725
|
-
INTERNAL_ONLY_FEATURE_MESSAGE_CLICK:
|
|
2726
|
-
INTERNAL_ONLY_FEATURE_CLEAR_CHAT_CLICK:
|
|
2737
|
+
INTERNAL_ONLY_FEATURE_MESSAGE_CLICK: R = void 0,
|
|
2738
|
+
INTERNAL_ONLY_FEATURE_CLEAR_CHAT_CLICK: q = void 0,
|
|
2727
2739
|
INTERNAL_ONLY_ON_CHAT_ID: z = void 0,
|
|
2728
2740
|
INTERNAL_ONLY_HIGHLIGHTED_MESSAGE_ID: A = null,
|
|
2729
|
-
INTERNAL_ONLY_ON_MESSAGE_SENT:
|
|
2730
|
-
INTERNAL_ONLY_SHOW_COPY_BUTTON:
|
|
2731
|
-
INTERNAL_ONLY_ENVIRONMENT:
|
|
2732
|
-
INTERNAL_ONLY_API_URL:
|
|
2741
|
+
INTERNAL_ONLY_ON_MESSAGE_SENT: E = void 0,
|
|
2742
|
+
INTERNAL_ONLY_SHOW_COPY_BUTTON: O = !1,
|
|
2743
|
+
INTERNAL_ONLY_ENVIRONMENT: U = "live",
|
|
2744
|
+
INTERNAL_ONLY_API_URL: m
|
|
2733
2745
|
}) {
|
|
2734
|
-
const { hideSdk:
|
|
2735
|
-
isReady:
|
|
2736
|
-
isChatActive:
|
|
2746
|
+
const { hideSdk: y } = Ke(), {
|
|
2747
|
+
isReady: _,
|
|
2748
|
+
isChatActive: oe,
|
|
2737
2749
|
isInitiallyOpen: ee,
|
|
2738
|
-
hasCloseButton:
|
|
2739
|
-
hasCleanChatButton:
|
|
2750
|
+
hasCloseButton: de,
|
|
2751
|
+
hasCleanChatButton: ae,
|
|
2740
2752
|
isMobile: D,
|
|
2741
2753
|
chatId: J,
|
|
2742
|
-
chatOpen:
|
|
2743
|
-
unlockSound:
|
|
2744
|
-
isSoundMuted:
|
|
2745
|
-
toggleSound:
|
|
2754
|
+
chatOpen: N,
|
|
2755
|
+
unlockSound: H,
|
|
2756
|
+
isSoundMuted: re,
|
|
2757
|
+
toggleSound: le,
|
|
2746
2758
|
chatInterfaceProps: G,
|
|
2747
|
-
chatOpenDebounced:
|
|
2759
|
+
chatOpenDebounced: ie,
|
|
2748
2760
|
messages: Y,
|
|
2749
|
-
portalContainer:
|
|
2750
|
-
onSendMessage:
|
|
2761
|
+
portalContainer: ce,
|
|
2762
|
+
onSendMessage: ve,
|
|
2751
2763
|
setChatOpen: pe,
|
|
2752
|
-
proactiveMessage:
|
|
2764
|
+
proactiveMessage: ne,
|
|
2753
2765
|
hideProactiveMessage: he,
|
|
2754
|
-
isChatClosed:
|
|
2766
|
+
isChatClosed: b,
|
|
2755
2767
|
onStartNewChat: x,
|
|
2756
|
-
onRateChat:
|
|
2757
|
-
} =
|
|
2758
|
-
environment:
|
|
2759
|
-
apiUrl:
|
|
2768
|
+
onRateChat: j
|
|
2769
|
+
} = Nn({
|
|
2770
|
+
environment: U,
|
|
2771
|
+
apiUrl: m,
|
|
2760
2772
|
appId: e,
|
|
2761
2773
|
userId: t,
|
|
2762
2774
|
userName: o,
|
|
2763
2775
|
userData: r,
|
|
2764
2776
|
chatProps: n,
|
|
2765
|
-
isMobile:
|
|
2777
|
+
isMobile: l,
|
|
2766
2778
|
isInitiallyOpen: i,
|
|
2767
2779
|
hasCloseButton: s,
|
|
2768
|
-
hasCleanChatButton:
|
|
2769
|
-
initialOpen:
|
|
2770
|
-
closeButton:
|
|
2771
|
-
cleanChatButton:
|
|
2780
|
+
hasCleanChatButton: u,
|
|
2781
|
+
initialOpen: c,
|
|
2782
|
+
closeButton: d,
|
|
2783
|
+
cleanChatButton: p,
|
|
2772
2784
|
proactiveMessageHideDelay: a,
|
|
2773
2785
|
// Embedded: the interface is the page content with no launcher to reopen
|
|
2774
2786
|
// it, so nothing (boot initial_open, closed-cookie, props) may close it.
|
|
2775
2787
|
isAlwaysOpen: h,
|
|
2776
2788
|
hasCleanChatButtonOverride: f
|
|
2777
|
-
}),
|
|
2789
|
+
}), M = $(void 0);
|
|
2778
2790
|
K(() => {
|
|
2779
|
-
!z ||
|
|
2791
|
+
!z || M.current === J || (M.current = J, z(J));
|
|
2780
2792
|
}, [J, z]);
|
|
2781
|
-
const
|
|
2782
|
-
|
|
2783
|
-
const
|
|
2784
|
-
if (
|
|
2785
|
-
const
|
|
2793
|
+
const k = $(null), [S, w] = C(!1), Z = Zn(D && N);
|
|
2794
|
+
Kn(D && N);
|
|
2795
|
+
const X = !_;
|
|
2796
|
+
if (y || X && !h || !X && !oe) return null;
|
|
2797
|
+
const V = () => /* @__PURE__ */ ke(
|
|
2786
2798
|
"div",
|
|
2787
2799
|
{
|
|
2788
2800
|
style: {
|
|
@@ -2806,12 +2818,12 @@ function Wn({
|
|
|
2806
2818
|
title: "Chat",
|
|
2807
2819
|
head: /* @__PURE__ */ I("style", { children: Je }),
|
|
2808
2820
|
style: {
|
|
2809
|
-
display:
|
|
2821
|
+
display: N || ie ? "block" : "none",
|
|
2810
2822
|
width: D ? "100vw" : "400px",
|
|
2811
2823
|
// 100dvh accounts for mobile browser chrome (e.g. address bar); 100vh fallback for older browsers
|
|
2812
2824
|
"--chat-mobile-viewport-height": "100dvh",
|
|
2813
2825
|
height: D ? "var(--chat-mobile-viewport-height, 100vh)" : "700px",
|
|
2814
|
-
maxHeight: D ? "var(--chat-mobile-viewport-height, 100vh)" : `calc(100% - ${
|
|
2826
|
+
maxHeight: D ? "var(--chat-mobile-viewport-height, 100vh)" : `calc(100% - ${Fn}px)`,
|
|
2815
2827
|
border: "none",
|
|
2816
2828
|
zIndex: 2147483e3,
|
|
2817
2829
|
position: "fixed",
|
|
@@ -2831,40 +2843,40 @@ function Wn({
|
|
|
2831
2843
|
zIndex: 0
|
|
2832
2844
|
} : {}
|
|
2833
2845
|
},
|
|
2834
|
-
children:
|
|
2846
|
+
children: X ? (
|
|
2835
2847
|
// Only reachable in embedded mode (the launcher returns null while
|
|
2836
2848
|
// booting): hold the widget's frame with a skeleton so a remount —
|
|
2837
2849
|
// project/environment switch in the host app — doesn't flash an
|
|
2838
2850
|
// empty hole where the chat was.
|
|
2839
|
-
/* @__PURE__ */ I(
|
|
2851
|
+
/* @__PURE__ */ I(Xt, { isOpen: !0, isMobile: D, skipAnimation: !0 })
|
|
2840
2852
|
) : /* @__PURE__ */ I(
|
|
2841
|
-
|
|
2853
|
+
Qt,
|
|
2842
2854
|
{
|
|
2843
2855
|
...G,
|
|
2844
2856
|
hasIntroAnimation: !h,
|
|
2845
2857
|
isDialog: !h,
|
|
2846
|
-
shouldFocusOnOpen:
|
|
2847
|
-
isTestMode:
|
|
2848
|
-
isOpen:
|
|
2849
|
-
keyboardInset:
|
|
2858
|
+
shouldFocusOnOpen: S,
|
|
2859
|
+
isTestMode: U === "test",
|
|
2860
|
+
isOpen: N,
|
|
2861
|
+
keyboardInset: Z,
|
|
2850
2862
|
messages: Y,
|
|
2851
|
-
onSendMessage: (
|
|
2852
|
-
onMessageClick:
|
|
2863
|
+
onSendMessage: (fe, Re) => (H(), E?.(fe), ve(fe, Re)),
|
|
2864
|
+
onMessageClick: R,
|
|
2853
2865
|
highlightedMessageId: A,
|
|
2854
2866
|
isMobile: D,
|
|
2855
|
-
hasCloseButton:
|
|
2856
|
-
hasCleanChatButton:
|
|
2857
|
-
hasCopyButton:
|
|
2858
|
-
isChatClosed:
|
|
2867
|
+
hasCloseButton: de,
|
|
2868
|
+
hasCleanChatButton: ae,
|
|
2869
|
+
hasCopyButton: O,
|
|
2870
|
+
isChatClosed: b,
|
|
2859
2871
|
onStartNewChat: x,
|
|
2860
|
-
onRateChat:
|
|
2861
|
-
isSoundMuted:
|
|
2862
|
-
onToggleSound:
|
|
2872
|
+
onRateChat: j,
|
|
2873
|
+
isSoundMuted: re,
|
|
2874
|
+
onToggleSound: le,
|
|
2863
2875
|
onClose: () => {
|
|
2864
|
-
|
|
2876
|
+
Mt(() => pe(!1)), no(k.current);
|
|
2865
2877
|
},
|
|
2866
2878
|
onCleanChat: () => {
|
|
2867
|
-
x(),
|
|
2879
|
+
x(), q?.();
|
|
2868
2880
|
}
|
|
2869
2881
|
}
|
|
2870
2882
|
)
|
|
@@ -2875,7 +2887,7 @@ function Wn({
|
|
|
2875
2887
|
{
|
|
2876
2888
|
className: "eloquentai-chat-launcher",
|
|
2877
2889
|
title: "Chat launcher",
|
|
2878
|
-
frameRef:
|
|
2890
|
+
frameRef: k,
|
|
2879
2891
|
head: /* @__PURE__ */ I("style", { children: Je }),
|
|
2880
2892
|
style: {
|
|
2881
2893
|
position: "fixed",
|
|
@@ -2886,16 +2898,16 @@ function Wn({
|
|
|
2886
2898
|
height: 48,
|
|
2887
2899
|
border: "none",
|
|
2888
2900
|
zIndex: D ? 2147482999 : 2147483e3,
|
|
2889
|
-
opacity:
|
|
2890
|
-
pointerEvents:
|
|
2891
|
-
transition:
|
|
2901
|
+
opacity: N ? 0 : 1,
|
|
2902
|
+
pointerEvents: N ? "none" : "auto",
|
|
2903
|
+
transition: N ? "opacity 100ms ease-in" : "opacity 200ms ease-out 320ms"
|
|
2892
2904
|
},
|
|
2893
2905
|
children: /* @__PURE__ */ I(
|
|
2894
2906
|
ao,
|
|
2895
2907
|
{
|
|
2896
|
-
isOpen:
|
|
2908
|
+
isOpen: N,
|
|
2897
2909
|
toggleBubble: () => {
|
|
2898
|
-
|
|
2910
|
+
w(!0), pe((fe) => !fe);
|
|
2899
2911
|
},
|
|
2900
2912
|
isDarkMode: G?.theme?.mode === "dark"
|
|
2901
2913
|
}
|
|
@@ -2916,22 +2928,22 @@ function Wn({
|
|
|
2916
2928
|
bottom: 24,
|
|
2917
2929
|
right: 17
|
|
2918
2930
|
},
|
|
2919
|
-
children: /* @__PURE__ */ I(
|
|
2931
|
+
children: /* @__PURE__ */ I(eo, { ...G?.theme ?? {}, children: /* @__PURE__ */ I(
|
|
2920
2932
|
"div",
|
|
2921
2933
|
{
|
|
2922
|
-
className:
|
|
2934
|
+
className: Be("eloq:w-full eloq:h-full", {
|
|
2923
2935
|
dark: G?.theme?.mode === "dark"
|
|
2924
2936
|
}),
|
|
2925
|
-
children:
|
|
2937
|
+
children: ne && !ee && /* @__PURE__ */ I(
|
|
2926
2938
|
so,
|
|
2927
2939
|
{
|
|
2928
|
-
message:
|
|
2929
|
-
isVisible:
|
|
2940
|
+
message: ne.text,
|
|
2941
|
+
isVisible: ne.isVisible,
|
|
2930
2942
|
onDismiss: he,
|
|
2931
2943
|
onMessageClick: () => {
|
|
2932
|
-
|
|
2944
|
+
w(!0), pe(!0), he();
|
|
2933
2945
|
},
|
|
2934
|
-
autoHideDelay:
|
|
2946
|
+
autoHideDelay: ne.autoHideDelay
|
|
2935
2947
|
}
|
|
2936
2948
|
)
|
|
2937
2949
|
}
|
|
@@ -2941,21 +2953,21 @@ function Wn({
|
|
|
2941
2953
|
]
|
|
2942
2954
|
}
|
|
2943
2955
|
);
|
|
2944
|
-
return /* @__PURE__ */ I(
|
|
2956
|
+
return /* @__PURE__ */ I(Tt, { children: g ? V() : ce ? /* @__PURE__ */ I(io, { container: ce, children: V() }) : null });
|
|
2945
2957
|
}
|
|
2946
|
-
function
|
|
2947
|
-
return /* @__PURE__ */ I(
|
|
2958
|
+
function Gn(e) {
|
|
2959
|
+
return /* @__PURE__ */ I(Hn, { appId: e.appId, children: /* @__PURE__ */ I(Wn, { children: /* @__PURE__ */ I(Jn, { ...e }) }) });
|
|
2948
2960
|
}
|
|
2949
|
-
function
|
|
2961
|
+
function oa(e, t) {
|
|
2950
2962
|
return ((r, n, a) => {
|
|
2951
|
-
const
|
|
2952
|
-
return
|
|
2953
|
-
})(
|
|
2963
|
+
const l = to.createRoot(n);
|
|
2964
|
+
return l.render(/* @__PURE__ */ I(r, { ...a })), l.unmount;
|
|
2965
|
+
})(Gn, e, t);
|
|
2954
2966
|
}
|
|
2955
2967
|
export {
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2968
|
+
Gn as Chat,
|
|
2969
|
+
Qt as ChatInterface,
|
|
2970
|
+
oa as renderChat,
|
|
2959
2971
|
tn as useRealtimeSocket
|
|
2960
2972
|
};
|
|
2961
2973
|
//# sourceMappingURL=index.mjs.map
|