@keeper-security/keeper-js-ui 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,9 +1,9 @@
1
- (function(D,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],f):(D=typeof globalThis<"u"?globalThis:D||self,f(D["keeper-js-ui"]={},D["react/jsx-runtime"],D.React,D.ReactDOM))})(this,function(D,f,J,mt){"use strict";function Sr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const i=Sr(J),Ae=Sr(mt);function ud(e,t){const n=i.createContext(t),o=s=>{const{children:c,...a}=s,u=i.useMemo(()=>a,Object.values(a));return f.jsx(n.Provider,{value:u,children:c})};o.displayName=e+"Provider";function r(s){const c=i.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function ce(e,t=[]){let n=[];function o(s,c){const a=i.createContext(c),u=n.length;n=[...n,c];const l=p=>{var b;const{scope:m,children:v,...w}=p,h=((b=m==null?void 0:m[e])==null?void 0:b[u])||a,g=i.useMemo(()=>w,Object.values(w));return f.jsx(h.Provider,{value:g,children:v})};l.displayName=s+"Provider";function d(p,m){var h;const v=((h=m==null?void 0:m[e])==null?void 0:h[u])||a,w=i.useContext(v);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[l,d]}const r=()=>{const s=n.map(c=>i.createContext(c));return function(a){const u=(a==null?void 0:a[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...a,[e]:u}}),[a,u])}};return r.scopeName=e,[o,dd(r,...t)]}function dd(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const c=o.reduce((a,{useScope:u,scopeName:l})=>{const p=u(s)[`__scope${l}`];return{...a,...p}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function V(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}var Y=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{};function Pr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Lt(...e){return t=>{let n=!1;const o=e.map(r=>{const s=Pr(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():Pr(e[r],null)}}}}function L(...e){return i.useCallback(Lt(...e),e)}var ne=i.forwardRef((e,t)=>{const{children:n,...o}=e,r=i.Children.toArray(n),s=r.find(fd);if(s){const c=s.props.children,a=r.map(u=>u===s?i.Children.count(c)>1?i.Children.only(null):i.isValidElement(c)?c.props.children:null:u);return f.jsx(Mn,{...o,ref:t,children:i.isValidElement(c)?i.cloneElement(c,void 0,a):null})}return f.jsx(Mn,{...o,ref:t,children:n})});ne.displayName="Slot";var Mn=i.forwardRef((e,t)=>{const{children:n,...o}=e;if(i.isValidElement(n)){const r=hd(n),s=pd(o,n.props);return n.type!==i.Fragment&&(s.ref=t?Lt(t,r):r),i.cloneElement(n,s)}return i.Children.count(n)>1?i.Children.only(null):null});Mn.displayName="SlotClone";var On=({children:e})=>f.jsx(f.Fragment,{children:e});function fd(e){return i.isValidElement(e)&&e.type===On}function pd(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...a)=>{s(...a),r(...a)}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function hd(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var md=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],In=md.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...c}=o,a=s?ne:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(a,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Dn="Avatar",[vd,Yb]=ce(Dn),[gd,Tr]=vd(Dn),Nr=i.forwardRef((e,t)=>{const{__scopeAvatar:n,...o}=e,[r,s]=i.useState("idle");return f.jsx(gd,{scope:n,imageLoadingStatus:r,onImageLoadingStatusChange:s,children:f.jsx(In.span,{...o,ref:t})})});Nr.displayName=Dn;var Ar="AvatarImage",jr=i.forwardRef((e,t)=>{const{__scopeAvatar:n,src:o,onLoadingStatusChange:r=()=>{},...s}=e,c=Tr(Ar,n),a=wd(o,s.referrerPolicy),u=V(l=>{r(l),c.onImageLoadingStatusChange(l)});return Y(()=>{a!=="idle"&&u(a)},[a,u]),a==="loaded"?f.jsx(In.img,{...s,ref:t,src:o}):null});jr.displayName=Ar;var Mr="AvatarFallback",Or=i.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:o,...r}=e,s=Tr(Mr,n),[c,a]=i.useState(o===void 0);return i.useEffect(()=>{if(o!==void 0){const u=window.setTimeout(()=>a(!0),o);return()=>window.clearTimeout(u)}},[o]),c&&s.imageLoadingStatus!=="loaded"?f.jsx(In.span,{...r,ref:t}):null});Or.displayName=Mr;function wd(e,t){const[n,o]=i.useState("idle");return Y(()=>{if(!e){o("error");return}let r=!0;const s=new window.Image,c=a=>()=>{r&&o(a)};return o("loading"),s.onload=c("loaded"),s.onerror=c("error"),s.src=e,t&&(s.referrerPolicy=t),()=>{r=!1}},[e,t]),n}var Ir=Nr,Dr=jr,_r=Or;function Lr(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Lr(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function Rr(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Lr(e))&&(o&&(o+=" "),o+=t);return o}const $r=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Fr=Rr,et=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return Fr(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:s}=t,c=Object.keys(r).map(l=>{const d=n==null?void 0:n[l],p=s==null?void 0:s[l];if(d===null)return null;const m=$r(d)||$r(p);return r[l][m]}),a=n&&Object.entries(n).reduce((l,d)=>{let[p,m]=d;return m===void 0||(l[p]=m),l},{}),u=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((l,d)=>{let{class:p,className:m,...v}=d;return Object.entries(v).every(w=>{let[h,g]=w;return Array.isArray(g)?g.includes({...s,...a}[h]):{...s,...a}[h]===g})?[...l,p,m]:l},[]);return Fr(e,c,u,n==null?void 0:n.class,n==null?void 0:n.className)},_n="-",bd=e=>{const t=xd(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{const a=c.split(_n);return a[0]===""&&a.length!==1&&a.shift(),Wr(a,t)||yd(c)},getConflictingClassGroupIds:(c,a)=>{const u=n[c]||[];return a&&o[c]?[...u,...o[c]]:u}}},Wr=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const n=e[0],o=t.nextPart.get(n),r=o?Wr(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;const s=e.join(_n);return(c=t.validators.find(({validator:a})=>a(s)))==null?void 0:c.classGroupId},Br=/^\[(.+)\]$/,yd=e=>{if(Br.test(e)){const t=Br.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},xd=e=>{const{theme:t,prefix:n}=e,o={nextPart:new Map,validators:[]};return kd(Object.entries(e.classGroups),n).forEach(([s,c])=>{Ln(c,o,s,t)}),o},Ln=(e,t,n,o)=>{e.forEach(r=>{if(typeof r=="string"){const s=r===""?t:Ur(t,r);s.classGroupId=n;return}if(typeof r=="function"){if(Ed(r)){Ln(r(o),t,n,o);return}t.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([s,c])=>{Ln(c,Ur(t,s),n,o)})})},Ur=(e,t)=>{let n=e;return t.split(_n).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},Ed=e=>e.isThemeGetter,kd=(e,t)=>t?e.map(([n,o])=>{const r=o.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([c,a])=>[t+c,a])):s);return[n,r]}):e,Cd=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,o=new Map;const r=(s,c)=>{n.set(s,c),t++,t>e&&(t=0,o=n,n=new Map)};return{get(s){let c=n.get(s);if(c!==void 0)return c;if((c=o.get(s))!==void 0)return r(s,c),c},set(s,c){n.has(s)?n.set(s,c):r(s,c)}}},Hr="!",Sd=e=>{const{separator:t,experimentalParseClassName:n}=e,o=t.length===1,r=t[0],s=t.length,c=a=>{const u=[];let l=0,d=0,p;for(let g=0;g<a.length;g++){let b=a[g];if(l===0){if(b===r&&(o||a.slice(g,g+s)===t)){u.push(a.slice(d,g)),d=g+s;continue}if(b==="/"){p=g;continue}}b==="["?l++:b==="]"&&l--}const m=u.length===0?a:a.substring(d),v=m.startsWith(Hr),w=v?m.substring(1):m,h=p&&p>d?p-d:void 0;return{modifiers:u,hasImportantModifier:v,baseClassName:w,maybePostfixModifierPosition:h}};return n?a=>n({className:a,parseClassName:c}):c},Pd=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(o=>{o[0]==="["?(t.push(...n.sort(),o),n=[]):n.push(o)}),t.push(...n.sort()),t},Td=e=>({cache:Cd(e.cacheSize),parseClassName:Sd(e),...bd(e)}),Nd=/\s+/,Ad=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:r}=t,s=[],c=e.trim().split(Nd);let a="";for(let u=c.length-1;u>=0;u-=1){const l=c[u],{modifiers:d,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:v}=n(l);let w=!!v,h=o(w?m.substring(0,v):m);if(!h){if(!w){a=l+(a.length>0?" "+a:a);continue}if(h=o(m),!h){a=l+(a.length>0?" "+a:a);continue}w=!1}const g=Pd(d).join(":"),b=p?g+Hr:g,y=b+h;if(s.includes(y))continue;s.push(y);const x=r(h,w);for(let E=0;E<x.length;++E){const C=x[E];s.push(b+C)}a=l+(a.length>0?" "+a:a)}return a};function jd(){let e=0,t,n,o="";for(;e<arguments.length;)(t=arguments[e++])&&(n=zr(t))&&(o&&(o+=" "),o+=n);return o}const zr=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=zr(e[o]))&&(n&&(n+=" "),n+=t);return n};function Vr(e,...t){let n,o,r,s=c;function c(u){const l=t.reduce((d,p)=>p(d),e());return n=Td(l),o=n.cache.get,r=n.cache.set,s=a,a(u)}function a(u){const l=o(u);if(l)return l;const d=Ad(u,n);return r(u,d),d}return function(){return s(jd.apply(null,arguments))}}const ee=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Kr=/^\[(?:([a-z-]+):)?(.+)\]$/i,Md=/^\d+\/\d+$/,Od=new Set(["px","full","screen"]),Id=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Dd=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,_d=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ld=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,je=e=>tt(e)||Od.has(e)||Md.test(e),$e=e=>nt(e,"length",Vd),tt=e=>!!e&&!Number.isNaN(Number(e)),Rn=e=>nt(e,"number",tt),vt=e=>!!e&&Number.isInteger(Number(e)),$d=e=>e.endsWith("%")&&tt(e.slice(0,-1)),z=e=>Kr.test(e),Fe=e=>Id.test(e),Fd=new Set(["length","size","percentage"]),Wd=e=>nt(e,Fd,Gr),Bd=e=>nt(e,"position",Gr),Ud=new Set(["image","url"]),Hd=e=>nt(e,Ud,Gd),zd=e=>nt(e,"",Kd),gt=()=>!0,nt=(e,t,n)=>{const o=Kr.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):n(o[2]):!1},Vd=e=>Dd.test(e)&&!_d.test(e),Gr=()=>!1,Kd=e=>Ld.test(e),Gd=e=>Rd.test(e),Yr=()=>{const e=ee("colors"),t=ee("spacing"),n=ee("blur"),o=ee("brightness"),r=ee("borderColor"),s=ee("borderRadius"),c=ee("borderSpacing"),a=ee("borderWidth"),u=ee("contrast"),l=ee("grayscale"),d=ee("hueRotate"),p=ee("invert"),m=ee("gap"),v=ee("gradientColorStops"),w=ee("gradientColorStopPositions"),h=ee("inset"),g=ee("margin"),b=ee("opacity"),y=ee("padding"),x=ee("saturate"),E=ee("scale"),C=ee("sepia"),S=ee("skew"),k=ee("space"),P=ee("translate"),N=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",z,t],I=()=>[z,t],W=()=>["",je,$e],A=()=>["auto",tt,z],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],_=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],O=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",z],K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>[tt,z];return{cacheSize:500,separator:":",theme:{colors:[gt],spacing:[je,$e],blur:["none","",Fe,z],brightness:H(),borderColor:[e],borderRadius:["none","","full",Fe,z],borderSpacing:I(),borderWidth:W(),contrast:H(),grayscale:j(),hueRotate:H(),invert:j(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[$d,$e],inset:$(),margin:$(),opacity:H(),padding:I(),saturate:H(),scale:H(),sepia:j(),skew:H(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",z]}],container:["container"],columns:[{columns:[Fe]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...U(),z]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",vt,z]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",z]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",vt,z]}],"grid-cols":[{"grid-cols":[gt]}],"col-start-end":[{col:["auto",{span:["full",vt,z]},z]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[gt]}],"row-start-end":[{row:["auto",{span:[vt,z]},z]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",z]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",z]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...O()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...O(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...O(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",z,t]}],"min-w":[{"min-w":[z,t,"min","max","fit"]}],"max-w":[{"max-w":[z,t,"none","full","min","max","fit","prose",{screen:[Fe]},Fe]}],h:[{h:[z,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[z,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[z,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[z,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Fe,$e]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Rn]}],"font-family":[{font:[gt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",z]}],"line-clamp":[{"line-clamp":["none",tt,Rn]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",je,z]}],"list-image":[{"list-image":["none",z]}],"list-style-type":[{list:["none","disc","decimal",z]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",je,$e]}],"underline-offset":[{"underline-offset":["auto",je,z]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),Bd]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Wd]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Hd]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[..._(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:_()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",..._()]}],"outline-offset":[{"outline-offset":[je,z]}],"outline-w":[{outline:[je,$e]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[je,$e]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Fe,zd]}],"shadow-color":[{shadow:[gt]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Fe,z]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[p]}],saturate:[{saturate:[x]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",z]}],duration:[{duration:H()}],ease:[{ease:["linear","in","out","in-out",z]}],delay:[{delay:H()}],animate:[{animate:["none","spin","ping","pulse","bounce",z]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[vt,z]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",z]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",z]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",z]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[je,$e,Rn]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Yd=(e,{cacheSize:t,prefix:n,separator:o,experimentalParseClassName:r,extend:s={},override:c={}})=>{wt(e,"cacheSize",t),wt(e,"prefix",n),wt(e,"separator",o),wt(e,"experimentalParseClassName",r);for(const a in c)Xd(e[a],c[a]);for(const a in s)qd(e[a],s[a]);return e},wt=(e,t,n)=>{n!==void 0&&(e[t]=n)},Xd=(e,t)=>{if(t)for(const n in t)wt(e,n,t[n])},qd=(e,t)=>{if(t)for(const n in t){const o=t[n];o!==void 0&&(e[n]=(e[n]||[]).concat(o))}},Zd=((e,...t)=>typeof e=="function"?Vr(Yr,e,...t):Vr(()=>Yd(Yr(),e),...t))({prefix:"ksjsui-"});function R(...e){return Zd(Rr(e))}const Xr=["#E60060","#ED0C0C","#B20000","#CC4400","#558000","#008A22","#006600","#004C40","#008099","#0059B2","#0070F0","#0022FF","#6619FF","#9900E5","#747474","#191919"],Qd=et(["ksjsui-relative ksjsui-flex ksjsui-shrink-0 ksjsui-overflow-hidden ksjsui-rounded-full"],{variants:{size:{sm:"ksjsui-size-8",md:"ksjsui-size-9",lg:"ksjsui-size-10"}},defaultVariants:{size:"md"}}),qr=i.forwardRef(({className:e,size:t,...n},o)=>f.jsx(Ir,{ref:o,className:R(Qd({size:t,className:e})),...n}));qr.displayName=Ir.displayName;const Zr=i.forwardRef(({className:e,...t},n)=>f.jsx(Dr,{ref:n,className:R("ksjsui-aspect-square ksjsui-size-full",e),...t}));Zr.displayName=Dr.displayName;const Qr=i.forwardRef(({className:e,...t},n)=>{var o;return f.jsx(_r,{ref:n,className:R("ksjsui-bg-muted ksjsui-flex ksjsui-size-full ksjsui-items-center ksjsui-justify-center ksjsui-rounded-full",e),style:{...Jd((o=t.children)==null?void 0:o.toString(),Xr)},...t})});Qr.displayName=_r.displayName;function Jd(e="",t=Xr){const n=e.substring(0,2),o=ef(n)%t.length,r=t[o],s=tf(r);return{backgroundColor:r,color:s}}function ef(e){const t=e.substring(0,2);return t.split("").reduce((o,r,s)=>o+t.charCodeAt(s),0)}function tf(e){return e==="#fff"?"#000":"#fff"}const nf=et(["ksjsui-inline-flex ksjsui-items-center ksjsui-justify-center ksjsui-whitespace-nowrap ksjsui-rounded-lg ksjsui-border ksjsui-border-transparent ksjsui-p-2 ksjsui-text-base ksjsui-ring-offset-background ksjsui-transition-colors","focus-visible:ksjsui-outline-none focus-visible:ksjsui-ring-2 focus-visible:ksjsui-ring-ring focus-visible:ksjsui-ring-offset-2","disabled:ksjsui-pointer-events-none disabled:ksjsui-cursor-not-allowed disabled:ksjsui-bg-disabled disabled:ksjsui-text-disabled-foreground","forced-colors:ksjsui-border-button-border forced-colors:ksjsui-bg-button-face forced-colors:ksjsui-text-button-text","forced-colors:hover:ksjsui-border-highlight","forced-colors:disabled:ksjsui-border-gray-text","[&_svg]:ksjsui-pointer-events-none [&_svg]:ksjsui-shrink-0"],{variants:{variant:{solid:"",outline:"ksjsui-border-current ksjsui-text-secondary hover:ksjsui-bg-neutral-hover",plain:"ksjsui-bg-transparent",link:"ksjsui-underline-current ksjsui-h-auto ksjsui-p-0 ksjsui-text-secondary hover:ksjsui-underline",avatar:"ksjsui-rounded-full ksjsui-border-0 ksjsui-p-0"},color:{neutral:"",primary:"",secondary:"",destructive:""},fullWidth:{true:"ksjsui-w-full"},iconOnly:{true:"ksjsui-icon-only [&.ksjsui-icon-only_svg]:ksjsui-size-6"},radius:{full:"ksjsui-rounded-full"},size:{sm:"ksjsui-h-8 [&_svg]:ksjsui-size-5",md:"ksjsui-h-9 [&_svg]:ksjsui-size-5",lg:"ksjsui-h-10 [&_svg]:ksjsui-size-6"}},defaultVariants:{variant:"solid",color:"neutral",fullWidth:!1,size:"md"},compoundVariants:[{variant:"solid",color:"neutral",className:"ksjsui-bg-neutral ksjsui-text-neutral-foreground hover:ksjsui-bg-neutral-hover"},{variant:"solid",color:"primary",className:"ksjsui-bg-primary ksjsui-text-primary-foreground hover:ksjsui-bg-primary-hover"},{variant:"solid",color:"secondary",className:"ksjsui-bg-secondary ksjsui-text-secondary-foreground hover:ksjsui-bg-secondary-hover"},{variant:"solid",color:"destructive",className:"ksjsui-bg-destructive ksjsui-text-destructive-foreground hover:ksjsui-bg-destructive-hover"},{variant:["outline","plain","link"],color:"neutral",className:"ksjsui-text-neutral-foreground"},{variant:["outline","plain","link"],color:"primary",className:"ksjsui-text-primary"},{variant:["outline","plain","link"],color:"secondary",className:"ksjsui-text-secondary"},{variant:["outline","plain","link"],color:"destructive",className:"ksjsui-text-destructive"},{iconOnly:!0,size:"sm",className:"ksjsui-size-8"},{iconOnly:!0,size:"md",className:"ksjsui-size-9"},{iconOnly:!0,size:"lg",className:"ksjsui-size-10"}]}),$n=i.forwardRef(({className:e,endContent:t,startContent:n,variant:o,color:r,fullWidth:s,iconOnly:c,radius:a,size:u,asChild:l,children:d,tabIndex:p=0,...m},v)=>{const w=l?ne:"button";return f.jsxs(w,{className:R(nf({variant:o,color:r,fullWidth:s,iconOnly:c,radius:a,size:u,className:e})),ref:v,tabIndex:p,...m,children:[n&&f.jsx("span",{className:"ksjsui-me-2",children:n}),f.jsx(On,{children:d}),t&&f.jsx("span",{className:"ksjsui-ms-2",children:t})]})});$n.displayName="Button";function T(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}var of=i.useId||(()=>{}),rf=0;function ve(e){const[t,n]=i.useState(of());return Y(()=>{n(o=>o??String(rf++))},[e]),t?`radix-${t}`:""}function Me({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=sf({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:o,a=V(n),u=i.useCallback(l=>{if(s){const p=typeof l=="function"?l(e):l;p!==e&&a(p)}else r(l)},[s,e,r,a]);return[c,u]}function sf({defaultProp:e,onChange:t}){const n=i.useState(e),[o]=n,r=i.useRef(o),s=V(t);return i.useEffect(()=>{r.current!==o&&(s(o),r.current=o)},[o,r,s]),n}var af=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Oe=af.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...c}=o,a=s?ne:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(a,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function cf(e,t){e&&Ae.flushSync(()=>e.dispatchEvent(t))}function bt(e,t=globalThis==null?void 0:globalThis.document){const n=V(e);i.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var lf="DismissableLayer",Fn="dismissableLayer.update",uf="dismissableLayer.pointerDownOutside",df="dismissableLayer.focusOutside",Jr,es=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ts=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:c,onDismiss:a,...u}=e,l=i.useContext(es),[d,p]=i.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=i.useState({}),w=L(t,k=>p(k)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(g),y=d?h.indexOf(d):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,E=y>=b,C=hf(k=>{const P=k.target,N=[...l.branches].some(M=>M.contains(P));!E||N||(r==null||r(k),c==null||c(k),k.defaultPrevented||a==null||a())},m),S=mf(k=>{const P=k.target;[...l.branches].some(M=>M.contains(P))||(s==null||s(k),c==null||c(k),k.defaultPrevented||a==null||a())},m);return bt(k=>{y===l.layers.size-1&&(o==null||o(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},m),i.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Jr=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),ns(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Jr)}},[d,m,n,l]),i.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),ns())},[d,l]),i.useEffect(()=>{const k=()=>v({});return document.addEventListener(Fn,k),()=>document.removeEventListener(Fn,k)},[]),f.jsx(Oe.div,{...u,ref:w,style:{pointerEvents:x?E?"auto":"none":void 0,...e.style},onFocusCapture:T(e.onFocusCapture,S.onFocusCapture),onBlurCapture:T(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:T(e.onPointerDownCapture,C.onPointerDownCapture)})});ts.displayName=lf;var ff="DismissableLayerBranch",pf=i.forwardRef((e,t)=>{const n=i.useContext(es),o=i.useRef(null),r=L(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),f.jsx(Oe.div,{...e,ref:r})});pf.displayName=ff;function hf(e,t=globalThis==null?void 0:globalThis.document){const n=V(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!o.current){let u=function(){os(uf,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}else t.removeEventListener("click",r.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function mf(e,t=globalThis==null?void 0:globalThis.document){const n=V(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&os(df,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function ns(){const e=new CustomEvent(Fn);document.dispatchEvent(e)}function os(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?cf(r,s):r.dispatchEvent(s)}var Wn="focusScope.autoFocusOnMount",Bn="focusScope.autoFocusOnUnmount",rs={bubbles:!1,cancelable:!0},vf="FocusScope",ss=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...c}=e,[a,u]=i.useState(null),l=V(r),d=V(s),p=i.useRef(null),m=L(t,h=>u(h)),v=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let h=function(x){if(v.paused||!a)return;const E=x.target;a.contains(E)?p.current=E:We(p.current,{select:!0})},g=function(x){if(v.paused||!a)return;const E=x.relatedTarget;E!==null&&(a.contains(E)||We(p.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const C of x)C.removedNodes.length>0&&We(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const y=new MutationObserver(b);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),y.disconnect()}}},[o,a,v.paused]),i.useEffect(()=>{if(a){cs.add(v);const h=document.activeElement;if(!a.contains(h)){const b=new CustomEvent(Wn,rs);a.addEventListener(Wn,l),a.dispatchEvent(b),b.defaultPrevented||(gf(Ef(is(a)),{select:!0}),document.activeElement===h&&We(a))}return()=>{a.removeEventListener(Wn,l),setTimeout(()=>{const b=new CustomEvent(Bn,rs);a.addEventListener(Bn,d),a.dispatchEvent(b),b.defaultPrevented||We(h??document.body,{select:!0}),a.removeEventListener(Bn,d),cs.remove(v)},0)}}},[a,l,d,v]);const w=i.useCallback(h=>{if(!n&&!o||v.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,b=document.activeElement;if(g&&b){const y=h.currentTarget,[x,E]=wf(y);x&&E?!h.shiftKey&&b===E?(h.preventDefault(),n&&We(x,{select:!0})):h.shiftKey&&b===x&&(h.preventDefault(),n&&We(E,{select:!0})):b===y&&h.preventDefault()}},[n,o,v.paused]);return f.jsx(Oe.div,{tabIndex:-1,...c,ref:m,onKeyDown:w})});ss.displayName=vf;function gf(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(We(o,{select:t}),document.activeElement!==n)return}function wf(e){const t=is(e),n=as(t,e),o=as(t.reverse(),e);return[n,o]}function is(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function as(e,t){for(const n of e)if(!bf(n,{upTo:t}))return n}function bf(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 yf(e){return e instanceof HTMLInputElement&&"select"in e}function We(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&yf(e)&&t&&e.select()}}var cs=xf();function xf(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ls(e,t),e.unshift(t)},remove(t){var n;e=ls(e,t),(n=e[0])==null||n.resume()}}}function ls(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Ef(e){return e.filter(t=>t.tagName!=="A")}var kf="Portal",us=i.forwardRef((e,t)=>{var a;const{container:n,...o}=e,[r,s]=i.useState(!1);Y(()=>s(!0),[]);const c=n||r&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return c?mt.createPortal(f.jsx(Oe.div,{...o,ref:t}),c):null});us.displayName=kf;function Cf(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var Rt=e=>{const{present:t,children:n}=e,o=Sf(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=L(o.ref,Pf(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};Rt.displayName="Presence";function Sf(e){const[t,n]=i.useState(),o=i.useRef({}),r=i.useRef(e),s=i.useRef("none"),c=e?"mounted":"unmounted",[a,u]=Cf(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const l=$t(o.current);s.current=a==="mounted"?l:"none"},[a]),Y(()=>{const l=o.current,d=r.current;if(d!==e){const m=s.current,v=$t(l);e?u("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),Y(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,p=v=>{const h=$t(o.current).includes(v.animationName);if(v.target===t&&h&&(u("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(s.current=$t(o.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:i.useCallback(l=>{l&&(o.current=getComputedStyle(l)),n(l)},[])}}function $t(e){return(e==null?void 0:e.animationName)||"none"}function Pf(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Un=0;function Hn(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ds()),document.body.insertAdjacentElement("beforeend",e[1]??ds()),Un++,()=>{Un===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Un--}},[])}function ds(){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 ke=function(){return ke=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ke.apply(this,arguments)};function fs(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function Tf(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ft="right-scroll-bar-position",Wt="width-before-scroll-bar",Nf="with-scroll-bars-hidden",Af="--removed-body-scroll-bar-size";function zn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function jf(e,t){var n=J.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var Mf=typeof window<"u"?i.useLayoutEffect:i.useEffect,ps=new WeakMap;function Of(e,t){var n=jf(null,function(o){return e.forEach(function(r){return zn(r,o)})});return Mf(function(){var o=ps.get(n);if(o){var r=new Set(o),s=new Set(e),c=n.current;r.forEach(function(a){s.has(a)||zn(a,null)}),s.forEach(function(a){r.has(a)||zn(a,c)})}ps.set(n,e)},[e]),n}function If(e){return e}function Df(e,t){t===void 0&&(t=If);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var c=t(s,o);return n.push(c),function(){n=n.filter(function(a){return a!==c})}},assignSyncMedium:function(s){for(o=!0;n.length;){var c=n;n=[],c.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){o=!0;var c=[];if(n.length){var a=n;n=[],a.forEach(s),c=n}var u=function(){var d=c;c=[],d.forEach(s)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(d){c.push(d),l()},filter:function(d){return c=c.filter(d),n}}}};return r}function _f(e){e===void 0&&(e={});var t=Df(null);return t.options=ke({async:!0,ssr:!1},e),t}var hs=function(e){var t=e.sideCar,n=fs(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return i.createElement(o,ke({},n))};hs.isSideCarExport=!0;function Lf(e,t){return e.useMedium(t),hs}var ms=_f(),Vn=function(){},Bt=i.forwardRef(function(e,t){var n=i.useRef(null),o=i.useState({onScrollCapture:Vn,onWheelCapture:Vn,onTouchMoveCapture:Vn}),r=o[0],s=o[1],c=e.forwardProps,a=e.children,u=e.className,l=e.removeScrollBar,d=e.enabled,p=e.shards,m=e.sideCar,v=e.noIsolation,w=e.inert,h=e.allowPinchZoom,g=e.as,b=g===void 0?"div":g,y=e.gapMode,x=fs(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=m,C=Of([n,t]),S=ke(ke({},x),r);return i.createElement(i.Fragment,null,d&&i.createElement(E,{sideCar:ms,removeScrollBar:l,shards:p,noIsolation:v,inert:w,setCallbacks:s,allowPinchZoom:!!h,lockRef:n,gapMode:y}),c?i.cloneElement(i.Children.only(a),ke(ke({},S),{ref:C})):i.createElement(b,ke({},S,{className:u,ref:C}),a))});Bt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Bt.classNames={fullWidth:Wt,zeroRight:Ft};var Rf=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $f(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Rf();return t&&e.setAttribute("nonce",t),e}function Ff(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Wf(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Bf=function(){var e=0,t=null;return{add:function(n){e==0&&(t=$f())&&(Ff(t,n),Wf(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Uf=function(){var e=Bf();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},vs=function(){var e=Uf(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Hf={left:0,top:0,right:0,gap:0},Kn=function(e){return parseInt(e||"",10)||0},zf=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Kn(n),Kn(o),Kn(r)]},Vf=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Hf;var t=zf(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Kf=vs(),ot="data-scroll-locked",Gf=function(e,t,n,o){var r=e.left,s=e.top,c=e.right,a=e.gap;return n===void 0&&(n="margin"),`
2
- .`.concat(Nf,` {
1
+ (function(O,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],f):(O=typeof globalThis<"u"?globalThis:O||self,f(O["keeper-js-ui"]={},O["react/jsx-runtime"],O.React,O.ReactDOM))})(this,function(O,f,J,mt){"use strict";function Ar(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const i=Ar(J),je=Ar(mt);function cd(e,t){const n=i.createContext(t),o=s=>{const{children:c,...a}=s,u=i.useMemo(()=>a,Object.values(a));return f.jsx(n.Provider,{value:u,children:c})};o.displayName=e+"Provider";function r(s){const c=i.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function ce(e,t=[]){let n=[];function o(s,c){const a=i.createContext(c),u=n.length;n=[...n,c];const l=p=>{var b;const{scope:m,children:v,...w}=p,h=((b=m==null?void 0:m[e])==null?void 0:b[u])||a,g=i.useMemo(()=>w,Object.values(w));return f.jsx(h.Provider,{value:g,children:v})};l.displayName=s+"Provider";function d(p,m){var h;const v=((h=m==null?void 0:m[e])==null?void 0:h[u])||a,w=i.useContext(v);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[l,d]}const r=()=>{const s=n.map(c=>i.createContext(c));return function(a){const u=(a==null?void 0:a[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...a,[e]:u}}),[a,u])}};return r.scopeName=e,[o,ld(r,...t)]}function ld(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const c=o.reduce((a,{useScope:u,scopeName:l})=>{const p=u(s)[`__scope${l}`];return{...a,...p}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function V(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}var Y=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{};function jr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Lt(...e){return t=>{let n=!1;const o=e.map(r=>{const s=jr(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():jr(e[r],null)}}}}function L(...e){return i.useCallback(Lt(...e),e)}var ne=i.forwardRef((e,t)=>{const{children:n,...o}=e,r=i.Children.toArray(n),s=r.find(ud);if(s){const c=s.props.children,a=r.map(u=>u===s?i.Children.count(c)>1?i.Children.only(null):i.isValidElement(c)?c.props.children:null:u);return f.jsx(Mn,{...o,ref:t,children:i.isValidElement(c)?i.cloneElement(c,void 0,a):null})}return f.jsx(Mn,{...o,ref:t,children:n})});ne.displayName="Slot";var Mn=i.forwardRef((e,t)=>{const{children:n,...o}=e;if(i.isValidElement(n)){const r=fd(n),s=dd(o,n.props);return n.type!==i.Fragment&&(s.ref=t?Lt(t,r):r),i.cloneElement(n,s)}return i.Children.count(n)>1?i.Children.only(null):null});Mn.displayName="SlotClone";var On=({children:e})=>f.jsx(f.Fragment,{children:e});function ud(e){return i.isValidElement(e)&&e.type===On}function dd(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...a)=>{s(...a),r(...a)}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function fd(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var pd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],In=pd.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...c}=o,a=s?ne:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(a,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Dn="Avatar",[hd,qb]=ce(Dn),[md,Mr]=hd(Dn),Or=i.forwardRef((e,t)=>{const{__scopeAvatar:n,...o}=e,[r,s]=i.useState("idle");return f.jsx(md,{scope:n,imageLoadingStatus:r,onImageLoadingStatusChange:s,children:f.jsx(In.span,{...o,ref:t})})});Or.displayName=Dn;var Ir="AvatarImage",Dr=i.forwardRef((e,t)=>{const{__scopeAvatar:n,src:o,onLoadingStatusChange:r=()=>{},...s}=e,c=Mr(Ir,n),a=vd(o,s.referrerPolicy),u=V(l=>{r(l),c.onImageLoadingStatusChange(l)});return Y(()=>{a!=="idle"&&u(a)},[a,u]),a==="loaded"?f.jsx(In.img,{...s,ref:t,src:o}):null});Dr.displayName=Ir;var _r="AvatarFallback",Lr=i.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:o,...r}=e,s=Mr(_r,n),[c,a]=i.useState(o===void 0);return i.useEffect(()=>{if(o!==void 0){const u=window.setTimeout(()=>a(!0),o);return()=>window.clearTimeout(u)}},[o]),c&&s.imageLoadingStatus!=="loaded"?f.jsx(In.span,{...r,ref:t}):null});Lr.displayName=_r;function vd(e,t){const[n,o]=i.useState("idle");return Y(()=>{if(!e){o("error");return}let r=!0;const s=new window.Image,c=a=>()=>{r&&o(a)};return o("loading"),s.onload=c("loaded"),s.onerror=c("error"),s.src=e,t&&(s.referrerPolicy=t),()=>{r=!1}},[e,t]),n}var Rr=Or,$r=Dr,Fr=Lr;function Wr(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Wr(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function Br(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Wr(e))&&(o&&(o+=" "),o+=t);return o}const Ur=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,zr=Br,Ze=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return zr(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:s}=t,c=Object.keys(r).map(l=>{const d=n==null?void 0:n[l],p=s==null?void 0:s[l];if(d===null)return null;const m=Ur(d)||Ur(p);return r[l][m]}),a=n&&Object.entries(n).reduce((l,d)=>{let[p,m]=d;return m===void 0||(l[p]=m),l},{}),u=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((l,d)=>{let{class:p,className:m,...v}=d;return Object.entries(v).every(w=>{let[h,g]=w;return Array.isArray(g)?g.includes({...s,...a}[h]):{...s,...a}[h]===g})?[...l,p,m]:l},[]);return zr(e,c,u,n==null?void 0:n.class,n==null?void 0:n.className)},_n="-",gd=e=>{const t=bd(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{const a=c.split(_n);return a[0]===""&&a.length!==1&&a.shift(),Hr(a,t)||wd(c)},getConflictingClassGroupIds:(c,a)=>{const u=n[c]||[];return a&&o[c]?[...u,...o[c]]:u}}},Hr=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const n=e[0],o=t.nextPart.get(n),r=o?Hr(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;const s=e.join(_n);return(c=t.validators.find(({validator:a})=>a(s)))==null?void 0:c.classGroupId},Vr=/^\[(.+)\]$/,wd=e=>{if(Vr.test(e)){const t=Vr.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},bd=e=>{const{theme:t,prefix:n}=e,o={nextPart:new Map,validators:[]};return Cd(Object.entries(e.classGroups),n).forEach(([s,c])=>{Ln(c,o,s,t)}),o},Ln=(e,t,n,o)=>{e.forEach(r=>{if(typeof r=="string"){const s=r===""?t:Kr(t,r);s.classGroupId=n;return}if(typeof r=="function"){if(yd(r)){Ln(r(o),t,n,o);return}t.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([s,c])=>{Ln(c,Kr(t,s),n,o)})})},Kr=(e,t)=>{let n=e;return t.split(_n).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},yd=e=>e.isThemeGetter,Cd=(e,t)=>t?e.map(([n,o])=>{const r=o.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([c,a])=>[t+c,a])):s);return[n,r]}):e,xd=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,o=new Map;const r=(s,c)=>{n.set(s,c),t++,t>e&&(t=0,o=n,n=new Map)};return{get(s){let c=n.get(s);if(c!==void 0)return c;if((c=o.get(s))!==void 0)return r(s,c),c},set(s,c){n.has(s)?n.set(s,c):r(s,c)}}},Gr="!",Ed=e=>{const{separator:t,experimentalParseClassName:n}=e,o=t.length===1,r=t[0],s=t.length,c=a=>{const u=[];let l=0,d=0,p;for(let g=0;g<a.length;g++){let b=a[g];if(l===0){if(b===r&&(o||a.slice(g,g+s)===t)){u.push(a.slice(d,g)),d=g+s;continue}if(b==="/"){p=g;continue}}b==="["?l++:b==="]"&&l--}const m=u.length===0?a:a.substring(d),v=m.startsWith(Gr),w=v?m.substring(1):m,h=p&&p>d?p-d:void 0;return{modifiers:u,hasImportantModifier:v,baseClassName:w,maybePostfixModifierPosition:h}};return n?a=>n({className:a,parseClassName:c}):c},kd=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(o=>{o[0]==="["?(t.push(...n.sort(),o),n=[]):n.push(o)}),t.push(...n.sort()),t},Sd=e=>({cache:xd(e.cacheSize),parseClassName:Ed(e),...gd(e)}),Pd=/\s+/,Td=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:r}=t,s=[],c=e.trim().split(Pd);let a="";for(let u=c.length-1;u>=0;u-=1){const l=c[u],{modifiers:d,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:v}=n(l);let w=!!v,h=o(w?m.substring(0,v):m);if(!h){if(!w){a=l+(a.length>0?" "+a:a);continue}if(h=o(m),!h){a=l+(a.length>0?" "+a:a);continue}w=!1}const g=kd(d).join(":"),b=p?g+Gr:g,y=b+h;if(s.includes(y))continue;s.push(y);const C=r(h,w);for(let x=0;x<C.length;++x){const k=C[x];s.push(b+k)}a=l+(a.length>0?" "+a:a)}return a};function Nd(){let e=0,t,n,o="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Yr(t))&&(o&&(o+=" "),o+=n);return o}const Yr=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=Yr(e[o]))&&(n&&(n+=" "),n+=t);return n};function Xr(e,...t){let n,o,r,s=c;function c(u){const l=t.reduce((d,p)=>p(d),e());return n=Sd(l),o=n.cache.get,r=n.cache.set,s=a,a(u)}function a(u){const l=o(u);if(l)return l;const d=Td(u,n);return r(u,d),d}return function(){return s(Nd.apply(null,arguments))}}const ee=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Zr=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ad=/^\d+\/\d+$/,jd=new Set(["px","full","screen"]),Md=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Od=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Id=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Dd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_d=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Me=e=>nt(e)||jd.has(e)||Ad.test(e),Fe=e=>ot(e,"length",zd),nt=e=>!!e&&!Number.isNaN(Number(e)),Rn=e=>ot(e,"number",nt),vt=e=>!!e&&Number.isInteger(Number(e)),Ld=e=>e.endsWith("%")&&nt(e.slice(0,-1)),H=e=>Zr.test(e),We=e=>Md.test(e),Rd=new Set(["length","size","percentage"]),$d=e=>ot(e,Rd,qr),Fd=e=>ot(e,"position",qr),Wd=new Set(["image","url"]),Bd=e=>ot(e,Wd,Vd),Ud=e=>ot(e,"",Hd),gt=()=>!0,ot=(e,t,n)=>{const o=Zr.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):n(o[2]):!1},zd=e=>Od.test(e)&&!Id.test(e),qr=()=>!1,Hd=e=>Dd.test(e),Vd=e=>_d.test(e),Qr=()=>{const e=ee("colors"),t=ee("spacing"),n=ee("blur"),o=ee("brightness"),r=ee("borderColor"),s=ee("borderRadius"),c=ee("borderSpacing"),a=ee("borderWidth"),u=ee("contrast"),l=ee("grayscale"),d=ee("hueRotate"),p=ee("invert"),m=ee("gap"),v=ee("gradientColorStops"),w=ee("gradientColorStopPositions"),h=ee("inset"),g=ee("margin"),b=ee("opacity"),y=ee("padding"),C=ee("saturate"),x=ee("scale"),k=ee("sepia"),S=ee("skew"),E=ee("space"),P=ee("translate"),N=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",H,t],D=()=>[H,t],W=()=>["",Me,Fe],A=()=>["auto",nt,H],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],_=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",H],K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[nt,H];return{cacheSize:500,separator:":",theme:{colors:[gt],spacing:[Me,Fe],blur:["none","",We,H],brightness:z(),borderColor:[e],borderRadius:["none","","full",We,H],borderSpacing:D(),borderWidth:W(),contrast:z(),grayscale:j(),hueRotate:z(),invert:j(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[Ld,Fe],inset:$(),margin:$(),opacity:z(),padding:D(),saturate:z(),scale:z(),sepia:j(),skew:z(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",H]}],container:["container"],columns:[{columns:[We]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...U(),H]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",vt,H]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",H]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",vt,H]}],"grid-cols":[{"grid-cols":[gt]}],"col-start-end":[{col:["auto",{span:["full",vt,H]},H]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[gt]}],"row-start-end":[{row:["auto",{span:[vt,H]},H]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",H]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",H]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",H,t]}],"min-w":[{"min-w":[H,t,"min","max","fit"]}],"max-w":[{"max-w":[H,t,"none","full","min","max","fit","prose",{screen:[We]},We]}],h:[{h:[H,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[H,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[H,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[H,t,"auto","min","max","fit"]}],"font-size":[{text:["base",We,Fe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Rn]}],"font-family":[{font:[gt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",H]}],"line-clamp":[{"line-clamp":["none",nt,Rn]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Me,H]}],"list-image":[{"list-image":["none",H]}],"list-style-type":[{list:["none","disc","decimal",H]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Me,Fe]}],"underline-offset":[{"underline-offset":["auto",Me,H]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",H]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",H]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),Fd]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",$d]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Bd]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[..._(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:_()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",..._()]}],"outline-offset":[{"outline-offset":[Me,H]}],"outline-w":[{outline:[Me,Fe]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Me,Fe]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",We,Ud]}],"shadow-color":[{shadow:[gt]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",We,H]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[p]}],saturate:[{saturate:[C]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",H]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",H]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",H]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[vt,H]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",H]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",H]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",H]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Me,Fe,Rn]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Kd=(e,{cacheSize:t,prefix:n,separator:o,experimentalParseClassName:r,extend:s={},override:c={}})=>{wt(e,"cacheSize",t),wt(e,"prefix",n),wt(e,"separator",o),wt(e,"experimentalParseClassName",r);for(const a in c)Gd(e[a],c[a]);for(const a in s)Yd(e[a],s[a]);return e},wt=(e,t,n)=>{n!==void 0&&(e[t]=n)},Gd=(e,t)=>{if(t)for(const n in t)wt(e,n,t[n])},Yd=(e,t)=>{if(t)for(const n in t){const o=t[n];o!==void 0&&(e[n]=(e[n]||[]).concat(o))}},Xd=(e,...t)=>typeof e=="function"?Xr(Qr,e,...t):Xr(()=>Kd(Qr(),e),...t),Zd=Ze(["ksjsui-fill-current","forced-colors:ksjsui-fill-canvas-text"],{variants:{color:{current:"ksjsui-fill-current",neutral:"ksjsui-fill-neutral",primary:"ksjsui-fill-primary",secondary:"ksjsui-fill-secondary",destructive:"ksjsui-fill-destructive"},size:{sm:"ksjsui-size-6",md:"ksjsui-size-8",lg:"ksjsui-size-12"}},defaultVariants:{color:"current",size:"sm"}}),qd=i.forwardRef(({children:e,className:t,color:n,size:o,...r},s)=>i.createElement("svg",{"aria-hidden":!0,className:R(Zd({color:n,size:o,className:t})),fill:n,focusable:!1,ref:s,role:"presentation",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...r},Array.isArray(e)?e.map((a,u)=>i.cloneElement(a,{key:u})):e)),Qd=Xd({prefix:"ksjsui-"});function R(...e){return Qd(Br(e))}function Ee(e,t){const n=i.forwardRef(({className:o,...r},s)=>i.createElement(qd,{ref:s,children:t,className:R(`ksjsui-icon-${Jd(e)}`,o),...r}));return n.displayName=e,n}function Jd(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}const Jr=["#E60060","#ED0C0C","#B20000","#CC4400","#558000","#008A22","#006600","#004C40","#008099","#0059B2","#0070F0","#0022FF","#6619FF","#9900E5","#747474","#191919"],ef=Ze(["ksjsui-relative ksjsui-flex ksjsui-shrink-0 ksjsui-overflow-hidden ksjsui-rounded-full"],{variants:{size:{sm:"ksjsui-size-8",md:"ksjsui-size-9",lg:"ksjsui-size-10"}},defaultVariants:{size:"md"}}),es=i.forwardRef(({className:e,size:t,...n},o)=>f.jsx(Rr,{ref:o,className:R(ef({size:t,className:e})),...n}));es.displayName=Rr.displayName;const ts=i.forwardRef(({className:e,...t},n)=>f.jsx($r,{ref:n,className:R("ksjsui-aspect-square ksjsui-size-full",e),...t}));ts.displayName=$r.displayName;const ns=i.forwardRef(({className:e,...t},n)=>{var o;return f.jsx(Fr,{ref:n,className:R("ksjsui-bg-muted ksjsui-flex ksjsui-size-full ksjsui-items-center ksjsui-justify-center ksjsui-rounded-full",e),style:{...tf((o=t.children)==null?void 0:o.toString(),Jr)},...t})});ns.displayName=Fr.displayName;function tf(e="",t=Jr){const n=e.substring(0,2),o=nf(n)%t.length,r=t[o],s=of(r);return{backgroundColor:r,color:s}}function nf(e){const t=e.substring(0,2);return t.split("").reduce((o,r,s)=>o+t.charCodeAt(s),0)}function of(e){return e==="#fff"?"#000":"#fff"}const rf=Ze(["ksjsui-inline-flex ksjsui-items-center ksjsui-justify-center ksjsui-whitespace-nowrap ksjsui-rounded-lg ksjsui-border ksjsui-border-transparent ksjsui-p-2 ksjsui-text-base ksjsui-ring-offset-background ksjsui-transition-colors","focus-visible:ksjsui-outline-none focus-visible:ksjsui-ring-2 focus-visible:ksjsui-ring-ring focus-visible:ksjsui-ring-offset-2","disabled:ksjsui-pointer-events-none disabled:ksjsui-cursor-not-allowed disabled:ksjsui-bg-disabled disabled:ksjsui-text-disabled-foreground","forced-colors:ksjsui-border-button-border forced-colors:ksjsui-bg-button-face forced-colors:ksjsui-text-button-text","forced-colors:hover:ksjsui-border-highlight","forced-colors:disabled:ksjsui-border-gray-text","[&_svg]:ksjsui-pointer-events-none [&_svg]:ksjsui-shrink-0"],{variants:{variant:{solid:"",outline:"ksjsui-border-current ksjsui-text-secondary hover:ksjsui-bg-neutral-hover",plain:"ksjsui-bg-transparent",link:"ksjsui-underline-current ksjsui-h-auto ksjsui-p-0 ksjsui-text-secondary hover:ksjsui-underline",avatar:"ksjsui-rounded-full ksjsui-border-0 ksjsui-p-0"},color:{neutral:"",primary:"",secondary:"",destructive:""},fullWidth:{true:"ksjsui-w-full"},iconOnly:{true:"ksjsui-icon-only [&.ksjsui-icon-only_svg]:ksjsui-size-6"},radius:{full:"ksjsui-rounded-full"},size:{sm:"ksjsui-h-8 [&_svg]:ksjsui-size-5",md:"ksjsui-h-9 [&_svg]:ksjsui-size-5",lg:"ksjsui-h-10 [&_svg]:ksjsui-size-6"}},defaultVariants:{variant:"solid",color:"neutral",fullWidth:!1,size:"md"},compoundVariants:[{variant:"solid",color:"neutral",className:"ksjsui-bg-neutral ksjsui-text-neutral-foreground hover:ksjsui-bg-neutral-hover"},{variant:"solid",color:"primary",className:"ksjsui-bg-primary ksjsui-text-primary-foreground hover:ksjsui-bg-primary-hover"},{variant:"solid",color:"secondary",className:"ksjsui-bg-secondary ksjsui-text-secondary-foreground hover:ksjsui-bg-secondary-hover"},{variant:"solid",color:"destructive",className:"ksjsui-bg-destructive ksjsui-text-destructive-foreground hover:ksjsui-bg-destructive-hover"},{variant:["outline","plain","link"],color:"neutral",className:"ksjsui-text-neutral-foreground"},{variant:["outline","plain","link"],color:"primary",className:"ksjsui-text-primary"},{variant:["outline","plain","link"],color:"secondary",className:"ksjsui-text-secondary"},{variant:["outline","plain","link"],color:"destructive",className:"ksjsui-text-destructive"},{iconOnly:!0,size:"sm",className:"ksjsui-size-8"},{iconOnly:!0,size:"md",className:"ksjsui-size-9"},{iconOnly:!0,size:"lg",className:"ksjsui-size-10"}]}),$n=i.forwardRef(({className:e,endContent:t,startContent:n,variant:o,color:r,fullWidth:s,iconOnly:c,radius:a,size:u,asChild:l,children:d,tabIndex:p=0,...m},v)=>{const w=l?ne:"button";return f.jsxs(w,{className:R(rf({variant:o,color:r,fullWidth:s,iconOnly:c,radius:a,size:u,className:e})),ref:v,tabIndex:p,...m,children:[n&&f.jsx("span",{className:"ksjsui-me-2",children:n}),f.jsx(On,{children:d}),t&&f.jsx("span",{className:"ksjsui-ms-2",children:t})]})});$n.displayName="Button";function T(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}var sf=i.useId||(()=>{}),af=0;function ve(e){const[t,n]=i.useState(sf());return Y(()=>{n(o=>o??String(af++))},[e]),t?`radix-${t}`:""}function Oe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=cf({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:o,a=V(n),u=i.useCallback(l=>{if(s){const p=typeof l=="function"?l(e):l;p!==e&&a(p)}else r(l)},[s,e,r,a]);return[c,u]}function cf({defaultProp:e,onChange:t}){const n=i.useState(e),[o]=n,r=i.useRef(o),s=V(t);return i.useEffect(()=>{r.current!==o&&(s(o),r.current=o)},[o,r,s]),n}var lf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ie=lf.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...c}=o,a=s?ne:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(a,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function uf(e,t){e&&je.flushSync(()=>e.dispatchEvent(t))}function bt(e,t=globalThis==null?void 0:globalThis.document){const n=V(e);i.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var df="DismissableLayer",Fn="dismissableLayer.update",ff="dismissableLayer.pointerDownOutside",pf="dismissableLayer.focusOutside",os,rs=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ss=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:c,onDismiss:a,...u}=e,l=i.useContext(rs),[d,p]=i.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=i.useState({}),w=L(t,E=>p(E)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(g),y=d?h.indexOf(d):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,x=y>=b,k=vf(E=>{const P=E.target,N=[...l.branches].some(M=>M.contains(P));!x||N||(r==null||r(E),c==null||c(E),E.defaultPrevented||a==null||a())},m),S=gf(E=>{const P=E.target;[...l.branches].some(M=>M.contains(P))||(s==null||s(E),c==null||c(E),E.defaultPrevented||a==null||a())},m);return bt(E=>{y===l.layers.size-1&&(o==null||o(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},m),i.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(os=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),is(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=os)}},[d,m,n,l]),i.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),is())},[d,l]),i.useEffect(()=>{const E=()=>v({});return document.addEventListener(Fn,E),()=>document.removeEventListener(Fn,E)},[]),f.jsx(Ie.div,{...u,ref:w,style:{pointerEvents:C?x?"auto":"none":void 0,...e.style},onFocusCapture:T(e.onFocusCapture,S.onFocusCapture),onBlurCapture:T(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:T(e.onPointerDownCapture,k.onPointerDownCapture)})});ss.displayName=df;var hf="DismissableLayerBranch",mf=i.forwardRef((e,t)=>{const n=i.useContext(rs),o=i.useRef(null),r=L(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),f.jsx(Ie.div,{...e,ref:r})});mf.displayName=hf;function vf(e,t=globalThis==null?void 0:globalThis.document){const n=V(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!o.current){let u=function(){as(ff,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}else t.removeEventListener("click",r.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function gf(e,t=globalThis==null?void 0:globalThis.document){const n=V(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&as(pf,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function is(){const e=new CustomEvent(Fn);document.dispatchEvent(e)}function as(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?uf(r,s):r.dispatchEvent(s)}var Wn="focusScope.autoFocusOnMount",Bn="focusScope.autoFocusOnUnmount",cs={bubbles:!1,cancelable:!0},wf="FocusScope",ls=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...c}=e,[a,u]=i.useState(null),l=V(r),d=V(s),p=i.useRef(null),m=L(t,h=>u(h)),v=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let h=function(C){if(v.paused||!a)return;const x=C.target;a.contains(x)?p.current=x:Be(p.current,{select:!0})},g=function(C){if(v.paused||!a)return;const x=C.relatedTarget;x!==null&&(a.contains(x)||Be(p.current,{select:!0}))},b=function(C){if(document.activeElement===document.body)for(const k of C)k.removedNodes.length>0&&Be(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const y=new MutationObserver(b);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),y.disconnect()}}},[o,a,v.paused]),i.useEffect(()=>{if(a){fs.add(v);const h=document.activeElement;if(!a.contains(h)){const b=new CustomEvent(Wn,cs);a.addEventListener(Wn,l),a.dispatchEvent(b),b.defaultPrevented||(bf(kf(us(a)),{select:!0}),document.activeElement===h&&Be(a))}return()=>{a.removeEventListener(Wn,l),setTimeout(()=>{const b=new CustomEvent(Bn,cs);a.addEventListener(Bn,d),a.dispatchEvent(b),b.defaultPrevented||Be(h??document.body,{select:!0}),a.removeEventListener(Bn,d),fs.remove(v)},0)}}},[a,l,d,v]);const w=i.useCallback(h=>{if(!n&&!o||v.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,b=document.activeElement;if(g&&b){const y=h.currentTarget,[C,x]=yf(y);C&&x?!h.shiftKey&&b===x?(h.preventDefault(),n&&Be(C,{select:!0})):h.shiftKey&&b===C&&(h.preventDefault(),n&&Be(x,{select:!0})):b===y&&h.preventDefault()}},[n,o,v.paused]);return f.jsx(Ie.div,{tabIndex:-1,...c,ref:m,onKeyDown:w})});ls.displayName=wf;function bf(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Be(o,{select:t}),document.activeElement!==n)return}function yf(e){const t=us(e),n=ds(t,e),o=ds(t.reverse(),e);return[n,o]}function us(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ds(e,t){for(const n of e)if(!Cf(n,{upTo:t}))return n}function Cf(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 xf(e){return e instanceof HTMLInputElement&&"select"in e}function Be(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xf(e)&&t&&e.select()}}var fs=Ef();function Ef(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ps(e,t),e.unshift(t)},remove(t){var n;e=ps(e,t),(n=e[0])==null||n.resume()}}}function ps(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function kf(e){return e.filter(t=>t.tagName!=="A")}var Sf="Portal",hs=i.forwardRef((e,t)=>{var a;const{container:n,...o}=e,[r,s]=i.useState(!1);Y(()=>s(!0),[]);const c=n||r&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return c?mt.createPortal(f.jsx(Ie.div,{...o,ref:t}),c):null});hs.displayName=Sf;function Pf(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var Rt=e=>{const{present:t,children:n}=e,o=Tf(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=L(o.ref,Nf(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};Rt.displayName="Presence";function Tf(e){const[t,n]=i.useState(),o=i.useRef({}),r=i.useRef(e),s=i.useRef("none"),c=e?"mounted":"unmounted",[a,u]=Pf(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const l=$t(o.current);s.current=a==="mounted"?l:"none"},[a]),Y(()=>{const l=o.current,d=r.current;if(d!==e){const m=s.current,v=$t(l);e?u("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),Y(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,p=v=>{const h=$t(o.current).includes(v.animationName);if(v.target===t&&h&&(u("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(s.current=$t(o.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:i.useCallback(l=>{l&&(o.current=getComputedStyle(l)),n(l)},[])}}function $t(e){return(e==null?void 0:e.animationName)||"none"}function Nf(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Un=0;function zn(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ms()),document.body.insertAdjacentElement("beforeend",e[1]??ms()),Un++,()=>{Un===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Un--}},[])}function ms(){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 ke=function(){return ke=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ke.apply(this,arguments)};function vs(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function Af(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ft="right-scroll-bar-position",Wt="width-before-scroll-bar",jf="with-scroll-bars-hidden",Mf="--removed-body-scroll-bar-size";function Hn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Of(e,t){var n=J.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var If=typeof window<"u"?i.useLayoutEffect:i.useEffect,gs=new WeakMap;function Df(e,t){var n=Of(null,function(o){return e.forEach(function(r){return Hn(r,o)})});return If(function(){var o=gs.get(n);if(o){var r=new Set(o),s=new Set(e),c=n.current;r.forEach(function(a){s.has(a)||Hn(a,null)}),s.forEach(function(a){r.has(a)||Hn(a,c)})}gs.set(n,e)},[e]),n}function _f(e){return e}function Lf(e,t){t===void 0&&(t=_f);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var c=t(s,o);return n.push(c),function(){n=n.filter(function(a){return a!==c})}},assignSyncMedium:function(s){for(o=!0;n.length;){var c=n;n=[],c.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){o=!0;var c=[];if(n.length){var a=n;n=[],a.forEach(s),c=n}var u=function(){var d=c;c=[],d.forEach(s)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(d){c.push(d),l()},filter:function(d){return c=c.filter(d),n}}}};return r}function Rf(e){e===void 0&&(e={});var t=Lf(null);return t.options=ke({async:!0,ssr:!1},e),t}var ws=function(e){var t=e.sideCar,n=vs(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return i.createElement(o,ke({},n))};ws.isSideCarExport=!0;function $f(e,t){return e.useMedium(t),ws}var bs=Rf(),Vn=function(){},Bt=i.forwardRef(function(e,t){var n=i.useRef(null),o=i.useState({onScrollCapture:Vn,onWheelCapture:Vn,onTouchMoveCapture:Vn}),r=o[0],s=o[1],c=e.forwardProps,a=e.children,u=e.className,l=e.removeScrollBar,d=e.enabled,p=e.shards,m=e.sideCar,v=e.noIsolation,w=e.inert,h=e.allowPinchZoom,g=e.as,b=g===void 0?"div":g,y=e.gapMode,C=vs(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=m,k=Df([n,t]),S=ke(ke({},C),r);return i.createElement(i.Fragment,null,d&&i.createElement(x,{sideCar:bs,removeScrollBar:l,shards:p,noIsolation:v,inert:w,setCallbacks:s,allowPinchZoom:!!h,lockRef:n,gapMode:y}),c?i.cloneElement(i.Children.only(a),ke(ke({},S),{ref:k})):i.createElement(b,ke({},S,{className:u,ref:k}),a))});Bt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Bt.classNames={fullWidth:Wt,zeroRight:Ft};var Ff=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Wf(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ff();return t&&e.setAttribute("nonce",t),e}function Bf(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Uf(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var zf=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Wf())&&(Bf(t,n),Uf(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Hf=function(){var e=zf();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ys=function(){var e=Hf(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Vf={left:0,top:0,right:0,gap:0},Kn=function(e){return parseInt(e||"",10)||0},Kf=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Kn(n),Kn(o),Kn(r)]},Gf=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Vf;var t=Kf(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Yf=ys(),rt="data-scroll-locked",Xf=function(e,t,n,o){var r=e.left,s=e.top,c=e.right,a=e.gap;return n===void 0&&(n="margin"),`
2
+ .`.concat(jf,` {
3
3
  overflow: hidden `).concat(o,`;
4
4
  padding-right: `).concat(a,"px ").concat(o,`;
5
5
  }
6
- body[`).concat(ot,`] {
6
+ body[`).concat(rt,`] {
7
7
  overflow: hidden `).concat(o,`;
8
8
  overscroll-behavior: contain;
9
9
  `).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
@@ -32,64 +32,14 @@
32
32
  margin-right: 0 `).concat(o,`;
33
33
  }
34
34
 
35
- body[`).concat(ot,`] {
36
- `).concat(Af,": ").concat(a,`px;
35
+ body[`).concat(rt,`] {
36
+ `).concat(Mf,": ").concat(a,`px;
37
37
  }
38
- `)},gs=function(){var e=parseInt(document.body.getAttribute(ot)||"0",10);return isFinite(e)?e:0},Yf=function(){i.useEffect(function(){return document.body.setAttribute(ot,(gs()+1).toString()),function(){var e=gs()-1;e<=0?document.body.removeAttribute(ot):document.body.setAttribute(ot,e.toString())}},[])},Xf=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;Yf();var s=i.useMemo(function(){return Vf(r)},[r]);return i.createElement(Kf,{styles:Gf(s,!t,r,n?"":"!important")})},Gn=!1;if(typeof window<"u")try{var Ut=Object.defineProperty({},"passive",{get:function(){return Gn=!0,!0}});window.addEventListener("test",Ut,Ut),window.removeEventListener("test",Ut,Ut)}catch{Gn=!1}var rt=Gn?{passive:!1}:!1,qf=function(e){return e.tagName==="TEXTAREA"},ws=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!qf(e)&&n[t]==="visible")},Zf=function(e){return ws(e,"overflowY")},Qf=function(e){return ws(e,"overflowX")},bs=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=ys(e,o);if(r){var s=xs(e,o),c=s[1],a=s[2];if(c>a)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},Jf=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},ep=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},ys=function(e,t){return e==="v"?Zf(t):Qf(t)},xs=function(e,t){return e==="v"?Jf(t):ep(t)},tp=function(e,t){return e==="h"&&t==="rtl"?-1:1},np=function(e,t,n,o,r){var s=tp(e,window.getComputedStyle(t).direction),c=s*o,a=n.target,u=t.contains(a),l=!1,d=c>0,p=0,m=0;do{var v=xs(e,a),w=v[0],h=v[1],g=v[2],b=h-g-s*w;(w||b)&&ys(e,a)&&(p+=b,m+=w),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!u&&a!==document.body||u&&(t.contains(a)||t===a));return(d&&Math.abs(p)<1||!d&&Math.abs(m)<1)&&(l=!0),l},Ht=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Es=function(e){return[e.deltaX,e.deltaY]},ks=function(e){return e&&"current"in e?e.current:e},op=function(e,t){return e[0]===t[0]&&e[1]===t[1]},rp=function(e){return`
38
+ `)},Cs=function(){var e=parseInt(document.body.getAttribute(rt)||"0",10);return isFinite(e)?e:0},Zf=function(){i.useEffect(function(){return document.body.setAttribute(rt,(Cs()+1).toString()),function(){var e=Cs()-1;e<=0?document.body.removeAttribute(rt):document.body.setAttribute(rt,e.toString())}},[])},qf=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;Zf();var s=i.useMemo(function(){return Gf(r)},[r]);return i.createElement(Yf,{styles:Xf(s,!t,r,n?"":"!important")})},Gn=!1;if(typeof window<"u")try{var Ut=Object.defineProperty({},"passive",{get:function(){return Gn=!0,!0}});window.addEventListener("test",Ut,Ut),window.removeEventListener("test",Ut,Ut)}catch{Gn=!1}var st=Gn?{passive:!1}:!1,Qf=function(e){return e.tagName==="TEXTAREA"},xs=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Qf(e)&&n[t]==="visible")},Jf=function(e){return xs(e,"overflowY")},ep=function(e){return xs(e,"overflowX")},Es=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=ks(e,o);if(r){var s=Ss(e,o),c=s[1],a=s[2];if(c>a)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},tp=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},np=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},ks=function(e,t){return e==="v"?Jf(t):ep(t)},Ss=function(e,t){return e==="v"?tp(t):np(t)},op=function(e,t){return e==="h"&&t==="rtl"?-1:1},rp=function(e,t,n,o,r){var s=op(e,window.getComputedStyle(t).direction),c=s*o,a=n.target,u=t.contains(a),l=!1,d=c>0,p=0,m=0;do{var v=Ss(e,a),w=v[0],h=v[1],g=v[2],b=h-g-s*w;(w||b)&&ks(e,a)&&(p+=b,m+=w),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!u&&a!==document.body||u&&(t.contains(a)||t===a));return(d&&Math.abs(p)<1||!d&&Math.abs(m)<1)&&(l=!0),l},zt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ps=function(e){return[e.deltaX,e.deltaY]},Ts=function(e){return e&&"current"in e?e.current:e},sp=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ip=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},sp=0,st=[];function ip(e){var t=i.useRef([]),n=i.useRef([0,0]),o=i.useRef(),r=i.useState(sp++)[0],s=i.useState(vs)[0],c=i.useRef(e);i.useEffect(function(){c.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var h=Tf([e.lockRef.current],(e.shards||[]).map(ks),!0).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var a=i.useCallback(function(h,g){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!c.current.allowPinchZoom;var b=Ht(h),y=n.current,x="deltaX"in h?h.deltaX:y[0]-b[0],E="deltaY"in h?h.deltaY:y[1]-b[1],C,S=h.target,k=Math.abs(x)>Math.abs(E)?"h":"v";if("touches"in h&&k==="h"&&S.type==="range")return!1;var P=bs(k,S);if(!P)return!0;if(P?C=k:(C=k==="v"?"h":"v",P=bs(k,S)),!P)return!1;if(!o.current&&"changedTouches"in h&&(x||E)&&(o.current=C),!C)return!0;var N=o.current||C;return np(N,g,h,N==="h"?x:E)},[]),u=i.useCallback(function(h){var g=h;if(!(!st.length||st[st.length-1]!==s)){var b="deltaY"in g?Es(g):Ht(g),y=t.current.filter(function(C){return C.name===g.type&&(C.target===g.target||g.target===C.shadowParent)&&op(C.delta,b)})[0];if(y&&y.should){g.cancelable&&g.preventDefault();return}if(!y){var x=(c.current.shards||[]).map(ks).filter(Boolean).filter(function(C){return C.contains(g.target)}),E=x.length>0?a(g,x[0]):!c.current.noIsolation;E&&g.cancelable&&g.preventDefault()}}},[]),l=i.useCallback(function(h,g,b,y){var x={name:h,delta:g,target:b,should:y,shadowParent:ap(b)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(E){return E!==x})},1)},[]),d=i.useCallback(function(h){n.current=Ht(h),o.current=void 0},[]),p=i.useCallback(function(h){l(h.type,Es(h),h.target,a(h,e.lockRef.current))},[]),m=i.useCallback(function(h){l(h.type,Ht(h),h.target,a(h,e.lockRef.current))},[]);i.useEffect(function(){return st.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",u,rt),document.addEventListener("touchmove",u,rt),document.addEventListener("touchstart",d,rt),function(){st=st.filter(function(h){return h!==s}),document.removeEventListener("wheel",u,rt),document.removeEventListener("touchmove",u,rt),document.removeEventListener("touchstart",d,rt)}},[]);var v=e.removeScrollBar,w=e.inert;return i.createElement(i.Fragment,null,w?i.createElement(s,{styles:rp(r)}):null,v?i.createElement(Xf,{gapMode:e.gapMode}):null)}function ap(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const cp=Lf(ms,ip);var zt=i.forwardRef(function(e,t){return i.createElement(Bt,ke({},e,{ref:t,sideCar:cp}))});zt.classNames=Bt.classNames;var lp=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},it=new WeakMap,Vt=new WeakMap,Kt={},Yn=0,Cs=function(e){return e&&(e.host||Cs(e.parentNode))},up=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Cs(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},dp=function(e,t,n,o){var r=up(t,Array.isArray(e)?e:[e]);Kt[n]||(Kt[n]=new WeakMap);var s=Kt[n],c=[],a=new Set,u=new Set(r),l=function(p){!p||a.has(p)||(a.add(p),l(p.parentNode))};r.forEach(l);var d=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(m){if(a.has(m))d(m);else try{var v=m.getAttribute(o),w=v!==null&&v!=="false",h=(it.get(m)||0)+1,g=(s.get(m)||0)+1;it.set(m,h),s.set(m,g),c.push(m),h===1&&w&&Vt.set(m,!0),g===1&&m.setAttribute(n,"true"),w||m.setAttribute(o,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return d(t),a.clear(),Yn++,function(){c.forEach(function(p){var m=it.get(p)-1,v=s.get(p)-1;it.set(p,m),s.set(p,v),m||(Vt.has(p)||p.removeAttribute(o),Vt.delete(p)),v||p.removeAttribute(n)}),Yn--,Yn||(it=new WeakMap,it=new WeakMap,Vt=new WeakMap,Kt={})}},Xn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=lp(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live]"))),dp(o,r,n,"aria-hidden")):function(){return null}},qn="Dialog",[Ss,qb]=ce(qn),[fp,be]=Ss(qn),Ps=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:c=!0}=e,a=i.useRef(null),u=i.useRef(null),[l=!1,d]=Me({prop:o,defaultProp:r,onChange:s});return f.jsx(fp,{scope:t,triggerRef:a,contentRef:u,contentId:ve(),titleId:ve(),descriptionId:ve(),open:l,onOpenChange:d,onOpenToggle:i.useCallback(()=>d(p=>!p),[d]),modal:c,children:n})};Ps.displayName=qn;var Ts="DialogTrigger",Ns=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=be(Ts,n),s=L(t,r.triggerRef);return f.jsx(Oe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Jn(r.open),...o,ref:s,onClick:T(e.onClick,r.onOpenToggle)})});Ns.displayName=Ts;var Zn="DialogPortal",[pp,As]=Ss(Zn,{forceMount:void 0}),js=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=be(Zn,t);return f.jsx(pp,{scope:t,forceMount:n,children:i.Children.map(o,c=>f.jsx(Rt,{present:n||s.open,children:f.jsx(us,{asChild:!0,container:r,children:c})}))})};js.displayName=Zn;var Gt="DialogOverlay",Ms=i.forwardRef((e,t)=>{const n=As(Gt,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=be(Gt,e.__scopeDialog);return s.modal?f.jsx(Rt,{present:o||s.open,children:f.jsx(hp,{...r,ref:t})}):null});Ms.displayName=Gt;var hp=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=be(Gt,n);return f.jsx(zt,{as:ne,allowPinchZoom:!0,shards:[r.contentRef],children:f.jsx(Oe.div,{"data-state":Jn(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Xe="DialogContent",Os=i.forwardRef((e,t)=>{const n=As(Xe,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=be(Xe,e.__scopeDialog);return f.jsx(Rt,{present:o||s.open,children:s.modal?f.jsx(mp,{...r,ref:t}):f.jsx(vp,{...r,ref:t})})});Os.displayName=Xe;var mp=i.forwardRef((e,t)=>{const n=be(Xe,e.__scopeDialog),o=i.useRef(null),r=L(t,n.contentRef,o);return i.useEffect(()=>{const s=o.current;if(s)return Xn(s)},[]),f.jsx(Is,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:T(e.onCloseAutoFocus,s=>{var c;s.preventDefault(),(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:T(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,a=c.button===0&&c.ctrlKey===!0;(c.button===2||a)&&s.preventDefault()}),onFocusOutside:T(e.onFocusOutside,s=>s.preventDefault())})}),vp=i.forwardRef((e,t)=>{const n=be(Xe,e.__scopeDialog),o=i.useRef(!1),r=i.useRef(!1);return f.jsx(Is,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,a;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(o.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{var u,l;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const c=s.target;((l=n.triggerRef.current)==null?void 0:l.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Is=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...c}=e,a=be(Xe,n),u=i.useRef(null),l=L(t,u);return Hn(),f.jsxs(f.Fragment,{children:[f.jsx(ss,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:f.jsx(ts,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Jn(a.open),...c,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),f.jsxs(f.Fragment,{children:[f.jsx(gp,{titleId:a.titleId}),f.jsx(bp,{contentRef:u,descriptionId:a.descriptionId})]})]})}),Qn="DialogTitle",Ds=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=be(Qn,n);return f.jsx(Oe.h2,{id:r.titleId,...o,ref:t})});Ds.displayName=Qn;var _s="DialogDescription",Ls=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=be(_s,n);return f.jsx(Oe.p,{id:r.descriptionId,...o,ref:t})});Ls.displayName=_s;var Rs="DialogClose",$s=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=be(Rs,n);return f.jsx(Oe.button,{type:"button",...o,ref:t,onClick:T(e.onClick,()=>r.onOpenChange(!1))})});$s.displayName=Rs;function Jn(e){return e?"open":"closed"}var Fs="DialogTitleWarning",[Zb,Ws]=ud(Fs,{contentName:Xe,titleName:Qn,docsSlug:"dialog"}),gp=({titleId:e})=>{const t=Ws(Fs),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
41
+ `)},ap=0,it=[];function cp(e){var t=i.useRef([]),n=i.useRef([0,0]),o=i.useRef(),r=i.useState(ap++)[0],s=i.useState(ys)[0],c=i.useRef(e);i.useEffect(function(){c.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var h=Af([e.lockRef.current],(e.shards||[]).map(Ts),!0).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var a=i.useCallback(function(h,g){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!c.current.allowPinchZoom;var b=zt(h),y=n.current,C="deltaX"in h?h.deltaX:y[0]-b[0],x="deltaY"in h?h.deltaY:y[1]-b[1],k,S=h.target,E=Math.abs(C)>Math.abs(x)?"h":"v";if("touches"in h&&E==="h"&&S.type==="range")return!1;var P=Es(E,S);if(!P)return!0;if(P?k=E:(k=E==="v"?"h":"v",P=Es(E,S)),!P)return!1;if(!o.current&&"changedTouches"in h&&(C||x)&&(o.current=k),!k)return!0;var N=o.current||k;return rp(N,g,h,N==="h"?C:x)},[]),u=i.useCallback(function(h){var g=h;if(!(!it.length||it[it.length-1]!==s)){var b="deltaY"in g?Ps(g):zt(g),y=t.current.filter(function(k){return k.name===g.type&&(k.target===g.target||g.target===k.shadowParent)&&sp(k.delta,b)})[0];if(y&&y.should){g.cancelable&&g.preventDefault();return}if(!y){var C=(c.current.shards||[]).map(Ts).filter(Boolean).filter(function(k){return k.contains(g.target)}),x=C.length>0?a(g,C[0]):!c.current.noIsolation;x&&g.cancelable&&g.preventDefault()}}},[]),l=i.useCallback(function(h,g,b,y){var C={name:h,delta:g,target:b,should:y,shadowParent:lp(b)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(x){return x!==C})},1)},[]),d=i.useCallback(function(h){n.current=zt(h),o.current=void 0},[]),p=i.useCallback(function(h){l(h.type,Ps(h),h.target,a(h,e.lockRef.current))},[]),m=i.useCallback(function(h){l(h.type,zt(h),h.target,a(h,e.lockRef.current))},[]);i.useEffect(function(){return it.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",u,st),document.addEventListener("touchmove",u,st),document.addEventListener("touchstart",d,st),function(){it=it.filter(function(h){return h!==s}),document.removeEventListener("wheel",u,st),document.removeEventListener("touchmove",u,st),document.removeEventListener("touchstart",d,st)}},[]);var v=e.removeScrollBar,w=e.inert;return i.createElement(i.Fragment,null,w?i.createElement(s,{styles:ip(r)}):null,v?i.createElement(qf,{gapMode:e.gapMode}):null)}function lp(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const up=$f(bs,cp);var Ht=i.forwardRef(function(e,t){return i.createElement(Bt,ke({},e,{ref:t,sideCar:up}))});Ht.classNames=Bt.classNames;var dp=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},at=new WeakMap,Vt=new WeakMap,Kt={},Yn=0,Ns=function(e){return e&&(e.host||Ns(e.parentNode))},fp=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Ns(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},pp=function(e,t,n,o){var r=fp(t,Array.isArray(e)?e:[e]);Kt[n]||(Kt[n]=new WeakMap);var s=Kt[n],c=[],a=new Set,u=new Set(r),l=function(p){!p||a.has(p)||(a.add(p),l(p.parentNode))};r.forEach(l);var d=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(m){if(a.has(m))d(m);else try{var v=m.getAttribute(o),w=v!==null&&v!=="false",h=(at.get(m)||0)+1,g=(s.get(m)||0)+1;at.set(m,h),s.set(m,g),c.push(m),h===1&&w&&Vt.set(m,!0),g===1&&m.setAttribute(n,"true"),w||m.setAttribute(o,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return d(t),a.clear(),Yn++,function(){c.forEach(function(p){var m=at.get(p)-1,v=s.get(p)-1;at.set(p,m),s.set(p,v),m||(Vt.has(p)||p.removeAttribute(o),Vt.delete(p)),v||p.removeAttribute(n)}),Yn--,Yn||(at=new WeakMap,at=new WeakMap,Vt=new WeakMap,Kt={})}},Xn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=dp(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live]"))),pp(o,r,n,"aria-hidden")):function(){return null}},Zn="Dialog",[As,Qb]=ce(Zn),[hp,be]=As(Zn),js=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:c=!0}=e,a=i.useRef(null),u=i.useRef(null),[l=!1,d]=Oe({prop:o,defaultProp:r,onChange:s});return f.jsx(hp,{scope:t,triggerRef:a,contentRef:u,contentId:ve(),titleId:ve(),descriptionId:ve(),open:l,onOpenChange:d,onOpenToggle:i.useCallback(()=>d(p=>!p),[d]),modal:c,children:n})};js.displayName=Zn;var Ms="DialogTrigger",Os=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=be(Ms,n),s=L(t,r.triggerRef);return f.jsx(Ie.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Jn(r.open),...o,ref:s,onClick:T(e.onClick,r.onOpenToggle)})});Os.displayName=Ms;var qn="DialogPortal",[mp,Is]=As(qn,{forceMount:void 0}),Ds=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=be(qn,t);return f.jsx(mp,{scope:t,forceMount:n,children:i.Children.map(o,c=>f.jsx(Rt,{present:n||s.open,children:f.jsx(hs,{asChild:!0,container:r,children:c})}))})};Ds.displayName=qn;var Gt="DialogOverlay",_s=i.forwardRef((e,t)=>{const n=Is(Gt,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=be(Gt,e.__scopeDialog);return s.modal?f.jsx(Rt,{present:o||s.open,children:f.jsx(vp,{...r,ref:t})}):null});_s.displayName=Gt;var vp=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=be(Gt,n);return f.jsx(Ht,{as:ne,allowPinchZoom:!0,shards:[r.contentRef],children:f.jsx(Ie.div,{"data-state":Jn(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),qe="DialogContent",Ls=i.forwardRef((e,t)=>{const n=Is(qe,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=be(qe,e.__scopeDialog);return f.jsx(Rt,{present:o||s.open,children:s.modal?f.jsx(gp,{...r,ref:t}):f.jsx(wp,{...r,ref:t})})});Ls.displayName=qe;var gp=i.forwardRef((e,t)=>{const n=be(qe,e.__scopeDialog),o=i.useRef(null),r=L(t,n.contentRef,o);return i.useEffect(()=>{const s=o.current;if(s)return Xn(s)},[]),f.jsx(Rs,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:T(e.onCloseAutoFocus,s=>{var c;s.preventDefault(),(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:T(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,a=c.button===0&&c.ctrlKey===!0;(c.button===2||a)&&s.preventDefault()}),onFocusOutside:T(e.onFocusOutside,s=>s.preventDefault())})}),wp=i.forwardRef((e,t)=>{const n=be(qe,e.__scopeDialog),o=i.useRef(!1),r=i.useRef(!1);return f.jsx(Rs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,a;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(o.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{var u,l;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const c=s.target;((l=n.triggerRef.current)==null?void 0:l.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Rs=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...c}=e,a=be(qe,n),u=i.useRef(null),l=L(t,u);return zn(),f.jsxs(f.Fragment,{children:[f.jsx(ls,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:f.jsx(ss,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Jn(a.open),...c,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),f.jsxs(f.Fragment,{children:[f.jsx(bp,{titleId:a.titleId}),f.jsx(Cp,{contentRef:u,descriptionId:a.descriptionId})]})]})}),Qn="DialogTitle",$s=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=be(Qn,n);return f.jsx(Ie.h2,{id:r.titleId,...o,ref:t})});$s.displayName=Qn;var Fs="DialogDescription",Ws=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=be(Fs,n);return f.jsx(Ie.p,{id:r.descriptionId,...o,ref:t})});Ws.displayName=Fs;var Bs="DialogClose",Us=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=be(Bs,n);return f.jsx(Ie.button,{type:"button",...o,ref:t,onClick:T(e.onClick,()=>r.onOpenChange(!1))})});Us.displayName=Bs;function Jn(e){return e?"open":"closed"}var zs="DialogTitleWarning",[Jb,Hs]=cd(zs,{contentName:qe,titleName:Qn,docsSlug:"dialog"}),bp=({titleId:e})=>{const t=Hs(zs),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
42
 
43
43
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
44
 
45
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},wp="DialogDescriptionWarning",bp=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ws(wp).contentName}}.`;return i.useEffect(()=>{var s;const r=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},yp=Ps,xp=Ns,Ep=js,Bs=Ms,Us=Os,Hs=Ds,zs=Ls,Vs=$s;/**
46
- * @license lucide-react v0.453.0 - ISC
47
- *
48
- * This source code is licensed under the ISC license.
49
- * See the LICENSE file in the root directory of this source tree.
50
- */const kp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ks=(...e)=>e.filter((t,n,o)=>!!t&&o.indexOf(t)===n).join(" ");/**
51
- * @license lucide-react v0.453.0 - ISC
52
- *
53
- * This source code is licensed under the ISC license.
54
- * See the LICENSE file in the root directory of this source tree.
55
- */var Cp={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"};/**
56
- * @license lucide-react v0.453.0 - ISC
57
- *
58
- * This source code is licensed under the ISC license.
59
- * See the LICENSE file in the root directory of this source tree.
60
- */const Sp=J.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:r="",children:s,iconNode:c,...a},u)=>J.createElement("svg",{ref:u,...Cp,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:Ks("lucide",r),...a},[...c.map(([l,d])=>J.createElement(l,d)),...Array.isArray(s)?s:[s]]));/**
61
- * @license lucide-react v0.453.0 - ISC
62
- *
63
- * This source code is licensed under the ISC license.
64
- * See the LICENSE file in the root directory of this source tree.
65
- */const at=(e,t)=>{const n=J.forwardRef(({className:o,...r},s)=>J.createElement(Sp,{ref:s,iconNode:t,className:Ks(`lucide-${kp(e)}`,o),...r}));return n.displayName=`${e}`,n};/**
66
- * @license lucide-react v0.453.0 - ISC
67
- *
68
- * This source code is licensed under the ISC license.
69
- * See the LICENSE file in the root directory of this source tree.
70
- */const Gs=at("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
71
- * @license lucide-react v0.453.0 - ISC
72
- *
73
- * This source code is licensed under the ISC license.
74
- * See the LICENSE file in the root directory of this source tree.
75
- */const Pp=at("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
76
- * @license lucide-react v0.453.0 - ISC
77
- *
78
- * This source code is licensed under the ISC license.
79
- * See the LICENSE file in the root directory of this source tree.
80
- */const Ys=at("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
81
- * @license lucide-react v0.453.0 - ISC
82
- *
83
- * This source code is licensed under the ISC license.
84
- * See the LICENSE file in the root directory of this source tree.
85
- */const Xs=at("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
86
- * @license lucide-react v0.453.0 - ISC
87
- *
88
- * This source code is licensed under the ISC license.
89
- * See the LICENSE file in the root directory of this source tree.
90
- */const Tp=at("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
91
- * @license lucide-react v0.453.0 - ISC
92
- *
93
- * This source code is licensed under the ISC license.
94
- * See the LICENSE file in the root directory of this source tree.
95
- */const qs=at("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Np=yp,Ap=xp,Zs=Ep,jp=Vs,eo=i.forwardRef(({className:e,...t},n)=>f.jsx(Bs,{ref:n,className:R(["ksjsui-fixed ksjsui-inset-0 ksjsui-z-50 ksjsui-bg-black/80","data-[state=open]:ksjsui-animate-in data-[state=open]:ksjsui-fade-in-0","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-0"],e),...t}));eo.displayName=Bs.displayName;const Qs=i.forwardRef(({className:e,children:t,...n},o)=>f.jsxs(Zs,{children:[f.jsx(eo,{}),f.jsxs(Us,{ref:o,className:R(["ksjsui-fixed ksjsui-left-[50%] ksjsui-top-[50%] ksjsui-z-50 ksjsui-grid ksjsui-w-full ksjsui-max-w-lg ksjsui-translate-x-[-50%] ksjsui-translate-y-[-50%] ksjsui-gap-4 ksjsui-border ksjsui-bg-background ksjsui-p-6 ksjsui-shadow-lg ksjsui-duration-200","data-[state=open]:ksjsui-animate-in data-[state=open]:ksjsui-fade-in-0 data-[state=open]:ksjsui-zoom-in-95 data-[state=open]:ksjsui-slide-in-from-left-1/2 data-[state=open]:ksjsui-slide-in-from-top-[48%]","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-0 data-[state=closed]:ksjsui-zoom-out-95 data-[state=closed]:ksjsui-slide-out-to-left-1/2 data-[state=closed]:ksjsui-slide-out-to-top-[48%]","sm:ksjsui-rounded-lg"],e),...n,children:[t,f.jsxs(Vs,{className:R(["ksjsui-absolute ksjsui-end-4 ksjsui-top-4 ksjsui-rounded-sm ksjsui-opacity-70 ksjsui-ring-offset-background ksjsui-transition-opacity hover:ksjsui-opacity-100","focus:ksjsui-outline-none focus:ksjsui-ring-2 focus:ksjsui-ring-ring focus:ksjsui-ring-offset-2","disabled:ksjsui-pointer-events-none"]),children:[f.jsx(qs,{className:"ksjsui-size-4"}),f.jsx("span",{className:"ksjsui-sr-only",children:"Close"})]})]})]}));Qs.displayName=Us.displayName;const Js=({className:e,...t})=>f.jsx("div",{className:R("ksjsui-flex ksjsui-flex-col ksjsui-space-y-1.5",e),...t});Js.displayName="DialogHeader";const ei=({className:e,...t})=>f.jsx("div",{className:R(["ksjsui-flex ksjsui-flex-col-reverse","sm:ksjsui-flex-row sm:ksjsui-justify-end sm:ksjsui-space-x-2"],e),...t});ei.displayName="DialogFooter";const ti=i.forwardRef(({className:e,...t},n)=>f.jsx(Hs,{ref:n,className:R("ksjsui-text-lg ksjsui-font-semibold ksjsui-leading-none ksjsui-tracking-tight",e),...t}));ti.displayName=Hs.displayName;const ni=i.forwardRef(({className:e,...t},n)=>f.jsx(zs,{ref:n,className:R("ksjsui-text-sm",e),...t}));ni.displayName=zs.displayName;var Mp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],de=Mp.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...c}=o,a=s?ne:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(a,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function oi(e,t){e&&Ae.flushSync(()=>e.dispatchEvent(t))}function ri(e){const t=e+"CollectionProvider",[n,o]=ce(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=v=>{const{scope:w,children:h}=v,g=J.useRef(null),b=J.useRef(new Map).current;return f.jsx(r,{scope:w,itemMap:b,collectionRef:g,children:h})};c.displayName=t;const a=e+"CollectionSlot",u=J.forwardRef((v,w)=>{const{scope:h,children:g}=v,b=s(a,h),y=L(w,b.collectionRef);return f.jsx(ne,{ref:y,children:g})});u.displayName=a;const l=e+"CollectionItemSlot",d="data-radix-collection-item",p=J.forwardRef((v,w)=>{const{scope:h,children:g,...b}=v,y=J.useRef(null),x=L(w,y),E=s(l,h);return J.useEffect(()=>(E.itemMap.set(y,{ref:y,...b}),()=>void E.itemMap.delete(y))),f.jsx(ne,{[d]:"",ref:x,children:g})});p.displayName=l;function m(v){const w=s(e+"CollectionConsumer",v);return J.useCallback(()=>{const g=w.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${d}]`));return Array.from(w.itemMap.values()).sort((E,C)=>b.indexOf(E.ref.current)-b.indexOf(C.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:c,Slot:u,ItemSlot:p},m,o]}var si=i.createContext(void 0),Op=e=>{const{dir:t,children:n}=e;return f.jsx(si.Provider,{value:t,children:n})};function Yt(e){const t=i.useContext(si);return e||t||"ltr"}var Ip="DismissableLayer",to="dismissableLayer.update",Dp="dismissableLayer.pointerDownOutside",_p="dismissableLayer.focusOutside",ii,ai=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ci=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:c,onDismiss:a,...u}=e,l=i.useContext(ai),[d,p]=i.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=i.useState({}),w=L(t,k=>p(k)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(g),y=d?h.indexOf(d):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,E=y>=b,C=$p(k=>{const P=k.target,N=[...l.branches].some(M=>M.contains(P));!E||N||(r==null||r(k),c==null||c(k),k.defaultPrevented||a==null||a())},m),S=Fp(k=>{const P=k.target;[...l.branches].some(M=>M.contains(P))||(s==null||s(k),c==null||c(k),k.defaultPrevented||a==null||a())},m);return bt(k=>{y===l.layers.size-1&&(o==null||o(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},m),i.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(ii=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),li(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=ii)}},[d,m,n,l]),i.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),li())},[d,l]),i.useEffect(()=>{const k=()=>v({});return document.addEventListener(to,k),()=>document.removeEventListener(to,k)},[]),f.jsx(de.div,{...u,ref:w,style:{pointerEvents:x?E?"auto":"none":void 0,...e.style},onFocusCapture:T(e.onFocusCapture,S.onFocusCapture),onBlurCapture:T(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:T(e.onPointerDownCapture,C.onPointerDownCapture)})});ci.displayName=Ip;var Lp="DismissableLayerBranch",Rp=i.forwardRef((e,t)=>{const n=i.useContext(ai),o=i.useRef(null),r=L(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),f.jsx(de.div,{...e,ref:r})});Rp.displayName=Lp;function $p(e,t=globalThis==null?void 0:globalThis.document){const n=V(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!o.current){let u=function(){ui(Dp,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}else t.removeEventListener("click",r.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Fp(e,t=globalThis==null?void 0:globalThis.document){const n=V(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&ui(_p,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function li(){const e=new CustomEvent(to);document.dispatchEvent(e)}function ui(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?oi(r,s):r.dispatchEvent(s)}var no="focusScope.autoFocusOnMount",oo="focusScope.autoFocusOnUnmount",di={bubbles:!1,cancelable:!0},Wp="FocusScope",fi=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...c}=e,[a,u]=i.useState(null),l=V(r),d=V(s),p=i.useRef(null),m=L(t,h=>u(h)),v=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let h=function(x){if(v.paused||!a)return;const E=x.target;a.contains(E)?p.current=E:Be(p.current,{select:!0})},g=function(x){if(v.paused||!a)return;const E=x.relatedTarget;E!==null&&(a.contains(E)||Be(p.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const C of x)C.removedNodes.length>0&&Be(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const y=new MutationObserver(b);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),y.disconnect()}}},[o,a,v.paused]),i.useEffect(()=>{if(a){mi.add(v);const h=document.activeElement;if(!a.contains(h)){const b=new CustomEvent(no,di);a.addEventListener(no,l),a.dispatchEvent(b),b.defaultPrevented||(Bp(Kp(pi(a)),{select:!0}),document.activeElement===h&&Be(a))}return()=>{a.removeEventListener(no,l),setTimeout(()=>{const b=new CustomEvent(oo,di);a.addEventListener(oo,d),a.dispatchEvent(b),b.defaultPrevented||Be(h??document.body,{select:!0}),a.removeEventListener(oo,d),mi.remove(v)},0)}}},[a,l,d,v]);const w=i.useCallback(h=>{if(!n&&!o||v.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,b=document.activeElement;if(g&&b){const y=h.currentTarget,[x,E]=Up(y);x&&E?!h.shiftKey&&b===E?(h.preventDefault(),n&&Be(x,{select:!0})):h.shiftKey&&b===x&&(h.preventDefault(),n&&Be(E,{select:!0})):b===y&&h.preventDefault()}},[n,o,v.paused]);return f.jsx(de.div,{tabIndex:-1,...c,ref:m,onKeyDown:w})});fi.displayName=Wp;function Bp(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Be(o,{select:t}),document.activeElement!==n)return}function Up(e){const t=pi(e),n=hi(t,e),o=hi(t.reverse(),e);return[n,o]}function pi(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function hi(e,t){for(const n of e)if(!Hp(n,{upTo:t}))return n}function Hp(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 zp(e){return e instanceof HTMLInputElement&&"select"in e}function Be(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&zp(e)&&t&&e.select()}}var mi=Vp();function Vp(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=vi(e,t),e.unshift(t)},remove(t){var n;e=vi(e,t),(n=e[0])==null||n.resume()}}}function vi(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Kp(e){return e.filter(t=>t.tagName!=="A")}const Gp=["top","right","bottom","left"],Ue=Math.min,pe=Math.max,Xt=Math.round,qt=Math.floor,Ce=e=>({x:e,y:e}),Yp={left:"right",right:"left",bottom:"top",top:"bottom"},Xp={start:"end",end:"start"};function ro(e,t,n){return pe(e,Ue(t,n))}function Ie(e,t){return typeof e=="function"?e(t):e}function De(e){return e.split("-")[0]}function ct(e){return e.split("-")[1]}function so(e){return e==="x"?"y":"x"}function io(e){return e==="y"?"height":"width"}function He(e){return["top","bottom"].includes(De(e))?"y":"x"}function ao(e){return so(He(e))}function qp(e,t,n){n===void 0&&(n=!1);const o=ct(e),r=ao(e),s=io(r);let c=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=Zt(c)),[c,Zt(c)]}function Zp(e){const t=Zt(e);return[co(e),t,co(t)]}function co(e){return e.replace(/start|end/g,t=>Xp[t])}function Qp(e,t,n){const o=["left","right"],r=["right","left"],s=["top","bottom"],c=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?s:c;default:return[]}}function Jp(e,t,n,o){const r=ct(e);let s=Qp(De(e),n==="start",o);return r&&(s=s.map(c=>c+"-"+r),t&&(s=s.concat(s.map(co)))),s}function Zt(e){return e.replace(/left|right|bottom|top/g,t=>Yp[t])}function eh(e){return{top:0,right:0,bottom:0,left:0,...e}}function gi(e){return typeof e!="number"?eh(e):{top:e,right:e,bottom:e,left:e}}function Qt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function wi(e,t,n){let{reference:o,floating:r}=e;const s=He(t),c=ao(t),a=io(c),u=De(t),l=s==="y",d=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,m=o[a]/2-r[a]/2;let v;switch(u){case"top":v={x:d,y:o.y-r.height};break;case"bottom":v={x:d,y:o.y+o.height};break;case"right":v={x:o.x+o.width,y:p};break;case"left":v={x:o.x-r.width,y:p};break;default:v={x:o.x,y:o.y}}switch(ct(t)){case"start":v[c]-=m*(n&&l?-1:1);break;case"end":v[c]+=m*(n&&l?-1:1);break}return v}const th=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:c}=n,a=s.filter(Boolean),u=await(c.isRTL==null?void 0:c.isRTL(t));let l=await c.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:p}=wi(l,o,u),m=o,v={},w=0;for(let h=0;h<a.length;h++){const{name:g,fn:b}=a[h],{x:y,y:x,data:E,reset:C}=await b({x:d,y:p,initialPlacement:o,placement:m,strategy:r,middlewareData:v,rects:l,platform:c,elements:{reference:e,floating:t}});d=y??d,p=x??p,v={...v,[g]:{...v[g],...E}},C&&w<=50&&(w++,typeof C=="object"&&(C.placement&&(m=C.placement),C.rects&&(l=C.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:r}):C.rects),{x:d,y:p}=wi(l,m,u)),h=-1)}return{x:d,y:p,placement:m,strategy:r,middlewareData:v}};async function yt(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:c,elements:a,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:m=!1,padding:v=0}=Ie(t,e),w=gi(v),g=a[m?p==="floating"?"reference":"floating":p],b=Qt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:u})),y=p==="floating"?{x:o,y:r,width:c.floating.width,height:c.floating.height}:c.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),E=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},C=Qt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:x,strategy:u}):y);return{top:(b.top-C.top+w.top)/E.y,bottom:(C.bottom-b.bottom+w.bottom)/E.y,left:(b.left-C.left+w.left)/E.x,right:(C.right-b.right+w.right)/E.x}}const nh=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:c,elements:a,middlewareData:u}=t,{element:l,padding:d=0}=Ie(e,t)||{};if(l==null)return{};const p=gi(d),m={x:n,y:o},v=ao(r),w=io(v),h=await c.getDimensions(l),g=v==="y",b=g?"top":"left",y=g?"bottom":"right",x=g?"clientHeight":"clientWidth",E=s.reference[w]+s.reference[v]-m[v]-s.floating[w],C=m[v]-s.reference[v],S=await(c.getOffsetParent==null?void 0:c.getOffsetParent(l));let k=S?S[x]:0;(!k||!await(c.isElement==null?void 0:c.isElement(S)))&&(k=a.floating[x]||s.floating[w]);const P=E/2-C/2,N=k/2-h[w]/2-1,M=Ue(p[b],N),$=Ue(p[y],N),I=M,W=k-h[w]-$,A=k/2-h[w]/2+P,U=ro(I,A,W),_=!u.arrow&&ct(r)!=null&&A!==U&&s.reference[w]/2-(A<I?M:$)-h[w]/2<0,B=_?A<I?A-I:A-W:0;return{[v]:m[v]+B,data:{[v]:U,centerOffset:A-U-B,..._&&{alignmentOffset:B}},reset:_}}}),oh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:c,initialPlacement:a,platform:u,elements:l}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:h=!0,...g}=Ie(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=De(r),y=He(a),x=De(a)===a,E=await(u.isRTL==null?void 0:u.isRTL(l.floating)),C=m||(x||!h?[Zt(a)]:Zp(a)),S=w!=="none";!m&&S&&C.push(...Jp(a,h,w,E));const k=[a,...C],P=await yt(t,g),N=[];let M=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&N.push(P[b]),p){const A=qp(r,c,E);N.push(P[A[0]],P[A[1]])}if(M=[...M,{placement:r,overflows:N}],!N.every(A=>A<=0)){var $,I;const A=((($=s.flip)==null?void 0:$.index)||0)+1,U=k[A];if(U)return{data:{index:A,overflows:M},reset:{placement:U}};let _=(I=M.filter(B=>B.overflows[0]<=0).sort((B,O)=>B.overflows[1]-O.overflows[1])[0])==null?void 0:I.placement;if(!_)switch(v){case"bestFit":{var W;const B=(W=M.filter(O=>{if(S){const j=He(O.placement);return j===y||j==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(j=>j>0).reduce((j,K)=>j+K,0)]).sort((O,j)=>O[1]-j[1])[0])==null?void 0:W[0];B&&(_=B);break}case"initialPlacement":_=a;break}if(r!==_)return{reset:{placement:_}}}return{}}}};function bi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function yi(e){return Gp.some(t=>e[t]>=0)}const rh=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=Ie(e,t);switch(o){case"referenceHidden":{const s=await yt(t,{...r,elementContext:"reference"}),c=bi(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:yi(c)}}}case"escaped":{const s=await yt(t,{...r,altBoundary:!0}),c=bi(s,n.floating);return{data:{escapedOffsets:c,escaped:yi(c)}}}default:return{}}}}};async function sh(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),c=De(n),a=ct(n),u=He(n)==="y",l=["left","top"].includes(c)?-1:1,d=s&&u?-1:1,p=Ie(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof w=="number"&&(v=a==="end"?w*-1:w),u?{x:v*d,y:m*l}:{x:m*l,y:v*d}}const ih=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:c,middlewareData:a}=t,u=await sh(t,e);return c===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:r+u.x,y:s+u.y,data:{...u,placement:c}}}}},ah=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:a={fn:g=>{let{x:b,y}=g;return{x:b,y}}},...u}=Ie(e,t),l={x:n,y:o},d=await yt(t,u),p=He(De(r)),m=so(p);let v=l[m],w=l[p];if(s){const g=m==="y"?"top":"left",b=m==="y"?"bottom":"right",y=v+d[g],x=v-d[b];v=ro(y,v,x)}if(c){const g=p==="y"?"top":"left",b=p==="y"?"bottom":"right",y=w+d[g],x=w-d[b];w=ro(y,w,x)}const h=a.fn({...t,[m]:v,[p]:w});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[m]:s,[p]:c}}}}}},ch=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:c}=t,{offset:a=0,mainAxis:u=!0,crossAxis:l=!0}=Ie(e,t),d={x:n,y:o},p=He(r),m=so(p);let v=d[m],w=d[p];const h=Ie(a,t),g=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const x=m==="y"?"height":"width",E=s.reference[m]-s.floating[x]+g.mainAxis,C=s.reference[m]+s.reference[x]-g.mainAxis;v<E?v=E:v>C&&(v=C)}if(l){var b,y;const x=m==="y"?"width":"height",E=["top","left"].includes(De(r)),C=s.reference[p]-s.floating[x]+(E&&((b=c.offset)==null?void 0:b[p])||0)+(E?0:g.crossAxis),S=s.reference[p]+s.reference[x]+(E?0:((y=c.offset)==null?void 0:y[p])||0)-(E?g.crossAxis:0);w<C?w=C:w>S&&(w=S)}return{[m]:v,[p]:w}}}},lh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:c,elements:a}=t,{apply:u=()=>{},...l}=Ie(e,t),d=await yt(t,l),p=De(r),m=ct(r),v=He(r)==="y",{width:w,height:h}=s.floating;let g,b;p==="top"||p==="bottom"?(g=p,b=m===(await(c.isRTL==null?void 0:c.isRTL(a.floating))?"start":"end")?"left":"right"):(b=p,g=m==="end"?"top":"bottom");const y=h-d.top-d.bottom,x=w-d.left-d.right,E=Ue(h-d[g],y),C=Ue(w-d[b],x),S=!t.middlewareData.shift;let k=E,P=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=x),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(k=y),S&&!m){const M=pe(d.left,0),$=pe(d.right,0),I=pe(d.top,0),W=pe(d.bottom,0);v?P=w-2*(M!==0||$!==0?M+$:pe(d.left,d.right)):k=h-2*(I!==0||W!==0?I+W:pe(d.top,d.bottom))}await u({...t,availableWidth:P,availableHeight:k});const N=await c.getDimensions(a.floating);return w!==N.width||h!==N.height?{reset:{rects:!0}}:{}}}};function Jt(){return typeof window<"u"}function lt(e){return xi(e)?(e.nodeName||"").toLowerCase():"#document"}function he(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Se(e){var t;return(t=(xi(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xi(e){return Jt()?e instanceof Node||e instanceof he(e).Node:!1}function ye(e){return Jt()?e instanceof Element||e instanceof he(e).Element:!1}function Pe(e){return Jt()?e instanceof HTMLElement||e instanceof he(e).HTMLElement:!1}function Ei(e){return!Jt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof he(e).ShadowRoot}function xt(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=xe(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function uh(e){return["table","td","th"].includes(lt(e))}function en(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function lo(e){const t=uo(),n=ye(e)?xe(e):e;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function dh(e){let t=ze(e);for(;Pe(t)&&!ut(t);){if(lo(t))return t;if(en(t))return null;t=ze(t)}return null}function uo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ut(e){return["html","body","#document"].includes(lt(e))}function xe(e){return he(e).getComputedStyle(e)}function tn(e){return ye(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ze(e){if(lt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ei(e)&&e.host||Se(e);return Ei(t)?t.host:t}function ki(e){const t=ze(e);return ut(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pe(t)&&xt(t)?t:ki(t)}function Et(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=ki(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),c=he(r);if(s){const a=fo(c);return t.concat(c,c.visualViewport||[],xt(r)?r:[],a&&n?Et(a):[])}return t.concat(r,Et(r,[],n))}function fo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ci(e){const t=xe(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Pe(e),s=r?e.offsetWidth:n,c=r?e.offsetHeight:o,a=Xt(n)!==s||Xt(o)!==c;return a&&(n=s,o=c),{width:n,height:o,$:a}}function po(e){return ye(e)?e:e.contextElement}function dt(e){const t=po(e);if(!Pe(t))return Ce(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=Ci(t);let c=(s?Xt(n.width):n.width)/o,a=(s?Xt(n.height):n.height)/r;return(!c||!Number.isFinite(c))&&(c=1),(!a||!Number.isFinite(a))&&(a=1),{x:c,y:a}}const fh=Ce(0);function Si(e){const t=he(e);return!uo()||!t.visualViewport?fh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ph(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==he(e)?!1:t}function qe(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=po(e);let c=Ce(1);t&&(o?ye(o)&&(c=dt(o)):c=dt(e));const a=ph(s,n,o)?Si(s):Ce(0);let u=(r.left+a.x)/c.x,l=(r.top+a.y)/c.y,d=r.width/c.x,p=r.height/c.y;if(s){const m=he(s),v=o&&ye(o)?he(o):o;let w=m,h=fo(w);for(;h&&o&&v!==w;){const g=dt(h),b=h.getBoundingClientRect(),y=xe(h),x=b.left+(h.clientLeft+parseFloat(y.paddingLeft))*g.x,E=b.top+(h.clientTop+parseFloat(y.paddingTop))*g.y;u*=g.x,l*=g.y,d*=g.x,p*=g.y,u+=x,l+=E,w=he(h),h=fo(w)}}return Qt({width:d,height:p,x:u,y:l})}function ho(e,t){const n=tn(e).scrollLeft;return t?t.left+n:qe(Se(e)).left+n}function Pi(e,t,n){n===void 0&&(n=!1);const o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-(n?0:ho(e,o)),s=o.top+t.scrollTop;return{x:r,y:s}}function hh(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",c=Se(o),a=t?en(t.floating):!1;if(o===c||a&&s)return n;let u={scrollLeft:0,scrollTop:0},l=Ce(1);const d=Ce(0),p=Pe(o);if((p||!p&&!s)&&((lt(o)!=="body"||xt(c))&&(u=tn(o)),Pe(o))){const v=qe(o);l=dt(o),d.x=v.x+o.clientLeft,d.y=v.y+o.clientTop}const m=c&&!p&&!s?Pi(c,u,!0):Ce(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+d.x+m.x,y:n.y*l.y-u.scrollTop*l.y+d.y+m.y}}function mh(e){return Array.from(e.getClientRects())}function vh(e){const t=Se(e),n=tn(e),o=e.ownerDocument.body,r=pe(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=pe(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let c=-n.scrollLeft+ho(e);const a=-n.scrollTop;return xe(o).direction==="rtl"&&(c+=pe(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:c,y:a}}function gh(e,t){const n=he(e),o=Se(e),r=n.visualViewport;let s=o.clientWidth,c=o.clientHeight,a=0,u=0;if(r){s=r.width,c=r.height;const l=uo();(!l||l&&t==="fixed")&&(a=r.offsetLeft,u=r.offsetTop)}return{width:s,height:c,x:a,y:u}}function wh(e,t){const n=qe(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=Pe(e)?dt(e):Ce(1),c=e.clientWidth*s.x,a=e.clientHeight*s.y,u=r*s.x,l=o*s.y;return{width:c,height:a,x:u,y:l}}function Ti(e,t,n){let o;if(t==="viewport")o=gh(e,n);else if(t==="document")o=vh(Se(e));else if(ye(t))o=wh(t,n);else{const r=Si(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Qt(o)}function Ni(e,t){const n=ze(e);return n===t||!ye(n)||ut(n)?!1:xe(n).position==="fixed"||Ni(n,t)}function bh(e,t){const n=t.get(e);if(n)return n;let o=Et(e,[],!1).filter(a=>ye(a)&&lt(a)!=="body"),r=null;const s=xe(e).position==="fixed";let c=s?ze(e):e;for(;ye(c)&&!ut(c);){const a=xe(c),u=lo(c);!u&&a.position==="fixed"&&(r=null),(s?!u&&!r:!u&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||xt(c)&&!u&&Ni(e,c))?o=o.filter(d=>d!==c):r=a,c=ze(c)}return t.set(e,o),o}function yh(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const c=[...n==="clippingAncestors"?en(t)?[]:bh(t,this._c):[].concat(n),o],a=c[0],u=c.reduce((l,d)=>{const p=Ti(t,d,r);return l.top=pe(p.top,l.top),l.right=Ue(p.right,l.right),l.bottom=Ue(p.bottom,l.bottom),l.left=pe(p.left,l.left),l},Ti(t,a,r));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function xh(e){const{width:t,height:n}=Ci(e);return{width:t,height:n}}function Eh(e,t,n){const o=Pe(t),r=Se(t),s=n==="fixed",c=qe(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const u=Ce(0);if(o||!o&&!s)if((lt(t)!=="body"||xt(r))&&(a=tn(t)),o){const m=qe(t,!0,s,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else r&&(u.x=ho(r));const l=r&&!o&&!s?Pi(r,a):Ce(0),d=c.left+a.scrollLeft-u.x-l.x,p=c.top+a.scrollTop-u.y-l.y;return{x:d,y:p,width:c.width,height:c.height}}function mo(e){return xe(e).position==="static"}function Ai(e,t){if(!Pe(e)||xe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Se(e)===n&&(n=n.ownerDocument.body),n}function ji(e,t){const n=he(e);if(en(e))return n;if(!Pe(e)){let r=ze(e);for(;r&&!ut(r);){if(ye(r)&&!mo(r))return r;r=ze(r)}return n}let o=Ai(e,t);for(;o&&uh(o)&&mo(o);)o=Ai(o,t);return o&&ut(o)&&mo(o)&&!lo(o)?n:o||dh(e)||n}const kh=async function(e){const t=this.getOffsetParent||ji,n=this.getDimensions,o=await n(e.floating);return{reference:Eh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ch(e){return xe(e).direction==="rtl"}const Sh={convertOffsetParentRelativeRectToViewportRelativeRect:hh,getDocumentElement:Se,getClippingRect:yh,getOffsetParent:ji,getElementRects:kh,getClientRects:mh,getDimensions:xh,getScale:dt,isElement:ye,isRTL:Ch};function Mi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ph(e,t){let n=null,o;const r=Se(e);function s(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function c(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),s();const l=e.getBoundingClientRect(),{left:d,top:p,width:m,height:v}=l;if(a||t(),!m||!v)return;const w=qt(p),h=qt(r.clientWidth-(d+m)),g=qt(r.clientHeight-(p+v)),b=qt(d),x={rootMargin:-w+"px "+-h+"px "+-g+"px "+-b+"px",threshold:pe(0,Ue(1,u))||1};let E=!0;function C(S){const k=S[0].intersectionRatio;if(k!==u){if(!E)return c();k?c(!1,k):o=setTimeout(()=>{c(!1,1e-7)},1e3)}k===1&&!Mi(l,e.getBoundingClientRect())&&c(),E=!1}try{n=new IntersectionObserver(C,{...x,root:r.ownerDocument})}catch{n=new IntersectionObserver(C,x)}n.observe(e)}return c(!0),s}function vo(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,l=po(e),d=r||s?[...l?Et(l):[],...Et(t)]:[];d.forEach(b=>{r&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const p=l&&a?Ph(l,n):null;let m=-1,v=null;c&&(v=new ResizeObserver(b=>{let[y]=b;y&&y.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=v)==null||x.observe(t)})),n()}),l&&!u&&v.observe(l),v.observe(t));let w,h=u?qe(e):null;u&&g();function g(){const b=qe(e);h&&!Mi(h,b)&&n(),h=b,w=requestAnimationFrame(g)}return n(),()=>{var b;d.forEach(y=>{r&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),p==null||p(),(b=v)==null||b.disconnect(),v=null,u&&cancelAnimationFrame(w)}}const Th=ih,Nh=ah,Ah=oh,jh=lh,Mh=rh,Oi=nh,Oh=ch,Ih=(e,t,n)=>{const o=new Map,r={platform:Sh,...n},s={...r.platform,_c:o};return th(e,t,{...r,platform:s})};var nn=typeof document<"u"?J.useLayoutEffect:J.useEffect;function on(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!on(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!on(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Ii(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Di(e,t){const n=Ii(e);return Math.round(t*n)/n}function go(e){const t=i.useRef(e);return nn(()=>{t.current=e}),t}function wo(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:c}={},transform:a=!0,whileElementsMounted:u,open:l}=e,[d,p]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=i.useState(o);on(m,o)||v(o);const[w,h]=i.useState(null),[g,b]=i.useState(null),y=i.useCallback(O=>{O!==S.current&&(S.current=O,h(O))},[]),x=i.useCallback(O=>{O!==k.current&&(k.current=O,b(O))},[]),E=s||w,C=c||g,S=i.useRef(null),k=i.useRef(null),P=i.useRef(d),N=u!=null,M=go(u),$=go(r),I=go(l),W=i.useCallback(()=>{if(!S.current||!k.current)return;const O={placement:t,strategy:n,middleware:m};$.current&&(O.platform=$.current),Ih(S.current,k.current,O).then(j=>{const K={...j,isPositioned:I.current!==!1};A.current&&!on(P.current,K)&&(P.current=K,Ae.flushSync(()=>{p(K)}))})},[m,t,n,$,I]);nn(()=>{l===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(O=>({...O,isPositioned:!1})))},[l]);const A=i.useRef(!1);nn(()=>(A.current=!0,()=>{A.current=!1}),[]),nn(()=>{if(E&&(S.current=E),C&&(k.current=C),E&&C){if(M.current)return M.current(E,C,W);W()}},[E,C,W,M,N]);const U=i.useMemo(()=>({reference:S,floating:k,setReference:y,setFloating:x}),[y,x]),_=i.useMemo(()=>({reference:E,floating:C}),[E,C]),B=i.useMemo(()=>{const O={position:n,left:0,top:0};if(!_.floating)return O;const j=Di(_.floating,d.x),K=Di(_.floating,d.y);return a?{...O,transform:"translate("+j+"px, "+K+"px)",...Ii(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:K}},[n,a,_.floating,d.x,d.y]);return i.useMemo(()=>({...d,update:W,refs:U,elements:_,floatingStyles:B}),[d,W,U,_,B])}const Dh=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Oi({element:o.current,padding:r}).fn(n):{}:o?Oi({element:o,padding:r}).fn(n):{}}}},bo=(e,t)=>({...Th(e),options:[e,t]}),yo=(e,t)=>({...Nh(e),options:[e,t]}),xo=(e,t)=>({...Oh(e),options:[e,t]}),Eo=(e,t)=>({...Ah(e),options:[e,t]}),ko=(e,t)=>({...jh(e),options:[e,t]}),Co=(e,t)=>({...Mh(e),options:[e,t]}),So=(e,t)=>({...Dh(e),options:[e,t]});var _h="Arrow",_i=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return f.jsx(de.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});_i.displayName=_h;var Lh=_i;function rn(e){const[t,n]=i.useState(void 0);return Y(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let c,a;if("borderBoxSize"in s){const u=s.borderBoxSize,l=Array.isArray(u)?u[0]:u;c=l.inlineSize,a=l.blockSize}else c=e.offsetWidth,a=e.offsetHeight;n({width:c,height:a})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var Po="Popper",[Li,Ri]=ce(Po),[Rh,$i]=Li(Po),Fi=e=>{const{__scopePopper:t,children:n}=e,[o,r]=i.useState(null);return f.jsx(Rh,{scope:t,anchor:o,onAnchorChange:r,children:n})};Fi.displayName=Po;var Wi="PopperAnchor",Bi=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=$i(Wi,n),c=i.useRef(null),a=L(t,c);return i.useEffect(()=>{s.onAnchorChange((o==null?void 0:o.current)||c.current)}),o?null:f.jsx(de.div,{...r,ref:a})});Bi.displayName=Wi;var To="PopperContent",[$h,Fh]=Li(To),Ui=i.forwardRef((e,t)=>{var F,X,Q,G,q,Z;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:c=0,arrowPadding:a=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:w,...h}=e,g=$i(To,n),[b,y]=i.useState(null),x=L(t,te=>y(te)),[E,C]=i.useState(null),S=rn(E),k=(S==null?void 0:S.width)??0,P=(S==null?void 0:S.height)??0,N=o+(s!=="center"?"-"+s:""),M=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},$=Array.isArray(l)?l:[l],I=$.length>0,W={padding:M,boundary:$.filter(Bh),altBoundary:I},{refs:A,floatingStyles:U,placement:_,isPositioned:B,middlewareData:O}=wo({strategy:"fixed",placement:N,whileElementsMounted:(...te)=>vo(...te,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[bo({mainAxis:r+P,alignmentAxis:c}),u&&yo({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?xo():void 0,...W}),u&&Eo({...W}),ko({...W,apply:({elements:te,rects:ue,availableWidth:_e,availableHeight:Le})=>{const{width:Re,height:_t}=ue.reference,fe=te.floating.style;fe.setProperty("--radix-popper-available-width",`${_e}px`),fe.setProperty("--radix-popper-available-height",`${Le}px`),fe.setProperty("--radix-popper-anchor-width",`${Re}px`),fe.setProperty("--radix-popper-anchor-height",`${_t}px`)}}),E&&So({element:E,padding:a}),Uh({arrowWidth:k,arrowHeight:P}),m&&Co({strategy:"referenceHidden",...W})]}),[j,K]=Vi(_),H=V(w);Y(()=>{B&&(H==null||H())},[B,H]);const oe=(F=O.arrow)==null?void 0:F.x,ie=(X=O.arrow)==null?void 0:X.y,se=((Q=O.arrow)==null?void 0:Q.centerOffset)!==0,[me,ae]=i.useState();return Y(()=>{b&&ae(window.getComputedStyle(b).zIndex)},[b]),f.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:B?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[(G=O.transformOrigin)==null?void 0:G.x,(q=O.transformOrigin)==null?void 0:q.y].join(" "),...((Z=O.hide)==null?void 0:Z.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx($h,{scope:n,placedSide:j,onArrowChange:C,arrowX:oe,arrowY:ie,shouldHideArrow:se,children:f.jsx(de.div,{"data-side":j,"data-align":K,...h,ref:x,style:{...h.style,animation:B?void 0:"none"}})})})});Ui.displayName=To;var Hi="PopperArrow",Wh={top:"bottom",right:"left",bottom:"top",left:"right"},zi=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=Fh(Hi,o),c=Wh[s.placedSide];return f.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:f.jsx(Lh,{...r,ref:n,style:{...r.style,display:"block"}})})});zi.displayName=Hi;function Bh(e){return e!==null}var Uh=e=>({name:"transformOrigin",options:e,fn(t){var g,b,y;const{placement:n,rects:o,middlewareData:r}=t,c=((g=r.arrow)==null?void 0:g.centerOffset)!==0,a=c?0:e.arrowWidth,u=c?0:e.arrowHeight,[l,d]=Vi(n),p={start:"0%",center:"50%",end:"100%"}[d],m=(((b=r.arrow)==null?void 0:b.x)??0)+a/2,v=(((y=r.arrow)==null?void 0:y.y)??0)+u/2;let w="",h="";return l==="bottom"?(w=c?p:`${m}px`,h=`${-u}px`):l==="top"?(w=c?p:`${m}px`,h=`${o.floating.height+u}px`):l==="right"?(w=`${-u}px`,h=c?p:`${v}px`):l==="left"&&(w=`${o.floating.width+u}px`,h=c?p:`${v}px`),{data:{x:w,y:h}}}});function Vi(e){const[t,n="center"]=e.split("-");return[t,n]}var Ki=Fi,Hh=Bi,zh=Ui,Vh=zi,Kh="Portal",Gi=i.forwardRef((e,t)=>{var a;const{container:n,...o}=e,[r,s]=i.useState(!1);Y(()=>s(!0),[]);const c=n||r&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return c?mt.createPortal(f.jsx(de.div,{...o,ref:t}),c):null});Gi.displayName=Kh;function Gh(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var kt=e=>{const{present:t,children:n}=e,o=Yh(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=L(o.ref,Xh(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};kt.displayName="Presence";function Yh(e){const[t,n]=i.useState(),o=i.useRef({}),r=i.useRef(e),s=i.useRef("none"),c=e?"mounted":"unmounted",[a,u]=Gh(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const l=sn(o.current);s.current=a==="mounted"?l:"none"},[a]),Y(()=>{const l=o.current,d=r.current;if(d!==e){const m=s.current,v=sn(l);e?u("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),Y(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,p=v=>{const h=sn(o.current).includes(v.animationName);if(v.target===t&&h&&(u("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(s.current=sn(o.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:i.useCallback(l=>{l&&(o.current=getComputedStyle(l)),n(l)},[])}}function sn(e){return(e==null?void 0:e.animationName)||"none"}function Xh(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var No="rovingFocusGroup.onEntryFocus",qh={bubbles:!1,cancelable:!0},an="RovingFocusGroup",[Ao,Yi,Zh]=ri(an),[Qh,Xi]=ce(an,[Zh]),[Jh,em]=Qh(an),qi=i.forwardRef((e,t)=>f.jsx(Ao.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx(Ao.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(tm,{...e,ref:t})})}));qi.displayName=an;var tm=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:c,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:d=!1,...p}=e,m=i.useRef(null),v=L(t,m),w=Yt(s),[h=null,g]=Me({prop:c,defaultProp:a,onChange:u}),[b,y]=i.useState(!1),x=V(l),E=Yi(n),C=i.useRef(!1),[S,k]=i.useState(0);return i.useEffect(()=>{const P=m.current;if(P)return P.addEventListener(No,x),()=>P.removeEventListener(No,x)},[x]),f.jsx(Jh,{scope:n,orientation:o,dir:w,loop:r,currentTabStopId:h,onItemFocus:i.useCallback(P=>g(P),[g]),onItemShiftTab:i.useCallback(()=>y(!0),[]),onFocusableItemAdd:i.useCallback(()=>k(P=>P+1),[]),onFocusableItemRemove:i.useCallback(()=>k(P=>P-1),[]),children:f.jsx(de.div,{tabIndex:b||S===0?-1:0,"data-orientation":o,...p,ref:v,style:{outline:"none",...e.style},onMouseDown:T(e.onMouseDown,()=>{C.current=!0}),onFocus:T(e.onFocus,P=>{const N=!C.current;if(P.target===P.currentTarget&&N&&!b){const M=new CustomEvent(No,qh);if(P.currentTarget.dispatchEvent(M),!M.defaultPrevented){const $=E().filter(_=>_.focusable),I=$.find(_=>_.active),W=$.find(_=>_.id===h),U=[I,W,...$].filter(Boolean).map(_=>_.ref.current);Ji(U,d)}}C.current=!1}),onBlur:T(e.onBlur,()=>y(!1))})})}),Zi="RovingFocusGroupItem",Qi=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,...c}=e,a=ve(),u=s||a,l=em(Zi,n),d=l.currentTabStopId===u,p=Yi(n),{onFocusableItemAdd:m,onFocusableItemRemove:v}=l;return i.useEffect(()=>{if(o)return m(),()=>v()},[o,m,v]),f.jsx(Ao.ItemSlot,{scope:n,id:u,focusable:o,active:r,children:f.jsx(de.span,{tabIndex:d?0:-1,"data-orientation":l.orientation,...c,ref:t,onMouseDown:T(e.onMouseDown,w=>{o?l.onItemFocus(u):w.preventDefault()}),onFocus:T(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:T(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){l.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const h=rm(w,l.orientation,l.dir);if(h!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let b=p().filter(y=>y.focusable).map(y=>y.ref.current);if(h==="last")b.reverse();else if(h==="prev"||h==="next"){h==="prev"&&b.reverse();const y=b.indexOf(w.currentTarget);b=l.loop?sm(b,y+1):b.slice(y+1)}setTimeout(()=>Ji(b))}})})})});Qi.displayName=Zi;var nm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function om(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function rm(e,t,n){const o=om(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return nm[o]}function Ji(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function sm(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var im=qi,am=Qi,jo=["Enter"," "],cm=["ArrowDown","PageUp","Home"],ea=["ArrowUp","PageDown","End"],lm=[...cm,...ea],um={ltr:[...jo,"ArrowRight"],rtl:[...jo,"ArrowLeft"]},dm={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ct="Menu",[St,fm,pm]=ri(Ct),[Ze,ta]=ce(Ct,[pm,Ri,Xi]),Pt=Ri(),na=Xi(),[oa,Ve]=Ze(Ct),[hm,Tt]=Ze(Ct),ra=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:c=!0}=e,a=Pt(t),[u,l]=i.useState(null),d=i.useRef(!1),p=V(s),m=Yt(r);return i.useEffect(()=>{const v=()=>{d.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>d.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),f.jsx(Ki,{...a,children:f.jsx(oa,{scope:t,open:n,onOpenChange:p,content:u,onContentChange:l,children:f.jsx(hm,{scope:t,onClose:i.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:d,dir:m,modal:c,children:o})})})};ra.displayName=Ct;var mm="MenuAnchor",Mo=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Pt(n);return f.jsx(Hh,{...r,...o,ref:t})});Mo.displayName=mm;var Oo="MenuPortal",[vm,sa]=Ze(Oo,{forceMount:void 0}),ia=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=Ve(Oo,t);return f.jsx(vm,{scope:t,forceMount:n,children:f.jsx(kt,{present:n||s.open,children:f.jsx(Gi,{asChild:!0,container:r,children:o})})})};ia.displayName=Oo;var ge="MenuContent",[gm,Io]=Ze(ge),aa=i.forwardRef((e,t)=>{const n=sa(ge,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=Ve(ge,e.__scopeMenu),c=Tt(ge,e.__scopeMenu);return f.jsx(St.Provider,{scope:e.__scopeMenu,children:f.jsx(kt,{present:o||s.open,children:f.jsx(St.Slot,{scope:e.__scopeMenu,children:c.modal?f.jsx(wm,{...r,ref:t}):f.jsx(bm,{...r,ref:t})})})})}),wm=i.forwardRef((e,t)=>{const n=Ve(ge,e.__scopeMenu),o=i.useRef(null),r=L(t,o);return i.useEffect(()=>{const s=o.current;if(s)return Xn(s)},[]),f.jsx(Do,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:T(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),bm=i.forwardRef((e,t)=>{const n=Ve(ge,e.__scopeMenu);return f.jsx(Do,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Do=i.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:a,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:m,onDismiss:v,disableOutsideScroll:w,...h}=e,g=Ve(ge,n),b=Tt(ge,n),y=Pt(n),x=na(n),E=fm(n),[C,S]=i.useState(null),k=i.useRef(null),P=L(t,k,g.onContentChange),N=i.useRef(0),M=i.useRef(""),$=i.useRef(0),I=i.useRef(null),W=i.useRef("right"),A=i.useRef(0),U=w?zt:i.Fragment,_=w?{as:ne,allowPinchZoom:!0}:void 0,B=j=>{var F,X;const K=M.current+j,H=E().filter(Q=>!Q.disabled),oe=document.activeElement,ie=(F=H.find(Q=>Q.ref.current===oe))==null?void 0:F.textValue,se=H.map(Q=>Q.textValue),me=Mm(se,K,ie),ae=(X=H.find(Q=>Q.textValue===me))==null?void 0:X.ref.current;(function Q(G){M.current=G,window.clearTimeout(N.current),G!==""&&(N.current=window.setTimeout(()=>Q(""),1e3))})(K),ae&&setTimeout(()=>ae.focus())};i.useEffect(()=>()=>window.clearTimeout(N.current),[]),Hn();const O=i.useCallback(j=>{var H,oe;return W.current===((H=I.current)==null?void 0:H.side)&&Im(j,(oe=I.current)==null?void 0:oe.area)},[]);return f.jsx(gm,{scope:n,searchRef:M,onItemEnter:i.useCallback(j=>{O(j)&&j.preventDefault()},[O]),onItemLeave:i.useCallback(j=>{var K;O(j)||((K=k.current)==null||K.focus(),S(null))},[O]),onTriggerLeave:i.useCallback(j=>{O(j)&&j.preventDefault()},[O]),pointerGraceTimerRef:$,onPointerGraceIntentChange:i.useCallback(j=>{I.current=j},[]),children:f.jsx(U,{..._,children:f.jsx(fi,{asChild:!0,trapped:r,onMountAutoFocus:T(s,j=>{var K;j.preventDefault(),(K=k.current)==null||K.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:f.jsx(ci,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:m,onDismiss:v,children:f.jsx(im,{asChild:!0,...x,dir:b.dir,orientation:"vertical",loop:o,currentTabStopId:C,onCurrentTabStopIdChange:S,onEntryFocus:T(u,j=>{b.isUsingKeyboardRef.current||j.preventDefault()}),preventScrollOnEntryFocus:!0,children:f.jsx(zh,{role:"menu","aria-orientation":"vertical","data-state":Sa(g.open),"data-radix-menu-content":"",dir:b.dir,...y,...h,ref:P,style:{outline:"none",...h.style},onKeyDown:T(h.onKeyDown,j=>{const H=j.target.closest("[data-radix-menu-content]")===j.currentTarget,oe=j.ctrlKey||j.altKey||j.metaKey,ie=j.key.length===1;H&&(j.key==="Tab"&&j.preventDefault(),!oe&&ie&&B(j.key));const se=k.current;if(j.target!==se||!lm.includes(j.key))return;j.preventDefault();const ae=E().filter(F=>!F.disabled).map(F=>F.ref.current);ea.includes(j.key)&&ae.reverse(),Am(ae)}),onBlur:T(e.onBlur,j=>{j.currentTarget.contains(j.target)||(window.clearTimeout(N.current),M.current="")}),onPointerMove:T(e.onPointerMove,At(j=>{const K=j.target,H=A.current!==j.clientX;if(j.currentTarget.contains(K)&&H){const oe=j.clientX>A.current?"right":"left";W.current=oe,A.current=j.clientX}}))})})})})})})});aa.displayName=ge;var ym="MenuGroup",_o=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return f.jsx(de.div,{role:"group",...o,ref:t})});_o.displayName=ym;var xm="MenuLabel",ca=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return f.jsx(de.div,{...o,ref:t})});ca.displayName=xm;var cn="MenuItem",la="menu.itemSelect",ln=i.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=i.useRef(null),c=Tt(cn,e.__scopeMenu),a=Io(cn,e.__scopeMenu),u=L(t,s),l=i.useRef(!1),d=()=>{const p=s.current;if(!n&&p){const m=new CustomEvent(la,{bubbles:!0,cancelable:!0});p.addEventListener(la,v=>o==null?void 0:o(v),{once:!0}),oi(p,m),m.defaultPrevented?l.current=!1:c.onClose()}};return f.jsx(ua,{...r,ref:u,disabled:n,onClick:T(e.onClick,d),onPointerDown:p=>{var m;(m=e.onPointerDown)==null||m.call(e,p),l.current=!0},onPointerUp:T(e.onPointerUp,p=>{var m;l.current||(m=p.currentTarget)==null||m.click()}),onKeyDown:T(e.onKeyDown,p=>{const m=a.searchRef.current!=="";n||m&&p.key===" "||jo.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});ln.displayName=cn;var ua=i.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,c=Io(cn,n),a=na(n),u=i.useRef(null),l=L(t,u),[d,p]=i.useState(!1),[m,v]=i.useState("");return i.useEffect(()=>{const w=u.current;w&&v((w.textContent??"").trim())},[s.children]),f.jsx(St.ItemSlot,{scope:n,disabled:o,textValue:r??m,children:f.jsx(am,{asChild:!0,...a,focusable:!o,children:f.jsx(de.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:l,onPointerMove:T(e.onPointerMove,At(w=>{o?c.onItemLeave(w):(c.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:T(e.onPointerLeave,At(w=>c.onItemLeave(w))),onFocus:T(e.onFocus,()=>p(!0)),onBlur:T(e.onBlur,()=>p(!1))})})})}),Em="MenuCheckboxItem",da=i.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return f.jsx(va,{scope:e.__scopeMenu,checked:n,children:f.jsx(ln,{role:"menuitemcheckbox","aria-checked":un(n)?"mixed":n,...r,ref:t,"data-state":$o(n),onSelect:T(r.onSelect,()=>o==null?void 0:o(un(n)?!0:!n),{checkForDefaultPrevented:!1})})})});da.displayName=Em;var fa="MenuRadioGroup",[km,Cm]=Ze(fa,{value:void 0,onValueChange:()=>{}}),pa=i.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=V(o);return f.jsx(km,{scope:e.__scopeMenu,value:n,onValueChange:s,children:f.jsx(_o,{...r,ref:t})})});pa.displayName=fa;var ha="MenuRadioItem",ma=i.forwardRef((e,t)=>{const{value:n,...o}=e,r=Cm(ha,e.__scopeMenu),s=n===r.value;return f.jsx(va,{scope:e.__scopeMenu,checked:s,children:f.jsx(ln,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":$o(s),onSelect:T(o.onSelect,()=>{var c;return(c=r.onValueChange)==null?void 0:c.call(r,n)},{checkForDefaultPrevented:!1})})})});ma.displayName=ha;var Lo="MenuItemIndicator",[va,Sm]=Ze(Lo,{checked:!1}),ga=i.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=Sm(Lo,n);return f.jsx(kt,{present:o||un(s.checked)||s.checked===!0,children:f.jsx(de.span,{...r,ref:t,"data-state":$o(s.checked)})})});ga.displayName=Lo;var Pm="MenuSeparator",wa=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return f.jsx(de.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});wa.displayName=Pm;var Tm="MenuArrow",ba=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Pt(n);return f.jsx(Vh,{...r,...o,ref:t})});ba.displayName=Tm;var Ro="MenuSub",[Nm,ya]=Ze(Ro),xa=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:r}=e,s=Ve(Ro,t),c=Pt(t),[a,u]=i.useState(null),[l,d]=i.useState(null),p=V(r);return i.useEffect(()=>(s.open===!1&&p(!1),()=>p(!1)),[s.open,p]),f.jsx(Ki,{...c,children:f.jsx(oa,{scope:t,open:o,onOpenChange:p,content:l,onContentChange:d,children:f.jsx(Nm,{scope:t,contentId:ve(),triggerId:ve(),trigger:a,onTriggerChange:u,children:n})})})};xa.displayName=Ro;var Nt="MenuSubTrigger",Ea=i.forwardRef((e,t)=>{const n=Ve(Nt,e.__scopeMenu),o=Tt(Nt,e.__scopeMenu),r=ya(Nt,e.__scopeMenu),s=Io(Nt,e.__scopeMenu),c=i.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:u}=s,l={__scopeMenu:e.__scopeMenu},d=i.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return i.useEffect(()=>d,[d]),i.useEffect(()=>{const p=a.current;return()=>{window.clearTimeout(p),u(null)}},[a,u]),f.jsx(Mo,{asChild:!0,...l,children:f.jsx(ua,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":Sa(n.open),...e,ref:Lt(t,r.onTriggerChange),onClick:p=>{var m;(m=e.onClick)==null||m.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:T(e.onPointerMove,At(p=>{s.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(s.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:T(e.onPointerLeave,At(p=>{var v,w;d();const m=(v=n.content)==null?void 0:v.getBoundingClientRect();if(m){const h=(w=n.content)==null?void 0:w.dataset.side,g=h==="right",b=g?-5:5,y=m[g?"left":"right"],x=m[g?"right":"left"];s.onPointerGraceIntentChange({area:[{x:p.clientX+b,y:p.clientY},{x:y,y:m.top},{x,y:m.top},{x,y:m.bottom},{x:y,y:m.bottom}],side:h}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(p),p.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:T(e.onKeyDown,p=>{var v;const m=s.searchRef.current!=="";e.disabled||m&&p.key===" "||um[o.dir].includes(p.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),p.preventDefault())})})})});Ea.displayName=Nt;var ka="MenuSubContent",Ca=i.forwardRef((e,t)=>{const n=sa(ge,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=Ve(ge,e.__scopeMenu),c=Tt(ge,e.__scopeMenu),a=ya(ka,e.__scopeMenu),u=i.useRef(null),l=L(t,u);return f.jsx(St.Provider,{scope:e.__scopeMenu,children:f.jsx(kt,{present:o||s.open,children:f.jsx(St.Slot,{scope:e.__scopeMenu,children:f.jsx(Do,{id:a.contentId,"aria-labelledby":a.triggerId,...r,ref:l,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var p;c.isUsingKeyboardRef.current&&((p=u.current)==null||p.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:T(e.onFocusOutside,d=>{d.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:T(e.onEscapeKeyDown,d=>{c.onClose(),d.preventDefault()}),onKeyDown:T(e.onKeyDown,d=>{var v;const p=d.currentTarget.contains(d.target),m=dm[c.dir].includes(d.key);p&&m&&(s.onOpenChange(!1),(v=a.trigger)==null||v.focus(),d.preventDefault())})})})})})});Ca.displayName=ka;function Sa(e){return e?"open":"closed"}function un(e){return e==="indeterminate"}function $o(e){return un(e)?"indeterminate":e?"checked":"unchecked"}function Am(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function jm(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Mm(e,t,n){const r=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let c=jm(e,Math.max(s,0));r.length===1&&(c=c.filter(l=>l!==n));const u=c.find(l=>l.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function Om(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const a=t[s].x,u=t[s].y,l=t[c].x,d=t[c].y;u>o!=d>o&&n<(l-a)*(o-u)/(d-u)+a&&(r=!r)}return r}function Im(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Om(n,t)}function At(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Dm=ra,_m=Mo,Lm=ia,Rm=aa,$m=_o,Fm=ca,Wm=ln,Bm=da,Um=pa,Hm=ma,zm=ga,Vm=wa,Km=ba,Gm=xa,Ym=Ea,Xm=Ca,Fo="DropdownMenu",[qm,Qb]=ce(Fo,[ta]),le=ta(),[Zm,Pa]=qm(Fo),Ta=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:c,modal:a=!0}=e,u=le(t),l=i.useRef(null),[d=!1,p]=Me({prop:r,defaultProp:s,onChange:c});return f.jsx(Zm,{scope:t,triggerId:ve(),triggerRef:l,contentId:ve(),open:d,onOpenChange:p,onOpenToggle:i.useCallback(()=>p(m=>!m),[p]),modal:a,children:f.jsx(Dm,{...u,open:d,onOpenChange:p,dir:o,modal:a,children:n})})};Ta.displayName=Fo;var Na="DropdownMenuTrigger",Aa=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=Pa(Na,n),c=le(n);return f.jsx(_m,{asChild:!0,...c,children:f.jsx(de.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:Lt(t,s.triggerRef),onPointerDown:T(e.onPointerDown,a=>{!o&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:T(e.onKeyDown,a=>{o||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});Aa.displayName=Na;var Qm="DropdownMenuPortal",ja=e=>{const{__scopeDropdownMenu:t,...n}=e,o=le(t);return f.jsx(Lm,{...o,...n})};ja.displayName=Qm;var Ma="DropdownMenuContent",Oa=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Pa(Ma,n),s=le(n),c=i.useRef(!1);return f.jsx(Rm,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:T(e.onCloseAutoFocus,a=>{var u;c.current||(u=r.triggerRef.current)==null||u.focus(),c.current=!1,a.preventDefault()}),onInteractOutside:T(e.onInteractOutside,a=>{const u=a.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,d=u.button===2||l;(!r.modal||d)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Oa.displayName=Ma;var Jm="DropdownMenuGroup",Ia=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=le(n);return f.jsx($m,{...r,...o,ref:t})});Ia.displayName=Jm;var ev="DropdownMenuLabel",Da=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=le(n);return f.jsx(Fm,{...r,...o,ref:t})});Da.displayName=ev;var tv="DropdownMenuItem",_a=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=le(n);return f.jsx(Wm,{...r,...o,ref:t})});_a.displayName=tv;var nv="DropdownMenuCheckboxItem",La=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=le(n);return f.jsx(Bm,{...r,...o,ref:t})});La.displayName=nv;var ov="DropdownMenuRadioGroup",Ra=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=le(n);return f.jsx(Um,{...r,...o,ref:t})});Ra.displayName=ov;var rv="DropdownMenuRadioItem",$a=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=le(n);return f.jsx(Hm,{...r,...o,ref:t})});$a.displayName=rv;var sv="DropdownMenuItemIndicator",Fa=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=le(n);return f.jsx(zm,{...r,...o,ref:t})});Fa.displayName=sv;var iv="DropdownMenuSeparator",Wa=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=le(n);return f.jsx(Vm,{...r,...o,ref:t})});Wa.displayName=iv;var av="DropdownMenuArrow",cv=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=le(n);return f.jsx(Km,{...r,...o,ref:t})});cv.displayName=av;var lv=e=>{const{__scopeDropdownMenu:t,children:n,open:o,onOpenChange:r,defaultOpen:s}=e,c=le(t),[a=!1,u]=Me({prop:o,defaultProp:s,onChange:r});return f.jsx(Gm,{...c,open:a,onOpenChange:u,children:n})},uv="DropdownMenuSubTrigger",Ba=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=le(n);return f.jsx(Ym,{...r,...o,ref:t})});Ba.displayName=uv;var dv="DropdownMenuSubContent",Ua=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=le(n);return f.jsx(Xm,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ua.displayName=dv;var fv=Ta,pv=Aa,Ha=ja,za=Oa,Va=Ia,Ka=Da,Ga=_a,Ya=La,hv=Ra,Xa=$a,qa=Fa,Za=Wa,mv=lv,Qa=Ba,Ja=Ua;const vv=fv,gv=pv,ec=i.forwardRef(({className:e,...t},n)=>f.jsx(Va,{ref:n,className:R("ksjsui-flex ksjsui-flex-col ksjsui-gap-y-2",e),...t}));ec.displayName=Va.displayName;const wv=Ha,bv=mv,yv=hv,tc=i.forwardRef(({className:e,inset:t,children:n,...o},r)=>f.jsxs(Qa,{ref:r,className:R(["ksjsui-group ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-start ksjsui-gap-2 ksjsui-rounded-sm ksjsui-border-0 ksjsui-px-2 ksjsui-py-1 ksjsui-text-base ksjsui-outline-none ksjsui-transition-colors","focus:ksjsui-bg-neutral focus:ksjsui-text-neutral-foreground","data-[disabled]:ksjsui-opacity-50","data-[state=open]:ksjsui-bg-neutral data-[state=open]:ksjsui-text-neutral-foreground","[&_svg]:ksjsui-pointer-events-none [&_svg]:ksjsui-shrink-0","[&_>_svg]:ksjsui-size-6","forced-colors:ksjsui-outline-0 forced-colors:ksjsui-transition-none","forced-colors:focus:ksjsui-bg-highlight forced-colors:focus:ksjsui-text-highlight-text forced-colors:focus:ksjsui-forced-color-adjust-none"],t&&"ksjsui-ps-8",e),...o,children:[n,f.jsxs("span",{className:R(["-ksjsui-me-2 ksjsui-ms-auto ksjsui-mt-1 ksjsui-text-label","[&_svg]:ksjsui-size-4","group-focus:forced-colors:ksjsui-text-current"]),children:[f.jsx(Xs,{className:"rtl:ksjsui-hidden"}),f.jsx(Ys,{className:"ltr:ksjsui-hidden"})]})]}));tc.displayName=Qa.displayName;const nc=i.forwardRef(({className:e,...t},n)=>f.jsx(Ja,{ref:n,className:R(["ksjsui-z-50 ksjsui-flex ksjsui-min-w-32 ksjsui-flex-col ksjsui-gap-y-2 ksjsui-overflow-hidden ksjsui-rounded-lg ksjsui-bg-popover ksjsui-px-2 ksjsui-py-4 ksjsui-text-popover-foreground ksjsui-shadow-lg","data-[state=open]:ksjsui-animate-in data-[state=open]:ksjsui-fade-in-0 data-[state=open]:ksjsui-zoom-in-95","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-0 data-[state=closed]:ksjsui-zoom-out-95","data-[side=top]:ksjsui-slide-in-from-bottom-2","data-[side=right]:ksjsui-slide-in-from-left-2","data-[side=bottom]:ksjsui-slide-in-from-top-2","data-[side=left]:ksjsui-slide-in-from-right-2","forced-colors:ksjsui-border"],e),...t}));nc.displayName=Ja.displayName;const oc=i.forwardRef(({className:e,align:t="start",side:n="bottom",sideOffset:o=4,...r},s)=>f.jsx(Ha,{children:f.jsx(za,{ref:s,align:t,side:n,sideOffset:o,className:R(["ksjsui-z-50 ksjsui-flex ksjsui-min-w-32 ksjsui-flex-col ksjsui-gap-y-2 ksjsui-overflow-hidden ksjsui-rounded-lg ksjsui-bg-popover ksjsui-px-2 ksjsui-py-4 ksjsui-text-popover-foreground ksjsui-shadow-md","data-[state=open]:ksjsui-animate-in data-[state=open]:ksjsui-fade-in-0 data-[state=open]:ksjsui-zoom-in-95","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-0 data-[state=closed]:ksjsui-zoom-out-95","data-[side=top]:ksjsui-slide-in-from-bottom-2","data-[side=right]:ksjsui-slide-in-from-left-2","data-[side=bottom]:ksjsui-slide-in-from-top-2","data-[side=left]:ksjsui-slide-in-from-right-2","forced-colors:ksjsui-border"],e),...r})}));oc.displayName=za.displayName;const rc=i.forwardRef(({className:e,inset:t,...n},o)=>f.jsx(Ga,{ref:o,className:R(["ksjsui-group ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-start ksjsui-gap-2 ksjsui-rounded-sm ksjsui-border-0 ksjsui-px-2 ksjsui-py-1 ksjsui-text-base ksjsui-outline-none ksjsui-transition-colors","focus:ksjsui-bg-neutral focus:ksjsui-text-neutral-foreground","hover:ksjsui-bg-neutral hover:ksjsui-text-neutral-foreground","data-[disabled]:ksjsui-pointer-events-none data-[disabled]:ksjsui-opacity-50","[&_svg]:ksjsui-pointer-events-none [&_svg]:ksjsui-size-6 [&_svg]:ksjsui-shrink-0","forced-colors:ksjsui-outline-0 forced-colors:ksjsui-transition-none","forced-colors:hover:ksjsui-bg-highlight forced-colors:hover:ksjsui-text-highlight-text forced-colors:hover:ksjsui-forced-color-adjust-none","forced-colors:focus:ksjsui-bg-highlight forced-colors:focus:ksjsui-text-highlight-text forced-colors:focus:ksjsui-forced-color-adjust-none"],t&&"ksjsui-ps-10",e),...n}));rc.displayName=Ga.displayName;const sc=i.forwardRef(({className:e,children:t,checked:n,...o},r)=>f.jsxs(Ya,{ref:r,className:R(["ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-start ksjsui-justify-between ksjsui-gap-2 ksjsui-rounded-sm ksjsui-border-0 ksjsui-px-2 ksjsui-py-1 ksjsui-text-base ksjsui-outline-none ksjsui-transition-colors","focus:ksjsui-bg-neutral focus:ksjsui-text-neutral-foreground","hover:ksjsui-bg-neutral hover:ksjsui-text-neutral-foreground","data-[disabled]:ksjsui-pointer-events-none data-[disabled]:ksjsui-opacity-50","forced-colors:ksjsui-outline-0 forced-colors:ksjsui-transition-none","forced-colors:hover:ksjsui-bg-highlight forced-colors:hover:ksjsui-text-highlight-text forced-colors:hover:ksjsui-forced-color-adjust-none","forced-colors:focus:ksjsui-bg-highlight forced-colors:focus:ksjsui-text-highlight-text forced-colors:focus:ksjsui-forced-color-adjust-none"],e),checked:n,...o,children:[t,f.jsx(qa,{children:f.jsx(Gs,{className:"ksjsui-size-6"})})]}));sc.displayName=Ya.displayName;const ic=i.forwardRef(({className:e,children:t,...n},o)=>f.jsxs(Xa,{ref:o,className:R(["ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-center ksjsui-justify-between ksjsui-gap-2 ksjsui-rounded-sm ksjsui-border-0 ksjsui-px-2 ksjsui-py-1 ksjsui-text-base ksjsui-outline-none ksjsui-transition-colors","focus:ksjsui-bg-neutral focus:ksjsui-text-neutral-foreground","hover:ksjsui-bg-neutral hover:ksjsui-text-neutral-foreground","data-[disabled]:ksjsui-pointer-events-none data-[disabled]:ksjsui-opacity-50","forced-colors:ksjsui-outline-0 forced-colors:ksjsui-transition-none","forced-colors:hover:ksjsui-bg-highlight forced-colors:hover:ksjsui-text-highlight-text forced-colors:hover:ksjsui-forced-color-adjust-none","forced-colors:focus:ksjsui-bg-highlight forced-colors:focus:ksjsui-text-highlight-text forced-colors:focus:ksjsui-forced-color-adjust-none"],e),...n,children:[t,f.jsx("span",{className:"ksjsui-flex ksjsui-size-3.5 ksjsui-items-center ksjsui-justify-center",children:f.jsx(qa,{children:f.jsx(Tp,{className:"ksjsui-size-2"})})})]}));ic.displayName=Xa.displayName;const ac=i.forwardRef(({className:e,inset:t,...n},o)=>f.jsx(Ka,{ref:o,className:R("ksjsui-px-2 ksjsui-text-sm ksjsui-text-label",t&&"ksjsui-ps-8",e),...n}));ac.displayName=Ka.displayName;const cc=i.forwardRef(({className:e,...t},n)=>f.jsx(Za,{ref:n,className:R(["ksjsui-my-1 ksjsui-h-px ksjsui-bg-border","forced-colors:ksjsui-bg-canvas-text"],e),...t}));cc.displayName=Za.displayName;const lc=({className:e,...t})=>f.jsx("span",{className:R("ksjsui-ms-auto ksjsui-mt-0.5 ksjsui-text-sm ksjsui-tracking-widest ksjsui-text-label","group-focus:forced-colors:ksjsui-text-current",e),...t});lc.displayName="DropdownMenuShortcut";const xv=i.forwardRef(({className:e,primary:t,secondary:n,...o},r)=>f.jsxs("div",{ref:r,className:R(e),...o,children:[f.jsx("span",{className:R(["DropdownMenuItemPrimaryText"],e),children:t}),n&&f.jsx("div",{className:R(["DropdownMenuItemSecondaryText","ksjsui-text-sm ksjsui-text-label","group-focus:forced-colors:ksjsui-text-current"],e),children:n})]}));xv.displayName="DropdownMenuItemText";const uc=i.forwardRef((e,t)=>f.jsx($n,{ref:t,...e,iconOnly:!0,fullWidth:!1}));uc.displayName="IconButton";const dc=i.forwardRef(({className:e,...t},n)=>f.jsx("ul",{ref:n,className:R(["ksjsui-flex ksjsui-w-full ksjsui-flex-col ksjsui-gap-y-2"],e),...t}));dc.displayName="List";const fc=i.forwardRef(({className:e,inset:t,...n},o)=>f.jsx("li",{ref:o,className:R(["ksjsui-flex ksjsui-gap-2 ksjsui-rounded-lg ksjsui-p-2 ksjsui-transition-colors","[&_svg]:ksjsui-pointer-events-none [&_svg]:ksjsui-size-6 [&_svg]:ksjsui-shrink-0","has-[.ListItemButton:hover]:ksjsui-bg-neutral","has-[.ListItemButton:focus-visible]:ksjsui-outline-none has-[.ListItemButton:focus-visible]:ksjsui-ring-2 has-[.ListItemButton:focus-visible]:ksjsui-ring-ring has-[.ListItemButton:focus-visible]:ksjsui-ring-offset-2 has-[.ListItemButton:focus-visible]:ksjsui-ring-offset-background","has-[:disabled]:ksjsui-cursor-not-allowed","has-[.ListItemButton:hover]:forced-colors:ksjsui-outline-none has-[.ListItemButton:hover]:forced-colors:ksjsui-outline-highlight","has-[.ListItemButton:focus-visible]:forced-colors:ksjsui-outline-highlight"],t&&["ListItem-inset ksjsui-group","ksjsui-ps-10","has-[.ListItemButton]:ksjsui-p-0"],e),...n}));fc.displayName="ListItem";const pc=({className:e,...t})=>{const n="py-1 ksjsui-pointer-events-none ksjsui-hidden ksjsui-shrink-0 ksjsui-text-foreground",o={"aria-hidden":!0,focusable:!1,role:"presentation"};return f.jsxs(f.Fragment,{children:[f.jsx(Ys,{className:R("rtl:ksjsui-inline-block",n,e),...o,...t}),f.jsx(Xs,{className:R("ltr:ksjsui-inline-block",n,e),...o,...t})]})};pc.displayName="ListItemArrow";const Ev=et(["ListItemButton","ksjsui-flex ksjsui-w-full ksjsui-gap-2","focus-visible:ksjsui-border-0 focus-visible:ksjsui-outline-none","disabled:ksjsui-pointer-events-none disabled:ksjsui-opacity-50","forced-colors:focus-visible:ksjsui-outline-0","group-[.ListItem-inset]:ksjsui-p-2 group-[.ListItem-inset]:ksjsui-ps-10"],{variants:{color:{secondary:"ksjsui-text-secondary",destructive:"ksjsui-text-destructive"}}}),hc=i.forwardRef(({color:e,className:t,tabIndex:n=0,...o},r)=>f.jsx("button",{ref:r,className:R(Ev({color:e,className:t})),tabIndex:n,...o}));hc.displayName="ListItemButton";const mc=i.forwardRef(({className:e,primary:t,secondary:n,...o},r)=>f.jsxs("span",{ref:r,className:R(["ksjsui-flex ksjsui-w-full ksjsui-flex-col ksjsui-items-start"],e),...o,children:[f.jsx("span",{className:R(["ksjsui-text-start ksjsui-text-[15px]"],e),children:t}),n&&f.jsx("span",{className:R(["ksjsui-text-start ksjsui-text-[15px] ksjsui-text-label"],e),children:n})]}));mc.displayName="ListItemText";const vc=i.forwardRef(({className:e,inset:t,...n},o)=>f.jsx("li",{ref:o,className:R("ksjsui-block ksjsui-px-2 ksjsui-py-3 ksjsui-text-sm ksjsui-text-label",t&&"ksjsui-ps-8",e),...n}));vc.displayName="ListLabel";const gc=i.forwardRef(({className:e,...t},n)=>f.jsx("li",{ref:n,className:R(["ksjsui-my-1 ksjsui-block ksjsui-h-px ksjsui-bg-border","forced-colors:ksjsui-bg-canvas-text"],e),role:"separator",...t}));gc.displayName="ListSeparator";var kv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],jt=kv.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...c}=o,a=s?ne:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(a,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Cv(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var Mt=e=>{const{present:t,children:n}=e,o=Sv(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=L(o.ref,Pv(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};Mt.displayName="Presence";function Sv(e){const[t,n]=i.useState(),o=i.useRef({}),r=i.useRef(e),s=i.useRef("none"),c=e?"mounted":"unmounted",[a,u]=Cv(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const l=dn(o.current);s.current=a==="mounted"?l:"none"},[a]),Y(()=>{const l=o.current,d=r.current;if(d!==e){const m=s.current,v=dn(l);e?u("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),Y(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,p=v=>{const h=dn(o.current).includes(v.animationName);if(v.target===t&&h&&(u("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(s.current=dn(o.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:i.useCallback(l=>{l&&(o.current=getComputedStyle(l)),n(l)},[])}}function dn(e){return(e==null?void 0:e.animationName)||"none"}function Pv(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Wo(e,[t,n]){return Math.min(n,Math.max(t,e))}function Tv(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var Bo="ScrollArea",[wc,Jb]=ce(Bo),[Nv,we]=wc(Bo),bc=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:o="hover",dir:r,scrollHideDelay:s=600,...c}=e,[a,u]=i.useState(null),[l,d]=i.useState(null),[p,m]=i.useState(null),[v,w]=i.useState(null),[h,g]=i.useState(null),[b,y]=i.useState(0),[x,E]=i.useState(0),[C,S]=i.useState(!1),[k,P]=i.useState(!1),N=L(t,$=>u($)),M=Yt(r);return f.jsx(Nv,{scope:n,type:o,dir:M,scrollHideDelay:s,scrollArea:a,viewport:l,onViewportChange:d,content:p,onContentChange:m,scrollbarX:v,onScrollbarXChange:w,scrollbarXEnabled:C,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:k,onScrollbarYEnabledChange:P,onCornerWidthChange:y,onCornerHeightChange:E,children:f.jsx(jt.div,{dir:M,...c,ref:N,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});bc.displayName=Bo;var yc="ScrollAreaViewport",xc=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:o,nonce:r,...s}=e,c=we(yc,n),a=i.useRef(null),u=L(t,a,c.onViewportChange);return f.jsxs(f.Fragment,{children:[f.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),f.jsx(jt.div,{"data-radix-scroll-area-viewport":"",...s,ref:u,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...e.style},children:f.jsx("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});xc.displayName=yc;var Te="ScrollAreaScrollbar",Uo=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=we(Te,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:c}=r,a=e.orientation==="horizontal";return i.useEffect(()=>(a?s(!0):c(!0),()=>{a?s(!1):c(!1)}),[a,s,c]),r.type==="hover"?f.jsx(Av,{...o,ref:t,forceMount:n}):r.type==="scroll"?f.jsx(jv,{...o,ref:t,forceMount:n}):r.type==="auto"?f.jsx(Ec,{...o,ref:t,forceMount:n}):r.type==="always"?f.jsx(Ho,{...o,ref:t}):null});Uo.displayName=Te;var Av=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=we(Te,e.__scopeScrollArea),[s,c]=i.useState(!1);return i.useEffect(()=>{const a=r.scrollArea;let u=0;if(a){const l=()=>{window.clearTimeout(u),c(!0)},d=()=>{u=window.setTimeout(()=>c(!1),r.scrollHideDelay)};return a.addEventListener("pointerenter",l),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(u),a.removeEventListener("pointerenter",l),a.removeEventListener("pointerleave",d)}}},[r.scrollArea,r.scrollHideDelay]),f.jsx(Mt,{present:n||s,children:f.jsx(Ec,{"data-state":s?"visible":"hidden",...o,ref:t})})}),jv=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=we(Te,e.__scopeScrollArea),s=e.orientation==="horizontal",c=mn(()=>u("SCROLL_END"),100),[a,u]=Tv("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return i.useEffect(()=>{if(a==="idle"){const l=window.setTimeout(()=>u("HIDE"),r.scrollHideDelay);return()=>window.clearTimeout(l)}},[a,r.scrollHideDelay,u]),i.useEffect(()=>{const l=r.viewport,d=s?"scrollLeft":"scrollTop";if(l){let p=l[d];const m=()=>{const v=l[d];p!==v&&(u("SCROLL"),c()),p=v};return l.addEventListener("scroll",m),()=>l.removeEventListener("scroll",m)}},[r.viewport,s,u,c]),f.jsx(Mt,{present:n||a!=="hidden",children:f.jsx(Ho,{"data-state":a==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:T(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:T(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),Ec=i.forwardRef((e,t)=>{const n=we(Te,e.__scopeScrollArea),{forceMount:o,...r}=e,[s,c]=i.useState(!1),a=e.orientation==="horizontal",u=mn(()=>{if(n.viewport){const l=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;c(a?l:d)}},10);return ft(n.viewport,u),ft(n.content,u),f.jsx(Mt,{present:o||s,children:f.jsx(Ho,{"data-state":s?"visible":"hidden",...r,ref:t})})}),Ho=i.forwardRef((e,t)=>{const{orientation:n="vertical",...o}=e,r=we(Te,e.__scopeScrollArea),s=i.useRef(null),c=i.useRef(0),[a,u]=i.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=Tc(a.viewport,a.content),d={...o,sizes:a,onSizesChange:u,hasThumb:l>0&&l<1,onThumbChange:m=>s.current=m,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:m=>c.current=m};function p(m,v){return Lv(m,c.current,a,v)}return n==="horizontal"?f.jsx(Mv,{...d,ref:t,onThumbPositionChange:()=>{if(r.viewport&&s.current){const m=r.viewport.scrollLeft,v=Nc(m,a,r.dir);s.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:m=>{r.viewport&&(r.viewport.scrollLeft=m)},onDragScroll:m=>{r.viewport&&(r.viewport.scrollLeft=p(m,r.dir))}}):n==="vertical"?f.jsx(Ov,{...d,ref:t,onThumbPositionChange:()=>{if(r.viewport&&s.current){const m=r.viewport.scrollTop,v=Nc(m,a);s.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:m=>{r.viewport&&(r.viewport.scrollTop=m)},onDragScroll:m=>{r.viewport&&(r.viewport.scrollTop=p(m))}}):null}),Mv=i.forwardRef((e,t)=>{const{sizes:n,onSizesChange:o,...r}=e,s=we(Te,e.__scopeScrollArea),[c,a]=i.useState(),u=i.useRef(null),l=L(t,u,s.onScrollbarXChange);return i.useEffect(()=>{u.current&&a(getComputedStyle(u.current))},[u]),f.jsx(Cc,{"data-orientation":"horizontal",...r,ref:l,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":hn(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,p)=>{if(s.viewport){const m=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),jc(m,p)&&d.preventDefault()}},onResize:()=>{u.current&&s.viewport&&c&&o({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:pn(c.paddingLeft),paddingEnd:pn(c.paddingRight)}})}})}),Ov=i.forwardRef((e,t)=>{const{sizes:n,onSizesChange:o,...r}=e,s=we(Te,e.__scopeScrollArea),[c,a]=i.useState(),u=i.useRef(null),l=L(t,u,s.onScrollbarYChange);return i.useEffect(()=>{u.current&&a(getComputedStyle(u.current))},[u]),f.jsx(Cc,{"data-orientation":"vertical",...r,ref:l,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":hn(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,p)=>{if(s.viewport){const m=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),jc(m,p)&&d.preventDefault()}},onResize:()=>{u.current&&s.viewport&&c&&o({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:pn(c.paddingTop),paddingEnd:pn(c.paddingBottom)}})}})}),[Iv,kc]=wc(Te),Cc=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:o,hasThumb:r,onThumbChange:s,onThumbPointerUp:c,onThumbPointerDown:a,onThumbPositionChange:u,onDragScroll:l,onWheelScroll:d,onResize:p,...m}=e,v=we(Te,n),[w,h]=i.useState(null),g=L(t,N=>h(N)),b=i.useRef(null),y=i.useRef(""),x=v.viewport,E=o.content-o.viewport,C=V(d),S=V(u),k=mn(p,10);function P(N){if(b.current){const M=N.clientX-b.current.left,$=N.clientY-b.current.top;l({x:M,y:$})}}return i.useEffect(()=>{const N=M=>{const $=M.target;(w==null?void 0:w.contains($))&&C(M,E)};return document.addEventListener("wheel",N,{passive:!1}),()=>document.removeEventListener("wheel",N,{passive:!1})},[x,w,E,C]),i.useEffect(S,[o,S]),ft(w,k),ft(v.content,k),f.jsx(Iv,{scope:n,scrollbar:w,hasThumb:r,onThumbChange:V(s),onThumbPointerUp:V(c),onThumbPositionChange:S,onThumbPointerDown:V(a),children:f.jsx(jt.div,{...m,ref:g,style:{position:"absolute",...m.style},onPointerDown:T(e.onPointerDown,N=>{N.button===0&&(N.target.setPointerCapture(N.pointerId),b.current=w.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),P(N))}),onPointerMove:T(e.onPointerMove,P),onPointerUp:T(e.onPointerUp,N=>{const M=N.target;M.hasPointerCapture(N.pointerId)&&M.releasePointerCapture(N.pointerId),document.body.style.webkitUserSelect=y.current,v.viewport&&(v.viewport.style.scrollBehavior=""),b.current=null})})})}),fn="ScrollAreaThumb",Sc=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=kc(fn,e.__scopeScrollArea);return f.jsx(Mt,{present:n||r.hasThumb,children:f.jsx(Dv,{ref:t,...o})})}),Dv=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:o,...r}=e,s=we(fn,n),c=kc(fn,n),{onThumbPositionChange:a}=c,u=L(t,p=>c.onThumbChange(p)),l=i.useRef(void 0),d=mn(()=>{l.current&&(l.current(),l.current=void 0)},100);return i.useEffect(()=>{const p=s.viewport;if(p){const m=()=>{if(d(),!l.current){const v=Rv(p,a);l.current=v,a()}};return a(),p.addEventListener("scroll",m),()=>p.removeEventListener("scroll",m)}},[s.viewport,d,a]),f.jsx(jt.div,{"data-state":c.hasThumb?"visible":"hidden",...r,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:T(e.onPointerDownCapture,p=>{const v=p.target.getBoundingClientRect(),w=p.clientX-v.left,h=p.clientY-v.top;c.onThumbPointerDown({x:w,y:h})}),onPointerUp:T(e.onPointerUp,c.onThumbPointerUp)})});Sc.displayName=fn;var zo="ScrollAreaCorner",Pc=i.forwardRef((e,t)=>{const n=we(zo,e.__scopeScrollArea),o=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&o?f.jsx(_v,{...e,ref:t}):null});Pc.displayName=zo;var _v=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,...o}=e,r=we(zo,n),[s,c]=i.useState(0),[a,u]=i.useState(0),l=!!(s&&a);return ft(r.scrollbarX,()=>{var p;const d=((p=r.scrollbarX)==null?void 0:p.offsetHeight)||0;r.onCornerHeightChange(d),u(d)}),ft(r.scrollbarY,()=>{var p;const d=((p=r.scrollbarY)==null?void 0:p.offsetWidth)||0;r.onCornerWidthChange(d),c(d)}),l?f.jsx(jt.div,{...o,ref:t,style:{width:s,height:a,position:"absolute",right:r.dir==="ltr"?0:void 0,left:r.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function pn(e){return e?parseInt(e,10):0}function Tc(e,t){const n=e/t;return isNaN(n)?0:n}function hn(e){const t=Tc(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-n)*t;return Math.max(o,18)}function Lv(e,t,n,o="ltr"){const r=hn(n),s=r/2,c=t||s,a=r-c,u=n.scrollbar.paddingStart+c,l=n.scrollbar.size-n.scrollbar.paddingEnd-a,d=n.content-n.viewport,p=o==="ltr"?[0,d]:[d*-1,0];return Ac([u,l],p)(e)}function Nc(e,t,n="ltr"){const o=hn(t),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-r,c=t.content-t.viewport,a=s-o,u=n==="ltr"?[0,c]:[c*-1,0],l=Wo(e,u);return Ac([0,c],[0,a])(l)}function Ac(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(n-e[0])}}function jc(e,t){return e>0&&e<t}var Rv=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},o=0;return function r(){const s={left:e.scrollLeft,top:e.scrollTop},c=n.left!==s.left,a=n.top!==s.top;(c||a)&&t(),n=s,o=window.requestAnimationFrame(r)}(),()=>window.cancelAnimationFrame(o)};function mn(e,t){const n=V(e),o=i.useRef(0);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),i.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(n,t)},[n,t])}function ft(e,t){const n=V(t);Y(()=>{let o=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(o),r.unobserve(e)}}},[e,n])}var Mc=bc,Oc=xc,$v=Pc;const Vo=i.forwardRef(({className:e,children:t,...n},o)=>f.jsxs(Mc,{ref:o,className:R("ksjsui-relative ksjsui-size-full ksjsui-overflow-hidden",e),...n,children:[t,f.jsx(Go,{}),f.jsx($v,{})]}));Vo.displayName=Mc.displayName;const Ko=i.forwardRef(({className:e,children:t,...n},o)=>f.jsx(Oc,{ref:o,className:R(["ksjsui-size-full ksjsui-rounded-[inherit]",e]),...n,children:t}));Ko.displayName=Oc.displayName;const Go=i.forwardRef(({className:e,orientation:t="vertical",...n},o)=>f.jsx(Uo,{ref:o,orientation:t,className:R("ksjsui-flex ksjsui-touch-none ksjsui-select-none ksjsui-transition-colors",t==="vertical"&&"ksjsui-h-full ksjsui-w-2.5 ksjsui-border-l ksjsui-border-l-transparent ksjsui-p-[1px]",t==="horizontal"&&"ksjsui-h-2.5 ksjsui-flex-col ksjsui-border-t ksjsui-border-t-transparent ksjsui-p-[1px]",e),...n,children:f.jsx(Sc,{className:R(["ksjsui-relative ksjsui-flex-1 ksjsui-rounded-full ksjsui-bg-border","forced-colors:ksjsui-bg-canvas-text","forced-colors:hover:ksjsui-bg-highlight"])})}));Go.displayName=Uo.displayName;function Fv(e){const t=e+"CollectionProvider",[n,o]=ce(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=v=>{const{scope:w,children:h}=v,g=J.useRef(null),b=J.useRef(new Map).current;return f.jsx(r,{scope:w,itemMap:b,collectionRef:g,children:h})};c.displayName=t;const a=e+"CollectionSlot",u=J.forwardRef((v,w)=>{const{scope:h,children:g}=v,b=s(a,h),y=L(w,b.collectionRef);return f.jsx(ne,{ref:y,children:g})});u.displayName=a;const l=e+"CollectionItemSlot",d="data-radix-collection-item",p=J.forwardRef((v,w)=>{const{scope:h,children:g,...b}=v,y=J.useRef(null),x=L(w,y),E=s(l,h);return J.useEffect(()=>(E.itemMap.set(y,{ref:y,...b}),()=>void E.itemMap.delete(y))),f.jsx(ne,{[d]:"",ref:x,children:g})});p.displayName=l;function m(v){const w=s(e+"CollectionConsumer",v);return J.useCallback(()=>{const g=w.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${d}]`));return Array.from(w.itemMap.values()).sort((E,C)=>b.indexOf(E.ref.current)-b.indexOf(C.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:c,Slot:u,ItemSlot:p},m,o]}var Wv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],re=Wv.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...c}=o,a=s?ne:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(a,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Bv(e,t){e&&Ae.flushSync(()=>e.dispatchEvent(t))}var Uv="DismissableLayer",Yo="dismissableLayer.update",Hv="dismissableLayer.pointerDownOutside",zv="dismissableLayer.focusOutside",Ic,Dc=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_c=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:c,onDismiss:a,...u}=e,l=i.useContext(Dc),[d,p]=i.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=i.useState({}),w=L(t,k=>p(k)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(g),y=d?h.indexOf(d):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,E=y>=b,C=Gv(k=>{const P=k.target,N=[...l.branches].some(M=>M.contains(P));!E||N||(r==null||r(k),c==null||c(k),k.defaultPrevented||a==null||a())},m),S=Yv(k=>{const P=k.target;[...l.branches].some(M=>M.contains(P))||(s==null||s(k),c==null||c(k),k.defaultPrevented||a==null||a())},m);return bt(k=>{y===l.layers.size-1&&(o==null||o(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},m),i.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Ic=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),Lc(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Ic)}},[d,m,n,l]),i.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),Lc())},[d,l]),i.useEffect(()=>{const k=()=>v({});return document.addEventListener(Yo,k),()=>document.removeEventListener(Yo,k)},[]),f.jsx(re.div,{...u,ref:w,style:{pointerEvents:x?E?"auto":"none":void 0,...e.style},onFocusCapture:T(e.onFocusCapture,S.onFocusCapture),onBlurCapture:T(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:T(e.onPointerDownCapture,C.onPointerDownCapture)})});_c.displayName=Uv;var Vv="DismissableLayerBranch",Kv=i.forwardRef((e,t)=>{const n=i.useContext(Dc),o=i.useRef(null),r=L(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),f.jsx(re.div,{...e,ref:r})});Kv.displayName=Vv;function Gv(e,t=globalThis==null?void 0:globalThis.document){const n=V(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!o.current){let u=function(){Rc(Hv,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}else t.removeEventListener("click",r.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Yv(e,t=globalThis==null?void 0:globalThis.document){const n=V(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&Rc(zv,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Lc(){const e=new CustomEvent(Yo);document.dispatchEvent(e)}function Rc(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Bv(r,s):r.dispatchEvent(s)}var Xo="focusScope.autoFocusOnMount",qo="focusScope.autoFocusOnUnmount",$c={bubbles:!1,cancelable:!0},Xv="FocusScope",Fc=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...c}=e,[a,u]=i.useState(null),l=V(r),d=V(s),p=i.useRef(null),m=L(t,h=>u(h)),v=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let h=function(x){if(v.paused||!a)return;const E=x.target;a.contains(E)?p.current=E:Ke(p.current,{select:!0})},g=function(x){if(v.paused||!a)return;const E=x.relatedTarget;E!==null&&(a.contains(E)||Ke(p.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const C of x)C.removedNodes.length>0&&Ke(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const y=new MutationObserver(b);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),y.disconnect()}}},[o,a,v.paused]),i.useEffect(()=>{if(a){Uc.add(v);const h=document.activeElement;if(!a.contains(h)){const b=new CustomEvent(Xo,$c);a.addEventListener(Xo,l),a.dispatchEvent(b),b.defaultPrevented||(qv(tg(Wc(a)),{select:!0}),document.activeElement===h&&Ke(a))}return()=>{a.removeEventListener(Xo,l),setTimeout(()=>{const b=new CustomEvent(qo,$c);a.addEventListener(qo,d),a.dispatchEvent(b),b.defaultPrevented||Ke(h??document.body,{select:!0}),a.removeEventListener(qo,d),Uc.remove(v)},0)}}},[a,l,d,v]);const w=i.useCallback(h=>{if(!n&&!o||v.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,b=document.activeElement;if(g&&b){const y=h.currentTarget,[x,E]=Zv(y);x&&E?!h.shiftKey&&b===E?(h.preventDefault(),n&&Ke(x,{select:!0})):h.shiftKey&&b===x&&(h.preventDefault(),n&&Ke(E,{select:!0})):b===y&&h.preventDefault()}},[n,o,v.paused]);return f.jsx(re.div,{tabIndex:-1,...c,ref:m,onKeyDown:w})});Fc.displayName=Xv;function qv(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Ke(o,{select:t}),document.activeElement!==n)return}function Zv(e){const t=Wc(e),n=Bc(t,e),o=Bc(t.reverse(),e);return[n,o]}function Wc(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Bc(e,t){for(const n of e)if(!Qv(n,{upTo:t}))return n}function Qv(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 Jv(e){return e instanceof HTMLInputElement&&"select"in e}function Ke(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Jv(e)&&t&&e.select()}}var Uc=eg();function eg(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Hc(e,t),e.unshift(t)},remove(t){var n;e=Hc(e,t),(n=e[0])==null||n.resume()}}}function Hc(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function tg(e){return e.filter(t=>t.tagName!=="A")}var ng="Arrow",zc=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return f.jsx(re.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});zc.displayName=ng;var og=zc,Zo="Popper",[Vc,Kc]=ce(Zo),[rg,Gc]=Vc(Zo),Yc=e=>{const{__scopePopper:t,children:n}=e,[o,r]=i.useState(null);return f.jsx(rg,{scope:t,anchor:o,onAnchorChange:r,children:n})};Yc.displayName=Zo;var Xc="PopperAnchor",qc=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=Gc(Xc,n),c=i.useRef(null),a=L(t,c);return i.useEffect(()=>{s.onAnchorChange((o==null?void 0:o.current)||c.current)}),o?null:f.jsx(re.div,{...r,ref:a})});qc.displayName=Xc;var Qo="PopperContent",[sg,ig]=Vc(Qo),Zc=i.forwardRef((e,t)=>{var F,X,Q,G,q,Z;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:c=0,arrowPadding:a=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:w,...h}=e,g=Gc(Qo,n),[b,y]=i.useState(null),x=L(t,te=>y(te)),[E,C]=i.useState(null),S=rn(E),k=(S==null?void 0:S.width)??0,P=(S==null?void 0:S.height)??0,N=o+(s!=="center"?"-"+s:""),M=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},$=Array.isArray(l)?l:[l],I=$.length>0,W={padding:M,boundary:$.filter(cg),altBoundary:I},{refs:A,floatingStyles:U,placement:_,isPositioned:B,middlewareData:O}=wo({strategy:"fixed",placement:N,whileElementsMounted:(...te)=>vo(...te,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[bo({mainAxis:r+P,alignmentAxis:c}),u&&yo({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?xo():void 0,...W}),u&&Eo({...W}),ko({...W,apply:({elements:te,rects:ue,availableWidth:_e,availableHeight:Le})=>{const{width:Re,height:_t}=ue.reference,fe=te.floating.style;fe.setProperty("--radix-popper-available-width",`${_e}px`),fe.setProperty("--radix-popper-available-height",`${Le}px`),fe.setProperty("--radix-popper-anchor-width",`${Re}px`),fe.setProperty("--radix-popper-anchor-height",`${_t}px`)}}),E&&So({element:E,padding:a}),lg({arrowWidth:k,arrowHeight:P}),m&&Co({strategy:"referenceHidden",...W})]}),[j,K]=el(_),H=V(w);Y(()=>{B&&(H==null||H())},[B,H]);const oe=(F=O.arrow)==null?void 0:F.x,ie=(X=O.arrow)==null?void 0:X.y,se=((Q=O.arrow)==null?void 0:Q.centerOffset)!==0,[me,ae]=i.useState();return Y(()=>{b&&ae(window.getComputedStyle(b).zIndex)},[b]),f.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:B?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[(G=O.transformOrigin)==null?void 0:G.x,(q=O.transformOrigin)==null?void 0:q.y].join(" "),...((Z=O.hide)==null?void 0:Z.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(sg,{scope:n,placedSide:j,onArrowChange:C,arrowX:oe,arrowY:ie,shouldHideArrow:se,children:f.jsx(re.div,{"data-side":j,"data-align":K,...h,ref:x,style:{...h.style,animation:B?void 0:"none"}})})})});Zc.displayName=Qo;var Qc="PopperArrow",ag={top:"bottom",right:"left",bottom:"top",left:"right"},Jc=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=ig(Qc,o),c=ag[s.placedSide];return f.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:f.jsx(og,{...r,ref:n,style:{...r.style,display:"block"}})})});Jc.displayName=Qc;function cg(e){return e!==null}var lg=e=>({name:"transformOrigin",options:e,fn(t){var g,b,y;const{placement:n,rects:o,middlewareData:r}=t,c=((g=r.arrow)==null?void 0:g.centerOffset)!==0,a=c?0:e.arrowWidth,u=c?0:e.arrowHeight,[l,d]=el(n),p={start:"0%",center:"50%",end:"100%"}[d],m=(((b=r.arrow)==null?void 0:b.x)??0)+a/2,v=(((y=r.arrow)==null?void 0:y.y)??0)+u/2;let w="",h="";return l==="bottom"?(w=c?p:`${m}px`,h=`${-u}px`):l==="top"?(w=c?p:`${m}px`,h=`${o.floating.height+u}px`):l==="right"?(w=`${-u}px`,h=c?p:`${v}px`):l==="left"&&(w=`${o.floating.width+u}px`,h=c?p:`${v}px`),{data:{x:w,y:h}}}});function el(e){const[t,n="center"]=e.split("-");return[t,n]}var ug=Yc,dg=qc,fg=Zc,pg=Jc,hg="Portal",tl=i.forwardRef((e,t)=>{var a;const{container:n,...o}=e,[r,s]=i.useState(!1);Y(()=>s(!0),[]);const c=n||r&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return c?mt.createPortal(f.jsx(re.div,{...o,ref:t}),c):null});tl.displayName=hg;function nl(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var mg="VisuallyHidden",ol=i.forwardRef((e,t)=>f.jsx(re.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));ol.displayName=mg;var vg=[" ","Enter","ArrowUp","ArrowDown"],gg=[" ","Enter"],Ot="Select",[vn,gn,wg]=Fv(Ot),[pt,ey]=ce(Ot,[wg,Kc]),wn=Kc(),[bg,Ge]=pt(Ot),[yg,xg]=pt(Ot),rl=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:s,value:c,defaultValue:a,onValueChange:u,dir:l,name:d,autoComplete:p,disabled:m,required:v,form:w}=e,h=wn(t),[g,b]=i.useState(null),[y,x]=i.useState(null),[E,C]=i.useState(!1),S=Yt(l),[k=!1,P]=Me({prop:o,defaultProp:r,onChange:s}),[N,M]=Me({prop:c,defaultProp:a,onChange:u}),$=i.useRef(null),I=g?w||!!g.closest("form"):!0,[W,A]=i.useState(new Set),U=Array.from(W).map(_=>_.props.value).join(";");return f.jsx(ug,{...h,children:f.jsxs(bg,{required:v,scope:t,trigger:g,onTriggerChange:b,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:E,onValueNodeHasChildrenChange:C,contentId:ve(),value:N,onValueChange:M,open:k,onOpenChange:P,dir:S,triggerPointerDownPosRef:$,disabled:m,children:[f.jsx(vn.Provider,{scope:t,children:f.jsx(yg,{scope:e.__scopeSelect,onNativeOptionAdd:i.useCallback(_=>{A(B=>new Set(B).add(_))},[]),onNativeOptionRemove:i.useCallback(_=>{A(B=>{const O=new Set(B);return O.delete(_),O})},[]),children:n})}),I?f.jsxs(Tl,{"aria-hidden":!0,required:v,tabIndex:-1,name:d,autoComplete:p,value:N,onChange:_=>M(_.target.value),disabled:m,form:w,children:[N===void 0?f.jsx("option",{value:""}):null,Array.from(W)]},U):null]})})};rl.displayName=Ot;var sl="SelectTrigger",il=i.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,s=wn(n),c=Ge(sl,n),a=c.disabled||o,u=L(t,c.onTriggerChange),l=gn(n),d=i.useRef("touch"),[p,m,v]=Nl(h=>{const g=l().filter(x=>!x.disabled),b=g.find(x=>x.value===c.value),y=Al(g,h,b);y!==void 0&&c.onValueChange(y.value)}),w=h=>{a||(c.onOpenChange(!0),v()),h&&(c.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return f.jsx(dg,{asChild:!0,...s,children:f.jsx(re.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Pl(c.value)?"":void 0,...r,ref:u,onClick:T(r.onClick,h=>{h.currentTarget.focus(),d.current!=="mouse"&&w(h)}),onPointerDown:T(r.onPointerDown,h=>{d.current=h.pointerType;const g=h.target;g.hasPointerCapture(h.pointerId)&&g.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(w(h),h.preventDefault())}),onKeyDown:T(r.onKeyDown,h=>{const g=p.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&m(h.key),!(g&&h.key===" ")&&vg.includes(h.key)&&(w(),h.preventDefault())})})})});il.displayName=sl;var al="SelectValue",cl=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:s,placeholder:c="",...a}=e,u=Ge(al,n),{onValueNodeHasChildrenChange:l}=u,d=s!==void 0,p=L(t,u.onValueNodeChange);return Y(()=>{l(d)},[l,d]),f.jsx(re.span,{...a,ref:p,style:{pointerEvents:"none"},children:Pl(u.value)?f.jsx(f.Fragment,{children:c}):s})});cl.displayName=al;var Eg="SelectIcon",ll=i.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return f.jsx(re.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});ll.displayName=Eg;var kg="SelectPortal",ul=e=>f.jsx(tl,{asChild:!0,...e});ul.displayName=kg;var Qe="SelectContent",dl=i.forwardRef((e,t)=>{const n=Ge(Qe,e.__scopeSelect),[o,r]=i.useState();if(Y(()=>{r(new DocumentFragment)},[]),!n.open){const s=o;return s?Ae.createPortal(f.jsx(fl,{scope:e.__scopeSelect,children:f.jsx(vn.Slot,{scope:e.__scopeSelect,children:f.jsx("div",{children:e.children})})}),s):null}return f.jsx(pl,{...e,ref:t})});dl.displayName=Qe;var Ee=10,[fl,Ye]=pt(Qe),Cg="SelectContentImpl",pl=i.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:c,side:a,sideOffset:u,align:l,alignOffset:d,arrowPadding:p,collisionBoundary:m,collisionPadding:v,sticky:w,hideWhenDetached:h,avoidCollisions:g,...b}=e,y=Ge(Qe,n),[x,E]=i.useState(null),[C,S]=i.useState(null),k=L(t,F=>E(F)),[P,N]=i.useState(null),[M,$]=i.useState(null),I=gn(n),[W,A]=i.useState(!1),U=i.useRef(!1);i.useEffect(()=>{if(x)return Xn(x)},[x]),Hn();const _=i.useCallback(F=>{const[X,...Q]=I().map(Z=>Z.ref.current),[G]=Q.slice(-1),q=document.activeElement;for(const Z of F)if(Z===q||(Z==null||Z.scrollIntoView({block:"nearest"}),Z===X&&C&&(C.scrollTop=0),Z===G&&C&&(C.scrollTop=C.scrollHeight),Z==null||Z.focus(),document.activeElement!==q))return},[I,C]),B=i.useCallback(()=>_([P,x]),[_,P,x]);i.useEffect(()=>{W&&B()},[W,B]);const{onOpenChange:O,triggerPointerDownPosRef:j}=y;i.useEffect(()=>{if(x){let F={x:0,y:0};const X=G=>{var q,Z;F={x:Math.abs(Math.round(G.pageX)-(((q=j.current)==null?void 0:q.x)??0)),y:Math.abs(Math.round(G.pageY)-(((Z=j.current)==null?void 0:Z.y)??0))}},Q=G=>{F.x<=10&&F.y<=10?G.preventDefault():x.contains(G.target)||O(!1),document.removeEventListener("pointermove",X),j.current=null};return j.current!==null&&(document.addEventListener("pointermove",X),document.addEventListener("pointerup",Q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",X),document.removeEventListener("pointerup",Q,{capture:!0})}}},[x,O,j]),i.useEffect(()=>{const F=()=>O(!1);return window.addEventListener("blur",F),window.addEventListener("resize",F),()=>{window.removeEventListener("blur",F),window.removeEventListener("resize",F)}},[O]);const[K,H]=Nl(F=>{const X=I().filter(q=>!q.disabled),Q=X.find(q=>q.ref.current===document.activeElement),G=Al(X,F,Q);G&&setTimeout(()=>G.ref.current.focus())}),oe=i.useCallback((F,X,Q)=>{const G=!U.current&&!Q;(y.value!==void 0&&y.value===X||G)&&(N(F),G&&(U.current=!0))},[y.value]),ie=i.useCallback(()=>x==null?void 0:x.focus(),[x]),se=i.useCallback((F,X,Q)=>{const G=!U.current&&!Q;(y.value!==void 0&&y.value===X||G)&&$(F)},[y.value]),me=o==="popper"?Jo:hl,ae=me===Jo?{side:a,sideOffset:u,align:l,alignOffset:d,arrowPadding:p,collisionBoundary:m,collisionPadding:v,sticky:w,hideWhenDetached:h,avoidCollisions:g}:{};return f.jsx(fl,{scope:n,content:x,viewport:C,onViewportChange:S,itemRefCallback:oe,selectedItem:P,onItemLeave:ie,itemTextRefCallback:se,focusSelectedItem:B,selectedItemText:M,position:o,isPositioned:W,searchRef:K,children:f.jsx(zt,{as:ne,allowPinchZoom:!0,children:f.jsx(Fc,{asChild:!0,trapped:y.open,onMountAutoFocus:F=>{F.preventDefault()},onUnmountAutoFocus:T(r,F=>{var X;(X=y.trigger)==null||X.focus({preventScroll:!0}),F.preventDefault()}),children:f.jsx(_c,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:F=>F.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:f.jsx(me,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:F=>F.preventDefault(),...b,...ae,onPlaced:()=>A(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:T(b.onKeyDown,F=>{const X=F.ctrlKey||F.altKey||F.metaKey;if(F.key==="Tab"&&F.preventDefault(),!X&&F.key.length===1&&H(F.key),["ArrowUp","ArrowDown","Home","End"].includes(F.key)){let G=I().filter(q=>!q.disabled).map(q=>q.ref.current);if(["ArrowUp","End"].includes(F.key)&&(G=G.slice().reverse()),["ArrowUp","ArrowDown"].includes(F.key)){const q=F.target,Z=G.indexOf(q);G=G.slice(Z+1)}setTimeout(()=>_(G)),F.preventDefault()}})})})})})})});pl.displayName=Cg;var Sg="SelectItemAlignedPosition",hl=i.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,s=Ge(Qe,n),c=Ye(Qe,n),[a,u]=i.useState(null),[l,d]=i.useState(null),p=L(t,k=>d(k)),m=gn(n),v=i.useRef(!1),w=i.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:b,focusSelectedItem:y}=c,x=i.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&l&&h&&g&&b){const k=s.trigger.getBoundingClientRect(),P=l.getBoundingClientRect(),N=s.valueNode.getBoundingClientRect(),M=b.getBoundingClientRect();if(s.dir!=="rtl"){const q=M.left-P.left,Z=N.left-q,te=k.left-Z,ue=k.width+te,_e=Math.max(ue,P.width),Le=window.innerWidth-Ee,Re=Wo(Z,[Ee,Math.max(Ee,Le-_e)]);a.style.minWidth=ue+"px",a.style.left=Re+"px"}else{const q=P.right-M.right,Z=window.innerWidth-N.right-q,te=window.innerWidth-k.right-Z,ue=k.width+te,_e=Math.max(ue,P.width),Le=window.innerWidth-Ee,Re=Wo(Z,[Ee,Math.max(Ee,Le-_e)]);a.style.minWidth=ue+"px",a.style.right=Re+"px"}const $=m(),I=window.innerHeight-Ee*2,W=h.scrollHeight,A=window.getComputedStyle(l),U=parseInt(A.borderTopWidth,10),_=parseInt(A.paddingTop,10),B=parseInt(A.borderBottomWidth,10),O=parseInt(A.paddingBottom,10),j=U+_+W+O+B,K=Math.min(g.offsetHeight*5,j),H=window.getComputedStyle(h),oe=parseInt(H.paddingTop,10),ie=parseInt(H.paddingBottom,10),se=k.top+k.height/2-Ee,me=I-se,ae=g.offsetHeight/2,F=g.offsetTop+ae,X=U+_+F,Q=j-X;if(X<=se){const q=$.length>0&&g===$[$.length-1].ref.current;a.style.bottom="0px";const Z=l.clientHeight-h.offsetTop-h.offsetHeight,te=Math.max(me,ae+(q?ie:0)+Z+B),ue=X+te;a.style.height=ue+"px"}else{const q=$.length>0&&g===$[0].ref.current;a.style.top="0px";const te=Math.max(se,U+h.offsetTop+(q?oe:0)+ae)+Q;a.style.height=te+"px",h.scrollTop=X-se+h.offsetTop}a.style.margin=`${Ee}px 0`,a.style.minHeight=K+"px",a.style.maxHeight=I+"px",o==null||o(),requestAnimationFrame(()=>v.current=!0)}},[m,s.trigger,s.valueNode,a,l,h,g,b,s.dir,o]);Y(()=>x(),[x]);const[E,C]=i.useState();Y(()=>{l&&C(window.getComputedStyle(l).zIndex)},[l]);const S=i.useCallback(k=>{k&&w.current===!0&&(x(),y==null||y(),w.current=!1)},[x,y]);return f.jsx(Tg,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:v,onScrollButtonChange:S,children:f.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:f.jsx(re.div,{...r,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});hl.displayName=Sg;var Pg="SelectPopperPosition",Jo=i.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=Ee,...s}=e,c=wn(n);return f.jsx(fg,{...c,...s,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...s.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)"}})});Jo.displayName=Pg;var[Tg,er]=pt(Qe,{}),tr="SelectViewport",ml=i.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,s=Ye(tr,n),c=er(tr,n),a=L(t,s.onViewportChange),u=i.useRef(0);return f.jsxs(f.Fragment,{children:[f.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),f.jsx(vn.Slot,{scope:n,children:f.jsx(re.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:T(r.onScroll,l=>{const d=l.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:m}=c;if(m!=null&&m.current&&p){const v=Math.abs(u.current-d.scrollTop);if(v>0){const w=window.innerHeight-Ee*2,h=parseFloat(p.style.minHeight),g=parseFloat(p.style.height),b=Math.max(h,g);if(b<w){const y=b+v,x=Math.min(w,y),E=y-x;p.style.height=x+"px",p.style.bottom==="0px"&&(d.scrollTop=E>0?E:0,p.style.justifyContent="flex-end")}}}u.current=d.scrollTop})})})]})});ml.displayName=tr;var vl="SelectGroup",[Ng,Ag]=pt(vl),jg=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=ve();return f.jsx(Ng,{scope:n,id:r,children:f.jsx(re.div,{role:"group","aria-labelledby":r,...o,ref:t})})});jg.displayName=vl;var gl="SelectLabel",wl=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Ag(gl,n);return f.jsx(re.div,{id:r.id,...o,ref:t})});wl.displayName=gl;var bn="SelectItem",[Mg,bl]=pt(bn),yl=i.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:s,...c}=e,a=Ge(bn,n),u=Ye(bn,n),l=a.value===o,[d,p]=i.useState(s??""),[m,v]=i.useState(!1),w=L(t,y=>{var x;return(x=u.itemRefCallback)==null?void 0:x.call(u,y,o,r)}),h=ve(),g=i.useRef("touch"),b=()=>{r||(a.onValueChange(o),a.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return f.jsx(Mg,{scope:n,value:o,disabled:r,textId:h,isSelected:l,onItemTextChange:i.useCallback(y=>{p(x=>x||((y==null?void 0:y.textContent)??"").trim())},[]),children:f.jsx(vn.ItemSlot,{scope:n,value:o,disabled:r,textValue:d,children:f.jsx(re.div,{role:"option","aria-labelledby":h,"data-highlighted":m?"":void 0,"aria-selected":l&&m,"data-state":l?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...c,ref:w,onFocus:T(c.onFocus,()=>v(!0)),onBlur:T(c.onBlur,()=>v(!1)),onClick:T(c.onClick,()=>{g.current!=="mouse"&&b()}),onPointerUp:T(c.onPointerUp,()=>{g.current==="mouse"&&b()}),onPointerDown:T(c.onPointerDown,y=>{g.current=y.pointerType}),onPointerMove:T(c.onPointerMove,y=>{var x;g.current=y.pointerType,r?(x=u.onItemLeave)==null||x.call(u):g.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:T(c.onPointerLeave,y=>{var x;y.currentTarget===document.activeElement&&((x=u.onItemLeave)==null||x.call(u))}),onKeyDown:T(c.onKeyDown,y=>{var E;((E=u.searchRef)==null?void 0:E.current)!==""&&y.key===" "||(gg.includes(y.key)&&b(),y.key===" "&&y.preventDefault())})})})})});yl.displayName=bn;var It="SelectItemText",xl=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...s}=e,c=Ge(It,n),a=Ye(It,n),u=bl(It,n),l=xg(It,n),[d,p]=i.useState(null),m=L(t,b=>p(b),u.onItemTextChange,b=>{var y;return(y=a.itemTextRefCallback)==null?void 0:y.call(a,b,u.value,u.disabled)}),v=d==null?void 0:d.textContent,w=i.useMemo(()=>f.jsx("option",{value:u.value,disabled:u.disabled,children:v},u.value),[u.disabled,u.value,v]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return Y(()=>(h(w),()=>g(w)),[h,g,w]),f.jsxs(f.Fragment,{children:[f.jsx(re.span,{id:u.textId,...s,ref:m}),u.isSelected&&c.valueNode&&!c.valueNodeHasChildren?Ae.createPortal(s.children,c.valueNode):null]})});xl.displayName=It;var El="SelectItemIndicator",kl=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return bl(El,n).isSelected?f.jsx(re.span,{"aria-hidden":!0,...o,ref:t}):null});kl.displayName=El;var nr="SelectScrollUpButton",Og=i.forwardRef((e,t)=>{const n=Ye(nr,e.__scopeSelect),o=er(nr,e.__scopeSelect),[r,s]=i.useState(!1),c=L(t,o.onScrollButtonChange);return Y(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=u.scrollTop>0;s(l)};const u=n.viewport;return a(),u.addEventListener("scroll",a),()=>u.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),r?f.jsx(Cl,{...e,ref:c,onAutoScroll:()=>{const{viewport:a,selectedItem:u}=n;a&&u&&(a.scrollTop=a.scrollTop-u.offsetHeight)}}):null});Og.displayName=nr;var or="SelectScrollDownButton",Ig=i.forwardRef((e,t)=>{const n=Ye(or,e.__scopeSelect),o=er(or,e.__scopeSelect),[r,s]=i.useState(!1),c=L(t,o.onScrollButtonChange);return Y(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=u.scrollHeight-u.clientHeight,d=Math.ceil(u.scrollTop)<l;s(d)};const u=n.viewport;return a(),u.addEventListener("scroll",a),()=>u.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),r?f.jsx(Cl,{...e,ref:c,onAutoScroll:()=>{const{viewport:a,selectedItem:u}=n;a&&u&&(a.scrollTop=a.scrollTop+u.offsetHeight)}}):null});Ig.displayName=or;var Cl=i.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,s=Ye("SelectScrollButton",n),c=i.useRef(null),a=gn(n),u=i.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return i.useEffect(()=>()=>u(),[u]),Y(()=>{var d;const l=a().find(p=>p.ref.current===document.activeElement);(d=l==null?void 0:l.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),f.jsx(re.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:T(r.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(o,50))}),onPointerMove:T(r.onPointerMove,()=>{var l;(l=s.onItemLeave)==null||l.call(s),c.current===null&&(c.current=window.setInterval(o,50))}),onPointerLeave:T(r.onPointerLeave,()=>{u()})})}),Dg="SelectSeparator",Sl=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return f.jsx(re.div,{"aria-hidden":!0,...o,ref:t})});Sl.displayName=Dg;var rr="SelectArrow",_g=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=wn(n),s=Ge(rr,n),c=Ye(rr,n);return s.open&&c.position==="popper"?f.jsx(pg,{...r,...o,ref:t}):null});_g.displayName=rr;function Pl(e){return e===""||e===void 0}var Tl=i.forwardRef((e,t)=>{const{value:n,...o}=e,r=i.useRef(null),s=L(t,r),c=nl(n);return i.useEffect(()=>{const a=r.current,u=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(u,"value").set;if(c!==n&&d){const p=new Event("change",{bubbles:!0});d.call(a,n),a.dispatchEvent(p)}},[c,n]),f.jsx(ol,{asChild:!0,children:f.jsx("select",{...o,ref:s,defaultValue:n})})});Tl.displayName="BubbleSelect";function Nl(e){const t=V(e),n=i.useRef(""),o=i.useRef(0),r=i.useCallback(c=>{const a=n.current+c;t(a),function u(l){n.current=l,window.clearTimeout(o.current),l!==""&&(o.current=window.setTimeout(()=>u(""),1e3))}(a)},[t]),s=i.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,s]}function Al(e,t,n){const r=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let c=Lg(e,Math.max(s,0));r.length===1&&(c=c.filter(l=>l!==n));const u=c.find(l=>l.textValue.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function Lg(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Rg=rl,jl=il,$g=cl,Fg=ll,Wg=ul,Ml=dl,Bg=ml,Ol=wl,Il=yl,Ug=xl,Hg=kl,Dl=Sl;const zg=Rg,Vg=$g,_l=i.forwardRef(({className:e,children:t,...n},o)=>f.jsxs(jl,{ref:o,className:R(["ksjsui-flex ksjsui-h-10 ksjsui-w-full ksjsui-items-center ksjsui-justify-between ksjsui-gap-x-2 ksjsui-rounded-md ksjsui-border ksjsui-border-input ksjsui-bg-background ksjsui-px-3 ksjsui-py-2 ksjsui-text-sm ksjsui-ring-offset-background","data-[placeholder]:ksjsui-text-placeholder","focus:ksjsui-outline-none focus:ksjsui-ring-2 focus:ksjsui-ring-ring focus:ksjsui-ring-offset-2","disabled:ksjsui-cursor-not-allowed disabled:ksjsui-opacity-50","[&>span]:ksjsui-truncate"],e),...n,children:[t,f.jsx(Fg,{asChild:!0,children:f.jsx(Pp,{className:"ksjsui-size-4 ksjsui-shrink-0 ksjsui-opacity-50"})})]}));_l.displayName=jl.displayName;const Ll=i.forwardRef(({className:e,children:t,position:n="popper",...o},r)=>f.jsx(Wg,{children:f.jsx(Ml,{ref:r,className:R(["ksjsui-z-50 ksjsui-flex ksjsui-flex-col ksjsui-gap-y-2 ksjsui-overflow-hidden ksjsui-rounded-lg ksjsui-border-0 ksjsui-bg-popover ksjsui-text-popover-foreground ksjsui-shadow-md","ksjsui-max-h-[var(--radix-select-content-available-height)]","ksjsui-min-w-[var(--radix-select-trigger-width)] ksjsui-max-w-[var(--radix-select-content-available-width)]","data-[state=open]:ksjsui-animate-in data-[state=open]:ksjsui-fade-in-0 data-[state=open]:ksjsui-zoom-in-95","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-0 data-[state=closed]:ksjsui-zoom-out-95","data-[side=top]:ksjsui-slide-in-from-bottom-2","data-[side=right]:ksjsui-slide-in-from-left-2","data-[side=bottom]:ksjsui-slide-in-from-top-2","data-[side=left]:ksjsui-slide-in-from-right-2","forced-colors:ksjsui-border"],n==="popper"&&["data-[side=top]:-ksjsui-translate-y-1","data-[side=right]:ksjsui-translate-x-1","data-[side=bottom]:ksjsui-translate-y-1","data-[side=left]:-ksjsui-translate-x-1"],e),position:n,...o,children:f.jsx(Bg,{className:R("ksjsui-flex ksjsui-flex-col ksjsui-gap-y-2 ksjsui-px-2 ksjsui-py-4"),asChild:!0,children:f.jsx(Vo,{children:f.jsx(Ko,{children:t})})})})}));Ll.displayName=Ml.displayName;const Kg=i.forwardRef(({className:e,...t},n)=>f.jsx(Ol,{ref:n,className:R("ksjsui-px-2 ksjsui-pt-2 ksjsui-text-sm ksjsui-text-label",e),...t}));Kg.displayName=Ol.displayName;const Rl=i.forwardRef(({className:e,children:t,...n},o)=>f.jsxs(Il,{ref:o,className:R(["ksjsui-flex ksjsui-w-full ksjsui-cursor-default ksjsui-select-none ksjsui-items-center ksjsui-justify-between ksjsui-gap-2 ksjsui-rounded-sm ksjsui-px-2 ksjsui-py-1 ksjsui-text-base ksjsui-outline-0","data-[disabled]:ksjsui-pointer-events-none data-[disabled]:ksjsui-opacity-50","focus:ksjsui-bg-selected-hover focus:ksjsui-text-selected-foreground","forced-colors:focus:ksjsui-bg-highlight forced-colors:focus:ksjsui-text-highlight-text forced-colors:focus:ksjsui-forced-color-adjust-none"],e),...n,children:[f.jsx(Ug,{children:t}),f.jsx(Hg,{children:f.jsx(Gs,{className:"ksjsui-size-6 ksjsui-shrink-0"})})]}));Rl.displayName=Il.displayName;const Gg=i.forwardRef(({className:e,...t},n)=>f.jsx(Dl,{ref:n,className:R(["ksjsui-my-1 ksjsui-h-px ksjsui-shrink-0 ksjsui-bg-border","forced-colors:ksjsui-bg-button-border"],e),...t}));Gg.displayName=Dl.displayName;var Yg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Xg=Yg.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...c}=o,a=s?ne:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(a,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),qg="Separator",$l="horizontal",Zg=["horizontal","vertical"],Fl=i.forwardRef((e,t)=>{const{decorative:n,orientation:o=$l,...r}=e,s=Qg(o)?o:$l,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return f.jsx(Xg.div,{"data-orientation":s,...a,...r,ref:t})});Fl.displayName=qg;function Qg(e){return Zg.includes(e)}var Wl=Fl;const Bl=i.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...o},r)=>f.jsx(Wl,{ref:r,decorative:n,orientation:t,className:R("ksjsui-shrink-0 ksjsui-bg-border forced-colors:ksjsui-bg-canvas-text forced-colors:ksjsui-forced-color-adjust-none",t==="horizontal"?"ksjsui-block ksjsui-h-px ksjsui-w-full":"ksjsui-inline-block ksjsui-w-px",e),...o}));Bl.displayName=Wl.displayName;var Jg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ul=Jg.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...c}=o,a=s?ne:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(a,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),sr="Switch",[ew,ty]=ce(sr),[tw,nw]=ew(sr),Hl=i.forwardRef((e,t)=>{const{__scopeSwitch:n,name:o,checked:r,defaultChecked:s,required:c,disabled:a,value:u="on",onCheckedChange:l,form:d,...p}=e,[m,v]=i.useState(null),w=L(t,x=>v(x)),h=i.useRef(!1),g=m?d||!!m.closest("form"):!0,[b=!1,y]=Me({prop:r,defaultProp:s,onChange:l});return f.jsxs(tw,{scope:n,checked:b,disabled:a,children:[f.jsx(Ul.button,{type:"button",role:"switch","aria-checked":b,"aria-required":c,"data-state":Kl(b),"data-disabled":a?"":void 0,disabled:a,value:u,...p,ref:w,onClick:T(e.onClick,x=>{y(E=>!E),g&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})}),g&&f.jsx(ow,{control:m,bubbles:!h.current,name:o,value:u,checked:b,required:c,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});Hl.displayName=sr;var zl="SwitchThumb",Vl=i.forwardRef((e,t)=>{const{__scopeSwitch:n,...o}=e,r=nw(zl,n);return f.jsx(Ul.span,{"data-state":Kl(r.checked),"data-disabled":r.disabled?"":void 0,...o,ref:t})});Vl.displayName=zl;var ow=e=>{const{control:t,checked:n,bubbles:o=!0,...r}=e,s=i.useRef(null),c=nl(n),a=rn(t);return i.useEffect(()=>{const u=s.current,l=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(l,"checked").set;if(c!==n&&p){const m=new Event("click",{bubbles:o});p.call(u,n),u.dispatchEvent(m)}},[c,n,o]),f.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:s,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Kl(e){return e?"checked":"unchecked"}var Gl=Hl,rw=Vl;const Yl=i.forwardRef(({className:e,tabIndex:t=0,...n},o)=>f.jsx(Gl,{className:R(["ksjsui-peer ksjsui-inline-flex ksjsui-h-6 ksjsui-w-11 ksjsui-shrink-0 ksjsui-cursor-pointer ksjsui-items-center ksjsui-rounded-full ksjsui-border-2 ksjsui-border-transparent ksjsui-bg-neutral ksjsui-transition-colors","focus-visible:ksjsui-outline-none focus-visible:ksjsui-ring-2 focus-visible:ksjsui-ring-ring focus-visible:ksjsui-ring-offset-2 focus-visible:ksjsui-ring-offset-background","disabled:ksjsui-pointer-events-none disabled:ksjsui-cursor-not-allowed disabled:ksjsui-opacity-50","data-[state=unchecked]:ksjsui-bg-input","data-[state=checked]:ksjsui-border-secondary data-[state=checked]:ksjsui-bg-secondary","forced-colors:ksjsui-border-button-border forced-colors:ksjsui-transition-none","forced-colors:data-[state=checked]:ksjsui-border-highlight forced-colors:data-[state=checked]:ksjsui-bg-highlight"],e),tabIndex:t,...n,ref:o,children:f.jsx(rw,{className:R(["ksjsui-pointer-events-none ksjsui-block ksjsui-size-5 ksjsui-translate-x-0 ksjsui-rounded-full ksjsui-bg-thumb ksjsui-shadow ksjsui-ring-0 ksjsui-transition-transform","data-[state=unchecked]:ksjsui-translate-x-0","data-[state=checked]:ksjsui-translate-x-5","rtl:data-[state=checked]:-ksjsui-translate-x-5","forced-colors:ksjsui-bg-button-border forced-colors:ksjsui-transition-none","forced-colors:data-[state=checked]:ksjsui-bg-canvas"])})}));Yl.displayName=Gl.displayName;function sw(e){const t=e+"CollectionProvider",[n,o]=ce(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=v=>{const{scope:w,children:h}=v,g=J.useRef(null),b=J.useRef(new Map).current;return f.jsx(r,{scope:w,itemMap:b,collectionRef:g,children:h})};c.displayName=t;const a=e+"CollectionSlot",u=J.forwardRef((v,w)=>{const{scope:h,children:g}=v,b=s(a,h),y=L(w,b.collectionRef);return f.jsx(ne,{ref:y,children:g})});u.displayName=a;const l=e+"CollectionItemSlot",d="data-radix-collection-item",p=J.forwardRef((v,w)=>{const{scope:h,children:g,...b}=v,y=J.useRef(null),x=L(w,y),E=s(l,h);return J.useEffect(()=>(E.itemMap.set(y,{ref:y,...b}),()=>void E.itemMap.delete(y))),f.jsx(ne,{[d]:"",ref:x,children:g})});p.displayName=l;function m(v){const w=s(e+"CollectionConsumer",v);return J.useCallback(()=>{const g=w.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${d}]`));return Array.from(w.itemMap.values()).sort((E,C)=>b.indexOf(E.ref.current)-b.indexOf(C.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:c,Slot:u,ItemSlot:p},m,o]}var iw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ne=iw.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...c}=o,a=s?ne:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(a,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Xl(e,t){e&&Ae.flushSync(()=>e.dispatchEvent(t))}var aw="DismissableLayer",ir="dismissableLayer.update",cw="dismissableLayer.pointerDownOutside",lw="dismissableLayer.focusOutside",ql,Zl=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ql=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:c,onDismiss:a,...u}=e,l=i.useContext(Zl),[d,p]=i.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=i.useState({}),w=L(t,k=>p(k)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(g),y=d?h.indexOf(d):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,E=y>=b,C=dw(k=>{const P=k.target,N=[...l.branches].some(M=>M.contains(P));!E||N||(r==null||r(k),c==null||c(k),k.defaultPrevented||a==null||a())},m),S=fw(k=>{const P=k.target;[...l.branches].some(M=>M.contains(P))||(s==null||s(k),c==null||c(k),k.defaultPrevented||a==null||a())},m);return bt(k=>{y===l.layers.size-1&&(o==null||o(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},m),i.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(ql=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),eu(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=ql)}},[d,m,n,l]),i.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),eu())},[d,l]),i.useEffect(()=>{const k=()=>v({});return document.addEventListener(ir,k),()=>document.removeEventListener(ir,k)},[]),f.jsx(Ne.div,{...u,ref:w,style:{pointerEvents:x?E?"auto":"none":void 0,...e.style},onFocusCapture:T(e.onFocusCapture,S.onFocusCapture),onBlurCapture:T(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:T(e.onPointerDownCapture,C.onPointerDownCapture)})});Ql.displayName=aw;var uw="DismissableLayerBranch",Jl=i.forwardRef((e,t)=>{const n=i.useContext(Zl),o=i.useRef(null),r=L(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),f.jsx(Ne.div,{...e,ref:r})});Jl.displayName=uw;function dw(e,t=globalThis==null?void 0:globalThis.document){const n=V(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!o.current){let u=function(){tu(cw,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}else t.removeEventListener("click",r.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function fw(e,t=globalThis==null?void 0:globalThis.document){const n=V(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&tu(lw,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function eu(){const e=new CustomEvent(ir);document.dispatchEvent(e)}function tu(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Xl(r,s):r.dispatchEvent(s)}var pw=Ql,hw=Jl,mw="Portal",nu=i.forwardRef((e,t)=>{var a;const{container:n,...o}=e,[r,s]=i.useState(!1);Y(()=>s(!0),[]);const c=n||r&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return c?mt.createPortal(f.jsx(Ne.div,{...o,ref:t}),c):null});nu.displayName=mw;function vw(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var ou=e=>{const{present:t,children:n}=e,o=gw(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=L(o.ref,ww(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};ou.displayName="Presence";function gw(e){const[t,n]=i.useState(),o=i.useRef({}),r=i.useRef(e),s=i.useRef("none"),c=e?"mounted":"unmounted",[a,u]=vw(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const l=yn(o.current);s.current=a==="mounted"?l:"none"},[a]),Y(()=>{const l=o.current,d=r.current;if(d!==e){const m=s.current,v=yn(l);e?u("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),Y(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,p=v=>{const h=yn(o.current).includes(v.animationName);if(v.target===t&&h&&(u("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(s.current=yn(o.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:i.useCallback(l=>{l&&(o.current=getComputedStyle(l)),n(l)},[])}}function yn(e){return(e==null?void 0:e.animationName)||"none"}function ww(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bw="VisuallyHidden",ar=i.forwardRef((e,t)=>f.jsx(Ne.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));ar.displayName=bw;var cr="ToastProvider",[lr,yw,xw]=sw("Toast"),[ru,ny]=ce("Toast",[xw]),[Ew,xn]=ru(cr),su=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:r="right",swipeThreshold:s=50,children:c}=e,[a,u]=i.useState(null),[l,d]=i.useState(0),p=i.useRef(!1),m=i.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${cr}\`. Expected non-empty \`string\`.`),f.jsx(lr.Provider,{scope:t,children:f.jsx(Ew,{scope:t,label:n,duration:o,swipeDirection:r,swipeThreshold:s,toastCount:l,viewport:a,onViewportChange:u,onToastAdd:i.useCallback(()=>d(v=>v+1),[]),onToastRemove:i.useCallback(()=>d(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:m,children:c})})};su.displayName=cr;var iu="ToastViewport",kw=["F8"],ur="toast.viewportPause",dr="toast.viewportResume",au=i.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:o=kw,label:r="Notifications ({hotkey})",...s}=e,c=xn(iu,n),a=yw(n),u=i.useRef(null),l=i.useRef(null),d=i.useRef(null),p=i.useRef(null),m=L(t,p,c.onViewportChange),v=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=c.toastCount>0;i.useEffect(()=>{const g=b=>{var x;o.length!==0&&o.every(E=>b[E]||b.code===E)&&((x=p.current)==null||x.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[o]),i.useEffect(()=>{const g=u.current,b=p.current;if(w&&g&&b){const y=()=>{if(!c.isClosePausedRef.current){const S=new CustomEvent(ur);b.dispatchEvent(S),c.isClosePausedRef.current=!0}},x=()=>{if(c.isClosePausedRef.current){const S=new CustomEvent(dr);b.dispatchEvent(S),c.isClosePausedRef.current=!1}},E=S=>{!g.contains(S.relatedTarget)&&x()},C=()=>{g.contains(document.activeElement)||x()};return g.addEventListener("focusin",y),g.addEventListener("focusout",E),g.addEventListener("pointermove",y),g.addEventListener("pointerleave",C),window.addEventListener("blur",y),window.addEventListener("focus",x),()=>{g.removeEventListener("focusin",y),g.removeEventListener("focusout",E),g.removeEventListener("pointermove",y),g.removeEventListener("pointerleave",C),window.removeEventListener("blur",y),window.removeEventListener("focus",x)}}},[w,c.isClosePausedRef]);const h=i.useCallback(({tabbingDirection:g})=>{const y=a().map(x=>{const E=x.ref.current,C=[E,...Lw(E)];return g==="forwards"?C:C.reverse()});return(g==="forwards"?y.reverse():y).flat()},[a]);return i.useEffect(()=>{const g=p.current;if(g){const b=y=>{var C,S,k;const x=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!x){const P=document.activeElement,N=y.shiftKey;if(y.target===g&&N){(C=l.current)==null||C.focus();return}const I=h({tabbingDirection:N?"backwards":"forwards"}),W=I.findIndex(A=>A===P);hr(I.slice(W+1))?y.preventDefault():N?(S=l.current)==null||S.focus():(k=d.current)==null||k.focus()}};return g.addEventListener("keydown",b),()=>g.removeEventListener("keydown",b)}},[a,h]),f.jsxs(hw,{ref:u,role:"region","aria-label":r.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&f.jsx(fr,{ref:l,onFocusFromOutsideViewport:()=>{const g=h({tabbingDirection:"forwards"});hr(g)}}),f.jsx(lr.Slot,{scope:n,children:f.jsx(Ne.ol,{tabIndex:-1,...s,ref:m})}),w&&f.jsx(fr,{ref:d,onFocusFromOutsideViewport:()=>{const g=h({tabbingDirection:"backwards"});hr(g)}})]})});au.displayName=iu;var cu="ToastFocusProxy",fr=i.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:o,...r}=e,s=xn(cu,n);return f.jsx(ar,{"aria-hidden":!0,tabIndex:0,...r,ref:t,style:{position:"fixed"},onFocus:c=>{var l;const a=c.relatedTarget;!((l=s.viewport)!=null&&l.contains(a))&&o()}})});fr.displayName=cu;var En="Toast",Cw="toast.swipeStart",Sw="toast.swipeMove",Pw="toast.swipeCancel",Tw="toast.swipeEnd",lu=i.forwardRef((e,t)=>{const{forceMount:n,open:o,defaultOpen:r,onOpenChange:s,...c}=e,[a=!0,u]=Me({prop:o,defaultProp:r,onChange:s});return f.jsx(ou,{present:n||a,children:f.jsx(jw,{open:a,...c,ref:t,onClose:()=>u(!1),onPause:V(e.onPause),onResume:V(e.onResume),onSwipeStart:T(e.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:T(e.onSwipeMove,l=>{const{x:d,y:p}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${p}px`)}),onSwipeCancel:T(e.onSwipeCancel,l=>{l.currentTarget.setAttribute("data-swipe","cancel"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:T(e.onSwipeEnd,l=>{const{x:d,y:p}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","end"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${p}px`),u(!1)})})})});lu.displayName=En;var[Nw,Aw]=ru(En,{onClose(){}}),jw=i.forwardRef((e,t)=>{const{__scopeToast:n,type:o="foreground",duration:r,open:s,onClose:c,onEscapeKeyDown:a,onPause:u,onResume:l,onSwipeStart:d,onSwipeMove:p,onSwipeCancel:m,onSwipeEnd:v,...w}=e,h=xn(En,n),[g,b]=i.useState(null),y=L(t,A=>b(A)),x=i.useRef(null),E=i.useRef(null),C=r||h.duration,S=i.useRef(0),k=i.useRef(C),P=i.useRef(0),{onToastAdd:N,onToastRemove:M}=h,$=V(()=>{var U;(g==null?void 0:g.contains(document.activeElement))&&((U=h.viewport)==null||U.focus()),c()}),I=i.useCallback(A=>{!A||A===1/0||(window.clearTimeout(P.current),S.current=new Date().getTime(),P.current=window.setTimeout($,A))},[$]);i.useEffect(()=>{const A=h.viewport;if(A){const U=()=>{I(k.current),l==null||l()},_=()=>{const B=new Date().getTime()-S.current;k.current=k.current-B,window.clearTimeout(P.current),u==null||u()};return A.addEventListener(ur,_),A.addEventListener(dr,U),()=>{A.removeEventListener(ur,_),A.removeEventListener(dr,U)}}},[h.viewport,C,u,l,I]),i.useEffect(()=>{s&&!h.isClosePausedRef.current&&I(C)},[s,C,h.isClosePausedRef,I]),i.useEffect(()=>(N(),()=>M()),[N,M]);const W=i.useMemo(()=>g?vu(g):null,[g]);return h.viewport?f.jsxs(f.Fragment,{children:[W&&f.jsx(Mw,{__scopeToast:n,role:"status","aria-live":o==="foreground"?"assertive":"polite","aria-atomic":!0,children:W}),f.jsx(Nw,{scope:n,onClose:$,children:Ae.createPortal(f.jsx(lr.ItemSlot,{scope:n,children:f.jsx(pw,{asChild:!0,onEscapeKeyDown:T(a,()=>{h.isFocusedToastEscapeKeyDownRef.current||$(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:f.jsx(Ne.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":h.swipeDirection,...w,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:T(e.onKeyDown,A=>{A.key==="Escape"&&(a==null||a(A.nativeEvent),A.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,$()))}),onPointerDown:T(e.onPointerDown,A=>{A.button===0&&(x.current={x:A.clientX,y:A.clientY})}),onPointerMove:T(e.onPointerMove,A=>{if(!x.current)return;const U=A.clientX-x.current.x,_=A.clientY-x.current.y,B=!!E.current,O=["left","right"].includes(h.swipeDirection),j=["left","up"].includes(h.swipeDirection)?Math.min:Math.max,K=O?j(0,U):0,H=O?0:j(0,_),oe=A.pointerType==="touch"?10:2,ie={x:K,y:H},se={originalEvent:A,delta:ie};B?(E.current=ie,kn(Sw,p,se,{discrete:!1})):gu(ie,h.swipeDirection,oe)?(E.current=ie,kn(Cw,d,se,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(U)>oe||Math.abs(_)>oe)&&(x.current=null)}),onPointerUp:T(e.onPointerUp,A=>{const U=E.current,_=A.target;if(_.hasPointerCapture(A.pointerId)&&_.releasePointerCapture(A.pointerId),E.current=null,x.current=null,U){const B=A.currentTarget,O={originalEvent:A,delta:U};gu(U,h.swipeDirection,h.swipeThreshold)?kn(Tw,v,O,{discrete:!0}):kn(Pw,m,O,{discrete:!0}),B.addEventListener("click",j=>j.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),Mw=e=>{const{__scopeToast:t,children:n,...o}=e,r=xn(En,t),[s,c]=i.useState(!1),[a,u]=i.useState(!1);return Dw(()=>c(!0)),i.useEffect(()=>{const l=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(l)},[]),a?null:f.jsx(nu,{asChild:!0,children:f.jsx(ar,{...o,children:s&&f.jsxs(f.Fragment,{children:[r.label," ",n]})})})},Ow="ToastTitle",uu=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return f.jsx(Ne.div,{...o,ref:t})});uu.displayName=Ow;var Iw="ToastDescription",du=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return f.jsx(Ne.div,{...o,ref:t})});du.displayName=Iw;var fu="ToastAction",pu=i.forwardRef((e,t)=>{const{altText:n,...o}=e;return n.trim()?f.jsx(mu,{altText:n,asChild:!0,children:f.jsx(pr,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${fu}\`. Expected non-empty \`string\`.`),null)});pu.displayName=fu;var hu="ToastClose",pr=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e,r=Aw(hu,n);return f.jsx(mu,{asChild:!0,children:f.jsx(Ne.button,{type:"button",...o,ref:t,onClick:T(e.onClick,r.onClose)})})});pr.displayName=hu;var mu=i.forwardRef((e,t)=>{const{__scopeToast:n,altText:o,...r}=e;return f.jsx(Ne.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...r,ref:t})});function vu(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),_w(o)){const r=o.ariaHidden||o.hidden||o.style.display==="none",s=o.dataset.radixToastAnnounceExclude==="";if(!r)if(s){const c=o.dataset.radixToastAnnounceAlt;c&&t.push(c)}else t.push(...vu(o))}}),t}function kn(e,t,n,{discrete:o}){const r=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Xl(r,s):r.dispatchEvent(s)}var gu=(e,t,n=0)=>{const o=Math.abs(e.x),r=Math.abs(e.y),s=o>r;return t==="left"||t==="right"?s&&o>n:!s&&r>n};function Dw(e=()=>{}){const t=V(e);Y(()=>{let n=0,o=0;return n=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(o)}},[t])}function _w(e){return e.nodeType===e.ELEMENT_NODE}function Lw(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function hr(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Rw=su,wu=au,bu=lu,yu=uu,xu=du,Eu=pu,ku=pr;const $w=1,Fw=1e6;let mr=0;function Ww(){return mr=(mr+1)%Number.MAX_SAFE_INTEGER,mr.toString()}const vr=new Map,Cu=e=>{if(vr.has(e))return;const t=setTimeout(()=>{vr.delete(e),Dt({type:"REMOVE_TOAST",toastId:e})},Fw);vr.set(e,t)},Bw=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,$w)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Cu(n):e.toasts.forEach(o=>{Cu(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===n||n===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Cn=[];let Sn={toasts:[]};function Dt(e){Sn=Bw(Sn,e),Cn.forEach(t=>{t(Sn)})}function Uw({...e}){const t=Ww(),n=r=>Dt({type:"UPDATE_TOAST",toast:{...r,id:t}}),o=()=>Dt({type:"DISMISS_TOAST",toastId:t});return Dt({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:r=>{r||o()}}}),{id:t,dismiss:o,update:n}}function Su(){const[e,t]=i.useState(Sn);return i.useEffect(()=>(Cn.push(t),()=>{const n=Cn.indexOf(t);n>-1&&Cn.splice(n,1)}),[e]),{...e,toast:Uw,dismiss:n=>Dt({type:"DISMISS_TOAST",toastId:n})}}let gr={toast:{dismissButtonLabel:"missing ksjsui string"}};const Pu=i.createContext(gr);function Hw({children:e}){const t=i.useRef(gr);return f.jsx(Pu.Provider,{value:t.current,children:e})}function zw(){const e=i.useContext(Pu);if(!e)throw new Error("useStrings must be used inside <StringsProvider />");return e}function Vw(e){gr=e}const Kw=Rw,Tu=i.forwardRef(({className:e,...t},n)=>f.jsx(wu,{ref:n,className:R(["ksjsui-fixed ksjsui-bottom-0 ksjsui-end-0 ksjsui-z-[100] ksjsui-flex ksjsui-max-h-screen ksjsui-w-full ksjsui-flex-col ksjsui-p-4","empty:ksjsui-p-0","empty:focus:ksjsui-outline-none","xs:ksjsui-max-w-[calc(theme(spacing.80)_+_theme(spacing.8))]"],e),...t}));Tu.displayName=wu.displayName;const Gw=et(["ksjsui-group ksjsui-pointer-events-auto ksjsui-relative ksjsui-flex ksjsui-w-full ksjsui-items-center ksjsui-justify-between ksjsui-space-x-2 ksjsui-overflow-hidden ksjsui-rounded-lg ksjsui-border ksjsui-border-transparent ksjsui-bg-toast ksjsui-p-3 ksjsui-text-toast-foreground ksjsui-shadow-lg ksjsui-outline-ring ksjsui-transition-all","rtl:ksjsui-space-x-reverse","focus-visible:ksjsui-outline","data-[swipe=cancel]:ksjsui-translate-x-0","data-[swipe=end]:ksjsui-translate-x-[var(--radix-toast-swipe-end-x)]","data-[swipe=move]:ksjsui-translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:ksjsui-transition-none","data-[state=open]:ksjsui-animate-in data-[state=open]:ksjsui-slide-in-from-bottom-full","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-80","data-[state=closed]:ksjsui-slide-out-to-bottom-full"]),Nu=i.forwardRef(({className:e,...t},n)=>f.jsx(bu,{ref:n,className:R(Gw(),e),...t}));Nu.displayName=bu.displayName;const Yw=i.forwardRef(({className:e,...t},n)=>f.jsx(Eu,{ref:n,className:R(["ksjsui-inline-flex ksjsui-h-8 ksjsui-shrink-0 ksjsui-items-center ksjsui-justify-center ksjsui-rounded-lg ksjsui-border ksjsui-bg-transparent ksjsui-px-3 ksjsui-text-sm ksjsui-font-medium ksjsui-ring-offset-background ksjsui-transition-colors","focus:ksjsui-outline-none focus:ksjsui-ring-2 focus:ksjsui-ring-ring focus:ksjsui-ring-offset-2","disabled:ksjsui-pointer-events-none disabled:ksjsui-opacity-50"],e),...t}));Yw.displayName=Eu.displayName;const Au=i.forwardRef(({className:e,...t},n)=>f.jsx(ku,{ref:n,className:R(["ksjsui-text-current/50 ksjsui-absolute ksjsui-right-1 ksjsui-top-1 ksjsui-self-start ksjsui-rounded-sm ksjsui-p-1 ksjsui-opacity-0 ksjsui-transition-opacity","focus-visible:ksjsui-opacity-100 focus-visible:ksjsui-outline focus-visible:ksjsui-outline-ring","group-hover:ksjsui-opacity-100","group-focus-visible:ksjsui-opacity-100"],e),"toast-close":"",...t,children:f.jsx(qs,{"aria-hidden":!0,className:"ksjsui-size-4"})}));Au.displayName=ku.displayName;const ju=i.forwardRef(({className:e,...t},n)=>f.jsx(yu,{ref:n,className:R("ksjsui-text-[15px] ksjsui-font-semibold",e),...t}));ju.displayName=yu.displayName;const Mu=i.forwardRef(({className:e,...t},n)=>f.jsx(xu,{ref:n,className:R("ksjsui-text-[15px]",e),...t}));Mu.displayName=xu.displayName;const Xw=()=>{const{toasts:e}=Su(),{toast:t}=zw();return f.jsxs(Kw,{children:[e.map(function({id:n,className:o,title:r,description:s,action:c,icon:a,dismissButtonLabel:u,...l}){return f.jsxs(Nu,{...l,className:R("ksjsui-flex ksjsui-gap-x-2",o),children:[a&&f.jsx("div",{className:"ksjsui-shrink-0",children:a}),f.jsxs("div",{className:"ksjsui-grid ksjsui-grow ksjsui-gap-1",children:[r&&f.jsx(ju,{children:r}),s&&f.jsx(Mu,{children:s})]}),c,f.jsx(Au,{"aria-label":u||t.dismissButtonLabel})]},n)}),f.jsx(Tu,{})]})};var qw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Je=qw.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...c}=o,a=s?ne:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(a,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Zw(e,t){e&&Ae.flushSync(()=>e.dispatchEvent(t))}var Qw="DismissableLayer",wr="dismissableLayer.update",Jw="dismissableLayer.pointerDownOutside",eb="dismissableLayer.focusOutside",Ou,Iu=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Du=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:c,onDismiss:a,...u}=e,l=i.useContext(Iu),[d,p]=i.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=i.useState({}),w=L(t,k=>p(k)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(g),y=d?h.indexOf(d):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,E=y>=b,C=ob(k=>{const P=k.target,N=[...l.branches].some(M=>M.contains(P));!E||N||(r==null||r(k),c==null||c(k),k.defaultPrevented||a==null||a())},m),S=rb(k=>{const P=k.target;[...l.branches].some(M=>M.contains(P))||(s==null||s(k),c==null||c(k),k.defaultPrevented||a==null||a())},m);return bt(k=>{y===l.layers.size-1&&(o==null||o(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},m),i.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Ou=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),_u(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Ou)}},[d,m,n,l]),i.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),_u())},[d,l]),i.useEffect(()=>{const k=()=>v({});return document.addEventListener(wr,k),()=>document.removeEventListener(wr,k)},[]),f.jsx(Je.div,{...u,ref:w,style:{pointerEvents:x?E?"auto":"none":void 0,...e.style},onFocusCapture:T(e.onFocusCapture,S.onFocusCapture),onBlurCapture:T(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:T(e.onPointerDownCapture,C.onPointerDownCapture)})});Du.displayName=Qw;var tb="DismissableLayerBranch",nb=i.forwardRef((e,t)=>{const n=i.useContext(Iu),o=i.useRef(null),r=L(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),f.jsx(Je.div,{...e,ref:r})});nb.displayName=tb;function ob(e,t=globalThis==null?void 0:globalThis.document){const n=V(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!o.current){let u=function(){Lu(Jw,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}else t.removeEventListener("click",r.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function rb(e,t=globalThis==null?void 0:globalThis.document){const n=V(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&Lu(eb,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function _u(){const e=new CustomEvent(wr);document.dispatchEvent(e)}function Lu(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Zw(r,s):r.dispatchEvent(s)}var sb="Arrow",Ru=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return f.jsx(Je.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ru.displayName=sb;var ib=Ru,br="Popper",[$u,Fu]=ce(br),[ab,Wu]=$u(br),Bu=e=>{const{__scopePopper:t,children:n}=e,[o,r]=i.useState(null);return f.jsx(ab,{scope:t,anchor:o,onAnchorChange:r,children:n})};Bu.displayName=br;var Uu="PopperAnchor",Hu=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=Wu(Uu,n),c=i.useRef(null),a=L(t,c);return i.useEffect(()=>{s.onAnchorChange((o==null?void 0:o.current)||c.current)}),o?null:f.jsx(Je.div,{...r,ref:a})});Hu.displayName=Uu;var yr="PopperContent",[cb,lb]=$u(yr),zu=i.forwardRef((e,t)=>{var F,X,Q,G,q,Z;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:c=0,arrowPadding:a=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:w,...h}=e,g=Wu(yr,n),[b,y]=i.useState(null),x=L(t,te=>y(te)),[E,C]=i.useState(null),S=rn(E),k=(S==null?void 0:S.width)??0,P=(S==null?void 0:S.height)??0,N=o+(s!=="center"?"-"+s:""),M=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},$=Array.isArray(l)?l:[l],I=$.length>0,W={padding:M,boundary:$.filter(db),altBoundary:I},{refs:A,floatingStyles:U,placement:_,isPositioned:B,middlewareData:O}=wo({strategy:"fixed",placement:N,whileElementsMounted:(...te)=>vo(...te,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[bo({mainAxis:r+P,alignmentAxis:c}),u&&yo({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?xo():void 0,...W}),u&&Eo({...W}),ko({...W,apply:({elements:te,rects:ue,availableWidth:_e,availableHeight:Le})=>{const{width:Re,height:_t}=ue.reference,fe=te.floating.style;fe.setProperty("--radix-popper-available-width",`${_e}px`),fe.setProperty("--radix-popper-available-height",`${Le}px`),fe.setProperty("--radix-popper-anchor-width",`${Re}px`),fe.setProperty("--radix-popper-anchor-height",`${_t}px`)}}),E&&So({element:E,padding:a}),fb({arrowWidth:k,arrowHeight:P}),m&&Co({strategy:"referenceHidden",...W})]}),[j,K]=Gu(_),H=V(w);Y(()=>{B&&(H==null||H())},[B,H]);const oe=(F=O.arrow)==null?void 0:F.x,ie=(X=O.arrow)==null?void 0:X.y,se=((Q=O.arrow)==null?void 0:Q.centerOffset)!==0,[me,ae]=i.useState();return Y(()=>{b&&ae(window.getComputedStyle(b).zIndex)},[b]),f.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:B?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[(G=O.transformOrigin)==null?void 0:G.x,(q=O.transformOrigin)==null?void 0:q.y].join(" "),...((Z=O.hide)==null?void 0:Z.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(cb,{scope:n,placedSide:j,onArrowChange:C,arrowX:oe,arrowY:ie,shouldHideArrow:se,children:f.jsx(Je.div,{"data-side":j,"data-align":K,...h,ref:x,style:{...h.style,animation:B?void 0:"none"}})})})});zu.displayName=yr;var Vu="PopperArrow",ub={top:"bottom",right:"left",bottom:"top",left:"right"},Ku=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=lb(Vu,o),c=ub[s.placedSide];return f.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:f.jsx(ib,{...r,ref:n,style:{...r.style,display:"block"}})})});Ku.displayName=Vu;function db(e){return e!==null}var fb=e=>({name:"transformOrigin",options:e,fn(t){var g,b,y;const{placement:n,rects:o,middlewareData:r}=t,c=((g=r.arrow)==null?void 0:g.centerOffset)!==0,a=c?0:e.arrowWidth,u=c?0:e.arrowHeight,[l,d]=Gu(n),p={start:"0%",center:"50%",end:"100%"}[d],m=(((b=r.arrow)==null?void 0:b.x)??0)+a/2,v=(((y=r.arrow)==null?void 0:y.y)??0)+u/2;let w="",h="";return l==="bottom"?(w=c?p:`${m}px`,h=`${-u}px`):l==="top"?(w=c?p:`${m}px`,h=`${o.floating.height+u}px`):l==="right"?(w=`${-u}px`,h=c?p:`${v}px`):l==="left"&&(w=`${o.floating.width+u}px`,h=c?p:`${v}px`),{data:{x:w,y:h}}}});function Gu(e){const[t,n="center"]=e.split("-");return[t,n]}var pb=Bu,hb=Hu,mb=zu,vb=Ku;function gb(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var Yu=e=>{const{present:t,children:n}=e,o=wb(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=L(o.ref,bb(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};Yu.displayName="Presence";function wb(e){const[t,n]=i.useState(),o=i.useRef({}),r=i.useRef(e),s=i.useRef("none"),c=e?"mounted":"unmounted",[a,u]=gb(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const l=Pn(o.current);s.current=a==="mounted"?l:"none"},[a]),Y(()=>{const l=o.current,d=r.current;if(d!==e){const m=s.current,v=Pn(l);e?u("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),Y(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,p=v=>{const h=Pn(o.current).includes(v.animationName);if(v.target===t&&h&&(u("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(s.current=Pn(o.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:i.useCallback(l=>{l&&(o.current=getComputedStyle(l)),n(l)},[])}}function Pn(e){return(e==null?void 0:e.animationName)||"none"}function bb(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var yb="VisuallyHidden",Xu=i.forwardRef((e,t)=>f.jsx(Je.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Xu.displayName=yb;var xb=Xu,[Tn,ry]=ce("Tooltip",[Fu]),Nn=Fu(),qu="TooltipProvider",Eb=700,xr="tooltip.open",[kb,Er]=Tn(qu),Zu=e=>{const{__scopeTooltip:t,delayDuration:n=Eb,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:s}=e,[c,a]=i.useState(!0),u=i.useRef(!1),l=i.useRef(0);return i.useEffect(()=>{const d=l.current;return()=>window.clearTimeout(d)},[]),f.jsx(kb,{scope:t,isOpenDelayed:c,delayDuration:n,onOpen:i.useCallback(()=>{window.clearTimeout(l.current),a(!1)},[]),onClose:i.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a(!0),o)},[o]),isPointerInTransitRef:u,onPointerInTransitChange:i.useCallback(d=>{u.current=d},[]),disableHoverableContent:r,children:s})};Zu.displayName=qu;var An="Tooltip",[Cb,jn]=Tn(An),Qu=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r=!1,onOpenChange:s,disableHoverableContent:c,delayDuration:a}=e,u=Er(An,e.__scopeTooltip),l=Nn(t),[d,p]=i.useState(null),m=ve(),v=i.useRef(0),w=c??u.disableHoverableContent,h=a??u.delayDuration,g=i.useRef(!1),[b=!1,y]=Me({prop:o,defaultProp:r,onChange:k=>{k?(u.onOpen(),document.dispatchEvent(new CustomEvent(xr))):u.onClose(),s==null||s(k)}}),x=i.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),E=i.useCallback(()=>{window.clearTimeout(v.current),v.current=0,g.current=!1,y(!0)},[y]),C=i.useCallback(()=>{window.clearTimeout(v.current),v.current=0,y(!1)},[y]),S=i.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{g.current=!0,y(!0),v.current=0},h)},[h,y]);return i.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),f.jsx(pb,{...l,children:f.jsx(Cb,{scope:t,contentId:m,open:b,stateAttribute:x,trigger:d,onTriggerChange:p,onTriggerEnter:i.useCallback(()=>{u.isOpenDelayed?S():E()},[u.isOpenDelayed,S,E]),onTriggerLeave:i.useCallback(()=>{w?C():(window.clearTimeout(v.current),v.current=0)},[C,w]),onOpen:E,onClose:C,disableHoverableContent:w,children:n})})};Qu.displayName=An;var kr="TooltipTrigger",Ju=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=jn(kr,n),s=Er(kr,n),c=Nn(n),a=i.useRef(null),u=L(t,a,r.onTriggerChange),l=i.useRef(!1),d=i.useRef(!1),p=i.useCallback(()=>l.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),f.jsx(hb,{asChild:!0,...c,children:f.jsx(Je.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:u,onPointerMove:T(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),d.current=!0)}),onPointerLeave:T(e.onPointerLeave,()=>{r.onTriggerLeave(),d.current=!1}),onPointerDown:T(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:T(e.onFocus,()=>{l.current||r.onOpen()}),onBlur:T(e.onBlur,r.onClose),onClick:T(e.onClick,r.onClose)})})});Ju.displayName=kr;var Sb="TooltipPortal",[sy,Pb]=Tn(Sb,{forceMount:void 0}),ht="TooltipContent",ed=i.forwardRef((e,t)=>{const n=Pb(ht,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...s}=e,c=jn(ht,e.__scopeTooltip);return f.jsx(Yu,{present:o||c.open,children:c.disableHoverableContent?f.jsx(td,{side:r,...s,ref:t}):f.jsx(Tb,{side:r,...s,ref:t})})}),Tb=i.forwardRef((e,t)=>{const n=jn(ht,e.__scopeTooltip),o=Er(ht,e.__scopeTooltip),r=i.useRef(null),s=L(t,r),[c,a]=i.useState(null),{trigger:u,onClose:l}=n,d=r.current,{onPointerInTransitChange:p}=o,m=i.useCallback(()=>{a(null),p(!1)},[p]),v=i.useCallback((w,h)=>{const g=w.currentTarget,b={x:w.clientX,y:w.clientY},y=jb(b,g.getBoundingClientRect()),x=Mb(b,y),E=Ob(h.getBoundingClientRect()),C=Db([...x,...E]);a(C),p(!0)},[p]);return i.useEffect(()=>()=>m(),[m]),i.useEffect(()=>{if(u&&d){const w=g=>v(g,d),h=g=>v(g,u);return u.addEventListener("pointerleave",w),d.addEventListener("pointerleave",h),()=>{u.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",h)}}},[u,d,v,m]),i.useEffect(()=>{if(c){const w=h=>{const g=h.target,b={x:h.clientX,y:h.clientY},y=(u==null?void 0:u.contains(g))||(d==null?void 0:d.contains(g)),x=!Ib(b,c);y?m():x&&(m(),l())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[u,d,c,l,m]),f.jsx(td,{...e,ref:s})}),[Nb,Ab]=Tn(An,{isInside:!1}),td=i.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:c,...a}=e,u=jn(ht,n),l=Nn(n),{onClose:d}=u;return i.useEffect(()=>(document.addEventListener(xr,d),()=>document.removeEventListener(xr,d)),[d]),i.useEffect(()=>{if(u.trigger){const p=m=>{const v=m.target;v!=null&&v.contains(u.trigger)&&d()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,d]),f.jsx(Du,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:p=>p.preventDefault(),onDismiss:d,children:f.jsxs(mb,{"data-state":u.stateAttribute,...l,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[f.jsx(On,{children:o}),f.jsx(Nb,{scope:n,isInside:!0,children:f.jsx(xb,{id:u.contentId,role:"tooltip",children:r||o})})]})})});ed.displayName=ht;var nd="TooltipArrow",od=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Nn(n);return Ab(nd,n).isInside?null:f.jsx(vb,{...r,...o,ref:t})});od.displayName=nd;function jb(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,o,r,s)){case s:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Mb(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function Ob(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function Ib(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const a=t[s].x,u=t[s].y,l=t[c].x,d=t[c].y;u>o!=d>o&&n<(l-a)*(o-u)/(d-u)+a&&(r=!r)}return r}function Db(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),_b(t)}function _b(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const s=t[t.length-1],c=t[t.length-2];if((s.x-c.x)*(r.y-c.y)>=(s.y-c.y)*(r.x-c.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const s=n[n.length-1],c=n[n.length-2];if((s.x-c.x)*(r.y-c.y)>=(s.y-c.y)*(r.x-c.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Lb=Zu,Rb=Qu,$b=Ju,rd=ed,Fb=od;const Wb=({disableHoverableContent:e=!0,...t})=>f.jsx(Lb,{disableHoverableContent:e,...t}),Bb=Rb,Ub=$b,sd=i.forwardRef(({children:e,className:t,collisionPadding:n={left:12,right:12},side:o="bottom",sideOffset:r=4,...s},c)=>f.jsxs(rd,{ref:c,sideOffset:r,side:o,collisionPadding:n,className:R(["ksjsui-z-50 ksjsui-max-w-[var(--radix-popper-available-width)] ksjsui-rounded ksjsui-bg-popover-foreground ksjsui-px-3 ksjsui-py-2 ksjsui-text-[15px] ksjsui-text-popover ksjsui-shadow-md ksjsui-animate-in ksjsui-fade-in-0 ksjsui-zoom-in-95","sm:ksjsui-max-w-prose","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-0 data-[state=closed]:ksjsui-zoom-out-95","data-[side=top]:ksjsui-slide-in-from-bottom-2","data-[side=right]:ksjsui-slide-in-from-left-2","data-[side=left]:ksjsui-slide-in-from-right-2","data-[side=bottom]:ksjsui-slide-in-from-top-2","forced-colors:ksjsui-border forced-colors:ksjsui-border-canvas-text"],t),...s,children:[e,f.jsx(Fb,{className:R(["ksjsui-fill-popover-foreground ksjsui-shadow-md","forced-colors:ksjsui-fill-canvas-text"])})]}));sd.displayName=rd.displayName;const Cr=["px",0,.5,1,1.5,2,2.5,3,3.5,4,5,6,7,8,9,10,11,12,14,16,20,24,28,32,36,40,44,48,52,56,60,64,72,80,96],Hb=[...Cr,"auto"];function zb(){return Cr.reduce((e,t)=>(e.gap[t]=`ksjsui-gap-${t}`,e.gapColumn[t]=`ksjsui-gap-x-${t}`,e.gapRow[t]=`ksjsui-gap-y-${t}`,e),{gap:{},gapColumn:{},gapRow:{}})}function id(){return Hb.reduce((e,t)=>(e.m[t]=`ksjsui-m-${t}`,e.mb[t]=`ksjsui-mb-${t}`,e.me[t]=`ksjsui-me-${t}`,e.ms[t]=`ksjsui-ms-${t}`,e.mt[t]=`ksjsui-mt-${t}`,e.mx[t]=`ksjsui-mx-${t}`,e.my[t]=`ksjsui-my-${t}`,e),{m:{},mb:{},me:{},ms:{},mt:{},mx:{},my:{}})}function ad(){return Cr.reduce((e,t)=>(e.p[t]=`ksjsui-p-${t}`,e.pb[t]=`ksjsui-pb-${t}`,e.pe[t]=`ksjsui-pe-${t}`,e.ps[t]=`ksjsui-ps-${t}`,e.pt[t]=`ksjsui-pt-${t}`,e.px[t]=`ksjsui-px-${t}`,e.py[t]=`ksjsui-py-${t}`,e),{p:{},pb:{},pe:{},ps:{},pt:{},px:{},py:{}})}const Vb=et("",{variants:{display:{block:"ksjsui-block","inline-block":"ksjsui-inline-block",none:"ksjsui-hidden"},...id(),...ad()},defaultVariants:{display:"block"}}),cd=i.forwardRef(({as:e="div",asChild:t,className:n,display:o,m:r,mb:s,me:c,ms:a,mt:u,mx:l,my:d,p,pb:m,pe:v,ps:w,pt:h,px:g,py:b,...y},x)=>{const E=t?ne:e;return f.jsx(E,{className:R(Vb({display:o,m:r,mb:s,me:c,ms:a,mt:u,mx:l,my:d,p,pb:m,pe:v,ps:w,pt:h,px:g,py:b,className:n})),ref:x,...y})});cd.displayName="Box";const Kb={align:{baseline:"ksjsui-items-baseline",center:"ksjsui-items-center",end:"ksjsui-items-end",start:"ksjsui-items-start",stretch:"ksjsui-items-stretch"},direction:{"column-reverse":"ksjsui-flex-col-reverse","row-reverse":"ksjsui-flex-row-reverse",column:"ksjsui-flex-col",row:"ksjsui-flex-row"},display:{"inline-flex":"ksjsui-inline-flex",flex:"ksjsui-flex",none:"ksjsui-hidden"},...zb(),grow:{0:"ksjsui-grow-0",1:"ksjsui-grow"},justify:{around:"ksjsui-justify-around",baseline:"ksjsui-justify-baseline",between:"ksjsui-justify-between",center:"ksjsui-justify-center",end:"ksjsui-justify-end",evenly:"ksjsui-justify-evenly",normal:"ksjsui-justify-normal",start:"ksjsui-justify-start",stretch:"ksjsui-justify-stretch"},...id(),...ad(),self:{auto:"ksjsui-self-auto",baseline:"ksjsui-self-baseline",center:"ksjsui-self-center",end:"ksjsui-self-end",start:"ksjsui-self-start",stretch:"ksjsui-self-stretch"},shrink:{0:"ksjsui-shrink-0",1:"ksjsui-shrink"},wrap:{nowrap:"ksjsui-flex-nowrap",reverse:"ksjsui-flex-wrap-reverse",wrap:"ksjsui-flex-wrap"}},Gb=et("ksjsui-inline-flex",{variants:{...Kb},defaultVariants:{display:"flex",justify:"start"}}),ld=i.forwardRef(({align:e,as:t="div",asChild:n,className:o,display:r,direction:s,gap:c,gapColumn:a,gapRow:u,grow:l,justify:d,m:p,mb:m,me:v,ms:w,mt:h,mx:g,my:b,p:y,pb:x,pe:E,ps:C,pt:S,px:k,py:P,self:N,shrink:M,wrap:$,...I},W)=>{const A=n?ne:t;return f.jsx(A,{className:R(Gb({align:e,direction:s,display:r,gap:c,gapColumn:a,gapRow:u,grow:l,justify:d,m:p,mb:m,me:v,ms:w,mt:h,mx:g,my:b,p:y,pb:x,pe:E,ps:C,pt:S,px:k,py:P,self:N,shrink:M,wrap:$,className:o})),ref:W,...I})});ld.displayName="Flex",D.Avatar=qr,D.AvatarFallback=Qr,D.AvatarImage=Zr,D.Box=cd,D.Button=$n,D.Dialog=Np,D.DialogClose=jp,D.DialogContent=Qs,D.DialogDescription=ni,D.DialogFooter=ei,D.DialogHeader=Js,D.DialogOverlay=eo,D.DialogPortal=Zs,D.DialogTitle=ti,D.DialogTrigger=Ap,D.DirectionProvider=Op,D.DropdownMenu=vv,D.DropdownMenuCheckboxItem=sc,D.DropdownMenuContent=oc,D.DropdownMenuGroup=ec,D.DropdownMenuItem=rc,D.DropdownMenuLabel=ac,D.DropdownMenuPortal=wv,D.DropdownMenuRadioGroup=yv,D.DropdownMenuRadioItem=ic,D.DropdownMenuSeparator=cc,D.DropdownMenuShortcut=lc,D.DropdownMenuSub=bv,D.DropdownMenuSubContent=nc,D.DropdownMenuSubTrigger=tc,D.DropdownMenuTrigger=gv,D.Flex=ld,D.IconButton=uc,D.List=dc,D.ListItem=fc,D.ListItemArrow=pc,D.ListItemButton=hc,D.ListItemText=mc,D.ListLabel=vc,D.ListSeparator=gc,D.ScrollArea=Vo,D.ScrollAreaViewport=Ko,D.ScrollBar=Go,D.Select=zg,D.SelectContent=Ll,D.SelectItem=Rl,D.SelectTrigger=_l,D.SelectValue=Vg,D.Separator=Bl,D.StringsProvider=Hw,D.Switch=Yl,D.Toast=Xw,D.Tooltip=Bb,D.TooltipContent=sd,D.TooltipProvider=Wb,D.TooltipTrigger=Ub,D.configureStrings=Vw,D.useToast=Su,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},yp="DialogDescriptionWarning",Cp=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Hs(yp).contentName}}.`;return i.useEffect(()=>{var s;const r=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},xp=js,Ep=Os,kp=Ds,Vs=_s,Ks=Ls,Gs=$s,Ys=Ws,Xs=Us;const Sp=Ee("Accessibility",f.jsx("path",{d:"M20.5 6C17.89 6.7 14.83 7 12 7C9.17 7 6.11 6.7 3.5 6L3 8C4.86 8.5 7 8.83 9 9V22H11V16H13V22H15V9C17 8.83 19.14 8.5 21 8L20.5 6ZM12 6C13.1 6 14 5.1 14 4C14 2.9 13.1 2 12 2C10.9 2 10 2.9 10 4C10 5.1 10.9 6 12 6Z"})),Pp=f.jsxs(f.Fragment,{children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM10 18L5 13L6.41 11.59L10 15.17L17.59 7.58L19 9L10 18Z"}),f.jsx("mask",{id:"mask0_218_12663",maskUnits:"userSpaceOnUse",x:"2",y:"2",width:"20",height:"20",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM10 18L5 13L6.41 11.59L10 15.17L17.59 7.58L19 9L10 18Z"})}),f.jsx("g",{mask:"url(#mask0_218_12663)",children:f.jsx("rect",{width:"24",height:"24",fill:"white"})})]}),Tp=Ee("Accept",Pp),eo=Ee("Check",f.jsx("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"})),Zs=Ee("ArrowDown",f.jsx("path",{d:"M7 10.041L12 14.939L17 10.041H7Z"})),to=Ee("ChevronLeft",f.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),no=Ee("ChevronRight",f.jsx("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),oo=Ee("Close",f.jsx("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z"})),Np=Ee("Radio",f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.66669 9.99999C1.66669 5.39999 5.40002 1.66666 10 1.66666C14.6 1.66666 18.3334 5.39999 18.3334 9.99999C18.3334 14.6 14.6 18.3333 10 18.3333C5.40002 18.3333 1.66669 14.6 1.66669 9.99999ZM3.33335 9.99999C3.33335 13.6833 6.31669 16.6667 10 16.6667C13.6834 16.6667 16.6667 13.6833 16.6667 9.99999C16.6667 6.31666 13.6834 3.33332 10 3.33332C6.31669 3.33332 3.33335 6.31666 3.33335 9.99999Z"})),qs=Ee("RadioSelected",f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 1.66666C5.40002 1.66666 1.66669 5.39999 1.66669 9.99999C1.66669 14.6 5.40002 18.3333 10 18.3333C14.6 18.3333 18.3334 14.6 18.3334 9.99999C18.3334 5.39999 14.6 1.66666 10 1.66666ZM10 5.83332C7.70002 5.83332 5.83335 7.69999 5.83335 9.99999C5.83335 12.3 7.70002 14.1667 10 14.1667C12.3 14.1667 14.1667 12.3 14.1667 9.99999C14.1667 7.69999 12.3 5.83332 10 5.83332ZM3.33335 9.99999C3.33335 13.6833 6.31669 16.6667 10 16.6667C13.6834 16.6667 16.6667 13.6833 16.6667 9.99999C16.6667 6.31666 13.6834 3.33332 10 3.33332C6.31669 3.33332 3.33335 6.31666 3.33335 9.99999Z"})),Ap=Ee("ThreeDots",f.jsx("path",{d:"M12 8C13.1 8 14 7.1 14 6C14 4.9 13.1 4 12 4C10.9 4 10 4.9 10 6C10 7.1 10.9 8 12 8ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10ZM12 16C10.9 16 10 16.9 10 18C10 19.1 10.9 20 12 20C13.1 20 14 19.1 14 18C14 16.9 13.1 16 12 16Z"})),jp=xp,Mp=Ep,Qs=kp,Op=Xs,ro=i.forwardRef(({className:e,...t},n)=>f.jsx(Vs,{ref:n,className:R(["ksjsui-fixed ksjsui-inset-0 ksjsui-z-50 ksjsui-bg-black/80","data-[state=open]:ksjsui-animate-in data-[state=open]:ksjsui-fade-in-0","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-0"],e),...t}));ro.displayName=Vs.displayName;const Js=i.forwardRef(({className:e,children:t,...n},o)=>f.jsxs(Qs,{children:[f.jsx(ro,{}),f.jsxs(Ks,{ref:o,className:R(["ksjsui-fixed ksjsui-left-[50%] ksjsui-top-[50%] ksjsui-z-50 ksjsui-grid ksjsui-w-full ksjsui-max-w-lg ksjsui-translate-x-[-50%] ksjsui-translate-y-[-50%] ksjsui-gap-4 ksjsui-border ksjsui-bg-background ksjsui-p-6 ksjsui-shadow-lg ksjsui-duration-200","data-[state=open]:ksjsui-animate-in data-[state=open]:ksjsui-fade-in-0 data-[state=open]:ksjsui-zoom-in-95 data-[state=open]:ksjsui-slide-in-from-left-1/2 data-[state=open]:ksjsui-slide-in-from-top-[48%]","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-0 data-[state=closed]:ksjsui-zoom-out-95 data-[state=closed]:ksjsui-slide-out-to-left-1/2 data-[state=closed]:ksjsui-slide-out-to-top-[48%]","sm:ksjsui-rounded-lg"],e),...n,children:[t,f.jsxs(Xs,{className:R(["ksjsui-absolute ksjsui-end-4 ksjsui-top-4 ksjsui-rounded-sm ksjsui-opacity-70 ksjsui-ring-offset-background ksjsui-transition-opacity hover:ksjsui-opacity-100","focus:ksjsui-outline-none focus:ksjsui-ring-2 focus:ksjsui-ring-ring focus:ksjsui-ring-offset-2","disabled:ksjsui-pointer-events-none"]),children:[f.jsx(oo,{className:"ksjsui-size-4"}),f.jsx("span",{className:"ksjsui-sr-only",children:"Close"})]})]})]}));Js.displayName=Ks.displayName;const ei=({className:e,...t})=>f.jsx("div",{className:R("ksjsui-flex ksjsui-flex-col ksjsui-space-y-1.5",e),...t});ei.displayName="DialogHeader";const ti=({className:e,...t})=>f.jsx("div",{className:R(["ksjsui-flex ksjsui-flex-col-reverse","sm:ksjsui-flex-row sm:ksjsui-justify-end sm:ksjsui-space-x-2"],e),...t});ti.displayName="DialogFooter";const ni=i.forwardRef(({className:e,...t},n)=>f.jsx(Gs,{ref:n,className:R("ksjsui-text-lg ksjsui-font-semibold ksjsui-leading-none ksjsui-tracking-tight",e),...t}));ni.displayName=Gs.displayName;const oi=i.forwardRef(({className:e,...t},n)=>f.jsx(Ys,{ref:n,className:R("ksjsui-text-sm",e),...t}));oi.displayName=Ys.displayName;var Ip=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],de=Ip.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...c}=o,a=s?ne:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(a,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ri(e,t){e&&je.flushSync(()=>e.dispatchEvent(t))}function si(e){const t=e+"CollectionProvider",[n,o]=ce(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=v=>{const{scope:w,children:h}=v,g=J.useRef(null),b=J.useRef(new Map).current;return f.jsx(r,{scope:w,itemMap:b,collectionRef:g,children:h})};c.displayName=t;const a=e+"CollectionSlot",u=J.forwardRef((v,w)=>{const{scope:h,children:g}=v,b=s(a,h),y=L(w,b.collectionRef);return f.jsx(ne,{ref:y,children:g})});u.displayName=a;const l=e+"CollectionItemSlot",d="data-radix-collection-item",p=J.forwardRef((v,w)=>{const{scope:h,children:g,...b}=v,y=J.useRef(null),C=L(w,y),x=s(l,h);return J.useEffect(()=>(x.itemMap.set(y,{ref:y,...b}),()=>void x.itemMap.delete(y))),f.jsx(ne,{[d]:"",ref:C,children:g})});p.displayName=l;function m(v){const w=s(e+"CollectionConsumer",v);return J.useCallback(()=>{const g=w.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${d}]`));return Array.from(w.itemMap.values()).sort((x,k)=>b.indexOf(x.ref.current)-b.indexOf(k.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:c,Slot:u,ItemSlot:p},m,o]}var ii=i.createContext(void 0),Dp=e=>{const{dir:t,children:n}=e;return f.jsx(ii.Provider,{value:t,children:n})};function Yt(e){const t=i.useContext(ii);return e||t||"ltr"}var _p="DismissableLayer",so="dismissableLayer.update",Lp="dismissableLayer.pointerDownOutside",Rp="dismissableLayer.focusOutside",ai,ci=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),li=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:c,onDismiss:a,...u}=e,l=i.useContext(ci),[d,p]=i.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=i.useState({}),w=L(t,E=>p(E)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(g),y=d?h.indexOf(d):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,x=y>=b,k=Wp(E=>{const P=E.target,N=[...l.branches].some(M=>M.contains(P));!x||N||(r==null||r(E),c==null||c(E),E.defaultPrevented||a==null||a())},m),S=Bp(E=>{const P=E.target;[...l.branches].some(M=>M.contains(P))||(s==null||s(E),c==null||c(E),E.defaultPrevented||a==null||a())},m);return bt(E=>{y===l.layers.size-1&&(o==null||o(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},m),i.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(ai=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),ui(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=ai)}},[d,m,n,l]),i.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),ui())},[d,l]),i.useEffect(()=>{const E=()=>v({});return document.addEventListener(so,E),()=>document.removeEventListener(so,E)},[]),f.jsx(de.div,{...u,ref:w,style:{pointerEvents:C?x?"auto":"none":void 0,...e.style},onFocusCapture:T(e.onFocusCapture,S.onFocusCapture),onBlurCapture:T(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:T(e.onPointerDownCapture,k.onPointerDownCapture)})});li.displayName=_p;var $p="DismissableLayerBranch",Fp=i.forwardRef((e,t)=>{const n=i.useContext(ci),o=i.useRef(null),r=L(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),f.jsx(de.div,{...e,ref:r})});Fp.displayName=$p;function Wp(e,t=globalThis==null?void 0:globalThis.document){const n=V(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!o.current){let u=function(){di(Lp,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}else t.removeEventListener("click",r.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Bp(e,t=globalThis==null?void 0:globalThis.document){const n=V(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&di(Rp,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function ui(){const e=new CustomEvent(so);document.dispatchEvent(e)}function di(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?ri(r,s):r.dispatchEvent(s)}var io="focusScope.autoFocusOnMount",ao="focusScope.autoFocusOnUnmount",fi={bubbles:!1,cancelable:!0},Up="FocusScope",pi=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...c}=e,[a,u]=i.useState(null),l=V(r),d=V(s),p=i.useRef(null),m=L(t,h=>u(h)),v=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let h=function(C){if(v.paused||!a)return;const x=C.target;a.contains(x)?p.current=x:Ue(p.current,{select:!0})},g=function(C){if(v.paused||!a)return;const x=C.relatedTarget;x!==null&&(a.contains(x)||Ue(p.current,{select:!0}))},b=function(C){if(document.activeElement===document.body)for(const k of C)k.removedNodes.length>0&&Ue(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const y=new MutationObserver(b);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),y.disconnect()}}},[o,a,v.paused]),i.useEffect(()=>{if(a){vi.add(v);const h=document.activeElement;if(!a.contains(h)){const b=new CustomEvent(io,fi);a.addEventListener(io,l),a.dispatchEvent(b),b.defaultPrevented||(zp(Yp(hi(a)),{select:!0}),document.activeElement===h&&Ue(a))}return()=>{a.removeEventListener(io,l),setTimeout(()=>{const b=new CustomEvent(ao,fi);a.addEventListener(ao,d),a.dispatchEvent(b),b.defaultPrevented||Ue(h??document.body,{select:!0}),a.removeEventListener(ao,d),vi.remove(v)},0)}}},[a,l,d,v]);const w=i.useCallback(h=>{if(!n&&!o||v.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,b=document.activeElement;if(g&&b){const y=h.currentTarget,[C,x]=Hp(y);C&&x?!h.shiftKey&&b===x?(h.preventDefault(),n&&Ue(C,{select:!0})):h.shiftKey&&b===C&&(h.preventDefault(),n&&Ue(x,{select:!0})):b===y&&h.preventDefault()}},[n,o,v.paused]);return f.jsx(de.div,{tabIndex:-1,...c,ref:m,onKeyDown:w})});pi.displayName=Up;function zp(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Ue(o,{select:t}),document.activeElement!==n)return}function Hp(e){const t=hi(e),n=mi(t,e),o=mi(t.reverse(),e);return[n,o]}function hi(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function mi(e,t){for(const n of e)if(!Vp(n,{upTo:t}))return n}function Vp(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 Kp(e){return e instanceof HTMLInputElement&&"select"in e}function Ue(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Kp(e)&&t&&e.select()}}var vi=Gp();function Gp(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=gi(e,t),e.unshift(t)},remove(t){var n;e=gi(e,t),(n=e[0])==null||n.resume()}}}function gi(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Yp(e){return e.filter(t=>t.tagName!=="A")}const Xp=["top","right","bottom","left"],ze=Math.min,pe=Math.max,Xt=Math.round,Zt=Math.floor,Se=e=>({x:e,y:e}),Zp={left:"right",right:"left",bottom:"top",top:"bottom"},qp={start:"end",end:"start"};function co(e,t,n){return pe(e,ze(t,n))}function De(e,t){return typeof e=="function"?e(t):e}function _e(e){return e.split("-")[0]}function ct(e){return e.split("-")[1]}function lo(e){return e==="x"?"y":"x"}function uo(e){return e==="y"?"height":"width"}function He(e){return["top","bottom"].includes(_e(e))?"y":"x"}function fo(e){return lo(He(e))}function Qp(e,t,n){n===void 0&&(n=!1);const o=ct(e),r=fo(e),s=uo(r);let c=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=qt(c)),[c,qt(c)]}function Jp(e){const t=qt(e);return[po(e),t,po(t)]}function po(e){return e.replace(/start|end/g,t=>qp[t])}function eh(e,t,n){const o=["left","right"],r=["right","left"],s=["top","bottom"],c=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?s:c;default:return[]}}function th(e,t,n,o){const r=ct(e);let s=eh(_e(e),n==="start",o);return r&&(s=s.map(c=>c+"-"+r),t&&(s=s.concat(s.map(po)))),s}function qt(e){return e.replace(/left|right|bottom|top/g,t=>Zp[t])}function nh(e){return{top:0,right:0,bottom:0,left:0,...e}}function wi(e){return typeof e!="number"?nh(e):{top:e,right:e,bottom:e,left:e}}function Qt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function bi(e,t,n){let{reference:o,floating:r}=e;const s=He(t),c=fo(t),a=uo(c),u=_e(t),l=s==="y",d=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,m=o[a]/2-r[a]/2;let v;switch(u){case"top":v={x:d,y:o.y-r.height};break;case"bottom":v={x:d,y:o.y+o.height};break;case"right":v={x:o.x+o.width,y:p};break;case"left":v={x:o.x-r.width,y:p};break;default:v={x:o.x,y:o.y}}switch(ct(t)){case"start":v[c]-=m*(n&&l?-1:1);break;case"end":v[c]+=m*(n&&l?-1:1);break}return v}const oh=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:c}=n,a=s.filter(Boolean),u=await(c.isRTL==null?void 0:c.isRTL(t));let l=await c.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:p}=bi(l,o,u),m=o,v={},w=0;for(let h=0;h<a.length;h++){const{name:g,fn:b}=a[h],{x:y,y:C,data:x,reset:k}=await b({x:d,y:p,initialPlacement:o,placement:m,strategy:r,middlewareData:v,rects:l,platform:c,elements:{reference:e,floating:t}});d=y??d,p=C??p,v={...v,[g]:{...v[g],...x}},k&&w<=50&&(w++,typeof k=="object"&&(k.placement&&(m=k.placement),k.rects&&(l=k.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:r}):k.rects),{x:d,y:p}=bi(l,m,u)),h=-1)}return{x:d,y:p,placement:m,strategy:r,middlewareData:v}};async function yt(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:c,elements:a,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:m=!1,padding:v=0}=De(t,e),w=wi(v),g=a[m?p==="floating"?"reference":"floating":p],b=Qt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:u})),y=p==="floating"?{x:o,y:r,width:c.floating.width,height:c.floating.height}:c.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),x=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},k=Qt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:C,strategy:u}):y);return{top:(b.top-k.top+w.top)/x.y,bottom:(k.bottom-b.bottom+w.bottom)/x.y,left:(b.left-k.left+w.left)/x.x,right:(k.right-b.right+w.right)/x.x}}const rh=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:c,elements:a,middlewareData:u}=t,{element:l,padding:d=0}=De(e,t)||{};if(l==null)return{};const p=wi(d),m={x:n,y:o},v=fo(r),w=uo(v),h=await c.getDimensions(l),g=v==="y",b=g?"top":"left",y=g?"bottom":"right",C=g?"clientHeight":"clientWidth",x=s.reference[w]+s.reference[v]-m[v]-s.floating[w],k=m[v]-s.reference[v],S=await(c.getOffsetParent==null?void 0:c.getOffsetParent(l));let E=S?S[C]:0;(!E||!await(c.isElement==null?void 0:c.isElement(S)))&&(E=a.floating[C]||s.floating[w]);const P=x/2-k/2,N=E/2-h[w]/2-1,M=ze(p[b],N),$=ze(p[y],N),D=M,W=E-h[w]-$,A=E/2-h[w]/2+P,U=co(D,A,W),_=!u.arrow&&ct(r)!=null&&A!==U&&s.reference[w]/2-(A<D?M:$)-h[w]/2<0,B=_?A<D?A-D:A-W:0;return{[v]:m[v]+B,data:{[v]:U,centerOffset:A-U-B,..._&&{alignmentOffset:B}},reset:_}}}),sh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:c,initialPlacement:a,platform:u,elements:l}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:h=!0,...g}=De(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=_e(r),y=He(a),C=_e(a)===a,x=await(u.isRTL==null?void 0:u.isRTL(l.floating)),k=m||(C||!h?[qt(a)]:Jp(a)),S=w!=="none";!m&&S&&k.push(...th(a,h,w,x));const E=[a,...k],P=await yt(t,g),N=[];let M=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&N.push(P[b]),p){const A=Qp(r,c,x);N.push(P[A[0]],P[A[1]])}if(M=[...M,{placement:r,overflows:N}],!N.every(A=>A<=0)){var $,D;const A=((($=s.flip)==null?void 0:$.index)||0)+1,U=E[A];if(U)return{data:{index:A,overflows:M},reset:{placement:U}};let _=(D=M.filter(B=>B.overflows[0]<=0).sort((B,I)=>B.overflows[1]-I.overflows[1])[0])==null?void 0:D.placement;if(!_)switch(v){case"bestFit":{var W;const B=(W=M.filter(I=>{if(S){const j=He(I.placement);return j===y||j==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(j=>j>0).reduce((j,K)=>j+K,0)]).sort((I,j)=>I[1]-j[1])[0])==null?void 0:W[0];B&&(_=B);break}case"initialPlacement":_=a;break}if(r!==_)return{reset:{placement:_}}}return{}}}};function yi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ci(e){return Xp.some(t=>e[t]>=0)}const ih=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=De(e,t);switch(o){case"referenceHidden":{const s=await yt(t,{...r,elementContext:"reference"}),c=yi(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Ci(c)}}}case"escaped":{const s=await yt(t,{...r,altBoundary:!0}),c=yi(s,n.floating);return{data:{escapedOffsets:c,escaped:Ci(c)}}}default:return{}}}}};async function ah(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),c=_e(n),a=ct(n),u=He(n)==="y",l=["left","top"].includes(c)?-1:1,d=s&&u?-1:1,p=De(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof w=="number"&&(v=a==="end"?w*-1:w),u?{x:v*d,y:m*l}:{x:m*l,y:v*d}}const ch=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:c,middlewareData:a}=t,u=await ah(t,e);return c===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:r+u.x,y:s+u.y,data:{...u,placement:c}}}}},lh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:a={fn:g=>{let{x:b,y}=g;return{x:b,y}}},...u}=De(e,t),l={x:n,y:o},d=await yt(t,u),p=He(_e(r)),m=lo(p);let v=l[m],w=l[p];if(s){const g=m==="y"?"top":"left",b=m==="y"?"bottom":"right",y=v+d[g],C=v-d[b];v=co(y,v,C)}if(c){const g=p==="y"?"top":"left",b=p==="y"?"bottom":"right",y=w+d[g],C=w-d[b];w=co(y,w,C)}const h=a.fn({...t,[m]:v,[p]:w});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[m]:s,[p]:c}}}}}},uh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:c}=t,{offset:a=0,mainAxis:u=!0,crossAxis:l=!0}=De(e,t),d={x:n,y:o},p=He(r),m=lo(p);let v=d[m],w=d[p];const h=De(a,t),g=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const C=m==="y"?"height":"width",x=s.reference[m]-s.floating[C]+g.mainAxis,k=s.reference[m]+s.reference[C]-g.mainAxis;v<x?v=x:v>k&&(v=k)}if(l){var b,y;const C=m==="y"?"width":"height",x=["top","left"].includes(_e(r)),k=s.reference[p]-s.floating[C]+(x&&((b=c.offset)==null?void 0:b[p])||0)+(x?0:g.crossAxis),S=s.reference[p]+s.reference[C]+(x?0:((y=c.offset)==null?void 0:y[p])||0)-(x?g.crossAxis:0);w<k?w=k:w>S&&(w=S)}return{[m]:v,[p]:w}}}},dh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:c,elements:a}=t,{apply:u=()=>{},...l}=De(e,t),d=await yt(t,l),p=_e(r),m=ct(r),v=He(r)==="y",{width:w,height:h}=s.floating;let g,b;p==="top"||p==="bottom"?(g=p,b=m===(await(c.isRTL==null?void 0:c.isRTL(a.floating))?"start":"end")?"left":"right"):(b=p,g=m==="end"?"top":"bottom");const y=h-d.top-d.bottom,C=w-d.left-d.right,x=ze(h-d[g],y),k=ze(w-d[b],C),S=!t.middlewareData.shift;let E=x,P=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=C),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(E=y),S&&!m){const M=pe(d.left,0),$=pe(d.right,0),D=pe(d.top,0),W=pe(d.bottom,0);v?P=w-2*(M!==0||$!==0?M+$:pe(d.left,d.right)):E=h-2*(D!==0||W!==0?D+W:pe(d.top,d.bottom))}await u({...t,availableWidth:P,availableHeight:E});const N=await c.getDimensions(a.floating);return w!==N.width||h!==N.height?{reset:{rects:!0}}:{}}}};function Jt(){return typeof window<"u"}function lt(e){return xi(e)?(e.nodeName||"").toLowerCase():"#document"}function he(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pe(e){var t;return(t=(xi(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xi(e){return Jt()?e instanceof Node||e instanceof he(e).Node:!1}function ye(e){return Jt()?e instanceof Element||e instanceof he(e).Element:!1}function Te(e){return Jt()?e instanceof HTMLElement||e instanceof he(e).HTMLElement:!1}function Ei(e){return!Jt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof he(e).ShadowRoot}function Ct(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Ce(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function fh(e){return["table","td","th"].includes(lt(e))}function en(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ho(e){const t=mo(),n=ye(e)?Ce(e):e;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function ph(e){let t=Ve(e);for(;Te(t)&&!ut(t);){if(ho(t))return t;if(en(t))return null;t=Ve(t)}return null}function mo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ut(e){return["html","body","#document"].includes(lt(e))}function Ce(e){return he(e).getComputedStyle(e)}function tn(e){return ye(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ve(e){if(lt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ei(e)&&e.host||Pe(e);return Ei(t)?t.host:t}function ki(e){const t=Ve(e);return ut(t)?e.ownerDocument?e.ownerDocument.body:e.body:Te(t)&&Ct(t)?t:ki(t)}function xt(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=ki(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),c=he(r);if(s){const a=vo(c);return t.concat(c,c.visualViewport||[],Ct(r)?r:[],a&&n?xt(a):[])}return t.concat(r,xt(r,[],n))}function vo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Si(e){const t=Ce(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Te(e),s=r?e.offsetWidth:n,c=r?e.offsetHeight:o,a=Xt(n)!==s||Xt(o)!==c;return a&&(n=s,o=c),{width:n,height:o,$:a}}function go(e){return ye(e)?e:e.contextElement}function dt(e){const t=go(e);if(!Te(t))return Se(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=Si(t);let c=(s?Xt(n.width):n.width)/o,a=(s?Xt(n.height):n.height)/r;return(!c||!Number.isFinite(c))&&(c=1),(!a||!Number.isFinite(a))&&(a=1),{x:c,y:a}}const hh=Se(0);function Pi(e){const t=he(e);return!mo()||!t.visualViewport?hh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mh(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==he(e)?!1:t}function Qe(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=go(e);let c=Se(1);t&&(o?ye(o)&&(c=dt(o)):c=dt(e));const a=mh(s,n,o)?Pi(s):Se(0);let u=(r.left+a.x)/c.x,l=(r.top+a.y)/c.y,d=r.width/c.x,p=r.height/c.y;if(s){const m=he(s),v=o&&ye(o)?he(o):o;let w=m,h=vo(w);for(;h&&o&&v!==w;){const g=dt(h),b=h.getBoundingClientRect(),y=Ce(h),C=b.left+(h.clientLeft+parseFloat(y.paddingLeft))*g.x,x=b.top+(h.clientTop+parseFloat(y.paddingTop))*g.y;u*=g.x,l*=g.y,d*=g.x,p*=g.y,u+=C,l+=x,w=he(h),h=vo(w)}}return Qt({width:d,height:p,x:u,y:l})}function wo(e,t){const n=tn(e).scrollLeft;return t?t.left+n:Qe(Pe(e)).left+n}function Ti(e,t,n){n===void 0&&(n=!1);const o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-(n?0:wo(e,o)),s=o.top+t.scrollTop;return{x:r,y:s}}function vh(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",c=Pe(o),a=t?en(t.floating):!1;if(o===c||a&&s)return n;let u={scrollLeft:0,scrollTop:0},l=Se(1);const d=Se(0),p=Te(o);if((p||!p&&!s)&&((lt(o)!=="body"||Ct(c))&&(u=tn(o)),Te(o))){const v=Qe(o);l=dt(o),d.x=v.x+o.clientLeft,d.y=v.y+o.clientTop}const m=c&&!p&&!s?Ti(c,u,!0):Se(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+d.x+m.x,y:n.y*l.y-u.scrollTop*l.y+d.y+m.y}}function gh(e){return Array.from(e.getClientRects())}function wh(e){const t=Pe(e),n=tn(e),o=e.ownerDocument.body,r=pe(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=pe(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let c=-n.scrollLeft+wo(e);const a=-n.scrollTop;return Ce(o).direction==="rtl"&&(c+=pe(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:c,y:a}}function bh(e,t){const n=he(e),o=Pe(e),r=n.visualViewport;let s=o.clientWidth,c=o.clientHeight,a=0,u=0;if(r){s=r.width,c=r.height;const l=mo();(!l||l&&t==="fixed")&&(a=r.offsetLeft,u=r.offsetTop)}return{width:s,height:c,x:a,y:u}}function yh(e,t){const n=Qe(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=Te(e)?dt(e):Se(1),c=e.clientWidth*s.x,a=e.clientHeight*s.y,u=r*s.x,l=o*s.y;return{width:c,height:a,x:u,y:l}}function Ni(e,t,n){let o;if(t==="viewport")o=bh(e,n);else if(t==="document")o=wh(Pe(e));else if(ye(t))o=yh(t,n);else{const r=Pi(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Qt(o)}function Ai(e,t){const n=Ve(e);return n===t||!ye(n)||ut(n)?!1:Ce(n).position==="fixed"||Ai(n,t)}function Ch(e,t){const n=t.get(e);if(n)return n;let o=xt(e,[],!1).filter(a=>ye(a)&&lt(a)!=="body"),r=null;const s=Ce(e).position==="fixed";let c=s?Ve(e):e;for(;ye(c)&&!ut(c);){const a=Ce(c),u=ho(c);!u&&a.position==="fixed"&&(r=null),(s?!u&&!r:!u&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Ct(c)&&!u&&Ai(e,c))?o=o.filter(d=>d!==c):r=a,c=Ve(c)}return t.set(e,o),o}function xh(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const c=[...n==="clippingAncestors"?en(t)?[]:Ch(t,this._c):[].concat(n),o],a=c[0],u=c.reduce((l,d)=>{const p=Ni(t,d,r);return l.top=pe(p.top,l.top),l.right=ze(p.right,l.right),l.bottom=ze(p.bottom,l.bottom),l.left=pe(p.left,l.left),l},Ni(t,a,r));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Eh(e){const{width:t,height:n}=Si(e);return{width:t,height:n}}function kh(e,t,n){const o=Te(t),r=Pe(t),s=n==="fixed",c=Qe(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const u=Se(0);if(o||!o&&!s)if((lt(t)!=="body"||Ct(r))&&(a=tn(t)),o){const m=Qe(t,!0,s,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else r&&(u.x=wo(r));const l=r&&!o&&!s?Ti(r,a):Se(0),d=c.left+a.scrollLeft-u.x-l.x,p=c.top+a.scrollTop-u.y-l.y;return{x:d,y:p,width:c.width,height:c.height}}function bo(e){return Ce(e).position==="static"}function ji(e,t){if(!Te(e)||Ce(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Pe(e)===n&&(n=n.ownerDocument.body),n}function Mi(e,t){const n=he(e);if(en(e))return n;if(!Te(e)){let r=Ve(e);for(;r&&!ut(r);){if(ye(r)&&!bo(r))return r;r=Ve(r)}return n}let o=ji(e,t);for(;o&&fh(o)&&bo(o);)o=ji(o,t);return o&&ut(o)&&bo(o)&&!ho(o)?n:o||ph(e)||n}const Sh=async function(e){const t=this.getOffsetParent||Mi,n=this.getDimensions,o=await n(e.floating);return{reference:kh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ph(e){return Ce(e).direction==="rtl"}const Th={convertOffsetParentRelativeRectToViewportRelativeRect:vh,getDocumentElement:Pe,getClippingRect:xh,getOffsetParent:Mi,getElementRects:Sh,getClientRects:gh,getDimensions:Eh,getScale:dt,isElement:ye,isRTL:Ph};function Oi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Nh(e,t){let n=null,o;const r=Pe(e);function s(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function c(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),s();const l=e.getBoundingClientRect(),{left:d,top:p,width:m,height:v}=l;if(a||t(),!m||!v)return;const w=Zt(p),h=Zt(r.clientWidth-(d+m)),g=Zt(r.clientHeight-(p+v)),b=Zt(d),C={rootMargin:-w+"px "+-h+"px "+-g+"px "+-b+"px",threshold:pe(0,ze(1,u))||1};let x=!0;function k(S){const E=S[0].intersectionRatio;if(E!==u){if(!x)return c();E?c(!1,E):o=setTimeout(()=>{c(!1,1e-7)},1e3)}E===1&&!Oi(l,e.getBoundingClientRect())&&c(),x=!1}try{n=new IntersectionObserver(k,{...C,root:r.ownerDocument})}catch{n=new IntersectionObserver(k,C)}n.observe(e)}return c(!0),s}function yo(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,l=go(e),d=r||s?[...l?xt(l):[],...xt(t)]:[];d.forEach(b=>{r&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const p=l&&a?Nh(l,n):null;let m=-1,v=null;c&&(v=new ResizeObserver(b=>{let[y]=b;y&&y.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=v)==null||C.observe(t)})),n()}),l&&!u&&v.observe(l),v.observe(t));let w,h=u?Qe(e):null;u&&g();function g(){const b=Qe(e);h&&!Oi(h,b)&&n(),h=b,w=requestAnimationFrame(g)}return n(),()=>{var b;d.forEach(y=>{r&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),p==null||p(),(b=v)==null||b.disconnect(),v=null,u&&cancelAnimationFrame(w)}}const Ah=ch,jh=lh,Mh=sh,Oh=dh,Ih=ih,Ii=rh,Dh=uh,_h=(e,t,n)=>{const o=new Map,r={platform:Th,...n},s={...r.platform,_c:o};return oh(e,t,{...r,platform:s})};var nn=typeof document<"u"?J.useLayoutEffect:J.useEffect;function on(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!on(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!on(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Di(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _i(e,t){const n=Di(e);return Math.round(t*n)/n}function Co(e){const t=i.useRef(e);return nn(()=>{t.current=e}),t}function xo(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:c}={},transform:a=!0,whileElementsMounted:u,open:l}=e,[d,p]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=i.useState(o);on(m,o)||v(o);const[w,h]=i.useState(null),[g,b]=i.useState(null),y=i.useCallback(I=>{I!==S.current&&(S.current=I,h(I))},[]),C=i.useCallback(I=>{I!==E.current&&(E.current=I,b(I))},[]),x=s||w,k=c||g,S=i.useRef(null),E=i.useRef(null),P=i.useRef(d),N=u!=null,M=Co(u),$=Co(r),D=Co(l),W=i.useCallback(()=>{if(!S.current||!E.current)return;const I={placement:t,strategy:n,middleware:m};$.current&&(I.platform=$.current),_h(S.current,E.current,I).then(j=>{const K={...j,isPositioned:D.current!==!1};A.current&&!on(P.current,K)&&(P.current=K,je.flushSync(()=>{p(K)}))})},[m,t,n,$,D]);nn(()=>{l===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(I=>({...I,isPositioned:!1})))},[l]);const A=i.useRef(!1);nn(()=>(A.current=!0,()=>{A.current=!1}),[]),nn(()=>{if(x&&(S.current=x),k&&(E.current=k),x&&k){if(M.current)return M.current(x,k,W);W()}},[x,k,W,M,N]);const U=i.useMemo(()=>({reference:S,floating:E,setReference:y,setFloating:C}),[y,C]),_=i.useMemo(()=>({reference:x,floating:k}),[x,k]),B=i.useMemo(()=>{const I={position:n,left:0,top:0};if(!_.floating)return I;const j=_i(_.floating,d.x),K=_i(_.floating,d.y);return a?{...I,transform:"translate("+j+"px, "+K+"px)",...Di(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:K}},[n,a,_.floating,d.x,d.y]);return i.useMemo(()=>({...d,update:W,refs:U,elements:_,floatingStyles:B}),[d,W,U,_,B])}const Lh=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Ii({element:o.current,padding:r}).fn(n):{}:o?Ii({element:o,padding:r}).fn(n):{}}}},Eo=(e,t)=>({...Ah(e),options:[e,t]}),ko=(e,t)=>({...jh(e),options:[e,t]}),So=(e,t)=>({...Dh(e),options:[e,t]}),Po=(e,t)=>({...Mh(e),options:[e,t]}),To=(e,t)=>({...Oh(e),options:[e,t]}),No=(e,t)=>({...Ih(e),options:[e,t]}),Ao=(e,t)=>({...Lh(e),options:[e,t]});var Rh="Arrow",Li=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return f.jsx(de.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});Li.displayName=Rh;var $h=Li;function rn(e){const[t,n]=i.useState(void 0);return Y(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let c,a;if("borderBoxSize"in s){const u=s.borderBoxSize,l=Array.isArray(u)?u[0]:u;c=l.inlineSize,a=l.blockSize}else c=e.offsetWidth,a=e.offsetHeight;n({width:c,height:a})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var jo="Popper",[Ri,$i]=ce(jo),[Fh,Fi]=Ri(jo),Wi=e=>{const{__scopePopper:t,children:n}=e,[o,r]=i.useState(null);return f.jsx(Fh,{scope:t,anchor:o,onAnchorChange:r,children:n})};Wi.displayName=jo;var Bi="PopperAnchor",Ui=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=Fi(Bi,n),c=i.useRef(null),a=L(t,c);return i.useEffect(()=>{s.onAnchorChange((o==null?void 0:o.current)||c.current)}),o?null:f.jsx(de.div,{...r,ref:a})});Ui.displayName=Bi;var Mo="PopperContent",[Wh,Bh]=Ri(Mo),zi=i.forwardRef((e,t)=>{var F,X,Q,G,Z,q;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:c=0,arrowPadding:a=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:w,...h}=e,g=Fi(Mo,n),[b,y]=i.useState(null),C=L(t,te=>y(te)),[x,k]=i.useState(null),S=rn(x),E=(S==null?void 0:S.width)??0,P=(S==null?void 0:S.height)??0,N=o+(s!=="center"?"-"+s:""),M=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},$=Array.isArray(l)?l:[l],D=$.length>0,W={padding:M,boundary:$.filter(zh),altBoundary:D},{refs:A,floatingStyles:U,placement:_,isPositioned:B,middlewareData:I}=xo({strategy:"fixed",placement:N,whileElementsMounted:(...te)=>yo(...te,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[Eo({mainAxis:r+P,alignmentAxis:c}),u&&ko({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?So():void 0,...W}),u&&Po({...W}),To({...W,apply:({elements:te,rects:ue,availableWidth:Le,availableHeight:Re})=>{const{width:$e,height:_t}=ue.reference,fe=te.floating.style;fe.setProperty("--radix-popper-available-width",`${Le}px`),fe.setProperty("--radix-popper-available-height",`${Re}px`),fe.setProperty("--radix-popper-anchor-width",`${$e}px`),fe.setProperty("--radix-popper-anchor-height",`${_t}px`)}}),x&&Ao({element:x,padding:a}),Hh({arrowWidth:E,arrowHeight:P}),m&&No({strategy:"referenceHidden",...W})]}),[j,K]=Ki(_),z=V(w);Y(()=>{B&&(z==null||z())},[B,z]);const oe=(F=I.arrow)==null?void 0:F.x,ie=(X=I.arrow)==null?void 0:X.y,se=((Q=I.arrow)==null?void 0:Q.centerOffset)!==0,[me,ae]=i.useState();return Y(()=>{b&&ae(window.getComputedStyle(b).zIndex)},[b]),f.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:B?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[(G=I.transformOrigin)==null?void 0:G.x,(Z=I.transformOrigin)==null?void 0:Z.y].join(" "),...((q=I.hide)==null?void 0:q.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(Wh,{scope:n,placedSide:j,onArrowChange:k,arrowX:oe,arrowY:ie,shouldHideArrow:se,children:f.jsx(de.div,{"data-side":j,"data-align":K,...h,ref:C,style:{...h.style,animation:B?void 0:"none"}})})})});zi.displayName=Mo;var Hi="PopperArrow",Uh={top:"bottom",right:"left",bottom:"top",left:"right"},Vi=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=Bh(Hi,o),c=Uh[s.placedSide];return f.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:f.jsx($h,{...r,ref:n,style:{...r.style,display:"block"}})})});Vi.displayName=Hi;function zh(e){return e!==null}var Hh=e=>({name:"transformOrigin",options:e,fn(t){var g,b,y;const{placement:n,rects:o,middlewareData:r}=t,c=((g=r.arrow)==null?void 0:g.centerOffset)!==0,a=c?0:e.arrowWidth,u=c?0:e.arrowHeight,[l,d]=Ki(n),p={start:"0%",center:"50%",end:"100%"}[d],m=(((b=r.arrow)==null?void 0:b.x)??0)+a/2,v=(((y=r.arrow)==null?void 0:y.y)??0)+u/2;let w="",h="";return l==="bottom"?(w=c?p:`${m}px`,h=`${-u}px`):l==="top"?(w=c?p:`${m}px`,h=`${o.floating.height+u}px`):l==="right"?(w=`${-u}px`,h=c?p:`${v}px`):l==="left"&&(w=`${o.floating.width+u}px`,h=c?p:`${v}px`),{data:{x:w,y:h}}}});function Ki(e){const[t,n="center"]=e.split("-");return[t,n]}var Gi=Wi,Vh=Ui,Kh=zi,Gh=Vi,Yh="Portal",Yi=i.forwardRef((e,t)=>{var a;const{container:n,...o}=e,[r,s]=i.useState(!1);Y(()=>s(!0),[]);const c=n||r&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return c?mt.createPortal(f.jsx(de.div,{...o,ref:t}),c):null});Yi.displayName=Yh;function Xh(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var Et=e=>{const{present:t,children:n}=e,o=Zh(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=L(o.ref,qh(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};Et.displayName="Presence";function Zh(e){const[t,n]=i.useState(),o=i.useRef({}),r=i.useRef(e),s=i.useRef("none"),c=e?"mounted":"unmounted",[a,u]=Xh(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const l=sn(o.current);s.current=a==="mounted"?l:"none"},[a]),Y(()=>{const l=o.current,d=r.current;if(d!==e){const m=s.current,v=sn(l);e?u("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),Y(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,p=v=>{const h=sn(o.current).includes(v.animationName);if(v.target===t&&h&&(u("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(s.current=sn(o.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:i.useCallback(l=>{l&&(o.current=getComputedStyle(l)),n(l)},[])}}function sn(e){return(e==null?void 0:e.animationName)||"none"}function qh(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Oo="rovingFocusGroup.onEntryFocus",Qh={bubbles:!1,cancelable:!0},an="RovingFocusGroup",[Io,Xi,Jh]=si(an),[em,Zi]=ce(an,[Jh]),[tm,nm]=em(an),qi=i.forwardRef((e,t)=>f.jsx(Io.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx(Io.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(om,{...e,ref:t})})}));qi.displayName=an;var om=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:c,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:d=!1,...p}=e,m=i.useRef(null),v=L(t,m),w=Yt(s),[h=null,g]=Oe({prop:c,defaultProp:a,onChange:u}),[b,y]=i.useState(!1),C=V(l),x=Xi(n),k=i.useRef(!1),[S,E]=i.useState(0);return i.useEffect(()=>{const P=m.current;if(P)return P.addEventListener(Oo,C),()=>P.removeEventListener(Oo,C)},[C]),f.jsx(tm,{scope:n,orientation:o,dir:w,loop:r,currentTabStopId:h,onItemFocus:i.useCallback(P=>g(P),[g]),onItemShiftTab:i.useCallback(()=>y(!0),[]),onFocusableItemAdd:i.useCallback(()=>E(P=>P+1),[]),onFocusableItemRemove:i.useCallback(()=>E(P=>P-1),[]),children:f.jsx(de.div,{tabIndex:b||S===0?-1:0,"data-orientation":o,...p,ref:v,style:{outline:"none",...e.style},onMouseDown:T(e.onMouseDown,()=>{k.current=!0}),onFocus:T(e.onFocus,P=>{const N=!k.current;if(P.target===P.currentTarget&&N&&!b){const M=new CustomEvent(Oo,Qh);if(P.currentTarget.dispatchEvent(M),!M.defaultPrevented){const $=x().filter(_=>_.focusable),D=$.find(_=>_.active),W=$.find(_=>_.id===h),U=[D,W,...$].filter(Boolean).map(_=>_.ref.current);ea(U,d)}}k.current=!1}),onBlur:T(e.onBlur,()=>y(!1))})})}),Qi="RovingFocusGroupItem",Ji=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,...c}=e,a=ve(),u=s||a,l=nm(Qi,n),d=l.currentTabStopId===u,p=Xi(n),{onFocusableItemAdd:m,onFocusableItemRemove:v}=l;return i.useEffect(()=>{if(o)return m(),()=>v()},[o,m,v]),f.jsx(Io.ItemSlot,{scope:n,id:u,focusable:o,active:r,children:f.jsx(de.span,{tabIndex:d?0:-1,"data-orientation":l.orientation,...c,ref:t,onMouseDown:T(e.onMouseDown,w=>{o?l.onItemFocus(u):w.preventDefault()}),onFocus:T(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:T(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){l.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const h=im(w,l.orientation,l.dir);if(h!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let b=p().filter(y=>y.focusable).map(y=>y.ref.current);if(h==="last")b.reverse();else if(h==="prev"||h==="next"){h==="prev"&&b.reverse();const y=b.indexOf(w.currentTarget);b=l.loop?am(b,y+1):b.slice(y+1)}setTimeout(()=>ea(b))}})})})});Ji.displayName=Qi;var rm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function sm(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function im(e,t,n){const o=sm(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return rm[o]}function ea(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function am(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var cm=qi,lm=Ji,Do=["Enter"," "],um=["ArrowDown","PageUp","Home"],ta=["ArrowUp","PageDown","End"],dm=[...um,...ta],fm={ltr:[...Do,"ArrowRight"],rtl:[...Do,"ArrowLeft"]},pm={ltr:["ArrowLeft"],rtl:["ArrowRight"]},kt="Menu",[St,hm,mm]=si(kt),[Je,na]=ce(kt,[mm,$i,Zi]),Pt=$i(),oa=Zi(),[ra,Ke]=Je(kt),[vm,Tt]=Je(kt),sa=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:c=!0}=e,a=Pt(t),[u,l]=i.useState(null),d=i.useRef(!1),p=V(s),m=Yt(r);return i.useEffect(()=>{const v=()=>{d.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>d.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),f.jsx(Gi,{...a,children:f.jsx(ra,{scope:t,open:n,onOpenChange:p,content:u,onContentChange:l,children:f.jsx(vm,{scope:t,onClose:i.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:d,dir:m,modal:c,children:o})})})};sa.displayName=kt;var gm="MenuAnchor",_o=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Pt(n);return f.jsx(Vh,{...r,...o,ref:t})});_o.displayName=gm;var Lo="MenuPortal",[wm,ia]=Je(Lo,{forceMount:void 0}),aa=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=Ke(Lo,t);return f.jsx(wm,{scope:t,forceMount:n,children:f.jsx(Et,{present:n||s.open,children:f.jsx(Yi,{asChild:!0,container:r,children:o})})})};aa.displayName=Lo;var ge="MenuContent",[bm,Ro]=Je(ge),ca=i.forwardRef((e,t)=>{const n=ia(ge,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=Ke(ge,e.__scopeMenu),c=Tt(ge,e.__scopeMenu);return f.jsx(St.Provider,{scope:e.__scopeMenu,children:f.jsx(Et,{present:o||s.open,children:f.jsx(St.Slot,{scope:e.__scopeMenu,children:c.modal?f.jsx(ym,{...r,ref:t}):f.jsx(Cm,{...r,ref:t})})})})}),ym=i.forwardRef((e,t)=>{const n=Ke(ge,e.__scopeMenu),o=i.useRef(null),r=L(t,o);return i.useEffect(()=>{const s=o.current;if(s)return Xn(s)},[]),f.jsx($o,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:T(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Cm=i.forwardRef((e,t)=>{const n=Ke(ge,e.__scopeMenu);return f.jsx($o,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),$o=i.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:a,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:m,onDismiss:v,disableOutsideScroll:w,...h}=e,g=Ke(ge,n),b=Tt(ge,n),y=Pt(n),C=oa(n),x=hm(n),[k,S]=i.useState(null),E=i.useRef(null),P=L(t,E,g.onContentChange),N=i.useRef(0),M=i.useRef(""),$=i.useRef(0),D=i.useRef(null),W=i.useRef("right"),A=i.useRef(0),U=w?Ht:i.Fragment,_=w?{as:ne,allowPinchZoom:!0}:void 0,B=j=>{var F,X;const K=M.current+j,z=x().filter(Q=>!Q.disabled),oe=document.activeElement,ie=(F=z.find(Q=>Q.ref.current===oe))==null?void 0:F.textValue,se=z.map(Q=>Q.textValue),me=Im(se,K,ie),ae=(X=z.find(Q=>Q.textValue===me))==null?void 0:X.ref.current;(function Q(G){M.current=G,window.clearTimeout(N.current),G!==""&&(N.current=window.setTimeout(()=>Q(""),1e3))})(K),ae&&setTimeout(()=>ae.focus())};i.useEffect(()=>()=>window.clearTimeout(N.current),[]),zn();const I=i.useCallback(j=>{var z,oe;return W.current===((z=D.current)==null?void 0:z.side)&&_m(j,(oe=D.current)==null?void 0:oe.area)},[]);return f.jsx(bm,{scope:n,searchRef:M,onItemEnter:i.useCallback(j=>{I(j)&&j.preventDefault()},[I]),onItemLeave:i.useCallback(j=>{var K;I(j)||((K=E.current)==null||K.focus(),S(null))},[I]),onTriggerLeave:i.useCallback(j=>{I(j)&&j.preventDefault()},[I]),pointerGraceTimerRef:$,onPointerGraceIntentChange:i.useCallback(j=>{D.current=j},[]),children:f.jsx(U,{..._,children:f.jsx(pi,{asChild:!0,trapped:r,onMountAutoFocus:T(s,j=>{var K;j.preventDefault(),(K=E.current)==null||K.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:f.jsx(li,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:m,onDismiss:v,children:f.jsx(cm,{asChild:!0,...C,dir:b.dir,orientation:"vertical",loop:o,currentTabStopId:k,onCurrentTabStopIdChange:S,onEntryFocus:T(u,j=>{b.isUsingKeyboardRef.current||j.preventDefault()}),preventScrollOnEntryFocus:!0,children:f.jsx(Kh,{role:"menu","aria-orientation":"vertical","data-state":Pa(g.open),"data-radix-menu-content":"",dir:b.dir,...y,...h,ref:P,style:{outline:"none",...h.style},onKeyDown:T(h.onKeyDown,j=>{const z=j.target.closest("[data-radix-menu-content]")===j.currentTarget,oe=j.ctrlKey||j.altKey||j.metaKey,ie=j.key.length===1;z&&(j.key==="Tab"&&j.preventDefault(),!oe&&ie&&B(j.key));const se=E.current;if(j.target!==se||!dm.includes(j.key))return;j.preventDefault();const ae=x().filter(F=>!F.disabled).map(F=>F.ref.current);ta.includes(j.key)&&ae.reverse(),Mm(ae)}),onBlur:T(e.onBlur,j=>{j.currentTarget.contains(j.target)||(window.clearTimeout(N.current),M.current="")}),onPointerMove:T(e.onPointerMove,At(j=>{const K=j.target,z=A.current!==j.clientX;if(j.currentTarget.contains(K)&&z){const oe=j.clientX>A.current?"right":"left";W.current=oe,A.current=j.clientX}}))})})})})})})});ca.displayName=ge;var xm="MenuGroup",Fo=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return f.jsx(de.div,{role:"group",...o,ref:t})});Fo.displayName=xm;var Em="MenuLabel",la=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return f.jsx(de.div,{...o,ref:t})});la.displayName=Em;var cn="MenuItem",ua="menu.itemSelect",ln=i.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=i.useRef(null),c=Tt(cn,e.__scopeMenu),a=Ro(cn,e.__scopeMenu),u=L(t,s),l=i.useRef(!1),d=()=>{const p=s.current;if(!n&&p){const m=new CustomEvent(ua,{bubbles:!0,cancelable:!0});p.addEventListener(ua,v=>o==null?void 0:o(v),{once:!0}),ri(p,m),m.defaultPrevented?l.current=!1:c.onClose()}};return f.jsx(da,{...r,ref:u,disabled:n,onClick:T(e.onClick,d),onPointerDown:p=>{var m;(m=e.onPointerDown)==null||m.call(e,p),l.current=!0},onPointerUp:T(e.onPointerUp,p=>{var m;l.current||(m=p.currentTarget)==null||m.click()}),onKeyDown:T(e.onKeyDown,p=>{const m=a.searchRef.current!=="";n||m&&p.key===" "||Do.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});ln.displayName=cn;var da=i.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,c=Ro(cn,n),a=oa(n),u=i.useRef(null),l=L(t,u),[d,p]=i.useState(!1),[m,v]=i.useState("");return i.useEffect(()=>{const w=u.current;w&&v((w.textContent??"").trim())},[s.children]),f.jsx(St.ItemSlot,{scope:n,disabled:o,textValue:r??m,children:f.jsx(lm,{asChild:!0,...a,focusable:!o,children:f.jsx(de.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:l,onPointerMove:T(e.onPointerMove,At(w=>{o?c.onItemLeave(w):(c.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:T(e.onPointerLeave,At(w=>c.onItemLeave(w))),onFocus:T(e.onFocus,()=>p(!0)),onBlur:T(e.onBlur,()=>p(!1))})})})}),km="MenuCheckboxItem",fa=i.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return f.jsx(ga,{scope:e.__scopeMenu,checked:n,children:f.jsx(ln,{role:"menuitemcheckbox","aria-checked":un(n)?"mixed":n,...r,ref:t,"data-state":Uo(n),onSelect:T(r.onSelect,()=>o==null?void 0:o(un(n)?!0:!n),{checkForDefaultPrevented:!1})})})});fa.displayName=km;var pa="MenuRadioGroup",[Sm,Pm]=Je(pa,{value:void 0,onValueChange:()=>{}}),ha=i.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=V(o);return f.jsx(Sm,{scope:e.__scopeMenu,value:n,onValueChange:s,children:f.jsx(Fo,{...r,ref:t})})});ha.displayName=pa;var ma="MenuRadioItem",va=i.forwardRef((e,t)=>{const{value:n,...o}=e,r=Pm(ma,e.__scopeMenu),s=n===r.value;return f.jsx(ga,{scope:e.__scopeMenu,checked:s,children:f.jsx(ln,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":Uo(s),onSelect:T(o.onSelect,()=>{var c;return(c=r.onValueChange)==null?void 0:c.call(r,n)},{checkForDefaultPrevented:!1})})})});va.displayName=ma;var Wo="MenuItemIndicator",[ga,Tm]=Je(Wo,{checked:!1}),wa=i.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=Tm(Wo,n);return f.jsx(Et,{present:o||un(s.checked)||s.checked===!0,children:f.jsx(de.span,{...r,ref:t,"data-state":Uo(s.checked)})})});wa.displayName=Wo;var Nm="MenuSeparator",ba=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return f.jsx(de.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});ba.displayName=Nm;var Am="MenuArrow",ya=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Pt(n);return f.jsx(Gh,{...r,...o,ref:t})});ya.displayName=Am;var Bo="MenuSub",[jm,Ca]=Je(Bo),xa=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:r}=e,s=Ke(Bo,t),c=Pt(t),[a,u]=i.useState(null),[l,d]=i.useState(null),p=V(r);return i.useEffect(()=>(s.open===!1&&p(!1),()=>p(!1)),[s.open,p]),f.jsx(Gi,{...c,children:f.jsx(ra,{scope:t,open:o,onOpenChange:p,content:l,onContentChange:d,children:f.jsx(jm,{scope:t,contentId:ve(),triggerId:ve(),trigger:a,onTriggerChange:u,children:n})})})};xa.displayName=Bo;var Nt="MenuSubTrigger",Ea=i.forwardRef((e,t)=>{const n=Ke(Nt,e.__scopeMenu),o=Tt(Nt,e.__scopeMenu),r=Ca(Nt,e.__scopeMenu),s=Ro(Nt,e.__scopeMenu),c=i.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:u}=s,l={__scopeMenu:e.__scopeMenu},d=i.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return i.useEffect(()=>d,[d]),i.useEffect(()=>{const p=a.current;return()=>{window.clearTimeout(p),u(null)}},[a,u]),f.jsx(_o,{asChild:!0,...l,children:f.jsx(da,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":Pa(n.open),...e,ref:Lt(t,r.onTriggerChange),onClick:p=>{var m;(m=e.onClick)==null||m.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:T(e.onPointerMove,At(p=>{s.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(s.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:T(e.onPointerLeave,At(p=>{var v,w;d();const m=(v=n.content)==null?void 0:v.getBoundingClientRect();if(m){const h=(w=n.content)==null?void 0:w.dataset.side,g=h==="right",b=g?-5:5,y=m[g?"left":"right"],C=m[g?"right":"left"];s.onPointerGraceIntentChange({area:[{x:p.clientX+b,y:p.clientY},{x:y,y:m.top},{x:C,y:m.top},{x:C,y:m.bottom},{x:y,y:m.bottom}],side:h}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(p),p.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:T(e.onKeyDown,p=>{var v;const m=s.searchRef.current!=="";e.disabled||m&&p.key===" "||fm[o.dir].includes(p.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),p.preventDefault())})})})});Ea.displayName=Nt;var ka="MenuSubContent",Sa=i.forwardRef((e,t)=>{const n=ia(ge,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=Ke(ge,e.__scopeMenu),c=Tt(ge,e.__scopeMenu),a=Ca(ka,e.__scopeMenu),u=i.useRef(null),l=L(t,u);return f.jsx(St.Provider,{scope:e.__scopeMenu,children:f.jsx(Et,{present:o||s.open,children:f.jsx(St.Slot,{scope:e.__scopeMenu,children:f.jsx($o,{id:a.contentId,"aria-labelledby":a.triggerId,...r,ref:l,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var p;c.isUsingKeyboardRef.current&&((p=u.current)==null||p.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:T(e.onFocusOutside,d=>{d.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:T(e.onEscapeKeyDown,d=>{c.onClose(),d.preventDefault()}),onKeyDown:T(e.onKeyDown,d=>{var v;const p=d.currentTarget.contains(d.target),m=pm[c.dir].includes(d.key);p&&m&&(s.onOpenChange(!1),(v=a.trigger)==null||v.focus(),d.preventDefault())})})})})})});Sa.displayName=ka;function Pa(e){return e?"open":"closed"}function un(e){return e==="indeterminate"}function Uo(e){return un(e)?"indeterminate":e?"checked":"unchecked"}function Mm(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Om(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Im(e,t,n){const r=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let c=Om(e,Math.max(s,0));r.length===1&&(c=c.filter(l=>l!==n));const u=c.find(l=>l.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function Dm(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const a=t[s].x,u=t[s].y,l=t[c].x,d=t[c].y;u>o!=d>o&&n<(l-a)*(o-u)/(d-u)+a&&(r=!r)}return r}function _m(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Dm(n,t)}function At(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Lm=sa,Rm=_o,$m=aa,Fm=ca,Wm=Fo,Bm=la,Um=ln,zm=fa,Hm=ha,Vm=va,Km=wa,Gm=ba,Ym=ya,Xm=xa,Zm=Ea,qm=Sa,zo="DropdownMenu",[Qm,ly]=ce(zo,[na]),le=na(),[Jm,Ta]=Qm(zo),Na=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:c,modal:a=!0}=e,u=le(t),l=i.useRef(null),[d=!1,p]=Oe({prop:r,defaultProp:s,onChange:c});return f.jsx(Jm,{scope:t,triggerId:ve(),triggerRef:l,contentId:ve(),open:d,onOpenChange:p,onOpenToggle:i.useCallback(()=>p(m=>!m),[p]),modal:a,children:f.jsx(Lm,{...u,open:d,onOpenChange:p,dir:o,modal:a,children:n})})};Na.displayName=zo;var Aa="DropdownMenuTrigger",ja=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=Ta(Aa,n),c=le(n);return f.jsx(Rm,{asChild:!0,...c,children:f.jsx(de.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:Lt(t,s.triggerRef),onPointerDown:T(e.onPointerDown,a=>{!o&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:T(e.onKeyDown,a=>{o||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});ja.displayName=Aa;var ev="DropdownMenuPortal",Ma=e=>{const{__scopeDropdownMenu:t,...n}=e,o=le(t);return f.jsx($m,{...o,...n})};Ma.displayName=ev;var Oa="DropdownMenuContent",Ia=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Ta(Oa,n),s=le(n),c=i.useRef(!1);return f.jsx(Fm,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:T(e.onCloseAutoFocus,a=>{var u;c.current||(u=r.triggerRef.current)==null||u.focus(),c.current=!1,a.preventDefault()}),onInteractOutside:T(e.onInteractOutside,a=>{const u=a.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,d=u.button===2||l;(!r.modal||d)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ia.displayName=Oa;var tv="DropdownMenuGroup",Da=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=le(n);return f.jsx(Wm,{...r,...o,ref:t})});Da.displayName=tv;var nv="DropdownMenuLabel",_a=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=le(n);return f.jsx(Bm,{...r,...o,ref:t})});_a.displayName=nv;var ov="DropdownMenuItem",La=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=le(n);return f.jsx(Um,{...r,...o,ref:t})});La.displayName=ov;var rv="DropdownMenuCheckboxItem",Ra=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=le(n);return f.jsx(zm,{...r,...o,ref:t})});Ra.displayName=rv;var sv="DropdownMenuRadioGroup",$a=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=le(n);return f.jsx(Hm,{...r,...o,ref:t})});$a.displayName=sv;var iv="DropdownMenuRadioItem",Fa=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=le(n);return f.jsx(Vm,{...r,...o,ref:t})});Fa.displayName=iv;var av="DropdownMenuItemIndicator",Wa=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=le(n);return f.jsx(Km,{...r,...o,ref:t})});Wa.displayName=av;var cv="DropdownMenuSeparator",Ba=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=le(n);return f.jsx(Gm,{...r,...o,ref:t})});Ba.displayName=cv;var lv="DropdownMenuArrow",uv=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=le(n);return f.jsx(Ym,{...r,...o,ref:t})});uv.displayName=lv;var dv=e=>{const{__scopeDropdownMenu:t,children:n,open:o,onOpenChange:r,defaultOpen:s}=e,c=le(t),[a=!1,u]=Oe({prop:o,defaultProp:s,onChange:r});return f.jsx(Xm,{...c,open:a,onOpenChange:u,children:n})},fv="DropdownMenuSubTrigger",Ua=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=le(n);return f.jsx(Zm,{...r,...o,ref:t})});Ua.displayName=fv;var pv="DropdownMenuSubContent",za=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=le(n);return f.jsx(qm,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});za.displayName=pv;var hv=Na,mv=ja,Ha=Ma,Va=Ia,Ka=Da,Ga=_a,Ya=La,Xa=Ra,vv=$a,Za=Fa,qa=Wa,Qa=Ba,gv=dv,Ja=Ua,ec=za;const wv=hv,bv=mv,tc=i.forwardRef(({className:e,...t},n)=>f.jsx(Ka,{ref:n,className:R("ksjsui-flex ksjsui-flex-col ksjsui-gap-y-2",e),...t}));tc.displayName=Ka.displayName;const yv=Ha,Cv=gv,xv=vv,nc=i.forwardRef(({className:e,inset:t,children:n,...o},r)=>f.jsxs(Ja,{ref:r,className:R(["ksjsui-group ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-start ksjsui-gap-2 ksjsui-rounded-sm ksjsui-border-0 ksjsui-px-2 ksjsui-py-1 ksjsui-text-base ksjsui-outline-none ksjsui-transition-colors","focus:ksjsui-bg-neutral focus:ksjsui-text-neutral-foreground","data-[disabled]:ksjsui-opacity-50","data-[state=open]:ksjsui-bg-neutral data-[state=open]:ksjsui-text-neutral-foreground","[&_svg]:ksjsui-pointer-events-none [&_svg]:ksjsui-shrink-0","[&_>_svg]:ksjsui-size-6","forced-colors:ksjsui-outline-0 forced-colors:ksjsui-transition-none","forced-colors:focus:ksjsui-bg-highlight forced-colors:focus:ksjsui-text-highlight-text forced-colors:focus:ksjsui-forced-color-adjust-none"],t&&"ksjsui-ps-8",e),...o,children:[n,f.jsxs("span",{className:R(["-ksjsui-me-2 ksjsui-ms-auto ksjsui-mt-1 ksjsui-text-label","[&_svg]:ksjsui-size-4","group-focus:forced-colors:ksjsui-text-current"]),children:[f.jsx(no,{className:"rtl:ksjsui-hidden"}),f.jsx(to,{className:"ltr:ksjsui-hidden"})]})]}));nc.displayName=Ja.displayName;const oc=i.forwardRef(({className:e,...t},n)=>f.jsx(ec,{ref:n,className:R(["ksjsui-z-50 ksjsui-flex ksjsui-min-w-32 ksjsui-flex-col ksjsui-gap-y-2 ksjsui-overflow-hidden ksjsui-rounded-lg ksjsui-bg-popover ksjsui-px-2 ksjsui-py-4 ksjsui-text-popover-foreground ksjsui-shadow-lg","data-[state=open]:ksjsui-animate-in data-[state=open]:ksjsui-fade-in-0 data-[state=open]:ksjsui-zoom-in-95","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-0 data-[state=closed]:ksjsui-zoom-out-95","data-[side=top]:ksjsui-slide-in-from-bottom-2","data-[side=right]:ksjsui-slide-in-from-left-2","data-[side=bottom]:ksjsui-slide-in-from-top-2","data-[side=left]:ksjsui-slide-in-from-right-2","forced-colors:ksjsui-border"],e),...t}));oc.displayName=ec.displayName;const rc=i.forwardRef(({className:e,align:t="start",side:n="bottom",sideOffset:o=4,...r},s)=>f.jsx(Ha,{children:f.jsx(Va,{ref:s,align:t,side:n,sideOffset:o,className:R(["ksjsui-z-50 ksjsui-flex ksjsui-min-w-32 ksjsui-flex-col ksjsui-gap-y-2 ksjsui-overflow-hidden ksjsui-rounded-lg ksjsui-bg-popover ksjsui-px-2 ksjsui-py-4 ksjsui-text-popover-foreground ksjsui-shadow-md","data-[state=open]:ksjsui-animate-in data-[state=open]:ksjsui-fade-in-0 data-[state=open]:ksjsui-zoom-in-95","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-0 data-[state=closed]:ksjsui-zoom-out-95","data-[side=top]:ksjsui-slide-in-from-bottom-2","data-[side=right]:ksjsui-slide-in-from-left-2","data-[side=bottom]:ksjsui-slide-in-from-top-2","data-[side=left]:ksjsui-slide-in-from-right-2","forced-colors:ksjsui-border"],e),...r})}));rc.displayName=Va.displayName;const sc=i.forwardRef(({className:e,inset:t,...n},o)=>f.jsx(Ya,{ref:o,className:R(["ksjsui-group ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-start ksjsui-gap-2 ksjsui-rounded-sm ksjsui-border-0 ksjsui-px-2 ksjsui-py-1 ksjsui-text-base ksjsui-outline-none ksjsui-transition-colors","focus:ksjsui-bg-neutral focus:ksjsui-text-neutral-foreground","hover:ksjsui-bg-neutral hover:ksjsui-text-neutral-foreground","data-[disabled]:ksjsui-pointer-events-none data-[disabled]:ksjsui-opacity-50","[&_svg]:ksjsui-pointer-events-none [&_svg]:ksjsui-size-6 [&_svg]:ksjsui-shrink-0","forced-colors:ksjsui-outline-0 forced-colors:ksjsui-transition-none","forced-colors:hover:ksjsui-bg-highlight forced-colors:hover:ksjsui-text-highlight-text forced-colors:hover:ksjsui-forced-color-adjust-none","forced-colors:focus:ksjsui-bg-highlight forced-colors:focus:ksjsui-text-highlight-text forced-colors:focus:ksjsui-forced-color-adjust-none"],t&&"ksjsui-ps-10",e),...n}));sc.displayName=Ya.displayName;const ic=i.forwardRef(({className:e,children:t,checked:n,...o},r)=>f.jsxs(Xa,{ref:r,className:R(["ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-start ksjsui-justify-between ksjsui-gap-2 ksjsui-rounded-sm ksjsui-border-0 ksjsui-px-2 ksjsui-py-1 ksjsui-text-base ksjsui-outline-none ksjsui-transition-colors","focus:ksjsui-bg-neutral focus:ksjsui-text-neutral-foreground","hover:ksjsui-bg-neutral hover:ksjsui-text-neutral-foreground","data-[disabled]:ksjsui-pointer-events-none data-[disabled]:ksjsui-opacity-50","forced-colors:ksjsui-outline-0 forced-colors:ksjsui-transition-none","forced-colors:hover:ksjsui-bg-highlight forced-colors:hover:ksjsui-text-highlight-text forced-colors:hover:ksjsui-forced-color-adjust-none","forced-colors:focus:ksjsui-bg-highlight forced-colors:focus:ksjsui-text-highlight-text forced-colors:focus:ksjsui-forced-color-adjust-none"],e),checked:n,...o,children:[t,f.jsx(qa,{children:f.jsx(eo,{className:"ksjsui-size-6"})})]}));ic.displayName=Xa.displayName;const ac=i.forwardRef(({className:e,children:t,...n},o)=>f.jsxs(Za,{ref:o,className:R(["ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-center ksjsui-justify-between ksjsui-gap-2 ksjsui-rounded-sm ksjsui-border-0 ksjsui-px-2 ksjsui-py-1 ksjsui-text-base ksjsui-outline-none ksjsui-transition-colors","focus:ksjsui-bg-neutral focus:ksjsui-text-neutral-foreground","hover:ksjsui-bg-neutral hover:ksjsui-text-neutral-foreground","data-[disabled]:ksjsui-pointer-events-none data-[disabled]:ksjsui-opacity-50","forced-colors:ksjsui-outline-0 forced-colors:ksjsui-transition-none","forced-colors:hover:ksjsui-bg-highlight forced-colors:hover:ksjsui-text-highlight-text forced-colors:hover:ksjsui-forced-color-adjust-none","forced-colors:focus:ksjsui-bg-highlight forced-colors:focus:ksjsui-text-highlight-text forced-colors:focus:ksjsui-forced-color-adjust-none"],e),...n,children:[t,f.jsx("span",{className:"ksjsui-flex ksjsui-size-3.5 ksjsui-items-center ksjsui-justify-center",children:f.jsx(qa,{children:f.jsx(qs,{className:"ksjsui-size-2"})})})]}));ac.displayName=Za.displayName;const cc=i.forwardRef(({className:e,inset:t,...n},o)=>f.jsx(Ga,{ref:o,className:R("ksjsui-px-2 ksjsui-text-sm ksjsui-text-label",t&&"ksjsui-ps-8",e),...n}));cc.displayName=Ga.displayName;const lc=i.forwardRef(({className:e,...t},n)=>f.jsx(Qa,{ref:n,className:R(["ksjsui-my-1 ksjsui-h-px ksjsui-bg-border","forced-colors:ksjsui-bg-canvas-text"],e),...t}));lc.displayName=Qa.displayName;const uc=({className:e,...t})=>f.jsx("span",{className:R("ksjsui-ms-auto ksjsui-mt-0.5 ksjsui-text-sm ksjsui-tracking-widest ksjsui-text-label","group-focus:forced-colors:ksjsui-text-current",e),...t});uc.displayName="DropdownMenuShortcut";const Ev=i.forwardRef(({className:e,primary:t,secondary:n,...o},r)=>f.jsxs("div",{ref:r,className:R(e),...o,children:[f.jsx("span",{className:R(["DropdownMenuItemPrimaryText"],e),children:t}),n&&f.jsx("div",{className:R(["DropdownMenuItemSecondaryText","ksjsui-text-sm ksjsui-text-label","group-focus:forced-colors:ksjsui-text-current"],e),children:n})]}));Ev.displayName="DropdownMenuItemText";const dc=i.forwardRef((e,t)=>f.jsx($n,{ref:t,...e,iconOnly:!0,fullWidth:!1}));dc.displayName="IconButton";const fc=i.forwardRef(({className:e,...t},n)=>f.jsx("ul",{ref:n,className:R(["ksjsui-flex ksjsui-w-full ksjsui-flex-col ksjsui-gap-y-2"],e),...t}));fc.displayName="List";const pc=i.forwardRef(({className:e,inset:t,...n},o)=>f.jsx("li",{ref:o,className:R(["ksjsui-flex ksjsui-gap-2 ksjsui-rounded-lg ksjsui-p-2 ksjsui-transition-colors","[&_svg]:ksjsui-pointer-events-none [&_svg]:ksjsui-size-6 [&_svg]:ksjsui-shrink-0","has-[.ListItemButton:hover]:ksjsui-bg-neutral","has-[.ListItemButton:focus-visible]:ksjsui-outline-none has-[.ListItemButton:focus-visible]:ksjsui-ring-2 has-[.ListItemButton:focus-visible]:ksjsui-ring-ring has-[.ListItemButton:focus-visible]:ksjsui-ring-offset-2 has-[.ListItemButton:focus-visible]:ksjsui-ring-offset-background","has-[:disabled]:ksjsui-cursor-not-allowed","has-[.ListItemButton:hover]:forced-colors:ksjsui-outline-none has-[.ListItemButton:hover]:forced-colors:ksjsui-outline-highlight","has-[.ListItemButton:focus-visible]:forced-colors:ksjsui-outline-highlight"],t&&["ListItem-inset ksjsui-group","ksjsui-ps-10","has-[.ListItemButton]:ksjsui-p-0"],e),...n}));pc.displayName="ListItem";const hc=({className:e,...t})=>{const n="py-1 ksjsui-pointer-events-none ksjsui-hidden ksjsui-shrink-0 ksjsui-text-foreground";return f.jsxs(f.Fragment,{children:[f.jsx(to,{className:R("rtl:ksjsui-inline-block",n,e),...t}),f.jsx(no,{className:R("ltr:ksjsui-inline-block",n,e),...t})]})};hc.displayName="ListItemArrow";const kv=Ze(["ListItemButton","ksjsui-flex ksjsui-w-full ksjsui-gap-2","focus-visible:ksjsui-border-0 focus-visible:ksjsui-outline-none","disabled:ksjsui-pointer-events-none disabled:ksjsui-opacity-50","forced-colors:focus-visible:ksjsui-outline-0","group-[.ListItem-inset]:ksjsui-p-2 group-[.ListItem-inset]:ksjsui-ps-10"],{variants:{color:{secondary:"ksjsui-text-secondary",destructive:"ksjsui-text-destructive"}}}),mc=i.forwardRef(({color:e,className:t,tabIndex:n=0,...o},r)=>f.jsx("button",{ref:r,className:R(kv({color:e,className:t})),tabIndex:n,...o}));mc.displayName="ListItemButton";const vc=i.forwardRef(({className:e,primary:t,secondary:n,...o},r)=>f.jsxs("span",{ref:r,className:R(["ksjsui-flex ksjsui-w-full ksjsui-flex-col ksjsui-items-start"],e),...o,children:[f.jsx("span",{className:R(["ksjsui-text-start ksjsui-text-[15px]"],e),children:t}),n&&f.jsx("span",{className:R(["ksjsui-text-start ksjsui-text-[15px] ksjsui-text-label"],e),children:n})]}));vc.displayName="ListItemText";const gc=i.forwardRef(({className:e,inset:t,...n},o)=>f.jsx("li",{ref:o,className:R("ksjsui-block ksjsui-px-2 ksjsui-py-3 ksjsui-text-sm ksjsui-text-label",t&&"ksjsui-ps-8",e),...n}));gc.displayName="ListLabel";const wc=i.forwardRef(({className:e,...t},n)=>f.jsx("li",{ref:n,className:R(["ksjsui-my-1 ksjsui-block ksjsui-h-px ksjsui-bg-border","forced-colors:ksjsui-bg-canvas-text"],e),role:"separator",...t}));wc.displayName="ListSeparator";var Sv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],jt=Sv.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...c}=o,a=s?ne:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(a,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Pv(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var Mt=e=>{const{present:t,children:n}=e,o=Tv(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=L(o.ref,Nv(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};Mt.displayName="Presence";function Tv(e){const[t,n]=i.useState(),o=i.useRef({}),r=i.useRef(e),s=i.useRef("none"),c=e?"mounted":"unmounted",[a,u]=Pv(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const l=dn(o.current);s.current=a==="mounted"?l:"none"},[a]),Y(()=>{const l=o.current,d=r.current;if(d!==e){const m=s.current,v=dn(l);e?u("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),Y(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,p=v=>{const h=dn(o.current).includes(v.animationName);if(v.target===t&&h&&(u("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(s.current=dn(o.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:i.useCallback(l=>{l&&(o.current=getComputedStyle(l)),n(l)},[])}}function dn(e){return(e==null?void 0:e.animationName)||"none"}function Nv(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Ho(e,[t,n]){return Math.min(n,Math.max(t,e))}function Av(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var Vo="ScrollArea",[bc,uy]=ce(Vo),[jv,we]=bc(Vo),yc=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:o="hover",dir:r,scrollHideDelay:s=600,...c}=e,[a,u]=i.useState(null),[l,d]=i.useState(null),[p,m]=i.useState(null),[v,w]=i.useState(null),[h,g]=i.useState(null),[b,y]=i.useState(0),[C,x]=i.useState(0),[k,S]=i.useState(!1),[E,P]=i.useState(!1),N=L(t,$=>u($)),M=Yt(r);return f.jsx(jv,{scope:n,type:o,dir:M,scrollHideDelay:s,scrollArea:a,viewport:l,onViewportChange:d,content:p,onContentChange:m,scrollbarX:v,onScrollbarXChange:w,scrollbarXEnabled:k,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:E,onScrollbarYEnabledChange:P,onCornerWidthChange:y,onCornerHeightChange:x,children:f.jsx(jt.div,{dir:M,...c,ref:N,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":C+"px",...e.style}})})});yc.displayName=Vo;var Cc="ScrollAreaViewport",xc=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:o,nonce:r,...s}=e,c=we(Cc,n),a=i.useRef(null),u=L(t,a,c.onViewportChange);return f.jsxs(f.Fragment,{children:[f.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),f.jsx(jt.div,{"data-radix-scroll-area-viewport":"",...s,ref:u,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...e.style},children:f.jsx("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});xc.displayName=Cc;var Ne="ScrollAreaScrollbar",Ko=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=we(Ne,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:c}=r,a=e.orientation==="horizontal";return i.useEffect(()=>(a?s(!0):c(!0),()=>{a?s(!1):c(!1)}),[a,s,c]),r.type==="hover"?f.jsx(Mv,{...o,ref:t,forceMount:n}):r.type==="scroll"?f.jsx(Ov,{...o,ref:t,forceMount:n}):r.type==="auto"?f.jsx(Ec,{...o,ref:t,forceMount:n}):r.type==="always"?f.jsx(Go,{...o,ref:t}):null});Ko.displayName=Ne;var Mv=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=we(Ne,e.__scopeScrollArea),[s,c]=i.useState(!1);return i.useEffect(()=>{const a=r.scrollArea;let u=0;if(a){const l=()=>{window.clearTimeout(u),c(!0)},d=()=>{u=window.setTimeout(()=>c(!1),r.scrollHideDelay)};return a.addEventListener("pointerenter",l),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(u),a.removeEventListener("pointerenter",l),a.removeEventListener("pointerleave",d)}}},[r.scrollArea,r.scrollHideDelay]),f.jsx(Mt,{present:n||s,children:f.jsx(Ec,{"data-state":s?"visible":"hidden",...o,ref:t})})}),Ov=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=we(Ne,e.__scopeScrollArea),s=e.orientation==="horizontal",c=mn(()=>u("SCROLL_END"),100),[a,u]=Av("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return i.useEffect(()=>{if(a==="idle"){const l=window.setTimeout(()=>u("HIDE"),r.scrollHideDelay);return()=>window.clearTimeout(l)}},[a,r.scrollHideDelay,u]),i.useEffect(()=>{const l=r.viewport,d=s?"scrollLeft":"scrollTop";if(l){let p=l[d];const m=()=>{const v=l[d];p!==v&&(u("SCROLL"),c()),p=v};return l.addEventListener("scroll",m),()=>l.removeEventListener("scroll",m)}},[r.viewport,s,u,c]),f.jsx(Mt,{present:n||a!=="hidden",children:f.jsx(Go,{"data-state":a==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:T(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:T(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),Ec=i.forwardRef((e,t)=>{const n=we(Ne,e.__scopeScrollArea),{forceMount:o,...r}=e,[s,c]=i.useState(!1),a=e.orientation==="horizontal",u=mn(()=>{if(n.viewport){const l=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;c(a?l:d)}},10);return ft(n.viewport,u),ft(n.content,u),f.jsx(Mt,{present:o||s,children:f.jsx(Go,{"data-state":s?"visible":"hidden",...r,ref:t})})}),Go=i.forwardRef((e,t)=>{const{orientation:n="vertical",...o}=e,r=we(Ne,e.__scopeScrollArea),s=i.useRef(null),c=i.useRef(0),[a,u]=i.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=Nc(a.viewport,a.content),d={...o,sizes:a,onSizesChange:u,hasThumb:l>0&&l<1,onThumbChange:m=>s.current=m,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:m=>c.current=m};function p(m,v){return $v(m,c.current,a,v)}return n==="horizontal"?f.jsx(Iv,{...d,ref:t,onThumbPositionChange:()=>{if(r.viewport&&s.current){const m=r.viewport.scrollLeft,v=Ac(m,a,r.dir);s.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:m=>{r.viewport&&(r.viewport.scrollLeft=m)},onDragScroll:m=>{r.viewport&&(r.viewport.scrollLeft=p(m,r.dir))}}):n==="vertical"?f.jsx(Dv,{...d,ref:t,onThumbPositionChange:()=>{if(r.viewport&&s.current){const m=r.viewport.scrollTop,v=Ac(m,a);s.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:m=>{r.viewport&&(r.viewport.scrollTop=m)},onDragScroll:m=>{r.viewport&&(r.viewport.scrollTop=p(m))}}):null}),Iv=i.forwardRef((e,t)=>{const{sizes:n,onSizesChange:o,...r}=e,s=we(Ne,e.__scopeScrollArea),[c,a]=i.useState(),u=i.useRef(null),l=L(t,u,s.onScrollbarXChange);return i.useEffect(()=>{u.current&&a(getComputedStyle(u.current))},[u]),f.jsx(Sc,{"data-orientation":"horizontal",...r,ref:l,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":hn(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,p)=>{if(s.viewport){const m=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),Mc(m,p)&&d.preventDefault()}},onResize:()=>{u.current&&s.viewport&&c&&o({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:pn(c.paddingLeft),paddingEnd:pn(c.paddingRight)}})}})}),Dv=i.forwardRef((e,t)=>{const{sizes:n,onSizesChange:o,...r}=e,s=we(Ne,e.__scopeScrollArea),[c,a]=i.useState(),u=i.useRef(null),l=L(t,u,s.onScrollbarYChange);return i.useEffect(()=>{u.current&&a(getComputedStyle(u.current))},[u]),f.jsx(Sc,{"data-orientation":"vertical",...r,ref:l,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":hn(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,p)=>{if(s.viewport){const m=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),Mc(m,p)&&d.preventDefault()}},onResize:()=>{u.current&&s.viewport&&c&&o({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:pn(c.paddingTop),paddingEnd:pn(c.paddingBottom)}})}})}),[_v,kc]=bc(Ne),Sc=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:o,hasThumb:r,onThumbChange:s,onThumbPointerUp:c,onThumbPointerDown:a,onThumbPositionChange:u,onDragScroll:l,onWheelScroll:d,onResize:p,...m}=e,v=we(Ne,n),[w,h]=i.useState(null),g=L(t,N=>h(N)),b=i.useRef(null),y=i.useRef(""),C=v.viewport,x=o.content-o.viewport,k=V(d),S=V(u),E=mn(p,10);function P(N){if(b.current){const M=N.clientX-b.current.left,$=N.clientY-b.current.top;l({x:M,y:$})}}return i.useEffect(()=>{const N=M=>{const $=M.target;(w==null?void 0:w.contains($))&&k(M,x)};return document.addEventListener("wheel",N,{passive:!1}),()=>document.removeEventListener("wheel",N,{passive:!1})},[C,w,x,k]),i.useEffect(S,[o,S]),ft(w,E),ft(v.content,E),f.jsx(_v,{scope:n,scrollbar:w,hasThumb:r,onThumbChange:V(s),onThumbPointerUp:V(c),onThumbPositionChange:S,onThumbPointerDown:V(a),children:f.jsx(jt.div,{...m,ref:g,style:{position:"absolute",...m.style},onPointerDown:T(e.onPointerDown,N=>{N.button===0&&(N.target.setPointerCapture(N.pointerId),b.current=w.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),P(N))}),onPointerMove:T(e.onPointerMove,P),onPointerUp:T(e.onPointerUp,N=>{const M=N.target;M.hasPointerCapture(N.pointerId)&&M.releasePointerCapture(N.pointerId),document.body.style.webkitUserSelect=y.current,v.viewport&&(v.viewport.style.scrollBehavior=""),b.current=null})})})}),fn="ScrollAreaThumb",Pc=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=kc(fn,e.__scopeScrollArea);return f.jsx(Mt,{present:n||r.hasThumb,children:f.jsx(Lv,{ref:t,...o})})}),Lv=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:o,...r}=e,s=we(fn,n),c=kc(fn,n),{onThumbPositionChange:a}=c,u=L(t,p=>c.onThumbChange(p)),l=i.useRef(void 0),d=mn(()=>{l.current&&(l.current(),l.current=void 0)},100);return i.useEffect(()=>{const p=s.viewport;if(p){const m=()=>{if(d(),!l.current){const v=Fv(p,a);l.current=v,a()}};return a(),p.addEventListener("scroll",m),()=>p.removeEventListener("scroll",m)}},[s.viewport,d,a]),f.jsx(jt.div,{"data-state":c.hasThumb?"visible":"hidden",...r,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:T(e.onPointerDownCapture,p=>{const v=p.target.getBoundingClientRect(),w=p.clientX-v.left,h=p.clientY-v.top;c.onThumbPointerDown({x:w,y:h})}),onPointerUp:T(e.onPointerUp,c.onThumbPointerUp)})});Pc.displayName=fn;var Yo="ScrollAreaCorner",Tc=i.forwardRef((e,t)=>{const n=we(Yo,e.__scopeScrollArea),o=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&o?f.jsx(Rv,{...e,ref:t}):null});Tc.displayName=Yo;var Rv=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,...o}=e,r=we(Yo,n),[s,c]=i.useState(0),[a,u]=i.useState(0),l=!!(s&&a);return ft(r.scrollbarX,()=>{var p;const d=((p=r.scrollbarX)==null?void 0:p.offsetHeight)||0;r.onCornerHeightChange(d),u(d)}),ft(r.scrollbarY,()=>{var p;const d=((p=r.scrollbarY)==null?void 0:p.offsetWidth)||0;r.onCornerWidthChange(d),c(d)}),l?f.jsx(jt.div,{...o,ref:t,style:{width:s,height:a,position:"absolute",right:r.dir==="ltr"?0:void 0,left:r.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function pn(e){return e?parseInt(e,10):0}function Nc(e,t){const n=e/t;return isNaN(n)?0:n}function hn(e){const t=Nc(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-n)*t;return Math.max(o,18)}function $v(e,t,n,o="ltr"){const r=hn(n),s=r/2,c=t||s,a=r-c,u=n.scrollbar.paddingStart+c,l=n.scrollbar.size-n.scrollbar.paddingEnd-a,d=n.content-n.viewport,p=o==="ltr"?[0,d]:[d*-1,0];return jc([u,l],p)(e)}function Ac(e,t,n="ltr"){const o=hn(t),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-r,c=t.content-t.viewport,a=s-o,u=n==="ltr"?[0,c]:[c*-1,0],l=Ho(e,u);return jc([0,c],[0,a])(l)}function jc(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(n-e[0])}}function Mc(e,t){return e>0&&e<t}var Fv=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},o=0;return function r(){const s={left:e.scrollLeft,top:e.scrollTop},c=n.left!==s.left,a=n.top!==s.top;(c||a)&&t(),n=s,o=window.requestAnimationFrame(r)}(),()=>window.cancelAnimationFrame(o)};function mn(e,t){const n=V(e),o=i.useRef(0);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),i.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(n,t)},[n,t])}function ft(e,t){const n=V(t);Y(()=>{let o=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(o),r.unobserve(e)}}},[e,n])}var Oc=yc,Ic=xc,Wv=Tc;const Xo=i.forwardRef(({className:e,children:t,...n},o)=>f.jsxs(Oc,{ref:o,className:R("ksjsui-relative ksjsui-size-full ksjsui-overflow-hidden",e),...n,children:[t,f.jsx(qo,{}),f.jsx(Wv,{})]}));Xo.displayName=Oc.displayName;const Zo=i.forwardRef(({className:e,children:t,...n},o)=>f.jsx(Ic,{ref:o,className:R(["ksjsui-size-full ksjsui-rounded-[inherit]",e]),...n,children:t}));Zo.displayName=Ic.displayName;const qo=i.forwardRef(({className:e,orientation:t="vertical",...n},o)=>f.jsx(Ko,{ref:o,orientation:t,className:R("ksjsui-flex ksjsui-touch-none ksjsui-select-none ksjsui-transition-colors",t==="vertical"&&"ksjsui-h-full ksjsui-w-2.5 ksjsui-border-l ksjsui-border-l-transparent ksjsui-p-[1px]",t==="horizontal"&&"ksjsui-h-2.5 ksjsui-flex-col ksjsui-border-t ksjsui-border-t-transparent ksjsui-p-[1px]",e),...n,children:f.jsx(Pc,{className:R(["ksjsui-relative ksjsui-flex-1 ksjsui-rounded-full ksjsui-bg-border","forced-colors:ksjsui-bg-canvas-text","forced-colors:hover:ksjsui-bg-highlight"])})}));qo.displayName=Ko.displayName;function Bv(e){const t=e+"CollectionProvider",[n,o]=ce(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=v=>{const{scope:w,children:h}=v,g=J.useRef(null),b=J.useRef(new Map).current;return f.jsx(r,{scope:w,itemMap:b,collectionRef:g,children:h})};c.displayName=t;const a=e+"CollectionSlot",u=J.forwardRef((v,w)=>{const{scope:h,children:g}=v,b=s(a,h),y=L(w,b.collectionRef);return f.jsx(ne,{ref:y,children:g})});u.displayName=a;const l=e+"CollectionItemSlot",d="data-radix-collection-item",p=J.forwardRef((v,w)=>{const{scope:h,children:g,...b}=v,y=J.useRef(null),C=L(w,y),x=s(l,h);return J.useEffect(()=>(x.itemMap.set(y,{ref:y,...b}),()=>void x.itemMap.delete(y))),f.jsx(ne,{[d]:"",ref:C,children:g})});p.displayName=l;function m(v){const w=s(e+"CollectionConsumer",v);return J.useCallback(()=>{const g=w.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${d}]`));return Array.from(w.itemMap.values()).sort((x,k)=>b.indexOf(x.ref.current)-b.indexOf(k.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:c,Slot:u,ItemSlot:p},m,o]}var Uv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],re=Uv.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...c}=o,a=s?ne:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(a,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function zv(e,t){e&&je.flushSync(()=>e.dispatchEvent(t))}var Hv="DismissableLayer",Qo="dismissableLayer.update",Vv="dismissableLayer.pointerDownOutside",Kv="dismissableLayer.focusOutside",Dc,_c=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Lc=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:c,onDismiss:a,...u}=e,l=i.useContext(_c),[d,p]=i.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=i.useState({}),w=L(t,E=>p(E)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(g),y=d?h.indexOf(d):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,x=y>=b,k=Xv(E=>{const P=E.target,N=[...l.branches].some(M=>M.contains(P));!x||N||(r==null||r(E),c==null||c(E),E.defaultPrevented||a==null||a())},m),S=Zv(E=>{const P=E.target;[...l.branches].some(M=>M.contains(P))||(s==null||s(E),c==null||c(E),E.defaultPrevented||a==null||a())},m);return bt(E=>{y===l.layers.size-1&&(o==null||o(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},m),i.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Dc=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),Rc(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Dc)}},[d,m,n,l]),i.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),Rc())},[d,l]),i.useEffect(()=>{const E=()=>v({});return document.addEventListener(Qo,E),()=>document.removeEventListener(Qo,E)},[]),f.jsx(re.div,{...u,ref:w,style:{pointerEvents:C?x?"auto":"none":void 0,...e.style},onFocusCapture:T(e.onFocusCapture,S.onFocusCapture),onBlurCapture:T(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:T(e.onPointerDownCapture,k.onPointerDownCapture)})});Lc.displayName=Hv;var Gv="DismissableLayerBranch",Yv=i.forwardRef((e,t)=>{const n=i.useContext(_c),o=i.useRef(null),r=L(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),f.jsx(re.div,{...e,ref:r})});Yv.displayName=Gv;function Xv(e,t=globalThis==null?void 0:globalThis.document){const n=V(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!o.current){let u=function(){$c(Vv,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}else t.removeEventListener("click",r.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Zv(e,t=globalThis==null?void 0:globalThis.document){const n=V(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&$c(Kv,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Rc(){const e=new CustomEvent(Qo);document.dispatchEvent(e)}function $c(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?zv(r,s):r.dispatchEvent(s)}var Jo="focusScope.autoFocusOnMount",er="focusScope.autoFocusOnUnmount",Fc={bubbles:!1,cancelable:!0},qv="FocusScope",Wc=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...c}=e,[a,u]=i.useState(null),l=V(r),d=V(s),p=i.useRef(null),m=L(t,h=>u(h)),v=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let h=function(C){if(v.paused||!a)return;const x=C.target;a.contains(x)?p.current=x:Ge(p.current,{select:!0})},g=function(C){if(v.paused||!a)return;const x=C.relatedTarget;x!==null&&(a.contains(x)||Ge(p.current,{select:!0}))},b=function(C){if(document.activeElement===document.body)for(const k of C)k.removedNodes.length>0&&Ge(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const y=new MutationObserver(b);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),y.disconnect()}}},[o,a,v.paused]),i.useEffect(()=>{if(a){zc.add(v);const h=document.activeElement;if(!a.contains(h)){const b=new CustomEvent(Jo,Fc);a.addEventListener(Jo,l),a.dispatchEvent(b),b.defaultPrevented||(Qv(og(Bc(a)),{select:!0}),document.activeElement===h&&Ge(a))}return()=>{a.removeEventListener(Jo,l),setTimeout(()=>{const b=new CustomEvent(er,Fc);a.addEventListener(er,d),a.dispatchEvent(b),b.defaultPrevented||Ge(h??document.body,{select:!0}),a.removeEventListener(er,d),zc.remove(v)},0)}}},[a,l,d,v]);const w=i.useCallback(h=>{if(!n&&!o||v.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,b=document.activeElement;if(g&&b){const y=h.currentTarget,[C,x]=Jv(y);C&&x?!h.shiftKey&&b===x?(h.preventDefault(),n&&Ge(C,{select:!0})):h.shiftKey&&b===C&&(h.preventDefault(),n&&Ge(x,{select:!0})):b===y&&h.preventDefault()}},[n,o,v.paused]);return f.jsx(re.div,{tabIndex:-1,...c,ref:m,onKeyDown:w})});Wc.displayName=qv;function Qv(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Ge(o,{select:t}),document.activeElement!==n)return}function Jv(e){const t=Bc(e),n=Uc(t,e),o=Uc(t.reverse(),e);return[n,o]}function Bc(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Uc(e,t){for(const n of e)if(!eg(n,{upTo:t}))return n}function eg(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 tg(e){return e instanceof HTMLInputElement&&"select"in e}function Ge(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&tg(e)&&t&&e.select()}}var zc=ng();function ng(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Hc(e,t),e.unshift(t)},remove(t){var n;e=Hc(e,t),(n=e[0])==null||n.resume()}}}function Hc(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function og(e){return e.filter(t=>t.tagName!=="A")}var rg="Arrow",Vc=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return f.jsx(re.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});Vc.displayName=rg;var sg=Vc,tr="Popper",[Kc,Gc]=ce(tr),[ig,Yc]=Kc(tr),Xc=e=>{const{__scopePopper:t,children:n}=e,[o,r]=i.useState(null);return f.jsx(ig,{scope:t,anchor:o,onAnchorChange:r,children:n})};Xc.displayName=tr;var Zc="PopperAnchor",qc=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=Yc(Zc,n),c=i.useRef(null),a=L(t,c);return i.useEffect(()=>{s.onAnchorChange((o==null?void 0:o.current)||c.current)}),o?null:f.jsx(re.div,{...r,ref:a})});qc.displayName=Zc;var nr="PopperContent",[ag,cg]=Kc(nr),Qc=i.forwardRef((e,t)=>{var F,X,Q,G,Z,q;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:c=0,arrowPadding:a=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:w,...h}=e,g=Yc(nr,n),[b,y]=i.useState(null),C=L(t,te=>y(te)),[x,k]=i.useState(null),S=rn(x),E=(S==null?void 0:S.width)??0,P=(S==null?void 0:S.height)??0,N=o+(s!=="center"?"-"+s:""),M=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},$=Array.isArray(l)?l:[l],D=$.length>0,W={padding:M,boundary:$.filter(ug),altBoundary:D},{refs:A,floatingStyles:U,placement:_,isPositioned:B,middlewareData:I}=xo({strategy:"fixed",placement:N,whileElementsMounted:(...te)=>yo(...te,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[Eo({mainAxis:r+P,alignmentAxis:c}),u&&ko({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?So():void 0,...W}),u&&Po({...W}),To({...W,apply:({elements:te,rects:ue,availableWidth:Le,availableHeight:Re})=>{const{width:$e,height:_t}=ue.reference,fe=te.floating.style;fe.setProperty("--radix-popper-available-width",`${Le}px`),fe.setProperty("--radix-popper-available-height",`${Re}px`),fe.setProperty("--radix-popper-anchor-width",`${$e}px`),fe.setProperty("--radix-popper-anchor-height",`${_t}px`)}}),x&&Ao({element:x,padding:a}),dg({arrowWidth:E,arrowHeight:P}),m&&No({strategy:"referenceHidden",...W})]}),[j,K]=tl(_),z=V(w);Y(()=>{B&&(z==null||z())},[B,z]);const oe=(F=I.arrow)==null?void 0:F.x,ie=(X=I.arrow)==null?void 0:X.y,se=((Q=I.arrow)==null?void 0:Q.centerOffset)!==0,[me,ae]=i.useState();return Y(()=>{b&&ae(window.getComputedStyle(b).zIndex)},[b]),f.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:B?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[(G=I.transformOrigin)==null?void 0:G.x,(Z=I.transformOrigin)==null?void 0:Z.y].join(" "),...((q=I.hide)==null?void 0:q.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(ag,{scope:n,placedSide:j,onArrowChange:k,arrowX:oe,arrowY:ie,shouldHideArrow:se,children:f.jsx(re.div,{"data-side":j,"data-align":K,...h,ref:C,style:{...h.style,animation:B?void 0:"none"}})})})});Qc.displayName=nr;var Jc="PopperArrow",lg={top:"bottom",right:"left",bottom:"top",left:"right"},el=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=cg(Jc,o),c=lg[s.placedSide];return f.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:f.jsx(sg,{...r,ref:n,style:{...r.style,display:"block"}})})});el.displayName=Jc;function ug(e){return e!==null}var dg=e=>({name:"transformOrigin",options:e,fn(t){var g,b,y;const{placement:n,rects:o,middlewareData:r}=t,c=((g=r.arrow)==null?void 0:g.centerOffset)!==0,a=c?0:e.arrowWidth,u=c?0:e.arrowHeight,[l,d]=tl(n),p={start:"0%",center:"50%",end:"100%"}[d],m=(((b=r.arrow)==null?void 0:b.x)??0)+a/2,v=(((y=r.arrow)==null?void 0:y.y)??0)+u/2;let w="",h="";return l==="bottom"?(w=c?p:`${m}px`,h=`${-u}px`):l==="top"?(w=c?p:`${m}px`,h=`${o.floating.height+u}px`):l==="right"?(w=`${-u}px`,h=c?p:`${v}px`):l==="left"&&(w=`${o.floating.width+u}px`,h=c?p:`${v}px`),{data:{x:w,y:h}}}});function tl(e){const[t,n="center"]=e.split("-");return[t,n]}var fg=Xc,pg=qc,hg=Qc,mg=el,vg="Portal",nl=i.forwardRef((e,t)=>{var a;const{container:n,...o}=e,[r,s]=i.useState(!1);Y(()=>s(!0),[]);const c=n||r&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return c?mt.createPortal(f.jsx(re.div,{...o,ref:t}),c):null});nl.displayName=vg;function ol(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var gg="VisuallyHidden",rl=i.forwardRef((e,t)=>f.jsx(re.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));rl.displayName=gg;var wg=[" ","Enter","ArrowUp","ArrowDown"],bg=[" ","Enter"],Ot="Select",[vn,gn,yg]=Bv(Ot),[pt,dy]=ce(Ot,[yg,Gc]),wn=Gc(),[Cg,Ye]=pt(Ot),[xg,Eg]=pt(Ot),sl=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:s,value:c,defaultValue:a,onValueChange:u,dir:l,name:d,autoComplete:p,disabled:m,required:v,form:w}=e,h=wn(t),[g,b]=i.useState(null),[y,C]=i.useState(null),[x,k]=i.useState(!1),S=Yt(l),[E=!1,P]=Oe({prop:o,defaultProp:r,onChange:s}),[N,M]=Oe({prop:c,defaultProp:a,onChange:u}),$=i.useRef(null),D=g?w||!!g.closest("form"):!0,[W,A]=i.useState(new Set),U=Array.from(W).map(_=>_.props.value).join(";");return f.jsx(fg,{...h,children:f.jsxs(Cg,{required:v,scope:t,trigger:g,onTriggerChange:b,valueNode:y,onValueNodeChange:C,valueNodeHasChildren:x,onValueNodeHasChildrenChange:k,contentId:ve(),value:N,onValueChange:M,open:E,onOpenChange:P,dir:S,triggerPointerDownPosRef:$,disabled:m,children:[f.jsx(vn.Provider,{scope:t,children:f.jsx(xg,{scope:e.__scopeSelect,onNativeOptionAdd:i.useCallback(_=>{A(B=>new Set(B).add(_))},[]),onNativeOptionRemove:i.useCallback(_=>{A(B=>{const I=new Set(B);return I.delete(_),I})},[]),children:n})}),D?f.jsxs(Nl,{"aria-hidden":!0,required:v,tabIndex:-1,name:d,autoComplete:p,value:N,onChange:_=>M(_.target.value),disabled:m,form:w,children:[N===void 0?f.jsx("option",{value:""}):null,Array.from(W)]},U):null]})})};sl.displayName=Ot;var il="SelectTrigger",al=i.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,s=wn(n),c=Ye(il,n),a=c.disabled||o,u=L(t,c.onTriggerChange),l=gn(n),d=i.useRef("touch"),[p,m,v]=Al(h=>{const g=l().filter(C=>!C.disabled),b=g.find(C=>C.value===c.value),y=jl(g,h,b);y!==void 0&&c.onValueChange(y.value)}),w=h=>{a||(c.onOpenChange(!0),v()),h&&(c.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return f.jsx(pg,{asChild:!0,...s,children:f.jsx(re.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Tl(c.value)?"":void 0,...r,ref:u,onClick:T(r.onClick,h=>{h.currentTarget.focus(),d.current!=="mouse"&&w(h)}),onPointerDown:T(r.onPointerDown,h=>{d.current=h.pointerType;const g=h.target;g.hasPointerCapture(h.pointerId)&&g.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(w(h),h.preventDefault())}),onKeyDown:T(r.onKeyDown,h=>{const g=p.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&m(h.key),!(g&&h.key===" ")&&wg.includes(h.key)&&(w(),h.preventDefault())})})})});al.displayName=il;var cl="SelectValue",ll=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:s,placeholder:c="",...a}=e,u=Ye(cl,n),{onValueNodeHasChildrenChange:l}=u,d=s!==void 0,p=L(t,u.onValueNodeChange);return Y(()=>{l(d)},[l,d]),f.jsx(re.span,{...a,ref:p,style:{pointerEvents:"none"},children:Tl(u.value)?f.jsx(f.Fragment,{children:c}):s})});ll.displayName=cl;var kg="SelectIcon",ul=i.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return f.jsx(re.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});ul.displayName=kg;var Sg="SelectPortal",dl=e=>f.jsx(nl,{asChild:!0,...e});dl.displayName=Sg;var et="SelectContent",fl=i.forwardRef((e,t)=>{const n=Ye(et,e.__scopeSelect),[o,r]=i.useState();if(Y(()=>{r(new DocumentFragment)},[]),!n.open){const s=o;return s?je.createPortal(f.jsx(pl,{scope:e.__scopeSelect,children:f.jsx(vn.Slot,{scope:e.__scopeSelect,children:f.jsx("div",{children:e.children})})}),s):null}return f.jsx(hl,{...e,ref:t})});fl.displayName=et;var xe=10,[pl,Xe]=pt(et),Pg="SelectContentImpl",hl=i.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:c,side:a,sideOffset:u,align:l,alignOffset:d,arrowPadding:p,collisionBoundary:m,collisionPadding:v,sticky:w,hideWhenDetached:h,avoidCollisions:g,...b}=e,y=Ye(et,n),[C,x]=i.useState(null),[k,S]=i.useState(null),E=L(t,F=>x(F)),[P,N]=i.useState(null),[M,$]=i.useState(null),D=gn(n),[W,A]=i.useState(!1),U=i.useRef(!1);i.useEffect(()=>{if(C)return Xn(C)},[C]),zn();const _=i.useCallback(F=>{const[X,...Q]=D().map(q=>q.ref.current),[G]=Q.slice(-1),Z=document.activeElement;for(const q of F)if(q===Z||(q==null||q.scrollIntoView({block:"nearest"}),q===X&&k&&(k.scrollTop=0),q===G&&k&&(k.scrollTop=k.scrollHeight),q==null||q.focus(),document.activeElement!==Z))return},[D,k]),B=i.useCallback(()=>_([P,C]),[_,P,C]);i.useEffect(()=>{W&&B()},[W,B]);const{onOpenChange:I,triggerPointerDownPosRef:j}=y;i.useEffect(()=>{if(C){let F={x:0,y:0};const X=G=>{var Z,q;F={x:Math.abs(Math.round(G.pageX)-(((Z=j.current)==null?void 0:Z.x)??0)),y:Math.abs(Math.round(G.pageY)-(((q=j.current)==null?void 0:q.y)??0))}},Q=G=>{F.x<=10&&F.y<=10?G.preventDefault():C.contains(G.target)||I(!1),document.removeEventListener("pointermove",X),j.current=null};return j.current!==null&&(document.addEventListener("pointermove",X),document.addEventListener("pointerup",Q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",X),document.removeEventListener("pointerup",Q,{capture:!0})}}},[C,I,j]),i.useEffect(()=>{const F=()=>I(!1);return window.addEventListener("blur",F),window.addEventListener("resize",F),()=>{window.removeEventListener("blur",F),window.removeEventListener("resize",F)}},[I]);const[K,z]=Al(F=>{const X=D().filter(Z=>!Z.disabled),Q=X.find(Z=>Z.ref.current===document.activeElement),G=jl(X,F,Q);G&&setTimeout(()=>G.ref.current.focus())}),oe=i.useCallback((F,X,Q)=>{const G=!U.current&&!Q;(y.value!==void 0&&y.value===X||G)&&(N(F),G&&(U.current=!0))},[y.value]),ie=i.useCallback(()=>C==null?void 0:C.focus(),[C]),se=i.useCallback((F,X,Q)=>{const G=!U.current&&!Q;(y.value!==void 0&&y.value===X||G)&&$(F)},[y.value]),me=o==="popper"?or:ml,ae=me===or?{side:a,sideOffset:u,align:l,alignOffset:d,arrowPadding:p,collisionBoundary:m,collisionPadding:v,sticky:w,hideWhenDetached:h,avoidCollisions:g}:{};return f.jsx(pl,{scope:n,content:C,viewport:k,onViewportChange:S,itemRefCallback:oe,selectedItem:P,onItemLeave:ie,itemTextRefCallback:se,focusSelectedItem:B,selectedItemText:M,position:o,isPositioned:W,searchRef:K,children:f.jsx(Ht,{as:ne,allowPinchZoom:!0,children:f.jsx(Wc,{asChild:!0,trapped:y.open,onMountAutoFocus:F=>{F.preventDefault()},onUnmountAutoFocus:T(r,F=>{var X;(X=y.trigger)==null||X.focus({preventScroll:!0}),F.preventDefault()}),children:f.jsx(Lc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:F=>F.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:f.jsx(me,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:F=>F.preventDefault(),...b,...ae,onPlaced:()=>A(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:T(b.onKeyDown,F=>{const X=F.ctrlKey||F.altKey||F.metaKey;if(F.key==="Tab"&&F.preventDefault(),!X&&F.key.length===1&&z(F.key),["ArrowUp","ArrowDown","Home","End"].includes(F.key)){let G=D().filter(Z=>!Z.disabled).map(Z=>Z.ref.current);if(["ArrowUp","End"].includes(F.key)&&(G=G.slice().reverse()),["ArrowUp","ArrowDown"].includes(F.key)){const Z=F.target,q=G.indexOf(Z);G=G.slice(q+1)}setTimeout(()=>_(G)),F.preventDefault()}})})})})})})});hl.displayName=Pg;var Tg="SelectItemAlignedPosition",ml=i.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,s=Ye(et,n),c=Xe(et,n),[a,u]=i.useState(null),[l,d]=i.useState(null),p=L(t,E=>d(E)),m=gn(n),v=i.useRef(!1),w=i.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:b,focusSelectedItem:y}=c,C=i.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&l&&h&&g&&b){const E=s.trigger.getBoundingClientRect(),P=l.getBoundingClientRect(),N=s.valueNode.getBoundingClientRect(),M=b.getBoundingClientRect();if(s.dir!=="rtl"){const Z=M.left-P.left,q=N.left-Z,te=E.left-q,ue=E.width+te,Le=Math.max(ue,P.width),Re=window.innerWidth-xe,$e=Ho(q,[xe,Math.max(xe,Re-Le)]);a.style.minWidth=ue+"px",a.style.left=$e+"px"}else{const Z=P.right-M.right,q=window.innerWidth-N.right-Z,te=window.innerWidth-E.right-q,ue=E.width+te,Le=Math.max(ue,P.width),Re=window.innerWidth-xe,$e=Ho(q,[xe,Math.max(xe,Re-Le)]);a.style.minWidth=ue+"px",a.style.right=$e+"px"}const $=m(),D=window.innerHeight-xe*2,W=h.scrollHeight,A=window.getComputedStyle(l),U=parseInt(A.borderTopWidth,10),_=parseInt(A.paddingTop,10),B=parseInt(A.borderBottomWidth,10),I=parseInt(A.paddingBottom,10),j=U+_+W+I+B,K=Math.min(g.offsetHeight*5,j),z=window.getComputedStyle(h),oe=parseInt(z.paddingTop,10),ie=parseInt(z.paddingBottom,10),se=E.top+E.height/2-xe,me=D-se,ae=g.offsetHeight/2,F=g.offsetTop+ae,X=U+_+F,Q=j-X;if(X<=se){const Z=$.length>0&&g===$[$.length-1].ref.current;a.style.bottom="0px";const q=l.clientHeight-h.offsetTop-h.offsetHeight,te=Math.max(me,ae+(Z?ie:0)+q+B),ue=X+te;a.style.height=ue+"px"}else{const Z=$.length>0&&g===$[0].ref.current;a.style.top="0px";const te=Math.max(se,U+h.offsetTop+(Z?oe:0)+ae)+Q;a.style.height=te+"px",h.scrollTop=X-se+h.offsetTop}a.style.margin=`${xe}px 0`,a.style.minHeight=K+"px",a.style.maxHeight=D+"px",o==null||o(),requestAnimationFrame(()=>v.current=!0)}},[m,s.trigger,s.valueNode,a,l,h,g,b,s.dir,o]);Y(()=>C(),[C]);const[x,k]=i.useState();Y(()=>{l&&k(window.getComputedStyle(l).zIndex)},[l]);const S=i.useCallback(E=>{E&&w.current===!0&&(C(),y==null||y(),w.current=!1)},[C,y]);return f.jsx(Ag,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:v,onScrollButtonChange:S,children:f.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x},children:f.jsx(re.div,{...r,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});ml.displayName=Tg;var Ng="SelectPopperPosition",or=i.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=xe,...s}=e,c=wn(n);return f.jsx(hg,{...c,...s,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...s.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)"}})});or.displayName=Ng;var[Ag,rr]=pt(et,{}),sr="SelectViewport",vl=i.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,s=Xe(sr,n),c=rr(sr,n),a=L(t,s.onViewportChange),u=i.useRef(0);return f.jsxs(f.Fragment,{children:[f.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),f.jsx(vn.Slot,{scope:n,children:f.jsx(re.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:T(r.onScroll,l=>{const d=l.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:m}=c;if(m!=null&&m.current&&p){const v=Math.abs(u.current-d.scrollTop);if(v>0){const w=window.innerHeight-xe*2,h=parseFloat(p.style.minHeight),g=parseFloat(p.style.height),b=Math.max(h,g);if(b<w){const y=b+v,C=Math.min(w,y),x=y-C;p.style.height=C+"px",p.style.bottom==="0px"&&(d.scrollTop=x>0?x:0,p.style.justifyContent="flex-end")}}}u.current=d.scrollTop})})})]})});vl.displayName=sr;var gl="SelectGroup",[jg,Mg]=pt(gl),Og=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=ve();return f.jsx(jg,{scope:n,id:r,children:f.jsx(re.div,{role:"group","aria-labelledby":r,...o,ref:t})})});Og.displayName=gl;var wl="SelectLabel",bl=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Mg(wl,n);return f.jsx(re.div,{id:r.id,...o,ref:t})});bl.displayName=wl;var bn="SelectItem",[Ig,yl]=pt(bn),Cl=i.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:s,...c}=e,a=Ye(bn,n),u=Xe(bn,n),l=a.value===o,[d,p]=i.useState(s??""),[m,v]=i.useState(!1),w=L(t,y=>{var C;return(C=u.itemRefCallback)==null?void 0:C.call(u,y,o,r)}),h=ve(),g=i.useRef("touch"),b=()=>{r||(a.onValueChange(o),a.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return f.jsx(Ig,{scope:n,value:o,disabled:r,textId:h,isSelected:l,onItemTextChange:i.useCallback(y=>{p(C=>C||((y==null?void 0:y.textContent)??"").trim())},[]),children:f.jsx(vn.ItemSlot,{scope:n,value:o,disabled:r,textValue:d,children:f.jsx(re.div,{role:"option","aria-labelledby":h,"data-highlighted":m?"":void 0,"aria-selected":l&&m,"data-state":l?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...c,ref:w,onFocus:T(c.onFocus,()=>v(!0)),onBlur:T(c.onBlur,()=>v(!1)),onClick:T(c.onClick,()=>{g.current!=="mouse"&&b()}),onPointerUp:T(c.onPointerUp,()=>{g.current==="mouse"&&b()}),onPointerDown:T(c.onPointerDown,y=>{g.current=y.pointerType}),onPointerMove:T(c.onPointerMove,y=>{var C;g.current=y.pointerType,r?(C=u.onItemLeave)==null||C.call(u):g.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:T(c.onPointerLeave,y=>{var C;y.currentTarget===document.activeElement&&((C=u.onItemLeave)==null||C.call(u))}),onKeyDown:T(c.onKeyDown,y=>{var x;((x=u.searchRef)==null?void 0:x.current)!==""&&y.key===" "||(bg.includes(y.key)&&b(),y.key===" "&&y.preventDefault())})})})})});Cl.displayName=bn;var It="SelectItemText",xl=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...s}=e,c=Ye(It,n),a=Xe(It,n),u=yl(It,n),l=Eg(It,n),[d,p]=i.useState(null),m=L(t,b=>p(b),u.onItemTextChange,b=>{var y;return(y=a.itemTextRefCallback)==null?void 0:y.call(a,b,u.value,u.disabled)}),v=d==null?void 0:d.textContent,w=i.useMemo(()=>f.jsx("option",{value:u.value,disabled:u.disabled,children:v},u.value),[u.disabled,u.value,v]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return Y(()=>(h(w),()=>g(w)),[h,g,w]),f.jsxs(f.Fragment,{children:[f.jsx(re.span,{id:u.textId,...s,ref:m}),u.isSelected&&c.valueNode&&!c.valueNodeHasChildren?je.createPortal(s.children,c.valueNode):null]})});xl.displayName=It;var El="SelectItemIndicator",kl=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return yl(El,n).isSelected?f.jsx(re.span,{"aria-hidden":!0,...o,ref:t}):null});kl.displayName=El;var ir="SelectScrollUpButton",Dg=i.forwardRef((e,t)=>{const n=Xe(ir,e.__scopeSelect),o=rr(ir,e.__scopeSelect),[r,s]=i.useState(!1),c=L(t,o.onScrollButtonChange);return Y(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=u.scrollTop>0;s(l)};const u=n.viewport;return a(),u.addEventListener("scroll",a),()=>u.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),r?f.jsx(Sl,{...e,ref:c,onAutoScroll:()=>{const{viewport:a,selectedItem:u}=n;a&&u&&(a.scrollTop=a.scrollTop-u.offsetHeight)}}):null});Dg.displayName=ir;var ar="SelectScrollDownButton",_g=i.forwardRef((e,t)=>{const n=Xe(ar,e.__scopeSelect),o=rr(ar,e.__scopeSelect),[r,s]=i.useState(!1),c=L(t,o.onScrollButtonChange);return Y(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=u.scrollHeight-u.clientHeight,d=Math.ceil(u.scrollTop)<l;s(d)};const u=n.viewport;return a(),u.addEventListener("scroll",a),()=>u.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),r?f.jsx(Sl,{...e,ref:c,onAutoScroll:()=>{const{viewport:a,selectedItem:u}=n;a&&u&&(a.scrollTop=a.scrollTop+u.offsetHeight)}}):null});_g.displayName=ar;var Sl=i.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,s=Xe("SelectScrollButton",n),c=i.useRef(null),a=gn(n),u=i.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return i.useEffect(()=>()=>u(),[u]),Y(()=>{var d;const l=a().find(p=>p.ref.current===document.activeElement);(d=l==null?void 0:l.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),f.jsx(re.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:T(r.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(o,50))}),onPointerMove:T(r.onPointerMove,()=>{var l;(l=s.onItemLeave)==null||l.call(s),c.current===null&&(c.current=window.setInterval(o,50))}),onPointerLeave:T(r.onPointerLeave,()=>{u()})})}),Lg="SelectSeparator",Pl=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return f.jsx(re.div,{"aria-hidden":!0,...o,ref:t})});Pl.displayName=Lg;var cr="SelectArrow",Rg=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=wn(n),s=Ye(cr,n),c=Xe(cr,n);return s.open&&c.position==="popper"?f.jsx(mg,{...r,...o,ref:t}):null});Rg.displayName=cr;function Tl(e){return e===""||e===void 0}var Nl=i.forwardRef((e,t)=>{const{value:n,...o}=e,r=i.useRef(null),s=L(t,r),c=ol(n);return i.useEffect(()=>{const a=r.current,u=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(u,"value").set;if(c!==n&&d){const p=new Event("change",{bubbles:!0});d.call(a,n),a.dispatchEvent(p)}},[c,n]),f.jsx(rl,{asChild:!0,children:f.jsx("select",{...o,ref:s,defaultValue:n})})});Nl.displayName="BubbleSelect";function Al(e){const t=V(e),n=i.useRef(""),o=i.useRef(0),r=i.useCallback(c=>{const a=n.current+c;t(a),function u(l){n.current=l,window.clearTimeout(o.current),l!==""&&(o.current=window.setTimeout(()=>u(""),1e3))}(a)},[t]),s=i.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,s]}function jl(e,t,n){const r=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let c=$g(e,Math.max(s,0));r.length===1&&(c=c.filter(l=>l!==n));const u=c.find(l=>l.textValue.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function $g(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Fg=sl,Ml=al,Wg=ll,Bg=ul,Ug=dl,Ol=fl,zg=vl,Il=bl,Dl=Cl,Hg=xl,Vg=kl,_l=Pl;const Kg=Fg,Gg=Wg,Ll=i.forwardRef(({className:e,children:t,...n},o)=>f.jsxs(Ml,{ref:o,className:R(["ksjsui-flex ksjsui-h-10 ksjsui-w-full ksjsui-items-center ksjsui-justify-between ksjsui-gap-x-2 ksjsui-rounded-md ksjsui-border ksjsui-border-input ksjsui-bg-background ksjsui-px-3 ksjsui-py-2 ksjsui-text-sm ksjsui-ring-offset-background","data-[placeholder]:ksjsui-text-placeholder","focus:ksjsui-outline focus:ksjsui-outline-ring","disabled:ksjsui-cursor-not-allowed disabled:ksjsui-opacity-50","[&>span]:ksjsui-truncate"],e),...n,children:[t,f.jsx(Bg,{asChild:!0,children:f.jsx(Zs,{className:"ksjsui-shrink-0 ksjsui-opacity-50"})})]}));Ll.displayName=Ml.displayName;const Rl=i.forwardRef(({className:e,children:t,position:n="popper",...o},r)=>f.jsx(Ug,{children:f.jsx(Ol,{ref:r,className:R(["ksjsui-z-50 ksjsui-flex ksjsui-flex-col ksjsui-gap-y-2 ksjsui-overflow-hidden ksjsui-rounded-lg ksjsui-border-0 ksjsui-bg-popover ksjsui-text-popover-foreground ksjsui-shadow-md","ksjsui-max-h-[var(--radix-select-content-available-height)]","ksjsui-min-w-[var(--radix-select-trigger-width)] ksjsui-max-w-[var(--radix-select-content-available-width)]","data-[state=open]:ksjsui-animate-in data-[state=open]:ksjsui-fade-in-0 data-[state=open]:ksjsui-zoom-in-95","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-0 data-[state=closed]:ksjsui-zoom-out-95","data-[side=top]:ksjsui-slide-in-from-bottom-2","data-[side=right]:ksjsui-slide-in-from-left-2","data-[side=bottom]:ksjsui-slide-in-from-top-2","data-[side=left]:ksjsui-slide-in-from-right-2","forced-colors:ksjsui-border"],n==="popper"&&["data-[side=top]:-ksjsui-translate-y-1","data-[side=right]:ksjsui-translate-x-1","data-[side=bottom]:ksjsui-translate-y-1","data-[side=left]:-ksjsui-translate-x-1"],e),position:n,...o,children:f.jsx(zg,{className:R("ksjsui-flex ksjsui-flex-col ksjsui-gap-y-2 ksjsui-px-2 ksjsui-py-4"),asChild:!0,children:f.jsx(Xo,{children:f.jsx(Zo,{children:t})})})})}));Rl.displayName=Ol.displayName;const Yg=i.forwardRef(({className:e,...t},n)=>f.jsx(Il,{ref:n,className:R("ksjsui-px-2 ksjsui-pt-2 ksjsui-text-sm ksjsui-text-label",e),...t}));Yg.displayName=Il.displayName;const $l=i.forwardRef(({className:e,children:t,...n},o)=>f.jsxs(Dl,{ref:o,className:R(["ksjsui-flex ksjsui-w-full ksjsui-cursor-default ksjsui-select-none ksjsui-items-center ksjsui-justify-between ksjsui-gap-2 ksjsui-rounded-sm ksjsui-px-2 ksjsui-py-1 ksjsui-text-base ksjsui-outline-0","data-[disabled]:ksjsui-pointer-events-none data-[disabled]:ksjsui-opacity-50","focus:ksjsui-bg-selected-hover focus:ksjsui-text-selected-foreground","forced-colors:focus:ksjsui-bg-highlight forced-colors:focus:ksjsui-text-highlight-text forced-colors:focus:ksjsui-forced-color-adjust-none"],e),...n,children:[f.jsx(Hg,{children:t}),f.jsx(Vg,{children:f.jsx(eo,{className:"ksjsui-size-6 ksjsui-shrink-0"})})]}));$l.displayName=Dl.displayName;const Xg=i.forwardRef(({className:e,...t},n)=>f.jsx(_l,{ref:n,className:R(["ksjsui-my-1 ksjsui-h-px ksjsui-shrink-0 ksjsui-bg-border","forced-colors:ksjsui-bg-button-border"],e),...t}));Xg.displayName=_l.displayName;var Zg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],qg=Zg.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...c}=o,a=s?ne:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(a,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Qg="Separator",Fl="horizontal",Jg=["horizontal","vertical"],Wl=i.forwardRef((e,t)=>{const{decorative:n,orientation:o=Fl,...r}=e,s=ew(o)?o:Fl,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return f.jsx(qg.div,{"data-orientation":s,...a,...r,ref:t})});Wl.displayName=Qg;function ew(e){return Jg.includes(e)}var Bl=Wl;const Ul=i.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...o},r)=>f.jsx(Bl,{ref:r,decorative:n,orientation:t,className:R("ksjsui-shrink-0 ksjsui-bg-border forced-colors:ksjsui-bg-canvas-text forced-colors:ksjsui-forced-color-adjust-none",t==="horizontal"?"ksjsui-block ksjsui-h-px ksjsui-w-full":"ksjsui-inline-block ksjsui-w-px",e),...o}));Ul.displayName=Bl.displayName;var tw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],zl=tw.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...c}=o,a=s?ne:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(a,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),lr="Switch",[nw,fy]=ce(lr),[ow,rw]=nw(lr),Hl=i.forwardRef((e,t)=>{const{__scopeSwitch:n,name:o,checked:r,defaultChecked:s,required:c,disabled:a,value:u="on",onCheckedChange:l,form:d,...p}=e,[m,v]=i.useState(null),w=L(t,C=>v(C)),h=i.useRef(!1),g=m?d||!!m.closest("form"):!0,[b=!1,y]=Oe({prop:r,defaultProp:s,onChange:l});return f.jsxs(ow,{scope:n,checked:b,disabled:a,children:[f.jsx(zl.button,{type:"button",role:"switch","aria-checked":b,"aria-required":c,"data-state":Gl(b),"data-disabled":a?"":void 0,disabled:a,value:u,...p,ref:w,onClick:T(e.onClick,C=>{y(x=>!x),g&&(h.current=C.isPropagationStopped(),h.current||C.stopPropagation())})}),g&&f.jsx(sw,{control:m,bubbles:!h.current,name:o,value:u,checked:b,required:c,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});Hl.displayName=lr;var Vl="SwitchThumb",Kl=i.forwardRef((e,t)=>{const{__scopeSwitch:n,...o}=e,r=rw(Vl,n);return f.jsx(zl.span,{"data-state":Gl(r.checked),"data-disabled":r.disabled?"":void 0,...o,ref:t})});Kl.displayName=Vl;var sw=e=>{const{control:t,checked:n,bubbles:o=!0,...r}=e,s=i.useRef(null),c=ol(n),a=rn(t);return i.useEffect(()=>{const u=s.current,l=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(l,"checked").set;if(c!==n&&p){const m=new Event("click",{bubbles:o});p.call(u,n),u.dispatchEvent(m)}},[c,n,o]),f.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:s,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Gl(e){return e?"checked":"unchecked"}var Yl=Hl,iw=Kl;const Xl=i.forwardRef(({className:e,tabIndex:t=0,...n},o)=>f.jsx(Yl,{className:R(["ksjsui-peer ksjsui-inline-flex ksjsui-h-6 ksjsui-w-11 ksjsui-shrink-0 ksjsui-cursor-pointer ksjsui-items-center ksjsui-rounded-full ksjsui-border-2 ksjsui-border-transparent ksjsui-bg-neutral ksjsui-transition-colors","focus-visible:ksjsui-outline-none focus-visible:ksjsui-ring-2 focus-visible:ksjsui-ring-ring focus-visible:ksjsui-ring-offset-2 focus-visible:ksjsui-ring-offset-background","disabled:ksjsui-pointer-events-none disabled:ksjsui-cursor-not-allowed disabled:ksjsui-opacity-50","data-[state=unchecked]:ksjsui-bg-input","data-[state=checked]:ksjsui-border-secondary data-[state=checked]:ksjsui-bg-secondary","forced-colors:ksjsui-border-button-border forced-colors:ksjsui-transition-none","forced-colors:data-[state=checked]:ksjsui-border-highlight forced-colors:data-[state=checked]:ksjsui-bg-highlight"],e),tabIndex:t,...n,ref:o,children:f.jsx(iw,{className:R(["ksjsui-pointer-events-none ksjsui-block ksjsui-size-5 ksjsui-translate-x-0 ksjsui-rounded-full ksjsui-bg-thumb ksjsui-shadow ksjsui-ring-0 ksjsui-transition-transform","data-[state=unchecked]:ksjsui-translate-x-0","data-[state=checked]:ksjsui-translate-x-5","rtl:data-[state=checked]:-ksjsui-translate-x-5","forced-colors:ksjsui-bg-button-border forced-colors:ksjsui-transition-none","forced-colors:data-[state=checked]:ksjsui-bg-canvas"])})}));Xl.displayName=Yl.displayName;function aw(e){const t=e+"CollectionProvider",[n,o]=ce(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=v=>{const{scope:w,children:h}=v,g=J.useRef(null),b=J.useRef(new Map).current;return f.jsx(r,{scope:w,itemMap:b,collectionRef:g,children:h})};c.displayName=t;const a=e+"CollectionSlot",u=J.forwardRef((v,w)=>{const{scope:h,children:g}=v,b=s(a,h),y=L(w,b.collectionRef);return f.jsx(ne,{ref:y,children:g})});u.displayName=a;const l=e+"CollectionItemSlot",d="data-radix-collection-item",p=J.forwardRef((v,w)=>{const{scope:h,children:g,...b}=v,y=J.useRef(null),C=L(w,y),x=s(l,h);return J.useEffect(()=>(x.itemMap.set(y,{ref:y,...b}),()=>void x.itemMap.delete(y))),f.jsx(ne,{[d]:"",ref:C,children:g})});p.displayName=l;function m(v){const w=s(e+"CollectionConsumer",v);return J.useCallback(()=>{const g=w.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${d}]`));return Array.from(w.itemMap.values()).sort((x,k)=>b.indexOf(x.ref.current)-b.indexOf(k.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:c,Slot:u,ItemSlot:p},m,o]}var cw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ae=cw.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...c}=o,a=s?ne:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(a,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Zl(e,t){e&&je.flushSync(()=>e.dispatchEvent(t))}var lw="DismissableLayer",ur="dismissableLayer.update",uw="dismissableLayer.pointerDownOutside",dw="dismissableLayer.focusOutside",ql,Ql=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jl=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:c,onDismiss:a,...u}=e,l=i.useContext(Ql),[d,p]=i.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=i.useState({}),w=L(t,E=>p(E)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(g),y=d?h.indexOf(d):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,x=y>=b,k=pw(E=>{const P=E.target,N=[...l.branches].some(M=>M.contains(P));!x||N||(r==null||r(E),c==null||c(E),E.defaultPrevented||a==null||a())},m),S=hw(E=>{const P=E.target;[...l.branches].some(M=>M.contains(P))||(s==null||s(E),c==null||c(E),E.defaultPrevented||a==null||a())},m);return bt(E=>{y===l.layers.size-1&&(o==null||o(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},m),i.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(ql=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),tu(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=ql)}},[d,m,n,l]),i.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),tu())},[d,l]),i.useEffect(()=>{const E=()=>v({});return document.addEventListener(ur,E),()=>document.removeEventListener(ur,E)},[]),f.jsx(Ae.div,{...u,ref:w,style:{pointerEvents:C?x?"auto":"none":void 0,...e.style},onFocusCapture:T(e.onFocusCapture,S.onFocusCapture),onBlurCapture:T(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:T(e.onPointerDownCapture,k.onPointerDownCapture)})});Jl.displayName=lw;var fw="DismissableLayerBranch",eu=i.forwardRef((e,t)=>{const n=i.useContext(Ql),o=i.useRef(null),r=L(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),f.jsx(Ae.div,{...e,ref:r})});eu.displayName=fw;function pw(e,t=globalThis==null?void 0:globalThis.document){const n=V(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!o.current){let u=function(){nu(uw,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}else t.removeEventListener("click",r.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function hw(e,t=globalThis==null?void 0:globalThis.document){const n=V(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&nu(dw,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function tu(){const e=new CustomEvent(ur);document.dispatchEvent(e)}function nu(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Zl(r,s):r.dispatchEvent(s)}var mw=Jl,vw=eu,gw="Portal",ou=i.forwardRef((e,t)=>{var a;const{container:n,...o}=e,[r,s]=i.useState(!1);Y(()=>s(!0),[]);const c=n||r&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return c?mt.createPortal(f.jsx(Ae.div,{...o,ref:t}),c):null});ou.displayName=gw;function ww(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var ru=e=>{const{present:t,children:n}=e,o=bw(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=L(o.ref,yw(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};ru.displayName="Presence";function bw(e){const[t,n]=i.useState(),o=i.useRef({}),r=i.useRef(e),s=i.useRef("none"),c=e?"mounted":"unmounted",[a,u]=ww(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const l=yn(o.current);s.current=a==="mounted"?l:"none"},[a]),Y(()=>{const l=o.current,d=r.current;if(d!==e){const m=s.current,v=yn(l);e?u("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),Y(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,p=v=>{const h=yn(o.current).includes(v.animationName);if(v.target===t&&h&&(u("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(s.current=yn(o.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:i.useCallback(l=>{l&&(o.current=getComputedStyle(l)),n(l)},[])}}function yn(e){return(e==null?void 0:e.animationName)||"none"}function yw(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Cw="VisuallyHidden",dr=i.forwardRef((e,t)=>f.jsx(Ae.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));dr.displayName=Cw;var fr="ToastProvider",[pr,xw,Ew]=aw("Toast"),[su,py]=ce("Toast",[Ew]),[kw,Cn]=su(fr),iu=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:r="right",swipeThreshold:s=50,children:c}=e,[a,u]=i.useState(null),[l,d]=i.useState(0),p=i.useRef(!1),m=i.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${fr}\`. Expected non-empty \`string\`.`),f.jsx(pr.Provider,{scope:t,children:f.jsx(kw,{scope:t,label:n,duration:o,swipeDirection:r,swipeThreshold:s,toastCount:l,viewport:a,onViewportChange:u,onToastAdd:i.useCallback(()=>d(v=>v+1),[]),onToastRemove:i.useCallback(()=>d(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:m,children:c})})};iu.displayName=fr;var au="ToastViewport",Sw=["F8"],hr="toast.viewportPause",mr="toast.viewportResume",cu=i.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:o=Sw,label:r="Notifications ({hotkey})",...s}=e,c=Cn(au,n),a=xw(n),u=i.useRef(null),l=i.useRef(null),d=i.useRef(null),p=i.useRef(null),m=L(t,p,c.onViewportChange),v=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=c.toastCount>0;i.useEffect(()=>{const g=b=>{var C;o.length!==0&&o.every(x=>b[x]||b.code===x)&&((C=p.current)==null||C.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[o]),i.useEffect(()=>{const g=u.current,b=p.current;if(w&&g&&b){const y=()=>{if(!c.isClosePausedRef.current){const S=new CustomEvent(hr);b.dispatchEvent(S),c.isClosePausedRef.current=!0}},C=()=>{if(c.isClosePausedRef.current){const S=new CustomEvent(mr);b.dispatchEvent(S),c.isClosePausedRef.current=!1}},x=S=>{!g.contains(S.relatedTarget)&&C()},k=()=>{g.contains(document.activeElement)||C()};return g.addEventListener("focusin",y),g.addEventListener("focusout",x),g.addEventListener("pointermove",y),g.addEventListener("pointerleave",k),window.addEventListener("blur",y),window.addEventListener("focus",C),()=>{g.removeEventListener("focusin",y),g.removeEventListener("focusout",x),g.removeEventListener("pointermove",y),g.removeEventListener("pointerleave",k),window.removeEventListener("blur",y),window.removeEventListener("focus",C)}}},[w,c.isClosePausedRef]);const h=i.useCallback(({tabbingDirection:g})=>{const y=a().map(C=>{const x=C.ref.current,k=[x,...Fw(x)];return g==="forwards"?k:k.reverse()});return(g==="forwards"?y.reverse():y).flat()},[a]);return i.useEffect(()=>{const g=p.current;if(g){const b=y=>{var k,S,E;const C=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!C){const P=document.activeElement,N=y.shiftKey;if(y.target===g&&N){(k=l.current)==null||k.focus();return}const D=h({tabbingDirection:N?"backwards":"forwards"}),W=D.findIndex(A=>A===P);wr(D.slice(W+1))?y.preventDefault():N?(S=l.current)==null||S.focus():(E=d.current)==null||E.focus()}};return g.addEventListener("keydown",b),()=>g.removeEventListener("keydown",b)}},[a,h]),f.jsxs(vw,{ref:u,role:"region","aria-label":r.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&f.jsx(vr,{ref:l,onFocusFromOutsideViewport:()=>{const g=h({tabbingDirection:"forwards"});wr(g)}}),f.jsx(pr.Slot,{scope:n,children:f.jsx(Ae.ol,{tabIndex:-1,...s,ref:m})}),w&&f.jsx(vr,{ref:d,onFocusFromOutsideViewport:()=>{const g=h({tabbingDirection:"backwards"});wr(g)}})]})});cu.displayName=au;var lu="ToastFocusProxy",vr=i.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:o,...r}=e,s=Cn(lu,n);return f.jsx(dr,{"aria-hidden":!0,tabIndex:0,...r,ref:t,style:{position:"fixed"},onFocus:c=>{var l;const a=c.relatedTarget;!((l=s.viewport)!=null&&l.contains(a))&&o()}})});vr.displayName=lu;var xn="Toast",Pw="toast.swipeStart",Tw="toast.swipeMove",Nw="toast.swipeCancel",Aw="toast.swipeEnd",uu=i.forwardRef((e,t)=>{const{forceMount:n,open:o,defaultOpen:r,onOpenChange:s,...c}=e,[a=!0,u]=Oe({prop:o,defaultProp:r,onChange:s});return f.jsx(ru,{present:n||a,children:f.jsx(Ow,{open:a,...c,ref:t,onClose:()=>u(!1),onPause:V(e.onPause),onResume:V(e.onResume),onSwipeStart:T(e.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:T(e.onSwipeMove,l=>{const{x:d,y:p}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${p}px`)}),onSwipeCancel:T(e.onSwipeCancel,l=>{l.currentTarget.setAttribute("data-swipe","cancel"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:T(e.onSwipeEnd,l=>{const{x:d,y:p}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","end"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${p}px`),u(!1)})})})});uu.displayName=xn;var[jw,Mw]=su(xn,{onClose(){}}),Ow=i.forwardRef((e,t)=>{const{__scopeToast:n,type:o="foreground",duration:r,open:s,onClose:c,onEscapeKeyDown:a,onPause:u,onResume:l,onSwipeStart:d,onSwipeMove:p,onSwipeCancel:m,onSwipeEnd:v,...w}=e,h=Cn(xn,n),[g,b]=i.useState(null),y=L(t,A=>b(A)),C=i.useRef(null),x=i.useRef(null),k=r||h.duration,S=i.useRef(0),E=i.useRef(k),P=i.useRef(0),{onToastAdd:N,onToastRemove:M}=h,$=V(()=>{var U;(g==null?void 0:g.contains(document.activeElement))&&((U=h.viewport)==null||U.focus()),c()}),D=i.useCallback(A=>{!A||A===1/0||(window.clearTimeout(P.current),S.current=new Date().getTime(),P.current=window.setTimeout($,A))},[$]);i.useEffect(()=>{const A=h.viewport;if(A){const U=()=>{D(E.current),l==null||l()},_=()=>{const B=new Date().getTime()-S.current;E.current=E.current-B,window.clearTimeout(P.current),u==null||u()};return A.addEventListener(hr,_),A.addEventListener(mr,U),()=>{A.removeEventListener(hr,_),A.removeEventListener(mr,U)}}},[h.viewport,k,u,l,D]),i.useEffect(()=>{s&&!h.isClosePausedRef.current&&D(k)},[s,k,h.isClosePausedRef,D]),i.useEffect(()=>(N(),()=>M()),[N,M]);const W=i.useMemo(()=>g?vu(g):null,[g]);return h.viewport?f.jsxs(f.Fragment,{children:[W&&f.jsx(Iw,{__scopeToast:n,role:"status","aria-live":o==="foreground"?"assertive":"polite","aria-atomic":!0,children:W}),f.jsx(jw,{scope:n,onClose:$,children:je.createPortal(f.jsx(pr.ItemSlot,{scope:n,children:f.jsx(mw,{asChild:!0,onEscapeKeyDown:T(a,()=>{h.isFocusedToastEscapeKeyDownRef.current||$(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:f.jsx(Ae.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":h.swipeDirection,...w,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:T(e.onKeyDown,A=>{A.key==="Escape"&&(a==null||a(A.nativeEvent),A.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,$()))}),onPointerDown:T(e.onPointerDown,A=>{A.button===0&&(C.current={x:A.clientX,y:A.clientY})}),onPointerMove:T(e.onPointerMove,A=>{if(!C.current)return;const U=A.clientX-C.current.x,_=A.clientY-C.current.y,B=!!x.current,I=["left","right"].includes(h.swipeDirection),j=["left","up"].includes(h.swipeDirection)?Math.min:Math.max,K=I?j(0,U):0,z=I?0:j(0,_),oe=A.pointerType==="touch"?10:2,ie={x:K,y:z},se={originalEvent:A,delta:ie};B?(x.current=ie,En(Tw,p,se,{discrete:!1})):gu(ie,h.swipeDirection,oe)?(x.current=ie,En(Pw,d,se,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(U)>oe||Math.abs(_)>oe)&&(C.current=null)}),onPointerUp:T(e.onPointerUp,A=>{const U=x.current,_=A.target;if(_.hasPointerCapture(A.pointerId)&&_.releasePointerCapture(A.pointerId),x.current=null,C.current=null,U){const B=A.currentTarget,I={originalEvent:A,delta:U};gu(U,h.swipeDirection,h.swipeThreshold)?En(Aw,v,I,{discrete:!0}):En(Nw,m,I,{discrete:!0}),B.addEventListener("click",j=>j.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),Iw=e=>{const{__scopeToast:t,children:n,...o}=e,r=Cn(xn,t),[s,c]=i.useState(!1),[a,u]=i.useState(!1);return Rw(()=>c(!0)),i.useEffect(()=>{const l=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(l)},[]),a?null:f.jsx(ou,{asChild:!0,children:f.jsx(dr,{...o,children:s&&f.jsxs(f.Fragment,{children:[r.label," ",n]})})})},Dw="ToastTitle",_w=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return f.jsx(Ae.div,{...o,ref:t})});_w.displayName=Dw;var Lw="ToastDescription",du=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return f.jsx(Ae.div,{...o,ref:t})});du.displayName=Lw;var fu="ToastAction",pu=i.forwardRef((e,t)=>{const{altText:n,...o}=e;return n.trim()?f.jsx(mu,{altText:n,asChild:!0,children:f.jsx(gr,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${fu}\`. Expected non-empty \`string\`.`),null)});pu.displayName=fu;var hu="ToastClose",gr=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e,r=Mw(hu,n);return f.jsx(mu,{asChild:!0,children:f.jsx(Ae.button,{type:"button",...o,ref:t,onClick:T(e.onClick,r.onClose)})})});gr.displayName=hu;var mu=i.forwardRef((e,t)=>{const{__scopeToast:n,altText:o,...r}=e;return f.jsx(Ae.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...r,ref:t})});function vu(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),$w(o)){const r=o.ariaHidden||o.hidden||o.style.display==="none",s=o.dataset.radixToastAnnounceExclude==="";if(!r)if(s){const c=o.dataset.radixToastAnnounceAlt;c&&t.push(c)}else t.push(...vu(o))}}),t}function En(e,t,n,{discrete:o}){const r=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Zl(r,s):r.dispatchEvent(s)}var gu=(e,t,n=0)=>{const o=Math.abs(e.x),r=Math.abs(e.y),s=o>r;return t==="left"||t==="right"?s&&o>n:!s&&r>n};function Rw(e=()=>{}){const t=V(e);Y(()=>{let n=0,o=0;return n=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(o)}},[t])}function $w(e){return e.nodeType===e.ELEMENT_NODE}function Fw(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function wr(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Ww=iu,wu=cu,bu=uu,yu=du,Cu=pu,xu=gr;const Bw=1,Uw=1e6;let br=0;function zw(){return br=(br+1)%Number.MAX_SAFE_INTEGER,br.toString()}const yr=new Map,Eu=e=>{if(yr.has(e))return;const t=setTimeout(()=>{yr.delete(e),Dt({type:"REMOVE_TOAST",toastId:e})},Uw);yr.set(e,t)},Hw=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Bw)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Eu(n):e.toasts.forEach(o=>{Eu(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===n||n===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},kn=[];let Sn={toasts:[]};function Dt(e){Sn=Hw(Sn,e),kn.forEach(t=>{t(Sn)})}function Vw({...e}){const t=zw(),n=r=>Dt({type:"UPDATE_TOAST",toast:{...r,id:t}}),o=()=>Dt({type:"DISMISS_TOAST",toastId:t});return Dt({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:r=>{r||o()}}}),{id:t,dismiss:o,update:n}}function ku(){const[e,t]=i.useState(Sn);return i.useEffect(()=>(kn.push(t),()=>{const n=kn.indexOf(t);n>-1&&kn.splice(n,1)}),[e]),{...e,toast:Vw,dismiss:n=>Dt({type:"DISMISS_TOAST",toastId:n})}}let Cr={toast:{dismissButtonLabel:"missing ksjsui string"}};const Su=i.createContext(Cr);function Kw({children:e}){const t=i.useRef(Cr);return f.jsx(Su.Provider,{value:t.current,children:e})}function Gw(){const e=i.useContext(Su);if(!e)throw new Error("useStrings must be used inside <StringsProvider />");return e}function Yw(e){Cr=e}const Xw=Ww,Pu=i.forwardRef(({className:e,...t},n)=>f.jsx(wu,{ref:n,className:R(["dark-mode","ksjsui-fixed ksjsui-bottom-0 ksjsui-end-0 ksjsui-z-[100] ksjsui-flex ksjsui-max-h-screen ksjsui-w-full ksjsui-flex-col ksjsui-p-4","focus:ksjsui-outline-none","xs:ksjsui-max-w-[calc(theme(spacing.80)_+_theme(spacing.8))]"],e),...t}));Pu.displayName=wu.displayName;const Zw=Ze(["ksjsui-group ksjsui-pointer-events-auto ksjsui-relative ksjsui-flex ksjsui-w-full ksjsui-items-center ksjsui-justify-between ksjsui-overflow-hidden ksjsui-rounded-lg ksjsui-border ksjsui-border-transparent ksjsui-bg-toast ksjsui-p-3 ksjsui-text-toast-foreground ksjsui-shadow-lg ksjsui-outline-ring ksjsui-transition-all","focus-visible:ksjsui-outline focus-visible:ksjsui-outline-2","data-[swipe=cancel]:ksjsui-translate-x-0","data-[swipe=end]:ksjsui-translate-x-[var(--radix-toast-swipe-end-x)]","data-[swipe=move]:ksjsui-translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:ksjsui-transition-none","data-[state=open]:ksjsui-animate-in data-[state=open]:ksjsui-slide-in-from-bottom-full","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-80","data-[state=closed]:ksjsui-slide-out-to-bottom-full","[.light-mode_&]:focus:ksjsui-outline-light-mode-focus-fix"]),Tu=i.forwardRef(({className:e,...t},n)=>f.jsx(bu,{ref:n,className:R(Zw(),e),...t}));Tu.displayName=bu.displayName;const qw=i.forwardRef(({className:e,...t},n)=>f.jsx(Cu,{ref:n,className:R(["ksjsui-inline-flex ksjsui-h-8 ksjsui-shrink-0 ksjsui-items-center ksjsui-justify-center ksjsui-rounded-lg ksjsui-border ksjsui-bg-transparent ksjsui-px-3 ksjsui-text-sm ksjsui-font-medium ksjsui-ring-offset-background ksjsui-transition-colors","focus:ksjsui-outline-none focus:ksjsui-ring-2 focus:ksjsui-ring-ring focus:ksjsui-ring-offset-2","disabled:ksjsui-pointer-events-none disabled:ksjsui-opacity-50"],e),...t}));qw.displayName=Cu.displayName;const Nu=i.forwardRef(({className:e,...t},n)=>f.jsx(xu,{ref:n,className:R(["ksjsui-text-current/50 ksjsui-self-start ksjsui-rounded-sm ksjsui-opacity-0 ksjsui-outline-ring ksjsui-transition-opacity","focus-visible:ksjsui-opacity-100 focus-visible:ksjsui-outline focus-visible:ksjsui-outline-2","group-hover:ksjsui-opacity-100","group-focus-visible:ksjsui-opacity-100","[.light-mode_&]:focus:ksjsui-outline-light-mode-focus-fix"],e),"toast-close":"",...t,children:f.jsx(oo,{})}));Nu.displayName=xu.displayName;const Au=i.forwardRef(({className:e,...t},n)=>f.jsx(yu,{ref:n,className:R("ksjsui-text-[15px]",e),...t}));Au.displayName=yu.displayName;const Qw=()=>{const{toasts:e}=ku(),{toast:t}=Gw();return f.jsxs(Xw,{children:[e.map(function({id:n,className:o,title:r,description:s,action:c,icon:a,dismissButtonLabel:u,...l}){return f.jsxs(Tu,{...l,className:R("ksjsui-flex ksjsui-items-start ksjsui-gap-x-4",o),children:[a&&f.jsx("div",{className:"ksjsui-shrink-0",children:a}),f.jsx("div",{className:"ksjsui-grid ksjsui-grow ksjsui-gap-1",children:s&&f.jsx(Au,{children:s})}),c,f.jsx(Nu,{"aria-label":u||t.dismissButtonLabel})]},n)}),f.jsx(Pu,{})]})};var Jw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],tt=Jw.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...c}=o,a=s?ne:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(a,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function eb(e,t){e&&je.flushSync(()=>e.dispatchEvent(t))}var tb="DismissableLayer",xr="dismissableLayer.update",nb="dismissableLayer.pointerDownOutside",ob="dismissableLayer.focusOutside",ju,Mu=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ou=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:c,onDismiss:a,...u}=e,l=i.useContext(Mu),[d,p]=i.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=i.useState({}),w=L(t,E=>p(E)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(g),y=d?h.indexOf(d):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,x=y>=b,k=ib(E=>{const P=E.target,N=[...l.branches].some(M=>M.contains(P));!x||N||(r==null||r(E),c==null||c(E),E.defaultPrevented||a==null||a())},m),S=ab(E=>{const P=E.target;[...l.branches].some(M=>M.contains(P))||(s==null||s(E),c==null||c(E),E.defaultPrevented||a==null||a())},m);return bt(E=>{y===l.layers.size-1&&(o==null||o(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},m),i.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(ju=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),Iu(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=ju)}},[d,m,n,l]),i.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),Iu())},[d,l]),i.useEffect(()=>{const E=()=>v({});return document.addEventListener(xr,E),()=>document.removeEventListener(xr,E)},[]),f.jsx(tt.div,{...u,ref:w,style:{pointerEvents:C?x?"auto":"none":void 0,...e.style},onFocusCapture:T(e.onFocusCapture,S.onFocusCapture),onBlurCapture:T(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:T(e.onPointerDownCapture,k.onPointerDownCapture)})});Ou.displayName=tb;var rb="DismissableLayerBranch",sb=i.forwardRef((e,t)=>{const n=i.useContext(Mu),o=i.useRef(null),r=L(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),f.jsx(tt.div,{...e,ref:r})});sb.displayName=rb;function ib(e,t=globalThis==null?void 0:globalThis.document){const n=V(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!o.current){let u=function(){Du(nb,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}else t.removeEventListener("click",r.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function ab(e,t=globalThis==null?void 0:globalThis.document){const n=V(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&Du(ob,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Iu(){const e=new CustomEvent(xr);document.dispatchEvent(e)}function Du(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?eb(r,s):r.dispatchEvent(s)}var cb="Arrow",_u=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return f.jsx(tt.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});_u.displayName=cb;var lb=_u,Er="Popper",[Lu,Ru]=ce(Er),[ub,$u]=Lu(Er),Fu=e=>{const{__scopePopper:t,children:n}=e,[o,r]=i.useState(null);return f.jsx(ub,{scope:t,anchor:o,onAnchorChange:r,children:n})};Fu.displayName=Er;var Wu="PopperAnchor",Bu=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=$u(Wu,n),c=i.useRef(null),a=L(t,c);return i.useEffect(()=>{s.onAnchorChange((o==null?void 0:o.current)||c.current)}),o?null:f.jsx(tt.div,{...r,ref:a})});Bu.displayName=Wu;var kr="PopperContent",[db,fb]=Lu(kr),Uu=i.forwardRef((e,t)=>{var F,X,Q,G,Z,q;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:c=0,arrowPadding:a=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:w,...h}=e,g=$u(kr,n),[b,y]=i.useState(null),C=L(t,te=>y(te)),[x,k]=i.useState(null),S=rn(x),E=(S==null?void 0:S.width)??0,P=(S==null?void 0:S.height)??0,N=o+(s!=="center"?"-"+s:""),M=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},$=Array.isArray(l)?l:[l],D=$.length>0,W={padding:M,boundary:$.filter(hb),altBoundary:D},{refs:A,floatingStyles:U,placement:_,isPositioned:B,middlewareData:I}=xo({strategy:"fixed",placement:N,whileElementsMounted:(...te)=>yo(...te,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[Eo({mainAxis:r+P,alignmentAxis:c}),u&&ko({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?So():void 0,...W}),u&&Po({...W}),To({...W,apply:({elements:te,rects:ue,availableWidth:Le,availableHeight:Re})=>{const{width:$e,height:_t}=ue.reference,fe=te.floating.style;fe.setProperty("--radix-popper-available-width",`${Le}px`),fe.setProperty("--radix-popper-available-height",`${Re}px`),fe.setProperty("--radix-popper-anchor-width",`${$e}px`),fe.setProperty("--radix-popper-anchor-height",`${_t}px`)}}),x&&Ao({element:x,padding:a}),mb({arrowWidth:E,arrowHeight:P}),m&&No({strategy:"referenceHidden",...W})]}),[j,K]=Vu(_),z=V(w);Y(()=>{B&&(z==null||z())},[B,z]);const oe=(F=I.arrow)==null?void 0:F.x,ie=(X=I.arrow)==null?void 0:X.y,se=((Q=I.arrow)==null?void 0:Q.centerOffset)!==0,[me,ae]=i.useState();return Y(()=>{b&&ae(window.getComputedStyle(b).zIndex)},[b]),f.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:B?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[(G=I.transformOrigin)==null?void 0:G.x,(Z=I.transformOrigin)==null?void 0:Z.y].join(" "),...((q=I.hide)==null?void 0:q.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(db,{scope:n,placedSide:j,onArrowChange:k,arrowX:oe,arrowY:ie,shouldHideArrow:se,children:f.jsx(tt.div,{"data-side":j,"data-align":K,...h,ref:C,style:{...h.style,animation:B?void 0:"none"}})})})});Uu.displayName=kr;var zu="PopperArrow",pb={top:"bottom",right:"left",bottom:"top",left:"right"},Hu=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=fb(zu,o),c=pb[s.placedSide];return f.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:f.jsx(lb,{...r,ref:n,style:{...r.style,display:"block"}})})});Hu.displayName=zu;function hb(e){return e!==null}var mb=e=>({name:"transformOrigin",options:e,fn(t){var g,b,y;const{placement:n,rects:o,middlewareData:r}=t,c=((g=r.arrow)==null?void 0:g.centerOffset)!==0,a=c?0:e.arrowWidth,u=c?0:e.arrowHeight,[l,d]=Vu(n),p={start:"0%",center:"50%",end:"100%"}[d],m=(((b=r.arrow)==null?void 0:b.x)??0)+a/2,v=(((y=r.arrow)==null?void 0:y.y)??0)+u/2;let w="",h="";return l==="bottom"?(w=c?p:`${m}px`,h=`${-u}px`):l==="top"?(w=c?p:`${m}px`,h=`${o.floating.height+u}px`):l==="right"?(w=`${-u}px`,h=c?p:`${v}px`):l==="left"&&(w=`${o.floating.width+u}px`,h=c?p:`${v}px`),{data:{x:w,y:h}}}});function Vu(e){const[t,n="center"]=e.split("-");return[t,n]}var vb=Fu,gb=Bu,wb=Uu,bb=Hu;function yb(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var Ku=e=>{const{present:t,children:n}=e,o=Cb(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=L(o.ref,xb(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};Ku.displayName="Presence";function Cb(e){const[t,n]=i.useState(),o=i.useRef({}),r=i.useRef(e),s=i.useRef("none"),c=e?"mounted":"unmounted",[a,u]=yb(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const l=Pn(o.current);s.current=a==="mounted"?l:"none"},[a]),Y(()=>{const l=o.current,d=r.current;if(d!==e){const m=s.current,v=Pn(l);e?u("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),Y(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,p=v=>{const h=Pn(o.current).includes(v.animationName);if(v.target===t&&h&&(u("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(s.current=Pn(o.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:i.useCallback(l=>{l&&(o.current=getComputedStyle(l)),n(l)},[])}}function Pn(e){return(e==null?void 0:e.animationName)||"none"}function xb(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Eb="VisuallyHidden",Gu=i.forwardRef((e,t)=>f.jsx(tt.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Gu.displayName=Eb;var kb=Gu,[Tn,my]=ce("Tooltip",[Ru]),Nn=Ru(),Yu="TooltipProvider",Sb=700,Sr="tooltip.open",[Pb,Pr]=Tn(Yu),Xu=e=>{const{__scopeTooltip:t,delayDuration:n=Sb,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:s}=e,[c,a]=i.useState(!0),u=i.useRef(!1),l=i.useRef(0);return i.useEffect(()=>{const d=l.current;return()=>window.clearTimeout(d)},[]),f.jsx(Pb,{scope:t,isOpenDelayed:c,delayDuration:n,onOpen:i.useCallback(()=>{window.clearTimeout(l.current),a(!1)},[]),onClose:i.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a(!0),o)},[o]),isPointerInTransitRef:u,onPointerInTransitChange:i.useCallback(d=>{u.current=d},[]),disableHoverableContent:r,children:s})};Xu.displayName=Yu;var An="Tooltip",[Tb,jn]=Tn(An),Zu=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r=!1,onOpenChange:s,disableHoverableContent:c,delayDuration:a}=e,u=Pr(An,e.__scopeTooltip),l=Nn(t),[d,p]=i.useState(null),m=ve(),v=i.useRef(0),w=c??u.disableHoverableContent,h=a??u.delayDuration,g=i.useRef(!1),[b=!1,y]=Oe({prop:o,defaultProp:r,onChange:E=>{E?(u.onOpen(),document.dispatchEvent(new CustomEvent(Sr))):u.onClose(),s==null||s(E)}}),C=i.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),x=i.useCallback(()=>{window.clearTimeout(v.current),v.current=0,g.current=!1,y(!0)},[y]),k=i.useCallback(()=>{window.clearTimeout(v.current),v.current=0,y(!1)},[y]),S=i.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{g.current=!0,y(!0),v.current=0},h)},[h,y]);return i.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),f.jsx(vb,{...l,children:f.jsx(Tb,{scope:t,contentId:m,open:b,stateAttribute:C,trigger:d,onTriggerChange:p,onTriggerEnter:i.useCallback(()=>{u.isOpenDelayed?S():x()},[u.isOpenDelayed,S,x]),onTriggerLeave:i.useCallback(()=>{w?k():(window.clearTimeout(v.current),v.current=0)},[k,w]),onOpen:x,onClose:k,disableHoverableContent:w,children:n})})};Zu.displayName=An;var Tr="TooltipTrigger",qu=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=jn(Tr,n),s=Pr(Tr,n),c=Nn(n),a=i.useRef(null),u=L(t,a,r.onTriggerChange),l=i.useRef(!1),d=i.useRef(!1),p=i.useCallback(()=>l.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),f.jsx(gb,{asChild:!0,...c,children:f.jsx(tt.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:u,onPointerMove:T(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),d.current=!0)}),onPointerLeave:T(e.onPointerLeave,()=>{r.onTriggerLeave(),d.current=!1}),onPointerDown:T(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:T(e.onFocus,()=>{l.current||r.onOpen()}),onBlur:T(e.onBlur,r.onClose),onClick:T(e.onClick,r.onClose)})})});qu.displayName=Tr;var Nb="TooltipPortal",[vy,Ab]=Tn(Nb,{forceMount:void 0}),ht="TooltipContent",Qu=i.forwardRef((e,t)=>{const n=Ab(ht,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...s}=e,c=jn(ht,e.__scopeTooltip);return f.jsx(Ku,{present:o||c.open,children:c.disableHoverableContent?f.jsx(Ju,{side:r,...s,ref:t}):f.jsx(jb,{side:r,...s,ref:t})})}),jb=i.forwardRef((e,t)=>{const n=jn(ht,e.__scopeTooltip),o=Pr(ht,e.__scopeTooltip),r=i.useRef(null),s=L(t,r),[c,a]=i.useState(null),{trigger:u,onClose:l}=n,d=r.current,{onPointerInTransitChange:p}=o,m=i.useCallback(()=>{a(null),p(!1)},[p]),v=i.useCallback((w,h)=>{const g=w.currentTarget,b={x:w.clientX,y:w.clientY},y=Ib(b,g.getBoundingClientRect()),C=Db(b,y),x=_b(h.getBoundingClientRect()),k=Rb([...C,...x]);a(k),p(!0)},[p]);return i.useEffect(()=>()=>m(),[m]),i.useEffect(()=>{if(u&&d){const w=g=>v(g,d),h=g=>v(g,u);return u.addEventListener("pointerleave",w),d.addEventListener("pointerleave",h),()=>{u.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",h)}}},[u,d,v,m]),i.useEffect(()=>{if(c){const w=h=>{const g=h.target,b={x:h.clientX,y:h.clientY},y=(u==null?void 0:u.contains(g))||(d==null?void 0:d.contains(g)),C=!Lb(b,c);y?m():C&&(m(),l())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[u,d,c,l,m]),f.jsx(Ju,{...e,ref:s})}),[Mb,Ob]=Tn(An,{isInside:!1}),Ju=i.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:c,...a}=e,u=jn(ht,n),l=Nn(n),{onClose:d}=u;return i.useEffect(()=>(document.addEventListener(Sr,d),()=>document.removeEventListener(Sr,d)),[d]),i.useEffect(()=>{if(u.trigger){const p=m=>{const v=m.target;v!=null&&v.contains(u.trigger)&&d()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,d]),f.jsx(Ou,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:p=>p.preventDefault(),onDismiss:d,children:f.jsxs(wb,{"data-state":u.stateAttribute,...l,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[f.jsx(On,{children:o}),f.jsx(Mb,{scope:n,isInside:!0,children:f.jsx(kb,{id:u.contentId,role:"tooltip",children:r||o})})]})})});Qu.displayName=ht;var ed="TooltipArrow",td=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Nn(n);return Ob(ed,n).isInside?null:f.jsx(bb,{...r,...o,ref:t})});td.displayName=ed;function Ib(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,o,r,s)){case s:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Db(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function _b(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function Lb(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const a=t[s].x,u=t[s].y,l=t[c].x,d=t[c].y;u>o!=d>o&&n<(l-a)*(o-u)/(d-u)+a&&(r=!r)}return r}function Rb(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),$b(t)}function $b(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const s=t[t.length-1],c=t[t.length-2];if((s.x-c.x)*(r.y-c.y)>=(s.y-c.y)*(r.x-c.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const s=n[n.length-1],c=n[n.length-2];if((s.x-c.x)*(r.y-c.y)>=(s.y-c.y)*(r.x-c.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Fb=Xu,Wb=Zu,Bb=qu,nd=Qu,Ub=td;const zb=({disableHoverableContent:e=!0,...t})=>f.jsx(Fb,{disableHoverableContent:e,...t}),Hb=Wb,Vb=Bb,od=i.forwardRef(({children:e,className:t,collisionPadding:n={left:12,right:12},side:o="bottom",sideOffset:r=4,...s},c)=>f.jsxs(nd,{ref:c,sideOffset:r,side:o,collisionPadding:n,className:R(["ksjsui-z-50 ksjsui-max-w-[var(--radix-popper-available-width)] ksjsui-rounded ksjsui-bg-popover-foreground ksjsui-px-3 ksjsui-py-2 ksjsui-text-[15px] ksjsui-text-popover ksjsui-shadow-md ksjsui-animate-in ksjsui-fade-in-0 ksjsui-zoom-in-95","sm:ksjsui-max-w-prose","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-0 data-[state=closed]:ksjsui-zoom-out-95","data-[side=top]:ksjsui-slide-in-from-bottom-2","data-[side=right]:ksjsui-slide-in-from-left-2","data-[side=left]:ksjsui-slide-in-from-right-2","data-[side=bottom]:ksjsui-slide-in-from-top-2","forced-colors:ksjsui-border forced-colors:ksjsui-border-canvas-text"],t),...s,children:[e,f.jsx(Ub,{className:R(["ksjsui-fill-popover-foreground ksjsui-shadow-md","forced-colors:ksjsui-fill-canvas-text"])})]}));od.displayName=nd.displayName;const Nr=["px",0,.5,1,1.5,2,2.5,3,3.5,4,5,6,7,8,9,10,11,12,14,16,20,24,28,32,36,40,44,48,52,56,60,64,72,80,96],Kb=[...Nr,"auto"];function Gb(){return Nr.reduce((e,t)=>(e.gap[t]=`ksjsui-gap-${t}`,e.gapColumn[t]=`ksjsui-gap-x-${t}`,e.gapRow[t]=`ksjsui-gap-y-${t}`,e),{gap:{},gapColumn:{},gapRow:{}})}function rd(){return Kb.reduce((e,t)=>(e.m[t]=`ksjsui-m-${t}`,e.mb[t]=`ksjsui-mb-${t}`,e.me[t]=`ksjsui-me-${t}`,e.ms[t]=`ksjsui-ms-${t}`,e.mt[t]=`ksjsui-mt-${t}`,e.mx[t]=`ksjsui-mx-${t}`,e.my[t]=`ksjsui-my-${t}`,e),{m:{},mb:{},me:{},ms:{},mt:{},mx:{},my:{}})}function sd(){return Nr.reduce((e,t)=>(e.p[t]=`ksjsui-p-${t}`,e.pb[t]=`ksjsui-pb-${t}`,e.pe[t]=`ksjsui-pe-${t}`,e.ps[t]=`ksjsui-ps-${t}`,e.pt[t]=`ksjsui-pt-${t}`,e.px[t]=`ksjsui-px-${t}`,e.py[t]=`ksjsui-py-${t}`,e),{p:{},pb:{},pe:{},ps:{},pt:{},px:{},py:{}})}const Yb=Ze("",{variants:{display:{block:"ksjsui-block","inline-block":"ksjsui-inline-block",none:"ksjsui-hidden"},...rd(),...sd()},defaultVariants:{display:"block"}}),id=i.forwardRef(({as:e="div",asChild:t,className:n,display:o,m:r,mb:s,me:c,ms:a,mt:u,mx:l,my:d,p,pb:m,pe:v,ps:w,pt:h,px:g,py:b,...y},C)=>{const x=t?ne:e;return f.jsx(x,{className:R(Yb({display:o,m:r,mb:s,me:c,ms:a,mt:u,mx:l,my:d,p,pb:m,pe:v,ps:w,pt:h,px:g,py:b,className:n})),ref:C,...y})});id.displayName="Box";const Xb={align:{baseline:"ksjsui-items-baseline",center:"ksjsui-items-center",end:"ksjsui-items-end",start:"ksjsui-items-start",stretch:"ksjsui-items-stretch"},direction:{"column-reverse":"ksjsui-flex-col-reverse","row-reverse":"ksjsui-flex-row-reverse",column:"ksjsui-flex-col",row:"ksjsui-flex-row"},display:{"inline-flex":"ksjsui-inline-flex",flex:"ksjsui-flex",none:"ksjsui-hidden"},...Gb(),grow:{0:"ksjsui-grow-0",1:"ksjsui-grow"},justify:{around:"ksjsui-justify-around",baseline:"ksjsui-justify-baseline",between:"ksjsui-justify-between",center:"ksjsui-justify-center",end:"ksjsui-justify-end",evenly:"ksjsui-justify-evenly",normal:"ksjsui-justify-normal",start:"ksjsui-justify-start",stretch:"ksjsui-justify-stretch"},...rd(),...sd(),self:{auto:"ksjsui-self-auto",baseline:"ksjsui-self-baseline",center:"ksjsui-self-center",end:"ksjsui-self-end",start:"ksjsui-self-start",stretch:"ksjsui-self-stretch"},shrink:{0:"ksjsui-shrink-0",1:"ksjsui-shrink"},wrap:{nowrap:"ksjsui-flex-nowrap",reverse:"ksjsui-flex-wrap-reverse",wrap:"ksjsui-flex-wrap"}},Zb=Ze("ksjsui-inline-flex",{variants:{...Xb},defaultVariants:{display:"flex",justify:"start"}}),ad=i.forwardRef(({align:e,as:t="div",asChild:n,className:o,display:r,direction:s,gap:c,gapColumn:a,gapRow:u,grow:l,justify:d,m:p,mb:m,me:v,ms:w,mt:h,mx:g,my:b,p:y,pb:C,pe:x,ps:k,pt:S,px:E,py:P,self:N,shrink:M,wrap:$,...D},W)=>{const A=n?ne:t;return f.jsx(A,{className:R(Zb({align:e,direction:s,display:r,gap:c,gapColumn:a,gapRow:u,grow:l,justify:d,m:p,mb:m,me:v,ms:w,mt:h,mx:g,my:b,p:y,pb:C,pe:x,ps:k,pt:S,px:E,py:P,self:N,shrink:M,wrap:$,className:o})),ref:W,...D})});ad.displayName="Flex",O.AcceptIcon=Tp,O.AccessibilityIcon=Sp,O.ArrowDownIcon=Zs,O.Avatar=es,O.AvatarFallback=ns,O.AvatarImage=ts,O.Box=id,O.Button=$n,O.CheckIcon=eo,O.ChevronLeftIcon=to,O.ChevronRightIcon=no,O.CloseIcon=oo,O.Dialog=jp,O.DialogClose=Op,O.DialogContent=Js,O.DialogDescription=oi,O.DialogFooter=ti,O.DialogHeader=ei,O.DialogOverlay=ro,O.DialogPortal=Qs,O.DialogTitle=ni,O.DialogTrigger=Mp,O.DirectionProvider=Dp,O.DropdownMenu=wv,O.DropdownMenuCheckboxItem=ic,O.DropdownMenuContent=rc,O.DropdownMenuGroup=tc,O.DropdownMenuItem=sc,O.DropdownMenuLabel=cc,O.DropdownMenuPortal=yv,O.DropdownMenuRadioGroup=xv,O.DropdownMenuRadioItem=ac,O.DropdownMenuSeparator=lc,O.DropdownMenuShortcut=uc,O.DropdownMenuSub=Cv,O.DropdownMenuSubContent=oc,O.DropdownMenuSubTrigger=nc,O.DropdownMenuTrigger=bv,O.Flex=ad,O.IconButton=dc,O.List=fc,O.ListItem=pc,O.ListItemArrow=hc,O.ListItemButton=mc,O.ListItemText=vc,O.ListLabel=gc,O.ListSeparator=wc,O.RadioIcon=Np,O.RadioSelectedIcon=qs,O.ScrollArea=Xo,O.ScrollAreaViewport=Zo,O.ScrollBar=qo,O.Select=Kg,O.SelectContent=Rl,O.SelectItem=$l,O.SelectTrigger=Ll,O.SelectValue=Gg,O.Separator=Ul,O.StringsProvider=Kw,O.Switch=Xl,O.ThreeDotsIcon=Ap,O.Toast=Qw,O.Tooltip=Hb,O.TooltipContent=od,O.TooltipProvider=zb,O.TooltipTrigger=Vb,O.configureStrings=Yw,O.useToast=ku,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});