1import{H as $,D as U,j as h,l as b,ap as z,A as _,J as W,B as Y,d as T,y as D,a5 as N,S as J,z as Q,aq as X,o as q,c as j,w as M,q as B,f as I,e as Z}from"./app-DruhysRH.js";import{r as ee,S as R,P as L}from"./index-Cn3tgvJS.js";import{j as te,i as ne,d as k,u as ae}from"./useForwardExpose-CTat24qG.js";function V(e,t){const o=typeof e=="string"&&!t?`${e}Context`:t,n=Symbol(o);return[l=>{const d=$(n,l);if(d||d===null)return d;throw new Error(`Injection \`${n.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},l=>(U(n,l),l)]}function O(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}const[oe]=V("ConfigProvider");function re(e){const t=oe({dir:h("ltr")});return b(()=>e?.value||t.dir?.value||"ltr")}function we(e,t="reka"){let o;return o=z?.(),t?`${t}-${o}`:o}function ie(e,t){const o=h(e);function n(f){return t[o.value][f]??o.value}return{state:o,dispatch:f=>{o.value=n(f)}}}function se(e,t){const o=h({}),n=h("none"),s=h(e),f=e.value?"mounted":"unmounted";let l;const d=t.value?.ownerDocument.defaultView??te,{state:p,dispatch:u}=ie(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),a=r=>{if(ne){const i=new CustomEvent(r,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(i)}};_(e,async(r,i)=>{const y=i!==r;if(await W(),y){const w=n.value,g=C(t.value);r?(u("MOUNT"),a("enter"),g==="none"&&a("after-enter")):g==="none"||g==="undefined"||o.value?.display==="none"?(u("UNMOUNT"),a("leave"),a("after-leave")):i&&w!==g?(u("ANIMATION_OUT"),a("leave")):(u("UNMOUNT"),a("after-leave"))}},{immediate:!0});const c=r=>{const i=C(t.value),y=i.includes(CSS.escape(r.animationName)),w=p.value==="mounted"?"enter":"leave";if(r.target===t.value&&y&&(a(`after-${w}`),u("ANIMATION_END"),!s.value)){const g=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",l=d?.setTimeout(()=>{t.value?.style.animationFillMode==="forwards"&&(t.value.style.animationFillMode=g)})}r.target===t.value&&i==="none"&&u("ANIMATION_END")},m=r=>{r.target===t.value&&(n.value=C(t.value))},A=_(t,(r,i)=>{r?(o.value=getComputedStyle(r),r.addEventListener("animationstart",m),r.addEventListener("animationcancel",c),r.addEventListener("animationend",c)):(u("ANIMATION_END"),l!==void 0&&d?.clearTimeout(l),i?.removeEventListener("animationstart",m),i?.removeEventListener("animationcancel",c),i?.removeEventListener("animationend",c))},{immediate:!0}),v=_(p,()=>{const r=C(t.value);n.value=p.value==="mounted"?r:"none"});return Y(()=>{A(),v()}),{isPresent:b(()=>["mounted","unmountSuspended"].includes(p.value))}}function C(e){return e&&getComputedStyle(e).animationName||"none"}var Ee=T({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:o}){const{present:n,forceMount:s}=D(e),f=h(),{isPresent:l}=se(n,f);o({present:l});let d=t.default({present:l.value});d=ee(d||[]);const p=J();if(d&&d?.length>1){const u=p?.parent?.type.name?`<${p.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${u}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(a=>` - ${a}`).join(` 2`)].join(` 3`))}return()=>s.value||n.value||l.value?N(t.default({present:l.value})[0],{ref:u=>{const a=k(u);return typeof a?.hasAttribute>"u"||(a?.hasAttribute("data-reka-popper-content-wrapper")?f.value=a.firstElementChild:f.value=a),a}}):null}});function x(){const e=h(),t=b(()=>["#text","#comment"].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:k(e));return{primitiveElement:e,currentElement:t}}const P="data-reka-collection-item";function le(e={}){const{key:t="",isProvider:o=!1}=e,n=`${t}CollectionProvider`;let s;if(o){const a=h(new Map);s={collectionRef:h(),itemMap:a},U(n,s)}else s=$(n);const f=(a=!1)=>{const c=s.collectionRef.value;if(!c)return[];const m=Array.from(c.querySelectorAll(`[${P}]`)),v=Array.from(s.itemMap.value.values()).sort((S,r)=>m.indexOf(S.ref)-m.indexOf(r.ref));return a?v:v.filter(S=>S.ref.dataset.disabled!=="")},l=T({name:"CollectionSlot",inheritAttrs:!1,setup(a,{slots:c,attrs:m}){const{primitiveElement:A,currentElement:v}=x();return _(v,()=>{s.collectionRef.value=v.value}),()=>N(R,{ref:A,...m},c)}}),d=T({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(a,{slots:c,attrs:m}){const{primitiveElement:A,currentElement:v}=x();return Q(S=>{if(v.value){const r=X(v.value);s.itemMap.value.set(r,{ref:v.value,value:a.value}),S(()=>s.itemMap.value.delete(r))}}),()=>N(R,{...m,[P]:"",ref:A},c)}}),p=b(()=>
3Array.from(s.itemMap.value.values())),u=b(()=>s.itemMap.value.size);return{getItems:f,reactiveItems:p,itemMapSize:u,CollectionSlot:l,CollectionItem:d}}var ue=T({__name:"VisuallyHidden",props:{feature:{type:String,required:!1,default:"focusable"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,o)=>(q(),j(I(L),{as:t.as,"as-child":t.asChild,"aria-hidden":t.feature==="focusable"?"true":void 0,"data-hidden":t.feature==="fully-hidden"?"":void 0,tabindex:t.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal",top:"-1px",left:"-1px"}},{default:M(()=>[B(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),Se=ue;const ce="rovingFocusGroup.onEntryFocus",de={bubbles:!1,cancelable:!0},fe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function me(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ie(e,t,o){const n=me(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return fe[n]}function ve(e,t=!1){const o=O();for(const n of e)if(n===o||(n.focus({preventScroll:t}),O()!==o))return}function be(e,t){return e.map((o,n)=>e[(t+n)%e.length])}const[Te,pe]=V("RovingFocusGroup");var he=T({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(e,{expose:t,emit:o}){const n=e,s=o,{loop:f,orientation:l,dir:d}=D(n),p=re(d),u=ae(n,"currentTabStopId",s,{defaultValue:n.defaultCurrentTabStopId,passive:n.currentTabStopId===void 0}),a=h(!1),c=h(!1),m=h(0),{getItems:A,CollectionSlot:v}=le({isProvider:!0});function S(i){const y=!c.value;if(i.currentTarget&&i.target===i.currentTarget&&y&&!a.value){const w=new CustomEvent(ce,de);if(i.currentTarget.dispatchEvent(w),s("entryFocus",w),!w.defaultPrevented){const g=A().map(E=>E.ref).filter(E=>E.dataset.disabled!==""),F=g.find(E=>E.getAttribute("data-active")===""),G=g.find(E=>E.getAttribute("data-highlighted")===""),H=g.find(E=>E.id===u.value),K=[F,G,H,...g].filter(Boolean);ve(K,n.preventScrollOnEntryFocus)}}c.value=!1}function r(){setTimeout(()=>{c.value=!1},1)}return t({getItems:A}),pe({loop:f,dir:p,orientation:l,currentTabStopId:u,onItemFocus:i=>{u.value=i},onItemShiftTab:()=>{a.value=!0},onFocusableItemAdd:()=>{m.value++},onFocusableItemRemove:()=>{m.value--}}),(i,y)=>(q(),j(I(v),null,{default:M(()=>[Z(I(L),{tabindex:a.value||m.value===0?-1:0,"data-orientation":I(l),as:i.as,"as-child":i.asChild,dir:I(p),style:{outline:"none"},onMousedown:y[0]||(y[0]=w=>c.value=!0),onMouseup:r,onFocus:S,onBlur:y[1]||(y[1]=w=>a.value=!1)},{default:M(()=>[B(i.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),Ce=he;export{Ee as P,Ce as R,Se as V,re as a,le as b,V as c,x as d,Te as e,Ie as f,O as g,ve as h,oe as i,we as u,be as w};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.