@atlanhq/app-playground 1.10.0 → 3.0.1

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.
@@ -1,4 +1,4 @@
1
- import{F as Bs,G as zC,H as s0,I as l0,k as I,J as Rp,K as xt,L as Ye,r as fe,d as O,M as HC,N as Se,h as Pt,O as oe,P as $,Q as g,z as w,D as C,R as V,S as U,T as ft,U as yt,o as Qa,e as c0,V as no,s as Hc,W as ze,X as Dp,Y as Ut,Z as _n,y as M,A as N,C as j,$ as zs,a0 as L,a1 as Ie,B as se,E as Ne,a2 as jC,a3 as u0,a4 as At,a5 as d0,a6 as WC,a7 as vh,a8 as Qo,a9 as bh,aa as yh,a as UC,ab as GC,ac as qC,ad as YC,ae as KC,af as XC,ag as ZC,ah as JC,ai as er,aj as li,ak as ci,al as h0,am as QC,an as p0,ao as Sg,ap as ek,_ as Cu,aq as tk,ar as $g,as as nk,at as f0,x as ok}from"./B2-85yxj.js";function xh(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}var ik=e=>typeof e=="object"&&e!==null;function Vp(e){return Object.fromEntries(Object.entries(e??{}).filter(([t,n])=>n!==void 0))}var ak=e=>e==="base";function rk(e){return e.slice().filter(t=>!ak(t))}function Eg(e){return String.fromCharCode(e+(e>25?39:97))}function sk(e){let t="",n;for(n=Math.abs(e);n>52;n=n/52|0)t=Eg(n%52)+t;return Eg(n%52)+t}function lk(e,t){let n=t.length;for(;n;)e=e*33^t.charCodeAt(--n);return e}function ck(e){return sk(lk(5381,e)>>>0)}var g0=/\s*!(important)?/i;function uk(e){return typeof e=="string"?g0.test(e):!1}function dk(e){return typeof e=="string"?e.replace(g0,"").trim():e}function m0(e){return typeof e=="string"?e.replaceAll(" ","_"):e}var Hs=e=>{const t=new Map;return(...n)=>{const o=JSON.stringify(n);if(t.has(o))return t.get(o);const i=e(...n);return t.set(o,i),i}};function Mp(...e){return e.reduce((t,n)=>(n&&Object.keys(n).forEach(o=>{const i=t[o],a=n[o];xh(i)&&xh(a)?t[o]=Mp(i,a):t[o]=a}),t),{})}var hk=e=>e!=null;function v0(e,t,n={}){const{stop:o,getKey:i}=n;function a(r,s=[]){if(ik(r)){const l={};for(const[c,u]of Object.entries(r)){const d=i?.(c,u)??c,h=[...s,d];if(o!=null&&o(r,h))return t(r,s);const p=a(u,h);hk(p)&&(l[d]=p)}return l}return t(r,s)}return a(e)}function pk(e,t){return e.reduce((n,o,i)=>{const a=t[i];return o!=null&&(n[a]=o),n},{})}function b0(e,t,n=!0){const{utility:o,conditions:i}=t,{hasShorthand:a,resolveShorthand:r}=o;return v0(e,s=>Array.isArray(s)?pk(s,i.breakpoints.keys):s,{stop:s=>Array.isArray(s),getKey:n?s=>a?r(s):s:void 0})}var fk={shift:e=>e,finalize:e=>e,breakpoints:{keys:[]}},gk=e=>typeof e=="string"?e.replaceAll(/[\n\s]+/g," "):e;function mk(e){const{utility:t,hash:n,conditions:o=fk}=e,i=r=>[t.prefix,r].filter(Boolean).join("-"),a=(r,s)=>{let l;if(n){const c=[...o.finalize(r),s];l=i(t.toHash(c,ck))}else l=[...o.finalize(r),i(s)].join(":");return l};return Hs(({base:r,...s}={})=>{const l=Object.assign(s,r),c=b0(l,e),u=new Set;return v0(c,(d,h)=>{if(d==null)return;const p=uk(d),[m,...f]=o.shift(h),b=rk(f),v=t.transform(m,dk(gk(d)));let y=a(b,v.className);p&&(y=`${y}!`),u.add(y)}),Array.from(u).join(" ")})}function vk(...e){return e.flat().filter(t=>xh(t)&&Object.keys(Vp(t)).length>0)}function bk(e){function t(i){const a=vk(...i);return a.length===1?a:a.map(r=>b0(r,e))}function n(...i){return Mp(...t(i))}function o(...i){return Object.assign({},...t(i))}return{mergeCss:Hs(n),assignCss:o}}var yk=/([A-Z])/g,xk=/^ms-/,wk=Hs(e=>e.startsWith("--")?e:e.replace(yk,"-$1").replace(xk,"-ms-").toLowerCase()),_k="cm,mm,Q,in,pc,pt,px,em,ex,ch,rem,lh,rlh,vw,vh,vmin,vmax,vb,vi,svw,svh,lvw,lvh,dvw,dvh,cqw,cqh,cqi,cqb,cqmin,cqmax,%";`${_k.split(",").join("|")}`;var Ck=(e={})=>{const t=o=>{var i;return{className:[e.className,o].filter(Boolean).join("__"),base:((i=e.base)==null?void 0:i[o])??{},variants:{},defaultVariants:e.defaultVariants??{},compoundVariants:e.compoundVariants?kk(e.compoundVariants,o):[]}},n=(e.slots??[]).map(o=>[o,t(o)]);for(const[o,i]of Object.entries(e.variants??{}))for(const[a,r]of Object.entries(i))n.forEach(([s,l])=>{var c;(c=l.variants)[o]??(c[o]={}),l.variants[o][a]=r[s]??{}});return Object.fromEntries(n)},kk=(e,t)=>e.filter(n=>n.css[t]).map(n=>({...n,css:n.css[t]}));function y0(e,...t){const n=Object.getOwnPropertyDescriptors(e),o=Object.keys(n),i=r=>{const s={};for(let l=0;l<r.length;l++){const c=r[l];n[c]&&(Object.defineProperty(s,c,n[c]),delete n[c])}return s},a=r=>i(Array.isArray(r)?r:o.filter(r));return t.map(a).concat(i(o))}var Sk=(...e)=>{const t=e.reduce((n,o)=>(o&&o.forEach(i=>n.add(i)),n),new Set([]));return Array.from(t)};const $k="_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_default,_optional,_open,_closed,_fullscreen,_loading,_currentPage,_currentStep,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_starting,_complete,_incomplete,_collapsed,_current,_hidden,_off,_on,_today,_underValue,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,2xl,2xlOnly,2xlDown,smToMd,smToLg,smToXl,smTo2xl,mdToLg,mdToXl,mdTo2xl,lgToXl,lgTo2xl,xlTo2xl,base",x0=new Set($k.split(",")),Ek=/^@|&|&$/;function Tg(e){return x0.has(e)||Ek.test(e)}const Tk=/^_/,Ok=/&|@/;function Ik(e){return e.map(t=>x0.has(t)?t.replace(Tk,""):Ok.test(t)?`[${m0(t.trim())}]`:t)}function Pk(e){return e.sort((t,n)=>{const o=Tg(t),i=Tg(n);return o&&!i?1:!o&&i?-1:0})}const Ak="aspectRatio:asp,boxDecorationBreak:bx-db,zIndex:z,boxSizing:bx-s,objectPosition:obj-p,objectFit:obj-f,overscrollBehavior:ovs-b,overscrollBehaviorX:ovs-bx,overscrollBehaviorY:ovs-by,position:pos/1,top:top,left:left,inset:inset,insetInline:inset-x/insetX,insetBlock:inset-y/insetY,insetBlockEnd:inset-be,insetBlockStart:inset-bs,insetInlineEnd:inset-e/insetEnd/end,insetInlineStart:inset-s/insetStart/start,right:right,bottom:bottom,float:float,visibility:vis,display:d,hideFrom:hide,hideBelow:show,flexBasis:flex-b,flex:flex,flexDirection:flex-d/flexDir,flexGrow:flex-g,flexShrink:flex-sh,gridTemplateColumns:grid-tc,gridTemplateRows:grid-tr,gridColumn:grid-c,gridRow:grid-r,gridColumnStart:grid-cs,gridColumnEnd:grid-ce,gridAutoFlow:grid-af,gridAutoColumns:grid-ac,gridAutoRows:grid-ar,gap:gap,gridGap:grid-g,gridRowGap:grid-rg,gridColumnGap:grid-cg,rowGap:rg,columnGap:cg,justifyContent:jc,alignContent:ac,alignItems:ai,alignSelf:as,padding:p/1,paddingLeft:pl/1,paddingRight:pr/1,paddingTop:pt/1,paddingBottom:pb/1,paddingBlock:py/1/paddingY,paddingBlockEnd:pbe,paddingBlockStart:pbs,paddingInline:px/paddingX/1,paddingInlineEnd:pe/1/paddingEnd,paddingInlineStart:ps/1/paddingStart,marginLeft:ml/1,marginRight:mr/1,marginTop:mt/1,marginBottom:mb/1,margin:m/1,marginBlock:my/1/marginY,marginBlockEnd:mbe,marginBlockStart:mbs,marginInline:mx/1/marginX,marginInlineEnd:me/1/marginEnd,marginInlineStart:ms/1/marginStart,spaceX:sx,spaceY:sy,outlineWidth:ring-w/ringWidth,outlineColor:ring-c/ringColor,outline:ring/1,outlineOffset:ring-o/ringOffset,divideX:dvd-x,divideY:dvd-y,divideColor:dvd-c,divideStyle:dvd-s,width:w/1,inlineSize:w-is,minWidth:min-w/minW,minInlineSize:min-w-is,maxWidth:max-w/maxW,maxInlineSize:max-w-is,height:h/1,blockSize:h-bs,minHeight:min-h/minH,minBlockSize:min-h-bs,maxHeight:max-h/maxH,maxBlockSize:max-b,color:c,fontFamily:ff,fontSize:fs,fontSizeAdjust:fs-a,fontPalette:fp,fontKerning:fk,fontFeatureSettings:ff-s,fontWeight:fw,fontSmoothing:fsmt,fontVariant:fv,fontVariantAlternates:fv-alt,fontVariantCaps:fv-caps,fontVariationSettings:fv-s,fontVariantNumeric:fv-num,letterSpacing:ls,lineHeight:lh,textAlign:ta,textDecoration:td,textDecorationColor:td-c,textEmphasisColor:te-c,textDecorationStyle:td-s,textDecorationThickness:td-t,textUnderlineOffset:tu-o,textTransform:tt,textIndent:ti,textShadow:tsh,textShadowColor:tsh-c/textShadowColor,textOverflow:tov,verticalAlign:va,wordBreak:wb,textWrap:tw,truncate:trunc,lineClamp:lc,listStyleType:li-t,listStylePosition:li-pos,listStyleImage:li-img,listStyle:li-s,backgroundPosition:bg-p/bgPosition,backgroundPositionX:bg-p-x/bgPositionX,backgroundPositionY:bg-p-y/bgPositionY,backgroundAttachment:bg-a/bgAttachment,backgroundClip:bg-cp/bgClip,background:bg/1,backgroundColor:bg-c/bgColor,backgroundOrigin:bg-o/bgOrigin,backgroundImage:bg-i/bgImage,backgroundRepeat:bg-r/bgRepeat,backgroundBlendMode:bg-bm/bgBlendMode,backgroundSize:bg-s/bgSize,backgroundGradient:bg-grad/bgGradient,textGradient:txt-grad,gradientFromPosition:grad-from-pos,gradientToPosition:grad-to-pos,gradientFrom:grad-from,gradientTo:grad-to,gradientVia:grad-via,gradientViaPosition:grad-via-pos,borderRadius:bdr/rounded,borderTopLeftRadius:bdr-tl/roundedTopLeft,borderTopRightRadius:bdr-tr/roundedTopRight,borderBottomRightRadius:bdr-br/roundedBottomRight,borderBottomLeftRadius:bdr-bl/roundedBottomLeft,borderTopRadius:bdr-t/roundedTop,borderRightRadius:bdr-r/roundedRight,borderBottomRadius:bdr-b/roundedBottom,borderLeftRadius:bdr-l/roundedLeft,borderStartStartRadius:bdr-ss/roundedStartStart,borderStartEndRadius:bdr-se/roundedStartEnd,borderStartRadius:bdr-s/roundedStart,borderEndStartRadius:bdr-es/roundedEndStart,borderEndEndRadius:bdr-ee/roundedEndEnd,borderEndRadius:bdr-e/roundedEnd,border:bd,borderWidth:bd-w,borderTopWidth:bd-t-w,borderLeftWidth:bd-l-w,borderRightWidth:bd-r-w,borderBottomWidth:bd-b-w,borderColor:bd-c,borderInline:bd-x/borderX,borderInlineWidth:bd-x-w/borderXWidth,borderInlineColor:bd-x-c/borderXColor,borderBlock:bd-y/borderY,borderBlockWidth:bd-y-w/borderYWidth,borderBlockColor:bd-y-c/borderYColor,borderLeft:bd-l,borderLeftColor:bd-l-c,borderInlineStart:bd-s/borderStart,borderInlineStartWidth:bd-s-w/borderStartWidth,borderInlineStartColor:bd-s-c/borderStartColor,borderRight:bd-r,borderRightColor:bd-r-c,borderInlineEnd:bd-e/borderEnd,borderInlineEndWidth:bd-e-w/borderEndWidth,borderInlineEndColor:bd-e-c/borderEndColor,borderTop:bd-t,borderTopColor:bd-t-c,borderBottom:bd-b,borderBottomColor:bd-b-c,borderBlockEnd:bd-be,borderBlockEndColor:bd-be-c,borderBlockStart:bd-bs,borderBlockStartColor:bd-bs-c,opacity:op,boxShadow:bx-sh/shadow,boxShadowColor:bx-sh-c/shadowColor,mixBlendMode:mix-bm,filter:filter,brightness:brightness,contrast:contrast,grayscale:grayscale,hueRotate:hue-rotate,invert:invert,saturate:saturate,sepia:sepia,dropShadow:drop-shadow,blur:blur,backdropFilter:bkdp,backdropBlur:bkdp-blur,backdropBrightness:bkdp-brightness,backdropContrast:bkdp-contrast,backdropGrayscale:bkdp-grayscale,backdropHueRotate:bkdp-hue-rotate,backdropInvert:bkdp-invert,backdropOpacity:bkdp-opacity,backdropSaturate:bkdp-saturate,backdropSepia:bkdp-sepia,borderCollapse:bd-cl,borderSpacing:bd-sp,borderSpacingX:bd-sx,borderSpacingY:bd-sy,tableLayout:tbl,transitionTimingFunction:trs-tmf,transitionDelay:trs-dly,transitionDuration:trs-dur,transitionProperty:trs-prop,transition:trs,animation:anim,animationName:anim-n,animationTimingFunction:anim-tmf,animationDuration:anim-dur,animationDelay:anim-dly,animationPlayState:anim-ps,animationComposition:anim-comp,animationFillMode:anim-fm,animationDirection:anim-dir,animationIterationCount:anim-ic,animationRange:anim-r,animationState:anim-s,animationRangeStart:anim-rs,animationRangeEnd:anim-re,animationTimeline:anim-tl,transformOrigin:trf-o,transformBox:trf-b,transformStyle:trf-s,transform:trf,rotate:rotate,rotateX:rotate-x,rotateY:rotate-y,rotateZ:rotate-z,scale:scale,scaleX:scale-x,scaleY:scale-y,translate:translate,translateX:translate-x/x,translateY:translate-y/y,translateZ:translate-z/z,accentColor:ac-c,caretColor:ca-c,scrollBehavior:scr-bhv,scrollbar:scr-bar,scrollbarColor:scr-bar-c,scrollbarGutter:scr-bar-g,scrollbarWidth:scr-bar-w,scrollMargin:scr-m,scrollMarginLeft:scr-ml,scrollMarginRight:scr-mr,scrollMarginTop:scr-mt,scrollMarginBottom:scr-mb,scrollMarginBlock:scr-my/scrollMarginY,scrollMarginBlockEnd:scr-mbe,scrollMarginBlockStart:scr-mbt,scrollMarginInline:scr-mx/scrollMarginX,scrollMarginInlineEnd:scr-me,scrollMarginInlineStart:scr-ms,scrollPadding:scr-p,scrollPaddingBlock:scr-py/scrollPaddingY,scrollPaddingBlockStart:scr-pbs,scrollPaddingBlockEnd:scr-pbe,scrollPaddingInline:scr-px/scrollPaddingX,scrollPaddingInlineEnd:scr-pe,scrollPaddingInlineStart:scr-ps,scrollPaddingLeft:scr-pl,scrollPaddingRight:scr-pr,scrollPaddingTop:scr-pt,scrollPaddingBottom:scr-pb,scrollSnapAlign:scr-sa,scrollSnapStop:scrs-s,scrollSnapType:scrs-t,scrollSnapStrictness:scrs-strt,scrollSnapMargin:scrs-m,scrollSnapMarginTop:scrs-mt,scrollSnapMarginBottom:scrs-mb,scrollSnapMarginLeft:scrs-ml,scrollSnapMarginRight:scrs-mr,scrollSnapCoordinate:scrs-c,scrollSnapDestination:scrs-d,scrollSnapPointsX:scrs-px,scrollSnapPointsY:scrs-py,scrollSnapTypeX:scrs-tx,scrollSnapTypeY:scrs-ty,scrollTimeline:scrtl,scrollTimelineAxis:scrtl-a,scrollTimelineName:scrtl-n,touchAction:tch-a,userSelect:us,overflow:ov,overflowWrap:ov-wrap,overflowX:ov-x,overflowY:ov-y,overflowAnchor:ov-a,overflowBlock:ov-b,overflowInline:ov-i,overflowClipBox:ovcp-bx,overflowClipMargin:ovcp-m,overscrollBehaviorBlock:ovs-bb,overscrollBehaviorInline:ovs-bi,fill:fill,stroke:stk,strokeWidth:stk-w,strokeDasharray:stk-dsh,strokeDashoffset:stk-do,strokeLinecap:stk-lc,strokeLinejoin:stk-lj,strokeMiterlimit:stk-ml,strokeOpacity:stk-op,srOnly:sr,debug:debug,appearance:ap,backfaceVisibility:bfv,clipPath:cp-path,hyphens:hy,mask:msk,maskImage:msk-i,maskSize:msk-s,textSizeAdjust:txt-adj,container:cq,containerName:cq-n,containerType:cq-t,textStyle:textStyle",w0=new Map,_0=new Map;Ak.split(",").forEach(e=>{const[t,n]=e.split(":"),[o,...i]=n.split("/");w0.set(t,o),i.length&&i.forEach(a=>{_0.set(a==="1"?o:a,t)})});const Og=e=>_0.get(e)||e,C0={conditions:{shift:Pk,finalize:Ik,breakpoints:{keys:["base","sm","md","lg","xl","2xl"]}},utility:{transform:(e,t)=>{const n=Og(e);return{className:`${w0.get(n)||wk(n)}_${m0(t)}`}},hasShorthand:!0,toHash:(e,t)=>t(e.join(":")),resolveShorthand:Og}},Rk=mk(C0),Ft=(...e)=>Rk(Ti(...e));Ft.raw=(...e)=>Ti(...e);const{mergeCss:Ti}=bk(C0),Ig=e=>({base:{},variants:{},defaultVariants:{},compoundVariants:[],...e});function Zi(e){const{base:t,variants:n,defaultVariants:o,compoundVariants:i}=Ig(e),a=h=>({...o,...Vp(h)});function r(h={}){var p;const m=a(h);let f={...t};for(const[v,y]of Object.entries(m))(p=n[v])!=null&&p[y]&&(f=Ti(f,n[v][y]));const b=Dk(i,m);return Ti(f,b)}function s(h){const p=Ig(h.config),m=Sk(h.variantKeys,Object.keys(n));return Zi({base:Ti(t,p.base),variants:Object.fromEntries(m.map(f=>[f,Ti(n[f],p.variants[f])])),defaultVariants:Mp(o,p.defaultVariants),compoundVariants:[...i,...p.compoundVariants]})}function l(h){return Ft(r(h))}const c=Object.keys(n);function u(h){return y0(h,c)}const d=Object.fromEntries(Object.entries(n).map(([h,p])=>[h,Object.keys(p)]));return Object.assign(Hs(l),{__cva__:!0,variantMap:d,variantKeys:c,raw:r,config:e,merge:s,splitVariantProps:u,getVariantProps:a})}function Dk(e,t){let n={};return e.forEach(o=>{Object.entries(o).every(([i,a])=>i==="css"?!0:(Array.isArray(a)?a:[a]).some(r=>t[i]===r))&&(n=Ti(n,o.css))}),n}function Vk(){let e="",t=0,n;for(;t<arguments.length;)(n=arguments[t++])&&typeof n=="string"&&(e&&(e+=" "),e+=n);return e}const Mk=(e,t)=>e+"__"+t;function ge(e){const t=Object.entries(Ck(e)).map(([u,d])=>[u,Zi(d)]),n=e.defaultVariants??{};function o(u){const d=t.map(([h,p])=>[h,Vk(p(u),e.className&&Mk(e.className,h))]);return Object.fromEntries(d)}function i(u){const d=t.map(([h,p])=>[h,p.raw(u)]);return Object.fromEntries(d)}const a=e.variants??{},r=Object.keys(a);function s(u){return y0(u,r)}const l=u=>({...n||{},...Vp(u)}),c=Object.fromEntries(Object.entries(a).map(([u,d])=>[u,Object.keys(d)]));return Object.assign(Hs(o),{__cva__:!1,raw:i,variantMap:c,variantKeys:r,splitVariantProps:s,getVariantProps:l})}var be=(e,t=[])=>({parts:(...n)=>{if(Nk(t))return be(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>be(e,[...t,...n]),omit:(...n)=>be(e,t.filter(o=>!n.includes(o))),rename:n=>be(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,o)=>Object.assign(n,{[o]:{selector:[`&[data-scope="${ra(e)}"][data-part="${ra(o)}"]`,`& [data-scope="${ra(e)}"][data-part="${ra(o)}"]`].join(", "),attrs:{"data-scope":ra(e),"data-part":ra(o)}}}),{})}),ra=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Nk=e=>e.length===0,Lk=Object.defineProperty,Fk=(e,t,n)=>t in e?Lk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,md=(e,t,n)=>Fk(e,typeof t!="symbol"?t+"":t,n);function Bk(e){if(!e)return!1;try{return e.selectionStart===0&&e.selectionEnd===0}catch{return e.value===""}}function zk(e){if(!e)return;const t=e.selectionStart??0,n=e.selectionEnd??0;Math.abs(n-t)===0&&t===0&&e.setSelectionRange(e.value.length,e.value.length)}var Pg=e=>Math.max(0,Math.min(1,e)),Hk=(e,t)=>e.map((n,o)=>e[(Math.max(t,0)+o)%e.length]),vd=(...e)=>t=>e.reduce((n,o)=>o(n),t),Jr=()=>{},ku=e=>typeof e=="object"&&e!==null,k0=2147483647,D=e=>e?"":void 0,Je=e=>e?"true":void 0,jk=1,Wk=9,Uk=11,et=e=>ku(e)&&e.nodeType===jk&&typeof e.nodeName=="string",Su=e=>ku(e)&&e.nodeType===Wk,Gk=e=>ku(e)&&e===e.window,S0=e=>et(e)?e.localName||"":"#document";function qk(e){return["html","body","#document"].includes(S0(e))}var Yk=e=>ku(e)&&e.nodeType!==void 0,Ba=e=>Yk(e)&&e.nodeType===Uk&&"host"in e,Kk=e=>et(e)&&e.localName==="input",ya=e=>!!(e!=null&&e.matches("a[href]")),Xk=e=>et(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function jc(e){if(!e)return!1;const t=e.getRootNode();return cs(t)===e}var Zk=/(textarea|select)/;function $u(e){if(e==null||!et(e))return!1;try{return Kk(e)&&e.selectionStart!=null||Zk.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch{return!1}}function Rt(e,t){var n;if(!e||!t||!et(e)||!et(t))return!1;const o=(n=t.getRootNode)==null?void 0:n.call(t);if(e===t||e.contains(t))return!0;if(o&&Ba(o)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function an(e){return Su(e)?e:Gk(e)?e.document:e?.ownerDocument??document}function Jk(e){return an(e).documentElement}function Ke(e){var t;return Ba(e)?Ke(e.host):Su(e)?e.defaultView??window:et(e)?((t=e.ownerDocument)==null?void 0:t.defaultView)??window:window}function cs(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function Qk(e){if(S0(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ba(e)&&e.host||Jk(e);return Ba(t)?t.host:t}function Np(e){let t;try{if(t=e.getRootNode({composed:!0}),Su(t)||Ba(t))return t}catch{}return e.ownerDocument??document}var bd=new WeakMap;function za(e){return bd.has(e)||bd.set(e,Ke(e).getComputedStyle(e)),bd.get(e)}var Lp=new Set(["menu","listbox","dialog","grid","tree","region"]),eS=e=>Lp.has(e),$0=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function E0(e,t){const n=new Set,o=Np(e),i=a=>{const r=a.querySelectorAll("[aria-controls]");for(const s of r){if(s.getAttribute("aria-expanded")!=="true")continue;const l=$0(s);for(const c of l){if(!c||n.has(c))continue;n.add(c);const u=o.getElementById(c);if(u){const d=u.getAttribute("role"),h=u.getAttribute("aria-modal")==="true";if(d&&eS(d)&&!h&&(u===t||u.contains(t)||i(u)))return!0}}}return!1};return i(e)}function T0(e,t){const n=Np(e),o=new Set,i=a=>{const r=a.querySelectorAll("[aria-controls]");for(const s of r){if(s.getAttribute("aria-expanded")!=="true")continue;const l=$0(s);for(const c of l){if(!c||o.has(c))continue;o.add(c);const u=n.getElementById(c);if(u){const d=u.getAttribute("role"),h=u.getAttribute("aria-modal")==="true";d&&Lp.has(d)&&!h&&(t(u),i(u))}}}};i(e)}function tS(e){const t=new Set;return T0(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function nS(e){const t=e.getAttribute("role");return!!(t&&Lp.has(t))}function oS(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function iS(e){var t;return oS(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function aS(e){if(!e.id)return!1;const t=Np(e),n=CSS.escape(e.id),o=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(o)&&nS(e))}var Eu=()=>typeof document<"u";function rS(){const e=navigator.userAgentData;return e?.platform??navigator.platform}function sS(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}var Fp=e=>Eu()&&e.test(rS()),O0=e=>Eu()&&e.test(sS()),lS=e=>Eu()&&e.test(navigator.vendor),Ag=()=>Eu()&&!!navigator.maxTouchPoints,cS=()=>Fp(/^iPhone/i),uS=()=>Fp(/^iPad/i)||Tu()&&navigator.maxTouchPoints>1,Bp=()=>cS()||uS(),dS=()=>Tu()||Bp(),Tu=()=>Fp(/^Mac/i),Ou=()=>dS()&&lS(/apple/i),hS=()=>O0(/Firefox/i),pS=()=>O0(/Android/i);function fS(e){var t,n,o;return((t=e.composedPath)==null?void 0:t.call(e))??((o=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:o.call(n))}function je(e){const t=fS(e);return t?.[0]??e.target}function ks(e){return I0(e).isComposing||e.keyCode===229}function gS(e){return e.pointerType===""&&e.isTrusted?!0:pS()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}var Mi=e=>e.button===0,mS=e=>e.button===2||Tu()&&e.ctrlKey&&e.button===0,qn=e=>e.ctrlKey||e.altKey||e.metaKey,vS=e=>"touches"in e&&e.touches.length>0,bS={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Rg={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function Ss(e,t={}){const{dir:n="ltr",orientation:o="horizontal"}=t;let i=e.key;return i=bS[i]??i,n==="rtl"&&o==="horizontal"&&i in Rg&&(i=Rg[i]),i}function I0(e){return e.nativeEvent??e}var yS=new Set(["PageUp","PageDown"]),xS=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]);function wS(e){return e.ctrlKey||e.metaKey?.1:yS.has(e.key)||e.shiftKey&&xS.has(e.key)?10:1}function Wc(e,t="client"){const n=vS(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Ee=(e,t,n,o)=>{const i=typeof e=="function"?e():e;return i?.addEventListener(t,n,o),()=>{i?.removeEventListener(t,n,o)}};function P0(e,t){const{type:n="HTMLInputElement",property:o="value"}=t,i=Ke(e)[n].prototype;return Object.getOwnPropertyDescriptor(i,o)??{}}function _S(e){if(e.localName==="input")return"HTMLInputElement";if(e.localName==="textarea")return"HTMLTextAreaElement";if(e.localName==="select")return"HTMLSelectElement"}function Rn(e,t,n="value"){var o;if(!e)return;const i=_S(e);i&&((o=P0(e,{type:i,property:n}).set)==null||o.call(e,t)),e.setAttribute(n,t)}function zp(e,t){var n;e&&((n=P0(e,{type:"HTMLInputElement",property:"checked"}).set)==null||n.call(e,t),t?e.setAttribute("checked",""):e.removeAttribute("checked"))}function A0(e,t){const{value:n,bubbles:o=!0}=t;if(!e)return;const i=Ke(e);e instanceof i.HTMLInputElement&&(Rn(e,`${n}`),e.dispatchEvent(new i.Event("input",{bubbles:o})))}function R0(e,t){const{checked:n,bubbles:o=!0}=t;if(!e)return;const i=Ke(e);e instanceof i.HTMLInputElement&&(zp(e,n),e.dispatchEvent(new i.Event("click",{bubbles:o})))}function CS(e){return kS(e)?e.form:e.closest("form")}function kS(e){return e.matches("textarea, input, select, button")}function SS(e,t){if(!e)return;const n=CS(e),o=i=>{i.defaultPrevented||t()};return n?.addEventListener("reset",o,{passive:!0}),()=>n?.removeEventListener("reset",o)}function $S(e,t){const n=e?.closest("fieldset");if(!n)return;t(n.disabled);const o=Ke(n),i=new o.MutationObserver(()=>t(n.disabled));return i.observe(n,{attributes:!0,attributeFilter:["disabled"]}),()=>i.disconnect()}function tr(e,t){if(!e)return;const{onFieldsetDisabledChange:n,onFormReset:o}=t,i=[SS(e,o),$S(e,n)];return()=>i.forEach(a=>a?.())}var D0=e=>et(e)&&e.tagName==="IFRAME",ES=/^(audio|video|details)$/;function V0(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var TS=e=>!Number.isNaN(V0(e)),OS=e=>V0(e)<0;function IS(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;const n=t(e);return(n===!0?e.shadowRoot:n)||null}function M0(e,t,n){const o=[...e],i=[...e],a=new Set,r=new Map;e.forEach((l,c)=>r.set(l,c));let s=0;for(;s<i.length;){const l=i[s++];if(!l||a.has(l))continue;a.add(l);const c=IS(l,t);if(c){const u=Array.from(c.querySelectorAll(Iu)).filter(n),d=r.get(l);if(d!==void 0){const h=d+1;o.splice(h,0,...u),u.forEach((p,m)=>{r.set(p,h+m)});for(let p=h+u.length;p<o.length;p++)r.set(o[p],p)}else{const h=o.length;o.push(...u),u.forEach((p,m)=>{r.set(p,h+m)})}i.push(...u)}}return o}var Iu="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",N0=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:o}=t,i=Array.from(e.querySelectorAll(Iu));(n==!0||n=="if-empty"&&i.length===0)&&et(e)&&Eo(e)&&i.unshift(e);const a=[];for(const r of i)if(Eo(r)){if(D0(r)&&r.contentDocument){const s=r.contentDocument.body;a.push(...N0(s,{getShadowRoot:o}));continue}a.push(r)}return o?M0(a,o,Eo):a};function Eo(e){return!et(e)||e.closest("[inert]")?!1:e.matches(Iu)&&Xk(e)}function js(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:o}=t,i=Array.from(e.querySelectorAll(Iu));n&&Oi(e)&&i.unshift(e);const a=[];for(const r of i)if(Oi(r)){if(D0(r)&&r.contentDocument){const s=r.contentDocument.body;a.push(...js(s,{getShadowRoot:o}));continue}a.push(r)}if(o){const r=M0(a,o,Oi);return!r.length&&n?i:r}return!a.length&&n?i:a}function Oi(e){return et(e)&&e.tabIndex>0?!0:Eo(e)&&!OS(e)}function PS(e,t={}){const n=js(e,t),o=n[0]||null,i=n[n.length-1]||null;return[o,i]}function fr(e){return e.tabIndex<0&&(ES.test(e.localName)||$u(e))&&!TS(e)?0:e.tabIndex}function Hp(e){const{root:t,getInitialEl:n,filter:o,enabled:i=!0}=e;if(!i)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t?.querySelector("[data-autofocus],[autofocus]")),!a){const r=js(t);a=o?r.filter(o)[0]:r[0]}return a||t||void 0}function AS(e){const t=e.currentTarget;if(!t)return!1;const[n,o]=PS(t);return!(jc(n)&&e.shiftKey||jc(o)&&!e.shiftKey||!n&&!o)}var L0=class F0{constructor(){md(this,"id",null),md(this,"fn_cleanup"),md(this,"cleanup",()=>{this.cancel()})}static create(){return new F0}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t?.()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function de(e){const t=L0.create();return t.request(e),t.cleanup}function Pu(e){const t=new Set;function n(o){const i=globalThis.requestAnimationFrame(o);t.add(()=>globalThis.cancelAnimationFrame(i))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function RS(e,t,n){const o=de(()=>{e.removeEventListener(t,i,!0),n()}),i=()=>{o(),n()};return e.addEventListener(t,i,{once:!0,capture:!0}),o}function DS(e,t){if(!e)return;const{attributes:n,callback:o}=t,i=e.ownerDocument.defaultView||window,a=new i.MutationObserver(r=>{for(const s of r)s.type==="attributes"&&s.attributeName&&n.includes(s.attributeName)&&o(s)});return a.observe(e,{attributes:!0,attributeFilter:n}),()=>a.disconnect()}function Ws(e,t){const{defer:n}=t,o=n?de:a=>a(),i=[];return i.push(o(()=>{const a=typeof e=="function"?e():e;i.push(DS(a,t))})),()=>{i.forEach(a=>a?.())}}function VS(e,t){const{callback:n}=t;if(!e)return;const o=e.ownerDocument.defaultView||window,i=new o.MutationObserver(n);return i.observe(e,{childList:!0,subtree:!0}),()=>i.disconnect()}function MS(e,t){const{defer:n}=t,o=n?de:a=>a(),i=[];return i.push(o(()=>{const a=typeof e=="function"?e():e;i.push(VS(a,t))})),()=>{i.forEach(a=>a?.())}}function B0(e){const t=()=>{const n=Ke(e);e.dispatchEvent(new n.MouseEvent("click"))};hS()?RS(e,"keyup",t):queueMicrotask(t)}function Uc(e){const t=Qk(e);return qk(t)?an(t).body:et(t)&&jp(t)?t:Uc(t)}function z0(e,t=[]){const n=Uc(e),o=n===e.ownerDocument.body,i=Ke(n);return o?t.concat(i,i.visualViewport||[],jp(n)?n:[]):t.concat(n,z0(n,[]))}var NS=/auto|scroll|overlay|hidden|clip/,LS=new Set(["inline","contents"]);function jp(e){const t=Ke(e),{overflow:n,overflowX:o,overflowY:i,display:a}=t.getComputedStyle(e);return NS.test(n+i+o)&&!LS.has(a)}function FS(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function $s(e,t){const{rootEl:n,...o}=t||{};!e||!n||!jp(n)||!FS(n)||e.scrollIntoView(o)}function H0(e,t){const{left:n,top:o,width:i,height:a}=t.getBoundingClientRect(),r={x:e.x-n,y:e.y-o},s={x:Pg(r.x/i),y:Pg(r.y/a)};function l(c={}){const{dir:u="ltr",orientation:d="horizontal",inverted:h}=c,p=typeof h=="object"?h.x:h,m=typeof h=="object"?h.y:h;return d==="horizontal"?u==="rtl"||p?1-s.x:s.x:m?1-s.y:s.y}return{offset:r,percent:s,getPercentValue:l}}function BS(e,t){const n=e.body,o="pointerLockElement"in e||"mozPointerLockElement"in e,i=()=>!!e.pointerLockElement;function a(){}function r(l){i(),console.error("PointerLock error occurred:",l),e.exitPointerLock()}if(!o)return;try{n.requestPointerLock()}catch{}const s=[Ee(e,"pointerlockchange",a,!1),Ee(e,"pointerlockerror",r,!1)];return()=>{s.forEach(l=>l()),e.exitPointerLock()}}var Oa="default",wh="",dc=new WeakMap;function zS(e={}){const{target:t,doc:n}=e,o=n??document,i=o.documentElement;return Bp()?(Oa==="default"&&(wh=i.style.webkitUserSelect,i.style.webkitUserSelect="none"),Oa="disabled"):t&&(dc.set(t,t.style.userSelect),t.style.userSelect="none"),()=>j0({target:t,doc:o})}function j0(e={}){const{target:t,doc:n}=e,o=(n??document).documentElement;if(Bp()){if(Oa!=="disabled")return;Oa="restoring",setTimeout(()=>{Pu(()=>{Oa==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=wh||""),wh="",Oa="default")})},300)}else if(t&&dc.has(t)){const i=dc.get(t);t.style.userSelect==="none"&&(t.style.userSelect=i??""),t.getAttribute("style")===""&&t.removeAttribute("style"),dc.delete(t)}}function Wp(e={}){const{defer:t,target:n,...o}=e,i=t?de:r=>r(),a=[];return a.push(i(()=>{const r=typeof n=="function"?n():n;a.push(zS({...o,target:r}))})),()=>{a.forEach(r=>r?.())}}function W0(e,t){const{onPointerMove:n,onPointerUp:o}=t,i=s=>{const l=Wc(s),c=Math.sqrt(l.x**2+l.y**2),u=s.pointerType==="touch"?10:5;if(!(c<u)){if(s.pointerType==="mouse"&&s.button===0){a(s);return}n({point:l,event:s})}},a=s=>{const l=Wc(s);o({point:l,event:s})},r=[Ee(e,"pointermove",i,!1),Ee(e,"pointerup",a,!1),Ee(e,"pointercancel",a,!1),Ee(e,"contextmenu",a,!1),Wp({doc:e})];return()=>{r.forEach(s=>s())}}function U0(e){const{pointerNode:t,keyboardNode:n=t,onPress:o,onPressStart:i,onPressEnd:a,isValidKey:r=v=>v.key==="Enter"}=e;if(!t)return Jr;const s=Ke(t);let l=Jr,c=Jr,u=Jr;const d=v=>({point:Wc(v),event:v});function h(v){i?.(d(v))}function p(v){a?.(d(v))}const m=Ee(t,"pointerdown",v=>{c();const y=Ee(s,"pointerup",_=>{const k=je(_);Rt(t,k)?o?.(d(_)):a?.(d(_))},{passive:!o,once:!0}),x=Ee(s,"pointercancel",p,{passive:!a,once:!0});c=vd(y,x),jc(n)&&v.pointerType==="mouse"&&v.preventDefault(),h(v)},{passive:!i}),f=Ee(n,"focus",b);l=vd(m,f);function b(){const v=k=>{if(!r(k))return;const E=S=>{if(!r(S))return;const R=new s.PointerEvent("pointerup"),B=d(R);o?.(B),a?.(B)};c(),c=Ee(n,"keyup",E);const P=new s.PointerEvent("pointerdown");h(P)},y=()=>{const k=new s.PointerEvent("pointercancel");p(k)},x=Ee(n,"keydown",v),_=Ee(n,"blur",y);u=vd(x,_)}return()=>{l(),c(),u()}}function ni(e,t){return Array.from(e?.querySelectorAll(t)??[])}function G0(e,t){return e?.querySelector(t)??null}var Up=e=>e.id;function HS(e,t,n=Up){return e.find(o=>n(o)===t)}function Au(e,t,n=Up){const o=HS(e,t,n);return o?e.indexOf(o):-1}function Gp(e,t,n=!0){let o=Au(e,t);return o=n?(o+1)%e.length:Math.min(o+1,e.length-1),e[o]}function qp(e,t,n=!0){let o=Au(e,t);return o===-1?n?e[e.length-1]:null:(o=n?(o-1+e.length)%e.length:Math.max(0,o-1),e[o])}var jS=e=>e.split("").map(t=>{const n=t.charCodeAt(0);return n>0&&n<128?t:n>=128&&n<=255?`/x${n.toString(16)}`.replace("/","\\"):""}).join("").trim(),WS=e=>{var t;return jS(((t=e.dataset)==null?void 0:t.valuetext)??e.textContent??"")},US=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());function GS(e,t,n,o=Up){const i=n?Au(e,n,o):-1;let a=n?Hk(e,i):e;return t.length===1&&(a=a.filter(r=>o(r)!==n)),a.find(r=>US(WS(r),t))}function qS(e,t,n){const o=e.getAttribute(t),i=o!=null;return e.setAttribute(t,n),()=>{i?e.setAttribute(t,o):e.removeAttribute(t)}}function Yp(e,t){if(!e)return Jr;const n=Object.keys(t).reduce((o,i)=>(o[i]=e.style.getPropertyValue(i),o),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function YS(e,t){const{state:n,activeId:o,key:i,timeout:a=350,itemToId:r}=t,s=n.keysSoFar+i,l=s.length>1&&Array.from(s).every(p=>p===s[0])?s[0]:s;let c=e.slice();const u=GS(c,l,o,r);function d(){clearTimeout(n.timer),n.timer=-1}function h(p){n.keysSoFar=p,d(),p!==""&&(n.timer=+setTimeout(()=>{h(""),d()},a))}return h(s),u}var Io=Object.assign(YS,{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:KS});function KS(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var Ru={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"};function XS(e,t,n){const{signal:o}=t;return[new Promise((i,a)=>{const r=setTimeout(()=>{a(new Error(`Timeout of ${n}ms exceeded`))},n);o.addEventListener("abort",()=>{clearTimeout(r),a(new Error("Promise aborted"))}),e.then(s=>{o.aborted||(clearTimeout(r),i(s))}).catch(s=>{o.aborted||(clearTimeout(r),a(s))})}),()=>t.abort()]}function ZS(e,t){const{timeout:n,rootNode:o}=t,i=Ke(o),a=an(o),r=new i.AbortController;return XS(new Promise(s=>{const l=e();if(l){s(l);return}const c=new i.MutationObserver(()=>{const u=e();u&&u.isConnected&&(c.disconnect(),s(u))});c.observe(a.body,{childList:!0,subtree:!0})}),r,n)}var JS=Object.defineProperty,q0=e=>{throw TypeError(e)},QS=(e,t,n)=>t in e?JS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mo=(e,t,n)=>QS(e,typeof t!="symbol"?t+"":t,n),e$=(e,t,n)=>t.has(e)||q0("Cannot "+n),Dg=(e,t,n)=>(e$(e,t,"read from private field"),t.get(e)),t$=(e,t,n)=>t.has(e)?q0("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n);function hc(e){return e==null?[]:Array.isArray(e)?e:[e]}var n$=e=>Array.from(Array(e).keys()),Va=e=>e[0],Us=e=>e[e.length-1],o$=(e,t)=>e.indexOf(t)!==-1,wo=(e,...t)=>e.concat(t),Ni=(e,...t)=>e.filter(n=>!t.includes(n)),Vg=(e,t)=>e.filter((n,o)=>o!==t),Dn=e=>Array.from(new Set(e)),yd=(e,t)=>{const n=new Set(t);return e.filter(o=>!n.has(o))},zi=(e,t)=>o$(e,t)?Ni(e,t):wo(e,t);function Gc(e,t,n={}){const{step:o=1,loop:i=!0}=n,a=t+o,r=e.length,s=r-1;return t===-1?o>0?0:s:a<0?i?s:0:a>=r?i?0:t>r?r:t:a}function i$(e,t,n={}){return e[Gc(e,t,n)]}function Y0(e,t,n={}){const{step:o=1,loop:i=!0}=n;return Gc(e,t,{step:-o,loop:i})}function a$(e,t,n={}){return e[Y0(e,t,n)]}function Mg(e,t){return e.reduce((n,o,i)=>{var a;return i%t===0?n.push([o]):(a=Us(n))==null||a.push(o),n},[])}function K0(e){return e.reduce((t,n)=>Array.isArray(n)?t.concat(K0(n)):t.concat(n),[])}function Ng(e,t){return e.reduce(([n,o],i)=>(t(i)?n.push(i):o.push(i),[n,o]),[[],[]])}var Lg=e=>e?.constructor.name==="Array",r$=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!bt(e[n],t[n]))return!1;return!0},bt=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual=="function"&&typeof t?.isEqual=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(Lg(e)&&Lg(t))return r$(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(t??Object.create(null)),o=n.length;for(let i=0;i<o;i++)if(!Reflect.has(e,n[i]))return!1;for(let i=0;i<o;i++){const a=n[i];if(!bt(e[a],t[a]))return!1}return!0},Ia=e=>Array.isArray(e),s$=e=>e===!0||e===!1,X0=e=>e!=null&&typeof e=="object",Ii=e=>X0(e)&&!Ia(e),us=e=>typeof e=="string",qo=e=>typeof e=="function",l$=e=>e==null,Yo=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c$=e=>Object.prototype.toString.call(e),Z0=Function.prototype.toString,u$=Z0.call(Object),d$=e=>{if(!X0(e)||c$(e)!="[object Object]"||f$(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=Yo(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Z0.call(n)==u$},h$=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,p$=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,f$=e=>h$(e)||p$(e),pl=(e,...t)=>(typeof e=="function"?e(...t):e)??void 0,g$=()=>{},Es=(...e)=>(...t)=>{e.forEach(function(n){n?.(...t)})},J0=(()=>{let e=0;return()=>(e++,e.toString(36))})();function Bt(e,t,...n){var o;if(e in t){const a=t[e];return qo(a)?a(...n):a}const i=new Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw(o=Error.captureStackTrace)==null||o.call(Error,i,Bt),i}var Q0=(e,t)=>{var n;try{return e()}catch(o){return o instanceof Error&&((n=Error.captureStackTrace)==null||n.call(Error,o,Q0)),t?.()}},{floor:ex,abs:Fg,round:Du,min:m$,max:v$,pow:b$,sign:y$}=Math,_h=e=>Number.isNaN(e),ui=e=>_h(e)?0:e,tx=(e,t)=>(e%t+t)%t,x$=(e,t)=>(e%t+t)%t,w$=(e,t)=>ui(e)>=t,_$=(e,t)=>ui(e)<=t,ds=(e,t,n)=>{const o=ui(e),i=t==null||o>=t,a=n==null||o<=n;return i&&a},C$=(e,t,n)=>Du((ui(e)-t)/n)*n+t,vt=(e,t,n)=>m$(v$(ui(e),t),n),k$=(e,t,n)=>(ui(e)-t)/(n-t),S$=(e,t,n,o)=>vt(C$(e*(n-t)+t,t,o),t,n),Bg=(e,t)=>{let n=e,o=t.toString(),i=o.indexOf("."),a=i>=0?o.length-i:0;if(a>0){let r=b$(10,a);n=Du(n*r)/r}return n},hs=(e,t)=>typeof t=="number"?ex(e*t+.5)/t:Du(e),zg=(e,t,n,o)=>{const i=t!=null?Number(t):0,a=Number(n),r=(e-i)%o;let s=Fg(r)*2>=o?e+y$(r)*(o-Fg(r)):e-r;if(s=Bg(s,o),!_h(i)&&s<i)s=i;else if(!_h(a)&&s>a){const l=ex((a-i)/o),c=i+l*o;s=l<=0||c<i?a:c}return Bg(s,o)},Be=(e,t=0,n=10)=>{const o=Math.pow(n,t);return Du(e*o)/o},Hg=e=>{if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n},nx=(e,t,n)=>{let o=t==="+"?e+n:e-n;if(e%1!==0||n%1!==0){const i=10**Math.max(Hg(e),Hg(n));e=Math.round(e*i),n=Math.round(n*i),o=t==="+"?e+n:e-n,o/=i}return o},$$=(e,t)=>nx(ui(e),"+",t),E$=(e,t)=>nx(ui(e),"-",t),No=e=>typeof e=="number"?`${e}px`:e;function Vu(e){if(!d$(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(o=>typeof o=="string"),n={};for(const o of t){const i=e[o];i!==void 0&&(n[o]=Vu(i))}return n}function Uo(e,t){const n={};for(const o of t){const i=e[o];i!==void 0&&(n[o]=i)}return n}function T$(e,t=Object.is){let n={...e};const o=new Set,i=r=>(o.add(r),()=>o.delete(r)),a=()=>{o.forEach(r=>r())};return{subscribe:i,get:r=>n[r],set:(r,s)=>{t(n[r],s)||(n[r]=s,a())},update:r=>{let s=!1;for(const l in r){const c=r[l];c!==void 0&&!t(n[l],c)&&(n[l]=c,s=!0)}s&&a()},snapshot:()=>({...n})}}var fl=()=>performance.now(),pc,O$=class{constructor(t){this.onTick=t,Mo(this,"frameId",null),Mo(this,"pausedAtMs",null),Mo(this,"context"),Mo(this,"cancelFrame",()=>{this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null)}),Mo(this,"setStartMs",n=>{this.context.startMs=n}),Mo(this,"start",()=>{if(this.frameId!==null)return;const n=fl();this.pausedAtMs!==null?(this.context.startMs+=n-this.pausedAtMs,this.pausedAtMs=null):this.context.startMs=n,this.frameId=requestAnimationFrame(Dg(this,pc))}),Mo(this,"pause",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=fl())}),Mo(this,"stop",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=null)}),t$(this,pc,n=>{if(this.context.now=n,this.context.deltaMs=n-this.context.startMs,this.onTick(this.context)===!1){this.stop();return}this.frameId=requestAnimationFrame(Dg(this,pc))}),this.context={now:0,startMs:fl(),deltaMs:0}}get elapsedMs(){return this.pausedAtMs!==null?this.pausedAtMs-this.context.startMs:fl()-this.context.startMs}};pc=new WeakMap;function xd(e,t){const n=new O$(({deltaMs:o})=>{if(o>=t)return e(),!1});return n.start(),()=>n.stop()}function Po(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function I$(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function Kp(e,t){if(e==null)throw new Error(t())}function Xp(e,t,n){let o=[];for(const i of t)e[i]==null&&o.push(i);if(o.length>0)throw new Error(`[zag-js${n?` > ${n}`:""}] missing required props: ${o.join(", ")}`)}var P$=(...e)=>e.map(t=>{var n;return(n=t?.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),A$=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,jg=e=>{const t={};let n;for(;n=A$.exec(e);)t[n[1]]=n[2];return t},R$=(e,t)=>{if(us(e)){if(us(t))return`${e};${t}`;e=jg(e)}else us(t)&&(t=jg(t));return Object.assign({},e??{},t??{})};function Gs(...e){let t={};for(let n of e){if(!n)continue;for(let i in t){if(i.startsWith("on")&&typeof t[i]=="function"&&typeof n[i]=="function"){t[i]=Es(n[i],t[i]);continue}if(i==="className"||i==="class"){t[i]=P$(t[i],n[i]);continue}if(i==="style"){t[i]=R$(t[i],n[i]);continue}t[i]=n[i]!==void 0?n[i]:t[i]}for(let i in n)t[i]===void 0&&(t[i]=n[i]);const o=Object.getOwnPropertySymbols(n);for(let i of o)t[i]=n[i]}return t}function Ch(e,t,n){let o=[],i;return a=>{const r=e(a);return(r.length!==o.length||r.some((s,l)=>!bt(o[l],s)))&&(o=r,i=t(r,a)),i}}function Ct(){return{and:(...e)=>function(t){return e.every(n=>t.guard(n))},or:(...e)=>function(t){return e.some(n=>t.guard(n))},not:e=>function(t){return!t.guard(e)}}}function Mu(){return{guards:Ct(),createMachine:e=>e,choose:e=>function({choose:t}){var n;return(n=t(e))==null?void 0:n.actions}}}var xa=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(xa||{}),wd="__init__";function D$(e){const t=()=>{var o;return((o=e.getRootNode)==null?void 0:o.call(e))??document},n=()=>an(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>cs(t()),isActiveElement:jc,getById:o=>t().getElementById(o)}}function V$(e){return new Proxy({},{get(t,n){return n==="style"?o=>e({style:o}).style:e}})}var ie=()=>e=>Array.from(new Set(e)),ox=be("accordion").parts("root","item","itemTrigger","itemContent","itemIndicator"),gr=ox.build(),qc=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`accordion:${e.id}`},M$=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.item)==null?void 0:o.call(n,t))??`accordion:${e.id}:item:${t}`},Wg=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemContent)==null?void 0:o.call(n,t))??`accordion:${e.id}:content:${t}`},Yc=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemTrigger)==null?void 0:o.call(n,t))??`accordion:${e.id}:trigger:${t}`},N$=e=>e.getById(qc(e)),Nu=e=>{const t=`[aria-controls][data-ownedby='${CSS.escape(qc(e))}']:not([disabled])`;return ni(N$(e),t)},L$=e=>Va(Nu(e)),F$=e=>Us(Nu(e)),B$=(e,t)=>Gp(Nu(e),Yc(e,t)),z$=(e,t)=>qp(Nu(e),Yc(e,t));function H$(e,t){const{send:n,context:o,prop:i,scope:a,computed:r}=e,s=o.get("focusedValue"),l=o.get("value"),c=i("multiple");function u(h){let p=h;!c&&p.length>1&&(p=[p[0]]),n({type:"VALUE.SET",value:p})}function d(h){return{expanded:l.includes(h.value),focused:s===h.value,disabled:!!(h.disabled??i("disabled"))}}return{focusedValue:s,value:l,setValue:u,getItemState:d,getRootProps(){return t.element({...gr.root.attrs,dir:i("dir"),id:qc(a),"data-orientation":i("orientation")})},getItemProps(h){const p=d(h);return t.element({...gr.item.attrs,dir:i("dir"),id:M$(a,h.value),"data-state":p.expanded?"open":"closed","data-focus":D(p.focused),"data-disabled":D(p.disabled),"data-orientation":i("orientation")})},getItemContentProps(h){const p=d(h);return t.element({...gr.itemContent.attrs,dir:i("dir"),role:"region",id:Wg(a,h.value),"aria-labelledby":Yc(a,h.value),hidden:!p.expanded,"data-state":p.expanded?"open":"closed","data-disabled":D(p.disabled),"data-focus":D(p.focused),"data-orientation":i("orientation")})},getItemIndicatorProps(h){const p=d(h);return t.element({...gr.itemIndicator.attrs,dir:i("dir"),"aria-hidden":!0,"data-state":p.expanded?"open":"closed","data-disabled":D(p.disabled),"data-focus":D(p.focused),"data-orientation":i("orientation")})},getItemTriggerProps(h){const{value:p}=h,m=d(h);return t.button({...gr.itemTrigger.attrs,type:"button",dir:i("dir"),id:Yc(a,p),"aria-controls":Wg(a,p),"aria-expanded":m.expanded,disabled:m.disabled,"data-orientation":i("orientation"),"aria-disabled":m.disabled,"data-state":m.expanded?"open":"closed","data-ownedby":qc(a),onFocus(){m.disabled||n({type:"TRIGGER.FOCUS",value:p})},onBlur(){m.disabled||n({type:"TRIGGER.BLUR"})},onClick(f){m.disabled||(Ou()&&f.currentTarget.focus(),n({type:"TRIGGER.CLICK",value:p}))},onKeyDown(f){if(f.defaultPrevented||m.disabled)return;const b={ArrowDown(){r("isHorizontal")||n({type:"GOTO.NEXT",value:p})},ArrowUp(){r("isHorizontal")||n({type:"GOTO.PREV",value:p})},ArrowRight(){r("isHorizontal")&&n({type:"GOTO.NEXT",value:p})},ArrowLeft(){r("isHorizontal")&&n({type:"GOTO.PREV",value:p})},Home(){n({type:"GOTO.FIRST",value:p})},End(){n({type:"GOTO.LAST",value:p})}},v=Ss(f,{dir:i("dir"),orientation:i("orientation")}),y=b[v];y&&(y(f),f.preventDefault())}})}}}var{and:j$,not:W$}=Ct(),U$={props({props:e}){return{collapsible:!1,multiple:!1,orientation:"vertical",defaultValue:[],...e}},initialState(){return"idle"},context({prop:e,bindable:t}){return{focusedValue:t(()=>({defaultValue:null,sync:!0,onChange(n){var o;(o=e("onFocusChange"))==null||o({value:n})}})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var o;(o=e("onValueChange"))==null||o({value:n})}}))}},computed:{isHorizontal:({prop:e})=>e("orientation")==="horizontal"},on:{"VALUE.SET":{actions:["setValue"]}},states:{idle:{on:{"TRIGGER.FOCUS":{target:"focused",actions:["setFocusedValue"]}}},focused:{on:{"GOTO.NEXT":{actions:["focusNextTrigger"]},"GOTO.PREV":{actions:["focusPrevTrigger"]},"TRIGGER.CLICK":[{guard:j$("isExpanded","canToggle"),actions:["collapse"]},{guard:W$("isExpanded"),actions:["expand"]}],"GOTO.FIRST":{actions:["focusFirstTrigger"]},"GOTO.LAST":{actions:["focusLastTrigger"]},"TRIGGER.BLUR":{target:"idle",actions:["clearFocusedValue"]}}}},implementations:{guards:{canToggle:({prop:e})=>!!e("collapsible")||!!e("multiple"),isExpanded:({context:e,event:t})=>e.get("value").includes(t.value)},actions:{collapse({context:e,prop:t,event:n}){const o=t("multiple")?Ni(e.get("value"),n.value):[];e.set("value",o)},expand({context:e,prop:t,event:n}){const o=t("multiple")?wo(e.get("value"),n.value):[n.value];e.set("value",o)},focusFirstTrigger({scope:e}){var t;(t=L$(e))==null||t.focus()},focusLastTrigger({scope:e}){var t;(t=F$(e))==null||t.focus()},focusNextTrigger({context:e,scope:t}){const n=e.get("focusedValue");if(!n)return;const o=B$(t,n);o?.focus()},focusPrevTrigger({context:e,scope:t}){const n=e.get("focusedValue");if(!n)return;const o=z$(t,n);o?.focus()},setFocusedValue({context:e,event:t}){e.set("focusedValue",t.value)},clearFocusedValue({context:e}){e.set("focusedValue",null)},setValue({context:e,event:t}){e.set("value",t.value)},coarseValue({context:e,prop:t}){!t("multiple")&&e.get("value").length>1&&(Po("The value of accordion should be a single value when multiple is false."),e.set("value",[e.get("value")[0]]))}}}};ie()(["collapsible","dir","disabled","getRootNode","id","ids","multiple","onFocusChange","onValueChange","orientation","value","defaultValue"]);ie()(["value","disabled"]);const G$={default:{},floating:{root:{gap:"12","& > div[data-part='item']":{boxShadow:"stroke-bordered-interactive",borderBottom:"none"}}}},qs=ge({slots:[...ox.keys(),"itemTriggerPrefix","itemTriggerContent"],base:{root:{width:"100%",display:"flex",flexDirection:"column",fontFamily:"sans"},item:{borderBottom:"1px solid {colors.border.muted}",borderRadius:"lg",backgroundColor:"background.default",_hover:{backgroundColor:"background.hover"}},itemTrigger:{width:"100%",paddingX:"8",paddingY:"8",cursor:"pointer",display:"flex",gap:"8",alignItems:"center",textAlign:"left",border:"none",outline:"none",backgroundColor:"transparent",color:"text.normal",fontSize:"base",fontWeight:"medium",lineHeight:"lg",fontStyle:"normal",letterSpacing:"normal"},itemTriggerPrefix:{padding:"2","& > svg":{display:"block"}},itemTriggerContent:{flex:"1",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"8"},itemContent:{backgroundColor:"transparent",color:"text.subtle",fontSize:"small",fontWeight:"normal",fontStyle:"normal",lineHeight:"150%",letterSpacing:"0%",padding:"8",paddingTop:"4",animation:"collapse-in",_closed:{animation:"collapse-out"}},itemIndicator:{width:"24",height:"24",display:"flex",alignItems:"center",justifyContent:"center",transformOrigin:"center",transitionDuration:"200ms",transitionProperty:"transform",transitionTimingFunction:"{easings.default}",_open:{transform:"rotate(180deg)"}}},variants:{variant:G$},defaultVariants:{variant:"default"}});function q$(e){const t=Bs(),n=t?.type.emits,o={};n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`);for(const i of n)o[zC(s0(i))]=(...a)=>e(i,...a);return o}function Y$(e){const t=Bs(),n=Object.keys(t?.type.props??{}).reduce((i,a)=>{const r=(t?.type.props[a]).default;return r!==void 0&&(i[a]=r),i},{}),o=l0(e);return I(()=>{const i={},a=t?.vnode.props??{};return Object.keys(a).forEach(r=>{i[s0(r)]=a[r]}),Object.keys({...n,...i}).reduce((r,s)=>(o.value[s]!==void 0&&(r[s]=o.value[s]),r),{})})}function lt(e,t){const n=Y$(e),o=t?q$(t):{};return I(()=>({...n.value,...o}))}const Re=e=>{const t=Symbol(e);return[n=>Rp(t,n),n=>xt(t,n),t]},[io,Ys]=Re("RenderStrategyProps");function K$(e){const t=Ye(e);return t?.$el??t}const X$=e=>Object.prototype.hasOwnProperty.call(e,"nodeName")&&typeof e.nodeName=="string";function Y(){const e=Bs(),t=fe(),n=I(()=>{var r,s;return["#text","#comment"].includes((r=t.value)==null?void 0:r.$el.nodeName)?(s=t.value)==null?void 0:s.$el.nextElementSibling:K$(t)}),o=Object.assign({},e.exposed),i={};for(const r in e.props)Object.defineProperty(i,r,{enumerable:!0,configurable:!0,get:()=>e.props[r]});if(Object.keys(o).length>0)for(const r in o)Object.defineProperty(i,r,{enumerable:!0,configurable:!0,get:()=>o[r]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function a(r){t.value=r,!(X$(r)||!r)&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>r.$el}),e.exposed=i)}return{forwardRef:a,currentRef:t,currentElement:n}}const Z$=O({name:"Dynamic",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var o;if(!n.default)return null;const i=ix(n.default()),[a,...r]=i;if(Object.keys(t).length>0){(o=a.props)==null||delete o.ref;const s=Gs(t,a.props??{}),l=HC(a,s);for(const c in s)c.startsWith("on")&&(l.props||(l.props={}),l.props[c]=s[c]);return i.length===1?l:[l,...r]}return i}}});function ix(e){return e?e.flatMap(t=>t.type===Se?ix(t.children):[t]):[]}const J$="br, hr, img, input, area, textarea".split(", "),Q$=e=>typeof e=="string"&&J$.includes(e),_d=e=>O({name:"Polymorphic",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1}},setup(t,{attrs:n,slots:o}){return t.asChild?()=>Pt(Z$,n,o):()=>{var i;return Pt(e,n,Q$(e)||(i=o.default)==null?void 0:i.call(o))}}});function eE(){const e=new Map;return new Proxy(_d,{apply(t,n,o){return _d(o[0])},get(t,n){return e.has(n)||e.set(n,_d(n)),e.get(n)}})}const X=eE(),[ax,Ks]=Re("CollapsibleContext"),tE=O({__name:"collapsible-content",props:{asChild:{type:Boolean}},setup(e){const t=Ks();return Y(),(n,o)=>g(t).unmounted?oe("",!0):(w(),$(g(X).div,U({key:0},g(t).getContentProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),nE=O({__name:"collapsible-context",setup(e){const t=Ks();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),oE=O({__name:"collapsible-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return ax(n),Y(),(o,i)=>(w(),$(g(X).div,U(n.value.getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}});var iE=be("collapsible").parts("root","trigger","content","indicator"),gl=iE.build(),aE=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`collapsible:${e.id}`},kh=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`collapsible:${e.id}:content`},rE=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`collapsible:${e.id}:trigger`},mr=e=>e.getById(kh(e));function sE(e,t){const{state:n,send:o,context:i,scope:a,prop:r}=e,s=n.matches("open")||n.matches("closing"),l=n.matches("open"),c=n.matches("closed"),{width:u,height:d}=i.get("size"),h=!!r("disabled"),p=r("collapsedHeight"),m=r("collapsedWidth"),f=p!=null,b=m!=null,v=f||b,y=!i.get("initial")&&l;return{disabled:h,visible:s,open:l,measureSize(){o({type:"size.measure"})},setOpen(x){n.matches("open")!==x&&o({type:x?"open":"close"})},getRootProps(){return t.element({...gl.root.attrs,"data-state":l?"open":"closed",dir:r("dir"),id:aE(a)})},getContentProps(){return t.element({...gl.content.attrs,id:kh(a),"data-collapsible":"","data-state":y?void 0:l?"open":"closed","data-disabled":D(h),"data-has-collapsed-size":D(v),hidden:!s&&!v,dir:r("dir"),style:{"--height":No(d),"--width":No(u),"--collapsed-height":No(p),"--collapsed-width":No(m),...c&&f&&{overflow:"hidden",minHeight:No(p),maxHeight:No(p)},...c&&b&&{overflow:"hidden",minWidth:No(m),maxWidth:No(m)}}})},getTriggerProps(){return t.element({...gl.trigger.attrs,id:rE(a),dir:r("dir"),type:"button","data-state":l?"open":"closed","data-disabled":D(h),"aria-controls":kh(a),"aria-expanded":s||!1,onClick(x){x.defaultPrevented||h||o({type:l?"close":"open"})}})},getIndicatorProps(){return t.element({...gl.indicator.attrs,dir:r("dir"),"data-state":l?"open":"closed","data-disabled":D(h)})}}}var lE={initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{size:e(()=>({defaultValue:{height:0,width:0},sync:!0})),initial:e(()=>({defaultValue:!1}))}},refs(){return{cleanup:void 0,stylesRef:void 0}},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["setInitial","computeSize","toggleVisibility"])})},exit:["clearInitial","cleanupNode"],states:{closed:{effects:["trackTabbableElements"],on:{"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitial","computeSize","invokeOnOpen"]}]}},closing:{effects:["trackExitAnimation"],on:{"controlled.close":{target:"closed"},"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitial","invokeOnOpen"]}],close:[{guard:"isOpenControlled",actions:["invokeOnExitComplete"]},{target:"closed",actions:["setInitial","computeSize","invokeOnExitComplete"]}],"animation.end":{target:"closed",actions:["invokeOnExitComplete","clearInitial"]}}},open:{effects:["trackEnterAnimation"],on:{"controlled.close":{target:"closing"},close:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closing",actions:["setInitial","computeSize","invokeOnClose"]}],"size.measure":{actions:["measureSize"]},"animation.end":{actions:["clearInitial"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackEnterAnimation:({send:e,scope:t})=>{let n;const o=de(()=>{const i=mr(t);if(!i)return;const a=za(i).animationName;if(!a||a==="none"){e({type:"animation.end"});return}const r=s=>{je(s)===i&&e({type:"animation.end"})};i.addEventListener("animationend",r),n=()=>{i.removeEventListener("animationend",r)}});return()=>{o(),n?.()}},trackExitAnimation:({send:e,scope:t})=>{let n;const o=de(()=>{const i=mr(t);if(!i)return;const a=za(i).animationName;if(!a||a==="none"){e({type:"animation.end"});return}const r=l=>{je(l)===i&&e({type:"animation.end"})};i.addEventListener("animationend",r);const s=Yp(i,{animationFillMode:"forwards"});n=()=>{i.removeEventListener("animationend",r),Pu(()=>s())}});return()=>{o(),n?.()}},trackTabbableElements:({scope:e,prop:t})=>{if(!t("collapsedHeight")&&!t("collapsedWidth"))return;const n=mr(e);if(!n)return;const o=()=>{const r=js(n).map(s=>qS(s,"inert",""));return()=>{r.forEach(s=>s())}};let i=o();const a=MS(n,{callback(){i(),i=o()}});return()=>{i(),a()}}},actions:{setInitial:({context:e,flush:t})=>{t(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},cleanupNode:({refs:e})=>{e.set("stylesRef",null)},measureSize:({context:e,scope:t})=>{const n=mr(t);if(!n)return;const{height:o,width:i}=n.getBoundingClientRect();e.set("size",{height:o,width:i})},computeSize:({refs:e,scope:t,context:n})=>{var o;(o=e.get("cleanup"))==null||o();const i=de(()=>{const a=mr(t);if(!a)return;const r=a.hidden;a.style.animationName="none",a.style.animationDuration="0s",a.hidden=!1;const s=a.getBoundingClientRect();n.set("size",{height:s.height,width:s.width}),n.get("initial")&&(a.style.animationName="",a.style.animationDuration=""),a.hidden=r});e.set("cleanup",i)},invokeOnOpen:({prop:e})=>{var t;(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose:({prop:e})=>{var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},toggleVisibility:({prop:e,send:t})=>{t({type:e("open")?"controlled.open":"controlled.close"})}}}};ie()(["dir","disabled","getRootNode","id","ids","collapsedHeight","collapsedWidth","onExitComplete","onOpenChange","defaultOpen","open"]);function cE(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}var Ug={htmlFor:"for",className:"class",onDoubleClick:"onDblclick",onChange:"onInput",onFocus:"onFocusin",onBlur:"onFocusout",defaultValue:"value",defaultChecked:"checked"},uE="viewBox,className,preserveAspectRatio,fillRule,clipPath,clipRule,strokeWidth,strokeLinecap,strokeLinejoin,strokeDasharray,strokeDashoffset,strokeMiterlimit".split(",");function dE(e){return e in Ug?Ug[e]:e.startsWith("on")?`on${cE(e.substr(2))}`:uE.includes(e)?e:e.toLowerCase()}var rn=V$(e=>{const t={};for(const n in e){const o=e[n];n==="children"?typeof o=="string"&&(t.innerHTML=o):t[dE(n)]=e[n]}return t});function Kc(e){const t=e().defaultValue??e().value,n=e().isEqual??Object.is,o=Hc(t),i=I(()=>e().value!==void 0),a=Hc(i.value?e().value:o.value);return{initial:t,ref:a,get(){return i.value?e().value:o.value},set(r){var s,l;const c=i.value?e().value:o.value,u=qo(r)?r(c):r;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:u,prev:c}),i.value||(o.value=u),n(u,c)||(l=(s=e()).onChange)==null||l.call(s,u,c)},invoke(r,s){var l,c;(c=(l=e()).onChange)==null||c.call(l,r,s)},hash(r){var s,l;return((l=(s=e()).hash)==null?void 0:l.call(s,r))??String(r)}}}Kc.cleanup=e=>{Dp(()=>e())};Kc.ref=e=>{let t=e;return{get:()=>t,set:n=>{t=n}}};function hE(e){const t={current:e};return{get(n){return t.current[n]},set(n,o){t.current[n]=o}}}var pE=(e,t)=>{ze(()=>[...e.map(n=>n())],(n,o)=>{let i=!1;for(let a=0;a<n.length;a++)if(!bt(o[a],Ye(n[a]))){i=!0;break}i&&t()})};function Gt(e,t={}){var n,o,i;const a=I(()=>{const{id:A,ids:G,getRootNode:ee}=Ye(t);return D$({id:A,ids:G,getRootNode:ee})}),r=(...A)=>{e.debug&&console.log(...A)},s=I(()=>{var A;return((A=e.props)==null?void 0:A.call(e,{props:Vu(Ye(t)),get scope(){return a.value}}))??Ye(t)}),l=fE(s),c=(n=e.context)==null?void 0:n.call(e,{prop:l,bindable:Kc,get scope(){return a.value},flush:Gg,getContext(){return u},getComputed(){return P},getRefs(){return v},getEvent(){return f()}}),u={get(A){var G;return(G=c[A])==null?void 0:G.get()},set(A,G){var ee;(ee=c[A])==null||ee.set(G)},initial(A){var G;return(G=c[A])==null?void 0:G.initial},hash(A){var G,ee;const z=(G=c[A])==null?void 0:G.get();return(ee=c[A])==null?void 0:ee.hash(z)}};let d=new Map,h=null,p={current:null},m={current:{type:""}};const f=()=>({...m.current,current(){return m.current},previous(){return p.current}}),b=()=>({...S,matches(...A){const G=S.get();return A.includes(G)},hasTag(A){var G,ee;const z=S.get();return!!((ee=(G=e.states[z])==null?void 0:G.tags)!=null&&ee.includes(A))}}),v=hE(((o=e.refs)==null?void 0:o.call(e,{prop:l,context:u}))??{}),y=()=>({state:b(),context:u,event:f(),prop:l,send:B,action:x,guard:_,track:pE,refs:v,computed:P,flush:Gg,get scope(){return a.value},choose:E}),x=A=>{const G=qo(A)?A(y()):A;if(!G)return;const ee=G.map(z=>{var W,q;const ne=(q=(W=e.implementations)==null?void 0:W.actions)==null?void 0:q[z];return ne||Po(`[zag-js] No implementation found for action "${JSON.stringify(z)}"`),ne});for(const z of ee)z?.(y())},_=A=>{var G,ee;return qo(A)?A(y()):(ee=(G=e.implementations)==null?void 0:G.guards)==null?void 0:ee[A](y())},k=A=>{const G=qo(A)?A(y()):A;if(!G)return;const ee=G.map(W=>{var q,ne;const te=(ne=(q=e.implementations)==null?void 0:q.effects)==null?void 0:ne[W];return te||Po(`[zag-js] No implementation found for effect "${JSON.stringify(W)}"`),te}),z=[];for(const W of ee){const q=W?.(y());q&&z.push(q)}return()=>z.forEach(W=>W?.())},E=A=>hc(A).find(G=>{let ee=!G.guard;return us(G.guard)?ee=!!_(G.guard):qo(G.guard)&&(ee=G.guard(y())),ee}),P=A=>{Kp(e.computed,()=>"[zag-js] No computed object found on machine");const G=e.computed[A];return G({context:u,event:f(),prop:l,refs:v,get scope(){return a.value},computed:P})},S=Kc(()=>({defaultValue:e.initialState({prop:l}),onChange(A,G){var ee,z,W;if(G){const ne=d.get(G);ne?.(),d.delete(G)}G&&x((ee=e.states[G])==null?void 0:ee.exit),x(h?.actions);const q=k((z=e.states[A])==null?void 0:z.effects);if(q&&d.set(A,q),G===wd){x(e.entry);const ne=k(e.effects);ne&&d.set(wd,ne)}x((W=e.states[A])==null?void 0:W.entry)}}));let R=xa.NotStarted;Qa(()=>{const A=R===xa.Started;R=xa.Started,r(A?"rehydrating...":"initializing..."),S.invoke(S.initial,wd)}),c0(()=>{R=xa.Stopped,r("unmounting...");const A=d.values();for(const G of A)G?.();d=new Map,x(e.exit)});const B=A=>{var G,ee;if(R!==xa.Started)return;p.current=m.current,m.current=A;let z=S.get();const W=((G=e.states[z].on)==null?void 0:G[A.type])??((ee=e.on)==null?void 0:ee[A.type]),q=E(W);if(!q)return;h=q;const ne=q.target??z;r("transition",A.type,q.target||z,`(${q.actions})`);const te=ne!==z;te?S.set(ne):q.reenter&&!te?S.invoke(z,z):x(q.actions)};return(i=e.watch)==null||i.call(e,y()),{state:b(),send:B,context:u,prop:l,get scope(){return a.value},refs:v,computed:P,event:f(),getStatus:()=>R}}function fE(e){return function(t){return e.value[t]}}var Gg=e=>{no().then(()=>{e()})};const[SU,sn]=Re("EnvironmentContext"),ln=I(()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})),Cn=I(()=>({dir:"ltr",locale:"en-US"})),[$U,kn]=Re("LocaleContext"),Fn=e=>{const t={};for(const[n,o]of Object.entries(e))o!==void 0&&(t[n]=o);return t},gE=(e={},t)=>{const n=Ut(),o=sn(ln),i=kn(Cn),a=I(()=>{const c=Ye(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,...Fn(c),onExitComplete:()=>{var u;t?.("exitComplete"),(u=c.onExitComplete)==null||u.call(c)},onOpenChange:u=>{var d;t?.("openChange",u),t?.("update:open",u.open),(d=c.onOpenChange)==null||d.call(c,u)}}}),r=Gt(lE,a),s=I(()=>sE(r,rn)),l=fe(!1);return ze(()=>s.value.visible,()=>{s.value.visible&&(l.value=!0)}),I(()=>{const c=Ye(e);return{...s.value,unmounted:!s.value.visible&&!l.value&&c.lazyMount||c.unmountOnExit&&!s.value.visible&&l.value}})},mE=O({__name:"collapsible-root",props:_n({collapsedHeight:{},collapsedWidth:{},defaultOpen:{type:Boolean},disabled:{type:Boolean},id:{},ids:{},lazyMount:{type:Boolean},open:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{defaultOpen:void 0,disabled:void 0,lazyMount:void 0,open:void 0,unmountOnExit:void 0}),emits:["exitComplete","openChange","update:open"],setup(e,{emit:t}){const n=gE(e,t);return ax(n),Y(),(o,i)=>(w(),$(g(X).div,U(g(n).getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),vE=O({__name:"collapsible-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Ks();return Y(),(n,o)=>(w(),$(g(X).button,U(g(t).getTriggerProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),bE=O({__name:"collapsible-indicator",props:{asChild:{type:Boolean}},setup(e){const t=Ks();return Y(),(n,o)=>(w(),$(g(X).div,U(g(t).getIndicatorProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),Lu=Object.freeze(Object.defineProperty({__proto__:null,Content:tE,Context:nE,Indicator:bE,Root:mE,RootProvider:oE,Trigger:vE},Symbol.toStringTag,{value:"Module"})),[rx,Xs]=Re("AccordionContext"),[yE,xE]=Re("AccordionItemContext"),[wE,Zp]=Re("AccordionItemPropsContext"),sx=O({__name:"accordion-item",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=Xs(),n=e,o=I(()=>t.value.getItemState(n)),i=Ys(),a=I(()=>t.value.getItemContentProps(n));return yE(o),wE(n),Y(),(r,s)=>(w(),$(g(Lu).Root,U(g(t).getItemProps(n),{open:o.value.expanded,"lazy-mount":g(i).lazyMount,"unmount-on-exit":g(i).unmountOnExit,ids:{content:a.value.id}}),{default:C(()=>[V(r.$slots,"default")]),_:3},16,["open","lazy-mount","unmount-on-exit","ids"]))}}),_E=O({__name:"AccordionItem",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=lt(e),n=I(()=>qs());return(o,i)=>(w(),$(g(sx),U(g(t),{class:[n.value.item],"data-testid":"atlantis-accordion-item"}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),lx=()=>(e,t)=>t.reduce((n,o)=>{const[i,a]=n,r=o;return a[r]!==void 0&&(i[r]=a[r]),delete a[r],[i,a]},[{},{...e}]),cx=O({__name:"accordion-item-content",props:{asChild:{type:Boolean}},setup(e){const t=lx(),n=Xs(),o=Zp(),i=I(()=>{const a=n.value.getItemContentProps(o),[,r]=t(a,["hidden","data-state"]);return r});return Y(),(a,r)=>(w(),$(g(Lu).Content,U(i.value,{"as-child":e.asChild}),{default:C(()=>[V(a.$slots,"default")]),_:3},16,["as-child"]))}}),CE=O({__name:"AccordionItemContent",props:{asChild:{type:Boolean}},setup(e){const t=lt(e),n=I(()=>qs());return(o,i)=>(w(),$(g(cx),U(g(t),{class:[n.value.itemContent],"data-testid":"atlantis-accordion-item-content"}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),kE={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",preserveAspectRatio:"none"};function SE(e,t){return w(),M("svg",kE,[...t[0]||(t[0]=[N("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.5531 5.90623L10.089 6.37027L7.6187 8.84055C7.27698 9.18232 6.72297 9.18232 6.38126 8.84055L3.91094 6.37027L3.4469 5.90623L4.37498 4.97815L4.83902 5.44219L6.99998 7.60315L9.16097 5.44219L9.62499 4.97815L10.5531 5.90623Z",fill:"currentColor"},null,-1)])])}const ux={render:SE},dx=O({__name:"accordion-item-indicator",props:{asChild:{type:Boolean}},setup(e){const t=Xs(),n=Zp();return Y(),(o,i)=>(w(),$(g(X).div,U(g(t).getItemIndicatorProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),$E=O({__name:"AccordionItemIndicator",props:{asChild:{type:Boolean}},setup(e){const t=lt(e),n=I(()=>qs());return(o,i)=>(w(),$(g(dx),U(g(t),{class:[n.value.itemIndicator],"data-testid":"atlantis-accordion-item-indicator"}),{default:C(()=>[V(o.$slots,"default",{},()=>[j(g(ux))])]),_:3},16,["class"]))}}),hx=O({__name:"accordion-item-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Xs(),n=Zp(),o=Ks(),i=I(()=>{const{"aria-controls":a,...r}=t.value.getItemTriggerProps(n);return{...r,...o.value.unmounted?{}:{"aria-controls":a}}});return Y(),(a,r)=>(w(),$(g(X).button,U(i.value,{"as-child":e.asChild}),{default:C(()=>[V(a.$slots,"default")]),_:3},16,["as-child"]))}}),EE=O({__name:"AccordionItemTrigger",props:{asChild:{type:Boolean}},setup(e){const t=lt(e),n=zs(),o=I(()=>qs());return(i,a)=>(w(),$(g(hx),U(g(t),{class:[o.value.itemTrigger],"data-testid":"atlantis-accordion-item-trigger"}),{default:C(()=>[g(n).prefix?(w(),M("div",{key:0,class:L(o.value.itemTriggerPrefix)},[V(i.$slots,"prefix")],2)):oe("",!0),N("div",{class:L([o.value.itemTriggerContent])},[V(i.$slots,"default")],2)]),_:3},16,["class"]))}}),TE=O({__name:"accordion-context",setup(e){const t=Xs();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),OE=O({__name:"accordion-item-context",setup(e){const t=xE();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),IE=O({__name:"accordion-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return rx(n),io(I(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),Y(),(o,i)=>(w(),$(g(X).div,U(n.value.getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),PE=(e={},t)=>{const n=Ut(),o=sn(ln),i=kn(Cn),a=I(()=>{const s=Ye(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,onFocusChange:l=>t?.("focusChange",l),value:s.modelValue,...Fn(s),onValueChange:l=>{var c;t?.("valueChange",l),t?.("update:modelValue",l.value),(c=s?.onValueChange)==null||c.call(s,l)}}}),r=Gt(U$,a);return I(()=>H$(r,rn))},AE=O({__name:"accordion-root",props:_n({collapsible:{type:Boolean},defaultValue:{},disabled:{type:Boolean},id:{},ids:{},modelValue:{},multiple:{type:Boolean},orientation:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{collapsible:void 0,disabled:void 0,multiple:void 0}),emits:["focusChange","valueChange","update:modelValue"],setup(e,{emit:t}){const n=e,o=PE(n,t);return rx(o),io(I(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Y(),(i,a)=>(w(),$(g(X).div,U(g(o).getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),RE=Object.freeze(Object.defineProperty({__proto__:null,Context:TE,Item:sx,ItemContent:cx,ItemContext:OE,ItemIndicator:dx,ItemTrigger:hx,Root:AE,RootProvider:IE},Symbol.toStringTag,{value:"Module"})),DE=O({__name:"AccordionRoot",props:{collapsible:{type:Boolean},defaultValue:{},disabled:{type:Boolean},id:{},ids:{},modelValue:{},multiple:{type:Boolean},orientation:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean},variant:{default:"default"}},emits:["focusChange","valueChange","update:modelValue"],setup(e,{emit:t}){const n=e,o=lt(n,t),i=I(()=>qs({variant:n.variant}));return(a,r)=>(w(),$(g(RE).Root,U(g(o),{class:[i.value.root],"data-testid":"atlantis-accordion-root"}),{default:C(()=>[V(a.$slots,"default")]),_:3},16,["class"]))}}),VE=be("field").parts("root","errorText","helperText","input","label","select","textarea","requiredIndicator");VE.build();const[EU,ao]=Re("FieldContext");function ME(e){if(!e)return;const t=za(e);return"box-sizing:"+t.boxSizing+";border-left:"+t.borderLeftWidth+" solid red;border-right:"+t.borderRightWidth+" solid red;font-family:"+t.fontFamily+";font-feature-settings:"+t.fontFeatureSettings+";font-kerning:"+t.fontKerning+";font-size:"+t.fontSize+";font-stretch:"+t.fontStretch+";font-style:"+t.fontStyle+";font-variant:"+t.fontVariant+";font-variant-caps:"+t.fontVariantCaps+";font-variant-ligatures:"+t.fontVariantLigatures+";font-variant-numeric:"+t.fontVariantNumeric+";font-weight:"+t.fontWeight+";letter-spacing:"+t.letterSpacing+";margin-left:"+t.marginLeft+";margin-right:"+t.marginRight+";padding-left:"+t.paddingLeft+";padding-right:"+t.paddingRight+";text-indent:"+t.textIndent+";text-transform:"+t.textTransform}function NE(e){var t=e.createElement("div");return t.id="ghost",t.style.cssText="display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;",e.body.appendChild(t),t}function LE(e){if(!e)return;const t=an(e),n=Ke(e),o=NE(t),i=ME(e);i&&(o.style.cssText+=i);function a(){n.requestAnimationFrame(()=>{o.innerHTML=e.value;const r=n.getComputedStyle(o);e?.style.setProperty("width",r.width)})}return a(),e?.addEventListener("input",a),e?.addEventListener("change",a),()=>{t.body.removeChild(o),e?.removeEventListener("input",a),e?.removeEventListener("change",a)}}var px=(e=>(e.ArrowUp="↑",e.ArrowDown="↓",e.ArrowLeft="←",e.ArrowRight="→",e.Enter="↵",e.Tab="⇥",e.Escape="Esc",e.Space="␣",e.Backspace="⌫",e.Delete="Del",e.PageUp="PgUp",e.PageDown="PgDn",e.Command="⌘",e.Control="CTRL",e))(px||{});const FE={default:{},inverted:{color:"text.inverse",background:"background.neutral-default",boxShadow:"inner-highlighted-ring"}},BE=Zi({base:{display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:"sm",paddingX:"2",height:"14",textAlign:"center",fontFamily:"mono",fontSize:"xs",fontStyle:"normal",fontWeight:"regular",lineHeight:"sm",letterSpacing:"tight",textTransform:"uppercase",color:"text.subtle",background:"background.neutral-default",boxShadow:"inner-highlighted-ring"},defaultVariants:{type:"default"},variants:{type:FE}}),Xc=O({__name:"KeyboardKey",props:{type:{default:"default"},keys:{default:()=>[]},macKeys:{default:()=>[]},windowsKeys:{default:()=>[]},forcePlatform:{default:"mac"}},setup(e){const t=e,n=r=>r==="Ctrl"?"Control":r==="Meta"?"Command":r,o=r=>{const s=n(r);return px[s]||r},i=fe("windows");ze(()=>t.forcePlatform,r=>{r&&(i.value=r)}),Qa(()=>{t.forcePlatform?i.value=t.forcePlatform:typeof navigator<"u"&&(i.value=navigator.userAgent.toLowerCase().includes("mac")?"mac":"windows")});const a=I(()=>t.macKeys||t.windowsKeys?i.value==="mac"?t.macKeys??[]:t.windowsKeys??[]:t.keys??[]);return(r,s)=>(w(),M("div",{class:L(g(Ft)({display:"flex",columnGap:"3"}))},[(w(!0),M(Se,null,Ie(a.value,l=>(w(),M("div",{key:l,class:L(g(BE)({type:e.type}))},se(o(l)),3))),128))],2))}}),zE=ge({className:"spinner",slots:["root","spinner","background","rotationWrapper"],base:{root:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center"},spinner:{width:"100%",height:"100%"},background:{position:"absolute",top:"0",left:"0"},rotationWrapper:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",animation:"spin 1s linear infinite"}},variants:{variant:{default:{},inverted:{}},size:{sm:{root:{width:"16",height:"16"}},md:{root:{width:"24",height:"24"}},lg:{root:{width:"32",height:"32"}}}},defaultVariants:{variant:"default",size:"md"}}),HE=["aria-label"],jE=["fill"],WE=["fill"],fx=O({__name:"Spinner",props:{variant:{default:"default"},size:{default:"md"},ariaLabel:{default:"Loading"}},setup(e){const t=e,n=I(()=>zE({variant:t.variant,size:t.size})),o=I(()=>t.variant==="default"?"var(--colors-icon-selected)":"var(--colors-icon-inverse)");return(i,a)=>(w(),M("div",{class:L(n.value.root),"aria-label":t.ariaLabel,role:"status","data-testid":"spinner"},[(w(),M("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:L([n.value.spinner,n.value.background])},[N("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:o.value,opacity:"0.3",d:"M12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z"},null,8,jE)],2)),N("div",{class:L([n.value.rotationWrapper,"spinner-rotate"])},[(w(),M("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:L(n.value.spinner)},[N("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:o.value,d:"M12 4C9.38441 4 7.06204 5.25316 5.59909 7.20034C4.9356 8.08342 3.68185 8.26146 2.79876 7.59798C1.91568 6.93449 1.73764 5.68074 2.40113 4.79765C4.58709 1.88817 8.07337 0 12 0C18.6274 0 24 5.37257 24 12C24 18.6274 18.6274 24 12 24C10.8954 24 10 23.1046 10 22C10 20.8954 10.8954 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4Z"},null,8,WE)],2))],2)],10,HE))}}),UE=ge({slots:["root"],base:{root:{}},defaultVariants:{variant:"primary"},variants:{variant:{primary:{root:{color:"inherit"}},critical:{root:{color:"inherit"}},default:{root:{color:"inherit"}},subtle:{root:{color:"inherit"}},plainPrimary:{root:{color:"inherit"}},plainCritical:{root:{color:"inherit"}},dashed:{root:{color:"inherit"}},validation:{root:{color:"inherit"}},link:{root:{color:"inherit",textStyle:"body_small_medium"}}}}}),GE=O({__name:"ButtonText",props:{text:{},variant:{default:"primary"}},setup(e){const t=e,n=I(()=>UE({variant:t.variant}));return(o,i)=>(w(),M("span",{class:L(n.value.root)},[V(o.$slots,"default",{},()=>[Ne(se(t.text),1)])],2))}}),ht={primary:{_active:{background:"background.brand-bold-pressed !important"},color:"whitealpha.1000",background:"background.brand-bold-default",boxShadow:"stroke-bordered-interactive",_hover:{background:"background.brand-bold-hover"},_focus:{background:"background.brand-bold-default",boxShadow:"state-focus-primary"},_disabled:{color:"text.disabled",background:"background.gray-subtler-default",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"background.gray-subtler-default"},_active:{background:"background.gray-subtler-default !important"}},'&[data-selected="true"]':{boxShadow:"stroke-bordered-interactive"}},critical:{background:"colorPalette.700",color:"whitealpha.1000",boxShadow:"stroke-bordered-interactive",colorPalette:"red",_active:{background:"background.error-bold-pressed !important"},_hover:{background:"colorPalette.800"},_focus:{background:"background.error-bold-default",boxShadow:"state-focus-critical"},_disabled:{color:"text.disabled",background:"background.gray-subtler-default",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"background.gray-subtler-default"},_active:{background:"background.gray-subtler-default !important"}},'&[data-selected="true"]':{boxShadow:"stroke-bordered-interactive"}},default:{background:"whitealpha.1000",color:"graycool.1000",colorPalette:"whitealpha",boxShadow:"stroke-bordered-interactive",_hover:{background:"graycoolalpha.10"},_active:{background:"background.pressed !important"},_focus:{boxShadow:"state-focus-primary",zIndex:"100000"},_disabled:{color:"text.disabled",background:"background.gray-subtler-default",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"background.gray-subtler-default"},_active:{background:"background.gray-subtler-default !important"}},'&[data-selected="true"]':{boxShadow:"stroke-bordered-interactive"}},subtle:{background:"whitealpha.1000",color:"text.subtle",_active:{background:"background.pressed !important"},_disabled:{background:"background.pressed"},_hover:{background:"background.hover"},_focus:{boxShadow:"state-focus-primary"}},plainPrimary:{background:"whitealpha.1000",color:"colorPalette.800",colorPalette:"seed",_active:{background:"background.brand-selected-pressed !important",color:"text.brand-pressed"},_hover:{backgroundColor:"colorPalette.200"},_selected:{background:"colorPalette.a3"},_disabled:{color:"text.disabled",background:"whitealpha.1000",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"whitealpha.1000"}},_focus:{boxShadow:"state-focus-primary",color:"text.brand-default"}},plainCritical:{background:"whitealpha.1000",color:"colorPalette.800",colorPalette:"red",_active:{background:"background.error-pressed !important",color:"text.error-pressed"},_hover:{backgroundColor:"colorPalette.200"},_selected:{background:"colorPalette.a3"},_disabled:{color:"text.disabled",background:"whitealpha.1000",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"whitealpha.1000"}},_focus:{boxShadow:"state-focus-critical",color:"text.error-default"}},dashed:{'&[data-selected="true"]':{boxShadow:"stroke-bordered-interactive"},boxShadow:"stroke-bordered-interactive",background:"whitealpha.1000",color:"graycool.900",colorPalette:"whitealpha",border:"1px dashed",borderColor:"graycoolalpha.75",_active:{background:"background.hover !important",color:"text.normal"},_hover:{background:"graycoolalpha.10"},_focus:{boxShadow:"state-focus-primary"},_disabled:{color:"text.disabled",background:"background.gray-subtler-default",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"background.gray-subtler-default"},_active:{background:"background.gray-subtler-default !important"}}},validation:{background:"colorPalette.700",color:"whitealpha.1000",colorPalette:"green",boxShadow:"stroke-bordered-interactive",_active:{background:"background.success-bold-pressed !important"},_hover:{background:"colorPalette.800"},_focus:{background:"background.success-bold-default",boxShadow:"state-focus-success"},_disabled:{color:"graycoolalpha.75",background:"graycoolalpha.20",cursor:"not-allowed",_hover:{color:"graycoolalpha.75",background:"graycoolalpha.20"}},'&[data-selected="true"]':{boxShadow:"stroke-bordered-interactive"}},link:{background:"transparent",color:"text.brand-default",textStyle:"body_small_medium",padding:"0",height:"auto",_hover:{},_focus:{},_disabled:{color:"text.disabled",cursor:"not-allowed"}}},qg={default:{width:"32",height:"32"},small:{width:"24",height:"24"}},qE=ge({slots:["root","content","spinner","label","slots"],base:{root:{alignItems:"center",appearance:"none",cursor:"pointer",display:"inline-flex",isolation:"isolate",minWidth:"0",justifyContent:"center",outline:"none",position:"relative",transitionDuration:"normal",transitionProperty:"background, border-color, color, box-shadow",transitionTimingFunction:"default",userSelect:"none",verticalAlign:"middle",borderRadius:"md",border:"none",fontSize:"base",fontWeight:"medium",fontFamily:"sans",lineHeight:"lg",whiteSpace:"nowrap",_hidden:{display:"none"},_disabled:{color:"text.disabled",background:"background.gray-subtler-default",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"background.gray-subtler-default"},_active:{background:"background.gray-subtler-default !important"}}},content:{display:"flex",alignItems:"center",gap:"6"},spinner:{width:"16",height:"16","&[data-loading]":{opacity:"0.7"}},label:{"&[data-loading]":{opacity:"0.7"}},slots:{display:"flex",alignItems:"center",justifyContent:"center"}},defaultVariants:{type:"primary",size:"default"},variants:{type:{primary:{root:ht.primary,spinner:{}},critical:{root:ht.critical},default:{root:ht.default},subtle:{root:ht.subtle},plainPrimary:{root:ht.plainPrimary},plainCritical:{root:ht.plainCritical},dashed:{root:ht.dashed},validation:{root:ht.validation},link:{root:ht.link}},size:{default:{root:{px:"12",py:"6",gap:"6"}},small:{root:{px:"8",py:"2",gap:"6"}}}}}),YE=["disabled","data-loading","data-selected","aria-busy"],Kn=O({__name:"Button",props:{type:{default:"primary"},size:{default:"default"},isLoading:{type:Boolean},isDisabled:{type:Boolean},label:{},isSelected:{type:Boolean,default:!1},shortcutKeys:{}},setup(e){const t=zs(),n=e,o=I(()=>qE({type:n.type,size:n.size})),i=I(()=>n.type==="primary"||n.type==="validation"||n.type==="critical"?"inverted":"default"),a=I(()=>t.prefix),r=I(()=>t.suffix);return(s,l)=>(w(),M("button",{disabled:n.isDisabled,"data-loading":n.isLoading||null,"data-selected":n.isSelected||null,"aria-busy":n.isLoading||void 0,class:L([o.value.root,g(Ft)(n.isSelected?{background:"background.brand-selected !important",color:"text.selected !important"}:{})])},[N("div",{class:L([o.value.content,n.isLoading?g(Ft)({position:"relative"}):""])},[a.value?(w(),M("div",{key:0,class:L([o.value.slots,n.isLoading?g(Ft)({visibility:"hidden"}):""])},[V(s.$slots,"prefix")],2)):oe("",!0),n.isLoading?(w(),$(fx,{key:1,class:L([o.value.spinner,n.isLoading?g(Ft)({position:"absolute",transform:"translate(-50%, -50%)",top:"50%",left:"50%"}):""]),variant:i.value,"data-loading":n.isLoading||null},null,8,["class","variant","data-loading"])):oe("",!0),N("div",{class:L([a.value?g(Ft)({paddingRight:"2",display:"inline-flex"}):"",r.value?g(Ft)({paddingLeft:"2",display:"inline-flex"}):"",o.value.label,n.isLoading?g(Ft)({visibility:"hidden"}):""])},[V(s.$slots,"default",{},()=>[n.label?(w(),$(GE,{key:0,text:n.label,variant:n.type},null,8,["text","variant"])):oe("",!0)])],2),r.value?(w(),M("div",{key:2,class:L([o.value.slots,n.isLoading?g(Ft)({visibility:"hidden"}):""])},[V(s.$slots,"suffix")],2)):oe("",!0),n.shortcutKeys?(w(),M("div",{key:3,class:L([n.isLoading?g(Ft)({visibility:"hidden"}):""])},[j(Xc,{type:"default",keys:n.shortcutKeys},null,8,["keys"])],2)):oe("",!0)],2)],10,YE))}}),KE={default:{},error:{root:{boxShadow:"state-focus-critical",_focusWithin:{boxShadow:"state-focus-critical"},_focus:{boxShadow:"state-focus-critical"}}}},XE={default:{},chat:{root:{borderBottomRadius:"none"}}};ge({slots:["root","input","inputContainer","suffixButton","footer"],base:{root:{padding:"8",display:"flex",flexDirection:"column",gap:"8",background:"background.gray-subtlest-default",boxShadow:"stroke-container",transitionDuration:"normal",transitionProperty:"background, border-color, color, box-shadow",transitionTimingFunction:"default",borderRadius:"md",_hover:{backgroundColor:"background.gray-subtlest-hover"},_focus:{boxShadow:"state-focus-primary"},_focusWithin:{boxShadow:"state-focus-primary"}},inputContainer:{display:"flex",gap:"12"},input:{resize:"none",width:"100%",textAlign:"left",outline:"none",display:"flex",padding:"0",borderRadius:"none",borderTopLeftRadius:"md",border:"none",backgroundColor:"transparent",fontFamily:"sans",fontSize:"base",fontWeight:"regular",lineHeight:"lg",letterSpacing:"normal",_placeholder:{color:"text.placeholder"},_disabled:{backgroundColor:"background.disabled",color:"text.disabled",cursor:"not-allowed",_hover:{backgroundColor:"background.disabled"}}},suffixButton:{width:"fit-content",height:"fit-content",paddingX:"4 !important",paddingY:"4 !important"}},variants:{variant:XE,state:KE,disabled:{true:{root:{cursor:"not-allowed",backgroundColor:"background.disabled",color:"text.subtle",boxShadow:"none",_hover:{backgroundColor:"background.disabled"},_focusWithin:{boxShadow:"none"},_focus:{boxShadow:"none"}},input:{cursor:"not-allowed",backgroundColor:"transparent",color:"text.subtle","&::placeholder":{color:"text.placeholder"}}},false:{}}},defaultVariants:{variant:"default",state:"default",disabled:!1}});const ZE=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},JE=ge({slots:["root","content"],base:{root:{alignItems:"center",appearance:"none",cursor:"pointer",display:"inline-flex",isolation:"isolate",minWidth:"0",justifyContent:"center",outline:"none",userSelect:"none",verticalAlign:"middle",borderRadius:"md",border:"none",_hidden:{display:"none"}},content:{display:"flex",alignItems:"center",justifyContent:"center"}},defaultVariants:{type:"primary",size:"default"},variants:{type:{primary:{root:ht.primary},critical:{root:ht.critical},default:{root:ht.default},subtle:{root:ht.subtle},dashed:{root:ht.dashed},plain:{root:{background:"none",_focusVisible:{boxShadow:"state-focus-primary"},_disabled:{padding:0,boxShadow:"none",background:"graycoolalpha.20",borderColor:"border.disabled",color:"graycoolalpha.75",cursor:"not-allowed",_hover:{background:"graycoolalpha.20",borderColor:"border.disabled",color:"graycoolalpha.75"}}}}},size:{default:{root:qg.default},small:{root:qg.small}}},compoundVariants:[{type:"plain",size:"default",css:{root:{width:"16 !important",height:"16 !important"}}},{type:"plain",size:"small",css:{root:{width:"16 !important",height:"16 !important"}}}]}),QE=["disabled","data-selected"],sa=O({__name:"IconButton",props:{type:{},size:{},isDisabled:{type:Boolean},isSelected:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const n=e,o=t,i=r=>{n.isDisabled||o("click",r)},a=I(()=>JE({type:n.type,size:n.size}));return(r,s)=>(w(),M("button",{disabled:n.isDisabled,"data-selected":n.isSelected||null,"aria-label":"Icon button",onClick:i,class:L([a.value.root,g(Ft)(n.isSelected?{background:"background.brand-selected !important",color:"text.selected !important"}:{})])},[N("div",{class:L(a.value.content)},[V(r.$slots,"prefixIcon")],2)],10,QE))}});ge({slots:["container","indicator","message","icon","title"],base:{indicator:{minHeight:"3.85rem",borderTopLeftRadius:"md",borderBottomLeftRadius:"md",position:"absolute",left:"-0.0625rem",top:"0",width:"0.25rem",height:"100%"},container:{display:"flex",borderRadius:"md",boxShadow:"inner-highlighted-ring",position:"relative",minHeight:"3.75rem",padding:"8",fontSize:"md",fontWeight:"medium"},title:{fontSize:"base",fontWeight:"regular",color:"text.normal",fontFamily:"sans",lineHeight:"lg",letterSpacing:"normal"}},variants:{type:{info:{indicator:{backgroundColor:"blue.800"},icon:{color:"blue.800"}},warning:{indicator:{backgroundColor:"orange.800"},icon:{color:"orange.800"}},issue:{indicator:{backgroundColor:"red.800"},icon:{color:"red.800"}}}},defaultVariants:{type:"info"}});var eT=be("avatar").parts("root","image","fallback");eT.build();ie()(["dir","id","ids","onStatusChange","getRootNode"]);ge({slots:["root","image","fallback"],base:{root:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",overflow:"hidden",userSelect:"none",boxShadow:"stroke-bordered-interactive",background:"background.default"},image:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"inherit"},fallback:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#F2F2F5",color:"text.subtle",textAlign:"center",borderRadius:"inherit"}},variants:{size:{xs:{root:{width:"16",height:"16"},fallback:{textStyle:"body_xsmall_caps_medium"}},sm:{root:{width:"20",height:"20"},fallback:{textStyle:"body_xsmall_caps_medium"}},md:{root:{width:"24",height:"24"},fallback:{textStyle:"body_xsmall_caps_medium"}},lg:{root:{width:"32",height:"32",padding:"2"},fallback:{textStyle:"body_small_semibold"}},xl:{root:{width:"40",height:"40",padding:"2"},fallback:{textStyle:"body_base_semibold"}}},shape:{rounded:{root:{borderRadius:"full"}},square:{root:{borderRadius:"md"}}}},defaultVariants:{size:"md",shape:"rounded"}});var tT=Object.defineProperty,nT=(e,t,n)=>t in e?tT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,co=(e,t,n)=>nT(e,typeof t!="symbol"?t+"":t,n),Yg=class dt{constructor([t,n,o,i,a,r]=[0,0,0,0,0,0]){co(this,"m00"),co(this,"m01"),co(this,"m02"),co(this,"m10"),co(this,"m11"),co(this,"m12"),co(this,"rotate",(...s)=>this.prepend(dt.rotate(...s))),co(this,"scale",(...s)=>this.prepend(dt.scale(...s))),co(this,"translate",(...s)=>this.prepend(dt.translate(...s))),this.m00=t,this.m01=n,this.m02=o,this.m10=i,this.m11=a,this.m12=r}applyTo(t){const{x:n,y:o}=t,{m00:i,m01:a,m02:r,m10:s,m11:l,m12:c}=this;return{x:i*n+a*o+r,y:s*n+l*o+c}}prepend(t){return new dt([this.m00*t.m00+this.m01*t.m10,this.m00*t.m01+this.m01*t.m11,this.m00*t.m02+this.m01*t.m12+this.m02,this.m10*t.m00+this.m11*t.m10,this.m10*t.m01+this.m11*t.m11,this.m10*t.m02+this.m11*t.m12+this.m12])}append(t){return new dt([t.m00*this.m00+t.m01*this.m10,t.m00*this.m01+t.m01*this.m11,t.m00*this.m02+t.m01*this.m12+t.m02,t.m10*this.m00+t.m11*this.m10,t.m10*this.m01+t.m11*this.m11,t.m10*this.m02+t.m11*this.m12+t.m12])}get determinant(){return this.m00*this.m11-this.m01*this.m10}get isInvertible(){const t=this.determinant;return isFinite(t)&&isFinite(this.m02)&&isFinite(this.m12)&&t!==0}invert(){const t=this.determinant;return new dt([this.m11/t,-this.m01/t,(this.m01*this.m12-this.m11*this.m02)/t,-this.m10/t,this.m00/t,(this.m10*this.m02-this.m00*this.m12)/t])}get array(){return[this.m00,this.m01,this.m02,this.m10,this.m11,this.m12,0,0,1]}get float32Array(){return new Float32Array(this.array)}static get identity(){return new dt([1,0,0,0,1,0])}static rotate(t,n){const o=new dt([Math.cos(t),-Math.sin(t),0,Math.sin(t),Math.cos(t),0]);return n&&(n.x!==0||n.y!==0)?dt.multiply(dt.translate(n.x,n.y),o,dt.translate(-n.x,-n.y)):o}static scale(t,n=t,o={x:0,y:0}){const i=new dt([t,0,0,0,n,0]);return o.x!==0||o.y!==0?dt.multiply(dt.translate(o.x,o.y),i,dt.translate(-o.x,-o.y)):i}static translate(t,n){return new dt([1,0,t,0,1,n])}static multiply(...[t,...n]){return t?n.reduce((o,i)=>o.prepend(i),t):dt.identity}get a(){return this.m00}get b(){return this.m10}get c(){return this.m01}get d(){return this.m11}get tx(){return this.m02}get ty(){return this.m12}get scaleComponents(){return{x:this.a,y:this.d}}get translationComponents(){return{x:this.tx,y:this.ty}}get skewComponents(){return{x:this.c,y:this.b}}toString(){return`matrix(${this.a}, ${this.b}, ${this.c}, ${this.d}, ${this.tx}, ${this.ty})`}},Kg=(e,t,n)=>Math.min(Math.max(e,t),n),ml=(e,t,n)=>{const o=Kg(e.x,n.x,n.x+n.width-t.width),i=Kg(e.y,n.y,n.y+n.height-t.height);return{x:o,y:i}},oT={width:0,height:0},iT={width:1/0,height:1/0},vl=(e,t=oT,n=iT)=>({width:Math.min(Math.max(e.width,t.width),n.width),height:Math.min(Math.max(e.height,t.height),n.height)}),Pi=(e,t)=>({x:e,y:t}),Xg=(e,t)=>t?Pi(e.x-t.x,e.y-t.y):e,aT=(e,t)=>Pi(e.x+t.x,e.y+t.y);function Zs(e){const{x:t,y:n,width:o,height:i}=e,a=t+o/2,r=n+i/2;return{x:t,y:n,width:o,height:i,minX:t,minY:n,maxX:t+o,maxY:n+i,midX:a,midY:r,center:Pi(a,r)}}function rT(e){const t=Pi(e.minX,e.minY),n=Pi(e.maxX,e.minY),o=Pi(e.maxX,e.maxY),i=Pi(e.minX,e.maxY);return{top:t,right:n,bottom:o,left:i}}var sT=(e,t)=>{const n=Math.max(t.x,Math.min(e.x,t.x+t.width-e.width)),o=Math.max(t.y,Math.min(e.y,t.y+t.height-e.height));return{x:n,y:o,width:Math.min(e.width,t.width),height:Math.min(e.height,t.height)}},lT=(e,t)=>e.width===t?.width&&e.height===t?.height,cT=(e,t)=>e.x===t?.x&&e.y===t?.y,Cd=new WeakMap;function uT(e){if(!Cd.has(e)){const t=e.ownerDocument.defaultView||window;Cd.set(e,t.getComputedStyle(e))}return Cd.get(e)}function gx(e,t={}){return Zs(dT(e,t))}function dT(e,t={}){const{excludeScrollbar:n=!1,excludeBorders:o=!1}=t,{x:i,y:a,width:r,height:s}=e.getBoundingClientRect(),l={x:i,y:a,width:r,height:s},c=uT(e),{borderLeftWidth:u,borderTopWidth:d,borderRightWidth:h,borderBottomWidth:p}=c,m=Zg(u,h),f=Zg(d,p);if(o&&(l.width-=m,l.height-=f,l.x+=Sh(u),l.y+=Sh(d)),n){const b=e.offsetWidth-e.clientWidth-m,v=e.offsetHeight-e.clientHeight-f;l.width-=b,l.height-=v}return l}var Sh=e=>parseFloat(e.replace("px","")),Zg=(...e)=>e.reduce((t,n)=>t+(n?Sh(n):0),0);function hT(e,t={}){return Zs(pT(e,t))}function pT(e,t){const{excludeScrollbar:n=!1}=t,{innerWidth:o,innerHeight:i,document:a,visualViewport:r}=e,s=r?.width||o,l=r?.height||i,c={x:0,y:0,width:s,height:l};if(n){const u=o-a.documentElement.clientWidth,d=i-a.documentElement.clientHeight;c.width-=u,c.height-=d}return c}function fT(e,t){const n=Zs(e),{top:o,right:i,left:a,bottom:r}=rT(n),[s]=t.split("-");return{top:[a,o,i,r],right:[o,i,r,a],bottom:[o,a,r,i],left:[i,o,a,r]}[s]}function gT(e,t){const{x:n,y:o}=t;let i=!1;for(let a=0,r=e.length-1;a<e.length;r=a++){const s=e[a].x,l=e[a].y,c=e[r].x,u=e[r].y;l>o!=u>o&&n<(c-s)*(o-l)/(u-l)+s&&(i=!i)}return i}var Jg={n:{x:.5,y:0},ne:{x:1,y:0},e:{x:1,y:.5},se:{x:1,y:1},s:{x:.5,y:1},sw:{x:0,y:1},w:{x:0,y:.5},nw:{x:0,y:0}},mT={n:"s",ne:"sw",e:"w",se:"nw",s:"n",sw:"ne",w:"e",nw:"se"},{sign:bl,abs:Pa,min:Qg}=Math;function em(e,t){const{minX:n,minY:o,maxX:i,maxY:a,midX:r,midY:s}=e,l=t.includes("w")?n:t.includes("e")?i:r,c=t.includes("n")?o:t.includes("s")?a:s;return{x:l,y:c}}function vT(e){return mT[e]}function bT(e,t,n,o){const{scalingOriginMode:i,lockAspectRatio:a}=o,r=em(e,n),s=vT(n),l=em(e,s);i==="center"&&(t={x:t.x*2,y:t.y*2});const c={x:r.x+t.x,y:r.y+t.y},u={x:Jg[n].x*2-1,y:Jg[n].y*2-1},d={width:c.x-l.x,height:c.y-l.y},h=u.x*d.width/e.width,p=u.y*d.height/e.height,m=Pa(h)>Pa(p)?h:p,f=a?{x:m,y:m}:{x:r.x===l.x?1:h,y:r.y===l.y?1:p};switch(r.y===l.y?f.y=Pa(f.y):bl(f.y)!==bl(p)&&(f.y*=-1),r.x===l.x?f.x=Pa(f.x):bl(f.x)!==bl(h)&&(f.x*=-1),i){case"extent":return tm(e,Yg.scale(f.x,f.y,l),!1);case"center":return tm(e,Yg.scale(f.x,f.y,{x:e.midX,y:e.midY}),!1)}}function yT(e,t,n=!0){return n?{x:Qg(t.x,e.x),y:Qg(t.y,e.y),width:Pa(t.x-e.x),height:Pa(t.y-e.y)}:{x:e.x,y:e.y,width:t.x-e.x,height:t.y-e.y}}function tm(e,t,n=!0){const o=t.applyTo({x:e.minX,y:e.minY}),i=t.applyTo({x:e.maxX,y:e.maxY});return yT(o,i,n)}var xT=be("angle-slider").parts("root","label","thumb","valueText","control","track","markerGroup","marker");xT.build();ie()(["aria-label","aria-labelledby","dir","disabled","getRootNode","id","ids","invalid","name","onValueChange","onValueChangeEnd","readOnly","step","value","defaultValue"]);function wT(e,t){const{state:n,send:o,context:i}=e,a=n.matches("mounted","unmountSuspended");return{skip:!i.get("initial"),present:a,setNode(r){r&&o({type:"NODE.SET",node:r})},unmount(){o({type:"UNMOUNT"})}}}var _T={props({props:e}){return{...e,present:!!e.present}},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",za(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:o})=>{const i=o("present");if(i)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!i&&a?.ownerDocument.visibilityState==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});de(()=>{var r,s;const l=yl(t.get("styles"));e.set("unmountAnimationName",l),l==="none"||l===e.get("prevAnimationName")||((r=t.get("styles"))==null?void 0:r.display)==="none"||((s=t.get("styles"))==null?void 0:s.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{de(()=>{e.set("prevAnimationName",yl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:o})=>{const i=t.get("node");if(!i)return;const a=l=>{var c,u;(((u=(c=l.composedPath)==null?void 0:c.call(l))==null?void 0:u[0])??l.target)===i&&e.set("prevAnimationName",yl(t.get("styles")))},r=l=>{const c=yl(t.get("styles"));je(l)===i&&c===e.get("unmountAnimationName")&&!o("present")&&n({type:"UNMOUNT",src:"animationend"})};i.addEventListener("animationstart",a),i.addEventListener("animationcancel",r),i.addEventListener("animationend",r);const s=Yp(i,{animationFillMode:"forwards"});return()=>{i.removeEventListener("animationstart",a),i.removeEventListener("animationcancel",r),i.removeEventListener("animationend",r),Pu(()=>s())}}}}};function yl(e){return e?.animationName||"none"}ie()(["onExitComplete","present","immediate"]);const Jp=(e,t)=>{const n=fe(!1),o=fe(null),i=I(()=>({present:Ye(e).present,onExitComplete:()=>{}})),a=Gt(_T,i),r=I(()=>wT(a));return ze(()=>r.value.present,()=>{r.value.present&&(n.value=!0)}),ze(o,()=>{if(o.value){const s=o.value.$el?o.value.$el:o.value;s&&r.value.setNode(s)}}),I(()=>{var s;const l=Ye(e);return{present:r.value.present,unmounted:!r.value.present&&!n.value&&l.lazyMount||l?.unmountOnExit&&!((s=r.value)!=null&&s.present)&&n.value,presenceProps:{ref:o,hidden:!r.value.present,"data-state":r.value.skip&&l.skipAnimationOnMount?void 0:l!=null&&l.present?"open":"closed"}}})},[Qp,ef]=Re("PresenceContext");var la=new WeakMap,xl=new WeakMap,wl={},kd=0,mx=e=>e&&(e.host||mx(e.parentNode)),CT=(e,t)=>t.map(n=>{if(e.contains(n))return n;const o=mx(n);return o&&e.contains(o)?o:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),kT=new Set(["script","output","status","next-route-announcer"]),ST=e=>kT.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),$T=(e,t)=>{const{parentNode:n,markerName:o,controlAttribute:i,followControlledElements:a=!0}=t,r=CT(n,Array.isArray(e)?e:[e]);wl[o]||(wl[o]=new WeakMap);const s=wl[o],l=[],c=new Set,u=new Set(r),d=p=>{!p||c.has(p)||(c.add(p),d(p.parentNode))};r.forEach(p=>{d(p),a&&et(p)&&T0(p,m=>{d(m)})});const h=p=>{!p||u.has(p)||Array.prototype.forEach.call(p.children,m=>{if(c.has(m))h(m);else try{if(ST(m))return;const f=m.getAttribute(i)==="true",b=(la.get(m)||0)+1,v=(s.get(m)||0)+1;la.set(m,b),s.set(m,v),l.push(m),b===1&&f&&xl.set(m,!0),v===1&&m.setAttribute(o,""),f||m.setAttribute(i,"true")}catch(f){console.error("[zag-js > ariaHidden] cannot operate on ",m,f)}})};return h(n),c.clear(),kd++,()=>{l.forEach(p=>{const m=la.get(p)-1,f=s.get(p)-1;la.set(p,m),s.set(p,f),m||(xl.has(p)||p.removeAttribute(i),xl.delete(p)),f||p.removeAttribute(o)}),kd--,kd||(la=new WeakMap,la=new WeakMap,xl=new WeakMap,wl={})}},ET=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,TT=(e,t=ET(e),n="data-aria-hidden",o=!0)=>{if(t)return $T(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:o})},OT=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function IT(e,t={}){const{defer:n=!0}=t,o=n?OT:a=>a(),i=[];return i.push(o(()=>{const a=(typeof e=="function"?e():e).filter(Boolean);a.length!==0&&i.push(TT(a))})),()=>{i.forEach(a=>a?.())}}function PT(e){const t={each(n){var o;for(let i=0;i<((o=e.frames)==null?void 0:o.length);i+=1){const a=e.frames[i];a&&n(a)}},addEventListener(n,o,i){return t.each(a=>{try{a.document.addEventListener(n,o,i)}catch{}}),()=>{try{t.removeEventListener(n,o,i)}catch{}}},removeEventListener(n,o,i){t.each(a=>{try{a.document.removeEventListener(n,o,i)}catch{}})}};return t}function AT(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,o,i)=>{try{t?.addEventListener(n,o,i)}catch{}return()=>{try{t?.removeEventListener(n,o,i)}catch{}}},removeEventListener:(n,o,i)=>{try{t?.removeEventListener(n,o,i)}catch{}}}}var nm="pointerdown.outside",om="focus.outside";function RT(e){for(const t of e)if(et(t)&&Eo(t))return!0;return!1}var vx=e=>"clientY"in e;function DT(e,t){if(!vx(t)||!e)return!1;const n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function VT(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function im(e,t){if(!t||!vx(e))return!1;const n=t.scrollHeight>t.clientHeight,o=n&&e.clientX>t.offsetLeft+t.clientWidth,i=t.scrollWidth>t.clientWidth,a=i&&e.clientY>t.offsetTop+t.clientHeight,r={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(i?16:0)},s={x:e.clientX,y:e.clientY};return VT(r,s)?o||a:!1}function MT(e,t){const{exclude:n,onFocusOutside:o,onPointerDownOutside:i,onInteractOutside:a,defer:r,followControlledElements:s=!0}=t;if(!e)return;const l=an(e),c=Ke(e),u=PT(c),d=AT(c);function h(x,_){if(!et(_)||!_.isConnected||Rt(e,_)||DT(e,x)||s&&E0(e,_))return!1;const k=l.querySelector(`[aria-controls="${e.id}"]`);if(k){const P=Uc(k);if(im(x,P))return!1}const E=Uc(e);return im(x,E)?!1:!(n!=null&&n(_))}const p=new Set,m=Ba(e?.getRootNode());function f(x){function _(k){var E;const P=r&&!Ag()?de:B=>B(),S=k??x,R=((E=S?.composedPath)==null?void 0:E.call(S))??[S?.target];P(()=>{const B=m?R[0]:je(x);if(!(!e||!h(x,B))){if(i||a){const A=Es(i,a);e.addEventListener(nm,A,{once:!0})}am(e,nm,{bubbles:!1,cancelable:!0,detail:{originalEvent:S,contextmenu:mS(S),focusable:RT(R),target:B}})}})}x.pointerType==="touch"?(p.forEach(k=>k()),p.add(Ee(l,"click",_,{once:!0})),p.add(d.addEventListener("click",_,{once:!0})),p.add(u.addEventListener("click",_,{once:!0}))):_()}const b=new Set,v=setTimeout(()=>{b.add(Ee(l,"pointerdown",f,!0)),b.add(d.addEventListener("pointerdown",f,!0)),b.add(u.addEventListener("pointerdown",f,!0))},0);function y(x){(r?de:_=>_())(()=>{var _;const k=((_=x?.composedPath)==null?void 0:_.call(x))??[x?.target],E=m?k[0]:je(x);if(!(!e||!h(x,E))){if(o||a){const P=Es(o,a);e.addEventListener(om,P,{once:!0})}am(e,om,{bubbles:!1,cancelable:!0,detail:{originalEvent:x,contextmenu:!1,focusable:Eo(E),target:E}})}})}return Ag()||(b.add(Ee(l,"focusin",y,!0)),b.add(d.addEventListener("focusin",y,!0)),b.add(u.addEventListener("focusin",y,!0))),()=>{clearTimeout(v),p.forEach(x=>x()),b.forEach(x=>x())}}function tf(e,t){const{defer:n}=t,o=n?de:a=>a(),i=[];return i.push(o(()=>{const a=typeof e=="function"?e():e;i.push(MT(a,t))})),()=>{i.forEach(a=>a?.())}}function am(e,t,n){const o=e.ownerDocument.defaultView||window,i=new o.CustomEvent(t,n);return e.dispatchEvent(i)}function NT(e,t){const n=o=>{o.key==="Escape"&&(o.isComposing||t==null||t(o))};return Ee(an(e),"keydown",n,{capture:!0})}var rm="layer:request-dismiss",Ht={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var t;const n=this.indexOf(e),o=this.topMostPointerBlockingLayer()?this.indexOf((t=this.topMostPointerBlockingLayer())==null?void 0:t.node):-1;return n<o},isTopMost(e){const t=this.layers[this.count()-1];return t?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){const n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(o=>o.type===t)},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(o=>o.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>Rt(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Rt(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(n=>Ht.dismiss(n.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested"),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);const n=this.countNestedLayersOfType(e.node,e.type);n>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${n}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){const n=this.indexOf(e);if(n===-1)return;const o=this.layers[n];FT(e,rm,i=>{var a;(a=o.requestDismiss)==null||a.call(o,i),i.defaultPrevented||o==null||o.dismiss()}),LT(e,rm,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function LT(e,t,n){const o=e.ownerDocument.defaultView||window,i=new o.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(i)}function FT(e,t,n){e.addEventListener(t,n,{once:!0})}var sm;function lm(){Ht.layers.forEach(({node:e})=>{e.style.pointerEvents=Ht.isBelowPointerBlockingLayer(e)?"none":"auto"})}function BT(e){e.style.pointerEvents=""}function zT(e,t){const n=an(e),o=[];return Ht.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(sm=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t?.forEach(i=>{const[a,r]=ZS(()=>{const s=i();return et(s)?s:null},{timeout:1e3});a.then(s=>o.push(Yp(s,{pointerEvents:"auto"}))),o.push(r)}),()=>{Ht.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=sm,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),o.forEach(i=>i()))}}function HT(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Po("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:o,onRequestDismiss:i,pointerBlocking:a,exclude:r,debug:s,type:l="dialog"}=t,c={dismiss:o,node:e,type:l,pointerBlocking:a,requestDismiss:i};Ht.add(c),lm();function u(f){var b,v;const y=je(f.detail.originalEvent);Ht.isBelowPointerBlockingLayer(e)||Ht.isInBranch(y)||((b=t.onPointerDownOutside)==null||b.call(t,f),(v=t.onInteractOutside)==null||v.call(t,f),!f.defaultPrevented&&(s&&console.log("onPointerDownOutside:",f.detail.originalEvent),o?.()))}function d(f){var b,v;const y=je(f.detail.originalEvent);Ht.isInBranch(y)||((b=t.onFocusOutside)==null||b.call(t,f),(v=t.onInteractOutside)==null||v.call(t,f),!f.defaultPrevented&&(s&&console.log("onFocusOutside:",f.detail.originalEvent),o?.()))}function h(f){var b;Ht.isTopMost(e)&&((b=t.onEscapeKeyDown)==null||b.call(t,f),!f.defaultPrevented&&o&&(f.preventDefault(),o()))}function p(f){var b;if(!e)return!1;const v=typeof r=="function"?r():r,y=Array.isArray(v)?v:[v],x=(b=t.persistentElements)==null?void 0:b.map(_=>_()).filter(et);return x&&y.push(...x),y.some(_=>Rt(_,f))||Ht.isInNestedLayer(e,f)}const m=[a?zT(e,t.persistentElements):void 0,NT(e,h),tf(e,{exclude:p,onFocusOutside:d,onPointerDownOutside:u,defer:t.defer})];return()=>{Ht.remove(e),lm(),BT(e),m.forEach(f=>f?.())}}function nr(e,t){const{defer:n}=t,o=n?de:a=>a(),i=[];return i.push(o(()=>{const a=qo(e)?e():e;i.push(HT(a,t))})),()=>{i.forEach(a=>a?.())}}function bx(e,t={}){const{defer:n}=t,o=n?de:a=>a(),i=[];return i.push(o(()=>{const a=qo(e)?e():e;if(!a){Po("[@zag-js/dismissable] branch node is `null` or `undefined`");return}Ht.addBranch(a),i.push(()=>{Ht.removeBranch(a)})})),()=>{i.forEach(a=>a?.())}}var jT=Object.defineProperty,WT=(e,t,n)=>t in e?jT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ue=(e,t,n)=>WT(e,typeof t!="symbol"?t+"":t,n),cm={activateTrap(e,t){if(e.length>0){const o=e[e.length-1];o!==t&&o.pause()}const n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},UT=[],GT=class{constructor(t,n){Ue(this,"trapStack"),Ue(this,"config"),Ue(this,"doc"),Ue(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Ue(this,"portalContainers",new Set),Ue(this,"listenerCleanups",[]),Ue(this,"handleFocus",i=>{const a=je(i),r=this.findContainerIndex(a,i)>=0;if(r||Su(a))r&&(this.state.mostRecentlyFocusedNode=a);else{i.stopImmediatePropagation();let s,l=!0;if(this.state.mostRecentlyFocusedNode)if(fr(this.state.mostRecentlyFocusedNode)>0){const c=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:u}=this.state.containerGroups[c];if(u.length>0){const d=u.findIndex(h=>h===this.state.mostRecentlyFocusedNode);d>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?d+1<u.length&&(s=u[d+1],l=!1):d-1>=0&&(s=u[d-1],l=!1))}}else this.state.containerGroups.some(c=>c.tabbableNodes.some(u=>fr(u)>0))||(l=!1);else l=!1;l&&(s=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),s?this.tryFocus(s):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),Ue(this,"handlePointerDown",i=>{const a=je(i);if(!(this.findContainerIndex(a,i)>=0)){if(br(this.config.clickOutsideDeactivates,i)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}br(this.config.allowOutsideClick,i)||i.preventDefault()}}),Ue(this,"handleClick",i=>{const a=je(i);this.findContainerIndex(a,i)>=0||br(this.config.clickOutsideDeactivates,i)||br(this.config.allowOutsideClick,i)||(i.preventDefault(),i.stopImmediatePropagation())}),Ue(this,"handleTabKey",i=>{if(this.config.isKeyForward(i)||this.config.isKeyBackward(i)){this.state.recentNavEvent=i;const a=this.config.isKeyBackward(i),r=this.findNextNavNode({event:i,isBackward:a});if(!r)return;vr(i)&&i.preventDefault(),this.tryFocus(r)}}),Ue(this,"handleEscapeKey",i=>{qT(i)&&br(this.config.escapeDeactivates,i)!==!1&&(i.preventDefault(),this.deactivate())}),Ue(this,"_mutationObserver"),Ue(this,"setupMutationObserver",()=>{const i=this.doc.defaultView||window;this._mutationObserver=new i.MutationObserver(a=>{a.some(r=>Array.from(r.removedNodes).some(s=>s===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),a.some(r=>r.type==="attributes"&&(r.attributeName==="aria-controls"||r.attributeName==="aria-expanded")?!0:r.type==="childList"&&r.addedNodes.length>0?Array.from(r.addedNodes).some(s=>{if(s.nodeType!==Node.ELEMENT_NODE)return!1;const l=s;return iS(l)?!0:l.id&&!this.state.containers.some(c=>c.contains(l))?aS(l):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Ue(this,"updateObservedNodes",()=>{var i;(i=this._mutationObserver)==null||i.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(a=>{var r;(r=this._mutationObserver)==null||r.observe(a,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(a=>{this.observePortalContainer(a)}))}),Ue(this,"getInitialFocusNode",()=>{let i=this.getNodeForOption("initialFocus",{hasFallback:!0});if(i===!1)return!1;if(i===void 0||i&&!Eo(i)){const a=cs(this.doc);if(a&&this.findContainerIndex(a)>=0)i=a;else{const r=this.state.tabbableGroups[0];i=r&&r.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else i===null&&(i=this.getNodeForOption("fallbackFocus"));if(!i)throw new Error("Your focus-trap needs to have at least one focusable element");return i.isConnected||(i=this.getNodeForOption("fallbackFocus")),i}),Ue(this,"tryFocus",i=>{if(i!==!1&&i!==cs(this.doc)){if(!i||!i.focus){this.tryFocus(this.getInitialFocusNode());return}i.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=i,YT(i)&&i.select()}}),Ue(this,"deactivate",i=>{if(!this.state.active)return this;const a={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...i};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),cm.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const r=this.getOption(a,"onDeactivate"),s=this.getOption(a,"onPostDeactivate"),l=this.getOption(a,"checkCanReturnFocus"),c=this.getOption(a,"returnFocus","returnFocusOnDeactivate");r?.();const u=()=>{um(()=>{if(c){const d=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(d)}s?.()})};if(c&&l){const d=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(d).then(u,u),this}return u(),this}),Ue(this,"pause",i=>{if(this.state.paused||!this.state.active)return this;const a=this.getOption(i,"onPause"),r=this.getOption(i,"onPostPause");return this.state.paused=!0,a?.(),this.removeListeners(),this.updateObservedNodes(),r?.(),this}),Ue(this,"unpause",i=>{if(!this.state.paused||!this.state.active)return this;const a=this.getOption(i,"onUnpause"),r=this.getOption(i,"onPostUnpause");return this.state.paused=!1,a?.(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),r?.(),this}),Ue(this,"updateContainerElements",i=>(this.state.containers=Array.isArray(i)?i.filter(Boolean):[i].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Ue(this,"getReturnFocusNode",i=>{const a=this.getNodeForOption("setReturnFocus",{params:[i]});return a||(a===!1?!1:i)}),Ue(this,"getOption",(i,a,r)=>i&&i[a]!==void 0?i[a]:this.config[r||a]),Ue(this,"getNodeForOption",(i,{hasFallback:a=!1,params:r=[]}={})=>{let s=this.config[i];if(typeof s=="function"&&(s=s(...r)),s===!0&&(s=void 0),!s){if(s===void 0||s===!1)return s;throw new Error(`\`${i}\` was specified but was not a node, or did not return a node`)}let l=s;if(typeof s=="string"){try{l=this.doc.querySelector(s)}catch(c){throw new Error(`\`${i}\` appears to be an invalid selector; error="${c.message}"`)}if(!l&&!a)throw new Error(`\`${i}\` as selector refers to no known node`)}return l}),Ue(this,"findNextNavNode",i=>{const{event:a,isBackward:r=!1}=i,s=i.target||je(a);this.updateTabbableNodes();let l=null;if(this.state.tabbableGroups.length>0){const c=this.findContainerIndex(s,a),u=c>=0?this.state.containerGroups[c]:void 0;if(c<0)r?l=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:l=this.state.tabbableGroups[0].firstTabbableNode;else if(r){let d=this.state.tabbableGroups.findIndex(({firstTabbableNode:h})=>s===h);if(d<0&&(u?.container===s||Eo(s)&&!Oi(s)&&!(u!=null&&u.nextTabbableNode(s,!1)))&&(d=c),d>=0){const h=d===0?this.state.tabbableGroups.length-1:d-1,p=this.state.tabbableGroups[h];l=fr(s)>=0?p.lastTabbableNode:p.lastDomTabbableNode}else vr(a)||(l=u?.nextTabbableNode(s,!1))}else{let d=this.state.tabbableGroups.findIndex(({lastTabbableNode:h})=>s===h);if(d<0&&(u?.container===s||Eo(s)&&!Oi(s)&&!(u!=null&&u.nextTabbableNode(s)))&&(d=c),d>=0){const h=d===this.state.tabbableGroups.length-1?0:d+1,p=this.state.tabbableGroups[h];l=fr(s)>=0?p.firstTabbableNode:p.firstDomTabbableNode}else vr(a)||(l=u?.nextTabbableNode(s))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=n.trapStack||UT;const o={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(i){return vr(i)&&!i.shiftKey},isKeyBackward(i){return vr(i)&&i.shiftKey},...n};this.doc=o.document||an(Array.isArray(t)?t[0]:t),this.config=o,this.updateContainerElements(t),this.setupMutationObserver()}addPortalContainer(t){const n=t.parentElement;n&&!this.portalContainers.has(n)&&(this.portalContainers.add(n),this.state.active&&!this.state.paused&&this.observePortalContainer(n))}observePortalContainer(t){var n;(n=this._mutationObserver)==null||n.observe(t,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(t=>{tS(t).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(t,n){const o=typeof n?.composedPath=="function"?n.composedPath():void 0;return this.state.containerGroups.findIndex(({container:i,tabbableNodes:a})=>i.contains(t)||o?.includes(i)||a.find(r=>r===t)||this.isControlledElement(i,t))}isControlledElement(t,n){return this.config.followControlledElements?E0(t,n):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(t=>{const n=js(t,{getShadowRoot:this.config.getShadowRoot}),o=N0(t,{getShadowRoot:this.config.getShadowRoot}),i=n[0],a=n[n.length-1],r=i,s=a;let l=!1;for(let u=0;u<n.length;u++)if(fr(n[u])>0){l=!0;break}function c(u,d=!0){const h=n.indexOf(u);if(h>=0)return n[h+(d?1:-1)];const p=o.indexOf(u);if(!(p<0)){if(d){for(let m=p+1;m<o.length;m++)if(Oi(o[m]))return o[m]}else for(let m=p-1;m>=0;m--)if(Oi(o[m]))return o[m]}}return{container:t,tabbableNodes:n,focusableNodes:o,posTabIndexesFound:l,firstTabbableNode:i,lastTabbableNode:a,firstDomTabbableNode:r,lastDomTabbableNode:s,nextTabbableNode:c}}),this.state.tabbableGroups=this.state.containerGroups.filter(t=>t.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(t=>t.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return cm.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?um(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Ee(this.doc,"focusin",this.handleFocus,!0),Ee(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Ee(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Ee(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Ee(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Ee(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(t=>t()),this.listenerCleanups=[],this}activate(t){if(this.state.active)return this;const n=this.getOption(t,"onActivate"),o=this.getOption(t,"onPostActivate"),i=this.getOption(t,"checkCanFocusTrap");i||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=cs(this.doc),n?.();const a=()=>{i&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),o?.()};return i?(i(this.state.containers.concat()).then(a,a),this):(a(),this)}},vr=e=>e.key==="Tab",br=(e,...t)=>typeof e=="function"?e(...t):e,qT=e=>!e.isComposing&&e.key==="Escape",um=e=>setTimeout(e,0),YT=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function KT(e,t={}){let n;const o=de(()=>{const i=typeof e=="function"?e():e;if(i){n=new GT(i,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:i,...t,document:an(i)});try{n.activate()}catch{}}});return function(){n?.deactivate(),o()}}var XT=be("bottom-sheet").parts("content","title","trigger","backdrop","grabber","grabberIndicator","closeTrigger");XT.build();ie()(["id","ids","dir","modal","initialFocusEl","finalFocusEl","open","defaultOpen","getRootNode","snapPoints","swipeVelocityThreshold","closeThreshold","preventDragOnScroll","closeOnEscape","closeOnInteractOutside","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","preventScroll","restoreFocus","role","trapFocus","defaultActiveSnapPoint","activeSnapPoint","onActiveSnapPointChange"]);var ZT=be("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger");ZT.build();ie()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]);ie()(["index","readOnly"]);ie()(["index","snapAlign"]);const[yx,Js]=Re("CheckboxContext"),JT=O({__name:"checkbox-context",setup(e){const t=Js();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),QT=O({__name:"checkbox-control",props:{asChild:{type:Boolean}},setup(e){const t=Js();return Y(),(n,o)=>(w(),$(g(X).div,U(g(t).getControlProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}});function eO(e){return!(e.metaKey||!Tu()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}var tO=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function nO(e,t,n){const o=n?je(n):null,i=Ke(o);return e=e||o instanceof i.HTMLInputElement&&!tO.has(o?.type)||o instanceof i.HTMLTextAreaElement||o instanceof i.HTMLElement&&o.isContentEditable,!(e&&t==="keyboard"&&n instanceof i.KeyboardEvent&&!Reflect.has(oO,n.key))}var di=null,$h=new Set,Zc=new Map,Hi=!1,Eh=!1,oO={Tab:!0,Escape:!0};function Fu(e,t){for(let n of $h)n(e,t)}function Jc(e){Hi=!0,eO(e)&&(di="keyboard",Fu("keyboard",e))}function vn(e){di="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Hi=!0,Fu("pointer",e))}function xx(e){gS(e)&&(Hi=!0,di="virtual")}function wx(e){const t=je(e);t===Ke(t)||t===an(t)||(!Hi&&!Eh&&(di="virtual",Fu("virtual",e)),Hi=!1,Eh=!1)}function _x(){Hi=!1,Eh=!0}function iO(e){if(typeof window>"u"||Zc.get(Ke(e)))return;const t=Ke(e),n=an(e);let o=t.HTMLElement.prototype.focus;function i(){di="virtual",Fu("virtual",null),Hi=!0,o.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:i})}catch{}n.addEventListener("keydown",Jc,!0),n.addEventListener("keyup",Jc,!0),n.addEventListener("click",xx,!0),t.addEventListener("focus",wx,!0),t.addEventListener("blur",_x,!1),typeof t.PointerEvent<"u"?(n.addEventListener("pointerdown",vn,!0),n.addEventListener("pointermove",vn,!0),n.addEventListener("pointerup",vn,!0)):(n.addEventListener("mousedown",vn,!0),n.addEventListener("mousemove",vn,!0),n.addEventListener("mouseup",vn,!0)),t.addEventListener("beforeunload",()=>{aO(e)},{once:!0}),Zc.set(t,{focus:o})}var aO=(e,t)=>{const n=Ke(e),o=an(e),i=Zc.get(n);if(i){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:i.focus})}catch{}o.removeEventListener("keydown",Jc,!0),o.removeEventListener("keyup",Jc,!0),o.removeEventListener("click",xx,!0),n.removeEventListener("focus",wx,!0),n.removeEventListener("blur",_x,!1),typeof n.PointerEvent<"u"?(o.removeEventListener("pointerdown",vn,!0),o.removeEventListener("pointermove",vn,!0),o.removeEventListener("pointerup",vn,!0)):(o.removeEventListener("mousedown",vn,!0),o.removeEventListener("mousemove",vn,!0),o.removeEventListener("mouseup",vn,!0)),Zc.delete(n)}};function rO(){return di}function Ts(){return di==="keyboard"}function Bu(e={}){const{isTextInput:t,autoFocus:n,onChange:o,root:i}=e;iO(i),o?.({isFocusVisible:n||Ts(),modality:di});const a=(r,s)=>{nO(!!t,r,s)&&o?.({isFocusVisible:Ts(),modality:r})};return $h.add(a),()=>{$h.delete(a)}}var Cx=be("checkbox").parts("root","label","control","indicator"),_l=Cx.build(),kx=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`checkbox:${e.id}`},dm=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`checkbox:${e.id}:label`},sO=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`checkbox:${e.id}:control`},Th=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`checkbox:${e.id}:input`},lO=e=>e.getById(kx(e)),Qr=e=>e.getById(Th(e));function cO(e,t){const{send:n,context:o,prop:i,computed:a,scope:r}=e,s=!!i("disabled"),l=!!i("readOnly"),c=!!i("required"),u=!!i("invalid"),d=!s&&o.get("focused"),h=!s&&o.get("focusVisible"),p=a("checked"),m=a("indeterminate"),f=o.get("checked"),b={"data-active":D(o.get("active")),"data-focus":D(d),"data-focus-visible":D(h),"data-readonly":D(l),"data-hover":D(o.get("hovered")),"data-disabled":D(s),"data-state":m?"indeterminate":p?"checked":"unchecked","data-invalid":D(u),"data-required":D(c)};return{checked:p,disabled:s,indeterminate:m,focused:d,checkedState:f,setChecked(v){n({type:"CHECKED.SET",checked:v,isTrusted:!1})},toggleChecked(){n({type:"CHECKED.TOGGLE",checked:p,isTrusted:!1})},getRootProps(){return t.label({..._l.root.attrs,...b,dir:i("dir"),id:kx(r),htmlFor:Th(r),onPointerMove(){s||n({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){s||n({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(v){je(v)===Qr(r)&&v.stopPropagation()}})},getLabelProps(){return t.element({..._l.label.attrs,...b,dir:i("dir"),id:dm(r)})},getControlProps(){return t.element({..._l.control.attrs,...b,dir:i("dir"),id:sO(r),"aria-hidden":!0})},getIndicatorProps(){return t.element({..._l.indicator.attrs,...b,dir:i("dir"),hidden:!m&&!p})},getHiddenInputProps(){return t.input({id:Th(r),type:"checkbox",required:i("required"),defaultChecked:p,disabled:s,"aria-labelledby":dm(r),"aria-invalid":u,name:i("name"),form:i("form"),value:i("value"),style:Ru,onFocus(){const v=Ts();n({type:"CONTEXT.SET",context:{focused:!0,focusVisible:v}})},onBlur(){n({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(v){if(l){v.preventDefault();return}const y=v.currentTarget.checked;n({type:"CHECKED.SET",checked:y,isTrusted:!0})}})}}}var{not:hm}=Ct(),uO={props({props:e}){return{value:"on",...e,defaultChecked:e.defaultChecked??!1}},initialState(){return"ready"},context({prop:e,bindable:t}){return{checked:t(()=>({defaultValue:e("defaultChecked"),value:e("checked"),onChange(n){var o;(o=e("onCheckedChange"))==null||o({checked:n})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1}))}},watch({track:e,context:t,prop:n,action:o}){e([()=>n("disabled")],()=>{o(["removeFocusIfNeeded"])}),e([()=>t.get("checked")],()=>{o(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:hm("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:hm("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},computed:{indeterminate:({context:e})=>fc(e.get("checked")),checked:({context:e})=>dO(e.get("checked")),disabled:({context:e,prop:t})=>!!t("disabled")||e.get("fieldsetDisabled")},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({context:e,computed:t,scope:n}){if(!t("disabled"))return U0({pointerNode:lO(n),keyboardNode:Qr(n),isValidKey:o=>o.key===" ",onPress:()=>e.set("active",!1),onPressStart:()=>e.set("active",!0),onPressEnd:()=>e.set("active",!1)})},trackFocusVisible({computed:e,scope:t}){var n;if(!e("disabled"))return Bu({root:(n=t.getRootNode)==null?void 0:n.call(t)})},trackFormControlState({context:e,scope:t}){return tr(Qr(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){e.set("checked",e.initial("checked"))}})}},actions:{setContext({context:e,event:t}){for(const n in t.context)e.set(n,t.context[n])},syncInputElement({context:e,computed:t,scope:n}){const o=Qr(n);o&&(zp(o,t("checked")),o.indeterminate=fc(e.get("checked")))},removeFocusIfNeeded({context:e,prop:t}){t("disabled")&&e.get("focused")&&(e.set("focused",!1),e.set("focusVisible",!1))},setChecked({context:e,event:t}){e.set("checked",t.checked)},toggleChecked({context:e,computed:t}){const n=fc(t("checked"))?!0:!t("checked");e.set("checked",n)},dispatchChangeEvent({computed:e,scope:t}){queueMicrotask(()=>{const n=Qr(t);R0(n,{checked:e("checked")})})}}}};function fc(e){return e==="indeterminate"}function dO(e){return fc(e)?!1:!!e}ie()(["defaultChecked","checked","dir","disabled","form","getRootNode","id","ids","invalid","name","onCheckedChange","readOnly","required","value"]);const nf=Cx.extendWith("group");function hO(e,t,n,o={}){var i,a,r;const{passive:s=!1,eventName:l,defaultValue:c}=o,u=Bs(),d=n||u?.emit||((i=u?.$emit)==null?void 0:i.bind(u))||((r=(a=u?.proxy)==null?void 0:a.$emit)==null?void 0:r.bind(u?.proxy)),h=t,p=()=>e[h]??c,m=f=>{if(!l)d(l||`update:${h.toString()}`,f);else for(const b of l)d(b,f)};if(s){const f=p(),b=fe(f);let v=!1;return ze(()=>e[h],y=>{v||(v=!0,b.value=y,no(()=>{v=!1}))}),ze(b,y=>{!v&&y!==e[h]&&m(y)}),b}return I({get(){return p()},set(f){m(f)}})}function pO(e,t){const n=I(()=>!(e.disabled||e.readOnly)),{defaultValue:o}=jC(e),i=hO(e,"modelValue",t,{defaultValue:o?.value??[],passive:e.modelValue===void 0,eventName:["valueChange","update:modelValue"]}),a=d=>i.value.some(h=>String(h)===String(d)),r=d=>{a(d)?l(d):s(d)},s=d=>{n.value&&(a(d)||(i.value=i.value.concat(d)))},l=d=>{n.value&&(i.value=i.value.filter(h=>String(h)!==String(d)))},c=d=>({checked:d.value!=null?a(d.value):void 0,onCheckedChange(){d.value!=null&&r(d.value)},name:e.name,disabled:e.disabled,readOnly:e.readOnly,invalid:e.invalid}),u=d=>{i.value=d};return I(()=>({isChecked:a,value:i.value,name:e.name,disabled:e.disabled,readOnly:e.readOnly,invalid:e.invalid,addValue:s,setValue:u,toggleValue:r,getItemProps:c}))}const[Sx,fO]=Re("CheckboxGroupContext"),gO=O({__name:"checkbox-group",props:_n({defaultValue:{},modelValue:{},disabled:{type:Boolean},readOnly:{type:Boolean},name:{},invalid:{type:Boolean},asChild:{type:Boolean}},{disabled:void 0,readOnly:void 0,invalid:void 0}),emits:["valueChange","update:modelValue"],setup(e,{emit:t}){const n=pO(e,t);return Sx(n),Y(),(o,i)=>(w(),$(g(X).div,U({role:"group"},{...g(nf).build().group.attrs},{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),mO=O({__name:"checkbox-group-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return Sx(n),Y(),(o,i)=>(w(),$(g(X).div,U({role:"group"},g(nf).build().group.attrs,{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),vO=O({__name:"checkbox-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=Js(),n=ao();return Y(),(o,i)=>{var a;return w(),$(g(X).input,U({"aria-describedby":(a=g(n))==null?void 0:a.ariaDescribedby},g(t).getHiddenInputProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["aria-describedby","as-child"])}}}),bO=O({__name:"checkbox-indicator",props:{indeterminate:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=Js(),o=I(()=>t.indeterminate?n.value.indeterminate:n.value.checked);return Y(),(i,a)=>(w(),$(g(X).div,U(g(n).getIndicatorProps(),{hidden:!o.value,"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["hidden","as-child"]))}}),yO=O({__name:"checkbox-label",props:{asChild:{type:Boolean}},setup(e){const t=Js();return Y(),(n,o)=>(w(),$(g(X).span,U(g(t).getLabelProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),xO=O({__name:"checkbox-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return yx(n),Y(),(o,i)=>(w(),$(g(X).label,U(n.value.getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),wO=(e={},t)=>{const n=Ut(),o=sn(ln),i=kn(Cn),a=ao(),r=fO(),s=I(()=>{const u=Ye(e);return Gs(u,r?.value.getItemProps({value:u.value})??{})}),l=I(()=>{const u=Ye(s);return{id:n,ids:{label:a?.value.ids.label,hiddenInput:a?.value.ids.control},disabled:a?.value.disabled,readOnly:a?.value.readOnly,invalid:a?.value.invalid,required:a?.value.required,dir:i.value.dir,getRootNode:o?.value.getRootNode,...Fn(u),onCheckedChange(d){var h;t?.("checkedChange",d),t?.("update:checked",d.checked),(h=u.onCheckedChange)==null||h.call(u,d)}}}),c=Gt(uO,l);return I(()=>cO(c,rn))},_O=O({__name:"checkbox-root",props:_n({checked:{},defaultChecked:{},disabled:{type:Boolean},form:{},id:{},ids:{},invalid:{type:Boolean},name:{},readOnly:{type:Boolean},required:{type:Boolean},value:{},asChild:{type:Boolean}},{checked:void 0,defaultChecked:void 0,disabled:void 0,invalid:void 0,readOnly:void 0,required:void 0}),emits:["checkedChange","update:checked"],setup(e,{emit:t}){const n=wO(e,t);return yx(n),Y(),(o,i)=>(w(),$(g(X).label,U(g(n).getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),ca=Object.freeze(Object.defineProperty({__proto__:null,Context:JT,Control:QT,Group:gO,GroupProvider:mO,HiddenInput:vO,Indicator:bO,Label:yO,Root:_O,RootProvider:xO},Symbol.toStringTag,{value:"Module"}));var CO=be("clipboard").parts("root","control","trigger","indicator","input","label");CO.build();ie()(["getRootNode","id","ids","value","defaultValue","timeout","onStatusChange","onValueChange"]);ie()(["copied"]);var kO=Object.defineProperty,SO=(e,t,n)=>t in e?kO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,J=(e,t,n)=>SO(e,typeof t!="symbol"?t+"":t,n),gc={itemToValue(e){return typeof e=="string"?e:Ii(e)&&Yo(e,"value")?e.value:""},itemToString(e){return typeof e=="string"?e:Ii(e)&&Yo(e,"label")?e.label:gc.itemToValue(e)},isItemDisabled(e){return Ii(e)&&Yo(e,"disabled")?!!e.disabled:!1}},Ji=class $x{constructor(t){this.options=t,J(this,"items"),J(this,"indexMap",null),J(this,"copy",n=>new $x({...this.options,items:n??[...this.items]})),J(this,"isEqual",n=>bt(this.items,n.items)),J(this,"setItems",n=>this.copy(n)),J(this,"getValues",(n=this.items)=>{const o=[];for(const i of n){const a=this.getItemValue(i);a!=null&&o.push(a)}return o}),J(this,"find",n=>{if(n==null)return null;const o=this.indexOf(n);return o!==-1?this.at(o):null}),J(this,"findMany",n=>{const o=[];for(const i of n){const a=this.find(i);a!=null&&o.push(a)}return o}),J(this,"at",n=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[n]??null;let o=0;const i=this.group();for(const[,a]of i)for(const r of a){if(o===n)return r;o++}return null}),J(this,"sortFn",(n,o)=>{const i=this.indexOf(n),a=this.indexOf(o);return(i??0)-(a??0)}),J(this,"sort",n=>[...n].sort(this.sortFn.bind(this))),J(this,"getItemValue",n=>{var o,i;return n==null?null:((i=(o=this.options).itemToValue)==null?void 0:i.call(o,n))??gc.itemToValue(n)}),J(this,"getItemDisabled",n=>{var o,i;return n==null?!1:((i=(o=this.options).isItemDisabled)==null?void 0:i.call(o,n))??gc.isItemDisabled(n)}),J(this,"stringifyItem",n=>{var o,i;return n==null?null:((i=(o=this.options).itemToString)==null?void 0:i.call(o,n))??gc.itemToString(n)}),J(this,"stringify",n=>n==null?null:this.stringifyItem(this.find(n))),J(this,"stringifyItems",(n,o=", ")=>{const i=[];for(const a of n){const r=this.stringifyItem(a);r!=null&&i.push(r)}return i.join(o)}),J(this,"stringifyMany",(n,o)=>this.stringifyItems(this.findMany(n),o)),J(this,"has",n=>this.indexOf(n)!==-1),J(this,"hasItem",n=>n==null?!1:this.has(this.getItemValue(n))),J(this,"group",()=>{const{groupBy:n,groupSort:o}=this.options;if(!n)return[["",[...this.items]]];const i=new Map;this.items.forEach((r,s)=>{const l=n(r,s);i.has(l)||i.set(l,[]),i.get(l).push(r)});let a=Array.from(i.entries());return o&&a.sort(([r],[s])=>{if(typeof o=="function")return o(r,s);if(Array.isArray(o)){const l=o.indexOf(r),c=o.indexOf(s);return l===-1?1:c===-1?-1:l-c}return o==="asc"?r.localeCompare(s):o==="desc"?s.localeCompare(r):0}),a}),J(this,"getNextValue",(n,o=1,i=!1)=>{let a=this.indexOf(n);if(a===-1)return null;for(a=i?Math.min(a+o,this.size-1):a+o;a<=this.size&&this.getItemDisabled(this.at(a));)a++;return this.getItemValue(this.at(a))}),J(this,"getPreviousValue",(n,o=1,i=!1)=>{let a=this.indexOf(n);if(a===-1)return null;for(a=i?Math.max(a-o,0):a-o;a>=0&&this.getItemDisabled(this.at(a));)a--;return this.getItemValue(this.at(a))}),J(this,"indexOf",n=>{if(n==null)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(o=>this.getItemValue(o)===n);if(!this.indexMap){this.indexMap=new Map;let o=0;const i=this.group();for(const[,a]of i)for(const r of a){const s=this.getItemValue(r);s!=null&&this.indexMap.set(s,o),o++}}return this.indexMap.get(n)??-1}),J(this,"getByText",(n,o)=>{const i=o!=null?this.indexOf(o):-1,a=n.length===1;for(let r=0;r<this.items.length;r++){const s=this.items[(i+r+1)%this.items.length];if(!(a&&this.getItemValue(s)===o)&&!this.getItemDisabled(s)&&$O(this.stringifyItem(s),n))return s}}),J(this,"search",(n,o)=>{const{state:i,currentValue:a,timeout:r=350}=o,s=i.keysSoFar+n,l=s.length>1&&Array.from(s).every(p=>p===s[0])?s[0]:s,c=this.getByText(l,a),u=this.getItemValue(c);function d(){clearTimeout(i.timer),i.timer=-1}function h(p){i.keysSoFar=p,d(),p!==""&&(i.timer=+setTimeout(()=>{h(""),d()},r))}return h(s),u}),J(this,"update",(n,o)=>{let i=this.indexOf(n);return i===-1?this:this.copy([...this.items.slice(0,i),o,...this.items.slice(i+1)])}),J(this,"upsert",(n,o,i="append")=>{let a=this.indexOf(n);return a===-1?(i==="append"?this.append:this.prepend)(o):this.copy([...this.items.slice(0,a),o,...this.items.slice(a+1)])}),J(this,"insert",(n,...o)=>this.copy(yr(this.items,n,...o))),J(this,"insertBefore",(n,...o)=>{let i=this.indexOf(n);if(i===-1)if(this.items.length===0)i=0;else return this;return this.copy(yr(this.items,i,...o))}),J(this,"insertAfter",(n,...o)=>{let i=this.indexOf(n);if(i===-1)if(this.items.length===0)i=0;else return this;return this.copy(yr(this.items,i+1,...o))}),J(this,"prepend",(...n)=>this.copy(yr(this.items,0,...n))),J(this,"append",(...n)=>this.copy(yr(this.items,this.items.length,...n))),J(this,"filter",n=>{const o=this.items.filter((i,a)=>n(this.stringifyItem(i),a,i));return this.copy(o)}),J(this,"remove",(...n)=>{const o=n.map(i=>typeof i=="string"?i:this.getItemValue(i));return this.copy(this.items.filter(i=>{const a=this.getItemValue(i);return a==null?!1:!o.includes(a)}))}),J(this,"move",(n,o)=>{const i=this.indexOf(n);return i===-1?this:this.copy(Cl(this.items,[i],o))}),J(this,"moveBefore",(n,...o)=>{let i=this.items.findIndex(r=>this.getItemValue(r)===n);if(i===-1)return this;let a=o.map(r=>this.items.findIndex(s=>this.getItemValue(s)===r)).sort((r,s)=>r-s);return this.copy(Cl(this.items,a,i))}),J(this,"moveAfter",(n,...o)=>{let i=this.items.findIndex(r=>this.getItemValue(r)===n);if(i===-1)return this;let a=o.map(r=>this.items.findIndex(s=>this.getItemValue(s)===r)).sort((r,s)=>r-s);return this.copy(Cl(this.items,a,i+1))}),J(this,"reorder",(n,o)=>this.copy(Cl(this.items,[n],o))),J(this,"compareValue",(n,o)=>{const i=this.indexOf(n),a=this.indexOf(o);return i<a?-1:i>a?1:0}),J(this,"range",(n,o)=>{let i=[],a=n;for(;a!=null;){if(this.find(a)&&i.push(a),a===o)return i;a=this.getNextValue(a)}return[]}),J(this,"getValueRange",(n,o)=>n&&o?this.compareValue(n,o)<=0?this.range(n,o):this.range(o,n):[]),J(this,"toString",()=>{let n="";for(const o of this.items){const i=this.getItemValue(o),a=this.stringifyItem(o),r=this.getItemDisabled(o),s=[i,a,r].filter(Boolean).join(":");n+=s+","}return n}),J(this,"toJSON",()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let t=0;for(;this.getItemDisabled(this.at(t));)t++;return this.getItemValue(this.at(t))}get lastValue(){let t=this.size-1;for(;this.getItemDisabled(this.at(t));)t--;return this.getItemValue(this.at(t))}*[Symbol.iterator](){yield*this.items}},$O=(e,t)=>!!(e!=null&&e.toLowerCase().startsWith(t.toLowerCase()));function yr(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function Cl(e,t,n){t=[...t].sort((i,a)=>i-a);const o=t.map(i=>e[i]);for(let i=t.length-1;i>=0;i--)e=[...e.slice(0,t[i]),...e.slice(t[i]+1)];return n=Math.max(0,n-t.filter(i=>i<n).length),[...e.slice(0,n),...o,...e.slice(n)]}var EO=class mc extends Set{constructor(t=[]){super(t),J(this,"selectionMode","single"),J(this,"deselectable",!0),J(this,"copy",()=>{const n=new mc([...this]);return this.sync(n)}),J(this,"sync",n=>(n.selectionMode=this.selectionMode,n.deselectable=this.deselectable,n)),J(this,"isEmpty",()=>this.size===0),J(this,"isSelected",n=>this.selectionMode==="none"||n==null?!1:this.has(n)),J(this,"canSelect",(n,o)=>this.selectionMode!=="none"||!n.getItemDisabled(n.find(o))),J(this,"firstSelectedValue",n=>{let o=null;for(let i of this)(!o||n.compareValue(i,o)<0)&&(o=i);return o}),J(this,"lastSelectedValue",n=>{let o=null;for(let i of this)(!o||n.compareValue(i,o)>0)&&(o=i);return o}),J(this,"extendSelection",(n,o,i)=>{if(this.selectionMode==="none")return this;if(this.selectionMode==="single")return this.replaceSelection(n,i);const a=this.copy(),r=Array.from(this).pop();for(let s of n.getValueRange(o,r??i))a.delete(s);for(let s of n.getValueRange(i,o))this.canSelect(n,s)&&a.add(s);return a}),J(this,"toggleSelection",(n,o)=>{if(this.selectionMode==="none")return this;if(this.selectionMode==="single"&&!this.isSelected(o))return this.replaceSelection(n,o);const i=this.copy();return i.has(o)?i.delete(o):i.canSelect(n,o)&&i.add(o),i}),J(this,"replaceSelection",(n,o)=>{if(this.selectionMode==="none")return this;if(o==null)return this;if(!this.canSelect(n,o))return this;const i=new mc([o]);return this.sync(i)}),J(this,"setSelection",n=>{if(this.selectionMode==="none")return this;let o=new mc;for(let i of n)if(i!=null&&(o.add(i),this.selectionMode==="single"))break;return this.sync(o)}),J(this,"clearSelection",()=>{const n=this.copy();return n.deselectable&&n.size>0&&n.clear(),n}),J(this,"select",(n,o,i)=>this.selectionMode==="none"?this:this.selectionMode==="single"?this.isSelected(o)&&this.deselectable?this.toggleSelection(n,o):this.replaceSelection(n,o):this.selectionMode==="multiple"||i?this.toggleSelection(n,o):this.replaceSelection(n,o)),J(this,"deselect",n=>{const o=this.copy();return o.delete(n),o}),J(this,"isEqual",n=>bt(Array.from(this),Array.from(n)))}};function Ex(e,t,n){for(let o=0;o<t.length;o++)e=n.getChildren(e,t.slice(o+1))[t[o]];return e}function TO(e){const t=OO(e),n=[],o=new Set;for(const i of t){const a=i.join();o.has(a)||(o.add(a),n.push(i))}return n}function Tx(e,t){for(let n=0;n<Math.min(e.length,t.length);n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return e.length-t.length}function OO(e){return e.sort(Tx)}function IO(e,t){let n;return Kt(e,{...t,onEnter:(o,i)=>{if(t.predicate(o,i))return n=o,"stop"}}),n}function PO(e,t){const n=[];return Kt(e,{onEnter:(o,i)=>{t.predicate(o,i)&&n.push(o)},getChildren:t.getChildren}),n}function pm(e,t){let n;return Kt(e,{onEnter:(o,i)=>{if(t.predicate(o,i))return n=[...i],"stop"},getChildren:t.getChildren}),n}function AO(e,t){let n=t.initialResult;return Kt(e,{...t,onEnter:(o,i)=>{n=t.nextResult(n,o,i)}}),n}function RO(e,t){return AO(e,{...t,initialResult:[],nextResult:(n,o,i)=>(n.push(...t.transform(o,i)),n)})}function DO(e,t){const{predicate:n,create:o,getChildren:i}=t,a=(r,s)=>{const l=i(r,s),c=[];l.forEach((p,m)=>{const f=[...s,m],b=a(p,f);b&&c.push(b)});const u=s.length===0,d=n(r,s),h=c.length>0;return u||d||h?o(r,c,s):null};return a(e,[])||o(e,[],[])}function VO(e,t){const n=[];let o=0;const i=new Map,a=new Map;return Kt(e,{getChildren:t.getChildren,onEnter:(r,s)=>{i.has(r)||i.set(r,o++);const l=t.getChildren(r,s);l.forEach(p=>{a.has(p)||a.set(p,r),i.has(p)||i.set(p,o++)});const c=l.length>0?l.map(p=>i.get(p)):void 0,u=a.get(r),d=u?i.get(u):void 0,h=i.get(r);n.push({...r,_children:c,_parent:d,_index:h})}}),n}function MO(e,t){return{type:"insert",index:e,nodes:t}}function NO(e){return{type:"remove",indexes:e}}function of(){return{type:"replace"}}function Ox(e){return[e.slice(0,-1),e[e.length-1]]}function Ix(e,t,n=new Map){var o;const[i,a]=Ox(e);for(let s=i.length-1;s>=0;s--){const l=i.slice(0,s).join();switch((o=n.get(l))==null?void 0:o.type){case"remove":continue}n.set(l,of())}const r=n.get(i.join());switch(r?.type){case"remove":n.set(i.join(),{type:"removeThenInsert",removeIndexes:r.indexes,insertIndex:a,insertNodes:t});break;default:n.set(i.join(),MO(a,t))}return n}function Px(e){const t=new Map,n=new Map;for(const o of e){const i=o.slice(0,-1).join(),a=n.get(i)??[];a.push(o[o.length-1]),n.set(i,a.sort((r,s)=>r-s))}for(const o of e)for(let i=o.length-2;i>=0;i--){const a=o.slice(0,i).join();t.has(a)||t.set(a,of())}for(const[o,i]of n)t.set(o,NO(i));return t}function LO(e,t){const n=new Map,[o,i]=Ox(e);for(let a=o.length-1;a>=0;a--){const r=o.slice(0,a).join();n.set(r,of())}return n.set(o.join(),{type:"removeThenInsert",removeIndexes:[i],insertIndex:i,insertNodes:[t]}),n}function zu(e,t,n){return FO(e,{...n,getChildren:(o,i)=>{const a=i.join(),r=t.get(a);switch(r?.type){case"replace":case"remove":case"removeThenInsert":case"insert":return n.getChildren(o,i);default:return[]}},transform:(o,i,a)=>{const r=a.join(),s=t.get(r);switch(s?.type){case"remove":return n.create(o,i.filter((u,d)=>!s.indexes.includes(d)),a);case"removeThenInsert":const l=i.filter((u,d)=>!s.removeIndexes.includes(d)),c=s.removeIndexes.reduce((u,d)=>d<u?u-1:u,s.insertIndex);return n.create(o,fm(l,c,0,...s.insertNodes),a);case"insert":return n.create(o,fm(i,s.index,0,...s.nodes),a);case"replace":return n.create(o,i,a);default:return o}}})}function fm(e,t,n,...o){return[...e.slice(0,t),...o,...e.slice(t+n)]}function FO(e,t){const n={};return Kt(e,{...t,onLeave:(o,i)=>{const a=[0,...i],r=a.join(),s=t.transform(o,n[r]??[],i),l=a.slice(0,-1).join(),c=n[l]??[];c.push(s),n[l]=c}}),n[""][0]}function BO(e,t){const{nodes:n,at:o}=t;if(o.length===0)throw new Error("Can't insert nodes at the root");const i=Ix(o,n);return zu(e,i,t)}function zO(e,t){if(t.at.length===0)return t.node;const n=LO(t.at,t.node);return zu(e,n,t)}function HO(e,t){if(t.indexPaths.length===0)return e;for(const o of t.indexPaths)if(o.length===0)throw new Error("Can't remove the root node");const n=Px(t.indexPaths);return zu(e,n,t)}function jO(e,t){if(t.indexPaths.length===0)return e;for(const a of t.indexPaths)if(a.length===0)throw new Error("Can't move the root node");if(t.to.length===0)throw new Error("Can't move nodes to the root");const n=TO(t.indexPaths),o=n.map(a=>Ex(e,a,t)),i=Ix(t.to,o,Px(n));return zu(e,i,t)}function Kt(e,t){const{onEnter:n,onLeave:o,getChildren:i}=t;let a=[],r=[{node:e}];const s=t.reuseIndexPath?()=>a:()=>a.slice();for(;r.length>0;){let l=r[r.length-1];if(l.state===void 0){const u=n?.(l.node,s());if(u==="stop")return;l.state=u==="skip"?-1:0}const c=l.children||i(l.node,s());if(l.children||(l.children=c),l.state!==-1){if(l.state<c.length){let u=l.state;a.push(u),r.push({node:c[u]}),l.state=u+1;continue}if(o?.(l.node,s())==="stop")return}a.pop(),r.pop()}}var af=class Ax{constructor(t){this.options=t,J(this,"rootNode"),J(this,"isEqual",n=>bt(this.rootNode,n.rootNode)),J(this,"getNodeChildren",n=>{var o,i;return((i=(o=this.options).nodeToChildren)==null?void 0:i.call(o,n))??wa.nodeToChildren(n)??[]}),J(this,"resolveIndexPath",n=>typeof n=="string"?this.getIndexPath(n):n),J(this,"resolveNode",n=>{const o=this.resolveIndexPath(n);return o?this.at(o):void 0}),J(this,"getNodeChildrenCount",n=>{var o,i;return((i=(o=this.options).nodeToChildrenCount)==null?void 0:i.call(o,n))??wa.nodeToChildrenCount(n)}),J(this,"getNodeValue",n=>{var o,i;return((i=(o=this.options).nodeToValue)==null?void 0:i.call(o,n))??wa.nodeToValue(n)}),J(this,"getNodeDisabled",n=>{var o,i;return((i=(o=this.options).isNodeDisabled)==null?void 0:i.call(o,n))??wa.isNodeDisabled(n)}),J(this,"stringify",n=>{const o=this.findNode(n);return o?this.stringifyNode(o):null}),J(this,"stringifyNode",n=>{var o,i;return((i=(o=this.options).nodeToString)==null?void 0:i.call(o,n))??wa.nodeToString(n)}),J(this,"getFirstNode",(n=this.rootNode)=>{let o;return Kt(n,{getChildren:this.getNodeChildren,onEnter:(i,a)=>{if(!o&&a.length>0&&!this.getNodeDisabled(i))return o=i,"stop"}}),o}),J(this,"getLastNode",(n=this.rootNode,o={})=>{let i;return Kt(n,{getChildren:this.getNodeChildren,onEnter:(a,r)=>{var s;if(!this.isSameNode(a,n)){if((s=o.skip)!=null&&s.call(o,{value:this.getNodeValue(a),node:a,indexPath:r}))return"skip";r.length>0&&!this.getNodeDisabled(a)&&(i=a)}}}),i}),J(this,"at",n=>Ex(this.rootNode,n,{getChildren:this.getNodeChildren})),J(this,"findNode",(n,o=this.rootNode)=>IO(o,{getChildren:this.getNodeChildren,predicate:i=>this.getNodeValue(i)===n})),J(this,"findNodes",(n,o=this.rootNode)=>{const i=new Set(n.filter(a=>a!=null));return PO(o,{getChildren:this.getNodeChildren,predicate:a=>i.has(this.getNodeValue(a))})}),J(this,"sort",n=>n.reduce((o,i)=>{const a=this.getIndexPath(i);return a&&o.push({value:i,indexPath:a}),o},[]).sort((o,i)=>Tx(o.indexPath,i.indexPath)).map(({value:o})=>o)),J(this,"getIndexPath",n=>pm(this.rootNode,{getChildren:this.getNodeChildren,predicate:o=>this.getNodeValue(o)===n})),J(this,"getValue",n=>{const o=this.at(n);return o?this.getNodeValue(o):void 0}),J(this,"getValuePath",n=>{if(!n)return[];const o=[];let i=[...n];for(;i.length>0;){const a=this.at(i);a&&o.unshift(this.getNodeValue(a)),i.pop()}return o}),J(this,"getDepth",n=>{const o=pm(this.rootNode,{getChildren:this.getNodeChildren,predicate:i=>this.getNodeValue(i)===n});return o?.length??0}),J(this,"isSameNode",(n,o)=>this.getNodeValue(n)===this.getNodeValue(o)),J(this,"isRootNode",n=>this.isSameNode(n,this.rootNode)),J(this,"contains",(n,o)=>!n||!o?!1:o.slice(0,n.length).every((i,a)=>n[a]===o[a])),J(this,"getNextNode",(n,o={})=>{let i=!1,a;return Kt(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(r,s)=>{var l;if(this.isRootNode(r))return;const c=this.getNodeValue(r);if((l=o.skip)!=null&&l.call(o,{value:c,node:r,indexPath:s}))return c===n&&(i=!0),"skip";if(i&&!this.getNodeDisabled(r))return a=r,"stop";c===n&&(i=!0)}}),a}),J(this,"getPreviousNode",(n,o={})=>{let i,a=!1;return Kt(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(r,s)=>{var l;if(this.isRootNode(r))return;const c=this.getNodeValue(r);if((l=o.skip)!=null&&l.call(o,{value:c,node:r,indexPath:s}))return"skip";if(c===n)return a=!0,"stop";this.getNodeDisabled(r)||(i=r)}}),a?i:void 0}),J(this,"getParentNodes",n=>{var o;const i=(o=this.resolveIndexPath(n))==null?void 0:o.slice();if(!i)return[];const a=[];for(;i.length>0;){i.pop();const r=this.at(i);r&&!this.isRootNode(r)&&a.unshift(r)}return a}),J(this,"getDescendantNodes",(n,o)=>{const i=this.resolveNode(n);if(!i)return[];const a=[];return Kt(i,{getChildren:this.getNodeChildren,onEnter:(r,s)=>{s.length!==0&&(!(o!=null&&o.withBranch)&&this.isBranchNode(r)||a.push(r))}}),a}),J(this,"getDescendantValues",(n,o)=>this.getDescendantNodes(n,o).map(i=>this.getNodeValue(i))),J(this,"getParentIndexPath",n=>n.slice(0,-1)),J(this,"getParentNode",n=>{const o=this.resolveIndexPath(n);return o?this.at(this.getParentIndexPath(o)):void 0}),J(this,"visit",n=>{const{skip:o,...i}=n;Kt(this.rootNode,{...i,getChildren:this.getNodeChildren,onEnter:(a,r)=>{var s;if(!this.isRootNode(a))return o!=null&&o({value:this.getNodeValue(a),node:a,indexPath:r})?"skip":(s=i.onEnter)==null?void 0:s.call(i,a,r)}})}),J(this,"getPreviousSibling",n=>{const o=this.getParentNode(n);if(!o)return;const i=this.getNodeChildren(o);let a=n[n.length-1];for(;--a>=0;){const r=i[a];if(!this.getNodeDisabled(r))return r}}),J(this,"getNextSibling",n=>{const o=this.getParentNode(n);if(!o)return;const i=this.getNodeChildren(o);let a=n[n.length-1];for(;++a<i.length;){const r=i[a];if(!this.getNodeDisabled(r))return r}}),J(this,"getSiblingNodes",n=>{const o=this.getParentNode(n);return o?this.getNodeChildren(o):[]}),J(this,"getValues",(n=this.rootNode)=>RO(n,{getChildren:this.getNodeChildren,transform:o=>[this.getNodeValue(o)]}).slice(1)),J(this,"isValidDepth",(n,o)=>o==null?!0:typeof o=="function"?o(n.length):n.length===o),J(this,"isBranchNode",n=>this.getNodeChildren(n).length>0||this.getNodeChildrenCount(n)!=null),J(this,"getBranchValues",(n=this.rootNode,o={})=>{let i=[];return Kt(n,{getChildren:this.getNodeChildren,onEnter:(a,r)=>{var s;if(r.length===0)return;const l=this.getNodeValue(a);if((s=o.skip)!=null&&s.call(o,{value:l,node:a,indexPath:r}))return"skip";this.isBranchNode(a)&&this.isValidDepth(r,o.depth)&&i.push(this.getNodeValue(a))}}),i}),J(this,"flatten",(n=this.rootNode)=>VO(n,{getChildren:this.getNodeChildren})),J(this,"_create",(n,o)=>this.getNodeChildren(n).length>0||o.length>0?{...n,children:o}:{...n}),J(this,"_insert",(n,o,i)=>this.copy(BO(n,{at:o,nodes:i,getChildren:this.getNodeChildren,create:this._create}))),J(this,"copy",n=>new Ax({...this.options,rootNode:n})),J(this,"_replace",(n,o,i)=>this.copy(zO(n,{at:o,node:i,getChildren:this.getNodeChildren,create:this._create}))),J(this,"_move",(n,o,i)=>this.copy(jO(n,{indexPaths:o,to:i,getChildren:this.getNodeChildren,create:this._create}))),J(this,"_remove",(n,o)=>this.copy(HO(n,{indexPaths:o,getChildren:this.getNodeChildren,create:this._create}))),J(this,"replace",(n,o)=>this._replace(this.rootNode,n,o)),J(this,"remove",n=>this._remove(this.rootNode,n)),J(this,"insertBefore",(n,o)=>this.getParentNode(n)?this._insert(this.rootNode,n,o):void 0),J(this,"insertAfter",(n,o)=>{if(!this.getParentNode(n))return;const i=[...n.slice(0,-1),n[n.length-1]+1];return this._insert(this.rootNode,i,o)}),J(this,"move",(n,o)=>this._move(this.rootNode,n,o)),J(this,"filter",n=>{const o=DO(this.rootNode,{predicate:n,getChildren:this.getNodeChildren,create:this._create});return this.copy(o)}),J(this,"toJSON",()=>this.getValues(this.rootNode)),this.rootNode=t.rootNode}},wa={nodeToValue(e){return typeof e=="string"?e:Ii(e)&&Yo(e,"value")?e.value:""},nodeToString(e){return typeof e=="string"?e:Ii(e)&&Yo(e,"label")?e.label:wa.nodeToValue(e)},isNodeDisabled(e){return Ii(e)&&Yo(e,"disabled")?!!e.disabled:!1},nodeToChildren(e){return e.children},nodeToChildrenCount(e){if(Ii(e)&&Yo(e,"childrenCount"))return e.childrenCount}};const WO=e=>new Ji(e),gm=e=>new af(e);var UO=Object.defineProperty,GO=(e,t,n)=>t in e?UO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rf=(e,t,n)=>GO(e,t+"",n),qO=(e,t)=>{if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0},sf=class{toHexInt(){return this.toFormat("rgba").toHexInt()}getChannelValue(t){if(t in this)return this[t];throw new Error("Unsupported color channel: "+t)}getChannelValuePercent(t,n){const o=n??this.getChannelValue(t),{minValue:i,maxValue:a}=this.getChannelRange(t);return k$(o,i,a)}getChannelPercentValue(t,n){const{minValue:o,maxValue:i,step:a}=this.getChannelRange(t),r=S$(n,o,i,a);return zg(r,o,i,a)}withChannelValue(t,n){const{minValue:o,maxValue:i}=this.getChannelRange(t);if(t in this){let a=this.clone();return a[t]=vt(n,o,i),a}throw new Error("Unsupported color channel: "+t)}getColorAxes(t){let{xChannel:n,yChannel:o}=t,i=n||this.getChannels().find(s=>s!==o),a=o||this.getChannels().find(s=>s!==i),r=this.getChannels().find(s=>s!==i&&s!==a);return{xChannel:i,yChannel:a,zChannel:r}}incrementChannel(t,n){const{minValue:o,maxValue:i,step:a}=this.getChannelRange(t),r=zg(vt(this.getChannelValue(t)+n,o,i),o,i,a);return this.withChannelValue(t,r)}decrementChannel(t,n){return this.incrementChannel(t,-n)}isEqual(t){return qO(this.toJSON(),t.toJSON())&&this.getChannelValue("alpha")===t.getChannelValue("alpha")}},YO=/^#[\da-f]+$/i,KO=/^rgba?\((.*)\)$/,XO=/[^#]/gi,Rx=class vc extends sf{constructor(t,n,o,i){super(),this.red=t,this.green=n,this.blue=o,this.alpha=i}static parse(t){let n=[];if(YO.test(t)&&[4,5,7,9].includes(t.length)){const i=(t.length<6?t.replace(XO,"$&$&"):t).slice(1).split("");for(;i.length>0;)n.push(parseInt(i.splice(0,2).join(""),16));n[3]=n[3]!==void 0?n[3]/255:void 0}const o=t.match(KO);return o!=null&&o[1]&&(n=o[1].split(",").map(i=>Number(i.trim())).map((i,a)=>vt(i,0,a<3?255:1))),n.length<3?void 0:new vc(n[0],n[1],n[2],n[3]??1)}toString(t){switch(t){case"hex":return"#"+(this.red.toString(16).padStart(2,"0")+this.green.toString(16).padStart(2,"0")+this.blue.toString(16).padStart(2,"0")).toUpperCase();case"hexa":return"#"+(this.red.toString(16).padStart(2,"0")+this.green.toString(16).padStart(2,"0")+this.blue.toString(16).padStart(2,"0")+Math.round(this.alpha*255).toString(16).padStart(2,"0")).toUpperCase();case"rgb":return`rgb(${this.red}, ${this.green}, ${this.blue})`;case"css":case"rgba":return`rgba(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`;case"hsl":return this.toHSL().toString("hsl");case"hsb":return this.toHSB().toString("hsb");default:return this.toFormat(t).toString(t)}}toFormat(t){switch(t){case"rgba":return this;case"hsba":return this.toHSB();case"hsla":return this.toHSL();default:throw new Error("Unsupported color conversion: rgb -> "+t)}}toHexInt(){return this.red<<16|this.green<<8|this.blue}toHSB(){const t=this.red/255,n=this.green/255,o=this.blue/255,i=Math.min(t,n,o),a=Math.max(t,n,o),r=a-i,s=a===0?0:r/a;let l=0;if(r!==0){switch(a){case t:l=(n-o)/r+(n<o?6:0);break;case n:l=(o-t)/r+2;break;case o:l=(t-n)/r+4;break}l/=6}return new uf(Be(l*360,2),Be(s*100,2),Be(a*100,2),Be(this.alpha,2))}toHSL(){const t=this.red/255,n=this.green/255,o=this.blue/255,i=Math.min(t,n,o),a=Math.max(t,n,o),r=(a+i)/2,s=a-i;let l=-1,c=-1;if(s===0)l=c=0;else{switch(c=s/(r<.5?a+i:2-a-i),a){case t:l=(n-o)/s+(n<o?6:0);break;case n:l=(o-t)/s+2;break;case o:l=(t-n)/s+4;break}l/=6}return new cf(Be(l*360,2),Be(c*100,2),Be(r*100,2),Be(this.alpha,2))}clone(){return new vc(this.red,this.green,this.blue,this.alpha)}getChannelFormatOptions(t){switch(t){case"red":case"green":case"blue":return{style:"decimal"};case"alpha":return{style:"percent"};default:throw new Error("Unknown color channel: "+t)}}formatChannelValue(t,n){let o=this.getChannelFormatOptions(t),i=this.getChannelValue(t);return new Intl.NumberFormat(n,o).format(i)}getChannelRange(t){switch(t){case"red":case"green":case"blue":return{minValue:0,maxValue:255,step:1,pageSize:17};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+t)}}toJSON(){return{r:this.red,g:this.green,b:this.blue,a:this.alpha}}getFormat(){return"rgba"}getChannels(){return vc.colorChannels}};rf(Rx,"colorChannels",["red","green","blue"]);var lf=Rx,ZO=/hsl\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsla\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/,Dx=class bc extends sf{constructor(t,n,o,i){super(),this.hue=t,this.saturation=n,this.lightness=o,this.alpha=i}static parse(t){let n;if(n=t.match(ZO)){const[o,i,a,r]=(n[1]??n[2]).split(",").map(s=>Number(s.trim().replace("%","")));return new bc(tx(o,360),vt(i,0,100),vt(a,0,100),vt(r??1,0,1))}}toString(t){switch(t){case"hex":return this.toRGB().toString("hex");case"hexa":return this.toRGB().toString("hexa");case"hsl":return`hsl(${this.hue}, ${Be(this.saturation,2)}%, ${Be(this.lightness,2)}%)`;case"css":case"hsla":return`hsla(${this.hue}, ${Be(this.saturation,2)}%, ${Be(this.lightness,2)}%, ${this.alpha})`;case"hsb":return this.toHSB().toString("hsb");case"rgb":return this.toRGB().toString("rgb");default:return this.toFormat(t).toString(t)}}toFormat(t){switch(t){case"hsla":return this;case"hsba":return this.toHSB();case"rgba":return this.toRGB();default:throw new Error("Unsupported color conversion: hsl -> "+t)}}toHSB(){let t=this.saturation/100,n=this.lightness/100,o=n+t*Math.min(n,1-n);return t=o===0?0:2*(1-n/o),new uf(Be(this.hue,2),Be(t*100,2),Be(o*100,2),Be(this.alpha,2))}toRGB(){let t=this.hue,n=this.saturation/100,o=this.lightness/100,i=n*Math.min(o,1-o),a=(r,s=(r+t/30)%12)=>o-i*Math.max(Math.min(s-3,9-s,1),-1);return new lf(Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255),Be(this.alpha,2))}clone(){return new bc(this.hue,this.saturation,this.lightness,this.alpha)}getChannelFormatOptions(t){switch(t){case"hue":return{style:"unit",unit:"degree",unitDisplay:"narrow"};case"saturation":case"lightness":case"alpha":return{style:"percent"};default:throw new Error("Unknown color channel: "+t)}}formatChannelValue(t,n){let o=this.getChannelFormatOptions(t),i=this.getChannelValue(t);return(t==="saturation"||t==="lightness")&&(i/=100),new Intl.NumberFormat(n,o).format(i)}getChannelRange(t){switch(t){case"hue":return{minValue:0,maxValue:360,step:1,pageSize:15};case"saturation":case"lightness":return{minValue:0,maxValue:100,step:1,pageSize:10};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+t)}}toJSON(){return{h:this.hue,s:this.saturation,l:this.lightness,a:this.alpha}}getFormat(){return"hsla"}getChannels(){return bc.colorChannels}};rf(Dx,"colorChannels",["hue","saturation","lightness"]);var cf=Dx,JO=/hsb\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsba\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/,Vx=class yc extends sf{constructor(t,n,o,i){super(),this.hue=t,this.saturation=n,this.brightness=o,this.alpha=i}static parse(t){let n;if(n=t.match(JO)){const[o,i,a,r]=(n[1]??n[2]).split(",").map(s=>Number(s.trim().replace("%","")));return new yc(tx(o,360),vt(i,0,100),vt(a,0,100),vt(r??1,0,1))}}toString(t){switch(t){case"css":return this.toHSL().toString("css");case"hex":return this.toRGB().toString("hex");case"hexa":return this.toRGB().toString("hexa");case"hsb":return`hsb(${this.hue}, ${Be(this.saturation,2)}%, ${Be(this.brightness,2)}%)`;case"hsba":return`hsba(${this.hue}, ${Be(this.saturation,2)}%, ${Be(this.brightness,2)}%, ${this.alpha})`;case"hsl":return this.toHSL().toString("hsl");case"rgb":return this.toRGB().toString("rgb");default:return this.toFormat(t).toString(t)}}toFormat(t){switch(t){case"hsba":return this;case"hsla":return this.toHSL();case"rgba":return this.toRGB();default:throw new Error("Unsupported color conversion: hsb -> "+t)}}toHSL(){let t=this.saturation/100,n=this.brightness/100,o=n*(1-t/2);return t=o===0||o===1?0:(n-o)/Math.min(o,1-o),new cf(Be(this.hue,2),Be(t*100,2),Be(o*100,2),Be(this.alpha,2))}toRGB(){let t=this.hue,n=this.saturation/100,o=this.brightness/100,i=(a,r=(a+t/60)%6)=>o-n*o*Math.max(Math.min(r,4-r,1),0);return new lf(Math.round(i(5)*255),Math.round(i(3)*255),Math.round(i(1)*255),Be(this.alpha,2))}clone(){return new yc(this.hue,this.saturation,this.brightness,this.alpha)}getChannelFormatOptions(t){switch(t){case"hue":return{style:"unit",unit:"degree",unitDisplay:"narrow"};case"saturation":case"brightness":case"alpha":return{style:"percent"};default:throw new Error("Unknown color channel: "+t)}}formatChannelValue(t,n){let o=this.getChannelFormatOptions(t),i=this.getChannelValue(t);return(t==="saturation"||t==="brightness")&&(i/=100),new Intl.NumberFormat(n,o).format(i)}getChannelRange(t){switch(t){case"hue":return{minValue:0,maxValue:360,step:1,pageSize:15};case"saturation":case"brightness":return{minValue:0,maxValue:100,step:1,pageSize:10};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+t)}}toJSON(){return{h:this.hue,s:this.saturation,b:this.brightness,a:this.alpha}}getFormat(){return"hsba"}getChannels(){return yc.colorChannels}};rf(Vx,"colorChannels",["hue","saturation","brightness"]);var uf=Vx,QO="aliceblue:f0f8ff,antiquewhite:faebd7,aqua:00ffff,aquamarine:7fffd4,azure:f0ffff,beige:f5f5dc,bisque:ffe4c4,black:000000,blanchedalmond:ffebcd,blue:0000ff,blueviolet:8a2be2,brown:a52a2a,burlywood:deb887,cadetblue:5f9ea0,chartreuse:7fff00,chocolate:d2691e,coral:ff7f50,cornflowerblue:6495ed,cornsilk:fff8dc,crimson:dc143c,cyan:00ffff,darkblue:00008b,darkcyan:008b8b,darkgoldenrod:b8860b,darkgray:a9a9a9,darkgreen:006400,darkkhaki:bdb76b,darkmagenta:8b008b,darkolivegreen:556b2f,darkorange:ff8c00,darkorchid:9932cc,darkred:8b0000,darksalmon:e9967a,darkseagreen:8fbc8f,darkslateblue:483d8b,darkslategray:2f4f4f,darkturquoise:00ced1,darkviolet:9400d3,deeppink:ff1493,deepskyblue:00bfff,dimgray:696969,dodgerblue:1e90ff,firebrick:b22222,floralwhite:fffaf0,forestgreen:228b22,fuchsia:ff00ff,gainsboro:dcdcdc,ghostwhite:f8f8ff,gold:ffd700,goldenrod:daa520,gray:808080,green:008000,greenyellow:adff2f,honeydew:f0fff0,hotpink:ff69b4,indianred:cd5c5c,indigo:4b0082,ivory:fffff0,khaki:f0e68c,lavender:e6e6fa,lavenderblush:fff0f5,lawngreen:7cfc00,lemonchiffon:fffacd,lightblue:add8e6,lightcoral:f08080,lightcyan:e0ffff,lightgoldenrodyellow:fafad2,lightgrey:d3d3d3,lightgreen:90ee90,lightpink:ffb6c1,lightsalmon:ffa07a,lightseagreen:20b2aa,lightskyblue:87cefa,lightslategray:778899,lightsteelblue:b0c4de,lightyellow:ffffe0,lime:00ff00,limegreen:32cd32,linen:faf0e6,magenta:ff00ff,maroon:800000,mediumaquamarine:66cdaa,mediumblue:0000cd,mediumorchid:ba55d3,mediumpurple:9370d8,mediumseagreen:3cb371,mediumslateblue:7b68ee,mediumspringgreen:00fa9a,mediumturquoise:48d1cc,mediumvioletred:c71585,midnightblue:191970,mintcream:f5fffa,mistyrose:ffe4e1,moccasin:ffe4b5,navajowhite:ffdead,navy:000080,oldlace:fdf5e6,olive:808000,olivedrab:6b8e23,orange:ffa500,orangered:ff4500,orchid:da70d6,palegoldenrod:eee8aa,palegreen:98fb98,paleturquoise:afeeee,palevioletred:d87093,papayawhip:ffefd5,peachpuff:ffdab9,peru:cd853f,pink:ffc0cb,plum:dda0dd,powderblue:b0e0e6,purple:800080,rebeccapurple:663399,red:ff0000,rosybrown:bc8f8f,royalblue:4169e1,saddlebrown:8b4513,salmon:fa8072,sandybrown:f4a460,seagreen:2e8b57,seashell:fff5ee,sienna:a0522d,silver:c0c0c0,skyblue:87ceeb,slateblue:6a5acd,slategray:708090,snow:fffafa,springgreen:00ff7f,steelblue:4682b4,tan:d2b48c,teal:008080,thistle:d8bfd8,tomato:ff6347,turquoise:40e0d0,violet:ee82ee,wheat:f5deb3,white:ffffff,whitesmoke:f5f5f5,yellow:ffff00,yellowgreen:9acd32",eI=e=>{const t=new Map,n=e.split(",");for(let o=0;o<n.length;o++){const[i,a]=n[o].split(":");t.set(i,`#${a}`),i.includes("gray")&&t.set(i.replace("gray","grey"),`#${a}`)}return t},mm=eI(QO),Qc=e=>{var t;if(mm.has(e))return Qc(mm.get(e));const n=lf.parse(e)||uf.parse(e)||cf.parse(e);if(!n){const o=new Error("Invalid color value: "+e);throw(t=Error.captureStackTrace)==null||t.call(Error,o,Qc),o}return n};const tI=["top","right","bottom","left"],oi=Math.min,Zt=Math.max,eu=Math.round,kl=Math.floor,eo=e=>({x:e,y:e}),nI={left:"right",right:"left",bottom:"top",top:"bottom"},oI={start:"end",end:"start"};function Oh(e,t,n){return Zt(e,oi(t,n))}function Ao(e,t){return typeof e=="function"?e(t):e}function Ro(e){return e.split("-")[0]}function or(e){return e.split("-")[1]}function df(e){return e==="x"?"y":"x"}function hf(e){return e==="y"?"height":"width"}const iI=new Set(["top","bottom"]);function Zn(e){return iI.has(Ro(e))?"y":"x"}function pf(e){return df(Zn(e))}function aI(e,t,n){n===void 0&&(n=!1);const o=or(e),i=pf(e),a=hf(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(r=tu(r)),[r,tu(r)]}function rI(e){const t=tu(e);return[Ih(e),t,Ih(t)]}function Ih(e){return e.replace(/start|end/g,t=>oI[t])}const vm=["left","right"],bm=["right","left"],sI=["top","bottom"],lI=["bottom","top"];function cI(e,t,n){switch(e){case"top":case"bottom":return n?t?bm:vm:t?vm:bm;case"left":case"right":return t?sI:lI;default:return[]}}function uI(e,t,n,o){const i=or(e);let a=cI(Ro(e),n==="start",o);return i&&(a=a.map(r=>r+"-"+i),t&&(a=a.concat(a.map(Ih)))),a}function tu(e){return e.replace(/left|right|bottom|top/g,t=>nI[t])}function dI(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mx(e){return typeof e!="number"?dI(e):{top:e,right:e,bottom:e,left:e}}function nu(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function ym(e,t,n){let{reference:o,floating:i}=e;const a=Zn(t),r=pf(t),s=hf(r),l=Ro(t),c=a==="y",u=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,h=o[s]/2-i[s]/2;let p;switch(l){case"top":p={x:u,y:o.y-i.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-i.width,y:d};break;default:p={x:o.x,y:o.y}}switch(or(t)){case"start":p[r]-=h*(n&&c?-1:1);break;case"end":p[r]+=h*(n&&c?-1:1);break}return p}const hI=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:a=[],platform:r}=n,s=a.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(t));let c=await r.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ym(c,o,l),h=o,p={},m=0;for(let f=0;f<s.length;f++){const{name:b,fn:v}=s[f],{x:y,y:x,data:_,reset:k}=await v({x:u,y:d,initialPlacement:o,placement:h,strategy:i,middlewareData:p,rects:c,platform:r,elements:{reference:e,floating:t}});u=y??u,d=x??d,p={...p,[b]:{...p[b],..._}},k&&m<=50&&(m++,typeof k=="object"&&(k.placement&&(h=k.placement),k.rects&&(c=k.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:i}):k.rects),{x:u,y:d}=ym(c,h,l)),f=-1)}return{x:u,y:d,placement:h,strategy:i,middlewareData:p}};async function Os(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:a,rects:r,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Ao(t,e),m=Mx(p),f=s[h?d==="floating"?"reference":"floating":d],b=nu(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(f)))==null||n?f:f.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v=d==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),x=await(a.isElement==null?void 0:a.isElement(y))?await(a.getScale==null?void 0:a.getScale(y))||{x:1,y:1}:{x:1,y:1},_=nu(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:l}):v);return{top:(b.top-_.top+m.top)/x.y,bottom:(_.bottom-b.bottom+m.bottom)/x.y,left:(b.left-_.left+m.left)/x.x,right:(_.right-b.right+m.right)/x.x}}const pI=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:a,platform:r,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Ao(e,t)||{};if(c==null)return{};const d=Mx(u),h={x:n,y:o},p=pf(i),m=hf(p),f=await r.getDimensions(c),b=p==="y",v=b?"top":"left",y=b?"bottom":"right",x=b?"clientHeight":"clientWidth",_=a.reference[m]+a.reference[p]-h[p]-a.floating[m],k=h[p]-a.reference[p],E=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c));let P=E?E[x]:0;(!P||!await(r.isElement==null?void 0:r.isElement(E)))&&(P=s.floating[x]||a.floating[m]);const S=_/2-k/2,R=P/2-f[m]/2-1,B=oi(d[v],R),A=oi(d[y],R),G=B,ee=P-f[m]-A,z=P/2-f[m]/2+S,W=Oh(G,z,ee),q=!l.arrow&&or(i)!=null&&z!==W&&a.reference[m]/2-(z<G?B:A)-f[m]/2<0,ne=q?z<G?z-G:z-ee:0;return{[p]:h[p]+ne,data:{[p]:W,centerOffset:z-W-ne,...q&&{alignmentOffset:ne}},reset:q}}}),fI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:a,rects:r,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:f=!0,...b}=Ao(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const v=Ro(i),y=Zn(s),x=Ro(s)===s,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),k=h||(x||!f?[tu(s)]:rI(s)),E=m!=="none";!h&&E&&k.push(...uI(s,f,m,_));const P=[s,...k],S=await Os(t,b),R=[];let B=((o=a.flip)==null?void 0:o.overflows)||[];if(u&&R.push(S[v]),d){const z=aI(i,r,_);R.push(S[z[0]],S[z[1]])}if(B=[...B,{placement:i,overflows:R}],!R.every(z=>z<=0)){var A,G;const z=(((A=a.flip)==null?void 0:A.index)||0)+1,W=P[z];if(W&&(!(d==="alignment"&&y!==Zn(W))||B.every(ne=>Zn(ne.placement)===y?ne.overflows[0]>0:!0)))return{data:{index:z,overflows:B},reset:{placement:W}};let q=(G=B.filter(ne=>ne.overflows[0]<=0).sort((ne,te)=>ne.overflows[1]-te.overflows[1])[0])==null?void 0:G.placement;if(!q)switch(p){case"bestFit":{var ee;const ne=(ee=B.filter(te=>{if(E){const le=Zn(te.placement);return le===y||le==="y"}return!0}).map(te=>[te.placement,te.overflows.filter(le=>le>0).reduce((le,he)=>le+he,0)]).sort((te,le)=>te[1]-le[1])[0])==null?void 0:ee[0];ne&&(q=ne);break}case"initialPlacement":q=s;break}if(i!==q)return{reset:{placement:q}}}return{}}}};function xm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function wm(e){return tI.some(t=>e[t]>=0)}const gI=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=Ao(e,t);switch(o){case"referenceHidden":{const a=await Os(t,{...i,elementContext:"reference"}),r=xm(a,n.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:wm(r)}}}case"escaped":{const a=await Os(t,{...i,altBoundary:!0}),r=xm(a,n.floating);return{data:{escapedOffsets:r,escaped:wm(r)}}}default:return{}}}}},Nx=new Set(["left","top"]);async function mI(e,t){const{placement:n,platform:o,elements:i}=e,a=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=Ro(n),s=or(n),l=Zn(n)==="y",c=Nx.has(r)?-1:1,u=a&&l?-1:1,d=Ao(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),l?{x:p*u,y:h*c}:{x:h*c,y:p*u}}const vI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:a,placement:r,middlewareData:s}=t,l=await mI(t,e);return r===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:r}}}}},bI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:a=!0,crossAxis:r=!1,limiter:s={fn:b=>{let{x:v,y}=b;return{x:v,y}}},...l}=Ao(e,t),c={x:n,y:o},u=await Os(t,l),d=Zn(Ro(i)),h=df(d);let p=c[h],m=c[d];if(a){const b=h==="y"?"top":"left",v=h==="y"?"bottom":"right",y=p+u[b],x=p-u[v];p=Oh(y,p,x)}if(r){const b=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=m+u[b],x=m-u[v];m=Oh(y,m,x)}const f=s.fn({...t,[h]:p,[d]:m});return{...f,data:{x:f.x-n,y:f.y-o,enabled:{[h]:a,[d]:r}}}}}},yI=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:a,middlewareData:r}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Ao(e,t),u={x:n,y:o},d=Zn(i),h=df(d);let p=u[h],m=u[d];const f=Ao(s,t),b=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(l){const x=h==="y"?"height":"width",_=a.reference[h]-a.floating[x]+b.mainAxis,k=a.reference[h]+a.reference[x]-b.mainAxis;p<_?p=_:p>k&&(p=k)}if(c){var v,y;const x=h==="y"?"width":"height",_=Nx.has(Ro(i)),k=a.reference[d]-a.floating[x]+(_&&((v=r.offset)==null?void 0:v[d])||0)+(_?0:b.crossAxis),E=a.reference[d]+a.reference[x]+(_?0:((y=r.offset)==null?void 0:y[d])||0)-(_?b.crossAxis:0);m<k?m=k:m>E&&(m=E)}return{[h]:p,[d]:m}}}},xI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:a,platform:r,elements:s}=t,{apply:l=()=>{},...c}=Ao(e,t),u=await Os(t,c),d=Ro(i),h=or(i),p=Zn(i)==="y",{width:m,height:f}=a.floating;let b,v;d==="top"||d==="bottom"?(b=d,v=h===(await(r.isRTL==null?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(v=d,b=h==="end"?"top":"bottom");const y=f-u.top-u.bottom,x=m-u.left-u.right,_=oi(f-u[b],y),k=oi(m-u[v],x),E=!t.middlewareData.shift;let P=_,S=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=x),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(P=y),E&&!h){const B=Zt(u.left,0),A=Zt(u.right,0),G=Zt(u.top,0),ee=Zt(u.bottom,0);p?S=m-2*(B!==0||A!==0?B+A:Zt(u.left,u.right)):P=f-2*(G!==0||ee!==0?G+ee:Zt(u.top,u.bottom))}await l({...t,availableWidth:S,availableHeight:P});const R=await r.getDimensions(s.floating);return m!==R.width||f!==R.height?{reset:{rects:!0}}:{}}}};function Hu(){return typeof window<"u"}function ir(e){return Lx(e)?(e.nodeName||"").toLowerCase():"#document"}function nn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ro(e){var t;return(t=(Lx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lx(e){return Hu()?e instanceof Node||e instanceof nn(e).Node:!1}function Nn(e){return Hu()?e instanceof Element||e instanceof nn(e).Element:!1}function oo(e){return Hu()?e instanceof HTMLElement||e instanceof nn(e).HTMLElement:!1}function _m(e){return!Hu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof nn(e).ShadowRoot}const wI=new Set(["inline","contents"]);function Qs(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=Ln(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!wI.has(i)}const _I=new Set(["table","td","th"]);function CI(e){return _I.has(ir(e))}const kI=[":popover-open",":modal"];function ju(e){return kI.some(t=>{try{return e.matches(t)}catch{return!1}})}const SI=["transform","translate","scale","rotate","perspective"],$I=["transform","translate","scale","rotate","perspective","filter"],EI=["paint","layout","strict","content"];function ff(e){const t=gf(),n=Nn(e)?Ln(e):e;return SI.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||$I.some(o=>(n.willChange||"").includes(o))||EI.some(o=>(n.contain||"").includes(o))}function TI(e){let t=ii(e);for(;oo(t)&&!Ha(t);){if(ff(t))return t;if(ju(t))return null;t=ii(t)}return null}function gf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const OI=new Set(["html","body","#document"]);function Ha(e){return OI.has(ir(e))}function Ln(e){return nn(e).getComputedStyle(e)}function Wu(e){return Nn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ii(e){if(ir(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_m(e)&&e.host||ro(e);return _m(t)?t.host:t}function Fx(e){const t=ii(e);return Ha(t)?e.ownerDocument?e.ownerDocument.body:e.body:oo(t)&&Qs(t)?t:Fx(t)}function Is(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Fx(e),a=i===((o=e.ownerDocument)==null?void 0:o.body),r=nn(i);if(a){const s=Ph(r);return t.concat(r,r.visualViewport||[],Qs(i)?i:[],s&&n?Is(s):[])}return t.concat(i,Is(i,[],n))}function Ph(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Bx(e){const t=Ln(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=oo(e),a=i?e.offsetWidth:n,r=i?e.offsetHeight:o,s=eu(n)!==a||eu(o)!==r;return s&&(n=a,o=r),{width:n,height:o,$:s}}function mf(e){return Nn(e)?e:e.contextElement}function Ma(e){const t=mf(e);if(!oo(t))return eo(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:a}=Bx(t);let r=(a?eu(n.width):n.width)/o,s=(a?eu(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!s||!Number.isFinite(s))&&(s=1),{x:r,y:s}}const II=eo(0);function zx(e){const t=nn(e);return!gf()||!t.visualViewport?II:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function PI(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==nn(e)?!1:t}function ji(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=mf(e);let r=eo(1);t&&(o?Nn(o)&&(r=Ma(o)):r=Ma(e));const s=PI(a,n,o)?zx(a):eo(0);let l=(i.left+s.x)/r.x,c=(i.top+s.y)/r.y,u=i.width/r.x,d=i.height/r.y;if(a){const h=nn(a),p=o&&Nn(o)?nn(o):o;let m=h,f=Ph(m);for(;f&&o&&p!==m;){const b=Ma(f),v=f.getBoundingClientRect(),y=Ln(f),x=v.left+(f.clientLeft+parseFloat(y.paddingLeft))*b.x,_=v.top+(f.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=x,c+=_,m=nn(f),f=Ph(m)}}return nu({width:u,height:d,x:l,y:c})}function Uu(e,t){const n=Wu(e).scrollLeft;return t?t.left+n:ji(ro(e)).left+n}function Hx(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Uu(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function AI(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const a=i==="fixed",r=ro(o),s=t?ju(t.floating):!1;if(o===r||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=eo(1);const u=eo(0),d=oo(o);if((d||!d&&!a)&&((ir(o)!=="body"||Qs(r))&&(l=Wu(o)),oo(o))){const p=ji(o);c=Ma(o),u.x=p.x+o.clientLeft,u.y=p.y+o.clientTop}const h=r&&!d&&!a?Hx(r,l):eo(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function RI(e){return Array.from(e.getClientRects())}function DI(e){const t=ro(e),n=Wu(e),o=e.ownerDocument.body,i=Zt(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=Zt(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+Uu(e);const s=-n.scrollTop;return Ln(o).direction==="rtl"&&(r+=Zt(t.clientWidth,o.clientWidth)-i),{width:i,height:a,x:r,y:s}}const Cm=25;function VI(e,t){const n=nn(e),o=ro(e),i=n.visualViewport;let a=o.clientWidth,r=o.clientHeight,s=0,l=0;if(i){a=i.width,r=i.height;const u=gf();(!u||u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}const c=Uu(o);if(c<=0){const u=o.ownerDocument,d=u.body,h=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(o.clientWidth-d.clientWidth-p);m<=Cm&&(a-=m)}else c<=Cm&&(a+=c);return{width:a,height:r,x:s,y:l}}const MI=new Set(["absolute","fixed"]);function NI(e,t){const n=ji(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,a=oo(e)?Ma(e):eo(1),r=e.clientWidth*a.x,s=e.clientHeight*a.y,l=i*a.x,c=o*a.y;return{width:r,height:s,x:l,y:c}}function km(e,t,n){let o;if(t==="viewport")o=VI(e,n);else if(t==="document")o=DI(ro(e));else if(Nn(t))o=NI(t,n);else{const i=zx(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return nu(o)}function jx(e,t){const n=ii(e);return n===t||!Nn(n)||Ha(n)?!1:Ln(n).position==="fixed"||jx(n,t)}function LI(e,t){const n=t.get(e);if(n)return n;let o=Is(e,[],!1).filter(s=>Nn(s)&&ir(s)!=="body"),i=null;const a=Ln(e).position==="fixed";let r=a?ii(e):e;for(;Nn(r)&&!Ha(r);){const s=Ln(r),l=ff(r);!l&&s.position==="fixed"&&(i=null),(a?!l&&!i:!l&&s.position==="static"&&i&&MI.has(i.position)||Qs(r)&&!l&&jx(e,r))?o=o.filter(c=>c!==r):i=s,r=ii(r)}return t.set(e,o),o}function FI(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const a=[...n==="clippingAncestors"?ju(t)?[]:LI(t,this._c):[].concat(n),o],r=a[0],s=a.reduce((l,c)=>{const u=km(t,c,i);return l.top=Zt(u.top,l.top),l.right=oi(u.right,l.right),l.bottom=oi(u.bottom,l.bottom),l.left=Zt(u.left,l.left),l},km(t,r,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function BI(e){const{width:t,height:n}=Bx(e);return{width:t,height:n}}function zI(e,t,n){const o=oo(t),i=ro(t),a=n==="fixed",r=ji(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=eo(0);function c(){l.x=Uu(i)}if(o||!o&&!a)if((ir(t)!=="body"||Qs(i))&&(s=Wu(t)),o){const p=ji(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else i&&c();a&&!o&&i&&c();const u=i&&!o&&!a?Hx(i,s):eo(0),d=r.left+s.scrollLeft-l.x-u.x,h=r.top+s.scrollTop-l.y-u.y;return{x:d,y:h,width:r.width,height:r.height}}function Sd(e){return Ln(e).position==="static"}function Sm(e,t){if(!oo(e)||Ln(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ro(e)===n&&(n=n.ownerDocument.body),n}function Wx(e,t){const n=nn(e);if(ju(e))return n;if(!oo(e)){let i=ii(e);for(;i&&!Ha(i);){if(Nn(i)&&!Sd(i))return i;i=ii(i)}return n}let o=Sm(e,t);for(;o&&CI(o)&&Sd(o);)o=Sm(o,t);return o&&Ha(o)&&Sd(o)&&!ff(o)?n:o||TI(e)||n}const HI=async function(e){const t=this.getOffsetParent||Wx,n=this.getDimensions,o=await n(e.floating);return{reference:zI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function jI(e){return Ln(e).direction==="rtl"}const WI={convertOffsetParentRelativeRectToViewportRelativeRect:AI,getDocumentElement:ro,getClippingRect:FI,getOffsetParent:Wx,getElementRects:HI,getClientRects:RI,getDimensions:BI,getScale:Ma,isElement:Nn,isRTL:jI};function Ux(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function UI(e,t){let n=null,o;const i=ro(e);function a(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function r(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const c=e.getBoundingClientRect(),{left:u,top:d,width:h,height:p}=c;if(s||t(),!h||!p)return;const m=kl(d),f=kl(i.clientWidth-(u+h)),b=kl(i.clientHeight-(d+p)),v=kl(u),y={rootMargin:-m+"px "+-f+"px "+-b+"px "+-v+"px",threshold:Zt(0,oi(1,l))||1};let x=!0;function _(k){const E=k[0].intersectionRatio;if(E!==l){if(!x)return r();E?r(!1,E):o=setTimeout(()=>{r(!1,1e-7)},1e3)}E===1&&!Ux(c,e.getBoundingClientRect())&&r(),x=!1}try{n=new IntersectionObserver(_,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,y)}n.observe(e)}return r(!0),a}function GI(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,c=mf(e),u=i||a?[...c?Is(c):[],...Is(t)]:[];u.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const d=c&&s?UI(c,n):null;let h=-1,p=null;r&&(p=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let m,f=l?ji(e):null;l&&b();function b(){const v=ji(e);f&&!Ux(f,v)&&n(),f=v,m=requestAnimationFrame(b)}return n(),()=>{var v;u.forEach(y=>{i&&y.removeEventListener("scroll",n),a&&y.removeEventListener("resize",n)}),d?.(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const qI=vI,YI=bI,KI=fI,XI=xI,ZI=gI,JI=pI,QI=yI,eP=(e,t,n)=>{const o=new Map,i={platform:WI,...n},a={...i.platform,_c:o};return hI(e,t,{...i,platform:a})};function $m(e=0,t=0,n=0,o=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,o);const i={x:e,y:t,width:n,height:o,top:t,right:e+n,bottom:t+o,left:e};return{...i,toJSON:()=>i}}function tP(e){if(!e)return $m();const{x:t,y:n,width:o,height:i}=e;return $m(t,n,o,i)}function nP(e,t){return{contextElement:et(e)?e:void 0,getBoundingClientRect:()=>{const n=e,o=t?.(n);return o||!n?tP(o):n.getBoundingClientRect()}}}var xr=e=>({variable:e,reference:`var(${e})`}),mo={arrowSize:xr("--arrow-size"),arrowSizeHalf:xr("--arrow-size-half"),arrowBg:xr("--arrow-background"),transformOrigin:xr("--transform-origin"),arrowOffset:xr("--arrow-offset")},oP=e=>e==="top"||e==="bottom"?"y":"x";function iP(e,t){return{name:"transformOrigin",fn(n){var o,i,a,r;const{elements:s,middlewareData:l,placement:c,rects:u,y:d}=n,h=c.split("-")[0],p=oP(h),m=((o=l.arrow)==null?void 0:o.x)||0,f=((i=l.arrow)==null?void 0:i.y)||0,b=t?.clientWidth||0,v=t?.clientHeight||0,y=m+b/2,x=f+v/2,_=Math.abs(((a=l.shift)==null?void 0:a.y)||0),k=u.reference.height/2,E=v/2,P=((r=e.offset)==null?void 0:r.mainAxis)??e.gutter,S=typeof P=="number"?P+E:P??E,R=_>S,B={top:`${y}px calc(100% + ${S}px)`,bottom:`${y}px ${-S}px`,left:`calc(100% + ${S}px) ${x}px`,right:`${-S}px ${x}px`}[h],A=`${y}px ${u.reference.y+k-d}px`,G=!!e.overlap&&p==="y"&&R;return s.floating.style.setProperty(mo.transformOrigin.variable,G?A:B),{data:{transformOrigin:G?A:B}}}}}var aP={name:"rects",fn({rects:e}){return{data:e}}},rP=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:o,y:i}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:o!=null?`${o}px`:"",top:i!=null?`${i}px`:"",[a]:`calc(100% + ${mo.arrowOffset.reference})`}),{}}}};function sP(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}function lP(e){return e.split("-")[0]}var cP={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function Em(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function vf(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function uP(e,t,n){const o=e||t.createElement("div");return JI({element:o,padding:n.arrowPadding})}function dP(e,t){if(!l$(t.offset??t.gutter))return qI(({placement:n})=>{var o,i;const a=(e?.clientHeight||0)/2,r=((o=t.offset)==null?void 0:o.mainAxis)??t.gutter,s=typeof r=="number"?r+a:r??a,{hasAlign:l}=sP(n),c=l?void 0:t.shift,u=((i=t.offset)==null?void 0:i.crossAxis)??c;return Vu({crossAxis:u,mainAxis:s,alignmentAxis:t.shift})})}function hP(e){if(!e.flip)return;const t=vf(e.boundary);return KI({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip})}function pP(e){if(!e.slide&&!e.overlap)return;const t=vf(e.boundary);return YI({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:QI()})}function fP(e){return XI({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:o,availableWidth:i}){const a=t.floating,r=Math.round(n.reference.width),s=Math.round(n.reference.height);i=Math.floor(i),o=Math.floor(o),a.style.setProperty("--reference-width",`${r}px`),a.style.setProperty("--reference-height",`${s}px`),a.style.setProperty("--available-width",`${i}px`),a.style.setProperty("--available-height",`${o}px`)}})}function gP(e){if(e.hideWhenDetached)return ZI({strategy:"referenceHidden",boundary:vf(e.boundary)??"clippingAncestors"})}function mP(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function vP(e,t,n={}){const o=nP(e,n.getAnchorRect);if(!t||!o)return;const i=Object.assign({},cP,n),a=t.querySelector("[data-part=arrow]"),r=[dP(a,i),hP(i),pP(i),uP(a,t.ownerDocument,i),rP(a),iP({gutter:i.gutter,offset:i.offset,overlap:i.overlap},a),fP(i),gP(i),aP],{placement:s,strategy:l,onComplete:c,onPositioned:u}=i,d=async()=>{var f;if(!o||!t)return;const b=await eP(o,t,{placement:s,middleware:r,strategy:l});c?.(b),u?.({placed:!0});const v=Ke(t),y=Em(v,b.x),x=Em(v,b.y);t.style.setProperty("--x",`${y}px`),t.style.setProperty("--y",`${x}px`),i.hideWhenDetached&&((f=b.middlewareData.hide)!=null&&f.referenceHidden?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const _=t.firstElementChild;if(_){const k=za(_);t.style.setProperty("--z-index",k.zIndex)}},h=async()=>{n.updatePosition?(await n.updatePosition({updatePosition:d,floatingElement:t}),u?.({placed:!0})):await d()},p=mP(i.listeners),m=i.listeners?GI(o,t,h,p):g$;return h(),()=>{m?.(),u?.({placed:!1})}}function on(e,t,n={}){const{defer:o,...i}=n,a=o?de:s=>s(),r=[];return r.push(a(()=>{const s=typeof e=="function"?e():e,l=typeof t=="function"?t():t;r.push(vP(s,l,i))})),()=>{r.forEach(s=>s?.())}}var bP={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function bf(e={}){const{placement:t,sameWidth:n,fitViewport:o,strategy:i="absolute"}=e;return{arrow:{position:"absolute",width:mo.arrowSize.reference,height:mo.arrowSize.reference,[mo.arrowSizeHalf.variable]:`calc(${mo.arrowSize.reference} / 2)`,[mo.arrowOffset.variable]:`calc(${mo.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?bP[t.split("-")[0]]:void 0,background:mo.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:i,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:o?"var(--available-width)":void 0,maxHeight:o?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var Gx=be("color-picker",["root","label","control","trigger","positioner","content","area","areaThumb","valueText","areaBackground","channelSlider","channelSliderLabel","channelSliderTrack","channelSliderThumb","channelSliderValueText","channelInput","transparencyGrid","swatchGroup","swatchTrigger","swatchIndicator","swatch","eyeDropperTrigger","formatTrigger","formatSelect"]);Gx.build();var yP=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`color-picker:${e.id}:hidden-input`},xP=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`color-picker:${e.id}:control`},wP=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`color-picker:${e.id}:trigger`},_P=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`color-picker:${e.id}:content`},CP=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`color-picker:${e.id}:positioner`},kP=e=>{var t;return((t=e.ids)==null?void 0:t.formatSelect)??`color-picker:${e.id}:format-select`},SP=e=>{var t;return((t=e.ids)==null?void 0:t.area)??`color-picker:${e.id}:area`},$P=e=>{var t;return((t=e.ids)==null?void 0:t.areaThumb)??`color-picker:${e.id}:area-thumb`},EP=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.channelSliderTrack)==null?void 0:o.call(n,t))??`color-picker:${e.id}:slider-track:${t}`},TP=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.channelSliderThumb)==null?void 0:o.call(n,t))??`color-picker:${e.id}:slider-thumb:${t}`},xc=e=>e.getById(_P(e)),OP=e=>e.getById($P(e)),IP=(e,t)=>e.getById(TP(e,t)),PP=e=>e.getById(kP(e)),Tm=e=>e.getById(yP(e)),AP=e=>e.getById(SP(e)),RP=(e,t,n)=>{const o=AP(e);if(!o)return;const{getPercentValue:i}=H0(t,o);return{x:i({dir:n,orientation:"horizontal"}),y:i({orientation:"vertical"})}},DP=e=>e.getById(xP(e)),$d=e=>e.getById(wP(e)),VP=e=>e.getById(CP(e)),MP=(e,t)=>e.getById(EP(e,t)),NP=(e,t,n,o)=>{const i=MP(e,n);if(!i)return;const{getPercentValue:a}=H0(t,i);return{x:a({dir:o,orientation:"horizontal"}),y:a({orientation:"vertical"})}},LP=e=>[...ni(xc(e),"input[data-channel]"),...ni(DP(e),"input[data-channel]")];function FP(e,t){if(t==null)return"";if(t==="hex")return e.toString("hex");if(t==="css")return e.toString("css");if(t in e)return e.getChannelValue(t).toString();const n=e.getFormat()==="hsla";switch(t){case"hue":return n?e.toFormat("hsla").getChannelValue("hue").toString():e.toFormat("hsba").getChannelValue("hue").toString();case"saturation":return n?e.toFormat("hsla").getChannelValue("saturation").toString():e.toFormat("hsba").getChannelValue("saturation").toString();case"lightness":return e.toFormat("hsla").getChannelValue("lightness").toString();case"brightness":return e.toFormat("hsba").getChannelValue("brightness").toString();case"red":case"green":case"blue":return e.toFormat("rgba").getChannelValue(t).toString();default:return e.getChannelValue(t).toString()}}var Om=e=>Qc(e),BP=/^[0-9a-fA-F]{3,8}$/;function zP(e){return BP.test(e)}function HP(e){return e.startsWith("#")?e:zP(e)?`#${e}`:e}var{and:jP}=Ct();jP("isOpenControlled","closeOnSelect");function Im(e,t,n){const o=LP(e);de(()=>{o.forEach(i=>{const a=i.dataset.channel;Rn(i,FP(n||t,a))})})}function WP(e,t){const n=PP(e);n&&de(()=>Rn(n,t))}ie()(["closeOnSelect","dir","disabled","format","defaultFormat","getRootNode","id","ids","initialFocusEl","inline","name","positioning","onFocusOutside","onFormatChange","onInteractOutside","onOpenChange","onPointerDownOutside","onValueChange","onValueChangeEnd","defaultOpen","open","positioning","required","readOnly","value","defaultValue","invalid","openAutoFocus"]);ie()(["xChannel","yChannel"]);ie()(["channel","orientation"]);ie()(["value","disabled"]);ie()(["value","respectAlpha"]);ie()(["size"]);Gx.extendWith("view");var qx=be("combobox").parts("root","clearTrigger","content","control","input","item","itemGroup","itemGroupLabel","itemIndicator","itemText","label","list","positioner","trigger");qx.build();var Yx=e=>new Ji(e);Yx.empty=()=>new Ji({items:[]});var UP=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`combobox:${e.id}:control`},GP=e=>{var t;return((t=e.ids)==null?void 0:t.input)??`combobox:${e.id}:input`},qP=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`combobox:${e.id}:content`},YP=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`combobox:${e.id}:popper`},KP=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`combobox:${e.id}:toggle-btn`},XP=e=>{var t;return((t=e.ids)==null?void 0:t.clearTrigger)??`combobox:${e.id}:clear-btn`},jo=e=>e.getById(qP(e)),_a=e=>e.getById(GP(e)),Pm=e=>e.getById(YP(e)),Am=e=>e.getById(UP(e)),es=e=>e.getById(KP(e)),Rm=e=>e.getById(XP(e)),wr=(e,t)=>{if(t==null)return null;const n=`[role=option][data-value="${CSS.escape(t)}"]`;return G0(jo(e),n)},Dm=e=>{const t=_a(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})},ZP=e=>{const t=es(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})},{guards:JP,createMachine:QP,choose:eA}=Mu(),{and:ut,not:qt}=JP;QP({props({props:e}){return{loopFocus:!0,openOnClick:!1,defaultValue:[],defaultInputValue:"",closeOnSelect:!e.multiple,allowCustomValue:!1,alwaysSubmitOnEnter:!1,inputBehavior:"none",selectionBehavior:e.multiple?"clear":"replace",openOnKeyPress:!0,openOnChange:!0,composite:!0,navigate({node:t}){B0(t)},collection:Yx.empty(),...e,positioning:{placement:"bottom",sameWidth:!0,...e.positioning},translations:{triggerLabel:"Toggle suggestions",clearTriggerLabel:"Clear value",...e.translations}}},initialState({prop:e}){return e("open")||e("defaultOpen")?"suggesting":"idle"},context({prop:e,bindable:t,getContext:n,getEvent:o}){return{currentPlacement:t(()=>({defaultValue:void 0})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:bt,hash(i){return i.join(",")},onChange(i){var a;const r=n(),s=r.get("selectedItems"),l=e("collection"),c=i.map(u=>s.find(d=>l.getItemValue(d)===u)||l.find(u));r.set("selectedItems",c),(a=e("onValueChange"))==null||a({value:i,items:c})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(i){var a;const r=e("collection").find(i);(a=e("onHighlightChange"))==null||a({highlightedValue:i,highlightedItem:r})}})),inputValue:t(()=>{let i=e("inputValue")||e("defaultInputValue");const a=e("value")||e("defaultValue");if(!i.trim()&&!e("multiple")){const r=e("collection").stringifyMany(a);i=Bt(e("selectionBehavior"),{preserve:i||r,replace:r,clear:""})}return{defaultValue:i,value:e("inputValue"),onChange(r){var s;const l=o(),c=(l.previousEvent||l).src;(s=e("onInputValueChange"))==null||s({inputValue:r,reason:c})}}}),highlightedItem:t(()=>{const i=e("highlightedValue");return{defaultValue:e("collection").find(i)}}),selectedItems:t(()=>{const i=e("value")||e("defaultValue")||[];return{defaultValue:e("collection").findMany(i)}})}},computed:{isInputValueEmpty:({context:e})=>e.get("inputValue").length===0,isInteractive:({prop:e})=>!(e("readOnly")||e("disabled")),autoComplete:({prop:e})=>e("inputBehavior")==="autocomplete",autoHighlight:({prop:e})=>e("inputBehavior")==="autohighlight",hasSelectedItems:({context:e})=>e.get("value").length>0,valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems")),isCustomValue:({context:e,computed:t})=>e.get("inputValue")!==t("valueAsString")},watch({context:e,prop:t,track:n,action:o,send:i}){n([()=>e.hash("value")],()=>{o(["syncSelectedItems"])}),n([()=>e.get("inputValue")],()=>{o(["syncInputValue"])}),n([()=>e.get("highlightedValue")],()=>{o(["syncHighlightedItem","autofillInputValue"])}),n([()=>t("open")],()=>{o(["toggleVisibility"])}),n([()=>t("collection").toString()],()=>{i({type:"CHILDREN_CHANGE"})})},on:{"SELECTED_ITEMS.SYNC":{actions:["syncSelectedItems"]},"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedValue"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedValue"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setValue"]},"INPUT_VALUE.SET":{actions:["setInputValue"]},"POSITIONING.SET":{actions:["reposition"]}},entry:eA([{guard:"autoFocus",actions:["setInitialFocus"]}]),states:{idle:{tags:["idle","closed"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":{target:"interacting"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{target:"focused",actions:["clearInputValue","clearSelectedItems","setInitialFocus"]}}},focused:{tags:["focused","closed"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":[{guard:"isChangeEvent",target:"suggesting"},{target:"interacting"}],"INPUT.CHANGE":[{guard:ut("isOpenControlled","openOnChange"),actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{guard:"openOnChange",target:"suggesting",actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{actions:["setInputValue"]}],"LAYER.INTERACT_OUTSIDE":{target:"idle"},"INPUT.ESCAPE":{guard:ut("isCustomValue",qt("allowCustomValue")),actions:["revertInputValue"]},"INPUT.BLUR":{target:"idle"},"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_DOWN":[{guard:ut("isOpenControlled","autoComplete"),actions:["invokeOnOpen"]},{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{guard:"isOpenControlled",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_UP":[{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{target:"interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{actions:["clearInputValue","clearSelectedItems"]}}},interacting:{tags:["open","focused"],entry:["setInitialFocus"],effects:["scrollToHighlightedItem","trackDismissableLayer","trackPlacement","hideOtherElements"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["setFinalFocus"]},{target:"idle"}],CHILDREN_CHANGE:[{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{actions:["scrollToHighlightedItem"]}],"INPUT.HOME":{actions:["highlightFirstItem"]},"INPUT.END":{actions:["highlightLastItem"]},"INPUT.ARROW_DOWN":[{guard:ut("autoComplete","isLastItemHighlighted"),actions:["clearHighlightedValue","scrollContentToTop"]},{actions:["highlightNextItem"]}],"INPUT.ARROW_UP":[{guard:ut("autoComplete","isFirstItemHighlighted"),actions:["clearHighlightedValue"]},{actions:["highlightPrevItem"]}],"INPUT.ENTER":[{guard:ut("isOpenControlled","isCustomValue",qt("hasHighlightedItem"),qt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:ut("isCustomValue",qt("hasHighlightedItem"),qt("allowCustomValue")),target:"focused",actions:["revertInputValue","invokeOnClose"]},{guard:ut("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"INPUT.CHANGE":[{guard:"autoComplete",target:"suggesting",actions:["setInputValue"]},{target:"suggesting",actions:["clearHighlightedValue","setInputValue"]}],"ITEM.POINTER_MOVE":{actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"ITEM.CLICK":[{guard:ut("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],"LAYER.ESCAPE":[{guard:ut("isOpenControlled","autoComplete"),actions:["syncInputValue","invokeOnClose"]},{guard:"autoComplete",target:"focused",actions:["syncInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"LAYER.INTERACT_OUTSIDE":[{guard:ut("isOpenControlled","isCustomValue",qt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:ut("isCustomValue",qt("allowCustomValue")),target:"idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]}},suggesting:{tags:["open","focused"],effects:["trackDismissableLayer","scrollToHighlightedItem","trackPlacement","hideOtherElements"],entry:["setInitialFocus"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["setFinalFocus"]},{target:"idle"}],CHILDREN_CHANGE:[{guard:"autoHighlight",actions:["highlightFirstItem"]},{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]}],"INPUT.ARROW_DOWN":{target:"interacting",actions:["highlightNextItem"]},"INPUT.ARROW_UP":{target:"interacting",actions:["highlightPrevItem"]},"INPUT.HOME":{target:"interacting",actions:["highlightFirstItem"]},"INPUT.END":{target:"interacting",actions:["highlightLastItem"]},"INPUT.ENTER":[{guard:ut("isOpenControlled","isCustomValue",qt("hasHighlightedItem"),qt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:ut("isCustomValue",qt("hasHighlightedItem"),qt("allowCustomValue")),target:"focused",actions:["revertInputValue","invokeOnClose"]},{guard:ut("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"INPUT.CHANGE":{actions:["setInputValue"]},"LAYER.ESCAPE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"ITEM.POINTER_MOVE":{target:"interacting",actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"LAYER.INTERACT_OUTSIDE":[{guard:ut("isOpenControlled","isCustomValue",qt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:ut("isCustomValue",qt("allowCustomValue")),target:"idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"ITEM.CLICK":[{guard:ut("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]}}},implementations:{guards:{isInputValueEmpty:({computed:e})=>e("isInputValueEmpty"),autoComplete:({computed:e,prop:t})=>e("autoComplete")&&!t("multiple"),autoHighlight:({computed:e})=>e("autoHighlight"),isFirstItemHighlighted:({prop:e,context:t})=>e("collection").firstValue===t.get("highlightedValue"),isLastItemHighlighted:({prop:e,context:t})=>e("collection").lastValue===t.get("highlightedValue"),isCustomValue:({computed:e})=>e("isCustomValue"),allowCustomValue:({prop:e})=>!!e("allowCustomValue"),hasHighlightedItem:({context:e})=>e.get("highlightedValue")!=null,closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>e("open")!=null,openOnChange:({prop:e,context:t})=>{const n=e("openOnChange");return s$(n)?n:!!(n!=null&&n({inputValue:t.get("inputValue")}))},restoreFocus:({event:e})=>e.restoreFocus==null?!0:!!e.restoreFocus,isChangeEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="INPUT.CHANGE"},autoFocus:({prop:e})=>!!e("autoFocus"),isHighlightedItemRemoved:({prop:e,context:t})=>!e("collection").has(t.get("highlightedValue"))},effects:{trackDismissableLayer({send:e,prop:t,scope:n}){return t("disableLayer")?void 0:nr(()=>jo(n),{type:"listbox",defer:!0,exclude:()=>[_a(n),es(n),Rm(n)],onFocusOutside:t("onFocusOutside"),onPointerDownOutside:t("onPointerDownOutside"),onInteractOutside:t("onInteractOutside"),onEscapeKeyDown(o){o.preventDefault(),o.stopPropagation(),e({type:"LAYER.ESCAPE",src:"escape-key"})},onDismiss(){e({type:"LAYER.INTERACT_OUTSIDE",src:"interact-outside",restoreFocus:!1})}})},hideOtherElements({scope:e}){return IT([_a(e),jo(e),es(e),Rm(e)])},trackPlacement({context:e,prop:t,scope:n}){const o=()=>Am(n)||es(n),i=()=>Pm(n);return e.set("currentPlacement",t("positioning").placement),on(o,i,{...t("positioning"),defer:!0,onComplete(a){e.set("currentPlacement",a.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n,event:o}){const i=_a(n);let a=[];const r=c=>{const u=o.current().type.includes("POINTER"),d=e.get("highlightedValue");if(u||!d)return;const h=jo(n),p=t("scrollToIndexFn");if(p){const b=t("collection").indexOf(d);p({index:b,immediate:c,getElement:()=>wr(n,d)});return}const m=wr(n,d),f=de(()=>{$s(m,{rootEl:h,block:"nearest"})});a.push(f)},s=de(()=>r(!0));a.push(s);const l=Ws(i,{attributes:["aria-activedescendant"],callback:()=>r(!1)});return a.push(l),()=>{a.forEach(c=>c())}}},actions:{reposition({context:e,prop:t,scope:n,event:o}){on(()=>Am(n),()=>Pm(n),{...t("positioning"),...o.options,defer:!0,listeners:!1,onComplete(i){e.set("currentPlacement",i.placement)}})},setHighlightedValue({context:e,event:t}){t.value!=null&&e.set("highlightedValue",t.value)},clearHighlightedValue({context:e}){e.set("highlightedValue",null)},selectHighlightedItem(e){var t;const{context:n,prop:o}=e,i=o("collection"),a=n.get("highlightedValue");if(!a||!i.has(a))return;const r=o("multiple")?zi(n.get("value"),a):[a];(t=o("onSelect"))==null||t({value:r,itemValue:a}),n.set("value",r);const s=Bt(o("selectionBehavior"),{preserve:n.get("inputValue"),replace:i.stringifyMany(r),clear:""});n.set("inputValue",s)},scrollToHighlightedItem({context:e,prop:t,scope:n}){Pu(()=>{const o=e.get("highlightedValue");if(o==null)return;const i=wr(n,o),a=jo(n),r=t("scrollToIndexFn");if(r){const s=t("collection").indexOf(o);r({index:s,immediate:!0,getElement:()=>wr(n,o)});return}$s(i,{rootEl:a,block:"nearest"})})},selectItem(e){const{context:t,event:n,flush:o,prop:i}=e;n.value!=null&&o(()=>{var a;const r=i("multiple")?zi(t.get("value"),n.value):[n.value];(a=i("onSelect"))==null||a({value:r,itemValue:n.value}),t.set("value",r);const s=Bt(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany(r),clear:""});t.set("inputValue",s)})},clearItem(e){const{context:t,event:n,flush:o,prop:i}=e;n.value!=null&&o(()=>{const a=Ni(t.get("value"),n.value);t.set("value",a);const r=Bt(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany(a),clear:""});t.set("inputValue",r)})},setInitialFocus({scope:e}){de(()=>{Dm(e)})},setFinalFocus({scope:e}){de(()=>{const t=es(e);t?.dataset.focusable==null?Dm(e):ZP(e)})},syncInputValue({context:e,scope:t,event:n}){const o=_a(t);o&&(o.value=e.get("inputValue"),queueMicrotask(()=>{n.current().type!=="INPUT.CHANGE"&&zk(o)}))},setInputValue({context:e,event:t}){e.set("inputValue",t.value)},clearInputValue({context:e}){e.set("inputValue","")},revertInputValue({context:e,prop:t,computed:n}){const o=t("selectionBehavior"),i=Bt(o,{replace:n("hasSelectedItems")?n("valueAsString"):"",preserve:e.get("inputValue"),clear:""});e.set("inputValue",i)},setValue(e){const{context:t,flush:n,event:o,prop:i}=e;n(()=>{t.set("value",o.value);const a=Bt(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany(o.value),clear:""});t.set("inputValue",a)})},clearSelectedItems(e){const{context:t,flush:n,prop:o}=e;n(()=>{t.set("value",[]);const i=Bt(o("selectionBehavior"),{preserve:t.get("inputValue"),replace:o("collection").stringifyMany([]),clear:""});t.set("inputValue",i)})},scrollContentToTop({prop:e,scope:t}){const n=e("scrollToIndexFn");if(n){const o=e("collection").firstValue;n({index:0,immediate:!0,getElement:()=>wr(t,o)})}else{const o=jo(t);if(!o)return;o.scrollTop=0}},invokeOnOpen({prop:e,event:t}){var n;const o=Vm(t);(n=e("onOpenChange"))==null||n({open:!0,reason:o})},invokeOnClose({prop:e,event:t}){var n;const o=Vm(t);(n=e("onOpenChange"))==null||n({open:!1,reason:o})},highlightFirstItem({context:e,prop:t,scope:n}){(jo(n)?queueMicrotask:de)(()=>{const o=t("collection").firstValue;o&&e.set("highlightedValue",o)})},highlightFirstItemIfNeeded({computed:e,action:t}){e("autoHighlight")&&t(["highlightFirstItem"])},highlightLastItem({context:e,prop:t,scope:n}){(jo(n)?queueMicrotask:de)(()=>{const o=t("collection").lastValue;o&&e.set("highlightedValue",o)})},highlightNextItem({context:e,prop:t}){let n=null;const o=e.get("highlightedValue"),i=t("collection");o?(n=i.getNextValue(o),!n&&t("loopFocus")&&(n=i.firstValue)):n=i.firstValue,n&&e.set("highlightedValue",n)},highlightPrevItem({context:e,prop:t}){let n=null;const o=e.get("highlightedValue"),i=t("collection");o?(n=i.getPreviousValue(o),!n&&t("loopFocus")&&(n=i.lastValue)):n=i.lastValue,n&&e.set("highlightedValue",n)},highlightFirstSelectedItem({context:e,prop:t}){de(()=>{const[n]=t("collection").sort(e.get("value"));n&&e.set("highlightedValue",n)})},highlightFirstOrSelectedItem({context:e,prop:t,computed:n}){de(()=>{let o=null;n("hasSelectedItems")?o=t("collection").sort(e.get("value"))[0]:o=t("collection").firstValue,o&&e.set("highlightedValue",o)})},highlightLastOrSelectedItem({context:e,prop:t,computed:n}){de(()=>{const o=t("collection");let i=null;n("hasSelectedItems")?i=o.sort(e.get("value"))[0]:i=o.lastValue,i&&e.set("highlightedValue",i)})},autofillInputValue({context:e,computed:t,prop:n,event:o,scope:i}){const a=_a(i),r=n("collection");if(!t("autoComplete")||!a||!o.keypress)return;const s=r.stringify(e.get("highlightedValue"));de(()=>{a.value=s||e.get("inputValue")})},syncSelectedItems(e){queueMicrotask(()=>{const{context:t,prop:n}=e,o=n("collection"),i=t.get("value"),a=i.map(s=>t.get("selectedItems").find(l=>o.getItemValue(l)===s)||o.find(s));t.set("selectedItems",a);const r=Bt(n("selectionBehavior"),{preserve:t.get("inputValue"),replace:o.stringifyMany(i),clear:""});t.set("inputValue",r)})},syncHighlightedItem({context:e,prop:t}){const n=t("collection").find(e.get("highlightedValue"));e.set("highlightedItem",n)},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}});function Vm(e){return(e.previousEvent||e).src}ie()(["allowCustomValue","autoFocus","closeOnSelect","collection","composite","defaultHighlightedValue","defaultInputValue","defaultOpen","defaultValue","dir","disabled","disableLayer","form","getRootNode","highlightedValue","id","ids","inputBehavior","inputValue","invalid","loopFocus","multiple","name","navigate","onFocusOutside","onHighlightChange","onInputValueChange","onInteractOutside","onOpenChange","onOpenChange","onPointerDownOutside","onSelect","onValueChange","open","openOnChange","openOnClick","openOnKeyPress","placeholder","positioning","readOnly","required","scrollToIndexFn","selectionBehavior","translations","value","alwaysSubmitOnEnter"]);ie()(["htmlFor"]);ie()(["id"]);ie()(["item","persistFocus"]);qx.extendWith("empty");function Ed(e,t){return e-t*Math.floor(e/t)}const Kx=1721426;function Sl(e,t,n,o){t=yf(e,t);let i=t-1,a=-2;return n<=2?a=0:wc(t)&&(a=-1),Kx-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+o)}function wc(e){return e%4===0&&(e%100!==0||e%400===0)}function yf(e,t){return e==="BC"?1-t:t}function tA(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const nA={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};let ja=class{fromJulianDay(t){let n=t,o=n-Kx,i=Math.floor(o/146097),a=Ed(o,146097),r=Math.floor(a/36524),s=Ed(a,36524),l=Math.floor(s/1461),c=Ed(s,1461),u=Math.floor(c/365),d=i*400+r*100+l*4+u+(r!==4&&u!==4?1:0),[h,p]=tA(d),m=n-Sl(h,p,1,1),f=2;n<Sl(h,p,3,1)?f=0:wc(p)&&(f=1);let b=Math.floor(((m+f)*12+373)/367),v=n-Sl(h,p,b,1)+1;return new iu(h,p,b,v)}toJulianDay(t){return Sl(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return nA[wc(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return wc(t.year)?366:365}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}};const oA={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function Qi(e,t){return t=Qt(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function iA(e,t){return t=Qt(t,e.calendar),e=_o(e),t=_o(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function aA(e,t){return t=Qt(t,e.calendar),e=Ps(e),t=Ps(t),e.era===t.era&&e.year===t.year}function rA(e,t){return Gu(e.calendar,t.calendar)&&Qi(e,t)}function sA(e,t){return Gu(e.calendar,t.calendar)&&iA(e,t)}function lA(e,t){return Gu(e.calendar,t.calendar)&&aA(e,t)}function Gu(e,t){var n,o,i,a;return(a=(i=(n=e.isEqual)===null||n===void 0?void 0:n.call(e,t))!==null&&i!==void 0?i:(o=t.isEqual)===null||o===void 0?void 0:o.call(t,e))!==null&&a!==void 0?a:e.identifier===t.identifier}function cA(e,t){return Qi(e,qu(t))}const uA={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Xx(e,t,n){let o=e.calendar.toJulianDay(e),i=n?uA[n]:pA(t),a=Math.ceil(o+1-i)%7;return a<0&&(a+=7),a}function Zx(e){return Co(Date.now(),e)}function qu(e){return Li(Zx(e))}function Jx(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function dA(e,t){return Mm(e)-Mm(t)}function Mm(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let Td=null;function xf(){return Td==null&&(Td=new Intl.DateTimeFormat().resolvedOptions().timeZone),Td}function _o(e){return e.subtract({days:e.day-1})}function Ah(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function Ps(e){return _o(e.subtract({months:e.month-1}))}function hA(e){return Ah(e.add({months:e.calendar.getMonthsInYear(e)-e.month}))}function As(e,t,n){let o=Xx(e,t,n);return e.subtract({days:o})}function Nm(e,t,n){return As(e,t,n).add({days:6})}const Lm=new Map,Od=new Map;function Qx(e){if(Intl.Locale){let n=Lm.get(e);return n||(n=new Intl.Locale(e).maximize().region,n&&Lm.set(e,n)),n}let t=e.split("-")[1];return t==="u"?void 0:t}function pA(e){let t=Od.get(e);if(!t){if(Intl.Locale){let o=new Intl.Locale(e);if("getWeekInfo"in o&&(t=o.getWeekInfo(),t))return Od.set(e,t),t.firstDay}let n=Qx(e);if(e.includes("-fw-")){let o=e.split("-fw-")[1].split("-")[0];o==="mon"?t={firstDay:1}:o==="tue"?t={firstDay:2}:o==="wed"?t={firstDay:3}:o==="thu"?t={firstDay:4}:o==="fri"?t={firstDay:5}:o==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:n&&oA[n]||0};Od.set(e,t)}return t.firstDay}function fA(e,t,n){let o=e.calendar.getDaysInMonth(e);return Math.ceil((Xx(_o(e),t,n)+o)/7)}function ew(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function tw(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}const gA={AF:[4,5],AE:[5,6],BH:[5,6],DZ:[5,6],EG:[5,6],IL:[5,6],IQ:[5,6],IR:[5,5],JO:[5,6],KW:[5,6],LY:[5,6],OM:[5,6],QA:[5,6],SA:[5,6],SD:[5,6],SY:[5,6],YE:[5,6]};function mA(e,t){let n=e.calendar.toJulianDay(e),o=Math.ceil(n+1)%7;o<0&&(o+=7);let i=Qx(t),[a,r]=gA[i]||[6,0];return o===a||o===r}function Wa(e){e=Qt(e,new ja);let t=yf(e.era,e.year);return nw(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function nw(e,t,n,o,i,a,r){let s=new Date;return s.setUTCHours(o,i,a,r),s.setUTCFullYear(e,t-1,n),s.getTime()}function Rh(e,t){if(t==="UTC")return 0;if(e>0&&t===xf())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:o,day:i,hour:a,minute:r,second:s}=ow(e,t);return nw(n,o,i,a,r,s,0)-Math.floor(e/1e3)*1e3}const Fm=new Map;function ow(e,t){let n=Fm.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Fm.set(t,n));let o=n.formatToParts(new Date(e)),i={};for(let a of o)a.type!=="literal"&&(i[a.type]=a.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}const Bm=864e5;function vA(e,t,n,o){return(n===o?[n]:[n,o]).filter(i=>bA(e,t,i))}function bA(e,t,n){let o=ow(n,t);return e.year===o.year&&e.month===o.month&&e.day===o.day&&e.hour===o.hour&&e.minute===o.minute&&e.second===o.second}function yo(e,t,n="compatible"){let o=Wi(e);if(t==="UTC")return Wa(o);if(t===xf()&&n==="compatible"){o=Qt(o,new ja);let l=new Date,c=yf(o.era,o.year);return l.setFullYear(c,o.month-1,o.day),l.setHours(o.hour,o.minute,o.second,o.millisecond),l.getTime()}let i=Wa(o),a=Rh(i-Bm,t),r=Rh(i+Bm,t),s=vA(o,t,i-a,i-r);if(s.length===1)return s[0];if(s.length>1)switch(n){case"compatible":case"earlier":return s[0];case"later":return s[s.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(i-a,i-r);case"compatible":case"later":return Math.max(i-a,i-r);case"reject":throw new RangeError("No such absolute time found")}}function iw(e,t,n="compatible"){return new Date(yo(e,t,n))}function Co(e,t){let n=Rh(e,t),o=new Date(e+n),i=o.getUTCFullYear(),a=o.getUTCMonth()+1,r=o.getUTCDate(),s=o.getUTCHours(),l=o.getUTCMinutes(),c=o.getUTCSeconds(),u=o.getUTCMilliseconds();return new hw(i<1?"BC":"AD",i<1?-i+1:i,a,r,t,n,s,l,c,u)}function Li(e){return new iu(e.calendar,e.era,e.year,e.month,e.day)}function Wi(e,t){let n=0,o=0,i=0,a=0;if("timeZone"in e)({hour:n,minute:o,second:i,millisecond:a}=e);else if("hour"in e)return e;return new VA(e.calendar,e.era,e.year,e.month,e.day,n,o,i,a)}function Qt(e,t){if(Gu(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),o=e.copy();return o.calendar=t,o.era=n.era,o.year=n.year,o.month=n.month,o.day=n.day,Ui(o),o}function yA(e,t,n){if(e instanceof hw)return e.timeZone===t?e:wA(e,t);let o=yo(e,t,n);return Co(o,t)}function xA(e){let t=Wa(e)-e.offset;return new Date(t)}function wA(e,t){let n=Wa(e)-e.offset;return Qt(Co(n,t),e.calendar)}const _r=36e5;function Yu(e,t){let n=e.copy(),o="hour"in n?SA(n,t):0;Dh(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,Vh(n),aw(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=o,_A(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){var a,r;let l=(a=(r=n.calendar).isInverseEra)===null||a===void 0?void 0:a.call(r,n);n.year=i,n.month=l?1:n.calendar.getMonthsInYear(n),n.day=l?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let s=n.calendar.getMonthsInYear(n);return n.month>s&&(n.month=s,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function Dh(e,t){var n,o;!((n=(o=e.calendar).isInverseEra)===null||n===void 0)&&n.call(o,e)&&(t=-t),e.year+=t}function Vh(e){for(;e.month<1;)Dh(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Dh(e,1)}function _A(e){for(;e.day<1;)e.month--,Vh(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,Vh(e)}function aw(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Ui(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),aw(e)}function rw(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function sw(e,t){return Yu(e,rw(t))}function wf(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),Ui(n),n}function ou(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),kA(n),n}function CA(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=$l(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=$l(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=$l(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=$l(e.hour,24),t}function kA(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function $l(e,t){let n=e%t;return n<0&&(n+=t),n}function SA(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,CA(e)}function _f(e,t,n,o){let i=e.copy();switch(t){case"era":{let s=e.calendar.getEras(),l=s.indexOf(e.era);if(l<0)throw new Error("Invalid era: "+e.era);l=ko(l,n,0,s.length-1,o?.round),i.era=s[l],Ui(i);break}case"year":var a,r;!((a=(r=i.calendar).isInverseEra)===null||a===void 0)&&a.call(r,i)&&(n=-n),i.year=ko(e.year,n,-1/0,9999,o?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=ko(e.month,n,1,e.calendar.getMonthsInYear(e),o?.round);break;case"day":i.day=ko(e.day,n,1,e.calendar.getDaysInMonth(e),o?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),Ui(i),i}function lw(e,t,n,o){let i=e.copy();switch(t){case"hour":{let a=e.hour,r=0,s=23;if(o?.hourCycle===12){let l=a>=12;r=l?12:0,s=l?23:11}i.hour=ko(a,n,r,s,o?.round);break}case"minute":i.minute=ko(e.minute,n,0,59,o?.round);break;case"second":i.second=ko(e.second,n,0,59,o?.round);break;case"millisecond":i.millisecond=ko(e.millisecond,n,0,999,o?.round);break;default:throw new Error("Unsupported field "+t)}return i}function ko(e,t,n,o,i=!1){if(i){e+=Math.sign(t),e<n&&(e=o);let a=Math.abs(t);t>0?e=Math.ceil(e/a)*a:e=Math.floor(e/a)*a,e>o&&(e=n)}else e+=t,e<n?e=o-(n-e-1):e>o&&(e=n+(e-o-1));return e}function cw(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let i=Yu(Wi(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=yo(i,e.timeZone)}else n=Wa(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let o=Co(n,e.timeZone);return Qt(o,e.calendar)}function $A(e,t){return cw(e,rw(t))}function EA(e,t,n,o){switch(t){case"hour":{let i=0,a=23;if(o?.hourCycle===12){let m=e.hour>=12;i=m?12:0,a=m?23:11}let r=Wi(e),s=Qt(ou(r,{hour:i}),new ja),l=[yo(s,e.timeZone,"earlier"),yo(s,e.timeZone,"later")].filter(m=>Co(m,e.timeZone).day===s.day)[0],c=Qt(ou(r,{hour:a}),new ja),u=[yo(c,e.timeZone,"earlier"),yo(c,e.timeZone,"later")].filter(m=>Co(m,e.timeZone).day===c.day).pop(),d=Wa(e)-e.offset,h=Math.floor(d/_r),p=d%_r;return d=ko(h,n,Math.floor(l/_r),Math.floor(u/_r),o?.round)*_r+p,Qt(Co(d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return lw(e,t,n,o);case"era":case"year":case"month":case"day":{let i=_f(Wi(e),t,n,o),a=yo(i,e.timeZone);return Qt(Co(a,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function TA(e,t,n){let o=Wi(e),i=ou(wf(o,t),t);if(i.compare(o)===0)return e;let a=yo(i,e.timeZone,n);return Qt(Co(a,e.timeZone),e.calendar)}function OA(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function uw(e){let t=Qt(e,new ja),n;return t.era==="BC"?n=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):n=String(t.year).padStart(4,"0"),`${n}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function dw(e){return`${uw(e)}T${OA(e)}`}function IA(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let n=Math.floor(e/36e5),o=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),a=`${t}${String(n).padStart(2,"0")}:${String(o).padStart(2,"0")}`;return i!==0&&(a+=`:${String(i).padStart(2,"0")}`),a}function PA(e){return`${dw(e)}${IA(e.offset)}[${e.timeZone}]`}function AA(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Cf(e,t,n){AA(e,t),t.set(e,n)}function kf(e){let t=typeof e[0]=="object"?e.shift():new ja,n;if(typeof e[0]=="string")n=e.shift();else{let r=t.getEras();n=r[r.length-1]}let o=e.shift(),i=e.shift(),a=e.shift();return[t,n,o,i,a]}var RA=new WeakMap;let iu=class Mh{copy(){return this.era?new Mh(this.calendar,this.era,this.year,this.month,this.day):new Mh(this.calendar,this.year,this.month,this.day)}add(t){return Yu(this,t)}subtract(t){return sw(this,t)}set(t){return wf(this,t)}cycle(t,n,o){return _f(this,t,n,o)}toDate(t){return iw(this,t)}toString(){return uw(this)}compare(t){return Jx(this,t)}constructor(...t){Cf(this,RA,{writable:!0,value:void 0});let[n,o,i,a,r]=kf(t);this.calendar=n,this.era=o,this.year=i,this.month=a,this.day=r,Ui(this)}};var DA=new WeakMap;let VA=class Nh{copy(){return this.era?new Nh(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Nh(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return Yu(this,t)}subtract(t){return sw(this,t)}set(t){return wf(ou(this,t),t)}cycle(t,n,o){switch(t){case"era":case"year":case"month":case"day":return _f(this,t,n,o);default:return lw(this,t,n,o)}}toDate(t,n){return iw(this,t,n)}toString(){return dw(this)}compare(t){let n=Jx(this,t);return n===0?dA(this,Wi(t)):n}constructor(...t){Cf(this,DA,{writable:!0,value:void 0});let[n,o,i,a,r]=kf(t);this.calendar=n,this.era=o,this.year=i,this.month=a,this.day=r,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Ui(this)}};var MA=new WeakMap;let hw=class Lh{copy(){return this.era?new Lh(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new Lh(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return cw(this,t)}subtract(t){return $A(this,t)}set(t,n){return TA(this,t,n)}cycle(t,n,o){return EA(this,t,n,o)}toDate(){return xA(this)}toString(){return PA(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-yA(t,this.timeZone).toDate().getTime()}constructor(...t){Cf(this,MA,{writable:!0,value:void 0});let[n,o,i,a,r]=kf(t),s=t.shift(),l=t.shift();this.calendar=n,this.era=o,this.year=i,this.month=a,this.day=r,this.timeZone=s,this.offset=l,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Ui(this)}},Id=new Map,to=class{format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,n){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.formatter.format(t)} – ${this.formatter.format(n)}`}formatRangeToParts(t,n){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let o=this.formatter.formatToParts(t),i=this.formatter.formatToParts(n);return[...o.map(a=>({...a,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(a=>({...a,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return FA()&&(this.resolvedHourCycle||(this.resolvedHourCycle=BA(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}constructor(t,n={}){this.formatter=pw(t,n),this.options=n}};const NA={true:{ja:"h11"},false:{}};function pw(e,t={}){if(typeof t.hour12=="boolean"&&LA()){t={...t};let i=NA[String(t.hour12)][e.split("-")[0]],a=t.hour12?"h12":"h23";t.hourCycle=i??a,delete t.hour12}let n=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[0]?-1:1).join():"");if(Id.has(n))return Id.get(n);let o=new Intl.DateTimeFormat(e,t);return Id.set(n,o),o}let Pd=null;function LA(){return Pd==null&&(Pd=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Pd}let Ad=null;function FA(){return Ad==null&&(Ad=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Ad}function BA(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let n=pw(e,{...t,timeZone:void 0}),o=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(a=>a.type==="hour").value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(a=>a.type==="hour").value,10);if(o===0&&i===23)return"h23";if(o===24&&i===23)return"h24";if(o===0&&i===11)return"h11";if(o===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}function zA(e,t,n,o,i){const a={};for(let s in t){const l=s,c=t[l];c!=null&&(a[l]=Math.floor(c/2),a[l]>0&&c%2===0&&a[l]--)}const r=ea(e,t,n).subtract(a);return el(e,r,t,n,o,i)}function ea(e,t,n,o,i){let a=e;return t.years?a=Ps(e):t.months?a=_o(e):t.weeks&&(a=As(e,n)),el(e,a,t,n,o,i)}function Sf(e,t,n,o,i){let a={...t};a.days?a.days--:a.weeks?a.weeks--:a.months?a.months--:a.years&&a.years--;let r=ea(e,t,n).subtract(a);return el(e,r,t,n,o,i)}function el(e,t,n,o,i,a){return i&&e.compare(i)>=0&&(t=tw(t,ea(Li(i),n,o))),a&&e.compare(a)<=0&&(t=ew(t,Sf(Li(a),n,o))),t}function An(e,t,n){let o=Li(e);return t&&(o=tw(o,Li(t))),n&&(o=ew(o,Li(n))),o}function zm(e,t,n,o,i,a){switch(t){case"start":return ea(e,n,o,i,a);case"end":return Sf(e,n,o,i,a);case"center":default:return zA(e,n,o,i,a)}}function Jt(e,t){return t!=null&&Qi(e,t)}function Hm(e,t,n,o,i){return e?t!=null&&t(e,n)?!0:Xn(e,o,i):!1}function Xn(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function HA(e,t,n){const o=e.subtract({days:1});return Qi(o,e)||Xn(o,t,n)}function jA(e,t,n){const o=e.add({days:1});return Qi(o,e)||Xn(o,t,n)}function $f(e){let t={...e};for(let n in t)t[n]=1;return t}function fw(e,t){let n={...t};return n.days?n.days--:n.days=-1,e.add(n)}function gw(e){return e?.calendar.identifier==="gregory"&&e.era==="BC"?"short":void 0}function mw(e,t){const n=Wi(qu(t));return new to(e,{weekday:"long",month:"long",year:"numeric",day:"numeric",era:gw(n),timeZone:t})}function jm(e,t){const n=qu(t);return new to(e,{month:"long",year:"numeric",era:gw(n),calendar:n?.calendar.identifier,timeZone:t})}function WA(e,t,n,o,i){let a=n.formatRangeToParts(e.toDate(i),t.toDate(i)),r=-1;for(let c=0;c<a.length;c++){let u=a[c];if(u.source==="shared"&&u.type==="literal")r=c;else if(u.source==="endRange")break}let s="",l="";for(let c=0;c<a.length;c++)c<r?s+=a[c].value:c>r&&(l+=a[c].value);return o(s,l)}function UA(e,t,n,o){let i=e,a=e,r=mw(n,o);return Qi(i,a)?r.format(i.toDate(o)):WA(i,a,r,(s,l)=>`${s} – ${l}`,o)}var GA=["sun","mon","tue","wed","thu","fri","sat"];function vw(e){return e!=null?GA[e]:void 0}function bw(e,t,n){const o=vw(n);return As(e,t,o)}function yw(e,t,n,o){const i=t.add({weeks:e}),a=[];let r=bw(i,n,o);for(;a.length<7;){a.push(r);let s=r.add({days:1});if(Qi(r,s))break;r=s}return a}function qA(e,t,n,o){const i=vw(o),a=n??fA(e,t,i);return[...new Array(a).keys()].map(r=>yw(r,e,t,o))}function YA(e,t){const n=new to(e,{weekday:"long",timeZone:t}),o=new to(e,{weekday:"short",timeZone:t}),i=new to(e,{weekday:"narrow",timeZone:t});return a=>{const r=a instanceof Date?a:a.toDate(t);return{value:a,short:o.format(r),long:n.format(r),narrow:i.format(r)}}}function KA(e,t,n,o){const i=bw(e,o,t),a=[...new Array(7).keys()],r=YA(o,n);return a.map(s=>r(i.add({days:s})))}function XA(e,t="long"){const n=new Date(2021,0,1),o=[];for(let i=0;i<12;i++)o.push(n.toLocaleString(e,{month:t})),n.setMonth(n.getMonth()+1);return o}function ZA(e){const t=[];for(let n=e.from;n<=e.to;n+=1)t.push(n);return t}var JA=10;function QA(e){if(e){if(e.length===3)return e.padEnd(4,"0");if(e.length===2){const t=new Date().getFullYear(),n=Math.floor(t/100)*100,o=parseInt(e.slice(-2),10),i=n+o;return i>t+JA?(i-100).toString():i.toString()}return e}}function ps(e,t){const n=t!=null&&t.strict?10:12,o=e-e%10,i=[];for(let a=0;a<n;a+=1){const r=o+a;i.push(r)}return i}function Aa(e){return qu(e??xf())}function tl(e,t,n,o){return function(i){const{startDate:a,focusedDate:r}=i,s=fw(a,e);return Xn(r,n,o)?{startDate:a,focusedDate:An(r,n,o),endDate:s}:r.compare(a)<0?{startDate:Sf(r,e,t,n,o),focusedDate:An(r,n,o),endDate:s}:r.compare(s)>0?{startDate:ea(r,e,t,n,o),endDate:s,focusedDate:An(r,n,o)}:{startDate:a,endDate:s,focusedDate:An(r,n,o)}}}function xw(e,t,n,o,i,a){const r=tl(n,o,i,a),s=t.add(n);return r({focusedDate:e.add(n),startDate:ea(el(e,s,n,o,i,a),n,o)})}function ww(e,t,n,o,i,a){const r=tl(n,o,i,a);let s=t.subtract(n);return r({focusedDate:e.subtract(n),startDate:ea(el(e,s,n,o,i,a),n,o)})}function eR(e,t,n,o,i,a,r){const s=tl(o,i,a,r);if(!n&&!o.days)return s({focusedDate:e.add($f(o)),startDate:t});if(o.days)return xw(e,t,o,i,a,r);if(o.weeks)return s({focusedDate:e.add({months:1}),startDate:t});if(o.months||o.years)return s({focusedDate:e.add({years:1}),startDate:t})}function tR(e,t,n,o,i,a,r){const s=tl(o,i,a,r);if(!n&&!o.days)return s({focusedDate:e.subtract($f(o)),startDate:t});if(o.days)return ww(e,t,o,i,a,r);if(o.weeks)return s({focusedDate:e.subtract({months:1}),startDate:t});if(o.months||o.years)return s({focusedDate:e.subtract({years:1}),startDate:t})}var Wm=e=>e!=null&&e.length===4,nR=e=>e!=null&&parseFloat(e)<=12,oR=e=>e!=null&&parseFloat(e)<=31;function iR(e,t,n){const o=aR(t,n);let{year:i,month:a,day:r}=rR(o,e)??{};if(i!=null||a!=null||r!=null){const l=new Date;i||(i=l.getFullYear().toString()),a||(a=(l.getMonth()+1).toString()),r||(r=l.getDate().toString())}if(Wm(i)||(i=QA(i)),Wm(i)&&nR(a)&&oR(r))return new iu(+i,+a,+r);const s=Date.parse(e);if(!isNaN(s)){const l=new Date(s);return new iu(l.getFullYear(),l.getMonth()+1,l.getDate())}}function aR(e,t){return new to(e,{day:"numeric",month:"numeric",year:"numeric",timeZone:t}).formatToParts(new Date(2e3,11,25)).map(({type:n,value:o})=>n==="literal"?`${o}?`:`((?!=<${n}>)\\d+)?`).join("")}function rR(e,t){var n;const o=t.match(e);return(n=e.toString().match(/<(.+?)>/g))==null?void 0:n.map(i=>{var a;const r=i.match(/<(.+)>/);return!r||r.length<=0?null:(a=i.match(/<(.+)>/))==null?void 0:a[1]}).reduce((i,a,r)=>(a&&(o&&o.length>r?i[a]=o[r+1]:i[a]=null),i),{})}function Um(e,t,n){const o=Li(Zx(n));switch(e){case"thisWeek":return[As(o,t),Nm(o,t)];case"thisMonth":return[_o(o),o];case"thisQuarter":return[_o(o).add({months:-((o.month-1)%3)}),o];case"thisYear":return[Ps(o),o];case"last3Days":return[o.add({days:-2}),o];case"last7Days":return[o.add({days:-6}),o];case"last14Days":return[o.add({days:-13}),o];case"last30Days":return[o.add({days:-29}),o];case"last90Days":return[o.add({days:-89}),o];case"lastMonth":return[_o(o.add({months:-1})),Ah(o.add({months:-1}))];case"lastQuarter":return[_o(o.add({months:-((o.month-1)%3)-3})),Ah(o.add({months:-((o.month-1)%3)-1}))];case"lastWeek":return[As(o,t).add({weeks:-1}),Nm(o,t).add({weeks:-1})];case"lastYear":return[Ps(o.add({years:-1})),hA(o.add({years:-1}))];default:throw new Error(`Invalid date range preset: ${e}`)}}var El="__live-region__";function _w(e={}){const{level:t="polite",document:n=document,root:o,delay:i=0}=e,a=n.defaultView??window,r=o??n.body;function s(c,u){const d=n.getElementById(El);d?.remove(),u=u??i;const h=n.createElement("span");h.id=El,h.dataset.liveAnnouncer="true";const p=t!=="assertive"?"status":"alert";h.setAttribute("aria-live",t),h.setAttribute("role",p),Object.assign(h.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"}),r.appendChild(h),a.setTimeout(()=>{h.textContent=c},u)}function l(){const c=n.getElementById(El);c?.remove()}return{announce:s,destroy:l,toJSON(){return El}}}var Cw=be("date-picker").parts("clearTrigger","content","control","input","label","monthSelect","nextTrigger","positioner","presetTrigger","prevTrigger","rangeText","root","table","tableBody","tableCell","tableCellTrigger","tableHead","tableHeader","tableRow","trigger","view","viewControl","viewTrigger","yearSelect"),Me=Cw.build(),sR=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.label)==null?void 0:o.call(n,t))??`datepicker:${e.id}:label:${t}`},lR=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`datepicker:${e.id}`},cR=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.table)==null?void 0:o.call(n,t))??`datepicker:${e.id}:table:${t}`},Fh=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`datepicker:${e.id}:content`},Rd=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.cellTrigger)==null?void 0:o.call(n,t))??`datepicker:${e.id}:cell-trigger:${t}`},uR=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.prevTrigger)==null?void 0:o.call(n,t))??`datepicker:${e.id}:prev:${t}`},dR=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.nextTrigger)==null?void 0:o.call(n,t))??`datepicker:${e.id}:next:${t}`},hR=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.viewTrigger)==null?void 0:o.call(n,t))??`datepicker:${e.id}:view:${t}`},kw=e=>{var t;return((t=e.ids)==null?void 0:t.clearTrigger)??`datepicker:${e.id}:clear`},Sw=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`datepicker:${e.id}:control`},Gm=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.input)==null?void 0:o.call(n,t))??`datepicker:${e.id}:input:${t}`},$w=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`datepicker:${e.id}:trigger`},Ew=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`datepicker:${e.id}:positioner`},Tw=e=>{var t;return((t=e.ids)==null?void 0:t.monthSelect)??`datepicker:${e.id}:month-select`},Ow=e=>{var t;return((t=e.ids)==null?void 0:t.yearSelect)??`datepicker:${e.id}:year-select`},qm=(e,t)=>G0(_c(e),`[data-part=table-cell-trigger][data-view=${t}][data-focus]:not([data-outside-range])`),Ym=e=>e.getById($w(e)),_c=e=>e.getById(Fh(e)),Cr=e=>ni(Iw(e),"[data-part=input]"),pR=e=>e.getById(Ow(e)),fR=e=>e.getById(Tw(e)),gR=e=>e.getById(kw(e)),mR=e=>e.getById(Ew(e)),Iw=e=>e.getById(Sw(e));function Bh(e){const[t,n]=e;return!t||!n||t.compare(n)<=0?e:[n,t]}function ua(e,t){const[n,o]=t;return!n||!o?!1:n.compare(e)<=0&&o.compare(e)>=0}function Tl(e){return e.slice().sort((t,n)=>t.compare(n))}function vR(e){return Bt(e,{year:"calendar decade",month:"calendar year",day:"calendar month"})}var bR={day:"dd",month:"mm",year:"yyyy"};function yR(e){return new to(e).formatToParts(new Date).map(t=>bR[t.type]??t.value).join("")}var Pw=(e,t)=>e?/\d/.test(e)||e===t||e.length!==1:!0,Km=e=>!Number.isNaN(e.day)&&!Number.isNaN(e.month)&&!Number.isNaN(e.year),xR=(e,t)=>e.split("").filter(n=>Pw(n,t)).join("");function wR(e){const t=new Intl.DateTimeFormat(e).formatToParts(new Date).find(n=>n.type==="literal");return t?t.value:"/"}var _R={dayCell(e){return e.unavailable?`Not available. ${e.formattedDate}`:e.selected?`Selected date. ${e.formattedDate}`:`Choose ${e.formattedDate}`},trigger(e){return e?"Close calendar":"Open calendar"},viewTrigger(e){return Bt(e,{year:"Switch to month view",month:"Switch to day view",day:"Switch to year view"})},presetTrigger(e){const[t="",n=""]=e;return`select ${t} to ${n}`},prevTrigger(e){return Bt(e,{year:"Switch to previous decade",month:"Switch to previous year",day:"Switch to previous month"})},nextTrigger(e){return Bt(e,{year:"Switch to next decade",month:"Switch to next year",day:"Switch to next month"})},placeholder(){return{day:"dd",month:"mm",year:"yyyy"}},content:"calendar",monthSelect:"Select month",yearSelect:"Select year",clearTrigger:"Clear selected dates"};function To(e,t){return e?e==="day"?0:e==="month"?1:2:t||0}function Ef(e){return e===0?"day":e===1?"month":"year"}function Tf(e,t,n){return Ef(vt(To(e,0),To(t,0),To(n,2)))}function CR(e,t){return To(e,0)>To(t,0)}function kR(e,t){return To(e,0)<To(t,0)}function SR(e,t,n){const o=To(e,0)+1;return Tf(Ef(o),t,n)}function $R(e,t,n){const o=To(e,0)-1;return Tf(Ef(o),t,n)}var ER=["day","month","year"];function TR(e){ER.forEach(t=>e(t))}function OR(e,t){const{state:n,context:o,prop:i,send:a,computed:r,scope:s}=e,l=o.get("startValue"),c=r("endValue"),u=o.get("value"),d=o.get("focusedValue"),h=o.get("hoveredValue"),p=h?Bh([u[0],h]):[],m=i("disabled"),f=i("readOnly"),b=r("isInteractive"),v=i("min"),y=i("max"),x=i("locale"),_=i("timeZone"),k=i("startOfWeek"),E=n.matches("focused"),P=n.matches("open"),S=i("selectionMode")==="range",R=i("isDateUnavailable"),B=o.get("currentPlacement"),A=bf({...i("positioning"),placement:B}),G=wR(x),ee={..._R,...i("translations")};function z(F=l){const H=i("fixedWeeks")?6:void 0;return qA(F,x,H,k)}function W(F={}){const{format:H}=F;return XA(x,H).map((K,ae)=>{const ye=ae+1,ke=d.set({month:ye}),Oe=Xn(ke,v,y);return{label:K,value:ye,disabled:Oe}})}function q(){return ZA({from:v?.year??1900,to:y?.year??2100}).map(F=>({label:F.toString(),value:F,disabled:!ds(F,v?.year,y?.year)}))}function ne(F){return ps(l.year).map(H=>({label:H.toString(),value:H,disabled:!ds(H,v?.year,y?.year)}))}function te(F){return Hm(F,R,x,v,y)}function le(F){const H=l??Aa(_);a({type:"FOCUS.SET",value:H.set({month:F})})}function he(F){const H=l??Aa(_);a({type:"FOCUS.SET",value:H.set({year:F})})}function ue(F){const{value:H,disabled:K}=F,ae=d.set({year:H}),ye=!ps(l.year,{strict:!0}).includes(H),ke=ds(H,v?.year,y?.year),Oe={focused:d.year===F.value,selectable:ye||ke,outsideRange:ye,selected:!!u.find(it=>it&&it.year===H),valueText:H.toString(),inRange:S&&(ua(ae,u)||ua(ae,p)),value:ae,get disabled(){return K||!Oe.selectable}};return Oe}function _e(F){const{value:H,disabled:K}=F,ae=d.set({month:H}),ye=jm(x,_),ke={focused:d.month===F.value,selectable:!Xn(ae,v,y),selected:!!u.find(Oe=>Oe&&Oe.month===H&&Oe.year===d.year),valueText:ye.format(ae.toDate(_)),inRange:S&&(ua(ae,u)||ua(ae,p)),value:ae,get disabled(){return K||!ke.selectable}};return ke}function me(F){const{value:H,disabled:K,visibleRange:ae=r("visibleRange")}=F,ye=mw(x,_),ke=$f(r("visibleDuration")),Oe=i("outsideDaySelectable"),it=ae.start.add(ke).subtract({days:1}),Z=Xn(H,ae.start,it),ce=S&&ua(H,u),re=S&&Jt(H,u[0]),xe=S&&Jt(H,u[1]),Xe=S&&p.length>0,wt=Xe&&ua(H,p),Et=Xe&&Jt(H,p[0]),Tn=Xe&&Jt(H,p[1]),Vo={invalid:Xn(H,v,y),disabled:K||!Oe&&Z||Xn(H,v,y),selected:u.some(ul=>Jt(H,ul)),unavailable:Hm(H,R,x,v,y)&&!K,outsideRange:Z,today:cA(H,_),weekend:mA(H,x),formattedDate:ye.format(H.toDate(_)),get focused(){return Jt(H,d)&&(!Vo.outsideRange||Oe)},get ariaLabel(){return ee.dayCell(Vo)},get selectable(){return!Vo.disabled&&!Vo.unavailable},inRange:ce||wt,firstInRange:re,lastInRange:xe,inHoveredRange:wt,firstInHoveredRange:Et,lastInHoveredRange:Tn};return Vo}function Te(F){const{view:H="day",id:K}=F;return[H,K].filter(Boolean).join(" ")}return{focused:E,open:P,inline:!!i("inline"),view:o.get("view"),getRangePresetValue(F){return Um(F,x,_)},getDaysInWeek(F,H=l){return yw(F,H,x,k)},getOffset(F){const H=l.add(F),K=c.add(F),ae=jm(x,_);return{visibleRange:{start:H,end:K},weeks:z(H),visibleRangeText:{start:ae.format(H.toDate(_)),end:ae.format(K.toDate(_))}}},getMonthWeeks:z,isUnavailable:te,weeks:z(),weekDays:KA(Aa(_),k,_,x),visibleRangeText:r("visibleRangeText"),value:u,valueAsDate:u.filter(F=>F!=null).map(F=>F.toDate(_)),valueAsString:r("valueAsString"),focusedValue:d,focusedValueAsDate:d?.toDate(_),focusedValueAsString:i("format")(d,{locale:x,timeZone:_}),visibleRange:r("visibleRange"),selectToday(){const F=An(Aa(_),v,y);a({type:"VALUE.SET",value:F})},setValue(F){const H=F.map(K=>An(K,v,y));a({type:"VALUE.SET",value:H})},clearValue(){a({type:"VALUE.CLEAR"})},setFocusedValue(F){a({type:"FOCUS.SET",value:F})},setOpen(F){i("inline")||n.matches("open")===F||a({type:F?"OPEN":"CLOSE"})},focusMonth:le,focusYear:he,getYears:q,getMonths:W,getYearsGrid(F={}){const{columns:H=1}=F;return Mg(ne(),H)},getDecade(){const F=ps(d.year);return{start:F.at(0),end:F.at(-1)}},getMonthsGrid(F={}){const{columns:H=1,format:K}=F;return Mg(W({format:K}),H)},format(F,H={month:"long",year:"numeric"}){return new to(x,H).format(F.toDate(_))},setView(F){a({type:"VIEW.SET",view:F})},goToNext(){a({type:"GOTO.NEXT",view:o.get("view")})},goToPrev(){a({type:"GOTO.PREV",view:o.get("view")})},getRootProps(){return t.element({...Me.root.attrs,dir:i("dir"),id:lR(s),"data-state":P?"open":"closed","data-disabled":D(m),"data-readonly":D(f)})},getLabelProps(F={}){const{index:H=0}=F;return t.label({...Me.label.attrs,id:sR(s,H),dir:i("dir"),htmlFor:Gm(s,H),"data-state":P?"open":"closed","data-index":H,"data-disabled":D(m),"data-readonly":D(f)})},getControlProps(){return t.element({...Me.control.attrs,dir:i("dir"),id:Sw(s),"data-disabled":D(m)})},getRangeTextProps(){return t.element({...Me.rangeText.attrs,dir:i("dir")})},getContentProps(){return t.element({...Me.content.attrs,hidden:!P,dir:i("dir"),"data-state":P?"open":"closed","data-placement":B,"data-inline":D(i("inline")),id:Fh(s),tabIndex:-1,role:"application","aria-roledescription":"datepicker","aria-label":ee.content})},getTableProps(F={}){const{view:H="day",columns:K=H==="day"?7:4}=F,ae=Te(F);return t.element({...Me.table.attrs,role:"grid","data-columns":K,"aria-roledescription":vR(H),id:cR(s,ae),"aria-readonly":Je(f),"aria-disabled":Je(m),"aria-multiselectable":Je(i("selectionMode")!=="single"),"data-view":H,dir:i("dir"),tabIndex:-1,onKeyDown(ye){if(ye.defaultPrevented)return;const ke={Enter(){H==="day"&&te(d)||H==="month"&&!_e({value:d.month}).selectable||H==="year"&&!ue({value:d.year}).selectable||a({type:"TABLE.ENTER",view:H,columns:K,focus:!0})},ArrowLeft(){a({type:"TABLE.ARROW_LEFT",view:H,columns:K,focus:!0})},ArrowRight(){a({type:"TABLE.ARROW_RIGHT",view:H,columns:K,focus:!0})},ArrowUp(){a({type:"TABLE.ARROW_UP",view:H,columns:K,focus:!0})},ArrowDown(){a({type:"TABLE.ARROW_DOWN",view:H,columns:K,focus:!0})},PageUp(Oe){a({type:"TABLE.PAGE_UP",larger:Oe.shiftKey,view:H,columns:K,focus:!0})},PageDown(Oe){a({type:"TABLE.PAGE_DOWN",larger:Oe.shiftKey,view:H,columns:K,focus:!0})},Home(){a({type:"TABLE.HOME",view:H,columns:K,focus:!0})},End(){a({type:"TABLE.END",view:H,columns:K,focus:!0})}}[Ss(ye,{dir:i("dir")})];ke&&(ke(ye),ye.preventDefault(),ye.stopPropagation())},onPointerLeave(){a({type:"TABLE.POINTER_LEAVE"})},onPointerDown(){a({type:"TABLE.POINTER_DOWN",view:H})},onPointerUp(){a({type:"TABLE.POINTER_UP",view:H})}})},getTableHeadProps(F={}){const{view:H="day"}=F;return t.element({...Me.tableHead.attrs,"aria-hidden":!0,dir:i("dir"),"data-view":H,"data-disabled":D(m)})},getTableHeaderProps(F={}){const{view:H="day"}=F;return t.element({...Me.tableHeader.attrs,dir:i("dir"),"data-view":H,"data-disabled":D(m)})},getTableBodyProps(F={}){const{view:H="day"}=F;return t.element({...Me.tableBody.attrs,"data-view":H,"data-disabled":D(m)})},getTableRowProps(F={}){const{view:H="day"}=F;return t.element({...Me.tableRow.attrs,"aria-disabled":Je(m),"data-disabled":D(m),"data-view":H})},getDayTableCellState:me,getDayTableCellProps(F){const{value:H}=F,K=me(F);return t.element({...Me.tableCell.attrs,role:"gridcell","aria-disabled":Je(!K.selectable),"aria-selected":K.selected||K.inRange,"aria-invalid":Je(K.invalid),"aria-current":K.today?"date":void 0,"data-value":H.toString()})},getDayTableCellTriggerProps(F){const{value:H}=F,K=me(F);return t.element({...Me.tableCellTrigger.attrs,id:Rd(s,H.toString()),role:"button",dir:i("dir"),tabIndex:K.focused?0:-1,"aria-label":K.ariaLabel,"aria-disabled":Je(!K.selectable),"aria-invalid":Je(K.invalid),"data-disabled":D(!K.selectable),"data-selected":D(K.selected),"data-value":H.toString(),"data-view":"day","data-today":D(K.today),"data-focus":D(K.focused),"data-unavailable":D(K.unavailable),"data-range-start":D(K.firstInRange),"data-range-end":D(K.lastInRange),"data-in-range":D(K.inRange),"data-outside-range":D(K.outsideRange),"data-weekend":D(K.weekend),"data-in-hover-range":D(K.inHoveredRange),"data-hover-range-start":D(K.firstInHoveredRange),"data-hover-range-end":D(K.lastInHoveredRange),onClick(ae){ae.defaultPrevented||K.selectable&&a({type:"CELL.CLICK",cell:"day",value:H})},onPointerMove:S?ae=>{if(ae.pointerType==="touch"||!K.selectable)return;const ye=!s.isActiveElement(ae.currentTarget);h&&rA(H,h)||a({type:"CELL.POINTER_MOVE",cell:"day",value:H,focus:ye})}:void 0})},getMonthTableCellState:_e,getMonthTableCellProps(F){const{value:H,columns:K}=F,ae=_e(F);return t.element({...Me.tableCell.attrs,dir:i("dir"),colSpan:K,role:"gridcell","aria-selected":Je(ae.selected||ae.inRange),"data-selected":D(ae.selected),"aria-disabled":Je(!ae.selectable),"data-value":H})},getMonthTableCellTriggerProps(F){const{value:H}=F,K=_e(F);return t.element({...Me.tableCellTrigger.attrs,dir:i("dir"),role:"button",id:Rd(s,H.toString()),"data-selected":D(K.selected),"aria-disabled":Je(!K.selectable),"data-disabled":D(!K.selectable),"data-focus":D(K.focused),"data-in-range":D(K.inRange),"data-outside-range":D(K.outsideRange),"aria-label":K.valueText,"data-view":"month","data-value":H,tabIndex:K.focused?0:-1,onClick(ae){ae.defaultPrevented||K.selectable&&a({type:"CELL.CLICK",cell:"month",value:H})},onPointerMove:S?ae=>{if(ae.pointerType==="touch"||!K.selectable)return;const ye=!s.isActiveElement(ae.currentTarget);h&&K.value&&sA(K.value,h)||a({type:"CELL.POINTER_MOVE",cell:"month",value:K.value,focus:ye})}:void 0})},getYearTableCellState:ue,getYearTableCellProps(F){const{value:H,columns:K}=F,ae=ue(F);return t.element({...Me.tableCell.attrs,dir:i("dir"),colSpan:K,role:"gridcell","aria-selected":Je(ae.selected),"data-selected":D(ae.selected),"aria-disabled":Je(!ae.selectable),"data-value":H})},getYearTableCellTriggerProps(F){const{value:H}=F,K=ue(F);return t.element({...Me.tableCellTrigger.attrs,dir:i("dir"),role:"button",id:Rd(s,H.toString()),"data-selected":D(K.selected),"data-focus":D(K.focused),"data-in-range":D(K.inRange),"aria-disabled":Je(!K.selectable),"data-disabled":D(!K.selectable),"aria-label":K.valueText,"data-outside-range":D(K.outsideRange),"data-value":H,"data-view":"year",tabIndex:K.focused?0:-1,onClick(ae){ae.defaultPrevented||K.selectable&&a({type:"CELL.CLICK",cell:"year",value:H})},onPointerMove:S?ae=>{if(ae.pointerType==="touch"||!K.selectable)return;const ye=!s.isActiveElement(ae.currentTarget);h&&K.value&&lA(K.value,h)||a({type:"CELL.POINTER_MOVE",cell:"year",value:K.value,focus:ye})}:void 0})},getNextTriggerProps(F={}){const{view:H="day"}=F,K=m||!r("isNextVisibleRangeValid");return t.button({...Me.nextTrigger.attrs,dir:i("dir"),id:dR(s,H),type:"button","aria-label":ee.nextTrigger(H),disabled:K,"data-disabled":D(K),onClick(ae){ae.defaultPrevented||a({type:"GOTO.NEXT",view:H})}})},getPrevTriggerProps(F={}){const{view:H="day"}=F,K=m||!r("isPrevVisibleRangeValid");return t.button({...Me.prevTrigger.attrs,dir:i("dir"),id:uR(s,H),type:"button","aria-label":ee.prevTrigger(H),disabled:K,"data-disabled":D(K),onClick(ae){ae.defaultPrevented||a({type:"GOTO.PREV",view:H})}})},getClearTriggerProps(){return t.button({...Me.clearTrigger.attrs,id:kw(s),dir:i("dir"),type:"button","aria-label":ee.clearTrigger,hidden:!u.length,onClick(F){F.defaultPrevented||a({type:"VALUE.CLEAR"})}})},getTriggerProps(){return t.button({...Me.trigger.attrs,id:$w(s),dir:i("dir"),type:"button","data-placement":B,"aria-label":ee.trigger(P),"aria-controls":Fh(s),"data-state":P?"open":"closed","aria-haspopup":"grid",disabled:m,onClick(F){F.defaultPrevented||b&&a({type:"TRIGGER.CLICK"})}})},getViewProps(F={}){const{view:H="day"}=F;return t.element({...Me.view.attrs,"data-view":H,hidden:o.get("view")!==H})},getViewTriggerProps(F={}){const{view:H="day"}=F;return t.button({...Me.viewTrigger.attrs,"data-view":H,dir:i("dir"),id:hR(s,H),type:"button",disabled:m,"aria-label":ee.viewTrigger(H),onClick(K){K.defaultPrevented||b&&a({type:"VIEW.TOGGLE",src:"viewTrigger"})}})},getViewControlProps(F={}){const{view:H="day"}=F;return t.element({...Me.viewControl.attrs,"data-view":H,dir:i("dir")})},getInputProps(F={}){const{index:H=0,fixOnBlur:K=!0}=F;return t.input({...Me.input.attrs,id:Gm(s,H),autoComplete:"off",autoCorrect:"off",spellCheck:"false",dir:i("dir"),name:i("name"),"data-index":H,"data-state":P?"open":"closed",readOnly:f,disabled:m,placeholder:i("placeholder")||yR(x),defaultValue:r("valueAsString")[H],onBeforeInput(ae){const{data:ye}=I0(ae);Pw(ye,G)||ae.preventDefault()},onFocus(){a({type:"INPUT.FOCUS",index:H})},onBlur(ae){const ye=ae.currentTarget.value.trim();a({type:"INPUT.BLUR",value:ye,index:H,fixOnBlur:K})},onKeyDown(ae){if(ae.defaultPrevented||!b)return;const ye={Enter(ke){ks(ke)||te(d)||ke.currentTarget.value.trim()!==""&&a({type:"INPUT.ENTER",value:ke.currentTarget.value,index:H})}}[ae.key];ye&&(ye(ae),ae.preventDefault())},onInput(ae){const ye=ae.currentTarget.value;a({type:"INPUT.CHANGE",value:xR(ye,G),index:H})}})},getMonthSelectProps(){return t.select({...Me.monthSelect.attrs,id:Tw(s),"aria-label":ee.monthSelect,disabled:m,dir:i("dir"),defaultValue:l.month,onChange(F){le(Number(F.currentTarget.value))}})},getYearSelectProps(){return t.select({...Me.yearSelect.attrs,id:Ow(s),disabled:m,"aria-label":ee.yearSelect,dir:i("dir"),defaultValue:l.year,onChange(F){he(Number(F.currentTarget.value))}})},getPositionerProps(){return t.element({id:Ew(s),...Me.positioner.attrs,dir:i("dir"),style:A.floating})},getPresetTriggerProps(F){const H=Array.isArray(F.value)?F.value:Um(F.value,x,_),K=H.filter(ae=>ae!=null).map(ae=>ae.toDate(_).toDateString());return t.button({...Me.presetTrigger.attrs,"aria-label":ee.presetTrigger(K),type:"button",onClick(ae){ae.defaultPrevented||a({type:"PRESET.CLICK",value:H})}})}}}var{and:dn}=Ct();function IR(e,t){if(e?.length!==t?.length)return!1;const n=Math.max(e.length,t.length);for(let o=0;o<n;o++)if(!Jt(e[o],t[o]))return!1;return!0}function Ol(e,t){return e.map(n=>t("format")(n,{locale:t("locale"),timeZone:t("timeZone")}))}var PR={props({props:e}){const t=e.locale||"en-US",n=e.timeZone||"UTC",o=e.selectionMode||"single",i=e.numOfMonths||1,a=e.defaultValue?Tl(e.defaultValue).map(d=>An(d,e.min,e.max)):void 0,r=e.value?Tl(e.value).map(d=>An(d,e.min,e.max)):void 0;let s=e.focusedValue||e.defaultFocusedValue||r?.[0]||a?.[0]||Aa(n);s=An(s,e.min,e.max);const l="day",c="year",u=Tf(e.view||l,l,c);return{locale:t,numOfMonths:i,timeZone:n,selectionMode:o,defaultView:u,minView:l,maxView:c,outsideDaySelectable:!1,closeOnSelect:!0,format(d,{locale:h,timeZone:p}){return new to(h,{timeZone:p,day:"2-digit",month:"2-digit",year:"numeric"}).format(d.toDate(p))},parse(d,{locale:h,timeZone:p}){return iR(d,h,p)},...e,focusedValue:typeof e.focusedValue>"u"?void 0:s,defaultFocusedValue:s,value:r,defaultValue:a??[],positioning:{placement:"bottom",...e.positioning}}},initialState({prop:e}){return e("open")||e("defaultOpen")||e("inline")?"open":"idle"},refs(){return{announcer:void 0}},context({prop:e,bindable:t,getContext:n}){return{focusedValue:t(()=>({defaultValue:e("defaultFocusedValue"),value:e("focusedValue"),isEqual:Jt,hash:o=>o.toString(),sync:!0,onChange(o){var i;const a=n(),r=a.get("view"),s=a.get("value"),l=Ol(s,e);(i=e("onFocusChange"))==null||i({value:s,valueAsString:l,view:r,focusedValue:o})}})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:IR,hash:o=>o.map(i=>i.toString()).join(","),onChange(o){var i;const a=n(),r=Ol(o,e);(i=e("onValueChange"))==null||i({value:o,valueAsString:r,view:a.get("view")})}})),inputValue:t(()=>({defaultValue:""})),activeIndex:t(()=>({defaultValue:0,sync:!0})),hoveredValue:t(()=>({defaultValue:null,isEqual:(o,i)=>i!==null&&o!==null&&Jt(o,i)})),view:t(()=>({defaultValue:e("defaultView"),value:e("view"),onChange(o){var i;(i=e("onViewChange"))==null||i({view:o})}})),startValue:t(()=>{const o=e("focusedValue")||e("defaultFocusedValue");return{defaultValue:zm(o,"start",{months:e("numOfMonths")},e("locale")),isEqual:Jt,hash:i=>i.toString()}}),currentPlacement:t(()=>({defaultValue:void 0})),restoreFocus:t(()=>({defaultValue:!1}))}},computed:{isInteractive:({prop:e})=>!e("disabled")&&!e("readOnly"),visibleDuration:({prop:e})=>({months:e("numOfMonths")}),endValue:({context:e,computed:t})=>fw(e.get("startValue"),t("visibleDuration")),visibleRange:({context:e,computed:t})=>({start:e.get("startValue"),end:t("endValue")}),visibleRangeText({context:e,prop:t,computed:n}){const o=t("timeZone"),i=new to(t("locale"),{month:"long",year:"numeric",timeZone:o}),a=i.format(e.get("startValue").toDate(o)),r=i.format(n("endValue").toDate(o)),s=t("selectionMode")==="range"?`${a} - ${r}`:a;return{start:a,end:r,formatted:s}},isPrevVisibleRangeValid:({context:e,prop:t})=>!HA(e.get("startValue"),t("min"),t("max")),isNextVisibleRangeValid:({prop:e,computed:t})=>!jA(t("endValue"),e("min"),e("max")),valueAsString:({context:e,prop:t})=>Ol(e.get("value"),t)},effects:["setupLiveRegion"],watch({track:e,prop:t,context:n,action:o,computed:i}){e([()=>t("locale")],()=>{o(["setStartValue"])}),e([()=>n.hash("focusedValue")],()=>{o(["setStartValue","focusActiveCellIfNeeded","setHoveredValueIfKeyboard"])}),e([()=>n.hash("startValue")],()=>{o(["syncMonthSelectElement","syncYearSelectElement"])}),e([()=>n.get("inputValue")],()=>{o(["syncInputValue"])}),e([()=>n.hash("value")],()=>{o(["syncInputElement"])}),e([()=>i("valueAsString").toString()],()=>{o(["announceValueText"])}),e([()=>n.get("view")],()=>{o(["focusActiveCell"])}),e([()=>t("open")],()=>{o(["toggleVisibility"])})},on:{"VALUE.SET":{actions:["setDateValue","setFocusedDate"]},"VIEW.SET":{actions:["setView"]},"FOCUS.SET":{actions:["setFocusedDate"]},"VALUE.CLEAR":{actions:["clearDateValue","clearFocusedDate","focusFirstInputElement"]},"INPUT.CHANGE":[{guard:"isInputValueEmpty",actions:["setInputValue","clearDateValue","clearFocusedDate"]},{actions:["setInputValue","focusParsedDate"]}],"INPUT.ENTER":{actions:["focusParsedDate","selectFocusedDate"]},"INPUT.FOCUS":{actions:["setActiveIndex"]},"INPUT.BLUR":[{guard:"shouldFixOnBlur",actions:["setActiveIndexToStart","selectParsedDate"]},{actions:["setActiveIndexToStart"]}],"PRESET.CLICK":[{guard:"isOpenControlled",actions:["setDateValue","setFocusedDate","invokeOnClose"]},{target:"focused",actions:["setDateValue","setFocusedDate","focusInputElement"]}],"GOTO.NEXT":[{guard:"isYearView",actions:["focusNextDecade","announceVisibleRange"]},{guard:"isMonthView",actions:["focusNextYear","announceVisibleRange"]},{actions:["focusNextPage"]}],"GOTO.PREV":[{guard:"isYearView",actions:["focusPreviousDecade","announceVisibleRange"]},{guard:"isMonthView",actions:["focusPreviousYear","announceVisibleRange"]},{actions:["focusPreviousPage"]}]},states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open",actions:["focusFirstSelectedDate","focusActiveCell"]},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}]}},focused:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open",actions:["focusFirstSelectedDate","focusActiveCell"]},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}]}},open:{tags:["open"],effects:["trackDismissableElement","trackPositioning"],exit:["clearHoveredDate","resetView"],on:{"CONTROLLED.CLOSE":[{guard:dn("shouldRestoreFocus","isInteractOutsideEvent"),target:"focused",actions:["focusTriggerElement"]},{guard:"shouldRestoreFocus",target:"focused",actions:["focusInputElement"]},{target:"idle"}],"CELL.CLICK":[{guard:"isAboveMinView",actions:["setFocusedValueForView","setPreviousView"]},{guard:dn("isRangePicker","hasSelectedRange"),actions:["setActiveIndexToStart","resetSelection","setActiveIndexToEnd"]},{guard:dn("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","setRestoreFocus"]},{guard:dn("isRangePicker","isSelectingEndDate","closeOnSelect"),target:"focused",actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","focusInputElement"]},{guard:dn("isRangePicker","isSelectingEndDate"),actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate"]},{guard:"isRangePicker",actions:["setFocusedDate","setSelectedDate","setActiveIndexToEnd"]},{guard:"isMultiPicker",actions:["setFocusedDate","toggleSelectedDate"]},{guard:dn("closeOnSelect","isOpenControlled"),actions:["setFocusedDate","setSelectedDate","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["setFocusedDate","setSelectedDate","invokeOnClose","focusInputElement"]},{actions:["setFocusedDate","setSelectedDate"]}],"CELL.POINTER_MOVE":{guard:dn("isRangePicker","isSelectingEndDate"),actions:["setHoveredDate","setFocusedDate"]},"TABLE.POINTER_LEAVE":{guard:"isRangePicker",actions:["clearHoveredDate"]},"TABLE.POINTER_DOWN":{actions:["disableTextSelection"]},"TABLE.POINTER_UP":{actions:["enableTextSelection"]},"TABLE.ESCAPE":[{guard:"isOpenControlled",actions:["focusFirstSelectedDate","invokeOnClose"]},{target:"focused",actions:["focusFirstSelectedDate","invokeOnClose","focusTriggerElement"]}],"TABLE.ENTER":[{guard:"isAboveMinView",actions:["setPreviousView"]},{guard:dn("isRangePicker","hasSelectedRange"),actions:["setActiveIndexToStart","clearDateValue","setSelectedDate","setActiveIndexToEnd"]},{guard:dn("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose"]},{guard:dn("isRangePicker","isSelectingEndDate","closeOnSelect"),target:"focused",actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","focusInputElement"]},{guard:dn("isRangePicker","isSelectingEndDate"),actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate"]},{guard:"isRangePicker",actions:["setSelectedDate","setActiveIndexToEnd","focusNextDay"]},{guard:"isMultiPicker",actions:["toggleSelectedDate"]},{guard:dn("closeOnSelect","isOpenControlled"),actions:["selectFocusedDate","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectFocusedDate","invokeOnClose","focusInputElement"]},{actions:["selectFocusedDate"]}],"TABLE.ARROW_RIGHT":[{guard:"isMonthView",actions:["focusNextMonth"]},{guard:"isYearView",actions:["focusNextYear"]},{actions:["focusNextDay","setHoveredDate"]}],"TABLE.ARROW_LEFT":[{guard:"isMonthView",actions:["focusPreviousMonth"]},{guard:"isYearView",actions:["focusPreviousYear"]},{actions:["focusPreviousDay"]}],"TABLE.ARROW_UP":[{guard:"isMonthView",actions:["focusPreviousMonthColumn"]},{guard:"isYearView",actions:["focusPreviousYearColumn"]},{actions:["focusPreviousWeek"]}],"TABLE.ARROW_DOWN":[{guard:"isMonthView",actions:["focusNextMonthColumn"]},{guard:"isYearView",actions:["focusNextYearColumn"]},{actions:["focusNextWeek"]}],"TABLE.PAGE_UP":{actions:["focusPreviousSection"]},"TABLE.PAGE_DOWN":{actions:["focusNextSection"]},"TABLE.HOME":[{guard:"isMonthView",actions:["focusFirstMonth"]},{guard:"isYearView",actions:["focusFirstYear"]},{actions:["focusSectionStart"]}],"TABLE.END":[{guard:"isMonthView",actions:["focusLastMonth"]},{guard:"isYearView",actions:["focusLastYear"]},{actions:["focusSectionEnd"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"VIEW.TOGGLE":{actions:["setNextView"]},INTERACT_OUTSIDE:[{guard:"isOpenControlled",actions:["setActiveIndexToStart","invokeOnClose"]},{guard:"shouldRestoreFocus",target:"focused",actions:["setActiveIndexToStart","invokeOnClose","focusTriggerElement"]},{target:"idle",actions:["setActiveIndexToStart","invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["setActiveIndexToStart","invokeOnClose"]},{target:"idle",actions:["setActiveIndexToStart","invokeOnClose"]}]}}},implementations:{guards:{isAboveMinView:({context:e,prop:t})=>CR(e.get("view"),t("minView")),isDayView:({context:e,event:t})=>(t.view||e.get("view"))==="day",isMonthView:({context:e,event:t})=>(t.view||e.get("view"))==="month",isYearView:({context:e,event:t})=>(t.view||e.get("view"))==="year",isRangePicker:({prop:e})=>e("selectionMode")==="range",hasSelectedRange:({context:e})=>e.get("value").length===2,isMultiPicker:({prop:e})=>e("selectionMode")==="multiple",shouldRestoreFocus:({context:e})=>!!e.get("restoreFocus"),isSelectingEndDate:({context:e})=>e.get("activeIndex")===1,closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>e("open")!=null||!!e("inline"),isInteractOutsideEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="INTERACT_OUTSIDE"},isInputValueEmpty:({event:e})=>e.value.trim()==="",shouldFixOnBlur:({event:e})=>!!e.fixOnBlur},effects:{trackPositioning({context:e,prop:t,scope:n}){if(t("inline"))return;e.get("currentPlacement")||e.set("currentPlacement",t("positioning").placement);const o=Iw(n);return on(o,()=>mR(n),{...t("positioning"),defer:!0,onComplete(i){e.set("currentPlacement",i.placement)}})},setupLiveRegion({scope:e,refs:t}){const n=e.getDoc();return t.set("announcer",_w({level:"assertive",document:n})),()=>{var o,i;return(i=(o=t.get("announcer"))==null?void 0:o.destroy)==null?void 0:i.call(o)}},trackDismissableElement({scope:e,send:t,context:n,prop:o}){return o("inline")?void 0:nr(()=>_c(e),{type:"popover",defer:!0,exclude:[...Cr(e),Ym(e),gR(e)],onInteractOutside(i){n.set("restoreFocus",!i.detail.focusable)},onDismiss(){t({type:"INTERACT_OUTSIDE"})},onEscapeKeyDown(i){i.preventDefault(),t({type:"TABLE.ESCAPE",src:"dismissable"})}})}},actions:{setNextView({context:e,prop:t}){const n=SR(e.get("view"),t("minView"),t("maxView"));e.set("view",n)},setPreviousView({context:e,prop:t}){const n=$R(e.get("view"),t("minView"),t("maxView"));e.set("view",n)},setView({context:e,event:t}){e.set("view",t.view)},setRestoreFocus({context:e}){e.set("restoreFocus",!0)},announceValueText({context:e,prop:t,refs:n}){var o;const i=e.get("value").map(a=>UA(a,null,t("locale"),t("timeZone")));(o=n.get("announcer"))==null||o.announce(i.join(","),3e3)},announceVisibleRange({computed:e,refs:t}){var n;const{formatted:o}=e("visibleRangeText");(n=t.get("announcer"))==null||n.announce(o)},disableTextSelection({scope:e}){Wp({target:_c(e),doc:e.getDoc()})},enableTextSelection({scope:e}){j0({doc:e.getDoc(),target:_c(e)})},focusFirstSelectedDate(e){const{context:t}=e;t.get("value").length&&He(e,t.get("value")[0])},syncInputElement({scope:e,computed:t}){de(()=>{Cr(e).forEach((n,o)=>{Rn(n,t("valueAsString")[o]||"")})})},setFocusedDate(e){const{event:t}=e,n=Array.isArray(t.value)?t.value[0]:t.value;He(e,n)},setFocusedValueForView(e){const{context:t,event:n}=e;He(e,t.get("focusedValue").set({[t.get("view")]:n.value}))},focusNextMonth(e){const{context:t}=e;He(e,t.get("focusedValue").add({months:1}))},focusPreviousMonth(e){const{context:t}=e;He(e,t.get("focusedValue").subtract({months:1}))},setDateValue({context:e,event:t,prop:n}){if(!Array.isArray(t.value))return;const o=t.value.map(i=>An(i,n("min"),n("max")));e.set("value",o)},clearDateValue({context:e}){e.set("value",[])},setSelectedDate(e){const{context:t,event:n}=e,o=Array.from(t.get("value"));o[t.get("activeIndex")]=Cc(e,n.value??t.get("focusedValue")),t.set("value",Bh(o))},resetSelection(e){const{context:t,event:n}=e,o=Cc(e,n.value??t.get("focusedValue"));t.set("value",[o])},toggleSelectedDate(e){const{context:t,event:n}=e,o=Cc(e,n.value??t.get("focusedValue")),i=t.get("value").findIndex(a=>Jt(a,o));if(i===-1){const a=[...t.get("value"),o];t.set("value",Tl(a))}else{const a=Array.from(t.get("value"));a.splice(i,1),t.set("value",Tl(a))}},setHoveredDate({context:e,event:t}){e.set("hoveredValue",t.value)},clearHoveredDate({context:e}){e.set("hoveredValue",null)},selectFocusedDate({context:e,computed:t}){const n=Array.from(e.get("value")),o=e.get("activeIndex");n[o]=e.get("focusedValue").copy(),e.set("value",Bh(n));const i=t("valueAsString");e.set("inputValue",i[o])},focusPreviousDay(e){const{context:t}=e,n=t.get("focusedValue").subtract({days:1});He(e,n)},focusNextDay(e){const{context:t}=e,n=t.get("focusedValue").add({days:1});He(e,n)},focusPreviousWeek(e){const{context:t}=e,n=t.get("focusedValue").subtract({weeks:1});He(e,n)},focusNextWeek(e){const{context:t}=e,n=t.get("focusedValue").add({weeks:1});He(e,n)},focusNextPage(e){const{context:t,computed:n,prop:o}=e,i=xw(t.get("focusedValue"),t.get("startValue"),n("visibleDuration"),o("locale"),o("min"),o("max"));Il(e,i)},focusPreviousPage(e){const{context:t,computed:n,prop:o}=e,i=ww(t.get("focusedValue"),t.get("startValue"),n("visibleDuration"),o("locale"),o("min"),o("max"));Il(e,i)},focusSectionStart(e){const{context:t}=e;He(e,t.get("startValue").copy())},focusSectionEnd(e){const{computed:t}=e;He(e,t("endValue").copy())},focusNextSection(e){const{context:t,event:n,computed:o,prop:i}=e,a=eR(t.get("focusedValue"),t.get("startValue"),n.larger,o("visibleDuration"),i("locale"),i("min"),i("max"));a&&Il(e,a)},focusPreviousSection(e){const{context:t,event:n,computed:o,prop:i}=e,a=tR(t.get("focusedValue"),t.get("startValue"),n.larger,o("visibleDuration"),i("locale"),i("min"),i("max"));a&&Il(e,a)},focusNextYear(e){const{context:t}=e,n=t.get("focusedValue").add({years:1});He(e,n)},focusPreviousYear(e){const{context:t}=e,n=t.get("focusedValue").subtract({years:1});He(e,n)},focusNextDecade(e){const{context:t}=e,n=t.get("focusedValue").add({years:10});He(e,n)},focusPreviousDecade(e){const{context:t}=e,n=t.get("focusedValue").subtract({years:10});He(e,n)},clearFocusedDate(e){const{prop:t}=e;He(e,Aa(t("timeZone")))},focusPreviousMonthColumn(e){const{context:t,event:n}=e,o=t.get("focusedValue").subtract({months:n.columns});He(e,o)},focusNextMonthColumn(e){const{context:t,event:n}=e,o=t.get("focusedValue").add({months:n.columns});He(e,o)},focusPreviousYearColumn(e){const{context:t,event:n}=e,o=t.get("focusedValue").subtract({years:n.columns});He(e,o)},focusNextYearColumn(e){const{context:t,event:n}=e,o=t.get("focusedValue").add({years:n.columns});He(e,o)},focusFirstMonth(e){const{context:t}=e,n=t.get("focusedValue").set({month:1});He(e,n)},focusLastMonth(e){const{context:t}=e,n=t.get("focusedValue").set({month:12});He(e,n)},focusFirstYear(e){const{context:t}=e,n=ps(t.get("focusedValue").year),o=t.get("focusedValue").set({year:n[0]});He(e,o)},focusLastYear(e){const{context:t}=e,n=ps(t.get("focusedValue").year),o=t.get("focusedValue").set({year:n[n.length-1]});He(e,o)},setActiveIndex({context:e,event:t}){e.set("activeIndex",t.index)},setActiveIndexToEnd({context:e}){e.set("activeIndex",1)},setActiveIndexToStart({context:e}){e.set("activeIndex",0)},focusActiveCell({scope:e,context:t}){de(()=>{var n;const o=t.get("view");(n=qm(e,o))==null||n.focus({preventScroll:!0})})},focusActiveCellIfNeeded({scope:e,context:t,event:n}){n.focus&&de(()=>{var o;const i=t.get("view");(o=qm(e,i))==null||o.focus({preventScroll:!0})})},setHoveredValueIfKeyboard({context:e,event:t,prop:n}){!t.type.startsWith("TABLE.ARROW")||n("selectionMode")!=="range"||e.get("activeIndex")===0||e.set("hoveredValue",e.get("focusedValue").copy())},focusTriggerElement({scope:e}){de(()=>{var t;(t=Ym(e))==null||t.focus({preventScroll:!0})})},focusFirstInputElement({scope:e}){de(()=>{const[t]=Cr(e);t?.focus({preventScroll:!0})})},focusInputElement({scope:e}){de(()=>{const t=Cr(e),n=t.findLastIndex(a=>a.value!==""),o=Math.max(n,0),i=t[o];i?.focus({preventScroll:!0}),i?.setSelectionRange(i.value.length,i.value.length)})},syncMonthSelectElement({scope:e,context:t}){const n=fR(e);Rn(n,t.get("startValue").month.toString())},syncYearSelectElement({scope:e,context:t}){const n=pR(e);Rn(n,t.get("startValue").year.toString())},setInputValue({context:e,event:t}){e.get("activeIndex")===t.index&&e.set("inputValue",t.value)},syncInputValue({scope:e,context:t,event:n}){queueMicrotask(()=>{const o=Cr(e),i=n.index??t.get("activeIndex");Rn(o[i],t.get("inputValue"))})},focusParsedDate(e){const{event:t,prop:n}=e;if(t.index==null)return;const o=n("parse")(t.value,{locale:n("locale"),timeZone:n("timeZone")});!o||!Km(o)||He(e,o)},selectParsedDate({context:e,event:t,prop:n}){if(t.index==null)return;let o=n("parse")(t.value,{locale:n("locale"),timeZone:n("timeZone")});if((!o||!Km(o))&&t.value&&(o=e.get("focusedValue").copy()),!o)return;o=An(o,n("min"),n("max"));const i=Array.from(e.get("value"));i[t.index]=o,e.set("value",i);const a=Ol(i,n);e.set("inputValue",a[t.index])},resetView({context:e}){e.set("view",e.initial("view"))},setStartValue({context:e,computed:t,prop:n}){const o=e.get("focusedValue");if(!Xn(o,e.get("startValue"),t("endValue")))return;const i=zm(o,"start",{months:n("numOfMonths")},n("locale"));e.set("startValue",i)},invokeOnOpen({prop:e}){var t;e("inline")||(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose({prop:e}){var t;e("inline")||(t=e("onOpenChange"))==null||t({open:!1})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}},Cc=(e,t)=>{const{context:n,prop:o}=e,i=n.get("view");let a=typeof t=="number"?n.get("focusedValue").set({[i]:t}):t;return TR(r=>{kR(r,o("minView"))&&(a=a.set({[r]:r==="day"?1:0}))}),a};function He(e,t){const{context:n,prop:o,computed:i}=e;if(!t)return;const a=Cc(e,t);if(Jt(n.get("focusedValue"),a))return;const r=tl(i("visibleDuration"),o("locale"),o("min"),o("max"))({focusedDate:a,startDate:n.get("startValue")});n.set("startValue",r.startDate),n.set("focusedValue",r.focusedDate)}function Il(e,t){const{context:n}=e;n.set("startValue",t.startDate);const o=n.get("focusedValue");Jt(o,t.focusedDate)||n.set("focusedValue",t.focusedDate)}ie()(["closeOnSelect","dir","disabled","fixedWeeks","focusedValue","format","parse","placeholder","getRootNode","id","ids","inline","isDateUnavailable","locale","max","min","name","numOfMonths","onFocusChange","onOpenChange","onValueChange","onViewChange","open","defaultOpen","positioning","readOnly","selectionMode","startOfWeek","timeZone","translations","value","defaultView","defaultValue","view","defaultFocusedValue","outsideDaySelectable","minView","maxView"]);ie()(["index","fixOnBlur"]);ie()(["value"]);ie()(["columns","id","view"]);ie()(["disabled","value","columns"]);ie()(["view"]);const[Aw,qe]=Re("DatePickerContext"),AR=O({__name:"date-picker-clear-trigger",props:{asChild:{type:Boolean}},setup(e){const t=qe();return Y(),(n,o)=>(w(),$(g(X).button,U(g(t).getClearTriggerProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),RR=O({__name:"date-picker-content",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=ef(),o=I(()=>Gs(t.value.getContentProps(),n.value.presenceProps));return Y(),(i,a)=>g(n).unmounted?oe("",!0):(w(),$(g(X).div,U({key:0},o.value,{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),DR=O({__name:"date-picker-context",setup(e){const t=qe();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),VR=O({__name:"date-picker-control",props:{asChild:{type:Boolean}},setup(e){const t=qe();return Y(),(n,o)=>(w(),$(g(X).div,U(g(t).getControlProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),MR=O({__name:"date-picker-input",props:{index:{},fixOnBlur:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=qe();return Y(),(o,i)=>(w(),$(g(X).input,U(g(n).getInputProps(t),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),NR=O({__name:"date-picker-label",props:{asChild:{type:Boolean}},setup(e){const t=qe();return Y(),(n,o)=>(w(),$(g(X).label,U(g(t).getLabelProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),LR=["value"],FR=O({__name:"date-picker-month-select",props:{asChild:{type:Boolean}},setup(e){const t=qe();return Y(),(n,o)=>(w(),$(g(X).select,U(g(t).getMonthSelectProps(),{"as-child":e.asChild}),{default:C(()=>[(w(!0),M(Se,null,Ie(g(t).getMonths(),i=>(w(),M("option",{key:i.value,value:i.value},se(i.label),9,LR))),128))]),_:1},16,["as-child"]))}}),[BR,ta]=Re("DatePickerViewPropsContext"),zR=O({__name:"date-picker-next-trigger",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=ta();return Y(),(o,i)=>(w(),$(g(X).button,U(g(t).getNextTriggerProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),HR=O({__name:"date-picker-positioner",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=Ys(),o=Jp(I(()=>({...n.value,present:t.value.open})));return Qp(o),Y(),(i,a)=>g(o).unmounted?oe("",!0):(w(),$(g(X).div,U({key:0},g(t).getPositionerProps(),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),jR=O({__name:"date-picker-preset-trigger",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=qe();return Y(),(o,i)=>(w(),$(g(X).button,U(g(n).getPresetTriggerProps(t),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),WR=O({__name:"date-picker-prev-trigger",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=ta();return Y(),(o,i)=>(w(),$(g(X).button,U(g(t).getPrevTriggerProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),UR=O({__name:"date-picker-range-text",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=I(()=>{const{start:o,end:i}=t.value.visibleRangeText;return Dn([o,i]).filter(Boolean).join(" - ")});return Y(),(o,i)=>(w(),$(g(X).div,U(g(t).getRangeTextProps(),{"as-child":e.asChild}),{default:C(()=>[Ne(se(n.value),1)]),_:1},16,["as-child"]))}}),GR=O({__name:"date-picker-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return Aw(n),io(I(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),Y(),(o,i)=>(w(),$(g(X).div,U(n.value.getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),qR=(e={},t)=>{const n=Ut(),o=sn(ln),i=kn(Cn),a=I(()=>{const s=Ye(e);return{id:n,dir:i.value.dir,locale:i.value.locale,value:s.modelValue,getRootNode:o?.value.getRootNode,...Fn(s),onFocusChange:l=>{var c;t?.("focusChange",l),t?.("update:focusedValue",l.focusedValue),(c=s.onFocusChange)==null||c.call(s,l)},onViewChange:l=>{var c;t?.("viewChange",l),t?.("update:view",l.view),(c=s.onViewChange)==null||c.call(s,l)},onOpenChange:l=>{var c;t?.("openChange",l),t?.("update:open",l.open),(c=s.onOpenChange)==null||c.call(s,l)},onValueChange:l=>{var c;t?.("valueChange",l),t?.("update:modelValue",l.value),(c=s.onValueChange)==null||c.call(s,l)}}}),r=Gt(PR,a);return I(()=>OR(r,rn))},YR=O({__name:"date-picker-root",props:_n({closeOnSelect:{type:Boolean},defaultFocusedValue:{},defaultOpen:{type:Boolean},defaultValue:{},defaultView:{},disabled:{type:Boolean},fixedWeeks:{type:Boolean},focusedValue:{},format:{type:Function},id:{},ids:{},isDateUnavailable:{type:Function},locale:{},max:{},maxView:{},min:{},minView:{},modelValue:{},name:{},numOfMonths:{},open:{type:Boolean},outsideDaySelectable:{type:Boolean},parse:{type:Function},placeholder:{},positioning:{},readOnly:{type:Boolean},selectionMode:{},startOfWeek:{},timeZone:{},translations:{},view:{},inline:{type:Boolean},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{closeOnSelect:void 0,defaultOpen:void 0,disabled:void 0,fixedWeeks:void 0,open:void 0,readOnly:void 0,outsideDaySelectable:void 0,inline:void 0}),emits:["focusChange","openChange","valueChange","viewChange","update:modelValue","update:open","update:view","update:focusedValue"],setup(e,{emit:t}){const n=e,o=qR(n,t);return Aw(o),io(I(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Y(),(i,a)=>(w(),$(g(X).div,U(g(o).getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),[KR,Ku]=Re("DatePickerTablePropsContext"),XR=O({__name:"date-picker-table-body",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=Ku();return Y(),(o,i)=>(w(),$(g(X).tbody,U(g(t).getTableBodyProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),[ZR,JR]=Re("DatePickerTableCellPropsContext"),QR=O({__name:"date-picker-table-cell-trigger",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=JR(),o=ta(),i=I(()=>{const a={day:t.value.getDayTableCellTriggerProps,month:t.value.getMonthTableCellTriggerProps,year:t.value.getYearTableCellTriggerProps}[o.view];return a(n)});return Y(),(a,r)=>(w(),$(g(X).div,U(i.value,{"as-child":e.asChild}),{default:C(()=>[V(a.$slots,"default")]),_:3},16,["as-child"]))}}),eD=O({__name:"date-picker-table-cell",props:{value:{},disabled:{type:Boolean},columns:{},visibleRange:{},asChild:{type:Boolean}},setup(e){const t=e,n=qe(),o=ta();ZR(t);const i=I(()=>({day:n.value.getDayTableCellProps,month:n.value.getMonthTableCellProps,year:n.value.getYearTableCellProps})[o.view??"day"](t));return Y(),(a,r)=>(w(),$(g(X).td,U(i.value,{"as-child":e.asChild}),{default:C(()=>[V(a.$slots,"default")]),_:3},16,["as-child"]))}}),tD=O({__name:"date-picker-table-head",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=Ku();return Y(),(o,i)=>(w(),$(g(X).thead,U(g(t).getTableHeadProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),nD=O({__name:"date-picker-table-header",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=Ku();return Y(),(o,i)=>(w(),$(g(X).th,U(g(t).getTableHeaderProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),oD=O({__name:"date-picker-table-row",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=Ku();return Y(),(o,i)=>(w(),$(g(X).tr,U(g(t).getTableRowProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),iD=O({__name:"date-picker-table",props:{view:{},columns:{},id:{},asChild:{type:Boolean}},setup(e){const t=e,n=qe(),o=ta(),i=Ut(),a=t.id??i;return KR({...t,id:a,...o}),Y(),(r,s)=>(w(),$(g(X).table,U(g(n).getTableProps(t),{"as-child":e.asChild}),{default:C(()=>[V(r.$slots,"default")]),_:3},16,["as-child"]))}}),aD=O({__name:"date-picker-trigger",props:{asChild:{type:Boolean}},setup(e){const t=qe();return Y(),(n,o)=>(w(),$(g(X).button,U(g(t).getTriggerProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),rD=O({__name:"date-picker-view-control",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=ta();return Y(),(o,i)=>(w(),$(g(X).div,U(g(t).getViewControlProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),sD=O({__name:"date-picker-view-trigger",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=ta();return Y(),(o,i)=>(w(),$(g(X).button,U(g(t).getViewTriggerProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),Rw=Cw.extendWith("view"),lD=O({__name:"date-picker-view",props:{view:{},asChild:{type:Boolean}},setup(e){const t=e,n=qe();return BR(t),Y(),(o,i)=>(w(),$(g(X).div,U(g(Rw).build().view.attrs,{hidden:g(n).view!==e.view,"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["hidden","as-child"]))}}),cD=["value"],uD=O({__name:"date-picker-year-select",props:{asChild:{type:Boolean}},setup(e){const t=qe();return Y(),(n,o)=>(w(),$(g(X).select,U(g(t).getYearSelectProps(),{"as-child":e.asChild}),{default:C(()=>[(w(!0),M(Se,null,Ie(g(t).getYears(),i=>(w(),M("option",{key:i.value,value:i.value},se(i.label),9,cD))),128))]),_:1},16,["as-child"]))}}),we=Object.freeze(Object.defineProperty({__proto__:null,ClearTrigger:AR,Content:RR,Context:DR,Control:VR,Input:MR,Label:NR,MonthSelect:FR,NextTrigger:zR,Positioner:HR,PresetTrigger:jR,PrevTrigger:WR,RangeText:UR,Root:YR,RootProvider:GR,Table:iD,TableBody:XR,TableCell:eD,TableCellTrigger:QR,TableHead:tD,TableHeader:nD,TableRow:oD,Trigger:aD,View:lD,ViewControl:rD,ViewTrigger:sD,YearSelect:uD},Symbol.toStringTag,{value:"Module"}));var Dw=be("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger");Dw.build();ie()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);var dD=e=>typeof e.getAsEntry=="function"?e.getAsEntry():typeof e.webkitGetAsEntry=="function"?e.webkitGetAsEntry():null,Vw=e=>e.isDirectory,zh=e=>e.isFile,Hh=(e,t)=>(Object.defineProperty(e,"relativePath",{value:t?`${t}/${e.name}`:e.name}),e),hD=(e,t)=>Promise.all(Array.from(e).filter(n=>n.kind==="file").map(n=>{const o=dD(n);if(!o)return null;if(Vw(o)&&t)return Mw(o.createReader(),`${o.name}`);if(zh(o)&&typeof n.getAsFile=="function"){const i=n.getAsFile();return Promise.resolve(i?Hh(i,""):null)}if(zh(o))return new Promise(i=>{o.file(a=>{i(Hh(a,""))})})}).filter(n=>n)),Mw=(e,t="")=>new Promise(n=>{const o=[],i=()=>{e.readEntries(a=>{if(a.length===0){n(Promise.all(o).then(s=>s.flat()));return}const r=a.map(s=>{if(!s)return null;if(Vw(s))return Mw(s.createReader(),`${t}${s.name}`);if(zh(s))return new Promise(l=>{s.file(c=>{l(Hh(c,t))})})}).filter(s=>s);o.push(Promise.all(r)),i()})};i()});function pD(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function fD(e){return/^.*\.[\w]+$/.test(e)}var Xm=e=>pD(e)||fD(e);function gD(e){if(e!=null)return typeof e=="string"?e:Array.isArray(e)?e.filter(Xm).join(","):Object.entries(e).reduce((t,[n,o])=>[...t,n,...o],[]).filter(Xm).join(",")}var Pl=(e,t)=>e.name===t.name&&e.size===t.size&&e.type===t.type,kr=e=>e!=null;function mD(e,t,n){if(kr(e.size))if(kr(t)&&kr(n)){if(e.size>n)return[!1,"FILE_TOO_LARGE"];if(e.size<t)return[!1,"FILE_TOO_SMALL"]}else{if(kr(t)&&e.size<t)return[!1,"FILE_TOO_SMALL"];if(kr(n)&&e.size>n)return[!1,"FILE_TOO_LARGE"]}return[!0,null]}var vD="3g2_video/3gpp2[3gp,3gpp_video/3gpp[3mf_model/3mf[7z_application/x-7z-compressed[aac_audio/aac[ac_application/pkix-attr-cert[adp_audio/adpcm[adts_audio/aac[ai_application/postscript[aml_application/automationml-aml+xml[amlx_application/automationml-amlx+zip[amr_audio/amr[apk_application/vnd.android.package-archive[apng_image/apng[appcache,manifest_text/cache-manifest[appinstaller_application/appinstaller[appx_application/appx[appxbundle_application/appxbundle[asc_application/pgp-keys[atom_application/atom+xml[atomcat_application/atomcat+xml[atomdeleted_application/atomdeleted+xml[atomsvc_application/atomsvc+xml[au,snd_audio/basic[avi_video/x-msvideo[avci_image/avci[avcs_image/avcs[avif_image/avif[aw_application/applixware[bdoc_application/bdoc[bin,bpk,buffer,deb,deploy,dist,distz,dll,dmg,dms,dump,elc,exe,img,iso,lrf,mar,msi,msm,msp,pkg,so_application/octet-stream[bmp,dib_image/bmp[btf,btif_image/prs.btif[bz2_application/x-bzip2[c_text/x-c[ccxml_application/ccxml+xml[cdfx_application/cdfx+xml[cdmia_application/cdmi-capability[cdmic_application/cdmi-container[cdmid_application/cdmi-domain[cdmio_application/cdmi-object[cdmiq_application/cdmi-queue[cer_application/pkix-cert[cgm_image/cgm[cjs_application/node[class_application/java-vm[coffee,litcoffee_text/coffeescript[conf,def,in,ini,list,log,text,txt_text/plain[cpp,cxx,cc_text/x-c++src[cpl_application/cpl+xml[cpt_application/mac-compactpro[crl_application/pkix-crl[css_text/css[csv_text/csv[cu_application/cu-seeme[cwl_application/cwl[cww_application/prs.cww[davmount_application/davmount+xml[dbk_application/docbook+xml[doc_application/msword[docx_application/vnd.openxmlformats-officedocument.wordprocessingml.document[dsc_text/prs.lines.tag[dssc_application/dssc+der[dtd_application/xml-dtd[dwd_application/atsc-dwd+xml[ear,jar,war_application/java-archive[ecma_application/ecmascript[emf_image/emf[eml,mime_message/rfc822[emma_application/emma+xml[emotionml_application/emotionml+xml[eot_application/vnd.ms-fontobject[eps,ps_application/postscript[epub_application/epub+zip[exi_application/exi[exp_application/express[exr_image/aces[ez_application/andrew-inset[fdf_application/fdf[fdt_application/fdt+xml[fits_image/fits[flac_audio/flac[flv_video/x-flv[g3_image/g3fax[geojson_application/geo+json[gif_image/gif[glb_model/gltf-binary[gltf_model/gltf+json[gml_application/gml+xml[go_text/x-go[gpx_application/gpx+xml[gz_application/gzip[h_text/x-h[h261_video/h261[h263_video/h263[h264_video/h264[heic_image/heic[heics_image/heic-sequence[heif_image/heif[heifs_image/heif-sequence[htm,html,shtml_text/html[ico_image/x-icon[icns_image/x-icns[ics,ifb_text/calendar[iges,igs_model/iges[ink,inkml_application/inkml+xml[ipa_application/octet-stream[java_text/x-java-source[jp2,jpg2_image/jp2[jpeg,jpe,jpg_image/jpeg[jpf,jpx_image/jpx[jpm,jpgm_image/jpm[jpgv_video/jpeg[jph_image/jph[js,mjs_text/javascript[json_application/json[json5_application/json5[jsonld_application/ld+json[jsx_text/jsx[jxl_image/jxl[jxr_image/jxr[ktx_image/ktx[ktx2_image/ktx2[less_text/less[m1v,m2v,mpe,mpeg,mpg_video/mpeg[m4a_audio/mp4[m4v_video/x-m4v[md,markdown_text/markdown[mid,midi,kar,rmi_audio/midi[mkv_video/x-matroska[mp2,mp2a,mp3,mpga,m3a,m2a_audio/mpeg[mp4,mp4v,mpg4_video/mp4[mp4a_audio/mp4[mp4s,m4p_application/mp4[odp_application/vnd.oasis.opendocument.presentation[oda_application/oda[ods_application/vnd.oasis.opendocument.spreadsheet[odt_application/vnd.oasis.opendocument.text[oga,ogg,opus,spx_audio/ogg[ogv_video/ogg[ogx_application/ogg[otf_font/otf[p12,pfx_application/x-pkcs12[pdf_application/pdf[pem_application/x-pem-file[php_text/x-php[png_image/png[ppt_application/vnd.ms-powerpoint[pptx_application/vnd.openxmlformats-officedocument.presentationml.presentation[pskcxml_application/pskc+xml[psd_image/vnd.adobe.photoshop[py_text/x-python[qt,mov_video/quicktime[rar_application/vnd.rar[rdf_application/rdf+xml[rtf_text/rtf[sass_text/x-sass[scss_text/x-scss[sgm,sgml_text/sgml[sh_application/x-sh[svg,svgz_image/svg+xml[swf_application/x-shockwave-flash[tar_application/x-tar[tif,tiff_image/tiff[toml_application/toml[ts_video/mp2t[tsx_text/tsx[tsv_text/tab-separated-values[ttc_font/collection[ttf_font/ttf[vtt_text/vtt[wasm_application/wasm[wav_audio/wav[weba_audio/webm[webm_video/webm[webmanifest_application/manifest+json[webp_image/webp[wma_audio/x-ms-wma[wmv_video/x-ms-wmv[woff_font/woff[woff2_font/woff2[xls_application/vnd.ms-excel[xlsx_application/vnd.openxmlformats-officedocument.spreadsheetml.sheet[xml_application/xml[xz_application/x-xz[yaml,yml_text/yaml[zip_application/zip",bD=new Map(vD.split("[").flatMap(e=>{const[t,n]=e.split("_");return t.split(",").map(o=>[o,n])}));function yD(e){const t=e.split(".").pop();return t&&bD.get(t)||null}function xD(e,t){if(e&&t){const n=Array.isArray(t)?t:typeof t=="string"?t.split(","):[];if(n.length===0)return!0;const o=e.name||"",i=(e.type||yD(o)||"").toLowerCase(),a=i.replace(/\/.*$/,"");return n.some(r=>{const s=r.trim().toLowerCase();return s.charAt(0)==="."?o.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0}function wD(e,t){const n=e.type==="application/x-moz-file"||xD(e,t);return[n,n?null:"FILE_INVALID_TYPE"]}var _D=be("editable").parts("root","area","label","preview","input","editTrigger","submitTrigger","cancelTrigger","control");_D.build();ie()(["activationMode","autoResize","dir","disabled","finalFocusEl","form","getRootNode","id","ids","invalid","maxLength","name","onEditChange","onFocusOutside","onInteractOutside","onPointerDownOutside","onValueChange","onValueCommit","onValueRevert","placeholder","readOnly","required","selectOnFocus","edit","defaultEdit","submitMode","translations","defaultValue","value"]);const CD=be("fieldset").parts("root","errorText","helperText","legend");CD.build();const[Nw,cn]=Re("FileUploadContext"),kD=O({__name:"file-upload-clear-trigger",props:{asChild:{type:Boolean}},setup(e){const t=cn();return Y(),(n,o)=>(w(),$(g(X).button,U(g(t).getClearTriggerProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),SD=O({__name:"file-upload-context",setup(e){const t=cn();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),$D=O({__name:"file-upload-dropzone",props:_n({asChild:{type:Boolean},disableClick:{type:Boolean}},{disableClick:void 0}),setup(e){const t=e,n=cn();return Y(),(o,i)=>(w(),$(g(X).div,U(g(n).getDropzoneProps(t),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),ED=O({__name:"file-upload-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=cn(),n=ao();return Y(),(o,i)=>{var a;return w(),$(g(X).input,U({"aria-describedby":(a=g(n))==null?void 0:a.ariaDescribedby},g(t).getHiddenInputProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["aria-describedby","as-child"])}}}),[TD,nl]=Re("FileUploadItemPropsContext"),OD=O({__name:"file-upload-item-delete-trigger",props:{asChild:{type:Boolean}},setup(e){const t=cn(),n=nl();return Y(),(o,i)=>(w(),$(g(X).button,U(g(t).getItemDeleteTriggerProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),[ID,PD]=Re("FileUploadItemGroupPropsContext"),AD=O({__name:"file-upload-item-group",props:{asChild:{type:Boolean},type:{}},setup(e){const t=e,n=I(()=>Uo(t,["type"])),o=cn();return ID(n),Y(),(i,a)=>(w(),$(g(X).ul,U(g(o).getItemGroupProps(n.value),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),RD=O({__name:"file-upload-item-name",props:{asChild:{type:Boolean}},setup(e){const t=cn(),n=nl(),o=zs();return Y(),(i,a)=>(w(),$(g(X).div,U(g(t).getItemNameProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default",{},()=>{var r;return[Ne(se(((r=o.default)==null?void 0:r.call(o))||g(n).file.name),1)]})]),_:3},16,["as-child"]))}}),DD=O({__name:"file-upload-item-preview-image",props:{asChild:{type:Boolean}},setup(e){const t=cn(),n=nl(),o=fe("");return u0(i=>{const a=t.value.createFileUrl(n.value.file,r=>o.value=r);i(a)}),Y(),(i,a)=>o.value?(w(),$(g(X).img,ft(U({key:0},g(t).getItemPreviewImageProps({...g(n),url:o.value}))),null,16)):oe("",!0)}}),VD=O({__name:"file-upload-item-preview",props:{type:{default:".*"},asChild:{type:Boolean}},setup(e){const t=cn(),n=nl();return Y(),(o,i)=>g(n).file.type.match(e.type??".*")?(w(),$(g(X).div,U({key:0},g(t).getItemPreviewProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"])):oe("",!0)}}),MD=O({__name:"file-upload-item-size-text",props:{asChild:{type:Boolean}},setup(e){const t=cn(),n=nl(),o=zs();return Y(),(i,a)=>(w(),$(g(X).div,U(g(t).getItemSizeTextProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default",{},()=>{var r;return[Ne(se(((r=o.default)==null?void 0:r.call(o))||g(t).getFileSize(g(n).file)),1)]})]),_:3},16,["as-child"]))}}),ND=O({__name:"file-upload-item",props:{file:{},type:{},asChild:{type:Boolean}},setup(e){const t=e,n=cn(),o=PD(),i=I(()=>({...t,type:o.value.type}));return TD(i),Y(),(a,r)=>(w(),$(g(X).li,U(g(n).getItemProps(i.value),{"as-child":e.asChild}),{default:C(()=>[V(a.$slots,"default")]),_:3},16,["as-child"]))}}),LD=O({__name:"file-upload-label",props:{asChild:{type:Boolean}},setup(e){const t=cn();return Y(),(n,o)=>(w(),$(g(X).label,U(g(t).getLabelProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),FD=O({__name:"file-upload-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return Nw(n),Y(),(o,i)=>(w(),$(g(X).div,U(n.value.getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}});function BD(e){const t=new Map;return function(n,o){const i=n+(o?Object.entries(o).sort((r,s)=>r[0]<s[0]?-1:1).join():"");if(t.has(i))return t.get(i);let a=new e(n,o);return t.set(i,a),a}}var zD=BD(Intl.NumberFormat);function HD(e,t,n={}){return zD(t,n).format(e)}var jD=["","kilo","mega","giga","tera"],WD=["","kilo","mega","giga","tera","peta"],UD=(e,t="en-US",n={})=>{if(Number.isNaN(e))return"";if(e===0)return"0 B";const{unitSystem:o="decimal",precision:i=3,unit:a="byte",unitDisplay:r="short"}=n,s=o==="binary"?1024:1e3,l=a==="bit"?jD:WD,c=e<0;let u=Math.abs(e),d=0;for(;u>=s&&d<l.length-1;)u/=s,d++;const h=parseFloat(u.toPrecision(i)),p=c?-h:h;return HD(p,t,{style:"unit",unit:l[d]+a,unitDisplay:r})},Lw=be("file-upload").parts("root","dropzone","item","itemDeleteTrigger","itemGroup","itemName","itemPreview","itemPreviewImage","itemSizeText","label","trigger","clearTrigger"),hn=Lw.build(),Fw=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`file:${e.id}`},Bw=e=>{var t;return((t=e.ids)==null?void 0:t.dropzone)??`file:${e.id}:dropzone`},jh=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`file:${e.id}:input`},GD=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`file:${e.id}:trigger`},qD=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`file:${e.id}:label`},YD=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.item)==null?void 0:o.call(n,t))??`file:${e.id}:item:${t}`},KD=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemName)==null?void 0:o.call(n,t))??`file:${e.id}:item-name:${t}`},XD=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemSizeText)==null?void 0:o.call(n,t))??`file:${e.id}:item-size:${t}`},ZD=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemPreview)==null?void 0:o.call(n,t))??`file:${e.id}:item-preview:${t}`},JD=e=>e.getById(Fw(e)),Zm=e=>e.getById(jh(e)),QD=e=>e.getById(Bw(e));function Jm(e){const t=je(e);return e.dataTransfer?e.dataTransfer.types.some(n=>n==="Files"||n==="application/x-moz-file"):!!t&&"files"in t}function e2(e,t,n){const{prop:o,computed:i}=e;return!i("multiple")&&t>1?!1:!i("multiple")&&t+n.length===2?!0:!(t+n.length>o("maxFiles"))}function Qm(e,t,n=[],o=[]){const{prop:i,computed:a}=e,r=[],s=[],l={acceptedFiles:n,rejectedFiles:o};return t.forEach(c=>{var u;const[d,h]=wD(c,a("acceptAttr")),[p,m]=mD(c,i("minFileSize"),i("maxFileSize")),f=(u=i("validate"))==null?void 0:u(c,l),b=f?f.length===0:!0;if(d&&p&&b)r.push(c);else{const v=[h,m];b||v.push(...f??[]),s.push({file:c,errors:v.filter(Boolean)})}}),e2(e,r.length,n)||(r.forEach(c=>{s.push({file:c,errors:["TOO_MANY_FILES"]})}),r.splice(0)),{acceptedFiles:r,rejectedFiles:s}}function t2(e,t){const n=Ke(e);try{if("DataTransfer"in n){const o=new n.DataTransfer;t.forEach(i=>{o.items.add(i)}),e.files=o.files}}catch{}}var Lo="accepted";function n2(e,t){const{state:n,send:o,prop:i,computed:a,scope:r,context:s}=e,l=!!i("disabled"),c=!!i("required"),u=i("allowDrop"),d=i("translations"),h=n.matches("dragging"),p=n.matches("focused")&&!l;return{dragging:h,focused:p,disabled:!!l,transforming:s.get("transforming"),openFilePicker(){l||o({type:"OPEN"})},deleteFile(m,f=Lo){o({type:"FILE.DELETE",file:m,itemType:f})},acceptedFiles:s.get("acceptedFiles"),rejectedFiles:s.get("rejectedFiles"),setFiles(m){o({type:"FILES.SET",files:m,count:m.length})},clearRejectedFiles(){o({type:"REJECTED_FILES.CLEAR"})},clearFiles(){o({type:"FILES.CLEAR"})},getFileSize(m){return UD(m.size,i("locale"))},createFileUrl(m,f){const b=r.getWin(),v=b.URL.createObjectURL(m);return f(v),()=>b.URL.revokeObjectURL(v)},setClipboardFiles(m){if(l)return!1;const f=Array.from(m?.items??[]).reduce((b,v)=>{if(v.kind!=="file")return b;const y=v.getAsFile();return y?[...b,y]:b},[]);return f.length?(o({type:"FILES.SET",files:f}),!0):!1},getRootProps(){return t.element({...hn.root.attrs,dir:i("dir"),id:Fw(r),"data-disabled":D(l),"data-dragging":D(h)})},getDropzoneProps(m={}){return t.element({...hn.dropzone.attrs,dir:i("dir"),id:Bw(r),tabIndex:l||m.disableClick?void 0:0,role:m.disableClick?"application":"button","aria-label":d.dropzone,"aria-disabled":l,"data-invalid":D(i("invalid")),"data-disabled":D(l),"data-dragging":D(h),onKeyDown(f){l||f.defaultPrevented||f.currentTarget===je(f)&&(m.disableClick||f.key!=="Enter"&&f.key!==" "||o({type:"DROPZONE.CLICK",src:"keydown"}))},onClick(f){l||f.defaultPrevented||m.disableClick||f.currentTarget===je(f)&&(f.currentTarget.localName==="label"&&f.preventDefault(),o({type:"DROPZONE.CLICK"}))},onDragOver(f){if(l||!u)return;f.preventDefault(),f.stopPropagation();try{f.dataTransfer.dropEffect="copy"}catch{}if(!Jm(f))return;const b=f.dataTransfer.items.length;o({type:"DROPZONE.DRAG_OVER",count:b})},onDragLeave(f){l||u&&(Rt(f.currentTarget,f.relatedTarget)||o({type:"DROPZONE.DRAG_LEAVE"}))},onDrop(f){if(l)return;u&&(f.preventDefault(),f.stopPropagation());const b=Jm(f);l||!b||hD(f.dataTransfer.items,i("directory")).then(v=>{o({type:"DROPZONE.DROP",files:K0(v)})})},onFocus(){l||o({type:"DROPZONE.FOCUS"})},onBlur(){l||o({type:"DROPZONE.BLUR"})}})},getTriggerProps(){return t.button({...hn.trigger.attrs,dir:i("dir"),id:GD(r),disabled:l,"data-disabled":D(l),"data-invalid":D(i("invalid")),type:"button",onClick(m){l||(Rt(QD(r),m.currentTarget)&&m.stopPropagation(),o({type:"OPEN"}))}})},getHiddenInputProps(){return t.input({id:jh(r),tabIndex:-1,disabled:l,type:"file",required:i("required"),capture:i("capture"),name:i("name"),accept:a("acceptAttr"),webkitdirectory:i("directory")?"":void 0,multiple:a("multiple")||i("maxFiles")>1,onClick(m){m.stopPropagation(),m.currentTarget.value=""},onInput(m){if(l)return;const{files:f}=m.currentTarget;o({type:"FILE.SELECT",files:f?Array.from(f):[]})},style:Ru})},getItemGroupProps(m={}){const{type:f=Lo}=m;return t.element({...hn.itemGroup.attrs,dir:i("dir"),"data-disabled":D(l),"data-type":f})},getItemProps(m){const{file:f,type:b=Lo}=m;return t.element({...hn.item.attrs,dir:i("dir"),id:YD(r,f.name),"data-disabled":D(l),"data-type":b})},getItemNameProps(m){const{file:f,type:b=Lo}=m;return t.element({...hn.itemName.attrs,dir:i("dir"),id:KD(r,f.name),"data-disabled":D(l),"data-type":b})},getItemSizeTextProps(m){const{file:f,type:b=Lo}=m;return t.element({...hn.itemSizeText.attrs,dir:i("dir"),id:XD(r,f.name),"data-disabled":D(l),"data-type":b})},getItemPreviewProps(m){const{file:f,type:b=Lo}=m;return t.element({...hn.itemPreview.attrs,dir:i("dir"),id:ZD(r,f.name),"data-disabled":D(l),"data-type":b})},getItemPreviewImageProps(m){var f;const{file:b,url:v,type:y=Lo}=m;if(!b.type.startsWith("image/"))throw new Error("Preview Image is only supported for image files");return t.img({...hn.itemPreviewImage.attrs,alt:(f=d.itemPreview)==null?void 0:f.call(d,b),src:v,"data-disabled":D(l),"data-type":y})},getItemDeleteTriggerProps(m){var f;const{file:b,type:v=Lo}=m;return t.button({...hn.itemDeleteTrigger.attrs,dir:i("dir"),type:"button",disabled:l,"data-disabled":D(l),"data-type":v,"aria-label":(f=d.deleteFile)==null?void 0:f.call(d,b),onClick(){l||o({type:"FILE.DELETE",file:b,itemType:v})}})},getLabelProps(){return t.label({...hn.label.attrs,dir:i("dir"),id:qD(r),htmlFor:jh(r),"data-disabled":D(l),"data-required":D(c)})},getClearTriggerProps(){return t.button({...hn.clearTrigger.attrs,dir:i("dir"),type:"button",disabled:l,hidden:s.get("acceptedFiles").length===0,"data-disabled":D(l),onClick(m){m.defaultPrevented||l||o({type:"FILES.CLEAR"})}})}}}var o2={props({props:e}){return{minFileSize:0,maxFileSize:Number.POSITIVE_INFINITY,maxFiles:1,allowDrop:!0,preventDocumentDrop:!0,defaultAcceptedFiles:[],...e,translations:{dropzone:"dropzone",itemPreview:t=>`preview of ${t.name}`,deleteFile:t=>`delete file ${t.name}`,...e.translations}}},initialState(){return"idle"},context({prop:e,bindable:t,getContext:n}){return{acceptedFiles:t(()=>({defaultValue:e("defaultAcceptedFiles"),value:e("acceptedFiles"),isEqual:(o,i)=>o.length===i?.length&&o.every((a,r)=>Pl(a,i[r])),hash(o){return o.map(i=>`${i.name}-${i.size}`).join(",")},onChange(o){var i,a;const r=n();(i=e("onFileAccept"))==null||i({files:o}),(a=e("onFileChange"))==null||a({acceptedFiles:o,rejectedFiles:r.get("rejectedFiles")})}})),rejectedFiles:t(()=>({defaultValue:[],isEqual:(o,i)=>o.length===i?.length&&o.every((a,r)=>Pl(a.file,i[r].file)),onChange(o){var i,a;const r=n();(i=e("onFileReject"))==null||i({files:o}),(a=e("onFileChange"))==null||a({acceptedFiles:r.get("acceptedFiles"),rejectedFiles:o})}})),transforming:t(()=>({defaultValue:!1}))}},computed:{acceptAttr:({prop:e})=>gD(e("accept")),multiple:({prop:e})=>e("maxFiles")>1},watch({track:e,context:t,action:n}){e([()=>t.hash("acceptedFiles")],()=>{n(["syncInputElement"])})},on:{"FILES.SET":{actions:["setFiles"]},"FILE.SELECT":{actions:["setEventFiles"]},"FILE.DELETE":{actions:["removeFile"]},"FILES.CLEAR":{actions:["clearFiles"]},"REJECTED_FILES.CLEAR":{actions:["clearRejectedFiles"]}},effects:["preventDocumentDrop"],states:{idle:{on:{OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.FOCUS":{target:"focused"},"DROPZONE.DRAG_OVER":{target:"dragging"}}},focused:{on:{"DROPZONE.BLUR":{target:"idle"},OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.DRAG_OVER":{target:"dragging"}}},dragging:{on:{"DROPZONE.DROP":{target:"idle",actions:["setEventFiles"]},"DROPZONE.DRAG_LEAVE":{target:"idle"}}}},implementations:{effects:{preventDocumentDrop({prop:e,scope:t}){if(!e("preventDocumentDrop")||!e("allowDrop")||e("disabled"))return;const n=t.getDoc(),o=a=>{a?.preventDefault()},i=a=>{Rt(JD(t),je(a))||a.preventDefault()};return Es(Ee(n,"dragover",o,!1),Ee(n,"drop",i,!1))}},actions:{syncInputElement({scope:e,context:t}){queueMicrotask(()=>{const n=Zm(e);if(!n)return;t2(n,t.get("acceptedFiles"));const o=e.getWin();n.dispatchEvent(new o.Event("change",{bubbles:!0}))})},openFilePicker({scope:e}){de(()=>{var t;(t=Zm(e))==null||t.click()})},setFiles(e){const{computed:t,context:n,event:o}=e,{acceptedFiles:i,rejectedFiles:a}=Qm(e,o.files);n.set("acceptedFiles",t("multiple")?i:i.length>0?[i[0]]:[]),n.set("rejectedFiles",a)},setEventFiles(e){const{computed:t,context:n,event:o,prop:i}=e,a=n.get("acceptedFiles"),r=n.get("rejectedFiles"),{acceptedFiles:s,rejectedFiles:l}=Qm(e,o.files,a,r),c=d=>{if(t("multiple")){n.set("acceptedFiles",h=>[...h,...d]),n.set("rejectedFiles",l);return}if(d.length){n.set("acceptedFiles",[d[0]]),n.set("rejectedFiles",l);return}l.length&&(n.set("acceptedFiles",n.get("acceptedFiles")),n.set("rejectedFiles",l))},u=i("transformFiles");u?(n.set("transforming",!0),u(s).then(c).catch(d=>{Po(`[zag-js/file-upload] error transforming files
1
+ import{F as Bs,G as zC,H as s0,I as l0,k as I,J as Rp,K as xt,L as Ye,r as fe,d as O,M as HC,N as Se,h as Pt,O as oe,P as $,Q as g,z as w,D as C,R as V,S as U,T as ft,U as yt,o as Qa,e as c0,V as no,s as Hc,W as ze,X as Dp,Y as Ut,Z as _n,y as M,A as N,C as j,$ as zs,a0 as L,a1 as Ie,B as se,E as Ne,a2 as jC,a3 as u0,a4 as At,a5 as d0,a6 as WC,a7 as vh,a8 as Qo,a9 as bh,aa as yh,a as UC,ab as GC,ac as qC,ad as YC,ae as KC,af as XC,ag as ZC,ah as JC,ai as er,aj as li,ak as ci,al as h0,am as QC,an as p0,ao as Sg,ap as ek,_ as Cu,aq as tk,ar as $g,as as nk,at as f0,x as ok}from"./C1dIfInu.js";function xh(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}var ik=e=>typeof e=="object"&&e!==null;function Vp(e){return Object.fromEntries(Object.entries(e??{}).filter(([t,n])=>n!==void 0))}var ak=e=>e==="base";function rk(e){return e.slice().filter(t=>!ak(t))}function Eg(e){return String.fromCharCode(e+(e>25?39:97))}function sk(e){let t="",n;for(n=Math.abs(e);n>52;n=n/52|0)t=Eg(n%52)+t;return Eg(n%52)+t}function lk(e,t){let n=t.length;for(;n;)e=e*33^t.charCodeAt(--n);return e}function ck(e){return sk(lk(5381,e)>>>0)}var g0=/\s*!(important)?/i;function uk(e){return typeof e=="string"?g0.test(e):!1}function dk(e){return typeof e=="string"?e.replace(g0,"").trim():e}function m0(e){return typeof e=="string"?e.replaceAll(" ","_"):e}var Hs=e=>{const t=new Map;return(...n)=>{const o=JSON.stringify(n);if(t.has(o))return t.get(o);const i=e(...n);return t.set(o,i),i}};function Mp(...e){return e.reduce((t,n)=>(n&&Object.keys(n).forEach(o=>{const i=t[o],a=n[o];xh(i)&&xh(a)?t[o]=Mp(i,a):t[o]=a}),t),{})}var hk=e=>e!=null;function v0(e,t,n={}){const{stop:o,getKey:i}=n;function a(r,s=[]){if(ik(r)){const l={};for(const[c,u]of Object.entries(r)){const d=i?.(c,u)??c,h=[...s,d];if(o!=null&&o(r,h))return t(r,s);const p=a(u,h);hk(p)&&(l[d]=p)}return l}return t(r,s)}return a(e)}function pk(e,t){return e.reduce((n,o,i)=>{const a=t[i];return o!=null&&(n[a]=o),n},{})}function b0(e,t,n=!0){const{utility:o,conditions:i}=t,{hasShorthand:a,resolveShorthand:r}=o;return v0(e,s=>Array.isArray(s)?pk(s,i.breakpoints.keys):s,{stop:s=>Array.isArray(s),getKey:n?s=>a?r(s):s:void 0})}var fk={shift:e=>e,finalize:e=>e,breakpoints:{keys:[]}},gk=e=>typeof e=="string"?e.replaceAll(/[\n\s]+/g," "):e;function mk(e){const{utility:t,hash:n,conditions:o=fk}=e,i=r=>[t.prefix,r].filter(Boolean).join("-"),a=(r,s)=>{let l;if(n){const c=[...o.finalize(r),s];l=i(t.toHash(c,ck))}else l=[...o.finalize(r),i(s)].join(":");return l};return Hs(({base:r,...s}={})=>{const l=Object.assign(s,r),c=b0(l,e),u=new Set;return v0(c,(d,h)=>{if(d==null)return;const p=uk(d),[m,...f]=o.shift(h),b=rk(f),v=t.transform(m,dk(gk(d)));let y=a(b,v.className);p&&(y=`${y}!`),u.add(y)}),Array.from(u).join(" ")})}function vk(...e){return e.flat().filter(t=>xh(t)&&Object.keys(Vp(t)).length>0)}function bk(e){function t(i){const a=vk(...i);return a.length===1?a:a.map(r=>b0(r,e))}function n(...i){return Mp(...t(i))}function o(...i){return Object.assign({},...t(i))}return{mergeCss:Hs(n),assignCss:o}}var yk=/([A-Z])/g,xk=/^ms-/,wk=Hs(e=>e.startsWith("--")?e:e.replace(yk,"-$1").replace(xk,"-ms-").toLowerCase()),_k="cm,mm,Q,in,pc,pt,px,em,ex,ch,rem,lh,rlh,vw,vh,vmin,vmax,vb,vi,svw,svh,lvw,lvh,dvw,dvh,cqw,cqh,cqi,cqb,cqmin,cqmax,%";`${_k.split(",").join("|")}`;var Ck=(e={})=>{const t=o=>{var i;return{className:[e.className,o].filter(Boolean).join("__"),base:((i=e.base)==null?void 0:i[o])??{},variants:{},defaultVariants:e.defaultVariants??{},compoundVariants:e.compoundVariants?kk(e.compoundVariants,o):[]}},n=(e.slots??[]).map(o=>[o,t(o)]);for(const[o,i]of Object.entries(e.variants??{}))for(const[a,r]of Object.entries(i))n.forEach(([s,l])=>{var c;(c=l.variants)[o]??(c[o]={}),l.variants[o][a]=r[s]??{}});return Object.fromEntries(n)},kk=(e,t)=>e.filter(n=>n.css[t]).map(n=>({...n,css:n.css[t]}));function y0(e,...t){const n=Object.getOwnPropertyDescriptors(e),o=Object.keys(n),i=r=>{const s={};for(let l=0;l<r.length;l++){const c=r[l];n[c]&&(Object.defineProperty(s,c,n[c]),delete n[c])}return s},a=r=>i(Array.isArray(r)?r:o.filter(r));return t.map(a).concat(i(o))}var Sk=(...e)=>{const t=e.reduce((n,o)=>(o&&o.forEach(i=>n.add(i)),n),new Set([]));return Array.from(t)};const $k="_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_default,_optional,_open,_closed,_fullscreen,_loading,_currentPage,_currentStep,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_starting,_complete,_incomplete,_collapsed,_current,_hidden,_off,_on,_today,_underValue,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,2xl,2xlOnly,2xlDown,smToMd,smToLg,smToXl,smTo2xl,mdToLg,mdToXl,mdTo2xl,lgToXl,lgTo2xl,xlTo2xl,base",x0=new Set($k.split(",")),Ek=/^@|&|&$/;function Tg(e){return x0.has(e)||Ek.test(e)}const Tk=/^_/,Ok=/&|@/;function Ik(e){return e.map(t=>x0.has(t)?t.replace(Tk,""):Ok.test(t)?`[${m0(t.trim())}]`:t)}function Pk(e){return e.sort((t,n)=>{const o=Tg(t),i=Tg(n);return o&&!i?1:!o&&i?-1:0})}const Ak="aspectRatio:asp,boxDecorationBreak:bx-db,zIndex:z,boxSizing:bx-s,objectPosition:obj-p,objectFit:obj-f,overscrollBehavior:ovs-b,overscrollBehaviorX:ovs-bx,overscrollBehaviorY:ovs-by,position:pos/1,top:top,left:left,inset:inset,insetInline:inset-x/insetX,insetBlock:inset-y/insetY,insetBlockEnd:inset-be,insetBlockStart:inset-bs,insetInlineEnd:inset-e/insetEnd/end,insetInlineStart:inset-s/insetStart/start,right:right,bottom:bottom,float:float,visibility:vis,display:d,hideFrom:hide,hideBelow:show,flexBasis:flex-b,flex:flex,flexDirection:flex-d/flexDir,flexGrow:flex-g,flexShrink:flex-sh,gridTemplateColumns:grid-tc,gridTemplateRows:grid-tr,gridColumn:grid-c,gridRow:grid-r,gridColumnStart:grid-cs,gridColumnEnd:grid-ce,gridAutoFlow:grid-af,gridAutoColumns:grid-ac,gridAutoRows:grid-ar,gap:gap,gridGap:grid-g,gridRowGap:grid-rg,gridColumnGap:grid-cg,rowGap:rg,columnGap:cg,justifyContent:jc,alignContent:ac,alignItems:ai,alignSelf:as,padding:p/1,paddingLeft:pl/1,paddingRight:pr/1,paddingTop:pt/1,paddingBottom:pb/1,paddingBlock:py/1/paddingY,paddingBlockEnd:pbe,paddingBlockStart:pbs,paddingInline:px/paddingX/1,paddingInlineEnd:pe/1/paddingEnd,paddingInlineStart:ps/1/paddingStart,marginLeft:ml/1,marginRight:mr/1,marginTop:mt/1,marginBottom:mb/1,margin:m/1,marginBlock:my/1/marginY,marginBlockEnd:mbe,marginBlockStart:mbs,marginInline:mx/1/marginX,marginInlineEnd:me/1/marginEnd,marginInlineStart:ms/1/marginStart,spaceX:sx,spaceY:sy,outlineWidth:ring-w/ringWidth,outlineColor:ring-c/ringColor,outline:ring/1,outlineOffset:ring-o/ringOffset,divideX:dvd-x,divideY:dvd-y,divideColor:dvd-c,divideStyle:dvd-s,width:w/1,inlineSize:w-is,minWidth:min-w/minW,minInlineSize:min-w-is,maxWidth:max-w/maxW,maxInlineSize:max-w-is,height:h/1,blockSize:h-bs,minHeight:min-h/minH,minBlockSize:min-h-bs,maxHeight:max-h/maxH,maxBlockSize:max-b,color:c,fontFamily:ff,fontSize:fs,fontSizeAdjust:fs-a,fontPalette:fp,fontKerning:fk,fontFeatureSettings:ff-s,fontWeight:fw,fontSmoothing:fsmt,fontVariant:fv,fontVariantAlternates:fv-alt,fontVariantCaps:fv-caps,fontVariationSettings:fv-s,fontVariantNumeric:fv-num,letterSpacing:ls,lineHeight:lh,textAlign:ta,textDecoration:td,textDecorationColor:td-c,textEmphasisColor:te-c,textDecorationStyle:td-s,textDecorationThickness:td-t,textUnderlineOffset:tu-o,textTransform:tt,textIndent:ti,textShadow:tsh,textShadowColor:tsh-c/textShadowColor,textOverflow:tov,verticalAlign:va,wordBreak:wb,textWrap:tw,truncate:trunc,lineClamp:lc,listStyleType:li-t,listStylePosition:li-pos,listStyleImage:li-img,listStyle:li-s,backgroundPosition:bg-p/bgPosition,backgroundPositionX:bg-p-x/bgPositionX,backgroundPositionY:bg-p-y/bgPositionY,backgroundAttachment:bg-a/bgAttachment,backgroundClip:bg-cp/bgClip,background:bg/1,backgroundColor:bg-c/bgColor,backgroundOrigin:bg-o/bgOrigin,backgroundImage:bg-i/bgImage,backgroundRepeat:bg-r/bgRepeat,backgroundBlendMode:bg-bm/bgBlendMode,backgroundSize:bg-s/bgSize,backgroundGradient:bg-grad/bgGradient,textGradient:txt-grad,gradientFromPosition:grad-from-pos,gradientToPosition:grad-to-pos,gradientFrom:grad-from,gradientTo:grad-to,gradientVia:grad-via,gradientViaPosition:grad-via-pos,borderRadius:bdr/rounded,borderTopLeftRadius:bdr-tl/roundedTopLeft,borderTopRightRadius:bdr-tr/roundedTopRight,borderBottomRightRadius:bdr-br/roundedBottomRight,borderBottomLeftRadius:bdr-bl/roundedBottomLeft,borderTopRadius:bdr-t/roundedTop,borderRightRadius:bdr-r/roundedRight,borderBottomRadius:bdr-b/roundedBottom,borderLeftRadius:bdr-l/roundedLeft,borderStartStartRadius:bdr-ss/roundedStartStart,borderStartEndRadius:bdr-se/roundedStartEnd,borderStartRadius:bdr-s/roundedStart,borderEndStartRadius:bdr-es/roundedEndStart,borderEndEndRadius:bdr-ee/roundedEndEnd,borderEndRadius:bdr-e/roundedEnd,border:bd,borderWidth:bd-w,borderTopWidth:bd-t-w,borderLeftWidth:bd-l-w,borderRightWidth:bd-r-w,borderBottomWidth:bd-b-w,borderColor:bd-c,borderInline:bd-x/borderX,borderInlineWidth:bd-x-w/borderXWidth,borderInlineColor:bd-x-c/borderXColor,borderBlock:bd-y/borderY,borderBlockWidth:bd-y-w/borderYWidth,borderBlockColor:bd-y-c/borderYColor,borderLeft:bd-l,borderLeftColor:bd-l-c,borderInlineStart:bd-s/borderStart,borderInlineStartWidth:bd-s-w/borderStartWidth,borderInlineStartColor:bd-s-c/borderStartColor,borderRight:bd-r,borderRightColor:bd-r-c,borderInlineEnd:bd-e/borderEnd,borderInlineEndWidth:bd-e-w/borderEndWidth,borderInlineEndColor:bd-e-c/borderEndColor,borderTop:bd-t,borderTopColor:bd-t-c,borderBottom:bd-b,borderBottomColor:bd-b-c,borderBlockEnd:bd-be,borderBlockEndColor:bd-be-c,borderBlockStart:bd-bs,borderBlockStartColor:bd-bs-c,opacity:op,boxShadow:bx-sh/shadow,boxShadowColor:bx-sh-c/shadowColor,mixBlendMode:mix-bm,filter:filter,brightness:brightness,contrast:contrast,grayscale:grayscale,hueRotate:hue-rotate,invert:invert,saturate:saturate,sepia:sepia,dropShadow:drop-shadow,blur:blur,backdropFilter:bkdp,backdropBlur:bkdp-blur,backdropBrightness:bkdp-brightness,backdropContrast:bkdp-contrast,backdropGrayscale:bkdp-grayscale,backdropHueRotate:bkdp-hue-rotate,backdropInvert:bkdp-invert,backdropOpacity:bkdp-opacity,backdropSaturate:bkdp-saturate,backdropSepia:bkdp-sepia,borderCollapse:bd-cl,borderSpacing:bd-sp,borderSpacingX:bd-sx,borderSpacingY:bd-sy,tableLayout:tbl,transitionTimingFunction:trs-tmf,transitionDelay:trs-dly,transitionDuration:trs-dur,transitionProperty:trs-prop,transition:trs,animation:anim,animationName:anim-n,animationTimingFunction:anim-tmf,animationDuration:anim-dur,animationDelay:anim-dly,animationPlayState:anim-ps,animationComposition:anim-comp,animationFillMode:anim-fm,animationDirection:anim-dir,animationIterationCount:anim-ic,animationRange:anim-r,animationState:anim-s,animationRangeStart:anim-rs,animationRangeEnd:anim-re,animationTimeline:anim-tl,transformOrigin:trf-o,transformBox:trf-b,transformStyle:trf-s,transform:trf,rotate:rotate,rotateX:rotate-x,rotateY:rotate-y,rotateZ:rotate-z,scale:scale,scaleX:scale-x,scaleY:scale-y,translate:translate,translateX:translate-x/x,translateY:translate-y/y,translateZ:translate-z/z,accentColor:ac-c,caretColor:ca-c,scrollBehavior:scr-bhv,scrollbar:scr-bar,scrollbarColor:scr-bar-c,scrollbarGutter:scr-bar-g,scrollbarWidth:scr-bar-w,scrollMargin:scr-m,scrollMarginLeft:scr-ml,scrollMarginRight:scr-mr,scrollMarginTop:scr-mt,scrollMarginBottom:scr-mb,scrollMarginBlock:scr-my/scrollMarginY,scrollMarginBlockEnd:scr-mbe,scrollMarginBlockStart:scr-mbt,scrollMarginInline:scr-mx/scrollMarginX,scrollMarginInlineEnd:scr-me,scrollMarginInlineStart:scr-ms,scrollPadding:scr-p,scrollPaddingBlock:scr-py/scrollPaddingY,scrollPaddingBlockStart:scr-pbs,scrollPaddingBlockEnd:scr-pbe,scrollPaddingInline:scr-px/scrollPaddingX,scrollPaddingInlineEnd:scr-pe,scrollPaddingInlineStart:scr-ps,scrollPaddingLeft:scr-pl,scrollPaddingRight:scr-pr,scrollPaddingTop:scr-pt,scrollPaddingBottom:scr-pb,scrollSnapAlign:scr-sa,scrollSnapStop:scrs-s,scrollSnapType:scrs-t,scrollSnapStrictness:scrs-strt,scrollSnapMargin:scrs-m,scrollSnapMarginTop:scrs-mt,scrollSnapMarginBottom:scrs-mb,scrollSnapMarginLeft:scrs-ml,scrollSnapMarginRight:scrs-mr,scrollSnapCoordinate:scrs-c,scrollSnapDestination:scrs-d,scrollSnapPointsX:scrs-px,scrollSnapPointsY:scrs-py,scrollSnapTypeX:scrs-tx,scrollSnapTypeY:scrs-ty,scrollTimeline:scrtl,scrollTimelineAxis:scrtl-a,scrollTimelineName:scrtl-n,touchAction:tch-a,userSelect:us,overflow:ov,overflowWrap:ov-wrap,overflowX:ov-x,overflowY:ov-y,overflowAnchor:ov-a,overflowBlock:ov-b,overflowInline:ov-i,overflowClipBox:ovcp-bx,overflowClipMargin:ovcp-m,overscrollBehaviorBlock:ovs-bb,overscrollBehaviorInline:ovs-bi,fill:fill,stroke:stk,strokeWidth:stk-w,strokeDasharray:stk-dsh,strokeDashoffset:stk-do,strokeLinecap:stk-lc,strokeLinejoin:stk-lj,strokeMiterlimit:stk-ml,strokeOpacity:stk-op,srOnly:sr,debug:debug,appearance:ap,backfaceVisibility:bfv,clipPath:cp-path,hyphens:hy,mask:msk,maskImage:msk-i,maskSize:msk-s,textSizeAdjust:txt-adj,container:cq,containerName:cq-n,containerType:cq-t,textStyle:textStyle",w0=new Map,_0=new Map;Ak.split(",").forEach(e=>{const[t,n]=e.split(":"),[o,...i]=n.split("/");w0.set(t,o),i.length&&i.forEach(a=>{_0.set(a==="1"?o:a,t)})});const Og=e=>_0.get(e)||e,C0={conditions:{shift:Pk,finalize:Ik,breakpoints:{keys:["base","sm","md","lg","xl","2xl"]}},utility:{transform:(e,t)=>{const n=Og(e);return{className:`${w0.get(n)||wk(n)}_${m0(t)}`}},hasShorthand:!0,toHash:(e,t)=>t(e.join(":")),resolveShorthand:Og}},Rk=mk(C0),Ft=(...e)=>Rk(Ti(...e));Ft.raw=(...e)=>Ti(...e);const{mergeCss:Ti}=bk(C0),Ig=e=>({base:{},variants:{},defaultVariants:{},compoundVariants:[],...e});function Zi(e){const{base:t,variants:n,defaultVariants:o,compoundVariants:i}=Ig(e),a=h=>({...o,...Vp(h)});function r(h={}){var p;const m=a(h);let f={...t};for(const[v,y]of Object.entries(m))(p=n[v])!=null&&p[y]&&(f=Ti(f,n[v][y]));const b=Dk(i,m);return Ti(f,b)}function s(h){const p=Ig(h.config),m=Sk(h.variantKeys,Object.keys(n));return Zi({base:Ti(t,p.base),variants:Object.fromEntries(m.map(f=>[f,Ti(n[f],p.variants[f])])),defaultVariants:Mp(o,p.defaultVariants),compoundVariants:[...i,...p.compoundVariants]})}function l(h){return Ft(r(h))}const c=Object.keys(n);function u(h){return y0(h,c)}const d=Object.fromEntries(Object.entries(n).map(([h,p])=>[h,Object.keys(p)]));return Object.assign(Hs(l),{__cva__:!0,variantMap:d,variantKeys:c,raw:r,config:e,merge:s,splitVariantProps:u,getVariantProps:a})}function Dk(e,t){let n={};return e.forEach(o=>{Object.entries(o).every(([i,a])=>i==="css"?!0:(Array.isArray(a)?a:[a]).some(r=>t[i]===r))&&(n=Ti(n,o.css))}),n}function Vk(){let e="",t=0,n;for(;t<arguments.length;)(n=arguments[t++])&&typeof n=="string"&&(e&&(e+=" "),e+=n);return e}const Mk=(e,t)=>e+"__"+t;function ge(e){const t=Object.entries(Ck(e)).map(([u,d])=>[u,Zi(d)]),n=e.defaultVariants??{};function o(u){const d=t.map(([h,p])=>[h,Vk(p(u),e.className&&Mk(e.className,h))]);return Object.fromEntries(d)}function i(u){const d=t.map(([h,p])=>[h,p.raw(u)]);return Object.fromEntries(d)}const a=e.variants??{},r=Object.keys(a);function s(u){return y0(u,r)}const l=u=>({...n||{},...Vp(u)}),c=Object.fromEntries(Object.entries(a).map(([u,d])=>[u,Object.keys(d)]));return Object.assign(Hs(o),{__cva__:!1,raw:i,variantMap:c,variantKeys:r,splitVariantProps:s,getVariantProps:l})}var be=(e,t=[])=>({parts:(...n)=>{if(Nk(t))return be(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>be(e,[...t,...n]),omit:(...n)=>be(e,t.filter(o=>!n.includes(o))),rename:n=>be(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,o)=>Object.assign(n,{[o]:{selector:[`&[data-scope="${ra(e)}"][data-part="${ra(o)}"]`,`& [data-scope="${ra(e)}"][data-part="${ra(o)}"]`].join(", "),attrs:{"data-scope":ra(e),"data-part":ra(o)}}}),{})}),ra=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Nk=e=>e.length===0,Lk=Object.defineProperty,Fk=(e,t,n)=>t in e?Lk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,md=(e,t,n)=>Fk(e,typeof t!="symbol"?t+"":t,n);function Bk(e){if(!e)return!1;try{return e.selectionStart===0&&e.selectionEnd===0}catch{return e.value===""}}function zk(e){if(!e)return;const t=e.selectionStart??0,n=e.selectionEnd??0;Math.abs(n-t)===0&&t===0&&e.setSelectionRange(e.value.length,e.value.length)}var Pg=e=>Math.max(0,Math.min(1,e)),Hk=(e,t)=>e.map((n,o)=>e[(Math.max(t,0)+o)%e.length]),vd=(...e)=>t=>e.reduce((n,o)=>o(n),t),Jr=()=>{},ku=e=>typeof e=="object"&&e!==null,k0=2147483647,D=e=>e?"":void 0,Je=e=>e?"true":void 0,jk=1,Wk=9,Uk=11,et=e=>ku(e)&&e.nodeType===jk&&typeof e.nodeName=="string",Su=e=>ku(e)&&e.nodeType===Wk,Gk=e=>ku(e)&&e===e.window,S0=e=>et(e)?e.localName||"":"#document";function qk(e){return["html","body","#document"].includes(S0(e))}var Yk=e=>ku(e)&&e.nodeType!==void 0,Ba=e=>Yk(e)&&e.nodeType===Uk&&"host"in e,Kk=e=>et(e)&&e.localName==="input",ya=e=>!!(e!=null&&e.matches("a[href]")),Xk=e=>et(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function jc(e){if(!e)return!1;const t=e.getRootNode();return cs(t)===e}var Zk=/(textarea|select)/;function $u(e){if(e==null||!et(e))return!1;try{return Kk(e)&&e.selectionStart!=null||Zk.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch{return!1}}function Rt(e,t){var n;if(!e||!t||!et(e)||!et(t))return!1;const o=(n=t.getRootNode)==null?void 0:n.call(t);if(e===t||e.contains(t))return!0;if(o&&Ba(o)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function an(e){return Su(e)?e:Gk(e)?e.document:e?.ownerDocument??document}function Jk(e){return an(e).documentElement}function Ke(e){var t;return Ba(e)?Ke(e.host):Su(e)?e.defaultView??window:et(e)?((t=e.ownerDocument)==null?void 0:t.defaultView)??window:window}function cs(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function Qk(e){if(S0(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ba(e)&&e.host||Jk(e);return Ba(t)?t.host:t}function Np(e){let t;try{if(t=e.getRootNode({composed:!0}),Su(t)||Ba(t))return t}catch{}return e.ownerDocument??document}var bd=new WeakMap;function za(e){return bd.has(e)||bd.set(e,Ke(e).getComputedStyle(e)),bd.get(e)}var Lp=new Set(["menu","listbox","dialog","grid","tree","region"]),eS=e=>Lp.has(e),$0=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function E0(e,t){const n=new Set,o=Np(e),i=a=>{const r=a.querySelectorAll("[aria-controls]");for(const s of r){if(s.getAttribute("aria-expanded")!=="true")continue;const l=$0(s);for(const c of l){if(!c||n.has(c))continue;n.add(c);const u=o.getElementById(c);if(u){const d=u.getAttribute("role"),h=u.getAttribute("aria-modal")==="true";if(d&&eS(d)&&!h&&(u===t||u.contains(t)||i(u)))return!0}}}return!1};return i(e)}function T0(e,t){const n=Np(e),o=new Set,i=a=>{const r=a.querySelectorAll("[aria-controls]");for(const s of r){if(s.getAttribute("aria-expanded")!=="true")continue;const l=$0(s);for(const c of l){if(!c||o.has(c))continue;o.add(c);const u=n.getElementById(c);if(u){const d=u.getAttribute("role"),h=u.getAttribute("aria-modal")==="true";d&&Lp.has(d)&&!h&&(t(u),i(u))}}}};i(e)}function tS(e){const t=new Set;return T0(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function nS(e){const t=e.getAttribute("role");return!!(t&&Lp.has(t))}function oS(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function iS(e){var t;return oS(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function aS(e){if(!e.id)return!1;const t=Np(e),n=CSS.escape(e.id),o=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(o)&&nS(e))}var Eu=()=>typeof document<"u";function rS(){const e=navigator.userAgentData;return e?.platform??navigator.platform}function sS(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}var Fp=e=>Eu()&&e.test(rS()),O0=e=>Eu()&&e.test(sS()),lS=e=>Eu()&&e.test(navigator.vendor),Ag=()=>Eu()&&!!navigator.maxTouchPoints,cS=()=>Fp(/^iPhone/i),uS=()=>Fp(/^iPad/i)||Tu()&&navigator.maxTouchPoints>1,Bp=()=>cS()||uS(),dS=()=>Tu()||Bp(),Tu=()=>Fp(/^Mac/i),Ou=()=>dS()&&lS(/apple/i),hS=()=>O0(/Firefox/i),pS=()=>O0(/Android/i);function fS(e){var t,n,o;return((t=e.composedPath)==null?void 0:t.call(e))??((o=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:o.call(n))}function je(e){const t=fS(e);return t?.[0]??e.target}function ks(e){return I0(e).isComposing||e.keyCode===229}function gS(e){return e.pointerType===""&&e.isTrusted?!0:pS()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}var Mi=e=>e.button===0,mS=e=>e.button===2||Tu()&&e.ctrlKey&&e.button===0,qn=e=>e.ctrlKey||e.altKey||e.metaKey,vS=e=>"touches"in e&&e.touches.length>0,bS={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Rg={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function Ss(e,t={}){const{dir:n="ltr",orientation:o="horizontal"}=t;let i=e.key;return i=bS[i]??i,n==="rtl"&&o==="horizontal"&&i in Rg&&(i=Rg[i]),i}function I0(e){return e.nativeEvent??e}var yS=new Set(["PageUp","PageDown"]),xS=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]);function wS(e){return e.ctrlKey||e.metaKey?.1:yS.has(e.key)||e.shiftKey&&xS.has(e.key)?10:1}function Wc(e,t="client"){const n=vS(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Ee=(e,t,n,o)=>{const i=typeof e=="function"?e():e;return i?.addEventListener(t,n,o),()=>{i?.removeEventListener(t,n,o)}};function P0(e,t){const{type:n="HTMLInputElement",property:o="value"}=t,i=Ke(e)[n].prototype;return Object.getOwnPropertyDescriptor(i,o)??{}}function _S(e){if(e.localName==="input")return"HTMLInputElement";if(e.localName==="textarea")return"HTMLTextAreaElement";if(e.localName==="select")return"HTMLSelectElement"}function Rn(e,t,n="value"){var o;if(!e)return;const i=_S(e);i&&((o=P0(e,{type:i,property:n}).set)==null||o.call(e,t)),e.setAttribute(n,t)}function zp(e,t){var n;e&&((n=P0(e,{type:"HTMLInputElement",property:"checked"}).set)==null||n.call(e,t),t?e.setAttribute("checked",""):e.removeAttribute("checked"))}function A0(e,t){const{value:n,bubbles:o=!0}=t;if(!e)return;const i=Ke(e);e instanceof i.HTMLInputElement&&(Rn(e,`${n}`),e.dispatchEvent(new i.Event("input",{bubbles:o})))}function R0(e,t){const{checked:n,bubbles:o=!0}=t;if(!e)return;const i=Ke(e);e instanceof i.HTMLInputElement&&(zp(e,n),e.dispatchEvent(new i.Event("click",{bubbles:o})))}function CS(e){return kS(e)?e.form:e.closest("form")}function kS(e){return e.matches("textarea, input, select, button")}function SS(e,t){if(!e)return;const n=CS(e),o=i=>{i.defaultPrevented||t()};return n?.addEventListener("reset",o,{passive:!0}),()=>n?.removeEventListener("reset",o)}function $S(e,t){const n=e?.closest("fieldset");if(!n)return;t(n.disabled);const o=Ke(n),i=new o.MutationObserver(()=>t(n.disabled));return i.observe(n,{attributes:!0,attributeFilter:["disabled"]}),()=>i.disconnect()}function tr(e,t){if(!e)return;const{onFieldsetDisabledChange:n,onFormReset:o}=t,i=[SS(e,o),$S(e,n)];return()=>i.forEach(a=>a?.())}var D0=e=>et(e)&&e.tagName==="IFRAME",ES=/^(audio|video|details)$/;function V0(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var TS=e=>!Number.isNaN(V0(e)),OS=e=>V0(e)<0;function IS(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;const n=t(e);return(n===!0?e.shadowRoot:n)||null}function M0(e,t,n){const o=[...e],i=[...e],a=new Set,r=new Map;e.forEach((l,c)=>r.set(l,c));let s=0;for(;s<i.length;){const l=i[s++];if(!l||a.has(l))continue;a.add(l);const c=IS(l,t);if(c){const u=Array.from(c.querySelectorAll(Iu)).filter(n),d=r.get(l);if(d!==void 0){const h=d+1;o.splice(h,0,...u),u.forEach((p,m)=>{r.set(p,h+m)});for(let p=h+u.length;p<o.length;p++)r.set(o[p],p)}else{const h=o.length;o.push(...u),u.forEach((p,m)=>{r.set(p,h+m)})}i.push(...u)}}return o}var Iu="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",N0=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:o}=t,i=Array.from(e.querySelectorAll(Iu));(n==!0||n=="if-empty"&&i.length===0)&&et(e)&&Eo(e)&&i.unshift(e);const a=[];for(const r of i)if(Eo(r)){if(D0(r)&&r.contentDocument){const s=r.contentDocument.body;a.push(...N0(s,{getShadowRoot:o}));continue}a.push(r)}return o?M0(a,o,Eo):a};function Eo(e){return!et(e)||e.closest("[inert]")?!1:e.matches(Iu)&&Xk(e)}function js(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:o}=t,i=Array.from(e.querySelectorAll(Iu));n&&Oi(e)&&i.unshift(e);const a=[];for(const r of i)if(Oi(r)){if(D0(r)&&r.contentDocument){const s=r.contentDocument.body;a.push(...js(s,{getShadowRoot:o}));continue}a.push(r)}if(o){const r=M0(a,o,Oi);return!r.length&&n?i:r}return!a.length&&n?i:a}function Oi(e){return et(e)&&e.tabIndex>0?!0:Eo(e)&&!OS(e)}function PS(e,t={}){const n=js(e,t),o=n[0]||null,i=n[n.length-1]||null;return[o,i]}function fr(e){return e.tabIndex<0&&(ES.test(e.localName)||$u(e))&&!TS(e)?0:e.tabIndex}function Hp(e){const{root:t,getInitialEl:n,filter:o,enabled:i=!0}=e;if(!i)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t?.querySelector("[data-autofocus],[autofocus]")),!a){const r=js(t);a=o?r.filter(o)[0]:r[0]}return a||t||void 0}function AS(e){const t=e.currentTarget;if(!t)return!1;const[n,o]=PS(t);return!(jc(n)&&e.shiftKey||jc(o)&&!e.shiftKey||!n&&!o)}var L0=class F0{constructor(){md(this,"id",null),md(this,"fn_cleanup"),md(this,"cleanup",()=>{this.cancel()})}static create(){return new F0}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t?.()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function de(e){const t=L0.create();return t.request(e),t.cleanup}function Pu(e){const t=new Set;function n(o){const i=globalThis.requestAnimationFrame(o);t.add(()=>globalThis.cancelAnimationFrame(i))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function RS(e,t,n){const o=de(()=>{e.removeEventListener(t,i,!0),n()}),i=()=>{o(),n()};return e.addEventListener(t,i,{once:!0,capture:!0}),o}function DS(e,t){if(!e)return;const{attributes:n,callback:o}=t,i=e.ownerDocument.defaultView||window,a=new i.MutationObserver(r=>{for(const s of r)s.type==="attributes"&&s.attributeName&&n.includes(s.attributeName)&&o(s)});return a.observe(e,{attributes:!0,attributeFilter:n}),()=>a.disconnect()}function Ws(e,t){const{defer:n}=t,o=n?de:a=>a(),i=[];return i.push(o(()=>{const a=typeof e=="function"?e():e;i.push(DS(a,t))})),()=>{i.forEach(a=>a?.())}}function VS(e,t){const{callback:n}=t;if(!e)return;const o=e.ownerDocument.defaultView||window,i=new o.MutationObserver(n);return i.observe(e,{childList:!0,subtree:!0}),()=>i.disconnect()}function MS(e,t){const{defer:n}=t,o=n?de:a=>a(),i=[];return i.push(o(()=>{const a=typeof e=="function"?e():e;i.push(VS(a,t))})),()=>{i.forEach(a=>a?.())}}function B0(e){const t=()=>{const n=Ke(e);e.dispatchEvent(new n.MouseEvent("click"))};hS()?RS(e,"keyup",t):queueMicrotask(t)}function Uc(e){const t=Qk(e);return qk(t)?an(t).body:et(t)&&jp(t)?t:Uc(t)}function z0(e,t=[]){const n=Uc(e),o=n===e.ownerDocument.body,i=Ke(n);return o?t.concat(i,i.visualViewport||[],jp(n)?n:[]):t.concat(n,z0(n,[]))}var NS=/auto|scroll|overlay|hidden|clip/,LS=new Set(["inline","contents"]);function jp(e){const t=Ke(e),{overflow:n,overflowX:o,overflowY:i,display:a}=t.getComputedStyle(e);return NS.test(n+i+o)&&!LS.has(a)}function FS(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function $s(e,t){const{rootEl:n,...o}=t||{};!e||!n||!jp(n)||!FS(n)||e.scrollIntoView(o)}function H0(e,t){const{left:n,top:o,width:i,height:a}=t.getBoundingClientRect(),r={x:e.x-n,y:e.y-o},s={x:Pg(r.x/i),y:Pg(r.y/a)};function l(c={}){const{dir:u="ltr",orientation:d="horizontal",inverted:h}=c,p=typeof h=="object"?h.x:h,m=typeof h=="object"?h.y:h;return d==="horizontal"?u==="rtl"||p?1-s.x:s.x:m?1-s.y:s.y}return{offset:r,percent:s,getPercentValue:l}}function BS(e,t){const n=e.body,o="pointerLockElement"in e||"mozPointerLockElement"in e,i=()=>!!e.pointerLockElement;function a(){}function r(l){i(),console.error("PointerLock error occurred:",l),e.exitPointerLock()}if(!o)return;try{n.requestPointerLock()}catch{}const s=[Ee(e,"pointerlockchange",a,!1),Ee(e,"pointerlockerror",r,!1)];return()=>{s.forEach(l=>l()),e.exitPointerLock()}}var Oa="default",wh="",dc=new WeakMap;function zS(e={}){const{target:t,doc:n}=e,o=n??document,i=o.documentElement;return Bp()?(Oa==="default"&&(wh=i.style.webkitUserSelect,i.style.webkitUserSelect="none"),Oa="disabled"):t&&(dc.set(t,t.style.userSelect),t.style.userSelect="none"),()=>j0({target:t,doc:o})}function j0(e={}){const{target:t,doc:n}=e,o=(n??document).documentElement;if(Bp()){if(Oa!=="disabled")return;Oa="restoring",setTimeout(()=>{Pu(()=>{Oa==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=wh||""),wh="",Oa="default")})},300)}else if(t&&dc.has(t)){const i=dc.get(t);t.style.userSelect==="none"&&(t.style.userSelect=i??""),t.getAttribute("style")===""&&t.removeAttribute("style"),dc.delete(t)}}function Wp(e={}){const{defer:t,target:n,...o}=e,i=t?de:r=>r(),a=[];return a.push(i(()=>{const r=typeof n=="function"?n():n;a.push(zS({...o,target:r}))})),()=>{a.forEach(r=>r?.())}}function W0(e,t){const{onPointerMove:n,onPointerUp:o}=t,i=s=>{const l=Wc(s),c=Math.sqrt(l.x**2+l.y**2),u=s.pointerType==="touch"?10:5;if(!(c<u)){if(s.pointerType==="mouse"&&s.button===0){a(s);return}n({point:l,event:s})}},a=s=>{const l=Wc(s);o({point:l,event:s})},r=[Ee(e,"pointermove",i,!1),Ee(e,"pointerup",a,!1),Ee(e,"pointercancel",a,!1),Ee(e,"contextmenu",a,!1),Wp({doc:e})];return()=>{r.forEach(s=>s())}}function U0(e){const{pointerNode:t,keyboardNode:n=t,onPress:o,onPressStart:i,onPressEnd:a,isValidKey:r=v=>v.key==="Enter"}=e;if(!t)return Jr;const s=Ke(t);let l=Jr,c=Jr,u=Jr;const d=v=>({point:Wc(v),event:v});function h(v){i?.(d(v))}function p(v){a?.(d(v))}const m=Ee(t,"pointerdown",v=>{c();const y=Ee(s,"pointerup",_=>{const k=je(_);Rt(t,k)?o?.(d(_)):a?.(d(_))},{passive:!o,once:!0}),x=Ee(s,"pointercancel",p,{passive:!a,once:!0});c=vd(y,x),jc(n)&&v.pointerType==="mouse"&&v.preventDefault(),h(v)},{passive:!i}),f=Ee(n,"focus",b);l=vd(m,f);function b(){const v=k=>{if(!r(k))return;const E=S=>{if(!r(S))return;const R=new s.PointerEvent("pointerup"),B=d(R);o?.(B),a?.(B)};c(),c=Ee(n,"keyup",E);const P=new s.PointerEvent("pointerdown");h(P)},y=()=>{const k=new s.PointerEvent("pointercancel");p(k)},x=Ee(n,"keydown",v),_=Ee(n,"blur",y);u=vd(x,_)}return()=>{l(),c(),u()}}function ni(e,t){return Array.from(e?.querySelectorAll(t)??[])}function G0(e,t){return e?.querySelector(t)??null}var Up=e=>e.id;function HS(e,t,n=Up){return e.find(o=>n(o)===t)}function Au(e,t,n=Up){const o=HS(e,t,n);return o?e.indexOf(o):-1}function Gp(e,t,n=!0){let o=Au(e,t);return o=n?(o+1)%e.length:Math.min(o+1,e.length-1),e[o]}function qp(e,t,n=!0){let o=Au(e,t);return o===-1?n?e[e.length-1]:null:(o=n?(o-1+e.length)%e.length:Math.max(0,o-1),e[o])}var jS=e=>e.split("").map(t=>{const n=t.charCodeAt(0);return n>0&&n<128?t:n>=128&&n<=255?`/x${n.toString(16)}`.replace("/","\\"):""}).join("").trim(),WS=e=>{var t;return jS(((t=e.dataset)==null?void 0:t.valuetext)??e.textContent??"")},US=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());function GS(e,t,n,o=Up){const i=n?Au(e,n,o):-1;let a=n?Hk(e,i):e;return t.length===1&&(a=a.filter(r=>o(r)!==n)),a.find(r=>US(WS(r),t))}function qS(e,t,n){const o=e.getAttribute(t),i=o!=null;return e.setAttribute(t,n),()=>{i?e.setAttribute(t,o):e.removeAttribute(t)}}function Yp(e,t){if(!e)return Jr;const n=Object.keys(t).reduce((o,i)=>(o[i]=e.style.getPropertyValue(i),o),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function YS(e,t){const{state:n,activeId:o,key:i,timeout:a=350,itemToId:r}=t,s=n.keysSoFar+i,l=s.length>1&&Array.from(s).every(p=>p===s[0])?s[0]:s;let c=e.slice();const u=GS(c,l,o,r);function d(){clearTimeout(n.timer),n.timer=-1}function h(p){n.keysSoFar=p,d(),p!==""&&(n.timer=+setTimeout(()=>{h(""),d()},a))}return h(s),u}var Io=Object.assign(YS,{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:KS});function KS(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var Ru={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"};function XS(e,t,n){const{signal:o}=t;return[new Promise((i,a)=>{const r=setTimeout(()=>{a(new Error(`Timeout of ${n}ms exceeded`))},n);o.addEventListener("abort",()=>{clearTimeout(r),a(new Error("Promise aborted"))}),e.then(s=>{o.aborted||(clearTimeout(r),i(s))}).catch(s=>{o.aborted||(clearTimeout(r),a(s))})}),()=>t.abort()]}function ZS(e,t){const{timeout:n,rootNode:o}=t,i=Ke(o),a=an(o),r=new i.AbortController;return XS(new Promise(s=>{const l=e();if(l){s(l);return}const c=new i.MutationObserver(()=>{const u=e();u&&u.isConnected&&(c.disconnect(),s(u))});c.observe(a.body,{childList:!0,subtree:!0})}),r,n)}var JS=Object.defineProperty,q0=e=>{throw TypeError(e)},QS=(e,t,n)=>t in e?JS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mo=(e,t,n)=>QS(e,typeof t!="symbol"?t+"":t,n),e$=(e,t,n)=>t.has(e)||q0("Cannot "+n),Dg=(e,t,n)=>(e$(e,t,"read from private field"),t.get(e)),t$=(e,t,n)=>t.has(e)?q0("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n);function hc(e){return e==null?[]:Array.isArray(e)?e:[e]}var n$=e=>Array.from(Array(e).keys()),Va=e=>e[0],Us=e=>e[e.length-1],o$=(e,t)=>e.indexOf(t)!==-1,wo=(e,...t)=>e.concat(t),Ni=(e,...t)=>e.filter(n=>!t.includes(n)),Vg=(e,t)=>e.filter((n,o)=>o!==t),Dn=e=>Array.from(new Set(e)),yd=(e,t)=>{const n=new Set(t);return e.filter(o=>!n.has(o))},zi=(e,t)=>o$(e,t)?Ni(e,t):wo(e,t);function Gc(e,t,n={}){const{step:o=1,loop:i=!0}=n,a=t+o,r=e.length,s=r-1;return t===-1?o>0?0:s:a<0?i?s:0:a>=r?i?0:t>r?r:t:a}function i$(e,t,n={}){return e[Gc(e,t,n)]}function Y0(e,t,n={}){const{step:o=1,loop:i=!0}=n;return Gc(e,t,{step:-o,loop:i})}function a$(e,t,n={}){return e[Y0(e,t,n)]}function Mg(e,t){return e.reduce((n,o,i)=>{var a;return i%t===0?n.push([o]):(a=Us(n))==null||a.push(o),n},[])}function K0(e){return e.reduce((t,n)=>Array.isArray(n)?t.concat(K0(n)):t.concat(n),[])}function Ng(e,t){return e.reduce(([n,o],i)=>(t(i)?n.push(i):o.push(i),[n,o]),[[],[]])}var Lg=e=>e?.constructor.name==="Array",r$=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!bt(e[n],t[n]))return!1;return!0},bt=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual=="function"&&typeof t?.isEqual=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(Lg(e)&&Lg(t))return r$(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(t??Object.create(null)),o=n.length;for(let i=0;i<o;i++)if(!Reflect.has(e,n[i]))return!1;for(let i=0;i<o;i++){const a=n[i];if(!bt(e[a],t[a]))return!1}return!0},Ia=e=>Array.isArray(e),s$=e=>e===!0||e===!1,X0=e=>e!=null&&typeof e=="object",Ii=e=>X0(e)&&!Ia(e),us=e=>typeof e=="string",qo=e=>typeof e=="function",l$=e=>e==null,Yo=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c$=e=>Object.prototype.toString.call(e),Z0=Function.prototype.toString,u$=Z0.call(Object),d$=e=>{if(!X0(e)||c$(e)!="[object Object]"||f$(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=Yo(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Z0.call(n)==u$},h$=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,p$=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,f$=e=>h$(e)||p$(e),pl=(e,...t)=>(typeof e=="function"?e(...t):e)??void 0,g$=()=>{},Es=(...e)=>(...t)=>{e.forEach(function(n){n?.(...t)})},J0=(()=>{let e=0;return()=>(e++,e.toString(36))})();function Bt(e,t,...n){var o;if(e in t){const a=t[e];return qo(a)?a(...n):a}const i=new Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw(o=Error.captureStackTrace)==null||o.call(Error,i,Bt),i}var Q0=(e,t)=>{var n;try{return e()}catch(o){return o instanceof Error&&((n=Error.captureStackTrace)==null||n.call(Error,o,Q0)),t?.()}},{floor:ex,abs:Fg,round:Du,min:m$,max:v$,pow:b$,sign:y$}=Math,_h=e=>Number.isNaN(e),ui=e=>_h(e)?0:e,tx=(e,t)=>(e%t+t)%t,x$=(e,t)=>(e%t+t)%t,w$=(e,t)=>ui(e)>=t,_$=(e,t)=>ui(e)<=t,ds=(e,t,n)=>{const o=ui(e),i=t==null||o>=t,a=n==null||o<=n;return i&&a},C$=(e,t,n)=>Du((ui(e)-t)/n)*n+t,vt=(e,t,n)=>m$(v$(ui(e),t),n),k$=(e,t,n)=>(ui(e)-t)/(n-t),S$=(e,t,n,o)=>vt(C$(e*(n-t)+t,t,o),t,n),Bg=(e,t)=>{let n=e,o=t.toString(),i=o.indexOf("."),a=i>=0?o.length-i:0;if(a>0){let r=b$(10,a);n=Du(n*r)/r}return n},hs=(e,t)=>typeof t=="number"?ex(e*t+.5)/t:Du(e),zg=(e,t,n,o)=>{const i=t!=null?Number(t):0,a=Number(n),r=(e-i)%o;let s=Fg(r)*2>=o?e+y$(r)*(o-Fg(r)):e-r;if(s=Bg(s,o),!_h(i)&&s<i)s=i;else if(!_h(a)&&s>a){const l=ex((a-i)/o),c=i+l*o;s=l<=0||c<i?a:c}return Bg(s,o)},Be=(e,t=0,n=10)=>{const o=Math.pow(n,t);return Du(e*o)/o},Hg=e=>{if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n},nx=(e,t,n)=>{let o=t==="+"?e+n:e-n;if(e%1!==0||n%1!==0){const i=10**Math.max(Hg(e),Hg(n));e=Math.round(e*i),n=Math.round(n*i),o=t==="+"?e+n:e-n,o/=i}return o},$$=(e,t)=>nx(ui(e),"+",t),E$=(e,t)=>nx(ui(e),"-",t),No=e=>typeof e=="number"?`${e}px`:e;function Vu(e){if(!d$(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(o=>typeof o=="string"),n={};for(const o of t){const i=e[o];i!==void 0&&(n[o]=Vu(i))}return n}function Uo(e,t){const n={};for(const o of t){const i=e[o];i!==void 0&&(n[o]=i)}return n}function T$(e,t=Object.is){let n={...e};const o=new Set,i=r=>(o.add(r),()=>o.delete(r)),a=()=>{o.forEach(r=>r())};return{subscribe:i,get:r=>n[r],set:(r,s)=>{t(n[r],s)||(n[r]=s,a())},update:r=>{let s=!1;for(const l in r){const c=r[l];c!==void 0&&!t(n[l],c)&&(n[l]=c,s=!0)}s&&a()},snapshot:()=>({...n})}}var fl=()=>performance.now(),pc,O$=class{constructor(t){this.onTick=t,Mo(this,"frameId",null),Mo(this,"pausedAtMs",null),Mo(this,"context"),Mo(this,"cancelFrame",()=>{this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null)}),Mo(this,"setStartMs",n=>{this.context.startMs=n}),Mo(this,"start",()=>{if(this.frameId!==null)return;const n=fl();this.pausedAtMs!==null?(this.context.startMs+=n-this.pausedAtMs,this.pausedAtMs=null):this.context.startMs=n,this.frameId=requestAnimationFrame(Dg(this,pc))}),Mo(this,"pause",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=fl())}),Mo(this,"stop",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=null)}),t$(this,pc,n=>{if(this.context.now=n,this.context.deltaMs=n-this.context.startMs,this.onTick(this.context)===!1){this.stop();return}this.frameId=requestAnimationFrame(Dg(this,pc))}),this.context={now:0,startMs:fl(),deltaMs:0}}get elapsedMs(){return this.pausedAtMs!==null?this.pausedAtMs-this.context.startMs:fl()-this.context.startMs}};pc=new WeakMap;function xd(e,t){const n=new O$(({deltaMs:o})=>{if(o>=t)return e(),!1});return n.start(),()=>n.stop()}function Po(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function I$(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function Kp(e,t){if(e==null)throw new Error(t())}function Xp(e,t,n){let o=[];for(const i of t)e[i]==null&&o.push(i);if(o.length>0)throw new Error(`[zag-js${n?` > ${n}`:""}] missing required props: ${o.join(", ")}`)}var P$=(...e)=>e.map(t=>{var n;return(n=t?.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),A$=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,jg=e=>{const t={};let n;for(;n=A$.exec(e);)t[n[1]]=n[2];return t},R$=(e,t)=>{if(us(e)){if(us(t))return`${e};${t}`;e=jg(e)}else us(t)&&(t=jg(t));return Object.assign({},e??{},t??{})};function Gs(...e){let t={};for(let n of e){if(!n)continue;for(let i in t){if(i.startsWith("on")&&typeof t[i]=="function"&&typeof n[i]=="function"){t[i]=Es(n[i],t[i]);continue}if(i==="className"||i==="class"){t[i]=P$(t[i],n[i]);continue}if(i==="style"){t[i]=R$(t[i],n[i]);continue}t[i]=n[i]!==void 0?n[i]:t[i]}for(let i in n)t[i]===void 0&&(t[i]=n[i]);const o=Object.getOwnPropertySymbols(n);for(let i of o)t[i]=n[i]}return t}function Ch(e,t,n){let o=[],i;return a=>{const r=e(a);return(r.length!==o.length||r.some((s,l)=>!bt(o[l],s)))&&(o=r,i=t(r,a)),i}}function Ct(){return{and:(...e)=>function(t){return e.every(n=>t.guard(n))},or:(...e)=>function(t){return e.some(n=>t.guard(n))},not:e=>function(t){return!t.guard(e)}}}function Mu(){return{guards:Ct(),createMachine:e=>e,choose:e=>function({choose:t}){var n;return(n=t(e))==null?void 0:n.actions}}}var xa=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(xa||{}),wd="__init__";function D$(e){const t=()=>{var o;return((o=e.getRootNode)==null?void 0:o.call(e))??document},n=()=>an(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>cs(t()),isActiveElement:jc,getById:o=>t().getElementById(o)}}function V$(e){return new Proxy({},{get(t,n){return n==="style"?o=>e({style:o}).style:e}})}var ie=()=>e=>Array.from(new Set(e)),ox=be("accordion").parts("root","item","itemTrigger","itemContent","itemIndicator"),gr=ox.build(),qc=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`accordion:${e.id}`},M$=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.item)==null?void 0:o.call(n,t))??`accordion:${e.id}:item:${t}`},Wg=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemContent)==null?void 0:o.call(n,t))??`accordion:${e.id}:content:${t}`},Yc=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemTrigger)==null?void 0:o.call(n,t))??`accordion:${e.id}:trigger:${t}`},N$=e=>e.getById(qc(e)),Nu=e=>{const t=`[aria-controls][data-ownedby='${CSS.escape(qc(e))}']:not([disabled])`;return ni(N$(e),t)},L$=e=>Va(Nu(e)),F$=e=>Us(Nu(e)),B$=(e,t)=>Gp(Nu(e),Yc(e,t)),z$=(e,t)=>qp(Nu(e),Yc(e,t));function H$(e,t){const{send:n,context:o,prop:i,scope:a,computed:r}=e,s=o.get("focusedValue"),l=o.get("value"),c=i("multiple");function u(h){let p=h;!c&&p.length>1&&(p=[p[0]]),n({type:"VALUE.SET",value:p})}function d(h){return{expanded:l.includes(h.value),focused:s===h.value,disabled:!!(h.disabled??i("disabled"))}}return{focusedValue:s,value:l,setValue:u,getItemState:d,getRootProps(){return t.element({...gr.root.attrs,dir:i("dir"),id:qc(a),"data-orientation":i("orientation")})},getItemProps(h){const p=d(h);return t.element({...gr.item.attrs,dir:i("dir"),id:M$(a,h.value),"data-state":p.expanded?"open":"closed","data-focus":D(p.focused),"data-disabled":D(p.disabled),"data-orientation":i("orientation")})},getItemContentProps(h){const p=d(h);return t.element({...gr.itemContent.attrs,dir:i("dir"),role:"region",id:Wg(a,h.value),"aria-labelledby":Yc(a,h.value),hidden:!p.expanded,"data-state":p.expanded?"open":"closed","data-disabled":D(p.disabled),"data-focus":D(p.focused),"data-orientation":i("orientation")})},getItemIndicatorProps(h){const p=d(h);return t.element({...gr.itemIndicator.attrs,dir:i("dir"),"aria-hidden":!0,"data-state":p.expanded?"open":"closed","data-disabled":D(p.disabled),"data-focus":D(p.focused),"data-orientation":i("orientation")})},getItemTriggerProps(h){const{value:p}=h,m=d(h);return t.button({...gr.itemTrigger.attrs,type:"button",dir:i("dir"),id:Yc(a,p),"aria-controls":Wg(a,p),"aria-expanded":m.expanded,disabled:m.disabled,"data-orientation":i("orientation"),"aria-disabled":m.disabled,"data-state":m.expanded?"open":"closed","data-ownedby":qc(a),onFocus(){m.disabled||n({type:"TRIGGER.FOCUS",value:p})},onBlur(){m.disabled||n({type:"TRIGGER.BLUR"})},onClick(f){m.disabled||(Ou()&&f.currentTarget.focus(),n({type:"TRIGGER.CLICK",value:p}))},onKeyDown(f){if(f.defaultPrevented||m.disabled)return;const b={ArrowDown(){r("isHorizontal")||n({type:"GOTO.NEXT",value:p})},ArrowUp(){r("isHorizontal")||n({type:"GOTO.PREV",value:p})},ArrowRight(){r("isHorizontal")&&n({type:"GOTO.NEXT",value:p})},ArrowLeft(){r("isHorizontal")&&n({type:"GOTO.PREV",value:p})},Home(){n({type:"GOTO.FIRST",value:p})},End(){n({type:"GOTO.LAST",value:p})}},v=Ss(f,{dir:i("dir"),orientation:i("orientation")}),y=b[v];y&&(y(f),f.preventDefault())}})}}}var{and:j$,not:W$}=Ct(),U$={props({props:e}){return{collapsible:!1,multiple:!1,orientation:"vertical",defaultValue:[],...e}},initialState(){return"idle"},context({prop:e,bindable:t}){return{focusedValue:t(()=>({defaultValue:null,sync:!0,onChange(n){var o;(o=e("onFocusChange"))==null||o({value:n})}})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){var o;(o=e("onValueChange"))==null||o({value:n})}}))}},computed:{isHorizontal:({prop:e})=>e("orientation")==="horizontal"},on:{"VALUE.SET":{actions:["setValue"]}},states:{idle:{on:{"TRIGGER.FOCUS":{target:"focused",actions:["setFocusedValue"]}}},focused:{on:{"GOTO.NEXT":{actions:["focusNextTrigger"]},"GOTO.PREV":{actions:["focusPrevTrigger"]},"TRIGGER.CLICK":[{guard:j$("isExpanded","canToggle"),actions:["collapse"]},{guard:W$("isExpanded"),actions:["expand"]}],"GOTO.FIRST":{actions:["focusFirstTrigger"]},"GOTO.LAST":{actions:["focusLastTrigger"]},"TRIGGER.BLUR":{target:"idle",actions:["clearFocusedValue"]}}}},implementations:{guards:{canToggle:({prop:e})=>!!e("collapsible")||!!e("multiple"),isExpanded:({context:e,event:t})=>e.get("value").includes(t.value)},actions:{collapse({context:e,prop:t,event:n}){const o=t("multiple")?Ni(e.get("value"),n.value):[];e.set("value",o)},expand({context:e,prop:t,event:n}){const o=t("multiple")?wo(e.get("value"),n.value):[n.value];e.set("value",o)},focusFirstTrigger({scope:e}){var t;(t=L$(e))==null||t.focus()},focusLastTrigger({scope:e}){var t;(t=F$(e))==null||t.focus()},focusNextTrigger({context:e,scope:t}){const n=e.get("focusedValue");if(!n)return;const o=B$(t,n);o?.focus()},focusPrevTrigger({context:e,scope:t}){const n=e.get("focusedValue");if(!n)return;const o=z$(t,n);o?.focus()},setFocusedValue({context:e,event:t}){e.set("focusedValue",t.value)},clearFocusedValue({context:e}){e.set("focusedValue",null)},setValue({context:e,event:t}){e.set("value",t.value)},coarseValue({context:e,prop:t}){!t("multiple")&&e.get("value").length>1&&(Po("The value of accordion should be a single value when multiple is false."),e.set("value",[e.get("value")[0]]))}}}};ie()(["collapsible","dir","disabled","getRootNode","id","ids","multiple","onFocusChange","onValueChange","orientation","value","defaultValue"]);ie()(["value","disabled"]);const G$={default:{},floating:{root:{gap:"12","& > div[data-part='item']":{boxShadow:"stroke-bordered-interactive",borderBottom:"none"}}}},qs=ge({slots:[...ox.keys(),"itemTriggerPrefix","itemTriggerContent"],base:{root:{width:"100%",display:"flex",flexDirection:"column",fontFamily:"sans"},item:{borderBottom:"1px solid {colors.border.muted}",borderRadius:"lg",backgroundColor:"background.default",_hover:{backgroundColor:"background.hover"}},itemTrigger:{width:"100%",paddingX:"8",paddingY:"8",cursor:"pointer",display:"flex",gap:"8",alignItems:"center",textAlign:"left",border:"none",outline:"none",backgroundColor:"transparent",color:"text.normal",fontSize:"base",fontWeight:"medium",lineHeight:"lg",fontStyle:"normal",letterSpacing:"normal"},itemTriggerPrefix:{padding:"2","& > svg":{display:"block"}},itemTriggerContent:{flex:"1",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"8"},itemContent:{backgroundColor:"transparent",color:"text.subtle",fontSize:"small",fontWeight:"normal",fontStyle:"normal",lineHeight:"150%",letterSpacing:"0%",padding:"8",paddingTop:"4",animation:"collapse-in",_closed:{animation:"collapse-out"}},itemIndicator:{width:"24",height:"24",display:"flex",alignItems:"center",justifyContent:"center",transformOrigin:"center",transitionDuration:"200ms",transitionProperty:"transform",transitionTimingFunction:"{easings.default}",_open:{transform:"rotate(180deg)"}}},variants:{variant:G$},defaultVariants:{variant:"default"}});function q$(e){const t=Bs(),n=t?.type.emits,o={};n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`);for(const i of n)o[zC(s0(i))]=(...a)=>e(i,...a);return o}function Y$(e){const t=Bs(),n=Object.keys(t?.type.props??{}).reduce((i,a)=>{const r=(t?.type.props[a]).default;return r!==void 0&&(i[a]=r),i},{}),o=l0(e);return I(()=>{const i={},a=t?.vnode.props??{};return Object.keys(a).forEach(r=>{i[s0(r)]=a[r]}),Object.keys({...n,...i}).reduce((r,s)=>(o.value[s]!==void 0&&(r[s]=o.value[s]),r),{})})}function lt(e,t){const n=Y$(e),o=t?q$(t):{};return I(()=>({...n.value,...o}))}const Re=e=>{const t=Symbol(e);return[n=>Rp(t,n),n=>xt(t,n),t]},[io,Ys]=Re("RenderStrategyProps");function K$(e){const t=Ye(e);return t?.$el??t}const X$=e=>Object.prototype.hasOwnProperty.call(e,"nodeName")&&typeof e.nodeName=="string";function Y(){const e=Bs(),t=fe(),n=I(()=>{var r,s;return["#text","#comment"].includes((r=t.value)==null?void 0:r.$el.nodeName)?(s=t.value)==null?void 0:s.$el.nextElementSibling:K$(t)}),o=Object.assign({},e.exposed),i={};for(const r in e.props)Object.defineProperty(i,r,{enumerable:!0,configurable:!0,get:()=>e.props[r]});if(Object.keys(o).length>0)for(const r in o)Object.defineProperty(i,r,{enumerable:!0,configurable:!0,get:()=>o[r]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function a(r){t.value=r,!(X$(r)||!r)&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>r.$el}),e.exposed=i)}return{forwardRef:a,currentRef:t,currentElement:n}}const Z$=O({name:"Dynamic",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var o;if(!n.default)return null;const i=ix(n.default()),[a,...r]=i;if(Object.keys(t).length>0){(o=a.props)==null||delete o.ref;const s=Gs(t,a.props??{}),l=HC(a,s);for(const c in s)c.startsWith("on")&&(l.props||(l.props={}),l.props[c]=s[c]);return i.length===1?l:[l,...r]}return i}}});function ix(e){return e?e.flatMap(t=>t.type===Se?ix(t.children):[t]):[]}const J$="br, hr, img, input, area, textarea".split(", "),Q$=e=>typeof e=="string"&&J$.includes(e),_d=e=>O({name:"Polymorphic",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1}},setup(t,{attrs:n,slots:o}){return t.asChild?()=>Pt(Z$,n,o):()=>{var i;return Pt(e,n,Q$(e)||(i=o.default)==null?void 0:i.call(o))}}});function eE(){const e=new Map;return new Proxy(_d,{apply(t,n,o){return _d(o[0])},get(t,n){return e.has(n)||e.set(n,_d(n)),e.get(n)}})}const X=eE(),[ax,Ks]=Re("CollapsibleContext"),tE=O({__name:"collapsible-content",props:{asChild:{type:Boolean}},setup(e){const t=Ks();return Y(),(n,o)=>g(t).unmounted?oe("",!0):(w(),$(g(X).div,U({key:0},g(t).getContentProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),nE=O({__name:"collapsible-context",setup(e){const t=Ks();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),oE=O({__name:"collapsible-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return ax(n),Y(),(o,i)=>(w(),$(g(X).div,U(n.value.getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}});var iE=be("collapsible").parts("root","trigger","content","indicator"),gl=iE.build(),aE=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`collapsible:${e.id}`},kh=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`collapsible:${e.id}:content`},rE=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`collapsible:${e.id}:trigger`},mr=e=>e.getById(kh(e));function sE(e,t){const{state:n,send:o,context:i,scope:a,prop:r}=e,s=n.matches("open")||n.matches("closing"),l=n.matches("open"),c=n.matches("closed"),{width:u,height:d}=i.get("size"),h=!!r("disabled"),p=r("collapsedHeight"),m=r("collapsedWidth"),f=p!=null,b=m!=null,v=f||b,y=!i.get("initial")&&l;return{disabled:h,visible:s,open:l,measureSize(){o({type:"size.measure"})},setOpen(x){n.matches("open")!==x&&o({type:x?"open":"close"})},getRootProps(){return t.element({...gl.root.attrs,"data-state":l?"open":"closed",dir:r("dir"),id:aE(a)})},getContentProps(){return t.element({...gl.content.attrs,id:kh(a),"data-collapsible":"","data-state":y?void 0:l?"open":"closed","data-disabled":D(h),"data-has-collapsed-size":D(v),hidden:!s&&!v,dir:r("dir"),style:{"--height":No(d),"--width":No(u),"--collapsed-height":No(p),"--collapsed-width":No(m),...c&&f&&{overflow:"hidden",minHeight:No(p),maxHeight:No(p)},...c&&b&&{overflow:"hidden",minWidth:No(m),maxWidth:No(m)}}})},getTriggerProps(){return t.element({...gl.trigger.attrs,id:rE(a),dir:r("dir"),type:"button","data-state":l?"open":"closed","data-disabled":D(h),"aria-controls":kh(a),"aria-expanded":s||!1,onClick(x){x.defaultPrevented||h||o({type:l?"close":"open"})}})},getIndicatorProps(){return t.element({...gl.indicator.attrs,dir:r("dir"),"data-state":l?"open":"closed","data-disabled":D(h)})}}}var lE={initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{size:e(()=>({defaultValue:{height:0,width:0},sync:!0})),initial:e(()=>({defaultValue:!1}))}},refs(){return{cleanup:void 0,stylesRef:void 0}},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["setInitial","computeSize","toggleVisibility"])})},exit:["clearInitial","cleanupNode"],states:{closed:{effects:["trackTabbableElements"],on:{"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitial","computeSize","invokeOnOpen"]}]}},closing:{effects:["trackExitAnimation"],on:{"controlled.close":{target:"closed"},"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitial","invokeOnOpen"]}],close:[{guard:"isOpenControlled",actions:["invokeOnExitComplete"]},{target:"closed",actions:["setInitial","computeSize","invokeOnExitComplete"]}],"animation.end":{target:"closed",actions:["invokeOnExitComplete","clearInitial"]}}},open:{effects:["trackEnterAnimation"],on:{"controlled.close":{target:"closing"},close:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closing",actions:["setInitial","computeSize","invokeOnClose"]}],"size.measure":{actions:["measureSize"]},"animation.end":{actions:["clearInitial"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackEnterAnimation:({send:e,scope:t})=>{let n;const o=de(()=>{const i=mr(t);if(!i)return;const a=za(i).animationName;if(!a||a==="none"){e({type:"animation.end"});return}const r=s=>{je(s)===i&&e({type:"animation.end"})};i.addEventListener("animationend",r),n=()=>{i.removeEventListener("animationend",r)}});return()=>{o(),n?.()}},trackExitAnimation:({send:e,scope:t})=>{let n;const o=de(()=>{const i=mr(t);if(!i)return;const a=za(i).animationName;if(!a||a==="none"){e({type:"animation.end"});return}const r=l=>{je(l)===i&&e({type:"animation.end"})};i.addEventListener("animationend",r);const s=Yp(i,{animationFillMode:"forwards"});n=()=>{i.removeEventListener("animationend",r),Pu(()=>s())}});return()=>{o(),n?.()}},trackTabbableElements:({scope:e,prop:t})=>{if(!t("collapsedHeight")&&!t("collapsedWidth"))return;const n=mr(e);if(!n)return;const o=()=>{const r=js(n).map(s=>qS(s,"inert",""));return()=>{r.forEach(s=>s())}};let i=o();const a=MS(n,{callback(){i(),i=o()}});return()=>{i(),a()}}},actions:{setInitial:({context:e,flush:t})=>{t(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},cleanupNode:({refs:e})=>{e.set("stylesRef",null)},measureSize:({context:e,scope:t})=>{const n=mr(t);if(!n)return;const{height:o,width:i}=n.getBoundingClientRect();e.set("size",{height:o,width:i})},computeSize:({refs:e,scope:t,context:n})=>{var o;(o=e.get("cleanup"))==null||o();const i=de(()=>{const a=mr(t);if(!a)return;const r=a.hidden;a.style.animationName="none",a.style.animationDuration="0s",a.hidden=!1;const s=a.getBoundingClientRect();n.set("size",{height:s.height,width:s.width}),n.get("initial")&&(a.style.animationName="",a.style.animationDuration=""),a.hidden=r});e.set("cleanup",i)},invokeOnOpen:({prop:e})=>{var t;(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose:({prop:e})=>{var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},toggleVisibility:({prop:e,send:t})=>{t({type:e("open")?"controlled.open":"controlled.close"})}}}};ie()(["dir","disabled","getRootNode","id","ids","collapsedHeight","collapsedWidth","onExitComplete","onOpenChange","defaultOpen","open"]);function cE(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}var Ug={htmlFor:"for",className:"class",onDoubleClick:"onDblclick",onChange:"onInput",onFocus:"onFocusin",onBlur:"onFocusout",defaultValue:"value",defaultChecked:"checked"},uE="viewBox,className,preserveAspectRatio,fillRule,clipPath,clipRule,strokeWidth,strokeLinecap,strokeLinejoin,strokeDasharray,strokeDashoffset,strokeMiterlimit".split(",");function dE(e){return e in Ug?Ug[e]:e.startsWith("on")?`on${cE(e.substr(2))}`:uE.includes(e)?e:e.toLowerCase()}var rn=V$(e=>{const t={};for(const n in e){const o=e[n];n==="children"?typeof o=="string"&&(t.innerHTML=o):t[dE(n)]=e[n]}return t});function Kc(e){const t=e().defaultValue??e().value,n=e().isEqual??Object.is,o=Hc(t),i=I(()=>e().value!==void 0),a=Hc(i.value?e().value:o.value);return{initial:t,ref:a,get(){return i.value?e().value:o.value},set(r){var s,l;const c=i.value?e().value:o.value,u=qo(r)?r(c):r;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:u,prev:c}),i.value||(o.value=u),n(u,c)||(l=(s=e()).onChange)==null||l.call(s,u,c)},invoke(r,s){var l,c;(c=(l=e()).onChange)==null||c.call(l,r,s)},hash(r){var s,l;return((l=(s=e()).hash)==null?void 0:l.call(s,r))??String(r)}}}Kc.cleanup=e=>{Dp(()=>e())};Kc.ref=e=>{let t=e;return{get:()=>t,set:n=>{t=n}}};function hE(e){const t={current:e};return{get(n){return t.current[n]},set(n,o){t.current[n]=o}}}var pE=(e,t)=>{ze(()=>[...e.map(n=>n())],(n,o)=>{let i=!1;for(let a=0;a<n.length;a++)if(!bt(o[a],Ye(n[a]))){i=!0;break}i&&t()})};function Gt(e,t={}){var n,o,i;const a=I(()=>{const{id:A,ids:G,getRootNode:ee}=Ye(t);return D$({id:A,ids:G,getRootNode:ee})}),r=(...A)=>{e.debug&&console.log(...A)},s=I(()=>{var A;return((A=e.props)==null?void 0:A.call(e,{props:Vu(Ye(t)),get scope(){return a.value}}))??Ye(t)}),l=fE(s),c=(n=e.context)==null?void 0:n.call(e,{prop:l,bindable:Kc,get scope(){return a.value},flush:Gg,getContext(){return u},getComputed(){return P},getRefs(){return v},getEvent(){return f()}}),u={get(A){var G;return(G=c[A])==null?void 0:G.get()},set(A,G){var ee;(ee=c[A])==null||ee.set(G)},initial(A){var G;return(G=c[A])==null?void 0:G.initial},hash(A){var G,ee;const z=(G=c[A])==null?void 0:G.get();return(ee=c[A])==null?void 0:ee.hash(z)}};let d=new Map,h=null,p={current:null},m={current:{type:""}};const f=()=>({...m.current,current(){return m.current},previous(){return p.current}}),b=()=>({...S,matches(...A){const G=S.get();return A.includes(G)},hasTag(A){var G,ee;const z=S.get();return!!((ee=(G=e.states[z])==null?void 0:G.tags)!=null&&ee.includes(A))}}),v=hE(((o=e.refs)==null?void 0:o.call(e,{prop:l,context:u}))??{}),y=()=>({state:b(),context:u,event:f(),prop:l,send:B,action:x,guard:_,track:pE,refs:v,computed:P,flush:Gg,get scope(){return a.value},choose:E}),x=A=>{const G=qo(A)?A(y()):A;if(!G)return;const ee=G.map(z=>{var W,q;const ne=(q=(W=e.implementations)==null?void 0:W.actions)==null?void 0:q[z];return ne||Po(`[zag-js] No implementation found for action "${JSON.stringify(z)}"`),ne});for(const z of ee)z?.(y())},_=A=>{var G,ee;return qo(A)?A(y()):(ee=(G=e.implementations)==null?void 0:G.guards)==null?void 0:ee[A](y())},k=A=>{const G=qo(A)?A(y()):A;if(!G)return;const ee=G.map(W=>{var q,ne;const te=(ne=(q=e.implementations)==null?void 0:q.effects)==null?void 0:ne[W];return te||Po(`[zag-js] No implementation found for effect "${JSON.stringify(W)}"`),te}),z=[];for(const W of ee){const q=W?.(y());q&&z.push(q)}return()=>z.forEach(W=>W?.())},E=A=>hc(A).find(G=>{let ee=!G.guard;return us(G.guard)?ee=!!_(G.guard):qo(G.guard)&&(ee=G.guard(y())),ee}),P=A=>{Kp(e.computed,()=>"[zag-js] No computed object found on machine");const G=e.computed[A];return G({context:u,event:f(),prop:l,refs:v,get scope(){return a.value},computed:P})},S=Kc(()=>({defaultValue:e.initialState({prop:l}),onChange(A,G){var ee,z,W;if(G){const ne=d.get(G);ne?.(),d.delete(G)}G&&x((ee=e.states[G])==null?void 0:ee.exit),x(h?.actions);const q=k((z=e.states[A])==null?void 0:z.effects);if(q&&d.set(A,q),G===wd){x(e.entry);const ne=k(e.effects);ne&&d.set(wd,ne)}x((W=e.states[A])==null?void 0:W.entry)}}));let R=xa.NotStarted;Qa(()=>{const A=R===xa.Started;R=xa.Started,r(A?"rehydrating...":"initializing..."),S.invoke(S.initial,wd)}),c0(()=>{R=xa.Stopped,r("unmounting...");const A=d.values();for(const G of A)G?.();d=new Map,x(e.exit)});const B=A=>{var G,ee;if(R!==xa.Started)return;p.current=m.current,m.current=A;let z=S.get();const W=((G=e.states[z].on)==null?void 0:G[A.type])??((ee=e.on)==null?void 0:ee[A.type]),q=E(W);if(!q)return;h=q;const ne=q.target??z;r("transition",A.type,q.target||z,`(${q.actions})`);const te=ne!==z;te?S.set(ne):q.reenter&&!te?S.invoke(z,z):x(q.actions)};return(i=e.watch)==null||i.call(e,y()),{state:b(),send:B,context:u,prop:l,get scope(){return a.value},refs:v,computed:P,event:f(),getStatus:()=>R}}function fE(e){return function(t){return e.value[t]}}var Gg=e=>{no().then(()=>{e()})};const[SU,sn]=Re("EnvironmentContext"),ln=I(()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})),Cn=I(()=>({dir:"ltr",locale:"en-US"})),[$U,kn]=Re("LocaleContext"),Fn=e=>{const t={};for(const[n,o]of Object.entries(e))o!==void 0&&(t[n]=o);return t},gE=(e={},t)=>{const n=Ut(),o=sn(ln),i=kn(Cn),a=I(()=>{const c=Ye(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,...Fn(c),onExitComplete:()=>{var u;t?.("exitComplete"),(u=c.onExitComplete)==null||u.call(c)},onOpenChange:u=>{var d;t?.("openChange",u),t?.("update:open",u.open),(d=c.onOpenChange)==null||d.call(c,u)}}}),r=Gt(lE,a),s=I(()=>sE(r,rn)),l=fe(!1);return ze(()=>s.value.visible,()=>{s.value.visible&&(l.value=!0)}),I(()=>{const c=Ye(e);return{...s.value,unmounted:!s.value.visible&&!l.value&&c.lazyMount||c.unmountOnExit&&!s.value.visible&&l.value}})},mE=O({__name:"collapsible-root",props:_n({collapsedHeight:{},collapsedWidth:{},defaultOpen:{type:Boolean},disabled:{type:Boolean},id:{},ids:{},lazyMount:{type:Boolean},open:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{defaultOpen:void 0,disabled:void 0,lazyMount:void 0,open:void 0,unmountOnExit:void 0}),emits:["exitComplete","openChange","update:open"],setup(e,{emit:t}){const n=gE(e,t);return ax(n),Y(),(o,i)=>(w(),$(g(X).div,U(g(n).getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),vE=O({__name:"collapsible-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Ks();return Y(),(n,o)=>(w(),$(g(X).button,U(g(t).getTriggerProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),bE=O({__name:"collapsible-indicator",props:{asChild:{type:Boolean}},setup(e){const t=Ks();return Y(),(n,o)=>(w(),$(g(X).div,U(g(t).getIndicatorProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),Lu=Object.freeze(Object.defineProperty({__proto__:null,Content:tE,Context:nE,Indicator:bE,Root:mE,RootProvider:oE,Trigger:vE},Symbol.toStringTag,{value:"Module"})),[rx,Xs]=Re("AccordionContext"),[yE,xE]=Re("AccordionItemContext"),[wE,Zp]=Re("AccordionItemPropsContext"),sx=O({__name:"accordion-item",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=Xs(),n=e,o=I(()=>t.value.getItemState(n)),i=Ys(),a=I(()=>t.value.getItemContentProps(n));return yE(o),wE(n),Y(),(r,s)=>(w(),$(g(Lu).Root,U(g(t).getItemProps(n),{open:o.value.expanded,"lazy-mount":g(i).lazyMount,"unmount-on-exit":g(i).unmountOnExit,ids:{content:a.value.id}}),{default:C(()=>[V(r.$slots,"default")]),_:3},16,["open","lazy-mount","unmount-on-exit","ids"]))}}),_E=O({__name:"AccordionItem",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=lt(e),n=I(()=>qs());return(o,i)=>(w(),$(g(sx),U(g(t),{class:[n.value.item],"data-testid":"atlantis-accordion-item"}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),lx=()=>(e,t)=>t.reduce((n,o)=>{const[i,a]=n,r=o;return a[r]!==void 0&&(i[r]=a[r]),delete a[r],[i,a]},[{},{...e}]),cx=O({__name:"accordion-item-content",props:{asChild:{type:Boolean}},setup(e){const t=lx(),n=Xs(),o=Zp(),i=I(()=>{const a=n.value.getItemContentProps(o),[,r]=t(a,["hidden","data-state"]);return r});return Y(),(a,r)=>(w(),$(g(Lu).Content,U(i.value,{"as-child":e.asChild}),{default:C(()=>[V(a.$slots,"default")]),_:3},16,["as-child"]))}}),CE=O({__name:"AccordionItemContent",props:{asChild:{type:Boolean}},setup(e){const t=lt(e),n=I(()=>qs());return(o,i)=>(w(),$(g(cx),U(g(t),{class:[n.value.itemContent],"data-testid":"atlantis-accordion-item-content"}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),kE={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",preserveAspectRatio:"none"};function SE(e,t){return w(),M("svg",kE,[...t[0]||(t[0]=[N("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.5531 5.90623L10.089 6.37027L7.6187 8.84055C7.27698 9.18232 6.72297 9.18232 6.38126 8.84055L3.91094 6.37027L3.4469 5.90623L4.37498 4.97815L4.83902 5.44219L6.99998 7.60315L9.16097 5.44219L9.62499 4.97815L10.5531 5.90623Z",fill:"currentColor"},null,-1)])])}const ux={render:SE},dx=O({__name:"accordion-item-indicator",props:{asChild:{type:Boolean}},setup(e){const t=Xs(),n=Zp();return Y(),(o,i)=>(w(),$(g(X).div,U(g(t).getItemIndicatorProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),$E=O({__name:"AccordionItemIndicator",props:{asChild:{type:Boolean}},setup(e){const t=lt(e),n=I(()=>qs());return(o,i)=>(w(),$(g(dx),U(g(t),{class:[n.value.itemIndicator],"data-testid":"atlantis-accordion-item-indicator"}),{default:C(()=>[V(o.$slots,"default",{},()=>[j(g(ux))])]),_:3},16,["class"]))}}),hx=O({__name:"accordion-item-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Xs(),n=Zp(),o=Ks(),i=I(()=>{const{"aria-controls":a,...r}=t.value.getItemTriggerProps(n);return{...r,...o.value.unmounted?{}:{"aria-controls":a}}});return Y(),(a,r)=>(w(),$(g(X).button,U(i.value,{"as-child":e.asChild}),{default:C(()=>[V(a.$slots,"default")]),_:3},16,["as-child"]))}}),EE=O({__name:"AccordionItemTrigger",props:{asChild:{type:Boolean}},setup(e){const t=lt(e),n=zs(),o=I(()=>qs());return(i,a)=>(w(),$(g(hx),U(g(t),{class:[o.value.itemTrigger],"data-testid":"atlantis-accordion-item-trigger"}),{default:C(()=>[g(n).prefix?(w(),M("div",{key:0,class:L(o.value.itemTriggerPrefix)},[V(i.$slots,"prefix")],2)):oe("",!0),N("div",{class:L([o.value.itemTriggerContent])},[V(i.$slots,"default")],2)]),_:3},16,["class"]))}}),TE=O({__name:"accordion-context",setup(e){const t=Xs();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),OE=O({__name:"accordion-item-context",setup(e){const t=xE();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),IE=O({__name:"accordion-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return rx(n),io(I(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),Y(),(o,i)=>(w(),$(g(X).div,U(n.value.getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),PE=(e={},t)=>{const n=Ut(),o=sn(ln),i=kn(Cn),a=I(()=>{const s=Ye(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,onFocusChange:l=>t?.("focusChange",l),value:s.modelValue,...Fn(s),onValueChange:l=>{var c;t?.("valueChange",l),t?.("update:modelValue",l.value),(c=s?.onValueChange)==null||c.call(s,l)}}}),r=Gt(U$,a);return I(()=>H$(r,rn))},AE=O({__name:"accordion-root",props:_n({collapsible:{type:Boolean},defaultValue:{},disabled:{type:Boolean},id:{},ids:{},modelValue:{},multiple:{type:Boolean},orientation:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{collapsible:void 0,disabled:void 0,multiple:void 0}),emits:["focusChange","valueChange","update:modelValue"],setup(e,{emit:t}){const n=e,o=PE(n,t);return rx(o),io(I(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Y(),(i,a)=>(w(),$(g(X).div,U(g(o).getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),RE=Object.freeze(Object.defineProperty({__proto__:null,Context:TE,Item:sx,ItemContent:cx,ItemContext:OE,ItemIndicator:dx,ItemTrigger:hx,Root:AE,RootProvider:IE},Symbol.toStringTag,{value:"Module"})),DE=O({__name:"AccordionRoot",props:{collapsible:{type:Boolean},defaultValue:{},disabled:{type:Boolean},id:{},ids:{},modelValue:{},multiple:{type:Boolean},orientation:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean},variant:{default:"default"}},emits:["focusChange","valueChange","update:modelValue"],setup(e,{emit:t}){const n=e,o=lt(n,t),i=I(()=>qs({variant:n.variant}));return(a,r)=>(w(),$(g(RE).Root,U(g(o),{class:[i.value.root],"data-testid":"atlantis-accordion-root"}),{default:C(()=>[V(a.$slots,"default")]),_:3},16,["class"]))}}),VE=be("field").parts("root","errorText","helperText","input","label","select","textarea","requiredIndicator");VE.build();const[EU,ao]=Re("FieldContext");function ME(e){if(!e)return;const t=za(e);return"box-sizing:"+t.boxSizing+";border-left:"+t.borderLeftWidth+" solid red;border-right:"+t.borderRightWidth+" solid red;font-family:"+t.fontFamily+";font-feature-settings:"+t.fontFeatureSettings+";font-kerning:"+t.fontKerning+";font-size:"+t.fontSize+";font-stretch:"+t.fontStretch+";font-style:"+t.fontStyle+";font-variant:"+t.fontVariant+";font-variant-caps:"+t.fontVariantCaps+";font-variant-ligatures:"+t.fontVariantLigatures+";font-variant-numeric:"+t.fontVariantNumeric+";font-weight:"+t.fontWeight+";letter-spacing:"+t.letterSpacing+";margin-left:"+t.marginLeft+";margin-right:"+t.marginRight+";padding-left:"+t.paddingLeft+";padding-right:"+t.paddingRight+";text-indent:"+t.textIndent+";text-transform:"+t.textTransform}function NE(e){var t=e.createElement("div");return t.id="ghost",t.style.cssText="display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;",e.body.appendChild(t),t}function LE(e){if(!e)return;const t=an(e),n=Ke(e),o=NE(t),i=ME(e);i&&(o.style.cssText+=i);function a(){n.requestAnimationFrame(()=>{o.innerHTML=e.value;const r=n.getComputedStyle(o);e?.style.setProperty("width",r.width)})}return a(),e?.addEventListener("input",a),e?.addEventListener("change",a),()=>{t.body.removeChild(o),e?.removeEventListener("input",a),e?.removeEventListener("change",a)}}var px=(e=>(e.ArrowUp="↑",e.ArrowDown="↓",e.ArrowLeft="←",e.ArrowRight="→",e.Enter="↵",e.Tab="⇥",e.Escape="Esc",e.Space="␣",e.Backspace="⌫",e.Delete="Del",e.PageUp="PgUp",e.PageDown="PgDn",e.Command="⌘",e.Control="CTRL",e))(px||{});const FE={default:{},inverted:{color:"text.inverse",background:"background.neutral-default",boxShadow:"inner-highlighted-ring"}},BE=Zi({base:{display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:"sm",paddingX:"2",height:"14",textAlign:"center",fontFamily:"mono",fontSize:"xs",fontStyle:"normal",fontWeight:"regular",lineHeight:"sm",letterSpacing:"tight",textTransform:"uppercase",color:"text.subtle",background:"background.neutral-default",boxShadow:"inner-highlighted-ring"},defaultVariants:{type:"default"},variants:{type:FE}}),Xc=O({__name:"KeyboardKey",props:{type:{default:"default"},keys:{default:()=>[]},macKeys:{default:()=>[]},windowsKeys:{default:()=>[]},forcePlatform:{default:"mac"}},setup(e){const t=e,n=r=>r==="Ctrl"?"Control":r==="Meta"?"Command":r,o=r=>{const s=n(r);return px[s]||r},i=fe("windows");ze(()=>t.forcePlatform,r=>{r&&(i.value=r)}),Qa(()=>{t.forcePlatform?i.value=t.forcePlatform:typeof navigator<"u"&&(i.value=navigator.userAgent.toLowerCase().includes("mac")?"mac":"windows")});const a=I(()=>t.macKeys||t.windowsKeys?i.value==="mac"?t.macKeys??[]:t.windowsKeys??[]:t.keys??[]);return(r,s)=>(w(),M("div",{class:L(g(Ft)({display:"flex",columnGap:"3"}))},[(w(!0),M(Se,null,Ie(a.value,l=>(w(),M("div",{key:l,class:L(g(BE)({type:e.type}))},se(o(l)),3))),128))],2))}}),zE=ge({className:"spinner",slots:["root","spinner","background","rotationWrapper"],base:{root:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center"},spinner:{width:"100%",height:"100%"},background:{position:"absolute",top:"0",left:"0"},rotationWrapper:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",animation:"spin 1s linear infinite"}},variants:{variant:{default:{},inverted:{}},size:{sm:{root:{width:"16",height:"16"}},md:{root:{width:"24",height:"24"}},lg:{root:{width:"32",height:"32"}}}},defaultVariants:{variant:"default",size:"md"}}),HE=["aria-label"],jE=["fill"],WE=["fill"],fx=O({__name:"Spinner",props:{variant:{default:"default"},size:{default:"md"},ariaLabel:{default:"Loading"}},setup(e){const t=e,n=I(()=>zE({variant:t.variant,size:t.size})),o=I(()=>t.variant==="default"?"var(--colors-icon-selected)":"var(--colors-icon-inverse)");return(i,a)=>(w(),M("div",{class:L(n.value.root),"aria-label":t.ariaLabel,role:"status","data-testid":"spinner"},[(w(),M("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:L([n.value.spinner,n.value.background])},[N("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:o.value,opacity:"0.3",d:"M12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z"},null,8,jE)],2)),N("div",{class:L([n.value.rotationWrapper,"spinner-rotate"])},[(w(),M("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:L(n.value.spinner)},[N("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:o.value,d:"M12 4C9.38441 4 7.06204 5.25316 5.59909 7.20034C4.9356 8.08342 3.68185 8.26146 2.79876 7.59798C1.91568 6.93449 1.73764 5.68074 2.40113 4.79765C4.58709 1.88817 8.07337 0 12 0C18.6274 0 24 5.37257 24 12C24 18.6274 18.6274 24 12 24C10.8954 24 10 23.1046 10 22C10 20.8954 10.8954 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4Z"},null,8,WE)],2))],2)],10,HE))}}),UE=ge({slots:["root"],base:{root:{}},defaultVariants:{variant:"primary"},variants:{variant:{primary:{root:{color:"inherit"}},critical:{root:{color:"inherit"}},default:{root:{color:"inherit"}},subtle:{root:{color:"inherit"}},plainPrimary:{root:{color:"inherit"}},plainCritical:{root:{color:"inherit"}},dashed:{root:{color:"inherit"}},validation:{root:{color:"inherit"}},link:{root:{color:"inherit",textStyle:"body_small_medium"}}}}}),GE=O({__name:"ButtonText",props:{text:{},variant:{default:"primary"}},setup(e){const t=e,n=I(()=>UE({variant:t.variant}));return(o,i)=>(w(),M("span",{class:L(n.value.root)},[V(o.$slots,"default",{},()=>[Ne(se(t.text),1)])],2))}}),ht={primary:{_active:{background:"background.brand-bold-pressed !important"},color:"whitealpha.1000",background:"background.brand-bold-default",boxShadow:"stroke-bordered-interactive",_hover:{background:"background.brand-bold-hover"},_focus:{background:"background.brand-bold-default",boxShadow:"state-focus-primary"},_disabled:{color:"text.disabled",background:"background.gray-subtler-default",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"background.gray-subtler-default"},_active:{background:"background.gray-subtler-default !important"}},'&[data-selected="true"]':{boxShadow:"stroke-bordered-interactive"}},critical:{background:"colorPalette.700",color:"whitealpha.1000",boxShadow:"stroke-bordered-interactive",colorPalette:"red",_active:{background:"background.error-bold-pressed !important"},_hover:{background:"colorPalette.800"},_focus:{background:"background.error-bold-default",boxShadow:"state-focus-critical"},_disabled:{color:"text.disabled",background:"background.gray-subtler-default",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"background.gray-subtler-default"},_active:{background:"background.gray-subtler-default !important"}},'&[data-selected="true"]':{boxShadow:"stroke-bordered-interactive"}},default:{background:"whitealpha.1000",color:"graycool.1000",colorPalette:"whitealpha",boxShadow:"stroke-bordered-interactive",_hover:{background:"graycoolalpha.10"},_active:{background:"background.pressed !important"},_focus:{boxShadow:"state-focus-primary",zIndex:"100000"},_disabled:{color:"text.disabled",background:"background.gray-subtler-default",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"background.gray-subtler-default"},_active:{background:"background.gray-subtler-default !important"}},'&[data-selected="true"]':{boxShadow:"stroke-bordered-interactive"}},subtle:{background:"whitealpha.1000",color:"text.subtle",_active:{background:"background.pressed !important"},_disabled:{background:"background.pressed"},_hover:{background:"background.hover"},_focus:{boxShadow:"state-focus-primary"}},plainPrimary:{background:"whitealpha.1000",color:"colorPalette.800",colorPalette:"seed",_active:{background:"background.brand-selected-pressed !important",color:"text.brand-pressed"},_hover:{backgroundColor:"colorPalette.200"},_selected:{background:"colorPalette.a3"},_disabled:{color:"text.disabled",background:"whitealpha.1000",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"whitealpha.1000"}},_focus:{boxShadow:"state-focus-primary",color:"text.brand-default"}},plainCritical:{background:"whitealpha.1000",color:"colorPalette.800",colorPalette:"red",_active:{background:"background.error-pressed !important",color:"text.error-pressed"},_hover:{backgroundColor:"colorPalette.200"},_selected:{background:"colorPalette.a3"},_disabled:{color:"text.disabled",background:"whitealpha.1000",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"whitealpha.1000"}},_focus:{boxShadow:"state-focus-critical",color:"text.error-default"}},dashed:{'&[data-selected="true"]':{boxShadow:"stroke-bordered-interactive"},boxShadow:"stroke-bordered-interactive",background:"whitealpha.1000",color:"graycool.900",colorPalette:"whitealpha",border:"1px dashed",borderColor:"graycoolalpha.75",_active:{background:"background.hover !important",color:"text.normal"},_hover:{background:"graycoolalpha.10"},_focus:{boxShadow:"state-focus-primary"},_disabled:{color:"text.disabled",background:"background.gray-subtler-default",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"background.gray-subtler-default"},_active:{background:"background.gray-subtler-default !important"}}},validation:{background:"colorPalette.700",color:"whitealpha.1000",colorPalette:"green",boxShadow:"stroke-bordered-interactive",_active:{background:"background.success-bold-pressed !important"},_hover:{background:"colorPalette.800"},_focus:{background:"background.success-bold-default",boxShadow:"state-focus-success"},_disabled:{color:"graycoolalpha.75",background:"graycoolalpha.20",cursor:"not-allowed",_hover:{color:"graycoolalpha.75",background:"graycoolalpha.20"}},'&[data-selected="true"]':{boxShadow:"stroke-bordered-interactive"}},link:{background:"transparent",color:"text.brand-default",textStyle:"body_small_medium",padding:"0",height:"auto",_hover:{},_focus:{},_disabled:{color:"text.disabled",cursor:"not-allowed"}}},qg={default:{width:"32",height:"32"},small:{width:"24",height:"24"}},qE=ge({slots:["root","content","spinner","label","slots"],base:{root:{alignItems:"center",appearance:"none",cursor:"pointer",display:"inline-flex",isolation:"isolate",minWidth:"0",justifyContent:"center",outline:"none",position:"relative",transitionDuration:"normal",transitionProperty:"background, border-color, color, box-shadow",transitionTimingFunction:"default",userSelect:"none",verticalAlign:"middle",borderRadius:"md",border:"none",fontSize:"base",fontWeight:"medium",fontFamily:"sans",lineHeight:"lg",whiteSpace:"nowrap",_hidden:{display:"none"},_disabled:{color:"text.disabled",background:"background.gray-subtler-default",cursor:"not-allowed",boxShadow:"none",_hover:{color:"text.disabled",background:"background.gray-subtler-default"},_active:{background:"background.gray-subtler-default !important"}}},content:{display:"flex",alignItems:"center",gap:"6"},spinner:{width:"16",height:"16","&[data-loading]":{opacity:"0.7"}},label:{"&[data-loading]":{opacity:"0.7"}},slots:{display:"flex",alignItems:"center",justifyContent:"center"}},defaultVariants:{type:"primary",size:"default"},variants:{type:{primary:{root:ht.primary,spinner:{}},critical:{root:ht.critical},default:{root:ht.default},subtle:{root:ht.subtle},plainPrimary:{root:ht.plainPrimary},plainCritical:{root:ht.plainCritical},dashed:{root:ht.dashed},validation:{root:ht.validation},link:{root:ht.link}},size:{default:{root:{px:"12",py:"6",gap:"6"}},small:{root:{px:"8",py:"2",gap:"6"}}}}}),YE=["disabled","data-loading","data-selected","aria-busy"],Kn=O({__name:"Button",props:{type:{default:"primary"},size:{default:"default"},isLoading:{type:Boolean},isDisabled:{type:Boolean},label:{},isSelected:{type:Boolean,default:!1},shortcutKeys:{}},setup(e){const t=zs(),n=e,o=I(()=>qE({type:n.type,size:n.size})),i=I(()=>n.type==="primary"||n.type==="validation"||n.type==="critical"?"inverted":"default"),a=I(()=>t.prefix),r=I(()=>t.suffix);return(s,l)=>(w(),M("button",{disabled:n.isDisabled,"data-loading":n.isLoading||null,"data-selected":n.isSelected||null,"aria-busy":n.isLoading||void 0,class:L([o.value.root,g(Ft)(n.isSelected?{background:"background.brand-selected !important",color:"text.selected !important"}:{})])},[N("div",{class:L([o.value.content,n.isLoading?g(Ft)({position:"relative"}):""])},[a.value?(w(),M("div",{key:0,class:L([o.value.slots,n.isLoading?g(Ft)({visibility:"hidden"}):""])},[V(s.$slots,"prefix")],2)):oe("",!0),n.isLoading?(w(),$(fx,{key:1,class:L([o.value.spinner,n.isLoading?g(Ft)({position:"absolute",transform:"translate(-50%, -50%)",top:"50%",left:"50%"}):""]),variant:i.value,"data-loading":n.isLoading||null},null,8,["class","variant","data-loading"])):oe("",!0),N("div",{class:L([a.value?g(Ft)({paddingRight:"2",display:"inline-flex"}):"",r.value?g(Ft)({paddingLeft:"2",display:"inline-flex"}):"",o.value.label,n.isLoading?g(Ft)({visibility:"hidden"}):""])},[V(s.$slots,"default",{},()=>[n.label?(w(),$(GE,{key:0,text:n.label,variant:n.type},null,8,["text","variant"])):oe("",!0)])],2),r.value?(w(),M("div",{key:2,class:L([o.value.slots,n.isLoading?g(Ft)({visibility:"hidden"}):""])},[V(s.$slots,"suffix")],2)):oe("",!0),n.shortcutKeys?(w(),M("div",{key:3,class:L([n.isLoading?g(Ft)({visibility:"hidden"}):""])},[j(Xc,{type:"default",keys:n.shortcutKeys},null,8,["keys"])],2)):oe("",!0)],2)],10,YE))}}),KE={default:{},error:{root:{boxShadow:"state-focus-critical",_focusWithin:{boxShadow:"state-focus-critical"},_focus:{boxShadow:"state-focus-critical"}}}},XE={default:{},chat:{root:{borderBottomRadius:"none"}}};ge({slots:["root","input","inputContainer","suffixButton","footer"],base:{root:{padding:"8",display:"flex",flexDirection:"column",gap:"8",background:"background.gray-subtlest-default",boxShadow:"stroke-container",transitionDuration:"normal",transitionProperty:"background, border-color, color, box-shadow",transitionTimingFunction:"default",borderRadius:"md",_hover:{backgroundColor:"background.gray-subtlest-hover"},_focus:{boxShadow:"state-focus-primary"},_focusWithin:{boxShadow:"state-focus-primary"}},inputContainer:{display:"flex",gap:"12"},input:{resize:"none",width:"100%",textAlign:"left",outline:"none",display:"flex",padding:"0",borderRadius:"none",borderTopLeftRadius:"md",border:"none",backgroundColor:"transparent",fontFamily:"sans",fontSize:"base",fontWeight:"regular",lineHeight:"lg",letterSpacing:"normal",_placeholder:{color:"text.placeholder"},_disabled:{backgroundColor:"background.disabled",color:"text.disabled",cursor:"not-allowed",_hover:{backgroundColor:"background.disabled"}}},suffixButton:{width:"fit-content",height:"fit-content",paddingX:"4 !important",paddingY:"4 !important"}},variants:{variant:XE,state:KE,disabled:{true:{root:{cursor:"not-allowed",backgroundColor:"background.disabled",color:"text.subtle",boxShadow:"none",_hover:{backgroundColor:"background.disabled"},_focusWithin:{boxShadow:"none"},_focus:{boxShadow:"none"}},input:{cursor:"not-allowed",backgroundColor:"transparent",color:"text.subtle","&::placeholder":{color:"text.placeholder"}}},false:{}}},defaultVariants:{variant:"default",state:"default",disabled:!1}});const ZE=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},JE=ge({slots:["root","content"],base:{root:{alignItems:"center",appearance:"none",cursor:"pointer",display:"inline-flex",isolation:"isolate",minWidth:"0",justifyContent:"center",outline:"none",userSelect:"none",verticalAlign:"middle",borderRadius:"md",border:"none",_hidden:{display:"none"}},content:{display:"flex",alignItems:"center",justifyContent:"center"}},defaultVariants:{type:"primary",size:"default"},variants:{type:{primary:{root:ht.primary},critical:{root:ht.critical},default:{root:ht.default},subtle:{root:ht.subtle},dashed:{root:ht.dashed},plain:{root:{background:"none",_focusVisible:{boxShadow:"state-focus-primary"},_disabled:{padding:0,boxShadow:"none",background:"graycoolalpha.20",borderColor:"border.disabled",color:"graycoolalpha.75",cursor:"not-allowed",_hover:{background:"graycoolalpha.20",borderColor:"border.disabled",color:"graycoolalpha.75"}}}}},size:{default:{root:qg.default},small:{root:qg.small}}},compoundVariants:[{type:"plain",size:"default",css:{root:{width:"16 !important",height:"16 !important"}}},{type:"plain",size:"small",css:{root:{width:"16 !important",height:"16 !important"}}}]}),QE=["disabled","data-selected"],sa=O({__name:"IconButton",props:{type:{},size:{},isDisabled:{type:Boolean},isSelected:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const n=e,o=t,i=r=>{n.isDisabled||o("click",r)},a=I(()=>JE({type:n.type,size:n.size}));return(r,s)=>(w(),M("button",{disabled:n.isDisabled,"data-selected":n.isSelected||null,"aria-label":"Icon button",onClick:i,class:L([a.value.root,g(Ft)(n.isSelected?{background:"background.brand-selected !important",color:"text.selected !important"}:{})])},[N("div",{class:L(a.value.content)},[V(r.$slots,"prefixIcon")],2)],10,QE))}});ge({slots:["container","indicator","message","icon","title"],base:{indicator:{minHeight:"3.85rem",borderTopLeftRadius:"md",borderBottomLeftRadius:"md",position:"absolute",left:"-0.0625rem",top:"0",width:"0.25rem",height:"100%"},container:{display:"flex",borderRadius:"md",boxShadow:"inner-highlighted-ring",position:"relative",minHeight:"3.75rem",padding:"8",fontSize:"md",fontWeight:"medium"},title:{fontSize:"base",fontWeight:"regular",color:"text.normal",fontFamily:"sans",lineHeight:"lg",letterSpacing:"normal"}},variants:{type:{info:{indicator:{backgroundColor:"blue.800"},icon:{color:"blue.800"}},warning:{indicator:{backgroundColor:"orange.800"},icon:{color:"orange.800"}},issue:{indicator:{backgroundColor:"red.800"},icon:{color:"red.800"}}}},defaultVariants:{type:"info"}});var eT=be("avatar").parts("root","image","fallback");eT.build();ie()(["dir","id","ids","onStatusChange","getRootNode"]);ge({slots:["root","image","fallback"],base:{root:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",overflow:"hidden",userSelect:"none",boxShadow:"stroke-bordered-interactive",background:"background.default"},image:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"inherit"},fallback:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#F2F2F5",color:"text.subtle",textAlign:"center",borderRadius:"inherit"}},variants:{size:{xs:{root:{width:"16",height:"16"},fallback:{textStyle:"body_xsmall_caps_medium"}},sm:{root:{width:"20",height:"20"},fallback:{textStyle:"body_xsmall_caps_medium"}},md:{root:{width:"24",height:"24"},fallback:{textStyle:"body_xsmall_caps_medium"}},lg:{root:{width:"32",height:"32",padding:"2"},fallback:{textStyle:"body_small_semibold"}},xl:{root:{width:"40",height:"40",padding:"2"},fallback:{textStyle:"body_base_semibold"}}},shape:{rounded:{root:{borderRadius:"full"}},square:{root:{borderRadius:"md"}}}},defaultVariants:{size:"md",shape:"rounded"}});var tT=Object.defineProperty,nT=(e,t,n)=>t in e?tT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,co=(e,t,n)=>nT(e,typeof t!="symbol"?t+"":t,n),Yg=class dt{constructor([t,n,o,i,a,r]=[0,0,0,0,0,0]){co(this,"m00"),co(this,"m01"),co(this,"m02"),co(this,"m10"),co(this,"m11"),co(this,"m12"),co(this,"rotate",(...s)=>this.prepend(dt.rotate(...s))),co(this,"scale",(...s)=>this.prepend(dt.scale(...s))),co(this,"translate",(...s)=>this.prepend(dt.translate(...s))),this.m00=t,this.m01=n,this.m02=o,this.m10=i,this.m11=a,this.m12=r}applyTo(t){const{x:n,y:o}=t,{m00:i,m01:a,m02:r,m10:s,m11:l,m12:c}=this;return{x:i*n+a*o+r,y:s*n+l*o+c}}prepend(t){return new dt([this.m00*t.m00+this.m01*t.m10,this.m00*t.m01+this.m01*t.m11,this.m00*t.m02+this.m01*t.m12+this.m02,this.m10*t.m00+this.m11*t.m10,this.m10*t.m01+this.m11*t.m11,this.m10*t.m02+this.m11*t.m12+this.m12])}append(t){return new dt([t.m00*this.m00+t.m01*this.m10,t.m00*this.m01+t.m01*this.m11,t.m00*this.m02+t.m01*this.m12+t.m02,t.m10*this.m00+t.m11*this.m10,t.m10*this.m01+t.m11*this.m11,t.m10*this.m02+t.m11*this.m12+t.m12])}get determinant(){return this.m00*this.m11-this.m01*this.m10}get isInvertible(){const t=this.determinant;return isFinite(t)&&isFinite(this.m02)&&isFinite(this.m12)&&t!==0}invert(){const t=this.determinant;return new dt([this.m11/t,-this.m01/t,(this.m01*this.m12-this.m11*this.m02)/t,-this.m10/t,this.m00/t,(this.m10*this.m02-this.m00*this.m12)/t])}get array(){return[this.m00,this.m01,this.m02,this.m10,this.m11,this.m12,0,0,1]}get float32Array(){return new Float32Array(this.array)}static get identity(){return new dt([1,0,0,0,1,0])}static rotate(t,n){const o=new dt([Math.cos(t),-Math.sin(t),0,Math.sin(t),Math.cos(t),0]);return n&&(n.x!==0||n.y!==0)?dt.multiply(dt.translate(n.x,n.y),o,dt.translate(-n.x,-n.y)):o}static scale(t,n=t,o={x:0,y:0}){const i=new dt([t,0,0,0,n,0]);return o.x!==0||o.y!==0?dt.multiply(dt.translate(o.x,o.y),i,dt.translate(-o.x,-o.y)):i}static translate(t,n){return new dt([1,0,t,0,1,n])}static multiply(...[t,...n]){return t?n.reduce((o,i)=>o.prepend(i),t):dt.identity}get a(){return this.m00}get b(){return this.m10}get c(){return this.m01}get d(){return this.m11}get tx(){return this.m02}get ty(){return this.m12}get scaleComponents(){return{x:this.a,y:this.d}}get translationComponents(){return{x:this.tx,y:this.ty}}get skewComponents(){return{x:this.c,y:this.b}}toString(){return`matrix(${this.a}, ${this.b}, ${this.c}, ${this.d}, ${this.tx}, ${this.ty})`}},Kg=(e,t,n)=>Math.min(Math.max(e,t),n),ml=(e,t,n)=>{const o=Kg(e.x,n.x,n.x+n.width-t.width),i=Kg(e.y,n.y,n.y+n.height-t.height);return{x:o,y:i}},oT={width:0,height:0},iT={width:1/0,height:1/0},vl=(e,t=oT,n=iT)=>({width:Math.min(Math.max(e.width,t.width),n.width),height:Math.min(Math.max(e.height,t.height),n.height)}),Pi=(e,t)=>({x:e,y:t}),Xg=(e,t)=>t?Pi(e.x-t.x,e.y-t.y):e,aT=(e,t)=>Pi(e.x+t.x,e.y+t.y);function Zs(e){const{x:t,y:n,width:o,height:i}=e,a=t+o/2,r=n+i/2;return{x:t,y:n,width:o,height:i,minX:t,minY:n,maxX:t+o,maxY:n+i,midX:a,midY:r,center:Pi(a,r)}}function rT(e){const t=Pi(e.minX,e.minY),n=Pi(e.maxX,e.minY),o=Pi(e.maxX,e.maxY),i=Pi(e.minX,e.maxY);return{top:t,right:n,bottom:o,left:i}}var sT=(e,t)=>{const n=Math.max(t.x,Math.min(e.x,t.x+t.width-e.width)),o=Math.max(t.y,Math.min(e.y,t.y+t.height-e.height));return{x:n,y:o,width:Math.min(e.width,t.width),height:Math.min(e.height,t.height)}},lT=(e,t)=>e.width===t?.width&&e.height===t?.height,cT=(e,t)=>e.x===t?.x&&e.y===t?.y,Cd=new WeakMap;function uT(e){if(!Cd.has(e)){const t=e.ownerDocument.defaultView||window;Cd.set(e,t.getComputedStyle(e))}return Cd.get(e)}function gx(e,t={}){return Zs(dT(e,t))}function dT(e,t={}){const{excludeScrollbar:n=!1,excludeBorders:o=!1}=t,{x:i,y:a,width:r,height:s}=e.getBoundingClientRect(),l={x:i,y:a,width:r,height:s},c=uT(e),{borderLeftWidth:u,borderTopWidth:d,borderRightWidth:h,borderBottomWidth:p}=c,m=Zg(u,h),f=Zg(d,p);if(o&&(l.width-=m,l.height-=f,l.x+=Sh(u),l.y+=Sh(d)),n){const b=e.offsetWidth-e.clientWidth-m,v=e.offsetHeight-e.clientHeight-f;l.width-=b,l.height-=v}return l}var Sh=e=>parseFloat(e.replace("px","")),Zg=(...e)=>e.reduce((t,n)=>t+(n?Sh(n):0),0);function hT(e,t={}){return Zs(pT(e,t))}function pT(e,t){const{excludeScrollbar:n=!1}=t,{innerWidth:o,innerHeight:i,document:a,visualViewport:r}=e,s=r?.width||o,l=r?.height||i,c={x:0,y:0,width:s,height:l};if(n){const u=o-a.documentElement.clientWidth,d=i-a.documentElement.clientHeight;c.width-=u,c.height-=d}return c}function fT(e,t){const n=Zs(e),{top:o,right:i,left:a,bottom:r}=rT(n),[s]=t.split("-");return{top:[a,o,i,r],right:[o,i,r,a],bottom:[o,a,r,i],left:[i,o,a,r]}[s]}function gT(e,t){const{x:n,y:o}=t;let i=!1;for(let a=0,r=e.length-1;a<e.length;r=a++){const s=e[a].x,l=e[a].y,c=e[r].x,u=e[r].y;l>o!=u>o&&n<(c-s)*(o-l)/(u-l)+s&&(i=!i)}return i}var Jg={n:{x:.5,y:0},ne:{x:1,y:0},e:{x:1,y:.5},se:{x:1,y:1},s:{x:.5,y:1},sw:{x:0,y:1},w:{x:0,y:.5},nw:{x:0,y:0}},mT={n:"s",ne:"sw",e:"w",se:"nw",s:"n",sw:"ne",w:"e",nw:"se"},{sign:bl,abs:Pa,min:Qg}=Math;function em(e,t){const{minX:n,minY:o,maxX:i,maxY:a,midX:r,midY:s}=e,l=t.includes("w")?n:t.includes("e")?i:r,c=t.includes("n")?o:t.includes("s")?a:s;return{x:l,y:c}}function vT(e){return mT[e]}function bT(e,t,n,o){const{scalingOriginMode:i,lockAspectRatio:a}=o,r=em(e,n),s=vT(n),l=em(e,s);i==="center"&&(t={x:t.x*2,y:t.y*2});const c={x:r.x+t.x,y:r.y+t.y},u={x:Jg[n].x*2-1,y:Jg[n].y*2-1},d={width:c.x-l.x,height:c.y-l.y},h=u.x*d.width/e.width,p=u.y*d.height/e.height,m=Pa(h)>Pa(p)?h:p,f=a?{x:m,y:m}:{x:r.x===l.x?1:h,y:r.y===l.y?1:p};switch(r.y===l.y?f.y=Pa(f.y):bl(f.y)!==bl(p)&&(f.y*=-1),r.x===l.x?f.x=Pa(f.x):bl(f.x)!==bl(h)&&(f.x*=-1),i){case"extent":return tm(e,Yg.scale(f.x,f.y,l),!1);case"center":return tm(e,Yg.scale(f.x,f.y,{x:e.midX,y:e.midY}),!1)}}function yT(e,t,n=!0){return n?{x:Qg(t.x,e.x),y:Qg(t.y,e.y),width:Pa(t.x-e.x),height:Pa(t.y-e.y)}:{x:e.x,y:e.y,width:t.x-e.x,height:t.y-e.y}}function tm(e,t,n=!0){const o=t.applyTo({x:e.minX,y:e.minY}),i=t.applyTo({x:e.maxX,y:e.maxY});return yT(o,i,n)}var xT=be("angle-slider").parts("root","label","thumb","valueText","control","track","markerGroup","marker");xT.build();ie()(["aria-label","aria-labelledby","dir","disabled","getRootNode","id","ids","invalid","name","onValueChange","onValueChangeEnd","readOnly","step","value","defaultValue"]);function wT(e,t){const{state:n,send:o,context:i}=e,a=n.matches("mounted","unmountSuspended");return{skip:!i.get("initial"),present:a,setNode(r){r&&o({type:"NODE.SET",node:r})},unmount(){o({type:"UNMOUNT"})}}}var _T={props({props:e}){return{...e,present:!!e.present}},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",za(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:o})=>{const i=o("present");if(i)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!i&&a?.ownerDocument.visibilityState==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});de(()=>{var r,s;const l=yl(t.get("styles"));e.set("unmountAnimationName",l),l==="none"||l===e.get("prevAnimationName")||((r=t.get("styles"))==null?void 0:r.display)==="none"||((s=t.get("styles"))==null?void 0:s.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{de(()=>{e.set("prevAnimationName",yl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:o})=>{const i=t.get("node");if(!i)return;const a=l=>{var c,u;(((u=(c=l.composedPath)==null?void 0:c.call(l))==null?void 0:u[0])??l.target)===i&&e.set("prevAnimationName",yl(t.get("styles")))},r=l=>{const c=yl(t.get("styles"));je(l)===i&&c===e.get("unmountAnimationName")&&!o("present")&&n({type:"UNMOUNT",src:"animationend"})};i.addEventListener("animationstart",a),i.addEventListener("animationcancel",r),i.addEventListener("animationend",r);const s=Yp(i,{animationFillMode:"forwards"});return()=>{i.removeEventListener("animationstart",a),i.removeEventListener("animationcancel",r),i.removeEventListener("animationend",r),Pu(()=>s())}}}}};function yl(e){return e?.animationName||"none"}ie()(["onExitComplete","present","immediate"]);const Jp=(e,t)=>{const n=fe(!1),o=fe(null),i=I(()=>({present:Ye(e).present,onExitComplete:()=>{}})),a=Gt(_T,i),r=I(()=>wT(a));return ze(()=>r.value.present,()=>{r.value.present&&(n.value=!0)}),ze(o,()=>{if(o.value){const s=o.value.$el?o.value.$el:o.value;s&&r.value.setNode(s)}}),I(()=>{var s;const l=Ye(e);return{present:r.value.present,unmounted:!r.value.present&&!n.value&&l.lazyMount||l?.unmountOnExit&&!((s=r.value)!=null&&s.present)&&n.value,presenceProps:{ref:o,hidden:!r.value.present,"data-state":r.value.skip&&l.skipAnimationOnMount?void 0:l!=null&&l.present?"open":"closed"}}})},[Qp,ef]=Re("PresenceContext");var la=new WeakMap,xl=new WeakMap,wl={},kd=0,mx=e=>e&&(e.host||mx(e.parentNode)),CT=(e,t)=>t.map(n=>{if(e.contains(n))return n;const o=mx(n);return o&&e.contains(o)?o:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),kT=new Set(["script","output","status","next-route-announcer"]),ST=e=>kT.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),$T=(e,t)=>{const{parentNode:n,markerName:o,controlAttribute:i,followControlledElements:a=!0}=t,r=CT(n,Array.isArray(e)?e:[e]);wl[o]||(wl[o]=new WeakMap);const s=wl[o],l=[],c=new Set,u=new Set(r),d=p=>{!p||c.has(p)||(c.add(p),d(p.parentNode))};r.forEach(p=>{d(p),a&&et(p)&&T0(p,m=>{d(m)})});const h=p=>{!p||u.has(p)||Array.prototype.forEach.call(p.children,m=>{if(c.has(m))h(m);else try{if(ST(m))return;const f=m.getAttribute(i)==="true",b=(la.get(m)||0)+1,v=(s.get(m)||0)+1;la.set(m,b),s.set(m,v),l.push(m),b===1&&f&&xl.set(m,!0),v===1&&m.setAttribute(o,""),f||m.setAttribute(i,"true")}catch(f){console.error("[zag-js > ariaHidden] cannot operate on ",m,f)}})};return h(n),c.clear(),kd++,()=>{l.forEach(p=>{const m=la.get(p)-1,f=s.get(p)-1;la.set(p,m),s.set(p,f),m||(xl.has(p)||p.removeAttribute(i),xl.delete(p)),f||p.removeAttribute(o)}),kd--,kd||(la=new WeakMap,la=new WeakMap,xl=new WeakMap,wl={})}},ET=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,TT=(e,t=ET(e),n="data-aria-hidden",o=!0)=>{if(t)return $T(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:o})},OT=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function IT(e,t={}){const{defer:n=!0}=t,o=n?OT:a=>a(),i=[];return i.push(o(()=>{const a=(typeof e=="function"?e():e).filter(Boolean);a.length!==0&&i.push(TT(a))})),()=>{i.forEach(a=>a?.())}}function PT(e){const t={each(n){var o;for(let i=0;i<((o=e.frames)==null?void 0:o.length);i+=1){const a=e.frames[i];a&&n(a)}},addEventListener(n,o,i){return t.each(a=>{try{a.document.addEventListener(n,o,i)}catch{}}),()=>{try{t.removeEventListener(n,o,i)}catch{}}},removeEventListener(n,o,i){t.each(a=>{try{a.document.removeEventListener(n,o,i)}catch{}})}};return t}function AT(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,o,i)=>{try{t?.addEventListener(n,o,i)}catch{}return()=>{try{t?.removeEventListener(n,o,i)}catch{}}},removeEventListener:(n,o,i)=>{try{t?.removeEventListener(n,o,i)}catch{}}}}var nm="pointerdown.outside",om="focus.outside";function RT(e){for(const t of e)if(et(t)&&Eo(t))return!0;return!1}var vx=e=>"clientY"in e;function DT(e,t){if(!vx(t)||!e)return!1;const n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function VT(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function im(e,t){if(!t||!vx(e))return!1;const n=t.scrollHeight>t.clientHeight,o=n&&e.clientX>t.offsetLeft+t.clientWidth,i=t.scrollWidth>t.clientWidth,a=i&&e.clientY>t.offsetTop+t.clientHeight,r={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(i?16:0)},s={x:e.clientX,y:e.clientY};return VT(r,s)?o||a:!1}function MT(e,t){const{exclude:n,onFocusOutside:o,onPointerDownOutside:i,onInteractOutside:a,defer:r,followControlledElements:s=!0}=t;if(!e)return;const l=an(e),c=Ke(e),u=PT(c),d=AT(c);function h(x,_){if(!et(_)||!_.isConnected||Rt(e,_)||DT(e,x)||s&&E0(e,_))return!1;const k=l.querySelector(`[aria-controls="${e.id}"]`);if(k){const P=Uc(k);if(im(x,P))return!1}const E=Uc(e);return im(x,E)?!1:!(n!=null&&n(_))}const p=new Set,m=Ba(e?.getRootNode());function f(x){function _(k){var E;const P=r&&!Ag()?de:B=>B(),S=k??x,R=((E=S?.composedPath)==null?void 0:E.call(S))??[S?.target];P(()=>{const B=m?R[0]:je(x);if(!(!e||!h(x,B))){if(i||a){const A=Es(i,a);e.addEventListener(nm,A,{once:!0})}am(e,nm,{bubbles:!1,cancelable:!0,detail:{originalEvent:S,contextmenu:mS(S),focusable:RT(R),target:B}})}})}x.pointerType==="touch"?(p.forEach(k=>k()),p.add(Ee(l,"click",_,{once:!0})),p.add(d.addEventListener("click",_,{once:!0})),p.add(u.addEventListener("click",_,{once:!0}))):_()}const b=new Set,v=setTimeout(()=>{b.add(Ee(l,"pointerdown",f,!0)),b.add(d.addEventListener("pointerdown",f,!0)),b.add(u.addEventListener("pointerdown",f,!0))},0);function y(x){(r?de:_=>_())(()=>{var _;const k=((_=x?.composedPath)==null?void 0:_.call(x))??[x?.target],E=m?k[0]:je(x);if(!(!e||!h(x,E))){if(o||a){const P=Es(o,a);e.addEventListener(om,P,{once:!0})}am(e,om,{bubbles:!1,cancelable:!0,detail:{originalEvent:x,contextmenu:!1,focusable:Eo(E),target:E}})}})}return Ag()||(b.add(Ee(l,"focusin",y,!0)),b.add(d.addEventListener("focusin",y,!0)),b.add(u.addEventListener("focusin",y,!0))),()=>{clearTimeout(v),p.forEach(x=>x()),b.forEach(x=>x())}}function tf(e,t){const{defer:n}=t,o=n?de:a=>a(),i=[];return i.push(o(()=>{const a=typeof e=="function"?e():e;i.push(MT(a,t))})),()=>{i.forEach(a=>a?.())}}function am(e,t,n){const o=e.ownerDocument.defaultView||window,i=new o.CustomEvent(t,n);return e.dispatchEvent(i)}function NT(e,t){const n=o=>{o.key==="Escape"&&(o.isComposing||t==null||t(o))};return Ee(an(e),"keydown",n,{capture:!0})}var rm="layer:request-dismiss",Ht={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var t;const n=this.indexOf(e),o=this.topMostPointerBlockingLayer()?this.indexOf((t=this.topMostPointerBlockingLayer())==null?void 0:t.node):-1;return n<o},isTopMost(e){const t=this.layers[this.count()-1];return t?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){const n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(o=>o.type===t)},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(o=>o.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>Rt(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Rt(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(n=>Ht.dismiss(n.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested"),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);const n=this.countNestedLayersOfType(e.node,e.type);n>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${n}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){const n=this.indexOf(e);if(n===-1)return;const o=this.layers[n];FT(e,rm,i=>{var a;(a=o.requestDismiss)==null||a.call(o,i),i.defaultPrevented||o==null||o.dismiss()}),LT(e,rm,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function LT(e,t,n){const o=e.ownerDocument.defaultView||window,i=new o.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(i)}function FT(e,t,n){e.addEventListener(t,n,{once:!0})}var sm;function lm(){Ht.layers.forEach(({node:e})=>{e.style.pointerEvents=Ht.isBelowPointerBlockingLayer(e)?"none":"auto"})}function BT(e){e.style.pointerEvents=""}function zT(e,t){const n=an(e),o=[];return Ht.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(sm=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t?.forEach(i=>{const[a,r]=ZS(()=>{const s=i();return et(s)?s:null},{timeout:1e3});a.then(s=>o.push(Yp(s,{pointerEvents:"auto"}))),o.push(r)}),()=>{Ht.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=sm,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),o.forEach(i=>i()))}}function HT(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Po("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:o,onRequestDismiss:i,pointerBlocking:a,exclude:r,debug:s,type:l="dialog"}=t,c={dismiss:o,node:e,type:l,pointerBlocking:a,requestDismiss:i};Ht.add(c),lm();function u(f){var b,v;const y=je(f.detail.originalEvent);Ht.isBelowPointerBlockingLayer(e)||Ht.isInBranch(y)||((b=t.onPointerDownOutside)==null||b.call(t,f),(v=t.onInteractOutside)==null||v.call(t,f),!f.defaultPrevented&&(s&&console.log("onPointerDownOutside:",f.detail.originalEvent),o?.()))}function d(f){var b,v;const y=je(f.detail.originalEvent);Ht.isInBranch(y)||((b=t.onFocusOutside)==null||b.call(t,f),(v=t.onInteractOutside)==null||v.call(t,f),!f.defaultPrevented&&(s&&console.log("onFocusOutside:",f.detail.originalEvent),o?.()))}function h(f){var b;Ht.isTopMost(e)&&((b=t.onEscapeKeyDown)==null||b.call(t,f),!f.defaultPrevented&&o&&(f.preventDefault(),o()))}function p(f){var b;if(!e)return!1;const v=typeof r=="function"?r():r,y=Array.isArray(v)?v:[v],x=(b=t.persistentElements)==null?void 0:b.map(_=>_()).filter(et);return x&&y.push(...x),y.some(_=>Rt(_,f))||Ht.isInNestedLayer(e,f)}const m=[a?zT(e,t.persistentElements):void 0,NT(e,h),tf(e,{exclude:p,onFocusOutside:d,onPointerDownOutside:u,defer:t.defer})];return()=>{Ht.remove(e),lm(),BT(e),m.forEach(f=>f?.())}}function nr(e,t){const{defer:n}=t,o=n?de:a=>a(),i=[];return i.push(o(()=>{const a=qo(e)?e():e;i.push(HT(a,t))})),()=>{i.forEach(a=>a?.())}}function bx(e,t={}){const{defer:n}=t,o=n?de:a=>a(),i=[];return i.push(o(()=>{const a=qo(e)?e():e;if(!a){Po("[@zag-js/dismissable] branch node is `null` or `undefined`");return}Ht.addBranch(a),i.push(()=>{Ht.removeBranch(a)})})),()=>{i.forEach(a=>a?.())}}var jT=Object.defineProperty,WT=(e,t,n)=>t in e?jT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ue=(e,t,n)=>WT(e,typeof t!="symbol"?t+"":t,n),cm={activateTrap(e,t){if(e.length>0){const o=e[e.length-1];o!==t&&o.pause()}const n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},UT=[],GT=class{constructor(t,n){Ue(this,"trapStack"),Ue(this,"config"),Ue(this,"doc"),Ue(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Ue(this,"portalContainers",new Set),Ue(this,"listenerCleanups",[]),Ue(this,"handleFocus",i=>{const a=je(i),r=this.findContainerIndex(a,i)>=0;if(r||Su(a))r&&(this.state.mostRecentlyFocusedNode=a);else{i.stopImmediatePropagation();let s,l=!0;if(this.state.mostRecentlyFocusedNode)if(fr(this.state.mostRecentlyFocusedNode)>0){const c=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:u}=this.state.containerGroups[c];if(u.length>0){const d=u.findIndex(h=>h===this.state.mostRecentlyFocusedNode);d>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?d+1<u.length&&(s=u[d+1],l=!1):d-1>=0&&(s=u[d-1],l=!1))}}else this.state.containerGroups.some(c=>c.tabbableNodes.some(u=>fr(u)>0))||(l=!1);else l=!1;l&&(s=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),s?this.tryFocus(s):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),Ue(this,"handlePointerDown",i=>{const a=je(i);if(!(this.findContainerIndex(a,i)>=0)){if(br(this.config.clickOutsideDeactivates,i)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}br(this.config.allowOutsideClick,i)||i.preventDefault()}}),Ue(this,"handleClick",i=>{const a=je(i);this.findContainerIndex(a,i)>=0||br(this.config.clickOutsideDeactivates,i)||br(this.config.allowOutsideClick,i)||(i.preventDefault(),i.stopImmediatePropagation())}),Ue(this,"handleTabKey",i=>{if(this.config.isKeyForward(i)||this.config.isKeyBackward(i)){this.state.recentNavEvent=i;const a=this.config.isKeyBackward(i),r=this.findNextNavNode({event:i,isBackward:a});if(!r)return;vr(i)&&i.preventDefault(),this.tryFocus(r)}}),Ue(this,"handleEscapeKey",i=>{qT(i)&&br(this.config.escapeDeactivates,i)!==!1&&(i.preventDefault(),this.deactivate())}),Ue(this,"_mutationObserver"),Ue(this,"setupMutationObserver",()=>{const i=this.doc.defaultView||window;this._mutationObserver=new i.MutationObserver(a=>{a.some(r=>Array.from(r.removedNodes).some(s=>s===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),a.some(r=>r.type==="attributes"&&(r.attributeName==="aria-controls"||r.attributeName==="aria-expanded")?!0:r.type==="childList"&&r.addedNodes.length>0?Array.from(r.addedNodes).some(s=>{if(s.nodeType!==Node.ELEMENT_NODE)return!1;const l=s;return iS(l)?!0:l.id&&!this.state.containers.some(c=>c.contains(l))?aS(l):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Ue(this,"updateObservedNodes",()=>{var i;(i=this._mutationObserver)==null||i.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(a=>{var r;(r=this._mutationObserver)==null||r.observe(a,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(a=>{this.observePortalContainer(a)}))}),Ue(this,"getInitialFocusNode",()=>{let i=this.getNodeForOption("initialFocus",{hasFallback:!0});if(i===!1)return!1;if(i===void 0||i&&!Eo(i)){const a=cs(this.doc);if(a&&this.findContainerIndex(a)>=0)i=a;else{const r=this.state.tabbableGroups[0];i=r&&r.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else i===null&&(i=this.getNodeForOption("fallbackFocus"));if(!i)throw new Error("Your focus-trap needs to have at least one focusable element");return i.isConnected||(i=this.getNodeForOption("fallbackFocus")),i}),Ue(this,"tryFocus",i=>{if(i!==!1&&i!==cs(this.doc)){if(!i||!i.focus){this.tryFocus(this.getInitialFocusNode());return}i.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=i,YT(i)&&i.select()}}),Ue(this,"deactivate",i=>{if(!this.state.active)return this;const a={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...i};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),cm.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const r=this.getOption(a,"onDeactivate"),s=this.getOption(a,"onPostDeactivate"),l=this.getOption(a,"checkCanReturnFocus"),c=this.getOption(a,"returnFocus","returnFocusOnDeactivate");r?.();const u=()=>{um(()=>{if(c){const d=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(d)}s?.()})};if(c&&l){const d=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(d).then(u,u),this}return u(),this}),Ue(this,"pause",i=>{if(this.state.paused||!this.state.active)return this;const a=this.getOption(i,"onPause"),r=this.getOption(i,"onPostPause");return this.state.paused=!0,a?.(),this.removeListeners(),this.updateObservedNodes(),r?.(),this}),Ue(this,"unpause",i=>{if(!this.state.paused||!this.state.active)return this;const a=this.getOption(i,"onUnpause"),r=this.getOption(i,"onPostUnpause");return this.state.paused=!1,a?.(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),r?.(),this}),Ue(this,"updateContainerElements",i=>(this.state.containers=Array.isArray(i)?i.filter(Boolean):[i].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Ue(this,"getReturnFocusNode",i=>{const a=this.getNodeForOption("setReturnFocus",{params:[i]});return a||(a===!1?!1:i)}),Ue(this,"getOption",(i,a,r)=>i&&i[a]!==void 0?i[a]:this.config[r||a]),Ue(this,"getNodeForOption",(i,{hasFallback:a=!1,params:r=[]}={})=>{let s=this.config[i];if(typeof s=="function"&&(s=s(...r)),s===!0&&(s=void 0),!s){if(s===void 0||s===!1)return s;throw new Error(`\`${i}\` was specified but was not a node, or did not return a node`)}let l=s;if(typeof s=="string"){try{l=this.doc.querySelector(s)}catch(c){throw new Error(`\`${i}\` appears to be an invalid selector; error="${c.message}"`)}if(!l&&!a)throw new Error(`\`${i}\` as selector refers to no known node`)}return l}),Ue(this,"findNextNavNode",i=>{const{event:a,isBackward:r=!1}=i,s=i.target||je(a);this.updateTabbableNodes();let l=null;if(this.state.tabbableGroups.length>0){const c=this.findContainerIndex(s,a),u=c>=0?this.state.containerGroups[c]:void 0;if(c<0)r?l=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:l=this.state.tabbableGroups[0].firstTabbableNode;else if(r){let d=this.state.tabbableGroups.findIndex(({firstTabbableNode:h})=>s===h);if(d<0&&(u?.container===s||Eo(s)&&!Oi(s)&&!(u!=null&&u.nextTabbableNode(s,!1)))&&(d=c),d>=0){const h=d===0?this.state.tabbableGroups.length-1:d-1,p=this.state.tabbableGroups[h];l=fr(s)>=0?p.lastTabbableNode:p.lastDomTabbableNode}else vr(a)||(l=u?.nextTabbableNode(s,!1))}else{let d=this.state.tabbableGroups.findIndex(({lastTabbableNode:h})=>s===h);if(d<0&&(u?.container===s||Eo(s)&&!Oi(s)&&!(u!=null&&u.nextTabbableNode(s)))&&(d=c),d>=0){const h=d===this.state.tabbableGroups.length-1?0:d+1,p=this.state.tabbableGroups[h];l=fr(s)>=0?p.firstTabbableNode:p.firstDomTabbableNode}else vr(a)||(l=u?.nextTabbableNode(s))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=n.trapStack||UT;const o={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(i){return vr(i)&&!i.shiftKey},isKeyBackward(i){return vr(i)&&i.shiftKey},...n};this.doc=o.document||an(Array.isArray(t)?t[0]:t),this.config=o,this.updateContainerElements(t),this.setupMutationObserver()}addPortalContainer(t){const n=t.parentElement;n&&!this.portalContainers.has(n)&&(this.portalContainers.add(n),this.state.active&&!this.state.paused&&this.observePortalContainer(n))}observePortalContainer(t){var n;(n=this._mutationObserver)==null||n.observe(t,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(t=>{tS(t).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(t,n){const o=typeof n?.composedPath=="function"?n.composedPath():void 0;return this.state.containerGroups.findIndex(({container:i,tabbableNodes:a})=>i.contains(t)||o?.includes(i)||a.find(r=>r===t)||this.isControlledElement(i,t))}isControlledElement(t,n){return this.config.followControlledElements?E0(t,n):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(t=>{const n=js(t,{getShadowRoot:this.config.getShadowRoot}),o=N0(t,{getShadowRoot:this.config.getShadowRoot}),i=n[0],a=n[n.length-1],r=i,s=a;let l=!1;for(let u=0;u<n.length;u++)if(fr(n[u])>0){l=!0;break}function c(u,d=!0){const h=n.indexOf(u);if(h>=0)return n[h+(d?1:-1)];const p=o.indexOf(u);if(!(p<0)){if(d){for(let m=p+1;m<o.length;m++)if(Oi(o[m]))return o[m]}else for(let m=p-1;m>=0;m--)if(Oi(o[m]))return o[m]}}return{container:t,tabbableNodes:n,focusableNodes:o,posTabIndexesFound:l,firstTabbableNode:i,lastTabbableNode:a,firstDomTabbableNode:r,lastDomTabbableNode:s,nextTabbableNode:c}}),this.state.tabbableGroups=this.state.containerGroups.filter(t=>t.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(t=>t.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return cm.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?um(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Ee(this.doc,"focusin",this.handleFocus,!0),Ee(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Ee(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Ee(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Ee(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Ee(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(t=>t()),this.listenerCleanups=[],this}activate(t){if(this.state.active)return this;const n=this.getOption(t,"onActivate"),o=this.getOption(t,"onPostActivate"),i=this.getOption(t,"checkCanFocusTrap");i||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=cs(this.doc),n?.();const a=()=>{i&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),o?.()};return i?(i(this.state.containers.concat()).then(a,a),this):(a(),this)}},vr=e=>e.key==="Tab",br=(e,...t)=>typeof e=="function"?e(...t):e,qT=e=>!e.isComposing&&e.key==="Escape",um=e=>setTimeout(e,0),YT=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function KT(e,t={}){let n;const o=de(()=>{const i=typeof e=="function"?e():e;if(i){n=new GT(i,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:i,...t,document:an(i)});try{n.activate()}catch{}}});return function(){n?.deactivate(),o()}}var XT=be("bottom-sheet").parts("content","title","trigger","backdrop","grabber","grabberIndicator","closeTrigger");XT.build();ie()(["id","ids","dir","modal","initialFocusEl","finalFocusEl","open","defaultOpen","getRootNode","snapPoints","swipeVelocityThreshold","closeThreshold","preventDragOnScroll","closeOnEscape","closeOnInteractOutside","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","preventScroll","restoreFocus","role","trapFocus","defaultActiveSnapPoint","activeSnapPoint","onActiveSnapPointChange"]);var ZT=be("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger");ZT.build();ie()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]);ie()(["index","readOnly"]);ie()(["index","snapAlign"]);const[yx,Js]=Re("CheckboxContext"),JT=O({__name:"checkbox-context",setup(e){const t=Js();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),QT=O({__name:"checkbox-control",props:{asChild:{type:Boolean}},setup(e){const t=Js();return Y(),(n,o)=>(w(),$(g(X).div,U(g(t).getControlProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}});function eO(e){return!(e.metaKey||!Tu()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}var tO=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function nO(e,t,n){const o=n?je(n):null,i=Ke(o);return e=e||o instanceof i.HTMLInputElement&&!tO.has(o?.type)||o instanceof i.HTMLTextAreaElement||o instanceof i.HTMLElement&&o.isContentEditable,!(e&&t==="keyboard"&&n instanceof i.KeyboardEvent&&!Reflect.has(oO,n.key))}var di=null,$h=new Set,Zc=new Map,Hi=!1,Eh=!1,oO={Tab:!0,Escape:!0};function Fu(e,t){for(let n of $h)n(e,t)}function Jc(e){Hi=!0,eO(e)&&(di="keyboard",Fu("keyboard",e))}function vn(e){di="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Hi=!0,Fu("pointer",e))}function xx(e){gS(e)&&(Hi=!0,di="virtual")}function wx(e){const t=je(e);t===Ke(t)||t===an(t)||(!Hi&&!Eh&&(di="virtual",Fu("virtual",e)),Hi=!1,Eh=!1)}function _x(){Hi=!1,Eh=!0}function iO(e){if(typeof window>"u"||Zc.get(Ke(e)))return;const t=Ke(e),n=an(e);let o=t.HTMLElement.prototype.focus;function i(){di="virtual",Fu("virtual",null),Hi=!0,o.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:i})}catch{}n.addEventListener("keydown",Jc,!0),n.addEventListener("keyup",Jc,!0),n.addEventListener("click",xx,!0),t.addEventListener("focus",wx,!0),t.addEventListener("blur",_x,!1),typeof t.PointerEvent<"u"?(n.addEventListener("pointerdown",vn,!0),n.addEventListener("pointermove",vn,!0),n.addEventListener("pointerup",vn,!0)):(n.addEventListener("mousedown",vn,!0),n.addEventListener("mousemove",vn,!0),n.addEventListener("mouseup",vn,!0)),t.addEventListener("beforeunload",()=>{aO(e)},{once:!0}),Zc.set(t,{focus:o})}var aO=(e,t)=>{const n=Ke(e),o=an(e),i=Zc.get(n);if(i){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:i.focus})}catch{}o.removeEventListener("keydown",Jc,!0),o.removeEventListener("keyup",Jc,!0),o.removeEventListener("click",xx,!0),n.removeEventListener("focus",wx,!0),n.removeEventListener("blur",_x,!1),typeof n.PointerEvent<"u"?(o.removeEventListener("pointerdown",vn,!0),o.removeEventListener("pointermove",vn,!0),o.removeEventListener("pointerup",vn,!0)):(o.removeEventListener("mousedown",vn,!0),o.removeEventListener("mousemove",vn,!0),o.removeEventListener("mouseup",vn,!0)),Zc.delete(n)}};function rO(){return di}function Ts(){return di==="keyboard"}function Bu(e={}){const{isTextInput:t,autoFocus:n,onChange:o,root:i}=e;iO(i),o?.({isFocusVisible:n||Ts(),modality:di});const a=(r,s)=>{nO(!!t,r,s)&&o?.({isFocusVisible:Ts(),modality:r})};return $h.add(a),()=>{$h.delete(a)}}var Cx=be("checkbox").parts("root","label","control","indicator"),_l=Cx.build(),kx=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`checkbox:${e.id}`},dm=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`checkbox:${e.id}:label`},sO=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`checkbox:${e.id}:control`},Th=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`checkbox:${e.id}:input`},lO=e=>e.getById(kx(e)),Qr=e=>e.getById(Th(e));function cO(e,t){const{send:n,context:o,prop:i,computed:a,scope:r}=e,s=!!i("disabled"),l=!!i("readOnly"),c=!!i("required"),u=!!i("invalid"),d=!s&&o.get("focused"),h=!s&&o.get("focusVisible"),p=a("checked"),m=a("indeterminate"),f=o.get("checked"),b={"data-active":D(o.get("active")),"data-focus":D(d),"data-focus-visible":D(h),"data-readonly":D(l),"data-hover":D(o.get("hovered")),"data-disabled":D(s),"data-state":m?"indeterminate":p?"checked":"unchecked","data-invalid":D(u),"data-required":D(c)};return{checked:p,disabled:s,indeterminate:m,focused:d,checkedState:f,setChecked(v){n({type:"CHECKED.SET",checked:v,isTrusted:!1})},toggleChecked(){n({type:"CHECKED.TOGGLE",checked:p,isTrusted:!1})},getRootProps(){return t.label({..._l.root.attrs,...b,dir:i("dir"),id:kx(r),htmlFor:Th(r),onPointerMove(){s||n({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){s||n({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(v){je(v)===Qr(r)&&v.stopPropagation()}})},getLabelProps(){return t.element({..._l.label.attrs,...b,dir:i("dir"),id:dm(r)})},getControlProps(){return t.element({..._l.control.attrs,...b,dir:i("dir"),id:sO(r),"aria-hidden":!0})},getIndicatorProps(){return t.element({..._l.indicator.attrs,...b,dir:i("dir"),hidden:!m&&!p})},getHiddenInputProps(){return t.input({id:Th(r),type:"checkbox",required:i("required"),defaultChecked:p,disabled:s,"aria-labelledby":dm(r),"aria-invalid":u,name:i("name"),form:i("form"),value:i("value"),style:Ru,onFocus(){const v=Ts();n({type:"CONTEXT.SET",context:{focused:!0,focusVisible:v}})},onBlur(){n({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(v){if(l){v.preventDefault();return}const y=v.currentTarget.checked;n({type:"CHECKED.SET",checked:y,isTrusted:!0})}})}}}var{not:hm}=Ct(),uO={props({props:e}){return{value:"on",...e,defaultChecked:e.defaultChecked??!1}},initialState(){return"ready"},context({prop:e,bindable:t}){return{checked:t(()=>({defaultValue:e("defaultChecked"),value:e("checked"),onChange(n){var o;(o=e("onCheckedChange"))==null||o({checked:n})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1}))}},watch({track:e,context:t,prop:n,action:o}){e([()=>n("disabled")],()=>{o(["removeFocusIfNeeded"])}),e([()=>t.get("checked")],()=>{o(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:hm("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:hm("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},computed:{indeterminate:({context:e})=>fc(e.get("checked")),checked:({context:e})=>dO(e.get("checked")),disabled:({context:e,prop:t})=>!!t("disabled")||e.get("fieldsetDisabled")},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({context:e,computed:t,scope:n}){if(!t("disabled"))return U0({pointerNode:lO(n),keyboardNode:Qr(n),isValidKey:o=>o.key===" ",onPress:()=>e.set("active",!1),onPressStart:()=>e.set("active",!0),onPressEnd:()=>e.set("active",!1)})},trackFocusVisible({computed:e,scope:t}){var n;if(!e("disabled"))return Bu({root:(n=t.getRootNode)==null?void 0:n.call(t)})},trackFormControlState({context:e,scope:t}){return tr(Qr(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){e.set("checked",e.initial("checked"))}})}},actions:{setContext({context:e,event:t}){for(const n in t.context)e.set(n,t.context[n])},syncInputElement({context:e,computed:t,scope:n}){const o=Qr(n);o&&(zp(o,t("checked")),o.indeterminate=fc(e.get("checked")))},removeFocusIfNeeded({context:e,prop:t}){t("disabled")&&e.get("focused")&&(e.set("focused",!1),e.set("focusVisible",!1))},setChecked({context:e,event:t}){e.set("checked",t.checked)},toggleChecked({context:e,computed:t}){const n=fc(t("checked"))?!0:!t("checked");e.set("checked",n)},dispatchChangeEvent({computed:e,scope:t}){queueMicrotask(()=>{const n=Qr(t);R0(n,{checked:e("checked")})})}}}};function fc(e){return e==="indeterminate"}function dO(e){return fc(e)?!1:!!e}ie()(["defaultChecked","checked","dir","disabled","form","getRootNode","id","ids","invalid","name","onCheckedChange","readOnly","required","value"]);const nf=Cx.extendWith("group");function hO(e,t,n,o={}){var i,a,r;const{passive:s=!1,eventName:l,defaultValue:c}=o,u=Bs(),d=n||u?.emit||((i=u?.$emit)==null?void 0:i.bind(u))||((r=(a=u?.proxy)==null?void 0:a.$emit)==null?void 0:r.bind(u?.proxy)),h=t,p=()=>e[h]??c,m=f=>{if(!l)d(l||`update:${h.toString()}`,f);else for(const b of l)d(b,f)};if(s){const f=p(),b=fe(f);let v=!1;return ze(()=>e[h],y=>{v||(v=!0,b.value=y,no(()=>{v=!1}))}),ze(b,y=>{!v&&y!==e[h]&&m(y)}),b}return I({get(){return p()},set(f){m(f)}})}function pO(e,t){const n=I(()=>!(e.disabled||e.readOnly)),{defaultValue:o}=jC(e),i=hO(e,"modelValue",t,{defaultValue:o?.value??[],passive:e.modelValue===void 0,eventName:["valueChange","update:modelValue"]}),a=d=>i.value.some(h=>String(h)===String(d)),r=d=>{a(d)?l(d):s(d)},s=d=>{n.value&&(a(d)||(i.value=i.value.concat(d)))},l=d=>{n.value&&(i.value=i.value.filter(h=>String(h)!==String(d)))},c=d=>({checked:d.value!=null?a(d.value):void 0,onCheckedChange(){d.value!=null&&r(d.value)},name:e.name,disabled:e.disabled,readOnly:e.readOnly,invalid:e.invalid}),u=d=>{i.value=d};return I(()=>({isChecked:a,value:i.value,name:e.name,disabled:e.disabled,readOnly:e.readOnly,invalid:e.invalid,addValue:s,setValue:u,toggleValue:r,getItemProps:c}))}const[Sx,fO]=Re("CheckboxGroupContext"),gO=O({__name:"checkbox-group",props:_n({defaultValue:{},modelValue:{},disabled:{type:Boolean},readOnly:{type:Boolean},name:{},invalid:{type:Boolean},asChild:{type:Boolean}},{disabled:void 0,readOnly:void 0,invalid:void 0}),emits:["valueChange","update:modelValue"],setup(e,{emit:t}){const n=pO(e,t);return Sx(n),Y(),(o,i)=>(w(),$(g(X).div,U({role:"group"},{...g(nf).build().group.attrs},{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),mO=O({__name:"checkbox-group-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return Sx(n),Y(),(o,i)=>(w(),$(g(X).div,U({role:"group"},g(nf).build().group.attrs,{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),vO=O({__name:"checkbox-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=Js(),n=ao();return Y(),(o,i)=>{var a;return w(),$(g(X).input,U({"aria-describedby":(a=g(n))==null?void 0:a.ariaDescribedby},g(t).getHiddenInputProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["aria-describedby","as-child"])}}}),bO=O({__name:"checkbox-indicator",props:{indeterminate:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=Js(),o=I(()=>t.indeterminate?n.value.indeterminate:n.value.checked);return Y(),(i,a)=>(w(),$(g(X).div,U(g(n).getIndicatorProps(),{hidden:!o.value,"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["hidden","as-child"]))}}),yO=O({__name:"checkbox-label",props:{asChild:{type:Boolean}},setup(e){const t=Js();return Y(),(n,o)=>(w(),$(g(X).span,U(g(t).getLabelProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),xO=O({__name:"checkbox-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return yx(n),Y(),(o,i)=>(w(),$(g(X).label,U(n.value.getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),wO=(e={},t)=>{const n=Ut(),o=sn(ln),i=kn(Cn),a=ao(),r=fO(),s=I(()=>{const u=Ye(e);return Gs(u,r?.value.getItemProps({value:u.value})??{})}),l=I(()=>{const u=Ye(s);return{id:n,ids:{label:a?.value.ids.label,hiddenInput:a?.value.ids.control},disabled:a?.value.disabled,readOnly:a?.value.readOnly,invalid:a?.value.invalid,required:a?.value.required,dir:i.value.dir,getRootNode:o?.value.getRootNode,...Fn(u),onCheckedChange(d){var h;t?.("checkedChange",d),t?.("update:checked",d.checked),(h=u.onCheckedChange)==null||h.call(u,d)}}}),c=Gt(uO,l);return I(()=>cO(c,rn))},_O=O({__name:"checkbox-root",props:_n({checked:{},defaultChecked:{},disabled:{type:Boolean},form:{},id:{},ids:{},invalid:{type:Boolean},name:{},readOnly:{type:Boolean},required:{type:Boolean},value:{},asChild:{type:Boolean}},{checked:void 0,defaultChecked:void 0,disabled:void 0,invalid:void 0,readOnly:void 0,required:void 0}),emits:["checkedChange","update:checked"],setup(e,{emit:t}){const n=wO(e,t);return yx(n),Y(),(o,i)=>(w(),$(g(X).label,U(g(n).getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),ca=Object.freeze(Object.defineProperty({__proto__:null,Context:JT,Control:QT,Group:gO,GroupProvider:mO,HiddenInput:vO,Indicator:bO,Label:yO,Root:_O,RootProvider:xO},Symbol.toStringTag,{value:"Module"}));var CO=be("clipboard").parts("root","control","trigger","indicator","input","label");CO.build();ie()(["getRootNode","id","ids","value","defaultValue","timeout","onStatusChange","onValueChange"]);ie()(["copied"]);var kO=Object.defineProperty,SO=(e,t,n)=>t in e?kO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,J=(e,t,n)=>SO(e,typeof t!="symbol"?t+"":t,n),gc={itemToValue(e){return typeof e=="string"?e:Ii(e)&&Yo(e,"value")?e.value:""},itemToString(e){return typeof e=="string"?e:Ii(e)&&Yo(e,"label")?e.label:gc.itemToValue(e)},isItemDisabled(e){return Ii(e)&&Yo(e,"disabled")?!!e.disabled:!1}},Ji=class $x{constructor(t){this.options=t,J(this,"items"),J(this,"indexMap",null),J(this,"copy",n=>new $x({...this.options,items:n??[...this.items]})),J(this,"isEqual",n=>bt(this.items,n.items)),J(this,"setItems",n=>this.copy(n)),J(this,"getValues",(n=this.items)=>{const o=[];for(const i of n){const a=this.getItemValue(i);a!=null&&o.push(a)}return o}),J(this,"find",n=>{if(n==null)return null;const o=this.indexOf(n);return o!==-1?this.at(o):null}),J(this,"findMany",n=>{const o=[];for(const i of n){const a=this.find(i);a!=null&&o.push(a)}return o}),J(this,"at",n=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[n]??null;let o=0;const i=this.group();for(const[,a]of i)for(const r of a){if(o===n)return r;o++}return null}),J(this,"sortFn",(n,o)=>{const i=this.indexOf(n),a=this.indexOf(o);return(i??0)-(a??0)}),J(this,"sort",n=>[...n].sort(this.sortFn.bind(this))),J(this,"getItemValue",n=>{var o,i;return n==null?null:((i=(o=this.options).itemToValue)==null?void 0:i.call(o,n))??gc.itemToValue(n)}),J(this,"getItemDisabled",n=>{var o,i;return n==null?!1:((i=(o=this.options).isItemDisabled)==null?void 0:i.call(o,n))??gc.isItemDisabled(n)}),J(this,"stringifyItem",n=>{var o,i;return n==null?null:((i=(o=this.options).itemToString)==null?void 0:i.call(o,n))??gc.itemToString(n)}),J(this,"stringify",n=>n==null?null:this.stringifyItem(this.find(n))),J(this,"stringifyItems",(n,o=", ")=>{const i=[];for(const a of n){const r=this.stringifyItem(a);r!=null&&i.push(r)}return i.join(o)}),J(this,"stringifyMany",(n,o)=>this.stringifyItems(this.findMany(n),o)),J(this,"has",n=>this.indexOf(n)!==-1),J(this,"hasItem",n=>n==null?!1:this.has(this.getItemValue(n))),J(this,"group",()=>{const{groupBy:n,groupSort:o}=this.options;if(!n)return[["",[...this.items]]];const i=new Map;this.items.forEach((r,s)=>{const l=n(r,s);i.has(l)||i.set(l,[]),i.get(l).push(r)});let a=Array.from(i.entries());return o&&a.sort(([r],[s])=>{if(typeof o=="function")return o(r,s);if(Array.isArray(o)){const l=o.indexOf(r),c=o.indexOf(s);return l===-1?1:c===-1?-1:l-c}return o==="asc"?r.localeCompare(s):o==="desc"?s.localeCompare(r):0}),a}),J(this,"getNextValue",(n,o=1,i=!1)=>{let a=this.indexOf(n);if(a===-1)return null;for(a=i?Math.min(a+o,this.size-1):a+o;a<=this.size&&this.getItemDisabled(this.at(a));)a++;return this.getItemValue(this.at(a))}),J(this,"getPreviousValue",(n,o=1,i=!1)=>{let a=this.indexOf(n);if(a===-1)return null;for(a=i?Math.max(a-o,0):a-o;a>=0&&this.getItemDisabled(this.at(a));)a--;return this.getItemValue(this.at(a))}),J(this,"indexOf",n=>{if(n==null)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(o=>this.getItemValue(o)===n);if(!this.indexMap){this.indexMap=new Map;let o=0;const i=this.group();for(const[,a]of i)for(const r of a){const s=this.getItemValue(r);s!=null&&this.indexMap.set(s,o),o++}}return this.indexMap.get(n)??-1}),J(this,"getByText",(n,o)=>{const i=o!=null?this.indexOf(o):-1,a=n.length===1;for(let r=0;r<this.items.length;r++){const s=this.items[(i+r+1)%this.items.length];if(!(a&&this.getItemValue(s)===o)&&!this.getItemDisabled(s)&&$O(this.stringifyItem(s),n))return s}}),J(this,"search",(n,o)=>{const{state:i,currentValue:a,timeout:r=350}=o,s=i.keysSoFar+n,l=s.length>1&&Array.from(s).every(p=>p===s[0])?s[0]:s,c=this.getByText(l,a),u=this.getItemValue(c);function d(){clearTimeout(i.timer),i.timer=-1}function h(p){i.keysSoFar=p,d(),p!==""&&(i.timer=+setTimeout(()=>{h(""),d()},r))}return h(s),u}),J(this,"update",(n,o)=>{let i=this.indexOf(n);return i===-1?this:this.copy([...this.items.slice(0,i),o,...this.items.slice(i+1)])}),J(this,"upsert",(n,o,i="append")=>{let a=this.indexOf(n);return a===-1?(i==="append"?this.append:this.prepend)(o):this.copy([...this.items.slice(0,a),o,...this.items.slice(a+1)])}),J(this,"insert",(n,...o)=>this.copy(yr(this.items,n,...o))),J(this,"insertBefore",(n,...o)=>{let i=this.indexOf(n);if(i===-1)if(this.items.length===0)i=0;else return this;return this.copy(yr(this.items,i,...o))}),J(this,"insertAfter",(n,...o)=>{let i=this.indexOf(n);if(i===-1)if(this.items.length===0)i=0;else return this;return this.copy(yr(this.items,i+1,...o))}),J(this,"prepend",(...n)=>this.copy(yr(this.items,0,...n))),J(this,"append",(...n)=>this.copy(yr(this.items,this.items.length,...n))),J(this,"filter",n=>{const o=this.items.filter((i,a)=>n(this.stringifyItem(i),a,i));return this.copy(o)}),J(this,"remove",(...n)=>{const o=n.map(i=>typeof i=="string"?i:this.getItemValue(i));return this.copy(this.items.filter(i=>{const a=this.getItemValue(i);return a==null?!1:!o.includes(a)}))}),J(this,"move",(n,o)=>{const i=this.indexOf(n);return i===-1?this:this.copy(Cl(this.items,[i],o))}),J(this,"moveBefore",(n,...o)=>{let i=this.items.findIndex(r=>this.getItemValue(r)===n);if(i===-1)return this;let a=o.map(r=>this.items.findIndex(s=>this.getItemValue(s)===r)).sort((r,s)=>r-s);return this.copy(Cl(this.items,a,i))}),J(this,"moveAfter",(n,...o)=>{let i=this.items.findIndex(r=>this.getItemValue(r)===n);if(i===-1)return this;let a=o.map(r=>this.items.findIndex(s=>this.getItemValue(s)===r)).sort((r,s)=>r-s);return this.copy(Cl(this.items,a,i+1))}),J(this,"reorder",(n,o)=>this.copy(Cl(this.items,[n],o))),J(this,"compareValue",(n,o)=>{const i=this.indexOf(n),a=this.indexOf(o);return i<a?-1:i>a?1:0}),J(this,"range",(n,o)=>{let i=[],a=n;for(;a!=null;){if(this.find(a)&&i.push(a),a===o)return i;a=this.getNextValue(a)}return[]}),J(this,"getValueRange",(n,o)=>n&&o?this.compareValue(n,o)<=0?this.range(n,o):this.range(o,n):[]),J(this,"toString",()=>{let n="";for(const o of this.items){const i=this.getItemValue(o),a=this.stringifyItem(o),r=this.getItemDisabled(o),s=[i,a,r].filter(Boolean).join(":");n+=s+","}return n}),J(this,"toJSON",()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let t=0;for(;this.getItemDisabled(this.at(t));)t++;return this.getItemValue(this.at(t))}get lastValue(){let t=this.size-1;for(;this.getItemDisabled(this.at(t));)t--;return this.getItemValue(this.at(t))}*[Symbol.iterator](){yield*this.items}},$O=(e,t)=>!!(e!=null&&e.toLowerCase().startsWith(t.toLowerCase()));function yr(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function Cl(e,t,n){t=[...t].sort((i,a)=>i-a);const o=t.map(i=>e[i]);for(let i=t.length-1;i>=0;i--)e=[...e.slice(0,t[i]),...e.slice(t[i]+1)];return n=Math.max(0,n-t.filter(i=>i<n).length),[...e.slice(0,n),...o,...e.slice(n)]}var EO=class mc extends Set{constructor(t=[]){super(t),J(this,"selectionMode","single"),J(this,"deselectable",!0),J(this,"copy",()=>{const n=new mc([...this]);return this.sync(n)}),J(this,"sync",n=>(n.selectionMode=this.selectionMode,n.deselectable=this.deselectable,n)),J(this,"isEmpty",()=>this.size===0),J(this,"isSelected",n=>this.selectionMode==="none"||n==null?!1:this.has(n)),J(this,"canSelect",(n,o)=>this.selectionMode!=="none"||!n.getItemDisabled(n.find(o))),J(this,"firstSelectedValue",n=>{let o=null;for(let i of this)(!o||n.compareValue(i,o)<0)&&(o=i);return o}),J(this,"lastSelectedValue",n=>{let o=null;for(let i of this)(!o||n.compareValue(i,o)>0)&&(o=i);return o}),J(this,"extendSelection",(n,o,i)=>{if(this.selectionMode==="none")return this;if(this.selectionMode==="single")return this.replaceSelection(n,i);const a=this.copy(),r=Array.from(this).pop();for(let s of n.getValueRange(o,r??i))a.delete(s);for(let s of n.getValueRange(i,o))this.canSelect(n,s)&&a.add(s);return a}),J(this,"toggleSelection",(n,o)=>{if(this.selectionMode==="none")return this;if(this.selectionMode==="single"&&!this.isSelected(o))return this.replaceSelection(n,o);const i=this.copy();return i.has(o)?i.delete(o):i.canSelect(n,o)&&i.add(o),i}),J(this,"replaceSelection",(n,o)=>{if(this.selectionMode==="none")return this;if(o==null)return this;if(!this.canSelect(n,o))return this;const i=new mc([o]);return this.sync(i)}),J(this,"setSelection",n=>{if(this.selectionMode==="none")return this;let o=new mc;for(let i of n)if(i!=null&&(o.add(i),this.selectionMode==="single"))break;return this.sync(o)}),J(this,"clearSelection",()=>{const n=this.copy();return n.deselectable&&n.size>0&&n.clear(),n}),J(this,"select",(n,o,i)=>this.selectionMode==="none"?this:this.selectionMode==="single"?this.isSelected(o)&&this.deselectable?this.toggleSelection(n,o):this.replaceSelection(n,o):this.selectionMode==="multiple"||i?this.toggleSelection(n,o):this.replaceSelection(n,o)),J(this,"deselect",n=>{const o=this.copy();return o.delete(n),o}),J(this,"isEqual",n=>bt(Array.from(this),Array.from(n)))}};function Ex(e,t,n){for(let o=0;o<t.length;o++)e=n.getChildren(e,t.slice(o+1))[t[o]];return e}function TO(e){const t=OO(e),n=[],o=new Set;for(const i of t){const a=i.join();o.has(a)||(o.add(a),n.push(i))}return n}function Tx(e,t){for(let n=0;n<Math.min(e.length,t.length);n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return e.length-t.length}function OO(e){return e.sort(Tx)}function IO(e,t){let n;return Kt(e,{...t,onEnter:(o,i)=>{if(t.predicate(o,i))return n=o,"stop"}}),n}function PO(e,t){const n=[];return Kt(e,{onEnter:(o,i)=>{t.predicate(o,i)&&n.push(o)},getChildren:t.getChildren}),n}function pm(e,t){let n;return Kt(e,{onEnter:(o,i)=>{if(t.predicate(o,i))return n=[...i],"stop"},getChildren:t.getChildren}),n}function AO(e,t){let n=t.initialResult;return Kt(e,{...t,onEnter:(o,i)=>{n=t.nextResult(n,o,i)}}),n}function RO(e,t){return AO(e,{...t,initialResult:[],nextResult:(n,o,i)=>(n.push(...t.transform(o,i)),n)})}function DO(e,t){const{predicate:n,create:o,getChildren:i}=t,a=(r,s)=>{const l=i(r,s),c=[];l.forEach((p,m)=>{const f=[...s,m],b=a(p,f);b&&c.push(b)});const u=s.length===0,d=n(r,s),h=c.length>0;return u||d||h?o(r,c,s):null};return a(e,[])||o(e,[],[])}function VO(e,t){const n=[];let o=0;const i=new Map,a=new Map;return Kt(e,{getChildren:t.getChildren,onEnter:(r,s)=>{i.has(r)||i.set(r,o++);const l=t.getChildren(r,s);l.forEach(p=>{a.has(p)||a.set(p,r),i.has(p)||i.set(p,o++)});const c=l.length>0?l.map(p=>i.get(p)):void 0,u=a.get(r),d=u?i.get(u):void 0,h=i.get(r);n.push({...r,_children:c,_parent:d,_index:h})}}),n}function MO(e,t){return{type:"insert",index:e,nodes:t}}function NO(e){return{type:"remove",indexes:e}}function of(){return{type:"replace"}}function Ox(e){return[e.slice(0,-1),e[e.length-1]]}function Ix(e,t,n=new Map){var o;const[i,a]=Ox(e);for(let s=i.length-1;s>=0;s--){const l=i.slice(0,s).join();switch((o=n.get(l))==null?void 0:o.type){case"remove":continue}n.set(l,of())}const r=n.get(i.join());switch(r?.type){case"remove":n.set(i.join(),{type:"removeThenInsert",removeIndexes:r.indexes,insertIndex:a,insertNodes:t});break;default:n.set(i.join(),MO(a,t))}return n}function Px(e){const t=new Map,n=new Map;for(const o of e){const i=o.slice(0,-1).join(),a=n.get(i)??[];a.push(o[o.length-1]),n.set(i,a.sort((r,s)=>r-s))}for(const o of e)for(let i=o.length-2;i>=0;i--){const a=o.slice(0,i).join();t.has(a)||t.set(a,of())}for(const[o,i]of n)t.set(o,NO(i));return t}function LO(e,t){const n=new Map,[o,i]=Ox(e);for(let a=o.length-1;a>=0;a--){const r=o.slice(0,a).join();n.set(r,of())}return n.set(o.join(),{type:"removeThenInsert",removeIndexes:[i],insertIndex:i,insertNodes:[t]}),n}function zu(e,t,n){return FO(e,{...n,getChildren:(o,i)=>{const a=i.join(),r=t.get(a);switch(r?.type){case"replace":case"remove":case"removeThenInsert":case"insert":return n.getChildren(o,i);default:return[]}},transform:(o,i,a)=>{const r=a.join(),s=t.get(r);switch(s?.type){case"remove":return n.create(o,i.filter((u,d)=>!s.indexes.includes(d)),a);case"removeThenInsert":const l=i.filter((u,d)=>!s.removeIndexes.includes(d)),c=s.removeIndexes.reduce((u,d)=>d<u?u-1:u,s.insertIndex);return n.create(o,fm(l,c,0,...s.insertNodes),a);case"insert":return n.create(o,fm(i,s.index,0,...s.nodes),a);case"replace":return n.create(o,i,a);default:return o}}})}function fm(e,t,n,...o){return[...e.slice(0,t),...o,...e.slice(t+n)]}function FO(e,t){const n={};return Kt(e,{...t,onLeave:(o,i)=>{const a=[0,...i],r=a.join(),s=t.transform(o,n[r]??[],i),l=a.slice(0,-1).join(),c=n[l]??[];c.push(s),n[l]=c}}),n[""][0]}function BO(e,t){const{nodes:n,at:o}=t;if(o.length===0)throw new Error("Can't insert nodes at the root");const i=Ix(o,n);return zu(e,i,t)}function zO(e,t){if(t.at.length===0)return t.node;const n=LO(t.at,t.node);return zu(e,n,t)}function HO(e,t){if(t.indexPaths.length===0)return e;for(const o of t.indexPaths)if(o.length===0)throw new Error("Can't remove the root node");const n=Px(t.indexPaths);return zu(e,n,t)}function jO(e,t){if(t.indexPaths.length===0)return e;for(const a of t.indexPaths)if(a.length===0)throw new Error("Can't move the root node");if(t.to.length===0)throw new Error("Can't move nodes to the root");const n=TO(t.indexPaths),o=n.map(a=>Ex(e,a,t)),i=Ix(t.to,o,Px(n));return zu(e,i,t)}function Kt(e,t){const{onEnter:n,onLeave:o,getChildren:i}=t;let a=[],r=[{node:e}];const s=t.reuseIndexPath?()=>a:()=>a.slice();for(;r.length>0;){let l=r[r.length-1];if(l.state===void 0){const u=n?.(l.node,s());if(u==="stop")return;l.state=u==="skip"?-1:0}const c=l.children||i(l.node,s());if(l.children||(l.children=c),l.state!==-1){if(l.state<c.length){let u=l.state;a.push(u),r.push({node:c[u]}),l.state=u+1;continue}if(o?.(l.node,s())==="stop")return}a.pop(),r.pop()}}var af=class Ax{constructor(t){this.options=t,J(this,"rootNode"),J(this,"isEqual",n=>bt(this.rootNode,n.rootNode)),J(this,"getNodeChildren",n=>{var o,i;return((i=(o=this.options).nodeToChildren)==null?void 0:i.call(o,n))??wa.nodeToChildren(n)??[]}),J(this,"resolveIndexPath",n=>typeof n=="string"?this.getIndexPath(n):n),J(this,"resolveNode",n=>{const o=this.resolveIndexPath(n);return o?this.at(o):void 0}),J(this,"getNodeChildrenCount",n=>{var o,i;return((i=(o=this.options).nodeToChildrenCount)==null?void 0:i.call(o,n))??wa.nodeToChildrenCount(n)}),J(this,"getNodeValue",n=>{var o,i;return((i=(o=this.options).nodeToValue)==null?void 0:i.call(o,n))??wa.nodeToValue(n)}),J(this,"getNodeDisabled",n=>{var o,i;return((i=(o=this.options).isNodeDisabled)==null?void 0:i.call(o,n))??wa.isNodeDisabled(n)}),J(this,"stringify",n=>{const o=this.findNode(n);return o?this.stringifyNode(o):null}),J(this,"stringifyNode",n=>{var o,i;return((i=(o=this.options).nodeToString)==null?void 0:i.call(o,n))??wa.nodeToString(n)}),J(this,"getFirstNode",(n=this.rootNode)=>{let o;return Kt(n,{getChildren:this.getNodeChildren,onEnter:(i,a)=>{if(!o&&a.length>0&&!this.getNodeDisabled(i))return o=i,"stop"}}),o}),J(this,"getLastNode",(n=this.rootNode,o={})=>{let i;return Kt(n,{getChildren:this.getNodeChildren,onEnter:(a,r)=>{var s;if(!this.isSameNode(a,n)){if((s=o.skip)!=null&&s.call(o,{value:this.getNodeValue(a),node:a,indexPath:r}))return"skip";r.length>0&&!this.getNodeDisabled(a)&&(i=a)}}}),i}),J(this,"at",n=>Ex(this.rootNode,n,{getChildren:this.getNodeChildren})),J(this,"findNode",(n,o=this.rootNode)=>IO(o,{getChildren:this.getNodeChildren,predicate:i=>this.getNodeValue(i)===n})),J(this,"findNodes",(n,o=this.rootNode)=>{const i=new Set(n.filter(a=>a!=null));return PO(o,{getChildren:this.getNodeChildren,predicate:a=>i.has(this.getNodeValue(a))})}),J(this,"sort",n=>n.reduce((o,i)=>{const a=this.getIndexPath(i);return a&&o.push({value:i,indexPath:a}),o},[]).sort((o,i)=>Tx(o.indexPath,i.indexPath)).map(({value:o})=>o)),J(this,"getIndexPath",n=>pm(this.rootNode,{getChildren:this.getNodeChildren,predicate:o=>this.getNodeValue(o)===n})),J(this,"getValue",n=>{const o=this.at(n);return o?this.getNodeValue(o):void 0}),J(this,"getValuePath",n=>{if(!n)return[];const o=[];let i=[...n];for(;i.length>0;){const a=this.at(i);a&&o.unshift(this.getNodeValue(a)),i.pop()}return o}),J(this,"getDepth",n=>{const o=pm(this.rootNode,{getChildren:this.getNodeChildren,predicate:i=>this.getNodeValue(i)===n});return o?.length??0}),J(this,"isSameNode",(n,o)=>this.getNodeValue(n)===this.getNodeValue(o)),J(this,"isRootNode",n=>this.isSameNode(n,this.rootNode)),J(this,"contains",(n,o)=>!n||!o?!1:o.slice(0,n.length).every((i,a)=>n[a]===o[a])),J(this,"getNextNode",(n,o={})=>{let i=!1,a;return Kt(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(r,s)=>{var l;if(this.isRootNode(r))return;const c=this.getNodeValue(r);if((l=o.skip)!=null&&l.call(o,{value:c,node:r,indexPath:s}))return c===n&&(i=!0),"skip";if(i&&!this.getNodeDisabled(r))return a=r,"stop";c===n&&(i=!0)}}),a}),J(this,"getPreviousNode",(n,o={})=>{let i,a=!1;return Kt(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(r,s)=>{var l;if(this.isRootNode(r))return;const c=this.getNodeValue(r);if((l=o.skip)!=null&&l.call(o,{value:c,node:r,indexPath:s}))return"skip";if(c===n)return a=!0,"stop";this.getNodeDisabled(r)||(i=r)}}),a?i:void 0}),J(this,"getParentNodes",n=>{var o;const i=(o=this.resolveIndexPath(n))==null?void 0:o.slice();if(!i)return[];const a=[];for(;i.length>0;){i.pop();const r=this.at(i);r&&!this.isRootNode(r)&&a.unshift(r)}return a}),J(this,"getDescendantNodes",(n,o)=>{const i=this.resolveNode(n);if(!i)return[];const a=[];return Kt(i,{getChildren:this.getNodeChildren,onEnter:(r,s)=>{s.length!==0&&(!(o!=null&&o.withBranch)&&this.isBranchNode(r)||a.push(r))}}),a}),J(this,"getDescendantValues",(n,o)=>this.getDescendantNodes(n,o).map(i=>this.getNodeValue(i))),J(this,"getParentIndexPath",n=>n.slice(0,-1)),J(this,"getParentNode",n=>{const o=this.resolveIndexPath(n);return o?this.at(this.getParentIndexPath(o)):void 0}),J(this,"visit",n=>{const{skip:o,...i}=n;Kt(this.rootNode,{...i,getChildren:this.getNodeChildren,onEnter:(a,r)=>{var s;if(!this.isRootNode(a))return o!=null&&o({value:this.getNodeValue(a),node:a,indexPath:r})?"skip":(s=i.onEnter)==null?void 0:s.call(i,a,r)}})}),J(this,"getPreviousSibling",n=>{const o=this.getParentNode(n);if(!o)return;const i=this.getNodeChildren(o);let a=n[n.length-1];for(;--a>=0;){const r=i[a];if(!this.getNodeDisabled(r))return r}}),J(this,"getNextSibling",n=>{const o=this.getParentNode(n);if(!o)return;const i=this.getNodeChildren(o);let a=n[n.length-1];for(;++a<i.length;){const r=i[a];if(!this.getNodeDisabled(r))return r}}),J(this,"getSiblingNodes",n=>{const o=this.getParentNode(n);return o?this.getNodeChildren(o):[]}),J(this,"getValues",(n=this.rootNode)=>RO(n,{getChildren:this.getNodeChildren,transform:o=>[this.getNodeValue(o)]}).slice(1)),J(this,"isValidDepth",(n,o)=>o==null?!0:typeof o=="function"?o(n.length):n.length===o),J(this,"isBranchNode",n=>this.getNodeChildren(n).length>0||this.getNodeChildrenCount(n)!=null),J(this,"getBranchValues",(n=this.rootNode,o={})=>{let i=[];return Kt(n,{getChildren:this.getNodeChildren,onEnter:(a,r)=>{var s;if(r.length===0)return;const l=this.getNodeValue(a);if((s=o.skip)!=null&&s.call(o,{value:l,node:a,indexPath:r}))return"skip";this.isBranchNode(a)&&this.isValidDepth(r,o.depth)&&i.push(this.getNodeValue(a))}}),i}),J(this,"flatten",(n=this.rootNode)=>VO(n,{getChildren:this.getNodeChildren})),J(this,"_create",(n,o)=>this.getNodeChildren(n).length>0||o.length>0?{...n,children:o}:{...n}),J(this,"_insert",(n,o,i)=>this.copy(BO(n,{at:o,nodes:i,getChildren:this.getNodeChildren,create:this._create}))),J(this,"copy",n=>new Ax({...this.options,rootNode:n})),J(this,"_replace",(n,o,i)=>this.copy(zO(n,{at:o,node:i,getChildren:this.getNodeChildren,create:this._create}))),J(this,"_move",(n,o,i)=>this.copy(jO(n,{indexPaths:o,to:i,getChildren:this.getNodeChildren,create:this._create}))),J(this,"_remove",(n,o)=>this.copy(HO(n,{indexPaths:o,getChildren:this.getNodeChildren,create:this._create}))),J(this,"replace",(n,o)=>this._replace(this.rootNode,n,o)),J(this,"remove",n=>this._remove(this.rootNode,n)),J(this,"insertBefore",(n,o)=>this.getParentNode(n)?this._insert(this.rootNode,n,o):void 0),J(this,"insertAfter",(n,o)=>{if(!this.getParentNode(n))return;const i=[...n.slice(0,-1),n[n.length-1]+1];return this._insert(this.rootNode,i,o)}),J(this,"move",(n,o)=>this._move(this.rootNode,n,o)),J(this,"filter",n=>{const o=DO(this.rootNode,{predicate:n,getChildren:this.getNodeChildren,create:this._create});return this.copy(o)}),J(this,"toJSON",()=>this.getValues(this.rootNode)),this.rootNode=t.rootNode}},wa={nodeToValue(e){return typeof e=="string"?e:Ii(e)&&Yo(e,"value")?e.value:""},nodeToString(e){return typeof e=="string"?e:Ii(e)&&Yo(e,"label")?e.label:wa.nodeToValue(e)},isNodeDisabled(e){return Ii(e)&&Yo(e,"disabled")?!!e.disabled:!1},nodeToChildren(e){return e.children},nodeToChildrenCount(e){if(Ii(e)&&Yo(e,"childrenCount"))return e.childrenCount}};const WO=e=>new Ji(e),gm=e=>new af(e);var UO=Object.defineProperty,GO=(e,t,n)=>t in e?UO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rf=(e,t,n)=>GO(e,t+"",n),qO=(e,t)=>{if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0},sf=class{toHexInt(){return this.toFormat("rgba").toHexInt()}getChannelValue(t){if(t in this)return this[t];throw new Error("Unsupported color channel: "+t)}getChannelValuePercent(t,n){const o=n??this.getChannelValue(t),{minValue:i,maxValue:a}=this.getChannelRange(t);return k$(o,i,a)}getChannelPercentValue(t,n){const{minValue:o,maxValue:i,step:a}=this.getChannelRange(t),r=S$(n,o,i,a);return zg(r,o,i,a)}withChannelValue(t,n){const{minValue:o,maxValue:i}=this.getChannelRange(t);if(t in this){let a=this.clone();return a[t]=vt(n,o,i),a}throw new Error("Unsupported color channel: "+t)}getColorAxes(t){let{xChannel:n,yChannel:o}=t,i=n||this.getChannels().find(s=>s!==o),a=o||this.getChannels().find(s=>s!==i),r=this.getChannels().find(s=>s!==i&&s!==a);return{xChannel:i,yChannel:a,zChannel:r}}incrementChannel(t,n){const{minValue:o,maxValue:i,step:a}=this.getChannelRange(t),r=zg(vt(this.getChannelValue(t)+n,o,i),o,i,a);return this.withChannelValue(t,r)}decrementChannel(t,n){return this.incrementChannel(t,-n)}isEqual(t){return qO(this.toJSON(),t.toJSON())&&this.getChannelValue("alpha")===t.getChannelValue("alpha")}},YO=/^#[\da-f]+$/i,KO=/^rgba?\((.*)\)$/,XO=/[^#]/gi,Rx=class vc extends sf{constructor(t,n,o,i){super(),this.red=t,this.green=n,this.blue=o,this.alpha=i}static parse(t){let n=[];if(YO.test(t)&&[4,5,7,9].includes(t.length)){const i=(t.length<6?t.replace(XO,"$&$&"):t).slice(1).split("");for(;i.length>0;)n.push(parseInt(i.splice(0,2).join(""),16));n[3]=n[3]!==void 0?n[3]/255:void 0}const o=t.match(KO);return o!=null&&o[1]&&(n=o[1].split(",").map(i=>Number(i.trim())).map((i,a)=>vt(i,0,a<3?255:1))),n.length<3?void 0:new vc(n[0],n[1],n[2],n[3]??1)}toString(t){switch(t){case"hex":return"#"+(this.red.toString(16).padStart(2,"0")+this.green.toString(16).padStart(2,"0")+this.blue.toString(16).padStart(2,"0")).toUpperCase();case"hexa":return"#"+(this.red.toString(16).padStart(2,"0")+this.green.toString(16).padStart(2,"0")+this.blue.toString(16).padStart(2,"0")+Math.round(this.alpha*255).toString(16).padStart(2,"0")).toUpperCase();case"rgb":return`rgb(${this.red}, ${this.green}, ${this.blue})`;case"css":case"rgba":return`rgba(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`;case"hsl":return this.toHSL().toString("hsl");case"hsb":return this.toHSB().toString("hsb");default:return this.toFormat(t).toString(t)}}toFormat(t){switch(t){case"rgba":return this;case"hsba":return this.toHSB();case"hsla":return this.toHSL();default:throw new Error("Unsupported color conversion: rgb -> "+t)}}toHexInt(){return this.red<<16|this.green<<8|this.blue}toHSB(){const t=this.red/255,n=this.green/255,o=this.blue/255,i=Math.min(t,n,o),a=Math.max(t,n,o),r=a-i,s=a===0?0:r/a;let l=0;if(r!==0){switch(a){case t:l=(n-o)/r+(n<o?6:0);break;case n:l=(o-t)/r+2;break;case o:l=(t-n)/r+4;break}l/=6}return new uf(Be(l*360,2),Be(s*100,2),Be(a*100,2),Be(this.alpha,2))}toHSL(){const t=this.red/255,n=this.green/255,o=this.blue/255,i=Math.min(t,n,o),a=Math.max(t,n,o),r=(a+i)/2,s=a-i;let l=-1,c=-1;if(s===0)l=c=0;else{switch(c=s/(r<.5?a+i:2-a-i),a){case t:l=(n-o)/s+(n<o?6:0);break;case n:l=(o-t)/s+2;break;case o:l=(t-n)/s+4;break}l/=6}return new cf(Be(l*360,2),Be(c*100,2),Be(r*100,2),Be(this.alpha,2))}clone(){return new vc(this.red,this.green,this.blue,this.alpha)}getChannelFormatOptions(t){switch(t){case"red":case"green":case"blue":return{style:"decimal"};case"alpha":return{style:"percent"};default:throw new Error("Unknown color channel: "+t)}}formatChannelValue(t,n){let o=this.getChannelFormatOptions(t),i=this.getChannelValue(t);return new Intl.NumberFormat(n,o).format(i)}getChannelRange(t){switch(t){case"red":case"green":case"blue":return{minValue:0,maxValue:255,step:1,pageSize:17};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+t)}}toJSON(){return{r:this.red,g:this.green,b:this.blue,a:this.alpha}}getFormat(){return"rgba"}getChannels(){return vc.colorChannels}};rf(Rx,"colorChannels",["red","green","blue"]);var lf=Rx,ZO=/hsl\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsla\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/,Dx=class bc extends sf{constructor(t,n,o,i){super(),this.hue=t,this.saturation=n,this.lightness=o,this.alpha=i}static parse(t){let n;if(n=t.match(ZO)){const[o,i,a,r]=(n[1]??n[2]).split(",").map(s=>Number(s.trim().replace("%","")));return new bc(tx(o,360),vt(i,0,100),vt(a,0,100),vt(r??1,0,1))}}toString(t){switch(t){case"hex":return this.toRGB().toString("hex");case"hexa":return this.toRGB().toString("hexa");case"hsl":return`hsl(${this.hue}, ${Be(this.saturation,2)}%, ${Be(this.lightness,2)}%)`;case"css":case"hsla":return`hsla(${this.hue}, ${Be(this.saturation,2)}%, ${Be(this.lightness,2)}%, ${this.alpha})`;case"hsb":return this.toHSB().toString("hsb");case"rgb":return this.toRGB().toString("rgb");default:return this.toFormat(t).toString(t)}}toFormat(t){switch(t){case"hsla":return this;case"hsba":return this.toHSB();case"rgba":return this.toRGB();default:throw new Error("Unsupported color conversion: hsl -> "+t)}}toHSB(){let t=this.saturation/100,n=this.lightness/100,o=n+t*Math.min(n,1-n);return t=o===0?0:2*(1-n/o),new uf(Be(this.hue,2),Be(t*100,2),Be(o*100,2),Be(this.alpha,2))}toRGB(){let t=this.hue,n=this.saturation/100,o=this.lightness/100,i=n*Math.min(o,1-o),a=(r,s=(r+t/30)%12)=>o-i*Math.max(Math.min(s-3,9-s,1),-1);return new lf(Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255),Be(this.alpha,2))}clone(){return new bc(this.hue,this.saturation,this.lightness,this.alpha)}getChannelFormatOptions(t){switch(t){case"hue":return{style:"unit",unit:"degree",unitDisplay:"narrow"};case"saturation":case"lightness":case"alpha":return{style:"percent"};default:throw new Error("Unknown color channel: "+t)}}formatChannelValue(t,n){let o=this.getChannelFormatOptions(t),i=this.getChannelValue(t);return(t==="saturation"||t==="lightness")&&(i/=100),new Intl.NumberFormat(n,o).format(i)}getChannelRange(t){switch(t){case"hue":return{minValue:0,maxValue:360,step:1,pageSize:15};case"saturation":case"lightness":return{minValue:0,maxValue:100,step:1,pageSize:10};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+t)}}toJSON(){return{h:this.hue,s:this.saturation,l:this.lightness,a:this.alpha}}getFormat(){return"hsla"}getChannels(){return bc.colorChannels}};rf(Dx,"colorChannels",["hue","saturation","lightness"]);var cf=Dx,JO=/hsb\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsba\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/,Vx=class yc extends sf{constructor(t,n,o,i){super(),this.hue=t,this.saturation=n,this.brightness=o,this.alpha=i}static parse(t){let n;if(n=t.match(JO)){const[o,i,a,r]=(n[1]??n[2]).split(",").map(s=>Number(s.trim().replace("%","")));return new yc(tx(o,360),vt(i,0,100),vt(a,0,100),vt(r??1,0,1))}}toString(t){switch(t){case"css":return this.toHSL().toString("css");case"hex":return this.toRGB().toString("hex");case"hexa":return this.toRGB().toString("hexa");case"hsb":return`hsb(${this.hue}, ${Be(this.saturation,2)}%, ${Be(this.brightness,2)}%)`;case"hsba":return`hsba(${this.hue}, ${Be(this.saturation,2)}%, ${Be(this.brightness,2)}%, ${this.alpha})`;case"hsl":return this.toHSL().toString("hsl");case"rgb":return this.toRGB().toString("rgb");default:return this.toFormat(t).toString(t)}}toFormat(t){switch(t){case"hsba":return this;case"hsla":return this.toHSL();case"rgba":return this.toRGB();default:throw new Error("Unsupported color conversion: hsb -> "+t)}}toHSL(){let t=this.saturation/100,n=this.brightness/100,o=n*(1-t/2);return t=o===0||o===1?0:(n-o)/Math.min(o,1-o),new cf(Be(this.hue,2),Be(t*100,2),Be(o*100,2),Be(this.alpha,2))}toRGB(){let t=this.hue,n=this.saturation/100,o=this.brightness/100,i=(a,r=(a+t/60)%6)=>o-n*o*Math.max(Math.min(r,4-r,1),0);return new lf(Math.round(i(5)*255),Math.round(i(3)*255),Math.round(i(1)*255),Be(this.alpha,2))}clone(){return new yc(this.hue,this.saturation,this.brightness,this.alpha)}getChannelFormatOptions(t){switch(t){case"hue":return{style:"unit",unit:"degree",unitDisplay:"narrow"};case"saturation":case"brightness":case"alpha":return{style:"percent"};default:throw new Error("Unknown color channel: "+t)}}formatChannelValue(t,n){let o=this.getChannelFormatOptions(t),i=this.getChannelValue(t);return(t==="saturation"||t==="brightness")&&(i/=100),new Intl.NumberFormat(n,o).format(i)}getChannelRange(t){switch(t){case"hue":return{minValue:0,maxValue:360,step:1,pageSize:15};case"saturation":case"brightness":return{minValue:0,maxValue:100,step:1,pageSize:10};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+t)}}toJSON(){return{h:this.hue,s:this.saturation,b:this.brightness,a:this.alpha}}getFormat(){return"hsba"}getChannels(){return yc.colorChannels}};rf(Vx,"colorChannels",["hue","saturation","brightness"]);var uf=Vx,QO="aliceblue:f0f8ff,antiquewhite:faebd7,aqua:00ffff,aquamarine:7fffd4,azure:f0ffff,beige:f5f5dc,bisque:ffe4c4,black:000000,blanchedalmond:ffebcd,blue:0000ff,blueviolet:8a2be2,brown:a52a2a,burlywood:deb887,cadetblue:5f9ea0,chartreuse:7fff00,chocolate:d2691e,coral:ff7f50,cornflowerblue:6495ed,cornsilk:fff8dc,crimson:dc143c,cyan:00ffff,darkblue:00008b,darkcyan:008b8b,darkgoldenrod:b8860b,darkgray:a9a9a9,darkgreen:006400,darkkhaki:bdb76b,darkmagenta:8b008b,darkolivegreen:556b2f,darkorange:ff8c00,darkorchid:9932cc,darkred:8b0000,darksalmon:e9967a,darkseagreen:8fbc8f,darkslateblue:483d8b,darkslategray:2f4f4f,darkturquoise:00ced1,darkviolet:9400d3,deeppink:ff1493,deepskyblue:00bfff,dimgray:696969,dodgerblue:1e90ff,firebrick:b22222,floralwhite:fffaf0,forestgreen:228b22,fuchsia:ff00ff,gainsboro:dcdcdc,ghostwhite:f8f8ff,gold:ffd700,goldenrod:daa520,gray:808080,green:008000,greenyellow:adff2f,honeydew:f0fff0,hotpink:ff69b4,indianred:cd5c5c,indigo:4b0082,ivory:fffff0,khaki:f0e68c,lavender:e6e6fa,lavenderblush:fff0f5,lawngreen:7cfc00,lemonchiffon:fffacd,lightblue:add8e6,lightcoral:f08080,lightcyan:e0ffff,lightgoldenrodyellow:fafad2,lightgrey:d3d3d3,lightgreen:90ee90,lightpink:ffb6c1,lightsalmon:ffa07a,lightseagreen:20b2aa,lightskyblue:87cefa,lightslategray:778899,lightsteelblue:b0c4de,lightyellow:ffffe0,lime:00ff00,limegreen:32cd32,linen:faf0e6,magenta:ff00ff,maroon:800000,mediumaquamarine:66cdaa,mediumblue:0000cd,mediumorchid:ba55d3,mediumpurple:9370d8,mediumseagreen:3cb371,mediumslateblue:7b68ee,mediumspringgreen:00fa9a,mediumturquoise:48d1cc,mediumvioletred:c71585,midnightblue:191970,mintcream:f5fffa,mistyrose:ffe4e1,moccasin:ffe4b5,navajowhite:ffdead,navy:000080,oldlace:fdf5e6,olive:808000,olivedrab:6b8e23,orange:ffa500,orangered:ff4500,orchid:da70d6,palegoldenrod:eee8aa,palegreen:98fb98,paleturquoise:afeeee,palevioletred:d87093,papayawhip:ffefd5,peachpuff:ffdab9,peru:cd853f,pink:ffc0cb,plum:dda0dd,powderblue:b0e0e6,purple:800080,rebeccapurple:663399,red:ff0000,rosybrown:bc8f8f,royalblue:4169e1,saddlebrown:8b4513,salmon:fa8072,sandybrown:f4a460,seagreen:2e8b57,seashell:fff5ee,sienna:a0522d,silver:c0c0c0,skyblue:87ceeb,slateblue:6a5acd,slategray:708090,snow:fffafa,springgreen:00ff7f,steelblue:4682b4,tan:d2b48c,teal:008080,thistle:d8bfd8,tomato:ff6347,turquoise:40e0d0,violet:ee82ee,wheat:f5deb3,white:ffffff,whitesmoke:f5f5f5,yellow:ffff00,yellowgreen:9acd32",eI=e=>{const t=new Map,n=e.split(",");for(let o=0;o<n.length;o++){const[i,a]=n[o].split(":");t.set(i,`#${a}`),i.includes("gray")&&t.set(i.replace("gray","grey"),`#${a}`)}return t},mm=eI(QO),Qc=e=>{var t;if(mm.has(e))return Qc(mm.get(e));const n=lf.parse(e)||uf.parse(e)||cf.parse(e);if(!n){const o=new Error("Invalid color value: "+e);throw(t=Error.captureStackTrace)==null||t.call(Error,o,Qc),o}return n};const tI=["top","right","bottom","left"],oi=Math.min,Zt=Math.max,eu=Math.round,kl=Math.floor,eo=e=>({x:e,y:e}),nI={left:"right",right:"left",bottom:"top",top:"bottom"},oI={start:"end",end:"start"};function Oh(e,t,n){return Zt(e,oi(t,n))}function Ao(e,t){return typeof e=="function"?e(t):e}function Ro(e){return e.split("-")[0]}function or(e){return e.split("-")[1]}function df(e){return e==="x"?"y":"x"}function hf(e){return e==="y"?"height":"width"}const iI=new Set(["top","bottom"]);function Zn(e){return iI.has(Ro(e))?"y":"x"}function pf(e){return df(Zn(e))}function aI(e,t,n){n===void 0&&(n=!1);const o=or(e),i=pf(e),a=hf(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(r=tu(r)),[r,tu(r)]}function rI(e){const t=tu(e);return[Ih(e),t,Ih(t)]}function Ih(e){return e.replace(/start|end/g,t=>oI[t])}const vm=["left","right"],bm=["right","left"],sI=["top","bottom"],lI=["bottom","top"];function cI(e,t,n){switch(e){case"top":case"bottom":return n?t?bm:vm:t?vm:bm;case"left":case"right":return t?sI:lI;default:return[]}}function uI(e,t,n,o){const i=or(e);let a=cI(Ro(e),n==="start",o);return i&&(a=a.map(r=>r+"-"+i),t&&(a=a.concat(a.map(Ih)))),a}function tu(e){return e.replace(/left|right|bottom|top/g,t=>nI[t])}function dI(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mx(e){return typeof e!="number"?dI(e):{top:e,right:e,bottom:e,left:e}}function nu(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function ym(e,t,n){let{reference:o,floating:i}=e;const a=Zn(t),r=pf(t),s=hf(r),l=Ro(t),c=a==="y",u=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,h=o[s]/2-i[s]/2;let p;switch(l){case"top":p={x:u,y:o.y-i.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-i.width,y:d};break;default:p={x:o.x,y:o.y}}switch(or(t)){case"start":p[r]-=h*(n&&c?-1:1);break;case"end":p[r]+=h*(n&&c?-1:1);break}return p}const hI=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:a=[],platform:r}=n,s=a.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(t));let c=await r.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ym(c,o,l),h=o,p={},m=0;for(let f=0;f<s.length;f++){const{name:b,fn:v}=s[f],{x:y,y:x,data:_,reset:k}=await v({x:u,y:d,initialPlacement:o,placement:h,strategy:i,middlewareData:p,rects:c,platform:r,elements:{reference:e,floating:t}});u=y??u,d=x??d,p={...p,[b]:{...p[b],..._}},k&&m<=50&&(m++,typeof k=="object"&&(k.placement&&(h=k.placement),k.rects&&(c=k.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:i}):k.rects),{x:u,y:d}=ym(c,h,l)),f=-1)}return{x:u,y:d,placement:h,strategy:i,middlewareData:p}};async function Os(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:a,rects:r,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Ao(t,e),m=Mx(p),f=s[h?d==="floating"?"reference":"floating":d],b=nu(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(f)))==null||n?f:f.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v=d==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),x=await(a.isElement==null?void 0:a.isElement(y))?await(a.getScale==null?void 0:a.getScale(y))||{x:1,y:1}:{x:1,y:1},_=nu(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:l}):v);return{top:(b.top-_.top+m.top)/x.y,bottom:(_.bottom-b.bottom+m.bottom)/x.y,left:(b.left-_.left+m.left)/x.x,right:(_.right-b.right+m.right)/x.x}}const pI=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:a,platform:r,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Ao(e,t)||{};if(c==null)return{};const d=Mx(u),h={x:n,y:o},p=pf(i),m=hf(p),f=await r.getDimensions(c),b=p==="y",v=b?"top":"left",y=b?"bottom":"right",x=b?"clientHeight":"clientWidth",_=a.reference[m]+a.reference[p]-h[p]-a.floating[m],k=h[p]-a.reference[p],E=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c));let P=E?E[x]:0;(!P||!await(r.isElement==null?void 0:r.isElement(E)))&&(P=s.floating[x]||a.floating[m]);const S=_/2-k/2,R=P/2-f[m]/2-1,B=oi(d[v],R),A=oi(d[y],R),G=B,ee=P-f[m]-A,z=P/2-f[m]/2+S,W=Oh(G,z,ee),q=!l.arrow&&or(i)!=null&&z!==W&&a.reference[m]/2-(z<G?B:A)-f[m]/2<0,ne=q?z<G?z-G:z-ee:0;return{[p]:h[p]+ne,data:{[p]:W,centerOffset:z-W-ne,...q&&{alignmentOffset:ne}},reset:q}}}),fI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:a,rects:r,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:f=!0,...b}=Ao(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const v=Ro(i),y=Zn(s),x=Ro(s)===s,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),k=h||(x||!f?[tu(s)]:rI(s)),E=m!=="none";!h&&E&&k.push(...uI(s,f,m,_));const P=[s,...k],S=await Os(t,b),R=[];let B=((o=a.flip)==null?void 0:o.overflows)||[];if(u&&R.push(S[v]),d){const z=aI(i,r,_);R.push(S[z[0]],S[z[1]])}if(B=[...B,{placement:i,overflows:R}],!R.every(z=>z<=0)){var A,G;const z=(((A=a.flip)==null?void 0:A.index)||0)+1,W=P[z];if(W&&(!(d==="alignment"&&y!==Zn(W))||B.every(ne=>Zn(ne.placement)===y?ne.overflows[0]>0:!0)))return{data:{index:z,overflows:B},reset:{placement:W}};let q=(G=B.filter(ne=>ne.overflows[0]<=0).sort((ne,te)=>ne.overflows[1]-te.overflows[1])[0])==null?void 0:G.placement;if(!q)switch(p){case"bestFit":{var ee;const ne=(ee=B.filter(te=>{if(E){const le=Zn(te.placement);return le===y||le==="y"}return!0}).map(te=>[te.placement,te.overflows.filter(le=>le>0).reduce((le,he)=>le+he,0)]).sort((te,le)=>te[1]-le[1])[0])==null?void 0:ee[0];ne&&(q=ne);break}case"initialPlacement":q=s;break}if(i!==q)return{reset:{placement:q}}}return{}}}};function xm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function wm(e){return tI.some(t=>e[t]>=0)}const gI=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=Ao(e,t);switch(o){case"referenceHidden":{const a=await Os(t,{...i,elementContext:"reference"}),r=xm(a,n.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:wm(r)}}}case"escaped":{const a=await Os(t,{...i,altBoundary:!0}),r=xm(a,n.floating);return{data:{escapedOffsets:r,escaped:wm(r)}}}default:return{}}}}},Nx=new Set(["left","top"]);async function mI(e,t){const{placement:n,platform:o,elements:i}=e,a=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=Ro(n),s=or(n),l=Zn(n)==="y",c=Nx.has(r)?-1:1,u=a&&l?-1:1,d=Ao(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),l?{x:p*u,y:h*c}:{x:h*c,y:p*u}}const vI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:a,placement:r,middlewareData:s}=t,l=await mI(t,e);return r===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:r}}}}},bI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:a=!0,crossAxis:r=!1,limiter:s={fn:b=>{let{x:v,y}=b;return{x:v,y}}},...l}=Ao(e,t),c={x:n,y:o},u=await Os(t,l),d=Zn(Ro(i)),h=df(d);let p=c[h],m=c[d];if(a){const b=h==="y"?"top":"left",v=h==="y"?"bottom":"right",y=p+u[b],x=p-u[v];p=Oh(y,p,x)}if(r){const b=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=m+u[b],x=m-u[v];m=Oh(y,m,x)}const f=s.fn({...t,[h]:p,[d]:m});return{...f,data:{x:f.x-n,y:f.y-o,enabled:{[h]:a,[d]:r}}}}}},yI=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:a,middlewareData:r}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Ao(e,t),u={x:n,y:o},d=Zn(i),h=df(d);let p=u[h],m=u[d];const f=Ao(s,t),b=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(l){const x=h==="y"?"height":"width",_=a.reference[h]-a.floating[x]+b.mainAxis,k=a.reference[h]+a.reference[x]-b.mainAxis;p<_?p=_:p>k&&(p=k)}if(c){var v,y;const x=h==="y"?"width":"height",_=Nx.has(Ro(i)),k=a.reference[d]-a.floating[x]+(_&&((v=r.offset)==null?void 0:v[d])||0)+(_?0:b.crossAxis),E=a.reference[d]+a.reference[x]+(_?0:((y=r.offset)==null?void 0:y[d])||0)-(_?b.crossAxis:0);m<k?m=k:m>E&&(m=E)}return{[h]:p,[d]:m}}}},xI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:a,platform:r,elements:s}=t,{apply:l=()=>{},...c}=Ao(e,t),u=await Os(t,c),d=Ro(i),h=or(i),p=Zn(i)==="y",{width:m,height:f}=a.floating;let b,v;d==="top"||d==="bottom"?(b=d,v=h===(await(r.isRTL==null?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(v=d,b=h==="end"?"top":"bottom");const y=f-u.top-u.bottom,x=m-u.left-u.right,_=oi(f-u[b],y),k=oi(m-u[v],x),E=!t.middlewareData.shift;let P=_,S=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=x),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(P=y),E&&!h){const B=Zt(u.left,0),A=Zt(u.right,0),G=Zt(u.top,0),ee=Zt(u.bottom,0);p?S=m-2*(B!==0||A!==0?B+A:Zt(u.left,u.right)):P=f-2*(G!==0||ee!==0?G+ee:Zt(u.top,u.bottom))}await l({...t,availableWidth:S,availableHeight:P});const R=await r.getDimensions(s.floating);return m!==R.width||f!==R.height?{reset:{rects:!0}}:{}}}};function Hu(){return typeof window<"u"}function ir(e){return Lx(e)?(e.nodeName||"").toLowerCase():"#document"}function nn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ro(e){var t;return(t=(Lx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lx(e){return Hu()?e instanceof Node||e instanceof nn(e).Node:!1}function Nn(e){return Hu()?e instanceof Element||e instanceof nn(e).Element:!1}function oo(e){return Hu()?e instanceof HTMLElement||e instanceof nn(e).HTMLElement:!1}function _m(e){return!Hu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof nn(e).ShadowRoot}const wI=new Set(["inline","contents"]);function Qs(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=Ln(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!wI.has(i)}const _I=new Set(["table","td","th"]);function CI(e){return _I.has(ir(e))}const kI=[":popover-open",":modal"];function ju(e){return kI.some(t=>{try{return e.matches(t)}catch{return!1}})}const SI=["transform","translate","scale","rotate","perspective"],$I=["transform","translate","scale","rotate","perspective","filter"],EI=["paint","layout","strict","content"];function ff(e){const t=gf(),n=Nn(e)?Ln(e):e;return SI.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||$I.some(o=>(n.willChange||"").includes(o))||EI.some(o=>(n.contain||"").includes(o))}function TI(e){let t=ii(e);for(;oo(t)&&!Ha(t);){if(ff(t))return t;if(ju(t))return null;t=ii(t)}return null}function gf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const OI=new Set(["html","body","#document"]);function Ha(e){return OI.has(ir(e))}function Ln(e){return nn(e).getComputedStyle(e)}function Wu(e){return Nn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ii(e){if(ir(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_m(e)&&e.host||ro(e);return _m(t)?t.host:t}function Fx(e){const t=ii(e);return Ha(t)?e.ownerDocument?e.ownerDocument.body:e.body:oo(t)&&Qs(t)?t:Fx(t)}function Is(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Fx(e),a=i===((o=e.ownerDocument)==null?void 0:o.body),r=nn(i);if(a){const s=Ph(r);return t.concat(r,r.visualViewport||[],Qs(i)?i:[],s&&n?Is(s):[])}return t.concat(i,Is(i,[],n))}function Ph(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Bx(e){const t=Ln(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=oo(e),a=i?e.offsetWidth:n,r=i?e.offsetHeight:o,s=eu(n)!==a||eu(o)!==r;return s&&(n=a,o=r),{width:n,height:o,$:s}}function mf(e){return Nn(e)?e:e.contextElement}function Ma(e){const t=mf(e);if(!oo(t))return eo(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:a}=Bx(t);let r=(a?eu(n.width):n.width)/o,s=(a?eu(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!s||!Number.isFinite(s))&&(s=1),{x:r,y:s}}const II=eo(0);function zx(e){const t=nn(e);return!gf()||!t.visualViewport?II:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function PI(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==nn(e)?!1:t}function ji(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=mf(e);let r=eo(1);t&&(o?Nn(o)&&(r=Ma(o)):r=Ma(e));const s=PI(a,n,o)?zx(a):eo(0);let l=(i.left+s.x)/r.x,c=(i.top+s.y)/r.y,u=i.width/r.x,d=i.height/r.y;if(a){const h=nn(a),p=o&&Nn(o)?nn(o):o;let m=h,f=Ph(m);for(;f&&o&&p!==m;){const b=Ma(f),v=f.getBoundingClientRect(),y=Ln(f),x=v.left+(f.clientLeft+parseFloat(y.paddingLeft))*b.x,_=v.top+(f.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=x,c+=_,m=nn(f),f=Ph(m)}}return nu({width:u,height:d,x:l,y:c})}function Uu(e,t){const n=Wu(e).scrollLeft;return t?t.left+n:ji(ro(e)).left+n}function Hx(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Uu(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function AI(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const a=i==="fixed",r=ro(o),s=t?ju(t.floating):!1;if(o===r||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=eo(1);const u=eo(0),d=oo(o);if((d||!d&&!a)&&((ir(o)!=="body"||Qs(r))&&(l=Wu(o)),oo(o))){const p=ji(o);c=Ma(o),u.x=p.x+o.clientLeft,u.y=p.y+o.clientTop}const h=r&&!d&&!a?Hx(r,l):eo(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function RI(e){return Array.from(e.getClientRects())}function DI(e){const t=ro(e),n=Wu(e),o=e.ownerDocument.body,i=Zt(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=Zt(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+Uu(e);const s=-n.scrollTop;return Ln(o).direction==="rtl"&&(r+=Zt(t.clientWidth,o.clientWidth)-i),{width:i,height:a,x:r,y:s}}const Cm=25;function VI(e,t){const n=nn(e),o=ro(e),i=n.visualViewport;let a=o.clientWidth,r=o.clientHeight,s=0,l=0;if(i){a=i.width,r=i.height;const u=gf();(!u||u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}const c=Uu(o);if(c<=0){const u=o.ownerDocument,d=u.body,h=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(o.clientWidth-d.clientWidth-p);m<=Cm&&(a-=m)}else c<=Cm&&(a+=c);return{width:a,height:r,x:s,y:l}}const MI=new Set(["absolute","fixed"]);function NI(e,t){const n=ji(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,a=oo(e)?Ma(e):eo(1),r=e.clientWidth*a.x,s=e.clientHeight*a.y,l=i*a.x,c=o*a.y;return{width:r,height:s,x:l,y:c}}function km(e,t,n){let o;if(t==="viewport")o=VI(e,n);else if(t==="document")o=DI(ro(e));else if(Nn(t))o=NI(t,n);else{const i=zx(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return nu(o)}function jx(e,t){const n=ii(e);return n===t||!Nn(n)||Ha(n)?!1:Ln(n).position==="fixed"||jx(n,t)}function LI(e,t){const n=t.get(e);if(n)return n;let o=Is(e,[],!1).filter(s=>Nn(s)&&ir(s)!=="body"),i=null;const a=Ln(e).position==="fixed";let r=a?ii(e):e;for(;Nn(r)&&!Ha(r);){const s=Ln(r),l=ff(r);!l&&s.position==="fixed"&&(i=null),(a?!l&&!i:!l&&s.position==="static"&&i&&MI.has(i.position)||Qs(r)&&!l&&jx(e,r))?o=o.filter(c=>c!==r):i=s,r=ii(r)}return t.set(e,o),o}function FI(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const a=[...n==="clippingAncestors"?ju(t)?[]:LI(t,this._c):[].concat(n),o],r=a[0],s=a.reduce((l,c)=>{const u=km(t,c,i);return l.top=Zt(u.top,l.top),l.right=oi(u.right,l.right),l.bottom=oi(u.bottom,l.bottom),l.left=Zt(u.left,l.left),l},km(t,r,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function BI(e){const{width:t,height:n}=Bx(e);return{width:t,height:n}}function zI(e,t,n){const o=oo(t),i=ro(t),a=n==="fixed",r=ji(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=eo(0);function c(){l.x=Uu(i)}if(o||!o&&!a)if((ir(t)!=="body"||Qs(i))&&(s=Wu(t)),o){const p=ji(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else i&&c();a&&!o&&i&&c();const u=i&&!o&&!a?Hx(i,s):eo(0),d=r.left+s.scrollLeft-l.x-u.x,h=r.top+s.scrollTop-l.y-u.y;return{x:d,y:h,width:r.width,height:r.height}}function Sd(e){return Ln(e).position==="static"}function Sm(e,t){if(!oo(e)||Ln(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ro(e)===n&&(n=n.ownerDocument.body),n}function Wx(e,t){const n=nn(e);if(ju(e))return n;if(!oo(e)){let i=ii(e);for(;i&&!Ha(i);){if(Nn(i)&&!Sd(i))return i;i=ii(i)}return n}let o=Sm(e,t);for(;o&&CI(o)&&Sd(o);)o=Sm(o,t);return o&&Ha(o)&&Sd(o)&&!ff(o)?n:o||TI(e)||n}const HI=async function(e){const t=this.getOffsetParent||Wx,n=this.getDimensions,o=await n(e.floating);return{reference:zI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function jI(e){return Ln(e).direction==="rtl"}const WI={convertOffsetParentRelativeRectToViewportRelativeRect:AI,getDocumentElement:ro,getClippingRect:FI,getOffsetParent:Wx,getElementRects:HI,getClientRects:RI,getDimensions:BI,getScale:Ma,isElement:Nn,isRTL:jI};function Ux(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function UI(e,t){let n=null,o;const i=ro(e);function a(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function r(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const c=e.getBoundingClientRect(),{left:u,top:d,width:h,height:p}=c;if(s||t(),!h||!p)return;const m=kl(d),f=kl(i.clientWidth-(u+h)),b=kl(i.clientHeight-(d+p)),v=kl(u),y={rootMargin:-m+"px "+-f+"px "+-b+"px "+-v+"px",threshold:Zt(0,oi(1,l))||1};let x=!0;function _(k){const E=k[0].intersectionRatio;if(E!==l){if(!x)return r();E?r(!1,E):o=setTimeout(()=>{r(!1,1e-7)},1e3)}E===1&&!Ux(c,e.getBoundingClientRect())&&r(),x=!1}try{n=new IntersectionObserver(_,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,y)}n.observe(e)}return r(!0),a}function GI(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,c=mf(e),u=i||a?[...c?Is(c):[],...Is(t)]:[];u.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const d=c&&s?UI(c,n):null;let h=-1,p=null;r&&(p=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let m,f=l?ji(e):null;l&&b();function b(){const v=ji(e);f&&!Ux(f,v)&&n(),f=v,m=requestAnimationFrame(b)}return n(),()=>{var v;u.forEach(y=>{i&&y.removeEventListener("scroll",n),a&&y.removeEventListener("resize",n)}),d?.(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const qI=vI,YI=bI,KI=fI,XI=xI,ZI=gI,JI=pI,QI=yI,eP=(e,t,n)=>{const o=new Map,i={platform:WI,...n},a={...i.platform,_c:o};return hI(e,t,{...i,platform:a})};function $m(e=0,t=0,n=0,o=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,o);const i={x:e,y:t,width:n,height:o,top:t,right:e+n,bottom:t+o,left:e};return{...i,toJSON:()=>i}}function tP(e){if(!e)return $m();const{x:t,y:n,width:o,height:i}=e;return $m(t,n,o,i)}function nP(e,t){return{contextElement:et(e)?e:void 0,getBoundingClientRect:()=>{const n=e,o=t?.(n);return o||!n?tP(o):n.getBoundingClientRect()}}}var xr=e=>({variable:e,reference:`var(${e})`}),mo={arrowSize:xr("--arrow-size"),arrowSizeHalf:xr("--arrow-size-half"),arrowBg:xr("--arrow-background"),transformOrigin:xr("--transform-origin"),arrowOffset:xr("--arrow-offset")},oP=e=>e==="top"||e==="bottom"?"y":"x";function iP(e,t){return{name:"transformOrigin",fn(n){var o,i,a,r;const{elements:s,middlewareData:l,placement:c,rects:u,y:d}=n,h=c.split("-")[0],p=oP(h),m=((o=l.arrow)==null?void 0:o.x)||0,f=((i=l.arrow)==null?void 0:i.y)||0,b=t?.clientWidth||0,v=t?.clientHeight||0,y=m+b/2,x=f+v/2,_=Math.abs(((a=l.shift)==null?void 0:a.y)||0),k=u.reference.height/2,E=v/2,P=((r=e.offset)==null?void 0:r.mainAxis)??e.gutter,S=typeof P=="number"?P+E:P??E,R=_>S,B={top:`${y}px calc(100% + ${S}px)`,bottom:`${y}px ${-S}px`,left:`calc(100% + ${S}px) ${x}px`,right:`${-S}px ${x}px`}[h],A=`${y}px ${u.reference.y+k-d}px`,G=!!e.overlap&&p==="y"&&R;return s.floating.style.setProperty(mo.transformOrigin.variable,G?A:B),{data:{transformOrigin:G?A:B}}}}}var aP={name:"rects",fn({rects:e}){return{data:e}}},rP=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:o,y:i}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:o!=null?`${o}px`:"",top:i!=null?`${i}px`:"",[a]:`calc(100% + ${mo.arrowOffset.reference})`}),{}}}};function sP(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}function lP(e){return e.split("-")[0]}var cP={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function Em(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function vf(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function uP(e,t,n){const o=e||t.createElement("div");return JI({element:o,padding:n.arrowPadding})}function dP(e,t){if(!l$(t.offset??t.gutter))return qI(({placement:n})=>{var o,i;const a=(e?.clientHeight||0)/2,r=((o=t.offset)==null?void 0:o.mainAxis)??t.gutter,s=typeof r=="number"?r+a:r??a,{hasAlign:l}=sP(n),c=l?void 0:t.shift,u=((i=t.offset)==null?void 0:i.crossAxis)??c;return Vu({crossAxis:u,mainAxis:s,alignmentAxis:t.shift})})}function hP(e){if(!e.flip)return;const t=vf(e.boundary);return KI({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip})}function pP(e){if(!e.slide&&!e.overlap)return;const t=vf(e.boundary);return YI({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:QI()})}function fP(e){return XI({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:o,availableWidth:i}){const a=t.floating,r=Math.round(n.reference.width),s=Math.round(n.reference.height);i=Math.floor(i),o=Math.floor(o),a.style.setProperty("--reference-width",`${r}px`),a.style.setProperty("--reference-height",`${s}px`),a.style.setProperty("--available-width",`${i}px`),a.style.setProperty("--available-height",`${o}px`)}})}function gP(e){if(e.hideWhenDetached)return ZI({strategy:"referenceHidden",boundary:vf(e.boundary)??"clippingAncestors"})}function mP(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function vP(e,t,n={}){const o=nP(e,n.getAnchorRect);if(!t||!o)return;const i=Object.assign({},cP,n),a=t.querySelector("[data-part=arrow]"),r=[dP(a,i),hP(i),pP(i),uP(a,t.ownerDocument,i),rP(a),iP({gutter:i.gutter,offset:i.offset,overlap:i.overlap},a),fP(i),gP(i),aP],{placement:s,strategy:l,onComplete:c,onPositioned:u}=i,d=async()=>{var f;if(!o||!t)return;const b=await eP(o,t,{placement:s,middleware:r,strategy:l});c?.(b),u?.({placed:!0});const v=Ke(t),y=Em(v,b.x),x=Em(v,b.y);t.style.setProperty("--x",`${y}px`),t.style.setProperty("--y",`${x}px`),i.hideWhenDetached&&((f=b.middlewareData.hide)!=null&&f.referenceHidden?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const _=t.firstElementChild;if(_){const k=za(_);t.style.setProperty("--z-index",k.zIndex)}},h=async()=>{n.updatePosition?(await n.updatePosition({updatePosition:d,floatingElement:t}),u?.({placed:!0})):await d()},p=mP(i.listeners),m=i.listeners?GI(o,t,h,p):g$;return h(),()=>{m?.(),u?.({placed:!1})}}function on(e,t,n={}){const{defer:o,...i}=n,a=o?de:s=>s(),r=[];return r.push(a(()=>{const s=typeof e=="function"?e():e,l=typeof t=="function"?t():t;r.push(vP(s,l,i))})),()=>{r.forEach(s=>s?.())}}var bP={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function bf(e={}){const{placement:t,sameWidth:n,fitViewport:o,strategy:i="absolute"}=e;return{arrow:{position:"absolute",width:mo.arrowSize.reference,height:mo.arrowSize.reference,[mo.arrowSizeHalf.variable]:`calc(${mo.arrowSize.reference} / 2)`,[mo.arrowOffset.variable]:`calc(${mo.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?bP[t.split("-")[0]]:void 0,background:mo.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:i,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:o?"var(--available-width)":void 0,maxHeight:o?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var Gx=be("color-picker",["root","label","control","trigger","positioner","content","area","areaThumb","valueText","areaBackground","channelSlider","channelSliderLabel","channelSliderTrack","channelSliderThumb","channelSliderValueText","channelInput","transparencyGrid","swatchGroup","swatchTrigger","swatchIndicator","swatch","eyeDropperTrigger","formatTrigger","formatSelect"]);Gx.build();var yP=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`color-picker:${e.id}:hidden-input`},xP=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`color-picker:${e.id}:control`},wP=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`color-picker:${e.id}:trigger`},_P=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`color-picker:${e.id}:content`},CP=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`color-picker:${e.id}:positioner`},kP=e=>{var t;return((t=e.ids)==null?void 0:t.formatSelect)??`color-picker:${e.id}:format-select`},SP=e=>{var t;return((t=e.ids)==null?void 0:t.area)??`color-picker:${e.id}:area`},$P=e=>{var t;return((t=e.ids)==null?void 0:t.areaThumb)??`color-picker:${e.id}:area-thumb`},EP=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.channelSliderTrack)==null?void 0:o.call(n,t))??`color-picker:${e.id}:slider-track:${t}`},TP=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.channelSliderThumb)==null?void 0:o.call(n,t))??`color-picker:${e.id}:slider-thumb:${t}`},xc=e=>e.getById(_P(e)),OP=e=>e.getById($P(e)),IP=(e,t)=>e.getById(TP(e,t)),PP=e=>e.getById(kP(e)),Tm=e=>e.getById(yP(e)),AP=e=>e.getById(SP(e)),RP=(e,t,n)=>{const o=AP(e);if(!o)return;const{getPercentValue:i}=H0(t,o);return{x:i({dir:n,orientation:"horizontal"}),y:i({orientation:"vertical"})}},DP=e=>e.getById(xP(e)),$d=e=>e.getById(wP(e)),VP=e=>e.getById(CP(e)),MP=(e,t)=>e.getById(EP(e,t)),NP=(e,t,n,o)=>{const i=MP(e,n);if(!i)return;const{getPercentValue:a}=H0(t,i);return{x:a({dir:o,orientation:"horizontal"}),y:a({orientation:"vertical"})}},LP=e=>[...ni(xc(e),"input[data-channel]"),...ni(DP(e),"input[data-channel]")];function FP(e,t){if(t==null)return"";if(t==="hex")return e.toString("hex");if(t==="css")return e.toString("css");if(t in e)return e.getChannelValue(t).toString();const n=e.getFormat()==="hsla";switch(t){case"hue":return n?e.toFormat("hsla").getChannelValue("hue").toString():e.toFormat("hsba").getChannelValue("hue").toString();case"saturation":return n?e.toFormat("hsla").getChannelValue("saturation").toString():e.toFormat("hsba").getChannelValue("saturation").toString();case"lightness":return e.toFormat("hsla").getChannelValue("lightness").toString();case"brightness":return e.toFormat("hsba").getChannelValue("brightness").toString();case"red":case"green":case"blue":return e.toFormat("rgba").getChannelValue(t).toString();default:return e.getChannelValue(t).toString()}}var Om=e=>Qc(e),BP=/^[0-9a-fA-F]{3,8}$/;function zP(e){return BP.test(e)}function HP(e){return e.startsWith("#")?e:zP(e)?`#${e}`:e}var{and:jP}=Ct();jP("isOpenControlled","closeOnSelect");function Im(e,t,n){const o=LP(e);de(()=>{o.forEach(i=>{const a=i.dataset.channel;Rn(i,FP(n||t,a))})})}function WP(e,t){const n=PP(e);n&&de(()=>Rn(n,t))}ie()(["closeOnSelect","dir","disabled","format","defaultFormat","getRootNode","id","ids","initialFocusEl","inline","name","positioning","onFocusOutside","onFormatChange","onInteractOutside","onOpenChange","onPointerDownOutside","onValueChange","onValueChangeEnd","defaultOpen","open","positioning","required","readOnly","value","defaultValue","invalid","openAutoFocus"]);ie()(["xChannel","yChannel"]);ie()(["channel","orientation"]);ie()(["value","disabled"]);ie()(["value","respectAlpha"]);ie()(["size"]);Gx.extendWith("view");var qx=be("combobox").parts("root","clearTrigger","content","control","input","item","itemGroup","itemGroupLabel","itemIndicator","itemText","label","list","positioner","trigger");qx.build();var Yx=e=>new Ji(e);Yx.empty=()=>new Ji({items:[]});var UP=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`combobox:${e.id}:control`},GP=e=>{var t;return((t=e.ids)==null?void 0:t.input)??`combobox:${e.id}:input`},qP=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`combobox:${e.id}:content`},YP=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`combobox:${e.id}:popper`},KP=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`combobox:${e.id}:toggle-btn`},XP=e=>{var t;return((t=e.ids)==null?void 0:t.clearTrigger)??`combobox:${e.id}:clear-btn`},jo=e=>e.getById(qP(e)),_a=e=>e.getById(GP(e)),Pm=e=>e.getById(YP(e)),Am=e=>e.getById(UP(e)),es=e=>e.getById(KP(e)),Rm=e=>e.getById(XP(e)),wr=(e,t)=>{if(t==null)return null;const n=`[role=option][data-value="${CSS.escape(t)}"]`;return G0(jo(e),n)},Dm=e=>{const t=_a(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})},ZP=e=>{const t=es(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})},{guards:JP,createMachine:QP,choose:eA}=Mu(),{and:ut,not:qt}=JP;QP({props({props:e}){return{loopFocus:!0,openOnClick:!1,defaultValue:[],defaultInputValue:"",closeOnSelect:!e.multiple,allowCustomValue:!1,alwaysSubmitOnEnter:!1,inputBehavior:"none",selectionBehavior:e.multiple?"clear":"replace",openOnKeyPress:!0,openOnChange:!0,composite:!0,navigate({node:t}){B0(t)},collection:Yx.empty(),...e,positioning:{placement:"bottom",sameWidth:!0,...e.positioning},translations:{triggerLabel:"Toggle suggestions",clearTriggerLabel:"Clear value",...e.translations}}},initialState({prop:e}){return e("open")||e("defaultOpen")?"suggesting":"idle"},context({prop:e,bindable:t,getContext:n,getEvent:o}){return{currentPlacement:t(()=>({defaultValue:void 0})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:bt,hash(i){return i.join(",")},onChange(i){var a;const r=n(),s=r.get("selectedItems"),l=e("collection"),c=i.map(u=>s.find(d=>l.getItemValue(d)===u)||l.find(u));r.set("selectedItems",c),(a=e("onValueChange"))==null||a({value:i,items:c})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(i){var a;const r=e("collection").find(i);(a=e("onHighlightChange"))==null||a({highlightedValue:i,highlightedItem:r})}})),inputValue:t(()=>{let i=e("inputValue")||e("defaultInputValue");const a=e("value")||e("defaultValue");if(!i.trim()&&!e("multiple")){const r=e("collection").stringifyMany(a);i=Bt(e("selectionBehavior"),{preserve:i||r,replace:r,clear:""})}return{defaultValue:i,value:e("inputValue"),onChange(r){var s;const l=o(),c=(l.previousEvent||l).src;(s=e("onInputValueChange"))==null||s({inputValue:r,reason:c})}}}),highlightedItem:t(()=>{const i=e("highlightedValue");return{defaultValue:e("collection").find(i)}}),selectedItems:t(()=>{const i=e("value")||e("defaultValue")||[];return{defaultValue:e("collection").findMany(i)}})}},computed:{isInputValueEmpty:({context:e})=>e.get("inputValue").length===0,isInteractive:({prop:e})=>!(e("readOnly")||e("disabled")),autoComplete:({prop:e})=>e("inputBehavior")==="autocomplete",autoHighlight:({prop:e})=>e("inputBehavior")==="autohighlight",hasSelectedItems:({context:e})=>e.get("value").length>0,valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems")),isCustomValue:({context:e,computed:t})=>e.get("inputValue")!==t("valueAsString")},watch({context:e,prop:t,track:n,action:o,send:i}){n([()=>e.hash("value")],()=>{o(["syncSelectedItems"])}),n([()=>e.get("inputValue")],()=>{o(["syncInputValue"])}),n([()=>e.get("highlightedValue")],()=>{o(["syncHighlightedItem","autofillInputValue"])}),n([()=>t("open")],()=>{o(["toggleVisibility"])}),n([()=>t("collection").toString()],()=>{i({type:"CHILDREN_CHANGE"})})},on:{"SELECTED_ITEMS.SYNC":{actions:["syncSelectedItems"]},"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedValue"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedValue"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setValue"]},"INPUT_VALUE.SET":{actions:["setInputValue"]},"POSITIONING.SET":{actions:["reposition"]}},entry:eA([{guard:"autoFocus",actions:["setInitialFocus"]}]),states:{idle:{tags:["idle","closed"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":{target:"interacting"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{target:"focused",actions:["clearInputValue","clearSelectedItems","setInitialFocus"]}}},focused:{tags:["focused","closed"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":[{guard:"isChangeEvent",target:"suggesting"},{target:"interacting"}],"INPUT.CHANGE":[{guard:ut("isOpenControlled","openOnChange"),actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{guard:"openOnChange",target:"suggesting",actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{actions:["setInputValue"]}],"LAYER.INTERACT_OUTSIDE":{target:"idle"},"INPUT.ESCAPE":{guard:ut("isCustomValue",qt("allowCustomValue")),actions:["revertInputValue"]},"INPUT.BLUR":{target:"idle"},"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_DOWN":[{guard:ut("isOpenControlled","autoComplete"),actions:["invokeOnOpen"]},{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{guard:"isOpenControlled",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_UP":[{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{target:"interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{actions:["clearInputValue","clearSelectedItems"]}}},interacting:{tags:["open","focused"],entry:["setInitialFocus"],effects:["scrollToHighlightedItem","trackDismissableLayer","trackPlacement","hideOtherElements"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["setFinalFocus"]},{target:"idle"}],CHILDREN_CHANGE:[{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{actions:["scrollToHighlightedItem"]}],"INPUT.HOME":{actions:["highlightFirstItem"]},"INPUT.END":{actions:["highlightLastItem"]},"INPUT.ARROW_DOWN":[{guard:ut("autoComplete","isLastItemHighlighted"),actions:["clearHighlightedValue","scrollContentToTop"]},{actions:["highlightNextItem"]}],"INPUT.ARROW_UP":[{guard:ut("autoComplete","isFirstItemHighlighted"),actions:["clearHighlightedValue"]},{actions:["highlightPrevItem"]}],"INPUT.ENTER":[{guard:ut("isOpenControlled","isCustomValue",qt("hasHighlightedItem"),qt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:ut("isCustomValue",qt("hasHighlightedItem"),qt("allowCustomValue")),target:"focused",actions:["revertInputValue","invokeOnClose"]},{guard:ut("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"INPUT.CHANGE":[{guard:"autoComplete",target:"suggesting",actions:["setInputValue"]},{target:"suggesting",actions:["clearHighlightedValue","setInputValue"]}],"ITEM.POINTER_MOVE":{actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"ITEM.CLICK":[{guard:ut("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],"LAYER.ESCAPE":[{guard:ut("isOpenControlled","autoComplete"),actions:["syncInputValue","invokeOnClose"]},{guard:"autoComplete",target:"focused",actions:["syncInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"LAYER.INTERACT_OUTSIDE":[{guard:ut("isOpenControlled","isCustomValue",qt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:ut("isCustomValue",qt("allowCustomValue")),target:"idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]}},suggesting:{tags:["open","focused"],effects:["trackDismissableLayer","scrollToHighlightedItem","trackPlacement","hideOtherElements"],entry:["setInitialFocus"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["setFinalFocus"]},{target:"idle"}],CHILDREN_CHANGE:[{guard:"autoHighlight",actions:["highlightFirstItem"]},{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]}],"INPUT.ARROW_DOWN":{target:"interacting",actions:["highlightNextItem"]},"INPUT.ARROW_UP":{target:"interacting",actions:["highlightPrevItem"]},"INPUT.HOME":{target:"interacting",actions:["highlightFirstItem"]},"INPUT.END":{target:"interacting",actions:["highlightLastItem"]},"INPUT.ENTER":[{guard:ut("isOpenControlled","isCustomValue",qt("hasHighlightedItem"),qt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:ut("isCustomValue",qt("hasHighlightedItem"),qt("allowCustomValue")),target:"focused",actions:["revertInputValue","invokeOnClose"]},{guard:ut("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"INPUT.CHANGE":{actions:["setInputValue"]},"LAYER.ESCAPE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"ITEM.POINTER_MOVE":{target:"interacting",actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"LAYER.INTERACT_OUTSIDE":[{guard:ut("isOpenControlled","isCustomValue",qt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:ut("isCustomValue",qt("allowCustomValue")),target:"idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"ITEM.CLICK":[{guard:ut("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]}}},implementations:{guards:{isInputValueEmpty:({computed:e})=>e("isInputValueEmpty"),autoComplete:({computed:e,prop:t})=>e("autoComplete")&&!t("multiple"),autoHighlight:({computed:e})=>e("autoHighlight"),isFirstItemHighlighted:({prop:e,context:t})=>e("collection").firstValue===t.get("highlightedValue"),isLastItemHighlighted:({prop:e,context:t})=>e("collection").lastValue===t.get("highlightedValue"),isCustomValue:({computed:e})=>e("isCustomValue"),allowCustomValue:({prop:e})=>!!e("allowCustomValue"),hasHighlightedItem:({context:e})=>e.get("highlightedValue")!=null,closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>e("open")!=null,openOnChange:({prop:e,context:t})=>{const n=e("openOnChange");return s$(n)?n:!!(n!=null&&n({inputValue:t.get("inputValue")}))},restoreFocus:({event:e})=>e.restoreFocus==null?!0:!!e.restoreFocus,isChangeEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="INPUT.CHANGE"},autoFocus:({prop:e})=>!!e("autoFocus"),isHighlightedItemRemoved:({prop:e,context:t})=>!e("collection").has(t.get("highlightedValue"))},effects:{trackDismissableLayer({send:e,prop:t,scope:n}){return t("disableLayer")?void 0:nr(()=>jo(n),{type:"listbox",defer:!0,exclude:()=>[_a(n),es(n),Rm(n)],onFocusOutside:t("onFocusOutside"),onPointerDownOutside:t("onPointerDownOutside"),onInteractOutside:t("onInteractOutside"),onEscapeKeyDown(o){o.preventDefault(),o.stopPropagation(),e({type:"LAYER.ESCAPE",src:"escape-key"})},onDismiss(){e({type:"LAYER.INTERACT_OUTSIDE",src:"interact-outside",restoreFocus:!1})}})},hideOtherElements({scope:e}){return IT([_a(e),jo(e),es(e),Rm(e)])},trackPlacement({context:e,prop:t,scope:n}){const o=()=>Am(n)||es(n),i=()=>Pm(n);return e.set("currentPlacement",t("positioning").placement),on(o,i,{...t("positioning"),defer:!0,onComplete(a){e.set("currentPlacement",a.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n,event:o}){const i=_a(n);let a=[];const r=c=>{const u=o.current().type.includes("POINTER"),d=e.get("highlightedValue");if(u||!d)return;const h=jo(n),p=t("scrollToIndexFn");if(p){const b=t("collection").indexOf(d);p({index:b,immediate:c,getElement:()=>wr(n,d)});return}const m=wr(n,d),f=de(()=>{$s(m,{rootEl:h,block:"nearest"})});a.push(f)},s=de(()=>r(!0));a.push(s);const l=Ws(i,{attributes:["aria-activedescendant"],callback:()=>r(!1)});return a.push(l),()=>{a.forEach(c=>c())}}},actions:{reposition({context:e,prop:t,scope:n,event:o}){on(()=>Am(n),()=>Pm(n),{...t("positioning"),...o.options,defer:!0,listeners:!1,onComplete(i){e.set("currentPlacement",i.placement)}})},setHighlightedValue({context:e,event:t}){t.value!=null&&e.set("highlightedValue",t.value)},clearHighlightedValue({context:e}){e.set("highlightedValue",null)},selectHighlightedItem(e){var t;const{context:n,prop:o}=e,i=o("collection"),a=n.get("highlightedValue");if(!a||!i.has(a))return;const r=o("multiple")?zi(n.get("value"),a):[a];(t=o("onSelect"))==null||t({value:r,itemValue:a}),n.set("value",r);const s=Bt(o("selectionBehavior"),{preserve:n.get("inputValue"),replace:i.stringifyMany(r),clear:""});n.set("inputValue",s)},scrollToHighlightedItem({context:e,prop:t,scope:n}){Pu(()=>{const o=e.get("highlightedValue");if(o==null)return;const i=wr(n,o),a=jo(n),r=t("scrollToIndexFn");if(r){const s=t("collection").indexOf(o);r({index:s,immediate:!0,getElement:()=>wr(n,o)});return}$s(i,{rootEl:a,block:"nearest"})})},selectItem(e){const{context:t,event:n,flush:o,prop:i}=e;n.value!=null&&o(()=>{var a;const r=i("multiple")?zi(t.get("value"),n.value):[n.value];(a=i("onSelect"))==null||a({value:r,itemValue:n.value}),t.set("value",r);const s=Bt(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany(r),clear:""});t.set("inputValue",s)})},clearItem(e){const{context:t,event:n,flush:o,prop:i}=e;n.value!=null&&o(()=>{const a=Ni(t.get("value"),n.value);t.set("value",a);const r=Bt(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany(a),clear:""});t.set("inputValue",r)})},setInitialFocus({scope:e}){de(()=>{Dm(e)})},setFinalFocus({scope:e}){de(()=>{const t=es(e);t?.dataset.focusable==null?Dm(e):ZP(e)})},syncInputValue({context:e,scope:t,event:n}){const o=_a(t);o&&(o.value=e.get("inputValue"),queueMicrotask(()=>{n.current().type!=="INPUT.CHANGE"&&zk(o)}))},setInputValue({context:e,event:t}){e.set("inputValue",t.value)},clearInputValue({context:e}){e.set("inputValue","")},revertInputValue({context:e,prop:t,computed:n}){const o=t("selectionBehavior"),i=Bt(o,{replace:n("hasSelectedItems")?n("valueAsString"):"",preserve:e.get("inputValue"),clear:""});e.set("inputValue",i)},setValue(e){const{context:t,flush:n,event:o,prop:i}=e;n(()=>{t.set("value",o.value);const a=Bt(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany(o.value),clear:""});t.set("inputValue",a)})},clearSelectedItems(e){const{context:t,flush:n,prop:o}=e;n(()=>{t.set("value",[]);const i=Bt(o("selectionBehavior"),{preserve:t.get("inputValue"),replace:o("collection").stringifyMany([]),clear:""});t.set("inputValue",i)})},scrollContentToTop({prop:e,scope:t}){const n=e("scrollToIndexFn");if(n){const o=e("collection").firstValue;n({index:0,immediate:!0,getElement:()=>wr(t,o)})}else{const o=jo(t);if(!o)return;o.scrollTop=0}},invokeOnOpen({prop:e,event:t}){var n;const o=Vm(t);(n=e("onOpenChange"))==null||n({open:!0,reason:o})},invokeOnClose({prop:e,event:t}){var n;const o=Vm(t);(n=e("onOpenChange"))==null||n({open:!1,reason:o})},highlightFirstItem({context:e,prop:t,scope:n}){(jo(n)?queueMicrotask:de)(()=>{const o=t("collection").firstValue;o&&e.set("highlightedValue",o)})},highlightFirstItemIfNeeded({computed:e,action:t}){e("autoHighlight")&&t(["highlightFirstItem"])},highlightLastItem({context:e,prop:t,scope:n}){(jo(n)?queueMicrotask:de)(()=>{const o=t("collection").lastValue;o&&e.set("highlightedValue",o)})},highlightNextItem({context:e,prop:t}){let n=null;const o=e.get("highlightedValue"),i=t("collection");o?(n=i.getNextValue(o),!n&&t("loopFocus")&&(n=i.firstValue)):n=i.firstValue,n&&e.set("highlightedValue",n)},highlightPrevItem({context:e,prop:t}){let n=null;const o=e.get("highlightedValue"),i=t("collection");o?(n=i.getPreviousValue(o),!n&&t("loopFocus")&&(n=i.lastValue)):n=i.lastValue,n&&e.set("highlightedValue",n)},highlightFirstSelectedItem({context:e,prop:t}){de(()=>{const[n]=t("collection").sort(e.get("value"));n&&e.set("highlightedValue",n)})},highlightFirstOrSelectedItem({context:e,prop:t,computed:n}){de(()=>{let o=null;n("hasSelectedItems")?o=t("collection").sort(e.get("value"))[0]:o=t("collection").firstValue,o&&e.set("highlightedValue",o)})},highlightLastOrSelectedItem({context:e,prop:t,computed:n}){de(()=>{const o=t("collection");let i=null;n("hasSelectedItems")?i=o.sort(e.get("value"))[0]:i=o.lastValue,i&&e.set("highlightedValue",i)})},autofillInputValue({context:e,computed:t,prop:n,event:o,scope:i}){const a=_a(i),r=n("collection");if(!t("autoComplete")||!a||!o.keypress)return;const s=r.stringify(e.get("highlightedValue"));de(()=>{a.value=s||e.get("inputValue")})},syncSelectedItems(e){queueMicrotask(()=>{const{context:t,prop:n}=e,o=n("collection"),i=t.get("value"),a=i.map(s=>t.get("selectedItems").find(l=>o.getItemValue(l)===s)||o.find(s));t.set("selectedItems",a);const r=Bt(n("selectionBehavior"),{preserve:t.get("inputValue"),replace:o.stringifyMany(i),clear:""});t.set("inputValue",r)})},syncHighlightedItem({context:e,prop:t}){const n=t("collection").find(e.get("highlightedValue"));e.set("highlightedItem",n)},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}});function Vm(e){return(e.previousEvent||e).src}ie()(["allowCustomValue","autoFocus","closeOnSelect","collection","composite","defaultHighlightedValue","defaultInputValue","defaultOpen","defaultValue","dir","disabled","disableLayer","form","getRootNode","highlightedValue","id","ids","inputBehavior","inputValue","invalid","loopFocus","multiple","name","navigate","onFocusOutside","onHighlightChange","onInputValueChange","onInteractOutside","onOpenChange","onOpenChange","onPointerDownOutside","onSelect","onValueChange","open","openOnChange","openOnClick","openOnKeyPress","placeholder","positioning","readOnly","required","scrollToIndexFn","selectionBehavior","translations","value","alwaysSubmitOnEnter"]);ie()(["htmlFor"]);ie()(["id"]);ie()(["item","persistFocus"]);qx.extendWith("empty");function Ed(e,t){return e-t*Math.floor(e/t)}const Kx=1721426;function Sl(e,t,n,o){t=yf(e,t);let i=t-1,a=-2;return n<=2?a=0:wc(t)&&(a=-1),Kx-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+o)}function wc(e){return e%4===0&&(e%100!==0||e%400===0)}function yf(e,t){return e==="BC"?1-t:t}function tA(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const nA={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};let ja=class{fromJulianDay(t){let n=t,o=n-Kx,i=Math.floor(o/146097),a=Ed(o,146097),r=Math.floor(a/36524),s=Ed(a,36524),l=Math.floor(s/1461),c=Ed(s,1461),u=Math.floor(c/365),d=i*400+r*100+l*4+u+(r!==4&&u!==4?1:0),[h,p]=tA(d),m=n-Sl(h,p,1,1),f=2;n<Sl(h,p,3,1)?f=0:wc(p)&&(f=1);let b=Math.floor(((m+f)*12+373)/367),v=n-Sl(h,p,b,1)+1;return new iu(h,p,b,v)}toJulianDay(t){return Sl(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return nA[wc(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return wc(t.year)?366:365}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}};const oA={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function Qi(e,t){return t=Qt(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function iA(e,t){return t=Qt(t,e.calendar),e=_o(e),t=_o(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function aA(e,t){return t=Qt(t,e.calendar),e=Ps(e),t=Ps(t),e.era===t.era&&e.year===t.year}function rA(e,t){return Gu(e.calendar,t.calendar)&&Qi(e,t)}function sA(e,t){return Gu(e.calendar,t.calendar)&&iA(e,t)}function lA(e,t){return Gu(e.calendar,t.calendar)&&aA(e,t)}function Gu(e,t){var n,o,i,a;return(a=(i=(n=e.isEqual)===null||n===void 0?void 0:n.call(e,t))!==null&&i!==void 0?i:(o=t.isEqual)===null||o===void 0?void 0:o.call(t,e))!==null&&a!==void 0?a:e.identifier===t.identifier}function cA(e,t){return Qi(e,qu(t))}const uA={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Xx(e,t,n){let o=e.calendar.toJulianDay(e),i=n?uA[n]:pA(t),a=Math.ceil(o+1-i)%7;return a<0&&(a+=7),a}function Zx(e){return Co(Date.now(),e)}function qu(e){return Li(Zx(e))}function Jx(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function dA(e,t){return Mm(e)-Mm(t)}function Mm(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let Td=null;function xf(){return Td==null&&(Td=new Intl.DateTimeFormat().resolvedOptions().timeZone),Td}function _o(e){return e.subtract({days:e.day-1})}function Ah(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function Ps(e){return _o(e.subtract({months:e.month-1}))}function hA(e){return Ah(e.add({months:e.calendar.getMonthsInYear(e)-e.month}))}function As(e,t,n){let o=Xx(e,t,n);return e.subtract({days:o})}function Nm(e,t,n){return As(e,t,n).add({days:6})}const Lm=new Map,Od=new Map;function Qx(e){if(Intl.Locale){let n=Lm.get(e);return n||(n=new Intl.Locale(e).maximize().region,n&&Lm.set(e,n)),n}let t=e.split("-")[1];return t==="u"?void 0:t}function pA(e){let t=Od.get(e);if(!t){if(Intl.Locale){let o=new Intl.Locale(e);if("getWeekInfo"in o&&(t=o.getWeekInfo(),t))return Od.set(e,t),t.firstDay}let n=Qx(e);if(e.includes("-fw-")){let o=e.split("-fw-")[1].split("-")[0];o==="mon"?t={firstDay:1}:o==="tue"?t={firstDay:2}:o==="wed"?t={firstDay:3}:o==="thu"?t={firstDay:4}:o==="fri"?t={firstDay:5}:o==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:n&&oA[n]||0};Od.set(e,t)}return t.firstDay}function fA(e,t,n){let o=e.calendar.getDaysInMonth(e);return Math.ceil((Xx(_o(e),t,n)+o)/7)}function ew(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function tw(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}const gA={AF:[4,5],AE:[5,6],BH:[5,6],DZ:[5,6],EG:[5,6],IL:[5,6],IQ:[5,6],IR:[5,5],JO:[5,6],KW:[5,6],LY:[5,6],OM:[5,6],QA:[5,6],SA:[5,6],SD:[5,6],SY:[5,6],YE:[5,6]};function mA(e,t){let n=e.calendar.toJulianDay(e),o=Math.ceil(n+1)%7;o<0&&(o+=7);let i=Qx(t),[a,r]=gA[i]||[6,0];return o===a||o===r}function Wa(e){e=Qt(e,new ja);let t=yf(e.era,e.year);return nw(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function nw(e,t,n,o,i,a,r){let s=new Date;return s.setUTCHours(o,i,a,r),s.setUTCFullYear(e,t-1,n),s.getTime()}function Rh(e,t){if(t==="UTC")return 0;if(e>0&&t===xf())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:o,day:i,hour:a,minute:r,second:s}=ow(e,t);return nw(n,o,i,a,r,s,0)-Math.floor(e/1e3)*1e3}const Fm=new Map;function ow(e,t){let n=Fm.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Fm.set(t,n));let o=n.formatToParts(new Date(e)),i={};for(let a of o)a.type!=="literal"&&(i[a.type]=a.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}const Bm=864e5;function vA(e,t,n,o){return(n===o?[n]:[n,o]).filter(i=>bA(e,t,i))}function bA(e,t,n){let o=ow(n,t);return e.year===o.year&&e.month===o.month&&e.day===o.day&&e.hour===o.hour&&e.minute===o.minute&&e.second===o.second}function yo(e,t,n="compatible"){let o=Wi(e);if(t==="UTC")return Wa(o);if(t===xf()&&n==="compatible"){o=Qt(o,new ja);let l=new Date,c=yf(o.era,o.year);return l.setFullYear(c,o.month-1,o.day),l.setHours(o.hour,o.minute,o.second,o.millisecond),l.getTime()}let i=Wa(o),a=Rh(i-Bm,t),r=Rh(i+Bm,t),s=vA(o,t,i-a,i-r);if(s.length===1)return s[0];if(s.length>1)switch(n){case"compatible":case"earlier":return s[0];case"later":return s[s.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(i-a,i-r);case"compatible":case"later":return Math.max(i-a,i-r);case"reject":throw new RangeError("No such absolute time found")}}function iw(e,t,n="compatible"){return new Date(yo(e,t,n))}function Co(e,t){let n=Rh(e,t),o=new Date(e+n),i=o.getUTCFullYear(),a=o.getUTCMonth()+1,r=o.getUTCDate(),s=o.getUTCHours(),l=o.getUTCMinutes(),c=o.getUTCSeconds(),u=o.getUTCMilliseconds();return new hw(i<1?"BC":"AD",i<1?-i+1:i,a,r,t,n,s,l,c,u)}function Li(e){return new iu(e.calendar,e.era,e.year,e.month,e.day)}function Wi(e,t){let n=0,o=0,i=0,a=0;if("timeZone"in e)({hour:n,minute:o,second:i,millisecond:a}=e);else if("hour"in e)return e;return new VA(e.calendar,e.era,e.year,e.month,e.day,n,o,i,a)}function Qt(e,t){if(Gu(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),o=e.copy();return o.calendar=t,o.era=n.era,o.year=n.year,o.month=n.month,o.day=n.day,Ui(o),o}function yA(e,t,n){if(e instanceof hw)return e.timeZone===t?e:wA(e,t);let o=yo(e,t,n);return Co(o,t)}function xA(e){let t=Wa(e)-e.offset;return new Date(t)}function wA(e,t){let n=Wa(e)-e.offset;return Qt(Co(n,t),e.calendar)}const _r=36e5;function Yu(e,t){let n=e.copy(),o="hour"in n?SA(n,t):0;Dh(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,Vh(n),aw(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=o,_A(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){var a,r;let l=(a=(r=n.calendar).isInverseEra)===null||a===void 0?void 0:a.call(r,n);n.year=i,n.month=l?1:n.calendar.getMonthsInYear(n),n.day=l?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let s=n.calendar.getMonthsInYear(n);return n.month>s&&(n.month=s,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function Dh(e,t){var n,o;!((n=(o=e.calendar).isInverseEra)===null||n===void 0)&&n.call(o,e)&&(t=-t),e.year+=t}function Vh(e){for(;e.month<1;)Dh(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Dh(e,1)}function _A(e){for(;e.day<1;)e.month--,Vh(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,Vh(e)}function aw(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Ui(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),aw(e)}function rw(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function sw(e,t){return Yu(e,rw(t))}function wf(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),Ui(n),n}function ou(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),kA(n),n}function CA(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=$l(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=$l(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=$l(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=$l(e.hour,24),t}function kA(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function $l(e,t){let n=e%t;return n<0&&(n+=t),n}function SA(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,CA(e)}function _f(e,t,n,o){let i=e.copy();switch(t){case"era":{let s=e.calendar.getEras(),l=s.indexOf(e.era);if(l<0)throw new Error("Invalid era: "+e.era);l=ko(l,n,0,s.length-1,o?.round),i.era=s[l],Ui(i);break}case"year":var a,r;!((a=(r=i.calendar).isInverseEra)===null||a===void 0)&&a.call(r,i)&&(n=-n),i.year=ko(e.year,n,-1/0,9999,o?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=ko(e.month,n,1,e.calendar.getMonthsInYear(e),o?.round);break;case"day":i.day=ko(e.day,n,1,e.calendar.getDaysInMonth(e),o?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),Ui(i),i}function lw(e,t,n,o){let i=e.copy();switch(t){case"hour":{let a=e.hour,r=0,s=23;if(o?.hourCycle===12){let l=a>=12;r=l?12:0,s=l?23:11}i.hour=ko(a,n,r,s,o?.round);break}case"minute":i.minute=ko(e.minute,n,0,59,o?.round);break;case"second":i.second=ko(e.second,n,0,59,o?.round);break;case"millisecond":i.millisecond=ko(e.millisecond,n,0,999,o?.round);break;default:throw new Error("Unsupported field "+t)}return i}function ko(e,t,n,o,i=!1){if(i){e+=Math.sign(t),e<n&&(e=o);let a=Math.abs(t);t>0?e=Math.ceil(e/a)*a:e=Math.floor(e/a)*a,e>o&&(e=n)}else e+=t,e<n?e=o-(n-e-1):e>o&&(e=n+(e-o-1));return e}function cw(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let i=Yu(Wi(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=yo(i,e.timeZone)}else n=Wa(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let o=Co(n,e.timeZone);return Qt(o,e.calendar)}function $A(e,t){return cw(e,rw(t))}function EA(e,t,n,o){switch(t){case"hour":{let i=0,a=23;if(o?.hourCycle===12){let m=e.hour>=12;i=m?12:0,a=m?23:11}let r=Wi(e),s=Qt(ou(r,{hour:i}),new ja),l=[yo(s,e.timeZone,"earlier"),yo(s,e.timeZone,"later")].filter(m=>Co(m,e.timeZone).day===s.day)[0],c=Qt(ou(r,{hour:a}),new ja),u=[yo(c,e.timeZone,"earlier"),yo(c,e.timeZone,"later")].filter(m=>Co(m,e.timeZone).day===c.day).pop(),d=Wa(e)-e.offset,h=Math.floor(d/_r),p=d%_r;return d=ko(h,n,Math.floor(l/_r),Math.floor(u/_r),o?.round)*_r+p,Qt(Co(d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return lw(e,t,n,o);case"era":case"year":case"month":case"day":{let i=_f(Wi(e),t,n,o),a=yo(i,e.timeZone);return Qt(Co(a,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function TA(e,t,n){let o=Wi(e),i=ou(wf(o,t),t);if(i.compare(o)===0)return e;let a=yo(i,e.timeZone,n);return Qt(Co(a,e.timeZone),e.calendar)}function OA(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function uw(e){let t=Qt(e,new ja),n;return t.era==="BC"?n=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):n=String(t.year).padStart(4,"0"),`${n}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function dw(e){return`${uw(e)}T${OA(e)}`}function IA(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let n=Math.floor(e/36e5),o=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),a=`${t}${String(n).padStart(2,"0")}:${String(o).padStart(2,"0")}`;return i!==0&&(a+=`:${String(i).padStart(2,"0")}`),a}function PA(e){return`${dw(e)}${IA(e.offset)}[${e.timeZone}]`}function AA(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Cf(e,t,n){AA(e,t),t.set(e,n)}function kf(e){let t=typeof e[0]=="object"?e.shift():new ja,n;if(typeof e[0]=="string")n=e.shift();else{let r=t.getEras();n=r[r.length-1]}let o=e.shift(),i=e.shift(),a=e.shift();return[t,n,o,i,a]}var RA=new WeakMap;let iu=class Mh{copy(){return this.era?new Mh(this.calendar,this.era,this.year,this.month,this.day):new Mh(this.calendar,this.year,this.month,this.day)}add(t){return Yu(this,t)}subtract(t){return sw(this,t)}set(t){return wf(this,t)}cycle(t,n,o){return _f(this,t,n,o)}toDate(t){return iw(this,t)}toString(){return uw(this)}compare(t){return Jx(this,t)}constructor(...t){Cf(this,RA,{writable:!0,value:void 0});let[n,o,i,a,r]=kf(t);this.calendar=n,this.era=o,this.year=i,this.month=a,this.day=r,Ui(this)}};var DA=new WeakMap;let VA=class Nh{copy(){return this.era?new Nh(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Nh(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return Yu(this,t)}subtract(t){return sw(this,t)}set(t){return wf(ou(this,t),t)}cycle(t,n,o){switch(t){case"era":case"year":case"month":case"day":return _f(this,t,n,o);default:return lw(this,t,n,o)}}toDate(t,n){return iw(this,t,n)}toString(){return dw(this)}compare(t){let n=Jx(this,t);return n===0?dA(this,Wi(t)):n}constructor(...t){Cf(this,DA,{writable:!0,value:void 0});let[n,o,i,a,r]=kf(t);this.calendar=n,this.era=o,this.year=i,this.month=a,this.day=r,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Ui(this)}};var MA=new WeakMap;let hw=class Lh{copy(){return this.era?new Lh(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new Lh(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return cw(this,t)}subtract(t){return $A(this,t)}set(t,n){return TA(this,t,n)}cycle(t,n,o){return EA(this,t,n,o)}toDate(){return xA(this)}toString(){return PA(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-yA(t,this.timeZone).toDate().getTime()}constructor(...t){Cf(this,MA,{writable:!0,value:void 0});let[n,o,i,a,r]=kf(t),s=t.shift(),l=t.shift();this.calendar=n,this.era=o,this.year=i,this.month=a,this.day=r,this.timeZone=s,this.offset=l,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Ui(this)}},Id=new Map,to=class{format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,n){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.formatter.format(t)} – ${this.formatter.format(n)}`}formatRangeToParts(t,n){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let o=this.formatter.formatToParts(t),i=this.formatter.formatToParts(n);return[...o.map(a=>({...a,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(a=>({...a,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return FA()&&(this.resolvedHourCycle||(this.resolvedHourCycle=BA(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}constructor(t,n={}){this.formatter=pw(t,n),this.options=n}};const NA={true:{ja:"h11"},false:{}};function pw(e,t={}){if(typeof t.hour12=="boolean"&&LA()){t={...t};let i=NA[String(t.hour12)][e.split("-")[0]],a=t.hour12?"h12":"h23";t.hourCycle=i??a,delete t.hour12}let n=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[0]?-1:1).join():"");if(Id.has(n))return Id.get(n);let o=new Intl.DateTimeFormat(e,t);return Id.set(n,o),o}let Pd=null;function LA(){return Pd==null&&(Pd=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Pd}let Ad=null;function FA(){return Ad==null&&(Ad=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Ad}function BA(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let n=pw(e,{...t,timeZone:void 0}),o=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(a=>a.type==="hour").value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(a=>a.type==="hour").value,10);if(o===0&&i===23)return"h23";if(o===24&&i===23)return"h24";if(o===0&&i===11)return"h11";if(o===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}function zA(e,t,n,o,i){const a={};for(let s in t){const l=s,c=t[l];c!=null&&(a[l]=Math.floor(c/2),a[l]>0&&c%2===0&&a[l]--)}const r=ea(e,t,n).subtract(a);return el(e,r,t,n,o,i)}function ea(e,t,n,o,i){let a=e;return t.years?a=Ps(e):t.months?a=_o(e):t.weeks&&(a=As(e,n)),el(e,a,t,n,o,i)}function Sf(e,t,n,o,i){let a={...t};a.days?a.days--:a.weeks?a.weeks--:a.months?a.months--:a.years&&a.years--;let r=ea(e,t,n).subtract(a);return el(e,r,t,n,o,i)}function el(e,t,n,o,i,a){return i&&e.compare(i)>=0&&(t=tw(t,ea(Li(i),n,o))),a&&e.compare(a)<=0&&(t=ew(t,Sf(Li(a),n,o))),t}function An(e,t,n){let o=Li(e);return t&&(o=tw(o,Li(t))),n&&(o=ew(o,Li(n))),o}function zm(e,t,n,o,i,a){switch(t){case"start":return ea(e,n,o,i,a);case"end":return Sf(e,n,o,i,a);case"center":default:return zA(e,n,o,i,a)}}function Jt(e,t){return t!=null&&Qi(e,t)}function Hm(e,t,n,o,i){return e?t!=null&&t(e,n)?!0:Xn(e,o,i):!1}function Xn(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function HA(e,t,n){const o=e.subtract({days:1});return Qi(o,e)||Xn(o,t,n)}function jA(e,t,n){const o=e.add({days:1});return Qi(o,e)||Xn(o,t,n)}function $f(e){let t={...e};for(let n in t)t[n]=1;return t}function fw(e,t){let n={...t};return n.days?n.days--:n.days=-1,e.add(n)}function gw(e){return e?.calendar.identifier==="gregory"&&e.era==="BC"?"short":void 0}function mw(e,t){const n=Wi(qu(t));return new to(e,{weekday:"long",month:"long",year:"numeric",day:"numeric",era:gw(n),timeZone:t})}function jm(e,t){const n=qu(t);return new to(e,{month:"long",year:"numeric",era:gw(n),calendar:n?.calendar.identifier,timeZone:t})}function WA(e,t,n,o,i){let a=n.formatRangeToParts(e.toDate(i),t.toDate(i)),r=-1;for(let c=0;c<a.length;c++){let u=a[c];if(u.source==="shared"&&u.type==="literal")r=c;else if(u.source==="endRange")break}let s="",l="";for(let c=0;c<a.length;c++)c<r?s+=a[c].value:c>r&&(l+=a[c].value);return o(s,l)}function UA(e,t,n,o){let i=e,a=e,r=mw(n,o);return Qi(i,a)?r.format(i.toDate(o)):WA(i,a,r,(s,l)=>`${s} – ${l}`,o)}var GA=["sun","mon","tue","wed","thu","fri","sat"];function vw(e){return e!=null?GA[e]:void 0}function bw(e,t,n){const o=vw(n);return As(e,t,o)}function yw(e,t,n,o){const i=t.add({weeks:e}),a=[];let r=bw(i,n,o);for(;a.length<7;){a.push(r);let s=r.add({days:1});if(Qi(r,s))break;r=s}return a}function qA(e,t,n,o){const i=vw(o),a=n??fA(e,t,i);return[...new Array(a).keys()].map(r=>yw(r,e,t,o))}function YA(e,t){const n=new to(e,{weekday:"long",timeZone:t}),o=new to(e,{weekday:"short",timeZone:t}),i=new to(e,{weekday:"narrow",timeZone:t});return a=>{const r=a instanceof Date?a:a.toDate(t);return{value:a,short:o.format(r),long:n.format(r),narrow:i.format(r)}}}function KA(e,t,n,o){const i=bw(e,o,t),a=[...new Array(7).keys()],r=YA(o,n);return a.map(s=>r(i.add({days:s})))}function XA(e,t="long"){const n=new Date(2021,0,1),o=[];for(let i=0;i<12;i++)o.push(n.toLocaleString(e,{month:t})),n.setMonth(n.getMonth()+1);return o}function ZA(e){const t=[];for(let n=e.from;n<=e.to;n+=1)t.push(n);return t}var JA=10;function QA(e){if(e){if(e.length===3)return e.padEnd(4,"0");if(e.length===2){const t=new Date().getFullYear(),n=Math.floor(t/100)*100,o=parseInt(e.slice(-2),10),i=n+o;return i>t+JA?(i-100).toString():i.toString()}return e}}function ps(e,t){const n=t!=null&&t.strict?10:12,o=e-e%10,i=[];for(let a=0;a<n;a+=1){const r=o+a;i.push(r)}return i}function Aa(e){return qu(e??xf())}function tl(e,t,n,o){return function(i){const{startDate:a,focusedDate:r}=i,s=fw(a,e);return Xn(r,n,o)?{startDate:a,focusedDate:An(r,n,o),endDate:s}:r.compare(a)<0?{startDate:Sf(r,e,t,n,o),focusedDate:An(r,n,o),endDate:s}:r.compare(s)>0?{startDate:ea(r,e,t,n,o),endDate:s,focusedDate:An(r,n,o)}:{startDate:a,endDate:s,focusedDate:An(r,n,o)}}}function xw(e,t,n,o,i,a){const r=tl(n,o,i,a),s=t.add(n);return r({focusedDate:e.add(n),startDate:ea(el(e,s,n,o,i,a),n,o)})}function ww(e,t,n,o,i,a){const r=tl(n,o,i,a);let s=t.subtract(n);return r({focusedDate:e.subtract(n),startDate:ea(el(e,s,n,o,i,a),n,o)})}function eR(e,t,n,o,i,a,r){const s=tl(o,i,a,r);if(!n&&!o.days)return s({focusedDate:e.add($f(o)),startDate:t});if(o.days)return xw(e,t,o,i,a,r);if(o.weeks)return s({focusedDate:e.add({months:1}),startDate:t});if(o.months||o.years)return s({focusedDate:e.add({years:1}),startDate:t})}function tR(e,t,n,o,i,a,r){const s=tl(o,i,a,r);if(!n&&!o.days)return s({focusedDate:e.subtract($f(o)),startDate:t});if(o.days)return ww(e,t,o,i,a,r);if(o.weeks)return s({focusedDate:e.subtract({months:1}),startDate:t});if(o.months||o.years)return s({focusedDate:e.subtract({years:1}),startDate:t})}var Wm=e=>e!=null&&e.length===4,nR=e=>e!=null&&parseFloat(e)<=12,oR=e=>e!=null&&parseFloat(e)<=31;function iR(e,t,n){const o=aR(t,n);let{year:i,month:a,day:r}=rR(o,e)??{};if(i!=null||a!=null||r!=null){const l=new Date;i||(i=l.getFullYear().toString()),a||(a=(l.getMonth()+1).toString()),r||(r=l.getDate().toString())}if(Wm(i)||(i=QA(i)),Wm(i)&&nR(a)&&oR(r))return new iu(+i,+a,+r);const s=Date.parse(e);if(!isNaN(s)){const l=new Date(s);return new iu(l.getFullYear(),l.getMonth()+1,l.getDate())}}function aR(e,t){return new to(e,{day:"numeric",month:"numeric",year:"numeric",timeZone:t}).formatToParts(new Date(2e3,11,25)).map(({type:n,value:o})=>n==="literal"?`${o}?`:`((?!=<${n}>)\\d+)?`).join("")}function rR(e,t){var n;const o=t.match(e);return(n=e.toString().match(/<(.+?)>/g))==null?void 0:n.map(i=>{var a;const r=i.match(/<(.+)>/);return!r||r.length<=0?null:(a=i.match(/<(.+)>/))==null?void 0:a[1]}).reduce((i,a,r)=>(a&&(o&&o.length>r?i[a]=o[r+1]:i[a]=null),i),{})}function Um(e,t,n){const o=Li(Zx(n));switch(e){case"thisWeek":return[As(o,t),Nm(o,t)];case"thisMonth":return[_o(o),o];case"thisQuarter":return[_o(o).add({months:-((o.month-1)%3)}),o];case"thisYear":return[Ps(o),o];case"last3Days":return[o.add({days:-2}),o];case"last7Days":return[o.add({days:-6}),o];case"last14Days":return[o.add({days:-13}),o];case"last30Days":return[o.add({days:-29}),o];case"last90Days":return[o.add({days:-89}),o];case"lastMonth":return[_o(o.add({months:-1})),Ah(o.add({months:-1}))];case"lastQuarter":return[_o(o.add({months:-((o.month-1)%3)-3})),Ah(o.add({months:-((o.month-1)%3)-1}))];case"lastWeek":return[As(o,t).add({weeks:-1}),Nm(o,t).add({weeks:-1})];case"lastYear":return[Ps(o.add({years:-1})),hA(o.add({years:-1}))];default:throw new Error(`Invalid date range preset: ${e}`)}}var El="__live-region__";function _w(e={}){const{level:t="polite",document:n=document,root:o,delay:i=0}=e,a=n.defaultView??window,r=o??n.body;function s(c,u){const d=n.getElementById(El);d?.remove(),u=u??i;const h=n.createElement("span");h.id=El,h.dataset.liveAnnouncer="true";const p=t!=="assertive"?"status":"alert";h.setAttribute("aria-live",t),h.setAttribute("role",p),Object.assign(h.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"}),r.appendChild(h),a.setTimeout(()=>{h.textContent=c},u)}function l(){const c=n.getElementById(El);c?.remove()}return{announce:s,destroy:l,toJSON(){return El}}}var Cw=be("date-picker").parts("clearTrigger","content","control","input","label","monthSelect","nextTrigger","positioner","presetTrigger","prevTrigger","rangeText","root","table","tableBody","tableCell","tableCellTrigger","tableHead","tableHeader","tableRow","trigger","view","viewControl","viewTrigger","yearSelect"),Me=Cw.build(),sR=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.label)==null?void 0:o.call(n,t))??`datepicker:${e.id}:label:${t}`},lR=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`datepicker:${e.id}`},cR=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.table)==null?void 0:o.call(n,t))??`datepicker:${e.id}:table:${t}`},Fh=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`datepicker:${e.id}:content`},Rd=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.cellTrigger)==null?void 0:o.call(n,t))??`datepicker:${e.id}:cell-trigger:${t}`},uR=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.prevTrigger)==null?void 0:o.call(n,t))??`datepicker:${e.id}:prev:${t}`},dR=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.nextTrigger)==null?void 0:o.call(n,t))??`datepicker:${e.id}:next:${t}`},hR=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.viewTrigger)==null?void 0:o.call(n,t))??`datepicker:${e.id}:view:${t}`},kw=e=>{var t;return((t=e.ids)==null?void 0:t.clearTrigger)??`datepicker:${e.id}:clear`},Sw=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`datepicker:${e.id}:control`},Gm=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.input)==null?void 0:o.call(n,t))??`datepicker:${e.id}:input:${t}`},$w=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`datepicker:${e.id}:trigger`},Ew=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`datepicker:${e.id}:positioner`},Tw=e=>{var t;return((t=e.ids)==null?void 0:t.monthSelect)??`datepicker:${e.id}:month-select`},Ow=e=>{var t;return((t=e.ids)==null?void 0:t.yearSelect)??`datepicker:${e.id}:year-select`},qm=(e,t)=>G0(_c(e),`[data-part=table-cell-trigger][data-view=${t}][data-focus]:not([data-outside-range])`),Ym=e=>e.getById($w(e)),_c=e=>e.getById(Fh(e)),Cr=e=>ni(Iw(e),"[data-part=input]"),pR=e=>e.getById(Ow(e)),fR=e=>e.getById(Tw(e)),gR=e=>e.getById(kw(e)),mR=e=>e.getById(Ew(e)),Iw=e=>e.getById(Sw(e));function Bh(e){const[t,n]=e;return!t||!n||t.compare(n)<=0?e:[n,t]}function ua(e,t){const[n,o]=t;return!n||!o?!1:n.compare(e)<=0&&o.compare(e)>=0}function Tl(e){return e.slice().sort((t,n)=>t.compare(n))}function vR(e){return Bt(e,{year:"calendar decade",month:"calendar year",day:"calendar month"})}var bR={day:"dd",month:"mm",year:"yyyy"};function yR(e){return new to(e).formatToParts(new Date).map(t=>bR[t.type]??t.value).join("")}var Pw=(e,t)=>e?/\d/.test(e)||e===t||e.length!==1:!0,Km=e=>!Number.isNaN(e.day)&&!Number.isNaN(e.month)&&!Number.isNaN(e.year),xR=(e,t)=>e.split("").filter(n=>Pw(n,t)).join("");function wR(e){const t=new Intl.DateTimeFormat(e).formatToParts(new Date).find(n=>n.type==="literal");return t?t.value:"/"}var _R={dayCell(e){return e.unavailable?`Not available. ${e.formattedDate}`:e.selected?`Selected date. ${e.formattedDate}`:`Choose ${e.formattedDate}`},trigger(e){return e?"Close calendar":"Open calendar"},viewTrigger(e){return Bt(e,{year:"Switch to month view",month:"Switch to day view",day:"Switch to year view"})},presetTrigger(e){const[t="",n=""]=e;return`select ${t} to ${n}`},prevTrigger(e){return Bt(e,{year:"Switch to previous decade",month:"Switch to previous year",day:"Switch to previous month"})},nextTrigger(e){return Bt(e,{year:"Switch to next decade",month:"Switch to next year",day:"Switch to next month"})},placeholder(){return{day:"dd",month:"mm",year:"yyyy"}},content:"calendar",monthSelect:"Select month",yearSelect:"Select year",clearTrigger:"Clear selected dates"};function To(e,t){return e?e==="day"?0:e==="month"?1:2:t||0}function Ef(e){return e===0?"day":e===1?"month":"year"}function Tf(e,t,n){return Ef(vt(To(e,0),To(t,0),To(n,2)))}function CR(e,t){return To(e,0)>To(t,0)}function kR(e,t){return To(e,0)<To(t,0)}function SR(e,t,n){const o=To(e,0)+1;return Tf(Ef(o),t,n)}function $R(e,t,n){const o=To(e,0)-1;return Tf(Ef(o),t,n)}var ER=["day","month","year"];function TR(e){ER.forEach(t=>e(t))}function OR(e,t){const{state:n,context:o,prop:i,send:a,computed:r,scope:s}=e,l=o.get("startValue"),c=r("endValue"),u=o.get("value"),d=o.get("focusedValue"),h=o.get("hoveredValue"),p=h?Bh([u[0],h]):[],m=i("disabled"),f=i("readOnly"),b=r("isInteractive"),v=i("min"),y=i("max"),x=i("locale"),_=i("timeZone"),k=i("startOfWeek"),E=n.matches("focused"),P=n.matches("open"),S=i("selectionMode")==="range",R=i("isDateUnavailable"),B=o.get("currentPlacement"),A=bf({...i("positioning"),placement:B}),G=wR(x),ee={..._R,...i("translations")};function z(F=l){const H=i("fixedWeeks")?6:void 0;return qA(F,x,H,k)}function W(F={}){const{format:H}=F;return XA(x,H).map((K,ae)=>{const ye=ae+1,ke=d.set({month:ye}),Oe=Xn(ke,v,y);return{label:K,value:ye,disabled:Oe}})}function q(){return ZA({from:v?.year??1900,to:y?.year??2100}).map(F=>({label:F.toString(),value:F,disabled:!ds(F,v?.year,y?.year)}))}function ne(F){return ps(l.year).map(H=>({label:H.toString(),value:H,disabled:!ds(H,v?.year,y?.year)}))}function te(F){return Hm(F,R,x,v,y)}function le(F){const H=l??Aa(_);a({type:"FOCUS.SET",value:H.set({month:F})})}function he(F){const H=l??Aa(_);a({type:"FOCUS.SET",value:H.set({year:F})})}function ue(F){const{value:H,disabled:K}=F,ae=d.set({year:H}),ye=!ps(l.year,{strict:!0}).includes(H),ke=ds(H,v?.year,y?.year),Oe={focused:d.year===F.value,selectable:ye||ke,outsideRange:ye,selected:!!u.find(it=>it&&it.year===H),valueText:H.toString(),inRange:S&&(ua(ae,u)||ua(ae,p)),value:ae,get disabled(){return K||!Oe.selectable}};return Oe}function _e(F){const{value:H,disabled:K}=F,ae=d.set({month:H}),ye=jm(x,_),ke={focused:d.month===F.value,selectable:!Xn(ae,v,y),selected:!!u.find(Oe=>Oe&&Oe.month===H&&Oe.year===d.year),valueText:ye.format(ae.toDate(_)),inRange:S&&(ua(ae,u)||ua(ae,p)),value:ae,get disabled(){return K||!ke.selectable}};return ke}function me(F){const{value:H,disabled:K,visibleRange:ae=r("visibleRange")}=F,ye=mw(x,_),ke=$f(r("visibleDuration")),Oe=i("outsideDaySelectable"),it=ae.start.add(ke).subtract({days:1}),Z=Xn(H,ae.start,it),ce=S&&ua(H,u),re=S&&Jt(H,u[0]),xe=S&&Jt(H,u[1]),Xe=S&&p.length>0,wt=Xe&&ua(H,p),Et=Xe&&Jt(H,p[0]),Tn=Xe&&Jt(H,p[1]),Vo={invalid:Xn(H,v,y),disabled:K||!Oe&&Z||Xn(H,v,y),selected:u.some(ul=>Jt(H,ul)),unavailable:Hm(H,R,x,v,y)&&!K,outsideRange:Z,today:cA(H,_),weekend:mA(H,x),formattedDate:ye.format(H.toDate(_)),get focused(){return Jt(H,d)&&(!Vo.outsideRange||Oe)},get ariaLabel(){return ee.dayCell(Vo)},get selectable(){return!Vo.disabled&&!Vo.unavailable},inRange:ce||wt,firstInRange:re,lastInRange:xe,inHoveredRange:wt,firstInHoveredRange:Et,lastInHoveredRange:Tn};return Vo}function Te(F){const{view:H="day",id:K}=F;return[H,K].filter(Boolean).join(" ")}return{focused:E,open:P,inline:!!i("inline"),view:o.get("view"),getRangePresetValue(F){return Um(F,x,_)},getDaysInWeek(F,H=l){return yw(F,H,x,k)},getOffset(F){const H=l.add(F),K=c.add(F),ae=jm(x,_);return{visibleRange:{start:H,end:K},weeks:z(H),visibleRangeText:{start:ae.format(H.toDate(_)),end:ae.format(K.toDate(_))}}},getMonthWeeks:z,isUnavailable:te,weeks:z(),weekDays:KA(Aa(_),k,_,x),visibleRangeText:r("visibleRangeText"),value:u,valueAsDate:u.filter(F=>F!=null).map(F=>F.toDate(_)),valueAsString:r("valueAsString"),focusedValue:d,focusedValueAsDate:d?.toDate(_),focusedValueAsString:i("format")(d,{locale:x,timeZone:_}),visibleRange:r("visibleRange"),selectToday(){const F=An(Aa(_),v,y);a({type:"VALUE.SET",value:F})},setValue(F){const H=F.map(K=>An(K,v,y));a({type:"VALUE.SET",value:H})},clearValue(){a({type:"VALUE.CLEAR"})},setFocusedValue(F){a({type:"FOCUS.SET",value:F})},setOpen(F){i("inline")||n.matches("open")===F||a({type:F?"OPEN":"CLOSE"})},focusMonth:le,focusYear:he,getYears:q,getMonths:W,getYearsGrid(F={}){const{columns:H=1}=F;return Mg(ne(),H)},getDecade(){const F=ps(d.year);return{start:F.at(0),end:F.at(-1)}},getMonthsGrid(F={}){const{columns:H=1,format:K}=F;return Mg(W({format:K}),H)},format(F,H={month:"long",year:"numeric"}){return new to(x,H).format(F.toDate(_))},setView(F){a({type:"VIEW.SET",view:F})},goToNext(){a({type:"GOTO.NEXT",view:o.get("view")})},goToPrev(){a({type:"GOTO.PREV",view:o.get("view")})},getRootProps(){return t.element({...Me.root.attrs,dir:i("dir"),id:lR(s),"data-state":P?"open":"closed","data-disabled":D(m),"data-readonly":D(f)})},getLabelProps(F={}){const{index:H=0}=F;return t.label({...Me.label.attrs,id:sR(s,H),dir:i("dir"),htmlFor:Gm(s,H),"data-state":P?"open":"closed","data-index":H,"data-disabled":D(m),"data-readonly":D(f)})},getControlProps(){return t.element({...Me.control.attrs,dir:i("dir"),id:Sw(s),"data-disabled":D(m)})},getRangeTextProps(){return t.element({...Me.rangeText.attrs,dir:i("dir")})},getContentProps(){return t.element({...Me.content.attrs,hidden:!P,dir:i("dir"),"data-state":P?"open":"closed","data-placement":B,"data-inline":D(i("inline")),id:Fh(s),tabIndex:-1,role:"application","aria-roledescription":"datepicker","aria-label":ee.content})},getTableProps(F={}){const{view:H="day",columns:K=H==="day"?7:4}=F,ae=Te(F);return t.element({...Me.table.attrs,role:"grid","data-columns":K,"aria-roledescription":vR(H),id:cR(s,ae),"aria-readonly":Je(f),"aria-disabled":Je(m),"aria-multiselectable":Je(i("selectionMode")!=="single"),"data-view":H,dir:i("dir"),tabIndex:-1,onKeyDown(ye){if(ye.defaultPrevented)return;const ke={Enter(){H==="day"&&te(d)||H==="month"&&!_e({value:d.month}).selectable||H==="year"&&!ue({value:d.year}).selectable||a({type:"TABLE.ENTER",view:H,columns:K,focus:!0})},ArrowLeft(){a({type:"TABLE.ARROW_LEFT",view:H,columns:K,focus:!0})},ArrowRight(){a({type:"TABLE.ARROW_RIGHT",view:H,columns:K,focus:!0})},ArrowUp(){a({type:"TABLE.ARROW_UP",view:H,columns:K,focus:!0})},ArrowDown(){a({type:"TABLE.ARROW_DOWN",view:H,columns:K,focus:!0})},PageUp(Oe){a({type:"TABLE.PAGE_UP",larger:Oe.shiftKey,view:H,columns:K,focus:!0})},PageDown(Oe){a({type:"TABLE.PAGE_DOWN",larger:Oe.shiftKey,view:H,columns:K,focus:!0})},Home(){a({type:"TABLE.HOME",view:H,columns:K,focus:!0})},End(){a({type:"TABLE.END",view:H,columns:K,focus:!0})}}[Ss(ye,{dir:i("dir")})];ke&&(ke(ye),ye.preventDefault(),ye.stopPropagation())},onPointerLeave(){a({type:"TABLE.POINTER_LEAVE"})},onPointerDown(){a({type:"TABLE.POINTER_DOWN",view:H})},onPointerUp(){a({type:"TABLE.POINTER_UP",view:H})}})},getTableHeadProps(F={}){const{view:H="day"}=F;return t.element({...Me.tableHead.attrs,"aria-hidden":!0,dir:i("dir"),"data-view":H,"data-disabled":D(m)})},getTableHeaderProps(F={}){const{view:H="day"}=F;return t.element({...Me.tableHeader.attrs,dir:i("dir"),"data-view":H,"data-disabled":D(m)})},getTableBodyProps(F={}){const{view:H="day"}=F;return t.element({...Me.tableBody.attrs,"data-view":H,"data-disabled":D(m)})},getTableRowProps(F={}){const{view:H="day"}=F;return t.element({...Me.tableRow.attrs,"aria-disabled":Je(m),"data-disabled":D(m),"data-view":H})},getDayTableCellState:me,getDayTableCellProps(F){const{value:H}=F,K=me(F);return t.element({...Me.tableCell.attrs,role:"gridcell","aria-disabled":Je(!K.selectable),"aria-selected":K.selected||K.inRange,"aria-invalid":Je(K.invalid),"aria-current":K.today?"date":void 0,"data-value":H.toString()})},getDayTableCellTriggerProps(F){const{value:H}=F,K=me(F);return t.element({...Me.tableCellTrigger.attrs,id:Rd(s,H.toString()),role:"button",dir:i("dir"),tabIndex:K.focused?0:-1,"aria-label":K.ariaLabel,"aria-disabled":Je(!K.selectable),"aria-invalid":Je(K.invalid),"data-disabled":D(!K.selectable),"data-selected":D(K.selected),"data-value":H.toString(),"data-view":"day","data-today":D(K.today),"data-focus":D(K.focused),"data-unavailable":D(K.unavailable),"data-range-start":D(K.firstInRange),"data-range-end":D(K.lastInRange),"data-in-range":D(K.inRange),"data-outside-range":D(K.outsideRange),"data-weekend":D(K.weekend),"data-in-hover-range":D(K.inHoveredRange),"data-hover-range-start":D(K.firstInHoveredRange),"data-hover-range-end":D(K.lastInHoveredRange),onClick(ae){ae.defaultPrevented||K.selectable&&a({type:"CELL.CLICK",cell:"day",value:H})},onPointerMove:S?ae=>{if(ae.pointerType==="touch"||!K.selectable)return;const ye=!s.isActiveElement(ae.currentTarget);h&&rA(H,h)||a({type:"CELL.POINTER_MOVE",cell:"day",value:H,focus:ye})}:void 0})},getMonthTableCellState:_e,getMonthTableCellProps(F){const{value:H,columns:K}=F,ae=_e(F);return t.element({...Me.tableCell.attrs,dir:i("dir"),colSpan:K,role:"gridcell","aria-selected":Je(ae.selected||ae.inRange),"data-selected":D(ae.selected),"aria-disabled":Je(!ae.selectable),"data-value":H})},getMonthTableCellTriggerProps(F){const{value:H}=F,K=_e(F);return t.element({...Me.tableCellTrigger.attrs,dir:i("dir"),role:"button",id:Rd(s,H.toString()),"data-selected":D(K.selected),"aria-disabled":Je(!K.selectable),"data-disabled":D(!K.selectable),"data-focus":D(K.focused),"data-in-range":D(K.inRange),"data-outside-range":D(K.outsideRange),"aria-label":K.valueText,"data-view":"month","data-value":H,tabIndex:K.focused?0:-1,onClick(ae){ae.defaultPrevented||K.selectable&&a({type:"CELL.CLICK",cell:"month",value:H})},onPointerMove:S?ae=>{if(ae.pointerType==="touch"||!K.selectable)return;const ye=!s.isActiveElement(ae.currentTarget);h&&K.value&&sA(K.value,h)||a({type:"CELL.POINTER_MOVE",cell:"month",value:K.value,focus:ye})}:void 0})},getYearTableCellState:ue,getYearTableCellProps(F){const{value:H,columns:K}=F,ae=ue(F);return t.element({...Me.tableCell.attrs,dir:i("dir"),colSpan:K,role:"gridcell","aria-selected":Je(ae.selected),"data-selected":D(ae.selected),"aria-disabled":Je(!ae.selectable),"data-value":H})},getYearTableCellTriggerProps(F){const{value:H}=F,K=ue(F);return t.element({...Me.tableCellTrigger.attrs,dir:i("dir"),role:"button",id:Rd(s,H.toString()),"data-selected":D(K.selected),"data-focus":D(K.focused),"data-in-range":D(K.inRange),"aria-disabled":Je(!K.selectable),"data-disabled":D(!K.selectable),"aria-label":K.valueText,"data-outside-range":D(K.outsideRange),"data-value":H,"data-view":"year",tabIndex:K.focused?0:-1,onClick(ae){ae.defaultPrevented||K.selectable&&a({type:"CELL.CLICK",cell:"year",value:H})},onPointerMove:S?ae=>{if(ae.pointerType==="touch"||!K.selectable)return;const ye=!s.isActiveElement(ae.currentTarget);h&&K.value&&lA(K.value,h)||a({type:"CELL.POINTER_MOVE",cell:"year",value:K.value,focus:ye})}:void 0})},getNextTriggerProps(F={}){const{view:H="day"}=F,K=m||!r("isNextVisibleRangeValid");return t.button({...Me.nextTrigger.attrs,dir:i("dir"),id:dR(s,H),type:"button","aria-label":ee.nextTrigger(H),disabled:K,"data-disabled":D(K),onClick(ae){ae.defaultPrevented||a({type:"GOTO.NEXT",view:H})}})},getPrevTriggerProps(F={}){const{view:H="day"}=F,K=m||!r("isPrevVisibleRangeValid");return t.button({...Me.prevTrigger.attrs,dir:i("dir"),id:uR(s,H),type:"button","aria-label":ee.prevTrigger(H),disabled:K,"data-disabled":D(K),onClick(ae){ae.defaultPrevented||a({type:"GOTO.PREV",view:H})}})},getClearTriggerProps(){return t.button({...Me.clearTrigger.attrs,id:kw(s),dir:i("dir"),type:"button","aria-label":ee.clearTrigger,hidden:!u.length,onClick(F){F.defaultPrevented||a({type:"VALUE.CLEAR"})}})},getTriggerProps(){return t.button({...Me.trigger.attrs,id:$w(s),dir:i("dir"),type:"button","data-placement":B,"aria-label":ee.trigger(P),"aria-controls":Fh(s),"data-state":P?"open":"closed","aria-haspopup":"grid",disabled:m,onClick(F){F.defaultPrevented||b&&a({type:"TRIGGER.CLICK"})}})},getViewProps(F={}){const{view:H="day"}=F;return t.element({...Me.view.attrs,"data-view":H,hidden:o.get("view")!==H})},getViewTriggerProps(F={}){const{view:H="day"}=F;return t.button({...Me.viewTrigger.attrs,"data-view":H,dir:i("dir"),id:hR(s,H),type:"button",disabled:m,"aria-label":ee.viewTrigger(H),onClick(K){K.defaultPrevented||b&&a({type:"VIEW.TOGGLE",src:"viewTrigger"})}})},getViewControlProps(F={}){const{view:H="day"}=F;return t.element({...Me.viewControl.attrs,"data-view":H,dir:i("dir")})},getInputProps(F={}){const{index:H=0,fixOnBlur:K=!0}=F;return t.input({...Me.input.attrs,id:Gm(s,H),autoComplete:"off",autoCorrect:"off",spellCheck:"false",dir:i("dir"),name:i("name"),"data-index":H,"data-state":P?"open":"closed",readOnly:f,disabled:m,placeholder:i("placeholder")||yR(x),defaultValue:r("valueAsString")[H],onBeforeInput(ae){const{data:ye}=I0(ae);Pw(ye,G)||ae.preventDefault()},onFocus(){a({type:"INPUT.FOCUS",index:H})},onBlur(ae){const ye=ae.currentTarget.value.trim();a({type:"INPUT.BLUR",value:ye,index:H,fixOnBlur:K})},onKeyDown(ae){if(ae.defaultPrevented||!b)return;const ye={Enter(ke){ks(ke)||te(d)||ke.currentTarget.value.trim()!==""&&a({type:"INPUT.ENTER",value:ke.currentTarget.value,index:H})}}[ae.key];ye&&(ye(ae),ae.preventDefault())},onInput(ae){const ye=ae.currentTarget.value;a({type:"INPUT.CHANGE",value:xR(ye,G),index:H})}})},getMonthSelectProps(){return t.select({...Me.monthSelect.attrs,id:Tw(s),"aria-label":ee.monthSelect,disabled:m,dir:i("dir"),defaultValue:l.month,onChange(F){le(Number(F.currentTarget.value))}})},getYearSelectProps(){return t.select({...Me.yearSelect.attrs,id:Ow(s),disabled:m,"aria-label":ee.yearSelect,dir:i("dir"),defaultValue:l.year,onChange(F){he(Number(F.currentTarget.value))}})},getPositionerProps(){return t.element({id:Ew(s),...Me.positioner.attrs,dir:i("dir"),style:A.floating})},getPresetTriggerProps(F){const H=Array.isArray(F.value)?F.value:Um(F.value,x,_),K=H.filter(ae=>ae!=null).map(ae=>ae.toDate(_).toDateString());return t.button({...Me.presetTrigger.attrs,"aria-label":ee.presetTrigger(K),type:"button",onClick(ae){ae.defaultPrevented||a({type:"PRESET.CLICK",value:H})}})}}}var{and:dn}=Ct();function IR(e,t){if(e?.length!==t?.length)return!1;const n=Math.max(e.length,t.length);for(let o=0;o<n;o++)if(!Jt(e[o],t[o]))return!1;return!0}function Ol(e,t){return e.map(n=>t("format")(n,{locale:t("locale"),timeZone:t("timeZone")}))}var PR={props({props:e}){const t=e.locale||"en-US",n=e.timeZone||"UTC",o=e.selectionMode||"single",i=e.numOfMonths||1,a=e.defaultValue?Tl(e.defaultValue).map(d=>An(d,e.min,e.max)):void 0,r=e.value?Tl(e.value).map(d=>An(d,e.min,e.max)):void 0;let s=e.focusedValue||e.defaultFocusedValue||r?.[0]||a?.[0]||Aa(n);s=An(s,e.min,e.max);const l="day",c="year",u=Tf(e.view||l,l,c);return{locale:t,numOfMonths:i,timeZone:n,selectionMode:o,defaultView:u,minView:l,maxView:c,outsideDaySelectable:!1,closeOnSelect:!0,format(d,{locale:h,timeZone:p}){return new to(h,{timeZone:p,day:"2-digit",month:"2-digit",year:"numeric"}).format(d.toDate(p))},parse(d,{locale:h,timeZone:p}){return iR(d,h,p)},...e,focusedValue:typeof e.focusedValue>"u"?void 0:s,defaultFocusedValue:s,value:r,defaultValue:a??[],positioning:{placement:"bottom",...e.positioning}}},initialState({prop:e}){return e("open")||e("defaultOpen")||e("inline")?"open":"idle"},refs(){return{announcer:void 0}},context({prop:e,bindable:t,getContext:n}){return{focusedValue:t(()=>({defaultValue:e("defaultFocusedValue"),value:e("focusedValue"),isEqual:Jt,hash:o=>o.toString(),sync:!0,onChange(o){var i;const a=n(),r=a.get("view"),s=a.get("value"),l=Ol(s,e);(i=e("onFocusChange"))==null||i({value:s,valueAsString:l,view:r,focusedValue:o})}})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:IR,hash:o=>o.map(i=>i.toString()).join(","),onChange(o){var i;const a=n(),r=Ol(o,e);(i=e("onValueChange"))==null||i({value:o,valueAsString:r,view:a.get("view")})}})),inputValue:t(()=>({defaultValue:""})),activeIndex:t(()=>({defaultValue:0,sync:!0})),hoveredValue:t(()=>({defaultValue:null,isEqual:(o,i)=>i!==null&&o!==null&&Jt(o,i)})),view:t(()=>({defaultValue:e("defaultView"),value:e("view"),onChange(o){var i;(i=e("onViewChange"))==null||i({view:o})}})),startValue:t(()=>{const o=e("focusedValue")||e("defaultFocusedValue");return{defaultValue:zm(o,"start",{months:e("numOfMonths")},e("locale")),isEqual:Jt,hash:i=>i.toString()}}),currentPlacement:t(()=>({defaultValue:void 0})),restoreFocus:t(()=>({defaultValue:!1}))}},computed:{isInteractive:({prop:e})=>!e("disabled")&&!e("readOnly"),visibleDuration:({prop:e})=>({months:e("numOfMonths")}),endValue:({context:e,computed:t})=>fw(e.get("startValue"),t("visibleDuration")),visibleRange:({context:e,computed:t})=>({start:e.get("startValue"),end:t("endValue")}),visibleRangeText({context:e,prop:t,computed:n}){const o=t("timeZone"),i=new to(t("locale"),{month:"long",year:"numeric",timeZone:o}),a=i.format(e.get("startValue").toDate(o)),r=i.format(n("endValue").toDate(o)),s=t("selectionMode")==="range"?`${a} - ${r}`:a;return{start:a,end:r,formatted:s}},isPrevVisibleRangeValid:({context:e,prop:t})=>!HA(e.get("startValue"),t("min"),t("max")),isNextVisibleRangeValid:({prop:e,computed:t})=>!jA(t("endValue"),e("min"),e("max")),valueAsString:({context:e,prop:t})=>Ol(e.get("value"),t)},effects:["setupLiveRegion"],watch({track:e,prop:t,context:n,action:o,computed:i}){e([()=>t("locale")],()=>{o(["setStartValue"])}),e([()=>n.hash("focusedValue")],()=>{o(["setStartValue","focusActiveCellIfNeeded","setHoveredValueIfKeyboard"])}),e([()=>n.hash("startValue")],()=>{o(["syncMonthSelectElement","syncYearSelectElement"])}),e([()=>n.get("inputValue")],()=>{o(["syncInputValue"])}),e([()=>n.hash("value")],()=>{o(["syncInputElement"])}),e([()=>i("valueAsString").toString()],()=>{o(["announceValueText"])}),e([()=>n.get("view")],()=>{o(["focusActiveCell"])}),e([()=>t("open")],()=>{o(["toggleVisibility"])})},on:{"VALUE.SET":{actions:["setDateValue","setFocusedDate"]},"VIEW.SET":{actions:["setView"]},"FOCUS.SET":{actions:["setFocusedDate"]},"VALUE.CLEAR":{actions:["clearDateValue","clearFocusedDate","focusFirstInputElement"]},"INPUT.CHANGE":[{guard:"isInputValueEmpty",actions:["setInputValue","clearDateValue","clearFocusedDate"]},{actions:["setInputValue","focusParsedDate"]}],"INPUT.ENTER":{actions:["focusParsedDate","selectFocusedDate"]},"INPUT.FOCUS":{actions:["setActiveIndex"]},"INPUT.BLUR":[{guard:"shouldFixOnBlur",actions:["setActiveIndexToStart","selectParsedDate"]},{actions:["setActiveIndexToStart"]}],"PRESET.CLICK":[{guard:"isOpenControlled",actions:["setDateValue","setFocusedDate","invokeOnClose"]},{target:"focused",actions:["setDateValue","setFocusedDate","focusInputElement"]}],"GOTO.NEXT":[{guard:"isYearView",actions:["focusNextDecade","announceVisibleRange"]},{guard:"isMonthView",actions:["focusNextYear","announceVisibleRange"]},{actions:["focusNextPage"]}],"GOTO.PREV":[{guard:"isYearView",actions:["focusPreviousDecade","announceVisibleRange"]},{guard:"isMonthView",actions:["focusPreviousYear","announceVisibleRange"]},{actions:["focusPreviousPage"]}]},states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open",actions:["focusFirstSelectedDate","focusActiveCell"]},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}]}},focused:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open",actions:["focusFirstSelectedDate","focusActiveCell"]},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["focusFirstSelectedDate","focusActiveCell","invokeOnOpen"]}]}},open:{tags:["open"],effects:["trackDismissableElement","trackPositioning"],exit:["clearHoveredDate","resetView"],on:{"CONTROLLED.CLOSE":[{guard:dn("shouldRestoreFocus","isInteractOutsideEvent"),target:"focused",actions:["focusTriggerElement"]},{guard:"shouldRestoreFocus",target:"focused",actions:["focusInputElement"]},{target:"idle"}],"CELL.CLICK":[{guard:"isAboveMinView",actions:["setFocusedValueForView","setPreviousView"]},{guard:dn("isRangePicker","hasSelectedRange"),actions:["setActiveIndexToStart","resetSelection","setActiveIndexToEnd"]},{guard:dn("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","setRestoreFocus"]},{guard:dn("isRangePicker","isSelectingEndDate","closeOnSelect"),target:"focused",actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","focusInputElement"]},{guard:dn("isRangePicker","isSelectingEndDate"),actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate"]},{guard:"isRangePicker",actions:["setFocusedDate","setSelectedDate","setActiveIndexToEnd"]},{guard:"isMultiPicker",actions:["setFocusedDate","toggleSelectedDate"]},{guard:dn("closeOnSelect","isOpenControlled"),actions:["setFocusedDate","setSelectedDate","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["setFocusedDate","setSelectedDate","invokeOnClose","focusInputElement"]},{actions:["setFocusedDate","setSelectedDate"]}],"CELL.POINTER_MOVE":{guard:dn("isRangePicker","isSelectingEndDate"),actions:["setHoveredDate","setFocusedDate"]},"TABLE.POINTER_LEAVE":{guard:"isRangePicker",actions:["clearHoveredDate"]},"TABLE.POINTER_DOWN":{actions:["disableTextSelection"]},"TABLE.POINTER_UP":{actions:["enableTextSelection"]},"TABLE.ESCAPE":[{guard:"isOpenControlled",actions:["focusFirstSelectedDate","invokeOnClose"]},{target:"focused",actions:["focusFirstSelectedDate","invokeOnClose","focusTriggerElement"]}],"TABLE.ENTER":[{guard:"isAboveMinView",actions:["setPreviousView"]},{guard:dn("isRangePicker","hasSelectedRange"),actions:["setActiveIndexToStart","clearDateValue","setSelectedDate","setActiveIndexToEnd"]},{guard:dn("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose"]},{guard:dn("isRangePicker","isSelectingEndDate","closeOnSelect"),target:"focused",actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","focusInputElement"]},{guard:dn("isRangePicker","isSelectingEndDate"),actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate"]},{guard:"isRangePicker",actions:["setSelectedDate","setActiveIndexToEnd","focusNextDay"]},{guard:"isMultiPicker",actions:["toggleSelectedDate"]},{guard:dn("closeOnSelect","isOpenControlled"),actions:["selectFocusedDate","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectFocusedDate","invokeOnClose","focusInputElement"]},{actions:["selectFocusedDate"]}],"TABLE.ARROW_RIGHT":[{guard:"isMonthView",actions:["focusNextMonth"]},{guard:"isYearView",actions:["focusNextYear"]},{actions:["focusNextDay","setHoveredDate"]}],"TABLE.ARROW_LEFT":[{guard:"isMonthView",actions:["focusPreviousMonth"]},{guard:"isYearView",actions:["focusPreviousYear"]},{actions:["focusPreviousDay"]}],"TABLE.ARROW_UP":[{guard:"isMonthView",actions:["focusPreviousMonthColumn"]},{guard:"isYearView",actions:["focusPreviousYearColumn"]},{actions:["focusPreviousWeek"]}],"TABLE.ARROW_DOWN":[{guard:"isMonthView",actions:["focusNextMonthColumn"]},{guard:"isYearView",actions:["focusNextYearColumn"]},{actions:["focusNextWeek"]}],"TABLE.PAGE_UP":{actions:["focusPreviousSection"]},"TABLE.PAGE_DOWN":{actions:["focusNextSection"]},"TABLE.HOME":[{guard:"isMonthView",actions:["focusFirstMonth"]},{guard:"isYearView",actions:["focusFirstYear"]},{actions:["focusSectionStart"]}],"TABLE.END":[{guard:"isMonthView",actions:["focusLastMonth"]},{guard:"isYearView",actions:["focusLastYear"]},{actions:["focusSectionEnd"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"VIEW.TOGGLE":{actions:["setNextView"]},INTERACT_OUTSIDE:[{guard:"isOpenControlled",actions:["setActiveIndexToStart","invokeOnClose"]},{guard:"shouldRestoreFocus",target:"focused",actions:["setActiveIndexToStart","invokeOnClose","focusTriggerElement"]},{target:"idle",actions:["setActiveIndexToStart","invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["setActiveIndexToStart","invokeOnClose"]},{target:"idle",actions:["setActiveIndexToStart","invokeOnClose"]}]}}},implementations:{guards:{isAboveMinView:({context:e,prop:t})=>CR(e.get("view"),t("minView")),isDayView:({context:e,event:t})=>(t.view||e.get("view"))==="day",isMonthView:({context:e,event:t})=>(t.view||e.get("view"))==="month",isYearView:({context:e,event:t})=>(t.view||e.get("view"))==="year",isRangePicker:({prop:e})=>e("selectionMode")==="range",hasSelectedRange:({context:e})=>e.get("value").length===2,isMultiPicker:({prop:e})=>e("selectionMode")==="multiple",shouldRestoreFocus:({context:e})=>!!e.get("restoreFocus"),isSelectingEndDate:({context:e})=>e.get("activeIndex")===1,closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>e("open")!=null||!!e("inline"),isInteractOutsideEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="INTERACT_OUTSIDE"},isInputValueEmpty:({event:e})=>e.value.trim()==="",shouldFixOnBlur:({event:e})=>!!e.fixOnBlur},effects:{trackPositioning({context:e,prop:t,scope:n}){if(t("inline"))return;e.get("currentPlacement")||e.set("currentPlacement",t("positioning").placement);const o=Iw(n);return on(o,()=>mR(n),{...t("positioning"),defer:!0,onComplete(i){e.set("currentPlacement",i.placement)}})},setupLiveRegion({scope:e,refs:t}){const n=e.getDoc();return t.set("announcer",_w({level:"assertive",document:n})),()=>{var o,i;return(i=(o=t.get("announcer"))==null?void 0:o.destroy)==null?void 0:i.call(o)}},trackDismissableElement({scope:e,send:t,context:n,prop:o}){return o("inline")?void 0:nr(()=>_c(e),{type:"popover",defer:!0,exclude:[...Cr(e),Ym(e),gR(e)],onInteractOutside(i){n.set("restoreFocus",!i.detail.focusable)},onDismiss(){t({type:"INTERACT_OUTSIDE"})},onEscapeKeyDown(i){i.preventDefault(),t({type:"TABLE.ESCAPE",src:"dismissable"})}})}},actions:{setNextView({context:e,prop:t}){const n=SR(e.get("view"),t("minView"),t("maxView"));e.set("view",n)},setPreviousView({context:e,prop:t}){const n=$R(e.get("view"),t("minView"),t("maxView"));e.set("view",n)},setView({context:e,event:t}){e.set("view",t.view)},setRestoreFocus({context:e}){e.set("restoreFocus",!0)},announceValueText({context:e,prop:t,refs:n}){var o;const i=e.get("value").map(a=>UA(a,null,t("locale"),t("timeZone")));(o=n.get("announcer"))==null||o.announce(i.join(","),3e3)},announceVisibleRange({computed:e,refs:t}){var n;const{formatted:o}=e("visibleRangeText");(n=t.get("announcer"))==null||n.announce(o)},disableTextSelection({scope:e}){Wp({target:_c(e),doc:e.getDoc()})},enableTextSelection({scope:e}){j0({doc:e.getDoc(),target:_c(e)})},focusFirstSelectedDate(e){const{context:t}=e;t.get("value").length&&He(e,t.get("value")[0])},syncInputElement({scope:e,computed:t}){de(()=>{Cr(e).forEach((n,o)=>{Rn(n,t("valueAsString")[o]||"")})})},setFocusedDate(e){const{event:t}=e,n=Array.isArray(t.value)?t.value[0]:t.value;He(e,n)},setFocusedValueForView(e){const{context:t,event:n}=e;He(e,t.get("focusedValue").set({[t.get("view")]:n.value}))},focusNextMonth(e){const{context:t}=e;He(e,t.get("focusedValue").add({months:1}))},focusPreviousMonth(e){const{context:t}=e;He(e,t.get("focusedValue").subtract({months:1}))},setDateValue({context:e,event:t,prop:n}){if(!Array.isArray(t.value))return;const o=t.value.map(i=>An(i,n("min"),n("max")));e.set("value",o)},clearDateValue({context:e}){e.set("value",[])},setSelectedDate(e){const{context:t,event:n}=e,o=Array.from(t.get("value"));o[t.get("activeIndex")]=Cc(e,n.value??t.get("focusedValue")),t.set("value",Bh(o))},resetSelection(e){const{context:t,event:n}=e,o=Cc(e,n.value??t.get("focusedValue"));t.set("value",[o])},toggleSelectedDate(e){const{context:t,event:n}=e,o=Cc(e,n.value??t.get("focusedValue")),i=t.get("value").findIndex(a=>Jt(a,o));if(i===-1){const a=[...t.get("value"),o];t.set("value",Tl(a))}else{const a=Array.from(t.get("value"));a.splice(i,1),t.set("value",Tl(a))}},setHoveredDate({context:e,event:t}){e.set("hoveredValue",t.value)},clearHoveredDate({context:e}){e.set("hoveredValue",null)},selectFocusedDate({context:e,computed:t}){const n=Array.from(e.get("value")),o=e.get("activeIndex");n[o]=e.get("focusedValue").copy(),e.set("value",Bh(n));const i=t("valueAsString");e.set("inputValue",i[o])},focusPreviousDay(e){const{context:t}=e,n=t.get("focusedValue").subtract({days:1});He(e,n)},focusNextDay(e){const{context:t}=e,n=t.get("focusedValue").add({days:1});He(e,n)},focusPreviousWeek(e){const{context:t}=e,n=t.get("focusedValue").subtract({weeks:1});He(e,n)},focusNextWeek(e){const{context:t}=e,n=t.get("focusedValue").add({weeks:1});He(e,n)},focusNextPage(e){const{context:t,computed:n,prop:o}=e,i=xw(t.get("focusedValue"),t.get("startValue"),n("visibleDuration"),o("locale"),o("min"),o("max"));Il(e,i)},focusPreviousPage(e){const{context:t,computed:n,prop:o}=e,i=ww(t.get("focusedValue"),t.get("startValue"),n("visibleDuration"),o("locale"),o("min"),o("max"));Il(e,i)},focusSectionStart(e){const{context:t}=e;He(e,t.get("startValue").copy())},focusSectionEnd(e){const{computed:t}=e;He(e,t("endValue").copy())},focusNextSection(e){const{context:t,event:n,computed:o,prop:i}=e,a=eR(t.get("focusedValue"),t.get("startValue"),n.larger,o("visibleDuration"),i("locale"),i("min"),i("max"));a&&Il(e,a)},focusPreviousSection(e){const{context:t,event:n,computed:o,prop:i}=e,a=tR(t.get("focusedValue"),t.get("startValue"),n.larger,o("visibleDuration"),i("locale"),i("min"),i("max"));a&&Il(e,a)},focusNextYear(e){const{context:t}=e,n=t.get("focusedValue").add({years:1});He(e,n)},focusPreviousYear(e){const{context:t}=e,n=t.get("focusedValue").subtract({years:1});He(e,n)},focusNextDecade(e){const{context:t}=e,n=t.get("focusedValue").add({years:10});He(e,n)},focusPreviousDecade(e){const{context:t}=e,n=t.get("focusedValue").subtract({years:10});He(e,n)},clearFocusedDate(e){const{prop:t}=e;He(e,Aa(t("timeZone")))},focusPreviousMonthColumn(e){const{context:t,event:n}=e,o=t.get("focusedValue").subtract({months:n.columns});He(e,o)},focusNextMonthColumn(e){const{context:t,event:n}=e,o=t.get("focusedValue").add({months:n.columns});He(e,o)},focusPreviousYearColumn(e){const{context:t,event:n}=e,o=t.get("focusedValue").subtract({years:n.columns});He(e,o)},focusNextYearColumn(e){const{context:t,event:n}=e,o=t.get("focusedValue").add({years:n.columns});He(e,o)},focusFirstMonth(e){const{context:t}=e,n=t.get("focusedValue").set({month:1});He(e,n)},focusLastMonth(e){const{context:t}=e,n=t.get("focusedValue").set({month:12});He(e,n)},focusFirstYear(e){const{context:t}=e,n=ps(t.get("focusedValue").year),o=t.get("focusedValue").set({year:n[0]});He(e,o)},focusLastYear(e){const{context:t}=e,n=ps(t.get("focusedValue").year),o=t.get("focusedValue").set({year:n[n.length-1]});He(e,o)},setActiveIndex({context:e,event:t}){e.set("activeIndex",t.index)},setActiveIndexToEnd({context:e}){e.set("activeIndex",1)},setActiveIndexToStart({context:e}){e.set("activeIndex",0)},focusActiveCell({scope:e,context:t}){de(()=>{var n;const o=t.get("view");(n=qm(e,o))==null||n.focus({preventScroll:!0})})},focusActiveCellIfNeeded({scope:e,context:t,event:n}){n.focus&&de(()=>{var o;const i=t.get("view");(o=qm(e,i))==null||o.focus({preventScroll:!0})})},setHoveredValueIfKeyboard({context:e,event:t,prop:n}){!t.type.startsWith("TABLE.ARROW")||n("selectionMode")!=="range"||e.get("activeIndex")===0||e.set("hoveredValue",e.get("focusedValue").copy())},focusTriggerElement({scope:e}){de(()=>{var t;(t=Ym(e))==null||t.focus({preventScroll:!0})})},focusFirstInputElement({scope:e}){de(()=>{const[t]=Cr(e);t?.focus({preventScroll:!0})})},focusInputElement({scope:e}){de(()=>{const t=Cr(e),n=t.findLastIndex(a=>a.value!==""),o=Math.max(n,0),i=t[o];i?.focus({preventScroll:!0}),i?.setSelectionRange(i.value.length,i.value.length)})},syncMonthSelectElement({scope:e,context:t}){const n=fR(e);Rn(n,t.get("startValue").month.toString())},syncYearSelectElement({scope:e,context:t}){const n=pR(e);Rn(n,t.get("startValue").year.toString())},setInputValue({context:e,event:t}){e.get("activeIndex")===t.index&&e.set("inputValue",t.value)},syncInputValue({scope:e,context:t,event:n}){queueMicrotask(()=>{const o=Cr(e),i=n.index??t.get("activeIndex");Rn(o[i],t.get("inputValue"))})},focusParsedDate(e){const{event:t,prop:n}=e;if(t.index==null)return;const o=n("parse")(t.value,{locale:n("locale"),timeZone:n("timeZone")});!o||!Km(o)||He(e,o)},selectParsedDate({context:e,event:t,prop:n}){if(t.index==null)return;let o=n("parse")(t.value,{locale:n("locale"),timeZone:n("timeZone")});if((!o||!Km(o))&&t.value&&(o=e.get("focusedValue").copy()),!o)return;o=An(o,n("min"),n("max"));const i=Array.from(e.get("value"));i[t.index]=o,e.set("value",i);const a=Ol(i,n);e.set("inputValue",a[t.index])},resetView({context:e}){e.set("view",e.initial("view"))},setStartValue({context:e,computed:t,prop:n}){const o=e.get("focusedValue");if(!Xn(o,e.get("startValue"),t("endValue")))return;const i=zm(o,"start",{months:n("numOfMonths")},n("locale"));e.set("startValue",i)},invokeOnOpen({prop:e}){var t;e("inline")||(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose({prop:e}){var t;e("inline")||(t=e("onOpenChange"))==null||t({open:!1})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}},Cc=(e,t)=>{const{context:n,prop:o}=e,i=n.get("view");let a=typeof t=="number"?n.get("focusedValue").set({[i]:t}):t;return TR(r=>{kR(r,o("minView"))&&(a=a.set({[r]:r==="day"?1:0}))}),a};function He(e,t){const{context:n,prop:o,computed:i}=e;if(!t)return;const a=Cc(e,t);if(Jt(n.get("focusedValue"),a))return;const r=tl(i("visibleDuration"),o("locale"),o("min"),o("max"))({focusedDate:a,startDate:n.get("startValue")});n.set("startValue",r.startDate),n.set("focusedValue",r.focusedDate)}function Il(e,t){const{context:n}=e;n.set("startValue",t.startDate);const o=n.get("focusedValue");Jt(o,t.focusedDate)||n.set("focusedValue",t.focusedDate)}ie()(["closeOnSelect","dir","disabled","fixedWeeks","focusedValue","format","parse","placeholder","getRootNode","id","ids","inline","isDateUnavailable","locale","max","min","name","numOfMonths","onFocusChange","onOpenChange","onValueChange","onViewChange","open","defaultOpen","positioning","readOnly","selectionMode","startOfWeek","timeZone","translations","value","defaultView","defaultValue","view","defaultFocusedValue","outsideDaySelectable","minView","maxView"]);ie()(["index","fixOnBlur"]);ie()(["value"]);ie()(["columns","id","view"]);ie()(["disabled","value","columns"]);ie()(["view"]);const[Aw,qe]=Re("DatePickerContext"),AR=O({__name:"date-picker-clear-trigger",props:{asChild:{type:Boolean}},setup(e){const t=qe();return Y(),(n,o)=>(w(),$(g(X).button,U(g(t).getClearTriggerProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),RR=O({__name:"date-picker-content",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=ef(),o=I(()=>Gs(t.value.getContentProps(),n.value.presenceProps));return Y(),(i,a)=>g(n).unmounted?oe("",!0):(w(),$(g(X).div,U({key:0},o.value,{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),DR=O({__name:"date-picker-context",setup(e){const t=qe();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),VR=O({__name:"date-picker-control",props:{asChild:{type:Boolean}},setup(e){const t=qe();return Y(),(n,o)=>(w(),$(g(X).div,U(g(t).getControlProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),MR=O({__name:"date-picker-input",props:{index:{},fixOnBlur:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=qe();return Y(),(o,i)=>(w(),$(g(X).input,U(g(n).getInputProps(t),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),NR=O({__name:"date-picker-label",props:{asChild:{type:Boolean}},setup(e){const t=qe();return Y(),(n,o)=>(w(),$(g(X).label,U(g(t).getLabelProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),LR=["value"],FR=O({__name:"date-picker-month-select",props:{asChild:{type:Boolean}},setup(e){const t=qe();return Y(),(n,o)=>(w(),$(g(X).select,U(g(t).getMonthSelectProps(),{"as-child":e.asChild}),{default:C(()=>[(w(!0),M(Se,null,Ie(g(t).getMonths(),i=>(w(),M("option",{key:i.value,value:i.value},se(i.label),9,LR))),128))]),_:1},16,["as-child"]))}}),[BR,ta]=Re("DatePickerViewPropsContext"),zR=O({__name:"date-picker-next-trigger",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=ta();return Y(),(o,i)=>(w(),$(g(X).button,U(g(t).getNextTriggerProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),HR=O({__name:"date-picker-positioner",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=Ys(),o=Jp(I(()=>({...n.value,present:t.value.open})));return Qp(o),Y(),(i,a)=>g(o).unmounted?oe("",!0):(w(),$(g(X).div,U({key:0},g(t).getPositionerProps(),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),jR=O({__name:"date-picker-preset-trigger",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=qe();return Y(),(o,i)=>(w(),$(g(X).button,U(g(n).getPresetTriggerProps(t),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),WR=O({__name:"date-picker-prev-trigger",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=ta();return Y(),(o,i)=>(w(),$(g(X).button,U(g(t).getPrevTriggerProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),UR=O({__name:"date-picker-range-text",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=I(()=>{const{start:o,end:i}=t.value.visibleRangeText;return Dn([o,i]).filter(Boolean).join(" - ")});return Y(),(o,i)=>(w(),$(g(X).div,U(g(t).getRangeTextProps(),{"as-child":e.asChild}),{default:C(()=>[Ne(se(n.value),1)]),_:1},16,["as-child"]))}}),GR=O({__name:"date-picker-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return Aw(n),io(I(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),Y(),(o,i)=>(w(),$(g(X).div,U(n.value.getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),qR=(e={},t)=>{const n=Ut(),o=sn(ln),i=kn(Cn),a=I(()=>{const s=Ye(e);return{id:n,dir:i.value.dir,locale:i.value.locale,value:s.modelValue,getRootNode:o?.value.getRootNode,...Fn(s),onFocusChange:l=>{var c;t?.("focusChange",l),t?.("update:focusedValue",l.focusedValue),(c=s.onFocusChange)==null||c.call(s,l)},onViewChange:l=>{var c;t?.("viewChange",l),t?.("update:view",l.view),(c=s.onViewChange)==null||c.call(s,l)},onOpenChange:l=>{var c;t?.("openChange",l),t?.("update:open",l.open),(c=s.onOpenChange)==null||c.call(s,l)},onValueChange:l=>{var c;t?.("valueChange",l),t?.("update:modelValue",l.value),(c=s.onValueChange)==null||c.call(s,l)}}}),r=Gt(PR,a);return I(()=>OR(r,rn))},YR=O({__name:"date-picker-root",props:_n({closeOnSelect:{type:Boolean},defaultFocusedValue:{},defaultOpen:{type:Boolean},defaultValue:{},defaultView:{},disabled:{type:Boolean},fixedWeeks:{type:Boolean},focusedValue:{},format:{type:Function},id:{},ids:{},isDateUnavailable:{type:Function},locale:{},max:{},maxView:{},min:{},minView:{},modelValue:{},name:{},numOfMonths:{},open:{type:Boolean},outsideDaySelectable:{type:Boolean},parse:{type:Function},placeholder:{},positioning:{},readOnly:{type:Boolean},selectionMode:{},startOfWeek:{},timeZone:{},translations:{},view:{},inline:{type:Boolean},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{closeOnSelect:void 0,defaultOpen:void 0,disabled:void 0,fixedWeeks:void 0,open:void 0,readOnly:void 0,outsideDaySelectable:void 0,inline:void 0}),emits:["focusChange","openChange","valueChange","viewChange","update:modelValue","update:open","update:view","update:focusedValue"],setup(e,{emit:t}){const n=e,o=qR(n,t);return Aw(o),io(I(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Y(),(i,a)=>(w(),$(g(X).div,U(g(o).getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),[KR,Ku]=Re("DatePickerTablePropsContext"),XR=O({__name:"date-picker-table-body",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=Ku();return Y(),(o,i)=>(w(),$(g(X).tbody,U(g(t).getTableBodyProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),[ZR,JR]=Re("DatePickerTableCellPropsContext"),QR=O({__name:"date-picker-table-cell-trigger",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=JR(),o=ta(),i=I(()=>{const a={day:t.value.getDayTableCellTriggerProps,month:t.value.getMonthTableCellTriggerProps,year:t.value.getYearTableCellTriggerProps}[o.view];return a(n)});return Y(),(a,r)=>(w(),$(g(X).div,U(i.value,{"as-child":e.asChild}),{default:C(()=>[V(a.$slots,"default")]),_:3},16,["as-child"]))}}),eD=O({__name:"date-picker-table-cell",props:{value:{},disabled:{type:Boolean},columns:{},visibleRange:{},asChild:{type:Boolean}},setup(e){const t=e,n=qe(),o=ta();ZR(t);const i=I(()=>({day:n.value.getDayTableCellProps,month:n.value.getMonthTableCellProps,year:n.value.getYearTableCellProps})[o.view??"day"](t));return Y(),(a,r)=>(w(),$(g(X).td,U(i.value,{"as-child":e.asChild}),{default:C(()=>[V(a.$slots,"default")]),_:3},16,["as-child"]))}}),tD=O({__name:"date-picker-table-head",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=Ku();return Y(),(o,i)=>(w(),$(g(X).thead,U(g(t).getTableHeadProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),nD=O({__name:"date-picker-table-header",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=Ku();return Y(),(o,i)=>(w(),$(g(X).th,U(g(t).getTableHeaderProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),oD=O({__name:"date-picker-table-row",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=Ku();return Y(),(o,i)=>(w(),$(g(X).tr,U(g(t).getTableRowProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),iD=O({__name:"date-picker-table",props:{view:{},columns:{},id:{},asChild:{type:Boolean}},setup(e){const t=e,n=qe(),o=ta(),i=Ut(),a=t.id??i;return KR({...t,id:a,...o}),Y(),(r,s)=>(w(),$(g(X).table,U(g(n).getTableProps(t),{"as-child":e.asChild}),{default:C(()=>[V(r.$slots,"default")]),_:3},16,["as-child"]))}}),aD=O({__name:"date-picker-trigger",props:{asChild:{type:Boolean}},setup(e){const t=qe();return Y(),(n,o)=>(w(),$(g(X).button,U(g(t).getTriggerProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),rD=O({__name:"date-picker-view-control",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=ta();return Y(),(o,i)=>(w(),$(g(X).div,U(g(t).getViewControlProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),sD=O({__name:"date-picker-view-trigger",props:{asChild:{type:Boolean}},setup(e){const t=qe(),n=ta();return Y(),(o,i)=>(w(),$(g(X).button,U(g(t).getViewTriggerProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),Rw=Cw.extendWith("view"),lD=O({__name:"date-picker-view",props:{view:{},asChild:{type:Boolean}},setup(e){const t=e,n=qe();return BR(t),Y(),(o,i)=>(w(),$(g(X).div,U(g(Rw).build().view.attrs,{hidden:g(n).view!==e.view,"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["hidden","as-child"]))}}),cD=["value"],uD=O({__name:"date-picker-year-select",props:{asChild:{type:Boolean}},setup(e){const t=qe();return Y(),(n,o)=>(w(),$(g(X).select,U(g(t).getYearSelectProps(),{"as-child":e.asChild}),{default:C(()=>[(w(!0),M(Se,null,Ie(g(t).getYears(),i=>(w(),M("option",{key:i.value,value:i.value},se(i.label),9,cD))),128))]),_:1},16,["as-child"]))}}),we=Object.freeze(Object.defineProperty({__proto__:null,ClearTrigger:AR,Content:RR,Context:DR,Control:VR,Input:MR,Label:NR,MonthSelect:FR,NextTrigger:zR,Positioner:HR,PresetTrigger:jR,PrevTrigger:WR,RangeText:UR,Root:YR,RootProvider:GR,Table:iD,TableBody:XR,TableCell:eD,TableCellTrigger:QR,TableHead:tD,TableHeader:nD,TableRow:oD,Trigger:aD,View:lD,ViewControl:rD,ViewTrigger:sD,YearSelect:uD},Symbol.toStringTag,{value:"Module"}));var Dw=be("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger");Dw.build();ie()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);var dD=e=>typeof e.getAsEntry=="function"?e.getAsEntry():typeof e.webkitGetAsEntry=="function"?e.webkitGetAsEntry():null,Vw=e=>e.isDirectory,zh=e=>e.isFile,Hh=(e,t)=>(Object.defineProperty(e,"relativePath",{value:t?`${t}/${e.name}`:e.name}),e),hD=(e,t)=>Promise.all(Array.from(e).filter(n=>n.kind==="file").map(n=>{const o=dD(n);if(!o)return null;if(Vw(o)&&t)return Mw(o.createReader(),`${o.name}`);if(zh(o)&&typeof n.getAsFile=="function"){const i=n.getAsFile();return Promise.resolve(i?Hh(i,""):null)}if(zh(o))return new Promise(i=>{o.file(a=>{i(Hh(a,""))})})}).filter(n=>n)),Mw=(e,t="")=>new Promise(n=>{const o=[],i=()=>{e.readEntries(a=>{if(a.length===0){n(Promise.all(o).then(s=>s.flat()));return}const r=a.map(s=>{if(!s)return null;if(Vw(s))return Mw(s.createReader(),`${t}${s.name}`);if(zh(s))return new Promise(l=>{s.file(c=>{l(Hh(c,t))})})}).filter(s=>s);o.push(Promise.all(r)),i()})};i()});function pD(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function fD(e){return/^.*\.[\w]+$/.test(e)}var Xm=e=>pD(e)||fD(e);function gD(e){if(e!=null)return typeof e=="string"?e:Array.isArray(e)?e.filter(Xm).join(","):Object.entries(e).reduce((t,[n,o])=>[...t,n,...o],[]).filter(Xm).join(",")}var Pl=(e,t)=>e.name===t.name&&e.size===t.size&&e.type===t.type,kr=e=>e!=null;function mD(e,t,n){if(kr(e.size))if(kr(t)&&kr(n)){if(e.size>n)return[!1,"FILE_TOO_LARGE"];if(e.size<t)return[!1,"FILE_TOO_SMALL"]}else{if(kr(t)&&e.size<t)return[!1,"FILE_TOO_SMALL"];if(kr(n)&&e.size>n)return[!1,"FILE_TOO_LARGE"]}return[!0,null]}var vD="3g2_video/3gpp2[3gp,3gpp_video/3gpp[3mf_model/3mf[7z_application/x-7z-compressed[aac_audio/aac[ac_application/pkix-attr-cert[adp_audio/adpcm[adts_audio/aac[ai_application/postscript[aml_application/automationml-aml+xml[amlx_application/automationml-amlx+zip[amr_audio/amr[apk_application/vnd.android.package-archive[apng_image/apng[appcache,manifest_text/cache-manifest[appinstaller_application/appinstaller[appx_application/appx[appxbundle_application/appxbundle[asc_application/pgp-keys[atom_application/atom+xml[atomcat_application/atomcat+xml[atomdeleted_application/atomdeleted+xml[atomsvc_application/atomsvc+xml[au,snd_audio/basic[avi_video/x-msvideo[avci_image/avci[avcs_image/avcs[avif_image/avif[aw_application/applixware[bdoc_application/bdoc[bin,bpk,buffer,deb,deploy,dist,distz,dll,dmg,dms,dump,elc,exe,img,iso,lrf,mar,msi,msm,msp,pkg,so_application/octet-stream[bmp,dib_image/bmp[btf,btif_image/prs.btif[bz2_application/x-bzip2[c_text/x-c[ccxml_application/ccxml+xml[cdfx_application/cdfx+xml[cdmia_application/cdmi-capability[cdmic_application/cdmi-container[cdmid_application/cdmi-domain[cdmio_application/cdmi-object[cdmiq_application/cdmi-queue[cer_application/pkix-cert[cgm_image/cgm[cjs_application/node[class_application/java-vm[coffee,litcoffee_text/coffeescript[conf,def,in,ini,list,log,text,txt_text/plain[cpp,cxx,cc_text/x-c++src[cpl_application/cpl+xml[cpt_application/mac-compactpro[crl_application/pkix-crl[css_text/css[csv_text/csv[cu_application/cu-seeme[cwl_application/cwl[cww_application/prs.cww[davmount_application/davmount+xml[dbk_application/docbook+xml[doc_application/msword[docx_application/vnd.openxmlformats-officedocument.wordprocessingml.document[dsc_text/prs.lines.tag[dssc_application/dssc+der[dtd_application/xml-dtd[dwd_application/atsc-dwd+xml[ear,jar,war_application/java-archive[ecma_application/ecmascript[emf_image/emf[eml,mime_message/rfc822[emma_application/emma+xml[emotionml_application/emotionml+xml[eot_application/vnd.ms-fontobject[eps,ps_application/postscript[epub_application/epub+zip[exi_application/exi[exp_application/express[exr_image/aces[ez_application/andrew-inset[fdf_application/fdf[fdt_application/fdt+xml[fits_image/fits[flac_audio/flac[flv_video/x-flv[g3_image/g3fax[geojson_application/geo+json[gif_image/gif[glb_model/gltf-binary[gltf_model/gltf+json[gml_application/gml+xml[go_text/x-go[gpx_application/gpx+xml[gz_application/gzip[h_text/x-h[h261_video/h261[h263_video/h263[h264_video/h264[heic_image/heic[heics_image/heic-sequence[heif_image/heif[heifs_image/heif-sequence[htm,html,shtml_text/html[ico_image/x-icon[icns_image/x-icns[ics,ifb_text/calendar[iges,igs_model/iges[ink,inkml_application/inkml+xml[ipa_application/octet-stream[java_text/x-java-source[jp2,jpg2_image/jp2[jpeg,jpe,jpg_image/jpeg[jpf,jpx_image/jpx[jpm,jpgm_image/jpm[jpgv_video/jpeg[jph_image/jph[js,mjs_text/javascript[json_application/json[json5_application/json5[jsonld_application/ld+json[jsx_text/jsx[jxl_image/jxl[jxr_image/jxr[ktx_image/ktx[ktx2_image/ktx2[less_text/less[m1v,m2v,mpe,mpeg,mpg_video/mpeg[m4a_audio/mp4[m4v_video/x-m4v[md,markdown_text/markdown[mid,midi,kar,rmi_audio/midi[mkv_video/x-matroska[mp2,mp2a,mp3,mpga,m3a,m2a_audio/mpeg[mp4,mp4v,mpg4_video/mp4[mp4a_audio/mp4[mp4s,m4p_application/mp4[odp_application/vnd.oasis.opendocument.presentation[oda_application/oda[ods_application/vnd.oasis.opendocument.spreadsheet[odt_application/vnd.oasis.opendocument.text[oga,ogg,opus,spx_audio/ogg[ogv_video/ogg[ogx_application/ogg[otf_font/otf[p12,pfx_application/x-pkcs12[pdf_application/pdf[pem_application/x-pem-file[php_text/x-php[png_image/png[ppt_application/vnd.ms-powerpoint[pptx_application/vnd.openxmlformats-officedocument.presentationml.presentation[pskcxml_application/pskc+xml[psd_image/vnd.adobe.photoshop[py_text/x-python[qt,mov_video/quicktime[rar_application/vnd.rar[rdf_application/rdf+xml[rtf_text/rtf[sass_text/x-sass[scss_text/x-scss[sgm,sgml_text/sgml[sh_application/x-sh[svg,svgz_image/svg+xml[swf_application/x-shockwave-flash[tar_application/x-tar[tif,tiff_image/tiff[toml_application/toml[ts_video/mp2t[tsx_text/tsx[tsv_text/tab-separated-values[ttc_font/collection[ttf_font/ttf[vtt_text/vtt[wasm_application/wasm[wav_audio/wav[weba_audio/webm[webm_video/webm[webmanifest_application/manifest+json[webp_image/webp[wma_audio/x-ms-wma[wmv_video/x-ms-wmv[woff_font/woff[woff2_font/woff2[xls_application/vnd.ms-excel[xlsx_application/vnd.openxmlformats-officedocument.spreadsheetml.sheet[xml_application/xml[xz_application/x-xz[yaml,yml_text/yaml[zip_application/zip",bD=new Map(vD.split("[").flatMap(e=>{const[t,n]=e.split("_");return t.split(",").map(o=>[o,n])}));function yD(e){const t=e.split(".").pop();return t&&bD.get(t)||null}function xD(e,t){if(e&&t){const n=Array.isArray(t)?t:typeof t=="string"?t.split(","):[];if(n.length===0)return!0;const o=e.name||"",i=(e.type||yD(o)||"").toLowerCase(),a=i.replace(/\/.*$/,"");return n.some(r=>{const s=r.trim().toLowerCase();return s.charAt(0)==="."?o.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0}function wD(e,t){const n=e.type==="application/x-moz-file"||xD(e,t);return[n,n?null:"FILE_INVALID_TYPE"]}var _D=be("editable").parts("root","area","label","preview","input","editTrigger","submitTrigger","cancelTrigger","control");_D.build();ie()(["activationMode","autoResize","dir","disabled","finalFocusEl","form","getRootNode","id","ids","invalid","maxLength","name","onEditChange","onFocusOutside","onInteractOutside","onPointerDownOutside","onValueChange","onValueCommit","onValueRevert","placeholder","readOnly","required","selectOnFocus","edit","defaultEdit","submitMode","translations","defaultValue","value"]);const CD=be("fieldset").parts("root","errorText","helperText","legend");CD.build();const[Nw,cn]=Re("FileUploadContext"),kD=O({__name:"file-upload-clear-trigger",props:{asChild:{type:Boolean}},setup(e){const t=cn();return Y(),(n,o)=>(w(),$(g(X).button,U(g(t).getClearTriggerProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),SD=O({__name:"file-upload-context",setup(e){const t=cn();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),$D=O({__name:"file-upload-dropzone",props:_n({asChild:{type:Boolean},disableClick:{type:Boolean}},{disableClick:void 0}),setup(e){const t=e,n=cn();return Y(),(o,i)=>(w(),$(g(X).div,U(g(n).getDropzoneProps(t),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),ED=O({__name:"file-upload-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=cn(),n=ao();return Y(),(o,i)=>{var a;return w(),$(g(X).input,U({"aria-describedby":(a=g(n))==null?void 0:a.ariaDescribedby},g(t).getHiddenInputProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["aria-describedby","as-child"])}}}),[TD,nl]=Re("FileUploadItemPropsContext"),OD=O({__name:"file-upload-item-delete-trigger",props:{asChild:{type:Boolean}},setup(e){const t=cn(),n=nl();return Y(),(o,i)=>(w(),$(g(X).button,U(g(t).getItemDeleteTriggerProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),[ID,PD]=Re("FileUploadItemGroupPropsContext"),AD=O({__name:"file-upload-item-group",props:{asChild:{type:Boolean},type:{}},setup(e){const t=e,n=I(()=>Uo(t,["type"])),o=cn();return ID(n),Y(),(i,a)=>(w(),$(g(X).ul,U(g(o).getItemGroupProps(n.value),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),RD=O({__name:"file-upload-item-name",props:{asChild:{type:Boolean}},setup(e){const t=cn(),n=nl(),o=zs();return Y(),(i,a)=>(w(),$(g(X).div,U(g(t).getItemNameProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default",{},()=>{var r;return[Ne(se(((r=o.default)==null?void 0:r.call(o))||g(n).file.name),1)]})]),_:3},16,["as-child"]))}}),DD=O({__name:"file-upload-item-preview-image",props:{asChild:{type:Boolean}},setup(e){const t=cn(),n=nl(),o=fe("");return u0(i=>{const a=t.value.createFileUrl(n.value.file,r=>o.value=r);i(a)}),Y(),(i,a)=>o.value?(w(),$(g(X).img,ft(U({key:0},g(t).getItemPreviewImageProps({...g(n),url:o.value}))),null,16)):oe("",!0)}}),VD=O({__name:"file-upload-item-preview",props:{type:{default:".*"},asChild:{type:Boolean}},setup(e){const t=cn(),n=nl();return Y(),(o,i)=>g(n).file.type.match(e.type??".*")?(w(),$(g(X).div,U({key:0},g(t).getItemPreviewProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"])):oe("",!0)}}),MD=O({__name:"file-upload-item-size-text",props:{asChild:{type:Boolean}},setup(e){const t=cn(),n=nl(),o=zs();return Y(),(i,a)=>(w(),$(g(X).div,U(g(t).getItemSizeTextProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default",{},()=>{var r;return[Ne(se(((r=o.default)==null?void 0:r.call(o))||g(t).getFileSize(g(n).file)),1)]})]),_:3},16,["as-child"]))}}),ND=O({__name:"file-upload-item",props:{file:{},type:{},asChild:{type:Boolean}},setup(e){const t=e,n=cn(),o=PD(),i=I(()=>({...t,type:o.value.type}));return TD(i),Y(),(a,r)=>(w(),$(g(X).li,U(g(n).getItemProps(i.value),{"as-child":e.asChild}),{default:C(()=>[V(a.$slots,"default")]),_:3},16,["as-child"]))}}),LD=O({__name:"file-upload-label",props:{asChild:{type:Boolean}},setup(e){const t=cn();return Y(),(n,o)=>(w(),$(g(X).label,U(g(t).getLabelProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),FD=O({__name:"file-upload-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return Nw(n),Y(),(o,i)=>(w(),$(g(X).div,U(n.value.getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}});function BD(e){const t=new Map;return function(n,o){const i=n+(o?Object.entries(o).sort((r,s)=>r[0]<s[0]?-1:1).join():"");if(t.has(i))return t.get(i);let a=new e(n,o);return t.set(i,a),a}}var zD=BD(Intl.NumberFormat);function HD(e,t,n={}){return zD(t,n).format(e)}var jD=["","kilo","mega","giga","tera"],WD=["","kilo","mega","giga","tera","peta"],UD=(e,t="en-US",n={})=>{if(Number.isNaN(e))return"";if(e===0)return"0 B";const{unitSystem:o="decimal",precision:i=3,unit:a="byte",unitDisplay:r="short"}=n,s=o==="binary"?1024:1e3,l=a==="bit"?jD:WD,c=e<0;let u=Math.abs(e),d=0;for(;u>=s&&d<l.length-1;)u/=s,d++;const h=parseFloat(u.toPrecision(i)),p=c?-h:h;return HD(p,t,{style:"unit",unit:l[d]+a,unitDisplay:r})},Lw=be("file-upload").parts("root","dropzone","item","itemDeleteTrigger","itemGroup","itemName","itemPreview","itemPreviewImage","itemSizeText","label","trigger","clearTrigger"),hn=Lw.build(),Fw=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`file:${e.id}`},Bw=e=>{var t;return((t=e.ids)==null?void 0:t.dropzone)??`file:${e.id}:dropzone`},jh=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`file:${e.id}:input`},GD=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`file:${e.id}:trigger`},qD=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`file:${e.id}:label`},YD=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.item)==null?void 0:o.call(n,t))??`file:${e.id}:item:${t}`},KD=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemName)==null?void 0:o.call(n,t))??`file:${e.id}:item-name:${t}`},XD=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemSizeText)==null?void 0:o.call(n,t))??`file:${e.id}:item-size:${t}`},ZD=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemPreview)==null?void 0:o.call(n,t))??`file:${e.id}:item-preview:${t}`},JD=e=>e.getById(Fw(e)),Zm=e=>e.getById(jh(e)),QD=e=>e.getById(Bw(e));function Jm(e){const t=je(e);return e.dataTransfer?e.dataTransfer.types.some(n=>n==="Files"||n==="application/x-moz-file"):!!t&&"files"in t}function e2(e,t,n){const{prop:o,computed:i}=e;return!i("multiple")&&t>1?!1:!i("multiple")&&t+n.length===2?!0:!(t+n.length>o("maxFiles"))}function Qm(e,t,n=[],o=[]){const{prop:i,computed:a}=e,r=[],s=[],l={acceptedFiles:n,rejectedFiles:o};return t.forEach(c=>{var u;const[d,h]=wD(c,a("acceptAttr")),[p,m]=mD(c,i("minFileSize"),i("maxFileSize")),f=(u=i("validate"))==null?void 0:u(c,l),b=f?f.length===0:!0;if(d&&p&&b)r.push(c);else{const v=[h,m];b||v.push(...f??[]),s.push({file:c,errors:v.filter(Boolean)})}}),e2(e,r.length,n)||(r.forEach(c=>{s.push({file:c,errors:["TOO_MANY_FILES"]})}),r.splice(0)),{acceptedFiles:r,rejectedFiles:s}}function t2(e,t){const n=Ke(e);try{if("DataTransfer"in n){const o=new n.DataTransfer;t.forEach(i=>{o.items.add(i)}),e.files=o.files}}catch{}}var Lo="accepted";function n2(e,t){const{state:n,send:o,prop:i,computed:a,scope:r,context:s}=e,l=!!i("disabled"),c=!!i("required"),u=i("allowDrop"),d=i("translations"),h=n.matches("dragging"),p=n.matches("focused")&&!l;return{dragging:h,focused:p,disabled:!!l,transforming:s.get("transforming"),openFilePicker(){l||o({type:"OPEN"})},deleteFile(m,f=Lo){o({type:"FILE.DELETE",file:m,itemType:f})},acceptedFiles:s.get("acceptedFiles"),rejectedFiles:s.get("rejectedFiles"),setFiles(m){o({type:"FILES.SET",files:m,count:m.length})},clearRejectedFiles(){o({type:"REJECTED_FILES.CLEAR"})},clearFiles(){o({type:"FILES.CLEAR"})},getFileSize(m){return UD(m.size,i("locale"))},createFileUrl(m,f){const b=r.getWin(),v=b.URL.createObjectURL(m);return f(v),()=>b.URL.revokeObjectURL(v)},setClipboardFiles(m){if(l)return!1;const f=Array.from(m?.items??[]).reduce((b,v)=>{if(v.kind!=="file")return b;const y=v.getAsFile();return y?[...b,y]:b},[]);return f.length?(o({type:"FILES.SET",files:f}),!0):!1},getRootProps(){return t.element({...hn.root.attrs,dir:i("dir"),id:Fw(r),"data-disabled":D(l),"data-dragging":D(h)})},getDropzoneProps(m={}){return t.element({...hn.dropzone.attrs,dir:i("dir"),id:Bw(r),tabIndex:l||m.disableClick?void 0:0,role:m.disableClick?"application":"button","aria-label":d.dropzone,"aria-disabled":l,"data-invalid":D(i("invalid")),"data-disabled":D(l),"data-dragging":D(h),onKeyDown(f){l||f.defaultPrevented||f.currentTarget===je(f)&&(m.disableClick||f.key!=="Enter"&&f.key!==" "||o({type:"DROPZONE.CLICK",src:"keydown"}))},onClick(f){l||f.defaultPrevented||m.disableClick||f.currentTarget===je(f)&&(f.currentTarget.localName==="label"&&f.preventDefault(),o({type:"DROPZONE.CLICK"}))},onDragOver(f){if(l||!u)return;f.preventDefault(),f.stopPropagation();try{f.dataTransfer.dropEffect="copy"}catch{}if(!Jm(f))return;const b=f.dataTransfer.items.length;o({type:"DROPZONE.DRAG_OVER",count:b})},onDragLeave(f){l||u&&(Rt(f.currentTarget,f.relatedTarget)||o({type:"DROPZONE.DRAG_LEAVE"}))},onDrop(f){if(l)return;u&&(f.preventDefault(),f.stopPropagation());const b=Jm(f);l||!b||hD(f.dataTransfer.items,i("directory")).then(v=>{o({type:"DROPZONE.DROP",files:K0(v)})})},onFocus(){l||o({type:"DROPZONE.FOCUS"})},onBlur(){l||o({type:"DROPZONE.BLUR"})}})},getTriggerProps(){return t.button({...hn.trigger.attrs,dir:i("dir"),id:GD(r),disabled:l,"data-disabled":D(l),"data-invalid":D(i("invalid")),type:"button",onClick(m){l||(Rt(QD(r),m.currentTarget)&&m.stopPropagation(),o({type:"OPEN"}))}})},getHiddenInputProps(){return t.input({id:jh(r),tabIndex:-1,disabled:l,type:"file",required:i("required"),capture:i("capture"),name:i("name"),accept:a("acceptAttr"),webkitdirectory:i("directory")?"":void 0,multiple:a("multiple")||i("maxFiles")>1,onClick(m){m.stopPropagation(),m.currentTarget.value=""},onInput(m){if(l)return;const{files:f}=m.currentTarget;o({type:"FILE.SELECT",files:f?Array.from(f):[]})},style:Ru})},getItemGroupProps(m={}){const{type:f=Lo}=m;return t.element({...hn.itemGroup.attrs,dir:i("dir"),"data-disabled":D(l),"data-type":f})},getItemProps(m){const{file:f,type:b=Lo}=m;return t.element({...hn.item.attrs,dir:i("dir"),id:YD(r,f.name),"data-disabled":D(l),"data-type":b})},getItemNameProps(m){const{file:f,type:b=Lo}=m;return t.element({...hn.itemName.attrs,dir:i("dir"),id:KD(r,f.name),"data-disabled":D(l),"data-type":b})},getItemSizeTextProps(m){const{file:f,type:b=Lo}=m;return t.element({...hn.itemSizeText.attrs,dir:i("dir"),id:XD(r,f.name),"data-disabled":D(l),"data-type":b})},getItemPreviewProps(m){const{file:f,type:b=Lo}=m;return t.element({...hn.itemPreview.attrs,dir:i("dir"),id:ZD(r,f.name),"data-disabled":D(l),"data-type":b})},getItemPreviewImageProps(m){var f;const{file:b,url:v,type:y=Lo}=m;if(!b.type.startsWith("image/"))throw new Error("Preview Image is only supported for image files");return t.img({...hn.itemPreviewImage.attrs,alt:(f=d.itemPreview)==null?void 0:f.call(d,b),src:v,"data-disabled":D(l),"data-type":y})},getItemDeleteTriggerProps(m){var f;const{file:b,type:v=Lo}=m;return t.button({...hn.itemDeleteTrigger.attrs,dir:i("dir"),type:"button",disabled:l,"data-disabled":D(l),"data-type":v,"aria-label":(f=d.deleteFile)==null?void 0:f.call(d,b),onClick(){l||o({type:"FILE.DELETE",file:b,itemType:v})}})},getLabelProps(){return t.label({...hn.label.attrs,dir:i("dir"),id:qD(r),htmlFor:jh(r),"data-disabled":D(l),"data-required":D(c)})},getClearTriggerProps(){return t.button({...hn.clearTrigger.attrs,dir:i("dir"),type:"button",disabled:l,hidden:s.get("acceptedFiles").length===0,"data-disabled":D(l),onClick(m){m.defaultPrevented||l||o({type:"FILES.CLEAR"})}})}}}var o2={props({props:e}){return{minFileSize:0,maxFileSize:Number.POSITIVE_INFINITY,maxFiles:1,allowDrop:!0,preventDocumentDrop:!0,defaultAcceptedFiles:[],...e,translations:{dropzone:"dropzone",itemPreview:t=>`preview of ${t.name}`,deleteFile:t=>`delete file ${t.name}`,...e.translations}}},initialState(){return"idle"},context({prop:e,bindable:t,getContext:n}){return{acceptedFiles:t(()=>({defaultValue:e("defaultAcceptedFiles"),value:e("acceptedFiles"),isEqual:(o,i)=>o.length===i?.length&&o.every((a,r)=>Pl(a,i[r])),hash(o){return o.map(i=>`${i.name}-${i.size}`).join(",")},onChange(o){var i,a;const r=n();(i=e("onFileAccept"))==null||i({files:o}),(a=e("onFileChange"))==null||a({acceptedFiles:o,rejectedFiles:r.get("rejectedFiles")})}})),rejectedFiles:t(()=>({defaultValue:[],isEqual:(o,i)=>o.length===i?.length&&o.every((a,r)=>Pl(a.file,i[r].file)),onChange(o){var i,a;const r=n();(i=e("onFileReject"))==null||i({files:o}),(a=e("onFileChange"))==null||a({acceptedFiles:r.get("acceptedFiles"),rejectedFiles:o})}})),transforming:t(()=>({defaultValue:!1}))}},computed:{acceptAttr:({prop:e})=>gD(e("accept")),multiple:({prop:e})=>e("maxFiles")>1},watch({track:e,context:t,action:n}){e([()=>t.hash("acceptedFiles")],()=>{n(["syncInputElement"])})},on:{"FILES.SET":{actions:["setFiles"]},"FILE.SELECT":{actions:["setEventFiles"]},"FILE.DELETE":{actions:["removeFile"]},"FILES.CLEAR":{actions:["clearFiles"]},"REJECTED_FILES.CLEAR":{actions:["clearRejectedFiles"]}},effects:["preventDocumentDrop"],states:{idle:{on:{OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.FOCUS":{target:"focused"},"DROPZONE.DRAG_OVER":{target:"dragging"}}},focused:{on:{"DROPZONE.BLUR":{target:"idle"},OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.DRAG_OVER":{target:"dragging"}}},dragging:{on:{"DROPZONE.DROP":{target:"idle",actions:["setEventFiles"]},"DROPZONE.DRAG_LEAVE":{target:"idle"}}}},implementations:{effects:{preventDocumentDrop({prop:e,scope:t}){if(!e("preventDocumentDrop")||!e("allowDrop")||e("disabled"))return;const n=t.getDoc(),o=a=>{a?.preventDefault()},i=a=>{Rt(JD(t),je(a))||a.preventDefault()};return Es(Ee(n,"dragover",o,!1),Ee(n,"drop",i,!1))}},actions:{syncInputElement({scope:e,context:t}){queueMicrotask(()=>{const n=Zm(e);if(!n)return;t2(n,t.get("acceptedFiles"));const o=e.getWin();n.dispatchEvent(new o.Event("change",{bubbles:!0}))})},openFilePicker({scope:e}){de(()=>{var t;(t=Zm(e))==null||t.click()})},setFiles(e){const{computed:t,context:n,event:o}=e,{acceptedFiles:i,rejectedFiles:a}=Qm(e,o.files);n.set("acceptedFiles",t("multiple")?i:i.length>0?[i[0]]:[]),n.set("rejectedFiles",a)},setEventFiles(e){const{computed:t,context:n,event:o,prop:i}=e,a=n.get("acceptedFiles"),r=n.get("rejectedFiles"),{acceptedFiles:s,rejectedFiles:l}=Qm(e,o.files,a,r),c=d=>{if(t("multiple")){n.set("acceptedFiles",h=>[...h,...d]),n.set("rejectedFiles",l);return}if(d.length){n.set("acceptedFiles",[d[0]]),n.set("rejectedFiles",l);return}l.length&&(n.set("acceptedFiles",n.get("acceptedFiles")),n.set("rejectedFiles",l))},u=i("transformFiles");u?(n.set("transforming",!0),u(s).then(c).catch(d=>{Po(`[zag-js/file-upload] error transforming files
2
2
  ${d}`)}).finally(()=>{n.set("transforming",!1)})):c(s)},removeFile({context:e,event:t}){if(t.itemType==="rejected"){const n=e.get("rejectedFiles").filter(o=>!Pl(o.file,t.file));e.set("rejectedFiles",n)}else{const n=e.get("acceptedFiles").filter(o=>!Pl(o,t.file));e.set("acceptedFiles",n)}},clearRejectedFiles({context:e}){e.set("rejectedFiles",[])},clearFiles({context:e}){e.set("acceptedFiles",[]),e.set("rejectedFiles",[])}}}};ie()(["accept","acceptedFiles","allowDrop","capture","defaultAcceptedFiles","dir","directory","disabled","getRootNode","id","ids","invalid","locale","maxFiles","maxFileSize","minFileSize","name","onFileAccept","onFileChange","onFileReject","preventDocumentDrop","required","transformFiles","translations","validate"]);ie()(["file","type"]);const i2=(e={},t)=>{const n=Ut(),o=sn(ln),i=kn(Cn),a=ao(),r=I(()=>{const l=Ye(e);return{id:n,ids:{label:a?.value.ids.label,hiddenInput:a?.value.ids.control},dir:i.value.dir,disabled:a?.value.disabled,invalid:a?.value.invalid,locale:i.value.locale,required:a?.value.required,getRootNode:o?.value.getRootNode,...Fn(l),onFileChange:c=>{var u;t?.("update:acceptedFiles",c.acceptedFiles),t?.("fileChange",c),(u=l.onFileChange)==null||u.call(l,c)},onFileAccept:c=>{var u;t?.("fileAccept",c),(u=l.onFileAccept)==null||u.call(l,c)},onFileReject:c=>{var u;t?.("fileReject",c),(u=l.onFileReject)==null||u.call(l,c)}}}),s=Gt(o2,r);return I(()=>n2(s,rn))},a2=O({__name:"file-upload-root",props:_n({accept:{},defaultAcceptedFiles:{},allowDrop:{type:Boolean},capture:{},directory:{type:Boolean},disabled:{type:Boolean},id:{},ids:{},invalid:{type:Boolean},locale:{},maxFileSize:{},maxFiles:{},minFileSize:{},name:{},preventDocumentDrop:{type:Boolean},required:{type:Boolean},translations:{},validate:{type:Function},transformFiles:{type:Function},asChild:{type:Boolean}},{allowDrop:void 0,directory:void 0,disabled:void 0,invalid:void 0,preventDocumentDrop:void 0,required:void 0}),emits:["update:acceptedFiles","fileAccept","fileChange","fileReject"],setup(e,{emit:t}){const n=i2(e,t);return Nw(n),Y(),(o,i)=>(w(),$(g(X).div,U(g(n).getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),r2=O({__name:"file-upload-trigger",props:{asChild:{type:Boolean}},setup(e){const t=cn();return Y(),(n,o)=>(w(),$(g(X).button,U(g(t).getTriggerProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),pn=Object.freeze(Object.defineProperty({__proto__:null,ClearTrigger:kD,Context:SD,Dropzone:$D,HiddenInput:ED,Item:ND,ItemDeleteTrigger:OD,ItemGroup:AD,ItemName:RD,ItemPreview:VD,ItemPreviewImage:DD,ItemSizeText:MD,Label:LD,Root:a2,RootProvider:FD,Trigger:r2},Symbol.toStringTag,{value:"Module"})),s2=Symbol(),ev=Object.getPrototypeOf,Wh=new WeakMap,l2=e=>e&&(Wh.has(e)?Wh.get(e):ev(e)===Object.prototype||ev(e)===Array.prototype),c2=e=>l2(e)&&e[s2]||null,tv=(e,t=!0)=>{Wh.set(e,t)};function u2(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function zw(e,t){const n=u2();return n?(n[e]||(n[e]=t()),n[e]):t()}var kc=zw("__zag__refSet",()=>new WeakSet),d2=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,h2=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,p2=e=>typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeName=="string",f2=e=>d2(e)||h2(e)||p2(e),Uh=e=>e!==null&&typeof e=="object",nv=e=>Uh(e)&&!kc.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!f2(e)&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)&&!(e instanceof Promise),Ei=zw("__zag__proxyStateMap",()=>new WeakMap),g2=(e=Object.is,t=(s,l)=>new Proxy(s,l),n=new WeakMap,o=(s,l)=>{const c=n.get(s);if(c?.[0]===l)return c[1];const u=Array.isArray(s)?[]:Object.create(Object.getPrototypeOf(s));return tv(u,!0),n.set(s,[l,u]),Reflect.ownKeys(s).forEach(d=>{const h=Reflect.get(s,d);kc.has(h)?(tv(h,!1),u[d]=h):Ei.has(h)?u[d]=b2(h):u[d]=h}),Object.freeze(u)},i=new WeakMap,a=[1,1],r=s=>{if(!Uh(s))throw new Error("object required");const l=i.get(s);if(l)return l;let c=a[0];const u=new Set,d=(E,P=++a[0])=>{c!==P&&(c=P,u.forEach(S=>S(E,P)))};let h=a[1];const p=(E=++a[1])=>(h!==E&&!u.size&&(h=E,f.forEach(([P])=>{const S=P[1](E);S>c&&(c=S)})),c),m=E=>(P,S)=>{const R=[...P];R[1]=[E,...R[1]],d(R,S)},f=new Map,b=(E,P)=>{if(u.size){const S=P[3](m(E));f.set(E,[P,S])}else f.set(E,[P])},v=E=>{var P;const S=f.get(E);S&&(f.delete(E),(P=S[1])==null||P.call(S))},y=E=>(u.add(E),u.size===1&&f.forEach(([P,S],R)=>{const B=P[3](m(R));f.set(R,[P,B])}),()=>{u.delete(E),u.size===0&&f.forEach(([P,S],R)=>{S&&(S(),f.set(R,[P]))})}),x=Array.isArray(s)?[]:Object.create(Object.getPrototypeOf(s)),_=t(x,{deleteProperty(E,P){const S=Reflect.get(E,P);v(P);const R=Reflect.deleteProperty(E,P);return R&&d(["delete",[P],S]),R},set(E,P,S,R){var B;const A=Reflect.has(E,P),G=Reflect.get(E,P,R);if(A&&(e(G,S)||i.has(S)&&e(G,i.get(S))))return!0;v(P),Uh(S)&&(S=c2(S)||S);let ee=S;if(!((B=Object.getOwnPropertyDescriptor(E,P))!=null&&B.set)){!Ei.has(S)&&nv(S)&&(ee=Hw(S));const z=!kc.has(ee)&&Ei.get(ee);z&&b(P,z)}return Reflect.set(E,P,ee,R),d(["set",[P],S,G]),!0}});i.set(s,_);const k=[x,p,o,y];return Ei.set(_,k),Reflect.ownKeys(s).forEach(E=>{const P=Object.getOwnPropertyDescriptor(s,E);P.get||P.set?Object.defineProperty(x,E,P):_[E]=s[E]}),_})=>[r,Ei,kc,e,t,nv,n,o,i,a],[m2]=g2();function Hw(e={}){return m2(e)}function v2(e,t,n){const o=Ei.get(e);let i;const a=[],r=o[3];let s=!1;const l=r(c=>{a.push(c),i||(i=Promise.resolve().then(()=>{i=void 0,s&&t(a.splice(0))}))});return s=!0,()=>{s=!1,l()}}function b2(e){const t=Ei.get(e),[n,o,i]=t;return i(n,o())}var y2=be("floating-panel").parts("trigger","positioner","content","header","body","title","resizeTrigger","dragTrigger","stageTrigger","closeTrigger","control");y2.build();var x2=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`float:${e.id}:trigger`},w2=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`float:${e.id}:positioner`},_2=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`float:${e.id}:content`},C2=e=>{var t;return((t=e.ids)==null?void 0:t.header)??`float:${e.id}:header`},ov=e=>e.getById(x2(e)),iv=e=>e.getById(w2(e)),av=e=>e.getById(_2(e)),k2=e=>e.getById(C2(e)),Fo=(e,t,n)=>{let o;return et(t)?o=gx(t):o=hT(e.getWin()),n&&(o=Zs({x:-o.width,y:o.minY,width:o.width*3,height:o.height*2})),Uo(o,["x","y","width","height"])},Sr=Hw({stack:[],count(){return this.stack.length},add(e){this.stack.includes(e)||this.stack.push(e)},remove(e){const t=this.stack.indexOf(e);t<0||this.stack.splice(t,1)},bringToFront(e){this.remove(e),this.add(e)},isTopmost(e){return this.stack[this.stack.length-1]===e},indexOf(e){return this.stack.indexOf(e)}}),{not:rv,and:S2}=Ct(),$2={minimize:"Minimize window",maximize:"Maximize window",restore:"Restore window"};rv("isMaximized"),rv("isMinimized"),S2("isOpenControlled","closeOnEsc");ie()(["allowOverflow","closeOnEscape","defaultOpen","defaultPosition","defaultSize","dir","disabled","draggable","getAnchorPosition","getBoundaryEl","getRootNode","gridSize","id","ids","lockAspectRatio","maxSize","minSize","onOpenChange","onPositionChange","onPositionChangeEnd","onSizeChange","onSizeChangeEnd","onStageChange","open","persistRect","position","resizable","size","strategy","translations"]);ie()(["axis"]);var E2=be("hoverCard").parts("arrow","arrowTip","trigger","positioner","content");E2.build();var T2=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`hover-card:${e.id}:trigger`},O2=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`hover-card:${e.id}:content`},I2=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`hover-card:${e.id}:popper`},Dd=e=>e.getById(T2(e)),P2=e=>e.getById(O2(e)),sv=e=>e.getById(I2(e)),{not:Al,and:lv}=Ct();lv("isOpenControlled",Al("isPointer")),Al("isPointer"),lv("isOpenControlled",Al("isPointer")),Al("isPointer");ie()(["closeDelay","dir","getRootNode","id","ids","disabled","onOpenChange","defaultOpen","open","openDelay","positioning","onInteractOutside","onPointerDownOutside","onFocusOutside"]);var A2={Int8Array:"int8array",Uint8Array:"uint8array",Uint8ClampedArray:"uint8clampedarray",Int16Array:"int16array",Uint16Array:"uint16array",Int32Array:"int32array",Uint32Array:"uint32array",Float32Array:"float32array",Float64Array:"float64array",BigInt64Array:"bigint64array",BigUint64Array:"biguint64array"};Object.fromEntries(Object.entries(A2).map(([e,t])=>[t,e]));const[jw,kt]=Re("TreeViewContext"),[R2,Sn]=Re("TreeViewNodePropsContext"),D2=O({__name:"tree-view-branch-content",props:{asChild:{type:Boolean}},setup(e){const t=lx(),n=kt(),o=Sn(),i=I(()=>{const a=n.value.getBranchContentProps(o),[,r]=t(a,["hidden","data-state"]);return r});return Y(),(a,r)=>(w(),$(g(Lu).Content,U(i.value,{"as-child":e.asChild}),{default:C(()=>[V(a.$slots,"default")]),_:3},16,["as-child"]))}}),V2=O({__name:"tree-view-branch-control",props:{asChild:{type:Boolean}},setup(e){const t=kt(),n=Sn();return Y(),(o,i)=>(w(),$(g(X).div,U(g(t).getBranchControlProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),M2=O({__name:"tree-view-branch-indent-guide",props:{asChild:{type:Boolean}},setup(e){const t=kt(),n=Sn();return Y(),(o,i)=>(w(),$(g(X).div,U(g(t).getBranchIndentGuideProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),N2=O({__name:"tree-view-branch-indicator",props:{asChild:{type:Boolean}},setup(e){const t=kt(),n=Sn();return Y(),(o,i)=>(w(),$(g(X).div,U(g(t).getBranchIndicatorProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),L2=O({__name:"tree-view-branch-text",props:{asChild:{type:Boolean}},setup(e){const t=kt(),n=Sn();return Y(),(o,i)=>(w(),$(g(X).span,U(g(t).getBranchTextProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),F2=O({__name:"tree-view-branch-trigger",props:{asChild:{type:Boolean}},setup(e){const t=kt(),n=Sn();return Y(),(o,i)=>(w(),$(g(X).div,U(g(t).getBranchTriggerProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),[B2,Of]=Re("TreeViewNodeContext"),z2=O({__name:"tree-view-branch",props:{asChild:{type:Boolean}},setup(e){const t=kt(),n=Sn(),o=Of(),i=Ys(),a=I(()=>t.value.getBranchContentProps(n));return Y(),(r,s)=>(w(),$(g(Lu).Root,U({open:g(o).expanded,ids:{content:a.value.id}},g(t).getBranchProps(g(n)),{"lazy-mount":g(i).lazyMount,"unmount-on-exit":g(i).unmountOnExit,"as-child":e.asChild}),{default:C(()=>[V(r.$slots,"default")]),_:3},16,["open","ids","lazy-mount","unmount-on-exit","as-child"]))}}),H2=O({__name:"tree-view-context",setup(e){const t=kt();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),j2=O({__name:"tree-view-item-indicator",props:{asChild:{type:Boolean}},setup(e){const t=kt(),n=Sn();return Y(),(o,i)=>(w(),$(g(X).div,U(g(t).getItemIndicatorProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),W2=O({__name:"tree-view-item-text",props:{asChild:{type:Boolean}},setup(e){const t=kt(),n=Sn();return Y(),(o,i)=>(w(),$(g(X).span,U(g(t).getItemTextProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),U2=O({__name:"tree-view-item",props:{asChild:{type:Boolean}},setup(e){const t=kt(),n=Sn();return Y(),(o,i)=>(w(),$(g(X).div,U(g(t).getItemProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),G2=O({__name:"tree-view-label",props:{asChild:{type:Boolean}},setup(e){const t=kt();return Y(),(n,o)=>(w(),$(g(X).h3,U(g(t).getLabelProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),q2=O({__name:"tree-view-node-checkbox",props:{asChild:{type:Boolean}},setup(e){const t=kt(),n=Sn();return Y(),(o,i)=>(w(),$(g(X).span,U(g(t).getNodeCheckboxProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),Y2=O({__name:"tree-view-node-checkbox-indicator",props:{indeterminate:{},fallback:{}},setup(e){const t=Of();return(n,o)=>g(t).checked==="indeterminate"?V(n.$slots,"indeterminate",{key:0}):g(t).checked===!0?V(n.$slots,"default",{key:1}):V(n.$slots,"fallback",{key:2})}}),K2=O({__name:"tree-view-node-rename-input",props:{asChild:{type:Boolean}},setup(e){const t=kt(),n=Sn();return Y(),(o,i)=>(w(),$(g(X).input,U(g(t).getNodeRenameInputProps(g(n)),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}}),X2=O({__name:"tree-view-node-context",setup(e){const t=Of();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),Ww=O({__name:"tree-view-node-provider",props:{node:{},indexPath:{}},setup(e){const t=e,n=kt(),o=I(()=>n.value.getNodeState(t));return B2(o),R2(t),Y(),(i,a)=>V(i.$slots,"default")}}),Z2=O({__name:"tree-view-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return jw(n),io(I(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),Y(),(o,i)=>(w(),$(g(X).div,U(n.value.getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}});var Uw=be("tree-view").parts("branch","branchContent","branchControl","branchIndentGuide","branchIndicator","branchText","branchTrigger","item","itemIndicator","itemText","label","nodeCheckbox","nodeRenameInput","root","tree"),Tt=Uw.build(),Gw=e=>new af(e);Gw.empty=()=>new af({rootNode:{children:[]}});var J2=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`tree:${e.id}:root`},cv=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`tree:${e.id}:label`},qw=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.node)==null?void 0:o.call(n,t))??`tree:${e.id}:node:${t}`},Vd=e=>{var t;return((t=e.ids)==null?void 0:t.tree)??`tree:${e.id}:tree`},Pn=(e,t)=>{var n;t!=null&&((n=e.getById(qw(e,t)))==null||n.focus())},Yw=(e,t)=>`tree:${e.id}:rename-input:${t}`,uv=(e,t)=>e.getById(Yw(e,t));function Kw(e,t,n){const o=e.getNodeValue(t);if(!e.isBranchNode(t))return n.includes(o);const i=e.getDescendantValues(o),a=i.every(s=>n.includes(s)),r=i.some(s=>n.includes(s));return a?!0:r?"indeterminate":!1}function Q2(e,t,n){const o=e.getDescendantValues(t),i=o.every(a=>n.includes(a));return Dn(i?Ni(n,...o):wo(n,...o))}function eV(e,t){const n=new Map;return e.visit({onEnter:o=>{const i=e.getNodeValue(o),a=e.isBranchNode(o),r=Kw(e,o,t);n.set(i,{type:a?"branch":"leaf",checked:r})}}),n}function tV(e,t){const{context:n,scope:o,computed:i,prop:a,send:r}=e,s=a("collection"),l=Array.from(n.get("expandedValue")),c=Array.from(n.get("selectedValue")),u=Array.from(n.get("checkedValue")),d=i("isTypingAhead"),h=n.get("focusedValue"),p=n.get("loadingStatus"),m=n.get("renamingValue");function f(b){const{node:v,indexPath:y}=b,x=s.getNodeValue(v),_=s.getFirstNode(),k=_?s.getNodeValue(_):null;return{id:qw(o,x),value:x,indexPath:y,valuePath:s.getValuePath(y),disabled:!!v.disabled,focused:h==null?k==x:h===x,selected:c.includes(x),expanded:l.includes(x),loading:p[x]==="loading",depth:y.length,isBranch:s.isBranchNode(v),renaming:m===x,get checked(){return Kw(s,v,u)}}}return{collection:s,expandedValue:l,selectedValue:c,checkedValue:u,toggleChecked(b,v){r({type:"CHECKED.TOGGLE",value:b,isBranch:v})},setChecked(b){r({type:"CHECKED.SET",value:b})},clearChecked(){r({type:"CHECKED.CLEAR"})},getCheckedMap(){return eV(s,u)},expand(b){r({type:b?"BRANCH.EXPAND":"EXPANDED.ALL",value:b})},collapse(b){r({type:b?"BRANCH.COLLAPSE":"EXPANDED.CLEAR",value:b})},deselect(b){r({type:b?"NODE.DESELECT":"SELECTED.CLEAR",value:b})},select(b){r({type:b?"NODE.SELECT":"SELECTED.ALL",value:b,isTrusted:!1})},getVisibleNodes(){return i("visibleNodes").map(({node:b})=>b)},focus(b){Pn(o,b)},selectParent(b){const v=s.getParentNode(b);if(!v)return;const y=wo(c,s.getNodeValue(v));r({type:"SELECTED.SET",value:y,src:"select.parent"})},expandParent(b){const v=s.getParentNode(b);if(!v)return;const y=wo(l,s.getNodeValue(v));r({type:"EXPANDED.SET",value:y,src:"expand.parent"})},setExpandedValue(b){const v=Dn(b);r({type:"EXPANDED.SET",value:v})},setSelectedValue(b){const v=Dn(b);r({type:"SELECTED.SET",value:v})},startRenaming(b){r({type:"NODE.RENAME",value:b})},submitRenaming(b,v){r({type:"RENAME.SUBMIT",value:b,label:v})},cancelRenaming(){r({type:"RENAME.CANCEL"})},getRootProps(){return t.element({...Tt.root.attrs,id:J2(o),dir:a("dir")})},getLabelProps(){return t.element({...Tt.label.attrs,id:cv(o),dir:a("dir")})},getTreeProps(){return t.element({...Tt.tree.attrs,id:Vd(o),dir:a("dir"),role:"tree","aria-label":"Tree View","aria-labelledby":cv(o),"aria-multiselectable":a("selectionMode")==="multiple"||void 0,tabIndex:-1,onKeyDown(b){if(b.defaultPrevented||ks(b))return;const v=je(b);if($u(v))return;const y=v?.closest("[data-part=branch-control], [data-part=item]");if(!y)return;const x=y.dataset.value;if(x==null){console.warn("[zag-js/tree-view] Node id not found for node",y);return}const _=y.matches("[data-part=branch-control]"),k={ArrowDown(S){qn(S)||(S.preventDefault(),r({type:"NODE.ARROW_DOWN",id:x,shiftKey:S.shiftKey}))},ArrowUp(S){qn(S)||(S.preventDefault(),r({type:"NODE.ARROW_UP",id:x,shiftKey:S.shiftKey}))},ArrowLeft(S){qn(S)||y.dataset.disabled||(S.preventDefault(),r({type:_?"BRANCH_NODE.ARROW_LEFT":"NODE.ARROW_LEFT",id:x}))},ArrowRight(S){!_||y.dataset.disabled||(S.preventDefault(),r({type:"BRANCH_NODE.ARROW_RIGHT",id:x}))},Home(S){qn(S)||(S.preventDefault(),r({type:"NODE.HOME",id:x,shiftKey:S.shiftKey}))},End(S){qn(S)||(S.preventDefault(),r({type:"NODE.END",id:x,shiftKey:S.shiftKey}))},Space(S){var R;y.dataset.disabled||(d?r({type:"TREE.TYPEAHEAD",key:S.key}):(R=k.Enter)==null||R.call(k,S))},Enter(S){y.dataset.disabled||ya(v)&&qn(S)||(r({type:_?"BRANCH_NODE.CLICK":"NODE.CLICK",id:x,src:"keyboard"}),ya(v)||S.preventDefault())},"*"(S){y.dataset.disabled||(S.preventDefault(),r({type:"SIBLINGS.EXPAND",id:x}))},a(S){!S.metaKey||y.dataset.disabled||(S.preventDefault(),r({type:"SELECTED.ALL",moveFocus:!0}))},F2(S){if(y.dataset.disabled)return;const R=a("canRename");if(!R)return;const B=s.getIndexPath(x);if(B){const A=s.at(B);if(A&&!R(A,B))return}S.preventDefault(),r({type:"NODE.RENAME",value:x})}},E=Ss(b,{dir:a("dir")}),P=k[E];if(P){P(b);return}Io.isValidEvent(b)&&(r({type:"TREE.TYPEAHEAD",key:b.key,id:x}),b.preventDefault())}})},getNodeState:f,getItemProps(b){const v=f(b);return t.element({...Tt.item.attrs,id:v.id,dir:a("dir"),"data-ownedby":Vd(o),"data-path":b.indexPath.join("/"),"data-value":v.value,tabIndex:v.focused?0:-1,"data-focus":D(v.focused),role:"treeitem","aria-current":v.selected?"true":void 0,"aria-selected":v.disabled?void 0:v.selected,"data-selected":D(v.selected),"aria-disabled":Je(v.disabled),"data-disabled":D(v.disabled),"data-renaming":D(v.renaming),"aria-level":v.depth,"data-depth":v.depth,style:{"--depth":v.depth},onFocus(y){y.stopPropagation(),r({type:"NODE.FOCUS",id:v.value})},onClick(y){if(v.disabled||!Mi(y)||ya(y.currentTarget)&&qn(y))return;const x=y.metaKey||y.ctrlKey;r({type:"NODE.CLICK",id:v.value,shiftKey:y.shiftKey,ctrlKey:x}),y.stopPropagation(),ya(y.currentTarget)||y.preventDefault()}})},getItemTextProps(b){const v=f(b);return t.element({...Tt.itemText.attrs,"data-disabled":D(v.disabled),"data-selected":D(v.selected),"data-focus":D(v.focused)})},getItemIndicatorProps(b){const v=f(b);return t.element({...Tt.itemIndicator.attrs,"aria-hidden":!0,"data-disabled":D(v.disabled),"data-selected":D(v.selected),"data-focus":D(v.focused),hidden:!v.selected})},getBranchProps(b){const v=f(b);return t.element({...Tt.branch.attrs,"data-depth":v.depth,dir:a("dir"),"data-branch":v.value,role:"treeitem","data-ownedby":Vd(o),"data-value":v.value,"aria-level":v.depth,"aria-selected":v.disabled?void 0:v.selected,"data-path":b.indexPath.join("/"),"data-selected":D(v.selected),"aria-expanded":v.expanded,"data-state":v.expanded?"open":"closed","aria-disabled":Je(v.disabled),"data-disabled":D(v.disabled),"data-loading":D(v.loading),"aria-busy":Je(v.loading),style:{"--depth":v.depth}})},getBranchIndicatorProps(b){const v=f(b);return t.element({...Tt.branchIndicator.attrs,"aria-hidden":!0,"data-state":v.expanded?"open":"closed","data-disabled":D(v.disabled),"data-selected":D(v.selected),"data-focus":D(v.focused),"data-loading":D(v.loading)})},getBranchTriggerProps(b){const v=f(b);return t.element({...Tt.branchTrigger.attrs,role:"button",dir:a("dir"),"data-disabled":D(v.disabled),"data-state":v.expanded?"open":"closed","data-value":v.value,"data-loading":D(v.loading),disabled:v.loading,onClick(y){v.disabled||v.loading||(r({type:"BRANCH_TOGGLE.CLICK",id:v.value}),y.stopPropagation())}})},getBranchControlProps(b){const v=f(b);return t.element({...Tt.branchControl.attrs,role:"button",id:v.id,dir:a("dir"),tabIndex:v.focused?0:-1,"data-path":b.indexPath.join("/"),"data-state":v.expanded?"open":"closed","data-disabled":D(v.disabled),"data-selected":D(v.selected),"data-focus":D(v.focused),"data-renaming":D(v.renaming),"data-value":v.value,"data-depth":v.depth,"data-loading":D(v.loading),"aria-busy":Je(v.loading),onFocus(y){r({type:"NODE.FOCUS",id:v.value}),y.stopPropagation()},onClick(y){if(v.disabled||v.loading||!Mi(y)||ya(y.currentTarget)&&qn(y))return;const x=y.metaKey||y.ctrlKey;r({type:"BRANCH_NODE.CLICK",id:v.value,shiftKey:y.shiftKey,ctrlKey:x}),y.stopPropagation()}})},getBranchTextProps(b){const v=f(b);return t.element({...Tt.branchText.attrs,dir:a("dir"),"data-disabled":D(v.disabled),"data-state":v.expanded?"open":"closed","data-loading":D(v.loading)})},getBranchContentProps(b){const v=f(b);return t.element({...Tt.branchContent.attrs,role:"group",dir:a("dir"),"data-state":v.expanded?"open":"closed","data-depth":v.depth,"data-path":b.indexPath.join("/"),"data-value":v.value,hidden:!v.expanded})},getBranchIndentGuideProps(b){const v=f(b);return t.element({...Tt.branchIndentGuide.attrs,"data-depth":v.depth})},getNodeCheckboxProps(b){const v=f(b),y=v.checked;return t.element({...Tt.nodeCheckbox.attrs,tabIndex:-1,role:"checkbox","data-state":y===!0?"checked":y===!1?"unchecked":"indeterminate","aria-checked":y===!0?"true":y===!1?"false":"mixed","data-disabled":D(v.disabled),onClick(x){if(x.defaultPrevented||v.disabled||!Mi(x))return;r({type:"CHECKED.TOGGLE",value:v.value,isBranch:v.isBranch}),x.stopPropagation();const _=x.currentTarget.closest("[role=treeitem]");_?.focus({preventScroll:!0})}})},getNodeRenameInputProps(b){const v=f(b);return t.input({...Tt.nodeRenameInput.attrs,id:Yw(o,v.value),type:"text","aria-label":"Rename tree item",hidden:!v.renaming,onKeyDown(y){ks(y)||(y.key==="Escape"&&(r({type:"RENAME.CANCEL"}),y.preventDefault()),y.key==="Enter"&&(r({type:"RENAME.SUBMIT",label:y.currentTarget.value}),y.preventDefault()),y.stopPropagation())},onBlur(y){r({type:"RENAME.SUBMIT",label:y.currentTarget.value})}})}}}function Rl(e,t){const{context:n,prop:o,refs:i}=e;if(!o("loadChildren")){n.set("expandedValue",f=>Dn(wo(f,...t)));return}const a=n.get("loadingStatus"),[r,s]=Ng(t,f=>a[f]==="loaded");if(r.length>0&&n.set("expandedValue",f=>Dn(wo(f,...r))),s.length===0)return;const l=o("collection"),[c,u]=Ng(s,f=>{const b=l.findNode(f);return l.getNodeChildren(b).length>0});if(c.length>0&&n.set("expandedValue",f=>Dn(wo(f,...c))),u.length===0)return;n.set("loadingStatus",f=>({...f,...u.reduce((b,v)=>({...b,[v]:"loading"}),{})}));const d=u.map(f=>{const b=l.getIndexPath(f),v=l.getValuePath(b),y=l.findNode(f);return{id:f,indexPath:b,valuePath:v,node:y}}),h=i.get("pendingAborts"),p=o("loadChildren");Kp(p,()=>"[zag-js/tree-view] `loadChildren` is required for async expansion");const m=d.map(({id:f,indexPath:b,valuePath:v,node:y})=>{const x=h.get(f);x&&(x.abort(),h.delete(f));const _=new AbortController;return h.set(f,_),p({valuePath:v,indexPath:b,node:y,signal:_.signal})});Promise.allSettled(m).then(f=>{var b,v;const y=[],x=[],_=n.get("loadingStatus");let k=o("collection");f.forEach((E,P)=>{const{id:S,indexPath:R,node:B,valuePath:A}=d[P];E.status==="fulfilled"?(_[S]="loaded",y.push(S),k=k.replace(R,{...B,children:E.value})):(h.delete(S),Reflect.deleteProperty(_,S),x.push({node:B,error:E.reason,indexPath:R,valuePath:A}))}),n.set("loadingStatus",_),y.length&&(n.set("expandedValue",E=>Dn(wo(E,...y))),(b=o("onLoadChildrenComplete"))==null||b({collection:k})),x.length&&((v=o("onLoadChildrenError"))==null||v({nodes:x}))})}function Bo(e){const{prop:t,context:n}=e;return function({indexPath:o}){return t("collection").getValuePath(o).slice(0,-1).some(i=>!n.get("expandedValue").includes(i))}}var{and:Hn}=Ct(),nV={props({props:e}){return{selectionMode:"single",collection:Gw.empty(),typeahead:!0,expandOnClick:!0,defaultExpandedValue:[],defaultSelectedValue:[],...e}},initialState(){return"idle"},context({prop:e,bindable:t,getContext:n}){return{expandedValue:t(()=>({defaultValue:e("defaultExpandedValue"),value:e("expandedValue"),isEqual:bt,onChange(o){var i;const a=n().get("focusedValue");(i=e("onExpandedChange"))==null||i({expandedValue:o,focusedValue:a,get expandedNodes(){return e("collection").findNodes(o)}})}})),selectedValue:t(()=>({defaultValue:e("defaultSelectedValue"),value:e("selectedValue"),isEqual:bt,onChange(o){var i;const a=n().get("focusedValue");(i=e("onSelectionChange"))==null||i({selectedValue:o,focusedValue:a,get selectedNodes(){return e("collection").findNodes(o)}})}})),focusedValue:t(()=>({defaultValue:e("defaultFocusedValue")||null,value:e("focusedValue"),onChange(o){var i;(i=e("onFocusChange"))==null||i({focusedValue:o,get focusedNode(){return o?e("collection").findNode(o):null}})}})),loadingStatus:t(()=>({defaultValue:{}})),checkedValue:t(()=>({defaultValue:e("defaultCheckedValue")||[],value:e("checkedValue"),isEqual:bt,onChange(o){var i;(i=e("onCheckedChange"))==null||i({checkedValue:o})}})),renamingValue:t(()=>({sync:!0,defaultValue:null}))}},refs(){return{typeaheadState:{...Io.defaultOptions},pendingAborts:new Map}},computed:{isMultipleSelection:({prop:e})=>e("selectionMode")==="multiple",isTypingAhead:({refs:e})=>e.get("typeaheadState").keysSoFar.length>0,visibleNodes:({prop:e,context:t})=>{const n=[];return e("collection").visit({skip:Bo({prop:e,context:t}),onEnter:(o,i)=>{n.push({node:o,indexPath:i})}}),n}},on:{"EXPANDED.SET":{actions:["setExpanded"]},"EXPANDED.CLEAR":{actions:["clearExpanded"]},"EXPANDED.ALL":{actions:["expandAllBranches"]},"BRANCH.EXPAND":{actions:["expandBranches"]},"BRANCH.COLLAPSE":{actions:["collapseBranches"]},"SELECTED.SET":{actions:["setSelected"]},"SELECTED.ALL":[{guard:Hn("isMultipleSelection","moveFocus"),actions:["selectAllNodes","focusTreeLastNode"]},{guard:"isMultipleSelection",actions:["selectAllNodes"]}],"SELECTED.CLEAR":{actions:["clearSelected"]},"NODE.SELECT":{actions:["selectNode"]},"NODE.DESELECT":{actions:["deselectNode"]},"CHECKED.TOGGLE":{actions:["toggleChecked"]},"CHECKED.SET":{actions:["setChecked"]},"CHECKED.CLEAR":{actions:["clearChecked"]},"NODE.FOCUS":{actions:["setFocusedNode"]},"NODE.ARROW_DOWN":[{guard:Hn("isShiftKey","isMultipleSelection"),actions:["focusTreeNextNode","extendSelectionToNextNode"]},{actions:["focusTreeNextNode"]}],"NODE.ARROW_UP":[{guard:Hn("isShiftKey","isMultipleSelection"),actions:["focusTreePrevNode","extendSelectionToPrevNode"]},{actions:["focusTreePrevNode"]}],"NODE.ARROW_LEFT":{actions:["focusBranchNode"]},"BRANCH_NODE.ARROW_LEFT":[{guard:"isBranchExpanded",actions:["collapseBranch"]},{actions:["focusBranchNode"]}],"BRANCH_NODE.ARROW_RIGHT":[{guard:Hn("isBranchFocused","isBranchExpanded"),actions:["focusBranchFirstNode"]},{actions:["expandBranch"]}],"SIBLINGS.EXPAND":{actions:["expandSiblingBranches"]},"NODE.HOME":[{guard:Hn("isShiftKey","isMultipleSelection"),actions:["extendSelectionToFirstNode","focusTreeFirstNode"]},{actions:["focusTreeFirstNode"]}],"NODE.END":[{guard:Hn("isShiftKey","isMultipleSelection"),actions:["extendSelectionToLastNode","focusTreeLastNode"]},{actions:["focusTreeLastNode"]}],"NODE.CLICK":[{guard:Hn("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:Hn("isShiftKey","isMultipleSelection"),actions:["extendSelectionToNode"]},{actions:["selectNode"]}],"BRANCH_NODE.CLICK":[{guard:Hn("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:Hn("isShiftKey","isMultipleSelection"),actions:["extendSelectionToNode"]},{guard:"expandOnClick",actions:["selectNode","toggleBranchNode"]},{actions:["selectNode"]}],"BRANCH_TOGGLE.CLICK":{actions:["toggleBranchNode"]},"TREE.TYPEAHEAD":{actions:["focusMatchedNode"]}},exit:["clearPendingAborts"],states:{idle:{on:{"NODE.RENAME":{target:"renaming",actions:["setRenamingValue"]}}},renaming:{entry:["syncRenameInput","focusRenameInput"],on:{"RENAME.SUBMIT":{guard:"isRenameLabelValid",target:"idle",actions:["submitRenaming"]},"RENAME.CANCEL":{target:"idle",actions:["cancelRenaming"]}}}},implementations:{guards:{isBranchFocused:({context:e,event:t})=>e.get("focusedValue")===t.id,isBranchExpanded:({context:e,event:t})=>e.get("expandedValue").includes(t.id),isShiftKey:({event:e})=>e.shiftKey,isCtrlKey:({event:e})=>e.ctrlKey,hasSelectedItems:({context:e})=>e.get("selectedValue").length>0,isMultipleSelection:({prop:e})=>e("selectionMode")==="multiple",moveFocus:({event:e})=>!!e.moveFocus,expandOnClick:({prop:e})=>!!e("expandOnClick"),isRenameLabelValid:({event:e})=>e.label.trim()!==""},actions:{selectNode({context:e,event:t}){const n=t.id||t.value;e.set("selectedValue",o=>n==null?o:!t.isTrusted&&Ia(n)?o.concat(...n):[Ia(n)?Us(n):n].filter(Boolean))},deselectNode({context:e,event:t}){const n=hc(t.id||t.value);e.set("selectedValue",o=>Ni(o,...n))},setFocusedNode({context:e,event:t}){e.set("focusedValue",t.id)},clearFocusedNode({context:e}){e.set("focusedValue",null)},clearSelectedItem({context:e}){e.set("selectedValue",[])},toggleBranchNode({context:e,event:t,action:n}){const o=e.get("expandedValue").includes(t.id);n(o?["collapseBranch"]:["expandBranch"])},expandBranch(e){const{event:t}=e;Rl(e,[t.id])},expandBranches(e){const{context:t,event:n}=e,o=hc(n.value);Rl(e,yd(o,t.get("expandedValue")))},collapseBranch({context:e,event:t}){e.set("expandedValue",n=>Ni(n,t.id))},collapseBranches(e){const{context:t,event:n}=e,o=hc(n.value);t.set("expandedValue",i=>Ni(i,...o))},setExpanded({context:e,event:t}){Ia(t.value)&&e.set("expandedValue",t.value)},clearExpanded({context:e}){e.set("expandedValue",[])},setSelected({context:e,event:t}){Ia(t.value)&&e.set("selectedValue",t.value)},clearSelected({context:e}){e.set("selectedValue",[])},focusTreeFirstNode({prop:e,scope:t}){const n=e("collection"),o=n.getFirstNode(),i=n.getNodeValue(o);Pn(t,i)},focusTreeLastNode(e){const{prop:t,scope:n}=e,o=t("collection"),i=o.getLastNode(void 0,{skip:Bo(e)}),a=o.getNodeValue(i);Pn(n,a)},focusBranchFirstNode({event:e,prop:t,scope:n}){const o=t("collection"),i=o.findNode(e.id),a=o.getFirstNode(i),r=o.getNodeValue(a);Pn(n,r)},focusTreeNextNode(e){const{event:t,prop:n,scope:o}=e,i=n("collection"),a=i.getNextNode(t.id,{skip:Bo(e)});if(!a)return;const r=i.getNodeValue(a);Pn(o,r)},focusTreePrevNode(e){const{event:t,prop:n,scope:o}=e,i=n("collection"),a=i.getPreviousNode(t.id,{skip:Bo(e)});if(!a)return;const r=i.getNodeValue(a);Pn(o,r)},focusBranchNode({event:e,prop:t,scope:n}){const o=t("collection"),i=o.getParentNode(e.id),a=i?o.getNodeValue(i):void 0;Pn(n,a)},selectAllNodes({context:e,prop:t}){e.set("selectedValue",t("collection").getValues())},focusMatchedNode(e){const{context:t,prop:n,refs:o,event:i,scope:a,computed:r}=e,s=r("visibleNodes").map(({node:c})=>({textContent:n("collection").stringifyNode(c),id:n("collection").getNodeValue(c)})),l=Io(s,{state:o.get("typeaheadState"),activeId:t.get("focusedValue"),key:i.key});Pn(a,l?.id)},toggleNodeSelection({context:e,event:t}){const n=zi(e.get("selectedValue"),t.id);e.set("selectedValue",n)},expandAllBranches(e){const{context:t,prop:n}=e,o=n("collection").getBranchValues(),i=yd(o,t.get("expandedValue"));Rl(e,i)},expandSiblingBranches(e){const{context:t,event:n,prop:o}=e,i=o("collection"),a=i.getIndexPath(n.id);if(!a)return;const r=i.getSiblingNodes(a).map(l=>i.getNodeValue(l)),s=yd(r,t.get("expandedValue"));Rl(e,s)},extendSelectionToNode(e){const{context:t,event:n,prop:o,computed:i}=e,a=o("collection"),r=Va(t.get("selectedValue"))||a.getNodeValue(a.getFirstNode()),s=n.id;let l=[r,s],c=0;i("visibleNodes").forEach(({node:u})=>{const d=a.getNodeValue(u);c===1&&l.push(d),(d===r||d===s)&&c++}),t.set("selectedValue",Dn(l))},extendSelectionToNextNode(e){const{context:t,event:n,prop:o}=e,i=o("collection"),a=i.getNextNode(n.id,{skip:Bo(e)});if(!a)return;const r=new Set(t.get("selectedValue")),s=i.getNodeValue(a);s!=null&&(r.has(n.id)&&r.has(s)?r.delete(n.id):r.has(s)||r.add(s),t.set("selectedValue",Array.from(r)))},extendSelectionToPrevNode(e){const{context:t,event:n,prop:o}=e,i=o("collection"),a=i.getPreviousNode(n.id,{skip:Bo(e)});if(!a)return;const r=new Set(t.get("selectedValue")),s=i.getNodeValue(a);s!=null&&(r.has(n.id)&&r.has(s)?r.delete(n.id):r.has(s)||r.add(s),t.set("selectedValue",Array.from(r)))},extendSelectionToFirstNode(e){const{context:t,prop:n}=e,o=n("collection"),i=Va(t.get("selectedValue")),a=[];o.visit({skip:Bo(e),onEnter:r=>{const s=o.getNodeValue(r);if(a.push(s),s===i)return"stop"}}),t.set("selectedValue",a)},extendSelectionToLastNode(e){const{context:t,prop:n}=e,o=n("collection"),i=Va(t.get("selectedValue")),a=[];let r=!1;o.visit({skip:Bo(e),onEnter:s=>{const l=o.getNodeValue(s);l===i&&(r=!0),r&&a.push(l)}}),t.set("selectedValue",a)},clearPendingAborts({refs:e}){const t=e.get("pendingAborts");t.forEach(n=>n.abort()),t.clear()},toggleChecked({context:e,event:t,prop:n}){const o=n("collection");e.set("checkedValue",i=>t.isBranch?Q2(o,t.value,i):zi(i,t.value))},setChecked({context:e,event:t}){e.set("checkedValue",t.value)},clearChecked({context:e}){e.set("checkedValue",[])},setRenamingValue({context:e,event:t,prop:n}){e.set("renamingValue",t.value);const o=n("onRenameStart");if(o){const i=n("collection"),a=i.getIndexPath(t.value);if(a){const r=i.at(a);r&&o({value:t.value,node:r,indexPath:a})}}},submitRenaming({context:e,event:t,prop:n,scope:o}){var i;const a=e.get("renamingValue");if(!a)return;const r=n("collection").getIndexPath(a);if(!r)return;const s=t.label.trim(),l=n("onBeforeRename");if(l&&!l({value:a,label:s,indexPath:r})){e.set("renamingValue",null),Pn(o,a);return}(i=n("onRenameComplete"))==null||i({value:a,label:s,indexPath:r}),e.set("renamingValue",null),Pn(o,a)},cancelRenaming({context:e,scope:t}){const n=e.get("renamingValue");e.set("renamingValue",null),n&&Pn(t,n)},syncRenameInput({context:e,scope:t,prop:n}){const o=e.get("renamingValue");if(!o)return;const i=n("collection"),a=i.findNode(o);if(!a)return;const r=i.stringifyNode(a),s=uv(t,o);Rn(s,r)},focusRenameInput({context:e,scope:t}){const n=e.get("renamingValue");if(!n)return;const o=uv(t,n);o&&(o.focus(),o.select())}}}};ie()(["ids","collection","dir","expandedValue","expandOnClick","defaultFocusedValue","focusedValue","getRootNode","id","onExpandedChange","onFocusChange","onSelectionChange","checkedValue","selectedValue","selectionMode","typeahead","defaultExpandedValue","defaultSelectedValue","defaultCheckedValue","onCheckedChange","onLoadChildrenComplete","onLoadChildrenError","loadChildren","canRename","onRenameStart","onBeforeRename","onRenameComplete"]);ie()(["node","indexPath"]);const Xw=(e,t)=>{const n=Ut(),o=sn(ln),i=kn(Cn),a=I(()=>{const s=Ye(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,...Fn(s),onFocusChange:l=>{var c;t?.("focusChange",l),t?.("update:focusedValue",l.focusedValue),(c=s.onFocusChange)==null||c.call(s,l)},onExpandedChange:l=>{var c;t?.("expandedChange",l),t?.("update:expandedValue",l.expandedValue),(c=s.onExpandedChange)==null||c.call(s,l)},onSelectionChange:l=>{var c;t?.("selectionChange",l),t?.("update:selectedValue",l.selectedValue),(c=s.onSelectionChange)==null||c.call(s,l)},onCheckedChange:l=>{var c;t?.("checkedChange",l),t?.("update:checkedValue",l.checkedValue),(c=s.onCheckedChange)==null||c.call(s,l)},onLoadChildrenComplete:l=>{var c;t?.("loadChildrenComplete",l),(c=s.onLoadChildrenComplete)==null||c.call(s,l)},onLoadChildrenError:l=>{var c;t?.("loadChildrenError",l),(c=s.onLoadChildrenError)==null||c.call(s,l)},onRenameStart:l=>{var c;t?.("renameStart",l),(c=s.onRenameStart)==null||c.call(s,l)},onBeforeRename:l=>{var c;return t?.("beforeRename",l),((c=s.onBeforeRename)==null?void 0:c.call(s,l))??!0},onRenameComplete:l=>{var c;t?.("renameComplete",l),(c=s.onRenameComplete)==null||c.call(s,l)}}}),r=Gt(nV,a);return I(()=>tV(r,rn))},Zw=O({__name:"tree-view-root",props:_n({collection:{},defaultExpandedValue:{},defaultSelectedValue:{},defaultCheckedValue:{},defaultFocusedValue:{},checkedValue:{},expandOnClick:{type:Boolean},expandedValue:{},focusedValue:{},id:{},ids:{},selectedValue:{},selectionMode:{},typeahead:{type:Boolean},loadChildren:{type:Function},canRename:{type:Function},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{expandOnClick:void 0,typeahead:void 0,lazyMount:void 0,unmountOnExit:void 0,asChild:void 0}),emits:["expandedChange","focusChange","selectionChange","checkedChange","loadChildrenComplete","loadChildrenError","renameStart","beforeRename","renameComplete","update:expandedValue","update:focusedValue","update:selectedValue","update:checkedValue"],setup(e,{emit:t}){const n=e,o=Xw(n,t);return jw(o),io(I(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Y(),(i,a)=>(w(),$(g(X).div,U(g(o).getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(i.$slots,"default")]),_:3},16,["as-child"]))}}),Jw=O({__name:"tree-view-tree",props:{asChild:{type:Boolean}},setup(e){const t=kt();return Y(),(n,o)=>(w(),$(g(X).div,U(g(t).getTreeProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),Do=Object.freeze(Object.defineProperty({__proto__:null,Branch:z2,BranchContent:D2,BranchControl:V2,BranchIndentGuide:M2,BranchIndicator:N2,BranchText:L2,BranchTrigger:F2,Context:H2,Item:U2,ItemIndicator:j2,ItemText:W2,Label:G2,NodeCheckbox:q2,NodeCheckboxIndicator:Y2,NodeContext:X2,NodeProvider:Ww,NodeRenameInput:K2,Root:Zw,RootProvider:Z2,Tree:Jw},Symbol.toStringTag,{value:"Module"}));var Qw=be("listbox").parts("label","input","item","itemText","itemIndicator","itemGroup","itemGroupLabel","content","root","valueText");Qw.build();var e1=e=>new Ji(e);e1.empty=()=>new Ji({items:[]});var oV=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`select:${e.id}:content`},iV=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.item)==null?void 0:o.call(n,t))??`select:${e.id}:option:${t}`},dv=e=>e.getById(oV(e)),hv=(e,t)=>e.getById(iV(e,t)),{guards:aV,createMachine:rV}=Mu(),{or:sV}=aV;rV({props({props:e}){return{loopFocus:!1,composite:!0,defaultValue:[],multiple:!1,typeahead:!0,collection:e1.empty(),orientation:"vertical",selectionMode:"single",...e}},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:bt,onChange(n){var o;const i=e("collection").findMany(n);return(o=e("onValueChange"))==null?void 0:o({value:n,items:i})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),sync:!0,onChange(n){var o;(o=e("onHighlightChange"))==null||o({highlightedValue:n,highlightedItem:e("collection").find(n),highlightedIndex:e("collection").indexOf(n)})}})),highlightedItem:t(()=>({defaultValue:null})),selectedItems:t(()=>{const n=e("value")??e("defaultValue")??[];return{defaultValue:e("collection").findMany(n)}}),focused:t(()=>({sync:!0,defaultValue:!1}))}},refs(){return{typeahead:{...Io.defaultOptions},focusVisible:!1}},computed:{hasSelectedItems:({context:e})=>e.get("value").length>0,isTypingAhead:({refs:e})=>e.get("typeahead").keysSoFar!=="",isInteractive:({prop:e})=>!e("disabled"),selection:({context:e,prop:t})=>{const n=new EO(e.get("value"));return n.selectionMode=t("selectionMode"),n.deselectable=!!t("deselectable"),n},multiple:({prop:e})=>e("selectionMode")==="multiple"||e("selectionMode")==="extended",valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems"))},initialState(){return"idle"},watch({context:e,prop:t,track:n,action:o}){n([()=>e.get("value").toString()],()=>{o(["syncSelectedItems"])}),n([()=>e.get("highlightedValue")],()=>{o(["syncHighlightedItem"])}),n([()=>t("collection").toString()],()=>{o(["syncHighlightedValue"])})},effects:["trackFocusVisible"],on:{"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedItem"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setSelectedItems"]},"VALUE.CLEAR":{actions:["clearSelectedItems"]}},states:{idle:{effects:["scrollToHighlightedItem"],on:{"INPUT.FOCUS":{actions:["setFocused"]},"CONTENT.FOCUS":[{guard:sV("hasSelectedValue","hasHighlightedValue"),actions:["setFocused"]},{actions:["setFocused","setDefaultHighlightedValue"]}],"CONTENT.BLUR":{actions:["clearFocused"]},"ITEM.CLICK":{actions:["setHighlightedItem","selectHighlightedItem"]},"CONTENT.TYPEAHEAD":{actions:["setFocused","highlightMatchingItem"]},"ITEM.POINTER_MOVE":{actions:["highlightItem"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedItem"]},NAVIGATE:{actions:["setFocused","setHighlightedItem","selectWithKeyboard"]}}}},implementations:{guards:{hasSelectedValue:({context:e})=>e.get("value").length>0,hasHighlightedValue:({context:e})=>e.get("highlightedValue")!=null},effects:{trackFocusVisible:({scope:e,refs:t})=>{var n;return Bu({root:(n=e.getRootNode)==null?void 0:n.call(e),onChange(o){t.set("focusVisible",o.isFocusVisible)}})},scrollToHighlightedItem({context:e,prop:t,scope:n}){const o=i=>{const a=e.get("highlightedValue");if(a==null||rO()!=="keyboard")return;const r=dv(n),s=t("scrollToIndexFn");if(s){const c=t("collection").indexOf(a);s?.({index:c,immediate:i,getElement(){return hv(n,a)}});return}const l=hv(n,a);$s(l,{rootEl:r,block:"nearest"})};return de(()=>o(!0)),Ws(()=>dv(n),{defer:!0,attributes:["data-activedescendant"],callback(){o(!1)}})}},actions:{selectHighlightedItem({context:e,prop:t,event:n,computed:o}){const i=n.value??e.get("highlightedValue"),a=t("collection");if(i==null||!a.has(i))return;const r=o("selection");if(n.shiftKey&&o("multiple")&&n.anchorValue){const s=r.extendSelection(a,n.anchorValue,i);$r(r,s,t("onSelect")),e.set("value",Array.from(s))}else{const s=r.select(a,i,n.metaKey);$r(r,s,t("onSelect")),e.set("value",Array.from(s))}},selectWithKeyboard({context:e,prop:t,event:n,computed:o}){const i=o("selection"),a=t("collection");if(n.shiftKey&&o("multiple")&&n.anchorValue){const r=i.extendSelection(a,n.anchorValue,n.value);$r(i,r,t("onSelect")),e.set("value",Array.from(r));return}if(t("selectOnHighlight")){const r=i.replaceSelection(a,n.value);$r(i,r,t("onSelect")),e.set("value",Array.from(r))}},highlightItem({context:e,event:t}){e.set("highlightedValue",t.value)},highlightMatchingItem({context:e,prop:t,event:n,refs:o}){const i=t("collection").search(n.key,{state:o.get("typeahead"),currentValue:e.get("highlightedValue")});i!=null&&e.set("highlightedValue",i)},setHighlightedItem({context:e,event:t}){e.set("highlightedValue",t.value)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},selectItem({context:e,prop:t,event:n,computed:o}){const i=t("collection"),a=o("selection"),r=a.select(i,n.value);$r(a,r,t("onSelect")),e.set("value",Array.from(r))},clearItem({context:e,event:t,computed:n}){const o=n("selection").deselect(t.value);e.set("value",Array.from(o))},setSelectedItems({context:e,event:t}){e.set("value",t.value)},clearSelectedItems({context:e}){e.set("value",[])},syncSelectedItems({context:e,prop:t}){const n=t("collection"),o=e.get("selectedItems"),i=e.get("value").map(a=>o.find(r=>n.getItemValue(r)===a)||n.find(a));e.set("selectedItems",i)},syncHighlightedItem({context:e,prop:t}){const n=t("collection"),o=e.get("highlightedValue"),i=o?n.find(o):null;e.set("highlightedItem",i)},syncHighlightedValue({context:e,prop:t}){const n=t("collection"),o=e.get("highlightedValue");o!=null&&!n.has(o)&&e.set("highlightedValue",null)},setFocused({context:e}){e.set("focused",!0)},setDefaultHighlightedValue({context:e,prop:t}){const n=t("collection").firstValue;n!=null&&e.set("highlightedValue",n)},clearFocused({context:e}){e.set("focused",!1)}}}});var lV=(e,t)=>{const n=new Set(e);for(const o of t)n.delete(o);return n};function $r(e,t,n){const o=lV(t,e);for(const i of o)n?.({value:i})}ie()(["collection","defaultHighlightedValue","defaultValue","dir","disabled","deselectable","disallowSelectAll","getRootNode","highlightedValue","id","ids","loopFocus","onHighlightChange","onSelect","onValueChange","orientation","scrollToIndexFn","selectionMode","selectOnHighlight","typeahead","value"]);ie()(["item","highlightOnHover"]);ie()(["id"]);ie()(["htmlFor"]);Qw.extendWith("empty");var cV=be("marquee").parts("root","viewport","content","edge","item");cV.build();ie()(["autoFill","defaultPaused","delay","dir","getRootNode","id","ids","loopCount","onComplete","onLoopComplete","onPauseChange","paused","pauseOnInteraction","reverse","side","spacing","speed","translations"]);var t1=be("menu").parts("arrow","arrowTip","content","contextTrigger","indicator","item","itemGroup","itemGroupLabel","itemIndicator","itemText","positioner","separator","trigger","triggerItem");t1.build();var n1=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`menu:${e.id}:trigger`},uV=e=>{var t;return((t=e.ids)==null?void 0:t.contextTrigger)??`menu:${e.id}:ctx-trigger`},o1=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`menu:${e.id}:content`},dV=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`menu:${e.id}:popper`},Gh=(e,t)=>`${e.id}/${t}`,vi=e=>e?.dataset.value??null,Wo=e=>e.getById(o1(e)),pv=e=>e.getById(dV(e)),Dl=e=>e.getById(n1(e)),hV=(e,t)=>t?e.getById(Gh(e,t)):null,Md=e=>e.getById(uV(e)),ol=e=>{const t=`[role^="menuitem"][data-ownedby=${CSS.escape(o1(e))}]:not([data-disabled])`;return ni(Wo(e),t)},pV=e=>Va(ol(e)),fV=e=>Us(ol(e)),If=(e,t)=>t?e.id===t||e.dataset.value===t:!1,gV=(e,t)=>{const n=ol(e),o=n.findIndex(i=>If(i,t.value));return i$(n,o,{loop:t.loop??t.loopFocus})},mV=(e,t)=>{const n=ol(e),o=n.findIndex(i=>If(i,t.value));return a$(n,o,{loop:t.loop??t.loopFocus})},vV=(e,t)=>{const n=ol(e),o=n.find(i=>If(i,t.value));return Io(n,{state:t.typeaheadState,key:t.key,activeId:o?.id??null})},bV=e=>{var t;return!!((t=e?.getAttribute("role"))!=null&&t.startsWith("menuitem"))&&!!(e!=null&&e.hasAttribute("aria-controls"))},yV="menu:select";function xV(e,t){if(!e)return;const n=Ke(e),o=new n.CustomEvent(yV,{detail:{value:t}});e.dispatchEvent(o)}var{not:fn,and:da,or:wV}=Ct();fn("isSubmenu"),wV("isOpenAutoFocusEvent","isArrowDownEvent"),da(fn("isTriggerItem"),"isOpenControlled"),fn("isTriggerItem"),da("isSubmenu","isOpenControlled"),fn("isPointerSuspended"),da(fn("isPointerSuspended"),fn("isTriggerItem")),da(fn("isTriggerItemHighlighted"),fn("isHighlightedItemEditable"),"closeOnSelect","isOpenControlled"),da(fn("isTriggerItemHighlighted"),fn("isHighlightedItemEditable"),"closeOnSelect"),da(fn("isTriggerItemHighlighted"),fn("isHighlightedItemEditable"));function fv(e){let t=e.parent;for(;t&&t.context.get("isSubmenu");)t=t.refs.get("parent");t?.send({type:"CLOSE"})}function _V(e,t){return e?gT(e,t):!1}function CV(e,t,n){const o=Object.keys(e).length>0;if(!t)return null;if(!o)return Gh(n,t);for(const i in e){const a=e[i],r=n1(a.scope);if(r===t)return r}return Gh(n,t)}ie()(["anchorPoint","aria-label","closeOnSelect","composite","defaultHighlightedValue","defaultOpen","dir","getRootNode","highlightedValue","id","ids","loopFocus","navigate","onEscapeKeyDown","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","onSelect","open","positioning","typeahead"]);ie()(["closeOnSelect","disabled","value","valueText"]);ie()(["htmlFor"]);ie()(["id"]);ie()(["checked","closeOnSelect","disabled","onCheckedChange","type","value","valueText"]);const[i1,hi]=Re("NumberInputContext"),kV=O({__name:"number-input-context",setup(e){const t=hi();return(n,o)=>V(n.$slots,"default",ft(yt(g(t))))}}),SV=O({__name:"number-input-control",props:{asChild:{type:Boolean}},setup(e){const t=hi();return Y(),(n,o)=>(w(),$(g(X).div,U(g(t).getControlProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),$V=O({__name:"number-input-decrement-trigger",props:{asChild:{type:Boolean}},setup(e){const t=hi();return Y(),(n,o)=>(w(),$(g(X).button,U(g(t).getDecrementTriggerProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),EV=O({__name:"number-input-increment-trigger",props:{asChild:{type:Boolean}},setup(e){const t=hi();return Y(),(n,o)=>(w(),$(g(X).button,U(g(t).getIncrementTriggerProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),TV=O({__name:"number-input-input",props:{asChild:{type:Boolean}},setup(e){const t=hi(),n=ao();return Y(),(o,i)=>{var a;return w(),$(g(X).input,U({"aria-describedby":(a=g(n))==null?void 0:a.ariaDescribedby},g(t).getInputProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["aria-describedby","as-child"])}}}),OV=O({__name:"number-input-label",props:{asChild:{type:Boolean}},setup(e){const t=hi();return Y(),(n,o)=>(w(),$(g(X).label,U(g(t).getLabelProps(),{"as-child":e.asChild}),{default:C(()=>[V(n.$slots,"default")]),_:3},16,["as-child"]))}}),IV=O({__name:"number-input-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=I(()=>t.value);return i1(n),Y(),(o,i)=>(w(),$(g(X).div,U(n.value.getRootProps(),{"as-child":e.asChild}),{default:C(()=>[V(o.$slots,"default")]),_:3},16,["as-child"]))}});let Nd=new Map,qh=!1;try{qh=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let au=!1;try{au=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const a1={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};let PV=class{format(t){let n="";if(!qh&&this.options.signDisplay!=null?n=RV(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!au){var o;let{unit:i,unitDisplay:a="short",locale:r}=this.resolvedOptions();if(!i)return n;let s=(o=a1[i])===null||o===void 0?void 0:o[a];n+=s[r]||s.default}return n}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.format(t)} – ${this.format(n)}`}formatRangeToParts(t,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let o=this.numberFormatter.formatToParts(t),i=this.numberFormatter.formatToParts(n);return[...o.map(a=>({...a,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(a=>({...a,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!qh&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!au&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=AV(t,n),this.options=n}};function AV(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!au){var o;let{unit:r,unitDisplay:s="short"}=t;if(!r)throw new Error('unit option must be provided with style: "unit"');if(!(!((o=a1[r])===null||o===void 0)&&o[s]))throw new Error(`Unsupported unit ${r} with unitDisplay = ${s}`);t={...t,style:"decimal"}}let i=e+(t?Object.entries(t).sort((r,s)=>r[0]<s[0]?-1:1).join():"");if(Nd.has(i))return Nd.get(i);let a=new Intl.NumberFormat(e,t);return Nd.set(i,a),a}function RV(e,t,n){if(t==="auto")return e.format(n);if(t==="never")return e.format(Math.abs(n));{let o=!1;if(t==="always"?o=n>0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):o=n>0),o){let i=e.format(-n),a=e.format(n),r=i.replace(a,"").replace(/\u200e|\u061C/,"");return[...r].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),i.replace(a,"!!!").replace(r,"+").replace("!!!",a)}else return e.format(n)}}const DV=new RegExp("^.*\\(.*\\).*$"),VV=["latn","arab","hanidec","deva","beng","fullwide"];let r1=class{parse(t){return Ld(this.locale,this.options,t).parse(t)}isValidPartialNumber(t,n,o){return Ld(this.locale,this.options,t).isValidPartialNumber(t,n,o)}getNumberingSystem(t){return Ld(this.locale,this.options,t).options.numberingSystem}constructor(t,n={}){this.locale=t,this.options=n}};const gv=new Map;function Ld(e,t,n){let o=mv(e,t);if(!e.includes("-nu-")&&!o.isValidPartialNumber(n)){for(let i of VV)if(i!==o.options.numberingSystem){let a=mv(e+(e.includes("-u-")?"-nu-":"-u-nu-")+i,t);if(a.isValidPartialNumber(n))return a}}return o}function mv(e,t){let n=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[0]?-1:1).join():""),o=gv.get(n);return o||(o=new MV(e,t),gv.set(n,o)),o}let MV=class{parse(t){let n=this.sanitize(t);if(this.symbols.group&&(n=ha(n,this.symbols.group,"")),this.symbols.decimal&&(n=n.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(n=n.replace(this.symbols.minusSign,"-")),n=n.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let r=n.indexOf("-");n=n.replace("-",""),n=n.replace("+","");let s=n.indexOf(".");s===-1&&(s=n.length),n=n.replace(".",""),s-2===0?n=`0.${n}`:s-2===-1?n=`0.0${n}`:s-2===-2?n="0.00":n=`${n.slice(0,s-2)}.${n.slice(s-2)}`,r>-1&&(n=`-${n}`)}let o=n?+n:NaN;if(isNaN(o))return NaN;if(this.options.style==="percent"){var i,a;let r={...this.options,style:"decimal",minimumFractionDigits:Math.min(((i=this.options.minimumFractionDigits)!==null&&i!==void 0?i:0)+2,20),maximumFractionDigits:Math.min(((a=this.options.maximumFractionDigits)!==null&&a!==void 0?a:0)+2,20)};return new r1(this.locale,r).parse(new PV(this.locale,r).format(o))}return this.options.currencySign==="accounting"&&DV.test(t)&&(o=-1*o),o}sanitize(t){return t=t.replace(this.symbols.literals,""),this.symbols.minusSign&&(t=t.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(t=t.replace(",",this.symbols.decimal),t=t.replace("،",this.symbols.decimal)),this.symbols.group&&(t=ha(t,".",this.symbols.group))),this.symbols.group==="’"&&t.includes("'")&&(t=ha(t,"'",this.symbols.group)),this.options.locale==="fr-FR"&&this.symbols.group&&(t=ha(t," ",this.symbols.group),t=ha(t,/\u00A0/g,this.symbols.group)),t}isValidPartialNumber(t,n=-1/0,o=1/0){return t=this.sanitize(t),this.symbols.minusSign&&t.startsWith(this.symbols.minusSign)&&n<0?t=t.slice(this.symbols.minusSign.length):this.symbols.plusSign&&t.startsWith(this.symbols.plusSign)&&o>0&&(t=t.slice(this.symbols.plusSign.length)),this.symbols.group&&t.startsWith(this.symbols.group)||this.symbols.decimal&&t.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(t=ha(t,this.symbols.group,"")),t=t.replace(this.symbols.numeral,""),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,"")),t.length===0)}constructor(t,n={}){this.locale=t,n.roundingIncrement!==1&&n.roundingIncrement!=null&&(n.maximumFractionDigits==null&&n.minimumFractionDigits==null?(n.maximumFractionDigits=0,n.minimumFractionDigits=0):n.maximumFractionDigits==null?n.maximumFractionDigits=n.minimumFractionDigits:n.minimumFractionDigits==null&&(n.minimumFractionDigits=n.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(t,n),this.options=this.formatter.resolvedOptions(),this.symbols=LV(t,this.formatter,this.options,n);var o,i;this.options.style==="percent"&&(((o=this.options.minimumFractionDigits)!==null&&o!==void 0?o:0)>18||((i=this.options.maximumFractionDigits)!==null&&i!==void 0?i:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}};const vv=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),NV=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function LV(e,t,n,o){var i,a,r,s;let l=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),c=l.formatToParts(-10000.111),u=l.formatToParts(10000.111),d=NV.map(S=>l.formatToParts(S));var h;let p=(h=(i=c.find(S=>S.type==="minusSign"))===null||i===void 0?void 0:i.value)!==null&&h!==void 0?h:"-",m=(a=u.find(S=>S.type==="plusSign"))===null||a===void 0?void 0:a.value;!m&&(o?.signDisplay==="exceptZero"||o?.signDisplay==="always")&&(m="+");let f=(r=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(S=>S.type==="decimal"))===null||r===void 0?void 0:r.value,b=(s=c.find(S=>S.type==="group"))===null||s===void 0?void 0:s.value,v=c.filter(S=>!vv.has(S.type)).map(S=>bv(S.value)),y=d.flatMap(S=>S.filter(R=>!vv.has(R.type)).map(R=>bv(R.value))),x=[...new Set([...v,...y])].sort((S,R)=>R.length-S.length),_=x.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${x.join("|")}|[\\p{White_Space}]`,"gu"),k=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),E=new Map(k.map((S,R)=>[S,R])),P=new RegExp(`[${k.join("")}]`,"g");return{minusSign:p,plusSign:m,decimal:f,group:b,literals:_,numeral:P,index:S=>String(E.get(S))}}function ha(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function bv(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var s1=be("numberInput").parts("root","label","input","control","valueText","incrementTrigger","decrementTrigger","scrubber"),zo=s1.build(),FV=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`number-input:${e.id}`},ts=e=>{var t;return((t=e.ids)==null?void 0:t.input)??`number-input:${e.id}:input`},l1=e=>{var t;return((t=e.ids)==null?void 0:t.incrementTrigger)??`number-input:${e.id}:inc`},c1=e=>{var t;return((t=e.ids)==null?void 0:t.decrementTrigger)??`number-input:${e.id}:dec`},BV=e=>{var t;return((t=e.ids)==null?void 0:t.scrubber)??`number-input:${e.id}:scrubber`},u1=e=>`number-input:${e.id}:cursor`,zV=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`number-input:${e.id}:label`},ns=e=>e.getById(ts(e)),HV=e=>e.getById(l1(e)),jV=e=>e.getById(c1(e)),d1=e=>e.getDoc().getElementById(u1(e)),WV=(e,t)=>{let n=null;return t==="increment"&&(n=HV(e)),t==="decrement"&&(n=jV(e)),n},UV=(e,t)=>{if(!Ou())return YV(e,t),()=>{var n;(n=d1(e))==null||n.remove()}},GV=e=>{const t=e.getDoc(),n=t.documentElement,o=t.body;return o.style.pointerEvents="none",n.style.userSelect="none",n.style.cursor="ew-resize",()=>{o.style.pointerEvents="",n.style.userSelect="",n.style.cursor="",n.style.length||n.removeAttribute("style"),o.style.length||o.removeAttribute("style")}},qV=(e,t)=>{const{point:n,isRtl:o,event:i}=t,a=e.getWin(),r=hs(i.movementX,a.devicePixelRatio),s=hs(i.movementY,a.devicePixelRatio);let l=r>0?"increment":r<0?"decrement":null;o&&l==="increment"&&(l="decrement"),o&&l==="decrement"&&(l="increment");const c={x:n.x+r,y:n.y+s},u=a.innerWidth,d=hs(7.5,a.devicePixelRatio);return c.x=x$(c.x+d,u)-d,{hint:l,point:c}},YV=(e,t)=>{const n=e.getDoc(),o=n.createElement("div");o.className="scrubber--cursor",o.id=u1(e),Object.assign(o.style,{width:"15px",height:"15px",position:"fixed",pointerEvents:"none",left:"0px",top:"0px",zIndex:k0,transform:t?`translate3d(${t.x}px, ${t.y}px, 0px)`:void 0,willChange:"transform"}),o.innerHTML=`
3
3
  <svg width="46" height="15" style="left: -15.5px; position: absolute; top: 0; filter: drop-shadow(rgba(0, 0, 0, 0.4) 0px 1px 1.1px);">
4
4
  <g transform="translate(2 3)">