scrum-skills 0.2.7 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/board/200.html +1 -1
- package/assets/board/404.html +1 -1
- package/assets/board/_nuxt/{wRPvhAJz.js → 1eqboJxR.js} +1 -1
- package/assets/board/_nuxt/{CTK2Sysu.js → 2K7ag6ES.js} +1 -1
- package/assets/board/_nuxt/{BfBP16Im.js → BDK2Hj7B.js} +1 -1
- package/assets/board/_nuxt/{D7ufz00d.js → BDcnzXHq.js} +1 -1
- package/assets/board/_nuxt/{CyG4hsVv.js → BodFvto3.js} +1 -1
- package/assets/board/_nuxt/{BbaAxZ2N.js → BpWeHLuN.js} +1 -1
- package/assets/board/_nuxt/{f1ditBVp.js → C40iTe-x.js} +1 -1
- package/assets/board/_nuxt/{CqTxogVu.js → CGI_ZV79.js} +1 -1
- package/assets/board/_nuxt/{b2JYbYKt.js → CJMBJQuf.js} +1 -1
- package/assets/board/_nuxt/{M6ZOYZ8R.js → CMUi2-Lj.js} +1 -1
- package/assets/board/_nuxt/{CXCIZbbz.js → COf6E6h4.js} +1 -1
- package/assets/board/_nuxt/{CKtAvtay.js → CPCUMJnF.js} +1 -1
- package/assets/board/_nuxt/{DNtz8Ent.js → CPcKlmSm.js} +1 -1
- package/assets/board/_nuxt/{BaqGLZhY.js → CSSb154I.js} +1 -1
- package/assets/board/_nuxt/{CMt3SL3m.js → CkF353aX.js} +15 -15
- package/assets/board/_nuxt/{Dc4dIyTM.js → CvLiA4_O.js} +1 -1
- package/assets/board/_nuxt/{BWgbICJ-.js → Cvs12oA0.js} +1 -1
- package/assets/board/_nuxt/{BC0YsiYy.js → CyEXFe3V.js} +1 -1
- package/assets/board/_nuxt/{KxQggkNX.js → D2FhHl1o.js} +1 -1
- package/assets/board/_nuxt/{q6p4rsh_.js → D75vbfSb.js} +1 -1
- package/assets/board/_nuxt/{DUhdM-rb.js → DEfLc7p3.js} +1 -1
- package/assets/board/_nuxt/{CmyOKc3S.js → DRPlYvb3.js} +1 -1
- package/assets/board/_nuxt/{z40PaBW1.js → DRlQgul3.js} +1 -1
- package/assets/board/_nuxt/{jtompfyX.js → D_S6N7_b.js} +1 -1
- package/assets/board/_nuxt/{BscJTep0.js → DfR3IZN_.js} +1 -1
- package/assets/board/_nuxt/{DOdi2wDw.js → DhuleNnm.js} +1 -1
- package/assets/board/_nuxt/{Cplt7ZnK.js → DnDHGSYI.js} +1 -1
- package/assets/board/_nuxt/DrprggWq.js +3 -0
- package/assets/board/_nuxt/{BetRVCu6.js → Dtsa-1NS.js} +1 -1
- package/assets/board/_nuxt/{C5MtlISK.js → Dx1wcYFo.js} +1 -1
- package/assets/board/_nuxt/{o_84IzFk.js → EYTShbt4.js} +1 -1
- package/assets/board/_nuxt/{CcYp6rwI.js → P9x67aq2.js} +1 -1
- package/assets/board/_nuxt/{DgbDcd9I.js → assMu_Wn.js} +1 -1
- package/assets/board/_nuxt/builds/latest.json +1 -1
- package/assets/board/_nuxt/builds/meta/d7f0931f-32b3-4c23-b05f-7cbf5851b226.json +1 -0
- package/assets/board/_nuxt/{entry.CqnxzTAU.css → entry.Dx3CNA--.css} +1 -1
- package/assets/board/_nuxt/last-change.8FndoiOt.css +1 -0
- package/assets/board/_nuxt/{DrZpfjBq.js → rlePnzpc.js} +1 -1
- package/assets/board/_nuxt/{Cti_rGPY.js → vwxaNGfc.js} +1 -1
- package/assets/board/burndown/index.html +1 -1
- package/assets/board/epics/index.html +1 -1
- package/assets/board/gantt/index.html +1 -1
- package/assets/board/index.html +1 -1
- package/assets/board/last-change/index.html +1 -1
- package/assets/board/milestones/index.html +1 -1
- package/docs/ai-assistant-guide.md +1008 -0
- package/package.json +1 -1
- package/assets/board/_nuxt/Cj8KbSzE.js +0 -2
- package/assets/board/_nuxt/builds/meta/88de87b9-e62d-4466-a908-66ef1b011538.json +0 -1
- package/assets/board/_nuxt/last-change.B59xu_sV.css +0 -1
package/assets/board/200.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>敏捷看板</title><script type="importmap">{"imports":{"#entry":"/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>敏捷看板</title><script type="importmap">{"imports":{"#entry":"/_nuxt/CkF353aX.js"}}</script><link rel="stylesheet" href="/_nuxt/entry.Dx3CNA--.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/_nuxt/CkF353aX.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/DK3Fl9T5.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/D2O8Q8x9.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/DZo3dYLJ.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/51OWHj8c.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/B3jkABw9.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/6gFtTBwm.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/DSaWoFHS.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/Csqgy925.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/C7K0R7F-.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/ChG76uh9.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/CJ2mz0WY.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/DEfLc7p3.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/DLkAKotw.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/Vo4wMbnS.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/CuJUHLl8.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/CK9_veoz.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/Bb3Limos.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/Dtsa-1NS.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/Ci0qbkgh.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/BuOKDFiJ.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/D3YCAmfu.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/B_SlFcWp.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/Bi9Axj3V.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/rlePnzpc.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/DfR3IZN_.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/EYTShbt4.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/BgLeKwx0.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/C9StZL3D.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/BPTrRhcw.js"><script type="module" src="/_nuxt/CkF353aX.js" crossorigin></script><link rel="prefetch" as="script" crossorigin href="/_nuxt/CSSb154I.js"><link rel="prefetch" as="script" crossorigin href="/_nuxt/DHihWhf5.js"><link rel="prefetch" as="style" crossorigin href="/_nuxt/error-404.BFmXOnCT.css"><link rel="prefetch" as="script" crossorigin href="/_nuxt/B5n2_jZN.js"><link rel="prefetch" as="style" crossorigin href="/_nuxt/error-500.BZ-DdjQ6.css"><link rel="prefetch" as="script" crossorigin href="/_nuxt/ZVTqot-_.js"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><link rel="apple-touch-icon" href="/favicon.svg"></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/",buildId:"d7f0931f-32b3-4c23-b05f-7cbf5851b226",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1793369477277,false]</script></body></html>
|
package/assets/board/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>敏捷看板</title><script type="importmap">{"imports":{"#entry":"/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>敏捷看板</title><script type="importmap">{"imports":{"#entry":"/_nuxt/CkF353aX.js"}}</script><link rel="stylesheet" href="/_nuxt/entry.Dx3CNA--.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/_nuxt/CkF353aX.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/DK3Fl9T5.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/D2O8Q8x9.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/DZo3dYLJ.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/51OWHj8c.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/B3jkABw9.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/6gFtTBwm.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/DSaWoFHS.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/Csqgy925.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/C7K0R7F-.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/ChG76uh9.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/CJ2mz0WY.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/DEfLc7p3.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/DLkAKotw.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/Vo4wMbnS.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/CuJUHLl8.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/CK9_veoz.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/Bb3Limos.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/Dtsa-1NS.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/Ci0qbkgh.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/BuOKDFiJ.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/D3YCAmfu.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/B_SlFcWp.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/Bi9Axj3V.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/rlePnzpc.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/DfR3IZN_.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/EYTShbt4.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/BgLeKwx0.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/C9StZL3D.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/BPTrRhcw.js"><script type="module" src="/_nuxt/CkF353aX.js" crossorigin></script><link rel="prefetch" as="script" crossorigin href="/_nuxt/CSSb154I.js"><link rel="prefetch" as="script" crossorigin href="/_nuxt/DHihWhf5.js"><link rel="prefetch" as="style" crossorigin href="/_nuxt/error-404.BFmXOnCT.css"><link rel="prefetch" as="script" crossorigin href="/_nuxt/B5n2_jZN.js"><link rel="prefetch" as="style" crossorigin href="/_nuxt/error-500.BZ-DdjQ6.css"><link rel="prefetch" as="script" crossorigin href="/_nuxt/ZVTqot-_.js"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><link rel="apple-touch-icon" href="/favicon.svg"></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/",buildId:"d7f0931f-32b3-4c23-b05f-7cbf5851b226",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1793369477277,false]</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{On as e,Zn as t,g as n,mt as r,qt as i,v as a}from"./DZo3dYLJ.js";import{r as o}from"./Csqgy925.js";import{n as s,t as c}from"./6gFtTBwm.js";import{t as l}from"./CQTvWh4i.js";import{t as u}from"./
|
|
1
|
+
import{On as e,Zn as t,g as n,mt as r,qt as i,v as a}from"./DZo3dYLJ.js";import{r as o}from"./Csqgy925.js";import{n as s,t as c}from"./6gFtTBwm.js";import{t as l}from"./CQTvWh4i.js";import{t as u}from"./Dx1wcYFo.js";var d={base:`rounded-full`},f={__name:`ProseBadge`,props:{class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(f){let p=s(`prose.badge`,f),m=o(),h=n(()=>c({extend:d,...m.ui?.prose?.badge||{}}));return(n,o)=>(r(),a(u,{color:`primary`,variant:`subtle`,class:t(h.value({class:[e(p).ui?.base,e(p).class]}))},{default:i(()=>[l(n.$slots,`default`,{mdcUnwrap:`p`})]),_:3},8,[`class`]))}};export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as e,Lt as t,On as n,Zn as r,_ as i,b as a,et as o,g as s,mt as c,qt as l,tr as u,v as d,xt as f,y as p}from"./DZo3dYLJ.js";import{r as m}from"./Csqgy925.js";import{n as h,t as g}from"./6gFtTBwm.js";import{t as _}from"./
|
|
1
|
+
import{E as e,Lt as t,On as n,Zn as r,_ as i,b as a,et as o,g as s,mt as c,qt as l,tr as u,v as d,xt as f,y as p}from"./DZo3dYLJ.js";import{r as m}from"./Csqgy925.js";import{n as h,t as g}from"./6gFtTBwm.js";import{t as _}from"./rlePnzpc.js";import{t as v}from"./BgLeKwx0.js";import{t as y}from"./CQTvWh4i.js";var b={slots:{base:[`group relative block my-5 p-4 sm:p-6 border border-default rounded-md bg-default`,`transition-colors`],icon:`size-6 mb-2 block`,title:`text-highlighted font-semibold`,description:`text-[15px] text-muted *:first:mt-0 *:last:mb-0 *:my-1`,externalIcon:[`size-4 align-top absolute end-2 top-2 text-dimmed pointer-events-none`,`transition-colors`]},variants:{color:{primary:{icon:`text-primary`},secondary:{icon:`text-secondary`},success:{icon:`text-success`},info:{icon:`text-info`},warning:{icon:`text-warning`},error:{icon:`text-error`},neutral:{icon:`text-highlighted`}},to:{true:``},title:{true:{description:`mt-1`}}},compoundVariants:[{color:`primary`,to:!0,class:{base:`hover:bg-primary/10 hover:border-primary outline-primary/25 has-[>a:focus-visible]:outline-3 has-[>a:focus-visible]:border-primary`,externalIcon:`group-hover:text-primary`}},{color:`secondary`,to:!0,class:{base:`hover:bg-secondary/10 hover:border-secondary outline-secondary/25 has-[>a:focus-visible]:outline-3 has-[>a:focus-visible]:border-secondary`,externalIcon:`group-hover:text-secondary`}},{color:`success`,to:!0,class:{base:`hover:bg-success/10 hover:border-success outline-success/25 has-[>a:focus-visible]:outline-3 has-[>a:focus-visible]:border-success`,externalIcon:`group-hover:text-success`}},{color:`info`,to:!0,class:{base:`hover:bg-info/10 hover:border-info outline-info/25 has-[>a:focus-visible]:outline-3 has-[>a:focus-visible]:border-info`,externalIcon:`group-hover:text-info`}},{color:`warning`,to:!0,class:{base:`hover:bg-warning/10 hover:border-warning outline-warning/25 has-[>a:focus-visible]:outline-3 has-[>a:focus-visible]:border-warning`,externalIcon:`group-hover:text-warning`}},{color:`error`,to:!0,class:{base:`hover:bg-error/10 hover:border-error outline-error/25 has-[>a:focus-visible]:outline-3 has-[>a:focus-visible]:border-error`,externalIcon:`group-hover:text-error`}},{color:`neutral`,to:!0,class:{base:`hover:bg-elevated/50 hover:border-inverted outline-inverted/25 has-[>a:focus-visible]:outline-3 has-[>a:focus-visible]:border-inverted`,externalIcon:`group-hover:text-highlighted`}}],defaultVariants:{color:`primary`}},x=Object.assign({inheritAttrs:!1},{__name:`ProseCard`,props:{to:{type:null,required:!1},target:{type:[String,Object,null],required:!1},icon:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},color:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(x){let S=x,C=t(),w=h(`prose.card`,S),T=m(),E=s(()=>g({extend:b,...T.ui?.prose?.card||{}})({color:w.color,to:!!w.to,title:!!w.title})),D=s(()=>w.target||(w.to&&typeof w.to==`string`&&w.to.startsWith(`http`)?`_blank`:void 0)),O=s(()=>(w.title||`Card link`).trim());return(t,s)=>(c(),a(`div`,o(n(w).to?{}:t.$attrs,{class:E.value.base({class:[n(w).ui?.base,n(w).class]})}),[n(w).to?(c(),d(v,o({key:0,"aria-label":O.value},{to:n(w).to,target:D.value,...t.$attrs},{class:`focus:outline-none`,raw:``}),{default:l(()=>[...s[0]||=[i(`span`,{class:`absolute inset-0`,"aria-hidden":`true`},null,-1)]]),_:1},16,[`aria-label`])):p(``,!0),n(w).icon?(c(),d(_,{key:1,name:n(w).icon,class:r(E.value.icon({class:n(w).ui?.icon}))},null,8,[`name`,`class`])):p(``,!0),n(w).to&&D.value===`_blank`?(c(),d(_,{key:2,name:n(T).ui.icons.external,class:r(E.value.externalIcon({class:n(w).ui?.externalIcon}))},null,8,[`name`,`class`])):p(``,!0),n(w).title||C.title?(c(),a(`p`,{key:3,class:r(E.value.title({class:n(w).ui?.title}))},[y(t.$slots,`title`,{mdcUnwrap:`p`},()=>[e(u(n(w).title),1)])],2)):p(``,!0),C.default?(c(),a(`div`,{key:4,class:r(E.value.description({class:n(w).ui?.description}))},[f(t.$slots,`default`,{},()=>[e(u(n(w).description),1)])],2)):p(``,!0)],16))}});export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./D2O8Q8x9.js";import{D as t,On as n,Zn as r,_ as i,b as a,g as o,mt as s,xt as c}from"./DZo3dYLJ.js";import{r as l}from"./Csqgy925.js";import{n as u,t as d}from"./6gFtTBwm.js";import{t as f}from"./
|
|
1
|
+
import{s as e}from"./D2O8Q8x9.js";import{D as t,On as n,Zn as r,_ as i,b as a,g as o,mt as s,xt as c}from"./DZo3dYLJ.js";import{r as l}from"./Csqgy925.js";import{n as u,t as d}from"./6gFtTBwm.js";import{t as f}from"./rlePnzpc.js";var p={slots:{base:[`relative text-2xl text-highlighted font-bold mt-12 mb-6 scroll-mt-[calc(48px+45px+var(--ui-header-height))] lg:scroll-mt-[calc(48px+var(--ui-header-height))] [&>a]:rounded-sm [&>a]:outline-primary/25 [&>a]:focus-visible:outline-3 [&>a>code]:border-dashed hover:[&>a>code]:border-primary hover:[&>a>code]:text-primary [&>a>code]:text-xl/7 [&>a>code]:font-bold`,`[&>a>code]:transition-colors`],leading:[`absolute -ms-8 top-1 opacity-0 group-hover:opacity-100 group-focus:opacity-100 p-1 bg-elevated group-hover:text-primary group-focus:text-primary rounded-md hidden lg:flex text-muted`,`transition`],leadingIcon:`size-4 shrink-0`,link:`group lg:after:absolute lg:after:inset-y-0 lg:after:-inset-s-2 lg:after:w-2`}},m=[`id`],h=[`href`],g={__name:`ProseH2`,props:{id:{type:String,required:!1},anchor:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(g){let _=u(`prose.h2`,g),v=l(),{headings:y}=e().public?.mdc||{},b=o(()=>d({extend:p,...v.ui?.prose?.h2||{}})()),x=o(()=>_.id&&(_.anchor??(typeof y?.anchorLinks==`boolean`?y.anchorLinks:y?.anchorLinks?.h2)??!1));return(e,o)=>(s(),a(`h2`,{id:n(_).id,class:r(b.value.base({class:[n(_).ui?.base,n(_).class]}))},[n(_).id&&x.value?(s(),a(`a`,{key:0,href:`#${n(_).id}`,class:r(b.value.link({class:n(_).ui?.link}))},[i(`span`,{class:r(b.value.leading({class:n(_).ui?.leading}))},[t(f,{name:n(v).ui.icons.hash,class:r(b.value.leadingIcon({class:n(_).ui?.leadingIcon}))},null,8,[`name`,`class`])],2),c(e.$slots,`default`)],10,h)):c(e.$slots,`default`,{},void 0,void 0,1)],10,m))}};export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,$n as t,Cn as n,D as r,Dn as i,E as a,Ft as o,Gt as s,Ht as c,L as l,Lt as u,On as d,Pt as f,Rt as p,Tn as m,Xt as h,Yt as g,Zn as _,_ as v,b as y,bt as b,ct as x,er as S,et as C,ft as w,g as T,h as E,jt as D,k as O,mt as k,o as A,pn as j,qt as M,tr as N,tt as P,un as ee,v as F,vn as I,wn as L,wt as R,xn as te,xt as z,y as B,z as V}from"./DZo3dYLJ.js";import{C as H,S as ne,w as U}from"./51OWHj8c.js";import{t as W}from"./B3jkABw9.js";import{t as G}from"./DSaWoFHS.js";import{r as re,t as ie}from"./Csqgy925.js";import{t as ae}from"./Cm9lkUvP.js";import{a as oe,h as K,i as q,l as se,n as ce,r as le,s as ue,t as de}from"./6gFtTBwm.js";import{n as fe,r as pe,t as me}from"./DLkAKotw.js";import{n as he,r as ge,t as _e}from"./Bb3Limos.js";import{h as ve,m as ye,r as be,s as xe}from"./CuJUHLl8.js";import{p as Se,t as Ce,u as we}from"./Vo4wMbnS.js";import{t as J}from"./CK9_veoz.js";import{S as Te,_ as Ee,a as De,b as Oe,c as ke,d as Ae,g as je,i as Me,l as Ne,m as Pe,r as Fe,s as Ie,t as Le,u as Re,v as ze,x as Y,y as Be}from"./BetRVCu6.js";import{t as Ve}from"./Ci0qbkgh.js";import{t as He}from"./BuOKDFiJ.js";import{t as X}from"./D3YCAmfu.js";import{t as Ue}from"./B_SlFcWp.js";import{t as We}from"./C9StZL3D.js";import{a as Ge,r as Ke}from"./BPTrRhcw.js";import{t as qe}from"./DrZpfjBq.js";import{a as Je,i as Ye,n as Xe,r as Ze,t as Qe}from"./BscJTep0.js";import{n as $e,t as et}from"./o_84IzFk.js";import{C as tt,u as nt}from"#entry";function rt(){return{ALT:`Alt`,ARROW_DOWN:`ArrowDown`,ARROW_LEFT:`ArrowLeft`,ARROW_RIGHT:`ArrowRight`,ARROW_UP:`ArrowUp`,BACKSPACE:`Backspace`,CAPS_LOCK:`CapsLock`,CONTROL:`Control`,DELETE:`Delete`,END:`End`,ENTER:`Enter`,ESCAPE:`Escape`,F1:`F1`,F10:`F10`,F11:`F11`,F12:`F12`,F2:`F2`,F3:`F3`,F4:`F4`,F5:`F5`,F6:`F6`,F7:`F7`,F8:`F8`,F9:`F9`,HOME:`Home`,META:`Meta`,PAGE_DOWN:`PageDown`,PAGE_UP:`PageUp`,SHIFT:`Shift`,SPACE:` `,TAB:`Tab`,CTRL:`Control`,ASTERISK:`*`,SPACE_CODE:`Space`}}function it(e){return e?.querySelector(`[data-state=checked]`)}function at(e,t,n){return e===void 0?!1:Array.isArray(e)?e.some(e=>Z(e,t,n)):Z(e,t,n)}function Z(e,t,n){return e===void 0||t===void 0?!1:typeof e==`string`?e===t:typeof n==`function`?n(e,t):typeof n==`string`?e?.[n]===t?.[n]:ie(e,t)}var[ot,st]=K(`ListboxRoot`),[ct,lt]=K(`ListboxHighlightScroll`),ut=O({__name:`ListboxRoot`,props:{modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},orientation:{type:String,required:!1,default:`vertical`},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},selectionBehavior:{type:String,required:!1,default:`toggle`},highlightOnHover:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`,`highlight`,`entryFocus`,`leave`],setup(e,{expose:t,emit:n}){let r=e,i=n,{multiple:a,highlightOnHover:o,loop:s,orientation:l,disabled:u,selectionBehavior:f,dir:p}=m(r),{getItems:h,getItem:g}=me({isProvider:!0}),{handleTypeaheadSearch:_}=he(),{primitiveElement:v,currentElement:y}=fe(),b=rt(),x=Ve(p),S=ct(null);lt({suppressHighlightScroll:I(!1),onHighlightScrollRequest:()=>{}});let C=ze(y),w=I(),T=I(!1),E=I(!0),D=Se(r,`modelValue`,i,{defaultValue:r.defaultValue??(a.value?[]:void 0),passive:r.modelValue===void 0,deep:!0});function O(e){if(T.value=!0,r.multiple){let t=Array.isArray(D.value)?[...D.value]:[],n=t.findIndex(t=>Z(t,e,r.by));r.selectionBehavior===`toggle`?(n===-1?t.push(e):t.splice(n,1),D.value=t):(D.value=[e],w.value=e)}else r.selectionBehavior===`toggle`&&Z(D.value,e,r.by)?D.value=void 0:D.value=e;setTimeout(()=>{T.value=!1},1)}let A=I(null),j=I(null),N=I(!1),ee=I(!1),L=be(),R=be(),te=be();function V(){return h().map(e=>e.ref).filter(e=>e.dataset.disabled!==``)}function H(e,t=!0,n){if(!e)return;A.value=e;let r=S?.suppressHighlightScroll.value??!1;(n??E.value)&&(r?A.value.focus({preventScroll:!0}):A.value.focus()),r?S?.onHighlightScrollRequest(t?()=>{let e=A.value;e?.isConnected&&e.scrollIntoView({block:`nearest`})}:void 0):t&&A.value.scrollIntoView({block:`nearest`});let a=g(e);i(`highlight`,a)}function ne(e){if(N.value)te.trigger(e);else{let t=h().find(t=>Z(t.value,e,r.by));t&&(A.value=t.ref,H(t.ref))}}function U(e){if(A.value&&A.value.isConnected){if(e.ctrlKey||e.metaKey||e.altKey)return;e.preventDefault(),e.stopPropagation(),ee.value||A.value.click()}}function W(e){if(E.value){if(T.value=!0,N.value)R.trigger(e);else{let t=e.altKey||e.ctrlKey||e.metaKey;if(t&&e.key===`a`&&a.value){let t=h(),n=t.map(e=>e.value);D.value=[...n],e.preventDefault();let r=t.at(-1);r&&H(r.ref)}else if(!t){let t=_(e.key,h());t&&H(t)}}setTimeout(()=>{T.value=!1},1)}}function G(){ee.value=!0}function re(){P(()=>{ee.value=!1})}function ie(){P(()=>{se(new KeyboardEvent(`keydown`,{key:`PageUp`}))})}function oe(e){let t=A.value;t?.isConnected&&(j.value=t),A.value=null,i(`leave`,e)}function K(e){let t=new CustomEvent(`listbox.entryFocus`,{bubbles:!1,cancelable:!0});if(e.currentTarget?.dispatchEvent(t),i(`entryFocus`,t),!t.defaultPrevented){if(j.value)H(j.value);else{let e=V()?.[0];H(e)}}}function q(e){let t=h(!0).map(e=>e.ref),n=e===`next`?t.at(-1):t[0];if(!n)return!1;let r=Number(n.getAttribute(`aria-posinset`)),i=Number(n.getAttribute(`aria-setsize`));return e===`next`?r===i:r===1}function se(e){let t=Ge(e,l.value,x.value);if(!t)return;let n=V();if(A.value){if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(A.value),i=s.value&&r===n.length-1;if(i&&N.value){if(q(t)){let n=t===`next`?b.HOME:b.END;return R.trigger(new KeyboardEvent(`keydown`,{key:n,shiftKey:e.shiftKey}))}n=[]}else n=i?n.slice(0,1):n.slice(r+1)}ce(e,n[0])}if(n.length){let e=!A.value&&t===`prev`?n.length-1:0;H(n[e])}if(N.value)return R.trigger(e)}function ce(e,t){if(!N.value&&r.selectionBehavior===`replace`&&a.value&&Array.isArray(D.value)&&(!e.altKey&&!e.ctrlKey&&!e.metaKey||e.shiftKey)&&e.shiftKey){let n=h().filter(e=>e.ref.dataset.disabled!==``),r=n.find(e=>e.ref===t)?.value;if(e.key===b.END?r=n.at(-1)?.value:e.key===b.HOME&&(r=n[0]?.value),!r||!w.value)return;let i=ae(n.map(e=>e.value),w.value,r);D.value=i}}async function le(e,t=!0){if(xe){if(await P(),N.value)L.trigger({event:e,scroll:t});else{let e=V(),n=e.find(e=>e.dataset.state===`checked`),r=t?void 0:!1;n?H(n,t,r):e.length&&H(e[0],t,r)}}}let ue=!1;return c(D,()=>{if(!T.value){let e=ue;ue=!0,P(()=>{le(void 0,e)})}},{immediate:!0,deep:!0}),t({highlightedElement:A,highlightItem:ne,highlightFirstItem:ie,highlightSelected:le,getItems:h}),st({modelValue:D,onValueChange:O,multiple:a,orientation:l,dir:x,disabled:u,highlightOnHover:o,loop:s,highlightedElement:A,isVirtual:N,virtualFocusHook:L,virtualKeydownHook:R,virtualHighlightHook:te,by:r.by,firstValue:w,selectionBehavior:f,focusable:E,onLeave:oe,onEnter:K,changeHighlight:H,onKeydownEnter:U,onKeydownNavigation:se,onKeydownTypeAhead:W,onCompositionStart:G,onCompositionEnd:re,highlightFirstItem:ie}),(t,n)=>(k(),F(d(J),{ref_key:`primitiveElement`,ref:v,as:e.as,"as-child":e.asChild,dir:d(x),"data-disabled":d(u)?``:void 0,onPointerleave:oe,onFocusout:n[0]||=async e=>{let t=e.relatedTarget||e.target;await P(),A.value&&d(y)&&!d(y).contains(t)&&oe(e)}},{default:M(()=>[z(t.$slots,`default`,{modelValue:d(D)}),d(C)&&e.name?(k(),F(d(Re),{key:0,name:e.name,value:d(D),disabled:d(u),required:e.required},null,8,[`name`,`value`,`disabled`,`required`])):B(`v-if`,!0)]),_:3},8,[`as`,`as-child`,`dir`,`data-disabled`]))}}),Q=O({__name:`ListboxContent`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let{CollectionSlot:t}=me(),n=ot(),i=ve(!1,10);return(a,o)=>(k(),F(d(t),null,{default:M(()=>[r(d(J),{role:`listbox`,as:e.as,"as-child":e.asChild,tabindex:d(n).focusable.value?d(n).highlightedElement.value?`-1`:`0`:`-1`,"aria-orientation":d(n).orientation.value,"aria-multiselectable":!!d(n).multiple.value,"data-orientation":d(n).orientation.value,onMousedown:o[0]||=U(e=>i.value=!0,[`left`]),onFocus:o[1]||=e=>{d(i)||d(n).onEnter(e)},onKeydown:[o[2]||=H(e=>{(d(n).orientation.value!==`vertical`||e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)&&(d(n).orientation.value!==`horizontal`||e.key!==`ArrowUp`&&e.key!==`ArrowDown`)&&(e.preventDefault(),d(n).focusable.value&&d(n).onKeydownNavigation(e))},[`down`,`up`,`left`,`right`,`home`,`end`]),H(d(n).onKeydownEnter,[`enter`]),d(n).onKeydownTypeAhead]},{default:M(()=>[z(a.$slots,`default`)]),_:3},8,[`as`,`as-child`,`tabindex`,`aria-orientation`,`aria-multiselectable`,`data-orientation`,`onKeydown`])]),_:3}))}}),dt=O({__name:`ListboxFilter`,props:{modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`input`}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=Se(n,`modelValue`,t,{defaultValue:``,passive:n.modelValue===void 0}),i=ot(),{primitiveElement:a,currentElement:o}=fe(),c=T(()=>n.disabled||i.disabled.value||!1),l=I();s(()=>l.value=i.highlightedElement.value?.id),x(()=>{i.focusable.value=!1,setTimeout(()=>{n.autoFocus&&o.value?.focus()},1)}),w(()=>{i.focusable.value=!0});let{isComposing:u,shouldDeferInput:f,handleCompositionStart:p,handleCompositionUpdate:m,handleCompositionEnd:h}=Y(e=>{r.value=e.target.value,i.onCompositionEnd(),i.highlightFirstItem()});function g(){i.onCompositionStart(),p()}function _(e){f.value||(r.value=e.target.value,i.highlightFirstItem())}function v(e){u.value||(e.preventDefault(),i.onKeydownNavigation(e))}function y(e){u.value||i.onKeydownEnter(e)}return(t,n)=>(k(),F(d(J),{ref_key:`primitiveElement`,ref:a,as:e.as,"as-child":e.asChild,value:d(r),disabled:c.value?``:void 0,"data-disabled":c.value?``:void 0,"aria-disabled":c.value??void 0,"aria-activedescendant":l.value,type:`text`,onKeydown:[H(v,[`down`,`up`,`home`,`end`]),H(y,[`enter`])],onInput:_,onCompositionstart:g,onCompositionupdate:d(m),onCompositionend:d(h)},{default:M(()=>[z(t.$slots,`default`,{modelValue:d(r)})]),_:3},8,[`as`,`as-child`,`value`,`disabled`,`data-disabled`,`aria-disabled`,`aria-activedescendant`,`onCompositionupdate`,`onCompositionend`]))}}),[ft,pt]=K(`ListboxGroup`),mt=O({__name:`ListboxGroup`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,n=W(void 0,`reka-listbox-group`);return pt({id:n}),(e,r)=>(k(),F(d(J),C({role:`group`},t,{"aria-labelledby":d(n)}),{default:M(()=>[z(e.$slots,`default`)]),_:3},16,[`aria-labelledby`]))}}),ht=`listbox.select`,[gt,_t]=K(`ListboxItem`),vt=O({__name:`ListboxItem`,props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`}},emits:[`select`],setup(e,{emit:t}){let n=e,i=t,a=W(void 0,`reka-listbox-item`),{CollectionItem:o}=me(),{forwardRef:s,currentElement:c}=X(),l=ot(),u=T(()=>c.value!=null&&c.value===l.highlightedElement.value),f=T(()=>at(l.modelValue.value,n.value,l.by)),p=T(()=>l.disabled.value||n.disabled);async function m(e){i(`select`,e),!e?.defaultPrevented&&!p.value&&e&&(l.onValueChange(n.value),l.changeHighlight(c.value))}function g(e){let t={originalEvent:e,value:n.value};ge(ht,m,t)}return _t({isSelected:f}),(t,n)=>(k(),F(d(o),{value:e.value},{default:M(()=>[h([u.value,f.value,p.value,d(l).focusable.value,...Object.entries(t.$attrs).flat()],()=>r(d(J),C({id:d(a)},t.$attrs,{ref:d(s),role:`option`,tabindex:d(l).focusable.value?u.value?`0`:`-1`:-1,"aria-selected":f.value,as:e.as,"as-child":e.asChild,disabled:p.value?``:void 0,"data-disabled":p.value?``:void 0,"data-highlighted":u.value?``:void 0,"data-state":f.value?`checked`:`unchecked`,onClick:g,onKeydown:H(U(g,[`prevent`]),[`space`]),onPointermove:n[0]||=()=>{d(l).highlightedElement.value!==d(c)&&d(l).highlightOnHover.value&&d(l).changeHighlight(d(c),!1,!1)}}),{default:M(()=>[z(t.$slots,`default`,{selected:f.value})]),_:3},16,[`id`,`tabindex`,`aria-selected`,`as`,`as-child`,`disabled`,`data-disabled`,`data-highlighted`,`data-state`,`onKeydown`]),n,1)]),_:3},8,[`value`]))}}),yt=O({__name:`ListboxItemIndicator`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let{forwardRef:t}=X(),n=gt();return(i,a)=>(k(),F(d(We),{present:e.forceMount||d(n).isSelected.value},{default:M(()=>[r(d(J),{ref:d(t),"aria-hidden":`true`,"data-state":d(n).isSelected.value?`checked`:`unchecked`,as:e.as,"as-child":e.asChild},{default:M(()=>[z(i.$slots,`default`)]),_:3},8,[`data-state`,`as`,`as-child`])]),_:3},8,[`present`]))}});function bt(e){return typeof e==`object`?e.key:e}function xt(e,t){let n=e.length;return new Proxy(e,{get(e,r,i){if(typeof r==`string`){let i=r.charCodeAt(0);if(i>=48&&i<=57){let i=+r;if(Number.isInteger(i)&&i>=0&&i<n){let n=e[i];if(typeof n!=`object`){let r=t[i*2];n=e[i]={index:i,key:n,start:r,size:t[i*2+1],end:r+t[i*2+1],lane:0}}return n}}if(r===`length`)return n}return Reflect.get(e,r,i)}})}function St(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o=e();return(o.length!==r.length||o.some((e,t)=>r[t]!==e))&&(r=o,i=t(...o),n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1),i}return o.updateDeps=e=>{r=e},o}function Ct(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var wt=(e,t)=>Math.abs(e-t)<1.01,Tt=(e,t,n)=>{let r;return Object.assign(function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)},{cancel:()=>{e.clearTimeout(r)}})};function Et({offset:e,isScrolling:t,elementMax:n,holdOffset:r,scrollOffset:i,pendingWrite:a,clampedMaxAtWrite:o}){return t&&a===null&&e===i?`spurious`:a!==null&&Math.abs(e-a.target)<1.5?`readBack`:a!==null&&!a.smooth&&n!==null&&a.target>n+r+.5&&Math.abs(e-(n+r))<1.5||a!==null&&!a.smooth&&a.lowMaxes?.some(t=>Math.abs(e-t)<1.5)?`clampedReadBack`:o!==null&&Math.abs(e-o)<1.5?`clampedEcho`:`external`}var Dt=e=>e===`smooth`||e===`smoothFinishing`;function Ot({kind:e,offset:t,command:n,target:r}){return e!==`spurious`&&e!==`readBack`&&e!==`clampedReadBack`&&n?.index!=null&&n.phase!==`queued`&&!Dt(n.phase)&&!wt(t,n.lastTargetOffset)&&!wt(t,r())&&e!==`clampedEcho`}var kt=40;function At(e){let t=e[e.length-1];if(t===void 0)return!1;let n=e.length-2;for(;n>=0&&t.t-e[n].t<kt;)n--;if(n<0)return!1;let r=e[n],i=n-1;for(;i>=0&&r.t-e[i].t<kt;)i--;if(i<0)return!1;let a=e[i],o=(t.offset-r.offset)/(t.t-r.t),s=(r.offset-a.offset)/(r.t-a.t);return o*s>=0&&Math.abs(o)>=2*Math.abs(s)&&Math.abs(o)-Math.abs(s)>=.8}function jt(e){let t=e[e.length-1];if(t===void 0)return!1;let n=e.length-2;for(;n>=0&&t.t-e[n].t<kt;)n--;if(n<0)return!1;let r=e[n];return Math.abs(t.offset-r.offset)/(t.t-r.t)>=.05}var Mt,Nt=()=>{if(Mt!==void 0)return Mt;if(typeof navigator>`u`)return Mt=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Mt=!0;let e=navigator.maxTouchPoints;return Mt=navigator.platform===`MacIntel`&&e!==void 0&&e>0},Pt,Ft=()=>Pt===void 0?Pt=Nt()&&typeof CSS<`u`&&typeof CSS.supports==`function`&&CSS.supports(`overflow-anchor: auto`):Pt,It={capture:!0,passive:!0},Lt=class{constructor(e){this.host=e,this._touch=null,this.inMotion=()=>this._touch!==null&&this._touch.phase!==`lateFling`,this.dragging=()=>this._touch?.phase===`down`&&this._touch.moved,this.tail=()=>this._touch?.phase===`tail`?this._touch.moved?`fling`:`tap`:null,this.onScroll=({isScrolling:e,ownReadBack:t,moved:n,external:r})=>(e&&this._touch?.phase===`tail`?this._openTail(this._touch.moved||!t,!1):this._touch?.phase===`lateFling`&&(this.host.now()>this._touch.until?this._touch=null:r&&e&&n&&this._openTail(!0,!1)),!t&&e&&n&&this._touch?.phase===`down`?(this._touch.moved=!0,!0):!1),this.touchStart=()=>{this.end(),this._touch={phase:`down`,moved:!1}},this.touchEnd=()=>{let e=this._touch?.phase===`down`&&this._touch.moved;this.end(),this._openTail(e,e)},this.end=()=>{let e=this.host.getWindow();this._touch?.phase===`tail`&&e!=null&&e.clearTimeout(this._touch.timerId),this._touch=null},this.listen=e=>{let t=()=>this.touchStart(),n=()=>this.touchEnd();return e.addEventListener(`touchstart`,t,It),e.addEventListener(`touchend`,n,It),e.addEventListener(`touchcancel`,n,It),()=>{e.removeEventListener(`touchstart`,t,It),e.removeEventListener(`touchend`,n,It),e.removeEventListener(`touchcancel`,n,It),this.end()}},this._openTail=(e,t)=>{let n=this.host.getWindow();if(!Nt()||n==null)return;this.end();let r={phase:`tail`,moved:e,awaitingFling:t,timerId:n.setTimeout(()=>{this.host.tailStillMoving()?this._openTail(r.moved,r.awaitingFling):(this._touch=r.awaitingFling?{phase:`lateFling`,until:this.host.now()+1e3}:null,this.host.onTailClosed())},150)};this._touch=r}}get touch(){return this._touch}},Rt=e=>{let{clientWidth:t,clientHeight:n}=e;return{width:t,height:n}},zt=e=>{let t=new Set;return{schedule:n=>{let r=e.requestAnimationFrame(()=>{t.delete(r),n()});t.add(r)},cancel:()=>{t.forEach(t=>e.cancelAnimationFrame(t)),t.clear()}}},Bt=e=>e,Vt=e=>{let t=e.overscan*Math.max(e.lanes??1,1),n=Math.max(e.startIndex-t,0),r=Math.min(e.endIndex+t,e.count-1)-n+1,i=Array(r);for(let e=0;e<r;e++)i[e]=n+e;return i},Ht=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(Rt(n)),!r.ResizeObserver)return()=>{};let a=zt(r),o=new r.ResizeObserver(()=>{let t=()=>{i(Rt(n))};e.options.useAnimationFrameWithResizeObserver?a.schedule(t):t()});return o.observe(n,{box:`content-box`}),()=>{o.unobserve(n),a.cancel()}},Ut={passive:!0},Wt=typeof window>`u`||`onscrollend`in window,Gt=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&Wt,o=0,s=a?null:Tt(i,()=>t(n(r),!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),u=c(!1);return r.addEventListener(`scroll`,l,Ut),a&&r.addEventListener(`scrollend`,u,Ut),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u),s?.cancel()}},Kt=(e,t)=>Gt(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),qt=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(i!==void 0)return i}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},Jt=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:e+t,behavior:n})},Yt=(e,t)=>e===`smooth`?t?`smoothLanded`:`smooth`:`instant`,Xt=e=>e?.phase===`smooth`||e?.phase===`smoothLanded`;function Zt(e,t,n,r){if(t===0)return!1;let i=r(0),a=new Set,o=0;for(;o<e;){let e=n(o);if(e===i)break;a.add(e),o++}let s=e-o;if(s===0||s>=t)return!1;for(let e=0;e<s;e++)if(r(e)!==n(o+e))return!1;for(let e=s;e<t;e++)if(a.has(r(e)))return!1;return!0}var Qt=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this._holdOffset=0,this._reportedOverscroll=!1,this._iosGesture=new Lt({getWindow:()=>this.targetWindow,now:()=>this.now(),tailStillMoving:()=>{let e=this.scrollState;if(e?.phase!==`queued`||this.pendingWrite!==null)return!1;let t=this._readElementOffset();return t===null||this._lastElementOffset===null||Math.abs(t-this._lastElementOffset)<1?!1:(this._lastElementOffset=t,e.samples=[...e.samples??[],{t:this.now(),offset:t}],!0)},onTailClosed:()=>{let e=this.scrollState;e?.phase===`queued`&&jt(e.samples??[])&&(this.scrollState=null),this._flushHoldIfReady(!0),this._writeAwaitingCommand(),this._retryClampedAdjustment()}}),this._lastElementOffset=null,this.pendingWrite=null,this._clampedAdjustment=null,this.elementsCache=new Map,this._resizeBatch=null,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=null,n=()=>{if(e)return e;let n=this.targetWindow;if(!n||!n.ResizeObserver)return null;let i=t=zt(n);return e=new n.ResizeObserver(e=>{let t=()=>{let t={sync:!1};this._resizeBatch=t;try{e.forEach(r)}finally{this._resizeBatch=null,t.notify&&(this.notify(t.sync),this._noteClampMax(),this._flushHoldIfReady(!0),this._retryClampedAdjustment())}};this.options.useAnimationFrameWithResizeObserver?i.schedule(t):t()})},r=e=>{let t=e.target,n=this.indexFromElement(t);if(t.isConnected)this.isIndexInRange(n)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this));else{this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}}};return{disconnect:()=>{var r;(r=n())==null||r.disconnect(),t?.cancel(),e=null,t=null},observe:e=>n()?.observe(e,{box:`border-box`}),unobserve:e=>n()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{let t={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Bt,rangeExtractor:Vt,onChange:()=>{},measureElement:qt,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,anchorTo:`start`,followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,useCachedMeasurements:!1};for(let n in e){let r=e[n];r!==void 0&&(t[n]=r)}let n=this.options,r=null,i=null,a=!1;if(n!==void 0&&n.enabled&&t.enabled&&t.anchorTo===`end`&&this.scrollElement!==null){let e=n.count,o=t.count,s=this.getMeasurements(),c=this._singleLaneMeasurements?.items??s,l=e=>bt(c[e]),u=e>0?l(0):null,d=e>0?l(e-1):null;if(o!==e||e>0&&o>0&&(t.getItemKey(0)!==u||t.getItemKey(o-1)!==d)){a=!0;let c=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??s[0]:null;c&&(r=[c.key,this.getScrollOffset()-c.start]);let u=t.followOnAppend===!0?`auto`:t.followOnAppend||null;u&&o>0&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(o-1)!==d)&&(o>e||Zt(e,o,l,t.getItemKey))&&(i=u)}}this.options=t,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=null;if(r&&this.scrollOffset!==null&&!this._awaitingCommandReadBack()){let[e,t]=r,n=this.getMeasurements(),{count:a,getItemKey:s}=this.options,c=0;for(;c<a&&s(c)!==e;)c++;if(c<a){let e=n[c];if(e){let n=Math.max(0,e.start+t);!i&&n!==this.scrollOffset&&(o=n-this.scrollOffset,this.scrollOffset=n)}}}i?this.pendingScrollAnchor={kind:`follow`,behavior:i}:o!==null&&(this._canWriteScroll()?this.pendingScrollAnchor={kind:`anchor`,delta:o}:(this._holdOffset+=o,this._followOffsetTarget(o)))},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=St(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{var e;this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,(e=this._momentumStop)==null||e.restore(),this._momentumStop=null,this.isScrolling=!1,this.scrollDirection=null,this._holdOffset=0,this._reportedOverscroll=!1,this._clampedAdjustment=null,this.pendingWrite=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}this.scrollElement=e,this.targetWindow=this.scrollElement&&`ownerDocument`in this.scrollElement?this.scrollElement.ownerDocument.defaultView:this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{let n=t?this._elementMaxScrollOffset():null,r=this._reportedOverscroll;this._reportedOverscroll=e<0||n!==null&&e>n+1;let i=e;this._lastElementOffset=i,e=this._toLayoutOffset(e);let a=this._classifyScrollEvent(e,t,n);if(a===`spurious`)return;a===`readBack`?e=this.pendingWrite.target:a===`clampedReadBack`&&this.scrollState?.index!=null&&e<this.getMaxScrollOffset()-1.5?this.scrollState.lastTargetOffset=e:Ot({kind:a,offset:e,command:this.scrollState,target:()=>this.getScrollStateTarget(this.scrollState)})&&(this.scrollState=null),this.pendingWrite=null,this._clampedAdjustment!==null&&Math.abs(e-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null);let o=this.getScrollOffset(),s=this.scrollDirection;this.scrollDirection=t?o===e?this.scrollDirection:o<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t;let c=this.scrollState;if(c?.phase===`queued`&&a===`external`&&t){if(r||this._reportedOverscroll)c.samples=[];else{let e=this.now();c.samples=[...(c.samples??[]).filter(t=>e-t.t<=200),{t:e,offset:i}],(s!==null&&this.scrollDirection!==s||At(c.samples))&&(this.scrollState=null)}}this._iosGesture.onScroll({isScrolling:t,ownReadBack:a===`readBack`,moved:e!==o,external:a===`external`&&this.scrollState?.phase!==`smooth`&&this.scrollState?.phase!==`smoothFinishing`})&&this.scrollState?.phase===`queued`&&(this.scrollState=null),this._flushHoldIfReady(!0),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),`addEventListener`in this.scrollElement&&this.unsubs.push(this._iosGesture.listen(this.scrollElement)),this._scrollToOffset(this.getScrollOffset())}this._noteClampMax();let t=this.pendingScrollAnchor;this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled&&(t.kind===`anchor`?this._canWriteScroll()?Xt(this.scrollState)&&!wt(this.getScrollOffset()-t.delta,this.scrollState.lastTargetOffset)||(this._followOffsetTarget(t.delta),this._scrollToOffset(this.getScrollOffset())):(this._holdOffset+=t.delta,this._followOffsetTarget(t.delta),this.notify(!1)):this.scrollToEnd({behavior:t.behavior})),this._flushHoldIfReady(!1),this._retryClampedAdjustment()},this._classifyScrollEvent=(e,t,n)=>Et({offset:e,isScrolling:t,elementMax:n,holdOffset:this._holdOffset,scrollOffset:this.scrollOffset,pendingWrite:this.pendingWrite,clampedMaxAtWrite:this._clampedAdjustment?.maxAtWrite??null}),this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled||!this._canWriteScroll())return;let{target:e,maxAtWrite:t}=this._clampedAdjustment,n=this.getMaxScrollOffset();n>t+.5&&(this._clampedAdjustment=e>n+.5?{target:e,maxAtWrite:n}:null,this._scrollToOffset(e))},this._writeAwaitingCommand=()=>{let e=this.scrollState;if(e===null||e.phase!==`queued`)return;let{behavior:t}=e;this.getMeasurements();let n=this.getScrollStateTarget(e);e.lastTargetOffset=n,this._clampedAdjustment=null,e.phase=Yt(t,e.index!=null&&wt(n,this.getScrollOffset())),this._scrollToOffset(n,{behavior:t}),this.scheduleScrollReconcile()},this._readElementOffset=()=>{let e=this.scrollElement;if(e==null)return null;let{horizontal:t,isRtl:n}=this.options;return typeof e.scrollTop==`number`?t?e.scrollLeft*(n&&-1||1):e.scrollTop:typeof e.scrollY==`number`?t?e.scrollX:e.scrollY:null},this._canWriteScroll=()=>!(Nt()&&this._iosGesture.inMotion())&&!this._reportedOverscroll,this._flushHoldIfReady=e=>{if(this._holdOffset===0||!this.scrollElement||!this.options.enabled||!this._canWriteScroll()||this.scrollState?.phase===`smooth`)return;this._holdOffset=0,this.scrollOffset!==null&&this.scrollOffset<0&&(this.scrollOffset=0),this.notify(e);let t=this.getCommandWrittenOffset()??this.getScrollOffset();this._clampedAdjustment=this._clampedBy(t),this._scrollToOffset(t)},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=St(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,n,r,i,a,o,s)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s}),{key:!1}),this.isIndexInRange=e=>e>=0&&e<this.options.count,this.getMeasurements=St(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s},c)=>{let l=this.itemSizeCache;if(!i)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=e*2,a=this._singleLaneMeasurements?.flat;if(!a||a.length<i){let e=new Float64Array(i);a&&u>0&&e.set(a.subarray(0,u*2)),a=e}let o=u===0?Array(e):this._singleLaneMeasurements.items.slice(),c;if(u===0)c=t+n;else{let e=u-1;c=a[e*2]+a[e*2+1]+s}for(let t=u;t<e;t++){let e=r(t);o[t]=e;let n=l.get(e),i=typeof n==`number`?n:this.options.estimateSize(t);a[t*2]=c,a[t*2+1]=i,c+=i+s}this._singleLaneMeasurements={flat:a,items:o};let d=xt(o,a);return this.measurementsCache=d,d}let d=this.measurementsCache.slice(0,u),f=Array(a).fill(void 0),p=new Float64Array(a),m=0;for(let e=0;e<u;e++){let t=d[e];t&&(f[t.lane]===void 0&&m++,f[t.lane]=e,p[t.lane]=t.end)}for(let i=u;i<e;i++){let e=r(i),c=this.laneAssignments.get(i),u,h,g=o===`estimate`||l.has(e);if(c!==void 0&&this.options.lanes>1){u=c;let e=f[u],r=e===void 0?void 0:d[e];h=r?r.end+s:t+n}else if(m===a){let e=0,t=p[0],n=f[0];for(let r=1;r<a;r++){let i=p[r];(i<t||i===t&&f[r]<n)&&(e=r,t=i,n=f[r])}u=e,h=t+s,g&&this.laneAssignments.set(i,u)}else u=i%this.options.lanes,h=t+n,g&&this.laneAssignments.set(i,u);let _=l.get(e),v=typeof _==`number`?_:this.options.estimateSize(i),y=h+v;d[i]={index:i,start:h,size:v,end:y,key:e,lane:u},f[u]===void 0&&m++,f[u]=i,p[u]=y}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=St(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>e.length===0||t===0?(this.range=null,null):(this.range=tn(e,t,n,r,r===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=St(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t,this.options.lanes]},(e,t,n,r,i,a)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n,lanes:a}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!Xt(this.scrollState))return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e);if(!this.isIndexInRange(t))return;let n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),e.isConnected&&(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var n;if(!this.isIndexInRange(e))return;this._resizeBatch?.sync&&this.getMeasurements();let r,i,a,o=this._singleLaneMeasurements?.flat;if(this.options.lanes===1&&o!=null)a=this.options.getItemKey(e),i=o[e*2],r=o[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;a=t.key,i=t.start,r=t.size}let s=this.itemSizeCache.get(a)??r,c=t-s;if(c!==0){let o=this.options.anchorTo===`end`&&!Xt(this.scrollState)&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,l=o?this._getLayoutTotalSize():0,u=this.getScrollOffset(),d=this.itemSizeCache.has(a)?i+s<=u&&this.scrollDirection!==`backward`:i<u,f=!Xt(this.scrollState)&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?d:this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:a,start:i,size:r,end:i+r,lane:0},c,this));(this.pendingMin===null||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(a,t),this.itemSizeCacheVersion++;let p=!1;if(this._awaitingCommandReadBack()||(o?p=this.applyScrollAdjustment(this._getLayoutTotalSize()-l):f&&(p=this.applyScrollAdjustment(c))),this._resizeBatch){this._resizeBatch.notify=!0,(n=this._resizeBatch).sync||(n.sync=p);return}this.notify(p),this._noteClampMax(),this._flushHoldIfReady(!0),this._retryClampedAdjustment()}},this.getVirtualItems=St(()=>[this.getVirtualIndexes(),this.getMeasurements(),this._holdOffset],(e,t,n)=>{let r=[];for(let i=0,a=e.length;i<a;i++){let a=t[e[i]];r.push(n===0?a:{...a,start:a.start-n,end:a.end-n})}return r},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._singleLaneMeasurements?.flat,r=this.options.lanes===1&&n!=null;return Ct(t[$t(0,t.length-1,r?e=>n[e*2]:e=>Ct(t[e]).start,e)])},this._noteClampMax=()=>{if(!this._awaitingCommandReadBack())return;let e=this._elementMaxScrollOffset();if(e===null)return;let t=this.pendingWrite,n=Math.max(e,0)+this._holdOffset;if(n>=t.target)return;let r=t.lowMaxes??=[];r[r.length-1]!==n&&r.push(n)},this.getMaxScrollOffset=()=>(this._elementMaxScrollOffset()??0)+this._holdOffset,this._toLayoutOffset=e=>{let t=e+this._holdOffset;return this.pendingScrollAnchor?.kind===`anchor`&&(t+=this.pendingScrollAnchor.delta),t},this._elementMaxScrollOffset=()=>{let e=this.scrollElement;if(e===null)return null;if(`scrollHeight`in e)return this.options.horizontal?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight;if(`document`in e){let t=e.document.documentElement;return this.options.horizontal?t.scrollWidth-e.innerWidth:t.scrollHeight-e.innerHeight}return null},this._momentumStop=null,this._stopMomentum=e=>{let t=this.scrollElement,n=this.targetWindow;if(t===null||n===null)return;let r=`document`in t?t.document.scrollingElement:t;if(!r?.style)return;if(this._momentumStop){this._momentumStop.done=e;return}let{style:i}=r,a=this.options.horizontal?`overflow-x`:`overflow-y`,o=i.getPropertyValue(a),s=i.getPropertyPriority(a);i.setProperty(a,`hidden`,`important`);let c={restore:()=>i.getPropertyValue(a)!==`hidden`||i.getPropertyPriority(a)!==`important`?!1:(i.setProperty(a,o,s),!0),done:e};this._momentumStop=c,n.requestAnimationFrame(()=>n.requestAnimationFrame(()=>{this._momentumStop===c&&(this._momentumStop=null,c.restore()&&c.done())}))},this._clampedBy=e=>{let t=this._elementMaxScrollOffset();if(t===null)return null;let n=t+this._holdOffset;return e>n+.5?{target:e,maxAtWrite:n}:null},this.getVirtualDistanceFromEnd=()=>Math.max(this._getLayoutTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`){if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t]}if(t===`end`&&e===this.options.count-1){let e=this.getMaxScrollOffset(),n=e-this.options.paddingEnd+this.options.scrollPaddingEnd;return[Math.max(Math.min(n,e),0),t]}let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{this._startScroll({index:null,align:t},this.getOffsetForAlignment(e,t),n,`absolute`)},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r;this._startScroll({index:e,align:a},i,n,`absolute`)},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getOffsetForAlignment((this.getCommandWrittenOffset()??this.getScrollOffset())+e,`start`);this._startScroll({index:null,align:`start`},n,t,`relative`)},this.scrollToEnd=({behavior:e=`auto`}={})=>{this.options.count>0?this._startScroll({index:this.options.count-1,align:`end`,toEnd:!0},Math.max(this.getMaxScrollOffset(),0),e,`absolute`):this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.cancelScroll=()=>{this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null},this.getTotalSize=()=>Math.max(this._getLayoutTotalSize()-this._holdOffset,0),this._getLayoutTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._singleLaneMeasurements?.flat;t=r==null?e[n]?.end??0:r[n*2]+r[n*2+1]}else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(this.itemSizeCache.size===0)return e;let t=this.getMeasurements();for(let n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n}={})=>{let r={target:e+(t??0),smooth:n===`smooth`};return this.pendingWrite=r,this.options.scrollToFn(e-this._holdOffset,{behavior:n,adjustments:t},this),r},this.getCommandWrittenOffset=()=>this.scrollState!==null&&this.pendingWrite!==null&&!this.pendingWrite.smooth?this.pendingWrite.target:null,this._awaitingCommandReadBack=()=>{let e=this.getCommandWrittenOffset();return!(Nt()&&this._iosGesture.dragging())&&e!==null&&!wt(e,this.getScrollOffset())},this._followOffsetTarget=e=>{this.scrollState!==null&&this.scrollState.index==null&&(this.scrollState.lastTargetOffset+=e)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}get scrollAdjustments(){return 0}applyScrollAdjustment(e,t){if(e===0)return!1;if(this._followOffsetTarget(e),this._canWriteScroll()){let n=this.getScrollOffset();this._clampedAdjustment=this._clampedBy(n+e);let r=this._scrollToOffset(n,{adjustments:e,behavior:t});return this.scrollOffset!==null&&(this.pendingWrite===r&&(this.scrollOffset+=e),this.scrollOffset<0&&(this.scrollOffset=0)),!0}return this._holdOffset+=e,this.scrollOffset!==null&&(this.scrollOffset+=e),!0}scheduleScrollReconcile(){this.targetWindow?this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}):this.scrollState=null}getScrollStateTarget(e){let t=e.toEnd?[Math.max(this.getMaxScrollOffset(),0)]:e.index==null?void 0:this.getOffsetForIndex(e.index,e.align);return t?t[0]:e.lastTargetOffset}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}if(this.scrollState.phase===`queued`){this.scheduleScrollReconcile();return}this.getMeasurements();let e=this.getScrollStateTarget(this.scrollState),t=this.scrollState.index==null?1:this.options.useAnimationFrameWithResizeObserver?3:2,n=e!==this.scrollState.lastTargetOffset;if(!n&&wt(e,this.getScrollOffset())){if(this.scrollState.phase===`smooth`?this.scrollState.phase=`smoothLanded`:this.scrollState.phase===`smoothFinishing`&&(this.scrollState.phase=`instant`),this.scrollState.stableFrames++,this.scrollState.stableFrames>=t){this.getScrollOffset()!==e&&this._scrollToOffset(e,{behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let t=this.getSize()||600,n=Math.abs(e-this.getScrollOffset()),r=Xt(this.scrollState)&&n>t;this.scrollState.lastTargetOffset=e,r?this.scrollState.phase=`smooth`:this.scrollState.phase===`smooth`?this.scrollState.phase=`smoothFinishing`:this.scrollState.phase===`smoothLanded`&&(this.scrollState.phase=`instant`),this._scrollToOffset(e,{behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}_startScroll(e,t,n,r){this.pendingScrollAnchor=null,this._clampedAdjustment=null;let i=this._iosGesture.tail();if(r===`absolute`&&i!==null){if(i===`fling`&&Ft()){this._stopMomentum(()=>{this.scrollState?.phase!==`queued`||this._iosGesture.tail()!==`fling`||this._reportedOverscroll||(this._iosGesture.end(),this._flushHoldIfReady(!0),this._writeAwaitingCommand())}),this.scrollState={...e,startedAt:this.now(),lastTargetOffset:t,stableFrames:0,phase:`queued`,behavior:n,samples:[]},this.scheduleScrollReconcile();return}this._iosGesture.end()}this.scrollState={...e,startedAt:this.now(),lastTargetOffset:t,stableFrames:0,behavior:n,phase:Yt(n,e.index!=null&&wt(t,this.getScrollOffset()))},this._scrollToOffset(t,{behavior:n}),this.scheduleScrollReconcile()}},$t=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function en(e,t,n){let r=0;for(;r<=t;){let i=(r+t)/2|0,a=e[i*2];if(a<n)r=i+1;else if(a>n)t=i-1;else return i}return r>0?r-1:0}function tn(e,t,n,r,i){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};if(r===1&&i!==null){let e=en(i,a,n),r=e,o=n+t;for(;r<a&&i[r*2]+i[r*2+1]<o;)r++;return{startIndex:e,endIndex:r}}let o=$t(0,a,t=>e[t].start,n),s=o;if(r===1)for(;s<a&&e[s].end<n+t;)s++;else if(r>1){let i=Array(r).fill(0);for(;s<a&&i.some(e=>e<n+t);){let t=e[s];i[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(a,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}function nn(e){let t=new Qt(d(e)),n=te(t),r=t._didMount();return c(()=>d(e).getScrollElement(),e=>{e&&t._willUpdate()},{immediate:!0}),c(()=>d(e),e=>{t.setOptions({...e,onChange:(t,r)=>{var a;i(n),(a=e.onChange)==null||a.call(e,t,r)}}),t._willUpdate(),i(n)},{immediate:!0}),j(r),n}function rn(e){return nn(T(()=>({observeElementRect:Ht,observeElementOffset:Kt,scrollToFn:Jt,...d(e)})))}var an=O({__name:`ListboxVirtualizer`,props:{options:{type:Array,required:!0},overscan:{type:Number,required:!1},estimateSize:{type:[Number,Function],required:!1},textContent:{type:Function,required:!1}},setup(e){let t=e,n=u(),r=ot(),i=we(),{getItems:a}=me();r.isVirtual.value=!0;let o=T(()=>{let e=i.value;if(e){let t=window.getComputedStyle(e);return{start:Number.parseFloat(t.paddingBlockStart||t.paddingTop),end:Number.parseFloat(t.paddingBlockEnd||t.paddingBottom)}}return{start:0,end:0}}),s=rn({get scrollPaddingStart(){return o.value.start},get scrollPaddingEnd(){return o.value.end},get count(){return t.options.length},get horizontal(){return r.orientation.value===`horizontal`},estimateSize(e){return typeof t.estimateSize==`function`?t.estimateSize(e):t.estimateSize??28},getScrollElement(){return i.value},overscan:t.overscan??12}),c=T(()=>s.value.getVirtualItems().map(e=>{let r=n.default({option:t.options[e.index],virtualizer:s.value,virtualItem:e})[0],i=r.type===A&&Array.isArray(r.children)?r.children.find(e=>typeof e.type!=`symbol`):r;return{item:e,is:E(i,{key:`${e.key}`,"data-index":e.index,"aria-setsize":t.options.length,"aria-posinset":e.index+1,style:{position:`absolute`,top:0,left:0,transform:`translateY(${e.start}px)`,overflowAnchor:`none`}})}}));r.virtualFocusHook.on(({event:e,scroll:n})=>{let o=t.options.findIndex(e=>Array.isArray(r.modelValue.value)?Z(e,r.modelValue.value[0],r.by):Z(e,r.modelValue.value,r.by));o===-1?n?r.highlightFirstItem():requestAnimationFrame(()=>{let e=a().find(e=>e.ref.dataset.disabled!==``)?.ref;e&&r.changeHighlight(e,!1,!1)}):(e?.preventDefault(),s.value.scrollToIndex(o,{align:`start`}),requestAnimationFrame(()=>{let t=it(i.value);if(t){let i=e?!0:n?void 0:!1;r.changeHighlight(t,n,i)}}))}),r.virtualHighlightHook.on(e=>{let n=t.options.findIndex(t=>Z(t,e,r.by));s.value.scrollToIndex(n,{align:`start`}),requestAnimationFrame(()=>{let e=it(i.value);e&&r.changeHighlight(e)})});let l=ve(``,1e3),f=T(()=>{let e=e=>t.textContent?t.textContent(e):e?.toString().toLowerCase();return t.options.map((t,n)=>({index:n,textContent:e(t)}))});function p(e,n){if(!r.firstValue?.value||!r.multiple.value||!Array.isArray(r.modelValue.value))return;let i=a().filter(e=>e.ref.dataset.disabled!==``).find(e=>e.ref===r.highlightedElement.value)?.value;if(!i)return;let o=null;switch(n){case`prev`:case`next`:o=ae(t.options,r.firstValue.value,i);break;case`first`:o=ae(t.options,r.firstValue.value,t.options?.[0]);break;case`last`:o=ae(t.options,r.firstValue.value,t.options.at(-1))}r.modelValue.value=o}return r.virtualKeydownHook.on(e=>{let n=e.altKey||e.ctrlKey||e.metaKey;if(e.key===`Tab`&&!n)return;let o=Ke[e.key];if(n&&e.key===`a`&&r.multiple.value?(e.preventDefault(),r.modelValue.value=[...t.options],o=`last`):e.shiftKey&&o&&p(e,o),[`first`,`last`].includes(o)){e.preventDefault();let n=o===`first`?0:t.options.length-1;s.value.scrollToIndex(n),requestAnimationFrame(()=>{let e=a(),t=o===`first`?e[0]:e.at(-1);t&&r.changeHighlight(t.ref)})}else if(!o&&!n){l.value+=e.key;let t=Number(pe()?.getAttribute(`data-index`)),n=f.value[t].textContent,a=f.value.map(e=>e.textContent??``),o=_e(a,l.value,n),c=f.value.find(e=>e.textContent===o);c&&(s.value.scrollToIndex(c.index,{align:`start`}),requestAnimationFrame(()=>{let e=i.value.querySelector(`[data-index="${c.index}"]`);e instanceof HTMLElement&&r.changeHighlight(e)}))}}),(e,t)=>(k(),y(`div`,{"data-reka-virtualizer":``,style:S({position:`relative`,width:`100%`,height:`${d(s).getTotalSize()}px`})},[(k(!0),y(A,null,b(c.value,({is:e,item:t})=>(k(),F(R(e),{key:t.index}))),128))],4))}});function on(e){let t=I(`inline`),n=I(!1),r=I(),i=T(()=>t.value===`popper`&&!n.value),a;lt({suppressHighlightScroll:i,onHighlightScrollRequest(e){a=e}});function o(e,i){(r.value!==e||t.value!==i)&&(n.value=!1,a=void 0),r.value=e,t.value=i}function s(i){if(r.value!==i||t.value!==`popper`||n.value)return;n.value=!0;let o=a;a=void 0,e.value&&o?.()}function c(e){r.value===e&&(r.value=void 0,t.value=`inline`,n.value=!1,a=void 0)}return{onContentPositionChange:o,onContentPlaced:s,onContentUnmount:c}}var[$,sn]=K(`ComboboxRoot`),cn=O({__name:`ComboboxRoot`,props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},resetSearchTermOnBlur:{type:Boolean,required:!1,default:!0},resetSearchTermOnSelect:{type:Boolean,required:!1,default:!0},openOnFocus:{type:Boolean,required:!1,default:!1},openOnClick:{type:Boolean,required:!1,default:!1},ignoreFilter:{type:Boolean,required:!1},resetModelValueOnClear:{type:Boolean,required:!1,default:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},highlightOnHover:{type:Boolean,required:!1,default:!0},loop:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`,`highlight`,`update:open`],setup(e,{expose:t,emit:n}){let i=e,a=n,{primitiveElement:o,currentElement:s}=fe(),{multiple:c,disabled:u,ignoreFilter:f,resetSearchTermOnSelect:p,openOnFocus:h,openOnClick:g,dir:_,resetModelValueOnClear:v,highlightOnHover:y,loop:b,unmountOnHide:S}=m(i),w=Ve(_),E=Se(i,`modelValue`,a,{defaultValue:i.defaultValue??(c.value?[]:void 0),passive:i.modelValue===void 0,deep:!0}),D=Se(i,`open`,a,{defaultValue:i.defaultOpen,passive:i.open===void 0});async function O(e){D.value=e,U.value=``,e?(await P(),o.value?.highlightSelected(),j.value=!0,L.value?.focus()):(j.value=!1,setTimeout(()=>{!e&&i.resetSearchTermOnBlur&&A.trigger()},1))}let A=be(),j=I(!1),N=I(!1),L=I(),R=I(),te=T(()=>o.value?.highlightedElement??void 0),B=on(D),V=I(new Map),H=I(new Map),{contains:ne}=Oe({sensitivity:`base`}),U=I(``),W=T(e=>{if(!U.value||i.ignoreFilter||N.value)return{count:V.value.size,items:e?.items??new Map,groups:e?.groups??new Set(H.value.keys())};let t=0,n=new Map,r=new Set;for(let[e,r]of V.value){let i=ne(r,U.value);n.set(e,+!!i),i&&t++}for(let[e,t]of H.value)for(let i of t)if(n.get(i)>0){r.add(e);break}return{count:t,items:n,groups:r}}),G=l();return x(()=>{G?.exposed&&(G.exposed.highlightItem=o.value?.highlightItem,G.exposed.highlightFirstItem=o.value?.highlightFirstItem,G.exposed.highlightSelected=o.value?.highlightSelected)}),t({filtered:W,highlightedElement:te,highlightItem:o.value?.highlightItem,highlightFirstItem:o.value?.highlightFirstItem,highlightSelected:o.value?.highlightSelected}),sn({modelValue:E,multiple:c,disabled:u,open:D,onOpenChange:O,...B,contentId:``,isUserInputted:j,isVirtual:N,inputElement:L,highlightedElement:te,onInputElementChange:e=>L.value=e,triggerElement:R,onTriggerElementChange:e=>R.value=e,parentElement:s,resetSearchTermOnSelect:p,onResetSearchTerm:A.on,allItems:V,allGroups:H,filterSearch:U,filterState:W,ignoreFilter:f,openOnFocus:h,openOnClick:g,resetModelValueOnClear:v,unmountOnHide:S}),(t,n)=>(k(),F(d(Ne),null,{default:M(()=>[r(d(ut),C({ref_key:`primitiveElement`,ref:o},t.$attrs,{modelValue:d(E),"onUpdate:modelValue":n[0]||=e=>ee(E)?E.value=e:null,style:{pointerEvents:d(D)?`auto`:void 0},as:e.as,"as-child":e.asChild,dir:d(w),multiple:d(c),name:e.name,required:e.required,disabled:d(u),"highlight-on-hover":d(y),loop:d(b),by:i.by,onHighlight:n[1]||=e=>a(`highlight`,e)}),{default:M(()=>[z(t.$slots,`default`,{open:d(D),modelValue:d(E)})]),_:3},16,[`modelValue`,`style`,`as`,`as-child`,`dir`,`multiple`,`name`,`required`,`disabled`,`highlight-on-hover`,`loop`,`by`])]),_:3}))}}),ln=O({__name:`ComboboxAnchor`,props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let{forwardRef:t}=X();return(n,i)=>(k(),F(d(ke),{"as-child":``,reference:e.reference},{default:M(()=>[r(d(J),C({ref:d(t),"as-child":e.asChild,as:e.as},n.$attrs),{default:M(()=>[z(n.$slots,`default`)]),_:3},16,[`as-child`,`as`])]),_:3},8,[`reference`]))}}),[un,dn]=K(`ComboboxContent`),fn=O({__name:`ComboboxContentImpl`,props:{position:{type:String,required:!1,default:`inline`},bodyLock:{type:Boolean,required:!1},hideWhenEmpty:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},present:{type:Boolean,required:!1,default:!0}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`],setup(e,{emit:t}){let n=e,i=t,{position:a}=m(n),o=$(),s=Symbol(`ComboboxContent`);c(a,e=>o.onContentPositionChange(s,e),{immediate:!0});let l=T(()=>o.ignoreFilter.value?o.allItems.value.size===0:o.filterState.value.count===0),{forwardRef:u,currentElement:f}=X(),p=Te(n.present&&n.bodyLock);c([()=>n.present,()=>n.bodyLock],([e,t])=>p.value=e&&t),Be();let h=T(()=>n.present?o.parentElement.value:void 0);je(h);let g=T(()=>{if(n.position===`popper`){let{present:e,...t}=n;return t}return{}}),_=Ue(g),v={boxSizing:`border-box`,"--reka-combobox-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-combobox-content-available-width":`var(--reka-popper-available-width)`,"--reka-combobox-content-available-height":`var(--reka-popper-available-height)`,"--reka-combobox-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-combobox-trigger-height":`var(--reka-popper-anchor-height)`};dn({position:a});let y=I(!1);x(()=>{o.inputElement.value&&(y.value=f.value.contains(o.inputElement.value),n.present&&y.value&&o.inputElement.value.focus())}),c(()=>n.present,async(e,t)=>{if(e||!t)return;let n=pe();n&&f.value.contains(n)&&(await P(),o.triggerElement.value?.focus())}),w(()=>{o.onContentUnmount(s);let e=pe();y.value&&(!e||e===document.body)&&o.triggerElement.value?.focus()});function b(e){if(o.parentElement.value?.contains(e))return!0;let t=(e instanceof Element?e.closest(`label`):null)?.control;return!!t&&!!o.parentElement.value?.contains(t)}let S={placed:()=>o.onContentPlaced(s)};return(t,s)=>(k(),F(d(Q),{"as-child":``},{default:M(()=>[r(d(Ae),{"as-child":``,present:n.present,onMountAutoFocus:s[5]||=U(()=>{},[`prevent`]),onUnmountAutoFocus:s[6]||=U(()=>{},[`prevent`])},{default:M(()=>[r(d(Pe),{"as-child":``,present:n.present,"disable-outside-pointer-events":e.disableOutsidePointerEvents,onDismiss:s[0]||=e=>d(o).onOpenChange(!1),onFocusOutside:s[1]||=e=>{b(e.target)&&e.preventDefault(),i(`focusOutside`,e)},onInteractOutside:s[2]||=e=>i(`interactOutside`,e),onEscapeKeyDown:s[3]||=e=>i(`escapeKeyDown`,e),onPointerDownOutside:s[4]||=e=>{b(e.target)&&e.preventDefault(),i(`pointerDownOutside`,e)}},{default:M(()=>[(k(),F(R(d(a)===`popper`?d(Ie):d(J)),C({...t.$attrs,...d(_)},{id:d(o).contentId,ref:d(u),"memo-dependencies":d(a)===`popper`?[d(o).filterSearch.value,d(o).filterState.value]:void 0,"data-state":d(o).open.value?`open`:`closed`,"data-empty":l.value?``:void 0,style:{display:n.hideWhenEmpty&&l.value?`none`:`flex`,flexDirection:`column`,outline:`none`,...d(a)===`popper`?v:{}}},D(d(a)===`popper`?S:{})),{default:M(()=>[z(t.$slots,`default`)]),_:3},16,[`id`,`memo-dependencies`,`data-state`,`data-empty`,`style`]))]),_:3},8,[`present`,`disable-outside-pointer-events`])]),_:3},8,[`present`])]),_:3}))}}),pn=O({__name:`ComboboxArrow`,props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`svg`}},setup(e){let n=e,r=$(),i=un();return X(),(e,a)=>d(r).open.value&&d(i).position.value===`popper`?(k(),F(d(De),t(C({key:0},n)),{default:M(()=>[z(e.$slots,`default`)]),_:3},16)):B(`v-if`,!0)}}),mn=O({__name:`ComboboxCancel`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;X();let n=$();function r(){n.inputElement.value&&(n.inputElement.value.value=``,n.inputElement.value.focus()),n.resetModelValueOnClear?.value&&(n.modelValue.value=n.multiple.value?[]:null),n.filterSearch.value=``}return(n,i)=>(k(),F(d(J),C({type:e.as===`button`?`button`:void 0},t,{tabindex:`-1`,onClick:r}),{default:M(()=>[z(n.$slots,`default`)]),_:3},16,[`type`]))}}),hn=O({__name:`ComboboxContent`,props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},hideWhenEmpty:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`],setup(e,{emit:t}){let n=Ee(e,t),{forwardRef:i}=X(),a=$();return a.contentId||=W(void 0,`reka-combobox-content`),(t,o)=>(k(),F(d(We),{present:e.forceMount||d(a).open.value,"force-mount":e.forceMount||!d(a).unmountOnHide.value},{default:M(({present:e})=>[g(r(fn,C({...d(n),...t.$attrs},{ref:d(i),present:d(a).unmountOnHide.value||e}),{default:M(()=>[z(t.$slots,`default`)]),_:3},16,[`present`]),[[ne,d(a).unmountOnHide.value||e]])]),_:3},8,[`present`,`force-mount`]))}}),gn=O({__name:`ComboboxEmpty`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let n=e,r=$(),i=T(()=>r.ignoreFilter.value?r.allItems.value.size===0:r.filterState.value.count===0);return(e,r)=>i.value?(k(),F(d(J),t(C({key:0},n)),{default:M(()=>[z(e.$slots,`default`,{},()=>[r[0]||=a(`No options`,-1)])]),_:3},16)):B(`v-if`,!0)}}),[_n,vn]=K(`ComboboxGroup`),yn=O({__name:`ComboboxGroup`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,n=W(void 0,`reka-combobox-group`),r=$(),i=T(()=>r.ignoreFilter.value?!0:!r.filterSearch.value||r.filterState.value.groups.has(n)),a=vn({id:n,labelId:``});return x(()=>{r.allGroups.value.has(n)||r.allGroups.value.set(n,new Set)}),w(()=>{r.allGroups.value.delete(n)}),(e,r)=>(k(),F(d(mt),C({id:d(n),"aria-labelledby":d(a).labelId},t,{hidden:!i.value||void 0}),{default:M(()=>[z(e.$slots,`default`)]),_:3},16,[`id`,`aria-labelledby`,`hidden`]))}}),bn=O({__name:`ComboboxInput`,props:{displayValue:{type:Function,required:!1},modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`input`}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,i=$(),a=ot(),{primitiveElement:o,currentElement:s}=fe(),l=Se(n,`modelValue`,r,{passive:n.modelValue===void 0});x(()=>{s.value&&i.onInputElementChange(s.value)});let{isComposing:u,shouldDeferInput:f,handleCompositionStart:p,handleCompositionUpdate:m,handleCompositionEnd:h}=Y(e=>{let t=e.target;t&&_(t.value)});function g(e){u.value||(e.preventDefault(),i.open.value||i.onOpenChange(!0))}function _(e){i.open.value?i.filterSearch.value=e:(i.onOpenChange(!0),P(()=>{e&&(i.filterSearch.value=e,a.highlightFirstItem())}))}function v(e){f.value||_(e.target.value)}function y(){i.openOnFocus.value&&!i.open.value&&i.onOpenChange(!0)}function b(e){if(!i.open.value)return;let t=e.relatedTarget;if(!t)return;let n=i.parentElement.value?.contains(t),r=document.getElementById(i.contentId)?.contains(t);!n&&!r&&requestAnimationFrame(()=>{if(!i.open.value)return;let e=document.activeElement;!i.parentElement.value?.contains(e)&&!document.getElementById(i.contentId)?.contains(e)&&i.onOpenChange(!1)})}function S(){i.openOnClick.value&&!i.open.value&&i.onOpenChange(!0)}function C(){let e=i.modelValue.value;n.displayValue?l.value=n.displayValue(e):!i.multiple.value&&e&&!Array.isArray(e)?typeof e==`object`?l.value=``:l.value=e.toString():l.value=``,P(()=>{l.value=l.value})}return i.onResetSearchTerm(()=>{C()}),c(i.modelValue,async()=>{!i.isUserInputted.value&&i.resetSearchTermOnSelect.value&&C()},{immediate:!0,deep:!0}),c(i.filterState,(e,t)=>{!i.isVirtual.value&&t.count===0&&a.highlightFirstItem()}),(t,n)=>(k(),F(d(dt),{ref_key:`primitiveElement`,ref:o,modelValue:d(l),"onUpdate:modelValue":n[0]||=e=>ee(l)?l.value=e:null,as:e.as,"as-child":e.asChild,"auto-focus":e.autoFocus,disabled:e.disabled,"aria-expanded":d(i).open.value,"aria-controls":d(i).contentId,"aria-autocomplete":`list`,role:`combobox`,autocomplete:`off`,onClick:S,onInput:v,onKeydown:H(g,[`down`,`up`]),onFocus:y,onBlur:b,onCompositionstart:d(p),onCompositionupdate:d(m),onCompositionend:d(h)},{default:M(()=>[z(t.$slots,`default`)]),_:3},8,[`modelValue`,`as`,`as-child`,`auto-focus`,`disabled`,`aria-expanded`,`aria-controls`,`onCompositionstart`,`onCompositionupdate`,`onCompositionend`]))}}),xn=O({__name:`ComboboxItem`,props:{textValue:{type:String,required:!1},value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(e,{emit:n}){let r=e,i=n,o=W(void 0,`reka-combobox-item`),s=$(),c=_n(null),{primitiveElement:l,currentElement:u}=fe();if(r.value===``)throw Error(`A <ComboboxItem /> must have a value prop that is not an empty string. This is because the Combobox value can be set to an empty string to clear the selection and show the placeholder.`);let f=T(()=>{if(s.isVirtual.value||s.ignoreFilter.value||!s.filterSearch.value)return!0;{let e=s.filterState.value.items.get(o);return e===void 0||e>0}});return x(()=>{s.allItems.value.set(o,r.textValue||u.value.textContent||u.value.innerText);let e=c?.id;e&&(s.allGroups.value.has(e)?s.allGroups.value.get(e)?.add(o):s.allGroups.value.set(e,new Set([o])))}),w(()=>{s.allItems.value.delete(o)}),(n,c)=>f.value?h([f.value,d(s).filterSearch.value,d(s).disabled.value,e.disabled,r.value,r.as,r.asChild,...Object.values(n.$attrs)],()=>(k(),F(d(vt),C({key:0},r,{id:d(o),ref_key:`primitiveElement`,ref:l,disabled:d(s).disabled.value||e.disabled,onSelect:c[0]||=t=>{i(`select`,t),!t.defaultPrevented&&(!d(s).multiple.value&&!e.disabled&&!d(s).disabled.value?(t.preventDefault(),d(s).onOpenChange(!1),d(s).modelValue.value=r.value):d(s).multiple.value&&d(s).inputElement.value?.focus())}}),{default:M(r=>[z(n.$slots,`default`,t(V(r)),()=>[a(N(e.value),1)])]),_:3},16,[`id`,`disabled`])),c,1):B(`v-if`,!0)}}),Sn=O({__name:`ComboboxItemIndicator`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let n=e;return(e,r)=>(k(),F(d(yt),t(V(n)),{default:M(()=>[z(e.$slots,`default`)]),_:3},16))}}),Cn=O({__name:`ComboboxLabel`,props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`}},setup(e){let t=e;X();let n=_n({id:``,labelId:``});return n.labelId||=W(void 0,`reka-combobox-group-label`),(e,r)=>(k(),F(d(J),C(t,{id:d(n).labelId}),{default:M(()=>[z(e.$slots,`default`)]),_:3},16,[`id`]))}}),wn=O({__name:`ComboboxPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let n=e;return(e,r)=>(k(),F(d(tt),t(V(n)),{default:M(()=>[z(e.$slots,`default`)]),_:3},16))}}),Tn=O({__name:`ComboboxSeparator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return X(),(e,n)=>(k(),F(d(J),C(t,{"aria-hidden":`true`}),{default:M(()=>[z(e.$slots,`default`)]),_:3},16))}}),En=O({__name:`ComboboxTrigger`,props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,{forwardRef:n,currentElement:r}=X(),i=$(),a=T(()=>t.disabled||i.disabled.value||!1);return x(()=>{r.value&&i.onTriggerElementChange(r.value)}),(r,o)=>(k(),F(d(J),C(t,{ref:d(n),type:e.as===`button`?`button`:void 0,tabindex:`-1`,"aria-label":`Show popup`,"aria-haspopup":`listbox`,"aria-expanded":d(i).open.value,"aria-controls":d(i).contentId,"data-state":d(i).open.value?`open`:`closed`,disabled:a.value,"data-disabled":a.value?``:void 0,"aria-disabled":a.value??void 0,onClick:o[0]||=e=>d(i).onOpenChange(!d(i).open.value)}),{default:M(()=>[z(r.$slots,`default`)]),_:3},16,[`type`,`aria-expanded`,`aria-controls`,`data-state`,`disabled`,`data-disabled`,`aria-disabled`]))}}),Dn=O({__name:`ComboboxVirtualizer`,props:{options:{type:Array,required:!0},overscan:{type:Number,required:!1},estimateSize:{type:[Number,Function],required:!1},textContent:{type:Function,required:!1}},setup(e){let n=e,r=$();return r.isVirtual.value=!0,(e,r)=>(k(),F(an,t(V(n)),{default:M(n=>[z(e.$slots,`default`,t(V(n)))]),_:3},16))}});function On(e,t){if(typeof e!=`object`||!e)return!1;let n=q(e,t);return n!=null&&n!==``}function kn(e,t){let n=t?{xs:44,sm:48,md:52,lg:56,xl:60}:{xs:24,sm:28,md:32,lg:36,xl:40};return n[e]??n.md}function An(e,t,n,r){let i=kn(t,!0),a=kn(t,!1);return r?()=>i:n?t=>On(e[t],n)?i:a:()=>a}var jn={slots:{base:[`relative group rounded-md inline-flex items-center disabled:cursor-not-allowed disabled:opacity-75`,`transition-colors`],leading:`absolute inset-y-0 start-0 flex items-center`,leadingIcon:`shrink-0 text-dimmed`,leadingAvatar:`shrink-0`,leadingAvatarSize:``,trailing:`absolute inset-y-0 end-0 flex items-center`,trailingIcon:`shrink-0 text-dimmed`,value:`truncate pointer-events-none`,placeholder:`truncate text-dimmed`,arrow:`fill-bg stroke-default`,content:[`max-h-[min(15rem,var(--reka-select-content-available-height,15rem))] w-(--reka-select-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden origin-(--reka-select-content-transform-origin) pointer-events-auto data-[state=closed]:pointer-events-none! flex flex-col`,`max-h-[min(15rem,var(--reka-combobox-content-available-height,15rem))] origin-(--reka-combobox-content-transform-origin) w-(--reka-combobox-trigger-width)`],viewport:`relative scroll-py-1 overflow-y-auto flex-1`,group:`p-1 isolate`,empty:`text-center text-muted`,label:`font-semibold text-highlighted`,separator:`-mx-1 my-1 h-px bg-border`,item:[`group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50`,`transition-colors before:transition-colors`],itemLeadingIcon:[`shrink-0 text-dimmed group-data-highlighted:not-group-data-disabled:text-default`,`transition-colors`],itemLeadingAvatar:`shrink-0`,itemLeadingAvatarSize:``,itemLeadingChip:`shrink-0`,itemLeadingChipSize:``,itemTrailing:`ms-auto inline-flex gap-1.5 items-center`,itemTrailingIcon:`shrink-0`,itemWrapper:`flex-1 flex flex-col min-w-0`,itemLabel:`truncate`,itemDescription:`truncate text-muted`,input:`border-b border-default`,focusScope:`flex flex-col min-h-0`,trailingClear:`p-0`},variants:{fieldGroup:{horizontal:`not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]`,vertical:`not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]`},size:{xs:{base:`px-2 py-1 text-sm/4 gap-1`,leading:`ps-2`,trailing:`pe-2`,leadingIcon:`size-4`,leadingAvatarSize:`3xs`,trailingIcon:`size-4`,label:`p-1 text-[10px]/3 gap-1`,item:`p-1 text-xs gap-1`,itemLeadingIcon:`size-4`,itemLeadingAvatarSize:`3xs`,itemLeadingChip:`size-4`,itemLeadingChipSize:`sm`,itemTrailingIcon:`size-4`,empty:`p-2 text-xs`},sm:{base:`px-2.5 py-1.5 text-sm/4 gap-1.5`,leading:`ps-2.5`,trailing:`pe-2.5`,leadingIcon:`size-4`,leadingAvatarSize:`3xs`,trailingIcon:`size-4`,label:`p-1.5 text-[10px]/3 gap-1.5`,item:`p-1.5 text-xs gap-1.5`,itemLeadingIcon:`size-4`,itemLeadingAvatarSize:`3xs`,itemLeadingChip:`size-4`,itemLeadingChipSize:`sm`,itemTrailingIcon:`size-4`,empty:`p-2.5 text-xs`},md:{base:`px-2.5 py-1.5 text-base/5 gap-1.5`,leading:`ps-2.5`,trailing:`pe-2.5`,leadingIcon:`size-5`,leadingAvatarSize:`2xs`,trailingIcon:`size-5`,label:`p-1.5 text-xs gap-1.5`,item:`p-1.5 text-sm gap-1.5`,itemLeadingIcon:`size-5`,itemLeadingAvatarSize:`2xs`,itemLeadingChip:`size-5`,itemLeadingChipSize:`md`,itemTrailingIcon:`size-5`,empty:`p-2.5 text-sm`},lg:{base:`px-3 py-2 text-base/5 gap-2`,leading:`ps-3`,trailing:`pe-3`,leadingIcon:`size-5`,leadingAvatarSize:`2xs`,trailingIcon:`size-5`,label:`p-2 text-xs gap-2`,item:`p-2 text-sm gap-2`,itemLeadingIcon:`size-5`,itemLeadingAvatarSize:`2xs`,itemLeadingChip:`size-5`,itemLeadingChipSize:`md`,itemTrailingIcon:`size-5`,empty:`p-3 text-sm`},xl:{base:`px-3 py-2 text-base gap-2`,leading:`ps-3`,trailing:`pe-3`,leadingIcon:`size-6`,leadingAvatarSize:`xs`,trailingIcon:`size-6`,label:`p-2 text-sm gap-2`,item:`p-2 text-base gap-2`,itemLeadingIcon:`size-6`,itemLeadingAvatarSize:`xs`,itemLeadingChip:`size-6`,itemLeadingChipSize:`lg`,itemTrailingIcon:`size-6`,empty:`p-3 text-base`}},variant:{outline:`text-highlighted bg-default ring ring-inset ring-accented hover:bg-elevated disabled:bg-default`,soft:`text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50`,subtle:`text-highlighted bg-elevated ring ring-inset ring-accented hover:bg-accented/75 disabled:bg-elevated`,ghost:`text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent`,none:`text-highlighted bg-transparent focus:outline-none`},color:{primary:``,secondary:``,success:``,info:``,warning:``,error:``,neutral:``},leading:{true:``},trailing:{true:``},loading:{true:``},highlight:{true:``},fixed:{false:``},type:{file:`file:me-1.5 file:font-medium file:text-muted file:outline-none`},position:{popper:{content:`data-[state=open]:animate-[scale-in_100ms_var(--ease-out)] data-[state=closed]:animate-[scale-out_100ms_var(--ease-out)]`},"item-aligned":{content:``}},multiple:{true:``},virtualize:{true:{viewport:`p-1 isolate`},false:{viewport:`divide-y divide-default`}}},compoundVariants:[{color:`primary`,variant:[`outline`,`subtle`],class:`outline-primary/25 focus-visible:outline-3 focus-visible:ring-primary`},{color:`secondary`,variant:[`outline`,`subtle`],class:`outline-secondary/25 focus-visible:outline-3 focus-visible:ring-secondary`},{color:`success`,variant:[`outline`,`subtle`],class:`outline-success/25 focus-visible:outline-3 focus-visible:ring-success`},{color:`info`,variant:[`outline`,`subtle`],class:`outline-info/25 focus-visible:outline-3 focus-visible:ring-info`},{color:`warning`,variant:[`outline`,`subtle`],class:`outline-warning/25 focus-visible:outline-3 focus-visible:ring-warning`},{color:`error`,variant:[`outline`,`subtle`],class:`outline-error/25 focus-visible:outline-3 focus-visible:ring-error`},{color:`primary`,variant:[`soft`,`ghost`],class:`outline-primary/25 focus-visible:outline-3`},{color:`secondary`,variant:[`soft`,`ghost`],class:`outline-secondary/25 focus-visible:outline-3`},{color:`success`,variant:[`soft`,`ghost`],class:`outline-success/25 focus-visible:outline-3`},{color:`info`,variant:[`soft`,`ghost`],class:`outline-info/25 focus-visible:outline-3`},{color:`warning`,variant:[`soft`,`ghost`],class:`outline-warning/25 focus-visible:outline-3`},{color:`error`,variant:[`soft`,`ghost`],class:`outline-error/25 focus-visible:outline-3`},{color:`primary`,highlight:!0,class:`ring ring-inset ring-primary`},{color:`secondary`,highlight:!0,class:`ring ring-inset ring-secondary`},{color:`success`,highlight:!0,class:`ring ring-inset ring-success`},{color:`info`,highlight:!0,class:`ring ring-inset ring-info`},{color:`warning`,highlight:!0,class:`ring ring-inset ring-warning`},{color:`error`,highlight:!0,class:`ring ring-inset ring-error`},{color:`neutral`,variant:[`outline`,`subtle`],class:`outline-inverted/25 focus-visible:outline-3 focus-visible:ring-inverted`},{color:`neutral`,variant:[`soft`,`ghost`],class:`outline-inverted/25 focus-visible:outline-3`},{color:`neutral`,highlight:!0,class:`ring ring-inset ring-inverted`},{leading:!0,size:`xs`,class:`ps-7`},{leading:!0,size:`sm`,class:`ps-8`},{leading:!0,size:`md`,class:`ps-9`},{leading:!0,size:`lg`,class:`ps-10`},{leading:!0,size:`xl`,class:`ps-11`},{trailing:!0,size:`xs`,class:`pe-7`},{trailing:!0,size:`sm`,class:`pe-8`},{trailing:!0,size:`md`,class:`pe-9`},{trailing:!0,size:`lg`,class:`pe-10`},{trailing:!0,size:`xl`,class:`pe-11`},{loading:!0,leading:!0,class:{leadingIcon:`animate-spin`}},{loading:!0,leading:!1,trailing:!0,class:{trailingIcon:`animate-spin`}},{fixed:!1,size:`xs`,class:`md:text-xs`},{fixed:!1,size:`sm`,class:`md:text-xs`},{fixed:!1,size:`md`,class:`md:text-sm`},{fixed:!1,size:`lg`,class:`md:text-sm`}],defaultVariants:{size:`md`,color:`primary`,variant:`outline`,position:`popper`}},Mn=[`aria-labelledby`,`aria-multiselectable`],Nn=Object.assign({inheritAttrs:!1},{__name:`USelectMenu`,props:e({id:{type:String,required:!1},placeholder:{type:String,required:!1},searchInput:{type:[Boolean,Object],required:!1,default:!0},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},required:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},selectedIcon:{type:null,required:!1},clear:{type:[Boolean,Object],required:!1},clearIcon:{type:null,required:!1},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},virtualize:{type:[Boolean,Object],required:!1,default:!1},valueKey:{type:null,required:!1},labelKey:{type:null,required:!1,default:`label`},descriptionKey:{type:null,required:!1,default:`description`},items:{type:null,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1},modelModifiers:{type:null,required:!1},multiple:{type:Boolean,required:!1},highlight:{type:Boolean,required:!1},fixed:{type:Boolean,required:!1},createItem:{type:[Boolean,String,Object],required:!1},filterFields:{type:Array,required:!1},ignoreFilter:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},class:{type:null,required:!1},ui:{type:Object,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},resetSearchTermOnBlur:{type:Boolean,required:!1,default:!0},resetSearchTermOnSelect:{type:Boolean,required:!1,default:!0},resetModelValueOnClear:{type:Boolean,required:!1,default:!0},highlightOnHover:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},{searchTerm:{type:String,default:``},searchTermModifiers:{}}),emits:e([`change`,`blur`,`focus`,`create`,`clear`,`highlight`,`update:modelValue`,`update:open`],[`update:searchTerm`]),setup(e,{expose:i,emit:s}){let l=e,m=s,h=u(),g=ce(`selectMenu`,l),S=o(e,`searchTerm`,{type:String,default:``}),{t:w}=nt(),E=re(),{filterGroups:D}=Me(),O=He(ye(g,`modelValue`,`defaultValue`,`open`,`defaultOpen`,`required`,`multiple`,`resetSearchTermOnBlur`,`resetSearchTermOnSelect`,`resetModelValueOnClear`,`highlightOnHover`,`loop`,`by`),m),ee=Fe(L(()=>g.portal)),R=L(()=>G(g.content,{side:`bottom`,sideOffset:8,collisionPadding:8,position:`popper`})),te=L(()=>G(g.arrow,{rounded:!0})),ne=T(()=>typeof g.clear==`object`?g.clear:{}),W=L(()=>g.virtualize?G(typeof g.virtualize==`boolean`?{}:g.virtualize,{estimateSize:An(We.value,je.value??`md`,g.descriptionKey,!!h[`item-description`])}):!1),ie=L(()=>G(g.searchInput,{placeholder:w(`selectMenu.search`),variant:`none`,fixed:g.fixed})),{emitFormBlur:ae,emitFormFocus:K,emitFormInput:fe,emitFormChange:pe,size:me,color:he,id:ge,name:_e,highlight:ve,disabled:be,ariaAttrs:xe}=$e(l),{orientation:Se,size:we}=Je(l),{isLeading:J,isTrailing:Te,leadingIconName:Ee,trailingIconName:De}=Qe(T(()=>({icon:g.icon,leading:g.leading,leadingIcon:g.leadingIcon,trailing:g.trailing,trailingIcon:g.trailingIcon??E.ui.icons.chevronDown,loading:g.loading,loadingIcon:g.loadingIcon}))),Oe=T(()=>he.value??g.color),ke=T(()=>ve.value??g.highlight),je=T(()=>we.value??me.value??g.size),Ne=T(()=>be.value??g.disabled),[Pe,Ie]=Ce(),[Re,ze]=Ce({props:{item:{type:[Object,String,Number,Boolean],required:!0},index:{type:Number,required:!1}}}),Y=T(()=>de({extend:jn,...E.ui?.selectMenu||{}})({color:Oe.value,variant:g.variant,size:je.value,loading:g.loading,highlight:ke.value,fixed:g.fixed,leading:J.value||!!g.avatar||!!h.leading,trailing:Te.value||!!h.trailing,fieldGroup:Se.value,virtualize:!!g.virtualize,multiple:g.multiple}));function Be(e){if(g.multiple&&Array.isArray(e)){let t=e.map(e=>oe(X.value,e,{labelKey:g.labelKey,valueKey:g.valueKey,by:g.by})).filter(e=>e!=null&&e!==``);return t.length>0?t.join(`, `):void 0}return oe(X.value,e,{labelKey:g.labelKey,valueKey:g.valueKey,by:g.by})}let Ve=T(()=>g.items?.length?ue(g.items)?g.items:[g.items]:[]),X=T(()=>Ve.value.flatMap(e=>e)),Ue=T(()=>{if(g.ignoreFilter||!S.value)return Ve.value;let e=Array.isArray(g.filterFields)?g.filterFields:[g.labelKey];return D(Ve.value,S.value,{fields:e,isStructural:e=>Q(e)&&!!e.type&&[`label`,`separator`].includes(e.type)})}),We=T(()=>Ue.value.flatMap(e=>e)),Ge=T(()=>{if(!g.createItem||!S.value)return!1;let e=g.valueKey?{[g.valueKey]:S.value}:S.value;return typeof g.createItem==`object`&&g.createItem.when===`always`||g.createItem===`always`?!We.value.find(t=>le(t,e,g.by??g.valueKey)):!We.value.length}),Ke=T(()=>typeof g.createItem==`object`?g.createItem.position:`bottom`),tt=p(`triggerRef`);function rt(){g.autofocus&&tt.value?.$el?.focus({focusVisible:!0})}let it;x(()=>{it=setTimeout(()=>{rt()},g.autofocusDelay)}),j(()=>clearTimeout(it));function at(e){if(n(g.modelValue)===e)return;g.modelModifiers?.trim&&(typeof e==`string`||e==null)&&(e=e?.trim()??null),g.modelModifiers?.number&&(e=se(e)),g.modelModifiers?.nullable&&(e??=null),g.modelModifiers?.optional&&!g.modelModifiers?.nullable&&e!==null&&(e??=void 0);let t=new Event(`change`,{target:{value:e}});m(`change`,t),pe(),fe(),g.resetSearchTermOnSelect&&(S.value=``)}let Z=I(!1),ot;j(()=>clearTimeout(ot));function st(e){if(Z.value=e,e){let e=new FocusEvent(`focus`);m(`focus`,e),K(),clearTimeout(ot)}else{let e=new FocusEvent(`blur`);m(`blur`,e),ae(),g.resetSearchTermOnBlur&&(ot=setTimeout(()=>{S.value=``},100))}}function ct(e){if(Z.value)return;let t=e.currentTarget;e.preventDefault(),t.click()}function lt(e){e.preventDefault(),e.stopPropagation(),m(`create`,S.value)}function ut(e,t){Q(t)&&(t.disabled?e.preventDefault():t.onSelect?.(e))}function Q(e){return typeof e==`object`&&!!e}function dt(e){return g.multiple&&Array.isArray(e)?e.length===0:e==null||e===``}function ft(){Ne.value||m(`clear`)}function pt(e){ie.value.autofocus===!1&&e.preventDefault()}let mt=p(`focusScopeRef`);function ht(e){let t=mt.value?.$el;e.defaultPrevented||t?.parentElement?.dataset.state!==`open`||(e.preventDefault(),((ie.value.autofocus===!1?null:t.querySelector(`[data-slot="input"] input`))??t).focus({preventScroll:!0}))}function gt(e){let t=document.activeElement;t&&t!==document.body&&!e.target.contains(t)&&e.preventDefault()}let _t=p(`viewportRef`),vt=f(),yt=T(()=>ge.value??`select-menu-${vt}`),bt=`select-menu-listbox-${vt}`,xt=p(`comboboxRootRef`);return c(()=>g.items,async()=>{Z.value&&g.createItem&&(await P(),xt.value?.highlightFirstItem?.())},{flush:`post`}),i({triggerRef:L(()=>tt.value?.$el),viewportRef:L(()=>_t.value)}),(e,n)=>(k(),y(A,null,[r(d(Pe),null,{default:M(()=>[r(d(xn),{"data-slot":`item`,class:_(Y.value.item({class:d(g).ui?.item})),value:S.value,onSelect:lt},{default:M(()=>[v(`span`,{"data-slot":`itemLabel`,class:_(Y.value.itemLabel({class:d(g).ui?.itemLabel}))},[z(e.$slots,`create-item-label`,{item:S.value},()=>[a(N(d(w)(`selectMenu.create`,{label:S.value})),1)])],2)]),_:3},8,[`class`,`value`])]),_:3}),r(d(Re),null,{default:M(({item:t,index:n})=>[Q(t)&&t.type===`label`?(k(),F(d(Cn),{key:0,"data-slot":`label`,class:_(Y.value.label({class:[d(g).ui?.label,t.ui?.label,t.class]}))},{default:M(()=>[a(N(d(q)(t,d(g).labelKey)),1)]),_:2},1032,[`class`])):Q(t)&&t.type===`separator`?(k(),F(d(Tn),{key:1,"data-slot":`separator`,class:_(Y.value.separator({class:[d(g).ui?.separator,t.ui?.separator,t.class]}))},null,8,[`class`])):(k(),F(d(xn),{key:2,"data-slot":`item`,class:_(Y.value.item({class:[d(g).ui?.item,Q(t)&&t.ui?.item,Q(t)&&t.class]})),disabled:Q(t)&&t.disabled,value:d(g).valueKey&&Q(t)?d(q)(t,d(g).valueKey):t,onSelect:e=>ut(e,t)},{default:M(()=>[z(e.$slots,`item`,{item:t,index:n,ui:Y.value},()=>[z(e.$slots,`item-leading`,{item:t,index:n,ui:Y.value},()=>[Q(t)&&t.icon?(k(),F(qe,{key:0,name:t.icon,"data-slot":`itemLeadingIcon`,class:_(Y.value.itemLeadingIcon({class:[d(g).ui?.itemLeadingIcon,t.ui?.itemLeadingIcon]}))},null,8,[`name`,`class`])):Q(t)&&t.avatar?(k(),F(Xe,C({key:1,size:t.ui?.itemLeadingAvatarSize||d(g).ui?.itemLeadingAvatarSize||Y.value.itemLeadingAvatarSize()},t.avatar,{"data-slot":`itemLeadingAvatar`,class:Y.value.itemLeadingAvatar({class:[d(g).ui?.itemLeadingAvatar,t.ui?.itemLeadingAvatar]})}),null,16,[`size`,`class`])):Q(t)&&t.chip?(k(),F(Ze,C({key:2,size:t.ui?.itemLeadingChipSize||d(g).ui?.itemLeadingChipSize||Y.value.itemLeadingChipSize(),inset:``,standalone:``},t.chip,{"data-slot":`itemLeadingChip`,class:Y.value.itemLeadingChip({class:[d(g).ui?.itemLeadingChip,t.ui?.itemLeadingChip]})}),null,16,[`size`,`class`])):B(``,!0)]),v(`span`,{"data-slot":`itemWrapper`,class:_(Y.value.itemWrapper({class:[d(g).ui?.itemWrapper,Q(t)&&t.ui?.itemWrapper]}))},[v(`span`,{"data-slot":`itemLabel`,class:_(Y.value.itemLabel({class:[d(g).ui?.itemLabel,Q(t)&&t.ui?.itemLabel]}))},[z(e.$slots,`item-label`,{item:t,index:n},()=>[a(N(Q(t)?d(q)(t,d(g).labelKey):t),1)])],2),Q(t)&&(d(q)(t,d(g).descriptionKey)||h[`item-description`])?(k(),y(`span`,{key:0,"data-slot":`itemDescription`,class:_(Y.value.itemDescription({class:[d(g).ui?.itemDescription,Q(t)&&t.ui?.itemDescription]}))},[z(e.$slots,`item-description`,{item:t,index:n},()=>[a(N(d(q)(t,d(g).descriptionKey)),1)])],2)):B(``,!0)],2),v(`span`,{"data-slot":`itemTrailing`,class:_(Y.value.itemTrailing({class:[d(g).ui?.itemTrailing,Q(t)&&t.ui?.itemTrailing]}))},[z(e.$slots,`item-trailing`,{item:t,index:n,ui:Y.value}),r(d(Sn),{"as-child":``},{default:M(()=>[r(qe,{name:d(g).selectedIcon||d(E).ui.icons.check,"data-slot":`itemTrailingIcon`,class:_(Y.value.itemTrailingIcon({class:[d(g).ui?.itemTrailingIcon,Q(t)&&t.ui?.itemTrailingIcon]}))},null,8,[`name`,`class`])]),_:2},1024)],2)])]),_:2},1032,[`class`,`disabled`,`value`,`onSelect`]))]),_:3}),r(d(cn),C({ref_key:`comboboxRootRef`,ref:xt},d(O),{"ignore-filter":``,"as-child":``,name:d(_e),disabled:Ne.value,"onUpdate:modelValue":at,"onUpdate:open":st}),{default:M(({modelValue:i,open:o})=>[r(d(ln),{"as-child":``},{default:M(()=>[r(d(En),C({id:yt.value,ref_key:`triggerRef`,ref:tt,"data-slot":`base`,class:Y.value.base({class:[d(g).ui?.base,d(g).class]}),tabindex:`0`},{"aria-label":void 0,...e.$attrs,...d(xe)},{"aria-controls":bt,onKeydown:[H(ct,[`down`]),H(ct,[`up`])]}),{default:M(()=>[d(J)||d(g).avatar||h.leading?(k(),y(`span`,{key:0,"data-slot":`leading`,class:_(Y.value.leading({class:d(g).ui?.leading}))},[z(e.$slots,`leading`,{modelValue:i,open:o,ui:Y.value},()=>[d(J)&&d(Ee)?(k(),F(qe,{key:0,name:d(Ee),"data-slot":`leadingIcon`,class:_(Y.value.leadingIcon({class:d(g).ui?.leadingIcon}))},null,8,[`name`,`class`])):d(g).avatar?(k(),F(Xe,C({key:1,size:d(g).ui?.itemLeadingAvatarSize||Y.value.itemLeadingAvatarSize()},d(g).avatar,{"data-slot":`itemLeadingAvatar`,class:Y.value.itemLeadingAvatar({class:d(g).ui?.itemLeadingAvatar})}),null,16,[`size`,`class`])):B(``,!0)])],2)):B(``,!0),z(e.$slots,`default`,{modelValue:i,open:o,ui:Y.value},()=>[(k(!0),y(A,null,b([Be(i)],e=>(k(),y(A,{key:e},[e==null?(k(),y(`span`,{key:1,"data-slot":`placeholder`,class:_(Y.value.placeholder({class:d(g).ui?.placeholder}))},N(d(g).placeholder??`\xA0`),3)):(k(),y(`span`,{key:0,"data-slot":`value`,class:_(Y.value.value({class:d(g).ui?.value}))},N(e),3))],64))),128))]),d(Te)||h.trailing||d(g).clear?(k(),y(`span`,{key:1,"data-slot":`trailing`,class:_(Y.value.trailing({class:d(g).ui?.trailing}))},[z(e.$slots,`trailing`,{modelValue:i,open:o,ui:Y.value},()=>[d(g).clear&&!Ne.value&&!dt(i)?(k(),F(d(mn),{key:0,"as-child":``},{default:M(()=>[r(et,C({as:`span`,icon:d(g).clearIcon||d(E).ui.icons.close,size:je.value,variant:`link`,color:`neutral`,tabindex:`-1`},ne.value,{"data-slot":`trailingClear`,class:Y.value.trailingClear({class:d(g).ui?.trailingClear}),onClick:U(ft,[`stop`])}),null,16,[`icon`,`size`,`class`])]),_:1})):d(De)?(k(),F(qe,{key:1,name:d(De),"data-slot":`trailingIcon`,class:_(Y.value.trailingIcon({class:d(g).ui?.trailingIcon,leading:d(J)}))},null,8,[`name`,`class`])):B(``,!0)])],2)):B(``,!0)]),_:2},1040,[`id`,`class`])]),_:2},1024),r(d(wn),t(V(d(ee))),{default:M(()=>[r(d(Ye),null,{default:M(()=>[r(d(hn),C({"data-slot":`content`,class:Y.value.content({class:d(g).ui?.content})},R.value,{role:void 0,"aria-orientation":void 0,"aria-multiselectable":void 0,onFocusOutside:ht}),{default:M(()=>[r(d(Ae),{ref_key:`focusScopeRef`,ref:mt,loop:``,"data-slot":`focusScope`,class:_(Y.value.focusScope({class:d(g).ui?.focusScope})),onMountAutoFocus:pt,onUnmountAutoFocus:gt},{default:M(()=>[z(e.$slots,`content-top`),d(g).searchInput?(k(),F(d(bn),{key:0,modelValue:S.value,"onUpdate:modelValue":n[1]||=e=>S.value=e,"display-value":()=>S.value,"aria-controls":bt,"as-child":``},{default:M(()=>[r(Le,C({autofocus:``,autocomplete:`off`,size:je.value},ie.value,{"model-modifiers":{trim:d(g).modelModifiers?.trim},"data-slot":`input`,class:Y.value.input({class:d(g).ui?.input}),onChange:n[0]||=U(()=>{},[`stop`])}),null,16,[`size`,`model-modifiers`,`class`])]),_:1},8,[`modelValue`,`display-value`])):B(``,!0),r(d(gn),{"data-slot":`empty`,class:_(Y.value.empty({class:d(g).ui?.empty}))},{default:M(()=>[z(e.$slots,`empty`,{searchTerm:S.value},()=>[a(N(S.value?d(w)(`selectMenu.noMatch`,{searchTerm:S.value}):d(w)(`selectMenu.noData`)),1)])]),_:3},8,[`class`]),v(`div`,{id:bt,ref_key:`viewportRef`,ref:_t,role:`listbox`,"aria-labelledby":yt.value,"aria-multiselectable":!!d(g).multiple,"aria-orientation":`vertical`,"data-slot":`viewport`,class:_(Y.value.viewport({class:d(g).ui?.viewport}))},[d(g).virtualize?(k(),y(A,{key:0},[Ge.value&&Ke.value===`top`?(k(),F(d(Ie),{key:0})):B(``,!0),r(d(Dn),C({options:We.value,"text-content":e=>Q(e)?d(q)(e,d(g).labelKey):String(e)},W.value),{default:M(({option:e,virtualItem:t})=>[r(d(ze),{item:e,index:t.index},null,8,[`item`,`index`])]),_:1},16,[`options`,`text-content`]),Ge.value&&Ke.value===`bottom`?(k(),F(d(Ie),{key:1})):B(``,!0)],64)):(k(),y(A,{key:1},[Ge.value&&Ke.value===`top`?(k(),F(d(yn),{key:0,"data-slot":`group`,class:_(Y.value.group({class:d(g).ui?.group}))},{default:M(()=>[r(d(Ie))]),_:1},8,[`class`])):B(``,!0),(k(!0),y(A,null,b(Ue.value,(e,t)=>(k(),F(d(yn),{key:`group-${t}`,"data-slot":`group`,class:_(Y.value.group({class:d(g).ui?.group}))},{default:M(()=>[(k(!0),y(A,null,b(e,(e,n)=>(k(),F(d(ze),{key:`group-${t}-${n}`,item:e,index:n},null,8,[`item`,`index`]))),128))]),_:2},1032,[`class`]))),128)),Ge.value&&Ke.value===`bottom`?(k(),F(d(yn),{key:1,"data-slot":`group`,class:_(Y.value.group({class:d(g).ui?.group}))},{default:M(()=>[r(d(Ie))]),_:1},8,[`class`])):B(``,!0)],64))],10,Mn),z(e.$slots,`content-bottom`)]),_:3},8,[`class`]),d(g).arrow?(k(),F(d(pn),C({key:0},te.value,{"data-slot":`arrow`,class:Y.value.arrow({class:d(g).ui?.arrow})}),null,16,[`class`])):B(``,!0)]),_:3},16,[`class`])]),_:3})]),_:3},16)]),_:3},16,[`name`,`disabled`])],64))}}),Pn=Object.assign(O({inheritAttrs:!1,__name:`SkinSelect`,props:e({items:{},icon:{},placeholder:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=o(e,`modelValue`),n={base:`skin-select`,content:`skin-pop`,viewport:`skin-pop-view`,item:`skin-pop-item`,label:`skin-pop-label`,empty:`skin-pop-empty`};return(r,i)=>{let a=Nn;return k(),F(a,C({modelValue:t.value,"onUpdate:modelValue":i[0]||=e=>t.value=e,items:e.items,"value-key":`value`,"search-input":!1,size:`sm`,variant:`outline`,icon:e.icon,placeholder:e.placeholder,ui:n},r.$attrs),null,16,[`modelValue`,`items`,`icon`,`placeholder`])}}}),{__name:`SkinSelect`});export{Pn as t};
|
|
1
|
+
import{$ as e,$n as t,Cn as n,D as r,Dn as i,E as a,Ft as o,Gt as s,Ht as c,L as l,Lt as u,On as d,Pt as f,Rt as p,Tn as m,Xt as h,Yt as g,Zn as _,_ as v,b as y,bt as b,ct as x,er as S,et as C,ft as w,g as T,h as E,jt as D,k as O,mt as k,o as A,pn as j,qt as M,tr as N,tt as P,un as ee,v as F,vn as I,wn as L,wt as R,xn as te,xt as z,y as B,z as V}from"./DZo3dYLJ.js";import{C as H,S as ne,w as U}from"./51OWHj8c.js";import{t as W}from"./B3jkABw9.js";import{t as G}from"./DSaWoFHS.js";import{r as re,t as ie}from"./Csqgy925.js";import{t as ae}from"./Cm9lkUvP.js";import{a as oe,h as K,i as q,l as se,n as ce,r as le,s as ue,t as de}from"./6gFtTBwm.js";import{n as fe,r as pe,t as me}from"./DLkAKotw.js";import{n as he,r as ge,t as _e}from"./Bb3Limos.js";import{h as ve,m as ye,r as be,s as xe}from"./CuJUHLl8.js";import{p as Se,t as Ce,u as we}from"./Vo4wMbnS.js";import{t as J}from"./CK9_veoz.js";import{S as Te,_ as Ee,a as De,b as Oe,c as ke,d as Ae,g as je,i as Me,l as Ne,m as Pe,r as Fe,s as Ie,t as Le,u as Re,v as ze,x as Y,y as Be}from"./Dtsa-1NS.js";import{t as Ve}from"./Ci0qbkgh.js";import{t as He}from"./BuOKDFiJ.js";import{t as X}from"./D3YCAmfu.js";import{t as Ue}from"./B_SlFcWp.js";import{t as We}from"./C9StZL3D.js";import{a as Ge,r as Ke}from"./BPTrRhcw.js";import{t as qe}from"./rlePnzpc.js";import{a as Je,i as Ye,n as Xe,r as Ze,t as Qe}from"./DfR3IZN_.js";import{n as $e,t as et}from"./EYTShbt4.js";import{C as tt,u as nt}from"#entry";function rt(){return{ALT:`Alt`,ARROW_DOWN:`ArrowDown`,ARROW_LEFT:`ArrowLeft`,ARROW_RIGHT:`ArrowRight`,ARROW_UP:`ArrowUp`,BACKSPACE:`Backspace`,CAPS_LOCK:`CapsLock`,CONTROL:`Control`,DELETE:`Delete`,END:`End`,ENTER:`Enter`,ESCAPE:`Escape`,F1:`F1`,F10:`F10`,F11:`F11`,F12:`F12`,F2:`F2`,F3:`F3`,F4:`F4`,F5:`F5`,F6:`F6`,F7:`F7`,F8:`F8`,F9:`F9`,HOME:`Home`,META:`Meta`,PAGE_DOWN:`PageDown`,PAGE_UP:`PageUp`,SHIFT:`Shift`,SPACE:` `,TAB:`Tab`,CTRL:`Control`,ASTERISK:`*`,SPACE_CODE:`Space`}}function it(e){return e?.querySelector(`[data-state=checked]`)}function at(e,t,n){return e===void 0?!1:Array.isArray(e)?e.some(e=>Z(e,t,n)):Z(e,t,n)}function Z(e,t,n){return e===void 0||t===void 0?!1:typeof e==`string`?e===t:typeof n==`function`?n(e,t):typeof n==`string`?e?.[n]===t?.[n]:ie(e,t)}var[ot,st]=K(`ListboxRoot`),[ct,lt]=K(`ListboxHighlightScroll`),ut=O({__name:`ListboxRoot`,props:{modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},orientation:{type:String,required:!1,default:`vertical`},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},selectionBehavior:{type:String,required:!1,default:`toggle`},highlightOnHover:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`,`highlight`,`entryFocus`,`leave`],setup(e,{expose:t,emit:n}){let r=e,i=n,{multiple:a,highlightOnHover:o,loop:s,orientation:l,disabled:u,selectionBehavior:f,dir:p}=m(r),{getItems:h,getItem:g}=me({isProvider:!0}),{handleTypeaheadSearch:_}=he(),{primitiveElement:v,currentElement:y}=fe(),b=rt(),x=Ve(p),S=ct(null);lt({suppressHighlightScroll:I(!1),onHighlightScrollRequest:()=>{}});let C=ze(y),w=I(),T=I(!1),E=I(!0),D=Se(r,`modelValue`,i,{defaultValue:r.defaultValue??(a.value?[]:void 0),passive:r.modelValue===void 0,deep:!0});function O(e){if(T.value=!0,r.multiple){let t=Array.isArray(D.value)?[...D.value]:[],n=t.findIndex(t=>Z(t,e,r.by));r.selectionBehavior===`toggle`?(n===-1?t.push(e):t.splice(n,1),D.value=t):(D.value=[e],w.value=e)}else r.selectionBehavior===`toggle`&&Z(D.value,e,r.by)?D.value=void 0:D.value=e;setTimeout(()=>{T.value=!1},1)}let A=I(null),j=I(null),N=I(!1),ee=I(!1),L=be(),R=be(),te=be();function V(){return h().map(e=>e.ref).filter(e=>e.dataset.disabled!==``)}function H(e,t=!0,n){if(!e)return;A.value=e;let r=S?.suppressHighlightScroll.value??!1;(n??E.value)&&(r?A.value.focus({preventScroll:!0}):A.value.focus()),r?S?.onHighlightScrollRequest(t?()=>{let e=A.value;e?.isConnected&&e.scrollIntoView({block:`nearest`})}:void 0):t&&A.value.scrollIntoView({block:`nearest`});let a=g(e);i(`highlight`,a)}function ne(e){if(N.value)te.trigger(e);else{let t=h().find(t=>Z(t.value,e,r.by));t&&(A.value=t.ref,H(t.ref))}}function U(e){if(A.value&&A.value.isConnected){if(e.ctrlKey||e.metaKey||e.altKey)return;e.preventDefault(),e.stopPropagation(),ee.value||A.value.click()}}function W(e){if(E.value){if(T.value=!0,N.value)R.trigger(e);else{let t=e.altKey||e.ctrlKey||e.metaKey;if(t&&e.key===`a`&&a.value){let t=h(),n=t.map(e=>e.value);D.value=[...n],e.preventDefault();let r=t.at(-1);r&&H(r.ref)}else if(!t){let t=_(e.key,h());t&&H(t)}}setTimeout(()=>{T.value=!1},1)}}function G(){ee.value=!0}function re(){P(()=>{ee.value=!1})}function ie(){P(()=>{se(new KeyboardEvent(`keydown`,{key:`PageUp`}))})}function oe(e){let t=A.value;t?.isConnected&&(j.value=t),A.value=null,i(`leave`,e)}function K(e){let t=new CustomEvent(`listbox.entryFocus`,{bubbles:!1,cancelable:!0});if(e.currentTarget?.dispatchEvent(t),i(`entryFocus`,t),!t.defaultPrevented){if(j.value)H(j.value);else{let e=V()?.[0];H(e)}}}function q(e){let t=h(!0).map(e=>e.ref),n=e===`next`?t.at(-1):t[0];if(!n)return!1;let r=Number(n.getAttribute(`aria-posinset`)),i=Number(n.getAttribute(`aria-setsize`));return e===`next`?r===i:r===1}function se(e){let t=Ge(e,l.value,x.value);if(!t)return;let n=V();if(A.value){if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(A.value),i=s.value&&r===n.length-1;if(i&&N.value){if(q(t)){let n=t===`next`?b.HOME:b.END;return R.trigger(new KeyboardEvent(`keydown`,{key:n,shiftKey:e.shiftKey}))}n=[]}else n=i?n.slice(0,1):n.slice(r+1)}ce(e,n[0])}if(n.length){let e=!A.value&&t===`prev`?n.length-1:0;H(n[e])}if(N.value)return R.trigger(e)}function ce(e,t){if(!N.value&&r.selectionBehavior===`replace`&&a.value&&Array.isArray(D.value)&&(!e.altKey&&!e.ctrlKey&&!e.metaKey||e.shiftKey)&&e.shiftKey){let n=h().filter(e=>e.ref.dataset.disabled!==``),r=n.find(e=>e.ref===t)?.value;if(e.key===b.END?r=n.at(-1)?.value:e.key===b.HOME&&(r=n[0]?.value),!r||!w.value)return;let i=ae(n.map(e=>e.value),w.value,r);D.value=i}}async function le(e,t=!0){if(xe){if(await P(),N.value)L.trigger({event:e,scroll:t});else{let e=V(),n=e.find(e=>e.dataset.state===`checked`),r=t?void 0:!1;n?H(n,t,r):e.length&&H(e[0],t,r)}}}let ue=!1;return c(D,()=>{if(!T.value){let e=ue;ue=!0,P(()=>{le(void 0,e)})}},{immediate:!0,deep:!0}),t({highlightedElement:A,highlightItem:ne,highlightFirstItem:ie,highlightSelected:le,getItems:h}),st({modelValue:D,onValueChange:O,multiple:a,orientation:l,dir:x,disabled:u,highlightOnHover:o,loop:s,highlightedElement:A,isVirtual:N,virtualFocusHook:L,virtualKeydownHook:R,virtualHighlightHook:te,by:r.by,firstValue:w,selectionBehavior:f,focusable:E,onLeave:oe,onEnter:K,changeHighlight:H,onKeydownEnter:U,onKeydownNavigation:se,onKeydownTypeAhead:W,onCompositionStart:G,onCompositionEnd:re,highlightFirstItem:ie}),(t,n)=>(k(),F(d(J),{ref_key:`primitiveElement`,ref:v,as:e.as,"as-child":e.asChild,dir:d(x),"data-disabled":d(u)?``:void 0,onPointerleave:oe,onFocusout:n[0]||=async e=>{let t=e.relatedTarget||e.target;await P(),A.value&&d(y)&&!d(y).contains(t)&&oe(e)}},{default:M(()=>[z(t.$slots,`default`,{modelValue:d(D)}),d(C)&&e.name?(k(),F(d(Re),{key:0,name:e.name,value:d(D),disabled:d(u),required:e.required},null,8,[`name`,`value`,`disabled`,`required`])):B(`v-if`,!0)]),_:3},8,[`as`,`as-child`,`dir`,`data-disabled`]))}}),Q=O({__name:`ListboxContent`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let{CollectionSlot:t}=me(),n=ot(),i=ve(!1,10);return(a,o)=>(k(),F(d(t),null,{default:M(()=>[r(d(J),{role:`listbox`,as:e.as,"as-child":e.asChild,tabindex:d(n).focusable.value?d(n).highlightedElement.value?`-1`:`0`:`-1`,"aria-orientation":d(n).orientation.value,"aria-multiselectable":!!d(n).multiple.value,"data-orientation":d(n).orientation.value,onMousedown:o[0]||=U(e=>i.value=!0,[`left`]),onFocus:o[1]||=e=>{d(i)||d(n).onEnter(e)},onKeydown:[o[2]||=H(e=>{(d(n).orientation.value!==`vertical`||e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)&&(d(n).orientation.value!==`horizontal`||e.key!==`ArrowUp`&&e.key!==`ArrowDown`)&&(e.preventDefault(),d(n).focusable.value&&d(n).onKeydownNavigation(e))},[`down`,`up`,`left`,`right`,`home`,`end`]),H(d(n).onKeydownEnter,[`enter`]),d(n).onKeydownTypeAhead]},{default:M(()=>[z(a.$slots,`default`)]),_:3},8,[`as`,`as-child`,`tabindex`,`aria-orientation`,`aria-multiselectable`,`data-orientation`,`onKeydown`])]),_:3}))}}),dt=O({__name:`ListboxFilter`,props:{modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`input`}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=Se(n,`modelValue`,t,{defaultValue:``,passive:n.modelValue===void 0}),i=ot(),{primitiveElement:a,currentElement:o}=fe(),c=T(()=>n.disabled||i.disabled.value||!1),l=I();s(()=>l.value=i.highlightedElement.value?.id),x(()=>{i.focusable.value=!1,setTimeout(()=>{n.autoFocus&&o.value?.focus()},1)}),w(()=>{i.focusable.value=!0});let{isComposing:u,shouldDeferInput:f,handleCompositionStart:p,handleCompositionUpdate:m,handleCompositionEnd:h}=Y(e=>{r.value=e.target.value,i.onCompositionEnd(),i.highlightFirstItem()});function g(){i.onCompositionStart(),p()}function _(e){f.value||(r.value=e.target.value,i.highlightFirstItem())}function v(e){u.value||(e.preventDefault(),i.onKeydownNavigation(e))}function y(e){u.value||i.onKeydownEnter(e)}return(t,n)=>(k(),F(d(J),{ref_key:`primitiveElement`,ref:a,as:e.as,"as-child":e.asChild,value:d(r),disabled:c.value?``:void 0,"data-disabled":c.value?``:void 0,"aria-disabled":c.value??void 0,"aria-activedescendant":l.value,type:`text`,onKeydown:[H(v,[`down`,`up`,`home`,`end`]),H(y,[`enter`])],onInput:_,onCompositionstart:g,onCompositionupdate:d(m),onCompositionend:d(h)},{default:M(()=>[z(t.$slots,`default`,{modelValue:d(r)})]),_:3},8,[`as`,`as-child`,`value`,`disabled`,`data-disabled`,`aria-disabled`,`aria-activedescendant`,`onCompositionupdate`,`onCompositionend`]))}}),[ft,pt]=K(`ListboxGroup`),mt=O({__name:`ListboxGroup`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,n=W(void 0,`reka-listbox-group`);return pt({id:n}),(e,r)=>(k(),F(d(J),C({role:`group`},t,{"aria-labelledby":d(n)}),{default:M(()=>[z(e.$slots,`default`)]),_:3},16,[`aria-labelledby`]))}}),ht=`listbox.select`,[gt,_t]=K(`ListboxItem`),vt=O({__name:`ListboxItem`,props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`}},emits:[`select`],setup(e,{emit:t}){let n=e,i=t,a=W(void 0,`reka-listbox-item`),{CollectionItem:o}=me(),{forwardRef:s,currentElement:c}=X(),l=ot(),u=T(()=>c.value!=null&&c.value===l.highlightedElement.value),f=T(()=>at(l.modelValue.value,n.value,l.by)),p=T(()=>l.disabled.value||n.disabled);async function m(e){i(`select`,e),!e?.defaultPrevented&&!p.value&&e&&(l.onValueChange(n.value),l.changeHighlight(c.value))}function g(e){let t={originalEvent:e,value:n.value};ge(ht,m,t)}return _t({isSelected:f}),(t,n)=>(k(),F(d(o),{value:e.value},{default:M(()=>[h([u.value,f.value,p.value,d(l).focusable.value,...Object.entries(t.$attrs).flat()],()=>r(d(J),C({id:d(a)},t.$attrs,{ref:d(s),role:`option`,tabindex:d(l).focusable.value?u.value?`0`:`-1`:-1,"aria-selected":f.value,as:e.as,"as-child":e.asChild,disabled:p.value?``:void 0,"data-disabled":p.value?``:void 0,"data-highlighted":u.value?``:void 0,"data-state":f.value?`checked`:`unchecked`,onClick:g,onKeydown:H(U(g,[`prevent`]),[`space`]),onPointermove:n[0]||=()=>{d(l).highlightedElement.value!==d(c)&&d(l).highlightOnHover.value&&d(l).changeHighlight(d(c),!1,!1)}}),{default:M(()=>[z(t.$slots,`default`,{selected:f.value})]),_:3},16,[`id`,`tabindex`,`aria-selected`,`as`,`as-child`,`disabled`,`data-disabled`,`data-highlighted`,`data-state`,`onKeydown`]),n,1)]),_:3},8,[`value`]))}}),yt=O({__name:`ListboxItemIndicator`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let{forwardRef:t}=X(),n=gt();return(i,a)=>(k(),F(d(We),{present:e.forceMount||d(n).isSelected.value},{default:M(()=>[r(d(J),{ref:d(t),"aria-hidden":`true`,"data-state":d(n).isSelected.value?`checked`:`unchecked`,as:e.as,"as-child":e.asChild},{default:M(()=>[z(i.$slots,`default`)]),_:3},8,[`data-state`,`as`,`as-child`])]),_:3},8,[`present`]))}});function bt(e){return typeof e==`object`?e.key:e}function xt(e,t){let n=e.length;return new Proxy(e,{get(e,r,i){if(typeof r==`string`){let i=r.charCodeAt(0);if(i>=48&&i<=57){let i=+r;if(Number.isInteger(i)&&i>=0&&i<n){let n=e[i];if(typeof n!=`object`){let r=t[i*2];n=e[i]={index:i,key:n,start:r,size:t[i*2+1],end:r+t[i*2+1],lane:0}}return n}}if(r===`length`)return n}return Reflect.get(e,r,i)}})}function St(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o=e();return(o.length!==r.length||o.some((e,t)=>r[t]!==e))&&(r=o,i=t(...o),n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1),i}return o.updateDeps=e=>{r=e},o}function Ct(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var wt=(e,t)=>Math.abs(e-t)<1.01,Tt=(e,t,n)=>{let r;return Object.assign(function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)},{cancel:()=>{e.clearTimeout(r)}})};function Et({offset:e,isScrolling:t,elementMax:n,holdOffset:r,scrollOffset:i,pendingWrite:a,clampedMaxAtWrite:o}){return t&&a===null&&e===i?`spurious`:a!==null&&Math.abs(e-a.target)<1.5?`readBack`:a!==null&&!a.smooth&&n!==null&&a.target>n+r+.5&&Math.abs(e-(n+r))<1.5||a!==null&&!a.smooth&&a.lowMaxes?.some(t=>Math.abs(e-t)<1.5)?`clampedReadBack`:o!==null&&Math.abs(e-o)<1.5?`clampedEcho`:`external`}var Dt=e=>e===`smooth`||e===`smoothFinishing`;function Ot({kind:e,offset:t,command:n,target:r}){return e!==`spurious`&&e!==`readBack`&&e!==`clampedReadBack`&&n?.index!=null&&n.phase!==`queued`&&!Dt(n.phase)&&!wt(t,n.lastTargetOffset)&&!wt(t,r())&&e!==`clampedEcho`}var kt=40;function At(e){let t=e[e.length-1];if(t===void 0)return!1;let n=e.length-2;for(;n>=0&&t.t-e[n].t<kt;)n--;if(n<0)return!1;let r=e[n],i=n-1;for(;i>=0&&r.t-e[i].t<kt;)i--;if(i<0)return!1;let a=e[i],o=(t.offset-r.offset)/(t.t-r.t),s=(r.offset-a.offset)/(r.t-a.t);return o*s>=0&&Math.abs(o)>=2*Math.abs(s)&&Math.abs(o)-Math.abs(s)>=.8}function jt(e){let t=e[e.length-1];if(t===void 0)return!1;let n=e.length-2;for(;n>=0&&t.t-e[n].t<kt;)n--;if(n<0)return!1;let r=e[n];return Math.abs(t.offset-r.offset)/(t.t-r.t)>=.05}var Mt,Nt=()=>{if(Mt!==void 0)return Mt;if(typeof navigator>`u`)return Mt=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Mt=!0;let e=navigator.maxTouchPoints;return Mt=navigator.platform===`MacIntel`&&e!==void 0&&e>0},Pt,Ft=()=>Pt===void 0?Pt=Nt()&&typeof CSS<`u`&&typeof CSS.supports==`function`&&CSS.supports(`overflow-anchor: auto`):Pt,It={capture:!0,passive:!0},Lt=class{constructor(e){this.host=e,this._touch=null,this.inMotion=()=>this._touch!==null&&this._touch.phase!==`lateFling`,this.dragging=()=>this._touch?.phase===`down`&&this._touch.moved,this.tail=()=>this._touch?.phase===`tail`?this._touch.moved?`fling`:`tap`:null,this.onScroll=({isScrolling:e,ownReadBack:t,moved:n,external:r})=>(e&&this._touch?.phase===`tail`?this._openTail(this._touch.moved||!t,!1):this._touch?.phase===`lateFling`&&(this.host.now()>this._touch.until?this._touch=null:r&&e&&n&&this._openTail(!0,!1)),!t&&e&&n&&this._touch?.phase===`down`?(this._touch.moved=!0,!0):!1),this.touchStart=()=>{this.end(),this._touch={phase:`down`,moved:!1}},this.touchEnd=()=>{let e=this._touch?.phase===`down`&&this._touch.moved;this.end(),this._openTail(e,e)},this.end=()=>{let e=this.host.getWindow();this._touch?.phase===`tail`&&e!=null&&e.clearTimeout(this._touch.timerId),this._touch=null},this.listen=e=>{let t=()=>this.touchStart(),n=()=>this.touchEnd();return e.addEventListener(`touchstart`,t,It),e.addEventListener(`touchend`,n,It),e.addEventListener(`touchcancel`,n,It),()=>{e.removeEventListener(`touchstart`,t,It),e.removeEventListener(`touchend`,n,It),e.removeEventListener(`touchcancel`,n,It),this.end()}},this._openTail=(e,t)=>{let n=this.host.getWindow();if(!Nt()||n==null)return;this.end();let r={phase:`tail`,moved:e,awaitingFling:t,timerId:n.setTimeout(()=>{this.host.tailStillMoving()?this._openTail(r.moved,r.awaitingFling):(this._touch=r.awaitingFling?{phase:`lateFling`,until:this.host.now()+1e3}:null,this.host.onTailClosed())},150)};this._touch=r}}get touch(){return this._touch}},Rt=e=>{let{clientWidth:t,clientHeight:n}=e;return{width:t,height:n}},zt=e=>{let t=new Set;return{schedule:n=>{let r=e.requestAnimationFrame(()=>{t.delete(r),n()});t.add(r)},cancel:()=>{t.forEach(t=>e.cancelAnimationFrame(t)),t.clear()}}},Bt=e=>e,Vt=e=>{let t=e.overscan*Math.max(e.lanes??1,1),n=Math.max(e.startIndex-t,0),r=Math.min(e.endIndex+t,e.count-1)-n+1,i=Array(r);for(let e=0;e<r;e++)i[e]=n+e;return i},Ht=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(Rt(n)),!r.ResizeObserver)return()=>{};let a=zt(r),o=new r.ResizeObserver(()=>{let t=()=>{i(Rt(n))};e.options.useAnimationFrameWithResizeObserver?a.schedule(t):t()});return o.observe(n,{box:`content-box`}),()=>{o.unobserve(n),a.cancel()}},Ut={passive:!0},Wt=typeof window>`u`||`onscrollend`in window,Gt=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&Wt,o=0,s=a?null:Tt(i,()=>t(n(r),!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),u=c(!1);return r.addEventListener(`scroll`,l,Ut),a&&r.addEventListener(`scrollend`,u,Ut),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u),s?.cancel()}},Kt=(e,t)=>Gt(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),qt=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(i!==void 0)return i}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},Jt=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:e+t,behavior:n})},Yt=(e,t)=>e===`smooth`?t?`smoothLanded`:`smooth`:`instant`,Xt=e=>e?.phase===`smooth`||e?.phase===`smoothLanded`;function Zt(e,t,n,r){if(t===0)return!1;let i=r(0),a=new Set,o=0;for(;o<e;){let e=n(o);if(e===i)break;a.add(e),o++}let s=e-o;if(s===0||s>=t)return!1;for(let e=0;e<s;e++)if(r(e)!==n(o+e))return!1;for(let e=s;e<t;e++)if(a.has(r(e)))return!1;return!0}var Qt=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this._holdOffset=0,this._reportedOverscroll=!1,this._iosGesture=new Lt({getWindow:()=>this.targetWindow,now:()=>this.now(),tailStillMoving:()=>{let e=this.scrollState;if(e?.phase!==`queued`||this.pendingWrite!==null)return!1;let t=this._readElementOffset();return t===null||this._lastElementOffset===null||Math.abs(t-this._lastElementOffset)<1?!1:(this._lastElementOffset=t,e.samples=[...e.samples??[],{t:this.now(),offset:t}],!0)},onTailClosed:()=>{let e=this.scrollState;e?.phase===`queued`&&jt(e.samples??[])&&(this.scrollState=null),this._flushHoldIfReady(!0),this._writeAwaitingCommand(),this._retryClampedAdjustment()}}),this._lastElementOffset=null,this.pendingWrite=null,this._clampedAdjustment=null,this.elementsCache=new Map,this._resizeBatch=null,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=null,n=()=>{if(e)return e;let n=this.targetWindow;if(!n||!n.ResizeObserver)return null;let i=t=zt(n);return e=new n.ResizeObserver(e=>{let t=()=>{let t={sync:!1};this._resizeBatch=t;try{e.forEach(r)}finally{this._resizeBatch=null,t.notify&&(this.notify(t.sync),this._noteClampMax(),this._flushHoldIfReady(!0),this._retryClampedAdjustment())}};this.options.useAnimationFrameWithResizeObserver?i.schedule(t):t()})},r=e=>{let t=e.target,n=this.indexFromElement(t);if(t.isConnected)this.isIndexInRange(n)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this));else{this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}}};return{disconnect:()=>{var r;(r=n())==null||r.disconnect(),t?.cancel(),e=null,t=null},observe:e=>n()?.observe(e,{box:`border-box`}),unobserve:e=>n()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{let t={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Bt,rangeExtractor:Vt,onChange:()=>{},measureElement:qt,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,anchorTo:`start`,followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,useCachedMeasurements:!1};for(let n in e){let r=e[n];r!==void 0&&(t[n]=r)}let n=this.options,r=null,i=null,a=!1;if(n!==void 0&&n.enabled&&t.enabled&&t.anchorTo===`end`&&this.scrollElement!==null){let e=n.count,o=t.count,s=this.getMeasurements(),c=this._singleLaneMeasurements?.items??s,l=e=>bt(c[e]),u=e>0?l(0):null,d=e>0?l(e-1):null;if(o!==e||e>0&&o>0&&(t.getItemKey(0)!==u||t.getItemKey(o-1)!==d)){a=!0;let c=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??s[0]:null;c&&(r=[c.key,this.getScrollOffset()-c.start]);let u=t.followOnAppend===!0?`auto`:t.followOnAppend||null;u&&o>0&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(o-1)!==d)&&(o>e||Zt(e,o,l,t.getItemKey))&&(i=u)}}this.options=t,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=null;if(r&&this.scrollOffset!==null&&!this._awaitingCommandReadBack()){let[e,t]=r,n=this.getMeasurements(),{count:a,getItemKey:s}=this.options,c=0;for(;c<a&&s(c)!==e;)c++;if(c<a){let e=n[c];if(e){let n=Math.max(0,e.start+t);!i&&n!==this.scrollOffset&&(o=n-this.scrollOffset,this.scrollOffset=n)}}}i?this.pendingScrollAnchor={kind:`follow`,behavior:i}:o!==null&&(this._canWriteScroll()?this.pendingScrollAnchor={kind:`anchor`,delta:o}:(this._holdOffset+=o,this._followOffsetTarget(o)))},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=St(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{var e;this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,(e=this._momentumStop)==null||e.restore(),this._momentumStop=null,this.isScrolling=!1,this.scrollDirection=null,this._holdOffset=0,this._reportedOverscroll=!1,this._clampedAdjustment=null,this.pendingWrite=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}this.scrollElement=e,this.targetWindow=this.scrollElement&&`ownerDocument`in this.scrollElement?this.scrollElement.ownerDocument.defaultView:this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{let n=t?this._elementMaxScrollOffset():null,r=this._reportedOverscroll;this._reportedOverscroll=e<0||n!==null&&e>n+1;let i=e;this._lastElementOffset=i,e=this._toLayoutOffset(e);let a=this._classifyScrollEvent(e,t,n);if(a===`spurious`)return;a===`readBack`?e=this.pendingWrite.target:a===`clampedReadBack`&&this.scrollState?.index!=null&&e<this.getMaxScrollOffset()-1.5?this.scrollState.lastTargetOffset=e:Ot({kind:a,offset:e,command:this.scrollState,target:()=>this.getScrollStateTarget(this.scrollState)})&&(this.scrollState=null),this.pendingWrite=null,this._clampedAdjustment!==null&&Math.abs(e-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null);let o=this.getScrollOffset(),s=this.scrollDirection;this.scrollDirection=t?o===e?this.scrollDirection:o<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t;let c=this.scrollState;if(c?.phase===`queued`&&a===`external`&&t){if(r||this._reportedOverscroll)c.samples=[];else{let e=this.now();c.samples=[...(c.samples??[]).filter(t=>e-t.t<=200),{t:e,offset:i}],(s!==null&&this.scrollDirection!==s||At(c.samples))&&(this.scrollState=null)}}this._iosGesture.onScroll({isScrolling:t,ownReadBack:a===`readBack`,moved:e!==o,external:a===`external`&&this.scrollState?.phase!==`smooth`&&this.scrollState?.phase!==`smoothFinishing`})&&this.scrollState?.phase===`queued`&&(this.scrollState=null),this._flushHoldIfReady(!0),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),`addEventListener`in this.scrollElement&&this.unsubs.push(this._iosGesture.listen(this.scrollElement)),this._scrollToOffset(this.getScrollOffset())}this._noteClampMax();let t=this.pendingScrollAnchor;this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled&&(t.kind===`anchor`?this._canWriteScroll()?Xt(this.scrollState)&&!wt(this.getScrollOffset()-t.delta,this.scrollState.lastTargetOffset)||(this._followOffsetTarget(t.delta),this._scrollToOffset(this.getScrollOffset())):(this._holdOffset+=t.delta,this._followOffsetTarget(t.delta),this.notify(!1)):this.scrollToEnd({behavior:t.behavior})),this._flushHoldIfReady(!1),this._retryClampedAdjustment()},this._classifyScrollEvent=(e,t,n)=>Et({offset:e,isScrolling:t,elementMax:n,holdOffset:this._holdOffset,scrollOffset:this.scrollOffset,pendingWrite:this.pendingWrite,clampedMaxAtWrite:this._clampedAdjustment?.maxAtWrite??null}),this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled||!this._canWriteScroll())return;let{target:e,maxAtWrite:t}=this._clampedAdjustment,n=this.getMaxScrollOffset();n>t+.5&&(this._clampedAdjustment=e>n+.5?{target:e,maxAtWrite:n}:null,this._scrollToOffset(e))},this._writeAwaitingCommand=()=>{let e=this.scrollState;if(e===null||e.phase!==`queued`)return;let{behavior:t}=e;this.getMeasurements();let n=this.getScrollStateTarget(e);e.lastTargetOffset=n,this._clampedAdjustment=null,e.phase=Yt(t,e.index!=null&&wt(n,this.getScrollOffset())),this._scrollToOffset(n,{behavior:t}),this.scheduleScrollReconcile()},this._readElementOffset=()=>{let e=this.scrollElement;if(e==null)return null;let{horizontal:t,isRtl:n}=this.options;return typeof e.scrollTop==`number`?t?e.scrollLeft*(n&&-1||1):e.scrollTop:typeof e.scrollY==`number`?t?e.scrollX:e.scrollY:null},this._canWriteScroll=()=>!(Nt()&&this._iosGesture.inMotion())&&!this._reportedOverscroll,this._flushHoldIfReady=e=>{if(this._holdOffset===0||!this.scrollElement||!this.options.enabled||!this._canWriteScroll()||this.scrollState?.phase===`smooth`)return;this._holdOffset=0,this.scrollOffset!==null&&this.scrollOffset<0&&(this.scrollOffset=0),this.notify(e);let t=this.getCommandWrittenOffset()??this.getScrollOffset();this._clampedAdjustment=this._clampedBy(t),this._scrollToOffset(t)},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=St(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,n,r,i,a,o,s)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s}),{key:!1}),this.isIndexInRange=e=>e>=0&&e<this.options.count,this.getMeasurements=St(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s},c)=>{let l=this.itemSizeCache;if(!i)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=e*2,a=this._singleLaneMeasurements?.flat;if(!a||a.length<i){let e=new Float64Array(i);a&&u>0&&e.set(a.subarray(0,u*2)),a=e}let o=u===0?Array(e):this._singleLaneMeasurements.items.slice(),c;if(u===0)c=t+n;else{let e=u-1;c=a[e*2]+a[e*2+1]+s}for(let t=u;t<e;t++){let e=r(t);o[t]=e;let n=l.get(e),i=typeof n==`number`?n:this.options.estimateSize(t);a[t*2]=c,a[t*2+1]=i,c+=i+s}this._singleLaneMeasurements={flat:a,items:o};let d=xt(o,a);return this.measurementsCache=d,d}let d=this.measurementsCache.slice(0,u),f=Array(a).fill(void 0),p=new Float64Array(a),m=0;for(let e=0;e<u;e++){let t=d[e];t&&(f[t.lane]===void 0&&m++,f[t.lane]=e,p[t.lane]=t.end)}for(let i=u;i<e;i++){let e=r(i),c=this.laneAssignments.get(i),u,h,g=o===`estimate`||l.has(e);if(c!==void 0&&this.options.lanes>1){u=c;let e=f[u],r=e===void 0?void 0:d[e];h=r?r.end+s:t+n}else if(m===a){let e=0,t=p[0],n=f[0];for(let r=1;r<a;r++){let i=p[r];(i<t||i===t&&f[r]<n)&&(e=r,t=i,n=f[r])}u=e,h=t+s,g&&this.laneAssignments.set(i,u)}else u=i%this.options.lanes,h=t+n,g&&this.laneAssignments.set(i,u);let _=l.get(e),v=typeof _==`number`?_:this.options.estimateSize(i),y=h+v;d[i]={index:i,start:h,size:v,end:y,key:e,lane:u},f[u]===void 0&&m++,f[u]=i,p[u]=y}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=St(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>e.length===0||t===0?(this.range=null,null):(this.range=tn(e,t,n,r,r===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=St(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t,this.options.lanes]},(e,t,n,r,i,a)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n,lanes:a}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!Xt(this.scrollState))return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e);if(!this.isIndexInRange(t))return;let n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),e.isConnected&&(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var n;if(!this.isIndexInRange(e))return;this._resizeBatch?.sync&&this.getMeasurements();let r,i,a,o=this._singleLaneMeasurements?.flat;if(this.options.lanes===1&&o!=null)a=this.options.getItemKey(e),i=o[e*2],r=o[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;a=t.key,i=t.start,r=t.size}let s=this.itemSizeCache.get(a)??r,c=t-s;if(c!==0){let o=this.options.anchorTo===`end`&&!Xt(this.scrollState)&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,l=o?this._getLayoutTotalSize():0,u=this.getScrollOffset(),d=this.itemSizeCache.has(a)?i+s<=u&&this.scrollDirection!==`backward`:i<u,f=!Xt(this.scrollState)&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?d:this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:a,start:i,size:r,end:i+r,lane:0},c,this));(this.pendingMin===null||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(a,t),this.itemSizeCacheVersion++;let p=!1;if(this._awaitingCommandReadBack()||(o?p=this.applyScrollAdjustment(this._getLayoutTotalSize()-l):f&&(p=this.applyScrollAdjustment(c))),this._resizeBatch){this._resizeBatch.notify=!0,(n=this._resizeBatch).sync||(n.sync=p);return}this.notify(p),this._noteClampMax(),this._flushHoldIfReady(!0),this._retryClampedAdjustment()}},this.getVirtualItems=St(()=>[this.getVirtualIndexes(),this.getMeasurements(),this._holdOffset],(e,t,n)=>{let r=[];for(let i=0,a=e.length;i<a;i++){let a=t[e[i]];r.push(n===0?a:{...a,start:a.start-n,end:a.end-n})}return r},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._singleLaneMeasurements?.flat,r=this.options.lanes===1&&n!=null;return Ct(t[$t(0,t.length-1,r?e=>n[e*2]:e=>Ct(t[e]).start,e)])},this._noteClampMax=()=>{if(!this._awaitingCommandReadBack())return;let e=this._elementMaxScrollOffset();if(e===null)return;let t=this.pendingWrite,n=Math.max(e,0)+this._holdOffset;if(n>=t.target)return;let r=t.lowMaxes??=[];r[r.length-1]!==n&&r.push(n)},this.getMaxScrollOffset=()=>(this._elementMaxScrollOffset()??0)+this._holdOffset,this._toLayoutOffset=e=>{let t=e+this._holdOffset;return this.pendingScrollAnchor?.kind===`anchor`&&(t+=this.pendingScrollAnchor.delta),t},this._elementMaxScrollOffset=()=>{let e=this.scrollElement;if(e===null)return null;if(`scrollHeight`in e)return this.options.horizontal?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight;if(`document`in e){let t=e.document.documentElement;return this.options.horizontal?t.scrollWidth-e.innerWidth:t.scrollHeight-e.innerHeight}return null},this._momentumStop=null,this._stopMomentum=e=>{let t=this.scrollElement,n=this.targetWindow;if(t===null||n===null)return;let r=`document`in t?t.document.scrollingElement:t;if(!r?.style)return;if(this._momentumStop){this._momentumStop.done=e;return}let{style:i}=r,a=this.options.horizontal?`overflow-x`:`overflow-y`,o=i.getPropertyValue(a),s=i.getPropertyPriority(a);i.setProperty(a,`hidden`,`important`);let c={restore:()=>i.getPropertyValue(a)!==`hidden`||i.getPropertyPriority(a)!==`important`?!1:(i.setProperty(a,o,s),!0),done:e};this._momentumStop=c,n.requestAnimationFrame(()=>n.requestAnimationFrame(()=>{this._momentumStop===c&&(this._momentumStop=null,c.restore()&&c.done())}))},this._clampedBy=e=>{let t=this._elementMaxScrollOffset();if(t===null)return null;let n=t+this._holdOffset;return e>n+.5?{target:e,maxAtWrite:n}:null},this.getVirtualDistanceFromEnd=()=>Math.max(this._getLayoutTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`){if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t]}if(t===`end`&&e===this.options.count-1){let e=this.getMaxScrollOffset(),n=e-this.options.paddingEnd+this.options.scrollPaddingEnd;return[Math.max(Math.min(n,e),0),t]}let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{this._startScroll({index:null,align:t},this.getOffsetForAlignment(e,t),n,`absolute`)},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r;this._startScroll({index:e,align:a},i,n,`absolute`)},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getOffsetForAlignment((this.getCommandWrittenOffset()??this.getScrollOffset())+e,`start`);this._startScroll({index:null,align:`start`},n,t,`relative`)},this.scrollToEnd=({behavior:e=`auto`}={})=>{this.options.count>0?this._startScroll({index:this.options.count-1,align:`end`,toEnd:!0},Math.max(this.getMaxScrollOffset(),0),e,`absolute`):this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.cancelScroll=()=>{this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null},this.getTotalSize=()=>Math.max(this._getLayoutTotalSize()-this._holdOffset,0),this._getLayoutTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._singleLaneMeasurements?.flat;t=r==null?e[n]?.end??0:r[n*2]+r[n*2+1]}else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(this.itemSizeCache.size===0)return e;let t=this.getMeasurements();for(let n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n}={})=>{let r={target:e+(t??0),smooth:n===`smooth`};return this.pendingWrite=r,this.options.scrollToFn(e-this._holdOffset,{behavior:n,adjustments:t},this),r},this.getCommandWrittenOffset=()=>this.scrollState!==null&&this.pendingWrite!==null&&!this.pendingWrite.smooth?this.pendingWrite.target:null,this._awaitingCommandReadBack=()=>{let e=this.getCommandWrittenOffset();return!(Nt()&&this._iosGesture.dragging())&&e!==null&&!wt(e,this.getScrollOffset())},this._followOffsetTarget=e=>{this.scrollState!==null&&this.scrollState.index==null&&(this.scrollState.lastTargetOffset+=e)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}get scrollAdjustments(){return 0}applyScrollAdjustment(e,t){if(e===0)return!1;if(this._followOffsetTarget(e),this._canWriteScroll()){let n=this.getScrollOffset();this._clampedAdjustment=this._clampedBy(n+e);let r=this._scrollToOffset(n,{adjustments:e,behavior:t});return this.scrollOffset!==null&&(this.pendingWrite===r&&(this.scrollOffset+=e),this.scrollOffset<0&&(this.scrollOffset=0)),!0}return this._holdOffset+=e,this.scrollOffset!==null&&(this.scrollOffset+=e),!0}scheduleScrollReconcile(){this.targetWindow?this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}):this.scrollState=null}getScrollStateTarget(e){let t=e.toEnd?[Math.max(this.getMaxScrollOffset(),0)]:e.index==null?void 0:this.getOffsetForIndex(e.index,e.align);return t?t[0]:e.lastTargetOffset}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}if(this.scrollState.phase===`queued`){this.scheduleScrollReconcile();return}this.getMeasurements();let e=this.getScrollStateTarget(this.scrollState),t=this.scrollState.index==null?1:this.options.useAnimationFrameWithResizeObserver?3:2,n=e!==this.scrollState.lastTargetOffset;if(!n&&wt(e,this.getScrollOffset())){if(this.scrollState.phase===`smooth`?this.scrollState.phase=`smoothLanded`:this.scrollState.phase===`smoothFinishing`&&(this.scrollState.phase=`instant`),this.scrollState.stableFrames++,this.scrollState.stableFrames>=t){this.getScrollOffset()!==e&&this._scrollToOffset(e,{behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let t=this.getSize()||600,n=Math.abs(e-this.getScrollOffset()),r=Xt(this.scrollState)&&n>t;this.scrollState.lastTargetOffset=e,r?this.scrollState.phase=`smooth`:this.scrollState.phase===`smooth`?this.scrollState.phase=`smoothFinishing`:this.scrollState.phase===`smoothLanded`&&(this.scrollState.phase=`instant`),this._scrollToOffset(e,{behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}_startScroll(e,t,n,r){this.pendingScrollAnchor=null,this._clampedAdjustment=null;let i=this._iosGesture.tail();if(r===`absolute`&&i!==null){if(i===`fling`&&Ft()){this._stopMomentum(()=>{this.scrollState?.phase!==`queued`||this._iosGesture.tail()!==`fling`||this._reportedOverscroll||(this._iosGesture.end(),this._flushHoldIfReady(!0),this._writeAwaitingCommand())}),this.scrollState={...e,startedAt:this.now(),lastTargetOffset:t,stableFrames:0,phase:`queued`,behavior:n,samples:[]},this.scheduleScrollReconcile();return}this._iosGesture.end()}this.scrollState={...e,startedAt:this.now(),lastTargetOffset:t,stableFrames:0,behavior:n,phase:Yt(n,e.index!=null&&wt(t,this.getScrollOffset()))},this._scrollToOffset(t,{behavior:n}),this.scheduleScrollReconcile()}},$t=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function en(e,t,n){let r=0;for(;r<=t;){let i=(r+t)/2|0,a=e[i*2];if(a<n)r=i+1;else if(a>n)t=i-1;else return i}return r>0?r-1:0}function tn(e,t,n,r,i){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};if(r===1&&i!==null){let e=en(i,a,n),r=e,o=n+t;for(;r<a&&i[r*2]+i[r*2+1]<o;)r++;return{startIndex:e,endIndex:r}}let o=$t(0,a,t=>e[t].start,n),s=o;if(r===1)for(;s<a&&e[s].end<n+t;)s++;else if(r>1){let i=Array(r).fill(0);for(;s<a&&i.some(e=>e<n+t);){let t=e[s];i[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(a,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}function nn(e){let t=new Qt(d(e)),n=te(t),r=t._didMount();return c(()=>d(e).getScrollElement(),e=>{e&&t._willUpdate()},{immediate:!0}),c(()=>d(e),e=>{t.setOptions({...e,onChange:(t,r)=>{var a;i(n),(a=e.onChange)==null||a.call(e,t,r)}}),t._willUpdate(),i(n)},{immediate:!0}),j(r),n}function rn(e){return nn(T(()=>({observeElementRect:Ht,observeElementOffset:Kt,scrollToFn:Jt,...d(e)})))}var an=O({__name:`ListboxVirtualizer`,props:{options:{type:Array,required:!0},overscan:{type:Number,required:!1},estimateSize:{type:[Number,Function],required:!1},textContent:{type:Function,required:!1}},setup(e){let t=e,n=u(),r=ot(),i=we(),{getItems:a}=me();r.isVirtual.value=!0;let o=T(()=>{let e=i.value;if(e){let t=window.getComputedStyle(e);return{start:Number.parseFloat(t.paddingBlockStart||t.paddingTop),end:Number.parseFloat(t.paddingBlockEnd||t.paddingBottom)}}return{start:0,end:0}}),s=rn({get scrollPaddingStart(){return o.value.start},get scrollPaddingEnd(){return o.value.end},get count(){return t.options.length},get horizontal(){return r.orientation.value===`horizontal`},estimateSize(e){return typeof t.estimateSize==`function`?t.estimateSize(e):t.estimateSize??28},getScrollElement(){return i.value},overscan:t.overscan??12}),c=T(()=>s.value.getVirtualItems().map(e=>{let r=n.default({option:t.options[e.index],virtualizer:s.value,virtualItem:e})[0],i=r.type===A&&Array.isArray(r.children)?r.children.find(e=>typeof e.type!=`symbol`):r;return{item:e,is:E(i,{key:`${e.key}`,"data-index":e.index,"aria-setsize":t.options.length,"aria-posinset":e.index+1,style:{position:`absolute`,top:0,left:0,transform:`translateY(${e.start}px)`,overflowAnchor:`none`}})}}));r.virtualFocusHook.on(({event:e,scroll:n})=>{let o=t.options.findIndex(e=>Array.isArray(r.modelValue.value)?Z(e,r.modelValue.value[0],r.by):Z(e,r.modelValue.value,r.by));o===-1?n?r.highlightFirstItem():requestAnimationFrame(()=>{let e=a().find(e=>e.ref.dataset.disabled!==``)?.ref;e&&r.changeHighlight(e,!1,!1)}):(e?.preventDefault(),s.value.scrollToIndex(o,{align:`start`}),requestAnimationFrame(()=>{let t=it(i.value);if(t){let i=e?!0:n?void 0:!1;r.changeHighlight(t,n,i)}}))}),r.virtualHighlightHook.on(e=>{let n=t.options.findIndex(t=>Z(t,e,r.by));s.value.scrollToIndex(n,{align:`start`}),requestAnimationFrame(()=>{let e=it(i.value);e&&r.changeHighlight(e)})});let l=ve(``,1e3),f=T(()=>{let e=e=>t.textContent?t.textContent(e):e?.toString().toLowerCase();return t.options.map((t,n)=>({index:n,textContent:e(t)}))});function p(e,n){if(!r.firstValue?.value||!r.multiple.value||!Array.isArray(r.modelValue.value))return;let i=a().filter(e=>e.ref.dataset.disabled!==``).find(e=>e.ref===r.highlightedElement.value)?.value;if(!i)return;let o=null;switch(n){case`prev`:case`next`:o=ae(t.options,r.firstValue.value,i);break;case`first`:o=ae(t.options,r.firstValue.value,t.options?.[0]);break;case`last`:o=ae(t.options,r.firstValue.value,t.options.at(-1))}r.modelValue.value=o}return r.virtualKeydownHook.on(e=>{let n=e.altKey||e.ctrlKey||e.metaKey;if(e.key===`Tab`&&!n)return;let o=Ke[e.key];if(n&&e.key===`a`&&r.multiple.value?(e.preventDefault(),r.modelValue.value=[...t.options],o=`last`):e.shiftKey&&o&&p(e,o),[`first`,`last`].includes(o)){e.preventDefault();let n=o===`first`?0:t.options.length-1;s.value.scrollToIndex(n),requestAnimationFrame(()=>{let e=a(),t=o===`first`?e[0]:e.at(-1);t&&r.changeHighlight(t.ref)})}else if(!o&&!n){l.value+=e.key;let t=Number(pe()?.getAttribute(`data-index`)),n=f.value[t].textContent,a=f.value.map(e=>e.textContent??``),o=_e(a,l.value,n),c=f.value.find(e=>e.textContent===o);c&&(s.value.scrollToIndex(c.index,{align:`start`}),requestAnimationFrame(()=>{let e=i.value.querySelector(`[data-index="${c.index}"]`);e instanceof HTMLElement&&r.changeHighlight(e)}))}}),(e,t)=>(k(),y(`div`,{"data-reka-virtualizer":``,style:S({position:`relative`,width:`100%`,height:`${d(s).getTotalSize()}px`})},[(k(!0),y(A,null,b(c.value,({is:e,item:t})=>(k(),F(R(e),{key:t.index}))),128))],4))}});function on(e){let t=I(`inline`),n=I(!1),r=I(),i=T(()=>t.value===`popper`&&!n.value),a;lt({suppressHighlightScroll:i,onHighlightScrollRequest(e){a=e}});function o(e,i){(r.value!==e||t.value!==i)&&(n.value=!1,a=void 0),r.value=e,t.value=i}function s(i){if(r.value!==i||t.value!==`popper`||n.value)return;n.value=!0;let o=a;a=void 0,e.value&&o?.()}function c(e){r.value===e&&(r.value=void 0,t.value=`inline`,n.value=!1,a=void 0)}return{onContentPositionChange:o,onContentPlaced:s,onContentUnmount:c}}var[$,sn]=K(`ComboboxRoot`),cn=O({__name:`ComboboxRoot`,props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},resetSearchTermOnBlur:{type:Boolean,required:!1,default:!0},resetSearchTermOnSelect:{type:Boolean,required:!1,default:!0},openOnFocus:{type:Boolean,required:!1,default:!1},openOnClick:{type:Boolean,required:!1,default:!1},ignoreFilter:{type:Boolean,required:!1},resetModelValueOnClear:{type:Boolean,required:!1,default:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},highlightOnHover:{type:Boolean,required:!1,default:!0},loop:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`,`highlight`,`update:open`],setup(e,{expose:t,emit:n}){let i=e,a=n,{primitiveElement:o,currentElement:s}=fe(),{multiple:c,disabled:u,ignoreFilter:f,resetSearchTermOnSelect:p,openOnFocus:h,openOnClick:g,dir:_,resetModelValueOnClear:v,highlightOnHover:y,loop:b,unmountOnHide:S}=m(i),w=Ve(_),E=Se(i,`modelValue`,a,{defaultValue:i.defaultValue??(c.value?[]:void 0),passive:i.modelValue===void 0,deep:!0}),D=Se(i,`open`,a,{defaultValue:i.defaultOpen,passive:i.open===void 0});async function O(e){D.value=e,U.value=``,e?(await P(),o.value?.highlightSelected(),j.value=!0,L.value?.focus()):(j.value=!1,setTimeout(()=>{!e&&i.resetSearchTermOnBlur&&A.trigger()},1))}let A=be(),j=I(!1),N=I(!1),L=I(),R=I(),te=T(()=>o.value?.highlightedElement??void 0),B=on(D),V=I(new Map),H=I(new Map),{contains:ne}=Oe({sensitivity:`base`}),U=I(``),W=T(e=>{if(!U.value||i.ignoreFilter||N.value)return{count:V.value.size,items:e?.items??new Map,groups:e?.groups??new Set(H.value.keys())};let t=0,n=new Map,r=new Set;for(let[e,r]of V.value){let i=ne(r,U.value);n.set(e,+!!i),i&&t++}for(let[e,t]of H.value)for(let i of t)if(n.get(i)>0){r.add(e);break}return{count:t,items:n,groups:r}}),G=l();return x(()=>{G?.exposed&&(G.exposed.highlightItem=o.value?.highlightItem,G.exposed.highlightFirstItem=o.value?.highlightFirstItem,G.exposed.highlightSelected=o.value?.highlightSelected)}),t({filtered:W,highlightedElement:te,highlightItem:o.value?.highlightItem,highlightFirstItem:o.value?.highlightFirstItem,highlightSelected:o.value?.highlightSelected}),sn({modelValue:E,multiple:c,disabled:u,open:D,onOpenChange:O,...B,contentId:``,isUserInputted:j,isVirtual:N,inputElement:L,highlightedElement:te,onInputElementChange:e=>L.value=e,triggerElement:R,onTriggerElementChange:e=>R.value=e,parentElement:s,resetSearchTermOnSelect:p,onResetSearchTerm:A.on,allItems:V,allGroups:H,filterSearch:U,filterState:W,ignoreFilter:f,openOnFocus:h,openOnClick:g,resetModelValueOnClear:v,unmountOnHide:S}),(t,n)=>(k(),F(d(Ne),null,{default:M(()=>[r(d(ut),C({ref_key:`primitiveElement`,ref:o},t.$attrs,{modelValue:d(E),"onUpdate:modelValue":n[0]||=e=>ee(E)?E.value=e:null,style:{pointerEvents:d(D)?`auto`:void 0},as:e.as,"as-child":e.asChild,dir:d(w),multiple:d(c),name:e.name,required:e.required,disabled:d(u),"highlight-on-hover":d(y),loop:d(b),by:i.by,onHighlight:n[1]||=e=>a(`highlight`,e)}),{default:M(()=>[z(t.$slots,`default`,{open:d(D),modelValue:d(E)})]),_:3},16,[`modelValue`,`style`,`as`,`as-child`,`dir`,`multiple`,`name`,`required`,`disabled`,`highlight-on-hover`,`loop`,`by`])]),_:3}))}}),ln=O({__name:`ComboboxAnchor`,props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let{forwardRef:t}=X();return(n,i)=>(k(),F(d(ke),{"as-child":``,reference:e.reference},{default:M(()=>[r(d(J),C({ref:d(t),"as-child":e.asChild,as:e.as},n.$attrs),{default:M(()=>[z(n.$slots,`default`)]),_:3},16,[`as-child`,`as`])]),_:3},8,[`reference`]))}}),[un,dn]=K(`ComboboxContent`),fn=O({__name:`ComboboxContentImpl`,props:{position:{type:String,required:!1,default:`inline`},bodyLock:{type:Boolean,required:!1},hideWhenEmpty:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},present:{type:Boolean,required:!1,default:!0}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`],setup(e,{emit:t}){let n=e,i=t,{position:a}=m(n),o=$(),s=Symbol(`ComboboxContent`);c(a,e=>o.onContentPositionChange(s,e),{immediate:!0});let l=T(()=>o.ignoreFilter.value?o.allItems.value.size===0:o.filterState.value.count===0),{forwardRef:u,currentElement:f}=X(),p=Te(n.present&&n.bodyLock);c([()=>n.present,()=>n.bodyLock],([e,t])=>p.value=e&&t),Be();let h=T(()=>n.present?o.parentElement.value:void 0);je(h);let g=T(()=>{if(n.position===`popper`){let{present:e,...t}=n;return t}return{}}),_=Ue(g),v={boxSizing:`border-box`,"--reka-combobox-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-combobox-content-available-width":`var(--reka-popper-available-width)`,"--reka-combobox-content-available-height":`var(--reka-popper-available-height)`,"--reka-combobox-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-combobox-trigger-height":`var(--reka-popper-anchor-height)`};dn({position:a});let y=I(!1);x(()=>{o.inputElement.value&&(y.value=f.value.contains(o.inputElement.value),n.present&&y.value&&o.inputElement.value.focus())}),c(()=>n.present,async(e,t)=>{if(e||!t)return;let n=pe();n&&f.value.contains(n)&&(await P(),o.triggerElement.value?.focus())}),w(()=>{o.onContentUnmount(s);let e=pe();y.value&&(!e||e===document.body)&&o.triggerElement.value?.focus()});function b(e){if(o.parentElement.value?.contains(e))return!0;let t=(e instanceof Element?e.closest(`label`):null)?.control;return!!t&&!!o.parentElement.value?.contains(t)}let S={placed:()=>o.onContentPlaced(s)};return(t,s)=>(k(),F(d(Q),{"as-child":``},{default:M(()=>[r(d(Ae),{"as-child":``,present:n.present,onMountAutoFocus:s[5]||=U(()=>{},[`prevent`]),onUnmountAutoFocus:s[6]||=U(()=>{},[`prevent`])},{default:M(()=>[r(d(Pe),{"as-child":``,present:n.present,"disable-outside-pointer-events":e.disableOutsidePointerEvents,onDismiss:s[0]||=e=>d(o).onOpenChange(!1),onFocusOutside:s[1]||=e=>{b(e.target)&&e.preventDefault(),i(`focusOutside`,e)},onInteractOutside:s[2]||=e=>i(`interactOutside`,e),onEscapeKeyDown:s[3]||=e=>i(`escapeKeyDown`,e),onPointerDownOutside:s[4]||=e=>{b(e.target)&&e.preventDefault(),i(`pointerDownOutside`,e)}},{default:M(()=>[(k(),F(R(d(a)===`popper`?d(Ie):d(J)),C({...t.$attrs,...d(_)},{id:d(o).contentId,ref:d(u),"memo-dependencies":d(a)===`popper`?[d(o).filterSearch.value,d(o).filterState.value]:void 0,"data-state":d(o).open.value?`open`:`closed`,"data-empty":l.value?``:void 0,style:{display:n.hideWhenEmpty&&l.value?`none`:`flex`,flexDirection:`column`,outline:`none`,...d(a)===`popper`?v:{}}},D(d(a)===`popper`?S:{})),{default:M(()=>[z(t.$slots,`default`)]),_:3},16,[`id`,`memo-dependencies`,`data-state`,`data-empty`,`style`]))]),_:3},8,[`present`,`disable-outside-pointer-events`])]),_:3},8,[`present`])]),_:3}))}}),pn=O({__name:`ComboboxArrow`,props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`svg`}},setup(e){let n=e,r=$(),i=un();return X(),(e,a)=>d(r).open.value&&d(i).position.value===`popper`?(k(),F(d(De),t(C({key:0},n)),{default:M(()=>[z(e.$slots,`default`)]),_:3},16)):B(`v-if`,!0)}}),mn=O({__name:`ComboboxCancel`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;X();let n=$();function r(){n.inputElement.value&&(n.inputElement.value.value=``,n.inputElement.value.focus()),n.resetModelValueOnClear?.value&&(n.modelValue.value=n.multiple.value?[]:null),n.filterSearch.value=``}return(n,i)=>(k(),F(d(J),C({type:e.as===`button`?`button`:void 0},t,{tabindex:`-1`,onClick:r}),{default:M(()=>[z(n.$slots,`default`)]),_:3},16,[`type`]))}}),hn=O({__name:`ComboboxContent`,props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},hideWhenEmpty:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`],setup(e,{emit:t}){let n=Ee(e,t),{forwardRef:i}=X(),a=$();return a.contentId||=W(void 0,`reka-combobox-content`),(t,o)=>(k(),F(d(We),{present:e.forceMount||d(a).open.value,"force-mount":e.forceMount||!d(a).unmountOnHide.value},{default:M(({present:e})=>[g(r(fn,C({...d(n),...t.$attrs},{ref:d(i),present:d(a).unmountOnHide.value||e}),{default:M(()=>[z(t.$slots,`default`)]),_:3},16,[`present`]),[[ne,d(a).unmountOnHide.value||e]])]),_:3},8,[`present`,`force-mount`]))}}),gn=O({__name:`ComboboxEmpty`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let n=e,r=$(),i=T(()=>r.ignoreFilter.value?r.allItems.value.size===0:r.filterState.value.count===0);return(e,r)=>i.value?(k(),F(d(J),t(C({key:0},n)),{default:M(()=>[z(e.$slots,`default`,{},()=>[r[0]||=a(`No options`,-1)])]),_:3},16)):B(`v-if`,!0)}}),[_n,vn]=K(`ComboboxGroup`),yn=O({__name:`ComboboxGroup`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,n=W(void 0,`reka-combobox-group`),r=$(),i=T(()=>r.ignoreFilter.value?!0:!r.filterSearch.value||r.filterState.value.groups.has(n)),a=vn({id:n,labelId:``});return x(()=>{r.allGroups.value.has(n)||r.allGroups.value.set(n,new Set)}),w(()=>{r.allGroups.value.delete(n)}),(e,r)=>(k(),F(d(mt),C({id:d(n),"aria-labelledby":d(a).labelId},t,{hidden:!i.value||void 0}),{default:M(()=>[z(e.$slots,`default`)]),_:3},16,[`id`,`aria-labelledby`,`hidden`]))}}),bn=O({__name:`ComboboxInput`,props:{displayValue:{type:Function,required:!1},modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`input`}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,i=$(),a=ot(),{primitiveElement:o,currentElement:s}=fe(),l=Se(n,`modelValue`,r,{passive:n.modelValue===void 0});x(()=>{s.value&&i.onInputElementChange(s.value)});let{isComposing:u,shouldDeferInput:f,handleCompositionStart:p,handleCompositionUpdate:m,handleCompositionEnd:h}=Y(e=>{let t=e.target;t&&_(t.value)});function g(e){u.value||(e.preventDefault(),i.open.value||i.onOpenChange(!0))}function _(e){i.open.value?i.filterSearch.value=e:(i.onOpenChange(!0),P(()=>{e&&(i.filterSearch.value=e,a.highlightFirstItem())}))}function v(e){f.value||_(e.target.value)}function y(){i.openOnFocus.value&&!i.open.value&&i.onOpenChange(!0)}function b(e){if(!i.open.value)return;let t=e.relatedTarget;if(!t)return;let n=i.parentElement.value?.contains(t),r=document.getElementById(i.contentId)?.contains(t);!n&&!r&&requestAnimationFrame(()=>{if(!i.open.value)return;let e=document.activeElement;!i.parentElement.value?.contains(e)&&!document.getElementById(i.contentId)?.contains(e)&&i.onOpenChange(!1)})}function S(){i.openOnClick.value&&!i.open.value&&i.onOpenChange(!0)}function C(){let e=i.modelValue.value;n.displayValue?l.value=n.displayValue(e):!i.multiple.value&&e&&!Array.isArray(e)?typeof e==`object`?l.value=``:l.value=e.toString():l.value=``,P(()=>{l.value=l.value})}return i.onResetSearchTerm(()=>{C()}),c(i.modelValue,async()=>{!i.isUserInputted.value&&i.resetSearchTermOnSelect.value&&C()},{immediate:!0,deep:!0}),c(i.filterState,(e,t)=>{!i.isVirtual.value&&t.count===0&&a.highlightFirstItem()}),(t,n)=>(k(),F(d(dt),{ref_key:`primitiveElement`,ref:o,modelValue:d(l),"onUpdate:modelValue":n[0]||=e=>ee(l)?l.value=e:null,as:e.as,"as-child":e.asChild,"auto-focus":e.autoFocus,disabled:e.disabled,"aria-expanded":d(i).open.value,"aria-controls":d(i).contentId,"aria-autocomplete":`list`,role:`combobox`,autocomplete:`off`,onClick:S,onInput:v,onKeydown:H(g,[`down`,`up`]),onFocus:y,onBlur:b,onCompositionstart:d(p),onCompositionupdate:d(m),onCompositionend:d(h)},{default:M(()=>[z(t.$slots,`default`)]),_:3},8,[`modelValue`,`as`,`as-child`,`auto-focus`,`disabled`,`aria-expanded`,`aria-controls`,`onCompositionstart`,`onCompositionupdate`,`onCompositionend`]))}}),xn=O({__name:`ComboboxItem`,props:{textValue:{type:String,required:!1},value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(e,{emit:n}){let r=e,i=n,o=W(void 0,`reka-combobox-item`),s=$(),c=_n(null),{primitiveElement:l,currentElement:u}=fe();if(r.value===``)throw Error(`A <ComboboxItem /> must have a value prop that is not an empty string. This is because the Combobox value can be set to an empty string to clear the selection and show the placeholder.`);let f=T(()=>{if(s.isVirtual.value||s.ignoreFilter.value||!s.filterSearch.value)return!0;{let e=s.filterState.value.items.get(o);return e===void 0||e>0}});return x(()=>{s.allItems.value.set(o,r.textValue||u.value.textContent||u.value.innerText);let e=c?.id;e&&(s.allGroups.value.has(e)?s.allGroups.value.get(e)?.add(o):s.allGroups.value.set(e,new Set([o])))}),w(()=>{s.allItems.value.delete(o)}),(n,c)=>f.value?h([f.value,d(s).filterSearch.value,d(s).disabled.value,e.disabled,r.value,r.as,r.asChild,...Object.values(n.$attrs)],()=>(k(),F(d(vt),C({key:0},r,{id:d(o),ref_key:`primitiveElement`,ref:l,disabled:d(s).disabled.value||e.disabled,onSelect:c[0]||=t=>{i(`select`,t),!t.defaultPrevented&&(!d(s).multiple.value&&!e.disabled&&!d(s).disabled.value?(t.preventDefault(),d(s).onOpenChange(!1),d(s).modelValue.value=r.value):d(s).multiple.value&&d(s).inputElement.value?.focus())}}),{default:M(r=>[z(n.$slots,`default`,t(V(r)),()=>[a(N(e.value),1)])]),_:3},16,[`id`,`disabled`])),c,1):B(`v-if`,!0)}}),Sn=O({__name:`ComboboxItemIndicator`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let n=e;return(e,r)=>(k(),F(d(yt),t(V(n)),{default:M(()=>[z(e.$slots,`default`)]),_:3},16))}}),Cn=O({__name:`ComboboxLabel`,props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`}},setup(e){let t=e;X();let n=_n({id:``,labelId:``});return n.labelId||=W(void 0,`reka-combobox-group-label`),(e,r)=>(k(),F(d(J),C(t,{id:d(n).labelId}),{default:M(()=>[z(e.$slots,`default`)]),_:3},16,[`id`]))}}),wn=O({__name:`ComboboxPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let n=e;return(e,r)=>(k(),F(d(tt),t(V(n)),{default:M(()=>[z(e.$slots,`default`)]),_:3},16))}}),Tn=O({__name:`ComboboxSeparator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return X(),(e,n)=>(k(),F(d(J),C(t,{"aria-hidden":`true`}),{default:M(()=>[z(e.$slots,`default`)]),_:3},16))}}),En=O({__name:`ComboboxTrigger`,props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,{forwardRef:n,currentElement:r}=X(),i=$(),a=T(()=>t.disabled||i.disabled.value||!1);return x(()=>{r.value&&i.onTriggerElementChange(r.value)}),(r,o)=>(k(),F(d(J),C(t,{ref:d(n),type:e.as===`button`?`button`:void 0,tabindex:`-1`,"aria-label":`Show popup`,"aria-haspopup":`listbox`,"aria-expanded":d(i).open.value,"aria-controls":d(i).contentId,"data-state":d(i).open.value?`open`:`closed`,disabled:a.value,"data-disabled":a.value?``:void 0,"aria-disabled":a.value??void 0,onClick:o[0]||=e=>d(i).onOpenChange(!d(i).open.value)}),{default:M(()=>[z(r.$slots,`default`)]),_:3},16,[`type`,`aria-expanded`,`aria-controls`,`data-state`,`disabled`,`data-disabled`,`aria-disabled`]))}}),Dn=O({__name:`ComboboxVirtualizer`,props:{options:{type:Array,required:!0},overscan:{type:Number,required:!1},estimateSize:{type:[Number,Function],required:!1},textContent:{type:Function,required:!1}},setup(e){let n=e,r=$();return r.isVirtual.value=!0,(e,r)=>(k(),F(an,t(V(n)),{default:M(n=>[z(e.$slots,`default`,t(V(n)))]),_:3},16))}});function On(e,t){if(typeof e!=`object`||!e)return!1;let n=q(e,t);return n!=null&&n!==``}function kn(e,t){let n=t?{xs:44,sm:48,md:52,lg:56,xl:60}:{xs:24,sm:28,md:32,lg:36,xl:40};return n[e]??n.md}function An(e,t,n,r){let i=kn(t,!0),a=kn(t,!1);return r?()=>i:n?t=>On(e[t],n)?i:a:()=>a}var jn={slots:{base:[`relative group rounded-md inline-flex items-center disabled:cursor-not-allowed disabled:opacity-75`,`transition-colors`],leading:`absolute inset-y-0 start-0 flex items-center`,leadingIcon:`shrink-0 text-dimmed`,leadingAvatar:`shrink-0`,leadingAvatarSize:``,trailing:`absolute inset-y-0 end-0 flex items-center`,trailingIcon:`shrink-0 text-dimmed`,value:`truncate pointer-events-none`,placeholder:`truncate text-dimmed`,arrow:`fill-bg stroke-default`,content:[`max-h-[min(15rem,var(--reka-select-content-available-height,15rem))] w-(--reka-select-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden origin-(--reka-select-content-transform-origin) pointer-events-auto data-[state=closed]:pointer-events-none! flex flex-col`,`max-h-[min(15rem,var(--reka-combobox-content-available-height,15rem))] origin-(--reka-combobox-content-transform-origin) w-(--reka-combobox-trigger-width)`],viewport:`relative scroll-py-1 overflow-y-auto flex-1`,group:`p-1 isolate`,empty:`text-center text-muted`,label:`font-semibold text-highlighted`,separator:`-mx-1 my-1 h-px bg-border`,item:[`group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50`,`transition-colors before:transition-colors`],itemLeadingIcon:[`shrink-0 text-dimmed group-data-highlighted:not-group-data-disabled:text-default`,`transition-colors`],itemLeadingAvatar:`shrink-0`,itemLeadingAvatarSize:``,itemLeadingChip:`shrink-0`,itemLeadingChipSize:``,itemTrailing:`ms-auto inline-flex gap-1.5 items-center`,itemTrailingIcon:`shrink-0`,itemWrapper:`flex-1 flex flex-col min-w-0`,itemLabel:`truncate`,itemDescription:`truncate text-muted`,input:`border-b border-default`,focusScope:`flex flex-col min-h-0`,trailingClear:`p-0`},variants:{fieldGroup:{horizontal:`not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]`,vertical:`not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]`},size:{xs:{base:`px-2 py-1 text-sm/4 gap-1`,leading:`ps-2`,trailing:`pe-2`,leadingIcon:`size-4`,leadingAvatarSize:`3xs`,trailingIcon:`size-4`,label:`p-1 text-[10px]/3 gap-1`,item:`p-1 text-xs gap-1`,itemLeadingIcon:`size-4`,itemLeadingAvatarSize:`3xs`,itemLeadingChip:`size-4`,itemLeadingChipSize:`sm`,itemTrailingIcon:`size-4`,empty:`p-2 text-xs`},sm:{base:`px-2.5 py-1.5 text-sm/4 gap-1.5`,leading:`ps-2.5`,trailing:`pe-2.5`,leadingIcon:`size-4`,leadingAvatarSize:`3xs`,trailingIcon:`size-4`,label:`p-1.5 text-[10px]/3 gap-1.5`,item:`p-1.5 text-xs gap-1.5`,itemLeadingIcon:`size-4`,itemLeadingAvatarSize:`3xs`,itemLeadingChip:`size-4`,itemLeadingChipSize:`sm`,itemTrailingIcon:`size-4`,empty:`p-2.5 text-xs`},md:{base:`px-2.5 py-1.5 text-base/5 gap-1.5`,leading:`ps-2.5`,trailing:`pe-2.5`,leadingIcon:`size-5`,leadingAvatarSize:`2xs`,trailingIcon:`size-5`,label:`p-1.5 text-xs gap-1.5`,item:`p-1.5 text-sm gap-1.5`,itemLeadingIcon:`size-5`,itemLeadingAvatarSize:`2xs`,itemLeadingChip:`size-5`,itemLeadingChipSize:`md`,itemTrailingIcon:`size-5`,empty:`p-2.5 text-sm`},lg:{base:`px-3 py-2 text-base/5 gap-2`,leading:`ps-3`,trailing:`pe-3`,leadingIcon:`size-5`,leadingAvatarSize:`2xs`,trailingIcon:`size-5`,label:`p-2 text-xs gap-2`,item:`p-2 text-sm gap-2`,itemLeadingIcon:`size-5`,itemLeadingAvatarSize:`2xs`,itemLeadingChip:`size-5`,itemLeadingChipSize:`md`,itemTrailingIcon:`size-5`,empty:`p-3 text-sm`},xl:{base:`px-3 py-2 text-base gap-2`,leading:`ps-3`,trailing:`pe-3`,leadingIcon:`size-6`,leadingAvatarSize:`xs`,trailingIcon:`size-6`,label:`p-2 text-sm gap-2`,item:`p-2 text-base gap-2`,itemLeadingIcon:`size-6`,itemLeadingAvatarSize:`xs`,itemLeadingChip:`size-6`,itemLeadingChipSize:`lg`,itemTrailingIcon:`size-6`,empty:`p-3 text-base`}},variant:{outline:`text-highlighted bg-default ring ring-inset ring-accented hover:bg-elevated disabled:bg-default`,soft:`text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50`,subtle:`text-highlighted bg-elevated ring ring-inset ring-accented hover:bg-accented/75 disabled:bg-elevated`,ghost:`text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent`,none:`text-highlighted bg-transparent focus:outline-none`},color:{primary:``,secondary:``,success:``,info:``,warning:``,error:``,neutral:``},leading:{true:``},trailing:{true:``},loading:{true:``},highlight:{true:``},fixed:{false:``},type:{file:`file:me-1.5 file:font-medium file:text-muted file:outline-none`},position:{popper:{content:`data-[state=open]:animate-[scale-in_100ms_var(--ease-out)] data-[state=closed]:animate-[scale-out_100ms_var(--ease-out)]`},"item-aligned":{content:``}},multiple:{true:``},virtualize:{true:{viewport:`p-1 isolate`},false:{viewport:`divide-y divide-default`}}},compoundVariants:[{color:`primary`,variant:[`outline`,`subtle`],class:`outline-primary/25 focus-visible:outline-3 focus-visible:ring-primary`},{color:`secondary`,variant:[`outline`,`subtle`],class:`outline-secondary/25 focus-visible:outline-3 focus-visible:ring-secondary`},{color:`success`,variant:[`outline`,`subtle`],class:`outline-success/25 focus-visible:outline-3 focus-visible:ring-success`},{color:`info`,variant:[`outline`,`subtle`],class:`outline-info/25 focus-visible:outline-3 focus-visible:ring-info`},{color:`warning`,variant:[`outline`,`subtle`],class:`outline-warning/25 focus-visible:outline-3 focus-visible:ring-warning`},{color:`error`,variant:[`outline`,`subtle`],class:`outline-error/25 focus-visible:outline-3 focus-visible:ring-error`},{color:`primary`,variant:[`soft`,`ghost`],class:`outline-primary/25 focus-visible:outline-3`},{color:`secondary`,variant:[`soft`,`ghost`],class:`outline-secondary/25 focus-visible:outline-3`},{color:`success`,variant:[`soft`,`ghost`],class:`outline-success/25 focus-visible:outline-3`},{color:`info`,variant:[`soft`,`ghost`],class:`outline-info/25 focus-visible:outline-3`},{color:`warning`,variant:[`soft`,`ghost`],class:`outline-warning/25 focus-visible:outline-3`},{color:`error`,variant:[`soft`,`ghost`],class:`outline-error/25 focus-visible:outline-3`},{color:`primary`,highlight:!0,class:`ring ring-inset ring-primary`},{color:`secondary`,highlight:!0,class:`ring ring-inset ring-secondary`},{color:`success`,highlight:!0,class:`ring ring-inset ring-success`},{color:`info`,highlight:!0,class:`ring ring-inset ring-info`},{color:`warning`,highlight:!0,class:`ring ring-inset ring-warning`},{color:`error`,highlight:!0,class:`ring ring-inset ring-error`},{color:`neutral`,variant:[`outline`,`subtle`],class:`outline-inverted/25 focus-visible:outline-3 focus-visible:ring-inverted`},{color:`neutral`,variant:[`soft`,`ghost`],class:`outline-inverted/25 focus-visible:outline-3`},{color:`neutral`,highlight:!0,class:`ring ring-inset ring-inverted`},{leading:!0,size:`xs`,class:`ps-7`},{leading:!0,size:`sm`,class:`ps-8`},{leading:!0,size:`md`,class:`ps-9`},{leading:!0,size:`lg`,class:`ps-10`},{leading:!0,size:`xl`,class:`ps-11`},{trailing:!0,size:`xs`,class:`pe-7`},{trailing:!0,size:`sm`,class:`pe-8`},{trailing:!0,size:`md`,class:`pe-9`},{trailing:!0,size:`lg`,class:`pe-10`},{trailing:!0,size:`xl`,class:`pe-11`},{loading:!0,leading:!0,class:{leadingIcon:`animate-spin`}},{loading:!0,leading:!1,trailing:!0,class:{trailingIcon:`animate-spin`}},{fixed:!1,size:`xs`,class:`md:text-xs`},{fixed:!1,size:`sm`,class:`md:text-xs`},{fixed:!1,size:`md`,class:`md:text-sm`},{fixed:!1,size:`lg`,class:`md:text-sm`}],defaultVariants:{size:`md`,color:`primary`,variant:`outline`,position:`popper`}},Mn=[`aria-labelledby`,`aria-multiselectable`],Nn=Object.assign({inheritAttrs:!1},{__name:`USelectMenu`,props:e({id:{type:String,required:!1},placeholder:{type:String,required:!1},searchInput:{type:[Boolean,Object],required:!1,default:!0},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},required:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},selectedIcon:{type:null,required:!1},clear:{type:[Boolean,Object],required:!1},clearIcon:{type:null,required:!1},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},virtualize:{type:[Boolean,Object],required:!1,default:!1},valueKey:{type:null,required:!1},labelKey:{type:null,required:!1,default:`label`},descriptionKey:{type:null,required:!1,default:`description`},items:{type:null,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1},modelModifiers:{type:null,required:!1},multiple:{type:Boolean,required:!1},highlight:{type:Boolean,required:!1},fixed:{type:Boolean,required:!1},createItem:{type:[Boolean,String,Object],required:!1},filterFields:{type:Array,required:!1},ignoreFilter:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},class:{type:null,required:!1},ui:{type:Object,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},resetSearchTermOnBlur:{type:Boolean,required:!1,default:!0},resetSearchTermOnSelect:{type:Boolean,required:!1,default:!0},resetModelValueOnClear:{type:Boolean,required:!1,default:!0},highlightOnHover:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},{searchTerm:{type:String,default:``},searchTermModifiers:{}}),emits:e([`change`,`blur`,`focus`,`create`,`clear`,`highlight`,`update:modelValue`,`update:open`],[`update:searchTerm`]),setup(e,{expose:i,emit:s}){let l=e,m=s,h=u(),g=ce(`selectMenu`,l),S=o(e,`searchTerm`,{type:String,default:``}),{t:w}=nt(),E=re(),{filterGroups:D}=Me(),O=He(ye(g,`modelValue`,`defaultValue`,`open`,`defaultOpen`,`required`,`multiple`,`resetSearchTermOnBlur`,`resetSearchTermOnSelect`,`resetModelValueOnClear`,`highlightOnHover`,`loop`,`by`),m),ee=Fe(L(()=>g.portal)),R=L(()=>G(g.content,{side:`bottom`,sideOffset:8,collisionPadding:8,position:`popper`})),te=L(()=>G(g.arrow,{rounded:!0})),ne=T(()=>typeof g.clear==`object`?g.clear:{}),W=L(()=>g.virtualize?G(typeof g.virtualize==`boolean`?{}:g.virtualize,{estimateSize:An(We.value,je.value??`md`,g.descriptionKey,!!h[`item-description`])}):!1),ie=L(()=>G(g.searchInput,{placeholder:w(`selectMenu.search`),variant:`none`,fixed:g.fixed})),{emitFormBlur:ae,emitFormFocus:K,emitFormInput:fe,emitFormChange:pe,size:me,color:he,id:ge,name:_e,highlight:ve,disabled:be,ariaAttrs:xe}=$e(l),{orientation:Se,size:we}=Je(l),{isLeading:J,isTrailing:Te,leadingIconName:Ee,trailingIconName:De}=Qe(T(()=>({icon:g.icon,leading:g.leading,leadingIcon:g.leadingIcon,trailing:g.trailing,trailingIcon:g.trailingIcon??E.ui.icons.chevronDown,loading:g.loading,loadingIcon:g.loadingIcon}))),Oe=T(()=>he.value??g.color),ke=T(()=>ve.value??g.highlight),je=T(()=>we.value??me.value??g.size),Ne=T(()=>be.value??g.disabled),[Pe,Ie]=Ce(),[Re,ze]=Ce({props:{item:{type:[Object,String,Number,Boolean],required:!0},index:{type:Number,required:!1}}}),Y=T(()=>de({extend:jn,...E.ui?.selectMenu||{}})({color:Oe.value,variant:g.variant,size:je.value,loading:g.loading,highlight:ke.value,fixed:g.fixed,leading:J.value||!!g.avatar||!!h.leading,trailing:Te.value||!!h.trailing,fieldGroup:Se.value,virtualize:!!g.virtualize,multiple:g.multiple}));function Be(e){if(g.multiple&&Array.isArray(e)){let t=e.map(e=>oe(X.value,e,{labelKey:g.labelKey,valueKey:g.valueKey,by:g.by})).filter(e=>e!=null&&e!==``);return t.length>0?t.join(`, `):void 0}return oe(X.value,e,{labelKey:g.labelKey,valueKey:g.valueKey,by:g.by})}let Ve=T(()=>g.items?.length?ue(g.items)?g.items:[g.items]:[]),X=T(()=>Ve.value.flatMap(e=>e)),Ue=T(()=>{if(g.ignoreFilter||!S.value)return Ve.value;let e=Array.isArray(g.filterFields)?g.filterFields:[g.labelKey];return D(Ve.value,S.value,{fields:e,isStructural:e=>Q(e)&&!!e.type&&[`label`,`separator`].includes(e.type)})}),We=T(()=>Ue.value.flatMap(e=>e)),Ge=T(()=>{if(!g.createItem||!S.value)return!1;let e=g.valueKey?{[g.valueKey]:S.value}:S.value;return typeof g.createItem==`object`&&g.createItem.when===`always`||g.createItem===`always`?!We.value.find(t=>le(t,e,g.by??g.valueKey)):!We.value.length}),Ke=T(()=>typeof g.createItem==`object`?g.createItem.position:`bottom`),tt=p(`triggerRef`);function rt(){g.autofocus&&tt.value?.$el?.focus({focusVisible:!0})}let it;x(()=>{it=setTimeout(()=>{rt()},g.autofocusDelay)}),j(()=>clearTimeout(it));function at(e){if(n(g.modelValue)===e)return;g.modelModifiers?.trim&&(typeof e==`string`||e==null)&&(e=e?.trim()??null),g.modelModifiers?.number&&(e=se(e)),g.modelModifiers?.nullable&&(e??=null),g.modelModifiers?.optional&&!g.modelModifiers?.nullable&&e!==null&&(e??=void 0);let t=new Event(`change`,{target:{value:e}});m(`change`,t),pe(),fe(),g.resetSearchTermOnSelect&&(S.value=``)}let Z=I(!1),ot;j(()=>clearTimeout(ot));function st(e){if(Z.value=e,e){let e=new FocusEvent(`focus`);m(`focus`,e),K(),clearTimeout(ot)}else{let e=new FocusEvent(`blur`);m(`blur`,e),ae(),g.resetSearchTermOnBlur&&(ot=setTimeout(()=>{S.value=``},100))}}function ct(e){if(Z.value)return;let t=e.currentTarget;e.preventDefault(),t.click()}function lt(e){e.preventDefault(),e.stopPropagation(),m(`create`,S.value)}function ut(e,t){Q(t)&&(t.disabled?e.preventDefault():t.onSelect?.(e))}function Q(e){return typeof e==`object`&&!!e}function dt(e){return g.multiple&&Array.isArray(e)?e.length===0:e==null||e===``}function ft(){Ne.value||m(`clear`)}function pt(e){ie.value.autofocus===!1&&e.preventDefault()}let mt=p(`focusScopeRef`);function ht(e){let t=mt.value?.$el;e.defaultPrevented||t?.parentElement?.dataset.state!==`open`||(e.preventDefault(),((ie.value.autofocus===!1?null:t.querySelector(`[data-slot="input"] input`))??t).focus({preventScroll:!0}))}function gt(e){let t=document.activeElement;t&&t!==document.body&&!e.target.contains(t)&&e.preventDefault()}let _t=p(`viewportRef`),vt=f(),yt=T(()=>ge.value??`select-menu-${vt}`),bt=`select-menu-listbox-${vt}`,xt=p(`comboboxRootRef`);return c(()=>g.items,async()=>{Z.value&&g.createItem&&(await P(),xt.value?.highlightFirstItem?.())},{flush:`post`}),i({triggerRef:L(()=>tt.value?.$el),viewportRef:L(()=>_t.value)}),(e,n)=>(k(),y(A,null,[r(d(Pe),null,{default:M(()=>[r(d(xn),{"data-slot":`item`,class:_(Y.value.item({class:d(g).ui?.item})),value:S.value,onSelect:lt},{default:M(()=>[v(`span`,{"data-slot":`itemLabel`,class:_(Y.value.itemLabel({class:d(g).ui?.itemLabel}))},[z(e.$slots,`create-item-label`,{item:S.value},()=>[a(N(d(w)(`selectMenu.create`,{label:S.value})),1)])],2)]),_:3},8,[`class`,`value`])]),_:3}),r(d(Re),null,{default:M(({item:t,index:n})=>[Q(t)&&t.type===`label`?(k(),F(d(Cn),{key:0,"data-slot":`label`,class:_(Y.value.label({class:[d(g).ui?.label,t.ui?.label,t.class]}))},{default:M(()=>[a(N(d(q)(t,d(g).labelKey)),1)]),_:2},1032,[`class`])):Q(t)&&t.type===`separator`?(k(),F(d(Tn),{key:1,"data-slot":`separator`,class:_(Y.value.separator({class:[d(g).ui?.separator,t.ui?.separator,t.class]}))},null,8,[`class`])):(k(),F(d(xn),{key:2,"data-slot":`item`,class:_(Y.value.item({class:[d(g).ui?.item,Q(t)&&t.ui?.item,Q(t)&&t.class]})),disabled:Q(t)&&t.disabled,value:d(g).valueKey&&Q(t)?d(q)(t,d(g).valueKey):t,onSelect:e=>ut(e,t)},{default:M(()=>[z(e.$slots,`item`,{item:t,index:n,ui:Y.value},()=>[z(e.$slots,`item-leading`,{item:t,index:n,ui:Y.value},()=>[Q(t)&&t.icon?(k(),F(qe,{key:0,name:t.icon,"data-slot":`itemLeadingIcon`,class:_(Y.value.itemLeadingIcon({class:[d(g).ui?.itemLeadingIcon,t.ui?.itemLeadingIcon]}))},null,8,[`name`,`class`])):Q(t)&&t.avatar?(k(),F(Xe,C({key:1,size:t.ui?.itemLeadingAvatarSize||d(g).ui?.itemLeadingAvatarSize||Y.value.itemLeadingAvatarSize()},t.avatar,{"data-slot":`itemLeadingAvatar`,class:Y.value.itemLeadingAvatar({class:[d(g).ui?.itemLeadingAvatar,t.ui?.itemLeadingAvatar]})}),null,16,[`size`,`class`])):Q(t)&&t.chip?(k(),F(Ze,C({key:2,size:t.ui?.itemLeadingChipSize||d(g).ui?.itemLeadingChipSize||Y.value.itemLeadingChipSize(),inset:``,standalone:``},t.chip,{"data-slot":`itemLeadingChip`,class:Y.value.itemLeadingChip({class:[d(g).ui?.itemLeadingChip,t.ui?.itemLeadingChip]})}),null,16,[`size`,`class`])):B(``,!0)]),v(`span`,{"data-slot":`itemWrapper`,class:_(Y.value.itemWrapper({class:[d(g).ui?.itemWrapper,Q(t)&&t.ui?.itemWrapper]}))},[v(`span`,{"data-slot":`itemLabel`,class:_(Y.value.itemLabel({class:[d(g).ui?.itemLabel,Q(t)&&t.ui?.itemLabel]}))},[z(e.$slots,`item-label`,{item:t,index:n},()=>[a(N(Q(t)?d(q)(t,d(g).labelKey):t),1)])],2),Q(t)&&(d(q)(t,d(g).descriptionKey)||h[`item-description`])?(k(),y(`span`,{key:0,"data-slot":`itemDescription`,class:_(Y.value.itemDescription({class:[d(g).ui?.itemDescription,Q(t)&&t.ui?.itemDescription]}))},[z(e.$slots,`item-description`,{item:t,index:n},()=>[a(N(d(q)(t,d(g).descriptionKey)),1)])],2)):B(``,!0)],2),v(`span`,{"data-slot":`itemTrailing`,class:_(Y.value.itemTrailing({class:[d(g).ui?.itemTrailing,Q(t)&&t.ui?.itemTrailing]}))},[z(e.$slots,`item-trailing`,{item:t,index:n,ui:Y.value}),r(d(Sn),{"as-child":``},{default:M(()=>[r(qe,{name:d(g).selectedIcon||d(E).ui.icons.check,"data-slot":`itemTrailingIcon`,class:_(Y.value.itemTrailingIcon({class:[d(g).ui?.itemTrailingIcon,Q(t)&&t.ui?.itemTrailingIcon]}))},null,8,[`name`,`class`])]),_:2},1024)],2)])]),_:2},1032,[`class`,`disabled`,`value`,`onSelect`]))]),_:3}),r(d(cn),C({ref_key:`comboboxRootRef`,ref:xt},d(O),{"ignore-filter":``,"as-child":``,name:d(_e),disabled:Ne.value,"onUpdate:modelValue":at,"onUpdate:open":st}),{default:M(({modelValue:i,open:o})=>[r(d(ln),{"as-child":``},{default:M(()=>[r(d(En),C({id:yt.value,ref_key:`triggerRef`,ref:tt,"data-slot":`base`,class:Y.value.base({class:[d(g).ui?.base,d(g).class]}),tabindex:`0`},{"aria-label":void 0,...e.$attrs,...d(xe)},{"aria-controls":bt,onKeydown:[H(ct,[`down`]),H(ct,[`up`])]}),{default:M(()=>[d(J)||d(g).avatar||h.leading?(k(),y(`span`,{key:0,"data-slot":`leading`,class:_(Y.value.leading({class:d(g).ui?.leading}))},[z(e.$slots,`leading`,{modelValue:i,open:o,ui:Y.value},()=>[d(J)&&d(Ee)?(k(),F(qe,{key:0,name:d(Ee),"data-slot":`leadingIcon`,class:_(Y.value.leadingIcon({class:d(g).ui?.leadingIcon}))},null,8,[`name`,`class`])):d(g).avatar?(k(),F(Xe,C({key:1,size:d(g).ui?.itemLeadingAvatarSize||Y.value.itemLeadingAvatarSize()},d(g).avatar,{"data-slot":`itemLeadingAvatar`,class:Y.value.itemLeadingAvatar({class:d(g).ui?.itemLeadingAvatar})}),null,16,[`size`,`class`])):B(``,!0)])],2)):B(``,!0),z(e.$slots,`default`,{modelValue:i,open:o,ui:Y.value},()=>[(k(!0),y(A,null,b([Be(i)],e=>(k(),y(A,{key:e},[e==null?(k(),y(`span`,{key:1,"data-slot":`placeholder`,class:_(Y.value.placeholder({class:d(g).ui?.placeholder}))},N(d(g).placeholder??`\xA0`),3)):(k(),y(`span`,{key:0,"data-slot":`value`,class:_(Y.value.value({class:d(g).ui?.value}))},N(e),3))],64))),128))]),d(Te)||h.trailing||d(g).clear?(k(),y(`span`,{key:1,"data-slot":`trailing`,class:_(Y.value.trailing({class:d(g).ui?.trailing}))},[z(e.$slots,`trailing`,{modelValue:i,open:o,ui:Y.value},()=>[d(g).clear&&!Ne.value&&!dt(i)?(k(),F(d(mn),{key:0,"as-child":``},{default:M(()=>[r(et,C({as:`span`,icon:d(g).clearIcon||d(E).ui.icons.close,size:je.value,variant:`link`,color:`neutral`,tabindex:`-1`},ne.value,{"data-slot":`trailingClear`,class:Y.value.trailingClear({class:d(g).ui?.trailingClear}),onClick:U(ft,[`stop`])}),null,16,[`icon`,`size`,`class`])]),_:1})):d(De)?(k(),F(qe,{key:1,name:d(De),"data-slot":`trailingIcon`,class:_(Y.value.trailingIcon({class:d(g).ui?.trailingIcon,leading:d(J)}))},null,8,[`name`,`class`])):B(``,!0)])],2)):B(``,!0)]),_:2},1040,[`id`,`class`])]),_:2},1024),r(d(wn),t(V(d(ee))),{default:M(()=>[r(d(Ye),null,{default:M(()=>[r(d(hn),C({"data-slot":`content`,class:Y.value.content({class:d(g).ui?.content})},R.value,{role:void 0,"aria-orientation":void 0,"aria-multiselectable":void 0,onFocusOutside:ht}),{default:M(()=>[r(d(Ae),{ref_key:`focusScopeRef`,ref:mt,loop:``,"data-slot":`focusScope`,class:_(Y.value.focusScope({class:d(g).ui?.focusScope})),onMountAutoFocus:pt,onUnmountAutoFocus:gt},{default:M(()=>[z(e.$slots,`content-top`),d(g).searchInput?(k(),F(d(bn),{key:0,modelValue:S.value,"onUpdate:modelValue":n[1]||=e=>S.value=e,"display-value":()=>S.value,"aria-controls":bt,"as-child":``},{default:M(()=>[r(Le,C({autofocus:``,autocomplete:`off`,size:je.value},ie.value,{"model-modifiers":{trim:d(g).modelModifiers?.trim},"data-slot":`input`,class:Y.value.input({class:d(g).ui?.input}),onChange:n[0]||=U(()=>{},[`stop`])}),null,16,[`size`,`model-modifiers`,`class`])]),_:1},8,[`modelValue`,`display-value`])):B(``,!0),r(d(gn),{"data-slot":`empty`,class:_(Y.value.empty({class:d(g).ui?.empty}))},{default:M(()=>[z(e.$slots,`empty`,{searchTerm:S.value},()=>[a(N(S.value?d(w)(`selectMenu.noMatch`,{searchTerm:S.value}):d(w)(`selectMenu.noData`)),1)])]),_:3},8,[`class`]),v(`div`,{id:bt,ref_key:`viewportRef`,ref:_t,role:`listbox`,"aria-labelledby":yt.value,"aria-multiselectable":!!d(g).multiple,"aria-orientation":`vertical`,"data-slot":`viewport`,class:_(Y.value.viewport({class:d(g).ui?.viewport}))},[d(g).virtualize?(k(),y(A,{key:0},[Ge.value&&Ke.value===`top`?(k(),F(d(Ie),{key:0})):B(``,!0),r(d(Dn),C({options:We.value,"text-content":e=>Q(e)?d(q)(e,d(g).labelKey):String(e)},W.value),{default:M(({option:e,virtualItem:t})=>[r(d(ze),{item:e,index:t.index},null,8,[`item`,`index`])]),_:1},16,[`options`,`text-content`]),Ge.value&&Ke.value===`bottom`?(k(),F(d(Ie),{key:1})):B(``,!0)],64)):(k(),y(A,{key:1},[Ge.value&&Ke.value===`top`?(k(),F(d(yn),{key:0,"data-slot":`group`,class:_(Y.value.group({class:d(g).ui?.group}))},{default:M(()=>[r(d(Ie))]),_:1},8,[`class`])):B(``,!0),(k(!0),y(A,null,b(Ue.value,(e,t)=>(k(),F(d(yn),{key:`group-${t}`,"data-slot":`group`,class:_(Y.value.group({class:d(g).ui?.group}))},{default:M(()=>[(k(!0),y(A,null,b(e,(e,n)=>(k(),F(d(ze),{key:`group-${t}-${n}`,item:e,index:n},null,8,[`item`,`index`]))),128))]),_:2},1032,[`class`]))),128)),Ge.value&&Ke.value===`bottom`?(k(),F(d(yn),{key:1,"data-slot":`group`,class:_(Y.value.group({class:d(g).ui?.group}))},{default:M(()=>[r(d(Ie))]),_:1},8,[`class`])):B(``,!0)],64))],10,Mn),z(e.$slots,`content-bottom`)]),_:3},8,[`class`]),d(g).arrow?(k(),F(d(pn),C({key:0},te.value,{"data-slot":`arrow`,class:Y.value.arrow({class:d(g).ui?.arrow})}),null,16,[`class`])):B(``,!0)]),_:3},16,[`class`])]),_:3})]),_:3},16)]),_:3},16,[`name`,`disabled`])],64))}}),Pn=Object.assign(O({inheritAttrs:!1,__name:`SkinSelect`,props:e({items:{},icon:{},placeholder:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=o(e,`modelValue`),n={base:`skin-select`,content:`skin-pop`,viewport:`skin-pop-view`,item:`skin-pop-item`,label:`skin-pop-label`,empty:`skin-pop-empty`};return(r,i)=>{let a=Nn;return k(),F(a,C({modelValue:t.value,"onUpdate:modelValue":i[0]||=e=>t.value=e,items:e.items,"value-key":`value`,"search-input":!1,size:`sm`,variant:`outline`,icon:e.icon,placeholder:e.placeholder,ui:n},r.$attrs),null,16,[`modelValue`,`items`,`icon`,`placeholder`])}}}),{__name:`SkinSelect`});export{Pn as t};
|