nyc-taxi / _app /immutable /chunks /button.DfeRvuoX.js
archiesarrewood's picture
Upload folder using huggingface_hub
3bbc651 verified
import{aj as un,ak as ie,al as fn,G as W,w as dn,am as hn,an as et,ao as mn,A as Ge,ap as te,x as bn,K as tt,L as bt,aq as vt,M as vn}from"./VennDiagram.svelte_svelte_type_style_lang.BvCrDgSx.js";import{d as pn,w as qe,r as pt}from"./entry.CmEkywbK.js";import{ae as gn,V as Lt,s as Ie,b as fe,k as Te,f as oe,a9 as Se,aa as re,ab as Mt,G as N,N as gt,z as nt,e as Bt,d as jt,g as Wt,af as Oe,B as F,D as it,E as ot,F as rt,L as Vt,J as yn,K as wn}from"./scheduler.B2FSa8mv.js";import{t as Tn}from"./arrays.DATw8jA9.js";import{S as Kt,i as zt,g as xn,b as X,d as _n,t as J,c as An,a as En,m as Sn,e as On}from"./index.CzNnnxDZ.js";function Fo(t,...e){return t.call(this,...e)}const Ye=Symbol("Unset"),yt=Symbol("IsSetTracked"),wt=Symbol("GetModKeys"),Tt=Symbol("GetOwnKey"),Pn=Symbol("GetOwnPath"),xt=Symbol("GetParent"),_t=(t={},e={},n=void 0,i=void 0)=>{if(n&&!n[yt])throw new Error("SetTracked parent must be SetTracked");const o=Object.assign(()=>{},e??{}),a=Object.keys(o),r=new Proxy(o,{get(l,s){switch(s){case Ye:return!(n!=null&&n[wt].includes(i));case wt:return a;case Tt:return i;case xt:return n;case Pn:{const u=[i];let c=n;for(;c!==void 0;)u.unshift(c[Tt]),c=c[xt];return u.join(".")}case yt:return!0;case"toJSON":return()=>({...l});case"toString":case"toPrimitive":case Symbol.toPrimitive:return r[Ye]?i&&i in t?()=>t[i]:()=>"":e.toString.bind(e);default:return s in l||(l[s]=_t(t,void 0,r,s)),l[s]}},set(l,s,u){return a.push(s),typeof u=="object"&&(u=_t(t,u,r,s)),l[s]=u,!0}});return r},Ro=(t,...e)=>e.filter(i=>i==null?void 0:i[Ye]).length!==0;function Do(t,e,n,i=!0){const o=e-n;return o<=0?i?t[t.length-1]:t[0]:t[o]}function Io(t,e,n,i=!0){const o=e+n;return o>t.length-1?i?t[0]:t[t.length-1]:t[o]}function Lo(t,e,n=!0){return e===t.length-1?n?t[0]:t[e]:t[e+1]}function Mo(t,e,n=!0){return e<=0?n?t[t.length-1]:t[0]:t[e-1]}function kn(t){return t[t.length-1]}function Nn(t,e){return t.map((n,i)=>t[(e+i)%t.length])}function Bo(t,e,n=un){const i=e.findIndex(o=>n(o,t));return i!==-1?e.splice(i,1):e.push(t),e}function jo(t,e){const n=[];for(let i=0;i<t.length;i+=e)n.push(t.slice(i,i+e));return n}function Wo(t,e){return t>=0&&t<e.length}function Vo(t){t.setAttribute("data-highlighted","")}function Ko(t){t.removeAttribute("data-highlighted")}function at(t){return new Promise(e=>setTimeout(e,t))}function Cn(t,e=500){let n=null;return function(...i){const o=()=>{n=null,t(...i)};n&&clearTimeout(n),n=setTimeout(o,e)}}const Ht=()=>typeof window<"u";function Fn(){const t=navigator.userAgentData;return(t==null?void 0:t.platform)??navigator.platform}const Ut=t=>Ht()&&t.test(Fn().toLowerCase()),Rn=()=>Ht()&&!!navigator.maxTouchPoints,Dn=()=>Ut(/^mac/)&&!Rn(),In=()=>Ut(/mac|iphone|ipad|ipod/i),Ln=()=>In()&&!Dn(),Ve="data-melt-scroll-lock";function At(t,e){if(!t)return;const n=t.style.cssText;return Object.assign(t.style,e),()=>{t.style.cssText=n}}function Mn(t,e,n){if(!t)return;const i=t.style.getPropertyValue(e);return t.style.setProperty(e,n),()=>{i?t.style.setProperty(e,i):t.style.removeProperty(e)}}function Bn(t){const e=t.getBoundingClientRect().left;return Math.round(e)+t.scrollLeft?"paddingLeft":"paddingRight"}function zo(t){const e=document,n=e.defaultView??window,{documentElement:i,body:o}=e;if(o.hasAttribute(Ve))return ie;o.setAttribute(Ve,"");const r=n.innerWidth-i.clientWidth,l=()=>Mn(i,"--scrollbar-width",`${r}px`),s=Bn(i),u=n.getComputedStyle(o)[s],c=()=>At(o,{overflow:"hidden",[s]:`calc(${u} + ${r}px)`}),f=()=>{const{scrollX:m,scrollY:p,visualViewport:g}=n,y=(g==null?void 0:g.offsetLeft)??0,w=(g==null?void 0:g.offsetTop)??0,x=At(o,{position:"fixed",overflow:"hidden",top:`${-(p-Math.floor(w))}px`,left:`${-(m-Math.floor(y))}px`,right:"0",[s]:`calc(${u} + ${r}px)`});return()=>{x==null||x(),n.scrollTo(m,p)}},v=[l(),Ln()?f():c()];return()=>{v.forEach(m=>m==null?void 0:m()),o.removeAttribute(Ve)}}function Ho(t){const{open:e,forceVisible:n,activeTrigger:i}=t;return pn([e,n,i],([o,a,r])=>(o||a)&&r!==null)}function jn(t){fn&&at(1).then(()=>{const e=document.activeElement;!W(e)||e===t||(e.tabIndex=-1,t&&(t.tabIndex=0,t.focus()))})}function Gt(){return Array.from(document.querySelectorAll('a[href]:not([tabindex="-1"]), button:not([disabled]):not([tabindex="-1"]), input:not([disabled]):not([tabindex="-1"]), select:not([disabled]):not([tabindex="-1"]), textarea:not([disabled]):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])'))}function Uo(t){const e=Gt(),i=e.indexOf(t)+1,o=e[i];return i<e.length&&W(o)?o:null}function Go(t){const e=Gt(),i=e.indexOf(t)-1,o=e[i];return i>=0&&W(o)?o:null}const Wn=new Set(["Shift","Control","Alt","Meta","CapsLock","NumLock"]),Vn={onMatch:jn,getCurrentItem:()=>document.activeElement};function qo(t={}){const e={...Vn,...t},n=dn(qe([])),i=Cn(()=>{n.update(()=>[])});return{typed:n,resetTyped:i,handleTypeaheadSearch:(a,r)=>{if(Wn.has(a))return;const l=e.getCurrentItem(),s=gn(n);if(!Array.isArray(s))return;s.push(a.toLowerCase()),n.set(s);const u=r.filter(y=>!(y.getAttribute("disabled")==="true"||y.getAttribute("aria-disabled")==="true"||y.hasAttribute("data-disabled"))),f=s.length>1&&s.every(y=>y===s[0])?s[0]:s.join(""),v=W(l)?u.indexOf(l):-1;let m=Nn(u,Math.max(v,0));f.length===1&&(m=m.filter(y=>y!==l));const g=m.find(y=>(y==null?void 0:y.innerText)&&y.innerText.toLowerCase().startsWith(f.toLowerCase()));W(g)&&g!==l&&e.onMatch(g),i()}}}function Kn(t){let e=t.parentElement;for(;W(e)&&!e.hasAttribute("data-portal");)e=e.parentElement;return e||"body"}function Yo(t,e){return e!==void 0?e:Kn(t)==="body"?document.body:null}async function Xo(t){const{prop:e,defaultEl:n}=t;if(await Promise.all([at(1),Lt]),e===void 0){n==null||n.focus();return}const i=hn(e)?e(n):e;if(typeof i=="string"){const o=document.querySelector(i);if(!W(o))return;o.focus()}else W(i)&&i.focus()}const Z=Math.min,V=Math.max,Pe=Math.round,_e=Math.floor,U=t=>({x:t,y:t}),zn={left:"right",right:"left",bottom:"top",top:"bottom"},Hn={start:"end",end:"start"};function Xe(t,e,n){return V(t,Z(e,n))}function he(t,e){return typeof t=="function"?t(e):t}function Q(t){return t.split("-")[0]}function me(t){return t.split("-")[1]}function qt(t){return t==="x"?"y":"x"}function st(t){return t==="y"?"height":"width"}function ae(t){return["top","bottom"].includes(Q(t))?"y":"x"}function lt(t){return qt(ae(t))}function Un(t,e,n){n===void 0&&(n=!1);const i=me(t),o=lt(t),a=st(o);let r=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(r=ke(r)),[r,ke(r)]}function Gn(t){const e=ke(t);return[Je(t),e,Je(e)]}function Je(t){return t.replace(/start|end/g,e=>Hn[e])}function qn(t,e,n){const i=["left","right"],o=["right","left"],a=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:i:e?i:o;case"left":case"right":return e?a:r;default:return[]}}function Yn(t,e,n,i){const o=me(t);let a=qn(Q(t),n==="start",i);return o&&(a=a.map(r=>r+"-"+o),e&&(a=a.concat(a.map(Je)))),a}function ke(t){return t.replace(/left|right|bottom|top/g,e=>zn[e])}function Xn(t){return{top:0,right:0,bottom:0,left:0,...t}}function Yt(t){return typeof t!="number"?Xn(t):{top:t,right:t,bottom:t,left:t}}function Ne(t){const{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function Et(t,e,n){let{reference:i,floating:o}=t;const a=ae(e),r=lt(e),l=st(r),s=Q(e),u=a==="y",c=i.x+i.width/2-o.width/2,f=i.y+i.height/2-o.height/2,v=i[l]/2-o[l]/2;let m;switch(s){case"top":m={x:c,y:i.y-o.height};break;case"bottom":m={x:c,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:f};break;case"left":m={x:i.x-o.width,y:f};break;default:m={x:i.x,y:i.y}}switch(me(e)){case"start":m[r]-=v*(n&&u?-1:1);break;case"end":m[r]+=v*(n&&u?-1:1);break}return m}const Jn=async(t,e,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:a=[],platform:r}=n,l=a.filter(Boolean),s=await(r.isRTL==null?void 0:r.isRTL(e));let u=await r.getElementRects({reference:t,floating:e,strategy:o}),{x:c,y:f}=Et(u,i,s),v=i,m={},p=0;for(let g=0;g<l.length;g++){const{name:y,fn:w}=l[g],{x,y:A,data:k,reset:P}=await w({x:c,y:f,initialPlacement:i,placement:v,strategy:o,middlewareData:m,rects:u,platform:r,elements:{reference:t,floating:e}});c=x??c,f=A??f,m={...m,[y]:{...m[y],...k}},P&&p<=50&&(p++,typeof P=="object"&&(P.placement&&(v=P.placement),P.rects&&(u=P.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:o}):P.rects),{x:c,y:f}=Et(u,v,s)),g=-1)}return{x:c,y:f,placement:v,strategy:o,middlewareData:m}};async function ct(t,e){var n;e===void 0&&(e={});const{x:i,y:o,platform:a,rects:r,elements:l,strategy:s}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:v=!1,padding:m=0}=he(e,t),p=Yt(m),y=l[v?f==="floating"?"reference":"floating":f],w=Ne(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(y)))==null||n?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:c,strategy:s})),x=f==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),k=await(a.isElement==null?void 0:a.isElement(A))?await(a.getScale==null?void 0:a.getScale(A))||{x:1,y:1}:{x:1,y:1},P=Ne(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:A,strategy:s}):x);return{top:(w.top-P.top+p.top)/k.y,bottom:(P.bottom-w.bottom+p.bottom)/k.y,left:(w.left-P.left+p.left)/k.x,right:(P.right-w.right+p.right)/k.x}}const Zn=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:o,rects:a,platform:r,elements:l,middlewareData:s}=e,{element:u,padding:c=0}=he(t,e)||{};if(u==null)return{};const f=Yt(c),v={x:n,y:i},m=lt(o),p=st(m),g=await r.getDimensions(u),y=m==="y",w=y?"top":"left",x=y?"bottom":"right",A=y?"clientHeight":"clientWidth",k=a.reference[p]+a.reference[m]-v[m]-a.floating[p],P=v[m]-a.reference[m],D=await(r.getOffsetParent==null?void 0:r.getOffsetParent(u));let L=D?D[A]:0;(!L||!await(r.isElement==null?void 0:r.isElement(D)))&&(L=l.floating[A]||a.floating[p]);const B=k/2-P/2,j=L/2-g[p]/2-1,I=Z(f[w],j),M=Z(f[x],j),O=I,d=L-g[p]-M,h=L/2-g[p]/2+B,T=Xe(O,h,d),E=!s.arrow&&me(o)!=null&&h!==T&&a.reference[p]/2-(h<O?I:M)-g[p]/2<0,S=E?h<O?h-O:h-d:0;return{[m]:v[m]+S,data:{[m]:T,centerOffset:h-T-S,...E&&{alignmentOffset:S}},reset:E}}}),Qn=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:o,middlewareData:a,rects:r,initialPlacement:l,platform:s,elements:u}=e,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:v,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...y}=he(t,e);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const w=Q(o),x=ae(l),A=Q(l)===l,k=await(s.isRTL==null?void 0:s.isRTL(u.floating)),P=v||(A||!g?[ke(l)]:Gn(l)),D=p!=="none";!v&&D&&P.push(...Yn(l,g,p,k));const L=[l,...P],B=await ct(e,y),j=[];let I=((i=a.flip)==null?void 0:i.overflows)||[];if(c&&j.push(B[w]),f){const h=Un(o,r,k);j.push(B[h[0]],B[h[1]])}if(I=[...I,{placement:o,overflows:j}],!j.every(h=>h<=0)){var M,O;const h=(((M=a.flip)==null?void 0:M.index)||0)+1,T=L[h];if(T)return{data:{index:h,overflows:I},reset:{placement:T}};let E=(O=I.filter(S=>S.overflows[0]<=0).sort((S,b)=>S.overflows[1]-b.overflows[1])[0])==null?void 0:O.placement;if(!E)switch(m){case"bestFit":{var d;const S=(d=I.filter(b=>{if(D){const _=ae(b.placement);return _===x||_==="y"}return!0}).map(b=>[b.placement,b.overflows.filter(_=>_>0).reduce((_,C)=>_+C,0)]).sort((b,_)=>b[1]-_[1])[0])==null?void 0:d[0];S&&(E=S);break}case"initialPlacement":E=l;break}if(o!==E)return{reset:{placement:E}}}return{}}}};async function $n(t,e){const{placement:n,platform:i,elements:o}=t,a=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=Q(n),l=me(n),s=ae(n)==="y",u=["left","top"].includes(r)?-1:1,c=a&&s?-1:1,f=he(e,t);let{mainAxis:v,crossAxis:m,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof p=="number"&&(m=l==="end"?p*-1:p),s?{x:m*c,y:v*u}:{x:v*u,y:m*c}}const ei=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:o,y:a,placement:r,middlewareData:l}=e,s=await $n(e,t);return r===((n=l.offset)==null?void 0:n.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:o+s.x,y:a+s.y,data:{...s,placement:r}}}}},ti=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:o}=e,{mainAxis:a=!0,crossAxis:r=!1,limiter:l={fn:y=>{let{x:w,y:x}=y;return{x:w,y:x}}},...s}=he(t,e),u={x:n,y:i},c=await ct(e,s),f=ae(Q(o)),v=qt(f);let m=u[v],p=u[f];if(a){const y=v==="y"?"top":"left",w=v==="y"?"bottom":"right",x=m+c[y],A=m-c[w];m=Xe(x,m,A)}if(r){const y=f==="y"?"top":"left",w=f==="y"?"bottom":"right",x=p+c[y],A=p-c[w];p=Xe(x,p,A)}const g=l.fn({...e,[v]:m,[f]:p});return{...g,data:{x:g.x-n,y:g.y-i,enabled:{[v]:a,[f]:r}}}}}},ni=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;const{placement:o,rects:a,platform:r,elements:l}=e,{apply:s=()=>{},...u}=he(t,e),c=await ct(e,u),f=Q(o),v=me(o),m=ae(o)==="y",{width:p,height:g}=a.floating;let y,w;f==="top"||f==="bottom"?(y=f,w=v===(await(r.isRTL==null?void 0:r.isRTL(l.floating))?"start":"end")?"left":"right"):(w=f,y=v==="end"?"top":"bottom");const x=g-c.top-c.bottom,A=p-c.left-c.right,k=Z(g-c[y],x),P=Z(p-c[w],A),D=!e.middlewareData.shift;let L=k,B=P;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(B=A),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(L=x),D&&!v){const I=V(c.left,0),M=V(c.right,0),O=V(c.top,0),d=V(c.bottom,0);m?B=p-2*(I!==0||M!==0?I+M:V(c.left,c.right)):L=g-2*(O!==0||d!==0?O+d:V(c.top,c.bottom))}await s({...e,availableWidth:B,availableHeight:L});const j=await r.getDimensions(l.floating);return p!==j.width||g!==j.height?{reset:{rects:!0}}:{}}}};function Le(){return typeof window<"u"}function be(t){return Xt(t)?(t.nodeName||"").toLowerCase():"#document"}function K(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function q(t){var e;return(e=(Xt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xt(t){return Le()?t instanceof Node||t instanceof K(t).Node:!1}function z(t){return Le()?t instanceof Element||t instanceof K(t).Element:!1}function G(t){return Le()?t instanceof HTMLElement||t instanceof K(t).HTMLElement:!1}function St(t){return!Le()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof K(t).ShadowRoot}function xe(t){const{overflow:e,overflowX:n,overflowY:i,display:o}=H(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(o)}function ii(t){return["table","td","th"].includes(be(t))}function Me(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function ut(t){const e=ft(),n=z(t)?H(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function oi(t){let e=$(t);for(;G(e)&&!de(e);){if(ut(e))return e;if(Me(e))return null;e=$(e)}return null}function ft(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function de(t){return["html","body","#document"].includes(be(t))}function H(t){return K(t).getComputedStyle(t)}function Be(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function $(t){if(be(t)==="html")return t;const e=t.assignedSlot||t.parentNode||St(t)&&t.host||q(t);return St(e)?e.host:e}function Jt(t){const e=$(t);return de(e)?t.ownerDocument?t.ownerDocument.body:t.body:G(e)&&xe(e)?e:Jt(e)}function we(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=Jt(t),a=o===((i=t.ownerDocument)==null?void 0:i.body),r=K(o);if(a){const l=Ze(r);return e.concat(r,r.visualViewport||[],xe(o)?o:[],l&&n?we(l):[])}return e.concat(o,we(o,[],n))}function Ze(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Zt(t){const e=H(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const o=G(t),a=o?t.offsetWidth:n,r=o?t.offsetHeight:i,l=Pe(n)!==a||Pe(i)!==r;return l&&(n=a,i=r),{width:n,height:i,$:l}}function dt(t){return z(t)?t:t.contextElement}function ue(t){const e=dt(t);if(!G(e))return U(1);const n=e.getBoundingClientRect(),{width:i,height:o,$:a}=Zt(e);let r=(a?Pe(n.width):n.width)/i,l=(a?Pe(n.height):n.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}const ri=U(0);function Qt(t){const e=K(t);return!ft()||!e.visualViewport?ri:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ai(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==K(t)?!1:e}function se(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),a=dt(t);let r=U(1);e&&(i?z(i)&&(r=ue(i)):r=ue(t));const l=ai(a,n,i)?Qt(a):U(0);let s=(o.left+l.x)/r.x,u=(o.top+l.y)/r.y,c=o.width/r.x,f=o.height/r.y;if(a){const v=K(a),m=i&&z(i)?K(i):i;let p=v,g=Ze(p);for(;g&&i&&m!==p;){const y=ue(g),w=g.getBoundingClientRect(),x=H(g),A=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*y.x,k=w.top+(g.clientTop+parseFloat(x.paddingTop))*y.y;s*=y.x,u*=y.y,c*=y.x,f*=y.y,s+=A,u+=k,p=K(g),g=Ze(p)}}return Ne({width:c,height:f,x:s,y:u})}function ht(t,e){const n=Be(t).scrollLeft;return e?e.left+n:se(q(t)).left+n}function $t(t,e,n){n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=i.left+e.scrollLeft-(n?0:ht(t,i)),a=i.top+e.scrollTop;return{x:o,y:a}}function si(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t;const a=o==="fixed",r=q(i),l=e?Me(e.floating):!1;if(i===r||l&&a)return n;let s={scrollLeft:0,scrollTop:0},u=U(1);const c=U(0),f=G(i);if((f||!f&&!a)&&((be(i)!=="body"||xe(r))&&(s=Be(i)),G(i))){const m=se(i);u=ue(i),c.x=m.x+i.clientLeft,c.y=m.y+i.clientTop}const v=r&&!f&&!a?$t(r,s,!0):U(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+c.x+v.x,y:n.y*u.y-s.scrollTop*u.y+c.y+v.y}}function li(t){return Array.from(t.getClientRects())}function ci(t){const e=q(t),n=Be(t),i=t.ownerDocument.body,o=V(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),a=V(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let r=-n.scrollLeft+ht(t);const l=-n.scrollTop;return H(i).direction==="rtl"&&(r+=V(e.clientWidth,i.clientWidth)-o),{width:o,height:a,x:r,y:l}}function ui(t,e){const n=K(t),i=q(t),o=n.visualViewport;let a=i.clientWidth,r=i.clientHeight,l=0,s=0;if(o){a=o.width,r=o.height;const u=ft();(!u||u&&e==="fixed")&&(l=o.offsetLeft,s=o.offsetTop)}return{width:a,height:r,x:l,y:s}}function fi(t,e){const n=se(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,a=G(t)?ue(t):U(1),r=t.clientWidth*a.x,l=t.clientHeight*a.y,s=o*a.x,u=i*a.y;return{width:r,height:l,x:s,y:u}}function Ot(t,e,n){let i;if(e==="viewport")i=ui(t,n);else if(e==="document")i=ci(q(t));else if(z(e))i=fi(e,n);else{const o=Qt(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return Ne(i)}function en(t,e){const n=$(t);return n===e||!z(n)||de(n)?!1:H(n).position==="fixed"||en(n,e)}function di(t,e){const n=e.get(t);if(n)return n;let i=we(t,[],!1).filter(l=>z(l)&&be(l)!=="body"),o=null;const a=H(t).position==="fixed";let r=a?$(t):t;for(;z(r)&&!de(r);){const l=H(r),s=ut(r);!s&&l.position==="fixed"&&(o=null),(a?!s&&!o:!s&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||xe(r)&&!s&&en(t,r))?i=i.filter(c=>c!==r):o=l,r=$(r)}return e.set(t,i),i}function hi(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t;const r=[...n==="clippingAncestors"?Me(e)?[]:di(e,this._c):[].concat(n),i],l=r[0],s=r.reduce((u,c)=>{const f=Ot(e,c,o);return u.top=V(f.top,u.top),u.right=Z(f.right,u.right),u.bottom=Z(f.bottom,u.bottom),u.left=V(f.left,u.left),u},Ot(e,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function mi(t){const{width:e,height:n}=Zt(t);return{width:e,height:n}}function bi(t,e,n){const i=G(e),o=q(e),a=n==="fixed",r=se(t,!0,a,e);let l={scrollLeft:0,scrollTop:0};const s=U(0);if(i||!i&&!a)if((be(e)!=="body"||xe(o))&&(l=Be(e)),i){const v=se(e,!0,a,e);s.x=v.x+e.clientLeft,s.y=v.y+e.clientTop}else o&&(s.x=ht(o));const u=o&&!i&&!a?$t(o,l):U(0),c=r.left+l.scrollLeft-s.x-u.x,f=r.top+l.scrollTop-s.y-u.y;return{x:c,y:f,width:r.width,height:r.height}}function Ke(t){return H(t).position==="static"}function Pt(t,e){if(!G(t)||H(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return q(t)===n&&(n=n.ownerDocument.body),n}function tn(t,e){const n=K(t);if(Me(t))return n;if(!G(t)){let o=$(t);for(;o&&!de(o);){if(z(o)&&!Ke(o))return o;o=$(o)}return n}let i=Pt(t,e);for(;i&&ii(i)&&Ke(i);)i=Pt(i,e);return i&&de(i)&&Ke(i)&&!ut(i)?n:i||oi(t)||n}const vi=async function(t){const e=this.getOffsetParent||tn,n=this.getDimensions,i=await n(t.floating);return{reference:bi(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function pi(t){return H(t).direction==="rtl"}const gi={convertOffsetParentRelativeRectToViewportRelativeRect:si,getDocumentElement:q,getClippingRect:hi,getOffsetParent:tn,getElementRects:vi,getClientRects:li,getDimensions:mi,getScale:ue,isElement:z,isRTL:pi};function yi(t,e){let n=null,i;const o=q(t);function a(){var l;clearTimeout(i),(l=n)==null||l.disconnect(),n=null}function r(l,s){l===void 0&&(l=!1),s===void 0&&(s=1),a();const{left:u,top:c,width:f,height:v}=t.getBoundingClientRect();if(l||e(),!f||!v)return;const m=_e(c),p=_e(o.clientWidth-(u+f)),g=_e(o.clientHeight-(c+v)),y=_e(u),x={rootMargin:-m+"px "+-p+"px "+-g+"px "+-y+"px",threshold:V(0,Z(1,s))||1};let A=!0;function k(P){const D=P[0].intersectionRatio;if(D!==s){if(!A)return r();D?r(!1,D):i=setTimeout(()=>{r(!1,1e-7)},1e3)}A=!1}try{n=new IntersectionObserver(k,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,x)}n.observe(t)}return r(!0),a}function wi(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:s=!1}=i,u=dt(t),c=o||a?[...u?we(u):[],...we(e)]:[];c.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const f=u&&l?yi(u,n):null;let v=-1,m=null;r&&(m=new ResizeObserver(w=>{let[x]=w;x&&x.target===u&&m&&(m.unobserve(e),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var A;(A=m)==null||A.observe(e)})),n()}),u&&!s&&m.observe(u),m.observe(e));let p,g=s?se(t):null;s&&y();function y(){const w=se(t);g&&(w.x!==g.x||w.y!==g.y||w.width!==g.width||w.height!==g.height)&&n(),g=w,p=requestAnimationFrame(y)}return n(),()=>{var w;c.forEach(x=>{o&&x.removeEventListener("scroll",n),a&&x.removeEventListener("resize",n)}),f==null||f(),(w=m)==null||w.disconnect(),m=null,s&&cancelAnimationFrame(p)}}const Ti=ei,xi=ti,_i=Qn,Ai=ni,Ei=Zn,Si=(t,e,n)=>{const i=new Map,o={platform:gi,...n},a={...o.platform,_c:i};return Jn(t,e,{...o,platform:a})},Oi={strategy:"absolute",placement:"top",gutter:5,flip:!0,sameWidth:!1,overflowPadding:8},Pi={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function ki(t,e,n={}){if(!e||!t||n===null)return{destroy:ie};const i={...Oi,...n},o=e.querySelector("[data-arrow=true]"),a=[];i.flip&&a.push(_i({boundary:i.boundary,padding:i.overflowPadding}));const r=W(o)?o.offsetHeight/2:0;if(i.gutter||i.offset){const s=i.gutter?{mainAxis:i.gutter}:i.offset;(s==null?void 0:s.mainAxis)!=null&&(s.mainAxis+=r),a.push(Ti(s))}a.push(xi({boundary:i.boundary,crossAxis:i.overlap,padding:i.overflowPadding})),o&&a.push(Ei({element:o,padding:8})),a.push(Ai({padding:i.overflowPadding,apply({rects:s,availableHeight:u,availableWidth:c}){i.sameWidth&&Object.assign(e.style,{width:`${Math.round(s.reference.width)}px`,minWidth:"unset"}),i.fitViewport&&Object.assign(e.style,{maxWidth:`${c}px`,maxHeight:`${u}px`})}}));function l(){if(!t||!e||W(t)&&!t.ownerDocument.documentElement.contains(t))return;const{placement:s,strategy:u}=i;Si(t,e,{placement:s,middleware:a,strategy:u}).then(c=>{const f=Math.round(c.x),v=Math.round(c.y),[m,p]=Ni(c.placement);if(e.setAttribute("data-side",m),e.setAttribute("data-align",p),Object.assign(e.style,{position:i.strategy,top:`${v}px`,left:`${f}px`}),W(o)&&c.middlewareData.arrow){const{x:g,y}=c.middlewareData.arrow,w=c.placement.split("-")[0];o.setAttribute("data-side",w),Object.assign(o.style,{position:"absolute",left:g!=null?`${g}px`:"",top:y!=null?`${y}px`:"",[w]:`calc(100% - ${r}px)`,transform:Pi[w],backgroundColor:"inherit",zIndex:"inherit"})}return c})}return Object.assign(e.style,{position:i.strategy}),{destroy:wi(t,e,l)}}function Ni(t){const[e,n="center"]=t.split("-");return[e,n]}/*!
* tabbable 6.2.0
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*/var nn=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ce=nn.join(","),on=typeof Element>"u",le=on?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Fe=!on&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},Re=function t(e,n){var i;n===void 0&&(n=!0);var o=e==null||(i=e.getAttribute)===null||i===void 0?void 0:i.call(e,"inert"),a=o===""||o==="true",r=a||n&&e&&t(e.parentNode);return r},Ci=function(e){var n,i=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return i===""||i==="true"},rn=function(e,n,i){if(Re(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(Ce));return n&&le.call(e,Ce)&&o.unshift(e),o=o.filter(i),o},an=function t(e,n,i){for(var o=[],a=Array.from(e);a.length;){var r=a.shift();if(!Re(r,!1))if(r.tagName==="SLOT"){var l=r.assignedElements(),s=l.length?l:r.children,u=t(s,!0,i);i.flatten?o.push.apply(o,u):o.push({scopeParent:r,candidates:u})}else{var c=le.call(r,Ce);c&&i.filter(r)&&(n||!e.includes(r))&&o.push(r);var f=r.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(r),v=!Re(f,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(r));if(f&&v){var m=t(f===!0?r.children:f.children,!0,i);i.flatten?o.push.apply(o,m):o.push({scopeParent:r,candidates:m})}else a.unshift.apply(a,r.children)}}return o},sn=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ne=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Ci(e))&&!sn(e)?0:e.tabIndex},Fi=function(e,n){var i=ne(e);return i<0&&n&&!sn(e)?0:i},Ri=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},ln=function(e){return e.tagName==="INPUT"},Di=function(e){return ln(e)&&e.type==="hidden"},Ii=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(i){return i.tagName==="SUMMARY"});return n},Li=function(e,n){for(var i=0;i<e.length;i++)if(e[i].checked&&e[i].form===n)return e[i]},Mi=function(e){if(!e.name)return!0;var n=e.form||Fe(e),i=function(l){return n.querySelectorAll('input[type="radio"][name="'+l+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=i(window.CSS.escape(e.name));else try{o=i(e.name)}catch(r){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",r.message),!1}var a=Li(o,e.form);return!a||a===e},Bi=function(e){return ln(e)&&e.type==="radio"},ji=function(e){return Bi(e)&&!Mi(e)},Wi=function(e){var n,i=e&&Fe(e),o=(n=i)===null||n===void 0?void 0:n.host,a=!1;if(i&&i!==e){var r,l,s;for(a=!!((r=o)!==null&&r!==void 0&&(l=r.ownerDocument)!==null&&l!==void 0&&l.contains(o)||e!=null&&(s=e.ownerDocument)!==null&&s!==void 0&&s.contains(e));!a&&o;){var u,c,f;i=Fe(o),o=(u=i)===null||u===void 0?void 0:u.host,a=!!((c=o)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return a},kt=function(e){var n=e.getBoundingClientRect(),i=n.width,o=n.height;return i===0&&o===0},Vi=function(e,n){var i=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var a=le.call(e,"details>summary:first-of-type"),r=a?e.parentElement:e;if(le.call(r,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="legacy-full"){if(typeof o=="function"){for(var l=e;e;){var s=e.parentElement,u=Fe(e);if(s&&!s.shadowRoot&&o(s)===!0)return kt(e);e.assignedSlot?e=e.assignedSlot:!s&&u!==e.ownerDocument?e=u.host:e=s}e=l}if(Wi(e))return!e.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return kt(e);return!1},Ki=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var i=0;i<n.children.length;i++){var o=n.children.item(i);if(o.tagName==="LEGEND")return le.call(n,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}n=n.parentElement}return!1},De=function(e,n){return!(n.disabled||Re(n)||Di(n)||Vi(n,e)||Ii(n)||Ki(n))},Qe=function(e,n){return!(ji(n)||ne(n)<0||!De(e,n))},zi=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Hi=function t(e){var n=[],i=[];return e.forEach(function(o,a){var r=!!o.scopeParent,l=r?o.scopeParent:o,s=Fi(l,r),u=r?t(o.candidates):l;s===0?r?n.push.apply(n,u):n.push(l):i.push({documentOrder:a,tabIndex:s,item:o,isScope:r,content:u})}),i.sort(Ri).reduce(function(o,a){return a.isScope?o.push.apply(o,a.content):o.push(a.content),o},[]).concat(n)},Ui=function(e,n){n=n||{};var i;return n.getShadowRoot?i=an([e],n.includeContainer,{filter:Qe.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:zi}):i=rn(e,n.includeContainer,Qe.bind(null,n)),Hi(i)},Gi=function(e,n){n=n||{};var i;return n.getShadowRoot?i=an([e],n.includeContainer,{filter:De.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):i=rn(e,n.includeContainer,De.bind(null,n)),i},ce=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return le.call(e,Ce)===!1?!1:Qe(n,e)},qi=nn.concat("iframe").join(","),ze=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return le.call(e,qi)===!1?!1:De(n,e)};/*!
* focus-trap 7.6.2
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
*/function $e(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function Yi(t){if(Array.isArray(t))return $e(t)}function Xi(t,e,n){return(e=eo(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ji(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Zi(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,i)}return n}function Ct(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Nt(Object(n),!0).forEach(function(i){Xi(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Nt(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Qi(t){return Yi(t)||Ji(t)||to(t)||Zi()}function $i(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function eo(t){var e=$i(t,"string");return typeof e=="symbol"?e:e+""}function to(t,e){if(t){if(typeof t=="string")return $e(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$e(t,e):void 0}}var Ft={activateTrap:function(e,n){if(e.length>0){var i=e[e.length-1];i!==n&&i.pause()}var o=e.indexOf(n);o===-1||e.splice(o,1),e.push(n)},deactivateTrap:function(e,n){var i=e.indexOf(n);i!==-1&&e.splice(i,1),e.length>0&&e[e.length-1].unpause()}},no=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},io=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},ye=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},oo=function(e){return ye(e)&&!e.shiftKey},ro=function(e){return ye(e)&&e.shiftKey},Rt=function(e){return setTimeout(e,0)},ge=function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return typeof e=="function"?e.apply(void 0,i):e},Ae=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},ao=[],so=function(e,n){var i=(n==null?void 0:n.document)||document,o=(n==null?void 0:n.trapStack)||ao,a=Ct({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:oo,isKeyBackward:ro},n),r={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},l,s=function(d,h,T){return d&&d[h]!==void 0?d[h]:a[T||h]},u=function(d,h){var T=typeof(h==null?void 0:h.composedPath)=="function"?h.composedPath():void 0;return r.containerGroups.findIndex(function(E){var S=E.container,b=E.tabbableNodes;return S.contains(d)||(T==null?void 0:T.includes(S))||b.find(function(_){return _===d})})},c=function(d){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},T=h.hasFallback,E=T===void 0?!1:T,S=h.params,b=S===void 0?[]:S,_=a[d];if(typeof _=="function"&&(_=_.apply(void 0,Qi(b))),_===!0&&(_=void 0),!_){if(_===void 0||_===!1)return _;throw new Error("`".concat(d,"` was specified but was not a node, or did not return a node"))}var C=_;if(typeof _=="string"){try{C=i.querySelector(_)}catch(R){throw new Error("`".concat(d,'` appears to be an invalid selector; error="').concat(R.message,'"'))}if(!C&&!E)throw new Error("`".concat(d,"` as selector refers to no known node"))}return C},f=function(){var d=c("initialFocus",{hasFallback:!0});if(d===!1)return!1;if(d===void 0||d&&!ze(d,a.tabbableOptions))if(u(i.activeElement)>=0)d=i.activeElement;else{var h=r.tabbableGroups[0],T=h&&h.firstTabbableNode;d=T||c("fallbackFocus")}else d===null&&(d=c("fallbackFocus"));if(!d)throw new Error("Your focus-trap needs to have at least one focusable element");return d},v=function(){if(r.containerGroups=r.containers.map(function(d){var h=Ui(d,a.tabbableOptions),T=Gi(d,a.tabbableOptions),E=h.length>0?h[0]:void 0,S=h.length>0?h[h.length-1]:void 0,b=T.find(function(R){return ce(R)}),_=T.slice().reverse().find(function(R){return ce(R)}),C=!!h.find(function(R){return ne(R)>0});return{container:d,tabbableNodes:h,focusableNodes:T,posTabIndexesFound:C,firstTabbableNode:E,lastTabbableNode:S,firstDomTabbableNode:b,lastDomTabbableNode:_,nextTabbableNode:function(ee){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Y=h.indexOf(ee);return Y<0?ve?T.slice(T.indexOf(ee)+1).find(function(pe){return ce(pe)}):T.slice(0,T.indexOf(ee)).reverse().find(function(pe){return ce(pe)}):h[Y+(ve?1:-1)]}}}),r.tabbableGroups=r.containerGroups.filter(function(d){return d.tabbableNodes.length>0}),r.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(r.containerGroups.find(function(d){return d.posTabIndexesFound})&&r.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},m=function(d){var h=d.activeElement;if(h)return h.shadowRoot&&h.shadowRoot.activeElement!==null?m(h.shadowRoot):h},p=function(d){if(d!==!1&&d!==m(document)){if(!d||!d.focus){p(f());return}d.focus({preventScroll:!!a.preventScroll}),r.mostRecentlyFocusedNode=d,no(d)&&d.select()}},g=function(d){var h=c("setReturnFocus",{params:[d]});return h||(h===!1?!1:d)},y=function(d){var h=d.target,T=d.event,E=d.isBackward,S=E===void 0?!1:E;h=h||Ae(T),v();var b=null;if(r.tabbableGroups.length>0){var _=u(h,T),C=_>=0?r.containerGroups[_]:void 0;if(_<0)S?b=r.tabbableGroups[r.tabbableGroups.length-1].lastTabbableNode:b=r.tabbableGroups[0].firstTabbableNode;else if(S){var R=r.tabbableGroups.findIndex(function(je){var We=je.firstTabbableNode;return h===We});if(R<0&&(C.container===h||ze(h,a.tabbableOptions)&&!ce(h,a.tabbableOptions)&&!C.nextTabbableNode(h,!1))&&(R=_),R>=0){var ee=R===0?r.tabbableGroups.length-1:R-1,ve=r.tabbableGroups[ee];b=ne(h)>=0?ve.lastTabbableNode:ve.lastDomTabbableNode}else ye(T)||(b=C.nextTabbableNode(h,!1))}else{var Y=r.tabbableGroups.findIndex(function(je){var We=je.lastTabbableNode;return h===We});if(Y<0&&(C.container===h||ze(h,a.tabbableOptions)&&!ce(h,a.tabbableOptions)&&!C.nextTabbableNode(h))&&(Y=_),Y>=0){var pe=Y===r.tabbableGroups.length-1?0:Y+1,mt=r.tabbableGroups[pe];b=ne(h)>=0?mt.firstTabbableNode:mt.firstDomTabbableNode}else ye(T)||(b=C.nextTabbableNode(h))}}else b=c("fallbackFocus");return b},w=function(d){var h=Ae(d);if(!(u(h,d)>=0)){if(ge(a.clickOutsideDeactivates,d)){l.deactivate({returnFocus:a.returnFocusOnDeactivate});return}ge(a.allowOutsideClick,d)||d.preventDefault()}},x=function(d){var h=Ae(d),T=u(h,d)>=0;if(T||h instanceof Document)T&&(r.mostRecentlyFocusedNode=h);else{d.stopImmediatePropagation();var E,S=!0;if(r.mostRecentlyFocusedNode)if(ne(r.mostRecentlyFocusedNode)>0){var b=u(r.mostRecentlyFocusedNode),_=r.containerGroups[b].tabbableNodes;if(_.length>0){var C=_.findIndex(function(R){return R===r.mostRecentlyFocusedNode});C>=0&&(a.isKeyForward(r.recentNavEvent)?C+1<_.length&&(E=_[C+1],S=!1):C-1>=0&&(E=_[C-1],S=!1))}}else r.containerGroups.some(function(R){return R.tabbableNodes.some(function(ee){return ne(ee)>0})})||(S=!1);else S=!1;S&&(E=y({target:r.mostRecentlyFocusedNode,isBackward:a.isKeyBackward(r.recentNavEvent)})),p(E||r.mostRecentlyFocusedNode||f())}r.recentNavEvent=void 0},A=function(d){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;r.recentNavEvent=d;var T=y({event:d,isBackward:h});T&&(ye(d)&&d.preventDefault(),p(T))},k=function(d){(a.isKeyForward(d)||a.isKeyBackward(d))&&A(d,a.isKeyBackward(d))},P=function(d){io(d)&&ge(a.escapeDeactivates,d)!==!1&&(d.preventDefault(),l.deactivate())},D=function(d){var h=Ae(d);u(h,d)>=0||ge(a.clickOutsideDeactivates,d)||ge(a.allowOutsideClick,d)||(d.preventDefault(),d.stopImmediatePropagation())},L=function(){if(r.active)return Ft.activateTrap(o,l),r.delayInitialFocusTimer=a.delayInitialFocus?Rt(function(){p(f())}):p(f()),i.addEventListener("focusin",x,!0),i.addEventListener("mousedown",w,{capture:!0,passive:!1}),i.addEventListener("touchstart",w,{capture:!0,passive:!1}),i.addEventListener("click",D,{capture:!0,passive:!1}),i.addEventListener("keydown",k,{capture:!0,passive:!1}),i.addEventListener("keydown",P),l},B=function(){if(r.active)return i.removeEventListener("focusin",x,!0),i.removeEventListener("mousedown",w,!0),i.removeEventListener("touchstart",w,!0),i.removeEventListener("click",D,!0),i.removeEventListener("keydown",k,!0),i.removeEventListener("keydown",P),l},j=function(d){var h=d.some(function(T){var E=Array.from(T.removedNodes);return E.some(function(S){return S===r.mostRecentlyFocusedNode})});h&&p(f())},I=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(j):void 0,M=function(){I&&(I.disconnect(),r.active&&!r.paused&&r.containers.map(function(d){I.observe(d,{subtree:!0,childList:!0})}))};return l={get active(){return r.active},get paused(){return r.paused},activate:function(d){if(r.active)return this;var h=s(d,"onActivate"),T=s(d,"onPostActivate"),E=s(d,"checkCanFocusTrap");E||v(),r.active=!0,r.paused=!1,r.nodeFocusedBeforeActivation=i.activeElement,h==null||h();var S=function(){E&&v(),L(),M(),T==null||T()};return E?(E(r.containers.concat()).then(S,S),this):(S(),this)},deactivate:function(d){if(!r.active)return this;var h=Ct({onDeactivate:a.onDeactivate,onPostDeactivate:a.onPostDeactivate,checkCanReturnFocus:a.checkCanReturnFocus},d);clearTimeout(r.delayInitialFocusTimer),r.delayInitialFocusTimer=void 0,B(),r.active=!1,r.paused=!1,M(),Ft.deactivateTrap(o,l);var T=s(h,"onDeactivate"),E=s(h,"onPostDeactivate"),S=s(h,"checkCanReturnFocus"),b=s(h,"returnFocus","returnFocusOnDeactivate");T==null||T();var _=function(){Rt(function(){b&&p(g(r.nodeFocusedBeforeActivation)),E==null||E()})};return b&&S?(S(g(r.nodeFocusedBeforeActivation)).then(_,_),this):(_(),this)},pause:function(d){if(r.paused||!r.active)return this;var h=s(d,"onPause"),T=s(d,"onPostPause");return r.paused=!0,h==null||h(),B(),M(),T==null||T(),this},unpause:function(d){if(!r.paused||!r.active)return this;var h=s(d,"onUnpause"),T=s(d,"onPostUnpause");return r.paused=!1,h==null||h(),v(),L(),M(),T==null||T(),this},updateContainerElements:function(d){var h=[].concat(d).filter(Boolean);return r.containers=h.map(function(T){return typeof T=="string"?i.querySelector(T):T}),r.active&&v(),M(),this}},l.updateContainerElements(e),l};function lo(t={}){let e;const{immediate:n,...i}=t,o=qe(!1),a=qe(!1),r=f=>e==null?void 0:e.activate(f),l=f=>{e==null||e.deactivate(f)},s=()=>{e&&(e.pause(),a.set(!0))},u=()=>{e&&(e.unpause(),a.set(!1))};return{useFocusTrap:f=>(e=so(f,{...i,onActivate(){var v;o.set(!0),(v=t.onActivate)==null||v.call(t)},onDeactivate(){var v;o.set(!1),(v=t.onDeactivate)==null||v.call(t)}}),n&&r(),{destroy(){l(),e=void 0}}),hasFocus:pt(o),isPaused:pt(a),activate:r,deactivate:l,pause:s,unpause:u}}const Ee=[],co=(t,e)=>{let n=ie;function i(){const a=Ee.indexOf(t);a>=0&&Ee.splice(a,1)}function o(a){n();const{open:r,onClose:l,shouldCloseOnInteractOutside:s,closeOnInteractOutside:u}=a;at(100).then(()=>{r?Ee.push(t):i()});function c(){return kn(Ee)===t}function f(){c()&&l&&(l(),i())}function v(p){const g=p.target;et(g)&&g&&c()&&(p.preventDefault(),p.stopPropagation(),p.stopImmediatePropagation())}function m(p){s!=null&&s(p)&&c()&&(p.preventDefault(),p.stopPropagation(),p.stopImmediatePropagation(),f())}n=ho(t,{onInteractOutsideStart:v,onInteractOutside:u?m:void 0,enabled:r}).destroy}return o(e),{update:o,destroy(){i(),n()}}},uo={floating:{},focusTrap:{},modal:{},escapeKeydown:{},portal:"body"},Jo=(t,e)=>{t.dataset.escapee="";const{anchorElement:n,open:i,options:o}=e;if(!n||!i||!o)return{destroy:ie};const a={...uo,...o},r=[];if(a.portal!==null&&r.push(fo(t,a.portal).destroy),r.push(ki(n,t,a.floating).destroy),a.focusTrap!==null){const{useFocusTrap:s}=lo({immediate:!0,escapeDeactivates:!1,allowOutsideClick:!0,returnFocusOnDeactivate:!1,fallbackFocus:t,...a.focusTrap});r.push(s(t).destroy)}a.modal!==null&&r.push(co(t,{onClose:()=>{W(n)&&(i.set(!1),n.focus())},shouldCloseOnInteractOutside:s=>!(s.defaultPrevented||W(n)&&n.contains(s.target)),...a.modal}).destroy),a.escapeKeydown!==null&&r.push(mn(t,{enabled:i,handler:()=>{i.set(!1)},...a.escapeKeydown}).destroy);const l=Ge(...r);return{destroy(){l()}}},fo=(t,e="body")=>{let n;if(!W(e)&&typeof e!="string")return{destroy:ie};async function i(a){if(e=a,typeof e=="string"){if(n=document.querySelector(e),n===null&&(await Lt(),n=document.querySelector(e)),n===null)throw new Error(`No element found matching css selector: "${e}"`)}else if(e instanceof HTMLElement)n=e;else throw new TypeError(`Unknown portal target type: ${e===null?"null":typeof e}. Allowed types: string (CSS selector) or HTMLElement.`);t.dataset.portal="",n.appendChild(t),t.hidden=!1}function o(){t.remove()}return i(e),{update:i,destroy:o}},ho=(t,e)=>{let n=ie,i=ie,o=!1,a=!1,r=!1;function l(c){n(),i();const{onInteractOutside:f,onInteractOutsideStart:v,enabled:m}=c;if(!m)return;function p(w){f&&Dt(w,t)&&(v==null||v(w));const x=w.target;et(x)&&cn(t,x)&&(a=!0),o=!0}function g(w){f==null||f(w)}const y=mo(t);if(typeof PointerEvent<"u"){const w=x=>{i();const A=k=>{s(k)&&g(k),u()};if(x.pointerType==="touch"){i=te(y,"click",A,{capture:!0,once:!0});return}A(x)};n=Ge(te(y,"pointerdown",p,!0),te(y,"pointerup",w,!0))}else{const w=A=>{r?r=!1:s(A)&&g(A),u()},x=A=>{r=!0,s(A)&&g(A),u()};n=Ge(te(y,"mousedown",p,!0),te(y,"mouseup",w,!0),te(y,"touchstart",p,!0),te(y,"touchend",x,!0))}}function s(c){return!!(o&&!a&&Dt(c,t))}function u(){o=!1,a=!1}return l(e),{update:l,destroy(){n(),i()}}};function Dt(t,e){if("button"in t&&t.button>0)return!1;const n=t.target;if(!et(n))return!1;const i=n.ownerDocument;return!i||!i.documentElement.contains(n)?!1:e&&!cn(e,n)}function cn(t,e){return t===e||t.contains(e)}function mo(t){return(t==null?void 0:t.ownerDocument)??document}const bo={orientation:"horizontal",decorative:!1},Zo=t=>{const e={...bo,...t},n=Tn(e),{orientation:i,decorative:o}=n;return{elements:{root:bn("separator",{stores:[i,o],returned:([r,l])=>({role:l?"none":"separator","aria-orientation":r==="vertical"?r:void 0,"aria-hidden":l,"data-orientation":r})})},options:n}};function vo(t,e){const n=[];return e.builders.forEach(i=>{const o=i.action(t);o&&n.push(o)}),{destroy:()=>{n.forEach(i=>{i.destroy&&i.destroy()})}}}function It(t){const e={};return t.forEach(n=>{Object.keys(n).forEach(i=>{i!=="action"&&(e[i]=n[i])})}),e}function po(t){let e=t[1]?"a":"button",n,i,o=(t[1]?"a":"button")&&He(t);return{c(){o&&o.c(),n=fe()},l(a){o&&o.l(a),n=fe()},m(a,r){o&&o.m(a,r),Te(a,n,r),i=!0},p(a,r){a[1],e?Ie(e,a[1]?"a":"button")?(o.d(1),o=He(a),e=a[1]?"a":"button",o.c(),o.m(n.parentNode,n)):o.p(a,r):(o=He(a),e=a[1]?"a":"button",o.c(),o.m(n.parentNode,n))},i(a){i||(J(o,a),i=!0)},o(a){X(o,a),i=!1},d(a){a&&oe(n),o&&o.d(a)}}}function go(t){let e=t[1]?"a":"button",n,i,o=(t[1]?"a":"button")&&Ue(t);return{c(){o&&o.c(),n=fe()},l(a){o&&o.l(a),n=fe()},m(a,r){o&&o.m(a,r),Te(a,n,r),i=!0},p(a,r){a[1],e?Ie(e,a[1]?"a":"button")?(o.d(1),o=Ue(a),e=a[1]?"a":"button",o.c(),o.m(n.parentNode,n)):o.p(a,r):(o=Ue(a),e=a[1]?"a":"button",o.c(),o.m(n.parentNode,n))},i(a){i||(J(o,a),i=!0)},o(a){X(o,a),i=!1},d(a){a&&oe(n),o&&o.d(a)}}}function He(t){let e,n,i,o,a;const r=t[7].default,l=nt(r,t,t[6],null);let s=[{type:n=t[1]?void 0:t[2]},{href:t[1]},{tabindex:"0"},t[5],t[4]],u={};for(let c=0;c<s.length;c+=1)u=re(u,s[c]);return{c(){e=Bt(t[1]?"a":"button"),l&&l.c(),this.h()},l(c){e=jt(c,((t[1]?"a":"button")||"null").toUpperCase(),{type:!0,href:!0,tabindex:!0});var f=Wt(e);l&&l.l(f),f.forEach(oe),this.h()},h(){Oe(t[1]?"a":"button")(e,u)},m(c,f){Te(c,e,f),l&&l.m(e,null),t[29](e),i=!0,o||(a=[F(e,"click",t[18]),F(e,"change",t[19]),F(e,"keydown",t[20]),F(e,"keyup",t[21]),F(e,"mouseenter",t[22]),F(e,"mouseleave",t[23]),F(e,"mousedown",t[24]),F(e,"pointerdown",t[25]),F(e,"mouseup",t[26]),F(e,"pointerup",t[27])],o=!0)},p(c,f){l&&l.p&&(!i||f&64)&&it(l,r,c,c[6],i?rt(r,c[6],f,null):ot(c[6]),null),Oe(c[1]?"a":"button")(e,u=tt(s,[(!i||f&6&&n!==(n=c[1]?void 0:c[2]))&&{type:n},(!i||f&2)&&{href:c[1]},{tabindex:"0"},f&32&&c[5],c[4]]))},i(c){i||(J(l,c),i=!0)},o(c){X(l,c),i=!1},d(c){c&&oe(e),l&&l.d(c),t[29](null),o=!1,Vt(a)}}}function Ue(t){let e,n,i,o,a,r;const l=t[7].default,s=nt(l,t,t[6],null);let u=[{type:n=t[1]?void 0:t[2]},{href:t[1]},{tabindex:"0"},It(t[3]),t[5],t[4]],c={};for(let f=0;f<u.length;f+=1)c=re(c,u[f]);return{c(){e=Bt(t[1]?"a":"button"),s&&s.c(),this.h()},l(f){e=jt(f,((t[1]?"a":"button")||"null").toUpperCase(),{type:!0,href:!0,tabindex:!0});var v=Wt(e);s&&s.l(v),v.forEach(oe),this.h()},h(){Oe(t[1]?"a":"button")(e,c)},m(f,v){Te(f,e,v),s&&s.m(e,null),t[28](e),o=!0,a||(r=[F(e,"click",t[8]),F(e,"change",t[9]),F(e,"keydown",t[10]),F(e,"keyup",t[11]),F(e,"mouseenter",t[12]),F(e,"mouseleave",t[13]),F(e,"mousedown",t[14]),F(e,"pointerdown",t[15]),F(e,"mouseup",t[16]),F(e,"pointerup",t[17]),yn(i=vo.call(null,e,{builders:t[3]}))],a=!0)},p(f,v){s&&s.p&&(!o||v&64)&&it(s,l,f,f[6],o?rt(l,f[6],v,null):ot(f[6]),null),Oe(f[1]?"a":"button")(e,c=tt(u,[(!o||v&6&&n!==(n=f[1]?void 0:f[2]))&&{type:n},(!o||v&2)&&{href:f[1]},{tabindex:"0"},v&8&&It(f[3]),v&32&&f[5],f[4]])),i&&wn(i.update)&&v&8&&i.update.call(null,{builders:f[3]})},i(f){o||(J(s,f),o=!0)},o(f){X(s,f),o=!1},d(f){f&&oe(e),s&&s.d(f),t[28](null),a=!1,Vt(r)}}}function yo(t){let e,n,i,o;const a=[go,po],r=[];function l(s,u){return s[3]&&s[3].length?0:1}return e=l(t),n=r[e]=a[e](t),{c(){n.c(),i=fe()},l(s){n.l(s),i=fe()},m(s,u){r[e].m(s,u),Te(s,i,u),o=!0},p(s,[u]){let c=e;e=l(s),e===c?r[e].p(s,u):(xn(),X(r[c],1,1,()=>{r[c]=null}),_n(),n=r[e],n?n.p(s,u):(n=r[e]=a[e](s),n.c()),J(n,1),n.m(i.parentNode,i))},i(s){o||(J(n),o=!0)},o(s){X(n),o=!1},d(s){s&&oe(i),r[e].d(s)}}}function wo(t,e,n){const i=["href","type","builders","el"];let o=Se(e,i),{$$slots:a={},$$scope:r}=e,{href:l=void 0}=e,{type:s=void 0}=e,{builders:u=[]}=e,{el:c=void 0}=e;const f={"data-button-root":""};function v(b){N.call(this,t,b)}function m(b){N.call(this,t,b)}function p(b){N.call(this,t,b)}function g(b){N.call(this,t,b)}function y(b){N.call(this,t,b)}function w(b){N.call(this,t,b)}function x(b){N.call(this,t,b)}function A(b){N.call(this,t,b)}function k(b){N.call(this,t,b)}function P(b){N.call(this,t,b)}function D(b){N.call(this,t,b)}function L(b){N.call(this,t,b)}function B(b){N.call(this,t,b)}function j(b){N.call(this,t,b)}function I(b){N.call(this,t,b)}function M(b){N.call(this,t,b)}function O(b){N.call(this,t,b)}function d(b){N.call(this,t,b)}function h(b){N.call(this,t,b)}function T(b){N.call(this,t,b)}function E(b){gt[b?"unshift":"push"](()=>{c=b,n(0,c)})}function S(b){gt[b?"unshift":"push"](()=>{c=b,n(0,c)})}return t.$$set=b=>{e=re(re({},e),Mt(b)),n(5,o=Se(e,i)),"href"in b&&n(1,l=b.href),"type"in b&&n(2,s=b.type),"builders"in b&&n(3,u=b.builders),"el"in b&&n(0,c=b.el),"$$scope"in b&&n(6,r=b.$$scope)},[c,l,s,u,f,o,r,a,v,m,p,g,y,w,x,A,k,P,D,L,B,j,I,M,O,d,h,T,E,S]}let To=class extends Kt{constructor(e){super(),zt(this,e,wo,yo,Ie,{href:1,type:2,builders:3,el:0})}};function $o(t){return(e={})=>xo(t,e)}function xo(t,e){const i={...{side:"bottom",align:"center",sideOffset:0,alignOffset:0,sameWidth:!1,avoidCollisions:!0,collisionPadding:8,fitViewport:!1,strategy:"absolute",overlap:!1},...e};t.update(o=>({...o,placement:_o(i.side,i.align),offset:{...o.offset,mainAxis:i.sideOffset,crossAxis:i.alignOffset},gutter:0,sameWidth:i.sameWidth,flip:i.avoidCollisions,overflowPadding:i.collisionPadding,boundary:i.collisionBoundary,fitViewport:i.fitViewport,strategy:i.strategy,overlap:i.overlap}))}function _o(t,e){return e==="center"?t:`${t}-${e}`}function Ao(t){let e;const n=t[5].default,i=nt(n,t,t[8],null);return{c(){i&&i.c()},l(o){i&&i.l(o)},m(o,a){i&&i.m(o,a),e=!0},p(o,a){i&&i.p&&(!e||a&256)&&it(i,n,o,o[8],e?rt(n,o[8],a,null):ot(o[8]),null)},i(o){e||(J(i,o),e=!0)},o(o){X(i,o),e=!1},d(o){i&&i.d(o)}}}function Eo(t){let e,n;const i=[{builders:t[3]},{class:bt(vt({variant:t[1],size:t[2],className:t[0]}),"hover:bg-base-200 shadow-base-200")},{type:"button"},t[4]];let o={$$slots:{default:[Ao]},$$scope:{ctx:t}};for(let a=0;a<i.length;a+=1)o=re(o,i[a]);return e=new To({props:o}),e.$on("click",t[6]),e.$on("keydown",t[7]),{c(){An(e.$$.fragment)},l(a){En(e.$$.fragment,a)},m(a,r){Sn(e,a,r),n=!0},p(a,[r]){const l=r&31?tt(i,[r&8&&{builders:a[3]},r&7&&{class:bt(vt({variant:a[1],size:a[2],className:a[0]}),"hover:bg-base-200 shadow-base-200")},i[2],r&16&&vn(a[4])]):{};r&256&&(l.$$scope={dirty:r,ctx:a}),e.$set(l)},i(a){n||(J(e.$$.fragment,a),n=!0)},o(a){X(e.$$.fragment,a),n=!1},d(a){On(e,a)}}}function So(t,e,n){const i=["class","variant","size","builders"];let o=Se(e,i),{$$slots:a={},$$scope:r}=e,{class:l=void 0}=e,{variant:s="default"}=e,{size:u="default"}=e,{builders:c=[]}=e;function f(m){N.call(this,t,m)}function v(m){N.call(this,t,m)}return t.$$set=m=>{e=re(re({},e),Mt(m)),n(4,o=Se(e,i)),"class"in m&&n(0,l=m.class),"variant"in m&&n(1,s=m.variant),"size"in m&&n(2,u=m.size),"builders"in m&&n(3,c=m.builders),"$$scope"in m&&n(8,r=m.$$scope)},[l,s,u,c,o,a,f,v,r]}class er extends Kt{constructor(e){super(),zt(this,e,So,Eo,Ie,{class:0,variant:1,size:2,builders:3})}}export{er as B,Mo as a,Do as b,qo as c,Ho as d,Vo as e,Io as f,Yo as g,Ro as h,zo as i,jo as j,Xo as k,kn as l,fo as m,Lo as n,Wo as o,Fo as p,Zo as q,Ko as r,$o as s,Bo as t,Jo as u,_t as v,jn as w,at as x,Uo as y,Go as z};