@elevenlabs/convai-widget-core 0.0.9 → 0.0.12
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/Icon.d.ts +2 -0
- package/dist/contexts/server-location.d.ts +1 -2
- package/dist/index.js +1039 -983
- package/dist/types/config.d.ts +3 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4,12 +4,12 @@ var J = (e, t, n) => jo(e, typeof t != "symbol" ? t + "" : t, n);
|
|
|
4
4
|
import Yo from "preact-custom-element";
|
|
5
5
|
import { jsx as h, jsxs as P, Fragment as wt } from "preact/jsx-runtime";
|
|
6
6
|
import * as u from "preact/compat";
|
|
7
|
-
import _e, { useContext as Xo, createContext as
|
|
8
|
-
import { signal as
|
|
7
|
+
import _e, { useContext as Xo, createContext as he, useMemo as Ie, useRef as be, useEffect as Oe, memo as sr, useState as ke, useCallback as le, forwardRef as Ko, useLayoutEffect as Go } from "preact/compat";
|
|
8
|
+
import { signal as de, computed as xe, useSignal as ce, useComputed as Y, useSignalEffect as ze } from "@preact/signals";
|
|
9
9
|
import { Conversation as Zo } from "@elevenlabs/client";
|
|
10
10
|
import { clsx as j } from "clsx";
|
|
11
11
|
import { jsx as k, jsxs as _t, Fragment as mn } from "preact/compat/jsx-runtime";
|
|
12
|
-
function
|
|
12
|
+
function Je(e) {
|
|
13
13
|
return e ? e === "true" ? !0 : e === "false" ? !1 : null : null;
|
|
14
14
|
}
|
|
15
15
|
const rn = [
|
|
@@ -35,7 +35,7 @@ const rn = [
|
|
|
35
35
|
"transcript",
|
|
36
36
|
"text-input",
|
|
37
37
|
"text-contents"
|
|
38
|
-
], qo = '@import"https://fonts.googleapis.com/css2?family=Inter:wght@400,500&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-auto{pointer-events:auto}.\\!visible{visibility:visible!important}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.-bottom-3{bottom:-12px}.bottom-0{bottom:0}.bottom-20{bottom:80px}.left-0{left:0}.left-1\\/2{left:50%}.left-4{left:16px}.right-0{right:0}.top-0{top:0}.top-1\\/2{top:50%}.top-20{top:80px}.top-4{top:16px}.z-1{z-index:1}.z-10{z-index:10}.m-1{margin:4px}.-mx-0\\.5{margin-left:-2px;margin-right:-2px}.mx-1{margin-left:4px;margin-right:4px}.-mr-1\\.5{margin-right:-6px}.ml-auto{margin-left:auto}.mt-2{margin-top:8px}.block{display:block}.inline{display:inline}.\\!flex{display:flex!important}.flex{display:flex}.inline-flex{display:inline-flex}.contents{display:contents}.hidden{display:none}.h-11{height:44px}.h-16{height:64px}.h-4{height:16px}.h-48{height:192px}.h-5{height:20px}.h-6{height:24px}.h-9{height:36px}.h-\\[calc\\(100\\%-80px\\)\\]{height:calc(100% - 80px)}.h-full{height:100%}.h-screen{height:100vh}.max-h-\\[550px\\]{max-height:550px}.max-h-\\[8lh\\]{max-height:8lh}.max-h-\\[min\\(384px\\,var\\(--radix-select-content-available-height\\)\\)\\]{max-height:min(384px,var(--radix-select-content-available-height))}.min-h-min{min-height:-moz-min-content;min-height:min-content}.w-16{width:64px}.w-4{width:16px}.w-48{width:192px}.w-5{width:20px}.w-6{width:24px}.w-64{width:256px}.w-9{width:36px}.w-full{width:100%}.w-screen{width:100vw}.\\!min-w-60{min-width:240px!important}.min-w-0{min-width:0px}.min-w-60{min-width:240px}.min-w-9{min-width:36px}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.min-w-max{min-width:-moz-max-content;min-width:max-content}.min-w-min{min-width:-moz-min-content;min-width:min-content}.max-w-64{max-width:256px}.max-w-\\[400px\\]{max-width:400px}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.origin-bottom{transform-origin:bottom}.origin-bottom-left{transform-origin:bottom left}.origin-bottom-right{transform-origin:bottom right}.origin-top{transform-origin:top}.origin-top-left{transform-origin:top left}.origin-top-right{transform-origin:top right}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-\\[calc\\(var\\(--el-overlay-padding\\)\\)\\]{--tw-translate-y: calc(calc(var(--el-overlay-padding)) * -1);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1\\/2{--tw-translate-y: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\\[calc\\(var\\(--el-overlay-padding\\)\\)\\]{--tw-translate-y: calc(var(--el-overlay-padding));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-180{--tw-rotate: -180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x: 1.5;--tw-scale-y: 1.5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-90{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-\\[0\\.333\\]{--tw-scale-x: .333;--tw-scale-y: .333;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.gap-1{gap:4px}.gap-2{gap:8px}.gap-2\\.5{gap:10px}.gap-3{gap:12px}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.break-all{word-break:break-all}.rounded-\\[calc\\(var\\(--el-button-radius\\)\\+4px\\)\\]{border-radius:calc(var(--el-button-radius) + 4px)}.rounded-bubble{border-radius:var(--el-bubble-radius)}.rounded-button{border-radius:var(--el-button-radius)}.rounded-compact-sheet{border-radius:var(--el-compact-sheet-radius)}.rounded-dropdown-sheet{border-radius:var(--el-dropdown-sheet-radius)}.rounded-full{border-radius:9999px}.rounded-input{border-radius:var(--el-input-radius)}.rounded-sheet{border-radius:var(--el-sheet-radius)}.rounded-bl-\\[calc\\(var\\(--el-bubble-radius\\)\\/3\\)\\]{border-bottom-left-radius:calc(var(--el-bubble-radius) / 3)}.border{border-width:1px}.border-accent{border-color:var(--el-accent)}.border-base-border{border-color:var(--el-base-border)}.bg-accent{background-color:var(--el-accent)}.bg-base{background-color:var(--el-base)}.bg-base-active{background-color:var(--el-base-active)}.bg-base-border{background-color:var(--el-base-border)}.bg-base-hover{background-color:var(--el-base-hover)}.bg-cover{background-size:cover}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:4px}.p-1\\.5{padding:6px}.p-2{padding:8px}.p-3{padding:12px}.p-4{padding:16px}.px-1{padding-left:4px;padding-right:4px}.px-1\\.5{padding-left:6px;padding-right:6px}.px-2{padding-left:8px;padding-right:8px}.px-2\\.5{padding-left:10px;padding-right:10px}.px-3{padding-left:12px;padding-right:12px}.px-4{padding-left:16px;padding-right:16px}.px-8{padding-left:32px;padding-right:32px}.py-1\\.5{padding-top:6px;padding-bottom:6px}.py-2\\.5{padding-top:10px;padding-bottom:10px}.py-\\[calc\\(theme\\(spacing\\.2\\)-1px\\)\\]{padding-top:7px;padding-bottom:7px}.pb-1{padding-bottom:4px}.pb-3{padding-bottom:12px}.pl-16{padding-left:64px}.pr-16{padding-right:64px}.pr-3{padding-right:12px}.pt-1{padding-top:4px}.text-center{text-align:center}.text-\\[10px\\]{font-size:10px}.text-lg{font-size:18px;line-height:26px}.text-md{font-size:16px;line-height:24px}.text-sm{font-size:14px;line-height:20px}.text-xs{font-size:12px;line-height:16px}.font-medium{font-weight:500}.text-accent-primary{color:var(--el-accent-primary)}.text-base-error{color:var(--el-base-error)}.text-base-primary{color:var(--el-base-primary)}.text-base-subtle{color:var(--el-base-subtle)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-30{opacity:.3}.shadow-lg{--tw-shadow: 0 2px 40px 1px rgba(0, 0, 0, .12);--tw-shadow-colored: 0 2px 40px 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 2px 24px 1px rgba(0, 0, 0, .16);--tw-shadow-colored: 0 2px 24px 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{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)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[border-radius\\]{transition-property:border-radius;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[margin\\]{transition-property:margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[opacity\\,width\\,height\\,transform\\,flex-grow\\]{transition-property:opacity,width,height,transform,flex-grow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[transform\\,left\\,top\\]{transition-property:transform,left,top;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[transform\\,opacity\\]{transition-property:transform,opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.overlay{position:absolute;inset:var(--el-overlay-padding);right:calc(var(--el-overlay-padding) + var(--removed-body-scroll-bar-size, 0px))}.focus-ring{--tw-ring-color: var(--el-accent);--tw-ring-offset-width: 2px;--tw-ring-offset-color: var(--el-base)}.focus-ring:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.animate-text{background-image:linear-gradient(75deg,var(--el-base-primary),var(--el-base-subtle),var(--el-base-primary),var(--el-base-subtle));background-size:300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:TextAnimation 2s linear infinite}@keyframes TextAnimation{0%{background-position:0 0}to{background-position:100% 0}}.\\!terms h6,.terms h6{font-size:12px;line-height:16px;font-weight:500;color:var(--el-base-primary)}.\\!terms h5,.terms h5{font-size:14px;line-height:20px;font-weight:500;color:var(--el-base-primary)}.\\!terms h4,.terms h4{font-size:16px;line-height:24px;font-weight:500;color:var(--el-base-primary)}.\\!terms h3,.terms h3{font-size:18px;line-height:26px;font-weight:500;color:var(--el-base-primary)}.\\!terms h2,.terms h2{font-size:20px;line-height:28px;font-weight:500;color:var(--el-base-primary)}.\\!terms h2,.terms h2{font-size:24px;line-height:30px;font-weight:500;color:var(--el-base-primary)}.\\[field-sizing\\:content\\]{field-sizing:content}.\\[line-height\\:var\\(--el-overlay-padding\\)\\]{line-height:var(--el-overlay-padding)}.\\[overflow-wrap\\:break-word\\]{overflow-wrap:break-word}.dev-host,:host{pointer-events:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;font-size:16px;line-height:24px;color:var(--el-base-primary);font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;scrollbar-color:#e5e7eb transparent}.placeholder\\:text-base-subtle::-moz-placeholder{color:var(--el-base-subtle)}.placeholder\\:text-base-subtle::placeholder{color:var(--el-base-subtle)}.hover\\:border-accent-hover:hover{border-color:var(--el-accent-hover)}.hover\\:bg-accent-hover:hover{background-color:var(--el-accent-hover)}.hover\\:bg-base-hover:hover{background-color:var(--el-base-hover)}.hover\\:opacity-50:hover{opacity:.5}.focus-visible\\:underline-offset-2:focus-visible{text-underline-offset:2px}.focus-visible\\:opacity-100:focus-visible{opacity:1}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.active\\:border-accent-active:active{border-color:var(--el-accent-active)}.active\\:bg-accent-active:active{background-color:var(--el-accent-active)}.active\\:bg-base-active:active{background-color:var(--el-base-active)}.data-hidden\\:-translate-y-4[data-shown=false]{--tw-translate-y: -16px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-hidden\\:translate-y-2[data-shown=false]{--tw-translate-y: 8px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-hidden\\:scale-100[data-shown=false]{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-hidden\\:scale-75[data-shown=false]{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-hidden\\:scale-90[data-shown=false]{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-hidden\\:opacity-0[data-shown=false]{opacity:0}.data-\\[highlighted\\]\\:bg-base-active[data-highlighted]{background-color:var(--el-base-active)}', Dn = ["tiny", "compact", "full"];
|
|
38
|
+
], qo = '@import"https://fonts.googleapis.com/css2?family=Inter:wght@400,500&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-auto{pointer-events:auto}.\\!visible{visibility:visible!important}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.-bottom-3{bottom:-12px}.bottom-0{bottom:0}.bottom-1{bottom:4px}.bottom-20{bottom:80px}.left-0{left:0}.left-1\\/2{left:50%}.left-4{left:16px}.right-0{right:0}.right-1{right:4px}.top-0{top:0}.top-1\\/2{top:50%}.top-20{top:80px}.top-4{top:16px}.z-1{z-index:1}.z-10{z-index:10}.m-1{margin:4px}.-mx-0\\.5{margin-left:-2px;margin-right:-2px}.mx-1{margin-left:4px;margin-right:4px}.-mr-1\\.5{margin-right:-6px}.ml-auto{margin-left:auto}.mt-2{margin-top:8px}.block{display:block}.inline{display:inline}.\\!flex{display:flex!important}.flex{display:flex}.inline-flex{display:inline-flex}.contents{display:contents}.hidden{display:none}.h-11{height:44px}.h-16{height:64px}.h-4{height:16px}.h-48{height:192px}.h-5{height:20px}.h-6{height:24px}.h-7{height:28px}.h-9{height:36px}.h-\\[calc\\(100\\%-80px\\)\\]{height:calc(100% - 80px)}.h-full{height:100%}.h-screen{height:100vh}.max-h-\\[550px\\]{max-height:550px}.max-h-\\[8lh\\]{max-height:8lh}.max-h-\\[min\\(384px\\,var\\(--radix-select-content-available-height\\)\\)\\]{max-height:min(384px,var(--radix-select-content-available-height))}.min-h-min{min-height:-moz-min-content;min-height:min-content}.w-16{width:64px}.w-4{width:16px}.w-48{width:192px}.w-5{width:20px}.w-6{width:24px}.w-64{width:256px}.w-7{width:28px}.w-9{width:36px}.w-full{width:100%}.w-screen{width:100vw}.\\!min-w-60{min-width:240px!important}.min-w-0{min-width:0px}.min-w-60{min-width:240px}.min-w-9{min-width:36px}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.min-w-max{min-width:-moz-max-content;min-width:max-content}.min-w-min{min-width:-moz-min-content;min-width:min-content}.max-w-64{max-width:256px}.max-w-\\[400px\\]{max-width:400px}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.origin-bottom{transform-origin:bottom}.origin-bottom-left{transform-origin:bottom left}.origin-bottom-right{transform-origin:bottom right}.origin-top{transform-origin:top}.origin-top-left{transform-origin:top left}.origin-top-right{transform-origin:top right}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-\\[calc\\(var\\(--el-overlay-padding\\)\\)\\]{--tw-translate-y: calc(calc(var(--el-overlay-padding)) * -1);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1\\/2{--tw-translate-y: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\\[calc\\(var\\(--el-overlay-padding\\)\\)\\]{--tw-translate-y: calc(var(--el-overlay-padding));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-180{--tw-rotate: -180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x: 1.5;--tw-scale-y: 1.5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-90{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-\\[0\\.333\\]{--tw-scale-x: .333;--tw-scale-y: .333;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.gap-1{gap:4px}.gap-2{gap:8px}.gap-2\\.5{gap:10px}.gap-3{gap:12px}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.break-all{word-break:break-all}.rounded-\\[calc\\(var\\(--el-button-radius\\)\\+4px\\)\\]{border-radius:calc(var(--el-button-radius) + 4px)}.rounded-bubble{border-radius:var(--el-bubble-radius)}.rounded-button{border-radius:var(--el-button-radius)}.rounded-compact-sheet{border-radius:var(--el-compact-sheet-radius)}.rounded-dropdown-sheet{border-radius:var(--el-dropdown-sheet-radius)}.rounded-full{border-radius:9999px}.rounded-input{border-radius:var(--el-input-radius)}.rounded-sheet{border-radius:var(--el-sheet-radius)}.rounded-bl-\\[calc\\(var\\(--el-bubble-radius\\)\\/3\\)\\]{border-bottom-left-radius:calc(var(--el-bubble-radius) / 3)}.border{border-width:1px}.border-accent{border-color:var(--el-accent)}.border-base-border{border-color:var(--el-base-border)}.bg-accent{background-color:var(--el-accent)}.bg-base{background-color:var(--el-base)}.bg-base-active{background-color:var(--el-base-active)}.bg-base-border{background-color:var(--el-base-border)}.bg-base-hover{background-color:var(--el-base-hover)}.bg-cover{background-size:cover}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:4px}.p-1\\.5{padding:6px}.p-2{padding:8px}.p-3{padding:12px}.p-4{padding:16px}.px-1{padding-left:4px;padding-right:4px}.px-1\\.5{padding-left:6px;padding-right:6px}.px-2{padding-left:8px;padding-right:8px}.px-2\\.5{padding-left:10px;padding-right:10px}.px-3{padding-left:12px;padding-right:12px}.px-4{padding-left:16px;padding-right:16px}.px-8{padding-left:32px;padding-right:32px}.py-1\\.5{padding-top:6px;padding-bottom:6px}.py-2\\.5{padding-top:10px;padding-bottom:10px}.py-\\[calc\\(theme\\(spacing\\.2\\)-1px\\)\\]{padding-top:7px;padding-bottom:7px}.pb-1{padding-bottom:4px}.pb-3{padding-bottom:12px}.pl-16{padding-left:64px}.pr-16{padding-right:64px}.pr-3{padding-right:12px}.pr-9{padding-right:36px}.pt-1{padding-top:4px}.text-center{text-align:center}.text-\\[10px\\]{font-size:10px}.text-lg{font-size:18px;line-height:26px}.text-md{font-size:16px;line-height:24px}.text-sm{font-size:14px;line-height:20px}.text-xs{font-size:12px;line-height:16px}.font-medium{font-weight:500}.text-accent-primary{color:var(--el-accent-primary)}.text-base-error{color:var(--el-base-error)}.text-base-primary{color:var(--el-base-primary)}.text-base-subtle{color:var(--el-base-subtle)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-30{opacity:.3}.shadow-lg{--tw-shadow: 0 2px 40px 1px rgba(0, 0, 0, .12);--tw-shadow-colored: 0 2px 40px 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 2px 24px 1px rgba(0, 0, 0, .16);--tw-shadow-colored: 0 2px 24px 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{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)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[border-radius\\]{transition-property:border-radius;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[margin\\]{transition-property:margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[opacity\\,width\\,height\\,transform\\,flex-grow\\]{transition-property:opacity,width,height,transform,flex-grow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[transform\\,left\\,top\\]{transition-property:transform,left,top;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[transform\\,opacity\\]{transition-property:transform,opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.overlay{position:absolute;inset:var(--el-overlay-padding);right:calc(var(--el-overlay-padding) + var(--removed-body-scroll-bar-size, 0px))}.focus-ring{--tw-ring-color: var(--el-accent);--tw-ring-offset-width: 2px;--tw-ring-offset-color: var(--el-base)}.focus-ring:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.animate-text{background-image:linear-gradient(75deg,var(--el-base-primary),var(--el-base-subtle),var(--el-base-primary),var(--el-base-subtle));background-size:300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:TextAnimation 2s linear infinite}@keyframes TextAnimation{0%{background-position:0 0}to{background-position:100% 0}}.\\!terms h6,.terms h6{font-size:12px;line-height:16px;font-weight:500;color:var(--el-base-primary)}.\\!terms h5,.terms h5{font-size:14px;line-height:20px;font-weight:500;color:var(--el-base-primary)}.\\!terms h4,.terms h4{font-size:16px;line-height:24px;font-weight:500;color:var(--el-base-primary)}.\\!terms h3,.terms h3{font-size:18px;line-height:26px;font-weight:500;color:var(--el-base-primary)}.\\!terms h2,.terms h2{font-size:20px;line-height:28px;font-weight:500;color:var(--el-base-primary)}.\\!terms h2,.terms h2{font-size:24px;line-height:30px;font-weight:500;color:var(--el-base-primary)}.\\[field-sizing\\:content\\]{field-sizing:content}.\\[line-height\\:var\\(--el-overlay-padding\\)\\]{line-height:var(--el-overlay-padding)}.\\[overflow-wrap\\:break-word\\]{overflow-wrap:break-word}.dev-host,:host{pointer-events:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;font-size:16px;line-height:24px;color:var(--el-base-primary);font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;scrollbar-color:#e5e7eb transparent}.placeholder\\:text-base-subtle::-moz-placeholder{color:var(--el-base-subtle)}.placeholder\\:text-base-subtle::placeholder{color:var(--el-base-subtle)}.hover\\:border-accent-hover:hover{border-color:var(--el-accent-hover)}.hover\\:bg-accent-hover:hover{background-color:var(--el-accent-hover)}.hover\\:bg-base-hover:hover{background-color:var(--el-base-hover)}.hover\\:opacity-50:hover{opacity:.5}.focus-visible\\:underline-offset-2:focus-visible{text-underline-offset:2px}.focus-visible\\:opacity-100:focus-visible{opacity:1}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.active\\:border-accent-active:active{border-color:var(--el-accent-active)}.active\\:bg-accent-active:active{background-color:var(--el-accent-active)}.active\\:bg-base-active:active{background-color:var(--el-base-active)}.data-hidden\\:-translate-y-4[data-shown=false]{--tw-translate-y: -16px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-hidden\\:translate-y-2[data-shown=false]{--tw-translate-y: 8px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-hidden\\:scale-100[data-shown=false]{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-hidden\\:scale-75[data-shown=false]{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-hidden\\:scale-90[data-shown=false]{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-hidden\\:opacity-0[data-shown=false]{opacity:0}.data-\\[highlighted\\]\\:bg-base-active[data-highlighted]{background-color:var(--el-base-active)}', Dn = ["tiny", "compact", "full"];
|
|
39
39
|
function Qo(e) {
|
|
40
40
|
return Dn.includes(e) ? e : Dn[0];
|
|
41
41
|
}
|
|
@@ -54,6 +54,7 @@ const lr = {
|
|
|
54
54
|
main_label: "Need help?",
|
|
55
55
|
start_call: "Start a call",
|
|
56
56
|
start_chat: "Start a chat",
|
|
57
|
+
send_message: "Send",
|
|
57
58
|
new_call: "New call",
|
|
58
59
|
end_call: "End",
|
|
59
60
|
mute_microphone: "Mute microphone",
|
|
@@ -102,7 +103,20 @@ const lr = {
|
|
|
102
103
|
}, na = Object.keys(
|
|
103
104
|
cr
|
|
104
105
|
);
|
|
105
|
-
function
|
|
106
|
+
function ra(e = "us") {
|
|
107
|
+
switch (e) {
|
|
108
|
+
case "eu-residency":
|
|
109
|
+
case "in-residency":
|
|
110
|
+
case "us":
|
|
111
|
+
case "global":
|
|
112
|
+
return e;
|
|
113
|
+
default:
|
|
114
|
+
return console.warn(
|
|
115
|
+
`[ConversationalAI] Invalid server-location: ${e}. Defaulting to "us"`
|
|
116
|
+
), "us";
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function ve(e) {
|
|
106
120
|
const t = Xo(e);
|
|
107
121
|
if (t == null)
|
|
108
122
|
throw new Error(
|
|
@@ -110,14 +124,14 @@ function he(e) {
|
|
|
110
124
|
);
|
|
111
125
|
return t;
|
|
112
126
|
}
|
|
113
|
-
const ur =
|
|
114
|
-
function
|
|
127
|
+
const ur = he(null);
|
|
128
|
+
function oa({
|
|
115
129
|
value: e,
|
|
116
130
|
children: t
|
|
117
131
|
}) {
|
|
118
|
-
const n =
|
|
132
|
+
const n = Ie(
|
|
119
133
|
() => Object.fromEntries(
|
|
120
|
-
rn.map((r) => [r,
|
|
134
|
+
rn.map((r) => [r, de(e[r])])
|
|
121
135
|
),
|
|
122
136
|
[]
|
|
123
137
|
);
|
|
@@ -125,43 +139,38 @@ function ra({
|
|
|
125
139
|
n[r].value = e[r];
|
|
126
140
|
}), /* @__PURE__ */ h(ur.Provider, { value: n, children: t });
|
|
127
141
|
}
|
|
128
|
-
function
|
|
129
|
-
return
|
|
142
|
+
function aa() {
|
|
143
|
+
return ve(ur);
|
|
130
144
|
}
|
|
131
145
|
function H(e) {
|
|
132
|
-
return
|
|
146
|
+
return aa()[e];
|
|
133
147
|
}
|
|
134
|
-
const dr =
|
|
135
|
-
function
|
|
148
|
+
const dr = he(null);
|
|
149
|
+
function ia({
|
|
136
150
|
children: e
|
|
137
151
|
}) {
|
|
138
|
-
const t = H("server-location"), n =
|
|
139
|
-
const r = xe(() =>
|
|
152
|
+
const t = H("server-location"), n = Ie(() => {
|
|
153
|
+
const r = xe(() => ra(t.value)), o = {
|
|
154
|
+
us: "https://api.us.elevenlabs.io",
|
|
155
|
+
"eu-residency": "https://api.eu.residency.elevenlabs.io",
|
|
156
|
+
"in-residency": "https://api.in.residency.elevenlabs.io",
|
|
157
|
+
global: "https://api.elevenlabs.io"
|
|
158
|
+
}, a = {
|
|
159
|
+
us: "wss://api.us.elevenlabs.io",
|
|
160
|
+
"eu-residency": "wss://api.eu.residency.elevenlabs.io",
|
|
161
|
+
"in-residency": "wss://api.in.residency.elevenlabs.io",
|
|
162
|
+
global: "wss://api.elevenlabs.io"
|
|
163
|
+
};
|
|
140
164
|
return {
|
|
141
165
|
location: r,
|
|
142
|
-
serverUrl: xe(
|
|
143
|
-
|
|
144
|
-
),
|
|
145
|
-
webSocketUrl: xe(
|
|
146
|
-
() => r.value === "us" ? "wss://api.us.elevenlabs.io" : "wss://api.elevenlabs.io"
|
|
147
|
-
)
|
|
166
|
+
serverUrl: xe(() => o[r.value]),
|
|
167
|
+
webSocketUrl: xe(() => a[r.value])
|
|
148
168
|
};
|
|
149
169
|
}, []);
|
|
150
170
|
return /* @__PURE__ */ h(dr.Provider, { value: n, children: e });
|
|
151
171
|
}
|
|
152
172
|
function fr() {
|
|
153
|
-
return
|
|
154
|
-
}
|
|
155
|
-
function ia(e = "us") {
|
|
156
|
-
switch (e) {
|
|
157
|
-
case "us":
|
|
158
|
-
case "global":
|
|
159
|
-
return e;
|
|
160
|
-
default:
|
|
161
|
-
return console.warn(
|
|
162
|
-
`[ConversationalAI] Invalid server-location: ${e}. Defaulting to "us"`
|
|
163
|
-
), "us";
|
|
164
|
-
}
|
|
173
|
+
return ve(dr);
|
|
165
174
|
}
|
|
166
175
|
const pt = {
|
|
167
176
|
en: { name: "English", flagCode: "us", languageCode: "en" },
|
|
@@ -204,11 +213,11 @@ const pt = {
|
|
|
204
213
|
function Yt(e) {
|
|
205
214
|
return Object.keys(pt).includes(e ?? "");
|
|
206
215
|
}
|
|
207
|
-
const pr =
|
|
216
|
+
const pr = he(null);
|
|
208
217
|
function sa({
|
|
209
218
|
children: e
|
|
210
219
|
}) {
|
|
211
|
-
const t = q(), n = H("language"), r = H("override-language"), o =
|
|
220
|
+
const t = q(), n = H("language"), r = H("override-language"), o = ce(
|
|
212
221
|
n.peek() ?? t.peek().language
|
|
213
222
|
), a = Y(
|
|
214
223
|
() => (t.value.supported_language_overrides ?? []).filter(
|
|
@@ -216,7 +225,7 @@ function sa({
|
|
|
216
225
|
)
|
|
217
226
|
), i = Y(
|
|
218
227
|
() => a.value.map((l) => pt[l]).sort((l, c) => l.name.localeCompare(c.name))
|
|
219
|
-
), s =
|
|
228
|
+
), s = Ie(
|
|
220
229
|
() => ({
|
|
221
230
|
language: xe(
|
|
222
231
|
() => Yt(r.value) ? pt[r.value] : Yt(o.value) && a.value.includes(o.value) ? pt[o.value] : pt[t.value.language]
|
|
@@ -232,13 +241,13 @@ function sa({
|
|
|
232
241
|
return /* @__PURE__ */ h(pr.Provider, { value: s, children: e });
|
|
233
242
|
}
|
|
234
243
|
function rt() {
|
|
235
|
-
return
|
|
244
|
+
return ve(pr);
|
|
236
245
|
}
|
|
237
|
-
const hr =
|
|
246
|
+
const hr = he(null);
|
|
238
247
|
function la({ children: e }) {
|
|
239
248
|
const t = q(), n = Y(
|
|
240
249
|
() => t.value.mic_muting_enabled ?? !1
|
|
241
|
-
), r =
|
|
250
|
+
), r = ce(!1), o = Ie(
|
|
242
251
|
() => ({
|
|
243
252
|
isMuted: xe(
|
|
244
253
|
() => n.value ? r.value : (
|
|
@@ -257,9 +266,9 @@ function la({ children: e }) {
|
|
|
257
266
|
return /* @__PURE__ */ h(hr.Provider, { value: o, children: e });
|
|
258
267
|
}
|
|
259
268
|
function vr() {
|
|
260
|
-
return
|
|
269
|
+
return ve(hr);
|
|
261
270
|
}
|
|
262
|
-
const gr =
|
|
271
|
+
const gr = he(null);
|
|
263
272
|
function ca({
|
|
264
273
|
children: e
|
|
265
274
|
}) {
|
|
@@ -275,7 +284,7 @@ function ca({
|
|
|
275
284
|
voiceId: o.value
|
|
276
285
|
},
|
|
277
286
|
conversation: {
|
|
278
|
-
textOnly:
|
|
287
|
+
textOnly: Je(a.value) ?? void 0
|
|
279
288
|
}
|
|
280
289
|
})), s = H("dynamic-variables"), l = Y(() => {
|
|
281
290
|
if (s.value)
|
|
@@ -286,15 +295,15 @@ function ca({
|
|
|
286
295
|
`[ConversationalAI] Cannot parse dynamic-variables: ${m == null ? void 0 : m.message}`
|
|
287
296
|
);
|
|
288
297
|
}
|
|
289
|
-
}), { webSocketUrl: c } = fr(),
|
|
298
|
+
}), { webSocketUrl: c } = fr(), f = H("agent-id"), p = H("signed-url"), g = wn(), w = Y(() => {
|
|
290
299
|
const m = {
|
|
291
300
|
dynamicVariables: l.value,
|
|
292
301
|
overrides: i.value,
|
|
293
302
|
connectionDelay: { default: 300 },
|
|
294
303
|
textOnly: g.value
|
|
295
304
|
};
|
|
296
|
-
return
|
|
297
|
-
agentId:
|
|
305
|
+
return f.value ? {
|
|
306
|
+
agentId: f.value,
|
|
298
307
|
origin: c.value,
|
|
299
308
|
...m
|
|
300
309
|
} : p.value ? {
|
|
@@ -304,21 +313,21 @@ function ca({
|
|
|
304
313
|
"[ConversationalAI] Either agent-id or signed-url is required"
|
|
305
314
|
), null);
|
|
306
315
|
});
|
|
307
|
-
return
|
|
316
|
+
return w.value ? /* @__PURE__ */ h(
|
|
308
317
|
gr.Provider,
|
|
309
318
|
{
|
|
310
|
-
value:
|
|
319
|
+
value: w,
|
|
311
320
|
children: e
|
|
312
321
|
}
|
|
313
322
|
) : null;
|
|
314
323
|
}
|
|
315
324
|
function ua() {
|
|
316
|
-
return
|
|
325
|
+
return ve(gr);
|
|
317
326
|
}
|
|
318
|
-
const mr =
|
|
327
|
+
const mr = he(null);
|
|
319
328
|
function da({ children: e }) {
|
|
320
|
-
const t = q(), n =
|
|
321
|
-
const r = t.peek().terms_key, o = r ? !!localStorage.getItem(r) : !1, a =
|
|
329
|
+
const t = q(), n = Ie(() => {
|
|
330
|
+
const r = t.peek().terms_key, o = r ? !!localStorage.getItem(r) : !1, a = de(!1), i = de(o), s = xe(
|
|
322
331
|
() => !t.value.terms_html || i.value
|
|
323
332
|
);
|
|
324
333
|
let l = [];
|
|
@@ -331,11 +340,11 @@ function da({ children: e }) {
|
|
|
331
340
|
acceptTerms: () => {
|
|
332
341
|
i.value = !0, a.value = !1;
|
|
333
342
|
const c = t.peek().terms_key;
|
|
334
|
-
c && localStorage.setItem(c, "true"), l.forEach((
|
|
343
|
+
c && localStorage.setItem(c, "true"), l.forEach((f) => f.resolve()), l = [];
|
|
335
344
|
},
|
|
336
345
|
requestTerms: async () => {
|
|
337
|
-
s.peek() || (a.value = !0, await new Promise((c,
|
|
338
|
-
l.push({ resolve: c, reject:
|
|
346
|
+
s.peek() || (a.value = !0, await new Promise((c, f) => {
|
|
347
|
+
l.push({ resolve: c, reject: f });
|
|
339
348
|
}));
|
|
340
349
|
}
|
|
341
350
|
};
|
|
@@ -343,9 +352,9 @@ function da({ children: e }) {
|
|
|
343
352
|
return /* @__PURE__ */ h(mr.Provider, { value: n, children: e });
|
|
344
353
|
}
|
|
345
354
|
function Bt() {
|
|
346
|
-
return
|
|
355
|
+
return ve(mr);
|
|
347
356
|
}
|
|
348
|
-
const wr =
|
|
357
|
+
const wr = he(null);
|
|
349
358
|
function fa({ children: e }) {
|
|
350
359
|
const t = pa();
|
|
351
360
|
return ze(() => {
|
|
@@ -365,10 +374,10 @@ function fa({ children: e }) {
|
|
|
365
374
|
}), /* @__PURE__ */ h(wr.Provider, { value: t, children: e });
|
|
366
375
|
}
|
|
367
376
|
function ne() {
|
|
368
|
-
return
|
|
377
|
+
return ve(wr);
|
|
369
378
|
}
|
|
370
379
|
function pa() {
|
|
371
|
-
const e =
|
|
380
|
+
const e = be(null), t = be(null), n = q(), r = xr(), o = Bt(), a = ua(), { isMuted: i } = vr();
|
|
372
381
|
return ze(() => {
|
|
373
382
|
var l;
|
|
374
383
|
const s = i.value;
|
|
@@ -376,18 +385,18 @@ function pa() {
|
|
|
376
385
|
}), Oe(() => () => {
|
|
377
386
|
var s;
|
|
378
387
|
(s = e.current) == null || s.endSession();
|
|
379
|
-
}, []),
|
|
380
|
-
const s =
|
|
388
|
+
}, []), Ie(() => {
|
|
389
|
+
const s = de("disconnected"), l = xe(() => s.value === "disconnected"), c = de("listening"), f = xe(() => c.value === "speaking"), p = de(null), g = de(null), w = de(!1), m = de([]), d = de(0), v = de(null);
|
|
381
390
|
return {
|
|
382
391
|
status: s,
|
|
383
|
-
isSpeaking:
|
|
392
|
+
isSpeaking: f,
|
|
384
393
|
mode: c,
|
|
385
394
|
isDisconnected: l,
|
|
386
395
|
lastId: g,
|
|
387
396
|
error: p,
|
|
388
|
-
canSendFeedback:
|
|
389
|
-
conversationIndex:
|
|
390
|
-
conversationTextOnly:
|
|
397
|
+
canSendFeedback: w,
|
|
398
|
+
conversationIndex: d,
|
|
399
|
+
conversationTextOnly: v,
|
|
391
400
|
transcript: m,
|
|
392
401
|
startSession: async (b, x) => {
|
|
393
402
|
var S, E;
|
|
@@ -405,13 +414,13 @@ function pa() {
|
|
|
405
414
|
T
|
|
406
415
|
);
|
|
407
416
|
}
|
|
408
|
-
|
|
417
|
+
v.value = y.textOnly ?? !1, m.value = x ? [
|
|
409
418
|
{
|
|
410
419
|
type: "message",
|
|
411
420
|
role: "user",
|
|
412
421
|
message: x,
|
|
413
422
|
isText: !0,
|
|
414
|
-
conversationIndex:
|
|
423
|
+
conversationIndex: d.peek()
|
|
415
424
|
}
|
|
416
425
|
] : [];
|
|
417
426
|
try {
|
|
@@ -424,33 +433,33 @@ function pa() {
|
|
|
424
433
|
s.value = C.status;
|
|
425
434
|
},
|
|
426
435
|
onCanSendFeedbackChange: (C) => {
|
|
427
|
-
|
|
436
|
+
w.value = C.canSendFeedback;
|
|
428
437
|
},
|
|
429
|
-
onMessage: ({ source: C, message:
|
|
430
|
-
|
|
438
|
+
onMessage: ({ source: C, message: I }) => {
|
|
439
|
+
v.peek() === !0 && C === "ai" && I === r.peek() || (m.value = [
|
|
431
440
|
...m.value,
|
|
432
441
|
{
|
|
433
442
|
type: "message",
|
|
434
443
|
role: C,
|
|
435
|
-
message:
|
|
444
|
+
message: I,
|
|
436
445
|
isText: !1,
|
|
437
|
-
conversationIndex:
|
|
446
|
+
conversationIndex: d.peek()
|
|
438
447
|
}
|
|
439
448
|
]);
|
|
440
449
|
},
|
|
441
450
|
onDisconnect: (C) => {
|
|
442
|
-
|
|
451
|
+
v.value = null, m.value = [
|
|
443
452
|
...m.value,
|
|
444
453
|
C.reason === "error" ? {
|
|
445
454
|
type: "error",
|
|
446
455
|
message: C.message,
|
|
447
|
-
conversationIndex:
|
|
456
|
+
conversationIndex: d.peek()
|
|
448
457
|
} : {
|
|
449
458
|
type: "disconnection",
|
|
450
459
|
role: C.reason === "user" ? "user" : "ai",
|
|
451
|
-
conversationIndex:
|
|
460
|
+
conversationIndex: d.peek()
|
|
452
461
|
}
|
|
453
|
-
],
|
|
462
|
+
], d.value++, C.reason === "error" && (p.value = C.message, console.error(
|
|
454
463
|
"[ConversationalAI] Disconnected due to an error:",
|
|
455
464
|
C.message
|
|
456
465
|
));
|
|
@@ -468,7 +477,7 @@ function pa() {
|
|
|
468
477
|
{
|
|
469
478
|
type: "error",
|
|
470
479
|
message: C,
|
|
471
|
-
conversationIndex:
|
|
480
|
+
conversationIndex: d.peek()
|
|
472
481
|
}
|
|
473
482
|
];
|
|
474
483
|
} finally {
|
|
@@ -500,7 +509,7 @@ function pa() {
|
|
|
500
509
|
role: "user",
|
|
501
510
|
message: b,
|
|
502
511
|
isText: !0,
|
|
503
|
-
conversationIndex:
|
|
512
|
+
conversationIndex: d.peek()
|
|
504
513
|
}
|
|
505
514
|
];
|
|
506
515
|
},
|
|
@@ -523,11 +532,11 @@ function ha(e, t) {
|
|
|
523
532
|
return console.error("[ConversationalAI] Could not trigger call event:", n), t;
|
|
524
533
|
}
|
|
525
534
|
}
|
|
526
|
-
const br =
|
|
535
|
+
const br = he(
|
|
527
536
|
null
|
|
528
537
|
);
|
|
529
538
|
function va({ children: e }) {
|
|
530
|
-
const { serverUrl: t } = fr(), n = H("agent-id"), r = H("override-config"), o =
|
|
539
|
+
const { serverUrl: t } = fr(), n = H("agent-id"), r = H("override-config"), o = ce(null);
|
|
531
540
|
ze(() => {
|
|
532
541
|
if (r.value)
|
|
533
542
|
try {
|
|
@@ -545,40 +554,40 @@ function va({ children: e }) {
|
|
|
545
554
|
o.value = null;
|
|
546
555
|
return;
|
|
547
556
|
}
|
|
548
|
-
const
|
|
549
|
-
return ga(n.value, t.value,
|
|
550
|
-
|
|
557
|
+
const w = new AbortController();
|
|
558
|
+
return ga(n.value, t.value, w.signal).then((m) => {
|
|
559
|
+
w.signal.aborted || (o.value = m);
|
|
551
560
|
}).catch((m) => {
|
|
552
561
|
console.error(
|
|
553
562
|
`[ConversationalAI] Cannot fetch config for agent ${n.value}: ${m == null ? void 0 : m.message}`
|
|
554
|
-
),
|
|
563
|
+
), w.signal.aborted || (o.value = null);
|
|
555
564
|
}), () => {
|
|
556
|
-
|
|
565
|
+
w.abort();
|
|
557
566
|
};
|
|
558
567
|
});
|
|
559
|
-
const a = H("variant"), i = H("placement"), s = H("terms-key"), l = H("mic-muting"), c = H("transcript"),
|
|
568
|
+
const a = H("variant"), i = H("placement"), s = H("terms-key"), l = H("mic-muting"), c = H("transcript"), f = H("text-input"), p = H("override-text-only"), g = Y(() => {
|
|
560
569
|
if (!o.value)
|
|
561
570
|
return null;
|
|
562
|
-
const
|
|
571
|
+
const w = a.value ?? o.value.variant, m = i.value ?? o.value.placement, d = s.value ?? o.value.terms_key, v = Je(p.value) ?? o.value.text_only ?? !1, b = Je(l.value) ?? o.value.mic_muting_enabled, x = Je(c.value) ?? o.value.transcript_enabled, y = Je(f.value) ?? o.value.text_input_enabled;
|
|
563
572
|
return {
|
|
564
573
|
...o.value,
|
|
565
|
-
variant: Qo(
|
|
574
|
+
variant: Qo(w),
|
|
566
575
|
placement: ea(m),
|
|
567
|
-
terms_key:
|
|
568
|
-
mic_muting_enabled: !
|
|
569
|
-
transcript_enabled:
|
|
570
|
-
text_input_enabled:
|
|
576
|
+
terms_key: d,
|
|
577
|
+
mic_muting_enabled: !v && b,
|
|
578
|
+
transcript_enabled: v || x,
|
|
579
|
+
text_input_enabled: v || y
|
|
571
580
|
};
|
|
572
581
|
});
|
|
573
582
|
return g.value ? /* @__PURE__ */ h(br.Provider, { value: g, children: e }) : null;
|
|
574
583
|
}
|
|
575
584
|
function q() {
|
|
576
|
-
return
|
|
585
|
+
return ve(br);
|
|
577
586
|
}
|
|
578
587
|
function wn() {
|
|
579
588
|
const e = H("override-text-only"), t = q();
|
|
580
589
|
return Y(
|
|
581
|
-
() =>
|
|
590
|
+
() => Je(e.value) ?? t.value.text_only ?? !1
|
|
582
591
|
);
|
|
583
592
|
}
|
|
584
593
|
function zt() {
|
|
@@ -626,7 +635,7 @@ function wa(e) {
|
|
|
626
635
|
function ba(e) {
|
|
627
636
|
return typeof e == "number" ? `${e}px` : e;
|
|
628
637
|
}
|
|
629
|
-
const yr =
|
|
638
|
+
const yr = he(null);
|
|
630
639
|
function xa({ children: e }) {
|
|
631
640
|
const t = q(), { language: n } = rt(), r = H("text-contents"), o = Y(() => {
|
|
632
641
|
try {
|
|
@@ -639,13 +648,13 @@ function xa({ children: e }) {
|
|
|
639
648
|
console.error("[ConversationalAI] Cannot parse text-contents:", i);
|
|
640
649
|
}
|
|
641
650
|
return {};
|
|
642
|
-
}), a =
|
|
651
|
+
}), a = Ie(() => Object.fromEntries(
|
|
643
652
|
ta.map((i) => [
|
|
644
653
|
i,
|
|
645
654
|
xe(
|
|
646
655
|
() => {
|
|
647
|
-
var s, l, c,
|
|
648
|
-
return o.value[i] ?? ((c = (l = (s = t.value.language_presets) == null ? void 0 : s[n.value.languageCode]) == null ? void 0 : l.text_contents) == null ? void 0 : c[i]) ?? ((
|
|
656
|
+
var s, l, c, f;
|
|
657
|
+
return o.value[i] ?? ((c = (l = (s = t.value.language_presets) == null ? void 0 : s[n.value.languageCode]) == null ? void 0 : l.text_contents) == null ? void 0 : c[i]) ?? ((f = t.value.text_contents) == null ? void 0 : f[i]) ?? lr[i];
|
|
649
658
|
}
|
|
650
659
|
)
|
|
651
660
|
])
|
|
@@ -653,11 +662,11 @@ function xa({ children: e }) {
|
|
|
653
662
|
return /* @__PURE__ */ h(yr.Provider, { value: a, children: e });
|
|
654
663
|
}
|
|
655
664
|
function re() {
|
|
656
|
-
return
|
|
665
|
+
return ve(yr);
|
|
657
666
|
}
|
|
658
|
-
const Cr =
|
|
667
|
+
const Cr = he(null);
|
|
659
668
|
function ya({ children: e }) {
|
|
660
|
-
const t = q(), n = H("avatar-image-url"), r = H("avatar-orb-color-1"), o = H("avatar-orb-color-2"), a =
|
|
669
|
+
const t = q(), n = H("avatar-image-url"), r = H("avatar-orb-color-1"), o = H("avatar-orb-color-2"), a = ce(""), i = Y(() => n.value ? {
|
|
661
670
|
type: "image",
|
|
662
671
|
url: n.value
|
|
663
672
|
} : r.value && o.value ? {
|
|
@@ -673,25 +682,25 @@ function ya({ children: e }) {
|
|
|
673
682
|
case "image":
|
|
674
683
|
return i.value.url;
|
|
675
684
|
}
|
|
676
|
-
}), l =
|
|
685
|
+
}), l = Ie(() => ({ config: i, previewUrl: s, canvasUrl: a }), []);
|
|
677
686
|
return /* @__PURE__ */ h(Cr.Provider, { value: l, children: e });
|
|
678
687
|
}
|
|
679
688
|
function bn() {
|
|
680
|
-
return
|
|
689
|
+
return ve(Cr);
|
|
681
690
|
}
|
|
682
|
-
const Sr =
|
|
691
|
+
const Sr = he(null);
|
|
683
692
|
function yt({ children: e, ...t }) {
|
|
684
|
-
const [n, r] =
|
|
693
|
+
const [n, r] = ke(null);
|
|
685
694
|
return /* @__PURE__ */ h("div", { ref: r, ...t, children: n && /* @__PURE__ */ h(Sr.Provider, { value: n, children: e }) });
|
|
686
695
|
}
|
|
687
696
|
function Ca() {
|
|
688
|
-
return
|
|
697
|
+
return ve(Sr);
|
|
689
698
|
}
|
|
690
699
|
function xn(e) {
|
|
691
700
|
return e && typeof e == "object" && "peek" in e;
|
|
692
701
|
}
|
|
693
702
|
function Sa(e) {
|
|
694
|
-
const t = xn(e), n =
|
|
703
|
+
const t = xn(e), n = ce(t ? e.peek() : e);
|
|
695
704
|
return t ? e : (n.value = e, n);
|
|
696
705
|
}
|
|
697
706
|
function Er(e) {
|
|
@@ -729,8 +738,8 @@ function vt(e) {
|
|
|
729
738
|
const t = /* @__PURE__ */ ka(e), n = u.forwardRef((r, o) => {
|
|
730
739
|
const { children: a, ...i } = r, s = u.Children.toArray(a), l = s.find(Aa);
|
|
731
740
|
if (l) {
|
|
732
|
-
const c = l.props.children,
|
|
733
|
-
return /* @__PURE__ */ k(t, { ...i, ref: o, children: u.isValidElement(c) ? u.cloneElement(c, void 0,
|
|
741
|
+
const c = l.props.children, f = s.map((p) => p === l ? u.Children.count(c) > 1 ? u.Children.only(null) : u.isValidElement(c) ? c.props.children : null : p);
|
|
742
|
+
return /* @__PURE__ */ k(t, { ...i, ref: o, children: u.isValidElement(c) ? u.cloneElement(c, void 0, f) : null });
|
|
734
743
|
}
|
|
735
744
|
return /* @__PURE__ */ k(t, { ...i, ref: o, children: a });
|
|
736
745
|
});
|
|
@@ -742,7 +751,7 @@ function ka(e) {
|
|
|
742
751
|
const t = u.forwardRef((n, r) => {
|
|
743
752
|
const { children: o, ...a } = n;
|
|
744
753
|
if (u.isValidElement(o)) {
|
|
745
|
-
const i =
|
|
754
|
+
const i = Ia(o), s = Pa(a, o.props);
|
|
746
755
|
return o.type !== u.Fragment && (s.ref = r ? kr(r, i) : i), u.cloneElement(o, s);
|
|
747
756
|
}
|
|
748
757
|
return u.Children.count(o) > 1 ? u.Children.only(null) : null;
|
|
@@ -763,14 +772,14 @@ function Pa(e, t) {
|
|
|
763
772
|
}
|
|
764
773
|
return { ...e, ...n };
|
|
765
774
|
}
|
|
766
|
-
function
|
|
775
|
+
function Ia(e) {
|
|
767
776
|
var r, o;
|
|
768
777
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
769
778
|
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
770
779
|
}
|
|
771
780
|
const Xt = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
772
781
|
function Ar() {
|
|
773
|
-
const e =
|
|
782
|
+
const e = ce(Xt.matches);
|
|
774
783
|
return Oe(() => {
|
|
775
784
|
const t = (n) => {
|
|
776
785
|
e.value = n.matches;
|
|
@@ -779,21 +788,21 @@ function Ar() {
|
|
|
779
788
|
}, []), e;
|
|
780
789
|
}
|
|
781
790
|
function Pr({ onStart: e, onEnd: t }) {
|
|
782
|
-
const n =
|
|
791
|
+
const n = be();
|
|
783
792
|
n.current ?? (n.current = /* @__PURE__ */ new Set());
|
|
784
|
-
const r =
|
|
793
|
+
const r = be(e);
|
|
785
794
|
r.current = e;
|
|
786
|
-
const o =
|
|
795
|
+
const o = be(t);
|
|
787
796
|
o.current = t;
|
|
788
|
-
const a =
|
|
797
|
+
const a = ce(!1), i = le(
|
|
789
798
|
(l) => {
|
|
790
|
-
var c,
|
|
791
|
-
l.target === l.currentTarget && ((c = n.current) == null || c.add(l.propertyName), a.peek() || (a.value = !0, (
|
|
799
|
+
var c, f;
|
|
800
|
+
l.target === l.currentTarget && ((c = n.current) == null || c.add(l.propertyName), a.peek() || (a.value = !0, (f = r.current) == null || f.call(r)));
|
|
792
801
|
},
|
|
793
802
|
[]
|
|
794
|
-
), s =
|
|
795
|
-
var c,
|
|
796
|
-
l.target === l.currentTarget && ((c = n.current) == null || c.delete(l.propertyName), (
|
|
803
|
+
), s = le((l) => {
|
|
804
|
+
var c, f, p;
|
|
805
|
+
l.target === l.currentTarget && ((c = n.current) == null || c.delete(l.propertyName), (f = n.current) != null && f.size || (a.value = !1, (p = o.current) == null || p.call(o)));
|
|
797
806
|
}, []);
|
|
798
807
|
return {
|
|
799
808
|
transitioning: a,
|
|
@@ -803,11 +812,11 @@ function Pr({ onStart: e, onEnd: t }) {
|
|
|
803
812
|
}
|
|
804
813
|
};
|
|
805
814
|
}
|
|
806
|
-
function
|
|
807
|
-
const t = Ar().value ?
|
|
815
|
+
function se(e) {
|
|
816
|
+
const t = Ar().value ? Ra : _a;
|
|
808
817
|
return /* @__PURE__ */ h(t, { ...e });
|
|
809
818
|
}
|
|
810
|
-
function
|
|
819
|
+
function Ra({ active: e, ...t }) {
|
|
811
820
|
return Er(e) ? /* @__PURE__ */ h(Tr, { "data-shown": !0, ...t }) : null;
|
|
812
821
|
}
|
|
813
822
|
function _a({
|
|
@@ -815,7 +824,7 @@ function _a({
|
|
|
815
824
|
initial: t = e,
|
|
816
825
|
...n
|
|
817
826
|
}) {
|
|
818
|
-
const r = Sa(e), o =
|
|
827
|
+
const r = Sa(e), o = ce(Ea(t));
|
|
819
828
|
ze(() => {
|
|
820
829
|
r.value && (o.value = r.value);
|
|
821
830
|
});
|
|
@@ -1010,7 +1019,7 @@ void main() {
|
|
|
1010
1019
|
1,
|
|
1011
1020
|
1,
|
|
1012
1021
|
-1
|
|
1013
|
-
]), La = "https://storage.googleapis.com/eleven-public-cdn/images/perlin-noise.png",
|
|
1022
|
+
]), La = "https://storage.googleapis.com/eleven-public-cdn/images/perlin-noise.png", me = class me {
|
|
1014
1023
|
constructor(t) {
|
|
1015
1024
|
J(this, "gl");
|
|
1016
1025
|
J(this, "program");
|
|
@@ -1029,7 +1038,7 @@ void main() {
|
|
|
1029
1038
|
this.gl.RGBA,
|
|
1030
1039
|
this.gl.RGBA,
|
|
1031
1040
|
this.gl.UNSIGNED_BYTE,
|
|
1032
|
-
|
|
1041
|
+
me.noiseImage
|
|
1033
1042
|
), this.gl.generateMipmap(this.gl.TEXTURE_2D));
|
|
1034
1043
|
});
|
|
1035
1044
|
J(this, "toDataURL", () => this.gl.canvas.toDataURL("image/png"));
|
|
@@ -1057,7 +1066,7 @@ void main() {
|
|
|
1057
1066
|
n.RGBA,
|
|
1058
1067
|
n.UNSIGNED_BYTE,
|
|
1059
1068
|
new Uint8Array([128, 128, 128, 255])
|
|
1060
|
-
),
|
|
1069
|
+
), me.noiseImage || (me.noiseImage = new Image(), me.noiseImage.crossOrigin = "anonymous", me.noiseImage.src = La), me.noiseImage.complete ? this.copyNoiseImage() : me.noiseImage.addEventListener("load", this.copyNoiseImage);
|
|
1061
1070
|
const o = n.createBuffer();
|
|
1062
1071
|
n.bindBuffer(n.ARRAY_BUFFER, o), n.bufferData(n.ARRAY_BUFFER, Ma, n.STATIC_DRAW), n.vertexAttribPointer(zn, 2, n.FLOAT, !1, 0, 0), n.enableVertexAttribArray(zn), this.updateColors("#2792DC", "#9CE6E6"), this.resizeObserver = new ResizeObserver((i) => {
|
|
1063
1072
|
const s = i[0], l = s.devicePixelContentBoxSize ? s.devicePixelContentBoxSize[0] : s.contentBoxSize[0];
|
|
@@ -1126,26 +1135,26 @@ void main() {
|
|
|
1126
1135
|
return this.gl.shaderSource(r, n), this.gl.compileShader(r), this.gl.getShaderParameter(r, this.gl.COMPILE_STATUS) ? r : (this.gl.deleteShader(r), null);
|
|
1127
1136
|
}
|
|
1128
1137
|
};
|
|
1129
|
-
J(
|
|
1130
|
-
let on =
|
|
1138
|
+
J(me, "noiseImage");
|
|
1139
|
+
let on = me;
|
|
1131
1140
|
const Da = {
|
|
1132
1141
|
sm: "w-9 h-9",
|
|
1133
1142
|
lg: "w-48 h-48"
|
|
1134
1143
|
};
|
|
1135
1144
|
function ot({ size: e = "sm", className: t }) {
|
|
1136
|
-
const { getInputVolume: n, getOutputVolume: r, isSpeaking: o, isDisconnected: a } = ne(), { config: i } = bn(), s =
|
|
1145
|
+
const { getInputVolume: n, getOutputVolume: r, isSpeaking: o, isDisconnected: a } = ne(), { config: i } = bn(), s = be(null), l = be(null);
|
|
1137
1146
|
ze(() => {
|
|
1138
1147
|
if (a.value) {
|
|
1139
1148
|
s.current.style.transform = "", l.current.style.transform = "";
|
|
1140
1149
|
return;
|
|
1141
1150
|
}
|
|
1142
|
-
let
|
|
1151
|
+
let f;
|
|
1143
1152
|
function p() {
|
|
1144
|
-
const g = n(),
|
|
1145
|
-
s.current.style.transform = `scale(${
|
|
1153
|
+
const g = n(), w = r(), m = o.peek() ? 1 : 1 - g * 0.4, d = o.peek() ? 1 + w * 0.4 : 1;
|
|
1154
|
+
s.current.style.transform = `scale(${d})`, l.current.style.transform = `scale(${m})`, f = requestAnimationFrame(p);
|
|
1146
1155
|
}
|
|
1147
1156
|
return p(), () => {
|
|
1148
|
-
cancelAnimationFrame(
|
|
1157
|
+
cancelAnimationFrame(f);
|
|
1149
1158
|
};
|
|
1150
1159
|
});
|
|
1151
1160
|
const c = Y(() => ({
|
|
@@ -1177,11 +1186,11 @@ function ot({ size: e = "sm", className: t }) {
|
|
|
1177
1186
|
] });
|
|
1178
1187
|
}
|
|
1179
1188
|
function Ba({ color1: e, color2: t }) {
|
|
1180
|
-
const { canvasUrl: n } = bn(), [r, o] =
|
|
1189
|
+
const { canvasUrl: n } = bn(), [r, o] = ke(null);
|
|
1181
1190
|
Oe(() => {
|
|
1182
1191
|
r && (r.updateColors(e, t), r.render(), n.value = r.toDataURL());
|
|
1183
1192
|
}, [r, e, t]);
|
|
1184
|
-
const a =
|
|
1193
|
+
const a = le(
|
|
1185
1194
|
(i) => {
|
|
1186
1195
|
if (i) {
|
|
1187
1196
|
const s = new on(i);
|
|
@@ -1201,12 +1210,13 @@ const za = {
|
|
|
1201
1210
|
"mic-off": Ha,
|
|
1202
1211
|
check: Xa,
|
|
1203
1212
|
"chevron-down": ja,
|
|
1204
|
-
"chevron-up": Ya
|
|
1213
|
+
"chevron-up": Ya,
|
|
1214
|
+
send: Ka
|
|
1205
1215
|
}, Fa = {
|
|
1206
1216
|
sm: "text-xs",
|
|
1207
1217
|
md: "text-lg"
|
|
1208
1218
|
};
|
|
1209
|
-
function
|
|
1219
|
+
function We({ name: e, size: t = "md", className: n }) {
|
|
1210
1220
|
const r = za[e];
|
|
1211
1221
|
return /* @__PURE__ */ h(
|
|
1212
1222
|
"slot",
|
|
@@ -1358,11 +1368,31 @@ function Xa(e) {
|
|
|
1358
1368
|
}
|
|
1359
1369
|
);
|
|
1360
1370
|
}
|
|
1361
|
-
function
|
|
1362
|
-
|
|
1371
|
+
function Ka(e) {
|
|
1372
|
+
return /* @__PURE__ */ h(
|
|
1373
|
+
"svg",
|
|
1374
|
+
{
|
|
1375
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1376
|
+
height: "1em",
|
|
1377
|
+
width: "1em",
|
|
1378
|
+
viewBox: "0 0 20 20",
|
|
1379
|
+
fill: "currentColor",
|
|
1380
|
+
...e,
|
|
1381
|
+
children: /* @__PURE__ */ h(
|
|
1382
|
+
"path",
|
|
1383
|
+
{
|
|
1384
|
+
d: "M2.59413 5.1485C2.04 3.39377 3.86657 1.83482 5.51245 2.65776L16.47 8.13653C18.0055 8.90429 18.0055 11.0955 16.47 11.8633L5.51245 17.3421C3.86656 18.165 2.04 16.6061 2.59413 14.8513L3.86297 10.8333H7.50006C7.9603 10.8333 8.33339 10.4602 8.33339 10C8.33339 9.53976 7.9603 9.16667 7.50006 9.16667H3.86302L2.59413 5.1485Z",
|
|
1385
|
+
fill: "black"
|
|
1386
|
+
}
|
|
1387
|
+
)
|
|
1388
|
+
}
|
|
1389
|
+
);
|
|
1390
|
+
}
|
|
1391
|
+
function Te(e) {
|
|
1392
|
+
const t = Ar().value ? Ga : Za;
|
|
1363
1393
|
return /* @__PURE__ */ h(t, { ...e });
|
|
1364
1394
|
}
|
|
1365
|
-
function
|
|
1395
|
+
function Ga({
|
|
1366
1396
|
visible: e,
|
|
1367
1397
|
className: t,
|
|
1368
1398
|
grow: n,
|
|
@@ -1371,7 +1401,7 @@ function Ka({
|
|
|
1371
1401
|
}) {
|
|
1372
1402
|
return e ? /* @__PURE__ */ h("div", { className: j(n && "grow", t), ...o }) : null;
|
|
1373
1403
|
}
|
|
1374
|
-
function
|
|
1404
|
+
function Za({
|
|
1375
1405
|
visible: e,
|
|
1376
1406
|
children: t,
|
|
1377
1407
|
className: n,
|
|
@@ -1379,14 +1409,14 @@ function Ga({
|
|
|
1379
1409
|
dep: o,
|
|
1380
1410
|
...a
|
|
1381
1411
|
}) {
|
|
1382
|
-
const [i, s] =
|
|
1412
|
+
const [i, s] = ke(e), [l, c] = ke(null), [f, p] = ke(null), g = be(t);
|
|
1383
1413
|
e && (g.current = t);
|
|
1384
|
-
const
|
|
1385
|
-
c(
|
|
1414
|
+
const w = le((v) => {
|
|
1415
|
+
c(v), v && !e && (v.style.width = "0px", v.style.height = "0px");
|
|
1386
1416
|
}, []);
|
|
1387
1417
|
Oe(() => {
|
|
1388
|
-
|
|
1389
|
-
}, [o]),
|
|
1418
|
+
f && (f.style.transition = "none", f.style.opacity = "0", f.offsetWidth, f.style.transition = "", f.style.opacity = "");
|
|
1419
|
+
}, [o]), Ie(() => {
|
|
1390
1420
|
l && (l.style.width = `${l.offsetWidth}px`, l.style.height = `${l.offsetHeight}px`);
|
|
1391
1421
|
}, [
|
|
1392
1422
|
l,
|
|
@@ -1395,19 +1425,19 @@ function Ga({
|
|
|
1395
1425
|
o
|
|
1396
1426
|
// node's content changed
|
|
1397
1427
|
]), Oe(() => {
|
|
1398
|
-
if (!l || !
|
|
1428
|
+
if (!l || !f) return;
|
|
1399
1429
|
e && s(!0);
|
|
1400
|
-
const
|
|
1401
|
-
l.style.width = !e || l.offsetWidth !==
|
|
1430
|
+
const v = e ? f.offsetWidth : 0, b = e ? f.offsetHeight : 0;
|
|
1431
|
+
l.style.width = !e || l.offsetWidth !== v ? `${v}px` : "", l.style.height = !e || l.offsetHeight !== b ? `${b}px` : "";
|
|
1402
1432
|
}, [
|
|
1403
1433
|
l,
|
|
1404
|
-
|
|
1434
|
+
f,
|
|
1405
1435
|
e,
|
|
1406
1436
|
// node's visibility changed
|
|
1407
1437
|
o
|
|
1408
1438
|
// node's content changed
|
|
1409
1439
|
]);
|
|
1410
|
-
const { transitioning: m, handlers:
|
|
1440
|
+
const { transitioning: m, handlers: d } = Pr({
|
|
1411
1441
|
onEnd: () => {
|
|
1412
1442
|
e ? (l.style.width = "", l.style.height = "") : s(!1);
|
|
1413
1443
|
}
|
|
@@ -1415,14 +1445,14 @@ function Ga({
|
|
|
1415
1445
|
return /* @__PURE__ */ h(
|
|
1416
1446
|
"div",
|
|
1417
1447
|
{
|
|
1418
|
-
ref:
|
|
1448
|
+
ref: w,
|
|
1419
1449
|
className: j(
|
|
1420
1450
|
"relative inline-flex shrink-0 justify-center items-center transition-[opacity,width,height,transform,flex-grow] duration-200 min-w-0",
|
|
1421
1451
|
!e && "opacity-0 scale-75",
|
|
1422
1452
|
e && r && "grow",
|
|
1423
1453
|
e && i && !m.value && "z-1"
|
|
1424
1454
|
),
|
|
1425
|
-
...
|
|
1455
|
+
...d,
|
|
1426
1456
|
children: /* @__PURE__ */ h(
|
|
1427
1457
|
"div",
|
|
1428
1458
|
{
|
|
@@ -1439,7 +1469,7 @@ function Ga({
|
|
|
1439
1469
|
}
|
|
1440
1470
|
);
|
|
1441
1471
|
}
|
|
1442
|
-
const
|
|
1472
|
+
const qa = {
|
|
1443
1473
|
primary: "text-accent-primary border border-accent bg-accent hover:border-accent-hover hover:bg-accent-hover active:border-accent-active active:bg-accent-active",
|
|
1444
1474
|
secondary: "text-base-primary border border-base-border bg-base hover:bg-base-hover active:bg-base-active"
|
|
1445
1475
|
}, Me = Ko(
|
|
@@ -1459,7 +1489,7 @@ const Za = {
|
|
|
1459
1489
|
ref: l,
|
|
1460
1490
|
className: j(
|
|
1461
1491
|
"h-9 flex px-2.5 text-sm items-center transition-colors justify-center rounded-button duration-200 focus-ring overflow-hidden select-none",
|
|
1462
|
-
|
|
1492
|
+
qa[t],
|
|
1463
1493
|
c && "min-w-9",
|
|
1464
1494
|
o
|
|
1465
1495
|
),
|
|
@@ -1467,7 +1497,7 @@ const Za = {
|
|
|
1467
1497
|
...s,
|
|
1468
1498
|
children: [
|
|
1469
1499
|
r && /* @__PURE__ */ h(
|
|
1470
|
-
|
|
1500
|
+
We,
|
|
1471
1501
|
{
|
|
1472
1502
|
className: j(
|
|
1473
1503
|
"transition-[margin] duration-200",
|
|
@@ -1477,7 +1507,7 @@ const Za = {
|
|
|
1477
1507
|
name: r
|
|
1478
1508
|
}
|
|
1479
1509
|
),
|
|
1480
|
-
/* @__PURE__ */ h(
|
|
1510
|
+
/* @__PURE__ */ h(Te, { visible: !!n, dep: n, children: /* @__PURE__ */ h("span", { className: "block whitespace-nowrap max-w-64 truncate px-1.5", children: n }) })
|
|
1481
1511
|
]
|
|
1482
1512
|
}
|
|
1483
1513
|
);
|
|
@@ -1489,16 +1519,16 @@ function an({
|
|
|
1489
1519
|
}) {
|
|
1490
1520
|
const { status: n, isSpeaking: r } = ne(), o = zt(), a = re(), i = Y(
|
|
1491
1521
|
() => n.value !== "connected" ? a.connecting_status.value : o.value ? a.chatting_status.value : r.value ? a.speaking_status.value : a.listening_status.value
|
|
1492
|
-
), [s, l] =
|
|
1522
|
+
), [s, l] = ke(i.peek());
|
|
1493
1523
|
return ze(() => {
|
|
1494
1524
|
const c = i.value;
|
|
1495
1525
|
if (n.value === "connected" && r.value)
|
|
1496
1526
|
l(c);
|
|
1497
1527
|
else {
|
|
1498
|
-
const
|
|
1528
|
+
const f = setTimeout(() => {
|
|
1499
1529
|
l(c);
|
|
1500
1530
|
}, 500);
|
|
1501
|
-
return () => clearTimeout(
|
|
1531
|
+
return () => clearTimeout(f);
|
|
1502
1532
|
}
|
|
1503
1533
|
}), /* @__PURE__ */ h(
|
|
1504
1534
|
"div",
|
|
@@ -1508,7 +1538,7 @@ function an({
|
|
|
1508
1538
|
e
|
|
1509
1539
|
),
|
|
1510
1540
|
...t,
|
|
1511
|
-
children: /* @__PURE__ */ h(
|
|
1541
|
+
children: /* @__PURE__ */ h(se, { initial: !1, active: !0, children: /* @__PURE__ */ h("div", { className: "animate-text whitespace-nowrap transition-[opacity,transform] ease-out duration-200 data-hidden:opacity-0 transform data-hidden:translate-y-2", children: s }) }, s)
|
|
1512
1542
|
}
|
|
1513
1543
|
);
|
|
1514
1544
|
}
|
|
@@ -1528,18 +1558,18 @@ function yn(e, t = []) {
|
|
|
1528
1558
|
n = [...n, i];
|
|
1529
1559
|
const c = (p) => {
|
|
1530
1560
|
var b;
|
|
1531
|
-
const { scope: g, children:
|
|
1532
|
-
return /* @__PURE__ */ k(
|
|
1561
|
+
const { scope: g, children: w, ...m } = p, d = ((b = g == null ? void 0 : g[e]) == null ? void 0 : b[l]) || s, v = u.useMemo(() => m, Object.values(m));
|
|
1562
|
+
return /* @__PURE__ */ k(d.Provider, { value: v, children: w });
|
|
1533
1563
|
};
|
|
1534
1564
|
c.displayName = a + "Provider";
|
|
1535
|
-
function
|
|
1536
|
-
var
|
|
1537
|
-
const
|
|
1565
|
+
function f(p, g) {
|
|
1566
|
+
var d;
|
|
1567
|
+
const w = ((d = g == null ? void 0 : g[e]) == null ? void 0 : d[l]) || s, m = u.useContext(w);
|
|
1538
1568
|
if (m) return m;
|
|
1539
1569
|
if (i !== void 0) return i;
|
|
1540
1570
|
throw new Error(`\`${p}\` must be used within \`${a}\``);
|
|
1541
1571
|
}
|
|
1542
|
-
return [c,
|
|
1572
|
+
return [c, f];
|
|
1543
1573
|
}
|
|
1544
1574
|
const o = () => {
|
|
1545
1575
|
const a = n.map((i) => u.createContext(i));
|
|
@@ -1551,9 +1581,9 @@ function yn(e, t = []) {
|
|
|
1551
1581
|
);
|
|
1552
1582
|
};
|
|
1553
1583
|
};
|
|
1554
|
-
return o.scopeName = e, [r,
|
|
1584
|
+
return o.scopeName = e, [r, Qa(o, ...t)];
|
|
1555
1585
|
}
|
|
1556
|
-
function
|
|
1586
|
+
function Qa(...e) {
|
|
1557
1587
|
const t = e[0];
|
|
1558
1588
|
if (e.length === 1) return t;
|
|
1559
1589
|
const n = () => {
|
|
@@ -1571,52 +1601,52 @@ function qa(...e) {
|
|
|
1571
1601
|
};
|
|
1572
1602
|
return n.scopeName = t.scopeName, n;
|
|
1573
1603
|
}
|
|
1574
|
-
function
|
|
1604
|
+
function Ja(e) {
|
|
1575
1605
|
const t = e + "CollectionProvider", [n, r] = yn(t), [o, a] = n(
|
|
1576
1606
|
t,
|
|
1577
1607
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
1578
|
-
), i = (
|
|
1579
|
-
const { scope:
|
|
1580
|
-
return /* @__PURE__ */ k(o, { scope:
|
|
1608
|
+
), i = (d) => {
|
|
1609
|
+
const { scope: v, children: b } = d, x = _e.useRef(null), y = _e.useRef(/* @__PURE__ */ new Map()).current;
|
|
1610
|
+
return /* @__PURE__ */ k(o, { scope: v, itemMap: y, collectionRef: x, children: b });
|
|
1581
1611
|
};
|
|
1582
1612
|
i.displayName = t;
|
|
1583
1613
|
const s = e + "CollectionSlot", l = /* @__PURE__ */ vt(s), c = _e.forwardRef(
|
|
1584
|
-
(
|
|
1585
|
-
const { scope: b, children: x } =
|
|
1614
|
+
(d, v) => {
|
|
1615
|
+
const { scope: b, children: x } = d, y = a(s, b), S = Z(v, y.collectionRef);
|
|
1586
1616
|
return /* @__PURE__ */ k(l, { ref: S, children: x });
|
|
1587
1617
|
}
|
|
1588
1618
|
);
|
|
1589
1619
|
c.displayName = s;
|
|
1590
|
-
const
|
|
1591
|
-
(
|
|
1592
|
-
const { scope: b, children: x, ...y } =
|
|
1620
|
+
const f = e + "CollectionItemSlot", p = "data-radix-collection-item", g = /* @__PURE__ */ vt(f), w = _e.forwardRef(
|
|
1621
|
+
(d, v) => {
|
|
1622
|
+
const { scope: b, children: x, ...y } = d, S = _e.useRef(null), E = Z(v, S), T = a(f, b);
|
|
1593
1623
|
return _e.useEffect(() => (T.itemMap.set(S, { ref: S, ...y }), () => void T.itemMap.delete(S))), /* @__PURE__ */ k(g, { [p]: "", ref: E, children: x });
|
|
1594
1624
|
}
|
|
1595
1625
|
);
|
|
1596
|
-
|
|
1597
|
-
function m(
|
|
1598
|
-
const
|
|
1626
|
+
w.displayName = f;
|
|
1627
|
+
function m(d) {
|
|
1628
|
+
const v = a(e + "CollectionConsumer", d);
|
|
1599
1629
|
return _e.useCallback(() => {
|
|
1600
|
-
const x =
|
|
1630
|
+
const x = v.collectionRef.current;
|
|
1601
1631
|
if (!x) return [];
|
|
1602
1632
|
const y = Array.from(x.querySelectorAll(`[${p}]`));
|
|
1603
|
-
return Array.from(
|
|
1633
|
+
return Array.from(v.itemMap.values()).sort(
|
|
1604
1634
|
(T, C) => y.indexOf(T.ref.current) - y.indexOf(C.ref.current)
|
|
1605
1635
|
);
|
|
1606
|
-
}, [
|
|
1636
|
+
}, [v.collectionRef, v.itemMap]);
|
|
1607
1637
|
}
|
|
1608
1638
|
return [
|
|
1609
|
-
{ Provider: i, Slot: c, ItemSlot:
|
|
1639
|
+
{ Provider: i, Slot: c, ItemSlot: w },
|
|
1610
1640
|
m,
|
|
1611
1641
|
r
|
|
1612
1642
|
];
|
|
1613
1643
|
}
|
|
1614
|
-
var
|
|
1615
|
-
function
|
|
1616
|
-
const t = u.useContext(
|
|
1644
|
+
var ei = u.createContext(void 0);
|
|
1645
|
+
function ti(e) {
|
|
1646
|
+
const t = u.useContext(ei);
|
|
1617
1647
|
return e || t || "ltr";
|
|
1618
1648
|
}
|
|
1619
|
-
var
|
|
1649
|
+
var ni = [
|
|
1620
1650
|
"a",
|
|
1621
1651
|
"button",
|
|
1622
1652
|
"div",
|
|
@@ -1634,17 +1664,17 @@ var ti = [
|
|
|
1634
1664
|
"span",
|
|
1635
1665
|
"svg",
|
|
1636
1666
|
"ul"
|
|
1637
|
-
], K =
|
|
1667
|
+
], K = ni.reduce((e, t) => {
|
|
1638
1668
|
const n = /* @__PURE__ */ vt(`Primitive.${t}`), r = u.forwardRef((o, a) => {
|
|
1639
1669
|
const { asChild: i, ...s } = o, l = i ? n : t;
|
|
1640
1670
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ k(l, { ...s, ref: a });
|
|
1641
1671
|
});
|
|
1642
1672
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
1643
1673
|
}, {});
|
|
1644
|
-
function
|
|
1674
|
+
function ri(e, t) {
|
|
1645
1675
|
e && u.flushSync(() => e.dispatchEvent(t));
|
|
1646
1676
|
}
|
|
1647
|
-
function
|
|
1677
|
+
function Ue(e) {
|
|
1648
1678
|
const t = u.useRef(e);
|
|
1649
1679
|
return u.useEffect(() => {
|
|
1650
1680
|
t.current = e;
|
|
@@ -1653,8 +1683,8 @@ function We(e) {
|
|
|
1653
1683
|
return (r = t.current) == null ? void 0 : r.call(t, ...n);
|
|
1654
1684
|
}, []);
|
|
1655
1685
|
}
|
|
1656
|
-
function
|
|
1657
|
-
const n =
|
|
1686
|
+
function oi(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
1687
|
+
const n = Ue(e);
|
|
1658
1688
|
u.useEffect(() => {
|
|
1659
1689
|
const r = (o) => {
|
|
1660
1690
|
o.key === "Escape" && n(o);
|
|
@@ -1662,11 +1692,11 @@ function ri(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
1662
1692
|
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
|
|
1663
1693
|
}, [n, t]);
|
|
1664
1694
|
}
|
|
1665
|
-
var
|
|
1695
|
+
var ai = "DismissableLayer", sn = "dismissableLayer.update", ii = "dismissableLayer.pointerDownOutside", si = "dismissableLayer.focusOutside", Vn, Ir = u.createContext({
|
|
1666
1696
|
layers: /* @__PURE__ */ new Set(),
|
|
1667
1697
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
1668
1698
|
branches: /* @__PURE__ */ new Set()
|
|
1669
|
-
}),
|
|
1699
|
+
}), Rr = u.forwardRef(
|
|
1670
1700
|
(e, t) => {
|
|
1671
1701
|
const {
|
|
1672
1702
|
disableOutsidePointerEvents: n = !1,
|
|
@@ -1676,24 +1706,24 @@ var oi = "DismissableLayer", sn = "dismissableLayer.update", ai = "dismissableLa
|
|
|
1676
1706
|
onInteractOutside: i,
|
|
1677
1707
|
onDismiss: s,
|
|
1678
1708
|
...l
|
|
1679
|
-
} = e, c = u.useContext(
|
|
1680
|
-
const
|
|
1709
|
+
} = e, c = u.useContext(Ir), [f, p] = u.useState(null), g = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, w] = u.useState({}), m = Z(t, (C) => p(C)), d = Array.from(c.layers), [v] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), b = d.indexOf(v), x = f ? d.indexOf(f) : -1, y = c.layersWithOutsidePointerEventsDisabled.size > 0, S = x >= b, E = ui((C) => {
|
|
1710
|
+
const I = C.target, O = [...c.branches].some((M) => M.contains(I));
|
|
1681
1711
|
!S || O || (o == null || o(C), i == null || i(C), C.defaultPrevented || s == null || s());
|
|
1682
|
-
}, g), T =
|
|
1683
|
-
const
|
|
1684
|
-
[...c.branches].some((M) => M.contains(
|
|
1712
|
+
}, g), T = di((C) => {
|
|
1713
|
+
const I = C.target;
|
|
1714
|
+
[...c.branches].some((M) => M.contains(I)) || (a == null || a(C), i == null || i(C), C.defaultPrevented || s == null || s());
|
|
1685
1715
|
}, g);
|
|
1686
|
-
return
|
|
1716
|
+
return oi((C) => {
|
|
1687
1717
|
x === c.layers.size - 1 && (r == null || r(C), !C.defaultPrevented && s && (C.preventDefault(), s()));
|
|
1688
1718
|
}, g), u.useEffect(() => {
|
|
1689
|
-
if (
|
|
1690
|
-
return n && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (Vn = g.body.style.pointerEvents, g.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(
|
|
1719
|
+
if (f)
|
|
1720
|
+
return n && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (Vn = g.body.style.pointerEvents, g.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(f)), c.layers.add(f), $n(), () => {
|
|
1691
1721
|
n && c.layersWithOutsidePointerEventsDisabled.size === 1 && (g.body.style.pointerEvents = Vn);
|
|
1692
1722
|
};
|
|
1693
|
-
}, [
|
|
1694
|
-
|
|
1695
|
-
}, [
|
|
1696
|
-
const C = () =>
|
|
1723
|
+
}, [f, g, n, c]), u.useEffect(() => () => {
|
|
1724
|
+
f && (c.layers.delete(f), c.layersWithOutsidePointerEventsDisabled.delete(f), $n());
|
|
1725
|
+
}, [f, c]), u.useEffect(() => {
|
|
1726
|
+
const C = () => w({});
|
|
1697
1727
|
return document.addEventListener(sn, C), () => document.removeEventListener(sn, C);
|
|
1698
1728
|
}, []), /* @__PURE__ */ k(
|
|
1699
1729
|
K.div,
|
|
@@ -1714,9 +1744,9 @@ var oi = "DismissableLayer", sn = "dismissableLayer.update", ai = "dismissableLa
|
|
|
1714
1744
|
);
|
|
1715
1745
|
}
|
|
1716
1746
|
);
|
|
1717
|
-
|
|
1718
|
-
var
|
|
1719
|
-
const n = u.useContext(
|
|
1747
|
+
Rr.displayName = ai;
|
|
1748
|
+
var li = "DismissableLayerBranch", ci = u.forwardRef((e, t) => {
|
|
1749
|
+
const n = u.useContext(Ir), r = u.useRef(null), o = Z(t, r);
|
|
1720
1750
|
return u.useEffect(() => {
|
|
1721
1751
|
const a = r.current;
|
|
1722
1752
|
if (a)
|
|
@@ -1725,16 +1755,16 @@ var si = "DismissableLayerBranch", li = u.forwardRef((e, t) => {
|
|
|
1725
1755
|
};
|
|
1726
1756
|
}, [n.branches]), /* @__PURE__ */ k(K.div, { ...e, ref: o });
|
|
1727
1757
|
});
|
|
1728
|
-
|
|
1729
|
-
function
|
|
1730
|
-
const n =
|
|
1758
|
+
ci.displayName = li;
|
|
1759
|
+
function ui(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
1760
|
+
const n = Ue(e), r = u.useRef(!1), o = u.useRef(() => {
|
|
1731
1761
|
});
|
|
1732
1762
|
return u.useEffect(() => {
|
|
1733
1763
|
const a = (s) => {
|
|
1734
1764
|
if (s.target && !r.current) {
|
|
1735
1765
|
let l = function() {
|
|
1736
1766
|
_r(
|
|
1737
|
-
|
|
1767
|
+
ii,
|
|
1738
1768
|
n,
|
|
1739
1769
|
c,
|
|
1740
1770
|
{ discrete: !0 }
|
|
@@ -1756,11 +1786,11 @@ function ci(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
1756
1786
|
onPointerDownCapture: () => r.current = !0
|
|
1757
1787
|
};
|
|
1758
1788
|
}
|
|
1759
|
-
function
|
|
1760
|
-
const n =
|
|
1789
|
+
function di(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
1790
|
+
const n = Ue(e), r = u.useRef(!1);
|
|
1761
1791
|
return u.useEffect(() => {
|
|
1762
1792
|
const o = (a) => {
|
|
1763
|
-
a.target && !r.current && _r(
|
|
1793
|
+
a.target && !r.current && _r(si, n, { originalEvent: a }, {
|
|
1764
1794
|
discrete: !1
|
|
1765
1795
|
});
|
|
1766
1796
|
};
|
|
@@ -1776,10 +1806,10 @@ function $n() {
|
|
|
1776
1806
|
}
|
|
1777
1807
|
function _r(e, t, n, { discrete: r }) {
|
|
1778
1808
|
const o = n.originalEvent.target, a = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
1779
|
-
t && o.addEventListener(e, t, { once: !0 }), r ?
|
|
1809
|
+
t && o.addEventListener(e, t, { once: !0 }), r ? ri(o, a) : o.dispatchEvent(a);
|
|
1780
1810
|
}
|
|
1781
1811
|
var Kt = 0;
|
|
1782
|
-
function
|
|
1812
|
+
function fi() {
|
|
1783
1813
|
u.useEffect(() => {
|
|
1784
1814
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
1785
1815
|
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Wn()), document.body.insertAdjacentElement("beforeend", e[1] ?? Wn()), Kt++, () => {
|
|
@@ -1791,14 +1821,14 @@ function Wn() {
|
|
|
1791
1821
|
const e = document.createElement("span");
|
|
1792
1822
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
1793
1823
|
}
|
|
1794
|
-
var Gt = "focusScope.autoFocusOnMount", Zt = "focusScope.autoFocusOnUnmount", Un = { bubbles: !1, cancelable: !0 },
|
|
1824
|
+
var Gt = "focusScope.autoFocusOnMount", Zt = "focusScope.autoFocusOnUnmount", Un = { bubbles: !1, cancelable: !0 }, pi = "FocusScope", Nr = u.forwardRef((e, t) => {
|
|
1795
1825
|
const {
|
|
1796
1826
|
loop: n = !1,
|
|
1797
1827
|
trapped: r = !1,
|
|
1798
1828
|
onMountAutoFocus: o,
|
|
1799
1829
|
onUnmountAutoFocus: a,
|
|
1800
1830
|
...i
|
|
1801
|
-
} = e, [s, l] = u.useState(null), c =
|
|
1831
|
+
} = e, [s, l] = u.useState(null), c = Ue(o), f = Ue(a), p = u.useRef(null), g = Z(t, (d) => l(d)), w = u.useRef({
|
|
1802
1832
|
paused: !1,
|
|
1803
1833
|
pause() {
|
|
1804
1834
|
this.paused = !0;
|
|
@@ -1809,12 +1839,12 @@ var Gt = "focusScope.autoFocusOnMount", Zt = "focusScope.autoFocusOnUnmount", Un
|
|
|
1809
1839
|
}).current;
|
|
1810
1840
|
u.useEffect(() => {
|
|
1811
1841
|
if (r) {
|
|
1812
|
-
let
|
|
1813
|
-
if (
|
|
1842
|
+
let d = function(y) {
|
|
1843
|
+
if (w.paused || !s) return;
|
|
1814
1844
|
const S = y.target;
|
|
1815
1845
|
s.contains(S) ? p.current = S : Ne(p.current, { select: !0 });
|
|
1816
|
-
},
|
|
1817
|
-
if (
|
|
1846
|
+
}, v = function(y) {
|
|
1847
|
+
if (w.paused || !s) return;
|
|
1818
1848
|
const S = y.relatedTarget;
|
|
1819
1849
|
S !== null && (s.contains(S) || Ne(p.current, { select: !0 }));
|
|
1820
1850
|
}, b = function(y) {
|
|
@@ -1822,48 +1852,48 @@ var Gt = "focusScope.autoFocusOnMount", Zt = "focusScope.autoFocusOnUnmount", Un
|
|
|
1822
1852
|
for (const E of y)
|
|
1823
1853
|
E.removedNodes.length > 0 && Ne(s);
|
|
1824
1854
|
};
|
|
1825
|
-
document.addEventListener("focusin",
|
|
1855
|
+
document.addEventListener("focusin", d), document.addEventListener("focusout", v);
|
|
1826
1856
|
const x = new MutationObserver(b);
|
|
1827
1857
|
return s && x.observe(s, { childList: !0, subtree: !0 }), () => {
|
|
1828
|
-
document.removeEventListener("focusin",
|
|
1858
|
+
document.removeEventListener("focusin", d), document.removeEventListener("focusout", v), x.disconnect();
|
|
1829
1859
|
};
|
|
1830
1860
|
}
|
|
1831
|
-
}, [r, s,
|
|
1861
|
+
}, [r, s, w.paused]), u.useEffect(() => {
|
|
1832
1862
|
if (s) {
|
|
1833
|
-
jn.add(
|
|
1834
|
-
const
|
|
1835
|
-
if (!s.contains(
|
|
1863
|
+
jn.add(w);
|
|
1864
|
+
const d = document.activeElement;
|
|
1865
|
+
if (!s.contains(d)) {
|
|
1836
1866
|
const b = new CustomEvent(Gt, Un);
|
|
1837
|
-
s.addEventListener(Gt, c), s.dispatchEvent(b), b.defaultPrevented || (
|
|
1867
|
+
s.addEventListener(Gt, c), s.dispatchEvent(b), b.defaultPrevented || (hi(bi(Or(s)), { select: !0 }), document.activeElement === d && Ne(s));
|
|
1838
1868
|
}
|
|
1839
1869
|
return () => {
|
|
1840
1870
|
s.removeEventListener(Gt, c), setTimeout(() => {
|
|
1841
1871
|
const b = new CustomEvent(Zt, Un);
|
|
1842
|
-
s.addEventListener(Zt,
|
|
1872
|
+
s.addEventListener(Zt, f), s.dispatchEvent(b), b.defaultPrevented || Ne(d ?? document.body, { select: !0 }), s.removeEventListener(Zt, f), jn.remove(w);
|
|
1843
1873
|
}, 0);
|
|
1844
1874
|
};
|
|
1845
1875
|
}
|
|
1846
|
-
}, [s, c,
|
|
1876
|
+
}, [s, c, f, w]);
|
|
1847
1877
|
const m = u.useCallback(
|
|
1848
|
-
(
|
|
1849
|
-
if (!n && !r ||
|
|
1850
|
-
const
|
|
1851
|
-
if (
|
|
1852
|
-
const x =
|
|
1853
|
-
y && S ? !
|
|
1878
|
+
(d) => {
|
|
1879
|
+
if (!n && !r || w.paused) return;
|
|
1880
|
+
const v = d.key === "Tab" && !d.altKey && !d.ctrlKey && !d.metaKey, b = document.activeElement;
|
|
1881
|
+
if (v && b) {
|
|
1882
|
+
const x = d.currentTarget, [y, S] = vi(x);
|
|
1883
|
+
y && S ? !d.shiftKey && b === S ? (d.preventDefault(), n && Ne(y, { select: !0 })) : d.shiftKey && b === y && (d.preventDefault(), n && Ne(S, { select: !0 })) : b === x && d.preventDefault();
|
|
1854
1884
|
}
|
|
1855
1885
|
},
|
|
1856
|
-
[n, r,
|
|
1886
|
+
[n, r, w.paused]
|
|
1857
1887
|
);
|
|
1858
1888
|
return /* @__PURE__ */ k(K.div, { tabIndex: -1, ...i, ref: g, onKeyDown: m });
|
|
1859
1889
|
});
|
|
1860
|
-
Nr.displayName =
|
|
1861
|
-
function
|
|
1890
|
+
Nr.displayName = pi;
|
|
1891
|
+
function hi(e, { select: t = !1 } = {}) {
|
|
1862
1892
|
const n = document.activeElement;
|
|
1863
1893
|
for (const r of e)
|
|
1864
1894
|
if (Ne(r, { select: t }), document.activeElement !== n) return;
|
|
1865
1895
|
}
|
|
1866
|
-
function
|
|
1896
|
+
function vi(e) {
|
|
1867
1897
|
const t = Or(e), n = Hn(t, e), r = Hn(t.reverse(), e);
|
|
1868
1898
|
return [n, r];
|
|
1869
1899
|
}
|
|
@@ -1879,9 +1909,9 @@ function Or(e) {
|
|
|
1879
1909
|
}
|
|
1880
1910
|
function Hn(e, t) {
|
|
1881
1911
|
for (const n of e)
|
|
1882
|
-
if (!
|
|
1912
|
+
if (!gi(n, { upTo: t })) return n;
|
|
1883
1913
|
}
|
|
1884
|
-
function
|
|
1914
|
+
function gi(e, { upTo: t }) {
|
|
1885
1915
|
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
1886
1916
|
for (; e; ) {
|
|
1887
1917
|
if (t !== void 0 && e === t) return !1;
|
|
@@ -1890,17 +1920,17 @@ function vi(e, { upTo: t }) {
|
|
|
1890
1920
|
}
|
|
1891
1921
|
return !1;
|
|
1892
1922
|
}
|
|
1893
|
-
function
|
|
1923
|
+
function mi(e) {
|
|
1894
1924
|
return e instanceof HTMLInputElement && "select" in e;
|
|
1895
1925
|
}
|
|
1896
1926
|
function Ne(e, { select: t = !1 } = {}) {
|
|
1897
1927
|
if (e && e.focus) {
|
|
1898
1928
|
const n = document.activeElement;
|
|
1899
|
-
e.focus({ preventScroll: !0 }), e !== n &&
|
|
1929
|
+
e.focus({ preventScroll: !0 }), e !== n && mi(e) && t && e.select();
|
|
1900
1930
|
}
|
|
1901
1931
|
}
|
|
1902
|
-
var jn =
|
|
1903
|
-
function
|
|
1932
|
+
var jn = wi();
|
|
1933
|
+
function wi() {
|
|
1904
1934
|
let e = [];
|
|
1905
1935
|
return {
|
|
1906
1936
|
add(t) {
|
|
@@ -1917,27 +1947,27 @@ function Yn(e, t) {
|
|
|
1917
1947
|
const n = [...e], r = n.indexOf(t);
|
|
1918
1948
|
return r !== -1 && n.splice(r, 1), n;
|
|
1919
1949
|
}
|
|
1920
|
-
function
|
|
1950
|
+
function bi(e) {
|
|
1921
1951
|
return e.filter((t) => t.tagName !== "A");
|
|
1922
1952
|
}
|
|
1923
1953
|
var te = globalThis != null && globalThis.document ? u.useLayoutEffect : () => {
|
|
1924
|
-
},
|
|
1925
|
-
}),
|
|
1954
|
+
}, xi = u[" useId ".trim().toString()] || (() => {
|
|
1955
|
+
}), yi = 0;
|
|
1926
1956
|
function Cn(e) {
|
|
1927
|
-
const [t, n] = u.useState(
|
|
1957
|
+
const [t, n] = u.useState(xi());
|
|
1928
1958
|
return te(() => {
|
|
1929
|
-
n((r) => r ?? String(
|
|
1959
|
+
n((r) => r ?? String(yi++));
|
|
1930
1960
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
1931
1961
|
}
|
|
1932
|
-
const
|
|
1962
|
+
const Ci = ["top", "right", "bottom", "left"], Le = Math.min, ae = Math.max, Nt = Math.round, Ct = Math.floor, ye = (e) => ({
|
|
1933
1963
|
x: e,
|
|
1934
1964
|
y: e
|
|
1935
|
-
}),
|
|
1965
|
+
}), Si = {
|
|
1936
1966
|
left: "right",
|
|
1937
1967
|
right: "left",
|
|
1938
1968
|
bottom: "top",
|
|
1939
1969
|
top: "bottom"
|
|
1940
|
-
},
|
|
1970
|
+
}, Ei = {
|
|
1941
1971
|
start: "end",
|
|
1942
1972
|
end: "start"
|
|
1943
1973
|
};
|
|
@@ -1965,20 +1995,20 @@ function De(e) {
|
|
|
1965
1995
|
function kn(e) {
|
|
1966
1996
|
return Sn(De(e));
|
|
1967
1997
|
}
|
|
1968
|
-
function
|
|
1998
|
+
function ki(e, t, n) {
|
|
1969
1999
|
n === void 0 && (n = !1);
|
|
1970
2000
|
const r = at(e), o = kn(e), a = En(o);
|
|
1971
2001
|
let i = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
1972
2002
|
return t.reference[a] > t.floating[a] && (i = Ot(i)), [i, Ot(i)];
|
|
1973
2003
|
}
|
|
1974
|
-
function
|
|
2004
|
+
function Ti(e) {
|
|
1975
2005
|
const t = Ot(e);
|
|
1976
2006
|
return [cn(e), t, cn(t)];
|
|
1977
2007
|
}
|
|
1978
2008
|
function cn(e) {
|
|
1979
|
-
return e.replace(/start|end/g, (t) =>
|
|
2009
|
+
return e.replace(/start|end/g, (t) => Ei[t]);
|
|
1980
2010
|
}
|
|
1981
|
-
function
|
|
2011
|
+
function Ai(e, t, n) {
|
|
1982
2012
|
const r = ["left", "right"], o = ["right", "left"], a = ["top", "bottom"], i = ["bottom", "top"];
|
|
1983
2013
|
switch (e) {
|
|
1984
2014
|
case "top":
|
|
@@ -1991,15 +2021,15 @@ function Ti(e, t, n) {
|
|
|
1991
2021
|
return [];
|
|
1992
2022
|
}
|
|
1993
2023
|
}
|
|
1994
|
-
function
|
|
2024
|
+
function Pi(e, t, n, r) {
|
|
1995
2025
|
const o = at(e);
|
|
1996
|
-
let a =
|
|
2026
|
+
let a = Ai(Pe(e), n === "start", r);
|
|
1997
2027
|
return o && (a = a.map((i) => i + "-" + o), t && (a = a.concat(a.map(cn)))), a;
|
|
1998
2028
|
}
|
|
1999
2029
|
function Ot(e) {
|
|
2000
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
2030
|
+
return e.replace(/left|right|bottom|top/g, (t) => Si[t]);
|
|
2001
2031
|
}
|
|
2002
|
-
function
|
|
2032
|
+
function Ii(e) {
|
|
2003
2033
|
return {
|
|
2004
2034
|
top: 0,
|
|
2005
2035
|
right: 0,
|
|
@@ -2009,7 +2039,7 @@ function Pi(e) {
|
|
|
2009
2039
|
};
|
|
2010
2040
|
}
|
|
2011
2041
|
function Mr(e) {
|
|
2012
|
-
return typeof e != "number" ?
|
|
2042
|
+
return typeof e != "number" ? Ii(e) : {
|
|
2013
2043
|
top: e,
|
|
2014
2044
|
right: e,
|
|
2015
2045
|
bottom: e,
|
|
@@ -2039,48 +2069,48 @@ function Xn(e, t, n) {
|
|
|
2039
2069
|
reference: r,
|
|
2040
2070
|
floating: o
|
|
2041
2071
|
} = e;
|
|
2042
|
-
const a = De(t), i = kn(t), s = En(i), l = Pe(t), c = a === "y",
|
|
2043
|
-
let
|
|
2072
|
+
const a = De(t), i = kn(t), s = En(i), l = Pe(t), c = a === "y", f = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, g = r[s] / 2 - o[s] / 2;
|
|
2073
|
+
let w;
|
|
2044
2074
|
switch (l) {
|
|
2045
2075
|
case "top":
|
|
2046
|
-
|
|
2047
|
-
x:
|
|
2076
|
+
w = {
|
|
2077
|
+
x: f,
|
|
2048
2078
|
y: r.y - o.height
|
|
2049
2079
|
};
|
|
2050
2080
|
break;
|
|
2051
2081
|
case "bottom":
|
|
2052
|
-
|
|
2053
|
-
x:
|
|
2082
|
+
w = {
|
|
2083
|
+
x: f,
|
|
2054
2084
|
y: r.y + r.height
|
|
2055
2085
|
};
|
|
2056
2086
|
break;
|
|
2057
2087
|
case "right":
|
|
2058
|
-
|
|
2088
|
+
w = {
|
|
2059
2089
|
x: r.x + r.width,
|
|
2060
2090
|
y: p
|
|
2061
2091
|
};
|
|
2062
2092
|
break;
|
|
2063
2093
|
case "left":
|
|
2064
|
-
|
|
2094
|
+
w = {
|
|
2065
2095
|
x: r.x - o.width,
|
|
2066
2096
|
y: p
|
|
2067
2097
|
};
|
|
2068
2098
|
break;
|
|
2069
2099
|
default:
|
|
2070
|
-
|
|
2100
|
+
w = {
|
|
2071
2101
|
x: r.x,
|
|
2072
2102
|
y: r.y
|
|
2073
2103
|
};
|
|
2074
2104
|
}
|
|
2075
2105
|
switch (at(t)) {
|
|
2076
2106
|
case "start":
|
|
2077
|
-
|
|
2107
|
+
w[i] -= g * (n && c ? -1 : 1);
|
|
2078
2108
|
break;
|
|
2079
2109
|
case "end":
|
|
2080
|
-
|
|
2110
|
+
w[i] += g * (n && c ? -1 : 1);
|
|
2081
2111
|
break;
|
|
2082
2112
|
}
|
|
2083
|
-
return
|
|
2113
|
+
return w;
|
|
2084
2114
|
}
|
|
2085
2115
|
const Ri = async (e, t, n) => {
|
|
2086
2116
|
const {
|
|
@@ -2094,25 +2124,25 @@ const Ri = async (e, t, n) => {
|
|
|
2094
2124
|
floating: t,
|
|
2095
2125
|
strategy: o
|
|
2096
2126
|
}), {
|
|
2097
|
-
x:
|
|
2127
|
+
x: f,
|
|
2098
2128
|
y: p
|
|
2099
|
-
} = Xn(c, r, l), g = r,
|
|
2100
|
-
for (let
|
|
2129
|
+
} = Xn(c, r, l), g = r, w = {}, m = 0;
|
|
2130
|
+
for (let d = 0; d < s.length; d++) {
|
|
2101
2131
|
const {
|
|
2102
|
-
name:
|
|
2132
|
+
name: v,
|
|
2103
2133
|
fn: b
|
|
2104
|
-
} = s[
|
|
2134
|
+
} = s[d], {
|
|
2105
2135
|
x,
|
|
2106
2136
|
y,
|
|
2107
2137
|
data: S,
|
|
2108
2138
|
reset: E
|
|
2109
2139
|
} = await b({
|
|
2110
|
-
x:
|
|
2140
|
+
x: f,
|
|
2111
2141
|
y: p,
|
|
2112
2142
|
initialPlacement: r,
|
|
2113
2143
|
placement: g,
|
|
2114
2144
|
strategy: o,
|
|
2115
|
-
middlewareData:
|
|
2145
|
+
middlewareData: w,
|
|
2116
2146
|
rects: c,
|
|
2117
2147
|
platform: i,
|
|
2118
2148
|
elements: {
|
|
@@ -2120,10 +2150,10 @@ const Ri = async (e, t, n) => {
|
|
|
2120
2150
|
floating: t
|
|
2121
2151
|
}
|
|
2122
2152
|
});
|
|
2123
|
-
|
|
2124
|
-
...
|
|
2125
|
-
[
|
|
2126
|
-
...v
|
|
2153
|
+
f = x ?? f, p = y ?? p, w = {
|
|
2154
|
+
...w,
|
|
2155
|
+
[v]: {
|
|
2156
|
+
...w[v],
|
|
2127
2157
|
...S
|
|
2128
2158
|
}
|
|
2129
2159
|
}, E && m <= 50 && (m++, typeof E == "object" && (E.placement && (g = E.placement), E.rects && (c = E.rects === !0 ? await i.getElementRects({
|
|
@@ -2131,16 +2161,16 @@ const Ri = async (e, t, n) => {
|
|
|
2131
2161
|
floating: t,
|
|
2132
2162
|
strategy: o
|
|
2133
2163
|
}) : E.rects), {
|
|
2134
|
-
x:
|
|
2164
|
+
x: f,
|
|
2135
2165
|
y: p
|
|
2136
|
-
} = Xn(c, g, l)),
|
|
2166
|
+
} = Xn(c, g, l)), d = -1);
|
|
2137
2167
|
}
|
|
2138
2168
|
return {
|
|
2139
|
-
x:
|
|
2169
|
+
x: f,
|
|
2140
2170
|
y: p,
|
|
2141
2171
|
placement: g,
|
|
2142
2172
|
strategy: o,
|
|
2143
|
-
middlewareData:
|
|
2173
|
+
middlewareData: w
|
|
2144
2174
|
};
|
|
2145
2175
|
};
|
|
2146
2176
|
async function gt(e, t) {
|
|
@@ -2155,14 +2185,14 @@ async function gt(e, t) {
|
|
|
2155
2185
|
strategy: l
|
|
2156
2186
|
} = e, {
|
|
2157
2187
|
boundary: c = "clippingAncestors",
|
|
2158
|
-
rootBoundary:
|
|
2188
|
+
rootBoundary: f = "viewport",
|
|
2159
2189
|
elementContext: p = "floating",
|
|
2160
2190
|
altBoundary: g = !1,
|
|
2161
|
-
padding:
|
|
2162
|
-
} = Ae(t, e), m = Mr(
|
|
2163
|
-
element: (n = await (a.isElement == null ? void 0 : a.isElement(
|
|
2191
|
+
padding: w = 0
|
|
2192
|
+
} = Ae(t, e), m = Mr(w), v = s[g ? p === "floating" ? "reference" : "floating" : p], b = Mt(await a.getClippingRect({
|
|
2193
|
+
element: (n = await (a.isElement == null ? void 0 : a.isElement(v))) == null || n ? v : v.contextElement || await (a.getDocumentElement == null ? void 0 : a.getDocumentElement(s.floating)),
|
|
2164
2194
|
boundary: c,
|
|
2165
|
-
rootBoundary:
|
|
2195
|
+
rootBoundary: f,
|
|
2166
2196
|
strategy: l
|
|
2167
2197
|
})), x = p === "floating" ? {
|
|
2168
2198
|
x: r,
|
|
@@ -2188,7 +2218,7 @@ async function gt(e, t) {
|
|
|
2188
2218
|
right: (E.right - b.right + m.right) / S.x
|
|
2189
2219
|
};
|
|
2190
2220
|
}
|
|
2191
|
-
const
|
|
2221
|
+
const _i = (e) => ({
|
|
2192
2222
|
name: "arrow",
|
|
2193
2223
|
options: e,
|
|
2194
2224
|
async fn(t) {
|
|
@@ -2202,21 +2232,21 @@ const Ii = (e) => ({
|
|
|
2202
2232
|
middlewareData: l
|
|
2203
2233
|
} = t, {
|
|
2204
2234
|
element: c,
|
|
2205
|
-
padding:
|
|
2235
|
+
padding: f = 0
|
|
2206
2236
|
} = Ae(e, t) || {};
|
|
2207
2237
|
if (c == null)
|
|
2208
2238
|
return {};
|
|
2209
|
-
const p = Mr(
|
|
2239
|
+
const p = Mr(f), g = {
|
|
2210
2240
|
x: n,
|
|
2211
2241
|
y: r
|
|
2212
|
-
},
|
|
2242
|
+
}, w = kn(o), m = En(w), d = await i.getDimensions(c), v = w === "y", b = v ? "top" : "left", x = v ? "bottom" : "right", y = v ? "clientHeight" : "clientWidth", S = a.reference[m] + a.reference[w] - g[w] - a.floating[m], E = g[w] - a.reference[w], T = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c));
|
|
2213
2243
|
let C = T ? T[y] : 0;
|
|
2214
2244
|
(!C || !await (i.isElement == null ? void 0 : i.isElement(T))) && (C = s.floating[y] || a.floating[m]);
|
|
2215
|
-
const
|
|
2245
|
+
const I = S / 2 - E / 2, O = C / 2 - d[m] / 2 - 1, M = Le(p[b], O), V = Le(p[x], O), $ = M, D = C - d[m] - V, N = C / 2 - d[m] / 2 + I, X = ln($, N, D), _ = !l.arrow && at(o) != null && N !== X && a.reference[m] / 2 - (N < $ ? M : V) - d[m] / 2 < 0, L = _ ? N < $ ? N - $ : N - D : 0;
|
|
2216
2246
|
return {
|
|
2217
|
-
[
|
|
2247
|
+
[w]: g[w] + L,
|
|
2218
2248
|
data: {
|
|
2219
|
-
[
|
|
2249
|
+
[w]: X,
|
|
2220
2250
|
centerOffset: N - X - L,
|
|
2221
2251
|
..._ && {
|
|
2222
2252
|
alignmentOffset: L
|
|
@@ -2225,7 +2255,7 @@ const Ii = (e) => ({
|
|
|
2225
2255
|
reset: _
|
|
2226
2256
|
};
|
|
2227
2257
|
}
|
|
2228
|
-
}),
|
|
2258
|
+
}), Ni = function(e) {
|
|
2229
2259
|
return e === void 0 && (e = {}), {
|
|
2230
2260
|
name: "flip",
|
|
2231
2261
|
options: e,
|
|
@@ -2239,23 +2269,23 @@ const Ii = (e) => ({
|
|
|
2239
2269
|
platform: l,
|
|
2240
2270
|
elements: c
|
|
2241
2271
|
} = t, {
|
|
2242
|
-
mainAxis:
|
|
2272
|
+
mainAxis: f = !0,
|
|
2243
2273
|
crossAxis: p = !0,
|
|
2244
2274
|
fallbackPlacements: g,
|
|
2245
|
-
fallbackStrategy:
|
|
2275
|
+
fallbackStrategy: w = "bestFit",
|
|
2246
2276
|
fallbackAxisSideDirection: m = "none",
|
|
2247
|
-
flipAlignment:
|
|
2248
|
-
...
|
|
2277
|
+
flipAlignment: d = !0,
|
|
2278
|
+
...v
|
|
2249
2279
|
} = Ae(e, t);
|
|
2250
2280
|
if ((n = a.arrow) != null && n.alignmentOffset)
|
|
2251
2281
|
return {};
|
|
2252
|
-
const b = Pe(o), x = De(s), y = Pe(s) === s, S = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), E = g || (y || !
|
|
2253
|
-
!g && T && E.push(...
|
|
2254
|
-
const C = [s, ...E],
|
|
2282
|
+
const b = Pe(o), x = De(s), y = Pe(s) === s, S = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), E = g || (y || !d ? [Ot(s)] : Ti(s)), T = m !== "none";
|
|
2283
|
+
!g && T && E.push(...Pi(s, d, m, S));
|
|
2284
|
+
const C = [s, ...E], I = await gt(t, v), O = [];
|
|
2255
2285
|
let M = ((r = a.flip) == null ? void 0 : r.overflows) || [];
|
|
2256
|
-
if (
|
|
2257
|
-
const N =
|
|
2258
|
-
O.push(
|
|
2286
|
+
if (f && O.push(I[b]), p) {
|
|
2287
|
+
const N = ki(o, i, S);
|
|
2288
|
+
O.push(I[N[0]], I[N[1]]);
|
|
2259
2289
|
}
|
|
2260
2290
|
if (M = [...M, {
|
|
2261
2291
|
placement: o,
|
|
@@ -2273,20 +2303,20 @@ const Ii = (e) => ({
|
|
|
2273
2303
|
placement: X
|
|
2274
2304
|
}
|
|
2275
2305
|
};
|
|
2276
|
-
let _ = ($ = M.filter((L) => L.overflows[0] <= 0).sort((L,
|
|
2306
|
+
let _ = ($ = M.filter((L) => L.overflows[0] <= 0).sort((L, R) => L.overflows[1] - R.overflows[1])[0]) == null ? void 0 : $.placement;
|
|
2277
2307
|
if (!_)
|
|
2278
|
-
switch (
|
|
2308
|
+
switch (w) {
|
|
2279
2309
|
case "bestFit": {
|
|
2280
2310
|
var D;
|
|
2281
|
-
const L = (D = M.filter((
|
|
2311
|
+
const L = (D = M.filter((R) => {
|
|
2282
2312
|
if (T) {
|
|
2283
|
-
const W = De(
|
|
2313
|
+
const W = De(R.placement);
|
|
2284
2314
|
return W === x || // Create a bias to the `y` side axis due to horizontal
|
|
2285
2315
|
// reading directions favoring greater width.
|
|
2286
2316
|
W === "y";
|
|
2287
2317
|
}
|
|
2288
2318
|
return !0;
|
|
2289
|
-
}).map((
|
|
2319
|
+
}).map((R) => [R.placement, R.overflows.filter((W) => W > 0).reduce((W, ee) => W + ee, 0)]).sort((R, W) => R[1] - W[1])[0]) == null ? void 0 : D[0];
|
|
2290
2320
|
L && (_ = L);
|
|
2291
2321
|
break;
|
|
2292
2322
|
}
|
|
@@ -2314,9 +2344,9 @@ function Kn(e, t) {
|
|
|
2314
2344
|
};
|
|
2315
2345
|
}
|
|
2316
2346
|
function Gn(e) {
|
|
2317
|
-
return
|
|
2347
|
+
return Ci.some((t) => e[t] >= 0);
|
|
2318
2348
|
}
|
|
2319
|
-
const
|
|
2349
|
+
const Oi = function(e) {
|
|
2320
2350
|
return e === void 0 && (e = {}), {
|
|
2321
2351
|
name: "hide",
|
|
2322
2352
|
options: e,
|
|
@@ -2358,15 +2388,15 @@ const Ni = function(e) {
|
|
|
2358
2388
|
}
|
|
2359
2389
|
};
|
|
2360
2390
|
};
|
|
2361
|
-
async function
|
|
2391
|
+
async function Mi(e, t) {
|
|
2362
2392
|
const {
|
|
2363
2393
|
placement: n,
|
|
2364
2394
|
platform: r,
|
|
2365
2395
|
elements: o
|
|
2366
|
-
} = e, a = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Pe(n), s = at(n), l = De(n) === "y", c = ["left", "top"].includes(i) ? -1 : 1,
|
|
2396
|
+
} = e, a = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Pe(n), s = at(n), l = De(n) === "y", c = ["left", "top"].includes(i) ? -1 : 1, f = a && l ? -1 : 1, p = Ae(t, e);
|
|
2367
2397
|
let {
|
|
2368
2398
|
mainAxis: g,
|
|
2369
|
-
crossAxis:
|
|
2399
|
+
crossAxis: w,
|
|
2370
2400
|
alignmentAxis: m
|
|
2371
2401
|
} = typeof p == "number" ? {
|
|
2372
2402
|
mainAxis: p,
|
|
@@ -2377,15 +2407,15 @@ async function Oi(e, t) {
|
|
|
2377
2407
|
crossAxis: p.crossAxis || 0,
|
|
2378
2408
|
alignmentAxis: p.alignmentAxis
|
|
2379
2409
|
};
|
|
2380
|
-
return s && typeof m == "number" && (
|
|
2381
|
-
x:
|
|
2410
|
+
return s && typeof m == "number" && (w = s === "end" ? m * -1 : m), l ? {
|
|
2411
|
+
x: w * f,
|
|
2382
2412
|
y: g * c
|
|
2383
2413
|
} : {
|
|
2384
2414
|
x: g * c,
|
|
2385
|
-
y:
|
|
2415
|
+
y: w * f
|
|
2386
2416
|
};
|
|
2387
2417
|
}
|
|
2388
|
-
const
|
|
2418
|
+
const Li = function(e) {
|
|
2389
2419
|
return e === void 0 && (e = 0), {
|
|
2390
2420
|
name: "offset",
|
|
2391
2421
|
options: e,
|
|
@@ -2396,7 +2426,7 @@ const Mi = function(e) {
|
|
|
2396
2426
|
y: a,
|
|
2397
2427
|
placement: i,
|
|
2398
2428
|
middlewareData: s
|
|
2399
|
-
} = t, l = await
|
|
2429
|
+
} = t, l = await Mi(t, e);
|
|
2400
2430
|
return i === ((n = s.offset) == null ? void 0 : n.placement) && (r = s.arrow) != null && r.alignmentOffset ? {} : {
|
|
2401
2431
|
x: o + l.x,
|
|
2402
2432
|
y: a + l.y,
|
|
@@ -2407,7 +2437,7 @@ const Mi = function(e) {
|
|
|
2407
2437
|
};
|
|
2408
2438
|
}
|
|
2409
2439
|
};
|
|
2410
|
-
},
|
|
2440
|
+
}, Di = function(e) {
|
|
2411
2441
|
return e === void 0 && (e = {}), {
|
|
2412
2442
|
name: "shift",
|
|
2413
2443
|
options: e,
|
|
@@ -2420,11 +2450,11 @@ const Mi = function(e) {
|
|
|
2420
2450
|
mainAxis: a = !0,
|
|
2421
2451
|
crossAxis: i = !1,
|
|
2422
2452
|
limiter: s = {
|
|
2423
|
-
fn: (
|
|
2453
|
+
fn: (v) => {
|
|
2424
2454
|
let {
|
|
2425
2455
|
x: b,
|
|
2426
2456
|
y: x
|
|
2427
|
-
} =
|
|
2457
|
+
} = v;
|
|
2428
2458
|
return {
|
|
2429
2459
|
x: b,
|
|
2430
2460
|
y: x
|
|
@@ -2435,26 +2465,26 @@ const Mi = function(e) {
|
|
|
2435
2465
|
} = Ae(e, t), c = {
|
|
2436
2466
|
x: n,
|
|
2437
2467
|
y: r
|
|
2438
|
-
},
|
|
2439
|
-
let
|
|
2468
|
+
}, f = await gt(t, l), p = De(Pe(o)), g = Sn(p);
|
|
2469
|
+
let w = c[g], m = c[p];
|
|
2440
2470
|
if (a) {
|
|
2441
|
-
const
|
|
2442
|
-
|
|
2471
|
+
const v = g === "y" ? "top" : "left", b = g === "y" ? "bottom" : "right", x = w + f[v], y = w - f[b];
|
|
2472
|
+
w = ln(x, w, y);
|
|
2443
2473
|
}
|
|
2444
2474
|
if (i) {
|
|
2445
|
-
const
|
|
2475
|
+
const v = p === "y" ? "top" : "left", b = p === "y" ? "bottom" : "right", x = m + f[v], y = m - f[b];
|
|
2446
2476
|
m = ln(x, m, y);
|
|
2447
2477
|
}
|
|
2448
|
-
const
|
|
2478
|
+
const d = s.fn({
|
|
2449
2479
|
...t,
|
|
2450
|
-
[g]:
|
|
2480
|
+
[g]: w,
|
|
2451
2481
|
[p]: m
|
|
2452
2482
|
});
|
|
2453
2483
|
return {
|
|
2454
|
-
...
|
|
2484
|
+
...d,
|
|
2455
2485
|
data: {
|
|
2456
|
-
x:
|
|
2457
|
-
y:
|
|
2486
|
+
x: d.x - n,
|
|
2487
|
+
y: d.y - r,
|
|
2458
2488
|
enabled: {
|
|
2459
2489
|
[g]: a,
|
|
2460
2490
|
[p]: i
|
|
@@ -2463,7 +2493,7 @@ const Mi = function(e) {
|
|
|
2463
2493
|
};
|
|
2464
2494
|
}
|
|
2465
2495
|
};
|
|
2466
|
-
},
|
|
2496
|
+
}, Bi = function(e) {
|
|
2467
2497
|
return e === void 0 && (e = {}), {
|
|
2468
2498
|
options: e,
|
|
2469
2499
|
fn(t) {
|
|
@@ -2477,35 +2507,35 @@ const Mi = function(e) {
|
|
|
2477
2507
|
offset: s = 0,
|
|
2478
2508
|
mainAxis: l = !0,
|
|
2479
2509
|
crossAxis: c = !0
|
|
2480
|
-
} = Ae(e, t),
|
|
2510
|
+
} = Ae(e, t), f = {
|
|
2481
2511
|
x: n,
|
|
2482
2512
|
y: r
|
|
2483
2513
|
}, p = De(o), g = Sn(p);
|
|
2484
|
-
let
|
|
2485
|
-
const
|
|
2486
|
-
mainAxis:
|
|
2514
|
+
let w = f[g], m = f[p];
|
|
2515
|
+
const d = Ae(s, t), v = typeof d == "number" ? {
|
|
2516
|
+
mainAxis: d,
|
|
2487
2517
|
crossAxis: 0
|
|
2488
2518
|
} : {
|
|
2489
2519
|
mainAxis: 0,
|
|
2490
2520
|
crossAxis: 0,
|
|
2491
|
-
...
|
|
2521
|
+
...d
|
|
2492
2522
|
};
|
|
2493
2523
|
if (l) {
|
|
2494
|
-
const y = g === "y" ? "height" : "width", S = a.reference[g] - a.floating[y] +
|
|
2495
|
-
|
|
2524
|
+
const y = g === "y" ? "height" : "width", S = a.reference[g] - a.floating[y] + v.mainAxis, E = a.reference[g] + a.reference[y] - v.mainAxis;
|
|
2525
|
+
w < S ? w = S : w > E && (w = E);
|
|
2496
2526
|
}
|
|
2497
2527
|
if (c) {
|
|
2498
2528
|
var b, x;
|
|
2499
|
-
const y = g === "y" ? "width" : "height", S = ["top", "left"].includes(Pe(o)), E = a.reference[p] - a.floating[y] + (S && ((b = i.offset) == null ? void 0 : b[p]) || 0) + (S ? 0 :
|
|
2529
|
+
const y = g === "y" ? "width" : "height", S = ["top", "left"].includes(Pe(o)), E = a.reference[p] - a.floating[y] + (S && ((b = i.offset) == null ? void 0 : b[p]) || 0) + (S ? 0 : v.crossAxis), T = a.reference[p] + a.reference[y] + (S ? 0 : ((x = i.offset) == null ? void 0 : x[p]) || 0) - (S ? v.crossAxis : 0);
|
|
2500
2530
|
m < E ? m = E : m > T && (m = T);
|
|
2501
2531
|
}
|
|
2502
2532
|
return {
|
|
2503
|
-
[g]:
|
|
2533
|
+
[g]: w,
|
|
2504
2534
|
[p]: m
|
|
2505
2535
|
};
|
|
2506
2536
|
}
|
|
2507
2537
|
};
|
|
2508
|
-
},
|
|
2538
|
+
}, zi = function(e) {
|
|
2509
2539
|
return e === void 0 && (e = {}), {
|
|
2510
2540
|
name: "size",
|
|
2511
2541
|
options: e,
|
|
@@ -2520,25 +2550,25 @@ const Mi = function(e) {
|
|
|
2520
2550
|
apply: l = () => {
|
|
2521
2551
|
},
|
|
2522
2552
|
...c
|
|
2523
|
-
} = Ae(e, t),
|
|
2553
|
+
} = Ae(e, t), f = await gt(t, c), p = Pe(o), g = at(o), w = De(o) === "y", {
|
|
2524
2554
|
width: m,
|
|
2525
|
-
height:
|
|
2555
|
+
height: d
|
|
2526
2556
|
} = a.floating;
|
|
2527
|
-
let
|
|
2528
|
-
p === "top" || p === "bottom" ? (
|
|
2529
|
-
const x =
|
|
2530
|
-
let C = S,
|
|
2531
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (
|
|
2532
|
-
const M = ae(
|
|
2533
|
-
|
|
2557
|
+
let v, b;
|
|
2558
|
+
p === "top" || p === "bottom" ? (v = p, b = g === (await (i.isRTL == null ? void 0 : i.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (b = p, v = g === "end" ? "top" : "bottom");
|
|
2559
|
+
const x = d - f.top - f.bottom, y = m - f.left - f.right, S = Le(d - f[v], x), E = Le(m - f[b], y), T = !t.middlewareData.shift;
|
|
2560
|
+
let C = S, I = E;
|
|
2561
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (I = y), (r = t.middlewareData.shift) != null && r.enabled.y && (C = x), T && !g) {
|
|
2562
|
+
const M = ae(f.left, 0), V = ae(f.right, 0), $ = ae(f.top, 0), D = ae(f.bottom, 0);
|
|
2563
|
+
w ? I = m - 2 * (M !== 0 || V !== 0 ? M + V : ae(f.left, f.right)) : C = d - 2 * ($ !== 0 || D !== 0 ? $ + D : ae(f.top, f.bottom));
|
|
2534
2564
|
}
|
|
2535
2565
|
await l({
|
|
2536
2566
|
...t,
|
|
2537
|
-
availableWidth:
|
|
2567
|
+
availableWidth: I,
|
|
2538
2568
|
availableHeight: C
|
|
2539
2569
|
});
|
|
2540
2570
|
const O = await i.getDimensions(s.floating);
|
|
2541
|
-
return m !== O.width ||
|
|
2571
|
+
return m !== O.width || d !== O.height ? {
|
|
2542
2572
|
reset: {
|
|
2543
2573
|
rects: !0
|
|
2544
2574
|
}
|
|
@@ -2563,7 +2593,7 @@ function Se(e) {
|
|
|
2563
2593
|
function Lr(e) {
|
|
2564
2594
|
return Ft() ? e instanceof Node || e instanceof ie(e).Node : !1;
|
|
2565
2595
|
}
|
|
2566
|
-
function
|
|
2596
|
+
function fe(e) {
|
|
2567
2597
|
return Ft() ? e instanceof Element || e instanceof ie(e).Element : !1;
|
|
2568
2598
|
}
|
|
2569
2599
|
function Ce(e) {
|
|
@@ -2578,10 +2608,10 @@ function bt(e) {
|
|
|
2578
2608
|
overflowX: n,
|
|
2579
2609
|
overflowY: r,
|
|
2580
2610
|
display: o
|
|
2581
|
-
} =
|
|
2611
|
+
} = pe(e);
|
|
2582
2612
|
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
|
|
2583
2613
|
}
|
|
2584
|
-
function
|
|
2614
|
+
function Fi(e) {
|
|
2585
2615
|
return ["table", "td", "th"].includes(it(e));
|
|
2586
2616
|
}
|
|
2587
2617
|
function Vt(e) {
|
|
@@ -2594,10 +2624,10 @@ function Vt(e) {
|
|
|
2594
2624
|
});
|
|
2595
2625
|
}
|
|
2596
2626
|
function Tn(e) {
|
|
2597
|
-
const t = An(), n =
|
|
2627
|
+
const t = An(), n = fe(e) ? pe(e) : e;
|
|
2598
2628
|
return ["transform", "translate", "scale", "rotate", "perspective"].some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
|
|
2599
2629
|
}
|
|
2600
|
-
function
|
|
2630
|
+
function Vi(e) {
|
|
2601
2631
|
let t = Be(e);
|
|
2602
2632
|
for (; Ce(t) && !nt(t); ) {
|
|
2603
2633
|
if (Tn(t))
|
|
@@ -2614,11 +2644,11 @@ function An() {
|
|
|
2614
2644
|
function nt(e) {
|
|
2615
2645
|
return ["html", "body", "#document"].includes(it(e));
|
|
2616
2646
|
}
|
|
2617
|
-
function
|
|
2647
|
+
function pe(e) {
|
|
2618
2648
|
return ie(e).getComputedStyle(e);
|
|
2619
2649
|
}
|
|
2620
2650
|
function $t(e) {
|
|
2621
|
-
return
|
|
2651
|
+
return fe(e) ? {
|
|
2622
2652
|
scrollLeft: e.scrollLeft,
|
|
2623
2653
|
scrollTop: e.scrollTop
|
|
2624
2654
|
} : {
|
|
@@ -2656,7 +2686,7 @@ function un(e) {
|
|
|
2656
2686
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
2657
2687
|
}
|
|
2658
2688
|
function Br(e) {
|
|
2659
|
-
const t =
|
|
2689
|
+
const t = pe(e);
|
|
2660
2690
|
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
2661
2691
|
const o = Ce(e), a = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, s = Nt(n) !== a || Nt(r) !== i;
|
|
2662
2692
|
return s && (n = a, r = i), {
|
|
@@ -2666,7 +2696,7 @@ function Br(e) {
|
|
|
2666
2696
|
};
|
|
2667
2697
|
}
|
|
2668
2698
|
function Pn(e) {
|
|
2669
|
-
return
|
|
2699
|
+
return fe(e) ? e : e.contextElement;
|
|
2670
2700
|
}
|
|
2671
2701
|
function et(e) {
|
|
2672
2702
|
const t = Pn(e);
|
|
@@ -2683,55 +2713,55 @@ function et(e) {
|
|
|
2683
2713
|
y: s
|
|
2684
2714
|
};
|
|
2685
2715
|
}
|
|
2686
|
-
const
|
|
2716
|
+
const $i = /* @__PURE__ */ ye(0);
|
|
2687
2717
|
function zr(e) {
|
|
2688
2718
|
const t = ie(e);
|
|
2689
|
-
return !An() || !t.visualViewport ?
|
|
2719
|
+
return !An() || !t.visualViewport ? $i : {
|
|
2690
2720
|
x: t.visualViewport.offsetLeft,
|
|
2691
2721
|
y: t.visualViewport.offsetTop
|
|
2692
2722
|
};
|
|
2693
2723
|
}
|
|
2694
|
-
function
|
|
2724
|
+
function Wi(e, t, n) {
|
|
2695
2725
|
return t === void 0 && (t = !1), !n || t && n !== ie(e) ? !1 : t;
|
|
2696
2726
|
}
|
|
2697
|
-
function
|
|
2727
|
+
function He(e, t, n, r) {
|
|
2698
2728
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
2699
2729
|
const o = e.getBoundingClientRect(), a = Pn(e);
|
|
2700
2730
|
let i = ye(1);
|
|
2701
|
-
t && (r ?
|
|
2702
|
-
const s =
|
|
2703
|
-
let l = (o.left + s.x) / i.x, c = (o.top + s.y) / i.y,
|
|
2731
|
+
t && (r ? fe(r) && (i = et(r)) : i = et(e));
|
|
2732
|
+
const s = Wi(a, n, r) ? zr(a) : ye(0);
|
|
2733
|
+
let l = (o.left + s.x) / i.x, c = (o.top + s.y) / i.y, f = o.width / i.x, p = o.height / i.y;
|
|
2704
2734
|
if (a) {
|
|
2705
|
-
const g = ie(a),
|
|
2706
|
-
let m = g,
|
|
2707
|
-
for (;
|
|
2708
|
-
const
|
|
2709
|
-
l *=
|
|
2735
|
+
const g = ie(a), w = r && fe(r) ? ie(r) : r;
|
|
2736
|
+
let m = g, d = un(m);
|
|
2737
|
+
for (; d && r && w !== m; ) {
|
|
2738
|
+
const v = et(d), b = d.getBoundingClientRect(), x = pe(d), y = b.left + (d.clientLeft + parseFloat(x.paddingLeft)) * v.x, S = b.top + (d.clientTop + parseFloat(x.paddingTop)) * v.y;
|
|
2739
|
+
l *= v.x, c *= v.y, f *= v.x, p *= v.y, l += y, c += S, m = ie(d), d = un(m);
|
|
2710
2740
|
}
|
|
2711
2741
|
}
|
|
2712
2742
|
return Mt({
|
|
2713
|
-
width:
|
|
2743
|
+
width: f,
|
|
2714
2744
|
height: p,
|
|
2715
2745
|
x: l,
|
|
2716
2746
|
y: c
|
|
2717
2747
|
});
|
|
2718
2748
|
}
|
|
2719
|
-
function
|
|
2749
|
+
function In(e, t) {
|
|
2720
2750
|
const n = $t(e).scrollLeft;
|
|
2721
|
-
return t ? t.left + n :
|
|
2751
|
+
return t ? t.left + n : He(Se(e)).left + n;
|
|
2722
2752
|
}
|
|
2723
2753
|
function Fr(e, t, n) {
|
|
2724
2754
|
n === void 0 && (n = !1);
|
|
2725
2755
|
const r = e.getBoundingClientRect(), o = r.left + t.scrollLeft - (n ? 0 : (
|
|
2726
2756
|
// RTL <body> scrollbar.
|
|
2727
|
-
|
|
2757
|
+
In(e, r)
|
|
2728
2758
|
)), a = r.top + t.scrollTop;
|
|
2729
2759
|
return {
|
|
2730
2760
|
x: o,
|
|
2731
2761
|
y: a
|
|
2732
2762
|
};
|
|
2733
2763
|
}
|
|
2734
|
-
function
|
|
2764
|
+
function Ui(e) {
|
|
2735
2765
|
let {
|
|
2736
2766
|
elements: t,
|
|
2737
2767
|
rect: n,
|
|
@@ -2745,34 +2775,34 @@ function Wi(e) {
|
|
|
2745
2775
|
scrollLeft: 0,
|
|
2746
2776
|
scrollTop: 0
|
|
2747
2777
|
}, c = ye(1);
|
|
2748
|
-
const
|
|
2778
|
+
const f = ye(0), p = Ce(r);
|
|
2749
2779
|
if ((p || !p && !a) && ((it(r) !== "body" || bt(i)) && (l = $t(r)), Ce(r))) {
|
|
2750
|
-
const
|
|
2751
|
-
c = et(r),
|
|
2780
|
+
const w = He(r);
|
|
2781
|
+
c = et(r), f.x = w.x + r.clientLeft, f.y = w.y + r.clientTop;
|
|
2752
2782
|
}
|
|
2753
2783
|
const g = i && !p && !a ? Fr(i, l, !0) : ye(0);
|
|
2754
2784
|
return {
|
|
2755
2785
|
width: n.width * c.x,
|
|
2756
2786
|
height: n.height * c.y,
|
|
2757
|
-
x: n.x * c.x - l.scrollLeft * c.x +
|
|
2758
|
-
y: n.y * c.y - l.scrollTop * c.y +
|
|
2787
|
+
x: n.x * c.x - l.scrollLeft * c.x + f.x + g.x,
|
|
2788
|
+
y: n.y * c.y - l.scrollTop * c.y + f.y + g.y
|
|
2759
2789
|
};
|
|
2760
2790
|
}
|
|
2761
|
-
function
|
|
2791
|
+
function Hi(e) {
|
|
2762
2792
|
return Array.from(e.getClientRects());
|
|
2763
2793
|
}
|
|
2764
|
-
function
|
|
2794
|
+
function ji(e) {
|
|
2765
2795
|
const t = Se(e), n = $t(e), r = e.ownerDocument.body, o = ae(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = ae(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
2766
|
-
let i = -n.scrollLeft +
|
|
2796
|
+
let i = -n.scrollLeft + In(e);
|
|
2767
2797
|
const s = -n.scrollTop;
|
|
2768
|
-
return
|
|
2798
|
+
return pe(r).direction === "rtl" && (i += ae(t.clientWidth, r.clientWidth) - o), {
|
|
2769
2799
|
width: o,
|
|
2770
2800
|
height: a,
|
|
2771
2801
|
x: i,
|
|
2772
2802
|
y: s
|
|
2773
2803
|
};
|
|
2774
2804
|
}
|
|
2775
|
-
function
|
|
2805
|
+
function Yi(e, t) {
|
|
2776
2806
|
const n = ie(e), r = Se(e), o = n.visualViewport;
|
|
2777
2807
|
let a = r.clientWidth, i = r.clientHeight, s = 0, l = 0;
|
|
2778
2808
|
if (o) {
|
|
@@ -2787,8 +2817,8 @@ function ji(e, t) {
|
|
|
2787
2817
|
y: l
|
|
2788
2818
|
};
|
|
2789
2819
|
}
|
|
2790
|
-
function
|
|
2791
|
-
const n =
|
|
2820
|
+
function Xi(e, t) {
|
|
2821
|
+
const n = He(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, a = Ce(e) ? et(e) : ye(1), i = e.clientWidth * a.x, s = e.clientHeight * a.y, l = o * a.x, c = r * a.y;
|
|
2792
2822
|
return {
|
|
2793
2823
|
width: i,
|
|
2794
2824
|
height: s,
|
|
@@ -2799,11 +2829,11 @@ function Yi(e, t) {
|
|
|
2799
2829
|
function qn(e, t, n) {
|
|
2800
2830
|
let r;
|
|
2801
2831
|
if (t === "viewport")
|
|
2802
|
-
r =
|
|
2832
|
+
r = Yi(e, n);
|
|
2803
2833
|
else if (t === "document")
|
|
2804
|
-
r =
|
|
2805
|
-
else if (
|
|
2806
|
-
r =
|
|
2834
|
+
r = ji(Se(e));
|
|
2835
|
+
else if (fe(t))
|
|
2836
|
+
r = Xi(t, n);
|
|
2807
2837
|
else {
|
|
2808
2838
|
const o = zr(e);
|
|
2809
2839
|
r = {
|
|
@@ -2817,30 +2847,30 @@ function qn(e, t, n) {
|
|
|
2817
2847
|
}
|
|
2818
2848
|
function Vr(e, t) {
|
|
2819
2849
|
const n = Be(e);
|
|
2820
|
-
return n === t || !
|
|
2850
|
+
return n === t || !fe(n) || nt(n) ? !1 : pe(n).position === "fixed" || Vr(n, t);
|
|
2821
2851
|
}
|
|
2822
|
-
function
|
|
2852
|
+
function Ki(e, t) {
|
|
2823
2853
|
const n = t.get(e);
|
|
2824
2854
|
if (n)
|
|
2825
2855
|
return n;
|
|
2826
|
-
let r = mt(e, [], !1).filter((s) =>
|
|
2827
|
-
const a =
|
|
2856
|
+
let r = mt(e, [], !1).filter((s) => fe(s) && it(s) !== "body"), o = null;
|
|
2857
|
+
const a = pe(e).position === "fixed";
|
|
2828
2858
|
let i = a ? Be(e) : e;
|
|
2829
|
-
for (;
|
|
2830
|
-
const s =
|
|
2831
|
-
!l && s.position === "fixed" && (o = null), (a ? !l && !o : !l && s.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || bt(i) && !l && Vr(e, i)) ? r = r.filter((
|
|
2859
|
+
for (; fe(i) && !nt(i); ) {
|
|
2860
|
+
const s = pe(i), l = Tn(i);
|
|
2861
|
+
!l && s.position === "fixed" && (o = null), (a ? !l && !o : !l && s.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || bt(i) && !l && Vr(e, i)) ? r = r.filter((f) => f !== i) : o = s, i = Be(i);
|
|
2832
2862
|
}
|
|
2833
2863
|
return t.set(e, r), r;
|
|
2834
2864
|
}
|
|
2835
|
-
function
|
|
2865
|
+
function Gi(e) {
|
|
2836
2866
|
let {
|
|
2837
2867
|
element: t,
|
|
2838
2868
|
boundary: n,
|
|
2839
2869
|
rootBoundary: r,
|
|
2840
2870
|
strategy: o
|
|
2841
2871
|
} = e;
|
|
2842
|
-
const i = [...n === "clippingAncestors" ? Vt(t) ? [] :
|
|
2843
|
-
const p = qn(t,
|
|
2872
|
+
const i = [...n === "clippingAncestors" ? Vt(t) ? [] : Ki(t, this._c) : [].concat(n), r], s = i[0], l = i.reduce((c, f) => {
|
|
2873
|
+
const p = qn(t, f, o);
|
|
2844
2874
|
return c.top = ae(p.top, c.top), c.right = Le(p.right, c.right), c.bottom = Le(p.bottom, c.bottom), c.left = ae(p.left, c.left), c;
|
|
2845
2875
|
}, qn(t, s, o));
|
|
2846
2876
|
return {
|
|
@@ -2850,7 +2880,7 @@ function Ki(e) {
|
|
|
2850
2880
|
y: l.top
|
|
2851
2881
|
};
|
|
2852
2882
|
}
|
|
2853
|
-
function
|
|
2883
|
+
function Zi(e) {
|
|
2854
2884
|
const {
|
|
2855
2885
|
width: t,
|
|
2856
2886
|
height: n
|
|
@@ -2860,8 +2890,8 @@ function Gi(e) {
|
|
|
2860
2890
|
height: n
|
|
2861
2891
|
};
|
|
2862
2892
|
}
|
|
2863
|
-
function
|
|
2864
|
-
const r = Ce(t), o = Se(t), a = n === "fixed", i =
|
|
2893
|
+
function qi(e, t, n) {
|
|
2894
|
+
const r = Ce(t), o = Se(t), a = n === "fixed", i = He(e, !0, a, t);
|
|
2865
2895
|
let s = {
|
|
2866
2896
|
scrollLeft: 0,
|
|
2867
2897
|
scrollTop: 0
|
|
@@ -2869,22 +2899,22 @@ function Zi(e, t, n) {
|
|
|
2869
2899
|
const l = ye(0);
|
|
2870
2900
|
if (r || !r && !a)
|
|
2871
2901
|
if ((it(t) !== "body" || bt(o)) && (s = $t(t)), r) {
|
|
2872
|
-
const g =
|
|
2902
|
+
const g = He(t, !0, a, t);
|
|
2873
2903
|
l.x = g.x + t.clientLeft, l.y = g.y + t.clientTop;
|
|
2874
|
-
} else o && (l.x =
|
|
2875
|
-
const c = o && !r && !a ? Fr(o, s) : ye(0),
|
|
2904
|
+
} else o && (l.x = In(o));
|
|
2905
|
+
const c = o && !r && !a ? Fr(o, s) : ye(0), f = i.left + s.scrollLeft - l.x - c.x, p = i.top + s.scrollTop - l.y - c.y;
|
|
2876
2906
|
return {
|
|
2877
|
-
x:
|
|
2907
|
+
x: f,
|
|
2878
2908
|
y: p,
|
|
2879
2909
|
width: i.width,
|
|
2880
2910
|
height: i.height
|
|
2881
2911
|
};
|
|
2882
2912
|
}
|
|
2883
2913
|
function qt(e) {
|
|
2884
|
-
return
|
|
2914
|
+
return pe(e).position === "static";
|
|
2885
2915
|
}
|
|
2886
2916
|
function Qn(e, t) {
|
|
2887
|
-
if (!Ce(e) ||
|
|
2917
|
+
if (!Ce(e) || pe(e).position === "fixed")
|
|
2888
2918
|
return null;
|
|
2889
2919
|
if (t)
|
|
2890
2920
|
return t(e);
|
|
@@ -2898,21 +2928,21 @@ function $r(e, t) {
|
|
|
2898
2928
|
if (!Ce(e)) {
|
|
2899
2929
|
let o = Be(e);
|
|
2900
2930
|
for (; o && !nt(o); ) {
|
|
2901
|
-
if (
|
|
2931
|
+
if (fe(o) && !qt(o))
|
|
2902
2932
|
return o;
|
|
2903
2933
|
o = Be(o);
|
|
2904
2934
|
}
|
|
2905
2935
|
return n;
|
|
2906
2936
|
}
|
|
2907
2937
|
let r = Qn(e, t);
|
|
2908
|
-
for (; r &&
|
|
2938
|
+
for (; r && Fi(r) && qt(r); )
|
|
2909
2939
|
r = Qn(r, t);
|
|
2910
|
-
return r && nt(r) && qt(r) && !Tn(r) ? n : r ||
|
|
2940
|
+
return r && nt(r) && qt(r) && !Tn(r) ? n : r || Vi(e) || n;
|
|
2911
2941
|
}
|
|
2912
|
-
const
|
|
2942
|
+
const Qi = async function(e) {
|
|
2913
2943
|
const t = this.getOffsetParent || $r, n = this.getDimensions, r = await n(e.floating);
|
|
2914
2944
|
return {
|
|
2915
|
-
reference:
|
|
2945
|
+
reference: qi(e.reference, await t(e.floating), e.strategy),
|
|
2916
2946
|
floating: {
|
|
2917
2947
|
x: 0,
|
|
2918
2948
|
y: 0,
|
|
@@ -2921,25 +2951,25 @@ const qi = async function(e) {
|
|
|
2921
2951
|
}
|
|
2922
2952
|
};
|
|
2923
2953
|
};
|
|
2924
|
-
function
|
|
2925
|
-
return
|
|
2954
|
+
function Ji(e) {
|
|
2955
|
+
return pe(e).direction === "rtl";
|
|
2926
2956
|
}
|
|
2927
|
-
const
|
|
2928
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
2957
|
+
const es = {
|
|
2958
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Ui,
|
|
2929
2959
|
getDocumentElement: Se,
|
|
2930
|
-
getClippingRect:
|
|
2960
|
+
getClippingRect: Gi,
|
|
2931
2961
|
getOffsetParent: $r,
|
|
2932
|
-
getElementRects:
|
|
2933
|
-
getClientRects:
|
|
2934
|
-
getDimensions:
|
|
2962
|
+
getElementRects: Qi,
|
|
2963
|
+
getClientRects: Hi,
|
|
2964
|
+
getDimensions: Zi,
|
|
2935
2965
|
getScale: et,
|
|
2936
|
-
isElement:
|
|
2937
|
-
isRTL:
|
|
2966
|
+
isElement: fe,
|
|
2967
|
+
isRTL: Ji
|
|
2938
2968
|
};
|
|
2939
2969
|
function Wr(e, t) {
|
|
2940
2970
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
2941
2971
|
}
|
|
2942
|
-
function
|
|
2972
|
+
function ts(e, t) {
|
|
2943
2973
|
let n = null, r;
|
|
2944
2974
|
const o = Se(e);
|
|
2945
2975
|
function a() {
|
|
@@ -2949,15 +2979,15 @@ function es(e, t) {
|
|
|
2949
2979
|
function i(s, l) {
|
|
2950
2980
|
s === void 0 && (s = !1), l === void 0 && (l = 1), a();
|
|
2951
2981
|
const c = e.getBoundingClientRect(), {
|
|
2952
|
-
left:
|
|
2982
|
+
left: f,
|
|
2953
2983
|
top: p,
|
|
2954
2984
|
width: g,
|
|
2955
|
-
height:
|
|
2985
|
+
height: w
|
|
2956
2986
|
} = c;
|
|
2957
|
-
if (s || t(), !g || !
|
|
2987
|
+
if (s || t(), !g || !w)
|
|
2958
2988
|
return;
|
|
2959
|
-
const m = Ct(p),
|
|
2960
|
-
rootMargin: -m + "px " + -
|
|
2989
|
+
const m = Ct(p), d = Ct(o.clientWidth - (f + g)), v = Ct(o.clientHeight - (p + w)), b = Ct(f), y = {
|
|
2990
|
+
rootMargin: -m + "px " + -d + "px " + -v + "px " + -b + "px",
|
|
2961
2991
|
threshold: ae(0, Le(1, l)) || 1
|
|
2962
2992
|
};
|
|
2963
2993
|
let S = !0;
|
|
@@ -2985,7 +3015,7 @@ function es(e, t) {
|
|
|
2985
3015
|
}
|
|
2986
3016
|
return i(!0), a;
|
|
2987
3017
|
}
|
|
2988
|
-
function
|
|
3018
|
+
function ns(e, t, n, r) {
|
|
2989
3019
|
r === void 0 && (r = {});
|
|
2990
3020
|
const {
|
|
2991
3021
|
ancestorScroll: o = !0,
|
|
@@ -2993,37 +3023,37 @@ function ts(e, t, n, r) {
|
|
|
2993
3023
|
elementResize: i = typeof ResizeObserver == "function",
|
|
2994
3024
|
layoutShift: s = typeof IntersectionObserver == "function",
|
|
2995
3025
|
animationFrame: l = !1
|
|
2996
|
-
} = r, c = Pn(e),
|
|
2997
|
-
|
|
3026
|
+
} = r, c = Pn(e), f = o || a ? [...c ? mt(c) : [], ...mt(t)] : [];
|
|
3027
|
+
f.forEach((b) => {
|
|
2998
3028
|
o && b.addEventListener("scroll", n, {
|
|
2999
3029
|
passive: !0
|
|
3000
3030
|
}), a && b.addEventListener("resize", n);
|
|
3001
3031
|
});
|
|
3002
|
-
const p = c && s ?
|
|
3003
|
-
let g = -1,
|
|
3004
|
-
i && (
|
|
3032
|
+
const p = c && s ? ts(c, n) : null;
|
|
3033
|
+
let g = -1, w = null;
|
|
3034
|
+
i && (w = new ResizeObserver((b) => {
|
|
3005
3035
|
let [x] = b;
|
|
3006
|
-
x && x.target === c &&
|
|
3036
|
+
x && x.target === c && w && (w.unobserve(t), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
|
|
3007
3037
|
var y;
|
|
3008
|
-
(y =
|
|
3038
|
+
(y = w) == null || y.observe(t);
|
|
3009
3039
|
})), n();
|
|
3010
|
-
}), c && !l &&
|
|
3011
|
-
let m,
|
|
3012
|
-
l &&
|
|
3013
|
-
function
|
|
3014
|
-
const b =
|
|
3015
|
-
|
|
3040
|
+
}), c && !l && w.observe(c), w.observe(t));
|
|
3041
|
+
let m, d = l ? He(e) : null;
|
|
3042
|
+
l && v();
|
|
3043
|
+
function v() {
|
|
3044
|
+
const b = He(e);
|
|
3045
|
+
d && !Wr(d, b) && n(), d = b, m = requestAnimationFrame(v);
|
|
3016
3046
|
}
|
|
3017
3047
|
return n(), () => {
|
|
3018
3048
|
var b;
|
|
3019
|
-
|
|
3049
|
+
f.forEach((x) => {
|
|
3020
3050
|
o && x.removeEventListener("scroll", n), a && x.removeEventListener("resize", n);
|
|
3021
|
-
}), p == null || p(), (b =
|
|
3051
|
+
}), p == null || p(), (b = w) == null || b.disconnect(), w = null, l && cancelAnimationFrame(m);
|
|
3022
3052
|
};
|
|
3023
3053
|
}
|
|
3024
|
-
const
|
|
3054
|
+
const rs = Li, os = Di, as = Ni, is = zi, ss = Oi, Jn = _i, ls = Bi, cs = (e, t, n) => {
|
|
3025
3055
|
const r = /* @__PURE__ */ new Map(), o = {
|
|
3026
|
-
platform:
|
|
3056
|
+
platform: es,
|
|
3027
3057
|
...n
|
|
3028
3058
|
}, a = {
|
|
3029
3059
|
...o.platform,
|
|
@@ -3078,7 +3108,7 @@ function Qt(e) {
|
|
|
3078
3108
|
t.current = e;
|
|
3079
3109
|
}), t;
|
|
3080
3110
|
}
|
|
3081
|
-
function
|
|
3111
|
+
function us(e) {
|
|
3082
3112
|
e === void 0 && (e = {});
|
|
3083
3113
|
const {
|
|
3084
3114
|
placement: t = "bottom",
|
|
@@ -3092,28 +3122,28 @@ function cs(e) {
|
|
|
3092
3122
|
transform: s = !0,
|
|
3093
3123
|
whileElementsMounted: l,
|
|
3094
3124
|
open: c
|
|
3095
|
-
} = e, [
|
|
3125
|
+
} = e, [f, p] = u.useState({
|
|
3096
3126
|
x: 0,
|
|
3097
3127
|
y: 0,
|
|
3098
3128
|
strategy: n,
|
|
3099
3129
|
placement: t,
|
|
3100
3130
|
middlewareData: {},
|
|
3101
3131
|
isPositioned: !1
|
|
3102
|
-
}), [g,
|
|
3103
|
-
Lt(g, r) ||
|
|
3104
|
-
const [m,
|
|
3105
|
-
|
|
3106
|
-
}, []), y = u.useCallback((
|
|
3107
|
-
|
|
3108
|
-
}, []), S = a || m, E = i ||
|
|
3132
|
+
}), [g, w] = u.useState(r);
|
|
3133
|
+
Lt(g, r) || w(r);
|
|
3134
|
+
const [m, d] = u.useState(null), [v, b] = u.useState(null), x = u.useCallback((R) => {
|
|
3135
|
+
R !== T.current && (T.current = R, d(R));
|
|
3136
|
+
}, []), y = u.useCallback((R) => {
|
|
3137
|
+
R !== C.current && (C.current = R, b(R));
|
|
3138
|
+
}, []), S = a || m, E = i || v, T = u.useRef(null), C = u.useRef(null), I = u.useRef(f), O = l != null, M = Qt(l), V = Qt(o), $ = Qt(c), D = u.useCallback(() => {
|
|
3109
3139
|
if (!T.current || !C.current)
|
|
3110
3140
|
return;
|
|
3111
|
-
const
|
|
3141
|
+
const R = {
|
|
3112
3142
|
placement: t,
|
|
3113
3143
|
strategy: n,
|
|
3114
3144
|
middleware: g
|
|
3115
3145
|
};
|
|
3116
|
-
V.current && (
|
|
3146
|
+
V.current && (R.platform = V.current), cs(T.current, C.current, R).then((W) => {
|
|
3117
3147
|
const ee = {
|
|
3118
3148
|
...W,
|
|
3119
3149
|
// The floating element's position may be recomputed while it's closed
|
|
@@ -3122,14 +3152,14 @@ function cs(e) {
|
|
|
3122
3152
|
// setting it to `true` when `open === false` (must be specified).
|
|
3123
3153
|
isPositioned: $.current !== !1
|
|
3124
3154
|
};
|
|
3125
|
-
N.current && !Lt(
|
|
3155
|
+
N.current && !Lt(I.current, ee) && (I.current = ee, u.flushSync(() => {
|
|
3126
3156
|
p(ee);
|
|
3127
3157
|
}));
|
|
3128
3158
|
});
|
|
3129
3159
|
}, [g, t, n, V, $]);
|
|
3130
3160
|
Pt(() => {
|
|
3131
|
-
c === !1 &&
|
|
3132
|
-
...
|
|
3161
|
+
c === !1 && I.current.isPositioned && (I.current.isPositioned = !1, p((R) => ({
|
|
3162
|
+
...R,
|
|
3133
3163
|
isPositioned: !1
|
|
3134
3164
|
})));
|
|
3135
3165
|
}, [c]);
|
|
@@ -3152,16 +3182,16 @@ function cs(e) {
|
|
|
3152
3182
|
reference: S,
|
|
3153
3183
|
floating: E
|
|
3154
3184
|
}), [S, E]), L = u.useMemo(() => {
|
|
3155
|
-
const
|
|
3185
|
+
const R = {
|
|
3156
3186
|
position: n,
|
|
3157
3187
|
left: 0,
|
|
3158
3188
|
top: 0
|
|
3159
3189
|
};
|
|
3160
3190
|
if (!_.floating)
|
|
3161
|
-
return
|
|
3162
|
-
const W = er(_.floating,
|
|
3191
|
+
return R;
|
|
3192
|
+
const W = er(_.floating, f.x), ee = er(_.floating, f.y);
|
|
3163
3193
|
return s ? {
|
|
3164
|
-
...
|
|
3194
|
+
...R,
|
|
3165
3195
|
transform: "translate(" + W + "px, " + ee + "px)",
|
|
3166
3196
|
...Ur(_.floating) >= 1.5 && {
|
|
3167
3197
|
willChange: "transform"
|
|
@@ -3171,16 +3201,16 @@ function cs(e) {
|
|
|
3171
3201
|
left: W,
|
|
3172
3202
|
top: ee
|
|
3173
3203
|
};
|
|
3174
|
-
}, [n, s, _.floating,
|
|
3204
|
+
}, [n, s, _.floating, f.x, f.y]);
|
|
3175
3205
|
return u.useMemo(() => ({
|
|
3176
|
-
...
|
|
3206
|
+
...f,
|
|
3177
3207
|
update: D,
|
|
3178
3208
|
refs: X,
|
|
3179
3209
|
elements: _,
|
|
3180
3210
|
floatingStyles: L
|
|
3181
|
-
}), [
|
|
3211
|
+
}), [f, D, X, _, L]);
|
|
3182
3212
|
}
|
|
3183
|
-
const
|
|
3213
|
+
const ds = (e) => {
|
|
3184
3214
|
function t(n) {
|
|
3185
3215
|
return {}.hasOwnProperty.call(n, "current");
|
|
3186
3216
|
}
|
|
@@ -3201,17 +3231,14 @@ const us = (e) => {
|
|
|
3201
3231
|
}).fn(n) : {};
|
|
3202
3232
|
}
|
|
3203
3233
|
};
|
|
3204
|
-
},
|
|
3205
|
-
...ns(e),
|
|
3206
|
-
options: [e, t]
|
|
3207
|
-
}), fs = (e, t) => ({
|
|
3234
|
+
}, fs = (e, t) => ({
|
|
3208
3235
|
...rs(e),
|
|
3209
3236
|
options: [e, t]
|
|
3210
3237
|
}), ps = (e, t) => ({
|
|
3211
|
-
...
|
|
3238
|
+
...os(e),
|
|
3212
3239
|
options: [e, t]
|
|
3213
3240
|
}), hs = (e, t) => ({
|
|
3214
|
-
...
|
|
3241
|
+
...ls(e),
|
|
3215
3242
|
options: [e, t]
|
|
3216
3243
|
}), vs = (e, t) => ({
|
|
3217
3244
|
...as(e),
|
|
@@ -3220,10 +3247,13 @@ const us = (e) => {
|
|
|
3220
3247
|
...is(e),
|
|
3221
3248
|
options: [e, t]
|
|
3222
3249
|
}), ms = (e, t) => ({
|
|
3223
|
-
...
|
|
3250
|
+
...ss(e),
|
|
3251
|
+
options: [e, t]
|
|
3252
|
+
}), ws = (e, t) => ({
|
|
3253
|
+
...ds(e),
|
|
3224
3254
|
options: [e, t]
|
|
3225
3255
|
});
|
|
3226
|
-
var
|
|
3256
|
+
var bs = "Arrow", Hr = u.forwardRef((e, t) => {
|
|
3227
3257
|
const { children: n, width: r = 10, height: o = 5, ...a } = e;
|
|
3228
3258
|
return /* @__PURE__ */ k(
|
|
3229
3259
|
K.svg,
|
|
@@ -3238,9 +3268,9 @@ var ws = "Arrow", Hr = u.forwardRef((e, t) => {
|
|
|
3238
3268
|
}
|
|
3239
3269
|
);
|
|
3240
3270
|
});
|
|
3241
|
-
Hr.displayName =
|
|
3242
|
-
var
|
|
3243
|
-
function
|
|
3271
|
+
Hr.displayName = bs;
|
|
3272
|
+
var xs = Hr;
|
|
3273
|
+
function ys(e) {
|
|
3244
3274
|
const [t, n] = u.useState(void 0);
|
|
3245
3275
|
return te(() => {
|
|
3246
3276
|
if (e) {
|
|
@@ -3262,11 +3292,11 @@ function xs(e) {
|
|
|
3262
3292
|
n(void 0);
|
|
3263
3293
|
}, [e]), t;
|
|
3264
3294
|
}
|
|
3265
|
-
var
|
|
3295
|
+
var Rn = "Popper", [jr, Yr] = yn(Rn), [Cs, Xr] = jr(Rn), Kr = (e) => {
|
|
3266
3296
|
const { __scopePopper: t, children: n } = e, [r, o] = u.useState(null);
|
|
3267
|
-
return /* @__PURE__ */ k(
|
|
3297
|
+
return /* @__PURE__ */ k(Cs, { scope: t, anchor: r, onAnchorChange: o, children: n });
|
|
3268
3298
|
};
|
|
3269
|
-
Kr.displayName =
|
|
3299
|
+
Kr.displayName = Rn;
|
|
3270
3300
|
var Gr = "PopperAnchor", Zr = u.forwardRef(
|
|
3271
3301
|
(e, t) => {
|
|
3272
3302
|
const { __scopePopper: n, virtualRef: r, ...o } = e, a = Xr(Gr, n), i = u.useRef(null), s = Z(t, i);
|
|
@@ -3276,7 +3306,7 @@ var Gr = "PopperAnchor", Zr = u.forwardRef(
|
|
|
3276
3306
|
}
|
|
3277
3307
|
);
|
|
3278
3308
|
Zr.displayName = Gr;
|
|
3279
|
-
var _n = "PopperContent", [
|
|
3309
|
+
var _n = "PopperContent", [Ss, Es] = jr(_n), qr = u.forwardRef(
|
|
3280
3310
|
(e, t) => {
|
|
3281
3311
|
var A, U, Q, F, B, z;
|
|
3282
3312
|
const {
|
|
@@ -3288,52 +3318,52 @@ var _n = "PopperContent", [Cs, Ss] = jr(_n), qr = u.forwardRef(
|
|
|
3288
3318
|
arrowPadding: s = 0,
|
|
3289
3319
|
avoidCollisions: l = !0,
|
|
3290
3320
|
collisionBoundary: c = [],
|
|
3291
|
-
collisionPadding:
|
|
3321
|
+
collisionPadding: f = 0,
|
|
3292
3322
|
sticky: p = "partial",
|
|
3293
3323
|
hideWhenDetached: g = !1,
|
|
3294
|
-
updatePositionStrategy:
|
|
3324
|
+
updatePositionStrategy: w = "optimized",
|
|
3295
3325
|
onPlaced: m,
|
|
3296
|
-
...
|
|
3297
|
-
} = e,
|
|
3326
|
+
...d
|
|
3327
|
+
} = e, v = Xr(_n, n), [b, x] = u.useState(null), y = Z(t, (oe) => x(oe)), [S, E] = u.useState(null), T = ys(S), C = (T == null ? void 0 : T.width) ?? 0, I = (T == null ? void 0 : T.height) ?? 0, O = r + (a !== "center" ? "-" + a : ""), M = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, V = Array.isArray(c) ? c : [c], $ = V.length > 0, D = {
|
|
3298
3328
|
padding: M,
|
|
3299
|
-
boundary: V.filter(
|
|
3329
|
+
boundary: V.filter(Ts),
|
|
3300
3330
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
3301
3331
|
altBoundary: $
|
|
3302
|
-
}, { refs: N, floatingStyles: X, placement: _, isPositioned: L, middlewareData:
|
|
3332
|
+
}, { refs: N, floatingStyles: X, placement: _, isPositioned: L, middlewareData: R } = us({
|
|
3303
3333
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
3304
3334
|
strategy: "fixed",
|
|
3305
3335
|
placement: O,
|
|
3306
|
-
whileElementsMounted: (...oe) =>
|
|
3307
|
-
animationFrame:
|
|
3336
|
+
whileElementsMounted: (...oe) => ns(...oe, {
|
|
3337
|
+
animationFrame: w === "always"
|
|
3308
3338
|
}),
|
|
3309
3339
|
elements: {
|
|
3310
|
-
reference:
|
|
3340
|
+
reference: v.anchor
|
|
3311
3341
|
},
|
|
3312
3342
|
middleware: [
|
|
3313
|
-
|
|
3314
|
-
l &&
|
|
3343
|
+
fs({ mainAxis: o + I, alignmentAxis: i }),
|
|
3344
|
+
l && ps({
|
|
3315
3345
|
mainAxis: !0,
|
|
3316
3346
|
crossAxis: !1,
|
|
3317
|
-
limiter: p === "partial" ?
|
|
3347
|
+
limiter: p === "partial" ? hs() : void 0,
|
|
3318
3348
|
...D
|
|
3319
3349
|
}),
|
|
3320
|
-
l &&
|
|
3321
|
-
|
|
3350
|
+
l && vs({ ...D }),
|
|
3351
|
+
gs({
|
|
3322
3352
|
...D,
|
|
3323
|
-
apply: ({ elements: oe, rects:
|
|
3324
|
-
const { width: ft, height: Uo } =
|
|
3353
|
+
apply: ({ elements: oe, rects: ge, availableWidth: ut, availableHeight: dt }) => {
|
|
3354
|
+
const { width: ft, height: Uo } = ge.reference, xt = oe.floating.style;
|
|
3325
3355
|
xt.setProperty("--radix-popper-available-width", `${ut}px`), xt.setProperty("--radix-popper-available-height", `${dt}px`), xt.setProperty("--radix-popper-anchor-width", `${ft}px`), xt.setProperty("--radix-popper-anchor-height", `${Uo}px`);
|
|
3326
3356
|
}
|
|
3327
3357
|
}),
|
|
3328
|
-
S &&
|
|
3329
|
-
|
|
3330
|
-
g &&
|
|
3358
|
+
S && ws({ element: S, padding: s }),
|
|
3359
|
+
As({ arrowWidth: C, arrowHeight: I }),
|
|
3360
|
+
g && ms({ strategy: "referenceHidden", ...D })
|
|
3331
3361
|
]
|
|
3332
|
-
}), [W, ee] = eo(_), Ee =
|
|
3362
|
+
}), [W, ee] = eo(_), Ee = Ue(m);
|
|
3333
3363
|
te(() => {
|
|
3334
3364
|
L && (Ee == null || Ee());
|
|
3335
3365
|
}, [L, Ee]);
|
|
3336
|
-
const lt = (A =
|
|
3366
|
+
const lt = (A = R.arrow) == null ? void 0 : A.x, ct = (U = R.arrow) == null ? void 0 : U.y, Re = ((Q = R.arrow) == null ? void 0 : Q.centerOffset) !== 0, [Xe, $e] = u.useState();
|
|
3337
3367
|
return te(() => {
|
|
3338
3368
|
b && $e(window.getComputedStyle(b).zIndex);
|
|
3339
3369
|
}, [b]), /* @__PURE__ */ k(
|
|
@@ -3346,38 +3376,38 @@ var _n = "PopperContent", [Cs, Ss] = jr(_n), qr = u.forwardRef(
|
|
|
3346
3376
|
transform: L ? X.transform : "translate(0, -200%)",
|
|
3347
3377
|
// keep off the page when measuring
|
|
3348
3378
|
minWidth: "max-content",
|
|
3349
|
-
zIndex:
|
|
3379
|
+
zIndex: Xe,
|
|
3350
3380
|
"--radix-popper-transform-origin": [
|
|
3351
|
-
(F =
|
|
3352
|
-
(B =
|
|
3381
|
+
(F = R.transformOrigin) == null ? void 0 : F.x,
|
|
3382
|
+
(B = R.transformOrigin) == null ? void 0 : B.y
|
|
3353
3383
|
].join(" "),
|
|
3354
3384
|
// hide the content if using the hide middleware and should be hidden
|
|
3355
3385
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
3356
3386
|
// as if the PopperContent isn't there at all
|
|
3357
|
-
...((z =
|
|
3387
|
+
...((z = R.hide) == null ? void 0 : z.referenceHidden) && {
|
|
3358
3388
|
visibility: "hidden",
|
|
3359
3389
|
pointerEvents: "none"
|
|
3360
3390
|
}
|
|
3361
3391
|
},
|
|
3362
3392
|
dir: e.dir,
|
|
3363
3393
|
children: /* @__PURE__ */ k(
|
|
3364
|
-
|
|
3394
|
+
Ss,
|
|
3365
3395
|
{
|
|
3366
3396
|
scope: n,
|
|
3367
3397
|
placedSide: W,
|
|
3368
3398
|
onArrowChange: E,
|
|
3369
3399
|
arrowX: lt,
|
|
3370
3400
|
arrowY: ct,
|
|
3371
|
-
shouldHideArrow:
|
|
3401
|
+
shouldHideArrow: Re,
|
|
3372
3402
|
children: /* @__PURE__ */ k(
|
|
3373
3403
|
K.div,
|
|
3374
3404
|
{
|
|
3375
3405
|
"data-side": W,
|
|
3376
3406
|
"data-align": ee,
|
|
3377
|
-
...
|
|
3407
|
+
...d,
|
|
3378
3408
|
ref: y,
|
|
3379
3409
|
style: {
|
|
3380
|
-
...
|
|
3410
|
+
...d.style,
|
|
3381
3411
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
3382
3412
|
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
3383
3413
|
animation: L ? void 0 : "none"
|
|
@@ -3391,13 +3421,13 @@ var _n = "PopperContent", [Cs, Ss] = jr(_n), qr = u.forwardRef(
|
|
|
3391
3421
|
}
|
|
3392
3422
|
);
|
|
3393
3423
|
qr.displayName = _n;
|
|
3394
|
-
var Qr = "PopperArrow",
|
|
3424
|
+
var Qr = "PopperArrow", ks = {
|
|
3395
3425
|
top: "bottom",
|
|
3396
3426
|
right: "left",
|
|
3397
3427
|
bottom: "top",
|
|
3398
3428
|
left: "right"
|
|
3399
3429
|
}, Jr = u.forwardRef(function(t, n) {
|
|
3400
|
-
const { __scopePopper: r, ...o } = t, a =
|
|
3430
|
+
const { __scopePopper: r, ...o } = t, a = Es(Qr, r), i = ks[a.placedSide];
|
|
3401
3431
|
return (
|
|
3402
3432
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
3403
3433
|
// doesn't report size as we'd expect on SVG elements.
|
|
@@ -3426,7 +3456,7 @@ var Qr = "PopperArrow", Es = {
|
|
|
3426
3456
|
visibility: a.shouldHideArrow ? "hidden" : void 0
|
|
3427
3457
|
},
|
|
3428
3458
|
children: /* @__PURE__ */ k(
|
|
3429
|
-
|
|
3459
|
+
xs,
|
|
3430
3460
|
{
|
|
3431
3461
|
...o,
|
|
3432
3462
|
ref: n,
|
|
@@ -3442,32 +3472,32 @@ var Qr = "PopperArrow", Es = {
|
|
|
3442
3472
|
);
|
|
3443
3473
|
});
|
|
3444
3474
|
Jr.displayName = Qr;
|
|
3445
|
-
function
|
|
3475
|
+
function Ts(e) {
|
|
3446
3476
|
return e !== null;
|
|
3447
3477
|
}
|
|
3448
|
-
var
|
|
3478
|
+
var As = (e) => ({
|
|
3449
3479
|
name: "transformOrigin",
|
|
3450
3480
|
options: e,
|
|
3451
3481
|
fn(t) {
|
|
3452
|
-
var
|
|
3453
|
-
const { placement: n, rects: r, middlewareData: o } = t, i = ((
|
|
3454
|
-
let m = "",
|
|
3455
|
-
return c === "bottom" ? (m = i ? p : `${g}px`,
|
|
3482
|
+
var v, b, x;
|
|
3483
|
+
const { placement: n, rects: r, middlewareData: o } = t, i = ((v = o.arrow) == null ? void 0 : v.centerOffset) !== 0, s = i ? 0 : e.arrowWidth, l = i ? 0 : e.arrowHeight, [c, f] = eo(n), p = { start: "0%", center: "50%", end: "100%" }[f], g = (((b = o.arrow) == null ? void 0 : b.x) ?? 0) + s / 2, w = (((x = o.arrow) == null ? void 0 : x.y) ?? 0) + l / 2;
|
|
3484
|
+
let m = "", d = "";
|
|
3485
|
+
return c === "bottom" ? (m = i ? p : `${g}px`, d = `${-l}px`) : c === "top" ? (m = i ? p : `${g}px`, d = `${r.floating.height + l}px`) : c === "right" ? (m = `${-l}px`, d = i ? p : `${w}px`) : c === "left" && (m = `${r.floating.width + l}px`, d = i ? p : `${w}px`), { data: { x: m, y: d } };
|
|
3456
3486
|
}
|
|
3457
3487
|
});
|
|
3458
3488
|
function eo(e) {
|
|
3459
3489
|
const [t, n = "center"] = e.split("-");
|
|
3460
3490
|
return [t, n];
|
|
3461
3491
|
}
|
|
3462
|
-
var
|
|
3492
|
+
var Ps = Kr, Is = Zr, Rs = qr, _s = Jr, Ns = "Portal", to = u.forwardRef((e, t) => {
|
|
3463
3493
|
var s;
|
|
3464
3494
|
const { container: n, ...r } = e, [o, a] = u.useState(!1);
|
|
3465
3495
|
te(() => a(!0), []);
|
|
3466
3496
|
const i = n || o && ((s = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : s.body);
|
|
3467
3497
|
return i ? _e.createPortal(/* @__PURE__ */ k(K.div, { ...r, ref: t }), i) : null;
|
|
3468
3498
|
});
|
|
3469
|
-
to.displayName =
|
|
3470
|
-
var
|
|
3499
|
+
to.displayName = Ns;
|
|
3500
|
+
var Os = u[" useInsertionEffect ".trim().toString()] || te;
|
|
3471
3501
|
function tr({
|
|
3472
3502
|
prop: e,
|
|
3473
3503
|
defaultProp: t,
|
|
@@ -3475,48 +3505,48 @@ function tr({
|
|
|
3475
3505
|
},
|
|
3476
3506
|
caller: r
|
|
3477
3507
|
}) {
|
|
3478
|
-
const [o, a, i] =
|
|
3508
|
+
const [o, a, i] = Ms({
|
|
3479
3509
|
defaultProp: t,
|
|
3480
3510
|
onChange: n
|
|
3481
3511
|
}), s = e !== void 0, l = s ? e : o;
|
|
3482
3512
|
{
|
|
3483
|
-
const
|
|
3513
|
+
const f = u.useRef(e !== void 0);
|
|
3484
3514
|
u.useEffect(() => {
|
|
3485
|
-
const p =
|
|
3515
|
+
const p = f.current;
|
|
3486
3516
|
p !== s && console.warn(
|
|
3487
3517
|
`${r} is changing from ${p ? "controlled" : "uncontrolled"} to ${s ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
3488
|
-
),
|
|
3518
|
+
), f.current = s;
|
|
3489
3519
|
}, [s, r]);
|
|
3490
3520
|
}
|
|
3491
3521
|
const c = u.useCallback(
|
|
3492
|
-
(
|
|
3522
|
+
(f) => {
|
|
3493
3523
|
var p;
|
|
3494
3524
|
if (s) {
|
|
3495
|
-
const g =
|
|
3525
|
+
const g = Ls(f) ? f(e) : f;
|
|
3496
3526
|
g !== e && ((p = i.current) == null || p.call(i, g));
|
|
3497
3527
|
} else
|
|
3498
|
-
a(
|
|
3528
|
+
a(f);
|
|
3499
3529
|
},
|
|
3500
3530
|
[s, e, a, i]
|
|
3501
3531
|
);
|
|
3502
3532
|
return [l, c];
|
|
3503
3533
|
}
|
|
3504
|
-
function
|
|
3534
|
+
function Ms({
|
|
3505
3535
|
defaultProp: e,
|
|
3506
3536
|
onChange: t
|
|
3507
3537
|
}) {
|
|
3508
3538
|
const [n, r] = u.useState(e), o = u.useRef(n), a = u.useRef(t);
|
|
3509
|
-
return
|
|
3539
|
+
return Os(() => {
|
|
3510
3540
|
a.current = t;
|
|
3511
3541
|
}, [t]), u.useEffect(() => {
|
|
3512
3542
|
var i;
|
|
3513
3543
|
o.current !== n && ((i = a.current) == null || i.call(a, n), o.current = n);
|
|
3514
3544
|
}, [n, o]), [n, r, a];
|
|
3515
3545
|
}
|
|
3516
|
-
function
|
|
3546
|
+
function Ls(e) {
|
|
3517
3547
|
return typeof e == "function";
|
|
3518
3548
|
}
|
|
3519
|
-
function
|
|
3549
|
+
function Ds(e) {
|
|
3520
3550
|
const t = u.useRef({ value: e, previous: e });
|
|
3521
3551
|
return u.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
3522
3552
|
}
|
|
@@ -3532,7 +3562,7 @@ var no = Object.freeze({
|
|
|
3532
3562
|
clip: "rect(0, 0, 0, 0)",
|
|
3533
3563
|
whiteSpace: "nowrap",
|
|
3534
3564
|
wordWrap: "normal"
|
|
3535
|
-
}),
|
|
3565
|
+
}), Bs = "VisuallyHidden", zs = u.forwardRef(
|
|
3536
3566
|
(e, t) => /* @__PURE__ */ k(
|
|
3537
3567
|
K.span,
|
|
3538
3568
|
{
|
|
@@ -3542,15 +3572,15 @@ var no = Object.freeze({
|
|
|
3542
3572
|
}
|
|
3543
3573
|
)
|
|
3544
3574
|
);
|
|
3545
|
-
|
|
3546
|
-
var
|
|
3575
|
+
zs.displayName = Bs;
|
|
3576
|
+
var Fs = function(e) {
|
|
3547
3577
|
if (typeof document > "u")
|
|
3548
3578
|
return null;
|
|
3549
3579
|
var t = Array.isArray(e) ? e[0] : e;
|
|
3550
3580
|
return t.ownerDocument.body;
|
|
3551
|
-
},
|
|
3581
|
+
}, Ke = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap(), Et = {}, Jt = 0, ro = function(e) {
|
|
3552
3582
|
return e && (e.host || ro(e.parentNode));
|
|
3553
|
-
},
|
|
3583
|
+
}, Vs = function(e, t) {
|
|
3554
3584
|
return t.map(function(n) {
|
|
3555
3585
|
if (e.contains(n))
|
|
3556
3586
|
return n;
|
|
@@ -3559,46 +3589,46 @@ var zs = function(e) {
|
|
|
3559
3589
|
}).filter(function(n) {
|
|
3560
3590
|
return !!n;
|
|
3561
3591
|
});
|
|
3562
|
-
},
|
|
3563
|
-
var o =
|
|
3592
|
+
}, $s = function(e, t, n, r) {
|
|
3593
|
+
var o = Vs(t, Array.isArray(e) ? e : [e]);
|
|
3564
3594
|
Et[n] || (Et[n] = /* @__PURE__ */ new WeakMap());
|
|
3565
3595
|
var a = Et[n], i = [], s = /* @__PURE__ */ new Set(), l = new Set(o), c = function(p) {
|
|
3566
3596
|
!p || s.has(p) || (s.add(p), c(p.parentNode));
|
|
3567
3597
|
};
|
|
3568
3598
|
o.forEach(c);
|
|
3569
|
-
var
|
|
3599
|
+
var f = function(p) {
|
|
3570
3600
|
!p || l.has(p) || Array.prototype.forEach.call(p.children, function(g) {
|
|
3571
3601
|
if (s.has(g))
|
|
3572
|
-
|
|
3602
|
+
f(g);
|
|
3573
3603
|
else
|
|
3574
3604
|
try {
|
|
3575
|
-
var
|
|
3576
|
-
|
|
3605
|
+
var w = g.getAttribute(r), m = w !== null && w !== "false", d = (Ke.get(g) || 0) + 1, v = (a.get(g) || 0) + 1;
|
|
3606
|
+
Ke.set(g, d), a.set(g, v), i.push(g), d === 1 && m && St.set(g, !0), v === 1 && g.setAttribute(n, "true"), m || g.setAttribute(r, "true");
|
|
3577
3607
|
} catch (b) {
|
|
3578
3608
|
console.error("aria-hidden: cannot operate on ", g, b);
|
|
3579
3609
|
}
|
|
3580
3610
|
});
|
|
3581
3611
|
};
|
|
3582
|
-
return
|
|
3612
|
+
return f(t), s.clear(), Jt++, function() {
|
|
3583
3613
|
i.forEach(function(p) {
|
|
3584
|
-
var g =
|
|
3585
|
-
|
|
3586
|
-
}), Jt--, Jt || (
|
|
3614
|
+
var g = Ke.get(p) - 1, w = a.get(p) - 1;
|
|
3615
|
+
Ke.set(p, g), a.set(p, w), g || (St.has(p) || p.removeAttribute(r), St.delete(p)), w || p.removeAttribute(n);
|
|
3616
|
+
}), Jt--, Jt || (Ke = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap(), Et = {});
|
|
3587
3617
|
};
|
|
3588
|
-
},
|
|
3618
|
+
}, Ws = function(e, t, n) {
|
|
3589
3619
|
n === void 0 && (n = "data-aria-hidden");
|
|
3590
|
-
var r = Array.from(Array.isArray(e) ? e : [e]), o =
|
|
3591
|
-
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live]"))),
|
|
3620
|
+
var r = Array.from(Array.isArray(e) ? e : [e]), o = Fs(e);
|
|
3621
|
+
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live]"))), $s(r, o, n, "aria-hidden")) : function() {
|
|
3592
3622
|
return null;
|
|
3593
3623
|
};
|
|
3594
|
-
},
|
|
3595
|
-
return
|
|
3624
|
+
}, we = function() {
|
|
3625
|
+
return we = Object.assign || function(t) {
|
|
3596
3626
|
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
3597
3627
|
n = arguments[r];
|
|
3598
3628
|
for (var a in n) Object.prototype.hasOwnProperty.call(n, a) && (t[a] = n[a]);
|
|
3599
3629
|
}
|
|
3600
3630
|
return t;
|
|
3601
|
-
},
|
|
3631
|
+
}, we.apply(this, arguments);
|
|
3602
3632
|
};
|
|
3603
3633
|
function oo(e, t) {
|
|
3604
3634
|
var n = {};
|
|
@@ -3608,17 +3638,17 @@ function oo(e, t) {
|
|
|
3608
3638
|
t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
|
|
3609
3639
|
return n;
|
|
3610
3640
|
}
|
|
3611
|
-
function
|
|
3641
|
+
function Us(e, t, n) {
|
|
3612
3642
|
if (n || arguments.length === 2) for (var r = 0, o = t.length, a; r < o; r++)
|
|
3613
3643
|
(a || !(r in t)) && (a || (a = Array.prototype.slice.call(t, 0, r)), a[r] = t[r]);
|
|
3614
3644
|
return e.concat(a || Array.prototype.slice.call(t));
|
|
3615
3645
|
}
|
|
3616
|
-
var
|
|
3646
|
+
var It = "right-scroll-bar-position", Rt = "width-before-scroll-bar", Hs = "with-scroll-bars-hidden", js = "--removed-body-scroll-bar-size";
|
|
3617
3647
|
function en(e, t) {
|
|
3618
3648
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
3619
3649
|
}
|
|
3620
|
-
function
|
|
3621
|
-
var n =
|
|
3650
|
+
function Ys(e, t) {
|
|
3651
|
+
var n = ke(function() {
|
|
3622
3652
|
return {
|
|
3623
3653
|
// value
|
|
3624
3654
|
value: e,
|
|
@@ -3638,14 +3668,14 @@ function js(e, t) {
|
|
|
3638
3668
|
})[0];
|
|
3639
3669
|
return n.callback = t, n.facade;
|
|
3640
3670
|
}
|
|
3641
|
-
var
|
|
3642
|
-
function
|
|
3643
|
-
var n =
|
|
3671
|
+
var Xs = typeof window < "u" ? u.useLayoutEffect : u.useEffect, nr = /* @__PURE__ */ new WeakMap();
|
|
3672
|
+
function Ks(e, t) {
|
|
3673
|
+
var n = Ys(null, function(r) {
|
|
3644
3674
|
return e.forEach(function(o) {
|
|
3645
3675
|
return en(o, r);
|
|
3646
3676
|
});
|
|
3647
3677
|
});
|
|
3648
|
-
return
|
|
3678
|
+
return Xs(function() {
|
|
3649
3679
|
var r = nr.get(n);
|
|
3650
3680
|
if (r) {
|
|
3651
3681
|
var o = new Set(r), a = new Set(e), i = n.current;
|
|
@@ -3658,11 +3688,11 @@ function Xs(e, t) {
|
|
|
3658
3688
|
nr.set(n, e);
|
|
3659
3689
|
}, [e]), n;
|
|
3660
3690
|
}
|
|
3661
|
-
function
|
|
3691
|
+
function Gs(e) {
|
|
3662
3692
|
return e;
|
|
3663
3693
|
}
|
|
3664
|
-
function
|
|
3665
|
-
t === void 0 && (t =
|
|
3694
|
+
function Zs(e, t) {
|
|
3695
|
+
t === void 0 && (t = Gs);
|
|
3666
3696
|
var n = [], r = !1, o = {
|
|
3667
3697
|
read: function() {
|
|
3668
3698
|
if (r)
|
|
@@ -3699,27 +3729,27 @@ function Gs(e, t) {
|
|
|
3699
3729
|
n = [], s.forEach(a), i = n;
|
|
3700
3730
|
}
|
|
3701
3731
|
var l = function() {
|
|
3702
|
-
var
|
|
3703
|
-
i = [],
|
|
3732
|
+
var f = i;
|
|
3733
|
+
i = [], f.forEach(a);
|
|
3704
3734
|
}, c = function() {
|
|
3705
3735
|
return Promise.resolve().then(l);
|
|
3706
3736
|
};
|
|
3707
3737
|
c(), n = {
|
|
3708
|
-
push: function(
|
|
3709
|
-
i.push(
|
|
3738
|
+
push: function(f) {
|
|
3739
|
+
i.push(f), c();
|
|
3710
3740
|
},
|
|
3711
|
-
filter: function(
|
|
3712
|
-
return i = i.filter(
|
|
3741
|
+
filter: function(f) {
|
|
3742
|
+
return i = i.filter(f), n;
|
|
3713
3743
|
}
|
|
3714
3744
|
};
|
|
3715
3745
|
}
|
|
3716
3746
|
};
|
|
3717
3747
|
return o;
|
|
3718
3748
|
}
|
|
3719
|
-
function
|
|
3749
|
+
function qs(e) {
|
|
3720
3750
|
e === void 0 && (e = {});
|
|
3721
|
-
var t =
|
|
3722
|
-
return t.options =
|
|
3751
|
+
var t = Zs(null);
|
|
3752
|
+
return t.options = we({ async: !0, ssr: !1 }, e), t;
|
|
3723
3753
|
}
|
|
3724
3754
|
var ao = function(e) {
|
|
3725
3755
|
var t = e.sideCar, n = oo(e, ["sideCar"]);
|
|
@@ -3728,24 +3758,24 @@ var ao = function(e) {
|
|
|
3728
3758
|
var r = t.read();
|
|
3729
3759
|
if (!r)
|
|
3730
3760
|
throw new Error("Sidecar medium not found");
|
|
3731
|
-
return u.createElement(r,
|
|
3761
|
+
return u.createElement(r, we({}, n));
|
|
3732
3762
|
};
|
|
3733
3763
|
ao.isSideCarExport = !0;
|
|
3734
|
-
function
|
|
3764
|
+
function Qs(e, t) {
|
|
3735
3765
|
return e.useMedium(t), ao;
|
|
3736
3766
|
}
|
|
3737
|
-
var io =
|
|
3767
|
+
var io = qs(), tn = function() {
|
|
3738
3768
|
}, Wt = u.forwardRef(function(e, t) {
|
|
3739
3769
|
var n = u.useRef(null), r = u.useState({
|
|
3740
3770
|
onScrollCapture: tn,
|
|
3741
3771
|
onWheelCapture: tn,
|
|
3742
3772
|
onTouchMoveCapture: tn
|
|
3743
|
-
}), o = r[0], a = r[1], i = e.forwardProps, s = e.children, l = e.className, c = e.removeScrollBar,
|
|
3773
|
+
}), o = r[0], a = r[1], i = e.forwardProps, s = e.children, l = e.className, c = e.removeScrollBar, f = e.enabled, p = e.shards, g = e.sideCar, w = e.noIsolation, m = e.inert, d = e.allowPinchZoom, v = e.as, b = v === void 0 ? "div" : v, x = e.gapMode, y = oo(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = g, E = Ks([n, t]), T = we(we({}, y), o);
|
|
3744
3774
|
return u.createElement(
|
|
3745
3775
|
u.Fragment,
|
|
3746
3776
|
null,
|
|
3747
|
-
|
|
3748
|
-
i ? u.cloneElement(u.Children.only(s),
|
|
3777
|
+
f && u.createElement(S, { sideCar: io, removeScrollBar: c, shards: p, noIsolation: w, inert: m, setCallbacks: a, allowPinchZoom: !!d, lockRef: n, gapMode: x }),
|
|
3778
|
+
i ? u.cloneElement(u.Children.only(s), we(we({}, T), { ref: E })) : u.createElement(b, we({}, T, { className: l, ref: E }), s)
|
|
3749
3779
|
);
|
|
3750
3780
|
});
|
|
3751
3781
|
Wt.defaultProps = {
|
|
@@ -3754,40 +3784,40 @@ Wt.defaultProps = {
|
|
|
3754
3784
|
inert: !1
|
|
3755
3785
|
};
|
|
3756
3786
|
Wt.classNames = {
|
|
3757
|
-
fullWidth:
|
|
3758
|
-
zeroRight:
|
|
3787
|
+
fullWidth: Rt,
|
|
3788
|
+
zeroRight: It
|
|
3759
3789
|
};
|
|
3760
|
-
var
|
|
3790
|
+
var Js = function() {
|
|
3761
3791
|
if (typeof __webpack_nonce__ < "u")
|
|
3762
3792
|
return __webpack_nonce__;
|
|
3763
3793
|
};
|
|
3764
|
-
function
|
|
3794
|
+
function el() {
|
|
3765
3795
|
if (!document)
|
|
3766
3796
|
return null;
|
|
3767
3797
|
var e = document.createElement("style");
|
|
3768
3798
|
e.type = "text/css";
|
|
3769
|
-
var t =
|
|
3799
|
+
var t = Js();
|
|
3770
3800
|
return t && e.setAttribute("nonce", t), e;
|
|
3771
3801
|
}
|
|
3772
|
-
function
|
|
3802
|
+
function tl(e, t) {
|
|
3773
3803
|
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
3774
3804
|
}
|
|
3775
|
-
function
|
|
3805
|
+
function nl(e) {
|
|
3776
3806
|
var t = document.head || document.getElementsByTagName("head")[0];
|
|
3777
3807
|
t.appendChild(e);
|
|
3778
3808
|
}
|
|
3779
|
-
var
|
|
3809
|
+
var rl = function() {
|
|
3780
3810
|
var e = 0, t = null;
|
|
3781
3811
|
return {
|
|
3782
3812
|
add: function(n) {
|
|
3783
|
-
e == 0 && (t =
|
|
3813
|
+
e == 0 && (t = el()) && (tl(t, n), nl(t)), e++;
|
|
3784
3814
|
},
|
|
3785
3815
|
remove: function() {
|
|
3786
3816
|
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
3787
3817
|
}
|
|
3788
3818
|
};
|
|
3789
|
-
},
|
|
3790
|
-
var e =
|
|
3819
|
+
}, ol = function() {
|
|
3820
|
+
var e = rl();
|
|
3791
3821
|
return function(t, n) {
|
|
3792
3822
|
u.useEffect(function() {
|
|
3793
3823
|
return e.add(t), function() {
|
|
@@ -3796,35 +3826,35 @@ var nl = function() {
|
|
|
3796
3826
|
}, [t && n]);
|
|
3797
3827
|
};
|
|
3798
3828
|
}, so = function() {
|
|
3799
|
-
var e =
|
|
3829
|
+
var e = ol(), t = function(n) {
|
|
3800
3830
|
var r = n.styles, o = n.dynamic;
|
|
3801
3831
|
return e(r, o), null;
|
|
3802
3832
|
};
|
|
3803
3833
|
return t;
|
|
3804
|
-
},
|
|
3834
|
+
}, al = {
|
|
3805
3835
|
left: 0,
|
|
3806
3836
|
top: 0,
|
|
3807
3837
|
right: 0,
|
|
3808
3838
|
gap: 0
|
|
3809
3839
|
}, nn = function(e) {
|
|
3810
3840
|
return parseInt(e || "", 10) || 0;
|
|
3811
|
-
},
|
|
3841
|
+
}, il = function(e) {
|
|
3812
3842
|
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
3813
3843
|
return [nn(n), nn(r), nn(o)];
|
|
3814
|
-
},
|
|
3844
|
+
}, sl = function(e) {
|
|
3815
3845
|
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
3816
|
-
return
|
|
3817
|
-
var t =
|
|
3846
|
+
return al;
|
|
3847
|
+
var t = il(e), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
3818
3848
|
return {
|
|
3819
3849
|
left: t[0],
|
|
3820
3850
|
top: t[1],
|
|
3821
3851
|
right: t[2],
|
|
3822
3852
|
gap: Math.max(0, r - n + t[2] - t[0])
|
|
3823
3853
|
};
|
|
3824
|
-
},
|
|
3854
|
+
}, ll = so(), tt = "data-scroll-locked", cl = function(e, t, n, r) {
|
|
3825
3855
|
var o = e.left, a = e.top, i = e.right, s = e.gap;
|
|
3826
3856
|
return n === void 0 && (n = "margin"), `
|
|
3827
|
-
.`.concat(
|
|
3857
|
+
.`.concat(Hs, ` {
|
|
3828
3858
|
overflow: hidden `).concat(r, `;
|
|
3829
3859
|
padding-right: `).concat(s, "px ").concat(r, `;
|
|
3830
3860
|
}
|
|
@@ -3845,43 +3875,43 @@ var nl = function() {
|
|
|
3845
3875
|
].filter(Boolean).join(""), `
|
|
3846
3876
|
}
|
|
3847
3877
|
|
|
3848
|
-
.`).concat(
|
|
3878
|
+
.`).concat(It, ` {
|
|
3849
3879
|
right: `).concat(s, "px ").concat(r, `;
|
|
3850
3880
|
}
|
|
3851
3881
|
|
|
3852
|
-
.`).concat(
|
|
3882
|
+
.`).concat(Rt, ` {
|
|
3853
3883
|
margin-right: `).concat(s, "px ").concat(r, `;
|
|
3854
3884
|
}
|
|
3855
3885
|
|
|
3856
|
-
.`).concat(
|
|
3886
|
+
.`).concat(It, " .").concat(It, ` {
|
|
3857
3887
|
right: 0 `).concat(r, `;
|
|
3858
3888
|
}
|
|
3859
3889
|
|
|
3860
|
-
.`).concat(
|
|
3890
|
+
.`).concat(Rt, " .").concat(Rt, ` {
|
|
3861
3891
|
margin-right: 0 `).concat(r, `;
|
|
3862
3892
|
}
|
|
3863
3893
|
|
|
3864
3894
|
body[`).concat(tt, `] {
|
|
3865
|
-
`).concat(
|
|
3895
|
+
`).concat(js, ": ").concat(s, `px;
|
|
3866
3896
|
}
|
|
3867
3897
|
`);
|
|
3868
3898
|
}, rr = function() {
|
|
3869
3899
|
var e = parseInt(document.body.getAttribute(tt) || "0", 10);
|
|
3870
3900
|
return isFinite(e) ? e : 0;
|
|
3871
|
-
},
|
|
3901
|
+
}, ul = function() {
|
|
3872
3902
|
u.useEffect(function() {
|
|
3873
3903
|
return document.body.setAttribute(tt, (rr() + 1).toString()), function() {
|
|
3874
3904
|
var e = rr() - 1;
|
|
3875
3905
|
e <= 0 ? document.body.removeAttribute(tt) : document.body.setAttribute(tt, e.toString());
|
|
3876
3906
|
};
|
|
3877
3907
|
}, []);
|
|
3878
|
-
},
|
|
3908
|
+
}, dl = function(e) {
|
|
3879
3909
|
var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
|
|
3880
|
-
|
|
3910
|
+
ul();
|
|
3881
3911
|
var a = u.useMemo(function() {
|
|
3882
|
-
return
|
|
3912
|
+
return sl(o);
|
|
3883
3913
|
}, [o]);
|
|
3884
|
-
return u.createElement(
|
|
3914
|
+
return u.createElement(ll, { styles: cl(a, !t, o, n ? "" : "!important") });
|
|
3885
3915
|
}, dn = !1;
|
|
3886
3916
|
if (typeof window < "u")
|
|
3887
3917
|
try {
|
|
@@ -3894,7 +3924,7 @@ if (typeof window < "u")
|
|
|
3894
3924
|
} catch {
|
|
3895
3925
|
dn = !1;
|
|
3896
3926
|
}
|
|
3897
|
-
var
|
|
3927
|
+
var Ge = dn ? { passive: !1 } : !1, fl = function(e) {
|
|
3898
3928
|
return e.tagName === "TEXTAREA";
|
|
3899
3929
|
}, lo = function(e, t) {
|
|
3900
3930
|
if (!(e instanceof Element))
|
|
@@ -3903,11 +3933,11 @@ var Ke = dn ? { passive: !1 } : !1, dl = function(e) {
|
|
|
3903
3933
|
return (
|
|
3904
3934
|
// not-not-scrollable
|
|
3905
3935
|
n[t] !== "hidden" && // contains scroll inside self
|
|
3906
|
-
!(n.overflowY === n.overflowX && !
|
|
3936
|
+
!(n.overflowY === n.overflowX && !fl(e) && n[t] === "visible")
|
|
3907
3937
|
);
|
|
3908
|
-
}, fl = function(e) {
|
|
3909
|
-
return lo(e, "overflowY");
|
|
3910
3938
|
}, pl = function(e) {
|
|
3939
|
+
return lo(e, "overflowY");
|
|
3940
|
+
}, hl = function(e) {
|
|
3911
3941
|
return lo(e, "overflowX");
|
|
3912
3942
|
}, or = function(e, t) {
|
|
3913
3943
|
var n = t.ownerDocument, r = t;
|
|
@@ -3922,14 +3952,14 @@ var Ke = dn ? { passive: !1 } : !1, dl = function(e) {
|
|
|
3922
3952
|
r = r.parentNode;
|
|
3923
3953
|
} while (r && r !== n.body);
|
|
3924
3954
|
return !1;
|
|
3925
|
-
},
|
|
3955
|
+
}, vl = function(e) {
|
|
3926
3956
|
var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
|
|
3927
3957
|
return [
|
|
3928
3958
|
t,
|
|
3929
3959
|
n,
|
|
3930
3960
|
r
|
|
3931
3961
|
];
|
|
3932
|
-
},
|
|
3962
|
+
}, gl = function(e) {
|
|
3933
3963
|
var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
|
|
3934
3964
|
return [
|
|
3935
3965
|
t,
|
|
@@ -3937,132 +3967,132 @@ var Ke = dn ? { passive: !1 } : !1, dl = function(e) {
|
|
|
3937
3967
|
r
|
|
3938
3968
|
];
|
|
3939
3969
|
}, co = function(e, t) {
|
|
3940
|
-
return e === "v" ?
|
|
3970
|
+
return e === "v" ? pl(t) : hl(t);
|
|
3941
3971
|
}, uo = function(e, t) {
|
|
3942
|
-
return e === "v" ?
|
|
3943
|
-
},
|
|
3972
|
+
return e === "v" ? vl(t) : gl(t);
|
|
3973
|
+
}, ml = function(e, t) {
|
|
3944
3974
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
3945
|
-
},
|
|
3946
|
-
var a =
|
|
3975
|
+
}, wl = function(e, t, n, r, o) {
|
|
3976
|
+
var a = ml(e, window.getComputedStyle(t).direction), i = a * r, s = n.target, l = t.contains(s), c = !1, f = i > 0, p = 0, g = 0;
|
|
3947
3977
|
do {
|
|
3948
|
-
var
|
|
3978
|
+
var w = uo(e, s), m = w[0], d = w[1], v = w[2], b = d - v - a * m;
|
|
3949
3979
|
(m || b) && co(e, s) && (p += b, g += m), s instanceof ShadowRoot ? s = s.host : s = s.parentNode;
|
|
3950
3980
|
} while (
|
|
3951
3981
|
// portaled content
|
|
3952
3982
|
!l && s !== document.body || // self content
|
|
3953
3983
|
l && (t.contains(s) || t === s)
|
|
3954
3984
|
);
|
|
3955
|
-
return (
|
|
3985
|
+
return (f && Math.abs(p) < 1 || !f && Math.abs(g) < 1) && (c = !0), c;
|
|
3956
3986
|
}, Tt = function(e) {
|
|
3957
3987
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
3958
3988
|
}, ar = function(e) {
|
|
3959
3989
|
return [e.deltaX, e.deltaY];
|
|
3960
3990
|
}, ir = function(e) {
|
|
3961
3991
|
return e && "current" in e ? e.current : e;
|
|
3962
|
-
},
|
|
3992
|
+
}, bl = function(e, t) {
|
|
3963
3993
|
return e[0] === t[0] && e[1] === t[1];
|
|
3964
|
-
},
|
|
3994
|
+
}, xl = function(e) {
|
|
3965
3995
|
return `
|
|
3966
3996
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
3967
3997
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
3968
3998
|
`);
|
|
3969
|
-
},
|
|
3970
|
-
function
|
|
3971
|
-
var t = u.useRef([]), n = u.useRef([0, 0]), r = u.useRef(), o = u.useState(
|
|
3999
|
+
}, yl = 0, Ze = [];
|
|
4000
|
+
function Cl(e) {
|
|
4001
|
+
var t = u.useRef([]), n = u.useRef([0, 0]), r = u.useRef(), o = u.useState(yl++)[0], a = u.useState(so)[0], i = u.useRef(e);
|
|
3972
4002
|
u.useEffect(function() {
|
|
3973
4003
|
i.current = e;
|
|
3974
4004
|
}, [e]), u.useEffect(function() {
|
|
3975
4005
|
if (e.inert) {
|
|
3976
4006
|
document.body.classList.add("block-interactivity-".concat(o));
|
|
3977
|
-
var
|
|
3978
|
-
return
|
|
3979
|
-
return
|
|
4007
|
+
var d = Us([e.lockRef.current], (e.shards || []).map(ir), !0).filter(Boolean);
|
|
4008
|
+
return d.forEach(function(v) {
|
|
4009
|
+
return v.classList.add("allow-interactivity-".concat(o));
|
|
3980
4010
|
}), function() {
|
|
3981
|
-
document.body.classList.remove("block-interactivity-".concat(o)),
|
|
3982
|
-
return
|
|
4011
|
+
document.body.classList.remove("block-interactivity-".concat(o)), d.forEach(function(v) {
|
|
4012
|
+
return v.classList.remove("allow-interactivity-".concat(o));
|
|
3983
4013
|
});
|
|
3984
4014
|
};
|
|
3985
4015
|
}
|
|
3986
4016
|
}, [e.inert, e.lockRef.current, e.shards]);
|
|
3987
|
-
var s = u.useCallback(function(
|
|
3988
|
-
if ("touches" in
|
|
4017
|
+
var s = u.useCallback(function(d, v) {
|
|
4018
|
+
if ("touches" in d && d.touches.length === 2 || d.type === "wheel" && d.ctrlKey)
|
|
3989
4019
|
return !i.current.allowPinchZoom;
|
|
3990
|
-
var b = Tt(
|
|
3991
|
-
if ("touches" in
|
|
4020
|
+
var b = Tt(d), x = n.current, y = "deltaX" in d ? d.deltaX : x[0] - b[0], S = "deltaY" in d ? d.deltaY : x[1] - b[1], E, T = d.target, C = Math.abs(y) > Math.abs(S) ? "h" : "v";
|
|
4021
|
+
if ("touches" in d && C === "h" && T.type === "range")
|
|
3992
4022
|
return !1;
|
|
3993
|
-
var
|
|
3994
|
-
if (!
|
|
4023
|
+
var I = or(C, T);
|
|
4024
|
+
if (!I)
|
|
3995
4025
|
return !0;
|
|
3996
|
-
if (
|
|
4026
|
+
if (I ? E = C : (E = C === "v" ? "h" : "v", I = or(C, T)), !I)
|
|
3997
4027
|
return !1;
|
|
3998
|
-
if (!r.current && "changedTouches" in
|
|
4028
|
+
if (!r.current && "changedTouches" in d && (y || S) && (r.current = E), !E)
|
|
3999
4029
|
return !0;
|
|
4000
4030
|
var O = r.current || E;
|
|
4001
|
-
return
|
|
4002
|
-
}, []), l = u.useCallback(function(
|
|
4003
|
-
var
|
|
4004
|
-
if (!(!
|
|
4005
|
-
var b = "deltaY" in
|
|
4006
|
-
return E.name ===
|
|
4031
|
+
return wl(O, v, d, O === "h" ? y : S);
|
|
4032
|
+
}, []), l = u.useCallback(function(d) {
|
|
4033
|
+
var v = d;
|
|
4034
|
+
if (!(!Ze.length || Ze[Ze.length - 1] !== a)) {
|
|
4035
|
+
var b = "deltaY" in v ? ar(v) : Tt(v), x = t.current.filter(function(E) {
|
|
4036
|
+
return E.name === v.type && (E.target === v.target || v.target === E.shadowParent) && bl(E.delta, b);
|
|
4007
4037
|
})[0];
|
|
4008
4038
|
if (x && x.should) {
|
|
4009
|
-
|
|
4039
|
+
v.cancelable && v.preventDefault();
|
|
4010
4040
|
return;
|
|
4011
4041
|
}
|
|
4012
4042
|
if (!x) {
|
|
4013
4043
|
var y = (i.current.shards || []).map(ir).filter(Boolean).filter(function(E) {
|
|
4014
|
-
return E.contains(
|
|
4015
|
-
}), S = y.length > 0 ? s(
|
|
4016
|
-
S &&
|
|
4044
|
+
return E.contains(v.target);
|
|
4045
|
+
}), S = y.length > 0 ? s(v, y[0]) : !i.current.noIsolation;
|
|
4046
|
+
S && v.cancelable && v.preventDefault();
|
|
4017
4047
|
}
|
|
4018
4048
|
}
|
|
4019
|
-
}, []), c = u.useCallback(function(
|
|
4020
|
-
var y = { name:
|
|
4049
|
+
}, []), c = u.useCallback(function(d, v, b, x) {
|
|
4050
|
+
var y = { name: d, delta: v, target: b, should: x, shadowParent: Sl(b) };
|
|
4021
4051
|
t.current.push(y), setTimeout(function() {
|
|
4022
4052
|
t.current = t.current.filter(function(S) {
|
|
4023
4053
|
return S !== y;
|
|
4024
4054
|
});
|
|
4025
4055
|
}, 1);
|
|
4026
|
-
}, []),
|
|
4027
|
-
n.current = Tt(
|
|
4028
|
-
}, []), p = u.useCallback(function(
|
|
4029
|
-
c(
|
|
4030
|
-
}, []), g = u.useCallback(function(
|
|
4031
|
-
c(
|
|
4056
|
+
}, []), f = u.useCallback(function(d) {
|
|
4057
|
+
n.current = Tt(d), r.current = void 0;
|
|
4058
|
+
}, []), p = u.useCallback(function(d) {
|
|
4059
|
+
c(d.type, ar(d), d.target, s(d, e.lockRef.current));
|
|
4060
|
+
}, []), g = u.useCallback(function(d) {
|
|
4061
|
+
c(d.type, Tt(d), d.target, s(d, e.lockRef.current));
|
|
4032
4062
|
}, []);
|
|
4033
4063
|
u.useEffect(function() {
|
|
4034
|
-
return
|
|
4064
|
+
return Ze.push(a), e.setCallbacks({
|
|
4035
4065
|
onScrollCapture: p,
|
|
4036
4066
|
onWheelCapture: p,
|
|
4037
4067
|
onTouchMoveCapture: g
|
|
4038
|
-
}), document.addEventListener("wheel", l,
|
|
4039
|
-
|
|
4040
|
-
return
|
|
4041
|
-
}), document.removeEventListener("wheel", l,
|
|
4068
|
+
}), document.addEventListener("wheel", l, Ge), document.addEventListener("touchmove", l, Ge), document.addEventListener("touchstart", f, Ge), function() {
|
|
4069
|
+
Ze = Ze.filter(function(d) {
|
|
4070
|
+
return d !== a;
|
|
4071
|
+
}), document.removeEventListener("wheel", l, Ge), document.removeEventListener("touchmove", l, Ge), document.removeEventListener("touchstart", f, Ge);
|
|
4042
4072
|
};
|
|
4043
4073
|
}, []);
|
|
4044
|
-
var
|
|
4074
|
+
var w = e.removeScrollBar, m = e.inert;
|
|
4045
4075
|
return u.createElement(
|
|
4046
4076
|
u.Fragment,
|
|
4047
4077
|
null,
|
|
4048
|
-
m ? u.createElement(a, { styles:
|
|
4049
|
-
|
|
4078
|
+
m ? u.createElement(a, { styles: xl(o) }) : null,
|
|
4079
|
+
w ? u.createElement(dl, { gapMode: e.gapMode }) : null
|
|
4050
4080
|
);
|
|
4051
4081
|
}
|
|
4052
|
-
function
|
|
4082
|
+
function Sl(e) {
|
|
4053
4083
|
for (var t = null; e !== null; )
|
|
4054
4084
|
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
4055
4085
|
return t;
|
|
4056
4086
|
}
|
|
4057
|
-
const
|
|
4087
|
+
const El = Qs(io, Cl);
|
|
4058
4088
|
var fo = u.forwardRef(function(e, t) {
|
|
4059
|
-
return u.createElement(Wt,
|
|
4089
|
+
return u.createElement(Wt, we({}, e, { ref: t, sideCar: El }));
|
|
4060
4090
|
});
|
|
4061
4091
|
fo.classNames = Wt.classNames;
|
|
4062
|
-
var
|
|
4063
|
-
|
|
4092
|
+
var kl = [" ", "Enter", "ArrowUp", "ArrowDown"], Tl = [" ", "Enter"], je = "Select", [Ut, Ht, Al] = Ja(je), [st, Mc] = yn(je, [
|
|
4093
|
+
Al,
|
|
4064
4094
|
Yr
|
|
4065
|
-
]), jt = Yr(), [
|
|
4095
|
+
]), jt = Yr(), [Pl, Fe] = st(je), [Il, Rl] = st(je), po = (e) => {
|
|
4066
4096
|
const {
|
|
4067
4097
|
__scopeSelect: t,
|
|
4068
4098
|
children: n,
|
|
@@ -4073,28 +4103,28 @@ var El = [" ", "Enter", "ArrowUp", "ArrowDown"], kl = [" ", "Enter"], He = "Sele
|
|
|
4073
4103
|
defaultValue: s,
|
|
4074
4104
|
onValueChange: l,
|
|
4075
4105
|
dir: c,
|
|
4076
|
-
name:
|
|
4106
|
+
name: f,
|
|
4077
4107
|
autoComplete: p,
|
|
4078
4108
|
disabled: g,
|
|
4079
|
-
required:
|
|
4109
|
+
required: w,
|
|
4080
4110
|
form: m
|
|
4081
|
-
} = e,
|
|
4111
|
+
} = e, d = jt(t), [v, b] = u.useState(null), [x, y] = u.useState(null), [S, E] = u.useState(!1), T = ti(c), [C, I] = tr({
|
|
4082
4112
|
prop: r,
|
|
4083
4113
|
defaultProp: o ?? !1,
|
|
4084
4114
|
onChange: a,
|
|
4085
|
-
caller:
|
|
4115
|
+
caller: je
|
|
4086
4116
|
}), [O, M] = tr({
|
|
4087
4117
|
prop: i,
|
|
4088
4118
|
defaultProp: s,
|
|
4089
4119
|
onChange: l,
|
|
4090
|
-
caller:
|
|
4091
|
-
}), V = u.useRef(null), $ =
|
|
4092
|
-
return /* @__PURE__ */ k(
|
|
4093
|
-
|
|
4120
|
+
caller: je
|
|
4121
|
+
}), V = u.useRef(null), $ = v ? m || !!v.closest("form") : !0, [D, N] = u.useState(/* @__PURE__ */ new Set()), X = Array.from(D).map((_) => _.props.value).join(";");
|
|
4122
|
+
return /* @__PURE__ */ k(Ps, { ...d, children: /* @__PURE__ */ _t(
|
|
4123
|
+
Pl,
|
|
4094
4124
|
{
|
|
4095
|
-
required:
|
|
4125
|
+
required: w,
|
|
4096
4126
|
scope: t,
|
|
4097
|
-
trigger:
|
|
4127
|
+
trigger: v,
|
|
4098
4128
|
onTriggerChange: b,
|
|
4099
4129
|
valueNode: x,
|
|
4100
4130
|
onValueNodeChange: y,
|
|
@@ -4104,13 +4134,13 @@ var El = [" ", "Enter", "ArrowUp", "ArrowDown"], kl = [" ", "Enter"], He = "Sele
|
|
|
4104
4134
|
value: O,
|
|
4105
4135
|
onValueChange: M,
|
|
4106
4136
|
open: C,
|
|
4107
|
-
onOpenChange:
|
|
4137
|
+
onOpenChange: I,
|
|
4108
4138
|
dir: T,
|
|
4109
4139
|
triggerPointerDownPosRef: V,
|
|
4110
4140
|
disabled: g,
|
|
4111
4141
|
children: [
|
|
4112
4142
|
/* @__PURE__ */ k(Ut.Provider, { scope: t, children: /* @__PURE__ */ k(
|
|
4113
|
-
|
|
4143
|
+
Il,
|
|
4114
4144
|
{
|
|
4115
4145
|
scope: e.__scopeSelect,
|
|
4116
4146
|
onNativeOptionAdd: u.useCallback((_) => {
|
|
@@ -4118,8 +4148,8 @@ var El = [" ", "Enter", "ArrowUp", "ArrowDown"], kl = [" ", "Enter"], He = "Sele
|
|
|
4118
4148
|
}, []),
|
|
4119
4149
|
onNativeOptionRemove: u.useCallback((_) => {
|
|
4120
4150
|
N((L) => {
|
|
4121
|
-
const
|
|
4122
|
-
return
|
|
4151
|
+
const R = new Set(L);
|
|
4152
|
+
return R.delete(_), R;
|
|
4123
4153
|
});
|
|
4124
4154
|
}, []),
|
|
4125
4155
|
children: n
|
|
@@ -4129,9 +4159,9 @@ var El = [" ", "Enter", "ArrowUp", "ArrowDown"], kl = [" ", "Enter"], He = "Sele
|
|
|
4129
4159
|
Mo,
|
|
4130
4160
|
{
|
|
4131
4161
|
"aria-hidden": !0,
|
|
4132
|
-
required:
|
|
4162
|
+
required: w,
|
|
4133
4163
|
tabIndex: -1,
|
|
4134
|
-
name:
|
|
4164
|
+
name: f,
|
|
4135
4165
|
autoComplete: p,
|
|
4136
4166
|
value: O,
|
|
4137
4167
|
onChange: (_) => M(_.target.value),
|
|
@@ -4148,19 +4178,19 @@ var El = [" ", "Enter", "ArrowUp", "ArrowDown"], kl = [" ", "Enter"], He = "Sele
|
|
|
4148
4178
|
}
|
|
4149
4179
|
) });
|
|
4150
4180
|
};
|
|
4151
|
-
po.displayName =
|
|
4181
|
+
po.displayName = je;
|
|
4152
4182
|
var ho = "SelectTrigger", vo = u.forwardRef(
|
|
4153
4183
|
(e, t) => {
|
|
4154
|
-
const { __scopeSelect: n, disabled: r = !1, ...o } = e, a = jt(n), i = Fe(ho, n), s = i.disabled || r, l = Z(t, i.onTriggerChange), c = Ht(n),
|
|
4155
|
-
const
|
|
4184
|
+
const { __scopeSelect: n, disabled: r = !1, ...o } = e, a = jt(n), i = Fe(ho, n), s = i.disabled || r, l = Z(t, i.onTriggerChange), c = Ht(n), f = u.useRef("touch"), [p, g, w] = Do((d) => {
|
|
4185
|
+
const v = c().filter((y) => !y.disabled), b = v.find((y) => y.value === i.value), x = Bo(v, d, b);
|
|
4156
4186
|
x !== void 0 && i.onValueChange(x.value);
|
|
4157
|
-
}), m = (
|
|
4158
|
-
s || (i.onOpenChange(!0),
|
|
4159
|
-
x: Math.round(
|
|
4160
|
-
y: Math.round(
|
|
4187
|
+
}), m = (d) => {
|
|
4188
|
+
s || (i.onOpenChange(!0), w()), d && (i.triggerPointerDownPosRef.current = {
|
|
4189
|
+
x: Math.round(d.pageX),
|
|
4190
|
+
y: Math.round(d.pageY)
|
|
4161
4191
|
});
|
|
4162
4192
|
};
|
|
4163
|
-
return /* @__PURE__ */ k(
|
|
4193
|
+
return /* @__PURE__ */ k(Is, { asChild: !0, ...a, children: /* @__PURE__ */ k(
|
|
4164
4194
|
K.button,
|
|
4165
4195
|
{
|
|
4166
4196
|
type: "button",
|
|
@@ -4176,29 +4206,29 @@ var ho = "SelectTrigger", vo = u.forwardRef(
|
|
|
4176
4206
|
"data-placeholder": Lo(i.value) ? "" : void 0,
|
|
4177
4207
|
...o,
|
|
4178
4208
|
ref: l,
|
|
4179
|
-
onClick: G(o.onClick, (
|
|
4180
|
-
|
|
4209
|
+
onClick: G(o.onClick, (d) => {
|
|
4210
|
+
d.currentTarget.focus(), f.current !== "mouse" && m(d);
|
|
4181
4211
|
}),
|
|
4182
|
-
onPointerDown: G(o.onPointerDown, (
|
|
4183
|
-
|
|
4184
|
-
const
|
|
4185
|
-
|
|
4212
|
+
onPointerDown: G(o.onPointerDown, (d) => {
|
|
4213
|
+
f.current = d.pointerType;
|
|
4214
|
+
const v = d.target;
|
|
4215
|
+
v.hasPointerCapture(d.pointerId) && v.releasePointerCapture(d.pointerId), d.button === 0 && d.ctrlKey === !1 && d.pointerType === "mouse" && (m(d), d.preventDefault());
|
|
4186
4216
|
}),
|
|
4187
|
-
onKeyDown: G(o.onKeyDown, (
|
|
4188
|
-
const
|
|
4189
|
-
!(
|
|
4217
|
+
onKeyDown: G(o.onKeyDown, (d) => {
|
|
4218
|
+
const v = p.current !== "";
|
|
4219
|
+
!(d.ctrlKey || d.altKey || d.metaKey) && d.key.length === 1 && g(d.key), !(v && d.key === " ") && kl.includes(d.key) && (m(), d.preventDefault());
|
|
4190
4220
|
})
|
|
4191
4221
|
}
|
|
4192
4222
|
) });
|
|
4193
4223
|
}
|
|
4194
4224
|
);
|
|
4195
4225
|
vo.displayName = ho;
|
|
4196
|
-
var go = "SelectValue",
|
|
4226
|
+
var go = "SelectValue", _l = u.forwardRef(
|
|
4197
4227
|
(e, t) => {
|
|
4198
|
-
const { __scopeSelect: n, className: r, style: o, children: a, placeholder: i = "", ...s } = e, l = Fe(go, n), { onValueNodeHasChildrenChange: c } = l,
|
|
4228
|
+
const { __scopeSelect: n, className: r, style: o, children: a, placeholder: i = "", ...s } = e, l = Fe(go, n), { onValueNodeHasChildrenChange: c } = l, f = a !== void 0, p = Z(t, l.onValueNodeChange);
|
|
4199
4229
|
return te(() => {
|
|
4200
|
-
c(
|
|
4201
|
-
}, [c,
|
|
4230
|
+
c(f);
|
|
4231
|
+
}, [c, f]), /* @__PURE__ */ k(
|
|
4202
4232
|
K.span,
|
|
4203
4233
|
{
|
|
4204
4234
|
...s,
|
|
@@ -4209,19 +4239,19 @@ var go = "SelectValue", Il = u.forwardRef(
|
|
|
4209
4239
|
);
|
|
4210
4240
|
}
|
|
4211
4241
|
);
|
|
4212
|
-
|
|
4213
|
-
var
|
|
4242
|
+
_l.displayName = go;
|
|
4243
|
+
var Nl = "SelectIcon", mo = u.forwardRef(
|
|
4214
4244
|
(e, t) => {
|
|
4215
4245
|
const { __scopeSelect: n, children: r, ...o } = e;
|
|
4216
4246
|
return /* @__PURE__ */ k(K.span, { "aria-hidden": !0, ...o, ref: t, children: r || "▼" });
|
|
4217
4247
|
}
|
|
4218
4248
|
);
|
|
4219
|
-
mo.displayName =
|
|
4220
|
-
var
|
|
4221
|
-
wo.displayName =
|
|
4222
|
-
var
|
|
4249
|
+
mo.displayName = Nl;
|
|
4250
|
+
var Ol = "SelectPortal", wo = (e) => /* @__PURE__ */ k(to, { asChild: !0, ...e });
|
|
4251
|
+
wo.displayName = Ol;
|
|
4252
|
+
var Ye = "SelectContent", bo = u.forwardRef(
|
|
4223
4253
|
(e, t) => {
|
|
4224
|
-
const n = Fe(
|
|
4254
|
+
const n = Fe(Ye, e.__scopeSelect), [r, o] = u.useState();
|
|
4225
4255
|
if (te(() => {
|
|
4226
4256
|
o(new DocumentFragment());
|
|
4227
4257
|
}, []), !n.open) {
|
|
@@ -4234,8 +4264,8 @@ var je = "SelectContent", bo = u.forwardRef(
|
|
|
4234
4264
|
return /* @__PURE__ */ k(yo, { ...e, ref: t });
|
|
4235
4265
|
}
|
|
4236
4266
|
);
|
|
4237
|
-
bo.displayName =
|
|
4238
|
-
var
|
|
4267
|
+
bo.displayName = Ye;
|
|
4268
|
+
var ue = 10, [xo, Ve] = st(Ye), Ml = "SelectContentImpl", Ll = /* @__PURE__ */ vt("SelectContent.RemoveScroll"), yo = u.forwardRef(
|
|
4239
4269
|
(e, t) => {
|
|
4240
4270
|
const {
|
|
4241
4271
|
__scopeSelect: n,
|
|
@@ -4248,21 +4278,21 @@ var se = 10, [xo, Ve] = st(je), Ol = "SelectContentImpl", Ml = /* @__PURE__ */ v
|
|
|
4248
4278
|
side: s,
|
|
4249
4279
|
sideOffset: l,
|
|
4250
4280
|
align: c,
|
|
4251
|
-
alignOffset:
|
|
4281
|
+
alignOffset: f,
|
|
4252
4282
|
arrowPadding: p,
|
|
4253
4283
|
collisionBoundary: g,
|
|
4254
|
-
collisionPadding:
|
|
4284
|
+
collisionPadding: w,
|
|
4255
4285
|
sticky: m,
|
|
4256
|
-
hideWhenDetached:
|
|
4257
|
-
avoidCollisions:
|
|
4286
|
+
hideWhenDetached: d,
|
|
4287
|
+
avoidCollisions: v,
|
|
4258
4288
|
//
|
|
4259
4289
|
...b
|
|
4260
|
-
} = e, x = Fe(
|
|
4290
|
+
} = e, x = Fe(Ye, n), [y, S] = u.useState(null), [E, T] = u.useState(null), C = Z(t, (A) => S(A)), [I, O] = u.useState(null), [M, V] = u.useState(
|
|
4261
4291
|
null
|
|
4262
4292
|
), $ = Ht(n), [D, N] = u.useState(!1), X = u.useRef(!1);
|
|
4263
4293
|
u.useEffect(() => {
|
|
4264
|
-
if (y) return
|
|
4265
|
-
}, [y]),
|
|
4294
|
+
if (y) return Ws(y);
|
|
4295
|
+
}, [y]), fi();
|
|
4266
4296
|
const _ = u.useCallback(
|
|
4267
4297
|
(A) => {
|
|
4268
4298
|
const [U, ...Q] = $().map((z) => z.ref.current), [F] = Q.slice(-1), B = document.activeElement;
|
|
@@ -4271,13 +4301,13 @@ var se = 10, [xo, Ve] = st(je), Ol = "SelectContentImpl", Ml = /* @__PURE__ */ v
|
|
|
4271
4301
|
},
|
|
4272
4302
|
[$, E]
|
|
4273
4303
|
), L = u.useCallback(
|
|
4274
|
-
() => _([
|
|
4275
|
-
[_,
|
|
4304
|
+
() => _([I, y]),
|
|
4305
|
+
[_, I, y]
|
|
4276
4306
|
);
|
|
4277
4307
|
u.useEffect(() => {
|
|
4278
4308
|
D && L();
|
|
4279
4309
|
}, [D, L]);
|
|
4280
|
-
const { onOpenChange:
|
|
4310
|
+
const { onOpenChange: R, triggerPointerDownPosRef: W } = x;
|
|
4281
4311
|
u.useEffect(() => {
|
|
4282
4312
|
if (y) {
|
|
4283
4313
|
let A = { x: 0, y: 0 };
|
|
@@ -4288,18 +4318,18 @@ var se = 10, [xo, Ve] = st(je), Ol = "SelectContentImpl", Ml = /* @__PURE__ */ v
|
|
|
4288
4318
|
y: Math.abs(Math.round(F.pageY) - (((z = W.current) == null ? void 0 : z.y) ?? 0))
|
|
4289
4319
|
};
|
|
4290
4320
|
}, Q = (F) => {
|
|
4291
|
-
A.x <= 10 && A.y <= 10 ? F.preventDefault() : y.contains(F.target) ||
|
|
4321
|
+
A.x <= 10 && A.y <= 10 ? F.preventDefault() : y.contains(F.target) || R(!1), document.removeEventListener("pointermove", U), W.current = null;
|
|
4292
4322
|
};
|
|
4293
4323
|
return W.current !== null && (document.addEventListener("pointermove", U), document.addEventListener("pointerup", Q, { capture: !0, once: !0 })), () => {
|
|
4294
4324
|
document.removeEventListener("pointermove", U), document.removeEventListener("pointerup", Q, { capture: !0 });
|
|
4295
4325
|
};
|
|
4296
4326
|
}
|
|
4297
|
-
}, [y,
|
|
4298
|
-
const A = () =>
|
|
4327
|
+
}, [y, R, W]), u.useEffect(() => {
|
|
4328
|
+
const A = () => R(!1);
|
|
4299
4329
|
return window.addEventListener("blur", A), window.addEventListener("resize", A), () => {
|
|
4300
4330
|
window.removeEventListener("blur", A), window.removeEventListener("resize", A);
|
|
4301
4331
|
};
|
|
4302
|
-
}, [
|
|
4332
|
+
}, [R]);
|
|
4303
4333
|
const [ee, Ee] = Do((A) => {
|
|
4304
4334
|
const U = $().filter((B) => !B.disabled), Q = U.find((B) => B.ref.current === document.activeElement), F = Bo(U, A, Q);
|
|
4305
4335
|
F && setTimeout(() => F.ref.current.focus());
|
|
@@ -4309,23 +4339,23 @@ var se = 10, [xo, Ve] = st(je), Ol = "SelectContentImpl", Ml = /* @__PURE__ */ v
|
|
|
4309
4339
|
(x.value !== void 0 && x.value === U || F) && (O(A), F && (X.current = !0));
|
|
4310
4340
|
},
|
|
4311
4341
|
[x.value]
|
|
4312
|
-
), ct = u.useCallback(() => y == null ? void 0 : y.focus(), [y]),
|
|
4342
|
+
), ct = u.useCallback(() => y == null ? void 0 : y.focus(), [y]), Re = u.useCallback(
|
|
4313
4343
|
(A, U, Q) => {
|
|
4314
4344
|
const F = !X.current && !Q;
|
|
4315
4345
|
(x.value !== void 0 && x.value === U || F) && V(A);
|
|
4316
4346
|
},
|
|
4317
4347
|
[x.value]
|
|
4318
|
-
),
|
|
4348
|
+
), Xe = r === "popper" ? fn : Co, $e = Xe === fn ? {
|
|
4319
4349
|
side: s,
|
|
4320
4350
|
sideOffset: l,
|
|
4321
4351
|
align: c,
|
|
4322
|
-
alignOffset:
|
|
4352
|
+
alignOffset: f,
|
|
4323
4353
|
arrowPadding: p,
|
|
4324
4354
|
collisionBoundary: g,
|
|
4325
|
-
collisionPadding:
|
|
4355
|
+
collisionPadding: w,
|
|
4326
4356
|
sticky: m,
|
|
4327
|
-
hideWhenDetached:
|
|
4328
|
-
avoidCollisions:
|
|
4357
|
+
hideWhenDetached: d,
|
|
4358
|
+
avoidCollisions: v
|
|
4329
4359
|
} : {};
|
|
4330
4360
|
return /* @__PURE__ */ k(
|
|
4331
4361
|
xo,
|
|
@@ -4335,15 +4365,15 @@ var se = 10, [xo, Ve] = st(je), Ol = "SelectContentImpl", Ml = /* @__PURE__ */ v
|
|
|
4335
4365
|
viewport: E,
|
|
4336
4366
|
onViewportChange: T,
|
|
4337
4367
|
itemRefCallback: lt,
|
|
4338
|
-
selectedItem:
|
|
4368
|
+
selectedItem: I,
|
|
4339
4369
|
onItemLeave: ct,
|
|
4340
|
-
itemTextRefCallback:
|
|
4370
|
+
itemTextRefCallback: Re,
|
|
4341
4371
|
focusSelectedItem: L,
|
|
4342
4372
|
selectedItemText: M,
|
|
4343
4373
|
position: r,
|
|
4344
4374
|
isPositioned: D,
|
|
4345
4375
|
searchRef: ee,
|
|
4346
|
-
children: /* @__PURE__ */ k(fo, { as:
|
|
4376
|
+
children: /* @__PURE__ */ k(fo, { as: Ll, allowPinchZoom: !0, children: /* @__PURE__ */ k(
|
|
4347
4377
|
Nr,
|
|
4348
4378
|
{
|
|
4349
4379
|
asChild: !0,
|
|
@@ -4356,7 +4386,7 @@ var se = 10, [xo, Ve] = st(je), Ol = "SelectContentImpl", Ml = /* @__PURE__ */ v
|
|
|
4356
4386
|
(U = x.trigger) == null || U.focus({ preventScroll: !0 }), A.preventDefault();
|
|
4357
4387
|
}),
|
|
4358
4388
|
children: /* @__PURE__ */ k(
|
|
4359
|
-
|
|
4389
|
+
Rr,
|
|
4360
4390
|
{
|
|
4361
4391
|
asChild: !0,
|
|
4362
4392
|
disableOutsidePointerEvents: !0,
|
|
@@ -4365,7 +4395,7 @@ var se = 10, [xo, Ve] = st(je), Ol = "SelectContentImpl", Ml = /* @__PURE__ */ v
|
|
|
4365
4395
|
onFocusOutside: (A) => A.preventDefault(),
|
|
4366
4396
|
onDismiss: () => x.onOpenChange(!1),
|
|
4367
4397
|
children: /* @__PURE__ */ k(
|
|
4368
|
-
|
|
4398
|
+
Xe,
|
|
4369
4399
|
{
|
|
4370
4400
|
role: "listbox",
|
|
4371
4401
|
id: x.contentId,
|
|
@@ -4405,50 +4435,50 @@ var se = 10, [xo, Ve] = st(je), Ol = "SelectContentImpl", Ml = /* @__PURE__ */ v
|
|
|
4405
4435
|
);
|
|
4406
4436
|
}
|
|
4407
4437
|
);
|
|
4408
|
-
yo.displayName =
|
|
4409
|
-
var
|
|
4410
|
-
const { __scopeSelect: n, onPlaced: r, ...o } = e, a = Fe(
|
|
4411
|
-
if (a.trigger && a.valueNode && s && c &&
|
|
4412
|
-
const C = a.trigger.getBoundingClientRect(),
|
|
4438
|
+
yo.displayName = Ml;
|
|
4439
|
+
var Dl = "SelectItemAlignedPosition", Co = u.forwardRef((e, t) => {
|
|
4440
|
+
const { __scopeSelect: n, onPlaced: r, ...o } = e, a = Fe(Ye, n), i = Ve(Ye, n), [s, l] = u.useState(null), [c, f] = u.useState(null), p = Z(t, (C) => f(C)), g = Ht(n), w = u.useRef(!1), m = u.useRef(!0), { viewport: d, selectedItem: v, selectedItemText: b, focusSelectedItem: x } = i, y = u.useCallback(() => {
|
|
4441
|
+
if (a.trigger && a.valueNode && s && c && d && v && b) {
|
|
4442
|
+
const C = a.trigger.getBoundingClientRect(), I = c.getBoundingClientRect(), O = a.valueNode.getBoundingClientRect(), M = b.getBoundingClientRect();
|
|
4413
4443
|
if (a.dir !== "rtl") {
|
|
4414
|
-
const B = M.left -
|
|
4415
|
-
|
|
4444
|
+
const B = M.left - I.left, z = O.left - B, oe = C.left - z, ge = C.width + oe, ut = Math.max(ge, I.width), dt = window.innerWidth - ue, ft = Fn(z, [
|
|
4445
|
+
ue,
|
|
4416
4446
|
// Prevents the content from going off the starting edge of the
|
|
4417
4447
|
// viewport. It may still go off the ending edge, but this can be
|
|
4418
4448
|
// controlled by the user since they may want to manage overflow in a
|
|
4419
4449
|
// specific way.
|
|
4420
4450
|
// https://github.com/radix-ui/primitives/issues/2049
|
|
4421
|
-
Math.max(
|
|
4451
|
+
Math.max(ue, dt - ut)
|
|
4422
4452
|
]);
|
|
4423
|
-
s.style.minWidth =
|
|
4453
|
+
s.style.minWidth = ge + "px", s.style.left = ft + "px";
|
|
4424
4454
|
} else {
|
|
4425
|
-
const B =
|
|
4426
|
-
|
|
4427
|
-
Math.max(
|
|
4455
|
+
const B = I.right - M.right, z = window.innerWidth - O.right - B, oe = window.innerWidth - C.right - z, ge = C.width + oe, ut = Math.max(ge, I.width), dt = window.innerWidth - ue, ft = Fn(z, [
|
|
4456
|
+
ue,
|
|
4457
|
+
Math.max(ue, dt - ut)
|
|
4428
4458
|
]);
|
|
4429
|
-
s.style.minWidth =
|
|
4459
|
+
s.style.minWidth = ge + "px", s.style.right = ft + "px";
|
|
4430
4460
|
}
|
|
4431
|
-
const V = g(), $ = window.innerHeight -
|
|
4432
|
-
if (U <=
|
|
4433
|
-
const B = V.length > 0 &&
|
|
4461
|
+
const V = g(), $ = window.innerHeight - ue * 2, D = d.scrollHeight, N = window.getComputedStyle(c), X = parseInt(N.borderTopWidth, 10), _ = parseInt(N.paddingTop, 10), L = parseInt(N.borderBottomWidth, 10), R = parseInt(N.paddingBottom, 10), W = X + _ + D + R + L, ee = Math.min(v.offsetHeight * 5, W), Ee = window.getComputedStyle(d), lt = parseInt(Ee.paddingTop, 10), ct = parseInt(Ee.paddingBottom, 10), Re = C.top + C.height / 2 - ue, Xe = $ - Re, $e = v.offsetHeight / 2, A = v.offsetTop + $e, U = X + _ + A, Q = W - U;
|
|
4462
|
+
if (U <= Re) {
|
|
4463
|
+
const B = V.length > 0 && v === V[V.length - 1].ref.current;
|
|
4434
4464
|
s.style.bottom = "0px";
|
|
4435
|
-
const z = c.clientHeight -
|
|
4436
|
-
|
|
4465
|
+
const z = c.clientHeight - d.offsetTop - d.offsetHeight, oe = Math.max(
|
|
4466
|
+
Xe,
|
|
4437
4467
|
$e + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
4438
4468
|
(B ? ct : 0) + z + L
|
|
4439
|
-
),
|
|
4440
|
-
s.style.height =
|
|
4469
|
+
), ge = U + oe;
|
|
4470
|
+
s.style.height = ge + "px";
|
|
4441
4471
|
} else {
|
|
4442
|
-
const B = V.length > 0 &&
|
|
4472
|
+
const B = V.length > 0 && v === V[0].ref.current;
|
|
4443
4473
|
s.style.top = "0px";
|
|
4444
4474
|
const oe = Math.max(
|
|
4445
|
-
|
|
4446
|
-
X +
|
|
4475
|
+
Re,
|
|
4476
|
+
X + d.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
4447
4477
|
(B ? lt : 0) + $e
|
|
4448
4478
|
) + Q;
|
|
4449
|
-
s.style.height = oe + "px",
|
|
4479
|
+
s.style.height = oe + "px", d.scrollTop = U - Re + d.offsetTop;
|
|
4450
4480
|
}
|
|
4451
|
-
s.style.margin = `${
|
|
4481
|
+
s.style.margin = `${ue}px 0`, s.style.minHeight = ee + "px", s.style.maxHeight = $ + "px", r == null || r(), requestAnimationFrame(() => w.current = !0);
|
|
4452
4482
|
}
|
|
4453
4483
|
}, [
|
|
4454
4484
|
g,
|
|
@@ -4456,8 +4486,8 @@ var Ll = "SelectItemAlignedPosition", Co = u.forwardRef((e, t) => {
|
|
|
4456
4486
|
a.valueNode,
|
|
4457
4487
|
s,
|
|
4458
4488
|
c,
|
|
4459
|
-
|
|
4460
|
-
|
|
4489
|
+
d,
|
|
4490
|
+
v,
|
|
4461
4491
|
b,
|
|
4462
4492
|
a.dir,
|
|
4463
4493
|
r
|
|
@@ -4474,11 +4504,11 @@ var Ll = "SelectItemAlignedPosition", Co = u.forwardRef((e, t) => {
|
|
|
4474
4504
|
[y, x]
|
|
4475
4505
|
);
|
|
4476
4506
|
return /* @__PURE__ */ k(
|
|
4477
|
-
|
|
4507
|
+
zl,
|
|
4478
4508
|
{
|
|
4479
4509
|
scope: n,
|
|
4480
4510
|
contentWrapper: s,
|
|
4481
|
-
shouldExpandOnScrollRef:
|
|
4511
|
+
shouldExpandOnScrollRef: w,
|
|
4482
4512
|
onScrollButtonChange: T,
|
|
4483
4513
|
children: /* @__PURE__ */ k(
|
|
4484
4514
|
"div",
|
|
@@ -4510,12 +4540,12 @@ var Ll = "SelectItemAlignedPosition", Co = u.forwardRef((e, t) => {
|
|
|
4510
4540
|
}
|
|
4511
4541
|
);
|
|
4512
4542
|
});
|
|
4513
|
-
Co.displayName =
|
|
4514
|
-
var
|
|
4543
|
+
Co.displayName = Dl;
|
|
4544
|
+
var Bl = "SelectPopperPosition", fn = u.forwardRef((e, t) => {
|
|
4515
4545
|
const {
|
|
4516
4546
|
__scopeSelect: n,
|
|
4517
4547
|
align: r = "start",
|
|
4518
|
-
collisionPadding: o =
|
|
4548
|
+
collisionPadding: o = ue,
|
|
4519
4549
|
...a
|
|
4520
4550
|
} = e, i = jt(n);
|
|
4521
4551
|
return /* @__PURE__ */ k(
|
|
@@ -4539,8 +4569,8 @@ var Dl = "SelectPopperPosition", fn = u.forwardRef((e, t) => {
|
|
|
4539
4569
|
}
|
|
4540
4570
|
);
|
|
4541
4571
|
});
|
|
4542
|
-
fn.displayName =
|
|
4543
|
-
var [
|
|
4572
|
+
fn.displayName = Bl;
|
|
4573
|
+
var [zl, Nn] = st(Ye, {}), pn = "SelectViewport", So = u.forwardRef(
|
|
4544
4574
|
(e, t) => {
|
|
4545
4575
|
const { __scopeSelect: n, nonce: r, ...o } = e, a = Ve(pn, n), i = Nn(pn, n), s = Z(t, a.onViewportChange), l = u.useRef(0);
|
|
4546
4576
|
return /* @__PURE__ */ _t(mn, { children: [
|
|
@@ -4574,18 +4604,18 @@ var [Bl, Nn] = st(je, {}), pn = "SelectViewport", So = u.forwardRef(
|
|
|
4574
4604
|
...o.style
|
|
4575
4605
|
},
|
|
4576
4606
|
onScroll: G(o.onScroll, (c) => {
|
|
4577
|
-
const
|
|
4607
|
+
const f = c.currentTarget, { contentWrapper: p, shouldExpandOnScrollRef: g } = i;
|
|
4578
4608
|
if (g != null && g.current && p) {
|
|
4579
|
-
const
|
|
4580
|
-
if (
|
|
4581
|
-
const m = window.innerHeight -
|
|
4609
|
+
const w = Math.abs(l.current - f.scrollTop);
|
|
4610
|
+
if (w > 0) {
|
|
4611
|
+
const m = window.innerHeight - ue * 2, d = parseFloat(p.style.minHeight), v = parseFloat(p.style.height), b = Math.max(d, v);
|
|
4582
4612
|
if (b < m) {
|
|
4583
|
-
const x = b +
|
|
4584
|
-
p.style.height = y + "px", p.style.bottom === "0px" && (
|
|
4613
|
+
const x = b + w, y = Math.min(m, x), S = x - y;
|
|
4614
|
+
p.style.height = y + "px", p.style.bottom === "0px" && (f.scrollTop = S > 0 ? S : 0, p.style.justifyContent = "flex-end");
|
|
4585
4615
|
}
|
|
4586
4616
|
}
|
|
4587
4617
|
}
|
|
4588
|
-
l.current =
|
|
4618
|
+
l.current = f.scrollTop;
|
|
4589
4619
|
})
|
|
4590
4620
|
}
|
|
4591
4621
|
) })
|
|
@@ -4593,21 +4623,21 @@ var [Bl, Nn] = st(je, {}), pn = "SelectViewport", So = u.forwardRef(
|
|
|
4593
4623
|
}
|
|
4594
4624
|
);
|
|
4595
4625
|
So.displayName = pn;
|
|
4596
|
-
var Eo = "SelectGroup", [
|
|
4626
|
+
var Eo = "SelectGroup", [Fl, Vl] = st(Eo), $l = u.forwardRef(
|
|
4597
4627
|
(e, t) => {
|
|
4598
4628
|
const { __scopeSelect: n, ...r } = e, o = Cn();
|
|
4599
|
-
return /* @__PURE__ */ k(
|
|
4629
|
+
return /* @__PURE__ */ k(Fl, { scope: n, id: o, children: /* @__PURE__ */ k(K.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
|
|
4600
4630
|
}
|
|
4601
4631
|
);
|
|
4602
|
-
|
|
4603
|
-
var ko = "SelectLabel",
|
|
4632
|
+
$l.displayName = Eo;
|
|
4633
|
+
var ko = "SelectLabel", Wl = u.forwardRef(
|
|
4604
4634
|
(e, t) => {
|
|
4605
|
-
const { __scopeSelect: n, ...r } = e, o =
|
|
4635
|
+
const { __scopeSelect: n, ...r } = e, o = Vl(ko, n);
|
|
4606
4636
|
return /* @__PURE__ */ k(K.div, { id: o.id, ...r, ref: t });
|
|
4607
4637
|
}
|
|
4608
4638
|
);
|
|
4609
|
-
|
|
4610
|
-
var Dt = "SelectItem", [
|
|
4639
|
+
Wl.displayName = ko;
|
|
4640
|
+
var Dt = "SelectItem", [Ul, To] = st(Dt), Ao = u.forwardRef(
|
|
4611
4641
|
(e, t) => {
|
|
4612
4642
|
const {
|
|
4613
4643
|
__scopeSelect: n,
|
|
@@ -4615,13 +4645,13 @@ var Dt = "SelectItem", [Wl, To] = st(Dt), Ao = u.forwardRef(
|
|
|
4615
4645
|
disabled: o = !1,
|
|
4616
4646
|
textValue: a,
|
|
4617
4647
|
...i
|
|
4618
|
-
} = e, s = Fe(Dt, n), l = Ve(Dt, n), c = s.value === r, [
|
|
4648
|
+
} = e, s = Fe(Dt, n), l = Ve(Dt, n), c = s.value === r, [f, p] = u.useState(a ?? ""), [g, w] = u.useState(!1), m = Z(
|
|
4619
4649
|
t,
|
|
4620
4650
|
(x) => {
|
|
4621
4651
|
var y;
|
|
4622
4652
|
return (y = l.itemRefCallback) == null ? void 0 : y.call(l, x, r, o);
|
|
4623
4653
|
}
|
|
4624
|
-
),
|
|
4654
|
+
), d = Cn(), v = u.useRef("touch"), b = () => {
|
|
4625
4655
|
o || (s.onValueChange(r), s.onOpenChange(!1));
|
|
4626
4656
|
};
|
|
4627
4657
|
if (r === "")
|
|
@@ -4629,12 +4659,12 @@ var Dt = "SelectItem", [Wl, To] = st(Dt), Ao = u.forwardRef(
|
|
|
4629
4659
|
"A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
|
|
4630
4660
|
);
|
|
4631
4661
|
return /* @__PURE__ */ k(
|
|
4632
|
-
|
|
4662
|
+
Ul,
|
|
4633
4663
|
{
|
|
4634
4664
|
scope: n,
|
|
4635
4665
|
value: r,
|
|
4636
4666
|
disabled: o,
|
|
4637
|
-
textId:
|
|
4667
|
+
textId: d,
|
|
4638
4668
|
isSelected: c,
|
|
4639
4669
|
onItemTextChange: u.useCallback((x) => {
|
|
4640
4670
|
p((y) => y || ((x == null ? void 0 : x.textContent) ?? "").trim());
|
|
@@ -4645,12 +4675,12 @@ var Dt = "SelectItem", [Wl, To] = st(Dt), Ao = u.forwardRef(
|
|
|
4645
4675
|
scope: n,
|
|
4646
4676
|
value: r,
|
|
4647
4677
|
disabled: o,
|
|
4648
|
-
textValue:
|
|
4678
|
+
textValue: f,
|
|
4649
4679
|
children: /* @__PURE__ */ k(
|
|
4650
4680
|
K.div,
|
|
4651
4681
|
{
|
|
4652
4682
|
role: "option",
|
|
4653
|
-
"aria-labelledby":
|
|
4683
|
+
"aria-labelledby": d,
|
|
4654
4684
|
"data-highlighted": g ? "" : void 0,
|
|
4655
4685
|
"aria-selected": c && g,
|
|
4656
4686
|
"data-state": c ? "checked" : "unchecked",
|
|
@@ -4659,20 +4689,20 @@ var Dt = "SelectItem", [Wl, To] = st(Dt), Ao = u.forwardRef(
|
|
|
4659
4689
|
tabIndex: o ? void 0 : -1,
|
|
4660
4690
|
...i,
|
|
4661
4691
|
ref: m,
|
|
4662
|
-
onFocus: G(i.onFocus, () =>
|
|
4663
|
-
onBlur: G(i.onBlur, () =>
|
|
4692
|
+
onFocus: G(i.onFocus, () => w(!0)),
|
|
4693
|
+
onBlur: G(i.onBlur, () => w(!1)),
|
|
4664
4694
|
onClick: G(i.onClick, () => {
|
|
4665
|
-
|
|
4695
|
+
v.current !== "mouse" && b();
|
|
4666
4696
|
}),
|
|
4667
4697
|
onPointerUp: G(i.onPointerUp, () => {
|
|
4668
|
-
|
|
4698
|
+
v.current === "mouse" && b();
|
|
4669
4699
|
}),
|
|
4670
4700
|
onPointerDown: G(i.onPointerDown, (x) => {
|
|
4671
|
-
|
|
4701
|
+
v.current = x.pointerType;
|
|
4672
4702
|
}),
|
|
4673
4703
|
onPointerMove: G(i.onPointerMove, (x) => {
|
|
4674
4704
|
var y;
|
|
4675
|
-
|
|
4705
|
+
v.current = x.pointerType, o ? (y = l.onItemLeave) == null || y.call(l) : v.current === "mouse" && x.currentTarget.focus({ preventScroll: !0 });
|
|
4676
4706
|
}),
|
|
4677
4707
|
onPointerLeave: G(i.onPointerLeave, (x) => {
|
|
4678
4708
|
var y;
|
|
@@ -4680,7 +4710,7 @@ var Dt = "SelectItem", [Wl, To] = st(Dt), Ao = u.forwardRef(
|
|
|
4680
4710
|
}),
|
|
4681
4711
|
onKeyDown: G(i.onKeyDown, (x) => {
|
|
4682
4712
|
var S;
|
|
4683
|
-
((S = l.searchRef) == null ? void 0 : S.current) !== "" && x.key === " " || (
|
|
4713
|
+
((S = l.searchRef) == null ? void 0 : S.current) !== "" && x.key === " " || (Tl.includes(x.key) && b(), x.key === " " && x.preventDefault());
|
|
4684
4714
|
})
|
|
4685
4715
|
}
|
|
4686
4716
|
)
|
|
@@ -4693,7 +4723,7 @@ var Dt = "SelectItem", [Wl, To] = st(Dt), Ao = u.forwardRef(
|
|
|
4693
4723
|
Ao.displayName = Dt;
|
|
4694
4724
|
var ht = "SelectItemText", Po = u.forwardRef(
|
|
4695
4725
|
(e, t) => {
|
|
4696
|
-
const { __scopeSelect: n, className: r, style: o, ...a } = e, i = Fe(ht, n), s = Ve(ht, n), l = To(ht, n), c = Rl(ht, n), [
|
|
4726
|
+
const { __scopeSelect: n, className: r, style: o, ...a } = e, i = Fe(ht, n), s = Ve(ht, n), l = To(ht, n), c = Rl(ht, n), [f, p] = u.useState(null), g = Z(
|
|
4697
4727
|
t,
|
|
4698
4728
|
(b) => p(b),
|
|
4699
4729
|
l.onItemTextChange,
|
|
@@ -4701,24 +4731,24 @@ var ht = "SelectItemText", Po = u.forwardRef(
|
|
|
4701
4731
|
var x;
|
|
4702
4732
|
return (x = s.itemTextRefCallback) == null ? void 0 : x.call(s, b, l.value, l.disabled);
|
|
4703
4733
|
}
|
|
4704
|
-
),
|
|
4705
|
-
() => /* @__PURE__ */ k("option", { value: l.value, disabled: l.disabled, children:
|
|
4706
|
-
[l.disabled, l.value,
|
|
4707
|
-
), { onNativeOptionAdd:
|
|
4708
|
-
return te(() => (
|
|
4734
|
+
), w = f == null ? void 0 : f.textContent, m = u.useMemo(
|
|
4735
|
+
() => /* @__PURE__ */ k("option", { value: l.value, disabled: l.disabled, children: w }, l.value),
|
|
4736
|
+
[l.disabled, l.value, w]
|
|
4737
|
+
), { onNativeOptionAdd: d, onNativeOptionRemove: v } = c;
|
|
4738
|
+
return te(() => (d(m), () => v(m)), [d, v, m]), /* @__PURE__ */ _t(mn, { children: [
|
|
4709
4739
|
/* @__PURE__ */ k(K.span, { id: l.textId, ...a, ref: g }),
|
|
4710
4740
|
l.isSelected && i.valueNode && !i.valueNodeHasChildren ? u.createPortal(a.children, i.valueNode) : null
|
|
4711
4741
|
] });
|
|
4712
4742
|
}
|
|
4713
4743
|
);
|
|
4714
4744
|
Po.displayName = ht;
|
|
4715
|
-
var
|
|
4745
|
+
var Io = "SelectItemIndicator", Ro = u.forwardRef(
|
|
4716
4746
|
(e, t) => {
|
|
4717
4747
|
const { __scopeSelect: n, ...r } = e;
|
|
4718
|
-
return To(
|
|
4748
|
+
return To(Io, n).isSelected ? /* @__PURE__ */ k(K.span, { "aria-hidden": !0, ...r, ref: t }) : null;
|
|
4719
4749
|
}
|
|
4720
4750
|
);
|
|
4721
|
-
|
|
4751
|
+
Ro.displayName = Io;
|
|
4722
4752
|
var hn = "SelectScrollUpButton", _o = u.forwardRef((e, t) => {
|
|
4723
4753
|
const n = Ve(hn, e.__scopeSelect), r = Nn(hn, e.__scopeSelect), [o, a] = u.useState(!1), i = Z(t, r.onScrollButtonChange);
|
|
4724
4754
|
return te(() => {
|
|
@@ -4748,8 +4778,8 @@ var vn = "SelectScrollDownButton", No = u.forwardRef((e, t) => {
|
|
|
4748
4778
|
return te(() => {
|
|
4749
4779
|
if (n.viewport && n.isPositioned) {
|
|
4750
4780
|
let s = function() {
|
|
4751
|
-
const c = l.scrollHeight - l.clientHeight,
|
|
4752
|
-
a(
|
|
4781
|
+
const c = l.scrollHeight - l.clientHeight, f = Math.ceil(l.scrollTop) < c;
|
|
4782
|
+
a(f);
|
|
4753
4783
|
};
|
|
4754
4784
|
const l = n.viewport;
|
|
4755
4785
|
return s(), l.addEventListener("scroll", s), () => l.removeEventListener("scroll", s);
|
|
@@ -4772,9 +4802,9 @@ var Oo = u.forwardRef((e, t) => {
|
|
|
4772
4802
|
i.current !== null && (window.clearInterval(i.current), i.current = null);
|
|
4773
4803
|
}, []);
|
|
4774
4804
|
return u.useEffect(() => () => l(), [l]), te(() => {
|
|
4775
|
-
var
|
|
4805
|
+
var f;
|
|
4776
4806
|
const c = s().find((p) => p.ref.current === document.activeElement);
|
|
4777
|
-
(
|
|
4807
|
+
(f = c == null ? void 0 : c.ref.current) == null || f.scrollIntoView({ block: "nearest" });
|
|
4778
4808
|
}, [s]), /* @__PURE__ */ k(
|
|
4779
4809
|
K.div,
|
|
4780
4810
|
{
|
|
@@ -4794,33 +4824,33 @@ var Oo = u.forwardRef((e, t) => {
|
|
|
4794
4824
|
})
|
|
4795
4825
|
}
|
|
4796
4826
|
);
|
|
4797
|
-
}),
|
|
4827
|
+
}), Hl = "SelectSeparator", jl = u.forwardRef(
|
|
4798
4828
|
(e, t) => {
|
|
4799
4829
|
const { __scopeSelect: n, ...r } = e;
|
|
4800
4830
|
return /* @__PURE__ */ k(K.div, { "aria-hidden": !0, ...r, ref: t });
|
|
4801
4831
|
}
|
|
4802
4832
|
);
|
|
4803
|
-
|
|
4804
|
-
var gn = "SelectArrow",
|
|
4833
|
+
jl.displayName = Hl;
|
|
4834
|
+
var gn = "SelectArrow", Yl = u.forwardRef(
|
|
4805
4835
|
(e, t) => {
|
|
4806
4836
|
const { __scopeSelect: n, ...r } = e, o = jt(n), a = Fe(gn, n), i = Ve(gn, n);
|
|
4807
|
-
return a.open && i.position === "popper" ? /* @__PURE__ */ k(
|
|
4837
|
+
return a.open && i.position === "popper" ? /* @__PURE__ */ k(_s, { ...o, ...r, ref: t }) : null;
|
|
4808
4838
|
}
|
|
4809
4839
|
);
|
|
4810
|
-
|
|
4811
|
-
var
|
|
4840
|
+
Yl.displayName = gn;
|
|
4841
|
+
var Xl = "SelectBubbleInput", Mo = u.forwardRef(
|
|
4812
4842
|
({ __scopeSelect: e, value: t, ...n }, r) => {
|
|
4813
|
-
const o = u.useRef(null), a = Z(r, o), i =
|
|
4843
|
+
const o = u.useRef(null), a = Z(r, o), i = Ds(t);
|
|
4814
4844
|
return u.useEffect(() => {
|
|
4815
4845
|
const s = o.current;
|
|
4816
4846
|
if (!s) return;
|
|
4817
|
-
const l = window.HTMLSelectElement.prototype,
|
|
4847
|
+
const l = window.HTMLSelectElement.prototype, f = Object.getOwnPropertyDescriptor(
|
|
4818
4848
|
l,
|
|
4819
4849
|
"value"
|
|
4820
4850
|
).set;
|
|
4821
|
-
if (i !== t &&
|
|
4851
|
+
if (i !== t && f) {
|
|
4822
4852
|
const p = new Event("change", { bubbles: !0 });
|
|
4823
|
-
|
|
4853
|
+
f.call(s, t), s.dispatchEvent(p);
|
|
4824
4854
|
}
|
|
4825
4855
|
}, [i, t]), /* @__PURE__ */ k(
|
|
4826
4856
|
K.select,
|
|
@@ -4833,12 +4863,12 @@ var Yl = "SelectBubbleInput", Mo = u.forwardRef(
|
|
|
4833
4863
|
);
|
|
4834
4864
|
}
|
|
4835
4865
|
);
|
|
4836
|
-
Mo.displayName =
|
|
4866
|
+
Mo.displayName = Xl;
|
|
4837
4867
|
function Lo(e) {
|
|
4838
4868
|
return e === "" || e === void 0;
|
|
4839
4869
|
}
|
|
4840
4870
|
function Do(e) {
|
|
4841
|
-
const t =
|
|
4871
|
+
const t = Ue(e), n = u.useRef(""), r = u.useRef(0), o = u.useCallback(
|
|
4842
4872
|
(i) => {
|
|
4843
4873
|
const s = n.current + i;
|
|
4844
4874
|
t(s), function l(c) {
|
|
@@ -4853,18 +4883,18 @@ function Do(e) {
|
|
|
4853
4883
|
}
|
|
4854
4884
|
function Bo(e, t, n) {
|
|
4855
4885
|
const o = t.length > 1 && Array.from(t).every((c) => c === t[0]) ? t[0] : t, a = n ? e.indexOf(n) : -1;
|
|
4856
|
-
let i =
|
|
4886
|
+
let i = Kl(e, Math.max(a, 0));
|
|
4857
4887
|
o.length === 1 && (i = i.filter((c) => c !== n));
|
|
4858
4888
|
const l = i.find(
|
|
4859
4889
|
(c) => c.textValue.toLowerCase().startsWith(o.toLowerCase())
|
|
4860
4890
|
);
|
|
4861
4891
|
return l !== n ? l : void 0;
|
|
4862
4892
|
}
|
|
4863
|
-
function
|
|
4893
|
+
function Kl(e, t) {
|
|
4864
4894
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
4865
4895
|
}
|
|
4866
|
-
var
|
|
4867
|
-
const
|
|
4896
|
+
var Gl = po, zo = vo, Fo = mo, Zl = wo, ql = bo, Ql = So, Jl = Ao, ec = Po, tc = Ro, nc = _o, rc = No;
|
|
4897
|
+
const oc = {
|
|
4868
4898
|
sm: "w-4 h-4",
|
|
4869
4899
|
md: "w-6 h-6"
|
|
4870
4900
|
};
|
|
@@ -4879,7 +4909,7 @@ function On({
|
|
|
4879
4909
|
{
|
|
4880
4910
|
className: j(
|
|
4881
4911
|
"rounded-full object-cover",
|
|
4882
|
-
|
|
4912
|
+
oc[e],
|
|
4883
4913
|
n
|
|
4884
4914
|
),
|
|
4885
4915
|
src: `https://storage.googleapis.com/eleven-public-cdn/images/flags/circle-flags/${t}.svg`,
|
|
@@ -4889,9 +4919,9 @@ function On({
|
|
|
4889
4919
|
);
|
|
4890
4920
|
}
|
|
4891
4921
|
function Vo({ children: e, ...t }) {
|
|
4892
|
-
const [n, r] =
|
|
4922
|
+
const [n, r] = ke(!1), { language: o, setLanguage: a, options: i } = rt(), s = Ca();
|
|
4893
4923
|
return /* @__PURE__ */ P(
|
|
4894
|
-
|
|
4924
|
+
Gl,
|
|
4895
4925
|
{
|
|
4896
4926
|
open: n,
|
|
4897
4927
|
value: o.value.languageCode,
|
|
@@ -4903,8 +4933,8 @@ function Vo({ children: e, ...t }) {
|
|
|
4903
4933
|
},
|
|
4904
4934
|
children: [
|
|
4905
4935
|
e,
|
|
4906
|
-
/* @__PURE__ */ h(
|
|
4907
|
-
|
|
4936
|
+
/* @__PURE__ */ h(Zl, { container: s, children: /* @__PURE__ */ P(
|
|
4937
|
+
ql,
|
|
4908
4938
|
{
|
|
4909
4939
|
className: "overflow-hidden bg-base border border-base-border rounded-dropdown-sheet max-h-[min(384px,var(--radix-select-content-available-height))] min-w-[var(--radix-select-trigger-width)] z-10",
|
|
4910
4940
|
position: "popper",
|
|
@@ -4916,21 +4946,21 @@ function Vo({ children: e, ...t }) {
|
|
|
4916
4946
|
onEscapeKeyDown: () => r(!1),
|
|
4917
4947
|
...t,
|
|
4918
4948
|
children: [
|
|
4919
|
-
/* @__PURE__ */ h(
|
|
4920
|
-
/* @__PURE__ */ h(
|
|
4921
|
-
|
|
4949
|
+
/* @__PURE__ */ h(nc, { className: "flex items-center justify-center h-6 bg-base text-base-subtle cursor-default", children: /* @__PURE__ */ h(We, { size: "sm", name: "chevron-up" }) }),
|
|
4950
|
+
/* @__PURE__ */ h(Ql, { className: "p-1.5", children: i.value.map((l) => /* @__PURE__ */ P(
|
|
4951
|
+
Jl,
|
|
4922
4952
|
{
|
|
4923
4953
|
value: l.languageCode,
|
|
4924
4954
|
className: "flex select-none items-center p-1.5 pr-3 gap-2 cursor-pointer rounded-input relative focus-visible:outline-none data-[highlighted]:bg-base-active text-sm",
|
|
4925
4955
|
children: [
|
|
4926
4956
|
/* @__PURE__ */ h(On, { flagCode: l.flagCode }),
|
|
4927
|
-
/* @__PURE__ */ h(
|
|
4928
|
-
/* @__PURE__ */ h(
|
|
4957
|
+
/* @__PURE__ */ h(ec, { children: l.name }),
|
|
4958
|
+
/* @__PURE__ */ h(tc, { className: "text-base-primary p-1.5 -mr-1.5 ml-auto", children: /* @__PURE__ */ h(We, { size: "sm", name: "check" }) })
|
|
4929
4959
|
]
|
|
4930
4960
|
},
|
|
4931
4961
|
l.languageCode
|
|
4932
4962
|
)) }),
|
|
4933
|
-
/* @__PURE__ */ h(
|
|
4963
|
+
/* @__PURE__ */ h(rc, { className: "flex items-center justify-center h-6 bg-base text-base-subtle cursor-default", children: /* @__PURE__ */ h(We, { size: "sm", name: "chevron-down" }) })
|
|
4934
4964
|
]
|
|
4935
4965
|
}
|
|
4936
4966
|
) })
|
|
@@ -4938,7 +4968,7 @@ function Vo({ children: e, ...t }) {
|
|
|
4938
4968
|
}
|
|
4939
4969
|
);
|
|
4940
4970
|
}
|
|
4941
|
-
function
|
|
4971
|
+
function ac({
|
|
4942
4972
|
className: e,
|
|
4943
4973
|
...t
|
|
4944
4974
|
}) {
|
|
@@ -4955,12 +4985,12 @@ function oc({
|
|
|
4955
4985
|
children: [
|
|
4956
4986
|
/* @__PURE__ */ h(On, { size: "sm", flagCode: r.value.flagCode }),
|
|
4957
4987
|
r.value.name,
|
|
4958
|
-
/* @__PURE__ */ h(Fo, { className: "text-base-subtle", asChild: !0, children: /* @__PURE__ */ h(
|
|
4988
|
+
/* @__PURE__ */ h(Fo, { className: "text-base-subtle", asChild: !0, children: /* @__PURE__ */ h(We, { size: "sm", name: "chevron-down" }) })
|
|
4959
4989
|
]
|
|
4960
4990
|
}
|
|
4961
4991
|
) }) : null;
|
|
4962
4992
|
}
|
|
4963
|
-
function
|
|
4993
|
+
function ic({
|
|
4964
4994
|
className: e,
|
|
4965
4995
|
...t
|
|
4966
4996
|
}) {
|
|
@@ -4979,10 +5009,10 @@ function Mn({
|
|
|
4979
5009
|
visible: e,
|
|
4980
5010
|
...t
|
|
4981
5011
|
}) {
|
|
4982
|
-
const n = re(), { isMuted: r, isMutingEnabled: o, setIsMuted: a } = vr(), i =
|
|
5012
|
+
const n = re(), { isMuted: r, isMutingEnabled: o, setIsMuted: a } = vr(), i = le(() => {
|
|
4983
5013
|
a(!r.peek());
|
|
4984
5014
|
}, [a]);
|
|
4985
|
-
return o.value ? /* @__PURE__ */ h(
|
|
5015
|
+
return o.value ? /* @__PURE__ */ h(Te, { visible: e, className: "p-1", children: /* @__PURE__ */ h(
|
|
4986
5016
|
Me,
|
|
4987
5017
|
{
|
|
4988
5018
|
"aria-label": n.mute_microphone,
|
|
@@ -5012,48 +5042,74 @@ function Ln({
|
|
|
5012
5042
|
}
|
|
5013
5043
|
);
|
|
5014
5044
|
}
|
|
5015
|
-
function
|
|
5045
|
+
function sc({
|
|
5016
5046
|
showTranscript: e,
|
|
5017
5047
|
scrollPinned: t
|
|
5018
5048
|
}) {
|
|
5019
|
-
const
|
|
5020
|
-
isDisconnected:
|
|
5021
|
-
status:
|
|
5022
|
-
startSession:
|
|
5023
|
-
sendUserMessage:
|
|
5024
|
-
sendUserActivity:
|
|
5025
|
-
conversationIndex:
|
|
5026
|
-
} = ne()
|
|
5049
|
+
const n = ce(""), r = zt(), { text_input_enabled: o } = q().value, a = re(), {
|
|
5050
|
+
isDisconnected: i,
|
|
5051
|
+
status: s,
|
|
5052
|
+
startSession: l,
|
|
5053
|
+
sendUserMessage: c,
|
|
5054
|
+
sendUserActivity: f,
|
|
5055
|
+
conversationIndex: p
|
|
5056
|
+
} = ne(), g = le(
|
|
5057
|
+
async (v) => {
|
|
5058
|
+
v.preventDefault();
|
|
5059
|
+
const b = n.value.trim();
|
|
5060
|
+
b && (t.value = !0, n.value = "", i.value ? await l(v.currentTarget, b) : c(b));
|
|
5061
|
+
},
|
|
5062
|
+
[n, t, i, l, c]
|
|
5063
|
+
), w = le(
|
|
5064
|
+
async (v) => {
|
|
5065
|
+
v.key === "Enter" && !v.shiftKey && await g(v);
|
|
5066
|
+
},
|
|
5067
|
+
[g]
|
|
5068
|
+
), m = le(
|
|
5069
|
+
(v) => {
|
|
5070
|
+
n.value = v.currentTarget.value;
|
|
5071
|
+
},
|
|
5072
|
+
[n]
|
|
5073
|
+
), d = Y(() => !!n.value.trim());
|
|
5027
5074
|
return /* @__PURE__ */ P("div", { className: "shrink-0 overflow-hidden flex p-3 items-end justify-end", children: [
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5075
|
+
o && /* @__PURE__ */ P("div", { className: "relative grow min-w-0 flex z-1 m-1", children: [
|
|
5076
|
+
/* @__PURE__ */ h(
|
|
5077
|
+
ic,
|
|
5078
|
+
{
|
|
5079
|
+
rows: 1,
|
|
5080
|
+
"aria-label": a.input_label,
|
|
5081
|
+
value: n,
|
|
5082
|
+
onInput: f,
|
|
5083
|
+
onChange: m,
|
|
5084
|
+
onKeyDown: w,
|
|
5085
|
+
className: "min-w-0 w-full max-h-[8lh] pr-9",
|
|
5086
|
+
placeholder: r.value ? i.value && p.value > 0 ? a.input_placeholder_new_conversation : a.input_placeholder_text_only : a.input_placeholder
|
|
5087
|
+
}
|
|
5088
|
+
),
|
|
5089
|
+
/* @__PURE__ */ h(se, { active: d, children: /* @__PURE__ */ h(
|
|
5090
|
+
"button",
|
|
5091
|
+
{
|
|
5092
|
+
"aria-label": a.send_message,
|
|
5093
|
+
className: "absolute right-1 bottom-1 w-7 h-7 flex items-center justify-center hover:bg-base-hover active:bg-base-active rounded-button focus-ring transition-[transform,opacity] duration-200 data-hidden:opacity-0 data-hidden:scale-90",
|
|
5094
|
+
onClick: g,
|
|
5095
|
+
children: /* @__PURE__ */ h(We, { name: "send" })
|
|
5096
|
+
}
|
|
5097
|
+
) })
|
|
5098
|
+
] }),
|
|
5043
5099
|
/* @__PURE__ */ P("div", { className: "flex h-11 items-center", children: [
|
|
5044
|
-
/* @__PURE__ */ h(Mn, { visible: !
|
|
5100
|
+
/* @__PURE__ */ h(Mn, { visible: !r.value && !i.value }),
|
|
5045
5101
|
/* @__PURE__ */ h(
|
|
5046
|
-
|
|
5102
|
+
Te,
|
|
5047
5103
|
{
|
|
5048
|
-
visible: !
|
|
5104
|
+
visible: !r.value && (!i.value || e),
|
|
5049
5105
|
className: "p-1",
|
|
5050
5106
|
children: /* @__PURE__ */ h(
|
|
5051
5107
|
Ln,
|
|
5052
5108
|
{
|
|
5053
|
-
iconOnly: !
|
|
5054
|
-
isDisconnected:
|
|
5055
|
-
disabled:
|
|
5056
|
-
children:
|
|
5109
|
+
iconOnly: !i.value,
|
|
5110
|
+
isDisconnected: i.value,
|
|
5111
|
+
disabled: s.value === "disconnecting" || s.value === "connecting",
|
|
5112
|
+
children: a.new_call
|
|
5057
5113
|
}
|
|
5058
5114
|
)
|
|
5059
5115
|
}
|
|
@@ -5061,12 +5117,12 @@ function ic({
|
|
|
5061
5117
|
] })
|
|
5062
5118
|
] });
|
|
5063
5119
|
}
|
|
5064
|
-
function
|
|
5120
|
+
function lc({
|
|
5065
5121
|
entry: e,
|
|
5066
5122
|
animateIn: t
|
|
5067
5123
|
}) {
|
|
5068
5124
|
const n = re(), { previewUrl: r } = bn(), { lastId: o } = ne();
|
|
5069
|
-
return /* @__PURE__ */ h(
|
|
5125
|
+
return /* @__PURE__ */ h(se, { initial: !t, active: !0, children: e.type === "message" ? /* @__PURE__ */ P(
|
|
5070
5126
|
"div",
|
|
5071
5127
|
{
|
|
5072
5128
|
className: j(
|
|
@@ -5117,15 +5173,15 @@ function sc({
|
|
|
5117
5173
|
] })
|
|
5118
5174
|
] }) });
|
|
5119
5175
|
}
|
|
5120
|
-
const
|
|
5121
|
-
function
|
|
5122
|
-
const n =
|
|
5176
|
+
const cc = 16;
|
|
5177
|
+
function uc({ scrollPinned: e, transcript: t }) {
|
|
5178
|
+
const n = be(null), r = (a) => {
|
|
5123
5179
|
var i;
|
|
5124
5180
|
(i = n.current) == null || i.scrollTo({
|
|
5125
5181
|
top: n.current.scrollHeight,
|
|
5126
5182
|
behavior: a ? "smooth" : "instant"
|
|
5127
5183
|
});
|
|
5128
|
-
}, o =
|
|
5184
|
+
}, o = be(!0);
|
|
5129
5185
|
return Oe(() => {
|
|
5130
5186
|
o.current = !1, r(!1);
|
|
5131
5187
|
}, []), ze(() => {
|
|
@@ -5135,11 +5191,11 @@ function cc({ scrollPinned: e, transcript: t }) {
|
|
|
5135
5191
|
{
|
|
5136
5192
|
ref: n,
|
|
5137
5193
|
onScroll: (a) => {
|
|
5138
|
-
e.value = a.currentTarget.scrollTop >= a.currentTarget.scrollHeight - a.currentTarget.clientHeight -
|
|
5194
|
+
e.value = a.currentTarget.scrollTop >= a.currentTarget.scrollHeight - a.currentTarget.clientHeight - cc;
|
|
5139
5195
|
},
|
|
5140
5196
|
className: "px-4 pb-3 grow flex flex-col gap-3 overflow-x-hidden overflow-y-auto",
|
|
5141
5197
|
children: t.value.map((a, i) => /* @__PURE__ */ h(
|
|
5142
|
-
|
|
5198
|
+
lc,
|
|
5143
5199
|
{
|
|
5144
5200
|
entry: a,
|
|
5145
5201
|
animateIn: !o.current
|
|
@@ -5149,7 +5205,7 @@ function cc({ scrollPinned: e, transcript: t }) {
|
|
|
5149
5205
|
}
|
|
5150
5206
|
);
|
|
5151
5207
|
}
|
|
5152
|
-
const
|
|
5208
|
+
const dc = {
|
|
5153
5209
|
"top-left": "origin-top-left",
|
|
5154
5210
|
top: "origin-top",
|
|
5155
5211
|
"top-right": "origin-top-right",
|
|
@@ -5157,51 +5213,51 @@ const uc = {
|
|
|
5157
5213
|
"bottom-right": "origin-bottom-right",
|
|
5158
5214
|
bottom: "origin-bottom"
|
|
5159
5215
|
};
|
|
5160
|
-
function
|
|
5161
|
-
const t = re(), n = wn(), r = zt(), o = q(), a = o.value.placement, { isDisconnected: i, startSession: s, transcript: l, conversationIndex: c } = ne(),
|
|
5216
|
+
function fc({ open: e }) {
|
|
5217
|
+
const t = re(), n = wn(), r = zt(), o = q(), a = o.value.placement, { isDisconnected: i, startSession: s, transcript: l, conversationIndex: c } = ne(), f = xr(), p = Y(() => {
|
|
5162
5218
|
var m;
|
|
5163
|
-
return n.value || r.value ? !
|
|
5219
|
+
return n.value || r.value ? !f.value || !n.value ? l.value : [
|
|
5164
5220
|
{
|
|
5165
5221
|
type: "message",
|
|
5166
5222
|
role: "ai",
|
|
5167
|
-
message:
|
|
5223
|
+
message: f.value,
|
|
5168
5224
|
isText: !0,
|
|
5169
5225
|
conversationIndex: ((m = l.value[0]) == null ? void 0 : m.conversationIndex) ?? c.peek()
|
|
5170
5226
|
},
|
|
5171
5227
|
...l.value
|
|
5172
5228
|
] : o.value.transcript_enabled ? l.value : l.value.filter(
|
|
5173
|
-
(
|
|
5229
|
+
(d) => d.type !== "message" || d.isText
|
|
5174
5230
|
);
|
|
5175
|
-
}), g = p.value.length > 0 || !i.value && o.value.transcript_enabled,
|
|
5176
|
-
return /* @__PURE__ */ h(
|
|
5231
|
+
}), g = p.value.length > 0 || !i.value && o.value.transcript_enabled, w = ce(!0);
|
|
5232
|
+
return /* @__PURE__ */ h(se, { initial: !1, active: e, children: /* @__PURE__ */ P(
|
|
5177
5233
|
"div",
|
|
5178
5234
|
{
|
|
5179
5235
|
className: j(
|
|
5180
5236
|
"flex flex-col overflow-hidden absolute bg-base shadow-lg pointer-events-auto rounded-sheet w-full max-w-[400px] h-[calc(100%-80px)] max-h-[550px]",
|
|
5181
5237
|
"transition-[transform,opacity] duration-200 data-hidden:scale-90 data-hidden:opacity-0",
|
|
5182
|
-
|
|
5238
|
+
dc[a],
|
|
5183
5239
|
a.startsWith("top") ? "top-20" : "bottom-20"
|
|
5184
5240
|
),
|
|
5185
5241
|
children: [
|
|
5186
5242
|
/* @__PURE__ */ P("div", { className: "bg-base shrink-0 flex gap-2 p-4 items-start", children: [
|
|
5187
5243
|
/* @__PURE__ */ h("div", { className: "relative w-16 h-16" }),
|
|
5188
|
-
/* @__PURE__ */ h(
|
|
5244
|
+
/* @__PURE__ */ h(se, { active: g && !i.value, children: /* @__PURE__ */ h(an, { className: "rounded-bl-[calc(var(--el-bubble-radius)/3)] transition-opacity data-hidden:opacity-0" }) })
|
|
5189
5245
|
] }),
|
|
5190
5246
|
/* @__PURE__ */ h(
|
|
5191
|
-
|
|
5247
|
+
uc,
|
|
5192
5248
|
{
|
|
5193
5249
|
transcript: p,
|
|
5194
|
-
scrollPinned:
|
|
5250
|
+
scrollPinned: w
|
|
5195
5251
|
}
|
|
5196
5252
|
),
|
|
5197
5253
|
/* @__PURE__ */ h(
|
|
5198
|
-
|
|
5254
|
+
sc,
|
|
5199
5255
|
{
|
|
5200
|
-
scrollPinned:
|
|
5256
|
+
scrollPinned: w,
|
|
5201
5257
|
showTranscript: g
|
|
5202
5258
|
}
|
|
5203
5259
|
),
|
|
5204
|
-
/* @__PURE__ */ h(
|
|
5260
|
+
/* @__PURE__ */ h(se, { active: !g || i.value, children: /* @__PURE__ */ h("div", { className: "absolute top-0 left-0 right-0 p-4 flex justify-center transition-[opacity,transform] duration-200 data-hidden:opacity-0 data-hidden:-translate-y-4", children: /* @__PURE__ */ h(ac, {}) }) }),
|
|
5205
5261
|
/* @__PURE__ */ P(
|
|
5206
5262
|
"div",
|
|
5207
5263
|
{
|
|
@@ -5212,7 +5268,7 @@ function dc({ open: e }) {
|
|
|
5212
5268
|
children: [
|
|
5213
5269
|
/* @__PURE__ */ h(ot, { size: "lg" }),
|
|
5214
5270
|
/* @__PURE__ */ h(
|
|
5215
|
-
|
|
5271
|
+
se,
|
|
5216
5272
|
{
|
|
5217
5273
|
active: !g && i.value && !n.value,
|
|
5218
5274
|
children: /* @__PURE__ */ h("div", { className: "absolute bottom-0 p-1 rounded-[calc(var(--el-button-radius)+4px)] bg-base left-1/2 -translate-x-1/2 translate-y-1/2 transition-[opacity,transform] data-hidden:opacity-0 data-hidden:scale-100 scale-150", children: /* @__PURE__ */ h(
|
|
@@ -5226,7 +5282,7 @@ function dc({ open: e }) {
|
|
|
5226
5282
|
) })
|
|
5227
5283
|
}
|
|
5228
5284
|
),
|
|
5229
|
-
/* @__PURE__ */ h(
|
|
5285
|
+
/* @__PURE__ */ h(se, { active: !g && !i.value, children: /* @__PURE__ */ h("div", { className: "absolute -bottom-3 left-1/2 -translate-x-1/2 translate-y-full transition-[opacity,transform] data-hidden:opacity-0 data-hidden:scale-75", children: /* @__PURE__ */ h(an, {}) }) })
|
|
5230
5286
|
]
|
|
5231
5287
|
}
|
|
5232
5288
|
)
|
|
@@ -5235,12 +5291,12 @@ function dc({ open: e }) {
|
|
|
5235
5291
|
) });
|
|
5236
5292
|
}
|
|
5237
5293
|
function $o({ expanded: e }) {
|
|
5238
|
-
const t = zt(), n = q().value.variant, { isDisconnected: r } = ne(), o = re(), a =
|
|
5294
|
+
const t = zt(), n = q().value.variant, { isDisconnected: r } = ne(), o = re(), a = le(() => {
|
|
5239
5295
|
e.value = !e.value;
|
|
5240
5296
|
}, [e]);
|
|
5241
5297
|
return /* @__PURE__ */ P(wt, { children: [
|
|
5242
5298
|
n === "full" && /* @__PURE__ */ h(
|
|
5243
|
-
|
|
5299
|
+
Te,
|
|
5244
5300
|
{
|
|
5245
5301
|
visible: !e.value && !r.value,
|
|
5246
5302
|
className: "p-1",
|
|
@@ -5248,7 +5304,7 @@ function $o({ expanded: e }) {
|
|
|
5248
5304
|
}
|
|
5249
5305
|
),
|
|
5250
5306
|
/* @__PURE__ */ h(
|
|
5251
|
-
|
|
5307
|
+
Te,
|
|
5252
5308
|
{
|
|
5253
5309
|
grow: n !== "tiny",
|
|
5254
5310
|
visible: !t.value && !e.value && !r.value,
|
|
@@ -5262,7 +5318,7 @@ function $o({ expanded: e }) {
|
|
|
5262
5318
|
visible: !t.value && !e.value && !r.value
|
|
5263
5319
|
}
|
|
5264
5320
|
),
|
|
5265
|
-
/* @__PURE__ */ h(
|
|
5321
|
+
/* @__PURE__ */ h(Te, { grow: r.value, visible: !0, className: "p-1", children: /* @__PURE__ */ h(
|
|
5266
5322
|
Me,
|
|
5267
5323
|
{
|
|
5268
5324
|
className: "w-full",
|
|
@@ -5279,7 +5335,7 @@ function $o({ expanded: e }) {
|
|
|
5279
5335
|
) })
|
|
5280
5336
|
] });
|
|
5281
5337
|
}
|
|
5282
|
-
function
|
|
5338
|
+
function pc({
|
|
5283
5339
|
expanded: e,
|
|
5284
5340
|
className: t,
|
|
5285
5341
|
...n
|
|
@@ -5296,7 +5352,7 @@ function fc({
|
|
|
5296
5352
|
...n,
|
|
5297
5353
|
children: [
|
|
5298
5354
|
/* @__PURE__ */ h(
|
|
5299
|
-
|
|
5355
|
+
Te,
|
|
5300
5356
|
{
|
|
5301
5357
|
visible: !e.value && r.value,
|
|
5302
5358
|
className: "p-1 !min-w-60",
|
|
@@ -5311,7 +5367,7 @@ function fc({
|
|
|
5311
5367
|
}
|
|
5312
5368
|
);
|
|
5313
5369
|
}
|
|
5314
|
-
function
|
|
5370
|
+
function hc({
|
|
5315
5371
|
expanded: e,
|
|
5316
5372
|
className: t,
|
|
5317
5373
|
...n
|
|
@@ -5322,15 +5378,15 @@ function pc({
|
|
|
5322
5378
|
className: j("rounded-compact-sheet flex items-center p-2", t),
|
|
5323
5379
|
...n,
|
|
5324
5380
|
children: [
|
|
5325
|
-
/* @__PURE__ */ h(
|
|
5381
|
+
/* @__PURE__ */ h(Te, { visible: !e.value, className: "p-1", children: /* @__PURE__ */ h(ot, {}) }),
|
|
5326
5382
|
/* @__PURE__ */ h($o, { expanded: e })
|
|
5327
5383
|
]
|
|
5328
5384
|
}
|
|
5329
5385
|
);
|
|
5330
5386
|
}
|
|
5331
|
-
function
|
|
5387
|
+
function vc({ visible: e, className: t, ...n }) {
|
|
5332
5388
|
const r = re(), { language: o, showPicker: a } = rt();
|
|
5333
|
-
return a.value ? /* @__PURE__ */ h(
|
|
5389
|
+
return a.value ? /* @__PURE__ */ h(Te, { visible: e, className: "p-1", children: /* @__PURE__ */ h(Vo, { children: /* @__PURE__ */ P(
|
|
5334
5390
|
zo,
|
|
5335
5391
|
{
|
|
5336
5392
|
className: j(
|
|
@@ -5341,7 +5397,7 @@ function hc({ visible: e, className: t, ...n }) {
|
|
|
5341
5397
|
...n,
|
|
5342
5398
|
children: [
|
|
5343
5399
|
/* @__PURE__ */ h(On, { flagCode: o.value.flagCode }),
|
|
5344
|
-
/* @__PURE__ */ h(Fo, { className: "px-1 text-base-subtle", asChild: !0, children: /* @__PURE__ */ h(
|
|
5400
|
+
/* @__PURE__ */ h(Fo, { className: "px-1 text-base-subtle", asChild: !0, children: /* @__PURE__ */ h(We, { size: "sm", name: "chevron-down" }) })
|
|
5345
5401
|
]
|
|
5346
5402
|
}
|
|
5347
5403
|
) }) }) : null;
|
|
@@ -5358,11 +5414,11 @@ function Wo() {
|
|
|
5358
5414
|
disabled: n.value === "disconnecting" || n.value === "connecting"
|
|
5359
5415
|
}
|
|
5360
5416
|
),
|
|
5361
|
-
/* @__PURE__ */ h(
|
|
5417
|
+
/* @__PURE__ */ h(vc, { visible: t.value }),
|
|
5362
5418
|
/* @__PURE__ */ h(Mn, { visible: !t.value })
|
|
5363
5419
|
] });
|
|
5364
5420
|
}
|
|
5365
|
-
function
|
|
5421
|
+
function gc({
|
|
5366
5422
|
className: e,
|
|
5367
5423
|
...t
|
|
5368
5424
|
}) {
|
|
@@ -5381,13 +5437,13 @@ function vc({
|
|
|
5381
5437
|
children: r.main_label
|
|
5382
5438
|
}
|
|
5383
5439
|
),
|
|
5384
|
-
/* @__PURE__ */ h(
|
|
5440
|
+
/* @__PURE__ */ h(se, { active: !n.value, children: /* @__PURE__ */ h(an, { className: "absolute top-1/2 -translate-y-1/2 transition-[transform,opacity] duration-200 data-hidden:opacity-0 data-hidden:scale-90" }) })
|
|
5385
5441
|
] })
|
|
5386
5442
|
] }),
|
|
5387
5443
|
/* @__PURE__ */ h("div", { className: "flex items-center", children: /* @__PURE__ */ h(Wo, {}) })
|
|
5388
5444
|
] });
|
|
5389
5445
|
}
|
|
5390
|
-
function
|
|
5446
|
+
function mc({
|
|
5391
5447
|
className: e,
|
|
5392
5448
|
...t
|
|
5393
5449
|
}) {
|
|
@@ -5403,12 +5459,12 @@ function gc({
|
|
|
5403
5459
|
}
|
|
5404
5460
|
);
|
|
5405
5461
|
}
|
|
5406
|
-
function
|
|
5407
|
-
const n = q().value.variant, r = Bt(), { isDisconnected: o } = ne(), a =
|
|
5462
|
+
function wc({ expandable: e, expanded: t }) {
|
|
5463
|
+
const n = q().value.variant, r = Bt(), { isDisconnected: o } = ne(), a = le(async () => {
|
|
5408
5464
|
await r.requestTerms(), t.value = !t.peek();
|
|
5409
5465
|
}, [t]), i = n === "full";
|
|
5410
5466
|
return e ? /* @__PURE__ */ h(
|
|
5411
|
-
i ?
|
|
5467
|
+
i ? pc : hc,
|
|
5412
5468
|
{
|
|
5413
5469
|
expanded: t,
|
|
5414
5470
|
className: j(
|
|
@@ -5417,9 +5473,9 @@ function mc({ expandable: e, expanded: t }) {
|
|
|
5417
5473
|
),
|
|
5418
5474
|
onClick: o.value || t.value ? a : void 0
|
|
5419
5475
|
}
|
|
5420
|
-
) : /* @__PURE__ */ h(i ?
|
|
5476
|
+
) : /* @__PURE__ */ h(i ? gc : mc, { className: "bg-base shadow-md pointer-events-auto overflow-hidden" });
|
|
5421
5477
|
}
|
|
5422
|
-
function
|
|
5478
|
+
function bc() {
|
|
5423
5479
|
const e = re(), t = q(), { dismissTerms: n, acceptTerms: r } = Bt();
|
|
5424
5480
|
return /* @__PURE__ */ P("div", { className: "max-w-[400px] flex flex-col gap-2 bg-base shadow-md pointer-events-auto rounded-sheet p-3 text-sm", children: [
|
|
5425
5481
|
/* @__PURE__ */ h(
|
|
@@ -5435,8 +5491,8 @@ function wc() {
|
|
|
5435
5491
|
] })
|
|
5436
5492
|
] });
|
|
5437
5493
|
}
|
|
5438
|
-
function
|
|
5439
|
-
const n = re(), [r, o] =
|
|
5494
|
+
function xc({ copyText: e, children: t }) {
|
|
5495
|
+
const n = re(), [r, o] = ke(!1);
|
|
5440
5496
|
Oe(() => {
|
|
5441
5497
|
if (r) {
|
|
5442
5498
|
const i = setTimeout(() => {
|
|
@@ -5447,14 +5503,14 @@ function bc({ copyText: e, children: t }) {
|
|
|
5447
5503
|
};
|
|
5448
5504
|
}
|
|
5449
5505
|
}, [r]);
|
|
5450
|
-
const a =
|
|
5506
|
+
const a = le(() => {
|
|
5451
5507
|
const i = Er(e);
|
|
5452
5508
|
i && (navigator.clipboard.writeText(i), o(!0));
|
|
5453
5509
|
}, []);
|
|
5454
5510
|
return /* @__PURE__ */ h(Me, { onClick: a, children: r ? n.copied : t });
|
|
5455
5511
|
}
|
|
5456
|
-
function
|
|
5457
|
-
const t = re(), { error: n, lastId: r } = ne(), o =
|
|
5512
|
+
function yc({ sawError: e }) {
|
|
5513
|
+
const t = re(), { error: n, lastId: r } = ne(), o = le(() => {
|
|
5458
5514
|
e.value = !0;
|
|
5459
5515
|
}, []);
|
|
5460
5516
|
return /* @__PURE__ */ P("div", { className: "max-w-[400px] flex flex-col gap-2 bg-base shadow-md pointer-events-auto rounded-sheet p-3 text-sm", children: [
|
|
@@ -5471,12 +5527,12 @@ function xc({ sawError: e }) {
|
|
|
5471
5527
|
] })
|
|
5472
5528
|
] }),
|
|
5473
5529
|
/* @__PURE__ */ P("div", { className: "flex justify-end gap-2", children: [
|
|
5474
|
-
/* @__PURE__ */ h(
|
|
5530
|
+
/* @__PURE__ */ h(xc, { copyText: r, children: t.copy_id }),
|
|
5475
5531
|
/* @__PURE__ */ h(Me, { variant: "primary", onClick: o, children: "Close" })
|
|
5476
5532
|
] })
|
|
5477
5533
|
] });
|
|
5478
5534
|
}
|
|
5479
|
-
function
|
|
5535
|
+
function Cc() {
|
|
5480
5536
|
const e = q();
|
|
5481
5537
|
return e.value.disable_banner ? null : /* @__PURE__ */ P(
|
|
5482
5538
|
"p",
|
|
@@ -5501,56 +5557,56 @@ function yc() {
|
|
|
5501
5557
|
}
|
|
5502
5558
|
);
|
|
5503
5559
|
}
|
|
5504
|
-
const
|
|
5560
|
+
const qe = {
|
|
5505
5561
|
left: "items-start",
|
|
5506
5562
|
center: "items-center",
|
|
5507
5563
|
right: "items-end"
|
|
5508
|
-
},
|
|
5564
|
+
}, Qe = {
|
|
5509
5565
|
top: "flex-col-reverse justify-end",
|
|
5510
5566
|
bottom: "flex-col justify-end"
|
|
5511
|
-
},
|
|
5512
|
-
"top-left": `${
|
|
5513
|
-
top: `${
|
|
5514
|
-
"top-right": `${
|
|
5515
|
-
"bottom-left": `${
|
|
5516
|
-
bottom: `${
|
|
5517
|
-
"bottom-right": `${
|
|
5567
|
+
}, Sc = {
|
|
5568
|
+
"top-left": `${Qe.top} ${qe.left}`,
|
|
5569
|
+
top: `${Qe.top} ${qe.center}`,
|
|
5570
|
+
"top-right": `${Qe.top} ${qe.right}`,
|
|
5571
|
+
"bottom-left": `${Qe.bottom} ${qe.left}`,
|
|
5572
|
+
bottom: `${Qe.bottom} ${qe.center}`,
|
|
5573
|
+
"bottom-right": `${Qe.bottom} ${qe.right}`
|
|
5518
5574
|
}, At = {
|
|
5519
5575
|
display: "none"
|
|
5520
|
-
},
|
|
5521
|
-
const t =
|
|
5576
|
+
}, Ec = sr(function() {
|
|
5577
|
+
const t = ce(!1), n = q(), r = ce(!1), { error: o } = ne(), a = Bt(), i = Y(
|
|
5522
5578
|
() => n.value.transcript_enabled || n.value.text_input_enabled
|
|
5523
5579
|
), s = Y(
|
|
5524
5580
|
() => j(
|
|
5525
5581
|
"overlay !flex transition-opacity duration-200 data-hidden:opacity-0",
|
|
5526
|
-
|
|
5582
|
+
Sc[n.value.placement]
|
|
5527
5583
|
)
|
|
5528
5584
|
);
|
|
5529
5585
|
ze(() => {
|
|
5530
5586
|
o.value && (i.value ? (r.value = !0, t.value = !0) : r.value = !1);
|
|
5531
5587
|
});
|
|
5532
|
-
const l = Y(() => !i.value && o.value && !r.value ? "error" : !a.termsAccepted.value && a.termsShown.value ? "terms" : "conversation"), c = Y(() => l.value === "error"),
|
|
5588
|
+
const l = Y(() => !i.value && o.value && !r.value ? "error" : !a.termsAccepted.value && a.termsShown.value ? "terms" : "conversation"), c = Y(() => l.value === "error"), f = Y(() => l.value === "terms"), p = Y(() => l.value === "conversation");
|
|
5533
5589
|
return /* @__PURE__ */ P(wt, { children: [
|
|
5534
|
-
/* @__PURE__ */ h(
|
|
5535
|
-
i.value && /* @__PURE__ */ h(
|
|
5536
|
-
/* @__PURE__ */ h(
|
|
5590
|
+
/* @__PURE__ */ h(se, { initial: !1, active: p, children: /* @__PURE__ */ P(yt, { className: s, style: At, children: [
|
|
5591
|
+
i.value && /* @__PURE__ */ h(fc, { open: t }),
|
|
5592
|
+
/* @__PURE__ */ h(wc, { expandable: i.value, expanded: t })
|
|
5537
5593
|
] }) }),
|
|
5538
|
-
/* @__PURE__ */ h(
|
|
5539
|
-
/* @__PURE__ */ h(
|
|
5540
|
-
/* @__PURE__ */ h(yt, { className: s, style: At, children: /* @__PURE__ */ h(
|
|
5594
|
+
/* @__PURE__ */ h(se, { initial: !1, active: f, children: /* @__PURE__ */ h(yt, { className: s, style: At, children: /* @__PURE__ */ h(bc, {}) }) }),
|
|
5595
|
+
/* @__PURE__ */ h(se, { initial: !1, active: c, children: /* @__PURE__ */ h(yt, { className: s, style: At, children: /* @__PURE__ */ h(yc, { sawError: r }) }) }),
|
|
5596
|
+
/* @__PURE__ */ h(yt, { className: s, style: At, children: /* @__PURE__ */ h(Cc, {}) })
|
|
5541
5597
|
] });
|
|
5542
5598
|
});
|
|
5543
|
-
function
|
|
5544
|
-
return /* @__PURE__ */ h(
|
|
5599
|
+
function kc(e) {
|
|
5600
|
+
return /* @__PURE__ */ h(oa, { value: e, children: /* @__PURE__ */ h(ia, { children: /* @__PURE__ */ h(va, { children: /* @__PURE__ */ h(da, { children: /* @__PURE__ */ h(sa, { children: /* @__PURE__ */ h(la, { children: /* @__PURE__ */ h(ca, { children: /* @__PURE__ */ h(fa, { children: /* @__PURE__ */ h(xa, { children: /* @__PURE__ */ P(ya, { children: [
|
|
5545
5601
|
/* @__PURE__ */ h(ma, {}),
|
|
5546
|
-
/* @__PURE__ */ h(
|
|
5602
|
+
/* @__PURE__ */ h(Ec, {})
|
|
5547
5603
|
] }) }) }) }) }) }) }) }) }) });
|
|
5548
5604
|
}
|
|
5549
|
-
function
|
|
5550
|
-
Yo(
|
|
5605
|
+
function Lc(e = "elevenlabs-convai") {
|
|
5606
|
+
Yo(kc, e, [...rn], {
|
|
5551
5607
|
shadow: !0
|
|
5552
5608
|
});
|
|
5553
5609
|
}
|
|
5554
5610
|
export {
|
|
5555
|
-
|
|
5611
|
+
Lc as registerWidget
|
|
5556
5612
|
};
|