@skybridge/devtools 0.0.0-dev.fd74dc8 → 0.0.0-dev.fd7dd56
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.
|
@@ -148,7 +148,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
148
148
|
${a.right}px ${a.bottom}px,
|
|
149
149
|
${a.right}px ${a.top}px,
|
|
150
150
|
${a.left}px ${a.top}px
|
|
151
|
-
)`}return M.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})}),X1e=A.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,{store:i}=zf(),a=i.useState("mounted"),c=i.useState("modal");return a||r?M.jsx(p8.Provider,{value:r,children:M.jsxs(R2,{ref:n,...o,children:[a&&c===!0&&M.jsx(I2,{ref:i.context.internalBackdropRef,inert:$2(!open)}),t.children]})}):null});let KP={},GP={},ZP="";function Q1e(e){if(typeof document>"u")return!1;const t=js(e);return Er(t).innerWidth-t.documentElement.clientWidth>0}function J1e(e){const t=js(e),n=t.documentElement,r=t.body,o=Cc(n)?n:r,i=o.style.overflow;return o.style.overflow="hidden",()=>{o.style.overflow=i}}function eSe(e){const t=js(e),n=t.documentElement,r=t.body,o=Er(n);let i=0,a=0;const c=Zs.create(),u=typeof CSS<"u"&&CSS.supports?.("scrollbar-gutter","stable");if(b6&&(o.visualViewport?.scale??1)!==1)return()=>{};function f(){const g=o.getComputedStyle(n),b=o.getComputedStyle(r),w=(g.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,a=n.scrollLeft,KP={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},ZP=n.style.scrollBehavior,GP={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const T=n.scrollHeight>n.clientHeight,v=n.scrollWidth>n.clientWidth,_=g.overflowY==="scroll"||b.overflowY==="scroll",S=g.overflowX==="scroll"||b.overflowX==="scroll",C=Math.max(0,o.innerWidth-n.clientWidth),E=Math.max(0,o.innerHeight-n.clientHeight),O=parseFloat(b.marginTop)+parseFloat(b.marginBottom),j=parseFloat(b.marginLeft)+parseFloat(b.marginRight),P=Cc(n)?n:r;if(u){n.style.scrollbarGutter=w,P.style.overflowY="hidden",P.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:w,overflowY:"hidden",overflowX:"hidden"}),(T||_)&&(n.style.overflowY="scroll"),(v||S)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:O||E?`calc(100dvh - ${O+E}px)`:"100dvh",width:j||C?`calc(100vw - ${j+C}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function h(){Object.assign(n.style,KP),Object.assign(r.style,GP),u||(n.scrollTop=i,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=ZP)}function p(){h(),c.request(f)}return f(),o.addEventListener("resize",p),()=>{c.cancel(),h(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",p)}}class tSe{lockCount=0;restore=null;timeoutLock=ol.create();timeoutUnlock=ol.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=js(t).documentElement,o=Er(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=Uo;return}const i=lve||!Q1e(t);this.restore=i?J1e(t):eSe(t)}}const nSe=new tSe;function z2(e=!0,t=null){Xe(()=>{if(e)return nSe.acquire(t)},[e,t])}function rSe(e){const t=A.useRef(""),n=A.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:A.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o&&e(o,o.pointerType),e(o,t.current),t.current=""},[e]),onPointerDown:n}}function L2(e){const[t,n]=A.useState(null),r=Ze((c,u)=>{e||n(u)}),o=A.useCallback(()=>{n(null)},[]),{onClick:i,onPointerDown:a}=rSe(r);return A.useMemo(()=>({openMethod:t,reset:o,triggerProps:{onClick:i,onPointerDown:a}}),[t,o,i,a])}function oSe(e){const{store:t,parentContext:n,actionsRef:r}=e,o=t.useState("open"),i=t.useState("disablePointerDismissal"),a=t.useState("modal"),c=t.useState("popupElement"),{openMethod:u,triggerProps:f,reset:h}=L2(o);i8(t);const{forceUnmount:p}=a8(o,t,()=>{h()}),g=Ze(N=>{const D=Nt(N);return D.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},D}),b=A.useCallback(()=>{t.setOpen(!1,g(g6))},[t,g]);A.useImperativeHandle(r,()=>({unmount:p,close:b}),[p,b]);const y=f8({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[x,w]=A.useState(0),T=x===0,v=h8(y),_=M2(y,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(N){if("button"in N&&N.button!==0||"touches"in N&&N.touches.length!==1)return!1;const D=xo(N);if(T&&!i){const L=D;return a&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===L||t.context.backdropRef.current===L||Yt(L,c)&&!L?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:T});z2(o&&a===!0,c);const{getReferenceProps:S,getFloatingProps:C,getTriggerProps:E}=tv([v,_]);t.useContextCallback("onNestedDialogOpen",N=>{w(N+1)}),t.useContextCallback("onNestedDialogClose",()=>{w(0)}),A.useEffect(()=>(n?.onNestedDialogOpen&&o&&n.onNestedDialogOpen(x),n?.onNestedDialogClose&&!o&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&o&&n.onNestedDialogClose()}),[o,n,x]);const O=A.useMemo(()=>S(f),[S,f]),j=A.useMemo(()=>E(f),[E,f]),P=A.useMemo(()=>C(),[C]);t.useSyncedValues({openMethod:u,activeTriggerProps:O,inactiveTriggerProps:j,popupProps:P,floatingRootContext:y,nestedOpenDialogCount:x})}const sSe={...c8,modal:Je(e=>e.modal),nested:Je(e=>e.nested),nestedOpenDialogCount:Je(e=>e.nestedOpenDialogCount),disablePointerDismissal:Je(e=>e.disablePointerDismissal),openMethod:Je(e=>e.openMethod),descriptionElementId:Je(e=>e.descriptionElementId),titleElementId:Je(e=>e.titleElementId),viewportElement:Je(e=>e.viewportElement),role:Je(e=>e.role)};class iSe extends j2{constructor(t){super(aSe(t),{popupRef:A.createRef(),backdropRef:A.createRef(),internalBackdropRef:A.createRef(),triggerElements:new ev,onOpenChange:void 0,onOpenChangeComplete:void 0},sSe)}setOpen=(t,n)=>{if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&n.trigger==null&&this.state.activeTriggerId!=null&&(n.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,n),n.isCanceled)return;const r={open:t,nativeEvent:n.event,reason:n.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",r);const o={open:t},i=n.trigger?.id??null;(i||t)&&(o.activeTriggerId=i,o.activeTriggerElement=n.trigger??null),this.update(o)}}function aSe(e={}){return{...l8(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function lSe(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:o,onOpenChangeComplete:i,disablePointerDismissal:a=!1,modal:c=!0,actionsRef:u,handle:f,triggerId:h,defaultTriggerId:p=null}=e,g=zf(!0),b=!!g,y=To(()=>f?.store??new iSe({open:n??r,activeTriggerId:h!==void 0?h:p,modal:c,disablePointerDismissal:a,nested:b})).current;y.useControlledProp("open",n,r),y.useControlledProp("activeTriggerId",h,p),y.useSyncedValues({disablePointerDismissal:a,nested:b,modal:c}),y.useContextCallback("onOpenChange",o),y.useContextCallback("onOpenChangeComplete",i);const x=y.useState("payload");oSe({store:y,actionsRef:u,parentContext:g?.store.context});const w=A.useMemo(()=>({store:y}),[y]);return M.jsx(f6.Provider,{value:w,children:typeof t=="function"?t({payload:x}):t})}const cSe=A.forwardRef(function(t,n){const{render:r,className:o,id:i,...a}=t,{store:c}=zf(),u=Uf(i);return c.useSyncedValueWithCleanup("titleElementId",u),Mn("h2",t,{ref:n,props:[{id:u},a]})});function uSe({...e}){return M.jsx(lSe,{"data-slot":"dialog",...e})}function fSe({...e}){return M.jsx(X1e,{"data-slot":"dialog-portal",...e})}function dSe({className:e,...t}){return M.jsx(J0e,{"data-slot":"dialog-overlay",className:Et("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50",e),...t})}function hSe({className:e,children:t,showCloseButton:n=!0,...r}){return M.jsxs(fSe,{children:[M.jsx(dSe,{}),M.jsxs(Y1e,{"data-slot":"dialog-content",className:Et("bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-4 rounded-none p-4 text-xs/relaxed ring-1 duration-100 sm:max-w-sm fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none",e),...r,children:[t,n&&M.jsxs(rve,{"data-slot":"dialog-close",render:M.jsx(Qa,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[M.jsx(nre,{}),M.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function pSe({className:e,...t}){return M.jsx(cSe,{"data-slot":"dialog-title",className:Et("text-sm font-medium",e),...t})}const mSe=()=>{const e=ul(),[t,n]=A.useState(!1);return e._meta&&Object.keys(e._meta).length>0?M.jsxs(M.Fragment,{children:[M.jsxs(Qa,{variant:"ghost",size:"default",onClick:()=>n(!0),"aria-label":"View tool metadata",title:"View tool metadata",children:[M.jsx(Vne,{className:"h-4 w-4"}),"Metadata"]}),M.jsx(uSe,{open:t,onOpenChange:n,children:M.jsxs(hSe,{className:"sm:max-w-2xl",children:[M.jsx(pSe,{children:"Tool Metadata"}),M.jsx("div",{className:"text-xs",children:M.jsx(Y0,{src:e._meta,name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",style:{fontSize:"0.75rem"},collapsed:2,collapseStringsAfterLength:80})})]})})]}):null},gSe={"ui:submitButtonOptions":{norender:!0}},ySe=({schema:e,formData:t,setFormData:n,ref:r})=>!e||!e.properties||Object.keys(e.properties).length===0?M.jsx("div",{className:"flex items-center justify-center h-full",children:M.jsx("p",{className:"text-sm text-muted-foreground",children:"This tool requires no input"})}):M.jsx(_0e,{children:M.jsx(C0e,{children:M.jsx(E0e,{ref:r,schema:e??{},validator:Bhe,uiSchema:gSe,formData:t,onChange:i=>n(i.formData),showErrorList:!1,templates:{FieldTemplate:i=>{const{id:a,classNames:c,style:u,label:f,required:h,errors:p,children:g}=i;return M.jsxs("div",{className:Et("flex flex-col gap-2",c),style:u,children:[M.jsxs("label",{htmlFor:a,className:"text-sm text-foreground",children:[f,h&&M.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),M.jsxs("div",{className:"flex flex-col gap-2",children:[g,p]})]})},FieldErrorTemplate:i=>i.errors&&i.errors.length>0?M.jsx("div",{className:"text-sm text-destructive mt-1 flex items-center gap-1",children:M.jsx("span",{children:i.errors.join(", ")})}):null}})})}),vSe=()=>{const e=A.useRef(null),t=ul(),{setToolData:n}=Cf(),o=Tf(t.name)?.input??{},i=a=>{n(t.name,{input:a??{}})};return M.jsxs("div",{className:Et("flex flex-col h-full overflow-hidden border-r border-border"),children:[M.jsxs("div",{className:"shrink-0 border-b border-border px-6 py-4 flex items-center justify-between h-[72px]",children:[M.jsx("h2",{className:"font-semibold text-foreground",children:t.name}),M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx(mSe,{}),M.jsx(U0e,{validateForm:async()=>e.current===null?!0:await e.current.validateForm(),formData:o})]})]}),M.jsx("div",{className:"flex-1 overflow-auto px-6 py-6 bg-muted/50",children:M.jsx(ySe,{schema:t.inputSchema,formData:o,setFormData:i,ref:e},t.name)})]})},bSe=Wi("rounded-none has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-none flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",{variants:{orientation:{horizontal:"[&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0 [&>[data-slot]]:rounded-r-none",vertical:"flex-col [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0 [&>[data-slot]]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}});function SSe({className:e,orientation:t,...n}){return M.jsx("div",{role:"group","data-slot":"button-group","data-orientation":t,className:Et(bSe({orientation:t}),e),...n})}function wSe({className:e,...t}){return M.jsx("label",{"data-slot":"label",className:Et("gap-2 text-xs leading-none group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed",e),...t})}function xSe({className:e,...t}){return M.jsx("fieldset",{"data-slot":"field-set",className:Et("gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col",e),...t})}const ESe=Wi("data-[invalid=true]:text-destructive gap-2 group/field flex w-full",{variants:{orientation:{vertical:"flex-col [&>*]:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function Ra({className:e,orientation:t="vertical",...n}){return M.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:Et(ESe({orientation:t}),e),...n})}function Oa({className:e,...t}){return M.jsx(wSe,{"data-slot":"field-label",className:Et("has-data-checked:bg-primary/5 has-data-checked:border-primary dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-none has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-2 group/field-label peer/field-label flex w-fit leading-snug","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...t})}let WP=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const _Se={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},F2={valid(e){return e===null?null:e?{[WP.valid]:""}:{[WP.invalid]:""}}},CSe=A.createContext({invalid:void 0,name:void 0,validityData:{state:_Se,errors:[],error:"",value:"",initialValue:null},setValidityData:Uo,disabled:void 0,touched:!1,setTouched:Uo,dirty:!1,setDirty:Uo,filled:!1,setFilled:Uo,focused:!1,setFocused:Uo,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=$r)=>e,getInputValidationProps:(e=$r)=>e,inputRef:{current:null},commit:async()=>{}}});function vc(e=!0){const t=A.useContext(CSe);if(t.setValidityData===Uo&&!e)throw new Error(Jr(28));return t}const TSe=A.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Uo,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function U2(){return A.useContext(TSe)}const RSe=A.createContext({controlId:void 0,setControlId:Uo,labelId:void 0,setLabelId:Uo,messageIds:[],setMessageIds:Uo,getDescriptionProps:e=>e});function Ap(){return A.useContext(RSe)}function OSe(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function Bh({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=A.useRef(e!==void 0),[i,a]=A.useState(t),c=o?e:i,u=A.useCallback(f=>{o||a(f)},[]);return[c,u]}function V2(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,setControlId:i}=Ap(),a=Uf(t);return Xe(()=>{if(!(!n&&!t||i===Uo)){if(n){const c=r?.current;Cn(c)&&c.closest("label")!=null?i(t??null):i(o??a)}else t&&i(t);return()=>{t&&i(void 0)}}},[t,r,o,i,n,a]),o??a}function q2(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:i,commit:a}=e,{formRef:c}=U2(),{invalid:u,markedDirtyRef:f,validityData:h,setValidityData:p}=vc(),g=Ze(e.getValue);Xe(()=>{if(!t)return;let b=n;b===void 0&&(b=g()),h.initialValue===null&&b!==null&&p(y=>({...y,initialValue:b}))},[t,p,n,h.initialValue,g]),Xe(()=>{!t||!r||c.current.fields.set(r,{getValue:g,name:o,controlRef:i,validityData:OSe(h,u),validate(){let b=n;b===void 0&&(b=g()),f.current=!0,Bo.flushSync(()=>a(b))}})},[a,i,t,c,g,r,u,f,o,h,n]),Xe(()=>{const b=c.current.fields;return()=>{r&&b.delete(r)}},[c,r])}const ASe=A.forwardRef(function(t,n){const{render:r,className:o,id:i,name:a,value:c,disabled:u=!1,onValueChange:f,defaultValue:h,...p}=t,{state:g,name:b,disabled:y}=vc(),x=y||u,w=b??a,T=A.useMemo(()=>({...g,disabled:x}),[g,x]),{setTouched:v,setDirty:_,validityData:S,setFocused:C,setFilled:E,validationMode:O,validation:j}=vc(),{labelId:P}=Ap(),N=V2({id:i});Xe(()=>{const Z=c!=null;j.inputRef.current?.value||Z&&c!==""?E(!0):Z&&c===""&&E(!1)},[j.inputRef,E,c]);const[D,L]=Bh({controlled:c,default:h,name:"FieldControl",state:"value"}),U=c!==void 0,X=Ze((Z,q)=>{f?.(Z,q),!q.isCanceled&&L(Z)});return q2({id:N,name:w,commit:j.commit,value:D,getValue:()=>j.inputRef.current?.value,controlRef:j.inputRef}),Mn("input",t,{ref:n,state:T,props:[{id:N,disabled:x,name:w,ref:j.inputRef,"aria-labelledby":P,...U?{value:D}:{defaultValue:h},onChange(Z){const q=Z.currentTarget.value;X(q,Nt(mc,Z.nativeEvent)),_(q!==S.initialValue),E(q!=="")},onFocus(){C(!0)},onBlur(Z){v(!0),C(!1),O==="onBlur"&&j.commit(Z.currentTarget.value)},onKeyDown(Z){Z.currentTarget.tagName==="INPUT"&&Z.key==="Enter"&&(v(!0),j.commit(Z.currentTarget.value))}},j.getInputValidationProps(),p],stateAttributesMapping:F2})}),kSe=A.forwardRef(function(t,n){return M.jsx(ASe,{ref:n,...t})});function QS({className:e,type:t,...n}){return M.jsx(kSe,{type:t,"data-slot":"input",className:Et("dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 h-8 rounded-none border bg-transparent px-2.5 py-1 text-xs transition-colors file:h-6 file:text-xs file:font-medium focus-visible:ring-1 aria-invalid:ring-1 md:text-xs file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",e),...n})}function MSe(e){const t=A.useRef(!0);t.current&&(t.current=!1,e())}const v8=A.createContext(null),b8=A.createContext(null);function fi(){const e=A.useContext(v8);if(e===null)throw new Error(Jr(60));return e}function S8(){const e=A.useContext(b8);if(e===null)throw new Error(Jr(61));return e}const jSe=(e,t)=>Object.is(e,t);function bf(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function JS(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:bf(r,t,n))}function qx(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:bf(r,t,n))}function PSe(e,t,n){return e.filter(r=>!bf(r,t,n))}function Bx(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function NSe(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function oh(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return Bx(e)}function Ru(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Bx(e.value):Bx(e)}function DSe(e,t,n){if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??oh(e,n);if(Array.isArray(t)){const r=NSe(t)?t.flatMap(o=>o.items):t;if(e==null){const o=r.find(i=>i.value==null);return o&&o.label!=null?o.label:oh(e,n)}if(typeof e!="object"){const o=r.find(i=>i&&i.value===e);return o&&o.label!=null?o.label:oh(e,n)}if("value"in e){const o=r.find(i=>i&&i.value===e.value);if(o&&o.label!=null)return o.label}}return oh(e,n)}function $Se(e,t){return!Array.isArray(e)||e.length===0?"":e.map(n=>oh(n,t)).join(", ")}const vt={id:Je(e=>e.id),modal:Je(e=>e.modal),multiple:Je(e=>e.multiple),items:Je(e=>e.items),itemToStringLabel:Je(e=>e.itemToStringLabel),itemToStringValue:Je(e=>e.itemToStringValue),isItemEqualToValue:Je(e=>e.isItemEqualToValue),value:Je(e=>e.value),open:Je(e=>e.open),mounted:Je(e=>e.mounted),forceMount:Je(e=>e.forceMount),transitionStatus:Je(e=>e.transitionStatus),openMethod:Je(e=>e.openMethod),activeIndex:Je(e=>e.activeIndex),selectedIndex:Je(e=>e.selectedIndex),isActive:Je((e,t)=>e.activeIndex===t),isSelected:Je((e,t,n)=>{const r=e.isItemEqualToValue,o=e.value;return e.multiple?Array.isArray(o)&&o.some(i=>bf(i,n,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:bf(o,n,r)}),isSelectedByFocus:Je((e,t)=>e.selectedIndex===t),popupProps:Je(e=>e.popupProps),triggerProps:Je(e=>e.triggerProps),triggerElement:Je(e=>e.triggerElement),positionerElement:Je(e=>e.positionerElement),listElement:Je(e=>e.listElement),scrollUpArrowVisible:Je(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:Je(e=>e.scrollDownArrowVisible),hasScrollArrows:Je(e=>e.hasScrollArrows),serializedValue:Je(e=>{const{multiple:t,value:n,itemToStringValue:r}=e;return t&&Array.isArray(n)&&n.length===0?"":Ru(n,r)})};function w8(e,t){const n=A.useRef(e),r=Ze(t);Xe(()=>{n.current!==e&&r(n.current)},[e,r]),Xe(()=>{n.current=e},[e])}function ISe(e){const{id:t,value:n,defaultValue:r=null,onValueChange:o,open:i,defaultOpen:a=!1,onOpenChange:c,name:u,disabled:f=!1,readOnly:h=!1,required:p=!1,modal:g=!0,actionsRef:b,inputRef:y,onOpenChangeComplete:x,items:w,multiple:T=!1,itemToStringLabel:v,itemToStringValue:_,isItemEqualToValue:S=jSe,highlightItemOnHover:C=!0,children:E}=e,{clearErrors:O}=U2(),{setDirty:j,shouldValidateOnChange:P,validityData:N,setFilled:D,name:L,disabled:U,validation:X}=vc(),{controlId:Q}=Ap(),Z=V2({id:t}),q=U||f,G=L??u,[oe,ne]=Bh({controlled:n,default:T?r??af:r,name:"Select",state:"value"}),[$,F]=Bh({controlled:i,default:a,name:"Select",state:"open"}),V=A.useRef([]),I=A.useRef([]),K=A.useRef(null),te=A.useRef(null),re=A.useRef(0),ie=A.useRef(null),me=A.useRef([]),Ce=A.useRef(!1),ee=A.useRef(!1),se=A.useRef(null),de=A.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),Ee=A.useRef(!1),{mounted:Re,setMounted:we,transitionStatus:$e}=J0($),{openMethod:We,triggerProps:ye,reset:Fe}=L2($),Oe=To(()=>new Yu({id:Z,modal:g,multiple:T,itemToStringLabel:v,itemToStringValue:_,isItemEqualToValue:S,value:oe,open:$,mounted:Re,transitionStatus:$e,items:w,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Ye=xt(Oe,vt.activeIndex),ze=xt(Oe,vt.selectedIndex),Le=xt(Oe,vt.triggerElement),Ue=xt(Oe,vt.positionerElement),ht=A.useMemo(()=>T&&Array.isArray(oe)&&oe.length===0?"":Ru(oe,_),[T,oe,_]),Te=A.useMemo(()=>T&&Array.isArray(oe)?oe.map(dt=>Ru(dt,_)):Ru(oe,_),[T,oe,_]),pe=Sr(Oe.state.triggerElement);q2({id:Z,commit:X.commit,value:oe,controlRef:pe,name:G,getValue:()=>Te});const Ne=A.useRef(oe);Xe(()=>{oe!==Ne.current&&Oe.set("forceMount",!0)},[Oe,oe]),Xe(()=>{D(oe!==null)},[oe,D]),Xe(function(){if($)return;const tn=me.current;if(T){const Rn=Array.isArray(oe)?oe:[];if(Rn.length===0){Oe.set("selectedIndex",null);return}const Kn=Rn[Rn.length-1],un=qx(tn,Kn,S);Oe.set("selectedIndex",un===-1?null:un);return}const yn=qx(tn,oe,S);Oe.set("selectedIndex",yn===-1?null:yn)},[T,$,oe,me,S,Oe]),w8(oe,()=>{O(G),j(oe!==N.initialValue),P()?X.commit(oe):X.commit(oe,!0)});const Be=Ze((dt,tn)=>{if(c?.(dt,tn),!tn.isCanceled&&(F(dt),!dt&&Oe.state.activeIndex!==null)){const yn=V.current[Oe.state.activeIndex];queueMicrotask(()=>{yn?.setAttribute("tabindex","-1")})}}),at=Ze(()=>{we(!1),Oe.set("activeIndex",null),Fe(),x?.(!1)});jc({enabled:!b,open:$,ref:K,onComplete(){$||at()}}),A.useImperativeHandle(b,()=>({unmount:at}),[at]);const bt=Ze((dt,tn)=>{o?.(dt,tn),!tn.isCanceled&&ne(dt)}),St=Ze(()=>{const dt=Oe.state.listElement||K.current;if(!dt)return;const tn=dt.scrollTop,yn=dt.scrollTop+dt.clientHeight,Rn=tn>1,Kn=yn<dt.scrollHeight-1;Oe.state.scrollUpArrowVisible!==Rn&&Oe.set("scrollUpArrowVisible",Rn),Oe.state.scrollDownArrowVisible!==Kn&&Oe.set("scrollDownArrowVisible",Kn)}),mt=u8({open:$,onOpenChange:Be,elements:{reference:Le,floating:Ue}}),ln=Z6(mt,{enabled:!h&&!q,event:"mousedown"}),Kt=M2(mt,{bubbles:!1}),Ot=j1e(mt,{enabled:!h&&!q,listRef:V,activeIndex:Ye,selectedIndex:ze,disabledIndices:af,onNavigate(dt){dt===null&&!$||Oe.set("activeIndex",dt)},focusItemOnHover:!1}),Jt=N1e(mt,{enabled:!h&&!q&&($||!T),listRef:I,activeIndex:Ye,selectedIndex:ze,onMatch(dt){$?Oe.set("activeIndex",dt):bt(me.current[dt],Nt("none"))},onTypingChange(dt){Ce.current=dt}}),{getReferenceProps:$t,getFloatingProps:Gt,getItemProps:cn}=tv([ln,Kt,Ot,Jt]),wn=A.useMemo(()=>fp($t(),ye),[$t,ye]);MSe(()=>{Oe.update({popupProps:Gt(),triggerProps:wn})}),Xe(()=>{Oe.update({id:Z,modal:g,multiple:T,value:oe,open:$,mounted:Re,transitionStatus:$e,popupProps:Gt(),triggerProps:wn,items:w,itemToStringLabel:v,itemToStringValue:_,isItemEqualToValue:S,openMethod:We})},[Oe,Z,g,T,oe,$,Re,$e,Gt,wn,w,v,_,S,We]);const yt=A.useMemo(()=>({store:Oe,name:G,required:p,disabled:q,readOnly:h,multiple:T,itemToStringLabel:v,itemToStringValue:_,highlightItemOnHover:C,setValue:bt,setOpen:Be,listRef:V,popupRef:K,scrollHandlerRef:te,handleScrollArrowVisibility:St,scrollArrowsMountedCountRef:re,getItemProps:cn,events:mt.context.events,valueRef:ie,valuesRef:me,labelsRef:I,typingRef:Ce,selectionRef:de,selectedItemTextRef:se,validation:X,onOpenChangeComplete:x,keyboardActiveRef:ee,alignItemWithTriggerActiveRef:Ee,initialValueRef:Ne}),[Oe,G,p,q,h,T,v,_,C,bt,Be,cn,mt.context.events,X,x,St]),en=Ui(y,X.inputRef),It=T&&Array.isArray(oe)&&oe.length>0,Hn=A.useMemo(()=>!T||!Array.isArray(oe)||!G?null:oe.map(dt=>{const tn=Ru(dt,_);return M.jsx("input",{type:"hidden",name:G,value:tn},tn)}),[T,oe,G,_]);return M.jsx(v8.Provider,{value:yt,children:M.jsxs(b8.Provider,{value:mt,children:[E,M.jsx("input",{...X.getInputValidationProps({onFocus(){Oe.state.triggerElement?.focus()},onChange(dt){if(dt.nativeEvent.defaultPrevented)return;const tn=dt.target.value,yn=Nt(mc,dt.nativeEvent);function Rn(){if(T)return;const Kn=me.current.find(un=>Ru(un,_).toLowerCase()===tn.toLowerCase());Kn!=null&&(j(Kn!==N.initialValue),bt(Kn,yn),P()&&X.commit(Kn))}Oe.set("forceMount",!0),queueMicrotask(Rn)}}),id:t||Q||void 0,name:T?void 0:G,value:ht,disabled:q,required:p&&!It,readOnly:h,ref:en,style:X0,tabIndex:-1,"aria-hidden":!0}),Hn]})})}function zSe(e){const t=e.getBoundingClientRect(),n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||r.content!=="none"))return t;const i=parseFloat(n.width)||0,a=parseFloat(n.height)||0,c=parseFloat(r.width)||0,u=parseFloat(r.height)||0,f=Math.max(t.width,i,c),h=Math.max(t.height,a,u),p=f-t.width,g=h-t.height;return{left:t.left-p/2,right:t.right+p/2,top:t.top-g/2,bottom:t.bottom+g/2}}const ny=2,LSe={...h6,...F2,value:()=>null},FSe=A.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:a=!0,...c}=t,{setTouched:u,setFocused:f,validationMode:h,state:p,disabled:g}=vc(),{labelId:b}=Ap(),{store:y,setOpen:x,selectionRef:w,validation:T,readOnly:v,alignItemWithTriggerActiveRef:_,disabled:S,keyboardActiveRef:C}=fi(),E=g||S||i,O=xt(y,vt.open),j=xt(y,vt.value),P=xt(y,vt.triggerProps),N=xt(y,vt.positionerElement),D=xt(y,vt.listElement),L=xt(y,vt.serializedValue),U=Sr(N),X=A.useRef(null),Q=go(),Z=go(),{getButtonProps:q,buttonRef:G}=Tc({disabled:E,native:a}),oe=Ze(te=>{y.set("triggerElement",te)}),ne=Ui(n,X,G,oe),$=go(),F=go();A.useEffect(()=>{if(O)return F.start(200,()=>{w.current.allowUnselectedMouseUp=!0,$.start(200,()=>{w.current.allowSelectedMouseUp=!0})}),()=>{$.clear(),F.clear()};w.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},Z.clear()},[O,w,Z,$,F]);const V=A.useMemo(()=>D?.id??Lh(N)?.id,[D,N]),I=fp(P,{role:"combobox","aria-expanded":O?"true":"false","aria-haspopup":"listbox","aria-controls":O?V:void 0,"aria-labelledby":b,"aria-readonly":v||void 0,tabIndex:E?-1:0,ref:ne,onFocus(te){f(!0),O&&_.current&&x(!1,Nt(gc,te.nativeEvent)),Q.start(0,()=>{y.set("forceMount",!0)})},onBlur(){u(!0),f(!1),h==="onBlur"&&T.commit(j)},onPointerMove(){C.current=!1},onKeyDown(){C.current=!0},onMouseDown(te){if(O)return;const re=js(te.currentTarget);function ie(me){if(!X.current)return;const Ce=me.target;if(Yt(X.current,Ce)||Yt(U.current,Ce)||Ce===X.current)return;const ee=zSe(X.current);me.clientX>=ee.left-ny&&me.clientX<=ee.right+ny&&me.clientY>=ee.top-ny&&me.clientY<=ee.bottom+ny||x(!1,Nt(tve,me))}Z.start(0,()=>{re.addEventListener("mouseup",ie,{once:!0})})}},T.getValidationProps,c,q);I.role="combobox";const K=A.useMemo(()=>({...p,open:O,disabled:E,value:j,readOnly:v,placeholder:!L}),[p,O,E,j,v,L]);return Mn("button",t,{ref:[n,X],state:K,stateAttributesMapping:LSe,props:I})}),USe={value:()=>null},VSe=A.forwardRef(function(t,n){const{className:r,render:o,children:i,...a}=t,{store:c,valueRef:u}=fi(),f=xt(c,vt.value),h=xt(c,vt.items),p=xt(c,vt.itemToStringLabel),g=xt(c,vt.serializedValue),b=A.useMemo(()=>({value:f,placeholder:!g}),[f,g]),y=typeof i=="function"?i(f):i??(Array.isArray(f)?$Se(f,p):DSe(f,h,p));return Mn("span",t,{state:b,ref:[n,u],props:[{children:y},a],stateAttributesMapping:USe})}),qSe=A.forwardRef(function(t,n){const{className:r,render:o,...i}=t,{store:a}=fi(),c=xt(a,vt.open),u=A.useMemo(()=>({open:c}),[c]);return Mn("span",t,{state:u,ref:n,props:[{"aria-hidden":!0,children:"▼"},i],stateAttributesMapping:d6})}),BSe=A.createContext(void 0),HSe=A.forwardRef(function(t,n){const{store:r}=fi(),o=xt(r,vt.mounted),i=xt(r,vt.forceMount);return o||i?M.jsx(BSe.Provider,{value:!0,children:M.jsx(R2,{ref:n,...t})}):null}),x8=A.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function KSe(){return A.useContext(x8)}function B2(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=Ze(o),a=A.useRef(0),c=To(ZSe).current,u=To(GSe).current,[f,h]=A.useState(0),p=A.useRef(f),g=Ze((T,v)=>{u.set(T,v??null),p.current+=1,h(p.current)}),b=Ze(T=>{u.delete(T),p.current+=1,h(p.current)}),y=A.useMemo(()=>{const T=new Map;return Array.from(u.keys()).filter(_=>_.isConnected).sort(WSe).forEach((_,S)=>{const C=u.get(_)??{};T.set(_,{...C,index:S})}),T},[u,f]);Xe(()=>{if(typeof MutationObserver!="function"||y.size===0)return;const T=new MutationObserver(v=>{const _=new Set,S=C=>_.has(C)?_.delete(C):_.add(C);v.forEach(C=>{C.removedNodes.forEach(S),C.addedNodes.forEach(S)}),_.size===0&&(p.current+=1,h(p.current))});return y.forEach((v,_)=>{_.parentElement&&T.observe(_.parentElement,{childList:!0})}),()=>{T.disconnect()}},[y]),Xe(()=>{p.current===f&&(n.current.length!==y.size&&(n.current.length=y.size),r&&r.current.length!==y.size&&(r.current.length=y.size),a.current=y.size),i(y)},[i,y,n,r,f]),Xe(()=>()=>{n.current=[]},[n]),Xe(()=>()=>{r&&(r.current=[])},[r]);const x=Ze(T=>(c.add(T),()=>{c.delete(T)}));Xe(()=>{c.forEach(T=>T(y))},[c,y]);const w=A.useMemo(()=>({register:g,unregister:b,subscribeMapChange:x,elementsRef:n,labelsRef:r,nextIndexRef:a}),[g,b,x,n,r,a]);return M.jsx(x8.Provider,{value:w,children:t})}function GSe(){return new Map}function ZSe(){return new Set}function WSe(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const YSe=A.createContext(void 0);function rv(){return A.useContext(YSe)?.direction??"ltr"}const XSe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:c,middlewareData:u}=t,{element:f,padding:h=0,offsetParent:p="real"}=Bi(e,t)||{};if(f==null)return{};const g=R6(h),b={x:n,y:r},y=C2(o),x=_2(y),w=await a.getDimensions(f),T=y==="y",v=T?"top":"left",_=T?"bottom":"right",S=T?"clientHeight":"clientWidth",C=i.reference[x]+i.reference[y]-b[y]-i.floating[x],E=b[y]-i.reference[y],O=p==="real"?await a.getOffsetParent?.(f):c.floating;let j=c.floating[S]||i.floating[x];(!j||!await a.isElement?.(O))&&(j=c.floating[S]||i.floating[x]);const P=C/2-E/2,N=j/2-w[x]/2-1,D=Math.min(g[v],N),L=Math.min(g[_],N),U=D,X=j-w[x]-L,Q=j/2-w[x]/2+P,Z=Ix(U,Q,X),q=!u.arrow&&hl(o)!=null&&Q!==Z&&i.reference[x]/2-(Q<U?D:L)-w[x]/2<0,G=q?Q<U?Q-U:Q-X:0;return{[y]:b[y]+G,data:{[y]:Z,centerOffset:Q-Z-G,...q&&{alignmentOffset:G}},reset:q}}}),QSe=(e,t)=>({...XSe(e),options:[e,t]}),JSe={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,i=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:(await Bbe().fn(e)).data?.referenceHidden||i}}}},_y={sideX:"left",sideY:"top"},ewe={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:o},platform:i,strategy:a,placement:c}=e,u=Er(o),f=u.getComputedStyle(o);if(!(f.transitionDuration!=="0s"&&f.transitionDuration!==""))return{x:t,y:n,data:_y};const p=await i.getOffsetParent?.(o);let g={width:0,height:0};if(a==="fixed"&&u?.visualViewport)g={width:u.visualViewport.width,height:u.visualViewport.height};else if(p===u){const v=js(o);g={width:v.documentElement.clientWidth,height:v.documentElement.clientHeight}}else await i.isElement?.(p)&&(g=await i.getDimensions(p));const b=_o(c);let y=t,x=n;b==="left"&&(y=g.width-(t+r.width)),b==="top"&&(x=g.height-(n+r.height));const w=b==="left"?"right":_y.sideX,T=b==="top"?"bottom":_y.sideY;return{x:y,y:x,data:{sideX:w,sideY:T}}}};function E8(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function YP(e,t,n){const{rects:r,placement:o}=e;return{side:E8(t,_o(o),n),align:hl(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function _8(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,collisionBoundary:c,collisionPadding:u=5,sticky:f=!1,arrowPadding:h=5,disableAnchorTracking:p=!1,keepMounted:g=!1,floatingRootContext:b,mounted:y,collisionAvoidance:x,shiftCrossAxis:w=!1,nodeId:T,adaptiveOrigin:v,lazyFlip:_=!1,externalTree:S}=e,[C,E]=A.useState(null);!y&&C!==null&&E(null);const O=x.side||"flip",j=x.align||"flip",P=x.fallbackAxisSide||"end",N=typeof t=="function"?t:void 0,D=Ze(N),L=N?D:t,U=Sr(t),Q=rv()==="rtl",Z=C||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":Q?"left":"right","inline-start":Q?"right":"left"}[r],q=i==="center"?Z:`${Z}-${i}`;let G=u;const oe=1,ne=r==="bottom"?oe:0,$=r==="top"?oe:0,F=r==="right"?oe:0,V=r==="left"?oe:0;typeof G=="number"?G={top:G+ne,right:G+V,bottom:G+$,left:G+F}:G&&(G={top:(G.top||0)+ne,right:(G.right||0)+V,bottom:(G.bottom||0)+$,left:(G.left||0)+F});const I={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:G},K=A.useRef(null),te=Sr(o),re=Sr(a),Ce=[Lbe(Ot=>{const Jt=YP(Ot,r,Q),$t=typeof te.current=="function"?te.current(Jt):te.current,Gt=typeof re.current=="function"?re.current(Jt):re.current;return{mainAxis:$t,crossAxis:Gt,alignmentAxis:Gt}},[typeof o!="function"?o:0,typeof a!="function"?a:0,Q,r])],ee=j==="none"&&O!=="shift",se=!ee&&(f||w||O==="shift"),de=O==="none"?null:Vbe({...I,padding:{top:G.top+oe,right:G.right+oe,bottom:G.bottom+oe,left:G.left+oe},mainAxis:!w&&O==="flip",crossAxis:j==="flip"?"alignment":!1,fallbackAxisSideDirection:P}),Ee=ee?null:Fbe(Ot=>{const Jt=js(Ot.elements.floating).documentElement;return{...I,rootBoundary:w?{x:0,y:0,width:Jt.clientWidth,height:Jt.clientHeight}:void 0,mainAxis:j!=="none",crossAxis:se,limiter:f||w?void 0:Ube($t=>{if(!K.current)return{};const{width:Gt,height:cn}=K.current.getBoundingClientRect(),wn=us(_o($t.placement)),yt=wn==="y"?Gt:cn,en=wn==="y"?G.left+G.right:G.top+G.bottom;return{offset:yt/2+en/2}})}},[I,f,w,G,j]);O==="shift"||j==="shift"||i==="center"?Ce.push(Ee,de):Ce.push(de,Ee),Ce.push(qbe({...I,apply({elements:{floating:Ot},rects:{reference:Jt},availableWidth:$t,availableHeight:Gt}){Object.entries({"--available-width":`${$t}px`,"--available-height":`${Gt}px`,"--anchor-width":`${Jt.width}px`,"--anchor-height":`${Jt.height}px`}).forEach(([cn,wn])=>{Ot.style.setProperty(cn,wn)})}}),QSe(()=>({element:K.current||document.createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(Ot){const{elements:Jt,middlewareData:$t,placement:Gt,rects:cn,y:wn}=Ot,yt=_o(Gt),en=us(yt),It=K.current,Hn=$t.arrow?.x||0,dt=$t.arrow?.y||0,tn=It?.clientWidth||0,yn=It?.clientHeight||0,Rn=Hn+tn/2,Kn=dt+yn/2,un=Math.abs($t.shift?.y||0),ir=cn.reference.height/2,Lt=typeof o=="function"?o(YP(Ot,r,Q)):o,jr=un>Lt,ar={top:`${Rn}px calc(100% + ${Lt}px)`,bottom:`${Rn}px ${-Lt}px`,left:`calc(100% + ${Lt}px) ${Kn}px`,right:`${-Lt}px ${Kn}px`}[yt],oo=`${Rn}px ${cn.reference.y+ir-wn}px`;return Jt.floating.style.setProperty("--transform-origin",se&&en==="y"&&jr?oo:ar),{}}},JSe,v),Xe(()=>{!y&&b&&b.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[y,b]);const Re=A.useMemo(()=>({elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:we,elements:$e,x:We,y:ye,middlewareData:Fe,update:Oe,placement:Ye,context:ze,isPositioned:Le,floatingStyles:Ue}=w1e({rootContext:b,placement:q,middleware:Ce,strategy:n,whileElementsMounted:g?void 0:(...Ot)=>PP(...Ot,Re),nodeId:T,externalTree:S}),{sideX:ht,sideY:Te}=Fe.adaptiveOrigin||_y,pe=Le?n:"fixed",Ne=A.useMemo(()=>v?{position:pe,[ht]:We,[Te]:ye}:{position:pe,...Ue},[v,pe,ht,We,Te,ye,Ue]),Be=A.useRef(null);Xe(()=>{if(!y)return;const Ot=U.current,Jt=typeof Ot=="function"?Ot():Ot,Gt=(XP(Jt)?Jt.current:Jt)||null||null;Gt!==Be.current&&(we.setPositionReference(Gt),Be.current=Gt)},[y,we,L,U]),A.useEffect(()=>{if(!y)return;const Ot=U.current;typeof Ot!="function"&&XP(Ot)&&Ot.current!==Be.current&&(we.setPositionReference(Ot.current),Be.current=Ot.current)},[y,we,L,U]),A.useEffect(()=>{if(g&&y&&$e.domReference&&$e.floating)return PP($e.domReference,$e.floating,Oe,Re)},[g,y,$e,Oe,Re]);const at=_o(Ye),bt=E8(r,at,Q),St=hl(Ye)||"center",mt=!!Fe.hide?.referenceHidden;Xe(()=>{_&&y&&Le&&E(at)},[_,y,Le,at]);const ln=A.useMemo(()=>({position:"absolute",top:Fe.arrow?.y,left:Fe.arrow?.x}),[Fe.arrow]),Kt=Fe.arrow?.centerOffset!==0;return A.useMemo(()=>({positionerStyles:Ne,arrowStyles:ln,arrowRef:K,arrowUncentered:Kt,side:bt,align:St,physicalSide:at,anchorHidden:mt,refs:we,context:ze,isPositioned:Le,update:Oe}),[Ne,ln,K,Kt,bt,St,at,mt,we,ze,Le,Oe])}function XP(e){return e!=null&&"current"in e}const C8=A.createContext(void 0);function H2(){const e=A.useContext(C8);if(!e)throw new Error(Jr(59));return e}function u0(e,t){e&&Object.assign(e.style,t)}const T8={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},twe={position:"fixed"},nwe=A.forwardRef(function(t,n){const{anchor:r,positionMethod:o="absolute",className:i,render:a,side:c="bottom",align:u="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:p="clipping-ancestors",collisionPadding:g,arrowPadding:b=5,sticky:y=!1,disableAnchorTracking:x,alignItemWithTrigger:w=!0,collisionAvoidance:T=jre,...v}=t,{store:_,listRef:S,labelsRef:C,alignItemWithTriggerActiveRef:E,selectedItemTextRef:O,valuesRef:j,initialValueRef:P,popupRef:N,setValue:D}=fi(),L=S8(),U=xt(_,vt.open),X=xt(_,vt.mounted),Q=xt(_,vt.modal),Z=xt(_,vt.value),q=xt(_,vt.openMethod),G=xt(_,vt.positionerElement),oe=xt(_,vt.triggerElement),ne=xt(_,vt.isItemEqualToValue),$=A.useRef(null),F=A.useRef(null),[V,I]=A.useState(w),K=X&&V&&q!=="touch";!X&&V!==w&&I(w),Xe(()=>{X||(vt.scrollUpArrowVisible(_.state)&&_.set("scrollUpArrowVisible",!1),vt.scrollDownArrowVisible(_.state)&&_.set("scrollDownArrowVisible",!1))},[_,X]),A.useImperativeHandle(E,()=>K),z2((K||Q)&&U&&q!=="touch",oe);const te=_8({anchor:r,floatingRootContext:L,positionMethod:o,mounted:X,side:c,sideOffset:f,align:u,alignOffset:h,arrowPadding:b,collisionBoundary:p,collisionPadding:g,sticky:y,disableAnchorTracking:x??K,collisionAvoidance:T,keepMounted:!0}),re=K?"none":te.side,ie=K?twe:te.positionerStyles,me=A.useMemo(()=>{const we={};return U||(we.pointerEvents="none"),{role:"presentation",hidden:!X,style:{...ie,...we}}},[U,X,ie]),Ce=A.useMemo(()=>({open:U,side:re,align:te.align,anchorHidden:te.anchorHidden}),[U,re,te.align,te.anchorHidden]),ee=Ze(we=>{_.set("positionerElement",we)}),se=Mn("div",t,{ref:[n,ee],state:Ce,stateAttributesMapping:Lf,props:[me,v]}),de=A.useRef(0),Ee=Ze(we=>{if(we.size===0&&de.current===0||j.current.length===0)return;const $e=de.current;if(de.current=we.size,we.size===$e)return;const We=Nt(mc);if($e!==0&&!_.state.multiple&&Z!==null&&qx(j.current,Z,ne)===-1){const Fe=P.current,Ye=Fe!=null&&JS(j.current,Fe,ne)?Fe:null;D(Ye,We),Ye===null&&(_.set("selectedIndex",null),O.current=null)}if($e!==0&&_.state.multiple&&Array.isArray(Z)){const ye=Z.filter(Fe=>JS(j.current,Fe,ne));(ye.length!==Z.length||ye.some(Fe=>!JS(Z,Fe,ne)))&&(D(ye,We),ye.length===0&&(_.set("selectedIndex",null),O.current=null))}if(U&&K){_.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const ye={height:""};u0(G,ye),u0(N.current,ye)}}),Re=A.useMemo(()=>({...te,side:re,alignItemWithTriggerActive:K,setControlledAlignItemWithTrigger:I,scrollUpArrowRef:$,scrollDownArrowRef:F}),[te,re,K,I]);return M.jsx(B2,{elementsRef:S,labelsRef:C,onMapChange:Ee,children:M.jsxs(C8.Provider,{value:Re,children:[X&&Q&&M.jsx(I2,{inert:$2(!U),cutout:oe}),se]})})});function R8(e){const t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}const ry="base-ui-disable-scrollbar",Hx={className:ry,element:M.jsx("style",{href:ry,precedence:"base-ui:low",children:`.${ry}{scrollbar-width:none}.${ry}::-webkit-scrollbar{display:none}`})},rwe=A.createContext(void 0);function O8(e){return A.useContext(rwe)}function K2(e){return e==="starting"?Mre:$r}const owe={...Lf,...Ep},swe=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{store:a,popupRef:c,onOpenChangeComplete:u,setOpen:f,valueRef:h,selectedItemTextRef:p,keyboardActiveRef:g,multiple:b,handleScrollArrowVisibility:y,scrollHandlerRef:x}=fi(),{side:w,align:T,alignItemWithTriggerActive:v,setControlledAlignItemWithTrigger:_,scrollDownArrowRef:S,scrollUpArrowRef:C}=H2(),E=O8()!=null,O=S8(),j=go(),P=xt(a,vt.id),N=xt(a,vt.open),D=xt(a,vt.mounted),L=xt(a,vt.popupProps),U=xt(a,vt.transitionStatus),X=xt(a,vt.triggerElement),Q=xt(a,vt.positionerElement),Z=xt(a,vt.listElement),q=A.useRef(0),G=A.useRef(!1),oe=A.useRef(0),ne=A.useRef(!1),$=A.useRef({}),F=Tp(),V=Ze(re=>{if(!Q||!c.current||!ne.current)return;if(G.current||!v){y();return}const ie=Q.style.top==="0px",me=Q.style.bottom==="0px",Ce=Q.getBoundingClientRect().height,ee=js(Q),se=getComputedStyle(Q),de=parseFloat(se.marginTop),Ee=parseFloat(se.marginBottom),Re=ee.documentElement.clientHeight-de-Ee,we=re.scrollTop,$e=re.scrollHeight,We=re.clientHeight,ye=$e-We;let Fe=null,Oe=null,Ye=!1;if(ie){const ze=ye-we,Le=Ce+ze,Ue=Math.min(Le,Re);Fe=Ue,Ue!==Re?Oe=ye:Ye=!0}else if(me){const ze=we-0,Le=Ce+ze,Ue=Math.min(Le,Re),ht=Le-Re;Fe=Ue,Ue!==Re?Oe=0:(Ye=!0,we<ye&&(Oe=we-(ze-ht)))}Fe!=null&&(Q.style.height=`${Fe}px`),Oe!=null&&(re.scrollTop=Oe),Ye&&(G.current=!0),y()});A.useImperativeHandle(x,()=>V,[V]),jc({open:N,ref:c,onComplete(){N&&u?.(!0)}});const I=A.useMemo(()=>({open:N,transitionStatus:U,side:w,align:T}),[N,U,w,T]);Xe(()=>{!Q||!c.current||Object.keys($.current).length||($.current={top:Q.style.top||"0",left:Q.style.left||"0",right:Q.style.right,height:Q.style.height,bottom:Q.style.bottom,minHeight:Q.style.minHeight,maxHeight:Q.style.maxHeight,marginTop:Q.style.marginTop,marginBottom:Q.style.marginBottom})},[c,Q]),Xe(()=>{D||v||(ne.current=!1,G.current=!1,q.current=0,oe.current=0,u0(Q,$.current))},[D,v,Q,c]),Xe(()=>{const re=c.current;if(!(!D||!X||!Q||!re)){if(!v){ne.current=!0,F.request(y);return}queueMicrotask(()=>{const ie=getComputedStyle(Q),me=getComputedStyle(re),Ce=js(X),ee=Er(Q),se=X.getBoundingClientRect(),de=Q.getBoundingClientRect(),Ee=se.left,Re=se.height,we=Z||re,$e=we.scrollHeight,We=parseFloat(me.borderBottomWidth),ye=parseFloat(ie.marginTop)||10,Fe=parseFloat(ie.marginBottom)||10,Oe=parseFloat(ie.minHeight)||100,Ye=5,ze=5,Le=20,Ue=Ce.documentElement.clientHeight-ye-Fe,ht=Ce.documentElement.clientWidth,Te=Ue-se.bottom+Re,pe=p.current,Ne=h.current;let Be=0,at=0;if(pe&&Ne){const yt=Ne.getBoundingClientRect(),en=pe.getBoundingClientRect(),It=yt.left-Ee,Hn=en.left-de.left,dt=yt.top-se.top+yt.height/2,tn=en.top-de.top+en.height/2;Be=It-Hn,at=tn-dt}const bt=Te+at+Fe+We;let St=Math.min(Ue,bt);const mt=Ue-ye-Fe,ln=bt-St,Kt=Math.max(Ye,Ee+Be),Ot=ht-ze,Jt=Math.max(0,Kt+de.width-Ot);Q.style.left=`${Kt-Jt}px`,Q.style.height=`${St}px`,Q.style.maxHeight="auto",Q.style.marginTop=`${ye}px`,Q.style.marginBottom=`${Fe}px`,re.style.height="100%";const $t=we.scrollHeight-we.clientHeight,Gt=ln>=$t;Gt&&(St=Math.min(Ue,de.height)-(ln-$t));const cn=se.top<Le||se.bottom>Ue-Le||St<Math.min($e,Oe),wn=(ee.visualViewport?.scale??1)!==1&&b6;if(cn||wn){ne.current=!0,u0(Q,$.current),Bo.flushSync(()=>_(!1));return}if(Gt){const yt=Math.max(0,Ue-bt);Q.style.top=de.height>=mt?"0":`${yt}px`,Q.style.height=`${St}px`,we.scrollTop=we.scrollHeight-we.clientHeight,q.current=Math.max(Oe,St)}else Q.style.bottom="0",q.current=Math.max(Oe,St),we.scrollTop=ln;q.current===Ue&&(G.current=!0),y(),setTimeout(()=>{ne.current=!0})})}},[a,D,Q,X,h,p,c,y,v,_,F,S,C,Z]),A.useEffect(()=>{if(!v||!Q||!D)return;const re=Er(Q);function ie(me){f(!1,Nt(nve,me))}return re.addEventListener("resize",ie),()=>{re.removeEventListener("resize",ie)}},[f,v,Q,D]);const K={...Z?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":b||void 0,id:`${P}-list`},onKeyDown(re){g.current=!0,E&&D2.has(re.key)&&re.stopPropagation()},onMouseMove(){g.current=!1},onPointerLeave(re){if(R8(re)||re.pointerType==="touch")return;const ie=re.currentTarget;j.start(0,()=>{a.set("activeIndex",null),ie.focus({preventScroll:!0})})},onScroll(re){Z||x.current?.(re.currentTarget)},...v&&{style:Z?{height:"100%"}:T8}},te=Mn("div",t,{ref:[n,c],state:I,stateAttributesMapping:owe,props:[L,K,K2(U),{className:!Z&&v?Hx.className:void 0},i]});return M.jsxs(A.Fragment,{children:[Hx.element,M.jsx(A2,{context:O,modal:!1,disabled:!D,restoreFocus:!0,children:te})]})}),iwe=A.forwardRef(function(t,n){const{className:r,render:o,...i}=t,{store:a,scrollHandlerRef:c}=fi(),{alignItemWithTriggerActive:u}=H2(),f=xt(a,vt.hasScrollArrows),h=xt(a,vt.openMethod),p=xt(a,vt.multiple),b={id:`${xt(a,vt.id)}-list`,role:"listbox","aria-multiselectable":p||void 0,onScroll(x){c.current?.(x.currentTarget)},...u&&{style:T8},className:f&&h!=="touch"?Hx.className:void 0},y=Ze(x=>{a.set("listElement",x)});return Mn("div",t,{ref:[n,y],props:[b,i]})});let A8=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function G2(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:a,unregister:c,subscribeMapChange:u,elementsRef:f,labelsRef:h,nextIndexRef:p}=KSe(),g=A.useRef(-1),[b,y]=A.useState(i??(o===A8.GuessFromOrder?()=>{if(g.current===-1){const T=p.current;p.current+=1,g.current=T}return g.current}:-1)),x=A.useRef(null),w=A.useCallback(T=>{if(x.current=T,b!==-1&&T!==null&&(f.current[b]=T,h)){const v=t!==void 0;h.current[b]=v?t:r?.current?.textContent??T.textContent}},[b,f,h,t,r]);return Xe(()=>{if(i!=null)return;const T=x.current;if(T)return a(T,n),()=>{c(T)}},[i,a,c,n]),Xe(()=>{if(i==null)return u(T=>{const v=x.current?T.get(x.current)?.index:null;v!=null&&y(v)})},[i,u,y]),A.useMemo(()=>({ref:w,index:b}),[b,w])}const k8=A.createContext(void 0);function Z2(){const e=A.useContext(k8);if(!e)throw new Error(Jr(57));return e}const awe=A.memo(A.forwardRef(function(t,n){const{render:r,className:o,value:i=null,label:a,disabled:c=!1,nativeButton:u=!1,...f}=t,h=A.useRef(null),p=G2({label:a,textRef:h,indexGuessBehavior:A8.GuessFromOrder}),{store:g,getItemProps:b,setOpen:y,setValue:x,selectionRef:w,typingRef:T,valuesRef:v,keyboardActiveRef:_,multiple:S,highlightItemOnHover:C}=fi(),E=go(),O=xt(g,vt.isActive,p.index),j=xt(g,vt.isSelected,p.index,i),P=xt(g,vt.isSelectedByFocus,p.index),N=xt(g,vt.isItemEqualToValue),D=p.index,L=D!==-1,U=A.useRef(null),X=Sr(D);Xe(()=>{if(!L)return;const te=v.current;return te[D]=i,()=>{delete te[D]}},[L,D,i,v]),Xe(()=>{if(!L)return;const te=g.state.value;let re=te;S&&Array.isArray(te)&&te.length>0&&(re=te[te.length-1]),re!==void 0&&bf(re,i,N)&&g.set("selectedIndex",D)},[L,D,S,N,g,i]);const Q=A.useMemo(()=>({disabled:c,selected:j,highlighted:O}),[c,j,O]),Z=b({active:O,selected:j});Z.onFocus=void 0,Z.id=void 0;const q=A.useRef(null),G=A.useRef("mouse"),oe=A.useRef(!1),{getButtonProps:ne,buttonRef:$}=Tc({disabled:c,focusableWhenDisabled:!0,native:u});function F(te){const re=g.state.value;if(S){const ie=Array.isArray(re)?re:[],me=j?PSe(ie,i,N):[...ie,i];x(me,Nt(zS,te))}else x(i,Nt(zS,te)),y(!1,Nt(zS,te))}const V={role:"option","aria-selected":j,"aria-disabled":c||void 0,tabIndex:O?0:-1,onFocus(){g.set("activeIndex",D)},onMouseEnter(){!_.current&&g.state.selectedIndex===null&&g.set("activeIndex",D)},onMouseMove(){C&&g.set("activeIndex",D)},onMouseLeave(te){!C||_.current||R8(te)||E.start(0,()=>{g.state.activeIndex===D&&g.set("activeIndex",null)})},onTouchStart(){w.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(te){q.current=te.key,g.set("activeIndex",D)},onClick(te){oe.current=!1,!(te.type==="keydown"&&q.current===null)&&(c||q.current===" "&&T.current||G.current!=="touch"&&!O||(q.current=null,F(te.nativeEvent)))},onPointerEnter(te){G.current=te.pointerType},onPointerDown(te){G.current=te.pointerType,oe.current=!0},onMouseUp(te){if(c)return;if(oe.current){oe.current=!1;return}const re=!w.current.allowSelectedMouseUp&&j,ie=!w.current.allowUnselectedMouseUp&&!j;re||ie||G.current!=="touch"&&!O||F(te.nativeEvent)}},I=Mn("div",t,{ref:[$,n,p.ref,U],state:Q,props:[Z,V,f,ne]}),K=A.useMemo(()=>({selected:j,indexRef:X,textRef:h,selectedByFocus:P,hasRegistered:L}),[j,X,h,P,L]);return M.jsx(k8.Provider,{value:K,children:I})})),lwe=A.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:o}=Z2();return r||o?M.jsx(cwe,{...t,ref:n}):null}),cwe=A.memo(A.forwardRef((e,t)=>{const{render:n,className:r,keepMounted:o,...i}=e,{selected:a}=Z2(),c=A.useRef(null),{transitionStatus:u,setMounted:f}=J0(a),h=A.useMemo(()=>({selected:a,transitionStatus:u}),[a,u]),p=Mn("span",e,{ref:[t,c],state:h,props:[{"aria-hidden":!0,children:"✔️"},i],stateAttributesMapping:Ep});return jc({open:a,ref:c,onComplete(){a||f(!1)}}),p})),uwe=A.memo(A.forwardRef(function(t,n){const{indexRef:r,textRef:o,selectedByFocus:i,hasRegistered:a}=Z2(),{selectedItemTextRef:c}=fi(),{className:u,render:f,...h}=t,p=A.useCallback(b=>{if(!b||!a)return;const y=c.current===null||!c.current.isConnected;(i||y&&r.current===0)&&(c.current=b)},[c,r,i,a]);return Mn("div",t,{ref:[p,n,o],props:h})})),M8=A.forwardRef(function(t,n){const{render:r,className:o,direction:i,keepMounted:a=!1,...c}=t,{store:u,popupRef:f,listRef:h,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:g}=fi(),{side:b,scrollDownArrowRef:y,scrollUpArrowRef:x}=H2(),w=i==="up"?vt.scrollUpArrowVisible:vt.scrollDownArrowVisible,T=xt(u,w),v=xt(u,vt.openMethod),_=T&&v!=="touch",S=go(),C=i==="up"?x:y,{transitionStatus:E,setMounted:O}=J0(_);Xe(()=>(g.current+=1,u.state.hasScrollArrows||u.set("hasScrollArrows",!0),()=>{g.current=Math.max(0,g.current-1),g.current===0&&u.state.hasScrollArrows&&u.set("hasScrollArrows",!1)}),[u,g]),jc({open:_,ref:C,onComplete(){_||O(!1)}});const j=A.useMemo(()=>({direction:i,visible:_,side:b,transitionStatus:E}),[i,_,b,E]),N=Mn("div",t,{ref:[n,C],state:j,props:[{"aria-hidden":!0,children:i==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove(L){if(L.movementX===0&&L.movementY===0||S.isStarted())return;u.set("activeIndex",null);function U(){const X=u.state.listElement??f.current;if(!X)return;u.set("activeIndex",null),p();const Q=X.scrollTop===0,Z=Math.round(X.scrollTop+X.clientHeight)>=X.scrollHeight;if(h.current.length===0&&(i==="up"?u.set("scrollUpArrowVisible",!Q):u.set("scrollDownArrowVisible",!Z)),i==="up"&&Q||i==="down"&&Z){S.clear();return}if((u.state.listElement||f.current)&&h.current&&h.current.length>0){const G=h.current,oe=C.current?.offsetHeight||0;if(i==="up"){let ne=0;const $=X.scrollTop+oe;for(let V=0;V<G.length;V+=1){const I=G[V];if(I&&I.offsetTop>=$){ne=V;break}}const F=Math.max(0,ne-1);if(F<ne){const V=G[F];V&&(X.scrollTop=Math.max(0,V.offsetTop-oe))}else X.scrollTop=0}else{let ne=G.length-1;const $=X.scrollTop+X.clientHeight-oe;for(let V=0;V<G.length;V+=1){const I=G[V];if(I&&I.offsetTop+I.offsetHeight>$){ne=Math.max(0,V-1);break}}const F=Math.min(G.length-1,ne+1);if(F>ne){const V=G[F];V&&(X.scrollTop=V.offsetTop+V.offsetHeight-X.clientHeight+oe)}else X.scrollTop=X.scrollHeight-X.clientHeight}}S.start(40,U)}S.start(40,U)},onMouseLeave(){S.clear()}},c]});return _||a?N:null}),fwe=A.forwardRef(function(t,n){return M.jsx(M8,{...t,ref:n,direction:"down"})}),dwe=A.forwardRef(function(t,n){return M.jsx(M8,{...t,ref:n,direction:"up"})}),hwe=A.createContext(void 0),pwe=A.forwardRef(function(t,n){const{className:r,render:o,...i}=t,[a,c]=A.useState(),u=A.useMemo(()=>({labelId:a,setLabelId:c}),[a,c]),f=Mn("div",t,{ref:n,props:[{role:"group","aria-labelledby":a},i]});return M.jsx(hwe.Provider,{value:u,children:f})}),QP=ISe;function JP({className:e,...t}){return M.jsx(pwe,{"data-slot":"select-group",className:Et("scroll-my-1",e),...t})}function e3({className:e,...t}){return M.jsx(VSe,{"data-slot":"select-value",className:Et("flex flex-1 text-left",e),...t})}function t3({className:e,size:t="default",children:n,...r}){return M.jsxs(FSe,{"data-slot":"select-trigger","data-size":t,className:Et("border-input data-[placeholder]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-none border bg-transparent py-2 pr-2 pl-2.5 text-xs transition-colors select-none focus-visible:ring-1 aria-invalid:ring-1 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-none *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...r,children:[n,M.jsx(qSe,{render:M.jsx(vD,{className:"text-muted-foreground size-4 pointer-events-none"})})]})}function n3({className:e,children:t,side:n="bottom",sideOffset:r=4,align:o="center",alignOffset:i=0,alignItemWithTrigger:a=!0,...c}){return M.jsx(HSe,{children:M.jsx(nwe,{side:n,sideOffset:r,align:o,alignOffset:i,alignItemWithTrigger:a,className:"isolate z-50",children:M.jsxs(swe,{"data-slot":"select-content",className:Et("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 min-w-36 rounded-none shadow-md ring-1 duration-100 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto",e),...c,children:[M.jsx(mwe,{}),M.jsx(iwe,{children:t}),M.jsx(gwe,{})]})})})}function Eu({className:e,children:t,...n}){return M.jsxs(awe,{"data-slot":"select-item",className:Et("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-none py-2 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...n,children:[M.jsx(uwe,{className:"flex flex-1 gap-2 shrink-0 whitespace-nowrap",children:t}),M.jsx(lwe,{render:M.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:M.jsx(i_,{className:"pointer-events-none"})})]})}function mwe({className:e,...t}){return M.jsx(dwe,{"data-slot":"select-scroll-up-button",className:Et("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 top-0 w-full",e),...t,children:M.jsx(Nne,{})})}function gwe({className:e,...t}){return M.jsx(fwe,{"data-slot":"select-scroll-down-button",className:Et("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 bottom-0 w-full",e),...t,children:M.jsx(vD,{})})}const j8=A.createContext(void 0);function ywe(){const e=A.useContext(j8);if(e===void 0)throw new Error(Jr(63));return e}let r3=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const P8={...F2,checked(e){return e?{[r3.checked]:""}:{[r3.unchecked]:""}}},vwe=A.forwardRef(function(t,n){const{checked:r,className:o,defaultChecked:i,id:a,inputRef:c,name:u,nativeButton:f=!1,onCheckedChange:h,readOnly:p=!1,required:g=!1,disabled:b=!1,render:y,uncheckedValue:x,...w}=t,{clearErrors:T}=U2(),{state:v,setTouched:_,setDirty:S,validityData:C,setFilled:E,setFocused:O,shouldValidateOnChange:j,validationMode:P,disabled:N,name:D,validation:L}=vc(),{labelId:U}=Ap(),X=N||b,Q=D??u,Z=Ze(h),q=A.useRef(null),G=Ui(q,c,L.inputRef),oe=A.useRef(null),ne=Uf(),$=V2({id:a,implicit:!1,controlRef:oe}),[F,V]=Bh({controlled:r,default:!!i,name:"Switch",state:"checked"});q2({id:ne,commit:L.commit,value:F,controlRef:oe,name:Q,getValue:()=>F}),Xe(()=>{q.current&&E(q.current.checked)},[q,E]),w8(F,()=>{T(Q),S(F!==C.initialValue),E(F),j()?L.commit(F):L.commit(F,!0)});const{getButtonProps:I,buttonRef:K}=Tc({disabled:X,native:f}),te={id:ne,role:"switch","aria-checked":F,"aria-readonly":p||void 0,"aria-labelledby":U,onFocus(){X||O(!0)},onBlur(){const Ce=q.current;!Ce||X||(_(!0),O(!1),P==="onBlur"&&L.commit(Ce.checked))},onClick(Ce){p||X||(Ce.preventDefault(),q?.current?.click())}},re=A.useMemo(()=>fp({checked:F,disabled:X,id:$,name:Q,required:g,style:X0,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:G,onChange(Ce){if(Ce.nativeEvent.defaultPrevented)return;const ee=Ce.target.checked,se=Nt(mc,Ce.nativeEvent);Z?.(ee,se),!se.isCanceled&&V(ee)},onFocus(){oe.current?.focus()}},L.getInputValidationProps),[F,X,G,$,Q,Z,g,V,L]),ie=A.useMemo(()=>({...v,checked:F,disabled:X,readOnly:p,required:g}),[v,F,X,p,g]),me=Mn("span",t,{state:ie,ref:[n,oe,K],props:[te,L.getValidationProps,w,I],stateAttributesMapping:P8});return M.jsxs(j8.Provider,{value:ie,children:[me,!F&&Q&&x!==void 0&&M.jsx("input",{type:"hidden",name:Q,value:x}),M.jsx("input",{...re})]})}),bwe=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{state:a}=vc(),c=ywe(),u={...a,...c};return Mn("span",t,{state:u,ref:n,stateAttributesMapping:P8,props:i})});function o3({className:e,size:t="default",...n}){return M.jsx(vwe,{"data-slot":"switch","data-size":t,className:Et("cursor-pointer data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-1 aria-invalid:ring-1 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...n,children:M.jsx(bwe,{"data-slot":"switch-thumb",className:"bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform"})})}const N8=A.createContext(void 0);function W2(){const e=A.useContext(N8);if(e===void 0)throw new Error(Jr(64));return e}let Swe=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const Y2={tabActivationDirection:e=>({[Swe.activationDirection]:e})},wwe=A.forwardRef(function(t,n){const{className:r,defaultValue:o=0,onValueChange:i,orientation:a="horizontal",render:c,value:u,...f}=t,h=rv(),p=Object.hasOwn(t,"defaultValue"),g=A.useRef([]),[b,y]=A.useState(()=>new Map),[x,w]=Bh({controlled:u,default:o,name:"Tabs",state:"value"}),T=u!==void 0,[v,_]=A.useState(()=>new Map),[S,C]=A.useState("none"),E=Ze((q,G)=>{i?.(q,G),!G.isCanceled&&(w(q),C(G.activationDirection))}),O=Ze((q,G)=>{y(oe=>{if(oe.get(q)===G)return oe;const ne=new Map(oe);return ne.set(q,G),ne})}),j=Ze((q,G)=>{y(oe=>{if(!oe.has(q)||oe.get(q)!==G)return oe;const ne=new Map(oe);return ne.delete(q),ne})}),P=A.useCallback(q=>b.get(q),[b]),N=A.useCallback(q=>{for(const G of v.values())if(q===G?.value)return G?.id},[v]),D=A.useCallback(q=>{if(q===void 0)return null;for(const[G,oe]of v.entries())if(oe!=null&&q===(oe.value??oe.index))return G;return null},[v]),L=A.useMemo(()=>({direction:h,getTabElementBySelectedValue:D,getTabIdByPanelValue:N,getTabPanelIdByValue:P,onValueChange:E,orientation:a,registerMountedTabPanel:O,setTabMap:_,unregisterMountedTabPanel:j,tabActivationDirection:S,value:x}),[h,D,N,P,E,a,O,_,j,S,x]),U=A.useMemo(()=>{for(const q of v.values())if(q!=null&&q.value===x)return q},[v,x]),X=A.useMemo(()=>{for(const q of v.values())if(q!=null&&!q.disabled)return q.value},[v]);Xe(()=>{if(T||v.size===0)return;const q=U?.disabled,G=U==null&&x!==null;if(p&&q&&x===o||!q&&!G)return;const ne=X??null;x!==ne&&(w(ne),C("none"))},[o,X,p,T,U,C,w,v,x]);const Z=Mn("div",t,{state:{orientation:a,tabActivationDirection:S},ref:n,props:f,stateAttributesMapping:Y2});return M.jsx(N8.Provider,{value:L,children:M.jsx(B2,{elementsRef:g,children:Z})})}),D8="data-composite-item-active";function xwe(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=ED(),{ref:o,index:i}=G2(e),a=n===i,c=A.useRef(null),u=Ui(o,c);return{compositeProps:A.useMemo(()=>({tabIndex:a?0:-1,onFocus(){r(i)},onMouseMove(){const h=c.current;if(!t||!h)return;const p=h.hasAttribute("disabled")||h.ariaDisabled==="true";!a&&!p&&h.focus()}}),[a,r,i,t]),compositeRef:u,index:i}}const $8=A.createContext(void 0);function Ewe(){const e=A.useContext($8);if(e===void 0)throw new Error(Jr(65));return e}const _we=A.forwardRef(function(t,n){const{className:r,disabled:o=!1,render:i,value:a,id:c,nativeButton:u=!0,...f}=t,{value:h,getTabPanelIdByValue:p,orientation:g}=W2(),{activateOnFocus:b,highlightedTabIndex:y,onTabActivation:x,setHighlightedTabIndex:w,tabsListElement:T}=Ewe(),v=Uf(c),_=A.useMemo(()=>({disabled:o,id:v,value:a}),[o,v,a]),{compositeProps:S,compositeRef:C,index:E}=xwe({metadata:_}),O=a===h,j=A.useRef(!1);Xe(()=>{if(j.current){j.current=!1;return}if(!(O&&E>-1&&y!==E))return;const oe=T;if(oe!=null){const ne=$i(js(oe));if(ne&&Yt(oe,ne))return}o||w(E)},[O,E,y,w,o,T]);const{getButtonProps:P,buttonRef:N}=Tc({disabled:o,native:u,focusableWhenDisabled:!0}),D=p(a),L=A.useRef(!1),U=A.useRef(!1);function X(oe){O||o||x(a,Nt(mc,oe.nativeEvent,void 0,{activationDirection:"none"}))}function Q(oe){O||(E>-1&&!o&&w(E),!o&&b&&(!L.current||L.current&&U.current)&&x(a,Nt(mc,oe.nativeEvent,void 0,{activationDirection:"none"})))}function Z(oe){if(O||o)return;L.current=!0;function ne(){L.current=!1,U.current=!1}(!oe.button||oe.button===0)&&(U.current=!0,js(oe.currentTarget).addEventListener("pointerup",ne,{once:!0}))}const q=A.useMemo(()=>({disabled:o,active:O,orientation:g}),[o,O,g]);return Mn("button",t,{state:q,ref:[n,N,C],props:[S,{role:"tab","aria-controls":D,"aria-selected":O,id:v,onClick:X,onFocus:Q,onPointerDown:Z,[D8]:O?"":void 0,onKeyDownCapture(){j.current=!0}},f,P]})});function s3(e){const t=Co(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Wn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r;return(gf(n)!==i||gf(r)!==a)&&(n=i,r=a),{width:n,height:r}}let Cwe=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e})({});const Twe=A.forwardRef(function(t,n){const{className:r,value:o,render:i,keepMounted:a=!1,...c}=t,{value:u,getTabIdByPanelValue:f,orientation:h,tabActivationDirection:p,registerMountedTabPanel:g,unregisterMountedTabPanel:b}=W2(),y=Uf(),x=A.useMemo(()=>({id:y,value:o}),[y,o]),{ref:w,index:T}=G2({metadata:x}),v=o!==u,_=f(o),S=A.useMemo(()=>({hidden:v,orientation:h,tabActivationDirection:p}),[v,h,p]),C=Mn("div",t,{state:S,ref:[n,w],props:[{"aria-labelledby":_,hidden:v,id:y??void 0,role:"tabpanel",tabIndex:v?-1:0,[Cwe.index]:T},c],stateAttributesMapping:Y2});return Xe(()=>{if(!(v&&!a)&&y!=null)return g(o,y),()=>{b(o,y)}},[v,a,o,y,g,b]),!v||a?C:null});function Rwe(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const Owe=[];function Awe(e){const{itemSizes:t,cols:n=1,loopFocus:r=!0,dense:o=!1,orientation:i="both",direction:a,highlightedIndex:c,onHighlightedIndexChange:u,rootRef:f,enableHomeAndEndKeys:h=!1,stopEventPropagation:p=!1,disabledIndices:g,modifierKeys:b=Owe}=e,[y,x]=A.useState(0),w=n>1,T=A.useRef(null),v=Ui(T,f),_=A.useRef([]),S=A.useRef(!1),C=c??y,E=Ze((P,N=!1)=>{if((u??x)(P),N){const D=_.current[P];BP(T.current,D,a,i)}}),O=Ze(P=>{if(P.size===0||S.current)return;S.current=!0;const N=Array.from(P.keys()),D=N.find(U=>U?.hasAttribute(D8))??null,L=D?N.indexOf(D):-1;L!==-1&&E(L),BP(T.current,D,a,i)}),j=A.useMemo(()=>({"aria-orientation":i==="both"?void 0:i,ref:v,onFocus(P){!T.current||!qP(P.target)||P.target.setSelectionRange(0,P.target.value.length??0)},onKeyDown(P){const N=h?V1e:y8;if(!N.has(P.key)||kwe(P,b)||!T.current)return;const L=a==="rtl",U=L?qh:Qu,X={horizontal:U,vertical:Jl,both:U}[i],Q=L?Qu:qh,Z={horizontal:Q,vertical:Xu,both:Q}[i];if(qP(P.target)&&!Rwe(P.target)){const V=P.target.selectionStart,I=P.target.selectionEnd,K=P.target.value??"";if(V==null||P.shiftKey||V!==I||P.key!==Z&&V<K.length||P.key!==X&&V>0)return}let q=C;const G=wy(_,g),oe=Lx(_,g);if(w){const V=t||Array.from({length:_.current.length},()=>({width:1,height:1})),I=A6(V,n,o),K=I.findIndex(re=>re!=null&&!Ga(_,re,g)),te=I.reduce((re,ie,me)=>ie!=null&&!Ga(_,ie,g)?me:re,-1);q=I[O6({current:I.map(re=>re?_.current[re]:null)},{event:P,orientation:i,loopFocus:r,cols:n,disabledIndices:M6([...g||_.current.map((re,ie)=>Ga(_,ie)?ie:void 0),void 0],I),minIndex:K,maxIndex:te,prevIndex:k6(C>oe?G:C,V,I,n,P.key===Jl?"bl":P.key===Qu?"tr":"tl"),rtl:L})]}const ne={horizontal:[U],vertical:[Jl],both:[U,Jl]}[i],$={horizontal:[Q],vertical:[Xu],both:[Q,Xu]}[i],F=w?N:{horizontal:h?F1e:m8,vertical:h?U1e:g8,both:N}[i];h&&(P.key===Rp?q=G:P.key===Op&&(q=oe)),q===C&&(ne.includes(P.key)||$.includes(P.key))&&(r&&q===oe&&ne.includes(P.key)?q=G:r&&q===G&&$.includes(P.key)?q=oe:q=Kr(_,{startingIndex:q,decrement:$.includes(P.key),disabledIndices:g})),q!==C&&!Ku(_,q)&&(p&&P.stopPropagation(),F.has(P.key)&&P.preventDefault(),E(q,!0),queueMicrotask(()=>{_.current[q]?.focus()}))}}),[n,o,a,g,_,h,C,w,t,r,v,b,E,i,p]);return A.useMemo(()=>({props:j,highlightedIndex:C,onHighlightedIndexChange:E,elementsRef:_,disabledIndices:g,onMapChange:O,relayKeyboardEvent:j.onKeyDown}),[j,C,E,_,g,O])}function kwe(e,t){for(const n of G1e.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function Mwe(e){const{render:t,className:n,refs:r=af,props:o=af,state:i=$r,stateAttributesMapping:a,highlightedIndex:c,onHighlightedIndexChange:u,orientation:f,dense:h,itemSizes:p,loopFocus:g,cols:b,enableHomeAndEndKeys:y,onMapChange:x,stopEventPropagation:w=!0,rootRef:T,disabledIndices:v,modifierKeys:_,highlightItemOnHover:S=!1,tag:C="div",...E}=e,O=rv(),{props:j,highlightedIndex:P,onHighlightedIndexChange:N,elementsRef:D,onMapChange:L,relayKeyboardEvent:U}=Awe({itemSizes:p,cols:b,loopFocus:g,dense:h,orientation:f,highlightedIndex:c,onHighlightedIndexChange:u,rootRef:T,stopEventPropagation:w,enableHomeAndEndKeys:y,direction:O,disabledIndices:v,modifierKeys:_}),X=Mn(C,e,{state:i,ref:r,props:[j,...o,E],stateAttributesMapping:a}),Q=A.useMemo(()=>({highlightedIndex:P,onHighlightedIndexChange:N,highlightItemOnHover:S,relayKeyboardEvent:U}),[P,N,S,U]);return M.jsx(xD.Provider,{value:Q,children:M.jsx(B2,{elementsRef:D,onMapChange:Z=>{x?.(Z),L(Z)},children:X})})}const jwe=A.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:o,loopFocus:i=!0,render:a,...c}=t,{getTabElementBySelectedValue:u,onValueChange:f,orientation:h,value:p,setTabMap:g,tabActivationDirection:b}=W2(),[y,x]=A.useState(0),[w,T]=A.useState(null),v=Pwe(p,h,w,u),_=Ze((O,j)=>{if(O!==p){const P=v(O);j.activationDirection=P,f(O,j)}}),S=A.useMemo(()=>({orientation:h,tabActivationDirection:b}),[h,b]),C={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},E=A.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:y,onTabActivation:_,setHighlightedTabIndex:x,tabsListElement:w,value:p}),[r,y,_,x,w,p]);return M.jsx($8.Provider,{value:E,children:M.jsx(Mwe,{render:a,className:o,state:S,refs:[n,T],props:[C,c],stateAttributesMapping:Y2,highlightedIndex:y,enableHomeAndEndKeys:!0,loopFocus:i,orientation:h,onHighlightedIndexChange:x,onMapChange:g,disabledIndices:af})})});function i3(e,t){const{left:n,top:r}=e.getBoundingClientRect(),{left:o,top:i}=t.getBoundingClientRect(),a=n-o,c=r-i;return{left:a,top:c}}function Pwe(e,t,n,r){const[o,i]=A.useState(null);return Xe(()=>{if(e==null||n==null){i(null);return}const a=r(e);if(a==null){i(null);return}const{left:c,top:u}=i3(a,n);i(t==="horizontal"?c:u)},[t,r,n,e]),A.useCallback(a=>{if(a===e)return"none";if(a==null)return i(null),"none";if(a!=null&&n!=null){const c=r(a);if(c!=null){const{left:u,top:f}=i3(c,n);if(o==null)return i(t==="horizontal"?u:f),"none";if(t==="horizontal"){if(u<o)return i(u),"left";if(u>o)return i(u),"right"}else{if(f<o)return i(f),"up";if(f>o)return i(f),"down"}}}return"none"},[r,t,o,n,e])}function Nwe({className:e,orientation:t="horizontal",...n}){return M.jsx(wwe,{"data-slot":"tabs","data-orientation":t,className:Et("gap-2 group/tabs flex data-[orientation=horizontal]:flex-col",e),...n})}const Dwe=Wi("rounded-none p-[3px] group-data-horizontal/tabs:h-8 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function $we({className:e,variant:t="default",...n}){return M.jsx(jwe,{"data-slot":"tabs-list","data-variant":t,className:Et(Dwe({variant:t}),e),...n})}function ew({className:e,...t}){return M.jsx(_we,{"data-slot":"tabs-trigger",className:Et("gap-1.5 rounded-none border border-transparent px-1.5 py-0.5 text-xs font-medium group-data-vertical/tabs:py-[calc(--spacing(1.25))] [&_svg:not([class*='size-'])]:size-4 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background dark:data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 data-active:text-foreground","after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}function tw({className:e,...t}){return M.jsx(Twe,{"data-slot":"tabs-content",className:Et("text-xs/relaxed flex-1 outline-none",e),...t})}function Iwe({className:e,...t}){return M.jsx("div",{"data-slot":"input-group",role:"group",className:Et("border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-disabled:bg-input/50 dark:has-disabled:bg-input/80 h-8 rounded-none border transition-colors has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot][aria-invalid=true]]:ring-1 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 [[data-slot=combobox-content]_&]:focus-within:border-inherit [[data-slot=combobox-content]_&]:focus-within:ring-0 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto",e),...t})}const zwe=Wi("text-muted-foreground h-auto gap-2 py-1.5 text-xs font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-none [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none",{variants:{align:{"inline-start":"pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem] order-first","inline-end":"pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem] order-last","block-start":"px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start","block-end":"px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start"}},defaultVariants:{align:"inline-start"}});function Lwe({className:e,align:t="inline-start",...n}){return M.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:Et(zwe({align:t}),e),onClick:r=>{r.target.closest("button")||r.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}function Fwe({className:e,...t}){return M.jsx(Go,{"data-slot":"command",className:Et("bg-popover text-popover-foreground rounded-none flex size-full flex-col overflow-hidden",e),...t})}function Uwe({className:e,...t}){return M.jsx("div",{"data-slot":"command-input-wrapper",className:"border-b pb-0",children:M.jsxs(Iwe,{className:"bg-input/30 border-input/30 h-8 border-none shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[M.jsx(Go.Input,{"data-slot":"command-input",className:Et("w-full text-xs outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t}),M.jsx(Lwe,{children:M.jsx(Yne,{className:"size-4 shrink-0 opacity-50"})})]})})}function Vwe({className:e,...t}){return M.jsx(Go.List,{"data-slot":"command-list",className:Et("no-scrollbar max-h-72 scroll-py-0 outline-none overflow-x-hidden overflow-y-auto",e),...t})}function qwe({className:e,...t}){return M.jsx(Go.Empty,{"data-slot":"command-empty",className:Et("py-6 text-center text-xs",e),...t})}function Bwe({className:e,...t}){return M.jsx(Go.Group,{"data-slot":"command-group",className:Et("text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs",e),...t})}function Hwe({className:e,children:t,...n}){return M.jsxs(Go.Item,{"data-slot":"command-item",className:Et("data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-none px-2 py-2 text-xs outline-hidden select-none [&_svg:not([class*='size-'])]:size-4 in-data-[slot=dialog-content]:rounded-none! group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...n,children:[t,M.jsx(i_,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}const I8=A.createContext(void 0);function kp(e){const t=A.useContext(I8);if(t===void 0&&!e)throw new Error(Jr(47));return t}function Kwe(){return{...l8(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0}}const Gwe={...c8,disabled:Je(e=>e.disabled),instantType:Je(e=>e.instantType),openMethod:Je(e=>e.openMethod),openChangeReason:Je(e=>e.openChangeReason),modal:Je(e=>e.modal),stickIfOpen:Je(e=>e.stickIfOpen),titleElementId:Je(e=>e.titleElementId),descriptionElementId:Je(e=>e.descriptionElementId),openOnHover:Je(e=>e.openOnHover),closeDelay:Je(e=>e.closeDelay)};class X2 extends j2{constructor(t){const n={...Kwe(),...t};n.open&&t?.mounted===void 0&&(n.mounted=!0),super(n,{popupRef:A.createRef(),backdropRef:A.createRef(),internalBackdropRef:A.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:A.createRef(),beforeContentFocusGuardRef:A.createRef(),stickIfOpenTimeout:new ol,triggerElements:new ev},Gwe)}setOpen=(t,n)=>{const r=n.reason===ls,o=n.reason===Ba&&n.event.detail===0,i=!t&&(n.reason===m6||n.reason==null);if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,n),n.isCanceled)return;const a={open:t,nativeEvent:n.event,reason:n.reason,nested:this.state.nested,triggerElement:n.trigger};this.state.floatingRootContext.context.events?.emit("openchange",a);const u=()=>{const f={open:t,openChangeReason:n.reason},h=n.trigger?.id??null;(h||t)&&(f.activeTriggerId=h,f.activeTriggerElement=n.trigger??null),this.update(f)};r?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(kre,()=>{this.set("stickIfOpen",!1)}),Bo.flushSync(u)):u(),o||i?this.set("instantType",o?"click":"dismiss"):n.reason===gc?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(t,n){const r=To(()=>t??new X2(n)).current;return w2(r.disposeEffect),r}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}function a3({props:e}){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:o,onOpenChangeComplete:i,modal:a=!1,handle:c,triggerId:u,defaultTriggerId:f=null}=e,h=X2.useStore(c?.store,{open:n??r,modal:a,activeTriggerId:u!==void 0?u:f});h.useControlledProp("open",n,r),h.useControlledProp("activeTriggerId",u,f);const p=h.useState("open"),g=h.useState("positionerElement"),b=h.useState("payload"),y=h.useState("openChangeReason");h.useContextCallback("onOpenChange",o),h.useContextCallback("onOpenChangeComplete",i);const{openMethod:x,triggerProps:w,reset:T}=L2(p);i8(h);const{forceUnmount:v}=a8(p,h,()=>{h.update({stickIfOpen:!0,openChangeReason:null}),T()});z2(p&&a===!0&&y!==ls&&x!=="touch",g),A.useEffect(()=>{p||h.context.stickIfOpenTimeout.clear()},[h,p]);const _=A.useCallback(Q=>{const Z=Nt(Q);return Z.preventUnmountOnClose=()=>{h.set("preventUnmountingOnClose",!0)},Z},[h]),S=A.useCallback(()=>{h.setOpen(!1,_(g6))},[h,_]);A.useImperativeHandle(e.actionsRef,()=>({unmount:v,close:S}),[v,S]);const C=f8({popupStore:h,onOpenChange:h.setOpen}),E=M2(C,{outsidePressEvent:{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),O=h8(C),{getReferenceProps:j,getFloatingProps:P,getTriggerProps:N}=tv([E,O]),D=A.useMemo(()=>j(w),[j,w]),L=A.useMemo(()=>N(w),[N,w]),U=A.useMemo(()=>P(),[P]);h.useSyncedValues({modal:a,openMethod:x,activeTriggerProps:D,inactiveTriggerProps:L,popupProps:U,floatingRootContext:C,nested:pl()!=null});const X=A.useMemo(()=>({store:h}),[h]);return M.jsx(I8.Provider,{value:X,children:typeof t=="function"?t({payload:b}):t})}function Zwe(e){return kp(!0)?M.jsx(a3,{props:e}):M.jsx(Zve,{children:M.jsx(a3,{props:e})})}const Wwe=300,Ywe=A.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:a=!0,handle:c,payload:u,openOnHover:f=!1,delay:h=Wwe,closeDelay:p=0,id:g,...b}=t,y=kp(!0),x=c?.store??y?.store;if(!x)throw new Error(Jr(74));const w=Uf(g),T=x.useState("isTriggerActive",w),v=x.useState("floatingRootContext"),_=x.useState("isOpenedByTrigger",w),S=A.useRef(null),{registerTrigger:C,isMountedByThisTrigger:E}=b1e(w,S,x,{payload:u,disabled:i,openOnHover:f,closeDelay:p}),O=x.useState("openChangeReason"),j=x.useState("stickIfOpen"),P=x.useState("openMethod"),N=O1e(v,{enabled:v!=null&&f&&(P!=="touch"||O!==Ba),mouseOnly:!0,move:!1,handleClose:$1e(),restMs:h,delay:{close:p},triggerElementRef:S,isActiveTrigger:T}),D=Z6(v,{enabled:v!=null,stickIfOpen:j}),L=tv([D]),U=x.useState("triggerProps",E),X=A.useMemo(()=>({disabled:i,open:_}),[i,_]),{getButtonProps:Q,buttonRef:Z}=Tc({disabled:i,native:a}),q=A.useMemo(()=>({open(F){return F&&O===Ba?h6.open(F):d6.open(F)}}),[O]),G=Mn("button",t,{state:X,ref:[Z,n,C,S],props:[L.getReferenceProps(),N,U,{[TD]:"",id:w},b,Q],stateAttributesMapping:q}),oe=A.useRef(null),ne=Ze(F=>{Bo.flushSync(()=>{x.setOpen(!1,Nt(gc,F.nativeEvent,F.currentTarget))}),qve(oe.current)?.focus()}),$=Ze(F=>{const V=x.select("positionerElement");if(V&&Gu(F,V))x.context.beforeContentFocusGuardRef.current?.focus();else{Bo.flushSync(()=>{x.setOpen(!1,Nt(gc,F.nativeEvent,F.currentTarget))});let I=Vve(S.current);for(;I!==null&&Yt(V,I)||I?.hasAttribute("aria-hidden");){const K=I;if(I=T2(I),I===K)break}I?.focus()}});return T?M.jsxs(A.Fragment,{children:[M.jsx(vf,{ref:oe,onFocus:ne}),M.jsx(A.Fragment,{children:G},w),M.jsx(vf,{ref:x.context.triggerFocusTargetRef,onFocus:$})]}):M.jsx(A.Fragment,{children:G},w)}),z8=A.createContext(void 0);function Xwe(){const e=A.useContext(z8);if(e===void 0)throw new Error(Jr(45));return e}const Qwe=A.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,{store:i}=kp();return i.useState("mounted")||r?M.jsx(z8.Provider,{value:r,children:M.jsx(R2,{ref:n,...o,renderGuards:!1})}):null}),L8=A.createContext(void 0);function Jwe(){const e=A.useContext(L8);if(!e)throw new Error(Jr(46));return e}const exe=A.forwardRef(function(t,n){const{render:r,className:o,anchor:i,positionMethod:a="absolute",side:c="bottom",align:u="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:p="clipping-ancestors",collisionPadding:g=5,arrowPadding:b=5,sticky:y=!1,disableAnchorTracking:x=!1,collisionAvoidance:w=Pre,...T}=t,{store:v}=kp(),_=Xwe(),S=Kve(),C=v.useState("floatingRootContext"),E=v.useState("mounted"),O=v.useState("open"),j=v.useState("openChangeReason"),P=v.useState("activeTriggerElement"),N=v.useState("modal"),D=v.useState("positionerElement"),L=v.useState("instantType"),U=v.useState("transitionStatus"),X=A.useRef(null),Q=N2(D,!1,!1),Z=_8({anchor:i,floatingRootContext:C,positionMethod:a,mounted:E,side:c,sideOffset:f,align:u,alignOffset:h,arrowPadding:b,collisionBoundary:p,collisionPadding:g,sticky:y,disableAnchorTracking:x,keepMounted:_,nodeId:S,collisionAvoidance:w,adaptiveOrigin:ewe}),q=A.useMemo(()=>{const V={};return O||(V.pointerEvents="none"),{role:"presentation",hidden:!E,style:{...Z.positionerStyles,...V}}},[O,E,Z.positionerStyles]),G=A.useMemo(()=>({props:q,...Z}),[q,Z]),oe=C?.select("domReferenceElement");Xe(()=>{const V=oe,I=X.current;if(V&&(X.current=V),I&&V&&V!==I){v.set("instantType",void 0);const K=new AbortController;return Q(()=>{v.set("instantType","trigger-change")},K.signal),()=>{K.abort()}}},[oe,Q,v]);const ne=A.useMemo(()=>({open:O,side:G.side,align:G.align,anchorHidden:G.anchorHidden,instant:L}),[O,G.side,G.align,G.anchorHidden,L]),$=A.useCallback(V=>{v.set("positionerElement",V)},[v]),F=Mn("div",t,{state:ne,props:[G.props,K2(U),T],ref:[n,$],stateAttributesMapping:Lf});return M.jsxs(L8.Provider,{value:G,children:[E&&N===!0&&j!==ls&&M.jsx(I2,{ref:v.context.internalBackdropRef,inert:$2(!O),cutout:P}),M.jsx(Gve,{id:S,children:F})]})}),txe=typeof ResizeObserver<"u",nxe=()=>!0;function rxe(e){const{popupElement:t,positionerElement:n,content:r,mounted:o,enabled:i=nxe,onMeasureLayout:a,onMeasureLayoutComplete:c,side:u,direction:f}=e,h=A.useRef(!0),p=N2(t,!0,!1),g=Tp(),b=A.useRef(null),y=Ze(a),x=Ze(c),w=A.useMemo(()=>{let T=u==="top",v=u==="left";return f==="rtl"?(T=T||u==="inline-end",v=v||u==="inline-end"):(T=T||u==="inline-start",v=v||u==="inline-start"),T?{position:"absolute",[u==="top"?"bottom":"top"]:"0",[v?"right":"left"]:"0"}:$r},[u,f]);Xe(()=>{if(!o||!i()||!txe){h.current=!0,b.current=null;return}if(!t||!n)return;Object.entries(w).forEach(([P,N])=>{t.style.setProperty(P,N)});const T=new ResizeObserver(P=>{const N=P[0];N&&(b.current===null?b.current={width:Math.ceil(N.borderBoxSize[0].inlineSize),height:Math.ceil(N.borderBoxSize[0].blockSize)}:(b.current.width=Math.ceil(N.borderBoxSize[0].inlineSize),b.current.height=Math.ceil(N.borderBoxSize[0].blockSize)))});T.observe(t),t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto");const v=Zd(t,"position","static"),_=Zd(t,"transform","none"),S=Zd(t,"scale","1"),C=Zd(n,"--available-width","max-content"),E=Zd(n,"--available-height","max-content");if(y?.(),h.current||b.current===null){n.style.setProperty("--positioner-width","max-content"),n.style.setProperty("--positioner-height","max-content");const P=s3(t);return n.style.setProperty("--positioner-width",`${P.width}px`),n.style.setProperty("--positioner-height",`${P.height}px`),v(),_(),S(),C(),E(),x?.(null,P),h.current=!1,()=>{T.disconnect()}}t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto"),n.style.setProperty("--positioner-width","max-content"),n.style.setProperty("--positioner-height","max-content");const O=s3(t);t.style.setProperty("--popup-width",`${b.current.width}px`),t.style.setProperty("--popup-height",`${b.current.height}px`),v(),_(),C(),E(),x?.(b.current,O),n.style.setProperty("--positioner-width",`${O.width}px`),n.style.setProperty("--positioner-height",`${O.height}px`);const j=new AbortController;return g.request(()=>{t.style.setProperty("--popup-width",`${O.width}px`),t.style.setProperty("--popup-height",`${O.height}px`),p(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},j.signal)}),()=>{T.disconnect(),j.abort(),g.cancel()}},[r,t,n,p,g,i,o,y,x,w])}function Zd(e,t,n){const r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r)}}const oxe={...Lf,...Ep},sxe=A.forwardRef(function(t,n){const{className:r,render:o,initialFocus:i,finalFocus:a,...c}=t,{store:u}=kp(),f=Jwe(),h=O8()!=null,p=rv(),g=u.useState("open"),b=u.useState("openMethod"),y=u.useState("instantType"),x=u.useState("transitionStatus"),w=u.useState("popupProps"),T=u.useState("titleElementId"),v=u.useState("descriptionElementId"),_=u.useState("modal"),S=u.useState("mounted"),C=u.useState("openChangeReason"),E=u.useState("popupElement"),O=u.useState("payload"),j=u.useState("positionerElement"),P=u.useState("activeTriggerElement"),N=u.useState("floatingRootContext");jc({open:g,ref:u.context.popupRef,onComplete(){g&&u.context.onOpenChangeComplete?.(!0)}});const D=u.useState("disabled"),L=u.useState("openOnHover"),U=u.useState("closeDelay");C1e(N,{enabled:L&&!D,closeDelay:U});function X(F){return F==="touch"?u.context.popupRef.current:!0}const Q=i===void 0?X:i,Z=A.useMemo(()=>({open:g,side:f.side,align:f.align,instant:y,transitionStatus:x}),[g,f.side,f.align,y,x]),q=A.useCallback(F=>{u.set("popupElement",F)},[u]);function G(){N.context.events.emit("measure-layout")}function oe(F,V){N.context.events.emit("measure-layout-complete",{previousDimensions:F,nextDimensions:V})}const ne=A.useCallback(()=>u.context.triggerElements.size>1,[u]);rxe({popupElement:E,positionerElement:j,mounted:S,content:O,enabled:ne,onMeasureLayout:G,onMeasureLayoutComplete:oe,side:f.side,direction:p});const $=Mn("div",t,{state:Z,ref:[n,u.context.popupRef,q],props:[w,{"aria-labelledby":T,"aria-describedby":v,onKeyDown(F){h&&D2.has(F.key)&&F.stopPropagation()}},K2(x),c],stateAttributesMapping:oxe});return M.jsx(A2,{context:N,openInteractionType:b,modal:_==="trap-focus",disabled:!S||C===ls,initialFocus:Q,returnFocus:a,restoreFocus:"popup",previousFocusableElement:Wn(P)?P:void 0,nextFocusableElement:u.context.triggerFocusTargetRef,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:$})});function ixe({...e}){return M.jsx(Zwe,{"data-slot":"popover",...e})}function axe({...e}){return M.jsx(Ywe,{"data-slot":"popover-trigger",...e})}function lxe({className:e,align:t="center",alignOffset:n=0,side:r="bottom",sideOffset:o=4,...i}){return M.jsx(Qwe,{children:M.jsx(exe,{align:t,alignOffset:n,side:r,sideOffset:o,className:"isolate z-50",children:M.jsx(sxe,{"data-slot":"popover-content",className:Et("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 flex flex-col gap-2.5 rounded-none p-2.5 text-xs shadow-md ring-1 duration-100 z-50 w-72 origin-(--transform-origin) outline-hidden",e),...i})})})}const l3=[{value:"en-US",label:"English (US)"},{value:"es-ES",label:"español (España)"},{value:"fr-FR",label:"français (France)"},{value:"de-DE",label:"Deutsch"},{value:"it-IT",label:"italiano"},{value:"am-ET",label:"አማርኛ"},{value:"ar",label:"العربية"},{value:"bg-BG",label:"български"},{value:"bn-BD",label:"বাংলা"},{value:"bs-BA",label:"bosanski"},{value:"ca-ES",label:"català"},{value:"cs-CZ",label:"čeština"},{value:"da-DK",label:"dansk"},{value:"el-GR",label:"Ελληνικά"},{value:"es-419",label:"español (Latinoamérica)"},{value:"et-EE",label:"eesti"},{value:"fi-FI",label:"suomi"},{value:"fr-CA",label:"français (Canada)"},{value:"gu-IN",label:"ગુજરાતી"},{value:"hi-IN",label:"हिन्दी"},{value:"hr-HR",label:"hrvatski"},{value:"hu-HU",label:"magyar"},{value:"hy-AM",label:"հայերեն"},{value:"id-ID",label:"Indonesia"},{value:"is-IS",label:"íslenska"},{value:"ja-JP",label:"日本語"},{value:"ka-GE",label:"ქართული"},{value:"kk-KZ",label:"қазақ тілі"},{value:"kn-IN",label:"ಕನ್ನಡ"},{value:"ko-KR",label:"한국어"},{value:"lt-LT",label:"lietuvių"},{value:"lv-LV",label:"latviešu"},{value:"mk-MK",label:"македонски"},{value:"ml-IN",label:"മലയാളം"},{value:"mn-MN",label:"монгол"},{value:"mr-IN",label:"मराठी"},{value:"ms-MY",label:"Bahasa Melayu"},{value:"my-MM",label:"မြန်မာ"},{value:"nb-NO",label:"norsk bokmål"},{value:"nl-NL",label:"Nederlands"},{value:"pa-IN",label:"ਪੰਜਾਬੀ"},{value:"pl-PL",label:"polski"},{value:"pt-BR",label:"português (Brasil)"},{value:"pt-PT",label:"português (Portugal)"},{value:"ro-RO",label:"română"},{value:"ru-RU",label:"русский"},{value:"sk-SK",label:"slovenčina"},{value:"sl-SI",label:"slovenščina"},{value:"so-SO",label:"Soomaali"},{value:"sq-AL",label:"shqip"},{value:"sr-RS",label:"српски"},{value:"sv-SE",label:"svenska"},{value:"sw-KE",label:"Kiswahili"},{value:"ta-IN",label:"தமிழ்"},{value:"te-IN",label:"తెలుగు"},{value:"th-TH",label:"ไทย"},{value:"tl-PH",label:"Tagalog"},{value:"tr-TR",label:"Türkçe"},{value:"uk-UA",label:"українська"},{value:"ur-PK",label:"اردو"},{value:"vi-VN",label:"Tiếng Việt"},{value:"zh-Hans",label:"简体中文"},{value:"zh-Hant-HK",label:"繁體中文(香港)"},{value:"zh-Hant-TW",label:"繁體中文(台灣)"}],cxe=({value:e,onValueChange:t})=>{const[n,r]=A.useState(!1),o=l3.find(i=>i.value===e);return M.jsxs(ixe,{open:n,onOpenChange:r,children:[M.jsx(axe,{children:M.jsxs(Qa,{variant:"outline",role:"combobox","aria-expanded":n,className:"w-full justify-between",children:[o?M.jsxs("span",{children:[o.value,M.jsxs("span",{className:"text-muted-foreground",children:[" ","- ",o.label]})]}):"Select locale...",M.jsx($ne,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),M.jsx(lxe,{className:"w-full p-0",children:M.jsxs(Fwe,{children:[M.jsx(Uwe,{placeholder:"Search locale..."}),M.jsxs(Vwe,{children:[M.jsx(qwe,{children:"No locale found."}),M.jsx(Bwe,{children:l3.map(i=>M.jsxs(Hwe,{value:i.value,onSelect:a=>{t(a===e?"":a),r(!1)},children:[M.jsxs("span",{children:[i.label," ",M.jsxs("span",{className:"text-muted-foreground",children:["(",i.value,")"]})]}),M.jsx(i_,{className:Et("ml-auto h-4 w-4",e===i.value?"opacity-100":"opacity-0")})]},i.value))})]})]})})]})};function uxe({resourceUri:e}){const{data:t}=gD(e);return t?M.jsx("div",{className:"text-xs",children:M.jsx(Y0,{src:t.contents[0],name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",style:{fontSize:"0.75rem"},collapsed:4,collapseStringsAfterLength:80})}):null}const fxe=()=>{const e=ul(),{openaiRef:t,openaiObject:n,openInAppUrl:r}=Tf(e.name),{setToolData:o}=Cf(),i=e._meta?.["openai/outputTemplate"],a=(c,u)=>{const f=t?.current?.contentWindow?.openai;f&&n&&(f[c]=u,o(e.name,{openaiObject:{...n,[c]:u}}))};return n?M.jsx("div",{className:"overflow-auto max-h-full min-h-0",children:M.jsxs(Nwe,{defaultValue:"widget-state",className:"gap-0",children:[M.jsxs($we,{className:"border-b border-border w-full",children:[M.jsx(ew,{value:"properties",children:"Properties"}),M.jsx(ew,{value:"widget-state",children:"Widget State"}),i&&M.jsx(ew,{value:"resource",children:"Resource"})]}),M.jsx(tw,{value:"properties",className:"p-4",children:M.jsxs(xSe,{children:[M.jsxs(Ra,{children:[M.jsx(Oa,{children:"Display Mode"}),M.jsxs(QP,{value:n.displayMode,onValueChange:c=>a("displayMode",c),"aria-label":"Select framework",items:[{label:"Inline",value:"inline"},{label:"Fullscreen",value:"fullscreen"},{label:"Pip",value:"pip"},{label:"Modal",value:"modal"}],name:"displayMode",required:!0,children:[M.jsx(t3,{children:M.jsx(e3,{})}),M.jsx(n3,{children:M.jsxs(JP,{children:[M.jsx(Eu,{value:"inline",children:"Inline"}),M.jsx(Eu,{value:"fullscreen",children:"Fullscreen"}),M.jsx(Eu,{value:"pip",children:"Pip"}),M.jsx(Eu,{value:"modal",children:"Modal"})]})})]})]}),M.jsxs(Ra,{children:[M.jsx(Oa,{children:"Theme"}),M.jsxs(SSe,{children:[M.jsx(Qa,{variant:n.theme==="light"?"default":"outline",onClick:()=>a("theme","light"),children:M.jsx(Qne,{})}),M.jsx(Qa,{variant:n.theme==="dark"?"default":"outline",onClick:()=>a("theme","dark"),children:M.jsx(Kne,{})})]})]}),M.jsxs(Ra,{children:[M.jsx(Oa,{children:"Locale"}),M.jsx(cxe,{value:n.locale,onValueChange:c=>a("locale",c)})]}),M.jsxs(Ra,{children:[M.jsx(Oa,{children:"Max Height"}),M.jsx(QS,{type:"number",value:n.maxHeight!==void 0?String(n.maxHeight):"",onChange:c=>{const u=c.target.value.trim();a("maxHeight",u===""?void 0:Number(u))}})]}),M.jsxs(Ra,{children:[M.jsx(Oa,{children:"Safe Area Insets"}),M.jsx("div",{className:"grid grid-cols-2 gap-4",children:["top","bottom","left","right"].map(c=>{const u=c.charAt(0).toUpperCase()+c.slice(1);return M.jsxs("div",{children:[M.jsx("label",{htmlFor:`safeArea-${c}`,className:"text-xs text-muted-foreground block mb-1",children:u}),M.jsx(QS,{id:`safeArea-${c}`,type:"number",value:n.safeArea?.insets?.[c]!==void 0?String(n.safeArea.insets[c]):"0",onChange:f=>{const h=f.target.value.trim();a("safeArea",{...n.safeArea,insets:{...n.safeArea?.insets,[c]:h===""?0:Number(h)}})}})]},c)})})]}),M.jsxs(Ra,{children:[M.jsx(Oa,{children:"Device Type"}),M.jsxs(QP,{value:n.userAgent?.device?.type??"desktop",onValueChange:c=>a("userAgent",{...n.userAgent,device:{...n.userAgent?.device,type:c}}),"aria-label":"Select device type",items:[{label:"Mobile",value:"mobile"},{label:"Desktop",value:"desktop"}],name:"deviceType",required:!0,children:[M.jsx(t3,{children:M.jsx(e3,{})}),M.jsx(n3,{children:M.jsxs(JP,{children:[M.jsx(Eu,{value:"mobile",children:"Mobile"}),M.jsx(Eu,{value:"desktop",children:"Desktop"})]})})]})]}),M.jsxs(Ra,{children:[M.jsx(Oa,{children:"Capabilities"}),M.jsxs("div",{className:"flex gap-8",children:[M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx("label",{htmlFor:"hover",className:"text-xs text-muted-foreground cursor-pointer",children:"Hover"}),M.jsx(o3,{id:"hover",checked:n.userAgent?.capabilities?.hover??!1,onCheckedChange:c=>a("userAgent",{...n.userAgent,capabilities:{...n.userAgent?.capabilities,hover:c}})})]}),M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx("label",{htmlFor:"touch",className:"text-xs text-muted-foreground cursor-pointer",children:"Touch"}),M.jsx(o3,{id:"touch",checked:n.userAgent?.capabilities?.touch??!1,onCheckedChange:c=>a("userAgent",{...n.userAgent,capabilities:{...n.userAgent?.capabilities,touch:c}})})]})]})]}),M.jsxs(Ra,{children:[M.jsx(Oa,{children:"Open in App URL"}),M.jsx(QS,{type:"text",value:r??"",readOnly:!0,placeholder:"Not set",className:"font-mono text-xs"})]})]})}),M.jsx(tw,{value:"widget-state",className:"p-4",children:M.jsx(Y0,{src:n.widgetState??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",collapsed:3,collapseStringsAfterLength:80})}),i&&M.jsx(tw,{value:"resource",className:"p-4",children:M.jsx(A.Suspense,{fallback:M.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading resource..."}),children:M.jsx(uxe,{resourceUri:i})})})]})}):null};function c3(e){return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}function dxe(e,t=60){const n=JSON.stringify(e);return n.length>t?`${n.slice(0,t)}…`:n}function hxe({log:e}){const[t,n]=A.useState(!1),r=Object.keys(e.args).length>0,o=r?dxe(e.args):null;return M.jsxs(M.Fragment,{children:[r?M.jsxs("button",{type:"button",onClick:()=>n(!t),className:"flex items-center gap-2 py-1.5 px-2 text-xs font-mono border-b border-gray-200 dark:border-gray-800/50 cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800/30 w-full text-left",children:[M.jsx("span",{className:"text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]",children:c3(e.timestamp)}),M.jsx("span",{className:Et("font-semibold shrink-0 min-w-[120px]",e.type==="response"?"text-green-600 dark:text-green-400":"text-blue-600 dark:text-blue-400"),children:e.command}),M.jsx("span",{className:"text-gray-500 dark:text-gray-600 mr-1",children:t?"▼":"▶"}),M.jsx("span",{className:"text-gray-600 dark:text-gray-400 truncate flex-1 min-w-0",children:o})]}):M.jsxs("div",{className:"flex items-center gap-2 py-1.5 px-2 text-xs font-mono border-b border-gray-200 dark:border-gray-800/50",children:[M.jsx("span",{className:"text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]",children:c3(e.timestamp)}),M.jsx("span",{className:"text-blue-600 dark:text-blue-400 font-semibold shrink-0 min-w-[120px]",children:e.command})]}),t&&r&&M.jsx("div",{className:"px-2 py-2 bg-gray-50 dark:bg-gray-900/30 border-b border-gray-200 dark:border-gray-800/50",children:M.jsx("pre",{className:"text-xs font-mono text-gray-800 dark:text-gray-200 whitespace-pre-wrap overflow-x-auto",children:JSON.stringify(e.args,null,2)})})]})}function pxe(){const e=ul(),{setToolData:t}=Cf(),{openaiLogs:n}=Tf(e.name),r=A.useRef(null),o=()=>{t(e.name,{openaiLogs:[]})};return A.useEffect(()=>{const i=r.current;i&&(i.scrollTop=i.scrollHeight)},[]),M.jsxs("div",{className:"flex flex-col h-full overflow-hidden min-h-0",children:[M.jsxs("div",{className:"flex items-center justify-between mb-3 h-8 flex-none",children:[M.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-200",children:"OpenAI API Logs"}),M.jsx("div",{className:"flex items-center gap-2",children:n.length>0&&M.jsxs(Qa,{variant:"ghost",size:"sm",onClick:o,children:[M.jsx(ere,{className:"w-3 h-3"}),"Clear"]})})]}),M.jsx("div",{ref:r,className:"overflow-auto flex-1 bg-gray-50 rounded-lg border border-gray-200 min-h-0",children:n.map(i=>M.jsx(hxe,{log:i},i.id))})]})}const mxe=Wi("relative grid w-full items-start gap-x-2 gap-y-0.5 rounded-xl border px-3.5 py-3 text-card-foreground text-sm has-[>svg]:has-data-[slot=alert-action]:grid-cols-[calc(var(--spacing)*4)_1fr_auto] has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-data-[slot=alert-action]:grid-cols-[1fr_auto] has-[>svg]:gap-x-2 [&>svg]:h-[1lh] [&>svg]:w-4",{defaultVariants:{variant:"default"},variants:{variant:{default:"bg-transparent dark:bg-input/32 [&>svg]:text-muted-foreground",error:"border-destructive/32 bg-destructive/4 [&>svg]:text-destructive",info:"border-info/32 bg-info/4 [&>svg]:text-info",success:"border-success/32 bg-success/4 [&>svg]:text-success",warning:"border-warning/32 bg-warning/4 [&>svg]:text-warning"}}});function gxe({className:e,variant:t,...n}){return M.jsx("div",{className:Et(mxe({variant:t}),e),"data-slot":"alert",role:"alert",...n})}function yxe({className:e,...t}){return M.jsx("div",{className:Et("font-medium [svg~&]:col-start-2",e),"data-slot":"alert-title",...t})}function vxe({className:e,...t}){return M.jsx("div",{className:Et("flex flex-col gap-2.5 text-muted-foreground [svg~&]:col-start-2",e),"data-slot":"alert-description",...t})}const bxe=()=>{const e=ul(),t=Tf(e.name);if(!t)return null;const n=()=>{const r=[];return t.response.content.forEach(o=>{o.type==="text"&&r.push(o.text)}),r.join(`
|
|
151
|
+
)`}return M.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})}),X1e=A.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,{store:i}=zf(),a=i.useState("mounted"),c=i.useState("modal");return a||r?M.jsx(p8.Provider,{value:r,children:M.jsxs(R2,{ref:n,...o,children:[a&&c===!0&&M.jsx(I2,{ref:i.context.internalBackdropRef,inert:$2(!open)}),t.children]})}):null});let KP={},GP={},ZP="";function Q1e(e){if(typeof document>"u")return!1;const t=js(e);return Er(t).innerWidth-t.documentElement.clientWidth>0}function J1e(e){const t=js(e),n=t.documentElement,r=t.body,o=Cc(n)?n:r,i=o.style.overflow;return o.style.overflow="hidden",()=>{o.style.overflow=i}}function eSe(e){const t=js(e),n=t.documentElement,r=t.body,o=Er(n);let i=0,a=0;const c=Zs.create(),u=typeof CSS<"u"&&CSS.supports?.("scrollbar-gutter","stable");if(b6&&(o.visualViewport?.scale??1)!==1)return()=>{};function f(){const g=o.getComputedStyle(n),b=o.getComputedStyle(r),w=(g.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,a=n.scrollLeft,KP={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},ZP=n.style.scrollBehavior,GP={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const T=n.scrollHeight>n.clientHeight,v=n.scrollWidth>n.clientWidth,_=g.overflowY==="scroll"||b.overflowY==="scroll",S=g.overflowX==="scroll"||b.overflowX==="scroll",C=Math.max(0,o.innerWidth-n.clientWidth),E=Math.max(0,o.innerHeight-n.clientHeight),O=parseFloat(b.marginTop)+parseFloat(b.marginBottom),j=parseFloat(b.marginLeft)+parseFloat(b.marginRight),P=Cc(n)?n:r;if(u){n.style.scrollbarGutter=w,P.style.overflowY="hidden",P.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:w,overflowY:"hidden",overflowX:"hidden"}),(T||_)&&(n.style.overflowY="scroll"),(v||S)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:O||E?`calc(100dvh - ${O+E}px)`:"100dvh",width:j||C?`calc(100vw - ${j+C}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function h(){Object.assign(n.style,KP),Object.assign(r.style,GP),u||(n.scrollTop=i,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=ZP)}function p(){h(),c.request(f)}return f(),o.addEventListener("resize",p),()=>{c.cancel(),h(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",p)}}class tSe{lockCount=0;restore=null;timeoutLock=ol.create();timeoutUnlock=ol.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=js(t).documentElement,o=Er(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=Uo;return}const i=lve||!Q1e(t);this.restore=i?J1e(t):eSe(t)}}const nSe=new tSe;function z2(e=!0,t=null){Xe(()=>{if(e)return nSe.acquire(t)},[e,t])}function rSe(e){const t=A.useRef(""),n=A.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:A.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o&&e(o,o.pointerType),e(o,t.current),t.current=""},[e]),onPointerDown:n}}function L2(e){const[t,n]=A.useState(null),r=Ze((c,u)=>{e||n(u)}),o=A.useCallback(()=>{n(null)},[]),{onClick:i,onPointerDown:a}=rSe(r);return A.useMemo(()=>({openMethod:t,reset:o,triggerProps:{onClick:i,onPointerDown:a}}),[t,o,i,a])}function oSe(e){const{store:t,parentContext:n,actionsRef:r}=e,o=t.useState("open"),i=t.useState("disablePointerDismissal"),a=t.useState("modal"),c=t.useState("popupElement"),{openMethod:u,triggerProps:f,reset:h}=L2(o);i8(t);const{forceUnmount:p}=a8(o,t,()=>{h()}),g=Ze(N=>{const D=Nt(N);return D.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},D}),b=A.useCallback(()=>{t.setOpen(!1,g(g6))},[t,g]);A.useImperativeHandle(r,()=>({unmount:p,close:b}),[p,b]);const y=f8({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[x,w]=A.useState(0),T=x===0,v=h8(y),_=M2(y,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(N){if("button"in N&&N.button!==0||"touches"in N&&N.touches.length!==1)return!1;const D=xo(N);if(T&&!i){const L=D;return a&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===L||t.context.backdropRef.current===L||Yt(L,c)&&!L?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:T});z2(o&&a===!0,c);const{getReferenceProps:S,getFloatingProps:C,getTriggerProps:E}=tv([v,_]);t.useContextCallback("onNestedDialogOpen",N=>{w(N+1)}),t.useContextCallback("onNestedDialogClose",()=>{w(0)}),A.useEffect(()=>(n?.onNestedDialogOpen&&o&&n.onNestedDialogOpen(x),n?.onNestedDialogClose&&!o&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&o&&n.onNestedDialogClose()}),[o,n,x]);const O=A.useMemo(()=>S(f),[S,f]),j=A.useMemo(()=>E(f),[E,f]),P=A.useMemo(()=>C(),[C]);t.useSyncedValues({openMethod:u,activeTriggerProps:O,inactiveTriggerProps:j,popupProps:P,floatingRootContext:y,nestedOpenDialogCount:x})}const sSe={...c8,modal:Je(e=>e.modal),nested:Je(e=>e.nested),nestedOpenDialogCount:Je(e=>e.nestedOpenDialogCount),disablePointerDismissal:Je(e=>e.disablePointerDismissal),openMethod:Je(e=>e.openMethod),descriptionElementId:Je(e=>e.descriptionElementId),titleElementId:Je(e=>e.titleElementId),viewportElement:Je(e=>e.viewportElement),role:Je(e=>e.role)};class iSe extends j2{constructor(t){super(aSe(t),{popupRef:A.createRef(),backdropRef:A.createRef(),internalBackdropRef:A.createRef(),triggerElements:new ev,onOpenChange:void 0,onOpenChangeComplete:void 0},sSe)}setOpen=(t,n)=>{if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&n.trigger==null&&this.state.activeTriggerId!=null&&(n.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,n),n.isCanceled)return;const r={open:t,nativeEvent:n.event,reason:n.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",r);const o={open:t},i=n.trigger?.id??null;(i||t)&&(o.activeTriggerId=i,o.activeTriggerElement=n.trigger??null),this.update(o)}}function aSe(e={}){return{...l8(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function lSe(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:o,onOpenChangeComplete:i,disablePointerDismissal:a=!1,modal:c=!0,actionsRef:u,handle:f,triggerId:h,defaultTriggerId:p=null}=e,g=zf(!0),b=!!g,y=To(()=>f?.store??new iSe({open:n??r,activeTriggerId:h!==void 0?h:p,modal:c,disablePointerDismissal:a,nested:b})).current;y.useControlledProp("open",n,r),y.useControlledProp("activeTriggerId",h,p),y.useSyncedValues({disablePointerDismissal:a,nested:b,modal:c}),y.useContextCallback("onOpenChange",o),y.useContextCallback("onOpenChangeComplete",i);const x=y.useState("payload");oSe({store:y,actionsRef:u,parentContext:g?.store.context});const w=A.useMemo(()=>({store:y}),[y]);return M.jsx(f6.Provider,{value:w,children:typeof t=="function"?t({payload:x}):t})}const cSe=A.forwardRef(function(t,n){const{render:r,className:o,id:i,...a}=t,{store:c}=zf(),u=Uf(i);return c.useSyncedValueWithCleanup("titleElementId",u),Mn("h2",t,{ref:n,props:[{id:u},a]})});function uSe({...e}){return M.jsx(lSe,{"data-slot":"dialog",...e})}function fSe({...e}){return M.jsx(X1e,{"data-slot":"dialog-portal",...e})}function dSe({className:e,...t}){return M.jsx(J0e,{"data-slot":"dialog-overlay",className:Et("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50",e),...t})}function hSe({className:e,children:t,showCloseButton:n=!0,...r}){return M.jsxs(fSe,{children:[M.jsx(dSe,{}),M.jsxs(Y1e,{"data-slot":"dialog-content",className:Et("bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-4 rounded-none p-4 text-xs/relaxed ring-1 duration-100 sm:max-w-sm fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none",e),...r,children:[t,n&&M.jsxs(rve,{"data-slot":"dialog-close",render:M.jsx(Qa,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[M.jsx(nre,{}),M.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function pSe({className:e,...t}){return M.jsx(cSe,{"data-slot":"dialog-title",className:Et("text-sm font-medium",e),...t})}const mSe=()=>{const e=ul(),[t,n]=A.useState(!1);return e._meta&&Object.keys(e._meta).length>0?M.jsxs(M.Fragment,{children:[M.jsxs(Qa,{variant:"ghost",size:"default",onClick:()=>n(!0),"aria-label":"View tool metadata",title:"View tool metadata",children:[M.jsx(Vne,{className:"h-4 w-4"}),"Metadata"]}),M.jsx(uSe,{open:t,onOpenChange:n,children:M.jsxs(hSe,{className:"sm:max-w-2xl",children:[M.jsx(pSe,{children:"Tool Metadata"}),M.jsx("div",{className:"text-xs",children:M.jsx(Y0,{src:e._meta,name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",style:{fontSize:"0.75rem"},collapsed:2,collapseStringsAfterLength:80})})]})})]}):null},gSe={"ui:submitButtonOptions":{norender:!0}},ySe=({schema:e,formData:t,setFormData:n,ref:r})=>!e||!e.properties||Object.keys(e.properties).length===0?M.jsx("div",{className:"flex items-center justify-center h-full",children:M.jsx("p",{className:"text-sm text-muted-foreground",children:"This tool requires no input"})}):M.jsx(_0e,{children:M.jsx(C0e,{children:M.jsx(E0e,{ref:r,schema:e??{},validator:Bhe,uiSchema:gSe,formData:t,onChange:i=>n(i.formData),showErrorList:!1,templates:{FieldTemplate:i=>{const{id:a,classNames:c,style:u,label:f,required:h,errors:p,children:g}=i;return M.jsxs("div",{className:Et("flex flex-col gap-2",c),style:u,children:[M.jsxs("label",{htmlFor:a,className:"text-sm text-foreground",children:[f,h&&M.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),M.jsxs("div",{className:"flex flex-col gap-2",children:[g,p]})]})},FieldErrorTemplate:i=>i.errors&&i.errors.length>0?M.jsx("div",{className:"text-sm text-destructive mt-1 flex items-center gap-1",children:M.jsx("span",{children:i.errors.join(", ")})}):null}})})}),vSe=()=>{const e=A.useRef(null),t=ul(),{setToolData:n}=Cf(),o=Tf(t.name)?.input??{},i=a=>{n(t.name,{input:a??{}})};return M.jsxs("div",{className:Et("flex flex-col h-full overflow-hidden border-r border-border"),children:[M.jsxs("div",{className:"shrink-0 border-b border-border px-6 py-4 flex items-center justify-between h-[72px]",children:[M.jsx("h2",{className:"font-semibold text-foreground",children:t.name}),M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx(mSe,{}),M.jsx(U0e,{validateForm:async()=>e.current===null?!0:await e.current.validateForm(),formData:o})]})]}),M.jsx("div",{className:"flex-1 overflow-auto px-6 py-6 bg-muted/50",children:M.jsx(ySe,{schema:t.inputSchema,formData:o,setFormData:i,ref:e},t.name)})]})},bSe=Wi("rounded-none has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-none flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",{variants:{orientation:{horizontal:"[&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0 [&>[data-slot]]:rounded-r-none",vertical:"flex-col [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0 [&>[data-slot]]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}});function SSe({className:e,orientation:t,...n}){return M.jsx("div",{role:"group","data-slot":"button-group","data-orientation":t,className:Et(bSe({orientation:t}),e),...n})}function wSe({className:e,...t}){return M.jsx("label",{"data-slot":"label",className:Et("gap-2 text-xs leading-none group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed",e),...t})}function xSe({className:e,...t}){return M.jsx("fieldset",{"data-slot":"field-set",className:Et("gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col",e),...t})}const ESe=Wi("data-[invalid=true]:text-destructive gap-2 group/field flex w-full",{variants:{orientation:{vertical:"flex-col [&>*]:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function Ra({className:e,orientation:t="vertical",...n}){return M.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:Et(ESe({orientation:t}),e),...n})}function Oa({className:e,...t}){return M.jsx(wSe,{"data-slot":"field-label",className:Et("has-data-checked:bg-primary/5 has-data-checked:border-primary dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-none has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-2 group/field-label peer/field-label flex w-fit leading-snug","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...t})}let WP=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const _Se={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},F2={valid(e){return e===null?null:e?{[WP.valid]:""}:{[WP.invalid]:""}}},CSe=A.createContext({invalid:void 0,name:void 0,validityData:{state:_Se,errors:[],error:"",value:"",initialValue:null},setValidityData:Uo,disabled:void 0,touched:!1,setTouched:Uo,dirty:!1,setDirty:Uo,filled:!1,setFilled:Uo,focused:!1,setFocused:Uo,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=$r)=>e,getInputValidationProps:(e=$r)=>e,inputRef:{current:null},commit:async()=>{}}});function vc(e=!0){const t=A.useContext(CSe);if(t.setValidityData===Uo&&!e)throw new Error(Jr(28));return t}const TSe=A.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Uo,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function U2(){return A.useContext(TSe)}const RSe=A.createContext({controlId:void 0,setControlId:Uo,labelId:void 0,setLabelId:Uo,messageIds:[],setMessageIds:Uo,getDescriptionProps:e=>e});function Ap(){return A.useContext(RSe)}function OSe(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function Bh({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=A.useRef(e!==void 0),[i,a]=A.useState(t),c=o?e:i,u=A.useCallback(f=>{o||a(f)},[]);return[c,u]}function V2(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,setControlId:i}=Ap(),a=Uf(t);return Xe(()=>{if(!(!n&&!t||i===Uo)){if(n){const c=r?.current;Cn(c)&&c.closest("label")!=null?i(t??null):i(o??a)}else t&&i(t);return()=>{t&&i(void 0)}}},[t,r,o,i,n,a]),o??a}function q2(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:i,commit:a}=e,{formRef:c}=U2(),{invalid:u,markedDirtyRef:f,validityData:h,setValidityData:p}=vc(),g=Ze(e.getValue);Xe(()=>{if(!t)return;let b=n;b===void 0&&(b=g()),h.initialValue===null&&b!==null&&p(y=>({...y,initialValue:b}))},[t,p,n,h.initialValue,g]),Xe(()=>{!t||!r||c.current.fields.set(r,{getValue:g,name:o,controlRef:i,validityData:OSe(h,u),validate(){let b=n;b===void 0&&(b=g()),f.current=!0,Bo.flushSync(()=>a(b))}})},[a,i,t,c,g,r,u,f,o,h,n]),Xe(()=>{const b=c.current.fields;return()=>{r&&b.delete(r)}},[c,r])}const ASe=A.forwardRef(function(t,n){const{render:r,className:o,id:i,name:a,value:c,disabled:u=!1,onValueChange:f,defaultValue:h,...p}=t,{state:g,name:b,disabled:y}=vc(),x=y||u,w=b??a,T=A.useMemo(()=>({...g,disabled:x}),[g,x]),{setTouched:v,setDirty:_,validityData:S,setFocused:C,setFilled:E,validationMode:O,validation:j}=vc(),{labelId:P}=Ap(),N=V2({id:i});Xe(()=>{const Z=c!=null;j.inputRef.current?.value||Z&&c!==""?E(!0):Z&&c===""&&E(!1)},[j.inputRef,E,c]);const[D,L]=Bh({controlled:c,default:h,name:"FieldControl",state:"value"}),U=c!==void 0,X=Ze((Z,q)=>{f?.(Z,q),!q.isCanceled&&L(Z)});return q2({id:N,name:w,commit:j.commit,value:D,getValue:()=>j.inputRef.current?.value,controlRef:j.inputRef}),Mn("input",t,{ref:n,state:T,props:[{id:N,disabled:x,name:w,ref:j.inputRef,"aria-labelledby":P,...U?{value:D}:{defaultValue:h},onChange(Z){const q=Z.currentTarget.value;X(q,Nt(mc,Z.nativeEvent)),_(q!==S.initialValue),E(q!=="")},onFocus(){C(!0)},onBlur(Z){v(!0),C(!1),O==="onBlur"&&j.commit(Z.currentTarget.value)},onKeyDown(Z){Z.currentTarget.tagName==="INPUT"&&Z.key==="Enter"&&(v(!0),j.commit(Z.currentTarget.value))}},j.getInputValidationProps(),p],stateAttributesMapping:F2})}),kSe=A.forwardRef(function(t,n){return M.jsx(ASe,{ref:n,...t})});function QS({className:e,type:t,...n}){return M.jsx(kSe,{type:t,"data-slot":"input",className:Et("dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 h-8 rounded-none border bg-transparent px-2.5 py-1 text-xs transition-colors file:h-6 file:text-xs file:font-medium focus-visible:ring-1 aria-invalid:ring-1 md:text-xs file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",e),...n})}function MSe(e){const t=A.useRef(!0);t.current&&(t.current=!1,e())}const v8=A.createContext(null),b8=A.createContext(null);function fi(){const e=A.useContext(v8);if(e===null)throw new Error(Jr(60));return e}function S8(){const e=A.useContext(b8);if(e===null)throw new Error(Jr(61));return e}const jSe=(e,t)=>Object.is(e,t);function bf(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function JS(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:bf(r,t,n))}function qx(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:bf(r,t,n))}function PSe(e,t,n){return e.filter(r=>!bf(r,t,n))}function Bx(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function NSe(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function oh(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return Bx(e)}function Ru(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Bx(e.value):Bx(e)}function DSe(e,t,n){if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??oh(e,n);if(Array.isArray(t)){const r=NSe(t)?t.flatMap(o=>o.items):t;if(e==null){const o=r.find(i=>i.value==null);return o&&o.label!=null?o.label:oh(e,n)}if(typeof e!="object"){const o=r.find(i=>i&&i.value===e);return o&&o.label!=null?o.label:oh(e,n)}if("value"in e){const o=r.find(i=>i&&i.value===e.value);if(o&&o.label!=null)return o.label}}return oh(e,n)}function $Se(e,t){return!Array.isArray(e)||e.length===0?"":e.map(n=>oh(n,t)).join(", ")}const vt={id:Je(e=>e.id),modal:Je(e=>e.modal),multiple:Je(e=>e.multiple),items:Je(e=>e.items),itemToStringLabel:Je(e=>e.itemToStringLabel),itemToStringValue:Je(e=>e.itemToStringValue),isItemEqualToValue:Je(e=>e.isItemEqualToValue),value:Je(e=>e.value),open:Je(e=>e.open),mounted:Je(e=>e.mounted),forceMount:Je(e=>e.forceMount),transitionStatus:Je(e=>e.transitionStatus),openMethod:Je(e=>e.openMethod),activeIndex:Je(e=>e.activeIndex),selectedIndex:Je(e=>e.selectedIndex),isActive:Je((e,t)=>e.activeIndex===t),isSelected:Je((e,t,n)=>{const r=e.isItemEqualToValue,o=e.value;return e.multiple?Array.isArray(o)&&o.some(i=>bf(i,n,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:bf(o,n,r)}),isSelectedByFocus:Je((e,t)=>e.selectedIndex===t),popupProps:Je(e=>e.popupProps),triggerProps:Je(e=>e.triggerProps),triggerElement:Je(e=>e.triggerElement),positionerElement:Je(e=>e.positionerElement),listElement:Je(e=>e.listElement),scrollUpArrowVisible:Je(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:Je(e=>e.scrollDownArrowVisible),hasScrollArrows:Je(e=>e.hasScrollArrows),serializedValue:Je(e=>{const{multiple:t,value:n,itemToStringValue:r}=e;return t&&Array.isArray(n)&&n.length===0?"":Ru(n,r)})};function w8(e,t){const n=A.useRef(e),r=Ze(t);Xe(()=>{n.current!==e&&r(n.current)},[e,r]),Xe(()=>{n.current=e},[e])}function ISe(e){const{id:t,value:n,defaultValue:r=null,onValueChange:o,open:i,defaultOpen:a=!1,onOpenChange:c,name:u,disabled:f=!1,readOnly:h=!1,required:p=!1,modal:g=!0,actionsRef:b,inputRef:y,onOpenChangeComplete:x,items:w,multiple:T=!1,itemToStringLabel:v,itemToStringValue:_,isItemEqualToValue:S=jSe,highlightItemOnHover:C=!0,children:E}=e,{clearErrors:O}=U2(),{setDirty:j,shouldValidateOnChange:P,validityData:N,setFilled:D,name:L,disabled:U,validation:X}=vc(),{controlId:Q}=Ap(),Z=V2({id:t}),q=U||f,G=L??u,[oe,ne]=Bh({controlled:n,default:T?r??af:r,name:"Select",state:"value"}),[$,F]=Bh({controlled:i,default:a,name:"Select",state:"open"}),V=A.useRef([]),I=A.useRef([]),K=A.useRef(null),te=A.useRef(null),re=A.useRef(0),ie=A.useRef(null),me=A.useRef([]),Ce=A.useRef(!1),ee=A.useRef(!1),se=A.useRef(null),de=A.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),Ee=A.useRef(!1),{mounted:Re,setMounted:we,transitionStatus:$e}=J0($),{openMethod:We,triggerProps:ye,reset:Fe}=L2($),Oe=To(()=>new Yu({id:Z,modal:g,multiple:T,itemToStringLabel:v,itemToStringValue:_,isItemEqualToValue:S,value:oe,open:$,mounted:Re,transitionStatus:$e,items:w,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Ye=xt(Oe,vt.activeIndex),ze=xt(Oe,vt.selectedIndex),Le=xt(Oe,vt.triggerElement),Ue=xt(Oe,vt.positionerElement),ht=A.useMemo(()=>T&&Array.isArray(oe)&&oe.length===0?"":Ru(oe,_),[T,oe,_]),Te=A.useMemo(()=>T&&Array.isArray(oe)?oe.map(dt=>Ru(dt,_)):Ru(oe,_),[T,oe,_]),pe=Sr(Oe.state.triggerElement);q2({id:Z,commit:X.commit,value:oe,controlRef:pe,name:G,getValue:()=>Te});const Ne=A.useRef(oe);Xe(()=>{oe!==Ne.current&&Oe.set("forceMount",!0)},[Oe,oe]),Xe(()=>{D(oe!==null)},[oe,D]),Xe(function(){if($)return;const tn=me.current;if(T){const Rn=Array.isArray(oe)?oe:[];if(Rn.length===0){Oe.set("selectedIndex",null);return}const Kn=Rn[Rn.length-1],un=qx(tn,Kn,S);Oe.set("selectedIndex",un===-1?null:un);return}const yn=qx(tn,oe,S);Oe.set("selectedIndex",yn===-1?null:yn)},[T,$,oe,me,S,Oe]),w8(oe,()=>{O(G),j(oe!==N.initialValue),P()?X.commit(oe):X.commit(oe,!0)});const Be=Ze((dt,tn)=>{if(c?.(dt,tn),!tn.isCanceled&&(F(dt),!dt&&Oe.state.activeIndex!==null)){const yn=V.current[Oe.state.activeIndex];queueMicrotask(()=>{yn?.setAttribute("tabindex","-1")})}}),at=Ze(()=>{we(!1),Oe.set("activeIndex",null),Fe(),x?.(!1)});jc({enabled:!b,open:$,ref:K,onComplete(){$||at()}}),A.useImperativeHandle(b,()=>({unmount:at}),[at]);const bt=Ze((dt,tn)=>{o?.(dt,tn),!tn.isCanceled&&ne(dt)}),St=Ze(()=>{const dt=Oe.state.listElement||K.current;if(!dt)return;const tn=dt.scrollTop,yn=dt.scrollTop+dt.clientHeight,Rn=tn>1,Kn=yn<dt.scrollHeight-1;Oe.state.scrollUpArrowVisible!==Rn&&Oe.set("scrollUpArrowVisible",Rn),Oe.state.scrollDownArrowVisible!==Kn&&Oe.set("scrollDownArrowVisible",Kn)}),mt=u8({open:$,onOpenChange:Be,elements:{reference:Le,floating:Ue}}),ln=Z6(mt,{enabled:!h&&!q,event:"mousedown"}),Kt=M2(mt,{bubbles:!1}),Ot=j1e(mt,{enabled:!h&&!q,listRef:V,activeIndex:Ye,selectedIndex:ze,disabledIndices:af,onNavigate(dt){dt===null&&!$||Oe.set("activeIndex",dt)},focusItemOnHover:!1}),Jt=N1e(mt,{enabled:!h&&!q&&($||!T),listRef:I,activeIndex:Ye,selectedIndex:ze,onMatch(dt){$?Oe.set("activeIndex",dt):bt(me.current[dt],Nt("none"))},onTypingChange(dt){Ce.current=dt}}),{getReferenceProps:$t,getFloatingProps:Gt,getItemProps:cn}=tv([ln,Kt,Ot,Jt]),wn=A.useMemo(()=>fp($t(),ye),[$t,ye]);MSe(()=>{Oe.update({popupProps:Gt(),triggerProps:wn})}),Xe(()=>{Oe.update({id:Z,modal:g,multiple:T,value:oe,open:$,mounted:Re,transitionStatus:$e,popupProps:Gt(),triggerProps:wn,items:w,itemToStringLabel:v,itemToStringValue:_,isItemEqualToValue:S,openMethod:We})},[Oe,Z,g,T,oe,$,Re,$e,Gt,wn,w,v,_,S,We]);const yt=A.useMemo(()=>({store:Oe,name:G,required:p,disabled:q,readOnly:h,multiple:T,itemToStringLabel:v,itemToStringValue:_,highlightItemOnHover:C,setValue:bt,setOpen:Be,listRef:V,popupRef:K,scrollHandlerRef:te,handleScrollArrowVisibility:St,scrollArrowsMountedCountRef:re,getItemProps:cn,events:mt.context.events,valueRef:ie,valuesRef:me,labelsRef:I,typingRef:Ce,selectionRef:de,selectedItemTextRef:se,validation:X,onOpenChangeComplete:x,keyboardActiveRef:ee,alignItemWithTriggerActiveRef:Ee,initialValueRef:Ne}),[Oe,G,p,q,h,T,v,_,C,bt,Be,cn,mt.context.events,X,x,St]),en=Ui(y,X.inputRef),It=T&&Array.isArray(oe)&&oe.length>0,Hn=A.useMemo(()=>!T||!Array.isArray(oe)||!G?null:oe.map(dt=>{const tn=Ru(dt,_);return M.jsx("input",{type:"hidden",name:G,value:tn},tn)}),[T,oe,G,_]);return M.jsx(v8.Provider,{value:yt,children:M.jsxs(b8.Provider,{value:mt,children:[E,M.jsx("input",{...X.getInputValidationProps({onFocus(){Oe.state.triggerElement?.focus()},onChange(dt){if(dt.nativeEvent.defaultPrevented)return;const tn=dt.target.value,yn=Nt(mc,dt.nativeEvent);function Rn(){if(T)return;const Kn=me.current.find(un=>Ru(un,_).toLowerCase()===tn.toLowerCase());Kn!=null&&(j(Kn!==N.initialValue),bt(Kn,yn),P()&&X.commit(Kn))}Oe.set("forceMount",!0),queueMicrotask(Rn)}}),id:t||Q||void 0,name:T?void 0:G,value:ht,disabled:q,required:p&&!It,readOnly:h,ref:en,style:X0,tabIndex:-1,"aria-hidden":!0}),Hn]})})}function zSe(e){const t=e.getBoundingClientRect(),n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||r.content!=="none"))return t;const i=parseFloat(n.width)||0,a=parseFloat(n.height)||0,c=parseFloat(r.width)||0,u=parseFloat(r.height)||0,f=Math.max(t.width,i,c),h=Math.max(t.height,a,u),p=f-t.width,g=h-t.height;return{left:t.left-p/2,right:t.right+p/2,top:t.top-g/2,bottom:t.bottom+g/2}}const ny=2,LSe={...h6,...F2,value:()=>null},FSe=A.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:a=!0,...c}=t,{setTouched:u,setFocused:f,validationMode:h,state:p,disabled:g}=vc(),{labelId:b}=Ap(),{store:y,setOpen:x,selectionRef:w,validation:T,readOnly:v,alignItemWithTriggerActiveRef:_,disabled:S,keyboardActiveRef:C}=fi(),E=g||S||i,O=xt(y,vt.open),j=xt(y,vt.value),P=xt(y,vt.triggerProps),N=xt(y,vt.positionerElement),D=xt(y,vt.listElement),L=xt(y,vt.serializedValue),U=Sr(N),X=A.useRef(null),Q=go(),Z=go(),{getButtonProps:q,buttonRef:G}=Tc({disabled:E,native:a}),oe=Ze(te=>{y.set("triggerElement",te)}),ne=Ui(n,X,G,oe),$=go(),F=go();A.useEffect(()=>{if(O)return F.start(200,()=>{w.current.allowUnselectedMouseUp=!0,$.start(200,()=>{w.current.allowSelectedMouseUp=!0})}),()=>{$.clear(),F.clear()};w.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},Z.clear()},[O,w,Z,$,F]);const V=A.useMemo(()=>D?.id??Lh(N)?.id,[D,N]),I=fp(P,{role:"combobox","aria-expanded":O?"true":"false","aria-haspopup":"listbox","aria-controls":O?V:void 0,"aria-labelledby":b,"aria-readonly":v||void 0,tabIndex:E?-1:0,ref:ne,onFocus(te){f(!0),O&&_.current&&x(!1,Nt(gc,te.nativeEvent)),Q.start(0,()=>{y.set("forceMount",!0)})},onBlur(){u(!0),f(!1),h==="onBlur"&&T.commit(j)},onPointerMove(){C.current=!1},onKeyDown(){C.current=!0},onMouseDown(te){if(O)return;const re=js(te.currentTarget);function ie(me){if(!X.current)return;const Ce=me.target;if(Yt(X.current,Ce)||Yt(U.current,Ce)||Ce===X.current)return;const ee=zSe(X.current);me.clientX>=ee.left-ny&&me.clientX<=ee.right+ny&&me.clientY>=ee.top-ny&&me.clientY<=ee.bottom+ny||x(!1,Nt(tve,me))}Z.start(0,()=>{re.addEventListener("mouseup",ie,{once:!0})})}},T.getValidationProps,c,q);I.role="combobox";const K=A.useMemo(()=>({...p,open:O,disabled:E,value:j,readOnly:v,placeholder:!L}),[p,O,E,j,v,L]);return Mn("button",t,{ref:[n,X],state:K,stateAttributesMapping:LSe,props:I})}),USe={value:()=>null},VSe=A.forwardRef(function(t,n){const{className:r,render:o,children:i,...a}=t,{store:c,valueRef:u}=fi(),f=xt(c,vt.value),h=xt(c,vt.items),p=xt(c,vt.itemToStringLabel),g=xt(c,vt.serializedValue),b=A.useMemo(()=>({value:f,placeholder:!g}),[f,g]),y=typeof i=="function"?i(f):i??(Array.isArray(f)?$Se(f,p):DSe(f,h,p));return Mn("span",t,{state:b,ref:[n,u],props:[{children:y},a],stateAttributesMapping:USe})}),qSe=A.forwardRef(function(t,n){const{className:r,render:o,...i}=t,{store:a}=fi(),c=xt(a,vt.open),u=A.useMemo(()=>({open:c}),[c]);return Mn("span",t,{state:u,ref:n,props:[{"aria-hidden":!0,children:"▼"},i],stateAttributesMapping:d6})}),BSe=A.createContext(void 0),HSe=A.forwardRef(function(t,n){const{store:r}=fi(),o=xt(r,vt.mounted),i=xt(r,vt.forceMount);return o||i?M.jsx(BSe.Provider,{value:!0,children:M.jsx(R2,{ref:n,...t})}):null}),x8=A.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function KSe(){return A.useContext(x8)}function B2(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=Ze(o),a=A.useRef(0),c=To(ZSe).current,u=To(GSe).current,[f,h]=A.useState(0),p=A.useRef(f),g=Ze((T,v)=>{u.set(T,v??null),p.current+=1,h(p.current)}),b=Ze(T=>{u.delete(T),p.current+=1,h(p.current)}),y=A.useMemo(()=>{const T=new Map;return Array.from(u.keys()).filter(_=>_.isConnected).sort(WSe).forEach((_,S)=>{const C=u.get(_)??{};T.set(_,{...C,index:S})}),T},[u,f]);Xe(()=>{if(typeof MutationObserver!="function"||y.size===0)return;const T=new MutationObserver(v=>{const _=new Set,S=C=>_.has(C)?_.delete(C):_.add(C);v.forEach(C=>{C.removedNodes.forEach(S),C.addedNodes.forEach(S)}),_.size===0&&(p.current+=1,h(p.current))});return y.forEach((v,_)=>{_.parentElement&&T.observe(_.parentElement,{childList:!0})}),()=>{T.disconnect()}},[y]),Xe(()=>{p.current===f&&(n.current.length!==y.size&&(n.current.length=y.size),r&&r.current.length!==y.size&&(r.current.length=y.size),a.current=y.size),i(y)},[i,y,n,r,f]),Xe(()=>()=>{n.current=[]},[n]),Xe(()=>()=>{r&&(r.current=[])},[r]);const x=Ze(T=>(c.add(T),()=>{c.delete(T)}));Xe(()=>{c.forEach(T=>T(y))},[c,y]);const w=A.useMemo(()=>({register:g,unregister:b,subscribeMapChange:x,elementsRef:n,labelsRef:r,nextIndexRef:a}),[g,b,x,n,r,a]);return M.jsx(x8.Provider,{value:w,children:t})}function GSe(){return new Map}function ZSe(){return new Set}function WSe(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const YSe=A.createContext(void 0);function rv(){return A.useContext(YSe)?.direction??"ltr"}const XSe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:c,middlewareData:u}=t,{element:f,padding:h=0,offsetParent:p="real"}=Bi(e,t)||{};if(f==null)return{};const g=R6(h),b={x:n,y:r},y=C2(o),x=_2(y),w=await a.getDimensions(f),T=y==="y",v=T?"top":"left",_=T?"bottom":"right",S=T?"clientHeight":"clientWidth",C=i.reference[x]+i.reference[y]-b[y]-i.floating[x],E=b[y]-i.reference[y],O=p==="real"?await a.getOffsetParent?.(f):c.floating;let j=c.floating[S]||i.floating[x];(!j||!await a.isElement?.(O))&&(j=c.floating[S]||i.floating[x]);const P=C/2-E/2,N=j/2-w[x]/2-1,D=Math.min(g[v],N),L=Math.min(g[_],N),U=D,X=j-w[x]-L,Q=j/2-w[x]/2+P,Z=Ix(U,Q,X),q=!u.arrow&&hl(o)!=null&&Q!==Z&&i.reference[x]/2-(Q<U?D:L)-w[x]/2<0,G=q?Q<U?Q-U:Q-X:0;return{[y]:b[y]+G,data:{[y]:Z,centerOffset:Q-Z-G,...q&&{alignmentOffset:G}},reset:q}}}),QSe=(e,t)=>({...XSe(e),options:[e,t]}),JSe={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,i=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:(await Bbe().fn(e)).data?.referenceHidden||i}}}},_y={sideX:"left",sideY:"top"},ewe={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:o},platform:i,strategy:a,placement:c}=e,u=Er(o),f=u.getComputedStyle(o);if(!(f.transitionDuration!=="0s"&&f.transitionDuration!==""))return{x:t,y:n,data:_y};const p=await i.getOffsetParent?.(o);let g={width:0,height:0};if(a==="fixed"&&u?.visualViewport)g={width:u.visualViewport.width,height:u.visualViewport.height};else if(p===u){const v=js(o);g={width:v.documentElement.clientWidth,height:v.documentElement.clientHeight}}else await i.isElement?.(p)&&(g=await i.getDimensions(p));const b=_o(c);let y=t,x=n;b==="left"&&(y=g.width-(t+r.width)),b==="top"&&(x=g.height-(n+r.height));const w=b==="left"?"right":_y.sideX,T=b==="top"?"bottom":_y.sideY;return{x:y,y:x,data:{sideX:w,sideY:T}}}};function E8(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function YP(e,t,n){const{rects:r,placement:o}=e;return{side:E8(t,_o(o),n),align:hl(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function _8(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,collisionBoundary:c,collisionPadding:u=5,sticky:f=!1,arrowPadding:h=5,disableAnchorTracking:p=!1,keepMounted:g=!1,floatingRootContext:b,mounted:y,collisionAvoidance:x,shiftCrossAxis:w=!1,nodeId:T,adaptiveOrigin:v,lazyFlip:_=!1,externalTree:S}=e,[C,E]=A.useState(null);!y&&C!==null&&E(null);const O=x.side||"flip",j=x.align||"flip",P=x.fallbackAxisSide||"end",N=typeof t=="function"?t:void 0,D=Ze(N),L=N?D:t,U=Sr(t),Q=rv()==="rtl",Z=C||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":Q?"left":"right","inline-start":Q?"right":"left"}[r],q=i==="center"?Z:`${Z}-${i}`;let G=u;const oe=1,ne=r==="bottom"?oe:0,$=r==="top"?oe:0,F=r==="right"?oe:0,V=r==="left"?oe:0;typeof G=="number"?G={top:G+ne,right:G+V,bottom:G+$,left:G+F}:G&&(G={top:(G.top||0)+ne,right:(G.right||0)+V,bottom:(G.bottom||0)+$,left:(G.left||0)+F});const I={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:G},K=A.useRef(null),te=Sr(o),re=Sr(a),Ce=[Lbe(Ot=>{const Jt=YP(Ot,r,Q),$t=typeof te.current=="function"?te.current(Jt):te.current,Gt=typeof re.current=="function"?re.current(Jt):re.current;return{mainAxis:$t,crossAxis:Gt,alignmentAxis:Gt}},[typeof o!="function"?o:0,typeof a!="function"?a:0,Q,r])],ee=j==="none"&&O!=="shift",se=!ee&&(f||w||O==="shift"),de=O==="none"?null:Vbe({...I,padding:{top:G.top+oe,right:G.right+oe,bottom:G.bottom+oe,left:G.left+oe},mainAxis:!w&&O==="flip",crossAxis:j==="flip"?"alignment":!1,fallbackAxisSideDirection:P}),Ee=ee?null:Fbe(Ot=>{const Jt=js(Ot.elements.floating).documentElement;return{...I,rootBoundary:w?{x:0,y:0,width:Jt.clientWidth,height:Jt.clientHeight}:void 0,mainAxis:j!=="none",crossAxis:se,limiter:f||w?void 0:Ube($t=>{if(!K.current)return{};const{width:Gt,height:cn}=K.current.getBoundingClientRect(),wn=us(_o($t.placement)),yt=wn==="y"?Gt:cn,en=wn==="y"?G.left+G.right:G.top+G.bottom;return{offset:yt/2+en/2}})}},[I,f,w,G,j]);O==="shift"||j==="shift"||i==="center"?Ce.push(Ee,de):Ce.push(de,Ee),Ce.push(qbe({...I,apply({elements:{floating:Ot},rects:{reference:Jt},availableWidth:$t,availableHeight:Gt}){Object.entries({"--available-width":`${$t}px`,"--available-height":`${Gt}px`,"--anchor-width":`${Jt.width}px`,"--anchor-height":`${Jt.height}px`}).forEach(([cn,wn])=>{Ot.style.setProperty(cn,wn)})}}),QSe(()=>({element:K.current||document.createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(Ot){const{elements:Jt,middlewareData:$t,placement:Gt,rects:cn,y:wn}=Ot,yt=_o(Gt),en=us(yt),It=K.current,Hn=$t.arrow?.x||0,dt=$t.arrow?.y||0,tn=It?.clientWidth||0,yn=It?.clientHeight||0,Rn=Hn+tn/2,Kn=dt+yn/2,un=Math.abs($t.shift?.y||0),ir=cn.reference.height/2,Lt=typeof o=="function"?o(YP(Ot,r,Q)):o,jr=un>Lt,ar={top:`${Rn}px calc(100% + ${Lt}px)`,bottom:`${Rn}px ${-Lt}px`,left:`calc(100% + ${Lt}px) ${Kn}px`,right:`${-Lt}px ${Kn}px`}[yt],oo=`${Rn}px ${cn.reference.y+ir-wn}px`;return Jt.floating.style.setProperty("--transform-origin",se&&en==="y"&&jr?oo:ar),{}}},JSe,v),Xe(()=>{!y&&b&&b.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[y,b]);const Re=A.useMemo(()=>({elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:we,elements:$e,x:We,y:ye,middlewareData:Fe,update:Oe,placement:Ye,context:ze,isPositioned:Le,floatingStyles:Ue}=w1e({rootContext:b,placement:q,middleware:Ce,strategy:n,whileElementsMounted:g?void 0:(...Ot)=>PP(...Ot,Re),nodeId:T,externalTree:S}),{sideX:ht,sideY:Te}=Fe.adaptiveOrigin||_y,pe=Le?n:"fixed",Ne=A.useMemo(()=>v?{position:pe,[ht]:We,[Te]:ye}:{position:pe,...Ue},[v,pe,ht,We,Te,ye,Ue]),Be=A.useRef(null);Xe(()=>{if(!y)return;const Ot=U.current,Jt=typeof Ot=="function"?Ot():Ot,Gt=(XP(Jt)?Jt.current:Jt)||null||null;Gt!==Be.current&&(we.setPositionReference(Gt),Be.current=Gt)},[y,we,L,U]),A.useEffect(()=>{if(!y)return;const Ot=U.current;typeof Ot!="function"&&XP(Ot)&&Ot.current!==Be.current&&(we.setPositionReference(Ot.current),Be.current=Ot.current)},[y,we,L,U]),A.useEffect(()=>{if(g&&y&&$e.domReference&&$e.floating)return PP($e.domReference,$e.floating,Oe,Re)},[g,y,$e,Oe,Re]);const at=_o(Ye),bt=E8(r,at,Q),St=hl(Ye)||"center",mt=!!Fe.hide?.referenceHidden;Xe(()=>{_&&y&&Le&&E(at)},[_,y,Le,at]);const ln=A.useMemo(()=>({position:"absolute",top:Fe.arrow?.y,left:Fe.arrow?.x}),[Fe.arrow]),Kt=Fe.arrow?.centerOffset!==0;return A.useMemo(()=>({positionerStyles:Ne,arrowStyles:ln,arrowRef:K,arrowUncentered:Kt,side:bt,align:St,physicalSide:at,anchorHidden:mt,refs:we,context:ze,isPositioned:Le,update:Oe}),[Ne,ln,K,Kt,bt,St,at,mt,we,ze,Le,Oe])}function XP(e){return e!=null&&"current"in e}const C8=A.createContext(void 0);function H2(){const e=A.useContext(C8);if(!e)throw new Error(Jr(59));return e}function u0(e,t){e&&Object.assign(e.style,t)}const T8={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},twe={position:"fixed"},nwe=A.forwardRef(function(t,n){const{anchor:r,positionMethod:o="absolute",className:i,render:a,side:c="bottom",align:u="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:p="clipping-ancestors",collisionPadding:g,arrowPadding:b=5,sticky:y=!1,disableAnchorTracking:x,alignItemWithTrigger:w=!0,collisionAvoidance:T=jre,...v}=t,{store:_,listRef:S,labelsRef:C,alignItemWithTriggerActiveRef:E,selectedItemTextRef:O,valuesRef:j,initialValueRef:P,popupRef:N,setValue:D}=fi(),L=S8(),U=xt(_,vt.open),X=xt(_,vt.mounted),Q=xt(_,vt.modal),Z=xt(_,vt.value),q=xt(_,vt.openMethod),G=xt(_,vt.positionerElement),oe=xt(_,vt.triggerElement),ne=xt(_,vt.isItemEqualToValue),$=A.useRef(null),F=A.useRef(null),[V,I]=A.useState(w),K=X&&V&&q!=="touch";!X&&V!==w&&I(w),Xe(()=>{X||(vt.scrollUpArrowVisible(_.state)&&_.set("scrollUpArrowVisible",!1),vt.scrollDownArrowVisible(_.state)&&_.set("scrollDownArrowVisible",!1))},[_,X]),A.useImperativeHandle(E,()=>K),z2((K||Q)&&U&&q!=="touch",oe);const te=_8({anchor:r,floatingRootContext:L,positionMethod:o,mounted:X,side:c,sideOffset:f,align:u,alignOffset:h,arrowPadding:b,collisionBoundary:p,collisionPadding:g,sticky:y,disableAnchorTracking:x??K,collisionAvoidance:T,keepMounted:!0}),re=K?"none":te.side,ie=K?twe:te.positionerStyles,me=A.useMemo(()=>{const we={};return U||(we.pointerEvents="none"),{role:"presentation",hidden:!X,style:{...ie,...we}}},[U,X,ie]),Ce=A.useMemo(()=>({open:U,side:re,align:te.align,anchorHidden:te.anchorHidden}),[U,re,te.align,te.anchorHidden]),ee=Ze(we=>{_.set("positionerElement",we)}),se=Mn("div",t,{ref:[n,ee],state:Ce,stateAttributesMapping:Lf,props:[me,v]}),de=A.useRef(0),Ee=Ze(we=>{if(we.size===0&&de.current===0||j.current.length===0)return;const $e=de.current;if(de.current=we.size,we.size===$e)return;const We=Nt(mc);if($e!==0&&!_.state.multiple&&Z!==null&&qx(j.current,Z,ne)===-1){const Fe=P.current,Ye=Fe!=null&&JS(j.current,Fe,ne)?Fe:null;D(Ye,We),Ye===null&&(_.set("selectedIndex",null),O.current=null)}if($e!==0&&_.state.multiple&&Array.isArray(Z)){const ye=Z.filter(Fe=>JS(j.current,Fe,ne));(ye.length!==Z.length||ye.some(Fe=>!JS(Z,Fe,ne)))&&(D(ye,We),ye.length===0&&(_.set("selectedIndex",null),O.current=null))}if(U&&K){_.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const ye={height:""};u0(G,ye),u0(N.current,ye)}}),Re=A.useMemo(()=>({...te,side:re,alignItemWithTriggerActive:K,setControlledAlignItemWithTrigger:I,scrollUpArrowRef:$,scrollDownArrowRef:F}),[te,re,K,I]);return M.jsx(B2,{elementsRef:S,labelsRef:C,onMapChange:Ee,children:M.jsxs(C8.Provider,{value:Re,children:[X&&Q&&M.jsx(I2,{inert:$2(!U),cutout:oe}),se]})})});function R8(e){const t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}const ry="base-ui-disable-scrollbar",Hx={className:ry,element:M.jsx("style",{href:ry,precedence:"base-ui:low",children:`.${ry}{scrollbar-width:none}.${ry}::-webkit-scrollbar{display:none}`})},rwe=A.createContext(void 0);function O8(e){return A.useContext(rwe)}function K2(e){return e==="starting"?Mre:$r}const owe={...Lf,...Ep},swe=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{store:a,popupRef:c,onOpenChangeComplete:u,setOpen:f,valueRef:h,selectedItemTextRef:p,keyboardActiveRef:g,multiple:b,handleScrollArrowVisibility:y,scrollHandlerRef:x}=fi(),{side:w,align:T,alignItemWithTriggerActive:v,setControlledAlignItemWithTrigger:_,scrollDownArrowRef:S,scrollUpArrowRef:C}=H2(),E=O8()!=null,O=S8(),j=go(),P=xt(a,vt.id),N=xt(a,vt.open),D=xt(a,vt.mounted),L=xt(a,vt.popupProps),U=xt(a,vt.transitionStatus),X=xt(a,vt.triggerElement),Q=xt(a,vt.positionerElement),Z=xt(a,vt.listElement),q=A.useRef(0),G=A.useRef(!1),oe=A.useRef(0),ne=A.useRef(!1),$=A.useRef({}),F=Tp(),V=Ze(re=>{if(!Q||!c.current||!ne.current)return;if(G.current||!v){y();return}const ie=Q.style.top==="0px",me=Q.style.bottom==="0px",Ce=Q.getBoundingClientRect().height,ee=js(Q),se=getComputedStyle(Q),de=parseFloat(se.marginTop),Ee=parseFloat(se.marginBottom),Re=ee.documentElement.clientHeight-de-Ee,we=re.scrollTop,$e=re.scrollHeight,We=re.clientHeight,ye=$e-We;let Fe=null,Oe=null,Ye=!1;if(ie){const ze=ye-we,Le=Ce+ze,Ue=Math.min(Le,Re);Fe=Ue,Ue!==Re?Oe=ye:Ye=!0}else if(me){const ze=we-0,Le=Ce+ze,Ue=Math.min(Le,Re),ht=Le-Re;Fe=Ue,Ue!==Re?Oe=0:(Ye=!0,we<ye&&(Oe=we-(ze-ht)))}Fe!=null&&(Q.style.height=`${Fe}px`),Oe!=null&&(re.scrollTop=Oe),Ye&&(G.current=!0),y()});A.useImperativeHandle(x,()=>V,[V]),jc({open:N,ref:c,onComplete(){N&&u?.(!0)}});const I=A.useMemo(()=>({open:N,transitionStatus:U,side:w,align:T}),[N,U,w,T]);Xe(()=>{!Q||!c.current||Object.keys($.current).length||($.current={top:Q.style.top||"0",left:Q.style.left||"0",right:Q.style.right,height:Q.style.height,bottom:Q.style.bottom,minHeight:Q.style.minHeight,maxHeight:Q.style.maxHeight,marginTop:Q.style.marginTop,marginBottom:Q.style.marginBottom})},[c,Q]),Xe(()=>{D||v||(ne.current=!1,G.current=!1,q.current=0,oe.current=0,u0(Q,$.current))},[D,v,Q,c]),Xe(()=>{const re=c.current;if(!(!D||!X||!Q||!re)){if(!v){ne.current=!0,F.request(y);return}queueMicrotask(()=>{const ie=getComputedStyle(Q),me=getComputedStyle(re),Ce=js(X),ee=Er(Q),se=X.getBoundingClientRect(),de=Q.getBoundingClientRect(),Ee=se.left,Re=se.height,we=Z||re,$e=we.scrollHeight,We=parseFloat(me.borderBottomWidth),ye=parseFloat(ie.marginTop)||10,Fe=parseFloat(ie.marginBottom)||10,Oe=parseFloat(ie.minHeight)||100,Ye=5,ze=5,Le=20,Ue=Ce.documentElement.clientHeight-ye-Fe,ht=Ce.documentElement.clientWidth,Te=Ue-se.bottom+Re,pe=p.current,Ne=h.current;let Be=0,at=0;if(pe&&Ne){const yt=Ne.getBoundingClientRect(),en=pe.getBoundingClientRect(),It=yt.left-Ee,Hn=en.left-de.left,dt=yt.top-se.top+yt.height/2,tn=en.top-de.top+en.height/2;Be=It-Hn,at=tn-dt}const bt=Te+at+Fe+We;let St=Math.min(Ue,bt);const mt=Ue-ye-Fe,ln=bt-St,Kt=Math.max(Ye,Ee+Be),Ot=ht-ze,Jt=Math.max(0,Kt+de.width-Ot);Q.style.left=`${Kt-Jt}px`,Q.style.height=`${St}px`,Q.style.maxHeight="auto",Q.style.marginTop=`${ye}px`,Q.style.marginBottom=`${Fe}px`,re.style.height="100%";const $t=we.scrollHeight-we.clientHeight,Gt=ln>=$t;Gt&&(St=Math.min(Ue,de.height)-(ln-$t));const cn=se.top<Le||se.bottom>Ue-Le||St<Math.min($e,Oe),wn=(ee.visualViewport?.scale??1)!==1&&b6;if(cn||wn){ne.current=!0,u0(Q,$.current),Bo.flushSync(()=>_(!1));return}if(Gt){const yt=Math.max(0,Ue-bt);Q.style.top=de.height>=mt?"0":`${yt}px`,Q.style.height=`${St}px`,we.scrollTop=we.scrollHeight-we.clientHeight,q.current=Math.max(Oe,St)}else Q.style.bottom="0",q.current=Math.max(Oe,St),we.scrollTop=ln;q.current===Ue&&(G.current=!0),y(),setTimeout(()=>{ne.current=!0})})}},[a,D,Q,X,h,p,c,y,v,_,F,S,C,Z]),A.useEffect(()=>{if(!v||!Q||!D)return;const re=Er(Q);function ie(me){f(!1,Nt(nve,me))}return re.addEventListener("resize",ie),()=>{re.removeEventListener("resize",ie)}},[f,v,Q,D]);const K={...Z?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":b||void 0,id:`${P}-list`},onKeyDown(re){g.current=!0,E&&D2.has(re.key)&&re.stopPropagation()},onMouseMove(){g.current=!1},onPointerLeave(re){if(R8(re)||re.pointerType==="touch")return;const ie=re.currentTarget;j.start(0,()=>{a.set("activeIndex",null),ie.focus({preventScroll:!0})})},onScroll(re){Z||x.current?.(re.currentTarget)},...v&&{style:Z?{height:"100%"}:T8}},te=Mn("div",t,{ref:[n,c],state:I,stateAttributesMapping:owe,props:[L,K,K2(U),{className:!Z&&v?Hx.className:void 0},i]});return M.jsxs(A.Fragment,{children:[Hx.element,M.jsx(A2,{context:O,modal:!1,disabled:!D,restoreFocus:!0,children:te})]})}),iwe=A.forwardRef(function(t,n){const{className:r,render:o,...i}=t,{store:a,scrollHandlerRef:c}=fi(),{alignItemWithTriggerActive:u}=H2(),f=xt(a,vt.hasScrollArrows),h=xt(a,vt.openMethod),p=xt(a,vt.multiple),b={id:`${xt(a,vt.id)}-list`,role:"listbox","aria-multiselectable":p||void 0,onScroll(x){c.current?.(x.currentTarget)},...u&&{style:T8},className:f&&h!=="touch"?Hx.className:void 0},y=Ze(x=>{a.set("listElement",x)});return Mn("div",t,{ref:[n,y],props:[b,i]})});let A8=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function G2(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:a,unregister:c,subscribeMapChange:u,elementsRef:f,labelsRef:h,nextIndexRef:p}=KSe(),g=A.useRef(-1),[b,y]=A.useState(i??(o===A8.GuessFromOrder?()=>{if(g.current===-1){const T=p.current;p.current+=1,g.current=T}return g.current}:-1)),x=A.useRef(null),w=A.useCallback(T=>{if(x.current=T,b!==-1&&T!==null&&(f.current[b]=T,h)){const v=t!==void 0;h.current[b]=v?t:r?.current?.textContent??T.textContent}},[b,f,h,t,r]);return Xe(()=>{if(i!=null)return;const T=x.current;if(T)return a(T,n),()=>{c(T)}},[i,a,c,n]),Xe(()=>{if(i==null)return u(T=>{const v=x.current?T.get(x.current)?.index:null;v!=null&&y(v)})},[i,u,y]),A.useMemo(()=>({ref:w,index:b}),[b,w])}const k8=A.createContext(void 0);function Z2(){const e=A.useContext(k8);if(!e)throw new Error(Jr(57));return e}const awe=A.memo(A.forwardRef(function(t,n){const{render:r,className:o,value:i=null,label:a,disabled:c=!1,nativeButton:u=!1,...f}=t,h=A.useRef(null),p=G2({label:a,textRef:h,indexGuessBehavior:A8.GuessFromOrder}),{store:g,getItemProps:b,setOpen:y,setValue:x,selectionRef:w,typingRef:T,valuesRef:v,keyboardActiveRef:_,multiple:S,highlightItemOnHover:C}=fi(),E=go(),O=xt(g,vt.isActive,p.index),j=xt(g,vt.isSelected,p.index,i),P=xt(g,vt.isSelectedByFocus,p.index),N=xt(g,vt.isItemEqualToValue),D=p.index,L=D!==-1,U=A.useRef(null),X=Sr(D);Xe(()=>{if(!L)return;const te=v.current;return te[D]=i,()=>{delete te[D]}},[L,D,i,v]),Xe(()=>{if(!L)return;const te=g.state.value;let re=te;S&&Array.isArray(te)&&te.length>0&&(re=te[te.length-1]),re!==void 0&&bf(re,i,N)&&g.set("selectedIndex",D)},[L,D,S,N,g,i]);const Q=A.useMemo(()=>({disabled:c,selected:j,highlighted:O}),[c,j,O]),Z=b({active:O,selected:j});Z.onFocus=void 0,Z.id=void 0;const q=A.useRef(null),G=A.useRef("mouse"),oe=A.useRef(!1),{getButtonProps:ne,buttonRef:$}=Tc({disabled:c,focusableWhenDisabled:!0,native:u});function F(te){const re=g.state.value;if(S){const ie=Array.isArray(re)?re:[],me=j?PSe(ie,i,N):[...ie,i];x(me,Nt(zS,te))}else x(i,Nt(zS,te)),y(!1,Nt(zS,te))}const V={role:"option","aria-selected":j,"aria-disabled":c||void 0,tabIndex:O?0:-1,onFocus(){g.set("activeIndex",D)},onMouseEnter(){!_.current&&g.state.selectedIndex===null&&g.set("activeIndex",D)},onMouseMove(){C&&g.set("activeIndex",D)},onMouseLeave(te){!C||_.current||R8(te)||E.start(0,()=>{g.state.activeIndex===D&&g.set("activeIndex",null)})},onTouchStart(){w.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(te){q.current=te.key,g.set("activeIndex",D)},onClick(te){oe.current=!1,!(te.type==="keydown"&&q.current===null)&&(c||q.current===" "&&T.current||G.current!=="touch"&&!O||(q.current=null,F(te.nativeEvent)))},onPointerEnter(te){G.current=te.pointerType},onPointerDown(te){G.current=te.pointerType,oe.current=!0},onMouseUp(te){if(c)return;if(oe.current){oe.current=!1;return}const re=!w.current.allowSelectedMouseUp&&j,ie=!w.current.allowUnselectedMouseUp&&!j;re||ie||G.current!=="touch"&&!O||F(te.nativeEvent)}},I=Mn("div",t,{ref:[$,n,p.ref,U],state:Q,props:[Z,V,f,ne]}),K=A.useMemo(()=>({selected:j,indexRef:X,textRef:h,selectedByFocus:P,hasRegistered:L}),[j,X,h,P,L]);return M.jsx(k8.Provider,{value:K,children:I})})),lwe=A.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:o}=Z2();return r||o?M.jsx(cwe,{...t,ref:n}):null}),cwe=A.memo(A.forwardRef((e,t)=>{const{render:n,className:r,keepMounted:o,...i}=e,{selected:a}=Z2(),c=A.useRef(null),{transitionStatus:u,setMounted:f}=J0(a),h=A.useMemo(()=>({selected:a,transitionStatus:u}),[a,u]),p=Mn("span",e,{ref:[t,c],state:h,props:[{"aria-hidden":!0,children:"✔️"},i],stateAttributesMapping:Ep});return jc({open:a,ref:c,onComplete(){a||f(!1)}}),p})),uwe=A.memo(A.forwardRef(function(t,n){const{indexRef:r,textRef:o,selectedByFocus:i,hasRegistered:a}=Z2(),{selectedItemTextRef:c}=fi(),{className:u,render:f,...h}=t,p=A.useCallback(b=>{if(!b||!a)return;const y=c.current===null||!c.current.isConnected;(i||y&&r.current===0)&&(c.current=b)},[c,r,i,a]);return Mn("div",t,{ref:[p,n,o],props:h})})),M8=A.forwardRef(function(t,n){const{render:r,className:o,direction:i,keepMounted:a=!1,...c}=t,{store:u,popupRef:f,listRef:h,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:g}=fi(),{side:b,scrollDownArrowRef:y,scrollUpArrowRef:x}=H2(),w=i==="up"?vt.scrollUpArrowVisible:vt.scrollDownArrowVisible,T=xt(u,w),v=xt(u,vt.openMethod),_=T&&v!=="touch",S=go(),C=i==="up"?x:y,{transitionStatus:E,setMounted:O}=J0(_);Xe(()=>(g.current+=1,u.state.hasScrollArrows||u.set("hasScrollArrows",!0),()=>{g.current=Math.max(0,g.current-1),g.current===0&&u.state.hasScrollArrows&&u.set("hasScrollArrows",!1)}),[u,g]),jc({open:_,ref:C,onComplete(){_||O(!1)}});const j=A.useMemo(()=>({direction:i,visible:_,side:b,transitionStatus:E}),[i,_,b,E]),N=Mn("div",t,{ref:[n,C],state:j,props:[{"aria-hidden":!0,children:i==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove(L){if(L.movementX===0&&L.movementY===0||S.isStarted())return;u.set("activeIndex",null);function U(){const X=u.state.listElement??f.current;if(!X)return;u.set("activeIndex",null),p();const Q=X.scrollTop===0,Z=Math.round(X.scrollTop+X.clientHeight)>=X.scrollHeight;if(h.current.length===0&&(i==="up"?u.set("scrollUpArrowVisible",!Q):u.set("scrollDownArrowVisible",!Z)),i==="up"&&Q||i==="down"&&Z){S.clear();return}if((u.state.listElement||f.current)&&h.current&&h.current.length>0){const G=h.current,oe=C.current?.offsetHeight||0;if(i==="up"){let ne=0;const $=X.scrollTop+oe;for(let V=0;V<G.length;V+=1){const I=G[V];if(I&&I.offsetTop>=$){ne=V;break}}const F=Math.max(0,ne-1);if(F<ne){const V=G[F];V&&(X.scrollTop=Math.max(0,V.offsetTop-oe))}else X.scrollTop=0}else{let ne=G.length-1;const $=X.scrollTop+X.clientHeight-oe;for(let V=0;V<G.length;V+=1){const I=G[V];if(I&&I.offsetTop+I.offsetHeight>$){ne=Math.max(0,V-1);break}}const F=Math.min(G.length-1,ne+1);if(F>ne){const V=G[F];V&&(X.scrollTop=V.offsetTop+V.offsetHeight-X.clientHeight+oe)}else X.scrollTop=X.scrollHeight-X.clientHeight}}S.start(40,U)}S.start(40,U)},onMouseLeave(){S.clear()}},c]});return _||a?N:null}),fwe=A.forwardRef(function(t,n){return M.jsx(M8,{...t,ref:n,direction:"down"})}),dwe=A.forwardRef(function(t,n){return M.jsx(M8,{...t,ref:n,direction:"up"})}),hwe=A.createContext(void 0),pwe=A.forwardRef(function(t,n){const{className:r,render:o,...i}=t,[a,c]=A.useState(),u=A.useMemo(()=>({labelId:a,setLabelId:c}),[a,c]),f=Mn("div",t,{ref:n,props:[{role:"group","aria-labelledby":a},i]});return M.jsx(hwe.Provider,{value:u,children:f})}),QP=ISe;function JP({className:e,...t}){return M.jsx(pwe,{"data-slot":"select-group",className:Et("scroll-my-1",e),...t})}function e3({className:e,...t}){return M.jsx(VSe,{"data-slot":"select-value",className:Et("flex flex-1 text-left",e),...t})}function t3({className:e,size:t="default",children:n,...r}){return M.jsxs(FSe,{"data-slot":"select-trigger","data-size":t,className:Et("border-input data-[placeholder]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-none border bg-transparent py-2 pr-2 pl-2.5 text-xs transition-colors select-none focus-visible:ring-1 aria-invalid:ring-1 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-none *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...r,children:[n,M.jsx(qSe,{render:M.jsx(vD,{className:"text-muted-foreground size-4 pointer-events-none"})})]})}function n3({className:e,children:t,side:n="bottom",sideOffset:r=4,align:o="center",alignOffset:i=0,alignItemWithTrigger:a=!0,...c}){return M.jsx(HSe,{children:M.jsx(nwe,{side:n,sideOffset:r,align:o,alignOffset:i,alignItemWithTrigger:a,className:"isolate z-50",children:M.jsxs(swe,{"data-slot":"select-content",className:Et("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 min-w-36 rounded-none shadow-md ring-1 duration-100 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto",e),...c,children:[M.jsx(mwe,{}),M.jsx(iwe,{children:t}),M.jsx(gwe,{})]})})})}function Eu({className:e,children:t,...n}){return M.jsxs(awe,{"data-slot":"select-item",className:Et("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-none py-2 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...n,children:[M.jsx(uwe,{className:"flex flex-1 gap-2 shrink-0 whitespace-nowrap",children:t}),M.jsx(lwe,{render:M.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:M.jsx(i_,{className:"pointer-events-none"})})]})}function mwe({className:e,...t}){return M.jsx(dwe,{"data-slot":"select-scroll-up-button",className:Et("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 top-0 w-full",e),...t,children:M.jsx(Nne,{})})}function gwe({className:e,...t}){return M.jsx(fwe,{"data-slot":"select-scroll-down-button",className:Et("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 bottom-0 w-full",e),...t,children:M.jsx(vD,{})})}const j8=A.createContext(void 0);function ywe(){const e=A.useContext(j8);if(e===void 0)throw new Error(Jr(63));return e}let r3=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const P8={...F2,checked(e){return e?{[r3.checked]:""}:{[r3.unchecked]:""}}},vwe=A.forwardRef(function(t,n){const{checked:r,className:o,defaultChecked:i,id:a,inputRef:c,name:u,nativeButton:f=!1,onCheckedChange:h,readOnly:p=!1,required:g=!1,disabled:b=!1,render:y,uncheckedValue:x,...w}=t,{clearErrors:T}=U2(),{state:v,setTouched:_,setDirty:S,validityData:C,setFilled:E,setFocused:O,shouldValidateOnChange:j,validationMode:P,disabled:N,name:D,validation:L}=vc(),{labelId:U}=Ap(),X=N||b,Q=D??u,Z=Ze(h),q=A.useRef(null),G=Ui(q,c,L.inputRef),oe=A.useRef(null),ne=Uf(),$=V2({id:a,implicit:!1,controlRef:oe}),[F,V]=Bh({controlled:r,default:!!i,name:"Switch",state:"checked"});q2({id:ne,commit:L.commit,value:F,controlRef:oe,name:Q,getValue:()=>F}),Xe(()=>{q.current&&E(q.current.checked)},[q,E]),w8(F,()=>{T(Q),S(F!==C.initialValue),E(F),j()?L.commit(F):L.commit(F,!0)});const{getButtonProps:I,buttonRef:K}=Tc({disabled:X,native:f}),te={id:ne,role:"switch","aria-checked":F,"aria-readonly":p||void 0,"aria-labelledby":U,onFocus(){X||O(!0)},onBlur(){const Ce=q.current;!Ce||X||(_(!0),O(!1),P==="onBlur"&&L.commit(Ce.checked))},onClick(Ce){p||X||(Ce.preventDefault(),q?.current?.click())}},re=A.useMemo(()=>fp({checked:F,disabled:X,id:$,name:Q,required:g,style:X0,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:G,onChange(Ce){if(Ce.nativeEvent.defaultPrevented)return;const ee=Ce.target.checked,se=Nt(mc,Ce.nativeEvent);Z?.(ee,se),!se.isCanceled&&V(ee)},onFocus(){oe.current?.focus()}},L.getInputValidationProps),[F,X,G,$,Q,Z,g,V,L]),ie=A.useMemo(()=>({...v,checked:F,disabled:X,readOnly:p,required:g}),[v,F,X,p,g]),me=Mn("span",t,{state:ie,ref:[n,oe,K],props:[te,L.getValidationProps,w,I],stateAttributesMapping:P8});return M.jsxs(j8.Provider,{value:ie,children:[me,!F&&Q&&x!==void 0&&M.jsx("input",{type:"hidden",name:Q,value:x}),M.jsx("input",{...re})]})}),bwe=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{state:a}=vc(),c=ywe(),u={...a,...c};return Mn("span",t,{state:u,ref:n,stateAttributesMapping:P8,props:i})});function o3({className:e,size:t="default",...n}){return M.jsx(vwe,{"data-slot":"switch","data-size":t,className:Et("cursor-pointer data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-1 aria-invalid:ring-1 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...n,children:M.jsx(bwe,{"data-slot":"switch-thumb",className:"bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform"})})}const N8=A.createContext(void 0);function W2(){const e=A.useContext(N8);if(e===void 0)throw new Error(Jr(64));return e}let Swe=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const Y2={tabActivationDirection:e=>({[Swe.activationDirection]:e})},wwe=A.forwardRef(function(t,n){const{className:r,defaultValue:o=0,onValueChange:i,orientation:a="horizontal",render:c,value:u,...f}=t,h=rv(),p=Object.hasOwn(t,"defaultValue"),g=A.useRef([]),[b,y]=A.useState(()=>new Map),[x,w]=Bh({controlled:u,default:o,name:"Tabs",state:"value"}),T=u!==void 0,[v,_]=A.useState(()=>new Map),[S,C]=A.useState("none"),E=Ze((q,G)=>{i?.(q,G),!G.isCanceled&&(w(q),C(G.activationDirection))}),O=Ze((q,G)=>{y(oe=>{if(oe.get(q)===G)return oe;const ne=new Map(oe);return ne.set(q,G),ne})}),j=Ze((q,G)=>{y(oe=>{if(!oe.has(q)||oe.get(q)!==G)return oe;const ne=new Map(oe);return ne.delete(q),ne})}),P=A.useCallback(q=>b.get(q),[b]),N=A.useCallback(q=>{for(const G of v.values())if(q===G?.value)return G?.id},[v]),D=A.useCallback(q=>{if(q===void 0)return null;for(const[G,oe]of v.entries())if(oe!=null&&q===(oe.value??oe.index))return G;return null},[v]),L=A.useMemo(()=>({direction:h,getTabElementBySelectedValue:D,getTabIdByPanelValue:N,getTabPanelIdByValue:P,onValueChange:E,orientation:a,registerMountedTabPanel:O,setTabMap:_,unregisterMountedTabPanel:j,tabActivationDirection:S,value:x}),[h,D,N,P,E,a,O,_,j,S,x]),U=A.useMemo(()=>{for(const q of v.values())if(q!=null&&q.value===x)return q},[v,x]),X=A.useMemo(()=>{for(const q of v.values())if(q!=null&&!q.disabled)return q.value},[v]);Xe(()=>{if(T||v.size===0)return;const q=U?.disabled,G=U==null&&x!==null;if(p&&q&&x===o||!q&&!G)return;const ne=X??null;x!==ne&&(w(ne),C("none"))},[o,X,p,T,U,C,w,v,x]);const Z=Mn("div",t,{state:{orientation:a,tabActivationDirection:S},ref:n,props:f,stateAttributesMapping:Y2});return M.jsx(N8.Provider,{value:L,children:M.jsx(B2,{elementsRef:g,children:Z})})}),D8="data-composite-item-active";function xwe(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=ED(),{ref:o,index:i}=G2(e),a=n===i,c=A.useRef(null),u=Ui(o,c);return{compositeProps:A.useMemo(()=>({tabIndex:a?0:-1,onFocus(){r(i)},onMouseMove(){const h=c.current;if(!t||!h)return;const p=h.hasAttribute("disabled")||h.ariaDisabled==="true";!a&&!p&&h.focus()}}),[a,r,i,t]),compositeRef:u,index:i}}const $8=A.createContext(void 0);function Ewe(){const e=A.useContext($8);if(e===void 0)throw new Error(Jr(65));return e}const _we=A.forwardRef(function(t,n){const{className:r,disabled:o=!1,render:i,value:a,id:c,nativeButton:u=!0,...f}=t,{value:h,getTabPanelIdByValue:p,orientation:g}=W2(),{activateOnFocus:b,highlightedTabIndex:y,onTabActivation:x,setHighlightedTabIndex:w,tabsListElement:T}=Ewe(),v=Uf(c),_=A.useMemo(()=>({disabled:o,id:v,value:a}),[o,v,a]),{compositeProps:S,compositeRef:C,index:E}=xwe({metadata:_}),O=a===h,j=A.useRef(!1);Xe(()=>{if(j.current){j.current=!1;return}if(!(O&&E>-1&&y!==E))return;const oe=T;if(oe!=null){const ne=$i(js(oe));if(ne&&Yt(oe,ne))return}o||w(E)},[O,E,y,w,o,T]);const{getButtonProps:P,buttonRef:N}=Tc({disabled:o,native:u,focusableWhenDisabled:!0}),D=p(a),L=A.useRef(!1),U=A.useRef(!1);function X(oe){O||o||x(a,Nt(mc,oe.nativeEvent,void 0,{activationDirection:"none"}))}function Q(oe){O||(E>-1&&!o&&w(E),!o&&b&&(!L.current||L.current&&U.current)&&x(a,Nt(mc,oe.nativeEvent,void 0,{activationDirection:"none"})))}function Z(oe){if(O||o)return;L.current=!0;function ne(){L.current=!1,U.current=!1}(!oe.button||oe.button===0)&&(U.current=!0,js(oe.currentTarget).addEventListener("pointerup",ne,{once:!0}))}const q=A.useMemo(()=>({disabled:o,active:O,orientation:g}),[o,O,g]);return Mn("button",t,{state:q,ref:[n,N,C],props:[S,{role:"tab","aria-controls":D,"aria-selected":O,id:v,onClick:X,onFocus:Q,onPointerDown:Z,[D8]:O?"":void 0,onKeyDownCapture(){j.current=!0}},f,P]})});function s3(e){const t=Co(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Wn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r;return(gf(n)!==i||gf(r)!==a)&&(n=i,r=a),{width:n,height:r}}let Cwe=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e})({});const Twe=A.forwardRef(function(t,n){const{className:r,value:o,render:i,keepMounted:a=!1,...c}=t,{value:u,getTabIdByPanelValue:f,orientation:h,tabActivationDirection:p,registerMountedTabPanel:g,unregisterMountedTabPanel:b}=W2(),y=Uf(),x=A.useMemo(()=>({id:y,value:o}),[y,o]),{ref:w,index:T}=G2({metadata:x}),v=o!==u,_=f(o),S=A.useMemo(()=>({hidden:v,orientation:h,tabActivationDirection:p}),[v,h,p]),C=Mn("div",t,{state:S,ref:[n,w],props:[{"aria-labelledby":_,hidden:v,id:y??void 0,role:"tabpanel",tabIndex:v?-1:0,[Cwe.index]:T},c],stateAttributesMapping:Y2});return Xe(()=>{if(!(v&&!a)&&y!=null)return g(o,y),()=>{b(o,y)}},[v,a,o,y,g,b]),!v||a?C:null});function Rwe(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const Owe=[];function Awe(e){const{itemSizes:t,cols:n=1,loopFocus:r=!0,dense:o=!1,orientation:i="both",direction:a,highlightedIndex:c,onHighlightedIndexChange:u,rootRef:f,enableHomeAndEndKeys:h=!1,stopEventPropagation:p=!1,disabledIndices:g,modifierKeys:b=Owe}=e,[y,x]=A.useState(0),w=n>1,T=A.useRef(null),v=Ui(T,f),_=A.useRef([]),S=A.useRef(!1),C=c??y,E=Ze((P,N=!1)=>{if((u??x)(P),N){const D=_.current[P];BP(T.current,D,a,i)}}),O=Ze(P=>{if(P.size===0||S.current)return;S.current=!0;const N=Array.from(P.keys()),D=N.find(U=>U?.hasAttribute(D8))??null,L=D?N.indexOf(D):-1;L!==-1&&E(L),BP(T.current,D,a,i)}),j=A.useMemo(()=>({"aria-orientation":i==="both"?void 0:i,ref:v,onFocus(P){!T.current||!qP(P.target)||P.target.setSelectionRange(0,P.target.value.length??0)},onKeyDown(P){const N=h?V1e:y8;if(!N.has(P.key)||kwe(P,b)||!T.current)return;const L=a==="rtl",U=L?qh:Qu,X={horizontal:U,vertical:Jl,both:U}[i],Q=L?Qu:qh,Z={horizontal:Q,vertical:Xu,both:Q}[i];if(qP(P.target)&&!Rwe(P.target)){const V=P.target.selectionStart,I=P.target.selectionEnd,K=P.target.value??"";if(V==null||P.shiftKey||V!==I||P.key!==Z&&V<K.length||P.key!==X&&V>0)return}let q=C;const G=wy(_,g),oe=Lx(_,g);if(w){const V=t||Array.from({length:_.current.length},()=>({width:1,height:1})),I=A6(V,n,o),K=I.findIndex(re=>re!=null&&!Ga(_,re,g)),te=I.reduce((re,ie,me)=>ie!=null&&!Ga(_,ie,g)?me:re,-1);q=I[O6({current:I.map(re=>re?_.current[re]:null)},{event:P,orientation:i,loopFocus:r,cols:n,disabledIndices:M6([...g||_.current.map((re,ie)=>Ga(_,ie)?ie:void 0),void 0],I),minIndex:K,maxIndex:te,prevIndex:k6(C>oe?G:C,V,I,n,P.key===Jl?"bl":P.key===Qu?"tr":"tl"),rtl:L})]}const ne={horizontal:[U],vertical:[Jl],both:[U,Jl]}[i],$={horizontal:[Q],vertical:[Xu],both:[Q,Xu]}[i],F=w?N:{horizontal:h?F1e:m8,vertical:h?U1e:g8,both:N}[i];h&&(P.key===Rp?q=G:P.key===Op&&(q=oe)),q===C&&(ne.includes(P.key)||$.includes(P.key))&&(r&&q===oe&&ne.includes(P.key)?q=G:r&&q===G&&$.includes(P.key)?q=oe:q=Kr(_,{startingIndex:q,decrement:$.includes(P.key),disabledIndices:g})),q!==C&&!Ku(_,q)&&(p&&P.stopPropagation(),F.has(P.key)&&P.preventDefault(),E(q,!0),queueMicrotask(()=>{_.current[q]?.focus()}))}}),[n,o,a,g,_,h,C,w,t,r,v,b,E,i,p]);return A.useMemo(()=>({props:j,highlightedIndex:C,onHighlightedIndexChange:E,elementsRef:_,disabledIndices:g,onMapChange:O,relayKeyboardEvent:j.onKeyDown}),[j,C,E,_,g,O])}function kwe(e,t){for(const n of G1e.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function Mwe(e){const{render:t,className:n,refs:r=af,props:o=af,state:i=$r,stateAttributesMapping:a,highlightedIndex:c,onHighlightedIndexChange:u,orientation:f,dense:h,itemSizes:p,loopFocus:g,cols:b,enableHomeAndEndKeys:y,onMapChange:x,stopEventPropagation:w=!0,rootRef:T,disabledIndices:v,modifierKeys:_,highlightItemOnHover:S=!1,tag:C="div",...E}=e,O=rv(),{props:j,highlightedIndex:P,onHighlightedIndexChange:N,elementsRef:D,onMapChange:L,relayKeyboardEvent:U}=Awe({itemSizes:p,cols:b,loopFocus:g,dense:h,orientation:f,highlightedIndex:c,onHighlightedIndexChange:u,rootRef:T,stopEventPropagation:w,enableHomeAndEndKeys:y,direction:O,disabledIndices:v,modifierKeys:_}),X=Mn(C,e,{state:i,ref:r,props:[j,...o,E],stateAttributesMapping:a}),Q=A.useMemo(()=>({highlightedIndex:P,onHighlightedIndexChange:N,highlightItemOnHover:S,relayKeyboardEvent:U}),[P,N,S,U]);return M.jsx(xD.Provider,{value:Q,children:M.jsx(B2,{elementsRef:D,onMapChange:Z=>{x?.(Z),L(Z)},children:X})})}const jwe=A.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:o,loopFocus:i=!0,render:a,...c}=t,{getTabElementBySelectedValue:u,onValueChange:f,orientation:h,value:p,setTabMap:g,tabActivationDirection:b}=W2(),[y,x]=A.useState(0),[w,T]=A.useState(null),v=Pwe(p,h,w,u),_=Ze((O,j)=>{if(O!==p){const P=v(O);j.activationDirection=P,f(O,j)}}),S=A.useMemo(()=>({orientation:h,tabActivationDirection:b}),[h,b]),C={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},E=A.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:y,onTabActivation:_,setHighlightedTabIndex:x,tabsListElement:w,value:p}),[r,y,_,x,w,p]);return M.jsx($8.Provider,{value:E,children:M.jsx(Mwe,{render:a,className:o,state:S,refs:[n,T],props:[C,c],stateAttributesMapping:Y2,highlightedIndex:y,enableHomeAndEndKeys:!0,loopFocus:i,orientation:h,onHighlightedIndexChange:x,onMapChange:g,disabledIndices:af})})});function i3(e,t){const{left:n,top:r}=e.getBoundingClientRect(),{left:o,top:i}=t.getBoundingClientRect(),a=n-o,c=r-i;return{left:a,top:c}}function Pwe(e,t,n,r){const[o,i]=A.useState(null);return Xe(()=>{if(e==null||n==null){i(null);return}const a=r(e);if(a==null){i(null);return}const{left:c,top:u}=i3(a,n);i(t==="horizontal"?c:u)},[t,r,n,e]),A.useCallback(a=>{if(a===e)return"none";if(a==null)return i(null),"none";if(a!=null&&n!=null){const c=r(a);if(c!=null){const{left:u,top:f}=i3(c,n);if(o==null)return i(t==="horizontal"?u:f),"none";if(t==="horizontal"){if(u<o)return i(u),"left";if(u>o)return i(u),"right"}else{if(f<o)return i(f),"up";if(f>o)return i(f),"down"}}}return"none"},[r,t,o,n,e])}function Nwe({className:e,orientation:t="horizontal",...n}){return M.jsx(wwe,{"data-slot":"tabs","data-orientation":t,className:Et("gap-2 group/tabs flex data-[orientation=horizontal]:flex-col",e),...n})}const Dwe=Wi("rounded-none p-[3px] group-data-horizontal/tabs:h-8 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function $we({className:e,variant:t="default",...n}){return M.jsx(jwe,{"data-slot":"tabs-list","data-variant":t,className:Et(Dwe({variant:t}),e),...n})}function ew({className:e,...t}){return M.jsx(_we,{"data-slot":"tabs-trigger",className:Et("gap-1.5 rounded-none border border-transparent px-1.5 py-0.5 text-xs font-medium group-data-vertical/tabs:py-[calc(--spacing(1.25))] [&_svg:not([class*='size-'])]:size-4 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background dark:data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 data-active:text-foreground","after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}function tw({className:e,...t}){return M.jsx(Twe,{"data-slot":"tabs-content",className:Et("text-xs/relaxed flex-1 outline-none",e),...t})}function Iwe({className:e,...t}){return M.jsx("div",{"data-slot":"input-group",role:"group",className:Et("border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-disabled:bg-input/50 dark:has-disabled:bg-input/80 h-8 rounded-none border transition-colors has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot][aria-invalid=true]]:ring-1 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 [[data-slot=combobox-content]_&]:focus-within:border-inherit [[data-slot=combobox-content]_&]:focus-within:ring-0 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto",e),...t})}const zwe=Wi("text-muted-foreground h-auto gap-2 py-1.5 text-xs font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-none [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none",{variants:{align:{"inline-start":"pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem] order-first","inline-end":"pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem] order-last","block-start":"px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start","block-end":"px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start"}},defaultVariants:{align:"inline-start"}});function Lwe({className:e,align:t="inline-start",...n}){return M.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:Et(zwe({align:t}),e),onClick:r=>{r.target.closest("button")||r.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}function Fwe({className:e,...t}){return M.jsx(Go,{"data-slot":"command",className:Et("bg-popover text-popover-foreground rounded-none flex size-full flex-col overflow-hidden",e),...t})}function Uwe({className:e,...t}){return M.jsx("div",{"data-slot":"command-input-wrapper",className:"border-b pb-0",children:M.jsxs(Iwe,{className:"bg-input/30 border-input/30 h-8 border-none shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[M.jsx(Go.Input,{"data-slot":"command-input",className:Et("w-full text-xs outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t}),M.jsx(Lwe,{children:M.jsx(Yne,{className:"size-4 shrink-0 opacity-50"})})]})})}function Vwe({className:e,...t}){return M.jsx(Go.List,{"data-slot":"command-list",className:Et("no-scrollbar max-h-72 scroll-py-0 outline-none overflow-x-hidden overflow-y-auto",e),...t})}function qwe({className:e,...t}){return M.jsx(Go.Empty,{"data-slot":"command-empty",className:Et("py-6 text-center text-xs",e),...t})}function Bwe({className:e,...t}){return M.jsx(Go.Group,{"data-slot":"command-group",className:Et("text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs",e),...t})}function Hwe({className:e,children:t,...n}){return M.jsxs(Go.Item,{"data-slot":"command-item",className:Et("data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-none px-2 py-2 text-xs outline-hidden select-none [&_svg:not([class*='size-'])]:size-4 in-data-[slot=dialog-content]:rounded-none! group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...n,children:[t,M.jsx(i_,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}const I8=A.createContext(void 0);function kp(e){const t=A.useContext(I8);if(t===void 0&&!e)throw new Error(Jr(47));return t}function Kwe(){return{...l8(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0}}const Gwe={...c8,disabled:Je(e=>e.disabled),instantType:Je(e=>e.instantType),openMethod:Je(e=>e.openMethod),openChangeReason:Je(e=>e.openChangeReason),modal:Je(e=>e.modal),stickIfOpen:Je(e=>e.stickIfOpen),titleElementId:Je(e=>e.titleElementId),descriptionElementId:Je(e=>e.descriptionElementId),openOnHover:Je(e=>e.openOnHover),closeDelay:Je(e=>e.closeDelay)};class X2 extends j2{constructor(t){const n={...Kwe(),...t};n.open&&t?.mounted===void 0&&(n.mounted=!0),super(n,{popupRef:A.createRef(),backdropRef:A.createRef(),internalBackdropRef:A.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:A.createRef(),beforeContentFocusGuardRef:A.createRef(),stickIfOpenTimeout:new ol,triggerElements:new ev},Gwe)}setOpen=(t,n)=>{const r=n.reason===ls,o=n.reason===Ba&&n.event.detail===0,i=!t&&(n.reason===m6||n.reason==null);if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,n),n.isCanceled)return;const a={open:t,nativeEvent:n.event,reason:n.reason,nested:this.state.nested,triggerElement:n.trigger};this.state.floatingRootContext.context.events?.emit("openchange",a);const u=()=>{const f={open:t,openChangeReason:n.reason},h=n.trigger?.id??null;(h||t)&&(f.activeTriggerId=h,f.activeTriggerElement=n.trigger??null),this.update(f)};r?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(kre,()=>{this.set("stickIfOpen",!1)}),Bo.flushSync(u)):u(),o||i?this.set("instantType",o?"click":"dismiss"):n.reason===gc?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(t,n){const r=To(()=>t??new X2(n)).current;return w2(r.disposeEffect),r}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}function a3({props:e}){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:o,onOpenChangeComplete:i,modal:a=!1,handle:c,triggerId:u,defaultTriggerId:f=null}=e,h=X2.useStore(c?.store,{open:n??r,modal:a,activeTriggerId:u!==void 0?u:f});h.useControlledProp("open",n,r),h.useControlledProp("activeTriggerId",u,f);const p=h.useState("open"),g=h.useState("positionerElement"),b=h.useState("payload"),y=h.useState("openChangeReason");h.useContextCallback("onOpenChange",o),h.useContextCallback("onOpenChangeComplete",i);const{openMethod:x,triggerProps:w,reset:T}=L2(p);i8(h);const{forceUnmount:v}=a8(p,h,()=>{h.update({stickIfOpen:!0,openChangeReason:null}),T()});z2(p&&a===!0&&y!==ls&&x!=="touch",g),A.useEffect(()=>{p||h.context.stickIfOpenTimeout.clear()},[h,p]);const _=A.useCallback(Q=>{const Z=Nt(Q);return Z.preventUnmountOnClose=()=>{h.set("preventUnmountingOnClose",!0)},Z},[h]),S=A.useCallback(()=>{h.setOpen(!1,_(g6))},[h,_]);A.useImperativeHandle(e.actionsRef,()=>({unmount:v,close:S}),[v,S]);const C=f8({popupStore:h,onOpenChange:h.setOpen}),E=M2(C,{outsidePressEvent:{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),O=h8(C),{getReferenceProps:j,getFloatingProps:P,getTriggerProps:N}=tv([E,O]),D=A.useMemo(()=>j(w),[j,w]),L=A.useMemo(()=>N(w),[N,w]),U=A.useMemo(()=>P(),[P]);h.useSyncedValues({modal:a,openMethod:x,activeTriggerProps:D,inactiveTriggerProps:L,popupProps:U,floatingRootContext:C,nested:pl()!=null});const X=A.useMemo(()=>({store:h}),[h]);return M.jsx(I8.Provider,{value:X,children:typeof t=="function"?t({payload:b}):t})}function Zwe(e){return kp(!0)?M.jsx(a3,{props:e}):M.jsx(Zve,{children:M.jsx(a3,{props:e})})}const Wwe=300,Ywe=A.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:a=!0,handle:c,payload:u,openOnHover:f=!1,delay:h=Wwe,closeDelay:p=0,id:g,...b}=t,y=kp(!0),x=c?.store??y?.store;if(!x)throw new Error(Jr(74));const w=Uf(g),T=x.useState("isTriggerActive",w),v=x.useState("floatingRootContext"),_=x.useState("isOpenedByTrigger",w),S=A.useRef(null),{registerTrigger:C,isMountedByThisTrigger:E}=b1e(w,S,x,{payload:u,disabled:i,openOnHover:f,closeDelay:p}),O=x.useState("openChangeReason"),j=x.useState("stickIfOpen"),P=x.useState("openMethod"),N=O1e(v,{enabled:v!=null&&f&&(P!=="touch"||O!==Ba),mouseOnly:!0,move:!1,handleClose:$1e(),restMs:h,delay:{close:p},triggerElementRef:S,isActiveTrigger:T}),D=Z6(v,{enabled:v!=null,stickIfOpen:j}),L=tv([D]),U=x.useState("triggerProps",E),X=A.useMemo(()=>({disabled:i,open:_}),[i,_]),{getButtonProps:Q,buttonRef:Z}=Tc({disabled:i,native:a}),q=A.useMemo(()=>({open(F){return F&&O===Ba?h6.open(F):d6.open(F)}}),[O]),G=Mn("button",t,{state:X,ref:[Z,n,C,S],props:[L.getReferenceProps(),N,U,{[TD]:"",id:w},b,Q],stateAttributesMapping:q}),oe=A.useRef(null),ne=Ze(F=>{Bo.flushSync(()=>{x.setOpen(!1,Nt(gc,F.nativeEvent,F.currentTarget))}),qve(oe.current)?.focus()}),$=Ze(F=>{const V=x.select("positionerElement");if(V&&Gu(F,V))x.context.beforeContentFocusGuardRef.current?.focus();else{Bo.flushSync(()=>{x.setOpen(!1,Nt(gc,F.nativeEvent,F.currentTarget))});let I=Vve(S.current);for(;I!==null&&Yt(V,I)||I?.hasAttribute("aria-hidden");){const K=I;if(I=T2(I),I===K)break}I?.focus()}});return T?M.jsxs(A.Fragment,{children:[M.jsx(vf,{ref:oe,onFocus:ne}),M.jsx(A.Fragment,{children:G},w),M.jsx(vf,{ref:x.context.triggerFocusTargetRef,onFocus:$})]}):M.jsx(A.Fragment,{children:G},w)}),z8=A.createContext(void 0);function Xwe(){const e=A.useContext(z8);if(e===void 0)throw new Error(Jr(45));return e}const Qwe=A.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,{store:i}=kp();return i.useState("mounted")||r?M.jsx(z8.Provider,{value:r,children:M.jsx(R2,{ref:n,...o,renderGuards:!1})}):null}),L8=A.createContext(void 0);function Jwe(){const e=A.useContext(L8);if(!e)throw new Error(Jr(46));return e}const exe=A.forwardRef(function(t,n){const{render:r,className:o,anchor:i,positionMethod:a="absolute",side:c="bottom",align:u="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:p="clipping-ancestors",collisionPadding:g=5,arrowPadding:b=5,sticky:y=!1,disableAnchorTracking:x=!1,collisionAvoidance:w=Pre,...T}=t,{store:v}=kp(),_=Xwe(),S=Kve(),C=v.useState("floatingRootContext"),E=v.useState("mounted"),O=v.useState("open"),j=v.useState("openChangeReason"),P=v.useState("activeTriggerElement"),N=v.useState("modal"),D=v.useState("positionerElement"),L=v.useState("instantType"),U=v.useState("transitionStatus"),X=A.useRef(null),Q=N2(D,!1,!1),Z=_8({anchor:i,floatingRootContext:C,positionMethod:a,mounted:E,side:c,sideOffset:f,align:u,alignOffset:h,arrowPadding:b,collisionBoundary:p,collisionPadding:g,sticky:y,disableAnchorTracking:x,keepMounted:_,nodeId:S,collisionAvoidance:w,adaptiveOrigin:ewe}),q=A.useMemo(()=>{const V={};return O||(V.pointerEvents="none"),{role:"presentation",hidden:!E,style:{...Z.positionerStyles,...V}}},[O,E,Z.positionerStyles]),G=A.useMemo(()=>({props:q,...Z}),[q,Z]),oe=C?.select("domReferenceElement");Xe(()=>{const V=oe,I=X.current;if(V&&(X.current=V),I&&V&&V!==I){v.set("instantType",void 0);const K=new AbortController;return Q(()=>{v.set("instantType","trigger-change")},K.signal),()=>{K.abort()}}},[oe,Q,v]);const ne=A.useMemo(()=>({open:O,side:G.side,align:G.align,anchorHidden:G.anchorHidden,instant:L}),[O,G.side,G.align,G.anchorHidden,L]),$=A.useCallback(V=>{v.set("positionerElement",V)},[v]),F=Mn("div",t,{state:ne,props:[G.props,K2(U),T],ref:[n,$],stateAttributesMapping:Lf});return M.jsxs(L8.Provider,{value:G,children:[E&&N===!0&&j!==ls&&M.jsx(I2,{ref:v.context.internalBackdropRef,inert:$2(!O),cutout:P}),M.jsx(Gve,{id:S,children:F})]})}),txe=typeof ResizeObserver<"u",nxe=()=>!0;function rxe(e){const{popupElement:t,positionerElement:n,content:r,mounted:o,enabled:i=nxe,onMeasureLayout:a,onMeasureLayoutComplete:c,side:u,direction:f}=e,h=A.useRef(!0),p=N2(t,!0,!1),g=Tp(),b=A.useRef(null),y=Ze(a),x=Ze(c),w=A.useMemo(()=>{let T=u==="top",v=u==="left";return f==="rtl"?(T=T||u==="inline-end",v=v||u==="inline-end"):(T=T||u==="inline-start",v=v||u==="inline-start"),T?{position:"absolute",[u==="top"?"bottom":"top"]:"0",[v?"right":"left"]:"0"}:$r},[u,f]);Xe(()=>{if(!o||!i()||!txe){h.current=!0,b.current=null;return}if(!t||!n)return;Object.entries(w).forEach(([P,N])=>{t.style.setProperty(P,N)});const T=new ResizeObserver(P=>{const N=P[0];N&&(b.current===null?b.current={width:Math.ceil(N.borderBoxSize[0].inlineSize),height:Math.ceil(N.borderBoxSize[0].blockSize)}:(b.current.width=Math.ceil(N.borderBoxSize[0].inlineSize),b.current.height=Math.ceil(N.borderBoxSize[0].blockSize)))});T.observe(t),t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto");const v=Zd(t,"position","static"),_=Zd(t,"transform","none"),S=Zd(t,"scale","1"),C=Zd(n,"--available-width","max-content"),E=Zd(n,"--available-height","max-content");if(y?.(),h.current||b.current===null){n.style.setProperty("--positioner-width","max-content"),n.style.setProperty("--positioner-height","max-content");const P=s3(t);return n.style.setProperty("--positioner-width",`${P.width}px`),n.style.setProperty("--positioner-height",`${P.height}px`),v(),_(),S(),C(),E(),x?.(null,P),h.current=!1,()=>{T.disconnect()}}t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto"),n.style.setProperty("--positioner-width","max-content"),n.style.setProperty("--positioner-height","max-content");const O=s3(t);t.style.setProperty("--popup-width",`${b.current.width}px`),t.style.setProperty("--popup-height",`${b.current.height}px`),v(),_(),C(),E(),x?.(b.current,O),n.style.setProperty("--positioner-width",`${O.width}px`),n.style.setProperty("--positioner-height",`${O.height}px`);const j=new AbortController;return g.request(()=>{t.style.setProperty("--popup-width",`${O.width}px`),t.style.setProperty("--popup-height",`${O.height}px`),p(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},j.signal)}),()=>{T.disconnect(),j.abort(),g.cancel()}},[r,t,n,p,g,i,o,y,x,w])}function Zd(e,t,n){const r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r)}}const oxe={...Lf,...Ep},sxe=A.forwardRef(function(t,n){const{className:r,render:o,initialFocus:i,finalFocus:a,...c}=t,{store:u}=kp(),f=Jwe(),h=O8()!=null,p=rv(),g=u.useState("open"),b=u.useState("openMethod"),y=u.useState("instantType"),x=u.useState("transitionStatus"),w=u.useState("popupProps"),T=u.useState("titleElementId"),v=u.useState("descriptionElementId"),_=u.useState("modal"),S=u.useState("mounted"),C=u.useState("openChangeReason"),E=u.useState("popupElement"),O=u.useState("payload"),j=u.useState("positionerElement"),P=u.useState("activeTriggerElement"),N=u.useState("floatingRootContext");jc({open:g,ref:u.context.popupRef,onComplete(){g&&u.context.onOpenChangeComplete?.(!0)}});const D=u.useState("disabled"),L=u.useState("openOnHover"),U=u.useState("closeDelay");C1e(N,{enabled:L&&!D,closeDelay:U});function X(F){return F==="touch"?u.context.popupRef.current:!0}const Q=i===void 0?X:i,Z=A.useMemo(()=>({open:g,side:f.side,align:f.align,instant:y,transitionStatus:x}),[g,f.side,f.align,y,x]),q=A.useCallback(F=>{u.set("popupElement",F)},[u]);function G(){N.context.events.emit("measure-layout")}function oe(F,V){N.context.events.emit("measure-layout-complete",{previousDimensions:F,nextDimensions:V})}const ne=A.useCallback(()=>u.context.triggerElements.size>1,[u]);rxe({popupElement:E,positionerElement:j,mounted:S,content:O,enabled:ne,onMeasureLayout:G,onMeasureLayoutComplete:oe,side:f.side,direction:p});const $=Mn("div",t,{state:Z,ref:[n,u.context.popupRef,q],props:[w,{"aria-labelledby":T,"aria-describedby":v,onKeyDown(F){h&&D2.has(F.key)&&F.stopPropagation()}},K2(x),c],stateAttributesMapping:oxe});return M.jsx(A2,{context:N,openInteractionType:b,modal:_==="trap-focus",disabled:!S||C===ls,initialFocus:Q,returnFocus:a,restoreFocus:"popup",previousFocusableElement:Wn(P)?P:void 0,nextFocusableElement:u.context.triggerFocusTargetRef,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:$})});function ixe({...e}){return M.jsx(Zwe,{"data-slot":"popover",...e})}function axe({...e}){return M.jsx(Ywe,{"data-slot":"popover-trigger",...e})}function lxe({className:e,align:t="center",alignOffset:n=0,side:r="bottom",sideOffset:o=4,...i}){return M.jsx(Qwe,{children:M.jsx(exe,{align:t,alignOffset:n,side:r,sideOffset:o,className:"isolate z-50",children:M.jsx(sxe,{"data-slot":"popover-content",className:Et("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 flex flex-col gap-2.5 rounded-none p-2.5 text-xs shadow-md ring-1 duration-100 z-50 w-72 origin-(--transform-origin) outline-hidden",e),...i})})})}const l3=[{value:"en-US",label:"English (US)"},{value:"es-ES",label:"español (España)"},{value:"fr-FR",label:"français (France)"},{value:"de-DE",label:"Deutsch"},{value:"it-IT",label:"italiano"},{value:"am-ET",label:"አማርኛ"},{value:"ar",label:"العربية"},{value:"bg-BG",label:"български"},{value:"bn-BD",label:"বাংলা"},{value:"bs-BA",label:"bosanski"},{value:"ca-ES",label:"català"},{value:"cs-CZ",label:"čeština"},{value:"da-DK",label:"dansk"},{value:"el-GR",label:"Ελληνικά"},{value:"es-419",label:"español (Latinoamérica)"},{value:"et-EE",label:"eesti"},{value:"fi-FI",label:"suomi"},{value:"fr-CA",label:"français (Canada)"},{value:"gu-IN",label:"ગુજરાતી"},{value:"hi-IN",label:"हिन्दी"},{value:"hr-HR",label:"hrvatski"},{value:"hu-HU",label:"magyar"},{value:"hy-AM",label:"հայերեն"},{value:"id-ID",label:"Indonesia"},{value:"is-IS",label:"íslenska"},{value:"ja-JP",label:"日本語"},{value:"ka-GE",label:"ქართული"},{value:"kk-KZ",label:"қазақ тілі"},{value:"kn-IN",label:"ಕನ್ನಡ"},{value:"ko-KR",label:"한국어"},{value:"lt-LT",label:"lietuvių"},{value:"lv-LV",label:"latviešu"},{value:"mk-MK",label:"македонски"},{value:"ml-IN",label:"മലയാളം"},{value:"mn-MN",label:"монгол"},{value:"mr-IN",label:"मराठी"},{value:"ms-MY",label:"Bahasa Melayu"},{value:"my-MM",label:"မြန်မာ"},{value:"nb-NO",label:"norsk bokmål"},{value:"nl-NL",label:"Nederlands"},{value:"pa-IN",label:"ਪੰਜਾਬੀ"},{value:"pl-PL",label:"polski"},{value:"pt-BR",label:"português (Brasil)"},{value:"pt-PT",label:"português (Portugal)"},{value:"ro-RO",label:"română"},{value:"ru-RU",label:"русский"},{value:"sk-SK",label:"slovenčina"},{value:"sl-SI",label:"slovenščina"},{value:"so-SO",label:"Soomaali"},{value:"sq-AL",label:"shqip"},{value:"sr-RS",label:"српски"},{value:"sv-SE",label:"svenska"},{value:"sw-KE",label:"Kiswahili"},{value:"ta-IN",label:"தமிழ்"},{value:"te-IN",label:"తెలుగు"},{value:"th-TH",label:"ไทย"},{value:"tl-PH",label:"Tagalog"},{value:"tr-TR",label:"Türkçe"},{value:"uk-UA",label:"українська"},{value:"ur-PK",label:"اردو"},{value:"vi-VN",label:"Tiếng Việt"},{value:"zh-Hans",label:"简体中文"},{value:"zh-Hant-HK",label:"繁體中文(香港)"},{value:"zh-Hant-TW",label:"繁體中文(台灣)"}],cxe=({value:e,onValueChange:t})=>{const[n,r]=A.useState(!1),o=l3.find(i=>i.value===e);return M.jsxs(ixe,{open:n,onOpenChange:r,children:[M.jsx(axe,{children:M.jsxs(Qa,{variant:"outline",role:"combobox","aria-expanded":n,className:"w-full justify-between",children:[o?M.jsxs("span",{children:[o.value,M.jsxs("span",{className:"text-muted-foreground",children:[" ","- ",o.label]})]}):"Select locale...",M.jsx($ne,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),M.jsx(lxe,{className:"w-full p-0",children:M.jsxs(Fwe,{children:[M.jsx(Uwe,{placeholder:"Search locale..."}),M.jsxs(Vwe,{children:[M.jsx(qwe,{children:"No locale found."}),M.jsx(Bwe,{children:l3.map(i=>M.jsxs(Hwe,{value:i.value,onSelect:a=>{t(a===e?"":a),r(!1)},children:[M.jsxs("span",{children:[i.label," ",M.jsxs("span",{className:"text-muted-foreground",children:["(",i.value,")"]})]}),M.jsx(i_,{className:Et("ml-auto h-4 w-4",e===i.value?"opacity-100":"opacity-0")})]},i.value))})]})]})})]})};function uxe({resourceUri:e}){const{data:t}=gD(e);return t?M.jsx("div",{className:"text-xs",children:M.jsx(Y0,{src:t.contents[0],name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",style:{fontSize:"0.75rem"},collapsed:4,collapseStringsAfterLength:80})}):null}const fxe=()=>{const e=ul(),{openaiRef:t,openaiObject:n,openInAppUrl:r}=Tf(e.name),{setToolData:o}=Cf(),i=e._meta?.["openai/outputTemplate"],a=(c,u)=>{const f=t?.current?.contentWindow?.openai;f&&n&&(f[c]=u,o(e.name,{openaiObject:{...n,[c]:u}}))};return n?M.jsx("div",{className:"overflow-auto max-h-full min-h-0",children:M.jsxs(Nwe,{defaultValue:"widget-state",className:"gap-0",children:[M.jsxs($we,{className:"border-b border-border w-full",children:[M.jsx(ew,{value:"properties",children:"Properties"}),M.jsx(ew,{value:"widget-state",children:"Widget State"}),i&&M.jsx(ew,{value:"resource",children:"Resource"})]}),M.jsx(tw,{value:"properties",className:"p-4",children:M.jsxs(xSe,{children:[M.jsxs(Ra,{children:[M.jsx(Oa,{children:"Display Mode"}),M.jsxs(QP,{value:n.displayMode,onValueChange:c=>a("displayMode",c),"aria-label":"Select framework",items:[{label:"Inline",value:"inline"},{label:"Fullscreen",value:"fullscreen"},{label:"Pip",value:"pip"},{label:"Modal",value:"modal"}],name:"displayMode",required:!0,children:[M.jsx(t3,{children:M.jsx(e3,{})}),M.jsx(n3,{children:M.jsxs(JP,{children:[M.jsx(Eu,{value:"inline",children:"Inline"}),M.jsx(Eu,{value:"fullscreen",children:"Fullscreen"}),M.jsx(Eu,{value:"pip",children:"Pip"}),M.jsx(Eu,{value:"modal",children:"Modal"})]})})]})]}),M.jsxs(Ra,{children:[M.jsx(Oa,{children:"Theme"}),M.jsxs(SSe,{children:[M.jsx(Qa,{variant:n.theme==="light"?"default":"outline",onClick:()=>a("theme","light"),children:M.jsx(Qne,{})}),M.jsx(Qa,{variant:n.theme==="dark"?"default":"outline",onClick:()=>a("theme","dark"),children:M.jsx(Kne,{})})]})]}),M.jsxs(Ra,{children:[M.jsx(Oa,{children:"Locale"}),M.jsx(cxe,{value:n.locale,onValueChange:c=>a("locale",c)})]}),M.jsxs(Ra,{children:[M.jsx(Oa,{children:"Max Height"}),M.jsx(QS,{type:"number",value:n.maxHeight!==void 0?String(n.maxHeight):"",onChange:c=>{const u=c.target.value.trim();a("maxHeight",u===""?void 0:Number(u))}})]}),M.jsxs(Ra,{children:[M.jsx(Oa,{children:"Safe Area Insets"}),M.jsx("div",{className:"grid grid-cols-2 gap-4",children:["top","bottom","left","right"].map(c=>{const u=c.charAt(0).toUpperCase()+c.slice(1);return M.jsxs("div",{children:[M.jsx("label",{htmlFor:`safeArea-${c}`,className:"text-xs text-muted-foreground block mb-1",children:u}),M.jsx(QS,{id:`safeArea-${c}`,type:"number",value:n.safeArea?.insets?.[c]!==void 0?String(n.safeArea.insets[c]):"0",onChange:f=>{const h=f.target.value.trim();a("safeArea",{...n.safeArea,insets:{...n.safeArea?.insets,[c]:h===""?0:Number(h)}})}})]},c)})})]}),M.jsxs(Ra,{children:[M.jsx(Oa,{children:"Device Type"}),M.jsxs(QP,{value:n.userAgent?.device?.type??"desktop",onValueChange:c=>a("userAgent",{...n.userAgent,device:{...n.userAgent?.device,type:c}}),"aria-label":"Select device type",items:[{label:"Mobile",value:"mobile"},{label:"Desktop",value:"desktop"}],name:"deviceType",required:!0,children:[M.jsx(t3,{children:M.jsx(e3,{})}),M.jsx(n3,{children:M.jsxs(JP,{children:[M.jsx(Eu,{value:"mobile",children:"Mobile"}),M.jsx(Eu,{value:"desktop",children:"Desktop"})]})})]})]}),M.jsxs(Ra,{children:[M.jsx(Oa,{children:"Capabilities"}),M.jsxs("div",{className:"flex gap-8",children:[M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx("label",{htmlFor:"hover",className:"text-xs text-muted-foreground cursor-pointer",children:"Hover"}),M.jsx(o3,{id:"hover",checked:n.userAgent?.capabilities?.hover??!1,onCheckedChange:c=>a("userAgent",{...n.userAgent,capabilities:{...n.userAgent?.capabilities,hover:c}})})]}),M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx("label",{htmlFor:"touch",className:"text-xs text-muted-foreground cursor-pointer",children:"Touch"}),M.jsx(o3,{id:"touch",checked:n.userAgent?.capabilities?.touch??!1,onCheckedChange:c=>a("userAgent",{...n.userAgent,capabilities:{...n.userAgent?.capabilities,touch:c}})})]})]})]}),M.jsxs(Ra,{children:[M.jsx(Oa,{children:"Open in App URL"}),M.jsx(QS,{type:"text",value:r??"",readOnly:!0,placeholder:"Not set",className:"font-mono text-xs"})]})]})}),M.jsx(tw,{value:"widget-state",className:"p-4",children:M.jsx(Y0,{src:n.widgetState??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",collapsed:3,collapseStringsAfterLength:80})}),i&&M.jsx(tw,{value:"resource",className:"p-4",children:M.jsx(A.Suspense,{fallback:M.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading resource..."}),children:M.jsx(uxe,{resourceUri:i})})})]})}):null};function c3(e){return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}function dxe(e,t=60){const n=JSON.stringify(e);return n.length>t?`${n.slice(0,t)}…`:n}function hxe({log:e}){const[t,n]=A.useState(!1),r=Object.keys(e.args).length>0,o=r?dxe(e.args):null;return M.jsxs(M.Fragment,{children:[r?M.jsxs("button",{type:"button",onClick:()=>n(!t),className:"flex items-center gap-2 py-1.5 px-2 text-xs font-mono border-b border-gray-200 dark:border-gray-800/50 cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800/30 w-full text-left",children:[M.jsx("span",{className:"text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]",children:c3(e.timestamp)}),M.jsx("span",{className:Et("font-semibold shrink-0 min-w-[120px]",e.type==="response"?"text-green-600 dark:text-green-400":"text-blue-600 dark:text-blue-400"),children:e.command}),M.jsx("span",{className:"text-gray-500 dark:text-gray-600 mr-1",children:t?"▼":"▶"}),M.jsx("span",{className:"text-gray-600 dark:text-gray-400 truncate flex-1 min-w-0",children:o})]}):M.jsxs("div",{className:"flex items-center gap-2 py-1.5 px-2 text-xs font-mono border-b border-gray-200 dark:border-gray-800/50",children:[M.jsx("span",{className:"text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]",children:c3(e.timestamp)}),M.jsx("span",{className:"text-blue-600 dark:text-blue-400 font-semibold shrink-0 min-w-[120px]",children:e.command})]}),t&&r&&M.jsx("div",{className:"px-2 py-2 bg-gray-50 dark:bg-gray-900/30 border-b border-gray-200 dark:border-gray-800/50",children:M.jsx("pre",{className:"text-xs font-mono text-gray-800 dark:text-gray-200 whitespace-pre-wrap overflow-x-auto",children:JSON.stringify(e.args,null,2)})})]})}function pxe(){const e=ul(),{setToolData:t}=Cf(),{openaiLogs:n}=Tf(e.name),r=A.useRef(null),o=()=>{t(e.name,{openaiLogs:[]})};return A.useEffect(()=>{const i=r.current;i&&(i.scrollTop=i.scrollHeight)},[]),M.jsxs("div",{className:"flex flex-col h-full overflow-hidden min-h-0",children:[M.jsxs("div",{className:"flex items-center justify-between mb-3 h-8 flex-none",children:[M.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-200",children:"MCP client logs"}),M.jsx("div",{className:"flex items-center gap-2",children:n.length>0&&M.jsxs(Qa,{variant:"ghost",size:"sm",onClick:o,children:[M.jsx(ere,{className:"w-3 h-3"}),"Clear"]})})]}),M.jsx("div",{ref:r,className:"overflow-auto flex-1 bg-gray-50 rounded-lg border border-gray-200 min-h-0",children:n.map(i=>M.jsx(hxe,{log:i},i.id))})]})}const mxe=Wi("relative grid w-full items-start gap-x-2 gap-y-0.5 rounded-xl border px-3.5 py-3 text-card-foreground text-sm has-[>svg]:has-data-[slot=alert-action]:grid-cols-[calc(var(--spacing)*4)_1fr_auto] has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-data-[slot=alert-action]:grid-cols-[1fr_auto] has-[>svg]:gap-x-2 [&>svg]:h-[1lh] [&>svg]:w-4",{defaultVariants:{variant:"default"},variants:{variant:{default:"bg-transparent dark:bg-input/32 [&>svg]:text-muted-foreground",error:"border-destructive/32 bg-destructive/4 [&>svg]:text-destructive",info:"border-info/32 bg-info/4 [&>svg]:text-info",success:"border-success/32 bg-success/4 [&>svg]:text-success",warning:"border-warning/32 bg-warning/4 [&>svg]:text-warning"}}});function gxe({className:e,variant:t,...n}){return M.jsx("div",{className:Et(mxe({variant:t}),e),"data-slot":"alert",role:"alert",...n})}function yxe({className:e,...t}){return M.jsx("div",{className:Et("font-medium [svg~&]:col-start-2",e),"data-slot":"alert-title",...t})}function vxe({className:e,...t}){return M.jsx("div",{className:Et("flex flex-col gap-2.5 text-muted-foreground [svg~&]:col-start-2",e),"data-slot":"alert-description",...t})}const bxe=()=>{const e=ul(),t=Tf(e.name);if(!t)return null;const n=()=>{const r=[];return t.response.content.forEach(o=>{o.type==="text"&&r.push(o.text)}),r.join(`
|
|
152
152
|
`)};return M.jsx("div",{className:"flex flex-col h-full overflow-hidden bg-card",children:M.jsx("div",{className:"p-4 overflow-auto",children:t.response?t.response.isError?M.jsxs(gxe,{variant:"error",children:[M.jsx(zne,{}),M.jsx(yxe,{children:"Error"}),M.jsx(vxe,{children:n()})]}):M.jsx("div",{className:"text-xs",children:M.jsx(Y0,{src:t.response??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",style:{fontSize:"0.75rem"},collapsed:3,collapseStringsAfterLength:80})}):null})})},F8="openai:set_globals";class Sxe extends CustomEvent{type=F8}var u3;(function(e){e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError"})(u3||(u3={}));class wxe{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(t,n){this.keyToValue.set(t,n),this.valueToKey.set(n,t)}getByKey(t){return this.keyToValue.get(t)}getByValue(t){return this.valueToKey.get(t)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}}class U8{constructor(t){this.generateIdentifier=t,this.kv=new wxe}register(t,n){this.kv.getByValue(t)||(n||(n=this.generateIdentifier(t)),this.kv.set(n,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}}class xxe extends U8{constructor(){super(t=>t.name),this.classToAllowedProps=new Map}register(t,n){typeof n=="object"?(n.allowProps&&this.classToAllowedProps.set(t,n.allowProps),super.register(t,n.identifier)):super.register(t,n)}getAllowedProps(t){return this.classToAllowedProps.get(t)}}function Exe(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function _xe(e,t){const n=Exe(e);if("find"in n)return n.find(t);const r=n;for(let o=0;o<r.length;o++){const i=r[o];if(t(i))return i}}function Sf(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function Cy(e,t){return e.indexOf(t)!==-1}function f3(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}class Cxe{constructor(){this.transfomers={}}register(t){this.transfomers[t.name]=t}findApplicable(t){return _xe(this.transfomers,n=>n.isApplicable(t))}findByName(t){return this.transfomers[t]}}const Txe=e=>Object.prototype.toString.call(e).slice(8,-1),V8=e=>typeof e>"u",Rxe=e=>e===null,Hh=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,Kx=e=>Hh(e)&&Object.keys(e).length===0,sl=e=>Array.isArray(e),Oxe=e=>typeof e=="string",Axe=e=>typeof e=="number"&&!isNaN(e),kxe=e=>typeof e=="boolean",Mxe=e=>e instanceof RegExp,Kh=e=>e instanceof Map,Gh=e=>e instanceof Set,q8=e=>Txe(e)==="Symbol",jxe=e=>e instanceof Date&&!isNaN(e.valueOf()),B8=e=>e instanceof Error,d3=e=>typeof e=="number"&&isNaN(e),Pxe=e=>kxe(e)||Rxe(e)||V8(e)||Axe(e)||Oxe(e)||q8(e),Nxe=e=>typeof e=="bigint",Dxe=e=>e===1/0||e===-1/0,$xe=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),Ixe=e=>e instanceof URL,Gx=e=>e.replace(/\\/g,"\\\\").replace(/\./g,"\\."),nw=e=>e.map(String).map(Gx).join("."),yh=(e,t)=>{const n=[];let r="";for(let i=0;i<e.length;i++){let a=e.charAt(i);if(!t&&a==="\\"){const f=e.charAt(i+1);if(f==="\\"){r+="\\",i++;continue}else if(f!==".")throw Error("invalid path")}if(a==="\\"&&e.charAt(i+1)==="."){r+=".",i++;continue}if(a==="."){n.push(r),r="";continue}r+=a}const o=r;return n.push(o),n};function qs(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const H8=[qs(V8,"undefined",()=>null,()=>{}),qs(Nxe,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),qs(jxe,"Date",e=>e.toISOString(),e=>new Date(e)),qs(B8,"Error",(e,t)=>{const n={name:e.name,message:e.message};return"cause"in e&&(n.cause=e.cause),t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n},(e,t)=>{const n=new Error(e.message,{cause:e.cause});return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n}),qs(Mxe,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),qs(Gh,"set",e=>[...e.values()],e=>new Set(e)),qs(Kh,"map",e=>[...e.entries()],e=>new Map(e)),qs(e=>d3(e)||Dxe(e),"number",e=>d3(e)?"NaN":e>0?"Infinity":"-Infinity",Number),qs(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),qs(Ixe,"URL",e=>e.toString(),e=>new URL(e))];function ov(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const K8=ov((e,t)=>q8(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const r=n.symbolRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown symbol");return r}),zxe=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),G8=ov($xe,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=zxe[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function Z8(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}const W8=ov(Z8,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const r={};return n.forEach(o=>{r[o]=e[o]}),r},(e,t,n)=>{const r=n.classRegistry.getValue(t[1]);if(!r)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(r.prototype),e)}),Y8=ov((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw new Error("Trying to deserialize unknown custom value");return r.deserialize(e)}),Lxe=[W8,K8,Y8,G8],h3=(e,t)=>{const n=f3(Lxe,o=>o.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=f3(H8,o=>o.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},X8={};H8.forEach(e=>{X8[e.annotation]=e});const Fxe=(e,t,n)=>{if(sl(t))switch(t[0]){case"symbol":return K8.untransform(e,t,n);case"class":return W8.untransform(e,t,n);case"custom":return Y8.untransform(e,t,n);case"typed-array":return G8.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=X8[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}},Fu=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function Q8(e){if(Cy(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Cy(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Cy(e,"constructor"))throw new Error("constructor is not allowed as a property")}const Uxe=(e,t)=>{Q8(t);for(let n=0;n<t.length;n++){const r=t[n];if(Gh(e))e=Fu(e,+r);else if(Kh(e)){const o=+r,i=+t[++n]==0?"key":"value",a=Fu(e,o);switch(i){case"key":e=a;break;case"value":e=e.get(a);break}}else e=e[r]}return e},Zx=(e,t,n)=>{if(Q8(t),t.length===0)return n(e);let r=e;for(let i=0;i<t.length-1;i++){const a=t[i];if(sl(r)){const c=+a;r=r[c]}else if(Hh(r))r=r[a];else if(Gh(r)){const c=+a;r=Fu(r,c)}else if(Kh(r)){if(i===t.length-2)break;const u=+a,f=+t[++i]==0?"key":"value",h=Fu(r,u);switch(f){case"key":r=h;break;case"value":r=r.get(h);break}}}const o=t[t.length-1];if(sl(r)?r[+o]=n(r[+o]):Hh(r)&&(r[o]=n(r[o])),Gh(r)){const i=Fu(r,+o),a=n(i);i!==a&&(r.delete(i),r.add(a))}if(Kh(r)){const i=+t[t.length-2],a=Fu(r,i);switch(+o==0?"key":"value"){case"key":{const u=n(a);r.set(u,r.get(a)),u!==a&&r.delete(a);break}case"value":{r.set(a,n(r.get(a)));break}}}return e},J8=e=>e<1;function Wx(e,t,n,r=[]){if(!e)return;const o=J8(n);if(!sl(e)){Sf(e,(c,u)=>Wx(c,t,n,[...r,...yh(u,o)]));return}const[i,a]=e;a&&Sf(a,(c,u)=>{Wx(c,t,n,[...r,...yh(u,o)])}),t(i,r)}function Vxe(e,t,n,r){return Wx(t,(o,i)=>{e=Zx(e,i,a=>Fxe(a,o,r))},n),e}function qxe(e,t,n){const r=J8(n);function o(i,a){const c=Uxe(e,yh(a,r));i.map(u=>yh(u,r)).forEach(u=>{e=Zx(e,u,()=>c)})}if(sl(t)){const[i,a]=t;i.forEach(c=>{e=Zx(e,yh(c,r),()=>e)}),a&&Sf(a,o)}else Sf(t,o);return e}const Bxe=(e,t)=>Hh(e)||sl(e)||Kh(e)||Gh(e)||B8(e)||Z8(e,t);function Hxe(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function Kxe(e,t){const n={};let r;return e.forEach(o=>{if(o.length<=1)return;t||(o=o.map(c=>c.map(String)).sort((c,u)=>c.length-u.length));const[i,...a]=o;i.length===0?r=a.map(nw):n[nw(i)]=a.map(nw)}),r?Kx(n)?[r]:[r,n]:Kx(n)?void 0:n}const eL=(e,t,n,r,o=[],i=[],a=new Map)=>{const c=Pxe(e);if(!c){Hxe(e,o,t);const b=a.get(e);if(b)return r?{transformedValue:null}:b}if(!Bxe(e,n)){const b=h3(e,n),y=b?{transformedValue:b.value,annotations:[b.type]}:{transformedValue:e};return c||a.set(e,y),y}if(Cy(i,e))return{transformedValue:null};const u=h3(e,n),f=u?.value??e,h=sl(f)?[]:{},p={};Sf(f,(b,y)=>{if(y==="__proto__"||y==="constructor"||y==="prototype")throw new Error(`Detected property ${y}. This is a prototype pollution risk, please remove it from your object.`);const x=eL(b,t,n,r,[...o,y],[...i,e],a);h[y]=x.transformedValue,sl(x.annotations)?p[Gx(y)]=x.annotations:Hh(x.annotations)&&Sf(x.annotations,(w,T)=>{p[Gx(y)+"."+T]=w})});const g=Kx(p)?{transformedValue:h,annotations:u?[u.type]:void 0}:{transformedValue:h,annotations:u?[u.type,p]:p};return c||a.set(e,g),g};function tL(e){return Object.prototype.toString.call(e).slice(8,-1)}function p3(e){return tL(e)==="Array"}function Gxe(e){if(tL(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function Zxe(e,t,n,r,o){const i={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";i==="enumerable"&&(e[t]=n),o&&i==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function Yx(e,t={}){if(p3(e))return e.map(o=>Yx(o,t));if(!Gxe(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((o,i)=>{if(i==="__proto__"||p3(t.props)&&!t.props.includes(i))return o;const a=e[i],c=Yx(a,t);return Zxe(o,i,c,e,t.nonenumerable),o},{})}class Nn{constructor({dedupe:t=!1}={}){this.classRegistry=new xxe,this.symbolRegistry=new U8(n=>n.description??""),this.customTransformerRegistry=new Cxe,this.allowedErrorProps=[],this.dedupe=t}serialize(t){const n=new Map,r=eL(t,n,this,this.dedupe),o={json:r.transformedValue};r.annotations&&(o.meta={...o.meta,values:r.annotations});const i=Kxe(n,this.dedupe);return i&&(o.meta={...o.meta,referentialEqualities:i}),o.meta&&(o.meta.v=1),o}deserialize(t,n){const{json:r,meta:o}=t;let i=n?.inPlace?r:Yx(r);return o?.values&&(i=Vxe(i,o.values,o.v??0,this)),o?.referentialEqualities&&(i=qxe(i,o.referentialEqualities,o.v??0)),i}stringify(t){return JSON.stringify(this.serialize(t))}parse(t){return this.deserialize(JSON.parse(t),{inPlace:!0})}registerClass(t,n){this.classRegistry.register(t,n)}registerSymbol(t,n){this.symbolRegistry.register(t,n)}registerCustom(t,n){this.customTransformerRegistry.register({name:n,...t})}allowErrorProps(...t){this.allowedErrorProps.push(...t)}}Nn.defaultInstance=new Nn;Nn.serialize=Nn.defaultInstance.serialize.bind(Nn.defaultInstance);Nn.deserialize=Nn.defaultInstance.deserialize.bind(Nn.defaultInstance);Nn.stringify=Nn.defaultInstance.stringify.bind(Nn.defaultInstance);Nn.parse=Nn.defaultInstance.parse.bind(Nn.defaultInstance);Nn.registerClass=Nn.defaultInstance.registerClass.bind(Nn.defaultInstance);Nn.registerSymbol=Nn.defaultInstance.registerSymbol.bind(Nn.defaultInstance);Nn.registerCustom=Nn.defaultInstance.registerCustom.bind(Nn.defaultInstance);Nn.allowErrorProps=Nn.defaultInstance.allowErrorProps.bind(Nn.defaultInstance);A.createContext(null);function Wxe(e,t,n,r,o){return{callTool:async(a,c)=>{t("callTool",{name:a,args:c});const u=await r(a,c??{});return t("← callTool response",u,"response"),u},sendFollowUpMessage:async a=>{t("sendFollowUpMessage",a)},openExternal:a=>{t("openExternal",a)},requestDisplayMode:async a=>(t("requestDisplayMode",a),e.displayMode=a.mode,n("displayMode",a.mode),{mode:a.mode}),setWidgetState:async a=>{t("setWidgetState",a),e.widgetState=a,n("widgetState",a)},requestModal:async a=>{t("requestModal",a),e.displayMode="modal",e.view={mode:"modal"},n("displayMode","modal")},uploadFile:async a=>(t("uploadFile",{name:a.name,size:a.size}),{fileId:"123"}),getFileDownloadUrl:async a=>(t("getFileDownloadUrl",a),{downloadUrl:"https://example.com/file.pdf"}),setOpenInAppUrl:async a=>{t("setOpenInAppUrl",a),o(a.href)}}}function Yxe(e,t){const n=["theme","userAgent","locale","maxHeight","displayMode","safeArea","toolInput","toolOutput","toolResponseMetadata","view","widgetState"];return new Proxy(e||{},{set(r,o,i,a){const c=Reflect.set(r,o,i,a);if(n.includes(o)){const u=new Sxe(F8,{detail:{globals:{[o]:i}}});t.dispatchEvent(u)}return c}})}function Xxe(e,t,n,r,o,i){const a=rp(t),c=Yxe(a,e),u=Wxe(c,n,r,o,i);zq(c,u),e.openai=c}function Qxe(e){const t=new DOMParser().parseFromString(e,"text/html"),n=t.querySelector('script[type="module"]#dev-widget-entry');if(!n)throw new Error("dev-widget-entry script not found");const r=`
|
|
153
153
|
const waitForOpenAI = () => new Promise((resolve, reject) => {
|
|
154
154
|
if (typeof window === "undefined") { reject(new Error("window is not available")); return; }
|
package/dist/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Skybridge MCP devtools</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-iMUyGeon.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-BS8tKQug.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skybridge/devtools",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.fd7dd56",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"tailwindcss-animate": "^1.0.7",
|
|
47
47
|
"tw-animate-css": "^1.4.0",
|
|
48
48
|
"zustand": "^5.0.10",
|
|
49
|
-
"skybridge": "0.0.0-dev.
|
|
49
|
+
"skybridge": "0.0.0-dev.fd7dd56"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@eslint/js": "^9.39.2",
|