LightRAG/lightrag/api/webui/assets/ui-vendor-DaJTMqwy.js
2025-07-15 11:52:34 +08:00

53 lines
89 KiB
JavaScript
Generated

import{r as c,a as Kn,b as vt,c as Zr,R as be}from"./react-vendor-CgPb4pW_.js";var Nt={exports:{}},ze={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var yn;function Jr(){if(yn)return ze;yn=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(o,r,i){var s=null;if(i!==void 0&&(s=""+i),r.key!==void 0&&(s=""+r.key),"key"in r){i={};for(var a in r)a!=="key"&&(i[a]=r[a])}else i=r;return r=i.ref,{$$typeof:e,type:o,key:s,ref:r!==void 0?r:null,props:i}}return ze.Fragment=t,ze.jsx=n,ze.jsxs=n,ze}var xn;function Qr(){return xn||(xn=1,Nt.exports=Jr()),Nt.exports}var g=Qr();function ei(e,t){const n=c.createContext(t),o=i=>{const{children:s,...a}=i,l=c.useMemo(()=>a,Object.values(a));return g.jsx(n.Provider,{value:l,children:s})};o.displayName=e+"Provider";function r(i){const s=c.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[o,r]}function Ae(e,t=[]){let n=[];function o(i,s){const a=c.createContext(s),l=n.length;n=[...n,s];const u=p=>{var y;const{scope:m,children:h,...b}=p,d=((y=m==null?void 0:m[e])==null?void 0:y[l])||a,v=c.useMemo(()=>b,Object.values(b));return g.jsx(d.Provider,{value:v,children:h})};u.displayName=i+"Provider";function f(p,m){var d;const h=((d=m==null?void 0:m[e])==null?void 0:d[l])||a,b=c.useContext(h);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[u,f]}const r=()=>{const i=n.map(s=>c.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return r.scopeName=e,[o,ti(r,...t)]}function ti(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const s=o.reduce((a,{useScope:l,scopeName:u})=>{const p=l(i)[`__scope${u}`];return{...a,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function bn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function zn(...e){return t=>{let n=!1;const o=e.map(r=>{const i=bn(r,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let r=0;r<o.length;r++){const i=o[r];typeof i=="function"?i():bn(e[r],null)}}}}function K(...e){return c.useCallback(zn(...e),e)}function I(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}var G=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},ni=Kn[" useId ".trim().toString()]||(()=>{}),oi=0;function le(e){const[t,n]=c.useState(ni());return G(()=>{n(o=>o??String(oi++))},[e]),t?`radix-${t}`:""}var ri=Kn[" useInsertionEffect ".trim().toString()]||G;function Le({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,i,s]=ii({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:r;{const f=c.useRef(e!==void 0);c.useEffect(()=>{const p=f.current;p!==a&&console.warn(`${o} is changing from ${p?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=a},[a,o])}const u=c.useCallback(f=>{var p;if(a){const m=si(f)?f(e):f;m!==e&&((p=s.current)==null||p.call(s,m))}else i(f)},[a,e,i,s]);return[l,u]}function ii({defaultProp:e,onChange:t}){const[n,o]=c.useState(e),r=c.useRef(n),i=c.useRef(t);return ri(()=>{i.current=t},[t]),c.useEffect(()=>{var s;r.current!==n&&((s=i.current)==null||s.call(i,n),r.current=n)},[n,r]),[n,o,i]}function si(e){return typeof e=="function"}function Se(e){const t=ai(e),n=c.forwardRef((o,r)=>{const{children:i,...s}=o,a=c.Children.toArray(i),l=a.find(ci);if(l){const u=l.props.children,f=a.map(p=>p===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:p);return g.jsx(t,{...s,ref:r,children:c.isValidElement(u)?c.cloneElement(u,void 0,f):null})}return g.jsx(t,{...s,ref:r,children:i})});return n.displayName=`${e}.Slot`,n}var $c=Se("Slot");function ai(e){const t=c.forwardRef((n,o)=>{const{children:r,...i}=n;if(c.isValidElement(r)){const s=ui(r),a=li(i,r.props);return r.type!==c.Fragment&&(a.ref=o?zn(o,s):s),c.cloneElement(r,a)}return c.Children.count(r)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Gn=Symbol("radix.slottable");function Bc(e){const t=({children:n})=>g.jsx(g.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Gn,t}function ci(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Gn}function li(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...a)=>{const l=i(...a);return r(...a),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function ui(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var fi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],N=fi.reduce((e,t)=>{const n=Se(`Primitive.${t}`),o=c.forwardRef((r,i)=>{const{asChild:s,...a}=r,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(l,{...a,ref:i})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function di(e,t){e&&vt.flushSync(()=>e.dispatchEvent(t))}function me(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function pi(e,t=globalThis==null?void 0:globalThis.document){const n=me(e);c.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var mi="DismissableLayer",Vt="dismissableLayer.update",vi="dismissableLayer.pointerDownOutside",hi="dismissableLayer.focusOutside",Sn,Yn=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ht=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,u=c.useContext(Yn),[f,p]=c.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=c.useState({}),b=K(t,E=>p(E)),d=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=d.indexOf(v),w=f?d.indexOf(f):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=w>=y,C=yi(E=>{const R=E.target,M=[...u.branches].some(_=>_.contains(R));!S||M||(r==null||r(E),s==null||s(E),E.defaultPrevented||a==null||a())},m),P=xi(E=>{const R=E.target;[...u.branches].some(_=>_.contains(R))||(i==null||i(E),s==null||s(E),E.defaultPrevented||a==null||a())},m);return pi(E=>{w===u.layers.size-1&&(o==null||o(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},m),c.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Sn=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Cn(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Sn)}},[f,m,n,u]),c.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Cn())},[f,u]),c.useEffect(()=>{const E=()=>h({});return document.addEventListener(Vt,E),()=>document.removeEventListener(Vt,E)},[]),g.jsx(N.div,{...l,ref:b,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,P.onFocusCapture),onBlurCapture:I(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,C.onPointerDownCapture)})});ht.displayName=mi;var gi="DismissableLayerBranch",wi=c.forwardRef((e,t)=>{const n=c.useContext(Yn),o=c.useRef(null),r=K(t,o);return c.useEffect(()=>{const i=o.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),g.jsx(N.div,{...e,ref:r})});wi.displayName=gi;function yi(e,t=globalThis==null?void 0:globalThis.document){const n=me(e),o=c.useRef(!1),r=c.useRef(()=>{});return c.useEffect(()=>{const i=a=>{if(a.target&&!o.current){let l=function(){Xn(vi,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);o.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function xi(e,t=globalThis==null?void 0:globalThis.document){const n=me(e),o=c.useRef(!1);return c.useEffect(()=>{const r=i=>{i.target&&!o.current&&Xn(hi,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Cn(){const e=new CustomEvent(Vt);document.dispatchEvent(e)}function Xn(e,t,n,{discrete:o}){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?di(r,i):r.dispatchEvent(i)}var _t="focusScope.autoFocusOnMount",Dt="focusScope.autoFocusOnUnmount",En={bubbles:!1,cancelable:!0},bi="FocusScope",gt=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:i,...s}=e,[a,l]=c.useState(null),u=me(r),f=me(i),p=c.useRef(null),m=K(t,d=>l(d)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(o){let d=function(x){if(h.paused||!a)return;const S=x.target;a.contains(S)?p.current=S:pe(p.current,{select:!0})},v=function(x){if(h.paused||!a)return;const S=x.relatedTarget;S!==null&&(a.contains(S)||pe(p.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const C of x)C.removedNodes.length>0&&pe(a)};document.addEventListener("focusin",d),document.addEventListener("focusout",v);const w=new MutationObserver(y);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",v),w.disconnect()}}},[o,a,h.paused]),c.useEffect(()=>{if(a){Pn.add(h);const d=document.activeElement;if(!a.contains(d)){const y=new CustomEvent(_t,En);a.addEventListener(_t,u),a.dispatchEvent(y),y.defaultPrevented||(Si(Ai(qn(a)),{select:!0}),document.activeElement===d&&pe(a))}return()=>{a.removeEventListener(_t,u),setTimeout(()=>{const y=new CustomEvent(Dt,En);a.addEventListener(Dt,f),a.dispatchEvent(y),y.defaultPrevented||pe(d??document.body,{select:!0}),a.removeEventListener(Dt,f),Pn.remove(h)},0)}}},[a,u,f,h]);const b=c.useCallback(d=>{if(!n&&!o||h.paused)return;const v=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,y=document.activeElement;if(v&&y){const w=d.currentTarget,[x,S]=Ci(w);x&&S?!d.shiftKey&&y===S?(d.preventDefault(),n&&pe(x,{select:!0})):d.shiftKey&&y===x&&(d.preventDefault(),n&&pe(S,{select:!0})):y===w&&d.preventDefault()}},[n,o,h.paused]);return g.jsx(N.div,{tabIndex:-1,...s,ref:m,onKeyDown:b})});gt.displayName=bi;function Si(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(pe(o,{select:t}),document.activeElement!==n)return}function Ci(e){const t=qn(e),n=Rn(t,e),o=Rn(t.reverse(),e);return[n,o]}function qn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Rn(e,t){for(const n of e)if(!Ei(n,{upTo:t}))return n}function Ei(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ri(e){return e instanceof HTMLInputElement&&"select"in e}function pe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ri(e)&&t&&e.select()}}var Pn=Pi();function Pi(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=An(e,t),e.unshift(t)},remove(t){var n;e=An(e,t),(n=e[0])==null||n.resume()}}}function An(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Ai(e){return e.filter(t=>t.tagName!=="A")}var Ti="Portal",wt=c.forwardRef((e,t)=>{var a;const{container:n,...o}=e,[r,i]=c.useState(!1);G(()=>i(!0),[]);const s=n||r&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?Zr.createPortal(g.jsx(N.div,{...o,ref:t}),s):null});wt.displayName=Ti;function Oi(e,t){return c.useReducer((n,o)=>t[n][o]??n,e)}var Te=e=>{const{present:t,children:n}=e,o=Ii(t),r=typeof n=="function"?n({present:o.isPresent}):c.Children.only(n),i=K(o.ref,Ni(r));return typeof n=="function"||o.isPresent?c.cloneElement(r,{ref:i}):null};Te.displayName="Presence";function Ii(e){const[t,n]=c.useState(),o=c.useRef(null),r=c.useRef(e),i=c.useRef("none"),s=e?"mounted":"unmounted",[a,l]=Oi(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=et(o.current);i.current=a==="mounted"?u:"none"},[a]),G(()=>{const u=o.current,f=r.current;if(f!==e){const m=i.current,h=et(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&m!==h?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),G(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=h=>{const d=et(o.current).includes(h.animationName);if(h.target===t&&d&&(l("ANIMATION_END"),!r.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},m=h=>{h.target===t&&(i.current=et(o.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:c.useCallback(u=>{o.current=u?getComputedStyle(u):null,n(u)},[])}}function et(e){return(e==null?void 0:e.animationName)||"none"}function Ni(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Mt=0;function Qt(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Tn()),document.body.insertAdjacentElement("beforeend",e[1]??Tn()),Mt++,()=>{Mt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Mt--}},[])}function Tn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var oe=function(){return oe=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},oe.apply(this,arguments)};function Zn(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function Wc(e,t,n,o){function r(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(f){try{u(o.next(f))}catch(p){s(p)}}function l(f){try{u(o.throw(f))}catch(p){s(p)}}function u(f){f.done?i(f.value):r(f.value).then(a,l)}u((o=o.apply(e,t||[])).next())})}function _i(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,i;o<r;o++)(i||!(o in t))&&(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}var st="right-scroll-bar-position",at="width-before-scroll-bar",Di="with-scroll-bars-hidden",Mi="--removed-body-scroll-bar-size";function Lt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Li(e,t){var n=c.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var Fi=typeof window<"u"?c.useLayoutEffect:c.useEffect,On=new WeakMap;function ki(e,t){var n=Li(null,function(o){return e.forEach(function(r){return Lt(r,o)})});return Fi(function(){var o=On.get(n);if(o){var r=new Set(o),i=new Set(e),s=n.current;r.forEach(function(a){i.has(a)||Lt(a,null)}),i.forEach(function(a){r.has(a)||Lt(a,s)})}On.set(n,e)},[e]),n}function ji(e){return e}function $i(e,t){t===void 0&&(t=ji);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,o);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(o=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){o=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var l=function(){var f=s;s=[],f.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),n}}}};return r}function Bi(e){e===void 0&&(e={});var t=$i(null);return t.options=oe({async:!0,ssr:!1},e),t}var Jn=function(e){var t=e.sideCar,n=Zn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return c.createElement(o,oe({},n))};Jn.isSideCarExport=!0;function Wi(e,t){return e.useMedium(t),Jn}var Qn=Bi(),Ft=function(){},yt=c.forwardRef(function(e,t){var n=c.useRef(null),o=c.useState({onScrollCapture:Ft,onWheelCapture:Ft,onTouchMoveCapture:Ft}),r=o[0],i=o[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,m=e.sideCar,h=e.noRelative,b=e.noIsolation,d=e.inert,v=e.allowPinchZoom,y=e.as,w=y===void 0?"div":y,x=e.gapMode,S=Zn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,P=ki([n,t]),E=oe(oe({},S),r);return c.createElement(c.Fragment,null,f&&c.createElement(C,{sideCar:Qn,removeScrollBar:u,shards:p,noRelative:h,noIsolation:b,inert:d,setCallbacks:i,allowPinchZoom:!!v,lockRef:n,gapMode:x}),s?c.cloneElement(c.Children.only(a),oe(oe({},E),{ref:P})):c.createElement(w,oe({},E,{className:l,ref:P}),a))});yt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yt.classNames={fullWidth:at,zeroRight:st};var Vi=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Hi(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Vi();return t&&e.setAttribute("nonce",t),e}function Ui(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ki(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var zi=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Hi())&&(Ui(t,n),Ki(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Gi=function(){var e=zi();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},eo=function(){var e=Gi(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Yi={left:0,top:0,right:0,gap:0},kt=function(e){return parseInt(e||"",10)||0},Xi=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[kt(n),kt(o),kt(r)]},qi=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Yi;var t=Xi(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Zi=eo(),De="data-scroll-locked",Ji=function(e,t,n,o){var r=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
.`.concat(Di,` {
overflow: hidden `).concat(o,`;
padding-right: `).concat(a,"px ").concat(o,`;
}
body[`).concat(De,`] {
overflow: hidden `).concat(o,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
padding-left: `.concat(r,`px;
padding-top: `).concat(i,`px;
padding-right: `).concat(s,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(a,"px ").concat(o,`;
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(o,";")].filter(Boolean).join(""),`
}
.`).concat(st,` {
right: `).concat(a,"px ").concat(o,`;
}
.`).concat(at,` {
margin-right: `).concat(a,"px ").concat(o,`;
}
.`).concat(st," .").concat(st,` {
right: 0 `).concat(o,`;
}
.`).concat(at," .").concat(at,` {
margin-right: 0 `).concat(o,`;
}
body[`).concat(De,`] {
`).concat(Mi,": ").concat(a,`px;
}
`)},In=function(){var e=parseInt(document.body.getAttribute(De)||"0",10);return isFinite(e)?e:0},Qi=function(){c.useEffect(function(){return document.body.setAttribute(De,(In()+1).toString()),function(){var e=In()-1;e<=0?document.body.removeAttribute(De):document.body.setAttribute(De,e.toString())}},[])},es=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;Qi();var i=c.useMemo(function(){return qi(r)},[r]);return c.createElement(Zi,{styles:Ji(i,!t,r,n?"":"!important")})},Ht=!1;if(typeof window<"u")try{var tt=Object.defineProperty({},"passive",{get:function(){return Ht=!0,!0}});window.addEventListener("test",tt,tt),window.removeEventListener("test",tt,tt)}catch{Ht=!1}var Ie=Ht?{passive:!1}:!1,ts=function(e){return e.tagName==="TEXTAREA"},to=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ts(e)&&n[t]==="visible")},ns=function(e){return to(e,"overflowY")},os=function(e){return to(e,"overflowX")},Nn=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=no(e,o);if(r){var i=oo(e,o),s=i[1],a=i[2];if(s>a)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},rs=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},is=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},no=function(e,t){return e==="v"?ns(t):os(t)},oo=function(e,t){return e==="v"?rs(t):is(t)},ss=function(e,t){return e==="h"&&t==="rtl"?-1:1},as=function(e,t,n,o,r){var i=ss(e,window.getComputedStyle(t).direction),s=i*o,a=n.target,l=t.contains(a),u=!1,f=s>0,p=0,m=0;do{if(!a)break;var h=oo(e,a),b=h[0],d=h[1],v=h[2],y=d-v-i*b;(b||y)&&no(e,a)&&(p+=y,m+=b);var w=a.parentNode;a=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(f&&Math.abs(p)<1||!f&&Math.abs(m)<1)&&(u=!0),u},nt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_n=function(e){return[e.deltaX,e.deltaY]},Dn=function(e){return e&&"current"in e?e.current:e},cs=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ls=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},us=0,Ne=[];function fs(e){var t=c.useRef([]),n=c.useRef([0,0]),o=c.useRef(),r=c.useState(us++)[0],i=c.useState(eo)[0],s=c.useRef(e);c.useEffect(function(){s.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var d=_i([e.lockRef.current],(e.shards||[]).map(Dn),!0).filter(Boolean);return d.forEach(function(v){return v.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),d.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(d,v){if("touches"in d&&d.touches.length===2||d.type==="wheel"&&d.ctrlKey)return!s.current.allowPinchZoom;var y=nt(d),w=n.current,x="deltaX"in d?d.deltaX:w[0]-y[0],S="deltaY"in d?d.deltaY:w[1]-y[1],C,P=d.target,E=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in d&&E==="h"&&P.type==="range")return!1;var R=Nn(E,P);if(!R)return!0;if(R?C=E:(C=E==="v"?"h":"v",R=Nn(E,P)),!R)return!1;if(!o.current&&"changedTouches"in d&&(x||S)&&(o.current=C),!C)return!0;var M=o.current||C;return as(M,v,d,M==="h"?x:S)},[]),l=c.useCallback(function(d){var v=d;if(!(!Ne.length||Ne[Ne.length-1]!==i)){var y="deltaY"in v?_n(v):nt(v),w=t.current.filter(function(C){return C.name===v.type&&(C.target===v.target||v.target===C.shadowParent)&&cs(C.delta,y)})[0];if(w&&w.should){v.cancelable&&v.preventDefault();return}if(!w){var x=(s.current.shards||[]).map(Dn).filter(Boolean).filter(function(C){return C.contains(v.target)}),S=x.length>0?a(v,x[0]):!s.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),u=c.useCallback(function(d,v,y,w){var x={name:d,delta:v,target:y,should:w,shadowParent:ds(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),f=c.useCallback(function(d){n.current=nt(d),o.current=void 0},[]),p=c.useCallback(function(d){u(d.type,_n(d),d.target,a(d,e.lockRef.current))},[]),m=c.useCallback(function(d){u(d.type,nt(d),d.target,a(d,e.lockRef.current))},[]);c.useEffect(function(){return Ne.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Ie),document.addEventListener("touchmove",l,Ie),document.addEventListener("touchstart",f,Ie),function(){Ne=Ne.filter(function(d){return d!==i}),document.removeEventListener("wheel",l,Ie),document.removeEventListener("touchmove",l,Ie),document.removeEventListener("touchstart",f,Ie)}},[]);var h=e.removeScrollBar,b=e.inert;return c.createElement(c.Fragment,null,b?c.createElement(i,{styles:ls(r)}):null,h?c.createElement(es,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ds(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ps=Wi(Qn,fs);var xt=c.forwardRef(function(e,t){return c.createElement(yt,oe({},e,{ref:t,sideCar:ps}))});xt.classNames=yt.classNames;var ms=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_e=new WeakMap,ot=new WeakMap,rt={},jt=0,ro=function(e){return e&&(e.host||ro(e.parentNode))},vs=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=ro(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},hs=function(e,t,n,o){var r=vs(t,Array.isArray(e)?e:[e]);rt[n]||(rt[n]=new WeakMap);var i=rt[n],s=[],a=new Set,l=new Set(r),u=function(p){!p||a.has(p)||(a.add(p),u(p.parentNode))};r.forEach(u);var f=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(m){if(a.has(m))f(m);else try{var h=m.getAttribute(o),b=h!==null&&h!=="false",d=(_e.get(m)||0)+1,v=(i.get(m)||0)+1;_e.set(m,d),i.set(m,v),s.push(m),d===1&&b&&ot.set(m,!0),v===1&&m.setAttribute(n,"true"),b||m.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",m,y)}})};return f(t),a.clear(),jt++,function(){s.forEach(function(p){var m=_e.get(p)-1,h=i.get(p)-1;_e.set(p,m),i.set(p,h),m||(ot.has(p)||p.removeAttribute(o),ot.delete(p)),h||p.removeAttribute(n)}),jt--,jt||(_e=new WeakMap,_e=new WeakMap,ot=new WeakMap,rt={})}},en=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=ms(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),hs(o,r,n,"aria-hidden")):function(){return null}},bt="Dialog",[io,Vc]=Ae(bt),[gs,te]=io(bt),so=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:i,modal:s=!0}=e,a=c.useRef(null),l=c.useRef(null),[u,f]=Le({prop:o,defaultProp:r??!1,onChange:i,caller:bt});return g.jsx(gs,{scope:t,triggerRef:a,contentRef:l,contentId:le(),titleId:le(),descriptionId:le(),open:u,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(p=>!p),[f]),modal:s,children:n})};so.displayName=bt;var ao="DialogTrigger",co=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(ao,n),i=K(t,r.triggerRef);return g.jsx(N.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":on(r.open),...o,ref:i,onClick:I(e.onClick,r.onOpenToggle)})});co.displayName=ao;var tn="DialogPortal",[ws,lo]=io(tn,{forceMount:void 0}),uo=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,i=te(tn,t);return g.jsx(ws,{scope:t,forceMount:n,children:c.Children.map(o,s=>g.jsx(Te,{present:n||i.open,children:g.jsx(wt,{asChild:!0,container:r,children:s})}))})};uo.displayName=tn;var lt="DialogOverlay",fo=c.forwardRef((e,t)=>{const n=lo(lt,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,i=te(lt,e.__scopeDialog);return i.modal?g.jsx(Te,{present:o||i.open,children:g.jsx(xs,{...r,ref:t})}):null});fo.displayName=lt;var ys=Se("DialogOverlay.RemoveScroll"),xs=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(lt,n);return g.jsx(xt,{as:ys,allowPinchZoom:!0,shards:[r.contentRef],children:g.jsx(N.div,{"data-state":on(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Ce="DialogContent",po=c.forwardRef((e,t)=>{const n=lo(Ce,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,i=te(Ce,e.__scopeDialog);return g.jsx(Te,{present:o||i.open,children:i.modal?g.jsx(bs,{...r,ref:t}):g.jsx(Ss,{...r,ref:t})})});po.displayName=Ce;var bs=c.forwardRef((e,t)=>{const n=te(Ce,e.__scopeDialog),o=c.useRef(null),r=K(t,n.contentRef,o);return c.useEffect(()=>{const i=o.current;if(i)return en(i)},[]),g.jsx(mo,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:I(e.onFocusOutside,i=>i.preventDefault())})}),Ss=c.forwardRef((e,t)=>{const n=te(Ce,e.__scopeDialog),o=c.useRef(!1),r=c.useRef(!1);return g.jsx(mo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(o.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:i=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(o.current=!0,i.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&r.current&&i.preventDefault()}})}),mo=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:i,...s}=e,a=te(Ce,n),l=c.useRef(null),u=K(t,l);return Qt(),g.jsxs(g.Fragment,{children:[g.jsx(gt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:i,children:g.jsx(ht,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":on(a.open),...s,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(Cs,{titleId:a.titleId}),g.jsx(Rs,{contentRef:l,descriptionId:a.descriptionId})]})]})}),nn="DialogTitle",vo=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(nn,n);return g.jsx(N.h2,{id:r.titleId,...o,ref:t})});vo.displayName=nn;var ho="DialogDescription",go=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(ho,n);return g.jsx(N.p,{id:r.descriptionId,...o,ref:t})});go.displayName=ho;var wo="DialogClose",yo=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(wo,n);return g.jsx(N.button,{type:"button",...o,ref:t,onClick:I(e.onClick,()=>r.onOpenChange(!1))})});yo.displayName=wo;function on(e){return e?"open":"closed"}var xo="DialogTitleWarning",[Hc,bo]=ei(xo,{contentName:Ce,titleName:nn,docsSlug:"dialog"}),Cs=({titleId:e})=>{const t=bo(xo),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Es="DialogDescriptionWarning",Rs=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${bo(Es).contentName}}.`;return c.useEffect(()=>{var i;const r=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Uc=so,Kc=co,zc=uo,Gc=fo,Yc=po,Xc=vo,qc=go,Zc=yo;const Ps=["top","right","bottom","left"],ve=Math.min,q=Math.max,ut=Math.round,it=Math.floor,ie=e=>({x:e,y:e}),As={left:"right",right:"left",bottom:"top",top:"bottom"},Ts={start:"end",end:"start"};function Ut(e,t,n){return q(e,ve(t,n))}function ue(e,t){return typeof e=="function"?e(t):e}function fe(e){return e.split("-")[0]}function je(e){return e.split("-")[1]}function rn(e){return e==="x"?"y":"x"}function sn(e){return e==="y"?"height":"width"}const Os=new Set(["top","bottom"]);function re(e){return Os.has(fe(e))?"y":"x"}function an(e){return rn(re(e))}function Is(e,t,n){n===void 0&&(n=!1);const o=je(e),r=an(e),i=sn(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ft(s)),[s,ft(s)]}function Ns(e){const t=ft(e);return[Kt(e),t,Kt(t)]}function Kt(e){return e.replace(/start|end/g,t=>Ts[t])}const Mn=["left","right"],Ln=["right","left"],_s=["top","bottom"],Ds=["bottom","top"];function Ms(e,t,n){switch(e){case"top":case"bottom":return n?t?Ln:Mn:t?Mn:Ln;case"left":case"right":return t?_s:Ds;default:return[]}}function Ls(e,t,n,o){const r=je(e);let i=Ms(fe(e),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),t&&(i=i.concat(i.map(Kt)))),i}function ft(e){return e.replace(/left|right|bottom|top/g,t=>As[t])}function Fs(e){return{top:0,right:0,bottom:0,left:0,...e}}function So(e){return typeof e!="number"?Fs(e):{top:e,right:e,bottom:e,left:e}}function dt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Fn(e,t,n){let{reference:o,floating:r}=e;const i=re(t),s=an(t),a=sn(s),l=fe(t),u=i==="y",f=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,m=o[a]/2-r[a]/2;let h;switch(l){case"top":h={x:f,y:o.y-r.height};break;case"bottom":h={x:f,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:p};break;case"left":h={x:o.x-r.width,y:p};break;default:h={x:o.x,y:o.y}}switch(je(t)){case"start":h[s]-=m*(n&&u?-1:1);break;case"end":h[s]+=m*(n&&u?-1:1);break}return h}const ks=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:f,y:p}=Fn(u,o,l),m=o,h={},b=0;for(let d=0;d<a.length;d++){const{name:v,fn:y}=a[d],{x:w,y:x,data:S,reset:C}=await y({x:f,y:p,initialPlacement:o,placement:m,strategy:r,middlewareData:h,rects:u,platform:s,elements:{reference:e,floating:t}});f=w??f,p=x??p,h={...h,[v]:{...h[v],...S}},C&&b<=50&&(b++,typeof C=="object"&&(C.placement&&(m=C.placement),C.rects&&(u=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):C.rects),{x:f,y:p}=Fn(u,m,l)),d=-1)}return{x:f,y:p,placement:m,strategy:r,middlewareData:h}};async function Ye(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:h=0}=ue(t,e),b=So(h),v=a[m?p==="floating"?"reference":"floating":p],y=dt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:l})),w=p==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},C=dt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:x,strategy:l}):w);return{top:(y.top-C.top+b.top)/S.y,bottom:(C.bottom-y.bottom+b.bottom)/S.y,left:(y.left-C.left+b.left)/S.x,right:(C.right-y.right+b.right)/S.x}}const js=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:f=0}=ue(e,t)||{};if(u==null)return{};const p=So(f),m={x:n,y:o},h=an(r),b=sn(h),d=await s.getDimensions(u),v=h==="y",y=v?"top":"left",w=v?"bottom":"right",x=v?"clientHeight":"clientWidth",S=i.reference[b]+i.reference[h]-m[h]-i.floating[b],C=m[h]-i.reference[h],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let E=P?P[x]:0;(!E||!await(s.isElement==null?void 0:s.isElement(P)))&&(E=a.floating[x]||i.floating[b]);const R=S/2-C/2,M=E/2-d[b]/2-1,_=ve(p[y],M),k=ve(p[w],M),B=_,L=E-d[b]-k,D=E/2-d[b]/2+R,V=Ut(B,D,L),O=!l.arrow&&je(r)!=null&&D!==V&&i.reference[b]/2-(D<B?_:k)-d[b]/2<0,F=O?D<B?D-B:D-L:0;return{[h]:m[h]+F,data:{[h]:V,centerOffset:D-V-F,...O&&{alignmentOffset:F}},reset:O}}}),$s=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:d=!0,...v}=ue(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=fe(r),w=re(a),x=fe(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=m||(x||!d?[ft(a)]:Ns(a)),P=b!=="none";!m&&P&&C.push(...Ls(a,d,b,S));const E=[a,...C],R=await Ye(t,v),M=[];let _=((o=i.flip)==null?void 0:o.overflows)||[];if(f&&M.push(R[y]),p){const D=Is(r,s,S);M.push(R[D[0]],R[D[1]])}if(_=[..._,{placement:r,overflows:M}],!M.every(D=>D<=0)){var k,B;const D=(((k=i.flip)==null?void 0:k.index)||0)+1,V=E[D];if(V&&(!(p==="alignment"?w!==re(V):!1)||_.every(A=>A.overflows[0]>0&&re(A.placement)===w)))return{data:{index:D,overflows:_},reset:{placement:V}};let O=(B=_.filter(F=>F.overflows[0]<=0).sort((F,A)=>F.overflows[1]-A.overflows[1])[0])==null?void 0:B.placement;if(!O)switch(h){case"bestFit":{var L;const F=(L=_.filter(A=>{if(P){const H=re(A.placement);return H===w||H==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(H=>H>0).reduce((H,Y)=>H+Y,0)]).sort((A,H)=>A[1]-H[1])[0])==null?void 0:L[0];F&&(O=F);break}case"initialPlacement":O=a;break}if(r!==O)return{reset:{placement:O}}}return{}}}};function kn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function jn(e){return Ps.some(t=>e[t]>=0)}const Bs=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=ue(e,t);switch(o){case"referenceHidden":{const i=await Ye(t,{...r,elementContext:"reference"}),s=kn(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:jn(s)}}}case"escaped":{const i=await Ye(t,{...r,altBoundary:!0}),s=kn(i,n.floating);return{data:{escapedOffsets:s,escaped:jn(s)}}}default:return{}}}}},Co=new Set(["left","top"]);async function Ws(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=fe(n),a=je(n),l=re(n)==="y",u=Co.has(s)?-1:1,f=i&&l?-1:1,p=ue(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof b=="number"&&(h=a==="end"?b*-1:b),l?{x:h*f,y:m*u}:{x:m*u,y:h*f}}const Vs=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:a}=t,l=await Ws(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},Hs=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:v=>{let{x:y,y:w}=v;return{x:y,y:w}}},...l}=ue(e,t),u={x:n,y:o},f=await Ye(t,l),p=re(fe(r)),m=rn(p);let h=u[m],b=u[p];if(i){const v=m==="y"?"top":"left",y=m==="y"?"bottom":"right",w=h+f[v],x=h-f[y];h=Ut(w,h,x)}if(s){const v=p==="y"?"top":"left",y=p==="y"?"bottom":"right",w=b+f[v],x=b-f[y];b=Ut(w,b,x)}const d=a.fn({...t,[m]:h,[p]:b});return{...d,data:{x:d.x-n,y:d.y-o,enabled:{[m]:i,[p]:s}}}}}},Us=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=ue(e,t),f={x:n,y:o},p=re(r),m=rn(p);let h=f[m],b=f[p];const d=ue(a,t),v=typeof d=="number"?{mainAxis:d,crossAxis:0}:{mainAxis:0,crossAxis:0,...d};if(l){const x=m==="y"?"height":"width",S=i.reference[m]-i.floating[x]+v.mainAxis,C=i.reference[m]+i.reference[x]-v.mainAxis;h<S?h=S:h>C&&(h=C)}if(u){var y,w;const x=m==="y"?"width":"height",S=Co.has(fe(r)),C=i.reference[p]-i.floating[x]+(S&&((y=s.offset)==null?void 0:y[p])||0)+(S?0:v.crossAxis),P=i.reference[p]+i.reference[x]+(S?0:((w=s.offset)==null?void 0:w[p])||0)-(S?v.crossAxis:0);b<C?b=C:b>P&&(b=P)}return{[m]:h,[p]:b}}}},Ks=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=ue(e,t),f=await Ye(t,u),p=fe(r),m=je(r),h=re(r)==="y",{width:b,height:d}=i.floating;let v,y;p==="top"||p==="bottom"?(v=p,y=m===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=p,v=m==="end"?"top":"bottom");const w=d-f.top-f.bottom,x=b-f.left-f.right,S=ve(d-f[v],w),C=ve(b-f[y],x),P=!t.middlewareData.shift;let E=S,R=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=x),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(E=w),P&&!m){const _=q(f.left,0),k=q(f.right,0),B=q(f.top,0),L=q(f.bottom,0);h?R=b-2*(_!==0||k!==0?_+k:q(f.left,f.right)):E=d-2*(B!==0||L!==0?B+L:q(f.top,f.bottom))}await l({...t,availableWidth:R,availableHeight:E});const M=await s.getDimensions(a.floating);return b!==M.width||d!==M.height?{reset:{rects:!0}}:{}}}};function St(){return typeof window<"u"}function $e(e){return Eo(e)?(e.nodeName||"").toLowerCase():"#document"}function Z(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ae(e){var t;return(t=(Eo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Eo(e){return St()?e instanceof Node||e instanceof Z(e).Node:!1}function Q(e){return St()?e instanceof Element||e instanceof Z(e).Element:!1}function se(e){return St()?e instanceof HTMLElement||e instanceof Z(e).HTMLElement:!1}function $n(e){return!St()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Z(e).ShadowRoot}const zs=new Set(["inline","contents"]);function qe(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!zs.has(r)}const Gs=new Set(["table","td","th"]);function Ys(e){return Gs.has($e(e))}const Xs=[":popover-open",":modal"];function Ct(e){return Xs.some(t=>{try{return e.matches(t)}catch{return!1}})}const qs=["transform","translate","scale","rotate","perspective"],Zs=["transform","translate","scale","rotate","perspective","filter"],Js=["paint","layout","strict","content"];function cn(e){const t=ln(),n=Q(e)?ee(e):e;return qs.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Zs.some(o=>(n.willChange||"").includes(o))||Js.some(o=>(n.contain||"").includes(o))}function Qs(e){let t=he(e);for(;se(t)&&!Fe(t);){if(cn(t))return t;if(Ct(t))return null;t=he(t)}return null}function ln(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ea=new Set(["html","body","#document"]);function Fe(e){return ea.has($e(e))}function ee(e){return Z(e).getComputedStyle(e)}function Et(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function he(e){if($e(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$n(e)&&e.host||ae(e);return $n(t)?t.host:t}function Ro(e){const t=he(e);return Fe(t)?e.ownerDocument?e.ownerDocument.body:e.body:se(t)&&qe(t)?t:Ro(t)}function Xe(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Ro(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),s=Z(r);if(i){const a=zt(s);return t.concat(s,s.visualViewport||[],qe(r)?r:[],a&&n?Xe(a):[])}return t.concat(r,Xe(r,[],n))}function zt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Po(e){const t=ee(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=se(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,a=ut(n)!==i||ut(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function un(e){return Q(e)?e:e.contextElement}function Me(e){const t=un(e);if(!se(t))return ie(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Po(t);let s=(i?ut(n.width):n.width)/o,a=(i?ut(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const ta=ie(0);function Ao(e){const t=Z(e);return!ln()||!t.visualViewport?ta:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function na(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Z(e)?!1:t}function Ee(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=un(e);let s=ie(1);t&&(o?Q(o)&&(s=Me(o)):s=Me(e));const a=na(i,n,o)?Ao(i):ie(0);let l=(r.left+a.x)/s.x,u=(r.top+a.y)/s.y,f=r.width/s.x,p=r.height/s.y;if(i){const m=Z(i),h=o&&Q(o)?Z(o):o;let b=m,d=zt(b);for(;d&&o&&h!==b;){const v=Me(d),y=d.getBoundingClientRect(),w=ee(d),x=y.left+(d.clientLeft+parseFloat(w.paddingLeft))*v.x,S=y.top+(d.clientTop+parseFloat(w.paddingTop))*v.y;l*=v.x,u*=v.y,f*=v.x,p*=v.y,l+=x,u+=S,b=Z(d),d=zt(b)}}return dt({width:f,height:p,x:l,y:u})}function fn(e,t){const n=Et(e).scrollLeft;return t?t.left+n:Ee(ae(e)).left+n}function To(e,t,n){n===void 0&&(n=!1);const o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-(n?0:fn(e,o)),i=o.top+t.scrollTop;return{x:r,y:i}}function oa(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",s=ae(o),a=t?Ct(t.floating):!1;if(o===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=ie(1);const f=ie(0),p=se(o);if((p||!p&&!i)&&(($e(o)!=="body"||qe(s))&&(l=Et(o)),se(o))){const h=Ee(o);u=Me(o),f.x=h.x+o.clientLeft,f.y=h.y+o.clientTop}const m=s&&!p&&!i?To(s,l,!0):ie(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x+m.x,y:n.y*u.y-l.scrollTop*u.y+f.y+m.y}}function ra(e){return Array.from(e.getClientRects())}function ia(e){const t=ae(e),n=Et(e),o=e.ownerDocument.body,r=q(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=q(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+fn(e);const a=-n.scrollTop;return ee(o).direction==="rtl"&&(s+=q(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}function sa(e,t){const n=Z(e),o=ae(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,l=0;if(r){i=r.width,s=r.height;const u=ln();(!u||u&&t==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:a,y:l}}const aa=new Set(["absolute","fixed"]);function ca(e,t){const n=Ee(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=se(e)?Me(e):ie(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=r*i.x,u=o*i.y;return{width:s,height:a,x:l,y:u}}function Bn(e,t,n){let o;if(t==="viewport")o=sa(e,n);else if(t==="document")o=ia(ae(e));else if(Q(t))o=ca(t,n);else{const r=Ao(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return dt(o)}function Oo(e,t){const n=he(e);return n===t||!Q(n)||Fe(n)?!1:ee(n).position==="fixed"||Oo(n,t)}function la(e,t){const n=t.get(e);if(n)return n;let o=Xe(e,[],!1).filter(a=>Q(a)&&$e(a)!=="body"),r=null;const i=ee(e).position==="fixed";let s=i?he(e):e;for(;Q(s)&&!Fe(s);){const a=ee(s),l=cn(s);!l&&a.position==="fixed"&&(r=null),(i?!l&&!r:!l&&a.position==="static"&&!!r&&aa.has(r.position)||qe(s)&&!l&&Oo(e,s))?o=o.filter(f=>f!==s):r=a,s=he(s)}return t.set(e,o),o}function ua(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const s=[...n==="clippingAncestors"?Ct(t)?[]:la(t,this._c):[].concat(n),o],a=s[0],l=s.reduce((u,f)=>{const p=Bn(t,f,r);return u.top=q(p.top,u.top),u.right=ve(p.right,u.right),u.bottom=ve(p.bottom,u.bottom),u.left=q(p.left,u.left),u},Bn(t,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function fa(e){const{width:t,height:n}=Po(e);return{width:t,height:n}}function da(e,t,n){const o=se(t),r=ae(t),i=n==="fixed",s=Ee(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=ie(0);function u(){l.x=fn(r)}if(o||!o&&!i)if(($e(t)!=="body"||qe(r))&&(a=Et(t)),o){const h=Ee(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else r&&u();i&&!o&&r&&u();const f=r&&!o&&!i?To(r,a):ie(0),p=s.left+a.scrollLeft-l.x-f.x,m=s.top+a.scrollTop-l.y-f.y;return{x:p,y:m,width:s.width,height:s.height}}function $t(e){return ee(e).position==="static"}function Wn(e,t){if(!se(e)||ee(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ae(e)===n&&(n=n.ownerDocument.body),n}function Io(e,t){const n=Z(e);if(Ct(e))return n;if(!se(e)){let r=he(e);for(;r&&!Fe(r);){if(Q(r)&&!$t(r))return r;r=he(r)}return n}let o=Wn(e,t);for(;o&&Ys(o)&&$t(o);)o=Wn(o,t);return o&&Fe(o)&&$t(o)&&!cn(o)?n:o||Qs(e)||n}const pa=async function(e){const t=this.getOffsetParent||Io,n=this.getDimensions,o=await n(e.floating);return{reference:da(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function ma(e){return ee(e).direction==="rtl"}const va={convertOffsetParentRelativeRectToViewportRelativeRect:oa,getDocumentElement:ae,getClippingRect:ua,getOffsetParent:Io,getElementRects:pa,getClientRects:ra,getDimensions:fa,getScale:Me,isElement:Q,isRTL:ma};function No(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ha(e,t){let n=null,o;const r=ae(e);function i(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:f,top:p,width:m,height:h}=u;if(a||t(),!m||!h)return;const b=it(p),d=it(r.clientWidth-(f+m)),v=it(r.clientHeight-(p+h)),y=it(f),x={rootMargin:-b+"px "+-d+"px "+-v+"px "+-y+"px",threshold:q(0,ve(1,l))||1};let S=!0;function C(P){const E=P[0].intersectionRatio;if(E!==l){if(!S)return s();E?s(!1,E):o=setTimeout(()=>{s(!1,1e-7)},1e3)}E===1&&!No(u,e.getBoundingClientRect())&&s(),S=!1}try{n=new IntersectionObserver(C,{...x,root:r.ownerDocument})}catch{n=new IntersectionObserver(C,x)}n.observe(e)}return s(!0),i}function ga(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=un(e),f=r||i?[...u?Xe(u):[],...Xe(t)]:[];f.forEach(y=>{r&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const p=u&&a?ha(u,n):null;let m=-1,h=null;s&&(h=new ResizeObserver(y=>{let[w]=y;w&&w.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let b,d=l?Ee(e):null;l&&v();function v(){const y=Ee(e);d&&!No(d,y)&&n(),d=y,b=requestAnimationFrame(v)}return n(),()=>{var y;f.forEach(w=>{r&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),p==null||p(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(b)}}const wa=Vs,ya=Hs,xa=$s,ba=Ks,Sa=Bs,Vn=js,Ca=Us,Ea=(e,t,n)=>{const o=new Map,r={platform:va,...n},i={...r.platform,_c:o};return ks(e,t,{...r,platform:i})};var Ra=typeof document<"u",Pa=function(){},ct=Ra?c.useLayoutEffect:Pa;function pt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!pt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!pt(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function _o(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Hn(e,t){const n=_o(e);return Math.round(t*n)/n}function Bt(e){const t=c.useRef(e);return ct(()=>{t.current=e}),t}function Aa(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[f,p]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=c.useState(o);pt(m,o)||h(o);const[b,d]=c.useState(null),[v,y]=c.useState(null),w=c.useCallback(A=>{A!==P.current&&(P.current=A,d(A))},[]),x=c.useCallback(A=>{A!==E.current&&(E.current=A,y(A))},[]),S=i||b,C=s||v,P=c.useRef(null),E=c.useRef(null),R=c.useRef(f),M=l!=null,_=Bt(l),k=Bt(r),B=Bt(u),L=c.useCallback(()=>{if(!P.current||!E.current)return;const A={placement:t,strategy:n,middleware:m};k.current&&(A.platform=k.current),Ea(P.current,E.current,A).then(H=>{const Y={...H,isPositioned:B.current!==!1};D.current&&!pt(R.current,Y)&&(R.current=Y,vt.flushSync(()=>{p(Y)}))})},[m,t,n,k,B]);ct(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,p(A=>({...A,isPositioned:!1})))},[u]);const D=c.useRef(!1);ct(()=>(D.current=!0,()=>{D.current=!1}),[]),ct(()=>{if(S&&(P.current=S),C&&(E.current=C),S&&C){if(_.current)return _.current(S,C,L);L()}},[S,C,L,_,M]);const V=c.useMemo(()=>({reference:P,floating:E,setReference:w,setFloating:x}),[w,x]),O=c.useMemo(()=>({reference:S,floating:C}),[S,C]),F=c.useMemo(()=>{const A={position:n,left:0,top:0};if(!O.floating)return A;const H=Hn(O.floating,f.x),Y=Hn(O.floating,f.y);return a?{...A,transform:"translate("+H+"px, "+Y+"px)",..._o(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:Y}},[n,a,O.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:L,refs:V,elements:O,floatingStyles:F}),[f,L,V,O,F])}const Ta=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Vn({element:o.current,padding:r}).fn(n):{}:o?Vn({element:o,padding:r}).fn(n):{}}}},Oa=(e,t)=>({...wa(e),options:[e,t]}),Ia=(e,t)=>({...ya(e),options:[e,t]}),Na=(e,t)=>({...Ca(e),options:[e,t]}),_a=(e,t)=>({...xa(e),options:[e,t]}),Da=(e,t)=>({...ba(e),options:[e,t]}),Ma=(e,t)=>({...Sa(e),options:[e,t]}),La=(e,t)=>({...Ta(e),options:[e,t]});var Fa="Arrow",Do=c.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...i}=e;return g.jsx(N.svg,{...i,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});Do.displayName=Fa;var ka=Do;function ja(e){const[t,n]=c.useState(void 0);return G(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let s,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,a=u.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var dn="Popper",[Mo,Rt]=Ae(dn),[$a,Lo]=Mo(dn),Fo=e=>{const{__scopePopper:t,children:n}=e,[o,r]=c.useState(null);return g.jsx($a,{scope:t,anchor:o,onAnchorChange:r,children:n})};Fo.displayName=dn;var ko="PopperAnchor",jo=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,i=Lo(ko,n),s=c.useRef(null),a=K(t,s);return c.useEffect(()=>{i.onAnchorChange((o==null?void 0:o.current)||s.current)}),o?null:g.jsx(N.div,{...r,ref:a})});jo.displayName=ko;var pn="PopperContent",[Ba,Wa]=Mo(pn),$o=c.forwardRef((e,t)=>{var T,U,z,W,j,$;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:h="optimized",onPlaced:b,...d}=e,v=Lo(pn,n),[y,w]=c.useState(null),x=K(t,X=>w(X)),[S,C]=c.useState(null),P=ja(S),E=(P==null?void 0:P.width)??0,R=(P==null?void 0:P.height)??0,M=o+(i!=="center"?"-"+i:""),_=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},k=Array.isArray(u)?u:[u],B=k.length>0,L={padding:_,boundary:k.filter(Ha),altBoundary:B},{refs:D,floatingStyles:V,placement:O,isPositioned:F,middlewareData:A}=Aa({strategy:"fixed",placement:M,whileElementsMounted:(...X)=>ga(...X,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Oa({mainAxis:r+R,alignmentAxis:s}),l&&Ia({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Na():void 0,...L}),l&&_a({...L}),Da({...L,apply:({elements:X,rects:ne,availableWidth:He,availableHeight:Ue})=>{const{width:Ke,height:qr}=ne.reference,Qe=X.floating.style;Qe.setProperty("--radix-popper-available-width",`${He}px`),Qe.setProperty("--radix-popper-available-height",`${Ue}px`),Qe.setProperty("--radix-popper-anchor-width",`${Ke}px`),Qe.setProperty("--radix-popper-anchor-height",`${qr}px`)}}),S&&La({element:S,padding:a}),Ua({arrowWidth:E,arrowHeight:R}),m&&Ma({strategy:"referenceHidden",...L})]}),[H,Y]=Vo(O),ce=me(b);G(()=>{F&&(ce==null||ce())},[F,ce]);const We=(T=A.arrow)==null?void 0:T.x,Ve=(U=A.arrow)==null?void 0:U.y,de=((z=A.arrow)==null?void 0:z.centerOffset)!==0,[Oe,xe]=c.useState();return G(()=>{y&&xe(window.getComputedStyle(y).zIndex)},[y]),g.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:F?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Oe,"--radix-popper-transform-origin":[(W=A.transformOrigin)==null?void 0:W.x,(j=A.transformOrigin)==null?void 0:j.y].join(" "),...(($=A.hide)==null?void 0:$.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(Ba,{scope:n,placedSide:H,onArrowChange:C,arrowX:We,arrowY:Ve,shouldHideArrow:de,children:g.jsx(N.div,{"data-side":H,"data-align":Y,...d,ref:x,style:{...d.style,animation:F?void 0:"none"}})})})});$o.displayName=pn;var Bo="PopperArrow",Va={top:"bottom",right:"left",bottom:"top",left:"right"},Wo=c.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,i=Wa(Bo,o),s=Va[i.placedSide];return g.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:g.jsx(ka,{...r,ref:n,style:{...r.style,display:"block"}})})});Wo.displayName=Bo;function Ha(e){return e!==null}var Ua=e=>({name:"transformOrigin",options:e,fn(t){var v,y,w;const{placement:n,rects:o,middlewareData:r}=t,s=((v=r.arrow)==null?void 0:v.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,f]=Vo(n),p={start:"0%",center:"50%",end:"100%"}[f],m=(((y=r.arrow)==null?void 0:y.x)??0)+a/2,h=(((w=r.arrow)==null?void 0:w.y)??0)+l/2;let b="",d="";return u==="bottom"?(b=s?p:`${m}px`,d=`${-l}px`):u==="top"?(b=s?p:`${m}px`,d=`${o.floating.height+l}px`):u==="right"?(b=`${-l}px`,d=s?p:`${h}px`):u==="left"&&(b=`${o.floating.width+l}px`,d=s?p:`${h}px`),{data:{x:b,y:d}}}});function Vo(e){const[t,n="center"]=e.split("-");return[t,n]}var Ho=Fo,mn=jo,Uo=$o,Ko=Wo,zo=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Ka="VisuallyHidden",Go=c.forwardRef((e,t)=>g.jsx(N.span,{...e,ref:t,style:{...zo,...e.style}}));Go.displayName=Ka;var Jc=Go,Pt="Popover",[Yo,Qc]=Ae(Pt,[Rt]),Ze=Rt(),[za,ge]=Yo(Pt),Xo=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:i,modal:s=!1}=e,a=Ze(t),l=c.useRef(null),[u,f]=c.useState(!1),[p,m]=Le({prop:o,defaultProp:r??!1,onChange:i,caller:Pt});return g.jsx(Ho,{...a,children:g.jsx(za,{scope:t,contentId:le(),triggerRef:l,open:p,onOpenChange:m,onOpenToggle:c.useCallback(()=>m(h=>!h),[m]),hasCustomAnchor:u,onCustomAnchorAdd:c.useCallback(()=>f(!0),[]),onCustomAnchorRemove:c.useCallback(()=>f(!1),[]),modal:s,children:n})})};Xo.displayName=Pt;var qo="PopoverAnchor",Ga=c.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=ge(qo,n),i=Ze(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=r;return c.useEffect(()=>(s(),()=>a()),[s,a]),g.jsx(mn,{...i,...o,ref:t})});Ga.displayName=qo;var Zo="PopoverTrigger",Jo=c.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=ge(Zo,n),i=Ze(n),s=K(t,r.triggerRef),a=g.jsx(N.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":or(r.open),...o,ref:s,onClick:I(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?a:g.jsx(mn,{asChild:!0,...i,children:a})});Jo.displayName=Zo;var vn="PopoverPortal",[Ya,Xa]=Yo(vn,{forceMount:void 0}),Qo=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,i=ge(vn,t);return g.jsx(Ya,{scope:t,forceMount:n,children:g.jsx(Te,{present:n||i.open,children:g.jsx(wt,{asChild:!0,container:r,children:o})})})};Qo.displayName=vn;var ke="PopoverContent",er=c.forwardRef((e,t)=>{const n=Xa(ke,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,i=ge(ke,e.__scopePopover);return g.jsx(Te,{present:o||i.open,children:i.modal?g.jsx(Za,{...r,ref:t}):g.jsx(Ja,{...r,ref:t})})});er.displayName=ke;var qa=Se("PopoverContent.RemoveScroll"),Za=c.forwardRef((e,t)=>{const n=ge(ke,e.__scopePopover),o=c.useRef(null),r=K(t,o),i=c.useRef(!1);return c.useEffect(()=>{const s=o.current;if(s)return en(s)},[]),g.jsx(xt,{as:qa,allowPinchZoom:!0,children:g.jsx(tr,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),i.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,u=a.button===2||l;i.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:I(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),Ja=c.forwardRef((e,t)=>{const n=ge(ke,e.__scopePopover),o=c.useRef(!1),r=c.useRef(!1);return g.jsx(tr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(o.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:i=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(o.current=!0,i.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&r.current&&i.preventDefault()}})}),tr=c.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:f,...p}=e,m=ge(ke,n),h=Ze(n);return Qt(),g.jsx(gt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:i,children:g.jsx(ht,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>m.onOpenChange(!1),children:g.jsx(Uo,{"data-state":or(m.open),role:"dialog",id:m.contentId,...h,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),nr="PopoverClose",Qa=c.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=ge(nr,n);return g.jsx(N.button,{type:"button",...o,ref:t,onClick:I(e.onClick,()=>r.onOpenChange(!1))})});Qa.displayName=nr;var ec="PopoverArrow",tc=c.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ze(n);return g.jsx(Ko,{...r,...o,ref:t})});tc.displayName=ec;function or(e){return e?"open":"closed"}var el=Xo,tl=Jo,nl=Qo,ol=er;function Un(e,[t,n]){return Math.min(n,Math.max(t,e))}function rr(e){const t=e+"CollectionProvider",[n,o]=Ae(t),[r,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=d=>{const{scope:v,children:y}=d,w=be.useRef(null),x=be.useRef(new Map).current;return g.jsx(r,{scope:v,itemMap:x,collectionRef:w,children:y})};s.displayName=t;const a=e+"CollectionSlot",l=Se(a),u=be.forwardRef((d,v)=>{const{scope:y,children:w}=d,x=i(a,y),S=K(v,x.collectionRef);return g.jsx(l,{ref:S,children:w})});u.displayName=a;const f=e+"CollectionItemSlot",p="data-radix-collection-item",m=Se(f),h=be.forwardRef((d,v)=>{const{scope:y,children:w,...x}=d,S=be.useRef(null),C=K(v,S),P=i(f,y);return be.useEffect(()=>(P.itemMap.set(S,{ref:S,...x}),()=>void P.itemMap.delete(S))),g.jsx(m,{[p]:"",ref:C,children:w})});h.displayName=f;function b(d){const v=i(e+"CollectionConsumer",d);return be.useCallback(()=>{const w=v.collectionRef.current;if(!w)return[];const x=Array.from(w.querySelectorAll(`[${p}]`));return Array.from(v.itemMap.values()).sort((P,E)=>x.indexOf(P.ref.current)-x.indexOf(E.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:h},b,o]}var nc=c.createContext(void 0);function hn(e){const t=c.useContext(nc);return e||t||"ltr"}function oc(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var rc=[" ","Enter","ArrowUp","ArrowDown"],ic=[" ","Enter"],Re="Select",[At,Tt,sc]=rr(Re),[Be,rl]=Ae(Re,[sc,Rt]),Ot=Rt(),[ac,we]=Be(Re),[cc,lc]=Be(Re),ir=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:i,value:s,defaultValue:a,onValueChange:l,dir:u,name:f,autoComplete:p,disabled:m,required:h,form:b}=e,d=Ot(t),[v,y]=c.useState(null),[w,x]=c.useState(null),[S,C]=c.useState(!1),P=hn(u),[E,R]=Le({prop:o,defaultProp:r??!1,onChange:i,caller:Re}),[M,_]=Le({prop:s,defaultProp:a,onChange:l,caller:Re}),k=c.useRef(null),B=v?b||!!v.closest("form"):!0,[L,D]=c.useState(new Set),V=Array.from(L).map(O=>O.props.value).join(";");return g.jsx(Ho,{...d,children:g.jsxs(ac,{required:h,scope:t,trigger:v,onTriggerChange:y,valueNode:w,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:le(),value:M,onValueChange:_,open:E,onOpenChange:R,dir:P,triggerPointerDownPosRef:k,disabled:m,children:[g.jsx(At.Provider,{scope:t,children:g.jsx(cc,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(O=>{D(F=>new Set(F).add(O))},[]),onNativeOptionRemove:c.useCallback(O=>{D(F=>{const A=new Set(F);return A.delete(O),A})},[]),children:n})}),B?g.jsxs(Ir,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:p,value:M,onChange:O=>_(O.target.value),disabled:m,form:b,children:[M===void 0?g.jsx("option",{value:""}):null,Array.from(L)]},V):null]})})};ir.displayName=Re;var sr="SelectTrigger",ar=c.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,i=Ot(n),s=we(sr,n),a=s.disabled||o,l=K(t,s.onTriggerChange),u=Tt(n),f=c.useRef("touch"),[p,m,h]=_r(d=>{const v=u().filter(x=>!x.disabled),y=v.find(x=>x.value===s.value),w=Dr(v,d,y);w!==void 0&&s.onValueChange(w.value)}),b=d=>{a||(s.onOpenChange(!0),h()),d&&(s.triggerPointerDownPosRef.current={x:Math.round(d.pageX),y:Math.round(d.pageY)})};return g.jsx(mn,{asChild:!0,...i,children:g.jsx(N.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Nr(s.value)?"":void 0,...r,ref:l,onClick:I(r.onClick,d=>{d.currentTarget.focus(),f.current!=="mouse"&&b(d)}),onPointerDown:I(r.onPointerDown,d=>{f.current=d.pointerType;const v=d.target;v.hasPointerCapture(d.pointerId)&&v.releasePointerCapture(d.pointerId),d.button===0&&d.ctrlKey===!1&&d.pointerType==="mouse"&&(b(d),d.preventDefault())}),onKeyDown:I(r.onKeyDown,d=>{const v=p.current!=="";!(d.ctrlKey||d.altKey||d.metaKey)&&d.key.length===1&&m(d.key),!(v&&d.key===" ")&&rc.includes(d.key)&&(b(),d.preventDefault())})})})});ar.displayName=sr;var cr="SelectValue",lr=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:i,placeholder:s="",...a}=e,l=we(cr,n),{onValueNodeHasChildrenChange:u}=l,f=i!==void 0,p=K(t,l.onValueNodeChange);return G(()=>{u(f)},[u,f]),g.jsx(N.span,{...a,ref:p,style:{pointerEvents:"none"},children:Nr(l.value)?g.jsx(g.Fragment,{children:s}):i})});lr.displayName=cr;var uc="SelectIcon",ur=c.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return g.jsx(N.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});ur.displayName=uc;var fc="SelectPortal",fr=e=>g.jsx(wt,{asChild:!0,...e});fr.displayName=fc;var Pe="SelectContent",dr=c.forwardRef((e,t)=>{const n=we(Pe,e.__scopeSelect),[o,r]=c.useState();if(G(()=>{r(new DocumentFragment)},[]),!n.open){const i=o;return i?vt.createPortal(g.jsx(pr,{scope:e.__scopeSelect,children:g.jsx(At.Slot,{scope:e.__scopeSelect,children:g.jsx("div",{children:e.children})})}),i):null}return g.jsx(mr,{...e,ref:t})});dr.displayName=Pe;var J=10,[pr,ye]=Be(Pe),dc="SelectContentImpl",pc=Se("SelectContent.RemoveScroll"),mr=c.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:s,side:a,sideOffset:l,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:m,collisionPadding:h,sticky:b,hideWhenDetached:d,avoidCollisions:v,...y}=e,w=we(Pe,n),[x,S]=c.useState(null),[C,P]=c.useState(null),E=K(t,T=>S(T)),[R,M]=c.useState(null),[_,k]=c.useState(null),B=Tt(n),[L,D]=c.useState(!1),V=c.useRef(!1);c.useEffect(()=>{if(x)return en(x)},[x]),Qt();const O=c.useCallback(T=>{const[U,...z]=B().map($=>$.ref.current),[W]=z.slice(-1),j=document.activeElement;for(const $ of T)if($===j||($==null||$.scrollIntoView({block:"nearest"}),$===U&&C&&(C.scrollTop=0),$===W&&C&&(C.scrollTop=C.scrollHeight),$==null||$.focus(),document.activeElement!==j))return},[B,C]),F=c.useCallback(()=>O([R,x]),[O,R,x]);c.useEffect(()=>{L&&F()},[L,F]);const{onOpenChange:A,triggerPointerDownPosRef:H}=w;c.useEffect(()=>{if(x){let T={x:0,y:0};const U=W=>{var j,$;T={x:Math.abs(Math.round(W.pageX)-(((j=H.current)==null?void 0:j.x)??0)),y:Math.abs(Math.round(W.pageY)-((($=H.current)==null?void 0:$.y)??0))}},z=W=>{T.x<=10&&T.y<=10?W.preventDefault():x.contains(W.target)||A(!1),document.removeEventListener("pointermove",U),H.current=null};return H.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",z,{capture:!0})}}},[x,A,H]),c.useEffect(()=>{const T=()=>A(!1);return window.addEventListener("blur",T),window.addEventListener("resize",T),()=>{window.removeEventListener("blur",T),window.removeEventListener("resize",T)}},[A]);const[Y,ce]=_r(T=>{const U=B().filter(j=>!j.disabled),z=U.find(j=>j.ref.current===document.activeElement),W=Dr(U,T,z);W&&setTimeout(()=>W.ref.current.focus())}),We=c.useCallback((T,U,z)=>{const W=!V.current&&!z;(w.value!==void 0&&w.value===U||W)&&(M(T),W&&(V.current=!0))},[w.value]),Ve=c.useCallback(()=>x==null?void 0:x.focus(),[x]),de=c.useCallback((T,U,z)=>{const W=!V.current&&!z;(w.value!==void 0&&w.value===U||W)&&k(T)},[w.value]),Oe=o==="popper"?Gt:vr,xe=Oe===Gt?{side:a,sideOffset:l,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:m,collisionPadding:h,sticky:b,hideWhenDetached:d,avoidCollisions:v}:{};return g.jsx(pr,{scope:n,content:x,viewport:C,onViewportChange:P,itemRefCallback:We,selectedItem:R,onItemLeave:Ve,itemTextRefCallback:de,focusSelectedItem:F,selectedItemText:_,position:o,isPositioned:L,searchRef:Y,children:g.jsx(xt,{as:pc,allowPinchZoom:!0,children:g.jsx(gt,{asChild:!0,trapped:w.open,onMountAutoFocus:T=>{T.preventDefault()},onUnmountAutoFocus:I(r,T=>{var U;(U=w.trigger)==null||U.focus({preventScroll:!0}),T.preventDefault()}),children:g.jsx(ht,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:T=>T.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:g.jsx(Oe,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:T=>T.preventDefault(),...y,...xe,onPlaced:()=>D(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:I(y.onKeyDown,T=>{const U=T.ctrlKey||T.altKey||T.metaKey;if(T.key==="Tab"&&T.preventDefault(),!U&&T.key.length===1&&ce(T.key),["ArrowUp","ArrowDown","Home","End"].includes(T.key)){let W=B().filter(j=>!j.disabled).map(j=>j.ref.current);if(["ArrowUp","End"].includes(T.key)&&(W=W.slice().reverse()),["ArrowUp","ArrowDown"].includes(T.key)){const j=T.target,$=W.indexOf(j);W=W.slice($+1)}setTimeout(()=>O(W)),T.preventDefault()}})})})})})})});mr.displayName=dc;var mc="SelectItemAlignedPosition",vr=c.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,i=we(Pe,n),s=ye(Pe,n),[a,l]=c.useState(null),[u,f]=c.useState(null),p=K(t,E=>f(E)),m=Tt(n),h=c.useRef(!1),b=c.useRef(!0),{viewport:d,selectedItem:v,selectedItemText:y,focusSelectedItem:w}=s,x=c.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&u&&d&&v&&y){const E=i.trigger.getBoundingClientRect(),R=u.getBoundingClientRect(),M=i.valueNode.getBoundingClientRect(),_=y.getBoundingClientRect();if(i.dir!=="rtl"){const j=_.left-R.left,$=M.left-j,X=E.left-$,ne=E.width+X,He=Math.max(ne,R.width),Ue=window.innerWidth-J,Ke=Un($,[J,Math.max(J,Ue-He)]);a.style.minWidth=ne+"px",a.style.left=Ke+"px"}else{const j=R.right-_.right,$=window.innerWidth-M.right-j,X=window.innerWidth-E.right-$,ne=E.width+X,He=Math.max(ne,R.width),Ue=window.innerWidth-J,Ke=Un($,[J,Math.max(J,Ue-He)]);a.style.minWidth=ne+"px",a.style.right=Ke+"px"}const k=m(),B=window.innerHeight-J*2,L=d.scrollHeight,D=window.getComputedStyle(u),V=parseInt(D.borderTopWidth,10),O=parseInt(D.paddingTop,10),F=parseInt(D.borderBottomWidth,10),A=parseInt(D.paddingBottom,10),H=V+O+L+A+F,Y=Math.min(v.offsetHeight*5,H),ce=window.getComputedStyle(d),We=parseInt(ce.paddingTop,10),Ve=parseInt(ce.paddingBottom,10),de=E.top+E.height/2-J,Oe=B-de,xe=v.offsetHeight/2,T=v.offsetTop+xe,U=V+O+T,z=H-U;if(U<=de){const j=k.length>0&&v===k[k.length-1].ref.current;a.style.bottom="0px";const $=u.clientHeight-d.offsetTop-d.offsetHeight,X=Math.max(Oe,xe+(j?Ve:0)+$+F),ne=U+X;a.style.height=ne+"px"}else{const j=k.length>0&&v===k[0].ref.current;a.style.top="0px";const X=Math.max(de,V+d.offsetTop+(j?We:0)+xe)+z;a.style.height=X+"px",d.scrollTop=U-de+d.offsetTop}a.style.margin=`${J}px 0`,a.style.minHeight=Y+"px",a.style.maxHeight=B+"px",o==null||o(),requestAnimationFrame(()=>h.current=!0)}},[m,i.trigger,i.valueNode,a,u,d,v,y,i.dir,o]);G(()=>x(),[x]);const[S,C]=c.useState();G(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const P=c.useCallback(E=>{E&&b.current===!0&&(x(),w==null||w(),b.current=!1)},[x,w]);return g.jsx(hc,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:P,children:g.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:g.jsx(N.div,{...r,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});vr.displayName=mc;var vc="SelectPopperPosition",Gt=c.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=J,...i}=e,s=Ot(n);return g.jsx(Uo,{...s,...i,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Gt.displayName=vc;var[hc,gn]=Be(Pe,{}),Yt="SelectViewport",hr=c.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,i=ye(Yt,n),s=gn(Yt,n),a=K(t,i.onViewportChange),l=c.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),g.jsx(At.Slot,{scope:n,children:g.jsx(N.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:I(r.onScroll,u=>{const f=u.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:m}=s;if(m!=null&&m.current&&p){const h=Math.abs(l.current-f.scrollTop);if(h>0){const b=window.innerHeight-J*2,d=parseFloat(p.style.minHeight),v=parseFloat(p.style.height),y=Math.max(d,v);if(y<b){const w=y+h,x=Math.min(b,w),S=w-x;p.style.height=x+"px",p.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,p.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});hr.displayName=Yt;var gr="SelectGroup",[gc,wc]=Be(gr),wr=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=le();return g.jsx(gc,{scope:n,id:r,children:g.jsx(N.div,{role:"group","aria-labelledby":r,...o,ref:t})})});wr.displayName=gr;var yr="SelectLabel",xr=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=wc(yr,n);return g.jsx(N.div,{id:r.id,...o,ref:t})});xr.displayName=yr;var mt="SelectItem",[yc,br]=Be(mt),Sr=c.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:i,...s}=e,a=we(mt,n),l=ye(mt,n),u=a.value===o,[f,p]=c.useState(i??""),[m,h]=c.useState(!1),b=K(t,w=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,w,o,r)}),d=le(),v=c.useRef("touch"),y=()=>{r||(a.onValueChange(o),a.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(yc,{scope:n,value:o,disabled:r,textId:d,isSelected:u,onItemTextChange:c.useCallback(w=>{p(x=>x||((w==null?void 0:w.textContent)??"").trim())},[]),children:g.jsx(At.ItemSlot,{scope:n,value:o,disabled:r,textValue:f,children:g.jsx(N.div,{role:"option","aria-labelledby":d,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:b,onFocus:I(s.onFocus,()=>h(!0)),onBlur:I(s.onBlur,()=>h(!1)),onClick:I(s.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:I(s.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:I(s.onPointerDown,w=>{v.current=w.pointerType}),onPointerMove:I(s.onPointerMove,w=>{var x;v.current=w.pointerType,r?(x=l.onItemLeave)==null||x.call(l):v.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:I(s.onPointerLeave,w=>{var x;w.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:I(s.onKeyDown,w=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&w.key===" "||(ic.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});Sr.displayName=mt;var Ge="SelectItemText",Cr=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...i}=e,s=we(Ge,n),a=ye(Ge,n),l=br(Ge,n),u=lc(Ge,n),[f,p]=c.useState(null),m=K(t,y=>p(y),l.onItemTextChange,y=>{var w;return(w=a.itemTextRefCallback)==null?void 0:w.call(a,y,l.value,l.disabled)}),h=f==null?void 0:f.textContent,b=c.useMemo(()=>g.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:d,onNativeOptionRemove:v}=u;return G(()=>(d(b),()=>v(b)),[d,v,b]),g.jsxs(g.Fragment,{children:[g.jsx(N.span,{id:l.textId,...i,ref:m}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?vt.createPortal(i.children,s.valueNode):null]})});Cr.displayName=Ge;var Er="SelectItemIndicator",Rr=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return br(Er,n).isSelected?g.jsx(N.span,{"aria-hidden":!0,...o,ref:t}):null});Rr.displayName=Er;var Xt="SelectScrollUpButton",Pr=c.forwardRef((e,t)=>{const n=ye(Xt,e.__scopeSelect),o=gn(Xt,e.__scopeSelect),[r,i]=c.useState(!1),s=K(t,o.onScrollButtonChange);return G(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollTop>0;i(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),r?g.jsx(Tr,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});Pr.displayName=Xt;var qt="SelectScrollDownButton",Ar=c.forwardRef((e,t)=>{const n=ye(qt,e.__scopeSelect),o=gn(qt,e.__scopeSelect),[r,i]=c.useState(!1),s=K(t,o.onScrollButtonChange);return G(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)<u;i(f)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),r?g.jsx(Tr,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});Ar.displayName=qt;var Tr=c.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,i=ye("SelectScrollButton",n),s=c.useRef(null),a=Tt(n),l=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>l(),[l]),G(()=>{var f;const u=a().find(p=>p.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[a]),g.jsx(N.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:I(r.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:I(r.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:I(r.onPointerLeave,()=>{l()})})}),xc="SelectSeparator",Or=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return g.jsx(N.div,{"aria-hidden":!0,...o,ref:t})});Or.displayName=xc;var Zt="SelectArrow",bc=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Ot(n),i=we(Zt,n),s=ye(Zt,n);return i.open&&s.position==="popper"?g.jsx(Ko,{...r,...o,ref:t}):null});bc.displayName=Zt;var Sc="SelectBubbleInput",Ir=c.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=c.useRef(null),i=K(o,r),s=oc(t);return c.useEffect(()=>{const a=r.current;if(!a)return;const l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&f){const p=new Event("change",{bubbles:!0});f.call(a,t),a.dispatchEvent(p)}},[s,t]),g.jsx(N.select,{...n,style:{...zo,...n.style},ref:i,defaultValue:t})});Ir.displayName=Sc;function Nr(e){return e===""||e===void 0}function _r(e){const t=me(e),n=c.useRef(""),o=c.useRef(0),r=c.useCallback(s=>{const a=n.current+s;t(a),function l(u){n.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),i=c.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,i]}function Dr(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=Cc(e,Math.max(i,0));r.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function Cc(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var il=ir,sl=ar,al=lr,cl=ur,ll=fr,ul=dr,fl=hr,dl=wr,pl=xr,ml=Sr,vl=Cr,hl=Rr,gl=Pr,wl=Ar,yl=Or,Wt="rovingFocusGroup.onEntryFocus",Ec={bubbles:!1,cancelable:!0},Je="RovingFocusGroup",[Jt,Mr,Rc]=rr(Je),[Pc,Lr]=Ae(Je,[Rc]),[Ac,Tc]=Pc(Je),Fr=c.forwardRef((e,t)=>g.jsx(Jt.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(Jt.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(Oc,{...e,ref:t})})}));Fr.displayName=Je;var Oc=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=e,m=c.useRef(null),h=K(t,m),b=hn(i),[d,v]=Le({prop:s,defaultProp:a??null,onChange:l,caller:Je}),[y,w]=c.useState(!1),x=me(u),S=Mr(n),C=c.useRef(!1),[P,E]=c.useState(0);return c.useEffect(()=>{const R=m.current;if(R)return R.addEventListener(Wt,x),()=>R.removeEventListener(Wt,x)},[x]),g.jsx(Ac,{scope:n,orientation:o,dir:b,loop:r,currentTabStopId:d,onItemFocus:c.useCallback(R=>v(R),[v]),onItemShiftTab:c.useCallback(()=>w(!0),[]),onFocusableItemAdd:c.useCallback(()=>E(R=>R+1),[]),onFocusableItemRemove:c.useCallback(()=>E(R=>R-1),[]),children:g.jsx(N.div,{tabIndex:y||P===0?-1:0,"data-orientation":o,...p,ref:h,style:{outline:"none",...e.style},onMouseDown:I(e.onMouseDown,()=>{C.current=!0}),onFocus:I(e.onFocus,R=>{const M=!C.current;if(R.target===R.currentTarget&&M&&!y){const _=new CustomEvent(Wt,Ec);if(R.currentTarget.dispatchEvent(_),!_.defaultPrevented){const k=S().filter(O=>O.focusable),B=k.find(O=>O.active),L=k.find(O=>O.id===d),V=[B,L,...k].filter(Boolean).map(O=>O.ref.current);$r(V,f)}}C.current=!1}),onBlur:I(e.onBlur,()=>w(!1))})})}),kr="RovingFocusGroupItem",jr=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:i,children:s,...a}=e,l=le(),u=i||l,f=Tc(kr,n),p=f.currentTabStopId===u,m=Mr(n),{onFocusableItemAdd:h,onFocusableItemRemove:b,currentTabStopId:d}=f;return c.useEffect(()=>{if(o)return h(),()=>b()},[o,h,b]),g.jsx(Jt.ItemSlot,{scope:n,id:u,focusable:o,active:r,children:g.jsx(N.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...a,ref:t,onMouseDown:I(e.onMouseDown,v=>{o?f.onItemFocus(u):v.preventDefault()}),onFocus:I(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:I(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=_c(v,f.orientation,f.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let x=m().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")x.reverse();else if(y==="prev"||y==="next"){y==="prev"&&x.reverse();const S=x.indexOf(v.currentTarget);x=f.loop?Dc(x,S+1):x.slice(S+1)}setTimeout(()=>$r(x))}}),children:typeof s=="function"?s({isCurrentTabStop:p,hasTabStop:d!=null}):s})})});jr.displayName=kr;var Ic={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Nc(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function _c(e,t,n){const o=Nc(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Ic[o]}function $r(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function Dc(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Mc=Fr,Lc=jr,It="Tabs",[Fc,xl]=Ae(It,[Lr]),Br=Lr(),[kc,wn]=Fc(It),Wr=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:r,defaultValue:i,orientation:s="horizontal",dir:a,activationMode:l="automatic",...u}=e,f=hn(a),[p,m]=Le({prop:o,onChange:r,defaultProp:i??"",caller:It});return g.jsx(kc,{scope:n,baseId:le(),value:p,onValueChange:m,orientation:s,dir:f,activationMode:l,children:g.jsx(N.div,{dir:f,"data-orientation":s,...u,ref:t})})});Wr.displayName=It;var Vr="TabsList",Hr=c.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...r}=e,i=wn(Vr,n),s=Br(n);return g.jsx(Mc,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:o,children:g.jsx(N.div,{role:"tablist","aria-orientation":i.orientation,...r,ref:t})})});Hr.displayName=Vr;var Ur="TabsTrigger",Kr=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:r=!1,...i}=e,s=wn(Ur,n),a=Br(n),l=Yr(s.baseId,o),u=Xr(s.baseId,o),f=o===s.value;return g.jsx(Lc,{asChild:!0,...a,focusable:!r,active:f,children:g.jsx(N.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...i,ref:t,onMouseDown:I(e.onMouseDown,p=>{!r&&p.button===0&&p.ctrlKey===!1?s.onValueChange(o):p.preventDefault()}),onKeyDown:I(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&s.onValueChange(o)}),onFocus:I(e.onFocus,()=>{const p=s.activationMode!=="manual";!f&&!r&&p&&s.onValueChange(o)})})})});Kr.displayName=Ur;var zr="TabsContent",Gr=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:r,children:i,...s}=e,a=wn(zr,n),l=Yr(a.baseId,o),u=Xr(a.baseId,o),f=o===a.value,p=c.useRef(f);return c.useEffect(()=>{const m=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(m)},[]),g.jsx(Te,{present:r||f,children:({present:m})=>g.jsx(N.div,{"data-state":f?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!m,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:m&&i})})});Gr.displayName=zr;function Yr(e,t){return`${e}-trigger-${t}`}function Xr(e,t){return`${e}-content-${t}`}var bl=Wr,Sl=Hr,Cl=Kr,El=Gr;export{Hc as $,mn as A,G as B,Uo as C,ht as D,Un as E,sl as F,gl as G,wl as H,cl as I,ll as J,ul as K,pl as L,ml as M,hl as N,Gc as O,Te as P,vl as Q,Jc as R,$c as S,Xc as T,yl as U,fl as V,il as W,al as X,dl as Y,Vc as Z,Wc as _,Rt as a,Sl as a0,Cl as a1,El as a2,bl as a3,Bc as b,Ae as c,le as d,Le as e,Ho as f,N as g,I as h,Ko as i,g as j,zc as k,Yc as l,Zc as m,qc as n,Uc as o,Kc as p,nl as q,ol as r,el as s,tl as t,K as u,zn as v,oc as w,ja as x,hn as y,me as z};