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