@capitaltg/vero 1.7.4 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +66 -68
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +3641 -3411
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +48 -8
- package/package.json +1 -2
package/dist/index.cjs
CHANGED
|
@@ -1,108 +1,110 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),E=require("react"),Ws=require("react-dom");function Bs(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const l=Bs(E),En=Bs(Ws);function Vs(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=Vs(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ys(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Vs(e))&&(r&&(r+=" "),r+=t);return r}const Wo="-",sm=e=>{const t=cm(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const s=i.split(Wo);return s[0]===""&&s.length!==1&&s.shift(),Hs(s,t)||im(i)},getConflictingClassGroupIds:(i,s)=>{const c=n[i]||[];return s&&r[i]?[...c,...r[i]]:c}}},Hs=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Hs(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Wo);return(i=t.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},Ga=/^\[(.+)\]$/,im=e=>{if(Ga.test(e)){const t=Ga.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},cm=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return um(Object.entries(e.classGroups),n).forEach(([a,i])=>{go(i,r,a,t)}),r},go=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:za(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(lm(o)){go(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,i])=>{go(i,za(t,a),n,r)})})},za=(e,t)=>{let n=e;return t.split(Wo).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},lm=e=>e.isThemeGetter,um=(e,t)=>t?e.map(([n,r])=>{const o=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[n,o]}):e,dm=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,i)=>{n.set(a,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let i=n.get(a);if(i!==void 0)return i;if((i=r.get(a))!==void 0)return o(a,i),i},set(a,i){n.has(a)?n.set(a,i):o(a,i)}}},Gs="!",fm=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,i=s=>{const c=[];let u=0,d=0,m;for(let v=0;v<s.length;v++){let b=s[v];if(u===0){if(b===o&&(r||s.slice(v,v+a)===t)){c.push(s.slice(d,v)),d=v+a;continue}if(b==="/"){m=v;continue}}b==="["?u++:b==="]"&&u--}const p=c.length===0?s:s.substring(d),h=p.startsWith(Gs),y=h?p.substring(1):p,g=m&&m>d?m-d:void 0;return{modifiers:c,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:g}};return n?s=>n({className:s,parseClassName:i}):i},mm=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},pm=e=>({cache:dm(e.cacheSize),parseClassName:fm(e),...sm(e)}),hm=/\s+/,gm=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(hm);let s="";for(let c=i.length-1;c>=0;c-=1){const u=i[c],{modifiers:d,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:h}=n(u);let y=!!h,g=r(y?p.substring(0,h):p);if(!g){if(!y){s=u+(s.length>0?" "+s:s);continue}if(g=r(p),!g){s=u+(s.length>0?" "+s:s);continue}y=!1}const v=mm(d).join(":"),b=m?v+Gs:v,x=b+g;if(a.includes(x))continue;a.push(x);const w=o(g,y);for(let S=0;S<w.length;++S){const C=w[S];a.push(b+C)}s=u+(s.length>0?" "+s:s)}return s};function vm(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=zs(t))&&(r&&(r+=" "),r+=n);return r}const zs=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=zs(e[r]))&&(n&&(n+=" "),n+=t);return n};function ym(e,...t){let n,r,o,a=i;function i(c){const u=t.reduce((d,m)=>m(d),e());return n=pm(u),r=n.cache.get,o=n.cache.set,a=s,s(c)}function s(c){const u=r(c);if(u)return u;const d=gm(c,n);return o(c,d),d}return function(){return a(vm.apply(null,arguments))}}const ue=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Us=/^\[(?:([a-z-]+):)?(.+)\]$/i,bm=/^\d+\/\d+$/,xm=new Set(["px","full","screen"]),wm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Cm=/\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$/,Sm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Em=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nt=e=>Wt(e)||xm.has(e)||bm.test(e),lt=e=>Ut(e,"length",Am),Wt=e=>!!e&&!Number.isNaN(Number(e)),Kr=e=>Ut(e,"number",Wt),an=e=>!!e&&Number.isInteger(Number(e)),Mm=e=>e.endsWith("%")&&Wt(e.slice(0,-1)),ee=e=>Us.test(e),ut=e=>wm.test(e),Rm=new Set(["length","size","percentage"]),Pm=e=>Ut(e,Rm,Ks),km=e=>Ut(e,"position",Ks),Om=new Set(["image","url"]),Dm=e=>Ut(e,Om,_m),Im=e=>Ut(e,"",Tm),sn=()=>!0,Ut=(e,t,n)=>{const r=Us.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Am=e=>Cm.test(e)&&!Sm.test(e),Ks=()=>!1,Tm=e=>Em.test(e),_m=e=>Nm.test(e),jm=()=>{const e=ue("colors"),t=ue("spacing"),n=ue("blur"),r=ue("brightness"),o=ue("borderColor"),a=ue("borderRadius"),i=ue("borderSpacing"),s=ue("borderWidth"),c=ue("contrast"),u=ue("grayscale"),d=ue("hueRotate"),m=ue("invert"),p=ue("gap"),h=ue("gradientColorStops"),y=ue("gradientColorStopPositions"),g=ue("inset"),v=ue("margin"),b=ue("opacity"),x=ue("padding"),w=ue("saturate"),S=ue("scale"),C=ue("sepia"),M=ue("skew"),N=ue("space"),P=ue("translate"),F=()=>["auto","contain","none"],_=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",ee,t],I=()=>[ee,t],B=()=>["",nt,lt],Y=()=>["auto",Wt,ee],q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],j=()=>["solid","dashed","dotted","double","none"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],T=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",ee],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J=()=>[Wt,ee];return{cacheSize:500,separator:":",theme:{colors:[sn],spacing:[nt,lt],blur:["none","",ut,ee],brightness:J(),borderColor:[e],borderRadius:["none","","full",ut,ee],borderSpacing:I(),borderWidth:B(),contrast:J(),grayscale:D(),hueRotate:J(),invert:D(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[Mm,lt],inset:$(),margin:$(),opacity:J(),padding:I(),saturate:J(),scale:J(),sepia:D(),skew:J(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",ee]}],container:["container"],columns:[{columns:[ut]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"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:[...q(),ee]}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",an,ee]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ee]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",an,ee]}],"grid-cols":[{"grid-cols":[sn]}],"col-start-end":[{col:["auto",{span:["full",an,ee]},ee]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[sn]}],"row-start-end":[{row:["auto",{span:[an,ee]},ee]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ee]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ee]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...T()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...T(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...T(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ee,t]}],"min-w":[{"min-w":[ee,t,"min","max","fit"]}],"max-w":[{"max-w":[ee,t,"none","full","min","max","fit","prose",{screen:[ut]},ut]}],h:[{h:[ee,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ee,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ut,lt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Kr]}],"font-family":[{font:[sn]}],"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",ee]}],"line-clamp":[{"line-clamp":["none",Wt,Kr]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",nt,ee]}],"list-image":[{"list-image":["none",ee]}],"list-style-type":[{list:["none","disc","decimal",ee]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",nt,lt]}],"underline-offset":[{"underline-offset":["auto",nt,ee]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee]}],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",ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...q(),km]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Pm]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Dm]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...j(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:j()}],"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:["",...j()]}],"outline-offset":[{"outline-offset":[nt,ee]}],"outline-w":[{outline:[nt,lt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[nt,lt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ut,Im]}],"shadow-color":[{shadow:[sn]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...G(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",ut,ee]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[m]}],saturate:[{saturate:[w]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ee]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",ee]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",ee]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[an,ee]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ee]}],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",ee]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[nt,lt,Kr]}],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"]}}},Fm=ym(jm);function k(...e){return Fm(Ys(e))}const ge=(e,...t)=>String.raw({raw:e},...t);function $m(e,t){const n=l.createContext(t),r=a=>{const{children:i,...s}=a,c=l.useMemo(()=>s,Object.values(s));return f.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(a){const i=l.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function ve(e,t=[]){let n=[];function r(a,i){const s=l.createContext(i),c=n.length;n=[...n,i];const u=m=>{var b;const{scope:p,children:h,...y}=m,g=((b=p==null?void 0:p[e])==null?void 0:b[c])||s,v=l.useMemo(()=>y,Object.values(y));return f.jsx(g.Provider,{value:v,children:h})};u.displayName=a+"Provider";function d(m,p){var g;const h=((g=p==null?void 0:p[e])==null?void 0:g[c])||s,y=l.useContext(h);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${m}\` must be used within \`${a}\``)}return[u,d]}const o=()=>{const a=n.map(i=>l.createContext(i));return function(s){const c=(s==null?void 0:s[e])||a;return l.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,Lm(o,...t)]}function Lm(...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(a){const i=r.reduce((s,{useScope:c,scopeName:u})=>{const m=c(a)[`__scope${u}`];return{...s,...m}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Ua(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ke(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Ua(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Ua(e[o],null)}}}}function U(...e){return l.useCallback(Ke(...e),e)}function pt(e){const t=Bm(e),n=l.forwardRef((r,o)=>{const{children:a,...i}=r,s=l.Children.toArray(a),c=s.find(Ym);if(c){const u=c.props.children,d=s.map(m=>m===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:m);return f.jsx(t,{...i,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Wm=pt("Slot");function Bm(e){const t=l.forwardRef((n,r)=>{const{children:o,...a}=n;if(l.isValidElement(o)){const i=Gm(o),s=Hm(a,o.props);return o.type!==l.Fragment&&(s.ref=r?Ke(r,i):i),l.cloneElement(o,s)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Vm=Symbol("radix.slottable");function Ym(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vm}function Hm(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...s)=>{a(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Gm(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)}function Nn(e){const t=e+"CollectionProvider",[n,r]=ve(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:v,children:b}=g,x=E.useRef(null),w=E.useRef(new Map).current;return f.jsx(o,{scope:v,itemMap:w,collectionRef:x,children:b})};i.displayName=t;const s=e+"CollectionSlot",c=pt(s),u=E.forwardRef((g,v)=>{const{scope:b,children:x}=g,w=a(s,b),S=U(v,w.collectionRef);return f.jsx(c,{ref:S,children:x})});u.displayName=s;const d=e+"CollectionItemSlot",m="data-radix-collection-item",p=pt(d),h=E.forwardRef((g,v)=>{const{scope:b,children:x,...w}=g,S=E.useRef(null),C=U(v,S),M=a(d,b);return E.useEffect(()=>(M.itemMap.set(S,{ref:S,...w}),()=>void M.itemMap.delete(S))),f.jsx(p,{[m]:"",ref:C,children:x})});h.displayName=d;function y(g){const v=a(e+"CollectionConsumer",g);return E.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${m}]`));return Array.from(v.itemMap.values()).sort((M,N)=>w.indexOf(M.ref.current)-w.indexOf(N.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},y,r]}function O(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var de=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},zm=l[" useInsertionEffect ".trim().toString()]||de;function Ce({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=Um({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:o;{const d=l.useRef(e!==void 0);l.useEffect(()=>{const m=d.current;m!==s&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=s},[s,r])}const u=l.useCallback(d=>{var m;if(s){const p=Km(d)?d(e):d;p!==e&&((m=i.current)==null||m.call(i,p))}else a(d)},[s,e,a,i]);return[c,u]}function Um({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),o=l.useRef(n),a=l.useRef(t);return zm(()=>{a.current=t},[t]),l.useEffect(()=>{var i;o.current!==n&&((i=a.current)==null||i.call(a,n),o.current=n)},[n,o]),[n,r,a]}function Km(e){return typeof e=="function"}var qm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],V=qm.reduce((e,t)=>{const n=pt(`Primitive.${t}`),r=l.forwardRef((o,a)=>{const{asChild:i,...s}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function qs(e,t){e&&En.flushSync(()=>e.dispatchEvent(t))}function Xm(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Xs=e=>{const{present:t,children:n}=e,r=Zm(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=U(r.ref,Qm(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};Xs.displayName="Presence";function Zm(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=Xm(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Yn(r.current);a.current=s==="mounted"?u:"none"},[s]),de(()=>{const u=r.current,d=o.current;if(d!==e){const p=a.current,h=Yn(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),de(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,m=h=>{const g=Yn(r.current).includes(h.animationName);if(h.target===t&&g&&(c("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(a.current=Yn(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Yn(e){return(e==null?void 0:e.animationName)||"none"}function Qm(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 Jm=l[" useId ".trim().toString()]||(()=>{}),ep=0;function pe(e){const[t,n]=l.useState(Jm());return de(()=>{n(r=>r??String(ep++))},[e]),e||(t?`radix-${t}`:"")}var ur="Collapsible",[tp,Zs]=ve(ur),[np,Bo]=tp(ur),Qs=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...s}=e,[c,u]=Ce({prop:r,defaultProp:o??!1,onChange:i,caller:ur});return f.jsx(np,{scope:n,disabled:a,contentId:pe(),open:c,onOpenToggle:l.useCallback(()=>u(d=>!d),[u]),children:f.jsx(V.div,{"data-state":Yo(c),"data-disabled":a?"":void 0,...s,ref:t})})});Qs.displayName=ur;var Js="CollapsibleTrigger",ei=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Bo(Js,n);return f.jsx(V.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Yo(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:O(e.onClick,o.onOpenToggle)})});ei.displayName=Js;var Vo="CollapsibleContent",ti=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Bo(Vo,e.__scopeCollapsible);return f.jsx(Xs,{present:n||o.open,children:({present:a})=>f.jsx(rp,{...r,ref:t,present:a})})});ti.displayName=Vo;var rp=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=Bo(Vo,n),[s,c]=l.useState(r),u=l.useRef(null),d=U(t,u),m=l.useRef(0),p=m.current,h=l.useRef(0),y=h.current,g=i.open||s,v=l.useRef(g),b=l.useRef(void 0);return l.useEffect(()=>{const x=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(x)},[]),de(()=>{const x=u.current;if(x){b.current=b.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();m.current=w.height,h.current=w.width,v.current||(x.style.transitionDuration=b.current.transitionDuration,x.style.animationName=b.current.animationName),c(r)}},[i.open,r]),f.jsx(V.div,{"data-state":Yo(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...a,ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:g&&o})});function Yo(e){return e?"open":"closed"}var op=Qs,ap=ei,sp=ti,ip=l.createContext(void 0);function bt(e){const t=l.useContext(ip);return e||t||"ltr"}var We="Accordion",cp=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Ho,lp,up]=Nn(We),[dr,DE]=ve(We,[up,Zs]),Go=Zs(),ni=E.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return f.jsx(Ho.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?f.jsx(pp,{...a,ref:t}):f.jsx(mp,{...o,ref:t})})});ni.displayName=We;var[ri,dp]=dr(We),[oi,fp]=dr(We,{collapsible:!1}),mp=E.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[s,c]=Ce({prop:n,defaultProp:r??"",onChange:o,caller:We});return f.jsx(ri,{scope:e.__scopeAccordion,value:E.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:E.useCallback(()=>a&&c(""),[a,c]),children:f.jsx(oi,{scope:e.__scopeAccordion,collapsible:a,children:f.jsx(ai,{...i,ref:t})})})}),pp=E.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,s]=Ce({prop:n,defaultProp:r??[],onChange:o,caller:We}),c=E.useCallback(d=>s((m=[])=>[...m,d]),[s]),u=E.useCallback(d=>s((m=[])=>m.filter(p=>p!==d)),[s]);return f.jsx(ri,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:u,children:f.jsx(oi,{scope:e.__scopeAccordion,collapsible:!0,children:f.jsx(ai,{...a,ref:t})})})}),[hp,fr]=dr(We),ai=E.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...i}=e,s=E.useRef(null),c=U(s,t),u=lp(n),m=bt(o)==="ltr",p=O(e.onKeyDown,h=>{var P;if(!cp.includes(h.key))return;const y=h.target,g=u().filter(F=>{var _;return!((_=F.ref.current)!=null&&_.disabled)}),v=g.findIndex(F=>F.ref.current===y),b=g.length;if(v===-1)return;h.preventDefault();let x=v;const w=0,S=b-1,C=()=>{x=v+1,x>S&&(x=w)},M=()=>{x=v-1,x<w&&(x=S)};switch(h.key){case"Home":x=w;break;case"End":x=S;break;case"ArrowRight":a==="horizontal"&&(m?C():M());break;case"ArrowDown":a==="vertical"&&C();break;case"ArrowLeft":a==="horizontal"&&(m?M():C());break;case"ArrowUp":a==="vertical"&&M();break}const N=x%b;(P=g[N].ref.current)==null||P.focus()});return f.jsx(hp,{scope:n,disabled:r,direction:o,orientation:a,children:f.jsx(Ho.Slot,{scope:n,children:f.jsx(V.div,{...i,"data-orientation":a,ref:c,onKeyDown:r?void 0:p})})})}),tr="AccordionItem",[gp,zo]=dr(tr),si=E.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=fr(tr,n),i=dp(tr,n),s=Go(n),c=pe(),u=r&&i.value.includes(r)||!1,d=a.disabled||e.disabled;return f.jsx(gp,{scope:n,open:u,disabled:d,triggerId:c,children:f.jsx(op,{"data-orientation":a.orientation,"data-state":fi(u),...s,...o,ref:t,disabled:d,open:u,onOpenChange:m=>{m?i.onItemOpen(r):i.onItemClose(r)}})})});si.displayName=tr;var ii="AccordionHeader",ci=E.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=fr(We,n),a=zo(ii,n);return f.jsx(V.h3,{"data-orientation":o.orientation,"data-state":fi(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});ci.displayName=ii;var vo="AccordionTrigger",li=E.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=fr(We,n),a=zo(vo,n),i=fp(vo,n),s=Go(n);return f.jsx(Ho.ItemSlot,{scope:n,children:f.jsx(ap,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...s,...r,ref:t})})});li.displayName=vo;var ui="AccordionContent",di=E.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=fr(We,n),a=zo(ui,n),i=Go(n);return f.jsx(sp,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...i,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});di.displayName=ui;function fi(e){return e?"open":"closed"}var Ka=ni,vp=si,yp=ci,bp=li,xp=di;/**
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),N=require("react"),Vs=require("react-dom");function Ys(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const l=Ys(N),Sn=Ys(Vs);function Hs(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=Hs(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Gs(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Hs(e))&&(r&&(r+=" "),r+=t);return r}const Vo="-",gm=e=>{const t=ym(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const s=i.split(Vo);return s[0]===""&&s.length!==1&&s.shift(),Us(s,t)||vm(i)},getConflictingClassGroupIds:(i,s)=>{const c=n[i]||[];return s&&r[i]?[...c,...r[i]]:c}}},Us=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Us(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Vo);return(i=t.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},za=/^\[(.+)\]$/,vm=e=>{if(za.test(e)){const t=za.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},ym=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return xm(Object.entries(e.classGroups),n).forEach(([a,i])=>{yo(i,r,a,t)}),r},yo=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Ka(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(bm(o)){yo(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,i])=>{yo(i,Ka(t,a),n,r)})})},Ka=(e,t)=>{let n=e;return t.split(Vo).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},bm=e=>e.isThemeGetter,xm=(e,t)=>t?e.map(([n,r])=>{const o=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[n,o]}):e,wm=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,i)=>{n.set(a,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let i=n.get(a);if(i!==void 0)return i;if((i=r.get(a))!==void 0)return o(a,i),i},set(a,i){n.has(a)?n.set(a,i):o(a,i)}}},zs="!",Cm=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,i=s=>{const c=[];let u=0,d=0,m;for(let v=0;v<s.length;v++){let b=s[v];if(u===0){if(b===o&&(r||s.slice(v,v+a)===t)){c.push(s.slice(d,v)),d=v+a;continue}if(b==="/"){m=v;continue}}b==="["?u++:b==="]"&&u--}const p=c.length===0?s:s.substring(d),h=p.startsWith(zs),y=h?p.substring(1):p,g=m&&m>d?m-d:void 0;return{modifiers:c,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:g}};return n?s=>n({className:s,parseClassName:i}):i},Sm=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},Nm=e=>({cache:wm(e.cacheSize),parseClassName:Cm(e),...gm(e)}),Em=/\s+/,Mm=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(Em);let s="";for(let c=i.length-1;c>=0;c-=1){const u=i[c],{modifiers:d,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:h}=n(u);let y=!!h,g=r(y?p.substring(0,h):p);if(!g){if(!y){s=u+(s.length>0?" "+s:s);continue}if(g=r(p),!g){s=u+(s.length>0?" "+s:s);continue}y=!1}const v=Sm(d).join(":"),b=m?v+zs:v,x=b+g;if(a.includes(x))continue;a.push(x);const w=o(g,y);for(let S=0;S<w.length;++S){const C=w[S];a.push(b+C)}s=u+(s.length>0?" "+s:s)}return s};function Rm(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ks(t))&&(r&&(r+=" "),r+=n);return r}const Ks=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ks(e[r]))&&(n&&(n+=" "),n+=t);return n};function Pm(e,...t){let n,r,o,a=i;function i(c){const u=t.reduce((d,m)=>m(d),e());return n=Nm(u),r=n.cache.get,o=n.cache.set,a=s,s(c)}function s(c){const u=r(c);if(u)return u;const d=Mm(c,n);return o(c,d),d}return function(){return a(Rm.apply(null,arguments))}}const ue=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},qs=/^\[(?:([a-z-]+):)?(.+)\]$/i,km=/^\d+\/\d+$/,Om=new Set(["px","full","screen"]),Im=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Dm=/\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$/,Tm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Am=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_m=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nt=e=>Bt(e)||Om.has(e)||km.test(e),ut=e=>Kt(e,"length",Ym),Bt=e=>!!e&&!Number.isNaN(Number(e)),Xr=e=>Kt(e,"number",Bt),on=e=>!!e&&Number.isInteger(Number(e)),jm=e=>e.endsWith("%")&&Bt(e.slice(0,-1)),ee=e=>qs.test(e),dt=e=>Im.test(e),Fm=new Set(["length","size","percentage"]),$m=e=>Kt(e,Fm,Xs),Lm=e=>Kt(e,"position",Xs),Wm=new Set(["image","url"]),Bm=e=>Kt(e,Wm,Gm),Vm=e=>Kt(e,"",Hm),an=()=>!0,Kt=(e,t,n)=>{const r=qs.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Ym=e=>Dm.test(e)&&!Tm.test(e),Xs=()=>!1,Hm=e=>Am.test(e),Gm=e=>_m.test(e),Um=()=>{const e=ue("colors"),t=ue("spacing"),n=ue("blur"),r=ue("brightness"),o=ue("borderColor"),a=ue("borderRadius"),i=ue("borderSpacing"),s=ue("borderWidth"),c=ue("contrast"),u=ue("grayscale"),d=ue("hueRotate"),m=ue("invert"),p=ue("gap"),h=ue("gradientColorStops"),y=ue("gradientColorStopPositions"),g=ue("inset"),v=ue("margin"),b=ue("opacity"),x=ue("padding"),w=ue("saturate"),S=ue("scale"),C=ue("sepia"),M=ue("skew"),E=ue("space"),P=ue("translate"),F=()=>["auto","contain","none"],_=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",ee,t],D=()=>[ee,t],B=()=>["",nt,ut],Y=()=>["auto",Bt,ee],q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],j=()=>["solid","dashed","dotted","double","none"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",ee],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J=()=>[Bt,ee];return{cacheSize:500,separator:":",theme:{colors:[an],spacing:[nt,ut],blur:["none","",dt,ee],brightness:J(),borderColor:[e],borderRadius:["none","","full",dt,ee],borderSpacing:D(),borderWidth:B(),contrast:J(),grayscale:I(),hueRotate:J(),invert:I(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[jm,ut],inset:$(),margin:$(),opacity:J(),padding:D(),saturate:J(),scale:J(),sepia:I(),skew:J(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",ee]}],container:["container"],columns:[{columns:[dt]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"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:[...q(),ee]}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",on,ee]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ee]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",on,ee]}],"grid-cols":[{"grid-cols":[an]}],"col-start-end":[{col:["auto",{span:["full",on,ee]},ee]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[an]}],"row-start-end":[{row:["auto",{span:[on,ee]},ee]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ee]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ee]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"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",ee,t]}],"min-w":[{"min-w":[ee,t,"min","max","fit"]}],"max-w":[{"max-w":[ee,t,"none","full","min","max","fit","prose",{screen:[dt]},dt]}],h:[{h:[ee,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ee,t,"auto","min","max","fit"]}],"font-size":[{text:["base",dt,ut]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Xr]}],"font-family":[{font:[an]}],"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",ee]}],"line-clamp":[{"line-clamp":["none",Bt,Xr]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",nt,ee]}],"list-image":[{"list-image":["none",ee]}],"list-style-type":[{list:["none","disc","decimal",ee]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",nt,ut]}],"underline-offset":[{"underline-offset":["auto",nt,ee]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee]}],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",ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...q(),Lm]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",$m]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Bm]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...j(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:j()}],"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:["",...j()]}],"outline-offset":[{"outline-offset":[nt,ee]}],"outline-w":[{outline:[nt,ut]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[nt,ut]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",dt,Vm]}],"shadow-color":[{shadow:[an]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...G(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",dt,ee]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[m]}],saturate:[{saturate:[w]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ee]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",ee]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",ee]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[on,ee]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ee]}],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",ee]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[nt,ut,Xr]}],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"]}}},zm=Pm(Um);function k(...e){return zm(Gs(e))}const ge=(e,...t)=>String.raw({raw:e},...t);function Km(e,t){const n=l.createContext(t),r=a=>{const{children:i,...s}=a,c=l.useMemo(()=>s,Object.values(s));return f.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(a){const i=l.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function ve(e,t=[]){let n=[];function r(a,i){const s=l.createContext(i),c=n.length;n=[...n,i];const u=m=>{var b;const{scope:p,children:h,...y}=m,g=((b=p==null?void 0:p[e])==null?void 0:b[c])||s,v=l.useMemo(()=>y,Object.values(y));return f.jsx(g.Provider,{value:v,children:h})};u.displayName=a+"Provider";function d(m,p){var g;const h=((g=p==null?void 0:p[e])==null?void 0:g[c])||s,y=l.useContext(h);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${m}\` must be used within \`${a}\``)}return[u,d]}const o=()=>{const a=n.map(i=>l.createContext(i));return function(s){const c=(s==null?void 0:s[e])||a;return l.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,qm(o,...t)]}function qm(...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(a){const i=r.reduce((s,{useScope:c,scopeName:u})=>{const m=c(a)[`__scope${u}`];return{...s,...m}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function qa(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function qe(...e){return t=>{let n=!1;const r=e.map(o=>{const a=qa(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():qa(e[o],null)}}}}function z(...e){return l.useCallback(qe(...e),e)}function ht(e){const t=Zm(e),n=l.forwardRef((r,o)=>{const{children:a,...i}=r,s=l.Children.toArray(a),c=s.find(Jm);if(c){const u=c.props.children,d=s.map(m=>m===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:m);return f.jsx(t,{...i,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Xm=ht("Slot");function Zm(e){const t=l.forwardRef((n,r)=>{const{children:o,...a}=n;if(l.isValidElement(o)){const i=tp(o),s=ep(a,o.props);return o.type!==l.Fragment&&(s.ref=r?qe(r,i):i),l.cloneElement(o,s)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qm=Symbol("radix.slottable");function Jm(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qm}function ep(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...s)=>{a(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function tp(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)}function Nn(e){const t=e+"CollectionProvider",[n,r]=ve(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:v,children:b}=g,x=N.useRef(null),w=N.useRef(new Map).current;return f.jsx(o,{scope:v,itemMap:w,collectionRef:x,children:b})};i.displayName=t;const s=e+"CollectionSlot",c=ht(s),u=N.forwardRef((g,v)=>{const{scope:b,children:x}=g,w=a(s,b),S=z(v,w.collectionRef);return f.jsx(c,{ref:S,children:x})});u.displayName=s;const d=e+"CollectionItemSlot",m="data-radix-collection-item",p=ht(d),h=N.forwardRef((g,v)=>{const{scope:b,children:x,...w}=g,S=N.useRef(null),C=z(v,S),M=a(d,b);return N.useEffect(()=>(M.itemMap.set(S,{ref:S,...w}),()=>void M.itemMap.delete(S))),f.jsx(p,{[m]:"",ref:C,children:x})});h.displayName=d;function y(g){const v=a(e+"CollectionConsumer",g);return N.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${m}]`));return Array.from(v.itemMap.values()).sort((M,E)=>w.indexOf(M.ref.current)-w.indexOf(E.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},y,r]}function O(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var de=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},np=l[" useInsertionEffect ".trim().toString()]||de;function Ce({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=rp({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:o;{const d=l.useRef(e!==void 0);l.useEffect(()=>{const m=d.current;m!==s&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=s},[s,r])}const u=l.useCallback(d=>{var m;if(s){const p=op(d)?d(e):d;p!==e&&((m=i.current)==null||m.call(i,p))}else a(d)},[s,e,a,i]);return[c,u]}function rp({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),o=l.useRef(n),a=l.useRef(t);return np(()=>{a.current=t},[t]),l.useEffect(()=>{var i;o.current!==n&&((i=a.current)==null||i.call(a,n),o.current=n)},[n,o]),[n,r,a]}function op(e){return typeof e=="function"}var ap=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],V=ap.reduce((e,t)=>{const n=ht(`Primitive.${t}`),r=l.forwardRef((o,a)=>{const{asChild:i,...s}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Zs(e,t){e&&Sn.flushSync(()=>e.dispatchEvent(t))}function sp(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Qs=e=>{const{present:t,children:n}=e,r=ip(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=z(r.ref,cp(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};Qs.displayName="Presence";function ip(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=sp(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Hn(r.current);a.current=s==="mounted"?u:"none"},[s]),de(()=>{const u=r.current,d=o.current;if(d!==e){const p=a.current,h=Hn(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),de(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,m=h=>{const g=Hn(r.current).includes(h.animationName);if(h.target===t&&g&&(c("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(a.current=Hn(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Hn(e){return(e==null?void 0:e.animationName)||"none"}function cp(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 lp=l[" useId ".trim().toString()]||(()=>{}),up=0;function pe(e){const[t,n]=l.useState(lp());return de(()=>{n(r=>r??String(up++))},[e]),e||(t?`radix-${t}`:"")}var dr="Collapsible",[dp,Js]=ve(dr),[fp,Yo]=dp(dr),ei=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...s}=e,[c,u]=Ce({prop:r,defaultProp:o??!1,onChange:i,caller:dr});return f.jsx(fp,{scope:n,disabled:a,contentId:pe(),open:c,onOpenToggle:l.useCallback(()=>u(d=>!d),[u]),children:f.jsx(V.div,{"data-state":Go(c),"data-disabled":a?"":void 0,...s,ref:t})})});ei.displayName=dr;var ti="CollapsibleTrigger",ni=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Yo(ti,n);return f.jsx(V.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Go(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:O(e.onClick,o.onOpenToggle)})});ni.displayName=ti;var Ho="CollapsibleContent",ri=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Yo(Ho,e.__scopeCollapsible);return f.jsx(Qs,{present:n||o.open,children:({present:a})=>f.jsx(mp,{...r,ref:t,present:a})})});ri.displayName=Ho;var mp=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=Yo(Ho,n),[s,c]=l.useState(r),u=l.useRef(null),d=z(t,u),m=l.useRef(0),p=m.current,h=l.useRef(0),y=h.current,g=i.open||s,v=l.useRef(g),b=l.useRef(void 0);return l.useEffect(()=>{const x=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(x)},[]),de(()=>{const x=u.current;if(x){b.current=b.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();m.current=w.height,h.current=w.width,v.current||(x.style.transitionDuration=b.current.transitionDuration,x.style.animationName=b.current.animationName),c(r)}},[i.open,r]),f.jsx(V.div,{"data-state":Go(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...a,ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:g&&o})});function Go(e){return e?"open":"closed"}var pp=ei,hp=ni,gp=ri,vp=l.createContext(void 0);function xt(e){const t=l.useContext(vp);return e||t||"ltr"}var Be="Accordion",yp=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Uo,bp,xp]=Nn(Be),[fr,UN]=ve(Be,[xp,Js]),zo=Js(),oi=N.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return f.jsx(Uo.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?f.jsx(Np,{...a,ref:t}):f.jsx(Sp,{...o,ref:t})})});oi.displayName=Be;var[ai,wp]=fr(Be),[si,Cp]=fr(Be,{collapsible:!1}),Sp=N.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[s,c]=Ce({prop:n,defaultProp:r??"",onChange:o,caller:Be});return f.jsx(ai,{scope:e.__scopeAccordion,value:N.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:N.useCallback(()=>a&&c(""),[a,c]),children:f.jsx(si,{scope:e.__scopeAccordion,collapsible:a,children:f.jsx(ii,{...i,ref:t})})})}),Np=N.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,s]=Ce({prop:n,defaultProp:r??[],onChange:o,caller:Be}),c=N.useCallback(d=>s((m=[])=>[...m,d]),[s]),u=N.useCallback(d=>s((m=[])=>m.filter(p=>p!==d)),[s]);return f.jsx(ai,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:u,children:f.jsx(si,{scope:e.__scopeAccordion,collapsible:!0,children:f.jsx(ii,{...a,ref:t})})})}),[Ep,mr]=fr(Be),ii=N.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...i}=e,s=N.useRef(null),c=z(s,t),u=bp(n),m=xt(o)==="ltr",p=O(e.onKeyDown,h=>{var P;if(!yp.includes(h.key))return;const y=h.target,g=u().filter(F=>{var _;return!((_=F.ref.current)!=null&&_.disabled)}),v=g.findIndex(F=>F.ref.current===y),b=g.length;if(v===-1)return;h.preventDefault();let x=v;const w=0,S=b-1,C=()=>{x=v+1,x>S&&(x=w)},M=()=>{x=v-1,x<w&&(x=S)};switch(h.key){case"Home":x=w;break;case"End":x=S;break;case"ArrowRight":a==="horizontal"&&(m?C():M());break;case"ArrowDown":a==="vertical"&&C();break;case"ArrowLeft":a==="horizontal"&&(m?M():C());break;case"ArrowUp":a==="vertical"&&M();break}const E=x%b;(P=g[E].ref.current)==null||P.focus()});return f.jsx(Ep,{scope:n,disabled:r,direction:o,orientation:a,children:f.jsx(Uo.Slot,{scope:n,children:f.jsx(V.div,{...i,"data-orientation":a,ref:c,onKeyDown:r?void 0:p})})})}),nr="AccordionItem",[Mp,Ko]=fr(nr),ci=N.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=mr(nr,n),i=wp(nr,n),s=zo(n),c=pe(),u=r&&i.value.includes(r)||!1,d=a.disabled||e.disabled;return f.jsx(Mp,{scope:n,open:u,disabled:d,triggerId:c,children:f.jsx(pp,{"data-orientation":a.orientation,"data-state":pi(u),...s,...o,ref:t,disabled:d,open:u,onOpenChange:m=>{m?i.onItemOpen(r):i.onItemClose(r)}})})});ci.displayName=nr;var li="AccordionHeader",ui=N.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=mr(Be,n),a=Ko(li,n);return f.jsx(V.h3,{"data-orientation":o.orientation,"data-state":pi(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});ui.displayName=li;var bo="AccordionTrigger",di=N.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=mr(Be,n),a=Ko(bo,n),i=Cp(bo,n),s=zo(n);return f.jsx(Uo.ItemSlot,{scope:n,children:f.jsx(hp,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...s,...r,ref:t})})});di.displayName=bo;var fi="AccordionContent",mi=N.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=mr(Be,n),a=Ko(fi,n),i=zo(n);return f.jsx(gp,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...i,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});mi.displayName=fi;function pi(e){return e?"open":"closed"}var Xa=oi,Rp=ci,Pp=ui,kp=di,Op=mi;/**
|
|
2
2
|
* @license lucide-react v0.525.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const
|
|
6
|
+
*/const Ip=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Dp=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Za=e=>{const t=Dp(e);return t.charAt(0).toUpperCase()+t.slice(1)},hi=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Tp=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
7
7
|
* @license lucide-react v0.525.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/var
|
|
11
|
+
*/var Ap={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"};/**
|
|
12
12
|
* @license lucide-react v0.525.0 - ISC
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const
|
|
16
|
+
*/const _p=N.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...s},c)=>N.createElement("svg",{ref:c,...Ap,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:hi("lucide",o),...!a&&!Tp(s)&&{"aria-hidden":"true"},...s},[...i.map(([u,d])=>N.createElement(u,d)),...Array.isArray(a)?a:[a]]));/**
|
|
17
17
|
* @license lucide-react v0.525.0 - ISC
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const
|
|
21
|
+
*/const Me=(e,t)=>{const n=N.forwardRef(({className:r,...o},a)=>N.createElement(_p,{ref:a,iconNode:t,className:hi(`lucide-${Ip(Za(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Za(e),n};/**
|
|
22
22
|
* @license lucide-react v0.525.0 - ISC
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the ISC license.
|
|
25
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const
|
|
26
|
+
*/const jp=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],gi=Me("calendar",jp);/**
|
|
27
27
|
* @license lucide-react v0.525.0 - ISC
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the ISC license.
|
|
30
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const
|
|
31
|
+
*/const Fp=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ot=Me("check",Fp);/**
|
|
32
32
|
* @license lucide-react v0.525.0 - ISC
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const
|
|
36
|
+
*/const $p=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],qo=Me("chevron-down",$p);/**
|
|
37
37
|
* @license lucide-react v0.525.0 - ISC
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the ISC license.
|
|
40
40
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const
|
|
41
|
+
*/const Lp=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Wp=Me("chevron-left",Lp);/**
|
|
42
42
|
* @license lucide-react v0.525.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 Bp=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Xo=Me("chevron-right",Bp);/**
|
|
47
47
|
* @license lucide-react v0.525.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
|
-
*/const
|
|
51
|
+
*/const Vp=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Zo=Me("chevrons-up-down",Vp);/**
|
|
52
52
|
* @license lucide-react v0.525.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 Yp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Hp=Me("circle-alert",Yp);/**
|
|
57
57
|
* @license lucide-react v0.525.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
|
|
61
|
+
*/const Gp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Up=Me("circle-check",Gp);/**
|
|
62
62
|
* @license lucide-react v0.525.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 zp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],vi=Me("circle",zp);/**
|
|
67
67
|
* @license lucide-react v0.525.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 Kp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],qp=Me("info",Kp);/**
|
|
72
72
|
* @license lucide-react v0.525.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 Xp=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],yi=Me("loader-circle",Xp);/**
|
|
77
77
|
* @license lucide-react v0.525.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
|
|
81
|
+
*/const Zp=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Qp=Me("search",Zp);/**
|
|
82
82
|
* @license lucide-react v0.525.0 - ISC
|
|
83
83
|
*
|
|
84
84
|
* This source code is licensed under the ISC license.
|
|
85
85
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const
|
|
86
|
+
*/const Jp=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],eh=Me("triangle-alert",Jp);/**
|
|
87
87
|
* @license lucide-react v0.525.0 - ISC
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const
|
|
92
|
-
focus-visible:ring-ring focus-visible:ring-offset-[3px] focus-visible:ring-offset-background`,
|
|
93
|
-
focus-within:ring-offset-[3px] focus-within:ring-offset-background`;ge`focus-within:ring-offset-[2px]`;const
|
|
94
|
-
ring-offset-background disabled:cursor-not-allowed
|
|
95
|
-
aria-disabled:cursor-not-allowed aria-disabled:opacity-50`,
|
|
91
|
+
*/const th=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],pr=Me("x",th),Qa=ge`focus:outline-none focus:ring-[3px] focus:ring-ring focus:ring-offset-[3px]`,nh=ge`focus:ring-offset-2`,Ja=ge`focus-visible:outline-none focus-visible:ring-[3px]
|
|
92
|
+
focus-visible:ring-ring focus-visible:ring-offset-[3px] focus-visible:ring-offset-background`,rh=ge`focus-visible:ring-offset-[2px]`;ge`focus-within:outline-none focus-within:ring-[3px] focus-within:ring-ring
|
|
93
|
+
focus-within:ring-offset-[3px] focus-within:ring-offset-background`;ge`focus-within:ring-offset-[2px]`;const oh=ge`flex h-10 w-full rounded-sm border border-input bg-background px-3 py-2 text-sm
|
|
94
|
+
ring-offset-background placeholder:text-muted-foreground disabled:cursor-not-allowed
|
|
95
|
+
disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50`,ah=ge`inline-flex cursor-pointer items-center justify-center whitespace-nowrap
|
|
96
96
|
rounded-sm bg-transparent text-sm font-bold ring-offset-background transition-colors
|
|
97
97
|
disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50
|
|
98
|
-
aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50`,
|
|
99
|
-
data-[state=open]:animate-accordion-down`,{variants:{variant:{default:"border-base-200",primary:"border-primary-400",success:"border-success-400",danger:"border-danger-400",warning:"border-yellow-300"},isBordered:{true:"border-b-4 border-l-4 border-r-4",false:""}},defaultVariants:{variant:"default",isBordered:!1}}),
|
|
100
|
-
hover:bg-black/10 hover:opacity-100 focus:bg-black/10 focus:opacity-100`),type:"button",onClick:s,children:[f.jsx(mr,{className:"h-5 w-5",strokeWidth:3}),f.jsx("span",{className:"sr-only",children:"Close"})]}):null]})});yi.displayName="Alert";function Xe({isDisabled:e=!1}={}){const t=E.useCallback(s=>{e&&(s.preventDefault(),s.stopPropagation())},[e]),n=E.useCallback(s=>{e&&(s.preventDefault(),s.stopPropagation())},[e]),r=E.useCallback(s=>{if(e){if(s.key==="Tab"||s.key==="Escape")return;s.preventDefault(),s.stopPropagation()}},[e]),o=E.useCallback(s=>{e&&(s.preventDefault(),s.stopPropagation())},[e]),a=E.useCallback(s=>{e&&(s.preventDefault(),s.stopPropagation())},[e]),i=E.useCallback(s=>{e&&(s.preventDefault(),s.stopPropagation())},[e]);return e?{"aria-disabled":!0,onMouseDown:t,onMouseUp:t,onClick:t,onTouchStart:n,onTouchEnd:n,onKeyDown:r,onKeyUp:r,onKeyPress:r,onInput:o,onSubmit:o,onReset:o,onCopy:a,onCut:a,onPaste:a,onDrag:i,onDragStart:i,onDragEnd:i,onDrop:i}:{}}function Xo({label:e,description:t,"aria-label":n}={}){const r=E.useId(),o=E.useId();return{ariaProps:n?{"aria-label":n}:{...e&&{"aria-labelledby":r},...t&&{"aria-describedby":o}},labelId:r,descriptionId:o}}const Et=De(le.button,{variants:{variant:{default:"border border-primary-400 text-primary-400 hover:underline",primary:"border border-primary-400 bg-primary-400 text-white hover:bg-primary-500 hover:underline",danger:"border border-danger-400 bg-danger-400 text-white hover:bg-danger-500 hover:underline",link:"text-link underline-offset-4 hover:underline",input:"border border-input bg-background font-normal hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-black hover:bg-opacity-10 hover:text-black"},size:{default:"h-10 px-4 py-2",sm:"h-8 px-3 text-sm",lg:"h-12 rounded-md px-8 text-lg"}},defaultVariants:{variant:"default",size:"default"}}),Oe=l.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,isDisabled:o=!1,isLoading:a=!1,children:i,...s},c)=>{const u=r?Wm:"button",d=Xe({isDisabled:o||a});return r?f.jsx(u,{ref:c,className:k(Et({variant:t,size:n}),e),...s,...d,children:i}):f.jsx(u,{ref:c,"aria-busy":a,className:k(Et({variant:t,size:n}),"relative",e),...s,...d,children:a?f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"invisible",children:i}),f.jsx("span",{"aria-hidden":"true",className:"absolute inset-0 flex items-center justify-center",children:f.jsx(gi,{className:"h-4 w-4 animate-spin"})})]}):i})});Oe.displayName="Button";var ts=1,nh=.9,rh=.8,oh=.17,qr=.1,Xr=.999,ah=.9999,sh=.99,ih=/[\\\/_+.#"@\[\(\{&]/,ch=/[\\\/_+.#"@\[\(\{&]/g,lh=/[\s-]/,bi=/[\s-]/g;function yo(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?ts:sh;var s=`${o},${a}`;if(i[s]!==void 0)return i[s];for(var c=r.charAt(a),u=n.indexOf(c,o),d=0,m,p,h,y;u>=0;)m=yo(e,t,n,r,u+1,a+1,i),m>d&&(u===o?m*=ts:ih.test(e.charAt(u-1))?(m*=rh,h=e.slice(o,u-1).match(ch),h&&o>0&&(m*=Math.pow(Xr,h.length))):lh.test(e.charAt(u-1))?(m*=nh,y=e.slice(o,u-1).match(bi),y&&o>0&&(m*=Math.pow(Xr,y.length))):(m*=oh,o>0&&(m*=Math.pow(Xr,u-o))),e.charAt(u)!==t.charAt(a)&&(m*=ah)),(m<qr&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a))&&(p=yo(e,t,n,r,u+1,a+2,i),p*qr>m&&(m=p*qr)),m>d&&(d=m),u=n.indexOf(c,u+1);return i[s]=d,d}function ns(e){return e.toLowerCase().replace(bi," ")}function uh(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,yo(e,t,ns(e),ns(t),0,0,{})}function Se(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function xi(e,t=globalThis==null?void 0:globalThis.document){const n=Se(e);l.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 dh="DismissableLayer",bo="dismissableLayer.update",fh="dismissableLayer.pointerDownOutside",mh="dismissableLayer.focusOutside",rs,wi=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mn=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=l.useContext(wi),[d,m]=l.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=l.useState({}),y=U(t,N=>m(N)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(v),x=d?g.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=b,C=gh(N=>{const P=N.target,F=[...u.branches].some(_=>_.contains(P));!S||F||(o==null||o(N),i==null||i(N),N.defaultPrevented||s==null||s())},p),M=vh(N=>{const P=N.target;[...u.branches].some(_=>_.contains(P))||(a==null||a(N),i==null||i(N),N.defaultPrevented||s==null||s())},p);return xi(N=>{x===u.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&s&&(N.preventDefault(),s()))},p),l.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(rs=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),os(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=rs)}},[d,p,n,u]),l.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),os())},[d,u]),l.useEffect(()=>{const N=()=>h({});return document.addEventListener(bo,N),()=>document.removeEventListener(bo,N)},[]),f.jsx(V.div,{...c,ref:y,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:O(e.onFocusCapture,M.onFocusCapture),onBlurCapture:O(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:O(e.onPointerDownCapture,C.onPointerDownCapture)})});Mn.displayName=dh;var ph="DismissableLayerBranch",hh=l.forwardRef((e,t)=>{const n=l.useContext(wi),r=l.useRef(null),o=U(t,r);return l.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),f.jsx(V.div,{...e,ref:o})});hh.displayName=ph;function gh(e,t=globalThis==null?void 0:globalThis.document){const n=Se(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){Ci(fh,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function vh(e,t=globalThis==null?void 0:globalThis.document){const n=Se(e),r=l.useRef(!1);return l.useEffect(()=>{const o=a=>{a.target&&!r.current&&Ci(mh,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function os(){const e=new CustomEvent(bo);document.dispatchEvent(e)}function Ci(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?qs(o,a):o.dispatchEvent(a)}var Zr="focusScope.autoFocusOnMount",Qr="focusScope.autoFocusOnUnmount",as={bubbles:!1,cancelable:!0},yh="FocusScope",Rn=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,c]=l.useState(null),u=Se(o),d=Se(a),m=l.useRef(null),p=U(t,g=>c(g)),h=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let g=function(w){if(h.paused||!s)return;const S=w.target;s.contains(S)?m.current=S:ft(m.current,{select:!0})},v=function(w){if(h.paused||!s)return;const S=w.relatedTarget;S!==null&&(s.contains(S)||ft(m.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&ft(s)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const x=new MutationObserver(b);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),x.disconnect()}}},[r,s,h.paused]),l.useEffect(()=>{if(s){is.add(h);const g=document.activeElement;if(!s.contains(g)){const b=new CustomEvent(Zr,as);s.addEventListener(Zr,u),s.dispatchEvent(b),b.defaultPrevented||(bh(Eh(Si(s)),{select:!0}),document.activeElement===g&&ft(s))}return()=>{s.removeEventListener(Zr,u),setTimeout(()=>{const b=new CustomEvent(Qr,as);s.addEventListener(Qr,d),s.dispatchEvent(b),b.defaultPrevented||ft(g??document.body,{select:!0}),s.removeEventListener(Qr,d),is.remove(h)},0)}}},[s,u,d,h]);const y=l.useCallback(g=>{if(!n&&!r||h.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(v&&b){const x=g.currentTarget,[w,S]=xh(x);w&&S?!g.shiftKey&&b===S?(g.preventDefault(),n&&ft(w,{select:!0})):g.shiftKey&&b===w&&(g.preventDefault(),n&&ft(S,{select:!0})):b===x&&g.preventDefault()}},[n,r,h.paused]);return f.jsx(V.div,{tabIndex:-1,...i,ref:p,onKeyDown:y})});Rn.displayName=yh;function bh(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ft(r,{select:t}),document.activeElement!==n)return}function xh(e){const t=Si(e),n=ss(t,e),r=ss(t.reverse(),e);return[n,r]}function Si(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 ss(e,t){for(const n of e)if(!wh(n,{upTo:t}))return n}function wh(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 Ch(e){return e instanceof HTMLInputElement&&"select"in e}function ft(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ch(e)&&t&&e.select()}}var is=Sh();function Sh(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=cs(e,t),e.unshift(t)},remove(t){var n;e=cs(e,t),(n=e[0])==null||n.resume()}}}function cs(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Eh(e){return e.filter(t=>t.tagName!=="A")}var Nh="Portal",Pn=l.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,a]=l.useState(!1);de(()=>a(!0),[]);const i=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return i?Ws.createPortal(f.jsx(V.div,{...r,ref:t}),i):null});Pn.displayName=Nh;function Mh(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Ie=e=>{const{present:t,children:n}=e,r=Rh(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=U(r.ref,Ph(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};Ie.displayName="Presence";function Rh(e){const[t,n]=l.useState(),r=l.useRef({}),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=Mh(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Hn(r.current);a.current=s==="mounted"?u:"none"},[s]),de(()=>{const u=r.current,d=o.current;if(d!==e){const p=a.current,h=Hn(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),de(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,m=h=>{const g=Hn(r.current).includes(h.animationName);if(h.target===t&&g&&(c("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(a.current=Hn(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Hn(e){return(e==null?void 0:e.animationName)||"none"}function Ph(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 Jr=0;function pr(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ls()),document.body.insertAdjacentElement("beforeend",e[1]??ls()),Jr++,()=>{Jr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Jr--}},[])}function ls(){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 Ge=function(){return Ge=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Ge.apply(this,arguments)};function Ei(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 kh(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Qn="right-scroll-bar-position",Jn="width-before-scroll-bar",Oh="with-scroll-bars-hidden",Dh="--removed-body-scroll-bar-size";function eo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ih(e,t){var n=E.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 Ah=typeof window<"u"?l.useLayoutEffect:l.useEffect,us=new WeakMap;function Th(e,t){var n=Ih(null,function(r){return e.forEach(function(o){return eo(o,r)})});return Ah(function(){var r=us.get(n);if(r){var o=new Set(r),a=new Set(e),i=n.current;o.forEach(function(s){a.has(s)||eo(s,null)}),a.forEach(function(s){o.has(s)||eo(s,i)})}us.set(n,e)},[e]),n}function _h(e){return e}function jh(e,t){t===void 0&&(t=_h);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(a){var i=t(a,r);return n.push(i),function(){n=n.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(r=!0;n.length;){var i=n;n=[],i.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var i=[];if(n.length){var s=n;n=[],s.forEach(a),i=n}var c=function(){var d=i;i=[],d.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return o}function Fh(e){e===void 0&&(e={});var t=jh(null);return t.options=Ge({async:!0,ssr:!1},e),t}var Ni=function(e){var t=e.sideCar,n=Ei(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return l.createElement(r,Ge({},n))};Ni.isSideCarExport=!0;function $h(e,t){return e.useMedium(t),Ni}var Mi=Fh(),to=function(){},hr=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:to,onWheelCapture:to,onTouchMoveCapture:to}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,m=e.shards,p=e.sideCar,h=e.noIsolation,y=e.inert,g=e.allowPinchZoom,v=e.as,b=v===void 0?"div":v,x=e.gapMode,w=Ei(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=p,C=Th([n,t]),M=Ge(Ge({},w),o);return l.createElement(l.Fragment,null,d&&l.createElement(S,{sideCar:Mi,removeScrollBar:u,shards:m,noIsolation:h,inert:y,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:x}),i?l.cloneElement(l.Children.only(s),Ge(Ge({},M),{ref:C})):l.createElement(b,Ge({},M,{className:c,ref:C}),s))});hr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};hr.classNames={fullWidth:Jn,zeroRight:Qn};var Lh=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Wh(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Lh();return t&&e.setAttribute("nonce",t),e}function Bh(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Vh(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Yh=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Wh())&&(Bh(t,n),Vh(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Hh=function(){var e=Yh();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ri=function(){var e=Hh(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Gh={left:0,top:0,right:0,gap:0},no=function(e){return parseInt(e||"",10)||0},zh=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[no(n),no(r),no(o)]},Uh=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Gh;var t=zh(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])}},Kh=Ri(),Bt="data-scroll-locked",qh=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
101
|
-
|
|
98
|
+
aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50`,ie={focusRing:Qa,focusRingSm:nh,focusRingVisible:Ja,focusRingVisibleSm:rh,link:ge`text-link underline transition-colors visited:text-link-visited hover:text-link-hover hover:no-underline`,linkNoUnderline:ge`no-underline hover:underline`,input:ge`${oh} ${Ja}`,text:{title:ge`text-3xl font-bold`,subtitle:ge`mt-2 text-base-400`,hint:ge`text-sm text-base-400`,error:ge`text-sm font-medium text-destructive`,label:ge`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 peer-aria-disabled:cursor-not-allowed peer-aria-disabled:opacity-70`},button:ge`${ah} ${Qa}`,popover:ge`relative w-72 rounded-md border border-muted bg-popover px-4 py-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,tooltip:ge`overflow-hidden rounded-sm bg-base-700 px-2 py-1.5 text-xs text-white fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`},es=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ts=Gs,Se=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ts(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(u=>{const d=n==null?void 0:n[u],m=a==null?void 0:a[u];if(d===null)return null;const p=es(d)||es(m);return o[u][p]}),s=n&&Object.entries(n).reduce((u,d)=>{let[m,p]=d;return p===void 0||(u[m]=p),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:m,className:p,...h}=d;return Object.entries(h).every(y=>{let[g,v]=y;return Array.isArray(v)?v.includes({...a,...s}[g]):{...a,...s}[g]===v})?[...u,m,p]:u},[]);return ts(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},sh=Se(k(ie.focusRingVisible,"flex w-full flex-1 items-center px-4 py-[0.875rem] font-bold transition-all"),{variants:{variant:{default:"bg-base-200 text-black hover:brightness-90",primary:"bg-primary-400 text-white hover:bg-primary-500",success:"bg-success-500 text-white hover:bg-success-600",danger:"bg-danger-400 text-white hover:bg-danger-500",warning:"bg-warning-300 text-black hover:bg-warning-400"},caretPosition:{left:"[&[data-state=open]>svg]:rotate-90",right:"[&[data-state=open]>svg]:rotate-180"}},defaultVariants:{variant:"default",caretPosition:"right"}}),ih=Se(`overflow-hidden px-4 text-sm data-[state=closed]:animate-accordion-up
|
|
99
|
+
data-[state=open]:animate-accordion-down`,{variants:{variant:{default:"border-base-200",primary:"border-primary-400",success:"border-success-400",danger:"border-danger-400",warning:"border-yellow-300"},isBordered:{true:"border-b-4 border-l-4 border-r-4",false:""}},defaultVariants:{variant:"default",isBordered:!1}}),ns=({items:e,variant:t,caretPosition:n,isBordered:r,triggerClassName:o,contentClassName:a})=>f.jsx(f.Fragment,{children:e.map(i=>f.jsxs(Rp,{value:i.id,children:[f.jsx(Pp,{className:"flex",children:f.jsxs(kp,{className:k(sh({variant:t,caretPosition:n}),o),children:[n==="left"?f.jsx(Xo,{className:"mr-2 h-5 w-5 shrink-0 text-inherit transition-transform duration-200"}):null,f.jsx("span",{className:"flex-1 text-left",children:i.title}),n==="right"?f.jsx(qo,{className:"ml-2 h-5 w-5 shrink-0 text-inherit transition-transform duration-200"}):null]})}),f.jsx(Op,{className:k(ih({variant:t,isBordered:r}),a),children:f.jsx("div",{className:"py-4",children:i.content})})]},i.id))}),bi=l.forwardRef(({className:e,triggerClassName:t,contentClassName:n,items:r,mode:o,value:a,defaultValue:i,variant:s="default",isBordered:c=!1,isCollapsible:u=!0,caretPosition:d="right",onValueChange:m,...p},h)=>{const y={ref:h,className:k("space-y-2",e),...p},g={items:r,variant:s,caretPosition:d,isBordered:c,triggerClassName:t,contentClassName:n};return o==="multiple"?f.jsx(Xa,{defaultValue:i,type:"multiple",value:a,onValueChange:m,...y,children:f.jsx(ns,{...g})}):f.jsx(Xa,{collapsible:u,defaultValue:i,type:"single",value:a,onValueChange:m,...y,children:f.jsx(ns,{...g})})});bi.displayName="Accordion";const ch=Se("relative flex w-full items-start border-l-8 text-gray-900 dark:text-gray-100",{variants:{variant:{success:"border-success-400 bg-success-100 dark:bg-success-700",warning:"border-warning-400 bg-warning-100 dark:bg-warning-700",danger:"border-danger-400 bg-danger-100 dark:bg-danger-700",info:"border-info-400 bg-info-100 dark:bg-info-700"},size:{sm:"gap-2 px-4 py-2.5 text-sm",default:"gap-3 px-4 py-4 text-base"}},defaultVariants:{size:"default"}}),lh=Se("",{variants:{size:{sm:"[&>svg]:h-5 [&>svg]:w-5",default:"[&>svg]:h-8 [&>svg]:w-8"},variant:{success:"text-success-400",warning:"text-warning-400",danger:"text-danger-400",info:"text-info-400"},hasHeading:{true:"",false:""}},compoundVariants:[{size:"default",hasHeading:!0,class:"-mt-0.5"}],defaultVariants:{size:"default"}}),uh=Se("flex flex-1",{variants:{size:{sm:"flex-row items-start gap-2",default:"flex-col gap-1"},hasIcon:{true:"",false:""},hasHeading:{true:"",false:""}},compoundVariants:[{size:"default",hasIcon:!0,hasHeading:!1,class:"pt-1"}]}),dh=Se("mb-0 mt-0 font-bold text-base-700 dark:text-base-100",{variants:{size:{sm:"text-base/5",default:"text-lg"}},defaultVariants:{size:"default"}}),xi=l.forwardRef(({className:e,variant:t,size:n="default",heading:r,headingLevel:o="h2",hasIcon:a=!0,isClosable:i=!1,onClose:s,children:c,...u},d)=>{const m=o,p={success:f.jsx(Up,{}),warning:f.jsx(eh,{}),danger:f.jsx(Hp,{}),info:f.jsx(qp,{})};return f.jsxs("div",{ref:d,className:k(ch({variant:t,size:n}),e),...u,children:[a?f.jsx("span",{className:k(lh({variant:t,size:n,hasHeading:!!r})),children:p[t]}):null,f.jsxs("div",{className:k(uh({size:n,hasIcon:a,hasHeading:!!r})),children:[r?f.jsx(m,{className:k(dh({size:n})),children:r}):null,c]}),i?f.jsxs("button",{className:k(ie.focusRing,ie.focusRingSm,`-mt-0.5 shrink-0 rounded-full bg-transparent px-1.5 py-1.5 opacity-70 transition
|
|
100
|
+
hover:bg-black/10 hover:opacity-100 focus:bg-black/10 focus:opacity-100`),type:"button",onClick:s,children:[f.jsx(pr,{className:"h-5 w-5",strokeWidth:3}),f.jsx("span",{className:"sr-only",children:"Close"})]}):null]})});xi.displayName="Alert";function De({isDisabled:e=!1}={}){const t=N.useCallback(s=>{e&&(s.preventDefault(),s.stopPropagation())},[e]),n=N.useCallback(s=>{e&&(s.preventDefault(),s.stopPropagation())},[e]),r=N.useCallback(s=>{if(e){if(s.key==="Tab"||s.key==="Escape")return;s.preventDefault(),s.stopPropagation()}},[e]),o=N.useCallback(s=>{e&&(s.preventDefault(),s.stopPropagation())},[e]),a=N.useCallback(s=>{e&&(s.preventDefault(),s.stopPropagation())},[e]),i=N.useCallback(s=>{e&&(s.preventDefault(),s.stopPropagation())},[e]);return e?{"aria-disabled":!0,onMouseDown:t,onMouseUp:t,onClick:t,onTouchStart:n,onTouchEnd:n,onKeyDown:r,onKeyUp:r,onKeyPress:r,onInput:o,onSubmit:o,onReset:o,onCopy:a,onCut:a,onPaste:a,onDrag:i,onDragStart:i,onDragEnd:i,onDrop:i}:{}}function En({label:e,description:t,"aria-label":n}={}){const r=N.useId(),o=N.useId();return{ariaProps:n?{"aria-label":n}:{...e&&{"aria-labelledby":r},...t&&{"aria-describedby":o}},labelId:r,descriptionId:o}}function Qo({variant:e="default",orientation:t="vertical",columns:n=2}={}){return k(e==="default"&&t==="horizontal"&&"flex flex-row gap-5",e==="default"&&t==="vertical"&&"grid gap-3",e==="default"&&t==="vertical"&&n===1&&"grid-cols-1",e==="default"&&t==="vertical"&&n===2&&"grid-cols-2",e==="default"&&t==="vertical"&&n===3&&"grid-cols-3",e==="default"&&t==="vertical"&&n===4&&"grid-cols-4",e==="tile"&&"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",e==="button"&&t==="horizontal"&&`flex flex-row gap-0 [&>*:first-child]:ml-0 [&>*:first-child]:rounded-l-sm
|
|
101
|
+
[&>*:last-child]:rounded-r-sm [&>*]:-ml-[1px] [&>*]:rounded-none`,e==="button"&&t==="vertical"&&`flex flex-col gap-0 [&>*:first-child]:mt-0 [&>*:first-child]:rounded-t-sm
|
|
102
|
+
[&>*:last-child]:rounded-b-sm [&>*]:-mt-[1px] [&>*]:rounded-none`)}const at=Se(ie.button,{variants:{variant:{default:"border border-primary-400 text-primary-400 hover:underline",primary:"border border-primary-400 bg-primary-400 text-white hover:bg-primary-500 hover:underline",danger:"border border-danger-400 bg-danger-400 text-white hover:bg-danger-500 hover:underline",link:"text-link underline-offset-4 hover:underline",input:"border border-input bg-background font-normal hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-black hover:bg-opacity-10 hover:text-black"},size:{default:"h-10 px-4 py-2",sm:"h-8 px-3 text-sm",lg:"h-12 rounded-md px-8 text-lg"}},defaultVariants:{variant:"default",size:"default"}}),Ie=l.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,isDisabled:o=!1,isLoading:a=!1,children:i,...s},c)=>{const u=r?Xm:"button",d=De({isDisabled:o||a});return r?f.jsx(u,{ref:c,className:k(at({variant:t,size:n}),e),...s,...d,children:i}):f.jsx(u,{ref:c,"aria-busy":a,className:k(at({variant:t,size:n}),"relative",e),...s,...d,children:a?f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"invisible",children:i}),f.jsx("span",{"aria-hidden":"true",className:"absolute inset-0 flex items-center justify-center",children:f.jsx(yi,{className:"h-4 w-4 animate-spin"})})]}):i})});Ie.displayName="Button";var rs=1,fh=.9,mh=.8,ph=.17,Zr=.1,Qr=.999,hh=.9999,gh=.99,vh=/[\\\/_+.#"@\[\(\{&]/,yh=/[\\\/_+.#"@\[\(\{&]/g,bh=/[\s-]/,wi=/[\s-]/g;function xo(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?rs:gh;var s=`${o},${a}`;if(i[s]!==void 0)return i[s];for(var c=r.charAt(a),u=n.indexOf(c,o),d=0,m,p,h,y;u>=0;)m=xo(e,t,n,r,u+1,a+1,i),m>d&&(u===o?m*=rs:vh.test(e.charAt(u-1))?(m*=mh,h=e.slice(o,u-1).match(yh),h&&o>0&&(m*=Math.pow(Qr,h.length))):bh.test(e.charAt(u-1))?(m*=fh,y=e.slice(o,u-1).match(wi),y&&o>0&&(m*=Math.pow(Qr,y.length))):(m*=ph,o>0&&(m*=Math.pow(Qr,u-o))),e.charAt(u)!==t.charAt(a)&&(m*=hh)),(m<Zr&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a))&&(p=xo(e,t,n,r,u+1,a+2,i),p*Zr>m&&(m=p*Zr)),m>d&&(d=m),u=n.indexOf(c,u+1);return i[s]=d,d}function os(e){return e.toLowerCase().replace(wi," ")}function xh(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,xo(e,t,os(e),os(t),0,0,{})}function Ne(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ci(e,t=globalThis==null?void 0:globalThis.document){const n=Ne(e);l.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 wh="DismissableLayer",wo="dismissableLayer.update",Ch="dismissableLayer.pointerDownOutside",Sh="dismissableLayer.focusOutside",as,Si=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mn=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=l.useContext(Si),[d,m]=l.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=l.useState({}),y=z(t,E=>m(E)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(v),x=d?g.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=b,C=Mh(E=>{const P=E.target,F=[...u.branches].some(_=>_.contains(P));!S||F||(o==null||o(E),i==null||i(E),E.defaultPrevented||s==null||s())},p),M=Rh(E=>{const P=E.target;[...u.branches].some(_=>_.contains(P))||(a==null||a(E),i==null||i(E),E.defaultPrevented||s==null||s())},p);return Ci(E=>{x===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&s&&(E.preventDefault(),s()))},p),l.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(as=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),ss(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=as)}},[d,p,n,u]),l.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),ss())},[d,u]),l.useEffect(()=>{const E=()=>h({});return document.addEventListener(wo,E),()=>document.removeEventListener(wo,E)},[]),f.jsx(V.div,{...c,ref:y,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:O(e.onFocusCapture,M.onFocusCapture),onBlurCapture:O(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:O(e.onPointerDownCapture,C.onPointerDownCapture)})});Mn.displayName=wh;var Nh="DismissableLayerBranch",Eh=l.forwardRef((e,t)=>{const n=l.useContext(Si),r=l.useRef(null),o=z(t,r);return l.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),f.jsx(V.div,{...e,ref:o})});Eh.displayName=Nh;function Mh(e,t=globalThis==null?void 0:globalThis.document){const n=Ne(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){Ni(Ch,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Rh(e,t=globalThis==null?void 0:globalThis.document){const n=Ne(e),r=l.useRef(!1);return l.useEffect(()=>{const o=a=>{a.target&&!r.current&&Ni(Sh,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ss(){const e=new CustomEvent(wo);document.dispatchEvent(e)}function Ni(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Zs(o,a):o.dispatchEvent(a)}var Jr="focusScope.autoFocusOnMount",eo="focusScope.autoFocusOnUnmount",is={bubbles:!1,cancelable:!0},Ph="FocusScope",Rn=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,c]=l.useState(null),u=Ne(o),d=Ne(a),m=l.useRef(null),p=z(t,g=>c(g)),h=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let g=function(w){if(h.paused||!s)return;const S=w.target;s.contains(S)?m.current=S:mt(m.current,{select:!0})},v=function(w){if(h.paused||!s)return;const S=w.relatedTarget;S!==null&&(s.contains(S)||mt(m.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&mt(s)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const x=new MutationObserver(b);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),x.disconnect()}}},[r,s,h.paused]),l.useEffect(()=>{if(s){ls.add(h);const g=document.activeElement;if(!s.contains(g)){const b=new CustomEvent(Jr,is);s.addEventListener(Jr,u),s.dispatchEvent(b),b.defaultPrevented||(kh(Ah(Ei(s)),{select:!0}),document.activeElement===g&&mt(s))}return()=>{s.removeEventListener(Jr,u),setTimeout(()=>{const b=new CustomEvent(eo,is);s.addEventListener(eo,d),s.dispatchEvent(b),b.defaultPrevented||mt(g??document.body,{select:!0}),s.removeEventListener(eo,d),ls.remove(h)},0)}}},[s,u,d,h]);const y=l.useCallback(g=>{if(!n&&!r||h.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(v&&b){const x=g.currentTarget,[w,S]=Oh(x);w&&S?!g.shiftKey&&b===S?(g.preventDefault(),n&&mt(w,{select:!0})):g.shiftKey&&b===w&&(g.preventDefault(),n&&mt(S,{select:!0})):b===x&&g.preventDefault()}},[n,r,h.paused]);return f.jsx(V.div,{tabIndex:-1,...i,ref:p,onKeyDown:y})});Rn.displayName=Ph;function kh(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(mt(r,{select:t}),document.activeElement!==n)return}function Oh(e){const t=Ei(e),n=cs(t,e),r=cs(t.reverse(),e);return[n,r]}function Ei(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 cs(e,t){for(const n of e)if(!Ih(n,{upTo:t}))return n}function Ih(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 Dh(e){return e instanceof HTMLInputElement&&"select"in e}function mt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Dh(e)&&t&&e.select()}}var ls=Th();function Th(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=us(e,t),e.unshift(t)},remove(t){var n;e=us(e,t),(n=e[0])==null||n.resume()}}}function us(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ah(e){return e.filter(t=>t.tagName!=="A")}var _h="Portal",Pn=l.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,a]=l.useState(!1);de(()=>a(!0),[]);const i=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return i?Vs.createPortal(f.jsx(V.div,{...r,ref:t}),i):null});Pn.displayName=_h;function jh(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Te=e=>{const{present:t,children:n}=e,r=Fh(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=z(r.ref,$h(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};Te.displayName="Presence";function Fh(e){const[t,n]=l.useState(),r=l.useRef({}),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=jh(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Gn(r.current);a.current=s==="mounted"?u:"none"},[s]),de(()=>{const u=r.current,d=o.current;if(d!==e){const p=a.current,h=Gn(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),de(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,m=h=>{const g=Gn(r.current).includes(h.animationName);if(h.target===t&&g&&(c("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(a.current=Gn(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Gn(e){return(e==null?void 0:e.animationName)||"none"}function $h(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 to=0;function hr(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ds()),document.body.insertAdjacentElement("beforeend",e[1]??ds()),to++,()=>{to===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),to--}},[])}function ds(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ue=function(){return Ue=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Ue.apply(this,arguments)};function Mi(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 Lh(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Jn="right-scroll-bar-position",er="width-before-scroll-bar",Wh="with-scroll-bars-hidden",Bh="--removed-body-scroll-bar-size";function no(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Vh(e,t){var n=N.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 Yh=typeof window<"u"?l.useLayoutEffect:l.useEffect,fs=new WeakMap;function Hh(e,t){var n=Vh(null,function(r){return e.forEach(function(o){return no(o,r)})});return Yh(function(){var r=fs.get(n);if(r){var o=new Set(r),a=new Set(e),i=n.current;o.forEach(function(s){a.has(s)||no(s,null)}),a.forEach(function(s){o.has(s)||no(s,i)})}fs.set(n,e)},[e]),n}function Gh(e){return e}function Uh(e,t){t===void 0&&(t=Gh);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(a){var i=t(a,r);return n.push(i),function(){n=n.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(r=!0;n.length;){var i=n;n=[],i.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var i=[];if(n.length){var s=n;n=[],s.forEach(a),i=n}var c=function(){var d=i;i=[],d.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return o}function zh(e){e===void 0&&(e={});var t=Uh(null);return t.options=Ue({async:!0,ssr:!1},e),t}var Ri=function(e){var t=e.sideCar,n=Mi(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return l.createElement(r,Ue({},n))};Ri.isSideCarExport=!0;function Kh(e,t){return e.useMedium(t),Ri}var Pi=zh(),ro=function(){},gr=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:ro,onWheelCapture:ro,onTouchMoveCapture:ro}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,m=e.shards,p=e.sideCar,h=e.noIsolation,y=e.inert,g=e.allowPinchZoom,v=e.as,b=v===void 0?"div":v,x=e.gapMode,w=Mi(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=p,C=Hh([n,t]),M=Ue(Ue({},w),o);return l.createElement(l.Fragment,null,d&&l.createElement(S,{sideCar:Pi,removeScrollBar:u,shards:m,noIsolation:h,inert:y,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:x}),i?l.cloneElement(l.Children.only(s),Ue(Ue({},M),{ref:C})):l.createElement(b,Ue({},M,{className:c,ref:C}),s))});gr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};gr.classNames={fullWidth:er,zeroRight:Jn};var qh=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Xh(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=qh();return t&&e.setAttribute("nonce",t),e}function Zh(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Qh(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Jh=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Xh())&&(Zh(t,n),Qh(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},eg=function(){var e=Jh();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ki=function(){var e=eg(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},tg={left:0,top:0,right:0,gap:0},oo=function(e){return parseInt(e||"",10)||0},ng=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[oo(n),oo(r),oo(o)]},rg=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return tg;var t=ng(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])}},og=ki(),Vt="data-scroll-locked",ag=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
103
|
+
.`.concat(Wh,` {
|
|
102
104
|
overflow: hidden `).concat(r,`;
|
|
103
105
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
104
106
|
}
|
|
105
|
-
body[`).concat(
|
|
107
|
+
body[`).concat(Vt,`] {
|
|
106
108
|
overflow: hidden `).concat(r,`;
|
|
107
109
|
overscroll-behavior: contain;
|
|
108
110
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
@@ -115,88 +117,84 @@ aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled
|
|
|
115
117
|
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
116
118
|
}
|
|
117
119
|
|
|
118
|
-
.`).concat(
|
|
120
|
+
.`).concat(Jn,` {
|
|
119
121
|
right: `).concat(s,"px ").concat(r,`;
|
|
120
122
|
}
|
|
121
123
|
|
|
122
|
-
.`).concat(
|
|
124
|
+
.`).concat(er,` {
|
|
123
125
|
margin-right: `).concat(s,"px ").concat(r,`;
|
|
124
126
|
}
|
|
125
127
|
|
|
126
|
-
.`).concat(
|
|
128
|
+
.`).concat(Jn," .").concat(Jn,` {
|
|
127
129
|
right: 0 `).concat(r,`;
|
|
128
130
|
}
|
|
129
131
|
|
|
130
|
-
.`).concat(
|
|
132
|
+
.`).concat(er," .").concat(er,` {
|
|
131
133
|
margin-right: 0 `).concat(r,`;
|
|
132
134
|
}
|
|
133
135
|
|
|
134
|
-
body[`).concat(
|
|
135
|
-
`).concat(
|
|
136
|
+
body[`).concat(Vt,`] {
|
|
137
|
+
`).concat(Bh,": ").concat(s,`px;
|
|
136
138
|
}
|
|
137
|
-
`)},
|
|
139
|
+
`)},ms=function(){var e=parseInt(document.body.getAttribute(Vt)||"0",10);return isFinite(e)?e:0},sg=function(){l.useEffect(function(){return document.body.setAttribute(Vt,(ms()+1).toString()),function(){var e=ms()-1;e<=0?document.body.removeAttribute(Vt):document.body.setAttribute(Vt,e.toString())}},[])},ig=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;sg();var a=l.useMemo(function(){return rg(o)},[o]);return l.createElement(og,{styles:ag(a,!t,o,n?"":"!important")})},Co=!1;if(typeof window<"u")try{var Un=Object.defineProperty({},"passive",{get:function(){return Co=!0,!0}});window.addEventListener("test",Un,Un),window.removeEventListener("test",Un,Un)}catch{Co=!1}var _t=Co?{passive:!1}:!1,cg=function(e){return e.tagName==="TEXTAREA"},Oi=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!cg(e)&&n[t]==="visible")},lg=function(e){return Oi(e,"overflowY")},ug=function(e){return Oi(e,"overflowX")},ps=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ii(e,r);if(o){var a=Di(e,r),i=a[1],s=a[2];if(i>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},dg=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},fg=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ii=function(e,t){return e==="v"?lg(t):ug(t)},Di=function(e,t){return e==="v"?dg(t):fg(t)},mg=function(e,t){return e==="h"&&t==="rtl"?-1:1},pg=function(e,t,n,r,o){var a=mg(e,window.getComputedStyle(t).direction),i=a*r,s=n.target,c=t.contains(s),u=!1,d=i>0,m=0,p=0;do{var h=Di(e,s),y=h[0],g=h[1],v=h[2],b=g-v-a*y;(y||b)&&Ii(e,s)&&(m+=b,p+=y),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(d&&Math.abs(m)<1||!d&&Math.abs(p)<1)&&(u=!0),u},zn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},hs=function(e){return[e.deltaX,e.deltaY]},gs=function(e){return e&&"current"in e?e.current:e},hg=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gg=function(e){return`
|
|
138
140
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
139
141
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
140
|
-
`)},
|
|
142
|
+
`)},vg=0,jt=[];function yg(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState(vg++)[0],a=l.useState(ki)[0],i=l.useRef(e);l.useEffect(function(){i.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=Lh([e.lockRef.current],(e.shards||[]).map(gs),!0).filter(Boolean);return g.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=l.useCallback(function(g,v){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var b=zn(g),x=n.current,w="deltaX"in g?g.deltaX:x[0]-b[0],S="deltaY"in g?g.deltaY:x[1]-b[1],C,M=g.target,E=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in g&&E==="h"&&M.type==="range")return!1;var P=ps(E,M);if(!P)return!0;if(P?C=E:(C=E==="v"?"h":"v",P=ps(E,M)),!P)return!1;if(!r.current&&"changedTouches"in g&&(w||S)&&(r.current=C),!C)return!0;var F=r.current||C;return pg(F,v,g,F==="h"?w:S)},[]),c=l.useCallback(function(g){var v=g;if(!(!jt.length||jt[jt.length-1]!==a)){var b="deltaY"in v?hs(v):zn(v),x=t.current.filter(function(C){return C.name===v.type&&(C.target===v.target||v.target===C.shadowParent)&&hg(C.delta,b)})[0];if(x&&x.should){v.cancelable&&v.preventDefault();return}if(!x){var w=(i.current.shards||[]).map(gs).filter(Boolean).filter(function(C){return C.contains(v.target)}),S=w.length>0?s(v,w[0]):!i.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),u=l.useCallback(function(g,v,b,x){var w={name:g,delta:v,target:b,should:x,shadowParent:bg(b)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),d=l.useCallback(function(g){n.current=zn(g),r.current=void 0},[]),m=l.useCallback(function(g){u(g.type,hs(g),g.target,s(g,e.lockRef.current))},[]),p=l.useCallback(function(g){u(g.type,zn(g),g.target,s(g,e.lockRef.current))},[]);l.useEffect(function(){return jt.push(a),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:p}),document.addEventListener("wheel",c,_t),document.addEventListener("touchmove",c,_t),document.addEventListener("touchstart",d,_t),function(){jt=jt.filter(function(g){return g!==a}),document.removeEventListener("wheel",c,_t),document.removeEventListener("touchmove",c,_t),document.removeEventListener("touchstart",d,_t)}},[]);var h=e.removeScrollBar,y=e.inert;return l.createElement(l.Fragment,null,y?l.createElement(a,{styles:gg(o)}):null,h?l.createElement(ig,{gapMode:e.gapMode}):null)}function bg(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const xg=Kh(Pi,yg);var kn=l.forwardRef(function(e,t){return l.createElement(gr,Ue({},e,{ref:t,sideCar:xg}))});kn.classNames=gr.classNames;var wg=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ft=new WeakMap,Kn=new WeakMap,qn={},ao=0,Ti=function(e){return e&&(e.host||Ti(e.parentNode))},Cg=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ti(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})},Sg=function(e,t,n,r){var o=Cg(t,Array.isArray(e)?e:[e]);qn[n]||(qn[n]=new WeakMap);var a=qn[n],i=[],s=new Set,c=new Set(o),u=function(m){!m||s.has(m)||(s.add(m),u(m.parentNode))};o.forEach(u);var d=function(m){!m||c.has(m)||Array.prototype.forEach.call(m.children,function(p){if(s.has(p))d(p);else try{var h=p.getAttribute(r),y=h!==null&&h!=="false",g=(Ft.get(p)||0)+1,v=(a.get(p)||0)+1;Ft.set(p,g),a.set(p,v),i.push(p),g===1&&y&&Kn.set(p,!0),v===1&&p.setAttribute(n,"true"),y||p.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",p,b)}})};return d(t),s.clear(),ao++,function(){i.forEach(function(m){var p=Ft.get(m)-1,h=a.get(m)-1;Ft.set(m,p),a.set(m,h),p||(Kn.has(m)||m.removeAttribute(r),Kn.delete(m)),h||m.removeAttribute(n)}),ao--,ao||(Ft=new WeakMap,Ft=new WeakMap,Kn=new WeakMap,qn={})}},vr=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=wg(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Sg(r,o,n,"aria-hidden")):function(){return null}},yr="Dialog",[Ai,zN]=ve(yr),[Ng,Ve]=Ai(yr),_i=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=l.useRef(null),c=l.useRef(null),[u,d]=Ce({prop:r,defaultProp:o??!1,onChange:a,caller:yr});return f.jsx(Ng,{scope:t,triggerRef:s,contentRef:c,contentId:pe(),titleId:pe(),descriptionId:pe(),open:u,onOpenChange:d,onOpenToggle:l.useCallback(()=>d(m=>!m),[d]),modal:i,children:n})};_i.displayName=yr;var ji="DialogTrigger",Fi=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ve(ji,n),a=z(t,o.triggerRef);return f.jsx(V.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ta(o.open),...r,ref:a,onClick:O(e.onClick,o.onOpenToggle)})});Fi.displayName=ji;var Jo="DialogPortal",[Eg,$i]=Ai(Jo,{forceMount:void 0}),Li=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Ve(Jo,t);return f.jsx(Eg,{scope:t,forceMount:n,children:l.Children.map(r,i=>f.jsx(Te,{present:n||a.open,children:f.jsx(Pn,{asChild:!0,container:o,children:i})}))})};Li.displayName=Jo;var rr="DialogOverlay",Wi=l.forwardRef((e,t)=>{const n=$i(rr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Ve(rr,e.__scopeDialog);return a.modal?f.jsx(Te,{present:r||a.open,children:f.jsx(Rg,{...o,ref:t})}):null});Wi.displayName=rr;var Mg=ht("DialogOverlay.RemoveScroll"),Rg=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ve(rr,n);return f.jsx(kn,{as:Mg,allowPinchZoom:!0,shards:[o.contentRef],children:f.jsx(V.div,{"data-state":ta(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Et="DialogContent",Bi=l.forwardRef((e,t)=>{const n=$i(Et,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Ve(Et,e.__scopeDialog);return f.jsx(Te,{present:r||a.open,children:a.modal?f.jsx(Pg,{...o,ref:t}):f.jsx(kg,{...o,ref:t})})});Bi.displayName=Et;var Pg=l.forwardRef((e,t)=>{const n=Ve(Et,e.__scopeDialog),r=l.useRef(null),o=z(t,n.contentRef,r);return l.useEffect(()=>{const a=r.current;if(a)return vr(a)},[]),f.jsx(Vi,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:O(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:O(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:O(e.onFocusOutside,a=>a.preventDefault())})}),kg=l.forwardRef((e,t)=>{const n=Ve(Et,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return f.jsx(Vi,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,s;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Vi=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=Ve(Et,n),c=l.useRef(null),u=z(t,c);return hr(),f.jsxs(f.Fragment,{children:[f.jsx(Rn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:f.jsx(Mn,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ta(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),f.jsxs(f.Fragment,{children:[f.jsx(Og,{titleId:s.titleId}),f.jsx(Dg,{contentRef:c,descriptionId:s.descriptionId})]})]})}),ea="DialogTitle",Yi=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ve(ea,n);return f.jsx(V.h2,{id:o.titleId,...r,ref:t})});Yi.displayName=ea;var Hi="DialogDescription",Gi=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ve(Hi,n);return f.jsx(V.p,{id:o.descriptionId,...r,ref:t})});Gi.displayName=Hi;var Ui="DialogClose",zi=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ve(Ui,n);return f.jsx(V.button,{type:"button",...r,ref:t,onClick:O(e.onClick,()=>o.onOpenChange(!1))})});zi.displayName=Ui;function ta(e){return e?"open":"closed"}var Ki="DialogTitleWarning",[KN,qi]=Km(Ki,{contentName:Et,titleName:ea,docsSlug:"dialog"}),Og=({titleId:e})=>{const t=qi(Ki),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
141
143
|
|
|
142
144
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
143
145
|
|
|
144
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},wg="DialogDescriptionWarning",Cg=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ui(wg).contentName}}.`;return l.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Ki=Ai,Sg=_i,qi=Fi,ea=$i,ta=Li,Xi=Bi,Zi=Yi,Qi=Gi,cn='[cmdk-group=""]',oo='[cmdk-group-items=""]',Eg='[cmdk-group-heading=""]',Ji='[cmdk-item=""]',hs=`${Ji}:not([aria-disabled="true"])`,wo="cmdk-item-select",$t="data-value",Ng=(e,t,n)=>uh(e,t,n),ec=l.createContext(void 0),On=()=>l.useContext(ec),tc=l.createContext(void 0),na=()=>l.useContext(tc),nc=l.createContext(void 0),rc=l.forwardRef((e,t)=>{let n=Lt(()=>{var R,L;return{search:"",value:(L=(R=e.value)!=null?R:e.defaultValue)!=null?L:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Lt(()=>new Set),o=Lt(()=>new Map),a=Lt(()=>new Map),i=Lt(()=>new Set),s=oc(e),{label:c,children:u,value:d,onValueChange:m,filter:p,shouldFilter:h,loop:y,disablePointerSelection:g=!1,vimBindings:v=!0,...b}=e,x=pe(),w=pe(),S=pe(),C=l.useRef(null),M=jg();Mt(()=>{if(d!==void 0){let R=d.trim();n.current.value=R,N.emit()}},[d]),Mt(()=>{M(6,B)},[]);let N=l.useMemo(()=>({subscribe:R=>(i.current.add(R),()=>i.current.delete(R)),snapshot:()=>n.current,setState:(R,L,z)=>{var W,X,A,Z;if(!Object.is(n.current[R],L)){if(n.current[R]=L,R==="search")I(),_(),M(1,$);else if(R==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let K=document.getElementById(S);K?K.focus():(W=document.getElementById(x))==null||W.focus()}if(M(7,()=>{var K;n.current.selectedItemId=(K=Y())==null?void 0:K.id,N.emit()}),z||M(5,B),((X=s.current)==null?void 0:X.value)!==void 0){let K=L??"";(Z=(A=s.current).onValueChange)==null||Z.call(A,K);return}}N.emit()}},emit:()=>{i.current.forEach(R=>R())}}),[]),P=l.useMemo(()=>({value:(R,L,z)=>{var W;L!==((W=a.current.get(R))==null?void 0:W.value)&&(a.current.set(R,{value:L,keywords:z}),n.current.filtered.items.set(R,F(L,z)),M(2,()=>{_(),N.emit()}))},item:(R,L)=>(r.current.add(R),L&&(o.current.has(L)?o.current.get(L).add(R):o.current.set(L,new Set([R]))),M(3,()=>{I(),_(),n.current.value||$(),N.emit()}),()=>{a.current.delete(R),r.current.delete(R),n.current.filtered.items.delete(R);let z=Y();M(4,()=>{I(),(z==null?void 0:z.getAttribute("id"))===R&&$(),N.emit()})}),group:R=>(o.current.has(R)||o.current.set(R,new Set),()=>{a.current.delete(R),o.current.delete(R)}),filter:()=>s.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:x,inputId:S,labelId:w,listInnerRef:C}),[]);function F(R,L){var z,W;let X=(W=(z=s.current)==null?void 0:z.filter)!=null?W:Ng;return R?X(R,n.current.search,L):0}function _(){if(!n.current.search||s.current.shouldFilter===!1)return;let R=n.current.filtered.items,L=[];n.current.filtered.groups.forEach(W=>{let X=o.current.get(W),A=0;X.forEach(Z=>{let K=R.get(Z);A=Math.max(K,A)}),L.push([W,A])});let z=C.current;q().sort((W,X)=>{var A,Z;let K=W.getAttribute("id"),te=X.getAttribute("id");return((A=R.get(te))!=null?A:0)-((Z=R.get(K))!=null?Z:0)}).forEach(W=>{let X=W.closest(oo);X?X.appendChild(W.parentElement===X?W:W.closest(`${oo} > *`)):z.appendChild(W.parentElement===z?W:W.closest(`${oo} > *`))}),L.sort((W,X)=>X[1]-W[1]).forEach(W=>{var X;let A=(X=C.current)==null?void 0:X.querySelector(`${cn}[${$t}="${encodeURIComponent(W[0])}"]`);A==null||A.parentElement.appendChild(A)})}function $(){let R=q().find(z=>z.getAttribute("aria-disabled")!=="true"),L=R==null?void 0:R.getAttribute($t);N.setState("value",L||void 0)}function I(){var R,L,z,W;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let X=0;for(let A of r.current){let Z=(L=(R=a.current.get(A))==null?void 0:R.value)!=null?L:"",K=(W=(z=a.current.get(A))==null?void 0:z.keywords)!=null?W:[],te=F(Z,K);n.current.filtered.items.set(A,te),te>0&&X++}for(let[A,Z]of o.current)for(let K of Z)if(n.current.filtered.items.get(K)>0){n.current.filtered.groups.add(A);break}n.current.filtered.count=X}function B(){var R,L,z;let W=Y();W&&(((R=W.parentElement)==null?void 0:R.firstChild)===W&&((z=(L=W.closest(cn))==null?void 0:L.querySelector(Eg))==null||z.scrollIntoView({block:"nearest"})),W.scrollIntoView({block:"nearest"}))}function Y(){var R;return(R=C.current)==null?void 0:R.querySelector(`${Ji}[aria-selected="true"]`)}function q(){var R;return Array.from(((R=C.current)==null?void 0:R.querySelectorAll(hs))||[])}function j(R){let L=q()[R];L&&N.setState("value",L.getAttribute($t))}function G(R){var L;let z=Y(),W=q(),X=W.findIndex(Z=>Z===z),A=W[X+R];(L=s.current)!=null&&L.loop&&(A=X+R<0?W[W.length-1]:X+R===W.length?W[0]:W[X+R]),A&&N.setState("value",A.getAttribute($t))}function T(R){let L=Y(),z=L==null?void 0:L.closest(cn),W;for(;z&&!W;)z=R>0?Tg(z,cn):_g(z,cn),W=z==null?void 0:z.querySelector(hs);W?N.setState("value",W.getAttribute($t)):G(R)}let D=()=>j(q().length-1),Q=R=>{R.preventDefault(),R.metaKey?D():R.altKey?T(1):G(1)},J=R=>{R.preventDefault(),R.metaKey?j(0):R.altKey?T(-1):G(-1)};return l.createElement(V.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:R=>{var L;(L=b.onKeyDown)==null||L.call(b,R);let z=R.nativeEvent.isComposing||R.keyCode===229;if(!(R.defaultPrevented||z))switch(R.key){case"n":case"j":{v&&R.ctrlKey&&Q(R);break}case"ArrowDown":{Q(R);break}case"p":case"k":{v&&R.ctrlKey&&J(R);break}case"ArrowUp":{J(R);break}case"Home":{R.preventDefault(),j(0);break}case"End":{R.preventDefault(),D();break}case"Enter":{R.preventDefault();let W=Y();if(W){let X=new Event(wo);W.dispatchEvent(X)}}}}},l.createElement("label",{"cmdk-label":"",htmlFor:P.inputId,id:P.labelId,style:$g},c),yr(e,R=>l.createElement(tc.Provider,{value:N},l.createElement(ec.Provider,{value:P},R))))}),Mg=l.forwardRef((e,t)=>{var n,r;let o=pe(),a=l.useRef(null),i=l.useContext(nc),s=On(),c=oc(e),u=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:i==null?void 0:i.forceMount;Mt(()=>{if(!u)return s.item(o,i==null?void 0:i.id)},[u]);let d=ac(o,a,[e.value,e.children,a],e.keywords),m=na(),p=ht(M=>M.value&&M.value===d.current),h=ht(M=>u||s.filter()===!1?!0:M.search?M.filtered.items.get(o)>0:!0);l.useEffect(()=>{let M=a.current;if(!(!M||e.disabled))return M.addEventListener(wo,y),()=>M.removeEventListener(wo,y)},[h,e.onSelect,e.disabled]);function y(){var M,N;g(),(N=(M=c.current).onSelect)==null||N.call(M,d.current)}function g(){m.setState("value",d.current,!0)}if(!h)return null;let{disabled:v,value:b,onSelect:x,forceMount:w,keywords:S,...C}=e;return l.createElement(V.div,{ref:Ke(a,t),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!p,"data-disabled":!!v,"data-selected":!!p,onPointerMove:v||s.getDisablePointerSelection()?void 0:g,onClick:v?void 0:y},e.children)}),Rg=l.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=pe(),s=l.useRef(null),c=l.useRef(null),u=pe(),d=On(),m=ht(h=>o||d.filter()===!1?!0:h.search?h.filtered.groups.has(i):!0);Mt(()=>d.group(i),[]),ac(i,s,[e.value,e.heading,c]);let p=l.useMemo(()=>({id:i,forceMount:o}),[o]);return l.createElement(V.div,{ref:Ke(s,t),...a,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},n&&l.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),yr(e,h=>l.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},l.createElement(nc.Provider,{value:p},h))))}),Pg=l.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=l.useRef(null),a=ht(i=>!i.search);return!n&&!a?null:l.createElement(V.div,{ref:Ke(o,t),...r,"cmdk-separator":"",role:"separator"})}),kg=l.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=na(),i=ht(u=>u.search),s=ht(u=>u.selectedItemId),c=On();return l.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),l.createElement(V.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:"text",value:o?e.value:i,onChange:u=>{o||a.setState("search",u.target.value),n==null||n(u.target.value)}})}),Og=l.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=l.useRef(null),i=l.useRef(null),s=ht(u=>u.selectedItemId),c=On();return l.useEffect(()=>{if(i.current&&a.current){let u=i.current,d=a.current,m,p=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let h=u.offsetHeight;d.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(m),p.unobserve(u)}}},[]),l.createElement(V.div,{ref:Ke(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},yr(e,u=>l.createElement("div",{ref:Ke(i,c.listInnerRef),"cmdk-list-sizer":""},u)))}),Dg=l.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...s}=e;return l.createElement(Ki,{open:n,onOpenChange:r},l.createElement(qi,{container:i},l.createElement(ea,{"cmdk-overlay":"",className:o}),l.createElement(ta,{"aria-label":e.label,"cmdk-dialog":"",className:a},l.createElement(rc,{ref:t,...s}))))}),Ig=l.forwardRef((e,t)=>ht(n=>n.filtered.count===0)?l.createElement(V.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Ag=l.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return l.createElement(V.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},yr(e,i=>l.createElement("div",{"aria-hidden":!0},i)))}),Ae=Object.assign(rc,{List:Og,Item:Mg,Input:kg,Group:Rg,Separator:Pg,Dialog:Dg,Empty:Ig,Loading:Ag});function Tg(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function _g(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function oc(e){let t=l.useRef(e);return Mt(()=>{t.current=e}),t}var Mt=typeof window>"u"?l.useEffect:l.useLayoutEffect;function Lt(e){let t=l.useRef();return t.current===void 0&&(t.current=e()),t}function ht(e){let t=na(),n=()=>e(t.snapshot());return l.useSyncExternalStore(t.subscribe,n,n)}function ac(e,t,n,r=[]){let o=l.useRef(),a=On();return Mt(()=>{var i;let s=(()=>{var u;for(let d of n){if(typeof d=="string")return d.trim();if(typeof d=="object"&&"current"in d)return d.current?(u=d.current.textContent)==null?void 0:u.trim():o.current}})(),c=r.map(u=>u.trim());a.value(e,s,c),(i=t.current)==null||i.setAttribute($t,s),o.current=s}),o}var jg=()=>{let[e,t]=l.useState(),n=Lt(()=>new Map);return Mt(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function Fg(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function yr({asChild:e,children:t},n){return e&&l.isValidElement(t)?l.cloneElement(Fg(t),{ref:t.ref},n(t.props.children)):n(t)}var $g={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const br=l.forwardRef(({className:e,...t},n)=>f.jsx(Ae,{ref:n,className:k("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));br.displayName=Ae.displayName;const sc={popover:50,tooltip:50,overlay:50,dialog:50,dropdown:50};let gn={...sc};function Lg(e){gn={...gn,...e}}function Wg(){return{...gn}}function Bg(){gn={...sc}}function Ve(e,t){return t??gn[e]}const ra=l.forwardRef(({className:e,zIndex:t,...n},r)=>{const o=Ve("overlay",t);return f.jsx(ea,{ref:r,className:k(`fixed inset-0 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out
|
|
145
|
-
data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),style:{zIndex:o,...n.style},...n})});
|
|
146
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Ig="DialogDescriptionWarning",Dg=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qi(Ig).contentName}}.`;return l.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Xi=_i,Tg=Fi,Zi=Li,na=Wi,ra=Bi,Qi=Yi,Ji=Gi,ec=zi,sn='[cmdk-group=""]',so='[cmdk-group-items=""]',Ag='[cmdk-group-heading=""]',tc='[cmdk-item=""]',vs=`${tc}:not([aria-disabled="true"])`,So="cmdk-item-select",Lt="data-value",_g=(e,t,n)=>xh(e,t,n),nc=l.createContext(void 0),On=()=>l.useContext(nc),rc=l.createContext(void 0),oa=()=>l.useContext(rc),oc=l.createContext(void 0),ac=l.forwardRef((e,t)=>{let n=Wt(()=>{var R,L;return{search:"",value:(L=(R=e.value)!=null?R:e.defaultValue)!=null?L:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Wt(()=>new Set),o=Wt(()=>new Map),a=Wt(()=>new Map),i=Wt(()=>new Set),s=sc(e),{label:c,children:u,value:d,onValueChange:m,filter:p,shouldFilter:h,loop:y,disablePointerSelection:g=!1,vimBindings:v=!0,...b}=e,x=pe(),w=pe(),S=pe(),C=l.useRef(null),M=Ug();Mt(()=>{if(d!==void 0){let R=d.trim();n.current.value=R,E.emit()}},[d]),Mt(()=>{M(6,B)},[]);let E=l.useMemo(()=>({subscribe:R=>(i.current.add(R),()=>i.current.delete(R)),snapshot:()=>n.current,setState:(R,L,U)=>{var W,X,T,Z;if(!Object.is(n.current[R],L)){if(n.current[R]=L,R==="search")D(),_(),M(1,$);else if(R==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let K=document.getElementById(S);K?K.focus():(W=document.getElementById(x))==null||W.focus()}if(M(7,()=>{var K;n.current.selectedItemId=(K=Y())==null?void 0:K.id,E.emit()}),U||M(5,B),((X=s.current)==null?void 0:X.value)!==void 0){let K=L??"";(Z=(T=s.current).onValueChange)==null||Z.call(T,K);return}}E.emit()}},emit:()=>{i.current.forEach(R=>R())}}),[]),P=l.useMemo(()=>({value:(R,L,U)=>{var W;L!==((W=a.current.get(R))==null?void 0:W.value)&&(a.current.set(R,{value:L,keywords:U}),n.current.filtered.items.set(R,F(L,U)),M(2,()=>{_(),E.emit()}))},item:(R,L)=>(r.current.add(R),L&&(o.current.has(L)?o.current.get(L).add(R):o.current.set(L,new Set([R]))),M(3,()=>{D(),_(),n.current.value||$(),E.emit()}),()=>{a.current.delete(R),r.current.delete(R),n.current.filtered.items.delete(R);let U=Y();M(4,()=>{D(),(U==null?void 0:U.getAttribute("id"))===R&&$(),E.emit()})}),group:R=>(o.current.has(R)||o.current.set(R,new Set),()=>{a.current.delete(R),o.current.delete(R)}),filter:()=>s.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:x,inputId:S,labelId:w,listInnerRef:C}),[]);function F(R,L){var U,W;let X=(W=(U=s.current)==null?void 0:U.filter)!=null?W:_g;return R?X(R,n.current.search,L):0}function _(){if(!n.current.search||s.current.shouldFilter===!1)return;let R=n.current.filtered.items,L=[];n.current.filtered.groups.forEach(W=>{let X=o.current.get(W),T=0;X.forEach(Z=>{let K=R.get(Z);T=Math.max(K,T)}),L.push([W,T])});let U=C.current;q().sort((W,X)=>{var T,Z;let K=W.getAttribute("id"),te=X.getAttribute("id");return((T=R.get(te))!=null?T:0)-((Z=R.get(K))!=null?Z:0)}).forEach(W=>{let X=W.closest(so);X?X.appendChild(W.parentElement===X?W:W.closest(`${so} > *`)):U.appendChild(W.parentElement===U?W:W.closest(`${so} > *`))}),L.sort((W,X)=>X[1]-W[1]).forEach(W=>{var X;let T=(X=C.current)==null?void 0:X.querySelector(`${sn}[${Lt}="${encodeURIComponent(W[0])}"]`);T==null||T.parentElement.appendChild(T)})}function $(){let R=q().find(U=>U.getAttribute("aria-disabled")!=="true"),L=R==null?void 0:R.getAttribute(Lt);E.setState("value",L||void 0)}function D(){var R,L,U,W;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let X=0;for(let T of r.current){let Z=(L=(R=a.current.get(T))==null?void 0:R.value)!=null?L:"",K=(W=(U=a.current.get(T))==null?void 0:U.keywords)!=null?W:[],te=F(Z,K);n.current.filtered.items.set(T,te),te>0&&X++}for(let[T,Z]of o.current)for(let K of Z)if(n.current.filtered.items.get(K)>0){n.current.filtered.groups.add(T);break}n.current.filtered.count=X}function B(){var R,L,U;let W=Y();W&&(((R=W.parentElement)==null?void 0:R.firstChild)===W&&((U=(L=W.closest(sn))==null?void 0:L.querySelector(Ag))==null||U.scrollIntoView({block:"nearest"})),W.scrollIntoView({block:"nearest"}))}function Y(){var R;return(R=C.current)==null?void 0:R.querySelector(`${tc}[aria-selected="true"]`)}function q(){var R;return Array.from(((R=C.current)==null?void 0:R.querySelectorAll(vs))||[])}function j(R){let L=q()[R];L&&E.setState("value",L.getAttribute(Lt))}function G(R){var L;let U=Y(),W=q(),X=W.findIndex(Z=>Z===U),T=W[X+R];(L=s.current)!=null&&L.loop&&(T=X+R<0?W[W.length-1]:X+R===W.length?W[0]:W[X+R]),T&&E.setState("value",T.getAttribute(Lt))}function A(R){let L=Y(),U=L==null?void 0:L.closest(sn),W;for(;U&&!W;)U=R>0?Hg(U,sn):Gg(U,sn),W=U==null?void 0:U.querySelector(vs);W?E.setState("value",W.getAttribute(Lt)):G(R)}let I=()=>j(q().length-1),Q=R=>{R.preventDefault(),R.metaKey?I():R.altKey?A(1):G(1)},J=R=>{R.preventDefault(),R.metaKey?j(0):R.altKey?A(-1):G(-1)};return l.createElement(V.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:R=>{var L;(L=b.onKeyDown)==null||L.call(b,R);let U=R.nativeEvent.isComposing||R.keyCode===229;if(!(R.defaultPrevented||U))switch(R.key){case"n":case"j":{v&&R.ctrlKey&&Q(R);break}case"ArrowDown":{Q(R);break}case"p":case"k":{v&&R.ctrlKey&&J(R);break}case"ArrowUp":{J(R);break}case"Home":{R.preventDefault(),j(0);break}case"End":{R.preventDefault(),I();break}case"Enter":{R.preventDefault();let W=Y();if(W){let X=new Event(So);W.dispatchEvent(X)}}}}},l.createElement("label",{"cmdk-label":"",htmlFor:P.inputId,id:P.labelId,style:Kg},c),br(e,R=>l.createElement(rc.Provider,{value:E},l.createElement(nc.Provider,{value:P},R))))}),jg=l.forwardRef((e,t)=>{var n,r;let o=pe(),a=l.useRef(null),i=l.useContext(oc),s=On(),c=sc(e),u=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:i==null?void 0:i.forceMount;Mt(()=>{if(!u)return s.item(o,i==null?void 0:i.id)},[u]);let d=ic(o,a,[e.value,e.children,a],e.keywords),m=oa(),p=gt(M=>M.value&&M.value===d.current),h=gt(M=>u||s.filter()===!1?!0:M.search?M.filtered.items.get(o)>0:!0);l.useEffect(()=>{let M=a.current;if(!(!M||e.disabled))return M.addEventListener(So,y),()=>M.removeEventListener(So,y)},[h,e.onSelect,e.disabled]);function y(){var M,E;g(),(E=(M=c.current).onSelect)==null||E.call(M,d.current)}function g(){m.setState("value",d.current,!0)}if(!h)return null;let{disabled:v,value:b,onSelect:x,forceMount:w,keywords:S,...C}=e;return l.createElement(V.div,{ref:qe(a,t),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!p,"data-disabled":!!v,"data-selected":!!p,onPointerMove:v||s.getDisablePointerSelection()?void 0:g,onClick:v?void 0:y},e.children)}),Fg=l.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=pe(),s=l.useRef(null),c=l.useRef(null),u=pe(),d=On(),m=gt(h=>o||d.filter()===!1?!0:h.search?h.filtered.groups.has(i):!0);Mt(()=>d.group(i),[]),ic(i,s,[e.value,e.heading,c]);let p=l.useMemo(()=>({id:i,forceMount:o}),[o]);return l.createElement(V.div,{ref:qe(s,t),...a,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},n&&l.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),br(e,h=>l.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},l.createElement(oc.Provider,{value:p},h))))}),$g=l.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=l.useRef(null),a=gt(i=>!i.search);return!n&&!a?null:l.createElement(V.div,{ref:qe(o,t),...r,"cmdk-separator":"",role:"separator"})}),Lg=l.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=oa(),i=gt(u=>u.search),s=gt(u=>u.selectedItemId),c=On();return l.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),l.createElement(V.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:"text",value:o?e.value:i,onChange:u=>{o||a.setState("search",u.target.value),n==null||n(u.target.value)}})}),Wg=l.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=l.useRef(null),i=l.useRef(null),s=gt(u=>u.selectedItemId),c=On();return l.useEffect(()=>{if(i.current&&a.current){let u=i.current,d=a.current,m,p=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let h=u.offsetHeight;d.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(m),p.unobserve(u)}}},[]),l.createElement(V.div,{ref:qe(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},br(e,u=>l.createElement("div",{ref:qe(i,c.listInnerRef),"cmdk-list-sizer":""},u)))}),Bg=l.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...s}=e;return l.createElement(Xi,{open:n,onOpenChange:r},l.createElement(Zi,{container:i},l.createElement(na,{"cmdk-overlay":"",className:o}),l.createElement(ra,{"aria-label":e.label,"cmdk-dialog":"",className:a},l.createElement(ac,{ref:t,...s}))))}),Vg=l.forwardRef((e,t)=>gt(n=>n.filtered.count===0)?l.createElement(V.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Yg=l.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return l.createElement(V.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},br(e,i=>l.createElement("div",{"aria-hidden":!0},i)))}),Ae=Object.assign(ac,{List:Wg,Item:jg,Input:Lg,Group:Fg,Separator:$g,Dialog:Bg,Empty:Vg,Loading:Yg});function Hg(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Gg(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function sc(e){let t=l.useRef(e);return Mt(()=>{t.current=e}),t}var Mt=typeof window>"u"?l.useEffect:l.useLayoutEffect;function Wt(e){let t=l.useRef();return t.current===void 0&&(t.current=e()),t}function gt(e){let t=oa(),n=()=>e(t.snapshot());return l.useSyncExternalStore(t.subscribe,n,n)}function ic(e,t,n,r=[]){let o=l.useRef(),a=On();return Mt(()=>{var i;let s=(()=>{var u;for(let d of n){if(typeof d=="string")return d.trim();if(typeof d=="object"&&"current"in d)return d.current?(u=d.current.textContent)==null?void 0:u.trim():o.current}})(),c=r.map(u=>u.trim());a.value(e,s,c),(i=t.current)==null||i.setAttribute(Lt,s),o.current=s}),o}var Ug=()=>{let[e,t]=l.useState(),n=Wt(()=>new Map);return Mt(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function zg(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function br({asChild:e,children:t},n){return e&&l.isValidElement(t)?l.cloneElement(zg(t),{ref:t.ref},n(t.props.children)):n(t)}var Kg={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const xr=l.forwardRef(({className:e,...t},n)=>f.jsx(Ae,{ref:n,className:k("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));xr.displayName=Ae.displayName;const cc={popover:50,tooltip:50,overlay:50,dialog:50,dropdown:50};let hn={...cc};function qg(e){hn={...hn,...e}}function Xg(){return{...hn}}function Zg(){hn={...cc}}function Ye(e,t){return t??hn[e]}const aa=l.forwardRef(({className:e,zIndex:t,...n},r)=>{const o=Ye("overlay",t);return f.jsx(na,{ref:r,className:k(`fixed inset-0 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out
|
|
147
|
+
data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),style:{zIndex:o,...n.style},...n})});aa.displayName=na.displayName;const lc=l.forwardRef(({className:e,children:t,zIndex:n,...r},o)=>{const a=Ye("dialog",n);return f.jsxs(uc,{children:[f.jsx(aa,{}),f.jsxs(ra,{ref:o,className:k(`fixed left-[50%] top-[50%] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%]
|
|
146
148
|
gap-4 border bg-background px-6 py-6 shadow-lg duration-200 data-[state=open]:animate-in
|
|
147
149
|
data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0
|
|
148
150
|
data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95
|
|
149
151
|
data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]
|
|
150
152
|
data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]
|
|
151
|
-
sm:rounded-lg`,e),style:{zIndex:a,...r.style},...r,children:[t,f.jsxs(
|
|
153
|
+
sm:rounded-lg`,e),style:{zIndex:a,...r.style},...r,children:[t,f.jsxs(ec,{className:k(ie.focusRing,`absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity
|
|
152
154
|
hover:opacity-100 disabled:pointer-events-none data-[state=open]:bg-accent
|
|
153
|
-
data-[state=open]:text-muted-foreground`),children:[f.jsx(
|
|
155
|
+
data-[state=open]:text-muted-foreground`),children:[f.jsx(pr,{className:"h-4 w-4"}),f.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});lc.displayName=ra.displayName;const Qg=Xi,Jg=Tg,uc=Zi,ev=ec,tv=V.div,dc="px-3 py-2.5 text-sm",sa=l.forwardRef((e,t)=>f.jsx(Ae.Empty,{ref:t,className:dc,...e}));sa.displayName=Ae.Empty.displayName;const No=l.forwardRef((e,t)=>f.jsx(tv,{ref:t,className:dc,...e,"cmdk-empty":"",role:"presentation"}));No.displayName="CommandForceEmpty";const wr=l.forwardRef(({className:e,...t},n)=>f.jsx(Ae.Group,{ref:n,className:k(`overflow-hidden px-1 py-1 text-foreground [&_[cmdk-group-heading]]:px-2
|
|
154
156
|
[&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs
|
|
155
|
-
[&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground`,e),...t}));
|
|
156
|
-
placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]}));
|
|
157
|
+
[&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground`,e),...t}));wr.displayName=Ae.Group.displayName;const Cr=l.forwardRef(({className:e,...t},n)=>f.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[f.jsx(Qp,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),f.jsx(Ae.Input,{ref:n,className:k(`flex h-11 w-full rounded-sm bg-transparent py-3 text-sm outline-none
|
|
158
|
+
placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]}));Cr.displayName=Ae.Input.displayName;const Sr=l.forwardRef(({className:e,...t},n)=>f.jsx(Ae.Item,{ref:n,className:k(`relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm
|
|
157
159
|
outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50
|
|
158
|
-
aria-selected:bg-accent aria-selected:text-accent-foreground`,e),...t}));Cr.displayName=Ae.Item.displayName;const Sr=l.forwardRef(({className:e,...t},n)=>f.jsx(Ae.List,{ref:n,className:k("max-h-[20rem] overflow-y-auto overflow-x-hidden",e),...t}));Sr.displayName=Ae.List.displayName;const uc=({children:e="Loading...",...t})=>f.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 text-sm text-muted-foreground",...t,children:[f.jsx(gi,{className:"h-4 w-4 animate-spin"}),e]});uc.displayName="CommandLoading";const zg=["top","right","bottom","left"],gt=Math.min,Re=Math.max,rr=Math.round,qn=Math.floor,Ue=e=>({x:e,y:e}),Ug={left:"right",right:"left",bottom:"top",top:"bottom"},Kg={start:"end",end:"start"};function So(e,t,n){return Re(e,gt(t,n))}function at(e,t){return typeof e=="function"?e(t):e}function st(e){return e.split("-")[0]}function qt(e){return e.split("-")[1]}function aa(e){return e==="x"?"y":"x"}function sa(e){return e==="y"?"height":"width"}function vt(e){return["top","bottom"].includes(st(e))?"y":"x"}function ia(e){return aa(vt(e))}function qg(e,t,n){n===void 0&&(n=!1);const r=qt(e),o=ia(e),a=sa(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=or(i)),[i,or(i)]}function Xg(e){const t=or(e);return[Eo(e),t,Eo(t)]}function Eo(e){return e.replace(/start|end/g,t=>Kg[t])}function Zg(e,t,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:i;default:return[]}}function Qg(e,t,n,r){const o=qt(e);let a=Zg(st(e),n==="start",r);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(Eo)))),a}function or(e){return e.replace(/left|right|bottom|top/g,t=>Ug[t])}function Jg(e){return{top:0,right:0,bottom:0,left:0,...e}}function dc(e){return typeof e!="number"?Jg(e):{top:e,right:e,bottom:e,left:e}}function ar(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 gs(e,t,n){let{reference:r,floating:o}=e;const a=vt(t),i=ia(t),s=sa(i),c=st(t),u=a==="y",d=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let h;switch(c){case"top":h={x:d,y:r.y-o.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:m};break;case"left":h={x:r.x-o.width,y:m};break;default:h={x:r.x,y:r.y}}switch(qt(t)){case"start":h[i]-=p*(n&&u?-1:1);break;case"end":h[i]+=p*(n&&u?-1:1);break}return h}const ev=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:m}=gs(u,r,c),p=r,h={},y=0;for(let g=0;g<s.length;g++){const{name:v,fn:b}=s[g],{x,y:w,data:S,reset:C}=await b({x:d,y:m,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:u,platform:i,elements:{reference:e,floating:t}});d=x??d,m=w??m,h={...h,[v]:{...h[v],...S}},C&&y<=50&&(y++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(u=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:d,y:m}=gs(u,p,c)),g=-1)}return{x:d,y:m,placement:p,strategy:o,middlewareData:h}};async function vn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:i,elements:s,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:p=!1,padding:h=0}=at(t,e),y=dc(h),v=s[p?m==="floating"?"reference":"floating":m],b=ar(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(v)))==null||n?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:c})),x=m==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),S=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},C=ar(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:w,strategy:c}):x);return{top:(b.top-C.top+y.top)/S.y,bottom:(C.bottom-b.bottom+y.bottom)/S.y,left:(b.left-C.left+y.left)/S.x,right:(C.right-b.right+y.right)/S.x}}const tv=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:c}=t,{element:u,padding:d=0}=at(e,t)||{};if(u==null)return{};const m=dc(d),p={x:n,y:r},h=ia(o),y=sa(h),g=await i.getDimensions(u),v=h==="y",b=v?"top":"left",x=v?"bottom":"right",w=v?"clientHeight":"clientWidth",S=a.reference[y]+a.reference[h]-p[h]-a.floating[y],C=p[h]-a.reference[h],M=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let N=M?M[w]:0;(!N||!await(i.isElement==null?void 0:i.isElement(M)))&&(N=s.floating[w]||a.floating[y]);const P=S/2-C/2,F=N/2-g[y]/2-1,_=gt(m[b],F),$=gt(m[x],F),I=_,B=N-g[y]-$,Y=N/2-g[y]/2+P,q=So(I,Y,B),j=!c.arrow&&qt(o)!=null&&Y!==q&&a.reference[y]/2-(Y<I?_:$)-g[y]/2<0,G=j?Y<I?Y-I:Y-B:0;return{[h]:p[h]+G,data:{[h]:q,centerOffset:Y-q-G,...j&&{alignmentOffset:G}},reset:j}}}),nv=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:m=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...v}=at(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const b=st(o),x=vt(s),w=st(s)===s,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=p||(w||!g?[or(s)]:Xg(s)),M=y!=="none";!p&&M&&C.push(...Qg(s,g,y,S));const N=[s,...C],P=await vn(t,v),F=[];let _=((r=a.flip)==null?void 0:r.overflows)||[];if(d&&F.push(P[b]),m){const Y=qg(o,i,S);F.push(P[Y[0]],P[Y[1]])}if(_=[..._,{placement:o,overflows:F}],!F.every(Y=>Y<=0)){var $,I;const Y=((($=a.flip)==null?void 0:$.index)||0)+1,q=N[Y];if(q)return{data:{index:Y,overflows:_},reset:{placement:q}};let j=(I=_.filter(G=>G.overflows[0]<=0).sort((G,T)=>G.overflows[1]-T.overflows[1])[0])==null?void 0:I.placement;if(!j)switch(h){case"bestFit":{var B;const G=(B=_.filter(T=>{if(M){const D=vt(T.placement);return D===x||D==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(D=>D>0).reduce((D,Q)=>D+Q,0)]).sort((T,D)=>T[1]-D[1])[0])==null?void 0:B[0];G&&(j=G);break}case"initialPlacement":j=s;break}if(o!==j)return{reset:{placement:j}}}return{}}}};function vs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ys(e){return zg.some(t=>e[t]>=0)}const rv=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=at(e,t);switch(r){case"referenceHidden":{const a=await vn(t,{...o,elementContext:"reference"}),i=vs(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ys(i)}}}case"escaped":{const a=await vn(t,{...o,altBoundary:!0}),i=vs(a,n.floating);return{data:{escapedOffsets:i,escaped:ys(i)}}}default:return{}}}}};async function ov(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=st(n),s=qt(n),c=vt(n)==="y",u=["left","top"].includes(i)?-1:1,d=a&&c?-1:1,m=at(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:y}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return s&&typeof y=="number"&&(h=s==="end"?y*-1:y),c?{x:h*d,y:p*u}:{x:p*u,y:h*d}}const av=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:s}=t,c=await ov(t,e);return i===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:i}}}}},sv=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:v=>{let{x:b,y:x}=v;return{x:b,y:x}}},...c}=at(e,t),u={x:n,y:r},d=await vn(t,c),m=vt(st(o)),p=aa(m);let h=u[p],y=u[m];if(a){const v=p==="y"?"top":"left",b=p==="y"?"bottom":"right",x=h+d[v],w=h-d[b];h=So(x,h,w)}if(i){const v=m==="y"?"top":"left",b=m==="y"?"bottom":"right",x=y+d[v],w=y-d[b];y=So(x,y,w)}const g=s.fn({...t,[p]:h,[m]:y});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:a,[m]:i}}}}}},iv=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:c=!0,crossAxis:u=!0}=at(e,t),d={x:n,y:r},m=vt(o),p=aa(m);let h=d[p],y=d[m];const g=at(s,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const w=p==="y"?"height":"width",S=a.reference[p]-a.floating[w]+v.mainAxis,C=a.reference[p]+a.reference[w]-v.mainAxis;h<S?h=S:h>C&&(h=C)}if(u){var b,x;const w=p==="y"?"width":"height",S=["top","left"].includes(st(o)),C=a.reference[m]-a.floating[w]+(S&&((b=i.offset)==null?void 0:b[m])||0)+(S?0:v.crossAxis),M=a.reference[m]+a.reference[w]+(S?0:((x=i.offset)==null?void 0:x[m])||0)-(S?v.crossAxis:0);y<C?y=C:y>M&&(y=M)}return{[p]:h,[m]:y}}}},cv=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:s}=t,{apply:c=()=>{},...u}=at(e,t),d=await vn(t,u),m=st(o),p=qt(o),h=vt(o)==="y",{width:y,height:g}=a.floating;let v,b;m==="top"||m==="bottom"?(v=m,b=p===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(b=m,v=p==="end"?"top":"bottom");const x=g-d.top-d.bottom,w=y-d.left-d.right,S=gt(g-d[v],x),C=gt(y-d[b],w),M=!t.middlewareData.shift;let N=S,P=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=x),M&&!p){const _=Re(d.left,0),$=Re(d.right,0),I=Re(d.top,0),B=Re(d.bottom,0);h?P=y-2*(_!==0||$!==0?_+$:Re(d.left,d.right)):N=g-2*(I!==0||B!==0?I+B:Re(d.top,d.bottom))}await c({...t,availableWidth:P,availableHeight:N});const F=await i.getDimensions(s.floating);return y!==F.width||g!==F.height?{reset:{rects:!0}}:{}}}};function Er(){return typeof window<"u"}function Xt(e){return fc(e)?(e.nodeName||"").toLowerCase():"#document"}function Pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ze(e){var t;return(t=(fc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fc(e){return Er()?e instanceof Node||e instanceof Pe(e).Node:!1}function $e(e){return Er()?e instanceof Element||e instanceof Pe(e).Element:!1}function qe(e){return Er()?e instanceof HTMLElement||e instanceof Pe(e).HTMLElement:!1}function bs(e){return!Er()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pe(e).ShadowRoot}function Dn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function lv(e){return["table","td","th"].includes(Xt(e))}function Nr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ca(e){const t=la(),n=$e(e)?Le(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 uv(e){let t=yt(e);for(;qe(t)&&!Yt(t);){if(ca(t))return t;if(Nr(t))return null;t=yt(t)}return null}function la(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Yt(e){return["html","body","#document"].includes(Xt(e))}function Le(e){return Pe(e).getComputedStyle(e)}function Mr(e){return $e(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yt(e){if(Xt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bs(e)&&e.host||Ze(e);return bs(t)?t.host:t}function mc(e){const t=yt(e);return Yt(t)?e.ownerDocument?e.ownerDocument.body:e.body:qe(t)&&Dn(t)?t:mc(t)}function yn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=mc(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=Pe(o);if(a){const s=No(i);return t.concat(i,i.visualViewport||[],Dn(o)?o:[],s&&n?yn(s):[])}return t.concat(o,yn(o,[],n))}function No(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function pc(e){const t=Le(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=qe(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=rr(n)!==a||rr(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function ua(e){return $e(e)?e:e.contextElement}function Vt(e){const t=ua(e);if(!qe(t))return Ue(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=pc(t);let i=(a?rr(n.width):n.width)/r,s=(a?rr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const dv=Ue(0);function hc(e){const t=Pe(e);return!la()||!t.visualViewport?dv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pe(e)?!1:t}function Rt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=ua(e);let i=Ue(1);t&&(r?$e(r)&&(i=Vt(r)):i=Vt(e));const s=fv(a,n,r)?hc(a):Ue(0);let c=(o.left+s.x)/i.x,u=(o.top+s.y)/i.y,d=o.width/i.x,m=o.height/i.y;if(a){const p=Pe(a),h=r&&$e(r)?Pe(r):r;let y=p,g=No(y);for(;g&&r&&h!==y;){const v=Vt(g),b=g.getBoundingClientRect(),x=Le(g),w=b.left+(g.clientLeft+parseFloat(x.paddingLeft))*v.x,S=b.top+(g.clientTop+parseFloat(x.paddingTop))*v.y;c*=v.x,u*=v.y,d*=v.x,m*=v.y,c+=w,u+=S,y=Pe(g),g=No(y)}}return ar({width:d,height:m,x:c,y:u})}function da(e,t){const n=Mr(e).scrollLeft;return t?t.left+n:Rt(Ze(e)).left+n}function gc(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:da(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function mv(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",i=Ze(r),s=t?Nr(t.floating):!1;if(r===i||s&&a)return n;let c={scrollLeft:0,scrollTop:0},u=Ue(1);const d=Ue(0),m=qe(r);if((m||!m&&!a)&&((Xt(r)!=="body"||Dn(i))&&(c=Mr(r)),qe(r))){const h=Rt(r);u=Vt(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const p=i&&!m&&!a?gc(i,c,!0):Ue(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-c.scrollTop*u.y+d.y+p.y}}function pv(e){return Array.from(e.getClientRects())}function hv(e){const t=Ze(e),n=Mr(e),r=e.ownerDocument.body,o=Re(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Re(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+da(e);const s=-n.scrollTop;return Le(r).direction==="rtl"&&(i+=Re(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}function gv(e,t){const n=Pe(e),r=Ze(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,s=0,c=0;if(o){a=o.width,i=o.height;const u=la();(!u||u&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:a,height:i,x:s,y:c}}function vv(e,t){const n=Rt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=qe(e)?Vt(e):Ue(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,c=o*a.x,u=r*a.y;return{width:i,height:s,x:c,y:u}}function xs(e,t,n){let r;if(t==="viewport")r=gv(e,n);else if(t==="document")r=hv(Ze(e));else if($e(t))r=vv(t,n);else{const o=hc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ar(r)}function vc(e,t){const n=yt(e);return n===t||!$e(n)||Yt(n)?!1:Le(n).position==="fixed"||vc(n,t)}function yv(e,t){const n=t.get(e);if(n)return n;let r=yn(e,[],!1).filter(s=>$e(s)&&Xt(s)!=="body"),o=null;const a=Le(e).position==="fixed";let i=a?yt(e):e;for(;$e(i)&&!Yt(i);){const s=Le(i),c=ca(i);!c&&s.position==="fixed"&&(o=null),(a?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Dn(i)&&!c&&vc(e,i))?r=r.filter(d=>d!==i):o=s,i=yt(i)}return t.set(e,r),r}function bv(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Nr(t)?[]:yv(t,this._c):[].concat(n),r],s=i[0],c=i.reduce((u,d)=>{const m=xs(t,d,o);return u.top=Re(m.top,u.top),u.right=gt(m.right,u.right),u.bottom=gt(m.bottom,u.bottom),u.left=Re(m.left,u.left),u},xs(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function xv(e){const{width:t,height:n}=pc(e);return{width:t,height:n}}function wv(e,t,n){const r=qe(t),o=Ze(t),a=n==="fixed",i=Rt(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=Ue(0);if(r||!r&&!a)if((Xt(t)!=="body"||Dn(o))&&(s=Mr(t)),r){const p=Rt(t,!0,a,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else o&&(c.x=da(o));const u=o&&!r&&!a?gc(o,s):Ue(0),d=i.left+s.scrollLeft-c.x-u.x,m=i.top+s.scrollTop-c.y-u.y;return{x:d,y:m,width:i.width,height:i.height}}function ao(e){return Le(e).position==="static"}function ws(e,t){if(!qe(e)||Le(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ze(e)===n&&(n=n.ownerDocument.body),n}function yc(e,t){const n=Pe(e);if(Nr(e))return n;if(!qe(e)){let o=yt(e);for(;o&&!Yt(o);){if($e(o)&&!ao(o))return o;o=yt(o)}return n}let r=ws(e,t);for(;r&&lv(r)&&ao(r);)r=ws(r,t);return r&&Yt(r)&&ao(r)&&!ca(r)?n:r||uv(e)||n}const Cv=async function(e){const t=this.getOffsetParent||yc,n=this.getDimensions,r=await n(e.floating);return{reference:wv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Sv(e){return Le(e).direction==="rtl"}const Ev={convertOffsetParentRelativeRectToViewportRelativeRect:mv,getDocumentElement:Ze,getClippingRect:bv,getOffsetParent:yc,getElementRects:Cv,getClientRects:pv,getDimensions:xv,getScale:Vt,isElement:$e,isRTL:Sv};function bc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Nv(e,t){let n=null,r;const o=Ze(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function i(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:d,top:m,width:p,height:h}=u;if(s||t(),!p||!h)return;const y=qn(m),g=qn(o.clientWidth-(d+p)),v=qn(o.clientHeight-(m+h)),b=qn(d),w={rootMargin:-y+"px "+-g+"px "+-v+"px "+-b+"px",threshold:Re(0,gt(1,c))||1};let S=!0;function C(M){const N=M[0].intersectionRatio;if(N!==c){if(!S)return i();N?i(!1,N):r=setTimeout(()=>{i(!1,1e-7)},1e3)}N===1&&!bc(u,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(C,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return i(!0),a}function xc(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=ua(e),d=o||a?[...u?yn(u):[],...yn(t)]:[];d.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),a&&b.addEventListener("resize",n)});const m=u&&s?Nv(u,n):null;let p=-1,h=null;i&&(h=new ResizeObserver(b=>{let[x]=b;x&&x.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let y,g=c?Rt(e):null;c&&v();function v(){const b=Rt(e);g&&!bc(g,b)&&n(),g=b,y=requestAnimationFrame(v)}return n(),()=>{var b;d.forEach(x=>{o&&x.removeEventListener("scroll",n),a&&x.removeEventListener("resize",n)}),m==null||m(),(b=h)==null||b.disconnect(),h=null,c&&cancelAnimationFrame(y)}}const Mv=av,Rv=sv,Pv=nv,kv=cv,Ov=rv,Cs=tv,Dv=iv,Iv=(e,t,n)=>{const r=new Map,o={platform:Ev,...n},a={...o.platform,_c:r};return ev(e,t,{...o,platform:a})};var er=typeof document<"u"?E.useLayoutEffect:E.useEffect;function sr(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(!sr(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 a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!sr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function wc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ss(e,t){const n=wc(e);return Math.round(t*n)/n}function so(e){const t=l.useRef(e);return er(()=>{t.current=e}),t}function Cc(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[d,m]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=l.useState(r);sr(p,r)||h(r);const[y,g]=l.useState(null),[v,b]=l.useState(null),x=l.useCallback(T=>{T!==M.current&&(M.current=T,g(T))},[]),w=l.useCallback(T=>{T!==N.current&&(N.current=T,b(T))},[]),S=a||y,C=i||v,M=l.useRef(null),N=l.useRef(null),P=l.useRef(d),F=c!=null,_=so(c),$=so(o),I=so(u),B=l.useCallback(()=>{if(!M.current||!N.current)return;const T={placement:t,strategy:n,middleware:p};$.current&&(T.platform=$.current),Iv(M.current,N.current,T).then(D=>{const Q={...D,isPositioned:I.current!==!1};Y.current&&!sr(P.current,Q)&&(P.current=Q,En.flushSync(()=>{m(Q)}))})},[p,t,n,$,I]);er(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,m(T=>({...T,isPositioned:!1})))},[u]);const Y=l.useRef(!1);er(()=>(Y.current=!0,()=>{Y.current=!1}),[]),er(()=>{if(S&&(M.current=S),C&&(N.current=C),S&&C){if(_.current)return _.current(S,C,B);B()}},[S,C,B,_,F]);const q=l.useMemo(()=>({reference:M,floating:N,setReference:x,setFloating:w}),[x,w]),j=l.useMemo(()=>({reference:S,floating:C}),[S,C]),G=l.useMemo(()=>{const T={position:n,left:0,top:0};if(!j.floating)return T;const D=Ss(j.floating,d.x),Q=Ss(j.floating,d.y);return s?{...T,transform:"translate("+D+"px, "+Q+"px)",...wc(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:D,top:Q}},[n,s,j.floating,d.x,d.y]);return l.useMemo(()=>({...d,update:B,refs:q,elements:j,floatingStyles:G}),[d,B,q,j,G])}const Av=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?Cs({element:r.current,padding:o}).fn(n):{}:r?Cs({element:r,padding:o}).fn(n):{}}}},Sc=(e,t)=>({...Mv(e),options:[e,t]}),Ec=(e,t)=>({...Rv(e),options:[e,t]}),Nc=(e,t)=>({...Dv(e),options:[e,t]}),Mc=(e,t)=>({...Pv(e),options:[e,t]}),Rc=(e,t)=>({...kv(e),options:[e,t]}),Pc=(e,t)=>({...Ov(e),options:[e,t]}),kc=(e,t)=>({...Av(e),options:[e,t]});var Tv="Arrow",Oc=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return f.jsx(V.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});Oc.displayName=Tv;var _v=Oc;function In(e){const[t,n]=l.useState(void 0);return de(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let i,s;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,s=u.blockSize}else i=e.offsetWidth,s=e.offsetHeight;n({width:i,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var fa="Popper",[Dc,Zt]=ve(fa),[jv,Ic]=Dc(fa),Ac=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return f.jsx(jv,{scope:t,anchor:r,onAnchorChange:o,children:n})};Ac.displayName=fa;var Tc="PopperAnchor",_c=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Ic(Tc,n),i=l.useRef(null),s=U(t,i);return l.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:f.jsx(V.div,{...o,ref:s})});_c.displayName=Tc;var ma="PopperContent",[Fv,$v]=Dc(ma),jc=l.forwardRef((e,t)=>{var A,Z,K,te,re,oe;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:m="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:y,...g}=e,v=Ic(ma,n),[b,x]=l.useState(null),w=U(t,he=>x(he)),[S,C]=l.useState(null),M=In(S),N=(M==null?void 0:M.width)??0,P=(M==null?void 0:M.height)??0,F=r+(a!=="center"?"-"+a:""),_=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},$=Array.isArray(u)?u:[u],I=$.length>0,B={padding:_,boundary:$.filter(Wv),altBoundary:I},{refs:Y,floatingStyles:q,placement:j,isPositioned:G,middlewareData:T}=Cc({strategy:"fixed",placement:F,whileElementsMounted:(...he)=>xc(...he,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Sc({mainAxis:o+P,alignmentAxis:i}),c&&Ec({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Nc():void 0,...B}),c&&Mc({...B}),Rc({...B,apply:({elements:he,rects:be,availableWidth:Je,availableHeight:et})=>{const{width:tt,height:on}=be.reference,Te=he.floating.style;Te.setProperty("--radix-popper-available-width",`${Je}px`),Te.setProperty("--radix-popper-available-height",`${et}px`),Te.setProperty("--radix-popper-anchor-width",`${tt}px`),Te.setProperty("--radix-popper-anchor-height",`${on}px`)}}),S&&kc({element:S,padding:s}),Bv({arrowWidth:N,arrowHeight:P}),p&&Pc({strategy:"referenceHidden",...B})]}),[D,Q]=Lc(j),J=Se(y);de(()=>{G&&(J==null||J())},[G,J]);const R=(A=T.arrow)==null?void 0:A.x,L=(Z=T.arrow)==null?void 0:Z.y,z=((K=T.arrow)==null?void 0:K.centerOffset)!==0,[W,X]=l.useState();return de(()=>{b&&X(window.getComputedStyle(b).zIndex)},[b]),f.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:G?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[(te=T.transformOrigin)==null?void 0:te.x,(re=T.transformOrigin)==null?void 0:re.y].join(" "),...((oe=T.hide)==null?void 0:oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(Fv,{scope:n,placedSide:D,onArrowChange:C,arrowX:R,arrowY:L,shouldHideArrow:z,children:f.jsx(V.div,{"data-side":D,"data-align":Q,...g,ref:w,style:{...g.style,animation:G?void 0:"none"}})})})});jc.displayName=ma;var Fc="PopperArrow",Lv={top:"bottom",right:"left",bottom:"top",left:"right"},$c=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=$v(Fc,r),i=Lv[a.placedSide];return f.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:f.jsx(_v,{...o,ref:n,style:{...o.style,display:"block"}})})});$c.displayName=Fc;function Wv(e){return e!==null}var Bv=e=>({name:"transformOrigin",options:e,fn(t){var v,b,x;const{placement:n,rects:r,middlewareData:o}=t,i=((v=o.arrow)==null?void 0:v.centerOffset)!==0,s=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,d]=Lc(n),m={start:"0%",center:"50%",end:"100%"}[d],p=(((b=o.arrow)==null?void 0:b.x)??0)+s/2,h=(((x=o.arrow)==null?void 0:x.y)??0)+c/2;let y="",g="";return u==="bottom"?(y=i?m:`${p}px`,g=`${-c}px`):u==="top"?(y=i?m:`${p}px`,g=`${r.floating.height+c}px`):u==="right"?(y=`${-c}px`,g=i?m:`${h}px`):u==="left"&&(y=`${r.floating.width+c}px`,g=i?m:`${h}px`),{data:{x:y,y:g}}}});function Lc(e){const[t,n="center"]=e.split("-");return[t,n]}var pa=Ac,Rr=_c,ha=jc,ga=$c,Pr="Popover",[Wc,TE]=ve(Pr,[Zt]),An=Zt(),[Vv,xt]=Wc(Pr),Bc=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,s=An(t),c=l.useRef(null),[u,d]=l.useState(!1),[m,p]=Ce({prop:r,defaultProp:o??!1,onChange:a,caller:Pr});return f.jsx(pa,{...s,children:f.jsx(Vv,{scope:t,contentId:pe(),triggerRef:c,open:m,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(h=>!h),[p]),hasCustomAnchor:u,onCustomAnchorAdd:l.useCallback(()=>d(!0),[]),onCustomAnchorRemove:l.useCallback(()=>d(!1),[]),modal:i,children:n})})};Bc.displayName=Pr;var Vc="PopoverAnchor",Yv=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=xt(Vc,n),a=An(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=o;return l.useEffect(()=>(i(),()=>s()),[i,s]),f.jsx(Rr,{...a,...r,ref:t})});Yv.displayName=Vc;var Yc="PopoverTrigger",Hc=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=xt(Yc,n),a=An(n),i=U(t,o.triggerRef),s=f.jsx(V.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Xc(o.open),...r,ref:i,onClick:O(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:f.jsx(Rr,{asChild:!0,...a,children:s})});Hc.displayName=Yc;var va="PopoverPortal",[Hv,Gv]=Wc(va,{forceMount:void 0}),Gc=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=xt(va,t);return f.jsx(Hv,{scope:t,forceMount:n,children:f.jsx(Ie,{present:n||a.open,children:f.jsx(Pn,{asChild:!0,container:o,children:r})})})};Gc.displayName=va;var Ht="PopoverContent",zc=l.forwardRef((e,t)=>{const n=Gv(Ht,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=xt(Ht,e.__scopePopover);return f.jsx(Ie,{present:r||a.open,children:a.modal?f.jsx(Uv,{...o,ref:t}):f.jsx(Kv,{...o,ref:t})})});zc.displayName=Ht;var zv=pt("PopoverContent.RemoveScroll"),Uv=l.forwardRef((e,t)=>{const n=xt(Ht,e.__scopePopover),r=l.useRef(null),o=U(t,r),a=l.useRef(!1);return l.useEffect(()=>{const i=r.current;if(i)return gr(i)},[]),f.jsx(kn,{as:zv,allowPinchZoom:!0,children:f.jsx(Uc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:O(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),a.current||(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:O(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0,u=s.button===2||c;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:O(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Kv=l.forwardRef((e,t)=>{const n=xt(Ht,e.__scopePopover),r=l.useRef(!1),o=l.useRef(!1);return f.jsx(Uc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,s;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Uc=l.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...m}=e,p=xt(Ht,n),h=An(n);return pr(),f.jsx(Rn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:f.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:f.jsx(ha,{"data-state":Xc(p.open),role:"dialog",id:p.contentId,...h,...m,ref:t,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Kc="PopoverClose",qv=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=xt(Kc,n);return f.jsx(V.button,{type:"button",...r,ref:t,onClick:O(e.onClick,()=>o.onOpenChange(!1))})});qv.displayName=Kc;var Xv="PopoverArrow",qc=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=An(n);return f.jsx(ga,{...o,...r,ref:t})});qc.displayName=Xv;function Xc(e){return e?"open":"closed"}var Zv=Bc,Qv=Hc,Jv=Gc,Zc=zc,ey=qc;const Qt=Zv,Jt=Qv,ty=ey,Ot=l.forwardRef(({className:e,align:t="center",sideOffset:n=4,hasArrow:r,zIndex:o,children:a,...i},s)=>{const c=Ve("popover",o);return f.jsx(Jv,{children:f.jsxs(Zc,{ref:s,align:t,className:k(le.popover,e),sideOffset:n,style:{zIndex:c,...i.style},...i,children:[a,r?f.jsx(ty,{className:"fill-popover stroke-muted stroke-[1px]",height:7,width:15}):null]})})});Ot.displayName=Zc.displayName;const Qc=E.forwardRef(({loadOptions:e,options:t=[],value:n,onChange:r,placeholder:o="Select an option...",loadingMessage:a="Loading...",emptyMessage:i="No results found",errorMessage:s="Failed to load options",className:c,listClassName:u,maxSuggestions:d=10,debounceMs:m=300,minSearch:p=2,zIndex:h,isDisabled:y=!1,...g},v)=>{const[b,x]=E.useState(!1),w=Ve("dropdown",h),[S,C]=E.useState(""),[M,N]=E.useState(!1),[P,F]=E.useState(!1),[_,$]=E.useState([]),[I,B]=E.useState(!1),Y=E.useRef();E.useEffect(()=>()=>{Y.current&&clearTimeout(Y.current)},[]);const q=E.useCallback(async R=>{if(e)try{N(!0),F(!1);const L=await e(R);$(L.slice(0,d)),B(!0)}catch(L){console.error("Error fetching options:",L),F(!0),$([])}finally{N(!1)}},[e,d]),j=E.useMemo(()=>{if(e)return[];const R=S.toLowerCase().trim();return R.length>0&&B(!0),t.filter(L=>L.label.toLowerCase().includes(R)||L.value.toLowerCase().includes(R)).slice(0,d)},[e,t,S,d]),G=e?_:j,T=E.useMemo(()=>G.find(R=>R.value===n),[G,n]),D=E.useCallback(R=>{r(R),x(!1),C(""),B(!1)},[r]),Q=E.useCallback(R=>{C(R),R.length===0&&B(!1),Y.current&&clearTimeout(Y.current),e&&R.length>=p?Y.current=setTimeout(()=>{q(R)},m):e&&R.length===0&&$([])},[e,p,m,q]),J=E.useCallback(()=>{r(""),C(""),$([]),B(!1)},[r]);return f.jsxs(Qt,{open:b,onOpenChange:x,children:[f.jsx(Jt,{asChild:!0,children:f.jsxs(Oe,{ref:v,"aria-expanded":b,className:k("w-full justify-between px-3",!T&&!n&&"text-muted-foreground",c),isDisabled:y,role:"combobox",variant:"input",...g,children:[f.jsx("span",{className:"truncate",children:T?T.label:n||o}),f.jsxs("div",{className:"flex items-center gap-1",children:[n||S?f.jsx(mr,{className:"h-4 w-4 opacity-50 hover:opacity-100",onClick:R=>{R.stopPropagation(),J()}}):null,f.jsx(qo,{className:"h-4 w-4 shrink-0 opacity-50"})]})]})}),f.jsx(Ot,{align:"start",className:"w-[--radix-popover-trigger-width] px-0 py-0",zIndex:w,children:f.jsxs(br,{shouldFilter:!1,children:[f.jsx(wr,{placeholder:o,value:S,onValueChange:Q}),M?f.jsx(uc,{children:a}):null,!M&&P?f.jsx(Co,{children:s}):null,!M&&!P&&I&&G.length===0?f.jsx(Co,{children:i}):null,!M&&!P&&G.length>0?f.jsx(Sr,{className:k("max-h-[16.5rem] overflow-y-auto",u),children:f.jsx(xr,{children:G.map(R=>f.jsxs(Cr,{className:"cursor-pointer",value:R.value,onSelect:D,children:[f.jsx(Kt,{className:k("mr-2 h-4 w-4",R.value===n?"opacity-100":"opacity-0")}),R.label]},R.value))})}):null]})})]})});Qc.displayName="Autocomplete";const ny=De(`inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold
|
|
159
|
-
transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{variant:{default:"border-transparent bg-base-200 text-black",primary:"border-transparent bg-primary-400 text-white",success:"border-transparent bg-success-500 text-white",danger:"border-transparent bg-danger-400 text-white",warning:"border-transparent bg-warning-300 text-black",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),Jc=l.forwardRef(({className:e,variant:t,...n},r)=>f.jsx("div",{ref:r,className:k(ny({variant:t,className:e})),...n}));Jc.displayName="Badge";const el=l.forwardRef(({items:e,separator:t=f.jsx(Ko,{className:"h-4 w-4"}),className:n,...r},o)=>f.jsx("nav",{ref:o,"aria-label":"Breadcrumb",className:k("flex",n),...r,children:f.jsx("ol",{className:"flex flex-wrap items-center gap-1 pl-0",children:e.map((a,i)=>f.jsxs("li",{className:"flex items-center gap-1",children:[a.href?f.jsx("a",{className:k(le.link,le.linkNoUnderline),href:a.href,children:a.label}):f.jsx("span",{className:"font-medium text-foreground",children:a.label}),i<e.length-1?f.jsx("span",{className:"text-muted-foreground",children:t}):null]},i))})}));el.displayName="Breadcrumbs";const io={},dn={};function pn(e,t){try{const r=(io[e]||(io[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in dn?dn[r]:Es(r,r.split(":"))}catch{if(e in dn)return dn[e];const n=e==null?void 0:e.match(ry);return n?Es(e,n.slice(1)):NaN}}const ry=/([+-]\d\d):?(\d\d)?/;function Es(e,t){const n=+t[0],r=+(t[1]||0);return dn[e]=n>0?n*60+r:n*60-r}class ze extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(pn(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),tl(this),Mo(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new ze(...n,t):new ze(Date.now(),t)}withTimeZone(t){return new ze(+this,t)}getTimezoneOffset(){return-pn(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Mo(this),+this}[Symbol.for("constructDateFrom")](t){return new ze(+new Date(t),this.timeZone)}}const Ns=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Ns.test(e))return;const t=e.replace(Ns,"$1UTC");ze.prototype[t]&&(e.startsWith("get")?ze.prototype[e]=function(){return this.internal[t]()}:(ze.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),oy(this),+this},ze.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Mo(this),+this}))});function Mo(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function oy(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),tl(e)}function tl(e){const t=pn(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=-new Date(+n).getTimezoneOffset(),a=r-o,i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const s=r-t;s&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);const c=pn(e.timeZone,e),d=-new Date(+e).getTimezoneOffset()-c,m=c!==t,p=d-s;if(m&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const h=pn(e.timeZone,e),y=c-h;y&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+y),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y))}}class we extends ze{static tz(t,...n){return n.length?new we(...n,t):new we(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${ay(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new we(+this,t)}[Symbol.for("constructDateFrom")](t){return new we(+new Date(t),this.timeZone)}}function ay(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var H;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(H||(H={}));var me;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(me||(me={}));var Fe;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Fe||(Fe={}));var Me;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(Me||(Me={}));const nl=6048e5,sy=864e5,Ms=Symbol.for("constructDateFrom");function ye(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ms in e?e[Ms](t):e instanceof Date?new e.constructor(t):new Date(t)}function ie(e,t){return ye(t||e,e)}function rl(e,t,n){const r=ie(e,n==null?void 0:n.in);return isNaN(t)?ye(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function ol(e,t,n){const r=ie(e,n==null?void 0:n.in);if(isNaN(t))return ye(e,NaN);if(!t)return r;const o=r.getDate(),a=ye(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const i=a.getDate();return o>=i?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let iy={};function Tn(){return iy}function Gt(e,t){var s,c,u,d;const n=Tn(),r=(t==null?void 0:t.weekStartsOn)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,o=ie(e,t==null?void 0:t.in),a=o.getDay(),i=(a<r?7:0)+a-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function bn(e,t){return Gt(e,{...t,weekStartsOn:1})}function al(e,t){const n=ie(e,t==null?void 0:t.in),r=n.getFullYear(),o=ye(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=bn(o),i=ye(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const s=bn(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Rs(e){const t=ie(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function en(e,...t){const n=ye.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function xn(e,t){const n=ie(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function sl(e,t,n){const[r,o]=en(n==null?void 0:n.in,e,t),a=xn(r),i=xn(o),s=+a-Rs(a),c=+i-Rs(i);return Math.round((s-c)/sy)}function cy(e,t){const n=al(e,t),r=ye(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),bn(r)}function ly(e,t,n){return rl(e,t*7,n)}function uy(e,t,n){return ol(e,t*12,n)}function dy(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=ye.bind(null,o));const a=ie(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),ye(r,n||NaN)}function fy(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=ye.bind(null,o));const a=ie(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),ye(r,n||NaN)}function my(e,t,n){const[r,o]=en(n==null?void 0:n.in,e,t);return+xn(r)==+xn(o)}function il(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function py(e){return!(!il(e)&&typeof e!="number"||isNaN(+ie(e)))}function hy(e,t,n){const[r,o]=en(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return a*12+i}function gy(e,t){const n=ie(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function vy(e,t){const[n,r]=en(e,t.start,t.end);return{start:n,end:r}}function yy(e,t){const{start:n,end:r}=vy(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setDate(1);let s=1;const c=[];for(;+i<=a;)c.push(ye(n,i)),i.setMonth(i.getMonth()+s);return o?c.reverse():c}function by(e,t){const n=ie(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function xy(e,t){const n=ie(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function cl(e,t){const n=ie(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ll(e,t){var s,c,u,d;const n=Tn(),r=(t==null?void 0:t.weekStartsOn)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,o=ie(e,t==null?void 0:t.in),a=o.getDay(),i=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function wy(e,t){return ll(e,{...t,weekStartsOn:1})}const Cy={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Sy=(e,t,n)=>{let r;const o=Cy[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function co(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Ey={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ny={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},My={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ry={date:co({formats:Ey,defaultWidth:"full"}),time:co({formats:Ny,defaultWidth:"full"}),dateTime:co({formats:My,defaultWidth:"full"})},Py={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ky=(e,t,n,r)=>Py[e];function ln(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):i;o=e.formattingValues[s]||e.formattingValues[i]}else{const i=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[i]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const Oy={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Dy={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Iy={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Ay={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Ty={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},_y={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},jy=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Fy={ordinalNumber:jy,era:ln({values:Oy,defaultWidth:"wide"}),quarter:ln({values:Dy,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ln({values:Iy,defaultWidth:"wide"}),day:ln({values:Ay,defaultWidth:"wide"}),dayPeriod:ln({values:Ty,defaultWidth:"wide",formattingValues:_y,defaultFormattingWidth:"wide"})};function un(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const i=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?Ly(s,m=>m.test(i)):$y(s,m=>m.test(i));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(i.length);return{value:u,rest:d}}}function $y(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Ly(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Wy(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=n.valueCallback?n.valueCallback(i):i;const s=t.slice(o.length);return{value:i,rest:s}}}const By=/^(\d+)(th|st|nd|rd)?/i,Vy=/\d+/i,Yy={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Hy={any:[/^b/i,/^(a|c)/i]},Gy={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},zy={any:[/1/i,/2/i,/3/i,/4/i]},Uy={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Ky={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},qy={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Xy={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Zy={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Qy={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Jy={ordinalNumber:Wy({matchPattern:By,parsePattern:Vy,valueCallback:e=>parseInt(e,10)}),era:un({matchPatterns:Yy,defaultMatchWidth:"wide",parsePatterns:Hy,defaultParseWidth:"any"}),quarter:un({matchPatterns:Gy,defaultMatchWidth:"wide",parsePatterns:zy,defaultParseWidth:"any",valueCallback:e=>e+1}),month:un({matchPatterns:Uy,defaultMatchWidth:"wide",parsePatterns:Ky,defaultParseWidth:"any"}),day:un({matchPatterns:qy,defaultMatchWidth:"wide",parsePatterns:Xy,defaultParseWidth:"any"}),dayPeriod:un({matchPatterns:Zy,defaultMatchWidth:"any",parsePatterns:Qy,defaultParseWidth:"any"})},ya={code:"en-US",formatDistance:Sy,formatLong:Ry,formatRelative:ky,localize:Fy,match:Jy,options:{weekStartsOn:0,firstWeekContainsDate:1}};function eb(e,t){const n=ie(e,t==null?void 0:t.in);return sl(n,cl(n))+1}function ul(e,t){const n=ie(e,t==null?void 0:t.in),r=+bn(n)-+cy(n);return Math.round(r/nl)+1}function dl(e,t){var d,m,p,h;const n=ie(e,t==null?void 0:t.in),r=n.getFullYear(),o=Tn(),a=(t==null?void 0:t.firstWeekContainsDate)??((m=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:m.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(p=o.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,i=ye((t==null?void 0:t.in)||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const s=Gt(i,t),c=ye((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const u=Gt(c,t);return+n>=+s?r+1:+n>=+u?r:r-1}function tb(e,t){var s,c,u,d;const n=Tn(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,o=dl(e,t),a=ye((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Gt(a,t)}function fl(e,t){const n=ie(e,t==null?void 0:t.in),r=+Gt(n,t)-+tb(n,t);return Math.round(r/nl)+1}function se(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const dt={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return se(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):se(n+1,2)},d(e,t){return se(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return se(e.getHours()%12||12,t.length)},H(e,t){return se(e.getHours(),t.length)},m(e,t){return se(e.getMinutes(),t.length)},s(e,t){return se(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return se(o,t.length)}},Ft={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ps={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return dt.y(e,t)},Y:function(e,t,n,r){const o=dl(e,r),a=o>0?o:1-o;if(t==="YY"){const i=a%100;return se(i,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):se(a,t.length)},R:function(e,t){const n=al(e);return se(n,t.length)},u:function(e,t){const n=e.getFullYear();return se(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return se(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return se(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return dt.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return se(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=fl(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):se(o,t.length)},I:function(e,t,n){const r=ul(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):se(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):dt.d(e,t)},D:function(e,t,n){const r=eb(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):se(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return se(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return se(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return se(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Ft.noon:r===0?o=Ft.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Ft.evening:r>=12?o=Ft.afternoon:r>=4?o=Ft.morning:o=Ft.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return dt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):dt.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):se(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):se(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):dt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):dt.s(e,t)},S:function(e,t){return dt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Os(r);case"XXXX":case"XX":return St(r);case"XXXXX":case"XXX":default:return St(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Os(r);case"xxxx":case"xx":return St(r);case"xxxxx":case"xxx":default:return St(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ks(r,":");case"OOOO":default:return"GMT"+St(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ks(r,":");case"zzzz":default:return"GMT"+St(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return se(r,t.length)},T:function(e,t,n){return se(+e,t.length)}};function ks(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+se(a,2)}function Os(e,t){return e%60===0?(e>0?"-":"+")+se(Math.abs(e)/60,2):St(e,t)}function St(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=se(Math.trunc(r/60),2),a=se(r%60,2);return n+o+t+a}const Ds=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},ml=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},nb=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Ds(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Ds(r,t)).replace("{{time}}",ml(o,t))},rb={p:ml,P:nb},ob=/^D+$/,ab=/^Y+$/,sb=["D","DD","YY","YYYY"];function ib(e){return ob.test(e)}function cb(e){return ab.test(e)}function lb(e,t,n){const r=ub(e,t,n);if(console.warn(r),sb.includes(e))throw new RangeError(r)}function ub(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const db=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,fb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,mb=/^'([^]*?)'?$/,pb=/''/g,hb=/[a-zA-Z]/;function hn(e,t,n){var d,m,p,h,y,g,v,b;const r=Tn(),o=(n==null?void 0:n.locale)??r.locale??ya,a=(n==null?void 0:n.firstWeekContainsDate)??((m=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:m.firstWeekContainsDate)??r.firstWeekContainsDate??((h=(p=r.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,i=(n==null?void 0:n.weekStartsOn)??((g=(y=n==null?void 0:n.locale)==null?void 0:y.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((b=(v=r.locale)==null?void 0:v.options)==null?void 0:b.weekStartsOn)??0,s=ie(e,n==null?void 0:n.in);if(!py(s))throw new RangeError("Invalid time value");let c=t.match(fb).map(x=>{const w=x[0];if(w==="p"||w==="P"){const S=rb[w];return S(x,o.formatLong)}return x}).join("").match(db).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const w=x[0];if(w==="'")return{isToken:!1,value:gb(x)};if(Ps[w])return{isToken:!0,value:x};if(w.match(hb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:x}});o.localize.preprocessor&&(c=o.localize.preprocessor(s,c));const u={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return c.map(x=>{if(!x.isToken)return x.value;const w=x.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&cb(w)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&ib(w))&&lb(w,t,String(e));const S=Ps[w[0]];return S(s,w,o.localize,u)}).join("")}function gb(e){const t=e.match(mb);return t?t[1].replace(pb,"'"):e}function vb(e,t){const n=ie(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=ye(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function yb(e,t){return ie(e,t==null?void 0:t.in).getMonth()}function bb(e,t){return ie(e,t==null?void 0:t.in).getFullYear()}function xb(e,t){return+ie(e)>+ie(t)}function wb(e,t){return+ie(e)<+ie(t)}function Cb(e,t,n){const[r,o]=en(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Sb(e,t,n){const[r,o]=en(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function Eb(e,t,n){const r=ie(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),i=ye(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const s=vb(i);return r.setMonth(t,Math.min(a,s)),r}function Nb(e,t,n){const r=ie(e,n==null?void 0:n.in);return isNaN(+r)?ye(e,NaN):(r.setFullYear(t),r)}const Is=5,Mb=4;function Rb(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,Is*7-1);return t.getMonth(e)===t.getMonth(a)?Is:Mb}function pl(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-1*6):t.addDays(n,-1*(r-1))}function Pb(e,t){const n=pl(e,t),r=Rb(e,t);return t.addDays(n,r*7-1)}class it{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?we.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,a)=>{var i;return(i=this.overrides)!=null&&i.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new we(r,o,a,this.options.timeZone):new Date(r,o,a)},this.addDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addDays?this.overrides.addDays(r,o):rl(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):ol(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):ly(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):uy(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):sl(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):hy(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):yy(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):Pb(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):wy(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):gy(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):ll(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):xy(r)},this.format=(r,o,a)=>{var s;const i=(s=this.overrides)!=null&&s.format?this.overrides.format(r,o,this.options):hn(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(i):i},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):ul(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):yb(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):bb(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):fl(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):xb(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):wb(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):il(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):my(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):Cb(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):Sb(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):dy(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):fy(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):Eb(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):Nb(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):pl(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):xn(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):bn(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):by(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):Gt(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):cl(r)},this.options={locale:ya,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}}const Qe=new it;class hl{constructor(t,n,r=Qe){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class kb{constructor(t,n){this.date=t,this.weeks=n}}class Ob{constructor(t,n){this.days=n,this.weekNumber=t}}function rt(e,t,n=!1,r=Qe){let{from:o,to:a}=e;const{differenceInCalendarDays:i,isSameDay:s}=r;return o&&a?(i(a,o)<0&&([o,a]=[a,o]),i(t,o)>=(n?1:0)&&i(a,t)>=(n?1:0)):!n&&a?s(a,t):!n&&o?s(o,t):!1}function gl(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function ba(e){return!!(e&&typeof e=="object"&&"from"in e)}function vl(e){return!!(e&&typeof e=="object"&&"after"in e)}function yl(e){return!!(e&&typeof e=="object"&&"before"in e)}function bl(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function xl(e,t){return Array.isArray(e)&&e.every(t.isDate)}function ot(e,t,n=Qe){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:i}=n;return r.some(s=>{if(typeof s=="boolean")return s;if(n.isDate(s))return o(e,s);if(xl(s,n))return s.includes(e);if(ba(s))return rt(s,e,!1,n);if(bl(s))return Array.isArray(s.dayOfWeek)?s.dayOfWeek.includes(e.getDay()):s.dayOfWeek===e.getDay();if(gl(s)){const c=a(s.before,e),u=a(s.after,e),d=c>0,m=u<0;return i(s.before,s.after)?m&&d:d||m}return vl(s)?a(e,s.after)>0:yl(s)?a(s.before,e)>0:typeof s=="function"?s(e):!1})}function Db(e,t,n){const{disabled:r,hidden:o,modifiers:a,showOutsideDays:i,broadcastCalendar:s,today:c}=t,{isSameDay:u,isSameMonth:d,startOfMonth:m,isBefore:p,endOfMonth:h,isAfter:y}=n,g=t.startMonth&&m(t.startMonth),v=t.endMonth&&h(t.endMonth),b={[me.focused]:[],[me.outside]:[],[me.disabled]:[],[me.hidden]:[],[me.today]:[]},x={};for(const w of e){const{date:S,displayMonth:C}=w,M=!!(C&&!d(S,C)),N=!!(g&&p(S,g)),P=!!(v&&y(S,v)),F=!!(r&&ot(S,r,n)),_=!!(o&&ot(S,o,n))||N||P||!s&&!i&&M||s&&i===!1&&M,$=u(S,c??n.today());M&&b.outside.push(w),F&&b.disabled.push(w),_&&b.hidden.push(w),$&&b.today.push(w),a&&Object.keys(a).forEach(I=>{const B=a==null?void 0:a[I];B&&ot(S,B,n)&&(x[I]?x[I].push(w):x[I]=[w])})}return w=>{const S={[me.focused]:!1,[me.disabled]:!1,[me.hidden]:!1,[me.outside]:!1,[me.today]:!1},C={};for(const M in b){const N=b[M];S[M]=N.some(P=>P===w)}for(const M in x)C[M]=x[M].some(N=>N===w);return{...S,...C}}}function Ib(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[me[a]]?o.push(t[me[a]]):t[Fe[a]]&&o.push(t[Fe[a]]),o),[t[H.Day]])}function Ab(e){return E.createElement("button",{...e})}function Tb(e){return E.createElement("span",{...e})}function _b(e){const{size:t=24,orientation:n="left",className:r}=e;return E.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&E.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&E.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&E.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&E.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function jb(e){const{day:t,modifiers:n,...r}=e;return E.createElement("td",{...r})}function Fb(e){const{day:t,modifiers:n,...r}=e,o=E.useRef(null);return E.useEffect(()=>{var a;n.focused&&((a=o.current)==null||a.focus())},[n.focused]),E.createElement("button",{ref:o,...r})}function $b(e){const{options:t,className:n,components:r,classNames:o,...a}=e,i=[o[H.Dropdown],n].join(" "),s=t==null?void 0:t.find(({value:c})=>c===a.value);return E.createElement("span",{"data-disabled":a.disabled,className:o[H.DropdownRoot]},E.createElement(r.Select,{className:i,...a},t==null?void 0:t.map(({value:c,label:u,disabled:d})=>E.createElement(r.Option,{key:c,value:c,disabled:d},u))),E.createElement("span",{className:o[H.CaptionLabel],"aria-hidden":!0},s==null?void 0:s.label,E.createElement(r.Chevron,{orientation:"down",size:18,className:o[H.Chevron]})))}function Lb(e){return E.createElement("div",{...e})}function Wb(e){return E.createElement("div",{...e})}function Bb(e){const{calendarMonth:t,displayIndex:n,...r}=e;return E.createElement("div",{...r},e.children)}function Vb(e){const{calendarMonth:t,displayIndex:n,...r}=e;return E.createElement("div",{...r})}function Yb(e){return E.createElement("table",{...e})}function Hb(e){return E.createElement("div",{...e})}const wl=E.createContext(void 0);function _n(){const e=E.useContext(wl);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Gb(e){const{components:t}=_n();return E.createElement(t.Dropdown,{...e})}function zb(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:i,classNames:s,labels:{labelPrevious:c,labelNext:u}}=_n(),d=E.useCallback(p=>{o&&(n==null||n(p))},[o,n]),m=E.useCallback(p=>{r&&(t==null||t(p))},[r,t]);return E.createElement("nav",{...a},E.createElement(i.PreviousMonthButton,{type:"button",className:s[H.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:m},E.createElement(i.Chevron,{disabled:r?void 0:!0,className:s[H.Chevron],orientation:"left"})),E.createElement(i.NextMonthButton,{type:"button",className:s[H.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:d},E.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:s[H.Chevron]})))}function Ub(e){const{components:t}=_n();return E.createElement(t.Button,{...e})}function Kb(e){return E.createElement("option",{...e})}function qb(e){const{components:t}=_n();return E.createElement(t.Button,{...e})}function Xb(e){const{rootRef:t,...n}=e;return E.createElement("div",{...n,ref:t})}function Zb(e){return E.createElement("select",{...e})}function Qb(e){const{week:t,...n}=e;return E.createElement("tr",{...n})}function Jb(e){return E.createElement("th",{...e})}function ex(e){return E.createElement("thead",{"aria-hidden":!0},E.createElement("tr",{...e}))}function tx(e){const{week:t,...n}=e;return E.createElement("th",{...n})}function nx(e){return E.createElement("th",{...e})}function rx(e){return E.createElement("tbody",{...e})}function ox(e){const{components:t}=_n();return E.createElement(t.Dropdown,{...e})}const ax=Object.freeze(Object.defineProperty({__proto__:null,Button:Ab,CaptionLabel:Tb,Chevron:_b,Day:jb,DayButton:Fb,Dropdown:$b,DropdownNav:Lb,Footer:Wb,Month:Bb,MonthCaption:Vb,MonthGrid:Yb,Months:Hb,MonthsDropdown:Gb,Nav:zb,NextMonthButton:Ub,Option:Kb,PreviousMonthButton:qb,Root:Xb,Select:Zb,Week:Qb,WeekNumber:tx,WeekNumberHeader:nx,Weekday:Jb,Weekdays:ex,Weeks:rx,YearsDropdown:ox},Symbol.toStringTag,{value:"Module"}));function sx(e){return{...ax,...e}}function ix(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function cx(){const e={};for(const t in H)e[H[t]]=`rdp-${H[t]}`;for(const t in me)e[me[t]]=`rdp-${me[t]}`;for(const t in Fe)e[Fe[t]]=`rdp-${Fe[t]}`;for(const t in Me)e[Me[t]]=`rdp-${Me[t]}`;return e}function Cl(e,t,n){return(n??new it(t)).format(e,"LLLL y")}const lx=Cl;function ux(e,t,n){return(n??new it(t)).format(e,"d")}function dx(e,t=Qe){return t.format(e,"LLLL")}function fx(e,t=Qe){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function mx(){return""}function px(e,t,n){return(n??new it(t)).format(e,"cccccc")}function Sl(e,t=Qe){return t.format(e,"yyyy")}const hx=Sl,gx=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Cl,formatDay:ux,formatMonthCaption:lx,formatMonthDropdown:dx,formatWeekNumber:fx,formatWeekNumberHeader:mx,formatWeekdayName:px,formatYearCaption:hx,formatYearDropdown:Sl},Symbol.toStringTag,{value:"Module"}));function vx(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...gx,...e}}function yx(e,t,n,r,o){const{startOfMonth:a,startOfYear:i,endOfYear:s,eachMonthOfInterval:c,getMonth:u}=o;return c({start:i(e),end:s(e)}).map(p=>{const h=r.formatMonthDropdown(p,o),y=u(p),g=t&&p<a(t)||n&&p>a(n)||!1;return{value:y,label:h,disabled:g}})}function bx(e,t={},n={}){let r={...t==null?void 0:t[H.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function xx(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),a=[];for(let i=0;i<7;i++){const s=e.addDays(o,i);a.push(s)}return a}function wx(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:a,addYears:i,getYear:s,isBefore:c,isSameYear:u}=r,d=o(e),m=a(t),p=[];let h=d;for(;c(h,m)||u(h,m);)p.push(h),h=i(h,1);return p.map(y=>{const g=n.formatYearDropdown(y,r);return{value:s(y),label:g,disabled:!1}})}function El(e,t,n){return(n??new it(t)).format(e,"LLLL y")}const Cx=El;function Sx(e,t,n,r){let o=(r??new it(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function Nl(e,t,n,r){let o=(r??new it(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const Ex=Nl;function Nx(){return""}function Mx(e){return"Choose the Month"}function Rx(e){return"Go to the Next Month"}function Px(e){return"Go to the Previous Month"}function kx(e,t,n){return(n??new it(t)).format(e,"cccc")}function Ox(e,t){return`Week ${e}`}function Dx(e){return"Week Number"}function Ix(e){return"Choose the Year"}const Ax=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Cx,labelDay:Ex,labelDayButton:Nl,labelGrid:El,labelGridcell:Sx,labelMonthDropdown:Mx,labelNav:Nx,labelNext:Rx,labelPrevious:Px,labelWeekNumber:Ox,labelWeekNumberHeader:Dx,labelWeekday:kx,labelYearDropdown:Ix},Symbol.toStringTag,{value:"Module"})),jn=e=>e instanceof HTMLElement?e:null,lo=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Tx=e=>jn(e.querySelector("[data-animated-month]")),uo=e=>jn(e.querySelector("[data-animated-caption]")),fo=e=>jn(e.querySelector("[data-animated-weeks]")),_x=e=>jn(e.querySelector("[data-animated-nav]")),jx=e=>jn(e.querySelector("[data-animated-weekdays]"));function Fx(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const i=E.useRef(null),s=E.useRef(r),c=E.useRef(!1);E.useLayoutEffect(()=>{const u=s.current;if(s.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;const d=a.isSameMonth(r[0].date,u[0].date),m=a.isAfter(r[0].date,u[0].date),p=m?n[Me.caption_after_enter]:n[Me.caption_before_enter],h=m?n[Me.weeks_after_enter]:n[Me.weeks_before_enter],y=i.current,g=e.current.cloneNode(!0);if(g instanceof HTMLElement?(lo(g).forEach(w=>{if(!(w instanceof HTMLElement))return;const S=Tx(w);S&&w.contains(S)&&w.removeChild(S);const C=uo(w);C&&C.classList.remove(p);const M=fo(w);M&&M.classList.remove(h)}),i.current=g):i.current=null,c.current||d||o)return;const v=y instanceof HTMLElement?lo(y):[],b=lo(e.current);if(b&&b.every(x=>x instanceof HTMLElement)&&v&&v.every(x=>x instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const x=_x(e.current);x&&(x.style.zIndex="1"),b.forEach((w,S)=>{const C=v[S];if(!C)return;w.style.position="relative",w.style.overflow="hidden";const M=uo(w);M&&M.classList.add(p);const N=fo(w);N&&N.classList.add(h);const P=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),x&&(x.style.zIndex=""),M&&M.classList.remove(p),N&&N.classList.remove(h),w.style.position="",w.style.overflow="",w.contains(C)&&w.removeChild(C)};C.style.pointerEvents="none",C.style.position="absolute",C.style.overflow="hidden",C.setAttribute("aria-hidden","true");const F=jx(C);F&&(F.style.opacity="0");const _=uo(C);_&&(_.classList.add(m?n[Me.caption_before_exit]:n[Me.caption_after_exit]),_.addEventListener("animationend",P));const $=fo(C);$&&$.classList.add(m?n[Me.weeks_before_exit]:n[Me.weeks_after_exit]),w.insertBefore(C,w.firstChild)})}})}function $x(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:i,fixedWeeks:s,broadcastCalendar:c}=n??{},{addDays:u,differenceInCalendarDays:d,differenceInCalendarMonths:m,endOfBroadcastWeek:p,endOfISOWeek:h,endOfMonth:y,endOfWeek:g,isAfter:v,startOfBroadcastWeek:b,startOfISOWeek:x,startOfWeek:w}=r,S=c?b(o,r):i?x(o):w(o),C=c?p(a):i?h(y(a)):g(y(a)),M=d(C,S),N=m(a,o)+1,P=[];for(let $=0;$<=M;$++){const I=u(S,$);if(t&&v(I,t))break;P.push(I)}const _=(c?35:42)*N;if(s&&P.length<_){const $=_-P.length;for(let I=0;I<$;I++){const B=u(P[P.length-1],1);P.push(B)}}return P}function Lx(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,i)=>[...a,...i.days],t);return[...n,...o]},t)}function Wx(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let i=0;i<o;i++){const s=r.addMonths(e,i);if(t&&s>t)break;a.push(s)}return a}function As(e,t){const{month:n,defaultMonth:r,today:o=t.today(),numberOfMonths:a=1,endMonth:i,startMonth:s}=e;let c=n||r||o;const{differenceInCalendarMonths:u,addMonths:d,startOfMonth:m}=t;if(i&&u(i,c)<0){const p=-1*(a-1);c=d(i,p)}return s&&u(c,s)<0&&(c=s),m(c)}function Bx(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:s,endOfWeek:c,getISOWeek:u,getWeek:d,startOfBroadcastWeek:m,startOfISOWeek:p,startOfWeek:h}=r,y=e.reduce((g,v)=>{const b=n.broadcastCalendar?m(v,r):n.ISOWeek?p(v):h(v),x=n.broadcastCalendar?a(v):n.ISOWeek?i(s(v)):c(s(v)),w=t.filter(N=>N>=b&&N<=x),S=n.broadcastCalendar?35:42;if(n.fixedWeeks&&w.length<S){const N=t.filter(P=>{const F=S-w.length;return P>x&&P<=o(x,F)});w.push(...N)}const C=w.reduce((N,P)=>{const F=n.ISOWeek?u(P):d(P),_=N.find(I=>I.weekNumber===F),$=new hl(P,v,r);return _?_.days.push($):N.push(new Ob(F,[$])),N},[]),M=new kb(v,C);return g.push(M),g},[]);return n.reverseMonths?y.reverse():y}function Vx(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:i,endOfMonth:s,addYears:c,endOfYear:u,newDate:d,today:m}=t,{fromYear:p,toYear:h,fromMonth:y,toMonth:g}=e;!n&&y&&(n=y),!n&&p&&(n=t.newDate(p,0,1)),!r&&g&&(r=g),!r&&h&&(r=d(h,11,31));const v=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=i(n):p?n=d(p,0,1):!n&&v&&(n=o(c(e.today??m(),-100))),r?r=s(r):h?r=d(h,11,31):!r&&v&&(r=u(e.today??m())),[n&&a(n),r&&a(r)]}function Yx(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:c}=r,u=o?a:1,d=i(e);if(!t)return s(d,u);if(!(c(t,e)<a))return s(d,u)}function Hx(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:c}=r,u=o?a??1:1,d=i(e);if(!t)return s(d,-u);if(!(c(d,t)<=0))return s(d,-u)}function Gx(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function kr(e,t){const[n,r]=E.useState(e);return[t===void 0?n:t,r]}function zx(e,t){const[n,r]=Vx(e,t),{startOfMonth:o,endOfMonth:a}=t,i=As(e,t),[s,c]=kr(i,e.month?i:void 0);E.useEffect(()=>{const M=As(e,t);c(M)},[e.timeZone]);const u=Wx(s,r,e,t),d=$x(u,e.endMonth?a(e.endMonth):void 0,e,t),m=Bx(u,d,e,t),p=Gx(m),h=Lx(m),y=Hx(s,n,e,t),g=Yx(s,r,e,t),{disableNavigation:v,onMonthChange:b}=e,x=M=>p.some(N=>N.days.some(P=>P.isEqualTo(M))),w=M=>{if(v)return;let N=o(M);n&&N<o(n)&&(N=o(n)),r&&N>o(r)&&(N=o(r)),c(N),b==null||b(N)};return{months:m,weeks:p,days:h,navStart:n,navEnd:r,previousMonth:y,nextMonth:g,goToMonth:w,goToDay:M=>{x(M)||w(M.date)}}}var He;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(He||(He={}));function Ts(e){return!e[me.disabled]&&!e[me.hidden]&&!e[me.outside]}function Ux(e,t,n,r){let o,a=-1;for(const i of e){const s=t(i);Ts(s)&&(s[me.focused]&&a<He.FocusedModifier?(o=i,a=He.FocusedModifier):r!=null&&r.isEqualTo(i)&&a<He.LastFocused?(o=i,a=He.LastFocused):n(i.date)&&a<He.Selected?(o=i,a=He.Selected):s[me.today]&&a<He.Today&&(o=i,a=He.Today))}return o||(o=e.find(i=>Ts(t(i)))),o}function Kx(e,t,n,r,o,a,i){const{ISOWeek:s,broadcastCalendar:c}=a,{addDays:u,addMonths:d,addWeeks:m,addYears:p,endOfBroadcastWeek:h,endOfISOWeek:y,endOfWeek:g,max:v,min:b,startOfBroadcastWeek:x,startOfISOWeek:w,startOfWeek:S}=i;let M={day:u,week:m,month:d,year:p,startOfWeek:N=>c?x(N,i):s?w(N):S(N),endOfWeek:N=>c?h(N):s?y(N):g(N)}[e](n,t==="after"?1:-1);return t==="before"&&r?M=v([r,M]):t==="after"&&o&&(M=b([o,M])),M}function Ml(e,t,n,r,o,a,i,s=0){if(s>365)return;const c=Kx(e,t,n.date,r,o,a,i),u=!!(a.disabled&&ot(c,a.disabled,i)),d=!!(a.hidden&&ot(c,a.hidden,i)),m=c,p=new hl(c,m,i);return!u&&!d?p:Ml(e,t,p,r,o,a,i,s+1)}function qx(e,t,n,r,o){const{autoFocus:a}=e,[i,s]=E.useState(),c=Ux(t.days,n,r||(()=>!1),i),[u,d]=E.useState(a?c:void 0);return{isFocusTarget:g=>!!(c!=null&&c.isEqualTo(g)),setFocused:d,focused:u,blur:()=>{s(u),d(void 0)},moveFocus:(g,v)=>{if(!u)return;const b=Ml(g,v,u,t.navStart,t.navEnd,e,o);b&&(t.goToDay(b),d(b))}}}function Xx(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=kr(n,o?n:void 0),s=o?n:a,{isSameDay:c}=t,u=h=>(s==null?void 0:s.some(y=>c(y,h)))??!1,{min:d,max:m}=e;return{selected:s,select:(h,y,g)=>{let v=[...s??[]];if(u(h)){if((s==null?void 0:s.length)===d||r&&(s==null?void 0:s.length)===1)return;v=s==null?void 0:s.filter(b=>!c(b,h))}else(s==null?void 0:s.length)===m?v=[h]:v=[...v,h];return o||i(v),o==null||o(v,h,y,g),v},isSelected:u}}function Zx(e,t,n=0,r=0,o=!1,a=Qe){const{from:i,to:s}=t||{},{isSameDay:c,isAfter:u,isBefore:d}=a;let m;if(!i&&!s)m={from:e,to:n>0?void 0:e};else if(i&&!s)c(i,e)?o?m={from:i,to:void 0}:m=void 0:d(e,i)?m={from:e,to:i}:m={from:i,to:e};else if(i&&s)if(c(i,e)&&c(s,e))o?m={from:i,to:s}:m=void 0;else if(c(i,e))m={from:i,to:n>0?void 0:e};else if(c(s,e))m={from:e,to:n>0?void 0:e};else if(d(e,i))m={from:e,to:s};else if(u(e,i))m={from:i,to:e};else if(u(e,s))m={from:i,to:e};else throw new Error("Invalid range");if(m!=null&&m.from&&(m!=null&&m.to)){const p=a.differenceInCalendarDays(m.to,m.from);r>0&&p>r?m={from:e,to:void 0}:n>1&&p<n&&(m={from:e,to:void 0})}return m}function Qx(e,t,n=Qe){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),i=Math.min(a,6);for(let s=0;s<=i;s++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function _s(e,t,n=Qe){return rt(e,t.from,!1,n)||rt(e,t.to,!1,n)||rt(t,e.from,!1,n)||rt(t,e.to,!1,n)}function Jx(e,t,n=Qe){const r=Array.isArray(t)?t:[t];if(r.filter(s=>typeof s!="function").some(s=>typeof s=="boolean"?s:n.isDate(s)?rt(e,s,!1,n):xl(s,n)?s.some(c=>rt(e,c,!1,n)):ba(s)?s.from&&s.to?_s(e,{from:s.from,to:s.to},n):!1:bl(s)?Qx(e,s.dayOfWeek,n):gl(s)?n.isAfter(s.before,s.after)?_s(e,{from:n.addDays(s.after,1),to:n.addDays(s.before,-1)},n):ot(e.from,s,n)||ot(e.to,s,n):vl(s)||yl(s)?ot(e.from,s,n)||ot(e.to,s,n):!1))return!0;const i=r.filter(s=>typeof s=="function");if(i.length){let s=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=c;u++){if(i.some(d=>d(s)))return!0;s=n.addDays(s,1)}}return!1}function ew(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:i}=e,[s,c]=kr(o,i?o:void 0),u=i?o:s;return{selected:u,select:(p,h,y)=>{const{min:g,max:v}=e,b=p?Zx(p,u,g,v,a,t):void 0;return r&&n&&(b!=null&&b.from)&&b.to&&Jx({from:b.from,to:b.to},n,t)&&(b.from=p,b.to=void 0),i||c(b),i==null||i(b,p,h,y),b},isSelected:p=>u&&rt(u,p,!1,t)}}function tw(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=kr(n,o?n:void 0),s=o?n:a,{isSameDay:c}=t;return{selected:s,select:(m,p,h)=>{let y=m;return!r&&s&&s&&c(m,s)&&(y=void 0),o||i(y),o==null||o(y,m,p,h),y},isSelected:m=>s?c(s,m):!1}}function nw(e,t){const n=tw(e,t),r=Xx(e,t),o=ew(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function rw(e){var Ha;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new we(t.today,t.timeZone)),t.month&&(t.month=new we(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new we(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new we(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new we(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new we(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(Ha=t.selected)==null?void 0:Ha.map(ne=>new we(ne,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new we(t.selected.from,t.timeZone):void 0,to:t.selected.to?new we(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:o,dateLib:a,locale:i,classNames:s}=E.useMemo(()=>{const ne={...ya,...t.locale};return{dateLib:new it({locale:ne,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:sx(t.components),formatters:vx(t.formatters),labels:{...Ax,...t.labels},locale:ne,classNames:{...cx(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:c,mode:u,navLayout:d,numberOfMonths:m=1,onDayBlur:p,onDayClick:h,onDayFocus:y,onDayKeyDown:g,onDayMouseEnter:v,onDayMouseLeave:b,onNextClick:x,onPrevClick:w,showWeekNumber:S,styles:C}=t,{formatCaption:M,formatDay:N,formatMonthDropdown:P,formatWeekNumber:F,formatWeekNumberHeader:_,formatWeekdayName:$,formatYearDropdown:I}=r,B=zx(t,a),{days:Y,months:q,navStart:j,navEnd:G,previousMonth:T,nextMonth:D,goToMonth:Q}=B,J=Db(Y,t,a),{isSelected:R,select:L,selected:z}=nw(t,a)??{},{blur:W,focused:X,isFocusTarget:A,moveFocus:Z,setFocused:K}=qx(t,B,J,R??(()=>!1),a),{labelDayButton:te,labelGridcell:re,labelGrid:oe,labelMonthDropdown:he,labelNav:be,labelPrevious:Je,labelNext:et,labelWeekday:tt,labelWeekNumber:on,labelWeekNumberHeader:Te,labelYearDropdown:Yf}=o,Hf=E.useMemo(()=>xx(a,t.ISOWeek),[a,t.ISOWeek]),Va=u!==void 0||h!==void 0,Hr=E.useCallback(()=>{T&&(Q(T),w==null||w(T))},[T,Q,w]),Gr=E.useCallback(()=>{D&&(Q(D),x==null||x(D))},[Q,D,x]),Gf=E.useCallback((ne,fe)=>ce=>{ce.preventDefault(),ce.stopPropagation(),K(ne),L==null||L(ne.date,fe,ce),h==null||h(ne.date,fe,ce)},[L,h,K]),zf=E.useCallback((ne,fe)=>ce=>{K(ne),y==null||y(ne.date,fe,ce)},[y,K]),Uf=E.useCallback((ne,fe)=>ce=>{W(),p==null||p(ne.date,fe,ce)},[W,p]),Kf=E.useCallback((ne,fe)=>ce=>{const ct={ArrowLeft:["day",t.dir==="rtl"?"after":"before"],ArrowRight:["day",t.dir==="rtl"?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[ce.shiftKey?"year":"month","before"],PageDown:[ce.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(ct[ce.key]){ce.preventDefault(),ce.stopPropagation();const[_e,Vn]=ct[ce.key];Z(_e,Vn)}g==null||g(ne.date,fe,ce)},[Z,g,t.dir]),qf=E.useCallback((ne,fe)=>ce=>{v==null||v(ne.date,fe,ce)},[v]),Xf=E.useCallback((ne,fe)=>ce=>{b==null||b(ne.date,fe,ce)},[b]),Zf=E.useCallback(ne=>fe=>{const ce=Number(fe.target.value),ct=a.setMonth(a.startOfMonth(ne),ce);Q(ct)},[a,Q]),Qf=E.useCallback(ne=>fe=>{const ce=Number(fe.target.value),ct=a.setYear(a.startOfMonth(ne),ce);Q(ct)},[a,Q]),{className:Jf,style:em}=E.useMemo(()=>({className:[s[H.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[H.Root],...t.style}}),[s,t.className,t.style,C]),tm=ix(t),Ya=E.useRef(null);Fx(Ya,!!t.animate,{classNames:s,months:q,focused:X,dateLib:a});const nm={dayPickerProps:t,selected:z,select:L,isSelected:R,months:q,nextMonth:D,previousMonth:T,goToMonth:Q,getModifiers:J,components:n,classNames:s,styles:C,labels:o,formatters:r};return E.createElement(wl.Provider,{value:nm},E.createElement(n.Root,{rootRef:t.animate?Ya:void 0,className:Jf,style:em,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...tm},E.createElement(n.Months,{className:s[H.Months],style:C==null?void 0:C[H.Months]},!t.hideNavigation&&!d&&E.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[H.Nav],style:C==null?void 0:C[H.Nav],"aria-label":be(),onPreviousClick:Hr,onNextClick:Gr,previousMonth:T,nextMonth:D}),q.map((ne,fe)=>{const ce=yx(ne.date,j,G,r,a),ct=wx(j,G,r,a);return E.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:s[H.Month],style:C==null?void 0:C[H.Month],key:fe,displayIndex:fe,calendarMonth:ne},d==="around"&&!t.hideNavigation&&fe===0&&E.createElement(n.PreviousMonthButton,{type:"button",className:s[H.PreviousMonthButton],tabIndex:T?void 0:-1,"aria-disabled":T?void 0:!0,"aria-label":Je(T),onClick:Hr,"data-animated-button":t.animate?"true":void 0},E.createElement(n.Chevron,{disabled:T?void 0:!0,className:s[H.Chevron],orientation:t.dir==="rtl"?"right":"left"})),E.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:s[H.MonthCaption],style:C==null?void 0:C[H.MonthCaption],calendarMonth:ne,displayIndex:fe},c!=null&&c.startsWith("dropdown")?E.createElement(n.DropdownNav,{className:s[H.Dropdowns],style:C==null?void 0:C[H.Dropdowns]},c==="dropdown"||c==="dropdown-months"?E.createElement(n.MonthsDropdown,{className:s[H.MonthsDropdown],"aria-label":he(),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:Zf(ne.date),options:ce,style:C==null?void 0:C[H.Dropdown],value:a.getMonth(ne.date)}):E.createElement("span",null,P(ne.date,a)),c==="dropdown"||c==="dropdown-years"?E.createElement(n.YearsDropdown,{className:s[H.YearsDropdown],"aria-label":Yf(a.options),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:Qf(ne.date),options:ct,style:C==null?void 0:C[H.Dropdown],value:a.getYear(ne.date)}):E.createElement("span",null,I(ne.date,a)),E.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},M(ne.date,a.options,a))):E.createElement(n.CaptionLabel,{className:s[H.CaptionLabel],role:"status","aria-live":"polite"},M(ne.date,a.options,a))),d==="around"&&!t.hideNavigation&&fe===m-1&&E.createElement(n.NextMonthButton,{type:"button",className:s[H.NextMonthButton],tabIndex:D?void 0:-1,"aria-disabled":D?void 0:!0,"aria-label":et(D),onClick:Gr,"data-animated-button":t.animate?"true":void 0},E.createElement(n.Chevron,{disabled:D?void 0:!0,className:s[H.Chevron],orientation:t.dir==="rtl"?"left":"right"})),fe===m-1&&d==="after"&&!t.hideNavigation&&E.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[H.Nav],style:C==null?void 0:C[H.Nav],"aria-label":be(),onPreviousClick:Hr,onNextClick:Gr,previousMonth:T,nextMonth:D}),E.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":oe(ne.date,a.options,a)||void 0,className:s[H.MonthGrid],style:C==null?void 0:C[H.MonthGrid]},!t.hideWeekdays&&E.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:s[H.Weekdays],style:C==null?void 0:C[H.Weekdays]},S&&E.createElement(n.WeekNumberHeader,{"aria-label":Te(a.options),className:s[H.WeekNumberHeader],style:C==null?void 0:C[H.WeekNumberHeader],scope:"col"},_()),Hf.map((_e,Vn)=>E.createElement(n.Weekday,{"aria-label":tt(_e,a.options,a),className:s[H.Weekday],key:Vn,style:C==null?void 0:C[H.Weekday],scope:"col"},$(_e,a.options,a)))),E.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:s[H.Weeks],style:C==null?void 0:C[H.Weeks]},ne.weeks.map((_e,Vn)=>E.createElement(n.Week,{className:s[H.Week],key:_e.weekNumber,style:C==null?void 0:C[H.Week],week:_e},S&&E.createElement(n.WeekNumber,{week:_e,style:C==null?void 0:C[H.WeekNumber],"aria-label":on(_e.weekNumber,{locale:i}),className:s[H.WeekNumber],scope:"row",role:"rowheader"},F(_e.weekNumber,a)),_e.days.map(xe=>{const{date:Ye}=xe,ae=J(xe);if(ae[me.focused]=!ae.hidden&&!!(X!=null&&X.isEqualTo(xe)),ae[Fe.selected]=(R==null?void 0:R(Ye))||ae.selected,ba(z)){const{from:zr,to:Ur}=z;ae[Fe.range_start]=!!(zr&&Ur&&a.isSameDay(Ye,zr)),ae[Fe.range_end]=!!(zr&&Ur&&a.isSameDay(Ye,Ur)),ae[Fe.range_middle]=rt(z,Ye,!0,a)}const rm=bx(ae,C,t.modifiersStyles),om=Ib(ae,s,t.modifiersClassNames),am=!Va&&!ae.hidden?re(Ye,ae,a.options,a):void 0;return E.createElement(n.Day,{key:`${a.format(Ye,"yyyy-MM-dd")}_${a.format(xe.displayMonth,"yyyy-MM")}`,day:xe,modifiers:ae,className:om.join(" "),style:rm,role:"gridcell","aria-selected":ae.selected||void 0,"aria-label":am,"data-day":a.format(Ye,"yyyy-MM-dd"),"data-month":xe.outside?a.format(Ye,"yyyy-MM"):void 0,"data-selected":ae.selected||void 0,"data-disabled":ae.disabled||void 0,"data-hidden":ae.hidden||void 0,"data-outside":xe.outside||void 0,"data-focused":ae.focused||void 0,"data-today":ae.today||void 0},!ae.hidden&&Va?E.createElement(n.DayButton,{className:s[H.DayButton],style:C==null?void 0:C[H.DayButton],type:"button",day:xe,modifiers:ae,disabled:ae.disabled||void 0,tabIndex:A(xe)?0:-1,"aria-label":te(Ye,ae,a.options,a),onClick:Gf(xe,ae),onBlur:Uf(xe,ae),onFocus:zf(xe,ae),onKeyDown:Kf(xe,ae),onMouseEnter:qf(xe,ae),onMouseLeave:Xf(xe,ae)},N(Ye,a.options,a)):!ae.hidden&&N(xe.date,a.options,a))}))))))})),t.footer&&E.createElement(n.Footer,{className:s[H.Footer],style:C==null?void 0:C[H.Footer],role:"status","aria-live":"polite"},t.footer)))}const ow=()=>Array.from({length:12},(e,t)=>new Date(0,t).toLocaleString("en-US",{month:"long"})),aw=e=>{const{onSelect:t}=e,n=E.useRef(null);return E.useEffect(()=>{n.current&&n.current.focus()},[]),f.jsx("div",{className:`-mx-1 -my-1 grid max-h-72 min-w-80 grid-cols-1 gap-1 px-1 py-1 md:grid-cols-2
|
|
160
|
-
lg:grid-cols-3`,children:
|
|
161
|
-
focus-within:z-20 focus:opacity-100 focus:ring-2 focus:ring-offset-0`),size:"sm",variant:"ghost",onClick:()=>{t==null||t(o)},children:r},r))})},
|
|
162
|
-
lg:grid-cols-4`,children:
|
|
163
|
-
focus-within:z-20 focus:opacity-100 focus:ring-2 focus:ring-offset-0`),size:"sm",variant:"ghost",onClick:()=>{t==null||t(a)},children:a},a))})};function
|
|
160
|
+
aria-selected:bg-accent aria-selected:text-accent-foreground`,e),...t}));Sr.displayName=Ae.Item.displayName;const Nr=l.forwardRef(({className:e,...t},n)=>f.jsx(Ae.List,{ref:n,className:k("max-h-[20rem] overflow-y-auto overflow-x-hidden",e),...t}));Nr.displayName=Ae.List.displayName;const fc=({children:e="Loading...",...t})=>f.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 text-sm text-muted-foreground",...t,children:[f.jsx(yi,{className:"h-4 w-4 animate-spin"}),e]});fc.displayName="CommandLoading";const nv=["top","right","bottom","left"],vt=Math.min,Pe=Math.max,or=Math.round,Xn=Math.floor,Ke=e=>({x:e,y:e}),rv={left:"right",right:"left",bottom:"top",top:"bottom"},ov={start:"end",end:"start"};function Eo(e,t,n){return Pe(e,vt(t,n))}function st(e,t){return typeof e=="function"?e(t):e}function it(e){return e.split("-")[0]}function qt(e){return e.split("-")[1]}function ia(e){return e==="x"?"y":"x"}function ca(e){return e==="y"?"height":"width"}function yt(e){return["top","bottom"].includes(it(e))?"y":"x"}function la(e){return ia(yt(e))}function av(e,t,n){n===void 0&&(n=!1);const r=qt(e),o=la(e),a=ca(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=ar(i)),[i,ar(i)]}function sv(e){const t=ar(e);return[Mo(e),t,Mo(t)]}function Mo(e){return e.replace(/start|end/g,t=>ov[t])}function iv(e,t,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:i;default:return[]}}function cv(e,t,n,r){const o=qt(e);let a=iv(it(e),n==="start",r);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(Mo)))),a}function ar(e){return e.replace(/left|right|bottom|top/g,t=>rv[t])}function lv(e){return{top:0,right:0,bottom:0,left:0,...e}}function mc(e){return typeof e!="number"?lv(e):{top:e,right:e,bottom:e,left:e}}function sr(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 ys(e,t,n){let{reference:r,floating:o}=e;const a=yt(t),i=la(t),s=ca(i),c=it(t),u=a==="y",d=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let h;switch(c){case"top":h={x:d,y:r.y-o.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:m};break;case"left":h={x:r.x-o.width,y:m};break;default:h={x:r.x,y:r.y}}switch(qt(t)){case"start":h[i]-=p*(n&&u?-1:1);break;case"end":h[i]+=p*(n&&u?-1:1);break}return h}const uv=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:m}=ys(u,r,c),p=r,h={},y=0;for(let g=0;g<s.length;g++){const{name:v,fn:b}=s[g],{x,y:w,data:S,reset:C}=await b({x:d,y:m,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:u,platform:i,elements:{reference:e,floating:t}});d=x??d,m=w??m,h={...h,[v]:{...h[v],...S}},C&&y<=50&&(y++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(u=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:d,y:m}=ys(u,p,c)),g=-1)}return{x:d,y:m,placement:p,strategy:o,middlewareData:h}};async function gn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:i,elements:s,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:p=!1,padding:h=0}=st(t,e),y=mc(h),v=s[p?m==="floating"?"reference":"floating":m],b=sr(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(v)))==null||n?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:c})),x=m==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),S=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},C=sr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:w,strategy:c}):x);return{top:(b.top-C.top+y.top)/S.y,bottom:(C.bottom-b.bottom+y.bottom)/S.y,left:(b.left-C.left+y.left)/S.x,right:(C.right-b.right+y.right)/S.x}}const dv=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:c}=t,{element:u,padding:d=0}=st(e,t)||{};if(u==null)return{};const m=mc(d),p={x:n,y:r},h=la(o),y=ca(h),g=await i.getDimensions(u),v=h==="y",b=v?"top":"left",x=v?"bottom":"right",w=v?"clientHeight":"clientWidth",S=a.reference[y]+a.reference[h]-p[h]-a.floating[y],C=p[h]-a.reference[h],M=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let E=M?M[w]:0;(!E||!await(i.isElement==null?void 0:i.isElement(M)))&&(E=s.floating[w]||a.floating[y]);const P=S/2-C/2,F=E/2-g[y]/2-1,_=vt(m[b],F),$=vt(m[x],F),D=_,B=E-g[y]-$,Y=E/2-g[y]/2+P,q=Eo(D,Y,B),j=!c.arrow&&qt(o)!=null&&Y!==q&&a.reference[y]/2-(Y<D?_:$)-g[y]/2<0,G=j?Y<D?Y-D:Y-B:0;return{[h]:p[h]+G,data:{[h]:q,centerOffset:Y-q-G,...j&&{alignmentOffset:G}},reset:j}}}),fv=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:m=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...v}=st(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const b=it(o),x=yt(s),w=it(s)===s,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=p||(w||!g?[ar(s)]:sv(s)),M=y!=="none";!p&&M&&C.push(...cv(s,g,y,S));const E=[s,...C],P=await gn(t,v),F=[];let _=((r=a.flip)==null?void 0:r.overflows)||[];if(d&&F.push(P[b]),m){const Y=av(o,i,S);F.push(P[Y[0]],P[Y[1]])}if(_=[..._,{placement:o,overflows:F}],!F.every(Y=>Y<=0)){var $,D;const Y=((($=a.flip)==null?void 0:$.index)||0)+1,q=E[Y];if(q)return{data:{index:Y,overflows:_},reset:{placement:q}};let j=(D=_.filter(G=>G.overflows[0]<=0).sort((G,A)=>G.overflows[1]-A.overflows[1])[0])==null?void 0:D.placement;if(!j)switch(h){case"bestFit":{var B;const G=(B=_.filter(A=>{if(M){const I=yt(A.placement);return I===x||I==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(I=>I>0).reduce((I,Q)=>I+Q,0)]).sort((A,I)=>A[1]-I[1])[0])==null?void 0:B[0];G&&(j=G);break}case"initialPlacement":j=s;break}if(o!==j)return{reset:{placement:j}}}return{}}}};function bs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function xs(e){return nv.some(t=>e[t]>=0)}const mv=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=st(e,t);switch(r){case"referenceHidden":{const a=await gn(t,{...o,elementContext:"reference"}),i=bs(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:xs(i)}}}case"escaped":{const a=await gn(t,{...o,altBoundary:!0}),i=bs(a,n.floating);return{data:{escapedOffsets:i,escaped:xs(i)}}}default:return{}}}}};async function pv(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=it(n),s=qt(n),c=yt(n)==="y",u=["left","top"].includes(i)?-1:1,d=a&&c?-1:1,m=st(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:y}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return s&&typeof y=="number"&&(h=s==="end"?y*-1:y),c?{x:h*d,y:p*u}:{x:p*u,y:h*d}}const hv=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:s}=t,c=await pv(t,e);return i===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:i}}}}},gv=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:v=>{let{x:b,y:x}=v;return{x:b,y:x}}},...c}=st(e,t),u={x:n,y:r},d=await gn(t,c),m=yt(it(o)),p=ia(m);let h=u[p],y=u[m];if(a){const v=p==="y"?"top":"left",b=p==="y"?"bottom":"right",x=h+d[v],w=h-d[b];h=Eo(x,h,w)}if(i){const v=m==="y"?"top":"left",b=m==="y"?"bottom":"right",x=y+d[v],w=y-d[b];y=Eo(x,y,w)}const g=s.fn({...t,[p]:h,[m]:y});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:a,[m]:i}}}}}},vv=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:c=!0,crossAxis:u=!0}=st(e,t),d={x:n,y:r},m=yt(o),p=ia(m);let h=d[p],y=d[m];const g=st(s,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const w=p==="y"?"height":"width",S=a.reference[p]-a.floating[w]+v.mainAxis,C=a.reference[p]+a.reference[w]-v.mainAxis;h<S?h=S:h>C&&(h=C)}if(u){var b,x;const w=p==="y"?"width":"height",S=["top","left"].includes(it(o)),C=a.reference[m]-a.floating[w]+(S&&((b=i.offset)==null?void 0:b[m])||0)+(S?0:v.crossAxis),M=a.reference[m]+a.reference[w]+(S?0:((x=i.offset)==null?void 0:x[m])||0)-(S?v.crossAxis:0);y<C?y=C:y>M&&(y=M)}return{[p]:h,[m]:y}}}},yv=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:s}=t,{apply:c=()=>{},...u}=st(e,t),d=await gn(t,u),m=it(o),p=qt(o),h=yt(o)==="y",{width:y,height:g}=a.floating;let v,b;m==="top"||m==="bottom"?(v=m,b=p===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(b=m,v=p==="end"?"top":"bottom");const x=g-d.top-d.bottom,w=y-d.left-d.right,S=vt(g-d[v],x),C=vt(y-d[b],w),M=!t.middlewareData.shift;let E=S,P=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=x),M&&!p){const _=Pe(d.left,0),$=Pe(d.right,0),D=Pe(d.top,0),B=Pe(d.bottom,0);h?P=y-2*(_!==0||$!==0?_+$:Pe(d.left,d.right)):E=g-2*(D!==0||B!==0?D+B:Pe(d.top,d.bottom))}await c({...t,availableWidth:P,availableHeight:E});const F=await i.getDimensions(s.floating);return y!==F.width||g!==F.height?{reset:{rects:!0}}:{}}}};function Er(){return typeof window<"u"}function Xt(e){return pc(e)?(e.nodeName||"").toLowerCase():"#document"}function ke(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ze(e){var t;return(t=(pc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pc(e){return Er()?e instanceof Node||e instanceof ke(e).Node:!1}function Le(e){return Er()?e instanceof Element||e instanceof ke(e).Element:!1}function Xe(e){return Er()?e instanceof HTMLElement||e instanceof ke(e).HTMLElement:!1}function ws(e){return!Er()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ke(e).ShadowRoot}function In(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=We(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function bv(e){return["table","td","th"].includes(Xt(e))}function Mr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ua(e){const t=da(),n=Le(e)?We(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 xv(e){let t=bt(e);for(;Xe(t)&&!Ht(t);){if(ua(t))return t;if(Mr(t))return null;t=bt(t)}return null}function da(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ht(e){return["html","body","#document"].includes(Xt(e))}function We(e){return ke(e).getComputedStyle(e)}function Rr(e){return Le(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bt(e){if(Xt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ws(e)&&e.host||Ze(e);return ws(t)?t.host:t}function hc(e){const t=bt(e);return Ht(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xe(t)&&In(t)?t:hc(t)}function vn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=hc(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=ke(o);if(a){const s=Ro(i);return t.concat(i,i.visualViewport||[],In(o)?o:[],s&&n?vn(s):[])}return t.concat(o,vn(o,[],n))}function Ro(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gc(e){const t=We(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Xe(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=or(n)!==a||or(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function fa(e){return Le(e)?e:e.contextElement}function Yt(e){const t=fa(e);if(!Xe(t))return Ke(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=gc(t);let i=(a?or(n.width):n.width)/r,s=(a?or(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const wv=Ke(0);function vc(e){const t=ke(e);return!da()||!t.visualViewport?wv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Cv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ke(e)?!1:t}function Rt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=fa(e);let i=Ke(1);t&&(r?Le(r)&&(i=Yt(r)):i=Yt(e));const s=Cv(a,n,r)?vc(a):Ke(0);let c=(o.left+s.x)/i.x,u=(o.top+s.y)/i.y,d=o.width/i.x,m=o.height/i.y;if(a){const p=ke(a),h=r&&Le(r)?ke(r):r;let y=p,g=Ro(y);for(;g&&r&&h!==y;){const v=Yt(g),b=g.getBoundingClientRect(),x=We(g),w=b.left+(g.clientLeft+parseFloat(x.paddingLeft))*v.x,S=b.top+(g.clientTop+parseFloat(x.paddingTop))*v.y;c*=v.x,u*=v.y,d*=v.x,m*=v.y,c+=w,u+=S,y=ke(g),g=Ro(y)}}return sr({width:d,height:m,x:c,y:u})}function ma(e,t){const n=Rr(e).scrollLeft;return t?t.left+n:Rt(Ze(e)).left+n}function yc(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:ma(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function Sv(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",i=Ze(r),s=t?Mr(t.floating):!1;if(r===i||s&&a)return n;let c={scrollLeft:0,scrollTop:0},u=Ke(1);const d=Ke(0),m=Xe(r);if((m||!m&&!a)&&((Xt(r)!=="body"||In(i))&&(c=Rr(r)),Xe(r))){const h=Rt(r);u=Yt(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const p=i&&!m&&!a?yc(i,c,!0):Ke(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-c.scrollTop*u.y+d.y+p.y}}function Nv(e){return Array.from(e.getClientRects())}function Ev(e){const t=Ze(e),n=Rr(e),r=e.ownerDocument.body,o=Pe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Pe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ma(e);const s=-n.scrollTop;return We(r).direction==="rtl"&&(i+=Pe(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}function Mv(e,t){const n=ke(e),r=Ze(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,s=0,c=0;if(o){a=o.width,i=o.height;const u=da();(!u||u&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:a,height:i,x:s,y:c}}function Rv(e,t){const n=Rt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Xe(e)?Yt(e):Ke(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,c=o*a.x,u=r*a.y;return{width:i,height:s,x:c,y:u}}function Cs(e,t,n){let r;if(t==="viewport")r=Mv(e,n);else if(t==="document")r=Ev(Ze(e));else if(Le(t))r=Rv(t,n);else{const o=vc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sr(r)}function bc(e,t){const n=bt(e);return n===t||!Le(n)||Ht(n)?!1:We(n).position==="fixed"||bc(n,t)}function Pv(e,t){const n=t.get(e);if(n)return n;let r=vn(e,[],!1).filter(s=>Le(s)&&Xt(s)!=="body"),o=null;const a=We(e).position==="fixed";let i=a?bt(e):e;for(;Le(i)&&!Ht(i);){const s=We(i),c=ua(i);!c&&s.position==="fixed"&&(o=null),(a?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||In(i)&&!c&&bc(e,i))?r=r.filter(d=>d!==i):o=s,i=bt(i)}return t.set(e,r),r}function kv(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Mr(t)?[]:Pv(t,this._c):[].concat(n),r],s=i[0],c=i.reduce((u,d)=>{const m=Cs(t,d,o);return u.top=Pe(m.top,u.top),u.right=vt(m.right,u.right),u.bottom=vt(m.bottom,u.bottom),u.left=Pe(m.left,u.left),u},Cs(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Ov(e){const{width:t,height:n}=gc(e);return{width:t,height:n}}function Iv(e,t,n){const r=Xe(t),o=Ze(t),a=n==="fixed",i=Rt(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=Ke(0);if(r||!r&&!a)if((Xt(t)!=="body"||In(o))&&(s=Rr(t)),r){const p=Rt(t,!0,a,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else o&&(c.x=ma(o));const u=o&&!r&&!a?yc(o,s):Ke(0),d=i.left+s.scrollLeft-c.x-u.x,m=i.top+s.scrollTop-c.y-u.y;return{x:d,y:m,width:i.width,height:i.height}}function io(e){return We(e).position==="static"}function Ss(e,t){if(!Xe(e)||We(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ze(e)===n&&(n=n.ownerDocument.body),n}function xc(e,t){const n=ke(e);if(Mr(e))return n;if(!Xe(e)){let o=bt(e);for(;o&&!Ht(o);){if(Le(o)&&!io(o))return o;o=bt(o)}return n}let r=Ss(e,t);for(;r&&bv(r)&&io(r);)r=Ss(r,t);return r&&Ht(r)&&io(r)&&!ua(r)?n:r||xv(e)||n}const Dv=async function(e){const t=this.getOffsetParent||xc,n=this.getDimensions,r=await n(e.floating);return{reference:Iv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Tv(e){return We(e).direction==="rtl"}const Av={convertOffsetParentRelativeRectToViewportRelativeRect:Sv,getDocumentElement:Ze,getClippingRect:kv,getOffsetParent:xc,getElementRects:Dv,getClientRects:Nv,getDimensions:Ov,getScale:Yt,isElement:Le,isRTL:Tv};function wc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function _v(e,t){let n=null,r;const o=Ze(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function i(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:d,top:m,width:p,height:h}=u;if(s||t(),!p||!h)return;const y=Xn(m),g=Xn(o.clientWidth-(d+p)),v=Xn(o.clientHeight-(m+h)),b=Xn(d),w={rootMargin:-y+"px "+-g+"px "+-v+"px "+-b+"px",threshold:Pe(0,vt(1,c))||1};let S=!0;function C(M){const E=M[0].intersectionRatio;if(E!==c){if(!S)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!wc(u,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(C,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return i(!0),a}function Cc(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=fa(e),d=o||a?[...u?vn(u):[],...vn(t)]:[];d.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),a&&b.addEventListener("resize",n)});const m=u&&s?_v(u,n):null;let p=-1,h=null;i&&(h=new ResizeObserver(b=>{let[x]=b;x&&x.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let y,g=c?Rt(e):null;c&&v();function v(){const b=Rt(e);g&&!wc(g,b)&&n(),g=b,y=requestAnimationFrame(v)}return n(),()=>{var b;d.forEach(x=>{o&&x.removeEventListener("scroll",n),a&&x.removeEventListener("resize",n)}),m==null||m(),(b=h)==null||b.disconnect(),h=null,c&&cancelAnimationFrame(y)}}const jv=hv,Fv=gv,$v=fv,Lv=yv,Wv=mv,Ns=dv,Bv=vv,Vv=(e,t,n)=>{const r=new Map,o={platform:Av,...n},a={...o.platform,_c:r};return uv(e,t,{...o,platform:a})};var tr=typeof document<"u"?N.useLayoutEffect:N.useEffect;function ir(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(!ir(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 a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!ir(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Sc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Es(e,t){const n=Sc(e);return Math.round(t*n)/n}function co(e){const t=l.useRef(e);return tr(()=>{t.current=e}),t}function Nc(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[d,m]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=l.useState(r);ir(p,r)||h(r);const[y,g]=l.useState(null),[v,b]=l.useState(null),x=l.useCallback(A=>{A!==M.current&&(M.current=A,g(A))},[]),w=l.useCallback(A=>{A!==E.current&&(E.current=A,b(A))},[]),S=a||y,C=i||v,M=l.useRef(null),E=l.useRef(null),P=l.useRef(d),F=c!=null,_=co(c),$=co(o),D=co(u),B=l.useCallback(()=>{if(!M.current||!E.current)return;const A={placement:t,strategy:n,middleware:p};$.current&&(A.platform=$.current),Vv(M.current,E.current,A).then(I=>{const Q={...I,isPositioned:D.current!==!1};Y.current&&!ir(P.current,Q)&&(P.current=Q,Sn.flushSync(()=>{m(Q)}))})},[p,t,n,$,D]);tr(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,m(A=>({...A,isPositioned:!1})))},[u]);const Y=l.useRef(!1);tr(()=>(Y.current=!0,()=>{Y.current=!1}),[]),tr(()=>{if(S&&(M.current=S),C&&(E.current=C),S&&C){if(_.current)return _.current(S,C,B);B()}},[S,C,B,_,F]);const q=l.useMemo(()=>({reference:M,floating:E,setReference:x,setFloating:w}),[x,w]),j=l.useMemo(()=>({reference:S,floating:C}),[S,C]),G=l.useMemo(()=>{const A={position:n,left:0,top:0};if(!j.floating)return A;const I=Es(j.floating,d.x),Q=Es(j.floating,d.y);return s?{...A,transform:"translate("+I+"px, "+Q+"px)",...Sc(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:Q}},[n,s,j.floating,d.x,d.y]);return l.useMemo(()=>({...d,update:B,refs:q,elements:j,floatingStyles:G}),[d,B,q,j,G])}const Yv=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?Ns({element:r.current,padding:o}).fn(n):{}:r?Ns({element:r,padding:o}).fn(n):{}}}},Ec=(e,t)=>({...jv(e),options:[e,t]}),Mc=(e,t)=>({...Fv(e),options:[e,t]}),Rc=(e,t)=>({...Bv(e),options:[e,t]}),Pc=(e,t)=>({...$v(e),options:[e,t]}),kc=(e,t)=>({...Lv(e),options:[e,t]}),Oc=(e,t)=>({...Wv(e),options:[e,t]}),Ic=(e,t)=>({...Yv(e),options:[e,t]});var Hv="Arrow",Dc=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return f.jsx(V.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});Dc.displayName=Hv;var Gv=Dc;function Dn(e){const[t,n]=l.useState(void 0);return de(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let i,s;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,s=u.blockSize}else i=e.offsetWidth,s=e.offsetHeight;n({width:i,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var pa="Popper",[Tc,Zt]=ve(pa),[Uv,Ac]=Tc(pa),_c=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return f.jsx(Uv,{scope:t,anchor:r,onAnchorChange:o,children:n})};_c.displayName=pa;var jc="PopperAnchor",Fc=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Ac(jc,n),i=l.useRef(null),s=z(t,i);return l.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:f.jsx(V.div,{...o,ref:s})});Fc.displayName=jc;var ha="PopperContent",[zv,Kv]=Tc(ha),$c=l.forwardRef((e,t)=>{var T,Z,K,te,re,oe;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:m="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:y,...g}=e,v=Ac(ha,n),[b,x]=l.useState(null),w=z(t,he=>x(he)),[S,C]=l.useState(null),M=Dn(S),E=(M==null?void 0:M.width)??0,P=(M==null?void 0:M.height)??0,F=r+(a!=="center"?"-"+a:""),_=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},$=Array.isArray(u)?u:[u],D=$.length>0,B={padding:_,boundary:$.filter(Xv),altBoundary:D},{refs:Y,floatingStyles:q,placement:j,isPositioned:G,middlewareData:A}=Nc({strategy:"fixed",placement:F,whileElementsMounted:(...he)=>Cc(...he,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Ec({mainAxis:o+P,alignmentAxis:i}),c&&Mc({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Rc():void 0,...B}),c&&Pc({...B}),kc({...B,apply:({elements:he,rects:be,availableWidth:Je,availableHeight:et})=>{const{width:tt,height:rn}=be.reference,_e=he.floating.style;_e.setProperty("--radix-popper-available-width",`${Je}px`),_e.setProperty("--radix-popper-available-height",`${et}px`),_e.setProperty("--radix-popper-anchor-width",`${tt}px`),_e.setProperty("--radix-popper-anchor-height",`${rn}px`)}}),S&&Ic({element:S,padding:s}),Zv({arrowWidth:E,arrowHeight:P}),p&&Oc({strategy:"referenceHidden",...B})]}),[I,Q]=Bc(j),J=Ne(y);de(()=>{G&&(J==null||J())},[G,J]);const R=(T=A.arrow)==null?void 0:T.x,L=(Z=A.arrow)==null?void 0:Z.y,U=((K=A.arrow)==null?void 0:K.centerOffset)!==0,[W,X]=l.useState();return de(()=>{b&&X(window.getComputedStyle(b).zIndex)},[b]),f.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:G?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[(te=A.transformOrigin)==null?void 0:te.x,(re=A.transformOrigin)==null?void 0:re.y].join(" "),...((oe=A.hide)==null?void 0:oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(zv,{scope:n,placedSide:I,onArrowChange:C,arrowX:R,arrowY:L,shouldHideArrow:U,children:f.jsx(V.div,{"data-side":I,"data-align":Q,...g,ref:w,style:{...g.style,animation:G?void 0:"none"}})})})});$c.displayName=ha;var Lc="PopperArrow",qv={top:"bottom",right:"left",bottom:"top",left:"right"},Wc=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Kv(Lc,r),i=qv[a.placedSide];return f.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:f.jsx(Gv,{...o,ref:n,style:{...o.style,display:"block"}})})});Wc.displayName=Lc;function Xv(e){return e!==null}var Zv=e=>({name:"transformOrigin",options:e,fn(t){var v,b,x;const{placement:n,rects:r,middlewareData:o}=t,i=((v=o.arrow)==null?void 0:v.centerOffset)!==0,s=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,d]=Bc(n),m={start:"0%",center:"50%",end:"100%"}[d],p=(((b=o.arrow)==null?void 0:b.x)??0)+s/2,h=(((x=o.arrow)==null?void 0:x.y)??0)+c/2;let y="",g="";return u==="bottom"?(y=i?m:`${p}px`,g=`${-c}px`):u==="top"?(y=i?m:`${p}px`,g=`${r.floating.height+c}px`):u==="right"?(y=`${-c}px`,g=i?m:`${h}px`):u==="left"&&(y=`${r.floating.width+c}px`,g=i?m:`${h}px`),{data:{x:y,y:g}}}});function Bc(e){const[t,n="center"]=e.split("-");return[t,n]}var ga=_c,Pr=Fc,va=$c,ya=Wc,kr="Popover",[Vc,qN]=ve(kr,[Zt]),Tn=Zt(),[Qv,wt]=Vc(kr),Yc=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,s=Tn(t),c=l.useRef(null),[u,d]=l.useState(!1),[m,p]=Ce({prop:r,defaultProp:o??!1,onChange:a,caller:kr});return f.jsx(ga,{...s,children:f.jsx(Qv,{scope:t,contentId:pe(),triggerRef:c,open:m,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(h=>!h),[p]),hasCustomAnchor:u,onCustomAnchorAdd:l.useCallback(()=>d(!0),[]),onCustomAnchorRemove:l.useCallback(()=>d(!1),[]),modal:i,children:n})})};Yc.displayName=kr;var Hc="PopoverAnchor",Jv=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wt(Hc,n),a=Tn(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=o;return l.useEffect(()=>(i(),()=>s()),[i,s]),f.jsx(Pr,{...a,...r,ref:t})});Jv.displayName=Hc;var Gc="PopoverTrigger",Uc=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wt(Gc,n),a=Tn(n),i=z(t,o.triggerRef),s=f.jsx(V.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Qc(o.open),...r,ref:i,onClick:O(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:f.jsx(Pr,{asChild:!0,...a,children:s})});Uc.displayName=Gc;var ba="PopoverPortal",[ey,ty]=Vc(ba,{forceMount:void 0}),zc=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=wt(ba,t);return f.jsx(ey,{scope:t,forceMount:n,children:f.jsx(Te,{present:n||a.open,children:f.jsx(Pn,{asChild:!0,container:o,children:r})})})};zc.displayName=ba;var Gt="PopoverContent",Kc=l.forwardRef((e,t)=>{const n=ty(Gt,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=wt(Gt,e.__scopePopover);return f.jsx(Te,{present:r||a.open,children:a.modal?f.jsx(ry,{...o,ref:t}):f.jsx(oy,{...o,ref:t})})});Kc.displayName=Gt;var ny=ht("PopoverContent.RemoveScroll"),ry=l.forwardRef((e,t)=>{const n=wt(Gt,e.__scopePopover),r=l.useRef(null),o=z(t,r),a=l.useRef(!1);return l.useEffect(()=>{const i=r.current;if(i)return vr(i)},[]),f.jsx(kn,{as:ny,allowPinchZoom:!0,children:f.jsx(qc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:O(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),a.current||(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:O(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0,u=s.button===2||c;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:O(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),oy=l.forwardRef((e,t)=>{const n=wt(Gt,e.__scopePopover),r=l.useRef(!1),o=l.useRef(!1);return f.jsx(qc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,s;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),qc=l.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...m}=e,p=wt(Gt,n),h=Tn(n);return hr(),f.jsx(Rn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:f.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:f.jsx(va,{"data-state":Qc(p.open),role:"dialog",id:p.contentId,...h,...m,ref:t,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Xc="PopoverClose",ay=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wt(Xc,n);return f.jsx(V.button,{type:"button",...r,ref:t,onClick:O(e.onClick,()=>o.onOpenChange(!1))})});ay.displayName=Xc;var sy="PopoverArrow",Zc=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Tn(n);return f.jsx(ya,{...o,...r,ref:t})});Zc.displayName=sy;function Qc(e){return e?"open":"closed"}var iy=Yc,cy=Uc,ly=zc,Jc=Kc,uy=Zc;const Qt=iy,Jt=cy,dy=uy,It=l.forwardRef(({className:e,align:t="center",sideOffset:n=4,hasArrow:r,zIndex:o,children:a,...i},s)=>{const c=Ye("popover",o);return f.jsx(ly,{children:f.jsxs(Jc,{ref:s,align:t,className:k(ie.popover,e),sideOffset:n,style:{zIndex:c,...i.style},...i,children:[a,r?f.jsx(dy,{className:"fill-popover stroke-muted stroke-[1px]",height:7,width:15}):null]})})});It.displayName=Jc.displayName;const el=N.forwardRef(({loadOptions:e,options:t=[],value:n,onChange:r,placeholder:o="Select an option...",loadingMessage:a="Loading...",emptyMessage:i="No results found",errorMessage:s="Failed to load options",className:c,listClassName:u,maxSuggestions:d=10,debounceMs:m=300,minSearch:p=2,zIndex:h,isDisabled:y=!1,...g},v)=>{const[b,x]=N.useState(!1),w=Ye("dropdown",h),[S,C]=N.useState(""),[M,E]=N.useState(!1),[P,F]=N.useState(!1),[_,$]=N.useState([]),[D,B]=N.useState(!1),Y=N.useRef();N.useEffect(()=>()=>{Y.current&&clearTimeout(Y.current)},[]);const q=N.useCallback(async R=>{if(e)try{E(!0),F(!1);const L=await e(R);$(L.slice(0,d)),B(!0)}catch(L){console.error("Error fetching options:",L),F(!0),$([])}finally{E(!1)}},[e,d]),j=N.useMemo(()=>{if(e)return[];const R=S.toLowerCase().trim();return R.length>0&&B(!0),t.filter(L=>L.label.toLowerCase().includes(R)||L.value.toLowerCase().includes(R)).slice(0,d)},[e,t,S,d]),G=e?_:j,A=N.useMemo(()=>G.find(R=>R.value===n),[G,n]),I=N.useCallback(R=>{r(R),x(!1),C(""),B(!1)},[r]),Q=N.useCallback(R=>{C(R),R.length===0&&B(!1),Y.current&&clearTimeout(Y.current),e&&R.length>=p?Y.current=setTimeout(()=>{q(R)},m):e&&R.length===0&&$([])},[e,p,m,q]),J=N.useCallback(()=>{r(""),C(""),$([]),B(!1)},[r]);return f.jsxs(Qt,{open:b,onOpenChange:x,children:[f.jsx(Jt,{asChild:!0,children:f.jsxs(Ie,{ref:v,"aria-expanded":b,className:k("w-full justify-between px-3",!A&&!n&&"text-muted-foreground",c),isDisabled:y,role:"combobox",variant:"input",...g,children:[f.jsx("span",{className:"truncate",children:A?A.label:n||o}),f.jsxs("div",{className:"flex items-center gap-1",children:[n||S?f.jsx(pr,{className:"h-4 w-4 opacity-50 hover:opacity-100",onClick:R=>{R.stopPropagation(),J()}}):null,f.jsx(Zo,{className:"h-4 w-4 shrink-0 opacity-50"})]})]})}),f.jsx(It,{align:"start",className:"w-[--radix-popover-trigger-width] px-0 py-0",zIndex:w,children:f.jsxs(xr,{shouldFilter:!1,children:[f.jsx(Cr,{placeholder:o,value:S,onValueChange:Q}),M?f.jsx(fc,{children:a}):null,!M&&P?f.jsx(No,{children:s}):null,!M&&!P&&D&&G.length===0?f.jsx(No,{children:i}):null,!M&&!P&&G.length>0?f.jsx(Nr,{className:k("max-h-[16.5rem] overflow-y-auto",u),children:f.jsx(wr,{children:G.map(R=>f.jsxs(Sr,{className:"cursor-pointer",value:R.value,onSelect:I,children:[f.jsx(Ot,{className:k("mr-2 h-4 w-4",R.value===n?"opacity-100":"opacity-0")}),R.label]},R.value))})}):null]})})]})});el.displayName="Autocomplete";const fy=Se(`inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold
|
|
161
|
+
transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{variant:{default:"border-transparent bg-base-200 text-black",primary:"border-transparent bg-primary-400 text-white",success:"border-transparent bg-success-500 text-white",danger:"border-transparent bg-danger-400 text-white",warning:"border-transparent bg-warning-300 text-black",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),tl=l.forwardRef(({className:e,variant:t,...n},r)=>f.jsx("div",{ref:r,className:k(fy({variant:t,className:e})),...n}));tl.displayName="Badge";const nl=l.forwardRef(({items:e,separator:t=f.jsx(Xo,{className:"h-4 w-4"}),className:n,...r},o)=>f.jsx("nav",{ref:o,"aria-label":"Breadcrumb",className:k("flex",n),...r,children:f.jsx("ol",{className:"flex flex-wrap items-center gap-1 pl-0",children:e.map((a,i)=>f.jsxs("li",{className:"flex items-center gap-1",children:[a.href?f.jsx("a",{className:k(ie.link,ie.linkNoUnderline),href:a.href,children:a.label}):f.jsx("span",{className:"font-medium text-foreground",children:a.label}),i<e.length-1?f.jsx("span",{className:"text-muted-foreground",children:t}):null]},i))})}));nl.displayName="Breadcrumbs";const lo={},un={};function mn(e,t){try{const r=(lo[e]||(lo[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in un?un[r]:Ms(r,r.split(":"))}catch{if(e in un)return un[e];const n=e==null?void 0:e.match(my);return n?Ms(e,n.slice(1)):NaN}}const my=/([+-]\d\d):?(\d\d)?/;function Ms(e,t){const n=+t[0],r=+(t[1]||0);return un[e]=n>0?n*60+r:n*60-r}class ze extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(mn(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),rl(this),Po(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new ze(...n,t):new ze(Date.now(),t)}withTimeZone(t){return new ze(+this,t)}getTimezoneOffset(){return-mn(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Po(this),+this}[Symbol.for("constructDateFrom")](t){return new ze(+new Date(t),this.timeZone)}}const Rs=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Rs.test(e))return;const t=e.replace(Rs,"$1UTC");ze.prototype[t]&&(e.startsWith("get")?ze.prototype[e]=function(){return this.internal[t]()}:(ze.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),py(this),+this},ze.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Po(this),+this}))});function Po(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function py(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),rl(e)}function rl(e){const t=mn(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=-new Date(+n).getTimezoneOffset(),a=r-o,i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const s=r-t;s&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);const c=mn(e.timeZone,e),d=-new Date(+e).getTimezoneOffset()-c,m=c!==t,p=d-s;if(m&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const h=mn(e.timeZone,e),y=c-h;y&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+y),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y))}}class we extends ze{static tz(t,...n){return n.length?new we(...n,t):new we(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${hy(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new we(+this,t)}[Symbol.for("constructDateFrom")](t){return new we(+new Date(t),this.timeZone)}}function hy(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var H;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(H||(H={}));var me;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(me||(me={}));var $e;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})($e||($e={}));var Re;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(Re||(Re={}));const ol=6048e5,gy=864e5,Ps=Symbol.for("constructDateFrom");function ye(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ps in e?e[Ps](t):e instanceof Date?new e.constructor(t):new Date(t)}function ce(e,t){return ye(t||e,e)}function al(e,t,n){const r=ce(e,n==null?void 0:n.in);return isNaN(t)?ye(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function sl(e,t,n){const r=ce(e,n==null?void 0:n.in);if(isNaN(t))return ye(e,NaN);if(!t)return r;const o=r.getDate(),a=ye(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const i=a.getDate();return o>=i?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let vy={};function An(){return vy}function Ut(e,t){var s,c,u,d;const n=An(),r=(t==null?void 0:t.weekStartsOn)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,o=ce(e,t==null?void 0:t.in),a=o.getDay(),i=(a<r?7:0)+a-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function yn(e,t){return Ut(e,{...t,weekStartsOn:1})}function il(e,t){const n=ce(e,t==null?void 0:t.in),r=n.getFullYear(),o=ye(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=yn(o),i=ye(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const s=yn(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function ks(e){const t=ce(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function en(e,...t){const n=ye.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function bn(e,t){const n=ce(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function cl(e,t,n){const[r,o]=en(n==null?void 0:n.in,e,t),a=bn(r),i=bn(o),s=+a-ks(a),c=+i-ks(i);return Math.round((s-c)/gy)}function yy(e,t){const n=il(e,t),r=ye(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),yn(r)}function by(e,t,n){return al(e,t*7,n)}function xy(e,t,n){return sl(e,t*12,n)}function wy(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=ye.bind(null,o));const a=ce(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),ye(r,n||NaN)}function Cy(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=ye.bind(null,o));const a=ce(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),ye(r,n||NaN)}function Sy(e,t,n){const[r,o]=en(n==null?void 0:n.in,e,t);return+bn(r)==+bn(o)}function ll(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ny(e){return!(!ll(e)&&typeof e!="number"||isNaN(+ce(e)))}function Ey(e,t,n){const[r,o]=en(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return a*12+i}function My(e,t){const n=ce(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Ry(e,t){const[n,r]=en(e,t.start,t.end);return{start:n,end:r}}function Py(e,t){const{start:n,end:r}=Ry(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setDate(1);let s=1;const c=[];for(;+i<=a;)c.push(ye(n,i)),i.setMonth(i.getMonth()+s);return o?c.reverse():c}function ky(e,t){const n=ce(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Oy(e,t){const n=ce(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function ul(e,t){const n=ce(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function dl(e,t){var s,c,u,d;const n=An(),r=(t==null?void 0:t.weekStartsOn)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,o=ce(e,t==null?void 0:t.in),a=o.getDay(),i=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function Iy(e,t){return dl(e,{...t,weekStartsOn:1})}const Dy={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Ty=(e,t,n)=>{let r;const o=Dy[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function uo(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Ay={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},_y={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},jy={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Fy={date:uo({formats:Ay,defaultWidth:"full"}),time:uo({formats:_y,defaultWidth:"full"}),dateTime:uo({formats:jy,defaultWidth:"full"})},$y={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ly=(e,t,n,r)=>$y[e];function cn(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):i;o=e.formattingValues[s]||e.formattingValues[i]}else{const i=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[i]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const Wy={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},By={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Vy={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Yy={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Hy={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Gy={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Uy=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},zy={ordinalNumber:Uy,era:cn({values:Wy,defaultWidth:"wide"}),quarter:cn({values:By,defaultWidth:"wide",argumentCallback:e=>e-1}),month:cn({values:Vy,defaultWidth:"wide"}),day:cn({values:Yy,defaultWidth:"wide"}),dayPeriod:cn({values:Hy,defaultWidth:"wide",formattingValues:Gy,defaultFormattingWidth:"wide"})};function ln(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const i=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?qy(s,m=>m.test(i)):Ky(s,m=>m.test(i));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(i.length);return{value:u,rest:d}}}function Ky(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function qy(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Xy(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=n.valueCallback?n.valueCallback(i):i;const s=t.slice(o.length);return{value:i,rest:s}}}const Zy=/^(\d+)(th|st|nd|rd)?/i,Qy=/\d+/i,Jy={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},eb={any:[/^b/i,/^(a|c)/i]},tb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},nb={any:[/1/i,/2/i,/3/i,/4/i]},rb={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ob={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ab={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},sb={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ib={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},cb={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},lb={ordinalNumber:Xy({matchPattern:Zy,parsePattern:Qy,valueCallback:e=>parseInt(e,10)}),era:ln({matchPatterns:Jy,defaultMatchWidth:"wide",parsePatterns:eb,defaultParseWidth:"any"}),quarter:ln({matchPatterns:tb,defaultMatchWidth:"wide",parsePatterns:nb,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ln({matchPatterns:rb,defaultMatchWidth:"wide",parsePatterns:ob,defaultParseWidth:"any"}),day:ln({matchPatterns:ab,defaultMatchWidth:"wide",parsePatterns:sb,defaultParseWidth:"any"}),dayPeriod:ln({matchPatterns:ib,defaultMatchWidth:"any",parsePatterns:cb,defaultParseWidth:"any"})},xa={code:"en-US",formatDistance:Ty,formatLong:Fy,formatRelative:Ly,localize:zy,match:lb,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ub(e,t){const n=ce(e,t==null?void 0:t.in);return cl(n,ul(n))+1}function fl(e,t){const n=ce(e,t==null?void 0:t.in),r=+yn(n)-+yy(n);return Math.round(r/ol)+1}function ml(e,t){var d,m,p,h;const n=ce(e,t==null?void 0:t.in),r=n.getFullYear(),o=An(),a=(t==null?void 0:t.firstWeekContainsDate)??((m=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:m.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(p=o.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,i=ye((t==null?void 0:t.in)||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const s=Ut(i,t),c=ye((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const u=Ut(c,t);return+n>=+s?r+1:+n>=+u?r:r-1}function db(e,t){var s,c,u,d;const n=An(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,o=ml(e,t),a=ye((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Ut(a,t)}function pl(e,t){const n=ce(e,t==null?void 0:t.in),r=+Ut(n,t)-+db(n,t);return Math.round(r/ol)+1}function se(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ft={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return se(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):se(n+1,2)},d(e,t){return se(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return se(e.getHours()%12||12,t.length)},H(e,t){return se(e.getHours(),t.length)},m(e,t){return se(e.getMinutes(),t.length)},s(e,t){return se(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return se(o,t.length)}},$t={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Os={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return ft.y(e,t)},Y:function(e,t,n,r){const o=ml(e,r),a=o>0?o:1-o;if(t==="YY"){const i=a%100;return se(i,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):se(a,t.length)},R:function(e,t){const n=il(e);return se(n,t.length)},u:function(e,t){const n=e.getFullYear();return se(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return se(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return se(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return ft.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return se(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=pl(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):se(o,t.length)},I:function(e,t,n){const r=fl(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):se(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ft.d(e,t)},D:function(e,t,n){const r=ub(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):se(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return se(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return se(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return se(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=$t.noon:r===0?o=$t.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=$t.evening:r>=12?o=$t.afternoon:r>=4?o=$t.morning:o=$t.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ft.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ft.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):se(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):se(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ft.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ft.s(e,t)},S:function(e,t){return ft.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Ds(r);case"XXXX":case"XX":return Nt(r);case"XXXXX":case"XXX":default:return Nt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Ds(r);case"xxxx":case"xx":return Nt(r);case"xxxxx":case"xxx":default:return Nt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Is(r,":");case"OOOO":default:return"GMT"+Nt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Is(r,":");case"zzzz":default:return"GMT"+Nt(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return se(r,t.length)},T:function(e,t,n){return se(+e,t.length)}};function Is(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+se(a,2)}function Ds(e,t){return e%60===0?(e>0?"-":"+")+se(Math.abs(e)/60,2):Nt(e,t)}function Nt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=se(Math.trunc(r/60),2),a=se(r%60,2);return n+o+t+a}const Ts=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},hl=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},fb=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Ts(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Ts(r,t)).replace("{{time}}",hl(o,t))},mb={p:hl,P:fb},pb=/^D+$/,hb=/^Y+$/,gb=["D","DD","YY","YYYY"];function vb(e){return pb.test(e)}function yb(e){return hb.test(e)}function bb(e,t,n){const r=xb(e,t,n);if(console.warn(r),gb.includes(e))throw new RangeError(r)}function xb(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const wb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Cb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Sb=/^'([^]*?)'?$/,Nb=/''/g,Eb=/[a-zA-Z]/;function pn(e,t,n){var d,m,p,h,y,g,v,b;const r=An(),o=(n==null?void 0:n.locale)??r.locale??xa,a=(n==null?void 0:n.firstWeekContainsDate)??((m=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:m.firstWeekContainsDate)??r.firstWeekContainsDate??((h=(p=r.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,i=(n==null?void 0:n.weekStartsOn)??((g=(y=n==null?void 0:n.locale)==null?void 0:y.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((b=(v=r.locale)==null?void 0:v.options)==null?void 0:b.weekStartsOn)??0,s=ce(e,n==null?void 0:n.in);if(!Ny(s))throw new RangeError("Invalid time value");let c=t.match(Cb).map(x=>{const w=x[0];if(w==="p"||w==="P"){const S=mb[w];return S(x,o.formatLong)}return x}).join("").match(wb).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const w=x[0];if(w==="'")return{isToken:!1,value:Mb(x)};if(Os[w])return{isToken:!0,value:x};if(w.match(Eb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:x}});o.localize.preprocessor&&(c=o.localize.preprocessor(s,c));const u={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return c.map(x=>{if(!x.isToken)return x.value;const w=x.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&yb(w)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&vb(w))&&bb(w,t,String(e));const S=Os[w[0]];return S(s,w,o.localize,u)}).join("")}function Mb(e){const t=e.match(Sb);return t?t[1].replace(Nb,"'"):e}function Rb(e,t){const n=ce(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=ye(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function Pb(e,t){return ce(e,t==null?void 0:t.in).getMonth()}function kb(e,t){return ce(e,t==null?void 0:t.in).getFullYear()}function Ob(e,t){return+ce(e)>+ce(t)}function Ib(e,t){return+ce(e)<+ce(t)}function Db(e,t,n){const[r,o]=en(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Tb(e,t,n){const[r,o]=en(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function Ab(e,t,n){const r=ce(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),i=ye(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const s=Rb(i);return r.setMonth(t,Math.min(a,s)),r}function _b(e,t,n){const r=ce(e,n==null?void 0:n.in);return isNaN(+r)?ye(e,NaN):(r.setFullYear(t),r)}const As=5,jb=4;function Fb(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,As*7-1);return t.getMonth(e)===t.getMonth(a)?As:jb}function gl(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-1*6):t.addDays(n,-1*(r-1))}function $b(e,t){const n=gl(e,t),r=Fb(e,t);return t.addDays(n,r*7-1)}class ct{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?we.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,a)=>{var i;return(i=this.overrides)!=null&&i.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new we(r,o,a,this.options.timeZone):new Date(r,o,a)},this.addDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addDays?this.overrides.addDays(r,o):al(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):sl(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):by(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):xy(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):cl(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):Ey(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):Py(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):$b(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):Iy(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):My(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):dl(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):Oy(r)},this.format=(r,o,a)=>{var s;const i=(s=this.overrides)!=null&&s.format?this.overrides.format(r,o,this.options):pn(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(i):i},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):fl(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):Pb(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):kb(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):pl(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):Ob(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):Ib(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):ll(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):Sy(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):Db(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):Tb(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):wy(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):Cy(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):Ab(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):_b(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):gl(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):bn(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):yn(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):ky(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):Ut(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):ul(r)},this.options={locale:xa,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}}const Qe=new ct;class vl{constructor(t,n,r=Qe){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class Lb{constructor(t,n){this.date=t,this.weeks=n}}class Wb{constructor(t,n){this.days=n,this.weekNumber=t}}function rt(e,t,n=!1,r=Qe){let{from:o,to:a}=e;const{differenceInCalendarDays:i,isSameDay:s}=r;return o&&a?(i(a,o)<0&&([o,a]=[a,o]),i(t,o)>=(n?1:0)&&i(a,t)>=(n?1:0)):!n&&a?s(a,t):!n&&o?s(o,t):!1}function yl(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function wa(e){return!!(e&&typeof e=="object"&&"from"in e)}function bl(e){return!!(e&&typeof e=="object"&&"after"in e)}function xl(e){return!!(e&&typeof e=="object"&&"before"in e)}function wl(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Cl(e,t){return Array.isArray(e)&&e.every(t.isDate)}function ot(e,t,n=Qe){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:i}=n;return r.some(s=>{if(typeof s=="boolean")return s;if(n.isDate(s))return o(e,s);if(Cl(s,n))return s.includes(e);if(wa(s))return rt(s,e,!1,n);if(wl(s))return Array.isArray(s.dayOfWeek)?s.dayOfWeek.includes(e.getDay()):s.dayOfWeek===e.getDay();if(yl(s)){const c=a(s.before,e),u=a(s.after,e),d=c>0,m=u<0;return i(s.before,s.after)?m&&d:d||m}return bl(s)?a(e,s.after)>0:xl(s)?a(s.before,e)>0:typeof s=="function"?s(e):!1})}function Bb(e,t,n){const{disabled:r,hidden:o,modifiers:a,showOutsideDays:i,broadcastCalendar:s,today:c}=t,{isSameDay:u,isSameMonth:d,startOfMonth:m,isBefore:p,endOfMonth:h,isAfter:y}=n,g=t.startMonth&&m(t.startMonth),v=t.endMonth&&h(t.endMonth),b={[me.focused]:[],[me.outside]:[],[me.disabled]:[],[me.hidden]:[],[me.today]:[]},x={};for(const w of e){const{date:S,displayMonth:C}=w,M=!!(C&&!d(S,C)),E=!!(g&&p(S,g)),P=!!(v&&y(S,v)),F=!!(r&&ot(S,r,n)),_=!!(o&&ot(S,o,n))||E||P||!s&&!i&&M||s&&i===!1&&M,$=u(S,c??n.today());M&&b.outside.push(w),F&&b.disabled.push(w),_&&b.hidden.push(w),$&&b.today.push(w),a&&Object.keys(a).forEach(D=>{const B=a==null?void 0:a[D];B&&ot(S,B,n)&&(x[D]?x[D].push(w):x[D]=[w])})}return w=>{const S={[me.focused]:!1,[me.disabled]:!1,[me.hidden]:!1,[me.outside]:!1,[me.today]:!1},C={};for(const M in b){const E=b[M];S[M]=E.some(P=>P===w)}for(const M in x)C[M]=x[M].some(E=>E===w);return{...S,...C}}}function Vb(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[me[a]]?o.push(t[me[a]]):t[$e[a]]&&o.push(t[$e[a]]),o),[t[H.Day]])}function Yb(e){return N.createElement("button",{...e})}function Hb(e){return N.createElement("span",{...e})}function Gb(e){const{size:t=24,orientation:n="left",className:r}=e;return N.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&N.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&N.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&N.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&N.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Ub(e){const{day:t,modifiers:n,...r}=e;return N.createElement("td",{...r})}function zb(e){const{day:t,modifiers:n,...r}=e,o=N.useRef(null);return N.useEffect(()=>{var a;n.focused&&((a=o.current)==null||a.focus())},[n.focused]),N.createElement("button",{ref:o,...r})}function Kb(e){const{options:t,className:n,components:r,classNames:o,...a}=e,i=[o[H.Dropdown],n].join(" "),s=t==null?void 0:t.find(({value:c})=>c===a.value);return N.createElement("span",{"data-disabled":a.disabled,className:o[H.DropdownRoot]},N.createElement(r.Select,{className:i,...a},t==null?void 0:t.map(({value:c,label:u,disabled:d})=>N.createElement(r.Option,{key:c,value:c,disabled:d},u))),N.createElement("span",{className:o[H.CaptionLabel],"aria-hidden":!0},s==null?void 0:s.label,N.createElement(r.Chevron,{orientation:"down",size:18,className:o[H.Chevron]})))}function qb(e){return N.createElement("div",{...e})}function Xb(e){return N.createElement("div",{...e})}function Zb(e){const{calendarMonth:t,displayIndex:n,...r}=e;return N.createElement("div",{...r},e.children)}function Qb(e){const{calendarMonth:t,displayIndex:n,...r}=e;return N.createElement("div",{...r})}function Jb(e){return N.createElement("table",{...e})}function ex(e){return N.createElement("div",{...e})}const Sl=N.createContext(void 0);function _n(){const e=N.useContext(Sl);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function tx(e){const{components:t}=_n();return N.createElement(t.Dropdown,{...e})}function nx(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:i,classNames:s,labels:{labelPrevious:c,labelNext:u}}=_n(),d=N.useCallback(p=>{o&&(n==null||n(p))},[o,n]),m=N.useCallback(p=>{r&&(t==null||t(p))},[r,t]);return N.createElement("nav",{...a},N.createElement(i.PreviousMonthButton,{type:"button",className:s[H.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:m},N.createElement(i.Chevron,{disabled:r?void 0:!0,className:s[H.Chevron],orientation:"left"})),N.createElement(i.NextMonthButton,{type:"button",className:s[H.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:d},N.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:s[H.Chevron]})))}function rx(e){const{components:t}=_n();return N.createElement(t.Button,{...e})}function ox(e){return N.createElement("option",{...e})}function ax(e){const{components:t}=_n();return N.createElement(t.Button,{...e})}function sx(e){const{rootRef:t,...n}=e;return N.createElement("div",{...n,ref:t})}function ix(e){return N.createElement("select",{...e})}function cx(e){const{week:t,...n}=e;return N.createElement("tr",{...n})}function lx(e){return N.createElement("th",{...e})}function ux(e){return N.createElement("thead",{"aria-hidden":!0},N.createElement("tr",{...e}))}function dx(e){const{week:t,...n}=e;return N.createElement("th",{...n})}function fx(e){return N.createElement("th",{...e})}function mx(e){return N.createElement("tbody",{...e})}function px(e){const{components:t}=_n();return N.createElement(t.Dropdown,{...e})}const hx=Object.freeze(Object.defineProperty({__proto__:null,Button:Yb,CaptionLabel:Hb,Chevron:Gb,Day:Ub,DayButton:zb,Dropdown:Kb,DropdownNav:qb,Footer:Xb,Month:Zb,MonthCaption:Qb,MonthGrid:Jb,Months:ex,MonthsDropdown:tx,Nav:nx,NextMonthButton:rx,Option:ox,PreviousMonthButton:ax,Root:sx,Select:ix,Week:cx,WeekNumber:dx,WeekNumberHeader:fx,Weekday:lx,Weekdays:ux,Weeks:mx,YearsDropdown:px},Symbol.toStringTag,{value:"Module"}));function gx(e){return{...hx,...e}}function vx(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function yx(){const e={};for(const t in H)e[H[t]]=`rdp-${H[t]}`;for(const t in me)e[me[t]]=`rdp-${me[t]}`;for(const t in $e)e[$e[t]]=`rdp-${$e[t]}`;for(const t in Re)e[Re[t]]=`rdp-${Re[t]}`;return e}function Nl(e,t,n){return(n??new ct(t)).format(e,"LLLL y")}const bx=Nl;function xx(e,t,n){return(n??new ct(t)).format(e,"d")}function wx(e,t=Qe){return t.format(e,"LLLL")}function Cx(e,t=Qe){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Sx(){return""}function Nx(e,t,n){return(n??new ct(t)).format(e,"cccccc")}function El(e,t=Qe){return t.format(e,"yyyy")}const Ex=El,Mx=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Nl,formatDay:xx,formatMonthCaption:bx,formatMonthDropdown:wx,formatWeekNumber:Cx,formatWeekNumberHeader:Sx,formatWeekdayName:Nx,formatYearCaption:Ex,formatYearDropdown:El},Symbol.toStringTag,{value:"Module"}));function Rx(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Mx,...e}}function Px(e,t,n,r,o){const{startOfMonth:a,startOfYear:i,endOfYear:s,eachMonthOfInterval:c,getMonth:u}=o;return c({start:i(e),end:s(e)}).map(p=>{const h=r.formatMonthDropdown(p,o),y=u(p),g=t&&p<a(t)||n&&p>a(n)||!1;return{value:y,label:h,disabled:g}})}function kx(e,t={},n={}){let r={...t==null?void 0:t[H.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function Ox(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),a=[];for(let i=0;i<7;i++){const s=e.addDays(o,i);a.push(s)}return a}function Ix(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:a,addYears:i,getYear:s,isBefore:c,isSameYear:u}=r,d=o(e),m=a(t),p=[];let h=d;for(;c(h,m)||u(h,m);)p.push(h),h=i(h,1);return p.map(y=>{const g=n.formatYearDropdown(y,r);return{value:s(y),label:g,disabled:!1}})}function Ml(e,t,n){return(n??new ct(t)).format(e,"LLLL y")}const Dx=Ml;function Tx(e,t,n,r){let o=(r??new ct(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function Rl(e,t,n,r){let o=(r??new ct(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const Ax=Rl;function _x(){return""}function jx(e){return"Choose the Month"}function Fx(e){return"Go to the Next Month"}function $x(e){return"Go to the Previous Month"}function Lx(e,t,n){return(n??new ct(t)).format(e,"cccc")}function Wx(e,t){return`Week ${e}`}function Bx(e){return"Week Number"}function Vx(e){return"Choose the Year"}const Yx=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Dx,labelDay:Ax,labelDayButton:Rl,labelGrid:Ml,labelGridcell:Tx,labelMonthDropdown:jx,labelNav:_x,labelNext:Fx,labelPrevious:$x,labelWeekNumber:Wx,labelWeekNumberHeader:Bx,labelWeekday:Lx,labelYearDropdown:Vx},Symbol.toStringTag,{value:"Module"})),jn=e=>e instanceof HTMLElement?e:null,fo=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Hx=e=>jn(e.querySelector("[data-animated-month]")),mo=e=>jn(e.querySelector("[data-animated-caption]")),po=e=>jn(e.querySelector("[data-animated-weeks]")),Gx=e=>jn(e.querySelector("[data-animated-nav]")),Ux=e=>jn(e.querySelector("[data-animated-weekdays]"));function zx(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const i=N.useRef(null),s=N.useRef(r),c=N.useRef(!1);N.useLayoutEffect(()=>{const u=s.current;if(s.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;const d=a.isSameMonth(r[0].date,u[0].date),m=a.isAfter(r[0].date,u[0].date),p=m?n[Re.caption_after_enter]:n[Re.caption_before_enter],h=m?n[Re.weeks_after_enter]:n[Re.weeks_before_enter],y=i.current,g=e.current.cloneNode(!0);if(g instanceof HTMLElement?(fo(g).forEach(w=>{if(!(w instanceof HTMLElement))return;const S=Hx(w);S&&w.contains(S)&&w.removeChild(S);const C=mo(w);C&&C.classList.remove(p);const M=po(w);M&&M.classList.remove(h)}),i.current=g):i.current=null,c.current||d||o)return;const v=y instanceof HTMLElement?fo(y):[],b=fo(e.current);if(b&&b.every(x=>x instanceof HTMLElement)&&v&&v.every(x=>x instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const x=Gx(e.current);x&&(x.style.zIndex="1"),b.forEach((w,S)=>{const C=v[S];if(!C)return;w.style.position="relative",w.style.overflow="hidden";const M=mo(w);M&&M.classList.add(p);const E=po(w);E&&E.classList.add(h);const P=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),x&&(x.style.zIndex=""),M&&M.classList.remove(p),E&&E.classList.remove(h),w.style.position="",w.style.overflow="",w.contains(C)&&w.removeChild(C)};C.style.pointerEvents="none",C.style.position="absolute",C.style.overflow="hidden",C.setAttribute("aria-hidden","true");const F=Ux(C);F&&(F.style.opacity="0");const _=mo(C);_&&(_.classList.add(m?n[Re.caption_before_exit]:n[Re.caption_after_exit]),_.addEventListener("animationend",P));const $=po(C);$&&$.classList.add(m?n[Re.weeks_before_exit]:n[Re.weeks_after_exit]),w.insertBefore(C,w.firstChild)})}})}function Kx(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:i,fixedWeeks:s,broadcastCalendar:c}=n??{},{addDays:u,differenceInCalendarDays:d,differenceInCalendarMonths:m,endOfBroadcastWeek:p,endOfISOWeek:h,endOfMonth:y,endOfWeek:g,isAfter:v,startOfBroadcastWeek:b,startOfISOWeek:x,startOfWeek:w}=r,S=c?b(o,r):i?x(o):w(o),C=c?p(a):i?h(y(a)):g(y(a)),M=d(C,S),E=m(a,o)+1,P=[];for(let $=0;$<=M;$++){const D=u(S,$);if(t&&v(D,t))break;P.push(D)}const _=(c?35:42)*E;if(s&&P.length<_){const $=_-P.length;for(let D=0;D<$;D++){const B=u(P[P.length-1],1);P.push(B)}}return P}function qx(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,i)=>[...a,...i.days],t);return[...n,...o]},t)}function Xx(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let i=0;i<o;i++){const s=r.addMonths(e,i);if(t&&s>t)break;a.push(s)}return a}function _s(e,t){const{month:n,defaultMonth:r,today:o=t.today(),numberOfMonths:a=1,endMonth:i,startMonth:s}=e;let c=n||r||o;const{differenceInCalendarMonths:u,addMonths:d,startOfMonth:m}=t;if(i&&u(i,c)<0){const p=-1*(a-1);c=d(i,p)}return s&&u(c,s)<0&&(c=s),m(c)}function Zx(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:s,endOfWeek:c,getISOWeek:u,getWeek:d,startOfBroadcastWeek:m,startOfISOWeek:p,startOfWeek:h}=r,y=e.reduce((g,v)=>{const b=n.broadcastCalendar?m(v,r):n.ISOWeek?p(v):h(v),x=n.broadcastCalendar?a(v):n.ISOWeek?i(s(v)):c(s(v)),w=t.filter(E=>E>=b&&E<=x),S=n.broadcastCalendar?35:42;if(n.fixedWeeks&&w.length<S){const E=t.filter(P=>{const F=S-w.length;return P>x&&P<=o(x,F)});w.push(...E)}const C=w.reduce((E,P)=>{const F=n.ISOWeek?u(P):d(P),_=E.find(D=>D.weekNumber===F),$=new vl(P,v,r);return _?_.days.push($):E.push(new Wb(F,[$])),E},[]),M=new Lb(v,C);return g.push(M),g},[]);return n.reverseMonths?y.reverse():y}function Qx(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:i,endOfMonth:s,addYears:c,endOfYear:u,newDate:d,today:m}=t,{fromYear:p,toYear:h,fromMonth:y,toMonth:g}=e;!n&&y&&(n=y),!n&&p&&(n=t.newDate(p,0,1)),!r&&g&&(r=g),!r&&h&&(r=d(h,11,31));const v=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=i(n):p?n=d(p,0,1):!n&&v&&(n=o(c(e.today??m(),-100))),r?r=s(r):h?r=d(h,11,31):!r&&v&&(r=u(e.today??m())),[n&&a(n),r&&a(r)]}function Jx(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:c}=r,u=o?a:1,d=i(e);if(!t)return s(d,u);if(!(c(t,e)<a))return s(d,u)}function ew(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:c}=r,u=o?a??1:1,d=i(e);if(!t)return s(d,-u);if(!(c(d,t)<=0))return s(d,-u)}function tw(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function Or(e,t){const[n,r]=N.useState(e);return[t===void 0?n:t,r]}function nw(e,t){const[n,r]=Qx(e,t),{startOfMonth:o,endOfMonth:a}=t,i=_s(e,t),[s,c]=Or(i,e.month?i:void 0);N.useEffect(()=>{const M=_s(e,t);c(M)},[e.timeZone]);const u=Xx(s,r,e,t),d=Kx(u,e.endMonth?a(e.endMonth):void 0,e,t),m=Zx(u,d,e,t),p=tw(m),h=qx(m),y=ew(s,n,e,t),g=Jx(s,r,e,t),{disableNavigation:v,onMonthChange:b}=e,x=M=>p.some(E=>E.days.some(P=>P.isEqualTo(M))),w=M=>{if(v)return;let E=o(M);n&&E<o(n)&&(E=o(n)),r&&E>o(r)&&(E=o(r)),c(E),b==null||b(E)};return{months:m,weeks:p,days:h,navStart:n,navEnd:r,previousMonth:y,nextMonth:g,goToMonth:w,goToDay:M=>{x(M)||w(M.date)}}}var Ge;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Ge||(Ge={}));function js(e){return!e[me.disabled]&&!e[me.hidden]&&!e[me.outside]}function rw(e,t,n,r){let o,a=-1;for(const i of e){const s=t(i);js(s)&&(s[me.focused]&&a<Ge.FocusedModifier?(o=i,a=Ge.FocusedModifier):r!=null&&r.isEqualTo(i)&&a<Ge.LastFocused?(o=i,a=Ge.LastFocused):n(i.date)&&a<Ge.Selected?(o=i,a=Ge.Selected):s[me.today]&&a<Ge.Today&&(o=i,a=Ge.Today))}return o||(o=e.find(i=>js(t(i)))),o}function ow(e,t,n,r,o,a,i){const{ISOWeek:s,broadcastCalendar:c}=a,{addDays:u,addMonths:d,addWeeks:m,addYears:p,endOfBroadcastWeek:h,endOfISOWeek:y,endOfWeek:g,max:v,min:b,startOfBroadcastWeek:x,startOfISOWeek:w,startOfWeek:S}=i;let M={day:u,week:m,month:d,year:p,startOfWeek:E=>c?x(E,i):s?w(E):S(E),endOfWeek:E=>c?h(E):s?y(E):g(E)}[e](n,t==="after"?1:-1);return t==="before"&&r?M=v([r,M]):t==="after"&&o&&(M=b([o,M])),M}function Pl(e,t,n,r,o,a,i,s=0){if(s>365)return;const c=ow(e,t,n.date,r,o,a,i),u=!!(a.disabled&&ot(c,a.disabled,i)),d=!!(a.hidden&&ot(c,a.hidden,i)),m=c,p=new vl(c,m,i);return!u&&!d?p:Pl(e,t,p,r,o,a,i,s+1)}function aw(e,t,n,r,o){const{autoFocus:a}=e,[i,s]=N.useState(),c=rw(t.days,n,r||(()=>!1),i),[u,d]=N.useState(a?c:void 0);return{isFocusTarget:g=>!!(c!=null&&c.isEqualTo(g)),setFocused:d,focused:u,blur:()=>{s(u),d(void 0)},moveFocus:(g,v)=>{if(!u)return;const b=Pl(g,v,u,t.navStart,t.navEnd,e,o);b&&(t.goToDay(b),d(b))}}}function sw(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=Or(n,o?n:void 0),s=o?n:a,{isSameDay:c}=t,u=h=>(s==null?void 0:s.some(y=>c(y,h)))??!1,{min:d,max:m}=e;return{selected:s,select:(h,y,g)=>{let v=[...s??[]];if(u(h)){if((s==null?void 0:s.length)===d||r&&(s==null?void 0:s.length)===1)return;v=s==null?void 0:s.filter(b=>!c(b,h))}else(s==null?void 0:s.length)===m?v=[h]:v=[...v,h];return o||i(v),o==null||o(v,h,y,g),v},isSelected:u}}function iw(e,t,n=0,r=0,o=!1,a=Qe){const{from:i,to:s}=t||{},{isSameDay:c,isAfter:u,isBefore:d}=a;let m;if(!i&&!s)m={from:e,to:n>0?void 0:e};else if(i&&!s)c(i,e)?o?m={from:i,to:void 0}:m=void 0:d(e,i)?m={from:e,to:i}:m={from:i,to:e};else if(i&&s)if(c(i,e)&&c(s,e))o?m={from:i,to:s}:m=void 0;else if(c(i,e))m={from:i,to:n>0?void 0:e};else if(c(s,e))m={from:e,to:n>0?void 0:e};else if(d(e,i))m={from:e,to:s};else if(u(e,i))m={from:i,to:e};else if(u(e,s))m={from:i,to:e};else throw new Error("Invalid range");if(m!=null&&m.from&&(m!=null&&m.to)){const p=a.differenceInCalendarDays(m.to,m.from);r>0&&p>r?m={from:e,to:void 0}:n>1&&p<n&&(m={from:e,to:void 0})}return m}function cw(e,t,n=Qe){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),i=Math.min(a,6);for(let s=0;s<=i;s++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function Fs(e,t,n=Qe){return rt(e,t.from,!1,n)||rt(e,t.to,!1,n)||rt(t,e.from,!1,n)||rt(t,e.to,!1,n)}function lw(e,t,n=Qe){const r=Array.isArray(t)?t:[t];if(r.filter(s=>typeof s!="function").some(s=>typeof s=="boolean"?s:n.isDate(s)?rt(e,s,!1,n):Cl(s,n)?s.some(c=>rt(e,c,!1,n)):wa(s)?s.from&&s.to?Fs(e,{from:s.from,to:s.to},n):!1:wl(s)?cw(e,s.dayOfWeek,n):yl(s)?n.isAfter(s.before,s.after)?Fs(e,{from:n.addDays(s.after,1),to:n.addDays(s.before,-1)},n):ot(e.from,s,n)||ot(e.to,s,n):bl(s)||xl(s)?ot(e.from,s,n)||ot(e.to,s,n):!1))return!0;const i=r.filter(s=>typeof s=="function");if(i.length){let s=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=c;u++){if(i.some(d=>d(s)))return!0;s=n.addDays(s,1)}}return!1}function uw(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:i}=e,[s,c]=Or(o,i?o:void 0),u=i?o:s;return{selected:u,select:(p,h,y)=>{const{min:g,max:v}=e,b=p?iw(p,u,g,v,a,t):void 0;return r&&n&&(b!=null&&b.from)&&b.to&&lw({from:b.from,to:b.to},n,t)&&(b.from=p,b.to=void 0),i||c(b),i==null||i(b,p,h,y),b},isSelected:p=>u&&rt(u,p,!1,t)}}function dw(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=Or(n,o?n:void 0),s=o?n:a,{isSameDay:c}=t;return{selected:s,select:(m,p,h)=>{let y=m;return!r&&s&&s&&c(m,s)&&(y=void 0),o||i(y),o==null||o(y,m,p,h),y},isSelected:m=>s?c(s,m):!1}}function fw(e,t){const n=dw(e,t),r=sw(e,t),o=uw(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function mw(e){var Ua;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new we(t.today,t.timeZone)),t.month&&(t.month=new we(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new we(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new we(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new we(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new we(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(Ua=t.selected)==null?void 0:Ua.map(ne=>new we(ne,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new we(t.selected.from,t.timeZone):void 0,to:t.selected.to?new we(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:o,dateLib:a,locale:i,classNames:s}=N.useMemo(()=>{const ne={...xa,...t.locale};return{dateLib:new ct({locale:ne,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:gx(t.components),formatters:Rx(t.formatters),labels:{...Yx,...t.labels},locale:ne,classNames:{...yx(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:c,mode:u,navLayout:d,numberOfMonths:m=1,onDayBlur:p,onDayClick:h,onDayFocus:y,onDayKeyDown:g,onDayMouseEnter:v,onDayMouseLeave:b,onNextClick:x,onPrevClick:w,showWeekNumber:S,styles:C}=t,{formatCaption:M,formatDay:E,formatMonthDropdown:P,formatWeekNumber:F,formatWeekNumberHeader:_,formatWeekdayName:$,formatYearDropdown:D}=r,B=nw(t,a),{days:Y,months:q,navStart:j,navEnd:G,previousMonth:A,nextMonth:I,goToMonth:Q}=B,J=Bb(Y,t,a),{isSelected:R,select:L,selected:U}=fw(t,a)??{},{blur:W,focused:X,isFocusTarget:T,moveFocus:Z,setFocused:K}=aw(t,B,J,R??(()=>!1),a),{labelDayButton:te,labelGridcell:re,labelGrid:oe,labelMonthDropdown:he,labelNav:be,labelPrevious:Je,labelNext:et,labelWeekday:tt,labelWeekNumber:rn,labelWeekNumberHeader:_e,labelYearDropdown:Jf}=o,em=N.useMemo(()=>Ox(a,t.ISOWeek),[a,t.ISOWeek]),Ha=u!==void 0||h!==void 0,Ur=N.useCallback(()=>{A&&(Q(A),w==null||w(A))},[A,Q,w]),zr=N.useCallback(()=>{I&&(Q(I),x==null||x(I))},[Q,I,x]),tm=N.useCallback((ne,fe)=>le=>{le.preventDefault(),le.stopPropagation(),K(ne),L==null||L(ne.date,fe,le),h==null||h(ne.date,fe,le)},[L,h,K]),nm=N.useCallback((ne,fe)=>le=>{K(ne),y==null||y(ne.date,fe,le)},[y,K]),rm=N.useCallback((ne,fe)=>le=>{W(),p==null||p(ne.date,fe,le)},[W,p]),om=N.useCallback((ne,fe)=>le=>{const lt={ArrowLeft:["day",t.dir==="rtl"?"after":"before"],ArrowRight:["day",t.dir==="rtl"?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[le.shiftKey?"year":"month","before"],PageDown:[le.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(lt[le.key]){le.preventDefault(),le.stopPropagation();const[je,Yn]=lt[le.key];Z(je,Yn)}g==null||g(ne.date,fe,le)},[Z,g,t.dir]),am=N.useCallback((ne,fe)=>le=>{v==null||v(ne.date,fe,le)},[v]),sm=N.useCallback((ne,fe)=>le=>{b==null||b(ne.date,fe,le)},[b]),im=N.useCallback(ne=>fe=>{const le=Number(fe.target.value),lt=a.setMonth(a.startOfMonth(ne),le);Q(lt)},[a,Q]),cm=N.useCallback(ne=>fe=>{const le=Number(fe.target.value),lt=a.setYear(a.startOfMonth(ne),le);Q(lt)},[a,Q]),{className:lm,style:um}=N.useMemo(()=>({className:[s[H.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[H.Root],...t.style}}),[s,t.className,t.style,C]),dm=vx(t),Ga=N.useRef(null);zx(Ga,!!t.animate,{classNames:s,months:q,focused:X,dateLib:a});const fm={dayPickerProps:t,selected:U,select:L,isSelected:R,months:q,nextMonth:I,previousMonth:A,goToMonth:Q,getModifiers:J,components:n,classNames:s,styles:C,labels:o,formatters:r};return N.createElement(Sl.Provider,{value:fm},N.createElement(n.Root,{rootRef:t.animate?Ga:void 0,className:lm,style:um,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...dm},N.createElement(n.Months,{className:s[H.Months],style:C==null?void 0:C[H.Months]},!t.hideNavigation&&!d&&N.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[H.Nav],style:C==null?void 0:C[H.Nav],"aria-label":be(),onPreviousClick:Ur,onNextClick:zr,previousMonth:A,nextMonth:I}),q.map((ne,fe)=>{const le=Px(ne.date,j,G,r,a),lt=Ix(j,G,r,a);return N.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:s[H.Month],style:C==null?void 0:C[H.Month],key:fe,displayIndex:fe,calendarMonth:ne},d==="around"&&!t.hideNavigation&&fe===0&&N.createElement(n.PreviousMonthButton,{type:"button",className:s[H.PreviousMonthButton],tabIndex:A?void 0:-1,"aria-disabled":A?void 0:!0,"aria-label":Je(A),onClick:Ur,"data-animated-button":t.animate?"true":void 0},N.createElement(n.Chevron,{disabled:A?void 0:!0,className:s[H.Chevron],orientation:t.dir==="rtl"?"right":"left"})),N.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:s[H.MonthCaption],style:C==null?void 0:C[H.MonthCaption],calendarMonth:ne,displayIndex:fe},c!=null&&c.startsWith("dropdown")?N.createElement(n.DropdownNav,{className:s[H.Dropdowns],style:C==null?void 0:C[H.Dropdowns]},c==="dropdown"||c==="dropdown-months"?N.createElement(n.MonthsDropdown,{className:s[H.MonthsDropdown],"aria-label":he(),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:im(ne.date),options:le,style:C==null?void 0:C[H.Dropdown],value:a.getMonth(ne.date)}):N.createElement("span",null,P(ne.date,a)),c==="dropdown"||c==="dropdown-years"?N.createElement(n.YearsDropdown,{className:s[H.YearsDropdown],"aria-label":Jf(a.options),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:cm(ne.date),options:lt,style:C==null?void 0:C[H.Dropdown],value:a.getYear(ne.date)}):N.createElement("span",null,D(ne.date,a)),N.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},M(ne.date,a.options,a))):N.createElement(n.CaptionLabel,{className:s[H.CaptionLabel],role:"status","aria-live":"polite"},M(ne.date,a.options,a))),d==="around"&&!t.hideNavigation&&fe===m-1&&N.createElement(n.NextMonthButton,{type:"button",className:s[H.NextMonthButton],tabIndex:I?void 0:-1,"aria-disabled":I?void 0:!0,"aria-label":et(I),onClick:zr,"data-animated-button":t.animate?"true":void 0},N.createElement(n.Chevron,{disabled:I?void 0:!0,className:s[H.Chevron],orientation:t.dir==="rtl"?"left":"right"})),fe===m-1&&d==="after"&&!t.hideNavigation&&N.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[H.Nav],style:C==null?void 0:C[H.Nav],"aria-label":be(),onPreviousClick:Ur,onNextClick:zr,previousMonth:A,nextMonth:I}),N.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":oe(ne.date,a.options,a)||void 0,className:s[H.MonthGrid],style:C==null?void 0:C[H.MonthGrid]},!t.hideWeekdays&&N.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:s[H.Weekdays],style:C==null?void 0:C[H.Weekdays]},S&&N.createElement(n.WeekNumberHeader,{"aria-label":_e(a.options),className:s[H.WeekNumberHeader],style:C==null?void 0:C[H.WeekNumberHeader],scope:"col"},_()),em.map((je,Yn)=>N.createElement(n.Weekday,{"aria-label":tt(je,a.options,a),className:s[H.Weekday],key:Yn,style:C==null?void 0:C[H.Weekday],scope:"col"},$(je,a.options,a)))),N.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:s[H.Weeks],style:C==null?void 0:C[H.Weeks]},ne.weeks.map((je,Yn)=>N.createElement(n.Week,{className:s[H.Week],key:je.weekNumber,style:C==null?void 0:C[H.Week],week:je},S&&N.createElement(n.WeekNumber,{week:je,style:C==null?void 0:C[H.WeekNumber],"aria-label":rn(je.weekNumber,{locale:i}),className:s[H.WeekNumber],scope:"row",role:"rowheader"},F(je.weekNumber,a)),je.days.map(xe=>{const{date:He}=xe,ae=J(xe);if(ae[me.focused]=!ae.hidden&&!!(X!=null&&X.isEqualTo(xe)),ae[$e.selected]=(R==null?void 0:R(He))||ae.selected,wa(U)){const{from:Kr,to:qr}=U;ae[$e.range_start]=!!(Kr&&qr&&a.isSameDay(He,Kr)),ae[$e.range_end]=!!(Kr&&qr&&a.isSameDay(He,qr)),ae[$e.range_middle]=rt(U,He,!0,a)}const mm=kx(ae,C,t.modifiersStyles),pm=Vb(ae,s,t.modifiersClassNames),hm=!Ha&&!ae.hidden?re(He,ae,a.options,a):void 0;return N.createElement(n.Day,{key:`${a.format(He,"yyyy-MM-dd")}_${a.format(xe.displayMonth,"yyyy-MM")}`,day:xe,modifiers:ae,className:pm.join(" "),style:mm,role:"gridcell","aria-selected":ae.selected||void 0,"aria-label":hm,"data-day":a.format(He,"yyyy-MM-dd"),"data-month":xe.outside?a.format(He,"yyyy-MM"):void 0,"data-selected":ae.selected||void 0,"data-disabled":ae.disabled||void 0,"data-hidden":ae.hidden||void 0,"data-outside":xe.outside||void 0,"data-focused":ae.focused||void 0,"data-today":ae.today||void 0},!ae.hidden&&Ha?N.createElement(n.DayButton,{className:s[H.DayButton],style:C==null?void 0:C[H.DayButton],type:"button",day:xe,modifiers:ae,disabled:ae.disabled||void 0,tabIndex:T(xe)?0:-1,"aria-label":te(He,ae,a.options,a),onClick:tm(xe,ae),onBlur:rm(xe,ae),onFocus:nm(xe,ae),onKeyDown:om(xe,ae),onMouseEnter:am(xe,ae),onMouseLeave:sm(xe,ae)},E(He,a.options,a)):!ae.hidden&&E(xe.date,a.options,a))}))))))})),t.footer&&N.createElement(n.Footer,{className:s[H.Footer],style:C==null?void 0:C[H.Footer],role:"status","aria-live":"polite"},t.footer)))}function kl(e,t,n){if(!t&&!n)throw new Error(`${e} must have either a label prop or an aria-label attribute`);if(t&&n)throw new Error(`${e} must have either a label prop or an aria-label attribute, but not both`)}const pw=()=>Array.from({length:12},(e,t)=>new Date(0,t).toLocaleString("en-US",{month:"long"})),hw=e=>{const{onSelect:t}=e,n=N.useRef(null);return N.useEffect(()=>{n.current&&n.current.focus()},[]),f.jsx("div",{className:`-mx-1 -my-1 grid max-h-72 min-w-80 grid-cols-1 gap-1 px-1 py-1 md:grid-cols-2
|
|
162
|
+
lg:grid-cols-3`,children:pw().map((r,o)=>f.jsx(Ie,{ref:o===0?n:void 0,className:k(`relative min-h-10 w-full text-center text-sm font-normal focus-within:relative
|
|
163
|
+
focus-within:z-20 focus:opacity-100 focus:ring-2 focus:ring-offset-0`),size:"sm",variant:"ghost",onClick:()=>{t==null||t(o)},children:r},r))})},gw=(e,t)=>{const n=new Date().getFullYear(),r=e?e.getFullYear():n-23,o=t?t.getFullYear():n,a=[];for(let i=o;i>=r;i--)a.push(i);return a},vw=e=>{const{onSelect:t,startMonth:n,endMonth:r}=e,o=N.useRef(null);return N.useEffect(()=>{o.current&&o.current.focus()},[]),f.jsx("div",{className:`-mx-1 -my-1 grid max-h-72 min-w-80 gap-1 overflow-y-auto px-1 py-1 md:grid-cols-3
|
|
164
|
+
lg:grid-cols-4`,children:gw(n,r).map((a,i)=>f.jsx(Ie,{ref:i===0?o:void 0,className:k(`relative min-h-10 w-full text-center text-sm font-normal focus-within:relative
|
|
165
|
+
focus-within:z-20 focus:opacity-100 focus:ring-2 focus:ring-offset-0`),size:"sm",variant:"ghost",onClick:()=>{t==null||t(a)},children:a},a))})};function Ca({className:e,classNames:t,showOutsideDays:n=!0,...r}){const[o,a]=N.useState("default"),[i,s]=N.useState(void 0),c=N.useRef(null),u=N.useRef(null),d="h-7 md:h-9",m="w-7 px-0 py-0 focus:ring-2 focus:ring-offset-0 md:w-9",p="w-9 md:w-10 lg:w-11 px-0",h="h-9 md:h-10 lg:h-11 py-0",y=w=>{if(o==="month"||o==="year")return f.jsx(f.Fragment,{});const{orientation:S}=w;return S==="left"?f.jsx(Wp,{...w}):f.jsx(Xo,{...w})},g=w=>{const{calendarMonth:S}=w;return f.jsxs("div",{className:k(d,"relative mx-12 flex items-center justify-center text-sm font-medium"),children:[f.jsx(Ie,{ref:c,"aria-label":"Select calendar month",className:"px-1.5 focus:ring-2 focus:ring-offset-0",size:"sm",variant:"ghost",onClick:()=>{if(o==="month"){a("default"),setTimeout(()=>{var C;(C=c.current)==null||C.focus()},0);return}a("month")},children:S.date.toLocaleString("default",{month:"long"})}),f.jsx(Ie,{ref:u,"aria-label":"Select calendar year",className:"px-1.5 focus:ring-2 focus:ring-offset-0",size:"sm",variant:"ghost",onClick:()=>{if(o==="year"){a("default"),setTimeout(()=>{var C;(C=u.current)==null||C.focus()},0);return}a("year")},children:S.date.getFullYear()})]})},v=()=>o==="month"?f.jsx(hw,{onSelect:w=>{const S=i?new Date(i):new Date;S.setMonth(w),s(S),a("default"),setTimeout(()=>{var C;(C=c.current)==null||C.focus()},0)}}):o==="year"?f.jsx(vw,{endMonth:r.endMonth,startMonth:r.startMonth,onSelect:w=>{const S=i?new Date(i):new Date;S.setFullYear(w),s(S),a("default"),setTimeout(()=>{var C;(C=u.current)==null||C.focus()},0)}}):f.jsx(f.Fragment,{}),b=()=>o==="default"?{Chevron:y,MonthCaption:g}:{Chevron:y,MonthCaption:g,MonthGrid:v},x=r.defaultMonth??i??(r.mode==="single"?r.selected:new Date)??new Date;return f.jsx(mw,{className:k("min-w-80 px-3 py-3",e),classNames:{months:"flex flex-col gap-4 sm:flex-row",month:"w-full space-y-4",month_caption:k(d,"relative flex items-center justify-center text-sm font-medium"),nav:"absolute left-4 right-4 flex items-center justify-between",button_previous:k(at({variant:"ghost"}),d,m),button_next:k(at({variant:"ghost"}),d,m),month_grid:"w-full border-collapse space-y-1",weekdays:"mb-1 flex",weekday:k(p,"rounded-l-full rounded-r-full text-sm font-normal text-muted-foreground"),week:"mt-1 flex w-full",day:k(p,h),day_button:k(at({variant:"ghost"}),p,h,`relative rounded-l-full rounded-r-full text-center text-sm font-normal
|
|
164
166
|
focus-within:relative focus-within:z-20 focus:opacity-100 focus:ring-2
|
|
165
|
-
focus:ring-offset-0`),range_start:"rounded-l-full aria-selected:bg-accent [&>button]:bg-primary [&>button]:text-primary-foreground",range_end:"rounded-r-full aria-selected:bg-accent [&>button]:bg-primary [&>button]:text-primary-foreground",selected:(r==null?void 0:r.mode)!=="range"?"[&>button]:bg-primary [&>button]:text-primary-foreground":"",today:"[&>button]:rounded-l-full [&>button]:rounded-r-full [&>button]:bg-accent [&>button]:text-accent-foreground",outside:"day-outside text-muted-foreground opacity-50",disabled:"text-muted-foreground opacity-50",range_middle:"first:rounded-l-md last:rounded-r-md aria-selected:bg-accent aria-selected:text-accent-foreground",hidden:"invisible",...t},components:b(),defaultMonth:x,month:i,showOutsideDays:n,onMonthChange:s,...r,disableNavigation:o!=="default"})}var cw="Label",Rl=l.forwardRef((e,t)=>f.jsx(V.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Rl.displayName=cw;var Pl=Rl;const tn=l.forwardRef(({className:e,...t},n)=>f.jsx(Pl,{ref:n,className:k(le.text.label,e),...t}));tn.displayName=Pl.displayName;function Or(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Dr="Checkbox",[lw,_E]=ve(Dr),[uw,dw]=lw(Dr),kl=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:c="on",onCheckedChange:u,form:d,...m}=e,[p,h]=l.useState(null),y=U(t,S=>h(S)),g=l.useRef(!1),v=p?d||!!p.closest("form"):!0,[b,x]=Ce({prop:o,defaultProp:a??!1,onChange:u,caller:Dr}),w=l.useRef(b);return l.useEffect(()=>{const S=p==null?void 0:p.form;if(S){const C=()=>x(w.current);return S.addEventListener("reset",C),()=>S.removeEventListener("reset",C)}},[p,x]),f.jsxs(uw,{scope:n,state:b,disabled:s,children:[f.jsx(V.button,{type:"button",role:"checkbox","aria-checked":mt(b)?"mixed":b,"aria-required":i,"data-state":Al(b),"data-disabled":s?"":void 0,disabled:s,value:c,...m,ref:y,onKeyDown:O(e.onKeyDown,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:O(e.onClick,S=>{x(C=>mt(C)?!0:!C),v&&(g.current=S.isPropagationStopped(),g.current||S.stopPropagation())})}),v&&f.jsx(Il,{control:p,bubbles:!g.current,name:r,value:c,checked:b,required:i,disabled:s,form:d,style:{transform:"translateX(-100%)"},defaultChecked:mt(a)?!1:a})]})});kl.displayName=Dr;var Ol="CheckboxIndicator",Dl=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=dw(Ol,n);return f.jsx(Ie,{present:r||mt(a.state)||a.state===!0,children:f.jsx(V.span,{"data-state":Al(a.state),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Dl.displayName=Ol;var fw="CheckboxBubbleInput",Il=l.forwardRef(({__scopeCheckbox:e,control:t,checked:n,bubbles:r=!0,defaultChecked:o,...a},i)=>{const s=l.useRef(null),c=U(s,i),u=Or(n),d=In(t);l.useEffect(()=>{const p=s.current;if(!p)return;const h=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(h,"checked").set;if(u!==n&&g){const v=new Event("click",{bubbles:r});p.indeterminate=mt(n),g.call(p,mt(n)?!1:n),p.dispatchEvent(v)}},[u,n,r]);const m=l.useRef(mt(n)?!1:n);return f.jsx(V.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??m.current,...a,tabIndex:-1,ref:c,style:{...a.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Il.displayName=fw;function mt(e){return e==="indeterminate"}function Al(e){return mt(e)?"indeterminate":e?"checked":"unchecked"}var Tl=kl,mw=Dl;const wa=l.forwardRef(({className:e,label:t,id:n,"aria-label":r,isChecked:o=!1,isDisabled:a=!1,...i},s)=>{const c=Xe({isDisabled:a});if(!t&&!r)throw new Error("Checkbox must have either a label prop or an aria-label attribute");if(t&&r)throw new Error("Checkbox must have either a label prop or an aria-label attribute, but not both");return f.jsxs("div",{className:"flex items-center space-x-2",children:[f.jsx(Tl,{ref:s,"aria-label":r,checked:o,className:k(le.focusRingVisible,le.focusRingVisibleSm,`peer h-5 w-5 shrink-0 rounded-sm border-2 border-gray-500 ring-offset-background
|
|
166
|
-
disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary-400
|
|
167
|
-
data-[state=checked]:bg-primary-400 data-[state=checked]:text-white`,e),id:n,...i,...c,children:f.jsx(mw,{className:k("flex items-center justify-center text-current"),children:f.jsx(Kt,{className:"h-4 w-4",strokeWidth:3})})}),t?typeof t=="string"?f.jsx(tn,{htmlFor:n,children:t}):t:null]})});wa.displayName=Tl.displayName;const _l=l.forwardRef(({options:e,value:t,onChange:n,className:r,columns:o=2,...a},i)=>f.jsx("div",{ref:i,className:k("",r),...a,children:f.jsx("div",{className:k("grid gap-3",o===1&&"grid-cols-1",o===2&&"grid-cols-2",o===3&&"grid-cols-3",o===4&&"grid-cols-4"),children:e.map(s=>f.jsx("div",{className:"flex items-center space-x-2",children:f.jsx(wa,{id:s.id,isChecked:t.includes(s.id),label:s.label,onCheckedChange:c=>{n(c?[...t,s.id]:t.filter(u=>u!==s.id))}})},s.id))})}));_l.displayName="CheckboxGroup";const jl=E.forwardRef(({options:e,value:t,onChange:n,placeholder:r="Select an item...",searchPlaceholder:o="Search items...",emptyMessage:a="No items found",className:i,listClassName:s,zIndex:c,isDisabled:u=!1,...d},m)=>{var g;const[p,h]=E.useState(!1),y=Ve("dropdown",c);return f.jsxs(Qt,{open:p,onOpenChange:h,children:[f.jsx(Jt,{asChild:!0,children:f.jsxs(Oe,{ref:m,"aria-expanded":p,className:k("w-full justify-between px-3",!t&&"text-muted-foreground",i),isDisabled:u,role:"combobox",variant:"input",...d,children:[t?(g=e.find(v=>v.value===t))==null?void 0:g.label:r,f.jsx(qo,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),f.jsx(Ot,{align:"start",className:"w-[--radix-popover-trigger-width] px-0 py-0",zIndex:y,children:f.jsxs(br,{children:[f.jsx(wr,{placeholder:o}),f.jsxs(Sr,{className:k("max-h-[16.5rem] overflow-y-auto",s),children:[f.jsx(oa,{children:a}),f.jsx(xr,{children:e.map(v=>f.jsxs(Cr,{value:v.value,onSelect:b=>{n(b===t?"":b),h(!1)},children:[f.jsx(Kt,{className:k("mr-2 h-4 w-4",t===v.value?"opacity-100":"opacity-0")}),v.label]},v.value))})]})]})})]})});jl.displayName="Combobox";const Fl=E.forwardRef(({value:e,startMonth:t,endMonth:n,onChange:r,placeholder:o="Pick a date",className:a,zIndex:i,isDisabled:s=!1,...c},u)=>{const[d,m]=E.useState(!1),p=Ve("popover",i),h=y=>{r(y),m(!1)};return f.jsxs(Qt,{open:d,onOpenChange:m,children:[f.jsx(Jt,{asChild:!0,children:f.jsxs(Oe,{ref:u,className:k("w-full justify-start px-3 text-left font-normal",!e&&"text-muted-foreground",a),isDisabled:s,variant:"input",...c,"data-component":"date-picker",children:[f.jsx(pi,{className:"mr-2 h-4 w-4"}),e?hn(e,"LLLL dd, y"):f.jsx("span",{children:o})]})}),f.jsx(Ot,{align:"start",className:"w-auto px-0 py-0",zIndex:p,children:f.jsx(xa,{autoFocus:!0,endMonth:n,mode:"single",selected:e,startMonth:t,onSelect:h})})]})});Fl.displayName="DatePicker";const $l=l.forwardRef(({value:e,onChange:t,placeholder:n={from:"Pick start date",to:"Pick end date"},className:r,zIndex:o,isDisabled:a=!1,...i},s)=>{const c=Ve("popover",o),u=d=>{const{from:m,to:p}=e;if(!m)return t({from:d,to:void 0});if(d<m)return t({from:d,to:void 0});if(m&&p)return t({from:d,to:void 0});if(d>m)return t({from:m,to:d});if(d.getTime()===m.getTime())return t({from:void 0,to:void 0})};return f.jsx("div",{className:k("grid gap-2",r),children:f.jsxs(Qt,{children:[f.jsx(Jt,{asChild:!0,children:f.jsxs(Oe,{ref:s,className:k("w-full justify-start px-3 text-left font-normal",!e.from&&!e.to&&"text-muted-foreground"),id:"date",isDisabled:a,variant:"input",...i,"data-component":"date-range-picker",children:[f.jsx(pi,{className:"mr-2 h-4 w-4"}),e.from?e.to?f.jsxs(f.Fragment,{children:[hn(e.from,"LLLL dd, y")," - ",hn(e.to,"LLLL dd, y")]}):hn(e.from,"LLLL dd, y"):f.jsx("span",{children:n.from})]})}),f.jsx(Ot,{align:"start",className:"w-auto px-0 py-0",zIndex:c,children:f.jsx(xa,{autoFocus:!0,defaultMonth:e.from,mode:"range",modifiers:{today:()=>!1},numberOfMonths:2,selected:{from:e.from,to:e.to},showOutsideDays:!1,onDayClick:u,onSelect:d=>{d&&t(d)}})})]})})});$l.displayName="DateRangePicker";const Ll=l.forwardRef(({className:e,...t},n)=>f.jsx(Zi,{ref:n,className:k(le.text.hint,e),...t}));Ll.displayName=Zi.displayName;const Wl=({className:e,...t})=>f.jsx("div",{className:k("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Wl.displayName="DialogFooter";const Bl=({className:e,...t})=>f.jsx("div",{className:k("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Bl.displayName="DialogHeader";const Vl=l.forwardRef(({className:e,...t},n)=>f.jsx(Xi,{ref:n,className:k(le.text.title,"leading-none tracking-tight",e),...t}));Vl.displayName=Xi.displayName;var mo="rovingFocusGroup.onEntryFocus",pw={bubbles:!1,cancelable:!0},Fn="RovingFocusGroup",[Ro,Yl,hw]=Nn(Fn),[gw,Hl]=ve(Fn,[hw]),[vw,yw]=gw(Fn),Gl=l.forwardRef((e,t)=>f.jsx(Ro.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx(Ro.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(bw,{...e,ref:t})})}));Gl.displayName=Fn;var bw=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...m}=e,p=l.useRef(null),h=U(t,p),y=bt(a),[g,v]=Ce({prop:i,defaultProp:s??null,onChange:c,caller:Fn}),[b,x]=l.useState(!1),w=Se(u),S=Yl(n),C=l.useRef(!1),[M,N]=l.useState(0);return l.useEffect(()=>{const P=p.current;if(P)return P.addEventListener(mo,w),()=>P.removeEventListener(mo,w)},[w]),f.jsx(vw,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:l.useCallback(P=>v(P),[v]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>N(P=>P+1),[]),onFocusableItemRemove:l.useCallback(()=>N(P=>P-1),[]),children:f.jsx(V.div,{tabIndex:b||M===0?-1:0,"data-orientation":r,...m,ref:h,style:{outline:"none",...e.style},onMouseDown:O(e.onMouseDown,()=>{C.current=!0}),onFocus:O(e.onFocus,P=>{const F=!C.current;if(P.target===P.currentTarget&&F&&!b){const _=new CustomEvent(mo,pw);if(P.currentTarget.dispatchEvent(_),!_.defaultPrevented){const $=S().filter(j=>j.focusable),I=$.find(j=>j.active),B=$.find(j=>j.id===g),q=[I,B,...$].filter(Boolean).map(j=>j.ref.current);Kl(q,d)}}C.current=!1}),onBlur:O(e.onBlur,()=>x(!1))})})}),zl="RovingFocusGroupItem",Ul=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,c=pe(),u=a||c,d=yw(zl,n),m=d.currentTabStopId===u,p=Yl(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:g}=d;return l.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),f.jsx(Ro.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:f.jsx(V.span,{tabIndex:m?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:O(e.onMouseDown,v=>{r?d.onItemFocus(u):v.preventDefault()}),onFocus:O(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:O(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=Cw(v,d.orientation,d.dir);if(b!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let w=p().filter(S=>S.focusable).map(S=>S.ref.current);if(b==="last")w.reverse();else if(b==="prev"||b==="next"){b==="prev"&&w.reverse();const S=w.indexOf(v.currentTarget);w=d.loop?Sw(w,S+1):w.slice(S+1)}setTimeout(()=>Kl(w))}}),children:typeof i=="function"?i({isCurrentTabStop:m,hasTabStop:g!=null}):i})})});Ul.displayName=zl;var xw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ww(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Cw(e,t,n){const r=ww(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return xw[r]}function Kl(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Sw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ew=Gl,Nw=Ul,Po=["Enter"," "],Mw=["ArrowDown","PageUp","Home"],ql=["ArrowUp","PageDown","End"],Rw=[...Mw,...ql],Pw={ltr:[...Po,"ArrowRight"],rtl:[...Po,"ArrowLeft"]},kw={ltr:["ArrowLeft"],rtl:["ArrowRight"]},$n="Menu",[wn,Ow,Dw]=Nn($n),[Dt,Xl]=ve($n,[Dw,Zt,Hl]),Ir=Zt(),Zl=Hl(),[Iw,It]=Dt($n),[Aw,Ln]=Dt($n),Ql=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,s=Ir(t),[c,u]=l.useState(null),d=l.useRef(!1),m=Se(a),p=bt(o);return l.useEffect(()=>{const h=()=>{d.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>d.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),f.jsx(pa,{...s,children:f.jsx(Iw,{scope:t,open:n,onOpenChange:m,content:c,onContentChange:u,children:f.jsx(Aw,{scope:t,onClose:l.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:d,dir:p,modal:i,children:r})})})};Ql.displayName=$n;var Tw="MenuAnchor",Ca=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ir(n);return f.jsx(Rr,{...o,...r,ref:t})});Ca.displayName=Tw;var Sa="MenuPortal",[_w,Jl]=Dt(Sa,{forceMount:void 0}),eu=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=It(Sa,t);return f.jsx(_w,{scope:t,forceMount:n,children:f.jsx(Ie,{present:n||a.open,children:f.jsx(Pn,{asChild:!0,container:o,children:r})})})};eu.displayName=Sa;var ke="MenuContent",[jw,Ea]=Dt(ke),tu=l.forwardRef((e,t)=>{const n=Jl(ke,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=It(ke,e.__scopeMenu),i=Ln(ke,e.__scopeMenu);return f.jsx(wn.Provider,{scope:e.__scopeMenu,children:f.jsx(Ie,{present:r||a.open,children:f.jsx(wn.Slot,{scope:e.__scopeMenu,children:i.modal?f.jsx(Fw,{...o,ref:t}):f.jsx($w,{...o,ref:t})})})})}),Fw=l.forwardRef((e,t)=>{const n=It(ke,e.__scopeMenu),r=l.useRef(null),o=U(t,r);return l.useEffect(()=>{const a=r.current;if(a)return gr(a)},[]),f.jsx(Na,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:O(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),$w=l.forwardRef((e,t)=>{const n=It(ke,e.__scopeMenu);return f.jsx(Na,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Lw=pt("MenuContent.ScrollLock"),Na=l.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:m,onInteractOutside:p,onDismiss:h,disableOutsideScroll:y,...g}=e,v=It(ke,n),b=Ln(ke,n),x=Ir(n),w=Zl(n),S=Ow(n),[C,M]=l.useState(null),N=l.useRef(null),P=U(t,N,v.onContentChange),F=l.useRef(0),_=l.useRef(""),$=l.useRef(0),I=l.useRef(null),B=l.useRef("right"),Y=l.useRef(0),q=y?kn:l.Fragment,j=y?{as:Lw,allowPinchZoom:!0}:void 0,G=D=>{var A,Z;const Q=_.current+D,J=S().filter(K=>!K.disabled),R=document.activeElement,L=(A=J.find(K=>K.ref.current===R))==null?void 0:A.textValue,z=J.map(K=>K.textValue),W=Zw(z,Q,L),X=(Z=J.find(K=>K.textValue===W))==null?void 0:Z.ref.current;(function K(te){_.current=te,window.clearTimeout(F.current),te!==""&&(F.current=window.setTimeout(()=>K(""),1e3))})(Q),X&&setTimeout(()=>X.focus())};l.useEffect(()=>()=>window.clearTimeout(F.current),[]),pr();const T=l.useCallback(D=>{var J,R;return B.current===((J=I.current)==null?void 0:J.side)&&Jw(D,(R=I.current)==null?void 0:R.area)},[]);return f.jsx(jw,{scope:n,searchRef:_,onItemEnter:l.useCallback(D=>{T(D)&&D.preventDefault()},[T]),onItemLeave:l.useCallback(D=>{var Q;T(D)||((Q=N.current)==null||Q.focus(),M(null))},[T]),onTriggerLeave:l.useCallback(D=>{T(D)&&D.preventDefault()},[T]),pointerGraceTimerRef:$,onPointerGraceIntentChange:l.useCallback(D=>{I.current=D},[]),children:f.jsx(q,{...j,children:f.jsx(Rn,{asChild:!0,trapped:o,onMountAutoFocus:O(a,D=>{var Q;D.preventDefault(),(Q=N.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:f.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:m,onInteractOutside:p,onDismiss:h,children:f.jsx(Ew,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:M,onEntryFocus:O(c,D=>{b.isUsingKeyboardRef.current||D.preventDefault()}),preventScrollOnEntryFocus:!0,children:f.jsx(ha,{role:"menu","aria-orientation":"vertical","data-state":vu(v.open),"data-radix-menu-content":"",dir:b.dir,...x,...g,ref:P,style:{outline:"none",...g.style},onKeyDown:O(g.onKeyDown,D=>{const J=D.target.closest("[data-radix-menu-content]")===D.currentTarget,R=D.ctrlKey||D.altKey||D.metaKey,L=D.key.length===1;J&&(D.key==="Tab"&&D.preventDefault(),!R&&L&&G(D.key));const z=N.current;if(D.target!==z||!Rw.includes(D.key))return;D.preventDefault();const X=S().filter(A=>!A.disabled).map(A=>A.ref.current);ql.includes(D.key)&&X.reverse(),qw(X)}),onBlur:O(e.onBlur,D=>{D.currentTarget.contains(D.target)||(window.clearTimeout(F.current),_.current="")}),onPointerMove:O(e.onPointerMove,Cn(D=>{const Q=D.target,J=Y.current!==D.clientX;if(D.currentTarget.contains(Q)&&J){const R=D.clientX>Y.current?"right":"left";B.current=R,Y.current=D.clientX}}))})})})})})})});tu.displayName=ke;var Ww="MenuGroup",Ma=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return f.jsx(V.div,{role:"group",...r,ref:t})});Ma.displayName=Ww;var Bw="MenuLabel",nu=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return f.jsx(V.div,{...r,ref:t})});nu.displayName=Bw;var ir="MenuItem",js="menu.itemSelect",Ar=l.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=l.useRef(null),i=Ln(ir,e.__scopeMenu),s=Ea(ir,e.__scopeMenu),c=U(t,a),u=l.useRef(!1),d=()=>{const m=a.current;if(!n&&m){const p=new CustomEvent(js,{bubbles:!0,cancelable:!0});m.addEventListener(js,h=>r==null?void 0:r(h),{once:!0}),qs(m,p),p.defaultPrevented?u.current=!1:i.onClose()}};return f.jsx(ru,{...o,ref:c,disabled:n,onClick:O(e.onClick,d),onPointerDown:m=>{var p;(p=e.onPointerDown)==null||p.call(e,m),u.current=!0},onPointerUp:O(e.onPointerUp,m=>{var p;u.current||(p=m.currentTarget)==null||p.click()}),onKeyDown:O(e.onKeyDown,m=>{const p=s.searchRef.current!=="";n||p&&m.key===" "||Po.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});Ar.displayName=ir;var ru=l.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=Ea(ir,n),s=Zl(n),c=l.useRef(null),u=U(t,c),[d,m]=l.useState(!1),[p,h]=l.useState("");return l.useEffect(()=>{const y=c.current;y&&h((y.textContent??"").trim())},[a.children]),f.jsx(wn.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:f.jsx(Nw,{asChild:!0,...s,focusable:!r,children:f.jsx(V.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:O(e.onPointerMove,Cn(y=>{r?i.onItemLeave(y):(i.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:O(e.onPointerLeave,Cn(y=>i.onItemLeave(y))),onFocus:O(e.onFocus,()=>m(!0)),onBlur:O(e.onBlur,()=>m(!1))})})})}),Vw="MenuCheckboxItem",ou=l.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return f.jsx(lu,{scope:e.__scopeMenu,checked:n,children:f.jsx(Ar,{role:"menuitemcheckbox","aria-checked":cr(n)?"mixed":n,...o,ref:t,"data-state":Pa(n),onSelect:O(o.onSelect,()=>r==null?void 0:r(cr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});ou.displayName=Vw;var au="MenuRadioGroup",[Yw,Hw]=Dt(au,{value:void 0,onValueChange:()=>{}}),su=l.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Se(r);return f.jsx(Yw,{scope:e.__scopeMenu,value:n,onValueChange:a,children:f.jsx(Ma,{...o,ref:t})})});su.displayName=au;var iu="MenuRadioItem",cu=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=Hw(iu,e.__scopeMenu),a=n===o.value;return f.jsx(lu,{scope:e.__scopeMenu,checked:a,children:f.jsx(Ar,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Pa(a),onSelect:O(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});cu.displayName=iu;var Ra="MenuItemIndicator",[lu,Gw]=Dt(Ra,{checked:!1}),uu=l.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=Gw(Ra,n);return f.jsx(Ie,{present:r||cr(a.checked)||a.checked===!0,children:f.jsx(V.span,{...o,ref:t,"data-state":Pa(a.checked)})})});uu.displayName=Ra;var zw="MenuSeparator",du=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return f.jsx(V.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});du.displayName=zw;var Uw="MenuArrow",fu=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ir(n);return f.jsx(ga,{...o,...r,ref:t})});fu.displayName=Uw;var Kw="MenuSub",[jE,mu]=Dt(Kw),fn="MenuSubTrigger",pu=l.forwardRef((e,t)=>{const n=It(fn,e.__scopeMenu),r=Ln(fn,e.__scopeMenu),o=mu(fn,e.__scopeMenu),a=Ea(fn,e.__scopeMenu),i=l.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},d=l.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return l.useEffect(()=>d,[d]),l.useEffect(()=>{const m=s.current;return()=>{window.clearTimeout(m),c(null)}},[s,c]),f.jsx(Ca,{asChild:!0,...u,children:f.jsx(ru,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":vu(n.open),...e,ref:Ke(t,o.onTriggerChange),onClick:m=>{var p;(p=e.onClick)==null||p.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:O(e.onPointerMove,Cn(m=>{a.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:O(e.onPointerLeave,Cn(m=>{var h,y;d();const p=(h=n.content)==null?void 0:h.getBoundingClientRect();if(p){const g=(y=n.content)==null?void 0:y.dataset.side,v=g==="right",b=v?-5:5,x=p[v?"left":"right"],w=p[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:m.clientX+b,y:m.clientY},{x,y:p.top},{x:w,y:p.top},{x:w,y:p.bottom},{x,y:p.bottom}],side:g}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(m),m.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:O(e.onKeyDown,m=>{var h;const p=a.searchRef.current!=="";e.disabled||p&&m.key===" "||Pw[r.dir].includes(m.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),m.preventDefault())})})})});pu.displayName=fn;var hu="MenuSubContent",gu=l.forwardRef((e,t)=>{const n=Jl(ke,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=It(ke,e.__scopeMenu),i=Ln(ke,e.__scopeMenu),s=mu(hu,e.__scopeMenu),c=l.useRef(null),u=U(t,c);return f.jsx(wn.Provider,{scope:e.__scopeMenu,children:f.jsx(Ie,{present:r||a.open,children:f.jsx(wn.Slot,{scope:e.__scopeMenu,children:f.jsx(Na,{id:s.contentId,"aria-labelledby":s.triggerId,...o,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var m;i.isUsingKeyboardRef.current&&((m=c.current)==null||m.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:O(e.onFocusOutside,d=>{d.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:O(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:O(e.onKeyDown,d=>{var h;const m=d.currentTarget.contains(d.target),p=kw[i.dir].includes(d.key);m&&p&&(a.onOpenChange(!1),(h=s.trigger)==null||h.focus(),d.preventDefault())})})})})})});gu.displayName=hu;function vu(e){return e?"open":"closed"}function cr(e){return e==="indeterminate"}function Pa(e){return cr(e)?"indeterminate":e?"checked":"unchecked"}function qw(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Xw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Zw(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let i=Xw(e,Math.max(a,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function Qw(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const s=t[a],c=t[i],u=s.x,d=s.y,m=c.x,p=c.y;d>r!=p>r&&n<(m-u)*(r-d)/(p-d)+u&&(o=!o)}return o}function Jw(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Qw(n,t)}function Cn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var eC=Ql,tC=Ca,nC=eu,rC=tu,oC=Ma,aC=nu,sC=Ar,iC=ou,cC=su,lC=cu,uC=uu,dC=du,fC=fu,mC=pu,pC=gu,Tr="DropdownMenu",[hC,FE]=ve(Tr,[Xl]),Ee=Xl(),[gC,yu]=hC(Tr),bu=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,c=Ee(t),u=l.useRef(null),[d,m]=Ce({prop:o,defaultProp:a??!1,onChange:i,caller:Tr});return f.jsx(gC,{scope:t,triggerId:pe(),triggerRef:u,contentId:pe(),open:d,onOpenChange:m,onOpenToggle:l.useCallback(()=>m(p=>!p),[m]),modal:s,children:f.jsx(eC,{...c,open:d,onOpenChange:m,dir:r,modal:s,children:n})})};bu.displayName=Tr;var xu="DropdownMenuTrigger",wu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=yu(xu,n),i=Ee(n);return f.jsx(tC,{asChild:!0,...i,children:f.jsx(V.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Ke(t,a.triggerRef),onPointerDown:O(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:O(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});wu.displayName=xu;var vC="DropdownMenuPortal",Cu=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ee(t);return f.jsx(nC,{...r,...n})};Cu.displayName=vC;var Su="DropdownMenuContent",Eu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=yu(Su,n),a=Ee(n),i=l.useRef(!1);return f.jsx(rC,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:O(e.onCloseAutoFocus,s=>{var c;i.current||(c=o.triggerRef.current)==null||c.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:O(e.onInteractOutside,s=>{const c=s.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!o.modal||d)&&(i.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)"}})});Eu.displayName=Su;var yC="DropdownMenuGroup",bC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(oC,{...o,...r,ref:t})});bC.displayName=yC;var xC="DropdownMenuLabel",wC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(aC,{...o,...r,ref:t})});wC.displayName=xC;var CC="DropdownMenuItem",Nu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(sC,{...o,...r,ref:t})});Nu.displayName=CC;var SC="DropdownMenuCheckboxItem",EC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(iC,{...o,...r,ref:t})});EC.displayName=SC;var NC="DropdownMenuRadioGroup",MC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(cC,{...o,...r,ref:t})});MC.displayName=NC;var RC="DropdownMenuRadioItem",PC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(lC,{...o,...r,ref:t})});PC.displayName=RC;var kC="DropdownMenuItemIndicator",OC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(uC,{...o,...r,ref:t})});OC.displayName=kC;var DC="DropdownMenuSeparator",Mu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(dC,{...o,...r,ref:t})});Mu.displayName=DC;var IC="DropdownMenuArrow",AC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(fC,{...o,...r,ref:t})});AC.displayName=IC;var TC="DropdownMenuSubTrigger",_C=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(mC,{...o,...r,ref:t})});_C.displayName=TC;var jC="DropdownMenuSubContent",FC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(pC,{...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)"}})});FC.displayName=jC;var $C=bu,LC=wu,WC=Cu,BC=Eu,VC=Nu,YC=Mu;const Ru=l.forwardRef(({className:e,children:t,items:n,align:r="start",variant:o="default",isDisabled:a=!1,...i},s)=>f.jsxs($C,{children:[f.jsx(LC,{asChild:!0,children:f.jsxs(Oe,{ref:s,className:k("flex items-center gap-1",e),isDisabled:a,variant:o,...i,children:[t,f.jsx(Uo,{className:"h-4 w-4"})]})}),f.jsx(WC,{children:f.jsx(BC,{align:r,className:`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover px-1 py-1
|
|
167
|
+
focus:ring-offset-0`),range_start:"rounded-l-full aria-selected:bg-accent [&>button]:bg-primary [&>button]:text-primary-foreground",range_end:"rounded-r-full aria-selected:bg-accent [&>button]:bg-primary [&>button]:text-primary-foreground",selected:(r==null?void 0:r.mode)!=="range"?"[&>button]:bg-primary [&>button]:text-primary-foreground":"",today:"[&>button]:rounded-l-full [&>button]:rounded-r-full [&>button]:bg-accent [&>button]:text-accent-foreground",outside:"day-outside text-muted-foreground opacity-50",disabled:"text-muted-foreground opacity-50",range_middle:"first:rounded-l-md last:rounded-r-md aria-selected:bg-accent aria-selected:text-accent-foreground",hidden:"invisible",...t},components:b(),defaultMonth:x,month:i,showOutsideDays:n,onMonthChange:s,...r,disableNavigation:o!=="default"})}function Ir(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Dr="Checkbox",[yw,XN]=ve(Dr),[bw,xw]=yw(Dr),Ol=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:c="on",onCheckedChange:u,form:d,...m}=e,[p,h]=l.useState(null),y=z(t,S=>h(S)),g=l.useRef(!1),v=p?d||!!p.closest("form"):!0,[b,x]=Ce({prop:o,defaultProp:a??!1,onChange:u,caller:Dr}),w=l.useRef(b);return l.useEffect(()=>{const S=p==null?void 0:p.form;if(S){const C=()=>x(w.current);return S.addEventListener("reset",C),()=>S.removeEventListener("reset",C)}},[p,x]),f.jsxs(bw,{scope:n,state:b,disabled:s,children:[f.jsx(V.button,{type:"button",role:"checkbox","aria-checked":pt(b)?"mixed":b,"aria-required":i,"data-state":Al(b),"data-disabled":s?"":void 0,disabled:s,value:c,...m,ref:y,onKeyDown:O(e.onKeyDown,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:O(e.onClick,S=>{x(C=>pt(C)?!0:!C),v&&(g.current=S.isPropagationStopped(),g.current||S.stopPropagation())})}),v&&f.jsx(Tl,{control:p,bubbles:!g.current,name:r,value:c,checked:b,required:i,disabled:s,form:d,style:{transform:"translateX(-100%)"},defaultChecked:pt(a)?!1:a})]})});Ol.displayName=Dr;var Il="CheckboxIndicator",Dl=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=xw(Il,n);return f.jsx(Te,{present:r||pt(a.state)||a.state===!0,children:f.jsx(V.span,{"data-state":Al(a.state),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Dl.displayName=Il;var ww="CheckboxBubbleInput",Tl=l.forwardRef(({__scopeCheckbox:e,control:t,checked:n,bubbles:r=!0,defaultChecked:o,...a},i)=>{const s=l.useRef(null),c=z(s,i),u=Ir(n),d=Dn(t);l.useEffect(()=>{const p=s.current;if(!p)return;const h=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(h,"checked").set;if(u!==n&&g){const v=new Event("click",{bubbles:r});p.indeterminate=pt(n),g.call(p,pt(n)?!1:n),p.dispatchEvent(v)}},[u,n,r]);const m=l.useRef(pt(n)?!1:n);return f.jsx(V.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??m.current,...a,tabIndex:-1,ref:c,style:{...a.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Tl.displayName=ww;function pt(e){return e==="indeterminate"}function Al(e){return pt(e)?"indeterminate":e?"checked":"unchecked"}var Tr=Ol,Cw=Dl;const _l=l.forwardRef(({id:e,label:t,description:n,isChecked:r,isDisabled:o,className:a,"aria-label":i,...s},c)=>{const u=De({isDisabled:o}),{ariaProps:d,labelId:m,descriptionId:p}=En({label:t,description:n,"aria-label":i}),h=()=>t?typeof t=="string"?f.jsx("span",{className:"font-medium",id:m,children:t}):f.jsx("span",{id:m,children:t}):null;return f.jsxs("div",{className:k("relative",r?k(ie.button,at({variant:"primary"})):k(ie.button,at({variant:"input"})),o&&"pointer-events-none cursor-not-allowed opacity-50",a),children:[f.jsx(Tr,{ref:c,checked:r,className:"absolute inset-0 opacity-0",id:e,...d,...s,...u}),f.jsxs("div",{className:"flex items-center gap-2",children:[h(),n?f.jsx("span",{className:"text-sm text-muted-foreground",id:p,children:n}):null]})]})});_l.displayName="CheckboxButton";var Sw="Label",jl=l.forwardRef((e,t)=>f.jsx(V.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));jl.displayName=Sw;var Fl=jl;const Fn=l.forwardRef(({className:e,...t},n)=>f.jsx(Fl,{ref:n,className:k(ie.text.label,e),...t}));Fn.displayName=Fl.displayName;const $l=({id:e,label:t})=>t?typeof t=="string"?f.jsx(Fn,{htmlFor:e,children:t}):t:null,Ll="peer h-5 w-5 shrink-0 rounded-sm border-2 border-gray-500 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary-400 data-[state=checked]:bg-primary-400 data-[state=checked]:text-white",Wl=l.forwardRef(({id:e,label:t,isChecked:n,isDisabled:r,className:o,"aria-label":a,...i},s)=>{const c=De({isDisabled:r});return f.jsxs("div",{className:k("flex items-center gap-2",r&&"cursor-not-allowed opacity-50 [&>*]:cursor-not-allowed"),children:[f.jsx(Tr,{ref:s,"aria-label":a,checked:n,className:k(ie.focusRingVisible,ie.focusRingVisibleSm,Ll,o),id:e,...i,...c,children:f.jsx(Cw,{className:k("flex items-center justify-center text-current"),children:f.jsx(Ot,{className:"h-4 w-4",strokeWidth:3})})}),f.jsx($l,{id:e,label:t})]})});Wl.displayName="CheckboxDefault";const Bl=l.forwardRef(({id:e,label:t,description:n,isChecked:r,isDisabled:o,className:a,"aria-label":i,...s},c)=>{const u=De({isDisabled:o}),{ariaProps:d,labelId:m,descriptionId:p}=En({label:t,description:n,"aria-label":i}),h=()=>t?typeof t=="string"?f.jsx("div",{className:"font-medium",id:m,children:t}):f.jsx("div",{id:m,children:t}):null;return f.jsxs("div",{className:k("relative rounded-lg border-2 border-muted bg-popover px-4 py-4",r&&"border-primary-400",o?"cursor-not-allowed opacity-50 [&_*]:cursor-not-allowed":"cursor-pointer hover:bg-accent hover:text-accent-foreground",a),children:[f.jsx(Tr,{ref:c,checked:r,className:"absolute inset-0 opacity-0",id:e,...d,...s,...u}),f.jsxs("div",{className:"flex items-start gap-3",children:[f.jsx("div",{className:k(Ll,"pointer-events-none mt-1",r&&"border-primary-400 bg-primary-400"),children:r?f.jsx("div",{className:"flex h-full w-full items-center justify-center",children:f.jsx(Ot,{className:"h-4 w-4 text-white",strokeWidth:3})}):null}),f.jsxs("div",{className:"pointer-events-none space-y-1",children:[h(),n?f.jsx("p",{className:"text-sm text-muted-foreground",id:p,children:n}):null]})]})]})});Bl.displayName="CheckboxTile";const Sa=l.forwardRef(({className:e,label:t,description:n,id:r,"aria-label":o,isChecked:a=!1,isDisabled:i=!1,variant:s="default",...c},u)=>{kl("Checkbox",t,o);let d=Wl;return s==="button"?d=_l:s==="tile"&&(d=Bl),f.jsx(d,{ref:u,"aria-label":o,className:e,description:n,id:r,isChecked:a,isDisabled:i,label:t,...c})});Sa.displayName=Tr.displayName;const Vl=l.forwardRef(({options:e,value:t,onChange:n,className:r,columns:o=2,orientation:a="vertical",variant:i="default",...s},c)=>{const u=Qo({variant:i,orientation:a,columns:o});return f.jsx("div",{ref:c,className:k(u,r),...s,children:e.map(d=>f.jsx(Sa,{description:d.description,id:d.id,isChecked:t.includes(d.id),label:d.label,variant:i,onCheckedChange:m=>{n(m?[...t,d.id]:t.filter(p=>p!==d.id))}},d.id))})});Vl.displayName="CheckboxGroup";const Yl=N.forwardRef(({options:e,value:t,onChange:n,placeholder:r="Select an item...",searchPlaceholder:o="Search items...",emptyMessage:a="No items found",className:i,listClassName:s,zIndex:c,isDisabled:u=!1,...d},m)=>{var g;const[p,h]=N.useState(!1),y=Ye("dropdown",c);return f.jsxs(Qt,{open:p,onOpenChange:h,children:[f.jsx(Jt,{asChild:!0,children:f.jsxs(Ie,{ref:m,"aria-expanded":p,className:k("w-full justify-between px-3",!t&&"text-muted-foreground",i),isDisabled:u,role:"combobox",variant:"input",...d,children:[t?(g=e.find(v=>v.value===t))==null?void 0:g.label:r,f.jsx(Zo,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),f.jsx(It,{align:"start",className:"w-[--radix-popover-trigger-width] px-0 py-0",zIndex:y,children:f.jsxs(xr,{children:[f.jsx(Cr,{placeholder:o}),f.jsxs(Nr,{className:k("max-h-[16.5rem] overflow-y-auto",s),children:[f.jsx(sa,{children:a}),f.jsx(wr,{children:e.map(v=>f.jsxs(Sr,{value:v.value,onSelect:b=>{n(b===t?"":b),h(!1)},children:[f.jsx(Ot,{className:k("mr-2 h-4 w-4",t===v.value?"opacity-100":"opacity-0")}),v.label]},v.value))})]})]})})]})});Yl.displayName="Combobox";const Hl=N.forwardRef(({value:e,startMonth:t,endMonth:n,onChange:r,placeholder:o="Pick a date",className:a,zIndex:i,isDisabled:s=!1,...c},u)=>{const[d,m]=N.useState(!1),p=Ye("popover",i),h=y=>{r(y),m(!1)};return f.jsxs(Qt,{open:d,onOpenChange:m,children:[f.jsx(Jt,{asChild:!0,children:f.jsxs(Ie,{ref:u,className:k("w-full justify-start px-3 text-left font-normal",!e&&"text-muted-foreground",a),isDisabled:s,variant:"input",...c,"data-component":"date-picker",children:[f.jsx(gi,{className:"mr-2 h-4 w-4"}),e?pn(e,"LLLL dd, y"):f.jsx("span",{children:o})]})}),f.jsx(It,{align:"start",className:"w-auto px-0 py-0",zIndex:p,children:f.jsx(Ca,{autoFocus:!0,endMonth:n,mode:"single",selected:e,startMonth:t,onSelect:h})})]})});Hl.displayName="DatePicker";const Gl=l.forwardRef(({value:e,onChange:t,placeholder:n={from:"Pick start date",to:"Pick end date"},className:r,zIndex:o,isDisabled:a=!1,...i},s)=>{const c=Ye("popover",o),u=d=>{const{from:m,to:p}=e;if(!m)return t({from:d,to:void 0});if(d<m)return t({from:d,to:void 0});if(m&&p)return t({from:d,to:void 0});if(d>m)return t({from:m,to:d});if(d.getTime()===m.getTime())return t({from:void 0,to:void 0})};return f.jsx("div",{className:k("grid gap-2",r),children:f.jsxs(Qt,{children:[f.jsx(Jt,{asChild:!0,children:f.jsxs(Ie,{ref:s,className:k("w-full justify-start px-3 text-left font-normal",!e.from&&!e.to&&"text-muted-foreground"),id:"date",isDisabled:a,variant:"input",...i,"data-component":"date-range-picker",children:[f.jsx(gi,{className:"mr-2 h-4 w-4"}),e.from?e.to?f.jsxs(f.Fragment,{children:[pn(e.from,"LLLL dd, y")," - ",pn(e.to,"LLLL dd, y")]}):pn(e.from,"LLLL dd, y"):f.jsx("span",{children:n.from})]})}),f.jsx(It,{align:"start",className:"w-auto px-0 py-0",zIndex:c,children:f.jsx(Ca,{autoFocus:!0,defaultMonth:e.from,mode:"range",modifiers:{today:()=>!1},numberOfMonths:2,selected:{from:e.from,to:e.to},showOutsideDays:!1,onDayClick:u,onSelect:d=>{d&&t(d)}})})]})})});Gl.displayName="DateRangePicker";const Ul=l.forwardRef(({className:e,...t},n)=>f.jsx(Ji,{ref:n,className:k(ie.text.hint,e),...t}));Ul.displayName=Ji.displayName;const zl=({className:e,...t})=>f.jsx("div",{className:k("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});zl.displayName="DialogFooter";const Kl=({className:e,...t})=>f.jsx("div",{className:k("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Kl.displayName="DialogHeader";const ql=l.forwardRef(({className:e,...t},n)=>f.jsx(Qi,{ref:n,className:k(ie.text.title,"leading-none tracking-tight",e),...t}));ql.displayName=Qi.displayName;var ho="rovingFocusGroup.onEntryFocus",Nw={bubbles:!1,cancelable:!0},$n="RovingFocusGroup",[ko,Xl,Ew]=Nn($n),[Mw,Zl]=ve($n,[Ew]),[Rw,Pw]=Mw($n),Ql=l.forwardRef((e,t)=>f.jsx(ko.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx(ko.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(kw,{...e,ref:t})})}));Ql.displayName=$n;var kw=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...m}=e,p=l.useRef(null),h=z(t,p),y=xt(a),[g,v]=Ce({prop:i,defaultProp:s??null,onChange:c,caller:$n}),[b,x]=l.useState(!1),w=Ne(u),S=Xl(n),C=l.useRef(!1),[M,E]=l.useState(0);return l.useEffect(()=>{const P=p.current;if(P)return P.addEventListener(ho,w),()=>P.removeEventListener(ho,w)},[w]),f.jsx(Rw,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:l.useCallback(P=>v(P),[v]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>E(P=>P+1),[]),onFocusableItemRemove:l.useCallback(()=>E(P=>P-1),[]),children:f.jsx(V.div,{tabIndex:b||M===0?-1:0,"data-orientation":r,...m,ref:h,style:{outline:"none",...e.style},onMouseDown:O(e.onMouseDown,()=>{C.current=!0}),onFocus:O(e.onFocus,P=>{const F=!C.current;if(P.target===P.currentTarget&&F&&!b){const _=new CustomEvent(ho,Nw);if(P.currentTarget.dispatchEvent(_),!_.defaultPrevented){const $=S().filter(j=>j.focusable),D=$.find(j=>j.active),B=$.find(j=>j.id===g),q=[D,B,...$].filter(Boolean).map(j=>j.ref.current);tu(q,d)}}C.current=!1}),onBlur:O(e.onBlur,()=>x(!1))})})}),Jl="RovingFocusGroupItem",eu=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,c=pe(),u=a||c,d=Pw(Jl,n),m=d.currentTabStopId===u,p=Xl(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:g}=d;return l.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),f.jsx(ko.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:f.jsx(V.span,{tabIndex:m?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:O(e.onMouseDown,v=>{r?d.onItemFocus(u):v.preventDefault()}),onFocus:O(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:O(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=Dw(v,d.orientation,d.dir);if(b!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let w=p().filter(S=>S.focusable).map(S=>S.ref.current);if(b==="last")w.reverse();else if(b==="prev"||b==="next"){b==="prev"&&w.reverse();const S=w.indexOf(v.currentTarget);w=d.loop?Tw(w,S+1):w.slice(S+1)}setTimeout(()=>tu(w))}}),children:typeof i=="function"?i({isCurrentTabStop:m,hasTabStop:g!=null}):i})})});eu.displayName=Jl;var Ow={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Iw(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Dw(e,t,n){const r=Iw(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Ow[r]}function tu(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Tw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Aw=Ql,_w=eu,Oo=["Enter"," "],jw=["ArrowDown","PageUp","Home"],nu=["ArrowUp","PageDown","End"],Fw=[...jw,...nu],$w={ltr:[...Oo,"ArrowRight"],rtl:[...Oo,"ArrowLeft"]},Lw={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ln="Menu",[xn,Ww,Bw]=Nn(Ln),[Dt,ru]=ve(Ln,[Bw,Zt,Zl]),Ar=Zt(),ou=Zl(),[Vw,Tt]=Dt(Ln),[Yw,Wn]=Dt(Ln),au=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,s=Ar(t),[c,u]=l.useState(null),d=l.useRef(!1),m=Ne(a),p=xt(o);return l.useEffect(()=>{const h=()=>{d.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>d.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),f.jsx(ga,{...s,children:f.jsx(Vw,{scope:t,open:n,onOpenChange:m,content:c,onContentChange:u,children:f.jsx(Yw,{scope:t,onClose:l.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:d,dir:p,modal:i,children:r})})})};au.displayName=Ln;var Hw="MenuAnchor",Na=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ar(n);return f.jsx(Pr,{...o,...r,ref:t})});Na.displayName=Hw;var Ea="MenuPortal",[Gw,su]=Dt(Ea,{forceMount:void 0}),iu=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Tt(Ea,t);return f.jsx(Gw,{scope:t,forceMount:n,children:f.jsx(Te,{present:n||a.open,children:f.jsx(Pn,{asChild:!0,container:o,children:r})})})};iu.displayName=Ea;var Oe="MenuContent",[Uw,Ma]=Dt(Oe),cu=l.forwardRef((e,t)=>{const n=su(Oe,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Tt(Oe,e.__scopeMenu),i=Wn(Oe,e.__scopeMenu);return f.jsx(xn.Provider,{scope:e.__scopeMenu,children:f.jsx(Te,{present:r||a.open,children:f.jsx(xn.Slot,{scope:e.__scopeMenu,children:i.modal?f.jsx(zw,{...o,ref:t}):f.jsx(Kw,{...o,ref:t})})})})}),zw=l.forwardRef((e,t)=>{const n=Tt(Oe,e.__scopeMenu),r=l.useRef(null),o=z(t,r);return l.useEffect(()=>{const a=r.current;if(a)return vr(a)},[]),f.jsx(Ra,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:O(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Kw=l.forwardRef((e,t)=>{const n=Tt(Oe,e.__scopeMenu);return f.jsx(Ra,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),qw=ht("MenuContent.ScrollLock"),Ra=l.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:m,onInteractOutside:p,onDismiss:h,disableOutsideScroll:y,...g}=e,v=Tt(Oe,n),b=Wn(Oe,n),x=Ar(n),w=ou(n),S=Ww(n),[C,M]=l.useState(null),E=l.useRef(null),P=z(t,E,v.onContentChange),F=l.useRef(0),_=l.useRef(""),$=l.useRef(0),D=l.useRef(null),B=l.useRef("right"),Y=l.useRef(0),q=y?kn:l.Fragment,j=y?{as:qw,allowPinchZoom:!0}:void 0,G=I=>{var T,Z;const Q=_.current+I,J=S().filter(K=>!K.disabled),R=document.activeElement,L=(T=J.find(K=>K.ref.current===R))==null?void 0:T.textValue,U=J.map(K=>K.textValue),W=iC(U,Q,L),X=(Z=J.find(K=>K.textValue===W))==null?void 0:Z.ref.current;(function K(te){_.current=te,window.clearTimeout(F.current),te!==""&&(F.current=window.setTimeout(()=>K(""),1e3))})(Q),X&&setTimeout(()=>X.focus())};l.useEffect(()=>()=>window.clearTimeout(F.current),[]),hr();const A=l.useCallback(I=>{var J,R;return B.current===((J=D.current)==null?void 0:J.side)&&lC(I,(R=D.current)==null?void 0:R.area)},[]);return f.jsx(Uw,{scope:n,searchRef:_,onItemEnter:l.useCallback(I=>{A(I)&&I.preventDefault()},[A]),onItemLeave:l.useCallback(I=>{var Q;A(I)||((Q=E.current)==null||Q.focus(),M(null))},[A]),onTriggerLeave:l.useCallback(I=>{A(I)&&I.preventDefault()},[A]),pointerGraceTimerRef:$,onPointerGraceIntentChange:l.useCallback(I=>{D.current=I},[]),children:f.jsx(q,{...j,children:f.jsx(Rn,{asChild:!0,trapped:o,onMountAutoFocus:O(a,I=>{var Q;I.preventDefault(),(Q=E.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:f.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:m,onInteractOutside:p,onDismiss:h,children:f.jsx(Aw,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:M,onEntryFocus:O(c,I=>{b.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:f.jsx(va,{role:"menu","aria-orientation":"vertical","data-state":Nu(v.open),"data-radix-menu-content":"",dir:b.dir,...x,...g,ref:P,style:{outline:"none",...g.style},onKeyDown:O(g.onKeyDown,I=>{const J=I.target.closest("[data-radix-menu-content]")===I.currentTarget,R=I.ctrlKey||I.altKey||I.metaKey,L=I.key.length===1;J&&(I.key==="Tab"&&I.preventDefault(),!R&&L&&G(I.key));const U=E.current;if(I.target!==U||!Fw.includes(I.key))return;I.preventDefault();const X=S().filter(T=>!T.disabled).map(T=>T.ref.current);nu.includes(I.key)&&X.reverse(),aC(X)}),onBlur:O(e.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(F.current),_.current="")}),onPointerMove:O(e.onPointerMove,wn(I=>{const Q=I.target,J=Y.current!==I.clientX;if(I.currentTarget.contains(Q)&&J){const R=I.clientX>Y.current?"right":"left";B.current=R,Y.current=I.clientX}}))})})})})})})});cu.displayName=Oe;var Xw="MenuGroup",Pa=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return f.jsx(V.div,{role:"group",...r,ref:t})});Pa.displayName=Xw;var Zw="MenuLabel",lu=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return f.jsx(V.div,{...r,ref:t})});lu.displayName=Zw;var cr="MenuItem",$s="menu.itemSelect",_r=l.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=l.useRef(null),i=Wn(cr,e.__scopeMenu),s=Ma(cr,e.__scopeMenu),c=z(t,a),u=l.useRef(!1),d=()=>{const m=a.current;if(!n&&m){const p=new CustomEvent($s,{bubbles:!0,cancelable:!0});m.addEventListener($s,h=>r==null?void 0:r(h),{once:!0}),Zs(m,p),p.defaultPrevented?u.current=!1:i.onClose()}};return f.jsx(uu,{...o,ref:c,disabled:n,onClick:O(e.onClick,d),onPointerDown:m=>{var p;(p=e.onPointerDown)==null||p.call(e,m),u.current=!0},onPointerUp:O(e.onPointerUp,m=>{var p;u.current||(p=m.currentTarget)==null||p.click()}),onKeyDown:O(e.onKeyDown,m=>{const p=s.searchRef.current!=="";n||p&&m.key===" "||Oo.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});_r.displayName=cr;var uu=l.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=Ma(cr,n),s=ou(n),c=l.useRef(null),u=z(t,c),[d,m]=l.useState(!1),[p,h]=l.useState("");return l.useEffect(()=>{const y=c.current;y&&h((y.textContent??"").trim())},[a.children]),f.jsx(xn.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:f.jsx(_w,{asChild:!0,...s,focusable:!r,children:f.jsx(V.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:O(e.onPointerMove,wn(y=>{r?i.onItemLeave(y):(i.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:O(e.onPointerLeave,wn(y=>i.onItemLeave(y))),onFocus:O(e.onFocus,()=>m(!0)),onBlur:O(e.onBlur,()=>m(!1))})})})}),Qw="MenuCheckboxItem",du=l.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return f.jsx(gu,{scope:e.__scopeMenu,checked:n,children:f.jsx(_r,{role:"menuitemcheckbox","aria-checked":lr(n)?"mixed":n,...o,ref:t,"data-state":Oa(n),onSelect:O(o.onSelect,()=>r==null?void 0:r(lr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});du.displayName=Qw;var fu="MenuRadioGroup",[Jw,eC]=Dt(fu,{value:void 0,onValueChange:()=>{}}),mu=l.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Ne(r);return f.jsx(Jw,{scope:e.__scopeMenu,value:n,onValueChange:a,children:f.jsx(Pa,{...o,ref:t})})});mu.displayName=fu;var pu="MenuRadioItem",hu=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=eC(pu,e.__scopeMenu),a=n===o.value;return f.jsx(gu,{scope:e.__scopeMenu,checked:a,children:f.jsx(_r,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Oa(a),onSelect:O(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});hu.displayName=pu;var ka="MenuItemIndicator",[gu,tC]=Dt(ka,{checked:!1}),vu=l.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=tC(ka,n);return f.jsx(Te,{present:r||lr(a.checked)||a.checked===!0,children:f.jsx(V.span,{...o,ref:t,"data-state":Oa(a.checked)})})});vu.displayName=ka;var nC="MenuSeparator",yu=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return f.jsx(V.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});yu.displayName=nC;var rC="MenuArrow",bu=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ar(n);return f.jsx(ya,{...o,...r,ref:t})});bu.displayName=rC;var oC="MenuSub",[ZN,xu]=Dt(oC),dn="MenuSubTrigger",wu=l.forwardRef((e,t)=>{const n=Tt(dn,e.__scopeMenu),r=Wn(dn,e.__scopeMenu),o=xu(dn,e.__scopeMenu),a=Ma(dn,e.__scopeMenu),i=l.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},d=l.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return l.useEffect(()=>d,[d]),l.useEffect(()=>{const m=s.current;return()=>{window.clearTimeout(m),c(null)}},[s,c]),f.jsx(Na,{asChild:!0,...u,children:f.jsx(uu,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Nu(n.open),...e,ref:qe(t,o.onTriggerChange),onClick:m=>{var p;(p=e.onClick)==null||p.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:O(e.onPointerMove,wn(m=>{a.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:O(e.onPointerLeave,wn(m=>{var h,y;d();const p=(h=n.content)==null?void 0:h.getBoundingClientRect();if(p){const g=(y=n.content)==null?void 0:y.dataset.side,v=g==="right",b=v?-5:5,x=p[v?"left":"right"],w=p[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:m.clientX+b,y:m.clientY},{x,y:p.top},{x:w,y:p.top},{x:w,y:p.bottom},{x,y:p.bottom}],side:g}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(m),m.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:O(e.onKeyDown,m=>{var h;const p=a.searchRef.current!=="";e.disabled||p&&m.key===" "||$w[r.dir].includes(m.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),m.preventDefault())})})})});wu.displayName=dn;var Cu="MenuSubContent",Su=l.forwardRef((e,t)=>{const n=su(Oe,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Tt(Oe,e.__scopeMenu),i=Wn(Oe,e.__scopeMenu),s=xu(Cu,e.__scopeMenu),c=l.useRef(null),u=z(t,c);return f.jsx(xn.Provider,{scope:e.__scopeMenu,children:f.jsx(Te,{present:r||a.open,children:f.jsx(xn.Slot,{scope:e.__scopeMenu,children:f.jsx(Ra,{id:s.contentId,"aria-labelledby":s.triggerId,...o,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var m;i.isUsingKeyboardRef.current&&((m=c.current)==null||m.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:O(e.onFocusOutside,d=>{d.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:O(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:O(e.onKeyDown,d=>{var h;const m=d.currentTarget.contains(d.target),p=Lw[i.dir].includes(d.key);m&&p&&(a.onOpenChange(!1),(h=s.trigger)==null||h.focus(),d.preventDefault())})})})})})});Su.displayName=Cu;function Nu(e){return e?"open":"closed"}function lr(e){return e==="indeterminate"}function Oa(e){return lr(e)?"indeterminate":e?"checked":"unchecked"}function aC(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function sC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function iC(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let i=sC(e,Math.max(a,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function cC(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const s=t[a],c=t[i],u=s.x,d=s.y,m=c.x,p=c.y;d>r!=p>r&&n<(m-u)*(r-d)/(p-d)+u&&(o=!o)}return o}function lC(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return cC(n,t)}function wn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var uC=au,dC=Na,fC=iu,mC=cu,pC=Pa,hC=lu,gC=_r,vC=du,yC=mu,bC=hu,xC=vu,wC=yu,CC=bu,SC=wu,NC=Su,jr="DropdownMenu",[EC,QN]=ve(jr,[ru]),Ee=ru(),[MC,Eu]=EC(jr),Mu=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,c=Ee(t),u=l.useRef(null),[d,m]=Ce({prop:o,defaultProp:a??!1,onChange:i,caller:jr});return f.jsx(MC,{scope:t,triggerId:pe(),triggerRef:u,contentId:pe(),open:d,onOpenChange:m,onOpenToggle:l.useCallback(()=>m(p=>!p),[m]),modal:s,children:f.jsx(uC,{...c,open:d,onOpenChange:m,dir:r,modal:s,children:n})})};Mu.displayName=jr;var Ru="DropdownMenuTrigger",Pu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=Eu(Ru,n),i=Ee(n);return f.jsx(dC,{asChild:!0,...i,children:f.jsx(V.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:qe(t,a.triggerRef),onPointerDown:O(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:O(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});Pu.displayName=Ru;var RC="DropdownMenuPortal",ku=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ee(t);return f.jsx(fC,{...r,...n})};ku.displayName=RC;var Ou="DropdownMenuContent",Iu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Eu(Ou,n),a=Ee(n),i=l.useRef(!1);return f.jsx(mC,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:O(e.onCloseAutoFocus,s=>{var c;i.current||(c=o.triggerRef.current)==null||c.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:O(e.onInteractOutside,s=>{const c=s.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!o.modal||d)&&(i.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)"}})});Iu.displayName=Ou;var PC="DropdownMenuGroup",kC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(pC,{...o,...r,ref:t})});kC.displayName=PC;var OC="DropdownMenuLabel",IC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(hC,{...o,...r,ref:t})});IC.displayName=OC;var DC="DropdownMenuItem",Du=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(gC,{...o,...r,ref:t})});Du.displayName=DC;var TC="DropdownMenuCheckboxItem",AC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(vC,{...o,...r,ref:t})});AC.displayName=TC;var _C="DropdownMenuRadioGroup",jC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(yC,{...o,...r,ref:t})});jC.displayName=_C;var FC="DropdownMenuRadioItem",$C=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(bC,{...o,...r,ref:t})});$C.displayName=FC;var LC="DropdownMenuItemIndicator",WC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(xC,{...o,...r,ref:t})});WC.displayName=LC;var BC="DropdownMenuSeparator",Tu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(wC,{...o,...r,ref:t})});Tu.displayName=BC;var VC="DropdownMenuArrow",YC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(CC,{...o,...r,ref:t})});YC.displayName=VC;var HC="DropdownMenuSubTrigger",GC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(SC,{...o,...r,ref:t})});GC.displayName=HC;var UC="DropdownMenuSubContent",zC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(NC,{...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)"}})});zC.displayName=UC;var KC=Mu,qC=Pu,XC=ku,ZC=Iu,QC=Du,JC=Tu;const Au=l.forwardRef(({className:e,children:t,items:n,align:r="start",variant:o="default",isDisabled:a=!1,...i},s)=>f.jsxs(KC,{children:[f.jsx(qC,{asChild:!0,children:f.jsxs(Ie,{ref:s,className:k("flex items-center gap-1",e),isDisabled:a,variant:o,...i,children:[t,f.jsx(qo,{className:"h-4 w-4"})]})}),f.jsx(XC,{children:f.jsx(ZC,{align:r,className:`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover px-1 py-1
|
|
168
168
|
text-popover-foreground shadow-md data-[state=open]:animate-in
|
|
169
169
|
data-[state=closed]:animate-out data-[state=closed]:fade-out-0
|
|
170
170
|
data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95
|
|
171
171
|
data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2
|
|
172
|
-
data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,sideOffset:4,children:n.map((c,u)=>c==="separator"?f.jsx(
|
|
172
|
+
data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,sideOffset:4,children:n.map((c,u)=>c==="separator"?f.jsx(JC,{className:"my-1 h-px bg-muted"},`separator-${u}`):f.jsxs(QC,{className:k(`relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5
|
|
173
173
|
text-sm outline-none transition-colors focus:bg-accent
|
|
174
174
|
focus:text-accent-foreground data-[disabled]:pointer-events-none
|
|
175
|
-
data-[disabled]:opacity-50`,c.onClick&&"cursor-pointer"),onClick:c.onClick,children:[c.icon?f.jsx("span",{className:"mr-2",children:c.icon}):null,c.label]},c.label))})})]}));
|
|
176
|
-
text-secondary-foreground`,children:[b,f.jsx(
|
|
177
|
-
border-primary-400`,t.includes(b.value)?"bg-primary-400 text-white":"opacity-50"),children:t.includes(b.value)?f.jsx(Kt,{className:"h-3 w-3",strokeWidth:3}):null}),b.label]})},b.value))})]})]})})]})});Du.displayName="MultiSelect";var po="rovingFocusGroup.onEntryFocus",HC={bubbles:!1,cancelable:!0},Wn="RovingFocusGroup",[ko,Iu,GC]=Nn(Wn),[zC,Au]=ve(Wn,[GC]),[UC,KC]=zC(Wn),Tu=l.forwardRef((e,t)=>f.jsx(ko.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx(ko.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(qC,{...e,ref:t})})}));Tu.displayName=Wn;var qC=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...m}=e,p=l.useRef(null),h=U(t,p),y=bt(a),[g,v]=Ce({prop:i,defaultProp:s??null,onChange:c,caller:Wn}),[b,x]=l.useState(!1),w=Se(u),S=Iu(n),C=l.useRef(!1),[M,N]=l.useState(0);return l.useEffect(()=>{const P=p.current;if(P)return P.addEventListener(po,w),()=>P.removeEventListener(po,w)},[w]),f.jsx(UC,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:l.useCallback(P=>v(P),[v]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>N(P=>P+1),[]),onFocusableItemRemove:l.useCallback(()=>N(P=>P-1),[]),children:f.jsx(V.div,{tabIndex:b||M===0?-1:0,"data-orientation":r,...m,ref:h,style:{outline:"none",...e.style},onMouseDown:O(e.onMouseDown,()=>{C.current=!0}),onFocus:O(e.onFocus,P=>{const F=!C.current;if(P.target===P.currentTarget&&F&&!b){const _=new CustomEvent(po,HC);if(P.currentTarget.dispatchEvent(_),!_.defaultPrevented){const $=S().filter(j=>j.focusable),I=$.find(j=>j.active),B=$.find(j=>j.id===g),q=[I,B,...$].filter(Boolean).map(j=>j.ref.current);Fu(q,d)}}C.current=!1}),onBlur:O(e.onBlur,()=>x(!1))})})}),_u="RovingFocusGroupItem",ju=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,c=pe(),u=a||c,d=KC(_u,n),m=d.currentTabStopId===u,p=Iu(n),{onFocusableItemAdd:h,onFocusableItemRemove:y}=d;return l.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),f.jsx(ko.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:f.jsx(V.span,{tabIndex:m?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:O(e.onMouseDown,g=>{r?d.onItemFocus(u):g.preventDefault()}),onFocus:O(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:O(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const v=QC(g,d.orientation,d.dir);if(v!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let x=p().filter(w=>w.focusable).map(w=>w.ref.current);if(v==="last")x.reverse();else if(v==="prev"||v==="next"){v==="prev"&&x.reverse();const w=x.indexOf(g.currentTarget);x=d.loop?JC(x,w+1):x.slice(w+1)}setTimeout(()=>Fu(x))}}),children:typeof i=="function"?i({isCurrentTabStop:m}):i})})});ju.displayName=_u;var XC={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ZC(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function QC(e,t,n){const r=ZC(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return XC[r]}function Fu(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function JC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var e0=Tu,t0=ju,ka="Radio",[n0,$u]=ve(ka),[r0,o0]=n0(ka),Lu=l.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:s="on",onCheck:c,form:u,...d}=e,[m,p]=l.useState(null),h=U(t,v=>p(v)),y=l.useRef(!1),g=m?u||!!m.closest("form"):!0;return f.jsxs(r0,{scope:n,checked:o,disabled:i,children:[f.jsx(V.button,{type:"button",role:"radio","aria-checked":o,"data-state":Yu(o),"data-disabled":i?"":void 0,disabled:i,value:s,...d,ref:h,onClick:O(e.onClick,v=>{o||c==null||c(),g&&(y.current=v.isPropagationStopped(),y.current||v.stopPropagation())})}),g&&f.jsx(Vu,{control:m,bubbles:!y.current,name:r,value:s,checked:o,required:a,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});Lu.displayName=ka;var Wu="RadioIndicator",Bu=l.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=o0(Wu,n);return f.jsx(Ie,{present:r||a.checked,children:f.jsx(V.span,{"data-state":Yu(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Bu.displayName=Wu;var a0="RadioBubbleInput",Vu=l.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=l.useRef(null),s=U(i,a),c=Or(n),u=In(t);return l.useEffect(()=>{const d=i.current;if(!d)return;const m=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(m,"checked").set;if(c!==n&&h){const y=new Event("click",{bubbles:r});h.call(d,n),d.dispatchEvent(y)}},[c,n,r]),f.jsx(V.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Vu.displayName=a0;function Yu(e){return e?"checked":"unchecked"}var s0=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],_r="RadioGroup",[i0,$E]=ve(_r,[Au,$u]),Hu=Au(),Gu=$u(),[c0,l0]=i0(_r),zu=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:i=!1,disabled:s=!1,orientation:c,dir:u,loop:d=!0,onValueChange:m,...p}=e,h=Hu(n),y=bt(u),[g,v]=Ce({prop:a,defaultProp:o??"",onChange:m,caller:_r});return f.jsx(c0,{scope:n,name:r,required:i,disabled:s,value:g,onValueChange:v,children:f.jsx(e0,{asChild:!0,...h,orientation:c,dir:y,loop:d,children:f.jsx(V.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":s?"":void 0,dir:y,...p,ref:t})})})});zu.displayName=_r;var Uu="RadioGroupItem",Ku=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=l0(Uu,n),i=a.disabled||r,s=Hu(n),c=Gu(n),u=l.useRef(null),d=U(t,u),m=a.value===o.value,p=l.useRef(!1);return l.useEffect(()=>{const h=g=>{s0.includes(g.key)&&(p.current=!0)},y=()=>p.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",y)}},[]),f.jsx(t0,{asChild:!0,...s,focusable:!i,active:m,children:f.jsx(Lu,{disabled:i,required:a.required,checked:m,...c,...o,name:a.name,ref:d,onCheck:()=>a.onValueChange(o.value),onKeyDown:O(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:O(o.onFocus,()=>{var h;p.current&&((h=u.current)==null||h.click())})})})});Ku.displayName=Uu;var u0="RadioGroupIndicator",qu=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Gu(n);return f.jsx(Bu,{...o,...r,ref:t})});qu.displayName=u0;var d0=zu,Oa=Ku,f0=qu;const Xu=l.forwardRef(({id:e,label:t,description:n,isChecked:r,isDisabled:o,className:a,"aria-label":i,...s},c)=>{const u=Xe({isDisabled:o}),{ariaProps:d,labelId:m,descriptionId:p}=Xo({label:t,description:n,"aria-label":i}),h=()=>t?typeof t=="string"?f.jsx("span",{className:"font-medium",id:m,children:t}):f.jsx("span",{id:m,children:t}):null;return f.jsxs("div",{className:k("relative",r?k(le.button,Et({variant:"primary"})):k(le.button,Et({variant:"input"})),o&&"pointer-events-none cursor-not-allowed opacity-50",a),children:[f.jsx(Oa,{ref:c,checked:r,className:"absolute inset-0 opacity-0",id:e,...d,...s,...u}),f.jsxs("div",{className:"flex items-center gap-2",children:[h(),n?f.jsx("span",{className:"text-sm text-muted-foreground",id:p,children:n}):null]})]})});Xu.displayName="RadioButton";const Zu="aspect-square h-5 w-5 rounded-full border-2 border-gray-500 text-primary-400 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 data-[state=checked]:border-primary-400 ",m0=({id:e,label:t})=>t?typeof t=="string"?f.jsx(tn,{htmlFor:e,children:t}):t:null,Qu=l.forwardRef(({id:e,label:t,isChecked:n,isDisabled:r,className:o,"aria-label":a,...i},s)=>{const c=Xe({isDisabled:r});return f.jsxs("div",{className:k("flex items-center gap-2",r&&"cursor-not-allowed opacity-50 [&>*]:cursor-not-allowed"),children:[f.jsx(Oa,{ref:s,"aria-label":a,checked:n,className:k(le.focusRingVisible,le.focusRingVisibleSm,Zu,o),id:e,...i,...c,children:f.jsx(f0,{className:"flex items-center justify-center",children:f.jsx(hi,{className:"h-3 w-3 fill-current text-current"})})}),f.jsx(m0,{id:e,label:t})]})});Qu.displayName="RadioDefault";const Ju=l.forwardRef(({id:e,label:t,description:n,isChecked:r,isDisabled:o,className:a,"aria-label":i,...s},c)=>{const u=Xe({isDisabled:o}),{ariaProps:d,labelId:m,descriptionId:p}=Xo({label:t,description:n,"aria-label":i}),h=()=>t?typeof t=="string"?f.jsx("div",{className:"font-medium",id:m,children:t}):f.jsx("div",{id:m,children:t}):null;return f.jsxs("div",{className:k("relative rounded-lg border-2 border-muted bg-popover px-4 py-4",r&&"border-primary-400",o?"cursor-not-allowed opacity-50 [&_*]:cursor-not-allowed":"cursor-pointer hover:bg-accent hover:text-accent-foreground",a),children:[f.jsx(Oa,{ref:c,checked:r,className:"absolute inset-0 opacity-0",id:e,...d,...s,...u}),f.jsxs("div",{className:"flex items-start gap-3",children:[f.jsx("div",{className:k(Zu,"pointer-events-none mt-1",r&&"border-primary-400"),children:r?f.jsx("div",{className:"flex h-full w-full items-center justify-center",children:f.jsx(hi,{className:"h-3 w-3 fill-current text-primary-400"})}):null}),f.jsxs("div",{className:"pointer-events-none space-y-1",children:[h(),n?f.jsx("p",{className:"text-sm text-muted-foreground",id:p,children:n}):null]})]})]})});Ju.displayName="RadioTile";const p0=(e,t)=>{if(!e&&!t)throw new Error("Radio must have either a label prop or an aria-label attribute");if(e&&t)throw new Error("Radio must have either a label prop or an aria-label attribute, but not both")},Da=l.forwardRef(({className:e,label:t,description:n,id:r,"aria-label":o,isChecked:a=!1,isDisabled:i=!1,variant:s="default",...c},u)=>(p0(t,o),s==="button"?f.jsx(Xu,{ref:u,"aria-label":o,className:e,description:n,id:r,isChecked:a,isDisabled:i,label:t,...c}):s==="tile"?f.jsx(Ju,{ref:u,"aria-label":o,className:e,description:n,id:r,isChecked:a,isDisabled:i,label:t,...c}):f.jsx(Qu,{ref:u,"aria-label":o,className:e,description:n,id:r,isChecked:a,isDisabled:i,label:t,...c})));Da.displayName="Radio";const ed=l.forwardRef(({options:e,value:t,onChange:n,className:r,orientation:o="vertical",variant:a="default",...i},s)=>f.jsx(d0,{ref:s,className:k("grid gap-3",o==="horizontal"&&a==="default"&&"flex flex-row gap-5",o==="vertical"&&a==="default"&&"flex flex-col gap-2 space-y-1",a==="tile"&&"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",a==="button"&&o==="horizontal"&&`flex flex-row gap-0 [&>*:first-child]:ml-0 [&>*:first-child]:rounded-l-sm
|
|
178
|
-
[&>*:last-child]:rounded-r-sm [&>*]:-ml-[1px] [&>*]:rounded-none`,a==="button"&&o==="vertical"&&`flex flex-col gap-0 [&>*:first-child]:mt-0 [&>*:first-child]:rounded-t-sm
|
|
179
|
-
[&>*:last-child]:rounded-b-sm [&>*]:-mt-[1px] [&>*]:rounded-none`,r),value:t,onValueChange:n,...i,children:e.map(c=>f.jsx(Da,{description:c.description,id:c.value,isChecked:t===c.value,label:c.label,value:c.value,variant:a},c.value))}));ed.displayName="RadioGroup";function Fs(e,[t,n]){return Math.min(n,Math.max(t,e))}var td=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),h0="VisuallyHidden",g0=l.forwardRef((e,t)=>f.jsx(V.span,{...e,ref:t,style:{...td,...e.style}}));g0.displayName=h0;var v0=[" ","Enter","ArrowUp","ArrowDown"],y0=[" ","Enter"],Pt="Select",[jr,Fr,b0]=Nn(Pt),[nn,LE]=ve(Pt,[b0,Zt]),$r=Zt(),[x0,wt]=nn(Pt),[w0,C0]=nn(Pt),nd=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:s,onValueChange:c,dir:u,name:d,autoComplete:m,disabled:p,required:h,form:y}=e,g=$r(t),[v,b]=l.useState(null),[x,w]=l.useState(null),[S,C]=l.useState(!1),M=bt(u),[N,P]=Ce({prop:r,defaultProp:o??!1,onChange:a,caller:Pt}),[F,_]=Ce({prop:i,defaultProp:s,onChange:c,caller:Pt}),$=l.useRef(null),I=v?y||!!v.closest("form"):!0,[B,Y]=l.useState(new Set),q=Array.from(B).map(j=>j.props.value).join(";");return f.jsx(pa,{...g,children:f.jsxs(x0,{required:h,scope:t,trigger:v,onTriggerChange:b,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:pe(),value:F,onValueChange:_,open:N,onOpenChange:P,dir:M,triggerPointerDownPosRef:$,disabled:p,children:[f.jsx(jr.Provider,{scope:t,children:f.jsx(w0,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(j=>{Y(G=>new Set(G).add(j))},[]),onNativeOptionRemove:l.useCallback(j=>{Y(G=>{const T=new Set(G);return T.delete(j),T})},[]),children:n})}),I?f.jsxs(Nd,{"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:m,value:F,onChange:j=>_(j.target.value),disabled:p,form:y,children:[F===void 0?f.jsx("option",{value:""}):null,Array.from(B)]},q):null]})})};nd.displayName=Pt;var rd="SelectTrigger",od=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=$r(n),i=wt(rd,n),s=i.disabled||r,c=U(t,i.onTriggerChange),u=Fr(n),d=l.useRef("touch"),[m,p,h]=Rd(g=>{const v=u().filter(w=>!w.disabled),b=v.find(w=>w.value===i.value),x=Pd(v,g,b);x!==void 0&&i.onValueChange(x.value)}),y=g=>{s||(i.onOpenChange(!0),h()),g&&(i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return f.jsx(Rr,{asChild:!0,...a,children:f.jsx(V.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Md(i.value)?"":void 0,...o,ref:c,onClick:O(o.onClick,g=>{g.currentTarget.focus(),d.current!=="mouse"&&y(g)}),onPointerDown:O(o.onPointerDown,g=>{d.current=g.pointerType;const v=g.target;v.hasPointerCapture(g.pointerId)&&v.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(y(g),g.preventDefault())}),onKeyDown:O(o.onKeyDown,g=>{const v=m.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&p(g.key),!(v&&g.key===" ")&&v0.includes(g.key)&&(y(),g.preventDefault())})})})});od.displayName=rd;var ad="SelectValue",sd=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...s}=e,c=wt(ad,n),{onValueNodeHasChildrenChange:u}=c,d=a!==void 0,m=U(t,c.onValueNodeChange);return de(()=>{u(d)},[u,d]),f.jsx(V.span,{...s,ref:m,style:{pointerEvents:"none"},children:Md(c.value)?f.jsx(f.Fragment,{children:i}):a})});sd.displayName=ad;var S0="SelectIcon",id=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return f.jsx(V.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});id.displayName=S0;var E0="SelectPortal",cd=e=>f.jsx(Pn,{asChild:!0,...e});cd.displayName=E0;var kt="SelectContent",ld=l.forwardRef((e,t)=>{const n=wt(kt,e.__scopeSelect),[r,o]=l.useState();if(de(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?En.createPortal(f.jsx(ud,{scope:e.__scopeSelect,children:f.jsx(jr.Slot,{scope:e.__scopeSelect,children:f.jsx("div",{children:e.children})})}),a):null}return f.jsx(dd,{...e,ref:t})});ld.displayName=kt;var je=10,[ud,Ct]=nn(kt),N0="SelectContentImpl",M0=pt("SelectContent.RemoveScroll"),dd=l.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:m,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:g,avoidCollisions:v,...b}=e,x=wt(kt,n),[w,S]=l.useState(null),[C,M]=l.useState(null),N=U(t,A=>S(A)),[P,F]=l.useState(null),[_,$]=l.useState(null),I=Fr(n),[B,Y]=l.useState(!1),q=l.useRef(!1);l.useEffect(()=>{if(w)return gr(w)},[w]),pr();const j=l.useCallback(A=>{const[Z,...K]=I().map(oe=>oe.ref.current),[te]=K.slice(-1),re=document.activeElement;for(const oe of A)if(oe===re||(oe==null||oe.scrollIntoView({block:"nearest"}),oe===Z&&C&&(C.scrollTop=0),oe===te&&C&&(C.scrollTop=C.scrollHeight),oe==null||oe.focus(),document.activeElement!==re))return},[I,C]),G=l.useCallback(()=>j([P,w]),[j,P,w]);l.useEffect(()=>{B&&G()},[B,G]);const{onOpenChange:T,triggerPointerDownPosRef:D}=x;l.useEffect(()=>{if(w){let A={x:0,y:0};const Z=te=>{var re,oe;A={x:Math.abs(Math.round(te.pageX)-(((re=D.current)==null?void 0:re.x)??0)),y:Math.abs(Math.round(te.pageY)-(((oe=D.current)==null?void 0:oe.y)??0))}},K=te=>{A.x<=10&&A.y<=10?te.preventDefault():w.contains(te.target)||T(!1),document.removeEventListener("pointermove",Z),D.current=null};return D.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",K,{capture:!0})}}},[w,T,D]),l.useEffect(()=>{const A=()=>T(!1);return window.addEventListener("blur",A),window.addEventListener("resize",A),()=>{window.removeEventListener("blur",A),window.removeEventListener("resize",A)}},[T]);const[Q,J]=Rd(A=>{const Z=I().filter(re=>!re.disabled),K=Z.find(re=>re.ref.current===document.activeElement),te=Pd(Z,A,K);te&&setTimeout(()=>te.ref.current.focus())}),R=l.useCallback((A,Z,K)=>{const te=!q.current&&!K;(x.value!==void 0&&x.value===Z||te)&&(F(A),te&&(q.current=!0))},[x.value]),L=l.useCallback(()=>w==null?void 0:w.focus(),[w]),z=l.useCallback((A,Z,K)=>{const te=!q.current&&!K;(x.value!==void 0&&x.value===Z||te)&&$(A)},[x.value]),W=r==="popper"?Oo:fd,X=W===Oo?{side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:m,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:g,avoidCollisions:v}:{};return f.jsx(ud,{scope:n,content:w,viewport:C,onViewportChange:M,itemRefCallback:R,selectedItem:P,onItemLeave:L,itemTextRefCallback:z,focusSelectedItem:G,selectedItemText:_,position:r,isPositioned:B,searchRef:Q,children:f.jsx(kn,{as:M0,allowPinchZoom:!0,children:f.jsx(Rn,{asChild:!0,trapped:x.open,onMountAutoFocus:A=>{A.preventDefault()},onUnmountAutoFocus:O(o,A=>{var Z;(Z=x.trigger)==null||Z.focus({preventScroll:!0}),A.preventDefault()}),children:f.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:A=>A.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:f.jsx(W,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:A=>A.preventDefault(),...b,...X,onPlaced:()=>Y(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:O(b.onKeyDown,A=>{const Z=A.ctrlKey||A.altKey||A.metaKey;if(A.key==="Tab"&&A.preventDefault(),!Z&&A.key.length===1&&J(A.key),["ArrowUp","ArrowDown","Home","End"].includes(A.key)){let te=I().filter(re=>!re.disabled).map(re=>re.ref.current);if(["ArrowUp","End"].includes(A.key)&&(te=te.slice().reverse()),["ArrowUp","ArrowDown"].includes(A.key)){const re=A.target,oe=te.indexOf(re);te=te.slice(oe+1)}setTimeout(()=>j(te)),A.preventDefault()}})})})})})})});dd.displayName=N0;var R0="SelectItemAlignedPosition",fd=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=wt(kt,n),i=Ct(kt,n),[s,c]=l.useState(null),[u,d]=l.useState(null),m=U(t,N=>d(N)),p=Fr(n),h=l.useRef(!1),y=l.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:b,focusSelectedItem:x}=i,w=l.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&g&&v&&b){const N=a.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),F=a.valueNode.getBoundingClientRect(),_=b.getBoundingClientRect();if(a.dir!=="rtl"){const re=_.left-P.left,oe=F.left-re,he=N.left-oe,be=N.width+he,Je=Math.max(be,P.width),et=window.innerWidth-je,tt=Fs(oe,[je,Math.max(je,et-Je)]);s.style.minWidth=be+"px",s.style.left=tt+"px"}else{const re=P.right-_.right,oe=window.innerWidth-F.right-re,he=window.innerWidth-N.right-oe,be=N.width+he,Je=Math.max(be,P.width),et=window.innerWidth-je,tt=Fs(oe,[je,Math.max(je,et-Je)]);s.style.minWidth=be+"px",s.style.right=tt+"px"}const $=p(),I=window.innerHeight-je*2,B=g.scrollHeight,Y=window.getComputedStyle(u),q=parseInt(Y.borderTopWidth,10),j=parseInt(Y.paddingTop,10),G=parseInt(Y.borderBottomWidth,10),T=parseInt(Y.paddingBottom,10),D=q+j+B+T+G,Q=Math.min(v.offsetHeight*5,D),J=window.getComputedStyle(g),R=parseInt(J.paddingTop,10),L=parseInt(J.paddingBottom,10),z=N.top+N.height/2-je,W=I-z,X=v.offsetHeight/2,A=v.offsetTop+X,Z=q+j+A,K=D-Z;if(Z<=z){const re=$.length>0&&v===$[$.length-1].ref.current;s.style.bottom="0px";const oe=u.clientHeight-g.offsetTop-g.offsetHeight,he=Math.max(W,X+(re?L:0)+oe+G),be=Z+he;s.style.height=be+"px"}else{const re=$.length>0&&v===$[0].ref.current;s.style.top="0px";const he=Math.max(z,q+g.offsetTop+(re?R:0)+X)+K;s.style.height=he+"px",g.scrollTop=Z-z+g.offsetTop}s.style.margin=`${je}px 0`,s.style.minHeight=Q+"px",s.style.maxHeight=I+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[p,a.trigger,a.valueNode,s,u,g,v,b,a.dir,r]);de(()=>w(),[w]);const[S,C]=l.useState();de(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const M=l.useCallback(N=>{N&&y.current===!0&&(w(),x==null||x(),y.current=!1)},[w,x]);return f.jsx(k0,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:M,children:f.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:f.jsx(V.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});fd.displayName=R0;var P0="SelectPopperPosition",Oo=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=je,...a}=e,i=$r(n);return f.jsx(ha,{...i,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Oo.displayName=P0;var[k0,Ia]=nn(kt,{}),Do="SelectViewport",md=l.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Ct(Do,n),i=Ia(Do,n),s=U(t,a.onViewportChange),c=l.useRef(0);return f.jsxs(f.Fragment,{children:[f.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),f.jsx(jr.Slot,{scope:n,children:f.jsx(V.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:O(o.onScroll,u=>{const d=u.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&m){const h=Math.abs(c.current-d.scrollTop);if(h>0){const y=window.innerHeight-je*2,g=parseFloat(m.style.minHeight),v=parseFloat(m.style.height),b=Math.max(g,v);if(b<y){const x=b+h,w=Math.min(y,x),S=x-w;m.style.height=w+"px",m.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,m.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});md.displayName=Do;var pd="SelectGroup",[O0,D0]=nn(pd),hd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=pe();return f.jsx(O0,{scope:n,id:o,children:f.jsx(V.div,{role:"group","aria-labelledby":o,...r,ref:t})})});hd.displayName=pd;var gd="SelectLabel",vd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=D0(gd,n);return f.jsx(V.div,{id:o.id,...r,ref:t})});vd.displayName=gd;var lr="SelectItem",[I0,yd]=nn(lr),bd=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,s=wt(lr,n),c=Ct(lr,n),u=s.value===r,[d,m]=l.useState(a??""),[p,h]=l.useState(!1),y=U(t,x=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,x,r,o)}),g=pe(),v=l.useRef("touch"),b=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return f.jsx(I0,{scope:n,value:r,disabled:o,textId:g,isSelected:u,onItemTextChange:l.useCallback(x=>{m(w=>w||((x==null?void 0:x.textContent)??"").trim())},[]),children:f.jsx(jr.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:f.jsx(V.div,{role:"option","aria-labelledby":g,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:y,onFocus:O(i.onFocus,()=>h(!0)),onBlur:O(i.onBlur,()=>h(!1)),onClick:O(i.onClick,()=>{v.current!=="mouse"&&b()}),onPointerUp:O(i.onPointerUp,()=>{v.current==="mouse"&&b()}),onPointerDown:O(i.onPointerDown,x=>{v.current=x.pointerType}),onPointerMove:O(i.onPointerMove,x=>{var w;v.current=x.pointerType,o?(w=c.onItemLeave)==null||w.call(c):v.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:O(i.onPointerLeave,x=>{var w;x.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:O(i.onKeyDown,x=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&x.key===" "||(y0.includes(x.key)&&b(),x.key===" "&&x.preventDefault())})})})})});bd.displayName=lr;var mn="SelectItemText",xd=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=wt(mn,n),s=Ct(mn,n),c=yd(mn,n),u=C0(mn,n),[d,m]=l.useState(null),p=U(t,b=>m(b),c.onItemTextChange,b=>{var x;return(x=s.itemTextRefCallback)==null?void 0:x.call(s,b,c.value,c.disabled)}),h=d==null?void 0:d.textContent,y=l.useMemo(()=>f.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=u;return de(()=>(g(y),()=>v(y)),[g,v,y]),f.jsxs(f.Fragment,{children:[f.jsx(V.span,{id:c.textId,...a,ref:p}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?En.createPortal(a.children,i.valueNode):null]})});xd.displayName=mn;var wd="SelectItemIndicator",Cd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return yd(wd,n).isSelected?f.jsx(V.span,{"aria-hidden":!0,...r,ref:t}):null});Cd.displayName=wd;var Io="SelectScrollUpButton",A0=l.forwardRef((e,t)=>{const n=Ct(Io,e.__scopeSelect),r=Ia(Io,e.__scopeSelect),[o,a]=l.useState(!1),i=U(t,r.onScrollButtonChange);return de(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=c.scrollTop>0;a(u)};const c=n.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?f.jsx(Sd,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}}):null});A0.displayName=Io;var Ao="SelectScrollDownButton",T0=l.forwardRef((e,t)=>{const n=Ct(Ao,e.__scopeSelect),r=Ia(Ao,e.__scopeSelect),[o,a]=l.useState(!1),i=U(t,r.onScrollButtonChange);return de(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;a(d)};const c=n.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?f.jsx(Sd,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}}):null});T0.displayName=Ao;var Sd=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Ct("SelectScrollButton",n),i=l.useRef(null),s=Fr(n),c=l.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),de(()=>{var d;const u=s().find(m=>m.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[s]),f.jsx(V.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:O(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:O(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:O(o.onPointerLeave,()=>{c()})})}),_0="SelectSeparator",Ed=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return f.jsx(V.div,{"aria-hidden":!0,...r,ref:t})});Ed.displayName=_0;var To="SelectArrow",j0=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=$r(n),a=wt(To,n),i=Ct(To,n);return a.open&&i.position==="popper"?f.jsx(ga,{...o,...r,ref:t}):null});j0.displayName=To;var F0="SelectBubbleInput",Nd=l.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=l.useRef(null),a=U(r,o),i=Or(t);return l.useEffect(()=>{const s=o.current;if(!s)return;const c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&d){const m=new Event("change",{bubbles:!0});d.call(s,t),s.dispatchEvent(m)}},[i,t]),f.jsx(V.select,{...n,style:{...td,...n.style},ref:a,defaultValue:t})});Nd.displayName=F0;function Md(e){return e===""||e===void 0}function Rd(e){const t=Se(e),n=l.useRef(""),r=l.useRef(0),o=l.useCallback(i=>{const s=n.current+i;t(s),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(s)},[t]),a=l.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function Pd(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let i=$0(e,Math.max(a,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function $0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var L0=nd,kd=od,W0=sd,B0=id,V0=cd,Od=ld,Y0=md,H0=hd,Dd=vd,Id=bd,G0=xd,z0=Cd,Ad=Ed;const Aa=l.forwardRef(({className:e,children:t,position:n="popper",zIndex:r,style:o,...a},i)=>f.jsx(V0,{children:f.jsx(Od,{ref:i,className:k(`relative min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground
|
|
175
|
+
data-[disabled]:opacity-50`,c.onClick&&"cursor-pointer"),onClick:c.onClick,children:[c.icon?f.jsx("span",{className:"mr-2",children:c.icon}):null,c.label]},c.label))})})]}));Au.displayName="DropdownButton";const _u=l.forwardRef(({label:e,labelSlot:t,hintText:n,errorText:r,className:o,children:a,elementId:i,isRequired:s=!1,...c},u)=>{var y;const d=i??((y=a.props)==null?void 0:y.id);if(!d)throw new Error("FormItem must have either an `elementId` prop or an `id` attribute specified on the child element");const m=`form-item-${d}-label`,p=`form-item-${d}-hint`,h=`form-item-${d}-error`;return f.jsxs("div",{ref:u,className:k("space-y-1",o),...c,"data-error":r?"true":void 0,children:[f.jsxs("div",{className:"space-y-1",children:[e?f.jsxs("div",{className:"flex items-center",children:[typeof e=="string"?f.jsxs(Fn,{className:"font-bold",htmlFor:d,id:m,children:[e,s?f.jsx("span",{className:"ml-0.5 text-destructive",children:"*"}):null]}):e,t?f.jsx("div",{className:"ml-2",children:t}):null]}):null,n?f.jsx("p",{className:ie.text.hint,id:p,children:n}):null]}),a,r?f.jsx("p",{className:ie.text.error,id:h,children:r}):null]})});_u.displayName="FormItem";const ju=N.forwardRef(({src:e,alt:t,fallback:n,isLazy:r=!0,shape:o="square",className:a,onError:i,...s},c)=>{const[u,d]=N.useState(!1),[m,p]=N.useState(!0),h=v=>{d(!0),i==null||i(v)},y=()=>{p(!1)},g={square:"",rounded:"rounded-lg",circle:"rounded-full"};return f.jsxs("div",{className:k("relative overflow-hidden",g[o],a),children:[m?f.jsx("div",{"aria-hidden":"true",className:"absolute inset-0 animate-pulse bg-muted",role:"presentation"}):null,f.jsx("img",{ref:c,alt:t,className:k("h-full w-full object-cover",m&&"invisible"),loading:r?"lazy":"eager",src:u&&n?n:e,onError:h,onLoad:y,...s})]})});ju.displayName="Image";const Fu=l.forwardRef(({className:e,type:t,transform:n="none",isDisabled:r=!1,onChange:o,...a},i)=>{const s=De({isDisabled:r}),c=u=>{if(!o)return;let d=u.target.value;(Array.isArray(n)?n:[n]).forEach(p=>{switch(p){case"uppercase":d=d.toUpperCase();break;case"lowercase":d=d.toLowerCase();break;case"trim":d=d.trim();break}}),u.target.value=d,o(u)};return f.jsx("input",{ref:i,className:k(ie.input,e),type:t,onChange:c,...a,...s})});Fu.displayName="Input";const $u=N.forwardRef(({options:e,value:t,onChange:n,placeholder:r="Select items...",searchPlaceholder:o="Search items...",emptyMessage:a="No items found",className:i,listClassName:s,zIndex:c,isDisabled:u=!1,...d},m)=>{const[p,h]=N.useState(!1),y=Ye("dropdown",c),g=t.map(b=>{var x;return((x=e.find(w=>w.value===b))==null?void 0:x.label)||b}),v=()=>t.length===0?f.jsx("span",{className:"self-center text-muted-foreground",children:r}):f.jsx("div",{className:"flex flex-1 flex-wrap gap-1",children:g.map((b,x)=>f.jsxs("div",{className:`flex items-center gap-1 rounded-sm bg-secondary px-2 py-0.5 text-sm
|
|
176
|
+
text-secondary-foreground`,children:[b,f.jsx(pr,{"aria-label":`Remove ${b}`,className:"h-3 w-3 cursor-pointer opacity-50 hover:opacity-100",role:"button",strokeWidth:3,onClick:w=>{w.stopPropagation(),n(t.filter((S,C)=>C!==x))}})]},t[x]))});return f.jsxs(Qt,{open:p,onOpenChange:h,children:[f.jsx(Jt,{asChild:!0,children:f.jsxs(Ie,{ref:m,"aria-expanded":p,className:k("flex h-auto min-h-[2.5rem] w-full items-stretch justify-between px-3 py-1.5",i),isDisabled:u,role:"combobox",variant:"input",...d,children:[f.jsx("div",{className:"flex flex-1 text-left",children:v()}),f.jsx(Zo,{className:"ml-2 h-4 w-4 shrink-0 self-center opacity-50"})]})}),f.jsx(It,{align:"start",className:"w-[--radix-popover-trigger-width] px-0 py-0",zIndex:y,children:f.jsxs(xr,{children:[f.jsx(Cr,{placeholder:o}),f.jsxs(Nr,{className:k("max-h-[16.5rem] overflow-y-auto",s),children:[f.jsx(sa,{children:a}),f.jsx(wr,{children:e.map(b=>f.jsx(Sr,{value:b.value,onSelect:()=>{n(t.includes(b.value)?t.filter(x=>x!==b.value):[...t,b.value])},children:f.jsxs("div",{className:"flex items-center",children:[f.jsx("div",{className:k(`mr-2 flex h-4 w-4 items-center justify-center rounded-sm border
|
|
177
|
+
border-primary-400`,t.includes(b.value)?"bg-primary-400 text-white":"opacity-50"),children:t.includes(b.value)?f.jsx(Ot,{className:"h-3 w-3",strokeWidth:3}):null}),b.label]})},b.value))})]})]})})]})});$u.displayName="MultiSelect";var go="rovingFocusGroup.onEntryFocus",e0={bubbles:!1,cancelable:!0},Bn="RovingFocusGroup",[Io,Lu,t0]=Nn(Bn),[n0,Wu]=ve(Bn,[t0]),[r0,o0]=n0(Bn),Bu=l.forwardRef((e,t)=>f.jsx(Io.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx(Io.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(a0,{...e,ref:t})})}));Bu.displayName=Bn;var a0=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...m}=e,p=l.useRef(null),h=z(t,p),y=xt(a),[g,v]=Ce({prop:i,defaultProp:s??null,onChange:c,caller:Bn}),[b,x]=l.useState(!1),w=Ne(u),S=Lu(n),C=l.useRef(!1),[M,E]=l.useState(0);return l.useEffect(()=>{const P=p.current;if(P)return P.addEventListener(go,w),()=>P.removeEventListener(go,w)},[w]),f.jsx(r0,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:l.useCallback(P=>v(P),[v]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>E(P=>P+1),[]),onFocusableItemRemove:l.useCallback(()=>E(P=>P-1),[]),children:f.jsx(V.div,{tabIndex:b||M===0?-1:0,"data-orientation":r,...m,ref:h,style:{outline:"none",...e.style},onMouseDown:O(e.onMouseDown,()=>{C.current=!0}),onFocus:O(e.onFocus,P=>{const F=!C.current;if(P.target===P.currentTarget&&F&&!b){const _=new CustomEvent(go,e0);if(P.currentTarget.dispatchEvent(_),!_.defaultPrevented){const $=S().filter(j=>j.focusable),D=$.find(j=>j.active),B=$.find(j=>j.id===g),q=[D,B,...$].filter(Boolean).map(j=>j.ref.current);Hu(q,d)}}C.current=!1}),onBlur:O(e.onBlur,()=>x(!1))})})}),Vu="RovingFocusGroupItem",Yu=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,c=pe(),u=a||c,d=o0(Vu,n),m=d.currentTabStopId===u,p=Lu(n),{onFocusableItemAdd:h,onFocusableItemRemove:y}=d;return l.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),f.jsx(Io.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:f.jsx(V.span,{tabIndex:m?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:O(e.onMouseDown,g=>{r?d.onItemFocus(u):g.preventDefault()}),onFocus:O(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:O(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const v=c0(g,d.orientation,d.dir);if(v!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let x=p().filter(w=>w.focusable).map(w=>w.ref.current);if(v==="last")x.reverse();else if(v==="prev"||v==="next"){v==="prev"&&x.reverse();const w=x.indexOf(g.currentTarget);x=d.loop?l0(x,w+1):x.slice(w+1)}setTimeout(()=>Hu(x))}}),children:typeof i=="function"?i({isCurrentTabStop:m}):i})})});Yu.displayName=Vu;var s0={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function i0(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function c0(e,t,n){const r=i0(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return s0[r]}function Hu(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function l0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var u0=Bu,d0=Yu,Ia="Radio",[f0,Gu]=ve(Ia),[m0,p0]=f0(Ia),Uu=l.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:s="on",onCheck:c,form:u,...d}=e,[m,p]=l.useState(null),h=z(t,v=>p(v)),y=l.useRef(!1),g=m?u||!!m.closest("form"):!0;return f.jsxs(m0,{scope:n,checked:o,disabled:i,children:[f.jsx(V.button,{type:"button",role:"radio","aria-checked":o,"data-state":Xu(o),"data-disabled":i?"":void 0,disabled:i,value:s,...d,ref:h,onClick:O(e.onClick,v=>{o||c==null||c(),g&&(y.current=v.isPropagationStopped(),y.current||v.stopPropagation())})}),g&&f.jsx(qu,{control:m,bubbles:!y.current,name:r,value:s,checked:o,required:a,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});Uu.displayName=Ia;var zu="RadioIndicator",Ku=l.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=p0(zu,n);return f.jsx(Te,{present:r||a.checked,children:f.jsx(V.span,{"data-state":Xu(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Ku.displayName=zu;var h0="RadioBubbleInput",qu=l.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=l.useRef(null),s=z(i,a),c=Ir(n),u=Dn(t);return l.useEffect(()=>{const d=i.current;if(!d)return;const m=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(m,"checked").set;if(c!==n&&h){const y=new Event("click",{bubbles:r});h.call(d,n),d.dispatchEvent(y)}},[c,n,r]),f.jsx(V.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});qu.displayName=h0;function Xu(e){return e?"checked":"unchecked"}var g0=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Fr="RadioGroup",[v0,JN]=ve(Fr,[Wu,Gu]),Zu=Wu(),Qu=Gu(),[y0,b0]=v0(Fr),Ju=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:i=!1,disabled:s=!1,orientation:c,dir:u,loop:d=!0,onValueChange:m,...p}=e,h=Zu(n),y=xt(u),[g,v]=Ce({prop:a,defaultProp:o??"",onChange:m,caller:Fr});return f.jsx(y0,{scope:n,name:r,required:i,disabled:s,value:g,onValueChange:v,children:f.jsx(u0,{asChild:!0,...h,orientation:c,dir:y,loop:d,children:f.jsx(V.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":s?"":void 0,dir:y,...p,ref:t})})})});Ju.displayName=Fr;var ed="RadioGroupItem",td=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=b0(ed,n),i=a.disabled||r,s=Zu(n),c=Qu(n),u=l.useRef(null),d=z(t,u),m=a.value===o.value,p=l.useRef(!1);return l.useEffect(()=>{const h=g=>{g0.includes(g.key)&&(p.current=!0)},y=()=>p.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",y)}},[]),f.jsx(d0,{asChild:!0,...s,focusable:!i,active:m,children:f.jsx(Uu,{disabled:i,required:a.required,checked:m,...c,...o,name:a.name,ref:d,onCheck:()=>a.onValueChange(o.value),onKeyDown:O(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:O(o.onFocus,()=>{var h;p.current&&((h=u.current)==null||h.click())})})})});td.displayName=ed;var x0="RadioGroupIndicator",nd=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Qu(n);return f.jsx(Ku,{...o,...r,ref:t})});nd.displayName=x0;var w0=Ju,Da=td,C0=nd;const rd=l.forwardRef(({id:e,label:t,description:n,isChecked:r,isDisabled:o,className:a,"aria-label":i,...s},c)=>{const u=De({isDisabled:o}),{ariaProps:d,labelId:m,descriptionId:p}=En({label:t,description:n,"aria-label":i}),h=()=>t?typeof t=="string"?f.jsx("span",{className:"font-medium",id:m,children:t}):f.jsx("span",{id:m,children:t}):null;return f.jsxs("div",{className:k("relative",r?k(ie.button,at({variant:"primary"})):k(ie.button,at({variant:"input"})),o&&"pointer-events-none cursor-not-allowed opacity-50",a),children:[f.jsx(Da,{ref:c,checked:r,className:"absolute inset-0 opacity-0",id:e,...d,...s,...u}),f.jsxs("div",{className:"flex items-center gap-2",children:[h(),n?f.jsx("span",{className:"text-sm text-muted-foreground",id:p,children:n}):null]})]})});rd.displayName="RadioButton";const od="aspect-square h-5 w-5 rounded-full border-2 border-gray-500 text-primary-400 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 data-[state=checked]:border-primary-400 ",ad=l.forwardRef(({id:e,label:t,isChecked:n,isDisabled:r,className:o,"aria-label":a,...i},s)=>{const c=De({isDisabled:r});return f.jsxs("div",{className:k("flex items-center gap-2",r&&"cursor-not-allowed opacity-50 [&>*]:cursor-not-allowed"),children:[f.jsx(Da,{ref:s,"aria-label":a,checked:n,className:k(ie.focusRingVisible,ie.focusRingVisibleSm,od,o),id:e,...i,...c,children:f.jsx(C0,{className:"flex items-center justify-center",children:f.jsx(vi,{className:"h-3 w-3 fill-current text-current"})})}),f.jsx($l,{id:e,label:t})]})});ad.displayName="RadioDefault";const sd=l.forwardRef(({id:e,label:t,description:n,isChecked:r,isDisabled:o,className:a,"aria-label":i,...s},c)=>{const u=De({isDisabled:o}),{ariaProps:d,labelId:m,descriptionId:p}=En({label:t,description:n,"aria-label":i}),h=()=>t?typeof t=="string"?f.jsx("div",{className:"font-medium",id:m,children:t}):f.jsx("div",{id:m,children:t}):null;return f.jsxs("div",{className:k("relative rounded-lg border-2 border-muted bg-popover px-4 py-4",r&&"border-primary-400",o?"cursor-not-allowed opacity-50 [&_*]:cursor-not-allowed":"cursor-pointer hover:bg-accent hover:text-accent-foreground",a),children:[f.jsx(Da,{ref:c,checked:r,className:"absolute inset-0 opacity-0",id:e,...d,...s,...u}),f.jsxs("div",{className:"flex items-start gap-3",children:[f.jsx("div",{className:k(od,"pointer-events-none mt-1",r&&"border-primary-400"),children:r?f.jsx("div",{className:"flex h-full w-full items-center justify-center",children:f.jsx(vi,{className:"h-3 w-3 fill-current text-primary-400"})}):null}),f.jsxs("div",{className:"pointer-events-none space-y-1",children:[h(),n?f.jsx("p",{className:"text-sm text-muted-foreground",id:p,children:n}):null]})]})]})});sd.displayName="RadioTile";const Ta=l.forwardRef(({className:e,label:t,description:n,id:r,"aria-label":o,isChecked:a=!1,isDisabled:i=!1,variant:s="default",...c},u)=>{kl("Radio",t,o);let d=ad;return s==="button"?d=rd:s==="tile"&&(d=sd),f.jsx(d,{ref:u,"aria-label":o,className:e,description:n,id:r,isChecked:a,isDisabled:i,label:t,...c})});Ta.displayName="Radio";const id=l.forwardRef(({options:e,value:t,onChange:n,className:r,columns:o=2,orientation:a="vertical",variant:i="default",...s},c)=>{const u=Qo({variant:i,orientation:a,columns:o});return f.jsx(w0,{ref:c,className:k(u,r),value:t,onValueChange:n,...s,children:e.map(d=>f.jsx(Ta,{description:d.description,id:d.value,isChecked:t===d.value,label:d.label,value:d.value,variant:i},d.value))})});id.displayName="RadioGroup";function Ls(e,[t,n]){return Math.min(n,Math.max(t,e))}var cd=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),S0="VisuallyHidden",N0=l.forwardRef((e,t)=>f.jsx(V.span,{...e,ref:t,style:{...cd,...e.style}}));N0.displayName=S0;var E0=[" ","Enter","ArrowUp","ArrowDown"],M0=[" ","Enter"],Pt="Select",[$r,Lr,R0]=Nn(Pt),[tn,eE]=ve(Pt,[R0,Zt]),Wr=Zt(),[P0,Ct]=tn(Pt),[k0,O0]=tn(Pt),ld=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:s,onValueChange:c,dir:u,name:d,autoComplete:m,disabled:p,required:h,form:y}=e,g=Wr(t),[v,b]=l.useState(null),[x,w]=l.useState(null),[S,C]=l.useState(!1),M=xt(u),[E,P]=Ce({prop:r,defaultProp:o??!1,onChange:a,caller:Pt}),[F,_]=Ce({prop:i,defaultProp:s,onChange:c,caller:Pt}),$=l.useRef(null),D=v?y||!!v.closest("form"):!0,[B,Y]=l.useState(new Set),q=Array.from(B).map(j=>j.props.value).join(";");return f.jsx(ga,{...g,children:f.jsxs(P0,{required:h,scope:t,trigger:v,onTriggerChange:b,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:pe(),value:F,onValueChange:_,open:E,onOpenChange:P,dir:M,triggerPointerDownPosRef:$,disabled:p,children:[f.jsx($r.Provider,{scope:t,children:f.jsx(k0,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(j=>{Y(G=>new Set(G).add(j))},[]),onNativeOptionRemove:l.useCallback(j=>{Y(G=>{const A=new Set(G);return A.delete(j),A})},[]),children:n})}),D?f.jsxs(Dd,{"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:m,value:F,onChange:j=>_(j.target.value),disabled:p,form:y,children:[F===void 0?f.jsx("option",{value:""}):null,Array.from(B)]},q):null]})})};ld.displayName=Pt;var ud="SelectTrigger",dd=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=Wr(n),i=Ct(ud,n),s=i.disabled||r,c=z(t,i.onTriggerChange),u=Lr(n),d=l.useRef("touch"),[m,p,h]=Ad(g=>{const v=u().filter(w=>!w.disabled),b=v.find(w=>w.value===i.value),x=_d(v,g,b);x!==void 0&&i.onValueChange(x.value)}),y=g=>{s||(i.onOpenChange(!0),h()),g&&(i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return f.jsx(Pr,{asChild:!0,...a,children:f.jsx(V.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Td(i.value)?"":void 0,...o,ref:c,onClick:O(o.onClick,g=>{g.currentTarget.focus(),d.current!=="mouse"&&y(g)}),onPointerDown:O(o.onPointerDown,g=>{d.current=g.pointerType;const v=g.target;v.hasPointerCapture(g.pointerId)&&v.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(y(g),g.preventDefault())}),onKeyDown:O(o.onKeyDown,g=>{const v=m.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&p(g.key),!(v&&g.key===" ")&&E0.includes(g.key)&&(y(),g.preventDefault())})})})});dd.displayName=ud;var fd="SelectValue",md=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...s}=e,c=Ct(fd,n),{onValueNodeHasChildrenChange:u}=c,d=a!==void 0,m=z(t,c.onValueNodeChange);return de(()=>{u(d)},[u,d]),f.jsx(V.span,{...s,ref:m,style:{pointerEvents:"none"},children:Td(c.value)?f.jsx(f.Fragment,{children:i}):a})});md.displayName=fd;var I0="SelectIcon",pd=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return f.jsx(V.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});pd.displayName=I0;var D0="SelectPortal",hd=e=>f.jsx(Pn,{asChild:!0,...e});hd.displayName=D0;var kt="SelectContent",gd=l.forwardRef((e,t)=>{const n=Ct(kt,e.__scopeSelect),[r,o]=l.useState();if(de(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Sn.createPortal(f.jsx(vd,{scope:e.__scopeSelect,children:f.jsx($r.Slot,{scope:e.__scopeSelect,children:f.jsx("div",{children:e.children})})}),a):null}return f.jsx(yd,{...e,ref:t})});gd.displayName=kt;var Fe=10,[vd,St]=tn(kt),T0="SelectContentImpl",A0=ht("SelectContent.RemoveScroll"),yd=l.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:m,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:g,avoidCollisions:v,...b}=e,x=Ct(kt,n),[w,S]=l.useState(null),[C,M]=l.useState(null),E=z(t,T=>S(T)),[P,F]=l.useState(null),[_,$]=l.useState(null),D=Lr(n),[B,Y]=l.useState(!1),q=l.useRef(!1);l.useEffect(()=>{if(w)return vr(w)},[w]),hr();const j=l.useCallback(T=>{const[Z,...K]=D().map(oe=>oe.ref.current),[te]=K.slice(-1),re=document.activeElement;for(const oe of T)if(oe===re||(oe==null||oe.scrollIntoView({block:"nearest"}),oe===Z&&C&&(C.scrollTop=0),oe===te&&C&&(C.scrollTop=C.scrollHeight),oe==null||oe.focus(),document.activeElement!==re))return},[D,C]),G=l.useCallback(()=>j([P,w]),[j,P,w]);l.useEffect(()=>{B&&G()},[B,G]);const{onOpenChange:A,triggerPointerDownPosRef:I}=x;l.useEffect(()=>{if(w){let T={x:0,y:0};const Z=te=>{var re,oe;T={x:Math.abs(Math.round(te.pageX)-(((re=I.current)==null?void 0:re.x)??0)),y:Math.abs(Math.round(te.pageY)-(((oe=I.current)==null?void 0:oe.y)??0))}},K=te=>{T.x<=10&&T.y<=10?te.preventDefault():w.contains(te.target)||A(!1),document.removeEventListener("pointermove",Z),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",K,{capture:!0})}}},[w,A,I]),l.useEffect(()=>{const T=()=>A(!1);return window.addEventListener("blur",T),window.addEventListener("resize",T),()=>{window.removeEventListener("blur",T),window.removeEventListener("resize",T)}},[A]);const[Q,J]=Ad(T=>{const Z=D().filter(re=>!re.disabled),K=Z.find(re=>re.ref.current===document.activeElement),te=_d(Z,T,K);te&&setTimeout(()=>te.ref.current.focus())}),R=l.useCallback((T,Z,K)=>{const te=!q.current&&!K;(x.value!==void 0&&x.value===Z||te)&&(F(T),te&&(q.current=!0))},[x.value]),L=l.useCallback(()=>w==null?void 0:w.focus(),[w]),U=l.useCallback((T,Z,K)=>{const te=!q.current&&!K;(x.value!==void 0&&x.value===Z||te)&&$(T)},[x.value]),W=r==="popper"?Do:bd,X=W===Do?{side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:m,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:g,avoidCollisions:v}:{};return f.jsx(vd,{scope:n,content:w,viewport:C,onViewportChange:M,itemRefCallback:R,selectedItem:P,onItemLeave:L,itemTextRefCallback:U,focusSelectedItem:G,selectedItemText:_,position:r,isPositioned:B,searchRef:Q,children:f.jsx(kn,{as:A0,allowPinchZoom:!0,children:f.jsx(Rn,{asChild:!0,trapped:x.open,onMountAutoFocus:T=>{T.preventDefault()},onUnmountAutoFocus:O(o,T=>{var Z;(Z=x.trigger)==null||Z.focus({preventScroll:!0}),T.preventDefault()}),children:f.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:T=>T.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:f.jsx(W,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:T=>T.preventDefault(),...b,...X,onPlaced:()=>Y(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:O(b.onKeyDown,T=>{const Z=T.ctrlKey||T.altKey||T.metaKey;if(T.key==="Tab"&&T.preventDefault(),!Z&&T.key.length===1&&J(T.key),["ArrowUp","ArrowDown","Home","End"].includes(T.key)){let te=D().filter(re=>!re.disabled).map(re=>re.ref.current);if(["ArrowUp","End"].includes(T.key)&&(te=te.slice().reverse()),["ArrowUp","ArrowDown"].includes(T.key)){const re=T.target,oe=te.indexOf(re);te=te.slice(oe+1)}setTimeout(()=>j(te)),T.preventDefault()}})})})})})})});yd.displayName=T0;var _0="SelectItemAlignedPosition",bd=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Ct(kt,n),i=St(kt,n),[s,c]=l.useState(null),[u,d]=l.useState(null),m=z(t,E=>d(E)),p=Lr(n),h=l.useRef(!1),y=l.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:b,focusSelectedItem:x}=i,w=l.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&g&&v&&b){const E=a.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),F=a.valueNode.getBoundingClientRect(),_=b.getBoundingClientRect();if(a.dir!=="rtl"){const re=_.left-P.left,oe=F.left-re,he=E.left-oe,be=E.width+he,Je=Math.max(be,P.width),et=window.innerWidth-Fe,tt=Ls(oe,[Fe,Math.max(Fe,et-Je)]);s.style.minWidth=be+"px",s.style.left=tt+"px"}else{const re=P.right-_.right,oe=window.innerWidth-F.right-re,he=window.innerWidth-E.right-oe,be=E.width+he,Je=Math.max(be,P.width),et=window.innerWidth-Fe,tt=Ls(oe,[Fe,Math.max(Fe,et-Je)]);s.style.minWidth=be+"px",s.style.right=tt+"px"}const $=p(),D=window.innerHeight-Fe*2,B=g.scrollHeight,Y=window.getComputedStyle(u),q=parseInt(Y.borderTopWidth,10),j=parseInt(Y.paddingTop,10),G=parseInt(Y.borderBottomWidth,10),A=parseInt(Y.paddingBottom,10),I=q+j+B+A+G,Q=Math.min(v.offsetHeight*5,I),J=window.getComputedStyle(g),R=parseInt(J.paddingTop,10),L=parseInt(J.paddingBottom,10),U=E.top+E.height/2-Fe,W=D-U,X=v.offsetHeight/2,T=v.offsetTop+X,Z=q+j+T,K=I-Z;if(Z<=U){const re=$.length>0&&v===$[$.length-1].ref.current;s.style.bottom="0px";const oe=u.clientHeight-g.offsetTop-g.offsetHeight,he=Math.max(W,X+(re?L:0)+oe+G),be=Z+he;s.style.height=be+"px"}else{const re=$.length>0&&v===$[0].ref.current;s.style.top="0px";const he=Math.max(U,q+g.offsetTop+(re?R:0)+X)+K;s.style.height=he+"px",g.scrollTop=Z-U+g.offsetTop}s.style.margin=`${Fe}px 0`,s.style.minHeight=Q+"px",s.style.maxHeight=D+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[p,a.trigger,a.valueNode,s,u,g,v,b,a.dir,r]);de(()=>w(),[w]);const[S,C]=l.useState();de(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const M=l.useCallback(E=>{E&&y.current===!0&&(w(),x==null||x(),y.current=!1)},[w,x]);return f.jsx(F0,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:M,children:f.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:f.jsx(V.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});bd.displayName=_0;var j0="SelectPopperPosition",Do=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Fe,...a}=e,i=Wr(n);return f.jsx(va,{...i,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Do.displayName=j0;var[F0,Aa]=tn(kt,{}),To="SelectViewport",xd=l.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=St(To,n),i=Aa(To,n),s=z(t,a.onViewportChange),c=l.useRef(0);return f.jsxs(f.Fragment,{children:[f.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),f.jsx($r.Slot,{scope:n,children:f.jsx(V.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:O(o.onScroll,u=>{const d=u.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&m){const h=Math.abs(c.current-d.scrollTop);if(h>0){const y=window.innerHeight-Fe*2,g=parseFloat(m.style.minHeight),v=parseFloat(m.style.height),b=Math.max(g,v);if(b<y){const x=b+h,w=Math.min(y,x),S=x-w;m.style.height=w+"px",m.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,m.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});xd.displayName=To;var wd="SelectGroup",[$0,L0]=tn(wd),Cd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=pe();return f.jsx($0,{scope:n,id:o,children:f.jsx(V.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Cd.displayName=wd;var Sd="SelectLabel",Nd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=L0(Sd,n);return f.jsx(V.div,{id:o.id,...r,ref:t})});Nd.displayName=Sd;var ur="SelectItem",[W0,Ed]=tn(ur),Md=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,s=Ct(ur,n),c=St(ur,n),u=s.value===r,[d,m]=l.useState(a??""),[p,h]=l.useState(!1),y=z(t,x=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,x,r,o)}),g=pe(),v=l.useRef("touch"),b=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return f.jsx(W0,{scope:n,value:r,disabled:o,textId:g,isSelected:u,onItemTextChange:l.useCallback(x=>{m(w=>w||((x==null?void 0:x.textContent)??"").trim())},[]),children:f.jsx($r.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:f.jsx(V.div,{role:"option","aria-labelledby":g,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:y,onFocus:O(i.onFocus,()=>h(!0)),onBlur:O(i.onBlur,()=>h(!1)),onClick:O(i.onClick,()=>{v.current!=="mouse"&&b()}),onPointerUp:O(i.onPointerUp,()=>{v.current==="mouse"&&b()}),onPointerDown:O(i.onPointerDown,x=>{v.current=x.pointerType}),onPointerMove:O(i.onPointerMove,x=>{var w;v.current=x.pointerType,o?(w=c.onItemLeave)==null||w.call(c):v.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:O(i.onPointerLeave,x=>{var w;x.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:O(i.onKeyDown,x=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&x.key===" "||(M0.includes(x.key)&&b(),x.key===" "&&x.preventDefault())})})})})});Md.displayName=ur;var fn="SelectItemText",Rd=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=Ct(fn,n),s=St(fn,n),c=Ed(fn,n),u=O0(fn,n),[d,m]=l.useState(null),p=z(t,b=>m(b),c.onItemTextChange,b=>{var x;return(x=s.itemTextRefCallback)==null?void 0:x.call(s,b,c.value,c.disabled)}),h=d==null?void 0:d.textContent,y=l.useMemo(()=>f.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=u;return de(()=>(g(y),()=>v(y)),[g,v,y]),f.jsxs(f.Fragment,{children:[f.jsx(V.span,{id:c.textId,...a,ref:p}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Sn.createPortal(a.children,i.valueNode):null]})});Rd.displayName=fn;var Pd="SelectItemIndicator",kd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Ed(Pd,n).isSelected?f.jsx(V.span,{"aria-hidden":!0,...r,ref:t}):null});kd.displayName=Pd;var Ao="SelectScrollUpButton",B0=l.forwardRef((e,t)=>{const n=St(Ao,e.__scopeSelect),r=Aa(Ao,e.__scopeSelect),[o,a]=l.useState(!1),i=z(t,r.onScrollButtonChange);return de(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=c.scrollTop>0;a(u)};const c=n.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?f.jsx(Od,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}}):null});B0.displayName=Ao;var _o="SelectScrollDownButton",V0=l.forwardRef((e,t)=>{const n=St(_o,e.__scopeSelect),r=Aa(_o,e.__scopeSelect),[o,a]=l.useState(!1),i=z(t,r.onScrollButtonChange);return de(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;a(d)};const c=n.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?f.jsx(Od,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}}):null});V0.displayName=_o;var Od=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=St("SelectScrollButton",n),i=l.useRef(null),s=Lr(n),c=l.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),de(()=>{var d;const u=s().find(m=>m.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[s]),f.jsx(V.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:O(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:O(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:O(o.onPointerLeave,()=>{c()})})}),Y0="SelectSeparator",Id=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return f.jsx(V.div,{"aria-hidden":!0,...r,ref:t})});Id.displayName=Y0;var jo="SelectArrow",H0=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Wr(n),a=Ct(jo,n),i=St(jo,n);return a.open&&i.position==="popper"?f.jsx(ya,{...o,...r,ref:t}):null});H0.displayName=jo;var G0="SelectBubbleInput",Dd=l.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=l.useRef(null),a=z(r,o),i=Ir(t);return l.useEffect(()=>{const s=o.current;if(!s)return;const c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&d){const m=new Event("change",{bubbles:!0});d.call(s,t),s.dispatchEvent(m)}},[i,t]),f.jsx(V.select,{...n,style:{...cd,...n.style},ref:a,defaultValue:t})});Dd.displayName=G0;function Td(e){return e===""||e===void 0}function Ad(e){const t=Ne(e),n=l.useRef(""),r=l.useRef(0),o=l.useCallback(i=>{const s=n.current+i;t(s),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(s)},[t]),a=l.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function _d(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let i=U0(e,Math.max(a,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function U0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var z0=ld,jd=dd,K0=md,q0=pd,X0=hd,Fd=gd,Z0=xd,Q0=Cd,$d=Nd,Ld=Md,J0=Rd,eS=kd,Wd=Id;const _a=l.forwardRef(({className:e,children:t,position:n="popper",zIndex:r,style:o,...a},i)=>f.jsx(X0,{children:f.jsx(Fd,{ref:i,className:k(`relative min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground
|
|
180
178
|
shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out
|
|
181
179
|
data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95
|
|
182
180
|
data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2
|
|
183
181
|
data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2
|
|
184
182
|
data-[side=top]:slide-in-from-bottom-2`,n==="popper"&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1
|
|
185
|
-
data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,style:{zIndex:r,...o},...a,children:f.jsx(
|
|
186
|
-
min-w-[var(--radix-select-trigger-width)]`),children:t})})}));
|
|
183
|
+
data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,style:{zIndex:r,...o},...a,children:f.jsx(Z0,{className:k("px-1 py-1",n==="popper"&&`h-[var(--radix-select-trigger-height)] w-full
|
|
184
|
+
min-w-[var(--radix-select-trigger-width)]`),children:t})})}));_a.displayName=Fd.displayName;const ja=l.forwardRef(({className:e,children:t,...n},r)=>f.jsxs(Ld,{ref:r,className:k(`relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2
|
|
187
185
|
text-sm outline-none focus:bg-accent focus:text-accent-foreground
|
|
188
|
-
data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[f.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:f.jsx(
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
186
|
+
data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[f.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:f.jsx(eS,{children:f.jsx(Ot,{className:"h-4 w-4",strokeWidth:3})})}),f.jsx(J0,{children:t})]}));ja.displayName=Ld.displayName;const Fa=l.forwardRef(({className:e,children:t,isDisabled:n=!1,...r},o)=>{const a=De({isDisabled:n});return f.jsxs(jd,{ref:o,className:k(ie.input,ie.focusRing,`min-w-0 items-center justify-between text-left [&>span]:min-w-0 [&>span]:flex-1
|
|
187
|
+
[&>span]:truncate [&>span]:text-muted-foreground [&>svg]:flex-shrink-0`,e),...r,...a,children:[t,f.jsx(q0,{asChild:!0,children:f.jsx(qo,{className:"h-4 w-4 opacity-50"})})]})});Fa.displayName=jd.displayName;const Bd=z0,tS=Q0,Vd=K0,$a=l.forwardRef(({options:e,value:t,onChange:n,placeholder:r="Select an option",className:o,zIndex:a,isDisabled:i,...s},c)=>{const u=Ye("dropdown",a);return f.jsxs(Bd,{value:t,onValueChange:n,children:[f.jsx(Fa,{ref:c,className:k("w-full justify-between",!t&&"text-muted-foreground",o),isDisabled:i,...s,children:f.jsx(Vd,{placeholder:r})}),f.jsx(_a,{zIndex:u,children:e.map(d=>f.jsx(ja,{value:d.value,children:d.label},d.value))})]})});$a.displayName="Select";const Yd=l.forwardRef(({className:e,...t},n)=>f.jsx($d,{ref:n,className:k("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Yd.displayName=$d.displayName;const Hd=l.forwardRef(({className:e,...t},n)=>f.jsx(Wd,{ref:n,className:k("-mx-1 my-1 h-px bg-muted",e),...t}));Hd.displayName=Wd.displayName;const nS=Se("flex",{variants:{orientation:{horizontal:"flex-row gap-6",vertical:"flex-col gap-10"}},defaultVariants:{orientation:"horizontal"}}),rS=Se(`text-md relative z-10 flex h-9 w-9 items-center justify-center rounded-full border-4 bg-white
|
|
188
|
+
font-bold`,{variants:{status:{default:"border-muted text-muted-foreground",current:"border-primary-400 text-primary-400",completed:"border-primary-400 bg-primary-400 text-white"}},defaultVariants:{status:"default"}}),oS=Se("absolute",{variants:{status:{default:"bg-muted",current:"bg-muted",completed:"bg-primary-400"},orientation:{horizontal:"left-[calc(50%_+_1.5rem)] top-4 h-1 w-[calc(100%_-_1.5rem)]",vertical:"left-4 top-[calc(100%_-_0.125rem)] h-[calc(100%_-_0.25rem)] w-1"}},defaultVariants:{status:"default",orientation:"horizontal"}}),aS=Se("flex flex-col gap-8",{variants:{orientation:{horizontal:"",vertical:""}}}),sS=Se("flex gap-1",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col"}},defaultVariants:{orientation:"horizontal"}}),iS=Se("relative",{variants:{status:{default:"bg-muted",current:"bg-primary-400",completed:"bg-primary-500"},orientation:{horizontal:"h-2 max-h-2 min-h-2 flex-1",vertical:"w-2 min-w-2 max-w-2 flex-1"}},defaultVariants:{status:"default",orientation:"horizontal"}}),cS=Se("text-base font-medium leading-tight",{variants:{status:{default:"text-muted-foreground",completed:"text-foreground",current:"font-bold text-primary-400"}},defaultVariants:{status:"default"}}),lS=Se("mt-0.5 text-sm text-muted-foreground",{variants:{status:{default:"",completed:"text-foreground",current:"font-medium text-primary-400"}},defaultVariants:{status:"default"}});function Gd({className:e,description:t,label:n,status:r}){return f.jsxs("div",{className:e,children:[f.jsx("span",{className:k(cS({status:r})),children:n}),t?f.jsx("span",{className:k(lS({status:r})),children:t}):null]})}function Ud(e,t){return t?"completed":e?"current":"default"}function zd(e){return e==="completed"?" completed":e==="current"?"":" not completed"}function uS({currentStep:e,currentStepIndex:t,orientation:n,showCurrentAsCompleted:r,steps:o}){return f.jsx("ol",{"aria-label":"Steps",className:k(nS({orientation:n})),children:o.map((a,i)=>{const s=a.id===e,c=t!==-1&&(i<t||r&&s),u=Ud(s,c);return f.jsxs("li",{className:k("relative flex items-start",n==="horizontal"&&"flex-1 justify-center"),...s&&{"aria-current":"step"},children:[f.jsxs("span",{className:"sr-only",children:[a.label,zd(u)]}),f.jsxs("div",{className:k("relative flex",n==="vertical"?"flex-row items-start":"flex-col items-center"),children:[f.jsx("div",{className:k(rS({status:u})),children:u==="completed"?f.jsx(Ot,{className:"h-4 w-4",strokeWidth:3}):f.jsx("span",{children:(i+1).toString()})}),f.jsx(Gd,{className:k("flex flex-col",n==="vertical"?"ml-4":"mt-2 text-center"),description:a.description,label:a.label,status:u})]}),i<o.length-1?f.jsx("div",{className:k(oS({orientation:n,status:u}))}):null]},a.id)})})}function dS({currentStepLabel:e,currentStepNumber:t,headingLevel:n="h4",totalSteps:r}){const o=n;return f.jsxs(o,{className:"flex items-center gap-3 text-xl",children:[f.jsxs("span",{className:"inline-flex items-center gap-1",children:[f.jsx("span",{className:"sr-only",children:"Step"}),f.jsx("span",{className:`mr-0.5 inline-flex h-9 w-9 items-center justify-center rounded-full
|
|
189
|
+
bg-primary-400 text-white`,children:t}),f.jsx("span",{className:"text-primary-400",children:"of"}),f.jsx("span",{className:"text-primary-400",children:r})]}),f.jsx("span",{className:"font-bold",children:e})]})}function fS({currentStep:e,currentStepIndex:t,showCurrentAsCompleted:n,steps:r}){return f.jsx("ol",{"aria-label":"Steps",className:k(sS({orientation:"horizontal"})),children:r.map((o,a)=>{const i=o.id===e,s=t!==-1&&(a<t||n&&i),c=Ud(i,s);return f.jsxs("li",{className:"flex flex-1 flex-col",...i&&{"aria-current":"step"},children:[f.jsx("div",{className:k(iS({status:c,orientation:"horizontal"})),children:f.jsxs("span",{className:"sr-only",children:[o.label,zd(c)]})}),f.jsx(Gd,{className:"mt-2 flex flex-col",description:o.description,label:o.label,status:c})]},o.id)})})}function mS({className:e,currentStep:t,headingLevel:n="h4",showCurrentAsCompleted:r=!1,variant:o="default",steps:a,...i},s){const c=a.findIndex(p=>p.id===t),u=a[c],d=c+1,m=a.length;return f.jsxs("section",{ref:s,"aria-label":"Step indicator",className:k(aS({orientation:"horizontal"}),e),...i,children:[o==="counter"?f.jsx(uS,{currentStep:t,currentStepIndex:c,orientation:"horizontal",showCurrentAsCompleted:r,steps:a}):f.jsx(fS,{currentStep:t,currentStepIndex:c,showCurrentAsCompleted:r,steps:a}),f.jsx(dS,{currentStepLabel:u==null?void 0:u.label,currentStepNumber:d,headingLevel:n,totalSteps:m})]})}const Kd=l.forwardRef(mS);Kd.displayName="StepIndicator";const pS=Kd;var Br="Switch",[hS,tE]=ve(Br),[gS,vS]=hS(Br),qd=l.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:c="on",onCheckedChange:u,form:d,...m}=e,[p,h]=l.useState(null),y=z(t,w=>h(w)),g=l.useRef(!1),v=p?d||!!p.closest("form"):!0,[b,x]=Ce({prop:o,defaultProp:a??!1,onChange:u,caller:Br});return f.jsxs(gS,{scope:n,checked:b,disabled:s,children:[f.jsx(V.button,{type:"button",role:"switch","aria-checked":b,"aria-required":i,"data-state":Jd(b),"data-disabled":s?"":void 0,disabled:s,value:c,...m,ref:y,onClick:O(e.onClick,w=>{x(S=>!S),v&&(g.current=w.isPropagationStopped(),g.current||w.stopPropagation())})}),v&&f.jsx(Qd,{control:p,bubbles:!g.current,name:r,value:c,checked:b,required:i,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})});qd.displayName=Br;var Xd="SwitchThumb",Zd=l.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=vS(Xd,n);return f.jsx(V.span,{"data-state":Jd(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Zd.displayName=Xd;var yS="SwitchBubbleInput",Qd=l.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=l.useRef(null),s=z(i,a),c=Ir(n),u=Dn(t);return l.useEffect(()=>{const d=i.current;if(!d)return;const m=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(m,"checked").set;if(c!==n&&h){const y=new Event("click",{bubbles:r});h.call(d,n),d.dispatchEvent(y)}},[c,n,r]),f.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Qd.displayName=yS;function Jd(e){return e?"checked":"unchecked"}var ef=qd,bS=Zd;const La=l.forwardRef(({className:e,label:t,id:n,"aria-label":r,isChecked:o=!1,isDisabled:a=!1,...i},s)=>{const c=De({isDisabled:a});if(!t&&!r)throw new Error("Switch must have either a label prop or an aria-label attribute");if(t&&r)throw new Error("Switch must have either a label prop or an aria-label attribute, but not both");return f.jsxs("div",{className:"flex items-center space-x-2",children:[f.jsx(ef,{"aria-label":r,checked:o,className:k(ie.focusRingVisible,`peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2
|
|
192
190
|
border-transparent transition-colors disabled:cursor-not-allowed disabled:opacity-50
|
|
193
|
-
data-[state=checked]:bg-primary-400 data-[state=unchecked]:bg-muted`,e),...i,...c,ref:s,id:n,children:f.jsx(
|
|
191
|
+
data-[state=checked]:bg-primary-400 data-[state=unchecked]:bg-muted`,e),...i,...c,ref:s,id:n,children:f.jsx(bS,{className:k(`pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0
|
|
194
192
|
transition-transform data-[state=checked]:translate-x-5
|
|
195
|
-
data-[state=unchecked]:translate-x-0`)})}),t?typeof t=="string"?f.jsx(tn,{htmlFor:n,children:t}):t:null]})});Fa.displayName=Hd.displayName;const Gd=E.forwardRef(({options:e,value:t,onChange:n,className:r,columns:o=1,...a},i)=>{const s=E.useCallback((c,u)=>{u?(p=>n([...t,p]))(c):(p=>n(t.filter(h=>h!==p)))(c)},[n,t]);return f.jsx("div",{ref:i,className:k("",r),...a,children:f.jsx("div",{className:k("grid gap-3",`grid-cols-${o}`),children:e.map(c=>f.jsx(Fa,{id:c.id,isChecked:t.includes(c.id),isDisabled:c.isDisabled,label:c.label,onCheckedChange:u=>s(c.id,u)},c.id))})})});Gd.displayName="SwitchGroup";function _o(e){const t=aS(e),n=l.forwardRef((r,o)=>{const{children:a,...i}=r,s=l.Children.toArray(a),c=s.find(iS);if(c){const u=c.props.children,d=s.map(m=>m===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:m);return f.jsx(t,{...i,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function aS(e){const t=l.forwardRef((n,r)=>{const{children:o,...a}=n;if(l.isValidElement(o)){const i=lS(o),s=cS(a,o.props);return o.type!==l.Fragment&&(s.ref=r?Ke(r,i):i),l.cloneElement(o,s)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sS=Symbol("radix.slottable");function iS(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sS}function cS(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...s)=>{const c=a(...s);return o(...s),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function lS(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)}function uS(e){const t=e+"CollectionProvider",[n,r]=ve(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:v,children:b}=g,x=E.useRef(null),w=E.useRef(new Map).current;return f.jsx(o,{scope:v,itemMap:w,collectionRef:x,children:b})};i.displayName=t;const s=e+"CollectionSlot",c=_o(s),u=E.forwardRef((g,v)=>{const{scope:b,children:x}=g,w=a(s,b),S=U(v,w.collectionRef);return f.jsx(c,{ref:S,children:x})});u.displayName=s;const d=e+"CollectionItemSlot",m="data-radix-collection-item",p=_o(d),h=E.forwardRef((g,v)=>{const{scope:b,children:x,...w}=g,S=E.useRef(null),C=U(v,S),M=a(d,b);return E.useEffect(()=>(M.itemMap.set(S,{ref:S,...w}),()=>void M.itemMap.delete(S))),f.jsx(p,{[m]:"",ref:C,children:x})});h.displayName=d;function y(g){const v=a(e+"CollectionConsumer",g);return E.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${m}]`));return Array.from(v.itemMap.values()).sort((M,N)=>w.indexOf(M.ref.current)-w.indexOf(N.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},y,r]}var dS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],rn=dS.reduce((e,t)=>{const n=_o(`Primitive.${t}`),r=l.forwardRef((o,a)=>{const{asChild:i,...s}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),ho="rovingFocusGroup.onEntryFocus",fS={bubbles:!1,cancelable:!0},Bn="RovingFocusGroup",[jo,zd,mS]=uS(Bn),[pS,Ud]=ve(Bn,[mS]),[hS,gS]=pS(Bn),Kd=l.forwardRef((e,t)=>f.jsx(jo.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx(jo.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(vS,{...e,ref:t})})}));Kd.displayName=Bn;var vS=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...m}=e,p=l.useRef(null),h=U(t,p),y=bt(a),[g,v]=Ce({prop:i,defaultProp:s??null,onChange:c,caller:Bn}),[b,x]=l.useState(!1),w=Se(u),S=zd(n),C=l.useRef(!1),[M,N]=l.useState(0);return l.useEffect(()=>{const P=p.current;if(P)return P.addEventListener(ho,w),()=>P.removeEventListener(ho,w)},[w]),f.jsx(hS,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:l.useCallback(P=>v(P),[v]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>N(P=>P+1),[]),onFocusableItemRemove:l.useCallback(()=>N(P=>P-1),[]),children:f.jsx(rn.div,{tabIndex:b||M===0?-1:0,"data-orientation":r,...m,ref:h,style:{outline:"none",...e.style},onMouseDown:O(e.onMouseDown,()=>{C.current=!0}),onFocus:O(e.onFocus,P=>{const F=!C.current;if(P.target===P.currentTarget&&F&&!b){const _=new CustomEvent(ho,fS);if(P.currentTarget.dispatchEvent(_),!_.defaultPrevented){const $=S().filter(j=>j.focusable),I=$.find(j=>j.active),B=$.find(j=>j.id===g),q=[I,B,...$].filter(Boolean).map(j=>j.ref.current);Zd(q,d)}}C.current=!1}),onBlur:O(e.onBlur,()=>x(!1))})})}),qd="RovingFocusGroupItem",Xd=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,c=pe(),u=a||c,d=gS(qd,n),m=d.currentTabStopId===u,p=zd(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:g}=d;return l.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),f.jsx(jo.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:f.jsx(rn.span,{tabIndex:m?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:O(e.onMouseDown,v=>{r?d.onItemFocus(u):v.preventDefault()}),onFocus:O(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:O(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=xS(v,d.orientation,d.dir);if(b!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let w=p().filter(S=>S.focusable).map(S=>S.ref.current);if(b==="last")w.reverse();else if(b==="prev"||b==="next"){b==="prev"&&w.reverse();const S=w.indexOf(v.currentTarget);w=d.loop?wS(w,S+1):w.slice(S+1)}setTimeout(()=>Zd(w))}}),children:typeof i=="function"?i({isCurrentTabStop:m,hasTabStop:g!=null}):i})})});Xd.displayName=qd;var yS={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function bS(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function xS(e,t,n){const r=bS(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return yS[r]}function Zd(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function wS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var CS=Kd,SS=Xd;function ES(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Qd=e=>{const{present:t,children:n}=e,r=NS(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=U(r.ref,MS(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};Qd.displayName="Presence";function NS(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=ES(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Xn(r.current);a.current=s==="mounted"?u:"none"},[s]),de(()=>{const u=r.current,d=o.current;if(d!==e){const p=a.current,h=Xn(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),de(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,m=h=>{const g=Xn(r.current).includes(h.animationName);if(h.target===t&&g&&(c("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(a.current=Xn(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Xn(e){return(e==null?void 0:e.animationName)||"none"}function MS(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 Wr="Tabs",[RS,BE]=ve(Wr,[Ud]),Jd=Ud(),[PS,$a]=RS(Wr),ef=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:c="automatic",...u}=e,d=bt(s),[m,p]=Ce({prop:r,onChange:o,defaultProp:a??"",caller:Wr});return f.jsx(PS,{scope:n,baseId:pe(),value:m,onValueChange:p,orientation:i,dir:d,activationMode:c,children:f.jsx(rn.div,{dir:d,"data-orientation":i,...u,ref:t})})});ef.displayName=Wr;var tf="TabsList",nf=l.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=$a(tf,n),i=Jd(n);return f.jsx(CS,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:f.jsx(rn.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});nf.displayName=tf;var rf="TabsTrigger",of=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=$a(rf,n),s=Jd(n),c=cf(i.baseId,r),u=lf(i.baseId,r),d=r===i.value;return f.jsx(SS,{asChild:!0,...s,focusable:!o,active:d,children:f.jsx(rn.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:O(e.onMouseDown,m=>{!o&&m.button===0&&m.ctrlKey===!1?i.onValueChange(r):m.preventDefault()}),onKeyDown:O(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&i.onValueChange(r)}),onFocus:O(e.onFocus,()=>{const m=i.activationMode!=="manual";!d&&!o&&m&&i.onValueChange(r)})})})});of.displayName=rf;var af="TabsContent",sf=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,s=$a(af,n),c=cf(s.baseId,r),u=lf(s.baseId,r),d=r===s.value,m=l.useRef(d);return l.useEffect(()=>{const p=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(p)},[]),f.jsx(Qd,{present:o||d,children:({present:p})=>f.jsx(rn.div,{"data-state":d?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":c,hidden:!p,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:p&&a})})});sf.displayName=af;function cf(e,t){return`${e}-trigger-${t}`}function lf(e,t){return`${e}-content-${t}`}var kS=ef,uf=nf,df=of,ff=sf;const OS=kS,mf=l.forwardRef(({className:e,...t},n)=>f.jsx(uf,{ref:n,className:k(`inline-flex items-center justify-center gap-1 rounded border-[1px] border-base-300 bg-white
|
|
196
|
-
p-1 text-muted-foreground`,e),...t}));
|
|
193
|
+
data-[state=unchecked]:translate-x-0`)})}),t?typeof t=="string"?f.jsx(Fn,{htmlFor:n,children:t}):t:null]})});La.displayName=ef.displayName;const tf=N.forwardRef(({options:e,value:t,onChange:n,className:r,columns:o=1,...a},i)=>{const s=N.useCallback((c,u)=>{u?(p=>n([...t,p]))(c):(p=>n(t.filter(h=>h!==p)))(c)},[n,t]);return f.jsx("div",{ref:i,className:k("",r),...a,children:f.jsx("div",{className:k("grid gap-3",`grid-cols-${o}`),children:e.map(c=>f.jsx(La,{id:c.id,isChecked:t.includes(c.id),isDisabled:c.isDisabled,label:c.label,onCheckedChange:u=>s(c.id,u)},c.id))})})});tf.displayName="SwitchGroup";function Fo(e){const t=xS(e),n=l.forwardRef((r,o)=>{const{children:a,...i}=r,s=l.Children.toArray(a),c=s.find(CS);if(c){const u=c.props.children,d=s.map(m=>m===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:m);return f.jsx(t,{...i,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function xS(e){const t=l.forwardRef((n,r)=>{const{children:o,...a}=n;if(l.isValidElement(o)){const i=NS(o),s=SS(a,o.props);return o.type!==l.Fragment&&(s.ref=r?qe(r,i):i),l.cloneElement(o,s)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var wS=Symbol("radix.slottable");function CS(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===wS}function SS(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...s)=>{const c=a(...s);return o(...s),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function NS(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)}function ES(e){const t=e+"CollectionProvider",[n,r]=ve(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:v,children:b}=g,x=N.useRef(null),w=N.useRef(new Map).current;return f.jsx(o,{scope:v,itemMap:w,collectionRef:x,children:b})};i.displayName=t;const s=e+"CollectionSlot",c=Fo(s),u=N.forwardRef((g,v)=>{const{scope:b,children:x}=g,w=a(s,b),S=z(v,w.collectionRef);return f.jsx(c,{ref:S,children:x})});u.displayName=s;const d=e+"CollectionItemSlot",m="data-radix-collection-item",p=Fo(d),h=N.forwardRef((g,v)=>{const{scope:b,children:x,...w}=g,S=N.useRef(null),C=z(v,S),M=a(d,b);return N.useEffect(()=>(M.itemMap.set(S,{ref:S,...w}),()=>void M.itemMap.delete(S))),f.jsx(p,{[m]:"",ref:C,children:x})});h.displayName=d;function y(g){const v=a(e+"CollectionConsumer",g);return N.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${m}]`));return Array.from(v.itemMap.values()).sort((M,E)=>w.indexOf(M.ref.current)-w.indexOf(E.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},y,r]}var MS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],nn=MS.reduce((e,t)=>{const n=Fo(`Primitive.${t}`),r=l.forwardRef((o,a)=>{const{asChild:i,...s}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),vo="rovingFocusGroup.onEntryFocus",RS={bubbles:!1,cancelable:!0},Vn="RovingFocusGroup",[$o,nf,PS]=ES(Vn),[kS,rf]=ve(Vn,[PS]),[OS,IS]=kS(Vn),of=l.forwardRef((e,t)=>f.jsx($o.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx($o.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(DS,{...e,ref:t})})}));of.displayName=Vn;var DS=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...m}=e,p=l.useRef(null),h=z(t,p),y=xt(a),[g,v]=Ce({prop:i,defaultProp:s??null,onChange:c,caller:Vn}),[b,x]=l.useState(!1),w=Ne(u),S=nf(n),C=l.useRef(!1),[M,E]=l.useState(0);return l.useEffect(()=>{const P=p.current;if(P)return P.addEventListener(vo,w),()=>P.removeEventListener(vo,w)},[w]),f.jsx(OS,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:l.useCallback(P=>v(P),[v]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>E(P=>P+1),[]),onFocusableItemRemove:l.useCallback(()=>E(P=>P-1),[]),children:f.jsx(nn.div,{tabIndex:b||M===0?-1:0,"data-orientation":r,...m,ref:h,style:{outline:"none",...e.style},onMouseDown:O(e.onMouseDown,()=>{C.current=!0}),onFocus:O(e.onFocus,P=>{const F=!C.current;if(P.target===P.currentTarget&&F&&!b){const _=new CustomEvent(vo,RS);if(P.currentTarget.dispatchEvent(_),!_.defaultPrevented){const $=S().filter(j=>j.focusable),D=$.find(j=>j.active),B=$.find(j=>j.id===g),q=[D,B,...$].filter(Boolean).map(j=>j.ref.current);cf(q,d)}}C.current=!1}),onBlur:O(e.onBlur,()=>x(!1))})})}),af="RovingFocusGroupItem",sf=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,c=pe(),u=a||c,d=IS(af,n),m=d.currentTabStopId===u,p=nf(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:g}=d;return l.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),f.jsx($o.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:f.jsx(nn.span,{tabIndex:m?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:O(e.onMouseDown,v=>{r?d.onItemFocus(u):v.preventDefault()}),onFocus:O(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:O(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=_S(v,d.orientation,d.dir);if(b!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let w=p().filter(S=>S.focusable).map(S=>S.ref.current);if(b==="last")w.reverse();else if(b==="prev"||b==="next"){b==="prev"&&w.reverse();const S=w.indexOf(v.currentTarget);w=d.loop?jS(w,S+1):w.slice(S+1)}setTimeout(()=>cf(w))}}),children:typeof i=="function"?i({isCurrentTabStop:m,hasTabStop:g!=null}):i})})});sf.displayName=af;var TS={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function AS(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function _S(e,t,n){const r=AS(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return TS[r]}function cf(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function jS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var FS=of,$S=sf;function LS(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var lf=e=>{const{present:t,children:n}=e,r=WS(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=z(r.ref,BS(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};lf.displayName="Presence";function WS(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=LS(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Zn(r.current);a.current=s==="mounted"?u:"none"},[s]),de(()=>{const u=r.current,d=o.current;if(d!==e){const p=a.current,h=Zn(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),de(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,m=h=>{const g=Zn(r.current).includes(h.animationName);if(h.target===t&&g&&(c("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(a.current=Zn(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Zn(e){return(e==null?void 0:e.animationName)||"none"}function BS(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 Vr="Tabs",[VS,nE]=ve(Vr,[rf]),uf=rf(),[YS,Wa]=VS(Vr),df=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:c="automatic",...u}=e,d=xt(s),[m,p]=Ce({prop:r,onChange:o,defaultProp:a??"",caller:Vr});return f.jsx(YS,{scope:n,baseId:pe(),value:m,onValueChange:p,orientation:i,dir:d,activationMode:c,children:f.jsx(nn.div,{dir:d,"data-orientation":i,...u,ref:t})})});df.displayName=Vr;var ff="TabsList",mf=l.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=Wa(ff,n),i=uf(n);return f.jsx(FS,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:f.jsx(nn.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});mf.displayName=ff;var pf="TabsTrigger",hf=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=Wa(pf,n),s=uf(n),c=yf(i.baseId,r),u=bf(i.baseId,r),d=r===i.value;return f.jsx($S,{asChild:!0,...s,focusable:!o,active:d,children:f.jsx(nn.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:O(e.onMouseDown,m=>{!o&&m.button===0&&m.ctrlKey===!1?i.onValueChange(r):m.preventDefault()}),onKeyDown:O(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&i.onValueChange(r)}),onFocus:O(e.onFocus,()=>{const m=i.activationMode!=="manual";!d&&!o&&m&&i.onValueChange(r)})})})});hf.displayName=pf;var gf="TabsContent",vf=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,s=Wa(gf,n),c=yf(s.baseId,r),u=bf(s.baseId,r),d=r===s.value,m=l.useRef(d);return l.useEffect(()=>{const p=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(p)},[]),f.jsx(lf,{present:o||d,children:({present:p})=>f.jsx(nn.div,{"data-state":d?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":c,hidden:!p,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:p&&a})})});vf.displayName=gf;function yf(e,t){return`${e}-trigger-${t}`}function bf(e,t){return`${e}-content-${t}`}var HS=df,xf=mf,wf=hf,Cf=vf;const GS=HS,Sf=l.forwardRef(({className:e,...t},n)=>f.jsx(xf,{ref:n,className:k(`inline-flex items-center justify-center gap-1 rounded border-[1px] border-base-300 bg-white
|
|
194
|
+
p-1 text-muted-foreground`,e),...t}));Sf.displayName=xf.displayName;const Nf=l.forwardRef(({className:e,...t},n)=>f.jsx(wf,{ref:n,className:k(ie.focusRingVisible,`inline-flex items-center justify-center whitespace-nowrap rounded px-3 py-1.5 text-sm
|
|
197
195
|
font-bold ring-offset-background transition-all hover:bg-primary-200 hover:text-primary
|
|
198
196
|
disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50
|
|
199
197
|
aria-disabled:cursor-not-allowed aria-disabled:opacity-50 data-[state=active]:bg-primary
|
|
200
|
-
data-[state=active]:text-white`,e),...t}));
|
|
201
|
-
focus-visible:ring-ring focus-visible:ring-offset-2`,e),...t}));hf.displayName=ff.displayName;const gf=E.forwardRef(({className:e,isDisabled:t=!1,isGrowable:n=!1,...r},o)=>{const a=E.useRef(null),i=Xe({isDisabled:t});return E.useEffect(()=>{if(n&&a.current){const s=a.current,c=()=>{s.style.height="auto",s.style.height=`${s.scrollHeight}px`};return s.addEventListener("input",c),c(),()=>s.removeEventListener("input",c)}},[n]),f.jsx("textarea",{ref:s=>{typeof o=="function"?o(s):o&&(o.current=s),a.current=s},className:k(le.input,"min-h-[5rem]",n&&"resize-none overflow-hidden",e),...r,...i})});gf.displayName="Textarea";function DS(e){const t=IS(e),n=l.forwardRef((r,o)=>{const{children:a,...i}=r,s=l.Children.toArray(a),c=s.find(TS);if(c){const u=c.props.children,d=s.map(m=>m===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:m);return f.jsx(t,{...i,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function IS(e){const t=l.forwardRef((n,r)=>{const{children:o,...a}=n,i=l.isValidElement(o)?jS(o):void 0,s=U(i,r);if(l.isValidElement(o)){const c=_S(a,o.props);return o.type!==l.Fragment&&(c.ref=s),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var vf=Symbol("radix.slottable");function AS(e){const t=({children:n})=>f.jsx(f.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=vf,t}function TS(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vf}function _S(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...s)=>{const c=a(...s);return o(...s),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function jS(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 FS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],At=FS.reduce((e,t)=>{const n=DS(`Primitive.${t}`),r=l.forwardRef((o,a)=>{const{asChild:i,...s}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function $S(e,t){e&&En.flushSync(()=>e.dispatchEvent(t))}var LS="DismissableLayer",Fo="dismissableLayer.update",WS="dismissableLayer.pointerDownOutside",BS="dismissableLayer.focusOutside",$s,yf=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bf=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=l.useContext(yf),[d,m]=l.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=l.useState({}),y=U(t,N=>m(N)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(v),x=d?g.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=b,C=HS(N=>{const P=N.target,F=[...u.branches].some(_=>_.contains(P));!S||F||(o==null||o(N),i==null||i(N),N.defaultPrevented||s==null||s())},p),M=GS(N=>{const P=N.target;[...u.branches].some(_=>_.contains(P))||(a==null||a(N),i==null||i(N),N.defaultPrevented||s==null||s())},p);return xi(N=>{x===u.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&s&&(N.preventDefault(),s()))},p),l.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&($s=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Ls(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=$s)}},[d,p,n,u]),l.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Ls())},[d,u]),l.useEffect(()=>{const N=()=>h({});return document.addEventListener(Fo,N),()=>document.removeEventListener(Fo,N)},[]),f.jsx(At.div,{...c,ref:y,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:O(e.onFocusCapture,M.onFocusCapture),onBlurCapture:O(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:O(e.onPointerDownCapture,C.onPointerDownCapture)})});bf.displayName=LS;var VS="DismissableLayerBranch",YS=l.forwardRef((e,t)=>{const n=l.useContext(yf),r=l.useRef(null),o=U(t,r);return l.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),f.jsx(At.div,{...e,ref:o})});YS.displayName=VS;function HS(e,t=globalThis==null?void 0:globalThis.document){const n=Se(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){xf(WS,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function GS(e,t=globalThis==null?void 0:globalThis.document){const n=Se(e),r=l.useRef(!1);return l.useEffect(()=>{const o=a=>{a.target&&!r.current&&xf(BS,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ls(){const e=new CustomEvent(Fo);document.dispatchEvent(e)}function xf(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?$S(o,a):o.dispatchEvent(a)}var zS="Arrow",wf=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return f.jsx(At.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});wf.displayName=zS;var US=wf,La="Popper",[Cf,Sf]=ve(La),[KS,Ef]=Cf(La),Nf=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return f.jsx(KS,{scope:t,anchor:r,onAnchorChange:o,children:n})};Nf.displayName=La;var Mf="PopperAnchor",Rf=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Ef(Mf,n),i=l.useRef(null),s=U(t,i);return l.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:f.jsx(At.div,{...o,ref:s})});Rf.displayName=Mf;var Wa="PopperContent",[qS,XS]=Cf(Wa),Pf=l.forwardRef((e,t)=>{var A,Z,K,te,re,oe;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:m="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:y,...g}=e,v=Ef(Wa,n),[b,x]=l.useState(null),w=U(t,he=>x(he)),[S,C]=l.useState(null),M=In(S),N=(M==null?void 0:M.width)??0,P=(M==null?void 0:M.height)??0,F=r+(a!=="center"?"-"+a:""),_=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},$=Array.isArray(u)?u:[u],I=$.length>0,B={padding:_,boundary:$.filter(QS),altBoundary:I},{refs:Y,floatingStyles:q,placement:j,isPositioned:G,middlewareData:T}=Cc({strategy:"fixed",placement:F,whileElementsMounted:(...he)=>xc(...he,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Sc({mainAxis:o+P,alignmentAxis:i}),c&&Ec({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Nc():void 0,...B}),c&&Mc({...B}),Rc({...B,apply:({elements:he,rects:be,availableWidth:Je,availableHeight:et})=>{const{width:tt,height:on}=be.reference,Te=he.floating.style;Te.setProperty("--radix-popper-available-width",`${Je}px`),Te.setProperty("--radix-popper-available-height",`${et}px`),Te.setProperty("--radix-popper-anchor-width",`${tt}px`),Te.setProperty("--radix-popper-anchor-height",`${on}px`)}}),S&&kc({element:S,padding:s}),JS({arrowWidth:N,arrowHeight:P}),p&&Pc({strategy:"referenceHidden",...B})]}),[D,Q]=Df(j),J=Se(y);de(()=>{G&&(J==null||J())},[G,J]);const R=(A=T.arrow)==null?void 0:A.x,L=(Z=T.arrow)==null?void 0:Z.y,z=((K=T.arrow)==null?void 0:K.centerOffset)!==0,[W,X]=l.useState();return de(()=>{b&&X(window.getComputedStyle(b).zIndex)},[b]),f.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:G?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[(te=T.transformOrigin)==null?void 0:te.x,(re=T.transformOrigin)==null?void 0:re.y].join(" "),...((oe=T.hide)==null?void 0:oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(qS,{scope:n,placedSide:D,onArrowChange:C,arrowX:R,arrowY:L,shouldHideArrow:z,children:f.jsx(At.div,{"data-side":D,"data-align":Q,...g,ref:w,style:{...g.style,animation:G?void 0:"none"}})})})});Pf.displayName=Wa;var kf="PopperArrow",ZS={top:"bottom",right:"left",bottom:"top",left:"right"},Of=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=XS(kf,r),i=ZS[a.placedSide];return f.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:f.jsx(US,{...o,ref:n,style:{...o.style,display:"block"}})})});Of.displayName=kf;function QS(e){return e!==null}var JS=e=>({name:"transformOrigin",options:e,fn(t){var v,b,x;const{placement:n,rects:r,middlewareData:o}=t,i=((v=o.arrow)==null?void 0:v.centerOffset)!==0,s=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,d]=Df(n),m={start:"0%",center:"50%",end:"100%"}[d],p=(((b=o.arrow)==null?void 0:b.x)??0)+s/2,h=(((x=o.arrow)==null?void 0:x.y)??0)+c/2;let y="",g="";return u==="bottom"?(y=i?m:`${p}px`,g=`${-c}px`):u==="top"?(y=i?m:`${p}px`,g=`${r.floating.height+c}px`):u==="right"?(y=`${-c}px`,g=i?m:`${h}px`):u==="left"&&(y=`${r.floating.width+c}px`,g=i?m:`${h}px`),{data:{x:y,y:g}}}});function Df(e){const[t,n="center"]=e.split("-");return[t,n]}var eE=Nf,tE=Rf,nE=Pf,rE=Of;function oE(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var If=e=>{const{present:t,children:n}=e,r=aE(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=U(r.ref,sE(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};If.displayName="Presence";function aE(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=oE(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Zn(r.current);a.current=s==="mounted"?u:"none"},[s]),de(()=>{const u=r.current,d=o.current;if(d!==e){const p=a.current,h=Zn(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),de(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,m=h=>{const g=Zn(r.current).includes(h.animationName);if(h.target===t&&g&&(c("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(a.current=Zn(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Zn(e){return(e==null?void 0:e.animationName)||"none"}function sE(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 iE=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),cE="VisuallyHidden",Af=l.forwardRef((e,t)=>f.jsx(At.span,{...e,ref:t,style:{...iE,...e.style}}));Af.displayName=cE;var lE=Af,[Br,VE]=ve("Tooltip",[Sf]),Vr=Sf(),Tf="TooltipProvider",uE=700,$o="tooltip.open",[dE,Ba]=Br(Tf),_f=e=>{const{__scopeTooltip:t,delayDuration:n=uE,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,i=l.useRef(!0),s=l.useRef(!1),c=l.useRef(0);return l.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),f.jsx(dE,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:l.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:l.useCallback(u=>{s.current=u},[]),disableHoverableContent:o,children:a})};_f.displayName=Tf;var Sn="Tooltip",[fE,Yr]=Br(Sn),jf=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,c=Ba(Sn,e.__scopeTooltip),u=Vr(t),[d,m]=l.useState(null),p=pe(),h=l.useRef(0),y=i??c.disableHoverableContent,g=s??c.delayDuration,v=l.useRef(!1),[b,x]=Ce({prop:r,defaultProp:o??!1,onChange:N=>{N?(c.onOpen(),document.dispatchEvent(new CustomEvent($o))):c.onClose(),a==null||a(N)},caller:Sn}),w=l.useMemo(()=>b?v.current?"delayed-open":"instant-open":"closed",[b]),S=l.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,x(!0)},[x]),C=l.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x(!1)},[x]),M=l.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,x(!0),h.current=0},g)},[g,x]);return l.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),f.jsx(eE,{...u,children:f.jsx(fE,{scope:t,contentId:p,open:b,stateAttribute:w,trigger:d,onTriggerChange:m,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayedRef.current?M():S()},[c.isOpenDelayedRef,M,S]),onTriggerLeave:l.useCallback(()=>{y?C():(window.clearTimeout(h.current),h.current=0)},[C,y]),onOpen:S,onClose:C,disableHoverableContent:y,children:n})})};jf.displayName=Sn;var Lo="TooltipTrigger",Ff=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Yr(Lo,n),a=Ba(Lo,n),i=Vr(n),s=l.useRef(null),c=U(t,s,o.onTriggerChange),u=l.useRef(!1),d=l.useRef(!1),m=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),f.jsx(tE,{asChild:!0,...i,children:f.jsx(At.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:O(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:O(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:O(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:O(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:O(e.onBlur,o.onClose),onClick:O(e.onClick,o.onClose)})})});Ff.displayName=Lo;var mE="TooltipPortal",[YE,pE]=Br(mE,{forceMount:void 0}),zt="TooltipContent",$f=l.forwardRef((e,t)=>{const n=pE(zt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=Yr(zt,e.__scopeTooltip);return f.jsx(If,{present:r||i.open,children:i.disableHoverableContent?f.jsx(Lf,{side:o,...a,ref:t}):f.jsx(hE,{side:o,...a,ref:t})})}),hE=l.forwardRef((e,t)=>{const n=Yr(zt,e.__scopeTooltip),r=Ba(zt,e.__scopeTooltip),o=l.useRef(null),a=U(t,o),[i,s]=l.useState(null),{trigger:c,onClose:u}=n,d=o.current,{onPointerInTransitChange:m}=r,p=l.useCallback(()=>{s(null),m(!1)},[m]),h=l.useCallback((y,g)=>{const v=y.currentTarget,b={x:y.clientX,y:y.clientY},x=bE(b,v.getBoundingClientRect()),w=xE(b,x),S=wE(g.getBoundingClientRect()),C=SE([...w,...S]);s(C),m(!0)},[m]);return l.useEffect(()=>()=>p(),[p]),l.useEffect(()=>{if(c&&d){const y=v=>h(v,d),g=v=>h(v,c);return c.addEventListener("pointerleave",y),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",y),d.removeEventListener("pointerleave",g)}}},[c,d,h,p]),l.useEffect(()=>{if(i){const y=g=>{const v=g.target,b={x:g.clientX,y:g.clientY},x=(c==null?void 0:c.contains(v))||(d==null?void 0:d.contains(v)),w=!CE(b,i);x?p():w&&(p(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,d,i,u,p]),f.jsx(Lf,{...e,ref:a})}),[gE,vE]=Br(Sn,{isInside:!1}),yE=AS("TooltipContent"),Lf=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,c=Yr(zt,n),u=Vr(n),{onClose:d}=c;return l.useEffect(()=>(document.addEventListener($o,d),()=>document.removeEventListener($o,d)),[d]),l.useEffect(()=>{if(c.trigger){const m=p=>{const h=p.target;h!=null&&h.contains(c.trigger)&&d()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[c.trigger,d]),f.jsx(bf,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:m=>m.preventDefault(),onDismiss:d,children:f.jsxs(nE,{"data-state":c.stateAttribute,...u,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[f.jsx(yE,{children:r}),f.jsx(gE,{scope:n,isInside:!0,children:f.jsx(lE,{id:c.contentId,role:"tooltip",children:o||r})})]})})});$f.displayName=zt;var Wf="TooltipArrow",Bf=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Vr(n);return vE(Wf,n).isInside?null:f.jsx(rE,{...o,...r,ref:t})});Bf.displayName=Wf;function bE(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function xE(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function wE(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function CE(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const s=t[a],c=t[i],u=s.x,d=s.y,m=c.x,p=c.y;d>r!=p>r&&n<(m-u)*(r-d)/(p-d)+u&&(o=!o)}return o}function SE(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),EE(t)}function EE(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],i=n[n.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var NE=_f,ME=jf,RE=Ff,PE=$f,kE=Bf;const OE=NE,Vf=l.forwardRef(({children:e,content:t,side:n="top",align:r="center",offset:o=2,hasArrow:a=!0,className:i,zIndex:s,...c},u)=>{const d=Ve("tooltip",s);return f.jsxs(ME,{children:[f.jsx(RE,{asChild:!0,children:e}),f.jsxs(PE,{ref:u,align:r,className:k(le.tooltip,i),side:n,sideOffset:o,style:{zIndex:d,...c.style},...c,children:[t,a?f.jsx(kE,{className:"fill-base-700 stroke-base-700",height:5,width:11}):null]})]})});Vf.displayName="Tooltip";exports.Accordion=vi;exports.Alert=yi;exports.Autocomplete=Qc;exports.Badge=Jc;exports.Breadcrumbs=el;exports.Button=Oe;exports.Calendar=xa;exports.Checkbox=wa;exports.CheckboxGroup=_l;exports.Combobox=jl;exports.DatePicker=Fl;exports.DateRangePicker=$l;exports.Dialog=Vg;exports.DialogClose=Hg;exports.DialogContent=ic;exports.DialogDescription=Ll;exports.DialogFooter=Wl;exports.DialogHeader=Bl;exports.DialogOverlay=ra;exports.DialogPortal=cc;exports.DialogTitle=Vl;exports.DialogTrigger=Yg;exports.DropdownButton=Ru;exports.FormItem=Pu;exports.Image=ku;exports.Input=Ou;exports.Label=tn;exports.MultiSelect=Du;exports.Popover=Qt;exports.PopoverContent=Ot;exports.PopoverTrigger=Jt;exports.Radio=Da;exports.RadioGroup=ed;exports.Select=ja;exports.SelectContent=Aa;exports.SelectGroup=U0;exports.SelectItem=Ta;exports.SelectLabel=jd;exports.SelectRoot=Td;exports.SelectSeparator=Fd;exports.SelectTrigger=_a;exports.SelectValue=_d;exports.SingleSelect=ja;exports.StepIndicator=J0;exports.Switch=Fa;exports.SwitchGroup=Gd;exports.Tabs=OS;exports.TabsContent=hf;exports.TabsList=mf;exports.TabsTrigger=pf;exports.Textarea=gf;exports.Tooltip=Vf;exports.TooltipProvider=OE;exports.cn=k;exports.configureZIndex=Lg;exports.getZIndex=Ve;exports.getZIndexConfig=Wg;exports.resetZIndexConfig=Bg;exports.tw=ge;exports.useAriaDisabled=Xe;exports.useRadioAria=Xo;
|
|
198
|
+
data-[state=active]:text-white`,e),...t}));Nf.displayName=wf.displayName;const Ef=l.forwardRef(({className:e,...t},n)=>f.jsx(Cf,{ref:n,className:k(ie.focusRingVisible,`mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2
|
|
199
|
+
focus-visible:ring-ring focus-visible:ring-offset-2`,e),...t}));Ef.displayName=Cf.displayName;const Mf=N.forwardRef(({className:e,isDisabled:t=!1,isGrowable:n=!1,...r},o)=>{const a=N.useRef(null),i=De({isDisabled:t});return N.useEffect(()=>{if(n&&a.current){const s=a.current,c=()=>{s.style.height="auto",s.style.height=`${s.scrollHeight}px`};return s.addEventListener("input",c),c(),()=>s.removeEventListener("input",c)}},[n]),f.jsx("textarea",{ref:s=>{typeof o=="function"?o(s):o&&(o.current=s),a.current=s},className:k(ie.input,"min-h-[5rem]",n&&"resize-none overflow-hidden",e),...r,...i})});Mf.displayName="Textarea";function US(e){const t=zS(e),n=l.forwardRef((r,o)=>{const{children:a,...i}=r,s=l.Children.toArray(a),c=s.find(qS);if(c){const u=c.props.children,d=s.map(m=>m===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:m);return f.jsx(t,{...i,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function zS(e){const t=l.forwardRef((n,r)=>{const{children:o,...a}=n,i=l.isValidElement(o)?ZS(o):void 0,s=z(i,r);if(l.isValidElement(o)){const c=XS(a,o.props);return o.type!==l.Fragment&&(c.ref=s),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Rf=Symbol("radix.slottable");function KS(e){const t=({children:n})=>f.jsx(f.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Rf,t}function qS(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Rf}function XS(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...s)=>{const c=a(...s);return o(...s),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function ZS(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 QS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],At=QS.reduce((e,t)=>{const n=US(`Primitive.${t}`),r=l.forwardRef((o,a)=>{const{asChild:i,...s}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function JS(e,t){e&&Sn.flushSync(()=>e.dispatchEvent(t))}var eN="DismissableLayer",Lo="dismissableLayer.update",tN="dismissableLayer.pointerDownOutside",nN="dismissableLayer.focusOutside",Ws,Pf=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kf=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=l.useContext(Pf),[d,m]=l.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=l.useState({}),y=z(t,E=>m(E)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(v),x=d?g.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=b,C=aN(E=>{const P=E.target,F=[...u.branches].some(_=>_.contains(P));!S||F||(o==null||o(E),i==null||i(E),E.defaultPrevented||s==null||s())},p),M=sN(E=>{const P=E.target;[...u.branches].some(_=>_.contains(P))||(a==null||a(E),i==null||i(E),E.defaultPrevented||s==null||s())},p);return Ci(E=>{x===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&s&&(E.preventDefault(),s()))},p),l.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ws=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Bs(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Ws)}},[d,p,n,u]),l.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Bs())},[d,u]),l.useEffect(()=>{const E=()=>h({});return document.addEventListener(Lo,E),()=>document.removeEventListener(Lo,E)},[]),f.jsx(At.div,{...c,ref:y,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:O(e.onFocusCapture,M.onFocusCapture),onBlurCapture:O(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:O(e.onPointerDownCapture,C.onPointerDownCapture)})});kf.displayName=eN;var rN="DismissableLayerBranch",oN=l.forwardRef((e,t)=>{const n=l.useContext(Pf),r=l.useRef(null),o=z(t,r);return l.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),f.jsx(At.div,{...e,ref:o})});oN.displayName=rN;function aN(e,t=globalThis==null?void 0:globalThis.document){const n=Ne(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){Of(tN,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function sN(e,t=globalThis==null?void 0:globalThis.document){const n=Ne(e),r=l.useRef(!1);return l.useEffect(()=>{const o=a=>{a.target&&!r.current&&Of(nN,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Bs(){const e=new CustomEvent(Lo);document.dispatchEvent(e)}function Of(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?JS(o,a):o.dispatchEvent(a)}var iN="Arrow",If=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return f.jsx(At.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});If.displayName=iN;var cN=If,Ba="Popper",[Df,Tf]=ve(Ba),[lN,Af]=Df(Ba),_f=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return f.jsx(lN,{scope:t,anchor:r,onAnchorChange:o,children:n})};_f.displayName=Ba;var jf="PopperAnchor",Ff=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Af(jf,n),i=l.useRef(null),s=z(t,i);return l.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:f.jsx(At.div,{...o,ref:s})});Ff.displayName=jf;var Va="PopperContent",[uN,dN]=Df(Va),$f=l.forwardRef((e,t)=>{var T,Z,K,te,re,oe;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:m="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:y,...g}=e,v=Af(Va,n),[b,x]=l.useState(null),w=z(t,he=>x(he)),[S,C]=l.useState(null),M=Dn(S),E=(M==null?void 0:M.width)??0,P=(M==null?void 0:M.height)??0,F=r+(a!=="center"?"-"+a:""),_=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},$=Array.isArray(u)?u:[u],D=$.length>0,B={padding:_,boundary:$.filter(mN),altBoundary:D},{refs:Y,floatingStyles:q,placement:j,isPositioned:G,middlewareData:A}=Nc({strategy:"fixed",placement:F,whileElementsMounted:(...he)=>Cc(...he,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Ec({mainAxis:o+P,alignmentAxis:i}),c&&Mc({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Rc():void 0,...B}),c&&Pc({...B}),kc({...B,apply:({elements:he,rects:be,availableWidth:Je,availableHeight:et})=>{const{width:tt,height:rn}=be.reference,_e=he.floating.style;_e.setProperty("--radix-popper-available-width",`${Je}px`),_e.setProperty("--radix-popper-available-height",`${et}px`),_e.setProperty("--radix-popper-anchor-width",`${tt}px`),_e.setProperty("--radix-popper-anchor-height",`${rn}px`)}}),S&&Ic({element:S,padding:s}),pN({arrowWidth:E,arrowHeight:P}),p&&Oc({strategy:"referenceHidden",...B})]}),[I,Q]=Bf(j),J=Ne(y);de(()=>{G&&(J==null||J())},[G,J]);const R=(T=A.arrow)==null?void 0:T.x,L=(Z=A.arrow)==null?void 0:Z.y,U=((K=A.arrow)==null?void 0:K.centerOffset)!==0,[W,X]=l.useState();return de(()=>{b&&X(window.getComputedStyle(b).zIndex)},[b]),f.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:G?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[(te=A.transformOrigin)==null?void 0:te.x,(re=A.transformOrigin)==null?void 0:re.y].join(" "),...((oe=A.hide)==null?void 0:oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(uN,{scope:n,placedSide:I,onArrowChange:C,arrowX:R,arrowY:L,shouldHideArrow:U,children:f.jsx(At.div,{"data-side":I,"data-align":Q,...g,ref:w,style:{...g.style,animation:G?void 0:"none"}})})})});$f.displayName=Va;var Lf="PopperArrow",fN={top:"bottom",right:"left",bottom:"top",left:"right"},Wf=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=dN(Lf,r),i=fN[a.placedSide];return f.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:f.jsx(cN,{...o,ref:n,style:{...o.style,display:"block"}})})});Wf.displayName=Lf;function mN(e){return e!==null}var pN=e=>({name:"transformOrigin",options:e,fn(t){var v,b,x;const{placement:n,rects:r,middlewareData:o}=t,i=((v=o.arrow)==null?void 0:v.centerOffset)!==0,s=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,d]=Bf(n),m={start:"0%",center:"50%",end:"100%"}[d],p=(((b=o.arrow)==null?void 0:b.x)??0)+s/2,h=(((x=o.arrow)==null?void 0:x.y)??0)+c/2;let y="",g="";return u==="bottom"?(y=i?m:`${p}px`,g=`${-c}px`):u==="top"?(y=i?m:`${p}px`,g=`${r.floating.height+c}px`):u==="right"?(y=`${-c}px`,g=i?m:`${h}px`):u==="left"&&(y=`${r.floating.width+c}px`,g=i?m:`${h}px`),{data:{x:y,y:g}}}});function Bf(e){const[t,n="center"]=e.split("-");return[t,n]}var hN=_f,gN=Ff,vN=$f,yN=Wf;function bN(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Vf=e=>{const{present:t,children:n}=e,r=xN(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=z(r.ref,wN(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};Vf.displayName="Presence";function xN(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=bN(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Qn(r.current);a.current=s==="mounted"?u:"none"},[s]),de(()=>{const u=r.current,d=o.current;if(d!==e){const p=a.current,h=Qn(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),de(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,m=h=>{const g=Qn(r.current).includes(h.animationName);if(h.target===t&&g&&(c("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(a.current=Qn(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Qn(e){return(e==null?void 0:e.animationName)||"none"}function wN(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=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),SN="VisuallyHidden",Yf=l.forwardRef((e,t)=>f.jsx(At.span,{...e,ref:t,style:{...CN,...e.style}}));Yf.displayName=SN;var NN=Yf,[Yr,rE]=ve("Tooltip",[Tf]),Hr=Tf(),Hf="TooltipProvider",EN=700,Wo="tooltip.open",[MN,Ya]=Yr(Hf),Gf=e=>{const{__scopeTooltip:t,delayDuration:n=EN,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,i=l.useRef(!0),s=l.useRef(!1),c=l.useRef(0);return l.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),f.jsx(MN,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:l.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:l.useCallback(u=>{s.current=u},[]),disableHoverableContent:o,children:a})};Gf.displayName=Hf;var Cn="Tooltip",[RN,Gr]=Yr(Cn),Uf=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,c=Ya(Cn,e.__scopeTooltip),u=Hr(t),[d,m]=l.useState(null),p=pe(),h=l.useRef(0),y=i??c.disableHoverableContent,g=s??c.delayDuration,v=l.useRef(!1),[b,x]=Ce({prop:r,defaultProp:o??!1,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(Wo))):c.onClose(),a==null||a(E)},caller:Cn}),w=l.useMemo(()=>b?v.current?"delayed-open":"instant-open":"closed",[b]),S=l.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,x(!0)},[x]),C=l.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x(!1)},[x]),M=l.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,x(!0),h.current=0},g)},[g,x]);return l.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),f.jsx(hN,{...u,children:f.jsx(RN,{scope:t,contentId:p,open:b,stateAttribute:w,trigger:d,onTriggerChange:m,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayedRef.current?M():S()},[c.isOpenDelayedRef,M,S]),onTriggerLeave:l.useCallback(()=>{y?C():(window.clearTimeout(h.current),h.current=0)},[C,y]),onOpen:S,onClose:C,disableHoverableContent:y,children:n})})};Uf.displayName=Cn;var Bo="TooltipTrigger",zf=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Gr(Bo,n),a=Ya(Bo,n),i=Hr(n),s=l.useRef(null),c=z(t,s,o.onTriggerChange),u=l.useRef(!1),d=l.useRef(!1),m=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),f.jsx(gN,{asChild:!0,...i,children:f.jsx(At.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:O(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:O(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:O(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:O(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:O(e.onBlur,o.onClose),onClick:O(e.onClick,o.onClose)})})});zf.displayName=Bo;var PN="TooltipPortal",[oE,kN]=Yr(PN,{forceMount:void 0}),zt="TooltipContent",Kf=l.forwardRef((e,t)=>{const n=kN(zt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=Gr(zt,e.__scopeTooltip);return f.jsx(Vf,{present:r||i.open,children:i.disableHoverableContent?f.jsx(qf,{side:o,...a,ref:t}):f.jsx(ON,{side:o,...a,ref:t})})}),ON=l.forwardRef((e,t)=>{const n=Gr(zt,e.__scopeTooltip),r=Ya(zt,e.__scopeTooltip),o=l.useRef(null),a=z(t,o),[i,s]=l.useState(null),{trigger:c,onClose:u}=n,d=o.current,{onPointerInTransitChange:m}=r,p=l.useCallback(()=>{s(null),m(!1)},[m]),h=l.useCallback((y,g)=>{const v=y.currentTarget,b={x:y.clientX,y:y.clientY},x=AN(b,v.getBoundingClientRect()),w=_N(b,x),S=jN(g.getBoundingClientRect()),C=$N([...w,...S]);s(C),m(!0)},[m]);return l.useEffect(()=>()=>p(),[p]),l.useEffect(()=>{if(c&&d){const y=v=>h(v,d),g=v=>h(v,c);return c.addEventListener("pointerleave",y),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",y),d.removeEventListener("pointerleave",g)}}},[c,d,h,p]),l.useEffect(()=>{if(i){const y=g=>{const v=g.target,b={x:g.clientX,y:g.clientY},x=(c==null?void 0:c.contains(v))||(d==null?void 0:d.contains(v)),w=!FN(b,i);x?p():w&&(p(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,d,i,u,p]),f.jsx(qf,{...e,ref:a})}),[IN,DN]=Yr(Cn,{isInside:!1}),TN=KS("TooltipContent"),qf=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,c=Gr(zt,n),u=Hr(n),{onClose:d}=c;return l.useEffect(()=>(document.addEventListener(Wo,d),()=>document.removeEventListener(Wo,d)),[d]),l.useEffect(()=>{if(c.trigger){const m=p=>{const h=p.target;h!=null&&h.contains(c.trigger)&&d()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[c.trigger,d]),f.jsx(kf,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:m=>m.preventDefault(),onDismiss:d,children:f.jsxs(vN,{"data-state":c.stateAttribute,...u,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[f.jsx(TN,{children:r}),f.jsx(IN,{scope:n,isInside:!0,children:f.jsx(NN,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Kf.displayName=zt;var Xf="TooltipArrow",Zf=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Hr(n);return DN(Xf,n).isInside?null:f.jsx(yN,{...o,...r,ref:t})});Zf.displayName=Xf;function AN(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function _N(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function jN(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function FN(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const s=t[a],c=t[i],u=s.x,d=s.y,m=c.x,p=c.y;d>r!=p>r&&n<(m-u)*(r-d)/(p-d)+u&&(o=!o)}return o}function $N(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),LN(t)}function LN(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],i=n[n.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var WN=Gf,BN=Uf,VN=zf,YN=Kf,HN=Zf;const GN=WN,Qf=l.forwardRef(({children:e,content:t,side:n="top",align:r="center",offset:o=2,hasArrow:a=!0,className:i,zIndex:s,...c},u)=>{const d=Ye("tooltip",s);return f.jsxs(BN,{children:[f.jsx(VN,{asChild:!0,children:e}),f.jsxs(YN,{ref:u,align:r,className:k(ie.tooltip,i),side:n,sideOffset:o,style:{zIndex:d,...c.style},...c,children:[t,a?f.jsx(HN,{className:"fill-base-700 stroke-base-700",height:5,width:11}):null]})]})});Qf.displayName="Tooltip";exports.Accordion=bi;exports.Alert=xi;exports.Autocomplete=el;exports.Badge=tl;exports.Breadcrumbs=nl;exports.Button=Ie;exports.Calendar=Ca;exports.Checkbox=Sa;exports.CheckboxGroup=Vl;exports.Combobox=Yl;exports.DatePicker=Hl;exports.DateRangePicker=Gl;exports.Dialog=Qg;exports.DialogClose=ev;exports.DialogContent=lc;exports.DialogDescription=Ul;exports.DialogFooter=zl;exports.DialogHeader=Kl;exports.DialogOverlay=aa;exports.DialogPortal=uc;exports.DialogTitle=ql;exports.DialogTrigger=Jg;exports.DropdownButton=Au;exports.FormItem=_u;exports.Image=ju;exports.Input=Fu;exports.Label=Fn;exports.MultiSelect=$u;exports.Popover=Qt;exports.PopoverContent=It;exports.PopoverTrigger=Jt;exports.Radio=Ta;exports.RadioGroup=id;exports.Select=$a;exports.SelectContent=_a;exports.SelectGroup=tS;exports.SelectItem=ja;exports.SelectLabel=Yd;exports.SelectRoot=Bd;exports.SelectSeparator=Hd;exports.SelectTrigger=Fa;exports.SelectValue=Vd;exports.SingleSelect=$a;exports.StepIndicator=pS;exports.Switch=La;exports.SwitchGroup=tf;exports.Tabs=GS;exports.TabsContent=Ef;exports.TabsList=Sf;exports.TabsTrigger=Nf;exports.Textarea=Mf;exports.Tooltip=Qf;exports.TooltipProvider=GN;exports.cn=k;exports.configureZIndex=qg;exports.getZIndex=Ye;exports.getZIndexConfig=Xg;exports.resetZIndexConfig=Zg;exports.tw=ge;exports.useAriaDisabled=De;exports.useAriaLabelled=En;exports.useFormGroupLayout=Qo;
|
|
202
200
|
//# sourceMappingURL=index.cjs.map
|