diff --git a/dist/js/tool.js b/dist/js/tool.js index 5479fda..2245e13 100644 --- a/dist/js/tool.js +++ b/dist/js/tool.js @@ -13,7 +13,7 @@ color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,o?.key)}return(c=o?.onChange)==null||c.call(o,r),r}}function ss(e,t){if(e===void 0)throw new Error(`Unexpected undefined${t?`: ${t}`:""}`);return e}const _m=(e,t)=>Math.abs(e-t)<1,wm=e=>e,Tm=e=>{const t=Math.max(e.startIndex-e.overscan,0),o=Math.min(e.endIndex+e.overscan,e.count-1),a=[];for(let r=t;r<=o;r++)a.push(r);return a},xm=(e,t)=>{const o=e.scrollElement;if(!o)return;const a=l=>{const{width:s,height:i}=l;t({width:Math.round(s),height:Math.round(i)})};if(a(o.getBoundingClientRect()),typeof ResizeObserver>"u")return()=>{};const r=new ResizeObserver(l=>{const s=l[0];if(s?.borderBoxSize){const i=s.borderBoxSize[0];if(i){a({width:i.inlineSize,height:i.blockSize});return}}a(o.getBoundingClientRect())});return r.observe(o,{box:"border-box"}),()=>{r.unobserve(o)}},Om=(e,t)=>{const o=e.scrollElement;if(!o)return;const a=()=>{t(o[e.options.horizontal?"scrollLeft":"scrollTop"])};return a(),o.addEventListener("scroll",a,{passive:!0}),()=>{o.removeEventListener("scroll",a)}},Sm=(e,t,o)=>{if(t?.borderBoxSize){const a=t.borderBoxSize[0];if(a)return Math.round(a[o.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[o.options.horizontal?"width":"height"])},Nm=(e,{adjustments:t=0,behavior:o},a)=>{var r,l;const s=e+t;(l=(r=a.scrollElement)==null?void 0:r.scrollTo)==null||l.call(r,{[a.options.horizontal?"left":"top"]:s,behavior:o})};class Rm{constructor(t){this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.isScrollingTimeoutId=null,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let o=null;const a=()=>o||(typeof ResizeObserver<"u"?o=new ResizeObserver(r=>{r.forEach(l=>{this._measureElement(l.target,l)})}):null);return{disconnect:()=>{var r;return(r=a())==null?void 0:r.disconnect()},observe:r=>{var l;return(l=a())==null?void 0:l.observe(r,{box:"border-box"})},unobserve:r=>{var l;return(l=a())==null?void 0:l.unobserve(r)}}})(),this.range=null,this.setOptions=o=>{Object.entries(o).forEach(([a,r])=>{typeof r>"u"&&delete o[a]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:wm,rangeExtractor:Tm,onChange:()=>{},measureElement:Sm,initialRect:{width:0,height:0},scrollMargin:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,...o}},this.notify=o=>{var a,r;(r=(a=this.options).onChange)==null||r.call(a,this,o)},this.maybeNotify=bo(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),o=>{this.notify(o)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(o=>o()),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{const o=this.options.getScrollElement();this.scrollElement!==o&&(this.cleanup(),this.scrollElement=o,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,a=>{this.scrollRect=a,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,a=>{this.scrollAdjustments=0,this.scrollOffset!==a&&(this.isScrollingTimeoutId!==null&&(clearTimeout(this.isScrollingTimeoutId),this.isScrollingTimeoutId=null),this.isScrolling=!0,this.scrollDirection=this.scrollOffset{this.isScrollingTimeoutId=null,this.isScrolling=!1,this.scrollDirection=null,this.maybeNotify()},this.options.scrollingDelay))})))},this.getSize=()=>this.scrollRect[this.options.horizontal?"width":"height"],this.memoOptions=bo(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey],(o,a,r,l)=>(this.pendingMeasuredCacheIndexes=[],{count:o,paddingStart:a,scrollMargin:r,getItemKey:l}),{key:!1}),this.getFurthestMeasurement=(o,a)=>{const r=new Map,l=new Map;for(let s=a-1;s>=0;s--){const i=o[s];if(r.has(i.lane))continue;const c=l.get(i.lane);if(c==null||i.end>c.end?l.set(i.lane,i):i.ends.end===i.end?s.index-i.index:s.end-i.end)[0]:void 0},this.getMeasurements=bo(()=>[this.memoOptions(),this.itemSizeCache],({count:o,paddingStart:a,scrollMargin:r,getItemKey:l},s)=>{const i=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,i);for(let d=i;dthis.options.debug}),this.calculateRange=bo(()=>[this.getMeasurements(),this.getSize(),this.scrollOffset],(o,a,r)=>this.range=o.length>0&&a>0?Im({measurements:o,outerSize:a,scrollOffset:r}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=bo(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(o,a,r,l)=>a===null?[]:o({...a,overscan:r,count:l}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=o=>{const a=this.options.indexAttribute,r=o.getAttribute(a);return r?parseInt(r,10):(console.warn(`Missing attribute name '${a}={index}' on measured element.`),-1)},this._measureElement=(o,a)=>{const r=this.measurementsCache[this.indexFromElement(o)];if(!r||!o.isConnected){this.measureElementCache.forEach((i,c)=>{i===o&&(this.observer.unobserve(o),this.measureElementCache.delete(c))});return}const l=this.measureElementCache.get(r.key);l!==o&&(l&&this.observer.unobserve(l),this.observer.observe(o),this.measureElementCache.set(r.key,o));const s=this.options.measureElement(o,a,this);this.resizeItem(r,s)},this.resizeItem=(o,a)=>{const r=this.itemSizeCache.get(o.key)??o.size,l=a-r;l!==0&&(o.start{o&&this._measureElement(o,void 0)},this.getVirtualItems=bo(()=>[this.getIndexes(),this.getMeasurements()],(o,a)=>{const r=[];for(let l=0,s=o.length;lthis.options.debug}),this.getVirtualItemForOffset=o=>{const a=this.getMeasurements();return ss(a[Al(0,a.length-1,r=>ss(a[r]).start,o)])},this.getOffsetForAlignment=(o,a)=>{const r=this.getSize();a==="auto"&&(o<=this.scrollOffset?a="start":o>=this.scrollOffset+r?a="end":a="start"),a==="start"?o=o:a==="end"?o=o-r:a==="center"&&(o=o-r/2);const l=this.options.horizontal?"scrollWidth":"scrollHeight",i=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[l]:this.scrollElement[l]:0)-this.getSize();return Math.max(Math.min(i,o),0)},this.getOffsetForIndex=(o,a="auto")=>{o=Math.max(0,Math.min(o,this.options.count-1));const r=ss(this.getMeasurements()[o]);if(a==="auto")if(r.end>=this.scrollOffset+this.getSize()-this.options.scrollPaddingEnd)a="end";else if(r.start<=this.scrollOffset+this.options.scrollPaddingStart)a="start";else return[this.scrollOffset,a];const l=a==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,a),a]},this.isDynamicMode=()=>this.measureElementCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&(clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(o,{align:a="start",behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(o,a),{adjustments:void 0,behavior:r})},this.scrollToIndex=(o,{align:a="auto",behavior:r}={})=>{o=Math.max(0,Math.min(o,this.options.count-1)),this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const[l,s]=this.getOffsetForIndex(o,a);this._scrollToOffset(l,{adjustments:void 0,behavior:r}),r!=="smooth"&&this.isDynamicMode()&&(this.scrollToIndexTimeoutId=setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.measureElementCache.has(this.options.getItemKey(o))){const[c]=this.getOffsetForIndex(o,s);_m(c,this.scrollOffset)||this.scrollToIndex(o,{align:s,behavior:r})}else this.scrollToIndex(o,{align:s,behavior:r})}))},this.scrollBy=(o,{behavior:a}={})=>{this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.scrollOffset+o,{adjustments:void 0,behavior:a})},this.getTotalSize=()=>{var o;const a=this.getMeasurements();let r;return a.length===0?r=this.options.paddingStart:r=this.options.lanes===1?((o=a[a.length-1])==null?void 0:o.end)??0:Math.max(...a.slice(-this.options.lanes).map(l=>l.end)),r-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(o,{adjustments:a,behavior:r})=>{this.options.scrollToFn(o,{behavior:r,adjustments:a},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(o=>{this.itemSizeCache.set(o.key,o.size)}),this.maybeNotify()}}const Al=(e,t,o,a)=>{for(;e<=t;){const r=(e+t)/2|0,l=o(r);if(la)t=r-1;else return r}return e>0?e-1:0};function Im({measurements:e,outerSize:t,scrollOffset:o}){const a=e.length-1,l=Al(0,a,i=>e[i].start,o);let s=l;for(;sn.unref(e).getScrollElement(),r=>{r&&t._willUpdate()},{immediate:!0}),n.watch(()=>n.unref(e),r=>{t.setOptions({...r,onChange:(l,s)=>{var i;n.triggerRef(o),(i=r.onChange)==null||i.call(r,l,s)}}),t._willUpdate(),n.triggerRef(o)},{immediate:!0}),n.onScopeDispose(a),o}function km(e){return Cm(n.computed(()=>({observeElementRect:xm,observeElementOffset:Om,scrollToFn:Nm,...n.unref(e)})))}function Am(e,t,o){let a=n.ref(o?.value),r=n.computed(()=>e.value!==void 0);return[n.computed(()=>r.value?e.value:a.value),function(l){return r.value||(a.value=l),t?.(l)}]}function is(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Tn(){let e=[],t={addEventListener(o,a,r,l){return o.addEventListener(a,r,l),t.add(()=>o.removeEventListener(a,r,l))},requestAnimationFrame(...o){let a=requestAnimationFrame(...o);t.add(()=>cancelAnimationFrame(a))},nextFrame(...o){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...o)})},setTimeout(...o){let a=setTimeout(...o);t.add(()=>clearTimeout(a))},microTask(...o){let a={current:!0};return is(()=>{a.current&&o[0]()}),t.add(()=>{a.current=!1})},style(o,a,r){let l=o.style.getPropertyValue(a);return Object.assign(o.style,{[a]:r}),this.add(()=>{Object.assign(o.style,{[a]:l})})},group(o){let a=Tn();return o(a),this.add(()=>a.dispose())},add(o){return e.push(o),()=>{let a=e.indexOf(o);if(a>=0)for(let r of e.splice(a,1))r()}},dispose(){for(let o of e.splice(0))o()}};return t}function Dm(){let e=Tn();return n.onUnmounted(()=>e.dispose()),e}function Bm(){let e=Dm();return t=>{e.dispose(),e.nextFrame(t)}}let Pm=Symbol("headlessui.useid"),Mm=0;function lt(){return n.inject(Pm,()=>`${++Mm}`)()}function ae(e){var t;if(e==null||e.value==null)return null;let o=(t=e.value.$el)!=null?t:e.value;return o instanceof Node?o:null}function $e(e,t,...o){if(e in t){let r=t[e];return typeof r=="function"?r(...o):r}let a=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(r=>`"${r}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,$e),a}var Lm=Object.defineProperty,Fm=(e,t,o)=>t in e?Lm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Dl=(e,t,o)=>(Fm(e,typeof t!="symbol"?t+"":t,o),o);let Um=class{constructor(){Dl(this,"current",this.detect()),Dl(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},Zo=new Um;function rn(e){if(Zo.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=ae(e);if(t)return t.ownerDocument}return document}let ls=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Jt=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Jt||{}),Bl=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Bl||{}),Hm=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Hm||{});function Pl(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(ls)).sort((t,o)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(o.tabIndex||Number.MAX_SAFE_INTEGER)))}var cs=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(cs||{});function ds(e,t=0){var o;return e===((o=rn(e))==null?void 0:o.body)?!1:$e(t,{0(){return e.matches(ls)},1(){let a=e;for(;a!==null;){if(a.matches(ls))return!0;a=a.parentElement}return!1}})}function Ml(e){let t=rn(e);n.nextTick(()=>{t&&!ds(t.activeElement,0)&&xn(e)})}var Vm=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Vm||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function xn(e){e?.focus({preventScroll:!0})}let jm=["textarea","input"].join(",");function Gm(e){var t,o;return(o=(t=e?.matches)==null?void 0:t.call(e,jm))!=null?o:!1}function us(e,t=o=>o){return e.slice().sort((o,a)=>{let r=t(o),l=t(a);if(r===null||l===null)return 0;let s=r.compareDocumentPosition(l);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function zm(e,t){return qo(Pl(),t,{relativeTo:e})}function qo(e,t,{sorted:o=!0,relativeTo:a=null,skipElements:r=[]}={}){var l;let s=(l=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e?.ownerDocument)!=null?l:document,i=Array.isArray(e)?o?us(e):e:Pl(e);r.length>0&&i.length>1&&(i=i.filter(u=>!r.includes(u))),a=a??s.activeElement;let c=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,i.indexOf(a))-1;if(t&4)return Math.max(0,i.indexOf(a))+1;if(t&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),f=t&32?{preventScroll:!0}:{},p=0,h=i.length,g;do{if(p>=h||p+h<=0)return 0;let u=d+p;if(t&16)u=(u+h)%h;else{if(u<0)return 3;if(u>=h)return 1}g=i[u],g?.focus(f),p+=c}while(g!==s.activeElement);return t&6&&Gm(g)&&g.select(),2}function Ll(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Wm(){return/Android/gi.test(window.navigator.userAgent)}function Fl(){return Ll()||Wm()}function za(e,t,o){Zo.isServer||n.watchEffect(a=>{document.addEventListener(e,t,o),a(()=>document.removeEventListener(e,t,o))})}function Ul(e,t,o){Zo.isServer||n.watchEffect(a=>{window.addEventListener(e,t,o),a(()=>window.removeEventListener(e,t,o))})}function fs(e,t,o=n.computed(()=>!0)){function a(l,s){if(!o.value||l.defaultPrevented)return;let i=s(l);if(i===null||!i.getRootNode().contains(i))return;let c=function d(f){return typeof f=="function"?d(f()):Array.isArray(f)||f instanceof Set?f:[f]}(e);for(let d of c){if(d===null)continue;let f=d instanceof HTMLElement?d:ae(d);if(f!=null&&f.contains(i)||l.composed&&l.composedPath().includes(f))return}return!ds(i,cs.Loose)&&i.tabIndex!==-1&&l.preventDefault(),t(l,i)}let r=n.ref(null);za("pointerdown",l=>{var s,i;o.value&&(r.value=((i=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:i[0])||l.target)},!0),za("mousedown",l=>{var s,i;o.value&&(r.value=((i=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:i[0])||l.target)},!0),za("click",l=>{Fl()||r.value&&(a(l,()=>r.value),r.value=null)},!0),za("touchend",l=>a(l,()=>l.target instanceof HTMLElement?l.target:null),!0),Ul("blur",l=>a(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Hl(e,t){if(e)return e;let o=t??"button";if(typeof o=="string"&&o.toLowerCase()==="button")return"button"}function ps(e,t){let o=n.ref(Hl(e.value.type,e.value.as));return n.onMounted(()=>{o.value=Hl(e.value.type,e.value.as)}),n.watchEffect(()=>{var a;o.value||ae(t)&&ae(t)instanceof HTMLButtonElement&&!((a=ae(t))!=null&&a.hasAttribute("type"))&&(o.value="button")}),o}function Vl(e){return[e.screenX,e.screenY]}function jl(){let e=n.ref([-1,-1]);return{wasMoved(t){let o=Vl(t);return e.value[0]===o[0]&&e.value[1]===o[1]?!1:(e.value=o,!0)},update(t){e.value=Vl(t)}}}function Gl({container:e,accept:t,walk:o,enabled:a}){n.watchEffect(()=>{let r=e.value;if(!r||a!==void 0&&!a.value)return;let l=rn(e);if(!l)return;let s=Object.assign(c=>t(c),{acceptNode:t}),i=l.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,s,!1);for(;i.nextNode();)o(i.currentNode)})}var It=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(It||{}),On=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(On||{});function Pe({visible:e=!0,features:t=0,ourProps:o,theirProps:a,...r}){var l;let s=Wl(a,o),i=Object.assign(r,{props:s});if(e||t&2&&s.static)return hs(i);if(t&1){let c=(l=s.unmount)==null||l?0:1;return $e(c,{0(){return null},1(){return hs({...r,props:{...s,hidden:!0,style:{display:"none"}}})}})}return hs(i)}function hs({props:e,attrs:t,slots:o,slot:a,name:r}){var l,s;let{as:i,...c}=$o(e,["unmount","static"]),d=(l=o.default)==null?void 0:l.call(o,a),f={};if(a){let p=!1,h=[];for(let[g,u]of Object.entries(a))typeof u=="boolean"&&(p=!0),u===!0&&h.push(g);p&&(f["data-headlessui-state"]=h.join(" "))}if(i==="template"){if(d=zl(d??[]),Object.keys(c).length>0||Object.keys(t).length>0){let[p,...h]=d??[];if(!Km(p)||h.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${r} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(c).concat(Object.keys(t)).map(m=>m.trim()).filter((m,y,b)=>b.indexOf(m)===y).sort((m,y)=>m.localeCompare(y)).map(m=>` - ${m}`).join(` `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(m=>` - ${m}`).join(` `)].join(` -`));let g=Wl((s=p.props)!=null?s:{},c,f),u=n.cloneVNode(p,g,!0);for(let m in g)m.startsWith("on")&&(u.props||(u.props={}),u.props[m]=g[m]);return u}return Array.isArray(d)&&d.length===1?d[0]:d}return n.h(i,Object.assign({},c,f),{default:()=>d})}function zl(e){return e.flatMap(t=>t.type===n.Fragment?zl(t.children):[t])}function Wl(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},o={};for(let a of e)for(let r in a)r.startsWith("on")&&typeof a[r]=="function"?(o[r]!=null||(o[r]=[]),o[r].push(a[r])):t[r]=a[r];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(o).map(a=>[a,void 0])));for(let a in o)Object.assign(t,{[a](r,...l){let s=o[a];for(let i of s){if(r instanceof Event&&r.defaultPrevented)return;i(r,...l)}}});return t}function Xm(e){let t=Object.assign({},e);for(let o in t)t[o]===void 0&&delete t[o];return t}function $o(e,t=[]){let o=Object.assign({},e);for(let a of t)a in o&&delete o[a];return o}function Km(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var ea=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ea||{});let Wa=n.defineComponent({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:o}){return()=>{var a;let{features:r,...l}=e,s={"aria-hidden":(r&2)===2?!0:(a=l["aria-hidden"])!=null?a:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Pe({ourProps:s,theirProps:l,slot:{},attrs:o,slots:t,name:"Hidden"})}}}),Xl=Symbol("Context");var Ue=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ue||{});function Ym(){return yo()!==null}function yo(){return n.inject(Xl,null)}function Xa(e){n.provide(Xl,e)}var xe=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(xe||{}),Kl=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Kl||{});function Jm(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let sn=[];Jm(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&sn[0]!==t.target&&(sn.unshift(t.target),sn=sn.filter(o=>o!=null&&o.isConnected),sn.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function Qm(e){throw new Error("Unexpected object: "+e)}var ke=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(ke||{});function ms(e,t){let o=t.resolveItems();if(o.length<=0)return null;let a=t.resolveActiveIndex(),r=a??-1;switch(e.focus){case 0:{for(let l=0;l=0;--l)if(!t.resolveDisabled(o[l],l,o))return l;return a}case 2:{for(let l=r+1;l=0;--l)if(!t.resolveDisabled(o[l],l,o))return l;return a}case 4:{for(let l=0;l(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(qm||{}),$m=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))($m||{}),eg=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(eg||{});let Zl=Symbol("ComboboxContext");function jn(e){let t=n.inject(Zl,null);if(t===null){let o=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,jn),o}return t}let ql=Symbol("VirtualContext"),tg=n.defineComponent({name:"VirtualProvider",setup(e,{slots:t}){let o=jn("VirtualProvider"),a=n.computed(()=>{let i=ae(o.optionsRef);if(!i)return{start:0,end:0};let c=window.getComputedStyle(i);return{start:parseFloat(c.paddingBlockStart||c.paddingTop),end:parseFloat(c.paddingBlockEnd||c.paddingBottom)}}),r=km(n.computed(()=>({scrollPaddingStart:a.value.start,scrollPaddingEnd:a.value.end,count:o.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return ae(o.optionsRef)},overscan:12}))),l=n.computed(()=>{var i;return(i=o.virtual.value)==null?void 0:i.options}),s=n.ref(0);return n.watch([l],()=>{s.value+=1}),n.provide(ql,o.virtual.value?r:null),()=>[n.h("div",{style:{position:"relative",width:"100%",height:`${r.value.getTotalSize()}px`},ref:i=>{if(i){if(typeof process<"u"&&{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_5dec95a9-ec66-4c0d-a8c3-bf06b2f9b215",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.7.0 node/v18.20.4 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_5dec95a9-ec66-4c0d-a8c3-bf06b2f9b215",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/18.20.4/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/nova-file-manager/nova-file-manager/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"oneduo",GRADLE_HOME:"/usr/share/gradle-8.9",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/27.0.12077973",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"113685820",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu22",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/nova-file-manager/nova-file-manager",SYSTEMD_EXEC_PID:"594",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",GOROOT_1_20_X64:"/opt/hostedtoolcache/go/1.20.14/x64",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.12/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20240804.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.5/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",JOURNAL_STREAM:"8:17403",GITHUB_WORKFLOW:"Update Assets",_:"/opt/hostedtoolcache/node/18.20.4/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/18.20.4/x64",npm_config_npm_version:"10.7.0",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"10303114820",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"6650b6e15bdfd1cca03f88d4bdf0a214625ac560",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",GITHUB_WORKFLOW_REF:"oneduo/nova-file-manager/.github/workflows/update-assets.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/nova-file-manager/nova-file-manager/node_modules/.bin:/home/runner/work/nova-file-manager/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/runner/work/nova-file-manager/nova-file-manager/node_modules/.bin:/home/runner/work/nova-file-manager/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/18.20.4/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_103ed1ca-d9c0-4972-b1cf-7c9997d58896",INVOCATION_ID:"17e7c757d730429e8107d491f659e0b0",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/18.20.4/x64/bin/node",npm_package_name:"nova-file-manager",GITHUB_ACTION:"__run",GITHUB_RUN_NUMBER:"662",GITHUB_TRIGGERING_ACTOR:"mikaelpopowicz",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 5",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"oneduo/nova-file-manager",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.0.12077973",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"505375003",GITHUB_ACTIONS:"true",npm_package_version:"0.8.0",npm_lifecycle_event:"build",GITHUB_REF_PROTECTED:"false",GITHUB_WORKSPACE:"/home/runner/work/nova-file-manager/nova-file-manager",ACCEPT_EULA:"Y",GITHUB_JOB:"update",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"6650b6e15bdfd1cca03f88d4bdf0a214625ac560",GITHUB_RUN_ATTEMPT:"1",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"mikaelpopowicz",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",LEIN_HOME:"/usr/local/lib/lein",npm_config_globalconfig:"/opt/hostedtoolcache/node/18.20.4/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_5dec95a9-ec66-4c0d-a8c3-bf06b2f9b215",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/nova-file-manager/nova-file-manager",GITHUB_ACTOR_ID:"5689944",RUNNER_WORKSPACE:"/home/runner/work/nova-file-manager",npm_execpath:"/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_5dec95a9-ec66-4c0d-a8c3-bf06b2f9b215",npm_config_global_prefix:"/opt/hostedtoolcache/node/18.20.4/x64",TAILWIND_MODE:"build",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.0.12077973",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",STATS_EXTP:"https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.181+6/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.0.12077973",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_5dec95a9-ec66-4c0d-a8c3-bf06b2f9b215",INIT_CWD:"/home/runner/work/nova-file-manager/nova-file-manager",EDITOR:"vi",NODE_ENV:"production"}.JEST_WORKER_ID!==void 0||o.activationTrigger.value===0)return;o.activeOptionIndex.value!==null&&o.virtual.value.options.length>o.activeOptionIndex.value&&r.value.scrollToIndex(o.activeOptionIndex.value)}}},r.value.getVirtualItems().map(i=>n.cloneVNode(t.default({option:o.virtual.value.options[i.index],open:o.comboboxState.value===0})[0],{key:`${s.value}-${i.index}`,"data-index":i.index,"aria-setsize":o.virtual.value.options.length,"aria-posinset":i.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${i.start}px)`,overflowAnchor:"none"}})))]}}),ng=n.defineComponent({name:"Combobox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],nullable:!0,default:null},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1},virtual:{type:Object,default:null}},inheritAttrs:!1,setup(e,{slots:t,attrs:o,emit:a}){let r=n.ref(1),l=n.ref(null),s=n.ref(null),i=n.ref(null),c=n.ref(null),d=n.ref({static:!1,hold:!1}),f=n.ref([]),p=n.ref(null),h=n.ref(2),g=n.ref(!1);function u(A=M=>M){let M=p.value!==null?f.value[p.value]:null,X=A(f.value.slice()),P=X.length>0&&X[0].dataRef.order.value!==null?X.sort((j,W)=>j.dataRef.order.value-W.dataRef.order.value):us(X,j=>ae(j.dataRef.domRef)),U=M?P.indexOf(M):null;return U===-1&&(U=null),{options:P,activeOptionIndex:U}}let m=n.computed(()=>e.multiple?1:0),y=n.computed(()=>e.nullable),[b,v]=Am(n.computed(()=>e.modelValue),A=>a("update:modelValue",A),n.computed(()=>e.defaultValue)),O=n.computed(()=>b.value===void 0?$e(m.value,{1:[],0:void 0}):b.value),x=null,T=null;function N(A){return $e(m.value,{0(){return v?.(A)},1:()=>{let M=n.toRaw(C.value.value).slice(),X=n.toRaw(A),P=M.findIndex(U=>C.compare(X,n.toRaw(U)));return P===-1?M.push(X):M.splice(P,1),v?.(M)}})}let I=n.computed(()=>{});n.watch([I],([A],[M])=>{if(C.virtual.value&&A&&M&&p.value!==null){let X=A.indexOf(M[p.value]);X!==-1?p.value=X:p.value=null}});let C={comboboxState:r,value:O,mode:m,compare(A,M){if(typeof e.by=="string"){let X=e.by;return A?.[X]===M?.[X]}return e.by===null?Zm(A,M):e.by(A,M)},calculateIndex(A){return C.virtual.value?e.by===null?C.virtual.value.options.indexOf(A):C.virtual.value.options.findIndex(M=>C.compare(M,A)):f.value.findIndex(M=>C.compare(M.dataRef.value,A))},defaultValue:n.computed(()=>e.defaultValue),nullable:y,immediate:n.computed(()=>!1),virtual:n.computed(()=>null),inputRef:s,labelRef:l,buttonRef:i,optionsRef:c,disabled:n.computed(()=>e.disabled),options:f,change(A){v(A)},activeOptionIndex:n.computed(()=>{if(g.value&&p.value===null&&(C.virtual.value?C.virtual.value.options.length>0:f.value.length>0)){if(C.virtual.value){let M=C.virtual.value.options.findIndex(X=>{var P;return!((P=C.virtual.value)!=null&&P.disabled(X))});if(M!==-1)return M}let A=f.value.findIndex(M=>!M.dataRef.disabled);if(A!==-1)return A}return p.value}),activationTrigger:h,optionsPropsRef:d,closeCombobox(){g.value=!1,!e.disabled&&r.value!==1&&(r.value=1,p.value=null)},openCombobox(){if(g.value=!0,!e.disabled&&r.value!==0){if(C.value.value){let A=C.calculateIndex(C.value.value);A!==-1&&(p.value=A)}r.value=0}},setActivationTrigger(A){h.value=A},goToOption(A,M,X){g.value=!1,x!==null&&cancelAnimationFrame(x),x=requestAnimationFrame(()=>{if(e.disabled||c.value&&!d.value.static&&r.value===1)return;if(C.virtual.value){p.value=A===ke.Specific?M:ms({focus:A},{resolveItems:()=>C.virtual.value.options,resolveActiveIndex:()=>{var j,W;return(W=(j=C.activeOptionIndex.value)!=null?j:C.virtual.value.options.findIndex(Q=>{var ne;return!((ne=C.virtual.value)!=null&&ne.disabled(Q))}))!=null?W:null},resolveDisabled:j=>C.virtual.value.disabled(j),resolveId(){throw new Error("Function not implemented.")}}),h.value=X??2;return}let P=u();if(P.activeOptionIndex===null){let j=P.options.findIndex(W=>!W.dataRef.disabled);j!==-1&&(P.activeOptionIndex=j)}let U=A===ke.Specific?M:ms({focus:A},{resolveItems:()=>P.options,resolveActiveIndex:()=>P.activeOptionIndex,resolveId:j=>j.id,resolveDisabled:j=>j.dataRef.disabled});p.value=U,h.value=X??2,f.value=P.options})},selectOption(A){let M=f.value.find(P=>P.id===A);if(!M)return;let{dataRef:X}=M;N(X.value)},selectActiveOption(){if(C.activeOptionIndex.value!==null){if(C.virtual.value)N(C.virtual.value.options[C.activeOptionIndex.value]);else{let{dataRef:A}=f.value[C.activeOptionIndex.value];N(A.value)}C.goToOption(ke.Specific,C.activeOptionIndex.value)}},registerOption(A,M){let X=n.reactive({id:A,dataRef:M});if(C.virtual.value){f.value.push(X);return}T&&cancelAnimationFrame(T);let P=u(U=>(U.push(X),U));p.value===null&&C.isSelected(M.value.value)&&(P.activeOptionIndex=P.options.indexOf(X)),f.value=P.options,p.value=P.activeOptionIndex,h.value=2,P.options.some(U=>!ae(U.dataRef.domRef))&&(T=requestAnimationFrame(()=>{let U=u();f.value=U.options,p.value=U.activeOptionIndex}))},unregisterOption(A,M){if(x!==null&&cancelAnimationFrame(x),M&&(g.value=!0),C.virtual.value){f.value=f.value.filter(P=>P.id!==A);return}let X=u(P=>{let U=P.findIndex(j=>j.id===A);return U!==-1&&P.splice(U,1),P});f.value=X.options,p.value=X.activeOptionIndex,h.value=2},isSelected(A){return $e(m.value,{0:()=>C.compare(n.toRaw(C.value.value),n.toRaw(A)),1:()=>n.toRaw(C.value.value).some(M=>C.compare(n.toRaw(M),n.toRaw(A)))})},isActive(A){return p.value===C.calculateIndex(A)}};fs([s,i,c],()=>C.closeCombobox(),n.computed(()=>r.value===0)),n.provide(Zl,C),Xa(n.computed(()=>$e(r.value,{0:Ue.Open,1:Ue.Closed})));let k=n.computed(()=>{var A;return(A=ae(s))==null?void 0:A.closest("form")});return n.onMounted(()=>{n.watch([k],()=>{if(!k.value||e.defaultValue===void 0)return;function A(){C.change(e.defaultValue)}return k.value.addEventListener("reset",A),()=>{var M;(M=k.value)==null||M.removeEventListener("reset",A)}},{immediate:!0})}),()=>{var A,M,X;let{name:P,disabled:U,form:j,...W}=e,Q={open:r.value===0,disabled:U,activeIndex:C.activeOptionIndex.value,activeOption:C.activeOptionIndex.value===null?null:C.virtual.value?C.virtual.value.options[(A=C.activeOptionIndex.value)!=null?A:0]:(X=(M=C.options.value[C.activeOptionIndex.value])==null?void 0:M.dataRef.value)!=null?X:null,value:O.value};return n.h(n.Fragment,[...P!=null&&O.value!=null?Yl({[P]:O.value}).map(([ne,_e])=>n.h(Wa,Xm({features:ea.Hidden,key:ne,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:j,disabled:U,name:ne,value:_e}))):[],Pe({theirProps:{...o,...$o(W,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:Q,slots:t,attrs:o,name:"Combobox"})])}}});n.defineComponent({name:"ComboboxLabel",props:{as:{type:[Object,String],default:"label"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o}){var a;let r=(a=e.id)!=null?a:`headlessui-combobox-label-${lt()}`,l=jn("ComboboxLabel");function s(){var i;(i=ae(l.inputRef))==null||i.focus({preventScroll:!0})}return()=>{let i={open:l.comboboxState.value===0,disabled:l.disabled.value},{...c}=e,d={id:r,ref:l.labelRef,onClick:s};return Pe({ourProps:d,theirProps:c,slot:i,attrs:t,slots:o,name:"ComboboxLabel"})}}}),n.defineComponent({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){var r;let l=(r=e.id)!=null?r:`headlessui-combobox-button-${lt()}`,s=jn("ComboboxButton");a({el:s.buttonRef,$el:s.buttonRef});function i(f){s.disabled.value||(s.comboboxState.value===0?s.closeCombobox():(f.preventDefault(),s.openCombobox()),n.nextTick(()=>{var p;return(p=ae(s.inputRef))==null?void 0:p.focus({preventScroll:!0})}))}function c(f){switch(f.key){case xe.ArrowDown:f.preventDefault(),f.stopPropagation(),s.comboboxState.value===1&&s.openCombobox(),n.nextTick(()=>{var p;return(p=s.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return;case xe.ArrowUp:f.preventDefault(),f.stopPropagation(),s.comboboxState.value===1&&(s.openCombobox(),n.nextTick(()=>{s.value.value||s.goToOption(ke.Last)})),n.nextTick(()=>{var p;return(p=s.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return;case xe.Escape:if(s.comboboxState.value!==0)return;f.preventDefault(),s.optionsRef.value&&!s.optionsPropsRef.value.static&&f.stopPropagation(),s.closeCombobox(),n.nextTick(()=>{var p;return(p=s.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return}}let d=ps(n.computed(()=>({as:e.as,type:t.type})),s.buttonRef);return()=>{var f,p;let h={open:s.comboboxState.value===0,disabled:s.disabled.value,value:s.value.value},{...g}=e,u={ref:s.buttonRef,id:l,type:d.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(f=ae(s.optionsRef))==null?void 0:f.id,"aria-expanded":s.comboboxState.value===0,"aria-labelledby":s.labelRef.value?[(p=ae(s.labelRef))==null?void 0:p.id,l].join(" "):void 0,disabled:s.disabled.value===!0?!0:void 0,onKeydown:c,onClick:i};return Pe({ourProps:u,theirProps:g,slot:h,attrs:t,slots:o,name:"ComboboxButton"})}}});let og=n.defineComponent({name:"ComboboxInput",props:{as:{type:[Object,String],default:"input"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:null}},emits:{change:e=>!0},setup(e,{emit:t,attrs:o,slots:a,expose:r}){var l;let s=(l=e.id)!=null?l:`headlessui-combobox-input-${lt()}`,i=jn("ComboboxInput"),c=n.computed(()=>rn(ae(i.inputRef))),d={value:!1};r({el:i.inputRef,$el:i.inputRef});function f(){i.change(null);let T=ae(i.optionsRef);T&&(T.scrollTop=0),i.goToOption(ke.Nothing)}let p=n.computed(()=>{var T;let N=i.value.value;return ae(i.inputRef)?typeof e.displayValue<"u"&&N!==void 0?(T=e.displayValue(N))!=null?T:"":typeof N=="string"?N:"":""});n.onMounted(()=>{n.watch([p,i.comboboxState,c],([T,N],[I,C])=>{if(d.value)return;let k=ae(i.inputRef);k&&((C===0&&N===1||T!==I)&&(k.value=T),requestAnimationFrame(()=>{var A;if(d.value||!k||((A=c.value)==null?void 0:A.activeElement)!==k)return;let{selectionStart:M,selectionEnd:X}=k;Math.abs((X??0)-(M??0))===0&&M===0&&k.setSelectionRange(k.value.length,k.value.length)}))},{immediate:!0}),n.watch([i.comboboxState],([T],[N])=>{if(T===0&&N===1){if(d.value)return;let I=ae(i.inputRef);if(!I)return;let C=I.value,{selectionStart:k,selectionEnd:A,selectionDirection:M}=I;I.value="",I.value=C,M!==null?I.setSelectionRange(k,A,M):I.setSelectionRange(k,A)}})});let h=n.ref(!1);function g(){h.value=!0}function u(){Tn().nextFrame(()=>{h.value=!1})}let m=Bm();function y(T){switch(d.value=!0,m(()=>{d.value=!1}),T.key){case xe.Enter:if(d.value=!1,i.comboboxState.value!==0||h.value)return;if(T.preventDefault(),T.stopPropagation(),i.activeOptionIndex.value===null){i.closeCombobox();return}i.selectActiveOption(),i.mode.value===0&&i.closeCombobox();break;case xe.ArrowDown:return d.value=!1,T.preventDefault(),T.stopPropagation(),$e(i.comboboxState.value,{0:()=>i.goToOption(ke.Next),1:()=>i.openCombobox()});case xe.ArrowUp:return d.value=!1,T.preventDefault(),T.stopPropagation(),$e(i.comboboxState.value,{0:()=>i.goToOption(ke.Previous),1:()=>{i.openCombobox(),n.nextTick(()=>{i.value.value||i.goToOption(ke.Last)})}});case xe.Home:if(T.shiftKey)break;return d.value=!1,T.preventDefault(),T.stopPropagation(),i.goToOption(ke.First);case xe.PageUp:return d.value=!1,T.preventDefault(),T.stopPropagation(),i.goToOption(ke.First);case xe.End:if(T.shiftKey)break;return d.value=!1,T.preventDefault(),T.stopPropagation(),i.goToOption(ke.Last);case xe.PageDown:return d.value=!1,T.preventDefault(),T.stopPropagation(),i.goToOption(ke.Last);case xe.Escape:if(d.value=!1,i.comboboxState.value!==0)return;T.preventDefault(),i.optionsRef.value&&!i.optionsPropsRef.value.static&&T.stopPropagation(),i.nullable.value&&i.mode.value===0&&i.value.value===null&&f(),i.closeCombobox();break;case xe.Tab:if(d.value=!1,i.comboboxState.value!==0)return;i.mode.value===0&&i.activationTrigger.value!==1&&i.selectActiveOption(),i.closeCombobox();break}}function b(T){t("change",T),i.nullable.value&&i.mode.value===0&&T.target.value===""&&f(),i.openCombobox()}function v(T){var N,I,C;let k=(N=T.relatedTarget)!=null?N:sn.find(A=>A!==T.currentTarget);if(d.value=!1,!((I=ae(i.optionsRef))!=null&&I.contains(k))&&!((C=ae(i.buttonRef))!=null&&C.contains(k))&&i.comboboxState.value===0)return T.preventDefault(),i.mode.value===0&&(i.nullable.value&&i.value.value===null?f():i.activationTrigger.value!==1&&i.selectActiveOption()),i.closeCombobox()}function O(T){var N,I,C;let k=(N=T.relatedTarget)!=null?N:sn.find(A=>A!==T.currentTarget);(I=ae(i.buttonRef))!=null&&I.contains(k)||(C=ae(i.optionsRef))!=null&&C.contains(k)||i.disabled.value||i.immediate.value&&i.comboboxState.value!==0&&(i.openCombobox(),Tn().nextFrame(()=>{i.setActivationTrigger(1)}))}let x=n.computed(()=>{var T,N,I,C;return(C=(I=(N=e.defaultValue)!=null?N:i.defaultValue.value!==void 0?(T=e.displayValue)==null?void 0:T.call(e,i.defaultValue.value):null)!=null?I:i.defaultValue.value)!=null?C:""});return()=>{var T,N,I,C,k,A,M;let X={open:i.comboboxState.value===0},{displayValue:P,onChange:U,...j}=e,W={"aria-controls":(T=i.optionsRef.value)==null?void 0:T.id,"aria-expanded":i.comboboxState.value===0,"aria-activedescendant":i.activeOptionIndex.value===null?void 0:i.virtual.value?(N=i.options.value.find(Q=>!i.virtual.value.disabled(Q.dataRef.value)&&i.compare(Q.dataRef.value,i.virtual.value.options[i.activeOptionIndex.value])))==null?void 0:N.id:(I=i.options.value[i.activeOptionIndex.value])==null?void 0:I.id,"aria-labelledby":(A=(C=ae(i.labelRef))==null?void 0:C.id)!=null?A:(k=ae(i.buttonRef))==null?void 0:k.id,"aria-autocomplete":"list",id:s,onCompositionstart:g,onCompositionend:u,onKeydown:y,onInput:b,onFocus:O,onBlur:v,role:"combobox",type:(M=o.type)!=null?M:"text",tabIndex:0,ref:i.inputRef,defaultValue:x.value,disabled:i.disabled.value===!0?!0:void 0};return Pe({ourProps:W,theirProps:j,slot:X,attrs:o,slots:a,features:It.RenderStrategy|It.Static,name:"ComboboxInput"})}}}),ag=n.defineComponent({name:"ComboboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(e,{attrs:t,slots:o,expose:a}){let r=jn("ComboboxOptions"),l=`headlessui-combobox-options-${lt()}`;a({el:r.optionsRef,$el:r.optionsRef}),n.watchEffect(()=>{r.optionsPropsRef.value.static=e.static}),n.watchEffect(()=>{r.optionsPropsRef.value.hold=e.hold});let s=yo(),i=n.computed(()=>s!==null?(s.value&Ue.Open)===Ue.Open:r.comboboxState.value===0);Gl({container:n.computed(()=>ae(r.optionsRef)),enabled:n.computed(()=>r.comboboxState.value===0),accept(d){return d.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:d.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(d){d.setAttribute("role","none")}});function c(d){d.preventDefault()}return()=>{var d,f,p;let h={open:r.comboboxState.value===0},g={"aria-labelledby":(p=(d=ae(r.labelRef))==null?void 0:d.id)!=null?p:(f=ae(r.buttonRef))==null?void 0:f.id,id:l,ref:r.optionsRef,role:"listbox","aria-multiselectable":r.mode.value===1?!0:void 0,onMousedown:c},u=$o(e,["hold"]);return Pe({ourProps:g,theirProps:u,slot:h,attrs:t,slots:r.virtual.value&&r.comboboxState.value===0?{...o,default:()=>[n.h(tg,{},o.default)]}:o,features:It.RenderStrategy|It.Static,visible:i.value,name:"ComboboxOptions"})}}}),$l=n.defineComponent({name:"ComboboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},order:{type:[Number],default:null}},setup(e,{slots:t,attrs:o,expose:a}){let r=jn("ComboboxOption"),l=`headlessui-combobox-option-${lt()}`,s=n.ref(null),i=n.computed(()=>e.disabled);a({el:s,$el:s});let c=n.computed(()=>{var v;return r.virtual.value?r.activeOptionIndex.value===r.calculateIndex(e.value):r.activeOptionIndex.value===null?!1:((v=r.options.value[r.activeOptionIndex.value])==null?void 0:v.id)===l}),d=n.computed(()=>r.isSelected(e.value)),f=n.inject(ql,null),p=n.computed(()=>({disabled:e.disabled,value:e.value,domRef:s,order:n.computed(()=>e.order)}));n.onMounted(()=>r.registerOption(l,p)),n.onUnmounted(()=>r.unregisterOption(l,c.value)),n.watchEffect(()=>{let v=ae(s);v&&f?.value.measureElement(v)}),n.watchEffect(()=>{r.comboboxState.value===0&&c.value&&(r.virtual.value||r.activationTrigger.value!==0&&n.nextTick(()=>{var v,O;return(O=(v=ae(s))==null?void 0:v.scrollIntoView)==null?void 0:O.call(v,{block:"nearest"})}))});function h(v){v.preventDefault(),v.button===Kl.Left&&(i.value||(r.selectOption(l),Fl()||requestAnimationFrame(()=>{var O;return(O=ae(r.inputRef))==null?void 0:O.focus({preventScroll:!0})}),r.mode.value===0&&r.closeCombobox()))}function g(){var v;if(e.disabled||(v=r.virtual.value)!=null&&v.disabled(e.value))return r.goToOption(ke.Nothing);let O=r.calculateIndex(e.value);r.goToOption(ke.Specific,O)}let u=jl();function m(v){u.update(v)}function y(v){var O;if(!u.wasMoved(v)||e.disabled||(O=r.virtual.value)!=null&&O.disabled(e.value)||c.value)return;let x=r.calculateIndex(e.value);r.goToOption(ke.Specific,x,0)}function b(v){var O;u.wasMoved(v)&&(e.disabled||(O=r.virtual.value)!=null&&O.disabled(e.value)||c.value&&(r.optionsPropsRef.value.hold||r.goToOption(ke.Nothing)))}return()=>{let{disabled:v}=e,O={active:c.value,selected:d.value,disabled:v},x={id:l,ref:s,role:"option",tabIndex:v===!0?void 0:-1,"aria-disabled":v===!0?!0:void 0,"aria-selected":d.value,disabled:void 0,onMousedown:h,onFocus:g,onPointerenter:m,onMouseenter:m,onPointermove:y,onMousemove:y,onPointerleave:b,onMouseleave:b},T=$o(e,["order","value"]);return Pe({ourProps:x,theirProps:T,slot:O,attrs:o,slots:t,name:"ComboboxOption"})}}});function ec(e,t,o,a){Zo.isServer||n.watchEffect(r=>{e=e??window,e.addEventListener(t,o,a),r(()=>e.removeEventListener(t,o,a))})}var ta=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(ta||{});function rg(){let e=n.ref(0);return Ul("keydown",t=>{t.key==="Tab"&&(e.value=t.shiftKey?1:0)}),e}function tc(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let o of e.value){let a=ae(o);a instanceof HTMLElement&&t.add(a)}return t}var nc=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(nc||{});let na=Object.assign(n.defineComponent({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:n.ref(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:o,expose:a}){let r=n.ref(null);a({el:r,$el:r});let l=n.computed(()=>rn(r)),s=n.ref(!1);n.onMounted(()=>s.value=!0),n.onUnmounted(()=>s.value=!1),ig({ownerDocument:l},n.computed(()=>s.value&&!!(e.features&16)));let i=lg({ownerDocument:l,container:r,initialFocus:n.computed(()=>e.initialFocus)},n.computed(()=>s.value&&!!(e.features&2)));cg({ownerDocument:l,container:r,containers:e.containers,previousActiveElement:i},n.computed(()=>s.value&&!!(e.features&8)));let c=rg();function d(g){let u=ae(r);u&&(m=>m())(()=>{$e(c.value,{[ta.Forwards]:()=>{qo(u,Jt.First,{skipElements:[g.relatedTarget]})},[ta.Backwards]:()=>{qo(u,Jt.Last,{skipElements:[g.relatedTarget]})}})})}let f=n.ref(!1);function p(g){g.key==="Tab"&&(f.value=!0,requestAnimationFrame(()=>{f.value=!1}))}function h(g){if(!s.value)return;let u=tc(e.containers);ae(r)instanceof HTMLElement&&u.add(ae(r));let m=g.relatedTarget;m instanceof HTMLElement&&m.dataset.headlessuiFocusGuard!=="true"&&(oc(u,m)||(f.value?qo(ae(r),$e(c.value,{[ta.Forwards]:()=>Jt.Next,[ta.Backwards]:()=>Jt.Previous})|Jt.WrapAround,{relativeTo:g.target}):g.target instanceof HTMLElement&&xn(g.target)))}return()=>{let g={},u={ref:r,onKeydown:p,onFocusout:h},{features:m,initialFocus:y,containers:b,...v}=e;return n.h(n.Fragment,[!!(m&4)&&n.h(Wa,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:ea.Focusable}),Pe({ourProps:u,theirProps:{...t,...v},slot:g,attrs:t,slots:o,name:"FocusTrap"}),!!(m&4)&&n.h(Wa,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:ea.Focusable})])}}}),{features:nc});function sg(e){let t=n.ref(sn.slice());return n.watch([e],([o],[a])=>{a===!0&&o===!1?is(()=>{t.value.splice(0)}):a===!1&&o===!0&&(t.value=sn.slice())},{flush:"post"}),()=>{var o;return(o=t.value.find(a=>a!=null&&a.isConnected))!=null?o:null}}function ig({ownerDocument:e},t){let o=sg(t);n.onMounted(()=>{n.watchEffect(()=>{var a,r;t.value||((a=e.value)==null?void 0:a.activeElement)===((r=e.value)==null?void 0:r.body)&&xn(o())},{flush:"post"})}),n.onUnmounted(()=>{t.value&&xn(o())})}function lg({ownerDocument:e,container:t,initialFocus:o},a){let r=n.ref(null),l=n.ref(!1);return n.onMounted(()=>l.value=!0),n.onUnmounted(()=>l.value=!1),n.onMounted(()=>{n.watch([t,o,a],(s,i)=>{if(s.every((d,f)=>i?.[f]===d)||!a.value)return;let c=ae(t);c&&is(()=>{var d,f;if(!l.value)return;let p=ae(o),h=(d=e.value)==null?void 0:d.activeElement;if(p){if(p===h){r.value=h;return}}else if(c.contains(h)){r.value=h;return}p?xn(p):qo(c,Jt.First|Jt.NoScroll)===Bl.Error&&console.warn("There are no focusable elements inside the "),r.value=(f=e.value)==null?void 0:f.activeElement})},{immediate:!0,flush:"post"})}),r}function cg({ownerDocument:e,container:t,containers:o,previousActiveElement:a},r){var l;ec((l=e.value)==null?void 0:l.defaultView,"focus",s=>{if(!r.value)return;let i=tc(o);ae(t)instanceof HTMLElement&&i.add(ae(t));let c=a.value;if(!c)return;let d=s.target;d&&d instanceof HTMLElement?oc(i,d)?(a.value=d,xn(d)):(s.preventDefault(),s.stopPropagation(),xn(c)):xn(a.value)},!0)}function oc(e,t){for(let o of e)if(o.contains(t))return!0;return!1}function dg(e){let t=n.shallowRef(e.getSnapshot());return n.onUnmounted(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function ug(e,t){let o=e(),a=new Set;return{getSnapshot(){return o},subscribe(r){return a.add(r),()=>a.delete(r)},dispatch(r,...l){let s=t[r].call(o,...l);s&&(o=s,a.forEach(i=>i()))}}}function fg(){let e;return{before({doc:t}){var o;let a=t.documentElement;e=((o=t.defaultView)!=null?o:window).innerWidth-a.clientWidth},after({doc:t,d:o}){let a=t.documentElement,r=a.clientWidth-a.offsetWidth,l=e-r;o.style(a,"paddingRight",`${l}px`)}}}function pg(){return Ll()?{before({doc:e,d:t,meta:o}){function a(r){return o.containers.flatMap(l=>l()).some(l=>l.contains(r))}t.microTask(()=>{var r;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let i=Tn();i.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>i.dispose()))}let l=(r=window.scrollY)!=null?r:window.pageYOffset,s=null;t.addEventListener(e,"click",i=>{if(i.target instanceof HTMLElement)try{let c=i.target.closest("a");if(!c)return;let{hash:d}=new URL(c.href),f=e.querySelector(d);f&&!a(f)&&(s=f)}catch{}},!0),t.addEventListener(e,"touchstart",i=>{if(i.target instanceof HTMLElement)if(a(i.target)){let c=i.target;for(;c.parentElement&&a(c.parentElement);)c=c.parentElement;t.style(c,"overscrollBehavior","contain")}else t.style(i.target,"touchAction","none")}),t.addEventListener(e,"touchmove",i=>{if(i.target instanceof HTMLElement){if(i.target.tagName==="INPUT")return;if(a(i.target)){let c=i.target;for(;c.parentElement&&c.dataset.headlessuiPortal!==""&&!(c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth);)c=c.parentElement;c.dataset.headlessuiPortal===""&&i.preventDefault()}else i.preventDefault()}},{passive:!1}),t.add(()=>{var i;let c=(i=window.scrollY)!=null?i:window.pageYOffset;l!==c&&window.scrollTo(0,l),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function hg(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function mg(e){let t={};for(let o of e)Object.assign(t,o(t));return t}let Gn=ug(()=>new Map,{PUSH(e,t){var o;let a=(o=this.get(e))!=null?o:{doc:e,count:0,d:Tn(),meta:new Set};return a.count++,a.meta.add(t),this.set(e,a),this},POP(e,t){let o=this.get(e);return o&&(o.count--,o.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:o}){let a={doc:e,d:t,meta:mg(o)},r=[pg(),fg(),hg()];r.forEach(({before:l})=>l?.(a)),r.forEach(({after:l})=>l?.(a))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Gn.subscribe(()=>{let e=Gn.getSnapshot(),t=new Map;for(let[o]of e)t.set(o,o.documentElement.style.overflow);for(let o of e.values()){let a=t.get(o.doc)==="hidden",r=o.count!==0;(r&&!a||!r&&a)&&Gn.dispatch(o.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",o),o.count===0&&Gn.dispatch("TEARDOWN",o)}});function gg(e,t,o){let a=dg(Gn),r=n.computed(()=>{let l=e.value?a.value.get(e.value):void 0;return l?l.count>0:!1});return n.watch([e,t],([l,s],[i],c)=>{if(!l||!s)return;Gn.dispatch("PUSH",l,o);let d=!1;c(()=>{d||(Gn.dispatch("POP",i??l,o),d=!0)})},{immediate:!0}),r}let gs=new Map,oa=new Map;function ac(e,t=n.ref(!0)){n.watchEffect(o=>{var a;if(!t.value)return;let r=ae(e);if(!r)return;o(function(){var s;if(!r)return;let i=(s=oa.get(r))!=null?s:1;if(i===1?oa.delete(r):oa.set(r,i-1),i!==1)return;let c=gs.get(r);c&&(c["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",c["aria-hidden"]),r.inert=c.inert,gs.delete(r))});let l=(a=oa.get(r))!=null?a:0;oa.set(r,l+1),l===0&&(gs.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function vg({defaultContainers:e=[],portals:t,mainTreeNodeRef:o}={}){let a=n.ref(null),r=rn(a);function l(){var s,i,c;let d=[];for(let f of e)f!==null&&(f instanceof HTMLElement?d.push(f):"value"in f&&f.value instanceof HTMLElement&&d.push(f.value));if(t!=null&&t.value)for(let f of t.value)d.push(f);for(let f of(s=r?.querySelectorAll("html > *, body > *"))!=null?s:[])f!==document.body&&f!==document.head&&f instanceof HTMLElement&&f.id!=="headlessui-portal-root"&&(f.contains(ae(a))||f.contains((c=(i=ae(a))==null?void 0:i.getRootNode())==null?void 0:c.host)||d.some(p=>f.contains(p))||d.push(f));return d}return{resolveContainers:l,contains(s){return l().some(i=>i.contains(s))},mainTreeNodeRef:a,MainTreeNode(){return o!=null?null:n.h(Wa,{features:ea.Hidden,ref:a})}}}let rc=Symbol("ForcePortalRootContext");function bg(){return n.inject(rc,!1)}let vs=n.defineComponent({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:o}){return n.provide(rc,e.force),()=>{let{force:a,...r}=e;return Pe({theirProps:r,ourProps:{},slot:{},slots:t,attrs:o,name:"ForcePortalRoot"})}}}),sc=Symbol("StackContext");var bs=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(bs||{});function yg(){return n.inject(sc,()=>{})}function Eg({type:e,enabled:t,element:o,onUpdate:a}){let r=yg();function l(...s){a?.(...s),r(...s)}n.onMounted(()=>{n.watch(t,(s,i)=>{s?l(0,e,o):i===!0&&l(1,e,o)},{immediate:!0,flush:"sync"})}),n.onUnmounted(()=>{t.value&&l(1,e,o)}),n.provide(sc,l)}let ic=Symbol("DescriptionContext");function _g(){let e=n.inject(ic,null);if(e===null)throw new Error("Missing parent");return e}function wg({slot:e=n.ref({}),name:t="Description",props:o={}}={}){let a=n.ref([]);function r(l){return a.value.push(l),()=>{let s=a.value.indexOf(l);s!==-1&&a.value.splice(s,1)}}return n.provide(ic,{register:r,slot:e,name:t,props:o}),n.computed(()=>a.value.length>0?a.value.join(" "):void 0)}n.defineComponent({name:"Description",props:{as:{type:[Object,String],default:"p"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o}){var a;let r=(a=e.id)!=null?a:`headlessui-description-${lt()}`,l=_g();return n.onMounted(()=>n.onUnmounted(l.register(r))),()=>{let{name:s="Description",slot:i=n.ref({}),props:c={}}=l,{...d}=e,f={...Object.entries(c).reduce((p,[h,g])=>Object.assign(p,{[h]:n.unref(g)}),{}),id:r};return Pe({ourProps:f,theirProps:d,slot:i.value,attrs:t,slots:o,name:s})}}});function Tg(e){let t=rn(e);if(!t){if(e===null)return null;throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`)}let o=t.getElementById("headlessui-portal-root");if(o)return o;let a=t.createElement("div");return a.setAttribute("id","headlessui-portal-root"),t.body.appendChild(a)}const ys=new WeakMap;function xg(e){var t;return(t=ys.get(e))!=null?t:0}function lc(e,t){let o=t(xg(e));return o<=0?ys.delete(e):ys.set(e,o),o}let cc=n.defineComponent({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:o}){let a=n.ref(null),r=n.computed(()=>rn(a)),l=bg(),s=n.inject(dc,null),i=n.ref(l===!0||s==null?Tg(a.value):s.resolveTarget());i.value&&lc(i.value,h=>h+1);let c=n.ref(!1);n.onMounted(()=>{c.value=!0}),n.watchEffect(()=>{l||s!=null&&(i.value=s.resolveTarget())});let d=n.inject(Es,null),f=!1,p=n.getCurrentInstance();return n.watch(a,()=>{if(f||!d)return;let h=ae(a);h&&(n.onUnmounted(d.register(h),p),f=!0)}),n.onUnmounted(()=>{var h,g;let u=(h=r.value)==null?void 0:h.getElementById("headlessui-portal-root");!u||i.value!==u||lc(i.value,m=>m-1)||i.value.children.length>0||(g=i.value.parentElement)==null||g.removeChild(i.value)}),()=>{if(!c.value||i.value===null)return null;let h={ref:a,"data-headlessui-portal":""};return n.h(n.Teleport,{to:i.value},Pe({ourProps:h,theirProps:e,slot:{},attrs:o,slots:t,name:"Portal"}))}}}),Es=Symbol("PortalParentContext");function Og(){let e=n.inject(Es,null),t=n.ref([]);function o(l){return t.value.push(l),e&&e.register(l),()=>a(l)}function a(l){let s=t.value.indexOf(l);s!==-1&&t.value.splice(s,1),e&&e.unregister(l)}let r={register:o,unregister:a,portals:t};return[t,n.defineComponent({name:"PortalWrapper",setup(l,{slots:s}){return n.provide(Es,r),()=>{var i;return(i=s.default)==null?void 0:i.call(s)}}})]}let dc=Symbol("PortalGroupContext"),Sg=n.defineComponent({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:o}){let a=n.reactive({resolveTarget(){return e.target}});return n.provide(dc,a),()=>{let{target:r,...l}=e;return Pe({theirProps:l,ourProps:{},slot:{},attrs:t,slots:o,name:"PortalGroup"})}}});var Ng=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ng||{});let _s=Symbol("DialogContext");function aa(e){let t=n.inject(_s,null);if(t===null){let o=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,aa),o}return t}let Ka="DC8F892D-2EBD-447C-A4C8-A03058436FF4",Ya=n.defineComponent({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:Ka},initialFocus:{type:Object,default:null},id:{type:String,default:null},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:o,slots:a,expose:r}){var l,s;let i=(l=e.id)!=null?l:`headlessui-dialog-${lt()}`,c=n.ref(!1);n.onMounted(()=>{c.value=!0});let d=!1,f=n.computed(()=>e.role==="dialog"||e.role==="alertdialog"?e.role:(d||(d=!0,console.warn(`Invalid role [${f}] passed to . Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")),p=n.ref(0),h=yo(),g=n.computed(()=>e.open===Ka&&h!==null?(h.value&Ue.Open)===Ue.Open:e.open),u=n.ref(null),m=n.computed(()=>rn(u));if(r({el:u,$el:u}),!(e.open!==Ka||h!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof g.value!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${g.value===Ka?void 0:e.open}`);let y=n.computed(()=>c.value&&g.value?0:1),b=n.computed(()=>y.value===0),v=n.computed(()=>p.value>1),O=n.inject(_s,null)!==null,[x,T]=Og(),{resolveContainers:N,mainTreeNodeRef:I,MainTreeNode:C}=vg({portals:x,defaultContainers:[n.computed(()=>{var se;return(se=Q.panelRef.value)!=null?se:u.value})]}),k=n.computed(()=>v.value?"parent":"leaf"),A=n.computed(()=>h!==null?(h.value&Ue.Closing)===Ue.Closing:!1),M=n.computed(()=>O||A.value?!1:b.value),X=n.computed(()=>{var se,fe,ye;return(ye=Array.from((fe=(se=m.value)==null?void 0:se.querySelectorAll("body > *"))!=null?fe:[]).find(Te=>Te.id==="headlessui-portal-root"?!1:Te.contains(ae(I))&&Te instanceof HTMLElement))!=null?ye:null});ac(X,M);let P=n.computed(()=>v.value?!0:b.value),U=n.computed(()=>{var se,fe,ye;return(ye=Array.from((fe=(se=m.value)==null?void 0:se.querySelectorAll("[data-headlessui-portal]"))!=null?fe:[]).find(Te=>Te.contains(ae(I))&&Te instanceof HTMLElement))!=null?ye:null});ac(U,P),Eg({type:"Dialog",enabled:n.computed(()=>y.value===0),element:u,onUpdate:(se,fe)=>{if(fe==="Dialog")return $e(se,{[bs.Add]:()=>p.value+=1,[bs.Remove]:()=>p.value-=1})}});let j=wg({name:"DialogDescription",slot:n.computed(()=>({open:g.value}))}),W=n.ref(null),Q={titleId:W,panelRef:n.ref(null),dialogState:y,setTitleId(se){W.value!==se&&(W.value=se)},close(){t("close",!1)}};n.provide(_s,Q);let ne=n.computed(()=>!(!b.value||v.value));fs(N,(se,fe)=>{se.preventDefault(),Q.close(),n.nextTick(()=>fe?.focus())},ne);let _e=n.computed(()=>!(v.value||y.value!==0));ec((s=m.value)==null?void 0:s.defaultView,"keydown",se=>{_e.value&&(se.defaultPrevented||se.key===xe.Escape&&(se.preventDefault(),se.stopPropagation(),Q.close()))});let Ye=n.computed(()=>!(A.value||y.value!==0||O));return gg(m,Ye,se=>{var fe;return{containers:[...(fe=se.containers)!=null?fe:[],N]}}),n.watchEffect(se=>{if(y.value!==0)return;let fe=ae(u);if(!fe)return;let ye=new ResizeObserver(Te=>{for(let Be of Te){let Re=Be.target.getBoundingClientRect();Re.x===0&&Re.y===0&&Re.width===0&&Re.height===0&&Q.close()}});ye.observe(fe),se(()=>ye.disconnect())}),()=>{let{open:se,initialFocus:fe,...ye}=e,Te={...o,ref:u,id:i,role:f.value,"aria-modal":y.value===0?!0:void 0,"aria-labelledby":W.value,"aria-describedby":j.value},Be={open:y.value===0};return n.h(vs,{force:!0},()=>[n.h(cc,()=>n.h(Sg,{target:u.value},()=>n.h(vs,{force:!1},()=>n.h(na,{initialFocus:fe,containers:N,features:b.value?$e(k.value,{parent:na.features.RestoreFocus,leaf:na.features.All&~na.features.FocusLock}):na.features.None},()=>n.h(T,{},()=>Pe({ourProps:Te,theirProps:{...ye,...o},slot:Be,attrs:o,slots:a,visible:y.value===0,features:It.RenderStrategy|It.Static,name:"Dialog"})))))),n.h(C)])}}});n.defineComponent({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o}){var a;let r=(a=e.id)!=null?a:`headlessui-dialog-overlay-${lt()}`,l=aa("DialogOverlay");function s(i){i.target===i.currentTarget&&(i.preventDefault(),i.stopPropagation(),l.close())}return()=>{let{...i}=e;return Pe({ourProps:{id:r,"aria-hidden":!0,onClick:s},theirProps:i,slot:{open:l.dialogState.value===0},attrs:t,slots:o,name:"DialogOverlay"})}}}),n.defineComponent({name:"DialogBackdrop",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},inheritAttrs:!1,setup(e,{attrs:t,slots:o,expose:a}){var r;let l=(r=e.id)!=null?r:`headlessui-dialog-backdrop-${lt()}`,s=aa("DialogBackdrop"),i=n.ref(null);return a({el:i,$el:i}),n.onMounted(()=>{if(s.panelRef.value===null)throw new Error("A component is being used, but a component is missing.")}),()=>{let{...c}=e,d={id:l,ref:i,"aria-hidden":!0};return n.h(vs,{force:!0},()=>n.h(cc,()=>Pe({ourProps:d,theirProps:{...t,...c},slot:{open:s.dialogState.value===0},attrs:t,slots:o,name:"DialogBackdrop"})))}}});let ln=n.defineComponent({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){var r;let l=(r=e.id)!=null?r:`headlessui-dialog-panel-${lt()}`,s=aa("DialogPanel");a({el:s.panelRef,$el:s.panelRef});function i(c){c.stopPropagation()}return()=>{let{...c}=e,d={id:l,ref:s.panelRef,onClick:i};return Pe({ourProps:d,theirProps:c,slot:{open:s.dialogState.value===0},attrs:t,slots:o,name:"DialogPanel"})}}}),uc=n.defineComponent({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o}){var a;let r=(a=e.id)!=null?a:`headlessui-dialog-title-${lt()}`,l=aa("DialogTitle");return n.onMounted(()=>{l.setTitleId(r),n.onUnmounted(()=>l.setTitleId(null))}),()=>{let{...s}=e;return Pe({ourProps:{id:r},theirProps:s,slot:{open:l.dialogState.value===0},attrs:t,slots:o,name:"DialogTitle"})}}});var Rg=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Rg||{});let fc=Symbol("DisclosureContext");function ws(e){let t=n.inject(fc,null);if(t===null){let o=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,ws),o}return t}let pc=Symbol("DisclosurePanelContext");function Ig(){return n.inject(pc,null)}let hc=n.defineComponent({name:"Disclosure",props:{as:{type:[Object,String],default:"template"},defaultOpen:{type:[Boolean],default:!1}},setup(e,{slots:t,attrs:o}){let a=n.ref(e.defaultOpen?0:1),r=n.ref(null),l=n.ref(null),s={buttonId:n.ref(`headlessui-disclosure-button-${lt()}`),panelId:n.ref(`headlessui-disclosure-panel-${lt()}`),disclosureState:a,panel:r,button:l,toggleDisclosure(){a.value=$e(a.value,{0:1,1:0})},closeDisclosure(){a.value!==1&&(a.value=1)},close(i){s.closeDisclosure();let c=(()=>i?i instanceof HTMLElement?i:i.value instanceof HTMLElement?ae(i):ae(s.button):ae(s.button))();c?.focus()}};return n.provide(fc,s),Xa(n.computed(()=>$e(a.value,{0:Ue.Open,1:Ue.Closed}))),()=>{let{defaultOpen:i,...c}=e,d={open:a.value===0,close:s.close};return Pe({theirProps:c,ourProps:{},slot:d,slots:t,attrs:o,name:"Disclosure"})}}}),mc=n.defineComponent({name:"DisclosureButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){let r=ws("DisclosureButton"),l=Ig(),s=n.computed(()=>l===null?!1:l.value===r.panelId.value);n.onMounted(()=>{s.value||e.id!==null&&(r.buttonId.value=e.id)}),n.onUnmounted(()=>{s.value||(r.buttonId.value=null)});let i=n.ref(null);a({el:i,$el:i}),s.value||n.watchEffect(()=>{r.button.value=i.value});let c=ps(n.computed(()=>({as:e.as,type:t.type})),i);function d(){var h;e.disabled||(s.value?(r.toggleDisclosure(),(h=ae(r.button))==null||h.focus()):r.toggleDisclosure())}function f(h){var g;if(!e.disabled)if(s.value)switch(h.key){case xe.Space:case xe.Enter:h.preventDefault(),h.stopPropagation(),r.toggleDisclosure(),(g=ae(r.button))==null||g.focus();break}else switch(h.key){case xe.Space:case xe.Enter:h.preventDefault(),h.stopPropagation(),r.toggleDisclosure();break}}function p(h){switch(h.key){case xe.Space:h.preventDefault();break}}return()=>{var h;let g={open:r.disclosureState.value===0},{id:u,...m}=e,y=s.value?{ref:i,type:c.value,onClick:d,onKeydown:f}:{id:(h=r.buttonId.value)!=null?h:u,ref:i,type:c.value,"aria-expanded":r.disclosureState.value===0,"aria-controls":r.disclosureState.value===0||ae(r.panel)?r.panelId.value:void 0,disabled:e.disabled?!0:void 0,onClick:d,onKeydown:f,onKeyup:p};return Pe({ourProps:y,theirProps:m,slot:g,attrs:t,slots:o,name:"DisclosureButton"})}}}),gc=n.defineComponent({name:"DisclosurePanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){let r=ws("DisclosurePanel");n.onMounted(()=>{e.id!==null&&(r.panelId.value=e.id)}),n.onUnmounted(()=>{r.panelId.value=null}),a({el:r.panel,$el:r.panel}),n.provide(pc,r.panelId);let l=yo(),s=n.computed(()=>l!==null?(l.value&Ue.Open)===Ue.Open:r.disclosureState.value===0);return()=>{var i;let c={open:r.disclosureState.value===0,close:r.close},{id:d,...f}=e,p={id:(i=r.panelId.value)!=null?i:d,ref:r.panel};return Pe({ourProps:p,theirProps:f,slot:c,attrs:t,slots:o,features:It.RenderStrategy|It.Static,visible:s.value,name:"DisclosurePanel"})}}}),vc=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function bc(e){var t,o;let a=(t=e.innerText)!=null?t:"",r=e.cloneNode(!0);if(!(r instanceof HTMLElement))return a;let l=!1;for(let i of r.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))i.remove(),l=!0;let s=l?(o=r.innerText)!=null?o:"":a;return vc.test(s)&&(s=s.replace(vc,"")),s}function Cg(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let o=e.getAttribute("aria-labelledby");if(o){let a=o.split(" ").map(r=>{let l=document.getElementById(r);if(l){let s=l.getAttribute("aria-label");return typeof s=="string"?s.trim():bc(l).trim()}return null}).filter(Boolean);if(a.length>0)return a.join(", ")}return bc(e).trim()}function kg(e){let t=n.ref(""),o=n.ref("");return()=>{let a=ae(e);if(!a)return"";let r=a.innerText;if(t.value===r)return o.value;let l=Cg(a).trim().toLowerCase();return t.value=r,o.value=l,l}}var Ag=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ag||{}),Dg=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Dg||{});function Bg(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let yc=Symbol("MenuContext");function Ja(e){let t=n.inject(yc,null);if(t===null){let o=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,Ja),o}return t}let Ts=n.defineComponent({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup(e,{slots:t,attrs:o}){let a=n.ref(1),r=n.ref(null),l=n.ref(null),s=n.ref([]),i=n.ref(""),c=n.ref(null),d=n.ref(1);function f(h=g=>g){let g=c.value!==null?s.value[c.value]:null,u=us(h(s.value.slice()),y=>ae(y.dataRef.domRef)),m=g?u.indexOf(g):null;return m===-1&&(m=null),{items:u,activeItemIndex:m}}let p={menuState:a,buttonRef:r,itemsRef:l,items:s,searchQuery:i,activeItemIndex:c,activationTrigger:d,closeMenu:()=>{a.value=1,c.value=null},openMenu:()=>a.value=0,goToItem(h,g,u){let m=f(),y=ms(h===ke.Specific?{focus:ke.Specific,id:g}:{focus:h},{resolveItems:()=>m.items,resolveActiveIndex:()=>m.activeItemIndex,resolveId:b=>b.id,resolveDisabled:b=>b.dataRef.disabled});i.value="",c.value=y,d.value=u??1,s.value=m.items},search(h){let g=i.value!==""?0:1;i.value+=h.toLowerCase();let u=(c.value!==null?s.value.slice(c.value+g).concat(s.value.slice(0,c.value+g)):s.value).find(y=>y.dataRef.textValue.startsWith(i.value)&&!y.dataRef.disabled),m=u?s.value.indexOf(u):-1;m===-1||m===c.value||(c.value=m,d.value=1)},clearSearch(){i.value=""},registerItem(h,g){let u=f(m=>[...m,{id:h,dataRef:g}]);s.value=u.items,c.value=u.activeItemIndex,d.value=1},unregisterItem(h){let g=f(u=>{let m=u.findIndex(y=>y.id===h);return m!==-1&&u.splice(m,1),u});s.value=g.items,c.value=g.activeItemIndex,d.value=1}};return fs([r,l],(h,g)=>{var u;p.closeMenu(),ds(g,cs.Loose)||(h.preventDefault(),(u=ae(r))==null||u.focus())},n.computed(()=>a.value===0)),n.provide(yc,p),Xa(n.computed(()=>$e(a.value,{0:Ue.Open,1:Ue.Closed}))),()=>{let h={open:a.value===0,close:p.closeMenu};return Pe({ourProps:{},theirProps:e,slot:h,slots:t,attrs:o,name:"Menu"})}}}),xs=n.defineComponent({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){var r;let l=(r=e.id)!=null?r:`headlessui-menu-button-${lt()}`,s=Ja("MenuButton");a({el:s.buttonRef,$el:s.buttonRef});function i(p){switch(p.key){case xe.Space:case xe.Enter:case xe.ArrowDown:p.preventDefault(),p.stopPropagation(),s.openMenu(),n.nextTick(()=>{var h;(h=ae(s.itemsRef))==null||h.focus({preventScroll:!0}),s.goToItem(ke.First)});break;case xe.ArrowUp:p.preventDefault(),p.stopPropagation(),s.openMenu(),n.nextTick(()=>{var h;(h=ae(s.itemsRef))==null||h.focus({preventScroll:!0}),s.goToItem(ke.Last)});break}}function c(p){switch(p.key){case xe.Space:p.preventDefault();break}}function d(p){e.disabled||(s.menuState.value===0?(s.closeMenu(),n.nextTick(()=>{var h;return(h=ae(s.buttonRef))==null?void 0:h.focus({preventScroll:!0})})):(p.preventDefault(),s.openMenu(),Bg(()=>{var h;return(h=ae(s.itemsRef))==null?void 0:h.focus({preventScroll:!0})})))}let f=ps(n.computed(()=>({as:e.as,type:t.type})),s.buttonRef);return()=>{var p;let h={open:s.menuState.value===0},{...g}=e,u={ref:s.buttonRef,id:l,type:f.value,"aria-haspopup":"menu","aria-controls":(p=ae(s.itemsRef))==null?void 0:p.id,"aria-expanded":s.menuState.value===0,onKeydown:i,onKeyup:c,onClick:d};return Pe({ourProps:u,theirProps:g,slot:h,attrs:t,slots:o,name:"MenuButton"})}}}),Os=n.defineComponent({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){var r;let l=(r=e.id)!=null?r:`headlessui-menu-items-${lt()}`,s=Ja("MenuItems"),i=n.ref(null);a({el:s.itemsRef,$el:s.itemsRef}),Gl({container:n.computed(()=>ae(s.itemsRef)),enabled:n.computed(()=>s.menuState.value===0),accept(h){return h.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:h.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(h){h.setAttribute("role","none")}});function c(h){var g;switch(i.value&&clearTimeout(i.value),h.key){case xe.Space:if(s.searchQuery.value!=="")return h.preventDefault(),h.stopPropagation(),s.search(h.key);case xe.Enter:if(h.preventDefault(),h.stopPropagation(),s.activeItemIndex.value!==null){let u=s.items.value[s.activeItemIndex.value];(g=ae(u.dataRef.domRef))==null||g.click()}s.closeMenu(),Ml(ae(s.buttonRef));break;case xe.ArrowDown:return h.preventDefault(),h.stopPropagation(),s.goToItem(ke.Next);case xe.ArrowUp:return h.preventDefault(),h.stopPropagation(),s.goToItem(ke.Previous);case xe.Home:case xe.PageUp:return h.preventDefault(),h.stopPropagation(),s.goToItem(ke.First);case xe.End:case xe.PageDown:return h.preventDefault(),h.stopPropagation(),s.goToItem(ke.Last);case xe.Escape:h.preventDefault(),h.stopPropagation(),s.closeMenu(),n.nextTick(()=>{var u;return(u=ae(s.buttonRef))==null?void 0:u.focus({preventScroll:!0})});break;case xe.Tab:h.preventDefault(),h.stopPropagation(),s.closeMenu(),n.nextTick(()=>zm(ae(s.buttonRef),h.shiftKey?Jt.Previous:Jt.Next));break;default:h.key.length===1&&(s.search(h.key),i.value=setTimeout(()=>s.clearSearch(),350));break}}function d(h){switch(h.key){case xe.Space:h.preventDefault();break}}let f=yo(),p=n.computed(()=>f!==null?(f.value&Ue.Open)===Ue.Open:s.menuState.value===0);return()=>{var h,g;let u={open:s.menuState.value===0},{...m}=e,y={"aria-activedescendant":s.activeItemIndex.value===null||(h=s.items.value[s.activeItemIndex.value])==null?void 0:h.id,"aria-labelledby":(g=ae(s.buttonRef))==null?void 0:g.id,id:l,onKeydown:c,onKeyup:d,role:"menu",tabIndex:0,ref:s.itemsRef};return Pe({ourProps:y,theirProps:m,slot:u,attrs:t,slots:o,features:It.RenderStrategy|It.Static,visible:p.value,name:"MenuItems"})}}}),ra=n.defineComponent({name:"MenuItem",inheritAttrs:!1,props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(e,{slots:t,attrs:o,expose:a}){var r;let l=(r=e.id)!=null?r:`headlessui-menu-item-${lt()}`,s=Ja("MenuItem"),i=n.ref(null);a({el:i,$el:i});let c=n.computed(()=>s.activeItemIndex.value!==null?s.items.value[s.activeItemIndex.value].id===l:!1),d=kg(i),f=n.computed(()=>({disabled:e.disabled,get textValue(){return d()},domRef:i}));n.onMounted(()=>s.registerItem(l,f)),n.onUnmounted(()=>s.unregisterItem(l)),n.watchEffect(()=>{s.menuState.value===0&&c.value&&s.activationTrigger.value!==0&&n.nextTick(()=>{var b,v;return(v=(b=ae(i))==null?void 0:b.scrollIntoView)==null?void 0:v.call(b,{block:"nearest"})})});function p(b){if(e.disabled)return b.preventDefault();s.closeMenu(),Ml(ae(s.buttonRef))}function h(){if(e.disabled)return s.goToItem(ke.Nothing);s.goToItem(ke.Specific,l)}let g=jl();function u(b){g.update(b)}function m(b){g.wasMoved(b)&&(e.disabled||c.value||s.goToItem(ke.Specific,l,0))}function y(b){g.wasMoved(b)&&(e.disabled||c.value&&s.goToItem(ke.Nothing))}return()=>{let{disabled:b,...v}=e,O={active:c.value,disabled:b,close:s.closeMenu};return Pe({ourProps:{id:l,ref:i,role:"menuitem",tabIndex:b===!0?void 0:-1,"aria-disabled":b===!0?!0:void 0,onClick:p,onFocus:h,onPointerenter:u,onMouseenter:u,onPointermove:m,onMousemove:m,onPointerleave:y,onMouseleave:y},theirProps:{...o,...v},slot:O,attrs:o,slots:t,name:"MenuItem"})}}});function Pg(e){let t={called:!1};return(...o)=>{if(!t.called)return t.called=!0,e(...o)}}function Ss(e,...t){e&&t.length>0&&e.classList.add(...t)}function Qa(e,...t){e&&t.length>0&&e.classList.remove(...t)}var Ns=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(Ns||{});function Mg(e,t){let o=Tn();if(!e)return o.dispose;let{transitionDuration:a,transitionDelay:r}=getComputedStyle(e),[l,s]=[a,r].map(i=>{let[c=0]=i.split(",").filter(Boolean).map(d=>d.includes("ms")?parseFloat(d):parseFloat(d)*1e3).sort((d,f)=>f-d);return c});return l!==0?o.setTimeout(()=>t("finished"),l+s):t("finished"),o.add(()=>t("cancelled")),o.dispose}function Ec(e,t,o,a,r,l){let s=Tn(),i=l!==void 0?Pg(l):()=>{};return Qa(e,...r),Ss(e,...t,...o),s.nextFrame(()=>{Qa(e,...o),Ss(e,...a),s.add(Mg(e,c=>(Qa(e,...a,...t),Ss(e,...r),i(c))))}),s.add(()=>Qa(e,...t,...o,...a,...r)),s.add(()=>i("cancelled")),s.dispose}function zn(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let Rs=Symbol("TransitionContext");var Lg=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Lg||{});function Fg(){return n.inject(Rs,null)!==null}function Ug(){let e=n.inject(Rs,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}function Hg(){let e=n.inject(Is,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}let Is=Symbol("NestingContext");function Za(e){return"children"in e?Za(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function _c(e){let t=n.ref([]),o=n.ref(!1);n.onMounted(()=>o.value=!0),n.onUnmounted(()=>o.value=!1);function a(l,s=On.Hidden){let i=t.value.findIndex(({id:c})=>c===l);i!==-1&&($e(s,{[On.Unmount](){t.value.splice(i,1)},[On.Hidden](){t.value[i].state="hidden"}}),!Za(t)&&o.value&&e?.())}function r(l){let s=t.value.find(({id:i})=>i===l);return s?s.state!=="visible"&&(s.state="visible"):t.value.push({id:l,state:"visible"}),()=>a(l,On.Unmount)}return{children:t,register:r,unregister:a}}let wc=It.RenderStrategy,Sn=n.defineComponent({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:o,slots:a,expose:r}){let l=n.ref(0);function s(){l.value|=Ue.Opening,t("beforeEnter")}function i(){l.value&=~Ue.Opening,t("afterEnter")}function c(){l.value|=Ue.Closing,t("beforeLeave")}function d(){l.value&=~Ue.Closing,t("afterLeave")}if(!Fg()&&Ym())return()=>n.h(sa,{...e,onBeforeEnter:s,onAfterEnter:i,onBeforeLeave:c,onAfterLeave:d},a);let f=n.ref(null),p=n.computed(()=>e.unmount?On.Unmount:On.Hidden);r({el:f,$el:f});let{show:h,appear:g}=Ug(),{register:u,unregister:m}=Hg(),y=n.ref(h.value?"visible":"hidden"),b={value:!0},v=lt(),O={value:!1},x=_c(()=>{!O.value&&y.value!=="hidden"&&(y.value="hidden",m(v),d())});n.onMounted(()=>{let P=u(v);n.onUnmounted(P)}),n.watchEffect(()=>{if(p.value===On.Hidden&&v){if(h.value&&y.value!=="visible"){y.value="visible";return}$e(y.value,{hidden:()=>m(v),visible:()=>u(v)})}});let T=zn(e.enter),N=zn(e.enterFrom),I=zn(e.enterTo),C=zn(e.entered),k=zn(e.leave),A=zn(e.leaveFrom),M=zn(e.leaveTo);n.onMounted(()=>{n.watchEffect(()=>{if(y.value==="visible"){let P=ae(f);if(P instanceof Comment&&P.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function X(P){let U=b.value&&!g.value,j=ae(f);!j||!(j instanceof HTMLElement)||U||(O.value=!0,h.value&&s(),h.value||c(),P(h.value?Ec(j,T,N,I,C,W=>{O.value=!1,W===Ns.Finished&&i()}):Ec(j,k,A,M,C,W=>{O.value=!1,W===Ns.Finished&&(Za(x)||(y.value="hidden",m(v),d()))})))}return n.onMounted(()=>{n.watch([h],(P,U,j)=>{X(j),b.value=!1},{immediate:!0})}),n.provide(Is,x),Xa(n.computed(()=>$e(y.value,{visible:Ue.Open,hidden:Ue.Closed})|l.value)),()=>{let{appear:P,show:U,enter:j,enterFrom:W,enterTo:Q,entered:ne,leave:_e,leaveFrom:Ye,leaveTo:se,...fe}=e,ye={ref:f},Te={...fe,...g.value&&h.value&&Zo.isServer?{class:n.normalizeClass([o.class,fe.class,...T,...N])}:{}};return Pe({theirProps:Te,ourProps:ye,slot:{},slots:a,attrs:o,features:wc,visible:y.value==="visible",name:"TransitionChild"})}}}),Vg=Sn,sa=n.defineComponent({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:o,slots:a}){let r=yo(),l=n.computed(()=>e.show===null&&r!==null?(r.value&Ue.Open)===Ue.Open:e.show);n.watchEffect(()=>{if(![!0,!1].includes(l.value))throw new Error('A is used but it is missing a `:show="true | false"` prop.')});let s=n.ref(l.value?"visible":"hidden"),i=_c(()=>{s.value="hidden"}),c=n.ref(!0),d={show:l,appear:n.computed(()=>e.appear||!c.value)};return n.onMounted(()=>{n.watchEffect(()=>{c.value=!1,l.value?s.value="visible":Za(i)||(s.value="hidden")})}),n.provide(Is,i),n.provide(Rs,d),()=>{let f=$o(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),p={unmount:e.unmount};return Pe({ourProps:{...p,as:"template"},theirProps:{},slot:{},slots:{...a,default:()=>[n.h(Vg,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...o,...p,...f},a.default)]},attrs:{},features:wc,visible:s.value==="visible",name:"Transition"})}}});const jg={},Gg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},zg=[n.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),n.createElementVNode("path",{d:"M8 5v10a1 1 0 0 0 1 1h10"},null,-1),n.createElementVNode("path",{d:"M5 8h10a1 1 0 0 1 1 1v10"},null,-1)];function Wg(e,t){return n.openBlock(),n.createElementBlock("svg",Gg,zg)}const Tc=Fr(jg,[["render",Wg]]),rt=n.defineComponent({__name:"IconButton",props:{variant:{default:"secondary"},type:{default:"button"},asAnchor:{type:Boolean,default:!1},download:{}},setup(e){const t={primary:"bg-blue-500 text-white focus:outline-blue-500",secondary:"bg-gray-300 dark:bg-gray-700 text-gray-800 dark:text-gray-200 focus:outline-blue-500",danger:"bg-red-500 text-white focus:outline-red-500",success:"bg-green-500 text-white focus:outline-green-500",transparent:"bg-transparent text-gray-800 dark:text-gray-100"},o=e,a=n.computed(()=>t[o.variant]);return(r,l)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(r.asAnchor?"a":"button"),{class:n.normalizeClass(`inline-flex items-center rounded-full border-0 p-2 shadow-sm focus:outline-none focus:ring-1 hover:opacity-75 disabled:opacity-25 ${a.value}`),type:r.asAnchor?void 0:r.type??"button",download:r.download??null},{default:n.withCtx(()=>[n.renderSlot(r.$slots,"default")]),_:3},8,["class","type","download"]))}}),Xg=n.createElementVNode("div",{class:"fixed inset-0 bg-gray-800/20 backdrop-blur-sm transition-opacity"},null,-1),Kg={class:"flex items-end sm:items-center justify-center min-h-full p-0 md:p-4"},Eo=n.defineComponent({__name:"BaseModal",props:{name:{},initialFocusRef:{}},setup(e){const t=e;n.onBeforeUnmount(()=>{r.value&&l()});const o=De(),a=n.computed(()=>o.dark),r=n.computed(()=>o.isOpen(t.name)),l=()=>{o.closeModal({name:t.name})};return(s,i)=>(n.openBlock(),n.createBlock(n.unref(sa),{show:r.value,as:"template",class:"nova-file-manager"},{default:n.withCtx(()=>[n.createVNode(n.unref(Ya),{as:"div",class:"relative z-[60]",style:{"z-index":"999"},onClose:l,"initial-focus":s.initialFocusRef},{default:n.withCtx(()=>[n.createVNode(n.unref(Sn),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:n.withCtx(()=>[Xg]),_:1}),n.createElementVNode("div",{class:n.normalizeClass([{dark:a.value},"fixed z-10 inset-0 overflow-y-auto"])},[n.createElementVNode("div",Kg,[n.createVNode(n.unref(Sn),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:n.withCtx(()=>[n.renderSlot(s.$slots,"default",{close:l,isOpen:r.value,dark:a.value})]),_:3})])],2)]),_:3},8,["initial-focus"])]),_:3},8,["show"]))}}),Hw="";var xc={},Oc={exports:{}};/*! +`));let g=Wl((s=p.props)!=null?s:{},c,f),u=n.cloneVNode(p,g,!0);for(let m in g)m.startsWith("on")&&(u.props||(u.props={}),u.props[m]=g[m]);return u}return Array.isArray(d)&&d.length===1?d[0]:d}return n.h(i,Object.assign({},c,f),{default:()=>d})}function zl(e){return e.flatMap(t=>t.type===n.Fragment?zl(t.children):[t])}function Wl(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},o={};for(let a of e)for(let r in a)r.startsWith("on")&&typeof a[r]=="function"?(o[r]!=null||(o[r]=[]),o[r].push(a[r])):t[r]=a[r];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(o).map(a=>[a,void 0])));for(let a in o)Object.assign(t,{[a](r,...l){let s=o[a];for(let i of s){if(r instanceof Event&&r.defaultPrevented)return;i(r,...l)}}});return t}function Xm(e){let t=Object.assign({},e);for(let o in t)t[o]===void 0&&delete t[o];return t}function $o(e,t=[]){let o=Object.assign({},e);for(let a of t)a in o&&delete o[a];return o}function Km(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var ea=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ea||{});let Wa=n.defineComponent({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:o}){return()=>{var a;let{features:r,...l}=e,s={"aria-hidden":(r&2)===2?!0:(a=l["aria-hidden"])!=null?a:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Pe({ourProps:s,theirProps:l,slot:{},attrs:o,slots:t,name:"Hidden"})}}}),Xl=Symbol("Context");var Ue=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ue||{});function Ym(){return yo()!==null}function yo(){return n.inject(Xl,null)}function Xa(e){n.provide(Xl,e)}var xe=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(xe||{}),Kl=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Kl||{});function Jm(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let sn=[];Jm(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&sn[0]!==t.target&&(sn.unshift(t.target),sn=sn.filter(o=>o!=null&&o.isConnected),sn.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function Qm(e){throw new Error("Unexpected object: "+e)}var ke=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(ke||{});function ms(e,t){let o=t.resolveItems();if(o.length<=0)return null;let a=t.resolveActiveIndex(),r=a??-1;switch(e.focus){case 0:{for(let l=0;l=0;--l)if(!t.resolveDisabled(o[l],l,o))return l;return a}case 2:{for(let l=r+1;l=0;--l)if(!t.resolveDisabled(o[l],l,o))return l;return a}case 4:{for(let l=0;l(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(qm||{}),$m=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))($m||{}),eg=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(eg||{});let Zl=Symbol("ComboboxContext");function jn(e){let t=n.inject(Zl,null);if(t===null){let o=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,jn),o}return t}let ql=Symbol("VirtualContext"),tg=n.defineComponent({name:"VirtualProvider",setup(e,{slots:t}){let o=jn("VirtualProvider"),a=n.computed(()=>{let i=ae(o.optionsRef);if(!i)return{start:0,end:0};let c=window.getComputedStyle(i);return{start:parseFloat(c.paddingBlockStart||c.paddingTop),end:parseFloat(c.paddingBlockEnd||c.paddingBottom)}}),r=km(n.computed(()=>({scrollPaddingStart:a.value.start,scrollPaddingEnd:a.value.end,count:o.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return ae(o.optionsRef)},overscan:12}))),l=n.computed(()=>{var i;return(i=o.virtual.value)==null?void 0:i.options}),s=n.ref(0);return n.watch([l],()=>{s.value+=1}),n.provide(ql,o.virtual.value?r:null),()=>[n.h("div",{style:{position:"relative",width:"100%",height:`${r.value.getTotalSize()}px`},ref:i=>{if(i){if(typeof process<"u"&&{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_a15f7265-2602-42e0-8137-bda6e3259aa3",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.7.0 node/v18.20.4 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_a15f7265-2602-42e0-8137-bda6e3259aa3",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/18.20.4/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/nova-file-manager/nova-file-manager/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"oneduo",GRADLE_HOME:"/usr/share/gradle-8.9",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/27.0.12077973",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"113685820",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu22",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/nova-file-manager/nova-file-manager",SYSTEMD_EXEC_PID:"597",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",GOROOT_1_20_X64:"/opt/hostedtoolcache/go/1.20.14/x64",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.12/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20240804.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.5/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",JOURNAL_STREAM:"8:1691",GITHUB_WORKFLOW:"Update Assets",_:"/opt/hostedtoolcache/node/18.20.4/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/18.20.4/x64",npm_config_npm_version:"10.7.0",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"10303150621",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"60a6ce078299eec7ae8d555eac8d13119a13e3ab",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",GITHUB_WORKFLOW_REF:"oneduo/nova-file-manager/.github/workflows/update-assets.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/nova-file-manager/nova-file-manager/node_modules/.bin:/home/runner/work/nova-file-manager/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/runner/work/nova-file-manager/nova-file-manager/node_modules/.bin:/home/runner/work/nova-file-manager/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/18.20.4/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_264f5152-a698-4fdb-9b85-b17f64ad54c9",INVOCATION_ID:"9401e6f485a24b14a9c0fcbff3fa7acd",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/18.20.4/x64/bin/node",npm_package_name:"nova-file-manager",GITHUB_ACTION:"__run",GITHUB_RUN_NUMBER:"664",GITHUB_TRIGGERING_ACTOR:"mikaelpopowicz",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 7",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"oneduo/nova-file-manager",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.0.12077973",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"505375003",GITHUB_ACTIONS:"true",npm_package_version:"0.8.0",npm_lifecycle_event:"build",GITHUB_REF_PROTECTED:"false",GITHUB_WORKSPACE:"/home/runner/work/nova-file-manager/nova-file-manager",ACCEPT_EULA:"Y",GITHUB_JOB:"update",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"60a6ce078299eec7ae8d555eac8d13119a13e3ab",GITHUB_RUN_ATTEMPT:"1",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"mikaelpopowicz",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",LEIN_HOME:"/usr/local/lib/lein",npm_config_globalconfig:"/opt/hostedtoolcache/node/18.20.4/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_a15f7265-2602-42e0-8137-bda6e3259aa3",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/nova-file-manager/nova-file-manager",GITHUB_ACTOR_ID:"5689944",RUNNER_WORKSPACE:"/home/runner/work/nova-file-manager",npm_execpath:"/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_a15f7265-2602-42e0-8137-bda6e3259aa3",npm_config_global_prefix:"/opt/hostedtoolcache/node/18.20.4/x64",TAILWIND_MODE:"build",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.0.12077973",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",STATS_EXTP:"https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.181+6/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.0.12077973",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_a15f7265-2602-42e0-8137-bda6e3259aa3",INIT_CWD:"/home/runner/work/nova-file-manager/nova-file-manager",EDITOR:"vi",NODE_ENV:"production"}.JEST_WORKER_ID!==void 0||o.activationTrigger.value===0)return;o.activeOptionIndex.value!==null&&o.virtual.value.options.length>o.activeOptionIndex.value&&r.value.scrollToIndex(o.activeOptionIndex.value)}}},r.value.getVirtualItems().map(i=>n.cloneVNode(t.default({option:o.virtual.value.options[i.index],open:o.comboboxState.value===0})[0],{key:`${s.value}-${i.index}`,"data-index":i.index,"aria-setsize":o.virtual.value.options.length,"aria-posinset":i.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${i.start}px)`,overflowAnchor:"none"}})))]}}),ng=n.defineComponent({name:"Combobox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],nullable:!0,default:null},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1},virtual:{type:Object,default:null}},inheritAttrs:!1,setup(e,{slots:t,attrs:o,emit:a}){let r=n.ref(1),l=n.ref(null),s=n.ref(null),i=n.ref(null),c=n.ref(null),d=n.ref({static:!1,hold:!1}),f=n.ref([]),p=n.ref(null),h=n.ref(2),g=n.ref(!1);function u(A=M=>M){let M=p.value!==null?f.value[p.value]:null,X=A(f.value.slice()),P=X.length>0&&X[0].dataRef.order.value!==null?X.sort((j,W)=>j.dataRef.order.value-W.dataRef.order.value):us(X,j=>ae(j.dataRef.domRef)),U=M?P.indexOf(M):null;return U===-1&&(U=null),{options:P,activeOptionIndex:U}}let m=n.computed(()=>e.multiple?1:0),y=n.computed(()=>e.nullable),[b,v]=Am(n.computed(()=>e.modelValue),A=>a("update:modelValue",A),n.computed(()=>e.defaultValue)),O=n.computed(()=>b.value===void 0?$e(m.value,{1:[],0:void 0}):b.value),x=null,T=null;function N(A){return $e(m.value,{0(){return v?.(A)},1:()=>{let M=n.toRaw(C.value.value).slice(),X=n.toRaw(A),P=M.findIndex(U=>C.compare(X,n.toRaw(U)));return P===-1?M.push(X):M.splice(P,1),v?.(M)}})}let I=n.computed(()=>{});n.watch([I],([A],[M])=>{if(C.virtual.value&&A&&M&&p.value!==null){let X=A.indexOf(M[p.value]);X!==-1?p.value=X:p.value=null}});let C={comboboxState:r,value:O,mode:m,compare(A,M){if(typeof e.by=="string"){let X=e.by;return A?.[X]===M?.[X]}return e.by===null?Zm(A,M):e.by(A,M)},calculateIndex(A){return C.virtual.value?e.by===null?C.virtual.value.options.indexOf(A):C.virtual.value.options.findIndex(M=>C.compare(M,A)):f.value.findIndex(M=>C.compare(M.dataRef.value,A))},defaultValue:n.computed(()=>e.defaultValue),nullable:y,immediate:n.computed(()=>!1),virtual:n.computed(()=>null),inputRef:s,labelRef:l,buttonRef:i,optionsRef:c,disabled:n.computed(()=>e.disabled),options:f,change(A){v(A)},activeOptionIndex:n.computed(()=>{if(g.value&&p.value===null&&(C.virtual.value?C.virtual.value.options.length>0:f.value.length>0)){if(C.virtual.value){let M=C.virtual.value.options.findIndex(X=>{var P;return!((P=C.virtual.value)!=null&&P.disabled(X))});if(M!==-1)return M}let A=f.value.findIndex(M=>!M.dataRef.disabled);if(A!==-1)return A}return p.value}),activationTrigger:h,optionsPropsRef:d,closeCombobox(){g.value=!1,!e.disabled&&r.value!==1&&(r.value=1,p.value=null)},openCombobox(){if(g.value=!0,!e.disabled&&r.value!==0){if(C.value.value){let A=C.calculateIndex(C.value.value);A!==-1&&(p.value=A)}r.value=0}},setActivationTrigger(A){h.value=A},goToOption(A,M,X){g.value=!1,x!==null&&cancelAnimationFrame(x),x=requestAnimationFrame(()=>{if(e.disabled||c.value&&!d.value.static&&r.value===1)return;if(C.virtual.value){p.value=A===ke.Specific?M:ms({focus:A},{resolveItems:()=>C.virtual.value.options,resolveActiveIndex:()=>{var j,W;return(W=(j=C.activeOptionIndex.value)!=null?j:C.virtual.value.options.findIndex(Q=>{var ne;return!((ne=C.virtual.value)!=null&&ne.disabled(Q))}))!=null?W:null},resolveDisabled:j=>C.virtual.value.disabled(j),resolveId(){throw new Error("Function not implemented.")}}),h.value=X??2;return}let P=u();if(P.activeOptionIndex===null){let j=P.options.findIndex(W=>!W.dataRef.disabled);j!==-1&&(P.activeOptionIndex=j)}let U=A===ke.Specific?M:ms({focus:A},{resolveItems:()=>P.options,resolveActiveIndex:()=>P.activeOptionIndex,resolveId:j=>j.id,resolveDisabled:j=>j.dataRef.disabled});p.value=U,h.value=X??2,f.value=P.options})},selectOption(A){let M=f.value.find(P=>P.id===A);if(!M)return;let{dataRef:X}=M;N(X.value)},selectActiveOption(){if(C.activeOptionIndex.value!==null){if(C.virtual.value)N(C.virtual.value.options[C.activeOptionIndex.value]);else{let{dataRef:A}=f.value[C.activeOptionIndex.value];N(A.value)}C.goToOption(ke.Specific,C.activeOptionIndex.value)}},registerOption(A,M){let X=n.reactive({id:A,dataRef:M});if(C.virtual.value){f.value.push(X);return}T&&cancelAnimationFrame(T);let P=u(U=>(U.push(X),U));p.value===null&&C.isSelected(M.value.value)&&(P.activeOptionIndex=P.options.indexOf(X)),f.value=P.options,p.value=P.activeOptionIndex,h.value=2,P.options.some(U=>!ae(U.dataRef.domRef))&&(T=requestAnimationFrame(()=>{let U=u();f.value=U.options,p.value=U.activeOptionIndex}))},unregisterOption(A,M){if(x!==null&&cancelAnimationFrame(x),M&&(g.value=!0),C.virtual.value){f.value=f.value.filter(P=>P.id!==A);return}let X=u(P=>{let U=P.findIndex(j=>j.id===A);return U!==-1&&P.splice(U,1),P});f.value=X.options,p.value=X.activeOptionIndex,h.value=2},isSelected(A){return $e(m.value,{0:()=>C.compare(n.toRaw(C.value.value),n.toRaw(A)),1:()=>n.toRaw(C.value.value).some(M=>C.compare(n.toRaw(M),n.toRaw(A)))})},isActive(A){return p.value===C.calculateIndex(A)}};fs([s,i,c],()=>C.closeCombobox(),n.computed(()=>r.value===0)),n.provide(Zl,C),Xa(n.computed(()=>$e(r.value,{0:Ue.Open,1:Ue.Closed})));let k=n.computed(()=>{var A;return(A=ae(s))==null?void 0:A.closest("form")});return n.onMounted(()=>{n.watch([k],()=>{if(!k.value||e.defaultValue===void 0)return;function A(){C.change(e.defaultValue)}return k.value.addEventListener("reset",A),()=>{var M;(M=k.value)==null||M.removeEventListener("reset",A)}},{immediate:!0})}),()=>{var A,M,X;let{name:P,disabled:U,form:j,...W}=e,Q={open:r.value===0,disabled:U,activeIndex:C.activeOptionIndex.value,activeOption:C.activeOptionIndex.value===null?null:C.virtual.value?C.virtual.value.options[(A=C.activeOptionIndex.value)!=null?A:0]:(X=(M=C.options.value[C.activeOptionIndex.value])==null?void 0:M.dataRef.value)!=null?X:null,value:O.value};return n.h(n.Fragment,[...P!=null&&O.value!=null?Yl({[P]:O.value}).map(([ne,_e])=>n.h(Wa,Xm({features:ea.Hidden,key:ne,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:j,disabled:U,name:ne,value:_e}))):[],Pe({theirProps:{...o,...$o(W,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:Q,slots:t,attrs:o,name:"Combobox"})])}}});n.defineComponent({name:"ComboboxLabel",props:{as:{type:[Object,String],default:"label"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o}){var a;let r=(a=e.id)!=null?a:`headlessui-combobox-label-${lt()}`,l=jn("ComboboxLabel");function s(){var i;(i=ae(l.inputRef))==null||i.focus({preventScroll:!0})}return()=>{let i={open:l.comboboxState.value===0,disabled:l.disabled.value},{...c}=e,d={id:r,ref:l.labelRef,onClick:s};return Pe({ourProps:d,theirProps:c,slot:i,attrs:t,slots:o,name:"ComboboxLabel"})}}}),n.defineComponent({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){var r;let l=(r=e.id)!=null?r:`headlessui-combobox-button-${lt()}`,s=jn("ComboboxButton");a({el:s.buttonRef,$el:s.buttonRef});function i(f){s.disabled.value||(s.comboboxState.value===0?s.closeCombobox():(f.preventDefault(),s.openCombobox()),n.nextTick(()=>{var p;return(p=ae(s.inputRef))==null?void 0:p.focus({preventScroll:!0})}))}function c(f){switch(f.key){case xe.ArrowDown:f.preventDefault(),f.stopPropagation(),s.comboboxState.value===1&&s.openCombobox(),n.nextTick(()=>{var p;return(p=s.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return;case xe.ArrowUp:f.preventDefault(),f.stopPropagation(),s.comboboxState.value===1&&(s.openCombobox(),n.nextTick(()=>{s.value.value||s.goToOption(ke.Last)})),n.nextTick(()=>{var p;return(p=s.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return;case xe.Escape:if(s.comboboxState.value!==0)return;f.preventDefault(),s.optionsRef.value&&!s.optionsPropsRef.value.static&&f.stopPropagation(),s.closeCombobox(),n.nextTick(()=>{var p;return(p=s.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return}}let d=ps(n.computed(()=>({as:e.as,type:t.type})),s.buttonRef);return()=>{var f,p;let h={open:s.comboboxState.value===0,disabled:s.disabled.value,value:s.value.value},{...g}=e,u={ref:s.buttonRef,id:l,type:d.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(f=ae(s.optionsRef))==null?void 0:f.id,"aria-expanded":s.comboboxState.value===0,"aria-labelledby":s.labelRef.value?[(p=ae(s.labelRef))==null?void 0:p.id,l].join(" "):void 0,disabled:s.disabled.value===!0?!0:void 0,onKeydown:c,onClick:i};return Pe({ourProps:u,theirProps:g,slot:h,attrs:t,slots:o,name:"ComboboxButton"})}}});let og=n.defineComponent({name:"ComboboxInput",props:{as:{type:[Object,String],default:"input"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:null}},emits:{change:e=>!0},setup(e,{emit:t,attrs:o,slots:a,expose:r}){var l;let s=(l=e.id)!=null?l:`headlessui-combobox-input-${lt()}`,i=jn("ComboboxInput"),c=n.computed(()=>rn(ae(i.inputRef))),d={value:!1};r({el:i.inputRef,$el:i.inputRef});function f(){i.change(null);let T=ae(i.optionsRef);T&&(T.scrollTop=0),i.goToOption(ke.Nothing)}let p=n.computed(()=>{var T;let N=i.value.value;return ae(i.inputRef)?typeof e.displayValue<"u"&&N!==void 0?(T=e.displayValue(N))!=null?T:"":typeof N=="string"?N:"":""});n.onMounted(()=>{n.watch([p,i.comboboxState,c],([T,N],[I,C])=>{if(d.value)return;let k=ae(i.inputRef);k&&((C===0&&N===1||T!==I)&&(k.value=T),requestAnimationFrame(()=>{var A;if(d.value||!k||((A=c.value)==null?void 0:A.activeElement)!==k)return;let{selectionStart:M,selectionEnd:X}=k;Math.abs((X??0)-(M??0))===0&&M===0&&k.setSelectionRange(k.value.length,k.value.length)}))},{immediate:!0}),n.watch([i.comboboxState],([T],[N])=>{if(T===0&&N===1){if(d.value)return;let I=ae(i.inputRef);if(!I)return;let C=I.value,{selectionStart:k,selectionEnd:A,selectionDirection:M}=I;I.value="",I.value=C,M!==null?I.setSelectionRange(k,A,M):I.setSelectionRange(k,A)}})});let h=n.ref(!1);function g(){h.value=!0}function u(){Tn().nextFrame(()=>{h.value=!1})}let m=Bm();function y(T){switch(d.value=!0,m(()=>{d.value=!1}),T.key){case xe.Enter:if(d.value=!1,i.comboboxState.value!==0||h.value)return;if(T.preventDefault(),T.stopPropagation(),i.activeOptionIndex.value===null){i.closeCombobox();return}i.selectActiveOption(),i.mode.value===0&&i.closeCombobox();break;case xe.ArrowDown:return d.value=!1,T.preventDefault(),T.stopPropagation(),$e(i.comboboxState.value,{0:()=>i.goToOption(ke.Next),1:()=>i.openCombobox()});case xe.ArrowUp:return d.value=!1,T.preventDefault(),T.stopPropagation(),$e(i.comboboxState.value,{0:()=>i.goToOption(ke.Previous),1:()=>{i.openCombobox(),n.nextTick(()=>{i.value.value||i.goToOption(ke.Last)})}});case xe.Home:if(T.shiftKey)break;return d.value=!1,T.preventDefault(),T.stopPropagation(),i.goToOption(ke.First);case xe.PageUp:return d.value=!1,T.preventDefault(),T.stopPropagation(),i.goToOption(ke.First);case xe.End:if(T.shiftKey)break;return d.value=!1,T.preventDefault(),T.stopPropagation(),i.goToOption(ke.Last);case xe.PageDown:return d.value=!1,T.preventDefault(),T.stopPropagation(),i.goToOption(ke.Last);case xe.Escape:if(d.value=!1,i.comboboxState.value!==0)return;T.preventDefault(),i.optionsRef.value&&!i.optionsPropsRef.value.static&&T.stopPropagation(),i.nullable.value&&i.mode.value===0&&i.value.value===null&&f(),i.closeCombobox();break;case xe.Tab:if(d.value=!1,i.comboboxState.value!==0)return;i.mode.value===0&&i.activationTrigger.value!==1&&i.selectActiveOption(),i.closeCombobox();break}}function b(T){t("change",T),i.nullable.value&&i.mode.value===0&&T.target.value===""&&f(),i.openCombobox()}function v(T){var N,I,C;let k=(N=T.relatedTarget)!=null?N:sn.find(A=>A!==T.currentTarget);if(d.value=!1,!((I=ae(i.optionsRef))!=null&&I.contains(k))&&!((C=ae(i.buttonRef))!=null&&C.contains(k))&&i.comboboxState.value===0)return T.preventDefault(),i.mode.value===0&&(i.nullable.value&&i.value.value===null?f():i.activationTrigger.value!==1&&i.selectActiveOption()),i.closeCombobox()}function O(T){var N,I,C;let k=(N=T.relatedTarget)!=null?N:sn.find(A=>A!==T.currentTarget);(I=ae(i.buttonRef))!=null&&I.contains(k)||(C=ae(i.optionsRef))!=null&&C.contains(k)||i.disabled.value||i.immediate.value&&i.comboboxState.value!==0&&(i.openCombobox(),Tn().nextFrame(()=>{i.setActivationTrigger(1)}))}let x=n.computed(()=>{var T,N,I,C;return(C=(I=(N=e.defaultValue)!=null?N:i.defaultValue.value!==void 0?(T=e.displayValue)==null?void 0:T.call(e,i.defaultValue.value):null)!=null?I:i.defaultValue.value)!=null?C:""});return()=>{var T,N,I,C,k,A,M;let X={open:i.comboboxState.value===0},{displayValue:P,onChange:U,...j}=e,W={"aria-controls":(T=i.optionsRef.value)==null?void 0:T.id,"aria-expanded":i.comboboxState.value===0,"aria-activedescendant":i.activeOptionIndex.value===null?void 0:i.virtual.value?(N=i.options.value.find(Q=>!i.virtual.value.disabled(Q.dataRef.value)&&i.compare(Q.dataRef.value,i.virtual.value.options[i.activeOptionIndex.value])))==null?void 0:N.id:(I=i.options.value[i.activeOptionIndex.value])==null?void 0:I.id,"aria-labelledby":(A=(C=ae(i.labelRef))==null?void 0:C.id)!=null?A:(k=ae(i.buttonRef))==null?void 0:k.id,"aria-autocomplete":"list",id:s,onCompositionstart:g,onCompositionend:u,onKeydown:y,onInput:b,onFocus:O,onBlur:v,role:"combobox",type:(M=o.type)!=null?M:"text",tabIndex:0,ref:i.inputRef,defaultValue:x.value,disabled:i.disabled.value===!0?!0:void 0};return Pe({ourProps:W,theirProps:j,slot:X,attrs:o,slots:a,features:It.RenderStrategy|It.Static,name:"ComboboxInput"})}}}),ag=n.defineComponent({name:"ComboboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(e,{attrs:t,slots:o,expose:a}){let r=jn("ComboboxOptions"),l=`headlessui-combobox-options-${lt()}`;a({el:r.optionsRef,$el:r.optionsRef}),n.watchEffect(()=>{r.optionsPropsRef.value.static=e.static}),n.watchEffect(()=>{r.optionsPropsRef.value.hold=e.hold});let s=yo(),i=n.computed(()=>s!==null?(s.value&Ue.Open)===Ue.Open:r.comboboxState.value===0);Gl({container:n.computed(()=>ae(r.optionsRef)),enabled:n.computed(()=>r.comboboxState.value===0),accept(d){return d.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:d.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(d){d.setAttribute("role","none")}});function c(d){d.preventDefault()}return()=>{var d,f,p;let h={open:r.comboboxState.value===0},g={"aria-labelledby":(p=(d=ae(r.labelRef))==null?void 0:d.id)!=null?p:(f=ae(r.buttonRef))==null?void 0:f.id,id:l,ref:r.optionsRef,role:"listbox","aria-multiselectable":r.mode.value===1?!0:void 0,onMousedown:c},u=$o(e,["hold"]);return Pe({ourProps:g,theirProps:u,slot:h,attrs:t,slots:r.virtual.value&&r.comboboxState.value===0?{...o,default:()=>[n.h(tg,{},o.default)]}:o,features:It.RenderStrategy|It.Static,visible:i.value,name:"ComboboxOptions"})}}}),$l=n.defineComponent({name:"ComboboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},order:{type:[Number],default:null}},setup(e,{slots:t,attrs:o,expose:a}){let r=jn("ComboboxOption"),l=`headlessui-combobox-option-${lt()}`,s=n.ref(null),i=n.computed(()=>e.disabled);a({el:s,$el:s});let c=n.computed(()=>{var v;return r.virtual.value?r.activeOptionIndex.value===r.calculateIndex(e.value):r.activeOptionIndex.value===null?!1:((v=r.options.value[r.activeOptionIndex.value])==null?void 0:v.id)===l}),d=n.computed(()=>r.isSelected(e.value)),f=n.inject(ql,null),p=n.computed(()=>({disabled:e.disabled,value:e.value,domRef:s,order:n.computed(()=>e.order)}));n.onMounted(()=>r.registerOption(l,p)),n.onUnmounted(()=>r.unregisterOption(l,c.value)),n.watchEffect(()=>{let v=ae(s);v&&f?.value.measureElement(v)}),n.watchEffect(()=>{r.comboboxState.value===0&&c.value&&(r.virtual.value||r.activationTrigger.value!==0&&n.nextTick(()=>{var v,O;return(O=(v=ae(s))==null?void 0:v.scrollIntoView)==null?void 0:O.call(v,{block:"nearest"})}))});function h(v){v.preventDefault(),v.button===Kl.Left&&(i.value||(r.selectOption(l),Fl()||requestAnimationFrame(()=>{var O;return(O=ae(r.inputRef))==null?void 0:O.focus({preventScroll:!0})}),r.mode.value===0&&r.closeCombobox()))}function g(){var v;if(e.disabled||(v=r.virtual.value)!=null&&v.disabled(e.value))return r.goToOption(ke.Nothing);let O=r.calculateIndex(e.value);r.goToOption(ke.Specific,O)}let u=jl();function m(v){u.update(v)}function y(v){var O;if(!u.wasMoved(v)||e.disabled||(O=r.virtual.value)!=null&&O.disabled(e.value)||c.value)return;let x=r.calculateIndex(e.value);r.goToOption(ke.Specific,x,0)}function b(v){var O;u.wasMoved(v)&&(e.disabled||(O=r.virtual.value)!=null&&O.disabled(e.value)||c.value&&(r.optionsPropsRef.value.hold||r.goToOption(ke.Nothing)))}return()=>{let{disabled:v}=e,O={active:c.value,selected:d.value,disabled:v},x={id:l,ref:s,role:"option",tabIndex:v===!0?void 0:-1,"aria-disabled":v===!0?!0:void 0,"aria-selected":d.value,disabled:void 0,onMousedown:h,onFocus:g,onPointerenter:m,onMouseenter:m,onPointermove:y,onMousemove:y,onPointerleave:b,onMouseleave:b},T=$o(e,["order","value"]);return Pe({ourProps:x,theirProps:T,slot:O,attrs:o,slots:t,name:"ComboboxOption"})}}});function ec(e,t,o,a){Zo.isServer||n.watchEffect(r=>{e=e??window,e.addEventListener(t,o,a),r(()=>e.removeEventListener(t,o,a))})}var ta=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(ta||{});function rg(){let e=n.ref(0);return Ul("keydown",t=>{t.key==="Tab"&&(e.value=t.shiftKey?1:0)}),e}function tc(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let o of e.value){let a=ae(o);a instanceof HTMLElement&&t.add(a)}return t}var nc=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(nc||{});let na=Object.assign(n.defineComponent({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:n.ref(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:o,expose:a}){let r=n.ref(null);a({el:r,$el:r});let l=n.computed(()=>rn(r)),s=n.ref(!1);n.onMounted(()=>s.value=!0),n.onUnmounted(()=>s.value=!1),ig({ownerDocument:l},n.computed(()=>s.value&&!!(e.features&16)));let i=lg({ownerDocument:l,container:r,initialFocus:n.computed(()=>e.initialFocus)},n.computed(()=>s.value&&!!(e.features&2)));cg({ownerDocument:l,container:r,containers:e.containers,previousActiveElement:i},n.computed(()=>s.value&&!!(e.features&8)));let c=rg();function d(g){let u=ae(r);u&&(m=>m())(()=>{$e(c.value,{[ta.Forwards]:()=>{qo(u,Jt.First,{skipElements:[g.relatedTarget]})},[ta.Backwards]:()=>{qo(u,Jt.Last,{skipElements:[g.relatedTarget]})}})})}let f=n.ref(!1);function p(g){g.key==="Tab"&&(f.value=!0,requestAnimationFrame(()=>{f.value=!1}))}function h(g){if(!s.value)return;let u=tc(e.containers);ae(r)instanceof HTMLElement&&u.add(ae(r));let m=g.relatedTarget;m instanceof HTMLElement&&m.dataset.headlessuiFocusGuard!=="true"&&(oc(u,m)||(f.value?qo(ae(r),$e(c.value,{[ta.Forwards]:()=>Jt.Next,[ta.Backwards]:()=>Jt.Previous})|Jt.WrapAround,{relativeTo:g.target}):g.target instanceof HTMLElement&&xn(g.target)))}return()=>{let g={},u={ref:r,onKeydown:p,onFocusout:h},{features:m,initialFocus:y,containers:b,...v}=e;return n.h(n.Fragment,[!!(m&4)&&n.h(Wa,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:ea.Focusable}),Pe({ourProps:u,theirProps:{...t,...v},slot:g,attrs:t,slots:o,name:"FocusTrap"}),!!(m&4)&&n.h(Wa,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:ea.Focusable})])}}}),{features:nc});function sg(e){let t=n.ref(sn.slice());return n.watch([e],([o],[a])=>{a===!0&&o===!1?is(()=>{t.value.splice(0)}):a===!1&&o===!0&&(t.value=sn.slice())},{flush:"post"}),()=>{var o;return(o=t.value.find(a=>a!=null&&a.isConnected))!=null?o:null}}function ig({ownerDocument:e},t){let o=sg(t);n.onMounted(()=>{n.watchEffect(()=>{var a,r;t.value||((a=e.value)==null?void 0:a.activeElement)===((r=e.value)==null?void 0:r.body)&&xn(o())},{flush:"post"})}),n.onUnmounted(()=>{t.value&&xn(o())})}function lg({ownerDocument:e,container:t,initialFocus:o},a){let r=n.ref(null),l=n.ref(!1);return n.onMounted(()=>l.value=!0),n.onUnmounted(()=>l.value=!1),n.onMounted(()=>{n.watch([t,o,a],(s,i)=>{if(s.every((d,f)=>i?.[f]===d)||!a.value)return;let c=ae(t);c&&is(()=>{var d,f;if(!l.value)return;let p=ae(o),h=(d=e.value)==null?void 0:d.activeElement;if(p){if(p===h){r.value=h;return}}else if(c.contains(h)){r.value=h;return}p?xn(p):qo(c,Jt.First|Jt.NoScroll)===Bl.Error&&console.warn("There are no focusable elements inside the "),r.value=(f=e.value)==null?void 0:f.activeElement})},{immediate:!0,flush:"post"})}),r}function cg({ownerDocument:e,container:t,containers:o,previousActiveElement:a},r){var l;ec((l=e.value)==null?void 0:l.defaultView,"focus",s=>{if(!r.value)return;let i=tc(o);ae(t)instanceof HTMLElement&&i.add(ae(t));let c=a.value;if(!c)return;let d=s.target;d&&d instanceof HTMLElement?oc(i,d)?(a.value=d,xn(d)):(s.preventDefault(),s.stopPropagation(),xn(c)):xn(a.value)},!0)}function oc(e,t){for(let o of e)if(o.contains(t))return!0;return!1}function dg(e){let t=n.shallowRef(e.getSnapshot());return n.onUnmounted(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function ug(e,t){let o=e(),a=new Set;return{getSnapshot(){return o},subscribe(r){return a.add(r),()=>a.delete(r)},dispatch(r,...l){let s=t[r].call(o,...l);s&&(o=s,a.forEach(i=>i()))}}}function fg(){let e;return{before({doc:t}){var o;let a=t.documentElement;e=((o=t.defaultView)!=null?o:window).innerWidth-a.clientWidth},after({doc:t,d:o}){let a=t.documentElement,r=a.clientWidth-a.offsetWidth,l=e-r;o.style(a,"paddingRight",`${l}px`)}}}function pg(){return Ll()?{before({doc:e,d:t,meta:o}){function a(r){return o.containers.flatMap(l=>l()).some(l=>l.contains(r))}t.microTask(()=>{var r;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let i=Tn();i.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>i.dispose()))}let l=(r=window.scrollY)!=null?r:window.pageYOffset,s=null;t.addEventListener(e,"click",i=>{if(i.target instanceof HTMLElement)try{let c=i.target.closest("a");if(!c)return;let{hash:d}=new URL(c.href),f=e.querySelector(d);f&&!a(f)&&(s=f)}catch{}},!0),t.addEventListener(e,"touchstart",i=>{if(i.target instanceof HTMLElement)if(a(i.target)){let c=i.target;for(;c.parentElement&&a(c.parentElement);)c=c.parentElement;t.style(c,"overscrollBehavior","contain")}else t.style(i.target,"touchAction","none")}),t.addEventListener(e,"touchmove",i=>{if(i.target instanceof HTMLElement){if(i.target.tagName==="INPUT")return;if(a(i.target)){let c=i.target;for(;c.parentElement&&c.dataset.headlessuiPortal!==""&&!(c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth);)c=c.parentElement;c.dataset.headlessuiPortal===""&&i.preventDefault()}else i.preventDefault()}},{passive:!1}),t.add(()=>{var i;let c=(i=window.scrollY)!=null?i:window.pageYOffset;l!==c&&window.scrollTo(0,l),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function hg(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function mg(e){let t={};for(let o of e)Object.assign(t,o(t));return t}let Gn=ug(()=>new Map,{PUSH(e,t){var o;let a=(o=this.get(e))!=null?o:{doc:e,count:0,d:Tn(),meta:new Set};return a.count++,a.meta.add(t),this.set(e,a),this},POP(e,t){let o=this.get(e);return o&&(o.count--,o.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:o}){let a={doc:e,d:t,meta:mg(o)},r=[pg(),fg(),hg()];r.forEach(({before:l})=>l?.(a)),r.forEach(({after:l})=>l?.(a))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Gn.subscribe(()=>{let e=Gn.getSnapshot(),t=new Map;for(let[o]of e)t.set(o,o.documentElement.style.overflow);for(let o of e.values()){let a=t.get(o.doc)==="hidden",r=o.count!==0;(r&&!a||!r&&a)&&Gn.dispatch(o.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",o),o.count===0&&Gn.dispatch("TEARDOWN",o)}});function gg(e,t,o){let a=dg(Gn),r=n.computed(()=>{let l=e.value?a.value.get(e.value):void 0;return l?l.count>0:!1});return n.watch([e,t],([l,s],[i],c)=>{if(!l||!s)return;Gn.dispatch("PUSH",l,o);let d=!1;c(()=>{d||(Gn.dispatch("POP",i??l,o),d=!0)})},{immediate:!0}),r}let gs=new Map,oa=new Map;function ac(e,t=n.ref(!0)){n.watchEffect(o=>{var a;if(!t.value)return;let r=ae(e);if(!r)return;o(function(){var s;if(!r)return;let i=(s=oa.get(r))!=null?s:1;if(i===1?oa.delete(r):oa.set(r,i-1),i!==1)return;let c=gs.get(r);c&&(c["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",c["aria-hidden"]),r.inert=c.inert,gs.delete(r))});let l=(a=oa.get(r))!=null?a:0;oa.set(r,l+1),l===0&&(gs.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function vg({defaultContainers:e=[],portals:t,mainTreeNodeRef:o}={}){let a=n.ref(null),r=rn(a);function l(){var s,i,c;let d=[];for(let f of e)f!==null&&(f instanceof HTMLElement?d.push(f):"value"in f&&f.value instanceof HTMLElement&&d.push(f.value));if(t!=null&&t.value)for(let f of t.value)d.push(f);for(let f of(s=r?.querySelectorAll("html > *, body > *"))!=null?s:[])f!==document.body&&f!==document.head&&f instanceof HTMLElement&&f.id!=="headlessui-portal-root"&&(f.contains(ae(a))||f.contains((c=(i=ae(a))==null?void 0:i.getRootNode())==null?void 0:c.host)||d.some(p=>f.contains(p))||d.push(f));return d}return{resolveContainers:l,contains(s){return l().some(i=>i.contains(s))},mainTreeNodeRef:a,MainTreeNode(){return o!=null?null:n.h(Wa,{features:ea.Hidden,ref:a})}}}let rc=Symbol("ForcePortalRootContext");function bg(){return n.inject(rc,!1)}let vs=n.defineComponent({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:o}){return n.provide(rc,e.force),()=>{let{force:a,...r}=e;return Pe({theirProps:r,ourProps:{},slot:{},slots:t,attrs:o,name:"ForcePortalRoot"})}}}),sc=Symbol("StackContext");var bs=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(bs||{});function yg(){return n.inject(sc,()=>{})}function Eg({type:e,enabled:t,element:o,onUpdate:a}){let r=yg();function l(...s){a?.(...s),r(...s)}n.onMounted(()=>{n.watch(t,(s,i)=>{s?l(0,e,o):i===!0&&l(1,e,o)},{immediate:!0,flush:"sync"})}),n.onUnmounted(()=>{t.value&&l(1,e,o)}),n.provide(sc,l)}let ic=Symbol("DescriptionContext");function _g(){let e=n.inject(ic,null);if(e===null)throw new Error("Missing parent");return e}function wg({slot:e=n.ref({}),name:t="Description",props:o={}}={}){let a=n.ref([]);function r(l){return a.value.push(l),()=>{let s=a.value.indexOf(l);s!==-1&&a.value.splice(s,1)}}return n.provide(ic,{register:r,slot:e,name:t,props:o}),n.computed(()=>a.value.length>0?a.value.join(" "):void 0)}n.defineComponent({name:"Description",props:{as:{type:[Object,String],default:"p"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o}){var a;let r=(a=e.id)!=null?a:`headlessui-description-${lt()}`,l=_g();return n.onMounted(()=>n.onUnmounted(l.register(r))),()=>{let{name:s="Description",slot:i=n.ref({}),props:c={}}=l,{...d}=e,f={...Object.entries(c).reduce((p,[h,g])=>Object.assign(p,{[h]:n.unref(g)}),{}),id:r};return Pe({ourProps:f,theirProps:d,slot:i.value,attrs:t,slots:o,name:s})}}});function Tg(e){let t=rn(e);if(!t){if(e===null)return null;throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`)}let o=t.getElementById("headlessui-portal-root");if(o)return o;let a=t.createElement("div");return a.setAttribute("id","headlessui-portal-root"),t.body.appendChild(a)}const ys=new WeakMap;function xg(e){var t;return(t=ys.get(e))!=null?t:0}function lc(e,t){let o=t(xg(e));return o<=0?ys.delete(e):ys.set(e,o),o}let cc=n.defineComponent({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:o}){let a=n.ref(null),r=n.computed(()=>rn(a)),l=bg(),s=n.inject(dc,null),i=n.ref(l===!0||s==null?Tg(a.value):s.resolveTarget());i.value&&lc(i.value,h=>h+1);let c=n.ref(!1);n.onMounted(()=>{c.value=!0}),n.watchEffect(()=>{l||s!=null&&(i.value=s.resolveTarget())});let d=n.inject(Es,null),f=!1,p=n.getCurrentInstance();return n.watch(a,()=>{if(f||!d)return;let h=ae(a);h&&(n.onUnmounted(d.register(h),p),f=!0)}),n.onUnmounted(()=>{var h,g;let u=(h=r.value)==null?void 0:h.getElementById("headlessui-portal-root");!u||i.value!==u||lc(i.value,m=>m-1)||i.value.children.length>0||(g=i.value.parentElement)==null||g.removeChild(i.value)}),()=>{if(!c.value||i.value===null)return null;let h={ref:a,"data-headlessui-portal":""};return n.h(n.Teleport,{to:i.value},Pe({ourProps:h,theirProps:e,slot:{},attrs:o,slots:t,name:"Portal"}))}}}),Es=Symbol("PortalParentContext");function Og(){let e=n.inject(Es,null),t=n.ref([]);function o(l){return t.value.push(l),e&&e.register(l),()=>a(l)}function a(l){let s=t.value.indexOf(l);s!==-1&&t.value.splice(s,1),e&&e.unregister(l)}let r={register:o,unregister:a,portals:t};return[t,n.defineComponent({name:"PortalWrapper",setup(l,{slots:s}){return n.provide(Es,r),()=>{var i;return(i=s.default)==null?void 0:i.call(s)}}})]}let dc=Symbol("PortalGroupContext"),Sg=n.defineComponent({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:o}){let a=n.reactive({resolveTarget(){return e.target}});return n.provide(dc,a),()=>{let{target:r,...l}=e;return Pe({theirProps:l,ourProps:{},slot:{},attrs:t,slots:o,name:"PortalGroup"})}}});var Ng=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ng||{});let _s=Symbol("DialogContext");function aa(e){let t=n.inject(_s,null);if(t===null){let o=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,aa),o}return t}let Ka="DC8F892D-2EBD-447C-A4C8-A03058436FF4",Ya=n.defineComponent({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:Ka},initialFocus:{type:Object,default:null},id:{type:String,default:null},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:o,slots:a,expose:r}){var l,s;let i=(l=e.id)!=null?l:`headlessui-dialog-${lt()}`,c=n.ref(!1);n.onMounted(()=>{c.value=!0});let d=!1,f=n.computed(()=>e.role==="dialog"||e.role==="alertdialog"?e.role:(d||(d=!0,console.warn(`Invalid role [${f}] passed to . Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")),p=n.ref(0),h=yo(),g=n.computed(()=>e.open===Ka&&h!==null?(h.value&Ue.Open)===Ue.Open:e.open),u=n.ref(null),m=n.computed(()=>rn(u));if(r({el:u,$el:u}),!(e.open!==Ka||h!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof g.value!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${g.value===Ka?void 0:e.open}`);let y=n.computed(()=>c.value&&g.value?0:1),b=n.computed(()=>y.value===0),v=n.computed(()=>p.value>1),O=n.inject(_s,null)!==null,[x,T]=Og(),{resolveContainers:N,mainTreeNodeRef:I,MainTreeNode:C}=vg({portals:x,defaultContainers:[n.computed(()=>{var se;return(se=Q.panelRef.value)!=null?se:u.value})]}),k=n.computed(()=>v.value?"parent":"leaf"),A=n.computed(()=>h!==null?(h.value&Ue.Closing)===Ue.Closing:!1),M=n.computed(()=>O||A.value?!1:b.value),X=n.computed(()=>{var se,fe,ye;return(ye=Array.from((fe=(se=m.value)==null?void 0:se.querySelectorAll("body > *"))!=null?fe:[]).find(Te=>Te.id==="headlessui-portal-root"?!1:Te.contains(ae(I))&&Te instanceof HTMLElement))!=null?ye:null});ac(X,M);let P=n.computed(()=>v.value?!0:b.value),U=n.computed(()=>{var se,fe,ye;return(ye=Array.from((fe=(se=m.value)==null?void 0:se.querySelectorAll("[data-headlessui-portal]"))!=null?fe:[]).find(Te=>Te.contains(ae(I))&&Te instanceof HTMLElement))!=null?ye:null});ac(U,P),Eg({type:"Dialog",enabled:n.computed(()=>y.value===0),element:u,onUpdate:(se,fe)=>{if(fe==="Dialog")return $e(se,{[bs.Add]:()=>p.value+=1,[bs.Remove]:()=>p.value-=1})}});let j=wg({name:"DialogDescription",slot:n.computed(()=>({open:g.value}))}),W=n.ref(null),Q={titleId:W,panelRef:n.ref(null),dialogState:y,setTitleId(se){W.value!==se&&(W.value=se)},close(){t("close",!1)}};n.provide(_s,Q);let ne=n.computed(()=>!(!b.value||v.value));fs(N,(se,fe)=>{se.preventDefault(),Q.close(),n.nextTick(()=>fe?.focus())},ne);let _e=n.computed(()=>!(v.value||y.value!==0));ec((s=m.value)==null?void 0:s.defaultView,"keydown",se=>{_e.value&&(se.defaultPrevented||se.key===xe.Escape&&(se.preventDefault(),se.stopPropagation(),Q.close()))});let Ye=n.computed(()=>!(A.value||y.value!==0||O));return gg(m,Ye,se=>{var fe;return{containers:[...(fe=se.containers)!=null?fe:[],N]}}),n.watchEffect(se=>{if(y.value!==0)return;let fe=ae(u);if(!fe)return;let ye=new ResizeObserver(Te=>{for(let Be of Te){let Re=Be.target.getBoundingClientRect();Re.x===0&&Re.y===0&&Re.width===0&&Re.height===0&&Q.close()}});ye.observe(fe),se(()=>ye.disconnect())}),()=>{let{open:se,initialFocus:fe,...ye}=e,Te={...o,ref:u,id:i,role:f.value,"aria-modal":y.value===0?!0:void 0,"aria-labelledby":W.value,"aria-describedby":j.value},Be={open:y.value===0};return n.h(vs,{force:!0},()=>[n.h(cc,()=>n.h(Sg,{target:u.value},()=>n.h(vs,{force:!1},()=>n.h(na,{initialFocus:fe,containers:N,features:b.value?$e(k.value,{parent:na.features.RestoreFocus,leaf:na.features.All&~na.features.FocusLock}):na.features.None},()=>n.h(T,{},()=>Pe({ourProps:Te,theirProps:{...ye,...o},slot:Be,attrs:o,slots:a,visible:y.value===0,features:It.RenderStrategy|It.Static,name:"Dialog"})))))),n.h(C)])}}});n.defineComponent({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o}){var a;let r=(a=e.id)!=null?a:`headlessui-dialog-overlay-${lt()}`,l=aa("DialogOverlay");function s(i){i.target===i.currentTarget&&(i.preventDefault(),i.stopPropagation(),l.close())}return()=>{let{...i}=e;return Pe({ourProps:{id:r,"aria-hidden":!0,onClick:s},theirProps:i,slot:{open:l.dialogState.value===0},attrs:t,slots:o,name:"DialogOverlay"})}}}),n.defineComponent({name:"DialogBackdrop",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},inheritAttrs:!1,setup(e,{attrs:t,slots:o,expose:a}){var r;let l=(r=e.id)!=null?r:`headlessui-dialog-backdrop-${lt()}`,s=aa("DialogBackdrop"),i=n.ref(null);return a({el:i,$el:i}),n.onMounted(()=>{if(s.panelRef.value===null)throw new Error("A component is being used, but a component is missing.")}),()=>{let{...c}=e,d={id:l,ref:i,"aria-hidden":!0};return n.h(vs,{force:!0},()=>n.h(cc,()=>Pe({ourProps:d,theirProps:{...t,...c},slot:{open:s.dialogState.value===0},attrs:t,slots:o,name:"DialogBackdrop"})))}}});let ln=n.defineComponent({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){var r;let l=(r=e.id)!=null?r:`headlessui-dialog-panel-${lt()}`,s=aa("DialogPanel");a({el:s.panelRef,$el:s.panelRef});function i(c){c.stopPropagation()}return()=>{let{...c}=e,d={id:l,ref:s.panelRef,onClick:i};return Pe({ourProps:d,theirProps:c,slot:{open:s.dialogState.value===0},attrs:t,slots:o,name:"DialogPanel"})}}}),uc=n.defineComponent({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o}){var a;let r=(a=e.id)!=null?a:`headlessui-dialog-title-${lt()}`,l=aa("DialogTitle");return n.onMounted(()=>{l.setTitleId(r),n.onUnmounted(()=>l.setTitleId(null))}),()=>{let{...s}=e;return Pe({ourProps:{id:r},theirProps:s,slot:{open:l.dialogState.value===0},attrs:t,slots:o,name:"DialogTitle"})}}});var Rg=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Rg||{});let fc=Symbol("DisclosureContext");function ws(e){let t=n.inject(fc,null);if(t===null){let o=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,ws),o}return t}let pc=Symbol("DisclosurePanelContext");function Ig(){return n.inject(pc,null)}let hc=n.defineComponent({name:"Disclosure",props:{as:{type:[Object,String],default:"template"},defaultOpen:{type:[Boolean],default:!1}},setup(e,{slots:t,attrs:o}){let a=n.ref(e.defaultOpen?0:1),r=n.ref(null),l=n.ref(null),s={buttonId:n.ref(`headlessui-disclosure-button-${lt()}`),panelId:n.ref(`headlessui-disclosure-panel-${lt()}`),disclosureState:a,panel:r,button:l,toggleDisclosure(){a.value=$e(a.value,{0:1,1:0})},closeDisclosure(){a.value!==1&&(a.value=1)},close(i){s.closeDisclosure();let c=(()=>i?i instanceof HTMLElement?i:i.value instanceof HTMLElement?ae(i):ae(s.button):ae(s.button))();c?.focus()}};return n.provide(fc,s),Xa(n.computed(()=>$e(a.value,{0:Ue.Open,1:Ue.Closed}))),()=>{let{defaultOpen:i,...c}=e,d={open:a.value===0,close:s.close};return Pe({theirProps:c,ourProps:{},slot:d,slots:t,attrs:o,name:"Disclosure"})}}}),mc=n.defineComponent({name:"DisclosureButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){let r=ws("DisclosureButton"),l=Ig(),s=n.computed(()=>l===null?!1:l.value===r.panelId.value);n.onMounted(()=>{s.value||e.id!==null&&(r.buttonId.value=e.id)}),n.onUnmounted(()=>{s.value||(r.buttonId.value=null)});let i=n.ref(null);a({el:i,$el:i}),s.value||n.watchEffect(()=>{r.button.value=i.value});let c=ps(n.computed(()=>({as:e.as,type:t.type})),i);function d(){var h;e.disabled||(s.value?(r.toggleDisclosure(),(h=ae(r.button))==null||h.focus()):r.toggleDisclosure())}function f(h){var g;if(!e.disabled)if(s.value)switch(h.key){case xe.Space:case xe.Enter:h.preventDefault(),h.stopPropagation(),r.toggleDisclosure(),(g=ae(r.button))==null||g.focus();break}else switch(h.key){case xe.Space:case xe.Enter:h.preventDefault(),h.stopPropagation(),r.toggleDisclosure();break}}function p(h){switch(h.key){case xe.Space:h.preventDefault();break}}return()=>{var h;let g={open:r.disclosureState.value===0},{id:u,...m}=e,y=s.value?{ref:i,type:c.value,onClick:d,onKeydown:f}:{id:(h=r.buttonId.value)!=null?h:u,ref:i,type:c.value,"aria-expanded":r.disclosureState.value===0,"aria-controls":r.disclosureState.value===0||ae(r.panel)?r.panelId.value:void 0,disabled:e.disabled?!0:void 0,onClick:d,onKeydown:f,onKeyup:p};return Pe({ourProps:y,theirProps:m,slot:g,attrs:t,slots:o,name:"DisclosureButton"})}}}),gc=n.defineComponent({name:"DisclosurePanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){let r=ws("DisclosurePanel");n.onMounted(()=>{e.id!==null&&(r.panelId.value=e.id)}),n.onUnmounted(()=>{r.panelId.value=null}),a({el:r.panel,$el:r.panel}),n.provide(pc,r.panelId);let l=yo(),s=n.computed(()=>l!==null?(l.value&Ue.Open)===Ue.Open:r.disclosureState.value===0);return()=>{var i;let c={open:r.disclosureState.value===0,close:r.close},{id:d,...f}=e,p={id:(i=r.panelId.value)!=null?i:d,ref:r.panel};return Pe({ourProps:p,theirProps:f,slot:c,attrs:t,slots:o,features:It.RenderStrategy|It.Static,visible:s.value,name:"DisclosurePanel"})}}}),vc=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function bc(e){var t,o;let a=(t=e.innerText)!=null?t:"",r=e.cloneNode(!0);if(!(r instanceof HTMLElement))return a;let l=!1;for(let i of r.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))i.remove(),l=!0;let s=l?(o=r.innerText)!=null?o:"":a;return vc.test(s)&&(s=s.replace(vc,"")),s}function Cg(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let o=e.getAttribute("aria-labelledby");if(o){let a=o.split(" ").map(r=>{let l=document.getElementById(r);if(l){let s=l.getAttribute("aria-label");return typeof s=="string"?s.trim():bc(l).trim()}return null}).filter(Boolean);if(a.length>0)return a.join(", ")}return bc(e).trim()}function kg(e){let t=n.ref(""),o=n.ref("");return()=>{let a=ae(e);if(!a)return"";let r=a.innerText;if(t.value===r)return o.value;let l=Cg(a).trim().toLowerCase();return t.value=r,o.value=l,l}}var Ag=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ag||{}),Dg=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Dg||{});function Bg(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let yc=Symbol("MenuContext");function Ja(e){let t=n.inject(yc,null);if(t===null){let o=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,Ja),o}return t}let Ts=n.defineComponent({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup(e,{slots:t,attrs:o}){let a=n.ref(1),r=n.ref(null),l=n.ref(null),s=n.ref([]),i=n.ref(""),c=n.ref(null),d=n.ref(1);function f(h=g=>g){let g=c.value!==null?s.value[c.value]:null,u=us(h(s.value.slice()),y=>ae(y.dataRef.domRef)),m=g?u.indexOf(g):null;return m===-1&&(m=null),{items:u,activeItemIndex:m}}let p={menuState:a,buttonRef:r,itemsRef:l,items:s,searchQuery:i,activeItemIndex:c,activationTrigger:d,closeMenu:()=>{a.value=1,c.value=null},openMenu:()=>a.value=0,goToItem(h,g,u){let m=f(),y=ms(h===ke.Specific?{focus:ke.Specific,id:g}:{focus:h},{resolveItems:()=>m.items,resolveActiveIndex:()=>m.activeItemIndex,resolveId:b=>b.id,resolveDisabled:b=>b.dataRef.disabled});i.value="",c.value=y,d.value=u??1,s.value=m.items},search(h){let g=i.value!==""?0:1;i.value+=h.toLowerCase();let u=(c.value!==null?s.value.slice(c.value+g).concat(s.value.slice(0,c.value+g)):s.value).find(y=>y.dataRef.textValue.startsWith(i.value)&&!y.dataRef.disabled),m=u?s.value.indexOf(u):-1;m===-1||m===c.value||(c.value=m,d.value=1)},clearSearch(){i.value=""},registerItem(h,g){let u=f(m=>[...m,{id:h,dataRef:g}]);s.value=u.items,c.value=u.activeItemIndex,d.value=1},unregisterItem(h){let g=f(u=>{let m=u.findIndex(y=>y.id===h);return m!==-1&&u.splice(m,1),u});s.value=g.items,c.value=g.activeItemIndex,d.value=1}};return fs([r,l],(h,g)=>{var u;p.closeMenu(),ds(g,cs.Loose)||(h.preventDefault(),(u=ae(r))==null||u.focus())},n.computed(()=>a.value===0)),n.provide(yc,p),Xa(n.computed(()=>$e(a.value,{0:Ue.Open,1:Ue.Closed}))),()=>{let h={open:a.value===0,close:p.closeMenu};return Pe({ourProps:{},theirProps:e,slot:h,slots:t,attrs:o,name:"Menu"})}}}),xs=n.defineComponent({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){var r;let l=(r=e.id)!=null?r:`headlessui-menu-button-${lt()}`,s=Ja("MenuButton");a({el:s.buttonRef,$el:s.buttonRef});function i(p){switch(p.key){case xe.Space:case xe.Enter:case xe.ArrowDown:p.preventDefault(),p.stopPropagation(),s.openMenu(),n.nextTick(()=>{var h;(h=ae(s.itemsRef))==null||h.focus({preventScroll:!0}),s.goToItem(ke.First)});break;case xe.ArrowUp:p.preventDefault(),p.stopPropagation(),s.openMenu(),n.nextTick(()=>{var h;(h=ae(s.itemsRef))==null||h.focus({preventScroll:!0}),s.goToItem(ke.Last)});break}}function c(p){switch(p.key){case xe.Space:p.preventDefault();break}}function d(p){e.disabled||(s.menuState.value===0?(s.closeMenu(),n.nextTick(()=>{var h;return(h=ae(s.buttonRef))==null?void 0:h.focus({preventScroll:!0})})):(p.preventDefault(),s.openMenu(),Bg(()=>{var h;return(h=ae(s.itemsRef))==null?void 0:h.focus({preventScroll:!0})})))}let f=ps(n.computed(()=>({as:e.as,type:t.type})),s.buttonRef);return()=>{var p;let h={open:s.menuState.value===0},{...g}=e,u={ref:s.buttonRef,id:l,type:f.value,"aria-haspopup":"menu","aria-controls":(p=ae(s.itemsRef))==null?void 0:p.id,"aria-expanded":s.menuState.value===0,onKeydown:i,onKeyup:c,onClick:d};return Pe({ourProps:u,theirProps:g,slot:h,attrs:t,slots:o,name:"MenuButton"})}}}),Os=n.defineComponent({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:a}){var r;let l=(r=e.id)!=null?r:`headlessui-menu-items-${lt()}`,s=Ja("MenuItems"),i=n.ref(null);a({el:s.itemsRef,$el:s.itemsRef}),Gl({container:n.computed(()=>ae(s.itemsRef)),enabled:n.computed(()=>s.menuState.value===0),accept(h){return h.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:h.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(h){h.setAttribute("role","none")}});function c(h){var g;switch(i.value&&clearTimeout(i.value),h.key){case xe.Space:if(s.searchQuery.value!=="")return h.preventDefault(),h.stopPropagation(),s.search(h.key);case xe.Enter:if(h.preventDefault(),h.stopPropagation(),s.activeItemIndex.value!==null){let u=s.items.value[s.activeItemIndex.value];(g=ae(u.dataRef.domRef))==null||g.click()}s.closeMenu(),Ml(ae(s.buttonRef));break;case xe.ArrowDown:return h.preventDefault(),h.stopPropagation(),s.goToItem(ke.Next);case xe.ArrowUp:return h.preventDefault(),h.stopPropagation(),s.goToItem(ke.Previous);case xe.Home:case xe.PageUp:return h.preventDefault(),h.stopPropagation(),s.goToItem(ke.First);case xe.End:case xe.PageDown:return h.preventDefault(),h.stopPropagation(),s.goToItem(ke.Last);case xe.Escape:h.preventDefault(),h.stopPropagation(),s.closeMenu(),n.nextTick(()=>{var u;return(u=ae(s.buttonRef))==null?void 0:u.focus({preventScroll:!0})});break;case xe.Tab:h.preventDefault(),h.stopPropagation(),s.closeMenu(),n.nextTick(()=>zm(ae(s.buttonRef),h.shiftKey?Jt.Previous:Jt.Next));break;default:h.key.length===1&&(s.search(h.key),i.value=setTimeout(()=>s.clearSearch(),350));break}}function d(h){switch(h.key){case xe.Space:h.preventDefault();break}}let f=yo(),p=n.computed(()=>f!==null?(f.value&Ue.Open)===Ue.Open:s.menuState.value===0);return()=>{var h,g;let u={open:s.menuState.value===0},{...m}=e,y={"aria-activedescendant":s.activeItemIndex.value===null||(h=s.items.value[s.activeItemIndex.value])==null?void 0:h.id,"aria-labelledby":(g=ae(s.buttonRef))==null?void 0:g.id,id:l,onKeydown:c,onKeyup:d,role:"menu",tabIndex:0,ref:s.itemsRef};return Pe({ourProps:y,theirProps:m,slot:u,attrs:t,slots:o,features:It.RenderStrategy|It.Static,visible:p.value,name:"MenuItems"})}}}),ra=n.defineComponent({name:"MenuItem",inheritAttrs:!1,props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(e,{slots:t,attrs:o,expose:a}){var r;let l=(r=e.id)!=null?r:`headlessui-menu-item-${lt()}`,s=Ja("MenuItem"),i=n.ref(null);a({el:i,$el:i});let c=n.computed(()=>s.activeItemIndex.value!==null?s.items.value[s.activeItemIndex.value].id===l:!1),d=kg(i),f=n.computed(()=>({disabled:e.disabled,get textValue(){return d()},domRef:i}));n.onMounted(()=>s.registerItem(l,f)),n.onUnmounted(()=>s.unregisterItem(l)),n.watchEffect(()=>{s.menuState.value===0&&c.value&&s.activationTrigger.value!==0&&n.nextTick(()=>{var b,v;return(v=(b=ae(i))==null?void 0:b.scrollIntoView)==null?void 0:v.call(b,{block:"nearest"})})});function p(b){if(e.disabled)return b.preventDefault();s.closeMenu(),Ml(ae(s.buttonRef))}function h(){if(e.disabled)return s.goToItem(ke.Nothing);s.goToItem(ke.Specific,l)}let g=jl();function u(b){g.update(b)}function m(b){g.wasMoved(b)&&(e.disabled||c.value||s.goToItem(ke.Specific,l,0))}function y(b){g.wasMoved(b)&&(e.disabled||c.value&&s.goToItem(ke.Nothing))}return()=>{let{disabled:b,...v}=e,O={active:c.value,disabled:b,close:s.closeMenu};return Pe({ourProps:{id:l,ref:i,role:"menuitem",tabIndex:b===!0?void 0:-1,"aria-disabled":b===!0?!0:void 0,onClick:p,onFocus:h,onPointerenter:u,onMouseenter:u,onPointermove:m,onMousemove:m,onPointerleave:y,onMouseleave:y},theirProps:{...o,...v},slot:O,attrs:o,slots:t,name:"MenuItem"})}}});function Pg(e){let t={called:!1};return(...o)=>{if(!t.called)return t.called=!0,e(...o)}}function Ss(e,...t){e&&t.length>0&&e.classList.add(...t)}function Qa(e,...t){e&&t.length>0&&e.classList.remove(...t)}var Ns=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(Ns||{});function Mg(e,t){let o=Tn();if(!e)return o.dispose;let{transitionDuration:a,transitionDelay:r}=getComputedStyle(e),[l,s]=[a,r].map(i=>{let[c=0]=i.split(",").filter(Boolean).map(d=>d.includes("ms")?parseFloat(d):parseFloat(d)*1e3).sort((d,f)=>f-d);return c});return l!==0?o.setTimeout(()=>t("finished"),l+s):t("finished"),o.add(()=>t("cancelled")),o.dispose}function Ec(e,t,o,a,r,l){let s=Tn(),i=l!==void 0?Pg(l):()=>{};return Qa(e,...r),Ss(e,...t,...o),s.nextFrame(()=>{Qa(e,...o),Ss(e,...a),s.add(Mg(e,c=>(Qa(e,...a,...t),Ss(e,...r),i(c))))}),s.add(()=>Qa(e,...t,...o,...a,...r)),s.add(()=>i("cancelled")),s.dispose}function zn(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let Rs=Symbol("TransitionContext");var Lg=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Lg||{});function Fg(){return n.inject(Rs,null)!==null}function Ug(){let e=n.inject(Rs,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}function Hg(){let e=n.inject(Is,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}let Is=Symbol("NestingContext");function Za(e){return"children"in e?Za(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function _c(e){let t=n.ref([]),o=n.ref(!1);n.onMounted(()=>o.value=!0),n.onUnmounted(()=>o.value=!1);function a(l,s=On.Hidden){let i=t.value.findIndex(({id:c})=>c===l);i!==-1&&($e(s,{[On.Unmount](){t.value.splice(i,1)},[On.Hidden](){t.value[i].state="hidden"}}),!Za(t)&&o.value&&e?.())}function r(l){let s=t.value.find(({id:i})=>i===l);return s?s.state!=="visible"&&(s.state="visible"):t.value.push({id:l,state:"visible"}),()=>a(l,On.Unmount)}return{children:t,register:r,unregister:a}}let wc=It.RenderStrategy,Sn=n.defineComponent({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:o,slots:a,expose:r}){let l=n.ref(0);function s(){l.value|=Ue.Opening,t("beforeEnter")}function i(){l.value&=~Ue.Opening,t("afterEnter")}function c(){l.value|=Ue.Closing,t("beforeLeave")}function d(){l.value&=~Ue.Closing,t("afterLeave")}if(!Fg()&&Ym())return()=>n.h(sa,{...e,onBeforeEnter:s,onAfterEnter:i,onBeforeLeave:c,onAfterLeave:d},a);let f=n.ref(null),p=n.computed(()=>e.unmount?On.Unmount:On.Hidden);r({el:f,$el:f});let{show:h,appear:g}=Ug(),{register:u,unregister:m}=Hg(),y=n.ref(h.value?"visible":"hidden"),b={value:!0},v=lt(),O={value:!1},x=_c(()=>{!O.value&&y.value!=="hidden"&&(y.value="hidden",m(v),d())});n.onMounted(()=>{let P=u(v);n.onUnmounted(P)}),n.watchEffect(()=>{if(p.value===On.Hidden&&v){if(h.value&&y.value!=="visible"){y.value="visible";return}$e(y.value,{hidden:()=>m(v),visible:()=>u(v)})}});let T=zn(e.enter),N=zn(e.enterFrom),I=zn(e.enterTo),C=zn(e.entered),k=zn(e.leave),A=zn(e.leaveFrom),M=zn(e.leaveTo);n.onMounted(()=>{n.watchEffect(()=>{if(y.value==="visible"){let P=ae(f);if(P instanceof Comment&&P.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function X(P){let U=b.value&&!g.value,j=ae(f);!j||!(j instanceof HTMLElement)||U||(O.value=!0,h.value&&s(),h.value||c(),P(h.value?Ec(j,T,N,I,C,W=>{O.value=!1,W===Ns.Finished&&i()}):Ec(j,k,A,M,C,W=>{O.value=!1,W===Ns.Finished&&(Za(x)||(y.value="hidden",m(v),d()))})))}return n.onMounted(()=>{n.watch([h],(P,U,j)=>{X(j),b.value=!1},{immediate:!0})}),n.provide(Is,x),Xa(n.computed(()=>$e(y.value,{visible:Ue.Open,hidden:Ue.Closed})|l.value)),()=>{let{appear:P,show:U,enter:j,enterFrom:W,enterTo:Q,entered:ne,leave:_e,leaveFrom:Ye,leaveTo:se,...fe}=e,ye={ref:f},Te={...fe,...g.value&&h.value&&Zo.isServer?{class:n.normalizeClass([o.class,fe.class,...T,...N])}:{}};return Pe({theirProps:Te,ourProps:ye,slot:{},slots:a,attrs:o,features:wc,visible:y.value==="visible",name:"TransitionChild"})}}}),Vg=Sn,sa=n.defineComponent({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:o,slots:a}){let r=yo(),l=n.computed(()=>e.show===null&&r!==null?(r.value&Ue.Open)===Ue.Open:e.show);n.watchEffect(()=>{if(![!0,!1].includes(l.value))throw new Error('A is used but it is missing a `:show="true | false"` prop.')});let s=n.ref(l.value?"visible":"hidden"),i=_c(()=>{s.value="hidden"}),c=n.ref(!0),d={show:l,appear:n.computed(()=>e.appear||!c.value)};return n.onMounted(()=>{n.watchEffect(()=>{c.value=!1,l.value?s.value="visible":Za(i)||(s.value="hidden")})}),n.provide(Is,i),n.provide(Rs,d),()=>{let f=$o(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),p={unmount:e.unmount};return Pe({ourProps:{...p,as:"template"},theirProps:{},slot:{},slots:{...a,default:()=>[n.h(Vg,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...o,...p,...f},a.default)]},attrs:{},features:wc,visible:s.value==="visible",name:"Transition"})}}});const jg={},Gg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},zg=[n.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),n.createElementVNode("path",{d:"M8 5v10a1 1 0 0 0 1 1h10"},null,-1),n.createElementVNode("path",{d:"M5 8h10a1 1 0 0 1 1 1v10"},null,-1)];function Wg(e,t){return n.openBlock(),n.createElementBlock("svg",Gg,zg)}const Tc=Fr(jg,[["render",Wg]]),rt=n.defineComponent({__name:"IconButton",props:{variant:{default:"secondary"},type:{default:"button"},asAnchor:{type:Boolean,default:!1},download:{}},setup(e){const t={primary:"bg-blue-500 text-white focus:outline-blue-500",secondary:"bg-gray-300 dark:bg-gray-700 text-gray-800 dark:text-gray-200 focus:outline-blue-500",danger:"bg-red-500 text-white focus:outline-red-500",success:"bg-green-500 text-white focus:outline-green-500",transparent:"bg-transparent text-gray-800 dark:text-gray-100"},o=e,a=n.computed(()=>t[o.variant]);return(r,l)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(r.asAnchor?"a":"button"),{class:n.normalizeClass(`inline-flex items-center rounded-full border-0 p-2 shadow-sm focus:outline-none focus:ring-1 hover:opacity-75 disabled:opacity-25 ${a.value}`),type:r.asAnchor?void 0:r.type??"button",download:r.download??null},{default:n.withCtx(()=>[n.renderSlot(r.$slots,"default")]),_:3},8,["class","type","download"]))}}),Xg=n.createElementVNode("div",{class:"fixed inset-0 bg-gray-800/20 backdrop-blur-sm transition-opacity"},null,-1),Kg={class:"flex items-end sm:items-center justify-center min-h-full p-0 md:p-4"},Eo=n.defineComponent({__name:"BaseModal",props:{name:{},initialFocusRef:{}},setup(e){const t=e;n.onBeforeUnmount(()=>{r.value&&l()});const o=De(),a=n.computed(()=>o.dark),r=n.computed(()=>o.isOpen(t.name)),l=()=>{o.closeModal({name:t.name})};return(s,i)=>(n.openBlock(),n.createBlock(n.unref(sa),{show:r.value,as:"template",class:"nova-file-manager"},{default:n.withCtx(()=>[n.createVNode(n.unref(Ya),{as:"div",class:"relative z-[60]",style:{"z-index":"999"},onClose:l,"initial-focus":s.initialFocusRef},{default:n.withCtx(()=>[n.createVNode(n.unref(Sn),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:n.withCtx(()=>[Xg]),_:1}),n.createElementVNode("div",{class:n.normalizeClass([{dark:a.value},"fixed z-10 inset-0 overflow-y-auto"])},[n.createElementVNode("div",Kg,[n.createVNode(n.unref(Sn),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:n.withCtx(()=>[n.renderSlot(s.$slots,"default",{close:l,isOpen:r.value,dark:a.value})]),_:3})])],2)]),_:3},8,["initial-focus"])]),_:3},8,["show"]))}}),Hw="";var xc={},Oc={exports:{}};/*! * Cropper.js v1.5.12 * https://fengyuanchen.github.io/cropperjs *