Files
base/.svelte-kit/output/client/_app/immutable/nodes/0.DsCqkoz9.js
T
eewing ec317eb17c
CI / build (push) Has been skipped
CI / deploy (push) Successful in 1m11s
INIT
2026-02-18 15:17:47 -06:00

5 lines
105 KiB
JavaScript

var Us=Object.defineProperty;var qs=Object.getPrototypeOf;var Gs=Reflect.get;var fo=n=>{throw TypeError(n)};var Xs=(n,t,e)=>t in n?Us(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var A=(n,t,e)=>Xs(n,typeof t!="symbol"?t+"":t,e),$r=(n,t,e)=>t.has(n)||fo("Cannot "+e);var s=(n,t,e)=>($r(n,t,"read from private field"),e?e.call(n):t.get(n)),p=(n,t,e)=>t.has(n)?fo("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),F=(n,t,e,r)=>($r(n,t,"write to private field"),r?r.call(n,e):t.set(n,e),e),N=(n,t,e)=>($r(n,t,"access private method"),e);var ho=(n,t,e)=>Gs(qs(n),e,t);import"../chunks/Bzak7iHL.js";import{c as Ko,m as Ys,u as js,o as zo,s as Zs}from"../chunks/CPmvlhtF.js";import{h as Js,e as Qs,y as $s,d as ta,aZ as q,aN as qe,aO as C,p as g,bl as go,K as ea,V as Ke,bm as nt,aC as na,aB as mo,aD as ra,k as ia,l as rt,u as oa,P,az as sa,N as D,O as R,a as E,aF as Q,Q as H,aA as aa,R as U,bn as Vo,bk as pe,c as ft,r as ht,f as at,s as Ut,bb as ca,n as po,b as vo,t as la,ba as yo}from"../chunks/nEbfNkJh.js";import{B as ua,i as st,p as y,r as et,s as lt}from"../chunks/zcqfpVBB.js";import{b as V,a as yt,c as Ie}from"../chunks/Xjya7ye4.js";import{c as ct}from"../chunks/BpNSSBPP.js";import{a as da,e as fa}from"../chunks/CoAkxMBS.js";import{d as ha}from"../chunks/BX9MO-1l.js";import{i as ga,B as ma,c as Ho,d as S,e as pa,t as va,f as ya,g as wa,s as Uo,h as Gr,j as we,k as Tt,l as qo,m as ni,n as Go,o as Di,p as Wt,q as ba,r as ve,u as wt,a as xa,v as Sa,w as Aa,x as Oa,y as Pa,L as Ca}from"../chunks/CvA4ASMA.js";import{i as Ea}from"../chunks/ggIfGDPQ.js";const Ta=Symbol("NaN");function ka(n,t,e){Js&&Qs();var r=new ua(n),i=!$s();ta(()=>{var o=t();o!==o&&(o=Ta),i&&o!==null&&typeof o=="object"&&(o={}),r.ensure(o,e)})}function ye(n){let t=q(qe(n));return{[ma]:!0,[ga]:!0,get current(){return g(t)},set current(e){C(t,e,!0)}}}ye.from=Ho;ye.with=S;ye.flatten=pa;ye.readonly=va;ye.isBox=ya;ye.isWritableBox=wa;const Fa={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"},Ma=Uo(Fa),Xo=typeof window<"u"?window:void 0;function Ra(n){let t=n.activeElement;for(;t!=null&&t.shadowRoot;){const e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var Ot,Pt,Rt,Ar,xt,Ue,ar;const Zi=class Zi extends Map{constructor(e){super();p(this,xt);p(this,Ot,new Map);p(this,Pt,q(0));p(this,Rt,q(0));p(this,Ar,go||-1);if(e){for(var[r,i]of e)super.set(r,i);s(this,Rt).v=super.size}}has(e){var r=s(this,Ot),i=r.get(e);if(i===void 0){var o=super.get(e);if(o!==void 0)i=N(this,xt,Ue).call(this,0),r.set(e,i);else return g(s(this,Pt)),!1}return g(i),!0}forEach(e,r){N(this,xt,ar).call(this),super.forEach(e,r)}get(e){var r=s(this,Ot),i=r.get(e);if(i===void 0){var o=super.get(e);if(o!==void 0)i=N(this,xt,Ue).call(this,0),r.set(e,i);else{g(s(this,Pt));return}}return g(i),super.get(e)}set(e,r){var f;var i=s(this,Ot),o=i.get(e),a=super.get(e),c=super.set(e,r),l=s(this,Pt);if(o===void 0)o=N(this,xt,Ue).call(this,0),i.set(e,o),C(s(this,Rt),super.size),Ke(l);else if(a!==r){Ke(o);var u=l.reactions===null?null:new Set(l.reactions),d=u===null||!((f=o.reactions)!=null&&f.every(h=>u.has(h)));d&&Ke(l)}return c}delete(e){var r=s(this,Ot),i=r.get(e),o=super.delete(e);return i!==void 0&&(r.delete(e),C(s(this,Rt),super.size),C(i,-1),Ke(s(this,Pt))),o}clear(){if(super.size!==0){super.clear();var e=s(this,Ot);C(s(this,Rt),0);for(var r of e.values())C(r,-1);Ke(s(this,Pt)),e.clear()}}keys(){return g(s(this,Pt)),super.keys()}values(){return N(this,xt,ar).call(this),super.values()}entries(){return N(this,xt,ar).call(this),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return g(s(this,Rt)),super.size}};Ot=new WeakMap,Pt=new WeakMap,Rt=new WeakMap,Ar=new WeakMap,xt=new WeakSet,Ue=function(e){return go===s(this,Ar)?q(e):ea(e)},ar=function(){g(s(this,Pt));var e=s(this,Ot);if(s(this,Rt).v!==e.size){for(var r of ho(Zi.prototype,this,"keys").call(this))if(!e.has(r)){var i=N(this,xt,Ue).call(this,0);e.set(r,i)}}for([,i]of s(this,Ot))g(i)};let ri=Zi;var xe,je;class Da{constructor(t={}){p(this,xe);p(this,je);const{window:e=Xo,document:r=e==null?void 0:e.document}=t;e!==void 0&&(F(this,xe,r),F(this,je,Ko(i=>{const o=nt(e,"focusin",i),a=nt(e,"focusout",i);return()=>{o(),a()}})))}get current(){var t;return(t=s(this,je))==null||t.call(this),s(this,xe)?Ra(s(this,xe)):null}}xe=new WeakMap,je=new WeakMap;new Da;function Ia(n){return typeof n=="function"}var Ze,Dt;class Ht{constructor(t){p(this,Ze);p(this,Dt);F(this,Ze,t),F(this,Dt,Symbol(t))}get key(){return s(this,Dt)}exists(){return na(s(this,Dt))}get(){const t=mo(s(this,Dt));if(t===void 0)throw new Error(`Context "${s(this,Ze)}" not found`);return t}getOr(t){const e=mo(s(this,Dt));return e===void 0?t:e}set(t){return ra(s(this,Dt),t)}}Ze=new WeakMap,Dt=new WeakMap;function _a(n,t){switch(n){case"post":rt(t);break;case"pre":ia(t);break}}function Yo(n,t,e,r={}){const{lazy:i=!1}=r;let o=!i,a=Array.isArray(n)?[]:void 0;_a(t,()=>{const c=Array.isArray(n)?n.map(u=>u()):n();if(!o){o=!0,a=c;return}const l=oa(()=>e(c,a));return a=c,l})}function gt(n,t,e){Yo(n,"post",t,e)}function Na(n,t,e){Yo(n,"pre",t,e)}gt.pre=Na;function wo(n){return Ia(n)?n():n}var qt,Se,Ae,Oe,Gt,Or,Pr,Pe;class Ba{constructor(t,e={box:"border-box"}){p(this,qt,{width:0,height:0});p(this,Se,!1);p(this,Ae);p(this,Oe);p(this,Gt);p(this,Or,P(()=>{var t;return(t=g(s(this,Pe)))==null||t(),this.getSize().width}));p(this,Pr,P(()=>{var t;return(t=g(s(this,Pe)))==null||t(),this.getSize().height}));p(this,Pe,P(()=>{const t=wo(s(this,Oe));if(t)return Ko(e=>{if(!s(this,Gt))return;const r=new(s(this,Gt)).ResizeObserver(i=>{F(this,Se,!0);for(const o of i){const a=s(this,Ae).box==="content-box"?o.contentBoxSize:o.borderBoxSize,c=Array.isArray(a)?a:[a];s(this,qt).width=c.reduce((l,u)=>Math.max(l,u.inlineSize),0),s(this,qt).height=c.reduce((l,u)=>Math.max(l,u.blockSize),0)}e()});return r.observe(t),()=>{F(this,Se,!1),r.disconnect()}})}));F(this,Gt,e.window??Xo),F(this,Ae,e),F(this,Oe,t),F(this,qt,{width:0,height:0})}calculateSize(){const t=wo(s(this,Oe));if(!t||!s(this,Gt))return;const e=t.offsetWidth,r=t.offsetHeight;if(s(this,Ae).box==="border-box")return{width:e,height:r};const i=s(this,Gt).getComputedStyle(t),o=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),a=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),c=parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth),l=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),u=e-o-c,d=r-a-l;return{width:u,height:d}}getSize(){return s(this,Se)?s(this,qt):this.calculateSize()??s(this,qt)}get current(){var t;return(t=g(s(this,Pe)))==null||t(),this.getSize()}get width(){return g(s(this,Or))}get height(){return g(s(this,Pr))}}qt=new WeakMap,Se=new WeakMap,Ae=new WeakMap,Oe=new WeakMap,Gt=new WeakMap,Or=new WeakMap,Pr=new WeakMap,Pe=new WeakMap;function er(n){rt(()=>()=>{n()})}function La(n,t){return setTimeout(t,n)}function ie(n){sa().then(n)}const Wa=1,Ka=9,za=11;function ii(n){return Gr(n)&&n.nodeType===Wa&&typeof n.nodeName=="string"}function jo(n){return Gr(n)&&n.nodeType===Ka}function Va(n){var t;return Gr(n)&&((t=n.constructor)==null?void 0:t.name)==="VisualViewport"}function Ha(n){return Gr(n)&&n.nodeType!==void 0}function Zo(n){return Ha(n)&&n.nodeType===za&&"host"in n}function Ua(n,t){var r;if(!n||!t||!ii(n)||!ii(t))return!1;const e=(r=t.getRootNode)==null?void 0:r.call(t);if(n===t||n.contains(t))return!0;if(e&&Zo(e)){let i=t;for(;i;){if(n===i)return!0;i=i.parentNode||i.host}}return!1}function nr(n){return jo(n)?n:Va(n)?n.document:(n==null?void 0:n.ownerDocument)??document}function Ii(n){var t;return Zo(n)?Ii(n.host):jo(n)?n.defaultView??window:ii(n)?((t=n.ownerDocument)==null?void 0:t.defaultView)??window:window}function qa(n){let t=n.activeElement;for(;t!=null&&t.shadowRoot;){const e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var Je;class Xr{constructor(t){A(this,"element");p(this,Je,P(()=>this.element.current?this.element.current.getRootNode()??document:document));A(this,"getDocument",()=>nr(this.root));A(this,"getWindow",()=>this.getDocument().defaultView??window);A(this,"getActiveElement",()=>qa(this.root));A(this,"isActiveElement",t=>t===this.getActiveElement());A(this,"querySelector",t=>this.root?this.root.querySelector(t):null);A(this,"querySelectorAll",t=>this.root?this.root.querySelectorAll(t):[]);A(this,"setTimeout",(t,e)=>this.getWindow().setTimeout(t,e));A(this,"clearTimeout",t=>this.getWindow().clearTimeout(t));typeof t=="function"?this.element=S(t):this.element=t}get root(){return g(s(this,Je))}set root(t){C(s(this,Je),t)}getElementById(t){return this.root.getElementById(t)}}Je=new WeakMap;const Xe="ArrowDown",_i="ArrowLeft",Ni="ArrowRight",fr="ArrowUp",Jo="End",Qo="Enter",Ga="Escape",$o="Home",Xa="PageDown",Ya="PageUp",ts=" ",ja="Tab";function Za(n){return window.getComputedStyle(n).getPropertyValue("direction")}function Ja(n="ltr",t="horizontal"){return{horizontal:n==="rtl"?_i:Ni,vertical:Xe}[t]}function Qa(n="ltr",t="horizontal"){return{horizontal:n==="rtl"?Ni:_i,vertical:fr}[t]}function $a(n="ltr",t="horizontal"){return["ltr","rtl"].includes(n)||(n="ltr"),["horizontal","vertical"].includes(t)||(t="horizontal"),{nextKey:Ja(n,t),prevKey:Qa(n,t)}}const es=typeof document<"u",bo=tc();function tc(){var n,t;return es&&((n=window==null?void 0:window.navigator)==null?void 0:n.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function _e(n){return n instanceof HTMLElement}function oi(n){return n instanceof Element}function ns(n){return n instanceof Element||n instanceof SVGElement}function ec(n){return n!==null}function nc(n){return n instanceof HTMLInputElement&&"select"in n}var it,It;class rc{constructor(t){p(this,it);p(this,It,ye(null));F(this,it,t)}getCandidateNodes(){return s(this,it).rootNode.current?s(this,it).candidateSelector?Array.from(s(this,it).rootNode.current.querySelectorAll(s(this,it).candidateSelector)):s(this,it).candidateAttr?Array.from(s(this,it).rootNode.current.querySelectorAll(`[${s(this,it).candidateAttr}]:not([data-disabled])`)):[]:[]}focusFirstCandidate(){var e;const t=this.getCandidateNodes();t.length&&((e=t[0])==null||e.focus())}handleKeydown(t,e,r=!1){var v,w;const i=s(this,it).rootNode.current;if(!i||!t)return;const o=this.getCandidateNodes();if(!o.length)return;const a=o.indexOf(t),c=Za(i),{nextKey:l,prevKey:u}=$a(c,s(this,it).orientation.current),d=s(this,it).loop.current,f={[l]:a+1,[u]:a-1,[$o]:0,[Jo]:o.length-1};if(r){const x=l===Xe?Ni:Xe,O=u===fr?_i:fr;f[x]=a+1,f[O]=a-1}let h=f[e.key];if(h===void 0)return;e.preventDefault(),h<0&&d?h=o.length-1:h===o.length&&d&&(h=0);const m=o[h];if(m)return m.focus(),s(this,It).current=m.id,(w=(v=s(this,it)).onCandidateFocus)==null||w.call(v,m),m}getTabIndex(t){const e=this.getCandidateNodes(),r=s(this,It).current!==null;return t&&!r&&e[0]===t?(s(this,It).current=t.id,0):(t==null?void 0:t.id)===s(this,It).current?0:-1}setCurrentTabStopId(t){s(this,It).current=t}focusCurrentTabStop(){var r;const t=s(this,It).current;if(!t)return;const e=(r=s(this,it).rootNode.current)==null?void 0:r.querySelector(`#${t}`);!e||!_e(e)||e.focus()}}it=new WeakMap,It=new WeakMap;var Ce,oe,Kt,si,cr;class ic{constructor(t){p(this,Kt);p(this,Ce);p(this,oe,null);F(this,Ce,t),er(()=>N(this,Kt,si).call(this))}run(t){N(this,Kt,si).call(this);const e=s(this,Ce).ref.current;if(e){if(typeof e.getAnimations!="function"){N(this,Kt,cr).call(this,t);return}F(this,oe,window.requestAnimationFrame(()=>{const r=e.getAnimations();if(r.length===0){N(this,Kt,cr).call(this,t);return}Promise.allSettled(r.map(i=>i.finished)).then(()=>{N(this,Kt,cr).call(this,t)})}))}}}Ce=new WeakMap,oe=new WeakMap,Kt=new WeakSet,si=function(){s(this,oe)&&(window.cancelAnimationFrame(s(this,oe)),F(this,oe,null))},cr=function(t){const e=()=>{t()};s(this,Ce).afterTick?ie(e):e()};var Ct,Qe,$e,se;class oc{constructor(t){p(this,Ct);p(this,Qe);p(this,$e);p(this,se,q(!1));F(this,Ct,t),C(s(this,se),t.open.current,!0),F(this,Qe,t.enabled??!0),F(this,$e,new ic({ref:s(this,Ct).ref,afterTick:s(this,Ct).open})),gt(()=>s(this,Ct).open.current,e=>{e&&C(s(this,se),!0),s(this,Qe)&&s(this,$e).run(()=>{var r,i;e===s(this,Ct).open.current&&(s(this,Ct).open.current||C(s(this,se),!1),(i=(r=s(this,Ct)).onComplete)==null||i.call(r))})})}get shouldRender(){return g(s(this,se))}}Ct=new WeakMap,Qe=new WeakMap,$e=new WeakMap,se=new WeakMap;function $(){}function sc(n,t){var e=D(),r=R(e);ka(r,()=>t.children,i=>{var o=D(),a=R(o);V(a,()=>t.children??Q),E(i,o)}),E(n,e)}const ac=new Ht("BitsConfig");function cc(){const n=new lc(null,{});return ac.getOr(n).opts}class lc{constructor(t,e){A(this,"opts");const r=uc(t,e);this.opts={defaultPortalTo:r(i=>i.defaultPortalTo),defaultLocale:r(i=>i.defaultLocale)}}}function uc(n,t){return e=>S(()=>{var o,a;const i=(o=e(t))==null?void 0:o.current;if(i!==void 0)return i;if(n!==null)return(a=e(n.opts))==null?void 0:a.current})}function dc(n,t){return e=>{const r=cc();return S(()=>{const i=e();if(i!==void 0)return i;const o=n(r).current;return o!==void 0?o:t})}}const fc=dc(n=>n.defaultPortalTo,"body");function hc(n,t){H(t,!0);const e=fc(()=>t.to),r=aa();let i=P(o);function o(){if(!es||t.disabled)return null;let f=null;return typeof e.current=="string"?f=document.querySelector(e.current):f=e.current,f}let a;function c(){a&&(js(a),a=null)}gt([()=>g(i),()=>t.disabled],([f,h])=>{if(!f||h){c();return}return a=Ys(sc,{target:f,props:{children:t.children},context:r}),()=>{c()}});var l=D(),u=R(l);{var d=f=>{var h=D(),m=R(h);V(m,()=>t.children??Q),E(f,h)};st(u,f=>{t.disabled&&f(d)})}E(n,l),U()}class gc{constructor(t,e={bubbles:!0,cancelable:!0}){A(this,"eventName");A(this,"options");this.eventName=t,this.options=e}createEvent(t){return new CustomEvent(this.eventName,{...this.options,detail:t})}dispatch(t,e){const r=this.createEvent(e);return t.dispatchEvent(r),r}listen(t,e,r){const i=o=>{e(o)};return nt(t,this.eventName,i,r)}}function xo(n,t=500){let e=null;const r=(...i)=>{e!==null&&clearTimeout(e),e=setTimeout(()=>{n(...i)},t)};return r.destroy=()=>{e!==null&&(clearTimeout(e),e=null)},r}function rs(n,t){return n===t||n.contains(t)}function is(n){return(n==null?void 0:n.ownerDocument)??document}function mc(n,t){const{clientX:e,clientY:r}=n,i=t.getBoundingClientRect();return e<i.left||e>i.right||r<i.top||r>i.bottom}const pc=[Xe,Ya,$o],os=[fr,Xa,Jo],vc=[...pc,...os];function yc(n,{select:t=!1}={}){if(!n||!n.focus)return;const e=nr(n);if(e.activeElement===n)return;const r=e.activeElement;n.focus({preventScroll:!0}),n!==r&&nc(n)&&t&&n.select()}function wc(n,{select:t=!1}={},e){const r=e();for(const i of n)if(yc(i,{select:t}),e()!==r)return!0}let ze=q(!1);const vt=class vt{constructor(){rt(()=>(vt._refs===0&&(vt._cleanup=Vo(()=>{const t=[],e=i=>{C(ze,!1)},r=i=>{C(ze,!0)};return t.push(nt(document,"pointerdown",e,{capture:!0}),nt(document,"pointermove",e,{capture:!0}),nt(document,"keydown",r,{capture:!0})),we(...t)})),vt._refs++,()=>{var t;vt._refs--,vt._refs===0&&(C(ze,!1),(t=vt._cleanup)==null||t.call(vt))}))}get current(){return g(ze)}set current(t){C(ze,t,!0)}};A(vt,"_refs",0),A(vt,"_cleanup");let ai=vt;/*!
* tabbable 6.4.0
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*/var ss=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],hr=ss.join(","),as=typeof Element>"u",ge=as?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,gr=!as&&Element.prototype.getRootNode?function(n){var t;return n==null||(t=n.getRootNode)===null||t===void 0?void 0:t.call(n)}:function(n){return n==null?void 0:n.ownerDocument},mr=function(t,e){var r;e===void 0&&(e=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=i===""||i==="true",a=o||e&&t&&(typeof t.closest=="function"?t.closest("[inert]"):mr(t.parentNode));return a},bc=function(t){var e,r=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return r===""||r==="true"},cs=function(t,e,r){if(mr(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(hr));return e&&ge.call(t,hr)&&i.unshift(t),i=i.filter(r),i},pr=function(t,e,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!mr(a,!1))if(a.tagName==="SLOT"){var c=a.assignedElements(),l=c.length?c:a.children,u=pr(l,!0,r);r.flatten?i.push.apply(i,u):i.push({scopeParent:a,candidates:u})}else{var d=ge.call(a,hr);d&&r.filter(a)&&(e||!t.includes(a))&&i.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),h=!mr(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&h){var m=pr(f===!0?a.children:f.children,!0,r);r.flatten?i.push.apply(i,m):i.push({scopeParent:a,candidates:m})}else o.unshift.apply(o,a.children)}}return i},ls=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},us=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||bc(t))&&!ls(t)?0:t.tabIndex},xc=function(t,e){var r=us(t);return r<0&&e&&!ls(t)?0:r},Sc=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},ds=function(t){return t.tagName==="INPUT"},Ac=function(t){return ds(t)&&t.type==="hidden"},Oc=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return e},Pc=function(t,e){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===e)return t[r]},Cc=function(t){if(!t.name)return!0;var e=t.form||gr(t),r=function(c){return e.querySelectorAll('input[type="radio"][name="'+c+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var o=Pc(i,t.form);return!o||o===t},Ec=function(t){return ds(t)&&t.type==="radio"},Tc=function(t){return Ec(t)&&!Cc(t)},kc=function(t){var e,r=t&&gr(t),i=(e=r)===null||e===void 0?void 0:e.host,o=!1;if(r&&r!==t){var a,c,l;for(o=!!((a=i)!==null&&a!==void 0&&(c=a.ownerDocument)!==null&&c!==void 0&&c.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&i;){var u,d,f;r=gr(i),i=(u=r)===null||u===void 0?void 0:u.host,o=!!((d=i)!==null&&d!==void 0&&(f=d.ownerDocument)!==null&&f!==void 0&&f.contains(i))}}return o},So=function(t){var e=t.getBoundingClientRect(),r=e.width,i=e.height;return r===0&&i===0},Fc=function(t,e){var r=e.displayCheck,i=e.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var o=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}if(getComputedStyle(t).visibility==="hidden")return!0;var a=ge.call(t,"details>summary:first-of-type"),c=a?t.parentElement:t;if(ge.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var l=t;t;){var u=t.parentElement,d=gr(t);if(u&&!u.shadowRoot&&i(u)===!0)return So(t);t.assignedSlot?t=t.assignedSlot:!u&&d!==t.ownerDocument?t=d.host:t=u}t=l}if(kc(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return So(t);return!1},Mc=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var r=0;r<e.children.length;r++){var i=e.children.item(r);if(i.tagName==="LEGEND")return ge.call(e,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}e=e.parentElement}return!1},vr=function(t,e){return!(e.disabled||Ac(e)||Fc(e,t)||Oc(e)||Mc(e))},ci=function(t,e){return!(Tc(e)||us(e)<0||!vr(t,e))},Rc=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},fs=function(t){var e=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,c=a?i.scopeParent:i,l=xc(c,a),u=a?fs(i.candidates):c;l===0?a?e.push.apply(e,u):e.push(c):r.push({documentOrder:o,tabIndex:l,item:i,isScope:a,content:u})}),r.sort(Sc).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(e)},hs=function(t,e){e=e||{};var r;return e.getShadowRoot?r=pr([t],e.includeContainer,{filter:ci.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Rc}):r=cs(t,e.includeContainer,ci.bind(null,e)),fs(r)},gs=function(t,e){e=e||{};var r;return e.getShadowRoot?r=pr([t],e.includeContainer,{filter:vr.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):r=cs(t,e.includeContainer,vr.bind(null,e)),r},Bi=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return ge.call(t,hr)===!1?!1:ci(e,t)},Dc=ss.concat("iframe:not([inert]):not([inert] *)").join(","),ms=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return ge.call(t,Dc)===!1?!1:vr(e,t)};function Ge(){return{getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"}}function Ic(n,t){if(!Bi(n,Ge()))return _c(n,t);const e=nr(n),r=hs(e.body,Ge());t==="prev"&&r.reverse();const i=r.indexOf(n);return i===-1?e.body:r.slice(i+1)[0]}function _c(n,t){const e=nr(n);if(!ms(n,Ge()))return e.body;const r=gs(e.body,Ge());t==="prev"&&r.reverse();const i=r.indexOf(n);return i===-1?e.body:r.slice(i+1).find(a=>Bi(a,Ge()))??e.body}function ps(n,t,e){const r=t.toLowerCase();if(r.endsWith(" ")){const f=r.slice(0,-1);if(n.filter(w=>w.toLowerCase().startsWith(f)).length<=1)return ps(n,f,e);const m=e==null?void 0:e.toLowerCase();if(m&&m.startsWith(f)&&m.charAt(f.length)===" "&&t.trim()===f)return e;const v=n.filter(w=>w.toLowerCase().startsWith(r));if(v.length>0){const w=e?n.indexOf(e):-1;return Ao(v,Math.max(w,0)).find(T=>T!==e)||e}}const o=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,a=o.toLowerCase(),c=e?n.indexOf(e):-1;let l=Ao(n,Math.max(c,0));o.length===1&&(l=l.filter(f=>f!==e));const d=l.find(f=>f==null?void 0:f.toLowerCase().startsWith(a));return d!==e?d:void 0}function Ao(n,t){return n.map((e,r)=>n[(t+r)%n.length])}const Nc={afterMs:1e4,onChange:$};function vs(n,t){const{afterMs:e,onChange:r,getWindow:i}={...Nc,...t};let o=null,a=q(qe(n));function c(){return i().setTimeout(()=>{C(a,n,!0),r==null||r(n)},e)}return rt(()=>()=>{o&&i().clearTimeout(o)}),S(()=>g(a),l=>{C(a,l,!0),r==null||r(l),o&&i().clearTimeout(o),o=c()})}var _t,Nt,Cr,Er;class Bc{constructor(t){p(this,_t);p(this,Nt);p(this,Cr,P(()=>s(this,_t).onMatch?s(this,_t).onMatch:t=>t.focus()));p(this,Er,P(()=>s(this,_t).getCurrentItem?s(this,_t).getCurrentItem:s(this,_t).getActiveElement));F(this,_t,t),F(this,Nt,vs("",{afterMs:1e3,getWindow:t.getWindow})),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(t,e){var l,u;if(!e.length)return;s(this,Nt).current=s(this,Nt).current+t;const r=g(s(this,Er))(),i=((u=(l=e.find(d=>d===r))==null?void 0:l.textContent)==null?void 0:u.trim())??"",o=e.map(d=>{var f;return((f=d.textContent)==null?void 0:f.trim())??""}),a=ps(o,s(this,Nt).current,i),c=e.find(d=>{var f;return((f=d.textContent)==null?void 0:f.trim())===a});return c&&g(s(this,Cr))(c),c}resetTypeahead(){s(this,Nt).current=""}get search(){return s(this,Nt).current}}_t=new WeakMap,Nt=new WeakMap,Cr=new WeakMap,Er=new WeakMap;var ae,tn,Ee,Xt,ee,li,ui;class Lc{constructor(t){p(this,ee);p(this,ae);p(this,tn);p(this,Ee);p(this,Xt,q(null));F(this,ae,t),F(this,tn,P(()=>s(this,ae).enabled())),F(this,Ee,vs(!1,{afterMs:t.transitTimeout??300,onChange:e=>{var r,i;g(s(this,tn))&&((i=(r=s(this,ae)).setIsPointerInTransit)==null||i.call(r,e))},getWindow:()=>Ii(s(this,ae).triggerNode())})),gt([t.triggerNode,t.contentNode,t.enabled],([e,r,i])=>{if(!e||!r||!i)return;const o=c=>{N(this,ee,ui).call(this,c,r)},a=c=>{N(this,ee,ui).call(this,c,e)};return we(nt(e,"pointerleave",o),nt(r,"pointerleave",a))}),gt(()=>g(s(this,Xt)),()=>{const e=i=>{var u,d;if(!g(s(this,Xt)))return;const o=i.target;if(!oi(o))return;const a={x:i.clientX,y:i.clientY},c=((u=t.triggerNode())==null?void 0:u.contains(o))||((d=t.contentNode())==null?void 0:d.contains(o)),l=!Vc(a,g(s(this,Xt)));c?N(this,ee,li).call(this):l&&(N(this,ee,li).call(this),t.onPointerExit())},r=nr(t.triggerNode()??t.contentNode());if(r)return nt(r,"pointermove",e)})}}ae=new WeakMap,tn=new WeakMap,Ee=new WeakMap,Xt=new WeakMap,ee=new WeakSet,li=function(){C(s(this,Xt),null),s(this,Ee).current=!1},ui=function(t,e){const r=t.currentTarget;if(!_e(r))return;const i={x:t.clientX,y:t.clientY},o=Wc(i,r.getBoundingClientRect()),a=Kc(i,o),c=zc(e.getBoundingClientRect()),l=Hc([...a,...c]);C(s(this,Xt),l,!0),s(this,Ee).current=!0};function Wc(n,t){const e=Math.abs(t.top-n.y),r=Math.abs(t.bottom-n.y),i=Math.abs(t.right-n.x),o=Math.abs(t.left-n.x);switch(Math.min(e,r,i,o)){case o:return"left";case i:return"right";case e:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Kc(n,t,e=5){const r=e*1.5;switch(t){case"top":return[{x:n.x-e,y:n.y+e},{x:n.x,y:n.y-r},{x:n.x+e,y:n.y+e}];case"bottom":return[{x:n.x-e,y:n.y-e},{x:n.x,y:n.y+r},{x:n.x+e,y:n.y-e}];case"left":return[{x:n.x+e,y:n.y-e},{x:n.x-r,y:n.y},{x:n.x+e,y:n.y+e}];case"right":return[{x:n.x-e,y:n.y-e},{x:n.x+r,y:n.y},{x:n.x-e,y:n.y+e}]}}function zc(n){const{top:t,right:e,bottom:r,left:i}=n;return[{x:i,y:t},{x:e,y:t},{x:e,y:r},{x:i,y:r}]}function Vc(n,t){const{x:e,y:r}=n;let i=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const c=t[o].x,l=t[o].y,u=t[a].x,d=t[a].y;l>r!=d>r&&e<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Hc(n){const t=n.slice();return t.sort((e,r)=>e.x<r.x?-1:e.x>r.x?1:e.y<r.y?-1:e.y>r.y?1:0),Uc(t)}function Uc(n){if(n.length<=1)return n.slice();const t=[];for(let r=0;r<n.length;r++){const i=n[r];for(;t.length>=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const e=[];for(let r=n.length-1;r>=0;r--){const i=n[r];for(;e.length>=2;){const o=e[e.length-1],a=e[e.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))e.pop();else break}e.push(i)}return e.pop(),t.length===1&&e.length===1&&t[0].x===e[0].x&&t[0].y===e[0].y?t:t.concat(e)}const qc="data-context-menu-trigger",Gc="data-context-menu-content",ys=new Ht("Menu.Root"),Li=new Ht("Menu.Root | Menu.Sub"),Xc=new Ht("Menu.Content"),Yc=new gc("bitsmenuopen",{bubbles:!1,cancelable:!0}),jc=Di({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});var en,nn;const Ji=class Ji{constructor(t){A(this,"opts");A(this,"isUsingKeyboard",new ai);p(this,en,q(!1));p(this,nn,q(!1));A(this,"getBitsAttr",t=>jc.getAttr(t,this.opts.variant.current));this.opts=t}static create(t){const e=new Ji(t);return ys.set(e)}get ignoreCloseAutoFocus(){return g(s(this,en))}set ignoreCloseAutoFocus(t){C(s(this,en),t,!0)}get isPointerInTransit(){return g(s(this,nn))}set isPointerInTransit(t){C(s(this,nn),t,!0)}};en=new WeakMap,nn=new WeakMap;let di=Ji;var rn,on;const Qi=class Qi{constructor(t,e,r){A(this,"opts");A(this,"root");A(this,"parentMenu");A(this,"contentId",S(()=>""));p(this,rn,q(null));A(this,"contentPresence");p(this,on,q(null));this.opts=t,this.root=e,this.parentMenu=r,this.contentPresence=new oc({ref:S(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),r&&gt(()=>r.opts.open.current,()=>{r.opts.open.current||(this.opts.open.current=!1)})}static create(t,e){return Li.set(new Qi(t,e,null))}get contentNode(){return g(s(this,rn))}set contentNode(t){C(s(this,rn),t,!0)}get triggerNode(){return g(s(this,on))}set triggerNode(t){C(s(this,on),t,!0)}toggleOpen(){this.opts.open.current=!this.opts.open.current}onOpen(){this.opts.open.current=!0}onClose(){this.opts.open.current=!1}};rn=new WeakMap,on=new WeakMap;let fi=Qi;var sn,an,cn,ln,un,Qt,ws,lr,dn,fn;const $i=class $i{constructor(t,e){p(this,Qt);A(this,"opts");A(this,"parentMenu");A(this,"rovingFocusGroup");A(this,"domContext");A(this,"attachment");p(this,sn,q(""));p(this,an,0);p(this,cn);p(this,ln,q(!1));p(this,un);A(this,"onCloseAutoFocus",t=>{var e,r;(r=(e=this.opts.onCloseAutoFocus).current)==null||r.call(e,t),!(t.defaultPrevented||s(this,un))&&this.parentMenu.triggerNode&&Bi(this.parentMenu.triggerNode)&&(t.preventDefault(),this.parentMenu.triggerNode.focus())});p(this,dn,P(()=>({open:this.parentMenu.opts.open.current})));p(this,fn,P(()=>({id:this.opts.id.current,role:"menu","aria-orientation":"vertical",[this.parentMenu.root.getBitsAttr("content")]:"","data-state":qo(this.parentMenu.opts.open.current),onkeydown:this.onkeydown,onblur:this.onblur,onfocus:this.onfocus,dir:this.parentMenu.root.opts.dir.current,style:{pointerEvents:"auto",contain:"layout style"},...this.attachment})));A(this,"popperProps",{onCloseAutoFocus:t=>this.onCloseAutoFocus(t)});this.opts=t,this.parentMenu=e,this.domContext=new Xr(t.ref),this.attachment=Tt(this.opts.ref,r=>{this.parentMenu.contentNode!==r&&(this.parentMenu.contentNode=r)}),e.contentId=t.id,F(this,un,t.isSub??!1),this.onkeydown=this.onkeydown.bind(this),this.onblur=this.onblur.bind(this),this.onfocus=this.onfocus.bind(this),this.handleInteractOutside=this.handleInteractOutside.bind(this),new Lc({contentNode:()=>this.parentMenu.contentNode,triggerNode:()=>this.parentMenu.triggerNode,enabled:()=>{var r;return this.parentMenu.opts.open.current&&!!((r=this.parentMenu.triggerNode)!=null&&r.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger")))},onPointerExit:()=>{this.parentMenu.opts.open.current=!1},setIsPointerInTransit:r=>{this.parentMenu.root.isPointerInTransit=r}}),F(this,cn,new Bc({getActiveElement:()=>this.domContext.getActiveElement(),getWindow:()=>this.domContext.getWindow()}).handleTypeaheadSearch),this.rovingFocusGroup=new rc({rootNode:S(()=>this.parentMenu.contentNode),candidateAttr:this.parentMenu.root.getBitsAttr("item"),loop:this.opts.loop,orientation:S(()=>"vertical")}),gt(()=>this.parentMenu.contentNode,r=>{if(!r)return;const i=()=>{ie(()=>{this.parentMenu.root.isUsingKeyboard.current&&this.rovingFocusGroup.focusFirstCandidate()})};return Yc.listen(r,i)}),rt(()=>{this.parentMenu.opts.open.current||this.domContext.getWindow().clearTimeout(s(this,an))})}static create(t){return Xc.set(new $i(t,Li.get()))}get search(){return g(s(this,sn))}set search(t){C(s(this,sn),t,!0)}get mounted(){return g(s(this,ln))}set mounted(t){C(s(this,ln),t,!0)}handleTabKeyDown(t){let e=this.parentMenu;for(;e.parentMenu!==null;)e=e.parentMenu;if(!e.triggerNode)return;t.preventDefault();const r=Ic(e.triggerNode,t.shiftKey?"prev":"next");r?(this.parentMenu.root.ignoreCloseAutoFocus=!0,e.onClose(),ie(()=>{r.focus(),ie(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})})):this.domContext.getDocument().body.focus()}onkeydown(t){var u,d;if(t.defaultPrevented)return;if(t.key===ja){this.handleTabKeyDown(t);return}const e=t.target,r=t.currentTarget;if(!_e(e)||!_e(r))return;const i=((u=e.closest(`[${this.parentMenu.root.getBitsAttr("content")}]`))==null?void 0:u.id)===this.parentMenu.contentId.current,o=t.ctrlKey||t.altKey||t.metaKey,a=t.key.length===1;if(this.rovingFocusGroup.handleKeydown(e,t)||t.code==="Space")return;const l=N(this,Qt,ws).call(this);i&&!o&&a&&s(this,cn).call(this,t.key,l),((d=t.target)==null?void 0:d.id)===this.parentMenu.contentId.current&&vc.includes(t.key)&&(t.preventDefault(),os.includes(t.key)&&l.reverse(),wc(l,{select:!1},()=>this.domContext.getActiveElement()))}onblur(t){var e,r;oi(t.currentTarget)&&oi(t.target)&&((r=(e=t.currentTarget).contains)!=null&&r.call(e,t.target)||(this.domContext.getWindow().clearTimeout(s(this,an)),this.search=""))}onfocus(t){this.parentMenu.root.isUsingKeyboard.current&&ie(()=>this.rovingFocusGroup.focusFirstCandidate())}onItemEnter(){return N(this,Qt,lr).call(this)}onItemLeave(t){if(t.currentTarget.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger"))||N(this,Qt,lr).call(this)||this.parentMenu.root.isUsingKeyboard.current)return;const e=this.parentMenu.contentNode;e==null||e.focus(),this.rovingFocusGroup.setCurrentTabStopId("")}onTriggerLeave(){return!!N(this,Qt,lr).call(this)}handleInteractOutside(t){var r;if(!ns(t.target))return;const e=(r=this.parentMenu.triggerNode)==null?void 0:r.id;if(t.target.id===e){t.preventDefault();return}t.target.closest(`#${e}`)&&t.preventDefault()}get shouldRender(){return this.parentMenu.contentPresence.shouldRender}get snippetProps(){return g(s(this,dn))}set snippetProps(t){C(s(this,dn),t)}get props(){return g(s(this,fn))}set props(t){C(s(this,fn),t)}};sn=new WeakMap,an=new WeakMap,cn=new WeakMap,ln=new WeakMap,un=new WeakMap,Qt=new WeakSet,ws=function(){const t=this.parentMenu.contentNode;return t?Array.from(t.querySelectorAll(`[${this.parentMenu.root.getBitsAttr("item")}]:not([data-disabled])`)):[]},lr=function(){return this.parentMenu.root.isPointerInTransit},dn=new WeakMap,fn=new WeakMap;let hi=$i;var hn;const to=class to{constructor(t,e){A(this,"opts");A(this,"root");A(this,"attachment");p(this,hn,P(()=>({id:this.opts.id.current,role:"group",[this.root.getBitsAttr("separator")]:"",...this.attachment})));this.opts=t,this.root=e,this.attachment=Tt(this.opts.ref)}static create(t){return new to(t,ys.get())}get props(){return g(s(this,hn))}set props(t){C(s(this,hn),t)}};hn=new WeakMap;let gi=to;var Tr,gn;const eo=class eo{constructor(t,e){A(this,"opts");A(this,"parentMenu");A(this,"attachment");A(this,"onclick",t=>{this.opts.disabled.current||t.detail!==0||(this.parentMenu.toggleOpen(),t.preventDefault())});A(this,"onpointerdown",t=>{if(!this.opts.disabled.current){if(t.pointerType==="touch")return t.preventDefault();t.button===0&&t.ctrlKey===!1&&(this.parentMenu.toggleOpen(),this.parentMenu.opts.open.current||t.preventDefault())}});A(this,"onpointerup",t=>{this.opts.disabled.current||t.pointerType==="touch"&&(t.preventDefault(),this.parentMenu.toggleOpen())});A(this,"onkeydown",t=>{if(!this.opts.disabled.current){if(t.key===ts||t.key===Qo){this.parentMenu.toggleOpen(),t.preventDefault();return}t.key===Xe&&(this.parentMenu.onOpen(),t.preventDefault())}});p(this,Tr,P(()=>{if(this.parentMenu.opts.open.current&&this.parentMenu.contentId.current)return this.parentMenu.contentId.current}));p(this,gn,P(()=>({id:this.opts.id.current,disabled:this.opts.disabled.current,"aria-haspopup":"menu","aria-expanded":Go(this.parentMenu.opts.open.current),"aria-controls":g(s(this,Tr)),"data-disabled":ni(this.opts.disabled.current),"data-state":qo(this.parentMenu.opts.open.current),[this.parentMenu.root.getBitsAttr("trigger")]:"",onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown,...this.attachment})));this.opts=t,this.parentMenu=e,this.attachment=Tt(this.opts.ref,r=>this.parentMenu.triggerNode=r)}static create(t){return new eo(t,Li.get())}get props(){return g(s(this,gn))}set props(t){C(s(this,gn),t)}};Tr=new WeakMap,gn=new WeakMap;let mi=eo;globalThis.bitsDismissableLayers??(globalThis.bitsDismissableLayers=new Map);var Te,ce,Yt,ke,Fe,jt,mn,Bt,kr,Be,bs,Fr,Me,Mr,Rr,Dr,Ir,pn,xs,_r,Nr;const no=class no{constructor(t){p(this,Be);A(this,"opts");p(this,Te);p(this,ce);p(this,Yt,{pointerdown:!1});p(this,ke,!1);p(this,Fe,!1);p(this,jt);p(this,mn);p(this,Bt,$);p(this,kr,t=>{t.defaultPrevented||this.opts.ref.current&&ie(()=>{var e,r;!this.opts.ref.current||s(this,Ir).call(this,t.target)||t.target&&!s(this,Fe)&&((r=(e=s(this,mn)).current)==null||r.call(e,t))})});p(this,Fr,t=>{let e=t;e.defaultPrevented&&(e=Oo(t)),s(this,Te).current(t)});p(this,Me,xo(t=>{if(!this.opts.ref.current){s(this,Bt).call(this);return}const e=this.opts.isValidEvent.current(t,this.opts.ref.current)||Qc(t,this.opts.ref.current);if(!s(this,ke)||N(this,Be,xs).call(this)||!e){s(this,Bt).call(this);return}let r=t;if(r.defaultPrevented&&(r=Oo(r)),s(this,ce).current!=="close"&&s(this,ce).current!=="defer-otherwise-close"){s(this,Bt).call(this);return}t.pointerType==="touch"?(s(this,Bt).call(this),F(this,Bt,nt(s(this,jt),"click",s(this,Fr),{once:!0}))):s(this,Te).current(r)},10));p(this,Mr,t=>{s(this,Yt)[t.type]=!0});p(this,Rr,t=>{s(this,Yt)[t.type]=!1});p(this,Dr,()=>{this.opts.ref.current&&F(this,ke,Jc(this.opts.ref.current))});p(this,Ir,t=>this.opts.ref.current?rs(this.opts.ref.current,t):!1);p(this,pn,xo(()=>{for(const t in s(this,Yt))s(this,Yt)[t]=!1;F(this,ke,!1)},20));p(this,_r,()=>{F(this,Fe,!0)});p(this,Nr,()=>{F(this,Fe,!1)});A(this,"props",{onfocuscapture:s(this,_r),onblurcapture:s(this,Nr)});this.opts=t,F(this,ce,t.interactOutsideBehavior),F(this,Te,t.onInteractOutside),F(this,mn,t.onFocusOutside),rt(()=>{F(this,jt,is(this.opts.ref.current))});let e=$;const r=()=>{s(this,pn).call(this),globalThis.bitsDismissableLayers.delete(this),s(this,Me).destroy(),e()};gt([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return La(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,s(this,ce)),e(),e=N(this,Be,bs).call(this))}),r}),er(()=>{s(this,pn).destroy(),globalThis.bitsDismissableLayers.delete(this),s(this,Me).destroy(),s(this,Bt).call(this),e()})}static create(t){return new no(t)}};Te=new WeakMap,ce=new WeakMap,Yt=new WeakMap,ke=new WeakMap,Fe=new WeakMap,jt=new WeakMap,mn=new WeakMap,Bt=new WeakMap,kr=new WeakMap,Be=new WeakSet,bs=function(){return we(nt(s(this,jt),"pointerdown",we(s(this,Mr),s(this,Dr)),{capture:!0}),nt(s(this,jt),"pointerdown",we(s(this,Rr),s(this,Me))),nt(s(this,jt),"focusin",s(this,kr)))},Fr=new WeakMap,Me=new WeakMap,Mr=new WeakMap,Rr=new WeakMap,Dr=new WeakMap,Ir=new WeakMap,pn=new WeakMap,xs=function(){return Object.values(s(this,Yt)).some(Boolean)},_r=new WeakMap,Nr=new WeakMap;let pi=no;function Zc(n=[...globalThis.bitsDismissableLayers]){return n.findLast(([t,{current:e}])=>e==="close"||e==="ignore")}function Jc(n){const t=[...globalThis.bitsDismissableLayers],e=Zc(t);if(e)return e[0].opts.ref.current===n;const[r]=t[0];return r.opts.ref.current===n}function Qc(n,t){const e=n.target;if(!ns(e))return!1;const r=!!e.closest(`[${qc}]`);if("button"in n&&n.button>0&&!r)return!1;if("button"in n&&n.button===0&&r)return!0;const i=!!t.closest(`[${Gc}]`);return r&&i?!1:is(e).documentElement.contains(e)&&!rs(t,e)&&mc(n,t)}function Oo(n){const t=n.currentTarget,e=n.target;let r;n instanceof PointerEvent?r=new PointerEvent(n.type,n):r=new PointerEvent("pointerdown",n);let i=!1;return new Proxy(r,{get:(a,c)=>c==="currentTarget"?t:c==="target"?e:c==="preventDefault"?()=>{i=!0,typeof a.preventDefault=="function"&&a.preventDefault()}:c==="defaultPrevented"?i:c in a?a[c]:n[c]})}function $c(n,t){H(t,!0);let e=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"onInteractOutside",3,$),i=y(t,"onFocusOutside",3,$),o=y(t,"isValidEvent",3,()=>!1);const a=pi.create({id:S(()=>t.id),interactOutsideBehavior:S(()=>e()),onInteractOutside:S(()=>r()),enabled:S(()=>t.enabled),onFocusOutside:S(()=>i()),isValidEvent:S(()=>o()),ref:t.ref});var c=D(),l=R(c);V(l,()=>t.children??Q,()=>({props:a.props})),E(n,c),U()}globalThis.bitsEscapeLayers??(globalThis.bitsEscapeLayers=new Map);var Br,Lr;const ro=class ro{constructor(t){A(this,"opts");A(this,"domContext");p(this,Br,()=>nt(this.domContext.getDocument(),"keydown",s(this,Lr),{passive:!1}));p(this,Lr,t=>{if(t.key!==Ga||!tl(this))return;const e=new KeyboardEvent(t.type,t);t.preventDefault();const r=this.opts.escapeKeydownBehavior.current;r!=="close"&&r!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(e)});this.opts=t,this.domContext=new Xr(this.opts.ref);let e=$;gt(()=>t.enabled.current,r=>(r&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),e=s(this,Br).call(this)),()=>{e(),globalThis.bitsEscapeLayers.delete(this)}))}static create(t){return new ro(t)}};Br=new WeakMap,Lr=new WeakMap;let vi=ro;function tl(n){const t=[...globalThis.bitsEscapeLayers],e=t.findLast(([i,{current:o}])=>o==="close"||o==="ignore");if(e)return e[0]===n;const[r]=t[0];return r===n}function el(n,t){H(t,!0);let e=y(t,"escapeKeydownBehavior",3,"close"),r=y(t,"onEscapeKeydown",3,$);vi.create({escapeKeydownBehavior:S(()=>e()),onEscapeKeydown:S(()=>r()),enabled:S(()=>t.enabled),ref:t.ref});var i=D(),o=R(i);V(o,()=>t.children??Q),E(n,i),U()}var Lt,vn,le;const Wr=class Wr{constructor(){p(this,Lt,Wt([]));p(this,vn,new WeakMap);p(this,le,new WeakMap)}static getInstance(){return this.instance||(this.instance=new Wr),this.instance}register(t){const e=this.getActive();e&&e!==t&&e.pause();const r=document.activeElement;r&&r!==document.body&&s(this,le).set(t,r),s(this,Lt).current=s(this,Lt).current.filter(i=>i!==t),s(this,Lt).current.unshift(t)}unregister(t){s(this,Lt).current=s(this,Lt).current.filter(r=>r!==t);const e=this.getActive();e&&e.resume()}getActive(){return s(this,Lt).current[0]}setFocusMemory(t,e){s(this,vn).set(t,e)}getFocusMemory(t){return s(this,vn).get(t)}isActiveScope(t){return this.getActive()===t}setPreFocusMemory(t,e){s(this,le).set(t,e)}getPreFocusMemory(t){return s(this,le).get(t)}clearPreFocusMemory(t){s(this,le).delete(t)}};Lt=new WeakMap,vn=new WeakMap,le=new WeakMap,A(Wr,"instance");let yi=Wr;var Zt,ot,ut,ue,Jt,tt,Ss,As,Os,Ps,bi,ur,xi;const io=class io{constructor(t){p(this,tt);p(this,Zt,!1);p(this,ot,null);p(this,ut,yi.getInstance());p(this,ue,[]);p(this,Jt);F(this,Jt,t)}get paused(){return s(this,Zt)}pause(){F(this,Zt,!0)}resume(){F(this,Zt,!1)}mount(t){s(this,ot)&&this.unmount(),F(this,ot,t),s(this,ut).register(this),N(this,tt,Ps).call(this),N(this,tt,As).call(this)}unmount(){s(this,ot)&&(N(this,tt,Ss).call(this),N(this,tt,Os).call(this),s(this,ut).unregister(this),s(this,ut).clearPreFocusMemory(this),F(this,ot,null))}static use(t){let e=null;return gt([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(e||(e=new io(t)),e.mount(r)):e&&(e.unmount(),e=null)}),er(()=>{e==null||e.unmount()}),{get props(){return{tabindex:-1}}}}};Zt=new WeakMap,ot=new WeakMap,ut=new WeakMap,ue=new WeakMap,Jt=new WeakMap,tt=new WeakSet,Ss=function(){for(const t of s(this,ue))t();F(this,ue,[])},As=function(){if(!s(this,ot))return;const t=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});s(this,Jt).onOpenAutoFocus.current(t),t.defaultPrevented||requestAnimationFrame(()=>{if(!s(this,ot))return;const e=N(this,tt,ur).call(this);e?(e.focus(),s(this,ut).setFocusMemory(this,e)):s(this,ot).focus()})},Os=function(){var e,r;const t=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if((r=(e=s(this,Jt).onCloseAutoFocus).current)==null||r.call(e,t),!t.defaultPrevented){const i=s(this,ut).getPreFocusMemory(this);if(i&&document.contains(i))try{i.focus()}catch{document.body.focus()}}},Ps=function(){if(!s(this,ot)||!s(this,Jt).trap.current)return;const t=s(this,ot),e=t.ownerDocument,r=a=>{if(s(this,Zt)||!s(this,ut).isActiveScope(this))return;const c=a.target;if(!c)return;if(t.contains(c))s(this,ut).setFocusMemory(this,c);else{const u=s(this,ut).getFocusMemory(this);if(u&&t.contains(u)&&ms(u))a.preventDefault(),u.focus();else{const d=N(this,tt,ur).call(this),f=N(this,tt,xi).call(this)[0];(d||f||t).focus()}}},i=a=>{if(!s(this,Jt).loop||s(this,Zt)||a.key!=="Tab"||!s(this,ut).isActiveScope(this))return;const c=N(this,tt,bi).call(this);if(c.length===0)return;const l=c[0],u=c[c.length-1];!a.shiftKey&&e.activeElement===u?(a.preventDefault(),l.focus()):a.shiftKey&&e.activeElement===l&&(a.preventDefault(),u.focus())};s(this,ue).push(nt(e,"focusin",r,{capture:!0}),nt(t,"keydown",i));const o=new MutationObserver(()=>{const a=s(this,ut).getFocusMemory(this);if(a&&!t.contains(a)){const c=N(this,tt,ur).call(this),l=N(this,tt,xi).call(this)[0],u=c||l;u?(u.focus(),s(this,ut).setFocusMemory(this,u)):t.focus()}});o.observe(t,{childList:!0,subtree:!0}),s(this,ue).push(()=>o.disconnect())},bi=function(){return s(this,ot)?hs(s(this,ot),{includeContainer:!1,getShadowRoot:!0}):[]},ur=function(){return N(this,tt,bi).call(this)[0]||null},xi=function(){return s(this,ot)?gs(s(this,ot),{includeContainer:!1,getShadowRoot:!0}):[]};let wi=io;function nl(n,t){H(t,!0);let e=y(t,"enabled",3,!1),r=y(t,"trapFocus",3,!1),i=y(t,"loop",3,!1),o=y(t,"onCloseAutoFocus",3,$),a=y(t,"onOpenAutoFocus",3,$);const c=wi.use({enabled:S(()=>e()),trap:S(()=>r()),loop:i(),onCloseAutoFocus:S(()=>o()),onOpenAutoFocus:S(()=>a()),ref:t.ref});var l=D(),u=R(l);V(u,()=>t.focusScope??Q,()=>({props:c.props})),E(n,l),U()}globalThis.bitsTextSelectionLayers??(globalThis.bitsTextSelectionLayers=new Map);var Re,Kr,Cs,zr,yn;const oo=class oo{constructor(t){p(this,Kr);A(this,"opts");A(this,"domContext");p(this,Re,$);p(this,zr,t=>{const e=this.opts.ref.current,r=t.target;!_e(e)||!_e(r)||!this.opts.enabled.current||!il(this)||!Ua(e,r)||(this.opts.onPointerDown.current(t),!t.defaultPrevented&&F(this,Re,rl(e,this.domContext.getDocument().body)))});p(this,yn,()=>{s(this,Re).call(this),F(this,Re,$)});this.opts=t,this.domContext=new Xr(t.ref);let e=$;gt(()=>this.opts.enabled.current,r=>(r&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),e(),e=N(this,Kr,Cs).call(this)),()=>{e(),s(this,yn).call(this),globalThis.bitsTextSelectionLayers.delete(this)}))}static create(t){return new oo(t)}};Re=new WeakMap,Kr=new WeakSet,Cs=function(){return we(nt(this.domContext.getDocument(),"pointerdown",s(this,zr)),nt(this.domContext.getDocument(),"pointerup",ba(s(this,yn),this.opts.onPointerUp.current)))},zr=new WeakMap,yn=new WeakMap;let Si=oo;const Po=n=>n.style.userSelect||n.style.webkitUserSelect;function rl(n,t){const e=Po(t),r=Po(n);return ir(t,"none"),ir(n,"text"),()=>{ir(t,e),ir(n,r)}}function ir(n,t){n.style.userSelect=t,n.style.webkitUserSelect=t}function il(n){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const e=t.at(-1);return e?e[0]===n:!1}function ol(n,t){H(t,!0);let e=y(t,"preventOverflowTextSelection",3,!0),r=y(t,"onPointerDown",3,$),i=y(t,"onPointerUp",3,$);Si.create({id:S(()=>t.id),onPointerDown:S(()=>r()),onPointerUp:S(()=>i()),enabled:S(()=>t.enabled&&e()),ref:t.ref});var o=D(),a=R(o);V(a,()=>t.children??Q),E(n,o),U()}globalThis.bitsIdCounter??(globalThis.bitsIdCounter={current:0});function Wi(n="bits"){return globalThis.bitsIdCounter.current++,`${n}-${globalThis.bitsIdCounter.current}`}var wn,De,de,fe,Vr,Es;class sl{constructor(t){p(this,Vr);p(this,wn);p(this,De,0);p(this,de,q());p(this,fe);F(this,wn,t)}get(...t){return F(this,De,s(this,De)+1),g(s(this,de))===void 0&&F(this,fe,Vo(()=>{C(s(this,de),s(this,wn).call(this,...t),!0)})),rt(()=>()=>{N(this,Vr,Es).call(this)}),g(s(this,de))}}wn=new WeakMap,De=new WeakMap,de=new WeakMap,fe=new WeakMap,Vr=new WeakSet,Es=function(){F(this,De,s(this,De)-1),s(this,fe)&&s(this,De)<=0&&(s(this,fe).call(this),C(s(this,de),void 0),F(this,fe,void 0))};const dr=new ri;let or=q(null),ne=null,Ve=null,He=!1;const Co=S(()=>{for(const n of dr.values())if(n)return!0;return!1});let ti=null;const al=new sl(()=>{function n(){document.body.setAttribute("style",g(or)??""),document.body.style.removeProperty("--scrollbar-width"),bo&&(ne==null||ne()),C(or,null)}function t(){Ve!==null&&(window.clearTimeout(Ve),Ve=null)}function e(i,o){t(),He=!0,ti=Date.now();const a=ti,c=()=>{Ve=null,ti===a&&(Ts(dr)?He=!1:(He=!1,o()))},l=i===null?24:i;Ve=window.setTimeout(c,l)}function r(){g(or)===null&&dr.size===0&&!He&&C(or,document.body.getAttribute("style"),!0)}return gt(()=>Co.current,()=>{var d,f;if(!Co.current)return;r(),He=!1;const i=getComputedStyle(document.documentElement),o=getComputedStyle(document.body),a=((d=i.scrollbarGutter)==null?void 0:d.includes("stable"))||((f=o.scrollbarGutter)==null?void 0:f.includes("stable")),c=window.innerWidth-document.documentElement.clientWidth,u={padding:Number.parseInt(o.paddingRight??"0",10)+c,margin:Number.parseInt(o.marginRight??"0",10)};c>0&&!a&&(document.body.style.paddingRight=`${u.padding}px`,document.body.style.marginRight=`${u.margin}px`,document.body.style.setProperty("--scrollbar-width",`${c}px`)),document.body.style.overflow="hidden",bo&&(ne=nt(document,"touchmove",h=>{h.target===document.documentElement&&(h.touches.length>1||h.preventDefault())},{passive:!1})),ie(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),er(()=>()=>{ne==null||ne()}),{get lockMap(){return dr},resetBodyStyle:n,scheduleCleanupIfNoNewLocks:e,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}});var he,bn,xn,dt;class cl{constructor(t,e=()=>null){p(this,he,Wi());p(this,bn);p(this,xn,()=>null);p(this,dt);A(this,"locked");F(this,bn,t),F(this,xn,e),F(this,dt,al.get()),s(this,dt)&&(s(this,dt).cancelPendingCleanup(),s(this,dt).ensureInitialStyleCaptured(),s(this,dt).lockMap.set(s(this,he),s(this,bn)??!1),this.locked=S(()=>s(this,dt).lockMap.get(s(this,he))??!1,r=>s(this,dt).lockMap.set(s(this,he),r)),er(()=>{if(s(this,dt).lockMap.delete(s(this,he)),Ts(s(this,dt).lockMap))return;const r=s(this,xn).call(this);s(this,dt).scheduleCleanupIfNoNewLocks(r,()=>{s(this,dt).resetBodyStyle()})}))}}he=new WeakMap,bn=new WeakMap,xn=new WeakMap,dt=new WeakMap;function Ts(n){for(const[t,e]of n)if(e)return!0;return!1}function Eo(n,t){H(t,!0);let e=y(t,"preventScroll",3,!0),r=y(t,"restoreScrollDelay",3,null);e()&&new cl(e(),()=>r()),U()}const ks=Di({component:"avatar",parts:["root","image","fallback"]}),Fs=new Ht("Avatar.Root");var Sn;const so=class so{constructor(t){A(this,"opts");A(this,"domContext");A(this,"attachment");p(this,Sn,P(()=>({id:this.opts.id.current,[ks.root]:"","data-status":this.opts.loadingStatus.current,...this.attachment})));this.opts=t,this.domContext=new Xr(this.opts.ref),this.loadImage=this.loadImage.bind(this),this.attachment=Tt(this.opts.ref)}static create(t){return Fs.set(new so(t))}loadImage(t,e,r){if(this.opts.loadingStatus.current==="loaded")return;let i;const o=new Image;return o.src=t,e!==void 0&&(o.crossOrigin=e),r&&(o.referrerPolicy=r),this.opts.loadingStatus.current="loading",o.onload=()=>{i=this.domContext.setTimeout(()=>{this.opts.loadingStatus.current="loaded"},this.opts.delayMs.current)},o.onerror=()=>{this.opts.loadingStatus.current="error"},()=>{i&&this.domContext.clearTimeout(i)}}get props(){return g(s(this,Sn))}set props(t){C(s(this,Sn),t)}};Sn=new WeakMap;let Ai=so;var An,On;const ao=class ao{constructor(t,e){A(this,"opts");A(this,"root");A(this,"attachment");p(this,An,P(()=>this.root.opts.loadingStatus.current==="loaded"?{display:"none"}:void 0));p(this,On,P(()=>({style:this.style,"data-status":this.root.opts.loadingStatus.current,[ks.fallback]:"",...this.attachment})));this.opts=t,this.root=e,this.attachment=Tt(this.opts.ref)}static create(t){return new ao(t,Fs.get())}get style(){return g(s(this,An))}set style(t){C(s(this,An),t)}get props(){return g(s(this,On))}set props(t){C(s(this,On),t)}};An=new WeakMap,On=new WeakMap;let Oi=ao;var ll=at("<div><!></div>");function ul(n,t){const e=pe();H(t,!0);let r=y(t,"delayMs",3,0),i=y(t,"loadingStatus",15,"loading"),o=y(t,"id",19,()=>ve(e)),a=y(t,"ref",15,null),c=et(t,["$$slots","$$events","$$legacy","delayMs","loadingStatus","onLoadingStatusChange","child","children","id","ref"]);const l=Ai.create({delayMs:S(()=>r()),loadingStatus:S(()=>i(),v=>{var w;i()!==v&&(i(v),(w=t.onLoadingStatusChange)==null||w.call(t,v))}),id:S(()=>o()),ref:S(()=>a(),v=>a(v))}),u=P(()=>wt(c,l.props));var d=D(),f=R(d);{var h=v=>{var w=D(),x=R(w);V(x,()=>t.child,()=>({props:g(u)})),E(v,w)},m=v=>{var w=ll();yt(w,()=>({...g(u)}));var x=ft(w);V(x,()=>t.children??Q),ht(w),E(v,w)};st(f,v=>{t.child?v(h):v(m,!1)})}E(n,d),U()}var dl=at("<span><!></span>");function fl(n,t){const e=pe();H(t,!0);let r=y(t,"id",19,()=>ve(e)),i=y(t,"ref",15,null),o=et(t,["$$slots","$$events","$$legacy","children","child","id","ref"]);const a=Oi.create({id:S(()=>r()),ref:S(()=>i(),h=>i(h))}),c=P(()=>wt(o,a.props));var l=D(),u=R(l);{var d=h=>{var m=D(),v=R(m);V(v,()=>t.child,()=>({props:g(c)})),E(h,m)},f=h=>{var m=dl();yt(m,()=>({...g(c)}));var v=ft(m);V(v,()=>t.children??Q),ht(m),E(h,m)};st(u,h=>{t.child?h(d):h(f,!1)})}E(n,l),U()}var hl=at("<input/>"),gl=at("<input/>");function ml(n,t){H(t,!0);let e=y(t,"value",15),r=et(t,["$$slots","$$events","$$legacy","value"]);const i=P(()=>wt(r,{"aria-hidden":"true",tabindex:-1,style:Ma}));var o=D(),a=R(o);{var c=u=>{var d=hl();yt(d,()=>({...g(i),value:e()}),void 0,void 0,void 0,void 0,!0),E(u,d)},l=u=>{var d=gl();yt(d,()=>({...g(i)}),void 0,void 0,void 0,void 0,!0),xa(d,e),E(u,d)};st(a,u=>{g(i).type==="checkbox"?u(c):u(l,!1)})}E(n,o),U()}const pl=["top","right","bottom","left"],$t=Math.min,mt=Math.max,yr=Math.round,sr=Math.floor,kt=n=>({x:n,y:n}),vl={left:"right",right:"left",bottom:"top",top:"bottom"},yl={start:"end",end:"start"};function Pi(n,t,e){return mt(n,$t(t,e))}function zt(n,t){return typeof n=="function"?n(t):n}function Vt(n){return n.split("-")[0]}function Le(n){return n.split("-")[1]}function Ki(n){return n==="x"?"y":"x"}function zi(n){return n==="y"?"height":"width"}const wl=new Set(["top","bottom"]);function Et(n){return wl.has(Vt(n))?"y":"x"}function Vi(n){return Ki(Et(n))}function bl(n,t,e){e===void 0&&(e=!1);const r=Le(n),i=Vi(n),o=zi(i);let a=i==="x"?r===(e?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=wr(a)),[a,wr(a)]}function xl(n){const t=wr(n);return[Ci(n),t,Ci(t)]}function Ci(n){return n.replace(/start|end/g,t=>yl[t])}const To=["left","right"],ko=["right","left"],Sl=["top","bottom"],Al=["bottom","top"];function Ol(n,t,e){switch(n){case"top":case"bottom":return e?t?ko:To:t?To:ko;case"left":case"right":return t?Sl:Al;default:return[]}}function Pl(n,t,e,r){const i=Le(n);let o=Ol(Vt(n),e==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Ci)))),o}function wr(n){return n.replace(/left|right|bottom|top/g,t=>vl[t])}function Cl(n){return{top:0,right:0,bottom:0,left:0,...n}}function Ms(n){return typeof n!="number"?Cl(n):{top:n,right:n,bottom:n,left:n}}function br(n){const{x:t,y:e,width:r,height:i}=n;return{width:r,height:i,top:e,left:t,right:t+r,bottom:e+i,x:t,y:e}}function Fo(n,t,e){let{reference:r,floating:i}=n;const o=Et(t),a=Vi(t),c=zi(a),l=Vt(t),u=o==="y",d=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[c]/2-i[c]/2;let m;switch(l){case"top":m={x:d,y:r.y-i.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-i.width,y:f};break;default:m={x:r.x,y:r.y}}switch(Le(t)){case"start":m[a]-=h*(e&&u?-1:1);break;case"end":m[a]+=h*(e&&u?-1:1);break}return m}async function El(n,t){var e;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:c,strategy:l}=n,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=zt(t,n),v=Ms(m),x=c[h?f==="floating"?"reference":"floating":f],O=br(await o.getClippingRect({element:(e=await(o.isElement==null?void 0:o.isElement(x)))==null||e?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:l})),T=f==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),b=await(o.isElement==null?void 0:o.isElement(k))?await(o.getScale==null?void 0:o.getScale(k))||{x:1,y:1}:{x:1,y:1},M=br(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:T,offsetParent:k,strategy:l}):T);return{top:(O.top-M.top+v.top)/b.y,bottom:(M.bottom-O.bottom+v.bottom)/b.y,left:(O.left-M.left+v.left)/b.x,right:(M.right-O.right+v.right)/b.x}}const Tl=async(n,t,e)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=e,c=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:n,floating:t,strategy:i}),{x:d,y:f}=Fo(u,r,l),h=r,m={},v=0;for(let x=0;x<c.length;x++){var w;const{name:O,fn:T}=c[x],{x:k,y:b,data:M,reset:_}=await T({x:d,y:f,initialPlacement:r,placement:h,strategy:i,middlewareData:m,rects:u,platform:{...a,detectOverflow:(w=a.detectOverflow)!=null?w:El},elements:{reference:n,floating:t}});d=k??d,f=b??f,m={...m,[O]:{...m[O],...M}},_&&v<=50&&(v++,typeof _=="object"&&(_.placement&&(h=_.placement),_.rects&&(u=_.rects===!0?await a.getElementRects({reference:n,floating:t,strategy:i}):_.rects),{x:d,y:f}=Fo(u,h,l)),x=-1)}return{x:d,y:f,placement:h,strategy:i,middlewareData:m}},kl=n=>({name:"arrow",options:n,async fn(t){const{x:e,y:r,placement:i,rects:o,platform:a,elements:c,middlewareData:l}=t,{element:u,padding:d=0}=zt(n,t)||{};if(u==null)return{};const f=Ms(d),h={x:e,y:r},m=Vi(i),v=zi(m),w=await a.getDimensions(u),x=m==="y",O=x?"top":"left",T=x?"bottom":"right",k=x?"clientHeight":"clientWidth",b=o.reference[v]+o.reference[m]-h[m]-o.floating[v],M=h[m]-o.reference[m],_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let I=_?_[k]:0;(!I||!await(a.isElement==null?void 0:a.isElement(_)))&&(I=c.floating[k]||o.floating[v]);const Y=b/2-M/2,B=I/2-w[v]/2-1,K=$t(f[O],B),Z=$t(f[T],B),J=K,L=I-w[v]-Z,z=I/2-w[v]/2+Y,X=Pi(J,z,L),W=!l.arrow&&Le(i)!=null&&z!==X&&o.reference[v]/2-(z<J?K:Z)-w[v]/2<0,G=W?z<J?z-J:z-L:0;return{[m]:h[m]+G,data:{[m]:X,centerOffset:z-X-G,...W&&{alignmentOffset:G}},reset:W}}}),Fl=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(t){var e,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:c,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:w=!0,...x}=zt(n,t);if((e=o.arrow)!=null&&e.alignmentOffset)return{};const O=Vt(i),T=Et(c),k=Vt(c)===c,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),M=h||(k||!w?[wr(c)]:xl(c)),_=v!=="none";!h&&_&&M.push(...Pl(c,w,v,b));const I=[c,...M],Y=await l.detectOverflow(t,x),B=[];let K=((r=o.flip)==null?void 0:r.overflows)||[];if(d&&B.push(Y[O]),f){const z=bl(i,a,b);B.push(Y[z[0]],Y[z[1]])}if(K=[...K,{placement:i,overflows:B}],!B.every(z=>z<=0)){var Z,J;const z=(((Z=o.flip)==null?void 0:Z.index)||0)+1,X=I[z];if(X&&(!(f==="alignment"?T!==Et(X):!1)||K.every(j=>Et(j.placement)===T?j.overflows[0]>0:!0)))return{data:{index:z,overflows:K},reset:{placement:X}};let W=(J=K.filter(G=>G.overflows[0]<=0).sort((G,j)=>G.overflows[1]-j.overflows[1])[0])==null?void 0:J.placement;if(!W)switch(m){case"bestFit":{var L;const G=(L=K.filter(j=>{if(_){const bt=Et(j.placement);return bt===T||bt==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(bt=>bt>0).reduce((bt,Qr)=>bt+Qr,0)]).sort((j,bt)=>j[1]-bt[1])[0])==null?void 0:L[0];G&&(W=G);break}case"initialPlacement":W=c;break}if(i!==W)return{reset:{placement:W}}}return{}}}};function Mo(n,t){return{top:n.top-t.height,right:n.right-t.width,bottom:n.bottom-t.height,left:n.left-t.width}}function Ro(n){return pl.some(t=>n[t]>=0)}const Ml=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(t){const{rects:e,platform:r}=t,{strategy:i="referenceHidden",...o}=zt(n,t);switch(i){case"referenceHidden":{const a=await r.detectOverflow(t,{...o,elementContext:"reference"}),c=Mo(a,e.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Ro(c)}}}case"escaped":{const a=await r.detectOverflow(t,{...o,altBoundary:!0}),c=Mo(a,e.floating);return{data:{escapedOffsets:c,escaped:Ro(c)}}}default:return{}}}}},Rs=new Set(["left","top"]);async function Rl(n,t){const{placement:e,platform:r,elements:i}=n,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Vt(e),c=Le(e),l=Et(e)==="y",u=Rs.has(a)?-1:1,d=o&&l?-1:1,f=zt(t,n);let{mainAxis:h,crossAxis:m,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof v=="number"&&(m=c==="end"?v*-1:v),l?{x:m*d,y:h*u}:{x:h*u,y:m*d}}const Dl=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(t){var e,r;const{x:i,y:o,placement:a,middlewareData:c}=t,l=await Rl(t,n);return a===((e=c.offset)==null?void 0:e.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},Il=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(t){const{x:e,y:r,placement:i,platform:o}=t,{mainAxis:a=!0,crossAxis:c=!1,limiter:l={fn:O=>{let{x:T,y:k}=O;return{x:T,y:k}}},...u}=zt(n,t),d={x:e,y:r},f=await o.detectOverflow(t,u),h=Et(Vt(i)),m=Ki(h);let v=d[m],w=d[h];if(a){const O=m==="y"?"top":"left",T=m==="y"?"bottom":"right",k=v+f[O],b=v-f[T];v=Pi(k,v,b)}if(c){const O=h==="y"?"top":"left",T=h==="y"?"bottom":"right",k=w+f[O],b=w-f[T];w=Pi(k,w,b)}const x=l.fn({...t,[m]:v,[h]:w});return{...x,data:{x:x.x-e,y:x.y-r,enabled:{[m]:a,[h]:c}}}}}},_l=function(n){return n===void 0&&(n={}),{options:n,fn(t){const{x:e,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=zt(n,t),d={x:e,y:r},f=Et(i),h=Ki(f);let m=d[h],v=d[f];const w=zt(c,t),x=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const k=h==="y"?"height":"width",b=o.reference[h]-o.floating[k]+x.mainAxis,M=o.reference[h]+o.reference[k]-x.mainAxis;m<b?m=b:m>M&&(m=M)}if(u){var O,T;const k=h==="y"?"width":"height",b=Rs.has(Vt(i)),M=o.reference[f]-o.floating[k]+(b&&((O=a.offset)==null?void 0:O[f])||0)+(b?0:x.crossAxis),_=o.reference[f]+o.reference[k]+(b?0:((T=a.offset)==null?void 0:T[f])||0)-(b?x.crossAxis:0);v<M?v=M:v>_&&(v=_)}return{[h]:m,[f]:v}}}},Nl=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(t){var e,r;const{placement:i,rects:o,platform:a,elements:c}=t,{apply:l=()=>{},...u}=zt(n,t),d=await a.detectOverflow(t,u),f=Vt(i),h=Le(i),m=Et(i)==="y",{width:v,height:w}=o.floating;let x,O;f==="top"||f==="bottom"?(x=f,O=h===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(O=f,x=h==="end"?"top":"bottom");const T=w-d.top-d.bottom,k=v-d.left-d.right,b=$t(w-d[x],T),M=$t(v-d[O],k),_=!t.middlewareData.shift;let I=b,Y=M;if((e=t.middlewareData.shift)!=null&&e.enabled.x&&(Y=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(I=T),_&&!h){const K=mt(d.left,0),Z=mt(d.right,0),J=mt(d.top,0),L=mt(d.bottom,0);m?Y=v-2*(K!==0||Z!==0?K+Z:mt(d.left,d.right)):I=w-2*(J!==0||L!==0?J+L:mt(d.top,d.bottom))}await l({...t,availableWidth:Y,availableHeight:I});const B=await a.getDimensions(c.floating);return v!==B.width||w!==B.height?{reset:{rects:!0}}:{}}}};function Yr(){return typeof window<"u"}function We(n){return Ds(n)?(n.nodeName||"").toLowerCase():"#document"}function pt(n){var t;return(n==null||(t=n.ownerDocument)==null?void 0:t.defaultView)||window}function Mt(n){var t;return(t=(Ds(n)?n.ownerDocument:n.document)||window.document)==null?void 0:t.documentElement}function Ds(n){return Yr()?n instanceof Node||n instanceof pt(n).Node:!1}function St(n){return Yr()?n instanceof Element||n instanceof pt(n).Element:!1}function Ft(n){return Yr()?n instanceof HTMLElement||n instanceof pt(n).HTMLElement:!1}function Do(n){return!Yr()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof pt(n).ShadowRoot}const Bl=new Set(["inline","contents"]);function rr(n){const{overflow:t,overflowX:e,overflowY:r,display:i}=At(n);return/auto|scroll|overlay|hidden|clip/.test(t+r+e)&&!Bl.has(i)}const Ll=new Set(["table","td","th"]);function Wl(n){return Ll.has(We(n))}const Kl=[":popover-open",":modal"];function jr(n){return Kl.some(t=>{try{return n.matches(t)}catch{return!1}})}const zl=["transform","translate","scale","rotate","perspective"],Vl=["transform","translate","scale","rotate","perspective","filter"],Hl=["paint","layout","strict","content"];function Hi(n){const t=Ui(),e=St(n)?At(n):n;return zl.some(r=>e[r]?e[r]!=="none":!1)||(e.containerType?e.containerType!=="normal":!1)||!t&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!t&&(e.filter?e.filter!=="none":!1)||Vl.some(r=>(e.willChange||"").includes(r))||Hl.some(r=>(e.contain||"").includes(r))}function Ul(n){let t=te(n);for(;Ft(t)&&!Ne(t);){if(Hi(t))return t;if(jr(t))return null;t=te(t)}return null}function Ui(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ql=new Set(["html","body","#document"]);function Ne(n){return ql.has(We(n))}function At(n){return pt(n).getComputedStyle(n)}function Zr(n){return St(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function te(n){if(We(n)==="html")return n;const t=n.assignedSlot||n.parentNode||Do(n)&&n.host||Mt(n);return Do(t)?t.host:t}function Is(n){const t=te(n);return Ne(t)?n.ownerDocument?n.ownerDocument.body:n.body:Ft(t)&&rr(t)?t:Is(t)}function Ye(n,t,e){var r;t===void 0&&(t=[]),e===void 0&&(e=!0);const i=Is(n),o=i===((r=n.ownerDocument)==null?void 0:r.body),a=pt(i);if(o){const c=Ei(a);return t.concat(a,a.visualViewport||[],rr(i)?i:[],c&&e?Ye(c):[])}return t.concat(i,Ye(i,[],e))}function Ei(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function _s(n){const t=At(n);let e=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ft(n),o=i?n.offsetWidth:e,a=i?n.offsetHeight:r,c=yr(e)!==o||yr(r)!==a;return c&&(e=o,r=a),{width:e,height:r,$:c}}function qi(n){return St(n)?n:n.contextElement}function be(n){const t=qi(n);if(!Ft(t))return kt(1);const e=t.getBoundingClientRect(),{width:r,height:i,$:o}=_s(t);let a=(o?yr(e.width):e.width)/r,c=(o?yr(e.height):e.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const Gl=kt(0);function Ns(n){const t=pt(n);return!Ui()||!t.visualViewport?Gl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xl(n,t,e){return t===void 0&&(t=!1),!e||t&&e!==pt(n)?!1:t}function me(n,t,e,r){t===void 0&&(t=!1),e===void 0&&(e=!1);const i=n.getBoundingClientRect(),o=qi(n);let a=kt(1);t&&(r?St(r)&&(a=be(r)):a=be(n));const c=Xl(o,e,r)?Ns(o):kt(0);let l=(i.left+c.x)/a.x,u=(i.top+c.y)/a.y,d=i.width/a.x,f=i.height/a.y;if(o){const h=pt(o),m=r&&St(r)?pt(r):r;let v=h,w=Ei(v);for(;w&&r&&m!==v;){const x=be(w),O=w.getBoundingClientRect(),T=At(w),k=O.left+(w.clientLeft+parseFloat(T.paddingLeft))*x.x,b=O.top+(w.clientTop+parseFloat(T.paddingTop))*x.y;l*=x.x,u*=x.y,d*=x.x,f*=x.y,l+=k,u+=b,v=pt(w),w=Ei(v)}}return br({width:d,height:f,x:l,y:u})}function Jr(n,t){const e=Zr(n).scrollLeft;return t?t.left+e:me(Mt(n)).left+e}function Bs(n,t){const e=n.getBoundingClientRect(),r=e.left+t.scrollLeft-Jr(n,e),i=e.top+t.scrollTop;return{x:r,y:i}}function Yl(n){let{elements:t,rect:e,offsetParent:r,strategy:i}=n;const o=i==="fixed",a=Mt(r),c=t?jr(t.floating):!1;if(r===a||c&&o)return e;let l={scrollLeft:0,scrollTop:0},u=kt(1);const d=kt(0),f=Ft(r);if((f||!f&&!o)&&((We(r)!=="body"||rr(a))&&(l=Zr(r)),Ft(r))){const m=me(r);u=be(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const h=a&&!f&&!o?Bs(a,l):kt(0);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-l.scrollLeft*u.x+d.x+h.x,y:e.y*u.y-l.scrollTop*u.y+d.y+h.y}}function jl(n){return Array.from(n.getClientRects())}function Zl(n){const t=Mt(n),e=Zr(n),r=n.ownerDocument.body,i=mt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=mt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-e.scrollLeft+Jr(n);const c=-e.scrollTop;return At(r).direction==="rtl"&&(a+=mt(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:c}}const Io=25;function Jl(n,t){const e=pt(n),r=Mt(n),i=e.visualViewport;let o=r.clientWidth,a=r.clientHeight,c=0,l=0;if(i){o=i.width,a=i.height;const d=Ui();(!d||d&&t==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}const u=Jr(r);if(u<=0){const d=r.ownerDocument,f=d.body,h=getComputedStyle(f),m=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,v=Math.abs(r.clientWidth-f.clientWidth-m);v<=Io&&(o-=v)}else u<=Io&&(o+=u);return{width:o,height:a,x:c,y:l}}const Ql=new Set(["absolute","fixed"]);function $l(n,t){const e=me(n,!0,t==="fixed"),r=e.top+n.clientTop,i=e.left+n.clientLeft,o=Ft(n)?be(n):kt(1),a=n.clientWidth*o.x,c=n.clientHeight*o.y,l=i*o.x,u=r*o.y;return{width:a,height:c,x:l,y:u}}function _o(n,t,e){let r;if(t==="viewport")r=Jl(n,e);else if(t==="document")r=Zl(Mt(n));else if(St(t))r=$l(t,e);else{const i=Ns(n);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return br(r)}function Ls(n,t){const e=te(n);return e===t||!St(e)||Ne(e)?!1:At(e).position==="fixed"||Ls(e,t)}function tu(n,t){const e=t.get(n);if(e)return e;let r=Ye(n,[],!1).filter(c=>St(c)&&We(c)!=="body"),i=null;const o=At(n).position==="fixed";let a=o?te(n):n;for(;St(a)&&!Ne(a);){const c=At(a),l=Hi(a);!l&&c.position==="fixed"&&(i=null),(o?!l&&!i:!l&&c.position==="static"&&!!i&&Ql.has(i.position)||rr(a)&&!l&&Ls(n,a))?r=r.filter(d=>d!==a):i=c,a=te(a)}return t.set(n,r),r}function eu(n){let{element:t,boundary:e,rootBoundary:r,strategy:i}=n;const a=[...e==="clippingAncestors"?jr(t)?[]:tu(t,this._c):[].concat(e),r],c=a[0],l=a.reduce((u,d)=>{const f=_o(t,d,i);return u.top=mt(f.top,u.top),u.right=$t(f.right,u.right),u.bottom=$t(f.bottom,u.bottom),u.left=mt(f.left,u.left),u},_o(t,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function nu(n){const{width:t,height:e}=_s(n);return{width:t,height:e}}function ru(n,t,e){const r=Ft(t),i=Mt(t),o=e==="fixed",a=me(n,!0,o,t);let c={scrollLeft:0,scrollTop:0};const l=kt(0);function u(){l.x=Jr(i)}if(r||!r&&!o)if((We(t)!=="body"||rr(i))&&(c=Zr(t)),r){const m=me(t,!0,o,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else i&&u();o&&!r&&i&&u();const d=i&&!r&&!o?Bs(i,c):kt(0),f=a.left+c.scrollLeft-l.x-d.x,h=a.top+c.scrollTop-l.y-d.y;return{x:f,y:h,width:a.width,height:a.height}}function ei(n){return At(n).position==="static"}function No(n,t){if(!Ft(n)||At(n).position==="fixed")return null;if(t)return t(n);let e=n.offsetParent;return Mt(n)===e&&(e=e.ownerDocument.body),e}function Ws(n,t){const e=pt(n);if(jr(n))return e;if(!Ft(n)){let i=te(n);for(;i&&!Ne(i);){if(St(i)&&!ei(i))return i;i=te(i)}return e}let r=No(n,t);for(;r&&Wl(r)&&ei(r);)r=No(r,t);return r&&Ne(r)&&ei(r)&&!Hi(r)?e:r||Ul(n)||e}const iu=async function(n){const t=this.getOffsetParent||Ws,e=this.getDimensions,r=await e(n.floating);return{reference:ru(n.reference,await t(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ou(n){return At(n).direction==="rtl"}const su={convertOffsetParentRelativeRectToViewportRelativeRect:Yl,getDocumentElement:Mt,getClippingRect:eu,getOffsetParent:Ws,getElementRects:iu,getClientRects:jl,getDimensions:nu,getScale:be,isElement:St,isRTL:ou};function Ks(n,t){return n.x===t.x&&n.y===t.y&&n.width===t.width&&n.height===t.height}function au(n,t){let e=null,r;const i=Mt(n);function o(){var c;clearTimeout(r),(c=e)==null||c.disconnect(),e=null}function a(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),o();const u=n.getBoundingClientRect(),{left:d,top:f,width:h,height:m}=u;if(c||t(),!h||!m)return;const v=sr(f),w=sr(i.clientWidth-(d+h)),x=sr(i.clientHeight-(f+m)),O=sr(d),k={rootMargin:-v+"px "+-w+"px "+-x+"px "+-O+"px",threshold:mt(0,$t(1,l))||1};let b=!0;function M(_){const I=_[0].intersectionRatio;if(I!==l){if(!b)return a();I?a(!1,I):r=setTimeout(()=>{a(!1,1e-7)},1e3)}I===1&&!Ks(u,n.getBoundingClientRect())&&a(),b=!1}try{e=new IntersectionObserver(M,{...k,root:i.ownerDocument})}catch{e=new IntersectionObserver(M,k)}e.observe(n)}return a(!0),o}function cu(n,t,e,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=qi(n),d=i||o?[...u?Ye(u):[],...Ye(t)]:[];d.forEach(O=>{i&&O.addEventListener("scroll",e,{passive:!0}),o&&O.addEventListener("resize",e)});const f=u&&c?au(u,e):null;let h=-1,m=null;a&&(m=new ResizeObserver(O=>{let[T]=O;T&&T.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var k;(k=m)==null||k.observe(t)})),e()}),u&&!l&&m.observe(u),m.observe(t));let v,w=l?me(n):null;l&&x();function x(){const O=me(n);w&&!Ks(w,O)&&e(),w=O,v=requestAnimationFrame(x)}return e(),()=>{var O;d.forEach(T=>{i&&T.removeEventListener("scroll",e),o&&T.removeEventListener("resize",e)}),f==null||f(),(O=m)==null||O.disconnect(),m=null,l&&cancelAnimationFrame(v)}}const lu=Dl,uu=Il,du=Fl,fu=Nl,hu=Ml,gu=kl,mu=_l,pu=(n,t,e)=>{const r=new Map,i={platform:su,...e},o={...i.platform,_c:r};return Tl(n,t,{...i,platform:o})};function re(n){return typeof n=="function"?n():n}function zs(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Bo(n,t){const e=zs(n);return Math.round(t*e)/e}function Lo(n){return{[`--bits-${n}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${n}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${n}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${n}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${n}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function vu(n){const t=n.whileElementsMounted,e=P(()=>re(n.open)??!0),r=P(()=>re(n.middleware)),i=P(()=>re(n.transform)??!0),o=P(()=>re(n.placement)??"bottom"),a=P(()=>re(n.strategy)??"absolute"),c=P(()=>re(n.sideOffset)??0),l=P(()=>re(n.alignOffset)??0),u=n.reference;let d=q(0),f=q(0);const h=Wt(null);let m=q(qe(g(a))),v=q(qe(g(o))),w=q(qe({})),x=q(!1),O=!1;const T=P(()=>{const B=h.current?Bo(h.current,g(d)):g(d),K=h.current?Bo(h.current,g(f)):g(f);return g(i)?{position:g(m),left:"0",top:"0",transform:`translate(${B}px, ${K}px)`,...h.current&&zs(h.current)>=1.5&&{willChange:"transform"}}:{position:g(m),left:`${B}px`,top:`${K}px`}});let k;function b(){u.current===null||h.current===null||pu(u.current,h.current,{middleware:g(r),placement:g(o),strategy:g(a)}).then(B=>{if(!g(e)&&g(d)!==0&&g(f)!==0){const K=Math.max(Math.abs(g(c)),Math.abs(g(l)),15);if(B.x<=K&&B.y<=K)return}C(d,B.x,!0),C(f,B.y,!0),C(m,B.strategy,!0),C(v,B.placement,!0),C(w,B.middlewareData,!0),C(x,!0)})}function M(){typeof k=="function"&&(k(),k=void 0)}function _(){if(M(),t===void 0){b();return}g(e)&&(u.current===null||h.current===null||(k=t(u.current,h.current,b)))}function I(){g(e)||C(x,!1)}function Y(){return[g(r),g(o),g(a),g(c),g(l),g(e)]}return rt(()=>{t===void 0&&g(e)&&b()}),rt(_),rt(()=>{if(t!==void 0){if(Y(),!g(e)){O=!1;return}if(!g(x)){O=!1;return}if(!O){O=!0;return}b()}}),rt(I),rt(()=>M),{floating:h,reference:u,get strategy(){return g(m)},get placement(){return g(v)},get middlewareData(){return g(w)},get isPositioned(){return g(x)},get floatingStyles(){return g(T)},get update(){return b}}}const yu={top:"bottom",right:"left",bottom:"top",left:"right"},Gi=new Ht("Floating.Root"),Wo=new Ht("Floating.Content"),Xi=new Ht("Floating.Root");class xr{constructor(){A(this,"anchorNode",Wt(null));A(this,"customAnchorNode",Wt(null));A(this,"triggerNode",Wt(null));rt(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}static create(t=!1){return t?Xi.set(new xr):Gi.set(new xr)}}var Pn,Cn,En,Hr,Tn,Ur,kn,Fn,Mn,Rn,Dn,In,_n,Nn,Bn,Ln,Wn,Kn,zn,Vn,Hn,Un,qn,Gn;const qr=class qr{constructor(t,e){A(this,"opts");A(this,"root");A(this,"contentRef",Wt(null));A(this,"wrapperRef",Wt(null));A(this,"arrowRef",Wt(null));A(this,"contentAttachment",Tt(this.contentRef));A(this,"wrapperAttachment",Tt(this.wrapperRef));A(this,"arrowAttachment",Tt(this.arrowRef));A(this,"arrowId",Wt(Wi()));p(this,Pn,P(()=>{if(typeof this.opts.style=="string")return Sa(this.opts.style);if(!this.opts.style)return{}}));p(this,Cn);p(this,En,new Ba(()=>this.arrowRef.current??void 0));p(this,Hr,P(()=>{var t;return((t=s(this,En))==null?void 0:t.width)??0}));p(this,Tn,P(()=>{var t;return((t=s(this,En))==null?void 0:t.height)??0}));p(this,Ur,P(()=>{var t;return((t=this.opts.side)==null?void 0:t.current)+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:"")}));p(this,kn,P(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]));p(this,Fn,P(()=>g(s(this,kn)).length>0));p(this,Mn,P(()=>({padding:this.opts.collisionPadding.current,boundary:g(s(this,kn)).filter(ec),altBoundary:this.hasExplicitBoundaries})));p(this,Rn,q(void 0));p(this,Dn,q(void 0));p(this,In,q(void 0));p(this,_n,q(void 0));p(this,Nn,P(()=>[lu({mainAxis:this.opts.sideOffset.current+g(s(this,Tn)),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&uu({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?mu():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&du({...this.detectOverflowOptions}),fu({...this.detectOverflowOptions,apply:({rects:t,availableWidth:e,availableHeight:r})=>{const{width:i,height:o}=t.reference;C(s(this,Rn),e,!0),C(s(this,Dn),r,!0),C(s(this,In),i,!0),C(s(this,_n),o,!0)}}),this.arrowRef.current&&gu({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),wu({arrowWidth:g(s(this,Hr)),arrowHeight:g(s(this,Tn))}),this.opts.hideWhenDetached.current&&hu({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean)));A(this,"floating");p(this,Bn,P(()=>bu(this.floating.placement)));p(this,Ln,P(()=>xu(this.floating.placement)));p(this,Wn,P(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.x)??0}));p(this,Kn,P(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.y)??0}));p(this,zn,P(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.centerOffset)!==0}));p(this,Vn,q());p(this,Hn,P(()=>yu[this.placedSide]));p(this,Un,P(()=>{var t,e,r;return{id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${(t=this.floating.middlewareData.transformOrigin)==null?void 0:t.x} ${(e=this.floating.middlewareData.transformOrigin)==null?void 0:e.y}`,"--bits-floating-available-width":`${g(s(this,Rn))}px`,"--bits-floating-available-height":`${g(s(this,Dn))}px`,"--bits-floating-anchor-width":`${g(s(this,In))}px`,"--bits-floating-anchor-height":`${g(s(this,_n))}px`,...((r=this.floating.middlewareData.hide)==null?void 0:r.referenceHidden)&&{visibility:"hidden","pointer-events":"none"},...g(s(this,Pn))},dir:this.opts.dir.current,...this.wrapperAttachment}}));p(this,qn,P(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Uo({...g(s(this,Pn))}),...this.contentAttachment})));p(this,Gn,P(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0})));this.opts=t,this.root=e,F(this,Cn,t.updatePositionStrategy),t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),gt(()=>t.customAnchor.current,r=>{this.root.customAnchorNode.current=r}),this.floating=vu({strategy:()=>this.opts.strategy.current,placement:()=>g(s(this,Ur)),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...r)=>{var o;return cu(...r,{animationFrame:((o=s(this,Cn))==null?void 0:o.current)==="always"})},open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),rt(()=>{var r;this.floating.isPositioned&&((r=this.opts.onPlaced)==null||r.current())}),gt(()=>this.contentRef.current,r=>{if(!r||!this.opts.enabled.current)return;const i=Ii(r),o=i.requestAnimationFrame(()=>{if(this.contentRef.current!==r||!this.opts.enabled.current)return;const a=i.getComputedStyle(r).zIndex;a!==this.contentZIndex&&(this.contentZIndex=a)});return()=>{i.cancelAnimationFrame(o)}}),rt(()=>{this.floating.floating.current=this.wrapperRef.current})}static create(t,e=!1){return e?Wo.set(new qr(t,Xi.get())):Wo.set(new qr(t,Gi.get()))}get hasExplicitBoundaries(){return g(s(this,Fn))}set hasExplicitBoundaries(t){C(s(this,Fn),t)}get detectOverflowOptions(){return g(s(this,Mn))}set detectOverflowOptions(t){C(s(this,Mn),t)}get middleware(){return g(s(this,Nn))}set middleware(t){C(s(this,Nn),t)}get placedSide(){return g(s(this,Bn))}set placedSide(t){C(s(this,Bn),t)}get placedAlign(){return g(s(this,Ln))}set placedAlign(t){C(s(this,Ln),t)}get arrowX(){return g(s(this,Wn))}set arrowX(t){C(s(this,Wn),t)}get arrowY(){return g(s(this,Kn))}set arrowY(t){C(s(this,Kn),t)}get cannotCenterArrow(){return g(s(this,zn))}set cannotCenterArrow(t){C(s(this,zn),t)}get contentZIndex(){return g(s(this,Vn))}set contentZIndex(t){C(s(this,Vn),t,!0)}get arrowBaseSide(){return g(s(this,Hn))}set arrowBaseSide(t){C(s(this,Hn),t)}get wrapperProps(){return g(s(this,Un))}set wrapperProps(t){C(s(this,Un),t)}get props(){return g(s(this,qn))}set props(t){C(s(this,qn),t)}get arrowStyle(){return g(s(this,Gn))}set arrowStyle(t){C(s(this,Gn),t)}};Pn=new WeakMap,Cn=new WeakMap,En=new WeakMap,Hr=new WeakMap,Tn=new WeakMap,Ur=new WeakMap,kn=new WeakMap,Fn=new WeakMap,Mn=new WeakMap,Rn=new WeakMap,Dn=new WeakMap,In=new WeakMap,_n=new WeakMap,Nn=new WeakMap,Bn=new WeakMap,Ln=new WeakMap,Wn=new WeakMap,Kn=new WeakMap,zn=new WeakMap,Vn=new WeakMap,Hn=new WeakMap,Un=new WeakMap,qn=new WeakMap,Gn=new WeakMap;let Ti=qr;class Sr{constructor(t,e){A(this,"opts");A(this,"root");this.opts=t,this.root=e,t.virtualEl&&t.virtualEl.current?e.triggerNode=Ho(t.virtualEl.current):e.triggerNode=t.ref}static create(t,e=!1){return e?new Sr(t,Xi.get()):new Sr(t,Gi.get())}}function wu(n){return{name:"transformOrigin",options:n,fn(t){var x,O,T;const{placement:e,rects:r,middlewareData:i}=t,a=((x=i.arrow)==null?void 0:x.centerOffset)!==0,c=a?0:n.arrowWidth,l=a?0:n.arrowHeight,[u,d]=Yi(e),f={start:"0%",center:"50%",end:"100%"}[d],h=(((O=i.arrow)==null?void 0:O.x)??0)+c/2,m=(((T=i.arrow)==null?void 0:T.y)??0)+l/2;let v="",w="";return u==="bottom"?(v=a?f:`${h}px`,w=`${-l}px`):u==="top"?(v=a?f:`${h}px`,w=`${r.floating.height+l}px`):u==="right"?(v=`${-l}px`,w=a?f:`${m}px`):u==="left"&&(v=`${r.floating.width+l}px`,w=a?f:`${m}px`),{data:{x:v,y:w}}}}}function Yi(n){const[t,e="center"]=n.split("-");return[t,e]}function bu(n){return Yi(n)[0]}function xu(n){return Yi(n)[1]}function Su(n,t){H(t,!0);let e=y(t,"tooltip",3,!1);xr.create(e());var r=D(),i=R(r);V(i,()=>t.children??Q),E(n,r),U()}function Au(n,t){H(t,!0);let e=y(t,"tooltip",3,!1);Sr.create({id:S(()=>t.id),virtualEl:S(()=>t.virtualEl),ref:t.ref},e());var r=D(),i=R(r);V(i,()=>t.children??Q),E(n,r),U()}function Ou(n,t){H(t,!0);let e=y(t,"side",3,"bottom"),r=y(t,"sideOffset",3,0),i=y(t,"align",3,"center"),o=y(t,"alignOffset",3,0),a=y(t,"arrowPadding",3,0),c=y(t,"avoidCollisions",3,!0),l=y(t,"collisionBoundary",19,()=>[]),u=y(t,"collisionPadding",3,0),d=y(t,"hideWhenDetached",3,!1),f=y(t,"onPlaced",3,()=>{}),h=y(t,"sticky",3,"partial"),m=y(t,"updatePositionStrategy",3,"optimized"),v=y(t,"strategy",3,"fixed"),w=y(t,"dir",3,"ltr"),x=y(t,"style",19,()=>({})),O=y(t,"wrapperId",19,Wi),T=y(t,"customAnchor",3,null),k=y(t,"tooltip",3,!1);const b=Ti.create({side:S(()=>e()),sideOffset:S(()=>r()),align:S(()=>i()),alignOffset:S(()=>o()),id:S(()=>t.id),arrowPadding:S(()=>a()),avoidCollisions:S(()=>c()),collisionBoundary:S(()=>l()),collisionPadding:S(()=>u()),hideWhenDetached:S(()=>d()),onPlaced:S(()=>f()),sticky:S(()=>h()),updatePositionStrategy:S(()=>m()),strategy:S(()=>v()),dir:S(()=>w()),style:S(()=>x()),enabled:S(()=>t.enabled),wrapperId:S(()=>O()),customAnchor:S(()=>T())},k()),M=P(()=>wt(b.wrapperProps,{style:{pointerEvents:"auto"}}));var _=D(),I=R(_);V(I,()=>t.content??Q,()=>({props:b.props,wrapperProps:g(M)})),E(n,_),U()}function Pu(n,t){H(t,!0),zo(()=>{var i;(i=t.onPlaced)==null||i.call(t)});var e=D(),r=R(e);V(r,()=>t.content??Q,()=>({props:{},wrapperProps:{}})),E(n,e),U()}function Cu(n,t){let e=y(t,"isStatic",3,!1),r=et(t,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var i=D(),o=R(i);{var a=l=>{Pu(l,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},c=l=>{Ou(l,lt({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>r))};st(o,l=>{e()?l(a):l(c,!1)})}E(n,i)}var Eu=at("<!> <!>",1);function Vs(n,t){H(t,!0);let e=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"trapFocus",3,!0),i=y(t,"isValidEvent",3,()=>!1),o=y(t,"customAnchor",3,null),a=y(t,"isStatic",3,!1),c=y(t,"tooltip",3,!1),l=y(t,"contentPointerEvents",3,"auto"),u=et(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]);Cu(n,{get isStatic(){return a()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return o()},get enabled(){return t.enabled},get tooltip(){return c()},content:(f,h)=>{let m=()=>h==null?void 0:h().props,v=()=>h==null?void 0:h().wrapperProps;var w=Eu(),x=R(w);{var O=b=>{Eo(b,{get preventScroll(){return t.preventScroll}})},T=b=>{Eo(b,{get preventScroll(){return t.preventScroll}})};st(x,b=>{t.forceMount&&t.enabled?b(O):t.forceMount||b(T,1)})}var k=Ut(x,2);nl(k,{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return r()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(M,_)=>{let I=()=>_==null?void 0:_().props;el(M,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(Y,B)=>{$c(Y,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return e()},get isValidEvent(){return i()},get enabled(){return t.enabled},get ref(){return t.ref},children:(Z,J)=>{let L=()=>J==null?void 0:J().props;ol(Z,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(z,X)=>{var W=D(),G=R(W);{let j=P(()=>({props:wt(u,m(),L(),I(),{style:{pointerEvents:l()}}),wrapperProps:v()}));V(G,()=>t.popper??Q,()=>g(j))}E(z,W)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),E(f,w)},$$slots:{content:!0}}),U()}function Tu(n,t){let e=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"trapFocus",3,!0),i=y(t,"isValidEvent",3,()=>!1),o=y(t,"customAnchor",3,null),a=y(t,"isStatic",3,!1),c=et(t,["$$slots","$$events","$$legacy","popper","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);var l=D(),u=R(l);{var d=f=>{Vs(f,lt({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return o()},get isStatic(){return a()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return e()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>c))};st(u,f=>{t.shouldRender&&f(d)})}E(n,l)}function ku(n,t){let e=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"trapFocus",3,!0),i=y(t,"isValidEvent",3,()=>!1),o=y(t,"customAnchor",3,null),a=y(t,"isStatic",3,!1),c=et(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);Vs(n,lt({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return o()},get isStatic(){return a()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return e()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside}},()=>c,{forceMount:!0}))}var Fu=at("<div><!></div>");function Mu(n,t){const e=pe();H(t,!0);let r=y(t,"ref",15,null),i=y(t,"id",19,()=>ve(e)),o=et(t,["$$slots","$$events","$$legacy","ref","id","child","children"]);const a=gi.create({id:S(()=>i()),ref:S(()=>r(),h=>r(h))}),c=P(()=>wt(o,a.props));var l=D(),u=R(l);{var d=h=>{var m=D(),v=R(m);V(v,()=>t.child,()=>({props:g(c)})),E(h,m)},f=h=>{var m=Fu();yt(m,()=>({...g(c)}));var v=ft(m);V(v,()=>t.children??Q),ht(m),E(h,m)};st(u,h=>{t.child?h(d):h(f,!1)})}E(n,l),U()}function Ru(n,t){H(t,!0);let e=y(t,"open",15,!1),r=y(t,"dir",3,"ltr"),i=y(t,"onOpenChange",3,$),o=y(t,"onOpenChangeComplete",3,$),a=y(t,"_internal_variant",3,"dropdown-menu");const c=di.create({variant:S(()=>a()),dir:S(()=>r()),onClose:()=>{e(!1),i()(!1)}});fi.create({open:S(()=>e(),l=>{e(l),i()(l)}),onOpenChangeComplete:S(()=>o())},c),Su(n,{children:(l,u)=>{var d=D(),f=R(d);V(f,()=>t.children??Q),E(l,d)},$$slots:{default:!0}}),U()}var Du=at("<div><div><!></div></div>"),Iu=at("<div><div><!></div></div>");function _u(n,t){const e=pe();H(t,!0);let r=y(t,"id",19,()=>ve(e)),i=y(t,"ref",15,null),o=y(t,"loop",3,!0),a=y(t,"onInteractOutside",3,$),c=y(t,"onEscapeKeydown",3,$),l=y(t,"onCloseAutoFocus",3,$),u=y(t,"forceMount",3,!1),d=y(t,"trapFocus",3,!1),f=et(t,["$$slots","$$events","$$legacy","id","child","children","ref","loop","onInteractOutside","onEscapeKeydown","onCloseAutoFocus","forceMount","trapFocus","style"]);const h=hi.create({id:S(()=>r()),loop:S(()=>o()),ref:S(()=>i(),b=>i(b)),onCloseAutoFocus:S(()=>l())}),m=P(()=>wt(f,h.props));function v(b){if(h.handleInteractOutside(b),!b.defaultPrevented&&(a()(b),!b.defaultPrevented)){if(b.target&&b.target instanceof Element){const M=`[${h.parentMenu.root.getBitsAttr("sub-content")}]`;if(b.target.closest(M))return}h.parentMenu.onClose()}}function w(b){c()(b),!b.defaultPrevented&&h.parentMenu.onClose()}var x=D(),O=R(x);{var T=b=>{ku(b,lt(()=>g(m),()=>h.popperProps,{get ref(){return h.opts.ref},get enabled(){return h.parentMenu.opts.open.current},onInteractOutside:v,onEscapeKeydown:w,get trapFocus(){return d()},get loop(){return o()},forceMount:!0,get id(){return r()},get shouldRender(){return h.shouldRender},popper:(_,I)=>{let Y=()=>I==null?void 0:I().props,B=()=>I==null?void 0:I().wrapperProps;const K=P(()=>wt(Y(),{style:Lo("dropdown-menu")},{style:t.style}));var Z=D(),J=R(Z);{var L=X=>{var W=D(),G=R(W);{let j=P(()=>({props:g(K),wrapperProps:B(),...h.snippetProps}));V(G,()=>t.child,()=>g(j))}E(X,W)},z=X=>{var W=Du();yt(W,()=>({...B()}));var G=ft(W);yt(G,()=>({...g(K)}));var j=ft(G);V(j,()=>t.children??Q),ht(G),ht(W),E(X,W)};st(J,X=>{t.child?X(L):X(z,!1)})}E(_,Z)},$$slots:{popper:!0}}))},k=b=>{Tu(b,lt(()=>g(m),()=>h.popperProps,{get ref(){return h.opts.ref},get open(){return h.parentMenu.opts.open.current},onInteractOutside:v,onEscapeKeydown:w,get trapFocus(){return d()},get loop(){return o()},forceMount:!1,get id(){return r()},get shouldRender(){return h.shouldRender},popper:(_,I)=>{let Y=()=>I==null?void 0:I().props,B=()=>I==null?void 0:I().wrapperProps;const K=P(()=>wt(Y(),{style:Lo("dropdown-menu")},{style:t.style}));var Z=D(),J=R(Z);{var L=X=>{var W=D(),G=R(W);{let j=P(()=>({props:g(K),wrapperProps:B(),...h.snippetProps}));V(G,()=>t.child,()=>g(j))}E(X,W)},z=X=>{var W=Iu();yt(W,()=>({...B()}));var G=ft(W);yt(G,()=>({...g(K)}));var j=ft(G);V(j,()=>t.children??Q),ht(G),ht(W),E(X,W)};st(J,X=>{t.child?X(L):X(z,!1)})}E(_,Z)},$$slots:{popper:!0}}))};st(O,b=>{u()?b(T):u()||b(k,1)})}E(n,x),U()}var Nu=at("<button><!></button>");function Bu(n,t){const e=pe();H(t,!0);let r=y(t,"id",19,()=>ve(e)),i=y(t,"ref",15,null),o=y(t,"disabled",3,!1),a=y(t,"type",3,"button"),c=et(t,["$$slots","$$events","$$legacy","id","ref","child","children","disabled","type"]);const l=mi.create({id:S(()=>r()),disabled:S(()=>o()??!1),ref:S(()=>i(),d=>i(d))}),u=P(()=>wt(c,l.props,{type:a()}));Au(n,{get id(){return r()},get ref(){return l.opts.ref},children:(d,f)=>{var h=D(),m=R(h);{var v=x=>{var O=D(),T=R(O);V(T,()=>t.child,()=>({props:g(u)})),E(x,O)},w=x=>{var O=Nu();yt(O,()=>({...g(u)}));var T=ft(O);V(T,()=>t.children??Q),ht(O),E(x,O)};st(m,x=>{t.child?x(v):x(w,!1)})}E(d,h)},$$slots:{default:!0}}),U()}const Hs=Di({component:"switch",parts:["root","thumb"]}),ji=new Ht("Switch.Root");var Xn,Fi,Yn,jn,Zn;const co=class co{constructor(t){p(this,Xn);A(this,"opts");A(this,"attachment");p(this,Yn,P(()=>({"data-disabled":ni(this.opts.disabled.current),"data-state":Aa(this.opts.checked.current),"data-required":ni(this.opts.required.current)})));p(this,jn,P(()=>({checked:this.opts.checked.current})));p(this,Zn,P(()=>({...this.sharedProps,id:this.opts.id.current,role:"switch",disabled:Pa(this.opts.disabled.current),"aria-checked":Oa(this.opts.checked.current),"aria-required":Go(this.opts.required.current),[Hs.root]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment})));this.opts=t,this.attachment=Tt(t.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this)}static create(t){return ji.set(new co(t))}onkeydown(t){!(t.key===Qo||t.key===ts)||this.opts.disabled.current||(t.preventDefault(),N(this,Xn,Fi).call(this))}onclick(t){this.opts.disabled.current||N(this,Xn,Fi).call(this)}get sharedProps(){return g(s(this,Yn))}set sharedProps(t){C(s(this,Yn),t)}get snippetProps(){return g(s(this,jn))}set snippetProps(t){C(s(this,jn),t)}get props(){return g(s(this,Zn))}set props(t){C(s(this,Zn),t)}};Xn=new WeakSet,Fi=function(){this.opts.checked.current=!this.opts.checked.current},Yn=new WeakMap,jn=new WeakMap,Zn=new WeakMap;let ki=co;var Jn,Qn;const lo=class lo{constructor(t){A(this,"root");p(this,Jn,P(()=>this.root.opts.name.current!==void 0));p(this,Qn,P(()=>({type:"checkbox",name:this.root.opts.name.current,value:this.root.opts.value.current,checked:this.root.opts.checked.current,disabled:this.root.opts.disabled.current,required:this.root.opts.required.current})));this.root=t}static create(){return new lo(ji.get())}get shouldRender(){return g(s(this,Jn))}set shouldRender(t){C(s(this,Jn),t)}get props(){return g(s(this,Qn))}set props(t){C(s(this,Qn),t)}};Jn=new WeakMap,Qn=new WeakMap;let Mi=lo;var $n,tr;const uo=class uo{constructor(t,e){A(this,"opts");A(this,"root");A(this,"attachment");p(this,$n,P(()=>({checked:this.root.opts.checked.current})));p(this,tr,P(()=>({...this.root.sharedProps,id:this.opts.id.current,[Hs.thumb]:"",...this.attachment})));this.opts=t,this.root=e,this.attachment=Tt(t.ref)}static create(t){return new uo(t,ji.get())}get snippetProps(){return g(s(this,$n))}set snippetProps(t){C(s(this,$n),t)}get props(){return g(s(this,tr))}set props(t){C(s(this,tr),t)}};$n=new WeakMap,tr=new WeakMap;let Ri=uo;function Lu(n,t){H(t,!1);const e=Mi.create();Ea();var r=D(),i=R(r);{var o=a=>{ml(a,lt(()=>e.props))};st(i,a=>{e.shouldRender&&a(o)})}E(n,r),U()}var Wu=at("<button><!></button>"),Ku=at("<!> <!>",1);function zu(n,t){const e=pe();H(t,!0);let r=y(t,"ref",15,null),i=y(t,"id",19,()=>ve(e)),o=y(t,"disabled",3,!1),a=y(t,"required",3,!1),c=y(t,"checked",15,!1),l=y(t,"value",3,"on"),u=y(t,"name",3,void 0),d=y(t,"type",3,"button"),f=y(t,"onCheckedChange",3,$),h=et(t,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","required","checked","value","name","type","onCheckedChange"]);const m=ki.create({checked:S(()=>c(),b=>{var M;c(b),(M=f())==null||M(b)}),disabled:S(()=>o()??!1),required:S(()=>a()),value:S(()=>l()),name:S(()=>u()),id:S(()=>i()),ref:S(()=>r(),b=>r(b))}),v=P(()=>wt(h,m.props,{type:d()}));var w=Ku(),x=R(w);{var O=b=>{var M=D(),_=R(M);{let I=P(()=>({props:g(v),...m.snippetProps}));V(_,()=>t.child,()=>g(I))}E(b,M)},T=b=>{var M=Wu();yt(M,()=>({...g(v)}));var _=ft(M);V(_,()=>t.children??Q,()=>m.snippetProps),ht(M),E(b,M)};st(x,b=>{t.child?b(O):b(T,!1)})}var k=Ut(x,2);Lu(k,{}),E(n,w),U()}var Vu=at("<span><!></span>");function Hu(n,t){const e=pe();H(t,!0);let r=y(t,"ref",15,null),i=y(t,"id",19,()=>ve(e)),o=et(t,["$$slots","$$events","$$legacy","child","children","ref","id"]);const a=Ri.create({id:S(()=>i()),ref:S(()=>r(),h=>r(h))}),c=P(()=>wt(o,a.props));var l=D(),u=R(l);{var d=h=>{var m=D(),v=R(m);{let w=P(()=>({props:g(c),...a.snippetProps}));V(v,()=>t.child,()=>g(w))}E(h,m)},f=h=>{var m=Vu();yt(m,()=>({...g(c)}));var v=ft(m);V(v,()=>t.children??Q,()=>a.snippetProps),ht(m),E(h,m)};st(u,h=>{t.child?h(d):h(f,!1)})}E(n,l),U()}function Uu(n,t){H(t,!0);let e=y(t,"ref",15,null),r=y(t,"loadingStatus",15,"loading"),i=et(t,["$$slots","$$events","$$legacy","ref","loadingStatus","class"]);var o=D(),a=R(o);{let c=P(()=>Ie("relative flex size-8 shrink-0 overflow-hidden rounded-full",t.class));ct(a,()=>ul,(l,u)=>{u(l,lt({"data-slot":"avatar",get class(){return g(c)}},()=>i,{get ref(){return e()},set ref(d){e(d)},get loadingStatus(){return r()},set loadingStatus(d){r(d)}}))})}E(n,o),U()}function qu(n,t){H(t,!0);let e=y(t,"ref",15,null),r=et(t,["$$slots","$$events","$$legacy","ref","class"]);var i=D(),o=R(i);{let a=P(()=>Ie("bg-muted flex size-full items-center justify-center rounded-full",t.class));ct(o,()=>fl,(c,l)=>{l(c,lt({"data-slot":"avatar-fallback",get class(){return g(a)}},()=>r,{get ref(){return e()},set ref(u){e(u)}}))})}E(n,i),U()}function Gu(n,t){H(t,!0);let e=y(t,"open",15,!1),r=et(t,["$$slots","$$events","$$legacy","open"]);var i=D(),o=R(i);ct(o,()=>Ru,(a,c)=>{c(a,lt(()=>r,{get open(){return e()},set open(l){e(l)}}))}),E(n,i),U()}function Xu(n,t){let e=et(t,["$$slots","$$events","$$legacy"]);var r=D(),i=R(r);ct(i,()=>hc,(o,a)=>{a(o,lt(()=>e))}),E(n,r)}function Yu(n,t){H(t,!0);let e=y(t,"ref",15,null),r=y(t,"sideOffset",3,4),i=et(t,["$$slots","$$events","$$legacy","ref","sideOffset","portalProps","class"]);Xu(n,lt(()=>t.portalProps,{children:(o,a)=>{var c=D(),l=R(c);{let u=P(()=>Ie("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-end-2 data-[side=right]:slide-in-from-start-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--bits-dropdown-menu-content-available-height) min-w-[8rem] origin-(--bits-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md outline-none",t.class));ct(l,()=>_u,(d,f)=>{f(d,lt({"data-slot":"dropdown-menu-content",get sideOffset(){return r()},get class(){return g(u)}},()=>i,{get ref(){return e()},set ref(h){e(h)}}))})}E(o,c)},$$slots:{default:!0}})),U()}function ju(n,t){H(t,!0);let e=y(t,"ref",15,null),r=et(t,["$$slots","$$events","$$legacy","ref","class"]);var i=D(),o=R(i);{let a=P(()=>Ie("bg-border -mx-1 my-1 h-px",t.class));ct(o,()=>Mu,(c,l)=>{l(c,lt({"data-slot":"dropdown-menu-separator",get class(){return g(a)}},()=>r,{get ref(){return e()},set ref(u){e(u)}}))})}E(n,i),U()}function Zu(n,t){H(t,!0);let e=y(t,"ref",15,null),r=et(t,["$$slots","$$events","$$legacy","ref"]);var i=D(),o=R(i);ct(o,()=>Bu,(a,c)=>{c(a,lt({"data-slot":"dropdown-menu-trigger"},()=>r,{get ref(){return e()},set ref(l){e(l)}}))}),E(n,i),U()}function Ju(n,t){H(t,!0);let e=y(t,"ref",15,null),r=y(t,"checked",15,!1),i=et(t,["$$slots","$$events","$$legacy","ref","class","checked"]);var o=D(),a=R(o);{let c=P(()=>Ie("data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 peer inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t.class));ct(a,()=>zu,(l,u)=>{u(l,lt({"data-slot":"switch",get class(){return g(c)}},()=>i,{get ref(){return e()},set ref(d){e(d)},get checked(){return r()},set checked(d){r(d)},children:(d,f)=>{var h=D(),m=R(h);{let v=P(()=>Ie("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"));ct(m,()=>Hu,(w,x)=>{x(w,{"data-slot":"switch-thumb",get class(){return g(v)}})})}E(d,h)},$$slots:{default:!0}}))})}E(n,o),U()}var Qu=at('<div class="relative flex cursor-default items-center gap-2 rounded-sm py-1.5 px-2 text-sm outline-none select-none" role="button" tabindex="0"><!> <!></div> <!> <form method="POST" action="/logout" class="contents"><button type="submit" class="relative flex w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50">Log out</button></form>',1),$u=at("<!> <!>",1),td=at('<header class="flex items-center justify-between w-full"><h1 class="text-lg font-semibold">Base</h1> <!></header>'),ed=at('<div class="app-shell"><!> <main class="flex-1 flex flex-col gap-4 min-h-0"><!></main></div>');function hd(n,t){H(t,!0);let e=q(!1),r=()=>{};rt(()=>{var u;C(e,((u=t.data.user)==null?void 0:u.darkmode)??!1,!0)}),rt(()=>{t.data.user!==void 0&&document.documentElement.classList.toggle("dark",g(e))}),zo(()=>{r=async u=>{C(e,u,!0);try{(await fetch("/api/darkmode",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({darkmode:u})})).ok&&await ha("layout")}catch{C(e,!u)}}});var i=ed(),o=ft(i);{var a=u=>{var d=td(),f=Ut(ft(d),2);ct(f,()=>Gu,(h,m)=>{m(h,{children:(v,w)=>{var x=$u(),O=R(x);ct(O,()=>Zu,(k,b)=>{b(k,{class:"rounded-full border border-input bg-background hover:bg-accent",onclick:M=>M.preventDefault(),children:(M,_)=>{var I=D(),Y=R(I);ct(Y,()=>Uu,(B,K)=>{K(B,{class:"h-8 w-8",children:(Z,J)=>{var L=D(),z=R(L);ct(z,()=>qu,(X,W)=>{W(X,{class:"text-xs",children:(G,j)=>{po();var bt=vo();la(Qr=>Zs(bt,Qr),[()=>t.data.user.name?String(t.data.user.name).slice(0,2).toUpperCase():t.data.user.email?String(t.data.user.email).slice(0,2).toUpperCase():"?"]),E(G,bt)},$$slots:{default:!0}})}),E(Z,L)},$$slots:{default:!0}})}),E(M,I)},$$slots:{default:!0}})});var T=Ut(O,2);ct(T,()=>Yu,(k,b)=>{b(k,{align:"end",class:"w-48",children:(M,_)=>{var I=Qu(),Y=R(I),B=ft(Y);Ca(B,{for:"darkmode-switch",class:"flex-1 cursor-pointer",children:(L,z)=>{po();var X=vo("Dark mode");E(L,X)},$$slots:{default:!0}});var K=Ut(B,2);Ju(K,{id:"darkmode-switch",get checked(){return g(e)},onCheckedChange:L=>L!==void 0&&r(!!L)}),ht(Y);var Z=Ut(Y,2);ct(Z,()=>ju,(L,z)=>{z(L,{})});var J=Ut(Z,2);da(J,L=>{var z;return(z=fa)==null?void 0:z(L)}),yo("keydown",Y,L=>{(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),r(!g(e)))}),yo("click",Y,L=>L.stopPropagation()),E(M,I)},$$slots:{default:!0}})}),E(v,x)},$$slots:{default:!0}})}),ht(d),E(u,d)};st(o,u=>{t.data.user&&u(a)})}var c=Ut(o,2),l=ft(c);V(l,()=>t.children??Q),ht(c),ht(i),E(n,i),U()}ca(["keydown","click"]);export{hd as component};