@keeper-security/keeper-js-ui 0.5.0 → 0.6.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/CHANGELOG.md +7 -0
- package/dist/index.es.js +736 -734
- package/dist/index.umd.js +13 -13
- package/dist/style.css +1 -1
- package/package.json +22 -18
package/dist/index.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(R,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],h):(R=typeof globalThis<"u"?globalThis:R||self,h(R["keeper-js-ui"]={},R["react/jsx-runtime"],R.React,R.ReactDOM))})(this,function(R,h,G,Dt){"use strict";function Fn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=Fn(G),rt=Fn(Dt);function de(e,t=[]){let n=[];function r(s,a){const i=c.createContext(a),u=n.length;n=[...n,a];const l=d=>{var w;const{scope:m,children:v,...b}=d,p=((w=m==null?void 0:m[e])==null?void 0:w[u])||i,g=c.useMemo(()=>b,Object.values(b));return h.jsx(p.Provider,{value:g,children:v})};l.displayName=s+"Provider";function f(d,m){var p;const v=((p=m==null?void 0:m[e])==null?void 0:p[u])||i,b=c.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[l,f]}const o=()=>{const s=n.map(a=>c.createContext(a));return function(i){const u=(i==null?void 0:i[e])||s;return c.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return o.scopeName=e,[r,Fi(o,...t)]}function Fi(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((i,{useScope:u,scopeName:l})=>{const d=u(s)[`__scope${l}`];return{...i,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function H(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var Q=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{};function $n(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ot(...e){return t=>{let n=!1;const r=e.map(o=>{const s=$n(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():$n(e[o],null)}}}}function K(...e){return c.useCallback(ot(...e),e)}var q=c.forwardRef((e,t)=>{const{children:n,...r}=e,o=c.Children.toArray(n),s=o.find($i);if(s){const a=s.props.children,i=o.map(u=>u===s?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:u);return h.jsx(Rt,{...r,ref:t,children:c.isValidElement(a)?c.cloneElement(a,void 0,i):null})}return h.jsx(Rt,{...r,ref:t,children:n})});q.displayName="Slot";var Rt=c.forwardRef((e,t)=>{const{children:n,...r}=e;if(c.isValidElement(n)){const o=Wi(n);return c.cloneElement(n,{...zi(r,n.props),ref:t?ot(t,o):o})}return c.Children.count(n)>1?c.Children.only(null):null});Rt.displayName="SlotClone";var zn=({children:e})=>h.jsx(h.Fragment,{children:e});function $i(e){return c.isValidElement(e)&&e.type===zn}function zi(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{s(...i),o(...i)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Wi(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Bi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Lt=Bi.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?q:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Ft="Avatar",[Vi,Ff]=de(Ft),[Ui,Wn]=Vi(Ft),Bn=c.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,s]=c.useState("idle");return h.jsx(Ui,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:s,children:h.jsx(Lt.span,{...r,ref:t})})});Bn.displayName=Ft;var Vn="AvatarImage",Un=c.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...s}=e,a=Wn(Vn,n),i=Gi(r,s.referrerPolicy),u=H(l=>{o(l),a.onImageLoadingStatusChange(l)});return Q(()=>{i!=="idle"&&u(i)},[i,u]),i==="loaded"?h.jsx(Lt.img,{...s,ref:t,src:r}):null});Un.displayName=Vn;var Gn="AvatarFallback",Kn=c.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,s=Wn(Gn,n),[a,i]=c.useState(r===void 0);return c.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(u)}},[r]),a&&s.imageLoadingStatus!=="loaded"?h.jsx(Lt.span,{...o,ref:t}):null});Kn.displayName=Gn;function Gi(e,t){const[n,r]=c.useState("idle");return Q(()=>{if(!e){r("error");return}let o=!0;const s=new window.Image,a=i=>()=>{o&&r(i)};return r("loading"),s.onload=a("loaded"),s.onerror=a("error"),s.src=e,t&&(s.referrerPolicy=t),()=>{o=!1}},[e,t]),n}var Hn=Bn,Yn=Un,Xn=Kn;function qn(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=qn(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Zn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=qn(e))&&(r&&(r+=" "),r+=t);return r}const Qn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Jn=Zn,Le=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Jn(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(l=>{const f=n==null?void 0:n[l],d=s==null?void 0:s[l];if(f===null)return null;const m=Qn(f)||Qn(d);return o[l][m]}),i=n&&Object.entries(n).reduce((l,f)=>{let[d,m]=f;return m===void 0||(l[d]=m),l},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,f)=>{let{class:d,className:m,...v}=f;return Object.entries(v).every(b=>{let[p,g]=b;return Array.isArray(g)?g.includes({...s,...i}[p]):{...s,...i}[p]===g})?[...l,d,m]:l},[]);return Jn(e,a,u,n==null?void 0:n.class,n==null?void 0:n.className)},$t="-",Ki=e=>{const t=Yi(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const i=a.split($t);return i[0]===""&&i.length!==1&&i.shift(),er(i,t)||Hi(a)},getConflictingClassGroupIds:(a,i)=>{const u=n[a]||[];return i&&r[a]?[...u,...r[a]]:u}}},er=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?er(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join($t);return(a=t.validators.find(({validator:i})=>i(s)))==null?void 0:a.classGroupId},tr=/^\[(.+)\]$/,Hi=e=>{if(tr.test(e)){const t=tr.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Yi=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return qi(Object.entries(e.classGroups),n).forEach(([s,a])=>{zt(a,r,s,t)}),r},zt=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:nr(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Xi(o)){zt(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,a])=>{zt(a,nr(t,s),n,r)})})},nr=(e,t)=>{let n=e;return t.split($t).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Xi=e=>e.isThemeGetter,qi=(e,t)=>t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,i])=>[t+a,i])):s);return[n,o]}):e,Zi=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return o(s,a),a},set(s,a){n.has(s)?n.set(s,a):o(s,a)}}},rr="!",Qi=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,a=i=>{const u=[];let l=0,f=0,d;for(let g=0;g<i.length;g++){let w=i[g];if(l===0){if(w===o&&(r||i.slice(g,g+s)===t)){u.push(i.slice(f,g)),f=g+s;continue}if(w==="/"){d=g;continue}}w==="["?l++:w==="]"&&l--}const m=u.length===0?i:i.substring(f),v=m.startsWith(rr),b=v?m.substring(1):m,p=d&&d>f?d-f:void 0;return{modifiers:u,hasImportantModifier:v,baseClassName:b,maybePostfixModifierPosition:p}};return n?i=>n({className:i,parseClassName:a}):a},Ji=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},ea=e=>({cache:Zi(e.cacheSize),parseClassName:Qi(e),...Ki(e)}),ta=/\s+/,na=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],a=e.trim().split(ta);let i="";for(let u=a.length-1;u>=0;u-=1){const l=a[u],{modifiers:f,hasImportantModifier:d,baseClassName:m,maybePostfixModifierPosition:v}=n(l);let b=!!v,p=r(b?m.substring(0,v):m);if(!p){if(!b){i=l+(i.length>0?" "+i:i);continue}if(p=r(m),!p){i=l+(i.length>0?" "+i:i);continue}b=!1}const g=Ji(f).join(":"),w=d?g+rr:g,y=w+p;if(s.includes(y))continue;s.push(y);const k=o(p,b);for(let x=0;x<k.length;++x){const C=k[x];s.push(w+C)}i=l+(i.length>0?" "+i:i)}return i};function ra(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=or(t))&&(r&&(r+=" "),r+=n);return r}const or=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=or(e[r]))&&(n&&(n+=" "),n+=t);return n};function sr(e,...t){let n,r,o,s=a;function a(u){const l=t.reduce((f,d)=>d(f),e());return n=ea(l),r=n.cache.get,o=n.cache.set,s=i,i(u)}function i(u){const l=r(u);if(l)return l;const f=na(u,n);return o(u,f),f}return function(){return s(ra.apply(null,arguments))}}const V=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ir=/^\[(?:([a-z-]+):)?(.+)\]$/i,oa=/^\d+\/\d+$/,sa=new Set(["px","full","screen"]),ia=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,aa=/\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$/,ca=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,la=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ua=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fe=e=>Pe(e)||sa.has(e)||oa.test(e),ge=e=>Te(e,"length",ba),Pe=e=>!!e&&!Number.isNaN(Number(e)),Wt=e=>Te(e,"number",Pe),Fe=e=>!!e&&Number.isInteger(Number(e)),da=e=>e.endsWith("%")&&Pe(e.slice(0,-1)),D=e=>ir.test(e),ve=e=>ia.test(e),fa=new Set(["length","size","percentage"]),pa=e=>Te(e,fa,ar),ma=e=>Te(e,"position",ar),ha=new Set(["image","url"]),ga=e=>Te(e,ha,ya),va=e=>Te(e,"",wa),$e=()=>!0,Te=(e,t,n)=>{const r=ir.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},ba=e=>aa.test(e)&&!ca.test(e),ar=()=>!1,wa=e=>la.test(e),ya=e=>ua.test(e),cr=()=>{const e=V("colors"),t=V("spacing"),n=V("blur"),r=V("brightness"),o=V("borderColor"),s=V("borderRadius"),a=V("borderSpacing"),i=V("borderWidth"),u=V("contrast"),l=V("grayscale"),f=V("hueRotate"),d=V("invert"),m=V("gap"),v=V("gradientColorStops"),b=V("gradientColorStopPositions"),p=V("inset"),g=V("margin"),w=V("opacity"),y=V("padding"),k=V("saturate"),x=V("scale"),C=V("sepia"),P=V("skew"),E=V("space"),T=V("translate"),O=()=>["auto","contain","none"],I=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",D,t],A=()=>[D,t],F=()=>["",fe,ge],S=()=>["auto",Pe,D],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],_=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",D],W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[Pe,D];return{cacheSize:500,separator:":",theme:{colors:[$e],spacing:[fe,ge],blur:["none","",ve,D],brightness:B(),borderColor:[e],borderRadius:["none","","full",ve,D],borderSpacing:A(),borderWidth:F(),contrast:B(),grayscale:j(),hueRotate:B(),invert:j(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[da,ge],inset:L(),margin:L(),opacity:B(),padding:A(),saturate:B(),scale:B(),sepia:j(),skew:B(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",D]}],container:["container"],columns:[{columns:[ve]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"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:[...$(),D]}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Fe,D]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",D]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",Fe,D]}],"grid-cols":[{"grid-cols":[$e]}],"col-start-end":[{col:["auto",{span:["full",Fe,D]},D]}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":[$e]}],"row-start-end":[{row:["auto",{span:[Fe,D]},D]}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",D]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",D]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"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",D,t]}],"min-w":[{"min-w":[D,t,"min","max","fit"]}],"max-w":[{"max-w":[D,t,"none","full","min","max","fit","prose",{screen:[ve]},ve]}],h:[{h:[D,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[D,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[D,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[D,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ve,ge]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Wt]}],"font-family":[{font:[$e]}],"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",D]}],"line-clamp":[{"line-clamp":["none",Pe,Wt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",fe,D]}],"list-image":[{"list-image":["none",D]}],"list-style-type":[{list:["none","disc","decimal",D]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",fe,ge]}],"underline-offset":[{"underline-offset":["auto",fe,D]}],"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:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",D]}],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",D]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),ma]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",pa]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ga]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"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:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[..._(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:_()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",..._()]}],"outline-offset":[{"outline-offset":[fe,D]}],"outline-w":[{outline:[fe,ge]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[fe,ge]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ve,va]}],"shadow-color":[{shadow:[$e]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",ve,D]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[k]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[k]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",D]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",D]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",D]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Fe,D]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",D]}],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",D]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",D]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[fe,ge,Wt]}],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"]}}},ka=(e,{cacheSize:t,prefix:n,separator:r,experimentalParseClassName:o,extend:s={},override:a={}})=>{ze(e,"cacheSize",t),ze(e,"prefix",n),ze(e,"separator",r),ze(e,"experimentalParseClassName",o);for(const i in a)xa(e[i],a[i]);for(const i in s)Ca(e[i],s[i]);return e},ze=(e,t,n)=>{n!==void 0&&(e[t]=n)},xa=(e,t)=>{if(t)for(const n in t)ze(e,n,t[n])},Ca=(e,t)=>{if(t)for(const n in t){const r=t[n];r!==void 0&&(e[n]=(e[n]||[]).concat(r))}},Ea=((e,...t)=>typeof e=="function"?sr(cr,e,...t):sr(()=>ka(cr(),e),...t))({prefix:"ksjsui-"});function U(...e){return Ea(Zn(e))}const lr=["#E60060","#ED0C0C","#B20000","#CC4400","#558000","#008A22","#006600","#004C40","#008099","#0059B2","#0070F0","#0022FF","#6619FF","#9900E5","#747474","#191919"],Sa=Le(["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"}}),ur=c.forwardRef(({className:e,size:t,...n},r)=>h.jsx(Hn,{ref:r,className:U(Sa({size:t,className:e})),...n}));ur.displayName=Hn.displayName;const dr=c.forwardRef(({className:e,...t},n)=>h.jsx(Yn,{ref:n,className:U("ksjsui-aspect-square ksjsui-size-full",e),...t}));dr.displayName=Yn.displayName;const fr=c.forwardRef(({className:e,...t},n)=>{var r;return h.jsx(Xn,{ref:n,className:U("ksjsui-flex ksjsui-size-full ksjsui-items-center ksjsui-justify-center ksjsui-rounded-full ksjsui-bg-muted",e),style:{...ja((r=t.children)==null?void 0:r.toString(),lr)},...t})});fr.displayName=Xn.displayName;function ja(e="",t=lr){const n=e.substring(0,2),r=Pa(n)%t.length,o=t[r],s=Ta(o);return{backgroundColor:o,color:s}}function Pa(e){const t=e.substring(0,2);return t.split("").reduce((r,o,s)=>r+t.charCodeAt(s),0)}function Ta(e){return e==="#fff"?"#000":"#fff"}const Aa=Le(["ksjsui-inline-flex ksjsui-items-center ksjsui-justify-center ksjsui-whitespace-nowrap ksjsui-border ksjsui-border-transparent ksjsui-p-2 ksjsui-text-base ksjsui-font-medium 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"},color:{neutral:"",primary:"",secondary:"",destructive:""},fullWidth:{true:"ksjsui-w-full"},avatar:{true:"ksjsui-p-0"},iconOnly:{true:""},radius:{md:"ksjsui-rounded-lg",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:void 0,radius:"md",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"},{avatar:!0,size:"sm",className:"ksjsui-size-8 ksjsui-rounded-full ksjsui-border-0"},{avatar:!0,size:"md",className:"ksjsui-size-9 ksjsui-rounded-full ksjsui-border-0"},{avatar:!0,size:"lg",className:"ksjsui-size-10 ksjsui-rounded-full ksjsui-border-0"},{iconOnly:!0,size:"sm",className:"ksjsui-w-8"},{iconOnly:!0,size:"md",className:"ksjsui-w-9"},{iconOnly:!0,size:"lg",className:"ksjsui-w-10"}]}),Bt=c.forwardRef(({className:e,endContent:t,startContent:n,variant:r,color:o,fullWidth:s,avatar:a,iconOnly:i,radius:u,size:l,asChild:f,children:d,tabIndex:m=0,...v},b)=>{const p=f?q:"button";return h.jsxs(p,{className:U(Aa({variant:r,color:o,fullWidth:s,avatar:a,iconOnly:i,radius:u,size:l,className:e})),ref:b,tabIndex:m,...v,children:[n&&h.jsx("span",{className:"ksjsui-me-2",children:n}),h.jsx(zn,{children:d}),t&&h.jsx("span",{className:"ksjsui-ms-2",children:t})]})});Bt.displayName="Button";function M(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function We({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Ma({defaultProp:t,onChange:n}),s=e!==void 0,a=s?e:r,i=H(n),u=c.useCallback(l=>{if(s){const d=typeof l=="function"?l(e):l;d!==e&&i(d)}else o(l)},[s,e,o,i]);return[a,u]}function Ma({defaultProp:e,onChange:t}){const n=c.useState(e),[r]=n,o=c.useRef(r),s=H(t);return c.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var Na=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],X=Na.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?q:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function pr(e,t){e&&rt.flushSync(()=>e.dispatchEvent(t))}function mr(e){const t=e+"CollectionProvider",[n,r]=de(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:p}=v,g=G.useRef(null),w=G.useRef(new Map).current;return h.jsx(o,{scope:b,itemMap:w,collectionRef:g,children:p})};a.displayName=t;const i=e+"CollectionSlot",u=G.forwardRef((v,b)=>{const{scope:p,children:g}=v,w=s(i,p),y=K(b,w.collectionRef);return h.jsx(q,{ref:y,children:g})});u.displayName=i;const l=e+"CollectionItemSlot",f="data-radix-collection-item",d=G.forwardRef((v,b)=>{const{scope:p,children:g,...w}=v,y=G.useRef(null),k=K(b,y),x=s(l,p);return G.useEffect(()=>(x.itemMap.set(y,{ref:y,...w}),()=>void x.itemMap.delete(y))),h.jsx(q,{[f]:"",ref:k,children:g})});d.displayName=l;function m(v){const b=s(e+"CollectionConsumer",v);return G.useCallback(()=>{const g=b.collectionRef.current;if(!g)return[];const w=Array.from(g.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((x,C)=>w.indexOf(x.ref.current)-w.indexOf(C.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:u,ItemSlot:d},m,r]}var hr=c.createContext(void 0),Oa=e=>{const{dir:t,children:n}=e;return h.jsx(hr.Provider,{value:t,children:n})};function gr(e){const t=c.useContext(hr);return e||t||"ltr"}function vr(e,t=globalThis==null?void 0:globalThis.document){const n=H(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Ia="DismissableLayer",Vt="dismissableLayer.update",_a="dismissableLayer.pointerDownOutside",Da="dismissableLayer.focusOutside",br,wr=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yr=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...u}=e,l=c.useContext(wr),[f,d]=c.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=c.useState({}),b=K(t,E=>d(E)),p=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=p.indexOf(g),y=f?p.indexOf(f):-1,k=l.layersWithOutsidePointerEventsDisabled.size>0,x=y>=w,C=Fa(E=>{const T=E.target,O=[...l.branches].some(I=>I.contains(T));!x||O||(o==null||o(E),a==null||a(E),E.defaultPrevented||i==null||i())},m),P=$a(E=>{const T=E.target;[...l.branches].some(I=>I.contains(T))||(s==null||s(E),a==null||a(E),E.defaultPrevented||i==null||i())},m);return vr(E=>{y===l.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},m),c.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(br=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),kr(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=br)}},[f,m,n,l]),c.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),kr())},[f,l]),c.useEffect(()=>{const E=()=>v({});return document.addEventListener(Vt,E),()=>document.removeEventListener(Vt,E)},[]),h.jsx(X.div,{...u,ref:b,style:{pointerEvents:k?x?"auto":"none":void 0,...e.style},onFocusCapture:M(e.onFocusCapture,P.onFocusCapture),onBlurCapture:M(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:M(e.onPointerDownCapture,C.onPointerDownCapture)})});yr.displayName=Ia;var Ra="DismissableLayerBranch",La=c.forwardRef((e,t)=>{const n=c.useContext(wr),r=c.useRef(null),o=K(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),h.jsx(X.div,{...e,ref:o})});La.displayName=Ra;function Fa(e,t=globalThis==null?void 0:globalThis.document){const n=H(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let u=function(){xr(_a,n,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function $a(e,t=globalThis==null?void 0:globalThis.document){const n=H(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&xr(Da,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function kr(){const e=new CustomEvent(Vt);document.dispatchEvent(e)}function xr(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?pr(o,s):o.dispatchEvent(s)}var Ut=0;function za(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Cr()),document.body.insertAdjacentElement("beforeend",e[1]??Cr()),Ut++,()=>{Ut===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ut--}},[])}function Cr(){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 Gt="focusScope.autoFocusOnMount",Kt="focusScope.autoFocusOnUnmount",Er={bubbles:!1,cancelable:!0},Wa="FocusScope",Sr=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,u]=c.useState(null),l=H(o),f=H(s),d=c.useRef(null),m=K(t,p=>u(p)),v=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let p=function(k){if(v.paused||!i)return;const x=k.target;i.contains(x)?d.current=x:be(d.current,{select:!0})},g=function(k){if(v.paused||!i)return;const x=k.relatedTarget;x!==null&&(i.contains(x)||be(d.current,{select:!0}))},w=function(k){if(document.activeElement===document.body)for(const C of k)C.removedNodes.length>0&&be(i)};document.addEventListener("focusin",p),document.addEventListener("focusout",g);const y=new MutationObserver(w);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",g),y.disconnect()}}},[r,i,v.paused]),c.useEffect(()=>{if(i){Tr.add(v);const p=document.activeElement;if(!i.contains(p)){const w=new CustomEvent(Gt,Er);i.addEventListener(Gt,l),i.dispatchEvent(w),w.defaultPrevented||(Ba(Ha(jr(i)),{select:!0}),document.activeElement===p&&be(i))}return()=>{i.removeEventListener(Gt,l),setTimeout(()=>{const w=new CustomEvent(Kt,Er);i.addEventListener(Kt,f),i.dispatchEvent(w),w.defaultPrevented||be(p??document.body,{select:!0}),i.removeEventListener(Kt,f),Tr.remove(v)},0)}}},[i,l,f,v]);const b=c.useCallback(p=>{if(!n&&!r||v.paused)return;const g=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,w=document.activeElement;if(g&&w){const y=p.currentTarget,[k,x]=Va(y);k&&x?!p.shiftKey&&w===x?(p.preventDefault(),n&&be(k,{select:!0})):p.shiftKey&&w===k&&(p.preventDefault(),n&&be(x,{select:!0})):w===y&&p.preventDefault()}},[n,r,v.paused]);return h.jsx(X.div,{tabIndex:-1,...a,ref:m,onKeyDown:b})});Sr.displayName=Wa;function Ba(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(be(r,{select:t}),document.activeElement!==n)return}function Va(e){const t=jr(e),n=Pr(t,e),r=Pr(t.reverse(),e);return[n,r]}function jr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Pr(e,t){for(const n of e)if(!Ua(n,{upTo:t}))return n}function Ua(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 Ga(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&&Ga(e)&&t&&e.select()}}var Tr=Ka();function Ka(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ar(e,t),e.unshift(t)},remove(t){var n;e=Ar(e,t),(n=e[0])==null||n.resume()}}}function Ar(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ha(e){return e.filter(t=>t.tagName!=="A")}var Ya=c.useId||(()=>{}),Xa=0;function Be(e){const[t,n]=c.useState(Ya());return Q(()=>{e||n(r=>r??String(Xa++))},[e]),e||(t?`radix-${t}`:"")}const qa=["top","right","bottom","left"],we=Math.min,J=Math.max,st=Math.round,it=Math.floor,se=e=>({x:e,y:e}),Za={left:"right",right:"left",bottom:"top",top:"bottom"},Qa={start:"end",end:"start"};function Ht(e,t,n){return J(e,we(t,n))}function pe(e,t){return typeof e=="function"?e(t):e}function me(e){return e.split("-")[0]}function Ae(e){return e.split("-")[1]}function Yt(e){return e==="x"?"y":"x"}function Xt(e){return e==="y"?"height":"width"}function ye(e){return["top","bottom"].includes(me(e))?"y":"x"}function qt(e){return Yt(ye(e))}function Ja(e,t,n){n===void 0&&(n=!1);const r=Ae(e),o=qt(e),s=Xt(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=at(a)),[a,at(a)]}function ec(e){const t=at(e);return[Zt(e),t,Zt(t)]}function Zt(e){return e.replace(/start|end/g,t=>Qa[t])}function tc(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:a;default:return[]}}function nc(e,t,n,r){const o=Ae(e);let s=tc(me(e),n==="start",r);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(Zt)))),s}function at(e){return e.replace(/left|right|bottom|top/g,t=>Za[t])}function rc(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mr(e){return typeof e!="number"?rc(e):{top:e,right:e,bottom:e,left:e}}function ct(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Nr(e,t,n){let{reference:r,floating:o}=e;const s=ye(t),a=qt(t),i=Xt(a),u=me(t),l=s==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,m=r[i]/2-o[i]/2;let v;switch(u){case"top":v={x:f,y:r.y-o.height};break;case"bottom":v={x:f,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:d};break;case"left":v={x:r.x-o.width,y:d};break;default:v={x:r.x,y:r.y}}switch(Ae(t)){case"start":v[a]-=m*(n&&l?-1:1);break;case"end":v[a]+=m*(n&&l?-1:1);break}return v}const oc=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:a}=n,i=s.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=Nr(l,r,u),m=r,v={},b=0;for(let p=0;p<i.length;p++){const{name:g,fn:w}=i[p],{x:y,y:k,data:x,reset:C}=await w({x:f,y:d,initialPlacement:r,placement:m,strategy:o,middlewareData:v,rects:l,platform:a,elements:{reference:e,floating:t}});f=y??f,d=k??d,v={...v,[g]:{...v[g],...x}},C&&b<=50&&(b++,typeof C=="object"&&(C.placement&&(m=C.placement),C.rects&&(l=C.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:f,y:d}=Nr(l,m,u)),p=-1)}return{x:f,y:d,placement:m,strategy:o,middlewareData:v}};async function Ve(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:a,elements:i,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:m=!1,padding:v=0}=pe(t,e),b=Mr(v),g=i[m?d==="floating"?"reference":"floating":d],w=ct(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(i.floating)),boundary:l,rootBoundary:f,strategy:u})),y=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),x=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},C=ct(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:k,strategy:u}):y);return{top:(w.top-C.top+b.top)/x.y,bottom:(C.bottom-w.bottom+b.bottom)/x.y,left:(w.left-C.left+b.left)/x.x,right:(C.right-w.right+b.right)/x.x}}const sc=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:a,elements:i,middlewareData:u}=t,{element:l,padding:f=0}=pe(e,t)||{};if(l==null)return{};const d=Mr(f),m={x:n,y:r},v=qt(o),b=Xt(v),p=await a.getDimensions(l),g=v==="y",w=g?"top":"left",y=g?"bottom":"right",k=g?"clientHeight":"clientWidth",x=s.reference[b]+s.reference[v]-m[v]-s.floating[b],C=m[v]-s.reference[v],P=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let E=P?P[k]:0;(!E||!await(a.isElement==null?void 0:a.isElement(P)))&&(E=i.floating[k]||s.floating[b]);const T=x/2-C/2,O=E/2-p[b]/2-1,I=we(d[w],O),L=we(d[y],O),A=I,F=E-p[b]-L,S=E/2-p[b]/2+T,$=Ht(A,S,F),_=!u.arrow&&Ae(o)!=null&&S!==$&&s.reference[b]/2-(S<A?I:L)-p[b]/2<0,z=_?S<A?S-A:S-F:0;return{[v]:m[v]+z,data:{[v]:$,centerOffset:S-$-z,..._&&{alignmentOffset:z}},reset:_}}}),ic=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:u,elements:l}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:p=!0,...g}=pe(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=me(o),y=ye(i),k=me(i)===i,x=await(u.isRTL==null?void 0:u.isRTL(l.floating)),C=m||(k||!p?[at(i)]:ec(i)),P=b!=="none";!m&&P&&C.push(...nc(i,p,b,x));const E=[i,...C],T=await Ve(t,g),O=[];let I=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&O.push(T[w]),d){const S=Ja(o,a,x);O.push(T[S[0]],T[S[1]])}if(I=[...I,{placement:o,overflows:O}],!O.every(S=>S<=0)){var L,A;const S=(((L=s.flip)==null?void 0:L.index)||0)+1,$=E[S];if($)return{data:{index:S,overflows:I},reset:{placement:$}};let _=(A=I.filter(z=>z.overflows[0]<=0).sort((z,N)=>z.overflows[1]-N.overflows[1])[0])==null?void 0:A.placement;if(!_)switch(v){case"bestFit":{var F;const z=(F=I.filter(N=>{if(P){const j=ye(N.placement);return j===y||j==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(j=>j>0).reduce((j,W)=>j+W,0)]).sort((N,j)=>N[1]-j[1])[0])==null?void 0:F[0];z&&(_=z);break}case"initialPlacement":_=i;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function Or(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ir(e){return qa.some(t=>e[t]>=0)}const ac=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=pe(e,t);switch(r){case"referenceHidden":{const s=await Ve(t,{...o,elementContext:"reference"}),a=Or(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Ir(a)}}}case"escaped":{const s=await Ve(t,{...o,altBoundary:!0}),a=Or(s,n.floating);return{data:{escapedOffsets:a,escaped:Ir(a)}}}default:return{}}}}};async function cc(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=me(n),i=Ae(n),u=ye(n)==="y",l=["left","top"].includes(a)?-1:1,f=s&&u?-1:1,d=pe(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof b=="number"&&(v=i==="end"?b*-1:b),u?{x:v*f,y:m*l}:{x:m*l,y:v*f}}const lc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:a,middlewareData:i}=t,u=await cc(t,e);return a===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:s+u.y,data:{...u,placement:a}}}}},uc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:g=>{let{x:w,y}=g;return{x:w,y}}},...u}=pe(e,t),l={x:n,y:r},f=await Ve(t,u),d=ye(me(o)),m=Yt(d);let v=l[m],b=l[d];if(s){const g=m==="y"?"top":"left",w=m==="y"?"bottom":"right",y=v+f[g],k=v-f[w];v=Ht(y,v,k)}if(a){const g=d==="y"?"top":"left",w=d==="y"?"bottom":"right",y=b+f[g],k=b-f[w];b=Ht(y,b,k)}const p=i.fn({...t,[m]:v,[d]:b});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[m]:s,[d]:a}}}}}},dc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:u=!0,crossAxis:l=!0}=pe(e,t),f={x:n,y:r},d=ye(o),m=Yt(d);let v=f[m],b=f[d];const p=pe(i,t),g=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(u){const k=m==="y"?"height":"width",x=s.reference[m]-s.floating[k]+g.mainAxis,C=s.reference[m]+s.reference[k]-g.mainAxis;v<x?v=x:v>C&&(v=C)}if(l){var w,y;const k=m==="y"?"width":"height",x=["top","left"].includes(me(o)),C=s.reference[d]-s.floating[k]+(x&&((w=a.offset)==null?void 0:w[d])||0)+(x?0:g.crossAxis),P=s.reference[d]+s.reference[k]+(x?0:((y=a.offset)==null?void 0:y[d])||0)-(x?g.crossAxis:0);b<C?b=C:b>P&&(b=P)}return{[m]:v,[d]:b}}}},fc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:a,elements:i}=t,{apply:u=()=>{},...l}=pe(e,t),f=await Ve(t,l),d=me(o),m=Ae(o),v=ye(o)==="y",{width:b,height:p}=s.floating;let g,w;d==="top"||d==="bottom"?(g=d,w=m===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(w=d,g=m==="end"?"top":"bottom");const y=p-f.top-f.bottom,k=b-f.left-f.right,x=we(p-f[g],y),C=we(b-f[w],k),P=!t.middlewareData.shift;let E=x,T=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=y),P&&!m){const I=J(f.left,0),L=J(f.right,0),A=J(f.top,0),F=J(f.bottom,0);v?T=b-2*(I!==0||L!==0?I+L:J(f.left,f.right)):E=p-2*(A!==0||F!==0?A+F:J(f.top,f.bottom))}await u({...t,availableWidth:T,availableHeight:E});const O=await a.getDimensions(i.floating);return b!==O.width||p!==O.height?{reset:{rects:!0}}:{}}}};function lt(){return typeof window<"u"}function Me(e){return _r(e)?(e.nodeName||"").toLowerCase():"#document"}function ee(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ie(e){var t;return(t=(_r(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _r(e){return lt()?e instanceof Node||e instanceof ee(e).Node:!1}function re(e){return lt()?e instanceof Element||e instanceof ee(e).Element:!1}function ae(e){return lt()?e instanceof HTMLElement||e instanceof ee(e).HTMLElement:!1}function Dr(e){return!lt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ee(e).ShadowRoot}function Ue(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=oe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function pc(e){return["table","td","th"].includes(Me(e))}function ut(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Qt(e){const t=Jt(),n=re(e)?oe(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function mc(e){let t=ke(e);for(;ae(t)&&!Ne(t);){if(Qt(t))return t;if(ut(t))return null;t=ke(t)}return null}function Jt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ne(e){return["html","body","#document"].includes(Me(e))}function oe(e){return ee(e).getComputedStyle(e)}function dt(e){return re(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ke(e){if(Me(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Dr(e)&&e.host||ie(e);return Dr(t)?t.host:t}function Rr(e){const t=ke(e);return Ne(t)?e.ownerDocument?e.ownerDocument.body:e.body:ae(t)&&Ue(t)?t:Rr(t)}function Ge(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Rr(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=ee(o);if(s){const i=en(a);return t.concat(a,a.visualViewport||[],Ue(o)?o:[],i&&n?Ge(i):[])}return t.concat(o,Ge(o,[],n))}function en(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lr(e){const t=oe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ae(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=st(n)!==s||st(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function tn(e){return re(e)?e:e.contextElement}function Oe(e){const t=tn(e);if(!ae(t))return se(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Lr(t);let a=(s?st(n.width):n.width)/r,i=(s?st(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const hc=se(0);function Fr(e){const t=ee(e);return!Jt()||!t.visualViewport?hc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gc(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ee(e)?!1:t}function Ee(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=tn(e);let a=se(1);t&&(r?re(r)&&(a=Oe(r)):a=Oe(e));const i=gc(s,n,r)?Fr(s):se(0);let u=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,f=o.width/a.x,d=o.height/a.y;if(s){const m=ee(s),v=r&&re(r)?ee(r):r;let b=m,p=en(b);for(;p&&r&&v!==b;){const g=Oe(p),w=p.getBoundingClientRect(),y=oe(p),k=w.left+(p.clientLeft+parseFloat(y.paddingLeft))*g.x,x=w.top+(p.clientTop+parseFloat(y.paddingTop))*g.y;u*=g.x,l*=g.y,f*=g.x,d*=g.y,u+=k,l+=x,b=ee(p),p=en(b)}}return ct({width:f,height:d,x:u,y:l})}function nn(e,t){const n=dt(e).scrollLeft;return t?t.left+n:Ee(ie(e)).left+n}function $r(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:nn(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function vc(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",a=ie(r),i=t?ut(t.floating):!1;if(r===a||i&&s)return n;let u={scrollLeft:0,scrollTop:0},l=se(1);const f=se(0),d=ae(r);if((d||!d&&!s)&&((Me(r)!=="body"||Ue(a))&&(u=dt(r)),ae(r))){const v=Ee(r);l=Oe(r),f.x=v.x+r.clientLeft,f.y=v.y+r.clientTop}const m=a&&!d&&!s?$r(a,u,!0):se(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+f.x+m.x,y:n.y*l.y-u.scrollTop*l.y+f.y+m.y}}function bc(e){return Array.from(e.getClientRects())}function wc(e){const t=ie(e),n=dt(e),r=e.ownerDocument.body,o=J(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=J(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+nn(e);const i=-n.scrollTop;return oe(r).direction==="rtl"&&(a+=J(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:i}}function yc(e,t){const n=ee(e),r=ie(e),o=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,i=0,u=0;if(o){s=o.width,a=o.height;const l=Jt();(!l||l&&t==="fixed")&&(i=o.offsetLeft,u=o.offsetTop)}return{width:s,height:a,x:i,y:u}}function kc(e,t){const n=Ee(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ae(e)?Oe(e):se(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,u=o*s.x,l=r*s.y;return{width:a,height:i,x:u,y:l}}function zr(e,t,n){let r;if(t==="viewport")r=yc(e,n);else if(t==="document")r=wc(ie(e));else if(re(t))r=kc(t,n);else{const o=Fr(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ct(r)}function Wr(e,t){const n=ke(e);return n===t||!re(n)||Ne(n)?!1:oe(n).position==="fixed"||Wr(n,t)}function xc(e,t){const n=t.get(e);if(n)return n;let r=Ge(e,[],!1).filter(i=>re(i)&&Me(i)!=="body"),o=null;const s=oe(e).position==="fixed";let a=s?ke(e):e;for(;re(a)&&!Ne(a);){const i=oe(a),u=Qt(a);!u&&i.position==="fixed"&&(o=null),(s?!u&&!o:!u&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ue(a)&&!u&&Wr(e,a))?r=r.filter(f=>f!==a):o=i,a=ke(a)}return t.set(e,r),r}function Cc(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?ut(t)?[]:xc(t,this._c):[].concat(n),r],i=a[0],u=a.reduce((l,f)=>{const d=zr(t,f,o);return l.top=J(d.top,l.top),l.right=we(d.right,l.right),l.bottom=we(d.bottom,l.bottom),l.left=J(d.left,l.left),l},zr(t,i,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Ec(e){const{width:t,height:n}=Lr(e);return{width:t,height:n}}function Sc(e,t,n){const r=ae(t),o=ie(t),s=n==="fixed",a=Ee(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const u=se(0);if(r||!r&&!s)if((Me(t)!=="body"||Ue(o))&&(i=dt(t)),r){const m=Ee(t,!0,s,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else o&&(u.x=nn(o));const l=o&&!r&&!s?$r(o,i):se(0),f=a.left+i.scrollLeft-u.x-l.x,d=a.top+i.scrollTop-u.y-l.y;return{x:f,y:d,width:a.width,height:a.height}}function rn(e){return oe(e).position==="static"}function Br(e,t){if(!ae(e)||oe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ie(e)===n&&(n=n.ownerDocument.body),n}function Vr(e,t){const n=ee(e);if(ut(e))return n;if(!ae(e)){let o=ke(e);for(;o&&!Ne(o);){if(re(o)&&!rn(o))return o;o=ke(o)}return n}let r=Br(e,t);for(;r&&pc(r)&&rn(r);)r=Br(r,t);return r&&Ne(r)&&rn(r)&&!Qt(r)?n:r||mc(e)||n}const jc=async function(e){const t=this.getOffsetParent||Vr,n=this.getDimensions,r=await n(e.floating);return{reference:Sc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Pc(e){return oe(e).direction==="rtl"}const Tc={convertOffsetParentRelativeRectToViewportRelativeRect:vc,getDocumentElement:ie,getClippingRect:Cc,getOffsetParent:Vr,getElementRects:jc,getClientRects:bc,getDimensions:Ec,getScale:Oe,isElement:re,isRTL:Pc};function Ac(e,t){let n=null,r;const o=ie(e);function s(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,u){i===void 0&&(i=!1),u===void 0&&(u=1),s();const{left:l,top:f,width:d,height:m}=e.getBoundingClientRect();if(i||t(),!d||!m)return;const v=it(f),b=it(o.clientWidth-(l+d)),p=it(o.clientHeight-(f+m)),g=it(l),y={rootMargin:-v+"px "+-b+"px "+-p+"px "+-g+"px",threshold:J(0,we(1,u))||1};let k=!0;function x(C){const P=C[0].intersectionRatio;if(P!==u){if(!k)return a();P?a(!1,P):r=setTimeout(()=>{a(!1,1e-7)},1e3)}k=!1}try{n=new IntersectionObserver(x,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(x,y)}n.observe(e)}return a(!0),s}function Mc(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=tn(e),f=o||s?[...l?Ge(l):[],...Ge(t)]:[];f.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const d=l&&i?Ac(l,n):null;let m=-1,v=null;a&&(v=new ResizeObserver(w=>{let[y]=w;y&&y.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var k;(k=v)==null||k.observe(t)})),n()}),l&&!u&&v.observe(l),v.observe(t));let b,p=u?Ee(e):null;u&&g();function g(){const w=Ee(e);p&&(w.x!==p.x||w.y!==p.y||w.width!==p.width||w.height!==p.height)&&n(),p=w,b=requestAnimationFrame(g)}return n(),()=>{var w;f.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),d==null||d(),(w=v)==null||w.disconnect(),v=null,u&&cancelAnimationFrame(b)}}const Nc=lc,Oc=uc,Ic=ic,_c=fc,Dc=ac,Ur=sc,Rc=dc,Lc=(e,t,n)=>{const r=new Map,o={platform:Tc,...n},s={...o.platform,_c:r};return oc(e,t,{...o,platform:s})};var ft=typeof document<"u"?G.useLayoutEffect:G.useEffect;function pt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!pt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!pt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Gr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Kr(e,t){const n=Gr(e);return Math.round(t*n)/n}function on(e){const t=c.useRef(e);return ft(()=>{t.current=e}),t}function Fc(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:u,open:l}=e,[f,d]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=c.useState(r);pt(m,r)||v(r);const[b,p]=c.useState(null),[g,w]=c.useState(null),y=c.useCallback(N=>{N!==P.current&&(P.current=N,p(N))},[]),k=c.useCallback(N=>{N!==E.current&&(E.current=N,w(N))},[]),x=s||b,C=a||g,P=c.useRef(null),E=c.useRef(null),T=c.useRef(f),O=u!=null,I=on(u),L=on(o),A=on(l),F=c.useCallback(()=>{if(!P.current||!E.current)return;const N={placement:t,strategy:n,middleware:m};L.current&&(N.platform=L.current),Lc(P.current,E.current,N).then(j=>{const W={...j,isPositioned:A.current!==!1};S.current&&!pt(T.current,W)&&(T.current=W,rt.flushSync(()=>{d(W)}))})},[m,t,n,L,A]);ft(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(N=>({...N,isPositioned:!1})))},[l]);const S=c.useRef(!1);ft(()=>(S.current=!0,()=>{S.current=!1}),[]),ft(()=>{if(x&&(P.current=x),C&&(E.current=C),x&&C){if(I.current)return I.current(x,C,F);F()}},[x,C,F,I,O]);const $=c.useMemo(()=>({reference:P,floating:E,setReference:y,setFloating:k}),[y,k]),_=c.useMemo(()=>({reference:x,floating:C}),[x,C]),z=c.useMemo(()=>{const N={position:n,left:0,top:0};if(!_.floating)return N;const j=Kr(_.floating,f.x),W=Kr(_.floating,f.y);return i?{...N,transform:"translate("+j+"px, "+W+"px)",...Gr(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:W}},[n,i,_.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:F,refs:$,elements:_,floatingStyles:z}),[f,F,$,_,z])}const $c=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ur({element:r.current,padding:o}).fn(n):{}:r?Ur({element:r,padding:o}).fn(n):{}}}},zc=(e,t)=>({...Nc(e),options:[e,t]}),Wc=(e,t)=>({...Oc(e),options:[e,t]}),Bc=(e,t)=>({...Rc(e),options:[e,t]}),Vc=(e,t)=>({...Ic(e),options:[e,t]}),Uc=(e,t)=>({..._c(e),options:[e,t]}),Gc=(e,t)=>({...Dc(e),options:[e,t]}),Kc=(e,t)=>({...$c(e),options:[e,t]});var Hc="Arrow",Hr=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return h.jsx(X.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});Hr.displayName=Hc;var Yc=Hr;function Yr(e){const[t,n]=c.useState(void 0);return Q(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const u=s.borderBoxSize,l=Array.isArray(u)?u[0]:u;a=l.inlineSize,i=l.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var sn="Popper",[Xr,qr]=de(sn),[Xc,Zr]=Xr(sn),Qr=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return h.jsx(Xc,{scope:t,anchor:r,onAnchorChange:o,children:n})};Qr.displayName=sn;var Jr="PopperAnchor",eo=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Zr(Jr,n),a=c.useRef(null),i=K(t,a);return c.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:h.jsx(X.div,{...o,ref:i})});eo.displayName=Jr;var an="PopperContent",[qc,Zc]=Xr(an),to=c.forwardRef((e,t)=>{var he,et,ne,tt,Di,Ri;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:b,...p}=e,g=Zr(an,n),[w,y]=c.useState(null),k=K(t,nt=>y(nt)),[x,C]=c.useState(null),P=Yr(x),E=(P==null?void 0:P.width)??0,T=(P==null?void 0:P.height)??0,O=r+(s!=="center"?"-"+s:""),I=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},L=Array.isArray(l)?l:[l],A=L.length>0,F={padding:I,boundary:L.filter(Jc),altBoundary:A},{refs:S,floatingStyles:$,placement:_,isPositioned:z,middlewareData:N}=Fc({strategy:"fixed",placement:O,whileElementsMounted:(...nt)=>Mc(...nt,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[zc({mainAxis:o+T,alignmentAxis:a}),u&&Wc({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Bc():void 0,...F}),u&&Vc({...F}),Uc({...F,apply:({elements:nt,rects:Li,availableWidth:_f,availableHeight:Df})=>{const{width:Rf,height:Lf}=Li.reference,_t=nt.floating.style;_t.setProperty("--radix-popper-available-width",`${_f}px`),_t.setProperty("--radix-popper-available-height",`${Df}px`),_t.setProperty("--radix-popper-anchor-width",`${Rf}px`),_t.setProperty("--radix-popper-anchor-height",`${Lf}px`)}}),x&&Kc({element:x,padding:i}),el({arrowWidth:E,arrowHeight:T}),m&&Gc({strategy:"referenceHidden",...F})]}),[j,W]=oo(_),B=H(b);Q(()=>{z&&(B==null||B())},[z,B]);const Z=(he=N.arrow)==null?void 0:he.x,ue=(et=N.arrow)==null?void 0:et.y,Ce=((ne=N.arrow)==null?void 0:ne.centerOffset)!==0,[It,je]=c.useState();return Q(()=>{w&&je(window.getComputedStyle(w).zIndex)},[w]),h.jsx("div",{ref:S.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:z?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:It,"--radix-popper-transform-origin":[(tt=N.transformOrigin)==null?void 0:tt.x,(Di=N.transformOrigin)==null?void 0:Di.y].join(" "),...((Ri=N.hide)==null?void 0:Ri.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:h.jsx(qc,{scope:n,placedSide:j,onArrowChange:C,arrowX:Z,arrowY:ue,shouldHideArrow:Ce,children:h.jsx(X.div,{"data-side":j,"data-align":W,...p,ref:k,style:{...p.style,animation:z?void 0:"none"}})})})});to.displayName=an;var no="PopperArrow",Qc={top:"bottom",right:"left",bottom:"top",left:"right"},ro=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Zc(no,r),a=Qc[s.placedSide];return h.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]: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:h.jsx(Yc,{...o,ref:n,style:{...o.style,display:"block"}})})});ro.displayName=no;function Jc(e){return e!==null}var el=e=>({name:"transformOrigin",options:e,fn(t){var g,w,y;const{placement:n,rects:r,middlewareData:o}=t,a=((g=o.arrow)==null?void 0:g.centerOffset)!==0,i=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[l,f]=oo(n),d={start:"0%",center:"50%",end:"100%"}[f],m=(((w=o.arrow)==null?void 0:w.x)??0)+i/2,v=(((y=o.arrow)==null?void 0:y.y)??0)+u/2;let b="",p="";return l==="bottom"?(b=a?d:`${m}px`,p=`${-u}px`):l==="top"?(b=a?d:`${m}px`,p=`${r.floating.height+u}px`):l==="right"?(b=`${-u}px`,p=a?d:`${v}px`):l==="left"&&(b=`${r.floating.width+u}px`,p=a?d:`${v}px`),{data:{x:b,y:p}}}});function oo(e){const[t,n="center"]=e.split("-");return[t,n]}var so=Qr,tl=eo,nl=to,rl=ro,ol="Portal",io=c.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,s]=c.useState(!1);Q(()=>s(!0),[]);const a=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?Dt.createPortal(h.jsx(X.div,{...r,ref:t}),a):null});io.displayName=ol;function sl(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var Ke=e=>{const{present:t,children:n}=e,r=il(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=K(r.ref,al(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};Ke.displayName="Presence";function il(e){const[t,n]=c.useState(),r=c.useRef({}),o=c.useRef(e),s=c.useRef("none"),a=e?"mounted":"unmounted",[i,u]=sl(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const l=mt(r.current);s.current=i==="mounted"?l:"none"},[i]),Q(()=>{const l=r.current,f=o.current;if(f!==e){const m=s.current,v=mt(l);e?u("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(f&&m!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Q(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,d=v=>{const p=mt(r.current).includes(v.animationName);if(v.target===t&&p&&(u("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(s.current=mt(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function mt(e){return(e==null?void 0:e.animationName)||"none"}function al(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var cn="rovingFocusGroup.onEntryFocus",cl={bubbles:!1,cancelable:!0},ht="RovingFocusGroup",[ln,ao,ll]=mr(ht),[ul,co]=de(ht,[ll]),[dl,fl]=ul(ht),lo=c.forwardRef((e,t)=>h.jsx(ln.Provider,{scope:e.__scopeRovingFocusGroup,children:h.jsx(ln.Slot,{scope:e.__scopeRovingFocusGroup,children:h.jsx(pl,{...e,ref:t})})}));lo.displayName=ht;var pl=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:f=!1,...d}=e,m=c.useRef(null),v=K(t,m),b=gr(s),[p=null,g]=We({prop:a,defaultProp:i,onChange:u}),[w,y]=c.useState(!1),k=H(l),x=ao(n),C=c.useRef(!1),[P,E]=c.useState(0);return c.useEffect(()=>{const T=m.current;if(T)return T.addEventListener(cn,k),()=>T.removeEventListener(cn,k)},[k]),h.jsx(dl,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:p,onItemFocus:c.useCallback(T=>g(T),[g]),onItemShiftTab:c.useCallback(()=>y(!0),[]),onFocusableItemAdd:c.useCallback(()=>E(T=>T+1),[]),onFocusableItemRemove:c.useCallback(()=>E(T=>T-1),[]),children:h.jsx(X.div,{tabIndex:w||P===0?-1:0,"data-orientation":r,...d,ref:v,style:{outline:"none",...e.style},onMouseDown:M(e.onMouseDown,()=>{C.current=!0}),onFocus:M(e.onFocus,T=>{const O=!C.current;if(T.target===T.currentTarget&&O&&!w){const I=new CustomEvent(cn,cl);if(T.currentTarget.dispatchEvent(I),!I.defaultPrevented){const L=x().filter(_=>_.focusable),A=L.find(_=>_.active),F=L.find(_=>_.id===p),$=[A,F,...L].filter(Boolean).map(_=>_.ref.current);po($,f)}}C.current=!1}),onBlur:M(e.onBlur,()=>y(!1))})})}),uo="RovingFocusGroupItem",fo=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...a}=e,i=Be(),u=s||i,l=fl(uo,n),f=l.currentTabStopId===u,d=ao(n),{onFocusableItemAdd:m,onFocusableItemRemove:v}=l;return c.useEffect(()=>{if(r)return m(),()=>v()},[r,m,v]),h.jsx(ln.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:h.jsx(X.span,{tabIndex:f?0:-1,"data-orientation":l.orientation,...a,ref:t,onMouseDown:M(e.onMouseDown,b=>{r?l.onItemFocus(u):b.preventDefault()}),onFocus:M(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:M(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){l.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const p=gl(b,l.orientation,l.dir);if(p!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let w=d().filter(y=>y.focusable).map(y=>y.ref.current);if(p==="last")w.reverse();else if(p==="prev"||p==="next"){p==="prev"&&w.reverse();const y=w.indexOf(b.currentTarget);w=l.loop?vl(w,y+1):w.slice(y+1)}setTimeout(()=>po(w))}})})})});fo.displayName=uo;var ml={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function hl(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function gl(e,t,n){const r=hl(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return ml[r]}function po(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function vl(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var bl=lo,wl=fo,yl=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ie=new WeakMap,gt=new WeakMap,vt={},un=0,mo=function(e){return e&&(e.host||mo(e.parentNode))},kl=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=mo(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},xl=function(e,t,n,r){var o=kl(t,Array.isArray(e)?e:[e]);vt[n]||(vt[n]=new WeakMap);var s=vt[n],a=[],i=new Set,u=new Set(o),l=function(d){!d||i.has(d)||(i.add(d),l(d.parentNode))};o.forEach(l);var f=function(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,function(m){if(i.has(m))f(m);else try{var v=m.getAttribute(r),b=v!==null&&v!=="false",p=(Ie.get(m)||0)+1,g=(s.get(m)||0)+1;Ie.set(m,p),s.set(m,g),a.push(m),p===1&&b&>.set(m,!0),g===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",m,w)}})};return f(t),i.clear(),un++,function(){a.forEach(function(d){var m=Ie.get(d)-1,v=s.get(d)-1;Ie.set(d,m),s.set(d,v),m||(gt.has(d)||d.removeAttribute(r),gt.delete(d)),v||d.removeAttribute(n)}),un--,un||(Ie=new WeakMap,Ie=new WeakMap,gt=new WeakMap,vt={})}},Cl=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=yl(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),xl(r,o,n,"aria-hidden")):function(){return null}},ce=function(){return ce=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ce.apply(this,arguments)};function ho(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function El(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var bt="right-scroll-bar-position",wt="width-before-scroll-bar",Sl="with-scroll-bars-hidden",jl="--removed-body-scroll-bar-size";function dn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Pl(e,t){var n=G.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Tl=typeof window<"u"?c.useLayoutEffect:c.useEffect,go=new WeakMap;function Al(e,t){var n=Pl(null,function(r){return e.forEach(function(o){return dn(o,r)})});return Tl(function(){var r=go.get(n);if(r){var o=new Set(r),s=new Set(e),a=n.current;o.forEach(function(i){s.has(i)||dn(i,null)}),s.forEach(function(i){o.has(i)||dn(i,a)})}go.set(n,e)},[e]),n}function Ml(e){return e}function Nl(e,t){t===void 0&&(t=Ml);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,r);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(s),a=n}var u=function(){var f=a;a=[],f.forEach(s)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(f){a.push(f),l()},filter:function(f){return a=a.filter(f),n}}}};return o}function Ol(e){e===void 0&&(e={});var t=Nl(null);return t.options=ce({async:!0,ssr:!1},e),t}var vo=function(e){var t=e.sideCar,n=ho(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,ce({},n))};vo.isSideCarExport=!0;function Il(e,t){return e.useMedium(t),vo}var bo=Ol(),fn=function(){},yt=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:fn,onWheelCapture:fn,onTouchMoveCapture:fn}),o=r[0],s=r[1],a=e.forwardProps,i=e.children,u=e.className,l=e.removeScrollBar,f=e.enabled,d=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,p=e.allowPinchZoom,g=e.as,w=g===void 0?"div":g,y=e.gapMode,k=ho(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=m,C=Al([n,t]),P=ce(ce({},k),o);return c.createElement(c.Fragment,null,f&&c.createElement(x,{sideCar:bo,removeScrollBar:l,shards:d,noIsolation:v,inert:b,setCallbacks:s,allowPinchZoom:!!p,lockRef:n,gapMode:y}),a?c.cloneElement(c.Children.only(i),ce(ce({},P),{ref:C})):c.createElement(w,ce({},P,{className:u,ref:C}),i))});yt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},yt.classNames={fullWidth:wt,zeroRight:bt};var _l=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Dl(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=_l();return t&&e.setAttribute("nonce",t),e}function Rl(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ll(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Fl=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Dl())&&(Rl(t,n),Ll(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},$l=function(){var e=Fl();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},wo=function(){var e=$l(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},zl={left:0,top:0,right:0,gap:0},pn=function(e){return parseInt(e||"",10)||0},Wl=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[pn(n),pn(r),pn(o)]},Bl=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zl;var t=Wl(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Vl=wo(),_e="data-scroll-locked",Ul=function(e,t,n,r){var o=e.left,s=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
-
.`.concat(
|
|
1
|
+
(function(R,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],h):(R=typeof globalThis<"u"?globalThis:R||self,h(R["keeper-js-ui"]={},R["react/jsx-runtime"],R.React,R.ReactDOM))})(this,function(R,h,G,Dt){"use strict";function Fn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=Fn(G),rt=Fn(Dt);function de(e,t=[]){let n=[];function r(s,a){const i=c.createContext(a),u=n.length;n=[...n,a];const l=d=>{var w;const{scope:m,children:v,...b}=d,p=((w=m==null?void 0:m[e])==null?void 0:w[u])||i,g=c.useMemo(()=>b,Object.values(b));return h.jsx(p.Provider,{value:g,children:v})};l.displayName=s+"Provider";function f(d,m){var p;const v=((p=m==null?void 0:m[e])==null?void 0:p[u])||i,b=c.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[l,f]}const o=()=>{const s=n.map(a=>c.createContext(a));return function(i){const u=(i==null?void 0:i[e])||s;return c.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return o.scopeName=e,[r,$i(o,...t)]}function $i(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((i,{useScope:u,scopeName:l})=>{const d=u(s)[`__scope${l}`];return{...i,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function H(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var Q=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{};function $n(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ot(...e){return t=>{let n=!1;const r=e.map(o=>{const s=$n(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():$n(e[o],null)}}}}function K(...e){return c.useCallback(ot(...e),e)}var q=c.forwardRef((e,t)=>{const{children:n,...r}=e,o=c.Children.toArray(n),s=o.find(zi);if(s){const a=s.props.children,i=o.map(u=>u===s?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:u);return h.jsx(Rt,{...r,ref:t,children:c.isValidElement(a)?c.cloneElement(a,void 0,i):null})}return h.jsx(Rt,{...r,ref:t,children:n})});q.displayName="Slot";var Rt=c.forwardRef((e,t)=>{const{children:n,...r}=e;if(c.isValidElement(n)){const o=Bi(n);return c.cloneElement(n,{...Wi(r,n.props),ref:t?ot(t,o):o})}return c.Children.count(n)>1?c.Children.only(null):null});Rt.displayName="SlotClone";var zn=({children:e})=>h.jsx(h.Fragment,{children:e});function zi(e){return c.isValidElement(e)&&e.type===zn}function Wi(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{s(...i),o(...i)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Bi(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Vi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Lt=Vi.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?q:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Ft="Avatar",[Ui,$f]=de(Ft),[Gi,Wn]=Ui(Ft),Bn=c.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,s]=c.useState("idle");return h.jsx(Gi,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:s,children:h.jsx(Lt.span,{...r,ref:t})})});Bn.displayName=Ft;var Vn="AvatarImage",Un=c.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...s}=e,a=Wn(Vn,n),i=Ki(r,s.referrerPolicy),u=H(l=>{o(l),a.onImageLoadingStatusChange(l)});return Q(()=>{i!=="idle"&&u(i)},[i,u]),i==="loaded"?h.jsx(Lt.img,{...s,ref:t,src:r}):null});Un.displayName=Vn;var Gn="AvatarFallback",Kn=c.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,s=Wn(Gn,n),[a,i]=c.useState(r===void 0);return c.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(u)}},[r]),a&&s.imageLoadingStatus!=="loaded"?h.jsx(Lt.span,{...o,ref:t}):null});Kn.displayName=Gn;function Ki(e,t){const[n,r]=c.useState("idle");return Q(()=>{if(!e){r("error");return}let o=!0;const s=new window.Image,a=i=>()=>{o&&r(i)};return r("loading"),s.onload=a("loaded"),s.onerror=a("error"),s.src=e,t&&(s.referrerPolicy=t),()=>{o=!1}},[e,t]),n}var Hn=Bn,Yn=Un,Xn=Kn;function qn(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=qn(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Zn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=qn(e))&&(r&&(r+=" "),r+=t);return r}const Qn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Jn=Zn,Le=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Jn(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(l=>{const f=n==null?void 0:n[l],d=s==null?void 0:s[l];if(f===null)return null;const m=Qn(f)||Qn(d);return o[l][m]}),i=n&&Object.entries(n).reduce((l,f)=>{let[d,m]=f;return m===void 0||(l[d]=m),l},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,f)=>{let{class:d,className:m,...v}=f;return Object.entries(v).every(b=>{let[p,g]=b;return Array.isArray(g)?g.includes({...s,...i}[p]):{...s,...i}[p]===g})?[...l,d,m]:l},[]);return Jn(e,a,u,n==null?void 0:n.class,n==null?void 0:n.className)},$t="-",Hi=e=>{const t=Xi(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const i=a.split($t);return i[0]===""&&i.length!==1&&i.shift(),er(i,t)||Yi(a)},getConflictingClassGroupIds:(a,i)=>{const u=n[a]||[];return i&&r[a]?[...u,...r[a]]:u}}},er=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?er(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join($t);return(a=t.validators.find(({validator:i})=>i(s)))==null?void 0:a.classGroupId},tr=/^\[(.+)\]$/,Yi=e=>{if(tr.test(e)){const t=tr.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Xi=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Zi(Object.entries(e.classGroups),n).forEach(([s,a])=>{zt(a,r,s,t)}),r},zt=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:nr(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(qi(o)){zt(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,a])=>{zt(a,nr(t,s),n,r)})})},nr=(e,t)=>{let n=e;return t.split($t).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},qi=e=>e.isThemeGetter,Zi=(e,t)=>t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,i])=>[t+a,i])):s);return[n,o]}):e,Qi=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return o(s,a),a},set(s,a){n.has(s)?n.set(s,a):o(s,a)}}},rr="!",Ji=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,a=i=>{const u=[];let l=0,f=0,d;for(let g=0;g<i.length;g++){let w=i[g];if(l===0){if(w===o&&(r||i.slice(g,g+s)===t)){u.push(i.slice(f,g)),f=g+s;continue}if(w==="/"){d=g;continue}}w==="["?l++:w==="]"&&l--}const m=u.length===0?i:i.substring(f),v=m.startsWith(rr),b=v?m.substring(1):m,p=d&&d>f?d-f:void 0;return{modifiers:u,hasImportantModifier:v,baseClassName:b,maybePostfixModifierPosition:p}};return n?i=>n({className:i,parseClassName:a}):a},ea=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},ta=e=>({cache:Qi(e.cacheSize),parseClassName:Ji(e),...Hi(e)}),na=/\s+/,ra=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],a=e.trim().split(na);let i="";for(let u=a.length-1;u>=0;u-=1){const l=a[u],{modifiers:f,hasImportantModifier:d,baseClassName:m,maybePostfixModifierPosition:v}=n(l);let b=!!v,p=r(b?m.substring(0,v):m);if(!p){if(!b){i=l+(i.length>0?" "+i:i);continue}if(p=r(m),!p){i=l+(i.length>0?" "+i:i);continue}b=!1}const g=ea(f).join(":"),w=d?g+rr:g,y=w+p;if(s.includes(y))continue;s.push(y);const k=o(p,b);for(let x=0;x<k.length;++x){const C=k[x];s.push(w+C)}i=l+(i.length>0?" "+i:i)}return i};function oa(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=or(t))&&(r&&(r+=" "),r+=n);return r}const or=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=or(e[r]))&&(n&&(n+=" "),n+=t);return n};function sr(e,...t){let n,r,o,s=a;function a(u){const l=t.reduce((f,d)=>d(f),e());return n=ta(l),r=n.cache.get,o=n.cache.set,s=i,i(u)}function i(u){const l=r(u);if(l)return l;const f=ra(u,n);return o(u,f),f}return function(){return s(oa.apply(null,arguments))}}const V=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ir=/^\[(?:([a-z-]+):)?(.+)\]$/i,sa=/^\d+\/\d+$/,ia=new Set(["px","full","screen"]),aa=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ca=/\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$/,la=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ua=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,da=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fe=e=>Pe(e)||ia.has(e)||sa.test(e),ge=e=>Ae(e,"length",wa),Pe=e=>!!e&&!Number.isNaN(Number(e)),Wt=e=>Ae(e,"number",Pe),Fe=e=>!!e&&Number.isInteger(Number(e)),fa=e=>e.endsWith("%")&&Pe(e.slice(0,-1)),D=e=>ir.test(e),ve=e=>aa.test(e),pa=new Set(["length","size","percentage"]),ma=e=>Ae(e,pa,ar),ha=e=>Ae(e,"position",ar),ga=new Set(["image","url"]),va=e=>Ae(e,ga,ka),ba=e=>Ae(e,"",ya),$e=()=>!0,Ae=(e,t,n)=>{const r=ir.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},wa=e=>ca.test(e)&&!la.test(e),ar=()=>!1,ya=e=>ua.test(e),ka=e=>da.test(e),cr=()=>{const e=V("colors"),t=V("spacing"),n=V("blur"),r=V("brightness"),o=V("borderColor"),s=V("borderRadius"),a=V("borderSpacing"),i=V("borderWidth"),u=V("contrast"),l=V("grayscale"),f=V("hueRotate"),d=V("invert"),m=V("gap"),v=V("gradientColorStops"),b=V("gradientColorStopPositions"),p=V("inset"),g=V("margin"),w=V("opacity"),y=V("padding"),k=V("saturate"),x=V("scale"),C=V("sepia"),P=V("skew"),E=V("space"),A=V("translate"),O=()=>["auto","contain","none"],I=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",D,t],T=()=>[D,t],F=()=>["",fe,ge],S=()=>["auto",Pe,D],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],_=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",D],W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[Pe,D];return{cacheSize:500,separator:":",theme:{colors:[$e],spacing:[fe,ge],blur:["none","",ve,D],brightness:B(),borderColor:[e],borderRadius:["none","","full",ve,D],borderSpacing:T(),borderWidth:F(),contrast:B(),grayscale:j(),hueRotate:B(),invert:j(),gap:T(),gradientColorStops:[e],gradientColorStopPositions:[fa,ge],inset:L(),margin:L(),opacity:B(),padding:T(),saturate:B(),scale:B(),sepia:j(),skew:B(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",D]}],container:["container"],columns:[{columns:[ve]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"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:[...$(),D]}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Fe,D]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",D]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",Fe,D]}],"grid-cols":[{"grid-cols":[$e]}],"col-start-end":[{col:["auto",{span:["full",Fe,D]},D]}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":[$e]}],"row-start-end":[{row:["auto",{span:[Fe,D]},D]}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",D]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",D]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"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",D,t]}],"min-w":[{"min-w":[D,t,"min","max","fit"]}],"max-w":[{"max-w":[D,t,"none","full","min","max","fit","prose",{screen:[ve]},ve]}],h:[{h:[D,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[D,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[D,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[D,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ve,ge]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Wt]}],"font-family":[{font:[$e]}],"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",D]}],"line-clamp":[{"line-clamp":["none",Pe,Wt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",fe,D]}],"list-image":[{"list-image":["none",D]}],"list-style-type":[{list:["none","disc","decimal",D]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",fe,ge]}],"underline-offset":[{"underline-offset":["auto",fe,D]}],"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:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",D]}],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",D]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),ha]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ma]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},va]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"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:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[..._(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:_()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",..._()]}],"outline-offset":[{"outline-offset":[fe,D]}],"outline-w":[{outline:[fe,ge]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[fe,ge]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ve,ba]}],"shadow-color":[{shadow:[$e]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",ve,D]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[k]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[k]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",D]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",D]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",D]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Fe,D]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",D]}],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",D]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",D]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[fe,ge,Wt]}],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"]}}},xa=(e,{cacheSize:t,prefix:n,separator:r,experimentalParseClassName:o,extend:s={},override:a={}})=>{ze(e,"cacheSize",t),ze(e,"prefix",n),ze(e,"separator",r),ze(e,"experimentalParseClassName",o);for(const i in a)Ca(e[i],a[i]);for(const i in s)Ea(e[i],s[i]);return e},ze=(e,t,n)=>{n!==void 0&&(e[t]=n)},Ca=(e,t)=>{if(t)for(const n in t)ze(e,n,t[n])},Ea=(e,t)=>{if(t)for(const n in t){const r=t[n];r!==void 0&&(e[n]=(e[n]||[]).concat(r))}},Sa=((e,...t)=>typeof e=="function"?sr(cr,e,...t):sr(()=>xa(cr(),e),...t))({prefix:"ksjsui-"});function U(...e){return Sa(Zn(e))}const lr=["#E60060","#ED0C0C","#B20000","#CC4400","#558000","#008A22","#006600","#004C40","#008099","#0059B2","#0070F0","#0022FF","#6619FF","#9900E5","#747474","#191919"],ja=Le(["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"}}),ur=c.forwardRef(({className:e,size:t,...n},r)=>h.jsx(Hn,{ref:r,className:U(ja({size:t,className:e})),...n}));ur.displayName=Hn.displayName;const dr=c.forwardRef(({className:e,...t},n)=>h.jsx(Yn,{ref:n,className:U("ksjsui-aspect-square ksjsui-size-full",e),...t}));dr.displayName=Yn.displayName;const fr=c.forwardRef(({className:e,...t},n)=>{var r;return h.jsx(Xn,{ref:n,className:U("ksjsui-flex ksjsui-size-full ksjsui-items-center ksjsui-justify-center ksjsui-rounded-full ksjsui-bg-muted",e),style:{...Pa((r=t.children)==null?void 0:r.toString(),lr)},...t})});fr.displayName=Xn.displayName;function Pa(e="",t=lr){const n=e.substring(0,2),r=Aa(n)%t.length,o=t[r],s=Ta(o);return{backgroundColor:o,color:s}}function Aa(e){const t=e.substring(0,2);return t.split("").reduce((r,o,s)=>r+t.charCodeAt(s),0)}function Ta(e){return e==="#fff"?"#000":"#fff"}const Ma=Le(["ksjsui-inline-flex ksjsui-items-center ksjsui-justify-center ksjsui-whitespace-nowrap ksjsui-border ksjsui-border-transparent ksjsui-p-2 ksjsui-text-base ksjsui-font-medium 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"},color:{neutral:"",primary:"",secondary:"",destructive:""},fullWidth:{true:"ksjsui-w-full"},avatar:{true:"ksjsui-p-0"},iconOnly:{true:""},radius:{md:"ksjsui-rounded-lg",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:void 0,radius:"md",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"},{avatar:!0,size:"sm",className:"ksjsui-size-8 ksjsui-rounded-full ksjsui-border-0"},{avatar:!0,size:"md",className:"ksjsui-size-9 ksjsui-rounded-full ksjsui-border-0"},{avatar:!0,size:"lg",className:"ksjsui-size-10 ksjsui-rounded-full ksjsui-border-0"},{iconOnly:!0,size:"sm",className:"ksjsui-w-8"},{iconOnly:!0,size:"md",className:"ksjsui-w-9"},{iconOnly:!0,size:"lg",className:"ksjsui-w-10"}]}),Bt=c.forwardRef(({className:e,endContent:t,startContent:n,variant:r,color:o,fullWidth:s,avatar:a,iconOnly:i,radius:u,size:l,asChild:f,children:d,tabIndex:m=0,...v},b)=>{const p=f?q:"button";return h.jsxs(p,{className:U(Ma({variant:r,color:o,fullWidth:s,avatar:a,iconOnly:i,radius:u,size:l,className:e})),ref:b,tabIndex:m,...v,children:[n&&h.jsx("span",{className:"ksjsui-me-2",children:n}),h.jsx(zn,{children:d}),t&&h.jsx("span",{className:"ksjsui-ms-2",children:t})]})});Bt.displayName="Button";function M(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function We({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Na({defaultProp:t,onChange:n}),s=e!==void 0,a=s?e:r,i=H(n),u=c.useCallback(l=>{if(s){const d=typeof l=="function"?l(e):l;d!==e&&i(d)}else o(l)},[s,e,o,i]);return[a,u]}function Na({defaultProp:e,onChange:t}){const n=c.useState(e),[r]=n,o=c.useRef(r),s=H(t);return c.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var Oa=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],X=Oa.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?q:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function pr(e,t){e&&rt.flushSync(()=>e.dispatchEvent(t))}function mr(e){const t=e+"CollectionProvider",[n,r]=de(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:p}=v,g=G.useRef(null),w=G.useRef(new Map).current;return h.jsx(o,{scope:b,itemMap:w,collectionRef:g,children:p})};a.displayName=t;const i=e+"CollectionSlot",u=G.forwardRef((v,b)=>{const{scope:p,children:g}=v,w=s(i,p),y=K(b,w.collectionRef);return h.jsx(q,{ref:y,children:g})});u.displayName=i;const l=e+"CollectionItemSlot",f="data-radix-collection-item",d=G.forwardRef((v,b)=>{const{scope:p,children:g,...w}=v,y=G.useRef(null),k=K(b,y),x=s(l,p);return G.useEffect(()=>(x.itemMap.set(y,{ref:y,...w}),()=>void x.itemMap.delete(y))),h.jsx(q,{[f]:"",ref:k,children:g})});d.displayName=l;function m(v){const b=s(e+"CollectionConsumer",v);return G.useCallback(()=>{const g=b.collectionRef.current;if(!g)return[];const w=Array.from(g.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((x,C)=>w.indexOf(x.ref.current)-w.indexOf(C.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:u,ItemSlot:d},m,r]}var hr=c.createContext(void 0),Ia=e=>{const{dir:t,children:n}=e;return h.jsx(hr.Provider,{value:t,children:n})};function gr(e){const t=c.useContext(hr);return e||t||"ltr"}function vr(e,t=globalThis==null?void 0:globalThis.document){const n=H(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var _a="DismissableLayer",Vt="dismissableLayer.update",Da="dismissableLayer.pointerDownOutside",Ra="dismissableLayer.focusOutside",br,wr=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yr=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...u}=e,l=c.useContext(wr),[f,d]=c.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=c.useState({}),b=K(t,E=>d(E)),p=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=p.indexOf(g),y=f?p.indexOf(f):-1,k=l.layersWithOutsidePointerEventsDisabled.size>0,x=y>=w,C=$a(E=>{const A=E.target,O=[...l.branches].some(I=>I.contains(A));!x||O||(o==null||o(E),a==null||a(E),E.defaultPrevented||i==null||i())},m),P=za(E=>{const A=E.target;[...l.branches].some(I=>I.contains(A))||(s==null||s(E),a==null||a(E),E.defaultPrevented||i==null||i())},m);return vr(E=>{y===l.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},m),c.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(br=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),kr(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=br)}},[f,m,n,l]),c.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),kr())},[f,l]),c.useEffect(()=>{const E=()=>v({});return document.addEventListener(Vt,E),()=>document.removeEventListener(Vt,E)},[]),h.jsx(X.div,{...u,ref:b,style:{pointerEvents:k?x?"auto":"none":void 0,...e.style},onFocusCapture:M(e.onFocusCapture,P.onFocusCapture),onBlurCapture:M(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:M(e.onPointerDownCapture,C.onPointerDownCapture)})});yr.displayName=_a;var La="DismissableLayerBranch",Fa=c.forwardRef((e,t)=>{const n=c.useContext(wr),r=c.useRef(null),o=K(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),h.jsx(X.div,{...e,ref:o})});Fa.displayName=La;function $a(e,t=globalThis==null?void 0:globalThis.document){const n=H(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let u=function(){xr(Da,n,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function za(e,t=globalThis==null?void 0:globalThis.document){const n=H(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&xr(Ra,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function kr(){const e=new CustomEvent(Vt);document.dispatchEvent(e)}function xr(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?pr(o,s):o.dispatchEvent(s)}var Ut=0;function Wa(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Cr()),document.body.insertAdjacentElement("beforeend",e[1]??Cr()),Ut++,()=>{Ut===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ut--}},[])}function Cr(){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 Gt="focusScope.autoFocusOnMount",Kt="focusScope.autoFocusOnUnmount",Er={bubbles:!1,cancelable:!0},Ba="FocusScope",Sr=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,u]=c.useState(null),l=H(o),f=H(s),d=c.useRef(null),m=K(t,p=>u(p)),v=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let p=function(k){if(v.paused||!i)return;const x=k.target;i.contains(x)?d.current=x:be(d.current,{select:!0})},g=function(k){if(v.paused||!i)return;const x=k.relatedTarget;x!==null&&(i.contains(x)||be(d.current,{select:!0}))},w=function(k){if(document.activeElement===document.body)for(const C of k)C.removedNodes.length>0&&be(i)};document.addEventListener("focusin",p),document.addEventListener("focusout",g);const y=new MutationObserver(w);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",g),y.disconnect()}}},[r,i,v.paused]),c.useEffect(()=>{if(i){Ar.add(v);const p=document.activeElement;if(!i.contains(p)){const w=new CustomEvent(Gt,Er);i.addEventListener(Gt,l),i.dispatchEvent(w),w.defaultPrevented||(Va(Ya(jr(i)),{select:!0}),document.activeElement===p&&be(i))}return()=>{i.removeEventListener(Gt,l),setTimeout(()=>{const w=new CustomEvent(Kt,Er);i.addEventListener(Kt,f),i.dispatchEvent(w),w.defaultPrevented||be(p??document.body,{select:!0}),i.removeEventListener(Kt,f),Ar.remove(v)},0)}}},[i,l,f,v]);const b=c.useCallback(p=>{if(!n&&!r||v.paused)return;const g=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,w=document.activeElement;if(g&&w){const y=p.currentTarget,[k,x]=Ua(y);k&&x?!p.shiftKey&&w===x?(p.preventDefault(),n&&be(k,{select:!0})):p.shiftKey&&w===k&&(p.preventDefault(),n&&be(x,{select:!0})):w===y&&p.preventDefault()}},[n,r,v.paused]);return h.jsx(X.div,{tabIndex:-1,...a,ref:m,onKeyDown:b})});Sr.displayName=Ba;function Va(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(be(r,{select:t}),document.activeElement!==n)return}function Ua(e){const t=jr(e),n=Pr(t,e),r=Pr(t.reverse(),e);return[n,r]}function jr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Pr(e,t){for(const n of e)if(!Ga(n,{upTo:t}))return n}function Ga(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 Ka(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&&Ka(e)&&t&&e.select()}}var Ar=Ha();function Ha(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Tr(e,t),e.unshift(t)},remove(t){var n;e=Tr(e,t),(n=e[0])==null||n.resume()}}}function Tr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ya(e){return e.filter(t=>t.tagName!=="A")}var Xa=c.useId||(()=>{}),qa=0;function Be(e){const[t,n]=c.useState(Xa());return Q(()=>{e||n(r=>r??String(qa++))},[e]),e||(t?`radix-${t}`:"")}const Za=["top","right","bottom","left"],we=Math.min,J=Math.max,st=Math.round,it=Math.floor,se=e=>({x:e,y:e}),Qa={left:"right",right:"left",bottom:"top",top:"bottom"},Ja={start:"end",end:"start"};function Ht(e,t,n){return J(e,we(t,n))}function pe(e,t){return typeof e=="function"?e(t):e}function me(e){return e.split("-")[0]}function Te(e){return e.split("-")[1]}function Yt(e){return e==="x"?"y":"x"}function Xt(e){return e==="y"?"height":"width"}function ye(e){return["top","bottom"].includes(me(e))?"y":"x"}function qt(e){return Yt(ye(e))}function ec(e,t,n){n===void 0&&(n=!1);const r=Te(e),o=qt(e),s=Xt(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=at(a)),[a,at(a)]}function tc(e){const t=at(e);return[Zt(e),t,Zt(t)]}function Zt(e){return e.replace(/start|end/g,t=>Ja[t])}function nc(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:a;default:return[]}}function rc(e,t,n,r){const o=Te(e);let s=nc(me(e),n==="start",r);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(Zt)))),s}function at(e){return e.replace(/left|right|bottom|top/g,t=>Qa[t])}function oc(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mr(e){return typeof e!="number"?oc(e):{top:e,right:e,bottom:e,left:e}}function ct(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Nr(e,t,n){let{reference:r,floating:o}=e;const s=ye(t),a=qt(t),i=Xt(a),u=me(t),l=s==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,m=r[i]/2-o[i]/2;let v;switch(u){case"top":v={x:f,y:r.y-o.height};break;case"bottom":v={x:f,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:d};break;case"left":v={x:r.x-o.width,y:d};break;default:v={x:r.x,y:r.y}}switch(Te(t)){case"start":v[a]-=m*(n&&l?-1:1);break;case"end":v[a]+=m*(n&&l?-1:1);break}return v}const sc=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:a}=n,i=s.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=Nr(l,r,u),m=r,v={},b=0;for(let p=0;p<i.length;p++){const{name:g,fn:w}=i[p],{x:y,y:k,data:x,reset:C}=await w({x:f,y:d,initialPlacement:r,placement:m,strategy:o,middlewareData:v,rects:l,platform:a,elements:{reference:e,floating:t}});f=y??f,d=k??d,v={...v,[g]:{...v[g],...x}},C&&b<=50&&(b++,typeof C=="object"&&(C.placement&&(m=C.placement),C.rects&&(l=C.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:f,y:d}=Nr(l,m,u)),p=-1)}return{x:f,y:d,placement:m,strategy:o,middlewareData:v}};async function Ve(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:a,elements:i,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:m=!1,padding:v=0}=pe(t,e),b=Mr(v),g=i[m?d==="floating"?"reference":"floating":d],w=ct(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(i.floating)),boundary:l,rootBoundary:f,strategy:u})),y=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),x=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},C=ct(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:k,strategy:u}):y);return{top:(w.top-C.top+b.top)/x.y,bottom:(C.bottom-w.bottom+b.bottom)/x.y,left:(w.left-C.left+b.left)/x.x,right:(C.right-w.right+b.right)/x.x}}const ic=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:a,elements:i,middlewareData:u}=t,{element:l,padding:f=0}=pe(e,t)||{};if(l==null)return{};const d=Mr(f),m={x:n,y:r},v=qt(o),b=Xt(v),p=await a.getDimensions(l),g=v==="y",w=g?"top":"left",y=g?"bottom":"right",k=g?"clientHeight":"clientWidth",x=s.reference[b]+s.reference[v]-m[v]-s.floating[b],C=m[v]-s.reference[v],P=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let E=P?P[k]:0;(!E||!await(a.isElement==null?void 0:a.isElement(P)))&&(E=i.floating[k]||s.floating[b]);const A=x/2-C/2,O=E/2-p[b]/2-1,I=we(d[w],O),L=we(d[y],O),T=I,F=E-p[b]-L,S=E/2-p[b]/2+A,$=Ht(T,S,F),_=!u.arrow&&Te(o)!=null&&S!==$&&s.reference[b]/2-(S<T?I:L)-p[b]/2<0,z=_?S<T?S-T:S-F:0;return{[v]:m[v]+z,data:{[v]:$,centerOffset:S-$-z,..._&&{alignmentOffset:z}},reset:_}}}),ac=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:u,elements:l}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:p=!0,...g}=pe(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=me(o),y=ye(i),k=me(i)===i,x=await(u.isRTL==null?void 0:u.isRTL(l.floating)),C=m||(k||!p?[at(i)]:tc(i)),P=b!=="none";!m&&P&&C.push(...rc(i,p,b,x));const E=[i,...C],A=await Ve(t,g),O=[];let I=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&O.push(A[w]),d){const S=ec(o,a,x);O.push(A[S[0]],A[S[1]])}if(I=[...I,{placement:o,overflows:O}],!O.every(S=>S<=0)){var L,T;const S=(((L=s.flip)==null?void 0:L.index)||0)+1,$=E[S];if($)return{data:{index:S,overflows:I},reset:{placement:$}};let _=(T=I.filter(z=>z.overflows[0]<=0).sort((z,N)=>z.overflows[1]-N.overflows[1])[0])==null?void 0:T.placement;if(!_)switch(v){case"bestFit":{var F;const z=(F=I.filter(N=>{if(P){const j=ye(N.placement);return j===y||j==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(j=>j>0).reduce((j,W)=>j+W,0)]).sort((N,j)=>N[1]-j[1])[0])==null?void 0:F[0];z&&(_=z);break}case"initialPlacement":_=i;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function Or(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ir(e){return Za.some(t=>e[t]>=0)}const cc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=pe(e,t);switch(r){case"referenceHidden":{const s=await Ve(t,{...o,elementContext:"reference"}),a=Or(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Ir(a)}}}case"escaped":{const s=await Ve(t,{...o,altBoundary:!0}),a=Or(s,n.floating);return{data:{escapedOffsets:a,escaped:Ir(a)}}}default:return{}}}}};async function lc(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=me(n),i=Te(n),u=ye(n)==="y",l=["left","top"].includes(a)?-1:1,f=s&&u?-1:1,d=pe(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof b=="number"&&(v=i==="end"?b*-1:b),u?{x:v*f,y:m*l}:{x:m*l,y:v*f}}const uc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:a,middlewareData:i}=t,u=await lc(t,e);return a===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:s+u.y,data:{...u,placement:a}}}}},dc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:g=>{let{x:w,y}=g;return{x:w,y}}},...u}=pe(e,t),l={x:n,y:r},f=await Ve(t,u),d=ye(me(o)),m=Yt(d);let v=l[m],b=l[d];if(s){const g=m==="y"?"top":"left",w=m==="y"?"bottom":"right",y=v+f[g],k=v-f[w];v=Ht(y,v,k)}if(a){const g=d==="y"?"top":"left",w=d==="y"?"bottom":"right",y=b+f[g],k=b-f[w];b=Ht(y,b,k)}const p=i.fn({...t,[m]:v,[d]:b});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[m]:s,[d]:a}}}}}},fc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:u=!0,crossAxis:l=!0}=pe(e,t),f={x:n,y:r},d=ye(o),m=Yt(d);let v=f[m],b=f[d];const p=pe(i,t),g=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(u){const k=m==="y"?"height":"width",x=s.reference[m]-s.floating[k]+g.mainAxis,C=s.reference[m]+s.reference[k]-g.mainAxis;v<x?v=x:v>C&&(v=C)}if(l){var w,y;const k=m==="y"?"width":"height",x=["top","left"].includes(me(o)),C=s.reference[d]-s.floating[k]+(x&&((w=a.offset)==null?void 0:w[d])||0)+(x?0:g.crossAxis),P=s.reference[d]+s.reference[k]+(x?0:((y=a.offset)==null?void 0:y[d])||0)-(x?g.crossAxis:0);b<C?b=C:b>P&&(b=P)}return{[m]:v,[d]:b}}}},pc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:a,elements:i}=t,{apply:u=()=>{},...l}=pe(e,t),f=await Ve(t,l),d=me(o),m=Te(o),v=ye(o)==="y",{width:b,height:p}=s.floating;let g,w;d==="top"||d==="bottom"?(g=d,w=m===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(w=d,g=m==="end"?"top":"bottom");const y=p-f.top-f.bottom,k=b-f.left-f.right,x=we(p-f[g],y),C=we(b-f[w],k),P=!t.middlewareData.shift;let E=x,A=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=y),P&&!m){const I=J(f.left,0),L=J(f.right,0),T=J(f.top,0),F=J(f.bottom,0);v?A=b-2*(I!==0||L!==0?I+L:J(f.left,f.right)):E=p-2*(T!==0||F!==0?T+F:J(f.top,f.bottom))}await u({...t,availableWidth:A,availableHeight:E});const O=await a.getDimensions(i.floating);return b!==O.width||p!==O.height?{reset:{rects:!0}}:{}}}};function lt(){return typeof window<"u"}function Me(e){return _r(e)?(e.nodeName||"").toLowerCase():"#document"}function ee(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ie(e){var t;return(t=(_r(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _r(e){return lt()?e instanceof Node||e instanceof ee(e).Node:!1}function re(e){return lt()?e instanceof Element||e instanceof ee(e).Element:!1}function ae(e){return lt()?e instanceof HTMLElement||e instanceof ee(e).HTMLElement:!1}function Dr(e){return!lt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ee(e).ShadowRoot}function Ue(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=oe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function mc(e){return["table","td","th"].includes(Me(e))}function ut(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Qt(e){const t=Jt(),n=re(e)?oe(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function hc(e){let t=ke(e);for(;ae(t)&&!Ne(t);){if(Qt(t))return t;if(ut(t))return null;t=ke(t)}return null}function Jt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ne(e){return["html","body","#document"].includes(Me(e))}function oe(e){return ee(e).getComputedStyle(e)}function dt(e){return re(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ke(e){if(Me(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Dr(e)&&e.host||ie(e);return Dr(t)?t.host:t}function Rr(e){const t=ke(e);return Ne(t)?e.ownerDocument?e.ownerDocument.body:e.body:ae(t)&&Ue(t)?t:Rr(t)}function Ge(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Rr(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=ee(o);if(s){const i=en(a);return t.concat(a,a.visualViewport||[],Ue(o)?o:[],i&&n?Ge(i):[])}return t.concat(o,Ge(o,[],n))}function en(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lr(e){const t=oe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ae(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=st(n)!==s||st(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function tn(e){return re(e)?e:e.contextElement}function Oe(e){const t=tn(e);if(!ae(t))return se(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Lr(t);let a=(s?st(n.width):n.width)/r,i=(s?st(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const gc=se(0);function Fr(e){const t=ee(e);return!Jt()||!t.visualViewport?gc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vc(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ee(e)?!1:t}function Ee(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=tn(e);let a=se(1);t&&(r?re(r)&&(a=Oe(r)):a=Oe(e));const i=vc(s,n,r)?Fr(s):se(0);let u=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,f=o.width/a.x,d=o.height/a.y;if(s){const m=ee(s),v=r&&re(r)?ee(r):r;let b=m,p=en(b);for(;p&&r&&v!==b;){const g=Oe(p),w=p.getBoundingClientRect(),y=oe(p),k=w.left+(p.clientLeft+parseFloat(y.paddingLeft))*g.x,x=w.top+(p.clientTop+parseFloat(y.paddingTop))*g.y;u*=g.x,l*=g.y,f*=g.x,d*=g.y,u+=k,l+=x,b=ee(p),p=en(b)}}return ct({width:f,height:d,x:u,y:l})}function nn(e,t){const n=dt(e).scrollLeft;return t?t.left+n:Ee(ie(e)).left+n}function $r(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:nn(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function bc(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",a=ie(r),i=t?ut(t.floating):!1;if(r===a||i&&s)return n;let u={scrollLeft:0,scrollTop:0},l=se(1);const f=se(0),d=ae(r);if((d||!d&&!s)&&((Me(r)!=="body"||Ue(a))&&(u=dt(r)),ae(r))){const v=Ee(r);l=Oe(r),f.x=v.x+r.clientLeft,f.y=v.y+r.clientTop}const m=a&&!d&&!s?$r(a,u,!0):se(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+f.x+m.x,y:n.y*l.y-u.scrollTop*l.y+f.y+m.y}}function wc(e){return Array.from(e.getClientRects())}function yc(e){const t=ie(e),n=dt(e),r=e.ownerDocument.body,o=J(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=J(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+nn(e);const i=-n.scrollTop;return oe(r).direction==="rtl"&&(a+=J(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:i}}function kc(e,t){const n=ee(e),r=ie(e),o=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,i=0,u=0;if(o){s=o.width,a=o.height;const l=Jt();(!l||l&&t==="fixed")&&(i=o.offsetLeft,u=o.offsetTop)}return{width:s,height:a,x:i,y:u}}function xc(e,t){const n=Ee(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ae(e)?Oe(e):se(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,u=o*s.x,l=r*s.y;return{width:a,height:i,x:u,y:l}}function zr(e,t,n){let r;if(t==="viewport")r=kc(e,n);else if(t==="document")r=yc(ie(e));else if(re(t))r=xc(t,n);else{const o=Fr(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ct(r)}function Wr(e,t){const n=ke(e);return n===t||!re(n)||Ne(n)?!1:oe(n).position==="fixed"||Wr(n,t)}function Cc(e,t){const n=t.get(e);if(n)return n;let r=Ge(e,[],!1).filter(i=>re(i)&&Me(i)!=="body"),o=null;const s=oe(e).position==="fixed";let a=s?ke(e):e;for(;re(a)&&!Ne(a);){const i=oe(a),u=Qt(a);!u&&i.position==="fixed"&&(o=null),(s?!u&&!o:!u&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ue(a)&&!u&&Wr(e,a))?r=r.filter(f=>f!==a):o=i,a=ke(a)}return t.set(e,r),r}function Ec(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?ut(t)?[]:Cc(t,this._c):[].concat(n),r],i=a[0],u=a.reduce((l,f)=>{const d=zr(t,f,o);return l.top=J(d.top,l.top),l.right=we(d.right,l.right),l.bottom=we(d.bottom,l.bottom),l.left=J(d.left,l.left),l},zr(t,i,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Sc(e){const{width:t,height:n}=Lr(e);return{width:t,height:n}}function jc(e,t,n){const r=ae(t),o=ie(t),s=n==="fixed",a=Ee(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const u=se(0);if(r||!r&&!s)if((Me(t)!=="body"||Ue(o))&&(i=dt(t)),r){const m=Ee(t,!0,s,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else o&&(u.x=nn(o));const l=o&&!r&&!s?$r(o,i):se(0),f=a.left+i.scrollLeft-u.x-l.x,d=a.top+i.scrollTop-u.y-l.y;return{x:f,y:d,width:a.width,height:a.height}}function rn(e){return oe(e).position==="static"}function Br(e,t){if(!ae(e)||oe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ie(e)===n&&(n=n.ownerDocument.body),n}function Vr(e,t){const n=ee(e);if(ut(e))return n;if(!ae(e)){let o=ke(e);for(;o&&!Ne(o);){if(re(o)&&!rn(o))return o;o=ke(o)}return n}let r=Br(e,t);for(;r&&mc(r)&&rn(r);)r=Br(r,t);return r&&Ne(r)&&rn(r)&&!Qt(r)?n:r||hc(e)||n}const Pc=async function(e){const t=this.getOffsetParent||Vr,n=this.getDimensions,r=await n(e.floating);return{reference:jc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ac(e){return oe(e).direction==="rtl"}const Tc={convertOffsetParentRelativeRectToViewportRelativeRect:bc,getDocumentElement:ie,getClippingRect:Ec,getOffsetParent:Vr,getElementRects:Pc,getClientRects:wc,getDimensions:Sc,getScale:Oe,isElement:re,isRTL:Ac};function Ur(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Mc(e,t){let n=null,r;const o=ie(e);function s(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,u){i===void 0&&(i=!1),u===void 0&&(u=1),s();const l=e.getBoundingClientRect(),{left:f,top:d,width:m,height:v}=l;if(i||t(),!m||!v)return;const b=it(d),p=it(o.clientWidth-(f+m)),g=it(o.clientHeight-(d+v)),w=it(f),k={rootMargin:-b+"px "+-p+"px "+-g+"px "+-w+"px",threshold:J(0,we(1,u))||1};let x=!0;function C(P){const E=P[0].intersectionRatio;if(E!==u){if(!x)return a();E?a(!1,E):r=setTimeout(()=>{a(!1,1e-7)},1e3)}E===1&&!Ur(l,e.getBoundingClientRect())&&a(),x=!1}try{n=new IntersectionObserver(C,{...k,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,k)}n.observe(e)}return a(!0),s}function Nc(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=tn(e),f=o||s?[...l?Ge(l):[],...Ge(t)]:[];f.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const d=l&&i?Mc(l,n):null;let m=-1,v=null;a&&(v=new ResizeObserver(w=>{let[y]=w;y&&y.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var k;(k=v)==null||k.observe(t)})),n()}),l&&!u&&v.observe(l),v.observe(t));let b,p=u?Ee(e):null;u&&g();function g(){const w=Ee(e);p&&!Ur(p,w)&&n(),p=w,b=requestAnimationFrame(g)}return n(),()=>{var w;f.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),d==null||d(),(w=v)==null||w.disconnect(),v=null,u&&cancelAnimationFrame(b)}}const Oc=uc,Ic=dc,_c=ac,Dc=pc,Rc=cc,Gr=ic,Lc=fc,Fc=(e,t,n)=>{const r=new Map,o={platform:Tc,...n},s={...o.platform,_c:r};return sc(e,t,{...o,platform:s})};var ft=typeof document<"u"?G.useLayoutEffect:G.useEffect;function pt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!pt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!pt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Kr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Hr(e,t){const n=Kr(e);return Math.round(t*n)/n}function on(e){const t=c.useRef(e);return ft(()=>{t.current=e}),t}function $c(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:u,open:l}=e,[f,d]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=c.useState(r);pt(m,r)||v(r);const[b,p]=c.useState(null),[g,w]=c.useState(null),y=c.useCallback(N=>{N!==P.current&&(P.current=N,p(N))},[]),k=c.useCallback(N=>{N!==E.current&&(E.current=N,w(N))},[]),x=s||b,C=a||g,P=c.useRef(null),E=c.useRef(null),A=c.useRef(f),O=u!=null,I=on(u),L=on(o),T=on(l),F=c.useCallback(()=>{if(!P.current||!E.current)return;const N={placement:t,strategy:n,middleware:m};L.current&&(N.platform=L.current),Fc(P.current,E.current,N).then(j=>{const W={...j,isPositioned:T.current!==!1};S.current&&!pt(A.current,W)&&(A.current=W,rt.flushSync(()=>{d(W)}))})},[m,t,n,L,T]);ft(()=>{l===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(N=>({...N,isPositioned:!1})))},[l]);const S=c.useRef(!1);ft(()=>(S.current=!0,()=>{S.current=!1}),[]),ft(()=>{if(x&&(P.current=x),C&&(E.current=C),x&&C){if(I.current)return I.current(x,C,F);F()}},[x,C,F,I,O]);const $=c.useMemo(()=>({reference:P,floating:E,setReference:y,setFloating:k}),[y,k]),_=c.useMemo(()=>({reference:x,floating:C}),[x,C]),z=c.useMemo(()=>{const N={position:n,left:0,top:0};if(!_.floating)return N;const j=Hr(_.floating,f.x),W=Hr(_.floating,f.y);return i?{...N,transform:"translate("+j+"px, "+W+"px)",...Kr(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:W}},[n,i,_.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:F,refs:$,elements:_,floatingStyles:z}),[f,F,$,_,z])}const zc=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Gr({element:r.current,padding:o}).fn(n):{}:r?Gr({element:r,padding:o}).fn(n):{}}}},Wc=(e,t)=>({...Oc(e),options:[e,t]}),Bc=(e,t)=>({...Ic(e),options:[e,t]}),Vc=(e,t)=>({...Lc(e),options:[e,t]}),Uc=(e,t)=>({..._c(e),options:[e,t]}),Gc=(e,t)=>({...Dc(e),options:[e,t]}),Kc=(e,t)=>({...Rc(e),options:[e,t]}),Hc=(e,t)=>({...zc(e),options:[e,t]});var Yc="Arrow",Yr=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return h.jsx(X.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});Yr.displayName=Yc;var Xc=Yr;function Xr(e){const[t,n]=c.useState(void 0);return Q(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const u=s.borderBoxSize,l=Array.isArray(u)?u[0]:u;a=l.inlineSize,i=l.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var sn="Popper",[qr,Zr]=de(sn),[qc,Qr]=qr(sn),Jr=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return h.jsx(qc,{scope:t,anchor:r,onAnchorChange:o,children:n})};Jr.displayName=sn;var eo="PopperAnchor",to=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Qr(eo,n),a=c.useRef(null),i=K(t,a);return c.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:h.jsx(X.div,{...o,ref:i})});to.displayName=eo;var an="PopperContent",[Zc,Qc]=qr(an),no=c.forwardRef((e,t)=>{var he,et,ne,tt,Ri,Li;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:b,...p}=e,g=Qr(an,n),[w,y]=c.useState(null),k=K(t,nt=>y(nt)),[x,C]=c.useState(null),P=Xr(x),E=(P==null?void 0:P.width)??0,A=(P==null?void 0:P.height)??0,O=r+(s!=="center"?"-"+s:""),I=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},L=Array.isArray(l)?l:[l],T=L.length>0,F={padding:I,boundary:L.filter(el),altBoundary:T},{refs:S,floatingStyles:$,placement:_,isPositioned:z,middlewareData:N}=$c({strategy:"fixed",placement:O,whileElementsMounted:(...nt)=>Nc(...nt,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[Wc({mainAxis:o+A,alignmentAxis:a}),u&&Bc({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Vc():void 0,...F}),u&&Uc({...F}),Gc({...F,apply:({elements:nt,rects:Fi,availableWidth:Df,availableHeight:Rf})=>{const{width:Lf,height:Ff}=Fi.reference,_t=nt.floating.style;_t.setProperty("--radix-popper-available-width",`${Df}px`),_t.setProperty("--radix-popper-available-height",`${Rf}px`),_t.setProperty("--radix-popper-anchor-width",`${Lf}px`),_t.setProperty("--radix-popper-anchor-height",`${Ff}px`)}}),x&&Hc({element:x,padding:i}),tl({arrowWidth:E,arrowHeight:A}),m&&Kc({strategy:"referenceHidden",...F})]}),[j,W]=so(_),B=H(b);Q(()=>{z&&(B==null||B())},[z,B]);const Z=(he=N.arrow)==null?void 0:he.x,ue=(et=N.arrow)==null?void 0:et.y,Ce=((ne=N.arrow)==null?void 0:ne.centerOffset)!==0,[It,je]=c.useState();return Q(()=>{w&&je(window.getComputedStyle(w).zIndex)},[w]),h.jsx("div",{ref:S.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:z?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:It,"--radix-popper-transform-origin":[(tt=N.transformOrigin)==null?void 0:tt.x,(Ri=N.transformOrigin)==null?void 0:Ri.y].join(" "),...((Li=N.hide)==null?void 0:Li.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:h.jsx(Zc,{scope:n,placedSide:j,onArrowChange:C,arrowX:Z,arrowY:ue,shouldHideArrow:Ce,children:h.jsx(X.div,{"data-side":j,"data-align":W,...p,ref:k,style:{...p.style,animation:z?void 0:"none"}})})})});no.displayName=an;var ro="PopperArrow",Jc={top:"bottom",right:"left",bottom:"top",left:"right"},oo=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Qc(ro,r),a=Jc[s.placedSide];return h.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]: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:h.jsx(Xc,{...o,ref:n,style:{...o.style,display:"block"}})})});oo.displayName=ro;function el(e){return e!==null}var tl=e=>({name:"transformOrigin",options:e,fn(t){var g,w,y;const{placement:n,rects:r,middlewareData:o}=t,a=((g=o.arrow)==null?void 0:g.centerOffset)!==0,i=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[l,f]=so(n),d={start:"0%",center:"50%",end:"100%"}[f],m=(((w=o.arrow)==null?void 0:w.x)??0)+i/2,v=(((y=o.arrow)==null?void 0:y.y)??0)+u/2;let b="",p="";return l==="bottom"?(b=a?d:`${m}px`,p=`${-u}px`):l==="top"?(b=a?d:`${m}px`,p=`${r.floating.height+u}px`):l==="right"?(b=`${-u}px`,p=a?d:`${v}px`):l==="left"&&(b=`${r.floating.width+u}px`,p=a?d:`${v}px`),{data:{x:b,y:p}}}});function so(e){const[t,n="center"]=e.split("-");return[t,n]}var io=Jr,nl=to,rl=no,ol=oo,sl="Portal",ao=c.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,s]=c.useState(!1);Q(()=>s(!0),[]);const a=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?Dt.createPortal(h.jsx(X.div,{...r,ref:t}),a):null});ao.displayName=sl;function il(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var Ke=e=>{const{present:t,children:n}=e,r=al(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=K(r.ref,cl(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};Ke.displayName="Presence";function al(e){const[t,n]=c.useState(),r=c.useRef({}),o=c.useRef(e),s=c.useRef("none"),a=e?"mounted":"unmounted",[i,u]=il(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const l=mt(r.current);s.current=i==="mounted"?l:"none"},[i]),Q(()=>{const l=r.current,f=o.current;if(f!==e){const m=s.current,v=mt(l);e?u("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(f&&m!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Q(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,d=v=>{const p=mt(r.current).includes(v.animationName);if(v.target===t&&p&&(u("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(s.current=mt(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function mt(e){return(e==null?void 0:e.animationName)||"none"}function cl(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var cn="rovingFocusGroup.onEntryFocus",ll={bubbles:!1,cancelable:!0},ht="RovingFocusGroup",[ln,co,ul]=mr(ht),[dl,lo]=de(ht,[ul]),[fl,pl]=dl(ht),uo=c.forwardRef((e,t)=>h.jsx(ln.Provider,{scope:e.__scopeRovingFocusGroup,children:h.jsx(ln.Slot,{scope:e.__scopeRovingFocusGroup,children:h.jsx(ml,{...e,ref:t})})}));uo.displayName=ht;var ml=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:f=!1,...d}=e,m=c.useRef(null),v=K(t,m),b=gr(s),[p=null,g]=We({prop:a,defaultProp:i,onChange:u}),[w,y]=c.useState(!1),k=H(l),x=co(n),C=c.useRef(!1),[P,E]=c.useState(0);return c.useEffect(()=>{const A=m.current;if(A)return A.addEventListener(cn,k),()=>A.removeEventListener(cn,k)},[k]),h.jsx(fl,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:p,onItemFocus:c.useCallback(A=>g(A),[g]),onItemShiftTab:c.useCallback(()=>y(!0),[]),onFocusableItemAdd:c.useCallback(()=>E(A=>A+1),[]),onFocusableItemRemove:c.useCallback(()=>E(A=>A-1),[]),children:h.jsx(X.div,{tabIndex:w||P===0?-1:0,"data-orientation":r,...d,ref:v,style:{outline:"none",...e.style},onMouseDown:M(e.onMouseDown,()=>{C.current=!0}),onFocus:M(e.onFocus,A=>{const O=!C.current;if(A.target===A.currentTarget&&O&&!w){const I=new CustomEvent(cn,ll);if(A.currentTarget.dispatchEvent(I),!I.defaultPrevented){const L=x().filter(_=>_.focusable),T=L.find(_=>_.active),F=L.find(_=>_.id===p),$=[T,F,...L].filter(Boolean).map(_=>_.ref.current);mo($,f)}}C.current=!1}),onBlur:M(e.onBlur,()=>y(!1))})})}),fo="RovingFocusGroupItem",po=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...a}=e,i=Be(),u=s||i,l=pl(fo,n),f=l.currentTabStopId===u,d=co(n),{onFocusableItemAdd:m,onFocusableItemRemove:v}=l;return c.useEffect(()=>{if(r)return m(),()=>v()},[r,m,v]),h.jsx(ln.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:h.jsx(X.span,{tabIndex:f?0:-1,"data-orientation":l.orientation,...a,ref:t,onMouseDown:M(e.onMouseDown,b=>{r?l.onItemFocus(u):b.preventDefault()}),onFocus:M(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:M(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){l.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const p=vl(b,l.orientation,l.dir);if(p!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let w=d().filter(y=>y.focusable).map(y=>y.ref.current);if(p==="last")w.reverse();else if(p==="prev"||p==="next"){p==="prev"&&w.reverse();const y=w.indexOf(b.currentTarget);w=l.loop?bl(w,y+1):w.slice(y+1)}setTimeout(()=>mo(w))}})})})});po.displayName=fo;var hl={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function gl(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function vl(e,t,n){const r=gl(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return hl[r]}function mo(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function bl(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var wl=uo,yl=po,kl=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ie=new WeakMap,gt=new WeakMap,vt={},un=0,ho=function(e){return e&&(e.host||ho(e.parentNode))},xl=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ho(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Cl=function(e,t,n,r){var o=xl(t,Array.isArray(e)?e:[e]);vt[n]||(vt[n]=new WeakMap);var s=vt[n],a=[],i=new Set,u=new Set(o),l=function(d){!d||i.has(d)||(i.add(d),l(d.parentNode))};o.forEach(l);var f=function(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,function(m){if(i.has(m))f(m);else try{var v=m.getAttribute(r),b=v!==null&&v!=="false",p=(Ie.get(m)||0)+1,g=(s.get(m)||0)+1;Ie.set(m,p),s.set(m,g),a.push(m),p===1&&b&>.set(m,!0),g===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",m,w)}})};return f(t),i.clear(),un++,function(){a.forEach(function(d){var m=Ie.get(d)-1,v=s.get(d)-1;Ie.set(d,m),s.set(d,v),m||(gt.has(d)||d.removeAttribute(r),gt.delete(d)),v||d.removeAttribute(n)}),un--,un||(Ie=new WeakMap,Ie=new WeakMap,gt=new WeakMap,vt={})}},El=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=kl(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Cl(r,o,n,"aria-hidden")):function(){return null}},ce=function(){return ce=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ce.apply(this,arguments)};function go(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Sl(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var bt="right-scroll-bar-position",wt="width-before-scroll-bar",jl="with-scroll-bars-hidden",Pl="--removed-body-scroll-bar-size";function dn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Al(e,t){var n=G.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Tl=typeof window<"u"?c.useLayoutEffect:c.useEffect,vo=new WeakMap;function Ml(e,t){var n=Al(null,function(r){return e.forEach(function(o){return dn(o,r)})});return Tl(function(){var r=vo.get(n);if(r){var o=new Set(r),s=new Set(e),a=n.current;o.forEach(function(i){s.has(i)||dn(i,null)}),s.forEach(function(i){o.has(i)||dn(i,a)})}vo.set(n,e)},[e]),n}function Nl(e){return e}function Ol(e,t){t===void 0&&(t=Nl);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,r);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(s),a=n}var u=function(){var f=a;a=[],f.forEach(s)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(f){a.push(f),l()},filter:function(f){return a=a.filter(f),n}}}};return o}function Il(e){e===void 0&&(e={});var t=Ol(null);return t.options=ce({async:!0,ssr:!1},e),t}var bo=function(e){var t=e.sideCar,n=go(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,ce({},n))};bo.isSideCarExport=!0;function _l(e,t){return e.useMedium(t),bo}var wo=Il(),fn=function(){},yt=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:fn,onWheelCapture:fn,onTouchMoveCapture:fn}),o=r[0],s=r[1],a=e.forwardProps,i=e.children,u=e.className,l=e.removeScrollBar,f=e.enabled,d=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,p=e.allowPinchZoom,g=e.as,w=g===void 0?"div":g,y=e.gapMode,k=go(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=m,C=Ml([n,t]),P=ce(ce({},k),o);return c.createElement(c.Fragment,null,f&&c.createElement(x,{sideCar:wo,removeScrollBar:l,shards:d,noIsolation:v,inert:b,setCallbacks:s,allowPinchZoom:!!p,lockRef:n,gapMode:y}),a?c.cloneElement(c.Children.only(i),ce(ce({},P),{ref:C})):c.createElement(w,ce({},P,{className:u,ref:C}),i))});yt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},yt.classNames={fullWidth:wt,zeroRight:bt};var Dl=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Rl(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Dl();return t&&e.setAttribute("nonce",t),e}function Ll(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Fl(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var $l=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Rl())&&(Ll(t,n),Fl(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},zl=function(){var e=$l();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},yo=function(){var e=zl(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Wl={left:0,top:0,right:0,gap:0},pn=function(e){return parseInt(e||"",10)||0},Bl=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[pn(n),pn(r),pn(o)]},Vl=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Wl;var t=Bl(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ul=yo(),_e="data-scroll-locked",Gl=function(e,t,n,r){var o=e.left,s=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(jl,` {
|
|
3
3
|
overflow: hidden `).concat(r,`;
|
|
4
4
|
padding-right: `).concat(i,"px ").concat(r,`;
|
|
5
5
|
}
|
|
@@ -33,49 +33,49 @@
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
body[`).concat(_e,`] {
|
|
36
|
-
`).concat(
|
|
36
|
+
`).concat(Pl,": ").concat(i,`px;
|
|
37
37
|
}
|
|
38
|
-
`)},
|
|
38
|
+
`)},ko=function(){var e=parseInt(document.body.getAttribute(_e)||"0",10);return isFinite(e)?e:0},Kl=function(){c.useEffect(function(){return document.body.setAttribute(_e,(ko()+1).toString()),function(){var e=ko()-1;e<=0?document.body.removeAttribute(_e):document.body.setAttribute(_e,e.toString())}},[])},Hl=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Kl();var s=c.useMemo(function(){return Vl(o)},[o]);return c.createElement(Ul,{styles:Gl(s,!t,o,n?"":"!important")})},mn=!1;if(typeof window<"u")try{var kt=Object.defineProperty({},"passive",{get:function(){return mn=!0,!0}});window.addEventListener("test",kt,kt),window.removeEventListener("test",kt,kt)}catch{mn=!1}var De=mn?{passive:!1}:!1,Yl=function(e){return e.tagName==="TEXTAREA"},xo=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Yl(e)&&n[t]==="visible")},Xl=function(e){return xo(e,"overflowY")},ql=function(e){return xo(e,"overflowX")},Co=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Eo(e,r);if(o){var s=So(e,r),a=s[1],i=s[2];if(a>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Zl=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Ql=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Eo=function(e,t){return e==="v"?Xl(t):ql(t)},So=function(e,t){return e==="v"?Zl(t):Ql(t)},Jl=function(e,t){return e==="h"&&t==="rtl"?-1:1},eu=function(e,t,n,r,o){var s=Jl(e,window.getComputedStyle(t).direction),a=s*r,i=n.target,u=t.contains(i),l=!1,f=a>0,d=0,m=0;do{var v=So(e,i),b=v[0],p=v[1],g=v[2],w=p-g-s*b;(b||w)&&Eo(e,i)&&(d+=w,m+=b),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!u&&i!==document.body||u&&(t.contains(i)||t===i));return(f&&Math.abs(d)<1||!f&&Math.abs(m)<1)&&(l=!0),l},xt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jo=function(e){return[e.deltaX,e.deltaY]},Po=function(e){return e&&"current"in e?e.current:e},tu=function(e,t){return e[0]===t[0]&&e[1]===t[1]},nu=function(e){return`
|
|
39
39
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},nu=0,Re=[];function ru(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(nu++)[0],s=c.useState(wo)[0],a=c.useRef(e);c.useEffect(function(){a.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=El([e.lockRef.current],(e.shards||[]).map(jo),!0).filter(Boolean);return p.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=c.useCallback(function(p,g){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!a.current.allowPinchZoom;var w=xt(p),y=n.current,k="deltaX"in p?p.deltaX:y[0]-w[0],x="deltaY"in p?p.deltaY:y[1]-w[1],C,P=p.target,E=Math.abs(k)>Math.abs(x)?"h":"v";if("touches"in p&&E==="h"&&P.type==="range")return!1;var T=xo(E,P);if(!T)return!0;if(T?C=E:(C=E==="v"?"h":"v",T=xo(E,P)),!T)return!1;if(!r.current&&"changedTouches"in p&&(k||x)&&(r.current=C),!C)return!0;var O=r.current||C;return Jl(O,g,p,O==="h"?k:x,!0)},[]),u=c.useCallback(function(p){var g=p;if(!(!Re.length||Re[Re.length-1]!==s)){var w="deltaY"in g?So(g):xt(g),y=t.current.filter(function(C){return C.name===g.type&&(C.target===g.target||g.target===C.shadowParent)&&eu(C.delta,w)})[0];if(y&&y.should){g.cancelable&&g.preventDefault();return}if(!y){var k=(a.current.shards||[]).map(jo).filter(Boolean).filter(function(C){return C.contains(g.target)}),x=k.length>0?i(g,k[0]):!a.current.noIsolation;x&&g.cancelable&&g.preventDefault()}}},[]),l=c.useCallback(function(p,g,w,y){var k={name:p,delta:g,target:w,should:y,shadowParent:ou(w)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(x){return x!==k})},1)},[]),f=c.useCallback(function(p){n.current=xt(p),r.current=void 0},[]),d=c.useCallback(function(p){l(p.type,So(p),p.target,i(p,e.lockRef.current))},[]),m=c.useCallback(function(p){l(p.type,xt(p),p.target,i(p,e.lockRef.current))},[]);c.useEffect(function(){return Re.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",u,De),document.addEventListener("touchmove",u,De),document.addEventListener("touchstart",f,De),function(){Re=Re.filter(function(p){return p!==s}),document.removeEventListener("wheel",u,De),document.removeEventListener("touchmove",u,De),document.removeEventListener("touchstart",f,De)}},[]);var v=e.removeScrollBar,b=e.inert;return c.createElement(c.Fragment,null,b?c.createElement(s,{styles:tu(o)}):null,v?c.createElement(Kl,{gapMode:e.gapMode}):null)}function ou(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const su=Il(bo,ru);var Po=c.forwardRef(function(e,t){return c.createElement(yt,ce({},e,{ref:t,sideCar:su}))});Po.classNames=yt.classNames;var hn=["Enter"," "],iu=["ArrowDown","PageUp","Home"],To=["ArrowUp","PageDown","End"],au=[...iu,...To],cu={ltr:[...hn,"ArrowRight"],rtl:[...hn,"ArrowLeft"]},lu={ltr:["ArrowLeft"],rtl:["ArrowRight"]},He="Menu",[Ye,uu,du]=mr(He),[Se,Ao]=de(He,[du,qr,co]),Xe=qr(),Mo=co(),[No,xe]=Se(He),[fu,qe]=Se(He),Oo=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:a=!0}=e,i=Xe(t),[u,l]=c.useState(null),f=c.useRef(!1),d=H(s),m=gr(o);return c.useEffect(()=>{const v=()=>{f.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>f.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),h.jsx(so,{...i,children:h.jsx(No,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:l,children:h.jsx(fu,{scope:t,onClose:c.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:m,modal:a,children:r})})})};Oo.displayName=He;var pu="MenuAnchor",gn=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Xe(n);return h.jsx(tl,{...o,...r,ref:t})});gn.displayName=pu;var vn="MenuPortal",[mu,Io]=Se(vn,{forceMount:void 0}),_o=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=xe(vn,t);return h.jsx(mu,{scope:t,forceMount:n,children:h.jsx(Ke,{present:n||s.open,children:h.jsx(io,{asChild:!0,container:o,children:r})})})};_o.displayName=vn;var te="MenuContent",[hu,bn]=Se(te),Do=c.forwardRef((e,t)=>{const n=Io(te,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=xe(te,e.__scopeMenu),a=qe(te,e.__scopeMenu);return h.jsx(Ye.Provider,{scope:e.__scopeMenu,children:h.jsx(Ke,{present:r||s.open,children:h.jsx(Ye.Slot,{scope:e.__scopeMenu,children:a.modal?h.jsx(gu,{...o,ref:t}):h.jsx(vu,{...o,ref:t})})})})}),gu=c.forwardRef((e,t)=>{const n=xe(te,e.__scopeMenu),r=c.useRef(null),o=K(t,r);return c.useEffect(()=>{const s=r.current;if(s)return Cl(s)},[]),h.jsx(wn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:M(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),vu=c.forwardRef((e,t)=>{const n=xe(te,e.__scopeMenu);return h.jsx(wn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),wn=c.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:m,onDismiss:v,disableOutsideScroll:b,...p}=e,g=xe(te,n),w=qe(te,n),y=Xe(n),k=Mo(n),x=uu(n),[C,P]=c.useState(null),E=c.useRef(null),T=K(t,E,g.onContentChange),O=c.useRef(0),I=c.useRef(""),L=c.useRef(0),A=c.useRef(null),F=c.useRef("right"),S=c.useRef(0),$=b?Po:c.Fragment,_=b?{as:q,allowPinchZoom:!0}:void 0,z=j=>{var he,et;const W=I.current+j,B=x().filter(ne=>!ne.disabled),Z=document.activeElement,ue=(he=B.find(ne=>ne.ref.current===Z))==null?void 0:he.textValue,Ce=B.map(ne=>ne.textValue),It=Au(Ce,W,ue),je=(et=B.find(ne=>ne.textValue===It))==null?void 0:et.ref.current;(function ne(tt){I.current=tt,window.clearTimeout(O.current),tt!==""&&(O.current=window.setTimeout(()=>ne(""),1e3))})(W),je&&setTimeout(()=>je.focus())};c.useEffect(()=>()=>window.clearTimeout(O.current),[]),za();const N=c.useCallback(j=>{var B,Z;return F.current===((B=A.current)==null?void 0:B.side)&&Nu(j,(Z=A.current)==null?void 0:Z.area)},[]);return h.jsx(hu,{scope:n,searchRef:I,onItemEnter:c.useCallback(j=>{N(j)&&j.preventDefault()},[N]),onItemLeave:c.useCallback(j=>{var W;N(j)||((W=E.current)==null||W.focus(),P(null))},[N]),onTriggerLeave:c.useCallback(j=>{N(j)&&j.preventDefault()},[N]),pointerGraceTimerRef:L,onPointerGraceIntentChange:c.useCallback(j=>{A.current=j},[]),children:h.jsx($,{..._,children:h.jsx(Sr,{asChild:!0,trapped:o,onMountAutoFocus:M(s,j=>{var W;j.preventDefault(),(W=E.current)==null||W.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:h.jsx(yr,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:m,onDismiss:v,children:h.jsx(bl,{asChild:!0,...k,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:P,onEntryFocus:M(u,j=>{w.isUsingKeyboardRef.current||j.preventDefault()}),preventScrollOnEntryFocus:!0,children:h.jsx(nl,{role:"menu","aria-orientation":"vertical","data-state":Jo(g.open),"data-radix-menu-content":"",dir:w.dir,...y,...p,ref:T,style:{outline:"none",...p.style},onKeyDown:M(p.onKeyDown,j=>{const B=j.target.closest("[data-radix-menu-content]")===j.currentTarget,Z=j.ctrlKey||j.altKey||j.metaKey,ue=j.key.length===1;B&&(j.key==="Tab"&&j.preventDefault(),!Z&&ue&&z(j.key));const Ce=E.current;if(j.target!==Ce||!au.includes(j.key))return;j.preventDefault();const je=x().filter(he=>!he.disabled).map(he=>he.ref.current);To.includes(j.key)&&je.reverse(),Pu(je)}),onBlur:M(e.onBlur,j=>{j.currentTarget.contains(j.target)||(window.clearTimeout(O.current),I.current="")}),onPointerMove:M(e.onPointerMove,Qe(j=>{const W=j.target,B=S.current!==j.clientX;if(j.currentTarget.contains(W)&&B){const Z=j.clientX>S.current?"right":"left";F.current=Z,S.current=j.clientX}}))})})})})})})});Do.displayName=te;var bu="MenuGroup",yn=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(X.div,{role:"group",...r,ref:t})});yn.displayName=bu;var wu="MenuLabel",Ro=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(X.div,{...r,ref:t})});Ro.displayName=wu;var Ct="MenuItem",Lo="menu.itemSelect",Et=c.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=c.useRef(null),a=qe(Ct,e.__scopeMenu),i=bn(Ct,e.__scopeMenu),u=K(t,s),l=c.useRef(!1),f=()=>{const d=s.current;if(!n&&d){const m=new CustomEvent(Lo,{bubbles:!0,cancelable:!0});d.addEventListener(Lo,v=>r==null?void 0:r(v),{once:!0}),pr(d,m),m.defaultPrevented?l.current=!1:a.onClose()}};return h.jsx(Fo,{...o,ref:u,disabled:n,onClick:M(e.onClick,f),onPointerDown:d=>{var m;(m=e.onPointerDown)==null||m.call(e,d),l.current=!0},onPointerUp:M(e.onPointerUp,d=>{var m;l.current||(m=d.currentTarget)==null||m.click()}),onKeyDown:M(e.onKeyDown,d=>{const m=i.searchRef.current!=="";n||m&&d.key===" "||hn.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Et.displayName=Ct;var Fo=c.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,a=bn(Ct,n),i=Mo(n),u=c.useRef(null),l=K(t,u),[f,d]=c.useState(!1),[m,v]=c.useState("");return c.useEffect(()=>{const b=u.current;b&&v((b.textContent??"").trim())},[s.children]),h.jsx(Ye.ItemSlot,{scope:n,disabled:r,textValue:o??m,children:h.jsx(wl,{asChild:!0,...i,focusable:!r,children:h.jsx(X.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:l,onPointerMove:M(e.onPointerMove,Qe(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:M(e.onPointerLeave,Qe(b=>a.onItemLeave(b))),onFocus:M(e.onFocus,()=>d(!0)),onBlur:M(e.onBlur,()=>d(!1))})})})}),yu="MenuCheckboxItem",$o=c.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return h.jsx(Uo,{scope:e.__scopeMenu,checked:n,children:h.jsx(Et,{role:"menuitemcheckbox","aria-checked":St(n)?"mixed":n,...o,ref:t,"data-state":Cn(n),onSelect:M(o.onSelect,()=>r==null?void 0:r(St(n)?!0:!n),{checkForDefaultPrevented:!1})})})});$o.displayName=yu;var zo="MenuRadioGroup",[ku,xu]=Se(zo,{value:void 0,onValueChange:()=>{}}),Wo=c.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=H(r);return h.jsx(ku,{scope:e.__scopeMenu,value:n,onValueChange:s,children:h.jsx(yn,{...o,ref:t})})});Wo.displayName=zo;var Bo="MenuRadioItem",Vo=c.forwardRef((e,t)=>{const{value:n,...r}=e,o=xu(Bo,e.__scopeMenu),s=n===o.value;return h.jsx(Uo,{scope:e.__scopeMenu,checked:s,children:h.jsx(Et,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Cn(s),onSelect:M(r.onSelect,()=>{var a;return(a=o.onValueChange)==null?void 0:a.call(o,n)},{checkForDefaultPrevented:!1})})})});Vo.displayName=Bo;var kn="MenuItemIndicator",[Uo,Cu]=Se(kn,{checked:!1}),Go=c.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Cu(kn,n);return h.jsx(Ke,{present:r||St(s.checked)||s.checked===!0,children:h.jsx(X.span,{...o,ref:t,"data-state":Cn(s.checked)})})});Go.displayName=kn;var Eu="MenuSeparator",Ko=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(X.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Ko.displayName=Eu;var Su="MenuArrow",Ho=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Xe(n);return h.jsx(rl,{...o,...r,ref:t})});Ho.displayName=Su;var xn="MenuSub",[ju,Yo]=Se(xn),Xo=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=xe(xn,t),a=Xe(t),[i,u]=c.useState(null),[l,f]=c.useState(null),d=H(o);return c.useEffect(()=>(s.open===!1&&d(!1),()=>d(!1)),[s.open,d]),h.jsx(so,{...a,children:h.jsx(No,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:f,children:h.jsx(ju,{scope:t,contentId:Be(),triggerId:Be(),trigger:i,onTriggerChange:u,children:n})})})};Xo.displayName=xn;var Ze="MenuSubTrigger",qo=c.forwardRef((e,t)=>{const n=xe(Ze,e.__scopeMenu),r=qe(Ze,e.__scopeMenu),o=Yo(Ze,e.__scopeMenu),s=bn(Ze,e.__scopeMenu),a=c.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:u}=s,l={__scopeMenu:e.__scopeMenu},f=c.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return c.useEffect(()=>f,[f]),c.useEffect(()=>{const d=i.current;return()=>{window.clearTimeout(d),u(null)}},[i,u]),h.jsx(gn,{asChild:!0,...l,children:h.jsx(Fo,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Jo(n.open),...e,ref:ot(t,o.onTriggerChange),onClick:d=>{var m;(m=e.onClick)==null||m.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:M(e.onPointerMove,Qe(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:M(e.onPointerLeave,Qe(d=>{var v,b;f();const m=(v=n.content)==null?void 0:v.getBoundingClientRect();if(m){const p=(b=n.content)==null?void 0:b.dataset.side,g=p==="right",w=g?-5:5,y=m[g?"left":"right"],k=m[g?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+w,y:d.clientY},{x:y,y:m.top},{x:k,y:m.top},{x:k,y:m.bottom},{x:y,y:m.bottom}],side:p}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:M(e.onKeyDown,d=>{var v;const m=s.searchRef.current!=="";e.disabled||m&&d.key===" "||cu[r.dir].includes(d.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),d.preventDefault())})})})});qo.displayName=Ze;var Zo="MenuSubContent",Qo=c.forwardRef((e,t)=>{const n=Io(te,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=xe(te,e.__scopeMenu),a=qe(te,e.__scopeMenu),i=Yo(Zo,e.__scopeMenu),u=c.useRef(null),l=K(t,u);return h.jsx(Ye.Provider,{scope:e.__scopeMenu,children:h.jsx(Ke,{present:r||s.open,children:h.jsx(Ye.Slot,{scope:e.__scopeMenu,children:h.jsx(wn,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:l,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var d;a.isUsingKeyboardRef.current&&((d=u.current)==null||d.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:M(e.onFocusOutside,f=>{f.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:M(e.onEscapeKeyDown,f=>{a.onClose(),f.preventDefault()}),onKeyDown:M(e.onKeyDown,f=>{var v;const d=f.currentTarget.contains(f.target),m=lu[a.dir].includes(f.key);d&&m&&(s.onOpenChange(!1),(v=i.trigger)==null||v.focus(),f.preventDefault())})})})})})});Qo.displayName=Zo;function Jo(e){return e?"open":"closed"}function St(e){return e==="indeterminate"}function Cn(e){return St(e)?"indeterminate":e?"checked":"unchecked"}function Pu(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Tu(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Au(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=Tu(e,Math.max(s,0));o.length===1&&(a=a.filter(l=>l!==n));const u=a.find(l=>l.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function Mu(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s].x,u=t[s].y,l=t[a].x,f=t[a].y;u>r!=f>r&&n<(l-i)*(r-u)/(f-u)+i&&(o=!o)}return o}function Nu(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Mu(n,t)}function Qe(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Ou=Oo,Iu=gn,_u=_o,Du=Do,Ru=yn,Lu=Ro,Fu=Et,$u=$o,zu=Wo,Wu=Vo,Bu=Go,Vu=Ko,Uu=Ho,Gu=Xo,Ku=qo,Hu=Qo,En="DropdownMenu",[Yu,zf]=de(En,[Ao]),Y=Ao(),[Xu,es]=Yu(En),ts=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:a,modal:i=!0}=e,u=Y(t),l=c.useRef(null),[f=!1,d]=We({prop:o,defaultProp:s,onChange:a});return h.jsx(Xu,{scope:t,triggerId:Be(),triggerRef:l,contentId:Be(),open:f,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(m=>!m),[d]),modal:i,children:h.jsx(Ou,{...u,open:f,onOpenChange:d,dir:r,modal:i,children:n})})};ts.displayName=En;var ns="DropdownMenuTrigger",rs=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=es(ns,n),a=Y(n);return h.jsx(Iu,{asChild:!0,...a,children:h.jsx(X.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":r?"":void 0,disabled:r,...o,ref:ot(t,s.triggerRef),onPointerDown:M(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(s.onOpenToggle(),s.open||i.preventDefault())}),onKeyDown:M(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&s.onOpenToggle(),i.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});rs.displayName=ns;var qu="DropdownMenuPortal",os=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Y(t);return h.jsx(_u,{...r,...n})};os.displayName=qu;var ss="DropdownMenuContent",is=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=es(ss,n),s=Y(n),a=c.useRef(!1);return h.jsx(Du,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:M(e.onCloseAutoFocus,i=>{var u;a.current||(u=o.triggerRef.current)==null||u.focus(),a.current=!1,i.preventDefault()}),onInteractOutside:M(e.onInteractOutside,i=>{const u=i.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,f=u.button===2||l;(!o.modal||f)&&(a.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)"}})});is.displayName=ss;var Zu="DropdownMenuGroup",as=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Ru,{...o,...r,ref:t})});as.displayName=Zu;var Qu="DropdownMenuLabel",cs=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Lu,{...o,...r,ref:t})});cs.displayName=Qu;var Ju="DropdownMenuItem",ls=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Fu,{...o,...r,ref:t})});ls.displayName=Ju;var ed="DropdownMenuCheckboxItem",us=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx($u,{...o,...r,ref:t})});us.displayName=ed;var td="DropdownMenuRadioGroup",ds=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(zu,{...o,...r,ref:t})});ds.displayName=td;var nd="DropdownMenuRadioItem",fs=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Wu,{...o,...r,ref:t})});fs.displayName=nd;var rd="DropdownMenuItemIndicator",ps=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Bu,{...o,...r,ref:t})});ps.displayName=rd;var od="DropdownMenuSeparator",ms=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Vu,{...o,...r,ref:t})});ms.displayName=od;var sd="DropdownMenuArrow",id=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Uu,{...o,...r,ref:t})});id.displayName=sd;var ad=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,a=Y(t),[i=!1,u]=We({prop:r,defaultProp:s,onChange:o});return h.jsx(Gu,{...a,open:i,onOpenChange:u,children:n})},cd="DropdownMenuSubTrigger",hs=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Ku,{...o,...r,ref:t})});hs.displayName=cd;var ld="DropdownMenuSubContent",gs=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Hu,{...o,...r,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)"}})});gs.displayName=ld;var ud=ts,dd=rs,vs=os,bs=is,fd=as,ws=cs,ys=ls,ks=us,pd=ds,xs=fs,Cs=ps,Es=ms,md=ad,Ss=hs,js=gs;/**
|
|
41
|
+
`)},ru=0,Re=[];function ou(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(ru++)[0],s=c.useState(yo)[0],a=c.useRef(e);c.useEffect(function(){a.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=Sl([e.lockRef.current],(e.shards||[]).map(Po),!0).filter(Boolean);return p.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=c.useCallback(function(p,g){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!a.current.allowPinchZoom;var w=xt(p),y=n.current,k="deltaX"in p?p.deltaX:y[0]-w[0],x="deltaY"in p?p.deltaY:y[1]-w[1],C,P=p.target,E=Math.abs(k)>Math.abs(x)?"h":"v";if("touches"in p&&E==="h"&&P.type==="range")return!1;var A=Co(E,P);if(!A)return!0;if(A?C=E:(C=E==="v"?"h":"v",A=Co(E,P)),!A)return!1;if(!r.current&&"changedTouches"in p&&(k||x)&&(r.current=C),!C)return!0;var O=r.current||C;return eu(O,g,p,O==="h"?k:x)},[]),u=c.useCallback(function(p){var g=p;if(!(!Re.length||Re[Re.length-1]!==s)){var w="deltaY"in g?jo(g):xt(g),y=t.current.filter(function(C){return C.name===g.type&&(C.target===g.target||g.target===C.shadowParent)&&tu(C.delta,w)})[0];if(y&&y.should){g.cancelable&&g.preventDefault();return}if(!y){var k=(a.current.shards||[]).map(Po).filter(Boolean).filter(function(C){return C.contains(g.target)}),x=k.length>0?i(g,k[0]):!a.current.noIsolation;x&&g.cancelable&&g.preventDefault()}}},[]),l=c.useCallback(function(p,g,w,y){var k={name:p,delta:g,target:w,should:y,shadowParent:su(w)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(x){return x!==k})},1)},[]),f=c.useCallback(function(p){n.current=xt(p),r.current=void 0},[]),d=c.useCallback(function(p){l(p.type,jo(p),p.target,i(p,e.lockRef.current))},[]),m=c.useCallback(function(p){l(p.type,xt(p),p.target,i(p,e.lockRef.current))},[]);c.useEffect(function(){return Re.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",u,De),document.addEventListener("touchmove",u,De),document.addEventListener("touchstart",f,De),function(){Re=Re.filter(function(p){return p!==s}),document.removeEventListener("wheel",u,De),document.removeEventListener("touchmove",u,De),document.removeEventListener("touchstart",f,De)}},[]);var v=e.removeScrollBar,b=e.inert;return c.createElement(c.Fragment,null,b?c.createElement(s,{styles:nu(o)}):null,v?c.createElement(Hl,{gapMode:e.gapMode}):null)}function su(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const iu=_l(wo,ou);var Ao=c.forwardRef(function(e,t){return c.createElement(yt,ce({},e,{ref:t,sideCar:iu}))});Ao.classNames=yt.classNames;var hn=["Enter"," "],au=["ArrowDown","PageUp","Home"],To=["ArrowUp","PageDown","End"],cu=[...au,...To],lu={ltr:[...hn,"ArrowRight"],rtl:[...hn,"ArrowLeft"]},uu={ltr:["ArrowLeft"],rtl:["ArrowRight"]},He="Menu",[Ye,du,fu]=mr(He),[Se,Mo]=de(He,[fu,Zr,lo]),Xe=Zr(),No=lo(),[Oo,xe]=Se(He),[pu,qe]=Se(He),Io=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:a=!0}=e,i=Xe(t),[u,l]=c.useState(null),f=c.useRef(!1),d=H(s),m=gr(o);return c.useEffect(()=>{const v=()=>{f.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>f.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),h.jsx(io,{...i,children:h.jsx(Oo,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:l,children:h.jsx(pu,{scope:t,onClose:c.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:m,modal:a,children:r})})})};Io.displayName=He;var mu="MenuAnchor",gn=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Xe(n);return h.jsx(nl,{...o,...r,ref:t})});gn.displayName=mu;var vn="MenuPortal",[hu,_o]=Se(vn,{forceMount:void 0}),Do=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=xe(vn,t);return h.jsx(hu,{scope:t,forceMount:n,children:h.jsx(Ke,{present:n||s.open,children:h.jsx(ao,{asChild:!0,container:o,children:r})})})};Do.displayName=vn;var te="MenuContent",[gu,bn]=Se(te),Ro=c.forwardRef((e,t)=>{const n=_o(te,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=xe(te,e.__scopeMenu),a=qe(te,e.__scopeMenu);return h.jsx(Ye.Provider,{scope:e.__scopeMenu,children:h.jsx(Ke,{present:r||s.open,children:h.jsx(Ye.Slot,{scope:e.__scopeMenu,children:a.modal?h.jsx(vu,{...o,ref:t}):h.jsx(bu,{...o,ref:t})})})})}),vu=c.forwardRef((e,t)=>{const n=xe(te,e.__scopeMenu),r=c.useRef(null),o=K(t,r);return c.useEffect(()=>{const s=r.current;if(s)return El(s)},[]),h.jsx(wn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:M(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),bu=c.forwardRef((e,t)=>{const n=xe(te,e.__scopeMenu);return h.jsx(wn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),wn=c.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:m,onDismiss:v,disableOutsideScroll:b,...p}=e,g=xe(te,n),w=qe(te,n),y=Xe(n),k=No(n),x=du(n),[C,P]=c.useState(null),E=c.useRef(null),A=K(t,E,g.onContentChange),O=c.useRef(0),I=c.useRef(""),L=c.useRef(0),T=c.useRef(null),F=c.useRef("right"),S=c.useRef(0),$=b?Ao:c.Fragment,_=b?{as:q,allowPinchZoom:!0}:void 0,z=j=>{var he,et;const W=I.current+j,B=x().filter(ne=>!ne.disabled),Z=document.activeElement,ue=(he=B.find(ne=>ne.ref.current===Z))==null?void 0:he.textValue,Ce=B.map(ne=>ne.textValue),It=Mu(Ce,W,ue),je=(et=B.find(ne=>ne.textValue===It))==null?void 0:et.ref.current;(function ne(tt){I.current=tt,window.clearTimeout(O.current),tt!==""&&(O.current=window.setTimeout(()=>ne(""),1e3))})(W),je&&setTimeout(()=>je.focus())};c.useEffect(()=>()=>window.clearTimeout(O.current),[]),Wa();const N=c.useCallback(j=>{var B,Z;return F.current===((B=T.current)==null?void 0:B.side)&&Ou(j,(Z=T.current)==null?void 0:Z.area)},[]);return h.jsx(gu,{scope:n,searchRef:I,onItemEnter:c.useCallback(j=>{N(j)&&j.preventDefault()},[N]),onItemLeave:c.useCallback(j=>{var W;N(j)||((W=E.current)==null||W.focus(),P(null))},[N]),onTriggerLeave:c.useCallback(j=>{N(j)&&j.preventDefault()},[N]),pointerGraceTimerRef:L,onPointerGraceIntentChange:c.useCallback(j=>{T.current=j},[]),children:h.jsx($,{..._,children:h.jsx(Sr,{asChild:!0,trapped:o,onMountAutoFocus:M(s,j=>{var W;j.preventDefault(),(W=E.current)==null||W.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:h.jsx(yr,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:m,onDismiss:v,children:h.jsx(wl,{asChild:!0,...k,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:P,onEntryFocus:M(u,j=>{w.isUsingKeyboardRef.current||j.preventDefault()}),preventScrollOnEntryFocus:!0,children:h.jsx(rl,{role:"menu","aria-orientation":"vertical","data-state":es(g.open),"data-radix-menu-content":"",dir:w.dir,...y,...p,ref:A,style:{outline:"none",...p.style},onKeyDown:M(p.onKeyDown,j=>{const B=j.target.closest("[data-radix-menu-content]")===j.currentTarget,Z=j.ctrlKey||j.altKey||j.metaKey,ue=j.key.length===1;B&&(j.key==="Tab"&&j.preventDefault(),!Z&&ue&&z(j.key));const Ce=E.current;if(j.target!==Ce||!cu.includes(j.key))return;j.preventDefault();const je=x().filter(he=>!he.disabled).map(he=>he.ref.current);To.includes(j.key)&&je.reverse(),Au(je)}),onBlur:M(e.onBlur,j=>{j.currentTarget.contains(j.target)||(window.clearTimeout(O.current),I.current="")}),onPointerMove:M(e.onPointerMove,Qe(j=>{const W=j.target,B=S.current!==j.clientX;if(j.currentTarget.contains(W)&&B){const Z=j.clientX>S.current?"right":"left";F.current=Z,S.current=j.clientX}}))})})})})})})});Ro.displayName=te;var wu="MenuGroup",yn=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(X.div,{role:"group",...r,ref:t})});yn.displayName=wu;var yu="MenuLabel",Lo=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(X.div,{...r,ref:t})});Lo.displayName=yu;var Ct="MenuItem",Fo="menu.itemSelect",Et=c.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=c.useRef(null),a=qe(Ct,e.__scopeMenu),i=bn(Ct,e.__scopeMenu),u=K(t,s),l=c.useRef(!1),f=()=>{const d=s.current;if(!n&&d){const m=new CustomEvent(Fo,{bubbles:!0,cancelable:!0});d.addEventListener(Fo,v=>r==null?void 0:r(v),{once:!0}),pr(d,m),m.defaultPrevented?l.current=!1:a.onClose()}};return h.jsx($o,{...o,ref:u,disabled:n,onClick:M(e.onClick,f),onPointerDown:d=>{var m;(m=e.onPointerDown)==null||m.call(e,d),l.current=!0},onPointerUp:M(e.onPointerUp,d=>{var m;l.current||(m=d.currentTarget)==null||m.click()}),onKeyDown:M(e.onKeyDown,d=>{const m=i.searchRef.current!=="";n||m&&d.key===" "||hn.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Et.displayName=Ct;var $o=c.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,a=bn(Ct,n),i=No(n),u=c.useRef(null),l=K(t,u),[f,d]=c.useState(!1),[m,v]=c.useState("");return c.useEffect(()=>{const b=u.current;b&&v((b.textContent??"").trim())},[s.children]),h.jsx(Ye.ItemSlot,{scope:n,disabled:r,textValue:o??m,children:h.jsx(yl,{asChild:!0,...i,focusable:!r,children:h.jsx(X.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:l,onPointerMove:M(e.onPointerMove,Qe(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:M(e.onPointerLeave,Qe(b=>a.onItemLeave(b))),onFocus:M(e.onFocus,()=>d(!0)),onBlur:M(e.onBlur,()=>d(!1))})})})}),ku="MenuCheckboxItem",zo=c.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return h.jsx(Go,{scope:e.__scopeMenu,checked:n,children:h.jsx(Et,{role:"menuitemcheckbox","aria-checked":St(n)?"mixed":n,...o,ref:t,"data-state":Cn(n),onSelect:M(o.onSelect,()=>r==null?void 0:r(St(n)?!0:!n),{checkForDefaultPrevented:!1})})})});zo.displayName=ku;var Wo="MenuRadioGroup",[xu,Cu]=Se(Wo,{value:void 0,onValueChange:()=>{}}),Bo=c.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=H(r);return h.jsx(xu,{scope:e.__scopeMenu,value:n,onValueChange:s,children:h.jsx(yn,{...o,ref:t})})});Bo.displayName=Wo;var Vo="MenuRadioItem",Uo=c.forwardRef((e,t)=>{const{value:n,...r}=e,o=Cu(Vo,e.__scopeMenu),s=n===o.value;return h.jsx(Go,{scope:e.__scopeMenu,checked:s,children:h.jsx(Et,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Cn(s),onSelect:M(r.onSelect,()=>{var a;return(a=o.onValueChange)==null?void 0:a.call(o,n)},{checkForDefaultPrevented:!1})})})});Uo.displayName=Vo;var kn="MenuItemIndicator",[Go,Eu]=Se(kn,{checked:!1}),Ko=c.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Eu(kn,n);return h.jsx(Ke,{present:r||St(s.checked)||s.checked===!0,children:h.jsx(X.span,{...o,ref:t,"data-state":Cn(s.checked)})})});Ko.displayName=kn;var Su="MenuSeparator",Ho=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(X.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Ho.displayName=Su;var ju="MenuArrow",Yo=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Xe(n);return h.jsx(ol,{...o,...r,ref:t})});Yo.displayName=ju;var xn="MenuSub",[Pu,Xo]=Se(xn),qo=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=xe(xn,t),a=Xe(t),[i,u]=c.useState(null),[l,f]=c.useState(null),d=H(o);return c.useEffect(()=>(s.open===!1&&d(!1),()=>d(!1)),[s.open,d]),h.jsx(io,{...a,children:h.jsx(Oo,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:f,children:h.jsx(Pu,{scope:t,contentId:Be(),triggerId:Be(),trigger:i,onTriggerChange:u,children:n})})})};qo.displayName=xn;var Ze="MenuSubTrigger",Zo=c.forwardRef((e,t)=>{const n=xe(Ze,e.__scopeMenu),r=qe(Ze,e.__scopeMenu),o=Xo(Ze,e.__scopeMenu),s=bn(Ze,e.__scopeMenu),a=c.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:u}=s,l={__scopeMenu:e.__scopeMenu},f=c.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return c.useEffect(()=>f,[f]),c.useEffect(()=>{const d=i.current;return()=>{window.clearTimeout(d),u(null)}},[i,u]),h.jsx(gn,{asChild:!0,...l,children:h.jsx($o,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":es(n.open),...e,ref:ot(t,o.onTriggerChange),onClick:d=>{var m;(m=e.onClick)==null||m.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:M(e.onPointerMove,Qe(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:M(e.onPointerLeave,Qe(d=>{var v,b;f();const m=(v=n.content)==null?void 0:v.getBoundingClientRect();if(m){const p=(b=n.content)==null?void 0:b.dataset.side,g=p==="right",w=g?-5:5,y=m[g?"left":"right"],k=m[g?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+w,y:d.clientY},{x:y,y:m.top},{x:k,y:m.top},{x:k,y:m.bottom},{x:y,y:m.bottom}],side:p}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:M(e.onKeyDown,d=>{var v;const m=s.searchRef.current!=="";e.disabled||m&&d.key===" "||lu[r.dir].includes(d.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),d.preventDefault())})})})});Zo.displayName=Ze;var Qo="MenuSubContent",Jo=c.forwardRef((e,t)=>{const n=_o(te,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=xe(te,e.__scopeMenu),a=qe(te,e.__scopeMenu),i=Xo(Qo,e.__scopeMenu),u=c.useRef(null),l=K(t,u);return h.jsx(Ye.Provider,{scope:e.__scopeMenu,children:h.jsx(Ke,{present:r||s.open,children:h.jsx(Ye.Slot,{scope:e.__scopeMenu,children:h.jsx(wn,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:l,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var d;a.isUsingKeyboardRef.current&&((d=u.current)==null||d.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:M(e.onFocusOutside,f=>{f.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:M(e.onEscapeKeyDown,f=>{a.onClose(),f.preventDefault()}),onKeyDown:M(e.onKeyDown,f=>{var v;const d=f.currentTarget.contains(f.target),m=uu[a.dir].includes(f.key);d&&m&&(s.onOpenChange(!1),(v=i.trigger)==null||v.focus(),f.preventDefault())})})})})})});Jo.displayName=Qo;function es(e){return e?"open":"closed"}function St(e){return e==="indeterminate"}function Cn(e){return St(e)?"indeterminate":e?"checked":"unchecked"}function Au(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Tu(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Mu(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=Tu(e,Math.max(s,0));o.length===1&&(a=a.filter(l=>l!==n));const u=a.find(l=>l.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function Nu(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s].x,u=t[s].y,l=t[a].x,f=t[a].y;u>r!=f>r&&n<(l-i)*(r-u)/(f-u)+i&&(o=!o)}return o}function Ou(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Nu(n,t)}function Qe(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Iu=Io,_u=gn,Du=Do,Ru=Ro,Lu=yn,Fu=Lo,$u=Et,zu=zo,Wu=Bo,Bu=Uo,Vu=Ko,Uu=Ho,Gu=Yo,Ku=qo,Hu=Zo,Yu=Jo,En="DropdownMenu",[Xu,Wf]=de(En,[Mo]),Y=Mo(),[qu,ts]=Xu(En),ns=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:a,modal:i=!0}=e,u=Y(t),l=c.useRef(null),[f=!1,d]=We({prop:o,defaultProp:s,onChange:a});return h.jsx(qu,{scope:t,triggerId:Be(),triggerRef:l,contentId:Be(),open:f,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(m=>!m),[d]),modal:i,children:h.jsx(Iu,{...u,open:f,onOpenChange:d,dir:r,modal:i,children:n})})};ns.displayName=En;var rs="DropdownMenuTrigger",os=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=ts(rs,n),a=Y(n);return h.jsx(_u,{asChild:!0,...a,children:h.jsx(X.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":r?"":void 0,disabled:r,...o,ref:ot(t,s.triggerRef),onPointerDown:M(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(s.onOpenToggle(),s.open||i.preventDefault())}),onKeyDown:M(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&s.onOpenToggle(),i.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});os.displayName=rs;var Zu="DropdownMenuPortal",ss=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Y(t);return h.jsx(Du,{...r,...n})};ss.displayName=Zu;var is="DropdownMenuContent",as=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ts(is,n),s=Y(n),a=c.useRef(!1);return h.jsx(Ru,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:M(e.onCloseAutoFocus,i=>{var u;a.current||(u=o.triggerRef.current)==null||u.focus(),a.current=!1,i.preventDefault()}),onInteractOutside:M(e.onInteractOutside,i=>{const u=i.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,f=u.button===2||l;(!o.modal||f)&&(a.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)"}})});as.displayName=is;var Qu="DropdownMenuGroup",cs=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Lu,{...o,...r,ref:t})});cs.displayName=Qu;var Ju="DropdownMenuLabel",ls=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Fu,{...o,...r,ref:t})});ls.displayName=Ju;var ed="DropdownMenuItem",us=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx($u,{...o,...r,ref:t})});us.displayName=ed;var td="DropdownMenuCheckboxItem",ds=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(zu,{...o,...r,ref:t})});ds.displayName=td;var nd="DropdownMenuRadioGroup",fs=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Wu,{...o,...r,ref:t})});fs.displayName=nd;var rd="DropdownMenuRadioItem",ps=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Bu,{...o,...r,ref:t})});ps.displayName=rd;var od="DropdownMenuItemIndicator",ms=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Vu,{...o,...r,ref:t})});ms.displayName=od;var sd="DropdownMenuSeparator",hs=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Uu,{...o,...r,ref:t})});hs.displayName=sd;var id="DropdownMenuArrow",ad=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Gu,{...o,...r,ref:t})});ad.displayName=id;var cd=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,a=Y(t),[i=!1,u]=We({prop:r,defaultProp:s,onChange:o});return h.jsx(Ku,{...a,open:i,onOpenChange:u,children:n})},ld="DropdownMenuSubTrigger",gs=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Hu,{...o,...r,ref:t})});gs.displayName=ld;var ud="DropdownMenuSubContent",vs=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Yu,{...o,...r,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)"}})});vs.displayName=ud;var dd=ns,fd=os,bs=ss,ws=as,pd=cs,ys=ls,ks=us,xs=ds,md=fs,Cs=ps,Es=ms,Ss=hs,hd=cd,js=gs,Ps=vs;/**
|
|
42
42
|
* @license lucide-react v0.453.0 - ISC
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the ISC license.
|
|
45
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const
|
|
46
|
+
*/const gd=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),As=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
|
|
47
47
|
* @license lucide-react v0.453.0 - ISC
|
|
48
48
|
*
|
|
49
49
|
* This source code is licensed under the ISC license.
|
|
50
50
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/var
|
|
51
|
+
*/var vd={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"};/**
|
|
52
52
|
* @license lucide-react v0.453.0 - ISC
|
|
53
53
|
*
|
|
54
54
|
* This source code is licensed under the ISC license.
|
|
55
55
|
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const
|
|
56
|
+
*/const bd=G.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:a,...i},u)=>G.createElement("svg",{ref:u,...vd,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:As("lucide",o),...i},[...a.map(([l,f])=>G.createElement(l,f)),...Array.isArray(s)?s:[s]]));/**
|
|
57
57
|
* @license lucide-react v0.453.0 - ISC
|
|
58
58
|
*
|
|
59
59
|
* This source code is licensed under the ISC license.
|
|
60
60
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const jt=(e,t)=>{const n=G.forwardRef(({className:r,...o},s)=>G.createElement(
|
|
61
|
+
*/const jt=(e,t)=>{const n=G.forwardRef(({className:r,...o},s)=>G.createElement(bd,{ref:s,iconNode:t,className:As(`lucide-${gd(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
|
|
62
62
|
* @license lucide-react v0.453.0 - ISC
|
|
63
63
|
*
|
|
64
64
|
* This source code is licensed under the ISC license.
|
|
65
65
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const
|
|
66
|
+
*/const wd=jt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
67
67
|
* @license lucide-react v0.453.0 - ISC
|
|
68
68
|
*
|
|
69
69
|
* This source code is licensed under the ISC license.
|
|
70
70
|
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const
|
|
71
|
+
*/const yd=jt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
72
72
|
* @license lucide-react v0.453.0 - ISC
|
|
73
73
|
*
|
|
74
74
|
* This source code is licensed under the ISC license.
|
|
75
75
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const
|
|
76
|
+
*/const kd=jt("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
77
77
|
* @license lucide-react v0.453.0 - ISC
|
|
78
78
|
*
|
|
79
79
|
* This source code is licensed under the ISC license.
|
|
80
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const kd=jt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),xd=ud,Cd=dd,Ed=fd,Sd=vs,jd=md,Pd=pd,Ts=c.forwardRef(({className:e,inset:t,children:n,...r},o)=>h.jsxs(Ss,{ref:o,className:U(["ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-center ksjsui-gap-2 ksjsui-rounded-md ksjsui-px-2 ksjsui-py-1.5 ksjsui-outline-none","focus:ksjsui-bg-neutral focus:ksjsui-text-neutral-foreground","data-[state=open]:ksjsui-bg-neutral data-[state=open]:ksjsui-text-neutral-foreground","[&_svg]:ksjsui-pointer-events-none [&_svg]:ksjsui-size-4 [&_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-8",e),...r,children:[n,h.jsx(wd,{className:"ksjsui-ms-auto"})]}));Ts.displayName=Ss.displayName;const As=c.forwardRef(({className:e,...t},n)=>h.jsx(js,{ref:n,className:U(["ksjsui-z-50 ksjsui-min-w-32 ksjsui-overflow-hidden ksjsui-rounded-md ksjsui-border ksjsui-border-popover-border ksjsui-bg-popover ksjsui-p-1 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=bottom]:ksjsui-slide-in-from-top-2","data-[side=right]:ksjsui-slide-in-from-left-2","data-[side=left]:ksjsui-slide-in-from-right-2"],e),...t}));As.displayName=js.displayName;const Ms=c.forwardRef(({className:e,align:t="start",side:n="bottom",sideOffset:r=4,...o},s)=>h.jsx(vs,{children:h.jsx(bs,{ref:s,align:t,side:n,sideOffset:r,className:U(["ksjsui-z-50 ksjsui-min-w-32 ksjsui-overflow-hidden ksjsui-rounded-lg ksjsui-border ksjsui-border-popover-border ksjsui-bg-popover ksjsui-p-1 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"],e),...o})}));Ms.displayName=bs.displayName;const Ns=c.forwardRef(({className:e,inset:t,...n},r)=>h.jsx(ys,{ref:r,className:U(["ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-center ksjsui-gap-2 ksjsui-rounded-md ksjsui-border-0 ksjsui-px-2 ksjsui-py-1.5 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-4 [&_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-8",e),...n}));Ns.displayName=ys.displayName;const Os=c.forwardRef(({className:e,children:t,checked:n,...r},o)=>h.jsxs(ks,{ref:o,className:U(["ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-center ksjsui-justify-between ksjsui-gap-2 ksjsui-rounded-md ksjsui-border-0 ksjsui-px-2 ksjsui-py-1.5 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,...r,children:[t,h.jsx("span",{className:"ksjsui-flex ksjsui-size-3.5 ksjsui-items-center ksjsui-justify-center",children:h.jsx(Cs,{children:h.jsx(bd,{className:"ksjsui-size-4"})})})]}));Os.displayName=ks.displayName;const Is=c.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(xs,{ref:r,className:U(["ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-center ksjsui-justify-between ksjsui-gap-2 ksjsui-rounded-md ksjsui-border-0 ksjsui-px-2 ksjsui-py-1.5 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,h.jsx("span",{className:"ksjsui-flex ksjsui-size-3.5 ksjsui-items-center ksjsui-justify-center",children:h.jsx(Cs,{children:h.jsx(yd,{className:"ksjsui-size-2"})})})]}));Is.displayName=xs.displayName;const _s=c.forwardRef(({className:e,inset:t,...n},r)=>h.jsx(ws,{ref:r,className:U("ksjsui-px-2 ksjsui-py-1.5 ksjsui-text-sm ksjsui-font-semibold",t&&"ksjsui-ps-8",e),...n}));_s.displayName=ws.displayName;const Ds=c.forwardRef(({className:e,...t},n)=>h.jsx(Es,{ref:n,className:U(["-ksjsui-mx-1 ksjsui-my-1 ksjsui-h-px ksjsui-bg-border","forced-colors:ksjsui-forced-color-adjust-none"],e),...t}));Ds.displayName=Es.displayName;const Rs=({className:e,...t})=>h.jsx("span",{className:U("ksjsui-ms-auto ksjsui-text-sm ksjsui-tracking-widest ksjsui-opacity-60",e),...t});Rs.displayName="DropdownMenuShortcut";const Ls=c.forwardRef((e,t)=>h.jsx(Bt,{ref:t,...e,iconOnly:!0,fullWidth:!1}));Ls.displayName="IconButton";var Td=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ad=Td.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?q:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Md="Separator",Fs="horizontal",Nd=["horizontal","vertical"],$s=c.forwardRef((e,t)=>{const{decorative:n,orientation:r=Fs,...o}=e,s=Od(r)?r:Fs,i=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return h.jsx(Ad.div,{"data-orientation":s,...i,...o,ref:t})});$s.displayName=Md;function Od(e){return Nd.includes(e)}var zs=$s;const Ws=c.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>h.jsx(zs,{ref:o,decorative:n,orientation:t,className:U("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),...r}));Ws.displayName=zs.displayName;function Id(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var _d=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Bs=_d.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?q:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Sn="Switch",[Dd,Wf]=de(Sn),[Rd,Ld]=Dd(Sn),Vs=c.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:a,disabled:i,value:u="on",onCheckedChange:l,form:f,...d}=e,[m,v]=c.useState(null),b=K(t,k=>v(k)),p=c.useRef(!1),g=m?f||!!m.closest("form"):!0,[w=!1,y]=We({prop:o,defaultProp:s,onChange:l});return h.jsxs(Rd,{scope:n,checked:w,disabled:i,children:[h.jsx(Bs.button,{type:"button",role:"switch","aria-checked":w,"aria-required":a,"data-state":Ks(w),"data-disabled":i?"":void 0,disabled:i,value:u,...d,ref:b,onClick:M(e.onClick,k=>{y(x=>!x),g&&(p.current=k.isPropagationStopped(),p.current||k.stopPropagation())})}),g&&h.jsx(Fd,{control:m,bubbles:!p.current,name:r,value:u,checked:w,required:a,disabled:i,form:f,style:{transform:"translateX(-100%)"}})]})});Vs.displayName=Sn;var Us="SwitchThumb",Gs=c.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=Ld(Us,n);return h.jsx(Bs.span,{"data-state":Ks(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Gs.displayName=Us;var Fd=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,s=c.useRef(null),a=Id(n),i=Yr(t);return c.useEffect(()=>{const u=s.current,l=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(l,"checked").set;if(a!==n&&d){const m=new Event("click",{bubbles:r});d.call(u,n),u.dispatchEvent(m)}},[a,n,r]),h.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Ks(e){return e?"checked":"unchecked"}var Hs=Vs,$d=Gs;const Ys=c.forwardRef(({className:e,tabIndex:t=0,...n},r)=>h.jsx(Hs,{className:U(["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:r,children:h.jsx($d,{className:U(["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"])})}));Ys.displayName=Hs.displayName;function zd(e){const t=e+"CollectionProvider",[n,r]=de(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:p}=v,g=G.useRef(null),w=G.useRef(new Map).current;return h.jsx(o,{scope:b,itemMap:w,collectionRef:g,children:p})};a.displayName=t;const i=e+"CollectionSlot",u=G.forwardRef((v,b)=>{const{scope:p,children:g}=v,w=s(i,p),y=K(b,w.collectionRef);return h.jsx(q,{ref:y,children:g})});u.displayName=i;const l=e+"CollectionItemSlot",f="data-radix-collection-item",d=G.forwardRef((v,b)=>{const{scope:p,children:g,...w}=v,y=G.useRef(null),k=K(b,y),x=s(l,p);return G.useEffect(()=>(x.itemMap.set(y,{ref:y,...w}),()=>void x.itemMap.delete(y))),h.jsx(q,{[f]:"",ref:k,children:g})});d.displayName=l;function m(v){const b=s(e+"CollectionConsumer",v);return G.useCallback(()=>{const g=b.collectionRef.current;if(!g)return[];const w=Array.from(g.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((x,C)=>w.indexOf(x.ref.current)-w.indexOf(C.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:u,ItemSlot:d},m,r]}var Wd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],le=Wd.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?q:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Xs(e,t){e&&rt.flushSync(()=>e.dispatchEvent(t))}var Bd="DismissableLayer",jn="dismissableLayer.update",Vd="dismissableLayer.pointerDownOutside",Ud="dismissableLayer.focusOutside",qs,Zs=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qs=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...u}=e,l=c.useContext(Zs),[f,d]=c.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=c.useState({}),b=K(t,E=>d(E)),p=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=p.indexOf(g),y=f?p.indexOf(f):-1,k=l.layersWithOutsidePointerEventsDisabled.size>0,x=y>=w,C=Kd(E=>{const T=E.target,O=[...l.branches].some(I=>I.contains(T));!x||O||(o==null||o(E),a==null||a(E),E.defaultPrevented||i==null||i())},m),P=Hd(E=>{const T=E.target;[...l.branches].some(I=>I.contains(T))||(s==null||s(E),a==null||a(E),E.defaultPrevented||i==null||i())},m);return vr(E=>{y===l.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},m),c.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(qs=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),ei(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=qs)}},[f,m,n,l]),c.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),ei())},[f,l]),c.useEffect(()=>{const E=()=>v({});return document.addEventListener(jn,E),()=>document.removeEventListener(jn,E)},[]),h.jsx(le.div,{...u,ref:b,style:{pointerEvents:k?x?"auto":"none":void 0,...e.style},onFocusCapture:M(e.onFocusCapture,P.onFocusCapture),onBlurCapture:M(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:M(e.onPointerDownCapture,C.onPointerDownCapture)})});Qs.displayName=Bd;var Gd="DismissableLayerBranch",Js=c.forwardRef((e,t)=>{const n=c.useContext(Zs),r=c.useRef(null),o=K(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),h.jsx(le.div,{...e,ref:o})});Js.displayName=Gd;function Kd(e,t=globalThis==null?void 0:globalThis.document){const n=H(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let u=function(){ti(Vd,n,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Hd(e,t=globalThis==null?void 0:globalThis.document){const n=H(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&ti(Ud,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ei(){const e=new CustomEvent(jn);document.dispatchEvent(e)}function ti(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Xs(o,s):o.dispatchEvent(s)}var Yd=Qs,Xd=Js,qd="Portal",ni=c.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,s]=c.useState(!1);Q(()=>s(!0),[]);const a=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?Dt.createPortal(h.jsx(le.div,{...r,ref:t}),a):null});ni.displayName=qd;function Zd(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var ri=e=>{const{present:t,children:n}=e,r=Qd(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=K(r.ref,Jd(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};ri.displayName="Presence";function Qd(e){const[t,n]=c.useState(),r=c.useRef({}),o=c.useRef(e),s=c.useRef("none"),a=e?"mounted":"unmounted",[i,u]=Zd(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const l=Pt(r.current);s.current=i==="mounted"?l:"none"},[i]),Q(()=>{const l=r.current,f=o.current;if(f!==e){const m=s.current,v=Pt(l);e?u("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(f&&m!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Q(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,d=v=>{const p=Pt(r.current).includes(v.animationName);if(v.target===t&&p&&(u("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(s.current=Pt(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Pt(e){return(e==null?void 0:e.animationName)||"none"}function Jd(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ef="VisuallyHidden",Pn=c.forwardRef((e,t)=>h.jsx(le.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}}));Pn.displayName=ef;var Tn="ToastProvider",[An,tf,nf]=zd("Toast"),[oi,Bf]=de("Toast",[nf]),[rf,Tt]=oi(Tn),si=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:a}=e,[i,u]=c.useState(null),[l,f]=c.useState(0),d=c.useRef(!1),m=c.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Tn}\`. Expected non-empty \`string\`.`),h.jsx(An.Provider,{scope:t,children:h.jsx(rf,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:l,viewport:i,onViewportChange:u,onToastAdd:c.useCallback(()=>f(v=>v+1),[]),onToastRemove:c.useCallback(()=>f(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:m,children:a})})};si.displayName=Tn;var ii="ToastViewport",of=["F8"],Mn="toast.viewportPause",Nn="toast.viewportResume",ai=c.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=of,label:o="Notifications ({hotkey})",...s}=e,a=Tt(ii,n),i=tf(n),u=c.useRef(null),l=c.useRef(null),f=c.useRef(null),d=c.useRef(null),m=K(t,d,a.onViewportChange),v=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=a.toastCount>0;c.useEffect(()=>{const g=w=>{var k;r.length!==0&&r.every(x=>w[x]||w.code===x)&&((k=d.current)==null||k.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[r]),c.useEffect(()=>{const g=u.current,w=d.current;if(b&&g&&w){const y=()=>{if(!a.isClosePausedRef.current){const P=new CustomEvent(Mn);w.dispatchEvent(P),a.isClosePausedRef.current=!0}},k=()=>{if(a.isClosePausedRef.current){const P=new CustomEvent(Nn);w.dispatchEvent(P),a.isClosePausedRef.current=!1}},x=P=>{!g.contains(P.relatedTarget)&&k()},C=()=>{g.contains(document.activeElement)||k()};return g.addEventListener("focusin",y),g.addEventListener("focusout",x),g.addEventListener("pointermove",y),g.addEventListener("pointerleave",C),window.addEventListener("blur",y),window.addEventListener("focus",k),()=>{g.removeEventListener("focusin",y),g.removeEventListener("focusout",x),g.removeEventListener("pointermove",y),g.removeEventListener("pointerleave",C),window.removeEventListener("blur",y),window.removeEventListener("focus",k)}}},[b,a.isClosePausedRef]);const p=c.useCallback(({tabbingDirection:g})=>{const y=i().map(k=>{const x=k.ref.current,C=[x,...bf(x)];return g==="forwards"?C:C.reverse()});return(g==="forwards"?y.reverse():y).flat()},[i]);return c.useEffect(()=>{const g=d.current;if(g){const w=y=>{var C,P,E;const k=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!k){const T=document.activeElement,O=y.shiftKey;if(y.target===g&&O){(C=l.current)==null||C.focus();return}const A=p({tabbingDirection:O?"backwards":"forwards"}),F=A.findIndex(S=>S===T);_n(A.slice(F+1))?y.preventDefault():O?(P=l.current)==null||P.focus():(E=f.current)==null||E.focus()}};return g.addEventListener("keydown",w),()=>g.removeEventListener("keydown",w)}},[i,p]),h.jsxs(Xd,{ref:u,role:"region","aria-label":o.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&h.jsx(On,{ref:l,onFocusFromOutsideViewport:()=>{const g=p({tabbingDirection:"forwards"});_n(g)}}),h.jsx(An.Slot,{scope:n,children:h.jsx(le.ol,{tabIndex:-1,...s,ref:m})}),b&&h.jsx(On,{ref:f,onFocusFromOutsideViewport:()=>{const g=p({tabbingDirection:"backwards"});_n(g)}})]})});ai.displayName=ii;var ci="ToastFocusProxy",On=c.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=Tt(ci,n);return h.jsx(Pn,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var l;const i=a.relatedTarget;!((l=s.viewport)!=null&&l.contains(i))&&r()}})});On.displayName=ci;var At="Toast",sf="toast.swipeStart",af="toast.swipeMove",cf="toast.swipeCancel",lf="toast.swipeEnd",li=c.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...a}=e,[i=!0,u]=We({prop:r,defaultProp:o,onChange:s});return h.jsx(ri,{present:n||i,children:h.jsx(ff,{open:i,...a,ref:t,onClose:()=>u(!1),onPause:H(e.onPause),onResume:H(e.onResume),onSwipeStart:M(e.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:M(e.onSwipeMove,l=>{const{x:f,y:d}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:M(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:M(e.onSwipeEnd,l=>{const{x:f,y:d}=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",`${f}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),u(!1)})})})});li.displayName=At;var[uf,df]=oi(At,{onClose(){}}),ff=c.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:a,onEscapeKeyDown:i,onPause:u,onResume:l,onSwipeStart:f,onSwipeMove:d,onSwipeCancel:m,onSwipeEnd:v,...b}=e,p=Tt(At,n),[g,w]=c.useState(null),y=K(t,S=>w(S)),k=c.useRef(null),x=c.useRef(null),C=o||p.duration,P=c.useRef(0),E=c.useRef(C),T=c.useRef(0),{onToastAdd:O,onToastRemove:I}=p,L=H(()=>{var $;(g==null?void 0:g.contains(document.activeElement))&&(($=p.viewport)==null||$.focus()),a()}),A=c.useCallback(S=>{!S||S===1/0||(window.clearTimeout(T.current),P.current=new Date().getTime(),T.current=window.setTimeout(L,S))},[L]);c.useEffect(()=>{const S=p.viewport;if(S){const $=()=>{A(E.current),l==null||l()},_=()=>{const z=new Date().getTime()-P.current;E.current=E.current-z,window.clearTimeout(T.current),u==null||u()};return S.addEventListener(Mn,_),S.addEventListener(Nn,$),()=>{S.removeEventListener(Mn,_),S.removeEventListener(Nn,$)}}},[p.viewport,C,u,l,A]),c.useEffect(()=>{s&&!p.isClosePausedRef.current&&A(C)},[s,C,p.isClosePausedRef,A]),c.useEffect(()=>(O(),()=>I()),[O,I]);const F=c.useMemo(()=>g?gi(g):null,[g]);return p.viewport?h.jsxs(h.Fragment,{children:[F&&h.jsx(pf,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:F}),h.jsx(uf,{scope:n,onClose:L,children:rt.createPortal(h.jsx(An.ItemSlot,{scope:n,children:h.jsx(Yd,{asChild:!0,onEscapeKeyDown:M(i,()=>{p.isFocusedToastEscapeKeyDownRef.current||L(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:h.jsx(le.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":p.swipeDirection,...b,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:M(e.onKeyDown,S=>{S.key==="Escape"&&(i==null||i(S.nativeEvent),S.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:M(e.onPointerDown,S=>{S.button===0&&(k.current={x:S.clientX,y:S.clientY})}),onPointerMove:M(e.onPointerMove,S=>{if(!k.current)return;const $=S.clientX-k.current.x,_=S.clientY-k.current.y,z=!!x.current,N=["left","right"].includes(p.swipeDirection),j=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,W=N?j(0,$):0,B=N?0:j(0,_),Z=S.pointerType==="touch"?10:2,ue={x:W,y:B},Ce={originalEvent:S,delta:ue};z?(x.current=ue,Mt(af,d,Ce,{discrete:!1})):vi(ue,p.swipeDirection,Z)?(x.current=ue,Mt(sf,f,Ce,{discrete:!1}),S.target.setPointerCapture(S.pointerId)):(Math.abs($)>Z||Math.abs(_)>Z)&&(k.current=null)}),onPointerUp:M(e.onPointerUp,S=>{const $=x.current,_=S.target;if(_.hasPointerCapture(S.pointerId)&&_.releasePointerCapture(S.pointerId),x.current=null,k.current=null,$){const z=S.currentTarget,N={originalEvent:S,delta:$};vi($,p.swipeDirection,p.swipeThreshold)?Mt(lf,v,N,{discrete:!0}):Mt(cf,m,N,{discrete:!0}),z.addEventListener("click",j=>j.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),pf=e=>{const{__scopeToast:t,children:n,...r}=e,o=Tt(At,t),[s,a]=c.useState(!1),[i,u]=c.useState(!1);return gf(()=>a(!0)),c.useEffect(()=>{const l=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(l)},[]),i?null:h.jsx(ni,{asChild:!0,children:h.jsx(Pn,{...r,children:s&&h.jsxs(h.Fragment,{children:[o.label," ",n]})})})},mf="ToastTitle",ui=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return h.jsx(le.div,{...r,ref:t})});ui.displayName=mf;var hf="ToastDescription",di=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return h.jsx(le.div,{...r,ref:t})});di.displayName=hf;var fi="ToastAction",pi=c.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?h.jsx(hi,{altText:n,asChild:!0,children:h.jsx(In,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${fi}\`. Expected non-empty \`string\`.`),null)});pi.displayName=fi;var mi="ToastClose",In=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=df(mi,n);return h.jsx(hi,{asChild:!0,children:h.jsx(le.button,{type:"button",...r,ref:t,onClick:M(e.onClick,o.onClose)})})});In.displayName=mi;var hi=c.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return h.jsx(le.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function gi(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),vf(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...gi(r))}}),t}function Mt(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Xs(o,s):o.dispatchEvent(s)}var vi=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function gf(e=()=>{}){const t=H(e);Q(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function vf(e){return e.nodeType===e.ELEMENT_NODE}function bf(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _n(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var wf=si,bi=ai,wi=li,yi=ui,ki=di,xi=pi,Ci=In;const yf=1,kf=1e6;let Dn=0;function xf(){return Dn=(Dn+1)%Number.MAX_SAFE_INTEGER,Dn.toString()}const Rn=new Map,Ei=e=>{if(Rn.has(e))return;const t=setTimeout(()=>{Rn.delete(e),Je({type:"REMOVE_TOAST",toastId:e})},kf);Rn.set(e,t)},Cf=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,yf)};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?Ei(n):e.toasts.forEach(r=>{Ei(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Nt=[];let Ot={toasts:[]};function Je(e){Ot=Cf(Ot,e),Nt.forEach(t=>{t(Ot)})}function Ef({...e}){const t=xf(),n=o=>Je({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>Je({type:"DISMISS_TOAST",toastId:t});return Je({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function Si(){const[e,t]=c.useState(Ot);return c.useEffect(()=>(Nt.push(t),()=>{const n=Nt.indexOf(t);n>-1&&Nt.splice(n,1)}),[e]),{...e,toast:Ef,dismiss:n=>Je({type:"DISMISS_TOAST",toastId:n})}}const Sf=wf,ji=c.forwardRef(({className:e,...t},n)=>h.jsx(bi,{ref:n,className:U(["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","md:ksjsui-max-w-[420px]"],e),...t}));ji.displayName=bi.displayName;const jf=Le(["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-transition-all","rtl:ksjsui-space-x-reverse","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-top-full","data-[state=open]:sm:ksjsui-slide-in-from-bottom-full","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-80","ltr:data-[state=closed]:ksjsui-slide-out-to-right-full","rtl:data-[state=closed]:ksjsui-slide-out-to-left-full"]),Pi=c.forwardRef(({className:e,...t},n)=>h.jsx(wi,{ref:n,className:U(jf(),e),...t}));Pi.displayName=wi.displayName;const Pf=c.forwardRef(({className:e,...t},n)=>h.jsx(xi,{ref:n,className:U(["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}));Pf.displayName=xi.displayName;const Ti=c.forwardRef(({className:e,...t},n)=>h.jsx(Ci,{ref:n,className:U(["ksjsui-rounded-sm ksjsui-p-1 ksjsui-text-current ksjsui-transition-opacity","focus:ksjsui-outline-none focus:ksjsui-ring-2"],e),"toast-close":"",...t,children:h.jsx(kd,{className:"ksjsui-size-6"})}));Ti.displayName=Ci.displayName;const Ai=c.forwardRef(({className:e,...t},n)=>h.jsx(yi,{ref:n,className:U("ksjsui-text-sm ksjsui-font-semibold",e),...t}));Ai.displayName=yi.displayName;const Mi=c.forwardRef(({className:e,...t},n)=>h.jsx(ki,{ref:n,className:U("ksjsui-text-sm ksjsui-opacity-90",e),...t}));Mi.displayName=ki.displayName;const Tf=()=>{const{toasts:e}=Si();return h.jsxs(Sf,{children:[e.map(function({id:t,title:n,description:r,action:o,icon:s,...a}){return h.jsxs(Pi,{...a,className:"ksjsui-flex ksjsui-gap-x-2",children:[s&&h.jsx("div",{className:"ksjsui-shrink-0",children:s}),h.jsxs("div",{className:"ksjsui-grid ksjsui-gap-1 ksjsui-grow",children:[n&&h.jsx(Ai,{children:n}),r&&h.jsx(Mi,{children:r})]}),o,h.jsx(Ti,{})]},t)}),h.jsx(ji,{})]})},Ln=["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],Af=[...Ln,"auto"];function Mf(){return Ln.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 Ni(){return Af.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 Oi(){return Ln.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 Nf=Le("",{variants:{display:{block:"ksjsui-block","inline-block":"ksjsui-inline-block",none:"ksjsui-hidden"},...Ni(),...Oi()},defaultVariants:{display:"block"}}),Ii=c.forwardRef(({as:e="div",asChild:t,className:n,display:r,m:o,mb:s,me:a,ms:i,mt:u,mx:l,my:f,p:d,pb:m,pe:v,ps:b,pt:p,px:g,py:w,...y},k)=>{const x=t?q:e;return h.jsx(x,{className:U(Nf({display:r,m:o,mb:s,me:a,ms:i,mt:u,mx:l,my:f,p:d,pb:m,pe:v,ps:b,pt:p,px:g,py:w,className:n})),ref:k,...y})});Ii.displayName="Box";const Of={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"},...Mf(),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"},...Ni(),...Oi(),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"}},If=Le("ksjsui-inline-flex",{variants:{...Of},defaultVariants:{display:"flex",justify:"start"}}),_i=c.forwardRef(({align:e,as:t="div",asChild:n,className:r,display:o,direction:s,gap:a,gapColumn:i,gapRow:u,grow:l,justify:f,m:d,mb:m,me:v,ms:b,mt:p,mx:g,my:w,p:y,pb:k,pe:x,ps:C,pt:P,px:E,py:T,self:O,shrink:I,wrap:L,...A},F)=>{const S=n?q:t;return h.jsx(S,{className:U(If({align:e,direction:s,display:o,gap:a,gapColumn:i,gapRow:u,grow:l,justify:f,m:d,mb:m,me:v,ms:b,mt:p,mx:g,my:w,p:y,pb:k,pe:x,ps:C,pt:P,px:E,py:T,self:O,shrink:I,wrap:L,className:r})),ref:F,...A})});_i.displayName="Flex",R.Avatar=ur,R.AvatarFallback=fr,R.AvatarImage=dr,R.Box=Ii,R.Button=Bt,R.DirectionProvider=Oa,R.DropdownMenu=xd,R.DropdownMenuCheckboxItem=Os,R.DropdownMenuContent=Ms,R.DropdownMenuGroup=Ed,R.DropdownMenuItem=Ns,R.DropdownMenuLabel=_s,R.DropdownMenuPortal=Sd,R.DropdownMenuRadioGroup=Pd,R.DropdownMenuRadioItem=Is,R.DropdownMenuSeparator=Ds,R.DropdownMenuShortcut=Rs,R.DropdownMenuSub=jd,R.DropdownMenuSubContent=As,R.DropdownMenuSubTrigger=Ts,R.DropdownMenuTrigger=Cd,R.Flex=_i,R.IconButton=Ls,R.Separator=Ws,R.Switch=Ys,R.Toast=Tf,R.useToast=Si,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|
|
81
|
+
*/const xd=jt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Cd=dd,Ed=fd,Sd=pd,jd=bs,Pd=hd,Ad=md,Ts=c.forwardRef(({className:e,inset:t,children:n,...r},o)=>h.jsxs(js,{ref:o,className:U(["ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-center ksjsui-gap-2 ksjsui-rounded-md ksjsui-px-2 ksjsui-py-1.5 ksjsui-outline-none","focus:ksjsui-bg-neutral focus:ksjsui-text-neutral-foreground","data-[state=open]:ksjsui-bg-neutral data-[state=open]:ksjsui-text-neutral-foreground","[&_svg]:ksjsui-pointer-events-none [&_svg]:ksjsui-size-4 [&_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-8",e),...r,children:[n,h.jsx(yd,{className:"ksjsui-ms-auto"})]}));Ts.displayName=js.displayName;const Ms=c.forwardRef(({className:e,...t},n)=>h.jsx(Ps,{ref:n,className:U(["ksjsui-z-50 ksjsui-min-w-32 ksjsui-overflow-hidden ksjsui-rounded-md ksjsui-border ksjsui-border-popover-border ksjsui-bg-popover ksjsui-p-1 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=bottom]:ksjsui-slide-in-from-top-2","data-[side=right]:ksjsui-slide-in-from-left-2","data-[side=left]:ksjsui-slide-in-from-right-2"],e),...t}));Ms.displayName=Ps.displayName;const Ns=c.forwardRef(({className:e,align:t="start",side:n="bottom",sideOffset:r=4,...o},s)=>h.jsx(bs,{children:h.jsx(ws,{ref:s,align:t,side:n,sideOffset:r,className:U(["ksjsui-z-50 ksjsui-min-w-32 ksjsui-overflow-hidden ksjsui-rounded-lg ksjsui-border ksjsui-border-popover-border ksjsui-bg-popover ksjsui-p-1 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"],e),...o})}));Ns.displayName=ws.displayName;const Os=c.forwardRef(({className:e,inset:t,...n},r)=>h.jsx(ks,{ref:r,className:U(["ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-center ksjsui-gap-2 ksjsui-rounded-md ksjsui-border-0 ksjsui-px-2 ksjsui-py-1.5 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-4 [&_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-8",e),...n}));Os.displayName=ks.displayName;const Is=c.forwardRef(({className:e,children:t,checked:n,...r},o)=>h.jsxs(xs,{ref:o,className:U(["ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-center ksjsui-justify-between ksjsui-gap-2 ksjsui-rounded-md ksjsui-border-0 ksjsui-px-2 ksjsui-py-1.5 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,...r,children:[t,h.jsx("span",{className:"ksjsui-flex ksjsui-size-3.5 ksjsui-items-center ksjsui-justify-center",children:h.jsx(Es,{children:h.jsx(wd,{className:"ksjsui-size-4"})})})]}));Is.displayName=xs.displayName;const _s=c.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(Cs,{ref:r,className:U(["ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-center ksjsui-justify-between ksjsui-gap-2 ksjsui-rounded-md ksjsui-border-0 ksjsui-px-2 ksjsui-py-1.5 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,h.jsx("span",{className:"ksjsui-flex ksjsui-size-3.5 ksjsui-items-center ksjsui-justify-center",children:h.jsx(Es,{children:h.jsx(kd,{className:"ksjsui-size-2"})})})]}));_s.displayName=Cs.displayName;const Ds=c.forwardRef(({className:e,inset:t,...n},r)=>h.jsx(ys,{ref:r,className:U("ksjsui-px-2 ksjsui-py-1.5 ksjsui-text-sm ksjsui-font-semibold",t&&"ksjsui-ps-8",e),...n}));Ds.displayName=ys.displayName;const Rs=c.forwardRef(({className:e,...t},n)=>h.jsx(Ss,{ref:n,className:U(["-ksjsui-mx-1 ksjsui-my-1 ksjsui-h-px ksjsui-bg-border","forced-colors:ksjsui-forced-color-adjust-none"],e),...t}));Rs.displayName=Ss.displayName;const Ls=({className:e,...t})=>h.jsx("span",{className:U("ksjsui-ms-auto ksjsui-text-sm ksjsui-tracking-widest ksjsui-opacity-60",e),...t});Ls.displayName="DropdownMenuShortcut";const Fs=c.forwardRef((e,t)=>h.jsx(Bt,{ref:t,...e,iconOnly:!0,fullWidth:!1}));Fs.displayName="IconButton";var Td=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Md=Td.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?q:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Nd="Separator",$s="horizontal",Od=["horizontal","vertical"],zs=c.forwardRef((e,t)=>{const{decorative:n,orientation:r=$s,...o}=e,s=Id(r)?r:$s,i=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return h.jsx(Md.div,{"data-orientation":s,...i,...o,ref:t})});zs.displayName=Nd;function Id(e){return Od.includes(e)}var Ws=zs;const Bs=c.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>h.jsx(Ws,{ref:o,decorative:n,orientation:t,className:U("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),...r}));Bs.displayName=Ws.displayName;function _d(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Dd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Vs=Dd.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?q:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Sn="Switch",[Rd,Bf]=de(Sn),[Ld,Fd]=Rd(Sn),Us=c.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:a,disabled:i,value:u="on",onCheckedChange:l,form:f,...d}=e,[m,v]=c.useState(null),b=K(t,k=>v(k)),p=c.useRef(!1),g=m?f||!!m.closest("form"):!0,[w=!1,y]=We({prop:o,defaultProp:s,onChange:l});return h.jsxs(Ld,{scope:n,checked:w,disabled:i,children:[h.jsx(Vs.button,{type:"button",role:"switch","aria-checked":w,"aria-required":a,"data-state":Hs(w),"data-disabled":i?"":void 0,disabled:i,value:u,...d,ref:b,onClick:M(e.onClick,k=>{y(x=>!x),g&&(p.current=k.isPropagationStopped(),p.current||k.stopPropagation())})}),g&&h.jsx($d,{control:m,bubbles:!p.current,name:r,value:u,checked:w,required:a,disabled:i,form:f,style:{transform:"translateX(-100%)"}})]})});Us.displayName=Sn;var Gs="SwitchThumb",Ks=c.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=Fd(Gs,n);return h.jsx(Vs.span,{"data-state":Hs(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Ks.displayName=Gs;var $d=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,s=c.useRef(null),a=_d(n),i=Xr(t);return c.useEffect(()=>{const u=s.current,l=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(l,"checked").set;if(a!==n&&d){const m=new Event("click",{bubbles:r});d.call(u,n),u.dispatchEvent(m)}},[a,n,r]),h.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Hs(e){return e?"checked":"unchecked"}var Ys=Us,zd=Ks;const Xs=c.forwardRef(({className:e,tabIndex:t=0,...n},r)=>h.jsx(Ys,{className:U(["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:r,children:h.jsx(zd,{className:U(["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"])})}));Xs.displayName=Ys.displayName;function Wd(e){const t=e+"CollectionProvider",[n,r]=de(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:p}=v,g=G.useRef(null),w=G.useRef(new Map).current;return h.jsx(o,{scope:b,itemMap:w,collectionRef:g,children:p})};a.displayName=t;const i=e+"CollectionSlot",u=G.forwardRef((v,b)=>{const{scope:p,children:g}=v,w=s(i,p),y=K(b,w.collectionRef);return h.jsx(q,{ref:y,children:g})});u.displayName=i;const l=e+"CollectionItemSlot",f="data-radix-collection-item",d=G.forwardRef((v,b)=>{const{scope:p,children:g,...w}=v,y=G.useRef(null),k=K(b,y),x=s(l,p);return G.useEffect(()=>(x.itemMap.set(y,{ref:y,...w}),()=>void x.itemMap.delete(y))),h.jsx(q,{[f]:"",ref:k,children:g})});d.displayName=l;function m(v){const b=s(e+"CollectionConsumer",v);return G.useCallback(()=>{const g=b.collectionRef.current;if(!g)return[];const w=Array.from(g.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((x,C)=>w.indexOf(x.ref.current)-w.indexOf(C.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:u,ItemSlot:d},m,r]}var Bd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],le=Bd.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?q:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function qs(e,t){e&&rt.flushSync(()=>e.dispatchEvent(t))}var Vd="DismissableLayer",jn="dismissableLayer.update",Ud="dismissableLayer.pointerDownOutside",Gd="dismissableLayer.focusOutside",Zs,Qs=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Js=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...u}=e,l=c.useContext(Qs),[f,d]=c.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=c.useState({}),b=K(t,E=>d(E)),p=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=p.indexOf(g),y=f?p.indexOf(f):-1,k=l.layersWithOutsidePointerEventsDisabled.size>0,x=y>=w,C=Hd(E=>{const A=E.target,O=[...l.branches].some(I=>I.contains(A));!x||O||(o==null||o(E),a==null||a(E),E.defaultPrevented||i==null||i())},m),P=Yd(E=>{const A=E.target;[...l.branches].some(I=>I.contains(A))||(s==null||s(E),a==null||a(E),E.defaultPrevented||i==null||i())},m);return vr(E=>{y===l.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},m),c.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Zs=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),ti(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Zs)}},[f,m,n,l]),c.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),ti())},[f,l]),c.useEffect(()=>{const E=()=>v({});return document.addEventListener(jn,E),()=>document.removeEventListener(jn,E)},[]),h.jsx(le.div,{...u,ref:b,style:{pointerEvents:k?x?"auto":"none":void 0,...e.style},onFocusCapture:M(e.onFocusCapture,P.onFocusCapture),onBlurCapture:M(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:M(e.onPointerDownCapture,C.onPointerDownCapture)})});Js.displayName=Vd;var Kd="DismissableLayerBranch",ei=c.forwardRef((e,t)=>{const n=c.useContext(Qs),r=c.useRef(null),o=K(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),h.jsx(le.div,{...e,ref:o})});ei.displayName=Kd;function Hd(e,t=globalThis==null?void 0:globalThis.document){const n=H(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let u=function(){ni(Ud,n,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Yd(e,t=globalThis==null?void 0:globalThis.document){const n=H(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&ni(Gd,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ti(){const e=new CustomEvent(jn);document.dispatchEvent(e)}function ni(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?qs(o,s):o.dispatchEvent(s)}var Xd=Js,qd=ei,Zd="Portal",ri=c.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,s]=c.useState(!1);Q(()=>s(!0),[]);const a=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?Dt.createPortal(h.jsx(le.div,{...r,ref:t}),a):null});ri.displayName=Zd;function Qd(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var oi=e=>{const{present:t,children:n}=e,r=Jd(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=K(r.ref,ef(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};oi.displayName="Presence";function Jd(e){const[t,n]=c.useState(),r=c.useRef({}),o=c.useRef(e),s=c.useRef("none"),a=e?"mounted":"unmounted",[i,u]=Qd(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const l=Pt(r.current);s.current=i==="mounted"?l:"none"},[i]),Q(()=>{const l=r.current,f=o.current;if(f!==e){const m=s.current,v=Pt(l);e?u("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(f&&m!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Q(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,d=v=>{const p=Pt(r.current).includes(v.animationName);if(v.target===t&&p&&(u("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(s.current=Pt(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Pt(e){return(e==null?void 0:e.animationName)||"none"}function ef(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var tf="VisuallyHidden",Pn=c.forwardRef((e,t)=>h.jsx(le.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}}));Pn.displayName=tf;var An="ToastProvider",[Tn,nf,rf]=Wd("Toast"),[si,Vf]=de("Toast",[rf]),[of,At]=si(An),ii=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:a}=e,[i,u]=c.useState(null),[l,f]=c.useState(0),d=c.useRef(!1),m=c.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${An}\`. Expected non-empty \`string\`.`),h.jsx(Tn.Provider,{scope:t,children:h.jsx(of,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:l,viewport:i,onViewportChange:u,onToastAdd:c.useCallback(()=>f(v=>v+1),[]),onToastRemove:c.useCallback(()=>f(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:m,children:a})})};ii.displayName=An;var ai="ToastViewport",sf=["F8"],Mn="toast.viewportPause",Nn="toast.viewportResume",ci=c.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=sf,label:o="Notifications ({hotkey})",...s}=e,a=At(ai,n),i=nf(n),u=c.useRef(null),l=c.useRef(null),f=c.useRef(null),d=c.useRef(null),m=K(t,d,a.onViewportChange),v=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=a.toastCount>0;c.useEffect(()=>{const g=w=>{var k;r.length!==0&&r.every(x=>w[x]||w.code===x)&&((k=d.current)==null||k.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[r]),c.useEffect(()=>{const g=u.current,w=d.current;if(b&&g&&w){const y=()=>{if(!a.isClosePausedRef.current){const P=new CustomEvent(Mn);w.dispatchEvent(P),a.isClosePausedRef.current=!0}},k=()=>{if(a.isClosePausedRef.current){const P=new CustomEvent(Nn);w.dispatchEvent(P),a.isClosePausedRef.current=!1}},x=P=>{!g.contains(P.relatedTarget)&&k()},C=()=>{g.contains(document.activeElement)||k()};return g.addEventListener("focusin",y),g.addEventListener("focusout",x),g.addEventListener("pointermove",y),g.addEventListener("pointerleave",C),window.addEventListener("blur",y),window.addEventListener("focus",k),()=>{g.removeEventListener("focusin",y),g.removeEventListener("focusout",x),g.removeEventListener("pointermove",y),g.removeEventListener("pointerleave",C),window.removeEventListener("blur",y),window.removeEventListener("focus",k)}}},[b,a.isClosePausedRef]);const p=c.useCallback(({tabbingDirection:g})=>{const y=i().map(k=>{const x=k.ref.current,C=[x,...wf(x)];return g==="forwards"?C:C.reverse()});return(g==="forwards"?y.reverse():y).flat()},[i]);return c.useEffect(()=>{const g=d.current;if(g){const w=y=>{var C,P,E;const k=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!k){const A=document.activeElement,O=y.shiftKey;if(y.target===g&&O){(C=l.current)==null||C.focus();return}const T=p({tabbingDirection:O?"backwards":"forwards"}),F=T.findIndex(S=>S===A);_n(T.slice(F+1))?y.preventDefault():O?(P=l.current)==null||P.focus():(E=f.current)==null||E.focus()}};return g.addEventListener("keydown",w),()=>g.removeEventListener("keydown",w)}},[i,p]),h.jsxs(qd,{ref:u,role:"region","aria-label":o.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&h.jsx(On,{ref:l,onFocusFromOutsideViewport:()=>{const g=p({tabbingDirection:"forwards"});_n(g)}}),h.jsx(Tn.Slot,{scope:n,children:h.jsx(le.ol,{tabIndex:-1,...s,ref:m})}),b&&h.jsx(On,{ref:f,onFocusFromOutsideViewport:()=>{const g=p({tabbingDirection:"backwards"});_n(g)}})]})});ci.displayName=ai;var li="ToastFocusProxy",On=c.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=At(li,n);return h.jsx(Pn,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var l;const i=a.relatedTarget;!((l=s.viewport)!=null&&l.contains(i))&&r()}})});On.displayName=li;var Tt="Toast",af="toast.swipeStart",cf="toast.swipeMove",lf="toast.swipeCancel",uf="toast.swipeEnd",ui=c.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...a}=e,[i=!0,u]=We({prop:r,defaultProp:o,onChange:s});return h.jsx(oi,{present:n||i,children:h.jsx(pf,{open:i,...a,ref:t,onClose:()=>u(!1),onPause:H(e.onPause),onResume:H(e.onResume),onSwipeStart:M(e.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:M(e.onSwipeMove,l=>{const{x:f,y:d}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:M(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:M(e.onSwipeEnd,l=>{const{x:f,y:d}=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",`${f}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),u(!1)})})})});ui.displayName=Tt;var[df,ff]=si(Tt,{onClose(){}}),pf=c.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:a,onEscapeKeyDown:i,onPause:u,onResume:l,onSwipeStart:f,onSwipeMove:d,onSwipeCancel:m,onSwipeEnd:v,...b}=e,p=At(Tt,n),[g,w]=c.useState(null),y=K(t,S=>w(S)),k=c.useRef(null),x=c.useRef(null),C=o||p.duration,P=c.useRef(0),E=c.useRef(C),A=c.useRef(0),{onToastAdd:O,onToastRemove:I}=p,L=H(()=>{var $;(g==null?void 0:g.contains(document.activeElement))&&(($=p.viewport)==null||$.focus()),a()}),T=c.useCallback(S=>{!S||S===1/0||(window.clearTimeout(A.current),P.current=new Date().getTime(),A.current=window.setTimeout(L,S))},[L]);c.useEffect(()=>{const S=p.viewport;if(S){const $=()=>{T(E.current),l==null||l()},_=()=>{const z=new Date().getTime()-P.current;E.current=E.current-z,window.clearTimeout(A.current),u==null||u()};return S.addEventListener(Mn,_),S.addEventListener(Nn,$),()=>{S.removeEventListener(Mn,_),S.removeEventListener(Nn,$)}}},[p.viewport,C,u,l,T]),c.useEffect(()=>{s&&!p.isClosePausedRef.current&&T(C)},[s,C,p.isClosePausedRef,T]),c.useEffect(()=>(O(),()=>I()),[O,I]);const F=c.useMemo(()=>g?vi(g):null,[g]);return p.viewport?h.jsxs(h.Fragment,{children:[F&&h.jsx(mf,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:F}),h.jsx(df,{scope:n,onClose:L,children:rt.createPortal(h.jsx(Tn.ItemSlot,{scope:n,children:h.jsx(Xd,{asChild:!0,onEscapeKeyDown:M(i,()=>{p.isFocusedToastEscapeKeyDownRef.current||L(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:h.jsx(le.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":p.swipeDirection,...b,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:M(e.onKeyDown,S=>{S.key==="Escape"&&(i==null||i(S.nativeEvent),S.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:M(e.onPointerDown,S=>{S.button===0&&(k.current={x:S.clientX,y:S.clientY})}),onPointerMove:M(e.onPointerMove,S=>{if(!k.current)return;const $=S.clientX-k.current.x,_=S.clientY-k.current.y,z=!!x.current,N=["left","right"].includes(p.swipeDirection),j=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,W=N?j(0,$):0,B=N?0:j(0,_),Z=S.pointerType==="touch"?10:2,ue={x:W,y:B},Ce={originalEvent:S,delta:ue};z?(x.current=ue,Mt(cf,d,Ce,{discrete:!1})):bi(ue,p.swipeDirection,Z)?(x.current=ue,Mt(af,f,Ce,{discrete:!1}),S.target.setPointerCapture(S.pointerId)):(Math.abs($)>Z||Math.abs(_)>Z)&&(k.current=null)}),onPointerUp:M(e.onPointerUp,S=>{const $=x.current,_=S.target;if(_.hasPointerCapture(S.pointerId)&&_.releasePointerCapture(S.pointerId),x.current=null,k.current=null,$){const z=S.currentTarget,N={originalEvent:S,delta:$};bi($,p.swipeDirection,p.swipeThreshold)?Mt(uf,v,N,{discrete:!0}):Mt(lf,m,N,{discrete:!0}),z.addEventListener("click",j=>j.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),mf=e=>{const{__scopeToast:t,children:n,...r}=e,o=At(Tt,t),[s,a]=c.useState(!1),[i,u]=c.useState(!1);return vf(()=>a(!0)),c.useEffect(()=>{const l=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(l)},[]),i?null:h.jsx(ri,{asChild:!0,children:h.jsx(Pn,{...r,children:s&&h.jsxs(h.Fragment,{children:[o.label," ",n]})})})},hf="ToastTitle",di=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return h.jsx(le.div,{...r,ref:t})});di.displayName=hf;var gf="ToastDescription",fi=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return h.jsx(le.div,{...r,ref:t})});fi.displayName=gf;var pi="ToastAction",mi=c.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?h.jsx(gi,{altText:n,asChild:!0,children:h.jsx(In,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${pi}\`. Expected non-empty \`string\`.`),null)});mi.displayName=pi;var hi="ToastClose",In=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=ff(hi,n);return h.jsx(gi,{asChild:!0,children:h.jsx(le.button,{type:"button",...r,ref:t,onClick:M(e.onClick,o.onClose)})})});In.displayName=hi;var gi=c.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return h.jsx(le.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function vi(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),bf(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...vi(r))}}),t}function Mt(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?qs(o,s):o.dispatchEvent(s)}var bi=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function vf(e=()=>{}){const t=H(e);Q(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function bf(e){return e.nodeType===e.ELEMENT_NODE}function wf(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _n(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var yf=ii,wi=ci,yi=ui,ki=di,xi=fi,Ci=mi,Ei=In;const kf=1,xf=1e6;let Dn=0;function Cf(){return Dn=(Dn+1)%Number.MAX_SAFE_INTEGER,Dn.toString()}const Rn=new Map,Si=e=>{if(Rn.has(e))return;const t=setTimeout(()=>{Rn.delete(e),Je({type:"REMOVE_TOAST",toastId:e})},xf);Rn.set(e,t)},Ef=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,kf)};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?Si(n):e.toasts.forEach(r=>{Si(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Nt=[];let Ot={toasts:[]};function Je(e){Ot=Ef(Ot,e),Nt.forEach(t=>{t(Ot)})}function Sf({...e}){const t=Cf(),n=o=>Je({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>Je({type:"DISMISS_TOAST",toastId:t});return Je({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function ji(){const[e,t]=c.useState(Ot);return c.useEffect(()=>(Nt.push(t),()=>{const n=Nt.indexOf(t);n>-1&&Nt.splice(n,1)}),[e]),{...e,toast:Sf,dismiss:n=>Je({type:"DISMISS_TOAST",toastId:n})}}const jf=yf,Pi=c.forwardRef(({className:e,...t},n)=>h.jsx(wi,{ref:n,className:U(["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","md:ksjsui-max-w-[420px]"],e),...t}));Pi.displayName=wi.displayName;const Pf=Le(["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-transition-all","rtl:ksjsui-space-x-reverse","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","ltr:data-[state=closed]:ksjsui-slide-out-to-right-full","rtl:data-[state=closed]:ksjsui-slide-out-to-left-full"]),Ai=c.forwardRef(({className:e,...t},n)=>h.jsx(yi,{ref:n,className:U(Pf(),e),...t}));Ai.displayName=yi.displayName;const Af=c.forwardRef(({className:e,...t},n)=>h.jsx(Ci,{ref:n,className:U(["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}));Af.displayName=Ci.displayName;const Ti=c.forwardRef(({className:e,...t},n)=>h.jsx(Ei,{ref:n,className:U(["ksjsui-rounded-sm ksjsui-p-1 ksjsui-text-current ksjsui-transition-opacity","focus:ksjsui-outline-none focus:ksjsui-ring-2"],e),"toast-close":"",...t,children:h.jsx(xd,{className:"ksjsui-size-6"})}));Ti.displayName=Ei.displayName;const Mi=c.forwardRef(({className:e,...t},n)=>h.jsx(ki,{ref:n,className:U("ksjsui-text-sm ksjsui-font-semibold",e),...t}));Mi.displayName=ki.displayName;const Ni=c.forwardRef(({className:e,...t},n)=>h.jsx(xi,{ref:n,className:U("ksjsui-text-sm ksjsui-opacity-90",e),...t}));Ni.displayName=xi.displayName;const Tf=()=>{const{toasts:e}=ji();return h.jsxs(jf,{children:[e.map(function({id:t,title:n,description:r,action:o,icon:s,...a}){return h.jsxs(Ai,{...a,className:"ksjsui-flex ksjsui-gap-x-2",children:[s&&h.jsx("div",{className:"ksjsui-shrink-0",children:s}),h.jsxs("div",{className:"ksjsui-grid ksjsui-gap-1 ksjsui-grow",children:[n&&h.jsx(Mi,{children:n}),r&&h.jsx(Ni,{children:r})]}),o,h.jsx(Ti,{})]},t)}),h.jsx(Pi,{})]})},Ln=["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],Mf=[...Ln,"auto"];function Nf(){return Ln.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 Oi(){return Mf.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 Ii(){return Ln.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 Of=Le("",{variants:{display:{block:"ksjsui-block","inline-block":"ksjsui-inline-block",none:"ksjsui-hidden"},...Oi(),...Ii()},defaultVariants:{display:"block"}}),_i=c.forwardRef(({as:e="div",asChild:t,className:n,display:r,m:o,mb:s,me:a,ms:i,mt:u,mx:l,my:f,p:d,pb:m,pe:v,ps:b,pt:p,px:g,py:w,...y},k)=>{const x=t?q:e;return h.jsx(x,{className:U(Of({display:r,m:o,mb:s,me:a,ms:i,mt:u,mx:l,my:f,p:d,pb:m,pe:v,ps:b,pt:p,px:g,py:w,className:n})),ref:k,...y})});_i.displayName="Box";const If={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"},...Nf(),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"},...Oi(),...Ii(),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"}},_f=Le("ksjsui-inline-flex",{variants:{...If},defaultVariants:{display:"flex",justify:"start"}}),Di=c.forwardRef(({align:e,as:t="div",asChild:n,className:r,display:o,direction:s,gap:a,gapColumn:i,gapRow:u,grow:l,justify:f,m:d,mb:m,me:v,ms:b,mt:p,mx:g,my:w,p:y,pb:k,pe:x,ps:C,pt:P,px:E,py:A,self:O,shrink:I,wrap:L,...T},F)=>{const S=n?q:t;return h.jsx(S,{className:U(_f({align:e,direction:s,display:o,gap:a,gapColumn:i,gapRow:u,grow:l,justify:f,m:d,mb:m,me:v,ms:b,mt:p,mx:g,my:w,p:y,pb:k,pe:x,ps:C,pt:P,px:E,py:A,self:O,shrink:I,wrap:L,className:r})),ref:F,...T})});Di.displayName="Flex",R.Avatar=ur,R.AvatarFallback=fr,R.AvatarImage=dr,R.Box=_i,R.Button=Bt,R.DirectionProvider=Ia,R.DropdownMenu=Cd,R.DropdownMenuCheckboxItem=Is,R.DropdownMenuContent=Ns,R.DropdownMenuGroup=Sd,R.DropdownMenuItem=Os,R.DropdownMenuLabel=Ds,R.DropdownMenuPortal=jd,R.DropdownMenuRadioGroup=Ad,R.DropdownMenuRadioItem=_s,R.DropdownMenuSeparator=Rs,R.DropdownMenuShortcut=Ls,R.DropdownMenuSub=Pd,R.DropdownMenuSubContent=Ms,R.DropdownMenuSubTrigger=Ts,R.DropdownMenuTrigger=Ed,R.Flex=Di,R.IconButton=Fs,R.Separator=Bs,R.Switch=Xs,R.Toast=Tf,R.useToast=ji,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|