@atlanhq/app-playground 1.9.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/200.html +1 -1
- package/.output/public/404.html +1 -1
- package/.output/public/_nuxt/{CEp1n_H2.js → B7jnaB13.js} +1 -1
- package/.output/public/_nuxt/BULlBRgq.js +89 -0
- package/.output/public/_nuxt/{BSrqGtjX.js → CbOH70yj.js} +1 -1
- package/.output/public/_nuxt/Dr0h41n5.js +9 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/062b4b04-5cee-48a1-886f-91559bfea497.json +1 -0
- package/.output/public/_nuxt/entry.dMNDAUBF.css +1 -0
- package/.output/public/_nuxt/index.wy2tJj8y.css +1 -0
- package/.output/public/index.html +1 -1
- package/package.json +5 -1
- package/.output/public/_nuxt/BpccIacA.js +0 -9
- package/.output/public/_nuxt/Czrvt8rc.js +0 -33
- package/.output/public/_nuxt/builds/meta/620c4c54-ce9e-4b41-ba5f-6e7c5b08dc02.json +0 -1
- package/.output/public/_nuxt/entry.CkUbpakt.css +0 -1
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import{F as qs,G as lk,H as w0,I as C0,k as E,J as Jp,K as wt,L as qe,r as fe,d as T,M as ck,N as $e,h as At,O as X,P as $,Q as f,z as x,D as _,R,S as z,T as st,U as mt,o as rr,e as _0,V as io,s as Zc,W as Ne,X as Qp,Y as Mt,Z as dn,y as D,A as N,C as F,$ as Ys,a0 as M,a1 as Ie,B as ie,E as Re,a2 as k0,a3 as $0,a4 as gt,a5 as S0,a6 as dk,a7 as Ah,a8 as on,a9 as Rh,aa as Xc,ab as Ks,ac as Vh,a as uk,ad as hk,ae as pk,af as fk,ag as gk,ah as mk,ai as vk,aj as bk,ak as sr,al as ui,am as hi,an as E0,ao as yk,ap as Fg,aq as xk,_ as Rd,ar as wk,as as Ck,at as O0,x as _k}from"./Dr0h41n5.js";function Mh(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}var kk=e=>typeof e=="object"&&e!==null;function ef(e){return Object.fromEntries(Object.entries(e??{}).filter(([t,n])=>n!==void 0))}var $k=e=>e==="base";function Sk(e){return e.slice().filter(t=>!$k(t))}function Bg(e){return String.fromCharCode(e+(e>25?39:97))}function Ek(e){let t="",n;for(n=Math.abs(e);n>52;n=n/52|0)t=Bg(n%52)+t;return Bg(n%52)+t}function Ok(e,t){let n=t.length;for(;n;)e=e*33^t.charCodeAt(--n);return e}function Tk(e){return Ek(Ok(5381,e)>>>0)}var T0=/\s*!(important)?/i;function Ik(e){return typeof e=="string"?T0.test(e):!1}function Pk(e){return typeof e=="string"?e.replace(T0,"").trim():e}function I0(e){return typeof e=="string"?e.replaceAll(" ","_"):e}var Zs=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 tf(...e){return e.reduce((t,n)=>(n&&Object.keys(n).forEach(o=>{const i=t[o],a=n[o];Mh(i)&&Mh(a)?t[o]=tf(i,a):t[o]=a}),t),{})}var Dk=e=>e!=null;function P0(e,t,n={}){const{stop:o,getKey:i}=n;function a(r,s=[]){if(kk(r)){const l={};for(const[c,d]of Object.entries(r)){const u=i?.(c,d)??c,h=[...s,u];if(o!=null&&o(r,h))return t(r,s);const p=a(d,h);Dk(p)&&(l[u]=p)}return l}return t(r,s)}return a(e)}function Ak(e,t){return e.reduce((n,o,i)=>{const a=t[i];return o!=null&&(n[a]=o),n},{})}function D0(e,t,n=!0){const{utility:o,conditions:i}=t,{hasShorthand:a,resolveShorthand:r}=o;return P0(e,s=>Array.isArray(s)?Ak(s,i.breakpoints.keys):s,{stop:s=>Array.isArray(s),getKey:n?s=>a?r(s):s:void 0})}var Rk={shift:e=>e,finalize:e=>e,breakpoints:{keys:[]}},Vk=e=>typeof e=="string"?e.replaceAll(/[\n\s]+/g," "):e;function Mk(e){const{utility:t,hash:n,conditions:o=Rk}=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,Tk))}else l=[...o.finalize(r),i(s)].join(":");return l};return Zs(({base:r,...s}={})=>{const l=Object.assign(s,r),c=D0(l,e),d=new Set;return P0(c,(u,h)=>{if(u==null)return;const p=Ik(u),[m,...g]=o.shift(h),b=Sk(g),v=t.transform(m,Pk(Vk(u)));let y=a(b,v.className);p&&(y=`${y}!`),d.add(y)}),Array.from(d).join(" ")})}function Nk(...e){return e.flat().filter(t=>Mh(t)&&Object.keys(ef(t)).length>0)}function Lk(e){function t(i){const a=Nk(...i);return a.length===1?a:a.map(r=>D0(r,e))}function n(...i){return tf(...t(i))}function o(...i){return Object.assign({},...t(i))}return{mergeCss:Zs(n),assignCss:o}}var Fk=/([A-Z])/g,Bk=/^ms-/,zk=Zs(e=>e.startsWith("--")?e:e.replace(Fk,"-$1").replace(Bk,"-ms-").toLowerCase()),Hk="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,%";`${Hk.split(",").join("|")}`;var jk=(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?Wk(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)},Wk=(e,t)=>e.filter(n=>n.css[t]).map(n=>({...n,css:n.css[t]}));function A0(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 Uk=(...e)=>{const t=e.reduce((n,o)=>(o&&o.forEach(i=>n.add(i)),n),new Set([]));return Array.from(t)};const Gk="_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",R0=new Set(Gk.split(",")),qk=/^@|&|&$/;function zg(e){return R0.has(e)||qk.test(e)}const Yk=/^_/,Kk=/&|@/;function Zk(e){return e.map(t=>R0.has(t)?t.replace(Yk,""):Kk.test(t)?`[${I0(t.trim())}]`:t)}function Xk(e){return e.sort((t,n)=>{const o=zg(t),i=zg(n);return o&&!i?1:!o&&i?-1:0})}const Jk="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",V0=new Map,M0=new Map;Jk.split(",").forEach(e=>{const[t,n]=e.split(":"),[o,...i]=n.split("/");V0.set(t,o),i.length&&i.forEach(a=>{M0.set(a==="1"?o:a,t)})});const Hg=e=>M0.get(e)||e,N0={conditions:{shift:Xk,finalize:Zk,breakpoints:{keys:["base","sm","md","lg","xl","2xl"]}},utility:{transform:(e,t)=>{const n=Hg(e);return{className:`${V0.get(n)||zk(n)}_${I0(t)}`}},hasShorthand:!0,toHash:(e,t)=>t(e.join(":")),resolveShorthand:Hg}},Qk=Mk(N0),Dt=(...e)=>Qk(Ai(...e));Dt.raw=(...e)=>Ai(...e);const{mergeCss:Ai}=Lk(N0),jg=e=>({base:{},variants:{},defaultVariants:{},compoundVariants:[],...e});function na(e){const{base:t,variants:n,defaultVariants:o,compoundVariants:i}=jg(e),a=h=>({...o,...ef(h)});function r(h={}){var p;const m=a(h);let g={...t};for(const[v,y]of Object.entries(m))(p=n[v])!=null&&p[y]&&(g=Ai(g,n[v][y]));const b=e$(i,m);return Ai(g,b)}function s(h){const p=jg(h.config),m=Uk(h.variantKeys,Object.keys(n));return na({base:Ai(t,p.base),variants:Object.fromEntries(m.map(g=>[g,Ai(n[g],p.variants[g])])),defaultVariants:tf(o,p.defaultVariants),compoundVariants:[...i,...p.compoundVariants]})}function l(h){return Dt(r(h))}const c=Object.keys(n);function d(h){return A0(h,c)}const u=Object.fromEntries(Object.entries(n).map(([h,p])=>[h,Object.keys(p)]));return Object.assign(Zs(l),{__cva__:!0,variantMap:u,variantKeys:c,raw:r,config:e,merge:s,splitVariantProps:d,getVariantProps:a})}function e$(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=Ai(n,o.css))}),n}function t$(){let e="",t=0,n;for(;t<arguments.length;)(n=arguments[t++])&&typeof n=="string"&&(e&&(e+=" "),e+=n);return e}const n$=(e,t)=>e+"__"+t;function ge(e){const t=Object.entries(jk(e)).map(([d,u])=>[d,na(u)]),n=e.defaultVariants??{};function o(d){const u=t.map(([h,p])=>[h,t$(p(d),e.className&&n$(e.className,h))]);return Object.fromEntries(u)}function i(d){const u=t.map(([h,p])=>[h,p.raw(d)]);return Object.fromEntries(u)}const a=e.variants??{},r=Object.keys(a);function s(d){return A0(d,r)}const l=d=>({...n||{},...ef(d)}),c=Object.fromEntries(Object.entries(a).map(([d,u])=>[d,Object.keys(u)]));return Object.assign(Zs(o),{__cva__:!1,raw:i,variantMap:c,variantKeys:r,splitVariantProps:s,getVariantProps:l})}var be=(e,t=[])=>({parts:(...n)=>{if(o$(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="${fa(e)}"][data-part="${fa(o)}"]`,`& [data-scope="${fa(e)}"][data-part="${fa(o)}"]`].join(", "),attrs:{"data-scope":fa(e),"data-part":fa(o)}}}),{})}),fa=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),o$=e=>e.length===0,i$=Object.defineProperty,a$=(e,t,n)=>t in e?i$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Iu=(e,t,n)=>a$(e,typeof t!="symbol"?t+"":t,n);function r$(e){if(!e)return!1;try{return e.selectionStart===0&&e.selectionEnd===0}catch{return e.value===""}}function s$(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 Wg=e=>Math.max(0,Math.min(1,e)),l$=(e,t)=>e.map((n,o)=>e[(Math.max(t,0)+o)%e.length]),Pu=(...e)=>t=>e.reduce((n,o)=>o(n),t),Ma=()=>{},Vd=e=>typeof e=="object"&&e!==null,L0=2147483647,L=e=>e?"":void 0,Je=e=>e?"true":void 0,c$=1,d$=9,u$=11,et=e=>Vd(e)&&e.nodeType===c$&&typeof e.nodeName=="string",Md=e=>Vd(e)&&e.nodeType===d$,h$=e=>Vd(e)&&e===e.window,F0=e=>et(e)?e.localName||"":"#document";function p$(e){return["html","body","#document"].includes(F0(e))}var f$=e=>Vd(e)&&e.nodeType!==void 0,Ya=e=>f$(e)&&e.nodeType===u$&&"host"in e,g$=e=>et(e)&&e.localName==="input",Sa=e=>!!(e!=null&&e.matches("a[href]")),m$=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 gs(t)===e}var v$=/(textarea|select)/;function Nd(e){if(e==null||!et(e))return!1;try{return g$(e)&&e.selectionStart!=null||v$.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&&Ya(o)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function un(e){return Md(e)?e:h$(e)?e.document:e?.ownerDocument??document}function b$(e){return un(e).documentElement}function Ke(e){var t;return Ya(e)?Ke(e.host):Md(e)?e.defaultView??window:et(e)?((t=e.ownerDocument)==null?void 0:t.defaultView)??window:window}function gs(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 y$(e){if(F0(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ya(e)&&e.host||b$(e);return Ya(t)?t.host:t}function nf(e){let t;try{if(t=e.getRootNode({composed:!0}),Md(t)||Ya(t))return t}catch{}return e.ownerDocument??document}var Du=new WeakMap;function ii(e){return Du.has(e)||Du.set(e,Ke(e).getComputedStyle(e)),Du.get(e)}var of=new Set(["menu","listbox","dialog","grid","tree","region"]),x$=e=>of.has(e),B0=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function z0(e,t){const n=new Set,o=nf(e),i=a=>{const r=a.querySelectorAll("[aria-controls]");for(const s of r){if(s.getAttribute("aria-expanded")!=="true")continue;const l=B0(s);for(const c of l){if(!c||n.has(c))continue;n.add(c);const d=o.getElementById(c);if(d){const u=d.getAttribute("role"),h=d.getAttribute("aria-modal")==="true";if(u&&x$(u)&&!h&&(d===t||d.contains(t)||i(d)))return!0}}}return!1};return i(e)}function H0(e,t){const n=nf(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=B0(s);for(const c of l){if(!c||o.has(c))continue;o.add(c);const d=n.getElementById(c);if(d){const u=d.getAttribute("role"),h=d.getAttribute("aria-modal")==="true";u&&of.has(u)&&!h&&(t(d),i(d))}}}};i(e)}function w$(e){const t=new Set;return H0(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function C$(e){const t=e.getAttribute("role");return!!(t&&of.has(t))}function _$(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function k$(e){var t;return _$(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function $$(e){if(!e.id)return!1;const t=nf(e),n=CSS.escape(e.id),o=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(o)&&C$(e))}var Ld=()=>typeof document<"u";function S$(){const e=navigator.userAgentData;return e?.platform??navigator.platform}function E$(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}var af=e=>Ld()&&e.test(S$()),j0=e=>Ld()&&e.test(E$()),O$=e=>Ld()&&e.test(navigator.vendor),Ug=()=>Ld()&&!!navigator.maxTouchPoints,T$=()=>af(/^iPhone/i),I$=()=>af(/^iPad/i)||Bd()&&navigator.maxTouchPoints>1,Fd=()=>T$()||I$(),P$=()=>Bd()||Fd(),Bd=()=>af(/^Mac/i),zd=()=>P$()&&O$(/apple/i),D$=()=>j0(/Firefox/i),A$=()=>j0(/Android/i);function R$(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=R$(e);return t?.[0]??e.target}function Is(e){return W0(e).isComposing||e.keyCode===229}function V$(e){return e.pointerType===""&&e.isTrusted?!0:A$()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}var zi=e=>e.button===0,M$=e=>e.button===2||Bd()&&e.ctrlKey&&e.button===0,Zn=e=>e.ctrlKey||e.altKey||e.metaKey,N$=e=>"touches"in e&&e.touches.length>0,L$={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Gg={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function Ps(e,t={}){const{dir:n="ltr",orientation:o="horizontal"}=t;let i=e.key;return i=L$[i]??i,n==="rtl"&&o==="horizontal"&&i in Gg&&(i=Gg[i]),i}function W0(e){return e.nativeEvent??e}var F$=new Set(["PageUp","PageDown"]),B$=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]);function z$(e){return e.ctrlKey||e.metaKey?.1:F$.has(e.key)||e.shiftKey&&B$.has(e.key)?10:1}function Qc(e,t="client"){const n=N$(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 U0(e,t){const{type:n="HTMLInputElement",property:o="value"}=t,i=Ke(e)[n].prototype;return Object.getOwnPropertyDescriptor(i,o)??{}}function H$(e){if(e.localName==="input")return"HTMLInputElement";if(e.localName==="textarea")return"HTMLTextAreaElement";if(e.localName==="select")return"HTMLSelectElement"}function Nn(e,t,n="value"){var o;if(!e)return;const i=H$(e);i&&((o=U0(e,{type:i,property:n}).set)==null||o.call(e,t)),e.setAttribute(n,t)}function rf(e,t){var n;e&&((n=U0(e,{type:"HTMLInputElement",property:"checked"}).set)==null||n.call(e,t),t?e.setAttribute("checked",""):e.removeAttribute("checked"))}function G0(e,t){const{value:n,bubbles:o=!0}=t;if(!e)return;const i=Ke(e);e instanceof i.HTMLInputElement&&(Nn(e,`${n}`),e.dispatchEvent(new i.Event("input",{bubbles:o})))}function q0(e,t){const{checked:n,bubbles:o=!0}=t;if(!e)return;const i=Ke(e);e instanceof i.HTMLInputElement&&(rf(e,n),e.dispatchEvent(new i.Event("click",{bubbles:o})))}function j$(e){return W$(e)?e.form:e.closest("form")}function W$(e){return e.matches("textarea, input, select, button")}function U$(e,t){if(!e)return;const n=j$(e),o=i=>{i.defaultPrevented||t()};return n?.addEventListener("reset",o,{passive:!0}),()=>n?.removeEventListener("reset",o)}function G$(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 lr(e,t){if(!e)return;const{onFieldsetDisabledChange:n,onFormReset:o}=t,i=[U$(e,o),G$(e,n)];return()=>i.forEach(a=>a?.())}var Y0=e=>et(e)&&e.tagName==="IFRAME",q$=/^(audio|video|details)$/;function K0(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var Y$=e=>!Number.isNaN(K0(e)),K$=e=>K0(e)<0;function Z$(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 Z0(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=Z$(l,t);if(c){const d=Array.from(c.querySelectorAll(Hd)).filter(n),u=r.get(l);if(u!==void 0){const h=u+1;o.splice(h,0,...d),d.forEach((p,m)=>{r.set(p,h+m)});for(let p=h+d.length;p<o.length;p++)r.set(o[p],p)}else{const h=o.length;o.push(...d),d.forEach((p,m)=>{r.set(p,h+m)})}i.push(...d)}}return o}var Hd="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",X0=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:o}=t,i=Array.from(e.querySelectorAll(Hd));(n==!0||n=="if-empty"&&i.length===0)&&et(e)&&Oo(e)&&i.unshift(e);const a=[];for(const r of i)if(Oo(r)){if(Y0(r)&&r.contentDocument){const s=r.contentDocument.body;a.push(...X0(s,{getShadowRoot:o}));continue}a.push(r)}return o?Z0(a,o,Oo):a};function Oo(e){return!et(e)||e.closest("[inert]")?!1:e.matches(Hd)&&m$(e)}function Xs(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:o}=t,i=Array.from(e.querySelectorAll(Hd));n&&Ri(e)&&i.unshift(e);const a=[];for(const r of i)if(Ri(r)){if(Y0(r)&&r.contentDocument){const s=r.contentDocument.body;a.push(...Xs(s,{getShadowRoot:o}));continue}a.push(r)}if(o){const r=Z0(a,o,Ri);return!r.length&&n?i:r}return!a.length&&n?i:a}function Ri(e){return et(e)&&e.tabIndex>0?!0:Oo(e)&&!K$(e)}function X$(e,t={}){const n=Xs(e,t),o=n[0]||null,i=n[n.length-1]||null;return[o,i]}function wr(e){return e.tabIndex<0&&(q$.test(e.localName)||Nd(e))&&!Y$(e)?0:e.tabIndex}function sf(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=Xs(t);a=o?r.filter(o)[0]:r[0]}return a||t||void 0}function J$(e){const t=e.currentTarget;if(!t)return!1;const[n,o]=X$(t);return!(Jc(n)&&e.shiftKey||Jc(o)&&!e.shiftKey||!n&&!o)}var J0=class Q0{constructor(){Iu(this,"id",null),Iu(this,"fn_cleanup"),Iu(this,"cleanup",()=>{this.cancel()})}static create(){return new Q0}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 ue(e){const t=J0.create();return t.request(e),t.cleanup}function jd(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 Q$(e,t,n){const o=ue(()=>{e.removeEventListener(t,i,!0),n()}),i=()=>{o(),n()};return e.addEventListener(t,i,{once:!0,capture:!0}),o}function eS(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 Js(e,t){const{defer:n}=t,o=n?ue:a=>a(),i=[];return i.push(o(()=>{const a=typeof e=="function"?e():e;i.push(eS(a,t))})),()=>{i.forEach(a=>a?.())}}function tS(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 nS(e,t){const{defer:n}=t,o=n?ue:a=>a(),i=[];return i.push(o(()=>{const a=typeof e=="function"?e():e;i.push(tS(a,t))})),()=>{i.forEach(a=>a?.())}}function ex(e){const t=()=>{const n=Ke(e);e.dispatchEvent(new n.MouseEvent("click"))};D$()?Q$(e,"keyup",t):queueMicrotask(t)}function ed(e){const t=y$(e);return p$(t)?un(t).body:et(t)&&lf(t)?t:ed(t)}function tx(e,t=[]){const n=ed(e),o=n===e.ownerDocument.body,i=Ke(n);return o?t.concat(i,i.visualViewport||[],lf(n)?n:[]):t.concat(n,tx(n,[]))}var oS=/auto|scroll|overlay|hidden|clip/,iS=new Set(["inline","contents"]);function lf(e){const t=Ke(e),{overflow:n,overflowX:o,overflowY:i,display:a}=t.getComputedStyle(e);return oS.test(n+i+o)&&!iS.has(a)}function aS(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function Ds(e,t){const{rootEl:n,...o}=t||{};!e||!n||!lf(n)||!aS(n)||e.scrollIntoView(o)}function nx(e,t){const{left:n,top:o,width:i,height:a}=t.getBoundingClientRect(),r={x:e.x-n,y:e.y-o},s={x:Wg(r.x/i),y:Wg(r.y/a)};function l(c={}){const{dir:d="ltr",orientation:u="horizontal",inverted:h}=c,p=typeof h=="object"?h.x:h,m=typeof h=="object"?h.y:h;return u==="horizontal"?d==="rtl"||p?1-s.x:s.x:m?1-s.y:s.y}return{offset:r,percent:s,getPercentValue:l}}function rS(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 Na="default",Nh="",yc=new WeakMap;function sS(e={}){const{target:t,doc:n}=e,o=n??document,i=o.documentElement;return Fd()?(Na==="default"&&(Nh=i.style.webkitUserSelect,i.style.webkitUserSelect="none"),Na="disabled"):t&&(yc.set(t,t.style.userSelect),t.style.userSelect="none"),()=>ox({target:t,doc:o})}function ox(e={}){const{target:t,doc:n}=e,o=(n??document).documentElement;if(Fd()){if(Na!=="disabled")return;Na="restoring",setTimeout(()=>{jd(()=>{Na==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=Nh||""),Nh="",Na="default")})},300)}else if(t&&yc.has(t)){const i=yc.get(t);t.style.userSelect==="none"&&(t.style.userSelect=i??""),t.getAttribute("style")===""&&t.removeAttribute("style"),yc.delete(t)}}function cf(e={}){const{defer:t,target:n,...o}=e,i=t?ue:r=>r(),a=[];return a.push(i(()=>{const r=typeof n=="function"?n():n;a.push(sS({...o,target:r}))})),()=>{a.forEach(r=>r?.())}}function ix(e,t){const{onPointerMove:n,onPointerUp:o}=t,i=s=>{const l=Qc(s),c=Math.sqrt(l.x**2+l.y**2),d=s.pointerType==="touch"?10:5;if(!(c<d)){if(s.pointerType==="mouse"&&s.button===0){a(s);return}n({point:l,event:s})}},a=s=>{const l=Qc(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),cf({doc:e})];return()=>{r.forEach(s=>s())}}function ax(e){const{pointerNode:t,keyboardNode:n=t,onPress:o,onPressStart:i,onPressEnd:a,isValidKey:r=v=>v.key==="Enter"}=e;if(!t)return Ma;const s=Ke(t);let l=Ma,c=Ma,d=Ma;const u=v=>({point:Qc(v),event:v});function h(v){i?.(u(v))}function p(v){a?.(u(v))}const m=Ee(t,"pointerdown",v=>{c();const y=Ee(s,"pointerup",C=>{const k=je(C);Rt(t,k)?o?.(u(C)):a?.(u(C))},{passive:!o,once:!0}),w=Ee(s,"pointercancel",p,{passive:!a,once:!0});c=Pu(y,w),Jc(n)&&v.pointerType==="mouse"&&v.preventDefault(),h(v)},{passive:!i}),g=Ee(n,"focus",b);l=Pu(m,g);function b(){const v=k=>{if(!r(k))return;const O=S=>{if(!r(S))return;const V=new s.PointerEvent("pointerup"),H=u(V);o?.(H),a?.(H)};c(),c=Ee(n,"keyup",O);const P=new s.PointerEvent("pointerdown");h(P)},y=()=>{const k=new s.PointerEvent("pointercancel");p(k)},w=Ee(n,"keydown",v),C=Ee(n,"blur",y);d=Pu(w,C)}return()=>{l(),c(),d()}}function ai(e,t){return Array.from(e?.querySelectorAll(t)??[])}function rx(e,t){return e?.querySelector(t)??null}var df=e=>e.id;function lS(e,t,n=df){return e.find(o=>n(o)===t)}function Wd(e,t,n=df){const o=lS(e,t,n);return o?e.indexOf(o):-1}function uf(e,t,n=!0){let o=Wd(e,t);return o=n?(o+1)%e.length:Math.min(o+1,e.length-1),e[o]}function hf(e,t,n=!0){let o=Wd(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 cS=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(),dS=e=>{var t;return cS(((t=e.dataset)==null?void 0:t.valuetext)??e.textContent??"")},uS=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());function hS(e,t,n,o=df){const i=n?Wd(e,n,o):-1;let a=n?l$(e,i):e;return t.length===1&&(a=a.filter(r=>o(r)!==n)),a.find(r=>uS(dS(r),t))}function pS(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 As(e,t){if(!e)return Ma;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 fS(e,t,n){if(!e)return Ma;const o=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,o),e.style.length===0&&e.removeAttribute("style")}}function gS(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 d=hS(c,l,o,r);function u(){clearTimeout(n.timer),n.timer=-1}function h(p){n.keysSoFar=p,u(),p!==""&&(n.timer=+setTimeout(()=>{h(""),u()},a))}return h(s),d}var Po=Object.assign(gS,{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:mS});function mS(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var Ud={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 vS(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 bS(e,t){const{timeout:n,rootNode:o}=t,i=Ke(o),a=un(o),r=new i.AbortController;return vS(new Promise(s=>{const l=e();if(l){s(l);return}const c=new i.MutationObserver(()=>{const d=e();d&&d.isConnected&&(c.disconnect(),s(d))});c.observe(a.body,{childList:!0,subtree:!0})}),r,n)}var yS=Object.defineProperty,sx=e=>{throw TypeError(e)},xS=(e,t,n)=>t in e?yS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lo=(e,t,n)=>xS(e,typeof t!="symbol"?t+"":t,n),wS=(e,t,n)=>t.has(e)||sx("Cannot "+n),qg=(e,t,n)=>(wS(e,t,"read from private field"),t.get(e)),CS=(e,t,n)=>t.has(e)?sx("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n);function xc(e){return e==null?[]:Array.isArray(e)?e:[e]}var _S=e=>Array.from(Array(e).keys()),ja=e=>e[0],Qs=e=>e[e.length-1],kS=(e,t)=>e.indexOf(t)!==-1,Co=(e,...t)=>e.concat(t),Hi=(e,...t)=>e.filter(n=>!t.includes(n)),Yg=(e,t)=>e.filter((n,o)=>o!==t),Ln=e=>Array.from(new Set(e)),Au=(e,t)=>{const n=new Set(t);return e.filter(o=>!n.has(o))},Gi=(e,t)=>kS(e,t)?Hi(e,t):Co(e,t);function td(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 $S(e,t,n={}){return e[td(e,t,n)]}function lx(e,t,n={}){const{step:o=1,loop:i=!0}=n;return td(e,t,{step:-o,loop:i})}function SS(e,t,n={}){return e[lx(e,t,n)]}function Kg(e,t){return e.reduce((n,o,i)=>{var a;return i%t===0?n.push([o]):(a=Qs(n))==null||a.push(o),n},[])}function cx(e){return e.reduce((t,n)=>Array.isArray(n)?t.concat(cx(n)):t.concat(n),[])}function Zg(e,t){return e.reduce(([n,o],i)=>(t(i)?n.push(i):o.push(i),[n,o]),[[],[]])}var Xg=e=>e?.constructor.name==="Array",ES=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!xt(e[n],t[n]))return!1;return!0},xt=(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(Xg(e)&&Xg(t))return ES(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(!xt(e[a],t[a]))return!1}return!0},La=e=>Array.isArray(e),OS=e=>e===!0||e===!1,dx=e=>e!=null&&typeof e=="object",Vi=e=>dx(e)&&!La(e),ms=e=>typeof e=="string",Zo=e=>typeof e=="function",TS=e=>e==null,Xo=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),IS=e=>Object.prototype.toString.call(e),ux=Function.prototype.toString,PS=ux.call(Object),DS=e=>{if(!dx(e)||IS(e)!="[object Object]"||VS(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=Xo(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ux.call(n)==PS},AS=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,RS=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,VS=e=>AS(e)||RS(e),yl=(e,...t)=>(typeof e=="function"?e(...t):e)??void 0,MS=()=>{},Rs=(...e)=>(...t)=>{e.forEach(function(n){n?.(...t)})},hx=(()=>{let e=0;return()=>(e++,e.toString(36))})();function Ht(e,t,...n){var o;if(e in t){const a=t[e];return Zo(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,Ht),i}var px=(e,t)=>{var n;try{return e()}catch(o){return o instanceof Error&&((n=Error.captureStackTrace)==null||n.call(Error,o,px)),t?.()}},{floor:fx,abs:Jg,round:Gd,min:NS,max:LS,pow:FS,sign:BS}=Math,Lh=e=>Number.isNaN(e),pi=e=>Lh(e)?0:e,gx=(e,t)=>(e%t+t)%t,zS=(e,t)=>(e%t+t)%t,HS=(e,t)=>pi(e)>=t,jS=(e,t)=>pi(e)<=t,vs=(e,t,n)=>{const o=pi(e),i=t==null||o>=t,a=n==null||o<=n;return i&&a},WS=(e,t,n)=>Gd((pi(e)-t)/n)*n+t,yt=(e,t,n)=>NS(LS(pi(e),t),n),US=(e,t,n)=>(pi(e)-t)/(n-t),GS=(e,t,n,o)=>yt(WS(e*(n-t)+t,t,o),t,n),Qg=(e,t)=>{let n=e,o=t.toString(),i=o.indexOf("."),a=i>=0?o.length-i:0;if(a>0){let r=FS(10,a);n=Gd(n*r)/r}return n},bs=(e,t)=>typeof t=="number"?fx(e*t+.5)/t:Gd(e),em=(e,t,n,o)=>{const i=t!=null?Number(t):0,a=Number(n),r=(e-i)%o;let s=Jg(r)*2>=o?e+BS(r)*(o-Jg(r)):e-r;if(s=Qg(s,o),!Lh(i)&&s<i)s=i;else if(!Lh(a)&&s>a){const l=fx((a-i)/o),c=i+l*o;s=l<=0||c<i?a:c}return Qg(s,o)},ze=(e,t=0,n=10)=>{const o=Math.pow(n,t);return Gd(e*o)/o},tm=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},mx=(e,t,n)=>{let o=t==="+"?e+n:e-n;if(e%1!==0||n%1!==0){const i=10**Math.max(tm(e),tm(n));e=Math.round(e*i),n=Math.round(n*i),o=t==="+"?e+n:e-n,o/=i}return o},qS=(e,t)=>mx(pi(e),"+",t),YS=(e,t)=>mx(pi(e),"-",t),Fo=e=>typeof e=="number"?`${e}px`:e;function qd(e){if(!DS(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]=qd(i))}return n}function Yo(e,t){const n={};for(const o of t){const i=e[o];i!==void 0&&(n[o]=i)}return n}function KS(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 xl=()=>performance.now(),wc,ZS=class{constructor(t){this.onTick=t,Lo(this,"frameId",null),Lo(this,"pausedAtMs",null),Lo(this,"context"),Lo(this,"cancelFrame",()=>{this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null)}),Lo(this,"setStartMs",n=>{this.context.startMs=n}),Lo(this,"start",()=>{if(this.frameId!==null)return;const n=xl();this.pausedAtMs!==null?(this.context.startMs+=n-this.pausedAtMs,this.pausedAtMs=null):this.context.startMs=n,this.frameId=requestAnimationFrame(qg(this,wc))}),Lo(this,"pause",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=xl())}),Lo(this,"stop",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=null)}),CS(this,wc,n=>{if(this.context.now=n,this.context.deltaMs=n-this.context.startMs,this.onTick(this.context)===!1){this.stop();return}this.frameId=requestAnimationFrame(qg(this,wc))}),this.context={now:0,startMs:xl(),deltaMs:0}}get elapsedMs(){return this.pausedAtMs!==null?this.pausedAtMs-this.context.startMs:xl()-this.context.startMs}};wc=new WeakMap;function Ru(e,t){const n=new ZS(({deltaMs:o})=>{if(o>=t)return e(),!1});return n.start(),()=>n.stop()}function Do(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function XS(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function pf(e,t){if(e==null)throw new Error(t())}function ff(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 JS=(...e)=>e.map(t=>{var n;return(n=t?.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),QS=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,nm=e=>{const t={};let n;for(;n=QS.exec(e);)t[n[1]]=n[2];return t},eE=(e,t)=>{if(ms(e)){if(ms(t))return`${e};${t}`;e=nm(e)}else ms(t)&&(t=nm(t));return Object.assign({},e??{},t??{})};function oa(...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]=Rs(n[i],t[i]);continue}if(i==="className"||i==="class"){t[i]=JS(t[i],n[i]);continue}if(i==="style"){t[i]=eE(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 Fh(e,t,n){let o=[],i;return a=>{const r=e(a);return(r.length!==o.length||r.some((s,l)=>!xt(o[l],s)))&&(o=r,i=t(r,a)),i}}function kt(){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 Yd(){return{guards:kt(),createMachine:e=>e,choose:e=>function({choose:t}){var n;return(n=t(e))==null?void 0:n.actions}}}var Ea=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Ea||{}),Vu="__init__";function tE(e){const t=()=>{var o;return((o=e.getRootNode)==null?void 0:o.call(e))??document},n=()=>un(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>gs(t()),isActiveElement:Jc,getById:o=>t().getElementById(o)}}function nE(e){return new Proxy({},{get(t,n){return n==="style"?o=>e({style:o}).style:e}})}var ae=()=>e=>Array.from(new Set(e)),vx=be("accordion").parts("root","item","itemTrigger","itemContent","itemIndicator"),Cr=vx.build(),nd=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`accordion:${e.id}`},oE=(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}`},om=(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}`},od=(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}`},iE=e=>e.getById(nd(e)),Kd=e=>{const t=`[aria-controls][data-ownedby='${CSS.escape(nd(e))}']:not([disabled])`;return ai(iE(e),t)},aE=e=>ja(Kd(e)),rE=e=>Qs(Kd(e)),sE=(e,t)=>uf(Kd(e),od(e,t)),lE=(e,t)=>hf(Kd(e),od(e,t));function cE(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 d(h){let p=h;!c&&p.length>1&&(p=[p[0]]),n({type:"VALUE.SET",value:p})}function u(h){return{expanded:l.includes(h.value),focused:s===h.value,disabled:!!(h.disabled??i("disabled"))}}return{focusedValue:s,value:l,setValue:d,getItemState:u,getRootProps(){return t.element({...Cr.root.attrs,dir:i("dir"),id:nd(a),"data-orientation":i("orientation")})},getItemProps(h){const p=u(h);return t.element({...Cr.item.attrs,dir:i("dir"),id:oE(a,h.value),"data-state":p.expanded?"open":"closed","data-focus":L(p.focused),"data-disabled":L(p.disabled),"data-orientation":i("orientation")})},getItemContentProps(h){const p=u(h);return t.element({...Cr.itemContent.attrs,dir:i("dir"),role:"region",id:om(a,h.value),"aria-labelledby":od(a,h.value),hidden:!p.expanded,"data-state":p.expanded?"open":"closed","data-disabled":L(p.disabled),"data-focus":L(p.focused),"data-orientation":i("orientation")})},getItemIndicatorProps(h){const p=u(h);return t.element({...Cr.itemIndicator.attrs,dir:i("dir"),"aria-hidden":!0,"data-state":p.expanded?"open":"closed","data-disabled":L(p.disabled),"data-focus":L(p.focused),"data-orientation":i("orientation")})},getItemTriggerProps(h){const{value:p}=h,m=u(h);return t.button({...Cr.itemTrigger.attrs,type:"button",dir:i("dir"),id:od(a,p),"aria-controls":om(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":nd(a),onFocus(){m.disabled||n({type:"TRIGGER.FOCUS",value:p})},onBlur(){m.disabled||n({type:"TRIGGER.BLUR"})},onClick(g){m.disabled||(zd()&&g.currentTarget.focus(),n({type:"TRIGGER.CLICK",value:p}))},onKeyDown(g){if(g.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=Ps(g,{dir:i("dir"),orientation:i("orientation")}),y=b[v];y&&(y(g),g.preventDefault())}})}}}var{and:dE,not:uE}=kt(),hE={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:dE("isExpanded","canToggle"),actions:["collapse"]},{guard:uE("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")?Hi(e.get("value"),n.value):[];e.set("value",o)},expand({context:e,prop:t,event:n}){const o=t("multiple")?Co(e.get("value"),n.value):[n.value];e.set("value",o)},focusFirstTrigger({scope:e}){var t;(t=aE(e))==null||t.focus()},focusLastTrigger({scope:e}){var t;(t=rE(e))==null||t.focus()},focusNextTrigger({context:e,scope:t}){const n=e.get("focusedValue");if(!n)return;const o=sE(t,n);o?.focus()},focusPrevTrigger({context:e,scope:t}){const n=e.get("focusedValue");if(!n)return;const o=lE(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&&(Do("The value of accordion should be a single value when multiple is false."),e.set("value",[e.get("value")[0]]))}}}};ae()(["collapsible","dir","disabled","getRootNode","id","ids","multiple","onFocusChange","onValueChange","orientation","value","defaultValue"]);ae()(["value","disabled"]);const pE={default:{},floating:{root:{gap:"12","& > div[data-part='item']":{boxShadow:"stroke-bordered-interactive",borderBottom:"none"}}}},el=ge({slots:[...vx.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:pE},defaultVariants:{variant:"default"}});function fE(e){const t=qs(),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[lk(w0(i))]=(...a)=>e(i,...a);return o}function gE(e){const t=qs(),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=C0(e);return E(()=>{const i={},a=t?.vnode.props??{};return Object.keys(a).forEach(r=>{i[w0(r)]=a[r]}),Object.keys({...n,...i}).reduce((r,s)=>(o.value[s]!==void 0&&(r[s]=o.value[s]),r),{})})}function ct(e,t){const n=gE(e),o=t?fE(t):{};return E(()=>({...n.value,...o}))}const Pe=e=>{const t=Symbol(e);return[n=>Jp(t,n),n=>wt(t,n),t]},[En,ia]=Pe("RenderStrategyProps");function mE(e){const t=qe(e);return t?.$el??t}const vE=e=>Object.prototype.hasOwnProperty.call(e,"nodeName")&&typeof e.nodeName=="string";function Y(){const e=qs(),t=fe(),n=E(()=>{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:mE(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,!(vE(r)||!r)&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>r.$el}),e.exposed=i)}return{forwardRef:a,currentRef:t,currentElement:n}}const bE=T({name:"Dynamic",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var o;if(!n.default)return null;const i=bx(n.default()),[a,...r]=i;if(Object.keys(t).length>0){(o=a.props)==null||delete o.ref;const s=oa(t,a.props??{}),l=ck(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 bx(e){return e?e.flatMap(t=>t.type===$e?bx(t.children):[t]):[]}const yE="br, hr, img, input, area, textarea".split(", "),xE=e=>typeof e=="string"&&yE.includes(e),Mu=e=>T({name:"Polymorphic",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1}},setup(t,{attrs:n,slots:o}){return t.asChild?()=>At(bE,n,o):()=>{var i;return At(e,n,xE(e)||(i=o.default)==null?void 0:i.call(o))}}});function wE(){const e=new Map;return new Proxy(Mu,{apply(t,n,o){return Mu(o[0])},get(t,n){return e.has(n)||e.set(n,Mu(n)),e.get(n)}})}const K=wE(),[yx,tl]=Pe("CollapsibleContext"),CE=T({__name:"collapsible-content",props:{asChild:{type:Boolean}},setup(e){const t=tl();return Y(),(n,o)=>f(t).unmounted?X("",!0):(x(),$(f(K).div,z({key:0},f(t).getContentProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),_E=T({__name:"collapsible-context",setup(e){const t=tl();return(n,o)=>R(n.$slots,"default",st(mt(f(t))))}}),kE=T({__name:"collapsible-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=E(()=>t.value);return yx(n),Y(),(o,i)=>(x(),$(f(K).div,z(n.value.getRootProps(),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}});var $E=be("collapsible").parts("root","trigger","content","indicator"),wl=$E.build(),SE=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`collapsible:${e.id}`},Bh=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`collapsible:${e.id}:content`},EE=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`collapsible:${e.id}:trigger`},_r=e=>e.getById(Bh(e));function OE(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:d,height:u}=i.get("size"),h=!!r("disabled"),p=r("collapsedHeight"),m=r("collapsedWidth"),g=p!=null,b=m!=null,v=g||b,y=!i.get("initial")&&l;return{disabled:h,visible:s,open:l,measureSize(){o({type:"size.measure"})},setOpen(w){n.matches("open")!==w&&o({type:w?"open":"close"})},getRootProps(){return t.element({...wl.root.attrs,"data-state":l?"open":"closed",dir:r("dir"),id:SE(a)})},getContentProps(){return t.element({...wl.content.attrs,id:Bh(a),"data-collapsible":"","data-state":y?void 0:l?"open":"closed","data-disabled":L(h),"data-has-collapsed-size":L(v),hidden:!s&&!v,dir:r("dir"),style:{"--height":Fo(u),"--width":Fo(d),"--collapsed-height":Fo(p),"--collapsed-width":Fo(m),...c&&g&&{overflow:"hidden",minHeight:Fo(p),maxHeight:Fo(p)},...c&&b&&{overflow:"hidden",minWidth:Fo(m),maxWidth:Fo(m)}}})},getTriggerProps(){return t.element({...wl.trigger.attrs,id:EE(a),dir:r("dir"),type:"button","data-state":l?"open":"closed","data-disabled":L(h),"aria-controls":Bh(a),"aria-expanded":s||!1,onClick(w){w.defaultPrevented||h||o({type:l?"close":"open"})}})},getIndicatorProps(){return t.element({...wl.indicator.attrs,dir:r("dir"),"data-state":l?"open":"closed","data-disabled":L(h)})}}}var TE={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=ue(()=>{const i=_r(t);if(!i)return;const a=ii(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=ue(()=>{const i=_r(t);if(!i)return;const a=ii(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=As(i,{animationFillMode:"forwards"});n=()=>{i.removeEventListener("animationend",r),jd(()=>s())}});return()=>{o(),n?.()}},trackTabbableElements:({scope:e,prop:t})=>{if(!t("collapsedHeight")&&!t("collapsedWidth"))return;const n=_r(e);if(!n)return;const o=()=>{const r=Xs(n).map(s=>pS(s,"inert",""));return()=>{r.forEach(s=>s())}};let i=o();const a=nS(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=_r(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=ue(()=>{const a=_r(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"})}}}};ae()(["dir","disabled","getRootNode","id","ids","collapsedHeight","collapsedWidth","onExitComplete","onOpenChange","defaultOpen","open"]);function IE(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}var im={htmlFor:"for",className:"class",onDoubleClick:"onDblclick",onChange:"onInput",onFocus:"onFocusin",onBlur:"onFocusout",defaultValue:"value",defaultChecked:"checked"},PE="viewBox,className,preserveAspectRatio,fillRule,clipPath,clipRule,strokeWidth,strokeLinecap,strokeLinejoin,strokeDasharray,strokeDashoffset,strokeMiterlimit".split(",");function DE(e){return e in im?im[e]:e.startsWith("on")?`on${IE(e.substr(2))}`:PE.includes(e)?e:e.toLowerCase()}var Yt=nE(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 id(e){const t=e().defaultValue??e().value,n=e().isEqual??Object.is,o=Zc(t),i=E(()=>e().value!==void 0),a=Zc(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,d=Zo(r)?r(c):r;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:d,prev:c}),i.value||(o.value=d),n(d,c)||(l=(s=e()).onChange)==null||l.call(s,d,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)}}}id.cleanup=e=>{Qp(()=>e())};id.ref=e=>{let t=e;return{get:()=>t,set:n=>{t=n}}};function AE(e){const t={current:e};return{get(n){return t.current[n]},set(n,o){t.current[n]=o}}}var RE=(e,t)=>{Ne(()=>[...e.map(n=>n())],(n,o)=>{let i=!1;for(let a=0;a<n.length;a++)if(!xt(o[a],qe(n[a]))){i=!0;break}i&&t()})};function Nt(e,t={}){var n,o,i;const a=E(()=>{const{id:A,ids:G,getRootNode:te}=qe(t);return tE({id:A,ids:G,getRootNode:te})}),r=(...A)=>{e.debug&&console.log(...A)},s=E(()=>{var A;return((A=e.props)==null?void 0:A.call(e,{props:qd(qe(t)),get scope(){return a.value}}))??qe(t)}),l=VE(s),c=(n=e.context)==null?void 0:n.call(e,{prop:l,bindable:id,get scope(){return a.value},flush:am,getContext(){return d},getComputed(){return P},getRefs(){return v},getEvent(){return g()}}),d={get(A){var G;return(G=c[A])==null?void 0:G.get()},set(A,G){var te;(te=c[A])==null||te.set(G)},initial(A){var G;return(G=c[A])==null?void 0:G.initial},hash(A){var G,te;const j=(G=c[A])==null?void 0:G.get();return(te=c[A])==null?void 0:te.hash(j)}};let u=new Map,h=null,p={current:null},m={current:{type:""}};const g=()=>({...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,te;const j=S.get();return!!((te=(G=e.states[j])==null?void 0:G.tags)!=null&&te.includes(A))}}),v=AE(((o=e.refs)==null?void 0:o.call(e,{prop:l,context:d}))??{}),y=()=>({state:b(),context:d,event:g(),prop:l,send:H,action:w,guard:C,track:RE,refs:v,computed:P,flush:am,get scope(){return a.value},choose:O}),w=A=>{const G=Zo(A)?A(y()):A;if(!G)return;const te=G.map(j=>{var U,q;const oe=(q=(U=e.implementations)==null?void 0:U.actions)==null?void 0:q[j];return oe||Do(`[zag-js] No implementation found for action "${JSON.stringify(j)}"`),oe});for(const j of te)j?.(y())},C=A=>{var G,te;return Zo(A)?A(y()):(te=(G=e.implementations)==null?void 0:G.guards)==null?void 0:te[A](y())},k=A=>{const G=Zo(A)?A(y()):A;if(!G)return;const te=G.map(U=>{var q,oe;const ne=(oe=(q=e.implementations)==null?void 0:q.effects)==null?void 0:oe[U];return ne||Do(`[zag-js] No implementation found for effect "${JSON.stringify(U)}"`),ne}),j=[];for(const U of te){const q=U?.(y());q&&j.push(q)}return()=>j.forEach(U=>U?.())},O=A=>xc(A).find(G=>{let te=!G.guard;return ms(G.guard)?te=!!C(G.guard):Zo(G.guard)&&(te=G.guard(y())),te}),P=A=>{pf(e.computed,()=>"[zag-js] No computed object found on machine");const G=e.computed[A];return G({context:d,event:g(),prop:l,refs:v,get scope(){return a.value},computed:P})},S=id(()=>({defaultValue:e.initialState({prop:l}),onChange(A,G){var te,j,U;if(G){const oe=u.get(G);oe?.(),u.delete(G)}G&&w((te=e.states[G])==null?void 0:te.exit),w(h?.actions);const q=k((j=e.states[A])==null?void 0:j.effects);if(q&&u.set(A,q),G===Vu){w(e.entry);const oe=k(e.effects);oe&&u.set(Vu,oe)}w((U=e.states[A])==null?void 0:U.entry)}}));let V=Ea.NotStarted;rr(()=>{const A=V===Ea.Started;V=Ea.Started,r(A?"rehydrating...":"initializing..."),S.invoke(S.initial,Vu)}),_0(()=>{V=Ea.Stopped,r("unmounting...");const A=u.values();for(const G of A)G?.();u=new Map,w(e.exit)});const H=A=>{var G,te;if(V!==Ea.Started)return;p.current=m.current,m.current=A;let j=S.get();const U=((G=e.states[j].on)==null?void 0:G[A.type])??((te=e.on)==null?void 0:te[A.type]),q=O(U);if(!q)return;h=q;const oe=q.target??j;r("transition",A.type,q.target||j,`(${q.actions})`);const ne=oe!==j;ne?S.set(oe):q.reenter&&!ne?S.invoke(j,j):w(q.actions)};return(i=e.watch)==null||i.call(e,y()),{state:b(),send:H,context:d,prop:l,get scope(){return a.value},refs:v,computed:P,event:g(),getStatus:()=>V}}function VE(e){return function(t){return e.value[t]}}var am=e=>{io().then(()=>{e()})};const[zG,Kt]=Pe("EnvironmentContext"),Zt=E(()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})),hn=E(()=>({dir:"ltr",locale:"en-US"})),[HG,pn]=Pe("LocaleContext"),On=e=>{const t={};for(const[n,o]of Object.entries(e))o!==void 0&&(t[n]=o);return t},ME=(e={},t)=>{const n=Mt(),o=Kt(Zt),i=pn(hn),a=E(()=>{const c=qe(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,...On(c),onExitComplete:()=>{var d;t?.("exitComplete"),(d=c.onExitComplete)==null||d.call(c)},onOpenChange:d=>{var u;t?.("openChange",d),t?.("update:open",d.open),(u=c.onOpenChange)==null||u.call(c,d)}}}),r=Nt(TE,a),s=E(()=>OE(r,Yt)),l=fe(!1);return Ne(()=>s.value.visible,()=>{s.value.visible&&(l.value=!0)}),E(()=>{const c=qe(e);return{...s.value,unmounted:!s.value.visible&&!l.value&&c.lazyMount||c.unmountOnExit&&!s.value.visible&&l.value}})},NE=T({__name:"collapsible-root",props:dn({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=ME(e,t);return yx(n),Y(),(o,i)=>(x(),$(f(K).div,z(f(n).getRootProps(),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),LE=T({__name:"collapsible-trigger",props:{asChild:{type:Boolean}},setup(e){const t=tl();return Y(),(n,o)=>(x(),$(f(K).button,z(f(t).getTriggerProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),FE=T({__name:"collapsible-indicator",props:{asChild:{type:Boolean}},setup(e){const t=tl();return Y(),(n,o)=>(x(),$(f(K).div,z(f(t).getIndicatorProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),Zd=Object.freeze(Object.defineProperty({__proto__:null,Content:CE,Context:_E,Indicator:FE,Root:NE,RootProvider:kE,Trigger:LE},Symbol.toStringTag,{value:"Module"})),[xx,nl]=Pe("AccordionContext"),[BE,zE]=Pe("AccordionItemContext"),[HE,gf]=Pe("AccordionItemPropsContext"),wx=T({__name:"accordion-item",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=nl(),n=e,o=E(()=>t.value.getItemState(n)),i=ia(),a=E(()=>t.value.getItemContentProps(n));return BE(o),HE(n),Y(),(r,s)=>(x(),$(f(Zd).Root,z(f(t).getItemProps(n),{open:o.value.expanded,"lazy-mount":f(i).lazyMount,"unmount-on-exit":f(i).unmountOnExit,ids:{content:a.value.id}}),{default:_(()=>[R(r.$slots,"default")]),_:3},16,["open","lazy-mount","unmount-on-exit","ids"]))}}),jE=T({__name:"AccordionItem",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=ct(e),n=E(()=>el());return(o,i)=>(x(),$(f(wx),z(f(t),{class:[n.value.item],"data-testid":"atlantis-accordion-item"}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["class"]))}}),Cx=()=>(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}]),_x=T({__name:"accordion-item-content",props:{asChild:{type:Boolean}},setup(e){const t=Cx(),n=nl(),o=gf(),i=E(()=>{const a=n.value.getItemContentProps(o),[,r]=t(a,["hidden","data-state"]);return r});return Y(),(a,r)=>(x(),$(f(Zd).Content,z(i.value,{"as-child":e.asChild}),{default:_(()=>[R(a.$slots,"default")]),_:3},16,["as-child"]))}}),WE=T({__name:"AccordionItemContent",props:{asChild:{type:Boolean}},setup(e){const t=ct(e),n=E(()=>el());return(o,i)=>(x(),$(f(_x),z(f(t),{class:[n.value.itemContent],"data-testid":"atlantis-accordion-item-content"}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["class"]))}}),UE={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",preserveAspectRatio:"none"};function GE(e,t){return x(),D("svg",UE,[...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 kx={render:GE},$x=T({__name:"accordion-item-indicator",props:{asChild:{type:Boolean}},setup(e){const t=nl(),n=gf();return Y(),(o,i)=>(x(),$(f(K).div,z(f(t).getItemIndicatorProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),qE=T({__name:"AccordionItemIndicator",props:{asChild:{type:Boolean}},setup(e){const t=ct(e),n=E(()=>el());return(o,i)=>(x(),$(f($x),z(f(t),{class:[n.value.itemIndicator],"data-testid":"atlantis-accordion-item-indicator"}),{default:_(()=>[R(o.$slots,"default",{},()=>[F(f(kx))])]),_:3},16,["class"]))}}),Sx=T({__name:"accordion-item-trigger",props:{asChild:{type:Boolean}},setup(e){const t=nl(),n=gf(),o=tl(),i=E(()=>{const{"aria-controls":a,...r}=t.value.getItemTriggerProps(n);return{...r,...o.value.unmounted?{}:{"aria-controls":a}}});return Y(),(a,r)=>(x(),$(f(K).button,z(i.value,{"as-child":e.asChild}),{default:_(()=>[R(a.$slots,"default")]),_:3},16,["as-child"]))}}),YE=T({__name:"AccordionItemTrigger",props:{asChild:{type:Boolean}},setup(e){const t=ct(e),n=Ys(),o=E(()=>el());return(i,a)=>(x(),$(f(Sx),z(f(t),{class:[o.value.itemTrigger],"data-testid":"atlantis-accordion-item-trigger"}),{default:_(()=>[f(n).prefix?(x(),D("div",{key:0,class:M(o.value.itemTriggerPrefix)},[R(i.$slots,"prefix")],2)):X("",!0),N("div",{class:M([o.value.itemTriggerContent])},[R(i.$slots,"default")],2)]),_:3},16,["class"]))}}),KE=T({__name:"accordion-context",setup(e){const t=nl();return(n,o)=>R(n.$slots,"default",st(mt(f(t))))}}),ZE=T({__name:"accordion-item-context",setup(e){const t=zE();return(n,o)=>R(n.$slots,"default",st(mt(f(t))))}}),XE=T({__name:"accordion-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=E(()=>t.value);return xx(n),En(E(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),Y(),(o,i)=>(x(),$(f(K).div,z(n.value.getRootProps(),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),JE=(e={},t)=>{const n=Mt(),o=Kt(Zt),i=pn(hn),a=E(()=>{const s=qe(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,onFocusChange:l=>t?.("focusChange",l),value:s.modelValue,...On(s),onValueChange:l=>{var c;t?.("valueChange",l),t?.("update:modelValue",l.value),(c=s?.onValueChange)==null||c.call(s,l)}}}),r=Nt(hE,a);return E(()=>cE(r,Yt))},QE=T({__name:"accordion-root",props:dn({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=JE(n,t);return xx(o),En(E(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Y(),(i,a)=>(x(),$(f(K).div,z(f(o).getRootProps(),{"as-child":e.asChild}),{default:_(()=>[R(i.$slots,"default")]),_:3},16,["as-child"]))}}),eO=Object.freeze(Object.defineProperty({__proto__:null,Context:KE,Item:wx,ItemContent:_x,ItemContext:ZE,ItemIndicator:$x,ItemTrigger:Sx,Root:QE,RootProvider:XE},Symbol.toStringTag,{value:"Module"})),tO=T({__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=ct(n,t),i=E(()=>el({variant:n.variant}));return(a,r)=>(x(),$(f(eO).Root,z(f(o),{class:[i.value.root],"data-testid":"atlantis-accordion-root"}),{default:_(()=>[R(a.$slots,"default")]),_:3},16,["class"]))}}),nO=be("field").parts("root","errorText","helperText","input","label","select","textarea","requiredIndicator");nO.build();const[jG,ro]=Pe("FieldContext");function oO(e){if(!e)return;const t=ii(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 iO(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 aO(e){if(!e)return;const t=un(e),n=Ke(e),o=iO(t),i=oO(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 Ex=(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))(Ex||{});const rO={default:{},inverted:{color:"text.inverse",background:"background.neutral-default",boxShadow:"inner-highlighted-ring"}},sO=na({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:rO}}),ad=T({__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 Ex[s]||r},i=fe("windows");Ne(()=>t.forcePlatform,r=>{r&&(i.value=r)}),rr(()=>{t.forcePlatform?i.value=t.forcePlatform:typeof navigator<"u"&&(i.value=navigator.userAgent.toLowerCase().includes("mac")?"mac":"windows")});const a=E(()=>t.macKeys||t.windowsKeys?i.value==="mac"?t.macKeys??[]:t.windowsKeys??[]:t.keys??[]);return(r,s)=>(x(),D("div",{class:M(f(Dt)({display:"flex",columnGap:"3"}))},[(x(!0),D($e,null,Ie(a.value,l=>(x(),D("div",{key:l,class:M(f(sO)({type:e.type}))},ie(o(l)),3))),128))],2))}}),lO=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"}}),cO=["aria-label"],dO=["fill"],uO=["fill"],Ox=T({__name:"Spinner",props:{variant:{default:"default"},size:{default:"md"},ariaLabel:{default:"Loading"}},setup(e){const t=e,n=E(()=>lO({variant:t.variant,size:t.size})),o=E(()=>t.variant==="default"?"var(--colors-icon-selected)":"var(--colors-icon-inverse)");return(i,a)=>(x(),D("div",{class:M(n.value.root),"aria-label":t.ariaLabel,role:"status","data-testid":"spinner"},[(x(),D("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:M([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,dO)],2)),N("div",{class:M([n.value.rotationWrapper,"spinner-rotate"])},[(x(),D("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:M(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,uO)],2))],2)],10,cO))}}),hO=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"}}}}}),pO=T({__name:"ButtonText",props:{text:{},variant:{default:"primary"}},setup(e){const t=e,n=E(()=>hO({variant:t.variant}));return(o,i)=>(x(),D("span",{class:M(n.value.root)},[R(o.$slots,"default",{},()=>[Re(ie(t.text),1)])],2))}}),pt={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"}}},rm={default:{width:"32",height:"32"},small:{width:"24",height:"24"}},fO=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:pt.primary,spinner:{}},critical:{root:pt.critical},default:{root:pt.default},subtle:{root:pt.subtle},plainPrimary:{root:pt.plainPrimary},plainCritical:{root:pt.plainCritical},dashed:{root:pt.dashed},validation:{root:pt.validation},link:{root:pt.link}},size:{default:{root:{px:"12",py:"6",gap:"6"}},small:{root:{px:"8",py:"2",gap:"6"}}}}}),gO=["disabled","data-loading","data-selected","aria-busy"],Ut=T({__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=Ys(),n=e,o=E(()=>fO({type:n.type,size:n.size})),i=E(()=>n.type==="primary"||n.type==="validation"||n.type==="critical"?"inverted":"default"),a=E(()=>t.prefix),r=E(()=>t.suffix);return(s,l)=>(x(),D("button",{disabled:n.isDisabled,"data-loading":n.isLoading||null,"data-selected":n.isSelected||null,"aria-busy":n.isLoading||void 0,class:M([o.value.root,f(Dt)(n.isSelected?{background:"background.brand-selected !important",color:"text.selected !important"}:{})])},[N("div",{class:M([o.value.content,n.isLoading?f(Dt)({position:"relative"}):""])},[a.value?(x(),D("div",{key:0,class:M([o.value.slots,n.isLoading?f(Dt)({visibility:"hidden"}):""])},[R(s.$slots,"prefix")],2)):X("",!0),n.isLoading?(x(),$(Ox,{key:1,class:M([o.value.spinner,n.isLoading?f(Dt)({position:"absolute",transform:"translate(-50%, -50%)",top:"50%",left:"50%"}):""]),variant:i.value,"data-loading":n.isLoading||null},null,8,["class","variant","data-loading"])):X("",!0),N("div",{class:M([a.value?f(Dt)({paddingRight:"2",display:"inline-flex"}):"",r.value?f(Dt)({paddingLeft:"2",display:"inline-flex"}):"",o.value.label,n.isLoading?f(Dt)({visibility:"hidden"}):""])},[R(s.$slots,"default",{},()=>[n.label?(x(),$(pO,{key:0,text:n.label,variant:n.type},null,8,["text","variant"])):X("",!0)])],2),r.value?(x(),D("div",{key:2,class:M([o.value.slots,n.isLoading?f(Dt)({visibility:"hidden"}):""])},[R(s.$slots,"suffix")],2)):X("",!0),n.shortcutKeys?(x(),D("div",{key:3,class:M([n.isLoading?f(Dt)({visibility:"hidden"}):""])},[F(ad,{type:"default",keys:n.shortcutKeys},null,8,["keys"])],2)):X("",!0)],2)],10,gO))}}),mO={default:{},error:{root:{boxShadow:"state-focus-critical",_focusWithin:{boxShadow:"state-focus-critical"},_focus:{boxShadow:"state-focus-critical"}}}},vO={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:vO,state:mO,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 bO=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},yO=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:pt.primary},critical:{root:pt.critical},default:{root:pt.default},subtle:{root:pt.subtle},dashed:{root:pt.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:rm.default},small:{root:rm.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"}}}]}),xO=["disabled","data-selected"],Ii=T({__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=E(()=>yO({type:n.type,size:n.size}));return(r,s)=>(x(),D("button",{disabled:n.isDisabled,"data-selected":n.isSelected||null,"aria-label":"Icon button",onClick:i,class:M([a.value.root,f(Dt)(n.isSelected?{background:"background.brand-selected !important",color:"text.selected !important"}:{})])},[N("div",{class:M(a.value.content)},[R(r.$slots,"prefixIcon")],2)],10,xO))}});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 wO=be("avatar").parts("root","image","fallback");wO.build();ae()(["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 CO=Object.defineProperty,_O=(e,t,n)=>t in e?CO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uo=(e,t,n)=>_O(e,typeof t!="symbol"?t+"":t,n),sm=class ht{constructor([t,n,o,i,a,r]=[0,0,0,0,0,0]){uo(this,"m00"),uo(this,"m01"),uo(this,"m02"),uo(this,"m10"),uo(this,"m11"),uo(this,"m12"),uo(this,"rotate",(...s)=>this.prepend(ht.rotate(...s))),uo(this,"scale",(...s)=>this.prepend(ht.scale(...s))),uo(this,"translate",(...s)=>this.prepend(ht.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 ht([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 ht([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 ht([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 ht([1,0,0,0,1,0])}static rotate(t,n){const o=new ht([Math.cos(t),-Math.sin(t),0,Math.sin(t),Math.cos(t),0]);return n&&(n.x!==0||n.y!==0)?ht.multiply(ht.translate(n.x,n.y),o,ht.translate(-n.x,-n.y)):o}static scale(t,n=t,o={x:0,y:0}){const i=new ht([t,0,0,0,n,0]);return o.x!==0||o.y!==0?ht.multiply(ht.translate(o.x,o.y),i,ht.translate(-o.x,-o.y)):i}static translate(t,n){return new ht([1,0,t,0,1,n])}static multiply(...[t,...n]){return t?n.reduce((o,i)=>o.prepend(i),t):ht.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})`}},lm=(e,t,n)=>Math.min(Math.max(e,t),n),Cl=(e,t,n)=>{const o=lm(e.x,n.x,n.x+n.width-t.width),i=lm(e.y,n.y,n.y+n.height-t.height);return{x:o,y:i}},kO={width:0,height:0},$O={width:1/0,height:1/0},_l=(e,t=kO,n=$O)=>({width:Math.min(Math.max(e.width,t.width),n.width),height:Math.min(Math.max(e.height,t.height),n.height)}),Mi=(e,t)=>({x:e,y:t}),cm=(e,t)=>t?Mi(e.x-t.x,e.y-t.y):e,SO=(e,t)=>Mi(e.x+t.x,e.y+t.y);function ol(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:Mi(a,r)}}function EO(e){const t=Mi(e.minX,e.minY),n=Mi(e.maxX,e.minY),o=Mi(e.maxX,e.maxY),i=Mi(e.minX,e.maxY);return{top:t,right:n,bottom:o,left:i}}var OO=(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)}},TO=(e,t)=>e.width===t?.width&&e.height===t?.height,IO=(e,t)=>e.x===t?.x&&e.y===t?.y,Nu=new WeakMap;function PO(e){if(!Nu.has(e)){const t=e.ownerDocument.defaultView||window;Nu.set(e,t.getComputedStyle(e))}return Nu.get(e)}function Tx(e,t={}){return ol(DO(e,t))}function DO(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=PO(e),{borderLeftWidth:d,borderTopWidth:u,borderRightWidth:h,borderBottomWidth:p}=c,m=dm(d,h),g=dm(u,p);if(o&&(l.width-=m,l.height-=g,l.x+=zh(d),l.y+=zh(u)),n){const b=e.offsetWidth-e.clientWidth-m,v=e.offsetHeight-e.clientHeight-g;l.width-=b,l.height-=v}return l}var zh=e=>parseFloat(e.replace("px","")),dm=(...e)=>e.reduce((t,n)=>t+(n?zh(n):0),0);function AO(e,t={}){return ol(RO(e,t))}function RO(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 d=o-a.documentElement.clientWidth,u=i-a.documentElement.clientHeight;c.width-=d,c.height-=u}return c}function VO(e,t){const n=ol(e),{top:o,right:i,left:a,bottom:r}=EO(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 MO(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,d=e[r].y;l>o!=d>o&&n<(c-s)*(o-l)/(d-l)+s&&(i=!i)}return i}var um={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}},NO={n:"s",ne:"sw",e:"w",se:"nw",s:"n",sw:"ne",w:"e",nw:"se"},{sign:kl,abs:Fa,min:hm}=Math;function pm(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 LO(e){return NO[e]}function FO(e,t,n,o){const{scalingOriginMode:i,lockAspectRatio:a}=o,r=pm(e,n),s=LO(n),l=pm(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},d={x:um[n].x*2-1,y:um[n].y*2-1},u={width:c.x-l.x,height:c.y-l.y},h=d.x*u.width/e.width,p=d.y*u.height/e.height,m=Fa(h)>Fa(p)?h:p,g=a?{x:m,y:m}:{x:r.x===l.x?1:h,y:r.y===l.y?1:p};switch(r.y===l.y?g.y=Fa(g.y):kl(g.y)!==kl(p)&&(g.y*=-1),r.x===l.x?g.x=Fa(g.x):kl(g.x)!==kl(h)&&(g.x*=-1),i){case"extent":return fm(e,sm.scale(g.x,g.y,l),!1);case"center":return fm(e,sm.scale(g.x,g.y,{x:e.midX,y:e.midY}),!1)}}function BO(e,t,n=!0){return n?{x:hm(t.x,e.x),y:hm(t.y,e.y),width:Fa(t.x-e.x),height:Fa(t.y-e.y)}:{x:e.x,y:e.y,width:t.x-e.x,height:t.y-e.y}}function fm(e,t,n=!0){const o=t.applyTo({x:e.minX,y:e.minY}),i=t.applyTo({x:e.maxX,y:e.maxY});return BO(o,i,n)}var zO=be("angle-slider").parts("root","label","thumb","valueText","control","track","markerGroup","marker");zO.build();ae()(["aria-label","aria-labelledby","dir","disabled","getRootNode","id","ids","invalid","name","onValueChange","onValueChangeEnd","readOnly","step","value","defaultValue"]);function HO(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 jO={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",ii(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"});ue(()=>{var r,s;const l=$l(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})=>{ue(()=>{e.set("prevAnimationName",$l(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,d;(((d=(c=l.composedPath)==null?void 0:c.call(l))==null?void 0:d[0])??l.target)===i&&e.set("prevAnimationName",$l(t.get("styles")))},r=l=>{const c=$l(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=As(i,{animationFillMode:"forwards"});return()=>{i.removeEventListener("animationstart",a),i.removeEventListener("animationcancel",r),i.removeEventListener("animationend",r),jd(()=>s())}}}}};function $l(e){return e?.animationName||"none"}ae()(["onExitComplete","present","immediate"]);const il=(e,t)=>{const n=fe(!1),o=fe(null),i=E(()=>({present:qe(e).present,onExitComplete:()=>{}})),a=Nt(jO,i),r=E(()=>HO(a));return Ne(()=>r.value.present,()=>{r.value.present&&(n.value=!0)}),Ne(o,()=>{if(o.value){const s=o.value.$el?o.value.$el:o.value;s&&r.value.setNode(s)}}),E(()=>{var s;const l=qe(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"}}})},[Xd,Jd]=Pe("PresenceContext");var ga=new WeakMap,Sl=new WeakMap,El={},Lu=0,Ix=e=>e&&(e.host||Ix(e.parentNode)),WO=(e,t)=>t.map(n=>{if(e.contains(n))return n;const o=Ix(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),UO=new Set(["script","output","status","next-route-announcer"]),GO=e=>UO.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),qO=(e,t)=>{const{parentNode:n,markerName:o,controlAttribute:i,followControlledElements:a=!0}=t,r=WO(n,Array.isArray(e)?e:[e]);El[o]||(El[o]=new WeakMap);const s=El[o],l=[],c=new Set,d=new Set(r),u=p=>{!p||c.has(p)||(c.add(p),u(p.parentNode))};r.forEach(p=>{u(p),a&&et(p)&&H0(p,m=>{u(m)})});const h=p=>{!p||d.has(p)||Array.prototype.forEach.call(p.children,m=>{if(c.has(m))h(m);else try{if(GO(m))return;const g=m.getAttribute(i)==="true",b=(ga.get(m)||0)+1,v=(s.get(m)||0)+1;ga.set(m,b),s.set(m,v),l.push(m),b===1&&g&&Sl.set(m,!0),v===1&&m.setAttribute(o,""),g||m.setAttribute(i,"true")}catch(g){console.error("[zag-js > ariaHidden] cannot operate on ",m,g)}})};return h(n),c.clear(),Lu++,()=>{l.forEach(p=>{const m=ga.get(p)-1,g=s.get(p)-1;ga.set(p,m),s.set(p,g),m||(Sl.has(p)||p.removeAttribute(i),Sl.delete(p)),g||p.removeAttribute(o)}),Lu--,Lu||(ga=new WeakMap,ga=new WeakMap,Sl=new WeakMap,El={})}},YO=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,KO=(e,t=YO(e),n="data-aria-hidden",o=!0)=>{if(t)return qO(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:o})},ZO=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function Px(e,t={}){const{defer:n=!0}=t,o=n?ZO:a=>a(),i=[];return i.push(o(()=>{const a=(typeof e=="function"?e():e).filter(Boolean);a.length!==0&&i.push(KO(a))})),()=>{i.forEach(a=>a?.())}}function XO(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 JO(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 gm="pointerdown.outside",mm="focus.outside";function QO(e){for(const t of e)if(et(t)&&Oo(t))return!0;return!1}var Dx=e=>"clientY"in e;function eT(e,t){if(!Dx(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 tT(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function vm(e,t){if(!t||!Dx(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 tT(r,s)?o||a:!1}function nT(e,t){const{exclude:n,onFocusOutside:o,onPointerDownOutside:i,onInteractOutside:a,defer:r,followControlledElements:s=!0}=t;if(!e)return;const l=un(e),c=Ke(e),d=XO(c),u=JO(c);function h(w,C){if(!et(C)||!C.isConnected||Rt(e,C)||eT(e,w)||s&&z0(e,C))return!1;const k=l.querySelector(`[aria-controls="${e.id}"]`);if(k){const P=ed(k);if(vm(w,P))return!1}const O=ed(e);return vm(w,O)?!1:!(n!=null&&n(C))}const p=new Set,m=Ya(e?.getRootNode());function g(w){function C(k){var O;const P=r&&!Ug()?ue:H=>H(),S=k??w,V=((O=S?.composedPath)==null?void 0:O.call(S))??[S?.target];P(()=>{const H=m?V[0]:je(w);if(!(!e||!h(w,H))){if(i||a){const A=Rs(i,a);e.addEventListener(gm,A,{once:!0})}bm(e,gm,{bubbles:!1,cancelable:!0,detail:{originalEvent:S,contextmenu:M$(S),focusable:QO(V),target:H}})}})}w.pointerType==="touch"?(p.forEach(k=>k()),p.add(Ee(l,"click",C,{once:!0})),p.add(u.addEventListener("click",C,{once:!0})),p.add(d.addEventListener("click",C,{once:!0}))):C()}const b=new Set,v=setTimeout(()=>{b.add(Ee(l,"pointerdown",g,!0)),b.add(u.addEventListener("pointerdown",g,!0)),b.add(d.addEventListener("pointerdown",g,!0))},0);function y(w){(r?ue:C=>C())(()=>{var C;const k=((C=w?.composedPath)==null?void 0:C.call(w))??[w?.target],O=m?k[0]:je(w);if(!(!e||!h(w,O))){if(o||a){const P=Rs(o,a);e.addEventListener(mm,P,{once:!0})}bm(e,mm,{bubbles:!1,cancelable:!0,detail:{originalEvent:w,contextmenu:!1,focusable:Oo(O),target:O}})}})}return Ug()||(b.add(Ee(l,"focusin",y,!0)),b.add(u.addEventListener("focusin",y,!0)),b.add(d.addEventListener("focusin",y,!0))),()=>{clearTimeout(v),p.forEach(w=>w()),b.forEach(w=>w())}}function mf(e,t){const{defer:n}=t,o=n?ue:a=>a(),i=[];return i.push(o(()=>{const a=typeof e=="function"?e():e;i.push(nT(a,t))})),()=>{i.forEach(a=>a?.())}}function bm(e,t,n){const o=e.ownerDocument.defaultView||window,i=new o.CustomEvent(t,n);return e.dispatchEvent(i)}function oT(e,t){const n=o=>{o.key==="Escape"&&(o.isComposing||t==null||t(o))};return Ee(un(e),"keydown",n,{capture:!0})}var ym="layer:request-dismiss",Wt={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=>Wt.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];aT(e,ym,i=>{var a;(a=o.requestDismiss)==null||a.call(o,i),i.defaultPrevented||o==null||o.dismiss()}),iT(e,ym,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function iT(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 aT(e,t,n){e.addEventListener(t,n,{once:!0})}var xm;function wm(){Wt.layers.forEach(({node:e})=>{e.style.pointerEvents=Wt.isBelowPointerBlockingLayer(e)?"none":"auto"})}function rT(e){e.style.pointerEvents=""}function sT(e,t){const n=un(e),o=[];return Wt.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(xm=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t?.forEach(i=>{const[a,r]=bS(()=>{const s=i();return et(s)?s:null},{timeout:1e3});a.then(s=>o.push(As(s,{pointerEvents:"auto"}))),o.push(r)}),()=>{Wt.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=xm,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),o.forEach(i=>i()))}}function lT(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Do("[@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};Wt.add(c),wm();function d(g){var b,v;const y=je(g.detail.originalEvent);Wt.isBelowPointerBlockingLayer(e)||Wt.isInBranch(y)||((b=t.onPointerDownOutside)==null||b.call(t,g),(v=t.onInteractOutside)==null||v.call(t,g),!g.defaultPrevented&&(s&&console.log("onPointerDownOutside:",g.detail.originalEvent),o?.()))}function u(g){var b,v;const y=je(g.detail.originalEvent);Wt.isInBranch(y)||((b=t.onFocusOutside)==null||b.call(t,g),(v=t.onInteractOutside)==null||v.call(t,g),!g.defaultPrevented&&(s&&console.log("onFocusOutside:",g.detail.originalEvent),o?.()))}function h(g){var b;Wt.isTopMost(e)&&((b=t.onEscapeKeyDown)==null||b.call(t,g),!g.defaultPrevented&&o&&(g.preventDefault(),o()))}function p(g){var b;if(!e)return!1;const v=typeof r=="function"?r():r,y=Array.isArray(v)?v:[v],w=(b=t.persistentElements)==null?void 0:b.map(C=>C()).filter(et);return w&&y.push(...w),y.some(C=>Rt(C,g))||Wt.isInNestedLayer(e,g)}const m=[a?sT(e,t.persistentElements):void 0,oT(e,h),mf(e,{exclude:p,onFocusOutside:u,onPointerDownOutside:d,defer:t.defer})];return()=>{Wt.remove(e),wm(),rT(e),m.forEach(g=>g?.())}}function aa(e,t){const{defer:n}=t,o=n?ue:a=>a(),i=[];return i.push(o(()=>{const a=Zo(e)?e():e;i.push(lT(a,t))})),()=>{i.forEach(a=>a?.())}}function Ax(e,t={}){const{defer:n}=t,o=n?ue:a=>a(),i=[];return i.push(o(()=>{const a=Zo(e)?e():e;if(!a){Do("[@zag-js/dismissable] branch node is `null` or `undefined`");return}Wt.addBranch(a),i.push(()=>{Wt.removeBranch(a)})})),()=>{i.forEach(a=>a?.())}}var cT=Object.defineProperty,dT=(e,t,n)=>t in e?cT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ue=(e,t,n)=>dT(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=[],hT=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||Md(a))r&&(this.state.mostRecentlyFocusedNode=a);else{i.stopImmediatePropagation();let s,l=!0;if(this.state.mostRecentlyFocusedNode)if(wr(this.state.mostRecentlyFocusedNode)>0){const c=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:d}=this.state.containerGroups[c];if(d.length>0){const u=d.findIndex(h=>h===this.state.mostRecentlyFocusedNode);u>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?u+1<d.length&&(s=d[u+1],l=!1):u-1>=0&&(s=d[u-1],l=!1))}}else this.state.containerGroups.some(c=>c.tabbableNodes.some(d=>wr(d)>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($r(this.config.clickOutsideDeactivates,i)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}$r(this.config.allowOutsideClick,i)||i.preventDefault()}}),Ue(this,"handleClick",i=>{const a=je(i);this.findContainerIndex(a,i)>=0||$r(this.config.clickOutsideDeactivates,i)||$r(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;kr(i)&&i.preventDefault(),this.tryFocus(r)}}),Ue(this,"handleEscapeKey",i=>{pT(i)&&$r(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 k$(l)?!0:l.id&&!this.state.containers.some(c=>c.contains(l))?$$(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&&!Oo(i)){const a=gs(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!==gs(this.doc)){if(!i||!i.focus){this.tryFocus(this.getInitialFocusNode());return}i.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=i,fT(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 d=()=>{_m(()=>{if(c){const u=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(u)}s?.()})};if(c&&l){const u=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(u).then(d,d),this}return d(),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),d=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 u=this.state.tabbableGroups.findIndex(({firstTabbableNode:h})=>s===h);if(u<0&&(d?.container===s||Oo(s)&&!Ri(s)&&!(d!=null&&d.nextTabbableNode(s,!1)))&&(u=c),u>=0){const h=u===0?this.state.tabbableGroups.length-1:u-1,p=this.state.tabbableGroups[h];l=wr(s)>=0?p.lastTabbableNode:p.lastDomTabbableNode}else kr(a)||(l=d?.nextTabbableNode(s,!1))}else{let u=this.state.tabbableGroups.findIndex(({lastTabbableNode:h})=>s===h);if(u<0&&(d?.container===s||Oo(s)&&!Ri(s)&&!(d!=null&&d.nextTabbableNode(s)))&&(u=c),u>=0){const h=u===this.state.tabbableGroups.length-1?0:u+1,p=this.state.tabbableGroups[h];l=wr(s)>=0?p.firstTabbableNode:p.firstDomTabbableNode}else kr(a)||(l=d?.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 kr(i)&&!i.shiftKey},isKeyBackward(i){return kr(i)&&i.shiftKey},...n};this.doc=o.document||un(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=>{w$(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?z0(t,n):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(t=>{const n=Xs(t,{getShadowRoot:this.config.getShadowRoot}),o=X0(t,{getShadowRoot:this.config.getShadowRoot}),i=n[0],a=n[n.length-1],r=i,s=a;let l=!1;for(let d=0;d<n.length;d++)if(wr(n[d])>0){l=!0;break}function c(d,u=!0){const h=n.indexOf(d);if(h>=0)return n[h+(u?1:-1)];const p=o.indexOf(d);if(!(p<0)){if(u){for(let m=p+1;m<o.length;m++)if(Ri(o[m]))return o[m]}else for(let m=p-1;m>=0;m--)if(Ri(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?_m(()=>{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=gs(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)}},kr=e=>e.key==="Tab",$r=(e,...t)=>typeof e=="function"?e(...t):e,pT=e=>!e.isComposing&&e.key==="Escape",_m=e=>setTimeout(e,0),fT=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function Rx(e,t={}){let n;const o=ue(()=>{const i=typeof e=="function"?e():e;if(i){n=new hT(i,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:i,...t,document:un(i)});try{n.activate()}catch{}}});return function(){n?.deactivate(),o()}}var Fu="data-scroll-lock";function gT(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function km(e){const t=ii(e),n=t?.scrollbarGutter;return n==="stable"||n?.startsWith("stable ")===!0}function mT(e){const t=e??document,n=t.defaultView??window,{documentElement:o,body:i}=t;if(i.hasAttribute(Fu))return;const a=km(o)||km(i),r=n.innerWidth-o.clientWidth;i.setAttribute(Fu,"");const s=()=>fS(o,"--scrollbar-width",`${r}px`),l=gT(o),c=()=>{const h={overflow:"hidden"};return!a&&r>0&&(h[l]=`${r}px`),As(i,h)},d=()=>{const{scrollX:h,scrollY:p,visualViewport:m}=n,g=m?.offsetLeft??0,b=m?.offsetTop??0,v={position:"fixed",overflow:"hidden",top:`${-(p-Math.floor(b))}px`,left:`${-(h-Math.floor(g))}px`,right:"0"};!a&&r>0&&(v[l]=`${r}px`);const y=As(i,v);return()=>{y?.(),n.scrollTo({left:h,top:p,behavior:"instant"})}},u=[s(),Fd()?d():c()];return()=>{u.forEach(h=>h?.()),i.removeAttribute(Fu)}}var vT=be("bottom-sheet").parts("content","title","trigger","backdrop","grabber","grabberIndicator","closeTrigger");vT.build();ae()(["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 bT=be("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger");bT.build();ae()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]);ae()(["index","readOnly"]);ae()(["index","snapAlign"]);const[Vx,al]=Pe("CheckboxContext"),yT=T({__name:"checkbox-context",setup(e){const t=al();return(n,o)=>R(n.$slots,"default",st(mt(f(t))))}}),xT=T({__name:"checkbox-control",props:{asChild:{type:Boolean}},setup(e){const t=al();return Y(),(n,o)=>(x(),$(f(K).div,z(f(t).getControlProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}});function wT(e){return!(e.metaKey||!Bd()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}var CT=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function _T(e,t,n){const o=n?je(n):null,i=Ke(o);return e=e||o instanceof i.HTMLInputElement&&!CT.has(o?.type)||o instanceof i.HTMLTextAreaElement||o instanceof i.HTMLElement&&o.isContentEditable,!(e&&t==="keyboard"&&n instanceof i.KeyboardEvent&&!Reflect.has(kT,n.key))}var fi=null,Hh=new Set,rd=new Map,qi=!1,jh=!1,kT={Tab:!0,Escape:!0};function Qd(e,t){for(let n of Hh)n(e,t)}function sd(e){qi=!0,wT(e)&&(fi="keyboard",Qd("keyboard",e))}function Cn(e){fi="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(qi=!0,Qd("pointer",e))}function Mx(e){V$(e)&&(qi=!0,fi="virtual")}function Nx(e){const t=je(e);t===Ke(t)||t===un(t)||(!qi&&!jh&&(fi="virtual",Qd("virtual",e)),qi=!1,jh=!1)}function Lx(){qi=!1,jh=!0}function $T(e){if(typeof window>"u"||rd.get(Ke(e)))return;const t=Ke(e),n=un(e);let o=t.HTMLElement.prototype.focus;function i(){fi="virtual",Qd("virtual",null),qi=!0,o.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:i})}catch{}n.addEventListener("keydown",sd,!0),n.addEventListener("keyup",sd,!0),n.addEventListener("click",Mx,!0),t.addEventListener("focus",Nx,!0),t.addEventListener("blur",Lx,!1),typeof t.PointerEvent<"u"?(n.addEventListener("pointerdown",Cn,!0),n.addEventListener("pointermove",Cn,!0),n.addEventListener("pointerup",Cn,!0)):(n.addEventListener("mousedown",Cn,!0),n.addEventListener("mousemove",Cn,!0),n.addEventListener("mouseup",Cn,!0)),t.addEventListener("beforeunload",()=>{ST(e)},{once:!0}),rd.set(t,{focus:o})}var ST=(e,t)=>{const n=Ke(e),o=un(e),i=rd.get(n);if(i){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:i.focus})}catch{}o.removeEventListener("keydown",sd,!0),o.removeEventListener("keyup",sd,!0),o.removeEventListener("click",Mx,!0),n.removeEventListener("focus",Nx,!0),n.removeEventListener("blur",Lx,!1),typeof n.PointerEvent<"u"?(o.removeEventListener("pointerdown",Cn,!0),o.removeEventListener("pointermove",Cn,!0),o.removeEventListener("pointerup",Cn,!0)):(o.removeEventListener("mousedown",Cn,!0),o.removeEventListener("mousemove",Cn,!0),o.removeEventListener("mouseup",Cn,!0)),rd.delete(n)}};function ET(){return fi}function Vs(){return fi==="keyboard"}function eu(e={}){const{isTextInput:t,autoFocus:n,onChange:o,root:i}=e;$T(i),o?.({isFocusVisible:n||Vs(),modality:fi});const a=(r,s)=>{_T(!!t,r,s)&&o?.({isFocusVisible:Vs(),modality:r})};return Hh.add(a),()=>{Hh.delete(a)}}var Fx=be("checkbox").parts("root","label","control","indicator"),Ol=Fx.build(),Bx=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`checkbox:${e.id}`},$m=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`checkbox:${e.id}:label`},OT=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`checkbox:${e.id}:control`},Wh=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`checkbox:${e.id}:input`},TT=e=>e.getById(Bx(e)),as=e=>e.getById(Wh(e));function IT(e,t){const{send:n,context:o,prop:i,computed:a,scope:r}=e,s=!!i("disabled"),l=!!i("readOnly"),c=!!i("required"),d=!!i("invalid"),u=!s&&o.get("focused"),h=!s&&o.get("focusVisible"),p=a("checked"),m=a("indeterminate"),g=o.get("checked"),b={"data-active":L(o.get("active")),"data-focus":L(u),"data-focus-visible":L(h),"data-readonly":L(l),"data-hover":L(o.get("hovered")),"data-disabled":L(s),"data-state":m?"indeterminate":p?"checked":"unchecked","data-invalid":L(d),"data-required":L(c)};return{checked:p,disabled:s,indeterminate:m,focused:u,checkedState:g,setChecked(v){n({type:"CHECKED.SET",checked:v,isTrusted:!1})},toggleChecked(){n({type:"CHECKED.TOGGLE",checked:p,isTrusted:!1})},getRootProps(){return t.label({...Ol.root.attrs,...b,dir:i("dir"),id:Bx(r),htmlFor:Wh(r),onPointerMove(){s||n({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){s||n({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(v){je(v)===as(r)&&v.stopPropagation()}})},getLabelProps(){return t.element({...Ol.label.attrs,...b,dir:i("dir"),id:$m(r)})},getControlProps(){return t.element({...Ol.control.attrs,...b,dir:i("dir"),id:OT(r),"aria-hidden":!0})},getIndicatorProps(){return t.element({...Ol.indicator.attrs,...b,dir:i("dir"),hidden:!m&&!p})},getHiddenInputProps(){return t.input({id:Wh(r),type:"checkbox",required:i("required"),defaultChecked:p,disabled:s,"aria-labelledby":$m(r),"aria-invalid":d,name:i("name"),form:i("form"),value:i("value"),style:Ud,onFocus(){const v=Vs();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:Sm}=kt(),PT={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:Sm("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:Sm("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},computed:{indeterminate:({context:e})=>Cc(e.get("checked")),checked:({context:e})=>DT(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 ax({pointerNode:TT(n),keyboardNode:as(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 eu({root:(n=t.getRootNode)==null?void 0:n.call(t)})},trackFormControlState({context:e,scope:t}){return lr(as(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=as(n);o&&(rf(o,t("checked")),o.indeterminate=Cc(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=Cc(t("checked"))?!0:!t("checked");e.set("checked",n)},dispatchChangeEvent({computed:e,scope:t}){queueMicrotask(()=>{const n=as(t);q0(n,{checked:e("checked")})})}}}};function Cc(e){return e==="indeterminate"}function DT(e){return Cc(e)?!1:!!e}ae()(["defaultChecked","checked","dir","disabled","form","getRootNode","id","ids","invalid","name","onCheckedChange","readOnly","required","value"]);const vf=Fx.extendWith("group");function AT(e,t,n,o={}){var i,a,r;const{passive:s=!1,eventName:l,defaultValue:c}=o,d=qs(),u=n||d?.emit||((i=d?.$emit)==null?void 0:i.bind(d))||((r=(a=d?.proxy)==null?void 0:a.$emit)==null?void 0:r.bind(d?.proxy)),h=t,p=()=>e[h]??c,m=g=>{if(!l)u(l||`update:${h.toString()}`,g);else for(const b of l)u(b,g)};if(s){const g=p(),b=fe(g);let v=!1;return Ne(()=>e[h],y=>{v||(v=!0,b.value=y,io(()=>{v=!1}))}),Ne(b,y=>{!v&&y!==e[h]&&m(y)}),b}return E({get(){return p()},set(g){m(g)}})}function RT(e,t){const n=E(()=>!(e.disabled||e.readOnly)),{defaultValue:o}=k0(e),i=AT(e,"modelValue",t,{defaultValue:o?.value??[],passive:e.modelValue===void 0,eventName:["valueChange","update:modelValue"]}),a=u=>i.value.some(h=>String(h)===String(u)),r=u=>{a(u)?l(u):s(u)},s=u=>{n.value&&(a(u)||(i.value=i.value.concat(u)))},l=u=>{n.value&&(i.value=i.value.filter(h=>String(h)!==String(u)))},c=u=>({checked:u.value!=null?a(u.value):void 0,onCheckedChange(){u.value!=null&&r(u.value)},name:e.name,disabled:e.disabled,readOnly:e.readOnly,invalid:e.invalid}),d=u=>{i.value=u};return E(()=>({isChecked:a,value:i.value,name:e.name,disabled:e.disabled,readOnly:e.readOnly,invalid:e.invalid,addValue:s,setValue:d,toggleValue:r,getItemProps:c}))}const[zx,VT]=Pe("CheckboxGroupContext"),MT=T({__name:"checkbox-group",props:dn({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=RT(e,t);return zx(n),Y(),(o,i)=>(x(),$(f(K).div,z({role:"group"},{...f(vf).build().group.attrs},{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),NT=T({__name:"checkbox-group-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=E(()=>t.value);return zx(n),Y(),(o,i)=>(x(),$(f(K).div,z({role:"group"},f(vf).build().group.attrs,{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),LT=T({__name:"checkbox-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=al(),n=ro();return Y(),(o,i)=>{var a;return x(),$(f(K).input,z({"aria-describedby":(a=f(n))==null?void 0:a.ariaDescribedby},f(t).getHiddenInputProps(),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["aria-describedby","as-child"])}}}),FT=T({__name:"checkbox-indicator",props:{indeterminate:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=al(),o=E(()=>t.indeterminate?n.value.indeterminate:n.value.checked);return Y(),(i,a)=>(x(),$(f(K).div,z(f(n).getIndicatorProps(),{hidden:!o.value,"as-child":e.asChild}),{default:_(()=>[R(i.$slots,"default")]),_:3},16,["hidden","as-child"]))}}),BT=T({__name:"checkbox-label",props:{asChild:{type:Boolean}},setup(e){const t=al();return Y(),(n,o)=>(x(),$(f(K).span,z(f(t).getLabelProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),zT=T({__name:"checkbox-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=E(()=>t.value);return Vx(n),Y(),(o,i)=>(x(),$(f(K).label,z(n.value.getRootProps(),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),HT=(e={},t)=>{const n=Mt(),o=Kt(Zt),i=pn(hn),a=ro(),r=VT(),s=E(()=>{const d=qe(e);return oa(d,r?.value.getItemProps({value:d.value})??{})}),l=E(()=>{const d=qe(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,...On(d),onCheckedChange(u){var h;t?.("checkedChange",u),t?.("update:checked",u.checked),(h=d.onCheckedChange)==null||h.call(d,u)}}}),c=Nt(PT,l);return E(()=>IT(c,Yt))},jT=T({__name:"checkbox-root",props:dn({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=HT(e,t);return Vx(n),Y(),(o,i)=>(x(),$(f(K).label,z(f(n).getRootProps(),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),ma=Object.freeze(Object.defineProperty({__proto__:null,Context:yT,Control:xT,Group:MT,GroupProvider:NT,HiddenInput:LT,Indicator:FT,Label:BT,Root:jT,RootProvider:zT},Symbol.toStringTag,{value:"Module"}));var WT=be("clipboard").parts("root","control","trigger","indicator","input","label");WT.build();ae()(["getRootNode","id","ids","value","defaultValue","timeout","onStatusChange","onValueChange"]);ae()(["copied"]);var UT=Object.defineProperty,GT=(e,t,n)=>t in e?UT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Q=(e,t,n)=>GT(e,typeof t!="symbol"?t+"":t,n),_c={itemToValue(e){return typeof e=="string"?e:Vi(e)&&Xo(e,"value")?e.value:""},itemToString(e){return typeof e=="string"?e:Vi(e)&&Xo(e,"label")?e.label:_c.itemToValue(e)},isItemDisabled(e){return Vi(e)&&Xo(e,"disabled")?!!e.disabled:!1}},ra=class Hx{constructor(t){this.options=t,Q(this,"items"),Q(this,"indexMap",null),Q(this,"copy",n=>new Hx({...this.options,items:n??[...this.items]})),Q(this,"isEqual",n=>xt(this.items,n.items)),Q(this,"setItems",n=>this.copy(n)),Q(this,"getValues",(n=this.items)=>{const o=[];for(const i of n){const a=this.getItemValue(i);a!=null&&o.push(a)}return o}),Q(this,"find",n=>{if(n==null)return null;const o=this.indexOf(n);return o!==-1?this.at(o):null}),Q(this,"findMany",n=>{const o=[];for(const i of n){const a=this.find(i);a!=null&&o.push(a)}return o}),Q(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}),Q(this,"sortFn",(n,o)=>{const i=this.indexOf(n),a=this.indexOf(o);return(i??0)-(a??0)}),Q(this,"sort",n=>[...n].sort(this.sortFn.bind(this))),Q(this,"getItemValue",n=>{var o,i;return n==null?null:((i=(o=this.options).itemToValue)==null?void 0:i.call(o,n))??_c.itemToValue(n)}),Q(this,"getItemDisabled",n=>{var o,i;return n==null?!1:((i=(o=this.options).isItemDisabled)==null?void 0:i.call(o,n))??_c.isItemDisabled(n)}),Q(this,"stringifyItem",n=>{var o,i;return n==null?null:((i=(o=this.options).itemToString)==null?void 0:i.call(o,n))??_c.itemToString(n)}),Q(this,"stringify",n=>n==null?null:this.stringifyItem(this.find(n))),Q(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)}),Q(this,"stringifyMany",(n,o)=>this.stringifyItems(this.findMany(n),o)),Q(this,"has",n=>this.indexOf(n)!==-1),Q(this,"hasItem",n=>n==null?!1:this.has(this.getItemValue(n))),Q(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}),Q(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))}),Q(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))}),Q(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}),Q(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)&&qT(this.stringifyItem(s),n))return s}}),Q(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),d=this.getItemValue(c);function u(){clearTimeout(i.timer),i.timer=-1}function h(p){i.keysSoFar=p,u(),p!==""&&(i.timer=+setTimeout(()=>{h(""),u()},r))}return h(s),d}),Q(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)])}),Q(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)])}),Q(this,"insert",(n,...o)=>this.copy(Sr(this.items,n,...o))),Q(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(Sr(this.items,i,...o))}),Q(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(Sr(this.items,i+1,...o))}),Q(this,"prepend",(...n)=>this.copy(Sr(this.items,0,...n))),Q(this,"append",(...n)=>this.copy(Sr(this.items,this.items.length,...n))),Q(this,"filter",n=>{const o=this.items.filter((i,a)=>n(this.stringifyItem(i),a,i));return this.copy(o)}),Q(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)}))}),Q(this,"move",(n,o)=>{const i=this.indexOf(n);return i===-1?this:this.copy(Tl(this.items,[i],o))}),Q(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(Tl(this.items,a,i))}),Q(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(Tl(this.items,a,i+1))}),Q(this,"reorder",(n,o)=>this.copy(Tl(this.items,[n],o))),Q(this,"compareValue",(n,o)=>{const i=this.indexOf(n),a=this.indexOf(o);return i<a?-1:i>a?1:0}),Q(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[]}),Q(this,"getValueRange",(n,o)=>n&&o?this.compareValue(n,o)<=0?this.range(n,o):this.range(o,n):[]),Q(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}),Q(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}},qT=(e,t)=>!!(e!=null&&e.toLowerCase().startsWith(t.toLowerCase()));function Sr(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function Tl(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 YT=class kc extends Set{constructor(t=[]){super(t),Q(this,"selectionMode","single"),Q(this,"deselectable",!0),Q(this,"copy",()=>{const n=new kc([...this]);return this.sync(n)}),Q(this,"sync",n=>(n.selectionMode=this.selectionMode,n.deselectable=this.deselectable,n)),Q(this,"isEmpty",()=>this.size===0),Q(this,"isSelected",n=>this.selectionMode==="none"||n==null?!1:this.has(n)),Q(this,"canSelect",(n,o)=>this.selectionMode!=="none"||!n.getItemDisabled(n.find(o))),Q(this,"firstSelectedValue",n=>{let o=null;for(let i of this)(!o||n.compareValue(i,o)<0)&&(o=i);return o}),Q(this,"lastSelectedValue",n=>{let o=null;for(let i of this)(!o||n.compareValue(i,o)>0)&&(o=i);return o}),Q(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}),Q(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}),Q(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 kc([o]);return this.sync(i)}),Q(this,"setSelection",n=>{if(this.selectionMode==="none")return this;let o=new kc;for(let i of n)if(i!=null&&(o.add(i),this.selectionMode==="single"))break;return this.sync(o)}),Q(this,"clearSelection",()=>{const n=this.copy();return n.deselectable&&n.size>0&&n.clear(),n}),Q(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)),Q(this,"deselect",n=>{const o=this.copy();return o.delete(n),o}),Q(this,"isEqual",n=>xt(Array.from(this),Array.from(n)))}};function jx(e,t,n){for(let o=0;o<t.length;o++)e=n.getChildren(e,t.slice(o+1))[t[o]];return e}function KT(e){const t=ZT(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 Wx(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 ZT(e){return e.sort(Wx)}function XT(e,t){let n;return Qt(e,{...t,onEnter:(o,i)=>{if(t.predicate(o,i))return n=o,"stop"}}),n}function JT(e,t){const n=[];return Qt(e,{onEnter:(o,i)=>{t.predicate(o,i)&&n.push(o)},getChildren:t.getChildren}),n}function Em(e,t){let n;return Qt(e,{onEnter:(o,i)=>{if(t.predicate(o,i))return n=[...i],"stop"},getChildren:t.getChildren}),n}function QT(e,t){let n=t.initialResult;return Qt(e,{...t,onEnter:(o,i)=>{n=t.nextResult(n,o,i)}}),n}function eI(e,t){return QT(e,{...t,initialResult:[],nextResult:(n,o,i)=>(n.push(...t.transform(o,i)),n)})}function tI(e,t){const{predicate:n,create:o,getChildren:i}=t,a=(r,s)=>{const l=i(r,s),c=[];l.forEach((p,m)=>{const g=[...s,m],b=a(p,g);b&&c.push(b)});const d=s.length===0,u=n(r,s),h=c.length>0;return d||u||h?o(r,c,s):null};return a(e,[])||o(e,[],[])}function nI(e,t){const n=[];let o=0;const i=new Map,a=new Map;return Qt(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,d=a.get(r),u=d?i.get(d):void 0,h=i.get(r);n.push({...r,_children:c,_parent:u,_index:h})}}),n}function oI(e,t){return{type:"insert",index:e,nodes:t}}function iI(e){return{type:"remove",indexes:e}}function bf(){return{type:"replace"}}function Ux(e){return[e.slice(0,-1),e[e.length-1]]}function Gx(e,t,n=new Map){var o;const[i,a]=Ux(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,bf())}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(),oI(a,t))}return n}function qx(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,bf())}for(const[o,i]of n)t.set(o,iI(i));return t}function aI(e,t){const n=new Map,[o,i]=Ux(e);for(let a=o.length-1;a>=0;a--){const r=o.slice(0,a).join();n.set(r,bf())}return n.set(o.join(),{type:"removeThenInsert",removeIndexes:[i],insertIndex:i,insertNodes:[t]}),n}function tu(e,t,n){return rI(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((d,u)=>!s.indexes.includes(u)),a);case"removeThenInsert":const l=i.filter((d,u)=>!s.removeIndexes.includes(u)),c=s.removeIndexes.reduce((d,u)=>u<d?d-1:d,s.insertIndex);return n.create(o,Om(l,c,0,...s.insertNodes),a);case"insert":return n.create(o,Om(i,s.index,0,...s.nodes),a);case"replace":return n.create(o,i,a);default:return o}}})}function Om(e,t,n,...o){return[...e.slice(0,t),...o,...e.slice(t+n)]}function rI(e,t){const n={};return Qt(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 sI(e,t){const{nodes:n,at:o}=t;if(o.length===0)throw new Error("Can't insert nodes at the root");const i=Gx(o,n);return tu(e,i,t)}function lI(e,t){if(t.at.length===0)return t.node;const n=aI(t.at,t.node);return tu(e,n,t)}function cI(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=qx(t.indexPaths);return tu(e,n,t)}function dI(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=KT(t.indexPaths),o=n.map(a=>jx(e,a,t)),i=Gx(t.to,o,qx(n));return tu(e,i,t)}function Qt(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 d=n?.(l.node,s());if(d==="stop")return;l.state=d==="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 d=l.state;a.push(d),r.push({node:c[d]}),l.state=d+1;continue}if(o?.(l.node,s())==="stop")return}a.pop(),r.pop()}}var yf=class Yx{constructor(t){this.options=t,Q(this,"rootNode"),Q(this,"isEqual",n=>xt(this.rootNode,n.rootNode)),Q(this,"getNodeChildren",n=>{var o,i;return((i=(o=this.options).nodeToChildren)==null?void 0:i.call(o,n))??Oa.nodeToChildren(n)??[]}),Q(this,"resolveIndexPath",n=>typeof n=="string"?this.getIndexPath(n):n),Q(this,"resolveNode",n=>{const o=this.resolveIndexPath(n);return o?this.at(o):void 0}),Q(this,"getNodeChildrenCount",n=>{var o,i;return((i=(o=this.options).nodeToChildrenCount)==null?void 0:i.call(o,n))??Oa.nodeToChildrenCount(n)}),Q(this,"getNodeValue",n=>{var o,i;return((i=(o=this.options).nodeToValue)==null?void 0:i.call(o,n))??Oa.nodeToValue(n)}),Q(this,"getNodeDisabled",n=>{var o,i;return((i=(o=this.options).isNodeDisabled)==null?void 0:i.call(o,n))??Oa.isNodeDisabled(n)}),Q(this,"stringify",n=>{const o=this.findNode(n);return o?this.stringifyNode(o):null}),Q(this,"stringifyNode",n=>{var o,i;return((i=(o=this.options).nodeToString)==null?void 0:i.call(o,n))??Oa.nodeToString(n)}),Q(this,"getFirstNode",(n=this.rootNode)=>{let o;return Qt(n,{getChildren:this.getNodeChildren,onEnter:(i,a)=>{if(!o&&a.length>0&&!this.getNodeDisabled(i))return o=i,"stop"}}),o}),Q(this,"getLastNode",(n=this.rootNode,o={})=>{let i;return Qt(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}),Q(this,"at",n=>jx(this.rootNode,n,{getChildren:this.getNodeChildren})),Q(this,"findNode",(n,o=this.rootNode)=>XT(o,{getChildren:this.getNodeChildren,predicate:i=>this.getNodeValue(i)===n})),Q(this,"findNodes",(n,o=this.rootNode)=>{const i=new Set(n.filter(a=>a!=null));return JT(o,{getChildren:this.getNodeChildren,predicate:a=>i.has(this.getNodeValue(a))})}),Q(this,"sort",n=>n.reduce((o,i)=>{const a=this.getIndexPath(i);return a&&o.push({value:i,indexPath:a}),o},[]).sort((o,i)=>Wx(o.indexPath,i.indexPath)).map(({value:o})=>o)),Q(this,"getIndexPath",n=>Em(this.rootNode,{getChildren:this.getNodeChildren,predicate:o=>this.getNodeValue(o)===n})),Q(this,"getValue",n=>{const o=this.at(n);return o?this.getNodeValue(o):void 0}),Q(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}),Q(this,"getDepth",n=>{const o=Em(this.rootNode,{getChildren:this.getNodeChildren,predicate:i=>this.getNodeValue(i)===n});return o?.length??0}),Q(this,"isSameNode",(n,o)=>this.getNodeValue(n)===this.getNodeValue(o)),Q(this,"isRootNode",n=>this.isSameNode(n,this.rootNode)),Q(this,"contains",(n,o)=>!n||!o?!1:o.slice(0,n.length).every((i,a)=>n[a]===o[a])),Q(this,"getNextNode",(n,o={})=>{let i=!1,a;return Qt(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}),Q(this,"getPreviousNode",(n,o={})=>{let i,a=!1;return Qt(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}),Q(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}),Q(this,"getDescendantNodes",(n,o)=>{const i=this.resolveNode(n);if(!i)return[];const a=[];return Qt(i,{getChildren:this.getNodeChildren,onEnter:(r,s)=>{s.length!==0&&(!(o!=null&&o.withBranch)&&this.isBranchNode(r)||a.push(r))}}),a}),Q(this,"getDescendantValues",(n,o)=>this.getDescendantNodes(n,o).map(i=>this.getNodeValue(i))),Q(this,"getParentIndexPath",n=>n.slice(0,-1)),Q(this,"getParentNode",n=>{const o=this.resolveIndexPath(n);return o?this.at(this.getParentIndexPath(o)):void 0}),Q(this,"visit",n=>{const{skip:o,...i}=n;Qt(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)}})}),Q(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}}),Q(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}}),Q(this,"getSiblingNodes",n=>{const o=this.getParentNode(n);return o?this.getNodeChildren(o):[]}),Q(this,"getValues",(n=this.rootNode)=>eI(n,{getChildren:this.getNodeChildren,transform:o=>[this.getNodeValue(o)]}).slice(1)),Q(this,"isValidDepth",(n,o)=>o==null?!0:typeof o=="function"?o(n.length):n.length===o),Q(this,"isBranchNode",n=>this.getNodeChildren(n).length>0||this.getNodeChildrenCount(n)!=null),Q(this,"getBranchValues",(n=this.rootNode,o={})=>{let i=[];return Qt(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}),Q(this,"flatten",(n=this.rootNode)=>nI(n,{getChildren:this.getNodeChildren})),Q(this,"_create",(n,o)=>this.getNodeChildren(n).length>0||o.length>0?{...n,children:o}:{...n}),Q(this,"_insert",(n,o,i)=>this.copy(sI(n,{at:o,nodes:i,getChildren:this.getNodeChildren,create:this._create}))),Q(this,"copy",n=>new Yx({...this.options,rootNode:n})),Q(this,"_replace",(n,o,i)=>this.copy(lI(n,{at:o,node:i,getChildren:this.getNodeChildren,create:this._create}))),Q(this,"_move",(n,o,i)=>this.copy(dI(n,{indexPaths:o,to:i,getChildren:this.getNodeChildren,create:this._create}))),Q(this,"_remove",(n,o)=>this.copy(cI(n,{indexPaths:o,getChildren:this.getNodeChildren,create:this._create}))),Q(this,"replace",(n,o)=>this._replace(this.rootNode,n,o)),Q(this,"remove",n=>this._remove(this.rootNode,n)),Q(this,"insertBefore",(n,o)=>this.getParentNode(n)?this._insert(this.rootNode,n,o):void 0),Q(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)}),Q(this,"move",(n,o)=>this._move(this.rootNode,n,o)),Q(this,"filter",n=>{const o=tI(this.rootNode,{predicate:n,getChildren:this.getNodeChildren,create:this._create});return this.copy(o)}),Q(this,"toJSON",()=>this.getValues(this.rootNode)),this.rootNode=t.rootNode}},Oa={nodeToValue(e){return typeof e=="string"?e:Vi(e)&&Xo(e,"value")?e.value:""},nodeToString(e){return typeof e=="string"?e:Vi(e)&&Xo(e,"label")?e.label:Oa.nodeToValue(e)},isNodeDisabled(e){return Vi(e)&&Xo(e,"disabled")?!!e.disabled:!1},nodeToChildren(e){return e.children},nodeToChildrenCount(e){if(Vi(e)&&Xo(e,"childrenCount"))return e.childrenCount}};const uI=e=>new ra(e),Tm=e=>new yf(e);var hI=Object.defineProperty,pI=(e,t,n)=>t in e?hI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xf=(e,t,n)=>pI(e,t+"",n),fI=(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},wf=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 US(o,i,a)}getChannelPercentValue(t,n){const{minValue:o,maxValue:i,step:a}=this.getChannelRange(t),r=GS(n,o,i,a);return em(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]=yt(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=em(yt(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 fI(this.toJSON(),t.toJSON())&&this.getChannelValue("alpha")===t.getChannelValue("alpha")}},gI=/^#[\da-f]+$/i,mI=/^rgba?\((.*)\)$/,vI=/[^#]/gi,Kx=class $c extends wf{constructor(t,n,o,i){super(),this.red=t,this.green=n,this.blue=o,this.alpha=i}static parse(t){let n=[];if(gI.test(t)&&[4,5,7,9].includes(t.length)){const i=(t.length<6?t.replace(vI,"$&$&"):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(mI);return o!=null&&o[1]&&(n=o[1].split(",").map(i=>Number(i.trim())).map((i,a)=>yt(i,0,a<3?255:1))),n.length<3?void 0:new $c(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 kf(ze(l*360,2),ze(s*100,2),ze(a*100,2),ze(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 _f(ze(l*360,2),ze(c*100,2),ze(r*100,2),ze(this.alpha,2))}clone(){return new $c(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 $c.colorChannels}};xf(Kx,"colorChannels",["red","green","blue"]);var Cf=Kx,bI=/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+)?)\)/,Zx=class Sc extends wf{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(bI)){const[o,i,a,r]=(n[1]??n[2]).split(",").map(s=>Number(s.trim().replace("%","")));return new Sc(gx(o,360),yt(i,0,100),yt(a,0,100),yt(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}, ${ze(this.saturation,2)}%, ${ze(this.lightness,2)}%)`;case"css":case"hsla":return`hsla(${this.hue}, ${ze(this.saturation,2)}%, ${ze(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 kf(ze(this.hue,2),ze(t*100,2),ze(o*100,2),ze(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 Cf(Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255),ze(this.alpha,2))}clone(){return new Sc(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 Sc.colorChannels}};xf(Zx,"colorChannels",["hue","saturation","lightness"]);var _f=Zx,yI=/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+)?)\)/,Xx=class Ec extends wf{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(yI)){const[o,i,a,r]=(n[1]??n[2]).split(",").map(s=>Number(s.trim().replace("%","")));return new Ec(gx(o,360),yt(i,0,100),yt(a,0,100),yt(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}, ${ze(this.saturation,2)}%, ${ze(this.brightness,2)}%)`;case"hsba":return`hsba(${this.hue}, ${ze(this.saturation,2)}%, ${ze(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 _f(ze(this.hue,2),ze(t*100,2),ze(o*100,2),ze(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 Cf(Math.round(i(5)*255),Math.round(i(3)*255),Math.round(i(1)*255),ze(this.alpha,2))}clone(){return new Ec(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 Ec.colorChannels}};xf(Xx,"colorChannels",["hue","saturation","brightness"]);var kf=Xx,xI="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",wI=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},Im=wI(xI),ld=e=>{var t;if(Im.has(e))return ld(Im.get(e));const n=Cf.parse(e)||kf.parse(e)||_f.parse(e);if(!n){const o=new Error("Invalid color value: "+e);throw(t=Error.captureStackTrace)==null||t.call(Error,o,ld),o}return n};const CI=["top","right","bottom","left"],ri=Math.min,tn=Math.max,cd=Math.round,Il=Math.floor,no=e=>({x:e,y:e}),_I={left:"right",right:"left",bottom:"top",top:"bottom"},kI={start:"end",end:"start"};function Uh(e,t,n){return tn(e,ri(t,n))}function Ao(e,t){return typeof e=="function"?e(t):e}function Ro(e){return e.split("-")[0]}function cr(e){return e.split("-")[1]}function $f(e){return e==="x"?"y":"x"}function Sf(e){return e==="y"?"height":"width"}const $I=new Set(["top","bottom"]);function Qn(e){return $I.has(Ro(e))?"y":"x"}function Ef(e){return $f(Qn(e))}function SI(e,t,n){n===void 0&&(n=!1);const o=cr(e),i=Ef(e),a=Sf(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(r=dd(r)),[r,dd(r)]}function EI(e){const t=dd(e);return[Gh(e),t,Gh(t)]}function Gh(e){return e.replace(/start|end/g,t=>kI[t])}const Pm=["left","right"],Dm=["right","left"],OI=["top","bottom"],TI=["bottom","top"];function II(e,t,n){switch(e){case"top":case"bottom":return n?t?Dm:Pm:t?Pm:Dm;case"left":case"right":return t?OI:TI;default:return[]}}function PI(e,t,n,o){const i=cr(e);let a=II(Ro(e),n==="start",o);return i&&(a=a.map(r=>r+"-"+i),t&&(a=a.concat(a.map(Gh)))),a}function dd(e){return e.replace(/left|right|bottom|top/g,t=>_I[t])}function DI(e){return{top:0,right:0,bottom:0,left:0,...e}}function Jx(e){return typeof e!="number"?DI(e):{top:e,right:e,bottom:e,left:e}}function ud(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 Am(e,t,n){let{reference:o,floating:i}=e;const a=Qn(t),r=Ef(t),s=Sf(r),l=Ro(t),c=a==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,h=o[s]/2-i[s]/2;let p;switch(l){case"top":p={x:d,y:o.y-i.height};break;case"bottom":p={x:d,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:u};break;case"left":p={x:o.x-i.width,y:u};break;default:p={x:o.x,y:o.y}}switch(cr(t)){case"start":p[r]-=h*(n&&c?-1:1);break;case"end":p[r]+=h*(n&&c?-1:1);break}return p}const AI=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:d,y:u}=Am(c,o,l),h=o,p={},m=0;for(let g=0;g<s.length;g++){const{name:b,fn:v}=s[g],{x:y,y:w,data:C,reset:k}=await v({x:d,y:u,initialPlacement:o,placement:h,strategy:i,middlewareData:p,rects:c,platform:r,elements:{reference:e,floating:t}});d=y??d,u=w??u,p={...p,[b]:{...p[b],...C}},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:d,y:u}=Am(c,h,l)),g=-1)}return{x:d,y:u,placement:h,strategy:i,middlewareData:p}};async function Ms(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:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=Ao(t,e),m=Jx(p),g=s[h?u==="floating"?"reference":"floating":u],b=ud(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(g)))==null||n?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),v=u==="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)),w=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},C=ud(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:l}):v);return{top:(b.top-C.top+m.top)/w.y,bottom:(C.bottom-b.bottom+m.bottom)/w.y,left:(b.left-C.left+m.left)/w.x,right:(C.right-b.right+m.right)/w.x}}const RI=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:d=0}=Ao(e,t)||{};if(c==null)return{};const u=Jx(d),h={x:n,y:o},p=Ef(i),m=Sf(p),g=await r.getDimensions(c),b=p==="y",v=b?"top":"left",y=b?"bottom":"right",w=b?"clientHeight":"clientWidth",C=a.reference[m]+a.reference[p]-h[p]-a.floating[m],k=h[p]-a.reference[p],O=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c));let P=O?O[w]:0;(!P||!await(r.isElement==null?void 0:r.isElement(O)))&&(P=s.floating[w]||a.floating[m]);const S=C/2-k/2,V=P/2-g[m]/2-1,H=ri(u[v],V),A=ri(u[y],V),G=H,te=P-g[m]-A,j=P/2-g[m]/2+S,U=Uh(G,j,te),q=!l.arrow&&cr(i)!=null&&j!==U&&a.reference[m]/2-(j<G?H:A)-g[m]/2<0,oe=q?j<G?j-G:j-te:0;return{[p]:h[p]+oe,data:{[p]:U,centerOffset:j-U-oe,...q&&{alignmentOffset:oe}},reset:q}}}),VI=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:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...b}=Ao(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const v=Ro(i),y=Qn(s),w=Ro(s)===s,C=await(l.isRTL==null?void 0:l.isRTL(c.floating)),k=h||(w||!g?[dd(s)]:EI(s)),O=m!=="none";!h&&O&&k.push(...PI(s,g,m,C));const P=[s,...k],S=await Ms(t,b),V=[];let H=((o=a.flip)==null?void 0:o.overflows)||[];if(d&&V.push(S[v]),u){const j=SI(i,r,C);V.push(S[j[0]],S[j[1]])}if(H=[...H,{placement:i,overflows:V}],!V.every(j=>j<=0)){var A,G;const j=(((A=a.flip)==null?void 0:A.index)||0)+1,U=P[j];if(U&&(!(u==="alignment"&&y!==Qn(U))||H.every(oe=>Qn(oe.placement)===y?oe.overflows[0]>0:!0)))return{data:{index:j,overflows:H},reset:{placement:U}};let q=(G=H.filter(oe=>oe.overflows[0]<=0).sort((oe,ne)=>oe.overflows[1]-ne.overflows[1])[0])==null?void 0:G.placement;if(!q)switch(p){case"bestFit":{var te;const oe=(te=H.filter(ne=>{if(O){const le=Qn(ne.placement);return le===y||le==="y"}return!0}).map(ne=>[ne.placement,ne.overflows.filter(le=>le>0).reduce((le,he)=>le+he,0)]).sort((ne,le)=>ne[1]-le[1])[0])==null?void 0:te[0];oe&&(q=oe);break}case"initialPlacement":q=s;break}if(i!==q)return{reset:{placement:q}}}return{}}}};function Rm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Vm(e){return CI.some(t=>e[t]>=0)}const MI=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 Ms(t,{...i,elementContext:"reference"}),r=Rm(a,n.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:Vm(r)}}}case"escaped":{const a=await Ms(t,{...i,altBoundary:!0}),r=Rm(a,n.floating);return{data:{escapedOffsets:r,escaped:Vm(r)}}}default:return{}}}}},Qx=new Set(["left","top"]);async function NI(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=cr(n),l=Qn(n)==="y",c=Qx.has(r)?-1:1,d=a&&l?-1:1,u=Ao(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),l?{x:p*d,y:h*c}:{x:h*c,y:p*d}}const LI=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 NI(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}}}}},FI=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},d=await Ms(t,l),u=Qn(Ro(i)),h=$f(u);let p=c[h],m=c[u];if(a){const b=h==="y"?"top":"left",v=h==="y"?"bottom":"right",y=p+d[b],w=p-d[v];p=Uh(y,p,w)}if(r){const b=u==="y"?"top":"left",v=u==="y"?"bottom":"right",y=m+d[b],w=m-d[v];m=Uh(y,m,w)}const g=s.fn({...t,[h]:p,[u]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[h]:a,[u]:r}}}}}},BI=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),d={x:n,y:o},u=Qn(i),h=$f(u);let p=d[h],m=d[u];const g=Ao(s,t),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const w=h==="y"?"height":"width",C=a.reference[h]-a.floating[w]+b.mainAxis,k=a.reference[h]+a.reference[w]-b.mainAxis;p<C?p=C:p>k&&(p=k)}if(c){var v,y;const w=h==="y"?"width":"height",C=Qx.has(Ro(i)),k=a.reference[u]-a.floating[w]+(C&&((v=r.offset)==null?void 0:v[u])||0)+(C?0:b.crossAxis),O=a.reference[u]+a.reference[w]+(C?0:((y=r.offset)==null?void 0:y[u])||0)-(C?b.crossAxis:0);m<k?m=k:m>O&&(m=O)}return{[h]:p,[u]:m}}}},zI=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),d=await Ms(t,c),u=Ro(i),h=cr(i),p=Qn(i)==="y",{width:m,height:g}=a.floating;let b,v;u==="top"||u==="bottom"?(b=u,v=h===(await(r.isRTL==null?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(v=u,b=h==="end"?"top":"bottom");const y=g-d.top-d.bottom,w=m-d.left-d.right,C=ri(g-d[b],y),k=ri(m-d[v],w),O=!t.middlewareData.shift;let P=C,S=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=w),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(P=y),O&&!h){const H=tn(d.left,0),A=tn(d.right,0),G=tn(d.top,0),te=tn(d.bottom,0);p?S=m-2*(H!==0||A!==0?H+A:tn(d.left,d.right)):P=g-2*(G!==0||te!==0?G+te:tn(d.top,d.bottom))}await l({...t,availableWidth:S,availableHeight:P});const V=await r.getDimensions(s.floating);return m!==V.width||g!==V.height?{reset:{rects:!0}}:{}}}};function nu(){return typeof window<"u"}function dr(e){return e1(e)?(e.nodeName||"").toLowerCase():"#document"}function ln(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function so(e){var t;return(t=(e1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function e1(e){return nu()?e instanceof Node||e instanceof ln(e).Node:!1}function zn(e){return nu()?e instanceof Element||e instanceof ln(e).Element:!1}function ao(e){return nu()?e instanceof HTMLElement||e instanceof ln(e).HTMLElement:!1}function Mm(e){return!nu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ln(e).ShadowRoot}const HI=new Set(["inline","contents"]);function rl(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=Hn(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!HI.has(i)}const jI=new Set(["table","td","th"]);function WI(e){return jI.has(dr(e))}const UI=[":popover-open",":modal"];function ou(e){return UI.some(t=>{try{return e.matches(t)}catch{return!1}})}const GI=["transform","translate","scale","rotate","perspective"],qI=["transform","translate","scale","rotate","perspective","filter"],YI=["paint","layout","strict","content"];function Of(e){const t=Tf(),n=zn(e)?Hn(e):e;return GI.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)||qI.some(o=>(n.willChange||"").includes(o))||YI.some(o=>(n.contain||"").includes(o))}function KI(e){let t=si(e);for(;ao(t)&&!Ka(t);){if(Of(t))return t;if(ou(t))return null;t=si(t)}return null}function Tf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ZI=new Set(["html","body","#document"]);function Ka(e){return ZI.has(dr(e))}function Hn(e){return ln(e).getComputedStyle(e)}function iu(e){return zn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function si(e){if(dr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Mm(e)&&e.host||so(e);return Mm(t)?t.host:t}function t1(e){const t=si(e);return Ka(t)?e.ownerDocument?e.ownerDocument.body:e.body:ao(t)&&rl(t)?t:t1(t)}function Ns(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=t1(e),a=i===((o=e.ownerDocument)==null?void 0:o.body),r=ln(i);if(a){const s=qh(r);return t.concat(r,r.visualViewport||[],rl(i)?i:[],s&&n?Ns(s):[])}return t.concat(i,Ns(i,[],n))}function qh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function n1(e){const t=Hn(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=ao(e),a=i?e.offsetWidth:n,r=i?e.offsetHeight:o,s=cd(n)!==a||cd(o)!==r;return s&&(n=a,o=r),{width:n,height:o,$:s}}function If(e){return zn(e)?e:e.contextElement}function Wa(e){const t=If(e);if(!ao(t))return no(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:a}=n1(t);let r=(a?cd(n.width):n.width)/o,s=(a?cd(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!s||!Number.isFinite(s))&&(s=1),{x:r,y:s}}const XI=no(0);function o1(e){const t=ln(e);return!Tf()||!t.visualViewport?XI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function JI(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ln(e)?!1:t}function Yi(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=If(e);let r=no(1);t&&(o?zn(o)&&(r=Wa(o)):r=Wa(e));const s=JI(a,n,o)?o1(a):no(0);let l=(i.left+s.x)/r.x,c=(i.top+s.y)/r.y,d=i.width/r.x,u=i.height/r.y;if(a){const h=ln(a),p=o&&zn(o)?ln(o):o;let m=h,g=qh(m);for(;g&&o&&p!==m;){const b=Wa(g),v=g.getBoundingClientRect(),y=Hn(g),w=v.left+(g.clientLeft+parseFloat(y.paddingLeft))*b.x,C=v.top+(g.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,c*=b.y,d*=b.x,u*=b.y,l+=w,c+=C,m=ln(g),g=qh(m)}}return ud({width:d,height:u,x:l,y:c})}function au(e,t){const n=iu(e).scrollLeft;return t?t.left+n:Yi(so(e)).left+n}function i1(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-au(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function QI(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const a=i==="fixed",r=so(o),s=t?ou(t.floating):!1;if(o===r||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=no(1);const d=no(0),u=ao(o);if((u||!u&&!a)&&((dr(o)!=="body"||rl(r))&&(l=iu(o)),ao(o))){const p=Yi(o);c=Wa(o),d.x=p.x+o.clientLeft,d.y=p.y+o.clientTop}const h=r&&!u&&!a?i1(r,l):no(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:n.y*c.y-l.scrollTop*c.y+d.y+h.y}}function eP(e){return Array.from(e.getClientRects())}function tP(e){const t=so(e),n=iu(e),o=e.ownerDocument.body,i=tn(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=tn(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+au(e);const s=-n.scrollTop;return Hn(o).direction==="rtl"&&(r+=tn(t.clientWidth,o.clientWidth)-i),{width:i,height:a,x:r,y:s}}const Nm=25;function nP(e,t){const n=ln(e),o=so(e),i=n.visualViewport;let a=o.clientWidth,r=o.clientHeight,s=0,l=0;if(i){a=i.width,r=i.height;const d=Tf();(!d||d&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}const c=au(o);if(c<=0){const d=o.ownerDocument,u=d.body,h=getComputedStyle(u),p=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(o.clientWidth-u.clientWidth-p);m<=Nm&&(a-=m)}else c<=Nm&&(a+=c);return{width:a,height:r,x:s,y:l}}const oP=new Set(["absolute","fixed"]);function iP(e,t){const n=Yi(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,a=ao(e)?Wa(e):no(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 Lm(e,t,n){let o;if(t==="viewport")o=nP(e,n);else if(t==="document")o=tP(so(e));else if(zn(t))o=iP(t,n);else{const i=o1(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ud(o)}function a1(e,t){const n=si(e);return n===t||!zn(n)||Ka(n)?!1:Hn(n).position==="fixed"||a1(n,t)}function aP(e,t){const n=t.get(e);if(n)return n;let o=Ns(e,[],!1).filter(s=>zn(s)&&dr(s)!=="body"),i=null;const a=Hn(e).position==="fixed";let r=a?si(e):e;for(;zn(r)&&!Ka(r);){const s=Hn(r),l=Of(r);!l&&s.position==="fixed"&&(i=null),(a?!l&&!i:!l&&s.position==="static"&&i&&oP.has(i.position)||rl(r)&&!l&&a1(e,r))?o=o.filter(c=>c!==r):i=s,r=si(r)}return t.set(e,o),o}function rP(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const a=[...n==="clippingAncestors"?ou(t)?[]:aP(t,this._c):[].concat(n),o],r=a[0],s=a.reduce((l,c)=>{const d=Lm(t,c,i);return l.top=tn(d.top,l.top),l.right=ri(d.right,l.right),l.bottom=ri(d.bottom,l.bottom),l.left=tn(d.left,l.left),l},Lm(t,r,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function sP(e){const{width:t,height:n}=n1(e);return{width:t,height:n}}function lP(e,t,n){const o=ao(t),i=so(t),a=n==="fixed",r=Yi(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=no(0);function c(){l.x=au(i)}if(o||!o&&!a)if((dr(t)!=="body"||rl(i))&&(s=iu(t)),o){const p=Yi(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else i&&c();a&&!o&&i&&c();const d=i&&!o&&!a?i1(i,s):no(0),u=r.left+s.scrollLeft-l.x-d.x,h=r.top+s.scrollTop-l.y-d.y;return{x:u,y:h,width:r.width,height:r.height}}function Bu(e){return Hn(e).position==="static"}function Fm(e,t){if(!ao(e)||Hn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return so(e)===n&&(n=n.ownerDocument.body),n}function r1(e,t){const n=ln(e);if(ou(e))return n;if(!ao(e)){let i=si(e);for(;i&&!Ka(i);){if(zn(i)&&!Bu(i))return i;i=si(i)}return n}let o=Fm(e,t);for(;o&&WI(o)&&Bu(o);)o=Fm(o,t);return o&&Ka(o)&&Bu(o)&&!Of(o)?n:o||KI(e)||n}const cP=async function(e){const t=this.getOffsetParent||r1,n=this.getDimensions,o=await n(e.floating);return{reference:lP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function dP(e){return Hn(e).direction==="rtl"}const uP={convertOffsetParentRelativeRectToViewportRelativeRect:QI,getDocumentElement:so,getClippingRect:rP,getOffsetParent:r1,getElementRects:cP,getClientRects:eP,getDimensions:sP,getScale:Wa,isElement:zn,isRTL:dP};function s1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function hP(e,t){let n=null,o;const i=so(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:d,top:u,width:h,height:p}=c;if(s||t(),!h||!p)return;const m=Il(u),g=Il(i.clientWidth-(d+h)),b=Il(i.clientHeight-(u+p)),v=Il(d),y={rootMargin:-m+"px "+-g+"px "+-b+"px "+-v+"px",threshold:tn(0,ri(1,l))||1};let w=!0;function C(k){const O=k[0].intersectionRatio;if(O!==l){if(!w)return r();O?r(!1,O):o=setTimeout(()=>{r(!1,1e-7)},1e3)}O===1&&!s1(c,e.getBoundingClientRect())&&r(),w=!1}try{n=new IntersectionObserver(C,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,y)}n.observe(e)}return r(!0),a}function pP(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=If(e),d=i||a?[...c?Ns(c):[],...Ns(t)]:[];d.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const u=c&&s?hP(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 w;(w=p)==null||w.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let m,g=l?Yi(e):null;l&&b();function b(){const v=Yi(e);g&&!s1(g,v)&&n(),g=v,m=requestAnimationFrame(b)}return n(),()=>{var v;d.forEach(y=>{i&&y.removeEventListener("scroll",n),a&&y.removeEventListener("resize",n)}),u?.(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const fP=LI,gP=FI,mP=VI,vP=zI,bP=MI,yP=RI,xP=BI,wP=(e,t,n)=>{const o=new Map,i={platform:uP,...n},a={...i.platform,_c:o};return AI(e,t,{...i,platform:a})};function Bm(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 CP(e){if(!e)return Bm();const{x:t,y:n,width:o,height:i}=e;return Bm(t,n,o,i)}function _P(e,t){return{contextElement:et(e)?e:void 0,getBoundingClientRect:()=>{const n=e,o=t?.(n);return o||!n?CP(o):n.getBoundingClientRect()}}}var Er=e=>({variable:e,reference:`var(${e})`}),vo={arrowSize:Er("--arrow-size"),arrowSizeHalf:Er("--arrow-size-half"),arrowBg:Er("--arrow-background"),transformOrigin:Er("--transform-origin"),arrowOffset:Er("--arrow-offset")},kP=e=>e==="top"||e==="bottom"?"y":"x";function $P(e,t){return{name:"transformOrigin",fn(n){var o,i,a,r;const{elements:s,middlewareData:l,placement:c,rects:d,y:u}=n,h=c.split("-")[0],p=kP(h),m=((o=l.arrow)==null?void 0:o.x)||0,g=((i=l.arrow)==null?void 0:i.y)||0,b=t?.clientWidth||0,v=t?.clientHeight||0,y=m+b/2,w=g+v/2,C=Math.abs(((a=l.shift)==null?void 0:a.y)||0),k=d.reference.height/2,O=v/2,P=((r=e.offset)==null?void 0:r.mainAxis)??e.gutter,S=typeof P=="number"?P+O:P??O,V=C>S,H={top:`${y}px calc(100% + ${S}px)`,bottom:`${y}px ${-S}px`,left:`calc(100% + ${S}px) ${w}px`,right:`${-S}px ${w}px`}[h],A=`${y}px ${d.reference.y+k-u}px`,G=!!e.overlap&&p==="y"&&V;return s.floating.style.setProperty(vo.transformOrigin.variable,G?A:H),{data:{transformOrigin:G?A:H}}}}}var SP={name:"rects",fn({rects:e}){return{data:e}}},EP=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% + ${vo.arrowOffset.reference})`}),{}}}};function OP(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}function TP(e){return e.split("-")[0]}var IP={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function zm(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Pf(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function PP(e,t,n){const o=e||t.createElement("div");return yP({element:o,padding:n.arrowPadding})}function DP(e,t){if(!TS(t.offset??t.gutter))return fP(({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}=OP(n),c=l?void 0:t.shift,d=((i=t.offset)==null?void 0:i.crossAxis)??c;return qd({crossAxis:d,mainAxis:s,alignmentAxis:t.shift})})}function AP(e){if(!e.flip)return;const t=Pf(e.boundary);return mP({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip})}function RP(e){if(!e.slide&&!e.overlap)return;const t=Pf(e.boundary);return gP({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:xP()})}function VP(e){return vP({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 MP(e){if(e.hideWhenDetached)return bP({strategy:"referenceHidden",boundary:Pf(e.boundary)??"clippingAncestors"})}function NP(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function LP(e,t,n={}){const o=_P(e,n.getAnchorRect);if(!t||!o)return;const i=Object.assign({},IP,n),a=t.querySelector("[data-part=arrow]"),r=[DP(a,i),AP(i),RP(i),PP(a,t.ownerDocument,i),EP(a),$P({gutter:i.gutter,offset:i.offset,overlap:i.overlap},a),VP(i),MP(i),SP],{placement:s,strategy:l,onComplete:c,onPositioned:d}=i,u=async()=>{var g;if(!o||!t)return;const b=await wP(o,t,{placement:s,middleware:r,strategy:l});c?.(b),d?.({placed:!0});const v=Ke(t),y=zm(v,b.x),w=zm(v,b.y);t.style.setProperty("--x",`${y}px`),t.style.setProperty("--y",`${w}px`),i.hideWhenDetached&&((g=b.middlewareData.hide)!=null&&g.referenceHidden?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const C=t.firstElementChild;if(C){const k=ii(C);t.style.setProperty("--z-index",k.zIndex)}},h=async()=>{n.updatePosition?(await n.updatePosition({updatePosition:u,floatingElement:t}),d?.({placed:!0})):await u()},p=NP(i.listeners),m=i.listeners?pP(o,t,h,p):MS;return h(),()=>{m?.(),d?.({placed:!1})}}function cn(e,t,n={}){const{defer:o,...i}=n,a=o?ue:s=>s(),r=[];return r.push(a(()=>{const s=typeof e=="function"?e():e,l=typeof t=="function"?t():t;r.push(LP(s,l,i))})),()=>{r.forEach(s=>s?.())}}var FP={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function Df(e={}){const{placement:t,sameWidth:n,fitViewport:o,strategy:i="absolute"}=e;return{arrow:{position:"absolute",width:vo.arrowSize.reference,height:vo.arrowSize.reference,[vo.arrowSizeHalf.variable]:`calc(${vo.arrowSize.reference} / 2)`,[vo.arrowOffset.variable]:`calc(${vo.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?FP[t.split("-")[0]]:void 0,background:vo.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 l1=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"]);l1.build();var BP=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`color-picker:${e.id}:hidden-input`},zP=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`color-picker:${e.id}:control`},HP=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`color-picker:${e.id}:trigger`},jP=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`color-picker:${e.id}:content`},WP=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`color-picker:${e.id}:positioner`},UP=e=>{var t;return((t=e.ids)==null?void 0:t.formatSelect)??`color-picker:${e.id}:format-select`},GP=e=>{var t;return((t=e.ids)==null?void 0:t.area)??`color-picker:${e.id}:area`},qP=e=>{var t;return((t=e.ids)==null?void 0:t.areaThumb)??`color-picker:${e.id}:area-thumb`},YP=(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}`},KP=(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}`},Oc=e=>e.getById(jP(e)),ZP=e=>e.getById(qP(e)),XP=(e,t)=>e.getById(KP(e,t)),JP=e=>e.getById(UP(e)),Hm=e=>e.getById(BP(e)),QP=e=>e.getById(GP(e)),e2=(e,t,n)=>{const o=QP(e);if(!o)return;const{getPercentValue:i}=nx(t,o);return{x:i({dir:n,orientation:"horizontal"}),y:i({orientation:"vertical"})}},t2=e=>e.getById(zP(e)),zu=e=>e.getById(HP(e)),n2=e=>e.getById(WP(e)),o2=(e,t)=>e.getById(YP(e,t)),i2=(e,t,n,o)=>{const i=o2(e,n);if(!i)return;const{getPercentValue:a}=nx(t,i);return{x:a({dir:o,orientation:"horizontal"}),y:a({orientation:"vertical"})}},a2=e=>[...ai(Oc(e),"input[data-channel]"),...ai(t2(e),"input[data-channel]")];function r2(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 jm=e=>ld(e),s2=/^[0-9a-fA-F]{3,8}$/;function l2(e){return s2.test(e)}function c2(e){return e.startsWith("#")?e:l2(e)?`#${e}`:e}var{and:d2}=kt();d2("isOpenControlled","closeOnSelect");function Wm(e,t,n){const o=a2(e);ue(()=>{o.forEach(i=>{const a=i.dataset.channel;Nn(i,r2(n||t,a))})})}function u2(e,t){const n=JP(e);n&&ue(()=>Nn(n,t))}ae()(["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"]);ae()(["xChannel","yChannel"]);ae()(["channel","orientation"]);ae()(["value","disabled"]);ae()(["value","respectAlpha"]);ae()(["size"]);l1.extendWith("view");var c1=be("combobox").parts("root","clearTrigger","content","control","input","item","itemGroup","itemGroupLabel","itemIndicator","itemText","label","list","positioner","trigger");c1.build();var d1=e=>new ra(e);d1.empty=()=>new ra({items:[]});var h2=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`combobox:${e.id}:control`},p2=e=>{var t;return((t=e.ids)==null?void 0:t.input)??`combobox:${e.id}:input`},f2=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`combobox:${e.id}:content`},g2=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`combobox:${e.id}:popper`},m2=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`combobox:${e.id}:toggle-btn`},v2=e=>{var t;return((t=e.ids)==null?void 0:t.clearTrigger)??`combobox:${e.id}:clear-btn`},Go=e=>e.getById(f2(e)),Ta=e=>e.getById(p2(e)),Um=e=>e.getById(g2(e)),Gm=e=>e.getById(h2(e)),rs=e=>e.getById(m2(e)),qm=e=>e.getById(v2(e)),Or=(e,t)=>{if(t==null)return null;const n=`[role=option][data-value="${CSS.escape(t)}"]`;return rx(Go(e),n)},Ym=e=>{const t=Ta(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})},b2=e=>{const t=rs(e);e.isActiveElement(t)||t==null||t.focus({preventScroll:!0})},{guards:y2,createMachine:x2,choose:w2}=Yd(),{and:ut,not:Xt}=y2;x2({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}){ex(t)},collection:d1.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:xt,hash(i){return i.join(",")},onChange(i){var a;const r=n(),s=r.get("selectedItems"),l=e("collection"),c=i.map(d=>s.find(u=>l.getItemValue(u)===d)||l.find(d));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=Ht(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:w2([{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",Xt("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",Xt("hasHighlightedItem"),Xt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:ut("isCustomValue",Xt("hasHighlightedItem"),Xt("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",Xt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:ut("isCustomValue",Xt("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",Xt("hasHighlightedItem"),Xt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:ut("isCustomValue",Xt("hasHighlightedItem"),Xt("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",Xt("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:ut("isCustomValue",Xt("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 OS(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:aa(()=>Go(n),{type:"listbox",defer:!0,exclude:()=>[Ta(n),rs(n),qm(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 Px([Ta(e),Go(e),rs(e),qm(e)])},trackPlacement({context:e,prop:t,scope:n}){const o=()=>Gm(n)||rs(n),i=()=>Um(n);return e.set("currentPlacement",t("positioning").placement),cn(o,i,{...t("positioning"),defer:!0,onComplete(a){e.set("currentPlacement",a.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n,event:o}){const i=Ta(n);let a=[];const r=c=>{const d=o.current().type.includes("POINTER"),u=e.get("highlightedValue");if(d||!u)return;const h=Go(n),p=t("scrollToIndexFn");if(p){const b=t("collection").indexOf(u);p({index:b,immediate:c,getElement:()=>Or(n,u)});return}const m=Or(n,u),g=ue(()=>{Ds(m,{rootEl:h,block:"nearest"})});a.push(g)},s=ue(()=>r(!0));a.push(s);const l=Js(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}){cn(()=>Gm(n),()=>Um(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")?Gi(n.get("value"),a):[a];(t=o("onSelect"))==null||t({value:r,itemValue:a}),n.set("value",r);const s=Ht(o("selectionBehavior"),{preserve:n.get("inputValue"),replace:i.stringifyMany(r),clear:""});n.set("inputValue",s)},scrollToHighlightedItem({context:e,prop:t,scope:n}){jd(()=>{const o=e.get("highlightedValue");if(o==null)return;const i=Or(n,o),a=Go(n),r=t("scrollToIndexFn");if(r){const s=t("collection").indexOf(o);r({index:s,immediate:!0,getElement:()=>Or(n,o)});return}Ds(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")?Gi(t.get("value"),n.value):[n.value];(a=i("onSelect"))==null||a({value:r,itemValue:n.value}),t.set("value",r);const s=Ht(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=Hi(t.get("value"),n.value);t.set("value",a);const r=Ht(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany(a),clear:""});t.set("inputValue",r)})},setInitialFocus({scope:e}){ue(()=>{Ym(e)})},setFinalFocus({scope:e}){ue(()=>{const t=rs(e);t?.dataset.focusable==null?Ym(e):b2(e)})},syncInputValue({context:e,scope:t,event:n}){const o=Ta(t);o&&(o.value=e.get("inputValue"),queueMicrotask(()=>{n.current().type!=="INPUT.CHANGE"&&s$(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=Ht(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=Ht(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=Ht(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:()=>Or(t,o)})}else{const o=Go(t);if(!o)return;o.scrollTop=0}},invokeOnOpen({prop:e,event:t}){var n;const o=Km(t);(n=e("onOpenChange"))==null||n({open:!0,reason:o})},invokeOnClose({prop:e,event:t}){var n;const o=Km(t);(n=e("onOpenChange"))==null||n({open:!1,reason:o})},highlightFirstItem({context:e,prop:t,scope:n}){(Go(n)?queueMicrotask:ue)(()=>{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}){(Go(n)?queueMicrotask:ue)(()=>{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}){ue(()=>{const[n]=t("collection").sort(e.get("value"));n&&e.set("highlightedValue",n)})},highlightFirstOrSelectedItem({context:e,prop:t,computed:n}){ue(()=>{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}){ue(()=>{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=Ta(i),r=n("collection");if(!t("autoComplete")||!a||!o.keypress)return;const s=r.stringify(e.get("highlightedValue"));ue(()=>{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=Ht(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 Km(e){return(e.previousEvent||e).src}ae()(["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"]);ae()(["htmlFor"]);ae()(["id"]);ae()(["item","persistFocus"]);c1.extendWith("empty");function Hu(e,t){return e-t*Math.floor(e/t)}const u1=1721426;function Pl(e,t,n,o){t=Af(e,t);let i=t-1,a=-2;return n<=2?a=0:Tc(t)&&(a=-1),u1-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+o)}function Tc(e){return e%4===0&&(e%100!==0||e%400===0)}function Af(e,t){return e==="BC"?1-t:t}function C2(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const _2={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 Za=class{fromJulianDay(t){let n=t,o=n-u1,i=Math.floor(o/146097),a=Hu(o,146097),r=Math.floor(a/36524),s=Hu(a,36524),l=Math.floor(s/1461),c=Hu(s,1461),d=Math.floor(c/365),u=i*400+r*100+l*4+d+(r!==4&&d!==4?1:0),[h,p]=C2(u),m=n-Pl(h,p,1,1),g=2;n<Pl(h,p,3,1)?g=0:Tc(p)&&(g=1);let b=Math.floor(((m+g)*12+373)/367),v=n-Pl(h,p,b,1)+1;return new pd(h,p,b,v)}toJulianDay(t){return Pl(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return _2[Tc(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return Tc(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 k2={"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 sa(e,t){return t=an(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function $2(e,t){return t=an(t,e.calendar),e=_o(e),t=_o(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function S2(e,t){return t=an(t,e.calendar),e=Ls(e),t=Ls(t),e.era===t.era&&e.year===t.year}function E2(e,t){return ru(e.calendar,t.calendar)&&sa(e,t)}function O2(e,t){return ru(e.calendar,t.calendar)&&$2(e,t)}function T2(e,t){return ru(e.calendar,t.calendar)&&S2(e,t)}function ru(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 I2(e,t){return sa(e,su(t))}const P2={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function h1(e,t,n){let o=e.calendar.toJulianDay(e),i=n?P2[n]:R2(t),a=Math.ceil(o+1-i)%7;return a<0&&(a+=7),a}function p1(e){return ko(Date.now(),e)}function su(e){return ji(p1(e))}function f1(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function D2(e,t){return Zm(e)-Zm(t)}function Zm(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let ju=null;function Rf(){return ju==null&&(ju=new Intl.DateTimeFormat().resolvedOptions().timeZone),ju}function _o(e){return e.subtract({days:e.day-1})}function Yh(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function Ls(e){return _o(e.subtract({months:e.month-1}))}function A2(e){return Yh(e.add({months:e.calendar.getMonthsInYear(e)-e.month}))}function Fs(e,t,n){let o=h1(e,t,n);return e.subtract({days:o})}function Xm(e,t,n){return Fs(e,t,n).add({days:6})}const Jm=new Map,Wu=new Map;function g1(e){if(Intl.Locale){let n=Jm.get(e);return n||(n=new Intl.Locale(e).maximize().region,n&&Jm.set(e,n)),n}let t=e.split("-")[1];return t==="u"?void 0:t}function R2(e){let t=Wu.get(e);if(!t){if(Intl.Locale){let o=new Intl.Locale(e);if("getWeekInfo"in o&&(t=o.getWeekInfo(),t))return Wu.set(e,t),t.firstDay}let n=g1(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&&k2[n]||0};Wu.set(e,t)}return t.firstDay}function V2(e,t,n){let o=e.calendar.getDaysInMonth(e);return Math.ceil((h1(_o(e),t,n)+o)/7)}function m1(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function v1(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}const M2={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 N2(e,t){let n=e.calendar.toJulianDay(e),o=Math.ceil(n+1)%7;o<0&&(o+=7);let i=g1(t),[a,r]=M2[i]||[6,0];return o===a||o===r}function Xa(e){e=an(e,new Za);let t=Af(e.era,e.year);return b1(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function b1(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 Kh(e,t){if(t==="UTC")return 0;if(e>0&&t===Rf())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:o,day:i,hour:a,minute:r,second:s}=y1(e,t);return b1(n,o,i,a,r,s,0)-Math.floor(e/1e3)*1e3}const Qm=new Map;function y1(e,t){let n=Qm.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"}),Qm.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 ev=864e5;function L2(e,t,n,o){return(n===o?[n]:[n,o]).filter(i=>F2(e,t,i))}function F2(e,t,n){let o=y1(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 xo(e,t,n="compatible"){let o=Ki(e);if(t==="UTC")return Xa(o);if(t===Rf()&&n==="compatible"){o=an(o,new Za);let l=new Date,c=Af(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=Xa(o),a=Kh(i-ev,t),r=Kh(i+ev,t),s=L2(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 x1(e,t,n="compatible"){return new Date(xo(e,t,n))}function ko(e,t){let n=Kh(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(),d=o.getUTCMilliseconds();return new O1(i<1?"BC":"AD",i<1?-i+1:i,a,r,t,n,s,l,c,d)}function ji(e){return new pd(e.calendar,e.era,e.year,e.month,e.day)}function Ki(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 nD(e.calendar,e.era,e.year,e.month,e.day,n,o,i,a)}function an(e,t){if(ru(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,Zi(o),o}function B2(e,t,n){if(e instanceof O1)return e.timeZone===t?e:H2(e,t);let o=xo(e,t,n);return ko(o,t)}function z2(e){let t=Xa(e)-e.offset;return new Date(t)}function H2(e,t){let n=Xa(e)-e.offset;return an(ko(n,t),e.calendar)}const Tr=36e5;function lu(e,t){let n=e.copy(),o="hour"in n?G2(n,t):0;Zh(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,Xh(n),w1(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=o,j2(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 Zh(e,t){var n,o;!((n=(o=e.calendar).isInverseEra)===null||n===void 0)&&n.call(o,e)&&(t=-t),e.year+=t}function Xh(e){for(;e.month<1;)Zh(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Zh(e,1)}function j2(e){for(;e.day<1;)e.month--,Xh(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,Xh(e)}function w1(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 Zi(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),w1(e)}function C1(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function _1(e,t){return lu(e,C1(t))}function Vf(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),Zi(n),n}function hd(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),U2(n),n}function W2(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Dl(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Dl(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Dl(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Dl(e.hour,24),t}function U2(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 Dl(e,t){let n=e%t;return n<0&&(n+=t),n}function G2(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,W2(e)}function Mf(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=$o(l,n,0,s.length-1,o?.round),i.era=s[l],Zi(i);break}case"year":var a,r;!((a=(r=i.calendar).isInverseEra)===null||a===void 0)&&a.call(r,i)&&(n=-n),i.year=$o(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=$o(e.month,n,1,e.calendar.getMonthsInYear(e),o?.round);break;case"day":i.day=$o(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),Zi(i),i}function k1(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=$o(a,n,r,s,o?.round);break}case"minute":i.minute=$o(e.minute,n,0,59,o?.round);break;case"second":i.second=$o(e.second,n,0,59,o?.round);break;case"millisecond":i.millisecond=$o(e.millisecond,n,0,999,o?.round);break;default:throw new Error("Unsupported field "+t)}return i}function $o(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 $1(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=lu(Ki(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=xo(i,e.timeZone)}else n=Xa(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let o=ko(n,e.timeZone);return an(o,e.calendar)}function q2(e,t){return $1(e,C1(t))}function Y2(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=Ki(e),s=an(hd(r,{hour:i}),new Za),l=[xo(s,e.timeZone,"earlier"),xo(s,e.timeZone,"later")].filter(m=>ko(m,e.timeZone).day===s.day)[0],c=an(hd(r,{hour:a}),new Za),d=[xo(c,e.timeZone,"earlier"),xo(c,e.timeZone,"later")].filter(m=>ko(m,e.timeZone).day===c.day).pop(),u=Xa(e)-e.offset,h=Math.floor(u/Tr),p=u%Tr;return u=$o(h,n,Math.floor(l/Tr),Math.floor(d/Tr),o?.round)*Tr+p,an(ko(u,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return k1(e,t,n,o);case"era":case"year":case"month":case"day":{let i=Mf(Ki(e),t,n,o),a=xo(i,e.timeZone);return an(ko(a,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function K2(e,t,n){let o=Ki(e),i=hd(Vf(o,t),t);if(i.compare(o)===0)return e;let a=xo(i,e.timeZone,n);return an(ko(a,e.timeZone),e.calendar)}function Z2(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 S1(e){let t=an(e,new Za),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 E1(e){return`${S1(e)}T${Z2(e)}`}function X2(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 J2(e){return`${E1(e)}${X2(e.offset)}[${e.timeZone}]`}function Q2(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Nf(e,t,n){Q2(e,t),t.set(e,n)}function Lf(e){let t=typeof e[0]=="object"?e.shift():new Za,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 eD=new WeakMap;let pd=class Jh{copy(){return this.era?new Jh(this.calendar,this.era,this.year,this.month,this.day):new Jh(this.calendar,this.year,this.month,this.day)}add(t){return lu(this,t)}subtract(t){return _1(this,t)}set(t){return Vf(this,t)}cycle(t,n,o){return Mf(this,t,n,o)}toDate(t){return x1(this,t)}toString(){return S1(this)}compare(t){return f1(this,t)}constructor(...t){Nf(this,eD,{writable:!0,value:void 0});let[n,o,i,a,r]=Lf(t);this.calendar=n,this.era=o,this.year=i,this.month=a,this.day=r,Zi(this)}};var tD=new WeakMap;let nD=class Qh{copy(){return this.era?new Qh(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Qh(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return lu(this,t)}subtract(t){return _1(this,t)}set(t){return Vf(hd(this,t),t)}cycle(t,n,o){switch(t){case"era":case"year":case"month":case"day":return Mf(this,t,n,o);default:return k1(this,t,n,o)}}toDate(t,n){return x1(this,t,n)}toString(){return E1(this)}compare(t){let n=f1(this,t);return n===0?D2(this,Ki(t)):n}constructor(...t){Nf(this,tD,{writable:!0,value:void 0});let[n,o,i,a,r]=Lf(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,Zi(this)}};var oD=new WeakMap;let O1=class ep{copy(){return this.era?new ep(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new ep(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return $1(this,t)}subtract(t){return q2(this,t)}set(t,n){return K2(this,t,n)}cycle(t,n,o){return Y2(this,t,n,o)}toDate(){return z2(this)}toString(){return J2(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-B2(t,this.timeZone).toDate().getTime()}constructor(...t){Nf(this,oD,{writable:!0,value:void 0});let[n,o,i,a,r]=Lf(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,Zi(this)}},Uu=new Map,oo=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 rD()&&(this.resolvedHourCycle||(this.resolvedHourCycle=sD(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=T1(t,n),this.options=n}};const iD={true:{ja:"h11"},false:{}};function T1(e,t={}){if(typeof t.hour12=="boolean"&&aD()){t={...t};let i=iD[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(Uu.has(n))return Uu.get(n);let o=new Intl.DateTimeFormat(e,t);return Uu.set(n,o),o}let Gu=null;function aD(){return Gu==null&&(Gu=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Gu}let qu=null;function rD(){return qu==null&&(qu=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),qu}function sD(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=T1(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 lD(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=la(e,t,n).subtract(a);return sl(e,r,t,n,o,i)}function la(e,t,n,o,i){let a=e;return t.years?a=Ls(e):t.months?a=_o(e):t.weeks&&(a=Fs(e,n)),sl(e,a,t,n,o,i)}function Ff(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=la(e,t,n).subtract(a);return sl(e,r,t,n,o,i)}function sl(e,t,n,o,i,a){return i&&e.compare(i)>=0&&(t=v1(t,la(ji(i),n,o))),a&&e.compare(a)<=0&&(t=m1(t,Ff(ji(a),n,o))),t}function Mn(e,t,n){let o=ji(e);return t&&(o=v1(o,ji(t))),n&&(o=m1(o,ji(n))),o}function tv(e,t,n,o,i,a){switch(t){case"start":return la(e,n,o,i,a);case"end":return Ff(e,n,o,i,a);case"center":default:return lD(e,n,o,i,a)}}function nn(e,t){return t!=null&&sa(e,t)}function nv(e,t,n,o,i){return e?t!=null&&t(e,n)?!0:Jn(e,o,i):!1}function Jn(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function cD(e,t,n){const o=e.subtract({days:1});return sa(o,e)||Jn(o,t,n)}function dD(e,t,n){const o=e.add({days:1});return sa(o,e)||Jn(o,t,n)}function Bf(e){let t={...e};for(let n in t)t[n]=1;return t}function I1(e,t){let n={...t};return n.days?n.days--:n.days=-1,e.add(n)}function P1(e){return e?.calendar.identifier==="gregory"&&e.era==="BC"?"short":void 0}function D1(e,t){const n=Ki(su(t));return new oo(e,{weekday:"long",month:"long",year:"numeric",day:"numeric",era:P1(n),timeZone:t})}function ov(e,t){const n=su(t);return new oo(e,{month:"long",year:"numeric",era:P1(n),calendar:n?.calendar.identifier,timeZone:t})}function uD(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 d=a[c];if(d.source==="shared"&&d.type==="literal")r=c;else if(d.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 hD(e,t,n,o){let i=e,a=e,r=D1(n,o);return sa(i,a)?r.format(i.toDate(o)):uD(i,a,r,(s,l)=>`${s} – ${l}`,o)}var pD=["sun","mon","tue","wed","thu","fri","sat"];function A1(e){return e!=null?pD[e]:void 0}function R1(e,t,n){const o=A1(n);return Fs(e,t,o)}function V1(e,t,n,o){const i=t.add({weeks:e}),a=[];let r=R1(i,n,o);for(;a.length<7;){a.push(r);let s=r.add({days:1});if(sa(r,s))break;r=s}return a}function fD(e,t,n,o){const i=A1(o),a=n??V2(e,t,i);return[...new Array(a).keys()].map(r=>V1(r,e,t,o))}function gD(e,t){const n=new oo(e,{weekday:"long",timeZone:t}),o=new oo(e,{weekday:"short",timeZone:t}),i=new oo(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 mD(e,t,n,o){const i=R1(e,o,t),a=[...new Array(7).keys()],r=gD(o,n);return a.map(s=>r(i.add({days:s})))}function vD(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 bD(e){const t=[];for(let n=e.from;n<=e.to;n+=1)t.push(n);return t}var yD=10;function xD(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+yD?(i-100).toString():i.toString()}return e}}function ys(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 Ba(e){return su(e??Rf())}function ll(e,t,n,o){return function(i){const{startDate:a,focusedDate:r}=i,s=I1(a,e);return Jn(r,n,o)?{startDate:a,focusedDate:Mn(r,n,o),endDate:s}:r.compare(a)<0?{startDate:Ff(r,e,t,n,o),focusedDate:Mn(r,n,o),endDate:s}:r.compare(s)>0?{startDate:la(r,e,t,n,o),endDate:s,focusedDate:Mn(r,n,o)}:{startDate:a,endDate:s,focusedDate:Mn(r,n,o)}}}function M1(e,t,n,o,i,a){const r=ll(n,o,i,a),s=t.add(n);return r({focusedDate:e.add(n),startDate:la(sl(e,s,n,o,i,a),n,o)})}function N1(e,t,n,o,i,a){const r=ll(n,o,i,a);let s=t.subtract(n);return r({focusedDate:e.subtract(n),startDate:la(sl(e,s,n,o,i,a),n,o)})}function wD(e,t,n,o,i,a,r){const s=ll(o,i,a,r);if(!n&&!o.days)return s({focusedDate:e.add(Bf(o)),startDate:t});if(o.days)return M1(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 CD(e,t,n,o,i,a,r){const s=ll(o,i,a,r);if(!n&&!o.days)return s({focusedDate:e.subtract(Bf(o)),startDate:t});if(o.days)return N1(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 iv=e=>e!=null&&e.length===4,_D=e=>e!=null&&parseFloat(e)<=12,kD=e=>e!=null&&parseFloat(e)<=31;function $D(e,t,n){const o=SD(t,n);let{year:i,month:a,day:r}=ED(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(iv(i)||(i=xD(i)),iv(i)&&_D(a)&&kD(r))return new pd(+i,+a,+r);const s=Date.parse(e);if(!isNaN(s)){const l=new Date(s);return new pd(l.getFullYear(),l.getMonth()+1,l.getDate())}}function SD(e,t){return new oo(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 ED(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 av(e,t,n){const o=ji(p1(n));switch(e){case"thisWeek":return[Fs(o,t),Xm(o,t)];case"thisMonth":return[_o(o),o];case"thisQuarter":return[_o(o).add({months:-((o.month-1)%3)}),o];case"thisYear":return[Ls(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})),Yh(o.add({months:-1}))];case"lastQuarter":return[_o(o.add({months:-((o.month-1)%3)-3})),Yh(o.add({months:-((o.month-1)%3)-1}))];case"lastWeek":return[Fs(o,t).add({weeks:-1}),Xm(o,t).add({weeks:-1})];case"lastYear":return[Ls(o.add({years:-1})),A2(o.add({years:-1}))];default:throw new Error(`Invalid date range preset: ${e}`)}}var Al="__live-region__";function L1(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,d){const u=n.getElementById(Al);u?.remove(),d=d??i;const h=n.createElement("span");h.id=Al,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},d)}function l(){const c=n.getElementById(Al);c?.remove()}return{announce:s,destroy:l,toJSON(){return Al}}}var F1=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"),Le=F1.build(),OD=(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}`},TD=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`datepicker:${e.id}`},ID=(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}`},tp=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`datepicker:${e.id}:content`},Yu=(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}`},PD=(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}`},DD=(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}`},AD=(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}`},B1=e=>{var t;return((t=e.ids)==null?void 0:t.clearTrigger)??`datepicker:${e.id}:clear`},z1=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`datepicker:${e.id}:control`},rv=(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}`},H1=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`datepicker:${e.id}:trigger`},j1=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`datepicker:${e.id}:positioner`},W1=e=>{var t;return((t=e.ids)==null?void 0:t.monthSelect)??`datepicker:${e.id}:month-select`},U1=e=>{var t;return((t=e.ids)==null?void 0:t.yearSelect)??`datepicker:${e.id}:year-select`},sv=(e,t)=>rx(Ic(e),`[data-part=table-cell-trigger][data-view=${t}][data-focus]:not([data-outside-range])`),lv=e=>e.getById(H1(e)),Ic=e=>e.getById(tp(e)),Ir=e=>ai(G1(e),"[data-part=input]"),RD=e=>e.getById(U1(e)),VD=e=>e.getById(W1(e)),MD=e=>e.getById(B1(e)),ND=e=>e.getById(j1(e)),G1=e=>e.getById(z1(e));function np(e){const[t,n]=e;return!t||!n||t.compare(n)<=0?e:[n,t]}function va(e,t){const[n,o]=t;return!n||!o?!1:n.compare(e)<=0&&o.compare(e)>=0}function Rl(e){return e.slice().sort((t,n)=>t.compare(n))}function LD(e){return Ht(e,{year:"calendar decade",month:"calendar year",day:"calendar month"})}var FD={day:"dd",month:"mm",year:"yyyy"};function BD(e){return new oo(e).formatToParts(new Date).map(t=>FD[t.type]??t.value).join("")}var q1=(e,t)=>e?/\d/.test(e)||e===t||e.length!==1:!0,cv=e=>!Number.isNaN(e.day)&&!Number.isNaN(e.month)&&!Number.isNaN(e.year),zD=(e,t)=>e.split("").filter(n=>q1(n,t)).join("");function HD(e){const t=new Intl.DateTimeFormat(e).formatToParts(new Date).find(n=>n.type==="literal");return t?t.value:"/"}var jD={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 Ht(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 Ht(e,{year:"Switch to previous decade",month:"Switch to previous year",day:"Switch to previous month"})},nextTrigger(e){return Ht(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 zf(e){return e===0?"day":e===1?"month":"year"}function Hf(e,t,n){return zf(yt(To(e,0),To(t,0),To(n,2)))}function WD(e,t){return To(e,0)>To(t,0)}function UD(e,t){return To(e,0)<To(t,0)}function GD(e,t,n){const o=To(e,0)+1;return Hf(zf(o),t,n)}function qD(e,t,n){const o=To(e,0)-1;return Hf(zf(o),t,n)}var YD=["day","month","year"];function KD(e){YD.forEach(t=>e(t))}function ZD(e,t){const{state:n,context:o,prop:i,send:a,computed:r,scope:s}=e,l=o.get("startValue"),c=r("endValue"),d=o.get("value"),u=o.get("focusedValue"),h=o.get("hoveredValue"),p=h?np([d[0],h]):[],m=i("disabled"),g=i("readOnly"),b=r("isInteractive"),v=i("min"),y=i("max"),w=i("locale"),C=i("timeZone"),k=i("startOfWeek"),O=n.matches("focused"),P=n.matches("open"),S=i("selectionMode")==="range",V=i("isDateUnavailable"),H=o.get("currentPlacement"),A=Df({...i("positioning"),placement:H}),G=HD(w),te={...jD,...i("translations")};function j(B=l){const W=i("fixedWeeks")?6:void 0;return fD(B,w,W,k)}function U(B={}){const{format:W}=B;return vD(w,W).map((Z,re)=>{const ye=re+1,ke=u.set({month:ye}),Te=Jn(ke,v,y);return{label:Z,value:ye,disabled:Te}})}function q(){return bD({from:v?.year??1900,to:y?.year??2100}).map(B=>({label:B.toString(),value:B,disabled:!vs(B,v?.year,y?.year)}))}function oe(B){return ys(l.year).map(W=>({label:W.toString(),value:W,disabled:!vs(W,v?.year,y?.year)}))}function ne(B){return nv(B,V,w,v,y)}function le(B){const W=l??Ba(C);a({type:"FOCUS.SET",value:W.set({month:B})})}function he(B){const W=l??Ba(C);a({type:"FOCUS.SET",value:W.set({year:B})})}function de(B){const{value:W,disabled:Z}=B,re=u.set({year:W}),ye=!ys(l.year,{strict:!0}).includes(W),ke=vs(W,v?.year,y?.year),Te={focused:u.year===B.value,selectable:ye||ke,outsideRange:ye,selected:!!d.find(it=>it&&it.year===W),valueText:W.toString(),inRange:S&&(va(re,d)||va(re,p)),value:re,get disabled(){return Z||!Te.selectable}};return Te}function Ce(B){const{value:W,disabled:Z}=B,re=u.set({month:W}),ye=ov(w,C),ke={focused:u.month===B.value,selectable:!Jn(re,v,y),selected:!!d.find(Te=>Te&&Te.month===W&&Te.year===u.year),valueText:ye.format(re.toDate(C)),inRange:S&&(va(re,d)||va(re,p)),value:re,get disabled(){return Z||!ke.selectable}};return ke}function me(B){const{value:W,disabled:Z,visibleRange:re=r("visibleRange")}=B,ye=D1(w,C),ke=Bf(r("visibleDuration")),Te=i("outsideDaySelectable"),it=re.start.add(ke).subtract({days:1}),J=Jn(W,re.start,it),ce=S&&va(W,d),se=S&&nn(W,d[0]),xe=S&&nn(W,d[1]),Ze=S&&p.length>0,Ct=Ze&&va(W,p),Ot=Ze&&nn(W,p[0]),Dn=Ze&&nn(W,p[1]),No={invalid:Jn(W,v,y),disabled:Z||!Te&&J||Jn(W,v,y),selected:d.some(ml=>nn(W,ml)),unavailable:nv(W,V,w,v,y)&&!Z,outsideRange:J,today:I2(W,C),weekend:N2(W,w),formattedDate:ye.format(W.toDate(C)),get focused(){return nn(W,u)&&(!No.outsideRange||Te)},get ariaLabel(){return te.dayCell(No)},get selectable(){return!No.disabled&&!No.unavailable},inRange:ce||Ct,firstInRange:se,lastInRange:xe,inHoveredRange:Ct,firstInHoveredRange:Ot,lastInHoveredRange:Dn};return No}function Oe(B){const{view:W="day",id:Z}=B;return[W,Z].filter(Boolean).join(" ")}return{focused:O,open:P,inline:!!i("inline"),view:o.get("view"),getRangePresetValue(B){return av(B,w,C)},getDaysInWeek(B,W=l){return V1(B,W,w,k)},getOffset(B){const W=l.add(B),Z=c.add(B),re=ov(w,C);return{visibleRange:{start:W,end:Z},weeks:j(W),visibleRangeText:{start:re.format(W.toDate(C)),end:re.format(Z.toDate(C))}}},getMonthWeeks:j,isUnavailable:ne,weeks:j(),weekDays:mD(Ba(C),k,C,w),visibleRangeText:r("visibleRangeText"),value:d,valueAsDate:d.filter(B=>B!=null).map(B=>B.toDate(C)),valueAsString:r("valueAsString"),focusedValue:u,focusedValueAsDate:u?.toDate(C),focusedValueAsString:i("format")(u,{locale:w,timeZone:C}),visibleRange:r("visibleRange"),selectToday(){const B=Mn(Ba(C),v,y);a({type:"VALUE.SET",value:B})},setValue(B){const W=B.map(Z=>Mn(Z,v,y));a({type:"VALUE.SET",value:W})},clearValue(){a({type:"VALUE.CLEAR"})},setFocusedValue(B){a({type:"FOCUS.SET",value:B})},setOpen(B){i("inline")||n.matches("open")===B||a({type:B?"OPEN":"CLOSE"})},focusMonth:le,focusYear:he,getYears:q,getMonths:U,getYearsGrid(B={}){const{columns:W=1}=B;return Kg(oe(),W)},getDecade(){const B=ys(u.year);return{start:B.at(0),end:B.at(-1)}},getMonthsGrid(B={}){const{columns:W=1,format:Z}=B;return Kg(U({format:Z}),W)},format(B,W={month:"long",year:"numeric"}){return new oo(w,W).format(B.toDate(C))},setView(B){a({type:"VIEW.SET",view:B})},goToNext(){a({type:"GOTO.NEXT",view:o.get("view")})},goToPrev(){a({type:"GOTO.PREV",view:o.get("view")})},getRootProps(){return t.element({...Le.root.attrs,dir:i("dir"),id:TD(s),"data-state":P?"open":"closed","data-disabled":L(m),"data-readonly":L(g)})},getLabelProps(B={}){const{index:W=0}=B;return t.label({...Le.label.attrs,id:OD(s,W),dir:i("dir"),htmlFor:rv(s,W),"data-state":P?"open":"closed","data-index":W,"data-disabled":L(m),"data-readonly":L(g)})},getControlProps(){return t.element({...Le.control.attrs,dir:i("dir"),id:z1(s),"data-disabled":L(m)})},getRangeTextProps(){return t.element({...Le.rangeText.attrs,dir:i("dir")})},getContentProps(){return t.element({...Le.content.attrs,hidden:!P,dir:i("dir"),"data-state":P?"open":"closed","data-placement":H,"data-inline":L(i("inline")),id:tp(s),tabIndex:-1,role:"application","aria-roledescription":"datepicker","aria-label":te.content})},getTableProps(B={}){const{view:W="day",columns:Z=W==="day"?7:4}=B,re=Oe(B);return t.element({...Le.table.attrs,role:"grid","data-columns":Z,"aria-roledescription":LD(W),id:ID(s,re),"aria-readonly":Je(g),"aria-disabled":Je(m),"aria-multiselectable":Je(i("selectionMode")!=="single"),"data-view":W,dir:i("dir"),tabIndex:-1,onKeyDown(ye){if(ye.defaultPrevented)return;const ke={Enter(){W==="day"&&ne(u)||W==="month"&&!Ce({value:u.month}).selectable||W==="year"&&!de({value:u.year}).selectable||a({type:"TABLE.ENTER",view:W,columns:Z,focus:!0})},ArrowLeft(){a({type:"TABLE.ARROW_LEFT",view:W,columns:Z,focus:!0})},ArrowRight(){a({type:"TABLE.ARROW_RIGHT",view:W,columns:Z,focus:!0})},ArrowUp(){a({type:"TABLE.ARROW_UP",view:W,columns:Z,focus:!0})},ArrowDown(){a({type:"TABLE.ARROW_DOWN",view:W,columns:Z,focus:!0})},PageUp(Te){a({type:"TABLE.PAGE_UP",larger:Te.shiftKey,view:W,columns:Z,focus:!0})},PageDown(Te){a({type:"TABLE.PAGE_DOWN",larger:Te.shiftKey,view:W,columns:Z,focus:!0})},Home(){a({type:"TABLE.HOME",view:W,columns:Z,focus:!0})},End(){a({type:"TABLE.END",view:W,columns:Z,focus:!0})}}[Ps(ye,{dir:i("dir")})];ke&&(ke(ye),ye.preventDefault(),ye.stopPropagation())},onPointerLeave(){a({type:"TABLE.POINTER_LEAVE"})},onPointerDown(){a({type:"TABLE.POINTER_DOWN",view:W})},onPointerUp(){a({type:"TABLE.POINTER_UP",view:W})}})},getTableHeadProps(B={}){const{view:W="day"}=B;return t.element({...Le.tableHead.attrs,"aria-hidden":!0,dir:i("dir"),"data-view":W,"data-disabled":L(m)})},getTableHeaderProps(B={}){const{view:W="day"}=B;return t.element({...Le.tableHeader.attrs,dir:i("dir"),"data-view":W,"data-disabled":L(m)})},getTableBodyProps(B={}){const{view:W="day"}=B;return t.element({...Le.tableBody.attrs,"data-view":W,"data-disabled":L(m)})},getTableRowProps(B={}){const{view:W="day"}=B;return t.element({...Le.tableRow.attrs,"aria-disabled":Je(m),"data-disabled":L(m),"data-view":W})},getDayTableCellState:me,getDayTableCellProps(B){const{value:W}=B,Z=me(B);return t.element({...Le.tableCell.attrs,role:"gridcell","aria-disabled":Je(!Z.selectable),"aria-selected":Z.selected||Z.inRange,"aria-invalid":Je(Z.invalid),"aria-current":Z.today?"date":void 0,"data-value":W.toString()})},getDayTableCellTriggerProps(B){const{value:W}=B,Z=me(B);return t.element({...Le.tableCellTrigger.attrs,id:Yu(s,W.toString()),role:"button",dir:i("dir"),tabIndex:Z.focused?0:-1,"aria-label":Z.ariaLabel,"aria-disabled":Je(!Z.selectable),"aria-invalid":Je(Z.invalid),"data-disabled":L(!Z.selectable),"data-selected":L(Z.selected),"data-value":W.toString(),"data-view":"day","data-today":L(Z.today),"data-focus":L(Z.focused),"data-unavailable":L(Z.unavailable),"data-range-start":L(Z.firstInRange),"data-range-end":L(Z.lastInRange),"data-in-range":L(Z.inRange),"data-outside-range":L(Z.outsideRange),"data-weekend":L(Z.weekend),"data-in-hover-range":L(Z.inHoveredRange),"data-hover-range-start":L(Z.firstInHoveredRange),"data-hover-range-end":L(Z.lastInHoveredRange),onClick(re){re.defaultPrevented||Z.selectable&&a({type:"CELL.CLICK",cell:"day",value:W})},onPointerMove:S?re=>{if(re.pointerType==="touch"||!Z.selectable)return;const ye=!s.isActiveElement(re.currentTarget);h&&E2(W,h)||a({type:"CELL.POINTER_MOVE",cell:"day",value:W,focus:ye})}:void 0})},getMonthTableCellState:Ce,getMonthTableCellProps(B){const{value:W,columns:Z}=B,re=Ce(B);return t.element({...Le.tableCell.attrs,dir:i("dir"),colSpan:Z,role:"gridcell","aria-selected":Je(re.selected||re.inRange),"data-selected":L(re.selected),"aria-disabled":Je(!re.selectable),"data-value":W})},getMonthTableCellTriggerProps(B){const{value:W}=B,Z=Ce(B);return t.element({...Le.tableCellTrigger.attrs,dir:i("dir"),role:"button",id:Yu(s,W.toString()),"data-selected":L(Z.selected),"aria-disabled":Je(!Z.selectable),"data-disabled":L(!Z.selectable),"data-focus":L(Z.focused),"data-in-range":L(Z.inRange),"data-outside-range":L(Z.outsideRange),"aria-label":Z.valueText,"data-view":"month","data-value":W,tabIndex:Z.focused?0:-1,onClick(re){re.defaultPrevented||Z.selectable&&a({type:"CELL.CLICK",cell:"month",value:W})},onPointerMove:S?re=>{if(re.pointerType==="touch"||!Z.selectable)return;const ye=!s.isActiveElement(re.currentTarget);h&&Z.value&&O2(Z.value,h)||a({type:"CELL.POINTER_MOVE",cell:"month",value:Z.value,focus:ye})}:void 0})},getYearTableCellState:de,getYearTableCellProps(B){const{value:W,columns:Z}=B,re=de(B);return t.element({...Le.tableCell.attrs,dir:i("dir"),colSpan:Z,role:"gridcell","aria-selected":Je(re.selected),"data-selected":L(re.selected),"aria-disabled":Je(!re.selectable),"data-value":W})},getYearTableCellTriggerProps(B){const{value:W}=B,Z=de(B);return t.element({...Le.tableCellTrigger.attrs,dir:i("dir"),role:"button",id:Yu(s,W.toString()),"data-selected":L(Z.selected),"data-focus":L(Z.focused),"data-in-range":L(Z.inRange),"aria-disabled":Je(!Z.selectable),"data-disabled":L(!Z.selectable),"aria-label":Z.valueText,"data-outside-range":L(Z.outsideRange),"data-value":W,"data-view":"year",tabIndex:Z.focused?0:-1,onClick(re){re.defaultPrevented||Z.selectable&&a({type:"CELL.CLICK",cell:"year",value:W})},onPointerMove:S?re=>{if(re.pointerType==="touch"||!Z.selectable)return;const ye=!s.isActiveElement(re.currentTarget);h&&Z.value&&T2(Z.value,h)||a({type:"CELL.POINTER_MOVE",cell:"year",value:Z.value,focus:ye})}:void 0})},getNextTriggerProps(B={}){const{view:W="day"}=B,Z=m||!r("isNextVisibleRangeValid");return t.button({...Le.nextTrigger.attrs,dir:i("dir"),id:DD(s,W),type:"button","aria-label":te.nextTrigger(W),disabled:Z,"data-disabled":L(Z),onClick(re){re.defaultPrevented||a({type:"GOTO.NEXT",view:W})}})},getPrevTriggerProps(B={}){const{view:W="day"}=B,Z=m||!r("isPrevVisibleRangeValid");return t.button({...Le.prevTrigger.attrs,dir:i("dir"),id:PD(s,W),type:"button","aria-label":te.prevTrigger(W),disabled:Z,"data-disabled":L(Z),onClick(re){re.defaultPrevented||a({type:"GOTO.PREV",view:W})}})},getClearTriggerProps(){return t.button({...Le.clearTrigger.attrs,id:B1(s),dir:i("dir"),type:"button","aria-label":te.clearTrigger,hidden:!d.length,onClick(B){B.defaultPrevented||a({type:"VALUE.CLEAR"})}})},getTriggerProps(){return t.button({...Le.trigger.attrs,id:H1(s),dir:i("dir"),type:"button","data-placement":H,"aria-label":te.trigger(P),"aria-controls":tp(s),"data-state":P?"open":"closed","aria-haspopup":"grid",disabled:m,onClick(B){B.defaultPrevented||b&&a({type:"TRIGGER.CLICK"})}})},getViewProps(B={}){const{view:W="day"}=B;return t.element({...Le.view.attrs,"data-view":W,hidden:o.get("view")!==W})},getViewTriggerProps(B={}){const{view:W="day"}=B;return t.button({...Le.viewTrigger.attrs,"data-view":W,dir:i("dir"),id:AD(s,W),type:"button",disabled:m,"aria-label":te.viewTrigger(W),onClick(Z){Z.defaultPrevented||b&&a({type:"VIEW.TOGGLE",src:"viewTrigger"})}})},getViewControlProps(B={}){const{view:W="day"}=B;return t.element({...Le.viewControl.attrs,"data-view":W,dir:i("dir")})},getInputProps(B={}){const{index:W=0,fixOnBlur:Z=!0}=B;return t.input({...Le.input.attrs,id:rv(s,W),autoComplete:"off",autoCorrect:"off",spellCheck:"false",dir:i("dir"),name:i("name"),"data-index":W,"data-state":P?"open":"closed",readOnly:g,disabled:m,placeholder:i("placeholder")||BD(w),defaultValue:r("valueAsString")[W],onBeforeInput(re){const{data:ye}=W0(re);q1(ye,G)||re.preventDefault()},onFocus(){a({type:"INPUT.FOCUS",index:W})},onBlur(re){const ye=re.currentTarget.value.trim();a({type:"INPUT.BLUR",value:ye,index:W,fixOnBlur:Z})},onKeyDown(re){if(re.defaultPrevented||!b)return;const ye={Enter(ke){Is(ke)||ne(u)||ke.currentTarget.value.trim()!==""&&a({type:"INPUT.ENTER",value:ke.currentTarget.value,index:W})}}[re.key];ye&&(ye(re),re.preventDefault())},onInput(re){const ye=re.currentTarget.value;a({type:"INPUT.CHANGE",value:zD(ye,G),index:W})}})},getMonthSelectProps(){return t.select({...Le.monthSelect.attrs,id:W1(s),"aria-label":te.monthSelect,disabled:m,dir:i("dir"),defaultValue:l.month,onChange(B){le(Number(B.currentTarget.value))}})},getYearSelectProps(){return t.select({...Le.yearSelect.attrs,id:U1(s),disabled:m,"aria-label":te.yearSelect,dir:i("dir"),defaultValue:l.year,onChange(B){he(Number(B.currentTarget.value))}})},getPositionerProps(){return t.element({id:j1(s),...Le.positioner.attrs,dir:i("dir"),style:A.floating})},getPresetTriggerProps(B){const W=Array.isArray(B.value)?B.value:av(B.value,w,C),Z=W.filter(re=>re!=null).map(re=>re.toDate(C).toDateString());return t.button({...Le.presetTrigger.attrs,"aria-label":te.presetTrigger(Z),type:"button",onClick(re){re.defaultPrevented||a({type:"PRESET.CLICK",value:W})}})}}}var{and:mn}=kt();function XD(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(!nn(e[o],t[o]))return!1;return!0}function Vl(e,t){return e.map(n=>t("format")(n,{locale:t("locale"),timeZone:t("timeZone")}))}var JD={props({props:e}){const t=e.locale||"en-US",n=e.timeZone||"UTC",o=e.selectionMode||"single",i=e.numOfMonths||1,a=e.defaultValue?Rl(e.defaultValue).map(u=>Mn(u,e.min,e.max)):void 0,r=e.value?Rl(e.value).map(u=>Mn(u,e.min,e.max)):void 0;let s=e.focusedValue||e.defaultFocusedValue||r?.[0]||a?.[0]||Ba(n);s=Mn(s,e.min,e.max);const l="day",c="year",d=Hf(e.view||l,l,c);return{locale:t,numOfMonths:i,timeZone:n,selectionMode:o,defaultView:d,minView:l,maxView:c,outsideDaySelectable:!1,closeOnSelect:!0,format(u,{locale:h,timeZone:p}){return new oo(h,{timeZone:p,day:"2-digit",month:"2-digit",year:"numeric"}).format(u.toDate(p))},parse(u,{locale:h,timeZone:p}){return $D(u,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:nn,hash:o=>o.toString(),sync:!0,onChange(o){var i;const a=n(),r=a.get("view"),s=a.get("value"),l=Vl(s,e);(i=e("onFocusChange"))==null||i({value:s,valueAsString:l,view:r,focusedValue:o})}})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:XD,hash:o=>o.map(i=>i.toString()).join(","),onChange(o){var i;const a=n(),r=Vl(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&&nn(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:tv(o,"start",{months:e("numOfMonths")},e("locale")),isEqual:nn,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})=>I1(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 oo(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})=>!cD(e.get("startValue"),t("min"),t("max")),isNextVisibleRangeValid:({prop:e,computed:t})=>!dD(t("endValue"),e("min"),e("max")),valueAsString:({context:e,prop:t})=>Vl(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:mn("shouldRestoreFocus","isInteractOutsideEvent"),target:"focused",actions:["focusTriggerElement"]},{guard:"shouldRestoreFocus",target:"focused",actions:["focusInputElement"]},{target:"idle"}],"CELL.CLICK":[{guard:"isAboveMinView",actions:["setFocusedValueForView","setPreviousView"]},{guard:mn("isRangePicker","hasSelectedRange"),actions:["setActiveIndexToStart","resetSelection","setActiveIndexToEnd"]},{guard:mn("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","setRestoreFocus"]},{guard:mn("isRangePicker","isSelectingEndDate","closeOnSelect"),target:"focused",actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","focusInputElement"]},{guard:mn("isRangePicker","isSelectingEndDate"),actions:["setFocusedDate","setSelectedDate","setActiveIndexToStart","clearHoveredDate"]},{guard:"isRangePicker",actions:["setFocusedDate","setSelectedDate","setActiveIndexToEnd"]},{guard:"isMultiPicker",actions:["setFocusedDate","toggleSelectedDate"]},{guard:mn("closeOnSelect","isOpenControlled"),actions:["setFocusedDate","setSelectedDate","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["setFocusedDate","setSelectedDate","invokeOnClose","focusInputElement"]},{actions:["setFocusedDate","setSelectedDate"]}],"CELL.POINTER_MOVE":{guard:mn("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:mn("isRangePicker","hasSelectedRange"),actions:["setActiveIndexToStart","clearDateValue","setSelectedDate","setActiveIndexToEnd"]},{guard:mn("isRangePicker","isSelectingEndDate","closeOnSelect","isOpenControlled"),actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose"]},{guard:mn("isRangePicker","isSelectingEndDate","closeOnSelect"),target:"focused",actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate","invokeOnClose","focusInputElement"]},{guard:mn("isRangePicker","isSelectingEndDate"),actions:["setSelectedDate","setActiveIndexToStart","clearHoveredDate"]},{guard:"isRangePicker",actions:["setSelectedDate","setActiveIndexToEnd","focusNextDay"]},{guard:"isMultiPicker",actions:["toggleSelectedDate"]},{guard:mn("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})=>WD(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=G1(n);return cn(o,()=>ND(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",L1({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:aa(()=>Ic(e),{type:"popover",defer:!0,exclude:[...Ir(e),lv(e),MD(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=GD(e.get("view"),t("minView"),t("maxView"));e.set("view",n)},setPreviousView({context:e,prop:t}){const n=qD(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=>hD(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}){cf({target:Ic(e),doc:e.getDoc()})},enableTextSelection({scope:e}){ox({doc:e.getDoc(),target:Ic(e)})},focusFirstSelectedDate(e){const{context:t}=e;t.get("value").length&&He(e,t.get("value")[0])},syncInputElement({scope:e,computed:t}){ue(()=>{Ir(e).forEach((n,o)=>{Nn(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=>Mn(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")]=Pc(e,n.value??t.get("focusedValue")),t.set("value",np(o))},resetSelection(e){const{context:t,event:n}=e,o=Pc(e,n.value??t.get("focusedValue"));t.set("value",[o])},toggleSelectedDate(e){const{context:t,event:n}=e,o=Pc(e,n.value??t.get("focusedValue")),i=t.get("value").findIndex(a=>nn(a,o));if(i===-1){const a=[...t.get("value"),o];t.set("value",Rl(a))}else{const a=Array.from(t.get("value"));a.splice(i,1),t.set("value",Rl(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",np(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=M1(t.get("focusedValue"),t.get("startValue"),n("visibleDuration"),o("locale"),o("min"),o("max"));Ml(e,i)},focusPreviousPage(e){const{context:t,computed:n,prop:o}=e,i=N1(t.get("focusedValue"),t.get("startValue"),n("visibleDuration"),o("locale"),o("min"),o("max"));Ml(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=wD(t.get("focusedValue"),t.get("startValue"),n.larger,o("visibleDuration"),i("locale"),i("min"),i("max"));a&&Ml(e,a)},focusPreviousSection(e){const{context:t,event:n,computed:o,prop:i}=e,a=CD(t.get("focusedValue"),t.get("startValue"),n.larger,o("visibleDuration"),i("locale"),i("min"),i("max"));a&&Ml(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,Ba(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=ys(t.get("focusedValue").year),o=t.get("focusedValue").set({year:n[0]});He(e,o)},focusLastYear(e){const{context:t}=e,n=ys(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}){ue(()=>{var n;const o=t.get("view");(n=sv(e,o))==null||n.focus({preventScroll:!0})})},focusActiveCellIfNeeded({scope:e,context:t,event:n}){n.focus&&ue(()=>{var o;const i=t.get("view");(o=sv(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}){ue(()=>{var t;(t=lv(e))==null||t.focus({preventScroll:!0})})},focusFirstInputElement({scope:e}){ue(()=>{const[t]=Ir(e);t?.focus({preventScroll:!0})})},focusInputElement({scope:e}){ue(()=>{const t=Ir(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=VD(e);Nn(n,t.get("startValue").month.toString())},syncYearSelectElement({scope:e,context:t}){const n=RD(e);Nn(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=Ir(e),i=n.index??t.get("activeIndex");Nn(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||!cv(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||!cv(o))&&t.value&&(o=e.get("focusedValue").copy()),!o)return;o=Mn(o,n("min"),n("max"));const i=Array.from(e.get("value"));i[t.index]=o,e.set("value",i);const a=Vl(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(!Jn(o,e.get("startValue"),t("endValue")))return;const i=tv(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})}}}},Pc=(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 KD(r=>{UD(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=Pc(e,t);if(nn(n.get("focusedValue"),a))return;const r=ll(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 Ml(e,t){const{context:n}=e;n.set("startValue",t.startDate);const o=n.get("focusedValue");nn(o,t.focusedDate)||n.set("focusedValue",t.focusedDate)}ae()(["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"]);ae()(["index","fixOnBlur"]);ae()(["value"]);ae()(["columns","id","view"]);ae()(["disabled","value","columns"]);ae()(["view"]);const[Y1,Ye]=Pe("DatePickerContext"),QD=T({__name:"date-picker-clear-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Ye();return Y(),(n,o)=>(x(),$(f(K).button,z(f(t).getClearTriggerProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),eA=T({__name:"date-picker-content",props:{asChild:{type:Boolean}},setup(e){const t=Ye(),n=Jd(),o=E(()=>oa(t.value.getContentProps(),n.value.presenceProps));return Y(),(i,a)=>f(n).unmounted?X("",!0):(x(),$(f(K).div,z({key:0},o.value,{"as-child":e.asChild}),{default:_(()=>[R(i.$slots,"default")]),_:3},16,["as-child"]))}}),tA=T({__name:"date-picker-context",setup(e){const t=Ye();return(n,o)=>R(n.$slots,"default",st(mt(f(t))))}}),nA=T({__name:"date-picker-control",props:{asChild:{type:Boolean}},setup(e){const t=Ye();return Y(),(n,o)=>(x(),$(f(K).div,z(f(t).getControlProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),oA=T({__name:"date-picker-input",props:{index:{},fixOnBlur:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=Ye();return Y(),(o,i)=>(x(),$(f(K).input,z(f(n).getInputProps(t),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),iA=T({__name:"date-picker-label",props:{asChild:{type:Boolean}},setup(e){const t=Ye();return Y(),(n,o)=>(x(),$(f(K).label,z(f(t).getLabelProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),aA=["value"],rA=T({__name:"date-picker-month-select",props:{asChild:{type:Boolean}},setup(e){const t=Ye();return Y(),(n,o)=>(x(),$(f(K).select,z(f(t).getMonthSelectProps(),{"as-child":e.asChild}),{default:_(()=>[(x(!0),D($e,null,Ie(f(t).getMonths(),i=>(x(),D("option",{key:i.value,value:i.value},ie(i.label),9,aA))),128))]),_:1},16,["as-child"]))}}),[sA,ca]=Pe("DatePickerViewPropsContext"),lA=T({__name:"date-picker-next-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Ye(),n=ca();return Y(),(o,i)=>(x(),$(f(K).button,z(f(t).getNextTriggerProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),cA=T({__name:"date-picker-positioner",props:{asChild:{type:Boolean}},setup(e){const t=Ye(),n=ia(),o=il(E(()=>({...n.value,present:t.value.open})));return Xd(o),Y(),(i,a)=>f(o).unmounted?X("",!0):(x(),$(f(K).div,z({key:0},f(t).getPositionerProps(),{"as-child":e.asChild}),{default:_(()=>[R(i.$slots,"default")]),_:3},16,["as-child"]))}}),dA=T({__name:"date-picker-preset-trigger",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=Ye();return Y(),(o,i)=>(x(),$(f(K).button,z(f(n).getPresetTriggerProps(t),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),uA=T({__name:"date-picker-prev-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Ye(),n=ca();return Y(),(o,i)=>(x(),$(f(K).button,z(f(t).getPrevTriggerProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),hA=T({__name:"date-picker-range-text",props:{asChild:{type:Boolean}},setup(e){const t=Ye(),n=E(()=>{const{start:o,end:i}=t.value.visibleRangeText;return Ln([o,i]).filter(Boolean).join(" - ")});return Y(),(o,i)=>(x(),$(f(K).div,z(f(t).getRangeTextProps(),{"as-child":e.asChild}),{default:_(()=>[Re(ie(n.value),1)]),_:1},16,["as-child"]))}}),pA=T({__name:"date-picker-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=E(()=>t.value);return Y1(n),En(E(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),Y(),(o,i)=>(x(),$(f(K).div,z(n.value.getRootProps(),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),fA=(e={},t)=>{const n=Mt(),o=Kt(Zt),i=pn(hn),a=E(()=>{const s=qe(e);return{id:n,dir:i.value.dir,locale:i.value.locale,value:s.modelValue,getRootNode:o?.value.getRootNode,...On(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=Nt(JD,a);return E(()=>ZD(r,Yt))},gA=T({__name:"date-picker-root",props:dn({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=fA(n,t);return Y1(o),En(E(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Y(),(i,a)=>(x(),$(f(K).div,z(f(o).getRootProps(),{"as-child":e.asChild}),{default:_(()=>[R(i.$slots,"default")]),_:3},16,["as-child"]))}}),[mA,cu]=Pe("DatePickerTablePropsContext"),vA=T({__name:"date-picker-table-body",props:{asChild:{type:Boolean}},setup(e){const t=Ye(),n=cu();return Y(),(o,i)=>(x(),$(f(K).tbody,z(f(t).getTableBodyProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),[bA,yA]=Pe("DatePickerTableCellPropsContext"),xA=T({__name:"date-picker-table-cell-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Ye(),n=yA(),o=ca(),i=E(()=>{const a={day:t.value.getDayTableCellTriggerProps,month:t.value.getMonthTableCellTriggerProps,year:t.value.getYearTableCellTriggerProps}[o.view];return a(n)});return Y(),(a,r)=>(x(),$(f(K).div,z(i.value,{"as-child":e.asChild}),{default:_(()=>[R(a.$slots,"default")]),_:3},16,["as-child"]))}}),wA=T({__name:"date-picker-table-cell",props:{value:{},disabled:{type:Boolean},columns:{},visibleRange:{},asChild:{type:Boolean}},setup(e){const t=e,n=Ye(),o=ca();bA(t);const i=E(()=>({day:n.value.getDayTableCellProps,month:n.value.getMonthTableCellProps,year:n.value.getYearTableCellProps})[o.view??"day"](t));return Y(),(a,r)=>(x(),$(f(K).td,z(i.value,{"as-child":e.asChild}),{default:_(()=>[R(a.$slots,"default")]),_:3},16,["as-child"]))}}),CA=T({__name:"date-picker-table-head",props:{asChild:{type:Boolean}},setup(e){const t=Ye(),n=cu();return Y(),(o,i)=>(x(),$(f(K).thead,z(f(t).getTableHeadProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),_A=T({__name:"date-picker-table-header",props:{asChild:{type:Boolean}},setup(e){const t=Ye(),n=cu();return Y(),(o,i)=>(x(),$(f(K).th,z(f(t).getTableHeaderProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),kA=T({__name:"date-picker-table-row",props:{asChild:{type:Boolean}},setup(e){const t=Ye(),n=cu();return Y(),(o,i)=>(x(),$(f(K).tr,z(f(t).getTableRowProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),$A=T({__name:"date-picker-table",props:{view:{},columns:{},id:{},asChild:{type:Boolean}},setup(e){const t=e,n=Ye(),o=ca(),i=Mt(),a=t.id??i;return mA({...t,id:a,...o}),Y(),(r,s)=>(x(),$(f(K).table,z(f(n).getTableProps(t),{"as-child":e.asChild}),{default:_(()=>[R(r.$slots,"default")]),_:3},16,["as-child"]))}}),SA=T({__name:"date-picker-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Ye();return Y(),(n,o)=>(x(),$(f(K).button,z(f(t).getTriggerProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),EA=T({__name:"date-picker-view-control",props:{asChild:{type:Boolean}},setup(e){const t=Ye(),n=ca();return Y(),(o,i)=>(x(),$(f(K).div,z(f(t).getViewControlProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),OA=T({__name:"date-picker-view-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Ye(),n=ca();return Y(),(o,i)=>(x(),$(f(K).button,z(f(t).getViewTriggerProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),K1=F1.extendWith("view"),TA=T({__name:"date-picker-view",props:{view:{},asChild:{type:Boolean}},setup(e){const t=e,n=Ye();return sA(t),Y(),(o,i)=>(x(),$(f(K).div,z(f(K1).build().view.attrs,{hidden:f(n).view!==e.view,"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["hidden","as-child"]))}}),IA=["value"],PA=T({__name:"date-picker-year-select",props:{asChild:{type:Boolean}},setup(e){const t=Ye();return Y(),(n,o)=>(x(),$(f(K).select,z(f(t).getYearSelectProps(),{"as-child":e.asChild}),{default:_(()=>[(x(!0),D($e,null,Ie(f(t).getYears(),i=>(x(),D("option",{key:i.value,value:i.value},ie(i.label),9,IA))),128))]),_:1},16,["as-child"]))}}),we=Object.freeze(Object.defineProperty({__proto__:null,ClearTrigger:QD,Content:eA,Context:tA,Control:nA,Input:oA,Label:iA,MonthSelect:rA,NextTrigger:lA,Positioner:cA,PresetTrigger:dA,PrevTrigger:uA,RangeText:hA,Root:gA,RootProvider:pA,Table:$A,TableBody:vA,TableCell:wA,TableCellTrigger:xA,TableHead:CA,TableHeader:_A,TableRow:kA,Trigger:SA,View:TA,ViewControl:EA,ViewTrigger:OA,YearSelect:PA},Symbol.toStringTag,{value:"Module"})),[Z1,gi]=Pe("DialogContext"),DA=T({__name:"dialog-backdrop",props:{asChild:{type:Boolean}},setup(e){const t=gi(),n=ia(),o=il(E(()=>({...n.value,present:t.value.open}))),i=E(()=>oa(t.value.getBackdropProps(),o.value.presenceProps));return Y(),(a,r)=>f(o).unmounted?X("",!0):(x(),$(f(K).div,z({key:0},i.value,{"as-child":e.asChild}),{default:_(()=>[R(a.$slots,"default")]),_:3},16,["as-child"]))}}),AA=T({__name:"dialog-close-trigger",props:{asChild:{type:Boolean}},setup(e){const t=gi();return Y(),(n,o)=>(x(),$(f(K).button,z(f(t).getCloseTriggerProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),RA=T({__name:"dialog-content",props:{asChild:{type:Boolean}},setup(e){const t=gi(),n=Jd(),o=E(()=>oa(t.value.getContentProps(),n.value.presenceProps));return Y(),(i,a)=>f(n).unmounted?X("",!0):(x(),$(f(K).div,z({key:0},o.value,{"as-child":e.asChild}),{default:_(()=>[R(i.$slots,"default")]),_:3},16,["as-child"]))}}),VA=T({__name:"dialog-context",setup(e){const t=gi();return(n,o)=>R(n.$slots,"default",st(mt(f(t))))}}),MA=T({__name:"dialog-description",props:{asChild:{type:Boolean}},setup(e){const t=gi();return Y(),(n,o)=>(x(),$(f(K).div,z(f(t).getDescriptionProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),NA=T({__name:"dialog-positioner",props:{asChild:{type:Boolean}},setup(e){const t=gi(),n=ia(),o=il(E(()=>({...n.value,present:t.value.open})));return Xd(o),Y(),(i,a)=>f(o).unmounted?X("",!0):(x(),$(f(K).div,z({key:0},f(t).getPositionerProps(),{"as-child":e.asChild}),{default:_(()=>[R(i.$slots,"default")]),_:3},16,["as-child"]))}}),LA=T({__name:"dialog-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},setup(e){const t=e,n=E(()=>t.value);return Z1(n),En(E(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),Y(),(o,i)=>R(o.$slots,"default")}});var X1=be("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),xi=X1.build(),J1=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`dialog:${e.id}:positioner`},Q1=e=>{var t;return((t=e.ids)==null?void 0:t.backdrop)??`dialog:${e.id}:backdrop`},op=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`dialog:${e.id}:content`},ew=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`dialog:${e.id}:trigger`},ip=e=>{var t;return((t=e.ids)==null?void 0:t.title)??`dialog:${e.id}:title`},ap=e=>{var t;return((t=e.ids)==null?void 0:t.description)??`dialog:${e.id}:description`},tw=e=>{var t;return((t=e.ids)==null?void 0:t.closeTrigger)??`dialog:${e.id}:close`},Nl=e=>e.getById(op(e)),FA=e=>e.getById(J1(e)),BA=e=>e.getById(Q1(e)),zA=e=>e.getById(ew(e)),HA=e=>e.getById(ip(e)),jA=e=>e.getById(ap(e)),WA=e=>e.getById(tw(e));function UA(e,t){const{state:n,send:o,context:i,prop:a,scope:r}=e,s=a("aria-label"),l=n.matches("open");return{open:l,setOpen(c){n.matches("open")!==c&&o({type:c?"OPEN":"CLOSE"})},getTriggerProps(){return t.button({...xi.trigger.attrs,dir:a("dir"),id:ew(r),"aria-haspopup":"dialog",type:"button","aria-expanded":l,"data-state":l?"open":"closed","aria-controls":op(r),onClick(c){c.defaultPrevented||o({type:"TOGGLE"})}})},getBackdropProps(){return t.element({...xi.backdrop.attrs,dir:a("dir"),hidden:!l,id:Q1(r),"data-state":l?"open":"closed"})},getPositionerProps(){return t.element({...xi.positioner.attrs,dir:a("dir"),id:J1(r),style:{pointerEvents:l?void 0:"none"}})},getContentProps(){const c=i.get("rendered");return t.element({...xi.content.attrs,dir:a("dir"),role:a("role"),hidden:!l,id:op(r),tabIndex:-1,"data-state":l?"open":"closed","aria-modal":!0,"aria-label":s||void 0,"aria-labelledby":s||!c.title?void 0:ip(r),"aria-describedby":c.description?ap(r):void 0})},getTitleProps(){return t.element({...xi.title.attrs,dir:a("dir"),id:ip(r)})},getDescriptionProps(){return t.element({...xi.description.attrs,dir:a("dir"),id:ap(r)})},getCloseTriggerProps(){return t.button({...xi.closeTrigger.attrs,dir:a("dir"),id:tw(r),type:"button",onClick(c){c.defaultPrevented||(c.stopPropagation(),o({type:"CLOSE"}))}})}}}var GA={props({props:e,scope:t}){const n=e.role==="alertdialog",o=n?()=>WA(t):void 0,i=typeof e.modal=="boolean"?e.modal:!0;return{role:"dialog",modal:i,trapFocus:i,preventScroll:i,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:o,...e}},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return aa(()=>Nl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[zA(e)],onInteractOutside(o){var i;(i=n("onInteractOutside"))==null||i(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(o){var i;(i=n("onEscapeKeyDown"))==null||i(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return mT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?Rx(()=>Nl(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:n=>{var o;return((o=t("finalFocusEl"))==null?void 0:o())??n},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?Px(()=>[Nl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){ue(()=>{e.set("rendered",{title:!!HA(t),description:!!jA(t)})})},syncZIndex({scope:e}){ue(()=>{const t=Nl(e);if(!t)return;const n=ii(t);[FA(e),BA(e)].forEach(o=>{o?.style.setProperty("--z-index",n.zIndex),o?.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};ae()(["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"]);const qA=(e={},t)=>{const n=Mt(),o=Kt(Zt),i=pn(hn),a=E(()=>{const s=qe(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,...On(e),onOpenChange:l=>{var c;t?.("openChange",l),t?.("update:open",l.open),(c=s.onOpenChange)==null||c.call(s,l)},onEscapeKeyDown:l=>{var c;t?.("escapeKeyDown",l),(c=s.onEscapeKeyDown)==null||c.call(s,l)},onFocusOutside:l=>{var c;t?.("focusOutside",l),(c=s.onFocusOutside)==null||c.call(s,l)},onInteractOutside:l=>{var c;t?.("interactOutside",l),(c=s.onInteractOutside)==null||c.call(s,l)},onPointerDownOutside:l=>{var c;t?.("pointerDownOutside",l),(c=s.onPointerDownOutside)==null||c.call(s,l)},onRequestDismiss:l=>{var c;t?.("requestDismiss",l),(c=s.onRequestDismiss)==null||c.call(s,l)}}}),r=Nt(GA,a);return E(()=>UA(r,Yt))},YA=T({__name:"dialog-root",props:dn({"aria-label":{},closeOnEscape:{type:Boolean},closeOnInteractOutside:{type:Boolean},defaultOpen:{type:Boolean},finalFocusEl:{type:Function},id:{},ids:{},initialFocusEl:{type:Function},modal:{type:Boolean},open:{type:Boolean},persistentElements:{},preventScroll:{type:Boolean},restoreFocus:{type:Boolean},role:{},trapFocus:{type:Boolean},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},{closeOnEscape:void 0,closeOnInteractOutside:void 0,defaultOpen:void 0,modal:void 0,open:void 0,preventScroll:void 0,restoreFocus:void 0,trapFocus:void 0}),emits:["escapeKeyDown","focusOutside","interactOutside","openChange","pointerDownOutside","requestDismiss","update:open"],setup(e,{emit:t}){const n=e,o=qA(n,t);return Z1(o),En(E(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Y(),(i,a)=>R(i.$slots,"default")}}),KA=T({__name:"dialog-title",props:{asChild:{type:Boolean}},setup(e){const t=gi();return Y(),(n,o)=>(x(),$(f(K).h2,z(f(t).getTitleProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),ZA=T({__name:"dialog-trigger",props:{asChild:{type:Boolean}},setup(e){const t=gi();return Y(),(n,o)=>(x(),$(f(K).button,z(f(t).getTriggerProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),Bo=Object.freeze(Object.defineProperty({__proto__:null,Backdrop:DA,CloseTrigger:AA,Content:RA,Context:VA,Description:MA,Positioner:NA,Root:YA,RootProvider:LA,Title:KA,Trigger:ZA},Symbol.toStringTag,{value:"Module"}));var XA=e=>typeof e.getAsEntry=="function"?e.getAsEntry():typeof e.webkitGetAsEntry=="function"?e.webkitGetAsEntry():null,nw=e=>e.isDirectory,rp=e=>e.isFile,sp=(e,t)=>(Object.defineProperty(e,"relativePath",{value:t?`${t}/${e.name}`:e.name}),e),JA=(e,t)=>Promise.all(Array.from(e).filter(n=>n.kind==="file").map(n=>{const o=XA(n);if(!o)return null;if(nw(o)&&t)return ow(o.createReader(),`${o.name}`);if(rp(o)&&typeof n.getAsFile=="function"){const i=n.getAsFile();return Promise.resolve(i?sp(i,""):null)}if(rp(o))return new Promise(i=>{o.file(a=>{i(sp(a,""))})})}).filter(n=>n)),ow=(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(nw(s))return ow(s.createReader(),`${t}${s.name}`);if(rp(s))return new Promise(l=>{s.file(c=>{l(sp(c,t))})})}).filter(s=>s);o.push(Promise.all(r)),i()})};i()});function QA(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function eR(e){return/^.*\.[\w]+$/.test(e)}var dv=e=>QA(e)||eR(e);function tR(e){if(e!=null)return typeof e=="string"?e:Array.isArray(e)?e.filter(dv).join(","):Object.entries(e).reduce((t,[n,o])=>[...t,n,...o],[]).filter(dv).join(",")}var Ll=(e,t)=>e.name===t.name&&e.size===t.size&&e.type===t.type,Pr=e=>e!=null;function nR(e,t,n){if(Pr(e.size))if(Pr(t)&&Pr(n)){if(e.size>n)return[!1,"FILE_TOO_LARGE"];if(e.size<t)return[!1,"FILE_TOO_SMALL"]}else{if(Pr(t)&&e.size<t)return[!1,"FILE_TOO_SMALL"];if(Pr(n)&&e.size>n)return[!1,"FILE_TOO_LARGE"]}return[!0,null]}var oR="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",iR=new Map(oR.split("[").flatMap(e=>{const[t,n]=e.split("_");return t.split(",").map(o=>[o,n])}));function aR(e){const t=e.split(".").pop();return t&&iR.get(t)||null}function rR(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||aR(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 sR(e,t){const n=e.type==="application/x-moz-file"||rR(e,t);return[n,n?null:"FILE_INVALID_TYPE"]}var lR=be("editable").parts("root","area","label","preview","input","editTrigger","submitTrigger","cancelTrigger","control");lR.build();ae()(["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 cR=be("fieldset").parts("root","errorText","helperText","legend");cR.build();const[iw,fn]=Pe("FileUploadContext"),dR=T({__name:"file-upload-clear-trigger",props:{asChild:{type:Boolean}},setup(e){const t=fn();return Y(),(n,o)=>(x(),$(f(K).button,z(f(t).getClearTriggerProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),uR=T({__name:"file-upload-context",setup(e){const t=fn();return(n,o)=>R(n.$slots,"default",st(mt(f(t))))}}),hR=T({__name:"file-upload-dropzone",props:dn({asChild:{type:Boolean},disableClick:{type:Boolean}},{disableClick:void 0}),setup(e){const t=e,n=fn();return Y(),(o,i)=>(x(),$(f(K).div,z(f(n).getDropzoneProps(t),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),pR=T({__name:"file-upload-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=fn(),n=ro();return Y(),(o,i)=>{var a;return x(),$(f(K).input,z({"aria-describedby":(a=f(n))==null?void 0:a.ariaDescribedby},f(t).getHiddenInputProps(),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["aria-describedby","as-child"])}}}),[fR,cl]=Pe("FileUploadItemPropsContext"),gR=T({__name:"file-upload-item-delete-trigger",props:{asChild:{type:Boolean}},setup(e){const t=fn(),n=cl();return Y(),(o,i)=>(x(),$(f(K).button,z(f(t).getItemDeleteTriggerProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),[mR,vR]=Pe("FileUploadItemGroupPropsContext"),bR=T({__name:"file-upload-item-group",props:{asChild:{type:Boolean},type:{}},setup(e){const t=e,n=E(()=>Yo(t,["type"])),o=fn();return mR(n),Y(),(i,a)=>(x(),$(f(K).ul,z(f(o).getItemGroupProps(n.value),{"as-child":e.asChild}),{default:_(()=>[R(i.$slots,"default")]),_:3},16,["as-child"]))}}),yR=T({__name:"file-upload-item-name",props:{asChild:{type:Boolean}},setup(e){const t=fn(),n=cl(),o=Ys();return Y(),(i,a)=>(x(),$(f(K).div,z(f(t).getItemNameProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(i.$slots,"default",{},()=>{var r;return[Re(ie(((r=o.default)==null?void 0:r.call(o))||f(n).file.name),1)]})]),_:3},16,["as-child"]))}}),xR=T({__name:"file-upload-item-preview-image",props:{asChild:{type:Boolean}},setup(e){const t=fn(),n=cl(),o=fe("");return $0(i=>{const a=t.value.createFileUrl(n.value.file,r=>o.value=r);i(a)}),Y(),(i,a)=>o.value?(x(),$(f(K).img,st(z({key:0},f(t).getItemPreviewImageProps({...f(n),url:o.value}))),null,16)):X("",!0)}}),wR=T({__name:"file-upload-item-preview",props:{type:{default:".*"},asChild:{type:Boolean}},setup(e){const t=fn(),n=cl();return Y(),(o,i)=>f(n).file.type.match(e.type??".*")?(x(),$(f(K).div,z({key:0},f(t).getItemPreviewProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"])):X("",!0)}}),CR=T({__name:"file-upload-item-size-text",props:{asChild:{type:Boolean}},setup(e){const t=fn(),n=cl(),o=Ys();return Y(),(i,a)=>(x(),$(f(K).div,z(f(t).getItemSizeTextProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(i.$slots,"default",{},()=>{var r;return[Re(ie(((r=o.default)==null?void 0:r.call(o))||f(t).getFileSize(f(n).file)),1)]})]),_:3},16,["as-child"]))}}),_R=T({__name:"file-upload-item",props:{file:{},type:{},asChild:{type:Boolean}},setup(e){const t=e,n=fn(),o=vR(),i=E(()=>({...t,type:o.value.type}));return fR(i),Y(),(a,r)=>(x(),$(f(K).li,z(f(n).getItemProps(i.value),{"as-child":e.asChild}),{default:_(()=>[R(a.$slots,"default")]),_:3},16,["as-child"]))}}),kR=T({__name:"file-upload-label",props:{asChild:{type:Boolean}},setup(e){const t=fn();return Y(),(n,o)=>(x(),$(f(K).label,z(f(t).getLabelProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),$R=T({__name:"file-upload-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=E(()=>t.value);return iw(n),Y(),(o,i)=>(x(),$(f(K).div,z(n.value.getRootProps(),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}});function SR(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 ER=SR(Intl.NumberFormat);function OR(e,t,n={}){return ER(t,n).format(e)}var TR=["","kilo","mega","giga","tera"],IR=["","kilo","mega","giga","tera","peta"],PR=(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"?TR:IR,c=e<0;let d=Math.abs(e),u=0;for(;d>=s&&u<l.length-1;)d/=s,u++;const h=parseFloat(d.toPrecision(i)),p=c?-h:h;return OR(p,t,{style:"unit",unit:l[u]+a,unitDisplay:r})},aw=be("file-upload").parts("root","dropzone","item","itemDeleteTrigger","itemGroup","itemName","itemPreview","itemPreviewImage","itemSizeText","label","trigger","clearTrigger"),vn=aw.build(),rw=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`file:${e.id}`},sw=e=>{var t;return((t=e.ids)==null?void 0:t.dropzone)??`file:${e.id}:dropzone`},lp=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`file:${e.id}:input`},DR=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`file:${e.id}:trigger`},AR=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`file:${e.id}:label`},RR=(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}`},VR=(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}`},MR=(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}`},NR=(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}`},LR=e=>e.getById(rw(e)),uv=e=>e.getById(lp(e)),FR=e=>e.getById(sw(e));function hv(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 BR(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 pv(e,t,n=[],o=[]){const{prop:i,computed:a}=e,r=[],s=[],l={acceptedFiles:n,rejectedFiles:o};return t.forEach(c=>{var d;const[u,h]=sR(c,a("acceptAttr")),[p,m]=nR(c,i("minFileSize"),i("maxFileSize")),g=(d=i("validate"))==null?void 0:d(c,l),b=g?g.length===0:!0;if(u&&p&&b)r.push(c);else{const v=[h,m];b||v.push(...g??[]),s.push({file:c,errors:v.filter(Boolean)})}}),BR(e,r.length,n)||(r.forEach(c=>{s.push({file:c,errors:["TOO_MANY_FILES"]})}),r.splice(0)),{acceptedFiles:r,rejectedFiles:s}}function zR(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 zo="accepted";function HR(e,t){const{state:n,send:o,prop:i,computed:a,scope:r,context:s}=e,l=!!i("disabled"),c=!!i("required"),d=i("allowDrop"),u=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,g=zo){o({type:"FILE.DELETE",file:m,itemType:g})},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 PR(m.size,i("locale"))},createFileUrl(m,g){const b=r.getWin(),v=b.URL.createObjectURL(m);return g(v),()=>b.URL.revokeObjectURL(v)},setClipboardFiles(m){if(l)return!1;const g=Array.from(m?.items??[]).reduce((b,v)=>{if(v.kind!=="file")return b;const y=v.getAsFile();return y?[...b,y]:b},[]);return g.length?(o({type:"FILES.SET",files:g}),!0):!1},getRootProps(){return t.element({...vn.root.attrs,dir:i("dir"),id:rw(r),"data-disabled":L(l),"data-dragging":L(h)})},getDropzoneProps(m={}){return t.element({...vn.dropzone.attrs,dir:i("dir"),id:sw(r),tabIndex:l||m.disableClick?void 0:0,role:m.disableClick?"application":"button","aria-label":u.dropzone,"aria-disabled":l,"data-invalid":L(i("invalid")),"data-disabled":L(l),"data-dragging":L(h),onKeyDown(g){l||g.defaultPrevented||g.currentTarget===je(g)&&(m.disableClick||g.key!=="Enter"&&g.key!==" "||o({type:"DROPZONE.CLICK",src:"keydown"}))},onClick(g){l||g.defaultPrevented||m.disableClick||g.currentTarget===je(g)&&(g.currentTarget.localName==="label"&&g.preventDefault(),o({type:"DROPZONE.CLICK"}))},onDragOver(g){if(l||!d)return;g.preventDefault(),g.stopPropagation();try{g.dataTransfer.dropEffect="copy"}catch{}if(!hv(g))return;const b=g.dataTransfer.items.length;o({type:"DROPZONE.DRAG_OVER",count:b})},onDragLeave(g){l||d&&(Rt(g.currentTarget,g.relatedTarget)||o({type:"DROPZONE.DRAG_LEAVE"}))},onDrop(g){if(l)return;d&&(g.preventDefault(),g.stopPropagation());const b=hv(g);l||!b||JA(g.dataTransfer.items,i("directory")).then(v=>{o({type:"DROPZONE.DROP",files:cx(v)})})},onFocus(){l||o({type:"DROPZONE.FOCUS"})},onBlur(){l||o({type:"DROPZONE.BLUR"})}})},getTriggerProps(){return t.button({...vn.trigger.attrs,dir:i("dir"),id:DR(r),disabled:l,"data-disabled":L(l),"data-invalid":L(i("invalid")),type:"button",onClick(m){l||(Rt(FR(r),m.currentTarget)&&m.stopPropagation(),o({type:"OPEN"}))}})},getHiddenInputProps(){return t.input({id:lp(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:g}=m.currentTarget;o({type:"FILE.SELECT",files:g?Array.from(g):[]})},style:Ud})},getItemGroupProps(m={}){const{type:g=zo}=m;return t.element({...vn.itemGroup.attrs,dir:i("dir"),"data-disabled":L(l),"data-type":g})},getItemProps(m){const{file:g,type:b=zo}=m;return t.element({...vn.item.attrs,dir:i("dir"),id:RR(r,g.name),"data-disabled":L(l),"data-type":b})},getItemNameProps(m){const{file:g,type:b=zo}=m;return t.element({...vn.itemName.attrs,dir:i("dir"),id:VR(r,g.name),"data-disabled":L(l),"data-type":b})},getItemSizeTextProps(m){const{file:g,type:b=zo}=m;return t.element({...vn.itemSizeText.attrs,dir:i("dir"),id:MR(r,g.name),"data-disabled":L(l),"data-type":b})},getItemPreviewProps(m){const{file:g,type:b=zo}=m;return t.element({...vn.itemPreview.attrs,dir:i("dir"),id:NR(r,g.name),"data-disabled":L(l),"data-type":b})},getItemPreviewImageProps(m){var g;const{file:b,url:v,type:y=zo}=m;if(!b.type.startsWith("image/"))throw new Error("Preview Image is only supported for image files");return t.img({...vn.itemPreviewImage.attrs,alt:(g=u.itemPreview)==null?void 0:g.call(u,b),src:v,"data-disabled":L(l),"data-type":y})},getItemDeleteTriggerProps(m){var g;const{file:b,type:v=zo}=m;return t.button({...vn.itemDeleteTrigger.attrs,dir:i("dir"),type:"button",disabled:l,"data-disabled":L(l),"data-type":v,"aria-label":(g=u.deleteFile)==null?void 0:g.call(u,b),onClick(){l||o({type:"FILE.DELETE",file:b,itemType:v})}})},getLabelProps(){return t.label({...vn.label.attrs,dir:i("dir"),id:AR(r),htmlFor:lp(r),"data-disabled":L(l),"data-required":L(c)})},getClearTriggerProps(){return t.button({...vn.clearTrigger.attrs,dir:i("dir"),type:"button",disabled:l,hidden:s.get("acceptedFiles").length===0,"data-disabled":L(l),onClick(m){m.defaultPrevented||l||o({type:"FILES.CLEAR"})}})}}}var jR={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)=>Ll(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)=>Ll(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})=>tR(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(LR(t),je(a))||a.preventDefault()};return Rs(Ee(n,"dragover",o,!1),Ee(n,"drop",i,!1))}},actions:{syncInputElement({scope:e,context:t}){queueMicrotask(()=>{const n=uv(e);if(!n)return;zR(n,t.get("acceptedFiles"));const o=e.getWin();n.dispatchEvent(new o.Event("change",{bubbles:!0}))})},openFilePicker({scope:e}){ue(()=>{var t;(t=uv(e))==null||t.click()})},setFiles(e){const{computed:t,context:n,event:o}=e,{acceptedFiles:i,rejectedFiles:a}=pv(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}=pv(e,o.files,a,r),c=u=>{if(t("multiple")){n.set("acceptedFiles",h=>[...h,...u]),n.set("rejectedFiles",l);return}if(u.length){n.set("acceptedFiles",[u[0]]),n.set("rejectedFiles",l);return}l.length&&(n.set("acceptedFiles",n.get("acceptedFiles")),n.set("rejectedFiles",l))},d=i("transformFiles");d?(n.set("transforming",!0),d(s).then(c).catch(u=>{Do(`[zag-js/file-upload] error transforming files
|
|
2
|
+
${u}`)}).finally(()=>{n.set("transforming",!1)})):c(s)},removeFile({context:e,event:t}){if(t.itemType==="rejected"){const n=e.get("rejectedFiles").filter(o=>!Ll(o.file,t.file));e.set("rejectedFiles",n)}else{const n=e.get("acceptedFiles").filter(o=>!Ll(o,t.file));e.set("acceptedFiles",n)}},clearRejectedFiles({context:e}){e.set("rejectedFiles",[])},clearFiles({context:e}){e.set("acceptedFiles",[]),e.set("rejectedFiles",[])}}}};ae()(["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"]);ae()(["file","type"]);const WR=(e={},t)=>{const n=Mt(),o=Kt(Zt),i=pn(hn),a=ro(),r=E(()=>{const l=qe(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,...On(l),onFileChange:c=>{var d;t?.("update:acceptedFiles",c.acceptedFiles),t?.("fileChange",c),(d=l.onFileChange)==null||d.call(l,c)},onFileAccept:c=>{var d;t?.("fileAccept",c),(d=l.onFileAccept)==null||d.call(l,c)},onFileReject:c=>{var d;t?.("fileReject",c),(d=l.onFileReject)==null||d.call(l,c)}}}),s=Nt(jR,r);return E(()=>HR(s,Yt))},UR=T({__name:"file-upload-root",props:dn({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=WR(e,t);return iw(n),Y(),(o,i)=>(x(),$(f(K).div,z(f(n).getRootProps(),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),GR=T({__name:"file-upload-trigger",props:{asChild:{type:Boolean}},setup(e){const t=fn();return Y(),(n,o)=>(x(),$(f(K).button,z(f(t).getTriggerProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),bn=Object.freeze(Object.defineProperty({__proto__:null,ClearTrigger:dR,Context:uR,Dropzone:hR,HiddenInput:pR,Item:_R,ItemDeleteTrigger:gR,ItemGroup:bR,ItemName:yR,ItemPreview:wR,ItemPreviewImage:xR,ItemSizeText:CR,Label:kR,Root:UR,RootProvider:$R,Trigger:GR},Symbol.toStringTag,{value:"Module"})),qR=Symbol(),fv=Object.getPrototypeOf,cp=new WeakMap,YR=e=>e&&(cp.has(e)?cp.get(e):fv(e)===Object.prototype||fv(e)===Array.prototype),KR=e=>YR(e)&&e[qR]||null,gv=(e,t=!0)=>{cp.set(e,t)};function ZR(){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 lw(e,t){const n=ZR();return n?(n[e]||(n[e]=t()),n[e]):t()}var Dc=lw("__zag__refSet",()=>new WeakSet),XR=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,JR=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,QR=e=>typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeName=="string",eV=e=>XR(e)||JR(e)||QR(e),dp=e=>e!==null&&typeof e=="object",mv=e=>dp(e)&&!Dc.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!eV(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),Di=lw("__zag__proxyStateMap",()=>new WeakMap),tV=(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 d=Array.isArray(s)?[]:Object.create(Object.getPrototypeOf(s));return gv(d,!0),n.set(s,[l,d]),Reflect.ownKeys(s).forEach(u=>{const h=Reflect.get(s,u);Dc.has(h)?(gv(h,!1),d[u]=h):Di.has(h)?d[u]=iV(h):d[u]=h}),Object.freeze(d)},i=new WeakMap,a=[1,1],r=s=>{if(!dp(s))throw new Error("object required");const l=i.get(s);if(l)return l;let c=a[0];const d=new Set,u=(O,P=++a[0])=>{c!==P&&(c=P,d.forEach(S=>S(O,P)))};let h=a[1];const p=(O=++a[1])=>(h!==O&&!d.size&&(h=O,g.forEach(([P])=>{const S=P[1](O);S>c&&(c=S)})),c),m=O=>(P,S)=>{const V=[...P];V[1]=[O,...V[1]],u(V,S)},g=new Map,b=(O,P)=>{if(d.size){const S=P[3](m(O));g.set(O,[P,S])}else g.set(O,[P])},v=O=>{var P;const S=g.get(O);S&&(g.delete(O),(P=S[1])==null||P.call(S))},y=O=>(d.add(O),d.size===1&&g.forEach(([P,S],V)=>{const H=P[3](m(V));g.set(V,[P,H])}),()=>{d.delete(O),d.size===0&&g.forEach(([P,S],V)=>{S&&(S(),g.set(V,[P]))})}),w=Array.isArray(s)?[]:Object.create(Object.getPrototypeOf(s)),C=t(w,{deleteProperty(O,P){const S=Reflect.get(O,P);v(P);const V=Reflect.deleteProperty(O,P);return V&&u(["delete",[P],S]),V},set(O,P,S,V){var H;const A=Reflect.has(O,P),G=Reflect.get(O,P,V);if(A&&(e(G,S)||i.has(S)&&e(G,i.get(S))))return!0;v(P),dp(S)&&(S=KR(S)||S);let te=S;if(!((H=Object.getOwnPropertyDescriptor(O,P))!=null&&H.set)){!Di.has(S)&&mv(S)&&(te=cw(S));const j=!Dc.has(te)&&Di.get(te);j&&b(P,j)}return Reflect.set(O,P,te,V),u(["set",[P],S,G]),!0}});i.set(s,C);const k=[w,p,o,y];return Di.set(C,k),Reflect.ownKeys(s).forEach(O=>{const P=Object.getOwnPropertyDescriptor(s,O);P.get||P.set?Object.defineProperty(w,O,P):C[O]=s[O]}),C})=>[r,Di,Dc,e,t,mv,n,o,i,a],[nV]=tV();function cw(e={}){return nV(e)}function oV(e,t,n){const o=Di.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 iV(e){const t=Di.get(e),[n,o,i]=t;return i(n,o())}var aV=be("floating-panel").parts("trigger","positioner","content","header","body","title","resizeTrigger","dragTrigger","stageTrigger","closeTrigger","control");aV.build();var rV=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`float:${e.id}:trigger`},sV=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`float:${e.id}:positioner`},lV=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`float:${e.id}:content`},cV=e=>{var t;return((t=e.ids)==null?void 0:t.header)??`float:${e.id}:header`},vv=e=>e.getById(rV(e)),bv=e=>e.getById(sV(e)),yv=e=>e.getById(lV(e)),dV=e=>e.getById(cV(e)),Ho=(e,t,n)=>{let o;return et(t)?o=Tx(t):o=AO(e.getWin()),n&&(o=ol({x:-o.width,y:o.minY,width:o.width*3,height:o.height*2})),Yo(o,["x","y","width","height"])},Dr=cw({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:xv,and:uV}=kt(),hV={minimize:"Minimize window",maximize:"Maximize window",restore:"Restore window"};xv("isMaximized"),xv("isMinimized"),uV("isOpenControlled","closeOnEsc");ae()(["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"]);ae()(["axis"]);var pV=be("hoverCard").parts("arrow","arrowTip","trigger","positioner","content");pV.build();var fV=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`hover-card:${e.id}:trigger`},gV=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`hover-card:${e.id}:content`},mV=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`hover-card:${e.id}:popper`},Ku=e=>e.getById(fV(e)),vV=e=>e.getById(gV(e)),wv=e=>e.getById(mV(e)),{not:Fl,and:Cv}=kt();Cv("isOpenControlled",Fl("isPointer")),Fl("isPointer"),Cv("isOpenControlled",Fl("isPointer")),Fl("isPointer");ae()(["closeDelay","dir","getRootNode","id","ids","disabled","onOpenChange","defaultOpen","open","openDelay","positioning","onInteractOutside","onPointerDownOutside","onFocusOutside"]);var bV={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(bV).map(([e,t])=>[t,e]));const[dw,$t]=Pe("TreeViewContext"),[yV,Tn]=Pe("TreeViewNodePropsContext"),xV=T({__name:"tree-view-branch-content",props:{asChild:{type:Boolean}},setup(e){const t=Cx(),n=$t(),o=Tn(),i=E(()=>{const a=n.value.getBranchContentProps(o),[,r]=t(a,["hidden","data-state"]);return r});return Y(),(a,r)=>(x(),$(f(Zd).Content,z(i.value,{"as-child":e.asChild}),{default:_(()=>[R(a.$slots,"default")]),_:3},16,["as-child"]))}}),wV=T({__name:"tree-view-branch-control",props:{asChild:{type:Boolean}},setup(e){const t=$t(),n=Tn();return Y(),(o,i)=>(x(),$(f(K).div,z(f(t).getBranchControlProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),CV=T({__name:"tree-view-branch-indent-guide",props:{asChild:{type:Boolean}},setup(e){const t=$t(),n=Tn();return Y(),(o,i)=>(x(),$(f(K).div,z(f(t).getBranchIndentGuideProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),_V=T({__name:"tree-view-branch-indicator",props:{asChild:{type:Boolean}},setup(e){const t=$t(),n=Tn();return Y(),(o,i)=>(x(),$(f(K).div,z(f(t).getBranchIndicatorProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),kV=T({__name:"tree-view-branch-text",props:{asChild:{type:Boolean}},setup(e){const t=$t(),n=Tn();return Y(),(o,i)=>(x(),$(f(K).span,z(f(t).getBranchTextProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),$V=T({__name:"tree-view-branch-trigger",props:{asChild:{type:Boolean}},setup(e){const t=$t(),n=Tn();return Y(),(o,i)=>(x(),$(f(K).div,z(f(t).getBranchTriggerProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),[SV,jf]=Pe("TreeViewNodeContext"),EV=T({__name:"tree-view-branch",props:{asChild:{type:Boolean}},setup(e){const t=$t(),n=Tn(),o=jf(),i=ia(),a=E(()=>t.value.getBranchContentProps(n));return Y(),(r,s)=>(x(),$(f(Zd).Root,z({open:f(o).expanded,ids:{content:a.value.id}},f(t).getBranchProps(f(n)),{"lazy-mount":f(i).lazyMount,"unmount-on-exit":f(i).unmountOnExit,"as-child":e.asChild}),{default:_(()=>[R(r.$slots,"default")]),_:3},16,["open","ids","lazy-mount","unmount-on-exit","as-child"]))}}),OV=T({__name:"tree-view-context",setup(e){const t=$t();return(n,o)=>R(n.$slots,"default",st(mt(f(t))))}}),TV=T({__name:"tree-view-item-indicator",props:{asChild:{type:Boolean}},setup(e){const t=$t(),n=Tn();return Y(),(o,i)=>(x(),$(f(K).div,z(f(t).getItemIndicatorProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),IV=T({__name:"tree-view-item-text",props:{asChild:{type:Boolean}},setup(e){const t=$t(),n=Tn();return Y(),(o,i)=>(x(),$(f(K).span,z(f(t).getItemTextProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),PV=T({__name:"tree-view-item",props:{asChild:{type:Boolean}},setup(e){const t=$t(),n=Tn();return Y(),(o,i)=>(x(),$(f(K).div,z(f(t).getItemProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),DV=T({__name:"tree-view-label",props:{asChild:{type:Boolean}},setup(e){const t=$t();return Y(),(n,o)=>(x(),$(f(K).h3,z(f(t).getLabelProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),AV=T({__name:"tree-view-node-checkbox",props:{asChild:{type:Boolean}},setup(e){const t=$t(),n=Tn();return Y(),(o,i)=>(x(),$(f(K).span,z(f(t).getNodeCheckboxProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),RV=T({__name:"tree-view-node-checkbox-indicator",props:{indeterminate:{},fallback:{}},setup(e){const t=jf();return(n,o)=>f(t).checked==="indeterminate"?R(n.$slots,"indeterminate",{key:0}):f(t).checked===!0?R(n.$slots,"default",{key:1}):R(n.$slots,"fallback",{key:2})}}),VV=T({__name:"tree-view-node-rename-input",props:{asChild:{type:Boolean}},setup(e){const t=$t(),n=Tn();return Y(),(o,i)=>(x(),$(f(K).input,z(f(t).getNodeRenameInputProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),MV=T({__name:"tree-view-node-context",setup(e){const t=jf();return(n,o)=>R(n.$slots,"default",st(mt(f(t))))}}),uw=T({__name:"tree-view-node-provider",props:{node:{},indexPath:{}},setup(e){const t=e,n=$t(),o=E(()=>n.value.getNodeState(t));return SV(o),yV(t),Y(),(i,a)=>R(i.$slots,"default")}}),NV=T({__name:"tree-view-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=E(()=>t.value);return dw(n),En(E(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),Y(),(o,i)=>(x(),$(f(K).div,z(n.value.getRootProps(),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}});var hw=be("tree-view").parts("branch","branchContent","branchControl","branchIndentGuide","branchIndicator","branchText","branchTrigger","item","itemIndicator","itemText","label","nodeCheckbox","nodeRenameInput","root","tree"),Tt=hw.build(),pw=e=>new yf(e);pw.empty=()=>new yf({rootNode:{children:[]}});var LV=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`tree:${e.id}:root`},_v=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`tree:${e.id}:label`},fw=(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}`},Zu=e=>{var t;return((t=e.ids)==null?void 0:t.tree)??`tree:${e.id}:tree`},Vn=(e,t)=>{var n;t!=null&&((n=e.getById(fw(e,t)))==null||n.focus())},gw=(e,t)=>`tree:${e.id}:rename-input:${t}`,kv=(e,t)=>e.getById(gw(e,t));function mw(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 FV(e,t,n){const o=e.getDescendantValues(t),i=o.every(a=>n.includes(a));return Ln(i?Hi(n,...o):Co(n,...o))}function BV(e,t){const n=new Map;return e.visit({onEnter:o=>{const i=e.getNodeValue(o),a=e.isBranchNode(o),r=mw(e,o,t);n.set(i,{type:a?"branch":"leaf",checked:r})}}),n}function zV(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")),d=Array.from(n.get("checkedValue")),u=i("isTypingAhead"),h=n.get("focusedValue"),p=n.get("loadingStatus"),m=n.get("renamingValue");function g(b){const{node:v,indexPath:y}=b,w=s.getNodeValue(v),C=s.getFirstNode(),k=C?s.getNodeValue(C):null;return{id:fw(o,w),value:w,indexPath:y,valuePath:s.getValuePath(y),disabled:!!v.disabled,focused:h==null?k==w:h===w,selected:c.includes(w),expanded:l.includes(w),loading:p[w]==="loading",depth:y.length,isBranch:s.isBranchNode(v),renaming:m===w,get checked(){return mw(s,v,d)}}}return{collection:s,expandedValue:l,selectedValue:c,checkedValue:d,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 BV(s,d)},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){Vn(o,b)},selectParent(b){const v=s.getParentNode(b);if(!v)return;const y=Co(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=Co(l,s.getNodeValue(v));r({type:"EXPANDED.SET",value:y,src:"expand.parent"})},setExpandedValue(b){const v=Ln(b);r({type:"EXPANDED.SET",value:v})},setSelectedValue(b){const v=Ln(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:LV(o),dir:a("dir")})},getLabelProps(){return t.element({...Tt.label.attrs,id:_v(o),dir:a("dir")})},getTreeProps(){return t.element({...Tt.tree.attrs,id:Zu(o),dir:a("dir"),role:"tree","aria-label":"Tree View","aria-labelledby":_v(o),"aria-multiselectable":a("selectionMode")==="multiple"||void 0,tabIndex:-1,onKeyDown(b){if(b.defaultPrevented||Is(b))return;const v=je(b);if(Nd(v))return;const y=v?.closest("[data-part=branch-control], [data-part=item]");if(!y)return;const w=y.dataset.value;if(w==null){console.warn("[zag-js/tree-view] Node id not found for node",y);return}const C=y.matches("[data-part=branch-control]"),k={ArrowDown(S){Zn(S)||(S.preventDefault(),r({type:"NODE.ARROW_DOWN",id:w,shiftKey:S.shiftKey}))},ArrowUp(S){Zn(S)||(S.preventDefault(),r({type:"NODE.ARROW_UP",id:w,shiftKey:S.shiftKey}))},ArrowLeft(S){Zn(S)||y.dataset.disabled||(S.preventDefault(),r({type:C?"BRANCH_NODE.ARROW_LEFT":"NODE.ARROW_LEFT",id:w}))},ArrowRight(S){!C||y.dataset.disabled||(S.preventDefault(),r({type:"BRANCH_NODE.ARROW_RIGHT",id:w}))},Home(S){Zn(S)||(S.preventDefault(),r({type:"NODE.HOME",id:w,shiftKey:S.shiftKey}))},End(S){Zn(S)||(S.preventDefault(),r({type:"NODE.END",id:w,shiftKey:S.shiftKey}))},Space(S){var V;y.dataset.disabled||(u?r({type:"TREE.TYPEAHEAD",key:S.key}):(V=k.Enter)==null||V.call(k,S))},Enter(S){y.dataset.disabled||Sa(v)&&Zn(S)||(r({type:C?"BRANCH_NODE.CLICK":"NODE.CLICK",id:w,src:"keyboard"}),Sa(v)||S.preventDefault())},"*"(S){y.dataset.disabled||(S.preventDefault(),r({type:"SIBLINGS.EXPAND",id:w}))},a(S){!S.metaKey||y.dataset.disabled||(S.preventDefault(),r({type:"SELECTED.ALL",moveFocus:!0}))},F2(S){if(y.dataset.disabled)return;const V=a("canRename");if(!V)return;const H=s.getIndexPath(w);if(H){const A=s.at(H);if(A&&!V(A,H))return}S.preventDefault(),r({type:"NODE.RENAME",value:w})}},O=Ps(b,{dir:a("dir")}),P=k[O];if(P){P(b);return}Po.isValidEvent(b)&&(r({type:"TREE.TYPEAHEAD",key:b.key,id:w}),b.preventDefault())}})},getNodeState:g,getItemProps(b){const v=g(b);return t.element({...Tt.item.attrs,id:v.id,dir:a("dir"),"data-ownedby":Zu(o),"data-path":b.indexPath.join("/"),"data-value":v.value,tabIndex:v.focused?0:-1,"data-focus":L(v.focused),role:"treeitem","aria-current":v.selected?"true":void 0,"aria-selected":v.disabled?void 0:v.selected,"data-selected":L(v.selected),"aria-disabled":Je(v.disabled),"data-disabled":L(v.disabled),"data-renaming":L(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||!zi(y)||Sa(y.currentTarget)&&Zn(y))return;const w=y.metaKey||y.ctrlKey;r({type:"NODE.CLICK",id:v.value,shiftKey:y.shiftKey,ctrlKey:w}),y.stopPropagation(),Sa(y.currentTarget)||y.preventDefault()}})},getItemTextProps(b){const v=g(b);return t.element({...Tt.itemText.attrs,"data-disabled":L(v.disabled),"data-selected":L(v.selected),"data-focus":L(v.focused)})},getItemIndicatorProps(b){const v=g(b);return t.element({...Tt.itemIndicator.attrs,"aria-hidden":!0,"data-disabled":L(v.disabled),"data-selected":L(v.selected),"data-focus":L(v.focused),hidden:!v.selected})},getBranchProps(b){const v=g(b);return t.element({...Tt.branch.attrs,"data-depth":v.depth,dir:a("dir"),"data-branch":v.value,role:"treeitem","data-ownedby":Zu(o),"data-value":v.value,"aria-level":v.depth,"aria-selected":v.disabled?void 0:v.selected,"data-path":b.indexPath.join("/"),"data-selected":L(v.selected),"aria-expanded":v.expanded,"data-state":v.expanded?"open":"closed","aria-disabled":Je(v.disabled),"data-disabled":L(v.disabled),"data-loading":L(v.loading),"aria-busy":Je(v.loading),style:{"--depth":v.depth}})},getBranchIndicatorProps(b){const v=g(b);return t.element({...Tt.branchIndicator.attrs,"aria-hidden":!0,"data-state":v.expanded?"open":"closed","data-disabled":L(v.disabled),"data-selected":L(v.selected),"data-focus":L(v.focused),"data-loading":L(v.loading)})},getBranchTriggerProps(b){const v=g(b);return t.element({...Tt.branchTrigger.attrs,role:"button",dir:a("dir"),"data-disabled":L(v.disabled),"data-state":v.expanded?"open":"closed","data-value":v.value,"data-loading":L(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=g(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":L(v.disabled),"data-selected":L(v.selected),"data-focus":L(v.focused),"data-renaming":L(v.renaming),"data-value":v.value,"data-depth":v.depth,"data-loading":L(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||!zi(y)||Sa(y.currentTarget)&&Zn(y))return;const w=y.metaKey||y.ctrlKey;r({type:"BRANCH_NODE.CLICK",id:v.value,shiftKey:y.shiftKey,ctrlKey:w}),y.stopPropagation()}})},getBranchTextProps(b){const v=g(b);return t.element({...Tt.branchText.attrs,dir:a("dir"),"data-disabled":L(v.disabled),"data-state":v.expanded?"open":"closed","data-loading":L(v.loading)})},getBranchContentProps(b){const v=g(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=g(b);return t.element({...Tt.branchIndentGuide.attrs,"data-depth":v.depth})},getNodeCheckboxProps(b){const v=g(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":L(v.disabled),onClick(w){if(w.defaultPrevented||v.disabled||!zi(w))return;r({type:"CHECKED.TOGGLE",value:v.value,isBranch:v.isBranch}),w.stopPropagation();const C=w.currentTarget.closest("[role=treeitem]");C?.focus({preventScroll:!0})}})},getNodeRenameInputProps(b){const v=g(b);return t.input({...Tt.nodeRenameInput.attrs,id:gw(o,v.value),type:"text","aria-label":"Rename tree item",hidden:!v.renaming,onKeyDown(y){Is(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 Bl(e,t){const{context:n,prop:o,refs:i}=e;if(!o("loadChildren")){n.set("expandedValue",g=>Ln(Co(g,...t)));return}const a=n.get("loadingStatus"),[r,s]=Zg(t,g=>a[g]==="loaded");if(r.length>0&&n.set("expandedValue",g=>Ln(Co(g,...r))),s.length===0)return;const l=o("collection"),[c,d]=Zg(s,g=>{const b=l.findNode(g);return l.getNodeChildren(b).length>0});if(c.length>0&&n.set("expandedValue",g=>Ln(Co(g,...c))),d.length===0)return;n.set("loadingStatus",g=>({...g,...d.reduce((b,v)=>({...b,[v]:"loading"}),{})}));const u=d.map(g=>{const b=l.getIndexPath(g),v=l.getValuePath(b),y=l.findNode(g);return{id:g,indexPath:b,valuePath:v,node:y}}),h=i.get("pendingAborts"),p=o("loadChildren");pf(p,()=>"[zag-js/tree-view] `loadChildren` is required for async expansion");const m=u.map(({id:g,indexPath:b,valuePath:v,node:y})=>{const w=h.get(g);w&&(w.abort(),h.delete(g));const C=new AbortController;return h.set(g,C),p({valuePath:v,indexPath:b,node:y,signal:C.signal})});Promise.allSettled(m).then(g=>{var b,v;const y=[],w=[],C=n.get("loadingStatus");let k=o("collection");g.forEach((O,P)=>{const{id:S,indexPath:V,node:H,valuePath:A}=u[P];O.status==="fulfilled"?(C[S]="loaded",y.push(S),k=k.replace(V,{...H,children:O.value})):(h.delete(S),Reflect.deleteProperty(C,S),w.push({node:H,error:O.reason,indexPath:V,valuePath:A}))}),n.set("loadingStatus",C),y.length&&(n.set("expandedValue",O=>Ln(Co(O,...y))),(b=o("onLoadChildrenComplete"))==null||b({collection:k})),w.length&&((v=o("onLoadChildrenError"))==null||v({nodes:w}))})}function jo(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:Un}=kt(),HV={props({props:e}){return{selectionMode:"single",collection:pw.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:xt,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:xt,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:xt,onChange(o){var i;(i=e("onCheckedChange"))==null||i({checkedValue:o})}})),renamingValue:t(()=>({sync:!0,defaultValue:null}))}},refs(){return{typeaheadState:{...Po.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:jo({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:Un("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:Un("isShiftKey","isMultipleSelection"),actions:["focusTreeNextNode","extendSelectionToNextNode"]},{actions:["focusTreeNextNode"]}],"NODE.ARROW_UP":[{guard:Un("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:Un("isBranchFocused","isBranchExpanded"),actions:["focusBranchFirstNode"]},{actions:["expandBranch"]}],"SIBLINGS.EXPAND":{actions:["expandSiblingBranches"]},"NODE.HOME":[{guard:Un("isShiftKey","isMultipleSelection"),actions:["extendSelectionToFirstNode","focusTreeFirstNode"]},{actions:["focusTreeFirstNode"]}],"NODE.END":[{guard:Un("isShiftKey","isMultipleSelection"),actions:["extendSelectionToLastNode","focusTreeLastNode"]},{actions:["focusTreeLastNode"]}],"NODE.CLICK":[{guard:Un("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:Un("isShiftKey","isMultipleSelection"),actions:["extendSelectionToNode"]},{actions:["selectNode"]}],"BRANCH_NODE.CLICK":[{guard:Un("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:Un("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&&La(n)?o.concat(...n):[La(n)?Qs(n):n].filter(Boolean))},deselectNode({context:e,event:t}){const n=xc(t.id||t.value);e.set("selectedValue",o=>Hi(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;Bl(e,[t.id])},expandBranches(e){const{context:t,event:n}=e,o=xc(n.value);Bl(e,Au(o,t.get("expandedValue")))},collapseBranch({context:e,event:t}){e.set("expandedValue",n=>Hi(n,t.id))},collapseBranches(e){const{context:t,event:n}=e,o=xc(n.value);t.set("expandedValue",i=>Hi(i,...o))},setExpanded({context:e,event:t}){La(t.value)&&e.set("expandedValue",t.value)},clearExpanded({context:e}){e.set("expandedValue",[])},setSelected({context:e,event:t}){La(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);Vn(t,i)},focusTreeLastNode(e){const{prop:t,scope:n}=e,o=t("collection"),i=o.getLastNode(void 0,{skip:jo(e)}),a=o.getNodeValue(i);Vn(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);Vn(n,r)},focusTreeNextNode(e){const{event:t,prop:n,scope:o}=e,i=n("collection"),a=i.getNextNode(t.id,{skip:jo(e)});if(!a)return;const r=i.getNodeValue(a);Vn(o,r)},focusTreePrevNode(e){const{event:t,prop:n,scope:o}=e,i=n("collection"),a=i.getPreviousNode(t.id,{skip:jo(e)});if(!a)return;const r=i.getNodeValue(a);Vn(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;Vn(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=Po(s,{state:o.get("typeaheadState"),activeId:t.get("focusedValue"),key:i.key});Vn(a,l?.id)},toggleNodeSelection({context:e,event:t}){const n=Gi(e.get("selectedValue"),t.id);e.set("selectedValue",n)},expandAllBranches(e){const{context:t,prop:n}=e,o=n("collection").getBranchValues(),i=Au(o,t.get("expandedValue"));Bl(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=Au(r,t.get("expandedValue"));Bl(e,s)},extendSelectionToNode(e){const{context:t,event:n,prop:o,computed:i}=e,a=o("collection"),r=ja(t.get("selectedValue"))||a.getNodeValue(a.getFirstNode()),s=n.id;let l=[r,s],c=0;i("visibleNodes").forEach(({node:d})=>{const u=a.getNodeValue(d);c===1&&l.push(u),(u===r||u===s)&&c++}),t.set("selectedValue",Ln(l))},extendSelectionToNextNode(e){const{context:t,event:n,prop:o}=e,i=o("collection"),a=i.getNextNode(n.id,{skip:jo(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:jo(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=ja(t.get("selectedValue")),a=[];o.visit({skip:jo(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=ja(t.get("selectedValue")),a=[];let r=!1;o.visit({skip:jo(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?FV(o,t.value,i):Gi(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),Vn(o,a);return}(i=n("onRenameComplete"))==null||i({value:a,label:s,indexPath:r}),e.set("renamingValue",null),Vn(o,a)},cancelRenaming({context:e,scope:t}){const n=e.get("renamingValue");e.set("renamingValue",null),n&&Vn(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=kv(t,o);Nn(s,r)},focusRenameInput({context:e,scope:t}){const n=e.get("renamingValue");if(!n)return;const o=kv(t,n);o&&(o.focus(),o.select())}}}};ae()(["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"]);ae()(["node","indexPath"]);const vw=(e,t)=>{const n=Mt(),o=Kt(Zt),i=pn(hn),a=E(()=>{const s=qe(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,...On(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=Nt(HV,a);return E(()=>zV(r,Yt))},bw=T({__name:"tree-view-root",props:dn({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=vw(n,t);return dw(o),En(E(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Y(),(i,a)=>(x(),$(f(K).div,z(f(o).getRootProps(),{"as-child":e.asChild}),{default:_(()=>[R(i.$slots,"default")]),_:3},16,["as-child"]))}}),yw=T({__name:"tree-view-tree",props:{asChild:{type:Boolean}},setup(e){const t=$t();return Y(),(n,o)=>(x(),$(f(K).div,z(f(t).getTreeProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),Vo=Object.freeze(Object.defineProperty({__proto__:null,Branch:EV,BranchContent:xV,BranchControl:wV,BranchIndentGuide:CV,BranchIndicator:_V,BranchText:kV,BranchTrigger:$V,Context:OV,Item:PV,ItemIndicator:TV,ItemText:IV,Label:DV,NodeCheckbox:AV,NodeCheckboxIndicator:RV,NodeContext:MV,NodeProvider:uw,NodeRenameInput:VV,Root:bw,RootProvider:NV,Tree:yw},Symbol.toStringTag,{value:"Module"}));var xw=be("listbox").parts("label","input","item","itemText","itemIndicator","itemGroup","itemGroupLabel","content","root","valueText");xw.build();var ww=e=>new ra(e);ww.empty=()=>new ra({items:[]});var jV=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`select:${e.id}:content`},WV=(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}`},$v=e=>e.getById(jV(e)),Sv=(e,t)=>e.getById(WV(e,t)),{guards:UV,createMachine:GV}=Yd(),{or:qV}=UV;GV({props({props:e}){return{loopFocus:!1,composite:!0,defaultValue:[],multiple:!1,typeahead:!0,collection:ww.empty(),orientation:"vertical",selectionMode:"single",...e}},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:xt,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:{...Po.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 YT(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:qV("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 eu({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||ET()!=="keyboard")return;const r=$v(n),s=t("scrollToIndexFn");if(s){const c=t("collection").indexOf(a);s?.({index:c,immediate:i,getElement(){return Sv(n,a)}});return}const l=Sv(n,a);Ds(l,{rootEl:r,block:"nearest"})};return ue(()=>o(!0)),Js(()=>$v(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);Ar(r,s,t("onSelect")),e.set("value",Array.from(s))}else{const s=r.select(a,i,n.metaKey);Ar(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);Ar(i,r,t("onSelect")),e.set("value",Array.from(r));return}if(t("selectOnHighlight")){const r=i.replaceSelection(a,n.value);Ar(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);Ar(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 YV=(e,t)=>{const n=new Set(e);for(const o of t)n.delete(o);return n};function Ar(e,t,n){const o=YV(t,e);for(const i of o)n?.({value:i})}ae()(["collection","defaultHighlightedValue","defaultValue","dir","disabled","deselectable","disallowSelectAll","getRootNode","highlightedValue","id","ids","loopFocus","onHighlightChange","onSelect","onValueChange","orientation","scrollToIndexFn","selectionMode","selectOnHighlight","typeahead","value"]);ae()(["item","highlightOnHover"]);ae()(["id"]);ae()(["htmlFor"]);xw.extendWith("empty");var KV=be("marquee").parts("root","viewport","content","edge","item");KV.build();ae()(["autoFill","defaultPaused","delay","dir","getRootNode","id","ids","loopCount","onComplete","onLoopComplete","onPauseChange","paused","pauseOnInteraction","reverse","side","spacing","speed","translations"]);var Cw=be("menu").parts("arrow","arrowTip","content","contextTrigger","indicator","item","itemGroup","itemGroupLabel","itemIndicator","itemText","positioner","separator","trigger","triggerItem");Cw.build();var _w=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`menu:${e.id}:trigger`},ZV=e=>{var t;return((t=e.ids)==null?void 0:t.contextTrigger)??`menu:${e.id}:ctx-trigger`},kw=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`menu:${e.id}:content`},XV=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`menu:${e.id}:popper`},up=(e,t)=>`${e.id}/${t}`,wi=e=>e?.dataset.value??null,qo=e=>e.getById(kw(e)),Ev=e=>e.getById(XV(e)),zl=e=>e.getById(_w(e)),JV=(e,t)=>t?e.getById(up(e,t)):null,Xu=e=>e.getById(ZV(e)),dl=e=>{const t=`[role^="menuitem"][data-ownedby=${CSS.escape(kw(e))}]:not([data-disabled])`;return ai(qo(e),t)},QV=e=>ja(dl(e)),eM=e=>Qs(dl(e)),Wf=(e,t)=>t?e.id===t||e.dataset.value===t:!1,tM=(e,t)=>{const n=dl(e),o=n.findIndex(i=>Wf(i,t.value));return $S(n,o,{loop:t.loop??t.loopFocus})},nM=(e,t)=>{const n=dl(e),o=n.findIndex(i=>Wf(i,t.value));return SS(n,o,{loop:t.loop??t.loopFocus})},oM=(e,t)=>{const n=dl(e),o=n.find(i=>Wf(i,t.value));return Po(n,{state:t.typeaheadState,key:t.key,activeId:o?.id??null})},iM=e=>{var t;return!!((t=e?.getAttribute("role"))!=null&&t.startsWith("menuitem"))&&!!(e!=null&&e.hasAttribute("aria-controls"))},aM="menu:select";function rM(e,t){if(!e)return;const n=Ke(e),o=new n.CustomEvent(aM,{detail:{value:t}});e.dispatchEvent(o)}var{not:yn,and:ba,or:sM}=kt();yn("isSubmenu"),sM("isOpenAutoFocusEvent","isArrowDownEvent"),ba(yn("isTriggerItem"),"isOpenControlled"),yn("isTriggerItem"),ba("isSubmenu","isOpenControlled"),yn("isPointerSuspended"),ba(yn("isPointerSuspended"),yn("isTriggerItem")),ba(yn("isTriggerItemHighlighted"),yn("isHighlightedItemEditable"),"closeOnSelect","isOpenControlled"),ba(yn("isTriggerItemHighlighted"),yn("isHighlightedItemEditable"),"closeOnSelect"),ba(yn("isTriggerItemHighlighted"),yn("isHighlightedItemEditable"));function Ov(e){let t=e.parent;for(;t&&t.context.get("isSubmenu");)t=t.refs.get("parent");t?.send({type:"CLOSE"})}function lM(e,t){return e?MO(e,t):!1}function cM(e,t,n){const o=Object.keys(e).length>0;if(!t)return null;if(!o)return up(n,t);for(const i in e){const a=e[i],r=_w(a.scope);if(r===t)return r}return up(n,t)}ae()(["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"]);ae()(["closeOnSelect","disabled","value","valueText"]);ae()(["htmlFor"]);ae()(["id"]);ae()(["checked","closeOnSelect","disabled","onCheckedChange","type","value","valueText"]);const[$w,mi]=Pe("NumberInputContext"),dM=T({__name:"number-input-context",setup(e){const t=mi();return(n,o)=>R(n.$slots,"default",st(mt(f(t))))}}),uM=T({__name:"number-input-control",props:{asChild:{type:Boolean}},setup(e){const t=mi();return Y(),(n,o)=>(x(),$(f(K).div,z(f(t).getControlProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),hM=T({__name:"number-input-decrement-trigger",props:{asChild:{type:Boolean}},setup(e){const t=mi();return Y(),(n,o)=>(x(),$(f(K).button,z(f(t).getDecrementTriggerProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),pM=T({__name:"number-input-increment-trigger",props:{asChild:{type:Boolean}},setup(e){const t=mi();return Y(),(n,o)=>(x(),$(f(K).button,z(f(t).getIncrementTriggerProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),fM=T({__name:"number-input-input",props:{asChild:{type:Boolean}},setup(e){const t=mi(),n=ro();return Y(),(o,i)=>{var a;return x(),$(f(K).input,z({"aria-describedby":(a=f(n))==null?void 0:a.ariaDescribedby},f(t).getInputProps(),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["aria-describedby","as-child"])}}}),gM=T({__name:"number-input-label",props:{asChild:{type:Boolean}},setup(e){const t=mi();return Y(),(n,o)=>(x(),$(f(K).label,z(f(t).getLabelProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),mM=T({__name:"number-input-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=E(()=>t.value);return $w(n),Y(),(o,i)=>(x(),$(f(K).div,z(n.value.getRootProps(),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}});let Ju=new Map,hp=!1;try{hp=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let fd=!1;try{fd=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const Sw={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};let vM=class{format(t){let n="";if(!hp&&this.options.signDisplay!=null?n=yM(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!fd){var o;let{unit:i,unitDisplay:a="short",locale:r}=this.resolvedOptions();if(!i)return n;let s=(o=Sw[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!hp&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!fd&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=bM(t,n),this.options=n}};function bM(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!fd){var o;let{unit:r,unitDisplay:s="short"}=t;if(!r)throw new Error('unit option must be provided with style: "unit"');if(!(!((o=Sw[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(Ju.has(i))return Ju.get(i);let a=new Intl.NumberFormat(e,t);return Ju.set(i,a),a}function yM(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 xM=new RegExp("^.*\\(.*\\).*$"),wM=["latn","arab","hanidec","deva","beng","fullwide"];let Ew=class{parse(t){return Qu(this.locale,this.options,t).parse(t)}isValidPartialNumber(t,n,o){return Qu(this.locale,this.options,t).isValidPartialNumber(t,n,o)}getNumberingSystem(t){return Qu(this.locale,this.options,t).options.numberingSystem}constructor(t,n={}){this.locale=t,this.options=n}};const Tv=new Map;function Qu(e,t,n){let o=Iv(e,t);if(!e.includes("-nu-")&&!o.isValidPartialNumber(n)){for(let i of wM)if(i!==o.options.numberingSystem){let a=Iv(e+(e.includes("-u-")?"-nu-":"-u-nu-")+i,t);if(a.isValidPartialNumber(n))return a}}return o}function Iv(e,t){let n=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[0]?-1:1).join():""),o=Tv.get(n);return o||(o=new CM(e,t),Tv.set(n,o)),o}let CM=class{parse(t){let n=this.sanitize(t);if(this.symbols.group&&(n=ya(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 Ew(this.locale,r).parse(new vM(this.locale,r).format(o))}return this.options.currencySign==="accounting"&&xM.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=ya(t,".",this.symbols.group))),this.symbols.group==="’"&&t.includes("'")&&(t=ya(t,"'",this.symbols.group)),this.options.locale==="fr-FR"&&this.symbols.group&&(t=ya(t," ",this.symbols.group),t=ya(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=ya(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=kM(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 Pv=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),_M=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function kM(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),d=l.formatToParts(10000.111),u=_M.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=d.find(S=>S.type==="plusSign"))===null||a===void 0?void 0:a.value;!m&&(o?.signDisplay==="exceptZero"||o?.signDisplay==="always")&&(m="+");let g=(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=>!Pv.has(S.type)).map(S=>Dv(S.value)),y=u.flatMap(S=>S.filter(V=>!Pv.has(V.type)).map(V=>Dv(V.value))),w=[...new Set([...v,...y])].sort((S,V)=>V.length-S.length),C=w.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${w.join("|")}|[\\p{White_Space}]`,"gu"),k=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),O=new Map(k.map((S,V)=>[S,V])),P=new RegExp(`[${k.join("")}]`,"g");return{minusSign:p,plusSign:m,decimal:g,group:b,literals:C,numeral:P,index:S=>String(O.get(S))}}function ya(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function Dv(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Ow=be("numberInput").parts("root","label","input","control","valueText","incrementTrigger","decrementTrigger","scrubber"),Wo=Ow.build(),$M=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`number-input:${e.id}`},ss=e=>{var t;return((t=e.ids)==null?void 0:t.input)??`number-input:${e.id}:input`},Tw=e=>{var t;return((t=e.ids)==null?void 0:t.incrementTrigger)??`number-input:${e.id}:inc`},Iw=e=>{var t;return((t=e.ids)==null?void 0:t.decrementTrigger)??`number-input:${e.id}:dec`},SM=e=>{var t;return((t=e.ids)==null?void 0:t.scrubber)??`number-input:${e.id}:scrubber`},Pw=e=>`number-input:${e.id}:cursor`,EM=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`number-input:${e.id}:label`},ls=e=>e.getById(ss(e)),OM=e=>e.getById(Tw(e)),TM=e=>e.getById(Iw(e)),Dw=e=>e.getDoc().getElementById(Pw(e)),IM=(e,t)=>{let n=null;return t==="increment"&&(n=OM(e)),t==="decrement"&&(n=TM(e)),n},PM=(e,t)=>{if(!zd())return RM(e,t),()=>{var n;(n=Dw(e))==null||n.remove()}},DM=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")}},AM=(e,t)=>{const{point:n,isRtl:o,event:i}=t,a=e.getWin(),r=bs(i.movementX,a.devicePixelRatio),s=bs(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},d=a.innerWidth,u=bs(7.5,a.devicePixelRatio);return c.x=zS(c.x+u,d)-u,{hint:l,point:c}},RM=(e,t)=>{const n=e.getDoc(),o=n.createElement("div");o.className="scrubber--cursor",o.id=Pw(e),Object.assign(o.style,{width:"15px",height:"15px",position:"fixed",pointerEvents:"none",left:"0px",top:"0px",zIndex:L0,transform:t?`translate3d(${t.x}px, ${t.y}px, 0px)`:void 0,willChange:"transform"}),o.innerHTML=`
|
|
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
|
+
<g transform="translate(2 3)">
|
|
5
|
+
<path fill-rule="evenodd" d="M 15 4.5L 15 2L 11.5 5.5L 15 9L 15 6.5L 31 6.5L 31 9L 34.5 5.5L 31 2L 31 4.5Z" style="stroke-width: 2px; stroke: white;"></path>
|
|
6
|
+
<path fill-rule="evenodd" d="M 15 4.5L 15 2L 11.5 5.5L 15 9L 15 6.5L 31 6.5L 31 9L 34.5 5.5L 31 2L 31 4.5Z"></path>
|
|
7
|
+
</g>
|
|
8
|
+
</svg>`,n.body.appendChild(o)};function VM(e,t){if(!(!e||!t.isActiveElement(e)))try{const{selectionStart:n,selectionEnd:o,value:i}=e;return n==null||o==null?void 0:{start:n,end:o,value:i}}catch{return}}function MM(e,t,n){if(!(!e||!n.isActiveElement(e))){if(!t){const o=e.value.length;e.setSelectionRange(o,o);return}try{const o=e.value,{start:i,end:a,value:r}=t;if(o===r){e.setSelectionRange(i,a);return}const s=Av(r,o,i),l=i===a?s:Av(r,o,a),c=Math.max(0,Math.min(s,o.length)),d=Math.max(c,Math.min(l,o.length));e.setSelectionRange(c,d)}catch{const o=e.value.length;e.setSelectionRange(o,o)}}}function Av(e,t,n){const o=e.slice(0,n),i=e.slice(n);let a=0;const r=Math.min(o.length,t.length);for(let c=0;c<r&&o[c]===t[c];c++)a=c+1;let s=0;const l=Math.min(i.length,t.length-a);for(let c=0;c<l;c++){const d=i.length-1-c,u=t.length-1-c;if(i[d]===t[u])s=c+1;else break}if(a>=o.length)return a;if(s>=i.length)return t.length-s;if(a>0)return a;if(s>0)return t.length-s;if(e.length>0){const c=n/e.length;return Math.round(c*t.length)}return t.length}function NM(e,t){const{state:n,send:o,prop:i,scope:a,computed:r}=e,s=n.hasTag("focus"),l=r("isDisabled"),c=!!i("readOnly"),d=!!i("required"),u=n.matches("scrubbing"),h=r("isValueEmpty"),p=r("isOutOfRange")||!!i("invalid"),m=l||!r("canIncrement")||c,g=l||!r("canDecrement")||c,b=i("translations");return{focused:s,invalid:p,empty:h,value:r("formattedValue"),valueAsNumber:r("valueAsNumber"),setValue(v){o({type:"VALUE.SET",value:v})},clearValue(){o({type:"VALUE.CLEAR"})},increment(){o({type:"VALUE.INCREMENT"})},decrement(){o({type:"VALUE.DECREMENT"})},setToMax(){o({type:"VALUE.SET",value:i("max")})},setToMin(){o({type:"VALUE.SET",value:i("min")})},focus(){var v;(v=ls(a))==null||v.focus()},getRootProps(){return t.element({id:$M(a),...Wo.root.attrs,dir:i("dir"),"data-disabled":L(l),"data-focus":L(s),"data-invalid":L(p),"data-scrubbing":L(u)})},getLabelProps(){return t.label({...Wo.label.attrs,dir:i("dir"),"data-disabled":L(l),"data-focus":L(s),"data-invalid":L(p),"data-required":L(d),"data-scrubbing":L(u),id:EM(a),htmlFor:ss(a)})},getControlProps(){return t.element({...Wo.control.attrs,dir:i("dir"),role:"group","aria-disabled":l,"data-focus":L(s),"data-disabled":L(l),"data-invalid":L(p),"data-scrubbing":L(u),"aria-invalid":Je(p)})},getValueTextProps(){return t.element({...Wo.valueText.attrs,dir:i("dir"),"data-disabled":L(l),"data-invalid":L(p),"data-focus":L(s),"data-scrubbing":L(u)})},getInputProps(){return t.input({...Wo.input.attrs,dir:i("dir"),name:i("name"),form:i("form"),id:ss(a),role:"spinbutton",defaultValue:r("formattedValue"),pattern:i("formatOptions")?void 0:i("pattern"),inputMode:i("inputMode"),"aria-invalid":Je(p),"data-invalid":L(p),disabled:l,"data-disabled":L(l),readOnly:c,required:i("required"),autoComplete:"off",autoCorrect:"off",spellCheck:"false",type:"text","aria-roledescription":"numberfield","aria-valuemin":i("min"),"aria-valuemax":i("max"),"aria-valuenow":Number.isNaN(r("valueAsNumber"))?void 0:r("valueAsNumber"),"aria-valuetext":r("valueText"),"data-scrubbing":L(u),onFocus(){o({type:"INPUT.FOCUS"})},onBlur(){o({type:"INPUT.BLUR"})},onInput(v){const y=VM(v.currentTarget,a);o({type:"INPUT.CHANGE",target:v.currentTarget,hint:"set",selection:y})},onBeforeInput(v){try{const{selectionStart:y,selectionEnd:w,value:C}=v.currentTarget,k=C.slice(0,y)+(v.data??"")+C.slice(w);r("parser").isValidPartialNumber(k)||v.preventDefault()}catch{}},onKeyDown(v){if(v.defaultPrevented||c||Is(v))return;const y=z$(v)*i("step"),w={ArrowUp(){o({type:"INPUT.ARROW_UP",step:y}),v.preventDefault()},ArrowDown(){o({type:"INPUT.ARROW_DOWN",step:y}),v.preventDefault()},Home(){Zn(v)||(o({type:"INPUT.HOME"}),v.preventDefault())},End(){Zn(v)||(o({type:"INPUT.END"}),v.preventDefault())},Enter(){o({type:"INPUT.ENTER"})}}[v.key];w?.(v)}})},getDecrementTriggerProps(){return t.button({...Wo.decrementTrigger.attrs,dir:i("dir"),id:Iw(a),disabled:g,"data-disabled":L(g),"aria-label":b.decrementLabel,type:"button",tabIndex:-1,"aria-controls":ss(a),"data-scrubbing":L(u),onPointerDown(v){var y;g||zi(v)&&(o({type:"TRIGGER.PRESS_DOWN",hint:"decrement",pointerType:v.pointerType}),v.pointerType==="mouse"&&v.preventDefault(),v.pointerType==="touch"&&((y=v.currentTarget)==null||y.focus({preventScroll:!0})))},onPointerUp(v){o({type:"TRIGGER.PRESS_UP",hint:"decrement",pointerType:v.pointerType})},onPointerLeave(){g||o({type:"TRIGGER.PRESS_UP",hint:"decrement"})}})},getIncrementTriggerProps(){return t.button({...Wo.incrementTrigger.attrs,dir:i("dir"),id:Tw(a),disabled:m,"data-disabled":L(m),"aria-label":b.incrementLabel,type:"button",tabIndex:-1,"aria-controls":ss(a),"data-scrubbing":L(u),onPointerDown(v){var y;m||!zi(v)||(o({type:"TRIGGER.PRESS_DOWN",hint:"increment",pointerType:v.pointerType}),v.pointerType==="mouse"&&v.preventDefault(),v.pointerType==="touch"&&((y=v.currentTarget)==null||y.focus({preventScroll:!0})))},onPointerUp(v){o({type:"TRIGGER.PRESS_UP",hint:"increment",pointerType:v.pointerType})},onPointerLeave(v){o({type:"TRIGGER.PRESS_UP",hint:"increment",pointerType:v.pointerType})}})},getScrubberProps(){return t.element({...Wo.scrubber.attrs,dir:i("dir"),"data-disabled":L(l),id:SM(a),role:"presentation","data-scrubbing":L(u),onMouseDown(v){if(l||!zi(v))return;const y=Qc(v),w=Ke(v.currentTarget).devicePixelRatio;y.x=y.x-bs(7.5,w),y.y=y.y-bs(7.5,w),o({type:"SCRUBBER.PRESS_DOWN",point:y}),v.preventDefault()},style:{cursor:l?void 0:"ew-resize"}})}}}var LM=(e,t={})=>new Intl.NumberFormat(e,t),FM=(e,t={})=>new Ew(e,t),eh=(e,t)=>{const{prop:n,computed:o}=t;return n("formatOptions")?e===""?Number.NaN:o("parser").parse(e):parseFloat(e)},Ci=(e,t)=>{const{prop:n,computed:o}=t;return Number.isNaN(e)?"":n("formatOptions")?o("formatter").format(e):e.toString()},BM=(e,t)=>{let n=e!==void 0&&!Number.isNaN(e)?e:1;return t?.style==="percent"&&(e===void 0||Number.isNaN(e))&&(n=.01),n},{choose:zM,guards:HM,createMachine:jM}=Yd(),{not:Rv,and:Vv}=HM,WM=jM({props({props:e}){const t=BM(e.step,e.formatOptions);return{dir:"ltr",locale:"en-US",focusInputOnChange:!0,clampValueOnBlur:!e.allowOverflow,allowOverflow:!1,inputMode:"decimal",pattern:"-?[0-9]*(.[0-9]+)?",defaultValue:"",step:t,min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,spinOnPress:!0,...e,translations:{incrementLabel:"increment value",decrementLabel:"decrease value",...e.translations}}},initialState(){return"idle"},context({prop:e,bindable:t,getComputed:n}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(o){var i;const a=n(),r=eh(o,{computed:a,prop:e});(i=e("onValueChange"))==null||i({value:o,valueAsNumber:r})}})),hint:t(()=>({defaultValue:null})),scrubberCursorPoint:t(()=>({defaultValue:null,hash(o){return o?`x:${o.x}, y:${o.y}`:""}})),fieldsetDisabled:t(()=>({defaultValue:!1}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",valueAsNumber:({context:e,computed:t,prop:n})=>eh(e.get("value"),{computed:t,prop:n}),formattedValue:({computed:e,prop:t})=>Ci(e("valueAsNumber"),{computed:e,prop:t}),isAtMin:({computed:e,prop:t})=>jS(e("valueAsNumber"),t("min")),isAtMax:({computed:e,prop:t})=>HS(e("valueAsNumber"),t("max")),isOutOfRange:({computed:e,prop:t})=>!vs(e("valueAsNumber"),t("min"),t("max")),isValueEmpty:({context:e})=>e.get("value")==="",isDisabled:({prop:e,context:t})=>!!e("disabled")||t.get("fieldsetDisabled"),canIncrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMax"),canDecrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMin"),valueText:({prop:e,context:t})=>{var n,o;return(o=(n=e("translations")).valueText)==null?void 0:o.call(n,t.get("value"))},formatter:Fh(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>LM(e,t)),parser:Fh(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>FM(e,t))},watch({track:e,action:t,context:n,computed:o,prop:i}){e([()=>n.get("value"),()=>i("locale")],()=>{t(["syncInputElement"])}),e([()=>o("isOutOfRange")],()=>{t(["invokeOnInvalid"])}),e([()=>n.hash("scrubberCursorPoint")],()=>{t(["setVirtualCursorPosition"])})},effects:["trackFormControl"],on:{"VALUE.SET":{actions:["setRawValue"]},"VALUE.CLEAR":{actions:["clearValue"]},"VALUE.INCREMENT":{actions:["increment"]},"VALUE.DECREMENT":{actions:["decrement"]}},states:{idle:{on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","invokeOnFocus","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","invokeOnFocus","setHint","setCursorPoint"]},"INPUT.FOCUS":{target:"focused",actions:["focusInput","invokeOnFocus"]}}},focused:{tags:["focus"],effects:["attachWheelListener"],on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","setHint","setCursorPoint"]},"INPUT.ARROW_UP":{actions:["increment"]},"INPUT.ARROW_DOWN":{actions:["decrement"]},"INPUT.HOME":{actions:["decrementToMin"]},"INPUT.END":{actions:["incrementToMax"]},"INPUT.CHANGE":{actions:["setValue","setHint"]},"INPUT.BLUR":[{guard:Vv("clampValueOnBlur",Rv("isInRange")),target:"idle",actions:["setClampedValue","clearHint","invokeOnBlur"]},{guard:Rv("isInRange"),target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnInvalid"]},{target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur"]}],"INPUT.ENTER":{actions:["setFormattedValue","clearHint","invokeOnBlur"]}}},"before:spin":{tags:["focus"],effects:["trackButtonDisabled","waitForChangeDelay"],entry:zM([{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}]),on:{CHANGE_DELAY:{target:"spinning",guard:Vv("isInRange","spinOnPress")},"TRIGGER.PRESS_UP":[{guard:"isTouchPointer",target:"focused",actions:["clearHint"]},{target:"focused",actions:["focusInput","clearHint"]}]}},spinning:{tags:["focus"],effects:["trackButtonDisabled","spinValue"],on:{SPIN:[{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}],"TRIGGER.PRESS_UP":{target:"focused",actions:["focusInput","clearHint"]}}},scrubbing:{tags:["focus"],effects:["activatePointerLock","trackMousemove","setupVirtualCursor","preventTextSelection"],on:{"SCRUBBER.POINTER_UP":{target:"focused",actions:["focusInput","clearCursorPoint"]},"SCRUBBER.POINTER_MOVE":[{guard:"isIncrementHint",actions:["increment","setCursorPoint"]},{guard:"isDecrementHint",actions:["decrement","setCursorPoint"]}]}}},implementations:{guards:{clampValueOnBlur:({prop:e})=>e("clampValueOnBlur"),spinOnPress:({prop:e})=>!!e("spinOnPress"),isInRange:({computed:e})=>!e("isOutOfRange"),isDecrementHint:({context:e,event:t})=>(t.hint??e.get("hint"))==="decrement",isIncrementHint:({context:e,event:t})=>(t.hint??e.get("hint"))==="increment",isTouchPointer:({event:e})=>e.pointerType==="touch"},effects:{waitForChangeDelay({send:e}){const t=setTimeout(()=>{e({type:"CHANGE_DELAY"})},300);return()=>clearTimeout(t)},spinValue({send:e}){const t=setInterval(()=>{e({type:"SPIN"})},50);return()=>clearInterval(t)},trackFormControl({context:e,scope:t}){const n=ls(t);return lr(n,{onFieldsetDisabledChange(o){e.set("fieldsetDisabled",o)},onFormReset(){e.set("value",e.initial("value"))}})},setupVirtualCursor({context:e,scope:t}){const n=e.get("scrubberCursorPoint");return PM(t,n)},preventTextSelection({scope:e}){return DM(e)},trackButtonDisabled({context:e,scope:t,send:n}){const o=e.get("hint"),i=IM(t,o);return Js(i,{attributes:["disabled"],callback(){n({type:"TRIGGER.PRESS_UP",src:"attr"})}})},attachWheelListener({scope:e,send:t,prop:n}){const o=ls(e);if(!o||!e.isActiveElement(o)||!n("allowMouseWheel"))return;function i(a){a.preventDefault();const r=Math.sign(a.deltaY)*-1;r===1?t({type:"VALUE.INCREMENT"}):r===-1&&t({type:"VALUE.DECREMENT"})}return Ee(o,"wheel",i,{passive:!1})},activatePointerLock({scope:e}){if(!zd())return rS(e.getDoc())},trackMousemove({scope:e,send:t,context:n,computed:o}){const i=e.getDoc();function a(s){const l=n.get("scrubberCursorPoint"),c=o("isRtl"),d=AM(e,{point:l,isRtl:c,event:s});d.hint&&t({type:"SCRUBBER.POINTER_MOVE",hint:d.hint,point:d.point})}function r(){t({type:"SCRUBBER.POINTER_UP"})}return Rs(Ee(i,"mousemove",a,!1),Ee(i,"mouseup",r,!1))}},actions:{focusInput({scope:e,prop:t}){if(!t("focusInputOnChange"))return;const n=ls(e);e.isActiveElement(n)||ue(()=>n?.focus({preventScroll:!0}))},increment({context:e,event:t,prop:n,computed:o}){let i=qS(o("valueAsNumber"),t.step??n("step"));n("allowOverflow")||(i=yt(i,n("min"),n("max"))),e.set("value",Ci(i,{computed:o,prop:n}))},decrement({context:e,event:t,prop:n,computed:o}){let i=YS(o("valueAsNumber"),t.step??n("step"));n("allowOverflow")||(i=yt(i,n("min"),n("max"))),e.set("value",Ci(i,{computed:o,prop:n}))},setClampedValue({context:e,prop:t,computed:n}){const o=yt(n("valueAsNumber"),t("min"),t("max"));e.set("value",Ci(o,{computed:n,prop:t}))},setRawValue({context:e,event:t,prop:n,computed:o}){let i=eh(t.value,{computed:o,prop:n});n("allowOverflow")||(i=yt(i,n("min"),n("max"))),e.set("value",Ci(i,{computed:o,prop:n}))},setValue({context:e,event:t}){var n;const o=((n=t.target)==null?void 0:n.value)??t.value;e.set("value",o)},clearValue({context:e}){e.set("value","")},incrementToMax({context:e,prop:t,computed:n}){const o=Ci(t("max"),{computed:n,prop:t});e.set("value",o)},decrementToMin({context:e,prop:t,computed:n}){const o=Ci(t("min"),{computed:n,prop:t});e.set("value",o)},setHint({context:e,event:t}){e.set("hint",t.hint)},clearHint({context:e}){e.set("hint",null)},invokeOnFocus({computed:e,prop:t}){var n;(n=t("onFocusChange"))==null||n({focused:!0,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnBlur({computed:e,prop:t}){var n;(n=t("onFocusChange"))==null||n({focused:!1,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnInvalid({computed:e,prop:t,event:n}){var o;if(n.type==="INPUT.CHANGE")return;const i=e("valueAsNumber")>t("max")?"rangeOverflow":"rangeUnderflow";(o=t("onValueInvalid"))==null||o({reason:i,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},syncInputElement({context:e,event:t,computed:n,scope:o}){const i=t.type.endsWith("CHANGE")?e.get("value"):n("formattedValue"),a=ls(o),r=t.selection;ue(()=>{Nn(a,i),MM(a,r,o)})},setFormattedValue({context:e,computed:t}){e.set("value",t("formattedValue"))},setCursorPoint({context:e,event:t}){e.set("scrubberCursorPoint",t.point)},clearCursorPoint({context:e}){e.set("scrubberCursorPoint",null)},setVirtualCursorPosition({context:e,scope:t}){const n=Dw(t),o=e.get("scrubberCursorPoint");!n||!o||(n.style.transform=`translate3d(${o.x}px, ${o.y}px, 0px)`)}}}});ae()(["allowMouseWheel","allowOverflow","clampValueOnBlur","dir","disabled","focusInputOnChange","form","formatOptions","getRootNode","id","ids","inputMode","invalid","locale","max","min","name","onFocusChange","onValueChange","onValueInvalid","pattern","required","readOnly","spinOnPress","step","translations","value","defaultValue"]);const UM=(e={},t)=>{const n=Mt(),o=Kt(Zt),i=pn(hn),a=ro(),r=E(()=>{const l=qe(e);return{id:n,ids:{label:a?.value.ids.label,input:a?.value.ids.control},disabled:a?.value.disabled,readOnly:a?.value.readOnly,required:a?.value.required,invalid:a?.value.invalid,dir:i.value.dir,locale:i.value.locale,value:l.modelValue,getRootNode:o?.value.getRootNode,...On(l),onValueChange:c=>{var d;t?.("valueChange",c),t?.("update:modelValue",c.value),(d=l.onValueChange)==null||d.call(l,c)},onFocusChange:c=>{var d;t?.("focusChange",c),(d=l.onFocusChange)==null||d.call(l,c)},onValueInvalid:c=>{var d;t?.("valueInvalid",c),(d=l.onValueInvalid)==null||d.call(l,c)}}}),s=Nt(WM,r);return E(()=>NM(s,Yt))},GM=T({__name:"number-input-root",props:dn({allowMouseWheel:{type:Boolean},allowOverflow:{type:Boolean},clampValueOnBlur:{type:Boolean},defaultValue:{},disabled:{type:Boolean},focusInputOnChange:{type:Boolean},form:{},formatOptions:{},id:{},ids:{},inputMode:{},invalid:{type:Boolean},locale:{},max:{},min:{},modelValue:{},name:{},pattern:{},readOnly:{type:Boolean},required:{type:Boolean},spinOnPress:{type:Boolean},step:{},translations:{},asChild:{type:Boolean}},{allowMouseWheel:void 0,allowOverflow:void 0,clampValueOnBlur:void 0,disabled:void 0,focusInputOnChange:void 0,invalid:void 0,readOnly:void 0,required:void 0,spinOnPress:void 0}),emits:["focusChange","valueChange","valueInvalid","update:modelValue"],setup(e,{emit:t}){const n=UM(e,t);return $w(n),Y(),(o,i)=>(x(),$(f(K).div,z(f(n).getRootProps(),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),qM=T({__name:"number-input-scrubber",props:{asChild:{type:Boolean}},setup(e){const t=mi();return Y(),(n,o)=>(x(),$(f(K).div,z(f(t).getScrubberProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),YM=T({__name:"number-input-value-text",props:{asChild:{type:Boolean}},setup(e){const t=mi();return Y(),(n,o)=>(x(),$(f(K).span,z(f(t).getValueTextProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),_i=Object.freeze(Object.defineProperty({__proto__:null,Context:dM,Control:uM,DecrementTrigger:hM,IncrementTrigger:pM,Input:fM,Label:gM,Root:GM,RootProvider:mM,Scrubber:qM,ValueText:YM},Symbol.toStringTag,{value:"Module"}));var KM=be("pagination").parts("root","item","ellipsis","prevTrigger","nextTrigger");KM.build();ae()(["count","dir","getRootNode","id","ids","onPageChange","onPageSizeChange","page","defaultPage","pageSize","defaultPageSize","siblingCount","translations","type","getPageUrl"]);ae()(["value","type"]);ae()(["index"]);var ZM=be("password-input").parts("root","input","label","control","indicator","visibilityTrigger");ZM.build();ae()(["defaultVisible","dir","id","onVisibilityChange","visible","ids","getRootNode","disabled","invalid","required","readOnly","translations","ignorePasswordManagers","autoComplete","name"]);var XM=be("pinInput").parts("root","label","input","control");XM.build();ae()(["autoFocus","blurOnComplete","count","defaultValue","dir","disabled","form","getRootNode","id","ids","invalid","mask","name","onValueChange","onValueComplete","onValueInvalid","otp","pattern","placeholder","readOnly","required","selectOnFocus","translations","type","value"]);var Aw=be("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger");Aw.build();ae()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);var JM=be("progress").parts("root","label","track","range","valueText","view","circle","circleTrack","circleRange");JM.build();ae()(["dir","getRootNode","id","ids","max","min","orientation","translations","value","onValueChange","defaultValue","formatOptions","locale"]);var QM=be("qr-code").parts("root","frame","pattern","overlay","downloadTrigger");QM.build();ae()(["ids","defaultValue","value","id","encoding","dir","getRootNode","onValueChange","pixelSize"]);var Uf=be("radio-group").parts("root","label","item","itemText","itemControl","indicator");Uf.build();ae()(["dir","disabled","form","getRootNode","id","ids","name","onValueChange","orientation","readOnly","value","defaultValue"]);ae()(["value","disabled","invalid"]);var eN=be("rating-group").parts("root","label","item","control");eN.build();ae()(["allowHalf","autoFocus","count","dir","disabled","form","getRootNode","id","ids","name","onHoverChange","onValueChange","required","readOnly","translations","value","defaultValue"]);ae()(["index"]);var tN=be("scroll-area").parts("root","viewport","content","scrollbar","thumb","corner");tN.build();ae()(["dir","getRootNode","ids","id"]);const nN=Uf.rename("segment-group");nN.build();const[Rw,St]=Pe("SelectContext"),oN=T({__name:"select-clear-trigger",props:{asChild:{type:Boolean}},setup(e){const t=St();return Y(),(n,o)=>(x(),$(f(K).button,z(f(t).getClearTriggerProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),iN=T({__name:"select-content",props:{asChild:{type:Boolean}},setup(e){const t=St(),n=Jd(),o=E(()=>oa(t.value.getContentProps(),n.value.presenceProps));return Y(),(i,a)=>f(n).unmounted?X("",!0):(x(),$(f(K).div,z({key:0},o.value,{"as-child":e.asChild}),{default:_(()=>[R(i.$slots,"default")]),_:3},16,["as-child"]))}}),aN=T({__name:"select-context",setup(e){const t=St();return(n,o)=>R(n.$slots,"default",st(mt(f(t))))}}),rN=T({__name:"select-control",props:{asChild:{type:Boolean}},setup(e){const t=St();return Y(),(n,o)=>(x(),$(f(K).div,z(f(t).getControlProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),sN={key:0,value:""},lN=["value","disabled"],cN=T({__name:"select-hidden-select",props:{asChild:{type:Boolean}},setup(e){const t=St(),n=ro();return Y(),(o,i)=>{var a;return x(),$(f(K).select,z({"aria-describedby":(a=f(n))==null?void 0:a.ariaDescribedby},f(t).getHiddenSelectProps()),{default:_(()=>[f(t).value.length===0?(x(),D("option",sN)):X("",!0),(x(!0),D($e,null,Ie(f(t).collection.items,r=>(x(),D("option",{key:r.value,value:f(t).collection.getItemValue(r),disabled:f(t).collection.getItemDisabled(r)},ie(f(t).collection.stringifyItem(r))+" > ",9,lN))),128))]),_:1},16,["aria-describedby"])}}}),dN=T({__name:"select-indicator",props:{asChild:{type:Boolean}},setup(e){const t=St();return Y(),(n,o)=>(x(),$(f(K).div,z(f(t).getIndicatorProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),[uN,hN]=Pe("SelectItemContext"),pN=T({__name:"select-item-context",setup(e){const t=hN();return(n,o)=>R(n.$slots,"default",st(mt(f(t))))}}),[fN,gN]=Pe("SelectItemGroupPropsContext"),mN=T({__name:"select-item-group-label",props:{asChild:{type:Boolean}},setup(e){const t=St(),n=gN();return Y(),(o,i)=>(x(),$(f(K).div,z(f(t).getItemGroupLabelProps({htmlFor:f(n).id}),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),vN=T({__name:"select-item-group",props:{id:{},asChild:{type:Boolean}},setup(e){const t=e,n=St(),o=Mt(),i=t.id??o;return fN({id:i}),Y(),(a,r)=>(x(),$(f(K).div,z(f(n).getItemGroupProps({id:f(i)}),{"as-child":e.asChild}),{default:_(()=>[R(a.$slots,"default")]),_:3},16,["as-child"]))}}),[bN,Vw]=Pe("SelectItemPropsContext"),yN=T({__name:"select-item-indicator",props:{asChild:{type:Boolean}},setup(e){const t=St(),n=Vw();return Y(),(o,i)=>(x(),$(f(K).div,z(f(t).getItemIndicatorProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),xN=T({__name:"select-item-text",props:{asChild:{type:Boolean}},setup(e){const t=St(),n=Vw();return Y(),(o,i)=>(x(),$(f(K).span,z(f(t).getItemTextProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),wN=T({__name:"select-item",props:{item:{},persistFocus:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=St();return bN(t),uN(E(()=>n.value.getItemState(t))),Y(),(o,i)=>(x(),$(f(K).div,z(f(n).getItemProps(t),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),CN=T({__name:"select-label",props:{asChild:{type:Boolean}},setup(e){const t=St();return Y(),(n,o)=>(x(),$(f(K).label,z(f(t).getLabelProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),_N=T({__name:"select-list",props:{asChild:{type:Boolean}},setup(e){const t=St();return Y(),(n,o)=>(x(),$(f(K).div,z(f(t).getListProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),kN=T({__name:"select-positioner",props:{asChild:{type:Boolean}},setup(e){const t=St(),n=ia(),o=il(E(()=>({...n.value,present:t.value.open})));return Xd(o),Y(),(i,a)=>f(o).unmounted?X("",!0):(x(),$(f(K).div,z({key:0},f(t).getPositionerProps(),{"as-child":e.asChild}),{default:_(()=>[R(i.$slots,"default")]),_:3},16,["as-child"]))}}),$N=T({__name:"select-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=E(()=>t.value);return Rw(n),En(E(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),Y(),(o,i)=>(x(),$(f(K).div,z(n.value.getRootProps(),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}});var Mw=be("select").parts("label","positioner","trigger","indicator","clearTrigger","item","itemText","itemIndicator","itemGroup","itemGroupLabel","list","content","root","control","valueText"),It=Mw.build(),Nw=e=>new ra(e);Nw.empty=()=>new ra({items:[]});var SN=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`select:${e.id}`},pp=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`select:${e.id}:content`},fp=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`select:${e.id}:trigger`},Lw=e=>{var t;return((t=e.ids)==null?void 0:t.clearTrigger)??`select:${e.id}:clear-trigger`},Hl=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`select:${e.id}:label`},EN=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`select:${e.id}:control`},gp=(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}`},mp=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenSelect)??`select:${e.id}:select`},Fw=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`select:${e.id}:positioner`},ON=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemGroup)==null?void 0:o.call(n,t))??`select:${e.id}:optgroup:${t}`},Mv=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemGroupLabel)==null?void 0:o.call(n,t))??`select:${e.id}:optgroup-label:${t}`},th=e=>e.getById(mp(e)),Rr=e=>e.getById(pp(e)),Ni=e=>e.getById(fp(e)),TN=e=>e.getById(Lw(e)),Nv=e=>e.getById(Fw(e)),nh=(e,t)=>t==null?null:e.getById(gp(e,t));function IN(e,t){const{context:n,prop:o,scope:i,state:a,computed:r,send:s}=e,l=o("disabled")||n.get("fieldsetDisabled"),c=!!o("invalid"),d=!!o("required"),u=!!o("readOnly"),h=o("composite"),p=o("collection"),m=a.hasTag("open"),g=a.matches("focused"),b=n.get("highlightedValue"),v=n.get("highlightedItem"),y=n.get("selectedItems"),w=n.get("currentPlacement"),C=r("isTypingAhead"),k=r("isInteractive"),O=b?gp(i,b):void 0;function P(V){const H=p.getItemDisabled(V.item),A=p.getItemValue(V.item);return pf(A,()=>`[zag-js] No value found for item ${JSON.stringify(V.item)}`),{value:A,disabled:!!(l||H),highlighted:b===A,selected:n.get("value").includes(A)}}const S=Df({...o("positioning"),placement:w});return{open:m,focused:g,empty:n.get("value").length===0,highlightedItem:v,highlightedValue:b,selectedItems:y,hasSelectedItems:r("hasSelectedItems"),value:n.get("value"),valueAsString:r("valueAsString"),collection:p,multiple:!!o("multiple"),disabled:!!l,reposition(V={}){s({type:"POSITIONING.SET",options:V})},focus(){var V;(V=Ni(i))==null||V.focus({preventScroll:!0})},setOpen(V){a.hasTag("open")!==V&&s({type:V?"OPEN":"CLOSE"})},selectValue(V){s({type:"ITEM.SELECT",value:V})},setValue(V){s({type:"VALUE.SET",value:V})},selectAll(){s({type:"VALUE.SET",value:p.getValues()})},setHighlightValue(V){s({type:"HIGHLIGHTED_VALUE.SET",value:V})},clearHighlightValue(){s({type:"HIGHLIGHTED_VALUE.CLEAR"})},clearValue(V){s(V?{type:"ITEM.CLEAR",value:V}:{type:"VALUE.CLEAR"})},getItemState:P,getRootProps(){return t.element({...It.root.attrs,dir:o("dir"),id:SN(i),"data-invalid":L(c),"data-readonly":L(u)})},getLabelProps(){return t.label({dir:o("dir"),id:Hl(i),...It.label.attrs,"data-disabled":L(l),"data-invalid":L(c),"data-readonly":L(u),"data-required":L(d),htmlFor:mp(i),onClick(V){var H;V.defaultPrevented||l||(H=Ni(i))==null||H.focus({preventScroll:!0})}})},getControlProps(){return t.element({...It.control.attrs,dir:o("dir"),id:EN(i),"data-state":m?"open":"closed","data-focus":L(g),"data-disabled":L(l),"data-invalid":L(c)})},getValueTextProps(){return t.element({...It.valueText.attrs,dir:o("dir"),"data-disabled":L(l),"data-invalid":L(c),"data-focus":L(g)})},getTriggerProps(){return t.button({id:fp(i),disabled:l,dir:o("dir"),type:"button",role:"combobox","aria-controls":pp(i),"aria-expanded":m,"aria-haspopup":"listbox","data-state":m?"open":"closed","aria-invalid":c,"aria-required":d,"aria-labelledby":Hl(i),...It.trigger.attrs,"data-disabled":L(l),"data-invalid":L(c),"data-readonly":L(u),"data-placement":w,"data-placeholder-shown":L(!r("hasSelectedItems")),onClick(V){k&&(V.defaultPrevented||s({type:"TRIGGER.CLICK"}))},onFocus(){s({type:"TRIGGER.FOCUS"})},onBlur(){s({type:"TRIGGER.BLUR"})},onKeyDown(V){if(V.defaultPrevented||!k)return;const H={ArrowUp(){s({type:"TRIGGER.ARROW_UP"})},ArrowDown(A){s({type:A.altKey?"OPEN":"TRIGGER.ARROW_DOWN"})},ArrowLeft(){s({type:"TRIGGER.ARROW_LEFT"})},ArrowRight(){s({type:"TRIGGER.ARROW_RIGHT"})},Home(){s({type:"TRIGGER.HOME"})},End(){s({type:"TRIGGER.END"})},Enter(){s({type:"TRIGGER.ENTER"})},Space(A){s(C?{type:"TRIGGER.TYPEAHEAD",key:A.key}:{type:"TRIGGER.ENTER"})}}[Ps(V,{dir:o("dir"),orientation:"vertical"})];if(H){H(V),V.preventDefault();return}Po.isValidEvent(V)&&(s({type:"TRIGGER.TYPEAHEAD",key:V.key}),V.preventDefault())}})},getIndicatorProps(){return t.element({...It.indicator.attrs,dir:o("dir"),"aria-hidden":!0,"data-state":m?"open":"closed","data-disabled":L(l),"data-invalid":L(c),"data-readonly":L(u)})},getItemProps(V){const H=P(V);return t.element({id:gp(i,H.value),role:"option",...It.item.attrs,dir:o("dir"),"data-value":H.value,"aria-selected":H.selected,"data-state":H.selected?"checked":"unchecked","data-highlighted":L(H.highlighted),"data-disabled":L(H.disabled),"aria-disabled":Je(H.disabled),onPointerMove(A){H.disabled||A.pointerType!=="mouse"||H.value!==b&&s({type:"ITEM.POINTER_MOVE",value:H.value})},onClick(A){A.defaultPrevented||H.disabled||s({type:"ITEM.CLICK",src:"pointerup",value:H.value})},onPointerLeave(A){var G;H.disabled||V.persistFocus||A.pointerType!=="mouse"||!((G=e.event.previous())!=null&&G.type.includes("POINTER"))||s({type:"ITEM.POINTER_LEAVE"})}})},getItemTextProps(V){const H=P(V);return t.element({...It.itemText.attrs,"data-state":H.selected?"checked":"unchecked","data-disabled":L(H.disabled),"data-highlighted":L(H.highlighted)})},getItemIndicatorProps(V){const H=P(V);return t.element({"aria-hidden":!0,...It.itemIndicator.attrs,"data-state":H.selected?"checked":"unchecked",hidden:!H.selected})},getItemGroupLabelProps(V){const{htmlFor:H}=V;return t.element({...It.itemGroupLabel.attrs,id:Mv(i,H),dir:o("dir"),role:"presentation"})},getItemGroupProps(V){const{id:H}=V;return t.element({...It.itemGroup.attrs,"data-disabled":L(l),id:ON(i,H),"aria-labelledby":Mv(i,H),role:"group",dir:o("dir")})},getClearTriggerProps(){return t.button({...It.clearTrigger.attrs,id:Lw(i),type:"button","aria-label":"Clear value","data-invalid":L(c),disabled:l,hidden:!r("hasSelectedItems"),dir:o("dir"),onClick(V){V.defaultPrevented||s({type:"CLEAR.CLICK"})}})},getHiddenSelectProps(){const V=n.get("value"),H=o("multiple")?V:V?.[0];return t.select({name:o("name"),form:o("form"),disabled:l,multiple:o("multiple"),required:o("required"),"aria-hidden":!0,id:mp(i),defaultValue:H,style:Ud,tabIndex:-1,onFocus(){var A;(A=Ni(i))==null||A.focus({preventScroll:!0})},"aria-labelledby":Hl(i)})},getPositionerProps(){return t.element({...It.positioner.attrs,dir:o("dir"),id:Fw(i),style:S.floating})},getContentProps(){return t.element({hidden:!m,dir:o("dir"),id:pp(i),role:h?"listbox":"dialog",...It.content.attrs,"data-state":m?"open":"closed","data-placement":w,"data-activedescendant":O,"aria-activedescendant":h?O:void 0,"aria-multiselectable":o("multiple")&&h?!0:void 0,"aria-labelledby":Hl(i),tabIndex:0,onKeyDown(V){if(!k||!Rt(V.currentTarget,je(V)))return;if(V.key==="Tab"&&!J$(V)){V.preventDefault();return}const H={ArrowUp(){s({type:"CONTENT.ARROW_UP"})},ArrowDown(){s({type:"CONTENT.ARROW_DOWN"})},Home(){s({type:"CONTENT.HOME"})},End(){s({type:"CONTENT.END"})},Enter(){s({type:"ITEM.CLICK",src:"keydown.enter"})},Space(te){var j;C?s({type:"CONTENT.TYPEAHEAD",key:te.key}):(j=H.Enter)==null||j.call(H,te)}},A=H[Ps(V)];if(A){A(V),V.preventDefault();return}const G=je(V);Nd(G)||Po.isValidEvent(V)&&(s({type:"CONTENT.TYPEAHEAD",key:V.key}),V.preventDefault())}})},getListProps(){return t.element({...It.list.attrs,tabIndex:0,role:h?void 0:"listbox","aria-labelledby":fp(i),"aria-activedescendant":h?void 0:O,"aria-multiselectable":!h&&o("multiple")?!0:void 0})}}}var{and:Vr,not:ki,or:PN}=kt(),DN={props({props:e}){return{loopFocus:!1,closeOnSelect:!e.multiple,composite:!0,defaultValue:[],...e,collection:e.collection??Nw.empty(),positioning:{placement:"bottom-start",gutter:8,...e.positioning}}},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:xt,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"),onChange(n){var o;(o=e("onHighlightChange"))==null||o({highlightedValue:n,highlightedItem:e("collection").find(n),highlightedIndex:e("collection").indexOf(n)})}})),currentPlacement:t(()=>({defaultValue:void 0})),fieldsetDisabled:t(()=>({defaultValue:!1})),highlightedItem:t(()=>({defaultValue:null})),selectedItems:t(()=>{const n=e("value")??e("defaultValue")??[];return{defaultValue:e("collection").findMany(n)}})}},refs(){return{typeahead:{...Po.defaultOptions}}},computed:{hasSelectedItems:({context:e})=>e.get("value").length>0,isTypingAhead:({refs:e})=>e.get("typeahead").keysSoFar!=="",isDisabled:({prop:e,context:t})=>!!e("disabled")||!!t.get("fieldsetDisabled"),isInteractive:({prop:e})=>!(e("disabled")||e("readOnly")),valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems"))},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"idle"},entry:["syncSelectElement"],watch({context:e,prop:t,track:n,action:o}){n([()=>e.get("value").toString()],()=>{o(["syncSelectedItems","syncSelectElement","dispatchChangeEvent"])}),n([()=>t("open")],()=>{o(["toggleVisibility"])}),n([()=>e.get("highlightedValue")],()=>{o(["syncHighlightedItem"])}),n([()=>t("collection").toString()],()=>{o(["syncCollection"])})},on:{"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedItem"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedItem"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setSelectedItems"]},"VALUE.CLEAR":{actions:["clearSelectedItems"]},"CLEAR.CLICK":{actions:["clearSelectedItems","focusTriggerEl"]}},effects:["trackFormControlState"],states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{target:"open",actions:["setInitialFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus","highlightFirstSelectedItem"]}],"TRIGGER.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}]}},focused:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{guard:"isTriggerArrowUpEvent",target:"open",actions:["setInitialFocus","highlightComputedLastItem"]},{guard:PN("isTriggerArrowDownEvent","isTriggerEnterEvent"),target:"open",actions:["setInitialFocus","highlightComputedFirstItem"]},{target:"open",actions:["setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}],"TRIGGER.BLUR":{target:"idle"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightFirstSelectedItem"]}],"TRIGGER.ENTER":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_UP":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedLastItem"]}],"TRIGGER.ARROW_DOWN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_LEFT":[{guard:Vr(ki("multiple"),"hasSelectedItems"),actions:["selectPreviousItem"]},{guard:ki("multiple"),actions:["selectLastItem"]}],"TRIGGER.ARROW_RIGHT":[{guard:Vr(ki("multiple"),"hasSelectedItems"),actions:["selectNextItem"]},{guard:ki("multiple"),actions:["selectFirstItem"]}],"TRIGGER.HOME":{guard:ki("multiple"),actions:["selectFirstItem"]},"TRIGGER.END":{guard:ki("multiple"),actions:["selectLastItem"]},"TRIGGER.TYPEAHEAD":{guard:ki("multiple"),actions:["selectMatchingItem"]}}},open:{tags:["open"],exit:["scrollContentToTop"],effects:["trackDismissableElement","computePlacement","scrollToHighlightedItem"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["clearHighlightedItem"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{guard:"restoreFocus",target:"focused",actions:["invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["invokeOnClose","clearHighlightedItem"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","clearHighlightedItem"]}],"ITEM.CLICK":[{guard:Vr("closeOnSelect","isOpenControlled"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{actions:["selectHighlightedItem"]}],"CONTENT.HOME":{actions:["highlightFirstItem"]},"CONTENT.END":{actions:["highlightLastItem"]},"CONTENT.ARROW_DOWN":[{guard:Vr("hasHighlightedItem","loop","isLastItemHighlighted"),actions:["highlightFirstItem"]},{guard:"hasHighlightedItem",actions:["highlightNextItem"]},{actions:["highlightFirstItem"]}],"CONTENT.ARROW_UP":[{guard:Vr("hasHighlightedItem","loop","isFirstItemHighlighted"),actions:["highlightLastItem"]},{guard:"hasHighlightedItem",actions:["highlightPreviousItem"]},{actions:["highlightLastItem"]}],"CONTENT.TYPEAHEAD":{actions:["highlightMatchingItem"]},"ITEM.POINTER_MOVE":{actions:["highlightItem"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedItem"]},"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{loop:({prop:e})=>!!e("loopFocus"),multiple:({prop:e})=>!!e("multiple"),hasSelectedItems:({computed:e})=>!!e("hasSelectedItems"),hasHighlightedItem:({context:e})=>e.get("highlightedValue")!=null,isFirstItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").firstValue,isLastItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").lastValue,closeOnSelect:({prop:e,event:t})=>!!(t.closeOnSelect??e("closeOnSelect")),restoreFocus:({event:e})=>Lv(e),isOpenControlled:({prop:e})=>e("open")!==void 0,isTriggerClickEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.CLICK"},isTriggerEnterEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.ENTER"},isTriggerArrowUpEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.ARROW_UP"},isTriggerArrowDownEvent:({event:e})=>{var t;return((t=e.previousEvent)==null?void 0:t.type)==="TRIGGER.ARROW_DOWN"}},effects:{trackFormControlState({context:e,scope:t}){return lr(th(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){const n=e.initial("value");e.set("value",n)}})},trackDismissableElement({scope:e,send:t,prop:n}){const o=()=>Rr(e);let i=!0;return aa(o,{type:"listbox",defer:!0,exclude:[Ni(e),TN(e)],onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onInteractOutside(a){var r;(r=n("onInteractOutside"))==null||r(a),i=!(a.detail.focusable||a.detail.contextmenu)},onDismiss(){t({type:"CLOSE",src:"interact-outside",restoreFocus:i})}})},computePlacement({context:e,prop:t,scope:n}){const o=t("positioning");return e.set("currentPlacement",o.placement),cn(()=>Ni(n),()=>Nv(n),{defer:!0,...o,onComplete(i){e.set("currentPlacement",i.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n,event:o}){const i=a=>{const r=e.get("highlightedValue");if(r==null||o.current().type.includes("POINTER"))return;const s=Rr(n),l=t("scrollToIndexFn");if(l){const d=t("collection").indexOf(r);l?.({index:d,immediate:a,getElement:()=>nh(n,r)});return}const c=nh(n,r);Ds(c,{rootEl:s,block:"nearest"})};return ue(()=>i(!0)),Js(()=>Rr(n),{defer:!0,attributes:["data-activedescendant"],callback(){i(!1)}})}},actions:{reposition({context:e,prop:t,scope:n,event:o}){const i=()=>Nv(n);cn(Ni(n),i,{...t("positioning"),...o.options,defer:!0,listeners:!1,onComplete(a){e.set("currentPlacement",a.placement)}})},toggleVisibility({send:e,prop:t,event:n}){e({type:t("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})},highlightPreviousItem({context:e,prop:t}){const n=e.get("highlightedValue");if(n==null)return;const o=t("collection").getPreviousValue(n,1,t("loopFocus"));o!=null&&e.set("highlightedValue",o)},highlightNextItem({context:e,prop:t}){const n=e.get("highlightedValue");if(n==null)return;const o=t("collection").getNextValue(n,1,t("loopFocus"));o!=null&&e.set("highlightedValue",o)},highlightFirstItem({context:e,prop:t}){const n=t("collection").firstValue;e.set("highlightedValue",n)},highlightLastItem({context:e,prop:t}){const n=t("collection").lastValue;e.set("highlightedValue",n)},setInitialFocus({scope:e}){ue(()=>{const t=sf({root:Rr(e)});t?.focus({preventScroll:!0})})},focusTriggerEl({event:e,scope:t}){Lv(e)&&ue(()=>{const n=Ni(t);n?.focus({preventScroll:!0})})},selectHighlightedItem({context:e,prop:t,event:n}){var o;let i=n.value??e.get("highlightedValue");i==null||!t("collection").has(i)||((o=t("onSelect"))==null||o({value:i}),i=t("deselectable")&&!t("multiple")&&e.get("value").includes(i)?null:i,e.set("value",a=>i==null?[]:t("multiple")?Gi(a,i):[i]))},highlightComputedFirstItem({context:e,prop:t,computed:n}){const o=t("collection"),i=n("hasSelectedItems")?o.sort(e.get("value"))[0]:o.firstValue;e.set("highlightedValue",i)},highlightComputedLastItem({context:e,prop:t,computed:n}){const o=t("collection"),i=n("hasSelectedItems")?o.sort(e.get("value"))[0]:o.lastValue;e.set("highlightedValue",i)},highlightFirstSelectedItem({context:e,prop:t,computed:n}){if(!n("hasSelectedItems"))return;const o=t("collection").sort(e.get("value"))[0];e.set("highlightedValue",o)},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}){var o;(o=t("onSelect"))==null||o({value:n.value});const i=t("deselectable")&&!t("multiple")&&e.get("value").includes(n.value)?null:n.value;e.set("value",a=>i==null?[]:t("multiple")?Gi(a,i):[i])},clearItem({context:e,event:t}){e.set("value",n=>n.filter(o=>o!==t.value))},setSelectedItems({context:e,event:t}){e.set("value",t.value)},clearSelectedItems({context:e}){e.set("value",[])},selectPreviousItem({context:e,prop:t}){const[n]=e.get("value"),o=t("collection").getPreviousValue(n);o&&e.set("value",[o])},selectNextItem({context:e,prop:t}){const[n]=e.get("value"),o=t("collection").getNextValue(n);o&&e.set("value",[o])},selectFirstItem({context:e,prop:t}){const n=t("collection").firstValue;n&&e.set("value",[n])},selectLastItem({context:e,prop:t}){const n=t("collection").lastValue;n&&e.set("value",[n])},selectMatchingItem({context:e,prop:t,event:n,refs:o}){const i=t("collection").search(n.key,{state:o.get("typeahead"),currentValue:e.get("value")[0]});i!=null&&e.set("value",[i])},scrollContentToTop({prop:e,scope:t}){var n,o;if(e("scrollToIndexFn")){const i=e("collection").firstValue;(n=e("scrollToIndexFn"))==null||n({index:0,immediate:!0,getElement:()=>nh(t,i)})}else(o=Rr(t))==null||o.scrollTo(0,0)},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},syncSelectElement({context:e,prop:t,scope:n}){const o=th(n);if(o){if(e.get("value").length===0&&!t("multiple")){o.selectedIndex=-1;return}for(const i of o.options)i.selected=e.get("value").includes(i.value)}},syncCollection({context:e,prop:t}){const n=t("collection"),o=n.find(e.get("highlightedValue"));o&&e.set("highlightedItem",o);const i=n.findMany(e.get("value"));e.set("selectedItems",i)},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)},dispatchChangeEvent({scope:e}){queueMicrotask(()=>{const t=th(e);if(!t)return;const n=e.getWin(),o=new n.Event("change",{bubbles:!0,composed:!0});t.dispatchEvent(o)})}}}};function Lv(e){var t;const n=e.restoreFocus??((t=e.previousEvent)==null?void 0:t.restoreFocus);return n==null||!!n}ae()(["closeOnSelect","collection","composite","defaultHighlightedValue","defaultOpen","defaultValue","deselectable","dir","disabled","form","getRootNode","highlightedValue","id","ids","invalid","loopFocus","multiple","name","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onSelect","onValueChange","open","positioning","readOnly","required","scrollToIndexFn","value"]);ae()(["item","persistFocus"]);ae()(["id"]);ae()(["htmlFor"]);const AN=(e,t)=>{const n=Mt(),o=Kt(Zt),i=pn(hn),a=ro(),r=E(()=>{const l=qe(e);return{id:n,ids:{label:a?.value.ids.label,hiddenSelect:a?.value.ids.control},disabled:a?.value.disabled,readOnly:a?.value.readOnly,invalid:a?.value.invalid,required:a?.value.required,dir:i.value.dir,value:l.modelValue,getRootNode:o?.value.getRootNode,...On(l),onValueChange:c=>{var d;t?.("valueChange",c),t?.("update:modelValue",c.value),(d=l.onValueChange)==null||d.call(l,c)},onHighlightChange:c=>{var d;t?.("highlightChange",c),t?.("update:highlightedValue",c.highlightedValue),(d=l.onHighlightChange)==null||d.call(l,c)},onOpenChange:c=>{var d;t?.("openChange",c),t?.("update:open",c.open),(d=l.onOpenChange)==null||d.call(l,c)},onFocusOutside:c=>{var d;t?.("focusOutside",c),(d=l.onFocusOutside)==null||d.call(l,c)},onInteractOutside:c=>{var d;t?.("interactOutside",c),(d=l.onInteractOutside)==null||d.call(l,c)},onPointerDownOutside:c=>{var d;t?.("pointerDownOutside",c),(d=l.onPointerDownOutside)==null||d.call(l,c)},onSelect(c){var d;t?.("select",c),(d=l.onSelect)==null||d.call(l,c)}}}),s=Nt(DN,r);return E(()=>IN(s,Yt))},RN=T({__name:"select-root",props:dn({closeOnSelect:{type:Boolean},collection:{},composite:{type:Boolean},defaultHighlightedValue:{},defaultOpen:{type:Boolean},defaultValue:{},deselectable:{type:Boolean},disabled:{type:Boolean},form:{},highlightedValue:{},id:{},ids:{},invalid:{type:Boolean},loopFocus:{type:Boolean},modelValue:{},multiple:{type:Boolean},name:{},open:{type:Boolean},positioning:{},readOnly:{type:Boolean},required:{type:Boolean},scrollToIndexFn:{type:Function},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{closeOnSelect:void 0,composite:void 0,defaultOpen:void 0,deselectable:void 0,disabled:void 0,invalid:void 0,loopFocus:void 0,multiple:void 0,open:void 0,readOnly:void 0,required:void 0}),emits:["focusOutside","highlightChange","interactOutside","openChange","pointerDownOutside","select","valueChange","update:modelValue","update:open","update:highlightedValue"],setup(e,{emit:t}){const n=e,o=AN(n,t);return Rw(o),En(E(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Y(),(i,a)=>(x(),$(f(K).div,z(f(o).getRootProps(),{"as-child":e.asChild}),{default:_(()=>[R(i.$slots,"default")]),_:3},16,["as-child"]))}}),VN=T({__name:"select-trigger",props:{asChild:{type:Boolean}},setup(e){const t=St();return Y(),(n,o)=>(x(),$(f(K).button,z(f(t).getTriggerProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),MN=T({__name:"select-value-text",props:{placeholder:{},asChild:{type:Boolean}},setup(e){const t=e,n=St(),o=Ys();return Y(),(i,a)=>(x(),$(f(K).span,z(f(n).getValueTextProps(),{"as-child":e.asChild}),{default:_(()=>[R(i.$slots,"default",{},()=>{var r;return[Re(ie(((r=o.default)==null?void 0:r.call(o))||f(n).valueAsString||t.placeholder),1)]})]),_:3},16,["as-child"]))}}),Jt=Object.freeze(Object.defineProperty({__proto__:null,ClearTrigger:oN,Content:iN,Context:aN,Control:rN,HiddenSelect:cN,Indicator:dN,Item:wN,ItemContext:pN,ItemGroup:vN,ItemGroupLabel:mN,ItemIndicator:yN,ItemText:xN,Label:CN,List:_N,Positioner:kN,Root:RN,RootProvider:$N,Trigger:VN,ValueText:MN},Symbol.toStringTag,{value:"Module"}));var NN=be("signature-pad").parts("root","control","segment","segmentPath","guide","clearTrigger","label");NN.build();ae()(["defaultPaths","dir","disabled","drawing","getRootNode","id","ids","name","onDraw","onDrawEnd","paths","readOnly","required","translations"]);var LN=be("slider").parts("root","label","thumb","valueText","track","range","control","markerGroup","marker","draggingIndicator");LN.build();ae()(["aria-label","aria-labelledby","dir","disabled","form","getAriaValueText","getRootNode","id","ids","invalid","max","min","minStepsBetweenThumbs","name","onFocusChange","onValueChange","onValueChangeEnd","orientation","origin","readOnly","step","thumbAlignment","thumbAlignment","thumbSize","value","defaultValue"]);ae()(["index","name"]);ae()(["value"]);var Bw=be("splitter").parts("root","panel","resizeTrigger");Bw.build();ae()(["dir","getRootNode","id","ids","onResize","onResizeStart","onResizeEnd","onCollapse","onExpand","orientation","size","defaultSize","panels","keyboardResizeBy","nonce"]);ae()(["id"]);ae()(["disabled","id"]);const[FN,du]=Pe("StepsContext"),[BN,zw]=Pe("StepsItemPropsContext"),zN=T({__name:"steps-indicator",props:{asChild:{type:Boolean}},setup(e){const t=du(),n=zw();return Y(),(o,i)=>(x(),$(f(K).div,z(f(t).getIndicatorProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),[HN]=Pe("StepsItemContext"),jN=T({__name:"steps-item",props:{index:{},asChild:{type:Boolean}},setup(e){const t=e,n=du(),o=E(()=>n.value.getItemState(t));return BN(t),HN(o),Y(),(i,a)=>(x(),$(f(K).div,z(f(n).getItemProps(t),{"as-child":e.asChild}),{default:_(()=>[R(i.$slots,"default")]),_:3},16,["as-child"]))}}),WN=T({__name:"steps-list",props:{asChild:{type:Boolean}},setup(e){const t=du();return Y(),(n,o)=>(x(),$(f(K).div,z(f(t).getListProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),UN=T({__name:"steps-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=E(()=>t.value);return FN(n),Y(),(o,i)=>(x(),$(f(K).div,z(n.value.getRootProps(),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}});var GN=be("steps").parts("root","list","item","trigger","indicator","separator","content","nextTrigger","prevTrigger","progress"),Gn=GN.build(),qN=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`steps:${e.id}`},YN=e=>{var t;return((t=e.ids)==null?void 0:t.list)??`steps:${e.id}:list`},Fv=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.triggerId)==null?void 0:o.call(n,t))??`steps:${e.id}:trigger:${t}`},KN=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.contentId)==null?void 0:o.call(n,t))??`steps:${e.id}:content:${t}`};function ZN(e,t){const{context:n,send:o,computed:i,prop:a,scope:r}=e,s=n.get("step"),l=a("count"),c=i("percent"),d=i("hasNextStep"),u=i("hasPrevStep"),h=v=>({triggerId:Fv(r,v.index),contentId:KN(r,v.index),current:v.index===s,completed:v.index<s,incomplete:v.index>s,index:v.index,first:v.index===0,last:v.index===l-1}),p=()=>{o({type:"STEP.NEXT",src:"next.trigger.click"})},m=()=>{o({type:"STEP.PREV",src:"prev.trigger.click"})},g=()=>{o({type:"STEP.RESET",src:"reset.trigger.click"})},b=v=>{o({type:"STEP.SET",value:v,src:"api.setValue"})};return{value:s,count:l,percent:c,hasNextStep:d,hasPrevStep:u,isCompleted:i("completed"),goToNextStep:p,goToPrevStep:m,resetStep:g,getItemState:h,setStep:b,getRootProps(){return t.element({...Gn.root.attrs,id:qN(r),dir:a("dir"),"data-orientation":a("orientation"),style:{"--percent":`${c}%`}})},getListProps(){const v=_S(l).map((y,w)=>Fv(r,w));return t.element({...Gn.list.attrs,dir:a("dir"),id:YN(r),role:"tablist","aria-owns":v.join(" "),"aria-orientation":a("orientation"),"data-orientation":a("orientation")})},getItemProps(v){const y=h(v);return t.element({...Gn.item.attrs,dir:a("dir"),"aria-current":y.current?"step":void 0,"data-orientation":a("orientation")})},getTriggerProps(v){const y=h(v);return t.button({...Gn.trigger.attrs,id:y.triggerId,role:"tab",dir:a("dir"),tabIndex:!a("linear")||y.current?0:-1,"aria-selected":y.current,"aria-controls":y.contentId,"data-state":y.current?"open":"closed","data-orientation":a("orientation"),"data-complete":L(y.completed),"data-current":L(y.current),"data-incomplete":L(y.incomplete),onClick(w){w.defaultPrevented||a("linear")||o({type:"STEP.SET",value:v.index,src:"trigger.click"})}})},getContentProps(v){const y=h(v);return t.element({...Gn.content.attrs,dir:a("dir"),id:y.contentId,role:"tabpanel",tabIndex:0,hidden:!y.current,"data-state":y.current?"open":"closed","data-orientation":a("orientation"),"aria-labelledby":y.triggerId})},getIndicatorProps(v){const y=h(v);return t.element({...Gn.indicator.attrs,dir:a("dir"),"aria-hidden":!0,"data-complete":L(y.completed),"data-current":L(y.current),"data-incomplete":L(y.incomplete)})},getSeparatorProps(v){const y=h(v);return t.element({...Gn.separator.attrs,dir:a("dir"),"data-orientation":a("orientation"),"data-complete":L(y.completed),"data-current":L(y.current),"data-incomplete":L(y.incomplete)})},getNextTriggerProps(){return t.button({...Gn.nextTrigger.attrs,dir:a("dir"),type:"button",disabled:!d,onClick(v){v.defaultPrevented||p()}})},getPrevTriggerProps(){return t.button({dir:a("dir"),...Gn.prevTrigger.attrs,type:"button",disabled:!u,onClick(v){v.defaultPrevented||m()}})},getProgressProps(){return t.element({dir:a("dir"),...Gn.progress.attrs,role:"progressbar","aria-valuenow":c,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":`${c}% complete`,"data-complete":L(c===100)})}}}var XN={props({props:e}){return{defaultStep:0,count:1,linear:!1,orientation:"horizontal",...e}},context({prop:e,bindable:t}){return{step:t(()=>({defaultValue:e("defaultStep"),value:e("step"),onChange(n){var o,i;(o=e("onStepChange"))==null||o({step:n}),n==e("count")&&((i=e("onStepComplete"))==null||i())}}))}},computed:{percent:Fh(({context:e,prop:t})=>[e.get("step"),t("count")],([e,t])=>e/t*100),hasNextStep:({context:e,prop:t})=>e.get("step")<t("count"),hasPrevStep:({context:e})=>e.get("step")>0,completed:({context:e,prop:t})=>e.get("step")===t("count")},initialState(){return"idle"},entry:["validateStep"],states:{idle:{on:{"STEP.SET":{actions:["setStep"]},"STEP.NEXT":{actions:["goToNextStep"]},"STEP.PREV":{actions:["goToPrevStep"]},"STEP.RESET":{actions:["resetStep"]}}}},implementations:{actions:{goToNextStep({context:e,prop:t}){const n=Math.min(e.get("step")+1,t("count"));e.set("step",n)},goToPrevStep({context:e}){const t=Math.max(e.get("step")-1,0);e.set("step",t)},resetStep({context:e}){e.set("step",0)},setStep({context:e,event:t}){e.set("step",t.value)},validateStep({context:e,prop:t}){JN(t("count"),e.get("step"))}}}},JN=(e,t)=>{if(!vs(t,0,e))throw new RangeError(`[zag-js/steps] step index ${t} is out of bounds`)};ae()(["count","dir","getRootNode","id","ids","linear","onStepChange","onStepComplete","orientation","step","defaultStep"]);function QN(e={},t){const n=Kt(Zt),o=pn(hn),i=Mt(),a=E(()=>{var s;const l=qe(e);return{id:i,dir:o.value.dir,getRootNode:(s=n?.value)==null?void 0:s.getRootNode,...On(l),onStepChange:c=>{var d;(d=l.onStepChange)==null||d.call(l,c)},onStepComplete:()=>{var c;(c=l.onStepComplete)==null||c.call(l)}}}),r=Nt(XN,a);return E(()=>ZN(r,Yt))}const eL=T({__name:"steps-trigger",props:{asChild:{type:Boolean}},setup(e){const t=du(),n=zw();return Y(),(o,i)=>(x(),$(f(K).button,z(f(t).getTriggerProps(f(n)),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),[Hw,ul]=Pe("SwitchContext"),tL=T({__name:"switch-context",setup(e){const t=ul();return(n,o)=>R(n.$slots,"default",st(mt(f(t))))}}),nL=T({__name:"switch-control",props:{asChild:{type:Boolean}},setup(e){const t=ul();return Y(),(n,o)=>(x(),$(f(K).span,z(f(t).getControlProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),oL=T({__name:"switch-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=ul(),n=ro();return Y(),(o,i)=>{var a;return x(),$(f(K).input,z({"aria-describedby":(a=f(n))==null?void 0:a.ariaDescribedby},f(t).getHiddenInputProps(),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["aria-describedby","as-child"])}}}),iL=T({__name:"switch-label",props:{asChild:{type:Boolean}},setup(e){const t=ul();return Y(),(n,o)=>(x(),$(f(K).span,z(f(t).getLabelProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),aL=T({__name:"switch-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=E(()=>t.value);return Hw(n),Y(),(o,i)=>(x(),$(f(K).label,z(n.value.getRootProps(),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}});var jw=be("switch").parts("root","label","control","thumb"),jl=jw.build(),Ww=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`switch:${e.id}`},Bv=e=>{var t;return((t=e.ids)==null?void 0:t.label)??`switch:${e.id}:label`},rL=e=>{var t;return((t=e.ids)==null?void 0:t.thumb)??`switch:${e.id}:thumb`},sL=e=>{var t;return((t=e.ids)==null?void 0:t.control)??`switch:${e.id}:control`},vp=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`switch:${e.id}:input`},lL=e=>e.getById(Ww(e)),za=e=>e.getById(vp(e));function cL(e,t){const{context:n,send:o,prop:i,scope:a}=e,r=!!i("disabled"),s=!!i("readOnly"),l=!!i("required"),c=!!n.get("checked"),d=!r&&n.get("focused"),u=!r&&n.get("focusVisible"),h=!r&&n.get("active"),p={"data-active":L(h),"data-focus":L(d),"data-focus-visible":L(u),"data-readonly":L(s),"data-hover":L(n.get("hovered")),"data-disabled":L(r),"data-state":c?"checked":"unchecked","data-invalid":L(i("invalid")),"data-required":L(l)};return{checked:c,disabled:r,focused:d,setChecked(m){o({type:"CHECKED.SET",checked:m,isTrusted:!1})},toggleChecked(){o({type:"CHECKED.TOGGLE",checked:c,isTrusted:!1})},getRootProps(){return t.label({...jl.root.attrs,...p,dir:i("dir"),id:Ww(a),htmlFor:vp(a),onPointerMove(){r||o({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){r||o({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(m){var g;r||(je(m)===za(a)&&m.stopPropagation(),zd()&&((g=za(a))==null||g.focus()))}})},getLabelProps(){return t.element({...jl.label.attrs,...p,dir:i("dir"),id:Bv(a)})},getThumbProps(){return t.element({...jl.thumb.attrs,...p,dir:i("dir"),id:rL(a),"aria-hidden":!0})},getControlProps(){return t.element({...jl.control.attrs,...p,dir:i("dir"),id:sL(a),"aria-hidden":!0})},getHiddenInputProps(){return t.input({id:vp(a),type:"checkbox",required:i("required"),defaultChecked:c,disabled:r,"aria-labelledby":Bv(a),"aria-invalid":i("invalid"),name:i("name"),form:i("form"),value:i("value"),style:Ud,onFocus(){const m=Vs();o({type:"CONTEXT.SET",context:{focused:!0,focusVisible:m}})},onBlur(){o({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(m){if(s){m.preventDefault();return}const g=m.currentTarget.checked;o({type:"CHECKED.SET",checked:g,isTrusted:!0})}})}}}var{not:zv}=kt(),dL={props({props:e}){return{defaultChecked:!1,label:"switch",value:"on",...e}},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}))}},computed:{isDisabled:({context:e,prop:t})=>t("disabled")||e.get("fieldsetDisabled")},watch({track:e,prop:t,context:n,action:o}){e([()=>t("disabled")],()=>{o(["removeFocusIfNeeded"])}),e([()=>n.get("checked")],()=>{o(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:zv("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:zv("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({computed:e,scope:t,context:n}){if(!e("isDisabled"))return ax({pointerNode:lL(t),keyboardNode:za(t),isValidKey:o=>o.key===" ",onPress:()=>n.set("active",!1),onPressStart:()=>n.set("active",!0),onPressEnd:()=>n.set("active",!1)})},trackFocusVisible({computed:e,scope:t}){if(!e("isDisabled"))return eu({root:t.getRootNode()})},trackFormControlState({context:e,send:t,scope:n}){return lr(za(n),{onFieldsetDisabledChange(o){e.set("fieldsetDisabled",o)},onFormReset(){const o=e.initial("checked");t({type:"CHECKED.SET",checked:!!o,src:"form-reset"})}})}},actions:{setContext({context:e,event:t}){for(const n in t.context)e.set(n,t.context[n])},syncInputElement({context:e,scope:t}){const n=za(t);n&&rf(n,!!e.get("checked"))},removeFocusIfNeeded({context:e,prop:t}){t("disabled")&&e.set("focused",!1)},setChecked({context:e,event:t}){e.set("checked",t.checked)},toggleChecked({context:e}){e.set("checked",!e.get("checked"))},dispatchChangeEvent({context:e,scope:t}){const n=za(t);q0(n,{checked:e.get("checked")})}}}};ae()(["checked","defaultChecked","dir","disabled","form","getRootNode","id","ids","invalid","label","name","onCheckedChange","readOnly","required","value"]);const uL=(e={},t)=>{const n=Mt(),o=Kt(Zt),i=pn(hn),a=ro(),r=E(()=>{const l=qe(e);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,...On(l),onCheckedChange(c){var d;t?.("checkedChange",c),t?.("update:checked",c.checked),(d=l.onCheckedChange)==null||d.call(l,c)}}}),s=Nt(dL,r);return E(()=>cL(s,Yt))},hL=T({__name:"switch-root",props:dn({checked:{type:Boolean},defaultChecked:{type:Boolean},disabled:{type:Boolean},form:{},id:{},ids:{},invalid:{type:Boolean},label:{},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=uL(e,t);return Hw(n),Y(),(o,i)=>(x(),$(f(K).label,z(f(n).getRootProps(),{"as-child":e.asChild}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["as-child"]))}}),pL=T({__name:"switch-thumb",props:{asChild:{type:Boolean}},setup(e){const t=ul();return Y(),(n,o)=>(x(),$(f(K).span,z(f(t).getThumbProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),Mr=Object.freeze(Object.defineProperty({__proto__:null,Context:tL,Control:nL,HiddenInput:oL,Label:iL,Root:hL,RootProvider:aL,Thumb:pL},Symbol.toStringTag,{value:"Module"}));var Uw=be("tabs").parts("root","list","trigger","content","indicator");Uw.build();ae()(["activationMode","composite","deselectable","dir","getRootNode","id","ids","loopFocus","navigate","onFocusChange","onValueChange","orientation","translations","value","defaultValue"]);ae()(["disabled","value"]);ae()(["value"]);var fL=be("tagsInput").parts("root","label","control","input","clearTrigger","item","itemPreview","itemInput","itemText","itemDeleteTrigger");fL.build();var gL=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`tags-input:${e.id}`},mL=e=>{var t;return((t=e.ids)==null?void 0:t.input)??`tags-input:${e.id}:input`},vL=e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`tags-input:${e.id}:hidden-input`},bp=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.item)==null?void 0:o.call(n,t))??`tags-input:${e.id}:tag:${t.value}:${t.index}`},bL=(e,t)=>{var n,o;return((o=(n=e.ids)==null?void 0:n.itemInput)==null?void 0:o.call(n,t))??`${bp(e,t)}:input`},yL=e=>`${e}:input`,Hv=(e,t)=>e.getById(yL(t)),xL=e=>ai(Gw(e),"[data-part=item]"),wL=(e,t)=>e.getById(bL(e,t)),Gw=e=>e.getById(gL(e)),Nr=e=>e.getById(mL(e)),qw=e=>e.getById(vL(e)),Xi=e=>ai(Gw(e),"[data-part=item-preview]:not([data-disabled])"),CL=e=>Xi(e)[0],_L=e=>Xi(e)[Xi(e).length-1],kL=(e,t)=>hf(Xi(e),t,!1),$L=(e,t)=>uf(Xi(e),t,!1),SL=(e,t)=>Xi(e)[t],Lr=(e,t)=>Wd(Xi(e),t),EL=(e,t)=>{const n=qw(e);n&&G0(n,{value:t})},{and:Fr,not:$i,or:OL}=kt();Fr(OL($i("isAtMax"),"allowOverflow"),$i("isInputValueEmpty")),$i("hasHighlightedTag"),Fr("hasTags","isCaretAtStart"),Fr("hasTags","isCaretAtStart"),Fr("hasTags","isCaretAtStart",$i("isLastTagHighlighted")),$i("isCaretAtStart"),Fr("isTagEditable","hasHighlightedTag"),$i("isCaretAtStart"),$i("isCaretAtStart");ae()(["addOnPaste","allowOverflow","autoFocus","blurBehavior","delimiter","dir","disabled","editable","form","getRootNode","id","ids","inputValue","invalid","max","maxLength","name","onFocusOutside","onHighlightChange","onInputValueChange","onInteractOutside","onPointerDownOutside","onValueChange","onValueInvalid","required","readOnly","translations","validate","value","defaultValue","defaultInputValue"]);ae()(["index","disabled","value"]);var TL=be("timer").parts("root","area","control","item","itemValue","itemLabel","actionTrigger","separator");TL.build();ae()(["autoStart","countdown","getRootNode","id","ids","interval","onComplete","onTick","startMs","targetMs"]);var Yw=be("toast").parts("group","root","title","description","actionTrigger","closeTrigger"),Ia=Yw.build(),IL=e=>`toast-group:${e}`,jv=(e,t)=>e.getById(`toast-group:${t}`),Kw=e=>`toast:${e.id}`,Wv=e=>e.getById(Kw(e)),Uv=e=>`toast:${e.id}:title`,Gv=e=>`toast:${e.id}:description`,PL=e=>`toast${e.id}:close`,qv={info:5e3,error:5e3,success:2e3,loading:1/0,DEFAULT:5e3};function oh(e,t){return e??qv[t]??qv.DEFAULT}var DL=e=>typeof e=="string"?{left:e,right:e,bottom:e,top:e}:e;function AL(e,t){var n;const{prop:o,computed:i,context:a}=e,{offsets:r,gap:s}=o("store").attrs,l=a.get("heights"),c=DL(r),d=o("dir")==="rtl",u=t.replace("-start",d?"-right":"-left").replace("-end",d?"-left":"-right"),h=u.includes("right"),p=u.includes("left"),m={position:"fixed",pointerEvents:i("count")>0?void 0:"none",display:"flex",flexDirection:"column","--gap":`${s}px`,"--first-height":`${((n=l[0])==null?void 0:n.height)||0}px`,zIndex:L0};let g="center";if(h&&(g="flex-end"),p&&(g="flex-start"),m.alignItems=g,u.includes("top")){const b=c.top;m.top=`max(env(safe-area-inset-top, 0px), ${b})`}if(u.includes("bottom")){const b=c.bottom;m.bottom=`max(env(safe-area-inset-bottom, 0px), ${b})`}if(!u.includes("left")){const b=c.right;m.insetInlineEnd=`calc(env(safe-area-inset-right, 0px) + ${b})`}if(!u.includes("right")){const b=c.left;m.insetInlineStart=`calc(env(safe-area-inset-left, 0px) + ${b})`}return m}function RL(e,t){const{prop:n,context:o,computed:i}=e,a=n("parent"),r=a.computed("placement"),{gap:s}=a.prop("store").attrs,[l]=r.split("-"),c=o.get("mounted"),d=o.get("remainingTime"),u=i("height"),h=i("frontmost"),p=!h,m=!n("stacked"),g=n("stacked"),b=n("type")==="loading"?Number.MAX_SAFE_INTEGER:d,v=i("heightIndex")*s+i("heightBefore"),y={position:"absolute",pointerEvents:"auto","--opacity":"0","--remove-delay":`${n("removeDelay")}ms`,"--duration":`${b}ms`,"--initial-height":`${u}px`,"--offset":`${v}px`,"--index":n("index"),"--z-index":i("zIndex"),"--lift-amount":"calc(var(--lift) * var(--gap))","--y":"100%","--x":"0"},w=C=>Object.assign(y,C);return l==="top"?w({top:"0","--sign":"-1","--y":"-100%","--lift":"1"}):l==="bottom"&&w({bottom:"0","--sign":"1","--y":"100%","--lift":"-1"}),c&&(w({"--y":"0","--opacity":"1"}),g&&w({"--y":"calc(var(--lift) * var(--offset))","--height":"var(--initial-height)"})),t||w({"--opacity":"0",pointerEvents:"none"}),p&&m&&(w({"--base-scale":"var(--index) * 0.05 + 1","--y":"calc(var(--lift-amount) * var(--index))","--scale":"calc(-1 * var(--base-scale))","--height":"var(--first-height)"}),t||w({"--y":"calc(var(--sign) * 40%)"})),p&&g&&!t&&w({"--y":"calc(var(--lift) * var(--offset) + var(--lift) * -100%)"}),h&&!t&&w({"--y":"calc(var(--lift) * -100%)"}),y}function VL(e,t){const{computed:n}=e,o={position:"absolute",inset:"0",scale:"1 2",pointerEvents:t?"none":"auto"},i=a=>Object.assign(o,a);return n("frontmost")&&!t&&i({height:"calc(var(--initial-height) + 80%)"}),o}function ML(){return{position:"absolute",left:"0",height:"calc(var(--gap) + 2px)",bottom:"100%",width:"100%"}}function NL(e,t){const{context:n,prop:o,send:i,refs:a,computed:r}=e;return{getCount(){return n.get("toasts").length},getToasts(){return n.get("toasts")},getGroupProps(s={}){const{label:l="Notifications"}=s,{hotkey:c}=o("store").attrs,d=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),u=r("placement"),[h,p="center"]=u.split("-");return t.element({...Ia.group.attrs,dir:o("dir"),tabIndex:-1,"aria-label":`${u} ${l} ${d}`,id:IL(u),"data-placement":u,"data-side":h,"data-align":p,"aria-live":"polite",role:"region",style:AL(e,u),onMouseEnter(){a.get("ignoreMouseTimer").isActive()||i({type:"REGION.POINTER_ENTER",placement:u})},onMouseMove(){a.get("ignoreMouseTimer").isActive()||i({type:"REGION.POINTER_ENTER",placement:u})},onMouseLeave(){a.get("ignoreMouseTimer").isActive()||i({type:"REGION.POINTER_LEAVE",placement:u})},onFocus(m){i({type:"REGION.FOCUS",target:m.relatedTarget})},onBlur(m){a.get("isFocusWithin")&&!Rt(m.currentTarget,m.relatedTarget)&&queueMicrotask(()=>i({type:"REGION.BLUR"}))}})},subscribe(s){return o("store").subscribe(()=>s(n.get("toasts")))}}}var{guards:LL,createMachine:FL}=Yd(),{and:BL}=LL,zL=FL({props({props:e}){return{dir:"ltr",id:hx(),...e,store:e.store}},initialState({prop:e}){return e("store").attrs.overlap?"overlap":"stack"},refs(){return{lastFocusedEl:null,isFocusWithin:!1,isPointerWithin:!1,ignoreMouseTimer:J0.create(),dismissableCleanup:void 0}},context({bindable:e}){return{toasts:e(()=>({defaultValue:[],sync:!0,hash:t=>t.map(n=>n.id).join(",")})),heights:e(()=>({defaultValue:[],sync:!0}))}},computed:{count:({context:e})=>e.get("toasts").length,overlap:({prop:e})=>e("store").attrs.overlap,placement:({prop:e})=>e("store").attrs.placement},effects:["subscribeToStore","trackDocumentVisibility","trackHotKeyPress"],watch({track:e,context:t,action:n}){e([()=>t.hash("toasts")],()=>{queueMicrotask(()=>{n(["collapsedIfEmpty","setDismissableBranch"])})})},exit:["clearDismissableBranch","clearLastFocusedEl","clearMouseEventTimer"],on:{"DOC.HOTKEY":{actions:["focusRegionEl"]},"REGION.BLUR":[{guard:BL("isOverlapping","isPointerOut"),target:"overlap",actions:["collapseToasts","resumeToasts","restoreFocusIfPointerOut"]},{guard:"isPointerOut",target:"stack",actions:["resumeToasts","restoreFocusIfPointerOut"]},{actions:["clearFocusWithin"]}],"TOAST.REMOVE":{actions:["removeToast","removeHeight","ignoreMouseEventsTemporarily"]},"TOAST.PAUSE":{actions:["pauseToasts"]}},states:{stack:{on:{"REGION.POINTER_LEAVE":[{guard:"isOverlapping",target:"overlap",actions:["clearPointerWithin","resumeToasts","collapseToasts"]},{actions:["clearPointerWithin","resumeToasts"]}],"REGION.OVERLAP":{target:"overlap",actions:["collapseToasts"]},"REGION.FOCUS":{actions:["setLastFocusedEl","pauseToasts"]},"REGION.POINTER_ENTER":{actions:["setPointerWithin","pauseToasts"]}}},overlap:{on:{"REGION.STACK":{target:"stack",actions:["expandToasts"]},"REGION.POINTER_ENTER":{target:"stack",actions:["setPointerWithin","pauseToasts","expandToasts"]},"REGION.FOCUS":{target:"stack",actions:["setLastFocusedEl","pauseToasts","expandToasts"]}}}},implementations:{guards:{isOverlapping:({computed:e})=>e("overlap"),isPointerOut:({refs:e})=>!e.get("isPointerWithin")},effects:{subscribeToStore({context:e,prop:t}){return t("store").subscribe(n=>{if(n.dismiss){e.set("toasts",o=>o.filter(i=>i.id!==n.id));return}e.set("toasts",o=>{const i=o.findIndex(a=>a.id===n.id);return i!==-1?[...o.slice(0,i),{...o[i],...n},...o.slice(i+1)]:[n,...o]})})},trackHotKeyPress({prop:e,send:t}){return Ee(document,"keydown",n=>{const{hotkey:o}=e("store").attrs;o.every(i=>n[i]||n.code===i)&&t({type:"DOC.HOTKEY"})},{capture:!0})},trackDocumentVisibility({prop:e,send:t,scope:n}){const{pauseOnPageIdle:o}=e("store").attrs;if(!o)return;const i=n.getDoc();return Ee(i,"visibilitychange",()=>{const a=i.visibilityState==="hidden";t({type:a?"PAUSE_ALL":"RESUME_ALL"})})}},actions:{setDismissableBranch({refs:e,context:t,computed:n,scope:o}){var i;const a=t.get("toasts"),r=n("placement"),s=a.length>0;if(!s){(i=e.get("dismissableCleanup"))==null||i();return}if(s&&e.get("dismissableCleanup"))return;const l=Ax(()=>jv(o,r),{defer:!0});e.set("dismissableCleanup",l)},clearDismissableBranch({refs:e}){var t;(t=e.get("dismissableCleanup"))==null||t()},focusRegionEl({scope:e,computed:t}){queueMicrotask(()=>{var n;(n=jv(e,t("placement")))==null||n.focus()})},pauseToasts({prop:e}){e("store").pause()},resumeToasts({prop:e}){e("store").resume()},expandToasts({prop:e}){e("store").expand()},collapseToasts({prop:e}){e("store").collapse()},removeToast({prop:e,event:t}){e("store").remove(t.id)},removeHeight({event:e,context:t}){e?.id!=null&&queueMicrotask(()=>{t.set("heights",n=>n.filter(o=>o.id!==e.id))})},collapsedIfEmpty({send:e,computed:t}){!t("overlap")||t("count")>1||e({type:"REGION.OVERLAP"})},setLastFocusedEl({refs:e,event:t}){e.get("isFocusWithin")||!t.target||(e.set("isFocusWithin",!0),e.set("lastFocusedEl",t.target))},restoreFocusIfPointerOut({refs:e}){var t;!e.get("lastFocusedEl")||e.get("isPointerWithin")||((t=e.get("lastFocusedEl"))==null||t.focus({preventScroll:!0}),e.set("lastFocusedEl",null),e.set("isFocusWithin",!1))},setPointerWithin({refs:e}){e.set("isPointerWithin",!0)},clearPointerWithin({refs:e}){var t;e.set("isPointerWithin",!1),e.get("lastFocusedEl")&&!e.get("isFocusWithin")&&((t=e.get("lastFocusedEl"))==null||t.focus({preventScroll:!0}),e.set("lastFocusedEl",null))},clearFocusWithin({refs:e}){e.set("isFocusWithin",!1)},clearLastFocusedEl({refs:e}){var t;e.get("lastFocusedEl")&&((t=e.get("lastFocusedEl"))==null||t.focus({preventScroll:!0}),e.set("lastFocusedEl",null),e.set("isFocusWithin",!1))},ignoreMouseEventsTemporarily({refs:e}){e.get("ignoreMouseTimer").request()},clearMouseEventTimer({refs:e}){e.get("ignoreMouseTimer").cancel()}}}});function HL(e,t){const{state:n,send:o,prop:i,scope:a,context:r,computed:s}=e,l=n.hasTag("visible"),c=n.hasTag("paused"),d=r.get("mounted"),u=s("frontmost"),h=i("parent").computed("placement"),p=i("type"),m=i("stacked"),g=i("title"),b=i("description"),v=i("action"),[y,w="center"]=h.split("-");return{type:p,title:g,description:b,placement:h,visible:l,paused:c,closable:!!i("closable"),pause(){o({type:"PAUSE"})},resume(){o({type:"RESUME"})},dismiss(){o({type:"DISMISS",src:"programmatic"})},getRootProps(){return t.element({...Ia.root.attrs,dir:i("dir"),id:Kw(a),"data-state":l?"open":"closed","data-type":p,"data-placement":h,"data-align":w,"data-side":y,"data-mounted":L(d),"data-paused":L(c),"data-first":L(u),"data-sibling":L(!u),"data-stack":L(m),"data-overlap":L(!m),role:"status","aria-atomic":"true","aria-describedby":b?Gv(a):void 0,"aria-labelledby":g?Uv(a):void 0,tabIndex:0,style:RL(e,l),onKeyDown(C){C.defaultPrevented||C.key=="Escape"&&(o({type:"DISMISS",src:"keyboard"}),C.preventDefault())}})},getGhostBeforeProps(){return t.element({"data-ghost":"before",style:VL(e,l)})},getGhostAfterProps(){return t.element({"data-ghost":"after",style:ML()})},getTitleProps(){return t.element({...Ia.title.attrs,id:Uv(a)})},getDescriptionProps(){return t.element({...Ia.description.attrs,id:Gv(a)})},getActionTriggerProps(){return t.button({...Ia.actionTrigger.attrs,type:"button",onClick(C){var k;C.defaultPrevented||((k=v?.onClick)==null||k.call(v),o({type:"DISMISS",src:"user"}))}})},getCloseTriggerProps(){return t.button({id:PL(a),...Ia.closeTrigger.attrs,type:"button","aria-label":"Dismiss notification",onClick(C){C.defaultPrevented||o({type:"DISMISS",src:"user"})}})}}}var{not:jL}=kt(),WL={props({props:e}){return ff(e,["id","type","parent","removeDelay"],"toast"),{closable:!0,...e,duration:oh(e.duration,e.type)}},initialState({prop:e}){return e("type")==="loading"||e("duration")===1/0?"visible:persist":"visible"},context({prop:e,bindable:t}){return{remainingTime:t(()=>({defaultValue:oh(e("duration"),e("type"))})),createdAt:t(()=>({defaultValue:Date.now()})),mounted:t(()=>({defaultValue:!1})),initialHeight:t(()=>({defaultValue:0}))}},refs(){return{closeTimerStartTime:Date.now(),lastCloseStartTimerStartTime:0}},computed:{zIndex:({prop:e})=>{const t=e("parent").context.get("toasts"),n=t.findIndex(o=>o.id===e("id"));return t.length-n},height:({prop:e})=>{const t=e("parent").context.get("heights").find(n=>n.id===e("id"));return t?.height??0},heightIndex:({prop:e})=>e("parent").context.get("heights").findIndex(t=>t.id===e("id")),frontmost:({prop:e})=>e("index")===0,heightBefore:({prop:e})=>{const t=e("parent").context.get("heights"),n=t.findIndex(o=>o.id===e("id"));return t.reduce((o,i,a)=>a>=n?o:o+i.height,0)},shouldPersist:({prop:e})=>e("type")==="loading"||e("duration")===1/0},watch({track:e,prop:t,send:n}){e([()=>t("message")],()=>{const o=t("message");o&&n({type:o,src:"programmatic"})}),e([()=>t("type"),()=>t("duration")],()=>{n({type:"UPDATE"})})},on:{UPDATE:[{guard:"shouldPersist",target:"visible:persist",actions:["resetCloseTimer"]},{target:"visible:updating",actions:["resetCloseTimer"]}],MEASURE:{actions:["measureHeight"]}},entry:["setMounted","measureHeight","invokeOnVisible"],effects:["trackHeight"],states:{"visible:updating":{tags:["visible","updating"],effects:["waitForNextTick"],on:{SHOW:{target:"visible"}}},"visible:persist":{tags:["visible","paused"],on:{RESUME:{guard:jL("isLoadingType"),target:"visible",actions:["setCloseTimer"]},DISMISS:{target:"dismissing"}}},visible:{tags:["visible"],effects:["waitForDuration"],on:{DISMISS:{target:"dismissing"},PAUSE:{target:"visible:persist",actions:["syncRemainingTime"]}}},dismissing:{entry:["invokeOnDismiss"],effects:["waitForRemoveDelay"],on:{REMOVE:{target:"unmounted",actions:["notifyParentToRemove"]}}},unmounted:{entry:["invokeOnUnmount"]}},implementations:{effects:{waitForRemoveDelay({prop:e,send:t}){return Ru(()=>{t({type:"REMOVE",src:"timer"})},e("removeDelay"))},waitForDuration({send:e,context:t,computed:n}){if(!n("shouldPersist"))return Ru(()=>{e({type:"DISMISS",src:"timer"})},t.get("remainingTime"))},waitForNextTick({send:e}){return Ru(()=>{e({type:"SHOW",src:"timer"})},0)},trackHeight({scope:e,prop:t}){let n;return ue(()=>{const o=Wv(e);if(!o)return;const i=()=>{const s=o.style.height;o.style.height="auto";const l=o.getBoundingClientRect().height;o.style.height=s;const c={id:t("id"),height:l};Yv(t("parent"),c)},a=e.getWin(),r=new a.MutationObserver(i);r.observe(o,{childList:!0,subtree:!0,characterData:!0}),n=()=>r.disconnect()}),()=>n?.()}},guards:{isLoadingType:({prop:e})=>e("type")==="loading",shouldPersist:({computed:e})=>e("shouldPersist")},actions:{setMounted({context:e}){ue(()=>{e.set("mounted",!0)})},measureHeight({scope:e,prop:t,context:n}){queueMicrotask(()=>{const o=Wv(e);if(!o)return;const i=o.style.height;o.style.height="auto";const a=o.getBoundingClientRect().height;o.style.height=i,n.set("initialHeight",a);const r={id:t("id"),height:a};Yv(t("parent"),r)})},setCloseTimer({refs:e}){e.set("closeTimerStartTime",Date.now())},resetCloseTimer({context:e,refs:t,prop:n}){t.set("closeTimerStartTime",Date.now()),e.set("remainingTime",oh(n("duration"),n("type")))},syncRemainingTime({context:e,refs:t}){e.set("remainingTime",n=>{const o=t.get("closeTimerStartTime"),i=Date.now()-o;return t.set("lastCloseStartTimerStartTime",Date.now()),n-i})},notifyParentToRemove({prop:e}){e("parent").send({type:"TOAST.REMOVE",id:e("id")})},invokeOnDismiss({prop:e,event:t}){var n;(n=e("onStatusChange"))==null||n({status:"dismissing",src:t.src})},invokeOnUnmount({prop:e}){var t;(t=e("onStatusChange"))==null||t({status:"unmounted"})},invokeOnVisible({prop:e}){var t;(t=e("onStatusChange"))==null||t({status:"visible"})}}}};function Yv(e,t){const{id:n,height:o}=t;e.context.set("heights",i=>i.find(a=>a.id===n)?i.map(a=>a.id===n?{...a,height:o}:a):[{id:n,height:o},...i])}var UL=(e,t)=>({...t,...qd(e)});function GL(e={}){const t=UL(e,{placement:"bottom",overlap:!1,max:24,gap:16,offsets:"1rem",hotkey:["altKey","KeyT"],removeDelay:200,pauseOnPageIdle:!0});let n=[],o=[],i=new Set,a=[];const r=h=>(n.push(h),()=>{const p=n.indexOf(h);n.splice(p,1)}),s=h=>(n.forEach(p=>p(h)),h),l=h=>{if(o.length>=t.max){a.push(h);return}s(h),o.unshift(h)},c=()=>{for(;a.length>0&&o.length<t.max;){const h=a.shift();h&&(s(h),o.unshift(h))}},d=h=>{const p=h.id??`toast:${hx()}`,m=o.find(g=>g.id===p);return i.has(p)&&i.delete(p),m?o=o.map(g=>g.id===p?s({...g,...h,id:p}):g):l({id:p,duration:t.duration,removeDelay:t.removeDelay,type:"info",...h,stacked:!t.overlap,gap:t.gap}),p},u=h=>(i.add(h),h?(n.forEach(p=>p({id:h,dismiss:!0})),o=o.filter(p=>p.id!==h),c()):(o.forEach(p=>{n.forEach(m=>m({id:p.id,dismiss:!0}))}),o=[],a=[]),h);return{attrs:t,subscribe:r,create:d,update:(h,p)=>d({id:h,...p}),remove:u,dismiss:h=>{h!=null?o=o.map(p=>p.id===h?s({...p,message:"DISMISS"}):p):o=o.map(p=>s({...p,message:"DISMISS"}))},error:h=>d({...h,type:"error"}),success:h=>d({...h,type:"success"}),info:h=>d({...h,type:"info"}),warning:h=>d({...h,type:"warning"}),loading:h=>d({...h,type:"loading"}),getVisibleToasts:()=>o.filter(h=>!i.has(h.id)),getCount:()=>o.length,promise:(h,p,m={})=>{if(!p||!p.loading){Do("[zag-js > toast] toaster.promise() requires at least a 'loading' option to be specified");return}const g=d({...m,...p.loading,promise:h,type:"loading"});let b=!0,v;const y=yl(h).then(async w=>{if(v=["resolve",w],qL(w)&&!w.ok){b=!1;const C=yl(p.error,`HTTP Error! status: ${w.status}`);d({...m,...C,id:g,type:"error"})}else if(p.success!==void 0){b=!1;const C=yl(p.success,w);d({...m,...C,id:g,type:"success"})}}).catch(async w=>{if(v=["reject",w],p.error!==void 0){b=!1;const C=yl(p.error,w);d({...m,...C,id:g,type:"error"})}}).finally(()=>{var w;b&&u(g),(w=p.finally)==null||w.call(p)});return{id:g,unwrap:()=>new Promise((w,C)=>y.then(()=>v[0]==="reject"?C(v[1]):w(v[1])).catch(C))}},pause:h=>{h!=null?o=o.map(p=>p.id===h?s({...p,message:"PAUSE"}):p):o=o.map(p=>s({...p,message:"PAUSE"}))},resume:h=>{h!=null?o=o.map(p=>p.id===h?s({...p,message:"RESUME"}):p):o=o.map(p=>s({...p,message:"RESUME"}))},isVisible:h=>!i.has(h)&&!!o.find(p=>p.id===h),isDismissed:h=>i.has(h),expand:()=>{o=o.map(h=>s({...h,stacked:!0}))},collapse:()=>{o=o.map(h=>s({...h,stacked:!1}))}}}var qL=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Kv={connect:NL,machine:zL};const YL=e=>GL(e),[KL,Zw]=Pe("ToastContext"),ZL=T({__name:"toast-root",props:{asChild:{type:Boolean}},setup(e){const t=Zw();return Y(),(n,o)=>(x(),$(f(K).div,z(f(t).getRootProps(),{"as-child":e.asChild}),{default:_(()=>[N("div",st(mt(f(t).getGhostBeforeProps())),null,16),R(n.$slots,"default"),N("div",st(mt(f(t).getGhostAfterProps())),null,16)]),_:3},16,["as-child"]))}}),XL=T({__name:"toast-title",props:{asChild:{type:Boolean}},setup(e){const t=Zw();return Y(),(n,o)=>(x(),$(f(K).div,z(f(t).getTitleProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),JL=T({__name:"toaster-item",props:{value:{},index:{},parent:{}},setup(e){const t=e,n=Kt(Zt),o=E(()=>({...t.value,index:t.index,parent:t.parent,getRootNode:n?.value.getRootNode})),i=Nt(WL,o),a=E(()=>HL(i,Yt));return KL(a),Y(),(r,s)=>R(r.$slots,"default",st(mt(t.value)))}}),QL=T({__name:"toaster",props:{toaster:{},asChild:{type:Boolean}},setup(e){const t=e,n=pn(hn),o=Kt(Zt),i=Nt(Kv.machine,{store:t.toaster,id:Mt(),dir:n?.value.dir,getRootNode:o?.value.getRootNode}),a=E(()=>Kv.connect(i,Yt));return Y(),(r,s)=>(x(),$(f(K).div,st(mt(a.value.getGroupProps())),{default:_(()=>[(x(!0),D($e,null,Ie(a.value.getToasts(),(l,c)=>(x(),$(JL,{key:l.id,value:l,parent:f(i),index:c},{default:_(d=>[R(r.$slots,"default",z({ref_for:!0},d))]),_:3},8,["value","parent","index"]))),128))]),_:3},16))}});var e3=be("toggle",["root","indicator"]);e3.build();ae()(["defaultPressed","pressed","onPressedChange","disabled"]);const t3=be("toggle",["root","indicator"]);t3.build();var n3=be("toggle-group").parts("root","item");n3.build();var Xw=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`toggle-group:${e.id}`},Jw=e=>e.getById(Xw(e)),uu=e=>{const t=`[data-ownedby='${CSS.escape(Xw(e))}']:not([data-disabled])`;return ai(Jw(e),t)},Zv=e=>ja(uu(e)),o3=e=>Qs(uu(e)),i3=(e,t,n)=>uf(uu(e),t,n),a3=(e,t,n)=>hf(uu(e),t,n),{not:Xv,and:r3}=kt();Xv(r3("isClickFocus","isTabbingBackward")),Xv("isFirstToggleFocused");ae()(["dir","disabled","getRootNode","id","ids","loopFocus","multiple","onValueChange","orientation","rovingFocus","value","defaultValue","deselectable"]);ae()(["value","disabled"]);const[Qw,ur]=Pe("TooltipContext"),s3=T({__name:"tooltip-arrow-tip",props:{asChild:{type:Boolean}},setup(e){const t=ur();return Y(),(n,o)=>(x(),$(f(K).div,z(f(t).getArrowTipProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),l3=T({__name:"tooltip-arrow",props:{asChild:{type:Boolean}},setup(e){const t=ur();return Y(),(n,o)=>(x(),$(f(K).div,z(f(t).getArrowProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),c3=T({__name:"tooltip-content",props:{asChild:{type:Boolean}},setup(e){const t=ur(),n=Jd(),o=E(()=>oa(t.value.getContentProps(),n.value.presenceProps));return Y(),(i,a)=>f(n).unmounted?X("",!0):(x(),$(f(K).div,z({key:0},o.value,{"as-child":e.asChild}),{default:_(()=>[R(i.$slots,"default")]),_:3},16,["as-child"]))}}),d3=T({__name:"tooltip-context",setup(e){const t=ur();return(n,o)=>R(n.$slots,"default",st(mt(f(t))))}}),u3=T({__name:"tooltip-positioner",props:{asChild:{type:Boolean}},setup(e){const t=ur(),n=ia(),o=il(E(()=>({...n.value,present:t.value.open})));return Xd(o),Y(),(i,a)=>f(o).unmounted?X("",!0):(x(),$(f(K).div,z({key:0},f(t).getPositionerProps(),{"as-child":e.asChild}),{default:_(()=>[R(i.$slots,"default")]),_:3},16,["as-child"]))}}),h3=T({__name:"tooltip-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},setup(e){const t=e,n=E(()=>t.value);return Qw(n),En(E(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),Y(),(o,i)=>R(o.$slots,"default")}});var eC=be("tooltip").parts("trigger","arrow","arrowTip","positioner","content"),Br=eC.build(),tC=e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`tooltip:${e.id}:trigger`},p3=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`tooltip:${e.id}:content`},f3=e=>{var t;return((t=e.ids)==null?void 0:t.arrow)??`tooltip:${e.id}:arrow`},nC=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`tooltip:${e.id}:popper`},ih=e=>e.getById(tC(e)),Jv=e=>e.getById(nC(e)),bo=KS({id:null});function g3(e,t){const{state:n,context:o,send:i,scope:a,prop:r,event:s}=e,l=r("id"),c=!!r("aria-label"),d=n.matches("open","closing"),u=tC(a),h=p3(a),p=r("disabled"),m=Df({...r("positioning"),placement:o.get("currentPlacement")});return{open:d,setOpen(g){n.matches("open","closing")!==g&&i({type:g?"open":"close"})},reposition(g={}){i({type:"positioning.set",options:g})},getTriggerProps(){return t.button({...Br.trigger.attrs,id:u,dir:r("dir"),"data-expanded":L(d),"data-state":d?"open":"closed","aria-describedby":d?h:void 0,onClick(g){g.defaultPrevented||p||r("closeOnClick")&&i({type:"close",src:"trigger.click"})},onFocus(g){queueMicrotask(()=>{g.defaultPrevented||p||s.src!=="trigger.pointerdown"&&Vs()&&i({type:"open",src:"trigger.focus"})})},onBlur(g){g.defaultPrevented||p||l===bo.get("id")&&i({type:"close",src:"trigger.blur"})},onPointerDown(g){g.defaultPrevented||p||zi(g)&&r("closeOnPointerDown")&&l===bo.get("id")&&i({type:"close",src:"trigger.pointerdown"})},onPointerMove(g){g.defaultPrevented||p||g.pointerType!=="touch"&&i({type:"pointer.move"})},onPointerLeave(){p||i({type:"pointer.leave"})},onPointerCancel(){p||i({type:"pointer.leave"})}})},getArrowProps(){return t.element({id:f3(a),...Br.arrow.attrs,dir:r("dir"),style:m.arrow})},getArrowTipProps(){return t.element({...Br.arrowTip.attrs,dir:r("dir"),style:m.arrowTip})},getPositionerProps(){return t.element({id:nC(a),...Br.positioner.attrs,dir:r("dir"),style:m.floating})},getContentProps(){return t.element({...Br.content.attrs,dir:r("dir"),hidden:!d,"data-state":d?"open":"closed",role:c?void 0:"tooltip",id:c?void 0:h,"data-placement":o.get("currentPlacement"),onPointerEnter(){i({type:"content.pointer.move"})},onPointerLeave(){i({type:"content.pointer.leave"})},style:{pointerEvents:r("interactive")?"auto":"none"}})}}}var{and:m3,not:Qv}=kt(),v3={initialState:({prop:e})=>e("open")||e("defaultOpen")?"open":"closed",props({props:e}){const t=e.closeOnClick??!0,n=e.closeOnPointerDown??t;return{id:"x",openDelay:400,closeDelay:150,closeOnEscape:!0,interactive:!1,closeOnScroll:!0,disabled:!1,...e,closeOnPointerDown:n,closeOnClick:t,positioning:{placement:"bottom",...e.positioning}}},effects:["trackFocusVisible","trackStore"],context:({bindable:e})=>({currentPlacement:e(()=>({defaultValue:void 0})),hasPointerMoveOpened:e(()=>({defaultValue:!1}))}),watch({track:e,action:t,prop:n}){e([()=>n("disabled")],()=>{t(["closeIfDisabled"])}),e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{closed:{entry:["clearGlobalId"],on:{"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],"pointer.leave":{actions:["clearPointerMoveOpened"]},"pointer.move":[{guard:m3("noVisibleTooltip",Qv("hasPointerMoveOpened")),target:"opening"},{guard:Qv("hasPointerMoveOpened"),target:"open",actions:["setPointerMoveOpened","invokeOnOpen"]}]}},opening:{effects:["trackScroll","trackPointerlockChange","waitForOpenDelay"],on:{"after.openDelay":[{guard:"isOpenControlled",actions:["setPointerMoveOpened","invokeOnOpen"]},{target:"open",actions:["setPointerMoveOpened","invokeOnOpen"]}],"controlled.open":{target:"open"},"controlled.close":{target:"closed"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],"pointer.leave":[{guard:"isOpenControlled",actions:["clearPointerMoveOpened","invokeOnClose","toggleVisibility"]},{target:"closed",actions:["clearPointerMoveOpened","invokeOnClose"]}],close:[{guard:"isOpenControlled",actions:["invokeOnClose","toggleVisibility"]},{target:"closed",actions:["invokeOnClose"]}]}},open:{effects:["trackEscapeKey","trackScroll","trackPointerlockChange","trackPositioning"],entry:["setGlobalId"],on:{"controlled.close":{target:"closed"},close:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"pointer.leave":[{guard:"isVisible",target:"closing",actions:["clearPointerMoveOpened"]},{guard:"isOpenControlled",actions:["clearPointerMoveOpened","invokeOnClose"]},{target:"closed",actions:["clearPointerMoveOpened","invokeOnClose"]}],"content.pointer.leave":{guard:"isInteractive",target:"closing"},"positioning.set":{actions:["reposition"]}}},closing:{effects:["trackPositioning","waitForCloseDelay"],on:{"after.closeDelay":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"controlled.close":{target:"closed"},"controlled.open":{target:"open"},close:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"pointer.move":[{guard:"isOpenControlled",actions:["setPointerMoveOpened","invokeOnOpen","toggleVisibility"]},{target:"open",actions:["setPointerMoveOpened","invokeOnOpen"]}],"content.pointer.move":{guard:"isInteractive",target:"open"},"positioning.set":{actions:["reposition"]}}}},implementations:{guards:{noVisibleTooltip:()=>bo.get("id")===null,isVisible:({prop:e})=>e("id")===bo.get("id"),isInteractive:({prop:e})=>!!e("interactive"),hasPointerMoveOpened:({context:e})=>e.get("hasPointerMoveOpened"),isOpenControlled:({prop:e})=>e("open")!==void 0},actions:{setGlobalId:({prop:e})=>{bo.set("id",e("id"))},clearGlobalId:({prop:e})=>{e("id")===bo.get("id")&&bo.set("id",null)},invokeOnOpen:({prop:e})=>{var t;(t=e("onOpenChange"))==null||t({open:!0})},invokeOnClose:({prop:e})=>{var t;(t=e("onOpenChange"))==null||t({open:!1})},closeIfDisabled:({prop:e,send:t})=>{e("disabled")&&t({type:"close",src:"disabled.change"})},reposition:({context:e,event:t,prop:n,scope:o})=>{if(t.type!=="positioning.set")return;const i=()=>Jv(o);return cn(ih(o),i,{...n("positioning"),...t.options,defer:!0,listeners:!1,onComplete(a){e.set("currentPlacement",a.placement)}})},toggleVisibility:({prop:e,event:t,send:n})=>{queueMicrotask(()=>{n({type:e("open")?"controlled.open":"controlled.close",previousEvent:t})})},setPointerMoveOpened:({context:e})=>{e.set("hasPointerMoveOpened",!0)},clearPointerMoveOpened:({context:e})=>{e.set("hasPointerMoveOpened",!1)}},effects:{trackFocusVisible:({scope:e})=>{var t;return eu({root:(t=e.getRootNode)==null?void 0:t.call(e)})},trackPositioning:({context:e,prop:t,scope:n})=>{e.get("currentPlacement")||e.set("currentPlacement",t("positioning").placement);const o=()=>Jv(n);return cn(ih(n),o,{...t("positioning"),defer:!0,onComplete(i){e.set("currentPlacement",i.placement)}})},trackPointerlockChange:({send:e,scope:t})=>{const n=t.getDoc();return Ee(n,"pointerlockchange",()=>e({type:"close",src:"pointerlock:change"}),!1)},trackScroll:({send:e,prop:t,scope:n})=>{if(!t("closeOnScroll"))return;const o=ih(n);if(!o)return;const i=tx(o).map(a=>Ee(a,"scroll",()=>{e({type:"close",src:"scroll"})},{passive:!0,capture:!0}));return()=>{i.forEach(a=>a?.())}},trackStore:({prop:e,send:t})=>{let n;return queueMicrotask(()=>{n=bo.subscribe(()=>{bo.get("id")!==e("id")&&t({type:"close",src:"id.change"})})}),()=>n?.()},trackEscapeKey:({send:e,prop:t})=>t("closeOnEscape")?Ee(document,"keydown",n=>{Is(n)||n.key==="Escape"&&(n.stopPropagation(),e({type:"close",src:"keydown.escape"}))},!0):void 0,waitForOpenDelay:({send:e,prop:t})=>{const n=setTimeout(()=>{e({type:"after.openDelay"})},t("openDelay"));return()=>clearTimeout(n)},waitForCloseDelay:({send:e,prop:t})=>{const n=setTimeout(()=>{e({type:"after.closeDelay"})},t("closeDelay"));return()=>clearTimeout(n)}}}};ae()(["aria-label","closeDelay","closeOnEscape","closeOnPointerDown","closeOnScroll","closeOnClick","dir","disabled","getRootNode","id","ids","interactive","onOpenChange","defaultOpen","open","openDelay","positioning"]);const b3=(e={},t)=>{const n=Mt(),o=Kt(Zt),i=pn(hn),a=E(()=>{const s=qe(e);return{id:n,dir:i.value.dir,getRootNode:o?.value.getRootNode,...On(s),onOpenChange:l=>{var c;t?.("openChange",l),t?.("update:open",l.open),(c=s.onOpenChange)==null||c.call(s,l)}}}),r=Nt(v3,a);return E(()=>g3(r,Yt))},y3=T({__name:"tooltip-root",props:dn({"aria-label":{},closeDelay:{},closeOnClick:{type:Boolean},closeOnEscape:{type:Boolean},closeOnPointerDown:{type:Boolean},closeOnScroll:{type:Boolean},defaultOpen:{type:Boolean},disabled:{type:Boolean},id:{},ids:{},interactive:{type:Boolean},open:{type:Boolean},openDelay:{},positioning:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},{closeOnClick:void 0,closeOnEscape:void 0,closeOnPointerDown:void 0,closeOnScroll:void 0,defaultOpen:void 0,disabled:void 0,interactive:void 0,open:void 0}),emits:["openChange","update:open"],setup(e,{emit:t}){const n=e,o=b3(n,t);return Qw(o),En(E(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Y(),(i,a)=>R(i.$slots,"default")}}),x3=T({__name:"tooltip-trigger",props:{asChild:{type:Boolean}},setup(e){const t=ur();return Y(),(n,o)=>(x(),$(f(K).button,z(f(t).getTriggerProps(),{"as-child":e.asChild}),{default:_(()=>[R(n.$slots,"default")]),_:3},16,["as-child"]))}}),xa=Object.freeze(Object.defineProperty({__proto__:null,Arrow:l3,ArrowTip:s3,Content:c3,Context:d3,Positioner:u3,Root:y3,RootProvider:h3,Trigger:x3},Symbol.toStringTag,{value:"Module"}));var oC=be("tour").parts("content","actionTrigger","closeTrigger","progressText","title","description","positioner","arrow","arrowTip","backdrop","spotlight");oC.build();var w3=e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`tour-positioner-${e.id}`},C3=e=>{var t;return((t=e.ids)==null?void 0:t.content)??`tour-content-${e.id}`},_3=e=>{var t;return((t=e.ids)==null?void 0:t.backdrop)??`tour-backdrop-${e.id}`},Ac=e=>e.getById(C3(e)),iC=e=>e.getById(w3(e)),k3=e=>e.getById(_3(e));function $3(e){return ue(()=>{const t=Ac(e);if(!t)return;const n=ii(t),o=iC(e),i=k3(e);o&&(o.style.setProperty("--z-index",n.zIndex),o.style.setProperty("z-index","var(--z-index)")),i&&i.style.setProperty("--z-index",n.zIndex)})}var S3=e=>e?.type==="tooltip",E3=e=>e?.type==="dialog",O3=e=>e?.type==="wait",aC=e=>e.filter(t=>t.type!=="wait"),T3=(e,t)=>{const n=aC(e).length;return(t+1)/n},I3=e=>e.type==="floating"?{backdrop:!1,arrow:!1,placement:"bottom-end",...e}:e.target==null||e.type==="dialog"?{type:"dialog",placement:"center",backdrop:!0,...e}:!e.type||e.type==="tooltip"?{type:"tooltip",arrow:!0,backdrop:!0,...e}:e,P3=(e,t)=>{const n=t!=null?e.find(o=>o.id===t):null;return n?I3(n):null},gd=(e,t)=>t!=null?e.findIndex(n=>n.id===t):-1;function eb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var D3=e=>{let t=e.clientX,n=e.clientY,o=e.view||window,i=eb(o);for(;i;){const a=i.getBoundingClientRect(),r=getComputedStyle(i),s=a.left+(i.clientLeft+parseFloat(r.paddingLeft)),l=a.top+(i.clientTop+parseFloat(r.paddingTop));t+=s,n+=l,o=Ke(i),i=eb(o)}return{clientX:t,clientY:n}};function A3(e,t){const{clientX:n,clientY:o}=D3(t);return e.y<=o&&o<=e.y+e.height&&e.x<=n&&n<=e.x+e.width}function R3(e,t){const n=t.x||0,o=t.y||0;return{x:e.x-n,y:e.y-o,width:e.width+n+n,height:e.height+o+o}}var{and:ah}=kt();ah("isValidStep","hasResolvedTarget"),ah("isValidStep","hasTarget"),ah("isValidStep","isWaitingStep");var Uo=class{constructor(t){this.params=t}transitionToStep(t){const n=this.params.context.get("steps"),o=ms(t)?gd(n,t):t;this.transitionTo(o)}next(t){const n=this.params.context.get("steps"),o=td(n,t);this.transitionTo(o)}prev(t){const n=this.params.context.get("steps"),o=lx(n,t);this.transitionTo(o)}clear(){const{context:t}=this.params;t.set("targetRect",{width:0,height:0,x:0,y:0}),t.set("resolvedTarget",null),this.transitionTo(-1)}cleanupAll(){var t,n;const{refs:o,context:i}=this.params;(t=o.get("_targetCleanup"))==null||t(),o.set("_targetCleanup",void 0),o.set("_prevTarget",void 0),(n=o.get("_effectCleanup"))==null||n(),o.set("_effectCleanup",void 0),i.set("resolvedTarget",null)}cleanupStepEffect(){var t;const{refs:n}=this.params;n.get("_runningEffect")||((t=n.get("_effectCleanup"))==null||t(),n.set("_effectCleanup",void 0))}syncTarget(t){var n;const{refs:o,prop:i}=this.params,a=o.get("_prevTarget");if(t!==a&&((n=o.get("_targetCleanup"))==null||n(),o.set("_targetCleanup",void 0)),!t){o.set("_prevTarget",null);return}t!==a&&(i("preventInteraction")&&(t.inert=!0),t.setAttribute("data-tour-highlighted",""),o.set("_targetCleanup",()=>{i("preventInteraction")&&(t.inert=!1),t.removeAttribute("data-tour-highlighted")}),o.set("_prevTarget",t))}transitionTo(t){const{context:n,refs:o}=this.params,i=n.get("steps")[t];if(!i){n.set("stepId",null);return}if(xt(n.get("stepId"),i.id)){o.set("_runningEffect",!1);return}this.cleanup();const a=this.createUtilities(i,t);i.effect?this.executeEffect(i,a):a.show()}cleanup(){var t,n;const{refs:o}=this.params;(t=o.get("_effectCleanup"))==null||t(),o.set("_effectCleanup",void 0),(n=o.get("_targetCleanup"))==null||n(),o.set("_targetCleanup",void 0)}createUtilities(t,n){const{context:o,computed:i,prop:a}=this.params,r=o.get("steps");return{show:()=>{o.set("stepId",t.id)},update:s=>{o.set("steps",l=>l.map((c,d)=>d===n?{...c,...s}:c))},next:()=>{const s=td(r,i("stepIndex"));this.transitionTo(s)},goto:s=>{const l=gd(r,s);if(l===-1){Do(`[zag-js/tour] Step with id "${s}" not found`);return}this.transitionTo(l)},dismiss:()=>{var s;o.set("stepId",null),(s=a("onStatusChange"))==null||s({status:"dismissed",stepId:null,stepIndex:-1})},target:t.target}}executeEffect(t,n){const{refs:o}=this.params;o.set("_runningEffect",!0);let i;try{i=t.effect(n)}catch(a){o.set("_runningEffect",!1),console.error(a);return}o.set("_effectCleanup",i),O3(t)&&n.show(),queueMicrotask(()=>{queueMicrotask(()=>{o.set("_runningEffect",!1)})})}};ae()(["closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","keyboardNavigation","onFocusOutside","onInteractOutside","onPointerDownOutside","onStatusChange","onStepChange","onStepsChange","preventInteraction","spotlightOffset","spotlightRadius","stepId","steps","translations"]);oC.extendWith("control");ge({slots:["root","avatarWrapper","avatar","image","fallback","overflowWrapper","overflow","overflowText"],base:{root:{display:"flex",alignItems:"center"},avatarWrapper:{position:"relative",cursor:"pointer",transition:"all 0.2s ease-in-out","&:hover":{transform:"scale(1.05)",zIndex:"999 !important"},"&:focus":{outline:"none","& > div":{boxShadow:"state-focus-primary"},zIndex:"999 !important"},"&:active":{transform:"scale(0.95)"}},avatar:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"full",overflow:"hidden",background:"background.default",boxShadow:"stroke-bordered-interactive"},image:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",objectFit:"cover",zIndex:"1"},fallback:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",background:"#F2F2F5",color:"text.subtle",fontWeight:"medium",textAlign:"center",textTransform:"uppercase",userSelect:"none"},overflowWrapper:{position:"relative",cursor:"pointer",transition:"all 0.2s ease-in-out","&:hover":{transform:"scale(1.05)",zIndex:"999 !important"},"&:focus":{outline:"none","& > div":{boxShadow:"state-focus-primary"},zIndex:"999 !important"},"&:active":{transform:"scale(0.95)"}},overflow:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"full",background:"background.default",boxShadow:"stroke-bordered-interactive"},overflowText:{color:"text.subtle",fontWeight:"medium",textAlign:"center",userSelect:"none"}},variants:{size:{xs:{avatar:{width:"16",height:"16"},overflow:{width:"16",height:"16"},fallback:{textStyle:"body_xsmall_caps_medium"},overflowText:{textStyle:"body_xsmall_caps_medium"}},sm:{avatar:{width:"20",height:"20"},overflow:{width:"20",height:"20"},fallback:{textStyle:"body_xsmall_caps_medium"},overflowText:{textStyle:"body_xsmall_caps_medium"}},md:{avatar:{width:"24",height:"24"},overflow:{width:"24",height:"24"},fallback:{textStyle:"body_xsmall_caps_medium"},overflowText:{textStyle:"body_xsmall_caps_medium"}},lg:{avatar:{width:"32",height:"32"},overflow:{width:"32",height:"32"},fallback:{textStyle:"body_small_semibold"},overflowText:{textStyle:"body_small_semibold"}},xl:{avatar:{width:"40",height:"40"},overflow:{width:"40",height:"40"},fallback:{textStyle:"body_base_semibold"},overflowText:{textStyle:"body_base_semibold"}}}},defaultVariants:{size:"md"}});const V3={neutral:{backgroundColor:"graycoolalpha.10",color:"graycool.900",boxShadow:"none"},information:{backgroundColor:"blue.100",color:"seed.800"},feature:{backgroundColor:"purple.100",color:"purple.800",boxShadow:"0px 0px 0px 1px {colors.blackalpha.50} inset"},success:{backgroundColor:"green.100",color:"green.900"},warning:{backgroundColor:"orange.100",color:"orange.900"},critical:{backgroundColor:"red.100",color:"red.900"},ai:{backgroundColor:"purple.700",color:"whitealpha.1000"},new:{backgroundColor:"seed.700",color:"whitealpha.1000"},reserved:{backgroundColor:"blackalpha.900",color:"whitealpha.1000"},neutralCounter:{backgroundColor:"whitealpha.1000",color:"graycool.900"},criticalCounter:{backgroundColor:"red.700",color:"whitealpha.1000"}},M3=na({base:{display:"inline-flex",justifyContent:"center",alignItems:"center",gap:"4",borderRadius:"sm",textTransform:"uppercase",fontFamily:"sans",fontStyle:"normal",boxShadow:"0px 0px 0px 1px {colors.blackalpha.50} inset"},defaultVariants:{variant:"neutral",type:"decorative"},variants:{type:{decorative:{paddingTop:"6",paddingBottom:"6",paddingLeft:"12",paddingRight:"12",fontSize:"xs",fontWeight:"bold",letterSpacing:"widest",lineHeight:"xxs"},counter:{minWidth:"5",paddingTop:"2",paddingBottom:"2",paddingLeft:"4",paddingRight:"4",fontSize:"sm",fontWeight:"regular",letterSpacing:"tighter",lineHeight:"sm"}},variant:V3}}),N3=T({__name:"Badge",props:{variant:{default:"neutral"},type:{default:"decorative"}},setup(e){const t=e,n=E(()=>M3({variant:t.variant,type:t.type}));return(o,i)=>(x(),D("div",{class:M(n.value)},[R(o.$slots,"default")],2))}}),L3={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"};function F3(e,t){return x(),D("svg",L3,[...t[0]||(t[0]=[N("g",{"clip-path":"url(#clip0_2115_3244)"},[N("path",{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.29505 0.21967C3.43571 0.0790177 3.62647 0 3.82538 0H8.17463C8.37352 0 8.56433 0.0790177 8.70495 0.21967L11.7803 3.29505C11.9209 3.4357 12 3.62647 12 3.82538V8.17463C12 8.37352 11.9209 8.56433 11.7803 8.70495L8.70495 11.7803C8.56433 11.9209 8.37352 12 8.17463 12H3.82538C3.62647 12 3.43571 11.9209 3.29505 11.7803L0.219671 8.70495C0.0790178 8.56433 0 8.37352 0 8.17463V3.82538C0 3.62647 0.0790177 3.43571 0.21967 3.29505L3.29505 0.21967ZM6.5625 2.8125V3.375V6V6.5625H5.4375V6V3.375V2.8125H6.5625ZM6 9C6.41422 9 6.75 8.66422 6.75 8.25C6.75 7.83577 6.41422 7.5 6 7.5C5.58579 7.5 5.25 7.83577 5.25 8.25C5.25 8.66422 5.58579 9 6 9Z"})],-1),N("defs",null,[N("clipPath",{id:"clip0_2115_3244"},[N("rect",{width:"12",height:"12",fill:"currentColor"})])],-1)])])}const B3={render:F3};ge({className:"link",slots:["icon","text","root"],base:{root:{fontFamily:"sans",fontStyle:"normal",fontWeight:"semimedium",lineHeight:"lg",letterSpacing:"normal",textAlign:"center",cursor:"pointer",display:"inline-flex",alignItems:"center"},icon:{marginLeft:"4"}},variants:{size:{default:{root:{fontSize:"base"}},small:{root:{fontSize:"sm"}}},type:{default:{root:{color:"{colors.text.normal}",textDecoration:"none",_visited:{color:"{colors.text.muted}"},_hover:{color:"{colors.text.subtle}",textDecoration:"none"},_focus:{color:"{colors.text.normal}",textDecoration:"none",boxShadow:"state-focus-primary"},_disabled:{color:"{colors.text.disabled}",cursor:"not-allowed",textDecoration:"none",_hover:{color:"{colors.text.disabled}",textDecoration:"none"}}},icon:{_groupDisabled:{color:"{colors.text.disabled}"},_groupVisited:{color:"{colors.text.normal}"},_groupHover:{color:"{colors.text.normal}"}}},interactive:{root:{color:"seed.700",textDecoration:"none",_visited:{color:"purple.800"},_hover:{color:"seed.700",textDecorationLine:"underline",textDecorationColor:"seed.700",textDecorationStyle:"solid",textDecorationSkipInk:"none",textDecorationThickness:"auto"},_disabled:{color:"seed.600 ",cursor:"not-allowed",textDecoration:"none ",_hover:{color:"seed.600 ",textDecoration:"none "}}},icon:{_groupHover:{color:"seed.800"},_groupDisabled:{color:"seed.700"},_groupVisited:{color:"seed.700"}}}}},defaultVariants:{size:"default",type:"default"}});ge({className:"link",slots:["root","content","title","action","icon","separator","dismissibleIcon"],base:{root:{padding:"12",display:"flex",justifyContent:"space-between"},content:{fontFamily:"sans",fontStyle:"normal",fontSize:"base",lineHeight:"lg",letterSpacing:"normal"},title:{fontWeight:"semibold",fontFamily:"sans",fontStyle:"normal",fontSize:"base",lineHeight:"lg",letterSpacing:"normal"},action:{fontWeight:"medium",marginTop:"8"},icon:{height:"100%",marginRight:"8",display:"flex",alignItems:"start",marginTop:"8"},dismissibleIcon:{height:"100%",display:"flex",alignItems:"start",color:"icon.subtle"},separator:{height:"1px",width:"100%"}},variants:{type:{error:{root:{background:"background.error-default",boxShadow:"inner-highlighted-ring"},content:{color:"text.error-hover"},icon:{color:"icon.error-hover"},title:{color:"text.error-hover"},separator:{background:"border.error"}},info:{root:{background:"background.information-default",boxShadow:"inner-highlighted-ring"},content:{color:"text.information-hover"},title:{color:"text.information-hover"},icon:{color:"text.information-hover"},separator:{background:"border.information"}},success:{root:{background:"background.success-default",boxShadow:"inner-highlighted-ring"},content:{color:"text.success-hover"},title:{color:"text.success-hover"},icon:{color:"text.success-hover"},separator:{background:"border.success"}},emphasize:{root:{background:"background.discovery-default",boxShadow:"inner-highlighted-ring"},content:{color:"text.discovery-hover"},title:{color:"text.discovery-hover"},icon:{color:"text.discovery-hover"},separator:{background:"border.discovery"}},warning:{root:{background:"background.warning-default",boxShadow:"inner-highlighted-ring"},content:{color:"text.warning-hover"},title:{color:"text.warning-hover"},icon:{color:"text.warning-hover"},separator:{background:"border.warning"}},announcement:{root:{background:"background.neutral-default",boxShadow:"inner-highlighted-ring"},content:{color:"text.subtle"},title:{color:"text.subtle"},icon:{color:"text.subtle"},separator:{background:"border.bold"}}}},defaultVariants:{type:"error"}});const z3={default:{root:{backgroundColor:"icon.brand-default","--beacon-shadow-color":"var(--colors-seed-600)","--beacon-shadow-color-light":"var(--colors-seed-25)"}},done:{root:{backgroundColor:"icon.accent-green-default","--beacon-shadow-color":"var(--colors-green-600)","--beacon-shadow-color-light":"var(--colors-green-25)"}},error:{root:{backgroundColor:"icon.error-default","--beacon-shadow-color":"var(--colors-red-600)","--beacon-shadow-color-light":"var(--colors-red-25)"}},waiting:{root:{backgroundColor:"icon.disabled","--beacon-shadow-color":"var(--colors-graycoolalpha-75)","--beacon-shadow-color-light":"var(--colors-graycoolalpha-25)"}}},H3={small:{root:{width:"8",height:"8","--beacon-shadow-spread-radius":"8px"}},medium:{root:{width:"16",height:"16","--beacon-shadow-spread-radius":"16px"}},large:{root:{width:"24",height:"24","--beacon-shadow-spread-radius":"24px"}}};ge({slots:["root"],base:{root:{borderRadius:"full",backgroundColor:"plum.800",animation:"pulse-animation 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",boxShadow:"0px 0px 1px 1px var(--beacon-shadow-color)"}},variants:{variant:z3,size:H3,isAnimationDisabled:{true:{root:{animation:"none",boxShadow:"none"}}}},defaultVariants:{variant:"default",size:"small",isAnimationDisabled:!1}});const j3={xmlns:"http://www.w3.org/2000/svg",width:"6",height:"8",viewBox:"0 0 6 8",fill:"none"};function W3(e,t){return x(),D("svg",j3,[...t[0]||(t[0]=[N("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.86875 0.484377L2.33279 0.948477L4.80307 3.41878C5.14485 3.76049 5.14485 4.31451 4.80307 4.65622L2.33279 7.12654L1.86875 7.59058L0.940674 6.6625L1.40471 6.19846L3.56567 4.0375L1.40471 1.8765L0.940674 1.41249L1.86875 0.484377Z",fill:"#7E808A",style:{fill:"color(display-p3 0.4929 0.5038 0.5431)","fill-opacity":"1"}},null,-1)])])}const rC={render:W3},U3=ge({className:"breadcrumb",slots:["root","list","item","link","separator","current","icon","currentIcon"],base:{root:{display:"flex",alignItems:"center"},list:{display:"flex",alignItems:"center",gap:"4"},item:{display:"flex",alignItems:"center",gap:"4"},link:{display:"flex",alignItems:"center",gap:"4",fontFamily:"sans",fontSize:"13",fontWeight:"medium",lineHeight:"lg",color:"text.subtle",textDecoration:"none",cursor:"pointer",_hover:{textDecoration:"underline"}},separator:{display:"flex",alignItems:"center",color:"icon.subtle",justifyContent:"center",width:"20",height:"20"},current:{display:"flex",alignItems:"center",gap:"4",fontFamily:"sans",fontSize:"13",fontWeight:"medium",lineHeight:"lg",color:"text.normal"},icon:{display:"flex",alignItems:"center",width:"16",height:"16",color:"icon.subtle"},currentIcon:{display:"flex",alignItems:"center",width:"20",height:"20",color:"icon.normal"}},variants:{},defaultVariants:{}}),G3=["aria-label"],q3=T({__name:"Breadcrumb",props:{items:{},ariaLabel:{default:"Breadcrumb"}},emits:["click"],setup(e,{emit:t}){const n=e,o=t,i=E(()=>U3({})),a=s=>s===n.items.length-1,r=(s,l,c)=>{a(l)?c.preventDefault():o("click",s,l)};return(s,l)=>(x(),D("nav",{class:M(i.value.root),"aria-label":n.ariaLabel,"data-testid":"breadcrumb"},[N("ol",{class:M(i.value.list)},[(x(!0),D($e,null,Ie(e.items,(c,d)=>(x(),D("li",{key:d,class:M(i.value.item),"data-testid":"breadcrumb-item"},[(x(),$(gt(a(d)?"span":"a"),{class:M(a(d)?i.value.current:i.value.link),href:!a(d)&&c.url?c.url:void 0,"aria-current":a(d)?"page":void 0,"data-testid":"breadcrumb-link",onClick:u=>r(c,d,u)},{default:_(()=>[c.icon?(x(),$(gt(c.icon),{key:0,class:M(a(d)?i.value.currentIcon:i.value.icon),"data-testid":"breadcrumb-icon"},null,8,["class"])):X("",!0),Re(" "+ie(c.label),1)]),_:2},1032,["class","href","aria-current","onClick"])),a(d)?X("",!0):(x(),D("span",{key:0,class:M(i.value.separator),"aria-hidden":"true","data-testid":"breadcrumb-separator"},[F(f(rC))],2))],2))),128))],2)],10,G3))}});ge({slots:["root","content","prefix","suffix","label","rootWrapper","separator","separatorPlaceholder"],base:{rootWrapper:{boxShadow:"stroke-bordered",display:"inline-flex",borderRadius:"md"},separator:{width:"1px",height:"100%",marginTop:"0.125px",display:"flex",backgroundColor:"border.muted",position:"absolute",right:"-1",top:"0"},separatorPlaceholder:{width:"1",display:"flex"},root:{alignItems:"center",appearance:"none",cursor:"pointer",display:"inline-flex",isolation:"isolate",minWidth:"0",justifyContent:"center",outline:"none",position:"relative",userSelect:"none",verticalAlign:"middle",border:"none",fontWeight:"medium",fontFamily:"sans",lineHeight:"lg",whiteSpace:"nowrap",paddingY:"6",paddingX:"12",_hidden:{display:"none"},gap:"6"},content:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6"},prefix:{color:"inherit",display:"inline-flex",verticalAlign:"middle",justifyContent:"center"},label:{}},defaultVariants:{size:"default"},variants:{size:{default:{root:{...pt.default,height:"xxl",boxShadow:"none"},prefix:{width:"16",height:"16",fontSize:"base"}},small:{root:{...pt.default,height:"xl",fontSize:"sm",boxShadow:"none"},prefix:{width:"14",height:"14"}}}}});ge({slots:["root","content","chevron","prefix","container","separator","separatorPlaceholder","icon"],base:{container:{alignItems:"center",boxShadow:"stroke-bordered-interactive",display:"inline-flex",borderRadius:"md"},icon:{display:"inline-flex",verticalAlign:"middle",justifyContent:"center"},separator:{height:"100%",marginTop:"0.125px",display:"flex",position:"absolute",right:"-1",top:"0"},separatorPlaceholder:{display:"flex"},root:{alignItems:"center",appearance:"none",cursor:"pointer",display:"inline-flex",isolation:"isolate",minWidth:"0",justifyContent:"center",outline:"none",position:"relative",userSelect:"none",verticalAlign:"middle",border:"none",fontSize:"base",fontWeight:"medium",fontFamily:"sans",lineHeight:"lg",whiteSpace:"nowrap",gap:"6"},prefix:{display:"inline-flex",verticalAlign:"middle",justifyContent:"center"},content:{display:"flex",alignItems:"center",gap:"6"},chevron:{display:"inline-block",transition:"transform 0.3s ease",'&[data-open="true"]':{transform:"rotate(180deg)"}}},defaultVariants:{type:"primary",action:"primary",size:"default"},variants:{type:{primary:{root:{...pt.primary,boxShadow:"none"}},default:{root:{...pt.default,boxShadow:"none"}}},action:{primary:{root:{borderTopLeftRadius:"md",borderBottomLeftRadius:"md",borderTopRightRadius:"0",borderBottomRightRadius:"0"}},secondary:{root:{borderTopRightRadius:"md",borderBottomRightRadius:"md",borderTopLeftRadius:"0",borderBottomLeftRadius:"0",paddingX:"6",paddingY:"8"}}},size:{default:{root:{},chevron:{width:"16",height:"16"}},small:{chevron:{width:"14",height:"14"}}}},compoundVariants:[{action:"primary",size:"default",css:{root:{paddingX:"12",paddingY:"6"}}},{action:"primary",size:"small",css:{root:{paddingX:"8",paddingY:"0",height:"24"}}},{action:"secondary",size:"small",css:{root:{height:"24",paddingY:"6"}}},{type:"primary",action:"primary",css:{root:{boxShadow:"none"}}},{type:"primary",action:"secondary",css:{root:{boxShadow:"none",_focus:{},'&[data-open="true"]':{backgroundColor:"seed.900"}}}},{type:"default",action:"secondary",css:{root:{'&[data-open="true"]':{backgroundColor:"graycoolalpha.20"},_focusVisible:{color:"seed.800"}}}},{type:"default",action:"primary",css:{root:{_focusVisible:{color:"seed.800"}}}},{type:"default",css:{separator:{width:"1px",backgroundColor:"border.muted"},separatorPlaceholder:{width:"1px"}}},{type:"primary",css:{separator:{width:"1px",backgroundColor:"border.muted",right:"0"},separatorPlaceholder:{width:"0px"}}}]});const Y3={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none"};function K3(e,t){return x(),D("svg",Y3,[...t[0]||(t[0]=[N("path",{d:"M1.24033 3.98097L3.71905 6.45973C4.10957 6.85026 4.74274 6.85026 5.13326 6.45974L10.7599 0.833153",stroke:"currentColor",style:{stroke:"currentColor","stroke-opacity":"1"},"stroke-width":"1.5"},null,-1)])])}const sC={render:K3},Z3={width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function X3(e,t){return x(),D("svg",Z3,[...t[0]||(t[0]=[N("path",{id:"Vector",d:"M0 1.0361L8 0.963898",stroke:"currentColor",style:{stroke:"currentColor","stroke-opacity":"1"},"stroke-width":"1.5"},null,-1)])])}const J3={render:X3},Q3={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function eF(e,t){return x(),D("svg",Q3,[...t[0]||(t[0]=[N("g",{id:"icon-information","clip-path":"url(#clip0_2674_19124)"},[N("path",{id:"Vector","fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 12.6875C10.1412 12.6875 12.6875 10.1412 12.6875 7C12.6875 3.85888 10.1412 1.3125 7 1.3125C3.85888 1.3125 1.3125 3.85888 1.3125 7C1.3125 10.1412 3.85888 12.6875 7 12.6875ZM7 14C10.866 14 14 10.866 14 7C14 3.134 10.866 0 7 0C3.134 0 0 3.134 0 7C0 10.866 3.134 14 7 14ZM5.46875 6.125H6.125H6.78124C7.26449 6.125 7.65624 6.51676 7.65624 7V10.0625V10.7188H6.34374V10.0625V7.4375H6.125H5.46875V6.125ZM7 5.25C7.48325 5.25 7.875 4.85824 7.875 4.375C7.875 3.89176 7.48325 3.5 7 3.5C6.51676 3.5 6.125 3.89176 6.125 4.375C6.125 4.85824 6.51676 5.25 7 5.25Z",fill:"currentColor","fill-opacity":"0.75",style:{fill:"currentColor","fill-opacity":"0.75"}})],-1),N("defs",null,[N("clipPath",{id:"clip0_2674_19124"},[N("rect",{width:"14",height:"14",fill:"white",style:{fill:"white","fill-opacity":"1"}})])],-1)])])}const Ji={render:eF},tF=ge({className:"tooltip",slots:eC.keys(),base:{trigger:{backgroundColor:"transparent",border:"none",outline:"none",display:"flex",alignItems:"center",justifyContent:"center",padding:"0"},content:{fontFamily:"sans",fontSize:"sm",backgroundColor:"graycool.25",paddingLeft:"8",paddingRight:"8",paddingTop:"4",paddingBottom:"4",borderRadius:"sm",gap:"6",maxWidth:"200",color:"graycool.800",fontWeight:"regular",boxShadow:"0px 1px 3px 0px {colors.blackalpha.100}",border:"0.5px solid {colors.graycool.500}",_open:{animation:"fadeIn 0.25s ease-out"},_closed:{animation:"fadeOut 0.2s ease-out"}}}}),nF={key:0,class:"tooltip-content"},Jo=T({__name:"Tooltip",props:{placement:{default:"top"},title:{},"aria-label":{},closeDelay:{},closeOnClick:{type:Boolean},closeOnEscape:{type:Boolean},closeOnPointerDown:{type:Boolean},closeOnScroll:{type:Boolean},defaultOpen:{type:Boolean},disabled:{type:Boolean},id:{},ids:{},interactive:{type:Boolean},open:{type:Boolean},openDelay:{},positioning:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},setup(e){const t=e,n=E(()=>tF());return(o,i)=>(x(),$(f(xa).Root,{positioning:{placement:t.placement}},{default:_(()=>[F(f(xa).Trigger,{class:M(n.value.trigger)},{default:_(()=>[R(o.$slots,"default")]),_:3},8,["class"]),F(f(xa).Positioner,{class:M(n.value.positioner)},{default:_(()=>[F(f(xa).Content,{class:M(n.value.content)},{default:_(()=>[F(f(xa).Arrow,{class:M(n.value.arrow)},{default:_(()=>[F(f(xa).ArrowTip,{class:M(n.value.arrowTip)},null,8,["class"])]),_:1},8,["class"]),t.title?(x(),D("div",nF,ie(t.title),1)):R(o.$slots,"content",{key:1})]),_:3},8,["class"])]),_:3},8,["class"])]),_:3},8,["positioning"]))}}),oF=ge({className:"checkbox",slots:vf.keys(),base:{root:{alignItems:"center",display:"flex"},label:{color:"fg.default",fontSize:"base",fontWeight:"normal",fontFamily:"sans",paddingLeft:"8"},control:{alignItems:"center",borderWidth:"1px",cursor:"pointer",display:"flex",justifyContent:"center",transitionDuration:"normal",transitionProperty:"border-color, background",transitionTimingFunction:"default",width:"sm",height:"sm",borderRadius:"sm",boxShadow:"stroke-bordered-interactive","& svg":{width:"9.52",height:"6.33"},_hover:{background:"graycoolalpha.10"},_checked:{background:"seed.700",boxShadow:"inner-highlighted-ring",_hover:{background:"seed.800"},_disabled:{background:"graycoolalpha.20",boxShadow:"inner-highlighted-ring"}},_indeterminate:{background:"seed.700",boxShadow:"inner-highlighted-ring",_hover:{background:"seed.800"},"& svg":{width:"9.52"},_disabled:{background:"graycoolalpha.20",boxShadow:"inner-highlighted-ring"}},_focus:{boxShadow:"state-focus-primary"},_disabled:{color:"graycoolalpha.75",background:"graycoolalpha.20",cursor:"not-allowed",boxShadow:"inner-highlighted-ring",_hover:{color:"graycoolalpha.75",background:"graycoolalpha.20"}}},indicator:{color:"{colors.whitealpha.1000}",_checked:{"&:not(.indeterminate-icon)":{display:"flex",justifyContent:"center",alignItems:"center"}},_indeterminate:{"&.indeterminate-icon":{display:"flex",justifyContent:"center",alignItems:"center"}}}},defaultVariants:{type:"off"}}),iF={class:"checkbox-root"},aF={key:0,class:"checkbox-label-content"},rF={key:0,class:"checkbox-label-description"},sF=T({__name:"Checkbox",props:{disabled:{type:Boolean},checked:{},suffixIcon:{type:[Boolean,Function,Object]},description:{},iconTooltip:{},hasLabel:{type:Boolean,default:!0},defaultChecked:{},form:{},id:{},ids:{},invalid:{type:Boolean},name:{},readOnly:{type:Boolean},required:{type:Boolean},value:{},asChild:{type:Boolean},"aria-labelledby":{}},emits:["checkedChange","update:checked"],setup(e,{emit:t}){const n=e,o=t,i=oF();return(a,r)=>(x(),D("div",iF,[F(f(ma).Root,{class:M(f(i).root),checked:n.checked,disabled:n.disabled,"aria-labelledby":n["aria-labelledby"],onCheckedChange:r[0]||(r[0]=s=>o("checkedChange",s))},{default:_(()=>[F(f(ma).Control,{class:M(f(i).control)},{default:_(()=>[F(f(ma).Indicator,{class:M(f(i).indicator)},{default:_(()=>[F(f(sC))]),_:1},8,["class"]),F(f(ma).Indicator,{indeterminate:"",class:M([f(i).indicator,"indeterminate-icon"])},{default:_(()=>[F(f(J3))]),_:1},8,["class"])]),_:1},8,["class"]),n.hasLabel||e.iconTooltip?(x(),D("div",aF,[F(f(ma).Label,{class:M(f(i).label)},{default:_(()=>[R(a.$slots,"default",{},void 0,!0)]),_:3},8,["class"]),e.iconTooltip?(x(),$(Jo,{key:0,title:e.iconTooltip},{default:_(()=>[(x(),$(gt(e.suffixIcon&&f(Ji)),{class:"suffix-icon"}))]),_:1},8,["title"])):(x(),$(gt(e.suffixIcon&&f(Ji)),{key:1,class:"suffix-icon"}))])):X("",!0),F(f(ma).HiddenInput)]),_:3},8,["class","checked","disabled","aria-labelledby"]),e.description?(x(),D("p",rF,ie(e.description),1)):X("",!0)]))}}),lC=bO(sF,[["__scopeId","data-v-8f1bced0"]]);ge({slots:["root","label","dismissButton","dismissIcon","avatar","icon"],base:{root:{border:"none",display:"inline-flex",alignItems:"center",outline:"none",gap:"6",borderRadius:"full",cursor:"pointer",boxShadow:"stroke-bordered-interactive",_disabled:{cursor:"not-allowed",opacity:"0.5",boxShadow:"none",background:"background.disabled",color:"text.disabled",_hover:{background:"background.disabled"}},_focusVisible:{boxShadow:"state-focus-primary"},_active:{background:"background.pressed"}},label:{fontFamily:"sans",fontStyle:"normal",letterSpacing:"normal",whiteSpace:"nowrap",color:"text.subtle"},dismissButton:{display:"flex",alignItems:"center",justifyContent:"center",padding:"0",border:"none",background:"none",cursor:"pointer",_disabled:{cursor:"not-allowed"}},dismissIcon:{width:"12",height:"12",color:"text.subtle"},avatar:{width:"20",height:"20",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"stroke-bordered"},icon:{width:"16",height:"16",color:"text.subtle"}},variants:{size:{small:{root:{paddingTop:"4",paddingBottom:"4",paddingLeft:"8",paddingRight:"8",height:"24"},label:{fontSize:"12",lineHeight:"md",fontWeight:"semimedium",letterSpacing:"wide"},avatar:{width:"14",height:"14"},icon:{width:"12",height:"12"}},default:{root:{paddingTop:"6",paddingBottom:"6",paddingLeft:"12",paddingRight:"12",height:"32"},label:{fontSize:"13",lineHeight:"md",fontWeight:"medium"}}},variant:{default:{root:{background:"background.default",_hover:{background:"background.hover"},_active:{background:"background.pressed"}}},selected:{root:{background:"{colors.seed.100}",_hover:{background:"background.selected-hover"},_active:{background:"background.selected-pressed"},_focusVisible:{boxShadow:"state-focus-primary"}},label:{color:"text.brand-default",_hover:{color:"text.brand-hover"},_active:{color:"text.brand-pressed"},_focusVisible:{color:"text.brand-pressed"}},icon:{color:"icon.selected",_active:{color:"text.brand-pressed"},_focusVisible:{color:"text.brand-pressed"}}}},hasAvatar:{true:{root:{paddingLeft:"6"}}},hasIcon:{true:{root:{paddingLeft:"6"}}},disabled:{true:{root:{opacity:"0.5",cursor:"not-allowed",background:"background.disabled",_hover:{background:"background.disabled"}},label:{color:"text.placeholder"},icon:{color:"text.placeholder"},avatar:{opacity:"0.5"}}}},defaultVariants:{size:"default",variant:"default",disabled:!1,hasAvatar:!1,hasIcon:!1}});ge({className:"prefix",slots:["root","icon","avatar","critical","selected","enter"],base:{root:{display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,gap:"4"},icon:{color:"icon.subtle",width:"14",height:"14"},avatar:{},critical:{color:"icon.error-hover",width:"14",height:"14"},selected:{color:"icon.normal",width:"14",height:"14"},enter:{color:"icon.subtle",width:"14",height:"14"}}});ge({className:"suffix",slots:["root","toggle","note","checkbox","radio","selected","button"],base:{root:{display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,gap:"4"},toggle:{},note:{color:"text.muted",fontWeight:"medium",fontSize:"base",lineHeight:"lg",letterSpacing:"normal",fontFamily:"sans",fontStyle:"normal"},checkbox:{},radio:{},selected:{color:"icon.normal",width:"14",height:"14"},button:{}}});ge({className:"radioGroup",slots:[...Uf.keys(),"optionsContainer"],base:{root:{fontFamily:"sans",display:"flex",flexDirection:{_vertical:"column",_horizontal:"row"},gap:{_vertical:"8",_horizontal:"8"}},optionsContainer:{display:"flex",flexDirection:{_vertical:"column",_horizontal:"row"},gap:{_vertical:"6",_horizontal:"24"},rowGap:{_horizontal:"6"}},label:{color:"text.subtle",fontSize:"base",fontWeight:"medium",lineHeight:"lg",fontStyle:"normal",letterSpacing:"normal"},indicator:{background:"bg.default"},itemControl:{width:"sm",height:"sm",display:"flex",alignItems:"center",justifyContent:"center",background:"background.default",borderRadius:"full",boxShadow:"stroke-bordered-interactive",transitionDuration:"normal",transitionProperty:"background",transitionTimingFunction:"default",_hover:{background:"background.hover"},_focus:{boxShadow:"state-focus-primary"},_checked:{outlineWidth:"5px",outlineOffset:"-4px",outlineColor:"background.brand-bold-default",outlineStyle:"solid",boxShadow:"inner-highlighted-ring",transitionProperty:"outline-color",_hover:{outlineColor:"background.brand-bold-default"},_focus:{boxShadow:"state-focus-primary"}},_disabled:{background:"background.disabled",_hover:{background:"background.disabled"},_checked:{outlineColor:"icon.disabled",background:"background.disabled",borderColor:"background.disabled",_hover:{outlineColor:"icon.disabled",background:"background.disabled",borderColor:"background.disabled"}}}},item:{display:"flex",alignItems:"center",cursor:"pointer",_disabled:{cursor:"not-allowed"},gap:"8"},itemText:{color:"text.normal",fontSize:"base",fontStyle:"normal",fontWeight:"regular",lineHeight:"lg",letterSpacing:"normal",_disabled:{color:"text.disabled"}}},defaultVariants:{}});const lF=ge({className:"switch",slots:[...jw.keys(),"suffixIcon","labelContent","labelDescription"],base:{root:{display:"flex",alignItems:"center",gap:"6",position:"relative",width:"fit-content",cursor:"pointer",_disabled:{cursor:"not-allowed"}},control:{display:"inline-flex",alignItems:"center",boxSizing:"content-box",justifyContent:"flex-start",flexShrink:0,cursor:"pointer",borderRadius:"full",paddingRight:"0",position:"relative",transitionProperty:"all",transitionTimingFunction:"ease-in-out",transitionDuration:"150ms",background:"graycoolalpha.10",w:"26px",h:"16px",boxShadow:"stroke-bordered-interactive",_focus:{boxShadow:"state-focus-primary"},_checked:{background:"seed.800",_disabled:{background:"background.brand-pressed"},'&[data-loading="true"]':{background:"background.brand-pressed"}},_disabled:{cursor:"not-allowed",background:"background.disabled",'&[data-loading="true"]':{background:"background.disabled"},boxShadow:"none"}},label:{color:"graycool.1000",fontSize:"base",fontWeight:"normal",fontFamily:"sans",cursor:"pointer",lineHeight:"lg"},thumb:{background:"white",borderRadius:"full",h:"12px",w:"12px",transform:"translateX(2px)",boxShadow:"elevations-raised",transitionProperty:"transform",transitionTimingFunction:"ease-in-out",transitionDuration:"150ms",position:"relative",_checked:{transform:"translateX(12px)",background:"white",boxShadow:"elevations-raised",_disabled:{background:"white"},'&[data-loading="true"]':{"&::before":{borderTopColor:"background.brand-pressed"}}},_disabled:{background:"white"},'&[data-loading="true"]':{"&::before":{content:'""',position:"absolute",margin:"1px",top:"0",left:"0",right:"0",bottom:"0",borderRadius:"full",border:"2px solid white",borderTopColor:"background.disabled",borderStyle:"solid",backgroundColor:"transparent",animation:"spin 2s linear infinite",boxShadow:"0 0 8px rgba(255, 255, 255, 0.3)",transform:"rotate(0deg)",willChange:"transform",backfaceVisibility:"hidden"}}},suffixIcon:{color:"icon.disabled"},labelContent:{display:"flex",alignItems:"center",gap:"4"},labelDescription:{margin:"0",paddingLeft:"32",color:"text.subtle",fontSize:"sm",fontFamily:"sans"}}}),cF={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function dF(e,t){return x(),D("svg",cF,[...t[0]||(t[0]=[N("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.93933 9.24999L4.46966 8.71966L7.29288 5.89644C7.68341 5.50592 8.31657 5.50592 8.7071 5.89644L11.5303 8.71966L12.0607 9.24999L11 10.3107L10.4697 9.78032L7.99999 7.31065L5.53032 9.78032L4.99999 10.3107L3.93933 9.24999Z",fill:"#60646C",style:{fill:"color(display-p3 0.3760 0.3920 0.4240)","fill-opacity":"1"}},null,-1)])])}const wa={render:dF},uF=ge({slots:[...K1.keys()],base:{root:{position:"relative"},trigger:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",border:"none",cursor:"pointer"},input:{marginBottom:12},viewControl:{display:"flex",alignItems:"center",paddingLeft:12,marginBottom:"4px"},viewTrigger:{display:"flex",alignItems:"center",justifyContent:"flex-start",borderRadius:"md",backgroundColor:"transparent",border:"none",pointerEvents:"none",textStyle:"body_base_medium",flexGrow:1},prevTrigger:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",backgroundColor:"transparent",border:"none",cursor:"pointer",outline:"none",_focus:{boxShadow:"none"},"& svg":{transform:"rotate(-90deg)"}},nextTrigger:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",backgroundColor:"transparent",border:"none",cursor:"pointer",_focus:{boxShadow:"none"},"& svg":{transform:"rotate(90deg)"}},content:{paddingX:"14px",paddingTop:"14px",paddingBottom:12,boxShadow:"elevations-overlay",borderRadius:"md",backgroundColor:"background.white"},table:{borderCollapse:"collapse",borderSpacing:0},tableHeader:{textStyle:"body_base_medium",color:"text.subtle",paddingY:"6",paddingX:"8",height:32,width:32,minWidth:32,maxWidth:32},tableCell:{width:32,height:32,padding:"0"},tableCellTrigger:{display:"flex",alignItems:"center",justifyContent:"center",textStyle:"body_base_regular",paddingY:"6",paddingX:"8",borderRadius:"md",border:"none",cursor:"pointer",height:"inherit",width:"inherit",_hover:{backgroundColor:"background.brand-selected"},"&[data-in-range]":{backgroundColor:"background.brand-selected",borderRadius:"0"},"&[data-selected]":{backgroundColor:"background.brand-bold-default",color:"text.inverse"},"&[data-range-start]":{borderRadius:"md"},"&[data-range-end]":{borderRadius:"md"},"&[data-in-range][data-selected]":{backgroundColor:"background.brand-bold-default",color:"text.inverse",borderRadius:"borderRadius.md"},"&[data-today]":{backgroundColor:"background.error-bold-default",color:"text.inverse",textStyle:"body_base_semibold",borderRadius:"50%"},"&[data-outside-range]":{color:"text.muted"},"&[data-disabled]":{cursor:"not-allowed",_hover:{backgroundColor:"transparent"}}}}}),hF=T({__name:"DatePicker",props:{isDisabled:{type:Boolean},placeholder:{default:"Select a date"},isClearable:{type:Boolean},closeOnSelect:{type:Boolean},defaultFocusedValue:{},defaultOpen:{type:Boolean,default:!1},defaultValue:{},defaultView:{},disabled:{type:Boolean},fixedWeeks:{type:Boolean},focusedValue:{},format:{},id:{},ids:{},isDateUnavailable:{},locale:{},max:{},maxView:{},min:{},minView:{},modelValue:{},name:{},numOfMonths:{},open:{type:Boolean},outsideDaySelectable:{type:Boolean},parse:{},positioning:{},readOnly:{type:Boolean},selectionMode:{},startOfWeek:{},timeZone:{},translations:{},view:{},inline:{type:Boolean},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},emits:["focusChange","openChange","valueChange","viewChange","update:modelValue","update:open","update:view","update:focusedValue"],setup(e,{emit:t}){const n=e,o=ct(n,t),i=E(()=>uF({}));return(a,r)=>(x(),$(f(we).Root,z(f(o),{class:i.value.root,disabled:n.isDisabled,defaultOpen:n.defaultOpen,positioning:{placement:"bottom-start"}}),{default:_(()=>[F(f(we).Control,{class:M(i.value.control)},{default:_(()=>[F(f(we).Trigger,{asChild:""},{default:_(()=>[R(a.$slots,"trigger",{},()=>[F(Ut,{type:"primary",size:"small",disabled:n.isDisabled,"data-testid":"date-picker-trigger"},{default:_(()=>[Re(ie(n.placeholder),1)]),_:1},8,["disabled"])])]),_:3}),n.isClearable?(x(),$(f(we).ClearTrigger,{key:0,class:M(i.value.clearTrigger)},{default:_(()=>[...r[0]||(r[0]=[Re(" Clear ",-1)])]),_:1},8,["class"])):X("",!0)]),_:3},8,["class"]),F(f(we).Positioner,{class:M(i.value.positioner)},{default:_(()=>[F(f(we).Content,{class:M(i.value.content)},{default:_(()=>[F(f(we).View,{view:"day"},{default:_(()=>[F(f(we).Context,null,{default:_(s=>[F(f(we).ViewControl,{class:M(i.value.viewControl)},{default:_(()=>[F(f(we).ViewTrigger,{class:M(i.value.viewTrigger),asChild:""},{default:_(()=>[N("span",null,ie(s.visibleRangeText.start),1)]),_:2},1032,["class"]),F(f(we).PrevTrigger,{asChild:"",class:M(i.value.prevTrigger)},{default:_(()=>[F(Ii,{type:"subtle",size:"small"},{prefixIcon:_(()=>[F(f(wa))]),_:1})]),_:1},8,["class"]),F(f(we).NextTrigger,{asChild:"",class:M(i.value.nextTrigger)},{default:_(()=>[F(Ii,{type:"subtle",size:"small"},{prefixIcon:_(()=>[F(f(wa))]),_:1})]),_:1},8,["class"])]),_:2},1032,["class"]),F(f(we).Table,{class:M(i.value.table)},{default:_(()=>[F(f(we).TableHead,null,{default:_(()=>[F(f(we).TableRow,null,{default:_(()=>[(x(!0),D($e,null,Ie(s.weekDays,(l,c)=>(x(),$(f(we).TableHeader,{key:c,class:M(i.value.tableHeader)},{default:_(()=>[Re(ie(l.short.slice(0,2)),1)]),_:2},1032,["class"]))),128))]),_:2},1024)]),_:2},1024),F(f(we).TableBody,null,{default:_(()=>[(x(!0),D($e,null,Ie(s.weeks,(l,c)=>(x(),$(f(we).TableRow,{key:c},{default:_(()=>[(x(!0),D($e,null,Ie(l,(d,u)=>(x(),$(f(we).TableCell,{key:u,value:d,class:M(i.value.tableCell)},{default:_(()=>[F(f(we).TableCellTrigger,{class:M(i.value.tableCellTrigger)},{default:_(()=>[Re(ie(d.day),1)]),_:2},1032,["class"])]),_:2},1032,["value","class"]))),128))]),_:2},1024))),128))]),_:2},1024)]),_:2},1032,["class"])]),_:1})]),_:1}),F(f(we).View,{view:"month"},{default:_(()=>[F(f(we).Context,null,{default:_(s=>[F(f(we).ViewControl,{class:M(i.value.viewControl)},{default:_(()=>[F(f(we).PrevTrigger,{asChild:"",class:M(i.value.prevTrigger)},{default:_(()=>[F(Ii,{type:"subtle",size:"small"},{prefixIcon:_(()=>[F(f(wa))]),_:1})]),_:1},8,["class"]),F(f(we).ViewTrigger,{class:M(i.value.viewTrigger)},{default:_(()=>[F(f(we).RangeText)]),_:1},8,["class"]),F(f(we).NextTrigger,{asChild:"",class:M(i.value.nextTrigger)},{default:_(()=>[F(Ii,{type:"subtle",size:"small"},{prefixIcon:_(()=>[F(f(wa))]),_:1})]),_:1},8,["class"])]),_:1},8,["class"]),F(f(we).Table,null,{default:_(()=>[F(f(we).TableBody,null,{default:_(()=>[(x(!0),D($e,null,Ie(s.getMonthsGrid({columns:4,format:"short"}),(l,c)=>(x(),$(f(we).TableRow,{key:c},{default:_(()=>[(x(!0),D($e,null,Ie(l,(d,u)=>(x(),$(f(we).TableCell,{key:u,value:d.value},{default:_(()=>[F(f(we).TableCellTrigger,{class:M(i.value.tableCellTrigger)},{default:_(()=>[Re(ie(d.label),1)]),_:2},1032,["class"])]),_:2},1032,["value"]))),128))]),_:2},1024))),128))]),_:2},1024)]),_:2},1024)]),_:1})]),_:1}),F(f(we).View,{view:"year"},{default:_(()=>[F(f(we).Context,null,{default:_(s=>[F(f(we).ViewControl,{class:M(i.value.viewControl)},{default:_(()=>[F(f(we).PrevTrigger,{asChild:"",class:M(i.value.prevTrigger)},{default:_(()=>[F(Ii,{type:"subtle",size:"small"},{prefixIcon:_(()=>[F(f(wa))]),_:1})]),_:1},8,["class"]),F(f(we).ViewTrigger,{class:M(i.value.viewTrigger)},{default:_(()=>[F(f(we).RangeText)]),_:1},8,["class"]),F(f(we).NextTrigger,{asChild:"",class:M(i.value.nextTrigger)},{default:_(()=>[F(Ii,{type:"subtle",size:"small"},{prefixIcon:_(()=>[F(f(wa))]),_:1})]),_:1},8,["class"])]),_:1},8,["class"]),F(f(we).Table,null,{default:_(()=>[F(f(we).TableBody,null,{default:_(()=>[(x(!0),D($e,null,Ie(s.getYearsGrid({columns:4}),(l,c)=>(x(),$(f(we).TableRow,{key:c},{default:_(()=>[(x(!0),D($e,null,Ie(l,(d,u)=>(x(),$(f(we).TableCell,{key:u,value:d.value},{default:_(()=>[F(f(we).TableCellTrigger,{class:M(i.value.tableCellTrigger)},{default:_(()=>[Re(ie(d.label),1)]),_:2},1032,["class"])]),_:2},1032,["value"]))),128))]),_:2},1024))),128))]),_:2},1024)]),_:2},1024)]),_:1})]),_:1})]),_:1},8,["class"])]),_:1},8,["class"])]),_:3},16,["class","disabled","defaultOpen"]))}});ge({className:"drawer",slots:[...X1.keys(),"header","body","footer","actions","breadcrumbs","closeButton","titleNested","backAction","hintMessage","root"],base:{root:{},backdrop:{position:"fixed",inset:"0",backgroundColor:"blackalpha.600",zIndex:"40",_open:{animation:"backdrop-in"},_closed:{animation:"backdrop-out"}},positioner:{position:"fixed",top:"0",right:"0",height:"100vh",zIndex:"50",display:"flex",alignItems:"center"},content:{display:"flex",flexDirection:"column",backgroundColor:"background.default",height:"100vh",boxShadow:"stroke-bordered-interactive",_open:{animation:"drawer-in-right"},_closed:{animation:"drawer-out-right"}},header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16"},title:{fontFamily:"sans",fontSize:"md",fontWeight:"bold",color:"text.normal",marginY:"0"},titleNested:{fontFamily:"sans",fontSize:"md",fontWeight:"bold",color:"text.normal",marginY:"0"},breadcrumbs:{display:"flex",alignItems:"center"},body:{flex:"1",padding:"16",overflowY:"auto",fontFamily:"sans"},footer:{display:"flex",justifyContent:"flex-end",alignItems:"center",padding:"16",backgroundColor:"background.neutral-default"},actions:{display:"flex",gap:"12"},backAction:{marginRight:"auto"},hintMessage:{marginRight:"auto",maxWidth:"70%"},closeButton:{display:"flex",justifyContent:"center",alignItems:"center",color:"icon.subtle",backgroundColor:"transparent",border:"none",padding:"0",margin:"0"}},variants:{size:{narrow:{content:{width:"320"}},medium:{content:{width:"504"}},wide:{content:{width:"640"}},full:{content:{width:"100vw"}}},variant:{default:{},custom:{},nested:{}},footerVariant:{default:{},critical:{}},layout:{default:{},multiAction:{footer:{justifyContent:"space-between"}}}},defaultVariants:{size:"medium",variant:"default",footerVariant:"default",layout:"default"}});const pF={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function fF(e,t){return x(),D("svg",pF,[...t[0]||(t[0]=[N("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.911 16.839L16.375 17.3031L17.3031 16.375L16.839 15.911L12.9281 12L16.839 8.08903L17.3031 7.62499L16.375 6.69691L15.911 7.16095L12 11.0719L8.08902 7.16095L7.62498 6.69691L6.6969 7.62499L7.16094 8.08903L11.0719 12L7.16094 15.911L6.6969 16.375L7.62498 17.3031L8.08902 16.839L12 12.9281L15.911 16.839Z",fill:"#60646C",style:{fill:"color(display-p3 0.3760 0.3920 0.4240)","fill-opacity":"1"}},null,-1)])])}const gF={render:fF},mF={width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function vF(e,t){return x(),D("svg",mF,[...t[0]||(t[0]=[N("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.48071 1.125L1.625 3.98071V8.0193L4.48071 10.875H8.5193L11.375 8.0193V3.98071L8.5193 1.125H4.48071ZM4.32538 0C4.12647 0 3.93571 0.0790177 3.79505 0.21967L0.71967 3.29505C0.579018 3.43571 0.5 3.62647 0.5 3.82538V8.17463C0.5 8.37352 0.579018 8.56433 0.719671 8.70495L3.79505 11.7803C3.93571 11.9209 4.12647 12 4.32538 12H8.67463C8.87352 12 9.06433 11.9209 9.20495 11.7803L12.2803 8.70495C12.4209 8.56433 12.5 8.37352 12.5 8.17463V3.82538C12.5 3.62647 12.4209 3.4357 12.2803 3.29505L9.20495 0.21967C9.06433 0.0790177 8.87352 0 8.67463 0H4.32538ZM7.0625 2.8125V3.375V6V6.5625H5.9375V6V3.375V2.8125H7.0625ZM6.5 9C6.91422 9 7.25 8.66422 7.25 8.25C7.25 7.83577 6.91422 7.5 6.5 7.5C6.08579 7.5 5.75 7.83577 5.75 8.25C5.75 8.66422 6.08579 9 6.5 9Z",fill:"currentColor",style:{fill:"rgba(198, 42, 47, 1)","fill-opacity":"1"}},null,-1)])])}const bF={render:vF},yF={width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xF(e,t){return x(),D("svg",yF,[...t[0]||(t[0]=[N("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.5 10.875C9.19242 10.875 11.375 8.69242 11.375 6C11.375 3.30761 9.19242 1.125 6.5 1.125C3.80761 1.125 1.625 3.30761 1.625 6C1.625 8.69242 3.80761 10.875 6.5 10.875ZM6.5 12C9.81373 12 12.5 9.31373 12.5 6C12.5 2.68629 9.81373 0 6.5 0C3.18629 0 0.5 2.68629 0.5 6C0.5 9.31373 3.18629 12 6.5 12ZM5.1875 5.25H5.75H6.31249C6.7267 5.25 7.06249 5.58579 7.06249 6V8.625V9.1875H5.93749V8.625V6.375H5.75H5.1875V5.25ZM6.5 4.5C6.91422 4.5 7.25 4.16421 7.25 3.75C7.25 3.33579 6.91422 3 6.5 3C6.08579 3 5.75 3.33579 5.75 3.75C5.75 4.16421 6.08579 4.5 6.5 4.5Z",fill:"rgba(126, 128, 138, 1)",style:{fill:"rgba(126, 128, 138, 1)","fill-opacity":"1"}},null,-1)])])}const wF={render:xF},CF={width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function _F(e,t){return x(),D("svg",CF,[...t[0]||(t[0]=[N("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.5 10.875C9.19242 10.875 11.375 8.69242 11.375 6C11.375 3.30761 9.19242 1.125 6.5 1.125C3.80761 1.125 1.625 3.30761 1.625 6C1.625 8.69242 3.80761 10.875 6.5 10.875ZM6.5 12C9.81373 12 12.5 9.31373 12.5 6C12.5 2.68629 9.81373 0 6.5 0C3.18629 0 0.5 2.68629 0.5 6C0.5 9.31373 3.18629 12 6.5 12ZM5.1875 5.25H5.75H6.31249C6.7267 5.25 7.06249 5.58579 7.06249 6V8.625V9.1875H5.93749V8.625V6.375H5.75H5.1875V5.25ZM6.5 4.5C6.91422 4.5 7.25 4.16421 7.25 3.75C7.25 3.33579 6.91422 3 6.5 3C6.08579 3 5.75 3.33579 5.75 3.75C5.75 4.16421 6.08579 4.5 6.5 4.5Z",fill:"rgba(24, 121, 78, 1)",style:{fill:"rgba(24, 121, 78, 1)","fill-opacity":"1"}},null,-1)])])}const kF={render:_F},$F={width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function SF(e,t){return x(),D("svg",$F,[...t[0]||(t[0]=[N("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.5 10.875C9.19242 10.875 11.375 8.69242 11.375 6C11.375 3.30761 9.19242 1.125 6.5 1.125C3.80761 1.125 1.625 3.30761 1.625 6C1.625 8.69242 3.80761 10.875 6.5 10.875ZM6.5 12C9.81373 12 12.5 9.31373 12.5 6C12.5 2.68629 9.81373 0 6.5 0C3.18629 0 0.5 2.68629 0.5 6C0.5 9.31373 3.18629 12 6.5 12ZM5.1875 5.25H5.75H6.31249C6.7267 5.25 7.06249 5.58579 7.06249 6V8.625V9.1875H5.93749V8.625V6.375H5.75H5.1875V5.25ZM6.5 4.5C6.91422 4.5 7.25 4.16421 7.25 3.75C7.25 3.33579 6.91422 3 6.5 3C6.08579 3 5.75 3.33579 5.75 3.75C5.75 4.16421 6.08579 4.5 6.5 4.5Z",fill:"rgba(153, 84, 58, 1)",style:{fill:"rgba(153, 84, 58, 1)","fill-opacity":"1"}},null,-1)])])}const EF={render:SF},Wl={default:"text.muted",error:"text.error-hover",warning:"text.warning-hover",success:"text.success-hover"},OF=ge({slots:["container","iconWrapper","message"],base:{container:{height:"md",display:"flex",columnGap:"4",alignItems:"center"},iconWrapper:{display:"flex",alignItems:"center"},message:{display:"inline-flex",fontSize:"xs",fontWeight:"regular",fontFamily:"sans",alignItems:"center",justifyContent:"center",lineHeight:"sm",fontStyle:"normal"}},variants:{type:{default:{message:{color:Wl.default}},error:{message:{color:Wl.error}},warning:{message:{color:Wl.warning}},success:{message:{color:Wl.success}}}},defaultVariants:{type:"default"}}),TF=T({__name:"HintMessage",props:{type:{default:"default"},text:{default:"Message under a text input"}},setup(e){const t=e,n=E(()=>{switch(t.type){case"error":return bF;case"warning":return EF;case"success":return kF;default:return wF}}),o=E(()=>OF({type:t.type}));return(i,a)=>(x(),D("div",{class:M(o.value.container)},[N("span",{class:M(o.value.iconWrapper)},[(x(),$(gt(n.value)))],2),N("span",{class:M(o.value.message)},ie(e.text),3)],2))}});ge({className:"empty-state",slots:["root","content","title","description","illustration"],base:{root:{display:"flex",flexDirection:"column",alignItems:"center",gap:"12",width:"fit-content"},content:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8",width:"full"},title:{fontFamily:"sans",fontWeight:"bold",fontSize:"15",lineHeight:"lg",letterSpacing:"tighter",textAlign:"center",color:"text.normal",marginBottom:"0"},description:{fontFamily:"sans",fontWeight:"regular",fontSize:"13",lineHeight:"lg",textAlign:"center",color:"text.subtle",marginTop:{base:"0"},_firstOfType:{marginTop:"0"}},illustration:{display:"flex",alignItems:"center",justifyContent:"center",padding:"8",borderRadius:"md",borderWidth:"01",borderStyle:"solid",borderColor:"border.muted",color:"text.subtle",marginBottom:"0"}}});const IF={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function PF(e,t){return x(),D("svg",IF,[...t[0]||(t[0]=[N("path",{d:"M6 1C5.73478 1 5.48043 1.10536 5.29289 1.29289C5.10536 1.48043 5 1.73478 5 2V3H2C1.73478 3 1.48043 3.10536 1.29289 3.29289C1.10536 3.48043 1 3.73478 1 4C1 4.26522 1.10536 4.51957 1.29289 4.70711C1.48043 4.89464 1.73478 5 2 5H3V13C3 13.5304 3.21071 14.0391 3.58579 14.4142C3.96086 14.7893 4.46957 15 5 15H11C11.5304 15 12.0391 14.7893 12.4142 14.4142C12.7893 14.0391 13 13.5304 13 13V5H14C14.2652 5 14.5196 4.89464 14.7071 4.70711C14.8946 4.51957 15 4.26522 15 4C15 3.73478 14.8946 3.48043 14.7071 3.29289C14.5196 3.10536 14.2652 3 14 3H11V2C11 1.73478 10.8946 1.48043 10.7071 1.29289C10.5196 1.10536 10.2652 1 10 1H6ZM7 6C7.26522 6 7.51957 6.10536 7.70711 6.29289C7.89464 6.48043 8 6.73478 8 7V11C8 11.2652 7.89464 11.5196 7.70711 11.7071C7.51957 11.8946 7.26522 12 7 12C6.73478 12 6.48043 11.8946 6.29289 11.7071C6.10536 11.5196 6 11.2652 6 11V7C6 6.73478 6.10536 6.48043 6.29289 6.29289C6.48043 6.10536 6.73478 6 7 6ZM10 6C10.2652 6 10.5196 6.10536 10.7071 6.29289C10.8946 6.48043 11 6.73478 11 7V11C11 11.2652 10.8946 11.5196 10.7071 11.7071C10.5196 11.8946 10.2652 12 10 12C9.73478 12 9.48043 11.8946 9.29289 11.7071C9.10536 11.5196 9 11.2652 9 11V7C9 6.73478 9.10536 6.48043 9.29289 6.29289C9.48043 6.10536 9.73478 6 10 6Z",fill:"currentColor"},null,-1)])])}const DF={render:PF},AF=ge({slots:[...aw.keys(),"fileIcon","deleteIcon","dropzoneContent","dropzoneText","itemInfo"],base:{root:{display:"flex",flexDirection:"column",gap:"0",width:"100%"},label:{textStyle:"body_small_medium",color:"text.default",marginBottom:"8"},dropzone:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"12",padding:"48",borderRadius:"xl",border:"1px dashed",borderColor:"graycool.200",backgroundColor:"white",cursor:"pointer",transition:"all 0.2s ease-in-out",minHeight:"200px",_hover:{borderColor:"graycool.300"},"&[data-dragging]":{borderColor:"primary.default",backgroundColor:"primary.subtle"},"&[data-invalid]":{borderColor:"error.default",backgroundColor:"error.subtle"}},dropzoneContent:{display:"flex",flexDirection:"column",alignItems:"center",gap:"12"},dropzoneText:{textStyle:"body_small_regular",color:"text.subtle"},trigger:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"6",paddingX:"16",paddingY:"8",borderRadius:"md",backgroundColor:"background.brand-bold-default",boxShadow:"stroke-bordered-interactive",cursor:"pointer",textStyle:"body_small_medium",color:"white",transition:"all 0.2s ease-in-out",border:"none",_hover:{backgroundColor:"background.brand-bold-hover"},_disabled:{opacity:.5,cursor:"not-allowed"}},clearTrigger:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"6",paddingX:"8",paddingY:"4",borderRadius:"md",backgroundColor:"transparent",cursor:"pointer",textStyle:"body_small_medium",color:"text.subtle",transition:"all 0.2s ease-in-out",_hover:{color:"text.default",backgroundColor:"background.hover"}},itemGroup:{display:"flex",flexDirection:"column",gap:"8",marginTop:"16"},item:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"12",paddingX:"16",paddingY:"12",borderRadius:"xl",backgroundColor:"white",border:"1px solid",borderColor:"graycool.200"},itemInfo:{display:"flex",flexDirection:"column",gap:"2",flex:1,minWidth:0},itemPreview:{display:"none"},itemPreviewImage:{width:"100%",height:"100%",objectFit:"cover"},itemName:{textStyle:"body_small_medium",color:"text.default",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},itemSizeText:{textStyle:"body_xsmall_regular",color:"text.subtle"},itemDeleteTrigger:{display:"flex",alignItems:"center",justifyContent:"center",width:"32",height:"32",borderRadius:"md",cursor:"pointer",color:"text.subtle",transition:"all 0.2s ease-in-out",flexShrink:0,_hover:{color:"text.default",backgroundColor:"background.hover"}},hiddenInput:{display:"none"},fileIcon:{width:"20",height:"20",color:"text.subtle"},deleteIcon:{width:"20",height:"20"}},variants:{variant:{default:{},error:{dropzone:{borderColor:"error.default"}}},disabled:{true:{root:{opacity:.5,pointerEvents:"none"}}}},defaultVariants:{variant:"default",disabled:!1}}),RF=T({__name:"FileUpload",props:{isDisabled:{type:Boolean},label:{},placeholder:{default:"Drop your files here"},triggerLabel:{default:"Open Dialog"},showDropzone:{type:Boolean,default:!0},variant:{default:"default"},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:{},transformFiles:{},asChild:{type:Boolean}},emits:["update:acceptedFiles","fileAccept","fileChange","fileReject"],setup(e,{emit:t}){const n=e,o=ct(n,t),i=E(()=>AF({variant:n.variant,disabled:n.isDisabled})),a=r=>{if(r===0)return"0 Bytes";const s=1024,l=["Bytes","KB","MB","GB"],c=Math.floor(Math.log(r)/Math.log(s));return parseFloat((r/Math.pow(s,c)).toFixed(1))+" "+l[c]};return(r,s)=>(x(),$(f(bn).Root,z(f(o),{class:i.value.root,disabled:n.isDisabled,"data-testid":"atlantis-file-upload"}),{default:_(()=>[n.label?(x(),$(f(bn).Label,{key:0,class:M(i.value.label),"data-testid":"atlantis-file-upload-label"},{default:_(()=>[Re(ie(n.label),1)]),_:1},8,["class"])):X("",!0),n.showDropzone?(x(),$(f(bn).Dropzone,{key:1,class:M(i.value.dropzone),"data-testid":"atlantis-file-upload-dropzone"},{default:_(()=>[R(r.$slots,"dropzone",{},()=>[N("div",{class:M(i.value.dropzoneContent)},[N("span",{class:M(i.value.dropzoneText)},ie(n.placeholder),3),F(f(bn).Trigger,{class:M(i.value.trigger),"data-testid":"atlantis-file-upload-trigger"},{default:_(()=>[Re(ie(n.triggerLabel),1)]),_:1},8,["class"])],2)])]),_:3},8,["class"])):X("",!0),n.showDropzone?X("",!0):(x(),$(f(bn).Trigger,{key:2,class:M(i.value.trigger),"data-testid":"atlantis-file-upload-trigger"},{default:_(()=>[R(r.$slots,"trigger",{},()=>[N("span",null,ie(n.triggerLabel),1)])]),_:3},8,["class"])),F(f(bn).ItemGroup,{class:M(i.value.itemGroup)},{default:_(()=>[F(f(bn).Context,null,{default:_(({acceptedFiles:l})=>[(x(!0),D($e,null,Ie(l,c=>(x(),$(f(bn).Item,{key:c.name,file:c,class:M(i.value.item),"data-testid":"atlantis-file-upload-item"},{default:_(()=>[N("div",{class:M(i.value.itemInfo)},[F(f(bn).ItemName,{class:M(i.value.itemName)},null,8,["class"]),F(f(bn).ItemSizeText,{class:M(i.value.itemSizeText)},{default:_(()=>[Re(ie(a(c.size)),1)]),_:2},1032,["class"])],2),F(f(bn).ItemDeleteTrigger,{class:M(i.value.itemDeleteTrigger),"data-testid":"atlantis-file-upload-delete"},{default:_(()=>[F(f(DF),{class:M(i.value.deleteIcon)},null,8,["class"])]),_:1},8,["class"])]),_:2},1032,["file","class"]))),128))]),_:1})]),_:1},8,["class"]),F(f(bn).HiddenInput,{"data-testid":"atlantis-file-upload-input"})]),_:3},16,["class","disabled"]))}});ge({slots:["root","checkboxItem","radioItemGroup","radioItem","itemDescription","section",...Cw.keys(),"back","create"],base:{root:{fontFamily:"sans",position:"relative",display:"flex",alignItems:"center"},arrow:{},arrowTip:{},checkboxItem:{},content:{flex:"1",fontFamily:"sans",fontWeight:"normal",fontSize:"base",lineHeight:"lg",color:"text.normal",background:"whitealpha.1000",boxShadow:"elevations-overlay",borderRadius:"md",paddingTop:"2",paddingBottom:"4",minWidth:"200px",zIndex:"1",outline:"none"},section:{color:"text.muted",fontWeight:"bold",fontSize:"xs",letterSpacing:"widest",textTransform:"uppercase",lineHeight:"xxs",paddingLeft:"8",paddingRight:"12",paddingTop:"16",paddingBottom:"6"},contextTrigger:{},back:{'& > [data-prefix="back-prefix"]':{color:"icon.subtle"},display:"flex",alignItems:"center",flexDirection:"row!",gap:"10",padding:"6"},create:{fontSize:"base",lineHeight:"lg",fontFamily:"sans",fontWeight:"normal",color:"text.normal",padding:"6",background:"background.hover",display:"flex",alignItems:"center",gap:"10",borderRadius:"md",cursor:"pointer",'& > [data-prefix="create-prefix"]':{color:"icon.subtle",display:"flex",alignItems:"center",justifyContent:"center"}},indicator:{},itemGroupLabel:{},itemGroup:{},itemIndicator:{},item:{display:"flex",flexDirection:"column",alignItems:"flex-start",gridColumnGap:"6",paddingY:"6",paddingX:"8",borderRadius:"md",width:"100%",cursor:"pointer",fontFamily:"sans",fontWeight:"normal",fontSize:"base",lineHeight:"lg",color:"text.normal",letterSpacing:"normal",_hover:{background:"{colors.seed.50}"},_focus:{outline:"none",boxShadow:"state-focus-primary"},_pressed:{background:"background.pressed"},_disabled:{opacity:"0.5",cursor:"not-allowed",color:"text.disabled",background:"none",_hover:{background:"none"}},"&[data-highlighted]":{backgroundColor:"background.brand-hover"},"&[data-focus]":{background:"{colors.seed.50}",boxShadow:"state-focus-primary"}},itemText:{fontFamily:"sans",fontWeight:"normal",fontSize:"sm",lineHeight:"lg"},itemDescription:{fontFamily:"sans",fontWeight:"normal",fontSize:"xs",lineHeight:"sm",color:"text.subtle"},positioner:{zIndex:"1"},radioItemGroup:{},radioItem:{},separator:{},triggerItem:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:"6",paddingY:"6",paddingX:"8",borderRadius:"md",width:"100%",cursor:"pointer",fontFamily:"sans",fontWeight:"normal",fontSize:"base",lineHeight:"lg",color:"text.normal",_after:{content:'"›"',marginLeft:"8px",color:"text.subtle"},_hover:{background:"background.hover"},_focus:{outline:"none",boxShadow:"state-focus-primary"},_pressed:{background:"background.pressed"},_disabled:{opacity:"0.5",cursor:"not-allowed",color:"text.placeholder",background:"none"}},trigger:{background:"transparent",border:"none",outline:"none"}},variants:{variant:{critical:{root:{},arrow:{},arrowTip:{},checkboxItem:{},content:{},contextTrigger:{},indicator:{},itemGroupLabel:{},itemGroup:{},itemIndicator:{},item:{},itemText:{color:"text.error-default"},positioner:{},radioItemGroup:{},radioItem:{},separator:{},triggerItem:{},trigger:{}},default:{root:{},arrow:{},arrowTip:{},checkboxItem:{},content:{},contextTrigger:{},indicator:{},itemGroupLabel:{},itemGroup:{},itemIndicator:{},item:{},itemText:{color:"text.normal"},positioner:{},radioItemGroup:{},radioItem:{},separator:{},triggerItem:{},trigger:{}}},size:{default:{root:{},arrow:{},arrowTip:{},checkboxItem:{},content:{},contextTrigger:{},indicator:{},itemGroupLabel:{},itemGroup:{},itemIndicator:{},item:{},itemText:{},positioner:{},radioItemGroup:{},radioItem:{},separator:{},triggerItem:{},trigger:{}},small:{root:{},arrow:{},arrowTip:{},checkboxItem:{},content:{},contextTrigger:{},indicator:{},itemGroupLabel:{},itemGroup:{},itemIndicator:{},item:{},itemText:{},positioner:{},radioItemGroup:{},radioItem:{},separator:{},triggerItem:{},trigger:{}},medium:{root:{},arrow:{},arrowTip:{},checkboxItem:{},content:{},contextTrigger:{},indicator:{},itemGroupLabel:{},itemGroup:{},itemIndicator:{},item:{},itemText:{},positioner:{},radioItemGroup:{},radioItem:{},separator:{},triggerItem:{},trigger:{}},large:{root:{},arrow:{},arrowTip:{},checkboxItem:{},content:{},contextTrigger:{},indicator:{},itemGroupLabel:{},itemGroup:{},itemIndicator:{},item:{},itemText:{},positioner:{},radioItemGroup:{},radioItem:{},separator:{},triggerItem:{},trigger:{}}}},defaultVariants:{variant:"default",size:"default"}});ge({className:"header",slots:["root","container","titleSection","titleWrapper","iconWrapper","titleContent","title","subtitle","actions","tertiaryText"],base:{root:{display:"flex",flexDirection:"column",backgroundColor:"background.default",gap:"16",width:"100%",paddingRight:"24",paddingLeft:"24"},container:{display:"flex",alignItems:"center",justifyContent:"space-between",maxWidth:"100%",minHeight:"64"},titleSection:{display:"flex",alignItems:"center",flex:"0 0 auto",minWidth:"0"},titleWrapper:{display:"flex",alignItems:"center",gap:"12",minWidth:"0"},iconWrapper:{display:"flex",alignItems:"center",justifyContent:"center",flexShrink:"0",width:"32",height:"32",color:"icon.subtle"},titleContent:{display:"flex",flexDirection:"column",gap:"2",minWidth:"0"},title:{textStyle:"heading_text_h2",margin:"0",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},subtitle:{color:"text.subtle",textStyle:"body_base_regular",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",margin:"0"},actions:{display:"flex",alignItems:"center",gap:"8",flexShrink:"0"},tertiaryText:{overflow:"hidden",color:"text.muted",textOverflow:"ellipsis",whiteSpace:"nowrap",textStyle:"body_small_medium"}}});const VF=na({variants:{as:{h1:{textStyle:"heading_text_h1"},h2:{textStyle:"heading_text_h2"},h3:{textStyle:"heading_text_h3"},h4:{textStyle:"heading_text_h4"},h5:{textStyle:"heading_text_h5"}}}}),MF=T({__name:"Heading",props:{as:{default:"h2"}},setup(e){const t=e,n=E(()=>VF(t));return(o,i)=>(x(),$(gt(e.as),{class:M(n.value)},{default:_(()=>[R(o.$slots,"default")]),_:3},8,["class"]))}}),NF={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function LF(e,t){return x(),D("svg",NF,[...t[0]||(t[0]=[N("g",{"clip-path":"url(#clip0_9565_3071)"},[N("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 6C12 9.31373 9.31373 12 6 12C2.68629 12 0 9.31373 0 6C0 2.68629 2.68629 0 6 0C9.31373 0 12 2.68629 12 6ZM7.875 8.67053L7.47725 8.27273L6 6.7955L4.52275 8.27273L4.125 8.67053L3.3295 7.875L3.72725 7.47725L5.2045 6L3.72725 4.52275L3.3295 4.125L4.125 3.3295L4.52275 3.72725L6 5.2045L7.47725 3.72725L7.875 3.3295L8.67053 4.125L8.27273 4.52275L6.7955 6L8.27273 7.47725L8.67053 7.875L7.875 8.67053Z",fill:"currentColor","fill-opacity":"0.75",style:{fill:"currentColor","fill-opacity":"0.75"}})],-1),N("defs",null,[N("clipPath",{id:"clip0_9565_3071"},[N("rect",{width:"12",height:"12",fill:"white",style:{fill:"white","fill-opacity":"1"}})])],-1)])])}const FF={render:LF},Ca={flexCenter:{display:"flex",alignItems:"center",justifyContent:"center"},iconDimensions:{fontSize:"1.1em",width:"1.1em",height:"1.1em"}},BF={default:{root:{boxShadow:"stroke-bordered-interactive",_focusWithin:{boxShadow:"state-focus-primary"},_focus:{boxShadow:"state-focus-primary"}}},error:{root:{boxShadow:"state-error",_focusWithin:{boxShadow:"state-focus-critical"},_focus:{boxShadow:"state-focus-critical"}}}},zF={gray:{prePostInput:{background:"background.hover"}},white:{prePostInput:{background:"background.default"}}},ho=ge({slots:["root","input","prefix","suffix","prePostInput","preInput","postInput","shortcut","clearIconContainer"],base:{root:{...Ca.flexCenter,width:"100%",height:"xxl",px:"6",py:"6",columnGap:"6",borderRadius:"md",boxSizing:"border-box",cursor:"text",_hover:{backgroundColor:"background.gray-subtlest-hover"},transitionDuration:"normal",transitionProperty:"background, border-color, color, box-shadow",transitionTimingFunction:"default",color:"graycool.1000",isolation:"isolate",minWidth:"0",outline:"none",position:"relative",userSelect:"none",verticalAlign:"middle",border:"none",fontSize:"base",fontWeight:"regular",fontFamily:"sans",fontStyle:"normal",lineHeight:"lg",whiteSpace:"nowrap",_hidden:{display:"none"},"& :where(svg)":Ca.iconDimensions},input:{height:"xxl",borderRadius:"md",flex:"1",border:"none",outline:"none",padding:"0",minWidth:"0",background:"transparent","&::placeholder":{color:"text.placeholder"}},prefix:{...Ca.flexCenter,flexShrink:"0"},suffix:{...Ca.flexCenter,flexShrink:"0"},clearIconContainer:{...Ca.flexCenter,width:"12",height:"12",cursor:"pointer",color:"icon.disabled",_hover:{color:"icon.muted"}},prePostInput:{...Ca.flexCenter,height:"xxl",paddingY:"6",paddingX:"12",gap:"8",flexShrink:"0",color:"text.subtle",fontFamily:"Inter",fontSize:"base",fontStyle:"normal",fontWeight:"regular",lineHeight:"lg"},preInput:{borderRadius:"md 0 0 md",borderRight:"1px solid {colors.border.muted}"},postInput:{borderRadius:"0 md md 0",borderLeft:"1px solid {colors.border.muted}"}},variants:{variant:BF,theme:zF,state:{idle:{},disabled:{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"}}}},isBordered:{false:{root:{boxShadow:"none"}}},hasBackground:{true:{root:{backgroundColor:"background.gray-subtlest-default"}},false:{root:{backgroundColor:"transparent",_hover:{backgroundColor:"transparent"},_focusWithin:{boxShadow:"none"},_focus:{boxShadow:"none"}}}},hasPreInput:{true:{root:{paddingLeft:"0"}}},hasPostInput:{true:{root:{paddingRight:"0"}}}},defaultVariants:{variant:"default",state:"idle",isBordered:!0,theme:"gray"}}),HF=["placeholder","disabled","list","autofocus"],jF={key:1,id:"input-datalist"},WF=["value"],hr=T({__name:"Input",props:{variant:{default:"default"},state:{default:"idle"},placeholder:{default:""},modelValue:{default:""},prefixText:{default:""},suffixText:{default:""},canClear:{type:Boolean,default:!1},shortcutKeys:{default:()=>[]},isAutocompleteEnable:{type:Boolean,default:!1},preInput:{default:""},postInput:{default:""},prePostInputTheme:{default:"gray"},options:{default:()=>["Alpha","Beta","Gamma","Zeta"]},isBordered:{type:Boolean,default:!0},hasBackground:{type:Boolean,default:!0},autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{expose:t,emit:n}){const o=e,i=fe(null),a=fe(o.modelValue??""),r=E(()=>o.state==="disabled"||o.disabled),s=E(()=>[ho({variant:o.variant,state:r.value?"disabled":"idle",isBordered:o.isBordered,hasPreInput:o.preInput!=="",hasPostInput:o.postInput!=="",hasBackground:o.hasBackground}).root]),l=E(()=>ho({state:r.value?"disabled":"idle"}).input),c=E(()=>[ho({variant:o.variant}).prePostInput,ho({theme:o.prePostInputTheme}).prePostInput]),d=E(()=>[...c.value,ho({variant:o.variant}).preInput]),u=E(()=>[...c.value,ho({variant:o.variant}).postInput]),h=E(()=>ho().prefix),p=E(()=>ho().suffix),m=E(()=>ho().clearIconContainer),g=()=>a.value="",b=()=>{var y;(y=i.value)==null||y.focus()};t({focus:b});const v=n;return Ne(a,y=>{v("update:modelValue",y)}),Ne(()=>o.modelValue,y=>{y!==a.value&&(a.value=y??"")}),(y,w)=>(x(),D("div",{class:M(s.value),onClick:on(b,["stop"]),onKeydown:Ah(b,["enter"])},[o.preInput?(x(),D("div",{key:0,class:M(d.value)},[N("span",null,ie(o.preInput),1)],2)):X("",!0),R(y.$slots,"prefixIcon",{},()=>[e.prefixText?(x(),D("span",{key:0,class:M(h.value)},ie(e.prefixText),3)):X("",!0)]),S0(N("input",z({ref_key:"inputRef",ref:i,role:"textbox"},y.$attrs,{placeholder:e.placeholder,disabled:r.value,list:e.isAutocompleteEnable?"input-datalist":void 0,class:l.value,"onUpdate:modelValue":w[0]||(w[0]=C=>a.value=C),autofocus:e.autofocus}),null,16,HF),[[dk,a.value]]),e.isAutocompleteEnable?(x(),D("datalist",jF,[(x(!0),D($e,null,Ie(e.options,C=>(x(),D("option",{key:C,value:C},null,8,WF))),128))])):X("",!0),R(y.$slots,"suffixIcon",{},()=>[e.suffixText?(x(),D("span",{key:0,class:M(p.value)},ie(e.suffixText),3)):X("",!0)]),F(ad,{keys:e.shortcutKeys,type:"default"},null,8,["keys"]),e.canClear&&a.value?(x(),D("span",{key:2,class:M(m.value),onClick:on(g,["stop"]),onKeydown:Ah(g,["enter"]),"data-testid":"clear"},[F(f(FF))],34)):X("",!0),o.postInput?(x(),D("div",{key:3,class:M(u.value)},[N("span",null,ie(o.postInput),1)],2)):X("",!0)],34))}}),UF=ge({className:"label",slots:["root","text","mandatoryIndicator","description","suffixIcon"],base:{root:{display:"inline-block",textAlign:"left",paddingLeft:"2",color:"graycool.900",fontFamily:"sans",fontSize:"base",fontStyle:"normal",fontWeight:"semimedium",lineHeight:"lg",letterSpacing:"normal"},text:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4"},mandatoryIndicator:{color:"red.800",textAlign:"center"},description:{fontWeight:"regular",fontSize:"sm",lineHeight:"md",letterSpacing:"normal"},suffixIcon:{color:"graycoolalpha.75"}}}),GF=["for"],Gf=T({__name:"Label",props:{for:{},mandatory:{type:Boolean},suffixIcon:{type:[Boolean,Function,Object]},iconTooltip:{},badgeVariant:{default:"neutral"},badgeLabel:{},description:{}},setup(e){const t=e,n=UF();return(o,i)=>(x(),D("label",{class:M(f(n).root),for:t.for},[N("span",{class:M(f(n).text)},[R(o.$slots,"default"),t.mandatory?(x(),D("span",{key:0,class:M(f(n).mandatoryIndicator)},"*",2)):X("",!0),e.iconTooltip?(x(),$(Jo,{key:1,title:e.iconTooltip},{default:_(()=>[(x(),$(gt(e.suffixIcon&&f(Ji)),{class:M(f(n).suffixIcon)},null,8,["class"]))]),_:1},8,["title"])):(x(),$(gt(e.suffixIcon&&f(Ji)),{key:2,class:M(f(n).suffixIcon)},null,8,["class"])),e.badgeVariant&&e.badgeLabel?(x(),$(N3,{key:3,variant:e.badgeVariant},{default:_(()=>[Re(ie(t.badgeLabel),1)]),_:1},8,["variant"])):X("",!0)],2),t.description?(x(),D("span",{key:0,class:M(f(n).description)},ie(t.description),3)):X("",!0)],10,GF))}});ge({slots:["root","icon"],base:{root:{display:"flex",alignItems:"center",gap:"4",borderRadius:"md",padding:"0",fontFamily:"sans",fontSize:"sm",fontWeight:"regular",color:"text.subtle",lineHeight:"md",letterSpacing:"wider"},icon:{width:"12",height:"12",display:"flex",alignContent:"center"}},variants:{variant:{verified:{icon:{color:"success.default"}},draft:{icon:{color:"text.subtle"}},deprecated:{icon:{color:"error.default"}},disabled:{icon:{color:"text.subtle"}}}}});ge({slots:["root","accordionItemContent","accordionItemTrigger","contentWrapper","content","title","subtitle","suffixWrapper","logContent","stepsWrapper","firstHalfStep","secondHalfStep"],base:{root:{borderBottom:"none !important",backgroundColor:"inherit"},accordionItemContent:{paddingTop:0,paddingX:0,paddingY:0},accordionItemTrigger:{display:"flex",paddingLeft:0,paddingY:0},contentWrapper:{display:"flex",width:"100%",alignItems:"stretch",gap:"8"},content:{display:"flex",flexDirection:"column",gap:"2",paddingY:"8",fontFamily:"sans",fontSize:"sm",fontWeight:"regular",lineHeight:"md",letterSpacing:"wide",color:"text.subtle",flex:"1"},title:{fontWeight:"semimedium"},subtitle:{color:"text.muted",letterSpacing:"wider"},suffixWrapper:{display:"flex"},logContent:{paddingBottom:"8"},stepsWrapper:{display:"flex",flexDirection:"column",alignItems:"center",width:"20",flexShrink:"0"},firstHalfStep:{width:"0",height:"12",zIndex:"1",borderRight:"1px solid {colors.border.disabled}"},secondHalfStep:{width:"0",minHeight:"0",flex:"1",borderRight:"1px solid {colors.border.disabled}"}},variants:{variant:{default:{},waiting:{},done:{title:{color:"text.accent-green-default"}},error:{title:{color:"text.error-default"}}},isExpandable:{true:{},false:{accordionItemTrigger:{cursor:"default"}}},firstHalfStepVariant:{default:{},done:{firstHalfStep:{borderColor:"border.accent-green"}},error:{firstHalfStep:{borderColor:"border.error"}}},secondHalfStepVariant:{default:{},done:{secondHalfStep:{borderColor:"border.accent-green"}},error:{secondHalfStep:{borderColor:"border.error"}}},isFirstHalfStepHidden:{true:{firstHalfStep:{borderRight:"none"}}},isSecondHalfStepHidden:{true:{secondHalfStep:{borderRight:"none"}}},isSelected:{true:{root:{backgroundColor:"background.selected"}}}},defaultVariants:{variant:"default",isExpandable:!1,firstHalfStepVariant:"default",secondHalfStepVariant:"default",isFirstHalfStepHidden:!1,isSecondHalfStepHidden:!1,isSelected:!1}});ge({className:"separator",slots:["root","line"],base:{root:{display:"flex",justifyContent:"center",alignItems:"center",width:"auto",height:"auto"},line:{borderStyle:"solid",borderColor:"border.muted",borderWidth:"1px"}},variants:{orientation:{horizontal:{root:{padding:"4 0",flexDirection:"row"},line:{width:"100%",height:0,borderTopWidth:"1px",borderRightWidth:0,borderBottomWidth:0,borderLeftWidth:0}},vertical:{root:{alignItems:"flex-start",padding:"0 4",flexDirection:"column"},line:{height:"100%",width:0,borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftWidth:"1px"}}},size:{1:{},2:{},3:{},4:{},full:{}}},defaultVariants:{orientation:"horizontal",size:"4"}});ge({slots:["root","label","value"],base:{root:{display:"flex",flexDirection:"column",padding:"16",width:"100%",height:"5.5rem",justifyContent:"flex-start",overflow:"hidden"},label:{textStyle:"body_xsmall_caps_medium",color:"text.subtle",paddingBottom:"8"},value:{textStyle:"heading_text_h3",color:"text.normal"}},variants:{size:{sm:{root:{minWidth:"min(100%, 223px)"}},md:{},xl:{root:{minWidth:"334px"}}},isTitle:{true:{root:{backgroundColor:"background.gray-subtler-default",height:"100%",minHeight:"100%",justifyContent:"flex-start"},label:{textStyle:"body_xsmall_caps_medium"},value:{textStyle:"heading_h1"}}},defaultBackgroundColor:{true:{root:{backgroundColor:"background.default"}}},hoverable:{true:{root:{cursor:"pointer",_hover:{backgroundColor:"background.brand-selected"}}}}}});ge({slots:["root","table","titleCell","metricCell","buttonCellContent"],base:{root:{border:"1px solid",borderColor:"border.muted",borderRadius:"lg",backgroundColor:"background.default",height:"100%",overflow:"hidden"},table:{width:"100%",borderCollapse:"collapse",height:"100%","& tr":{height:"100%"}},titleCell:{borderRight:"1px solid",borderColor:"border.muted",padding:"0",verticalAlign:"top",minWidth:"200px",width:"300px"},metricCell:{borderRight:"1px solid",borderBottom:"1px solid",borderColor:"border.muted",padding:"0",verticalAlign:"top",height:"5.5rem",minWidth:"200px",overflow:"hidden"},buttonCellContent:{display:"flex",flexDirection:"column",padding:"16",width:"100%",height:"5.5rem",justifyContent:"center",alignItems:"center"}},variants:{titlePosition:{left:{},top:{titleCell:{borderBottom:"1px solid"}}},showMoreButton:{true:{}},borderRadiusTopLeft:{none:{root:{borderTopLeftRadius:"none"}},sm:{root:{borderTopLeftRadius:"sm"}},md:{root:{borderTopLeftRadius:"md"}},lg:{root:{borderTopLeftRadius:"lg"}},xl:{root:{borderTopLeftRadius:"xl"}}},borderRadiusTopRight:{none:{root:{borderTopRightRadius:"none"}},sm:{root:{borderTopRightRadius:"sm"}},md:{root:{borderTopRightRadius:"md"}},lg:{root:{borderTopRightRadius:"lg"}},xl:{root:{borderTopRightRadius:"xl"}}},borderRadiusBottomLeft:{none:{root:{borderBottomLeftRadius:"none"}},sm:{root:{borderBottomLeftRadius:"sm"}},md:{root:{borderBottomLeftRadius:"md"}},lg:{root:{borderBottomLeftRadius:"lg"}},xl:{root:{borderBottomLeftRadius:"xl"}}},borderRadiusBottomRight:{none:{root:{borderBottomRightRadius:"none"}},sm:{root:{borderBottomRightRadius:"sm"}},md:{root:{borderBottomRightRadius:"md"}},lg:{root:{borderBottomRightRadius:"lg"}},xl:{root:{borderBottomRightRadius:"xl"}}},hideBorderTop:{true:{root:{borderTop:"none"}}},hideBorderBottom:{true:{root:{borderBottom:"none"}}},hideBorderLeft:{true:{root:{borderLeft:"none"}}},hideBorderRight:{true:{root:{borderRight:"0px"}}},isRightEdge:{true:{titleCell:{borderRight:"none"},metricCell:{borderRight:"none"}}},isBottomEdge:{true:{metricCell:{borderBottom:"none"}}}}});const qF=ge({slots:["root","backdrop","content","header","title","titleNested","breadcrumbs","closeButton","body","footer","actions"],base:{root:{fontFamily:"sans",outline:"none",position:"relative",zIndex:50},backdrop:{position:"fixed",inset:"0",backgroundColor:"{colors.blackalpha.500}",zIndex:40},content:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"350",backgroundColor:"background.default",borderRadius:"lg",outline:"none",boxShadow:"elevations-overlay",overflow:"hidden",zIndex:1},header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16",width:"100%",position:"relative"},title:{color:"text.normal",fontWeight:"bold",fontSize:"md",lineHeight:"lg",letterSpacing:"tight",fontFamily:"sans",marginY:"0"},titleNested:{color:"text.normal",fontWeight:"bold",fontSize:"md",lineHeight:"lg",letterSpacing:"tight",display:"flex",alignItems:"center",marginY:"0"},breadcrumbs:{display:"flex",alignItems:"center","& .separator":{margin:"0 04",color:"text.subtle"},"& ol":{paddingInlineStart:"0",marginY:"0"}},closeButton:{backgroundColor:"transparent",border:"none",padding:"0",margin:"0",cursor:"pointer",color:"icon.normal"},body:{fontFamily:"sans",padding:"16",display:"flex",flexDirection:"column",gap:"16",color:"text.subtle",position:"relative"},footer:{display:"flex",justifyContent:"flex-end",alignItems:"center",padding:"16",width:"100%",backgroundColor:"background.neutral-default",position:"relative"},actions:{display:"flex",gap:"12",position:"relative",zIndex:1}},variants:{size:{small:{content:{minWidth:"22em"}},large:{content:{minWidth:"39em"}}},variant:{default:{},custom:{},nested:{header:{padding:"16"},breadcrumbs:{width:"100%"}}},footerVariant:{default:{},critical:{}},layout:{default:{footer:{'&[data-variant="default"]':{justifyContent:"flex-end"},'&[data-variant="extra"]':{justifyContent:"space-between"}}},multiAction:{footer:{justifyContent:"space-between"}}}},defaultVariants:{size:"small",variant:"default",footerVariant:"default",layout:"default"}}),YF=["data-variant"],KF=T({__name:"Modal",props:{isOpen:{type:Boolean},title:{},size:{default:"small"},variant:{default:"default"},footerVariant:{default:"default"},primaryAction:{},secondaryAction:{},backAction:{},hintMessage:{},showCloseButton:{type:Boolean,default:!0},position:{default:"center"},isFooterVisible:{type:Boolean,default:!0},breadcrumbs:{}},emits:["update:isOpen","close","breadcrumbClick"],setup(e,{emit:t}){const n=e,o=t,{isOpen:i}=k0(n),a=E(()=>qF({size:n.size,footerVariant:n.footerVariant,variant:n.variant,layout:n.backAction?"multiAction":"default"})),r=E(()=>{const m={position:"fixed",zIndex:50};switch(n.position){case"top":return{...m,top:"20px",left:"50%",transform:"translateX(-50%)"};case"right":return{...m,top:"0",right:"0",height:"100vh",display:"flex",alignItems:"center"};case"bottom":return{...m,bottom:"20px",left:"50%",transform:"translateX(-50%)"};case"left":return{...m,top:"0",left:"0",height:"100vh",display:"flex",alignItems:"center"};case"center":default:return{...m,top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}}),s=Dt({'& [data-testid="breadcrumb-link"], & [data-testid="breadcrumb-link"] span':{fontSize:"md"}}),l=()=>{o("update:isOpen",!1),o("close")},c=()=>{var m;(m=n.primaryAction)!=null&&m.onClick&&n.primaryAction.onClick()},d=()=>{var m;(m=n.secondaryAction)!=null&&m.onClick?n.secondaryAction.onClick():l()},u=()=>{var m;(m=n.backAction)!=null&&m.onClick&&n.backAction.onClick()},h=(m="default",g="primary")=>g==="primary"&&m==="critical"?"critical":g==="primary"?"primary":"default",p=E(()=>h(n.footerVariant,"primary"));return(m,g)=>(x(),$(f(Bo).Root,{open:f(i),"onUpdate:open":g[2]||(g[2]=b=>Ks(i)?i.value=b:null),modal:!0,onClose:l,class:M(a.value.root),"data-testid":"modal-root"},{default:_(()=>[f(i)?(x(),$(Rh,{key:0,to:"body"},[F(f(Bo).Backdrop,{class:M(a.value.backdrop),"data-testid":"modal-backdrop",onClick:g[0]||(g[0]=on(()=>{},["stop"]))},null,8,["class"]),F(f(Bo).Positioner,{style:Xc(r.value),"data-testid":"modal-positioner"},{default:_(()=>[F(f(Bo).Content,{class:M(a.value.content),"data-testid":"modal-content"},{default:_(()=>[N("div",{class:M(a.value.header),"data-testid":"modal-header"},[e.variant==="default"?(x(),$(f(Bo).Title,{key:0,class:M(a.value.title),"data-testid":"modal-title"},{default:_(()=>[Re(ie(e.title),1)]),_:1},8,["class"])):e.variant==="custom"?(x(),$(f(Bo).Title,{key:1,class:M(a.value.title),"data-testid":"modal-title"},{default:_(()=>[R(m.$slots,"title",{},()=>[Re(ie(e.title),1)])]),_:3},8,["class"])):e.variant==="nested"?(x(),$(f(Bo).Title,{key:2,class:M(a.value.titleNested),"data-testid":"modal-title-nested"},{default:_(()=>[N("div",{class:M(a.value.breadcrumbs)},[e.breadcrumbs&&e.breadcrumbs.length?(x(),$(q3,{key:0,items:e.breadcrumbs,onClick:g[1]||(g[1]=(b,v)=>o("breadcrumbClick",b,v)),"data-testid":"modal-breadcrumb",class:M(f(s))},null,8,["items","class"])):X("",!0)],2)]),_:1},8,["class"])):X("",!0),e.showCloseButton?(x(),$(f(Bo).CloseTrigger,{key:3,"data-testid":"modal-close-button","aria-label":"Close modal",class:M(a.value.closeButton)},{default:_(()=>[F(Ii,{size:"small",type:"tertiary",onClick:on(l,["stop"])},{prefixIcon:_(()=>[F(f(gF))]),_:1})]),_:1},8,["class"])):X("",!0)],2),N("div",{class:M(a.value.body),"data-testid":"modal-body"},[R(m.$slots,"default")],2),e.isFooterVisible?(x(),D("div",{key:0,class:M(a.value.footer),"data-testid":"modal-footer","data-variant":e.backAction||e.hintMessage?"extra":"default"},[e.backAction?(x(),$(Ut,{key:0,type:h("default","tertiary"),size:"default",label:e.backAction.label,onClick:on(u,["stop"]),"data-testid":"modal-back-button"},null,8,["type","label"])):e.hintMessage?(x(),$(TF,{key:1,type:e.hintMessage.type,text:e.hintMessage.text,"data-testid":"modal-hint-message"},null,8,["type","text"])):X("",!0),N("div",{class:M(a.value.actions)},[e.secondaryAction?(x(),$(Ut,{key:0,type:h("default","secondary"),size:"default",label:e.secondaryAction.label,onClick:on(d,["stop"]),"data-testid":"modal-secondary-button"},null,8,["type","label"])):X("",!0),e.primaryAction?(x(),$(Ut,{key:1,type:p.value,size:"default",label:e.primaryAction.label,onClick:on(c,["stop"]),"data-testid":"modal-primary-button"},null,8,["type","label"])):X("",!0)],2)],10,YF)):X("",!0)]),_:3},8,["class"])]),_:3},8,["style"])])):X("",!0)]),_:3},8,["open","class"]))}}),ZF=ge({className:"numberInput",slots:[...Ow.keys(),"triggerGroup"],base:{root:{display:"flex",flexDirection:"column",gap:"4",width:"100%"},label:{color:"text.default",fontSize:"base",fontFamily:"sans",fontWeight:"medium",lineHeight:"lg"},control:{display:"flex",alignItems:"center",width:"100%",height:"xxl",px:"6",py:"6",columnGap:"6",borderRadius:"md",boxSizing:"border-box",boxShadow:"stroke-bordered-interactive",backgroundColor:"background.gray-subtlest-default",cursor:"text",transitionDuration:"normal",transitionProperty:"background, border-color, color, box-shadow",transitionTimingFunction:"default",_hover:{backgroundColor:"background.gray-subtlest-hover"},_focusWithin:{boxShadow:"state-focus-primary"},_invalid:{boxShadow:"state-error",_focusWithin:{boxShadow:"state-focus-critical"}},_disabled:{cursor:"not-allowed",backgroundColor:"background.disabled",boxShadow:"none",_hover:{backgroundColor:"background.disabled"},_focusWithin:{boxShadow:"none"}}},input:{flex:"1",height:"xxl",border:"none",outline:"none",padding:"0",minWidth:"0",background:"transparent",fontSize:"base",fontFamily:"sans",color:"text.default","&::placeholder":{color:"text.placeholder"},_disabled:{cursor:"not-allowed",color:"text.subtle","&::placeholder":{color:"text.placeholder"}}},triggerGroup:{display:"flex",flexDirection:"column",flexShrink:"0",height:"100%"},incrementTrigger:{display:"flex",alignItems:"center",justifyContent:"center",flex:"1",cursor:"pointer",color:"icon.muted",border:"none",background:"transparent",padding:"0",_hover:{color:"icon.default"},_disabled:{cursor:"not-allowed",color:"icon.disabled"},"& svg":{width:"12",height:"12"}},decrementTrigger:{display:"flex",alignItems:"center",justifyContent:"center",flex:"1",cursor:"pointer",color:"icon.muted",border:"none",background:"transparent",padding:"0",_hover:{color:"icon.default"},_disabled:{cursor:"not-allowed",color:"icon.disabled"},"& svg":{width:"12",height:"12"}},scrubber:{display:"flex",alignItems:"center",justifyContent:"center",cursor:"ew-resize",color:"icon.muted",flexShrink:"0","& svg":{width:"12",height:"12"}}}});const tb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),XF=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,o)=>o?o.toUpperCase():n.toLowerCase()),JF=e=>{const t=XF(e);return t.charAt(0).toUpperCase()+t.slice(1)},QF=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim(),nb=e=>e==="";var zr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const e5=({name:e,iconNode:t,absoluteStrokeWidth:n,"absolute-stroke-width":o,strokeWidth:i,"stroke-width":a,size:r=zr.width,color:s=zr.stroke,...l},{slots:c})=>At("svg",{...zr,...l,width:r,height:r,stroke:s,"stroke-width":nb(n)||nb(o)||n===!0||o===!0?Number(i||a||zr["stroke-width"])*24/Number(r):i||a||zr["stroke-width"],class:QF("lucide",l.class,...e?[`lucide-${tb(JF(e))}-icon`,`lucide-${tb(e)}`]:["lucide-icon"])},[...t.map(d=>At(...d)),...c.default?[c.default()]:[]]);const cC=(e,t)=>(n,{slots:o,attrs:i})=>At(e5,{...i,...n,iconNode:t,name:e},o);const t5=cC("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const n5=cC("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),o5=T({__name:"NumberInput",props:{allowMouseWheel:{type:Boolean},allowOverflow:{type:Boolean},clampValueOnBlur:{type:Boolean},defaultValue:{},disabled:{type:Boolean},focusInputOnChange:{type:Boolean},form:{},formatOptions:{},id:{},ids:{},inputMode:{},invalid:{type:Boolean},locale:{},max:{},min:{},modelValue:{},name:{},pattern:{},readOnly:{type:Boolean},required:{type:Boolean},spinOnPress:{type:Boolean},step:{},translations:{},asChild:{type:Boolean},label:{}},emits:["focusChange","valueChange","valueInvalid","update:modelValue"],setup(e,{emit:t}){const n=ct(e,t),o=E(()=>ZF());return(i,a)=>(x(),$(f(_i).Root,z(f(n),{class:o.value.root}),{default:_(()=>[e.label?(x(),$(f(_i).Label,{key:0,class:M(o.value.label)},{default:_(()=>[Re(ie(e.label),1)]),_:1},8,["class"])):X("",!0),F(f(_i).Control,{class:M(o.value.control)},{default:_(()=>[i.$slots.scrubber?(x(),$(f(_i).Scrubber,{key:0,class:M(o.value.scrubber)},{default:_(()=>[R(i.$slots,"scrubber")]),_:3},8,["class"])):X("",!0),F(f(_i).Input,{class:M(o.value.input)},null,8,["class"]),N("div",{class:M(o.value.triggerGroup)},[F(f(_i).IncrementTrigger,{class:M(o.value.incrementTrigger)},{default:_(()=>[F(f(t5))]),_:1},8,["class"]),F(f(_i).DecrementTrigger,{class:M(o.value.decrementTrigger)},{default:_(()=>[F(f(n5))]),_:1},8,["class"])],2)]),_:3},8,["class"])]),_:3},16,["class"]))}});ge({slots:[...Aw.keys(),"contentDefault","header","footer"],base:{positioner:{background:"background.default",boxShadow:"elevations-overlay",borderRadius:"md",fontFamily:"sans"},content:{outline:"none",_focusVisible:{outline:"none"}},contentDefault:{paddingX:"8",paddingY:"12"},header:{borderBottom:"1px solid {colors.graycool.100}"},footer:{borderTop:"1px solid {colors.graycool.100}"},trigger:{padding:0,border:"none"}},variants:{},defaultVariants:{}});const ob=ge({slots:["root","container","item","shortcut","icon","dependentField"],base:{root:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:"6",borderRadius:"md",gap:"4",background:"background.neutral-hover",width:"fit-content"},container:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4",width:"100%"},item:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6",borderRadius:"md",paddingY:"4",paddingX:"8",cursor:"pointer",whiteSpace:"nowrap",userSelect:"none",fontFamily:"sans",fontSize:"sm",lineHeight:"lg",transition:"all 0.2s ease",color:"text.subtle",fontWeight:"medium",position:"relative",border:"none",background:"transparent",_hover:{color:"text.normal",background:"background.hover"},_focus:{outline:"none",boxShadow:"state-focus-primary"},_active:{color:"text.brand-default"}},icon:{display:"flex",alignItems:"center",justifyContent:"center",color:"icon.subtle",width:"16",height:"16"},dependentField:{position:"absolute",right:"8",display:"flex",alignItems:"center",justifyContent:"center"}},variants:{size:{medium:{root:{height:"40"},icon:{width:"16",height:"16"},item:{}}},isDisabled:{true:{root:{opacity:.5,cursor:"not-allowed"}}},state:{idle:{item:{_active:{color:"text.brand-default"}},icon:{color:"icon.subtle"},shortcut:{}},active:{item:{color:"text.brand-default",background:"background.default",boxShadow:"stroke-bordered-interactive",_hover:{color:"text.brand-default",background:"background.default"}},icon:{color:"icon.brand-default"},shortcut:{color:"text.subtle"}},disabled:{item:{cursor:"not-allowed",color:"text.placeholder",_hover:{background:"transparent",color:"text.placeholder"}},icon:{color:"icon.placeholder"},shortcut:{color:"text.placeholder"}}},hasIcon:{true:{}},hasShortcut:{true:{}},hasDependentField:{true:{item:{paddingRight:"40"}}}},compoundVariants:[{hasIcon:!0,css:{item:{gap:"4"}}}],defaultVariants:{size:"medium",isDisabled:!1,state:"idle",hasIcon:!1,hasShortcut:!1,hasDependentField:!1}}),i5=["id","aria-label"],a5=["id","aria-selected","aria-disabled","tabindex","onClick","onKeydown","data-state"],dC=T({__name:"Segmented",props:{id:{},options:{},modelValue:{default:""},size:{default:"medium"},isDisabled:{type:Boolean,default:!1},ariaLabel:{default:"Segmented Control"}},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=e,o=t,i=fe(n.modelValue);$0(()=>{i.value=n.modelValue});const a=E(()=>ob({size:n.size,isDisabled:n.isDisabled})),r=d=>{n.isDisabled||d.isDisabled||(i.value=d.value,o("update:modelValue",d.value),o("change",d.value))},s=(d,u,h)=>{var p,m;if(n.isDisabled)return;const g=n.options.filter(v=>!v.isDisabled),b=g.findIndex(v=>v.value===u.value);switch(d.preventDefault(),d.key){case"ArrowRight":case"ArrowDown":if(b<g.length-1){const v=g[b+1];r(v),(p=document.getElementById(`segmented-item-${v.value}`))==null||p.focus()}break;case"ArrowLeft":case"ArrowUp":if(b>0){const v=g[b-1];r(v),(m=document.getElementById(`segmented-item-${v.value}`))==null||m.focus()}break;case"Enter":case" ":r(u);break}},l=d=>n.isDisabled||d.isDisabled?"disabled":d.value===i.value?"active":"idle",c=d=>{var u,h;const p=l(d);return ob({state:p,hasIcon:!!d.icon,hasShortcut:!!((u=d.shortcutKeys)!=null&&u.length)||!!((h=d.counterKey)!=null&&h.length),hasDependentField:!!d.hasDependentField,size:n.size,isDisabled:n.isDisabled||d.isDisabled})};return(d,u)=>(x(),D("div",{class:M(a.value.root),id:e.id,role:"tablist","aria-label":e.ariaLabel,"data-testid":"segmented-control"},[N("div",{class:M(a.value.container)},[(x(!0),D($e,null,Ie(e.options,(h,p)=>{var m,g;return x(),D("button",{key:h.value,type:"button",id:`segmented-item-${h.value}`,class:M(c(h).item),role:"tab","aria-selected":h.value===i.value,"aria-disabled":n.isDisabled||h.isDisabled,tabindex:h.value===i.value?0:-1,onClick:b=>r(h),onKeydown:b=>s(b,h),"data-testid":"segmented-item","data-state":h.value===i.value?"active":"idle"},[h.icon?(x(),$(gt(h.icon),{key:0,class:M(c(h).icon)},null,8,["class"])):X("",!0),N("span",null,ie(h.label),1),(m=h?.shortcutKeys)!=null&&m.length?(x(),$(ad,{key:1,keys:h.shortcutKeys,type:"default"},null,8,["keys"])):X("",!0),(g=h?.counterKey)!=null&&g.length?(x(),$(ad,{key:2,keys:h.counterKey,type:"default"},null,8,["keys"])):X("",!0),h.hasDependentField?(x(),D("span",{key:3,class:M(c(h).dependentField)},[R(d.$slots,`dependent-field-${h.value}`)],2)):X("",!0)],42,a5)}),128))],2)],10,i5))}}),r5={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function s5(e,t){return x(),D("svg",r5,[...t[0]||(t[0]=[N("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.96966 11.0303L10.5 11.5607L11.5607 10.5L11.0303 9.96966L9.06065 7.99999L11.0303 6.03032L11.5607 5.49999L10.5 4.43933L9.96966 4.96966L7.99999 6.93933L6.03032 4.96966L5.49999 4.43933L4.43933 5.49999L4.96966 6.03032L6.93933 7.99999L4.96966 9.96966L4.43933 10.5L5.49999 11.5607L6.03032 11.0303L7.99999 9.06065L9.96966 11.0303Z",fill:"currentColor"},null,-1)])])}const l5={render:s5},In=ge({slots:[...hw.keys(),"branchIndentGuide","nodeProvider","info","treeNodeIcon","treeNode","checkbox","branchControlButton"],base:{root:{width:"full",height:"fit-content",display:"flex",flexDirection:"column",gap:"2"},branchContent:{},treeNode:{},branchControl:{display:"flex",alignItems:"center",gap:"6",paddingY:"2",paddingLeft:"6",paddingRight:"4",borderRadius:"md"},branchControlButton:{flex:1,display:"flex",alignItems:"center",gap:"6",cursor:"pointer",color:"text.normal",_hover:{bg:"background.hover"},_focusVisible:{outline:"none",boxShadow:"state-focus-primary"},_selected:{backgroundColor:"{colors.seed.100}",_hover:{backgroundColor:"{colors.seed.100}"},outline:"none"},'&[aria-disabled="true"]':{opacity:.4,cursor:"not-allowed",_hover:{bg:"transparent"},pointerEvents:"none",color:"text.disabled"}},branchIndentGuide:{},branchIndicator:{display:"flex",alignItems:"center",justifyContent:"center",'&[data-state="open"]':{transform:"rotate(90deg)"}},branch:{},branchText:{fontSize:"base",fontFamily:"sans",fontWeight:"regular",lineHeight:"lg",letterSpacing:"normal",color:"text.normal"},branchTrigger:{},item:{display:"flex",alignItems:"center",gap:"6",paddingY:"2",paddingLeft:"6",paddingRight:"4",borderRadius:"md",cursor:"pointer",color:"text.normal",_hover:{bg:"background.hover"},_focusVisible:{outline:"none",boxShadow:"state-focus-primary"},_selected:{outline:"none",bg:"{colors.seed.100}",_hover:{bg:"{colors.seed.100}"}},'&[aria-disabled="true"]':{opacity:.4,cursor:"not-allowed",_hover:{bg:"transparent"},pointerEvents:"none",color:"text.disabled"}},itemText:{fontSize:"base",fontFamily:"sans",fontWeight:"regular",lineHeight:"lg",letterSpacing:"normal",color:"text.normal"},itemIndicator:{display:"flex",alignItems:"center",justifyContent:"center",width:"16",height:"16",color:"icon.normal",'&[data-state="open"]':{transform:"rotate(90deg)"}},info:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:"icon.disabled",width:"14",height:"14","& svg":{width:"100%",height:"100%"}},treeNodeIcon:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:"text.normal",width:"16",height:"16","& svg":{width:"100%",height:"100%"}},label:{},nodeProvider:{},tree:{},checkbox:{display:"inline-flex",alignItems:"center"}}}),c5=T({__name:"TreeViewBranch",props:{"aria-level":{},"aria-posinset":{},"aria-setsize":{},asChild:{type:Boolean}},setup(e){const t=e,n=ct(t),o=E(()=>In());return(i,a)=>(x(),$(f(Vo).Branch,z(f(n),{"aria-level":t["aria-level"],"aria-posinset":t["aria-posinset"],"aria-setsize":t["aria-setsize"],class:[o.value.branch],"data-testid":"atlantis-tree-view-branch"}),{default:_(()=>[R(i.$slots,"default")]),_:3},16,["aria-level","aria-posinset","aria-setsize","class"]))}}),d5=T({__name:"TreeViewBranchContent",props:{asChild:{type:Boolean}},setup(e){const t=ct(e),n=E(()=>In());return(o,i)=>(x(),$(f(Vo).BranchContent,z(f(t),{class:[n.value.branchContent],"data-testid":"atlantis-tree-view-branch-content"}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["class"]))}}),u5=T({__name:"TreeViewBranchControl",props:{depth:{default:0},"aria-labelledby":{},asChild:{type:Boolean}},setup(e){const t=e,n=ct(t),o=E(()=>In());return(i,a)=>(x(),$(f(Vo).BranchControl,z(f(n),{"aria-labelledby":t["aria-labelledby"],class:[o.value.branchControl],"data-testid":"atlantis-tree-view-branch-control",style:t.depth>1?{marginLeft:`${(t.depth-1)*24}px`}:{}}),{default:_(()=>[R(i.$slots,"default")]),_:3},16,["aria-labelledby","class","style"]))}}),h5=T({__name:"TreeViewBranchIndentGuide",props:{asChild:{type:Boolean}},setup(e){const t=ct(e),n=E(()=>In());return(o,i)=>(x(),$(f(Vo).BranchIndentGuide,z(f(t),{class:[n.value.branchIndentGuide],"data-testid":"atlantis-tree-view-branch-indent-guide"}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["class"]))}}),p5=T({__name:"TreeViewBranchIndicator",props:{asChild:{type:Boolean}},setup(e){const t=ct(e),n=E(()=>In());return(o,i)=>(x(),$(f(Vo).BranchIndicator,z(f(t),{class:[n.value.branchIndicator],"data-testid":"atlantis-tree-view-branch-indicator"}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["class"]))}}),f5=T({__name:"TreeViewBranchText",props:{id:{},asChild:{type:Boolean}},setup(e){const t=e,n=ct(t),o=E(()=>In());return(i,a)=>(x(),$(f(Vo).BranchText,z(f(n),{id:t.id,class:[o.value.branchText],"data-testid":"atlantis-tree-view-branch-text"}),{default:_(()=>[R(i.$slots,"default")]),_:3},16,["id","class"]))}}),g5=T({__name:"TreeViewItem",props:{depth:{default:0},asChild:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=e,o=t,i=ct(n),a=E(()=>In());return(r,s)=>(x(),$(f(Vo).Item,z(f(i),{class:[a.value.item],"data-testid":"atlantis-tree-view-item",style:n.depth>1?{marginLeft:`${(n.depth-1)*24}px`}:{},onClick:s[0]||(s[0]=l=>o("click",l))}),{default:_(()=>[R(r.$slots,"default")]),_:3},16,["class","style"]))}}),m5=T({__name:"TreeViewItemIndicator",props:{asChild:{type:Boolean}},setup(e){const t=ct(e),n=E(()=>In());return(o,i)=>(x(),$(f(Vo).ItemIndicator,z(f(t),{class:[n.value.itemIndicator],"data-testid":"atlantis-tree-view-item-indicator"}),{default:_(()=>[R(o.$slots,"default")]),_:3},16,["class"]))}}),v5=T({__name:"TreeViewItemText",props:{id:{},asChild:{type:Boolean}},setup(e){const t=e,n=ct(t),o=E(()=>In());return(i,a)=>(x(),$(f(Vo).ItemText,z(f(n),{id:t.id,class:[o.value.itemText],"data-testid":"atlantis-tree-view-item-text"}),{default:_(()=>[R(i.$slots,"default")]),_:3},16,["id","class"]))}}),ib=T({__name:"TreeViewItemCheckbox",props:{"aria-labelledby":{},disabled:{type:Boolean,default:!1},checked:{default:!1},suffixIcon:{type:[Boolean,Function,Object]},description:{},iconTooltip:{},hasLabel:{type:Boolean,default:!1},defaultChecked:{},form:{},id:{},ids:{},invalid:{type:Boolean},name:{},readOnly:{type:Boolean},required:{type:Boolean},value:{},asChild:{type:Boolean}},emits:["checkedChange","update:checked"],setup(e,{emit:t}){const n=e,o=t,i=ct(n),a=E(()=>In());return(r,s)=>(x(),D("span",{class:M([a.value.checkbox])},[F(lC,z(f(i),{checked:n.checked,disabled:n.disabled,"aria-labelledby":n["aria-labelledby"],onCheckedChange:s[0]||(s[0]=l=>o("checkedChange",l)),onClick:s[1]||(s[1]=on(()=>{},["stop"]))}),{default:_(()=>[R(r.$slots,"default")]),_:3},16,["checked","disabled","aria-labelledby"])],2))}}),b5=T({__name:"TreeViewItemInfo",props:{placement:{default:"top"},title:{},"aria-label":{},closeDelay:{},closeOnClick:{type:Boolean},closeOnEscape:{type:Boolean},closeOnPointerDown:{type:Boolean},closeOnScroll:{type:Boolean},defaultOpen:{type:Boolean},disabled:{type:Boolean},id:{},ids:{},interactive:{type:Boolean},open:{type:Boolean},openDelay:{},positioning:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},setup(e){const t=e,n=E(()=>In());return(o,i)=>(x(),D("span",null,[F(Jo,{title:t.title,placement:t.placement},{default:_(()=>[R(o.$slots,"default",{},()=>[F(f(Ji),{class:M(n.value.info)},null,8,["class"])])]),_:3},8,["title","placement"])]))}}),uC=T({__name:"TreeNode",props:{node:{},indexPath:{},treeView:{},selectionMode:{},selectedValue:{}},emits:["node-select"],setup(e,{emit:t}){const n=e,o=t,i=E(()=>In()),a=E(()=>`tree-node-text-${n.node.id}`),r=E(()=>Math.max(1,n.indexPath.length+1)),s=E(()=>{if(n.indexPath.length===0)return 1;const h=n.indexPath[n.indexPath.length-1];return Math.max(1,h+1)}),l=E(()=>{var h,p,m,g,b,v,y,w;if(n.indexPath.length===0){const P=((g=(m=(p=(h=n.treeView)==null?void 0:h.collection)==null?void 0:p.rootNode)==null?void 0:m.children)==null?void 0:g.length)||0;return Math.max(1,P)}const C=(v=(b=n.treeView)==null?void 0:b.collection)==null?void 0:v.rootNode;if(!C)return 1;let k=C;for(let P=0;P<n.indexPath.length-1;P++){const S=n.indexPath[P];if((y=k?.children)!=null&&y[S])k=k.children[S];else return 1}const O=((w=k?.children)==null?void 0:w.length)||0;return Math.max(1,O)}),c=()=>{(!n.node.children||n.node.children.length===0)&&o("node-select",n.node.id,!0)},d=h=>{const p=[];if(h.children)for(const m of h.children)p.push(m.id),m.children&&p.push(...d(m));return p},u=E(()=>{if(n.selectionMode!=="multiple")return n.selectedValue.includes(n.node.id);const h=n.selectedValue.includes(n.node.id);if(!n.node.children||n.node.children.length===0)return h;const p=d(n.node),m=p.filter(g=>n.selectedValue.includes(g)).length;return m===0?!!h:m===p.length?!0:"indeterminate"});return(h,p)=>(x(),$(f(uw),{node:n.node,indexPath:n.indexPath},{default:_(()=>[n.node.children&&n.node.children.length>0?(x(),$(f(c5),{key:0,"aria-level":r.value,"aria-posinset":s.value,"aria-setsize":l.value},{default:_(()=>[F(f(h5),null,{default:_(()=>[N("div",{class:M([i.value.branchControl])},[F(f(u5),{disabled:n.node.isDisabled,"aria-disabled":n.node.isDisabled,depth:n.indexPath.length,"aria-labelledby":a.value,class:M(i.value.branchControlButton)},{default:_(()=>[F(f(p5),null,{default:_(()=>[F(f(rC))]),_:1}),n.selectionMode==="multiple"?(x(),$(f(ib),{key:0,checked:u.value,disabled:n.node.isDisabled,"aria-labelledby":a.value,onCheckedChange:p[0]||(p[0]=()=>o("node-select",n.node.id,!1))},null,8,["checked","disabled","aria-labelledby"])):X("",!0),n.node.icon?(x(),$(gt(n.node.icon),{key:1,class:M([i.value.treeNodeIcon])},null,8,["class"])):X("",!0),F(f(f5),{id:a.value},{default:_(()=>[Re(ie(n.node.name),1)]),_:1},8,["id"])]),_:1},8,["disabled","aria-disabled","depth","aria-labelledby","class"])],2)]),_:1}),F(f(d5),null,{default:_(()=>[(x(!0),D($e,null,Ie(n.node.children,(m,g)=>(x(),$(uC,{key:m.id,node:m,indexPath:[...n.indexPath,g],treeView:n.treeView,selectedValue:n.selectedValue,selectionMode:n.selectionMode,onNodeSelect:p[1]||(p[1]=(b,v)=>o("node-select",b,v))},{default:_(()=>[R(h.$slots,"default")]),_:3},8,["node","indexPath","treeView","selectedValue","selectionMode"]))),128))]),_:3})]),_:3},8,["aria-level","aria-posinset","aria-setsize"])):(x(),$(f(g5),{key:1,depth:n.indexPath.length,disabled:n.node.isDisabled,"aria-disabled":n.node.isDisabled,"aria-level":r.value,"aria-posinset":s.value,"aria-setsize":l.value,class:M([i.value.item]),onClick:c},{default:_(()=>{var m,g,b,v,y;return[n.selectionMode==="multiple"?(x(),$(f(ib),{key:0,checked:u.value,disabled:n.node.isDisabled,"aria-labelledby":a.value,onCheckedChange:p[2]||(p[2]=()=>o("node-select",n.node.id,!0))},null,8,["checked","disabled","aria-labelledby"])):X("",!0),(m=n.node)!=null&&m.icon?(x(),$(f(m5),{key:1},{default:_(()=>[n.node.icon?(x(),$(gt(n.node.icon),{key:0,class:M([i.value.treeNodeIcon])},null,8,["class"])):X("",!0)]),_:1})):X("",!0),F(f(v5),{id:a.value},{default:_(()=>[Re(ie(n.node.name),1)]),_:1},8,["id"]),(b=(g=n.node)==null?void 0:g.info)!=null&&b.isVisible?(x(),$(f(b5),{key:2,title:(y=(v=n.node)==null?void 0:v.info)==null?void 0:y.title},null,8,["title"])):X("",!0)]}),_:1},8,["depth","disabled","aria-disabled","aria-level","aria-posinset","aria-setsize","class"]))]),_:3},8,["node","indexPath"]))}}),ab={flexCenter:{display:"flex",alignItems:"center",justifyContent:"center"},noSurrounding:{boxShadow:"none",border:"none",outline:"none"}},y5={default:{trigger:{boxShadow:"stroke-bordered-interactive",_focusVisible:{boxShadow:"state-focus-primary"}}},error:{trigger:{boxShadow:"state-error",_focusVisible:{boxShadow:"state-focus-critical"}}}},rt=ge({slots:[...Mw.keys(),"pillWrapper","pill","iconButton","crossIcon","checkIcon","loadingContainer","errorContainer","errorIcon"],base:{root:{width:"100%",position:"relative",userSelect:"none",verticalAlign:"middle",border:"none",fontSize:"base",fontFamily:"sans",display:"flex",flexDirection:"column",gap:"8"},errorContainer:{display:"flex",alignItems:"center",justifyContent:"center",padding:"8",minHeight:"32",width:"100%",gap:"8",color:"text.error-default"},errorIcon:{width:"16",height:"16",color:"icon.error-default"},loadingContainer:{display:"flex",alignItems:"center",justifyContent:"center",padding:"8",minHeight:"32",width:"100%",gap:"4",fontSize:"sm",lineHeight:"lg",fontFamily:"sans",color:"text.subtle"},pillWrapper:{display:"flex",flexWrap:"wrap",gap:"6",alignItems:"center",width:"100%"},pill:{display:"flex",alignItems:"center",justifyContent:"center",gap:"4",height:"24",paddingLeft:"8",borderRadius:"md",background:"background.gray-subtlest-default",boxShadow:"inner-highlighted-ring",fontSize:"sm",lineHeight:"lg",letterSpacing:"wider",color:"text.normal",fontFamily:"sans",fontWeight:"normal"},crossIcon:{width:"14",height:"14",color:"icon.muted"},checkIcon:{width:"14",height:"14",color:"icon.selected"},iconButton:{display:"flex",alignItems:"center",justifyContent:"center",width:"16",height:"16",padding:"0",border:"none",outline:"none",boxShadow:"none",cursor:"pointer",color:"icon.muted",borderRadius:"sm",marginRight:"4",background:"background.gray-subtlest-default",_hover:{color:"icon.hovered",backgroundColor:"background.gray-subtler-hover"},_focusVisible:{boxShadow:"state-focus-primary"}},control:{borderRadius:"md",boxSizing:"border-box",backgroundColor:"background.gray-subtlest-default",cursor:"pointer",transitionDuration:"normal",transitionProperty:"background, border-color, color, box-shadow",transitionTimingFunction:"default",lineHeight:"lg",display:"flex",alignItems:"center",outline:"none","& :where(svg)":{width:"16",height:"16",color:"icon.muted"},'&[data-state="open"]':{boxShadow:"state-selected"}},trigger:{...ab.noSurrounding,display:"flex",alignItems:"center",borderRadius:"md",justifyContent:"space-between",width:"100%",background:"background.gray-subtlest-default",cursor:"pointer",paddingY:"6",paddingX:"12",minHeight:"32",gap:"6","&[data-placeholder-shown]":{color:"text.subtle",fontSize:"base",lineHeight:"lg",letterSpacing:"normal"},"&[data-disabled]":{backgroundColor:"background.disabled",color:"text.disabled","&:hover":{backgroundColor:"background.disabled"},boxShadow:"none"},"&[data-disabled]:not([data-placeholder-shown])":{color:"text.subtle"},"&:not([data-disabled]):hover":{background:"background.gray-subtlest-hover"},'&[data-state="open"]':{boxShadow:"state-selected","& [data-chevron]":{transform:"rotate(180deg)"}}},valueText:{flex:"1",textAlign:"left",fontSize:"sm",lineHeight:"lg",fontFamily:"sans",color:"text.subtle","&[data-placeholder]":{color:"text.subtle"}},indicator:{...ab.flexCenter,color:"icon.muted",_disabled:{color:"icon.disabled"},"& [data-chevron]":{transition:"transform 0.2s ease",transform:"rotate(0deg)"}},item:{paddingY:"6",paddingX:"8",my:"4",borderRadius:"md",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"sm",lineHeight:"lg",fontFamily:"sans",_hover:{backgroundColor:"background.hover"},_selected:{backgroundColor:"background.selected",color:"text.selected",fontWeight:"medium"},_disabled:{cursor:"not-allowed",color:"text.disabled",backgroundColor:"transparent",_hover:{backgroundColor:"transparent"}},_focus:{backgroundColor:"background.hover",boxShadow:"state-focus-primary"},_highlighted:{backgroundColor:"background.hover"},"&[data-highlighted]":{backgroundColor:"background.hover"},"&[data-focus]":{backgroundColor:"background.hover",boxShadow:"state-focus-primary"}},itemGroup:{paddingX:"4",paddingY:"2"},positioner:{marginTop:"-4",width:"100%",borderRadius:"md"},content:{width:"100%",color:"text.normal",boxShadow:"elevations-overlay",background:"elevation.surface-raised-default",borderRadius:"md",maxHeight:"300",overflowY:"auto",padding:"4",outline:"none",zIndex:"dropdown"},itemIndicator:{marginLeft:"auto",width:"14",height:"14",color:"icon.selected"},label:{color:"text.subtle",fontSize:"sm",fontWeight:"medium",lineHeight:"md",fontFamily:"sans"}},variants:{variant:y5,state:{idle:{},disabled:{control:{cursor:"not-allowed",backgroundColor:"background.disabled",color:"text.disabled",boxShadow:"none",_hover:{backgroundColor:"background.disabled"}}}},isMultiple:{true:{},false:{}}},defaultVariants:{variant:"default",state:"idle"}}),x5=["aria-label","onClick","onKeydown"],w5={key:1},C5=["aria-label"],Mo=T({__name:"Select",props:{modelValue:{},variant:{default:"default"},isDisabled:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},errorMessage:{default:""},options:{default:()=>[]},placeholder:{default:"Select an option"},label:{default:""},multiple:{type:Boolean,default:!1},defaultOpen:{type:Boolean,default:!1},loopFocus:{type:Boolean,default:!0},composite:{type:Boolean,default:!0},typeahead:{type:Boolean,default:!0},isTree:{type:Boolean,default:!1},closeOnSelect:{type:Boolean},defaultHighlightedValue:{},defaultValue:{},deselectable:{type:Boolean},disabled:{type:Boolean},form:{},highlightedValue:{},id:{},ids:{},invalid:{type:Boolean},name:{},open:{type:Boolean},positioning:{},readOnly:{type:Boolean},required:{type:Boolean},scrollToIndexFn:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},emits:["focusOutside","highlightChange","interactOutside","openChange","pointerDownOutside","select","valueChange","update:modelValue","update:open","update:highlightedValue"],setup(e,{emit:t}){const n=e,o=t,i=ct(n,o),a=C=>{const k=[],O=P=>{for(const S of P)k.push(S),S.children&&O(S.children)};return O(C),k},r=E(()=>n.modelValue?n.isTree?a(n.options).filter(C=>n.modelValue.includes(C.value)):n.options.filter(C=>n.modelValue.includes(C.value)):[]),s=E(()=>uI({items:n.options})),l=C=>({id:C.value,name:C.label,isDisabled:C.disabled,children:C.children?C.children.map(l):void 0}),c=E(()=>{if(!n.isTree)return null;const C=n.options.map(l);return Tm({nodeToValue:k=>k.id,nodeToString:k=>k.name,rootNode:{id:"ROOT",name:"",children:C}})}),d=Tm({nodeToValue:C=>C.id,nodeToString:C=>C.name,rootNode:{id:"ROOT",name:"",children:[]}}),u=vw({collection:c.value||d}),h=E(()=>({root:rt({variant:n.variant,state:n.isDisabled||n.isLoading?"disabled":"idle"}).root,trigger:rt({variant:n.variant,state:n.isDisabled||n.isLoading?"disabled":"idle"}).trigger,content:rt().content,item:rt().item,itemGroup:rt().itemGroup,indicator:rt().indicator,positioner:rt().positioner,selectedIndicator:rt().itemIndicator,label:rt().label,control:rt({variant:n.variant,state:n.isDisabled?"disabled":"idle",isMultiple:n.multiple}).control,pillWrapper:rt().pillWrapper,pill:rt().pill,iconButton:rt().iconButton,crossIcon:rt().crossIcon,checkIcon:rt().checkIcon,loadingContainer:rt().loadingContainer,errorMessage:rt().errorMessage,errorContainer:rt().errorContainer,errorIcon:rt().errorIcon})),p=C=>{const k=(n.modelValue||[]).filter(O=>O!==C.value);o("update:modelValue",k)},m=(C,k)=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),p(k))},g=C=>{const k=[];if(C.children)for(const O of C.children)k.push(O.id),k.push(...g(O));return k},b=(C,k)=>{for(const O of C){if(O.id===k)return O;if(O.children){const P=b(O.children,k);if(P)return P}}return null},v=(C,k)=>{const O=g(C);return O.length===0?!1:O.every(P=>k.includes(P))},y=(C,k)=>{const O=g(C);if(O.length===0)return!1;const P=O.filter(S=>k.includes(S)).length;return P>0&&P<O.length},w=(C,k)=>{if(!n.multiple||!n.isTree||!c.value){if(n.multiple){const A=[...n.modelValue||[]],G=A.indexOf(C);G>-1?A.splice(G,1):A.push(C),o("update:modelValue",A)}else o("update:modelValue",[C]);return}const O=c.value.rootNode.children||[],P=b(O,C);if(!P)return;const S=[...n.modelValue||[]];if(S.includes(C)){const A=S.indexOf(C);A>-1&&S.splice(A,1);const G=g(P);for(const te of G){const j=S.indexOf(te);j>-1&&S.splice(j,1)}}else{S.includes(C)||S.push(C);const A=g(P);for(const G of A)S.includes(G)||S.push(G)}const V=[...S],H=A=>{for(const G of A)if(G.children&&G.children.length>0){H(G.children);const te=v(G,V),j=y(G,V);if(te)V.includes(G.id)||V.push(G.id);else if(!j){const U=V.indexOf(G.id);U>-1&&V.splice(U,1)}}};H(O),o("update:modelValue",V)};return(C,k)=>(x(),$(f(Jt).Root,z(f(i),{collection:s.value,class:h.value.root,disabled:n.isDisabled,defaultOpen:n.defaultOpen,loopFocus:n.loopFocus,composite:n.composite,typeahead:n.typeahead}),{default:_(()=>[n.label?(x(),$(f(Jt).Label,{key:0,class:M(h.value.label),"data-testid":"select-label",id:"select-label"},{default:_(()=>[Re(ie(n.label),1)]),_:1},8,["class"])):X("",!0),F(f(Jt).Control,{class:M(h.value.control)},{default:_(()=>[F(f(Jt).Trigger,{class:M(h.value.trigger),"data-testid":"select-input","aria-labelledby":n.label?"select-label":void 0,"aria-expanded":n.defaultOpen,role:"combobox","aria-haspopup":n.isTree?"tree":"listbox","aria-invalid":n.variant==="error","aria-errormessage":n.errorMessage?"select-error":void 0},{default:_(()=>[n.multiple&&r.value.length?(x(),D("div",{key:0,class:M(h.value.pillWrapper)},[(x(!0),D($e,null,Ie(r.value,O=>(x(),D("div",{key:O.value,class:M(h.value.pill)},[N("span",null,ie(O.label),1),N("button",{type:"button",class:M(h.value.iconButton),"aria-label":"Remove "+O.label,onClick:on(P=>p(O),["stop"]),onKeydown:P=>m(P,O)},[F(f(l5),{class:M(h.value.crossIcon)},null,8,["class"])],42,x5)],2))),128))],2)):n.isTree&&!n.multiple&&r.value.length?(x(),D("span",w5,ie(r.value[0].label),1)):(x(),$(f(Jt).ValueText,{key:2,placeholder:e.placeholder},null,8,["placeholder"])),F(f(Jt).Indicator,{class:M(h.value.indicator)},{default:_(()=>[F(f(kx),{"data-chevron":""})]),_:1},8,["class"])]),_:1},8,["class","aria-labelledby","aria-expanded","aria-haspopup","aria-invalid","aria-errormessage"])]),_:1},8,["class"]),F(f(Jt).Positioner,{class:M(h.value.positioner)},{default:_(()=>[F(f(Jt).Content,{class:M(h.value.content),role:n.isTree?void 0:"listbox"},{default:_(()=>[n.isLoading?(x(),D("div",{key:0,class:M(h.value.loadingContainer)},[R(C.$slots,"loading",{},()=>[F(Ox,{size:"sm"}),k[0]||(k[0]=N("span",null,"Loading...",-1))])],2)):n.variant==="error"&&n.errorMessage?(x(),D("div",{key:1,class:M(h.value.errorContainer),id:"select-error",role:"alert"},[R(C.$slots,"error-content",{},()=>[F(f(B3),{class:M(h.value.errorIcon)},null,8,["class"]),N("span",null,ie(n.errorMessage),1)])],2)):n.isTree&&c.value?(x(),D("div",{key:2,class:M(h.value.itemGroup),role:"group","aria-label":n.label?`${n.label} tree options`:"Select options"},[F(f(bw),{collection:c.value},{default:_(()=>[F(f(yw),{"aria-label":n.label?`${n.label} tree`:"Options tree","aria-multiselectable":n.multiple},{default:_(()=>[(x(!0),D($e,null,Ie(c.value.rootNode.children,(O,P)=>(x(),$(uC,{key:O.id,node:O,indexPath:[P],treeView:f(u),selectionMode:n.multiple?"multiple":"single",selectedValue:n.modelValue||[],onNodeSelect:w},null,8,["node","indexPath","treeView","selectionMode","selectedValue"]))),128))]),_:1},8,["aria-label","aria-multiselectable"])]),_:1},8,["collection"])],10,C5)):(x(),$(f(Jt).ItemGroup,{key:3,class:M(h.value.itemGroup)},{default:_(()=>[(x(!0),D($e,null,Ie(n.options,O=>(x(),$(f(Jt).Item,{key:O.value,item:O,class:M(h.value.item),disabled:O.disabled,"data-testid":"select-option-"+O.value,role:"option","aria-selected":(n.modelValue||[]).includes(O.value),"aria-disabled":O.disabled},{default:_(()=>[F(f(Jt).ItemText,null,{default:_(()=>[Re(ie(O.label),1)]),_:2},1024),F(f(Jt).ItemIndicator,{class:M(h.value.selectedIndicator),"aria-hidden":"true"},{default:_(()=>[F(f(sC),{class:M(h.value.checkIcon)},null,8,["class"])]),_:1},8,["class"])]),_:2},1032,["item","class","disabled","data-testid","aria-selected","aria-disabled"]))),128))]),_:1},8,["class"]))]),_:3},8,["class","role"])]),_:3},8,["class"]),F(f(Jt).HiddenSelect)]),_:3},16,["collection","class","disabled","defaultOpen","loopFocus","composite","typeahead"]))}});ge({slots:Bw.keys(),base:{root:{},resizeTrigger:{position:"relative",outlineWidth:"0",padding:"0",border:"0",_focus:{backgroundColor:"border.brand"},_focusWithin:{backgroundColor:"border.brand"},_after:{content:'""',display:"block",position:"absolute",background:"transparent"}}},variants:{orientation:{horizontal:{root:{"& > button[data-part='resize-trigger']":{width:"2",_after:{width:"8",height:"100%",top:"0",left:"-3"}}}},vertical:{root:{"& > button[data-part='resize-trigger']":{height:"2",_after:{height:"8",width:"100%",left:"0",top:"-3"}}}}}},defaultVariants:{orientation:"horizontal"}});ge({slots:["root"],base:{root:{display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:"md",flexShrink:"0",width:"10",height:"10",position:"relative","& .waiting-icon":{position:"absolute",top:"-4.5",left:"0",color:"icon.muted",width:"100%",height:"100%","& svg":{width:"100%",height:"100%"}}}},variants:{status:{queued:{root:{background:"icon.brand-default"}},processing:{root:{background:"icon.warning-default"}},error:{root:{background:"icon.error-default"}},ready:{root:{background:"icon.success-default"}},disabled:{root:{background:"icon.disabled"}},waiting:{root:{background:"transparent"}}}},defaultVariants:{status:"queued"}});ge({slots:["root","label"],base:{root:{display:"inline-flex",alignItems:"center",gap:"4"},label:{fontFamily:"sans",fontStyle:"normal",fontWeight:"normal",whiteSpace:"nowrap",fontSize:"13",lineHeight:"xl"}},variants:{status:{queued:{label:{color:"text.accent-blue-pressed"}},processing:{label:{color:"text.normal"}},error:{label:{color:"text.normal"}},ready:{label:{color:"text.normal"}},disabled:{label:{color:"text.normal"}},waiting:{label:{color:"text.normal"}}}},defaultVariants:{status:"queued"}});const Pa={Default:"default",Alt:"alt"},Da={Horizontal:"horizontal",Vertical:"vertical"},_5={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function k5(e,t){return x(),D("svg",_5,[...t[0]||(t[0]=[N("circle",{cx:"12",cy:"11.9999",r:"10",fill:"#E6EDFE",style:{fill:"color(display-p3 0.9036 0.9299 0.9965)","fill-opacity":"1"}},null,-1),N("path",{d:"M16 9L10.5 14.5L8 12",stroke:"#3E63DD",style:{stroke:"color(display-p3 0.2435 0.3889 0.8665)","stroke-opacity":"1"},"stroke-width":"1.125","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const $5={render:k5},S5={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function E5(e,t){return x(),D("svg",S5,[...t[0]||(t[0]=[N("circle",{cx:"10",cy:"9.99994",r:"7",fill:"#3A5CCC",style:{fill:"color(display-p3 0.2276 0.3608 0.7984)","fill-opacity":"1"}},null,-1),N("path",{d:"M13.3332 7.5L8.74984 12.0833L6.6665 10",stroke:"#F9FAFA",style:{stroke:"color(display-p3 0.9765 0.9804 0.9804)","stroke-opacity":"1"},"stroke-width":"0.9375","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const O5={render:E5},T5={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function I5(e,t){return x(),D("svg",T5,[...t[0]||(t[0]=[N("g",{id:"State=Upcoming, Size=Small"},[N("circle",{id:"Ellipse 22",cx:"9.99997",cy:"9.99995",r:"6.5",transform:"rotate(-15 9.99997 9.99995)",stroke:"#60646C",style:{stroke:"color(display-p3 0.3760 0.3920 0.4240)","stroke-opacity":"1"},"stroke-dasharray":"2 2"})],-1)])])}const P5={render:I5},D5={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function A5(e,t){return x(),D("svg",D5,[...t[0]||(t[0]=[N("g",{id:"State=Ongoing, Size=Small"},[N("circle",{id:"Ellipse 21",cx:"9.99997",cy:"9.99994",r:"6.5",transform:"rotate(-15 9.99997 9.99994)",stroke:"#3A5CCC",style:{stroke:"color(display-p3 0.2276 0.3608 0.7984)","stroke-opacity":"1"},"stroke-dasharray":"2 2"}),N("path",{id:"Ellipse 22",d:"M10 16.9999C8.14348 16.9999 6.36301 16.2624 5.05025 14.9497C3.7375 13.6369 3 11.8565 3 9.99994C3 8.14342 3.7375 6.36295 5.05025 5.05019C6.36301 3.73744 8.14348 2.99994 10 2.99994L10 9.99994L10 16.9999Z",fill:"#3A5CCC",style:{fill:"color(display-p3 0.2276 0.3608 0.7984)","fill-opacity":"1"}})],-1)])])}const R5={render:A5},hC=ge({className:"stepper",slots:["list","root","item","trigger","triggerContent","itemTitle","itemDescription","altIndicator","altIndicatorText","indicator","triggerContainer","itemLine","itemLineContainer"],base:{root:{display:"flex",flexDirection:"column",gap:"8"},list:{listStyle:"none",padding:"0",margin:"0",display:"flex",flexDirection:{_horizontal:"row",_vertical:"column"},gap:{_horizontal:"8",_vertical:"6"},width:"full",flex:"1"},item:{display:"flex",flexDirection:"column",gap:"2",flex:"1"},trigger:{backgroundColor:"transparent",border:"none",padding:"0",margin:"0",cursor:"pointer",fontFamily:"sans",fontStyle:"normal",letterSpacing:"normal"},triggerContent:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"2",flex:"1"},itemTitle:{fontSize:"base",fontWeight:"medium",color:"text.normal",lineHeight:"lg",textAlign:"left"},itemDescription:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"full",color:"text.subtle",fontSize:"sm",fontWeight:"regular",lineHeight:"md",textAlign:"left"},triggerContainer:{display:"flex",gap:{_horizontal:"8",_vertical:"16"}},indicator:{},altIndicator:{display:"flex",justifyContent:"center",alignItems:"center"}},defaultVariants:{type:"default"},variants:{type:{default:{indicator:{paddingLeft:"4"},itemLineContainer:{_horizontal:{width:"full",paddingBottom:"8",paddingTop:"12",paddingLeft:"4",paddingRight:"4"},_vertical:{width:"full",height:"full",display:"flex",justifyContent:"center"}},itemLine:{_horizontal:{height:"1",_current:{backgroundColor:"border.brand"},_complete:{backgroundColor:"border.brand"},_incomplete:{backgroundColor:"border.muted"}},_vertical:{width:"1px",height:"calc(100% - 20px)",_current:{backgroundColor:"border.muted"},_complete:{backgroundColor:"border.brand"},_incomplete:{backgroundColor:"border.muted"}}}},alt:{itemLineContainer:{_horizontal:{width:"full",paddingBottom:"12",paddingTop:"12",paddingLeft:"8",display:"flex",alignItems:"center"},_vertical:{width:"full",height:"calc(100% - 20px)",_complete:{height:"calc(100% - 24px)"},display:"flex",justifyContent:"center"}},itemLine:{_horizontal:{width:"full",height:"0.5",_current:{backgroundColor:"border.muted"},_complete:{backgroundColor:"border.brand"},_incomplete:{backgroundColor:"border.muted"}},_vertical:{width:"1px",height:"full",_current:{backgroundColor:"border.muted"},_complete:{backgroundColor:"border.brand"},_incomplete:{backgroundColor:"border.muted"}}},altIndicator:{width:"lg",height:"lg",minWidth:"lg",_complete:{backgroundColor:"background.brand-pressed",color:"border.brand"},_current:{backgroundColor:"text.selected",color:"text.inverse"},_incomplete:{backgroundColor:"background.neutral-default",color:"text.subtle"},borderRadius:"full",fontVariantNumeric:"slashed-zero",fontFamily:"sans",fontSize:"base",fontStyle:"normal",fontWeight:"regular",lineHeight:"md",letterSpacing:"tighter",marginBottom:"1"},indicator:{_horizontal:{display:"flex",justifyContent:"center",alignItems:"center",paddingRight:"1",_complete:{paddingRight:"0"}},_vertical:{flexDirection:"column",paddingLeft:"0.5",paddingRight:"0.5",_complete:{paddingBottom:"0",paddingRight:"0",paddingLeft:"0"}}},triggerContainer:{_horizontal:{alignItems:"center"}},item:{_last:{flex:"none"}},triggerContent:{_horizontal:{flex:"none",width:"auto"}}}}}}),V5=["data-orientation"],M5=["data-orientation"],N5=["data-orientation"],L5=["data-orientation"],F5=["data-orientation"],B5=["data-orientation"],z5=["data-orientation"],H5=["data-orientation"],j5=T({__name:"StepperItem",props:{item:{},index:{},orientation:{default:Da.Horizontal},type:{default:Pa.Default},modelValue:{default:1},items:{},steps:{}},setup(e){const t=e,n=E(()=>hC({type:t.type})),o=E(()=>t.steps.value),i=E(()=>({"data-complete":o.value>t.index?!0:void 0,"data-current":o.value===t.index?!0:void 0,"data-incomplete":o.value<t.index?!0:void 0}));return(a,r)=>(x(),$(f(eL),{class:M(n.value.trigger)},{default:_(()=>[t.type===f(Pa).Default&&t.orientation===f(Da).Horizontal?(x(),D("div",{key:0,class:M(n.value.itemLineContainer),"data-orientation":t.orientation},[N("div",z({class:n.value.itemLine},i.value,{"data-orientation":t.orientation}),null,16,M5)],10,V5)):X("",!0),N("div",{class:M(n.value.triggerContainer),"data-orientation":t.orientation},[F(f(zN),{class:M(n.value.indicator),"data-orientation":t.orientation},{default:_(()=>[t.type===f(Pa).Default?(x(),D($e,{key:0},[o.value===e.index?(x(),$(f(R5),{key:0})):o.value>e.index?(x(),$(f(O5),{key:1})):o.value<e.index?(x(),$(f(P5),{key:2})):X("",!0)],64)):(x(),D($e,{key:1},[o.value>e.index?(x(),$(f($5),{key:0})):(x(),D("div",z({key:1,class:n.value.altIndicator},i.value),[N("span",{class:M(n.value.altIndicatorText)},ie(e.index+1),3)],16))],64)),t.orientation===f(Da).Vertical&&e.index!==t.items.length-1?(x(),D("div",z({key:2,class:n.value.itemLineContainer},i.value,{"data-orientation":t.orientation}),[N("div",z({class:n.value.itemLine},i.value,{"data-orientation":t.orientation}),null,16,F5)],16,L5)):X("",!0)]),_:1},8,["class","data-orientation"]),N("div",{class:M(n.value.triggerContent),"data-orientation":t.orientation},[N("span",{class:M(n.value.itemTitle)},ie(e.item.title),3),t.type!==f(Pa).Alt||t.orientation!==f(Da).Horizontal?(x(),D("span",{key:0,class:M(n.value.itemDescription)},ie(e.item.description),3)):X("",!0)],10,B5),t.type===f(Pa).Alt&&t.orientation===f(Da).Horizontal&&e.index!==t.items.length-1?(x(),D("div",{key:0,class:M(n.value.itemLineContainer),"data-orientation":t.orientation},[N("div",z({class:n.value.itemLine},i.value,{"data-orientation":t.orientation}),null,16,H5)],10,z5)):X("",!0)],10,N5)]),_:1},8,["class"]))}}),W5=T({__name:"Stepper",props:{orientation:{default:Da.Horizontal},type:{default:Pa.Default},modelValue:{default:1},items:{}},emits:["stepChange"],setup(e,{emit:t}){const n=e,o=t,i=E(()=>hC({type:n.type})),a=s=>s<1?0:s>n.items.length?n.items.length-1:s-1,r=QN({count:n.items.length,modelValue:a(n.modelValue)});return Ne(()=>n.modelValue,s=>{r.value.setStep(a(s))}),Ne(()=>r.value.value,s=>{o("stepChange",s+1)}),(s,l)=>(x(),$(f(UN),{value:f(r)},{default:_(()=>[F(f(WN),{class:M(i.value.list),"data-orientation":n.orientation},{default:_(()=>[(x(!0),D($e,null,Ie(n.items,(c,d)=>(x(),$(f(jN),{key:c.value,index:d,class:M(i.value.item),"data-testid":"stepper-item"},{default:_(()=>[F(j5,z({item:c,index:d},{ref_for:!0},n,{steps:f(r)}),null,16,["item","index","steps"])]),_:2},1032,["index","class"]))),128))]),_:1},8,["class","data-orientation"])]),_:1},8,["value"]))}}),U5=T({__name:"Switch",props:{disabled:{type:Boolean},checked:{},loading:{type:Boolean},suffixIcon:{type:[Boolean,Function,Object]},description:{},iconTooltip:{},readOnly:{type:Boolean},defaultChecked:{type:Boolean},form:{},id:{},ids:{},invalid:{type:Boolean},label:{},name:{},required:{type:Boolean},value:{},asChild:{type:Boolean}},emits:["checkedChange","update:checked"],setup(e,{emit:t}){const n=e,o=t,i=lF();return(a,r)=>(x(),D("div",null,[F(f(Mr).Root,{class:M(f(i).root),checked:n.checked,readOnly:n.readOnly,disabled:n.disabled||n.loading,"data-loading":n.loading,onCheckedChange:r[0]||(r[0]=s=>o("checkedChange",s)),"data-testid":"atlantis-switch"},{default:_(()=>[F(f(Mr).Control,{"data-loading":n.loading,class:M(f(i).control)},{default:_(()=>[F(f(Mr).Thumb,{"data-loading":n.loading,class:M(f(i).thumb)},null,8,["data-loading","class"])]),_:1},8,["data-loading","class"]),N("div",{class:M(f(i).labelContent)},[F(f(Mr).Label,{class:M(f(i).label)},{default:_(()=>[R(a.$slots,"default")]),_:3},8,["class"]),e.iconTooltip?(x(),$(Jo,{key:0,title:e.iconTooltip,placement:"bottom"},{default:_(()=>[(x(),$(gt(e.suffixIcon&&f(Ji)),{class:M(f(i).suffixIcon),"data-testid":"atlantis-suffix-icon"},null,8,["class"]))]),_:1},8,["title"])):(x(),$(gt(e.suffixIcon&&f(Ji)),{key:1,class:M(f(i).suffixIcon),"data-testid":"atlantis-suffix-icon"},null,8,["class"]))],2),F(f(Mr).HiddenInput,{"data-testid":"atlantis-hidden-input"})]),_:3},8,["class","checked","readOnly","disabled","data-loading"]),e.description?(x(),D("p",{key:0,class:M(f(i).labelDescription),"data-testid":"atlantis-switch-description"},ie(e.description),3)):X("",!0)]))}});ge({slots:["root","header","title","logContainer","logEntry","timestamp","logMessage","logLevel","emptyState","debug","info","warn","error","log","prompt","cursor","loadingSpinner","scrollButton"],base:{root:{display:"flex",flexDirection:"column",width:"100%",borderRadius:"md",background:"background.default",boxShadow:"stroke-container",overflowY:"auto",position:"relative"},logContainer:{display:"flex",flexDirection:"column",width:"100%",overflow:"auto",padding:"8",fontFamily:"mono",fontSize:"sm"},logEntry:{display:"flex",lineHeight:"sm",padding:"2 0",gap:"12"},timestamp:{color:"text.subtle",flexShrink:"0"},logMessage:{color:"text.subtle",wordBreak:"break-word"},logLevel:{lineHeight:"sm",fontWeight:"semibold",letterSpacing:"tight",width:"36"},emptyState:{display:"flex",alignItems:"center",justifyContent:"center",padding:"16",color:"text.muted"},prompt:{display:"flex",lineHeight:"sm",padding:"2 0",marginTop:"4",color:"text.success-default"},cursor:{display:"inline-block",width:"08",height:"16",marginLeft:"4",backgroundColor:"text.success-default",opacity:1,animation:"cursor-blink 1s step-end infinite"},loadingSpinner:{display:"flex",alignItems:"center",justifyContent:"center",padding:"2 0",marginTop:"4",color:"text.success-default"},debug:{color:"text.accent-purple-default"},info:{color:"text.information-default"},warn:{color:"text.warning-default"},error:{color:"text.error-default"},log:{color:"text.success-default"},scrollButton:{position:"absolute",bottom:"16",right:"16",zIndex:10,boxShadow:"stroke-container",borderRadius:"full"}}});ge({className:"tabItem",slots:["root","labelWrapper","icon","label","badge"],base:{root:{display:"inline-flex",p:"8",_hover:{"& .tabItem__labelWrapper":{backgroundColor:"background.brand-hover",borderRadius:"md"},"& .tabItem__label":{color:"text.selected"},"& .tabItem__icon":{color:"icon.selected"}}},labelWrapper:{display:"inline-flex",alignItems:"center",gap:"6",cursor:"pointer",userSelect:"none",color:"text.normal",px:"6",py:"2"},icon:{color:"icon.subtle"},label:{color:"text.muted",cursor:"pointer"},badge:{color:"text.subtle",borderRadius:"md",minWidth:"20"}},variants:{state:{default:{root:{borderBottom:"2px solid transparent"}},selected:{root:{color:"text.selected",borderBottomWidth:"2",borderBottomStyle:"solid",borderBottomColor:"border.selected",marginBottom:"-4"},icon:{color:"icon.selected"},label:{color:"text.selected"},labelWrapper:{backgroundColor:"background.brand-selected",borderRadius:"md"}},disabled:{root:{color:"text.disabled"},icon:{color:"icon.disabled"},label:{color:"text.disabled"}}}},defaultVariants:{state:"default"}});ge({className:"tabs",slots:Uw.keys(),base:{root:{height:"100%"},list:{display:"flex"},trigger:{background:"none",border:"none",cursor:"pointer",_disabled:{cursor:"not-allowed",pointerEvents:"none"}},content:{padding:"12",height:"100%"}},variants:{bottomBorder:{true:{list:{borderBottom:"1px solid",borderBottomColor:"border.muted"}}},noContentPadding:{true:{content:{padding:"0"},list:{paddingLeft:"16"}}}}});ge({slots:["root","label","icon","avatar","dismissIcon"],base:{root:{display:"inline-flex",alignItems:"center",gap:"6",paddingLeft:"8",height:"xl",background:"background.gray-subtler-default",borderRadius:"md",boxShadow:"inner-highlighted-ring",_hover:{background:"background.gray-subtler-hover"},_disabled:{cursor:"not-allowed",color:"text.disabled",_hover:{background:"background.gray-subtler-default"}}},label:{fontFamily:"sans",fontSize:"sm",fontWeight:"regular",lineHeight:"sm",letterSpacing:"wide",color:"text.normal"},icon:{display:"flex",alignItems:"center",justifyContent:"center",width:"md",height:"md",color:"icon.subtle"},avatar:{width:"md",height:"md",borderRadius:"md",overflow:"hidden",boxShadow:"stroke-container","& img":{width:"100%",height:"100%",objectFit:"cover"}},dismissIcon:{color:"icon.subtle",width:"3",height:"3"}},variants:{type:{default:{},icon:{root:{paddingLeft:"4"}},avatar:{root:{paddingLeft:"4"}}}},defaultVariants:{type:"default"}});na({base:{width:"100%",textAlign:"left",outline:"none",display:"flex",paddingY:"6",paddingX:"8",alignItems:"flex-start",justifyContent:"flex-start",gap:"6",flex:"1 0 0",alignSelf:"stretch",borderRadius:"md",background:"background.gray-subtlest-default",border:"none",transitionDuration:"normal",transitionProperty:"background, border-color, color, box-shadow",transitionTimingFunction:"default",fontFamily:"sans",fontSize:"base",fontWeight:"regular",lineHeight:"lg",letterSpacing:"normal",_hover:{backgroundColor:"background.gray-subtlest-hover"},_placeholder:{color:"text.placeholder"},_disabled:{backgroundColor:"background.disabled",color:"text.disabled",cursor:"not-allowed",_hover:{backgroundColor:"background.disabled"}},boxShadow:"stroke-bordered-interactive",_focus:{boxShadow:"state-focus-primary"}}});Dt({position:"absolute",bottom:"1px",right:"3px",padding:"4px",pointerEvents:"none",color:"text.muted",textAlign:"right",fontFamily:"sans",fontSize:"sm",fontWeight:"regular",lineHeight:"sm",letterSpacing:"normal"});function hl(e){return e+.5|0}const Qo=(e,t,n)=>Math.max(Math.min(e,n),t);function cs(e){return Qo(hl(e*2.55),0,255)}function ni(e){return Qo(hl(e*255),0,255)}function yo(e){return Qo(hl(e/2.55)/100,0,1)}function rb(e){return Qo(hl(e*100),0,100)}const xn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},yp=[..."0123456789ABCDEF"],G5=e=>yp[e&15],q5=e=>yp[(e&240)>>4]+yp[e&15],Ul=e=>(e&240)>>4===(e&15),Y5=e=>Ul(e.r)&&Ul(e.g)&&Ul(e.b)&&Ul(e.a);function K5(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&xn[e[1]]*17,g:255&xn[e[2]]*17,b:255&xn[e[3]]*17,a:t===5?xn[e[4]]*17:255}:(t===7||t===9)&&(n={r:xn[e[1]]<<4|xn[e[2]],g:xn[e[3]]<<4|xn[e[4]],b:xn[e[5]]<<4|xn[e[6]],a:t===9?xn[e[7]]<<4|xn[e[8]]:255})),n}const Z5=(e,t)=>e<255?t(e):"";function X5(e){var t=Y5(e)?G5:q5;return e?"#"+t(e.r)+t(e.g)+t(e.b)+Z5(e.a,t):void 0}const J5=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function pC(e,t,n){const o=t*Math.min(n,1-n),i=(a,r=(a+e/30)%12)=>n-o*Math.max(Math.min(r-3,9-r,1),-1);return[i(0),i(8),i(4)]}function Q5(e,t,n){const o=(i,a=(i+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[o(5),o(3),o(1)]}function e6(e,t,n){const o=pC(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)o[i]*=1-t-n,o[i]+=t;return o}function t6(e,t,n,o,i){return e===i?(t-n)/o+(t<n?6:0):t===i?(n-e)/o+2:(e-t)/o+4}function qf(e){const t=e.r/255,n=e.g/255,o=e.b/255,i=Math.max(t,n,o),a=Math.min(t,n,o),r=(i+a)/2;let s,l,c;return i!==a&&(c=i-a,l=r>.5?c/(2-i-a):c/(i+a),s=t6(t,n,o,c,i),s=s*60+.5),[s|0,l||0,r]}function Yf(e,t,n,o){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,o)).map(ni)}function Kf(e,t,n){return Yf(pC,e,t,n)}function n6(e,t,n){return Yf(e6,e,t,n)}function o6(e,t,n){return Yf(Q5,e,t,n)}function fC(e){return(e%360+360)%360}function i6(e){const t=J5.exec(e);let n=255,o;if(!t)return;t[5]!==o&&(n=t[6]?cs(+t[5]):ni(+t[5]));const i=fC(+t[2]),a=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?o=n6(i,a,r):t[1]==="hsv"?o=o6(i,a,r):o=Kf(i,a,r),{r:o[0],g:o[1],b:o[2],a:n}}function a6(e,t){var n=qf(e);n[0]=fC(n[0]+t),n=Kf(n),e.r=n[0],e.g=n[1],e.b=n[2]}function r6(e){if(!e)return;const t=qf(e),n=t[0],o=rb(t[1]),i=rb(t[2]);return e.a<255?`hsla(${n}, ${o}%, ${i}%, ${yo(e.a)})`:`hsl(${n}, ${o}%, ${i}%)`}const sb={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},lb={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function s6(){const e={},t=Object.keys(lb),n=Object.keys(sb);let o,i,a,r,s;for(o=0;o<t.length;o++){for(r=s=t[o],i=0;i<n.length;i++)a=n[i],s=s.replace(a,sb[a]);a=parseInt(lb[r],16),e[s]=[a>>16&255,a>>8&255,a&255]}return e}let Gl;function l6(e){Gl||(Gl=s6(),Gl.transparent=[0,0,0,0]);const t=Gl[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const c6=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function d6(e){const t=c6.exec(e);let n=255,o,i,a;if(t){if(t[7]!==o){const r=+t[7];n=t[8]?cs(r):Qo(r*255,0,255)}return o=+t[1],i=+t[3],a=+t[5],o=255&(t[2]?cs(o):Qo(o,0,255)),i=255&(t[4]?cs(i):Qo(i,0,255)),a=255&(t[6]?cs(a):Qo(a,0,255)),{r:o,g:i,b:a,a:n}}}function u6(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${yo(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const rh=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,_a=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function h6(e,t,n){const o=_a(yo(e.r)),i=_a(yo(e.g)),a=_a(yo(e.b));return{r:ni(rh(o+n*(_a(yo(t.r))-o))),g:ni(rh(i+n*(_a(yo(t.g))-i))),b:ni(rh(a+n*(_a(yo(t.b))-a))),a:e.a+n*(t.a-e.a)}}function ql(e,t,n){if(e){let o=qf(e);o[t]=Math.max(0,Math.min(o[t]+o[t]*n,t===0?360:1)),o=Kf(o),e.r=o[0],e.g=o[1],e.b=o[2]}}function gC(e,t){return e&&Object.assign(t||{},e)}function cb(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=ni(e[3]))):(t=gC(e,{r:0,g:0,b:0,a:1}),t.a=ni(t.a)),t}function p6(e){return e.charAt(0)==="r"?d6(e):i6(e)}let mC=class xp{constructor(t){if(t instanceof xp)return t;const n=typeof t;let o;n==="object"?o=cb(t):n==="string"&&(o=K5(t)||l6(t)||p6(t)),this._rgb=o,this._valid=!!o}get valid(){return this._valid}get rgb(){var t=gC(this._rgb);return t&&(t.a=yo(t.a)),t}set rgb(t){this._rgb=cb(t)}rgbString(){return this._valid?u6(this._rgb):void 0}hexString(){return this._valid?X5(this._rgb):void 0}hslString(){return this._valid?r6(this._rgb):void 0}mix(t,n){if(t){const o=this.rgb,i=t.rgb;let a;const r=n===a?.5:n,s=2*r-1,l=o.a-i.a,c=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;a=1-c,o.r=255&c*o.r+a*i.r+.5,o.g=255&c*o.g+a*i.g+.5,o.b=255&c*o.b+a*i.b+.5,o.a=r*o.a+(1-r)*i.a,this.rgb=o}return this}interpolate(t,n){return t&&(this._rgb=h6(this._rgb,t._rgb,n)),this}clone(){return new xp(this.rgb)}alpha(t){return this._rgb.a=ni(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=hl(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return ql(this._rgb,2,t),this}darken(t){return ql(this._rgb,2,-t),this}saturate(t){return ql(this._rgb,1,t),this}desaturate(t){return ql(this._rgb,1,-t),this}rotate(t){return a6(this._rgb,t),this}};function po(){}const f6=(()=>{let e=0;return()=>e++})();function Be(e){return e==null}function ft(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Ae(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function $n(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function qn(e,t){return $n(e)?e:t}function Ge(e,t){return typeof e>"u"?t:e}const g6=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Qe(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Ve(e,t,n,o){let i,a,r;if(ft(e))for(a=e.length,i=0;i<a;i++)t.call(n,e[i],i);else if(Ae(e))for(r=Object.keys(e),a=r.length,i=0;i<a;i++)t.call(n,e[r[i]],r[i])}function md(e,t){let n,o,i,a;if(!e||!t||e.length!==t.length)return!1;for(n=0,o=e.length;n<o;++n)if(i=e[n],a=t[n],i.datasetIndex!==a.datasetIndex||i.index!==a.index)return!1;return!0}function vd(e){if(ft(e))return e.map(vd);if(Ae(e)){const t=Object.create(null),n=Object.keys(e),o=n.length;let i=0;for(;i<o;++i)t[n[i]]=vd(e[n[i]]);return t}return e}function vC(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function m6(e,t,n,o){if(!vC(e))return;const i=t[e],a=n[e];Ae(i)&&Ae(a)?Bs(i,a,o):t[e]=vd(a)}function Bs(e,t,n){const o=ft(t)?t:[t],i=o.length;if(!Ae(e))return e;n=n||{};const a=n.merger||m6;let r;for(let s=0;s<i;++s){if(r=o[s],!Ae(r))continue;const l=Object.keys(r);for(let c=0,d=l.length;c<d;++c)a(l[c],e,r,n)}return e}function xs(e,t){return Bs(e,t,{merger:v6})}function v6(e,t,n){if(!vC(e))return;const o=t[e],i=n[e];Ae(o)&&Ae(i)?xs(o,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=vd(i))}const db={"":e=>e,x:e=>e.x,y:e=>e.y};function b6(e){const t=e.split("."),n=[];let o="";for(const i of t)o+=i,o.endsWith("\\")?o=o.slice(0,-1)+".":(n.push(o),o="");return n}function y6(e){const t=b6(e);return n=>{for(const o of t){if(o==="")break;n=n&&n[o]}return n}}function Ja(e,t){return(db[t]||(db[t]=y6(t)))(e)}function Zf(e){return e.charAt(0).toUpperCase()+e.slice(1)}const zs=e=>typeof e<"u",li=e=>typeof e=="function",ub=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function x6(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const qt=Math.PI,Wi=2*qt,bd=Number.POSITIVE_INFINITY,w6=qt/180,Fn=qt/2,Si=qt/4,hb=qt*2/3,bC=Math.log10,oi=Math.sign;function Rc(e,t,n){return Math.abs(e-t)<n}function pb(e){const t=Math.round(e);e=Rc(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(bC(e))),o=e/n;return(o<=1?1:o<=2?2:o<=5?5:10)*n}function C6(e){const t=[],n=Math.sqrt(e);let o;for(o=1;o<n;o++)e%o===0&&(t.push(o),t.push(e/o));return n===(n|0)&&t.push(n),t.sort((i,a)=>i-a).pop(),t}function _6(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function yd(e){return!_6(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function k6(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function $6(e,t,n){let o,i,a;for(o=0,i=e.length;o<i;o++)a=e[o][n],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function Li(e){return e*(qt/180)}function S6(e){return e*(180/qt)}function fb(e){if(!$n(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function E6(e,t){const n=t.x-e.x,o=t.y-e.y,i=Math.sqrt(n*n+o*o);let a=Math.atan2(o,n);return a<-.5*qt&&(a+=Wi),{angle:a,distance:i}}function O6(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Ei(e){return(e%Wi+Wi)%Wi}function T6(e,t,n,o){const i=Ei(e),a=Ei(t),r=Ei(n),s=Ei(a-i),l=Ei(r-i),c=Ei(i-a),d=Ei(i-r);return i===a||i===r||o||s>l&&c<d}function Bn(e,t,n){return Math.max(t,Math.min(n,e))}function I6(e){return Bn(e,-32768,32767)}function gb(e,t,n,o=1e-6){return e>=Math.min(t,n)-o&&e<=Math.max(t,n)+o}function Xf(e,t,n){n=n||(r=>e[r]<t);let o=e.length-1,i=0,a;for(;o-i>1;)a=i+o>>1,n(a)?i=a:o=a;return{lo:i,hi:o}}const wp=(e,t,n,o)=>Xf(e,n,o?i=>{const a=e[i][t];return a<n||a===n&&e[i+1][t]===n}:i=>e[i][t]<n),P6=(e,t,n)=>Xf(e,n,o=>e[o][t]>=n);function D6(e,t,n){let o=0,i=e.length;for(;o<i&&e[o]<t;)o++;for(;i>o&&e[i-1]>n;)i--;return o>0||i<e.length?e.slice(o,i):e}const yC=["push","pop","shift","splice","unshift"];function A6(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),yC.forEach(n=>{const o="_onData"+Zf(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...a){const r=i.apply(this,a);return e._chartjs.listeners.forEach(s=>{typeof s[o]=="function"&&s[o](...a)}),r}})})}function mb(e,t){const n=e._chartjs;if(!n)return;const o=n.listeners,i=o.indexOf(t);i!==-1&&o.splice(i,1),!(o.length>0)&&(yC.forEach(a=>{delete e[a]}),delete e._chartjs)}function xC(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const wC=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function CC(e,t){let n=[],o=!1;return function(...i){n=i,o||(o=!0,wC.call(window,()=>{o=!1,e.apply(t,n)}))}}function R6(e,t){let n;return function(...o){return t?(clearTimeout(n),n=setTimeout(e,t,o)):e.apply(this,o),t}}const V6=e=>e==="start"?"left":e==="end"?"right":"center",vb=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,Yl=e=>e===0||e===1,bb=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Wi/n)),yb=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Wi/n)+1,ws={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Fn)+1,easeOutSine:e=>Math.sin(e*Fn),easeInOutSine:e=>-.5*(Math.cos(qt*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Yl(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Yl(e)?e:bb(e,.075,.3),easeOutElastic:e=>Yl(e)?e:yb(e,.075,.3),easeInOutElastic(e){return Yl(e)?e:e<.5?.5*bb(e*2,.1125,.45):.5+.5*yb(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-ws.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?ws.easeInBounce(e*2)*.5:ws.easeOutBounce(e*2-1)*.5+.5};function _C(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function xb(e){return _C(e)?e:new mC(e)}function sh(e){return _C(e)?e:new mC(e).saturate(.5).darken(.1).hexString()}const M6=["x","y","borderWidth","radius","tension"],N6=["color","borderColor","backgroundColor"];function L6(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:N6},numbers:{type:"number",properties:M6}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function F6(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const wb=new Map;function B6(e,t){t=t||{};const n=e+JSON.stringify(t);let o=wb.get(n);return o||(o=new Intl.NumberFormat(e,t),wb.set(n,o)),o}function kC(e,t,n){return B6(t,n).format(e)}const z6={values(e){return ft(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const o=this.chart.options.locale;let i,a=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),a=H6(e,n)}const r=bC(Math.abs(a)),s=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),kC(e,o,l)}};function H6(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var $C={formatters:z6};function j6(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:$C.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Qi=Object.create(null),Cp=Object.create(null);function Cs(e,t){if(!t)return e;const n=t.split(".");for(let o=0,i=n.length;o<i;++o){const a=n[o];e=e[a]||(e[a]=Object.create(null))}return e}function lh(e,t,n){return typeof t=="string"?Bs(Cs(e,t),n):Bs(Cs(e,""),t)}let W6=class{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=o=>o.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(o,i)=>sh(i.backgroundColor),this.hoverBorderColor=(o,i)=>sh(i.borderColor),this.hoverColor=(o,i)=>sh(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return lh(this,t,n)}get(t){return Cs(this,t)}describe(t,n){return lh(Cp,t,n)}override(t,n){return lh(Qi,t,n)}route(t,n,o,i){const a=Cs(this,t),r=Cs(this,o),s="_"+n;Object.defineProperties(a,{[s]:{value:a[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[s],c=r[i];return Ae(l)?Object.assign({},c,l):Ge(l,c)},set(l){this[s]=l}}})}apply(t){t.forEach(n=>n(this))}};var nt=new W6({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[L6,F6,j6]);function U6(e){return!e||Be(e.size)||Be(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Cb(e,t,n,o,i){let a=t[i];return a||(a=t[i]=e.measureText(i).width,n.push(i)),a>o&&(o=a),o}function Oi(e,t,n){const o=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*o)/o+i}function _b(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function kb(e,t,n,o){G6(e,t,n,o)}function G6(e,t,n,o,i){let a,r,s,l,c,d,u,h;const p=t.pointStyle,m=t.rotation,g=t.radius;let b=(m||0)*w6;if(p&&typeof p=="object"&&(a=p.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){e.save(),e.translate(n,o),e.rotate(b),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),e.restore();return}if(!(isNaN(g)||g<=0)){switch(e.beginPath(),p){default:e.arc(n,o,g,0,Wi),e.closePath();break;case"triangle":d=g,e.moveTo(n+Math.sin(b)*d,o-Math.cos(b)*g),b+=hb,e.lineTo(n+Math.sin(b)*d,o-Math.cos(b)*g),b+=hb,e.lineTo(n+Math.sin(b)*d,o-Math.cos(b)*g),e.closePath();break;case"rectRounded":c=g*.516,l=g-c,r=Math.cos(b+Si)*l,u=Math.cos(b+Si)*l,s=Math.sin(b+Si)*l,h=Math.sin(b+Si)*l,e.arc(n-u,o-s,c,b-qt,b-Fn),e.arc(n+h,o-r,c,b-Fn,b),e.arc(n+u,o+s,c,b,b+Fn),e.arc(n-h,o+r,c,b+Fn,b+qt),e.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*g,d=l,e.rect(n-d,o-l,2*d,2*l);break}b+=Si;case"rectRot":u=Math.cos(b)*g,r=Math.cos(b)*g,s=Math.sin(b)*g,h=Math.sin(b)*g,e.moveTo(n-u,o-s),e.lineTo(n+h,o-r),e.lineTo(n+u,o+s),e.lineTo(n-h,o+r),e.closePath();break;case"crossRot":b+=Si;case"cross":u=Math.cos(b)*g,r=Math.cos(b)*g,s=Math.sin(b)*g,h=Math.sin(b)*g,e.moveTo(n-u,o-s),e.lineTo(n+u,o+s),e.moveTo(n+h,o-r),e.lineTo(n-h,o+r);break;case"star":u=Math.cos(b)*g,r=Math.cos(b)*g,s=Math.sin(b)*g,h=Math.sin(b)*g,e.moveTo(n-u,o-s),e.lineTo(n+u,o+s),e.moveTo(n+h,o-r),e.lineTo(n-h,o+r),b+=Si,u=Math.cos(b)*g,r=Math.cos(b)*g,s=Math.sin(b)*g,h=Math.sin(b)*g,e.moveTo(n-u,o-s),e.lineTo(n+u,o+s),e.moveTo(n+h,o-r),e.lineTo(n-h,o+r);break;case"line":r=Math.cos(b)*g,s=Math.sin(b)*g,e.moveTo(n-r,o-s),e.lineTo(n+r,o+s);break;case"dash":e.moveTo(n,o),e.lineTo(n+Math.cos(b)*g,o+Math.sin(b)*g);break;case!1:e.closePath();break}e.fill(),e.stroke()}}function SC(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function EC(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function OC(e){e.restore()}function q6(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Be(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function Y6(e,t,n,o,i){if(i.strikethrough||i.underline){const a=e.measureText(o),r=t-a.actualBoundingBoxLeft,s=t+a.actualBoundingBoxRight,l=n-a.actualBoundingBoxAscent,c=n+a.actualBoundingBoxDescent,d=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(r,d),e.lineTo(s,d),e.stroke()}}function K6(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function $b(e,t,n,o,i,a={}){const r=ft(t)?t:[t],s=a.strokeWidth>0&&a.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,q6(e,a),l=0;l<r.length;++l)c=r[l],a.backdrop&&K6(e,a.backdrop),s&&(a.strokeColor&&(e.strokeStyle=a.strokeColor),Be(a.strokeWidth)||(e.lineWidth=a.strokeWidth),e.strokeText(c,n,o,a.maxWidth)),e.fillText(c,n,o,a.maxWidth),Y6(e,n,o,c,a),o+=Number(i.lineHeight);e.restore()}function _p(e,t){const{x:n,y:o,w:i,h:a,radius:r}=t;e.arc(n+r.topLeft,o+r.topLeft,r.topLeft,1.5*qt,qt,!0),e.lineTo(n,o+a-r.bottomLeft),e.arc(n+r.bottomLeft,o+a-r.bottomLeft,r.bottomLeft,qt,Fn,!0),e.lineTo(n+i-r.bottomRight,o+a),e.arc(n+i-r.bottomRight,o+a-r.bottomRight,r.bottomRight,Fn,0,!0),e.lineTo(n+i,o+r.topRight),e.arc(n+i-r.topRight,o+r.topRight,r.topRight,0,-Fn,!0),e.lineTo(n+r.topLeft,o)}const Z6=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,X6=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function J6(e,t){const n=(""+e).match(Z6);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const Q6=e=>+e||0;function TC(e,t){const n={},o=Ae(t),i=o?Object.keys(t):t,a=Ae(e)?o?r=>Ge(e[r],e[t[r]]):r=>e[r]:()=>e;for(const r of i)n[r]=Q6(a(r));return n}function IC(e){return TC(e,{top:"y",right:"x",bottom:"y",left:"x"})}function _s(e){return TC(e,["topLeft","topRight","bottomLeft","bottomRight"])}function ci(e){const t=IC(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function eo(e,t){e=e||{},t=t||nt.font;let n=Ge(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let o=Ge(e.style,t.style);o&&!(""+o).match(X6)&&(console.warn('Invalid font style specified: "'+o+'"'),o=void 0);const i={family:Ge(e.family,t.family),lineHeight:J6(Ge(e.lineHeight,t.lineHeight),n),size:n,style:o,weight:Ge(e.weight,t.weight),string:""};return i.string=U6(i),i}function Kl(e,t,n,o){let i,a,r;for(i=0,a=e.length;i<a;++i)if(r=e[i],r!==void 0&&r!==void 0)return r}function eB(e,t,n){const{min:o,max:i}=e,a=g6(t,(i-o)/2),r=(s,l)=>n&&s===0?0:s+l;return{min:r(o,-Math.abs(a)),max:r(i,a)}}function pr(e,t){return Object.assign(Object.create(e),t)}function Jf(e,t=[""],n,o,i=()=>e[0]){const a=n||e;typeof o>"u"&&(o=RC("_fallback",e));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:o,_getTarget:i,override:s=>Jf([s,...e],t,a,o)};return new Proxy(r,{deleteProperty(s,l){return delete s[l],delete s._keys,delete e[0][l],!0},get(s,l){return DC(s,l,()=>lB(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return Eb(s).includes(l)},ownKeys(s){return Eb(s)},set(s,l,c){const d=s._storage||(s._storage=i());return s[l]=d[l]=c,delete s._keys,!0}})}function Qa(e,t,n,o){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:PC(e,o),setContext:a=>Qa(e,a,n,o),override:a=>Qa(e.override(a),t,n,o)};return new Proxy(i,{deleteProperty(a,r){return delete a[r],delete e[r],!0},get(a,r,s){return DC(a,r,()=>nB(a,r,s))},getOwnPropertyDescriptor(a,r){return a._descriptors.allKeys?Reflect.has(e,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,r)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(a,r){return Reflect.has(e,r)},ownKeys(){return Reflect.ownKeys(e)},set(a,r,s){return e[r]=s,delete a[r],!0}})}function PC(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:o=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:o,isScriptable:li(n)?n:()=>n,isIndexable:li(o)?o:()=>o}}const tB=(e,t)=>e?e+Zf(t):t,Qf=(e,t)=>Ae(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function DC(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const o=n();return e[t]=o,o}function nB(e,t,n){const{_proxy:o,_context:i,_subProxy:a,_descriptors:r}=e;let s=o[t];return li(s)&&r.isScriptable(t)&&(s=oB(t,s,e,n)),ft(s)&&s.length&&(s=iB(t,s,e,r.isIndexable)),Qf(t,s)&&(s=Qa(s,i,a&&a[t],r)),s}function oB(e,t,n,o){const{_proxy:i,_context:a,_subProxy:r,_stack:s}=n;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(a,r||o);return s.delete(e),Qf(e,l)&&(l=eg(i._scopes,i,e,l)),l}function iB(e,t,n,o){const{_proxy:i,_context:a,_subProxy:r,_descriptors:s}=n;if(typeof a.index<"u"&&o(e))return t[a.index%t.length];if(Ae(t[0])){const l=t,c=i._scopes.filter(d=>d!==l);t=[];for(const d of l){const u=eg(c,i,e,d);t.push(Qa(u,a,r&&r[e],s))}}return t}function AC(e,t,n){return li(e)?e(t,n):e}const aB=(e,t)=>e===!0?t:typeof e=="string"?Ja(t,e):void 0;function rB(e,t,n,o,i){for(const a of t){const r=aB(n,a);if(r){e.add(r);const s=AC(r._fallback,n,i);if(typeof s<"u"&&s!==n&&s!==o)return s}else if(r===!1&&typeof o<"u"&&n!==o)return null}return!1}function eg(e,t,n,o){const i=t._rootScopes,a=AC(t._fallback,n,o),r=[...e,...i],s=new Set;s.add(o);let l=Sb(s,r,n,a||n,o);return l===null||typeof a<"u"&&a!==n&&(l=Sb(s,r,a,l,o),l===null)?!1:Jf(Array.from(s),[""],i,a,()=>sB(t,n,o))}function Sb(e,t,n,o,i){for(;n;)n=rB(e,t,n,o,i);return n}function sB(e,t,n){const o=e._getTarget();t in o||(o[t]={});const i=o[t];return ft(i)&&Ae(n)?n:i||{}}function lB(e,t,n,o){let i;for(const a of t)if(i=RC(tB(a,e),n),typeof i<"u")return Qf(e,i)?eg(n,o,e,i):i}function RC(e,t){for(const n of t){if(!n)continue;const o=n[e];if(typeof o<"u")return o}}function Eb(e){let t=e._keys;return t||(t=e._keys=cB(e._scopes)),t}function cB(e){const t=new Set;for(const n of e)for(const o of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(o);return Array.from(t)}function tg(){return typeof window<"u"&&typeof document<"u"}function ng(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function xd(e,t,n){let o;return typeof e=="string"?(o=parseInt(e,10),e.indexOf("%")!==-1&&(o=o/100*t.parentNode[n])):o=e,o}const hu=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function dB(e,t){return hu(e).getPropertyValue(t)}const uB=["top","right","bottom","left"];function Ui(e,t,n){const o={};n=n?"-"+n:"";for(let i=0;i<4;i++){const a=uB[i];o[a]=parseFloat(e[t+"-"+a+n])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}const hB=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function pB(e,t){const n=e.touches,o=n&&n.length?n[0]:e,{offsetX:i,offsetY:a}=o;let r=!1,s,l;if(hB(i,a,e.target))s=i,l=a;else{const c=t.getBoundingClientRect();s=o.clientX-c.left,l=o.clientY-c.top,r=!0}return{x:s,y:l,box:r}}function Pi(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:o}=t,i=hu(n),a=i.boxSizing==="border-box",r=Ui(i,"padding"),s=Ui(i,"border","width"),{x:l,y:c,box:d}=pB(e,n),u=r.left+(d&&s.left),h=r.top+(d&&s.top);let{width:p,height:m}=t;return a&&(p-=r.width+s.width,m-=r.height+s.height),{x:Math.round((l-u)/p*n.width/o),y:Math.round((c-h)/m*n.height/o)}}function fB(e,t,n){let o,i;if(t===void 0||n===void 0){const a=e&&ng(e);if(!a)t=e.clientWidth,n=e.clientHeight;else{const r=a.getBoundingClientRect(),s=hu(a),l=Ui(s,"border","width"),c=Ui(s,"padding");t=r.width-c.width-l.width,n=r.height-c.height-l.height,o=xd(s.maxWidth,a,"clientWidth"),i=xd(s.maxHeight,a,"clientHeight")}}return{width:t,height:n,maxWidth:o||bd,maxHeight:i||bd}}const ei=e=>Math.round(e*10)/10;function gB(e,t,n,o){const i=hu(e),a=Ui(i,"margin"),r=xd(i.maxWidth,e,"clientWidth")||bd,s=xd(i.maxHeight,e,"clientHeight")||bd,l=fB(e,t,n);let{width:c,height:d}=l;if(i.boxSizing==="content-box"){const u=Ui(i,"border","width"),h=Ui(i,"padding");c-=h.width+u.width,d-=h.height+u.height}return c=Math.max(0,c-a.width),d=Math.max(0,o?c/o:d-a.height),c=ei(Math.min(c,r,l.maxWidth)),d=ei(Math.min(d,s,l.maxHeight)),c&&!d&&(d=ei(c/2)),(t!==void 0||n!==void 0)&&o&&l.height&&d>l.height&&(d=l.height,c=ei(Math.floor(d*o))),{width:c,height:d}}function Ob(e,t,n){const o=t||1,i=ei(e.height*o),a=ei(e.width*o);e.height=ei(e.height),e.width=ei(e.width);const r=e.canvas;return r.style&&(n||!r.style.height&&!r.style.width)&&(r.style.height=`${e.height}px`,r.style.width=`${e.width}px`),e.currentDevicePixelRatio!==o||r.height!==i||r.width!==a?(e.currentDevicePixelRatio=o,r.height=i,r.width=a,e.ctx.setTransform(o,0,0,o,0,0),!0):!1}const mB=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};tg()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function Tb(e,t){const n=dB(e,t),o=n&&n.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}const vB=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,o){return n-o},leftForLtr(n,o){return n-o}}},bB=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function ch(e,t,n){return e?vB(t,n):bB()}function yB(e,t){let n,o;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,o=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=o)}function xB(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Zl(e,t,n){return e.options.clip?e[n]:t[n]}function wB(e,t){const{xScale:n,yScale:o}=e;return n&&o?{left:Zl(n,t,"left"),right:Zl(n,t,"right"),top:Zl(o,t,"top"),bottom:Zl(o,t,"bottom")}:t}function CB(e,t){const n=t._clip;if(n.disabled)return!1;const o=wB(t,e.chartArea);return{left:n.left===!1?0:o.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:o.right+(n.right===!0?0:n.right),top:n.top===!1?0:o.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:o.bottom+(n.bottom===!0?0:n.bottom)}}var _B=Object.defineProperty,kB=(e,t,n)=>t in e?_B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,De=(e,t,n)=>kB(e,typeof t!="symbol"?t+"":t,n);class $B{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,o,i){const a=n.listeners[i],r=n.duration;a.forEach(s=>s({chart:t,initial:n.initial,numSteps:r,currentStep:Math.min(o-n.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=wC.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((o,i)=>{if(!o.running||!o.items.length)return;const a=o.items;let r=a.length-1,s=!1,l;for(;r>=0;--r)l=a[r],l._active?(l._total>o.duration&&(o.duration=l._total),l.tick(t),s=!0):(a[r]=a[a.length-1],a.pop());s&&(i.draw(),this._notify(i,o,t,"progress")),a.length||(o.running=!1,this._notify(i,o,t,"complete"),o.initial=!1),n+=a.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let o=n.get(t);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,o)),o}listen(t,n,o){this._getAnims(t).listeners[n].push(o)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((o,i)=>Math.max(o,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const o=n.items;let i=o.length-1;for(;i>=0;--i)o[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var go=new $B;const Ib="transparent",SB={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const o=xb(e||Ib),i=o.valid&&xb(t||Ib);return i&&i.valid?i.mix(o,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class EB{constructor(t,n,o,i){const a=n[o];i=Kl([t.to,i,a,t.from]);const r=Kl([t.from,a,i]);this._active=!0,this._fn=t.fn||SB[t.type||typeof r],this._easing=ws[t.easing]||ws.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=o,this._from=r,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,o){if(this._active){this._notify(!1);const i=this._target[this._prop],a=o-this._start,r=this._duration-a;this._start=o,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=Kl([t.to,n,i,t.from]),this._from=Kl([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,o=this._duration,i=this._prop,a=this._from,r=this._loop,s=this._to;let l;if(this._active=a!==s&&(r||n<o),!this._active){this._target[i]=s,this._notify(!0);return}if(n<0){this._target[i]=a;return}l=n/o%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(a,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,o)=>{t.push({res:n,rej:o})})}_notify(t){const n=t?"res":"rej",o=this._promises||[];for(let i=0;i<o.length;i++)o[i][n]()}}class VC{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Ae(t))return;const n=Object.keys(nt.animation),o=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const a=t[i];if(!Ae(a))return;const r={};for(const s of n)r[s]=a[s];(ft(a.properties)&&a.properties||[i]).forEach(s=>{(s===i||!o.has(s))&&o.set(s,r)})})}_animateOptions(t,n){const o=n.options,i=TB(t,o);if(!i)return[];const a=this._createAnimations(i,o);return o.$shared&&OB(t.options.$animations,o).then(()=>{t.options=o},()=>{}),a}_createAnimations(t,n){const o=this._properties,i=[],a=t.$animations||(t.$animations={}),r=Object.keys(n),s=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const d=n[c];let u=a[c];const h=o.get(c);if(u)if(h&&u.active()){u.update(h,d,s);continue}else u.cancel();if(!h||!h.duration){t[c]=d;continue}a[c]=u=new EB(h,t,c,d),i.push(u)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const o=this._createAnimations(t,n);if(o.length)return go.add(this._chart,o),!0}}function OB(e,t){const n=[],o=Object.keys(t);for(let i=0;i<o.length;i++){const a=e[o[i]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}function TB(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Pb(e,t){const n=e&&e.options||{},o=n.reverse,i=n.min===void 0?t:0,a=n.max===void 0?t:0;return{start:o?a:i,end:o?i:a}}function IB(e,t,n){if(n===!1)return!1;const o=Pb(e,n),i=Pb(t,n);return{top:i.end,right:o.end,bottom:i.start,left:o.start}}function PB(e){let t,n,o,i;return Ae(e)?(t=e.top,n=e.right,o=e.bottom,i=e.left):t=n=o=i=e,{top:t,right:n,bottom:o,left:i,disabled:e===!1}}function MC(e,t){const n=[],o=e._getSortedDatasetMetas(t);let i,a;for(i=0,a=o.length;i<a;++i)n.push(o[i].index);return n}function Db(e,t,n,o={}){const i=e.keys,a=o.mode==="single";let r,s,l,c;if(t===null)return;let d=!1;for(r=0,s=i.length;r<s;++r){if(l=+i[r],l===n){if(d=!0,o.all)continue;break}c=e.values[l],$n(c)&&(a||t===0||oi(t)===oi(c))&&(t+=c)}return!d&&!o.all?0:t}function DB(e,t){const{iScale:n,vScale:o}=t,i=n.axis==="x"?"x":"y",a=o.axis==="x"?"x":"y",r=Object.keys(e),s=new Array(r.length);let l,c,d;for(l=0,c=r.length;l<c;++l)d=r[l],s[l]={[i]:d,[a]:e[d]};return s}function dh(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function AB(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function RB(e){const{min:t,max:n,minDefined:o,maxDefined:i}=e.getUserBounds();return{min:o?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function VB(e,t,n){const o=e[t]||(e[t]={});return o[n]||(o[n]={})}function Ab(e,t,n,o){for(const i of t.getMatchingVisibleMetas(o).reverse()){const a=e[i.index];if(n&&a>0||!n&&a<0)return i.index}return null}function Rb(e,t){const{chart:n,_cachedMeta:o}=e,i=n._stacks||(n._stacks={}),{iScale:a,vScale:r,index:s}=o,l=a.axis,c=r.axis,d=AB(a,r,o),u=t.length;let h;for(let p=0;p<u;++p){const m=t[p],{[l]:g,[c]:b}=m,v=m._stacks||(m._stacks={});h=v[c]=VB(i,d,g),h[s]=b,h._top=Ab(h,r,!0,o.type),h._bottom=Ab(h,r,!1,o.type);const y=h._visualValues||(h._visualValues={});y[s]=b}}function uh(e,t){const n=e.scales;return Object.keys(n).filter(o=>n[o].axis===t).shift()}function MB(e,t){return pr(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function NB(e,t,n){return pr(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Hr(e,t){const n=e.controller.index,o=e.vScale&&e.vScale.axis;if(o){t=t||e._parsed;for(const i of t){const a=i._stacks;if(!a||a[o]===void 0||a[o][n]===void 0)return;delete a[o][n],a[o]._visualValues!==void 0&&a[o]._visualValues[n]!==void 0&&delete a[o]._visualValues[n]}}}const hh=e=>e==="reset"||e==="none",Vb=(e,t)=>t?e:Object.assign({},e),LB=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:MC(n,!0),values:null};class ks{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=dh(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Hr(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,o=this.getDataset(),i=(u,h,p,m)=>u==="x"?h:u==="r"?m:p,a=n.xAxisID=Ge(o.xAxisID,uh(t,"x")),r=n.yAxisID=Ge(o.yAxisID,uh(t,"y")),s=n.rAxisID=Ge(o.rAxisID,uh(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,a,r,s),d=n.vAxisID=i(l,r,a,s);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(r),n.rScale=this.getScaleForId(s),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&mb(this._data,this),t._stacked&&Hr(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),o=this._data;if(Ae(n)){const i=this._cachedMeta;this._data=DB(n,i)}else if(o!==n){if(o){mb(o,this);const i=this._cachedMeta;Hr(i),i._parsed=[]}n&&Object.isExtensible(n)&&A6(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,o=this.getDataset();let i=!1;this._dataCheck();const a=n._stacked;n._stacked=dh(n.vScale,n),n.stack!==o.stack&&(i=!0,Hr(n),n.stack=o.stack),this._resyncElements(t),(i||a!==n._stacked)&&(Rb(this,n._parsed),n._stacked=dh(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),o=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:o,_data:i}=this,{iScale:a,_stacked:r}=o,s=a.axis;let l=t===0&&n===i.length?!0:o._sorted,c=t>0&&o._parsed[t-1],d,u,h;if(this._parsing===!1)o._parsed=i,o._sorted=!0,h=i;else{ft(i[t])?h=this.parseArrayData(o,i,t,n):Ae(i[t])?h=this.parseObjectData(o,i,t,n):h=this.parsePrimitiveData(o,i,t,n);const p=()=>u[s]===null||c&&u[s]<c[s];for(d=0;d<n;++d)o._parsed[d+t]=u=h[d],l&&(p()&&(l=!1),c=u);o._sorted=l}r&&Rb(this,h)}parsePrimitiveData(t,n,o,i){const{iScale:a,vScale:r}=t,s=a.axis,l=r.axis,c=a.getLabels(),d=a===r,u=new Array(i);let h,p,m;for(h=0,p=i;h<p;++h)m=h+o,u[h]={[s]:d||a.parse(c[m],m),[l]:r.parse(n[m],m)};return u}parseArrayData(t,n,o,i){const{xScale:a,yScale:r}=t,s=new Array(i);let l,c,d,u;for(l=0,c=i;l<c;++l)d=l+o,u=n[d],s[l]={x:a.parse(u[0],d),y:r.parse(u[1],d)};return s}parseObjectData(t,n,o,i){const{xScale:a,yScale:r}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let d,u,h,p;for(d=0,u=i;d<u;++d)h=d+o,p=n[h],c[d]={x:a.parse(Ja(p,s),h),y:r.parse(Ja(p,l),h)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,o){const i=this.chart,a=this._cachedMeta,r=n[t.axis],s={keys:MC(i,!0),values:n._stacks[t.axis]._visualValues};return Db(s,r,a.index,{mode:o})}updateRangeFromParsed(t,n,o,i){const a=o[n.axis];let r=a===null?NaN:a;const s=i&&o._stacks[n.axis];i&&s&&(i.values=s,r=Db(i,a,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,n){const o=this._cachedMeta,i=o._parsed,a=o._sorted&&t===o.iScale,r=i.length,s=this._getOtherScale(t),l=LB(n,o,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:u}=RB(s);let h,p;function m(){p=i[h];const g=p[s.axis];return!$n(p[t.axis])||d>g||u<g}for(h=0;h<r&&!(!m()&&(this.updateRangeFromParsed(c,t,p,l),a));++h);if(a){for(h=r-1;h>=0;--h)if(!m()){this.updateRangeFromParsed(c,t,p,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,o=[];let i,a,r;for(i=0,a=n.length;i<a;++i)r=n[i][t.axis],$n(r)&&o.push(r);return o}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,o=n.iScale,i=n.vScale,a=this.getParsed(t);return{label:o?""+o.getLabelForValue(a[o.axis]):"",value:i?""+i.getLabelForValue(a[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=PB(Ge(this.options.clip,IB(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,o=this._cachedMeta,i=o.data||[],a=n.chartArea,r=[],s=this._drawStart||0,l=this._drawCount||i.length-s,c=this.options.drawActiveElementsOnTop;let d;for(o.dataset&&o.dataset.draw(t,a,s,l),d=s;d<s+l;++d){const u=i[d];u.hidden||(u.active&&c?r.push(u):u.draw(t,a))}for(d=0;d<r.length;++d)r[d].draw(t,a)}getStyle(t,n){const o=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(t||0,o)}getContext(t,n,o){const i=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const r=this._cachedMeta.data[t];a=r.$context||(r.$context=NB(this.getContext(),t,r)),a.parsed=this.getParsed(t),a.raw=i.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=MB(this.chart.getContext(),this.index)),a.dataset=i,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=o,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",o){const i=n==="active",a=this._cachedDataOpts,r=t+"-"+n,s=a[r],l=this.enableOptionSharing&&zs(o);if(s)return Vb(s,l);const c=this.chart.config,d=c.datasetElementScopeKeys(this._type,t),u=i?[`${t}Hover`,"hover",t,""]:[t,""],h=c.getOptionScopes(this.getDataset(),d),p=Object.keys(nt.elements[t]),m=()=>this.getContext(o,i,n),g=c.resolveNamedOptions(h,p,m,u);return g.$shared&&(g.$shared=l,a[r]=Object.freeze(Vb(g,l))),g}_resolveAnimations(t,n,o){const i=this.chart,a=this._cachedDataOpts,r=`animation-${n}`,s=a[r];if(s)return s;let l;if(i.options.animation!==!1){const d=this.chart.config,u=d.datasetAnimationScopeKeys(this._type,n),h=d.getOptionScopes(this.getDataset(),u);l=d.createResolver(h,this.getContext(t,o,n))}const c=new VC(i,l&&l.animations);return l&&l._cacheable&&(a[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||hh(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const o=this.resolveDataElementOptions(t,n),i=this._sharedOptions,a=this.getSharedOptions(o),r=this.includeOptions(n,a)||a!==i;return this.updateSharedOptions(a,n,o),{sharedOptions:a,includeOptions:r}}updateElement(t,n,o,i){hh(i)?Object.assign(t,o):this._resolveAnimations(n,i).update(t,o)}updateSharedOptions(t,n,o){t&&!hh(n)&&this._resolveAnimations(void 0,n).update(t,o)}_setStyle(t,n,o,i){t.active=i;const a=this.getStyle(n,i);this._resolveAnimations(n,o,i).update(t,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(t,n,o){this._setStyle(t,o,"active",!1)}setHoverStyle(t,n,o){this._setStyle(t,o,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,o=this._cachedMeta.data;for(const[s,l,c]of this._syncList)this[s](l,c);this._syncList=[];const i=o.length,a=n.length,r=Math.min(a,i);r&&this.parse(0,r),a>i?this._insertElements(i,a-i,t):a<i&&this._removeElements(a,i-a)}_insertElements(t,n,o=!0){const i=this._cachedMeta,a=i.data,r=t+n;let s;const l=c=>{for(c.length+=n,s=c.length-1;s>=r;s--)c[s]=c[s-n]};for(l(a),s=t;s<r;++s)a[s]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),o&&this.updateElements(a,t,n,"reset")}updateElements(t,n,o,i){}_removeElements(t,n){const o=this._cachedMeta;if(this._parsing){const i=o._parsed.splice(t,n);o._stacked&&Hr(o,i)}o.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,o,i]=t;this[n](o,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const o=arguments.length-2;o&&this._sync(["_insertElements",t,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}De(ks,"defaults",{}),De(ks,"datasetElementType",null),De(ks,"dataElementType",null);function FB(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let o=[];for(let i=0,a=n.length;i<a;i++)o=o.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=xC(o.sort((i,a)=>i-a))}return e._cache.$bar}function BB(e){const t=e.iScale,n=FB(t,e.type);let o=t._length,i,a,r,s;const l=()=>{r===32767||r===-32768||(zs(s)&&(o=Math.min(o,Math.abs(r-s)||o)),s=r)};for(i=0,a=n.length;i<a;++i)r=t.getPixelForValue(n[i]),l();for(s=void 0,i=0,a=t.ticks.length;i<a;++i)r=t.getPixelForTick(i),l();return o}function zB(e,t,n,o){const i=n.barThickness;let a,r;return Be(i)?(a=t.min*n.categoryPercentage,r=n.barPercentage):(a=i*o,r=1),{chunk:a/o,ratio:r,start:t.pixels[e]-a/2}}function HB(e,t,n,o){const i=t.pixels,a=i[e];let r=e>0?i[e-1]:null,s=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;r===null&&(r=a-(s===null?t.end-t.start:s-a)),s===null&&(s=a+a-r);const c=a-(a-Math.min(r,s))/2*l;return{chunk:Math.abs(s-r)/2*l/o,ratio:n.barPercentage,start:c}}function jB(e,t,n,o){const i=n.parse(e[0],o),a=n.parse(e[1],o),r=Math.min(i,a),s=Math.max(i,a);let l=r,c=s;Math.abs(r)>Math.abs(s)&&(l=s,c=r),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:a,min:r,max:s}}function NC(e,t,n,o){return ft(e)?jB(e,t,n,o):t[n.axis]=n.parse(e,o),t}function Mb(e,t,n,o){const i=e.iScale,a=e.vScale,r=i.getLabels(),s=i===a,l=[];let c,d,u,h;for(c=n,d=n+o;c<d;++c)h=t[c],u={},u[i.axis]=s||i.parse(r[c],c),l.push(NC(h,u,a,c));return l}function ph(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function WB(e,t,n){return e!==0?oi(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function UB(e){let t,n,o,i,a;return e.horizontal?(t=e.base>e.x,n="left",o="right"):(t=e.base<e.y,n="bottom",o="top"),t?(i="end",a="start"):(i="start",a="end"),{start:n,end:o,reverse:t,top:i,bottom:a}}function GB(e,t,n,o){let i=t.borderSkipped;const a={};if(!i){e.borderSkipped=a;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:r,end:s,reverse:l,top:c,bottom:d}=UB(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===o?i=c:(n._bottom||0)===o?i=d:(a[Nb(d,r,s,l)]=!0,i=c)),a[Nb(i,r,s,l)]=!0,e.borderSkipped=a}function Nb(e,t,n,o){return o?(e=qB(e,t,n),e=Lb(e,n,t)):e=Lb(e,t,n),e}function qB(e,t,n){return e===t?n:e===n?t:e}function Lb(e,t,n){return e==="start"?t:e==="end"?n:e}function YB(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class Vc extends ks{parsePrimitiveData(t,n,o,i){return Mb(t,n,o,i)}parseArrayData(t,n,o,i){return Mb(t,n,o,i)}parseObjectData(t,n,o,i){const{iScale:a,vScale:r}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=a.axis==="x"?s:l,d=r.axis==="x"?s:l,u=[];let h,p,m,g;for(h=o,p=o+i;h<p;++h)g=n[h],m={},m[a.axis]=a.parse(Ja(g,c),h),u.push(NC(Ja(g,d),m,r,h));return u}updateRangeFromParsed(t,n,o,i){super.updateRangeFromParsed(t,n,o,i);const a=o._custom;a&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:o,vScale:i}=n,a=this.getParsed(t),r=a._custom,s=ph(r)?"["+r.start+", "+r.end+"]":""+i.getLabelForValue(a[i.axis]);return{label:""+o.getLabelForValue(a[o.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,o,i){const a=i==="reset",{index:r,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),c=s.isHorizontal(),d=this._getRuler(),{sharedOptions:u,includeOptions:h}=this._getSharedOptions(n,i);for(let p=n;p<n+o;p++){const m=this.getParsed(p),g=a||Be(m[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),b=this._calculateBarIndexPixels(p,d),v=(m._stacks||{})[s.axis],y={horizontal:c,base:g.base,enableBorderRadius:!v||ph(m._custom)||r===v._top||r===v._bottom,x:c?g.head:b.center,y:c?b.center:g.head,height:c?b.size:Math.abs(g.size),width:c?Math.abs(g.size):b.size};h&&(y.options=u||this.resolveDataElementOptions(p,t[p].active?"active":i));const w=y.options||t[p].options;GB(y,w,v,r),YB(y,w,d.ratio),this.updateElement(t[p],p,y,i)}}_getStacks(t,n){const{iScale:o}=this._cachedMeta,i=o.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),a=o.options.stacked,r=[],s=this._cachedMeta.controller.getParsed(n),l=s&&s[o.axis],c=d=>{const u=d._parsed.find(p=>p[o.axis]===l),h=u&&u[d.vScale.axis];if(Be(h)||isNaN(h))return!0};for(const d of i)if(!(n!==void 0&&c(d))&&((a===!1||r.indexOf(d.stack)===-1||a===void 0&&d.stack===void 0)&&r.push(d.stack),d.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(o=>t[o].axis===n).shift()}_getAxis(){const t={},n=this.getFirstScaleIdForIndexAxis();for(const o of this.chart.data.datasets)t[Ge(this.chart.options.indexAxis==="x"?o.xAxisID:o.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,o){const i=this._getStacks(t,o),a=n!==void 0?i.indexOf(n):-1;return a===-1?i.length-1:a}_getRuler(){const t=this.options,n=this._cachedMeta,o=n.iScale,i=[];let a,r;for(a=0,r=n.data.length;a<r;++a)i.push(o.getPixelForValue(this.getParsed(a)[o.axis],a));const s=t.barThickness;return{min:s||BB(n),pixels:i,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:o,index:i},options:{base:a,minBarLength:r}}=this,s=a||0,l=this.getParsed(t),c=l._custom,d=ph(c);let u=l[n.axis],h=0,p=o?this.applyStack(n,l,o):u,m,g;p!==u&&(h=p-u,p=u),d&&(u=c.barStart,p=c.barEnd-c.barStart,u!==0&&oi(u)!==oi(c.barEnd)&&(h=0),h+=u);const b=!Be(a)&&!d?a:h;let v=n.getPixelForValue(b);if(this.chart.getDataVisibility(t)?m=n.getPixelForValue(h+p):m=v,g=m-v,Math.abs(g)<r){g=WB(g,n,s)*r,u===s&&(v-=g/2);const y=n.getPixelForDecimal(0),w=n.getPixelForDecimal(1),C=Math.min(y,w),k=Math.max(y,w);v=Math.max(Math.min(v,k),C),m=v+g,o&&!d&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(v))}if(v===n.getPixelForValue(s)){const y=oi(g)*n.getLineWidthForValue(s)/2;v+=y,g-=y}return{size:g,base:v,head:m,center:m+g/2}}_calculateBarIndexPixels(t,n){const o=n.scale,i=this.options,a=i.skipNull,r=Ge(i.maxBarThickness,1/0);let s,l;const c=this._getAxisCount();if(n.grouped){const d=a?this._getStackCount(t):n.stackCount,u=i.barThickness==="flex"?HB(t,n,i,d*c):zB(t,n,i,d*c),h=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,p=this._getAxis().indexOf(Ge(h,this.getFirstScaleIdForIndexAxis())),m=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0)+p;s=u.start+u.chunk*m+u.chunk/2,l=Math.min(r,u.chunk*u.ratio)}else s=o.getPixelForValue(this.getParsed(t)[o.axis],t),l=Math.min(r,n.min*n.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,o=t.data,i=o.length;let a=0;for(;a<i;++a)this.getParsed(a)[n.axis]!==null&&!o[a].hidden&&o[a].draw(this._ctx)}}De(Vc,"id","bar"),De(Vc,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),De(Vc,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function Ti(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class og{constructor(t){De(this,"options"),this.options=t||{}}static override(t){Object.assign(og.prototype,t)}init(){}formats(){return Ti()}parse(){return Ti()}format(){return Ti()}add(){return Ti()}diff(){return Ti()}startOf(){return Ti()}endOf(){return Ti()}}var LC={_date:og};function KB(e,t,n,o){const{controller:i,data:a,_sorted:r}=e,s=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!=="r"&&r&&a.length){const c=s._reversePixels?P6:wp;if(o){if(i._sharedOptions){const d=a[0],u=typeof d.getRange=="function"&&d.getRange(t);if(u){const h=c(a,t,n-u),p=c(a,t,n+u);return{lo:h.lo,hi:p.hi}}}}else{const d=c(a,t,n);if(l){const{vScale:u}=i._cachedMeta,{_parsed:h}=e,p=h.slice(0,d.lo+1).reverse().findIndex(g=>!Be(g[u.axis]));d.lo-=Math.max(0,p);const m=h.slice(d.hi).findIndex(g=>!Be(g[u.axis]));d.hi+=Math.max(0,m)}return d}}return{lo:0,hi:a.length-1}}function pu(e,t,n,o,i){const a=e.getSortedVisibleDatasetMetas(),r=n[t];for(let s=0,l=a.length;s<l;++s){const{index:c,data:d}=a[s],{lo:u,hi:h}=KB(a[s],t,r,i);for(let p=u;p<=h;++p){const m=d[p];m.skip||o(m,c,p)}}}function ZB(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(o,i){const a=t?Math.abs(o.x-i.x):0,r=n?Math.abs(o.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(r,2))}}function fh(e,t,n,o,i){const a=[];return!i&&!e.isPointInArea(t)||pu(e,n,t,function(r,s,l){!i&&!SC(r,e.chartArea,0)||r.inRange(t.x,t.y,o)&&a.push({element:r,datasetIndex:s,index:l})},!0),a}function XB(e,t,n,o){let i=[];function a(r,s,l){const{startAngle:c,endAngle:d}=r.getProps(["startAngle","endAngle"],o),{angle:u}=E6(r,{x:t.x,y:t.y});T6(u,c,d)&&i.push({element:r,datasetIndex:s,index:l})}return pu(e,n,t,a),i}function JB(e,t,n,o,i,a){let r=[];const s=ZB(n);let l=Number.POSITIVE_INFINITY;function c(d,u,h){const p=d.inRange(t.x,t.y,i);if(o&&!p)return;const m=d.getCenterPoint(i);if(!(a||e.isPointInArea(m))&&!p)return;const g=s(t,m);g<l?(r=[{element:d,datasetIndex:u,index:h}],l=g):g===l&&r.push({element:d,datasetIndex:u,index:h})}return pu(e,n,t,c),r}function gh(e,t,n,o,i,a){return!a&&!e.isPointInArea(t)?[]:n==="r"&&!o?XB(e,t,n,i):JB(e,t,n,o,i,a)}function Fb(e,t,n,o,i){const a=[],r=n==="x"?"inXRange":"inYRange";let s=!1;return pu(e,n,t,(l,c,d)=>{l[r]&&l[r](t[n],i)&&(a.push({element:l,datasetIndex:c,index:d}),s=s||l.inRange(t.x,t.y,i))}),o&&!s?[]:a}var QB={modes:{index(e,t,n,o){const i=Pi(t,e),a=n.axis||"x",r=n.includeInvisible||!1,s=n.intersect?fh(e,i,a,o,r):gh(e,i,a,!1,o,r),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const d=s[0].index,u=c.data[d];u&&!u.skip&&l.push({element:u,datasetIndex:c.index,index:d})}),l):[]},dataset(e,t,n,o){const i=Pi(t,e),a=n.axis||"xy",r=n.includeInvisible||!1;let s=n.intersect?fh(e,i,a,o,r):gh(e,i,a,!1,o,r);if(s.length>0){const l=s[0].datasetIndex,c=e.getDatasetMeta(l).data;s=[];for(let d=0;d<c.length;++d)s.push({element:c[d],datasetIndex:l,index:d})}return s},point(e,t,n,o){const i=Pi(t,e),a=n.axis||"xy",r=n.includeInvisible||!1;return fh(e,i,a,o,r)},nearest(e,t,n,o){const i=Pi(t,e),a=n.axis||"xy",r=n.includeInvisible||!1;return gh(e,i,a,n.intersect,o,r)},x(e,t,n,o){const i=Pi(t,e);return Fb(e,i,"x",n.intersect,o)},y(e,t,n,o){const i=Pi(t,e);return Fb(e,i,"y",n.intersect,o)}}};const FC=["left","top","right","bottom"];function jr(e,t){return e.filter(n=>n.pos===t)}function Bb(e,t){return e.filter(n=>FC.indexOf(n.pos)===-1&&n.box.axis===t)}function Wr(e,t){return e.sort((n,o)=>{const i=t?o:n,a=t?n:o;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function e4(e){const t=[];let n,o,i,a,r,s;for(n=0,o=(e||[]).length;n<o;++n)i=e[n],{position:a,options:{stack:r,stackWeight:s=1}}=i,t.push({index:n,box:i,pos:a,horizontal:i.isHorizontal(),weight:i.weight,stack:r&&a+r,stackWeight:s});return t}function t4(e){const t={};for(const n of e){const{stack:o,pos:i,stackWeight:a}=n;if(!o||!FC.includes(i))continue;const r=t[o]||(t[o]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=a}return t}function n4(e,t){const n=t4(e),{vBoxMaxWidth:o,hBoxMaxHeight:i}=t;let a,r,s;for(a=0,r=e.length;a<r;++a){s=e[a];const{fullSize:l}=s.box,c=n[s.stack],d=c&&s.stackWeight/c.weight;s.horizontal?(s.width=d?d*o:l&&t.availableWidth,s.height=i):(s.width=o,s.height=d?d*i:l&&t.availableHeight)}return n}function o4(e){const t=e4(e),n=Wr(t.filter(c=>c.box.fullSize),!0),o=Wr(jr(t,"left"),!0),i=Wr(jr(t,"right")),a=Wr(jr(t,"top"),!0),r=Wr(jr(t,"bottom")),s=Bb(t,"x"),l=Bb(t,"y");return{fullSize:n,leftAndTop:o.concat(a),rightAndBottom:i.concat(l).concat(r).concat(s),chartArea:jr(t,"chartArea"),vertical:o.concat(i).concat(l),horizontal:a.concat(r).concat(s)}}function zb(e,t,n,o){return Math.max(e[n],t[n])+Math.max(e[o],t[o])}function BC(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function i4(e,t,n,o){const{pos:i,box:a}=n,r=e.maxPadding;if(!Ae(i)){n.size&&(e[i]-=n.size);const u=o[n.stack]||{size:0,count:1};u.size=Math.max(u.size,n.horizontal?a.height:a.width),n.size=u.size/u.count,e[i]+=n.size}a.getPadding&&BC(r,a.getPadding());const s=Math.max(0,t.outerWidth-zb(r,e,"left","right")),l=Math.max(0,t.outerHeight-zb(r,e,"top","bottom")),c=s!==e.w,d=l!==e.h;return e.w=s,e.h=l,n.horizontal?{same:c,other:d}:{same:d,other:c}}function a4(e){const t=e.maxPadding;function n(o){const i=Math.max(t[o]-e[o],0);return e[o]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function r4(e,t){const n=t.maxPadding;function o(i){const a={left:0,top:0,right:0,bottom:0};return i.forEach(r=>{a[r]=Math.max(t[r],n[r])}),a}return o(e?["left","right"]:["top","bottom"])}function ds(e,t,n,o){const i=[];let a,r,s,l,c,d;for(a=0,r=e.length,c=0;a<r;++a){s=e[a],l=s.box,l.update(s.width||t.w,s.height||t.h,r4(s.horizontal,t));const{same:u,other:h}=i4(t,n,s,o);c|=u&&i.length,d=d||h,l.fullSize||i.push(s)}return c&&ds(i,t,n,o)||d}function Xl(e,t,n,o,i){e.top=n,e.left=t,e.right=t+o,e.bottom=n+i,e.width=o,e.height=i}function Hb(e,t,n,o){const i=n.padding;let{x:a,y:r}=t;for(const s of e){const l=s.box,c=o[s.stack]||{placed:0,weight:1},d=s.stackWeight/c.weight||1;if(s.horizontal){const u=t.w*d,h=c.size||l.height;zs(c.start)&&(r=c.start),l.fullSize?Xl(l,i.left,r,n.outerWidth-i.right-i.left,h):Xl(l,t.left+c.placed,r,u,h),c.start=r,c.placed+=u,r=l.bottom}else{const u=t.h*d,h=c.size||l.width;zs(c.start)&&(a=c.start),l.fullSize?Xl(l,a,i.top,h,n.outerHeight-i.bottom-i.top):Xl(l,a,t.top+c.placed,h,u),c.start=a,c.placed+=u,a=l.right}}t.x=a,t.y=r}var Jl={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,o){if(!e)return;const i=ci(e.options.layout.padding),a=Math.max(t-i.width,0),r=Math.max(n-i.height,0),s=o4(e.boxes),l=s.vertical,c=s.horizontal;Ve(e.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const d=l.reduce((g,b)=>b.box.options&&b.box.options.display===!1?g:g+1,0)||1,u=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:a,availableHeight:r,vBoxMaxWidth:a/2/d,hBoxMaxHeight:r/2}),h=Object.assign({},i);BC(h,ci(o));const p=Object.assign({maxPadding:h,w:a,h:r,x:i.left,y:i.top},i),m=n4(l.concat(c),u);ds(s.fullSize,p,u,m),ds(l,p,u,m),ds(c,p,u,m)&&ds(l,p,u,m),a4(p),Hb(s.leftAndTop,p,u,m),p.x+=p.w,p.y+=p.h,Hb(s.rightAndBottom,p,u,m),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},Ve(s.chartArea,g=>{const b=g.box;Object.assign(b,e.chartArea),b.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class zC{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,o){}removeEventListener(t,n,o){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,o,i){return n=Math.max(0,n||t.width),o=o||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):o)}}isAttached(t){return!0}updateConfig(t){}}class s4 extends zC{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Mc="$chartjs",l4={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},jb=e=>e===null||e==="";function c4(e,t){const n=e.style,o=e.getAttribute("height"),i=e.getAttribute("width");if(e[Mc]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",jb(i)){const a=Tb(e,"width");a!==void 0&&(e.width=a)}if(jb(o))if(e.style.height==="")e.height=e.width/(t||2);else{const a=Tb(e,"height");a!==void 0&&(e.height=a)}return e}const HC=mB?{passive:!0}:!1;function d4(e,t,n){e&&e.addEventListener(t,n,HC)}function u4(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,HC)}function h4(e,t){const n=l4[e.type]||e.type,{x:o,y:i}=Pi(e,t);return{type:n,chart:t,native:e,x:o!==void 0?o:null,y:i!==void 0?i:null}}function wd(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function p4(e,t,n){const o=e.canvas,i=new MutationObserver(a=>{let r=!1;for(const s of a)r=r||wd(s.addedNodes,o),r=r&&!wd(s.removedNodes,o);r&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function f4(e,t,n){const o=e.canvas,i=new MutationObserver(a=>{let r=!1;for(const s of a)r=r||wd(s.removedNodes,o),r=r&&!wd(s.addedNodes,o);r&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Hs=new Map;let Wb=0;function jC(){const e=window.devicePixelRatio;e!==Wb&&(Wb=e,Hs.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function g4(e,t){Hs.size||window.addEventListener("resize",jC),Hs.set(e,t)}function m4(e){Hs.delete(e),Hs.size||window.removeEventListener("resize",jC)}function v4(e,t,n){const o=e.canvas,i=o&&ng(o);if(!i)return;const a=CC((s,l)=>{const c=i.clientWidth;n(s,l),c<i.clientWidth&&n()},window),r=new ResizeObserver(s=>{const l=s[0],c=l.contentRect.width,d=l.contentRect.height;c===0&&d===0||a(c,d)});return r.observe(i),g4(e,a),r}function mh(e,t,n){n&&n.disconnect(),t==="resize"&&m4(e)}function b4(e,t,n){const o=e.canvas,i=CC(a=>{e.ctx!==null&&n(h4(a,e))},e);return d4(o,t,i),i}class y4 extends zC{acquireContext(t,n){const o=t&&t.getContext&&t.getContext("2d");return o&&o.canvas===t?(c4(t,n),o):null}releaseContext(t){const n=t.canvas;if(!n[Mc])return!1;const o=n[Mc].initial;["height","width"].forEach(a=>{const r=o[a];Be(r)?n.removeAttribute(a):n.setAttribute(a,r)});const i=o.style||{};return Object.keys(i).forEach(a=>{n.style[a]=i[a]}),n.width=n.width,delete n[Mc],!0}addEventListener(t,n,o){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),a={attach:p4,detach:f4,resize:v4}[n]||b4;i[n]=a(t,n,o)}removeEventListener(t,n){const o=t.$proxies||(t.$proxies={}),i=o[n];i&&(({attach:mh,detach:mh,resize:mh}[n]||u4)(t,n,i),o[n]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,o,i){return gB(t,n,o,i)}isAttached(t){const n=t&&ng(t);return!!(n&&n.isConnected)}}function x4(e){return!tg()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?s4:y4}class er{constructor(){De(this,"x"),De(this,"y"),De(this,"active",!1),De(this,"options"),De(this,"$animations")}tooltipPosition(t){const{x:n,y:o}=this.getProps(["x","y"],t);return{x:n,y:o}}hasValue(){return yd(this.x)&&yd(this.y)}getProps(t,n){const o=this.$animations;if(!n||!o)return this;const i={};return t.forEach(a=>{i[a]=o[a]&&o[a].active()?o[a]._to:this[a]}),i}}De(er,"defaults",{}),De(er,"defaultRoutes");function w4(e,t){const n=e.options.ticks,o=C4(e),i=Math.min(n.maxTicksLimit||o,o),a=n.major.enabled?k4(t):[],r=a.length,s=a[0],l=a[r-1],c=[];if(r>i)return $4(t,c,a,r/i),c;const d=_4(a,t,i);if(r>0){let u,h;const p=r>1?Math.round((l-s)/(r-1)):null;for(Ql(t,c,d,Be(p)?0:s-p,s),u=0,h=r-1;u<h;u++)Ql(t,c,d,a[u],a[u+1]);return Ql(t,c,d,l,Be(p)?t.length:l+p),c}return Ql(t,c,d),c}function C4(e){const t=e.options.offset,n=e._tickSize(),o=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(o,i))}function _4(e,t,n){const o=S4(e),i=t.length/n;if(!o)return Math.max(i,1);const a=C6(o);for(let r=0,s=a.length-1;r<s;r++){const l=a[r];if(l>i)return l}return Math.max(i,1)}function k4(e){const t=[];let n,o;for(n=0,o=e.length;n<o;n++)e[n].major&&t.push(n);return t}function $4(e,t,n,o){let i=0,a=n[0],r;for(o=Math.ceil(o),r=0;r<e.length;r++)r===a&&(t.push(e[r]),i++,a=n[i*o])}function Ql(e,t,n,o,i){const a=Ge(o,0),r=Math.min(Ge(i,e.length),e.length);let s=0,l,c,d;for(n=Math.ceil(n),i&&(l=i-o,n=l/Math.floor(l/n)),d=a;d<0;)s++,d=Math.round(a+s*n);for(c=Math.max(a,0);c<r;c++)c===d&&(t.push(e[c]),s++,d=Math.round(a+s*n))}function S4(e){const t=e.length;let n,o;if(t<2)return!1;for(o=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==o)return!1;return o}const E4=e=>e==="left"?"right":e==="right"?"left":e,Ub=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Gb=(e,t)=>Math.min(t||e,e);function qb(e,t){const n=[],o=e.length/t,i=e.length;let a=0;for(;a<i;a+=o)n.push(e[Math.floor(a)]);return n}function O4(e,t,n){const o=e.ticks.length,i=Math.min(t,o-1),a=e._startPixel,r=e._endPixel,s=1e-6;let l=e.getPixelForTick(i),c;if(!(n&&(o===1?c=Math.max(l-a,r-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<a-s||l>r+s)))return l}function T4(e,t){Ve(e,n=>{const o=n.gc,i=o.length/2;let a;if(i>t){for(a=0;a<i;++a)delete n.data[o[a]];o.splice(0,i)}})}function Ur(e){return e.drawTicks?e.tickLength:0}function Yb(e,t){if(!e.display)return 0;const n=eo(e.font,t),o=ci(e.padding);return(ft(e.text)?e.text.length:1)*n.lineHeight+o.height}function I4(e,t){return pr(e,{scale:t,type:"scale"})}function P4(e,t,n){return pr(e,{tick:n,index:t,type:"tick"})}function D4(e,t,n){let o=V6(e);return(n&&t!=="right"||!n&&t==="right")&&(o=E4(o)),o}function A4(e,t,n,o){const{top:i,left:a,bottom:r,right:s,chart:l}=e,{chartArea:c,scales:d}=l;let u=0,h,p,m;const g=r-i,b=s-a;if(e.isHorizontal()){if(p=vb(o,a,s),Ae(n)){const v=Object.keys(n)[0],y=n[v];m=d[v].getPixelForValue(y)+g-t}else n==="center"?m=(c.bottom+c.top)/2+g-t:m=Ub(e,n,t);h=s-a}else{if(Ae(n)){const v=Object.keys(n)[0],y=n[v];p=d[v].getPixelForValue(y)-b+t}else n==="center"?p=(c.left+c.right)/2-b+t:p=Ub(e,n,t);m=vb(o,r,i),u=n==="left"?-Fn:Fn}return{titleX:p,titleY:m,maxWidth:h,rotation:u}}class fr extends er{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:o,_suggestedMax:i}=this;return t=qn(t,Number.POSITIVE_INFINITY),n=qn(n,Number.NEGATIVE_INFINITY),o=qn(o,Number.POSITIVE_INFINITY),i=qn(i,Number.NEGATIVE_INFINITY),{min:qn(t,o),max:qn(n,i),minDefined:$n(t),maxDefined:$n(n)}}getMinMax(t){let{min:n,max:o,minDefined:i,maxDefined:a}=this.getUserBounds(),r;if(i&&a)return{min:n,max:o};const s=this.getMatchingVisibleMetas();for(let l=0,c=s.length;l<c;++l)r=s[l].controller.getMinMax(this,t),i||(n=Math.min(n,r.min)),a||(o=Math.max(o,r.max));return n=a&&n>o?o:n,o=i&&n>o?n:o,{min:qn(n,qn(o,n)),max:qn(o,qn(n,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Qe(this.options.beforeUpdate,[this])}update(t,n,o){const{beginAtZero:i,grace:a,ticks:r}=this.options,s=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+o.left+o.right:this.height+o.top+o.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=eB(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?qb(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=w4(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,o;this.isHorizontal()?(n=this.left,o=this.right):(n=this.top,o=this.bottom,t=!t),this._startPixel=n,this._endPixel=o,this._reversePixels=t,this._length=o-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Qe(this.options.afterUpdate,[this])}beforeSetDimensions(){Qe(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Qe(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Qe(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Qe(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let o,i,a;for(o=0,i=t.length;o<i;o++)a=t[o],a.label=Qe(n.callback,[a.value,o,t],this)}afterTickToLabelConversion(){Qe(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Qe(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,o=Gb(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,a=n.maxRotation;let r=i,s,l,c;if(!this._isVisible()||!n.display||i>=a||o<=1||!this.isHorizontal()){this.labelRotation=i;return}const d=this._getLabelSizes(),u=d.widest.width,h=d.highest.height,p=Bn(this.chart.width-u,0,this.maxWidth);s=t.offset?this.maxWidth/o:p/(o-1),u+6>s&&(s=p/(o-(t.offset?.5:1)),l=this.maxHeight-Ur(t.grid)-n.padding-Yb(t.title,this.chart.options.font),c=Math.sqrt(u*u+h*h),r=S6(Math.min(Math.asin(Bn((d.highest.height+6)/s,-1,1)),Math.asin(Bn(l/c,-1,1))-Math.asin(Bn(h/c,-1,1)))),r=Math.max(i,Math.min(a,r))),this.labelRotation=r}afterCalculateLabelRotation(){Qe(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Qe(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:o,title:i,grid:a}}=this,r=this._isVisible(),s=this.isHorizontal();if(r){const l=Yb(i,n.options.font);if(s?(t.width=this.maxWidth,t.height=Ur(a)+l):(t.height=this.maxHeight,t.width=Ur(a)+l),o.display&&this.ticks.length){const{first:c,last:d,widest:u,highest:h}=this._getLabelSizes(),p=o.padding*2,m=Li(this.labelRotation),g=Math.cos(m),b=Math.sin(m);if(s){const v=o.mirror?0:b*u.width+g*h.height;t.height=Math.min(this.maxHeight,t.height+v+p)}else{const v=o.mirror?0:g*u.width+b*h.height;t.width=Math.min(this.maxWidth,t.width+v+p)}this._calculatePadding(c,d,b,g)}}this._handleMargins(),s?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,o,i){const{ticks:{align:a,padding:r},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const d=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,p=0;l?c?(h=i*t.width,p=o*n.height):(h=o*t.height,p=i*n.width):a==="start"?p=n.width:a==="end"?h=t.width:a!=="inner"&&(h=t.width/2,p=n.width/2),this.paddingLeft=Math.max((h-d+r)*this.width/(this.width-d),0),this.paddingRight=Math.max((p-u+r)*this.width/(this.width-u),0)}else{let d=n.height/2,u=t.height/2;a==="start"?(d=0,u=t.height):a==="end"&&(d=n.height,u=0),this.paddingTop=d+r,this.paddingBottom=u+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Qe(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,o;for(n=0,o=t.length;n<o;n++)Be(t[n].label)&&(t.splice(n,1),o--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let o=this.ticks;n<o.length&&(o=qb(o,n)),this._labelSizes=t=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,o){const{ctx:i,_longestTextCache:a}=this,r=[],s=[],l=Math.floor(n/Gb(n,o));let c=0,d=0,u,h,p,m,g,b,v,y,w,C,k;for(u=0;u<n;u+=l){if(m=t[u].label,g=this._resolveTickFontOptions(u),i.font=b=g.string,v=a[b]=a[b]||{data:{},gc:[]},y=g.lineHeight,w=C=0,!Be(m)&&!ft(m))w=Cb(i,v.data,v.gc,w,m),C=y;else if(ft(m))for(h=0,p=m.length;h<p;++h)k=m[h],!Be(k)&&!ft(k)&&(w=Cb(i,v.data,v.gc,w,k),C+=y);r.push(w),s.push(C),c=Math.max(w,c),d=Math.max(C,d)}T4(a,n);const O=r.indexOf(c),P=s.indexOf(d),S=V=>({width:r[V]||0,height:s[V]||0});return{first:S(0),last:S(n-1),widest:S(O),highest:S(P),widths:r,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return I6(this._alignToPixels?Oi(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const o=n[t];return o.$context||(o.$context=P4(this.getContext(),t,o))}return this.$context||(this.$context=I4(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Li(this.labelRotation),o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),a=this._getLabelSizes(),r=t.autoSkipPadding||0,s=a?a.widest.width+r:0,l=a?a.highest.height+r:0;return this.isHorizontal()?l*o>s*i?s/o:l/i:l*i<s*o?l/o:s/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,o=this.chart,i=this.options,{grid:a,position:r,border:s}=i,l=a.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),u=Ur(a),h=[],p=s.setContext(this.getContext()),m=p.display?p.width:0,g=m/2,b=function(U){return Oi(o,U,m)};let v,y,w,C,k,O,P,S,V,H,A,G;if(r==="top")v=b(this.bottom),O=this.bottom-u,S=v-g,H=b(t.top)+g,G=t.bottom;else if(r==="bottom")v=b(this.top),H=t.top,G=b(t.bottom)-g,O=v+g,S=this.top+u;else if(r==="left")v=b(this.right),k=this.right-u,P=v-g,V=b(t.left)+g,A=t.right;else if(r==="right")v=b(this.left),V=t.left,A=b(t.right)-g,k=v+g,P=this.left+u;else if(n==="x"){if(r==="center")v=b((t.top+t.bottom)/2+.5);else if(Ae(r)){const U=Object.keys(r)[0],q=r[U];v=b(this.chart.scales[U].getPixelForValue(q))}H=t.top,G=t.bottom,O=v+g,S=O+u}else if(n==="y"){if(r==="center")v=b((t.left+t.right)/2);else if(Ae(r)){const U=Object.keys(r)[0],q=r[U];v=b(this.chart.scales[U].getPixelForValue(q))}k=v-g,P=k-u,V=t.left,A=t.right}const te=Ge(i.ticks.maxTicksLimit,d),j=Math.max(1,Math.ceil(d/te));for(y=0;y<d;y+=j){const U=this.getContext(y),q=a.setContext(U),oe=s.setContext(U),ne=q.lineWidth,le=q.color,he=oe.dash||[],de=oe.dashOffset,Ce=q.tickWidth,me=q.tickColor,Oe=q.tickBorderDash||[],B=q.tickBorderDashOffset;w=O4(this,y,l),w!==void 0&&(C=Oi(o,w,ne),c?k=P=V=A=C:O=S=H=G=C,h.push({tx1:k,ty1:O,tx2:P,ty2:S,x1:V,y1:H,x2:A,y2:G,width:ne,color:le,borderDash:he,borderDashOffset:de,tickWidth:Ce,tickColor:me,tickBorderDash:Oe,tickBorderDashOffset:B}))}return this._ticksLength=d,this._borderValue=v,h}_computeLabelItems(t){const n=this.axis,o=this.options,{position:i,ticks:a}=o,r=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:c,padding:d,mirror:u}=a,h=Ur(o.grid),p=h+d,m=u?-d:p,g=-Li(this.labelRotation),b=[];let v,y,w,C,k,O,P,S,V,H,A,G,te="middle";if(i==="top")O=this.bottom-m,P=this._getXAxisLabelAlignment();else if(i==="bottom")O=this.top+m,P=this._getXAxisLabelAlignment();else if(i==="left"){const U=this._getYAxisLabelAlignment(h);P=U.textAlign,k=U.x}else if(i==="right"){const U=this._getYAxisLabelAlignment(h);P=U.textAlign,k=U.x}else if(n==="x"){if(i==="center")O=(t.top+t.bottom)/2+p;else if(Ae(i)){const U=Object.keys(i)[0],q=i[U];O=this.chart.scales[U].getPixelForValue(q)+p}P=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")k=(t.left+t.right)/2-p;else if(Ae(i)){const U=Object.keys(i)[0],q=i[U];k=this.chart.scales[U].getPixelForValue(q)}P=this._getYAxisLabelAlignment(h).textAlign}n==="y"&&(l==="start"?te="top":l==="end"&&(te="bottom"));const j=this._getLabelSizes();for(v=0,y=s.length;v<y;++v){w=s[v],C=w.label;const U=a.setContext(this.getContext(v));S=this.getPixelForTick(v)+a.labelOffset,V=this._resolveTickFontOptions(v),H=V.lineHeight,A=ft(C)?C.length:1;const q=A/2,oe=U.color,ne=U.textStrokeColor,le=U.textStrokeWidth;let he=P;r?(k=S,P==="inner"&&(v===y-1?he=this.options.reverse?"left":"right":v===0?he=this.options.reverse?"right":"left":he="center"),i==="top"?c==="near"||g!==0?G=-A*H+H/2:c==="center"?G=-j.highest.height/2-q*H+H:G=-j.highest.height+H/2:c==="near"||g!==0?G=H/2:c==="center"?G=j.highest.height/2-q*H:G=j.highest.height-A*H,u&&(G*=-1),g!==0&&!U.showLabelBackdrop&&(k+=H/2*Math.sin(g))):(O=S,G=(1-A)*H/2);let de;if(U.showLabelBackdrop){const Ce=ci(U.backdropPadding),me=j.heights[v],Oe=j.widths[v];let B=G-Ce.top,W=0-Ce.left;switch(te){case"middle":B-=me/2;break;case"bottom":B-=me;break}switch(P){case"center":W-=Oe/2;break;case"right":W-=Oe;break;case"inner":v===y-1?W-=Oe:v>0&&(W-=Oe/2);break}de={left:W,top:B,width:Oe+Ce.width,height:me+Ce.height,color:U.backdropColor}}b.push({label:C,font:V,textOffset:G,options:{rotation:g,color:oe,strokeColor:ne,strokeWidth:le,textAlign:he,textBaseline:te,translation:[k,O],backdrop:de}})}return b}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Li(this.labelRotation))return t==="top"?"left":"right";let o="center";return n.align==="start"?o="left":n.align==="end"?o="right":n.align==="inner"&&(o="inner"),o}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:o,mirror:i,padding:a}}=this.options,r=this._getLabelSizes(),s=t+a,l=r.widest.width;let c,d;return n==="left"?i?(d=this.right+a,o==="near"?c="left":o==="center"?(c="center",d+=l/2):(c="right",d+=l)):(d=this.right-s,o==="near"?c="right":o==="center"?(c="center",d-=l/2):(c="left",d=this.left)):n==="right"?i?(d=this.left+a,o==="near"?c="right":o==="center"?(c="center",d-=l/2):(c="left",d-=l)):(d=this.left+s,o==="near"?c="left":o==="center"?(c="center",d+=l/2):(c="right",d=this.right)):c="right",{textAlign:c,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:o,top:i,width:a,height:r}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(o,i,a,r),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const o=this.ticks.findIndex(i=>i.value===t);return o>=0?n.setContext(this.getContext(o)).lineWidth:0}drawGrid(t){const n=this.options.grid,o=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,r;const s=(l,c,d)=>{!d.width||!d.color||(o.save(),o.lineWidth=d.width,o.strokeStyle=d.color,o.setLineDash(d.borderDash||[]),o.lineDashOffset=d.borderDashOffset,o.beginPath(),o.moveTo(l.x,l.y),o.lineTo(c.x,c.y),o.stroke(),o.restore())};if(n.display)for(a=0,r=i.length;a<r;++a){const l=i[a];n.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&s({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:o,grid:i}}=this,a=o.setContext(this.getContext()),r=o.display?a.width:0;if(!r)return;const s=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,d,u,h;this.isHorizontal()?(c=Oi(t,this.left,r)-r/2,d=Oi(t,this.right,s)+s/2,u=h=l):(u=Oi(t,this.top,r)-r/2,h=Oi(t,this.bottom,s)+s/2,c=d=l),n.save(),n.lineWidth=a.width,n.strokeStyle=a.color,n.beginPath(),n.moveTo(c,u),n.lineTo(d,h),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const n=this.ctx,o=this._computeLabelArea();o&&EC(n,o);const i=this.getLabelItems(t);for(const a of i){const r=a.options,s=a.font,l=a.label,c=a.textOffset;$b(n,l,0,c,s,r)}o&&OC(n)}drawTitle(){const{ctx:t,options:{position:n,title:o,reverse:i}}=this;if(!o.display)return;const a=eo(o.font),r=ci(o.padding),s=o.align;let l=a.lineHeight/2;n==="bottom"||n==="center"||Ae(n)?(l+=r.bottom,ft(o.text)&&(l+=a.lineHeight*(o.text.length-1))):l+=r.top;const{titleX:c,titleY:d,maxWidth:u,rotation:h}=A4(this,l,n,s);$b(t,o.text,0,0,a,{color:o.color,maxWidth:u,rotation:h,textAlign:D4(s,n,i),textBaseline:"middle",translation:[c,d]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,o=Ge(t.grid&&t.grid.z,-1),i=Ge(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==fr.prototype.draw?[{z:n,draw:a=>{this.draw(a)}}]:[{z:o,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",i=[];let a,r;for(a=0,r=n.length;a<r;++a){const s=n[a];s[o]===this.id&&(!t||s.type===t)&&i.push(s)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return eo(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class ec{constructor(t,n,o){this.type=t,this.scope=n,this.override=o,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let o;M4(n)&&(o=this.register(n));const i=this.items,a=t.id,r=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in i||(i[a]=t,R4(t,r,o),this.override&&nt.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const n=this.items,o=t.id,i=this.scope;o in n&&delete n[o],i&&o in nt[i]&&(delete nt[i][o],this.override&&delete Qi[o])}}function R4(e,t,n){const o=Bs(Object.create(null),[n?nt.get(n):{},nt.get(t),e.defaults]);nt.set(t,o),e.defaultRoutes&&V4(t,e.defaultRoutes),e.descriptors&&nt.describe(t,e.descriptors)}function V4(e,t){Object.keys(t).forEach(n=>{const o=n.split("."),i=o.pop(),a=[e].concat(o).join("."),r=t[n].split("."),s=r.pop(),l=r.join(".");nt.route(a,i,l,s)})}function M4(e){return"id"in e&&"defaults"in e}class N4{constructor(){this.controllers=new ec(ks,"datasets",!0),this.elements=new ec(er,"elements"),this.plugins=new ec(Object,"plugins"),this.scales=new ec(fr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,o){[...n].forEach(i=>{const a=o||this._getRegistryForType(i);o||a.isForType(i)||a===this.plugins&&i.id?this._exec(t,a,i):Ve(i,r=>{const s=o||this._getRegistryForType(r);this._exec(t,s,r)})})}_exec(t,n,o){const i=Zf(t);Qe(o["before"+i],[],o),n[t](o),Qe(o["after"+i],[],o)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const o=this._typedRegistries[n];if(o.isForType(t))return o}return this.plugins}_get(t,n,o){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+o+".");return i}}var Xn=new N4;class L4{constructor(){this._init=void 0}notify(t,n,o,i){if(n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),this._init===void 0)return;const a=i?this._descriptors(t).filter(i):this._descriptors(t),r=this._notify(a,t,n,o);return n==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),r}_notify(t,n,o,i){i=i||{};for(const a of t){const r=a.plugin,s=r[o],l=[n,i,a.options];if(Qe(s,l,r)===!1&&i.cancelable)return!1}return!0}invalidate(){Be(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const o=t&&t.config,i=Ge(o.options&&o.options.plugins,{}),a=F4(o);return i===!1&&!n?[]:z4(t,a,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],o=this._cache,i=(a,r)=>a.filter(s=>!r.some(l=>s.plugin.id===l.plugin.id));this._notify(i(n,o),t,"stop"),this._notify(i(o,n),t,"start")}}function F4(e){const t={},n=[],o=Object.keys(Xn.plugins.items);for(let a=0;a<o.length;a++)n.push(Xn.getPlugin(o[a]));const i=e.plugins||[];for(let a=0;a<i.length;a++){const r=i[a];n.indexOf(r)===-1&&(n.push(r),t[r.id]=!0)}return{plugins:n,localIds:t}}function B4(e,t){return!t&&e===!1?null:e===!0?{}:e}function z4(e,{plugins:t,localIds:n},o,i){const a=[],r=e.getContext();for(const s of t){const l=s.id,c=B4(o[l],i);c!==null&&a.push({plugin:s,options:H4(e.config,{plugin:s,local:n[l]},c,r)})}return a}function H4(e,{plugin:t,local:n},o,i){const a=e.pluginScopeKeys(t),r=e.getOptionScopes(o,a);return n&&t.defaults&&r.push(t.defaults),e.createResolver(r,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function kp(e,t){const n=nt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function j4(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function W4(e,t){return e===t?"_index_":"_value_"}function Kb(e){if(e==="x"||e==="y"||e==="r")return e}function U4(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function $p(e,...t){if(Kb(e))return e;for(const n of t){const o=n.axis||U4(n.position)||e.length>1&&Kb(e[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Zb(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function G4(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(o=>o.xAxisID===e||o.yAxisID===e);if(n.length)return Zb(e,"x",n[0])||Zb(e,"y",n[0])}return{}}function q4(e,t){const n=Qi[e.type]||{scales:{}},o=t.scales||{},i=kp(e.type,t),a=Object.create(null);return Object.keys(o).forEach(r=>{const s=o[r];if(!Ae(s))return console.error(`Invalid scale configuration for scale: ${r}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const l=$p(r,s,G4(r,e),nt.scales[s.type]),c=W4(l,i),d=n.scales||{};a[r]=xs(Object.create(null),[{axis:l},s,d[l],d[c]])}),e.data.datasets.forEach(r=>{const s=r.type||e.type,l=r.indexAxis||kp(s,t),c=(Qi[s]||{}).scales||{};Object.keys(c).forEach(d=>{const u=j4(d,l),h=r[u+"AxisID"]||u;a[h]=a[h]||Object.create(null),xs(a[h],[{axis:u},o[h],c[d]])})}),Object.keys(a).forEach(r=>{const s=a[r];xs(s,[nt.scales[s.type],nt.scale])}),a}function WC(e){const t=e.options||(e.options={});t.plugins=Ge(t.plugins,{}),t.scales=q4(e,t)}function UC(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Y4(e){return e=e||{},e.data=UC(e.data),WC(e),e}const Xb=new Map,GC=new Set;function tc(e,t){let n=Xb.get(e);return n||(n=t(),Xb.set(e,n),GC.add(n)),n}const Gr=(e,t,n)=>{const o=Ja(t,n);o!==void 0&&e.add(o)};class K4{constructor(t){this._config=Y4(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=UC(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),WC(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return tc(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return tc(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return tc(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,o=this.type;return tc(`${o}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const o=this._scopeCache;let i=o.get(t);return(!i||n)&&(i=new Map,o.set(t,i)),i}getOptionScopes(t,n,o){const{options:i,type:a}=this,r=this._cachedScopes(t,o),s=r.get(n);if(s)return s;const l=new Set;n.forEach(d=>{t&&(l.add(t),d.forEach(u=>Gr(l,t,u))),d.forEach(u=>Gr(l,i,u)),d.forEach(u=>Gr(l,Qi[a]||{},u)),d.forEach(u=>Gr(l,nt,u)),d.forEach(u=>Gr(l,Cp,u))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),GC.has(n)&&r.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Qi[n]||{},nt.datasets[n]||{},{type:n},nt,Cp]}resolveNamedOptions(t,n,o,i=[""]){const a={$shared:!0},{resolver:r,subPrefixes:s}=Jb(this._resolverCache,t,i);let l=r;if(X4(r,n)){a.$shared=!1,o=li(o)?o():o;const c=this.createResolver(t,o,s);l=Qa(r,o,c)}for(const c of n)a[c]=l[c];return a}createResolver(t,n,o=[""],i){const{resolver:a}=Jb(this._resolverCache,t,o);return Ae(n)?Qa(a,n,void 0,i):a}}function Jb(e,t,n){let o=e.get(t);o||(o=new Map,e.set(t,o));const i=n.join();let a=o.get(i);return a||(a={resolver:Jf(t,n),subPrefixes:n.filter(r=>!r.toLowerCase().includes("hover"))},o.set(i,a)),a}const Z4=e=>Ae(e)&&Object.getOwnPropertyNames(e).some(t=>li(e[t]));function X4(e,t){const{isScriptable:n,isIndexable:o}=PC(e);for(const i of t){const a=n(i),r=o(i),s=(r||a)&&e[i];if(a&&(li(s)||Z4(s))||r&&ft(s))return!0}return!1}var J4="4.5.1";const Q4=["top","bottom","left","right","chartArea"];function Qb(e,t){return e==="top"||e==="bottom"||Q4.indexOf(e)===-1&&t==="x"}function ey(e,t){return function(n,o){return n[e]===o[e]?n[t]-o[t]:n[e]-o[e]}}function ty(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Qe(n&&n.onComplete,[e],t)}function e8(e){const t=e.chart,n=t.options.animation;Qe(n&&n.onProgress,[e],t)}function qC(e){return tg()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Cd={},YC=e=>{const t=qC(e);return Object.values(Cd).filter(n=>n.canvas===t).pop()};function t8(e,t,n){const o=Object.keys(e);for(const i of o){const a=+i;if(a>=t){const r=e[i];delete e[i],(n>0||a>t)&&(e[a+n]=r)}}}function n8(e,t,n,o){return!n||e.type==="mouseout"?null:o?t:e}class Ko{static register(...t){Xn.add(...t),ny()}static unregister(...t){Xn.remove(...t),ny()}constructor(t,n){const o=this.config=new K4(n),i=qC(t),a=YC(i);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const r=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||x4(i)),this.platform.updateConfig(o);const s=this.platform.acquireContext(i,r.aspectRatio),l=s&&s.canvas,c=l&&l.height,d=l&&l.width;if(this.id=f6(),this.ctx=s,this.canvas=l,this.width=d,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new L4,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=R6(u=>this.update(u),r.resizeDelay||0),this._dataChanges=[],Cd[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}go.listen(this,"complete",ty),go.listen(this,"progress",e8),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:o,height:i,_aspectRatio:a}=this;return Be(t)?n&&a?a:i?o/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Xn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ob(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return _b(this.canvas,this.ctx),this}stop(){return go.stop(this),this}resize(t,n){go.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const o=this.options,i=this.canvas,a=o.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(i,t,n,a),s=o.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,Ob(this,s,!0)&&(this.notifyPlugins("resize",{size:r}),Qe(o.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};Ve(t,(n,o)=>{n.id=o})}buildOrUpdateScales(){const t=this.options,n=t.scales,o=this.scales,i=Object.keys(o).reduce((r,s)=>(r[s]=!1,r),{});let a=[];n&&(a=a.concat(Object.keys(n).map(r=>{const s=n[r],l=$p(r,s),c=l==="r",d=l==="x";return{options:s,dposition:c?"chartArea":d?"bottom":"left",dtype:c?"radialLinear":d?"category":"linear"}}))),Ve(a,r=>{const s=r.options,l=s.id,c=$p(l,s),d=Ge(s.type,r.dtype);(s.position===void 0||Qb(s.position,c)!==Qb(r.dposition))&&(s.position=r.dposition),i[l]=!0;let u=null;if(l in o&&o[l].type===d)u=o[l];else{const h=Xn.getScale(d);u=new h({id:l,type:d,ctx:this.ctx,chart:this}),o[u.id]=u}u.init(s,t)}),Ve(i,(r,s)=>{r||delete o[s]}),Ve(o,r=>{Jl.configure(this,r,r.options),Jl.addBox(this,r)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,o=t.length;if(t.sort((i,a)=>i.index-a.index),o>n){for(let i=n;i<o;++i)this._destroyDatasetMeta(i);t.splice(n,o-n)}this._sortedMetasets=t.slice(0).sort(ey("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((o,i)=>{n.filter(a=>a===o._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let o,i;for(this._removeUnreferencedMetasets(),o=0,i=n.length;o<i;o++){const a=n[o];let r=this.getDatasetMeta(o);const s=a.type||this.config.type;if(r.type&&r.type!==s&&(this._destroyDatasetMeta(o),r=this.getDatasetMeta(o)),r.type=s,r.indexAxis=a.indexAxis||kp(s,this.options),r.order=a.order||0,r.index=o,r.label=""+a.label,r.visible=this.isDatasetVisible(o),r.controller)r.controller.updateIndex(o),r.controller.linkScales();else{const l=Xn.getController(s),{datasetElementType:c,dataElementType:d}=nt.datasets[s];Object.assign(l,{dataElementType:Xn.getElement(d),datasetElementType:c&&Xn.getElement(c)}),r.controller=new l(this,o),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){Ve(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const o=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,d=this.data.datasets.length;c<d;c++){const{controller:u}=this.getDatasetMeta(c),h=!i&&a.indexOf(u)===-1;u.buildOrUpdateElements(h),r=Math.max(+u.getMaxOverflow(),r)}r=this._minPadding=o.layout.autoPadding?r:0,this._updateLayout(r),i||Ve(a,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ey("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Ve(this.scales,t=>{Jl.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(t.events);(!ub(n,o)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:o,start:i,count:a}of n){const r=o==="_removeElements"?-a:a;t8(t,i,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=a=>new Set(t.filter(r=>r[0]===a).map((r,s)=>s+","+r.splice(1).join(","))),i=o(0);for(let a=1;a<n;a++)if(!ub(i,o(a)))return;return Array.from(i).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Jl.update(this,this.width,this.height,t);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],Ve(this.boxes,i=>{o&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,a)=>{i._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,o=this.data.datasets.length;n<o;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,o=this.data.datasets.length;n<o;++n)this._updateDataset(n,li(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const o=this.getDatasetMeta(t),i={meta:o,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(o.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(go.has(this)?this.attached&&!go.running(this)&&go.start(this):(this.draw(),ty({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:o,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(o,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,o=[];let i,a;for(i=0,a=n.length;i<a;++i){const r=n[i];(!t||r.visible)&&o.push(r)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,o={meta:t,index:t.index,cancelable:!0},i=CB(this,t);this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(i&&EC(n,i),t.controller.draw(),i&&OC(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return SC(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,o,i){const a=QB.modes[n];return typeof a=="function"?a(this,t,o,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],o=this._metasets;let i=o.filter(a=>a&&a._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},o.push(i)),i}getContext(){return this.$context||(this.$context=pr(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const o=this.getDatasetMeta(t);return typeof o.hidden=="boolean"?!o.hidden:!n.hidden}setDatasetVisibility(t,n){const o=this.getDatasetMeta(t);o.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,o){const i=o?"show":"hide",a=this.getDatasetMeta(t),r=a.controller._resolveAnimations(void 0,i);zs(n)?(a.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(t,o),r.update(a,{visible:o}),this.update(s=>s.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),go.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),_b(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Cd[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,o=(a,r)=>{n.addEventListener(this,a,r),t[a]=r},i=(a,r,s)=>{a.offsetX=r,a.offsetY=s,this._eventHandler(a)};Ve(this.options.events,a=>o(a,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,o=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},a=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const s=()=>{i("attach",s),this.attached=!0,this.resize(),o("resize",a),o("detach",r)};r=()=>{this.attached=!1,i("resize",a),this._stop(),this._resize(0,0),o("attach",s)},n.isAttached(this.canvas)?s():r()}unbindEvents(){Ve(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Ve(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,o){const i=o?"set":"remove";let a,r,s,l;for(n==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+i+"DatasetHoverStyle"]()),s=0,l=t.length;s<l;++s){r=t[s];const c=r&&this.getDatasetMeta(r.datasetIndex).controller;c&&c[i+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],o=t.map(({datasetIndex:i,index:a})=>{const r=this.getDatasetMeta(i);if(!r)throw new Error("No dataset found at index "+i);return{datasetIndex:i,element:r.data[a],index:a}});!md(o,n)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,n))}notifyPlugins(t,n,o){return this._plugins.notify(this,t,n,o)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,o){const i=this.options.hover,a=(l,c)=>l.filter(d=>!c.some(u=>d.datasetIndex===u.datasetIndex&&d.index===u.index)),r=a(n,t),s=o?t:a(t,n);r.length&&this.updateHoverStyle(r,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(t,n){const o={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",o,i)===!1)return;const a=this._handleEvent(t,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,i),(a||o.changed)&&this.render(),this}_handleEvent(t,n,o){const{_active:i=[],options:a}=this,r=n,s=this._getActiveElements(t,i,o,r),l=x6(t),c=n8(t,this._lastEvent,o,l);o&&(this._lastEvent=null,Qe(a.onHover,[t,s,this],this),l&&Qe(a.onClick,[t,s,this],this));const d=!md(s,i);return(d||n)&&(this._active=s,this._updateHoverStyles(s,i,n)),this._lastEvent=c,d}_getActiveElements(t,n,o,i){if(t.type==="mouseout")return[];if(!o)return n;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,i)}}De(Ko,"defaults",nt),De(Ko,"instances",Cd),De(Ko,"overrides",Qi),De(Ko,"registry",Xn),De(Ko,"version",J4),De(Ko,"getChart",YC);function ny(){return Ve(Ko.instances,e=>e._plugins.invalidate())}function KC(e,t){const{x:n,y:o,base:i,width:a,height:r}=e.getProps(["x","y","base","width","height"],t);let s,l,c,d,u;return e.horizontal?(u=r/2,s=Math.min(n,i),l=Math.max(n,i),c=o-u,d=o+u):(u=a/2,s=n-u,l=n+u,c=Math.min(o,i),d=Math.max(o,i)),{left:s,top:c,right:l,bottom:d}}function ti(e,t,n,o){return e?0:Bn(t,n,o)}function o8(e,t,n){const o=e.options.borderWidth,i=e.borderSkipped,a=IC(o);return{t:ti(i.top,a.top,0,n),r:ti(i.right,a.right,0,t),b:ti(i.bottom,a.bottom,0,n),l:ti(i.left,a.left,0,t)}}function i8(e,t,n){const{enableBorderRadius:o}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,a=_s(i),r=Math.min(t,n),s=e.borderSkipped,l=o||Ae(i);return{topLeft:ti(!l||s.top||s.left,a.topLeft,0,r),topRight:ti(!l||s.top||s.right,a.topRight,0,r),bottomLeft:ti(!l||s.bottom||s.left,a.bottomLeft,0,r),bottomRight:ti(!l||s.bottom||s.right,a.bottomRight,0,r)}}function a8(e){const t=KC(e),n=t.right-t.left,o=t.bottom-t.top,i=o8(e,n/2,o/2),a=i8(e,n/2,o/2);return{outer:{x:t.left,y:t.top,w:n,h:o,radius:a},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:o-i.t-i.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,a.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(i.b,i.r))}}}}function vh(e,t,n,o){const i=t===null,a=n===null,r=e&&!(i&&a)&&KC(e,o);return r&&(i||gb(t,r.left,r.right))&&(a||gb(n,r.top,r.bottom))}function r8(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function s8(e,t){e.rect(t.x,t.y,t.w,t.h)}function bh(e,t,n={}){const o=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,a=(e.x+e.w!==n.x+n.w?t:0)-o,r=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+o,y:e.y+i,w:e.w+a,h:e.h+r,radius:e.radius}}class Nc extends er{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:o,backgroundColor:i}}=this,{inner:a,outer:r}=a8(this),s=r8(r.radius)?_p:s8;t.save(),(r.w!==a.w||r.h!==a.h)&&(t.beginPath(),s(t,bh(r,n,a)),t.clip(),s(t,bh(a,-n,r)),t.fillStyle=o,t.fill("evenodd")),t.beginPath(),s(t,bh(a,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,o){return vh(this,t,n,o)}inXRange(t,n){return vh(this,t,null,n)}inYRange(t,n){return vh(this,null,t,n)}getCenterPoint(t){const{x:n,y:o,base:i,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(n+i)/2:n,y:a?o:(o+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}De(Nc,"id","bar"),De(Nc,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),De(Nc,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const $s={average(e){if(!e.length)return!1;let t,n,o=new Set,i=0,a=0;for(t=0,n=e.length;t<n;++t){const r=e[t].element;if(r&&r.hasValue()){const s=r.tooltipPosition();o.add(s.x),i+=s.y,++a}}return a===0||o.size===0?!1:{x:[...o].reduce((r,s)=>r+s)/o.size,y:i/a}},nearest(e,t){if(!e.length)return!1;let n=t.x,o=t.y,i=Number.POSITIVE_INFINITY,a,r,s;for(a=0,r=e.length;a<r;++a){const l=e[a].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),d=O6(t,c);d<i&&(i=d,s=l)}}if(s){const l=s.tooltipPosition();n=l.x,o=l.y}return{x:n,y:o}}};function Yn(e,t){return t&&(ft(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function mo(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
9
|
+
`)>-1?e.split(`
|
|
10
|
+
`):e}function l8(e,t){const{element:n,datasetIndex:o,index:i}=t,a=e.getDatasetMeta(o).controller,{label:r,value:s}=a.getLabelAndValue(i);return{chart:e,label:r,parsed:a.getParsed(i),raw:e.data.datasets[o].data[i],formattedValue:s,dataset:a.getDataset(),dataIndex:i,datasetIndex:o,element:n}}function oy(e,t){const n=e.chart.ctx,{body:o,footer:i,title:a}=e,{boxWidth:r,boxHeight:s}=t,l=eo(t.bodyFont),c=eo(t.titleFont),d=eo(t.footerFont),u=a.length,h=i.length,p=o.length,m=ci(t.padding);let g=m.height,b=0,v=o.reduce((C,k)=>C+k.before.length+k.lines.length+k.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*t.titleSpacing+t.titleMarginBottom),v){const C=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;g+=p*C+(v-p)*l.lineHeight+(v-1)*t.bodySpacing}h&&(g+=t.footerMarginTop+h*d.lineHeight+(h-1)*t.footerSpacing);let y=0;const w=function(C){b=Math.max(b,n.measureText(C).width+y)};return n.save(),n.font=c.string,Ve(e.title,w),n.font=l.string,Ve(e.beforeBody.concat(e.afterBody),w),y=t.displayColors?r+2+t.boxPadding:0,Ve(o,C=>{Ve(C.before,w),Ve(C.lines,w),Ve(C.after,w)}),y=0,n.font=d.string,Ve(e.footer,w),n.restore(),b+=m.width,{width:b,height:g}}function c8(e,t){const{y:n,height:o}=t;return n<o/2?"top":n>e.height-o/2?"bottom":"center"}function d8(e,t,n,o){const{x:i,width:a}=o,r=n.caretSize+n.caretPadding;if(e==="left"&&i+a+r>t.width||e==="right"&&i-a-r<0)return!0}function u8(e,t,n,o){const{x:i,width:a}=n,{width:r,chartArea:{left:s,right:l}}=e;let c="center";return o==="center"?c=i<=(s+l)/2?"left":"right":i<=a/2?c="left":i>=r-a/2&&(c="right"),d8(c,e,t,n)&&(c="center"),c}function iy(e,t,n){const o=n.yAlign||t.yAlign||c8(e,n);return{xAlign:n.xAlign||t.xAlign||u8(e,t,n,o),yAlign:o}}function h8(e,t){let{x:n,width:o}=e;return t==="right"?n-=o:t==="center"&&(n-=o/2),n}function p8(e,t,n){let{y:o,height:i}=e;return t==="top"?o+=n:t==="bottom"?o-=i+n:o-=i/2,o}function ay(e,t,n,o){const{caretSize:i,caretPadding:a,cornerRadius:r}=e,{xAlign:s,yAlign:l}=n,c=i+a,{topLeft:d,topRight:u,bottomLeft:h,bottomRight:p}=_s(r);let m=h8(t,s);const g=p8(t,l,c);return l==="center"?s==="left"?m+=c:s==="right"&&(m-=c):s==="left"?m-=Math.max(d,h)+i:s==="right"&&(m+=Math.max(u,p)+i),{x:Bn(m,0,o.width-t.width),y:Bn(g,0,o.height-t.height)}}function nc(e,t,n){const o=ci(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-o.right:e.x+o.left}function ry(e){return Yn([],mo(e))}function f8(e,t,n){return pr(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function sy(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const ZC={beforeTitle:po,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(o>0&&t.dataIndex<o)return n[t.dataIndex]}return""},afterTitle:po,beforeBody:po,beforeLabel:po,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return Be(n)||(t+=n),t},labelColor(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:po,afterBody:po,beforeFooter:po,footer:po,afterFooter:po};function Bt(e,t,n,o){const i=e[t].call(n,o);return typeof i>"u"?ZC[t].call(n,o):i}class Sp extends er{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,o=this.options.setContext(this.getContext()),i=o.enabled&&n.options.animation&&o.animations,a=new VC(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=f8(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:o}=n,i=Bt(o,"beforeTitle",this,t),a=Bt(o,"title",this,t),r=Bt(o,"afterTitle",this,t);let s=[];return s=Yn(s,mo(i)),s=Yn(s,mo(a)),s=Yn(s,mo(r)),s}getBeforeBody(t,n){return ry(Bt(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:o}=n,i=[];return Ve(t,a=>{const r={before:[],lines:[],after:[]},s=sy(o,a);Yn(r.before,mo(Bt(s,"beforeLabel",this,a))),Yn(r.lines,Bt(s,"label",this,a)),Yn(r.after,mo(Bt(s,"afterLabel",this,a))),i.push(r)}),i}getAfterBody(t,n){return ry(Bt(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:o}=n,i=Bt(o,"beforeFooter",this,t),a=Bt(o,"footer",this,t),r=Bt(o,"afterFooter",this,t);let s=[];return s=Yn(s,mo(i)),s=Yn(s,mo(a)),s=Yn(s,mo(r)),s}_createItems(t){const n=this._active,o=this.chart.data,i=[],a=[],r=[];let s=[],l,c;for(l=0,c=n.length;l<c;++l)s.push(l8(this.chart,n[l]));return t.filter&&(s=s.filter((d,u,h)=>t.filter(d,u,h,o))),t.itemSort&&(s=s.sort((d,u)=>t.itemSort(d,u,o))),Ve(s,d=>{const u=sy(t.callbacks,d);i.push(Bt(u,"labelColor",this,d)),a.push(Bt(u,"labelPointStyle",this,d)),r.push(Bt(u,"labelTextColor",this,d))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=r,this.dataPoints=s,s}update(t,n){const o=this.options.setContext(this.getContext()),i=this._active;let a,r=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const s=$s[o.position].call(this,i,this._eventPosition);r=this._createItems(o),this.title=this.getTitle(r,o),this.beforeBody=this.getBeforeBody(r,o),this.body=this.getBody(r,o),this.afterBody=this.getAfterBody(r,o),this.footer=this.getFooter(r,o);const l=this._size=oy(this,o),c=Object.assign({},s,l),d=iy(this.chart,o,c),u=ay(o,c,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,a={opacity:1,x:u.x,y:u.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=r,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,o,i){const a=this.getCaretPosition(t,o,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(t,n,o){const{xAlign:i,yAlign:a}=this,{caretSize:r,cornerRadius:s}=o,{topLeft:l,topRight:c,bottomLeft:d,bottomRight:u}=_s(s),{x:h,y:p}=t,{width:m,height:g}=n;let b,v,y,w,C,k;return a==="center"?(C=p+g/2,i==="left"?(b=h,v=b-r,w=C+r,k=C-r):(b=h+m,v=b+r,w=C-r,k=C+r),y=b):(i==="left"?v=h+Math.max(l,d)+r:i==="right"?v=h+m-Math.max(c,u)-r:v=this.caretX,a==="top"?(w=p,C=w-r,b=v-r,y=v+r):(w=p+g,C=w+r,b=v+r,y=v-r),k=w),{x1:b,x2:v,x3:y,y1:w,y2:C,y3:k}}drawTitle(t,n,o){const i=this.title,a=i.length;let r,s,l;if(a){const c=ch(o.rtl,this.x,this.width);for(t.x=nc(this,o.titleAlign,o),n.textAlign=c.textAlign(o.titleAlign),n.textBaseline="middle",r=eo(o.titleFont),s=o.titleSpacing,n.fillStyle=o.titleColor,n.font=r.string,l=0;l<a;++l)n.fillText(i[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+s,l+1===a&&(t.y+=o.titleMarginBottom-s)}}_drawColorBox(t,n,o,i,a){const r=this.labelColors[o],s=this.labelPointStyles[o],{boxHeight:l,boxWidth:c}=a,d=eo(a.bodyFont),u=nc(this,"left",a),h=i.x(u),p=l<d.lineHeight?(d.lineHeight-l)/2:0,m=n.y+p;if(a.usePointStyle){const g={radius:Math.min(c,l)/2,pointStyle:s.pointStyle,rotation:s.rotation},b=i.leftForLtr(h,c)+c/2,v=m+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,kb(t,g,b,v),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,kb(t,g,b,v)}else{t.lineWidth=Ae(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const g=i.leftForLtr(h,c),b=i.leftForLtr(i.xPlus(h,1),c-2),v=_s(r.borderRadius);Object.values(v).some(y=>y!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,_p(t,{x:g,y:m,w:c,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),_p(t,{x:b,y:m+1,w:c-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(g,m,c,l),t.strokeRect(g,m,c,l),t.fillStyle=r.backgroundColor,t.fillRect(b,m+1,c-2,l-2))}t.fillStyle=this.labelTextColors[o]}drawBody(t,n,o){const{body:i}=this,{bodySpacing:a,bodyAlign:r,displayColors:s,boxHeight:l,boxWidth:c,boxPadding:d}=o,u=eo(o.bodyFont);let h=u.lineHeight,p=0;const m=ch(o.rtl,this.x,this.width),g=function(S){n.fillText(S,m.x(t.x+p),t.y+h/2),t.y+=h+a},b=m.textAlign(r);let v,y,w,C,k,O,P;for(n.textAlign=r,n.textBaseline="middle",n.font=u.string,t.x=nc(this,b,o),n.fillStyle=o.bodyColor,Ve(this.beforeBody,g),p=s&&b!=="right"?r==="center"?c/2+d:c+2+d:0,C=0,O=i.length;C<O;++C){for(v=i[C],y=this.labelTextColors[C],n.fillStyle=y,Ve(v.before,g),w=v.lines,s&&w.length&&(this._drawColorBox(n,t,C,m,o),h=Math.max(u.lineHeight,l)),k=0,P=w.length;k<P;++k)g(w[k]),h=u.lineHeight;Ve(v.after,g)}p=0,h=u.lineHeight,Ve(this.afterBody,g),t.y-=a}drawFooter(t,n,o){const i=this.footer,a=i.length;let r,s;if(a){const l=ch(o.rtl,this.x,this.width);for(t.x=nc(this,o.footerAlign,o),t.y+=o.footerMarginTop,n.textAlign=l.textAlign(o.footerAlign),n.textBaseline="middle",r=eo(o.footerFont),n.fillStyle=o.footerColor,n.font=r.string,s=0;s<a;++s)n.fillText(i[s],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+o.footerSpacing}}drawBackground(t,n,o,i){const{xAlign:a,yAlign:r}=this,{x:s,y:l}=t,{width:c,height:d}=o,{topLeft:u,topRight:h,bottomLeft:p,bottomRight:m}=_s(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(s+u,l),r==="top"&&this.drawCaret(t,n,o,i),n.lineTo(s+c-h,l),n.quadraticCurveTo(s+c,l,s+c,l+h),r==="center"&&a==="right"&&this.drawCaret(t,n,o,i),n.lineTo(s+c,l+d-m),n.quadraticCurveTo(s+c,l+d,s+c-m,l+d),r==="bottom"&&this.drawCaret(t,n,o,i),n.lineTo(s+p,l+d),n.quadraticCurveTo(s,l+d,s,l+d-p),r==="center"&&a==="left"&&this.drawCaret(t,n,o,i),n.lineTo(s,l+u),n.quadraticCurveTo(s,l,s+u,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,o=this.$animations,i=o&&o.x,a=o&&o.y;if(i||a){const r=$s[t.position].call(this,this._active,this._eventPosition);if(!r)return;const s=this._size=oy(this,t),l=Object.assign({},r,this._size),c=iy(n,t,l),d=ay(t,l,c,n);(i._to!==d.x||a._to!==d.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=s.width,this.height=s.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const r=ci(n.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&s&&(t.save(),t.globalAlpha=o,this.drawBackground(a,t,i,n),yB(t,n.textDirection),a.y+=r.top,this.drawTitle(a,t,n),this.drawBody(a,t,n),this.drawFooter(a,t,n),xB(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const o=this._active,i=t.map(({datasetIndex:s,index:l})=>{const c=this.chart.getDatasetMeta(s);if(!c)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:c.data[l],index:l}}),a=!md(o,i),r=this._positionChanged(i,n);(a||r)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],r=this._getActiveElements(t,a,n,o),s=this._positionChanged(r,t),l=n||!md(r,a)||s;return l&&(this._active=r,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,o,i){const a=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const r=this.chart.getElementsAtEventForMode(t,a.mode,a,o);return a.reverse&&r.reverse(),r}_positionChanged(t,n){const{caretX:o,caretY:i,options:a}=this,r=$s[a.position].call(this,t,n);return r!==!1&&(o!==r.x||i!==r.y)}}De(Sp,"positioners",$s);var g8={id:"tooltip",_element:Sp,positioners:$s,afterInit(e,t,n){n&&(e.tooltip=new Sp({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:ZC},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const m8=(e,t,n,o)=>(typeof t=="string"?(n=e.push(t)-1,o.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function v8(e,t,n,o){const i=e.indexOf(t);if(i===-1)return m8(e,t,n,o);const a=e.lastIndexOf(t);return i!==a?n:i}const b8=(e,t)=>e===null?null:Bn(Math.round(e),0,t);function XC(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Ep extends fr{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:i,label:a}of n)o[i]===a&&o.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Be(t))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===t?n:v8(o,t,Ge(n,t),this._addedLabels),b8(n,o.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:o,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(o=0),n||(i=this.getLabels().length-1)),this.min=o,this.max=i}buildTicks(){const t=this.min,n=this.max,o=this.options.offset,i=[];let a=this.getLabels();a=t===0&&n===a.length-1?a:a.slice(t,n+1),this._valueRange=Math.max(a.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let r=t;r<=n;r++)i.push({value:r});return i}getLabelForValue(t){return XC.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}De(Ep,"id","category"),De(Ep,"defaults",{ticks:{callback:XC}});function y8(e,t){const n=[],{bounds:o,step:i,min:a,max:r,precision:s,count:l,maxTicks:c,maxDigits:d,includeBounds:u}=e,h=i||1,p=c-1,{min:m,max:g}=t,b=!Be(a),v=!Be(r),y=!Be(l),w=(g-m)/(d+1);let C=pb((g-m)/p/h)*h,k,O,P,S;if(C<1e-14&&!b&&!v)return[{value:m},{value:g}];S=Math.ceil(g/C)-Math.floor(m/C),S>p&&(C=pb(S*C/p/h)*h),Be(s)||(k=Math.pow(10,s),C=Math.ceil(C*k)/k),o==="ticks"?(O=Math.floor(m/C)*C,P=Math.ceil(g/C)*C):(O=m,P=g),b&&v&&i&&k6((r-a)/i,C/1e3)?(S=Math.round(Math.min((r-a)/C,c)),C=(r-a)/S,O=a,P=r):y?(O=b?a:O,P=v?r:P,S=l-1,C=(P-O)/S):(S=(P-O)/C,Rc(S,Math.round(S),C/1e3)?S=Math.round(S):S=Math.ceil(S));const V=Math.max(fb(C),fb(O));k=Math.pow(10,Be(s)?V:s),O=Math.round(O*k)/k,P=Math.round(P*k)/k;let H=0;for(b&&(u&&O!==a?(n.push({value:a}),O<a&&H++,Rc(Math.round((O+H*C)*k)/k,a,ly(a,w,e))&&H++):O<a&&H++);H<S;++H){const A=Math.round((O+H*C)*k)/k;if(v&&A>r)break;n.push({value:A})}return v&&u&&P!==r?n.length&&Rc(n[n.length-1].value,r,ly(r,w,e))?n[n.length-1].value=r:n.push({value:r}):(!v||P===r)&&n.push({value:P}),n}function ly(e,t,{horizontal:n,minRotation:o}){const i=Li(o),a=(n?Math.sin(i):Math.cos(i))||.001,r=.75*t*(""+e).length;return Math.min(t/a,r)}class x8 extends fr{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return Be(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:i,max:a}=this;const r=l=>i=n?i:l,s=l=>a=o?a:l;if(t){const l=oi(i),c=oi(a);l<0&&c<0?s(0):l>0&&c>0&&r(0)}if(i===a){let l=a===0?1:Math.abs(a*.05);s(a+l),t||r(i-l)}this.min=i,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=t,i;return o?(i=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let o=this.getTickLimit();o=Math.max(2,o);const i={maxTicks:o,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,r=y8(i,a);return t.bounds==="ticks"&&$6(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let n=this.min,o=this.max;if(super.configure(),this.options.offset&&t.length){const i=(o-n)/Math.max(t.length-1,1)/2;n-=i,o+=i}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(t){return kC(t,this.chart.options.locale,this.options.ticks.format)}}class Op extends x8{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=$n(t)?t:0,this.max=$n(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,o=Li(this.options.ticks.minRotation),i=(t?Math.sin(o):Math.cos(o))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}De(Op,"id","linear"),De(Op,"defaults",{ticks:{callback:$C.formatters.numeric}});const fu={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Gt=Object.keys(fu);function cy(e,t){return e-t}function dy(e,t){if(Be(t))return null;const n=e._adapter,{parser:o,round:i,isoWeekday:a}=e._parseOpts;let r=t;return typeof o=="function"&&(r=o(r)),$n(r)||(r=typeof o=="string"?n.parse(r,o):n.parse(r)),r===null?null:(i&&(r=i==="week"&&(yd(a)||a===!0)?n.startOf(r,"isoWeek",a):n.startOf(r,i)),+r)}function uy(e,t,n,o){const i=Gt.length;for(let a=Gt.indexOf(e);a<i-1;++a){const r=fu[Gt[a]],s=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((n-t)/(s*r.size))<=o)return Gt[a]}return Gt[i-1]}function w8(e,t,n,o,i){for(let a=Gt.length-1;a>=Gt.indexOf(n);a--){const r=Gt[a];if(fu[r].common&&e._adapter.diff(i,o,r)>=t-1)return r}return Gt[n?Gt.indexOf(n):0]}function C8(e){for(let t=Gt.indexOf(e)+1,n=Gt.length;t<n;++t)if(fu[Gt[t]].common)return Gt[t]}function hy(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:o,hi:i}=Xf(n,t),a=n[o]>=t?n[o]:n[i];e[a]=!0}}function _8(e,t,n,o){const i=e._adapter,a=+i.startOf(t[0].value,o),r=t[t.length-1].value;let s,l;for(s=a;s<=r;s=+i.add(s,1,o))l=n[s],l>=0&&(t[l].major=!0);return t}function py(e,t,n){const o=[],i={},a=t.length;let r,s;for(r=0;r<a;++r)s=t[r],i[s]=r,o.push({value:s,major:!1});return a===0||!n?o:_8(e,o,i,n)}class js extends fr{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const o=t.time||(t.time={}),i=this._adapter=new LC._date(t.adapters.date);i.init(n),xs(o.displayFormats,i.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:dy(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,o=t.time.unit||"day";let{min:i,max:a,minDefined:r,maxDefined:s}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!s&&!isNaN(c.max)&&(a=Math.max(a,c.max))}(!r||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=$n(i)&&!isNaN(i)?i:+n.startOf(Date.now(),o),a=$n(a)&&!isNaN(a)?a:+n.endOf(Date.now(),o)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],o=t[t.length-1]),{min:n,max:o}}buildTicks(){const t=this.options,n=t.time,o=t.ticks,i=o.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const a=this.min,r=this.max,s=D6(i,a,r);return this._unit=n.unit||(o.autoSkip?uy(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):w8(this,s.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:C8(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),py(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,o=0,i,a;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?o=a:o=(a-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;n=Bn(n,0,r),o=Bn(o,0,r),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const t=this._adapter,n=this.min,o=this.max,i=this.options,a=i.time,r=a.unit||uy(a.minUnit,n,o,this._getLabelCapacity(n)),s=Ge(i.ticks.stepSize,1),l=r==="week"?a.isoWeekday:!1,c=yd(l)||l===!0,d={};let u=n,h,p;if(c&&(u=+t.startOf(u,"isoWeek",l)),u=+t.startOf(u,c?"day":r),t.diff(o,n,r)>1e5*s)throw new Error(n+" and "+o+" are too far apart with stepSize of "+s+" "+r);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(h=u,p=0;h<o;h=+t.add(h,s,r),p++)hy(d,h,m);return(h===o||i.bounds==="ticks"||p===1)&&hy(d,h,m),Object.keys(d).sort(cy).map(g=>+g)}getLabelForValue(t){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(t,o.tooltipFormat):n.format(t,o.displayFormats.datetime)}format(t,n){const o=this.options.time.displayFormats,i=this._unit,a=n||o[i];return this._adapter.format(t,a)}_tickFormatFunction(t,n,o,i){const a=this.options,r=a.ticks.callback;if(r)return Qe(r,[t,n,o],this);const s=a.time.displayFormats,l=this._unit,c=this._majorUnit,d=l&&s[l],u=c&&s[c],h=o[n],p=c&&u&&h&&h.major;return this._adapter.format(t,i||(p?u:d))}generateTickLabels(t){let n,o,i;for(n=0,o=t.length;n<o;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,o=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(t){const n=this._offsets,o=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,o=this.ctx.measureText(t).width,i=Li(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(i),r=Math.sin(i),s=this._resolveTickFontOptions(0).size;return{w:o*a+s*r,h:o*r+s*a}}_getLabelCapacity(t){const n=this.options.time,o=n.displayFormats,i=o[n.unit]||o.millisecond,a=this._tickFormatFunction(t,0,py(this,[t],this._majorUnit),i),r=this._getLabelSize(a),s=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],n,o;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,o=i.length;n<o;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,o;if(t.length)return t;const i=this.getLabels();for(n=0,o=i.length;n<o;++n)t.push(dy(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return xC(t.sort(cy))}}De(js,"id","time"),De(js,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function oc(e,t,n){let o=0,i=e.length-1,a,r,s,l;n?(t>=e[o].pos&&t<=e[i].pos&&({lo:o,hi:i}=wp(e,"pos",t)),{pos:a,time:s}=e[o],{pos:r,time:l}=e[i]):(t>=e[o].time&&t<=e[i].time&&({lo:o,hi:i}=wp(e,"time",t)),{time:a,pos:s}=e[o],{time:r,pos:l}=e[i]);const c=r-a;return c?s+(l-s)*(t-a)/c:s}class fy extends js{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=oc(n,this.min),this._tableRange=oc(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:o}=this,i=[],a=[];let r,s,l,c,d;for(r=0,s=t.length;r<s;++r)c=t[r],c>=n&&c<=o&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(r=0,s=i.length;r<s;++r)d=i[r+1],l=i[r-1],c=i[r],Math.round((d+l)/2)!==c&&a.push({time:c,pos:r/(s-1)});return a}_generate(){const t=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(t)||!o.length)&&o.splice(0,0,t),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((i,a)=>i-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?t=this.normalize(n.concat(o)):t=n.length?n:o,t=this._cache.all=t,t}getDecimalForValue(t){return(oc(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,o=this.getDecimalForPixel(t)/n.factor-n.end;return oc(this._table,o*this._tableRange+this._minPos,!0)}}De(fy,"id","timeseries"),De(fy,"defaults",js.defaults);function gr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lc={exports:{}},k8=Lc.exports,gy;function $8(){return gy||(gy=1,function(e,t){(function(n,o){e.exports=o()})(k8,function(){var n=1e3,o=6e4,i=36e5,a="millisecond",r="second",s="minute",l="hour",c="day",d="week",u="month",h="quarter",p="year",m="date",g="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(j){var U=["th","st","nd","rd"],q=j%100;return"["+j+(U[(q-20)%10]||U[q]||U[0])+"]"}},w=function(j,U,q){var oe=String(j);return!oe||oe.length>=U?j:""+Array(U+1-oe.length).join(q)+j},C={s:w,z:function(j){var U=-j.utcOffset(),q=Math.abs(U),oe=Math.floor(q/60),ne=q%60;return(U<=0?"+":"-")+w(oe,2,"0")+":"+w(ne,2,"0")},m:function j(U,q){if(U.date()<q.date())return-j(q,U);var oe=12*(q.year()-U.year())+(q.month()-U.month()),ne=U.clone().add(oe,u),le=q-ne<0,he=U.clone().add(oe+(le?-1:1),u);return+(-(oe+(q-ne)/(le?ne-he:he-ne))||0)},a:function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},p:function(j){return{M:u,y:p,w:d,d:c,D:m,h:l,m:s,s:r,ms:a,Q:h}[j]||String(j||"").toLowerCase().replace(/s$/,"")},u:function(j){return j===void 0}},k="en",O={};O[k]=y;var P="$isDayjsObject",S=function(j){return j instanceof G||!(!j||!j[P])},V=function j(U,q,oe){var ne;if(!U)return k;if(typeof U=="string"){var le=U.toLowerCase();O[le]&&(ne=le),q&&(O[le]=q,ne=le);var he=U.split("-");if(!ne&&he.length>1)return j(he[0])}else{var de=U.name;O[de]=U,ne=de}return!oe&&ne&&(k=ne),ne||!oe&&k},H=function(j,U){if(S(j))return j.clone();var q=typeof U=="object"?U:{};return q.date=j,q.args=arguments,new G(q)},A=C;A.l=V,A.i=S,A.w=function(j,U){return H(j,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var G=function(){function j(q){this.$L=V(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[P]=!0}var U=j.prototype;return U.parse=function(q){this.$d=function(oe){var ne=oe.date,le=oe.utc;if(ne===null)return new Date(NaN);if(A.u(ne))return new Date;if(ne instanceof Date)return new Date(ne);if(typeof ne=="string"&&!/Z$/i.test(ne)){var he=ne.match(b);if(he){var de=he[2]-1||0,Ce=(he[7]||"0").substring(0,3);return le?new Date(Date.UTC(he[1],de,he[3]||1,he[4]||0,he[5]||0,he[6]||0,Ce)):new Date(he[1],de,he[3]||1,he[4]||0,he[5]||0,he[6]||0,Ce)}}return new Date(ne)}(q),this.init()},U.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},U.$utils=function(){return A},U.isValid=function(){return this.$d.toString()!==g},U.isSame=function(q,oe){var ne=H(q);return this.startOf(oe)<=ne&&ne<=this.endOf(oe)},U.isAfter=function(q,oe){return H(q)<this.startOf(oe)},U.isBefore=function(q,oe){return this.endOf(oe)<H(q)},U.$g=function(q,oe,ne){return A.u(q)?this[oe]:this.set(ne,q)},U.unix=function(){return Math.floor(this.valueOf()/1e3)},U.valueOf=function(){return this.$d.getTime()},U.startOf=function(q,oe){var ne=this,le=!!A.u(oe)||oe,he=A.p(q),de=function(ye,ke){var Te=A.w(ne.$u?Date.UTC(ne.$y,ke,ye):new Date(ne.$y,ke,ye),ne);return le?Te:Te.endOf(c)},Ce=function(ye,ke){return A.w(ne.toDate()[ye].apply(ne.toDate("s"),(le?[0,0,0,0]:[23,59,59,999]).slice(ke)),ne)},me=this.$W,Oe=this.$M,B=this.$D,W="set"+(this.$u?"UTC":"");switch(he){case p:return le?de(1,0):de(31,11);case u:return le?de(1,Oe):de(0,Oe+1);case d:var Z=this.$locale().weekStart||0,re=(me<Z?me+7:me)-Z;return de(le?B-re:B+(6-re),Oe);case c:case m:return Ce(W+"Hours",0);case l:return Ce(W+"Minutes",1);case s:return Ce(W+"Seconds",2);case r:return Ce(W+"Milliseconds",3);default:return this.clone()}},U.endOf=function(q){return this.startOf(q,!1)},U.$set=function(q,oe){var ne,le=A.p(q),he="set"+(this.$u?"UTC":""),de=(ne={},ne[c]=he+"Date",ne[m]=he+"Date",ne[u]=he+"Month",ne[p]=he+"FullYear",ne[l]=he+"Hours",ne[s]=he+"Minutes",ne[r]=he+"Seconds",ne[a]=he+"Milliseconds",ne)[le],Ce=le===c?this.$D+(oe-this.$W):oe;if(le===u||le===p){var me=this.clone().set(m,1);me.$d[de](Ce),me.init(),this.$d=me.set(m,Math.min(this.$D,me.daysInMonth())).$d}else de&&this.$d[de](Ce);return this.init(),this},U.set=function(q,oe){return this.clone().$set(q,oe)},U.get=function(q){return this[A.p(q)]()},U.add=function(q,oe){var ne,le=this;q=Number(q);var he=A.p(oe),de=function(Oe){var B=H(le);return A.w(B.date(B.date()+Math.round(Oe*q)),le)};if(he===u)return this.set(u,this.$M+q);if(he===p)return this.set(p,this.$y+q);if(he===c)return de(1);if(he===d)return de(7);var Ce=(ne={},ne[s]=o,ne[l]=i,ne[r]=n,ne)[he]||1,me=this.$d.getTime()+q*Ce;return A.w(me,this)},U.subtract=function(q,oe){return this.add(-1*q,oe)},U.format=function(q){var oe=this,ne=this.$locale();if(!this.isValid())return ne.invalidDate||g;var le=q||"YYYY-MM-DDTHH:mm:ssZ",he=A.z(this),de=this.$H,Ce=this.$m,me=this.$M,Oe=ne.weekdays,B=ne.months,W=ne.meridiem,Z=function(ke,Te,it,J){return ke&&(ke[Te]||ke(oe,le))||it[Te].slice(0,J)},re=function(ke){return A.s(de%12||12,ke,"0")},ye=W||function(ke,Te,it){var J=ke<12?"AM":"PM";return it?J.toLowerCase():J};return le.replace(v,function(ke,Te){return Te||function(it){switch(it){case"YY":return String(oe.$y).slice(-2);case"YYYY":return A.s(oe.$y,4,"0");case"M":return me+1;case"MM":return A.s(me+1,2,"0");case"MMM":return Z(ne.monthsShort,me,B,3);case"MMMM":return Z(B,me);case"D":return oe.$D;case"DD":return A.s(oe.$D,2,"0");case"d":return String(oe.$W);case"dd":return Z(ne.weekdaysMin,oe.$W,Oe,2);case"ddd":return Z(ne.weekdaysShort,oe.$W,Oe,3);case"dddd":return Oe[oe.$W];case"H":return String(de);case"HH":return A.s(de,2,"0");case"h":return re(1);case"hh":return re(2);case"a":return ye(de,Ce,!0);case"A":return ye(de,Ce,!1);case"m":return String(Ce);case"mm":return A.s(Ce,2,"0");case"s":return String(oe.$s);case"ss":return A.s(oe.$s,2,"0");case"SSS":return A.s(oe.$ms,3,"0");case"Z":return he}return null}(ke)||he.replace(":","")})},U.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},U.diff=function(q,oe,ne){var le,he=this,de=A.p(oe),Ce=H(q),me=(Ce.utcOffset()-this.utcOffset())*o,Oe=this-Ce,B=function(){return A.m(he,Ce)};switch(de){case p:le=B()/12;break;case u:le=B();break;case h:le=B()/3;break;case d:le=(Oe-me)/6048e5;break;case c:le=(Oe-me)/864e5;break;case l:le=Oe/i;break;case s:le=Oe/o;break;case r:le=Oe/n;break;default:le=Oe}return ne?le:A.a(le)},U.daysInMonth=function(){return this.endOf(u).$D},U.$locale=function(){return O[this.$L]},U.locale=function(q,oe){if(!q)return this.$L;var ne=this.clone(),le=V(q,oe,!0);return le&&(ne.$L=le),ne},U.clone=function(){return A.w(this.$d,this)},U.toDate=function(){return new Date(this.valueOf())},U.toJSON=function(){return this.isValid()?this.toISOString():null},U.toISOString=function(){return this.$d.toISOString()},U.toString=function(){return this.$d.toUTCString()},j}(),te=G.prototype;return H.prototype=te,[["$ms",a],["$s",r],["$m",s],["$H",l],["$W",c],["$M",u],["$y",p],["$D",m]].forEach(function(j){te[j[1]]=function(U){return this.$g(U,j[0],j[1])}}),H.extend=function(j,U){return j.$i||(j(U,G,H),j.$i=!0),H},H.locale=V,H.isDayjs=S,H.unix=function(j){return H(1e3*j)},H.en=O[k],H.Ls=O,H.p={},H})}(Lc)),Lc.exports}var S8=$8();const bt=gr(S8);var Fc={exports:{}},E8=Fc.exports,my;function O8(){return my||(my=1,function(e,t){(function(n,o){e.exports=o()})(E8,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,a=/\d\d/,r=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,l={},c=function(b){return(b=+b)+(b>68?1900:2e3)},d=function(b){return function(v){this[b]=+v}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(b){(this.zone||(this.zone={})).offset=function(v){if(!v||v==="Z")return 0;var y=v.match(/([+-]|\d\d)/g),w=60*y[1]+(+y[2]||0);return w===0?0:y[0]==="+"?-w:w}(b)}],h=function(b){var v=l[b];return v&&(v.indexOf?v:v.s.concat(v.f))},p=function(b,v){var y,w=l.meridiem;if(w){for(var C=1;C<=24;C+=1)if(b.indexOf(w(C,0,v))>-1){y=C>12;break}}else y=b===(v?"pm":"PM");return y},m={A:[s,function(b){this.afternoon=p(b,!1)}],a:[s,function(b){this.afternoon=p(b,!0)}],Q:[i,function(b){this.month=3*(b-1)+1}],S:[i,function(b){this.milliseconds=100*+b}],SS:[a,function(b){this.milliseconds=10*+b}],SSS:[/\d{3}/,function(b){this.milliseconds=+b}],s:[r,d("seconds")],ss:[r,d("seconds")],m:[r,d("minutes")],mm:[r,d("minutes")],H:[r,d("hours")],h:[r,d("hours")],HH:[r,d("hours")],hh:[r,d("hours")],D:[r,d("day")],DD:[a,d("day")],Do:[s,function(b){var v=l.ordinal,y=b.match(/\d+/);if(this.day=y[0],v)for(var w=1;w<=31;w+=1)v(w).replace(/\[|\]/g,"")===b&&(this.day=w)}],w:[r,d("week")],ww:[a,d("week")],M:[r,d("month")],MM:[a,d("month")],MMM:[s,function(b){var v=h("months"),y=(h("monthsShort")||v.map(function(w){return w.slice(0,3)})).indexOf(b)+1;if(y<1)throw new Error;this.month=y%12||y}],MMMM:[s,function(b){var v=h("months").indexOf(b)+1;if(v<1)throw new Error;this.month=v%12||v}],Y:[/[+-]?\d+/,d("year")],YY:[a,function(b){this.year=c(b)}],YYYY:[/\d{4}/,d("year")],Z:u,ZZ:u};function g(b){var v,y;v=b,y=l&&l.formats;for(var w=(b=v.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(H,A,G){var te=G&&G.toUpperCase();return A||y[G]||n[G]||y[te].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(j,U,q){return U||q.slice(1)})})).match(o),C=w.length,k=0;k<C;k+=1){var O=w[k],P=m[O],S=P&&P[0],V=P&&P[1];w[k]=V?{regex:S,parser:V}:O.replace(/^\[|\]$/g,"")}return function(H){for(var A={},G=0,te=0;G<C;G+=1){var j=w[G];if(typeof j=="string")te+=j.length;else{var U=j.regex,q=j.parser,oe=H.slice(te),ne=U.exec(oe)[0];q.call(A,ne),H=H.replace(ne,"")}}return function(le){var he=le.afternoon;if(he!==void 0){var de=le.hours;he?de<12&&(le.hours+=12):de===12&&(le.hours=0),delete le.afternoon}}(A),A}}return function(b,v,y){y.p.customParseFormat=!0,b&&b.parseTwoDigitYear&&(c=b.parseTwoDigitYear);var w=v.prototype,C=w.parse;w.parse=function(k){var O=k.date,P=k.utc,S=k.args;this.$u=P;var V=S[1];if(typeof V=="string"){var H=S[2]===!0,A=S[3]===!0,G=H||A,te=S[2];A&&(te=S[2]),l=this.$locale(),!H&&te&&(l=y.Ls[te]),this.$d=function(oe,ne,le,he){try{if(["x","X"].indexOf(ne)>-1)return new Date((ne==="X"?1e3:1)*oe);var de=g(ne)(oe),Ce=de.year,me=de.month,Oe=de.day,B=de.hours,W=de.minutes,Z=de.seconds,re=de.milliseconds,ye=de.zone,ke=de.week,Te=new Date,it=Oe||(Ce||me?1:Te.getDate()),J=Ce||Te.getFullYear(),ce=0;Ce&&!me||(ce=me>0?me-1:Te.getMonth());var se,xe=B||0,Ze=W||0,Ct=Z||0,Ot=re||0;return ye?new Date(Date.UTC(J,ce,it,xe,Ze,Ct,Ot+60*ye.offset*1e3)):le?new Date(Date.UTC(J,ce,it,xe,Ze,Ct,Ot)):(se=new Date(J,ce,it,xe,Ze,Ct,Ot),ke&&(se=he(se).week(ke).toDate()),se)}catch{return new Date("")}}(O,V,P,y),this.init(),te&&te!==!0&&(this.$L=this.locale(te).$L),G&&O!=this.format(V)&&(this.$d=new Date("")),l={}}else if(V instanceof Array)for(var j=V.length,U=1;U<=j;U+=1){S[1]=V[U-1];var q=y.apply(this,S);if(q.isValid()){this.$d=q.$d,this.$L=q.$L,this.init();break}U===j&&(this.$d=new Date(""))}else C.call(this,k)}}})}(Fc)),Fc.exports}var T8=O8();const I8=gr(T8);var Bc={exports:{}},P8=Bc.exports,vy;function D8(){return vy||(vy=1,function(e,t){(function(n,o){e.exports=o()})(P8,function(){return function(n,o){var i=o.prototype,a=i.format;i.format=function(r){var s=this,l=this.$locale();if(!this.isValid())return a.bind(this)(r);var c=this.$utils(),d=(r||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(u){switch(u){case"Q":return Math.ceil((s.$M+1)/3);case"Do":return l.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return l.ordinal(s.week(),"W");case"w":case"ww":return c.s(s.week(),u==="w"?1:2,"0");case"W":case"WW":return c.s(s.isoWeek(),u==="W"?1:2,"0");case"k":case"kk":return c.s(String(s.$H===0?24:s.$H),u==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1e3);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return u}});return a.bind(this)(d)}}})}(Bc)),Bc.exports}var A8=D8();const R8=gr(A8);var zc={exports:{}},V8=zc.exports,by;function M8(){return by||(by=1,function(e,t){(function(n,o){e.exports=o()})(V8,function(){var n="month",o="quarter";return function(i,a){var r=a.prototype;r.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var s=r.add;r.add=function(c,d){return c=Number(c),this.$utils().p(d)===o?this.add(3*c,n):s.bind(this)(c,d)};var l=r.startOf;r.startOf=function(c,d){var u=this.$utils(),h=!!u.u(d)||d;if(u.p(c)===o){var p=this.quarter()-1;return h?this.month(3*p).startOf(n).startOf("day"):this.month(3*p+2).endOf(n).endOf("day")}return l.bind(this)(c,d)}}})}(zc)),zc.exports}var N8=M8();const L8=gr(N8);var Hc={exports:{}},F8=Hc.exports,yy;function B8(){return yy||(yy=1,function(e,t){(function(n,o){e.exports=o()})(F8,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(o,i,a){var r=i.prototype,s=r.format;a.en.formats=n,r.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var c=this.$locale().formats,d=function(u,h){return u.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(p,m,g){var b=g&&g.toUpperCase();return m||h[g]||n[g]||h[b].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(v,y,w){return y||w.slice(1)})})}(l,c===void 0?{}:c);return s.call(this,d)}}})}(Hc)),Hc.exports}var z8=B8();const H8=gr(z8);var jc={exports:{}},j8=jc.exports,xy;function W8(){return xy||(xy=1,function(e,t){(function(n,o){e.exports=o()})(j8,function(){var n="day";return function(o,i,a){var r=function(c){return c.add(4-c.isoWeekday(),n)},s=i.prototype;s.isoWeekYear=function(){return r(this).year()},s.isoWeek=function(c){if(!this.$utils().u(c))return this.add(7*(c-this.isoWeek()),n);var d,u,h,p,m=r(this),g=(d=this.isoWeekYear(),u=this.$u,h=(u?a.utc:a)().year(d).startOf("year"),p=4-h.isoWeekday(),h.isoWeekday()>4&&(p+=7),h.add(p,n));return m.diff(g,"week")+1},s.isoWeekday=function(c){return this.$utils().u(c)?this.day()||7:this.day(this.day()%7?c:c-7)};var l=s.startOf;s.startOf=function(c,d){var u=this.$utils(),h=!!u.u(d)||d;return u.p(c)==="isoweek"?h?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):l.bind(this)(c,d)}}})}(jc)),jc.exports}var U8=W8();const G8=gr(U8);bt.extend(R8);bt.extend(L8);bt.extend(H8);bt.extend(I8);bt.extend(G8);var q8={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};LC._date.override({formats:function(){return q8},parse:function(e,t){var n=typeof e;return e===null||n==="undefined"?null:n==="string"&&typeof t=="string"?bt(e,t).isValid()?bt(e,t).valueOf():null:e instanceof bt?null:bt(e).isValid()?bt(e).valueOf():null},format:function(e,t){return bt(e).format(t)},add:function(e,t,n){return bt(e).add(t,n).valueOf()},diff:function(e,t,n){return bt(e).diff(bt(t),n)},startOf:function(e,t,n){if(t==="isoWeek"){var o=typeof n=="number"&&n>0&&n<7?n:1;return bt(e).isoWeekday(o).startOf("day").valueOf()}return bt(e).startOf(t).valueOf()},endOf:function(e,t){return bt(e).endOf(t).valueOf()}});const Y8=ge({className:"timelineTooltip",slots:["container","arrow","indicator","content","title","row","label","value"],variants:{placement:{top:{},"top-start":{},"top-end":{},bottom:{},"bottom-start":{},"bottom-end":{},left:{},right:{}}},defaultVariants:{placement:"top"},base:{container:{position:"relative",display:"flex",background:"background.default",border:"1px solid",borderColor:"border.muted",borderRadius:"md",boxShadow:"stroke-bordered",fontFamily:"sans",fontSize:"xs",color:"text.subtle",pointerEvents:"none",transition:"opacity 0.1s ease"},arrow:{position:"absolute",width:"8",height:"8",background:"background.default",border:"1px solid",borderColor:"border.muted",transform:"rotate(45deg)",zIndex:-1},indicator:{width:"4",background:"background.success-bold-default",borderRadius:"2px 0 0 2px",flexShrink:0},content:{padding:"8"},title:{color:"text.subtle",marginBottom:"6",textStyle:"body_small_semibold"},row:{display:"flex",justifyContent:"space-between",marginBottom:"2",gap:"20"},label:{color:"text.subtle",textStyle:"body_xsmall_regular",minWidth:"max-content"},value:{color:"text.subtle",textStyle:"body_xsmall_regular",textAlign:"right"}},compoundVariants:[{placement:"top",css:{arrow:{bottom:"-4px",left:"50%",marginLeft:"-4px"}}},{placement:"top-start",css:{arrow:{bottom:"-4px",left:"25%",marginLeft:"-4px"}}},{placement:"top-end",css:{arrow:{bottom:"-4px",left:"75%",marginLeft:"-4px"}}},{placement:"bottom",css:{arrow:{top:"-4px",left:"50%",marginLeft:"-4px"}}},{placement:"bottom-start",css:{arrow:{top:"-4px",left:"25%",marginLeft:"-4px"}}},{placement:"bottom-end",css:{arrow:{top:"-4px",left:"75%",marginLeft:"-4px"}}},{placement:"left",css:{arrow:{right:"-4px",top:"50%",marginTop:"-4px"}}},{placement:"right",css:{arrow:{left:"-4px",top:"50%",marginTop:"-4px"}}}]}),wy=T({__name:"TimelineTooltip",props:{data:{},placement:{default:"top"},targetPosition:{}},setup(e){const t=e,n=E(()=>Y8({placement:t.placement})),o=E(()=>({backgroundColor:t.data.barColor||void 0})),i=E(()=>{if(t.data.isRunning){const s=Date.now()-t.data.startTime.getTime(),l=Math.round(s/(1e3*60));return l<60?`${l} min`:`${Math.floor(l/60)}h ${l%60}m`}else{const s=t.data.endTime.getTime()-t.data.startTime.getTime(),l=Math.round(s/(1e3*60));return l<60?`${l} min`:`${Math.floor(l/60)}h ${l%60}m`}}),a=E(()=>t.data.startTime.toLocaleTimeString("en-US",{hour12:!0,hour:"2-digit",minute:"2-digit"})),r=E(()=>t.data.endTime.toLocaleTimeString("en-US",{hour12:!0,hour:"2-digit",minute:"2-digit"}));return(s,l)=>(x(),D("div",{class:M(n.value.container),"data-testid":"timeline-tooltip"},[N("div",{class:M(n.value.arrow)},null,2),N("div",{class:M(n.value.indicator),style:Xc(o.value)},null,6),N("div",{class:M(n.value.content)},[N("div",{class:M(n.value.title)},ie(e.data.title),3),N("div",{class:M(n.value.row)},[N("span",{class:M(n.value.label)},ie(e.data.isRunning?"Running for":"Run Duration"),3),N("span",{class:M(n.value.value)},ie(i.value),3)],2),N("div",{class:M(n.value.row)},[N("span",{class:M(n.value.label)},"Start Time",2),N("span",{class:M(n.value.value)},ie(a.value),3)],2),e.data.isRunning?X("",!0):(x(),D("div",{key:0,class:M(n.value.row)},[N("span",{class:M(n.value.label)},"End Time",2),N("span",{class:M(n.value.value)},ie(r.value),3)],2)),e.data.extraData?(x(!0),D($e,{key:1},Ie(Object.entries(e.data.extraData),([c,d])=>(x(),D("div",{key:c,class:M(n.value.row)},[N("span",{class:M(n.value.label)},ie(c),3),N("span",{class:M(n.value.value)},ie(d),3)],2))),128)):X("",!0)],2)],2))}});var K8=Object.defineProperty,Z8=(e,t,n)=>t in e?K8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qr=(e,t,n)=>Z8(e,typeof t!="symbol"?t+"":t,n);class X8{constructor(){qr(this,"app",null),qr(this,"container",null),qr(this,"tooltipId","timeline-tooltip"),qr(this,"VIEWPORT_PADDING",8),qr(this,"ARROW_SIZE",8)}calculateOptimalPosition(t,n){const o={width:window.innerWidth,height:window.innerHeight,scrollX:window.pageXOffset,scrollY:window.pageYOffset},{left:i,top:a}=t,{height:r}=n,s=["top","bottom","top-start","top-end","bottom-start","bottom-end","left","right"];for(const l of s){const c=this.getPositionForPlacement(l,t,n);if(this.isPositionInViewport(c,n,o))return{...c,placement:l}}return{...this.constrainToViewport({left:i,top:a-r-this.ARROW_SIZE},n,o),placement:"top"}}getPositionForPlacement(t,n,o){const{left:i,top:a}=n,{width:r,height:s}=o;switch(t){case"top":return{left:i-r/2,top:a-s-this.ARROW_SIZE};case"bottom":return{left:i-r/2,top:a+this.ARROW_SIZE};case"top-start":return{left:i-r*.25,top:a-s-this.ARROW_SIZE};case"top-end":return{left:i-r*.75,top:a-s-this.ARROW_SIZE};case"bottom-start":return{left:i-r*.25,top:a+this.ARROW_SIZE};case"bottom-end":return{left:i-r*.75,top:a+this.ARROW_SIZE};case"left":return{left:i-r-this.ARROW_SIZE,top:a-s/2};case"right":return{left:i+this.ARROW_SIZE,top:a-s/2};default:return{left:i-r/2,top:a-s-this.ARROW_SIZE}}}isPositionInViewport(t,n,o){const{left:i,top:a}=t,{width:r,height:s}=n;return i>=o.scrollX+this.VIEWPORT_PADDING&&a>=o.scrollY+this.VIEWPORT_PADDING&&i+r<=o.scrollX+o.width-this.VIEWPORT_PADDING&&a+s<=o.scrollY+o.height-this.VIEWPORT_PADDING}constrainToViewport(t,n,o){const{width:i,height:a}=n;let{left:r,top:s}=t;const l=o.scrollX+this.VIEWPORT_PADDING,c=o.scrollX+o.width-i-this.VIEWPORT_PADDING;r=Math.max(l,Math.min(r,c));const d=o.scrollY+this.VIEWPORT_PADDING,u=o.scrollY+o.height-a-this.VIEWPORT_PADDING;return s=Math.max(d,Math.min(s,u)),{left:r,top:s}}show(t,n){this.hide();const o=document.createElement("div");o.style.cssText=`
|
|
11
|
+
position: absolute;
|
|
12
|
+
left: -9999px;
|
|
13
|
+
top: -9999px;
|
|
14
|
+
visibility: hidden;
|
|
15
|
+
pointer-events: none;
|
|
16
|
+
`;const i=Vh(wy,{data:t});i.mount(o),document.body.appendChild(o);const a={width:o.offsetWidth,height:o.offsetHeight};i.unmount(),document.body.removeChild(o);const r=this.calculateOptimalPosition(n,a);this.container=document.createElement("div"),this.container.id=this.tooltipId,this.container.style.cssText=`
|
|
17
|
+
position: absolute;
|
|
18
|
+
left: ${r.left}px;
|
|
19
|
+
top: ${r.top}px;
|
|
20
|
+
z-index: 1000;
|
|
21
|
+
pointer-events: none;
|
|
22
|
+
`,this.app=Vh(wy,{data:t,placement:r.placement,targetPosition:n}),this.app.mount(this.container),document.body.appendChild(this.container)}hide(){this.app&&(this.app.unmount(),this.app=null),this.container&&this.container.parentNode&&(this.container.parentNode.removeChild(this.container),this.container=null)}updatePosition(t){if(this.container&&this.app){const n={width:this.container.offsetWidth,height:this.container.offsetHeight},o=this.calculateOptimalPosition(t,n);this.container.style.left=`${o.left}px`,this.container.style.top=`${o.top}px`;const i=this.app._instance;i!=null&&i.props&&(i.props.placement=o.placement,i.props.targetPosition=t)}}}new X8;let Cy=!1;Cy||(Ko.register(Ep,Op,Nc,Vc,g8,js),Cy=!0);ge({slots:["ganttChart"],base:{ganttChart:{backgroundColor:"background.default",borderRadius:"lg",border:"1px solid",borderColor:"border.muted",height:"fit-content"}}});ge({slots:["timeItem","checkIcon","footer","mentuItemContainer"],base:{timeItem:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},checkIcon:{width:"12",height:"12",color:"text.normal"},footer:{display:"flex",alignItems:"center",paddingY:"6",paddingX:"8",borderRadius:"md",_focus:{outline:"none"}},mentuItemContainer:{display:"flex",flexDirection:"column",paddingX:"8",paddingTop:"8",maxHeight:"176",overflowY:"auto",gap:"0",scrollBehavior:"smooth","&:focus-within":{scrollBehavior:"smooth"}}}});const J8={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function Q8(e,t){return x(),D("svg",J8,[...t[0]||(t[0]=[N("g",{"clip-path":"url(#clip0_12427_264)"},[N("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM11.5303 6.53033L12.0607 6L11 4.93934L10.4697 5.46967L6.5 9.43934L5.53033 8.46967L5 7.93934L3.93934 9L4.46967 9.53033L5.96967 11.0303C6.26256 11.3232 6.73744 11.3232 7.03033 11.0303L11.5303 6.53033Z",fill:"currentColor"})],-1),N("defs",null,[N("clipPath",{id:"clip0_12427_264"},[N("rect",{width:"16",height:"16",fill:"white"})])],-1)])])}const e7={render:Q8},t7={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function n7(e,t){return x(),D("svg",t7,[...t[0]||(t[0]=[N("g",{"clip-path":"url(#clip0_12427_230)"},[N("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.3934 0.292893C4.58094 0.105357 4.83529 0 5.10051 0H10.8995C11.1647 0 11.4191 0.105357 11.6066 0.292893L15.7071 4.3934C15.8946 4.58093 16 4.83529 16 5.10051V10.8995C16 11.1647 15.8946 11.4191 15.7071 11.6066L11.6066 15.7071C11.4191 15.8946 11.1647 16 10.8995 16H5.10051C4.83529 16 4.58094 15.8946 4.3934 15.7071L0.292894 11.6066C0.105357 11.4191 0 11.1647 0 10.8995V5.10051C0 4.83529 0.105357 4.58094 0.292893 4.3934L4.3934 0.292893ZM8.75 3.75V4.5V8V8.75H7.25V8V4.5V3.75H8.75ZM8 12C8.55229 12 9 11.5523 9 11C9 10.4477 8.55229 10 8 10C7.44772 10 7 10.4477 7 11C7 11.5523 7.44772 12 8 12Z",fill:"currentColor"})],-1),N("defs",null,[N("clipPath",{id:"clip0_12427_230"},[N("rect",{width:"16",height:"16",fill:"white"})])],-1)])])}const o7={render:n7},i7=ge({className:"toast",slots:[...Yw.keys(),"icon"],base:{root:{paddingTop:"6",paddingBottom:"6",paddingLeft:"12",paddingRight:"12",borderRadius:"md",boxShadow:"elevations-overlay",gap:"6",fontSize:"base",fontWeight:"regular",fontFamily:"sans",lineHeight:"lg",letterSpacing:"normal",backgroundColor:"blackalpha.900",color:"whitealpha.1000",display:"flex",alignItems:"center",whiteSpace:"nowrap"}},variants:{variant:{default:{},success:{icon:{color:"green.800"}},failed:{icon:{color:"red.800"}}}},defaultVariants:{variant:"default"}}),yh=(e,t,n)=>{const o=i7({variant:t}),i=YL({...n||{},placement:n?.placement||"bottom-end",overlap:n?.overlap||!0,gap:n?.gap||24,duration:n?.duration||3e3});i.create({title:e});const a=s=>({success:At(e7,{class:o.icon}),failed:At(o7,{class:o.icon}),default:At("",null)})[s],r=document.createElement("div");document.body.appendChild(r),Vh({render:()=>At(QL,{toaster:i},{default:()=>At(ZL,{class:o.root,"data-testid":`toast-${t}`},[a(t),At(XL,null,e)])})}).mount(r)},Ua={success:(e,t)=>yh(e,"success",t),failed:(e,t)=>yh(e,"failed",t),default:(e,t)=>yh(e,"default",t)};na({base:{},variants:{textStyle:{body_xsmall_caps_medium:{textStyle:"body_xsmall_caps_medium"},body_xsmall_caps_bold:{textStyle:"body_xsmall_caps_bold"},body_xsmall_regular:{textStyle:"body_xsmall_regular"},body_xsmall_medium:{textStyle:"body_xsmall_medium"},body_small_regular:{textStyle:"body_small_regular"},body_small_medium:{textStyle:"body_small_medium"},body_small_semibold:{textStyle:"body_small_semibold"},body_base_regular:{textStyle:"body_base_regular"},body_base_medium:{textStyle:"body_base_medium"},body_base_semibold:{textStyle:"body_base_semibold"},heading_text_h1:{textStyle:"heading_text_h1"},heading_text_h2:{textStyle:"heading_text_h2"},heading_text_h3:{textStyle:"heading_text_h3"},heading_text_h4:{textStyle:"heading_text_h4"},heading_text_h5:{textStyle:"heading_text_h5"},code_regular:{textStyle:"code_regular"},code_small:{textStyle:"code_small"},number_regular:{textStyle:"number_regular"},number_small:{textStyle:"number_small"}}},defaultVariants:{textStyle:"body_base_regular"}});const a7=T({name:"InputWidget",__name:"Input",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=E(()=>e.property.ui);return(n,o)=>(x(),$(f(hr),z({"model-value":e.field.state.value},f(t),{disabled:e.property.BYOCdisabled||e.disabled,variant:"default",state:"idle","onUpdate:modelValue":e.field.handleChange,onBlur:e.field.handleBlur}),null,16,["model-value","disabled","onUpdate:modelValue","onBlur"]))}}),xh=Object.assign(a7,{__name:"Input"}),r7=T({name:"BooleanWidget",__name:"Boolean",props:{property:{},field:{}},setup(e){const t=i=>typeof i=="boolean"?String(i):void 0,n=fe(t(e.field.state.value));Ne(()=>e.field.state.value,i=>{n.value=t(i)});const o=i=>{n.value=i,e.field.handleChange(i==="true")};return(i,a)=>(x(),D("div",null,[F(f(dC),{modelValue:f(n),options:[{value:"true",label:"Yes"},{value:"false",label:"No"}],"onUpdate:modelValue":o},null,8,["modelValue"])]))}}),s7=Object.assign(r7,{__name:"Boolean"}),l7=T({name:"RadioWidget",__name:"Radio",props:{property:{},field:{}},setup(e){const t=E(()=>e.property.enum&&e.property.enumNames?e.property.enum.map((n,o)=>({value:n,label:e.property.enumNames?.[o]||n})):[]);return(n,o)=>(x(),D("div",null,[F(f(dC),{"model-value":e.field.state.value,options:f(t),"onUpdate:modelValue":e.field.handleChange},null,8,["model-value","options","onUpdate:modelValue"])]))}}),c7=Object.assign(l7,{__name:"Radio"}),Lt=Symbol("form"),JC=Symbol("getPayloadFn"),Tp=(e,t,n,o)=>{const i={},a=e[`${t}.auth-type`],r=e[`${t}.connector`],s=e[`${t}.connectorType`],l=e[`${t}.credentialType`];Object.keys(e).forEach(p=>{p.includes(`${t}.extra.`)&&(i[p.replace(`${t}.extra.`,"")]=e[p])}),Object.keys(e).forEach(p=>{p.includes(`${t}.${a}.extra.`)&&(i[p.replace(`${t}.${a}.extra.`,"")]=e[p])});const c=e[`${t}.host`]?.endsWith("/")?e[`${t}.host`].substr(0,e[`${t}.host`].length-1):e[`${t}.host`],d=e[`${t}.host`]?.startsWith("http")?e[`${t}.host`].startsWith("https")?443:80:e[`${t}.port`],u=typeof c=="string"&&c.length>0,h=typeof l=="string"&&l.length>0;return{name:o,...h&&{credentialType:l},...u&&{host:c},...u&&d&&{port:e[`${t}.port`]?parseInt(e[`${t}.port`]):d},authType:a,connectorType:s,...r?{connector:r}:{},connectBy:e[`${t}.connectBy`],connectorConfigName:n,credentialSource:"direct",username:e[`${t}.${a}.username`],password:e[`${t}.${a}.password`],extra:i}},_d=Array.isArray,kd=e=>!!e&&e.constructor===Object,d7=e=>e==null||typeof e!="object"&&typeof e!="function",wh=e=>typeof e=="string"||e instanceof String,ig=(e,t)=>{if(Object.is(e,t))return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.toString()===t.toString();if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Reflect.ownKeys(e),o=Reflect.ownKeys(t);if(n.length!==o.length)return!1;for(let i=0;i<n.length;i++)if(!Reflect.has(t,n[i])||!ig(e[n[i]],t[n[i]]))return!1;return!0},u7=(e,t,n=o=>o)=>e.reduce((o,i)=>(o[t(i)]=n(i),o),{}),h7=(e,t)=>{const n=e.reduce((o,i)=>{const a=i;return o[a]||(o[a]=i),o},{});return Object.values(n)},ic=e=>e?.filter(t=>!!t)??[],p7=(e,t)=>Object.keys(e).reduce((o,i)=>(o[i]=t(e[i],i),o),{}),f7=e=>{if(d7(e))return e;if(typeof e=="function")return e.bind({});const t=new e.constructor;return Object.getOwnPropertyNames(e).forEach(n=>{t[n]=e[n]}),t},ag=(e,t)=>e?t.reduce((n,o)=>(Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]),n),{}):{},QC=(e,t)=>e?!t||t.length===0?e:t.reduce((n,o)=>(delete n[o],n),{...e}):{},g7=(e,t,n)=>{const o=t.split(/[\.\[\]]/g);let i=e;for(const a of o){if(i===null||i===void 0)return n;const r=a.replace(/['"]/g,"");r.trim()!==""&&(i=i[r])}return i===void 0?n:i},m7=(e,t,n)=>{if(!e)return{};if(!t||n===void 0)return e;const o=t.split(/[\.\[\]]/g).filter(r=>!!r.trim()),i=r=>{if(o.length>1){const s=o.shift(),l=/^\d+$/.test(o[0]);r[s]=r[s]===void 0?l?[]:{}:r[s],i(r[s])}else r[o[0]]=n},a=f7(e);return i(a),a},v7=e=>{if(!e)return[];const t=(n,o)=>kd(n)?Object.entries(n).flatMap(([i,a])=>t(a,[...o,i])):_d(n)?n.flatMap((i,a)=>t(i,[...o,`${a}`])):[o.join(".")];return t(e,[])},di=e=>e?u7(v7(e),t=>t,t=>g7(e,t)):{},b7=e=>e?Object.keys(e).reduce((t,n)=>m7(t,n,e[n]),{}):{},e_=(e,t=" ")=>{if(!e)return"";const n=t.replace(/[\W]{1}/g,"\\$&"),o=new RegExp(`^[${n}]+|[${n}]+$`,"g");return e.replace(o,"")},y7={trailing:!0};function x7(e,t=25,n={}){if(n={...y7,...n},!Number.isFinite(t))throw new TypeError("Expected `wait` to be a finite number");let o,i,a=[],r,s;const l=(u,h)=>(r=w7(e,u,h),r.finally(()=>{if(r=null,n.trailing&&s&&!i){const p=l(u,s);return s=null,p}}),r),c=function(...u){return n.trailing&&(s=u),r||new Promise(h=>{const p=!i&&n.leading;clearTimeout(i),i=setTimeout(()=>{i=null;const m=n.leading?o:l(this,u);s=null;for(const g of a)g(m);a=[]},t),p?(o=l(this,u),h(o)):a.push(h)})},d=u=>{u&&(clearTimeout(u),i=null)};return c.isPending=()=>!!i,c.cancel=()=>{d(i),a=[],s=null},c.flush=()=>{if(d(i),!s||r)return;const u=s;return s=null,l(this,u)},c}async function w7(e,t,n){return await e.apply(t,n)}function mr(...e){const t=typeof e[e.length-1]=="string"?e.pop():void 0;C7(e[0],e[1])&&e.unshift(t);let[n,o,i={}]=e,a=!1;const r=E(()=>qe(n));if(typeof r.value!="string")throw new TypeError("[nuxt] [useAsyncData] key must be a string.");if(typeof o!="function")throw new TypeError("[nuxt] [useAsyncData] handler must be a function.");const s=uk();i.server??=!0,i.default??=k7,i.getCachedData??=n_,i.lazy??=!1,i.immediate??=!0,i.deep??=hk.deep,i.dedupe??="cancel",i._functionName,s._asyncData[r.value];function l(){const m={cause:"initial",dedupe:i.dedupe};return s._asyncData[r.value]?._init||(m.cachedData=i.getCachedData(r.value,s,{cause:"initial"}),s._asyncData[r.value]=_y(s,r.value,o,i,m.cachedData)),()=>s._asyncData[r.value].execute(m)}const c=l(),d=s._asyncData[r.value];d._deps++;const u=i.server!==!1&&s.payload.serverRendered;{let m=function(C){const k=s._asyncData[C];k?._deps&&(k._deps--,k._deps===0&&k?._off())};const g=qs();if(g&&u&&i.immediate&&!g.sp&&(g.sp=[]),g&&!g._nuxtOnBeforeMountCbs){g._nuxtOnBeforeMountCbs=[];const C=g._nuxtOnBeforeMountCbs;pk(()=>{C.forEach(k=>{k()}),C.splice(0,C.length)}),Qp(()=>C.splice(0,C.length))}const b=g&&(g._nuxtClientOnly||wt(fk,!1));u&&s.isHydrating&&(d.error.value||d.data.value!==void 0)?d.status.value=d.error.value?"error":"success":g&&(!b&&s.payload.serverRendered&&s.isHydrating||i.lazy)&&i.immediate?g._nuxtOnBeforeMountCbs.push(c):i.immediate&&d.status.value!=="success"&&c();const v=mk(),y=Ne(r,(C,k)=>{if((C||k)&&C!==k){a=!0;const O=s._asyncData[k]?.data.value!==void 0,P=s._asyncDataPromises[k]!==void 0,S={cause:"initial",dedupe:i.dedupe};if(!s._asyncData[C]?._init){let V;k&&O?V=s._asyncData[k].data.value:(V=i.getCachedData(C,s,{cause:"initial"}),S.cachedData=V),s._asyncData[C]=_y(s,C,o,i,V)}s._asyncData[C]._deps++,k&&m(k),(i.immediate||O||P)&&s._asyncData[C].execute(S),bk(()=>{a=!1})}},{flush:"sync"}),w=i.watch?Ne(i.watch,()=>{a||d._execute({cause:"watch",dedupe:i.dedupe})}):()=>{};v&&gk(()=>{y(),w(),m(r.value)})}const h={data:ac(()=>s._asyncData[r.value]?.data),pending:ac(()=>s._asyncData[r.value]?.pending),status:ac(()=>s._asyncData[r.value]?.status),error:ac(()=>s._asyncData[r.value]?.error),refresh:(...m)=>s._asyncData[r.value]?._init?s._asyncData[r.value].execute(...m):l()(),execute:(...m)=>h.refresh(...m),clear:()=>{const m=s._asyncData[r.value];if(m?._abortController)try{m._abortController.abort(new DOMException("AsyncData aborted by user.","AbortError"))}finally{m._abortController=void 0}t_(s,r.value)}},p=Promise.resolve(s._asyncDataPromises[r.value]).then(()=>h);return Object.assign(p,h),p}function ac(e){return E({get(){return e()?.value},set(t){const n=e();n&&(n.value=t)}})}function C7(e,t){return!(typeof e=="string"||typeof e=="object"&&e!==null||typeof e=="function"&&typeof t=="function")}function t_(e,t){t in e.payload.data&&(e.payload.data[t]=void 0),t in e.payload._errors&&(e.payload._errors[t]=void 0),e._asyncData[t]&&(e._asyncData[t].data.value=f(e._asyncData[t]._default()),e._asyncData[t].error.value=void 0,e._asyncData[t].status.value="idle"),t in e._asyncDataPromises&&(e._asyncDataPromises[t]=void 0)}function _7(e,t){const n={};for(const o of t)n[o]=e[o];return n}function _y(e,t,n,o,i){e.payload._errors[t]??=void 0;const a=o.getCachedData!==n_,r=n,s=o.deep?fe:Zc,l=i!==void 0,c=e.hook("app:data:refresh",async u=>{(!u||u.includes(t))&&await d.execute({cause:"refresh:hook"})}),d={data:s(l?i:o.default()),pending:E(()=>d.status.value==="pending"),error:C0(e.payload._errors,t),status:Zc("idle"),execute:(...u)=>{const[h,p=void 0]=u,m=h&&p===void 0&&typeof h=="object"?h:{};if(e._asyncDataPromises[t]&&(m.dedupe??o.dedupe)==="defer")return e._asyncDataPromises[t];{const b="cachedData"in m?m.cachedData:o.getCachedData(t,e,{cause:m.cause??"refresh:manual"});if(b!==void 0)return e.payload.data[t]=d.data.value=b,d.error.value=void 0,d.status.value="success",Promise.resolve(b)}d._abortController&&d._abortController.abort(new DOMException("AsyncData request cancelled by deduplication","AbortError")),d._abortController=new AbortController,d.status.value="pending";const g=new Promise((b,v)=>{try{const y=m.timeout??o.timeout,w=$7([d._abortController?.signal,m?.signal],y);if(w.aborted){const C=w.reason;v(C instanceof Error?C:new DOMException(String(C??"Aborted"),"AbortError"));return}return w.addEventListener("abort",()=>{const C=w.reason;v(C instanceof Error?C:new DOMException(String(C??"Aborted"),"AbortError"))},{once:!0}),Promise.resolve(r(e,{signal:w})).then(b,v)}catch(y){v(y)}}).then(async b=>{let v=b;o.transform&&(v=await o.transform(b)),o.pick&&(v=_7(v,o.pick)),e.payload.data[t]=v,d.data.value=v,d.error.value=void 0,d.status.value="success"}).catch(b=>{if(!(e._asyncDataPromises[t]&&e._asyncDataPromises[t]!==g)&&!d._abortController?.signal.aborted){if(typeof DOMException<"u"&&b instanceof DOMException&&b.name==="AbortError"){d.status.value="idle";return}d.error.value=vk(b),d.data.value=f(o.default()),d.status.value="error"}}).finally(()=>{delete e._asyncDataPromises[t]});return e._asyncDataPromises[t]=g,e._asyncDataPromises[t]},_execute:x7((...u)=>d.execute(...u),0,{leading:!0}),_default:o.default,_deps:0,_init:!0,_hash:void 0,_off:()=>{c(),e._asyncData[t]?._init&&(e._asyncData[t]._init=!1),a||io(()=>{e._asyncData[t]?._init||(t_(e,t),d.execute=()=>Promise.resolve())})}};return d}const k7=()=>{},n_=(e,t,n)=>{if(t.isHydrating)return t.payload.data[e];if(n.cause!=="refresh:manual"&&n.cause!=="refresh:hook")return t.static.data[e]};function $7(e,t){const n=e.filter(a=>!!a);if(typeof t=="number"&&t>=0){const a=AbortSignal.timeout?.(t);a&&n.push(a)}if(AbortSignal.any)return AbortSignal.any(n);const o=new AbortController;for(const a of n)if(a.aborted){const r=a.reason??new DOMException("Aborted","AbortError");try{o.abort(r)}catch{o.abort()}return o.signal}const i=()=>{const r=n.find(s=>s.aborted)?.reason??new DOMException("Aborted","AbortError");try{o.abort(r)}catch{o.abort()}};for(const a of n)a.addEventListener?.("abort",i,{once:!0});return o.signal}async function o_(e){const{data:t}=await mr(()=>`credential_${qe(e)}`,()=>$fetch(`/workflows/v1/configmap/${qe(e)}`),"$vlaIZ4700T");return{credentialConfig:E(()=>{const o=t.value?.data;return o&&"kind"in o?JSON.parse(o.data.config):o?.config??null}),data:t}}function gu(e){const t={};return Object.entries(e.properties).forEach(([n,o])=>{o.default!==void 0?o?.ui?.widget==="Repeater"?t[n]=JSON.parse(o.default):t[n]=o.default:o.properties&&(t[n]=gu(o))}),t}const S7={key:0,class:"flex mt-3"},E7={key:1,class:"p-3 mt-4 border rounded-md border-green-400 bg-green-100"},O7={key:0,class:"mt-1"},T7={class:"text-sm text-green-600"},I7={key:2,class:"p-3 mt-4 border rounded-md border-new-red-400 bg-new-red-100"},P7={class:"mt-1"},D7={class:"text-sm text-new-red-600","data-test-id":"error-log-message"},A7=T({__name:"CredentialWidget",props:{property:{},modelValue:{}},async setup(e){let t,n;const o=ui(()=>hi(()=>Promise.resolve().then(()=>bi),void 0,import.meta.url)),i=wt(Lt),{credentialConfig:a}=([t,n]=sr(()=>o_(()=>e.property.ui.credentialType)),t=await t,n(),t),r=i.useStore(d=>QC(d.values,["credential_guid_body","credential_property_id"]));Ne(()=>e.property,d=>{d&&i.setFieldValue("credential_property_id",d.id)},{immediate:!0}),Ne(r,d=>{d&&i.setFieldValue("credential_guid_body",Tp(di(d),e.property.id,e.property.ui?.credentialType,void 0))},{immediate:!0}),Ne(a,d=>{d&&Object.entries(gu(d)).forEach(([u,h])=>{i.state.values[`${e.property.id}.${u}`]||i.setFieldValue(`${e.property.id}.${u}`,h)})},{immediate:!0});const s=fe(!1),l=fe(null);async function c(){s.value=!0,l.value=null;try{const d=await $fetch("/workflows/v1/auth",{method:"POST",body:JSON.stringify(Tp(di(i.state.values),e.property.id,e.property.ui?.credentialType,void 0))});l.value=d}catch(d){l.value={success:!1,message:d?.data?.message||d?.message||"Authentication failed"}}finally{s.value=!1}}return(d,u)=>(x(),D("div",{class:M(e.property.ui.class)},[f(a)?(x(),D($e,{key:0},[F(f(o),{"config-map":f(a),"base-key":e.property.id},null,8,["config-map","base-key"]),e.property.ui?.isTestAuthenticationDisabled?X("",!0):(x(),D("div",S7,[F(f(Ut),{loading:f(s),label:f(s)?"Testing Authentication":"Test Authentication",onClick:c},null,8,["loading","label"])]))],64)):X("",!0),!e.property.ui?.isTestAuthenticationDisabled&&f(l)?.success?(x(),D("div",E7,[u[0]||(u[0]=N("span",{class:"text-sm font-semibold text-green-700"}," Authentication successful ",-1)),f(l).message?(x(),D("div",O7,[N("span",T7,ie(f(l).message),1)])):X("",!0)])):X("",!0),!e.property.ui?.isTestAuthenticationDisabled&&f(l)&&!f(l).success?(x(),D("div",I7,[u[1]||(u[1]=N("span",{class:"text-sm font-semibold text-new-red-700"}," Authentication failed ",-1)),N("div",P7,[N("span",D7,ie(f(l).message),1)])])):X("",!0)],2))}}),R7=Object.assign(A7,{__name:"CredentialWidget"}),V7=T({__name:"Nested",props:{property:{}},setup(e){const t=ui(()=>hi(()=>Promise.resolve().then(()=>bi),void 0,import.meta.url));return(n,o)=>(x(),$(f(t),{"config-map":e.property,"base-key":e.property.id},null,8,["config-map","base-key"]))}}),M7=Object.assign(V7,{__name:"Nested"}),N7=T({__name:"Password",props:{field:{},property:{},disabled:{type:Boolean}},setup(e){const t=fe(e.field.state.value??""),n=o=>{t.value=o,e.field.handleChange(o)};return(o,i)=>(x(),$(f(hr),{id:e.property.id,type:"password","model-value":f(t),placeholder:e.property.ui?.placeholder,disabled:e.disabled,"data-test-id":e.property.id,"onUpdate:modelValue":n,onBlur:e.field.handleBlur},null,8,["id","model-value","placeholder","disabled","data-test-id","onBlur"]))}}),L7=Object.assign(N7,{__name:"Password"}),F7=T({name:"SelectWidget",__name:"Select",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=E(()=>e.property.ui?.mode==="multiple"),n=E(()=>e.property.enum&&e.property.enumNames?e.property.enum.map((a,r)=>({value:a,label:e.property.enumNames?.[r]||a})):[]),o=fe((()=>{if(t.value)return e.field.state.value;const a=e.field.state.value;return a?[a]:[]})());function i(a){e.field.handleChange(t.value?a:a[0]),o.value=a}return(a,r)=>(x(),$(f(Mo),{id:e.property.id,"model-value":f(o),options:f(n),placeholder:e.property.placeholder,"is-disabled":e.disabled,multiple:f(t),variant:"default","onUpdate:modelValue":i,onBlur:e.field.handleBlur},null,8,["id","model-value","options","placeholder","is-disabled","multiple","onBlur"]))}}),B7=Object.assign(F7,{__name:"Select"}),z7=T({__name:"SQLTree",props:{field:{}},async setup(e){let t,n;const o=wt(Lt),{data:i}=([t,n]=sr(()=>mr("metadata",()=>$fetch("/workflows/v1/metadata",{method:"POST",body:o.getFieldValue("credential_guid_body")}))),t=await t,n(),t),a=E(()=>i.value?h7(i.value.data.map(h=>h.TABLE_CATALOG)).map(h=>({value:h,label:h,children:i.value.data.filter(p=>p.TABLE_CATALOG===h).map(p=>({value:`${h}:${p.TABLE_SCHEMA}`,label:p.TABLE_SCHEMA}))})):[]),r=u=>{let h=u;return h.startsWith("^")&&(h=h.slice(1)),h.endsWith("$")&&(h=h.slice(0,-1)),h},l=fe((u=>{const h=[];if(u){if(typeof u=="object")Object.keys(u)?.forEach(p=>{u[p]?.length>0?u[p]?.forEach(m=>{h.push(`${r(p)}:${r(m)}`)}):h.push(r(p))});else if(typeof u=="string")try{const p=JSON.parse(u);Object.keys(p)?.forEach(m=>{p[m].length>0?p[m]?.forEach(g=>{h.push(`${r(m)}:${r(g)}`)}):h.push(r(m))})}catch{h.push(r(u))}}return h})(e.field.state.value)),c=u=>{const h={};return u.forEach(p=>{if(p.includes(":")){const m=p.split(":")[0];h[`^${m}$`]=[]}else h[`^${p}$`]=[]}),u.forEach(p=>{if(p.includes(":")){const m=p.split(":")[0],g=p.split(":")[1];g&&h[`^${m}$`].push(`^${g}$`)}}),h},d=u=>{const h=c(u);e.field.handleChange(h),l.value=u};return(u,h)=>(x(),$(f(Mo),{isTree:"",multiple:"",options:f(a),modelValue:f(l),"onUpdate:modelValue":d},null,8,["options","modelValue"]))}}),H7=Object.assign(z7,{__name:"SQLTree"}),j7=T({__name:"APITree",props:{field:{},property:{}},async setup(e){let t,n;const o=wt(Lt),{data:i}=([t,n]=sr(()=>mr(`${e.property.id}_metadata`,()=>{const u=o.getFieldValue("credential_guid_body"),h=e.property.ui?.metadataTemplateKey;return $fetch("/workflows/v1/metadata",{method:"POST",body:{...u&&u,...h&&{type:h},...h&&{database:h}}})})),t=await t,n(),t);function a(u,h=null){return u.map(p=>{const m=h?`${h}:${p.value}`:p.value;return{value:m,label:p.title,children:p.children?a(p.children,m):void 0}})}const r=E(()=>i.value?a(i.value.data):[]),l=fe((u=>{const h=[],p=(m,g=[])=>{Array.isArray(m)?g.length>0&&h.push(g.join(":")):typeof m=="object"&&m!==null&&Object.keys(m).forEach(b=>{p(m[b],[...g,b])})};if(u)if(typeof u=="string")try{p(JSON.parse(u))}catch{h.push(u)}else p(u);return h})(e.field.state.value)),c=u=>{const h={};return u.forEach(p=>{const m=p.split(":");let g=h;m.forEach((b,v)=>{g[b]||(g[b]={}),v!==m.length-1&&(g=g[b])})}),h},d=u=>{const h=c(u);e.field.handleChange(h),l.value=u};return(u,h)=>(x(),$(f(Mo),{isTree:"",multiple:"",options:f(r),modelValue:f(l),"onUpdate:modelValue":d},null,8,["options","modelValue"]))}}),W7=Object.assign(j7,{__name:"APITree"}),U7={class:"border border-gray-200 rounded-lg p-6 bg-white"},G7={class:"flex items-center justify-between mb-4"},q7={key:0,class:"mt-4 space-y-3"},Y7={class:"flex items-start gap-3"},K7={class:"flex-1"},Z7={class:"flex items-center gap-2"},X7={class:"font-medium text-gray-900 capitalize"},J7={key:0,class:"text-sm text-gray-600 mt-1"},Q7={key:1,class:"text-sm text-red-600 mt-1"},ez={key:1,class:"mt-4 text-center text-gray-500 text-sm"},tz=T({name:"SageWidget",__name:"Sage",props:{property:{},field:{}},setup(e){const t=wt(JC),n=fe(!1),o=fe(null);async function i(){n.value=!0,o.value=null;try{const{credentialBody:s,startPayload:l}=await t(),c=await $fetch("/workflows/v1/check",{method:"POST",body:{...l||{},...s?{credentials:s}:{}}});o.value=c.data,c.success?Ua.success("Pre-flight checks completed!",{placement:"top",duration:3e3}):Ua.failed("Some pre-flight checks failed",{placement:"top",duration:3e3})}catch(s){Ua.failed("Failed to run pre-flight checks. Please try again.",{placement:"top",duration:3e3}),console.error("Pre-flight check error:",s)}finally{n.value=!1}}const a=s=>s?"✓":"✗",r=s=>s?"text-green-600":"text-red-600";return(s,l)=>(x(),D("div",U7,[N("div",G7,[l[0]||(l[0]=N("div",null,[N("h3",{class:"text-lg font-semibold text-gray-900"}," Pre-flight Checks "),N("p",{class:"text-sm text-gray-500 mt-1"}," Verify your configuration before starting the workflow ")],-1)),F(f(Ut),{label:"Check","is-loading":f(n),onClick:i},null,8,["is-loading"])]),f(o)?(x(),D("div",q7,[(x(!0),D($e,null,Ie(f(o),(c,d)=>(x(),D("div",{key:d,class:"border border-gray-200 rounded-md p-4"},[N("div",Y7,[N("span",{class:M(["text-xl font-bold",r(c.success)])},ie(a(c.success)),3),N("div",K7,[N("div",Z7,[N("h4",X7,ie(d.replace(/([A-Z])/g," $1").trim()),1),N("span",{class:M(["text-xs px-2 py-0.5 rounded-full font-medium",c.success?"bg-green-100 text-green-700":"bg-red-100 text-red-700"])},ie(c.success?"Passed":"Failed"),3)]),c.success&&c.successMessage?(x(),D("p",J7,ie(c.successMessage),1)):X("",!0),!c.success&&c.failureMessage?(x(),D("p",Q7,ie(c.failureMessage),1)):X("",!0)])])]))),128))])):f(n)?X("",!0):(x(),D("div",ez,' Click "Check" to run pre-flight checks '))]))}}),nz=Object.assign(tz,{__name:"Sage"}),oz=T({__name:"Connection",props:{property:{},modelValue:{}},setup(e){const t=ui(()=>hi(()=>Promise.resolve().then(()=>bi),void 0,import.meta.url)),n={properties:{name:{type:"string",ui:{widget:"input",label:"Connection name",placeholder:"environment",help:"Name of your connection which represents your source environment. Example - 'production', 'development', 'gold', 'analytics' ",required:!0,grid:4,rules:[{required:!0,message:"Please enter a connection name"}]}}}};return(o,i)=>(x(),$(f(t),{"config-map":n,"base-key":e.property.id},null,8,["base-key"]))}}),iz=Object.assign(oz,{__name:"Connection"}),az={key:0,class:"text-sm text-gray-500 mt-2"},rz={key:1,class:"text-sm text-red-500 mt-2"},sz=T({name:"FileUploadWidget",__name:"FileUpload",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=fe(!1),n=fe(null),o=async r=>{const s=new FormData;return s.append("file",r),await $fetch("/workflows/v1/file",{method:"POST",body:s})},i=async r=>{const{files:s}=r;if(!s||s.length===0)return;const l=s[0];if(l){t.value=!0,n.value=null;try{const c=await o(l);e.property.ui?.fileMetadata?e.field.handleChange(JSON.stringify({...c,fileKey:c.key,fileId:c.id})):e.field.handleChange(c.id)}catch(c){n.value=c instanceof Error?c.message:"Failed to upload file"}finally{t.value=!1}}},a=E(()=>({placeholder:e.property.ui?.placeholder||"Drag and drop files here",accept:e.property.ui?.accept,isDisabled:e.disabled||t.value}));return(r,s)=>(x(),D("div",null,[F(f(RF),z(f(a),{onFileAccept:i,onBlur:e.field.handleBlur}),null,16,["onBlur"]),f(t)?(x(),D("div",az," Uploading... ")):X("",!0),f(n)?(x(),D("div",rz,ie(f(n)),1)):X("",!0)]))}}),lz=Object.assign(sz,{__name:"FileUpload"});const ky=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),cz=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,o)=>o?o.toUpperCase():n.toLowerCase()),dz=e=>{const t=cz(e);return t.charAt(0).toUpperCase()+t.slice(1)},uz=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim(),$y=e=>e==="";var Yr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const hz=({name:e,iconNode:t,absoluteStrokeWidth:n,"absolute-stroke-width":o,strokeWidth:i,"stroke-width":a,size:r=Yr.width,color:s=Yr.stroke,...l},{slots:c})=>At("svg",{...Yr,...l,width:r,height:r,stroke:s,"stroke-width":$y(n)||$y(o)||n===!0||o===!0?Number(i||a||Yr["stroke-width"])*24/Number(r):i||a||Yr["stroke-width"],class:uz("lucide",l.class,...e?[`lucide-${ky(dz(e))}-icon`,`lucide-${ky(e)}`]:["lucide-icon"])},[...t.map(d=>At(...d)),...c.default?[c.default()]:[]]);const Pn=(e,t)=>(n,{slots:o,attrs:i})=>At(hz,{...i,...n,iconNode:t,name:e},o);const pz=Pn("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);const fz=Pn("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const i_=Pn("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const gz=Pn("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const mz=Pn("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const Ip=Pn("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const vz=Pn("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]);const a_=Pn("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const bz=Pn("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const yz=Pn("trash",[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const xz=Pn("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const Ss=Pn("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),wz={key:0,class:"text-red-500"},Cz={key:0,class:"absolute right-3 top-3 opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer"},_z={class:"flex justify-center"},kz=T({__name:"Repeater",props:{property:{}},setup(e){const t=ui(()=>hi(()=>Promise.resolve().then(()=>bi),void 0,import.meta.url)),n=wt(Lt),o=r=>{r.pushValue()},i=(r,s)=>{const l=e.property.ui.minItems??1;r.state.value.length>l&&r.removeValue(s)},a=r=>e.property.ui.maxItems!==void 0&&r.state.value.length>=e.property.ui.maxItems;return(r,s)=>(x(),$(f(n).Field,{name:e.property.id,mode:"array"},{default:_(({field:l})=>[N("div",null,[N("div",null,[F(f(Gf),null,{default:_(()=>[Re(ie(e.property.ui?.label)+" ",1),e.property?.required?(x(),D("span",wz," * ")):X("",!0)]),_:1})]),(x(!0),D($e,null,Ie(l.state.value,(c,d)=>(x(),D("div",{key:d,class:"relative mb-3 border border-gray-300 rounded-lg p-4 group hover:border-gray-400 transition-colors"},[l.state.value.length>(e.property.ui.minItems??1)?(x(),D("div",Cz,[F(f(yz),{class:"w-4 h-4 text-gray-400 hover:text-red-500",onClick:()=>{i(l,d)}},null,8,["onClick"])])):X("",!0),F(f(t),{configMap:e.property,baseKey:`${e.property.id}[${d}]`},null,8,["configMap","baseKey"])]))),128)),N("div",_z,[F(f(Ut),{type:"default",label:`Add to ${e.property.ui.label}`,disabled:a(l),onClick:()=>{o(l)}},null,8,["label","disabled","onClick"])])])]),_:1},8,["name"]))}}),$z=Object.assign(kz,{__name:"Repeater"}),Sz={class:"flex flex-col gap-y-4 py-2"},Ez={class:"flex flex-col gap-y-1"},Oz={key:0,class:"text-xs text-red-600"},Tz={key:0,class:"flex flex-col gap-y-1"},Iz={key:0,class:"text-xs text-red-600"},Pz=T({name:"CreateConnectionModal",__name:"CreateConnectionModal",props:{isOpen:{type:Boolean},connectorConfigurations:{},existingNames:{}},emits:["update:isOpen","created"],setup(e,{emit:t}){const n=e,o=t,i=fe(""),a=fe(""),r=fe(!1),s=E(()=>n.connectorConfigurations.length>1),l=E(()=>n.connectorConfigurations.map(w=>({label:w.connector,value:w.connector}))),c=E(()=>i.value.trim()),d=E(()=>r.value?c.value?n.existingNames?.some(w=>w?.trim()===c.value)?"A connection with this name already exists":"":"Name is required":""),u=E(()=>r.value&&s.value&&!a.value?"Connector is required":""),h=E(()=>!c.value),p=()=>{i.value="",r.value=!1,a.value=n.connectorConfigurations.length===1?n.connectorConfigurations[0]?.connector??"":""};Ne(()=>n.isOpen,w=>{w&&p()},{immediate:!0}),Ne(()=>n.connectorConfigurations,()=>{n.connectorConfigurations.length===1&&!a.value&&(a.value=n.connectorConfigurations[0]?.connector??"")});const m=()=>{o("update:isOpen",!1)},g=()=>{if(r.value=!0,d.value||u.value)return;const w=n.connectorConfigurations.find(O=>O.connector===a.value),C=a.value,k={attributes:{qualifiedName:`default/${C}/${Date.now()}`,name:c.value,connectorName:C,image:w?.connectorImage}};o("created",k),o("update:isOpen",!1)},b=E(()=>({label:"Create connection",onClick:g,variant:h.value?"default":"primary"})),v=E(()=>({label:"Cancel",onClick:m})),y=w=>{a.value=w[0]??""};return(w,C)=>(x(),$(f(KF),{isOpen:e.isOpen,title:"Create new connection",size:"small",primaryAction:f(b),secondaryAction:f(v),"onUpdate:isOpen":C[1]||(C[1]=k=>o("update:isOpen",k))},{default:_(()=>[N("div",Sz,[N("div",Ez,[C[2]||(C[2]=N("label",{class:"text-sm font-medium text-new-gray-700"}," Name ",-1)),F(f(hr),{modelValue:f(i),"onUpdate:modelValue":C[0]||(C[0]=k=>Ks(i)?i.value=k:null),placeholder:"e.g. Production warehouse",variant:f(d)?"error":"default",state:"idle",autofocus:""},null,8,["modelValue","variant"]),f(d)?(x(),D("span",Oz,ie(f(d)),1)):X("",!0)]),f(s)?(x(),D("div",Tz,[C[3]||(C[3]=N("label",{class:"text-sm font-medium text-new-gray-700"}," Connector ",-1)),F(f(Mo),{modelValue:f(a)?[f(a)]:[],options:f(l),placeholder:"Select a connector",variant:f(u)?"error":"default","onUpdate:modelValue":y},null,8,["modelValue","options","variant"]),f(u)?(x(),D("span",Iz,ie(f(u)),1)):X("",!0)])):X("",!0)])]),_:1},8,["isOpen","primaryAction","secondaryAction"]))}}),Dz=Object.assign(Pz,{__name:"CreateConnectionModal"}),Az={class:"flex flex-col gap-y-2"},Rz={key:0},Vz=T({name:"ConnectionSelector",__name:"ConnectionSelector",props:{property:{},disabled:{type:Boolean},field:{}},setup(e){const t=E(()=>e.property.ui?.mode==="multiple"),n=()=>e.property.enum&&e.property.enumNames?e.property.enum.map((m,g)=>({attributes:{qualifiedName:m,name:e.property.enumNames?.[g],connectorName:m.split("/")[1]}})):[{attributes:{qualifiedName:"default/snowflake/1234567890",name:"Production Database",connectorName:"snowflake"}},{attributes:{qualifiedName:"default/snowflake/0987654321",name:"Staging Database",connectorName:"snowflake"}},{attributes:{qualifiedName:"default/postgres/8938390",name:"Development Database",connectorName:"postgres"}},{attributes:{qualifiedName:"default/bigquery/1234567890",name:"Analytics Warehouse",connectorName:"bigquery"}},{attributes:{qualifiedName:"default/s3/1234567890",name:"Backup Storage",connectorName:"s3"}}],o=fe(n());Ne([()=>e.property.enum,()=>e.property.enumNames],()=>{o.value=n()});const i=E(()=>o.value.map(m=>({label:m.attributes.name??m.attributes.qualifiedName,value:m.attributes.qualifiedName}))),a=m=>o.value.find(g=>g.attributes.qualifiedName===m),s=fe((()=>{const m=e.field.state.value;if(!m)return[];if(_d(m))return m.every(b=>wh(b))?m:ic(m.map(b=>b?.attributes?.qualifiedName));if(kd(m)){const b=m?.attributes?.qualifiedName;return b?[b]:[]}if(!wh(m))return[];let g;try{g=JSON.parse(m)}catch{return[m]}if(_d(g))return g.every(wh)?g:ic(g.map(b=>b?.attributes?.qualifiedName));if(g&&kd(g)){const b=g?.attributes?.qualifiedName;return b?[b]:[m]}return[m]})());function l(m){if(s.value=m,e.property.ui?.shouldIncludeConnectionInfo)if(t.value){const g=ic(m.map(b=>a(b)));e.field.handleChange(g)}else{const g=m[0]?a(m[0]):void 0;e.field.handleChange(g||void 0)}else e.field.handleChange(t.value?m:m[0])}const c=E(()=>(e.property.ui?.canCreateNewConnections?.connectorConfigurations.length??0)>0),d=fe(!1),u=E(()=>ic(o.value.map(m=>m.attributes.name))),h=()=>{d.value=!0},p=m=>{o.value=[...o.value,m];const g=m.attributes.qualifiedName;t.value?l([...s.value,g]):l([g])};return(m,g)=>(x(),D("div",Az,[F(f(Mo),{id:e.property.id,modelValue:f(s),options:f(i),placeholder:e.property.placeholder,"is-disabled":e.disabled,multiple:f(t),variant:"default","onUpdate:modelValue":l,onBlur:e.field.handleBlur},null,8,["id","modelValue","options","placeholder","is-disabled","multiple","onBlur"]),f(c)?(x(),D("div",Rz,[F(f(Ut),{type:"link",size:"small",label:"Add new connection","is-disabled":e.disabled,"data-test-id":"create-new-connection-action",onClick:h},{prefix:_(()=>[F(f(a_),{class:"h-3.5 w-3.5"})]),_:1},8,["is-disabled"])])):X("",!0),f(c)?(x(),$(Dz,{key:1,isOpen:f(d),"onUpdate:isOpen":g[0]||(g[0]=b=>Ks(d)?d.value=b:null),connectorConfigurations:e.property.ui.canCreateNewConnections.connectorConfigurations,existingNames:f(u),onCreated:p},null,8,["isOpen","connectorConfigurations","existingNames"])):X("",!0)]))}}),Mz=Object.assign(Vz,{__name:"ConnectionSelector"}),Nz=T({name:"SwitcherWidget",__name:"Switcher",props:{property:{},field:{}},setup(e){const t=({checked:n})=>{e.field.handleChange(n)};return(n,o)=>(x(),D("div",null,[F(f(U5),{checked:e.field.state.value,onCheckedChange:t},{default:_(()=>[Re(ie(e.property.ui?.title),1)]),_:1},8,["checked"])]))}}),Lz=Object.assign(Nz,{__name:"Switcher"}),Sy=e=>{if(typeof e=="object"&&e!==null){if(typeof Object.getPrototypeOf=="function"){const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}return Object.prototype.toString.call(e)==="[object Object]"}return!1},rn=(...e)=>e.reduce((t,n)=>{if(Array.isArray(n))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(n).forEach(o=>{["__proto__","constructor","prototype"].includes(o)||(Array.isArray(t[o])&&Array.isArray(n[o])?t[o]=rn.options.mergeArrays?rn.options.uniqueArrayItems?Array.from(new Set(t[o].concat(n[o]))):[...t[o],...n[o]]:n[o]:Sy(t[o])&&Sy(n[o])?t[o]=rn(t[o],n[o]):t[o]=n[o]===void 0?rn.options.allowUndefinedOverrides?n[o]:t[o]:n[o])}),t},{}),Pp={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};rn.options=Pp;rn.withOptions=(e,...t)=>{rn.options=Object.assign(Object.assign({},Pp),e);const n=rn(...t);return rn.options=Pp,n};const Fz={properties:{divider:{ui:{widget:"divider",class:"mt-0"}},header:{ui:{widget:"header",label:"Secure Agent Configuration",class:"mb-4 text-base text-new-gray-500"}},"agent-name":{type:"string",required:!0,ui:{widget:"agentSelector",label:"Agent",grid:4,rules:[{required:!0,message:"Please select an agent"}]}},"secret-manager":{type:"string",required:!0,enum:["awssecretmanager","azurekeyvault","gcpsecretmanager","secretinjectionenvironment","kubernetes","custom"],enumNames:["AWS Secret Manager","Azure Key Vault","GCP Secret Manager","Environment Variable based Injection","Kubernetes Secret","Custom"],ui:{widget:"select",label:"Secret Store",placeholder:"Secret Store",rules:[{required:!0,message:"Please select the secret store"}]}},"secret-path":{type:"string",required:!0,ui:{label:"Secret Path/Name in Secret Manager",placeholder:"Enter Secret Path/Name",help:"The secret path or name of the stored secret in the secret manager",hidden:!1,grid:4,rules:[{required:!0,message:"Please enter the secret path"}]}},"aws-region":{type:"string",enum:["us-east-1","us-east-2","us-west-1","us-west-2","af-south-1","ap-east-1","ap-south-1","ap-northeast-1","ap-northeast-2","ap-northeast-3","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-west-1","eu-west-2","eu-west-3","eu-north-1","eu-south-1","me-south-1","sa-east-1"],required:!0,enumNames:["US East (N. Virginia)","US East (Ohio)","US West (N. California)","US West (Oregon)","Africa (Cape Town)","Asia Pacific (Hong Kong)","Asia Pacific (Mumbai)","Asia Pacific (Tokyo)","Asia Pacific (Seoul)","Asia Pacific (Osaka)","Asia Pacific (Singapore)","Asia Pacific (Sydney)","Canada (Central)","Europe (Frankfurt)","Europe (Ireland)","Europe (London)","Europe (Paris)","Europe (Stockholm)","Europe (Milan)","Middle East (Bahrain)","South America (São Paulo)"],ui:{widget:"select",label:"AWS Region",placeholder:"Select AWS Region",grid:4,rules:[{required:!0,message:"Please select a region"}]}},"aws-auth-method":{type:"string",required:!0,enum:["iam","iam-assume-role","access-key"],default:"iam",enumNames:["IAM","IAM Assume Role","Access Key and Secret Key"],ui:{widget:"select",label:"AWS Authentication Method",placeholder:"Select AWS Authentication Method",help:"In case of IAM assume role or access key and secret key authentication, the keys should be set as environment variables or added in kubernetes secrets",grid:4,rules:[{required:!0,message:"Please select an AWS authentication method"}]}},"aws-assume-role-arn":{type:"string",required:!0,ui:{label:"AWS Assume Role ARN",placeholder:"Enter AWS Role ARN to assume",help:"The AWS role ARN to assume for accessing AWS Secret Manager",hidden:!1,grid:4}},"azure-auth-method":{type:"string",enum:["managed_identity","service_principal"],default:"managed_identity",enumNames:["Managed Identity","Service Principal"],ui:{widget:"select",label:"Azure Authentication Method",placeholder:"Select Azure Authentication Method",help:"In case of Service Principal authentication, the client id, client secret and tenant id should be set as environment variables or added in kubernetes secrets",grid:4,rules:[{required:!0,message:"Please select an Azure authentication method"}]}},"azure-vault-name":{type:"string",required:!0,ui:{label:"Azure Key Vault Name",placeholder:"Enter Azure Key Vault Name",help:"The name of the Azure Key Vault",hidden:!1,grid:8}},"agent-custom-config":{type:"string",ui:{label:"Agent Custom configuration",placeholder:"{}",help:"Use this if you wish to use any custom configuration for the agent. Do not enter any sensitive information here.",hidden:!1,grid:8}},"aws-secret-manager-help-text":{type:"banner",ui:{hidden:!1,category:"info",prefixText:"For the AWS Secret, add the path for the fields with the placeholder Store Credential Path. Example: username",link:{label:"View docs",url:"https://ask.atlan.com/"}}},"azure-help-text":{type:"banner",ui:{hidden:!1,category:"info",prefixText:"For the Azure Key Vault, add the name of key vault secret for the fields with the placeholder Store Credential Path. Example: atlan-crawler-db-username",link:{label:"View docs",url:"https://ask.atlan.com/"}}},"secret-injection-help-text":{type:"banner",ui:{hidden:!1,category:"info",prefixText:"Add the expected environment variable values for the fields with the placeholder Store Credential Path. Example: vault:secret/data/accounts/test#PASSWORD",link:{label:"View docs",url:"https://ask.atlan.com/"}}},"kubernetes-secret-help-text":{type:"banner",ui:{hidden:!1,category:"info",prefixText:"For the K8S Secret, add the corresponding key name in the secret for the fields with the placeholder Store Credential Path. Example: username",link:{label:"View docs",url:"https://ask.atlan.com/"}}},"gcp-help-text":{type:"banner",ui:{hidden:!1,category:"info",prefixText:"For the Google Secret Manager, add the secret path for the fields with the placeholder Store Credential Path. Example: projects/{project_id}/secrets/{secret_id}/versions/{version_id}",link:{label:"View docs",url:"https://ask.atlan.com/"}}}},anyOf:[{properties:{"secret-manager":{const:"awssecretmanager"}},required:["aws-auth-method","aws-region","secret-path","aws-secret-manager-help-text"]},{properties:{"aws-auth-method":{const:"iam-assume-role"},"secret-manager":{const:"awssecretmanager"}},required:["aws-assume-role-arn"]},{properties:{"secret-manager":{const:"azurekeyvault"}},required:["azure-auth-method","azure-vault-name","azure-help-text"]},{properties:{"secret-manager":{const:"secretinjectionenvironment"}},required:["secret-injection-help-text"]},{properties:{"secret-manager":{const:"kubernetes"}},required:["secret-path","kubernetes-secret-help-text"]},{properties:{"secret-manager":{const:"gcpsecretmanager"}},required:["gcp-help-text"]},{properties:{"secret-manager":{const:"custom"}},required:["agent-custom-config"]}]},Bz={config:Fz},zz=e=>{try{const t=JSON.parse(e);return typeof t=="object"&&t!==null}catch{return!1}return!0};function Hz(e){if(!e)return{message:null,link:null};if(!zz(e))return{message:e,link:null};const t=JSON.parse(e);return{message:t.error_message??t.debug_message??e,link:t.doc_link?t.doc_link:null}}const jz={key:0,class:"flex items-center justify-center",style:{height:"100px"}},Wz={key:1,class:"flex items-center justify-center"},Uz={class:"text-red-500 text-sm"},Gz={class:"mt-2"},qz={key:0,class:"flex flex-col mt-2 gap-y-2"},Yz={class:"flex"},Kz={key:0,class:"p-3 border rounded-md border-green-400 bg-green-100"},Zz={key:0,class:"mt-1"},Xz={class:"text-sm text-green-600"},Jz={key:1,class:"p-3 border rounded-md border-new-red-400 bg-new-red-100"},Qz={class:"mt-1"},e9={class:"text-sm text-new-red-600","data-test-id":"error-log-message"},t9=["href"],n9="atlan-connectors-agent",o9=T({__name:"Agent",props:{property:{}},setup(e){const t=ui(()=>hi(()=>Promise.resolve().then(()=>bi),void 0,import.meta.url)),n=wt(Lt),o=E(()=>e.property.ui?.agentConfigs??[]),i=E(()=>e.property.ui?.agentType),a=E(()=>{const b=i.value?[{name:i.value,options:{}}]:[],v=o.value.map(([y,w={}])=>({name:y,options:w}));return[...b,...v].filter(y=>y.name)});async function r(b){if(b===n9)return{data:Bz};const y=(await $fetch(`/workflows/v1/configmap/${b}`))?.data;return y&&"kind"in y?{data:{config:JSON.parse(y.data.config)}}:{data:{config:y?.config??{}}}}const s=fe(null),l=fe(!0),c=fe(null);Ne(a,async b=>{l.value=!0,c.value=null;try{s.value=await Promise.all(b.map(({name:v})=>r(v)))}catch(v){c.value=v}finally{l.value=!1}},{immediate:!0});const d=E(()=>{if(!s.value)return null;let b={};for(let v=0;v<a.value.length;v++){const y=a.value[v];if(!y)continue;const w=s.value[v]?.data?.config;if(w)if(Object.keys(y.options).length>0){const C=rn(b,w,y.options);b=rn.withOptions({mergeArrays:!1},C,y.options)}else b=rn(b,w)}return Object.keys(b).length>0?b:null}),u=n.useStore(b=>di(b.values));Ne(d,b=>{b?.properties&&Object.entries(gu(b)).forEach(([v,y])=>{const w=`${e.property.id}.${v}`;u.value[w]||n.setFieldValue(w,y)})},{immediate:!0});const h=E(()=>{const b=o.value[0];return Array.isArray(b)?b[0]:i.value??""}),p=fe(!1),m=fe(null);Ne(u,()=>{m.value=null});async function g(){p.value=!0,m.value=null;try{const b=await $fetch("/workflows/v1/auth",{method:"POST",body:JSON.stringify(Tp(u.value,e.property.id,h.value,void 0))});m.value={success:!0,message:b.message||"Authentication successful"}}catch(b){const v=b,{message:y,link:w}=Hz(v?.data?.message||v?.message);m.value={success:!1,message:y||"Authentication failed",link:w}}finally{p.value=!1}}return(b,v)=>f(l)?(x(),D("div",jz,[...v[0]||(v[0]=[N("span",{class:"text-sm text-gray-500"},"Loading credential configuration...",-1)])])):f(c)?(x(),D("div",Wz,[N("span",Uz,ie(f(c)),1)])):f(d)?(x(),D("div",{key:2,class:M([e.property.ui?.class,"flex flex-col gap-y-2"])},[N("div",Gz,[F(f(t),{"config-map":f(d),"base-key":e.property.id},null,8,["config-map","base-key"])]),e.property.ui?.showTestAuthentication?(x(),D("div",qz,[N("div",Yz,[F(f(Ut),{loading:f(p),label:f(p)?"Testing Authentication":"Test Authentication",onClick:g},null,8,["loading","label"])]),f(m)?.success?(x(),D("div",Kz,[v[1]||(v[1]=N("span",{class:"text-sm font-semibold text-green-700"}," Authentication successful ",-1)),f(m).message?(x(),D("div",Zz,[N("span",Xz,ie(f(m).message),1)])):X("",!0)])):X("",!0),f(m)&&!f(m).success?(x(),D("div",Jz,[v[2]||(v[2]=N("span",{class:"text-sm font-semibold text-new-red-700"}," Authentication failed ",-1)),N("div",Qz,[N("span",e9,ie(f(m).message),1),f(m).link?(x(),D("a",{key:0,href:f(m).link,target:"_blank",class:"ml-1 text-sm text-blue-600 underline"}," Troubleshoot ",8,t9)):X("",!0)])])):X("",!0)])):X("",!0)],2)):X("",!0)}}),i9=Object.assign(o9,{__name:"Agent"}),a9=T({name:"AgentSelector",__name:"AgentSelector",props:{property:{},disabled:{type:Boolean},field:{},baseKey:{}},setup(e){const t=wt(Lt),n=[{id:"atlas-agent-1",label:"Atlas Agent 1",agentType:"atlas"},{id:"miner-agent-2",label:"Miner Agent 2",agentType:"miner"},{id:"lineage-agent-3",label:"Lineage Agent 3",agentType:"lineage"},{id:"catalog-agent-4",label:"Catalog Agent 4",agentType:"catalog"}],o=n.map(({id:r,label:s})=>({value:r,label:s})),i=fe(e.field.state.value?[e.field.state.value]:[]);function a(r){i.value=r,e.field.handleChange(r[0]);const s=n.find(l=>l.id===r[0]);if(s){const l=e.baseKey?`${e.baseKey}.agent-type`:"agent-type";t.setFieldValue(l,s.agentType)}}return(r,s)=>(x(),$(f(Mo),{id:e.property.id,"model-value":f(i),options:f(o),placeholder:e.property.placeholder,"is-disabled":e.disabled,variant:"default","onUpdate:modelValue":a,onBlur:e.field.handleBlur},null,8,["id","model-value","options","placeholder","is-disabled","onBlur"]))}}),r9=Object.assign(a9,{__name:"AgentSelector"});var Ey;const s9=typeof window<"u";s9&&((Ey=window?.navigator)!=null&&Ey.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function l9(e,t){function n(...o){return new Promise((i,a)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(i).catch(a)})}return n}const r_=e=>e();function c9(e=r_){const t=fe(!0);function n(){t.value=!1}function o(){t.value=!0}const i=(...a)=>{t.value&&e(...a)};return{isActive:E0(t),pause:n,resume:o,eventFilter:i}}function d9(e){return e}var Oy=Object.getOwnPropertySymbols,u9=Object.prototype.hasOwnProperty,h9=Object.prototype.propertyIsEnumerable,p9=(e,t)=>{var n={};for(var o in e)u9.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&Oy)for(var o of Oy(e))t.indexOf(o)<0&&h9.call(e,o)&&(n[o]=e[o]);return n};function f9(e,t,n={}){const o=n,{eventFilter:i=r_}=o,a=p9(o,["eventFilter"]);return Ne(e,l9(i,t),a)}var g9=Object.defineProperty,m9=Object.defineProperties,v9=Object.getOwnPropertyDescriptors,$d=Object.getOwnPropertySymbols,s_=Object.prototype.hasOwnProperty,l_=Object.prototype.propertyIsEnumerable,Ty=(e,t,n)=>t in e?g9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,b9=(e,t)=>{for(var n in t||(t={}))s_.call(t,n)&&Ty(e,n,t[n]);if($d)for(var n of $d(t))l_.call(t,n)&&Ty(e,n,t[n]);return e},y9=(e,t)=>m9(e,v9(t)),x9=(e,t)=>{var n={};for(var o in e)s_.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&$d)for(var o of $d(e))t.indexOf(o)<0&&l_.call(e,o)&&(n[o]=e[o]);return n};function Sd(e,t,n={}){const o=n,{eventFilter:i}=o,a=x9(o,["eventFilter"]),{eventFilter:r,pause:s,resume:l,isActive:c}=c9(i);return{stop:f9(e,t,y9(b9({},a),{eventFilter:r})),pause:s,resume:l,isActive:c}}function w9(e,t,n){return Ne(e,(o,i,a)=>{o&&t(o,i,a)},n)}const Iy=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Py="__vueuse_ssr_handlers__";Iy[Py]=Iy[Py]||{};var Dy;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(Dy||(Dy={}));function C9(){const e=fe([]);return e.value.set=t=>{t&&e.value.push(t)},yk(()=>{e.value.length=0}),e}var _9=Object.defineProperty,Ay=Object.getOwnPropertySymbols,k9=Object.prototype.hasOwnProperty,$9=Object.prototype.propertyIsEnumerable,Ry=(e,t,n)=>t in e?_9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S9=(e,t)=>{for(var n in t||(t={}))k9.call(t,n)&&Ry(e,n,t[n]);if(Ay)for(var n of Ay(t))$9.call(t,n)&&Ry(e,n,t[n]);return e};const E9={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};S9({linear:d9},E9);var Ch={},Kr={},Zr={},Vy;function rg(){if(Vy)return Zr;Vy=1,Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.HostType=void 0;var e;return function(t){t.domain="domain",t.socket="socket",t.IPv4="IPv4",t.IPv6="IPv6"}(e||(Zr.HostType=e={})),Zr}var fo={},My;function O9(){if(My)return fo;My=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.fullHostName=t,fo.encode=n,fo.decode=o,fo.hasText=i,fo.validateUrl=a,fo.parseHost=r;const e=rg();function t(s,l){let c="";return s.name&&(c=s.type===e.HostType.IPv4||s.type===e.HostType.IPv6?s.name:n(s.name,l??{})),s.port&&(c+=`:${s.port}`),c}function n(s,l){return s=encodeURIComponent(s),l.plusForSpace&&(s=s.replace(/%20/g,"+")),l.encodeDollar?s:s.replace(/%24/g,"$")}function o(s){return decodeURIComponent(s.replace(/\+/g,"%20"))}function i(s){return typeof s=="string"&&/\S/.test(s)}function a(s){const l=s.search(/[^a-z0-9-._:\/?[\]@!$&'()*+,;=%~]/i);if(l>=0){const c=JSON.stringify(s[l]).replace(/^"|"$/g,"'");throw new Error(`Invalid URL character ${c} at position ${l}`)}}function r(s,l){if(l){if(typeof s!="string")throw new TypeError(`Invalid "host" parameter: ${JSON.stringify(s)}`);s=s.trim()}let c,d;if(s[0]==="["?(c=s.match(/((\[[0-9a-z:%_]{2,45}])(?::(-?[0-9a-z]+))?)/i),d=!0):l?c=s.match(/(([a-z0-9.$/\- _]*)(?::(-?[0-9a-z]+))?)/i):c=s.match(/(([a-z0-9.+$%\-_]*)(?::(-?[0-9a-z]+))?)/i),c){const u={};if(c[2]&&(d?(u.name=c[2],u.type=e.HostType.IPv6):c[2].match(/([0-9]{1,3}\.){3}[0-9]{1,3}/)?(u.name=c[2],u.type=e.HostType.IPv4):(u.name=l?c[2]:o(c[2]),u.type=u.name.match(/\/|.*\.sock$/i)?e.HostType.socket:e.HostType.domain)),c[3]){const h=c[3],p=parseInt(h);if(p>0&&p<65536&&p.toString()===h)u.port=p;else throw new Error(`Invalid port: ${JSON.stringify(h)}. Valid port range is: [1...65535]`)}if(u.name||u.port)return Object.defineProperty(u,"toString",{value:h=>t(u,h),enumerable:!1}),u}return null}return fo}var Ny;function T9(){if(Ny)return Kr;Ny=1,Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.ConnectionString=void 0;const e=rg(),t=O9(),n='Invalid "defaults" parameter: ';class o{get host(){return this.hosts?.[0].toString()}get hostname(){return this.hosts?.[0].name}get port(){return this.hosts?.[0].port}get type(){return this.hosts?.[0].type}constructor(a,r){if(a=a??"",typeof a!="string")throw new TypeError(`Invalid connection string: ${JSON.stringify(a)}`);if(typeof(r??{})!="object")throw new TypeError(n+JSON.stringify(r));a=a.trim(),(0,t.validateUrl)(a);let s=a.match(/^(.*)?:\/\//);if(s){const c=s[1];if(c){const d=c.match(/^([a-z]+[a-z0-9+-.:]*)/i);if(c&&(!d||d[1]!==c))throw new Error(`Invalid protocol name: ${c}`);this.protocol=c}a=a.substring(s[0].length)}if(s=a.match(/^([\w-_.+!*'()$%]*):?([\w-_.+!*'()$%~]*)@/),s&&(s[1]&&(this.user=(0,t.decode)(s[1])),s[2]&&(this.password=(0,t.decode)(s[2])),a=a.substring(s[0].length)),a[0]!=="/"){const c=a.search(/[\/?]/);(c===-1?a:a.substring(0,c)).split(",").forEach(u=>{const h=(0,t.parseHost)(u);h&&(this.hosts||(this.hosts=[]),this.hosts.push(h))}),c>=0&&(a=a.substring(c))}s=a.match(/\/([\w-_.+!*'()$%]+)/g),s&&(this.path=s.map(c=>(0,t.decode)(c.substring(1))));const l=a.indexOf("?");if(l!==-1&&(a=a.substring(l+1),s=a.match(/([\w-_.+!*'()$%]+)=([\w-_.+!*'()$%,]+)/g),s)){const c={};s.forEach(d=>{const u=d.split("="),h=(0,t.decode)(u[0]),p=u[1].split(",").map(t.decode);h in c?Array.isArray(c[h])?c[h].push(...p):c[h]=[c[h],...p]:c[h]=p.length>1?p:p[0]}),this.params=c}r&&this.setDefaults(r)}static parseHost(a){return(0,t.parseHost)(a,!0)}toString(a){let r=this.protocol?`${this.protocol}://`:"";const s=a||{};if(this.user||this.password){if(this.user&&(r+=(0,t.encode)(this.user,s)),this.password){r+=":";const l=s.passwordHash;if(l){const c=typeof l=="string"&&l[0]||"#";r+=c.repeat(this.password.length)}else r+=(0,t.encode)(this.password,s)}r+="@"}if(Array.isArray(this.hosts)&&(r+=this.hosts.map(l=>(0,t.fullHostName)(l,a)).join()),Array.isArray(this.path)&&this.path.forEach(l=>{r+=`/${(0,t.encode)(l,s)}`}),this.params&&typeof this.params=="object"){const l=[];for(const c in this.params){let d=this.params[c];d=Array.isArray(d)?d:[d],d=d.map(u=>(0,t.encode)(typeof u=="string"?u:JSON.stringify(u),s)).join(),s.plusForSpace&&(d=d.replace(/%20/g,"+")),l.push(`${(0,t.encode)(c,s)}=${d}`)}l.length&&(r+=`?${l.join("&")}`)}return r}setDefaults(a){if(!a||typeof a!="object")throw new TypeError(n+JSON.stringify(a));if(!("protocol"in this)&&(0,t.hasText)(a.protocol)&&(this.protocol=a.protocol&&a.protocol.trim()),Array.isArray(a.hosts)){const r=Array.isArray(this.hosts)?this.hosts:[];a.hosts.filter(l=>l&&typeof l=="object").forEach(l=>{const d={name:(0,t.hasText)(l.name)?l.name.trim():void 0,port:l.port,type:l.type};let u=!1;for(let h=0;h<r.length;h++){const p=(0,t.fullHostName)(r[h]),m=(0,t.fullHostName)(d);if(p.toLowerCase()===m.toLowerCase()){u=!0;break}}if(!u){const h={};if(d.name)if(d.type&&d.type in e.HostType)h.name=d.name,h.type=d.type;else{const m=(0,t.parseHost)(d.name,!0);m&&(h.name=m.name,h.type=m.type)}const p=d.port;typeof p=="number"&&p>0&&p<65536&&(h.port=p),(h.name||h.port)&&(Object.defineProperty(h,"toString",{value:m=>(0,t.fullHostName)(h,m)}),r.push(h))}}),r.length&&(this.hosts=r)}if(!("user"in this)&&(0,t.hasText)(a.user)&&(this.user=a.user.trim()),!("password"in this)&&(0,t.hasText)(a.password)&&(this.password=a.password.trim()),!("path"in this)&&Array.isArray(a.path)){const r=a.path.filter(t.hasText);r.length&&(this.path=r)}if(a.params&&typeof a.params=="object"&&Object.keys(a.params).length)if(this.params&&typeof this.params=="object")for(const s in a.params)s in this.params||(this.params[s]=a.params[s]);else{this.params={};for(const s in a.params)this.params[s]=a.params[s]}return this}}return Kr.ConnectionString=o,function(){["setDefaults","toString"].forEach(i=>{const a=Object.getOwnPropertyDescriptor(o.prototype,i);a.enumerable=!1,Object.defineProperty(o.prototype,i,a)})}(),Kr}var Ly;function I9(){return Ly||(Ly=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HostType=e.ConnectionString=void 0;var t=T9();Object.defineProperty(e,"ConnectionString",{enumerable:!0,get:function(){return t.ConnectionString}});var n=rg();Object.defineProperty(e,"HostType",{enumerable:!0,get:function(){return n.HostType}})}(Ch)),Ch}var rc=I9();const Fy=0,By=1,P9=T({__name:"AdvancedJDBCUrlGroup",props:{property:{}},setup(e){const t=ui(()=>hi(()=>Promise.resolve().then(()=>bi),void 0,import.meta.url)),n=e,o=wt(Lt),i=o.useStore(u=>di(u.values));function a(u){try{return new rc.ConnectionString(u),!0}catch{return!1}}const r=E(()=>i.value[n.property.ui.urlPropertyId]),s=E(()=>ag(i.value,Object.values(di(n.property.ui.urlPartPropertyIdMapping)).filter(u=>u!==n.property.ui.urlPropertyId))),l=[],c=Sd(r,async u=>{const h=n.property.ui.isDelimitedBySemicolons?u?.replace(";","?").replaceAll(";","&"):u;if(h&&a(h)){const p=new rc.ConnectionString(h);l[By]?.pause(),Object.entries(n.property.ui.urlPartPropertyIdMapping).forEach(([m,g])=>{m==="searchParams"?Object.entries(g).forEach(([b,v])=>{p.params?.[b]&&Object.keys(i.value).includes(v)&&o.setFieldValue(v,p.params[b])}):m==="pathname"?Object.keys(i.value).includes(g)&&o.setFieldValue(g,p.path?.[0]):m==="username"?Object.keys(i.value).includes(g)&&o.setFieldValue(g,p.user):p[m]&&Object.keys(i.value).includes(g)&&o.setFieldValue(g,p[m])}),await io(),l[By]?.resume()}});l.push(c);const d=Sd([s,()=>n.property.ui],async([u,h],[p,m])=>{l[Fy]?.pause();let g={protocol:e_(h.protocol,":")};if(r.value){const y=h.isDelimitedBySemicolons?r.value.replace(";","?").replaceAll(";","&"):r.value;if(a(y)&&ig(m,h)){const w=new rc.ConnectionString(y);for(const C of["protocol","user","password","hosts","port","path","params"])g={...g,[C]:w[C]}}}const b={};Object.entries(h.urlPartPropertyIdMapping).forEach(([y,w])=>{y==="searchParams"?Object.entries(w).forEach(([C,k])=>{Object.keys(u).includes(k)?g={...g,params:{...g.params,[C]:u[k]}}:g={...g,params:{...g.params,[C]:k}}}):y==="hostname"?u[w]&&(b.name=u[w],g={...g,hosts:[b]}):y==="port"?u[w]&&(b.port=u[w],g={...g,hosts:[b]}):y==="username"?u[w]&&(g={...g,user:u[w]}):y==="pathname"?u[w]&&(g={...g,path:[u[w]]}):u[w]&&(g={...g,[y]:u[w]})});const v=new rc.ConnectionString(null,g);o.setFieldValue(h.urlPropertyId,h.isDelimitedBySemicolons?v.toString().replace("?",";").replaceAll("&",";"):v.toString()),await io(),l[Fy]?.resume()});return l.push(d),(u,h)=>(x(),$(f(t),{class:"border border-gray-200 rounded-lg p-3 mb-4","config-map":n.property,"base-key":n.property.id.split(".")[0]},null,8,["config-map","base-key"]))}}),D9=Object.assign(P9,{__name:"AdvancedJDBCUrlGroup"}),zy=0,Hy=1,A9=T({__name:"JDBCUrlGroup",props:{property:{}},setup(e){const t=ui(()=>hi(()=>Promise.resolve().then(()=>bi),void 0,import.meta.url)),n=e,o=wt(Lt),i=o.useStore(d=>di(d.values)),a=E(()=>i.value[n.property.ui.urlPropertyId]),r=E(()=>ag(i.value,Object.values(di(n.property.ui.urlPartPropertyIdMapping)).filter(d=>d!==n.property.ui.urlPropertyId))),s=[],l=Sd(a,async d=>{const u=n.property.ui.isDelimitedBySemicolons?d?.replace(";","?").replaceAll(";","&"):d;if(u&&URL.canParse(u)){const h=new URL(u);s[Hy]?.pause(),Object.entries(n.property.ui.urlPartPropertyIdMapping).forEach(([p,m])=>{if(p==="searchParams")Object.entries(m).forEach(([g,b])=>{h.searchParams.get(g)&&Object.keys(i.value).includes(b)&&o.setFieldValue(b,h.searchParams.get(g))});else{const g=h[p];g&&Object.keys(i.value).includes(m)&&o.setFieldValue(m,p==="pathname"?e_(g,"/"):g)}}),await io(),s[Hy]?.resume()}});s.push(l);const c=Sd([r,()=>n.property.ui],async([d,u],[h,p])=>{s[zy]?.pause();let m=new URL(`${u.protocol}//`);if(a.value){const g=u.isDelimitedBySemicolons?a.value.replace(";","?").replaceAll(";","&"):a.value;URL.canParse(g)&&ig(p,u)&&(m=new URL(g))}Object.entries(u.urlPartPropertyIdMapping).forEach(([g,b])=>{g==="searchParams"?Object.entries(b).forEach(([v,y])=>{Object.keys(d).includes(y)?m.searchParams.set(v,d[y]):m.searchParams.set(v,y)}):d[b]&&(m[g]=d[b])}),o.setFieldValue(u.urlPropertyId,u.isDelimitedBySemicolons?m.toString().replace("?",";").replaceAll("&",";"):m.toString()),await io(),s[zy]?.resume()});return s.push(c),(d,u)=>(x(),$(f(t),{class:"border border-gray-200 rounded-lg p-3 mb-4","config-map":n.property,"base-key":n.property.id.split(".")[0]},null,8,["config-map","base-key"]))}}),R9=Object.assign(A9,{__name:"JDBCUrlGroup"}),V9=T({__name:"NestedCollapse",props:{property:{}},setup(e){const t=ui(()=>hi(()=>Promise.resolve().then(()=>bi),void 0,import.meta.url)),n=fe([]);return(o,i)=>(x(),$(f(tO),{modelValue:f(n),"onUpdate:modelValue":i[0]||(i[0]=a=>Ks(n)?n.value=a:null),collapsible:""},{default:_(()=>[(x(!0),D($e,null,Ie(e.property.panels,a=>(x(),$(f(jE),{key:a.id,value:a.id},{default:_(()=>[F(f(YE),null,{default:_(()=>[Re(ie(a.header)+" ",1),F(f(qE),null,{default:_(()=>[F(f(i_),{class:"w-4 h-4 transition-transform"})]),_:1})]),_:2},1024),F(f(WE),null,{default:_(()=>[F(f(t),{"config-map":a.configMap,"base-key":e.property.id},null,8,["config-map","base-key"])]),_:2},1024)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"]))}}),M9=Object.assign(V9,{__name:"NestedCollapse"}),N9=T({__name:"ApiSelect",props:{field:{},property:{}},async setup(e){let t,n;const o=wt(Lt),i=E(()=>!!e.property.ui?.isMultiple),{data:a}=([t,n]=sr(()=>mr(`${e.property.id}_metadata`,()=>{const h=o.getFieldValue("credential_guid_body"),{metadataTemplateKey:p,metadataTransformerTemplateKey:m}=e.property.ui??{};return $fetch("/workflows/v1/metadata",{method:"POST",body:{...h&&h,...p&&{type:p},...p&&{database:p},...m&&{metadataTransformerTemplateKey:m}}})})),t=await t,n(),t);function r(h,p=null){return h.map(m=>{const g=p?`${p}:${m.value}`:m.value;return{value:g,label:m.title,children:m.children?r(m.children,g):void 0}})}const s=E(()=>a.value?r(a.value.data):[]),c=fe((h=>{const p=[],m=(g,b=[])=>{Array.isArray(g)?b.length>0&&p.push(b.join(":")):typeof g=="object"&&g!==null&&Object.keys(g).forEach(v=>{m(g[v],[...b,v])})};if(h)if(typeof h=="string")try{m(JSON.parse(h))}catch{p.push(h)}else m(h);return p})(e.field.state.value)),d=h=>{const p={};return h.forEach(m=>{const g=m.split(":");let b=p;g.forEach((v,y)=>{b[v]||(b[v]={}),y!==g.length-1&&(b=b[v])})}),p},u=h=>{const p=Array.isArray(h)?h:[h].filter(Boolean);e.field.handleChange(d(p)),c.value=p};return(h,p)=>(x(),$(f(Mo),{isTree:"",multiple:f(i),options:f(s),modelValue:f(c),"onUpdate:modelValue":u},null,8,["multiple","options","modelValue"]))}}),L9=Object.assign(N9,{__name:"ApiSelect"}),F9={class:"flex flex-col gap-y-1"},B9={class:"text-gray-600"},z9=["href"],H9=T({__name:"Checkbox",props:{field:{},property:{}},setup(e){const t=E(()=>e.property?.ui),n=o=>{e.field.handleChange(o.checked),e.field.handleBlur()};return(o,i)=>(x(),D("div",F9,[F(f(lC),{checked:e.field.state.value,"data-test-id":e.property?.id,onCheckedChange:n},{default:_(()=>[N("span",B9,ie(f(t)?.title),1),f(t)?.link?(x(),D("a",{key:0,href:f(t).link.url,target:"_blank",class:"hover:underline"},ie(f(t).link.text),9,z9)):X("",!0)]),_:1},8,["checked","data-test-id"])]))}}),j9=Object.assign(H9,{__name:"Checkbox"});function _h(e,t){return e-t*Math.floor(e/t)}const c_=1721426;function sc(e,t,n,o){t=sg(e,t);let i=t-1,a=-2;return n<=2?a=0:Wc(t)&&(a=-1),c_-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 sg(e,t){return e==="BC"?1-t:t}function W9(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const U9={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]};class tr{fromJulianDay(t){let n=t,o=n-c_,i=Math.floor(o/146097),a=_h(o,146097),r=Math.floor(a/36524),s=_h(a,36524),l=Math.floor(s/1461),c=_h(s,1461),d=Math.floor(c/365),u=i*400+r*100+l*4+d+(r!==4&&d!==4?1:0),[h,p]=W9(u),m=n-sc(h,p,1,1),g=2;n<sc(h,p,3,1)?g=0:Wc(p)&&(g=1);let b=Math.floor(((m+g)*12+373)/367),v=n-sc(h,p,b,1)+1;return new ir(h,p,b,v)}toJulianDay(t){return sc(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return U9[Wc(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return Wc(t.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}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"}}function G9(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function q9(e){return So(Date.now(),e)}function Y9(e){return Q9(q9(e))}function d_(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function K9(e,t){return jy(e)-jy(t)}function jy(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let kh=null,Z9=!1;function lg(){return kh==null&&(kh=new Intl.DateTimeFormat().resolvedOptions().timeZone),kh}function u_(){return Z9}function nr(e){e=to(e,new tr);let t=sg(e.era,e.year);return h_(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function h_(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 Dp(e,t){if(t==="UTC")return 0;if(e>0&&t===lg()&&!u_())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:o,day:i,hour:a,minute:r,second:s}=p_(e,t);return h_(n,o,i,a,r,s,0)-Math.floor(e/1e3)*1e3}const Wy=new Map;function p_(e,t){let n=Wy.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"}),Wy.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 Uy=864e5;function X9(e,t,n,o){return(n===o?[n]:[n,o]).filter(a=>J9(e,t,a))}function J9(e,t,n){let o=p_(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 wo(e,t,n="compatible"){let o=or(e);if(t==="UTC")return nr(o);if(t===lg()&&n==="compatible"&&!u_()){o=to(o,new tr);let l=new Date,c=sg(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=nr(o),a=Dp(i-Uy,t),r=Dp(i+Uy,t),s=X9(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 f_(e,t,n="compatible"){return new Date(wo(e,t,n))}function So(e,t){let n=Dp(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(),d=o.getUTCMilliseconds();return new Ws(i<1?"BC":"AD",i<1?-i+1:i,a,r,t,n,s,l,c,d)}function Q9(e){return new ir(e.calendar,e.era,e.year,e.month,e.day)}function or(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&&!t)return e;return t&&({hour:n,minute:o,second:i,millisecond:a}=t),new Od(e.calendar,e.era,e.year,e.month,e.day,n,o,i,a)}function to(e,t){if(G9(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,ea(o),o}function eH(e,t,n){if(e instanceof Ws)return e.timeZone===t?e:nH(e,t);let o=wo(e,t,n);return So(o,t)}function tH(e){let t=nr(e)-e.offset;return new Date(t)}function nH(e,t){let n=nr(e)-e.offset;return to(So(n,t),e.calendar)}const Xr=36e5;function mu(e,t){let n=e.copy(),o="hour"in n?rH(n,t):0;Ap(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,Rp(n),g_(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=o,oH(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){let r=n.calendar.isInverseEra?.(n);n.year=i,n.month=r?1:n.calendar.getMonthsInYear(n),n.day=r?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let a=n.calendar.getMonthsInYear(n);return n.month>a&&(n.month=a,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function Ap(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function Rp(e){for(;e.month<1;)Ap(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Ap(e,1)}function oH(e){for(;e.day<1;)e.month--,Rp(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,Rp(e)}function g_(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 ea(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),g_(e)}function m_(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function v_(e,t){return mu(e,m_(t))}function cg(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),ea(n),n}function Ed(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),aH(n),n}function iH(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=lc(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=lc(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=lc(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=lc(e.hour,24),t}function aH(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 lc(e,t){let n=e%t;return n<0&&(n+=t),n}function rH(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,iH(e)}function dg(e,t,n,o){let i=e.copy();switch(t){case"era":{let a=e.calendar.getEras(),r=a.indexOf(e.era);if(r<0)throw new Error("Invalid era: "+e.era);r=Eo(r,n,0,a.length-1,o?.round),i.era=a[r],ea(i);break}case"year":i.calendar.isInverseEra?.(i)&&(n=-n),i.year=Eo(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=Eo(e.month,n,1,e.calendar.getMonthsInYear(e),o?.round);break;case"day":i.day=Eo(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),ea(i),i}function b_(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=Eo(a,n,r,s,o?.round);break}case"minute":i.minute=Eo(e.minute,n,0,59,o?.round);break;case"second":i.second=Eo(e.second,n,0,59,o?.round);break;case"millisecond":i.millisecond=Eo(e.millisecond,n,0,999,o?.round);break;default:throw new Error("Unsupported field "+t)}return i}function Eo(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 y_(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=mu(or(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=wo(i,e.timeZone)}else n=nr(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let o=So(n,e.timeZone);return to(o,e.calendar)}function sH(e,t){return y_(e,m_(t))}function lH(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=or(e),s=to(Ed(r,{hour:i}),new tr),l=[wo(s,e.timeZone,"earlier"),wo(s,e.timeZone,"later")].filter(m=>So(m,e.timeZone).day===s.day)[0],c=to(Ed(r,{hour:a}),new tr),d=[wo(c,e.timeZone,"earlier"),wo(c,e.timeZone,"later")].filter(m=>So(m,e.timeZone).day===c.day).pop(),u=nr(e)-e.offset,h=Math.floor(u/Xr),p=u%Xr;return u=Eo(h,n,Math.floor(l/Xr),Math.floor(d/Xr),o?.round)*Xr+p,to(So(u,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return b_(e,t,n,o);case"era":case"year":case"month":case"day":{let i=dg(or(e),t,n,o),a=wo(i,e.timeZone);return to(So(a,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function cH(e,t,n){let o=or(e),i=Ed(cg(o,t),t);if(i.compare(o)===0)return e;let a=wo(i,e.timeZone,n);return to(So(a,e.timeZone),e.calendar)}function dH(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 x_(e){let t=to(e,new tr),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 w_(e){return`${x_(e)}T${dH(e)}`}function uH(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 hH(e){return`${w_(e)}${uH(e.offset)}[${e.timeZone}]`}function ug(e){let t=typeof e[0]=="object"?e.shift():new tr,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]}class ir{#n;constructor(...t){let[n,o,i,a,r]=ug(t);this.calendar=n,this.era=o,this.year=i,this.month=a,this.day=r,ea(this)}copy(){return this.era?new ir(this.calendar,this.era,this.year,this.month,this.day):new ir(this.calendar,this.year,this.month,this.day)}add(t){return mu(this,t)}subtract(t){return v_(this,t)}set(t){return cg(this,t)}cycle(t,n,o){return dg(this,t,n,o)}toDate(t){return f_(this,t)}toString(){return x_(this)}compare(t){return d_(this,t)}}class Od{#n;constructor(...t){let[n,o,i,a,r]=ug(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,ea(this)}copy(){return this.era?new Od(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Od(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return mu(this,t)}subtract(t){return v_(this,t)}set(t){return cg(Ed(this,t),t)}cycle(t,n,o){switch(t){case"era":case"year":case"month":case"day":return dg(this,t,n,o);default:return b_(this,t,n,o)}}toDate(t,n){return f_(this,t,n)}toString(){return w_(this)}compare(t){let n=d_(this,t);return n===0?K9(this,or(t)):n}}class Ws{#n;constructor(...t){let[n,o,i,a,r]=ug(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,ea(this)}copy(){return this.era?new Ws(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new Ws(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return y_(this,t)}subtract(t){return sH(this,t)}set(t,n){return cH(this,t,n)}cycle(t,n,o){return lH(this,t,n,o)}toDate(){return tH(this)}toString(){return hH(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-eH(t,this.timeZone).toDate().getTime()}}const pH=T({__name:"Date",props:{field:{},property:{}},setup(e){const t=lg(),n=E(()=>e.property?.ui),o=E(()=>Y9(t)),i=E(()=>o.value.add({days:n.value?.min??0})),a=E(()=>o.value.add({days:n.value?.max??0})),r=E(()=>o.value.add({days:n.value?.default??0})),s=h=>{const p=h;return p.compare(i.value)<0||p.compare(a.value)>0},l=h=>{const p=parseInt(h,10);if(!p)return null;const m=new Date(p*1e3);return new ir(m.getUTCFullYear(),m.getUTCMonth()+1,m.getUTCDate())},c=h=>Math.floor(h.toDate("UTC").getTime()/1e3).toString(),d=E(()=>{const h=e.field.state.value;if(!h||parseInt(h,10)===0)return[];const p=l(h);return p?[p]:[]}),u=h=>{const[p]=h.value;p&&(e.field.handleChange(c(p)),e.field.handleBlur())};return rr(()=>{const h=e.field.state.value;(!h||parseInt(h,10)===0)&&(e.field.handleChange(c(r.value)),e.field.handleBlur())}),(h,p)=>(x(),$(f(hF),{"model-value":f(d),"is-date-unavailable":s,"data-test-id":e.property?.id,onValueChange:u},null,8,["model-value","data-test-id"]))}}),fH=Object.assign(pH,{__name:"Date"}),gH=T({__name:"InputNumber",props:{field:{},property:{}},setup(e){const t=e.field.state.value,n=fe((()=>{if(t==null||t==="")return"";const i=typeof t=="string"?parseFloat(t):t;return isNaN(i)?"":String(i)})()),o=i=>{n.value=i;const a=parseFloat(i);e.field.handleChange(isNaN(a)?void 0:a),e.field.handleBlur()};return(i,a)=>(x(),$(f(o5),{"model-value":f(n),min:e.property?.ui?.min,max:e.property?.ui?.max,step:e.property?.ui?.step,disabled:e.property?.ui?.disabled,"data-test-id":e.property?.id,class:"w-full","onUpdate:modelValue":o},null,8,["model-value","min","max","step","disabled","data-test-id"]))}}),mH=Object.assign(gH,{__name:"InputNumber"}),vH={key:0,class:"text-red-500"},bH={class:"max-h-[300px] overflow-y-auto overflow-x-hidden pr-1"},yH=["data-test-id"],xH={class:"flex-grow max-w-[calc(100%-30px)]"},wH={key:0,class:"absolute right-0 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer p-1"},CH=T({__name:"InputRepeater",props:{property:{}},setup(e){const t=wt(Lt),n=C9(),o=d=>{const u=new Set;return d.filter(h=>h.trim()===""?!0:u.has(h.trim())?!1:(u.add(h.trim()),!0))},i=fe(!1),a=d=>{const u=e.property.ui.maxItems;u!==void 0&&d.state.value.length>=u||(d.pushValue(""),i.value||io(()=>{const h=n.value[d.state.value.length-1];h&&h.focus()}))},r=(d,u)=>{const h=e.property.ui.minItems??1;d.state.value.length>h&&d.removeValue(u)},s=(d,u)=>{u===d.state.value.length-1&&(i.value=!0,a(d),i.value=!1)},l=(d,u,h)=>{h.preventDefault();const m=(h.clipboardData?.getData("text")??"").split(/\r?\n|\r|,/).map(v=>v.trim()).filter(v=>v.length>0);if(m.length===0)return;const g=[...d.state.value];g.splice(u,1,...m);const b=o(g);t.setFieldValue(e.property.id,b)},c=(d,u,h)=>{const p=[...d.state.value];p[u]=h,t.setFieldValue(e.property.id,p)};return rr(()=>{const d=t.getFieldValue(e.property.id),u=e.property.ui.maxItems;if(!d||d.length===0){t.setFieldValue(e.property.id,[""]);return}d[d.length-1]!==""&&(u===void 0||d.length<u)&&t.setFieldValue(e.property.id,[...d,""])}),(d,u)=>(x(),$(f(t).Field,{name:e.property.id,mode:"array"},{default:_(({field:h})=>[N("div",null,[N("div",null,[F(f(Gf),null,{default:_(()=>[Re(ie(e.property.ui?.label)+" ",1),e.property?.required?(x(),D("span",vH," * ")):X("",!0)]),_:1})]),N("div",bH,[(x(!0),D($e,null,Ie(h.state.value,(p,m)=>(x(),D("div",{key:m,"data-test-id":e.property.id,class:"relative flex items-center justify-between group mb-4"},[N("div",xH,[F(f(hr),{ref_for:!0,ref:f(n).set,"model-value":h.state.value[m],placeholder:e.property.ui?.placeholder,"onUpdate:modelValue":g=>c(h,m,g),onFocus:()=>s(h,m),onPaste:g=>l(h,m,g),onKeydown:Ah(on(()=>a(h),["prevent"]),["enter"])},null,8,["model-value","placeholder","onUpdate:modelValue","onFocus","onPaste","onKeydown"])]),h.state.value.length>(e.property.ui.minItems??1)?(x(),D("div",wH,[F(f(Ss),{class:"w-4 h-4 text-gray-400 hover:text-red-500",onClick:()=>r(h,m)},null,8,["onClick"])])):X("",!0)],8,yH))),128))])])]),_:1},8,["name"]))}}),_H=Object.assign(CH,{__name:"InputRepeater"}),kH=T({__name:"Evaluate",props:{property:{}},setup(e){const t=wt(Lt),n=E(()=>e.property.ui?.value);return w9(n,()=>{t?.setFieldValue(e.property.id,n.value)},{immediate:!0}),(o,i)=>(x(),$(gt(null)))}}),$H=Object.assign(kH,{__name:"Evaluate"}),SH=T({name:"ConnectionTree",__name:"ConnectionTree",props:Fg({isAdmin:{type:Boolean,default:!1},connections:{},databases:{default:()=>[]},placeholder:{}},{modelValue:{},modelModifiers:{}}),emits:Fg(["change"],["update:modelValue"]),setup(e,{emit:t}){const n=xk(e,"modelValue"),o=t,i=l=>!0,a=E(()=>{let l=e.connections.filter(c=>e.isAdmin?i():!0).map(c=>{const d=e.databases.filter(u=>u.attributes.connectionQualifiedName===c.attributes.qualifiedName).map(u=>({label:u.attributes.displayName||u.attributes.name||"",value:u.attributes.qualifiedName,disabled:!1}));return{label:c.attributes.displayName||c.attributes.name||"",value:c.attributes.qualifiedName,connector:c.attributes.connectorName,children:d}});return l=l.filter(c=>c.children&&c.children.length>0),l.sort((c,d)=>(c.connector||"").localeCompare(d.connector||"")),l}),r=E(()=>n.value?[n.value]:[]);function s(l){const c=Array.isArray(l)?l[0]:l;n.value=c,o("change",c)}return(l,c)=>(x(),$(f(Mo),{isTree:"","model-value":f(r),options:f(a),placeholder:e.placeholder??"Select a connection",variant:"default","onUpdate:modelValue":s},null,8,["model-value","options","placeholder"]))}}),EH=Object.assign(SH,{__name:"ConnectionTree"}),OH={key:0,class:"dsn-tree-map-shell flex flex-col gap-4 p-4 rounded-md"},TH={class:"flex flex-col gap-2"},IH={key:0,class:"font-semibold text-gray-800"},PH={key:1,class:"text-sm text-new-gray-600"},DH={class:"flex gap-4"},AH={class:"flex items-center w-1/2 gap-2 text-sm text-gray-700"},RH={class:"flex items-center w-1/2 gap-2 text-sm text-gray-700"},VH={class:"flex items-center gap-3"},MH={class:"flex-1"},NH={class:"flex-1"},LH=["disabled","onClick"],FH={key:0,class:"mt-1 text-xs text-red-500"},BH={key:1,class:"my-1 border-t border-new-gray-200"},zH=["disabled"],HH=T({name:"DsnTreeMapWidget",__name:"DsnTreeMap",props:{property:{},field:{}},setup(e){const t=E(()=>e.property.ui?.config),n=wt(Lt,null),o=[{attributes:{qualifiedName:"default/snowflake/1234567890",displayName:"Production Snowflake",connectorName:"snowflake"}},{attributes:{qualifiedName:"default/snowflake/0987654321",displayName:"Staging Snowflake",connectorName:"snowflake"}},{attributes:{qualifiedName:"default/bigquery/1234567890",displayName:"Analytics BigQuery",connectorName:"bigquery"}},{attributes:{qualifiedName:"default/postgres/8938390",displayName:"Dev Postgres",connectorName:"postgres"}}],i=[{attributes:{qualifiedName:"default/snowflake/1234567890/ANALYTICS_PROD",displayName:"ANALYTICS_PROD",connectionQualifiedName:"default/snowflake/1234567890",connectorName:"snowflake"}},{attributes:{qualifiedName:"default/snowflake/1234567890/RAW",displayName:"RAW",connectionQualifiedName:"default/snowflake/1234567890",connectorName:"snowflake"}},{attributes:{qualifiedName:"default/snowflake/0987654321/ANALYTICS_STAGING",displayName:"ANALYTICS_STAGING",connectionQualifiedName:"default/snowflake/0987654321",connectorName:"snowflake"}},{attributes:{qualifiedName:"default/bigquery/1234567890/analytics-prod",displayName:"analytics-prod",connectionQualifiedName:"default/bigquery/1234567890",connectorName:"bigquery"}},{attributes:{qualifiedName:"default/bigquery/1234567890/marketing",displayName:"marketing",connectionQualifiedName:"default/bigquery/1234567890",connectorName:"bigquery"}},{attributes:{qualifiedName:"default/postgres/8938390/app_db",displayName:"app_db",connectionQualifiedName:"default/postgres/8938390",connectorName:"postgres"}}],a=E(()=>e.property.ui?.connections??o),r=E(()=>e.property.ui?.databases??i),s=E(()=>{if(!n)return[];const w=n.getFieldValue("sql-connection-qualified-names");if(!w)return[];if(Array.isArray(w))return w;try{const C=JSON.parse(w);return Array.isArray(C)?C:[w]}catch{return[w]}}),l=E(()=>s.value.length?a.value.filter(w=>s.value.includes(w.attributes.qualifiedName)):a.value),d=fe((()=>{const w=e.field?.state?.value;if(!w)return[{id:1,dsn:"",connection:void 0}];let C={};try{C=typeof w=="string"?JSON.parse(w):w}catch{return[{id:1,dsn:"",connection:void 0}]}const k=Object.keys(C||{});return k.length?k.map((O,P)=>({id:P+1,dsn:O,connection:C[O]})):[{id:1,dsn:"",connection:void 0}]})()),u=fe(d.value.length+1),h=E(()=>{const w={};return d.value.forEach(C=>{const k=C.dsn.trim();k&&(w[k]=(w[k]||0)+1)}),Object.keys(w).filter(C=>w[C]>1)}),p=E(()=>d.value.every(w=>w.dsn.trim()&&w.connection)&&h.value.length===0);function m(){const w={};d.value.forEach(C=>{const k=C.dsn.trim();k&&C.connection&&(w[k]=C.connection)}),e.field.handleChange(JSON.stringify(w))}function g(w,C){const k=d.value.find(O=>O.id===w);k&&(k.dsn=C,m())}function b(w,C){const k=d.value.find(O=>O.id===w);k&&(k.connection=C,m())}function v(){d.value.push({id:u.value++,dsn:"",connection:void 0})}function y(w){d.value=d.value.filter(C=>C.id!==w),d.value.length===0&&d.value.push({id:u.value++,dsn:"",connection:void 0}),m()}return(w,C)=>{const k=EH;return f(t)?(x(),D("div",OH,[N("div",TH,[f(t).heading?(x(),D("h2",IH,ie(f(t).heading),1)):X("",!0),f(t).content?(x(),D("p",PH,ie(f(t).content),1)):X("",!0)]),N("div",DH,[N("div",AH,[N("span",null,ie(f(t).inputLabel??"DSN"),1),f(t).inputHelpText?(x(),$(f(Jo),{key:0,title:f(t).inputHelpText},{default:_(()=>[F(f(Ip),{class:"h-3.5 w-3.5 text-gray-400 cursor-pointer"})]),_:1},8,["title"])):X("",!0)]),N("div",RH,[N("span",null,ie(f(t).connectionLabel??"Connection"),1),f(t).connectionHelpText?(x(),$(f(Jo),{key:0,title:f(t).connectionHelpText},{default:_(()=>[F(f(Ip),{class:"h-3.5 w-3.5 text-gray-400 cursor-pointer"})]),_:1},8,["title"])):X("",!0)])]),(x(!0),D($e,null,Ie(f(d),(O,P)=>(x(),D("div",{key:O.id,class:"flex flex-col gap-1"},[N("div",VH,[N("div",MH,[F(f(hr),{"model-value":O.dsn,placeholder:f(t).inputPlaceholder??"Enter DSN",variant:"default",state:"idle",class:M({"dsn-duplicate":f(h).includes(O.dsn.trim())}),"onUpdate:modelValue":S=>g(O.id,S)},null,8,["model-value","placeholder","class","onUpdate:modelValue"])]),N("div",NH,[F(k,{isAdmin:"","model-value":O.connection,connections:f(l),databases:f(r),placeholder:f(t).connectionPlaceholder??"Select connection",onChange:S=>b(O.id,S)},null,8,["model-value","connections","databases","placeholder","onChange"])]),F(f(Jo),{title:"Remove Mapping"},{default:_(()=>[N("button",{type:"button",disabled:f(d).length===1,class:"p-1 text-gray-500 rounded hover:bg-new-gray-100 disabled:opacity-40 disabled:cursor-not-allowed",onClick:S=>y(O.id)},[F(f(Ss),{class:"h-4 w-4"})],8,LH)]),_:2},1024)]),f(h).includes(O.dsn.trim())?(x(),D("div",FH," This DSN is duplicated. Please provide a unique name. ")):X("",!0),P<f(d).length-1?(x(),D("div",BH)):X("",!0)]))),128)),N("div",null,[F(f(Jo),{title:"Add Another Mapping"},{default:_(()=>[N("button",{type:"button",disabled:!f(p),class:"p-1 rounded border border-solid border-new-gray-300 text-gray-600 hover:bg-new-gray-100 disabled:opacity-40 disabled:cursor-not-allowed","aria-label":"Add Another Mapping",onClick:v},[F(f(a_),{class:"h-4 w-4"})],8,zH)]),_:1})])])):X("",!0)}}}),jH=Object.assign(Rd(HH,[["__scopeId","data-v-08522bfa"]]),{__name:"DsnTreeMap"});function hg(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let da=hg();function C_(e){da=e}const __=/[&<>"']/,WH=new RegExp(__.source,"g"),k_=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,UH=new RegExp(k_.source,"g"),GH={"&":"&","<":"<",">":">",'"':""","'":"'"},Gy=e=>GH[e];function en(e,t){if(t){if(__.test(e))return e.replace(WH,Gy)}else if(k_.test(e))return e.replace(UH,Gy);return e}const qH=/(^|[^\[])\^/g;function Fe(e,t){let n=typeof e=="string"?e:e.source;t=t||"";const o={replace:(i,a)=>{let r=typeof a=="string"?a:a.source;return r=r.replace(qH,"$1"),n=n.replace(i,r),o},getRegex:()=>new RegExp(n,t)};return o}function qy(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const Es={exec:()=>null};function Yy(e,t){const n=e.replace(/\|/g,(a,r,s)=>{let l=!1,c=r;for(;--c>=0&&s[c]==="\\";)l=!l;return l?"|":" |"}),o=n.split(/ \|/);let i=0;if(o[0].trim()||o.shift(),o.length>0&&!o[o.length-1].trim()&&o.pop(),t)if(o.length>t)o.splice(t);else for(;o.length<t;)o.push("");for(;i<o.length;i++)o[i]=o[i].trim().replace(/\\\|/g,"|");return o}function Jr(e,t,n){const o=e.length;if(o===0)return"";let i=0;for(;i<o&&e.charAt(o-i-1)===t;)i++;return e.slice(0,o-i)}function YH(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let o=0;o<e.length;o++)if(e[o]==="\\")o++;else if(e[o]===t[0])n++;else if(e[o]===t[1]&&(n--,n<0))return o;return-1}function Ky(e,t,n,o){const i=t.href,a=t.title?en(t.title):null,r=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){o.state.inLink=!0;const s={type:"link",raw:n,href:i,title:a,text:r,tokens:o.inlineTokens(r)};return o.state.inLink=!1,s}return{type:"image",raw:n,href:i,title:a,text:en(r)}}function KH(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const o=n[1];return t.split(`
|
|
23
|
+
`).map(i=>{const a=i.match(/^\s+/);if(a===null)return i;const[r]=a;return r.length>=o.length?i.slice(o.length):i}).join(`
|
|
24
|
+
`)}class Td{options;rules;lexer;constructor(t){this.options=t||da}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const o=n[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?o:Jr(o,`
|
|
25
|
+
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const o=n[0],i=KH(o,n[3]||"");return{type:"code",raw:o,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:i}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let o=n[2].trim();if(/#$/.test(o)){const i=Jr(o,"#");(this.options.pedantic||!i||/ $/.test(i))&&(o=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:o,tokens:this.lexer.inline(o)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:Jr(n[0],`
|
|
26
|
+
`)}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){let o=Jr(n[0],`
|
|
27
|
+
`).split(`
|
|
28
|
+
`),i="",a="";const r=[];for(;o.length>0;){let s=!1;const l=[];let c;for(c=0;c<o.length;c++)if(/^ {0,3}>/.test(o[c]))l.push(o[c]),s=!0;else if(!s)l.push(o[c]);else break;o=o.slice(c);const d=l.join(`
|
|
29
|
+
`),u=d.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
|
|
30
|
+
$1`).replace(/^ {0,3}>[ \t]?/gm,"");i=i?`${i}
|
|
31
|
+
${d}`:d,a=a?`${a}
|
|
32
|
+
${u}`:u;const h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,r,!0),this.lexer.state.top=h,o.length===0)break;const p=r[r.length-1];if(p?.type==="code")break;if(p?.type==="blockquote"){const m=p,g=m.raw+`
|
|
33
|
+
`+o.join(`
|
|
34
|
+
`),b=this.blockquote(g);r[r.length-1]=b,i=i.substring(0,i.length-m.raw.length)+b.raw,a=a.substring(0,a.length-m.text.length)+b.text;break}else if(p?.type==="list"){const m=p,g=m.raw+`
|
|
35
|
+
`+o.join(`
|
|
36
|
+
`),b=this.list(g);r[r.length-1]=b,i=i.substring(0,i.length-p.raw.length)+b.raw,a=a.substring(0,a.length-m.raw.length)+b.raw,o=g.substring(r[r.length-1].raw.length).split(`
|
|
37
|
+
`);continue}}return{type:"blockquote",raw:i,tokens:r,text:a}}}list(t){let n=this.rules.block.list.exec(t);if(n){let o=n[1].trim();const i=o.length>1,a={type:"list",raw:"",ordered:i,start:i?+o.slice(0,-1):"",loose:!1,items:[]};o=i?`\\d{1,9}\\${o.slice(-1)}`:`\\${o}`,this.options.pedantic&&(o=i?o:"[*+-]");const r=new RegExp(`^( {0,3}${o})((?:[ ][^\\n]*)?(?:\\n|$))`);let s=!1;for(;t;){let l=!1,c="",d="";if(!(n=r.exec(t))||this.rules.block.hr.test(t))break;c=n[0],t=t.substring(c.length);let u=n[2].split(`
|
|
38
|
+
`,1)[0].replace(/^\t+/,v=>" ".repeat(3*v.length)),h=t.split(`
|
|
39
|
+
`,1)[0],p=!u.trim(),m=0;if(this.options.pedantic?(m=2,d=u.trimStart()):p?m=n[1].length+1:(m=n[2].search(/[^ ]/),m=m>4?1:m,d=u.slice(m),m+=n[1].length),p&&/^[ \t]*$/.test(h)&&(c+=h+`
|
|
40
|
+
`,t=t.substring(h.length+1),l=!0),!l){const v=new RegExp(`^ {0,${Math.min(3,m-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),y=new RegExp(`^ {0,${Math.min(3,m-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),w=new RegExp(`^ {0,${Math.min(3,m-1)}}(?:\`\`\`|~~~)`),C=new RegExp(`^ {0,${Math.min(3,m-1)}}#`),k=new RegExp(`^ {0,${Math.min(3,m-1)}}<(?:[a-z].*>|!--)`,"i");for(;t;){const O=t.split(`
|
|
41
|
+
`,1)[0];let P;if(h=O,this.options.pedantic?(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," "),P=h):P=h.replace(/\t/g," "),w.test(h)||C.test(h)||k.test(h)||v.test(h)||y.test(h))break;if(P.search(/[^ ]/)>=m||!h.trim())d+=`
|
|
42
|
+
`+P.slice(m);else{if(p||u.replace(/\t/g," ").search(/[^ ]/)>=4||w.test(u)||C.test(u)||y.test(u))break;d+=`
|
|
43
|
+
`+h}!p&&!h.trim()&&(p=!0),c+=O+`
|
|
44
|
+
`,t=t.substring(O.length+1),u=P.slice(m)}}a.loose||(s?a.loose=!0:/\n[ \t]*\n[ \t]*$/.test(c)&&(s=!0));let g=null,b;this.options.gfm&&(g=/^\[[ xX]\] /.exec(d),g&&(b=g[0]!=="[ ] ",d=d.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:c,task:!!g,checked:b,loose:!1,text:d,tokens:[]}),a.raw+=c}a.items[a.items.length-1].raw=a.items[a.items.length-1].raw.trimEnd(),a.items[a.items.length-1].text=a.items[a.items.length-1].text.trimEnd(),a.raw=a.raw.trimEnd();for(let l=0;l<a.items.length;l++)if(this.lexer.state.top=!1,a.items[l].tokens=this.lexer.blockTokens(a.items[l].text,[]),!a.loose){const c=a.items[l].tokens.filter(u=>u.type==="space"),d=c.length>0&&c.some(u=>/\n.*\n/.test(u.raw));a.loose=d}if(a.loose)for(let l=0;l<a.items.length;l++)a.items[l].loose=!0;return a}}html(t){const n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){const n=this.rules.block.def.exec(t);if(n){const o=n[1].toLowerCase().replace(/\s+/g," "),i=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:o,raw:n[0],href:i,title:a}}}table(t){const n=this.rules.block.table.exec(t);if(!n||!/[:|]/.test(n[2]))return;const o=Yy(n[1]),i=n[2].replace(/^\||\| *$/g,"").split("|"),a=n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(`
|
|
45
|
+
`):[],r={type:"table",raw:n[0],header:[],align:[],rows:[]};if(o.length===i.length){for(const s of i)/^ *-+: *$/.test(s)?r.align.push("right"):/^ *:-+: *$/.test(s)?r.align.push("center"):/^ *:-+ *$/.test(s)?r.align.push("left"):r.align.push(null);for(let s=0;s<o.length;s++)r.header.push({text:o[s],tokens:this.lexer.inline(o[s]),header:!0,align:r.align[s]});for(const s of a)r.rows.push(Yy(s,r.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:r.align[c]})));return r}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const o=n[1].charAt(n[1].length-1)===`
|
|
46
|
+
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:o,tokens:this.lexer.inline(o)}}}text(t){const n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:en(n[1])}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const o=n[2].trim();if(!this.options.pedantic&&/^</.test(o)){if(!/>$/.test(o))return;const r=Jr(o.slice(0,-1),"\\");if((o.length-r.length)%2===0)return}else{const r=YH(n[2],"()");if(r>-1){const l=(n[0].indexOf("!")===0?5:4)+n[1].length+r;n[2]=n[2].substring(0,r),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let i=n[2],a="";if(this.options.pedantic){const r=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);r&&(i=r[1],a=r[3])}else a=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(o)?i=i.slice(1):i=i.slice(1,-1)),Ky(n,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer)}}reflink(t,n){let o;if((o=this.rules.inline.reflink.exec(t))||(o=this.rules.inline.nolink.exec(t))){const i=(o[2]||o[1]).replace(/\s+/g," "),a=n[i.toLowerCase()];if(!a){const r=o[0].charAt(0);return{type:"text",raw:r,text:r}}return Ky(o,a,o[0],this.lexer)}}emStrong(t,n,o=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i||i[3]&&o.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!o||this.rules.inline.punctuation.exec(o)){const r=[...i[0]].length-1;let s,l,c=r,d=0;const u=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,n=n.slice(-1*t.length+r);(i=u.exec(n))!=null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(l=[...s].length,i[3]||i[4]){c+=l;continue}else if((i[5]||i[6])&&r%3&&!((r+l)%3)){d+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+d);const h=[...i[0]][0].length,p=t.slice(0,r+i.index+h+l);if(Math.min(r,l)%2){const g=p.slice(1,-1);return{type:"em",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}const m=p.slice(2,-2);return{type:"strong",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let o=n[2].replace(/\n/g," ");const i=/[^ ]/.test(o),a=/^ /.test(o)&&/ $/.test(o);return i&&a&&(o=o.substring(1,o.length-1)),o=en(o,!0),{type:"codespan",raw:n[0],text:o}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){const n=this.rules.inline.autolink.exec(t);if(n){let o,i;return n[2]==="@"?(o=en(n[1]),i="mailto:"+o):(o=en(n[1]),i=o),{type:"link",raw:n[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let o,i;if(n[2]==="@")o=en(n[0]),i="mailto:"+o;else{let a;do a=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??"";while(a!==n[0]);o=en(n[0]),n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){let o;return this.lexer.state.inRawBlock?o=n[0]:o=en(n[0]),{type:"text",raw:n[0],text:o}}}}const ZH=/^(?:[ \t]*(?:\n|$))+/,XH=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,JH=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,pl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,QH=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,$_=/(?:[*+-]|\d{1,9}[.)])/,S_=Fe(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,$_).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),pg=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ej=/^[^\n]+/,fg=/(?!\s*\])(?:\\.|[^\[\]\\])+/,tj=Fe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",fg).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),nj=Fe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,$_).getRegex(),vu="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",gg=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,oj=Fe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",gg).replace("tag",vu).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),E_=Fe(pg).replace("hr",pl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vu).getRegex(),ij=Fe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",E_).getRegex(),mg={blockquote:ij,code:XH,def:tj,fences:JH,heading:QH,hr:pl,html:oj,lheading:S_,list:nj,newline:ZH,paragraph:E_,table:Es,text:ej},Zy=Fe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",pl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vu).getRegex(),aj={...mg,table:Zy,paragraph:Fe(pg).replace("hr",pl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Zy).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vu).getRegex()},rj={...mg,html:Fe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",gg).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Es,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Fe(pg).replace("hr",pl).replace("heading",` *#{1,6} *[^
|
|
47
|
+
]`).replace("lheading",S_).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},O_=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,sj=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,T_=/^( {2,}|\\)\n(?!\s*$)/,lj=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,fl="\\p{P}\\p{S}",cj=Fe(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,fl).getRegex(),dj=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,uj=Fe(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,fl).getRegex(),hj=Fe("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,fl).getRegex(),pj=Fe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,fl).getRegex(),fj=Fe(/\\([punct])/,"gu").replace(/punct/g,fl).getRegex(),gj=Fe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),mj=Fe(gg).replace("(?:-->|$)","-->").getRegex(),vj=Fe("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",mj).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Id=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,bj=Fe(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Id).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),I_=Fe(/^!?\[(label)\]\[(ref)\]/).replace("label",Id).replace("ref",fg).getRegex(),P_=Fe(/^!?\[(ref)\](?:\[\])?/).replace("ref",fg).getRegex(),yj=Fe("reflink|nolink(?!\\()","g").replace("reflink",I_).replace("nolink",P_).getRegex(),vg={_backpedal:Es,anyPunctuation:fj,autolink:gj,blockSkip:dj,br:T_,code:sj,del:Es,emStrongLDelim:uj,emStrongRDelimAst:hj,emStrongRDelimUnd:pj,escape:O_,link:bj,nolink:P_,punctuation:cj,reflink:I_,reflinkSearch:yj,tag:vj,text:lj,url:Es},xj={...vg,link:Fe(/^!?\[(label)\]\((.*?)\)/).replace("label",Id).getRegex(),reflink:Fe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Id).getRegex()},Vp={...vg,escape:Fe(O_).replace("])","~|])").getRegex(),url:Fe(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},wj={...Vp,br:Fe(T_).replace("{2,}","*").getRegex(),text:Fe(Vp.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},cc={normal:mg,gfm:aj,pedantic:rj},Qr={normal:vg,gfm:Vp,breaks:wj,pedantic:xj};class _n{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||da,this.options.tokenizer=this.options.tokenizer||new Td,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:cc.normal,inline:Qr.normal};this.options.pedantic?(n.block=cc.pedantic,n.inline=Qr.pedantic):this.options.gfm&&(n.block=cc.gfm,this.options.breaks?n.inline=Qr.breaks:n.inline=Qr.gfm),this.tokenizer.rules=n}static get rules(){return{block:cc,inline:Qr}}static lex(t,n){return new _n(n).lex(t)}static lexInline(t,n){return new _n(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
|
|
48
|
+
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){const o=this.inlineQueue[n];this.inlineTokens(o.src,o.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],o=!1){this.options.pedantic&&(t=t.replace(/\t/g," ").replace(/^ +$/gm,""));let i,a,r;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(i=s.call({lexer:this},t,n))?(t=t.substring(i.raw.length),n.push(i),!0):!1))){if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length),i.raw.length===1&&n.length>0?n[n.length-1].raw+=`
|
|
49
|
+
`:n.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length),a=n[n.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=`
|
|
50
|
+
`+i.raw,a.text+=`
|
|
51
|
+
`+i.text,this.inlineQueue[this.inlineQueue.length-1].src=a.text):n.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length),a=n[n.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=`
|
|
52
|
+
`+i.raw,a.text+=`
|
|
53
|
+
`+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=a.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),n.push(i);continue}if(r=t,this.options.extensions&&this.options.extensions.startBlock){let s=1/0;const l=t.slice(1);let c;this.options.extensions.startBlock.forEach(d=>{c=d.call({lexer:this},l),typeof c=="number"&&c>=0&&(s=Math.min(s,c))}),s<1/0&&s>=0&&(r=t.substring(0,s+1))}if(this.state.top&&(i=this.tokenizer.paragraph(r))){a=n[n.length-1],o&&a?.type==="paragraph"?(a.raw+=`
|
|
54
|
+
`+i.raw,a.text+=`
|
|
55
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):n.push(i),o=r.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length),a=n[n.length-1],a&&a.type==="text"?(a.raw+=`
|
|
56
|
+
`+i.raw,a.text+=`
|
|
57
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):n.push(i);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let o,i,a,r=t,s,l,c;if(this.tokens.links){const d=Object.keys(this.tokens.links);if(d.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)d.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,s.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(l||(c=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(d=>(o=d.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))){if(o=this.tokenizer.escape(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(t)){t=t.substring(o.raw.length),i=n[n.length-1],i&&o.type==="text"&&i.type==="text"?(i.raw+=o.raw,i.text+=o.text):n.push(o);continue}if(o=this.tokenizer.link(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(o.raw.length),i=n[n.length-1],i&&o.type==="text"&&i.type==="text"?(i.raw+=o.raw,i.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(t,r,c)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(t)){t=t.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(t))){t=t.substring(o.raw.length),n.push(o);continue}if(a=t,this.options.extensions&&this.options.extensions.startInline){let d=1/0;const u=t.slice(1);let h;this.options.extensions.startInline.forEach(p=>{h=p.call({lexer:this},u),typeof h=="number"&&h>=0&&(d=Math.min(d,h))}),d<1/0&&d>=0&&(a=t.substring(0,d+1))}if(o=this.tokenizer.inlineText(a)){t=t.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(c=o.raw.slice(-1)),l=!0,i=n[n.length-1],i&&i.type==="text"?(i.raw+=o.raw,i.text+=o.text):n.push(o);continue}if(t){const d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return n}}class Us{options;parser;constructor(t){this.options=t||da}space(t){return""}code({text:t,lang:n,escaped:o}){const i=(n||"").match(/^\S*/)?.[0],a=t.replace(/\n$/,"")+`
|
|
58
|
+
`;return i?'<pre><code class="language-'+en(i)+'">'+(o?a:en(a,!0))+`</code></pre>
|
|
59
|
+
`:"<pre><code>"+(o?a:en(a,!0))+`</code></pre>
|
|
60
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
61
|
+
${this.parser.parse(t)}</blockquote>
|
|
62
|
+
`}html({text:t}){return t}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
|
|
63
|
+
`}hr(t){return`<hr>
|
|
64
|
+
`}list(t){const n=t.ordered,o=t.start;let i="";for(let s=0;s<t.items.length;s++){const l=t.items[s];i+=this.listitem(l)}const a=n?"ol":"ul",r=n&&o!==1?' start="'+o+'"':"";return"<"+a+r+`>
|
|
65
|
+
`+i+"</"+a+`>
|
|
66
|
+
`}listitem(t){let n="";if(t.task){const o=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&t.tokens[0].type==="paragraph"?(t.tokens[0].text=o+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=o+" "+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:"text",raw:o+" ",text:o+" "}):n+=o+" "}return n+=this.parser.parse(t.tokens,!!t.loose),`<li>${n}</li>
|
|
67
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
68
|
+
`}table(t){let n="",o="";for(let a=0;a<t.header.length;a++)o+=this.tablecell(t.header[a]);n+=this.tablerow({text:o});let i="";for(let a=0;a<t.rows.length;a++){const r=t.rows[a];o="";for(let s=0;s<r.length;s++)o+=this.tablecell(r[s]);i+=this.tablerow({text:o})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
69
|
+
<thead>
|
|
70
|
+
`+n+`</thead>
|
|
71
|
+
`+i+`</table>
|
|
72
|
+
`}tablerow({text:t}){return`<tr>
|
|
73
|
+
${t}</tr>
|
|
74
|
+
`}tablecell(t){const n=this.parser.parseInline(t.tokens),o=t.header?"th":"td";return(t.align?`<${o} align="${t.align}">`:`<${o}>`)+n+`</${o}>
|
|
75
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${t}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:o}){const i=this.parser.parseInline(o),a=qy(t);if(a===null)return i;t=a;let r='<a href="'+t+'"';return n&&(r+=' title="'+n+'"'),r+=">"+i+"</a>",r}image({href:t,title:n,text:o}){const i=qy(t);if(i===null)return o;t=i;let a=`<img src="${t}" alt="${o}"`;return n&&(a+=` title="${n}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):t.text}}class bg{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}}class kn{options;renderer;textRenderer;constructor(t){this.options=t||da,this.options.renderer=this.options.renderer||new Us,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new bg}static parse(t,n){return new kn(n).parse(t)}static parseInline(t,n){return new kn(n).parseInline(t)}parse(t,n=!0){let o="";for(let i=0;i<t.length;i++){const a=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){const s=a,l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(s.type)){o+=l||"";continue}}const r=a;switch(r.type){case"space":{o+=this.renderer.space(r);continue}case"hr":{o+=this.renderer.hr(r);continue}case"heading":{o+=this.renderer.heading(r);continue}case"code":{o+=this.renderer.code(r);continue}case"table":{o+=this.renderer.table(r);continue}case"blockquote":{o+=this.renderer.blockquote(r);continue}case"list":{o+=this.renderer.list(r);continue}case"html":{o+=this.renderer.html(r);continue}case"paragraph":{o+=this.renderer.paragraph(r);continue}case"text":{let s=r,l=this.renderer.text(s);for(;i+1<t.length&&t[i+1].type==="text";)s=t[++i],l+=`
|
|
76
|
+
`+this.renderer.text(s);n?o+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l}]}):o+=l;continue}default:{const s='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return o}parseInline(t,n){n=n||this.renderer;let o="";for(let i=0;i<t.length;i++){const a=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){const s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){o+=s||"";continue}}const r=a;switch(r.type){case"escape":{o+=n.text(r);break}case"html":{o+=n.html(r);break}case"link":{o+=n.link(r);break}case"image":{o+=n.image(r);break}case"strong":{o+=n.strong(r);break}case"em":{o+=n.em(r);break}case"codespan":{o+=n.codespan(r);break}case"br":{o+=n.br(r);break}case"del":{o+=n.del(r);break}case"text":{o+=n.text(r);break}default:{const s='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return o}}class Uc{options;block;constructor(t){this.options=t||da}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?_n.lex:_n.lexInline}provideParser(){return this.block?kn.parse:kn.parseInline}}class Cj{defaults=hg();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=kn;Renderer=Us;TextRenderer=bg;Lexer=_n;Tokenizer=Td;Hooks=Uc;constructor(...t){this.use(...t)}walkTokens(t,n){let o=[];for(const i of t)switch(o=o.concat(n.call(this,i)),i.type){case"table":{const a=i;for(const r of a.header)o=o.concat(this.walkTokens(r.tokens,n));for(const r of a.rows)for(const s of r)o=o.concat(this.walkTokens(s.tokens,n));break}case"list":{const a=i;o=o.concat(this.walkTokens(a.items,n));break}default:{const a=i;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(r=>{const s=a[r].flat(1/0);o=o.concat(this.walkTokens(s,n))}):a.tokens&&(o=o.concat(this.walkTokens(a.tokens,n)))}}return o}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(o=>{const i={...o};if(i.async=this.defaults.async||i.async||!1,o.extensions&&(o.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const r=n.renderers[a.name];r?n.renderers[a.name]=function(...s){let l=a.renderer.apply(this,s);return l===!1&&(l=r.apply(this,s)),l}:n.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const r=n[a.level];r?r.unshift(a.tokenizer):n[a.level]=[a.tokenizer],a.start&&(a.level==="block"?n.startBlock?n.startBlock.push(a.start):n.startBlock=[a.start]:a.level==="inline"&&(n.startInline?n.startInline.push(a.start):n.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(n.childTokens[a.name]=a.childTokens)}),i.extensions=n),o.renderer){const a=this.defaults.renderer||new Us(this.defaults);for(const r in o.renderer){if(!(r in a))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const s=r,l=o.renderer[s],c=a[s];a[s]=(...d)=>{let u=l.apply(a,d);return u===!1&&(u=c.apply(a,d)),u||""}}i.renderer=a}if(o.tokenizer){const a=this.defaults.tokenizer||new Td(this.defaults);for(const r in o.tokenizer){if(!(r in a))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const s=r,l=o.tokenizer[s],c=a[s];a[s]=(...d)=>{let u=l.apply(a,d);return u===!1&&(u=c.apply(a,d)),u}}i.tokenizer=a}if(o.hooks){const a=this.defaults.hooks||new Uc;for(const r in o.hooks){if(!(r in a))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;const s=r,l=o.hooks[s],c=a[s];Uc.passThroughHooks.has(r)?a[s]=d=>{if(this.defaults.async)return Promise.resolve(l.call(a,d)).then(h=>c.call(a,h));const u=l.call(a,d);return c.call(a,u)}:a[s]=(...d)=>{let u=l.apply(a,d);return u===!1&&(u=c.apply(a,d)),u}}i.hooks=a}if(o.walkTokens){const a=this.defaults.walkTokens,r=o.walkTokens;i.walkTokens=function(s){let l=[];return l.push(r.call(this,s)),a&&(l=l.concat(a.call(this,s))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return _n.lex(t,n??this.defaults)}parser(t,n){return kn.parse(t,n??this.defaults)}parseMarkdown(t){return(o,i)=>{const a={...i},r={...this.defaults,...a},s=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&a.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof o>"u"||o===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof o!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(o)+", string expected"));r.hooks&&(r.hooks.options=r,r.hooks.block=t);const l=r.hooks?r.hooks.provideLexer():t?_n.lex:_n.lexInline,c=r.hooks?r.hooks.provideParser():t?kn.parse:kn.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(o):o).then(d=>l(d,r)).then(d=>r.hooks?r.hooks.processAllTokens(d):d).then(d=>r.walkTokens?Promise.all(this.walkTokens(d,r.walkTokens)).then(()=>d):d).then(d=>c(d,r)).then(d=>r.hooks?r.hooks.postprocess(d):d).catch(s);try{r.hooks&&(o=r.hooks.preprocess(o));let d=l(o,r);r.hooks&&(d=r.hooks.processAllTokens(d)),r.walkTokens&&this.walkTokens(d,r.walkTokens);let u=c(d,r);return r.hooks&&(u=r.hooks.postprocess(u)),u}catch(d){return s(d)}}}onError(t,n){return o=>{if(o.message+=`
|
|
77
|
+
Please report this to https://github.com/markedjs/marked.`,t){const i="<p>An error occurred:</p><pre>"+en(o.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(o);throw o}}}const ta=new Cj;function Me(e,t){return ta.parse(e,t)}Me.options=Me.setOptions=function(e){return ta.setOptions(e),Me.defaults=ta.defaults,C_(Me.defaults),Me};Me.getDefaults=hg;Me.defaults=da;Me.use=function(...e){return ta.use(...e),Me.defaults=ta.defaults,C_(Me.defaults),Me};Me.walkTokens=function(e,t){return ta.walkTokens(e,t)};Me.parseInline=ta.parseInline;Me.Parser=kn;Me.parser=kn.parse;Me.Renderer=Us;Me.TextRenderer=bg;Me.Lexer=_n;Me.lexer=_n.lex;Me.Tokenizer=Td;Me.Hooks=Uc;Me.parse=Me;Me.options;Me.setOptions;Me.use;Me.walkTokens;Me.parseInline;kn.parse;_n.lex;const{entries:D_,setPrototypeOf:Xy,isFrozen:_j,getPrototypeOf:kj,getOwnPropertyDescriptor:$j}=Object;let{freeze:Vt,seal:Sn,create:Aa}=Object,{apply:Mp,construct:Np}=typeof Reflect<"u"&&Reflect;Vt||(Vt=function(t){return t});Sn||(Sn=function(t){return t});Mp||(Mp=function(t,n){for(var o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];return t.apply(n,i)});Np||(Np=function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return new t(...o)});const es=ot(Array.prototype.forEach),Sj=ot(Array.prototype.lastIndexOf),Jy=ot(Array.prototype.pop),ts=ot(Array.prototype.push),Ej=ot(Array.prototype.splice),Pt=Array.isArray,us=ot(String.prototype.toLowerCase),$h=ot(String.prototype.toString),Qy=ot(String.prototype.match),ka=ot(String.prototype.replace),e0=ot(String.prototype.indexOf),Oj=ot(String.prototype.trim),Tj=ot(Number.prototype.toString),Ij=ot(Boolean.prototype.toString),t0=typeof BigInt>"u"?null:ot(BigInt.prototype.toString),n0=typeof Symbol>"u"?null:ot(Symbol.prototype.toString),Xe=ot(Object.prototype.hasOwnProperty),ns=ot(Object.prototype.toString),vt=ot(RegExp.prototype.test),dc=Pj(TypeError);function ot(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return Mp(e,t,o)}}function Pj(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Np(e,n)}}function _e(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:us;if(Xy&&Xy(e,null),!Pt(t))return e;let o=t.length;for(;o--;){let i=t[o];if(typeof i=="string"){const a=n(i);a!==i&&(_j(t)||(t[o]=a),i=a)}e[i]=!0}return e}function Dj(e){for(let t=0;t<e.length;t++)Xe(e,t)||(e[t]=null);return e}function zt(e){const t=Aa(null);for(const[n,o]of D_(e))Xe(e,n)&&(Pt(o)?t[n]=Dj(o):o&&typeof o=="object"&&o.constructor===Object?t[n]=zt(o):t[n]=o);return t}function Aj(e){switch(typeof e){case"string":return e;case"number":return Tj(e);case"boolean":return Ij(e);case"bigint":return t0?t0(e):"0";case"symbol":return n0?n0(e):"Symbol()";case"undefined":return ns(e);case"function":case"object":{if(e===null)return ns(e);const t=e,n=Ra(t,"toString");if(typeof n=="function"){const o=n(t);return typeof o=="string"?o:ns(o)}return ns(e)}default:return ns(e)}}function Ra(e,t){for(;e!==null;){const o=$j(e,t);if(o){if(o.get)return ot(o.get);if(typeof o.value=="function")return ot(o.value)}e=kj(e)}function n(){return null}return n}function Rj(e){try{return vt(e,""),!0}catch{return!1}}const o0=Vt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Sh=Vt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Eh=Vt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Vj=Vt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Oh=Vt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Mj=Vt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),i0=Vt(["#text"]),a0=Vt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Th=Vt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),r0=Vt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),uc=Vt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Nj=Sn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Lj=Sn(/<%[\w\W]*|[\w\W]*%>/gm),Fj=Sn(/\$\{[\w\W]*/gm),Bj=Sn(/^data-[\-\w.\u00B7-\uFFFF]+$/),zj=Sn(/^aria-[\-\w]+$/),A_=Sn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Hj=Sn(/^(?:\w+script|data):/i),jj=Sn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),R_=Sn(/^html$/i),Wj=Sn(/^[a-z][.\w]*(-[.\w]+)+$/i);var s0=Object.freeze({__proto__:null,ARIA_ATTR:zj,ATTR_WHITESPACE:jj,CUSTOM_ELEMENT:Wj,DATA_ATTR:Bj,DOCTYPE_NAME:R_,ERB_EXPR:Lj,IS_ALLOWED_URI:A_,IS_SCRIPT_OR_DATA:Hj,MUSTACHE_EXPR:Nj,TMPLIT_EXPR:Fj});const os={element:1,text:3,progressingInstruction:7,comment:8,document:9},Uj=function(){return typeof window>"u"?null:window},Gj=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(o=n.getAttribute(i));const a="dompurify"+(o?"#"+o:"");try{return t.createPolicy(a,{createHTML(r){return r},createScriptURL(r){return r}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},l0=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function V_(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Uj();const t=ve=>V_(ve);if(t.version="3.4.1",t.removed=[],!e||!e.document||e.document.nodeType!==os.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const o=n,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:r,Node:s,Element:l,NodeFilter:c,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:h,trustedTypes:p}=e,m=l.prototype,g=Ra(m,"cloneNode"),b=Ra(m,"remove"),v=Ra(m,"nextSibling"),y=Ra(m,"childNodes"),w=Ra(m,"parentNode");if(typeof r=="function"){const ve=n.createElement("template");ve.content&&ve.content.ownerDocument&&(n=ve.content.ownerDocument)}let C,k="";const{implementation:O,createNodeIterator:P,createDocumentFragment:S,getElementsByTagName:V}=n,{importNode:H}=o;let A=l0();t.isSupported=typeof D_=="function"&&typeof w=="function"&&O&&O.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:G,ERB_EXPR:te,TMPLIT_EXPR:j,DATA_ATTR:U,ARIA_ATTR:q,IS_SCRIPT_OR_DATA:oe,ATTR_WHITESPACE:ne,CUSTOM_ELEMENT:le}=s0;let{IS_ALLOWED_URI:he}=s0,de=null;const Ce=_e({},[...o0,...Sh,...Eh,...Oh,...i0]);let me=null;const Oe=_e({},[...a0,...Th,...r0,...uc]);let B=Object.seal(Aa(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),W=null,Z=null;const re=Object.seal(Aa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ye=!0,ke=!0,Te=!1,it=!0,J=!1,ce=!0,se=!1,xe=!1,Ze=!1,Ct=!1,Ot=!1,Dn=!1,No=!0,ml=!1;const _g="user-content-";let yu=!0,yr=!1,ua={},jn=null;const xu=_e({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let kg=null;const $g=_e({},["audio","video","img","source","image","track"]);let wu=null;const Sg=_e({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),vl="http://www.w3.org/1998/Math/MathML",bl="http://www.w3.org/2000/svg",Wn="http://www.w3.org/1999/xhtml";let ha=Wn,Cu=!1,_u=null;const tk=_e({},[vl,bl,Wn],$h);let ku=_e({},["mi","mo","mn","ms","mtext"]),$u=_e({},["annotation-xml"]);const nk=_e({},["title","style","font","a","script"]);let xr=null;const ok=["application/xhtml+xml","text/html"],ik="text/html";let at=null,pa=null;const ak=n.createElement("form"),Eg=function(I){return I instanceof RegExp||I instanceof Function},Su=function(){let I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(pa&&pa===I)return;(!I||typeof I!="object")&&(I={}),I=zt(I),xr=ok.indexOf(I.PARSER_MEDIA_TYPE)===-1?ik:I.PARSER_MEDIA_TYPE,at=xr==="application/xhtml+xml"?$h:us,de=Xe(I,"ALLOWED_TAGS")&&Pt(I.ALLOWED_TAGS)?_e({},I.ALLOWED_TAGS,at):Ce,me=Xe(I,"ALLOWED_ATTR")&&Pt(I.ALLOWED_ATTR)?_e({},I.ALLOWED_ATTR,at):Oe,_u=Xe(I,"ALLOWED_NAMESPACES")&&Pt(I.ALLOWED_NAMESPACES)?_e({},I.ALLOWED_NAMESPACES,$h):tk,wu=Xe(I,"ADD_URI_SAFE_ATTR")&&Pt(I.ADD_URI_SAFE_ATTR)?_e(zt(Sg),I.ADD_URI_SAFE_ATTR,at):Sg,kg=Xe(I,"ADD_DATA_URI_TAGS")&&Pt(I.ADD_DATA_URI_TAGS)?_e(zt($g),I.ADD_DATA_URI_TAGS,at):$g,jn=Xe(I,"FORBID_CONTENTS")&&Pt(I.FORBID_CONTENTS)?_e({},I.FORBID_CONTENTS,at):xu,W=Xe(I,"FORBID_TAGS")&&Pt(I.FORBID_TAGS)?_e({},I.FORBID_TAGS,at):zt({}),Z=Xe(I,"FORBID_ATTR")&&Pt(I.FORBID_ATTR)?_e({},I.FORBID_ATTR,at):zt({}),ua=Xe(I,"USE_PROFILES")?I.USE_PROFILES&&typeof I.USE_PROFILES=="object"?zt(I.USE_PROFILES):I.USE_PROFILES:!1,ye=I.ALLOW_ARIA_ATTR!==!1,ke=I.ALLOW_DATA_ATTR!==!1,Te=I.ALLOW_UNKNOWN_PROTOCOLS||!1,it=I.ALLOW_SELF_CLOSE_IN_ATTR!==!1,J=I.SAFE_FOR_TEMPLATES||!1,ce=I.SAFE_FOR_XML!==!1,se=I.WHOLE_DOCUMENT||!1,Ct=I.RETURN_DOM||!1,Ot=I.RETURN_DOM_FRAGMENT||!1,Dn=I.RETURN_TRUSTED_TYPE||!1,Ze=I.FORCE_BODY||!1,No=I.SANITIZE_DOM!==!1,ml=I.SANITIZE_NAMED_PROPS||!1,yu=I.KEEP_CONTENT!==!1,yr=I.IN_PLACE||!1,he=Rj(I.ALLOWED_URI_REGEXP)?I.ALLOWED_URI_REGEXP:A_,ha=typeof I.NAMESPACE=="string"?I.NAMESPACE:Wn,ku=Xe(I,"MATHML_TEXT_INTEGRATION_POINTS")&&I.MATHML_TEXT_INTEGRATION_POINTS&&typeof I.MATHML_TEXT_INTEGRATION_POINTS=="object"?zt(I.MATHML_TEXT_INTEGRATION_POINTS):_e({},["mi","mo","mn","ms","mtext"]),$u=Xe(I,"HTML_INTEGRATION_POINTS")&&I.HTML_INTEGRATION_POINTS&&typeof I.HTML_INTEGRATION_POINTS=="object"?zt(I.HTML_INTEGRATION_POINTS):_e({},["annotation-xml"]);const ee=Xe(I,"CUSTOM_ELEMENT_HANDLING")&&I.CUSTOM_ELEMENT_HANDLING&&typeof I.CUSTOM_ELEMENT_HANDLING=="object"?zt(I.CUSTOM_ELEMENT_HANDLING):Aa(null);if(B=Aa(null),Xe(ee,"tagNameCheck")&&Eg(ee.tagNameCheck)&&(B.tagNameCheck=ee.tagNameCheck),Xe(ee,"attributeNameCheck")&&Eg(ee.attributeNameCheck)&&(B.attributeNameCheck=ee.attributeNameCheck),Xe(ee,"allowCustomizedBuiltInElements")&&typeof ee.allowCustomizedBuiltInElements=="boolean"&&(B.allowCustomizedBuiltInElements=ee.allowCustomizedBuiltInElements),J&&(ke=!1),Ot&&(Ct=!0),ua&&(de=_e({},i0),me=Aa(null),ua.html===!0&&(_e(de,o0),_e(me,a0)),ua.svg===!0&&(_e(de,Sh),_e(me,Th),_e(me,uc)),ua.svgFilters===!0&&(_e(de,Eh),_e(me,Th),_e(me,uc)),ua.mathMl===!0&&(_e(de,Oh),_e(me,r0),_e(me,uc))),re.tagCheck=null,re.attributeCheck=null,Xe(I,"ADD_TAGS")&&(typeof I.ADD_TAGS=="function"?re.tagCheck=I.ADD_TAGS:Pt(I.ADD_TAGS)&&(de===Ce&&(de=zt(de)),_e(de,I.ADD_TAGS,at))),Xe(I,"ADD_ATTR")&&(typeof I.ADD_ATTR=="function"?re.attributeCheck=I.ADD_ATTR:Pt(I.ADD_ATTR)&&(me===Oe&&(me=zt(me)),_e(me,I.ADD_ATTR,at))),Xe(I,"ADD_URI_SAFE_ATTR")&&Pt(I.ADD_URI_SAFE_ATTR)&&_e(wu,I.ADD_URI_SAFE_ATTR,at),Xe(I,"FORBID_CONTENTS")&&Pt(I.FORBID_CONTENTS)&&(jn===xu&&(jn=zt(jn)),_e(jn,I.FORBID_CONTENTS,at)),Xe(I,"ADD_FORBID_CONTENTS")&&Pt(I.ADD_FORBID_CONTENTS)&&(jn===xu&&(jn=zt(jn)),_e(jn,I.ADD_FORBID_CONTENTS,at)),yu&&(de["#text"]=!0),se&&_e(de,["html","head","body"]),de.table&&(_e(de,["tbody"]),delete W.tbody),I.TRUSTED_TYPES_POLICY){if(typeof I.TRUSTED_TYPES_POLICY.createHTML!="function")throw dc('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof I.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw dc('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=I.TRUSTED_TYPES_POLICY,k=C.createHTML("")}else C===void 0&&(C=Gj(p,i)),C!==null&&typeof k=="string"&&(k=C.createHTML(""));Vt&&Vt(I),pa=I},Og=_e({},[...Sh,...Eh,...Vj]),Tg=_e({},[...Oh,...Mj]),rk=function(I){let ee=w(I);(!ee||!ee.tagName)&&(ee={namespaceURI:ha,tagName:"template"});const pe=us(I.tagName),We=us(ee.tagName);return _u[I.namespaceURI]?I.namespaceURI===bl?ee.namespaceURI===Wn?pe==="svg":ee.namespaceURI===vl?pe==="svg"&&(We==="annotation-xml"||ku[We]):!!Og[pe]:I.namespaceURI===vl?ee.namespaceURI===Wn?pe==="math":ee.namespaceURI===bl?pe==="math"&&$u[We]:!!Tg[pe]:I.namespaceURI===Wn?ee.namespaceURI===bl&&!$u[We]||ee.namespaceURI===vl&&!ku[We]?!1:!Tg[pe]&&(nk[pe]||!Og[pe]):!!(xr==="application/xhtml+xml"&&_u[I.namespaceURI]):!1},An=function(I){ts(t.removed,{element:I});try{w(I).removeChild(I)}catch{b(I)}},yi=function(I,ee){try{ts(t.removed,{attribute:ee.getAttributeNode(I),from:ee})}catch{ts(t.removed,{attribute:null,from:ee})}if(ee.removeAttribute(I),I==="is")if(Ct||Ot)try{An(ee)}catch{}else try{ee.setAttribute(I,"")}catch{}},Ig=function(I){let ee=null,pe=null;if(Ze)I="<remove></remove>"+I;else{const tt=Qy(I,/^[\r\n\t ]+/);pe=tt&&tt[0]}xr==="application/xhtml+xml"&&ha===Wn&&(I='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+I+"</body></html>");const We=C?C.createHTML(I):I;if(ha===Wn)try{ee=new h().parseFromString(We,xr)}catch{}if(!ee||!ee.documentElement){ee=O.createDocument(ha,"template",null);try{ee.documentElement.innerHTML=Cu?k:We}catch{}}const _t=ee.body||ee.documentElement;return I&&pe&&_t.insertBefore(n.createTextNode(pe),_t.childNodes[0]||null),ha===Wn?V.call(ee,se?"html":"body")[0]:se?ee.documentElement:_t},Pg=function(I){return P.call(I.ownerDocument||I,I,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Eu=function(I){return I instanceof u&&(typeof I.nodeName!="string"||typeof I.textContent!="string"||typeof I.removeChild!="function"||!(I.attributes instanceof d)||typeof I.removeAttribute!="function"||typeof I.setAttribute!="function"||typeof I.namespaceURI!="string"||typeof I.insertBefore!="function"||typeof I.hasChildNodes!="function")},Ou=function(I){return typeof s=="function"&&I instanceof s};function co(ve,I,ee){es(ve,pe=>{pe.call(t,I,ee,pa)})}const Dg=function(I){let ee=null;if(co(A.beforeSanitizeElements,I,null),Eu(I))return An(I),!0;const pe=at(I.nodeName);if(co(A.uponSanitizeElement,I,{tagName:pe,allowedTags:de}),ce&&I.hasChildNodes()&&!Ou(I.firstElementChild)&&vt(/<[/\w!]/g,I.innerHTML)&&vt(/<[/\w!]/g,I.textContent)||ce&&I.namespaceURI===Wn&&pe==="style"&&Ou(I.firstElementChild)||I.nodeType===os.progressingInstruction||ce&&I.nodeType===os.comment&&vt(/<[/\w]/g,I.data))return An(I),!0;if(W[pe]||!(re.tagCheck instanceof Function&&re.tagCheck(pe))&&!de[pe]){if(!W[pe]&&Rg(pe)&&(B.tagNameCheck instanceof RegExp&&vt(B.tagNameCheck,pe)||B.tagNameCheck instanceof Function&&B.tagNameCheck(pe)))return!1;if(yu&&!jn[pe]){const We=w(I)||I.parentNode,_t=y(I)||I.childNodes;if(_t&&We){const tt=_t.length;for(let Ft=tt-1;Ft>=0;--Ft){const gn=g(_t[Ft],!0);We.insertBefore(gn,v(I))}}}return An(I),!0}return I instanceof l&&!rk(I)||(pe==="noscript"||pe==="noembed"||pe==="noframes")&&vt(/<\/no(script|embed|frames)/i,I.innerHTML)?(An(I),!0):(J&&I.nodeType===os.text&&(ee=I.textContent,es([G,te,j],We=>{ee=ka(ee,We," ")}),I.textContent!==ee&&(ts(t.removed,{element:I.cloneNode()}),I.textContent=ee)),co(A.afterSanitizeElements,I,null),!1)},Ag=function(I,ee,pe){if(Z[ee]||No&&(ee==="id"||ee==="name")&&(pe in n||pe in ak))return!1;if(!(ke&&!Z[ee]&&vt(U,ee))){if(!(ye&&vt(q,ee))){if(!(re.attributeCheck instanceof Function&&re.attributeCheck(ee,I))){if(!me[ee]||Z[ee]){if(!(Rg(I)&&(B.tagNameCheck instanceof RegExp&&vt(B.tagNameCheck,I)||B.tagNameCheck instanceof Function&&B.tagNameCheck(I))&&(B.attributeNameCheck instanceof RegExp&&vt(B.attributeNameCheck,ee)||B.attributeNameCheck instanceof Function&&B.attributeNameCheck(ee,I))||ee==="is"&&B.allowCustomizedBuiltInElements&&(B.tagNameCheck instanceof RegExp&&vt(B.tagNameCheck,pe)||B.tagNameCheck instanceof Function&&B.tagNameCheck(pe))))return!1}else if(!wu[ee]){if(!vt(he,ka(pe,ne,""))){if(!((ee==="src"||ee==="xlink:href"||ee==="href")&&I!=="script"&&e0(pe,"data:")===0&&kg[I])){if(!(Te&&!vt(oe,ka(pe,ne,"")))){if(pe)return!1}}}}}}}return!0},sk=_e({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Rg=function(I){return!sk[us(I)]&&vt(le,I)},Vg=function(I){co(A.beforeSanitizeAttributes,I,null);const{attributes:ee}=I;if(!ee||Eu(I))return;const pe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:me,forceKeepAttr:void 0};let We=ee.length;for(;We--;){const _t=ee[We],{name:tt,namespaceURI:Ft,value:gn}=_t,Rn=at(tt),Tu=gn;let dt=tt==="value"?Tu:Oj(Tu);if(pe.attrName=Rn,pe.attrValue=dt,pe.keepAttr=!0,pe.forceKeepAttr=void 0,co(A.uponSanitizeAttribute,I,pe),dt=pe.attrValue,ml&&(Rn==="id"||Rn==="name")&&e0(dt,_g)!==0&&(yi(tt,I),dt=_g+dt),ce&&vt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,dt)){yi(tt,I);continue}if(Rn==="attributename"&&Qy(dt,"href")){yi(tt,I);continue}if(pe.forceKeepAttr)continue;if(!pe.keepAttr){yi(tt,I);continue}if(!it&&vt(/\/>/i,dt)){yi(tt,I);continue}J&&es([G,te,j],Lg=>{dt=ka(dt,Lg," ")});const Ng=at(I.nodeName);if(!Ag(Ng,Rn,dt)){yi(tt,I);continue}if(C&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Ft)switch(p.getAttributeType(Ng,Rn)){case"TrustedHTML":{dt=C.createHTML(dt);break}case"TrustedScriptURL":{dt=C.createScriptURL(dt);break}}if(dt!==Tu)try{Ft?I.setAttributeNS(Ft,tt,dt):I.setAttribute(tt,dt),Eu(I)?An(I):Jy(t.removed)}catch{yi(tt,I)}}co(A.afterSanitizeAttributes,I,null)},Mg=function(I){let ee=null;const pe=Pg(I);for(co(A.beforeSanitizeShadowDOM,I,null);ee=pe.nextNode();)co(A.uponSanitizeShadowNode,ee,null),Dg(ee),Vg(ee),ee.content instanceof a&&Mg(ee.content);co(A.afterSanitizeShadowDOM,I,null)};return t.sanitize=function(ve){let I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ee=null,pe=null,We=null,_t=null;if(Cu=!ve,Cu&&(ve="<!-->"),typeof ve!="string"&&!Ou(ve)&&(ve=Aj(ve),typeof ve!="string"))throw dc("dirty is not a string, aborting");if(!t.isSupported)return ve;if(xe||Su(I),t.removed=[],typeof ve=="string"&&(yr=!1),yr){const gn=ve.nodeName;if(typeof gn=="string"){const Rn=at(gn);if(!de[Rn]||W[Rn])throw dc("root node is forbidden and cannot be sanitized in-place")}}else if(ve instanceof s)ee=Ig("<!---->"),pe=ee.ownerDocument.importNode(ve,!0),pe.nodeType===os.element&&pe.nodeName==="BODY"||pe.nodeName==="HTML"?ee=pe:ee.appendChild(pe);else{if(!Ct&&!J&&!se&&ve.indexOf("<")===-1)return C&&Dn?C.createHTML(ve):ve;if(ee=Ig(ve),!ee)return Ct?null:Dn?k:""}ee&&Ze&&An(ee.firstChild);const tt=Pg(yr?ve:ee);for(;We=tt.nextNode();)Dg(We),Vg(We),We.content instanceof a&&Mg(We.content);if(yr)return ve;if(Ct){if(J){ee.normalize();let gn=ee.innerHTML;es([G,te,j],Rn=>{gn=ka(gn,Rn," ")}),ee.innerHTML=gn}if(Ot)for(_t=S.call(ee.ownerDocument);ee.firstChild;)_t.appendChild(ee.firstChild);else _t=ee;return(me.shadowroot||me.shadowrootmode)&&(_t=H.call(o,_t,!0)),_t}let Ft=se?ee.outerHTML:ee.innerHTML;return se&&de["!doctype"]&&ee.ownerDocument&&ee.ownerDocument.doctype&&ee.ownerDocument.doctype.name&&vt(R_,ee.ownerDocument.doctype.name)&&(Ft="<!DOCTYPE "+ee.ownerDocument.doctype.name+`>
|
|
78
|
+
`+Ft),J&&es([G,te,j],gn=>{Ft=ka(Ft,gn," ")}),C&&Dn?C.createHTML(Ft):Ft},t.setConfig=function(){let ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Su(ve),xe=!0},t.clearConfig=function(){pa=null,xe=!1},t.isValidAttribute=function(ve,I,ee){pa||Su({});const pe=at(ve),We=at(I);return Ag(pe,We,ee)},t.addHook=function(ve,I){typeof I=="function"&&ts(A[ve],I)},t.removeHook=function(ve,I){if(I!==void 0){const ee=Sj(A[ve],I);return ee===-1?void 0:Ej(A[ve],ee,1)[0]}return Jy(A[ve])},t.removeHooks=function(ve){A[ve]=[]},t.removeAllHooks=function(){A=l0()},t}var qj=V_();const Yj={class:"flex items-start gap-2"},Kj=["innerHTML"],Zj=["href"],Xj=T({name:"InfoBannerWidget",__name:"InfoBanner",props:{property:{}},setup(e){const t=E(()=>e.property?.ui);function n(d){return d.replaceAll("&","&").replaceAll('"',""").replaceAll("'","'").replaceAll("<","<").replaceAll(">",">")}const o=["http:","https:","mailto:"];function i(d){if(!d)return null;if(d.startsWith("/")||d.startsWith("./")||d.startsWith("../")||d.startsWith("#"))return d;try{const u=new URL(d,"http://localhost");return o.includes(u.protocol)?d:null}catch{return null}}class a extends Us{link({tokens:u,href:h,title:p}){const m=this.parser.parseInline(u),g=i(h);if(!g)return m;const b=typeof location<"u"&&g.startsWith(`${location.protocol}//${location.hostname}`),v=n(g),y=p?` title="${n(p)}"`:"";return`<a href="${v}"${y}${b?"":' target="_blank" rel="noreferrer noopener nofollow"'}>${m}</a>`}}const r=new a,s=E(()=>qj.sanitize(Me(t.value?.content??"",{renderer:r}))),l=E(()=>t.value?.type??"info"),c=E(()=>{switch(l.value){case"warning":return xz;case"error":return gz;case"prerequisites":return vz;default:return Ip}});return(d,u)=>(x(),D("div",{class:M(["px-4 py-3 rounded-lg info-banner-shell",{"info-banner--info":f(l)==="info","info-banner--warning":f(l)==="warning","info-banner--error":f(l)==="error","info-banner--prerequisites":f(l)==="prerequisites","info-banner--side-note bg-new-gray-100":f(l)==="side-note"}])},[N("div",Yj,[f(t)?.hideIcon?X("",!0):(x(),$(gt(f(c)),{key:0,class:"mt-0.5 h-4 w-4 shrink-0"})),N("div",{class:"info-banner__content flex-1 text-sm text-new-gray-800",innerHTML:f(s)},null,8,Kj),f(t)?.link?(x(),D("a",{key:1,href:f(t).link.url,target:"_blank",rel:"noopener noreferrer",class:"inline-flex items-center gap-1 text-sm font-medium text-new-blue-600 hover:underline whitespace-nowrap"},[Re(ie(f(t).link.label)+" ",1),f(t).link.icon==="External"?(x(),$(f(mz),{key:0,class:"h-3 w-3"})):X("",!0)],8,Zj)):X("",!0)])],2))}}),Jj=Object.assign(Rd(Xj,[["__scopeId","data-v-13721035"]]),{__name:"InfoBanner"}),Qj={class:"flex flex-wrap gap-1 flex-1 min-w-0"},eW={class:"truncate"},tW={key:0,class:"text-xs text-gray-500 self-center"},nW={key:1,class:"text-sm text-gray-500 truncate self-center"},oW={class:"flex items-center gap-1 shrink-0"},iW={class:"flex items-center gap-2 px-3 py-2"},aW=["placeholder"],rW={key:0,class:"flex flex-wrap items-center gap-2 border-t border-b border-solid border-new-gray-200 px-3 py-2"},sW=["onClick"],lW={key:1,class:"border-b border-solid border-new-gray-200 px-3 py-2 text-sm"},cW={class:"inline-flex items-center gap-2 cursor-pointer select-none"},dW=["checked","disabled"],uW={class:"max-h-64 overflow-y-auto p-1"},hW={class:"flex items-center gap-1 px-2 py-1 rounded hover:bg-new-gray-50"},pW=["onClick"],fW={key:1,class:"inline-block w-4"},gW=["checked",".indeterminate","onChange"],mW=["checked","onChange"],vW={class:"text-sm text-new-gray-800"},bW={key:0,class:"ml-6"},yW=["checked","onChange"],xW={class:"text-sm text-new-gray-700"},wW={key:1,class:"px-3 py-4 text-center text-sm text-new-gray-500"},CW={class:"flex flex-col gap-2"},_W={class:"text-xs font-medium text-new-gray-600"},kW=T({name:"ApiTreeSelectWidget",__name:"ApiTreeSelect",props:{field:{},property:{}},async setup(e){let t,n;const o=wt(Lt),{data:i}=([t,n]=sr(()=>mr(`${e.property.id}_metadata`,()=>{const J=o.getFieldValue("credential_guid_body");return $fetch("/workflows/v1/metadata",{method:"POST",body:{...J&&J,...e.property.ui?.connectorConfigName&&{connectorConfigName:e.property.ui.connectorConfigName},...e.property.ui?.metadataTemplateKey&&{type:e.property.ui.metadataTemplateKey},...e.property.ui?.metadataTransformerTemplateKey&&{transformerType:e.property.ui.metadataTransformerTemplateKey}}})})),t=await t,n(),t);function a(J){return{label:J.title??J.value,value:J.value,children:J.children?.length?J.children.map(a):void 0}}const r=E(()=>{const J=i.value?.data?.results;return Array.isArray(J)?J.map(a):[]});function s(J,ce=""){if(typeof J!="object"||J===null)return[];const se=Object.keys(J);if(!se.length)return ce?[ce]:[];const xe=[];return se.forEach(Ze=>{s(J[Ze],Ze).forEach(Ot=>xe.push(ce?`${ce}:${Ot}`:Ot))}),xe}function l(J){if(!J)return{};const ce=J.split(":");return ce.length===1?{[J]:{}}:{[ce[0]]:l(ce.slice(1).join(":"))}}function c(){const J=e.field?.state?.value;if(!J)return[];if(typeof J=="string")try{return s(JSON.parse(J))}catch{return[]}return s(J)}const d=fe(c()),u=fe(""),h=fe(!1),p=fe(!1),m=fe({contains:"",startsWith:"",endsWith:"",regex:""}),g=fe(new Set),b=fe(null),v=fe(null),y=fe(null),w=fe(null),C=fe(null),k=fe({}),O=fe({});function P(){if(!v.value)return;const J=v.value.getBoundingClientRect(),ce=Math.max(J.width,360);k.value={position:"fixed",top:`${J.bottom+4}px`,left:`${J.left}px`,width:`${ce}px`,zIndex:"1000"}}function S(){if(!w.value)return;const J=w.value.getBoundingClientRect(),ce=288,se=window.innerWidth;let xe=J.right-ce;xe<8&&(xe=Math.min(J.left,se-ce-8)),O.value={position:"fixed",top:`${J.bottom+6}px`,left:`${xe}px`,width:`${ce}px`,zIndex:"1001"}}function V(){p.value=!p.value}function H(J){const ce=J.target;ce&&(b.value?.contains(ce)||y.value?.contains(ce)||C.value?.contains(ce))||(h.value=!1,p.value=!1)}function A(){h.value&&P(),p.value&&S()}Ne(p,async J=>{J&&(await io(),S())}),Ne(h,async J=>{J?(await io(),P(),document.addEventListener("mousedown",H),window.addEventListener("scroll",A,!0),window.addEventListener("resize",A)):(document.removeEventListener("mousedown",H),window.removeEventListener("scroll",A,!0),window.removeEventListener("resize",A))}),_0(()=>{document.removeEventListener("mousedown",H),window.removeEventListener("scroll",A,!0),window.removeEventListener("resize",A)});const G=E(()=>Object.values(m.value).filter(J=>J!=="").length);function te(J,ce){return J.map(se=>{const xe=se.children?te(se.children,ce):[];return ce(se)||xe.length?{...se,children:xe}:null}).filter(se=>se!==null)}const j=E(()=>{const{contains:J,startsWith:ce,endsWith:se,regex:xe}=m.value;if(!(J||ce||se||xe))return r.value;const Ct=Ot=>{const Dn=(Ot.label||"").toLowerCase();if(J&&!Dn.includes(J.toLowerCase())||ce&&!Dn.startsWith(ce.toLowerCase())||se&&!Dn.endsWith(se.toLowerCase()))return!1;if(xe)try{if(!new RegExp(xe,"i").test(Dn))return!1}catch{return!1}return!0};return te(r.value,Ct)}),U=E(()=>{if(!u.value)return j.value;const J=ce=>(ce.label||"").toLowerCase().includes(u.value.toLowerCase());return te(j.value,J)});function q(J,ce){const se=ce?`${ce}:${J.value}`:J.value;return J.children?.length?J.children.flatMap(xe=>q(xe,se)):[se]}const oe=E(()=>U.value.flatMap(J=>q(J))),ne=E(()=>!!oe.value.length&&oe.value.every(J=>d.value.includes(J)));function le(J){d.value=J;const ce=J.length?rn({},...J.map(se=>l(se))):{};e.field.handleChange(JSON.stringify(ce))}function he(J,ce){ce?d.value.includes(J)||le([...d.value,J]):le(d.value.filter(se=>se!==J))}function de(J,ce){const se=q(J),xe=new Set(d.value);ce?se.forEach(Ze=>xe.add(Ze)):se.forEach(Ze=>xe.delete(Ze)),le(Array.from(xe))}function Ce(J){const ce=q(J),se=ce.filter(xe=>d.value.includes(xe));return se.length?se.length===ce.length?"all":"some":"none"}function me(J){const ce=new Set(oe.value);le(J?Array.from(new Set([...d.value,...ce])):d.value.filter(se=>!ce.has(se)))}function Oe(J){g.value.has(J)?g.value.delete(J):g.value.add(J),g.value=new Set(g.value)}function B(J){return u.value||G.value>0?!0:g.value.has(J)}function W(){m.value={contains:"",startsWith:"",endsWith:"",regex:""}}function Z(J){m.value[J]=""}const re={contains:"Contains",startsWith:"Starts with",endsWith:"Ends with",regex:"Regex"},ye=E(()=>Object.keys(m.value).filter(J=>m.value[J]).map(J=>({key:J,label:re[J],value:m.value[J]}))),ke=E(()=>d.value.slice(0,3).map(J=>{const ce=J.split(":");return{path:J,label:ce[ce.length-1]}}));function Te(J){const ce=ke.value[J]?.path;ce&&le(d.value.filter(se=>se!==ce))}function it(){le([])}return(J,ce)=>(x(),D("div",{ref_key:"rootRef",ref:b,class:"relative"},[N("button",{ref_key:"triggerRef",ref:v,type:"button",class:M(["api-tree-trigger flex w-full items-center justify-between gap-2 rounded-md bg-white px-3 py-2 text-left text-sm transition-colors focus:outline-none",{"api-tree-trigger--open":f(h)}]),onClick:ce[0]||(ce[0]=se=>h.value=!f(h))},[N("div",Qj,[f(d).length?(x(),D($e,{key:0},[(x(!0),D($e,null,Ie(f(ke),(se,xe)=>(x(),D("span",{key:se.path,class:"inline-flex items-center gap-1 px-2 py-0.5 text-xs rounded bg-blue-50 text-blue-700 border border-solid border-blue-200 truncate max-w-[10rem]"},[N("span",eW,ie(se.label),1),F(f(Ss),{class:"h-3 w-3 shrink-0 cursor-pointer hover:opacity-70",onClick:on(Ze=>Te(xe),["stop"])},null,8,["onClick"])]))),128)),f(d).length>3?(x(),D("span",tW," +"+ie(f(d).length-3)+" more ",1)):X("",!0)],64)):(x(),D("span",nW,ie(e.property.ui?.placeholder??"Select workspaces"),1))]),N("div",oW,[f(d).length?(x(),$(f(Ss),{key:0,class:"h-3.5 w-3.5 text-new-gray-500 hover:text-new-gray-700",onClick:on(it,["stop"])})):X("",!0),F(f(fz),{class:M(["h-4 w-4 text-new-gray-500 transition-transform",{"rotate-180":f(h)}])},null,8,["class"])])],2),(x(),$(Rh,{to:"body"},[f(h)?(x(),D("div",{key:0,ref_key:"popoverRef",ref:y,style:Xc(f(k)),class:"api-tree-popover rounded-md bg-white",role:"listbox"},[N("div",iW,[F(f(bz),{class:"h-4 w-4 text-new-gray-500 shrink-0"}),S0(N("input",{"onUpdate:modelValue":ce[1]||(ce[1]=se=>Ks(u)?u.value=se:null),type:"text",placeholder:`Search from ${f(r).length} items`,class:"flex-1 min-w-0 text-sm text-new-gray-700 placeholder:text-new-gray-500 bg-transparent border-0 outline-none"},null,8,aW),[[wk,f(u)]]),N("button",{ref_key:"advancedTriggerRef",ref:w,type:"button",class:"shrink-0 text-sm font-bold text-blue-600 bg-transparent border-0 p-0 cursor-pointer hover:text-blue-700",onClick:on(V,["stop"])}," Advanced Search ",512)]),f(ye).length?(x(),D("div",rW,[(x(!0),D($e,null,Ie(f(ye),se=>(x(),D("span",{key:se.key,class:"inline-flex items-center gap-1 px-2 py-0.5 text-xs rounded-full bg-blue-50 border border-solid border-blue-200 text-blue-700"},[Re(ie(se.label)+": "+ie(se.value)+" ",1),N("button",{type:"button",class:"bg-transparent border-0 p-0 cursor-pointer hover:opacity-70",onClick:xe=>Z(se.key)},[F(f(Ss),{class:"h-3 w-3"})],8,sW)]))),128)),N("span",{class:"ml-auto text-xs font-bold text-red-500 cursor-pointer hover:underline",onClick:W}," Clear Filter ("+ie(f(G))+") ",1)])):X("",!0),f(u)||f(G)?(x(),D("div",lW,[N("label",cW,[N("input",{type:"checkbox",checked:f(ne),disabled:!f(oe).length,onChange:ce[2]||(ce[2]=se=>me(se.target.checked))},null,40,dW),ce[3]||(ce[3]=N("span",{class:"font-normal text-new-gray-700"}," Select all ",-1))])])):X("",!0),N("div",uW,[f(U).length?(x(!0),D($e,{key:0},Ie(f(U),se=>(x(),D("div",{key:se.value},[N("div",hW,[se.children?.length?(x(),D("button",{key:0,type:"button",class:"p-0.5 text-new-gray-500",onClick:xe=>Oe(se.value)},[F(f(i_),{class:M(["h-3 w-3 transition-transform",{"rotate-90":B(se.value)}])},null,8,["class"])],8,pW)):(x(),D("span",fW)),se.children?.length?(x(),D("input",{key:2,type:"checkbox",checked:Ce(se)==="all",".indeterminate":Ce(se)==="some",onChange:xe=>de(se,xe.target.checked)},null,40,gW)):(x(),D("input",{key:3,type:"checkbox",checked:f(d).includes(se.value),onChange:xe=>he(se.value,xe.target.checked)},null,40,mW)),N("span",vW,ie(se.label),1)]),se.children?.length&&B(se.value)?(x(),D("div",bW,[(x(!0),D($e,null,Ie(se.children,xe=>(x(),D("div",{key:xe.value,class:"flex items-center gap-2 px-2 py-1 rounded hover:bg-new-gray-50"},[N("input",{type:"checkbox",checked:f(d).includes(`${se.value}:${xe.value}`),onChange:Ze=>he(`${se.value}:${xe.value}`,Ze.target.checked)},null,40,yW),N("span",xW,ie(xe.label),1)]))),128))])):X("",!0)]))),128)):(x(),D("div",wW," No matches "))])],4)):X("",!0)])),(x(),$(Rh,{to:"body"},[f(p)?(x(),D("div",{key:0,ref_key:"advancedPopoverRef",ref:C,style:Xc(f(O)),class:"api-tree-popover rounded-md bg-white p-2"},[N("div",CW,[(x(),D($e,null,Ie([{key:"contains",label:"Contains"},{key:"startsWith",label:"Starts with"},{key:"endsWith",label:"Ends with"},{key:"regex",label:"Regex pattern"}],se=>N("div",{key:se.key,class:"flex flex-col gap-1"},[N("label",_W,ie(se.label),1),F(f(hr),{"model-value":f(m)[se.key],placeholder:se.label,variant:"default",state:"idle","onUpdate:modelValue":xe=>f(m)[se.key]=xe},null,8,["model-value","placeholder","onUpdate:modelValue"])])),64))])],4)):X("",!0)]))],512))}}),$W=Object.assign(Rd(kW,[["__scopeId","data-v-c4e14c6c"]]),{__name:"ApiTreeSelect"}),SW=T({name:"GlossarySelectorWidget",__name:"GlossarySelector",props:{field:{},property:{}},setup(e){const t=E(()=>e.property.ui?.mode==="multiple"),n=E(()=>e.property.ui?.showIcon??!0),o=E(()=>e.property.ui?.showCount??!1),i=[{guid:"glossary-1",name:"Sales Glossary",qualifiedName:"default/glossary/1711027234",termsCount:42},{guid:"glossary-2",name:"Marketing Glossary",qualifiedName:"default/glossary/1711027235",termsCount:18},{guid:"glossary-3",name:"Finance Glossary",qualifiedName:"default/glossary/1711027236",termsCount:76},{guid:"glossary-4",name:"Data Engineering Glossary",qualifiedName:"default/glossary/1711027237",termsCount:9}],a=E(()=>e.property.ui?.glossaries??i),r=E(()=>[...a.value].sort((u,h)=>u.name.localeCompare(h.name)).map(u=>({label:o.value&&u.termsCount!==void 0?`${u.name} (${u.termsCount})`:u.name,value:u.qualifiedName})));function s(u){const h=a.value.find(p=>p.qualifiedName===u);return h?{qualifiedName:h.qualifiedName,guid:h.guid,name:h.name}:null}function l(){const u=e.field?.state?.value;if(!u)return[];try{const h=typeof u=="string"?JSON.parse(u):u;if(Array.isArray(h))return h.map(p=>p?.qualifiedName).filter(p=>!!p);if(h?.qualifiedName)return[h.qualifiedName]}catch{}return[]}const c=fe(l());function d(u){c.value=u;const h=u.map(s).filter(p=>!!p);t.value?e.field.handleChange(JSON.stringify(h)):e.field.handleChange(h[0]?JSON.stringify(h[0]):"")}return(u,h)=>(x(),D("div",{class:M(["glossary-select-wrap relative",{"with-icon":f(n)}])},[f(n)?(x(),$(f(pz),{key:0,class:"glossary-select-icon h-4 w-4 text-gray-500 pointer-events-none"})):X("",!0),F(f(Mo),{multiple:f(t),"model-value":f(c),options:f(r),placeholder:e.property.ui?.placeholder??(f(t)?"Select glossaries":"Select a glossary"),variant:"default","onUpdate:modelValue":d,onBlur:e.field.handleBlur},null,8,["multiple","model-value","options","placeholder","onBlur"])],2))}}),EW=Object.assign(Rd(SW,[["__scopeId","data-v-f019e86a"]]),{__name:"GlossarySelector"});function Fi(){return Fi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Fi.apply(this,arguments)}function OW(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Gs(e,t)}function Lp(e){return Lp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Lp(e)}function Gs(e,t){return Gs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,i){return o.__proto__=i,o},Gs(e,t)}function TW(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Gc(e,t,n){return TW()?Gc=Reflect.construct.bind():Gc=function(i,a,r){var s=[null];s.push.apply(s,a);var l=Function.bind.apply(i,s),c=new l;return r&&Gs(c,r.prototype),c},Gc.apply(null,arguments)}function IW(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Fp(e){var t=typeof Map=="function"?new Map:void 0;return Fp=function(o){if(o===null||!IW(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(o))return t.get(o);t.set(o,i)}function i(){return Gc(o,arguments,Lp(this).constructor)}return i.prototype=Object.create(o.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Gs(i,o)},Fp(e)}var PW=/%[sdj%]/g,DW=function(){};function Bp(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var o=n.field;t[o]=t[o]||[],t[o].push(n)}),t}function sn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var i=0,a=n.length;if(typeof e=="function")return e.apply(null,n);if(typeof e=="string"){var r=e.replace(PW,function(s){if(s==="%%")return"%";if(i>=a)return s;switch(s){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return s}});return r}return e}function AW(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function lt(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||AW(t)&&typeof e=="string"&&!e)}function RW(e,t,n){var o=[],i=0,a=e.length;function r(s){o.push.apply(o,s||[]),i++,i===a&&n(o)}e.forEach(function(s){t(s,r)})}function c0(e,t,n){var o=0,i=e.length;function a(r){if(r&&r.length){n(r);return}var s=o;o=o+1,s<i?t(e[s],a):n([])}a([])}function VW(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n]||[])}),t}var d0=function(e){OW(t,e);function t(n,o){var i;return i=e.call(this,"Async Validation Error")||this,i.errors=n,i.fields=o,i}return t}(Fp(Error));function MW(e,t,n,o,i){if(t.first){var a=new Promise(function(h,p){var m=function(v){return o(v),v.length?p(new d0(v,Bp(v))):h(i)},g=VW(e);c0(g,n,m)});return a.catch(function(h){return h}),a}var r=t.firstFields===!0?Object.keys(e):t.firstFields||[],s=Object.keys(e),l=s.length,c=0,d=[],u=new Promise(function(h,p){var m=function(b){if(d.push.apply(d,b),c++,c===l)return o(d),d.length?p(new d0(d,Bp(d))):h(i)};s.length||(o(d),h(i)),s.forEach(function(g){var b=e[g];r.indexOf(g)!==-1?c0(b,n,m):RW(b,n,m)})});return u.catch(function(h){return h}),u}function NW(e){return!!(e&&e.message!==void 0)}function LW(e,t){for(var n=e,o=0;o<t.length;o++){if(n==null)return n;n=n[t[o]]}return n}function u0(e,t){return function(n){var o;return e.fullFields?o=LW(t,e.fullFields):o=t[n.field||e.fullField],NW(n)?(n.field=n.field||e.fullField,n.fieldValue=o,n):{message:typeof n=="function"?n():n,fieldValue:o,field:n.field||e.fullField}}}function h0(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];typeof o=="object"&&typeof e[n]=="object"?e[n]=Fi({},e[n],o):e[n]=o}}return e}var M_=function(t,n,o,i,a,r){t.required&&(!o.hasOwnProperty(t.field)||lt(n,r||t.type))&&i.push(sn(a.messages.required,t.fullField))},FW=function(t,n,o,i,a){(/^\s+$/.test(n)||n==="")&&i.push(sn(a.messages.whitespace,t.fullField))},hc,BW=function(){if(hc)return hc;var e="[a-fA-F\\d:]",t=function(C){return C&&C.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",o="[a-fA-F\\d]{1,4}",i=(`
|
|
79
|
+
(?:
|
|
80
|
+
(?:`+o+":){7}(?:"+o+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
81
|
+
(?:`+o+":){6}(?:"+n+"|:"+o+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
|
|
82
|
+
(?:`+o+":){5}(?::"+n+"|(?::"+o+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
|
|
83
|
+
(?:`+o+":){4}(?:(?::"+o+"){0,1}:"+n+"|(?::"+o+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
|
|
84
|
+
(?:`+o+":){3}(?:(?::"+o+"){0,2}:"+n+"|(?::"+o+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
|
|
85
|
+
(?:`+o+":){2}(?:(?::"+o+"){0,3}:"+n+"|(?::"+o+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
|
|
86
|
+
(?:`+o+":){1}(?:(?::"+o+"){0,4}:"+n+"|(?::"+o+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
|
87
|
+
(?::(?:(?::`+o+"){0,5}:"+n+"|(?::"+o+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
|
88
|
+
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
|
89
|
+
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),a=new RegExp("(?:^"+n+"$)|(?:^"+i+"$)"),r=new RegExp("^"+n+"$"),s=new RegExp("^"+i+"$"),l=function(C){return C&&C.exact?a:new RegExp("(?:"+t(C)+n+t(C)+")|(?:"+t(C)+i+t(C)+")","g")};l.v4=function(w){return w&&w.exact?r:new RegExp(""+t(w)+n+t(w),"g")},l.v6=function(w){return w&&w.exact?s:new RegExp(""+t(w)+i+t(w),"g")};var c="(?:(?:[a-z]+:)?//)",d="(?:\\S+(?::\\S*)?@)?",u=l.v4().source,h=l.v6().source,p="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",m="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",g="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",b="(?::\\d{2,5})?",v='(?:[/?#][^\\s"]*)?',y="(?:"+c+"|www\\.)"+d+"(?:localhost|"+u+"|"+h+"|"+p+m+g+")"+b+v;return hc=new RegExp("(?:^"+y+"$)","i"),hc},p0={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},hs={integer:function(t){return hs.number(t)&&parseInt(t,10)===t},float:function(t){return hs.number(t)&&!hs.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!hs.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(p0.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(BW())},hex:function(t){return typeof t=="string"&&!!t.match(p0.hex)}},zW=function(t,n,o,i,a){if(t.required&&n===void 0){M_(t,n,o,i,a);return}var r=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=t.type;r.indexOf(s)>-1?hs[s](n)||i.push(sn(a.messages.types[s],t.fullField,t.type)):s&&typeof n!==t.type&&i.push(sn(a.messages.types[s],t.fullField,t.type))},HW=function(t,n,o,i,a){var r=typeof t.len=="number",s=typeof t.min=="number",l=typeof t.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,d=n,u=null,h=typeof n=="number",p=typeof n=="string",m=Array.isArray(n);if(h?u="number":p?u="string":m&&(u="array"),!u)return!1;m&&(d=n.length),p&&(d=n.replace(c,"_").length),r?d!==t.len&&i.push(sn(a.messages[u].len,t.fullField,t.len)):s&&!l&&d<t.min?i.push(sn(a.messages[u].min,t.fullField,t.min)):l&&!s&&d>t.max?i.push(sn(a.messages[u].max,t.fullField,t.max)):s&&l&&(d<t.min||d>t.max)&&i.push(sn(a.messages[u].range,t.fullField,t.min,t.max))},$a="enum",jW=function(t,n,o,i,a){t[$a]=Array.isArray(t[$a])?t[$a]:[],t[$a].indexOf(n)===-1&&i.push(sn(a.messages[$a],t.fullField,t[$a].join(", ")))},WW=function(t,n,o,i,a){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||i.push(sn(a.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var r=new RegExp(t.pattern);r.test(n)||i.push(sn(a.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},Se={required:M_,whitespace:FW,type:zW,range:HW,enum:jW,pattern:WW},UW=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(lt(n,"string")&&!t.required)return o();Se.required(t,n,i,r,a,"string"),lt(n,"string")||(Se.type(t,n,i,r,a),Se.range(t,n,i,r,a),Se.pattern(t,n,i,r,a),t.whitespace===!0&&Se.whitespace(t,n,i,r,a))}o(r)},GW=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(lt(n)&&!t.required)return o();Se.required(t,n,i,r,a),n!==void 0&&Se.type(t,n,i,r,a)}o(r)},qW=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(n===""&&(n=void 0),lt(n)&&!t.required)return o();Se.required(t,n,i,r,a),n!==void 0&&(Se.type(t,n,i,r,a),Se.range(t,n,i,r,a))}o(r)},YW=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(lt(n)&&!t.required)return o();Se.required(t,n,i,r,a),n!==void 0&&Se.type(t,n,i,r,a)}o(r)},KW=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(lt(n)&&!t.required)return o();Se.required(t,n,i,r,a),lt(n)||Se.type(t,n,i,r,a)}o(r)},ZW=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(lt(n)&&!t.required)return o();Se.required(t,n,i,r,a),n!==void 0&&(Se.type(t,n,i,r,a),Se.range(t,n,i,r,a))}o(r)},XW=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(lt(n)&&!t.required)return o();Se.required(t,n,i,r,a),n!==void 0&&(Se.type(t,n,i,r,a),Se.range(t,n,i,r,a))}o(r)},JW=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(n==null&&!t.required)return o();Se.required(t,n,i,r,a,"array"),n!=null&&(Se.type(t,n,i,r,a),Se.range(t,n,i,r,a))}o(r)},QW=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(lt(n)&&!t.required)return o();Se.required(t,n,i,r,a),n!==void 0&&Se.type(t,n,i,r,a)}o(r)},eU="enum",tU=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(lt(n)&&!t.required)return o();Se.required(t,n,i,r,a),n!==void 0&&Se[eU](t,n,i,r,a)}o(r)},nU=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(lt(n,"string")&&!t.required)return o();Se.required(t,n,i,r,a),lt(n,"string")||Se.pattern(t,n,i,r,a)}o(r)},oU=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(lt(n,"date")&&!t.required)return o();if(Se.required(t,n,i,r,a),!lt(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),Se.type(t,l,i,r,a),l&&Se.range(t,l.getTime(),i,r,a)}}o(r)},iU=function(t,n,o,i,a){var r=[],s=Array.isArray(n)?"array":typeof n;Se.required(t,n,i,r,a,s),o(r)},Ih=function(t,n,o,i,a){var r=t.type,s=[],l=t.required||!t.required&&i.hasOwnProperty(t.field);if(l){if(lt(n,r)&&!t.required)return o();Se.required(t,n,i,s,a,r),lt(n,r)||Se.type(t,n,i,s,a)}o(s)},aU=function(t,n,o,i,a){var r=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(lt(n)&&!t.required)return o();Se.required(t,n,i,r,a)}o(r)},Os={string:UW,method:GW,number:qW,boolean:YW,regexp:KW,integer:ZW,float:XW,array:JW,object:QW,enum:tU,pattern:nU,date:oU,url:Ih,hex:Ih,email:Ih,required:iU,any:aU};function zp(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var Hp=zp(),gl=function(){function e(n){this.rules=null,this._messages=Hp,this.define(n)}var t=e.prototype;return t.define=function(o){var i=this;if(!o)throw new Error("Cannot configure a schema with no rules");if(typeof o!="object"||Array.isArray(o))throw new Error("Rules must be an object");this.rules={},Object.keys(o).forEach(function(a){var r=o[a];i.rules[a]=Array.isArray(r)?r:[r]})},t.messages=function(o){return o&&(this._messages=h0(zp(),o)),this._messages},t.validate=function(o,i,a){var r=this;i===void 0&&(i={}),a===void 0&&(a=function(){});var s=o,l=i,c=a;if(typeof l=="function"&&(c=l,l={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,s),Promise.resolve(s);function d(g){var b=[],v={};function y(C){if(Array.isArray(C)){var k;b=(k=b).concat.apply(k,C)}else b.push(C)}for(var w=0;w<g.length;w++)y(g[w]);b.length?(v=Bp(b),c(b,v)):c(null,s)}if(l.messages){var u=this.messages();u===Hp&&(u=zp()),h0(u,l.messages),l.messages=u}else l.messages=this.messages();var h={},p=l.keys||Object.keys(this.rules);p.forEach(function(g){var b=r.rules[g],v=s[g];b.forEach(function(y){var w=y;typeof w.transform=="function"&&(s===o&&(s=Fi({},s)),v=s[g]=w.transform(v)),typeof w=="function"?w={validator:w}:w=Fi({},w),w.validator=r.getValidationMethod(w),w.validator&&(w.field=g,w.fullField=w.fullField||g,w.type=r.getType(w),h[g]=h[g]||[],h[g].push({rule:w,value:v,source:s,field:g}))})});var m={};return MW(h,l,function(g,b){var v=g.rule,y=(v.type==="object"||v.type==="array")&&(typeof v.fields=="object"||typeof v.defaultField=="object");y=y&&(v.required||!v.required&&g.value),v.field=g.field;function w(O,P){return Fi({},P,{fullField:v.fullField+"."+O,fullFields:v.fullFields?[].concat(v.fullFields,[O]):[O]})}function C(O){O===void 0&&(O=[]);var P=Array.isArray(O)?O:[O];!l.suppressWarning&&P.length&&e.warning("async-validator:",P),P.length&&v.message!==void 0&&(P=[].concat(v.message));var S=P.map(u0(v,s));if(l.first&&S.length)return m[v.field]=1,b(S);if(!y)b(S);else{if(v.required&&!g.value)return v.message!==void 0?S=[].concat(v.message).map(u0(v,s)):l.error&&(S=[l.error(v,sn(l.messages.required,v.field))]),b(S);var V={};v.defaultField&&Object.keys(g.value).map(function(G){V[G]=v.defaultField}),V=Fi({},V,g.rule.fields);var H={};Object.keys(V).forEach(function(G){var te=V[G],j=Array.isArray(te)?te:[te];H[G]=j.map(w.bind(null,G))});var A=new e(H);A.messages(l.messages),g.rule.options&&(g.rule.options.messages=l.messages,g.rule.options.error=l.error),A.validate(g.value,g.rule.options||l,function(G){var te=[];S&&S.length&&te.push.apply(te,S),G&&G.length&&te.push.apply(te,G),b(te.length?te:null)})}}var k;if(v.asyncValidator)k=v.asyncValidator(v,g.value,C,g.source,l);else if(v.validator){try{k=v.validator(v,g.value,C,g.source,l)}catch(O){console.error?.(O),l.suppressValidatorError||setTimeout(function(){throw O},0),C(O.message)}k===!0?C():k===!1?C(typeof v.message=="function"?v.message(v.fullField||v.field):v.message||(v.fullField||v.field)+" fails"):k instanceof Array?C(k):k instanceof Error&&C(k.message)}k&&k.then&&k.then(function(){return C()},function(O){return C(O)})},function(g){d(g)},s)},t.getType=function(o){if(o.type===void 0&&o.pattern instanceof RegExp&&(o.type="pattern"),typeof o.validator!="function"&&o.type&&!Os.hasOwnProperty(o.type))throw new Error(sn("Unknown rule type %s",o.type));return o.type||"string"},t.getValidationMethod=function(o){if(typeof o.validator=="function")return o.validator;var i=Object.keys(o),a=i.indexOf("message");return a!==-1&&i.splice(a,1),i.length===1&&i[0]==="required"?Os.required:Os[this.getType(o)]||void 0},e}();gl.register=function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");Os[t]=n};gl.warning=DW;gl.messages=Hp;gl.validators=Os;function rU(e){const t=new gl({[e.id]:e.ui?.rules??[]});return{onBlurAsync:async({value:n})=>{try{await t.validate({[e.id]:n})}catch({errors:o}){return o[0].message}}}}var sU={},jp=function(e,t){return jp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},jp(e,t)};function Et(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");jp(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var yg=function(e){var t="[object "+e+"]";return function(n){return lU(n)===t}},lU=function(e){return Object.prototype.toString.call(e)},ar=function(e){return e instanceof Date?e.getTime():vr(e)?e.map(ar):e&&typeof e.toJSON=="function"?e.toJSON():e},cU=function(e){return e??null},vr=yg("Array"),dU=yg("Object"),N_=yg("Function"),uU=function(e,t){return e.hasOwnProperty(t)&&!N_(e[t])},hU=function(e){return e&&(e.constructor===Object||e.constructor===Array||e.constructor.toString()==="function Object() { [native code] }"||e.constructor.toString()==="function Array() { [native code] }")&&!e.toJSON},Wp=function(e,t){if(e==null&&e==t||e===t)return!0;if(Object.prototype.toString.call(e)!==Object.prototype.toString.call(t))return!1;if(vr(e)){if(e.length!==t.length)return!1;for(var n=0,o=e.length;n<o;n++)if(!Wp(e[n],t[n]))return!1;return!0}else if(dU(e)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var i in e)if(!Wp(e[i],t[i]))return!1;return!0}return!1},Up=function(e,t,n,o,i,a){var r=t[o];if(vr(e)&&isNaN(Number(r))&&!uU(e,r)){for(var s=0,l=e.length;s<l;s++)if(!Up(e[s],t,n,o,s,e))return!1}return o===t.length||e==null?n(e,i,a,o===0,o===t.length):Up(e[r],t,n,o+1,r,e)},lo=function(){function e(t,n,o,i){this.params=t,this.owneryQuery=n,this.options=o,this.name=i,this.init()}return e.prototype.init=function(){},e.prototype.reset=function(){this.done=!1,this.keep=!1},e}(),xg=function(e){Et(t,e);function t(n,o,i,a){var r=e.call(this,n,o,i)||this;return r.children=a,r}return t.prototype.reset=function(){this.keep=!1,this.done=!1;for(var n=0,o=this.children.length;n<o;n++)this.children[n].reset()},t.prototype.childrenNext=function(n,o,i,a,r){for(var s=!0,l=!0,c=0,d=this.children.length;c<d;c++){var u=this.children[c];if(u.done||u.next(n,o,i,a,r),u.keep||(l=!1),u.done){if(!u.keep)break}else s=!1}this.done=s,this.keep=l},t}(lo),L_=function(e){Et(t,e);function t(n,o,i,a,r){var s=e.call(this,n,o,i,a)||this;return s.name=r,s}return t}(xg),pU=function(e){Et(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.propop=!0,n}return t.prototype.next=function(n,o,i,a){this.childrenNext(n,o,i,a)},t}(xg),Gp=function(e){Et(t,e);function t(n,o,i,a,r){var s=e.call(this,o,i,a,r)||this;return s.keyPath=n,s.propop=!0,s._nextNestedValue=function(l,c,d,u,h){return s.childrenNext(l,c,d,u,h),!s.done},s}return t.prototype.next=function(n,o,i){Up(n,this.keyPath,this._nextNestedValue,0,o,i)},t}(xg),wg=function(e,t){if(e instanceof Function)return e;if(e instanceof RegExp)return function(o){var i=typeof o=="string"&&e.test(o);return e.lastIndex=0,i};var n=ar(e);return function(o){return t(n,ar(o))}},vi=function(e){Et(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.propop=!0,n}return t.prototype.init=function(){this._test=wg(this.params,this.options.compare)},t.prototype.next=function(n,o,i){(!Array.isArray(i)||i.hasOwnProperty(o))&&this._test(n,o,i)&&(this.done=!0,this.keep=!0)},t}(lo),fU=function(e){return function(t,n,o,i){return e(t,n,o,i)}},bu=function(e){return fU(function(t,n,o,i){var a=typeof ar(t),r=e(t);return new vi(function(s){var l=cU(s);return typeof ar(l)===a&&r(l)},n,o,i)})},gU=function(e,t,n,o){var i=o.operations[e];return i||F_(e),i(t,n,o,e)},F_=function(e){throw new Error("Unsupported operation: ".concat(e))},B_=function(e,t){for(var n in e)if(t.operations.hasOwnProperty(n)||n.charAt(0)==="$")return!0;return!1},mU=function(e,t,n,o,i){if(B_(t,i)){var a=z_(t,n,i),r=a[0],s=a[1];if(s.length)throw new Error("Property queries must contain only operations, or exact objects.");return new Gp(e,t,o,i,r)}return new Gp(e,t,o,i,[new vi(t,o,i)])},br=function(e,t,n){t===void 0&&(t=null);var o=n===void 0?{}:n,i=o.compare,a=o.operations,r={compare:i||Wp,operations:Object.assign({},a||{})},s=z_(e,null,r),l=s[0],c=s[1],d=[];return l.length&&d.push(new Gp([],e,t,r,l)),d.push.apply(d,c),d.length===1?d[0]:new pU(e,t,r,d)},z_=function(e,t,n){var o=[],i=[];if(!hU(e))return o.push(new vi(e,e,n)),[o,i];for(var a in e)if(n.operations.hasOwnProperty(a)){var r=gU(a,e[a],e,n);if(r&&!r.propop&&t&&!n.operations[t])throw new Error("Malformed query. ".concat(a," cannot be matched against property."));r!=null&&o.push(r)}else a.charAt(0)==="$"?F_(a):i.push(mU(a.split("."),e[a],a,e,n));return[o,i]},vU=function(e){return function(t,n,o){return e.reset(),e.next(t,n,o),e.keep}},bU=function(e){Et(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.propop=!0,n}return t.prototype.init=function(){this._test=wg(this.params,this.options.compare)},t.prototype.reset=function(){e.prototype.reset.call(this),this.keep=!0},t.prototype.next=function(n){this._test(n)&&(this.done=!0,this.keep=!1)},t}(lo),yU=function(e){Et(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.propop=!0,n}return t.prototype.init=function(){if(!this.params||typeof this.params!="object")throw new Error("Malformed query. $elemMatch must by an object.");this._queryOperation=br(this.params,this.owneryQuery,this.options)},t.prototype.reset=function(){e.prototype.reset.call(this),this._queryOperation.reset()},t.prototype.next=function(n){if(vr(n)){for(var o=0,i=n.length;o<i;o++){this._queryOperation.reset();var a=n[o];this._queryOperation.next(a,o,n,!1),this.keep=this.keep||this._queryOperation.keep}this.done=!0}else this.done=!1,this.keep=!1},t}(lo),xU=function(e){Et(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.propop=!0,n}return t.prototype.init=function(){this._queryOperation=br(this.params,this.owneryQuery,this.options)},t.prototype.reset=function(){e.prototype.reset.call(this),this._queryOperation.reset()},t.prototype.next=function(n,o,i,a){this._queryOperation.next(n,o,i,a),this.done=this._queryOperation.done,this.keep=!this._queryOperation.keep},t}(lo),H_=function(e){Et(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.propop=!0,n}return t.prototype.init=function(){},t.prototype.next=function(n){vr(n)&&n.length===this.params&&(this.done=!0,this.keep=!0)},t}(lo),j_=function(e){if(e.length===0)throw new Error("$and/$or/$nor must be a nonempty array")},W_=function(e){Et(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.propop=!1,n}return t.prototype.init=function(){var n=this;j_(this.params),this._ops=this.params.map(function(o){return br(o,null,n.options)})},t.prototype.reset=function(){this.done=!1,this.keep=!1;for(var n=0,o=this._ops.length;n<o;n++)this._ops[n].reset()},t.prototype.next=function(n,o,i){for(var a=!1,r=!1,s=0,l=this._ops.length;s<l;s++){var c=this._ops[s];if(c.next(n,o,i),c.keep){a=!0,r=c.keep;break}}this.keep=r,this.done=a},t}(lo),wU=function(e){Et(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.propop=!1,n}return t.prototype.next=function(n,o,i){e.prototype.next.call(this,n,o,i),this.keep=!this.keep},t}(W_),U_=function(e){Et(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.propop=!0,n}return t.prototype.init=function(){var n=this,o=Array.isArray(this.params)?this.params:[this.params];this._testers=o.map(function(i){if(B_(i,n.options))throw new Error("cannot nest $ under ".concat(n.name.toLowerCase()));return wg(i,n.options.compare)})},t.prototype.next=function(n,o,i){for(var a=!1,r=!1,s=0,l=this._testers.length;s<l;s++){var c=this._testers[s];if(c(n)){a=!0,r=!0;break}}this.keep=r,this.done=a},t}(lo),CU=function(e){Et(t,e);function t(n,o,i,a){var r=e.call(this,n,o,i,a)||this;return r.propop=!0,r._in=new U_(n,o,i,a),r}return t.prototype.next=function(n,o,i,a){this._in.next(n,o,i),vr(i)&&!a?this._in.keep?(this.keep=!1,this.done=!0):o==i.length-1&&(this.keep=!0,this.done=!0):(this.keep=!this._in.keep,this.done=!0)},t.prototype.reset=function(){e.prototype.reset.call(this),this._in.reset()},t}(lo),_U=function(e){Et(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.propop=!0,n}return t.prototype.next=function(n,o,i,a,r){r?i.hasOwnProperty(o)===this.params&&(this.done=!0,this.keep=!0):(this.done=!0,this.keep=!this.params)},t}(lo),kU=function(e){Et(t,e);function t(n,o,i,a){var r=e.call(this,n,o,i,n.map(function(s){return br(s,o,i)}),a)||this;return r.propop=!1,j_(n),r}return t.prototype.next=function(n,o,i,a){this.childrenNext(n,o,i,a)},t}(L_),$U=function(e){Et(t,e);function t(n,o,i,a){var r=e.call(this,n,o,i,n.map(function(s){return br(s,o,i)}),a)||this;return r.propop=!0,r}return t.prototype.next=function(n,o,i,a){this.childrenNext(n,o,i,a)},t}(L_),SU=function(e,t,n){return new vi(e,t,n)},EU=function(e,t,n,o){return new bU(e,t,n,o)},OU=function(e,t,n,o){return new W_(e,t,n,o)},TU=function(e,t,n,o){return new wU(e,t,n,o)},IU=function(e,t,n,o){return new yU(e,t,n,o)},PU=function(e,t,n,o){return new CU(e,t,n,o)},DU=function(e,t,n,o){return new U_(e,t,n,o)},AU=bu(function(e){return function(t){return t!=null&&t<e}}),RU=bu(function(e){return function(t){return t===e||t<=e}}),VU=bu(function(e){return function(t){return t!=null&&t>e}}),MU=bu(function(e){return function(t){return t===e||t>=e}}),NU=function(e,t,n){var o=e[0],i=e[1];return new vi(function(a){return ar(a)%o===i},t,n)},LU=function(e,t,n,o){return new _U(e,t,n,o)},FU=function(e,t,n){return new vi(new RegExp(e,t.$options),t,n)},BU=function(e,t,n,o){return new xU(e,t,n,o)},f0={number:function(e){return typeof e=="number"},string:function(e){return typeof e=="string"},bool:function(e){return typeof e=="boolean"},array:function(e){return Array.isArray(e)},null:function(e){return e===null},timestamp:function(e){return e instanceof Date}},zU=function(e,t,n){return new vi(function(o){if(typeof e=="string"){if(!f0[e])throw new Error("Type alias does not exist");return f0[e](o)}return o!=null?o instanceof e||o.constructor===e:!1},t,n)},HU=function(e,t,n,o){return new kU(e,t,n,o)},jU=function(e,t,n,o){return new $U(e,t,n,o)},WU=function(e,t,n){return new H_(e,t,n,"$size")},UU=function(){return null},GU=function(e,t,n){var o;if(N_(e))o=e;else if(!sU.CSP_ENABLED)o=new Function("obj","return "+e);else throw new Error('In CSP mode, sift does not support strings in "$where" condition');return new vi(function(i){return o.bind(i)(i)},t,n)},qU=Object.freeze({__proto__:null,$Size:H_,$all:jU,$and:HU,$elemMatch:IU,$eq:SU,$exists:LU,$gt:VU,$gte:MU,$in:DU,$lt:AU,$lte:RU,$mod:NU,$ne:EU,$nin:PU,$nor:TU,$not:BU,$options:UU,$or:OU,$regex:FU,$size:WU,$type:zU,$where:GU}),YU=function(e,t,n){var o=n===void 0?{}:n,i=o.compare,a=o.operations;return br(e,t,{compare:i,operations:Object.assign({},qU,a||{})})},KU=function(e,t){t===void 0&&(t={});var n=YU(e,null,t);return vU(n)};function ZU(e,{formState:t}){return e.find(n=>{if(n.filter){const o={},i=Object.keys(t);return Object.entries(t).forEach(([a,r])=>{(a.includes(".")||i.every(s=>s===a?!0:!s.startsWith(a)))&&(o[a]=r)}),[b7(o)].filter(KU(n.filter)).length>0}return n.regex?new RegExp(n.regex).test(t[n.property]):t[n.property]===n.value})}const XU={class:"grid grid-cols-8 gap-x-4 gap-y-4"},JU={key:0,class:"text-red-500"},QU={key:1,class:"text-red-500 text-xs"},eG=T({__name:"DynamicForm",props:{configMap:{},baseKey:{},currentStep:{}},setup(e,{expose:t}){const n=wt(Lt),o=n.useStore(p=>di(p.values)),i=(p=8,m,g)=>{let b=`col-span-${p}`;return m&&(b+=` col-start-${m}`),g&&(b+=` col-start-${m}`),b},a=p=>e.baseKey?`${e.baseKey}.${p}`:p,r=E(()=>{const p=JSON.parse(JSON.stringify(e.configMap));if(p.anyOf){p.anyOf.forEach(g=>{g.required.forEach(b=>{p.properties&&p.properties[b]&&(p.properties[b].ui.hidden=!0)})});const m=[];p.anyOf.forEach(g=>{Object.keys(g.properties).every(v=>{if(o.value[a(v)]?.toString()===g.properties[v]?.const?.toString())return!0})&&m.push(g)}),m.length>0&&m.forEach(g=>{g.required.forEach(b=>{p.properties&&p.properties[b]&&(p.properties[b].ui.hidden=!1)})})}return p}),s=p=>{const m=r.value?.properties[p];let g={id:a(p),name:a(p)};if(m.type==="conditional"){const{conditions:b,...v}=m,y=b?ZU(b,{formState:o.value}):null;g={...g,...v,...y}}else g={...g,...m};return g},l=E(()=>{{const p=[];return r.value?.properties&&(e.currentStep?.properties?e.currentStep.properties.forEach(m=>{Object.keys(r?.value?.properties).find(b=>b===m)&&(r.value?.properties[m].ui?.hidden||p.push(s(m)))}):Object.keys(r?.value?.properties).forEach(m=>{r.value?.properties[m].ui?.hidden||p.push(s(m))})),p}}),c=["credential","nested","connection","sage","Repeater","agent","advancedJdbcUrlGroup","jdbcurlgroup","nestedcollapse","inputrepeater"],d=["evaluate","infoBanner"],u=p=>{if(p.ui?.widget)switch(p.ui?.widget?.toLowerCase()){case"divider":return"hr";case"header":return"h5";case"radio":return c7;case"credential":return R7;case"nested":return M7;case"input":return xh;case"password":return L7;case"select":return B7;case"sqltree":return H7;case"apitree":return W7;case"sage":case"sagev2":return nz;case"connection":return iz;case"fileupload":return lz;case"repeater":return $z;case"connectionselector":return Mz;case"switcher":return Lz;case"agent":return i9;case"agentselector":return r9;case"advancedjdbcurlgroup":return D9;case"jdbcurlgroup":return R9;case"nestedcollapse":return M9;case"apiselect":return L9;case"checkbox":return j9;case"date":return fH;case"inputnumber":return mH;case"inputrepeater":return _H;case"evaluate":return $H;case"dsntreemap":return jH;case"infobanner":return Jj;case"apitreeselect":return $W;case"glossaryselector":return EW;default:return p.ui.widget}else switch(p.type){case"string":case"number":return xh;case"boolean":return s7;case"array":return"Select";case"object":return"Form";case"code":return"CodeBlock";case"banner":return"Banner";default:return xh}};async function h(){if(await n.handleSubmit(),!n.state.isValid)throw new Error("Form is invalid");return n.state.values}return t({validate:h}),(p,m)=>(x(),D("div",XU,[(x(!0),D($e,null,Ie(f(l),g=>(x(),D($e,{key:`${g.id}`},[g.ui?.hidden?X("",!0):(x(),D("div",{key:0,class:M(i(g.ui?.grid,g.ui?.start,g.ui?.end))},[c.includes(g?.ui?.widget)?(x(),$(gt(u(g)),{key:0,property:g},null,8,["property"])):d.includes(g?.ui?.widget)?(x(),$(gt(u(g)),{key:1,property:g},null,8,["property"])):(x(),$(f(n).Field,{key:2,name:g.id,validators:f(rU)(g)},{default:_(({field:b})=>[g.ui?.label?(x(),$(f(Gf),{key:0},{default:_(()=>[Re(ie(g.ui?.label)+" ",1),g?.required?(x(),D("span",JU," * ")):X("",!0)]),_:2},1024)):X("",!0),(x(),$(gt(u(g)),{field:b,"base-key":e.baseKey,property:g},null,8,["field","base-key","property"])),b.state.meta.isTouched&&!b.state.meta.isValid?(x(),D("span",QU,ie(b.state.meta.errors.join(", ")),1)):X("",!0)]),_:2},1032,["name","validators"]))],2))],64))),128))]))}}),G_=Object.assign(eG,{__name:"DynamicForm"}),bi=Object.freeze(Object.defineProperty({__proto__:null,default:G_},Symbol.toStringTag,{value:"Module"})),Ga=new WeakMap,qc=new WeakMap,Pd={current:[]};let Ph=!1,Ts=0;const ps=new Set,pc=new Map;function q_(e){const t=Array.from(e).sort((n,o)=>n instanceof Io&&n.options.deps.includes(o)?1:o instanceof Io&&o.options.deps.includes(n)?-1:0);for(const n of t){if(Pd.current.includes(n))continue;Pd.current.push(n),n.recompute();const o=qc.get(n);if(o)for(const i of o){const a=Ga.get(i);a&&q_(a)}}}function tG(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function nG(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function Y_(e){if(Ts>0&&!pc.has(e)&&pc.set(e,e.prevState),ps.add(e),!(Ts>0)&&!Ph)try{for(Ph=!0;ps.size>0;){const t=Array.from(ps);ps.clear();for(const n of t){const o=pc.get(n)??n.prevState;n.prevState=o,tG(n)}for(const n of t){const o=Ga.get(n);o&&(Pd.current.push(n),q_(o))}for(const n of t){const o=Ga.get(n);if(o)for(const i of o)nG(i)}}}finally{Ph=!1,Pd.current=[],pc.clear()}}function Kn(e){Ts++;try{e()}finally{if(Ts--,Ts===0){const t=ps.values().next().value;t&&Y_(t)}}}function oG(e){return typeof e=="function"}class Dd{constructor(t,n){this.listeners=new Set,this.subscribe=o=>{var i,a;this.listeners.add(o);const r=(a=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:a.call(i,o,this);return()=>{this.listeners.delete(o),r?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,o,i;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):oG(t)?this.state=t(this.prevState):this.state=t,(i=(o=this.options)==null?void 0:o.onUpdate)==null||i.call(o),Y_(this)}}class Io{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const n=this.options.deps.length,o=new Array(n),i=new Array(n);for(let a=0;a<n;a++){const r=this.options.deps[a];o[a]=r.prevState,i[a]=r.state}return this.lastSeenDepValues=i,{prevDepVals:o,currDepVals:i,prevVal:this.prevState??void 0}},this.recompute=()=>{var n,o;this.prevState=this.state;const i=this.getDepVals();this.state=this.options.fn(i),(o=(n=this.options).onUpdate)==null||o.call(n)},this.checkIfRecalculationNeededDeeply=()=>{for(const a of this.options.deps)a instanceof Io&&a.checkIfRecalculationNeededDeeply();let n=!1;const o=this.lastSeenDepValues,{currDepVals:i}=this.getDepVals();for(let a=0;a<i.length;a++)if(i[a]!==o[a]){n=!0;break}n&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const n of this._subscriptions)n()}),this.subscribe=n=>{var o,i;this.listeners.add(n);const a=(i=(o=this.options).onSubscribe)==null?void 0:i.call(o,n,this);return()=>{this.listeners.delete(n),a?.()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const n of t)if(n instanceof Io)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof Dd){let o=Ga.get(n);o||(o=new Set,Ga.set(n,o)),o.add(this);let i=qc.get(this);i||(i=new Set,qc.set(this,i)),i.add(n)}}unregisterFromGraph(t=this.options.deps){for(const n of t)if(n instanceof Io)this.unregisterFromGraph(n.options.deps);else if(n instanceof Dd){const o=Ga.get(n);o&&o.delete(this);const i=qc.get(this);i&&i.delete(n)}}}function iG(e){return typeof e=="function"}function g0(e,...t){return iG(e)?e(...t):e}function aG(e){return e||(typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"")}class K_{#n=!0;#e;#t;#a;#o;#i;#r;#s;#c=0;#u=5;#d=()=>{this.debugLog("Connected to event bus"),this.#i=!0,this.debugLog("Emitting queued events",this.#o),this.#o.forEach(t=>this.emitEventToBus(t)),this.#o=[],this.stopConnectLoop(),this.#t().removeEventListener("tanstack-connect-success",this.#d)};#l=()=>{if(this.#t().addEventListener("tanstack-connect-success",this.#d),this.#c<this.#u){this.#c++,this.dispatchCustomEvent("tanstack-connect",{});return}this.#t().removeEventListener("tanstack-connect",this.#l),this.debugLog("Max retries reached, giving up on connection"),this.stopConnectLoop()};constructor({pluginId:t,debug:n=!1,enabled:o=!0,reconnectEveryMs:i=1e3}){this.#e=t,this.#n=o,this.#t=this.getGlobalTarget,this.#a=n,this.debugLog(" Initializing event subscription for plugin",this.#e),this.#o=[],this.#i=!1,this.#r=null,this.#s=i}startConnectLoop(){this.#r!==null||this.#i||(this.debugLog(`Starting connect loop (every ${this.#s}ms)`),this.#r=setInterval(this.#l,this.#s))}stopConnectLoop(){this.#r!==null&&(clearInterval(this.#r),this.#r=null,this.debugLog("Stopped connect loop"))}debugLog(...t){this.#a&&console.log(`🌴 [tanstack-devtools:${this.#e}-plugin]`,...t)}getGlobalTarget(){if(typeof globalThis<"u"&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog("Using global event target"),globalThis.__TANSTACK_EVENT_TARGET__;if(typeof window<"u"&&typeof window.addEventListener<"u")return this.debugLog("Using window as event target"),window;const t=typeof EventTarget<"u"?new EventTarget:void 0;return typeof t>"u"||typeof t.addEventListener>"u"?(this.debugLog("No event mechanism available, running in non-web environment"),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog("Using new EventTarget as fallback"),t)}getPluginId(){return this.#e}dispatchCustomEventShim(t,n){try{const o=new Event(t,{detail:n});this.#t().dispatchEvent(o)}catch{this.debugLog("Failed to dispatch shim event")}}dispatchCustomEvent(t,n){try{this.#t().dispatchEvent(new CustomEvent(t,{detail:n}))}catch{this.dispatchCustomEventShim(t,n)}}emitEventToBus(t){this.debugLog("Emitting event to client bus",t),this.dispatchCustomEvent("tanstack-dispatch-event",t)}emit(t,n){if(!this.#n){this.debugLog("Event bus client is disabled, not emitting event",t,n);return}if(!this.#i){this.debugLog("Bus not available, will be pushed as soon as connected"),this.#o.push({type:`${this.#e}:${t}`,payload:n,pluginId:this.#e}),typeof CustomEvent<"u"&&(this.#l(),this.startConnectLoop());return}return this.emitEventToBus({type:`${this.#e}:${t}`,payload:n,pluginId:this.#e})}on(t,n){const o=`${this.#e}:${t}`;if(!this.#n)return this.debugLog("Event bus client is disabled, not registering event",o),()=>{};const i=a=>{this.debugLog("Received event from bus",a.detail),n(a.detail)};return this.#t().addEventListener(o,i),this.debugLog("Registered event to bus",o),()=>{this.#t().removeEventListener(o,i)}}onAll(t){if(!this.#n)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};const n=o=>{const i=o.detail;t(i)};return this.#t().addEventListener("tanstack-devtools-global",n),()=>this.#t().removeEventListener("tanstack-devtools-global",n)}onAllPluginEvents(t){if(!this.#n)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};const n=o=>{const i=o.detail;this.#e&&i.pluginId!==this.#e||t(i)};return this.#t().addEventListener("tanstack-devtools-global",n),()=>this.#t().removeEventListener("tanstack-devtools-global",n)}}class rG extends K_{constructor(t){super({pluginId:"pacer",debug:t?.debug})}}const sG=(e,t)=>{Z_.emit(e,t)},Z_=new rG;function m0(){return{executionCount:0,isPending:!1,lastArgs:void 0,lastExecutionTime:0,nextExecutionTime:0,status:"idle",maybeExecuteCount:0}}const lG={enabled:!0,leading:!0,trailing:!0,wait:0};class cG{constructor(t,n){this.fn=t,this.store=new Dd(m0()),this.setOptions=o=>{this.options={...this.options,...o},this.#t()||this.cancel()},this.#e=o=>{this.store.setState(i=>{const a={...i,...o},{isPending:r}=a;return{...a,status:this.#t()?r?"pending":"idle":"disabled"}}),sG("Throttler",this)},this.#t=()=>!!g0(this.options.enabled,this),this.#a=()=>g0(this.options.wait,this),this.maybeExecute=(...o)=>{this.#e({maybeExecuteCount:this.store.state.maybeExecuteCount+1});const i=Date.now(),a=i-this.store.state.lastExecutionTime,r=this.#a();if(this.options.leading&&a>=r)this.#o(...o);else if(this.#e({lastArgs:o}),!this.#n&&this.options.trailing){const s=this.store.state.lastExecutionTime?i-this.store.state.lastExecutionTime:0,l=r-s;this.#e({isPending:!0}),this.#n=setTimeout(()=>{const{lastArgs:c}=this.store.state;c!==void 0&&this.#o(...c)},l)}},this.#o=(...o)=>{if(!this.#t())return;this.fn(...o);const i=Date.now(),a=i+this.#a();this.#i(),this.#e({executionCount:this.store.state.executionCount+1,lastExecutionTime:i,nextExecutionTime:a,isPending:!1,lastArgs:void 0}),this.options.onExecute?.(o,this),setTimeout(()=>{this.store.state.isPending||this.#e({nextExecutionTime:void 0})},this.#a())},this.flush=()=>{this.store.state.isPending&&this.store.state.lastArgs&&this.#o(...this.store.state.lastArgs)},this.#i=()=>{this.#n&&(clearTimeout(this.#n),this.#n=void 0)},this.cancel=()=>{this.#i(),this.#e({lastArgs:void 0,isPending:!1})},this.reset=()=>{this.#e(m0())},this.key=aG(n.key),this.options={...lG,...n},this.#e(this.options.initialState??{}),Z_.on("d-Throttler",o=>{o.payload.key===this.key&&(this.#e(o.payload.store.state),this.setOptions(o.payload.options))})}#n;#e;#t;#a;#o;#i}function dG(e,t){return new cG(e,t).maybeExecute}function X_(e,t){return typeof e=="function"?e(t):e}function fs(e,t){return Cg(t).reduce((o,i)=>{if(o===null)return null;if(typeof o<"u")return o[i]},e)}function fc(e,t,n){const o=Cg(t);function i(a){if(!o.length)return X_(n,a);const r=o.shift();if(typeof r=="string"||typeof r=="number"&&!Array.isArray(a))return typeof a=="object"?(a===null&&(a={}),{...a,[r]:i(a[r])}):{[r]:i()};if(Array.isArray(a)&&typeof r=="number"){const s=a.slice(0,r);return[...s.length?s:new Array(r),i(a[r]),...a.slice(r+1)]}return[...new Array(r),i()]}return i(e)}function uG(e,t){const n=Cg(t);function o(i){if(!i)return;if(n.length===1){const r=n[0];if(Array.isArray(i)&&typeof r=="number")return i.filter((c,d)=>d!==r);const{[r]:s,...l}=i;return l}const a=n.shift();if(typeof a=="string"&&typeof i=="object")return{...i,[a]:o(i[a])};if(typeof a=="number"&&Array.isArray(i)){if(a>=i.length)return i;const r=i.slice(0,a);return[...r.length?r:new Array(a),o(i[a]),...i.slice(a+1)]}throw new Error("It seems we have created an infinite loop in deleteBy. ")}return o(e)}const hG=/^(\d+)$/gm,pG=/\.(\d+)(?=\.)/gm,fG=/^(\d+)\./gm,gG=/\.(\d+$)/gm,mG=/\.{2,}/gm,qp="__int__",gc=`${qp}$1`;function Cg(e){if(Array.isArray(e))return[...e];if(typeof e!="string")throw new Error("Path must be a string.");return e.replace(/(^\[)|]/gm,"").replace(/\[/g,".").replace(hG,gc).replace(pG,`.${gc}.`).replace(fG,`${gc}.`).replace(gG,`.${gc}`).replace(mG,".").split(".").map(t=>{if(t.startsWith(qp)){const n=t.substring(qp.length),o=parseInt(n,10);return String(o)===n?o:n}return t})}function vG(e){return!(Array.isArray(e)&&e.length===0)}function Yp(e,t){const n=o=>o.validators.filter(Boolean).map(i=>({cause:i.cause,validate:i.fn}));return t.validationLogic({form:t.form,validators:t.validators,event:{type:e,async:!1},runValidation:n})}function Kp(e,t){const{asyncDebounceMs:n}=t,{onBlurAsyncDebounceMs:o,onChangeAsyncDebounceMs:i,onDynamicAsyncDebounceMs:a}=t.validators||{},r=n??0,s=l=>l.validators.filter(Boolean).map(c=>{const d=c?.cause||e;let u=r;switch(d){case"change":u=i??r;break;case"blur":u=o??r;break;case"dynamic":u=a??r;break;case"submit":u=0;break}return e==="submit"&&(u=0),{cause:d,validate:c.fn,debounceMs:u}});return t.validationLogic({form:t.form,validators:t.validators,event:{type:e,async:!0},runValidation:s})}const Zp=e=>!!e&&typeof e=="object"&&"fields"in e;function Va(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[i,a]of e)if(!t.has(i)||!Object.is(a,t.get(i)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0}const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(const i of n)if(!o.includes(i)||!Va(e[i],t[i]))return!1;return!0}const v0=({newFormValidatorError:e,isPreviousErrorFromFormValidator:t,previousErrorValue:n})=>e?{newErrorValue:e,newSource:"form"}:t?{newErrorValue:void 0,newSource:void 0}:n?{newErrorValue:n,newSource:"field"}:{newErrorValue:void 0,newSource:void 0},b0=({formLevelError:e,fieldLevelError:t})=>t?{newErrorValue:t,newSource:"field"}:e?{newErrorValue:e,newSource:"form"}:{newErrorValue:void 0,newSource:void 0};function jt(e,t){return e==null?t:{...e,...t}}let Bi=256;const Yc=[];let mc;for(;Bi--;)Yc[Bi]=(Bi+256).toString(16).substring(1);function bG(){let e=0,t,n="";if(!mc||Bi+16>256){for(mc=new Array(256),e=256;e--;)mc[e]=256*Math.random()|0;e=0,Bi=0}for(;e<16;e++)t=mc[Bi+e],e===6?n+=Yc[t&15|64]:e===8?n+=Yc[t&63|128]:n+=Yc[t],e&1&&e>1&&e<11&&(n+="-");return Bi++,n}const Ha=e=>{if(!e.validators)return e.runValidation({validators:[],form:e.form});const t=e.event.async,n=t?void 0:{fn:e.validators.onMount,cause:"mount"},o={fn:t?e.validators.onChangeAsync:e.validators.onChange,cause:"change"},i={fn:t?e.validators.onBlurAsync:e.validators.onBlur,cause:"blur"},a={fn:t?e.validators.onSubmitAsync:e.validators.onSubmit,cause:"submit"},r=t?void 0:{fn:()=>{},cause:"server"};switch(e.event.type){case"mount":return e.runValidation({validators:[n],form:e.form});case"submit":return e.runValidation({validators:[o,i,a,r],form:e.form});case"server":return e.runValidation({validators:[],form:e.form});case"blur":return e.runValidation({validators:[i,r],form:e.form});case"change":return e.runValidation({validators:[o,r],form:e.form});default:throw new Error(`Unknown validation event type: ${e.event.type}`)}};function yG(e,t){const n=new Map;for(const o of e){const i=o.path??[];let a=t,r="";for(let s=0;s<i.length;s++){const l=i[s];if(l===void 0)continue;const c=typeof l=="object"?l.key:l,d=Number(c);Array.isArray(a)&&!Number.isNaN(d)?r+=`[${d}]`:r+=(s>0?".":"")+String(c),typeof a=="object"&&a!==null?a=a[c]:a=void 0}n.set(r,(n.get(r)??[]).concat(o))}return Object.fromEntries(n)}const y0=(e,t)=>{const n=yG(e,t);return{form:n,fields:n}},qa={validate({value:e,validationSource:t},n){const o=n["~standard"].validate(e);if(o instanceof Promise)throw new Error("async function passed to sync validator");if(o.issues)return t==="field"?o.issues:y0(o.issues,e)},async validateAsync({value:e,validationSource:t},n){const o=await n["~standard"].validate(e);if(o.issues)return t==="field"?o.issues:y0(o.issues,e)}},J_=e=>!!e&&"~standard"in e,Ad={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,isValid:!0,isDefaultValue:!0,errors:[],errorMap:{},errorSourceMap:{}};function vc(e){function t(u,h,p,m){const g=o(u,h,p,m);({insert:()=>s(g,u,h),remove:()=>l(g),swap:()=>m!==void 0&&d(g,u,h,m),move:()=>m!==void 0&&c(g,u,h,m)})[p]()}function n(u,h){return`${u}[${h}]`}function o(u,h,p,m){const g=[n(u,h)];if(p==="swap")g.push(n(u,m));else if(p==="move"){const[b,v]=[Math.min(h,m),Math.max(h,m)];for(let y=b;y<=v;y++)g.push(n(u,y))}else{const b=e.getFieldValue(u),v=Array.isArray(b)?b.length:0;for(let y=h+1;y<v;y++)g.push(n(u,y))}return Object.keys(e.fieldInfo).filter(b=>g.some(v=>b.startsWith(v)))}function i(u,h){return u.replace(/\[(\d+)\]/,(p,m)=>{const g=parseInt(m,10);return`[${h==="up"?g+1:Math.max(0,g-1)}]`})}function a(u,h){(h==="up"?u:[...u].reverse()).forEach(m=>{const g=i(m.toString(),h),b=e.getFieldMeta(g);b?e.setFieldMeta(m,b):e.setFieldMeta(m,r())})}const r=()=>Ad,s=(u,h,p)=>{a(u,"down"),u.forEach(m=>{m.toString().startsWith(n(h,p))&&e.setFieldMeta(m,r())})},l=u=>{a(u,"up")},c=(u,h,p,m)=>{const g=new Map(Object.keys(e.fieldInfo).filter(b=>b.startsWith(n(h,p))).map(b=>[b,e.getFieldMeta(b)]));a(u,p<m?"up":"down"),Object.keys(e.fieldInfo).filter(b=>b.startsWith(n(h,m))).forEach(b=>{const v=b.replace(n(h,m),n(h,p)),y=g.get(v);y&&e.setFieldMeta(b,y)})},d=(u,h,p,m)=>{u.forEach(g=>{if(!g.toString().startsWith(n(h,p)))return;const b=g.toString().replace(n(h,p),n(h,m)),[v,y]=[e.getFieldMeta(g),e.getFieldMeta(b)];v&&e.setFieldMeta(b,v),y&&e.setFieldMeta(g,y)})};return{handleArrayFieldMetaShift:t}}class xG extends K_{constructor(){super({pluginId:"form-devtools"})}}const wn=new xG;function Dh(e){return{values:e.values??{},errorMap:e.errorMap??{},fieldMetaBase:e.fieldMetaBase??{},isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1,validationMetaMap:e.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}}}class wG{constructor(t){this.options={},this.fieldInfo={},this.prevTransformArray=[],this.mount=()=>{const o=this.fieldMetaDerived.mount(),i=this.store.mount(),a=()=>{o(),i(),wn.emit("form-unmounted",{id:this._formId})};this.options.listeners?.onMount?.({formApi:this});const{onMount:r}=this.options.validators||{};return wn.emit("form-api",{id:this._formId,state:this.store.state,options:this.options}),r&&this.validateSync("mount"),a},this.update=o=>{if(!o)return;const i=this.options;this.options=o;const a=!!o.transform?.deps?.some((l,c)=>l!==this.prevTransformArray[c]),r=o.defaultValues&&!Va(o.defaultValues,i.defaultValues)&&!this.state.isTouched,s=!Va(o.defaultState,i.defaultState)&&!this.state.isTouched;!r&&!s&&!a||(Kn(()=>{this.baseStore.setState(()=>Dh(Object.assign({},this.state,s?o.defaultState:{},r?{values:o.defaultValues}:{},a?{_force_re_eval:!this.state._force_re_eval}:{})))}),wn.emit("form-api",{id:this._formId,state:this.store.state,options:this.options}))},this.reset=(o,i)=>{const{fieldMeta:a}=this.state,r=this.resetFieldMeta(a);o&&!i?.keepDefaultValues&&(this.options={...this.options,defaultValues:o}),this.baseStore.setState(()=>Dh({...this.options.defaultState,values:o??this.options.defaultValues??this.options.defaultState?.values,fieldMetaBase:r}))},this.validateAllFields=async o=>{const i=[];return Kn(()=>{Object.values(this.fieldInfo).forEach(r=>{if(!r.instance)return;const s=r.instance;i.push(Promise.resolve().then(()=>s.validate(o,{skipFormValidation:!0}))),r.instance.state.meta.isTouched||r.instance.setMeta(l=>({...l,isTouched:!0}))})}),(await Promise.all(i)).flat()},this.validateArrayFieldsStartingFrom=async(o,i,a)=>{const r=this.getFieldValue(o),s=Array.isArray(r)?Math.max(r.length-1,0):null,l=[`${o}[${i}]`];for(let h=i+1;h<=(s??0);h++)l.push(`${o}[${h}]`);const c=Object.keys(this.fieldInfo).filter(h=>l.some(p=>h.startsWith(p))),d=[];return Kn(()=>{c.forEach(h=>{d.push(Promise.resolve().then(()=>this.validateField(h,a)))})}),(await Promise.all(d)).flat()},this.validateField=(o,i)=>{const a=this.fieldInfo[o]?.instance;return a?(a.state.meta.isTouched||a.setMeta(r=>({...r,isTouched:!0})),a.validate(i)):[]},this.validateSync=o=>{const i=Yp(o,{...this.options,form:this,validationLogic:this.options.validationLogic||Ha});let a=!1;const r={};return Kn(()=>{for(const c of i){if(!c.validate)continue;const d=this.runValidator({validate:c.validate,value:{value:this.state.values,formApi:this,validationSource:"form"},type:"validate"}),{formError:u,fieldErrors:h}=Kc(d),p=is(c.cause);for(const m of Object.keys(this.state.fieldMeta)){if(this.baseStore.state.fieldMetaBase[m]===void 0)continue;const g=this.getFieldMeta(m);if(!g)continue;const{errorMap:b,errorSourceMap:v}=g,y=h?.[m],{newErrorValue:w,newSource:C}=v0({newFormValidatorError:y,isPreviousErrorFromFormValidator:v?.[p]==="form",previousErrorValue:b?.[p]});C==="form"&&(r[m]={...r[m],[p]:y}),b?.[p]!==w&&this.setFieldMeta(m,k=>({...k,errorMap:{...k.errorMap,[p]:w},errorSourceMap:{...k.errorSourceMap,[p]:C}}))}this.state.errorMap?.[p]!==u&&this.baseStore.setState(m=>({...m,errorMap:{...m.errorMap,[p]:u}})),(u||h)&&(a=!0)}const s=is("submit");this.state.errorMap?.[s]&&o!=="submit"&&!a&&this.baseStore.setState(c=>({...c,errorMap:{...c.errorMap,[s]:void 0}}));const l=is("server");this.state.errorMap?.[l]&&o!=="server"&&!a&&this.baseStore.setState(c=>({...c,errorMap:{...c.errorMap,[l]:void 0}}))}),{hasErrored:a,fieldsErrorMap:r}},this.validateAsync=async o=>{const i=Kp(o,{...this.options,form:this,validationLogic:this.options.validationLogic||Ha});this.state.isFormValidating||this.baseStore.setState(c=>({...c,isFormValidating:!0}));const a=[];let r;for(const c of i){if(!c.validate)continue;const d=is(c.cause);this.state.validationMetaMap[d]?.lastAbortController.abort();const h=new AbortController;this.state.validationMetaMap[d]={lastAbortController:h},a.push(new Promise(async p=>{let m;try{m=await new Promise((y,w)=>{setTimeout(async()=>{if(h.signal.aborted)return y(void 0);try{y(await this.runValidator({validate:c.validate,value:{value:this.state.values,formApi:this,validationSource:"form",signal:h.signal},type:"validateAsync"}))}catch(C){w(C)}},c.debounceMs)})}catch(y){m=y}const{formError:g,fieldErrors:b}=Kc(m);b&&(r=r?{...r,...b}:b);const v=is(c.cause);for(const y of Object.keys(this.state.fieldMeta)){if(this.baseStore.state.fieldMetaBase[y]===void 0)continue;const w=this.getFieldMeta(y);if(!w)continue;const{errorMap:C,errorSourceMap:k}=w,O=r?.[y],{newErrorValue:P,newSource:S}=v0({newFormValidatorError:O,isPreviousErrorFromFormValidator:k?.[v]==="form",previousErrorValue:C?.[v]});C?.[v]!==P&&this.setFieldMeta(y,V=>({...V,errorMap:{...V.errorMap,[v]:P},errorSourceMap:{...V.errorSourceMap,[v]:S}}))}this.baseStore.setState(y=>({...y,errorMap:{...y.errorMap,[v]:g}})),p(r?{fieldErrors:r,errorMapKey:v}:void 0)}))}let s=[];const l={};if(a.length){s=await Promise.all(a);for(const c of s)if(c?.fieldErrors){const{errorMapKey:d}=c;for(const[u,h]of Object.entries(c.fieldErrors)){const m={...l[u]||{},[d]:h};l[u]=m}}}return this.baseStore.setState(c=>({...c,isFormValidating:!1})),l},this.validate=o=>{const{hasErrored:i,fieldsErrorMap:a}=this.validateSync(o);return i&&!this.options.asyncAlways?a:this.validateAsync(o)},this.getFieldValue=o=>fs(this.state.values,o),this.getFieldMeta=o=>this.state.fieldMeta[o],this.getFieldInfo=o=>this.fieldInfo[o]||={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.setFieldMeta=(o,i)=>{this.baseStore.setState(a=>({...a,fieldMetaBase:{...a.fieldMetaBase,[o]:X_(i,a.fieldMetaBase[o])}}))},this.resetFieldMeta=o=>Object.keys(o).reduce((i,a)=>{const r=a;return i[r]=Ad,i},{}),this.setFieldValue=(o,i,a)=>{const r=a?.dontUpdateMeta??!1,s=a?.dontRunListeners??!1,l=a?.dontValidate??!1;Kn(()=>{r||this.setFieldMeta(o,c=>({...c,isTouched:!0,isDirty:!0,errorMap:{...c?.errorMap,onMount:void 0}})),this.baseStore.setState(c=>({...c,values:fc(c.values,o,i)}))}),s||this.getFieldInfo(o).instance?.triggerOnChangeListener(),l||this.validateField(o,"change")},this.deleteField=o=>{const a=[...Object.keys(this.fieldInfo).filter(r=>{const s=o.toString();return r!==s&&r.startsWith(s)}),o];this.baseStore.setState(r=>{const s={...r};return a.forEach(l=>{s.values=uG(s.values,l),delete this.fieldInfo[l],delete s.fieldMetaBase[l]}),s})},this.pushFieldValue=(o,i,a)=>{this.setFieldValue(o,r=>[...Array.isArray(r)?r:[],i],a)},this.insertFieldValue=async(o,i,a,r)=>{this.setFieldValue(o,l=>[...l.slice(0,i),a,...l.slice(i)],jt(r,{dontValidate:!0}));const s=r?.dontValidate??!1;s||await this.validateField(o,"change"),vc(this).handleArrayFieldMetaShift(o,i,"insert"),s||await this.validateArrayFieldsStartingFrom(o,i,"change")},this.replaceFieldValue=async(o,i,a,r)=>{this.setFieldValue(o,l=>l.map((c,d)=>d===i?a:c),jt(r,{dontValidate:!0})),(r?.dontValidate??!1)||(await this.validateField(o,"change"),await this.validateArrayFieldsStartingFrom(o,i,"change"))},this.removeFieldValue=async(o,i,a)=>{const r=this.getFieldValue(o),s=Array.isArray(r)?Math.max(r.length-1,0):null;if(this.setFieldValue(o,c=>c.filter((d,u)=>u!==i),jt(a,{dontValidate:!0})),vc(this).handleArrayFieldMetaShift(o,i,"remove"),s!==null){const c=`${o}[${s}]`;this.deleteField(c)}(a?.dontValidate??!1)||(await this.validateField(o,"change"),await this.validateArrayFieldsStartingFrom(o,i,"change"))},this.swapFieldValues=(o,i,a,r)=>{this.setFieldValue(o,l=>{const c=l[i],d=l[a];return fc(fc(l,`${i}`,d),`${a}`,c)},jt(r,{dontValidate:!0})),vc(this).handleArrayFieldMetaShift(o,i,"swap",a),(r?.dontValidate??!1)||(this.validateField(o,"change"),this.validateField(`${o}[${i}]`,"change"),this.validateField(`${o}[${a}]`,"change"))},this.moveFieldValues=(o,i,a,r)=>{this.setFieldValue(o,l=>{const c=[...l];return c.splice(a,0,c.splice(i,1)[0]),c},jt(r,{dontValidate:!0})),vc(this).handleArrayFieldMetaShift(o,i,"move",a),(r?.dontValidate??!1)||(this.validateField(o,"change"),this.validateField(`${o}[${i}]`,"change"),this.validateField(`${o}[${a}]`,"change"))},this.clearFieldValues=(o,i)=>{const a=this.getFieldValue(o),r=Array.isArray(a)?Math.max(a.length-1,0):null;if(this.setFieldValue(o,[],jt(i,{dontValidate:!0})),r!==null)for(let l=0;l<=r;l++){const c=`${o}[${l}]`;this.deleteField(c)}(i?.dontValidate??!1)||this.validateField(o,"change")},this.resetField=o=>{this.baseStore.setState(i=>({...i,fieldMetaBase:{...i.fieldMetaBase,[o]:Ad},values:this.options.defaultValues?fc(i.values,o,fs(this.options.defaultValues,o)):i.values}))},this.getAllErrors=()=>({form:{errors:this.state.errors,errorMap:this.state.errorMap},fields:Object.entries(this.state.fieldMeta).reduce((o,[i,a])=>(Object.keys(a).length&&a.errors.length&&(o[i]={errors:a.errors,errorMap:a.errorMap}),o),{})}),this.parseValuesWithSchema=o=>qa.validate({value:this.state.values,validationSource:"form"},o),this.parseValuesWithSchemaAsync=o=>qa.validateAsync({value:this.state.values,validationSource:"form"},o),this.timeoutIds={validations:{},listeners:{},formListeners:{}},this._formId=t?.formId??bG(),this._devtoolsSubmissionOverride=!1,this.baseStore=new Dd(Dh({...t?.defaultState,values:t?.defaultValues??t?.defaultState?.values})),this.fieldMetaDerived=new Io({deps:[this.baseStore],fn:({prevDepVals:o,currDepVals:i,prevVal:a})=>{const r=a,s=o?.[0],l=i[0];let c=0;const d={};for(const u of Object.keys(l.fieldMetaBase)){const h=l.fieldMetaBase[u],p=s?.fieldMetaBase[u],m=r?.[u],g=fs(l.values,u);let b=m?.errors;if(!p||h.errorMap!==p.errorMap){b=Object.values(h.errorMap??{}).filter(k=>k!==void 0);const C=this.getFieldInfo(u)?.instance;C&&!C.options.disableErrorFlat&&(b=b?.flat(1))}const v=!vG(b??[]),y=!h.isDirty,w=Va(g,fs(this.options.defaultValues,u))||Va(g,this.getFieldInfo(u)?.instance?.options.defaultValue);if(m&&m.isPristine===y&&m.isValid===v&&m.isDefaultValue===w&&m.errors===b&&h===p){d[u]=m,c++;continue}d[u]={...h,errors:b,isPristine:y,isValid:v,isDefaultValue:w}}return Object.keys(l.fieldMetaBase).length&&r&&c===Object.keys(l.fieldMetaBase).length?r:d}}),this.store=new Io({deps:[this.baseStore,this.fieldMetaDerived],fn:({prevDepVals:o,currDepVals:i,prevVal:a})=>{const r=a,s=o?.[0],l=i[0],c=i[1],d=Object.values(c).filter(Boolean),u=d.some(j=>j.isValidating),h=d.every(j=>j.isValid),p=d.some(j=>j.isTouched),m=d.some(j=>j.isBlurred),g=d.every(j=>j.isDefaultValue),b=p&&l.errorMap?.onMount,v=d.some(j=>j.isDirty),y=!v,w=!!(l.errorMap?.onMount||d.some(j=>j?.errorMap?.onMount)),C=!!u;let k=r?.errors??[];(!s||l.errorMap!==s.errorMap)&&(k=Object.values(l.errorMap).reduce((j,U)=>U===void 0?j:U&&Zp(U)?(j.push(U.form),j):(j.push(U),j),[]));const O=k.length===0,P=h&&O,S=this.options.canSubmitWhenInvalid??!1,V=l.submissionAttempts===0&&!p&&!w||!C&&!l.isSubmitting&&P||S;let H=l.errorMap;if(b&&(k=k.filter(j=>j!==l.errorMap.onMount),H=Object.assign(H,{onMount:void 0})),r&&s&&r.errorMap===H&&r.fieldMeta===this.fieldMetaDerived.state&&r.errors===k&&r.isFieldsValidating===u&&r.isFieldsValid===h&&r.isFormValid===O&&r.isValid===P&&r.canSubmit===V&&r.isTouched===p&&r.isBlurred===m&&r.isPristine===y&&r.isDefaultValue===g&&r.isDirty===v&&Va(s,l))return r;let A={...l,errorMap:H,fieldMeta:this.fieldMetaDerived.state,errors:k,isFieldsValidating:u,isFieldsValid:h,isFormValid:O,isValid:P,canSubmit:V,isTouched:p,isBlurred:m,isPristine:y,isDefaultValue:g,isDirty:v};const G=this.options.transform?.deps??[];if(G.length!==this.prevTransformArray.length||G.some((j,U)=>j!==this.prevTransformArray[U])){const j=Object.assign({},this,{state:A});this.options.transform?.fn(j),A=j.state,this.prevTransformArray=G}return A}}),this.handleSubmit=this.handleSubmit.bind(this),this.update(t||{});const n=dG(o=>wn.emit("form-state",{id:this._formId,state:o}),{wait:300});this.store.subscribe(()=>{n(this.store.state)}),wn.on("request-form-state",o=>{o.payload.id===this._formId&&wn.emit("form-api",{id:this._formId,state:this.store.state,options:this.options})}),wn.on("request-form-reset",o=>{o.payload.id===this._formId&&this.reset()}),wn.on("request-form-force-submit",o=>{o.payload.id===this._formId&&(this._devtoolsSubmissionOverride=!0,this.handleSubmit(),this._devtoolsSubmissionOverride=!1)})}get state(){return this.store.state}get formId(){return this._formId}runValidator(t){return J_(t.validate)?qa[t.type](t.value,t.validate):t.validate(t.value)}async handleSubmit(t){this.baseStore.setState(i=>({...i,isSubmitted:!1,submissionAttempts:i.submissionAttempts+1,isSubmitSuccessful:!1})),Kn(()=>{Object.values(this.fieldInfo).forEach(i=>{i.instance&&(i.instance.state.meta.isTouched||i.instance.setMeta(a=>({...a,isTouched:!0})))})});const n=t??this.options.onSubmitMeta;if(!this.state.canSubmit&&!this._devtoolsSubmissionOverride){this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:n});return}this.baseStore.setState(i=>({...i,isSubmitting:!0}));const o=()=>{this.baseStore.setState(i=>({...i,isSubmitting:!1}))};if(await this.validateAllFields("submit"),!this.state.isFieldsValid){o(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:n}),wn.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"validateAllFields",errors:Object.values(this.state.fieldMeta).map(i=>i.errors).flat()});return}if(await this.validate("submit"),!this.state.isValid){o(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:n}),wn.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"validate",errors:this.state.errors});return}Kn(()=>{Object.values(this.fieldInfo).forEach(i=>{i.instance?.options.listeners?.onSubmit?.({value:i.instance.state.value,fieldApi:i.instance})})}),this.options.listeners?.onSubmit?.({formApi:this,meta:n});try{await this.options.onSubmit?.({value:this.state.values,formApi:this,meta:n}),Kn(()=>{this.baseStore.setState(i=>({...i,isSubmitted:!0,isSubmitSuccessful:!0})),wn.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!0}),o()})}catch(i){throw this.baseStore.setState(a=>({...a,isSubmitSuccessful:!1})),wn.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"inflight",onError:i}),o(),i}}setErrorMap(t){Kn(()=>{Object.entries(t).forEach(([n,o])=>{const i=n;if(Zp(o)){const{formError:a,fieldErrors:r}=Kc(o);for(const s of Object.keys(this.fieldInfo))this.getFieldMeta(s)&&this.setFieldMeta(s,c=>({...c,errorMap:{...c.errorMap,[i]:r?.[s]},errorSourceMap:{...c.errorSourceMap,[i]:"form"}}));this.baseStore.setState(s=>({...s,errorMap:{...s.errorMap,[i]:a}}))}else this.baseStore.setState(a=>({...a,errorMap:{...a.errorMap,[i]:o}}))})})}}function Kc(e){if(e){if(Zp(e)){const t=Kc(e.form).formError,n=e.fields;return{formError:t,fieldErrors:n}}return{formError:e}}return{formError:void 0}}function is(e){switch(e){case"submit":return"onSubmit";case"blur":return"onBlur";case"mount":return"onMount";case"server":return"onServer";case"dynamic":return"onDynamic";case"change":default:return"onChange"}}class CG{constructor(t){this.options={},this.mount=()=>{const n=this.store.mount();this.options.defaultValue!==void 0&&this.form.setFieldValue(this.name,this.options.defaultValue,{dontUpdateMeta:!0});const o=this.getInfo();o.instance=this,this.update(this.options);const{onMount:i}=this.options.validators||{};if(i){const a=this.runValidator({validate:i,value:{value:this.state.value,fieldApi:this,validationSource:"field"},type:"validate"});a&&this.setMeta(r=>({...r,errorMap:{...r?.errorMap,onMount:a},errorSourceMap:{...r?.errorSourceMap,onMount:"field"}}))}return this.options.listeners?.onMount?.({value:this.state.value,fieldApi:this}),n},this.update=n=>{this.options=n;const o=this.name!==n.name;if(this.name=n.name,this.state.value===void 0){const i=fs(n.form.options.defaultValues,n.name),a=n.defaultValue??i;o?this.setValue(r=>r||a,{dontUpdateMeta:!0}):a!==void 0&&this.setValue(a,{dontUpdateMeta:!0})}this.form.getFieldMeta(this.name)===void 0&&this.setMeta(this.state.meta)},this.getValue=()=>this.form.getFieldValue(this.name),this.setValue=(n,o)=>{this.form.setFieldValue(this.name,n,jt(o,{dontRunListeners:!0,dontValidate:!0})),o?.dontRunListeners||this.triggerOnChangeListener(),o?.dontValidate||this.validate("change")},this.getMeta=()=>this.store.state.meta,this.setMeta=n=>this.form.setFieldMeta(this.name,n),this.getInfo=()=>this.form.getFieldInfo(this.name),this.pushValue=(n,o)=>{this.form.pushFieldValue(this.name,n,jt(o,{dontRunListeners:!0})),o?.dontRunListeners||this.triggerOnChangeListener()},this.insertValue=(n,o,i)=>{this.form.insertFieldValue(this.name,n,o,jt(i,{dontRunListeners:!0})),i?.dontRunListeners||this.triggerOnChangeListener()},this.replaceValue=(n,o,i)=>{this.form.replaceFieldValue(this.name,n,o,jt(i,{dontRunListeners:!0})),i?.dontRunListeners||this.triggerOnChangeListener()},this.removeValue=(n,o)=>{this.form.removeFieldValue(this.name,n,jt(o,{dontRunListeners:!0})),o?.dontRunListeners||this.triggerOnChangeListener()},this.swapValues=(n,o,i)=>{this.form.swapFieldValues(this.name,n,o,jt(i,{dontRunListeners:!0})),i?.dontRunListeners||this.triggerOnChangeListener()},this.moveValue=(n,o,i)=>{this.form.moveFieldValues(this.name,n,o,jt(i,{dontRunListeners:!0})),i?.dontRunListeners||this.triggerOnChangeListener()},this.clearValues=n=>{this.form.clearFieldValues(this.name,jt(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.getLinkedFields=n=>{const o=Object.values(this.form.fieldInfo),i=[];for(const a of o){if(!a.instance)continue;const{onChangeListenTo:r,onBlurListenTo:s}=a.instance.options.validators||{};n==="change"&&r?.includes(this.name)&&i.push(a.instance),n==="blur"&&s?.includes(this.name)&&i.push(a.instance)}return i},this.validateSync=(n,o)=>{const i=Yp(n,{...this.options,form:this.form,validationLogic:this.form.options.validationLogic||Ha}),r=this.getLinkedFields(n).reduce((c,d)=>{const u=Yp(n,{...d.options,form:d.form,validationLogic:d.form.options.validationLogic||Ha});return u.forEach(h=>{h.field=d}),c.concat(u)},[]);let s=!1;Kn(()=>{const c=(d,u)=>{const h=bc(u.cause),p=u.validate?x0(d.runValidator({validate:u.validate,value:{value:d.store.state.value,validationSource:"field",fieldApi:d},type:"validate"})):void 0,m=o[h],{newErrorValue:g,newSource:b}=b0({formLevelError:m,fieldLevelError:p});d.state.meta.errorMap?.[h]!==g&&d.setMeta(v=>({...v,errorMap:{...v.errorMap,[h]:g},errorSourceMap:{...v.errorSourceMap,[h]:b}})),g&&(s=!0)};for(const d of i)c(this,d);for(const d of r)d.validate&&c(d.field,d)});const l=bc("submit");return this.state.meta.errorMap?.[l]&&n!=="submit"&&!s&&this.setMeta(c=>({...c,errorMap:{...c.errorMap,[l]:void 0},errorSourceMap:{...c.errorSourceMap,[l]:void 0}})),{hasErrored:s}},this.validateAsync=async(n,o)=>{const i=Kp(n,{...this.options,form:this.form,validationLogic:this.form.options.validationLogic||Ha}),a=await o,r=this.getLinkedFields(n),s=r.reduce((h,p)=>{const m=Kp(n,{...p.options,form:p.form,validationLogic:p.form.options.validationLogic||Ha});return m.forEach(g=>{g.field=p}),h.concat(m)},[]);this.state.meta.isValidating||this.setMeta(h=>({...h,isValidating:!0}));for(const h of r)h.setMeta(p=>({...p,isValidating:!0}));const l=[],c=[],d=(h,p,m)=>{const g=bc(p.cause);h.getInfo().validationMetaMap[g]?.lastAbortController.abort();const v=new AbortController;this.getInfo().validationMetaMap[g]={lastAbortController:v},m.push(new Promise(async y=>{let w;try{w=await new Promise((S,V)=>{this.timeoutIds.validations[p.cause]&&clearTimeout(this.timeoutIds.validations[p.cause]),this.timeoutIds.validations[p.cause]=setTimeout(async()=>{if(v.signal.aborted)return S(void 0);try{S(await this.runValidator({validate:p.validate,value:{value:h.store.state.value,fieldApi:h,signal:v.signal,validationSource:"field"},type:"validateAsync"}))}catch(H){V(H)}},p.debounceMs)})}catch(S){w=S}if(v.signal.aborted)return y(void 0);const C=x0(w),k=a[this.name]?.[g],{newErrorValue:O,newSource:P}=b0({formLevelError:k,fieldLevelError:C});h.setMeta(S=>({...S,errorMap:{...S?.errorMap,[g]:O},errorSourceMap:{...S.errorSourceMap,[g]:P}})),y(O)}))};for(const h of i)h.validate&&d(this,h,l);for(const h of s)h.validate&&d(h.field,h,c);let u=[];(l.length||c.length)&&(u=await Promise.all(l),await Promise.all(c)),this.setMeta(h=>({...h,isValidating:!1}));for(const h of r)h.setMeta(p=>({...p,isValidating:!1}));return u.filter(Boolean)},this.validate=(n,o)=>{if(!this.state.meta.isTouched)return[];const{fieldsErrorMap:i}=o?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(n),{hasErrored:a}=this.validateSync(n,i[this.name]??{});if(a&&!this.options.asyncAlways)return this.getInfo().validationMetaMap[bc(n)]?.lastAbortController.abort(),this.state.meta.errors;const r=o?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(n);return this.validateAsync(n,r)},this.handleChange=n=>{this.setValue(n)},this.handleBlur=()=>{this.state.meta.isTouched||this.setMeta(o=>({...o,isTouched:!0})),this.state.meta.isBlurred||this.setMeta(o=>({...o,isBlurred:!0})),this.validate("blur"),this.triggerOnBlurListener()},this.parseValueWithSchema=n=>qa.validate({value:this.state.value,validationSource:"field"},n),this.parseValueWithSchemaAsync=n=>qa.validateAsync({value:this.state.value,validationSource:"field"},n),this.form=t.form,this.name=t.name,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.store=new Io({deps:[this.form.store],fn:()=>{const n=this.form.getFieldValue(this.name),o=this.form.getFieldMeta(this.name)??{...Ad,...t.defaultMeta};return{value:n,meta:o}}}),this.options=t}get state(){return this.store.state}runValidator(t){return J_(t.validate)?qa[t.type](t.value,t.validate):t.validate(t.value)}setErrorMap(t){this.setMeta(n=>({...n,errorMap:{...n.errorMap,...t}}))}triggerOnBlurListener(){const t=this.form.options.listeners?.onBlurDebounceMs;t&&t>0?(this.timeoutIds.formListeners.blur&&clearTimeout(this.timeoutIds.formListeners.blur),this.timeoutIds.formListeners.blur=setTimeout(()=>{this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this})},t)):this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this});const n=this.options.listeners?.onBlurDebounceMs;n&&n>0?(this.timeoutIds.listeners.blur&&clearTimeout(this.timeoutIds.listeners.blur),this.timeoutIds.listeners.blur=setTimeout(()=>{this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},n)):this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})}triggerOnChangeListener(){const t=this.form.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this})},t)):this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this});const n=this.options.listeners?.onChangeDebounceMs;n&&n>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},n)):this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})}}function x0(e){if(e)return e}function bc(e){switch(e){case"submit":return"onSubmit";case"blur":return"onBlur";case"mount":return"onMount";case"server":return"onServer";case"dynamic":return"onDynamic";case"change":default:return"onChange"}}function Xp(e,t=n=>n){const n=fe(t(e.state));return Ne(()=>e,(o,i,a)=>{const r=o.subscribe(()=>{const s=t(o.state);_G(Ck(n.value),s)||(n.value=s)});a(()=>{r()})},{immediate:!0}),E0(n)}function _G(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[o,i]of e)if(!t.has(o)||!Object.is(i,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const o of e)if(!t.has(o))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!Object.is(e[n[o]],t[n[o]]))return!1;return!0}function Q_(e){const t=(()=>{const a=new CG({...e,form:e.form,name:e.name});return a.Field=ek,a})(),n=Xp(t.store,i=>i);let o;return rr(()=>{o=t.mount()}),Qp(()=>{o()}),Ne(()=>e,()=>{t.update({...e,form:e.form})}),{api:t,state:n}}const ek=T((e,t)=>{const n=Q_({...e,...t.attrs});return()=>t.slots.default({field:n.api,state:n.state.value})},{name:"Field",inheritAttrs:!1});function kG(e){const t=(()=>{const n=new wG(e),o=n;return o.Field=T((i,a)=>()=>At(ek,{...i,...a.attrs,form:n},a.slots),{name:"APIField",inheritAttrs:!1}),o.useField=i=>Q_({...i,form:n}),o.useStore=i=>Xp(n.store,i),o.Subscribe=T((i,a)=>{const s={...i,...a.attrs}.selector??(c=>c),l=Xp(n.store,s);return()=>a.slots.default(l.value)},{name:"Subscribe",inheritAttrs:!1}),o})();return rr(t.mount),t.update(e),t}const $G=T({__name:"DynamicFormWrapper",props:{configMap:{},baseKey:{},currentStep:{}},setup(e,{expose:t}){const n=e,o=kG({defaultValues:gu(n.configMap)}),i=O0("formRef");Jp(Lt,o);async function a(){const r=await i.value.validate();return n.currentStep?ag(r,[...n.currentStep.properties,"credential_guid_body","credential_property_id"]):r}return t({validate:a,form:o}),(r,s)=>{const l=G_;return x(),$(l,z({ref:"formRef"},n),null,16)}}}),SG=Object.assign($G,{__name:"DynamicFormWrapper"});async function EG(){const{data:e}=await mr("configmaps",()=>$fetch("/workflows/v1/configmaps")),t=E(()=>{const a=e.value?.data??[];return(Array.isArray(a)?a:a.configmaps).find(s=>!s.startsWith("atlan-connectors-")&&!s.startsWith("csa-connectors-")&&s!=="manifest")??"workflow"}),{credentialConfig:n,data:o}=await o_(t),i=E(()=>{const a=o.value?.data,r=a&&"kind"in a?a.metadata?.name:void 0,s=a&&"kind"in a?a.metadata?.name:a?.name,l=a&&"kind"in a?a.metadata?.logo:a?.logo;return{id:r||t.value,name:n.value?.name||s||t.value,logo:n.value?.logo||l||"",config:n.value}});return{workflowConfig:n,workflowMeta:i}}const OG={class:"min-h-screen bg-gray-50 py-8 flex flex-col"},TG={class:"w-[700px] mx-auto px-4 flex flex-col flex-1"},IG={class:"flex items-center justify-between mb-8"},PG={class:"flex items-center gap-4"},DG=["src"],AG={class:"mb-8 overflow-x-auto pb-3"},RG={class:"bg-white rounded-lg shadow-sm p-8 flex gap-8 grow"},VG={class:"flex-1 w-full"},MG={class:"flex justify-between py-3 border-t"},NG={key:2,class:"flex ml-auto gap-x-2"},LG={key:3,class:"flex ml-auto gap-x-2"},QG=T({__name:"index",async setup(e){let t,n;const{workflowConfig:o,workflowMeta:i}=([t,n]=sr(()=>EG()),t=await t,n(),t);_k(()=>({title:i.value.name?`${i.value.name} | App Playground`:"App Playground"}));const a=fe(1),r=E(()=>o.value.steps||[]),s=E(()=>r.value?r.value[a.value-1]:{}),l=E(()=>r.value.map(b=>({...b,value:b.id}))),c=fe(!1),d=fe({}),u=fe(""),h=fe(!1),p=O0("formRef");async function m(){let b=p7(await p.value.validate(),C=>kd(C)||_d(C)?JSON.stringify(C):C);const v=b.credential_guid_body,y=b.credential_property_id;b=QC(b,["credential_guid_body","credential_property_id",y]),d.value={...d.value,[s.value.id]:b};let w;return v&&(w={...JSON.parse(v),credentialSource:"direct"}),{credentialBody:w,startPayload:{...d.value,connection:{connection_name:"test-connection",connection_qualified_name:`default/${i.value.id}/${Math.round(new Date().getTime()/1e3)}`},metadata:Object.assign({},...Object.values(d.value))}}}Jp(JC,m);async function g(){c.value=!0,u.value="";try{const{credentialBody:b,startPayload:v}=await m();if(a.value===r.value.length){try{let y,w;if(b)try{const{data:C}=await $fetch("/workflows/v1/dev/local-vault",{method:"POST",body:b});y=C.credential_guid}catch(C){const k=C?.status??C?.statusCode;if(k!==404&&k!==405)throw C;w=b}await $fetch("/workflows/v1/start",{method:"POST",body:{...v,...y?{credential_guid:y}:{},...w?{credentials:w}:{}}}),a.value=1,d.value={},p.value.form.reset(),Ua.success("Workflow started successfully!",{placement:"top",duration:3e3})}catch{Ua.failed("Failed to start workflow. Please try again.",{placement:"top",duration:3e3})}return}a.value=a.value+1}catch(b){Ua.failed("Failed to validate form: "+b.message,{placement:"top"})}finally{c.value=!1}}return(b,v)=>{const y=SG;return x(),D("div",OG,[N("div",TG,[N("div",IG,[N("div",PG,[N("img",{src:f(i).logo,alt:"App Logo",class:"w-16 h-16"},null,8,DG),F(f(MF),{as:"h1",size:"xl"},{default:_(()=>[Re(ie(f(i).name)+" App ",1)]),_:1})])]),N("div",AG,[F(f(W5),{items:f(l),"model-value":f(a),orientation:"horizontal",type:"default",onStepChange:v[0]||(v[0]=w=>a.value=w)},null,8,["items","model-value"])]),N("div",RG,[N("div",VG,[F(y,{ref:"formRef","current-step":f(s),"config-map":f(o)},null,8,["current-step","config-map"])])]),N("div",MG,[f(a)>0?(x(),$(f(Ut),{key:0,type:"subtle",label:"Back",onClick:v[1]||(v[1]=()=>{a.value=f(a)-1})})):X("",!0),f(a)<f(r).length?(x(),$(f(Ut),{key:1,label:"Next",class:"ml-auto","is-loading":f(c),onClick:g},null,8,["is-loading"])):f(a)===f(r).length&&!f(h)?(x(),D("div",NG,[f(u)?(x(),$(f(Ut),{key:1,label:"Retry",type:"subtle","is-loading":f(c),onClick:g},null,8,["is-loading"])):(x(),$(f(Ut),{key:0,label:"Start Workflow","is-loading":f(c),onClick:g},null,8,["is-loading"]))])):f(h)?(x(),D("div",LG,[F(f(Ut),{label:"Workflow Started!",type:"success",disabled:!0})])):X("",!0)])])])}}});export{QG as default};
|