lizaui 3.0.52 → 3.0.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "lizaui",
3
3
  "private": false,
4
4
  "license": "ISC",
5
- "version": "3.0.52",
5
+ "version": "3.0.53",
6
6
  "type": "module",
7
7
  "main": "dist/index.cjs.js",
8
8
  "module": "dist/index.es.js",
@@ -1,65 +0,0 @@
1
- "use strict";const p=require("./jsx-runtime-DFswc9zO.js"),R=require("react"),ae=require("./variants-BUTPDD09.js"),ps=require("./tv-C5lw0tnu.js"),Se=require("./bundle-mjs-Bta93uUH.js"),ue=require("./utils-B759n5Vp.js"),ke=require("./clsx-C11secjj.js"),ms=require("./pattern-F8jUniwt.js");require("./assertion-C7nbUE-q.js");const Xn=require("./label-error-8p4Smomu.js"),kt=require("./proxy-CGmtXjej.js"),oe=require("./index-D2_xS2pD.js"),gs=require("./button-BnNW_eev.js"),hs=require("./ripple-CPzedX6a.js"),Yn=require("react-dom"),je=require("./floating-ui.react-dom-BPdJyHFN.js"),vs=require("./floating-ui.dom-CZ9SJ4ip.js");function Zn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const l=Zn(R),sn=Zn(Yn),xs=ps.tv({slots:{base:["relative","inline-flex","shrink-0"],badge:["flex","z-10","flex-wrap","absolute","box-border","rounded-full","whitespace-nowrap","place-content-center","origin-center","items-center","text-inherit","select-none","font-regular","scale-100","opacity-100","subpixel-antialiased","data-[invisible=true]:scale-0","data-[invisible=true]:opacity-0"]},variants:{variant:{solid:{},flat:{},faded:{badge:"border-medium"},shadow:{}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},size:{sm:{badge:"px-1 text-xs"},md:{badge:"px-1 text-sm"},lg:{badge:"px-1 text-sm"}},placement:{"top-right":{},"top-left":{},"bottom-right":{},"bottom-left":{}},shape:{circle:{},rectangle:{}},isInvisible:{true:{}},isOneChar:{true:{badge:"px-0"}},isDot:{true:{}},disableAnimation:{true:{badge:"transition-none"},false:{badge:"transition-transform-opacity !ease-soft-spring !duration-300"}},showOutline:{true:{badge:"border-2 border-background"},false:{badge:"border-transparent border-0"}}},defaultVariants:{variant:"solid",color:"default",size:"md",shape:"rectangle",placement:"top-right",showOutline:!0,isInvisible:!1},compoundVariants:[{variant:"solid",color:"default",class:{badge:ae.colorVariants.solid.default}},{variant:"solid",color:"primary",class:{badge:ae.colorVariants.solid.primary}},{variant:"solid",color:"secondary",class:{badge:ae.colorVariants.solid.secondary}},{variant:"solid",color:"success",class:{badge:ae.colorVariants.solid.success}},{variant:"solid",color:"warning",class:{badge:ae.colorVariants.solid.warning}},{variant:"solid",color:"danger",class:{badge:ae.colorVariants.solid.danger}},{variant:"shadow",color:"default",class:{badge:ae.colorVariants.shadow.default}},{variant:"shadow",color:"primary",class:{badge:ae.colorVariants.shadow.primary}},{variant:"shadow",color:"secondary",class:{badge:ae.colorVariants.shadow.secondary}},{variant:"shadow",color:"success",class:{badge:ae.colorVariants.shadow.success}},{variant:"shadow",color:"warning",class:{badge:ae.colorVariants.shadow.warning}},{variant:"shadow",color:"danger",class:{badge:ae.colorVariants.shadow.danger}},{variant:"flat",color:"default",class:{badge:ae.colorVariants.flat.default}},{variant:"flat",color:"primary",class:{badge:ae.colorVariants.flat.primary}},{variant:"flat",color:"secondary",class:{badge:ae.colorVariants.flat.secondary}},{variant:"flat",color:"success",class:{badge:ae.colorVariants.flat.success}},{variant:"flat",color:"warning",class:{badge:ae.colorVariants.flat.warning}},{variant:"flat",color:"danger",class:{badge:ae.colorVariants.flat.danger}},{variant:"faded",color:"default",class:{badge:ae.colorVariants.faded.default}},{variant:"faded",color:"primary",class:{badge:ae.colorVariants.faded.primary}},{variant:"faded",color:"secondary",class:{badge:ae.colorVariants.faded.secondary}},{variant:"faded",color:"success",class:{badge:ae.colorVariants.faded.success}},{variant:"faded",color:"warning",class:{badge:ae.colorVariants.faded.warning}},{variant:"faded",color:"danger",class:{badge:ae.colorVariants.faded.danger}},{isOneChar:!0,size:"sm",class:{badge:"w-4 h-4 min-w-4 min-h-4"}},{isOneChar:!0,size:"md",class:{badge:"w-5 h-5 min-w-5 min-h-5"}},{isOneChar:!0,size:"lg",class:{badge:"w-6 h-6 min-w-6 min-h-6"}},{isDot:!0,size:"sm",class:{badge:"w-3 h-3 min-w-3 min-h-3"}},{isDot:!0,size:"md",class:{badge:"w-3.5 h-3.5 min-w-3.5 min-h-3.5"}},{isDot:!0,size:"lg",class:{badge:"w-4 h-4 min-w-4 min-h-4"}},{placement:"top-right",shape:"rectangle",class:{badge:"top-[5%] right-[5%] translate-x-1/2 -translate-y-1/2"}},{placement:"top-left",shape:"rectangle",class:{badge:"top-[5%] left-[5%] -translate-x-1/2 -translate-y-1/2"}},{placement:"bottom-right",shape:"rectangle",class:{badge:"bottom-[5%] right-[5%] translate-x-1/2 translate-y-1/2"}},{placement:"bottom-left",shape:"rectangle",class:{badge:"bottom-[5%] left-[5%] -translate-x-1/2 translate-y-1/2"}},{placement:"top-right",shape:"circle",class:{badge:"top-[10%] right-[10%] translate-x-1/2 -translate-y-1/2"}},{placement:"top-left",shape:"circle",class:{badge:"top-[10%] left-[10%] -translate-x-1/2 -translate-y-1/2"}},{placement:"bottom-right",shape:"circle",class:{badge:"bottom-[10%] right-[10%] translate-x-1/2 translate-y-1/2"}},{placement:"bottom-left",shape:"circle",class:{badge:"bottom-[10%] left-[10%] -translate-x-1/2 translate-y-1/2"}}]}),ys=l.forwardRef(({className:e,variant:t,size:n,color:r,children:s,content:o,shape:i,placement:a,...c},u)=>{const{base:g,badge:m}=xs({variant:t,size:n,color:r,shape:i,placement:a});return p.jsxRuntimeExports.jsxs("div",{className:g(),children:[s,p.jsxRuntimeExports.jsx("span",{ref:u,className:m({class:e}),...c,children:o})]})}),Rn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Pn=ke.clsx,an=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Pn(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(u=>{const g=n==null?void 0:n[u],m=o==null?void 0:o[u];if(g===null)return null;const f=Rn(g)||Rn(m);return s[u][f]}),a=n&&Object.entries(n).reduce((u,g)=>{let[m,f]=g;return f===void 0||(u[m]=f),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,g)=>{let{class:m,className:f,...x}=g;return Object.entries(x).every(b=>{let[d,h]=b;return Array.isArray(h)?h.includes({...o,...a}[d]):{...o,...a}[d]===h})?[...u,m,f]:u},[]);return Pn(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},bs=an(["bg-white","transition duration-250 ease appearance-none file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex w-full min-w-0 border px-3 py-1 text-base transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm focus-visible:border-primary focus-visible:ring-primary/20 focus-visible:ring-[3px] aria-invalid:ring-danger/20 dark:aria-invalid:ring-danger/40 font-normal aria-invalid:border-danger"],{variants:{size:{sm:"h-9 text-sm",md:"h-10 text-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",radius:"md"}}),Jn=l.forwardRef((e,t)=>{const{id:n,type:r="text",value:s,defaultValue:o,className:i,classNameContainer:a,startClassName:c,endClassName:u,size:g,radius:m,startContent:f,endContent:x,disabled:b,error:d,touched:h,pattern:v,isErrorText:y=!0,label:E,required:C=!1,isClearable:M=!1,onChange:I,onClear:S,...B}=e,_=l.useId(),F=n||_,G=s!==void 0,k=!b&&!!d&&h,$=ke.clsx("absolute top-0 h-full flex items-center cursor-pointer px-1.5 z-[1]",{"text-red-700":k,"text-gray-400":b,"text-green-700":!d&&h,"text-gray-500":!k}),X=ke.clsx(f&&"pl-8",!f&&"pl-2.5",x&&"pr-8",!x&&"pr-2.5"),q=ue.cn(bs({size:g,radius:m}),X,i),U=ue.cn("block font-normal text-sm text-foreground mb-1",{"text-danger":k}),te=J=>{const fe=J.target.value;v&&!ms.validatePatternInput(v,fe)||I==null||I(J)},Q=J=>{J.preventDefault(),S==null||S()};return p.jsxRuntimeExports.jsxs("div",{className:Se.twMerge("w-full relative flex flex-col",a),children:[E&&p.jsxRuntimeExports.jsxs("label",{htmlFor:F,className:U,children:[E," ",C&&p.jsxRuntimeExports.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxRuntimeExports.jsxs("div",{className:"w-full relative",children:[f&&p.jsxRuntimeExports.jsx("div",{className:Se.twMerge("left-1",$,c),children:f}),p.jsxRuntimeExports.jsx("input",{ref:t,id:F,...b?{}:{"aria-invalid":k},type:r,autoComplete:"off",autoCapitalize:"off",disabled:b,onChange:te,className:q,...G?{value:s}:{defaultValue:o},...B}),M&&!b&&s?p.jsxRuntimeExports.jsx("div",{className:Se.twMerge("absolute top-0 h-full flex items-center px-1.5 z-[1] opacity-70 hover:opacity-100 cursor-pointer rounded-full","right-1"),onClick:Q,children:p.jsxRuntimeExports.jsx("svg",{"aria-hidden":"true",focusable:"false",height:"18",viewBox:"0 0 24 24",width:"18",children:p.jsxRuntimeExports.jsx("path",{d:"M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",fill:"currentColor"})})}):null,x&&p.jsxRuntimeExports.jsx("div",{className:Se.twMerge("right-1",$,u),children:x})]}),!b&&d&&h&&y&&p.jsxRuntimeExports.jsx(Xn.LabelError,{text:d})]})});Jn.displayName="Input";var Es=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ee=Es.reduce((e,t)=>{const n=oe.createSlot(`Primitive.${t}`),r=l.forwardRef((s,o)=>{const{asChild:i,...a}=s,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsxRuntimeExports.jsx(c,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Qn(e,t){e&&sn.flushSync(()=>e.dispatchEvent(t))}const ws=an(["flex items-center cursor-pointer relative rounded-full p-0.5 px-1 relative overflow-hidden"],{variants:{color:{primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger",default:"bg-default"},size:{sm:"w-10 h-6",md:"w-12 h-7",lg:"w-14 h-8"}},defaultVariants:{color:"primary",size:"md"}}),er=({id:e=null,color:t,size:n="md",className:r,disabled:s=!1,label:o,description:i,positionLabel:a="end",required:c,error:u,touched:g,value:m,leftIcon:f,rightIcon:x,thumbIcon:b,onChange:d,...h})=>{const v=R.useId(),y=e||v,[E,C]=R.useState(!1);R.useEffect(()=>{C(m)},[m]);const M=G=>{d(G.target.checked)},I=()=>{s||d(!E)},S=Se.twMerge("transition transform bg-white rounded-full shadow-sm flex justify-center items-center",ke.clsx(n==="sm"&&"w-4 h-4",n==="md"&&"w-5 h-5",n==="lg"&&"w-6 h-6",n==="sm"&&E&&"translate-x-4",n==="md"&&E&&"translate-x-5",n==="lg"&&E&&"translate-x-6")),B=Se.twMerge(ke.clsx(!E&&"bg-default-200",s&&"bg-default-100 hover:bg-default-100")),_=Se.twMerge("text-gray-500 leading-none",ke.clsx({"text-sm":n==="sm"||n==="md","after:content-['*'] after:ml-0.5 after:text-green-500":c,"after:text-gray-400 text-gray-400":s})),F=Se.twMerge("text-xs text-gray-500 mt-1",s&&"text-gray-400");return p.jsxRuntimeExports.jsxs("div",{className:Se.twMerge(r),children:[p.jsxRuntimeExports.jsxs("div",{className:ke.clsx("flex gap-2",i&&o?"items-start":"items-center"),children:[a==="start"&&(o||i)&&p.jsxRuntimeExports.jsxs("div",{onClick:I,className:"cursor-pointer",children:[o&&p.jsxRuntimeExports.jsx("p",{className:_,children:o}),i&&p.jsxRuntimeExports.jsx("p",{className:F,children:i})]}),p.jsxRuntimeExports.jsxs("label",{htmlFor:y,className:ue.cn(ws({size:n,color:t}),B),children:[p.jsxRuntimeExports.jsx("input",{type:"checkbox",id:y,className:"sr-only peer",onChange:M,disabled:s,checked:E,"data-state":E?"checked":"unchecked",...h}),f&&p.jsxRuntimeExports.jsx(kt.motion.div,{initial:!1,animate:E?{scale:1,opacity:1}:{scale:0,opacity:0},transition:{type:"spring",bounce:0},className:"absolute left-1 top-1/2 -translate-y-1/2 text-neutral-400",children:f}),x&&p.jsxRuntimeExports.jsx(kt.motion.div,{initial:!1,animate:E?{scale:0,opacity:0}:{scale:1,opacity:1},transition:{type:"spring",bounce:0},className:"absolute right-1 top-1/2 -translate-y-1/2 text-neutral-400",children:x}),p.jsxRuntimeExports.jsx("span",{className:S,children:b&&p.jsxRuntimeExports.jsx(kt.motion.div,{initial:!1,animate:{scale:1},className:"flex items-center justify-center",children:b})})]}),a==="end"&&(o||i)&&p.jsxRuntimeExports.jsxs("div",{onClick:I,className:"cursor-pointer",children:[o&&p.jsxRuntimeExports.jsx("p",{className:_,children:o}),i&&p.jsxRuntimeExports.jsx("p",{className:F,children:i})]})]}),!s&&u&&g&&p.jsxRuntimeExports.jsx(Xn.LabelError,{text:u})]})};er.displayName="Switch";function re(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function Ss(e,t){const n=l.createContext(t),r=o=>{const{children:i,...a}=o,c=l.useMemo(()=>a,Object.values(a));return p.jsxRuntimeExports.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function s(o){const i=l.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,s]}function st(e,t=[]){let n=[];function r(o,i){const a=l.createContext(i),c=n.length;n=[...n,i];const u=m=>{var v;const{scope:f,children:x,...b}=m,d=((v=f==null?void 0:f[e])==null?void 0:v[c])||a,h=l.useMemo(()=>b,Object.values(b));return p.jsxRuntimeExports.jsx(d.Provider,{value:h,children:x})};u.displayName=o+"Provider";function g(m,f){var d;const x=((d=f==null?void 0:f[e])==null?void 0:d[c])||a,b=l.useContext(x);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${m}\` must be used within \`${o}\``)}return[u,g]}const s=()=>{const o=n.map(i=>l.createContext(i));return function(a){const c=(a==null?void 0:a[e])||o;return l.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return s.scopeName=e,[r,Cs(s,...t)]}function Cs(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=r.reduce((a,{useScope:c,scopeName:u})=>{const m=c(o)[`__scope${u}`];return{...a,...m}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var de=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},Rs=l[" useInsertionEffect ".trim().toString()]||de;function ht({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,o,i]=Ps({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:s;{const g=l.useRef(e!==void 0);l.useEffect(()=>{const m=g.current;if(m!==a){const f=m?"controlled":"uncontrolled",x=a?"controlled":"uncontrolled"}g.current=a},[a,r])}const u=l.useCallback(g=>{var m;if(a){const f=js(g)?g(e):g;f!==e&&((m=i.current)==null||m.call(i,f))}else o(g)},[a,e,o,i]);return[c,u]}function Ps({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),s=l.useRef(n),o=l.useRef(t);return Rs(()=>{o.current=t},[t]),l.useEffect(()=>{var i;s.current!==n&&((i=o.current)==null||i.call(o,n),s.current=n)},[n,s]),[n,r,o]}function js(e){return typeof e=="function"}function tr(e){const t=e+"CollectionProvider",[n,r]=st(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=d=>{const{scope:h,children:v}=d,y=R.useRef(null),E=R.useRef(new Map).current;return p.jsxRuntimeExports.jsx(s,{scope:h,itemMap:E,collectionRef:y,children:v})};i.displayName=t;const a=e+"CollectionSlot",c=oe.createSlot(a),u=R.forwardRef((d,h)=>{const{scope:v,children:y}=d,E=o(a,v),C=oe.useComposedRefs(h,E.collectionRef);return p.jsxRuntimeExports.jsx(c,{ref:C,children:y})});u.displayName=a;const g=e+"CollectionItemSlot",m="data-radix-collection-item",f=oe.createSlot(g),x=R.forwardRef((d,h)=>{const{scope:v,children:y,...E}=d,C=R.useRef(null),M=oe.useComposedRefs(h,C),I=o(g,v);return R.useEffect(()=>(I.itemMap.set(C,{ref:C,...E}),()=>void I.itemMap.delete(C))),p.jsxRuntimeExports.jsx(f,{[m]:"",ref:M,children:y})});x.displayName=g;function b(d){const h=o(e+"CollectionConsumer",d);return R.useCallback(()=>{const y=h.collectionRef.current;if(!y)return[];const E=Array.from(y.querySelectorAll(`[${m}]`));return Array.from(h.itemMap.values()).sort((I,S)=>E.indexOf(I.ref.current)-E.indexOf(S.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:i,Slot:u,ItemSlot:x},b,r]}var Ns=l.createContext(void 0);function nr(e){const t=l.useContext(Ns);return e||t||"ltr"}function De(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Is(e,t=globalThis==null?void 0:globalThis.document){const n=De(e);l.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var As="DismissableLayer",Yt="dismissableLayer.update",Ds="dismissableLayer.pointerDownOutside",Ms="dismissableLayer.focusOutside",jn,rr=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wt=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...c}=e,u=l.useContext(rr),[g,m]=l.useState(null),f=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=l.useState({}),b=oe.useComposedRefs(t,S=>m(S)),d=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=d.indexOf(h),y=g?d.indexOf(g):-1,E=u.layersWithOutsidePointerEventsDisabled.size>0,C=y>=v,M=zs(S=>{const B=S.target,_=[...u.branches].some(F=>F.contains(B));!C||_||(s==null||s(S),i==null||i(S),S.defaultPrevented||a==null||a())},f),I=Os(S=>{const B=S.target;[...u.branches].some(F=>F.contains(B))||(o==null||o(S),i==null||i(S),S.defaultPrevented||a==null||a())},f);return Is(S=>{y===u.layers.size-1&&(r==null||r(S),!S.defaultPrevented&&a&&(S.preventDefault(),a()))},f),l.useEffect(()=>{if(g)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(jn=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(g)),u.layers.add(g),Nn(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=jn)}},[g,f,n,u]),l.useEffect(()=>()=>{g&&(u.layers.delete(g),u.layersWithOutsidePointerEventsDisabled.delete(g),Nn())},[g,u]),l.useEffect(()=>{const S=()=>x({});return document.addEventListener(Yt,S),()=>document.removeEventListener(Yt,S)},[]),p.jsxRuntimeExports.jsx(ee.div,{...c,ref:b,style:{pointerEvents:E?C?"auto":"none":void 0,...e.style},onFocusCapture:re(e.onFocusCapture,I.onFocusCapture),onBlurCapture:re(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:re(e.onPointerDownCapture,M.onPointerDownCapture)})});wt.displayName=As;var Ts="DismissableLayerBranch",_s=l.forwardRef((e,t)=>{const n=l.useContext(rr),r=l.useRef(null),s=oe.useComposedRefs(t,r);return l.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),p.jsxRuntimeExports.jsx(ee.div,{...e,ref:s})});_s.displayName=Ts;function zs(e,t=globalThis==null?void 0:globalThis.document){const n=De(e),r=l.useRef(!1),s=l.useRef(()=>{});return l.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let c=function(){or(Ds,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Os(e,t=globalThis==null?void 0:globalThis.document){const n=De(e),r=l.useRef(!1);return l.useEffect(()=>{const s=o=>{o.target&&!r.current&&or(Ms,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Nn(){const e=new CustomEvent(Yt);document.dispatchEvent(e)}function or(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Qn(s,o):s.dispatchEvent(o)}var Lt=0;function ln(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??In()),document.body.insertAdjacentElement("beforeend",e[1]??In()),Lt++,()=>{Lt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Lt--}},[])}function In(){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 $t="focusScope.autoFocusOnMount",Ht="focusScope.autoFocusOnUnmount",An={bubbles:!1,cancelable:!0},ks="FocusScope",St=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[a,c]=l.useState(null),u=De(s),g=De(o),m=l.useRef(null),f=oe.useComposedRefs(t,d=>c(d)),x=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let d=function(E){if(x.paused||!a)return;const C=E.target;a.contains(C)?m.current=C:Ne(m.current,{select:!0})},h=function(E){if(x.paused||!a)return;const C=E.relatedTarget;C!==null&&(a.contains(C)||Ne(m.current,{select:!0}))},v=function(E){if(document.activeElement===document.body)for(const M of E)M.removedNodes.length>0&&Ne(a)};document.addEventListener("focusin",d),document.addEventListener("focusout",h);const y=new MutationObserver(v);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",h),y.disconnect()}}},[r,a,x.paused]),l.useEffect(()=>{if(a){Mn.add(x);const d=document.activeElement;if(!a.contains(d)){const v=new CustomEvent($t,An);a.addEventListener($t,u),a.dispatchEvent(v),v.defaultPrevented||(Ls(Ws(sr(a)),{select:!0}),document.activeElement===d&&Ne(a))}return()=>{a.removeEventListener($t,u),setTimeout(()=>{const v=new CustomEvent(Ht,An);a.addEventListener(Ht,g),a.dispatchEvent(v),v.defaultPrevented||Ne(d??document.body,{select:!0}),a.removeEventListener(Ht,g),Mn.remove(x)},0)}}},[a,u,g,x]);const b=l.useCallback(d=>{if(!n&&!r||x.paused)return;const h=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,v=document.activeElement;if(h&&v){const y=d.currentTarget,[E,C]=$s(y);E&&C?!d.shiftKey&&v===C?(d.preventDefault(),n&&Ne(E,{select:!0})):d.shiftKey&&v===E&&(d.preventDefault(),n&&Ne(C,{select:!0})):v===y&&d.preventDefault()}},[n,r,x.paused]);return p.jsxRuntimeExports.jsx(ee.div,{tabIndex:-1,...i,ref:f,onKeyDown:b})});St.displayName=ks;function Ls(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ne(r,{select:t}),document.activeElement!==n)return}function $s(e){const t=sr(e),n=Dn(t,e),r=Dn(t.reverse(),e);return[n,r]}function sr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Dn(e,t){for(const n of e)if(!Hs(n,{upTo:t}))return n}function Hs(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 Bs(e){return e instanceof HTMLInputElement&&"select"in e}function Ne(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Bs(e)&&t&&e.select()}}var Mn=Fs();function Fs(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Tn(e,t),e.unshift(t)},remove(t){var n;e=Tn(e,t),(n=e[0])==null||n.resume()}}}function Tn(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ws(e){return e.filter(t=>t.tagName!=="A")}var Vs=l[" useId ".trim().toString()]||(()=>{}),Us=0;function Le(e){const[t,n]=l.useState(Vs());return de(()=>{n(r=>r??String(Us++))},[e]),e||(t?`radix-${t}`:"")}var Gs="Arrow",ar=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return p.jsxRuntimeExports.jsx(ee.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsxRuntimeExports.jsx("polygon",{points:"0,0 30,0 15,10"})})});ar.displayName=Gs;var Ks=ar;function ir(e){const[t,n]=l.useState(void 0);return de(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,a;if("borderBoxSize"in o){const c=o.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var cn="Popper",[lr,un]=st(cn),[qs,cr]=lr(cn),ur=e=>{const{__scopePopper:t,children:n}=e,[r,s]=l.useState(null);return p.jsxRuntimeExports.jsx(qs,{scope:t,anchor:r,onAnchorChange:s,children:n})};ur.displayName=cn;var dr="PopperAnchor",fr=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=cr(dr,n),i=l.useRef(null),a=oe.useComposedRefs(t,i);return l.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:p.jsxRuntimeExports.jsx(ee.div,{...s,ref:a})});fr.displayName=dr;var dn="PopperContent",[Xs,Ys]=lr(dn),pr=l.forwardRef((e,t)=>{var w,j,L,O,W,H;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:g=0,sticky:m="partial",hideWhenDetached:f=!1,updatePositionStrategy:x="optimized",onPlaced:b,...d}=e,h=cr(dn,n),[v,y]=l.useState(null),E=oe.useComposedRefs(t,K=>y(K)),[C,M]=l.useState(null),I=ir(C),S=(I==null?void 0:I.width)??0,B=(I==null?void 0:I.height)??0,_=r+(o!=="center"?"-"+o:""),F=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},G=Array.isArray(u)?u:[u],k=G.length>0,$={padding:F,boundary:G.filter(Js),altBoundary:k},{refs:X,floatingStyles:q,placement:U,isPositioned:te,middlewareData:Q}=je.useFloating({strategy:"fixed",placement:_,whileElementsMounted:(...K)=>vs.autoUpdate(...K,{animationFrame:x==="always"}),elements:{reference:h.anchor},middleware:[je.offset({mainAxis:s+B,alignmentAxis:i}),c&&je.shift({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?je.limitShift():void 0,...$}),c&&je.flip({...$}),je.size({...$,apply:({elements:K,rects:N,availableWidth:z,availableHeight:ne})=>{const{width:ie,height:Z}=N.reference,Y=K.floating.style;Y.setProperty("--radix-popper-available-width",`${z}px`),Y.setProperty("--radix-popper-available-height",`${ne}px`),Y.setProperty("--radix-popper-anchor-width",`${ie}px`),Y.setProperty("--radix-popper-anchor-height",`${Z}px`)}}),C&&je.arrow({element:C,padding:a}),Qs({arrowWidth:S,arrowHeight:B}),f&&je.hide({strategy:"referenceHidden",...$})]}),[J,fe]=hr(U),se=De(b);de(()=>{te&&(se==null||se())},[te,se]);const ce=(w=Q.arrow)==null?void 0:w.x,P=(j=Q.arrow)==null?void 0:j.y,A=((L=Q.arrow)==null?void 0:L.centerOffset)!==0,[T,D]=l.useState();return de(()=>{v&&D(window.getComputedStyle(v).zIndex)},[v]),p.jsxRuntimeExports.jsx("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:te?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:T,"--radix-popper-transform-origin":[(O=Q.transformOrigin)==null?void 0:O.x,(W=Q.transformOrigin)==null?void 0:W.y].join(" "),...((H=Q.hide)==null?void 0:H.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsxRuntimeExports.jsx(Xs,{scope:n,placedSide:J,onArrowChange:M,arrowX:ce,arrowY:P,shouldHideArrow:A,children:p.jsxRuntimeExports.jsx(ee.div,{"data-side":J,"data-align":fe,...d,ref:E,style:{...d.style,animation:te?void 0:"none"}})})})});pr.displayName=dn;var mr="PopperArrow",Zs={top:"bottom",right:"left",bottom:"top",left:"right"},gr=l.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=Ys(mr,r),i=Zs[o.placedSide];return p.jsxRuntimeExports.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:p.jsxRuntimeExports.jsx(Ks,{...s,ref:n,style:{...s.style,display:"block"}})})});gr.displayName=mr;function Js(e){return e!==null}var Qs=e=>({name:"transformOrigin",options:e,fn(t){var h,v,y;const{placement:n,rects:r,middlewareData:s}=t,i=((h=s.arrow)==null?void 0:h.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,g]=hr(n),m={start:"0%",center:"50%",end:"100%"}[g],f=(((v=s.arrow)==null?void 0:v.x)??0)+a/2,x=(((y=s.arrow)==null?void 0:y.y)??0)+c/2;let b="",d="";return u==="bottom"?(b=i?m:`${f}px`,d=`${-c}px`):u==="top"?(b=i?m:`${f}px`,d=`${r.floating.height+c}px`):u==="right"?(b=`${-c}px`,d=i?m:`${x}px`):u==="left"&&(b=`${r.floating.width+c}px`,d=i?m:`${x}px`),{data:{x:b,y:d}}}});function hr(e){const[t,n="center"]=e.split("-");return[t,n]}var vr=ur,xr=fr,yr=pr,br=gr,ea="Portal",Ct=l.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,o]=l.useState(!1);de(()=>o(!0),[]);const i=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Yn.createPortal(p.jsxRuntimeExports.jsx(ee.div,{...r,ref:t}),i):null});Ct.displayName=ea;function ta(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var at=e=>{const{present:t,children:n}=e,r=na(t),s=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),o=oe.useComposedRefs(r.ref,ra(s));return typeof n=="function"||r.isPresent?l.cloneElement(s,{ref:o}):null};at.displayName="Presence";function na(e){const[t,n]=l.useState(),r=l.useRef(null),s=l.useRef(e),o=l.useRef("none"),i=e?"mounted":"unmounted",[a,c]=ta(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=it(r.current);o.current=a==="mounted"?u:"none"},[a]),de(()=>{const u=r.current,g=s.current;if(g!==e){const f=o.current,x=it(u);e?c("MOUNT"):x==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(g&&f!==x?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),de(()=>{if(t){let u;const g=t.ownerDocument.defaultView??window,m=x=>{const d=it(r.current).includes(x.animationName);if(x.target===t&&d&&(c("ANIMATION_END"),!s.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",u=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},f=x=>{x.target===t&&(o.current=it(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{g.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:l.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function it(e){return(e==null?void 0:e.animationName)||"none"}function ra(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var oa=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ve=new WeakMap,lt=new WeakMap,ct={},Bt=0,Er=function(e){return e&&(e.host||Er(e.parentNode))},sa=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Er(n);return r&&e.contains(r)?r:null}).filter(function(n){return!!n})},aa=function(e,t,n,r){var s=sa(t,Array.isArray(e)?e:[e]);ct[n]||(ct[n]=new WeakMap);var o=ct[n],i=[],a=new Set,c=new Set(s),u=function(m){!m||a.has(m)||(a.add(m),u(m.parentNode))};s.forEach(u);var g=function(m){!m||c.has(m)||Array.prototype.forEach.call(m.children,function(f){if(a.has(f))g(f);else try{var x=f.getAttribute(r),b=x!==null&&x!=="false",d=(Ve.get(f)||0)+1,h=(o.get(f)||0)+1;Ve.set(f,d),o.set(f,h),i.push(f),d===1&&b&&lt.set(f,!0),h===1&&f.setAttribute(n,"true"),b||f.setAttribute(r,"true")}catch{}})};return g(t),a.clear(),Bt++,function(){i.forEach(function(m){var f=Ve.get(m)-1,x=o.get(m)-1;Ve.set(m,f),o.set(m,x),f||(lt.has(m)||m.removeAttribute(r),lt.delete(m)),x||m.removeAttribute(n)}),Bt--,Bt||(Ve=new WeakMap,Ve=new WeakMap,lt=new WeakMap,ct={})}},fn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=oa(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live], script"))),aa(r,s,n,"aria-hidden")):function(){return null}},be=function(){return be=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},be.apply(this,arguments)};function wr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function ia(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,o;r<s;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var pt="right-scroll-bar-position",mt="width-before-scroll-bar",la="with-scroll-bars-hidden",ca="--removed-body-scroll-bar-size";function Ft(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ua(e,t){var n=R.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var da=typeof window<"u"?l.useLayoutEffect:l.useEffect,_n=new WeakMap;function fa(e,t){var n=ua(null,function(r){return e.forEach(function(s){return Ft(s,r)})});return da(function(){var r=_n.get(n);if(r){var s=new Set(r),o=new Set(e),i=n.current;s.forEach(function(a){o.has(a)||Ft(a,null)}),o.forEach(function(a){s.has(a)||Ft(a,i)})}_n.set(n,e)},[e]),n}function pa(e){return e}function ma(e,t){t===void 0&&(t=pa);var n=[],r=!1,s={read:function(){if(r)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(o){var i=t(o,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(o){for(r=!0;n.length;){var i=n;n=[],i.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(o),i=n}var c=function(){var g=i;i=[],g.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(g){i.push(g),u()},filter:function(g){return i=i.filter(g),n}}}};return s}function ga(e){e===void 0&&(e={});var t=ma(null);return t.options=be({async:!0,ssr:!1},e),t}var Sr=function(e){var t=e.sideCar,n=wr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return l.createElement(r,be({},n))};Sr.isSideCarExport=!0;function ha(e,t){return e.useMedium(t),Sr}var Cr=ga(),Wt=function(){},Rt=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:Wt,onWheelCapture:Wt,onTouchMoveCapture:Wt}),s=r[0],o=r[1],i=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,g=e.enabled,m=e.shards,f=e.sideCar,x=e.noRelative,b=e.noIsolation,d=e.inert,h=e.allowPinchZoom,v=e.as,y=v===void 0?"div":v,E=e.gapMode,C=wr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=f,I=fa([n,t]),S=be(be({},C),s);return l.createElement(l.Fragment,null,g&&l.createElement(M,{sideCar:Cr,removeScrollBar:u,shards:m,noRelative:x,noIsolation:b,inert:d,setCallbacks:o,allowPinchZoom:!!h,lockRef:n,gapMode:E}),i?l.cloneElement(l.Children.only(a),be(be({},S),{ref:I})):l.createElement(y,be({},S,{className:c,ref:I}),a))});Rt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Rt.classNames={fullWidth:mt,zeroRight:pt};var va=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function xa(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=va();return t&&e.setAttribute("nonce",t),e}function ya(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ba(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ea=function(){var e=0,t=null;return{add:function(n){e==0&&(t=xa())&&(ya(t,n),ba(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},wa=function(){var e=Ea();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Rr=function(){var e=wa(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},Sa={left:0,top:0,right:0,gap:0},Vt=function(e){return parseInt(e||"",10)||0},Ca=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Vt(n),Vt(r),Vt(s)]},Ra=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Sa;var t=Ca(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Pa=Rr(),Ye="data-scroll-locked",ja=function(e,t,n,r){var s=e.left,o=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
2
- .`.concat(la,` {
3
- overflow: hidden `).concat(r,`;
4
- padding-right: `).concat(a,"px ").concat(r,`;
5
- }
6
- body[`).concat(Ye,`] {
7
- overflow: hidden `).concat(r,`;
8
- overscroll-behavior: contain;
9
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
10
- padding-left: `.concat(s,`px;
11
- padding-top: `).concat(o,`px;
12
- padding-right: `).concat(i,`px;
13
- margin-left:0;
14
- margin-top:0;
15
- margin-right: `).concat(a,"px ").concat(r,`;
16
- `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
17
- }
18
-
19
- .`).concat(pt,` {
20
- right: `).concat(a,"px ").concat(r,`;
21
- }
22
-
23
- .`).concat(mt,` {
24
- margin-right: `).concat(a,"px ").concat(r,`;
25
- }
26
-
27
- .`).concat(pt," .").concat(pt,` {
28
- right: 0 `).concat(r,`;
29
- }
30
-
31
- .`).concat(mt," .").concat(mt,` {
32
- margin-right: 0 `).concat(r,`;
33
- }
34
-
35
- body[`).concat(Ye,`] {
36
- `).concat(ca,": ").concat(a,`px;
37
- }
38
- `)},zn=function(){var e=parseInt(document.body.getAttribute(Ye)||"0",10);return isFinite(e)?e:0},Na=function(){l.useEffect(function(){return document.body.setAttribute(Ye,(zn()+1).toString()),function(){var e=zn()-1;e<=0?document.body.removeAttribute(Ye):document.body.setAttribute(Ye,e.toString())}},[])},Ia=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;Na();var o=l.useMemo(function(){return Ra(s)},[s]);return l.createElement(Pa,{styles:ja(o,!t,s,n?"":"!important")})},Zt=!1;if(typeof window<"u")try{var ut=Object.defineProperty({},"passive",{get:function(){return Zt=!0,!0}});window.addEventListener("test",ut,ut),window.removeEventListener("test",ut,ut)}catch{Zt=!1}var Ue=Zt?{passive:!1}:!1,Aa=function(e){return e.tagName==="TEXTAREA"},Pr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Aa(e)&&n[t]==="visible")},Da=function(e){return Pr(e,"overflowY")},Ma=function(e){return Pr(e,"overflowX")},On=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=jr(e,r);if(s){var o=Nr(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ta=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},_a=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},jr=function(e,t){return e==="v"?Da(t):Ma(t)},Nr=function(e,t){return e==="v"?Ta(t):_a(t)},za=function(e,t){return e==="h"&&t==="rtl"?-1:1},Oa=function(e,t,n,r,s){var o=za(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,c=t.contains(a),u=!1,g=i>0,m=0,f=0;do{if(!a)break;var x=Nr(e,a),b=x[0],d=x[1],h=x[2],v=d-h-o*b;(b||v)&&jr(e,a)&&(m+=v,f+=b);var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(g&&Math.abs(m)<1||!g&&Math.abs(f)<1)&&(u=!0),u},dt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},kn=function(e){return[e.deltaX,e.deltaY]},Ln=function(e){return e&&"current"in e?e.current:e},ka=function(e,t){return e[0]===t[0]&&e[1]===t[1]},La=function(e){return`
39
- .block-interactivity-`.concat(e,` {pointer-events: none;}
40
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},$a=0,Ge=[];function Ha(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),s=l.useState($a++)[0],o=l.useState(Rr)[0],i=l.useRef(e);l.useEffect(function(){i.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var d=ia([e.lockRef.current],(e.shards||[]).map(Ln),!0).filter(Boolean);return d.forEach(function(h){return h.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),d.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=l.useCallback(function(d,h){if("touches"in d&&d.touches.length===2||d.type==="wheel"&&d.ctrlKey)return!i.current.allowPinchZoom;var v=dt(d),y=n.current,E="deltaX"in d?d.deltaX:y[0]-v[0],C="deltaY"in d?d.deltaY:y[1]-v[1],M,I=d.target,S=Math.abs(E)>Math.abs(C)?"h":"v";if("touches"in d&&S==="h"&&I.type==="range")return!1;var B=On(S,I);if(!B)return!0;if(B?M=S:(M=S==="v"?"h":"v",B=On(S,I)),!B)return!1;if(!r.current&&"changedTouches"in d&&(E||C)&&(r.current=M),!M)return!0;var _=r.current||M;return Oa(_,h,d,_==="h"?E:C)},[]),c=l.useCallback(function(d){var h=d;if(!(!Ge.length||Ge[Ge.length-1]!==o)){var v="deltaY"in h?kn(h):dt(h),y=t.current.filter(function(M){return M.name===h.type&&(M.target===h.target||h.target===M.shadowParent)&&ka(M.delta,v)})[0];if(y&&y.should){h.cancelable&&h.preventDefault();return}if(!y){var E=(i.current.shards||[]).map(Ln).filter(Boolean).filter(function(M){return M.contains(h.target)}),C=E.length>0?a(h,E[0]):!i.current.noIsolation;C&&h.cancelable&&h.preventDefault()}}},[]),u=l.useCallback(function(d,h,v,y){var E={name:d,delta:h,target:v,should:y,shadowParent:Ba(v)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(C){return C!==E})},1)},[]),g=l.useCallback(function(d){n.current=dt(d),r.current=void 0},[]),m=l.useCallback(function(d){u(d.type,kn(d),d.target,a(d,e.lockRef.current))},[]),f=l.useCallback(function(d){u(d.type,dt(d),d.target,a(d,e.lockRef.current))},[]);l.useEffect(function(){return Ge.push(o),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:f}),document.addEventListener("wheel",c,Ue),document.addEventListener("touchmove",c,Ue),document.addEventListener("touchstart",g,Ue),function(){Ge=Ge.filter(function(d){return d!==o}),document.removeEventListener("wheel",c,Ue),document.removeEventListener("touchmove",c,Ue),document.removeEventListener("touchstart",g,Ue)}},[]);var x=e.removeScrollBar,b=e.inert;return l.createElement(l.Fragment,null,b?l.createElement(o,{styles:La(s)}):null,x?l.createElement(Ia,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ba(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Fa=ha(Cr,Ha);var Pt=l.forwardRef(function(e,t){return l.createElement(Rt,be({},e,{ref:t,sideCar:Fa}))});Pt.classNames=Rt.classNames;const Wa=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Va=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),$n=e=>{const t=Va(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ir=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Ua=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Ga={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ka=R.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},c)=>R.createElement("svg",{ref:c,...Ga,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ir("lucide",s),...!o&&!Ua(a)&&{"aria-hidden":"true"},...a},[...i.map(([u,g])=>R.createElement(u,g)),...Array.isArray(o)?o:[o]]));const jt=(e,t)=>{const n=R.forwardRef(({className:r,...s},o)=>R.createElement(Ka,{ref:o,iconNode:t,className:Ir(`lucide-${Wa($n(e))}`,`lucide-${e}`,r),...s}));return n.displayName=$n(e),n};const qa=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ar=jt("check",qa);const Xa=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],pn=jt("chevron-down",Xa);const Ya=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Za=jt("chevron-up",Ya),Nt=R.createContext(null);Nt.displayName="PanelGroupContext";const le={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},mn=10,$e=R.useLayoutEffect,Hn=l.useId,Ja=typeof Hn=="function"?Hn:()=>null;let Qa=0;function gn(e=null){const t=Ja(),n=R.useRef(e||t||null);return n.current===null&&(n.current=""+Qa++),e??n.current}function Dr({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:s,forwardedRef:o,id:i,maxSize:a,minSize:c,onCollapse:u,onExpand:g,onResize:m,order:f,style:x,tagName:b="div",...d}){const h=R.useContext(Nt);if(h===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:v,expandPanel:y,getPanelSize:E,getPanelStyle:C,groupId:M,isPanelCollapsed:I,reevaluatePanelConstraints:S,registerPanel:B,resizePanel:_,unregisterPanel:F}=h,G=gn(i),k=R.useRef({callbacks:{onCollapse:u,onExpand:g,onResize:m},constraints:{collapsedSize:n,collapsible:r,defaultSize:s,maxSize:a,minSize:c},id:G,idIsFromProps:i!==void 0,order:f});R.useRef({didLogMissingDefaultSizeWarning:!1}),$e(()=>{const{callbacks:X,constraints:q}=k.current,U={...q};k.current.id=G,k.current.idIsFromProps=i!==void 0,k.current.order=f,X.onCollapse=u,X.onExpand=g,X.onResize=m,q.collapsedSize=n,q.collapsible=r,q.defaultSize=s,q.maxSize=a,q.minSize=c,(U.collapsedSize!==q.collapsedSize||U.collapsible!==q.collapsible||U.maxSize!==q.maxSize||U.minSize!==q.minSize)&&S(k.current,U)}),$e(()=>{const X=k.current;return B(X),()=>{F(X)}},[f,G,B,F]),R.useImperativeHandle(o,()=>({collapse:()=>{v(k.current)},expand:X=>{y(k.current,X)},getId(){return G},getSize(){return E(k.current)},isCollapsed(){return I(k.current)},isExpanded(){return!I(k.current)},resize:X=>{_(k.current,X)}}),[v,y,E,I,G,_]);const $=C(k.current,s);return R.createElement(b,{...d,children:e,className:t,id:G,style:{...$,...x},[le.groupId]:M,[le.panel]:"",[le.panelCollapsible]:r||void 0,[le.panelId]:G,[le.panelSize]:parseFloat(""+$.flexGrow).toFixed(1)})}const Mr=R.forwardRef((e,t)=>R.createElement(Dr,{...e,forwardedRef:t}));Dr.displayName="Panel";Mr.displayName="forwardRef(Panel)";let Jt=null,gt=-1,Ie=null;function ei(e,t){if(t){const n=(t&kr)!==0,r=(t&Lr)!==0,s=(t&$r)!==0,o=(t&Hr)!==0;if(n)return s?"se-resize":o?"ne-resize":"e-resize";if(r)return s?"sw-resize":o?"nw-resize":"w-resize";if(s)return"s-resize";if(o)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function ti(){Ie!==null&&(document.head.removeChild(Ie),Jt=null,Ie=null,gt=-1)}function Ut(e,t){var n,r;const s=ei(e,t);if(Jt!==s){if(Jt=s,Ie===null&&(Ie=document.createElement("style"),document.head.appendChild(Ie)),gt>=0){var o;(o=Ie.sheet)===null||o===void 0||o.removeRule(gt)}gt=(n=(r=Ie.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${s} !important;}`))!==null&&n!==void 0?n:-1}}function Tr(e){return e.type==="keydown"}function _r(e){return e.type.startsWith("pointer")}function zr(e){return e.type.startsWith("mouse")}function It(e){if(_r(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(zr(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function ni(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function ri(e,t,n){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function oi(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:Wn(e),b:Wn(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;V(r,"Stacking order can only be calculated for elements with a common ancestor");const s={a:Fn(Bn(n.a)),b:Fn(Bn(n.b))};if(s.a===s.b){const o=r.childNodes,i={a:n.a.at(-1),b:n.b.at(-1)};let a=o.length;for(;a--;){const c=o[a];if(c===i.a)return 1;if(c===i.b)return-1}}return Math.sign(s.a-s.b)}const si=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function ai(e){var t;const n=getComputedStyle((t=Or(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function ii(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||ai(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||si.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function Bn(e){let t=e.length;for(;t--;){const n=e[t];if(V(n,"Missing node"),ii(n))return n}return null}function Fn(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Wn(e){const t=[];for(;e;)t.push(e),e=Or(e);return t}function Or(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const kr=1,Lr=2,$r=4,Hr=8,li=ni()==="coarse";let ve=[],Ze=!1,Ae=new Map,At=new Map;const rt=new Set;function ci(e,t,n,r,s){var o;const{ownerDocument:i}=t,a={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:s},c=(o=Ae.get(i))!==null&&o!==void 0?o:0;return Ae.set(i,c+1),rt.add(a),vt(),function(){var g;At.delete(e),rt.delete(a);const m=(g=Ae.get(i))!==null&&g!==void 0?g:1;if(Ae.set(i,m-1),vt(),m===1&&Ae.delete(i),ve.includes(a)){const f=ve.indexOf(a);f>=0&&ve.splice(f,1),vn(),s("up",!0,null)}}}function ui(e){const{target:t}=e,{x:n,y:r}=It(e);Ze=!0,hn({target:t,x:n,y:r}),vt(),ve.length>0&&(xt("down",e),e.preventDefault(),Br(t)||e.stopImmediatePropagation())}function Gt(e){const{x:t,y:n}=It(e);if(Ze&&e.buttons===0&&(Ze=!1,xt("up",e)),!Ze){const{target:r}=e;hn({target:r,x:t,y:n})}xt("move",e),vn(),ve.length>0&&e.preventDefault()}function Kt(e){const{target:t}=e,{x:n,y:r}=It(e);At.clear(),Ze=!1,ve.length>0&&(e.preventDefault(),Br(t)||e.stopImmediatePropagation()),xt("up",e),hn({target:t,x:n,y:r}),vn(),vt()}function Br(e){let t=e;for(;t;){if(t.hasAttribute(le.resizeHandle))return!0;t=t.parentElement}return!1}function hn({target:e,x:t,y:n}){ve.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),rt.forEach(s=>{const{element:o,hitAreaMargins:i}=s,a=o.getBoundingClientRect(),{bottom:c,left:u,right:g,top:m}=a,f=li?i.coarse:i.fine;if(t>=u-f&&t<=g+f&&n>=m-f&&n<=c+f){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&oi(r,o)>0){let b=r,d=!1;for(;b&&!b.contains(o);){if(ri(b.getBoundingClientRect(),a)){d=!0;break}b=b.parentElement}if(d)return}ve.push(s)}})}function qt(e,t){At.set(e,t)}function vn(){let e=!1,t=!1;ve.forEach(r=>{const{direction:s}=r;s==="horizontal"?e=!0:t=!0});let n=0;At.forEach(r=>{n|=r}),e&&t?Ut("intersection",n):e?Ut("horizontal",n):t?Ut("vertical",n):ti()}let Xt=new AbortController;function vt(){Xt.abort(),Xt=new AbortController;const e={capture:!0,signal:Xt.signal};rt.size&&(Ze?(ve.length>0&&Ae.forEach((t,n)=>{const{body:r}=n;t>0&&(r.addEventListener("contextmenu",Kt,e),r.addEventListener("pointerleave",Gt,e),r.addEventListener("pointermove",Gt,e))}),Ae.forEach((t,n)=>{const{body:r}=n;r.addEventListener("pointerup",Kt,e),r.addEventListener("pointercancel",Kt,e)})):Ae.forEach((t,n)=>{const{body:r}=n;t>0&&(r.addEventListener("pointerdown",ui,e),r.addEventListener("pointermove",Gt,e))}))}function xt(e,t){rt.forEach(n=>{const{setResizeHandlerState:r}=n,s=ve.includes(n);r(e,s,t)})}function di(){const[e,t]=R.useState(0);return R.useCallback(()=>t(n=>n+1),[])}function V(e,t){if(!e)throw Error(t)}function He(e,t,n=mn){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Ce(e,t,n=mn){return He(e,t,n)===0}function ge(e,t,n){return He(e,t,n)===0}function fi(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const s=e[r],o=t[r];if(!ge(s,o,n))return!1}return!0}function Xe({panelConstraints:e,panelIndex:t,size:n}){const r=e[t];V(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:s=0,collapsible:o,maxSize:i=100,minSize:a=0}=r;if(He(n,a)<0)if(o){const c=(s+a)/2;He(n,c)<0?n=s:n=a}else n=a;return n=Math.min(i,n),n=parseFloat(n.toFixed(mn)),n}function et({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:s,trigger:o}){if(ge(e,0))return t;const i=[...t],[a,c]=r;V(a!=null,"Invalid first pivot index"),V(c!=null,"Invalid second pivot index");let u=0;if(o==="keyboard"){{const m=e<0?c:a,f=n[m];V(f,`Panel constraints not found for index ${m}`);const{collapsedSize:x=0,collapsible:b,minSize:d=0}=f;if(b){const h=t[m];if(V(h!=null,`Previous layout not found for panel index ${m}`),ge(h,x)){const v=d-h;He(v,Math.abs(e))>0&&(e=e<0?0-v:v)}}}{const m=e<0?a:c,f=n[m];V(f,`No panel constraints found for index ${m}`);const{collapsedSize:x=0,collapsible:b,minSize:d=0}=f;if(b){const h=t[m];if(V(h!=null,`Previous layout not found for panel index ${m}`),ge(h,d)){const v=h-x;He(v,Math.abs(e))>0&&(e=e<0?0-v:v)}}}}{const m=e<0?1:-1;let f=e<0?c:a,x=0;for(;;){const d=t[f];V(d!=null,`Previous layout not found for panel index ${f}`);const v=Xe({panelConstraints:n,panelIndex:f,size:100})-d;if(x+=v,f+=m,f<0||f>=n.length)break}const b=Math.min(Math.abs(e),Math.abs(x));e=e<0?0-b:b}{let f=e<0?a:c;for(;f>=0&&f<n.length;){const x=Math.abs(e)-Math.abs(u),b=t[f];V(b!=null,`Previous layout not found for panel index ${f}`);const d=b-x,h=Xe({panelConstraints:n,panelIndex:f,size:d});if(!ge(b,h)&&(u+=b-h,i[f]=h,u.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?f--:f++}}if(fi(s,i))return s;{const m=e<0?c:a,f=t[m];V(f!=null,`Previous layout not found for panel index ${m}`);const x=f+u,b=Xe({panelConstraints:n,panelIndex:m,size:x});if(i[m]=b,!ge(b,x)){let d=x-b,v=e<0?c:a;for(;v>=0&&v<n.length;){const y=i[v];V(y!=null,`Previous layout not found for panel index ${v}`);const E=y+d,C=Xe({panelConstraints:n,panelIndex:v,size:E});if(ge(y,C)||(d-=C-y,i[v]=C),ge(d,0))break;e>0?v--:v++}}}const g=i.reduce((m,f)=>f+m,0);return ge(g,100)?i:s}function pi({layout:e,panelsArray:t,pivotIndices:n}){let r=0,s=100,o=0,i=0;const a=n[0];V(a!=null,"No pivot index found"),t.forEach((m,f)=>{const{constraints:x}=m,{maxSize:b=100,minSize:d=0}=x;f===a?(r=d,s=b):(o+=d,i+=b)});const c=Math.min(s,100-o),u=Math.max(r,100-i),g=e[a];return{valueMax:c,valueMin:u,valueNow:g}}function ot(e,t=document){return Array.from(t.querySelectorAll(`[${le.resizeHandleId}][data-panel-group-id="${e}"]`))}function Fr(e,t,n=document){const s=ot(e,n).findIndex(o=>o.getAttribute(le.resizeHandleId)===t);return s??null}function Wr(e,t,n){const r=Fr(e,t,n);return r!=null?[r,r+1]:[-1,-1]}function mi(e){return e instanceof HTMLElement?!0:typeof e=="object"&&e!==null&&"tagName"in e&&"getAttribute"in e}function Vr(e,t=document){if(mi(t)&&t.dataset.panelGroupId==e)return t;const n=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return n||null}function Dt(e,t=document){const n=t.querySelector(`[${le.resizeHandleId}="${e}"]`);return n||null}function gi(e,t,n,r=document){var s,o,i,a;const c=Dt(t,r),u=ot(e,r),g=c?u.indexOf(c):-1,m=(s=(o=n[g])===null||o===void 0?void 0:o.id)!==null&&s!==void 0?s:null,f=(i=(a=n[g+1])===null||a===void 0?void 0:a.id)!==null&&i!==void 0?i:null;return[m,f]}function hi({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:s,panelGroupElement:o,setLayout:i}){R.useRef({didWarnAboutMissingResizeHandle:!1}),$e(()=>{if(!o)return;const a=ot(n,o);for(let c=0;c<s.length-1;c++){const{valueMax:u,valueMin:g,valueNow:m}=pi({layout:r,panelsArray:s,pivotIndices:[c,c+1]}),f=a[c];if(f!=null){const x=s[c];V(x,`No panel data found for index "${c}"`),f.setAttribute("aria-controls",x.id),f.setAttribute("aria-valuemax",""+Math.round(u)),f.setAttribute("aria-valuemin",""+Math.round(g)),f.setAttribute("aria-valuenow",m!=null?""+Math.round(m):"")}}return()=>{a.forEach((c,u)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[n,r,s,o]),R.useEffect(()=>{if(!o)return;const a=t.current;V(a,"Eager values not found");const{panelDataArray:c}=a,u=Vr(n,o);V(u!=null,`No group found for id "${n}"`);const g=ot(n,o);V(g,`No resize handles found for group id "${n}"`);const m=g.map(f=>{const x=f.getAttribute(le.resizeHandleId);V(x,"Resize handle element has no handle id attribute");const[b,d]=gi(n,x,c,o);if(b==null||d==null)return()=>{};const h=v=>{if(!v.defaultPrevented)switch(v.key){case"Enter":{v.preventDefault();const y=c.findIndex(E=>E.id===b);if(y>=0){const E=c[y];V(E,`No panel data found for index ${y}`);const C=r[y],{collapsedSize:M=0,collapsible:I,minSize:S=0}=E.constraints;if(C!=null&&I){const B=et({delta:ge(C,M)?S-M:M-C,initialLayout:r,panelConstraints:c.map(_=>_.constraints),pivotIndices:Wr(n,x,o),prevLayout:r,trigger:"keyboard"});r!==B&&i(B)}}break}}};return f.addEventListener("keydown",h),()=>{f.removeEventListener("keydown",h)}});return()=>{m.forEach(f=>f())}},[o,e,t,n,r,s,i])}function Vn(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Ur(e,t){const n=e==="horizontal",{x:r,y:s}=It(t);return n?r:s}function vi(e,t,n,r,s){const o=n==="horizontal",i=Dt(t,s);V(i,`No resize handle element found for id "${t}"`);const a=i.getAttribute(le.groupId);V(a,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=r;const u=Ur(n,e),g=Vr(a,s);V(g,`No group element found for id "${a}"`);const m=g.getBoundingClientRect(),f=o?m.width:m.height;return(u-c)/f*100}function xi(e,t,n,r,s,o){if(Tr(e)){const i=n==="horizontal";let a=0;e.shiftKey?a=100:s!=null?a=s:a=10;let c=0;switch(e.key){case"ArrowDown":c=i?0:a;break;case"ArrowLeft":c=i?-a:0;break;case"ArrowRight":c=i?a:0;break;case"ArrowUp":c=i?0:-a;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return r==null?0:vi(e,t,n,r,o)}function yi({panelDataArray:e}){const t=Array(e.length),n=e.map(o=>o.constraints);let r=0,s=100;for(let o=0;o<e.length;o++){const i=n[o];V(i,`Panel constraints not found for index ${o}`);const{defaultSize:a}=i;a!=null&&(r++,t[o]=a,s-=a)}for(let o=0;o<e.length;o++){const i=n[o];V(i,`Panel constraints not found for index ${o}`);const{defaultSize:a}=i;if(a!=null)continue;const c=e.length-r,u=s/c;r++,t[o]=u,s-=u}return t}function Ke(e,t,n){t.forEach((r,s)=>{const o=e[s];V(o,`Panel data not found for index ${s}`);const{callbacks:i,constraints:a,id:c}=o,{collapsedSize:u=0,collapsible:g}=a,m=n[c];if(m==null||r!==m){n[c]=r;const{onCollapse:f,onExpand:x,onResize:b}=i;b&&b(r,m),g&&(f||x)&&(x&&(m==null||Ce(m,u))&&!Ce(r,u)&&x(),f&&(m==null||!Ce(m,u))&&Ce(r,u)&&f())}})}function ft(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function bi({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:s,precision:o=3}){const i=n[s];let a;return i==null?a=e!=null?e.toPrecision(o):"1":r.length===1?a="1":a=i.toPrecision(o),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function Ei(e,t=10){let n=null;return(...s)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...s)},t)}}function Un(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch{e.getItem=()=>null,e.setItem=()=>{}}}function Gr(e){return`react-resizable-panels:${e}`}function Kr(e){return e.map(t=>{const{constraints:n,id:r,idIsFromProps:s,order:o}=t;return s?r:o?`${o}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function qr(e,t){try{const n=Gr(e),r=t.getItem(n);if(r){const s=JSON.parse(r);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function wi(e,t,n){var r,s;const o=(r=qr(e,n))!==null&&r!==void 0?r:{},i=Kr(t);return(s=o[i])!==null&&s!==void 0?s:null}function Si(e,t,n,r,s){var o;const i=Gr(e),a=Kr(t),c=(o=qr(e,s))!==null&&o!==void 0?o:{};c[a]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{s.setItem(i,JSON.stringify(c))}catch{}}function Gn({layout:e,panelConstraints:t}){const n=[...e],r=n.reduce((o,i)=>o+i,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(o=>`${o}%`).join(", ")}`);if(!ge(r,100)&&n.length>0)for(let o=0;o<t.length;o++){const i=n[o];V(i!=null,`No layout data found for index ${o}`);const a=100/r*i;n[o]=a}let s=0;for(let o=0;o<t.length;o++){const i=n[o];V(i!=null,`No layout data found for index ${o}`);const a=Xe({panelConstraints:t,panelIndex:o,size:i});i!=a&&(s+=i-a,n[o]=a)}if(!ge(s,0))for(let o=0;o<t.length;o++){const i=n[o];V(i!=null,`No layout data found for index ${o}`);const a=i+s,c=Xe({panelConstraints:t,panelIndex:o,size:a});if(i!==c&&(s-=c-i,n[o]=c,ge(s,0)))break}return n}const Ci=100,tt={getItem:e=>(Un(tt),tt.getItem(e)),setItem:(e,t)=>{Un(tt),tt.setItem(e,t)}},Kn={};function Xr({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:s,id:o=null,onLayout:i=null,keyboardResizeBy:a=null,storage:c=tt,style:u,tagName:g="div",...m}){const f=gn(o),x=R.useRef(null),[b,d]=R.useState(null),[h,v]=R.useState([]),y=di(),E=R.useRef({}),C=R.useRef(new Map),M=R.useRef(0),I=R.useRef({autoSaveId:e,direction:r,dragState:b,id:f,keyboardResizeBy:a,onLayout:i,storage:c}),S=R.useRef({layout:h,panelDataArray:[],panelDataArrayChanged:!1});R.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),R.useImperativeHandle(s,()=>({getId:()=>I.current.id,getLayout:()=>{const{layout:P}=S.current;return P},setLayout:P=>{const{onLayout:A}=I.current,{layout:T,panelDataArray:D}=S.current,w=Gn({layout:P,panelConstraints:D.map(j=>j.constraints)});Vn(T,w)||(v(w),S.current.layout=w,A&&A(w),Ke(D,w,E.current))}}),[]),$e(()=>{I.current.autoSaveId=e,I.current.direction=r,I.current.dragState=b,I.current.id=f,I.current.onLayout=i,I.current.storage=c}),hi({committedValuesRef:I,eagerValuesRef:S,groupId:f,layout:h,panelDataArray:S.current.panelDataArray,setLayout:v,panelGroupElement:x.current}),R.useEffect(()=>{const{panelDataArray:P}=S.current;if(e){if(h.length===0||h.length!==P.length)return;let A=Kn[e];A==null&&(A=Ei(Si,Ci),Kn[e]=A);const T=[...P],D=new Map(C.current);A(e,T,D,h,c)}},[e,h,c]),R.useEffect(()=>{});const B=R.useCallback(P=>{const{onLayout:A}=I.current,{layout:T,panelDataArray:D}=S.current;if(P.constraints.collapsible){const w=D.map(W=>W.constraints),{collapsedSize:j=0,panelSize:L,pivotIndices:O}=Oe(D,P,T);if(V(L!=null,`Panel size not found for panel "${P.id}"`),!Ce(L,j)){C.current.set(P.id,L);const H=qe(D,P)===D.length-1?L-j:j-L,K=et({delta:H,initialLayout:T,panelConstraints:w,pivotIndices:O,prevLayout:T,trigger:"imperative-api"});ft(T,K)||(v(K),S.current.layout=K,A&&A(K),Ke(D,K,E.current))}}},[]),_=R.useCallback((P,A)=>{const{onLayout:T}=I.current,{layout:D,panelDataArray:w}=S.current;if(P.constraints.collapsible){const j=w.map(N=>N.constraints),{collapsedSize:L=0,panelSize:O=0,minSize:W=0,pivotIndices:H}=Oe(w,P,D),K=A??W;if(Ce(O,L)){const N=C.current.get(P.id),z=N!=null&&N>=K?N:K,ie=qe(w,P)===w.length-1?O-z:z-O,Z=et({delta:ie,initialLayout:D,panelConstraints:j,pivotIndices:H,prevLayout:D,trigger:"imperative-api"});ft(D,Z)||(v(Z),S.current.layout=Z,T&&T(Z),Ke(w,Z,E.current))}}},[]),F=R.useCallback(P=>{const{layout:A,panelDataArray:T}=S.current,{panelSize:D}=Oe(T,P,A);return V(D!=null,`Panel size not found for panel "${P.id}"`),D},[]),G=R.useCallback((P,A)=>{const{panelDataArray:T}=S.current,D=qe(T,P);return bi({defaultSize:A,dragState:b,layout:h,panelData:T,panelIndex:D})},[b,h]),k=R.useCallback(P=>{const{layout:A,panelDataArray:T}=S.current,{collapsedSize:D=0,collapsible:w,panelSize:j}=Oe(T,P,A);return V(j!=null,`Panel size not found for panel "${P.id}"`),w===!0&&Ce(j,D)},[]),$=R.useCallback(P=>{const{layout:A,panelDataArray:T}=S.current,{collapsedSize:D=0,collapsible:w,panelSize:j}=Oe(T,P,A);return V(j!=null,`Panel size not found for panel "${P.id}"`),!w||He(j,D)>0},[]),X=R.useCallback(P=>{const{panelDataArray:A}=S.current;A.push(P),A.sort((T,D)=>{const w=T.order,j=D.order;return w==null&&j==null?0:w==null?-1:j==null?1:w-j}),S.current.panelDataArrayChanged=!0,y()},[y]);$e(()=>{if(S.current.panelDataArrayChanged){S.current.panelDataArrayChanged=!1;const{autoSaveId:P,onLayout:A,storage:T}=I.current,{layout:D,panelDataArray:w}=S.current;let j=null;if(P){const O=wi(P,w,T);O&&(C.current=new Map(Object.entries(O.expandToSizes)),j=O.layout)}j==null&&(j=yi({panelDataArray:w}));const L=Gn({layout:j,panelConstraints:w.map(O=>O.constraints)});Vn(D,L)||(v(L),S.current.layout=L,A&&A(L),Ke(w,L,E.current))}}),$e(()=>{const P=S.current;return()=>{P.layout=[]}},[]);const q=R.useCallback(P=>{let A=!1;const T=x.current;return T&&window.getComputedStyle(T,null).getPropertyValue("direction")==="rtl"&&(A=!0),function(w){w.preventDefault();const j=x.current;if(!j)return()=>null;const{direction:L,dragState:O,id:W,keyboardResizeBy:H,onLayout:K}=I.current,{layout:N,panelDataArray:z}=S.current,{initialLayout:ne}=O??{},ie=Wr(W,P,j);let Z=xi(w,P,L,O,H,j);const Y=L==="horizontal";Y&&A&&(Z=-Z);const pe=z.map(Ee=>Ee.constraints),ye=et({delta:Z,initialLayout:ne??N,panelConstraints:pe,pivotIndices:ie,prevLayout:N,trigger:Tr(w)?"keyboard":"mouse-or-touch"}),me=!ft(N,ye);(_r(w)||zr(w))&&M.current!=Z&&(M.current=Z,!me&&Z!==0?Y?qt(P,Z<0?kr:Lr):qt(P,Z<0?$r:Hr):qt(P,0)),me&&(v(ye),S.current.layout=ye,K&&K(ye),Ke(z,ye,E.current))}},[]),U=R.useCallback((P,A)=>{const{onLayout:T}=I.current,{layout:D,panelDataArray:w}=S.current,j=w.map(N=>N.constraints),{panelSize:L,pivotIndices:O}=Oe(w,P,D);V(L!=null,`Panel size not found for panel "${P.id}"`);const H=qe(w,P)===w.length-1?L-A:A-L,K=et({delta:H,initialLayout:D,panelConstraints:j,pivotIndices:O,prevLayout:D,trigger:"imperative-api"});ft(D,K)||(v(K),S.current.layout=K,T&&T(K),Ke(w,K,E.current))},[]),te=R.useCallback((P,A)=>{const{layout:T,panelDataArray:D}=S.current,{collapsedSize:w=0,collapsible:j}=A,{collapsedSize:L=0,collapsible:O,maxSize:W=100,minSize:H=0}=P.constraints,{panelSize:K}=Oe(D,P,T);K!=null&&(j&&O&&Ce(K,w)?Ce(w,L)||U(P,L):K<H?U(P,H):K>W&&U(P,W))},[U]),Q=R.useCallback((P,A)=>{const{direction:T}=I.current,{layout:D}=S.current;if(!x.current)return;const w=Dt(P,x.current);V(w,`Drag handle element not found for id "${P}"`);const j=Ur(T,A);d({dragHandleId:P,dragHandleRect:w.getBoundingClientRect(),initialCursorPosition:j,initialLayout:D})},[]),J=R.useCallback(()=>{d(null)},[]),fe=R.useCallback(P=>{const{panelDataArray:A}=S.current,T=qe(A,P);T>=0&&(A.splice(T,1),delete E.current[P.id],S.current.panelDataArrayChanged=!0,y())},[y]),se=R.useMemo(()=>({collapsePanel:B,direction:r,dragState:b,expandPanel:_,getPanelSize:F,getPanelStyle:G,groupId:f,isPanelCollapsed:k,isPanelExpanded:$,reevaluatePanelConstraints:te,registerPanel:X,registerResizeHandle:q,resizePanel:U,startDragging:Q,stopDragging:J,unregisterPanel:fe,panelGroupElement:x.current}),[B,b,r,_,F,G,f,k,$,te,X,q,U,Q,J,fe]),ce={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return R.createElement(Nt.Provider,{value:se},R.createElement(g,{...m,children:t,className:n,id:o,ref:x,style:{...ce,...u},[le.group]:"",[le.groupDirection]:r,[le.groupId]:f}))}const Yr=R.forwardRef((e,t)=>R.createElement(Xr,{...e,forwardedRef:t}));Xr.displayName="PanelGroup";Yr.displayName="forwardRef(PanelGroup)";function qe(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function Oe(e,t,n){const r=qe(e,t),o=r===e.length-1?[r-1,r]:[r,r+1],i=n[r];return{...t.constraints,panelSize:i,pivotIndices:o}}function Ri({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){R.useEffect(()=>{if(e||n==null||r==null)return;const s=Dt(t,r);if(s==null)return;const o=i=>{if(!i.defaultPrevented)switch(i.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{i.preventDefault(),n(i);break}case"F6":{i.preventDefault();const a=s.getAttribute(le.groupId);V(a,`No group element found for id "${a}"`);const c=ot(a,r),u=Fr(a,t,r);V(u!==null,`No resize element found for id "${t}"`);const g=i.shiftKey?u>0?u-1:c.length-1:u+1<c.length?u+1:0;c[g].focus();break}}};return s.addEventListener("keydown",o),()=>{s.removeEventListener("keydown",o)}},[r,e,t,n])}function Zr({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:s,onBlur:o,onClick:i,onDragging:a,onFocus:c,onPointerDown:u,onPointerUp:g,style:m={},tabIndex:f=0,tagName:x="div",...b}){var d,h;const v=R.useRef(null),y=R.useRef({onClick:i,onDragging:a,onPointerDown:u,onPointerUp:g});R.useEffect(()=>{y.current.onClick=i,y.current.onDragging=a,y.current.onPointerDown=u,y.current.onPointerUp=g});const E=R.useContext(Nt);if(E===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:C,groupId:M,registerResizeHandle:I,startDragging:S,stopDragging:B,panelGroupElement:_}=E,F=gn(s),[G,k]=R.useState("inactive"),[$,X]=R.useState(!1),[q,U]=R.useState(null),te=R.useRef({state:G});$e(()=>{te.current.state=G}),R.useEffect(()=>{if(n)U(null);else{const se=I(F);U(()=>se)}},[n,F,I]);const Q=(d=r==null?void 0:r.coarse)!==null&&d!==void 0?d:15,J=(h=r==null?void 0:r.fine)!==null&&h!==void 0?h:5;R.useEffect(()=>{if(n||q==null)return;const se=v.current;V(se,"Element ref not attached");let ce=!1;return ci(F,se,C,{coarse:Q,fine:J},(A,T,D)=>{if(!T){k("inactive");return}switch(A){case"down":{k("drag"),ce=!1,V(D,'Expected event to be defined for "down" action'),S(F,D);const{onDragging:w,onPointerDown:j}=y.current;w==null||w(!0),j==null||j();break}case"move":{const{state:w}=te.current;ce=!0,w!=="drag"&&k("hover"),V(D,'Expected event to be defined for "move" action'),q(D);break}case"up":{k("hover"),B();const{onClick:w,onDragging:j,onPointerUp:L}=y.current;j==null||j(!1),L==null||L(),ce||w==null||w();break}}})},[Q,C,n,J,I,F,q,S,B]),Ri({disabled:n,handleId:F,resizeHandler:q,panelGroupElement:_});const fe={touchAction:"none",userSelect:"none"};return R.createElement(x,{...b,children:e,className:t,id:s,onBlur:()=>{X(!1),o==null||o()},onFocus:()=>{X(!0),c==null||c()},ref:v,role:"separator",style:{...fe,...m},tabIndex:f,[le.groupDirection]:C,[le.groupId]:M,[le.resizeHandle]:"",[le.resizeHandleActive]:G==="drag"?"pointer":$?"keyboard":void 0,[le.resizeHandleEnabled]:!n,[le.resizeHandleId]:F,[le.resizeHandleState]:G})}Zr.displayName="PanelResizeHandle";var Mt="Dialog",[Jr,Pi]=st(Mt),[ji,xe]=Jr(Mt),Qr=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:i=!0}=e,a=l.useRef(null),c=l.useRef(null),[u,g]=ht({prop:r,defaultProp:s??!1,onChange:o,caller:Mt});return p.jsxRuntimeExports.jsx(ji,{scope:t,triggerRef:a,contentRef:c,contentId:Le(),titleId:Le(),descriptionId:Le(),open:u,onOpenChange:g,onOpenToggle:l.useCallback(()=>g(m=>!m),[g]),modal:i,children:n})};Qr.displayName=Mt;var eo="DialogTrigger",to=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=xe(eo,n),o=oe.useComposedRefs(t,s.triggerRef);return p.jsxRuntimeExports.jsx(ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":bn(s.open),...r,ref:o,onClick:re(e.onClick,s.onOpenToggle)})});to.displayName=eo;var xn="DialogPortal",[Ni,no]=Jr(xn,{forceMount:void 0}),ro=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,o=xe(xn,t);return p.jsxRuntimeExports.jsx(Ni,{scope:t,forceMount:n,children:l.Children.map(r,i=>p.jsxRuntimeExports.jsx(at,{present:n||o.open,children:p.jsxRuntimeExports.jsx(Ct,{asChild:!0,container:s,children:i})}))})};ro.displayName=xn;var yt="DialogOverlay",oo=l.forwardRef((e,t)=>{const n=no(yt,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=xe(yt,e.__scopeDialog);return o.modal?p.jsxRuntimeExports.jsx(at,{present:r||o.open,children:p.jsxRuntimeExports.jsx(Ai,{...s,ref:t})}):null});oo.displayName=yt;var Ii=oe.createSlot("DialogOverlay.RemoveScroll"),Ai=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=xe(yt,n);return p.jsxRuntimeExports.jsx(Pt,{as:Ii,allowPinchZoom:!0,shards:[s.contentRef],children:p.jsxRuntimeExports.jsx(ee.div,{"data-state":bn(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Be="DialogContent",so=l.forwardRef((e,t)=>{const n=no(Be,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=xe(Be,e.__scopeDialog);return p.jsxRuntimeExports.jsx(at,{present:r||o.open,children:o.modal?p.jsxRuntimeExports.jsx(Di,{...s,ref:t}):p.jsxRuntimeExports.jsx(Mi,{...s,ref:t})})});so.displayName=Be;var Di=l.forwardRef((e,t)=>{const n=xe(Be,e.__scopeDialog),r=l.useRef(null),s=oe.useComposedRefs(t,n.contentRef,r);return l.useEffect(()=>{const o=r.current;if(o)return fn(o)},[]),p.jsxRuntimeExports.jsx(ao,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:re(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:re(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&o.preventDefault()}),onFocusOutside:re(e.onFocusOutside,o=>o.preventDefault())})}),Mi=l.forwardRef((e,t)=>{const n=xe(Be,e.__scopeDialog),r=l.useRef(!1),s=l.useRef(!1);return p.jsxRuntimeExports.jsx(ao,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),ao=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=e,a=xe(Be,n),c=l.useRef(null),u=oe.useComposedRefs(t,c);return ln(),p.jsxRuntimeExports.jsxs(p.jsxRuntimeExports.Fragment,{children:[p.jsxRuntimeExports.jsx(St,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:p.jsxRuntimeExports.jsx(wt,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":bn(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),p.jsxRuntimeExports.jsxs(p.jsxRuntimeExports.Fragment,{children:[p.jsxRuntimeExports.jsx(_i,{titleId:a.titleId}),p.jsxRuntimeExports.jsx(Oi,{contentRef:c,descriptionId:a.descriptionId})]})]})}),yn="DialogTitle",io=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=xe(yn,n);return p.jsxRuntimeExports.jsx(ee.h2,{id:s.titleId,...r,ref:t})});io.displayName=yn;var lo="DialogDescription",co=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=xe(lo,n);return p.jsxRuntimeExports.jsx(ee.p,{id:s.descriptionId,...r,ref:t})});co.displayName=lo;var uo="DialogClose",fo=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=xe(uo,n);return p.jsxRuntimeExports.jsx(ee.button,{type:"button",...r,ref:t,onClick:re(e.onClick,()=>s.onOpenChange(!1))})});fo.displayName=uo;function bn(e){return e?"open":"closed"}var po="DialogTitleWarning",[Ti,mo]=Ss(po,{contentName:Be,titleName:yn,docsSlug:"dialog"}),_i=({titleId:e})=>{const t=mo(po),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
-
43
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
-
45
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{if(e){const r=document.getElementById(e)}},[n,e]),null},zi="DialogDescriptionWarning",Oi=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${mo(zi).contentName}}.`;return l.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");if(t&&s){const i=document.getElementById(t)}},[r,e,t]),null},go=Qr,ho=to,vo=ro,xo=oo,yo=so,bo=io,Eo=co,En=fo;function ki({...e}){return p.jsxRuntimeExports.jsx(go,{"data-slot":"dialog",...e})}function Li({...e}){return p.jsxRuntimeExports.jsx(ho,{"data-slot":"dialog-trigger",...e})}function wo({...e}){return p.jsxRuntimeExports.jsx(vo,{"data-slot":"dialog-portal",...e})}function $i({...e}){return p.jsxRuntimeExports.jsx(En,{"data-slot":"dialog-close",...e})}function So({className:e,backdrop:t,...n}){let r="";switch(t){case"transparent":r="bg-transparent";break;case"opaque":r="bg-black/50";break;case"blur":r="backdrop-blur-md backdrop-saturate-150 bg-overlay/30";break}return p.jsxRuntimeExports.jsx(xo,{"data-slot":"dialog-overlay",className:ue.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",r,e),...n})}const Hi=l.forwardRef(({className:e,children:t,showCloseButton:n=!0,disabled:r=!1,backdrop:s="opaque",...o},i)=>p.jsxRuntimeExports.jsx(hs.AnimatePresence,{children:p.jsxRuntimeExports.jsxs(wo,{"data-slot":"dialog-portal",children:[p.jsxRuntimeExports.jsx(So,{backdrop:s}),p.jsxRuntimeExports.jsxs(yo,{"data-slot":"dialog-content",ref:i,className:ue.cn("bg-content1 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg p-6 shadow-lg duration-200 sm:max-w-lg",e),...o,children:[t,n&&p.jsxRuntimeExports.jsx(En,{"data-slot":"dialog-close",asChild:!0,className:"absolute top-3 right-4 disabled:pointer-events-none",children:p.jsxRuntimeExports.jsx("div",{children:p.jsxRuntimeExports.jsxs(gs.Button,{isIconOnly:!0,variant:"light",radius:"full","aria-label":"Close",disabled:r,className:"p-0 w-[36px] h-[36px] min-w-auto bg-default-100 hover:bg-default-200 text-default-500 hover:text-default-600 dark:bg-default-100 dark:hover:bg-default-200 dark:text-default-500 dark:hover:text-default-600 disabled:opacity-50 disabled:pointer-events-none",children:[p.jsxRuntimeExports.jsxs("svg",{width:"20",height:"20",fill:"currentColor",role:"img","aria-hidden":"true",children:[p.jsxRuntimeExports.jsx("path",{fill:"none",d:"M0 0h21v21H0z"}),p.jsxRuntimeExports.jsx("path",{d:"m12.12 10 4.07-4.06a1.5 1.5 0 1 0-2.11-2.12L10 7.88 5.94 3.81a1.5 1.5 0 1 0-2.12 2.12L7.88 10l-4.07 4.06a1.5 1.5 0 0 0 0 2.12 1.51 1.51 0 0 0 2.13 0L10 12.12l4.06 4.07a1.45 1.45 0 0 0 1.06.44 1.5 1.5 0 0 0 1.06-2.56Z"})]}),p.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})})})]})]})}));function Bi({className:e,...t}){return p.jsxRuntimeExports.jsx("div",{"data-slot":"dialog-header",className:ue.cn("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Fi({className:e,...t}){return p.jsxRuntimeExports.jsx("div",{"data-slot":"dialog-footer",className:ue.cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Wi({className:e,...t}){return p.jsxRuntimeExports.jsx(bo,{"data-slot":"dialog-title",className:ue.cn("text-lg leading-none font-semibold",e),...t})}function Vi({className:e,...t}){return p.jsxRuntimeExports.jsx(Eo,{"data-slot":"dialog-description",className:ue.cn("text-muted-foreground text-sm",e),...t})}function Co(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ro=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"}),Ui="VisuallyHidden",Po=l.forwardRef((e,t)=>p.jsxRuntimeExports.jsx(ee.span,{...e,ref:t,style:{...Ro,...e.style}}));Po.displayName=Ui;var Gi=Po;function Qt(e,[t,n]){return Math.min(n,Math.max(t,e))}var Ki=[" ","Enter","ArrowUp","ArrowDown"],qi=[" ","Enter"],Fe="Select",[Tt,_t,Xi]=tr(Fe),[Je,Xl]=st(Fe,[Xi,un]),zt=un(),[Yi,Me]=Je(Fe),[Zi,Ji]=Je(Fe),jo=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:o,value:i,defaultValue:a,onValueChange:c,dir:u,name:g,autoComplete:m,disabled:f,required:x,form:b}=e,d=zt(t),[h,v]=l.useState(null),[y,E]=l.useState(null),[C,M]=l.useState(!1),I=nr(u),[S,B]=ht({prop:r,defaultProp:s??!1,onChange:o,caller:Fe}),[_,F]=ht({prop:i,defaultProp:a,onChange:c,caller:Fe}),G=l.useRef(null),k=h?b||!!h.closest("form"):!0,[$,X]=l.useState(new Set),q=Array.from($).map(U=>U.props.value).join(";");return p.jsxRuntimeExports.jsx(vr,{...d,children:p.jsxRuntimeExports.jsxs(Yi,{required:x,scope:t,trigger:h,onTriggerChange:v,valueNode:y,onValueNodeChange:E,valueNodeHasChildren:C,onValueNodeHasChildrenChange:M,contentId:Le(),value:_,onValueChange:F,open:S,onOpenChange:B,dir:I,triggerPointerDownPosRef:G,disabled:f,children:[p.jsxRuntimeExports.jsx(Tt.Provider,{scope:t,children:p.jsxRuntimeExports.jsx(Zi,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(U=>{X(te=>new Set(te).add(U))},[]),onNativeOptionRemove:l.useCallback(U=>{X(te=>{const Q=new Set(te);return Q.delete(U),Q})},[]),children:n})}),k?p.jsxRuntimeExports.jsxs(Jo,{"aria-hidden":!0,required:x,tabIndex:-1,name:g,autoComplete:m,value:_,onChange:U=>F(U.target.value),disabled:f,form:b,children:[_===void 0?p.jsxRuntimeExports.jsx("option",{value:""}):null,Array.from($)]},q):null]})})};jo.displayName=Fe;var No="SelectTrigger",Io=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,o=zt(n),i=Me(No,n),a=i.disabled||r,c=oe.useComposedRefs(t,i.onTriggerChange),u=_t(n),g=l.useRef("touch"),[m,f,x]=es(d=>{const h=u().filter(E=>!E.disabled),v=h.find(E=>E.value===i.value),y=ts(h,d,v);y!==void 0&&i.onValueChange(y.value)}),b=d=>{a||(i.onOpenChange(!0),x()),d&&(i.triggerPointerDownPosRef.current={x:Math.round(d.pageX),y:Math.round(d.pageY)})};return p.jsxRuntimeExports.jsx(xr,{asChild:!0,...o,children:p.jsxRuntimeExports.jsx(ee.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Qo(i.value)?"":void 0,...s,ref:c,onClick:re(s.onClick,d=>{d.currentTarget.focus(),g.current!=="mouse"&&b(d)}),onPointerDown:re(s.onPointerDown,d=>{g.current=d.pointerType;const h=d.target;h.hasPointerCapture(d.pointerId)&&h.releasePointerCapture(d.pointerId),d.button===0&&d.ctrlKey===!1&&d.pointerType==="mouse"&&(b(d),d.preventDefault())}),onKeyDown:re(s.onKeyDown,d=>{const h=m.current!=="";!(d.ctrlKey||d.altKey||d.metaKey)&&d.key.length===1&&f(d.key),!(h&&d.key===" ")&&Ki.includes(d.key)&&(b(),d.preventDefault())})})})});Io.displayName=No;var Ao="SelectValue",Do=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:o,placeholder:i="",...a}=e,c=Me(Ao,n),{onValueNodeHasChildrenChange:u}=c,g=o!==void 0,m=oe.useComposedRefs(t,c.onValueNodeChange);return de(()=>{u(g)},[u,g]),p.jsxRuntimeExports.jsx(ee.span,{...a,ref:m,style:{pointerEvents:"none"},children:Qo(c.value)?p.jsxRuntimeExports.jsx(p.jsxRuntimeExports.Fragment,{children:i}):o})});Do.displayName=Ao;var Qi="SelectIcon",Mo=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return p.jsxRuntimeExports.jsx(ee.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});Mo.displayName=Qi;var el="SelectPortal",To=e=>p.jsxRuntimeExports.jsx(Ct,{asChild:!0,...e});To.displayName=el;var We="SelectContent",_o=l.forwardRef((e,t)=>{const n=Me(We,e.__scopeSelect),[r,s]=l.useState();if(de(()=>{s(new DocumentFragment)},[]),!n.open){const o=r;return o?sn.createPortal(p.jsxRuntimeExports.jsx(zo,{scope:e.__scopeSelect,children:p.jsxRuntimeExports.jsx(Tt.Slot,{scope:e.__scopeSelect,children:p.jsxRuntimeExports.jsx("div",{children:e.children})})}),o):null}return p.jsxRuntimeExports.jsx(Oo,{...e,ref:t})});_o.displayName=We;var he=10,[zo,Te]=Je(We),tl="SelectContentImpl",nl=oe.createSlot("SelectContent.RemoveScroll"),Oo=l.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:i,side:a,sideOffset:c,align:u,alignOffset:g,arrowPadding:m,collisionBoundary:f,collisionPadding:x,sticky:b,hideWhenDetached:d,avoidCollisions:h,...v}=e,y=Me(We,n),[E,C]=l.useState(null),[M,I]=l.useState(null),S=oe.useComposedRefs(t,w=>C(w)),[B,_]=l.useState(null),[F,G]=l.useState(null),k=_t(n),[$,X]=l.useState(!1),q=l.useRef(!1);l.useEffect(()=>{if(E)return fn(E)},[E]),ln();const U=l.useCallback(w=>{const[j,...L]=k().map(H=>H.ref.current),[O]=L.slice(-1),W=document.activeElement;for(const H of w)if(H===W||(H==null||H.scrollIntoView({block:"nearest"}),H===j&&M&&(M.scrollTop=0),H===O&&M&&(M.scrollTop=M.scrollHeight),H==null||H.focus(),document.activeElement!==W))return},[k,M]),te=l.useCallback(()=>U([B,E]),[U,B,E]);l.useEffect(()=>{$&&te()},[$,te]);const{onOpenChange:Q,triggerPointerDownPosRef:J}=y;l.useEffect(()=>{if(E){let w={x:0,y:0};const j=O=>{var W,H;w={x:Math.abs(Math.round(O.pageX)-(((W=J.current)==null?void 0:W.x)??0)),y:Math.abs(Math.round(O.pageY)-(((H=J.current)==null?void 0:H.y)??0))}},L=O=>{w.x<=10&&w.y<=10?O.preventDefault():E.contains(O.target)||Q(!1),document.removeEventListener("pointermove",j),J.current=null};return J.current!==null&&(document.addEventListener("pointermove",j),document.addEventListener("pointerup",L,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",L,{capture:!0})}}},[E,Q,J]),l.useEffect(()=>{const w=()=>Q(!1);return window.addEventListener("blur",w),window.addEventListener("resize",w),()=>{window.removeEventListener("blur",w),window.removeEventListener("resize",w)}},[Q]);const[fe,se]=es(w=>{const j=k().filter(W=>!W.disabled),L=j.find(W=>W.ref.current===document.activeElement),O=ts(j,w,L);O&&setTimeout(()=>O.ref.current.focus())}),ce=l.useCallback((w,j,L)=>{const O=!q.current&&!L;(y.value!==void 0&&y.value===j||O)&&(_(w),O&&(q.current=!0))},[y.value]),P=l.useCallback(()=>E==null?void 0:E.focus(),[E]),A=l.useCallback((w,j,L)=>{const O=!q.current&&!L;(y.value!==void 0&&y.value===j||O)&&G(w)},[y.value]),T=r==="popper"?en:ko,D=T===en?{side:a,sideOffset:c,align:u,alignOffset:g,arrowPadding:m,collisionBoundary:f,collisionPadding:x,sticky:b,hideWhenDetached:d,avoidCollisions:h}:{};return p.jsxRuntimeExports.jsx(zo,{scope:n,content:E,viewport:M,onViewportChange:I,itemRefCallback:ce,selectedItem:B,onItemLeave:P,itemTextRefCallback:A,focusSelectedItem:te,selectedItemText:F,position:r,isPositioned:$,searchRef:fe,children:p.jsxRuntimeExports.jsx(Pt,{as:nl,allowPinchZoom:!0,children:p.jsxRuntimeExports.jsx(St,{asChild:!0,trapped:y.open,onMountAutoFocus:w=>{w.preventDefault()},onUnmountAutoFocus:re(s,w=>{var j;(j=y.trigger)==null||j.focus({preventScroll:!0}),w.preventDefault()}),children:p.jsxRuntimeExports.jsx(wt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:w=>w.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:p.jsxRuntimeExports.jsx(T,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:w=>w.preventDefault(),...v,...D,onPlaced:()=>X(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:re(v.onKeyDown,w=>{const j=w.ctrlKey||w.altKey||w.metaKey;if(w.key==="Tab"&&w.preventDefault(),!j&&w.key.length===1&&se(w.key),["ArrowUp","ArrowDown","Home","End"].includes(w.key)){let O=k().filter(W=>!W.disabled).map(W=>W.ref.current);if(["ArrowUp","End"].includes(w.key)&&(O=O.slice().reverse()),["ArrowUp","ArrowDown"].includes(w.key)){const W=w.target,H=O.indexOf(W);O=O.slice(H+1)}setTimeout(()=>U(O)),w.preventDefault()}})})})})})})});Oo.displayName=tl;var rl="SelectItemAlignedPosition",ko=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,o=Me(We,n),i=Te(We,n),[a,c]=l.useState(null),[u,g]=l.useState(null),m=oe.useComposedRefs(t,S=>g(S)),f=_t(n),x=l.useRef(!1),b=l.useRef(!0),{viewport:d,selectedItem:h,selectedItemText:v,focusSelectedItem:y}=i,E=l.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&u&&d&&h&&v){const S=o.trigger.getBoundingClientRect(),B=u.getBoundingClientRect(),_=o.valueNode.getBoundingClientRect(),F=v.getBoundingClientRect();if(o.dir!=="rtl"){const W=F.left-B.left,H=_.left-W,K=S.left-H,N=S.width+K,z=Math.max(N,B.width),ne=window.innerWidth-he,ie=Qt(H,[he,Math.max(he,ne-z)]);a.style.minWidth=N+"px",a.style.left=ie+"px"}else{const W=B.right-F.right,H=window.innerWidth-_.right-W,K=window.innerWidth-S.right-H,N=S.width+K,z=Math.max(N,B.width),ne=window.innerWidth-he,ie=Qt(H,[he,Math.max(he,ne-z)]);a.style.minWidth=N+"px",a.style.right=ie+"px"}const G=f(),k=window.innerHeight-he*2,$=d.scrollHeight,X=window.getComputedStyle(u),q=parseInt(X.borderTopWidth,10),U=parseInt(X.paddingTop,10),te=parseInt(X.borderBottomWidth,10),Q=parseInt(X.paddingBottom,10),J=q+U+$+Q+te,fe=Math.min(h.offsetHeight*5,J),se=window.getComputedStyle(d),ce=parseInt(se.paddingTop,10),P=parseInt(se.paddingBottom,10),A=S.top+S.height/2-he,T=k-A,D=h.offsetHeight/2,w=h.offsetTop+D,j=q+U+w,L=J-j;if(j<=A){const W=G.length>0&&h===G[G.length-1].ref.current;a.style.bottom="0px";const H=u.clientHeight-d.offsetTop-d.offsetHeight,K=Math.max(T,D+(W?P:0)+H+te),N=j+K;a.style.height=N+"px"}else{const W=G.length>0&&h===G[0].ref.current;a.style.top="0px";const K=Math.max(A,q+d.offsetTop+(W?ce:0)+D)+L;a.style.height=K+"px",d.scrollTop=j-A+d.offsetTop}a.style.margin=`${he}px 0`,a.style.minHeight=fe+"px",a.style.maxHeight=k+"px",r==null||r(),requestAnimationFrame(()=>x.current=!0)}},[f,o.trigger,o.valueNode,a,u,d,h,v,o.dir,r]);de(()=>E(),[E]);const[C,M]=l.useState();de(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const I=l.useCallback(S=>{S&&b.current===!0&&(E(),y==null||y(),b.current=!1)},[E,y]);return p.jsxRuntimeExports.jsx(sl,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:x,onScrollButtonChange:I,children:p.jsxRuntimeExports.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:p.jsxRuntimeExports.jsx(ee.div,{...s,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});ko.displayName=rl;var ol="SelectPopperPosition",en=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=he,...o}=e,i=zt(n);return p.jsxRuntimeExports.jsx(yr,{...i,...o,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...o.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)"}})});en.displayName=ol;var[sl,wn]=Je(We,{}),tn="SelectViewport",Lo=l.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,o=Te(tn,n),i=wn(tn,n),a=oe.useComposedRefs(t,o.onViewportChange),c=l.useRef(0);return p.jsxRuntimeExports.jsxs(p.jsxRuntimeExports.Fragment,{children:[p.jsxRuntimeExports.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:r}),p.jsxRuntimeExports.jsx(Tt.Slot,{scope:n,children:p.jsxRuntimeExports.jsx(ee.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:re(s.onScroll,u=>{const g=u.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:f}=i;if(f!=null&&f.current&&m){const x=Math.abs(c.current-g.scrollTop);if(x>0){const b=window.innerHeight-he*2,d=parseFloat(m.style.minHeight),h=parseFloat(m.style.height),v=Math.max(d,h);if(v<b){const y=v+x,E=Math.min(b,y),C=y-E;m.style.height=E+"px",m.style.bottom==="0px"&&(g.scrollTop=C>0?C:0,m.style.justifyContent="flex-end")}}}c.current=g.scrollTop})})})]})});Lo.displayName=tn;var $o="SelectGroup",[al,il]=Je($o),Ho=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Le();return p.jsxRuntimeExports.jsx(al,{scope:n,id:s,children:p.jsxRuntimeExports.jsx(ee.div,{role:"group","aria-labelledby":s,...r,ref:t})})});Ho.displayName=$o;var Bo="SelectLabel",Fo=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=il(Bo,n);return p.jsxRuntimeExports.jsx(ee.div,{id:s.id,...r,ref:t})});Fo.displayName=Bo;var bt="SelectItem",[ll,Wo]=Je(bt),Vo=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:o,...i}=e,a=Me(bt,n),c=Te(bt,n),u=a.value===r,[g,m]=l.useState(o??""),[f,x]=l.useState(!1),b=oe.useComposedRefs(t,y=>{var E;return(E=c.itemRefCallback)==null?void 0:E.call(c,y,r,s)}),d=Le(),h=l.useRef("touch"),v=()=>{s||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")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 p.jsxRuntimeExports.jsx(ll,{scope:n,value:r,disabled:s,textId:d,isSelected:u,onItemTextChange:l.useCallback(y=>{m(E=>E||((y==null?void 0:y.textContent)??"").trim())},[]),children:p.jsxRuntimeExports.jsx(Tt.ItemSlot,{scope:n,value:r,disabled:s,textValue:g,children:p.jsxRuntimeExports.jsx(ee.div,{role:"option","aria-labelledby":d,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...i,ref:b,onFocus:re(i.onFocus,()=>x(!0)),onBlur:re(i.onBlur,()=>x(!1)),onClick:re(i.onClick,()=>{h.current!=="mouse"&&v()}),onPointerUp:re(i.onPointerUp,()=>{h.current==="mouse"&&v()}),onPointerDown:re(i.onPointerDown,y=>{h.current=y.pointerType}),onPointerMove:re(i.onPointerMove,y=>{var E;h.current=y.pointerType,s?(E=c.onItemLeave)==null||E.call(c):h.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:re(i.onPointerLeave,y=>{var E;y.currentTarget===document.activeElement&&((E=c.onItemLeave)==null||E.call(c))}),onKeyDown:re(i.onKeyDown,y=>{var C;((C=c.searchRef)==null?void 0:C.current)!==""&&y.key===" "||(qi.includes(y.key)&&v(),y.key===" "&&y.preventDefault())})})})})});Vo.displayName=bt;var nt="SelectItemText",Uo=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...o}=e,i=Me(nt,n),a=Te(nt,n),c=Wo(nt,n),u=Ji(nt,n),[g,m]=l.useState(null),f=oe.useComposedRefs(t,v=>m(v),c.onItemTextChange,v=>{var y;return(y=a.itemTextRefCallback)==null?void 0:y.call(a,v,c.value,c.disabled)}),x=g==null?void 0:g.textContent,b=l.useMemo(()=>p.jsxRuntimeExports.jsx("option",{value:c.value,disabled:c.disabled,children:x},c.value),[c.disabled,c.value,x]),{onNativeOptionAdd:d,onNativeOptionRemove:h}=u;return de(()=>(d(b),()=>h(b)),[d,h,b]),p.jsxRuntimeExports.jsxs(p.jsxRuntimeExports.Fragment,{children:[p.jsxRuntimeExports.jsx(ee.span,{id:c.textId,...o,ref:f}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?sn.createPortal(o.children,i.valueNode):null]})});Uo.displayName=nt;var Go="SelectItemIndicator",Ko=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Wo(Go,n).isSelected?p.jsxRuntimeExports.jsx(ee.span,{"aria-hidden":!0,...r,ref:t}):null});Ko.displayName=Go;var nn="SelectScrollUpButton",qo=l.forwardRef((e,t)=>{const n=Te(nn,e.__scopeSelect),r=wn(nn,e.__scopeSelect),[s,o]=l.useState(!1),i=oe.useComposedRefs(t,r.onScrollButtonChange);return de(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollTop>0;o(u)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?p.jsxRuntimeExports.jsx(Yo,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});qo.displayName=nn;var rn="SelectScrollDownButton",Xo=l.forwardRef((e,t)=>{const n=Te(rn,e.__scopeSelect),r=wn(rn,e.__scopeSelect),[s,o]=l.useState(!1),i=oe.useComposedRefs(t,r.onScrollButtonChange);return de(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollHeight-c.clientHeight,g=Math.ceil(c.scrollTop)<u;o(g)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?p.jsxRuntimeExports.jsx(Yo,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});Xo.displayName=rn;var Yo=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,o=Te("SelectScrollButton",n),i=l.useRef(null),a=_t(n),c=l.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),de(()=>{var g;const u=a().find(m=>m.ref.current===document.activeElement);(g=u==null?void 0:u.ref.current)==null||g.scrollIntoView({block:"nearest"})},[a]),p.jsxRuntimeExports.jsx(ee.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:re(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:re(s.onPointerMove,()=>{var u;(u=o.onItemLeave)==null||u.call(o),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:re(s.onPointerLeave,()=>{c()})})}),cl="SelectSeparator",Zo=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.jsxRuntimeExports.jsx(ee.div,{"aria-hidden":!0,...r,ref:t})});Zo.displayName=cl;var on="SelectArrow",ul=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=zt(n),o=Me(on,n),i=Te(on,n);return o.open&&i.position==="popper"?p.jsxRuntimeExports.jsx(br,{...s,...r,ref:t}):null});ul.displayName=on;var dl="SelectBubbleInput",Jo=l.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const s=l.useRef(null),o=oe.useComposedRefs(r,s),i=Co(t);return l.useEffect(()=>{const a=s.current;if(!a)return;const c=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&g){const m=new Event("change",{bubbles:!0});g.call(a,t),a.dispatchEvent(m)}},[i,t]),p.jsxRuntimeExports.jsx(ee.select,{...n,style:{...Ro,...n.style},ref:o,defaultValue:t})});Jo.displayName=dl;function Qo(e){return e===""||e===void 0}function es(e){const t=De(e),n=l.useRef(""),r=l.useRef(0),s=l.useCallback(i=>{const a=n.current+i;t(a),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),o=l.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,o]}function ts(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=fl(e,Math.max(o,0));s.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function fl(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var pl=jo,ml=Io,gl=Do,hl=Mo,vl=To,xl=_o,yl=Lo,bl=Ho,El=Fo,wl=Vo,Sl=Uo,Cl=Ko,Rl=qo,Pl=Xo,jl=Zo;function Nl({...e}){return p.jsxRuntimeExports.jsx(pl,{"data-slot":"select",...e})}function Il({...e}){return p.jsxRuntimeExports.jsx(bl,{"data-slot":"select-group",...e})}function Al({...e}){return p.jsxRuntimeExports.jsx(gl,{"data-slot":"select-value",...e})}function Dl({className:e,size:t="default",children:n,...r}){return p.jsxRuntimeExports.jsxs(ml,{"data-slot":"select-trigger","data-size":t,className:ue.cn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground 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:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,p.jsxRuntimeExports.jsx(hl,{asChild:!0,children:p.jsxRuntimeExports.jsx(pn,{className:"size-4 opacity-50"})})]})}function Ml({className:e,children:t,position:n="popper",...r}){return p.jsxRuntimeExports.jsx(vl,{children:p.jsxRuntimeExports.jsxs(xl,{"data-slot":"select-content",className:ue.cn("bg-content1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md shadow-medium",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[p.jsxRuntimeExports.jsx(ns,{}),p.jsxRuntimeExports.jsx(yl,{className:ue.cn("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),p.jsxRuntimeExports.jsx(rs,{})]})})}function Tl({className:e,...t}){return p.jsxRuntimeExports.jsx(El,{"data-slot":"select-label",className:ue.cn("text-muted-foreground px-2 py-1.5 text-xs",e),...t})}function _l({className:e,children:t,...n}){return p.jsxRuntimeExports.jsxs(wl,{"data-slot":"select-item",className:ue.cn("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[p.jsxRuntimeExports.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:p.jsxRuntimeExports.jsx(Cl,{children:p.jsxRuntimeExports.jsx(Ar,{className:"size-4"})})}),p.jsxRuntimeExports.jsx(Sl,{children:t})]})}function zl({className:e,...t}){return p.jsxRuntimeExports.jsx(jl,{"data-slot":"select-separator",className:ue.cn("bg-border pointer-events-none -mx-1 my-1 h-px",e),...t})}function ns({className:e,...t}){return p.jsxRuntimeExports.jsx(Rl,{"data-slot":"select-scroll-up-button",className:ue.cn("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsxRuntimeExports.jsx(Za,{className:"size-4"})})}function rs({className:e,...t}){return p.jsxRuntimeExports.jsx(Pl,{"data-slot":"select-scroll-down-button",className:ue.cn("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsxRuntimeExports.jsx(pn,{className:"size-4"})})}var Ol=Object.defineProperty,kl=Object.defineProperties,Ll=Object.getOwnPropertyDescriptors,Et=Object.getOwnPropertySymbols,os=Object.prototype.hasOwnProperty,ss=Object.prototype.propertyIsEnumerable,qn=(e,t,n)=>t in e?Ol(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$l=(e,t)=>{for(var n in t||(t={}))os.call(t,n)&&qn(e,n,t[n]);if(Et)for(var n of Et(t))ss.call(t,n)&&qn(e,n,t[n]);return e},Hl=(e,t)=>kl(e,Ll(t)),Bl=(e,t)=>{var n={};for(var r in e)os.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Et)for(var r of Et(e))t.indexOf(r)<0&&ss.call(e,r)&&(n[r]=e[r]);return n};function Fl(e){let t=setTimeout(e,0),n=setTimeout(e,10),r=setTimeout(e,50);return[t,n,r]}function Wl(e){let t=l.useRef();return l.useEffect(()=>{t.current=e}),t.current}var Vl=18,as=40,Ul=`${as}px`,Gl=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function Kl({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[s,o]=l.useState(!1),[i,a]=l.useState(!1),[c,u]=l.useState(!1),g=l.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&s&&i,[s,i,n]),m=l.useCallback(()=>{let f=e.current,x=t.current;if(!f||!x||c||n==="none")return;let b=f,d=b.getBoundingClientRect().left+b.offsetWidth,h=b.getBoundingClientRect().top+b.offsetHeight/2,v=d-Vl,y=h;document.querySelectorAll(Gl).length===0&&document.elementFromPoint(v,y)===f||(o(!0),u(!0))},[e,t,c,n]);return l.useEffect(()=>{let f=e.current;if(!f||n==="none")return;function x(){let d=window.innerWidth-f.getBoundingClientRect().right;a(d>=as)}x();let b=setInterval(x,1e3);return()=>{clearInterval(b)}},[e,n]),l.useEffect(()=>{let f=r||document.activeElement===t.current;if(n==="none"||!f)return;let x=setTimeout(m,0),b=setTimeout(m,2e3),d=setTimeout(m,5e3),h=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(x),clearTimeout(b),clearTimeout(d),clearTimeout(h)}},[t,r,n,m]),{hasPWMBadge:s,willPushPWMBadge:g,PWM_BADGE_SPACE_WIDTH:Ul}}var is=l.createContext({}),ls=l.forwardRef((e,t)=>{var n=e,{value:r,onChange:s,maxLength:o,textAlign:i="left",pattern:a,placeholder:c,inputMode:u="numeric",onComplete:g,pushPasswordManagerStrategy:m="increase-width",pasteTransformer:f,containerClassName:x,noScriptCSSFallback:b=ql,render:d,children:h}=n,v=Bl(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),y,E,C,M,I;let[S,B]=l.useState(typeof v.defaultValue=="string"?v.defaultValue:""),_=r??S,F=Wl(_),G=l.useCallback(N=>{s==null||s(N),B(N)},[s]),k=l.useMemo(()=>a?typeof a=="string"?new RegExp(a):a:null,[a]),$=l.useRef(null),X=l.useRef(null),q=l.useRef({value:_,onChange:G,isIOS:typeof window<"u"&&((E=(y=window==null?void 0:window.CSS)==null?void 0:y.supports)==null?void 0:E.call(y,"-webkit-touch-callout","none"))}),U=l.useRef({prev:[(C=$.current)==null?void 0:C.selectionStart,(M=$.current)==null?void 0:M.selectionEnd,(I=$.current)==null?void 0:I.selectionDirection]});l.useImperativeHandle(t,()=>$.current,[]),l.useEffect(()=>{let N=$.current,z=X.current;if(!N||!z)return;q.current.value!==N.value&&q.current.onChange(N.value),U.current.prev=[N.selectionStart,N.selectionEnd,N.selectionDirection];function ne(){if(document.activeElement!==N){ce(null),A(null);return}let Y=N.selectionStart,pe=N.selectionEnd,ye=N.selectionDirection,me=N.maxLength,Ee=N.value,we=U.current.prev,Re=-1,Pe=-1,_e;if(Ee.length!==0&&Y!==null&&pe!==null){let us=Y===pe,ds=Y===Ee.length&&Ee.length<me;if(us&&!ds){let ze=Y;if(ze===0)Re=0,Pe=1,_e="forward";else if(ze===me)Re=ze-1,Pe=ze,_e="backward";else if(me>1&&Ee.length>1){let Ot=0;if(we[0]!==null&&we[1]!==null){_e=ze<we[1]?"backward":"forward";let fs=we[0]===we[1]&&we[0]<me;_e==="backward"&&!fs&&(Ot=-1)}Re=Ot+ze,Pe=Ot+ze+1}}Re!==-1&&Pe!==-1&&Re!==Pe&&$.current.setSelectionRange(Re,Pe,_e)}let Sn=Re!==-1?Re:Y,Cn=Pe!==-1?Pe:pe,cs=_e??ye;ce(Sn),A(Cn),U.current.prev=[Sn,Cn,cs]}if(document.addEventListener("selectionchange",ne,{capture:!0}),ne(),document.activeElement===N&&fe(!0),!document.getElementById("input-otp-style")){let Y=document.createElement("style");if(Y.id="input-otp-style",document.head.appendChild(Y),Y.sheet){let pe="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Qe(Y.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Qe(Y.sheet,`[data-input-otp]:autofill { ${pe} }`),Qe(Y.sheet,`[data-input-otp]:-webkit-autofill { ${pe} }`),Qe(Y.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Qe(Y.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let ie=()=>{z&&z.style.setProperty("--root-height",`${N.clientHeight}px`)};ie();let Z=new ResizeObserver(ie);return Z.observe(N),()=>{document.removeEventListener("selectionchange",ne,{capture:!0}),Z.disconnect()}},[]);let[te,Q]=l.useState(!1),[J,fe]=l.useState(!1),[se,ce]=l.useState(null),[P,A]=l.useState(null);l.useEffect(()=>{Fl(()=>{var N,z,ne,ie;(N=$.current)==null||N.dispatchEvent(new Event("input"));let Z=(z=$.current)==null?void 0:z.selectionStart,Y=(ne=$.current)==null?void 0:ne.selectionEnd,pe=(ie=$.current)==null?void 0:ie.selectionDirection;Z!==null&&Y!==null&&(ce(Z),A(Y),U.current.prev=[Z,Y,pe])})},[_,J]),l.useEffect(()=>{F!==void 0&&_!==F&&F.length<o&&_.length===o&&(g==null||g(_))},[o,g,F,_]);let T=Kl({containerRef:X,inputRef:$,pushPasswordManagerStrategy:m,isFocused:J}),D=l.useCallback(N=>{let z=N.currentTarget.value.slice(0,o);if(z.length>0&&k&&!k.test(z)){N.preventDefault();return}typeof F=="string"&&z.length<F.length&&document.dispatchEvent(new Event("selectionchange")),G(z)},[o,G,F,k]),w=l.useCallback(()=>{var N;if($.current){let z=Math.min($.current.value.length,o-1),ne=$.current.value.length;(N=$.current)==null||N.setSelectionRange(z,ne),ce(z),A(ne)}fe(!0)},[o]),j=l.useCallback(N=>{var z,ne;let ie=$.current;if(!f&&(!q.current.isIOS||!N.clipboardData||!ie))return;let Z=N.clipboardData.getData("text/plain"),Y=f?f(Z):Z;N.preventDefault();let pe=(z=$.current)==null?void 0:z.selectionStart,ye=(ne=$.current)==null?void 0:ne.selectionEnd,me=(pe!==ye?_.slice(0,pe)+Y+_.slice(ye):_.slice(0,pe)+Y+_.slice(pe)).slice(0,o);if(me.length>0&&k&&!k.test(me))return;ie.value=me,G(me);let Ee=Math.min(me.length,o-1),we=me.length;ie.setSelectionRange(Ee,we),ce(Ee),A(we)},[o,G,k,_]),L=l.useMemo(()=>({position:"relative",cursor:v.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[v.disabled]),O=l.useMemo(()=>({position:"absolute",inset:0,width:T.willPushPWMBadge?`calc(100% + ${T.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:T.willPushPWMBadge?`inset(0 ${T.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:i,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[T.PWM_BADGE_SPACE_WIDTH,T.willPushPWMBadge,i]),W=l.useMemo(()=>l.createElement("input",Hl($l({autoComplete:v.autoComplete||"one-time-code"},v),{"data-input-otp":!0,"data-input-otp-placeholder-shown":_.length===0||void 0,"data-input-otp-mss":se,"data-input-otp-mse":P,inputMode:u,pattern:k==null?void 0:k.source,"aria-placeholder":c,style:O,maxLength:o,value:_,ref:$,onPaste:N=>{var z;j(N),(z=v.onPaste)==null||z.call(v,N)},onChange:D,onMouseOver:N=>{var z;Q(!0),(z=v.onMouseOver)==null||z.call(v,N)},onMouseLeave:N=>{var z;Q(!1),(z=v.onMouseLeave)==null||z.call(v,N)},onFocus:N=>{var z;w(),(z=v.onFocus)==null||z.call(v,N)},onBlur:N=>{var z;fe(!1),(z=v.onBlur)==null||z.call(v,N)}})),[D,w,j,u,O,o,P,se,v,k==null?void 0:k.source,_]),H=l.useMemo(()=>({slots:Array.from({length:o}).map((N,z)=>{var ne;let ie=J&&se!==null&&P!==null&&(se===P&&z===se||z>=se&&z<P),Z=_[z]!==void 0?_[z]:null,Y=_[0]!==void 0?null:(ne=c==null?void 0:c[z])!=null?ne:null;return{char:Z,placeholderChar:Y,isActive:ie,hasFakeCaret:ie&&Z===null}}),isFocused:J,isHovering:!v.disabled&&te}),[J,te,o,P,se,v.disabled,_]),K=l.useMemo(()=>d?d(H):l.createElement(is.Provider,{value:H},h),[h,H,d]);return l.createElement(l.Fragment,null,b!==null&&l.createElement("noscript",null,l.createElement("style",null,b)),l.createElement("div",{ref:X,"data-input-otp-container":!0,style:L,className:x},K,l.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},W)))});ls.displayName="Input";function Qe(e,t){try{e.insertRule(t)}catch{}}var ql=`
46
- [data-input-otp] {
47
- --nojs-bg: white !important;
48
- --nojs-fg: black !important;
49
-
50
- background-color: var(--nojs-bg) !important;
51
- color: var(--nojs-fg) !important;
52
- caret-color: var(--nojs-fg) !important;
53
- letter-spacing: .25em !important;
54
- text-align: center !important;
55
- border: 1px solid var(--nojs-fg) !important;
56
- border-radius: 4px !important;
57
- width: 100% !important;
58
- }
59
- @media (prefers-color-scheme: dark) {
60
- [data-input-otp] {
61
- --nojs-bg: black !important;
62
- --nojs-fg: white !important;
63
- }
64
- }`;exports.Anchor=xr;exports.Arrow=br;exports.Badge=ys;exports.Check=Ar;exports.ChevronDown=pn;exports.Close=En;exports.Content=yr;exports.Content$1=yo;exports.Description=Eo;exports.Dialog=ki;exports.DialogClose=$i;exports.DialogContent=Hi;exports.DialogDescription=Vi;exports.DialogFooter=Fi;exports.DialogHeader=Bi;exports.DialogOverlay=So;exports.DialogPortal=wo;exports.DialogTitle=Wi;exports.DialogTrigger=Li;exports.DismissableLayer=wt;exports.FocusScope=St;exports.Input=Jn;exports.Lt=ls;exports.Overlay=xo;exports.Panel=Mr;exports.PanelGroup=Yr;exports.PanelResizeHandle=Zr;exports.Portal=Ct;exports.Portal$1=vo;exports.Presence=at;exports.Primitive=ee;exports.ReactRemoveScroll=Pt;exports.Root=go;exports.Root$1=Gi;exports.Root2=vr;exports.Select=Nl;exports.SelectContent=Ml;exports.SelectGroup=Il;exports.SelectItem=_l;exports.SelectLabel=Tl;exports.SelectScrollDownButton=rs;exports.SelectScrollUpButton=ns;exports.SelectSeparator=zl;exports.SelectTrigger=Dl;exports.SelectValue=Al;exports.Switch=er;exports.Title=bo;exports.Trigger=ho;exports.WarningProvider=Ti;exports.clamp=Qt;exports.composeEventHandlers=re;exports.createCollection=tr;exports.createContextScope=st;exports.createDialogScope=Pi;exports.createLucideIcon=jt;exports.createPopperScope=un;exports.cva=an;exports.dispatchDiscreteCustomEvent=Qn;exports.hideOthers=fn;exports.jt=is;exports.useCallbackRef=De;exports.useControllableState=ht;exports.useDirection=nr;exports.useFocusGuards=ln;exports.useId=Le;exports.useLayoutEffect2=de;exports.usePrevious=Co;exports.useSize=ir;
65
- //# sourceMappingURL=index-BJdSO9mI.js.map