var rhombus=(()=>{var Lo=Object.defineProperty;var Zs=Object.getOwnPropertyDescriptor;var Xs=Object.getOwnPropertyNames;var Ys=Object.prototype.hasOwnProperty;var Js=(e,t)=>{for(var n in t)Lo(e,n,{get:t[n],enumerable:!0})},Qs=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Xs(t))!Ys.call(e,a)&&a!==n&&Lo(e,a,{get:()=>t[a],enumerable:!(o=Zs(t,a))||o.enumerable});return e};var ec=e=>Qs(Lo({},"__esModule",{value:!0}),e);var Su={};Js(Su,{renderChallenges:()=>bu,toast:()=>Ce,translate:()=>ne});var H={context:void 0,registry:void 0};function Io(e){H.context=e}function tc(){return{...H.context,id:`${H.context.id}${H.context.count++}-`,count:0}}var nc=(e,t)=>e===t,fe=Symbol("solid-proxy"),Qt=Symbol("solid-track"),Nu=Symbol("solid-dev-component"),Tn={equals:nc},Aa=null,qa=za,Le=1,Xt=2,Va={owned:null,cleanups:null,context:null,owner:null},No={},E=null,S=null,xt=null,wt=null,K=null,ce=null,ye=null,On=0;function Fe(e,t){let n=K,o=E,a=e.length===0,r=t===void 0?o:t,i=a?Va:{owned:null,cleanups:null,context:r?r.context:null,owner:r},s=a?e:()=>e(()=>Q(()=>et(i)));E=i,K=null;try{return ve(s,!0)}finally{K=n,E=o}}function P(e,t){t=t?Object.assign({},Tn,t):Tn;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},o=a=>(typeof a=="function"&&(S&&S.running&&S.sources.has(n)?a=a(n.tValue):a=a(n.value)),Ha(n,a));return[Ea.bind(n),o]}function Po(e,t,n){let o=Bn(e,t,!0,Le);xt&&S&&S.running?ce.push(o):Ct(o)}function U(e,t,n){let o=Bn(e,t,!1,Le);xt&&S&&S.running?ce.push(o):Ct(o)}function I(e,t,n){qa=sc;let o=Bn(e,t,!1,Le),a=Yt&&ue(Yt);a&&(o.suspense=a),(!n||!n.render)&&(o.user=!0),ye?ye.push(o):Ct(o)}function O(e,t,n){n=n?Object.assign({},Tn,n):Tn;let o=Bn(e,t,!0,0);return o.observers=null,o.observerSlots=null,o.comparator=n.equals||void 0,xt&&S&&S.running?(o.tState=Le,ce.push(o)):Ct(o),Ea.bind(o)}function oc(e){return e&&typeof e=="object"&&"then"in e}function To(e,t,n){let o,a,r;arguments.length===2&&typeof t=="object"||arguments.length===1?(o=!0,a=e,r=t||{}):(o=e,a=t,r=n||{});let i=null,s=No,c=null,l=!1,u=!1,d="initialValue"in r,h=typeof o=="function"&&O(o),y=new Set,[p,m]=(r.storage||P)(r.initialValue),[x,v]=P(void 0),[w,L]=P(void 0,{equals:!1}),[A,q]=P(d?"ready":"unresolved");if(H.context){c=`${H.context.id}${H.context.count++}`;let k;r.ssrLoadFrom==="initial"?s=r.initialValue:H.load&&(k=H.load(c))&&(s=k)}function R(k,g,M,N){return i===k&&(i=null,N!==void 0&&(d=!0),(k===s||g===s)&&r.onHydrated&&queueMicrotask(()=>r.onHydrated(N,{value:g})),s=No,S&&k&&l?(S.promises.delete(k),l=!1,ve(()=>{S.running=!0,j(g,M)},!1)):j(g,M)),g}function j(k,g){ve(()=>{g===void 0&&m(()=>k),q(g!==void 0?"errored":d?"ready":"unresolved"),v(g);for(let M of y.keys())M.decrement();y.clear()},!1)}function _(){let k=Yt&&ue(Yt),g=p(),M=x();if(M!==void 0&&!i)throw M;return K&&!K.user&&k&&Po(()=>{w(),i&&(k.resolved&&S&&l?S.promises.add(i):y.has(k)||(k.increment(),y.add(k)))}),g}function C(k=!0){if(k!==!1&&u)return;u=!1;let g=h?h():o;if(l=S&&S.running,g==null||g===!1){R(i,Q(p));return}S&&i&&S.promises.delete(i);let M=s!==No?s:Q(()=>a(g,{value:p(),refetching:k}));return oc(M)?(i=M,"value"in M?(M.status==="success"?R(i,M.value,void 0,g):R(i,void 0,void 0,g),M):(u=!0,queueMicrotask(()=>u=!1),ve(()=>{q(d?"refreshing":"pending"),L()},!1),M.then(N=>R(M,N,void 0,g),N=>R(M,void 0,_a(N),g)))):(R(i,M,void 0,g),M)}return Object.defineProperties(_,{state:{get:()=>A()},error:{get:()=>x()},loading:{get(){let k=A();return k==="pending"||k==="refreshing"}},latest:{get(){if(!d)return _();let k=x();if(k&&!i)throw k;return p()}}}),h?Po(()=>C(!1)):C(!1),[_,{refetch:C,mutate:m}]}function Fo(e){return ve(e,!1)}function Q(e){if(!wt&&K===null)return e();let t=K;K=null;try{return wt?wt.untrack(e):e()}finally{K=t}}function Oe(e,t,n){let o=Array.isArray(e),a,r=n&&n.defer;return i=>{let s;if(o){s=Array(e.length);for(let l=0;lt(s,a,i));return a=s,c}}function pe(e){I(()=>Q(e))}function T(e){return E===null||(E.cleanups===null?E.cleanups=[e]:E.cleanups.push(e)),e}function Rn(){return K}function qn(){return E}function Ba(e,t){let n=E,o=K;E=e,K=null;try{return ve(t,!0)}catch(a){En(a)}finally{E=n,K=o}}function ac(e){if(S&&S.running)return e(),S.done;let t=K,n=E;return Promise.resolve().then(()=>{K=t,E=n;let o;return(xt||Yt)&&(o=S||(S={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),o.done||(o.done=new Promise(a=>o.resolve=a)),o.running=!0),ve(e,!1),K=E=null,o?o.done:void 0})}var[$u,Ta]=P(!1);function F(e,t){let n=Symbol("context");return{id:n,Provider:cc(n),defaultValue:e}}function ue(e){return E&&E.context&&E.context[e.id]!==void 0?E.context[e.id]:e.defaultValue}function Vn(e){let t=O(e),n=O(()=>Do(t()));return n.toArray=()=>{let o=n();return Array.isArray(o)?o:o!=null?[o]:[]},n}var Yt;function Ea(){let e=S&&S.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===Le)Ct(this);else{let t=ce;ce=null,ve(()=>Fn(this),!1),ce=t}if(K){let t=this.observers?this.observers.length:0;K.sources?(K.sources.push(this),K.sourceSlots.push(t)):(K.sources=[this],K.sourceSlots=[t]),this.observers?(this.observers.push(K),this.observerSlots.push(K.sources.length-1)):(this.observers=[K],this.observerSlots=[K.sources.length-1])}return e&&S.sources.has(this)?this.tValue:this.value}function Ha(e,t,n){let o=S&&S.running&&S.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(o,t)){if(S){let a=S.running;(a||!n&&S.sources.has(e))&&(S.sources.add(e),e.tValue=t),a||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&ve(()=>{for(let a=0;a1e6)throw ce=[],new Error},!1)}return t}function Ct(e){if(!e.fn)return;et(e);let t=On;Fa(e,S&&S.running&&S.sources.has(e)?e.tValue:e.value,t),S&&!S.running&&S.sources.has(e)&&queueMicrotask(()=>{ve(()=>{S&&(S.running=!0),K=E=e,Fa(e,e.tValue,t),K=E=null},!1)})}function Fa(e,t,n){let o,a=E,r=K;K=E=e;try{o=e.fn(t)}catch(i){return e.pure&&(S&&S.running?(e.tState=Le,e.tOwned&&e.tOwned.forEach(et),e.tOwned=void 0):(e.state=Le,e.owned&&e.owned.forEach(et),e.owned=null)),e.updatedAt=n+1,En(i)}finally{K=r,E=a}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Ha(e,o,!0):S&&S.running&&e.pure?(S.sources.add(e),e.tValue=o):e.value=o,e.updatedAt=n)}function Bn(e,t,n,o=Le,a){let r={fn:e,state:o,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:E,context:E?E.context:null,pure:n};if(S&&S.running&&(r.state=0,r.tState=o),E===null||E!==Va&&(S&&S.running&&E.pure?E.tOwned?E.tOwned.push(r):E.tOwned=[r]:E.owned?E.owned.push(r):E.owned=[r]),wt&&r.fn){let[i,s]=P(void 0,{equals:!1}),c=wt.factory(r.fn,s);T(()=>c.dispose());let l=()=>ac(s).then(()=>u.dispose()),u=wt.factory(r.fn,l);r.fn=d=>(i(),S&&S.running?u.track(d):c.track(d))}return r}function Jt(e){let t=S&&S.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===Xt)return Fn(e);if(e.suspense&&Q(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;o--){if(e=n[o],t){let a=e,r=n[o+1];for(;(a=a.owner)&&a!==r;)if(S.disposed.has(a))return}if((t?e.tState:e.state)===Le)Ct(e);else if((t?e.tState:e.state)===Xt){let a=ce;ce=null,ve(()=>Fn(e,n[0]),!1),ce=a}}}function ve(e,t){if(ce)return e();let n=!1;t||(ce=[]),ye?n=!0:ye=[],On++;try{let o=e();return rc(n),o}catch(o){n||(ye=null),ce=null,En(o)}}function rc(e){if(ce&&(xt&&S&&S.running?ic(ce):za(ce),ce=null),e)return;let t;if(S){if(!S.promises.size&&!S.queue.size){let o=S.sources,a=S.disposed;ye.push.apply(ye,S.effects),t=S.resolve;for(let r of ye)"tState"in r&&(r.state=r.tState),delete r.tState;S=null,ve(()=>{for(let r of a)et(r);for(let r of o){if(r.value=r.tValue,r.owned)for(let i=0,s=r.owned.length;iqa(n),!1),t&&t()}function za(e){for(let t=0;t{o.delete(n),ve(()=>{S.running=!0,Jt(n)},!1),S&&(S.running=!1)}))}}function sc(e){let t,n=0;for(t=0;t=0;t--)et(e.tOwned[t]);delete e.tOwned}Ua(e,!0)}else if(e.owned){for(t=e.owned.length-1;t>=0;t--)et(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}S&&S.running?e.tState=0:e.state=0}function Ua(e,t){if(t||(e.tState=0,S.disposed.add(e)),e.owned)for(let n=0;na=Q(()=>(E.context={...E.context,[e]:o.value},Vn(()=>o.children))),void 0),a}}var lc=Symbol("fallback");function Ra(e){for(let t=0;t1?[]:null;return T(()=>Ra(r)),()=>{let c=e()||[],l,u;return c[Qt],Q(()=>{let h=c.length,y,p,m,x,v,w,L,A,q;if(h===0)i!==0&&(Ra(r),r=[],o=[],a=[],i=0,s&&(s=[])),n.fallback&&(o=[lc],a[0]=Fe(R=>(r[0]=R,n.fallback())),i=1);else if(i===0){for(a=new Array(h),u=0;u=w&&A>=w&&o[L]===c[A];L--,A--)m[A]=a[L],x[A]=r[L],s&&(v[A]=s[L]);for(y=new Map,p=new Array(A+1),u=A;u>=w;u--)q=c[u],l=y.get(q),p[u]=l===void 0?-1:l,y.set(q,u);for(l=w;l<=L;l++)q=o[l],u=y.get(q),u!==void 0&&u!==-1?(m[u]=a[l],x[u]=r[l],s&&(v[u]=s[l]),u=p[u],y.set(q,u)):r[l]();for(u=w;ue(t||{}));return Io(n),o}return Q(()=>e(t||{}))}function An(){return!0}var Ao={get(e,t,n){return t===fe?n:e.get(t)},has(e,t){return t===fe?!0:e.has(t)},set:An,deleteProperty:An,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:An,deleteProperty:An}},ownKeys(e){return e.keys()}};function $o(e){return(e=typeof e=="function"?e():e)?e:{}}function hc(){for(let e=0,t=this.length;e=0;s--){let c=$o(e[s])[i];if(c!==void 0)return c}},has(i){for(let s=e.length-1;s>=0;s--)if(i in $o(e[s]))return!0;return!1},keys(){let i=[];for(let s=0;s=0;i--){let s=e[i];if(!s)continue;let c=Object.getOwnPropertyNames(s);for(let l=c.length-1;l>=0;l--){let u=c[l];if(u==="__proto__"||u==="constructor")continue;let d=Object.getOwnPropertyDescriptor(s,u);if(!o[u])o[u]=d.get?{enumerable:!0,configurable:!0,get:hc.bind(n[u]=[d.get.bind(s)])}:d.value!==void 0?d:void 0;else{let h=n[u];h&&(d.get?h.push(d.get.bind(s)):d.value!==void 0&&h.push(()=>d.value))}}}let a={},r=Object.keys(o);for(let i=r.length-1;i>=0;i--){let s=r[i],c=o[s];c&&c.get?Object.defineProperty(a,s,c):a[s]=c?c.value:void 0}return a}function B(e,...t){if(fe in e){let a=new Set(t.length>1?t.flat():t[0]),r=t.map(i=>new Proxy({get(s){return i.includes(s)?e[s]:void 0},has(s){return i.includes(s)&&s in e},keys(){return i.filter(s=>s in e)}},Ao));return r.push(new Proxy({get(i){return a.has(i)?void 0:e[i]},has(i){return a.has(i)?!1:i in e},keys(){return Object.keys(e).filter(i=>!a.has(i))}},Ao)),r}let n={},o=t.map(()=>({}));for(let a of Object.getOwnPropertyNames(e)){let r=Object.getOwnPropertyDescriptor(e,a),i=!r.get&&!r.set&&r.enumerable&&r.writable&&r.configurable,s=!1,c=0;for(let l of t)l.includes(a)&&(s=!0,i?o[c][a]=r.value:Object.defineProperty(o[c],a,r)),++c;s||(i?n[a]=r.value:Object.defineProperty(n,a,r))}return[...o,n]}var pc=0;function me(){let e=H.context;return e?`${e.id}${e.count++}`:`cl-${pc++}`}var Ka=e=>`Stale read from <${e}>.`;function Me(e){let t="fallback"in e&&{fallback:()=>e.fallback};return O(dc(()=>e.each,e.children,t||void 0))}function G(e){let t=e.keyed,n=O(()=>e.when,void 0,{equals:(o,a)=>t?o===a:!o==!a});return O(()=>{let o=n();if(o){let a=e.children;return typeof a=="function"&&a.length>0?Q(()=>a(t?o:()=>{if(!Q(n))throw Ka("Show");return e.when})):a}return e.fallback},void 0,void 0)}function Hn(e){let t=!1,n=(r,i)=>(t?r[1]===i[1]:!r[1]==!i[1])&&r[2]===i[2],o=Vn(()=>e.children),a=O(()=>{let r=o();Array.isArray(r)||(r=[r]);for(let i=0;i{let[r,i,s]=a();if(r<0)return e.fallback;let c=s.children;return typeof c=="function"&&c.length>0?Q(()=>c(t?i:()=>{if(Q(a)[0]!==r)throw Ka("Match");return s.when})):c},void 0,void 0)}function lt(e){return e}var Iu=F();var fc=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],kc=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...fc]),mc=new Set(["innerHTML","textContent","innerText","children"]),gc=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),vc=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function Mc(e,t){let n=vc[e];return typeof n=="object"?n[t]?n.$:void 0:n}var wc=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),xc=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),Cc={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function bc(e,t,n){let o=n.length,a=t.length,r=o,i=0,s=0,c=t[a-1].nextSibling,l=null;for(;iu-s){let p=t[i];for(;s{a=r,t===document?e():D(t,e(),t.firstChild?null:void 0,n)},o.owner),()=>{a(),t.textContent=""}}function z(e,t,n){let o,a=()=>{let i=document.createElement("template");return i.innerHTML=e,n?i.content.firstChild.firstChild:i.content.firstChild},r=t?()=>Q(()=>document.importNode(o||(o=a()),!0)):()=>(o||(o=a())).cloneNode(!0);return r.cloneNode=r,r}function jn(e,t=window.document){let n=t[Ga]||(t[Ga]=new Set);for(let o=0,a=e.length;oa.call(e,n[1],r))}else e.addEventListener(t,n)}function Nc(e,t,n={}){let o=Object.keys(t||{}),a=Object.keys(n),r,i;for(r=0,i=a.length;ra.children=St(e,t.children,a.children)),U(()=>typeof t.ref=="function"?Ke(t.ref,e):t.ref=e),U(()=>$c(e,t,n,!0,a,!0)),a}function Ke(e,t,n){return Q(()=>e(t,n))}function D(e,t,n,o){if(n!==void 0&&!o&&(o=[]),typeof t!="function")return St(e,t,o,n);U(a=>St(e,t(),a,n),o)}function $c(e,t,n,o,a={},r=!1){t||(t={});for(let i in a)if(!(i in t)){if(i==="children")continue;a[i]=Za(e,i,null,a[i],n,r)}for(let i in t){if(i==="children"){o||St(e,t.children);continue}let s=t[i];a[i]=Za(e,i,s,a[i],n,r)}}function Ic(e){let t,n;return!H.context||!(t=H.registry.get(n=Ac()))?e():(H.completed&&H.completed.add(t),H.registry.delete(n),t)}function Pc(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Wa(e,t,n){let o=t.trim().split(/\s+/);for(let a=0,r=o.length;a-1&&Cc[t.split(":")[0]];d?Sc(e,d,t,n):ee(e,gc[t]||t,n)}return n}function Dc(e){let t=`$$${e.type}`,n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return n||document}}),H.registry&&!H.done&&(H.done=_$HY.done=!0);n;){let o=n[t];if(o&&!n.disabled){let a=n[`${t}Data`];if(a!==void 0?o.call(n,a,e):o.call(n,e),e.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function St(e,t,n,o,a){let r=!!H.context&&e.isConnected;if(r){!n&&(n=[...e.childNodes]);let c=[];for(let l=0;l{let c=t();for(;typeof c=="function";)c=c();n=St(e,c,n,o)}),()=>n;if(Array.isArray(t)){let c=[],l=n&&Array.isArray(n);if(Oo(c,t,n,a))return U(()=>n=St(e,c,n,o,!0)),()=>n;if(r){if(!c.length)return n;if(o===void 0)return[...e.childNodes];let u=c[0],d=[u];for(;(u=u.nextSibling)!==o;)d.push(u);return n=d}if(c.length===0){if(n=bt(e,n,o),s)return n}else l?n.length===0?Xa(e,c,o):bc(e,n,c):(n&&bt(e),Xa(e,c));n=c}else if(t.nodeType){if(r&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=bt(e,n,o,t);bt(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Oo(e,t,n,o){let a=!1;for(let r=0,i=t.length;r=0;i--){let s=t[i];if(a!==s){let c=s.parentNode===e;!r&&!i?c?e.replaceChild(a,s):e.insertBefore(a,n):c&&s.remove()}else r=!0}}else e.insertBefore(a,n);return[a]}function Ac(){let e=H.context;return`${e.id}${e.count++}`}var Ru=Symbol();var X=!1;var Tc="http://www.w3.org/2000/svg";function Ya(e,t=!1){return t?document.createElementNS(Tc,e):document.createElement(e)}function Lt(e){let{useShadow:t}=e,n=document.createTextNode(""),o=()=>e.mount||document.body,a=qn(),r,i=!!H.context;return I(()=>{i&&(qn().user=i=!1),r||(r=Ba(a,()=>O(()=>e.children)));let s=o();if(s instanceof HTMLHeadElement){let[c,l]=P(!1),u=()=>l(!0);Fe(d=>D(s,()=>c()?d():r(),null)),T(u)}else{let c=Ya(e.isSVG?"g":"div",e.isSVG),l=t&&c.attachShadow?c.attachShadow({mode:"open"}):c;Object.defineProperty(c,"_$host",{get(){return n.parentNode},configurable:!0}),D(l,r),s.appendChild(c),e.ref&&e.ref(c),T(()=>s.removeChild(c))}},void 0,{render:!i}),n}function tt(e){let[t,n]=B(e,["component"]),o=O(()=>t.component);return O(()=>{let a=o();switch(typeof a){case"function":return Q(()=>a(n));case"string":let r=xc.has(a),i=H.context?Ic():Ya(a,r);return ie(i,n,r),i}})}function Nt(e){return(...t)=>{for(let n of e)n&&n(...t)}}function Ro(e){return(...t)=>{for(let n=e.length-1;n>=0;n--){let o=e[n];o&&o(...t)}}}var Z=e=>typeof e=="function"&&!e.length?e():e;function $t(e,...t){return typeof e=="function"?e(...t):e}function Un(){return!0}var Oc={get(e,t,n){return t===fe?n:e.get(t)},has(e,t){return e.has(t)},set:Un,deleteProperty:Un,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Un,deleteProperty:Un}},ownKeys(e){return e.keys()}};var Rc=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function Ja(e){let t={},n;for(;n=Rc.exec(e);)t[n[1]]=n[2];return t}function qc(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=Ja(e)}else typeof t=="string"&&(t=Ja(t));return{...e,...t}}var qo=(e,t,n)=>{let o;for(let a of e){let r=Z(a)[t];o?r&&(o=n(o,r)):o=r}return o};function Vo(...e){let t=Array.isArray(e[0]),n=t?e[0]:e;if(n.length===1)return n[0];let o=t&&e[1]?.reverseEventHandlers?Ro:Nt,a={};for(let i of n){let s=Z(i);for(let c in s)if(c[0]==="o"&&c[1]==="n"&&c[2]){let l=s[c],u=c.toLowerCase(),d=typeof l=="function"?l:Array.isArray(l)?l.length===1?l[0]:l[0].bind(void 0,l[1]):void 0;d?a[u]?a[u].push(d):a[u]=[d]:delete a[u]}}let r=$(...n);return new Proxy({get(i){if(typeof i!="string")return Reflect.get(r,i);if(i==="style")return qo(n,"style",qc);if(i==="ref"){let s=[];for(let c of n){let l=Z(c)[i];typeof l=="function"&&s.push(l)}return o(s)}if(i[0]==="o"&&i[1]==="n"&&i[2]){let s=a[i.toLowerCase()];return s?o(s):Reflect.get(r,i)}return i==="class"||i==="className"?qo(n,i,(s,c)=>`${s} ${c}`):i==="classList"?qo(n,i,(s,c)=>({...s,...c})):Reflect.get(r,i)},has(i){return Reflect.has(r,i)},keys(){return Object.keys(r)}},Oc)}function oe(...e){return Nt(e)}function It(e,t){let n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function nr(e){return Array.isArray(e)}function Kn(e){return Object.prototype.toString.call(e)==="[object String]"}function or(e){return typeof e=="function"}function Pt(e){return t=>`${e()}-${t}`}function J(e,t){return e?e===t||e.contains(t):!1}function Re(e,t=!1){let{activeElement:n}=ae(e);if(!n?.nodeName)return null;if(ar(n)&&n.contentDocument)return Re(n.contentDocument.body,t);if(t){let o=n.getAttribute("aria-activedescendant");if(o){let a=ae(n).getElementById(o);if(a)return a}}return n}function nn(e){return ae(e).defaultView||window}function ae(e){return e?e.ownerDocument||e:document}function ar(e){return e.tagName==="IFRAME"}var on=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(on||{});function Vc(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function rr(){return Vc(/^Mac/i)}function ke(e,t){return t&&(or(t)?t(e):t[0](t[1],e)),e?.defaultPrevented}function Dt(e){return t=>{for(let n of e)ke(t,n)}}function Gn(e){return rr()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function se(e){if(e)if(Bc())e.focus({preventScroll:!0});else{let t=Ec(e);e.focus(),Hc(t)}}var _n=null;function Bc(){if(_n==null){_n=!1;try{document.createElement("div").focus({get preventScroll(){return _n=!0,!0}})}catch{}}return _n}function Ec(e){let t=e.parentNode,n=[],o=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==o;)(t.offsetHeight{if(ar(a)&&a.contentDocument){let i=a.contentDocument.body,s=an(i,!1);o.splice(r,1,...s)}}),o}function Qa(e){return rn(e)&&!jc(e)}function rn(e){return e.matches(sr)&&cr(e)}function jc(e){return parseInt(e.getAttribute("tabindex")||"0",10)<0}function cr(e,t){return e.nodeName!=="#comment"&&Uc(e)&&_c(e,t)&&(!e.parentElement||cr(e.parentElement,e))}function Uc(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;let{display:t,visibility:n}=e.style,o=t!=="none"&&n!=="hidden"&&n!=="collapse";if(o){if(!e.ownerDocument.defaultView)return o;let{getComputedStyle:a}=e.ownerDocument.defaultView,{display:r,visibility:i}=a(e);o=r!=="none"&&i!=="hidden"&&i!=="collapse"}return o}function _c(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Wn(){}function Bo(e){return[e.clientX,e.clientY]}function Eo(e,t){let[n,o]=e,a=!1,r=t.length;for(let i=r,s=0,c=i-1;s=h&&o0&&(o===h?o>y&&(a=!a):a=!a)}}else if(uu&&o<=h){if(p===0)return!0;p<0&&(o===h?o=d&&n<=l||n>=l&&n<=d))return!0}return a}function re(e,t){return $(e,t)}var tn=new Map,er=new Set;function tr(){if(typeof window>"u")return;let e=n=>{if(!n.target)return;let o=tn.get(n.target);o||(o=new Set,tn.set(n.target,o),n.target.addEventListener("transitioncancel",t)),o.add(n.propertyName)},t=n=>{if(!n.target)return;let o=tn.get(n.target);if(o&&(o.delete(n.propertyName),o.size===0&&(n.target.removeEventListener("transitioncancel",t),tn.delete(n.target)),tn.size===0)){for(let a of er)a();er.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?tr():document.addEventListener("DOMContentLoaded",tr));var Zn={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"};var Kc=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Gc=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Wc(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize().script??"";return Kc.has(n)}let t=e.split("-")[0];return Gc.has(t)}function Zc(e){return Wc(e)?"rtl":"ltr"}function dr(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";return{locale:e,direction:Zc(e)}}var Ho=dr(),sn=new Set;function lr(){Ho=dr();for(let e of sn)e(Ho)}function Xc(){let e={locale:"en-US",direction:"ltr"},[t,n]=P(Ho),o=O(()=>X?e:t());return pe(()=>{sn.size===0&&window.addEventListener("languagechange",lr),sn.add(n),T(()=>{sn.delete(n),sn.size===0&&window.removeEventListener("languagechange",lr)})}),{locale:()=>o().locale,direction:()=>o().direction}}var Yc=F();function ur(){let e=Xc();return ue(Yc)||e}function Ne(e){let[t,n]=B(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return f(tt,$({get component(){return t.as}},n))}var hr=["top","right","bottom","left"];var He=Math.min,ge=Math.max,ln=Math.round,dn=Math.floor,Ge=e=>({x:e,y:e}),Jc={left:"right",right:"left",bottom:"top",top:"bottom"},Qc={start:"end",end:"start"};function Yn(e,t,n){return ge(e,He(t,n))}function nt(e,t){return typeof e=="function"?e(t):e}function We(e){return e.split("-")[0]}function dt(e){return e.split("-")[1]}function zo(e){return e==="x"?"y":"x"}function Jn(e){return e==="y"?"height":"width"}function At(e){return["top","bottom"].includes(We(e))?"y":"x"}function Qn(e){return zo(At(e))}function pr(e,t,n){n===void 0&&(n=!1);let o=dt(e),a=Qn(e),r=Jn(a),i=a==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(i=cn(i)),[i,cn(i)]}function yr(e){let t=cn(e);return[Xn(e),t,Xn(t)]}function Xn(e){return e.replace(/start|end/g,t=>Qc[t])}function e1(e,t,n){let o=["left","right"],a=["right","left"],r=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?a:o:t?o:a;case"left":case"right":return t?r:i;default:return[]}}function fr(e,t,n,o){let a=dt(e),r=e1(We(e),n==="start",o);return a&&(r=r.map(i=>i+"-"+a),t&&(r=r.concat(r.map(Xn)))),r}function cn(e){return e.replace(/left|right|bottom|top/g,t=>Jc[t])}function t1(e){return{top:0,right:0,bottom:0,left:0,...e}}function jo(e){return typeof e!="number"?t1(e):{top:e,right:e,bottom:e,left:e}}function ut(e){let{x:t,y:n,width:o,height:a}=e;return{width:o,height:a,top:n,left:t,right:t+o,bottom:n+a,x:t,y:n}}function kr(e,t,n){let{reference:o,floating:a}=e,r=At(t),i=Qn(t),s=Jn(i),c=We(t),l=r==="y",u=o.x+o.width/2-a.width/2,d=o.y+o.height/2-a.height/2,h=o[s]/2-a[s]/2,y;switch(c){case"top":y={x:u,y:o.y-a.height};break;case"bottom":y={x:u,y:o.y+o.height};break;case"right":y={x:o.x+o.width,y:d};break;case"left":y={x:o.x-a.width,y:d};break;default:y={x:o.x,y:o.y}}switch(dt(t)){case"start":y[i]-=h*(n&&l?-1:1);break;case"end":y[i]+=h*(n&&l?-1:1);break}return y}var vr=async(e,t,n)=>{let{placement:o="bottom",strategy:a="absolute",middleware:r=[],platform:i}=n,s=r.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t)),l=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:d}=kr(l,o,c),h=o,y={},p=0;for(let m=0;m({name:"arrow",options:e,async fn(t){let{x:n,y:o,placement:a,rects:r,platform:i,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=nt(e,t)||{};if(l==null)return{};let d=jo(u),h={x:n,y:o},y=Qn(a),p=Jn(y),m=await i.getDimensions(l),x=y==="y",v=x?"top":"left",w=x?"bottom":"right",L=x?"clientHeight":"clientWidth",A=r.reference[p]+r.reference[y]-h[y]-r.floating[p],q=h[y]-r.reference[y],R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l)),j=R?R[L]:0;(!j||!await(i.isElement==null?void 0:i.isElement(R)))&&(j=s.floating[L]||r.floating[p]);let _=A/2-q/2,C=j/2-m[p]/2-1,k=He(d[v],C),g=He(d[w],C),M=k,N=j-m[p]-g,b=j/2-m[p]/2+_,V=Yn(M,b,N),W=!c.arrow&&dt(a)!=null&&b!==V&&r.reference[p]/2-(bM<=0)){var C,k;let M=(((C=r.flip)==null?void 0:C.index)||0)+1,N=q[M];if(N)return{data:{index:M,overflows:_},reset:{placement:N}};let b=(k=_.filter(V=>V.overflows[0]<=0).sort((V,W)=>V.overflows[1]-W.overflows[1])[0])==null?void 0:k.placement;if(!b)switch(y){case"bestFit":{var g;let V=(g=_.map(W=>[W.placement,W.overflows.filter(de=>de>0).reduce((de,So)=>de+So,0)]).sort((W,de)=>W[1]-de[1])[0])==null?void 0:g[0];V&&(b=V);break}case"initialPlacement":b=s;break}if(a!==b)return{reset:{placement:b}}}return{}}}};function mr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function gr(e){return hr.some(t=>e[t]>=0)}var xr=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:o="referenceHidden",...a}=nt(e,t);switch(o){case"referenceHidden":{let r=await Tt(t,{...a,elementContext:"reference"}),i=mr(r,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:gr(i)}}}case"escaped":{let r=await Tt(t,{...a,altBoundary:!0}),i=mr(r,n.floating);return{data:{escapedOffsets:i,escaped:gr(i)}}}default:return{}}}}};async function n1(e,t){let{placement:n,platform:o,elements:a}=e,r=await(o.isRTL==null?void 0:o.isRTL(a.floating)),i=We(n),s=dt(n),c=At(n)==="y",l=["left","top"].includes(i)?-1:1,u=r&&c?-1:1,d=nt(t,e),{mainAxis:h,crossAxis:y,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof p=="number"&&(y=s==="end"?p*-1:p),c?{x:y*u,y:h*l}:{x:h*l,y:y*u}}var Cr=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;let{x:a,y:r,placement:i,middlewareData:s}=t,c=await n1(t,e);return i===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:a+c.x,y:r+c.y,data:{...c,placement:i}}}}},br=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:o,placement:a}=t,{mainAxis:r=!0,crossAxis:i=!1,limiter:s={fn:x=>{let{x:v,y:w}=x;return{x:v,y:w}}},...c}=nt(e,t),l={x:n,y:o},u=await Tt(t,c),d=At(We(a)),h=zo(d),y=l[h],p=l[d];if(r){let x=h==="y"?"top":"left",v=h==="y"?"bottom":"right",w=y+u[x],L=y-u[v];y=Yn(w,y,L)}if(i){let x=d==="y"?"top":"left",v=d==="y"?"bottom":"right",w=p+u[x],L=p-u[v];p=Yn(w,p,L)}let m=s.fn({...t,[h]:y,[d]:p});return{...m,data:{x:m.x-n,y:m.y-o}}}}};var Sr=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){let{placement:n,rects:o,platform:a,elements:r}=t,{apply:i=()=>{},...s}=nt(e,t),c=await Tt(t,s),l=We(n),u=dt(n),d=At(n)==="y",{width:h,height:y}=o.floating,p,m;l==="top"||l==="bottom"?(p=l,m=u===(await(a.isRTL==null?void 0:a.isRTL(r.floating))?"start":"end")?"left":"right"):(m=l,p=u==="end"?"top":"bottom");let x=y-c[p],v=h-c[m],w=!t.middlewareData.shift,L=x,A=v;if(d){let R=h-c.left-c.right;A=u||w?He(v,R):R}else{let R=y-c.top-c.bottom;L=u||w?He(x,R):R}if(w&&!u){let R=ge(c.left,0),j=ge(c.right,0),_=ge(c.top,0),C=ge(c.bottom,0);d?A=h-2*(R!==0||j!==0?R+j:ge(c.left,c.right)):L=y-2*(_!==0||C!==0?_+C:ge(c.top,c.bottom))}await i({...t,availableWidth:A,availableHeight:L});let q=await a.getDimensions(r.floating);return h!==q.width||y!==q.height?{reset:{rects:!0}}:{}}}};function ht(e){return Nr(e)?(e.nodeName||"").toLowerCase():"#document"}function we(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ze(e){var t;return(t=(Nr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Nr(e){return e instanceof Node||e instanceof we(e).Node}function qe(e){return e instanceof Element||e instanceof we(e).Element}function Ve(e){return e instanceof HTMLElement||e instanceof we(e).HTMLElement}function Lr(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof we(e).ShadowRoot}function Ot(e){let{overflow:t,overflowX:n,overflowY:o,display:a}=Pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(a)}function $r(e){return["table","td","th"].includes(ht(e))}function eo(e){let t=to(),n=Pe(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Ir(e){let t=Ze(e);for(;Ve(t)&&!pt(t);){if(eo(t))return t;t=Ze(t)}return null}function to(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function pt(e){return["html","body","#document"].includes(ht(e))}function Pe(e){return we(e).getComputedStyle(e)}function un(e){return qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ze(e){if(ht(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Lr(e)&&e.host||ze(e);return Lr(t)?t.host:t}function Pr(e){let t=Ze(e);return pt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ve(t)&&Ot(t)?t:Pr(t)}function Ft(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);let a=Pr(e),r=a===((o=e.ownerDocument)==null?void 0:o.body),i=we(a);return r?t.concat(i,i.visualViewport||[],Ot(a)?a:[],i.frameElement&&n?Ft(i.frameElement):[]):t.concat(a,Ft(a,[],n))}function Tr(e){let t=Pe(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,a=Ve(e),r=a?e.offsetWidth:n,i=a?e.offsetHeight:o,s=ln(n)!==r||ln(o)!==i;return s&&(n=r,o=i),{width:n,height:o,$:s}}function _o(e){return qe(e)?e:e.contextElement}function Rt(e){let t=_o(e);if(!Ve(t))return Ge(1);let n=t.getBoundingClientRect(),{width:o,height:a,$:r}=Tr(t),i=(r?ln(n.width):n.width)/o,s=(r?ln(n.height):n.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var o1=Ge(0);function Fr(e){let t=we(e);return!to()||!t.visualViewport?o1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function a1(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==we(e)?!1:t}function yt(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);let a=e.getBoundingClientRect(),r=_o(e),i=Ge(1);t&&(o?qe(o)&&(i=Rt(o)):i=Rt(e));let s=a1(r,n,o)?Fr(r):Ge(0),c=(a.left+s.x)/i.x,l=(a.top+s.y)/i.y,u=a.width/i.x,d=a.height/i.y;if(r){let h=we(r),y=o&&qe(o)?we(o):o,p=h,m=p.frameElement;for(;m&&o&&y!==p;){let x=Rt(m),v=m.getBoundingClientRect(),w=Pe(m),L=v.left+(m.clientLeft+parseFloat(w.paddingLeft))*x.x,A=v.top+(m.clientTop+parseFloat(w.paddingTop))*x.y;c*=x.x,l*=x.y,u*=x.x,d*=x.y,c+=L,l+=A,p=we(m),m=p.frameElement}}return ut({width:u,height:d,x:c,y:l})}var r1=[":popover-open",":modal"];function Ko(e){return r1.some(t=>{try{return e.matches(t)}catch{return!1}})}function i1(e){let{elements:t,rect:n,offsetParent:o,strategy:a}=e,r=a==="fixed",i=ze(o),s=t?Ko(t.floating):!1;if(o===i||s&&r)return n;let c={scrollLeft:0,scrollTop:0},l=Ge(1),u=Ge(0),d=Ve(o);if((d||!d&&!r)&&((ht(o)!=="body"||Ot(i))&&(c=un(o)),Ve(o))){let h=yt(o);l=Rt(o),u.x=h.x+o.clientLeft,u.y=h.y+o.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x,y:n.y*l.y-c.scrollTop*l.y+u.y}}function s1(e){return Array.from(e.getClientRects())}function Or(e){return yt(ze(e)).left+un(e).scrollLeft}function c1(e){let t=ze(e),n=un(e),o=e.ownerDocument.body,a=ge(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=ge(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),i=-n.scrollLeft+Or(e),s=-n.scrollTop;return Pe(o).direction==="rtl"&&(i+=ge(t.clientWidth,o.clientWidth)-a),{width:a,height:r,x:i,y:s}}function l1(e,t){let n=we(e),o=ze(e),a=n.visualViewport,r=o.clientWidth,i=o.clientHeight,s=0,c=0;if(a){r=a.width,i=a.height;let l=to();(!l||l&&t==="fixed")&&(s=a.offsetLeft,c=a.offsetTop)}return{width:r,height:i,x:s,y:c}}function d1(e,t){let n=yt(e,!0,t==="fixed"),o=n.top+e.clientTop,a=n.left+e.clientLeft,r=Ve(e)?Rt(e):Ge(1),i=e.clientWidth*r.x,s=e.clientHeight*r.y,c=a*r.x,l=o*r.y;return{width:i,height:s,x:c,y:l}}function Dr(e,t,n){let o;if(t==="viewport")o=l1(e,n);else if(t==="document")o=c1(ze(e));else if(qe(t))o=d1(t,n);else{let a=Fr(e);o={...t,x:t.x-a.x,y:t.y-a.y}}return ut(o)}function Rr(e,t){let n=Ze(e);return n===t||!qe(n)||pt(n)?!1:Pe(n).position==="fixed"||Rr(n,t)}function u1(e,t){let n=t.get(e);if(n)return n;let o=Ft(e,[],!1).filter(s=>qe(s)&&ht(s)!=="body"),a=null,r=Pe(e).position==="fixed",i=r?Ze(e):e;for(;qe(i)&&!pt(i);){let s=Pe(i),c=eo(i);!c&&s.position==="fixed"&&(a=null),(r?!c&&!a:!c&&s.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||Ot(i)&&!c&&Rr(e,i))?o=o.filter(u=>u!==i):a=s,i=Ze(i)}return t.set(e,o),o}function h1(e){let{element:t,boundary:n,rootBoundary:o,strategy:a}=e,i=[...n==="clippingAncestors"?Ko(t)?[]:u1(t,this._c):[].concat(n),o],s=i[0],c=i.reduce((l,u)=>{let d=Dr(t,u,a);return l.top=ge(d.top,l.top),l.right=He(d.right,l.right),l.bottom=He(d.bottom,l.bottom),l.left=ge(d.left,l.left),l},Dr(t,s,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function p1(e){let{width:t,height:n}=Tr(e);return{width:t,height:n}}function y1(e,t,n){let o=Ve(t),a=ze(t),r=n==="fixed",i=yt(e,!0,r,t),s={scrollLeft:0,scrollTop:0},c=Ge(0);if(o||!o&&!r)if((ht(t)!=="body"||Ot(a))&&(s=un(t)),o){let d=yt(t,!0,r,t);c.x=d.x+t.clientLeft,c.y=d.y+t.clientTop}else a&&(c.x=Or(a));let l=i.left+s.scrollLeft-c.x,u=i.top+s.scrollTop-c.y;return{x:l,y:u,width:i.width,height:i.height}}function Uo(e){return Pe(e).position==="static"}function Ar(e,t){return!Ve(e)||Pe(e).position==="fixed"?null:t?t(e):e.offsetParent}function qr(e,t){let n=we(e);if(Ko(e))return n;if(!Ve(e)){let a=Ze(e);for(;a&&!pt(a);){if(qe(a)&&!Uo(a))return a;a=Ze(a)}return n}let o=Ar(e,t);for(;o&&$r(o)&&Uo(o);)o=Ar(o,t);return o&&pt(o)&&Uo(o)&&!eo(o)?n:o||Ir(e)||n}var f1=async function(e){let t=this.getOffsetParent||qr,n=this.getDimensions,o=await n(e.floating);return{reference:y1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function k1(e){return Pe(e).direction==="rtl"}var Go={convertOffsetParentRelativeRectToViewportRelativeRect:i1,getDocumentElement:ze,getClippingRect:h1,getOffsetParent:qr,getElementRects:f1,getClientRects:s1,getDimensions:p1,getScale:Rt,isElement:qe,isRTL:k1};function m1(e,t){let n=null,o,a=ze(e);function r(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function i(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),r();let{left:l,top:u,width:d,height:h}=e.getBoundingClientRect();if(s||t(),!d||!h)return;let y=dn(u),p=dn(a.clientWidth-(l+d)),m=dn(a.clientHeight-(u+h)),x=dn(l),w={rootMargin:-y+"px "+-p+"px "+-m+"px "+-x+"px",threshold:ge(0,He(1,c))||1},L=!0;function A(q){let R=q[0].intersectionRatio;if(R!==c){if(!L)return i();R?i(!1,R):o=setTimeout(()=>{i(!1,1e-7)},1e3)}L=!1}try{n=new IntersectionObserver(A,{...w,root:a.ownerDocument})}catch{n=new IntersectionObserver(A,w)}n.observe(e)}return i(!0),r}function Vr(e,t,n,o){o===void 0&&(o={});let{ancestorScroll:a=!0,ancestorResize:r=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=_o(e),u=a||r?[...l?Ft(l):[],...Ft(t)]:[];u.forEach(v=>{a&&v.addEventListener("scroll",n,{passive:!0}),r&&v.addEventListener("resize",n)});let d=l&&s?m1(l,n):null,h=-1,y=null;i&&(y=new ResizeObserver(v=>{let[w]=v;w&&w.target===l&&y&&(y.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var L;(L=y)==null||L.observe(t)})),n()}),l&&!c&&y.observe(l),y.observe(t));let p,m=c?yt(e):null;c&&x();function x(){let v=yt(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,p=requestAnimationFrame(x)}return n(),()=>{var v;u.forEach(w=>{a&&w.removeEventListener("scroll",n),r&&w.removeEventListener("resize",n)}),d?.(),(v=y)==null||v.disconnect(),y=null,c&&cancelAnimationFrame(p)}}var Br=Cr;var Er=br,Hr=wr,zr=Sr,jr=xr,Ur=Mr;var _r=(e,t,n)=>{let o=new Map,a={platform:Go,...n},r={...a.platform,_c:o};return vr(e,t,{...a,platform:r})};var Zo=F();function Xo(){let e=ue(Zo);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var g1=z(''),Wo=30,Kr=Wo/2,v1={top:180,right:-90,bottom:0,left:90};function no(e){let t=Xo(),n=re({size:Wo},e),[o,a]=B(n,["ref","style","size"]),r=()=>t.currentPlacement().split("-")[0],i=M1(t.contentRef),s=()=>i()?.getPropertyValue("background-color")||"none",c=()=>i()?.getPropertyValue(`border-${r()}-color`)||"none",l=()=>i()?.getPropertyValue(`border-${r()}-width`)||"0px",u=()=>parseInt(l())*2*(Wo/o.size),d=()=>`rotate(${v1[r()]} ${Kr} ${Kr})`;return f(Ne,$({as:"div",ref(h){let y=oe(t.setArrowRef,o.ref);typeof y=="function"&&y(h)},"aria-hidden":"true",get style(){return{position:"absolute","font-size":`${o.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:s(),stroke:c(),"stroke-width":u(),...o.style}}},a,{get children(){let h=g1(),y=h.firstChild;return U(()=>ee(y,"transform",d())),h}}))}function M1(e){let[t,n]=P();return I(()=>{let o=e();o&&n(nn(o).getComputedStyle(o))}),t}function w1(e){let t=Xo(),[n,o]=B(e,["ref","style"]);return f(Ne,$({as:"div",ref(a){let r=oe(t.setPositionerRef,n.ref);typeof r=="function"&&r(a)},"data-popper-positioner":"",get style(){return{position:"absolute",top:0,left:0,"min-width":"max-content",...n.style}}},o))}function Gr(e){let{x:t=0,y:n=0,width:o=0,height:a=0}=e??{};if(typeof DOMRect=="function")return new DOMRect(t,n,o,a);let r={x:t,y:n,width:o,height:a,top:n,right:t+o,bottom:n+a,left:t};return{...r,toJSON:()=>r}}function x1(e,t){return{contextElement:e,getBoundingClientRect:()=>{let o=t(e);return o?Gr(o):e?e.getBoundingClientRect():Gr()}}}function C1(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var b1={top:"bottom",right:"left",bottom:"top",left:"right"};function S1(e,t){let[n,o]=e.split("-"),a=b1[n];return o?n==="left"||n==="right"?`${a} ${o==="start"?"top":"bottom"}`:o==="start"?`${a} ${t==="rtl"?"right":"left"}`:`${a} ${t==="rtl"?"left":"right"}`:`${a} center`}function L1(e){let t=re({getAnchorRect:h=>h?.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,o]=P(),[a,r]=P(),[i,s]=P(t.placement),c=()=>x1(t.anchorRef?.(),t.getAnchorRect),{direction:l}=ur();async function u(){let h=c(),y=n(),p=a();if(!h||!y)return;let m=(p?.clientHeight||0)/2,x=typeof t.gutter=="number"?t.gutter+m:t.gutter??m;y.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),h.getBoundingClientRect();let v=[Br(({placement:R})=>{let j=!!R.split("-")[1];return{mainAxis:x,crossAxis:j?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){let R=typeof t.flip=="string"?t.flip.split(" "):void 0;if(R!==void 0&&!R.every(C1))throw new Error("`flip` expects a spaced-delimited list of placements");v.push(Hr({padding:t.overflowPadding,fallbackPlacements:R}))}(t.slide||t.overlap)&&v.push(Er({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),v.push(zr({padding:t.overflowPadding,apply({availableWidth:R,availableHeight:j,rects:_}){let C=Math.round(_.reference.width);R=Math.floor(R),j=Math.floor(j),y.style.setProperty("--kb-popper-anchor-width",`${C}px`),y.style.setProperty("--kb-popper-content-available-width",`${R}px`),y.style.setProperty("--kb-popper-content-available-height",`${j}px`),t.sameWidth&&(y.style.width=`${C}px`),t.fitViewport&&(y.style.maxWidth=`${R}px`,y.style.maxHeight=`${j}px`)}})),t.hideWhenDetached&&v.push(jr({padding:t.detachedPadding})),p&&v.push(Ur({element:p,padding:t.arrowPadding}));let w=await _r(h,y,{placement:t.placement,strategy:"absolute",middleware:v,platform:{...Go,isRTL:()=>l()==="rtl"}});if(s(w.placement),t.onCurrentPlacementChange?.(w.placement),!y)return;y.style.setProperty("--kb-popper-content-transform-origin",S1(w.placement,l()));let L=Math.round(w.x),A=Math.round(w.y),q;if(t.hideWhenDetached&&(q=w.middlewareData.hide?.referenceHidden?"hidden":"visible"),Object.assign(y.style,{top:"0",left:"0",transform:`translate3d(${L}px, ${A}px, 0)`,visibility:q}),p&&w.middlewareData.arrow){let{x:R,y:j}=w.middlewareData.arrow,_=w.placement.split("-")[0];Object.assign(p.style,{left:R!=null?`${R}px`:"",top:j!=null?`${j}px`:"",[_]:"100%"})}}I(()=>{let h=c(),y=n();if(!h||!y)return;let p=Vr(h,y,u,{elementResize:typeof ResizeObserver=="function"});T(p)}),I(()=>{let h=n(),y=t.contentRef?.();!h||!y||queueMicrotask(()=>{h.style.zIndex=getComputedStyle(y).zIndex})});let d={currentPlacement:i,contentRef:()=>t.contentRef?.(),setPositionerRef:o,setArrowRef:r};return f(Zo.Provider,{value:d,get children(){return t.children}})}var Yo=Object.assign(L1,{Arrow:no,Context:Zo,usePopperContext:Xo,Positioner:w1});function Wr(e){let t=n=>{n.key===on.Escape&&e.onEscapeKeyDown?.(n)};I(()=>{if(X||Z(e.isDisabled))return;let n=e.ownerDocument?.()??ae();n.addEventListener("keydown",t),T(()=>{n.removeEventListener("keydown",t)})})}var ft="data-kb-top-layer",Zr,Jo=!1,Xe=[];function hn(e){return Xe.findIndex(t=>t.node===e)}function N1(e){return Xe[hn(e)]}function $1(e){return Xe[Xe.length-1].node===e}function Xr(){return Xe.filter(e=>e.isPointerBlocking)}function I1(){return[...Xr()].slice(-1)[0]}function Qo(){return Xr().length>0}function Yr(e){let t=hn(I1()?.node);return hn(e)ae(t()),r=d=>e.onPointerDownOutside?.(d),i=d=>e.onFocusOutside?.(d),s=d=>e.onInteractOutside?.(d),c=d=>{let h=d.target;return!(h instanceof HTMLElement)||h.closest(`[${ft}]`)||!J(a(),h)||J(t(),h)?!1:!e.shouldExcludeElement?.(h)},l=d=>{function h(){let y=t(),p=d.target;if(!y||!p||!c(d))return;let m=Dt([r,s]);p.addEventListener(Jr,m,{once:!0});let x=new CustomEvent(Jr,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||Gn(d)&&d.button===0}});p.dispatchEvent(x)}d.pointerType==="touch"?(a().removeEventListener("click",h),o=h,a().addEventListener("click",h,{once:!0})):h()},u=d=>{let h=t(),y=d.target;if(!h||!y||!c(d))return;let p=Dt([i,s]);y.addEventListener(Qr,p,{once:!0});let m=new CustomEvent(Qr,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});y.dispatchEvent(m)};I(()=>{X||Z(e.isDisabled)||(n=window.setTimeout(()=>{a().addEventListener("pointerdown",l,!0)},0),a().addEventListener("focusin",u,!0),T(()=>{window.clearTimeout(n),a().removeEventListener("click",o),a().removeEventListener("pointerdown",l,!0),a().removeEventListener("focusin",u,!0)}))})}var ti=F();function O1(){return ue(ti)}function oo(e){let t,n=O1(),[o,a]=B(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),r=new Set([]),i=d=>{r.add(d);let h=n?.registerNestedLayer(d);return()=>{r.delete(d),h?.()}};ei({shouldExcludeElement:d=>t?o.excludedElements?.some(h=>J(h(),d))||[...r].some(h=>J(h,d)):!1,onPointerDownOutside:d=>{!t||xe.isBelowPointerBlockingLayer(t)||!o.bypassTopMostLayerCheck&&!xe.isTopMostLayer(t)||(o.onPointerDownOutside?.(d),o.onInteractOutside?.(d),d.defaultPrevented||o.onDismiss?.())},onFocusOutside:d=>{o.onFocusOutside?.(d),o.onInteractOutside?.(d),d.defaultPrevented||o.onDismiss?.()}},()=>t),Wr({ownerDocument:()=>ae(t),onEscapeKeyDown:d=>{!t||!xe.isTopMostLayer(t)||(o.onEscapeKeyDown?.(d),!d.defaultPrevented&&o.onDismiss&&(d.preventDefault(),o.onDismiss()))}}),pe(()=>{if(!t)return;xe.addLayer({node:t,isPointerBlocking:o.disableOutsidePointerEvents,dismiss:o.onDismiss});let d=n?.registerNestedLayer(t);xe.assignPointerEventToLayers(),xe.disableBodyPointerEvents(t),T(()=>{t&&(xe.removeLayer(t),d?.(),xe.assignPointerEventToLayers(),xe.restoreBodyPointerEvents(t))})}),I(Oe([()=>t,()=>o.disableOutsidePointerEvents],([d,h])=>{if(!d)return;let y=xe.find(d);y&&y.isPointerBlocking!==h&&(y.isPointerBlocking=h,xe.assignPointerEventToLayers()),h&&xe.disableBodyPointerEvents(d),T(()=>{xe.restoreBodyPointerEvents(d)})},{defer:!0}));let u={registerNestedLayer:i};return f(ti.Provider,{value:u,get children(){return f(Ne,$({as:"div",ref(d){let h=oe(y=>t=y,o.ref);typeof h=="function"&&h(d)}},a))}})}function R1(e){let[t,n]=P(e.defaultValue?.()),o=O(()=>e.value?.()!==void 0),a=O(()=>o()?e.value?.():t());return[a,i=>{Q(()=>{let s=$t(i,a());return Object.is(s,a())||(o()||n(s),e.onChange?.(s)),s})}]}function ni(e){let[t,n]=R1(e);return[()=>t()??!1,n]}function ao(e={}){let[t,n]=ni({value:()=>Z(e.open),defaultValue:()=>!!Z(e.defaultOpen),onChange:i=>e.onOpenChange?.(i)}),o=()=>{n(!0)},a=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:o,close:a,toggle:()=>{t()?a():o()}}}function qt(e){return t=>(e(t),()=>e(void 0))}function pn(e){let[t,n]=P(),o={},a=e(),r="none",[i,s]=q1(e()?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return I(Oe(i,c=>{let l=ro(o);r=c==="mounted"?l:"none"})),I(Oe(e,c=>{if(a===c)return;let l=ro(o);c?s("MOUNT"):o?.display==="none"?s("UNMOUNT"):s(a&&r!==l?"ANIMATION_OUT":"UNMOUNT"),a=c})),I(Oe(t,c=>{if(c){let l=d=>{let y=ro(o).includes(d.animationName);d.target===c&&y&&s("ANIMATION_END")},u=d=>{d.target===c&&(r=ro(o))};c.addEventListener("animationstart",u),c.addEventListener("animationcancel",l),c.addEventListener("animationend",l),T(()=>{c.removeEventListener("animationstart",u),c.removeEventListener("animationcancel",l),c.removeEventListener("animationend",l)})}else s("ANIMATION_END")})),{isPresent:()=>["mounted","unmountSuspended"].includes(i()),setRef:c=>{c&&(o=getComputedStyle(c)),n(c)}}}function ro(e){return e?.animationName||"none"}function q1(e,t){let n=(i,s)=>t[i][s]??i,[o,a]=P(e);return[o,i=>{a(s=>n(s,i))}]}var V1=Object.defineProperty,Vt=(e,t)=>{for(var n in t)V1(e,n,{get:t[n],enumerable:!0})};var B1={};Vt(B1,{Arrow:()=>no,Content:()=>ta,Portal:()=>na,Root:()=>oa,Tooltip:()=>Y,Trigger:()=>aa});var oi=F();function ea(){let e=ue(oi);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function ta(e){let t=ea(),n=re({id:t.generateId("content")},e),[o,a]=B(n,["ref","style"]);return I(()=>T(t.registerContentId(a.id))),f(G,{get when(){return t.contentPresence.isPresent()},get children(){return f(Yo.Positioner,{get children(){return f(oo,$({ref(r){let i=oe(s=>{t.setContentRef(s),t.contentPresence.setRef(s)},o.ref);typeof i=="function"&&i(r)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return{"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative",...o.style}},onFocusOutside:r=>r.preventDefault(),onDismiss:()=>t.hideTooltip(!0)},()=>t.dataset(),a))}})}})}function na(e){let t=ea();return f(G,{get when(){return t.contentPresence.isPresent()},get children(){return f(Lt,e)}})}function E1(e,t,n){let o=e.split("-")[0],a=t.getBoundingClientRect(),r=n.getBoundingClientRect(),i=[],s=a.left+a.width/2,c=a.top+a.height/2;switch(o){case"top":i.push([a.left,c]),i.push([r.left,r.bottom]),i.push([r.left,r.top]),i.push([r.right,r.top]),i.push([r.right,r.bottom]),i.push([a.right,c]);break;case"right":i.push([s,a.top]),i.push([r.left,r.top]),i.push([r.right,r.top]),i.push([r.right,r.bottom]),i.push([r.left,r.bottom]),i.push([s,a.bottom]);break;case"bottom":i.push([a.left,c]),i.push([r.left,r.top]),i.push([r.left,r.bottom]),i.push([r.right,r.bottom]),i.push([r.right,r.top]),i.push([a.right,c]);break;case"left":i.push([s,a.top]),i.push([r.right,r.top]),i.push([r.left,r.top]),i.push([r.left,r.bottom]),i.push([r.right,r.bottom]),i.push([s,a.bottom]);break}return i}var kt={},H1=0,Bt=!1,Ye,yn;function oa(e){let t=`tooltip-${me()}`,n=`${++H1}`,o=re({id:t,openDelay:700,closeDelay:300},e),[a,r]=B(o,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","ignoreSafeArea","forceMount"]),i,[s,c]=P(),[l,u]=P(),[d,h]=P(),[y,p]=P(r.placement),m=ao({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:b=>a.onOpenChange?.(b)}),x=pn(()=>a.forceMount||m.isOpen()),v=()=>{kt[n]=L},w=()=>{for(let b in kt)b!==n&&(kt[b](!0),delete kt[b])},L=(b=!1)=>{X||(b||a.closeDelay&&a.closeDelay<=0?(window.clearTimeout(i),i=void 0,m.close()):i||(i=window.setTimeout(()=>{i=void 0,m.close()},a.closeDelay)),window.clearTimeout(Ye),Ye=void 0,Bt&&(window.clearTimeout(yn),yn=window.setTimeout(()=>{delete kt[n],yn=void 0,Bt=!1},a.closeDelay)))},A=()=>{X||(clearTimeout(i),i=void 0,w(),v(),Bt=!0,m.open(),window.clearTimeout(Ye),Ye=void 0,window.clearTimeout(yn),yn=void 0)},q=()=>{X||(w(),v(),!m.isOpen()&&!Ye&&!Bt?Ye=window.setTimeout(()=>{Ye=void 0,Bt=!0,A()},a.openDelay):m.isOpen()||A())},R=(b=!1)=>{X||(!b&&a.openDelay&&a.openDelay>0&&!i?q():A())},j=()=>{X||(window.clearTimeout(Ye),Ye=void 0,Bt=!1)},_=()=>{X||(window.clearTimeout(i),i=void 0)},C=b=>J(l(),b)||J(d(),b),k=b=>{let V=l(),W=d();if(!(!V||!W))return E1(b,V,W)},g=b=>{let V=b.target;if(C(V)){_();return}if(!a.ignoreSafeArea){let W=k(y());if(W&&Eo(Bo(b),W)){_();return}}i||L()};I(()=>{if(X||!m.isOpen())return;let b=ae();b.addEventListener("pointermove",g,!0),T(()=>{b.removeEventListener("pointermove",g,!0)})}),I(()=>{let b=l();if(!b||!m.isOpen())return;let V=de=>{let So=de.target;J(So,b)&&L(!0)},W=nn();W.addEventListener("scroll",V,{capture:!0}),T(()=>{W.removeEventListener("scroll",V,{capture:!0})})}),T(()=>{clearTimeout(i),kt[n]&&delete kt[n]});let N={dataset:O(()=>({"data-expanded":m.isOpen()?"":void 0,"data-closed":m.isOpen()?void 0:""})),isOpen:m.isOpen,isDisabled:()=>a.disabled??!1,triggerOnFocusOnly:()=>a.triggerOnFocusOnly??!1,contentId:s,contentPresence:x,openTooltip:R,hideTooltip:L,cancelOpening:j,generateId:Pt(()=>o.id),registerContentId:qt(c),isTargetOnTooltip:C,setTriggerRef:u,setContentRef:h};return f(oi.Provider,{value:N,get children(){return f(Yo,$({anchorRef:l,contentRef:d,onCurrentPlacementChange:p},r))}})}function aa(e){let t,n=ea(),[o,a]=B(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]),r=!1,i=!1,s=!1,c=()=>{r=!1},l=()=>{!n.isOpen()&&(i||s)&&n.openTooltip(s)},u=v=>{n.isOpen()&&!i&&!s&&n.hideTooltip(v)},d=v=>{ke(v,o.onPointerEnter),!(v.pointerType==="touch"||n.triggerOnFocusOnly()||n.isDisabled()||v.defaultPrevented)&&(i=!0,l())},h=v=>{ke(v,o.onPointerLeave),v.pointerType!=="touch"&&(i=!1,s=!1,n.isOpen()?u():n.cancelOpening())},y=v=>{ke(v,o.onPointerDown),r=!0,ae(t).addEventListener("pointerup",c,{once:!0})},p=v=>{ke(v,o.onClick),i=!1,s=!1,u(!0)},m=v=>{ke(v,o.onFocus),!(n.isDisabled()||v.defaultPrevented||r)&&(s=!0,l())},x=v=>{ke(v,o.onBlur);let w=v.relatedTarget;n.isTargetOnTooltip(w)||(i=!1,s=!1,u(!0))};return T(()=>{X||ae(t).removeEventListener("pointerup",c)}),f(Ne,$({as:"button",ref(v){let w=oe(L=>{n.setTriggerRef(L),t=L},o.ref);typeof w=="function"&&w(v)},get"aria-describedby"(){return O(()=>!!n.isOpen())()?n.contentId():void 0},onPointerEnter:d,onPointerLeave:h,onPointerDown:y,onClick:p,onFocus:m,onBlur:x},()=>n.dataset(),a))}var Y=Object.assign(oa,{Arrow:no,Content:ta,Portal:na,Trigger:aa});function z1(e){return Object.keys(e).reduce((n,o)=>{let a=e[o];return n[o]=Object.assign({},a),ii(a.value)&&!G1(a.value)&&!Array.isArray(a.value)&&(n[o].value=Object.assign({},a.value)),Array.isArray(a.value)&&(n[o].value=a.value.slice(0)),n},{})}function j1(e){return e?Object.keys(e).reduce((n,o)=>{let a=e[o];return n[o]=ii(a)&&"value"in a?a:{value:a},n[o].attribute||(n[o].attribute=K1(o)),n[o].parse="parse"in n[o]?n[o].parse:typeof n[o].value!="string",n},{}):{}}function U1(e){return Object.keys(e).reduce((n,o)=>(n[o]=e[o].value,n),{})}function _1(e,t){let n=z1(t);return Object.keys(t).forEach(a=>{let r=n[a],i=e.getAttribute(r.attribute),s=e[a];i&&(r.value=r.parse?ri(i):i),s!=null&&(r.value=Array.isArray(s)?s.slice(0):s),r.reflect&&ai(e,r.attribute,r.value),Object.defineProperty(e,a,{get(){return r.value},set(c){let l=r.value;r.value=c,r.reflect&&ai(this,r.attribute,r.value);for(let u=0,d=this.__propertyChangedCallbacks.length;udelete e.__updating[t])}function K1(e){return e.replace(/\.?([A-Z]+)/g,(t,n)=>"-"+n.toLowerCase()).replace("_","-").replace(/^-/,"")}function ii(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function G1(e){return Object.prototype.toString.call(e)==="[object Function]"}function W1(e){return typeof e=="function"&&e.toString().indexOf("class")===0}var ra;function Z1(e,t){let n=Object.keys(t);return class extends e{static get observedAttributes(){return n.map(a=>t[a].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={}}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=_1(this,t);let a=U1(this.props),r=this.Component,i=ra;try{ra=this,this.__initialized=!0,W1(r)?new r(a,{element:this}):r(a,{element:this})}finally{ra=i}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let a=null;for(;a=this.__releaseCallbacks.pop();)a(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(a,r,i){if(this.__initialized&&!this.__updating[a]&&(a=this.lookupProp(a),a in t)){if(i==null&&!this[a])return;this[a]=t[a].parse?ri(i):i}}lookupProp(a){if(t)return n.find(r=>a===r||a===t[r].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(a){this.__releaseCallbacks.push(a)}addPropertyChangedCallback(a){this.__propertyChangedCallbacks.push(a)}}}var z0=Symbol("element-context");function si(e,t={},n={}){let{BaseElement:o=HTMLElement,extension:a}=n;return r=>{if(!e)throw new Error("tag is required to register a Component");let i=customElements.get(e);return i?(i.prototype.Component=r,i):(i=Z1(o,j1(t)),i.prototype.Component=r,i.prototype.registeredTag=e,customElements.define(e,i,a),i)}}function X1(e){let t=Object.keys(e),n={};for(let o=0;oi)}})}return n}function Y1(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&!(t.assignedSlot&&t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}function J1(e){return(t,n)=>{let{element:o}=n;return Fe(a=>{let r=X1(t);o.addPropertyChangedCallback((s,c)=>r[s]=c),o.addReleaseCallback(()=>{o.renderRoot.textContent="",a()});let i=e(r,n);return D(o.renderRoot,i)},Y1(o))}}function ci(e,t,n){return arguments.length===2&&(n=t,t={}),si(e,t)(J1(n))}var Q1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},Et=Q1,el=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),tl=(...e)=>e.filter((t,n,o)=>!!t&&o.indexOf(t)===n).join(" "),nl=z(""),ol=e=>{let[t,n]=B(e,["color","size","strokeWidth","children","class","name","iconNode","absoluteStrokeWidth"]);return(()=>{var o=nl();return ie(o,$(Et,{get width(){return t.size??Et.width},get height(){return t.size??Et.height},get stroke(){return t.color??Et.stroke},get"stroke-width"(){return O(()=>!!t.absoluteStrokeWidth)()?Number(t.strokeWidth??Et["stroke-width"])*24/Number(t.size):Number(t.strokeWidth??Et["stroke-width"])},get class(){return tl("lucide","lucide-icon",t.name!=null?`lucide-${el(t?.name)}`:void 0,t.class!=null?t.class:"")}},n),!0,!0),D(o,f(Me,{get each(){return t.iconNode},children:([a,r])=>f(tt,$({component:a},r))})),o})()},Be=ol;var al=[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]],rl=e=>f(Be,$(e,{name:"Home",iconNode:al})),li=rl;var il=[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]],sl=e=>f(Be,$(e,{name:"LogIn",iconNode:il})),ia=sl,cl=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],ll=e=>f(Be,$(e,{name:"LogOut",iconNode:cl})),di=ll;var dl=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],ul=e=>f(Be,$(e,{name:"Moon",iconNode:dl})),ui=ul;var hl=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],pl=e=>f(Be,$(e,{name:"Search",iconNode:hl})),hi=pl;var yl=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],fl=e=>f(Be,$(e,{name:"Sun",iconNode:yl})),pi=fl;var kl=[["polyline",{points:"14.5 17.5 3 6 3 3 6 3 17.5 14.5",key:"1hfsw2"}],["line",{x1:"13",x2:"19",y1:"19",y2:"13",key:"1vrmhu"}],["line",{x1:"16",x2:"20",y1:"16",y2:"20",key:"1bron3"}],["line",{x1:"19",x2:"21",y1:"21",y2:"19",key:"13pww6"}],["polyline",{points:"14.5 6.5 18 3 21 3 21 6 17.5 9.5",key:"hbey2j"}],["line",{x1:"5",x2:"9",y1:"14",y2:"18",key:"1hf58s"}],["line",{x1:"7",x2:"4",y1:"17",y2:"20",key:"pidxm4"}],["line",{x1:"3",x2:"5",y1:"19",y2:"21",key:"1pehsh"}]],ml=e=>f(Be,$(e,{name:"Swords",iconNode:kl})),sa=ml;var gl=[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]],vl=e=>f(Be,$(e,{name:"Trophy",iconNode:gl})),yi=vl;var Ml=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],wl=e=>f(Be,$(e,{name:"User",iconNode:Ml})),fi=wl;var xl=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],Cl=e=>f(Be,$(e,{name:"Users",iconNode:xl})),ki=Cl;var bl=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Sl=e=>f(Be,$(e,{name:"X",iconNode:bl})),mi=Sl;var io=Symbol("store-raw"),Ht=Symbol("store-node"),Je=Symbol("store-has"),gi=Symbol("store-self");function vi(e){let t=e[fe];if(!t&&(Object.defineProperty(e,fe,{value:t=new Proxy(e,$l)}),!Array.isArray(e))){let n=Object.keys(e),o=Object.getOwnPropertyDescriptors(e);for(let a=0,r=n.length;ae[fe][t]),n}function Mi(e){Rn()&&kn(so(e,Ht),gi)()}function Nl(e){return Mi(e),Reflect.ownKeys(e)}var $l={get(e,t,n){if(t===io)return e;if(t===fe)return n;if(t===Qt)return Mi(e),n;let o=so(e,Ht),a=o[t],r=a?a():e[t];if(t===Ht||t===Je||t==="__proto__")return r;if(!a){let i=Object.getOwnPropertyDescriptor(e,t);Rn()&&(typeof r!="function"||e.hasOwnProperty(t))&&!(i&&i.get)&&(r=kn(o,t,r)())}return zt(r)?vi(r):r},has(e,t){return t===io||t===fe||t===Qt||t===Ht||t===Je||t==="__proto__"?!0:(Rn()&&kn(so(e,Je),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Nl,getOwnPropertyDescriptor:Ll};function Ut(e,t,n,o=!1){if(!o&&e[t]===n)return;let a=e[t],r=e.length;n===void 0?(delete e[t],e[Je]&&e[Je][t]&&a!==void 0&&e[Je][t].$()):(e[t]=n,e[Je]&&e[Je][t]&&a===void 0&&e[Je][t].$());let i=so(e,Ht),s;if((s=kn(i,t,a))&&s.$(()=>n),Array.isArray(e)&&e.length!==r){for(let c=e.length;c1){o=t.shift();let i=typeof o,s=Array.isArray(e);if(Array.isArray(o)){for(let c=0;c1){fn(e[o],t,[o].concat(n));return}a=e[o],n=[o].concat(n)}let r=t[0];typeof r=="function"&&(r=r(a,n),r===a)||o===void 0&&r==null||(r=jt(r),o===void 0||zt(a)&&zt(r)&&!Array.isArray(r)?wi(a,r):Ut(e,o,r))}function _t(...[e,t]){let n=jt(e||{}),o=Array.isArray(n),a=vi(n);function r(...i){Fo(()=>{o&&i.length===1?Il(n,i[0]):fn(n,i)})}return[a,r]}var J0=Symbol("store-root");var co=new WeakMap,xi={get(e,t){if(t===io)return e;let n=e[t],o;return zt(n)?co.get(n)||(co.set(n,o=new Proxy(n,xi)),o):n},set(e,t,n){return Ut(e,t,jt(n)),!0},deleteProperty(e,t){return Ut(e,t,void 0,!0),!0}};function mn(e){return t=>{if(zt(t)){let n;(n=co.get(t))||co.set(t,n=new Proxy(t,xi)),e(n)}return t}}var Pl=e=>typeof e=="function",po=(e,t)=>Pl(e)?e(t):e,le;(function(e){e[e.ADD_TOAST=0]="ADD_TOAST",e[e.UPDATE_TOAST=1]="UPDATE_TOAST",e[e.UPSERT_TOAST=2]="UPSERT_TOAST",e[e.DISMISS_TOAST=3]="DISMISS_TOAST",e[e.REMOVE_TOAST=4]="REMOVE_TOAST",e[e.START_PAUSE=5]="START_PAUSE",e[e.END_PAUSE=6]="END_PAUSE"})(le||(le={}));var[mt,ot]=_t({toasts:[],pausedAt:void 0}),Dl=()=>{let{pausedAt:e,toasts:t}=mt;if(e)return;let n=Date.now();return t.map(a=>{if(a.duration===1/0)return;let r=(a.duration||0)+a.pauseDuration-(n-a.createdAt);if(r<=0){a.visible&&Ee({type:le.DISMISS_TOAST,toastId:a.id});return}return setTimeout(()=>{Ee({type:le.DISMISS_TOAST,toastId:a.id})},r)})},gn=new Map,Ci=(e,t)=>{if(gn.has(e))return;let n=setTimeout(()=>{gn.delete(e),Ee({type:le.REMOVE_TOAST,toastId:e})},t);gn.set(e,n)},Al=e=>{let t=gn.get(e);gn.delete(e),t&&clearTimeout(t)},Ee=e=>{switch(e.type){case le.ADD_TOAST:ot("toasts",a=>{let r=a;return[e.toast,...r]});break;case le.DISMISS_TOAST:let{toastId:t}=e,n=mt.toasts;if(t){let a=n.find(r=>r.id===t);a&&Ci(t,a.unmountDelay),ot("toasts",r=>r.id===t,mn(r=>r.visible=!1))}else n.forEach(a=>{Ci(a.id,a.unmountDelay)}),ot("toasts",a=>a.id!==void 0,mn(a=>a.visible=!1));break;case le.REMOVE_TOAST:if(!e.toastId){ot("toasts",[]);break}ot("toasts",a=>a.filter(i=>i.id!==e.toastId));break;case le.UPDATE_TOAST:e.toast.id&&Al(e.toast.id),ot("toasts",a=>a.id===e.toast.id,a=>({...a,...e.toast}));break;case le.UPSERT_TOAST:mt.toasts.find(a=>a.id===e.toast.id)?Ee({type:le.UPDATE_TOAST,toast:e.toast}):Ee({type:le.ADD_TOAST,toast:e.toast});break;case le.START_PAUSE:ot(mn(a=>{a.pausedAt=Date.now(),a.toasts.forEach(r=>{r.paused=!0})}));break;case le.END_PAUSE:let o=e.time-(mt.pausedAt||0);ot(mn(a=>{a.pausedAt=void 0,a.toasts.forEach(r=>{r.pauseDuration+=o,r.paused=!1})}));break}},Tl={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Gt={id:"",icon:"",unmountDelay:500,duration:3e3,ariaProps:{role:"status","aria-live":"polite"},className:"",style:{},position:"top-right",iconTheme:{}},bi={position:"top-right",toastOptions:Gt,gutter:8,containerStyle:{},containerClassName:""},lo="16px",Fl={position:"fixed","z-index":9999,top:lo,bottom:lo,left:lo,right:lo,"pointer-events":"none"},Ol=(()=>{let e=0;return()=>String(++e)})(),Rl=e=>{jl(t=>({containerClassName:e.containerClassName??t.containerClassName,containerStyle:e.containerStyle??t.containerStyle,gutter:e.gutter??t.gutter,position:e.position??t.position,toastOptions:{...e.toastOptions}}))},ql=(e,t)=>{let o=e.includes("top")?{top:0,"margin-top":`${t}px`}:{bottom:0,"margin-bottom":`${t}px`},a=e.includes("center")?{"justify-content":"center"}:e.includes("right")?{"justify-content":"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:"all 230ms cubic-bezier(.21,1.02,.73,1)",...o,...a}},Vl=(e,t)=>{let n=e.getBoundingClientRect();n.height!==t.height&&Ee({type:le.UPDATE_TOAST,toast:{id:t.id,height:n.height}})},Bl=(e,t)=>{let{toasts:n}=mt,o=Kt().gutter||bi.gutter||8,a=n.filter(c=>(c.position||t)===t&&c.height),r=a.findIndex(c=>c.id===e.id),i=a.filter((c,l)=>lc+o+(l.height||0),0)},El=(e,t)=>(e.position||t).includes("top")?1:-1,Hl={display:"flex","align-items":"center",color:"#363636",background:"white","box-shadow":"0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05)","max-width":"350px","pointer-events":"auto",padding:"8px 10px","border-radius":"4px","line-height":"1.3","will-change":"transform"},zl={display:"flex","align-items":"center",flex:"1 1 auto",margin:"4px 10px","white-space":"pre-line"},uo={"flex-shrink":0,"min-width":"20px","min-height":"20px",display:"flex","align-items":"center","justify-content":"center","text-align":"center"},yo=e=>({calcMode:"spline",keyTimes:"0; 1",keySplines:e}),[Kt,jl]=P(bi),Ul=(e,t="blank",n)=>({...Gt,...Kt().toastOptions,...n,type:t,message:e,pauseDuration:0,createdAt:Date.now(),visible:!0,id:n.id||Ol(),paused:!1,style:{...Gt.style,...Kt().toastOptions?.style,...n.style},duration:n.duration||Kt().toastOptions?.duration||Tl[t],position:n.position||Kt().toastOptions?.position||Kt().position||Gt.position}),vn=e=>(t,n={})=>Fe(()=>{let o=mt.toasts.find(r=>r.id===n.id),a=Ul(t,e,{...o,duration:void 0,...n});return Ee({type:le.UPSERT_TOAST,toast:a}),a.id}),Ce=(e,t)=>vn("blank")(e,t);Q(()=>Ce);Ce.error=vn("error");Ce.success=vn("success");Ce.loading=vn("loading");Ce.custom=vn("custom");Ce.dismiss=e=>{Ee({type:le.DISMISS_TOAST,toastId:e})};Ce.promise=(e,t,n)=>{let o=Ce.loading(t.loading,{...n});return e.then(a=>(Ce.success(po(t.success,a),{id:o,...n}),a)).catch(a=>{Ce.error(po(t.error,a),{id:o,...n})}),e};Ce.remove=e=>{Ee({type:le.REMOVE_TOAST,toastId:e})};var _l=z("
",4),Si=e=>(I(()=>{Rl(e)}),I(()=>{let t=Dl();T(()=>{t&&t.forEach(n=>n&&clearTimeout(n))})}),(()=>{let t=_l.cloneNode(!0);return t.firstChild,D(t,f(Me,{get each(){return mt.toasts},children:n=>f(Zl,{toast:n})}),null),U(n=>{let o={...Fl,...e.containerStyle},a=e.containerClassName;return n._v$=he(t,o,n._v$),a!==n._v$2&&en(t,n._v$2=a),n},{_v$:void 0,_v$2:void 0}),t})()),ho=z("
",2),Kl=z("
",4),Gl=e=>{let t;return I(()=>{if(!t)return;let n=El(e.toast,e.position);e.toast.visible?t.animate([{transform:`translate3d(0,${n*-200}%,0) scale(.6)`,opacity:.5},{transform:"translate3d(0,0,0) scale(1)",opacity:1}],{duration:350,fill:"forwards",easing:"cubic-bezier(.21,1.02,.73,1)"}):t.animate([{transform:"translate3d(0,0,-1px) scale(1)",opacity:1},{transform:`translate3d(0,${n*-150}%,-1px) scale(.4)`,opacity:0}],{duration:400,fill:"forwards",easing:"cubic-bezier(.06,.71,.55,1)"})}),(()=>{let n=Kl.cloneNode(!0),o=n.firstChild,a=t;return typeof a=="function"?a(n):t=n,D(n,f(Hn,{get children(){return[f(lt,{get when(){return e.toast.icon},get children(){let r=ho.cloneNode(!0);return D(r,()=>e.toast.icon),U(i=>he(r,uo,i)),r}}),f(lt,{get when(){return e.toast.type==="loading"},get children(){let r=ho.cloneNode(!0);return D(r,f(od,$(()=>e.toast.iconTheme))),U(i=>he(r,uo,i)),r}}),f(lt,{get when(){return e.toast.type==="success"},get children(){let r=ho.cloneNode(!0);return D(r,f(Ql,$(()=>e.toast.iconTheme))),U(i=>he(r,uo,i)),r}}),f(lt,{get when(){return e.toast.type==="error"},get children(){let r=ho.cloneNode(!0);return D(r,f(td,$(()=>e.toast.iconTheme))),U(i=>he(r,uo,i)),r}})]}}),o),ie(o,()=>e.toast.ariaProps,!1,!0),D(o,()=>po(e.toast.message,e.toast)),U(r=>{let i=e.toast.className,s={...Hl,...e.toast.style},c=zl;return i!==r._v$&&en(n,r._v$=i),r._v$2=he(n,s,r._v$2),r._v$3=he(o,c,r._v$3),r},{_v$:void 0,_v$2:void 0,_v$3:void 0}),n})()},Wl=z("
",2),Zl=e=>{let t=()=>{let a=e.toast.position||Gt.position,r=Bl(e.toast,a);return ql(a,r)},n=O(()=>t()),o;return pe(()=>{o&&Vl(o,e.toast)}),(()=>{let a=Wl.cloneNode(!0);a.addEventListener("mouseleave",()=>Ee({type:le.END_PAUSE,time:Date.now()})),a.addEventListener("mouseenter",()=>Ee({type:le.START_PAUSE,time:Date.now()}));let r=o;return typeof r=="function"?r(a):o=a,D(a,(()=>{let i=O(()=>e.toast.type==="custom",!0);return()=>i()?po(e.toast.message,e.toast):f(Gl,{get toast(){return e.toast},get position(){return e.toast.position||Gt.position}})})()),U(i=>{let s=n(),c=e.toast.visible?"sldt-active":"";return i._v$=he(a,s,i._v$),c!==i._v$2&&en(a,i._v$2=c),i},{_v$:void 0,_v$2:void 0}),a})()},Xl=z('',8,!0),Yl=z('',8,!0),Li=e=>{let t={dur:"0.35s",begin:"100ms",fill:"freeze",calcMode:"spline",keyTimes:"0; 0.6; 1",keySplines:"0.25 0.71 0.4 0.88; .59 .22 .87 .63"};return(()=>{let n=Xl.cloneNode(!0),o=n.firstChild,a=o.nextSibling;return ie(o,t,!0,!1),ie(a,t,!0,!1),U(()=>ee(n,"fill",e.fill)),n})()},Ni=e=>{let t={dur:"1s",begin:e.begin||"320ms",fill:"freeze",...yo("0.0 0.0 0.2 1")};return(()=>{let n=Yl.cloneNode(!0),o=n.firstChild,a=o.nextSibling;return ie(o,t,!0,!1),ie(a,t,!0,!1),U(()=>ee(n,"fill",e.fill)),n})()},Jl=z('',6),Ql=e=>{let t=e.primary||"#34C759";return(()=>{let n=Jl.cloneNode(!0),o=n.firstChild,a=o.firstChild;return n.style.setProperty("overflow","visible"),D(n,f(Li,{fill:t}),o),D(n,f(Ni,{fill:t,begin:"350ms"}),o),ie(a,()=>yo("0.0, 0.0, 0.58, 1.0"),!0,!1),U(()=>ee(o,"stroke",e.secondary||"#FCFCFC")),n})()},ed=z('',10),td=e=>{let t=e.primary||"#FF3B30";return(()=>{let n=ed.cloneNode(!0),o=n.firstChild,a=o.firstChild,r=o.nextSibling,i=r.firstChild;return n.style.setProperty("overflow","visible"),D(n,f(Li,{fill:t}),o),D(n,f(Ni,{fill:t}),o),ie(a,()=>yo("0.0, 0.0, 0.58, 1.0"),!0,!1),ie(i,()=>yo("0.0, 0.0, 0.58, 1.0"),!0,!1),U(s=>{let c=e.secondary||"#FFFFFF",l=e.secondary||"#FFFFFF";return c!==s._v$&&ee(o,"stroke",s._v$=c),l!==s._v$2&&ee(r,"fill",s._v$2=l),s},{_v$:void 0,_v$2:void 0}),n})()},nd=z('',8),od=e=>(()=>{let t=nd.cloneNode(!0),n=t.firstChild,o=n.nextSibling;return t.style.setProperty("overflow","visible"),U(a=>{let r=e.primary||"#E5E7EB",i=e.secondary||"#4b5563";return r!==a._v$&&ee(n,"stroke",a._v$=r),i!==a._v$2&&ee(o,"stroke",a._v$2=i),a},{_v$:void 0,_v$2:void 0}),t})(),ca=Ce;var at=class{constructor(t){this.value=t}valueOf(){return this.value}},te=class extends at{constructor(t="???"){super(t)}toString(t){return`{${this.value}}`}},be=class extends at{constructor(t,n={}){super(t),this.opts=n}toString(t){try{return t.memoizeIntlObject(Intl.NumberFormat,this.opts).format(this.value)}catch(n){return t.reportError(n),this.value.toString(10)}}},je=class extends at{constructor(t,n={}){super(t),this.opts=n}toString(t){try{return t.memoizeIntlObject(Intl.DateTimeFormat,this.opts).format(this.value)}catch(n){return t.reportError(n),new Date(this.value).toISOString()}}};var $i=100,ad="\u2068",rd="\u2069";function id(e,t,n){if(n===t||n instanceof be&&t instanceof be&&n.value===t.value)return!0;if(t instanceof be&&typeof n=="string"){let o=e.memoizeIntlObject(Intl.PluralRules,t.opts).select(t.value);if(n===o)return!0}return!1}function Ii(e,t,n){return t[n]?Wt(e,t[n].value):(e.reportError(new RangeError("No default")),new te)}function la(e,t){let n=[],o=Object.create(null);for(let a of t)a.type==="narg"?o[a.name]=Mn(e,a.value):n.push(Mn(e,a));return{positional:n,named:o}}function Mn(e,t){switch(t.type){case"str":return t.value;case"num":return new be(t.value,{minimumFractionDigits:t.precision});case"var":return sd(e,t);case"mesg":return cd(e,t);case"term":return ld(e,t);case"func":return dd(e,t);case"select":return ud(e,t);default:return new te}}function sd(e,{name:t}){let n;if(e.params)if(Object.prototype.hasOwnProperty.call(e.params,t))n=e.params[t];else return new te(`$${t}`);else if(e.args&&Object.prototype.hasOwnProperty.call(e.args,t))n=e.args[t];else return e.reportError(new ReferenceError(`Unknown variable: $${t}`)),new te(`$${t}`);if(n instanceof at)return n;switch(typeof n){case"string":return n;case"number":return new be(n);case"object":if(n instanceof Date)return new je(n.getTime());default:return e.reportError(new TypeError(`Variable type not supported: $${t}, ${typeof n}`)),new te(`$${t}`)}}function cd(e,{name:t,attr:n}){let o=e.bundle._messages.get(t);if(!o)return e.reportError(new ReferenceError(`Unknown message: ${t}`)),new te(t);if(n){let a=o.attributes[n];return a?Wt(e,a):(e.reportError(new ReferenceError(`Unknown attribute: ${n}`)),new te(`${t}.${n}`))}return o.value?Wt(e,o.value):(e.reportError(new ReferenceError(`No value: ${t}`)),new te(t))}function ld(e,{name:t,attr:n,args:o}){let a=`-${t}`,r=e.bundle._terms.get(a);if(!r)return e.reportError(new ReferenceError(`Unknown term: ${a}`)),new te(a);if(n){let s=r.attributes[n];if(s){e.params=la(e,o).named;let c=Wt(e,s);return e.params=null,c}return e.reportError(new ReferenceError(`Unknown attribute: ${n}`)),new te(`${a}.${n}`)}e.params=la(e,o).named;let i=Wt(e,r.value);return e.params=null,i}function dd(e,{name:t,args:n}){let o=e.bundle._functions[t];if(!o)return e.reportError(new ReferenceError(`Unknown function: ${t}()`)),new te(`${t}()`);if(typeof o!="function")return e.reportError(new TypeError(`Function ${t}() is not callable`)),new te(`${t}()`);try{let a=la(e,n);return o(a.positional,a.named)}catch(a){return e.reportError(a),new te(`${t}()`)}}function ud(e,{selector:t,variants:n,star:o}){let a=Mn(e,t);if(a instanceof te)return Ii(e,n,o);for(let r of n){let i=Mn(e,r.key);if(id(e,a,i))return Wt(e,r.value)}return Ii(e,n,o)}function da(e,t){if(e.dirty.has(t))return e.reportError(new RangeError("Cyclic reference")),new te;e.dirty.add(t);let n=[],o=e.bundle._useIsolating&&t.length>1;for(let a of t){if(typeof a=="string"){n.push(e.bundle._transform(a));continue}if(e.placeables++,e.placeables>$i)throw e.dirty.delete(t),new RangeError(`Too many placeables expanded: ${e.placeables}, max allowed is ${$i}`);o&&n.push(ad),n.push(Mn(e,a).toString(e)),o&&n.push(rd)}return e.dirty.delete(t),n.join("")}function Wt(e,t){return typeof t=="string"?e.bundle._transform(t):da(e,t)}var fo=class{constructor(t,n,o){this.dirty=new WeakSet,this.params=null,this.placeables=0,this.bundle=t,this.errors=n,this.args=o}reportError(t){if(!this.errors||!(t instanceof Error))throw t;this.errors.push(t)}memoizeIntlObject(t,n){let o=this.bundle._intls.get(t);o||(o={},this.bundle._intls.set(t,o));let a=JSON.stringify(n);return o[a]||(o[a]=new t(this.bundle.locales,n)),o[a]}};function ko(e,t){let n=Object.create(null);for(let[o,a]of Object.entries(e))t.includes(o)&&(n[o]=a.valueOf());return n}var Pi=["unitDisplay","currencyDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits"];function Ai(e,t){let n=e[0];if(n instanceof te)return new te(`NUMBER(${n.valueOf()})`);if(n instanceof be)return new be(n.valueOf(),{...n.opts,...ko(t,Pi)});if(n instanceof je)return new be(n.valueOf(),{...ko(t,Pi)});throw new TypeError("Invalid argument to NUMBER")}var Di=["dateStyle","timeStyle","fractionalSecondDigits","dayPeriod","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName"];function Ti(e,t){let n=e[0];if(n instanceof te)return new te(`DATETIME(${n.valueOf()})`);if(n instanceof je)return new je(n.valueOf(),{...n.opts,...ko(t,Di)});if(n instanceof be)return new je(n.valueOf(),{...ko(t,Di)});throw new TypeError("Invalid argument to DATETIME")}var Fi=new Map;function Oi(e){let t=Array.isArray(e)?e.join(" "):e,n=Fi.get(t);return n===void 0&&(n=new Map,Fi.set(t,n)),n}var wn=class{constructor(t,{functions:n,useIsolating:o=!0,transform:a=r=>r}={}){this._terms=new Map,this._messages=new Map,this.locales=Array.isArray(t)?t:[t],this._functions={NUMBER:Ai,DATETIME:Ti,...n},this._useIsolating=o,this._transform=a,this._intls=Oi(t)}hasMessage(t){return this._messages.has(t)}getMessage(t){return this._messages.get(t)}addResource(t,{allowOverrides:n=!1}={}){let o=[];for(let a=0;a\s*/y,bd=/\s*:\s*/y,Sd=/\s*,?\s*/y,Ld=/\s+/y,xn=class{constructor(t){this.body=[],ua.lastIndex=0;let n=0;for(;;){let C=ua.exec(t);if(C===null)break;n=ua.lastIndex;try{this.body.push(c(C[1]))}catch(k){if(k instanceof SyntaxError)continue;throw k}}function o(C){return C.lastIndex=n,C.test(t)}function a(C,k){if(t[n]===C)return n++,!0;if(k)throw new k(`Expected ${C}`);return!1}function r(C,k){if(o(C))return n=C.lastIndex,!0;if(k)throw new k(`Expected ${C.toString()}`);return!1}function i(C){C.lastIndex=n;let k=C.exec(t);if(k===null)throw new SyntaxError(`Expected ${C.toString()}`);return n=C.lastIndex,k}function s(C){return i(C)[1]}function c(C){let k=u(),g=l();if(k===null&&Object.keys(g).length===0)throw new SyntaxError("Expected message value or attributes");return{id:C,value:k,attributes:g}}function l(){let C=Object.create(null);for(;o(Ri);){let k=s(Ri),g=u();if(g===null)throw new SyntaxError("Expected attribute value");C[k]=g}return C}function u(){let C;if(o(mo)&&(C=s(mo)),t[n]==="{"||t[n]==="}")return d(C?[C]:[],1/0);let k=R();return k?C?d([C,k],k.length):(k.value=j(k.value,kd),d([k],k.length)):C?j(C,Ei):null}function d(C=[],k){for(;;){if(o(mo)){C.push(s(mo));continue}if(t[n]==="{"){C.push(h());continue}if(t[n]==="}")throw new SyntaxError("Unbalanced closing brace");let b=R();if(b){C.push(b),k=Math.min(k,b.length);continue}break}let g=C.length-1,M=C[g];typeof M=="string"&&(C[g]=j(M,Ei));let N=[];for(let b of C)b instanceof go&&(b=b.value.slice(0,b.value.length-k)),b&&N.push(b);return N}function h(){r(vd,SyntaxError);let C=y();if(r(Hi))return C;if(r(Cd)){let k=x();return r(Hi,SyntaxError),{type:"select",selector:C,...k}}throw new SyntaxError("Unclosed placeable")}function y(){if(t[n]==="{")return h();if(o(qi)){let[,C,k,g=null]=i(qi);if(C==="$")return{type:"var",name:k};if(r(xd)){let M=p();if(C==="-")return{type:"term",name:k,attr:g,args:M};if(yd.test(k))return{type:"func",name:k,args:M};throw new SyntaxError("Function names must be all upper-case")}return C==="-"?{type:"term",name:k,attr:g,args:[]}:{type:"mesg",name:k,attr:g}}return w()}function p(){let C=[];for(;;){switch(t[n]){case")":return n++,C;case void 0:throw new SyntaxError("Unclosed argument list")}C.push(m()),r(Sd)}}function m(){let C=y();return C.type!=="mesg"?C:r(bd)?{type:"narg",name:C.name,value:w()}:C}function x(){let C=[],k=0,g;for(;o(hd);){a("*")&&(g=k);let M=v(),N=u();if(N===null)throw new SyntaxError("Expected variant value");C[k++]={key:M,value:N}}if(k===0)return null;if(g===void 0)throw new SyntaxError("Expected default variant");return{variants:C,star:g}}function v(){r(Md,SyntaxError);let C;return o(ha)?C=L():C={type:"str",value:s(pd)},r(wd,SyntaxError),C}function w(){if(o(ha))return L();if(t[n]==='"')return A();throw new SyntaxError("Invalid expression")}function L(){let[,C,k=""]=i(ha),g=k.length;return{type:"num",value:parseFloat(C),precision:g}}function A(){a('"',SyntaxError);let C="";for(;;){if(C+=s(fd),t[n]==="\\"){C+=q();continue}if(a('"'))return{type:"str",value:C};throw new SyntaxError("Unclosed string literal")}}function q(){if(o(Vi))return s(Vi);if(o(Bi)){let[,C,k]=i(Bi),g=parseInt(C||k,16);return g<=55295||57344<=g?String.fromCodePoint(g):"\uFFFD"}throw new SyntaxError("Unknown escape sequence")}function R(){let C=n;switch(r(Ld),t[n]){case".":case"[":case"*":case"}":case void 0:return!1;case"{":return _(t.slice(C,n))}return t[n-1]===" "?_(t.slice(C,n)):!1}function j(C,k){return C.replace(k,"")}function _(C){let k=C.replace(md,` `),g=gd.exec(C)[1].length;return new go(k,g)}}},go=class{constructor(t,n){this.value=t,this.length=n}};var Nd="([a-z]{2,3}|\\*)",$d="(?:-([a-z]{4}|\\*))",Id="(?:-([a-z]{2}|\\*))",Pd="(?:-(([0-9][a-z0-9]{3}|[a-z0-9]{5,8})|\\*))",Dd=new RegExp(`^${Nd}${$d}?${Id}?${Pd}?$`,"i"),rt=class{constructor(t){let n=Dd.exec(t.replace(/_/g,"-"));if(!n){this.isWellFormed=!1;return}let[,o,a,r,i]=n;o&&(this.language=o.toLowerCase()),a&&(this.script=a[0].toUpperCase()+a.slice(1)),r&&(this.region=r.toUpperCase()),this.variant=i,this.isWellFormed=!0}isEqual(t){return this.language===t.language&&this.script===t.script&&this.region===t.region&&this.variant===t.variant}matches(t,n=!1,o=!1){return(this.language===t.language||n&&this.language===void 0||o&&t.language===void 0)&&(this.script===t.script||n&&this.script===void 0||o&&t.script===void 0)&&(this.region===t.region||n&&this.region===void 0||o&&t.region===void 0)&&(this.variant===t.variant||n&&this.variant===void 0||o&&t.variant===void 0)}toString(){return[this.language,this.script,this.region,this.variant].filter(t=>t!==void 0).join("-")}clearVariants(){this.variant=void 0}clearRegion(){this.region=void 0}addLikelySubtags(){let t=Td(this.toString().toLowerCase());return t?(this.language=t.language,this.script=t.script,this.region=t.region,this.variant=t.variant,!0):!1}},zi={ar:"ar-arab-eg","az-arab":"az-arab-ir","az-ir":"az-arab-ir",be:"be-cyrl-by",da:"da-latn-dk",el:"el-grek-gr",en:"en-latn-us",fa:"fa-arab-ir",ja:"ja-jpan-jp",ko:"ko-kore-kr",pt:"pt-latn-br",sr:"sr-cyrl-rs","sr-ru":"sr-latn-ru",sv:"sv-latn-se",ta:"ta-taml-in",uk:"uk-cyrl-ua",zh:"zh-hans-cn","zh-hant":"zh-hant-tw","zh-hk":"zh-hant-hk","zh-mo":"zh-hant-mo","zh-tw":"zh-hant-tw","zh-gb":"zh-hant-gb","zh-us":"zh-hant-us"},Ad=["az","bg","cs","de","es","fi","fr","hu","it","lt","lv","nl","pl","ro","ru"];function Td(e){if(Object.prototype.hasOwnProperty.call(zi,e))return new rt(zi[e]);let t=new rt(e);return t.language&&Ad.includes(t.language)?(t.region=t.language.toUpperCase(),t):null}function pa(e,t,n){let o=new Set,a=new Map;for(let r of t)new rt(r).isWellFormed&&a.set(r,new rt(r));e:for(let r of e){let i=r.toLowerCase(),s=new rt(i);if(s.language!==void 0){for(let c of a.keys())if(i===c.toLowerCase()){if(o.add(c),a.delete(c),n==="lookup")return Array.from(o);if(n==="filtering")continue;continue e}for(let[c,l]of a.entries())if(l.matches(s,!0,!1)){if(o.add(c),a.delete(c),n==="lookup")return Array.from(o);if(n==="filtering")continue;continue e}if(s.addLikelySubtags()){for(let[c,l]of a.entries())if(l.matches(s,!0,!1)){if(o.add(c),a.delete(c),n==="lookup")return Array.from(o);if(n==="filtering")continue;continue e}}s.clearVariants();for(let[c,l]of a.entries())if(l.matches(s,!0,!0)){if(o.add(c),a.delete(c),n==="lookup")return Array.from(o);if(n==="filtering")continue;continue e}if(s.clearRegion(),s.addLikelySubtags()){for(let[c,l]of a.entries())if(l.matches(s,!0,!1)){if(o.add(c),a.delete(c),n==="lookup")return Array.from(o);if(n==="filtering")continue;continue e}}s.clearRegion();for(let[c,l]of a.entries())if(l.matches(s,!0,!0)){if(o.add(c),a.delete(c),n==="lookup")return Array.from(o);if(n==="filtering")continue;continue e}}}return Array.from(o)}function ya(e,t,{strategy:n="filtering",defaultLocale:o}={}){let a=pa(Array.from(e??[]).map(String),Array.from(t??[]).map(String),n);if(n==="lookup"){if(o===void 0)throw new Error("defaultLocale cannot be undefined for strategy `lookup`");a.length===0&&a.push(o)}else o&&!a.includes(o)&&a.push(o);return a}var ji=1,Fd=.9,Od=.8,Rd=.17,fa=.1,ka=.999,qd=.9999,Vd=.99,Bd=/[\\\/_+.#"@\[\(\{&]/,Ed=/[\\\/_+.#"@\[\(\{&]/g,Hd=/[\s-]/,_i=/[\s-]/g;function ma(e,t,n,o,a,r,i){if(r===t.length)return a===e.length?ji:Vd;var s=`${a},${r}`;if(i[s]!==void 0)return i[s];for(var c=o.charAt(r),l=n.indexOf(c,a),u=0,d,h,y,p;l>=0;)d=ma(e,t,n,o,l+1,r+1,i),d>u&&(l===a?d*=ji:Bd.test(e.charAt(l-1))?(d*=Od,y=e.slice(a,l-1).match(Ed),y&&a>0&&(d*=Math.pow(ka,y.length))):Hd.test(e.charAt(l-1))?(d*=Fd,p=e.slice(a,l-1).match(_i),p&&a>0&&(d*=Math.pow(ka,p.length))):(d*=Rd,a>0&&(d*=Math.pow(ka,l-a))),e.charAt(l)!==t.charAt(r)&&(d*=qd)),(dd&&(d=h*fa)),d>u&&(u=d),l=n.indexOf(c,l+1);return i[s]=u,u}function Ui(e){return e.toLowerCase().replace(_i," ")}function Ki(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,ma(e,t,Ui(e),Ui(t),0,0,{})}var Se=e=>typeof e=="function"?e():e;var vo=new Map,zd=e=>{I(()=>{let t=Se(e.style)??{},n=Se(e.properties)??[],o={};for(let r in t)o[r]=e.element.style[r];let a=vo.get(e.key);a?a.activeCount++:vo.set(e.key,{activeCount:1,originalStyles:o,properties:n.map(r=>r.key)}),Object.assign(e.element.style,e.style);for(let r of n)e.element.style.setProperty(r.key,r.value);T(()=>{let r=vo.get(e.key);if(r){if(r.activeCount!==1){r.activeCount--;return}vo.delete(e.key);for(let[i,s]of Object.entries(r.originalStyles))e.element.style[i]=s;for(let i of r.properties)e.element.style.removeProperty(i);e.element.style.length===0&&e.element.removeAttribute("style"),e.cleanup?.()}})})},Mo=zd;var jd=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},Ud=(e,t)=>{let n=getComputedStyle(e),o=t==="x"?n.overflowX:n.overflowY;return o==="auto"||o==="scroll"||e.tagName==="HTML"&&o==="visible"},Gi=(e,t,n)=>{let o=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1,a=e,r=0,i=0,s=!1;do{let[c,l,u]=jd(a,t),d=u-c-o*l;(l!==0||d!==0)&&Ud(a,t)&&(r+=d,i+=l),a===(n??document.documentElement)?s=!0:a=a._$host??a.parentElement}while(a&&!s);return[r,i]};var[Wi,Zi]=P([]),_d=e=>Wi().indexOf(e)===Wi().length-1,Kd=e=>{let t=$({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",allowPinchZoom:!1},e),n=me(),o=[0,0],a=null,r=null;I(()=>{Se(t.enabled)&&(Zi(l=>[...l,n]),T(()=>{Zi(l=>l.filter(u=>u!==n))}))}),I(()=>{if(!Se(t.enabled)||!Se(t.hideScrollbar))return;let{body:l}=document,u=window.innerWidth-l.offsetWidth;if(Mo({key:"prevent-scroll-overflow",element:l,style:{overflow:"hidden"}}),Se(t.preventScrollbarShift)){let d={},h=[];u>0&&(Se(t.preventScrollbarShiftMode)==="padding"?d.paddingRight=`calc(${window.getComputedStyle(l).paddingRight} + ${u}px)`:d.marginRight=`calc(${window.getComputedStyle(l).marginRight} + ${u}px)`,h.push({key:"--scrollbar-width",value:`${u}px`}));let y=window.scrollY,p=window.scrollX;Mo({key:"prevent-scroll-scrollbar",element:l,style:d,properties:h,cleanup:()=>{u>0&&window.scrollTo(p,y)}})}}),I(()=>{!_d(n)||!Se(t.enabled)||(document.addEventListener("wheel",s,{passive:!1}),document.addEventListener("touchstart",i,{passive:!1}),document.addEventListener("touchmove",c,{passive:!1}),T(()=>{document.removeEventListener("wheel",s),document.removeEventListener("touchstart",i),document.removeEventListener("touchmove",c)}))});let i=l=>{o=Xi(l),a=null,r=null},s=l=>{let u=l.target,d=Se(t.element),h=Gd(l),y=Math.abs(h[0])>Math.abs(h[1])?"x":"y",p=y==="x"?h[0]:h[1],m=Yi(u,y,p,d),x;d&&ga(d,u)?x=!m:x=!0,x&&l.cancelable&&l.preventDefault()},c=l=>{let u=Se(t.element),d=l.target,h;if(l.touches.length===2)h=!Se(t.allowPinchZoom);else{if(a==null||r===null){let y=Xi(l).map((m,x)=>o[x]-m),p=Math.abs(y[0])>Math.abs(y[1])?"x":"y";a=p,r=p==="x"?y[0]:y[1]}if(d.type==="range")h=!1;else{let y=Yi(d,a,r,u);u&&ga(u,d)?h=!y:h=!0}}h&&l.cancelable&&l.preventDefault()}},Gd=e=>[e.deltaX,e.deltaY],Xi=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],Yi=(e,t,n,o)=>{let a=o!==null&&ga(o,e),[r,i]=Gi(e,t,a?o:void 0);return!(n>0&&Math.abs(r)<=1||n<0&&Math.abs(i)<1)},ga=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},Wd=Kd,wo=Wd;var gy=F();var ls="kb-color-mode";function Zd(e){return{ssr:!1,type:"localStorage",get:t=>{if(X)return t;let n;try{n=localStorage.getItem(e)}catch{}return n??t},set:t=>{try{localStorage.setItem(e,t)}catch{}}}}var vy=Zd(ls);function Ji(e,t){return e.match(new RegExp(`(^| )${t}=([^;]+)`))?.[2]}function Xd(e,t){return{ssr:!!t,type:"cookie",get:n=>t?Ji(t,e)??n:X?n:Ji(document.cookie,e)??n,set:n=>{document.cookie=`${e}=${n}; max-age=31536000; path=/`}}}var My=Xd(ls);function Yd(e){let[t,n]=P(e.defaultValue?.()),o=O(()=>e.value?.()!==void 0),a=O(()=>o()?e.value?.():t());return[a,i=>{Q(()=>{let s=$t(i,a());return Object.is(s,a())||(o()||n(s),e.onChange?.(s)),s})}]}function Jd(e){let[t,n]=Yd(e);return[()=>t()??!1,n]}function Qd(e={}){let[t,n]=Jd({value:()=>Z(e.open),defaultValue:()=>!!Z(e.defaultOpen),onChange:i=>e.onOpenChange?.(i)}),o=()=>{n(!0)},a=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:o,close:a,toggle:()=>{t()?a():o()}}}function e2(e){let t=n=>{n.key===on.Escape&&e.onEscapeKeyDown?.(n)};I(()=>{if(X||Z(e.isDisabled))return;let n=e.ownerDocument?.()??ae();n.addEventListener("keydown",t),T(()=>{n.removeEventListener("keydown",t)})})}var Co="data-kb-top-layer",ds,xa=!1,Qe=[];function bn(e){return Qe.findIndex(t=>t.node===e)}function t2(e){return Qe[bn(e)]}function n2(e){return Qe[Qe.length-1].node===e}function us(){return Qe.filter(e=>e.isPointerBlocking)}function o2(){return[...us()].slice(-1)[0]}function Ca(){return us().length>0}function hs(e){let t=bn(o2()?.node);return bn(e)e.onMountAutoFocus?.(p),s=p=>e.onUnmountAutoFocus?.(p),c=()=>ae(t()),l=()=>{let p=c().createElement("span");return p.setAttribute("data-focus-trap",""),p.tabIndex=0,Object.assign(p.style,Zn),p},u=()=>{let p=t();return p?an(p,!0).filter(m=>!m.hasAttribute("data-focus-trap")):[]},d=()=>{let p=u();return p.length>0?p[0]:null},h=()=>{let p=u();return p.length>0?p[p.length-1]:null},y=()=>{let p=t();if(!p)return!1;let m=Re(p);return!m||J(p,m)?!1:rn(m)};I(()=>{if(X)return;let p=t();if(!p)return;es.add(a);let m=Re(p);if(!J(p,m)){let v=new CustomEvent(va,Qi);p.addEventListener(va,i),p.dispatchEvent(v),v.defaultPrevented||setTimeout(()=>{se(d()),Re(p)===m&&se(p)},0)}T(()=>{p.removeEventListener(va,i),setTimeout(()=>{let v=new CustomEvent(Ma,Qi);y()&&v.preventDefault(),p.addEventListener(Ma,s),p.dispatchEvent(v),v.defaultPrevented||se(m??c().body),p.removeEventListener(Ma,s),es.remove(a)},0)})}),I(()=>{if(X)return;let p=t();if(!p||!Z(e.trapFocus)||n())return;let m=v=>{let w=v.target;w?.closest(`[${Co}]`)||(J(p,w)?r=w:se(r))},x=v=>{let L=v.relatedTarget??Re(p);L?.closest(`[${Co}]`)||J(p,L)||se(r)};c().addEventListener("focusin",m),c().addEventListener("focusout",x),T(()=>{c().removeEventListener("focusin",m),c().removeEventListener("focusout",x)})}),I(()=>{if(X)return;let p=t();if(!p||!Z(e.trapFocus)||n())return;let m=l();p.insertAdjacentElement("afterbegin",m);let x=l();p.insertAdjacentElement("beforeend",x);function v(L){let A=d(),q=h();L.relatedTarget===A?se(q):se(A)}m.addEventListener("focusin",v),x.addEventListener("focusin",v);let w=new MutationObserver(L=>{for(let A of L)A.previousSibling===x&&(x.remove(),p.insertAdjacentElement("beforeend",x)),A.nextSibling===m&&(m.remove(),p.insertAdjacentElement("afterbegin",m))});w.observe(p,{childList:!0,subtree:!1}),T(()=>{m.removeEventListener("focusin",v),x.removeEventListener("focusin",v),m.remove(),x.remove(),w.disconnect()})})}var d2="data-live-announcer";function u2(e){I(()=>{Z(e.isDisabled)||T(h2(Z(e.targets),Z(e.root)))})}var Cn=new WeakMap,De=[];function h2(e,t=document.body){let n=new Set(e),o=new Set,a=c=>{for(let h of c.querySelectorAll(`[${d2}], [${Co}]`))n.add(h);let l=h=>{if(n.has(h)||h.parentElement&&o.has(h.parentElement)&&h.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let y of n)if(h.contains(y))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},u=document.createTreeWalker(c,NodeFilter.SHOW_ELEMENT,{acceptNode:l}),d=l(c);if(d===NodeFilter.FILTER_ACCEPT&&r(c),d!==NodeFilter.FILTER_REJECT){let h=u.nextNode();for(;h!=null;)r(h),h=u.nextNode()}},r=c=>{let l=Cn.get(c)??0;c.getAttribute("aria-hidden")==="true"&&l===0||(l===0&&c.setAttribute("aria-hidden","true"),o.add(c),Cn.set(c,l+1))};De.length&&De[De.length-1].disconnect(),a(t);let i=new MutationObserver(c=>{for(let l of c)if(!(l.type!=="childList"||l.addedNodes.length===0)&&![...n,...o].some(u=>u.contains(l.target))){for(let u of l.removedNodes)u instanceof Element&&(n.delete(u),o.delete(u));for(let u of l.addedNodes)(u instanceof HTMLElement||u instanceof SVGElement)&&(u.dataset.liveAnnouncer==="true"||u.dataset.reactAriaTopLayer==="true")?n.add(u):u instanceof Element&&a(u)}});i.observe(t,{childList:!0,subtree:!0});let s={observe(){i.observe(t,{childList:!0,subtree:!0})},disconnect(){i.disconnect()}};return De.push(s),()=>{i.disconnect();for(let c of o){let l=Cn.get(c);if(l==null)return;l===1?(c.removeAttribute("aria-hidden"),Cn.delete(c)):Cn.set(c,l-1)}s===De[De.length-1]?(De.pop(),De.length&&De[De.length-1].observe()):De.splice(De.indexOf(s),1)}}var ts="interactOutside.pointerDownOutside",ns="interactOutside.focusOutside";function p2(e,t){let n,o=Wn,a=()=>ae(t()),r=d=>e.onPointerDownOutside?.(d),i=d=>e.onFocusOutside?.(d),s=d=>e.onInteractOutside?.(d),c=d=>{let h=d.target;return!(h instanceof HTMLElement)||h.closest(`[${Co}]`)||!J(a(),h)||J(t(),h)?!1:!e.shouldExcludeElement?.(h)},l=d=>{function h(){let y=t(),p=d.target;if(!y||!p||!c(d))return;let m=Dt([r,s]);p.addEventListener(ts,m,{once:!0});let x=new CustomEvent(ts,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||Gn(d)&&d.button===0}});p.dispatchEvent(x)}d.pointerType==="touch"?(a().removeEventListener("click",h),o=h,a().addEventListener("click",h,{once:!0})):h()},u=d=>{let h=t(),y=d.target;if(!h||!y||!c(d))return;let p=Dt([i,s]);y.addEventListener(ns,p,{once:!0});let m=new CustomEvent(ns,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});y.dispatchEvent(m)};I(()=>{X||Z(e.isDisabled)||(n=window.setTimeout(()=>{a().addEventListener("pointerdown",l,!0)},0),a().addEventListener("focusin",u,!0),T(()=>{window.clearTimeout(n),a().removeEventListener("click",o),a().removeEventListener("pointerdown",l,!0),a().removeEventListener("focusin",u,!0)}))})}function os(e){let[t,n]=P(),o={},a=e(),r="none",[i,s]=y2(e()?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return I(Oe(i,c=>{let l=xo(o);r=c==="mounted"?l:"none"})),I(Oe(e,c=>{if(a===c)return;let l=xo(o);c?s("MOUNT"):o?.display==="none"?s("UNMOUNT"):s(a&&r!==l?"ANIMATION_OUT":"UNMOUNT"),a=c})),I(Oe(t,c=>{if(c){let l=d=>{let y=xo(o).includes(d.animationName);d.target===c&&y&&s("ANIMATION_END")},u=d=>{d.target===c&&(r=xo(o))};c.addEventListener("animationstart",u),c.addEventListener("animationcancel",l),c.addEventListener("animationend",l),T(()=>{c.removeEventListener("animationstart",u),c.removeEventListener("animationcancel",l),c.removeEventListener("animationend",l)})}else s("ANIMATION_END")})),{isPresent:()=>["mounted","unmountSuspended"].includes(i()),setRef:c=>{c&&(o=getComputedStyle(c)),n(c)}}}function xo(e){return e?.animationName||"none"}function y2(e,t){let n=(i,s)=>t[i][s]??i,[o,a]=P(e);return[o,i=>{a(s=>n(s,i))}]}function wa(e){return t=>(e(t),()=>e(void 0))}function f2(e,t){let[n,o]=P(as(t?.()));return I(()=>{o(e()?.tagName.toLowerCase()||as(t?.()))}),n}function as(e){return Kn(e)?e:void 0}var wy=F();function Sn(e){let[t,n]=B(e,["asChild","as","children"]);if(!t.asChild)return f(tt,$({get component(){return t.as}},n,{get children(){return t.children}}));let o=Vn(()=>t.children);if(rs(o())){let a=is(n,o()?.props??{});return f(tt,a)}if(nr(o())){let a=o().find(rs);if(a){let r=()=>f(Me,{get each(){return o()},children:s=>f(G,{when:s===a,fallback:s,get children(){return a.props.children}})}),i=is(n,a?.props??{});return f(tt,$(i,{children:r}))}}throw new Error("[kobalte]: Component is expected to render `asChild` but no children `As` component was found.")}var k2=Symbol("$$KobalteAsComponent");function rs(e){return e?.[k2]===!0}function is(e,t){return Vo([e,t],{reverseEventHandlers:!0})}var m2=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),g2=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function v2(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize().script??"";return m2.has(n)}let t=e.split("-")[0];return g2.has(t)}function M2(e){return v2(e)?"rtl":"ltr"}function w2(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:M2(e)}}var xy=w2();var Cy=F();var[by,Sy]=_t({toasts:[]});var Ly=F();var x2=["button","color","file","image","reset","submit"];function C2(e){let t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?x2.indexOf(e.type)!==-1:!1}function ps(e){let t,n=re({type:"button"},e),[o,a]=B(n,["ref","type","disabled"]),r=f2(()=>t,()=>"button"),i=O(()=>{let l=r();return l==null?!1:C2({tagName:l,type:o.type})}),s=O(()=>r()==="input"),c=O(()=>r()==="a"&&t?.getAttribute("href")!=null);return f(Sn,$({as:"button",ref(l){let u=oe(d=>t=d,o.ref);typeof u=="function"&&u(l)},get type(){return i()||s()?o.type:void 0},get role(){return!i()&&!c()?"button":void 0},get tabIndex(){return!i()&&!c()&&!o.disabled?0:void 0},get disabled(){return i()||s()?o.disabled:void 0},get"aria-disabled"(){return!i()&&!s()&&o.disabled?!0:void 0},get"data-disabled"(){return o.disabled?"":void 0}},a))}var Ny=F();var $y=F();var Iy=F();var ys=F();function gt(){let e=ue(ys);if(e===void 0)throw new Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return e}function b2(e){let t=gt(),[n,o]=B(e,["aria-label","onClick"]);return f(ps,$({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:r=>{ke(r,n.onClick),t.close()}},o))}var fs=F();function S2(){return ue(fs)}function L2(e){let t,n=S2(),[o,a]=B(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),r=new Set([]),i=d=>{r.add(d);let h=n?.registerNestedLayer(d);return()=>{r.delete(d),h?.()}};p2({shouldExcludeElement:d=>t?o.excludedElements?.some(h=>J(h(),d))||[...r].some(h=>J(h,d)):!1,onPointerDownOutside:d=>{!t||$e.isBelowPointerBlockingLayer(t)||!o.bypassTopMostLayerCheck&&!$e.isTopMostLayer(t)||(o.onPointerDownOutside?.(d),o.onInteractOutside?.(d),d.defaultPrevented||o.onDismiss?.())},onFocusOutside:d=>{o.onFocusOutside?.(d),o.onInteractOutside?.(d),d.defaultPrevented||o.onDismiss?.()}},()=>t),e2({ownerDocument:()=>ae(t),onEscapeKeyDown:d=>{!t||!$e.isTopMostLayer(t)||(o.onEscapeKeyDown?.(d),!d.defaultPrevented&&o.onDismiss&&(d.preventDefault(),o.onDismiss()))}}),pe(()=>{if(!t)return;$e.addLayer({node:t,isPointerBlocking:o.disableOutsidePointerEvents,dismiss:o.onDismiss});let d=n?.registerNestedLayer(t);$e.assignPointerEventToLayers(),$e.disableBodyPointerEvents(t),T(()=>{t&&($e.removeLayer(t),d?.(),$e.assignPointerEventToLayers(),$e.restoreBodyPointerEvents(t))})}),I(Oe([()=>t,()=>o.disableOutsidePointerEvents],([d,h])=>{if(!d)return;let y=$e.find(d);y&&y.isPointerBlocking!==h&&(y.isPointerBlocking=h,$e.assignPointerEventToLayers()),h&&$e.disableBodyPointerEvents(d),T(()=>{$e.restoreBodyPointerEvents(d)})},{defer:!0}));let u={registerNestedLayer:i};return f(fs.Provider,{value:u,get children(){return f(Sn,$({as:"div",ref(d){let h=oe(y=>t=y,o.ref);typeof h=="function"&&h(d)}},a))}})}function N2(e){let t,n=gt(),o=re({id:n.generateId("content")},e),[a,r]=B(o,["ref","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]),i=!1,s=!1,c=h=>{a.onPointerDownOutside?.(h),n.modal()&&h.detail.isContextMenu&&h.preventDefault()},l=h=>{a.onFocusOutside?.(h),n.modal()&&h.preventDefault()},u=h=>{a.onInteractOutside?.(h),!n.modal()&&(h.defaultPrevented||(i=!0,h.detail.originalEvent.type==="pointerdown"&&(s=!0)),J(n.triggerRef(),h.target)&&h.preventDefault(),h.detail.originalEvent.type==="focusin"&&s&&h.preventDefault())},d=h=>{a.onCloseAutoFocus?.(h),n.modal()?(h.preventDefault(),se(n.triggerRef())):(h.defaultPrevented||(i||se(n.triggerRef()),h.preventDefault()),i=!1,s=!1)};return u2({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>t?[t]:[]}),wo({element:()=>t??null,enabled:()=>n.isOpen()&&n.preventScroll()}),l2({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:a.onOpenAutoFocus,onUnmountAutoFocus:d},()=>t),I(()=>T(n.registerContentId(r.id))),f(G,{get when(){return n.contentPresence.isPresent()},get children(){return f(L2,$({ref(h){let y=oe(p=>{n.contentPresence.setRef(p),t=p},a.ref);typeof y=="function"&&y(h)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return O(()=>!!n.modal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},get"data-expanded"(){return n.isOpen()?"":void 0},get"data-closed"(){return n.isOpen()?void 0:""},onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,get onDismiss(){return n.close}},r))}})}function $2(e){let t=gt(),n=re({id:t.generateId("description")},e),[o,a]=B(n,["id"]);return I(()=>T(t.registerDescriptionId(o.id))),f(Sn,$({as:"p",get id(){return o.id}},a))}function I2(e){let t=gt(),[n,o]=B(e,["ref","style","onPointerDown"]),a=r=>{ke(r,n.onPointerDown),r.target===r.currentTarget&&r.preventDefault()};return f(G,{get when(){return t.overlayPresence.isPresent()},get children(){return f(Sn,$({as:"div",ref(r){let i=oe(t.overlayPresence.setRef,n.ref);typeof i=="function"&&i(r)},get style(){return{"pointer-events":"auto",...n.style}},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onPointerDown:a},o))}})}function P2(e){let t=gt();return f(G,{get when(){return t.contentPresence.isPresent()||t.overlayPresence.isPresent()},get children(){return f(Lt,e)}})}var ss={dismiss:"Dismiss"};function D2(e){let t=`dialog-${me()}`,n=re({id:t,modal:!0,translations:ss},e),[o,a]=P(),[r,i]=P(),[s,c]=P(),[l,u]=P(),d=Qd({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:x=>n.onOpenChange?.(x)}),h=()=>n.forceMount||d.isOpen(),y=os(h),p=os(h),m={translations:()=>n.translations??ss,isOpen:d.isOpen,modal:()=>n.modal??!0,preventScroll:()=>n.preventScroll??m.modal(),contentId:o,titleId:r,descriptionId:s,triggerRef:l,overlayPresence:y,contentPresence:p,close:d.close,toggle:d.toggle,setTriggerRef:u,generateId:Pt(()=>n.id),registerContentId:wa(a),registerTitleId:wa(i),registerDescriptionId:wa(c)};return f(ys.Provider,{value:m,get children(){return n.children}})}function A2(e){let t=gt(),n=re({id:t.generateId("title")},e),[o,a]=B(n,["id"]);return I(()=>T(t.registerTitleId(o.id))),f(Sn,$({as:"h2",get id(){return o.id}},a))}function T2(e){let t=gt(),[n,o]=B(e,["ref","onClick"]);return f(ps,$({ref(r){let i=oe(t.setTriggerRef,n.ref);typeof i=="function"&&i(r)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return O(()=>!!t.isOpen())()?t.contentId():void 0},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onClick:r=>{ke(r,n.onClick),t.toggle()}},o))}var Ln=Object.freeze({__proto__:null,CloseButton:b2,Content:N2,Description:$2,Overlay:I2,Portal:P2,Root:D2,Title:A2,Trigger:T2});var Py=F();var Dy=F();var Ay=F();var Ty=F();var Fy=F();var Oy=F();var F2=30,Ry=F2/2;var qy=F();var Vy=F();var By=F();var Ey=F();var Hy=F();var zy=F();var jy=F();var Uy=F();var _y=F();var cs=["Enter"," "],Ky={ltr:[...cs,"ArrowRight"],rtl:[...cs,"ArrowLeft"]};var Gy=F();var Wy=F();var Zy=F();var Xy=F();var Yy=F();var Jy=F();var Qy=F();var ef=F();var tf=F();var nf=F();var of=F();var af=F();var rf=F();var sf=F();var cf=F();var lf=F();var df=F();var uf=F();var hf=F();jn(["focusin","focusout","pointermove"]);jn(["keydown","pointerdown","pointermove","pointerup"]);var pf=F();function ba(e){return ks(e,new Set),e}function ks(e,t){let n,o;if(e!=null&&typeof e=="object"&&!t.has(e)&&((n=Array.isArray(e))||e[fe]||!(o=Object.getPrototypeOf(e))||o===Object.prototype)){t.add(e);for(let a of n?e:Object.values(e))ks(a,t)}}var O2=z('