beanstalkd-dashboard 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,173 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var kn,G,Ua,At,ys,Ba,qa,Wa,yi,ko,Fo,Ka,Mn={},Qa=[],Tf=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Fn=Array.isArray;function We(e,t){for(var n in t)e[n]=t[n];return e}function _i(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function te(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?kn.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Cn(e,s,r,o,null)}function Cn(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Ua,__i:-1,__u:0};return o==null&&G.vnode!=null&&G.vnode(i),i}function Ya(){return{current:null}}function ge(e){return e.children}function $e(e,t){this.props=e,this.context=t}function rn(e,t){if(t==null)return e.__?rn(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?rn(e):null}function Xa(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Xa(e)}}function $o(e){(!e.__d&&(e.__d=!0)&&At.push(e)&&!hr.__r++||ys!=G.debounceRendering)&&((ys=G.debounceRendering)||Ba)(hr)}function hr(){for(var e,t,n,r,o,i,s,a=1;At.length;)At.length>a&&At.sort(qa),e=At.shift(),a=At.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,i=[],s=[],t.__P&&((n=We({},r)).__v=r.__v+1,G.vnode&&G.vnode(n),bi(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,i,o??rn(r),!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,el(i,n,s),n.__e!=o&&Xa(n)));hr.__r=0}function Ja(e,t,n,r,o,i,s,a,l,c,d){var u,g,h,m,p,v,y=r&&r.__k||Qa,_=t.length;for(l=Nf(n,t,y,l,_),u=0;u<_;u++)(h=n.__k[u])!=null&&(g=h.__i==-1?Mn:y[h.__i]||Mn,h.__i=u,v=bi(e,h,g,o,i,s,a,l,c,d),m=h.__e,h.ref&&g.ref!=h.ref&&(g.ref&&wi(g.ref,null,h),d.push(h.ref,h.__c||m,h)),p==null&&m!=null&&(p=m),4&h.__u||g.__k===h.__k?l=Za(h,l,e):typeof h.type=="function"&&v!==void 0?l=v:m&&(l=m.nextSibling),h.__u&=-7);return n.__e=p,l}function Nf(e,t,n,r,o){var i,s,a,l,c,d=n.length,u=d,g=0;for(e.__k=new Array(o),i=0;i<o;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(l=i+g,(s=e.__k[i]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?Cn(null,s,null,null,null):Fn(s)?Cn(ge,{children:s},null,null,null):s.constructor==null&&s.__b>0?Cn(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=e,s.__b=e.__b+1,a=null,(c=s.__i=Df(s,n,l,u))!=-1&&(u--,(a=n[c])&&(a.__u|=2)),a==null||a.__v==null?(c==-1&&(o>d?g--:o<d&&g++),typeof s.type!="function"&&(s.__u|=4)):c!=l&&(c==l-1?g--:c==l+1?g++:(c>l?g--:g++,s.__u|=4))):e.__k[i]=null;if(u)for(i=0;i<d;i++)(a=n[i])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=rn(a)),nl(a,a));return r}function Za(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=Za(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=rn(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Qe(e,t){return t=t||[],e==null||typeof e=="boolean"||(Fn(e)?e.some(function(n){Qe(n,t)}):t.push(e)),t}function Df(e,t,n,r){var o,i,s,a=e.key,l=e.type,c=t[n],d=c!=null&&(2&c.__u)==0;if(c===null&&e.key==null||d&&a==c.key&&l==c.type)return n;if(r>(d?1:0)){for(o=n-1,i=n+1;o>=0||i<t.length;)if((c=t[s=o>=0?o--:i++])!=null&&(2&c.__u)==0&&a==c.key&&l==c.type)return s}return-1}function _s(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Tf.test(t)?n:n+"px"}function Bn(e,t,n,r,o){var i,s;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||_s(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||_s(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Wa,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=yi,e.addEventListener(t,i?Fo:ko,i)):e.removeEventListener(t,i?Fo:ko,i);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function bs(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=yi++;else if(t.t<n.u)return;return n(G.event?G.event(t):t)}}}function bi(e,t,n,r,o,i,s,a,l,c){var d,u,g,h,m,p,v,y,_,b,w,S,O,C,x,I,D,$=t.type;if(t.constructor!=null)return null;128&n.__u&&(l=!!(32&n.__u),i=[a=t.__e=n.__e]),(d=G.__b)&&d(t);e:if(typeof $=="function")try{if(y=t.props,_="prototype"in $&&$.prototype.render,b=(d=$.contextType)&&r[d.__c],w=d?b?b.props.value:d.__:r,n.__c?v=(u=t.__c=n.__c).__=u.__E:(_?t.__c=u=new $(y,w):(t.__c=u=new $e(y,w),u.constructor=$,u.render=Ff),b&&b.sub(u),u.props=y,u.state||(u.state={}),u.context=w,u.__n=r,g=u.__d=!0,u.__h=[],u._sb=[]),_&&u.__s==null&&(u.__s=u.state),_&&$.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=We({},u.__s)),We(u.__s,$.getDerivedStateFromProps(y,u.__s))),h=u.props,m=u.state,u.__v=t,g)_&&$.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),_&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(_&&$.getDerivedStateFromProps==null&&y!==h&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(y,w),!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(y,u.__s,w)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(u.props=y,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(U){U&&(U.__=t)}),S=0;S<u._sb.length;S++)u.__h.push(u._sb[S]);u._sb=[],u.__h.length&&s.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(y,u.__s,w),_&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(h,m,p)})}if(u.context=w,u.props=y,u.__P=e,u.__e=!1,O=G.__r,C=0,_){for(u.state=u.__s,u.__d=!1,O&&O(t),d=u.render(u.props,u.state,u.context),x=0;x<u._sb.length;x++)u.__h.push(u._sb[x]);u._sb=[]}else do u.__d=!1,O&&O(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++C<25);u.state=u.__s,u.getChildContext!=null&&(r=We(We({},r),u.getChildContext())),_&&!g&&u.getSnapshotBeforeUpdate!=null&&(p=u.getSnapshotBeforeUpdate(h,m)),I=d,d!=null&&d.type===ge&&d.key==null&&(I=tl(d.props.children)),a=Ja(e,Fn(I)?I:[I],t,n,r,o,i,s,a,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&s.push(u),v&&(u.__E=u.__=null)}catch(U){if(t.__v=null,l||i!=null)if(U.then){for(t.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;i[i.indexOf(a)]=null,t.__e=a}else{for(D=i.length;D--;)_i(i[D]);Lo(t)}else t.__e=n.__e,t.__k=n.__k,U.then||Lo(t);G.__e(U,t,n)}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=kf(n.__e,t,n,r,o,i,s,l,c);return(d=G.diffed)&&d(t),128&t.__u?void 0:a}function Lo(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(Lo)}function el(e,t,n){for(var r=0;r<n.length;r++)wi(n[r],n[++r],n[++r]);G.__c&&G.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){G.__e(i,o.__v)}})}function tl(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Fn(e)?e.map(tl):We({},e)}function kf(e,t,n,r,o,i,s,a,l){var c,d,u,g,h,m,p,v=n.props,y=t.props,_=t.type;if(_=="svg"?o="http://www.w3.org/2000/svg":_=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c<i.length;c++)if((h=i[c])&&"setAttribute"in h==!!_&&(_?h.localName==_:h.nodeType==3)){e=h,i[c]=null;break}}if(e==null){if(_==null)return document.createTextNode(y);e=document.createElementNS(o,_,y.is&&y),a&&(G.__m&&G.__m(t,i),a=!1),i=null}if(_==null)v===y||a&&e.data==y||(e.data=y);else{if(i=i&&kn.call(e.childNodes),v=n.props||Mn,!a&&i!=null)for(v={},c=0;c<e.attributes.length;c++)v[(h=e.attributes[c]).name]=h.value;for(c in v)if(h=v[c],c!="children"){if(c=="dangerouslySetInnerHTML")u=h;else if(!(c in y)){if(c=="value"&&"defaultValue"in y||c=="checked"&&"defaultChecked"in y)continue;Bn(e,c,null,h,o)}}for(c in y)h=y[c],c=="children"?g=h:c=="dangerouslySetInnerHTML"?d=h:c=="value"?m=h:c=="checked"?p=h:a&&typeof h!="function"||v[c]===h||Bn(e,c,h,v[c],o);if(d)a||u&&(d.__html==u.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),Ja(t.type=="template"?e.content:e,Fn(g)?g:[g],t,n,r,_=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:n.__k&&rn(n,0),a,l),i!=null)for(c=i.length;c--;)_i(i[c]);a||(c="value",_=="progress"&&m==null?e.removeAttribute("value"):m!=null&&(m!==e[c]||_=="progress"&&!m||_=="option"&&m!=v[c])&&Bn(e,c,m,v[c],o),c="checked",p!=null&&p!=e[c]&&Bn(e,c,p,v[c],o))}return e}function wi(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){G.__e(o,n)}}function nl(e,t,n){var r,o;if(G.unmount&&G.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||wi(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){G.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&nl(r[o],t,n||typeof e.type!="function");n||_i(e.__e),e.__c=e.__=e.__e=void 0}function Ff(e,t,n){return this.constructor(e,n)}function on(e,t,n){var r,o,i,s;t==document&&(t=document.documentElement),G.__&&G.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],bi(t,e=(!r&&n||t).__k=te(ge,null,[e]),o||Mn,Mn,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?kn.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),el(i,e,s)}function rl(e,t){on(e,t,rl)}function jo(e,t,n){var r,o,i,s,a=We({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:a[i]=t[i]===void 0&&s!=null?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?kn.call(arguments,2):n),Cn(e.type,a,r||e.key,o||e.ref,null)}function Ee(e){function t(n){var r,o;return this.getChildContext||(r=new Set,(o={})[t.__c]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(i){this.props.value!=i.value&&r.forEach(function(s){s.__e=!0,$o(s)})},this.sub=function(i){r.add(i);var s=i.componentWillUnmount;i.componentWillUnmount=function(){r&&r.delete(i),s&&s.call(i)}}),n.children}return t.__c="__cC"+Ka++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,r){return n.children(r)}).contextType=t,t}kn=Qa.slice,G={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},Ua=0,$e.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=We({},this.state),typeof e=="function"&&(e=e(We({},n),this.props)),e&&We(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),$o(this))},$e.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),$o(this))},$e.prototype.render=ge,At=[],Ba=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,qa=function(e,t){return e.__v.__b-t.__v.__b},hr.__r=0,Wa=/(PointerCapture)$|Capture$/i,yi=0,ko=bs(!1),Fo=bs(!0),Ka=0;var $f=0;function f(e,t,n,r,o,i){t||(t={});var s,a,l=t;if("ref"in l)for(a in l={},t)a=="ref"?s=t[a]:l[a]=t[a];var c={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--$f,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return G.vnode&&G.vnode(c),c}var cn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Nt=typeof window>"u"||"Deno"in globalThis;function Ce(){}function Lf(e,t){return typeof e=="function"?e(t):e}function Vo(e){return typeof e=="number"&&e>=0&&e!==1/0}function ol(e,t){return Math.max(e+(t||0)-Date.now(),0)}function mt(e,t){return typeof e=="function"?e(t):e}function De(e,t){return typeof e=="function"?e(t):e}function ws(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==xi(s,t.options))return!1}else if(!In(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||i&&!i(t))}function xs(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Dt(t.options.mutationKey)!==Dt(i))return!1}else if(!In(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function xi(e,t){return(t?.queryKeyHashFn||Dt)(e)}function Dt(e){return JSON.stringify(e,(t,n)=>Ho(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function In(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>In(e[n],t[n])):!1}function il(e,t){if(e===t)return e;const n=Ss(e)&&Ss(t);if(n||Ho(e)&&Ho(t)){const r=n?e:Object.keys(e),o=r.length,i=n?t:Object.keys(t),s=i.length,a=n?[]:{},l=new Set(r);let c=0;for(let d=0;d<s;d++){const u=n?d:i[d];(!n&&l.has(u)||n)&&e[u]===void 0&&t[u]===void 0?(a[u]=void 0,c++):(a[u]=il(e[u],t[u]),a[u]===e[u]&&e[u]!==void 0&&c++)}return o===s&&c===o?e:a}return t}function gr(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Ss(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ho(e){if(!Cs(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Cs(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Cs(e){return Object.prototype.toString.call(e)==="[object Object]"}function jf(e){return new Promise(t=>{setTimeout(t,e)})}function zo(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?il(e,t):t}function Vf(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Hf(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var it=Symbol();function sl(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===it?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function al(e,t){return typeof e=="function"?e(...t):!!e}var zf=class extends cn{#t;#e;#n;constructor(){super(),this.#n=e=>{if(!Nt&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Si=new zf,Gf=class extends cn{#t=!0;#e;#n;constructor(){super(),this.#n=e=>{if(!Nt&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#t}},mr=new Gf;function Go(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function Uf(e){return Math.min(1e3*2**e,3e4)}function ll(e){return(e??"online")==="online"?mr.isOnline():!0}var cl=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function ul(e){let t=!1,n=0,r;const o=Go(),i=()=>o.status!=="pending",s=p=>{i()||(g(new cl(p)),e.abort?.())},a=()=>{t=!0},l=()=>{t=!1},c=()=>Si.isFocused()&&(e.networkMode==="always"||mr.isOnline())&&e.canRun(),d=()=>ll(e.networkMode)&&e.canRun(),u=p=>{i()||(r?.(),o.resolve(p))},g=p=>{i()||(r?.(),o.reject(p))},h=()=>new Promise(p=>{r=v=>{(i()||c())&&p(v)},e.onPause?.()}).then(()=>{r=void 0,i()||e.onContinue?.()}),m=()=>{if(i())return;let p;const v=n===0?e.initialPromise:void 0;try{p=v??e.fn()}catch(y){p=Promise.reject(y)}Promise.resolve(p).then(u).catch(y=>{if(i())return;const _=e.retry??(Nt?0:3),b=e.retryDelay??Uf,w=typeof b=="function"?b(n,y):b,S=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,y);if(t||!S){g(y);return}n++,e.onFail?.(n,y),jf(w).then(()=>c()?void 0:h()).then(()=>{t?g(y):m()})})};return{promise:o,status:()=>o.status,cancel:s,continue:()=>(r?.(),o),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?m():h().then(m),o)}}var Bf=e=>setTimeout(e,0);function qf(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=Bf;const i=a=>{t?e.push(a):o(()=>{n(a)})},s=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||s()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var ve=qf(),dl=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Vo(this.gcTime)&&(this.#t=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Nt?1/0:300*1e3))}clearGcTimeout(){this.#t&&(clearTimeout(this.#t),this.#t=void 0)}},Wf=class extends dl{#t;#e;#n;#r;#o;#s;#a;constructor(e){super(),this.#a=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Kf(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#o?.promise}setOptions(e){this.options={...this.#s,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=zo(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#o?.promise;return this.#o?.cancel(e),t?t.then(Ce).catch(Ce):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(e=>De(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===it||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>mt(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!ol(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#o?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#o?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#o&&(this.#a?this.#o.cancel({revert:!0}):this.#o.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#o?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#o)return this.#o.continueRetry(),this.#o.promise}if(e&&this.setOptions(e),!this.options.queryFn){const a=this.observers.find(l=>l.options.queryFn);a&&this.setOptions(a.options)}const n=new AbortController,r=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},o=()=>{const a=sl(this.options,t),c=(()=>{const d={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(d),d})();return this.#a=!1,this.options.persister?this.options.persister(a,c,this):a(c)},s=(()=>{const a={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:o};return r(a),a})();this.options.behavior?.onFetch(s,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==s.fetchOptions?.meta)&&this.#i({type:"fetch",meta:s.fetchOptions?.meta}),this.#o=ul({initialPromise:t?.initialPromise,fn:s.fetchFn,abort:n.abort.bind(n),onFail:(a,l)=>{this.#i({type:"failed",failureCount:a,error:l})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0});try{const a=await this.#o.start();if(a===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(a),this.#n.config.onSuccess?.(a,this),this.#n.config.onSettled?.(a,this.state.error,this),a}catch(a){if(a instanceof cl){if(a.silent)return this.#o.promise;if(a.revert)return this.setState({...this.#e,fetchStatus:"idle"}),this.state.data}throw this.#i({type:"error",error:a}),this.#n.config.onError?.(a,this),this.#n.config.onSettled?.(this.state.data,a,this),a}finally{this.scheduleGc()}}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...fl(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=e.manual?r:void 0,r;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),ve.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function fl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ll(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Kf(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Qf=class extends cn{constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,t,n){const r=t.queryKey,o=t.queryHash??xi(r,t);let i=this.get(o);return i||(i=new Wf({client:e,queryKey:r,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(i)),i}add(e){this.#t.has(e.queryHash)||(this.#t.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#t.get(e.queryHash);t&&(e.destroy(),t===e&&this.#t.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ve.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#t.get(e)}getAll(){return[...this.#t.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>ws(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>ws(e,n)):t}notify(e){ve.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ve.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ve.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Yf=class extends dl{#t;#e;#n;constructor(e){super(),this.mutationId=e.mutationId,this.#e=e.mutationCache,this.#t=[],this.state=e.state||pl(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#e.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#e.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#e.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})};this.#n=ul({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(o,i)=>{this.#r({type:"failed",failureCount:o,error:i})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#e.canRun(this)});const n=this.state.status==="pending",r=!this.#n.canStart();try{if(n)t();else{this.#r({type:"pending",variables:e,isPaused:r}),await this.#e.config.onMutate?.(e,this);const i=await this.options.onMutate?.(e);i!==this.state.context&&this.#r({type:"pending",context:i,variables:e,isPaused:r})}const o=await this.#n.start();return await this.#e.config.onSuccess?.(o,e,this.state.context,this),await this.options.onSuccess?.(o,e,this.state.context),await this.#e.config.onSettled?.(o,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(o,null,e,this.state.context),this.#r({type:"success",data:o}),o}catch(o){try{throw await this.#e.config.onError?.(o,e,this.state.context,this),await this.options.onError?.(o,e,this.state.context),await this.#e.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,o,e,this.state.context),o}finally{this.#r({type:"error",error:o})}}finally{this.#e.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),ve.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#e.notify({mutation:this,type:"updated",action:e})})}};function pl(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Xf=class extends cn{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#e=new Map,this.#n=0}#t;#e;#n;build(e,t,n){const r=new Yf({mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#t.add(e);const t=qn(e);if(typeof t=="string"){const n=this.#e.get(t);n?n.push(e):this.#e.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){const t=qn(e);if(typeof t=="string"){const n=this.#e.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#e.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=qn(e);if(typeof t=="string"){const r=this.#e.get(t)?.find(o=>o.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=qn(e);return typeof t=="string"?this.#e.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){ve.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>xs(t,n))}findAll(e={}){return this.getAll().filter(t=>xs(e,t))}notify(e){ve.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return ve.batch(()=>Promise.all(e.map(t=>t.continue().catch(Ce))))}};function qn(e){return e.options.scope?.id}function Ps(e){return{onFetch:(t,n)=>{const r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],s=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let d=!1;const u=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(t.signal.aborted?d=!0:t.signal.addEventListener("abort",()=>{d=!0}),t.signal)})},g=sl(t.options,t.fetchOptions),h=async(m,p,v)=>{if(d)return Promise.reject();if(p==null&&m.pages.length)return Promise.resolve(m);const _=(()=>{const O={client:t.client,queryKey:t.queryKey,pageParam:p,direction:v?"backward":"forward",meta:t.options.meta};return u(O),O})(),b=await g(_),{maxPages:w}=t.options,S=v?Hf:Vf;return{pages:S(m.pages,b,w),pageParams:S(m.pageParams,p,w)}};if(o&&i.length){const m=o==="backward",p=m?Jf:Rs,v={pages:i,pageParams:s},y=p(r,v);a=await h(v,y,m)}else{const m=e??i.length;do{const p=l===0?s[0]??r.initialPageParam:Rs(r,a);if(l>0&&p==null)break;a=await h(a,p),l++}while(l<m)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=c}}}function Rs(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Jf(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Zf=class{#t;#e;#n;#r;#o;#s;#a;#i;constructor(e={}){this.#t=e.queryCache||new Qf,this.#e=e.mutationCache||new Xf,this.#n=e.defaultOptions||{},this.#r=new Map,this.#o=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=Si.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#i=mr.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#a?.(),this.#a=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#t.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#e.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#t.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(mt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#t.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=this.#t.get(r.queryHash)?.state.data,s=Lf(t,i);if(s!==void 0)return this.#t.build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return ve.batch(()=>this.#t.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state}removeQueries(e){const t=this.#t;ve.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#t;return ve.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ve.batch(()=>this.#t.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Ce).catch(Ce)}invalidateQueries(e,t={}){return ve.batch(()=>(this.#t.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ve.batch(()=>this.#t.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(Ce)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Ce)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#t.build(this,t);return n.isStaleByTime(mt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ce).catch(Ce)}fetchInfiniteQuery(e){return e.behavior=Ps(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ce).catch(Ce)}ensureInfiniteQueryData(e){return e.behavior=Ps(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return mr.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Dt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{In(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#o.set(Dt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{In(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=xi(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===it&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},ep=class extends cn{constructor(e,t){super(),this.options=t,this.#t=e,this.#i=null,this.#a=Go(),this.options.experimental_prefetchInRender||this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#t;#e=void 0;#n=void 0;#r=void 0;#o;#s;#a;#i;#g;#f;#p;#c;#u;#l;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),Es(this.#e,this.options)?this.#d():this.updateResult(),this.#_())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Uo(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Uo(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#w(),this.#e.removeObserver(this)}setOptions(e){const t=this.options,n=this.#e;if(this.options=this.#t.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof De(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#x(),this.#e.setOptions(this.options),t._defaulted&&!gr(this.options,t)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const r=this.hasListeners();r&&Os(this.#e,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#e!==n||De(this.options.enabled,this.#e)!==De(t.enabled,this.#e)||mt(this.options.staleTime,this.#e)!==mt(t.staleTime,this.#e))&&this.#m();const o=this.#v();r&&(this.#e!==n||De(this.options.enabled,this.#e)!==De(t.enabled,this.#e)||o!==this.#l)&&this.#y(o)}getOptimisticResult(e){const t=this.#t.getQueryCache().build(this.#t,e),n=this.createResult(t,e);return np(this,n)&&(this.#r=n,this.#s=this.options,this.#o=this.#e.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),Reflect.get(n,r))})}trackProp(e){this.#h.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#t.defaultQueryOptions(e),n=this.#t.getQueryCache().build(this.#t,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#d(e){this.#x();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Ce)),t}#m(){this.#b();const e=mt(this.options.staleTime,this.#e);if(Nt||this.#r.isStale||!Vo(e))return;const n=ol(this.#r.dataUpdatedAt,e)+1;this.#c=setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#l=e,!(Nt||De(this.options.enabled,this.#e)===!1||!Vo(this.#l)||this.#l===0)&&(this.#u=setInterval(()=>{(this.options.refetchIntervalInBackground||Si.isFocused())&&this.#d()},this.#l))}#_(){this.#m(),this.#y(this.#v())}#b(){this.#c&&(clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#e,r=this.options,o=this.#r,i=this.#o,s=this.#s,l=e!==n?e.state:this.#n,{state:c}=e;let d={...c},u=!1,g;if(t._optimisticResults){const x=this.hasListeners(),I=!x&&Es(e,t),D=x&&Os(e,n,t,r);(I||D)&&(d={...d,...fl(c.data,e.options)}),t._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:h,errorUpdatedAt:m,status:p}=d;g=d.data;let v=!1;if(t.placeholderData!==void 0&&g===void 0&&p==="pending"){let x;o?.isPlaceholderData&&t.placeholderData===s?.placeholderData?(x=o.data,v=!0):x=typeof t.placeholderData=="function"?t.placeholderData(this.#p?.state.data,this.#p):t.placeholderData,x!==void 0&&(p="success",g=zo(o?.data,x,t),u=!0)}if(t.select&&g!==void 0&&!v)if(o&&g===i?.data&&t.select===this.#g)g=this.#f;else try{this.#g=t.select,g=t.select(g),g=zo(o?.data,g,t),this.#f=g,this.#i=null}catch(x){this.#i=x}this.#i&&(h=this.#i,g=this.#f,m=Date.now(),p="error");const y=d.fetchStatus==="fetching",_=p==="pending",b=p==="error",w=_&&y,S=g!==void 0,C={status:p,fetchStatus:d.fetchStatus,isPending:_,isSuccess:p==="success",isError:b,isInitialLoading:w,isLoading:w,data:g,dataUpdatedAt:d.dataUpdatedAt,error:h,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:y,isRefetching:y&&!_,isLoadingError:b&&!S,isPaused:d.fetchStatus==="paused",isPlaceholderData:u,isRefetchError:b&&S,isStale:Ci(e,t),refetch:this.refetch,promise:this.#a,isEnabled:De(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const x=$=>{C.status==="error"?$.reject(C.error):C.data!==void 0&&$.resolve(C.data)},I=()=>{const $=this.#a=C.promise=Go();x($)},D=this.#a;switch(D.status){case"pending":e.queryHash===n.queryHash&&x(D);break;case"fulfilled":(C.status==="error"||C.data!==D.value)&&I();break;case"rejected":(C.status!=="error"||C.error!==D.reason)&&I();break}}return C}updateResult(){const e=this.#r,t=this.createResult(this.#e,this.options);if(this.#o=this.#e.state,this.#s=this.options,this.#o.data!==void 0&&(this.#p=this.#e),gr(t,e))return;this.#r=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#h.size)return!0;const i=new Set(o??this.#h);return this.options.throwOnError&&i.add("error"),Object.keys(this.#r).some(s=>{const a=s;return this.#r[a]!==e[a]&&i.has(a)})};this.#S({listeners:n()})}#x(){const e=this.#t.getQueryCache().build(this.#t,this.options);if(e===this.#e)return;const t=this.#e;this.#e=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#_()}#S(e){ve.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#r)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function tp(e,t){return De(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Es(e,t){return tp(e,t)||e.state.data!==void 0&&Uo(e,t,t.refetchOnMount)}function Uo(e,t,n){if(De(t.enabled,e)!==!1&&mt(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Ci(e,t)}return!1}function Os(e,t,n,r){return(e!==t||De(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Ci(e,n)}function Ci(e,t){return De(t.enabled,e)!==!1&&e.isStaleByTime(mt(t.staleTime,e))}function np(e,t){return!gr(e.getCurrentResult(),t)}var rp=class extends cn{#t;#e=void 0;#n;#r;constructor(t,n){super(),this.#t=t,this.setOptions(n),this.bindMethods(),this.#o()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#t.defaultMutationOptions(t),gr(this.options,n)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Dt(n.mutationKey)!==Dt(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#o(),this.#s(t)}getCurrentResult(){return this.#e}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#o(),this.#s()}mutate(t,n){return this.#r=n,this.#n?.removeObserver(this),this.#n=this.#t.getMutationCache().build(this.#t,this.options),this.#n.addObserver(this),this.#n.execute(t)}#o(){const t=this.#n?.state??pl();this.#e={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#s(t){ve.batch(()=>{if(this.#r&&this.hasListeners()){const n=this.#e.variables,r=this.#e.context;t?.type==="success"?(this.#r.onSuccess?.(t.data,n,r),this.#r.onSettled?.(t.data,null,n,r)):t?.type==="error"&&(this.#r.onError?.(t.error,n,r),this.#r.onSettled?.(void 0,t.error,n,r))}this.listeners.forEach(n=>{n(this.#e)})})}},st,ie,lo,Ms,sn=0,hl=[],ue=G,Is=ue.__b,As=ue.__r,Ts=ue.diffed,Ns=ue.__c,Ds=ue.unmount,ks=ue.__;function jt(e,t){ue.__h&&ue.__h(ie,e,sn||t),sn=0;var n=ie.__H||(ie.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function F(e){return sn=1,Vt(gl,e)}function Vt(e,t,n){var r=jt(st++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):gl(void 0,t),function(a){var l=r.__N?r.__N[0]:r.__[0],c=r.t(l,a);l!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=ie,!ie.__f)){var o=function(a,l,c){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(g){return!!g.__c});if(d.every(function(g){return!g.__N}))return!i||i.call(this,a,l,c);var u=r.__c.props!==a;return d.forEach(function(g){if(g.__N){var h=g.__[0];g.__=g.__N,g.__N=void 0,h!==g.__[0]&&(u=!0)}}),i&&i.call(this,a,l,c)||u};ie.__f=!0;var i=ie.shouldComponentUpdate,s=ie.componentWillUpdate;ie.componentWillUpdate=function(a,l,c){if(this.__e){var d=i;i=void 0,o(a,l,c),i=d}s&&s.call(this,a,l,c)},ie.shouldComponentUpdate=o}return r.__N||r.__}function j(e,t){var n=jt(st++,3);!ue.__s&&Ei(n.__H,t)&&(n.__=e,n.u=t,ie.__H.__h.push(n))}function ze(e,t){var n=jt(st++,4);!ue.__s&&Ei(n.__H,t)&&(n.__=e,n.u=t,ie.__h.push(n))}function M(e){return sn=5,fe(function(){return{current:e}},[])}function Pi(e,t,n){sn=6,ze(function(){if(typeof e=="function"){var r=e(t());return function(){e(null),r&&typeof r=="function"&&r()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function fe(e,t){var n=jt(st++,7);return Ei(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function z(e,t){return sn=8,fe(function(){return e},t)}function xe(e){var t=ie.context[e.__c],n=jt(st++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(ie)),t.props.value):e.__}function Ri(e,t){ue.useDebugValue&&ue.useDebugValue(t?t(e):e)}function op(e){var t=jt(st++,10),n=F();return t.__=e,ie.componentDidCatch||(ie.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Or(){var e=jt(st++,11);if(!e.__){for(var t=ie.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function ip(){for(var e;e=hl.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(cr),e.__H.__h.forEach(Bo),e.__H.__h=[]}catch(t){e.__H.__h=[],ue.__e(t,e.__v)}}ue.__b=function(e){ie=null,Is&&Is(e)},ue.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ks&&ks(e,t)},ue.__r=function(e){As&&As(e),st=0;var t=(ie=e.__c).__H;t&&(lo===ie?(t.__h=[],ie.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(cr),t.__h.forEach(Bo),t.__h=[],st=0)),lo=ie},ue.diffed=function(e){Ts&&Ts(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(hl.push(t)!==1&&Ms===ue.requestAnimationFrame||((Ms=ue.requestAnimationFrame)||sp)(ip)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),lo=ie=null},ue.__c=function(e,t){t.some(function(n){try{n.__h.forEach(cr),n.__h=n.__h.filter(function(r){return!r.__||Bo(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],ue.__e(r,n.__v)}}),Ns&&Ns(e,t)},ue.unmount=function(e){Ds&&Ds(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{cr(r)}catch(o){t=o}}),n.__H=void 0,t&&ue.__e(t,n.__v))};var Fs=typeof requestAnimationFrame=="function";function sp(e){var t,n=function(){clearTimeout(r),Fs&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Fs&&(t=requestAnimationFrame(n))}function cr(e){var t=ie,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),ie=t}function Bo(e){var t=ie;e.__c=e.__(),ie=t}function Ei(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function gl(e,t){return typeof t=="function"?t(e):t}function ml(e,t){for(var n in t)e[n]=t[n];return e}function qo(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function $n(e,t){var n=t(),r=F({t:{__:n,u:t}}),o=r[0].t,i=r[1];return ze(function(){o.__=n,o.u=t,co(o)&&i({t:o})},[e,n,t]),j(function(){return co(o)&&i({t:o}),e(function(){co(o)&&i({t:o})})},[e]),n}function co(e){var t,n,r=e.u,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}function Oi(e){e()}function Mi(e){return e}function Ii(){return[!1,Oi]}var Ai=ze;function vr(e,t){this.props=e,this.context=t}function vl(e,t){function n(o){var i=this.props.ref,s=i==o.ref;return!s&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!s:qo(this.props,o)}function r(o){return this.shouldComponentUpdate=n,te(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(vr.prototype=new $e).isPureReactComponent=!0,vr.prototype.shouldComponentUpdate=function(e,t){return qo(this.props,e)||qo(this.state,t)};var $s=G.__b;G.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),$s&&$s(e)};var ap=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function R(e){function t(n){var r=ml({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=ap,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ls=function(e,t){return e==null?null:Qe(Qe(e).map(t))},Ye={map:Ls,forEach:Ls,count:function(e){return e?Qe(e).length:0},only:function(e){var t=Qe(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Qe},lp=G.__e;G.__e=function(e,t,n,r){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}lp(e,t,n,r)};var js=G.unmount;function yl(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=ml({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return yl(r,t,n)})),e}function _l(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return _l(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Pn(){this.__u=0,this.o=null,this.__b=null}function bl(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function wl(e){var t,n,r;function o(i){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return te(n,i)}return o.displayName="Lazy",o.__f=!0,o}function Zt(){this.i=null,this.l=null}G.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),js&&js(e)},(Pn.prototype=new $e).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var o=bl(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=_l(l,l.__c.__P,l.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.o.pop();)c.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Pn.prototype.componentWillUnmount=function(){this.o=[]},Pn.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=yl(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&te(ge,null,e.fallback);return o&&(o.__u&=-33),[te(ge,null,t.__a?null:e.children),o]};var Vs=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function cp(e){return this.getChildContext=function(){return e.context},e.children}function up(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){on(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},insertBefore:function(o,i){this.childNodes.push(o),t.h.insertBefore(o,i)},removeChild:function(o){this.childNodes.splice(this.childNodes.indexOf(o)>>>1,1),t.h.removeChild(o)}}}on(te(cp,{context:t.context},e.__v),t.v)}function Mr(e,t){var n=te(up,{__v:e,h:t});return n.containerInfo=t,n}(Zt.prototype=new $e).__a=function(e){var t=this,n=bl(t.__v),r=t.l.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Vs(t,e,r)):o()};n?n(i):i()}},Zt.prototype.render=function(e){this.i=null,this.l=new Map;var t=Qe(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Zt.prototype.componentDidUpdate=Zt.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Vs(e,n,t)})};var xl=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,dp=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,fp=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,pp=/[A-Z0-9]/g,hp=typeof document<"u",gp=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Sl(e,t,n){return t.__k==null&&(t.textContent=""),on(e,t),typeof n=="function"&&n(),e?e.__c:null}function Cl(e,t,n){return rl(e,t),typeof n=="function"&&n(),e?e.__c:null}$e.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty($e.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Hs=G.event;function mp(){}function vp(){return this.cancelBubble}function yp(){return this.defaultPrevented}G.event=function(e){return Hs&&(e=Hs(e)),e.persist=mp,e.isPropagationStopped=vp,e.isDefaultPrevented=yp,e.nativeEvent=e};var Ti,_p={enumerable:!1,configurable:!0,get:function(){return this.class}},zs=G.vnode;G.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={},i=r.indexOf("-")===-1;for(var s in n){var a=n[s];if(!(s==="value"&&"defaultValue"in n&&a==null||hp&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var l=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&a===!0?a="":l==="translate"&&a==="no"?a=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?s="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||gp(n.type)?l==="onfocus"?s="onfocusin":l==="onblur"?s="onfocusout":fp.test(s)&&(s=l):l=s="oninput":i&&dp.test(s)?s=s.replace(pp,"-$&").toLowerCase():a===null&&(a=void 0),l==="oninput"&&o[s=l]&&(s="oninputCapture"),o[s]=a}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=Qe(n.children).forEach(function(c){c.props.selected=o.value.indexOf(c.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=Qe(n.children).forEach(function(c){c.props.selected=o.multiple?o.defaultValue.indexOf(c.props.value)!=-1:o.defaultValue==c.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",_p)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=xl,zs&&zs(e)};var Gs=G.__r;G.__r=function(e){Gs&&Gs(e),Ti=e.__c};var Us=G.diffed;G.diffed=function(e){Us&&Us(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),Ti=null};var Pl={ReactCurrentDispatcher:{current:{readContext:function(e){return Ti.__n[e.__c].props.value},useCallback:z,useContext:xe,useDebugValue:Ri,useDeferredValue:Mi,useEffect:j,useId:Or,useImperativeHandle:Pi,useInsertionEffect:Ai,useLayoutEffect:ze,useMemo:fe,useReducer:Vt,useRef:M,useState:F,useSyncExternalStore:$n,useTransition:Ii}}},bp="18.3.1";function Rl(e){return te.bind(null,e)}function at(e){return!!e&&e.$$typeof===xl}function El(e){return at(e)&&e.type===ge}function Ol(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function un(e){return at(e)?jo.apply(null,arguments):e}function Ml(e){return!!e.__k&&(on(null,e),!0)}function Il(e){return e&&(e.base||e.nodeType===1&&e)||null}var Al=function(e,t){return e(t)},Ir=function(e,t){return e(t)},Tl=ge,Nl=at,ee={useState:F,useId:Or,useReducer:Vt,useEffect:j,useLayoutEffect:ze,useInsertionEffect:Ai,useTransition:Ii,useDeferredValue:Mi,useSyncExternalStore:$n,startTransition:Oi,useRef:M,useImperativeHandle:Pi,useMemo:fe,useCallback:z,useContext:xe,useDebugValue:Ri,version:"18.3.1",Children:Ye,render:Sl,hydrate:Cl,unmountComponentAtNode:Ml,createPortal:Mr,createElement:te,createContext:Ee,createFactory:Rl,cloneElement:un,createRef:Ya,Fragment:ge,isValidElement:at,isElement:Nl,isFragment:El,isMemo:Ol,findDOMNode:Il,Component:$e,PureComponent:vr,memo:vl,forwardRef:R,flushSync:Ir,unstable_batchedUpdates:Al,StrictMode:Tl,Suspense:Pn,SuspenseList:Zt,lazy:wl,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Pl};const Dl=Object.freeze(Object.defineProperty({__proto__:null,Children:Ye,Component:$e,Fragment:ge,PureComponent:vr,StrictMode:Tl,Suspense:Pn,SuspenseList:Zt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Pl,cloneElement:un,createContext:Ee,createElement:te,createFactory:Rl,createPortal:Mr,createRef:Ya,default:ee,findDOMNode:Il,flushSync:Ir,forwardRef:R,hydrate:Cl,isElement:Nl,isFragment:El,isMemo:Ol,isValidElement:at,lazy:wl,memo:vl,render:Sl,startTransition:Oi,unmountComponentAtNode:Ml,unstable_batchedUpdates:Al,useCallback:z,useContext:xe,useDebugValue:Ri,useDeferredValue:Mi,useEffect:j,useErrorBoundary:op,useId:Or,useImperativeHandle:Pi,useInsertionEffect:Ai,useLayoutEffect:ze,useMemo:fe,useReducer:Vt,useRef:M,useState:F,useSyncExternalStore:$n,useTransition:Ii,version:bp},Symbol.toStringTag,{value:"Module"}));var kl=Ee(void 0),Fl=e=>{const t=xe(kl);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},wp=({client:e,children:t})=>(j(()=>(e.mount(),()=>{e.unmount()}),[e]),f(kl.Provider,{value:e,children:t})),$l=Ee(!1),xp=()=>xe($l);$l.Provider;function Sp(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Cp=Ee(Sp()),Pp=()=>xe(Cp),Rp=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Ep=e=>{j(()=>{e.clearReset()},[e])},Op=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||al(n,[e.error,r])),Mp=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Ip=(e,t)=>e.isLoading&&e.isFetching&&!t,Ap=(e,t)=>e?.suspense&&t.isPending,Bs=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Tp(e,t,n){const r=xp(),o=Pp(),i=Fl(),s=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(s),s._optimisticResults=r?"isRestoring":"optimistic",Mp(s),Rp(s,o),Ep(o);const a=!i.getQueryCache().get(s.queryHash),[l]=F(()=>new t(i,s)),c=l.getOptimisticResult(s),d=!r&&e.subscribed!==!1;if($n(z(u=>{const g=d?l.subscribe(ve.batchCalls(u)):Ce;return l.updateResult(),g},[l,d]),()=>l.getCurrentResult()),j(()=>{l.setOptions(s)},[s,l]),Ap(s,c))throw Bs(s,l,o);if(Op({result:c,errorResetBoundary:o,throwOnError:s.throwOnError,query:i.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw c.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(s,c),s.experimental_prefetchInRender&&!Nt&&Ip(c,r)&&(a?Bs(s,l,o):i.getQueryCache().get(s.queryHash)?.promise)?.catch(Ce).finally(()=>{l.updateResult()}),s.notifyOnChangeProps?c:l.trackResult(c)}function Ar(e,t){return Tp(e,ep)}function qs(e,t){const n=Fl(),[r]=F(()=>new rp(n,e));j(()=>{r.setOptions(e)},[r,e]);const o=$n(z(s=>r.subscribe(ve.batchCalls(s)),[r]),()=>r.getCurrentResult()),i=z((s,a)=>{r.mutate(s,a).catch(Ce)},[r]);if(o.error&&al(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}let Mt,wn;const Np=(e,t)=>{if(Mt=void 0,t&&t.type==="click"){if(t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||t.button!==0)return e;const n=t.composedPath().find(o=>o.nodeName=="A"&&o.href),r=n&&n.getAttribute("href");if(!n||n.origin!=location.origin||/^#/.test(r)||!/^(_?self)?$/i.test(n.target)||wn&&(typeof wn=="string"?!r.startsWith(wn):!wn.test(r)))return e;Mt=!0,t.preventDefault(),t=n.href.replace(location.origin,"")}else typeof t=="string"?Mt=!0:t&&t.url?(Mt=!t.replace,t=t.url):t=location.pathname+location.search;return Mt===!0?history.pushState(null,"",t):Mt===!1&&history.replaceState(null,"",t),t},Dp=(e,t,n={})=>{e=e.split("/").filter(Boolean),t=(t||"").split("/").filter(Boolean),n.params||(n.params={});for(let r=0,o,i;r<Math.max(e.length,t.length);r++){let[,s,a,l]=(t[r]||"").match(/^(:?)(.*?)([+*?]?)$/);if(o=e[r],!(!s&&a==o)){if(!s&&o&&l=="*"){n.rest="/"+e.slice(r).map(decodeURIComponent).join("/");break}if(!s||!o&&l!="?"&&l!="*")return;if(i=l=="+"||l=="*",i?o=e.slice(r).map(decodeURIComponent).join("/")||void 0:o&&(o=decodeURIComponent(o)),n.params[a]=o,a in n||(n[a]=o),i)break}}return n};function Ln(e){const[t,n]=Vt(Np,e.url||location.pathname+location.search);e.scope&&(wn=e.scope);const r=Mt===!0,o=fe(()=>{const i=new URL(t,location.origin),s=i.pathname.replace(/\/+$/g,"")||"/";return{url:t,path:s,query:Object.fromEntries(i.searchParams),route:(a,l)=>n({url:a,replace:l}),wasPush:r}},[t]);return ze(()=>(addEventListener("click",n),addEventListener("popstate",n),()=>{removeEventListener("click",n),removeEventListener("popstate",n)}),[]),te(Ln.ctx.Provider,{value:o},e.children)}const kp=Promise.resolve();function Ll(e){const[t,n]=Vt(I=>I+1,0),{url:r,query:o,wasPush:i,path:s}=Ni();if(!r)throw new Error("preact-iso's <Router> must be used within a <LocationProvider>, see: https://github.com/preactjs/preact-iso#locationprovider");const{rest:a=s,params:l={}}=xe(Wo),c=M(!1),d=M(s),u=M(0),g=M(),h=M(),m=M(),p=M(!1),v=M();v.current=!1;let y,_,b;Qe(e.children).some(I=>{if(Dp(a,I.props.path,b={...I.props,path:a,query:o,params:l,rest:""}))return y=jo(I,b);I.props.default&&(_=jo(I,b))});let w=y||_;const S=g.current&&g.current.__u&Wn&&g.current.__u&Kn,O=g.current&&g.current.__h,C=fe(()=>{h.current=g.current,g.current=te(Wo.Provider,{value:b},w);const I=h.current&&h.current.props.children;return!I||!w||w.type!==I.type||w.props.component!==I.props.component?(this.__v&&this.__v.__k&&this.__v.__k.reverse(),u.current++,!0):!1},[r,JSON.stringify(b)]);S?(g.current.__u|=Wn,g.current.__u|=Kn):O&&(g.current.__h=!0);const x=h.current;return h.current=null,this.__c=(I,D)=>{v.current=!0,h.current=x,e.onLoadStart&&e.onLoadStart(r),c.current=!0;let $=u.current;I.then(()=>{$===u.current&&(h.current=null,g.current&&(D.__h&&(g.current.__h=D.__h),D.__u&Kn&&(g.current.__u|=Kn),D.__u&Wn&&(g.current.__u|=Wn)),kp.then(n))})},ze(()=>{const I=this.__v&&this.__v.__e;if(v.current){!p.current&&!m.current&&(m.current=I);return}!p.current&&m.current&&(m.current!==I&&m.current.remove(),m.current=null),p.current=!0,d.current!==s&&(i&&scrollTo(0,0),e.onRouteChange&&e.onRouteChange(r),d.current=s),e.onLoadEnd&&c.current&&e.onLoadEnd(r),c.current=!1},[s,i,t]),C?[te(uo,{r:g}),te(uo,{r:h})]:te(uo,{r:g})}const Wn=32,Kn=128,uo=({r:e})=>e.current;Ll.Provider=Ln;Ln.ctx=Ee({});const Wo=Ee({}),fo=e=>te(e.component,e),Ni=()=>xe(Ln.ctx),Di=()=>xe(Wo),Ws=G.__b;G.__b=e=>{e.type&&e.type._forwarded&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ws&&Ws(e)};const Ks=G.__e;G.__e=(e,t,n)=>{if(e&&e.then){let r=t;for(;r=r.__;)if(r.__c&&r.__c.__c)return t.__e==null&&(t.__c.__z=[n.__e],t.__e=n.__e,t.__k=n.__k),t.__k||(t.__k=[]),r.__c.__c(e,t)}Ks&&Ks(e,t,n)};function Fp(e){return this.__c=$p,this.componentDidCatch=e.onError,e.children}function $p(e){e.then(()=>this.forceUpdate())}const Qs=e=>{let t;const n=new Set,r=(c,d)=>{const u=typeof c=="function"?c(t):c;if(!Object.is(u,t)){const g=t;t=d??(typeof u!="object"||u===null)?u:Object.assign({},t,u),n.forEach(h=>h(t,g))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=t=e(r,o,a);return a},Lp=e=>e?Qs(e):Qs,jp=e=>e;function Vp(e,t=jp){const n=ee.useSyncExternalStore(e.subscribe,ee.useCallback(()=>t(e.getState()),[e,t]),ee.useCallback(()=>t(e.getInitialState()),[e,t]));return ee.useDebugValue(n),n}const Ys=e=>{const t=Lp(e),n=r=>Vp(t,r);return Object.assign(n,t),n},jl=e=>e?Ys(e):Ys;function ki(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var i;const s=l=>l===null?null:JSON.parse(l,void 0),a=(i=n.getItem(o))!=null?i:null;return a instanceof Promise?a.then(s):s(a)},setItem:(o,i)=>n.setItem(o,JSON.stringify(i,void 0)),removeItem:o=>n.removeItem(o)}}const Ko=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Ko(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Ko(r)(n)}}}},Hp=(e,t)=>(n,r,o)=>{let i={storage:ki(()=>localStorage),partialize:p=>p,version:0,merge:(p,v)=>({...v,...p}),...t},s=!1;const a=new Set,l=new Set;let c=i.storage;if(!c)return e((...p)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...p)},r,o);const d=()=>{const p=i.partialize({...r()});return c.setItem(i.name,{state:p,version:i.version})},u=o.setState;o.setState=(p,v)=>{u(p,v),d()};const g=e((...p)=>{n(...p),d()},r,o);o.getInitialState=()=>g;let h;const m=()=>{var p,v;if(!c)return;s=!1,a.forEach(_=>{var b;return _((b=r())!=null?b:g)});const y=((v=i.onRehydrateStorage)==null?void 0:v.call(i,(p=r())!=null?p:g))||void 0;return Ko(c.getItem.bind(c))(i.name).then(_=>{if(_)if(typeof _.version=="number"&&_.version!==i.version){if(i.migrate){const b=i.migrate(_.state,_.version);return b instanceof Promise?b.then(w=>[!0,w]):[!0,b]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,_.state];return[!1,void 0]}).then(_=>{var b;const[w,S]=_;if(h=i.merge(S,(b=r())!=null?b:g),n(h,!0),w)return d()}).then(()=>{y?.(h,void 0),h=r(),s=!0,l.forEach(_=>_(h))}).catch(_=>{y?.(void 0,_)})};return o.persist={setOptions:p=>{i={...i,...p},p.storage&&(c=p.storage)},clearStorage:()=>{c?.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>m(),hasHydrated:()=>s,onHydrate:p=>(a.add(p),()=>{a.delete(p)}),onFinishHydration:p=>(l.add(p),()=>{l.delete(p)})},i.skipHydration||m(),h||g},Vl=Hp,Tr=jl(Vl(e=>({selectedServerId:1,servers:[],setSelectedServer:t=>e({selectedServerId:t.id}),setServers:t=>e({servers:t})}),{name:"beanstalkd-ts-console:servers",storage:ki(()=>localStorage)}));var zp=Object.create,Hl=Object.defineProperty,Gp=Object.getOwnPropertyDescriptor,zl=Object.getOwnPropertyNames,Up=Object.getPrototypeOf,Bp=Object.prototype.hasOwnProperty,et=(e,t)=>function(){return t||(0,e[zl(e)[0]])((t={exports:{}}).exports,t),t.exports},qp=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=zl(t),i=0,s=o.length,a;i<s;i++)a=o[i],!Bp.call(e,a)&&a!==n&&Hl(e,a,{get:(l=>t[l]).bind(null,a),enumerable:!(r=Gp(t,a))||r.enumerable});return e},pe=(e,t,n)=>(n=e!=null?zp(Up(e)):{},qp(Hl(n,"default",{value:e,enumerable:!0}),e)),Gl=et({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function n(r){"@babel/helpers - typeof";return t.exports=n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},t.exports.__esModule=!0,t.exports.default=t.exports,n(r)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Wp=et({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var n=Gl().default;function r(o,i){if(n(o)!="object"||!o)return o;var s=o[Symbol.toPrimitive];if(s!==void 0){var a=s.call(o,i||"default");if(n(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(o)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Kp=et({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var n=Gl().default,r=Wp();function o(i){var s=r(i,"string");return n(s)=="symbol"?s:s+""}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}}),Ht=et({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var n=Kp();function r(o,i,s){return(i=n(i))in o?Object.defineProperty(o,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[i]=s,o}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Ge=et({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var n=Ht();function r(i,s){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(i);s&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(i,c).enumerable})),a.push.apply(a,l)}return a}function o(i){for(var s=1;s<arguments.length;s++){var a=arguments[s]!=null?arguments[s]:{};s%2?r(Object(a),!0).forEach(function(l){n(i,l,a[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):r(Object(a)).forEach(function(l){Object.defineProperty(i,l,Object.getOwnPropertyDescriptor(a,l))})}return i}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}});function Nr(e){const t={subscribe(n){let r=null,o=!1,i=!1,s=!1;function a(){if(r===null){s=!0;return}i||(i=!0,typeof r=="function"?r():r&&r.unsubscribe())}return r=e({next(l){var c;o||(c=n.next)===null||c===void 0||c.call(n,l)},error(l){var c;o||(o=!0,(c=n.error)===null||c===void 0||c.call(n,l),a())},complete(){var l;o||(o=!0,(l=n.complete)===null||l===void 0||l.call(n),a())}}),s&&a(),{unsubscribe:a}},pipe(...n){return n.reduce(Qp,t)}};return t}function Qp(e,t){return t(e)}function Yp(e){const t=new AbortController;return new Promise((r,o)=>{let i=!1;function s(){i||(i=!0,a.unsubscribe())}t.signal.addEventListener("abort",()=>{o(t.signal.reason)});const a=e.subscribe({next(l){i=!0,r(l),s()},error(l){o(l)},complete(){t.abort(),s()}})})}function Xp(e){return t=>{let n=0,r=null;const o=[];function i(){r||(r=t.subscribe({next(a){for(const c of o){var l;(l=c.next)===null||l===void 0||l.call(c,a)}},error(a){for(const c of o){var l;(l=c.error)===null||l===void 0||l.call(c,a)}},complete(){for(const l of o){var a;(a=l.complete)===null||a===void 0||a.call(l)}}}))}function s(){if(n===0&&r){const a=r;r=null,a.unsubscribe()}}return Nr(a=>(n++,o.push(a),i(),{unsubscribe(){n--,s();const l=o.findIndex(c=>c===a);l>-1&&o.splice(l,1)}}))}}function Jp(e){let t=e;const n=[],r=s=>{t!==void 0&&s.next(t),n.push(s)},o=s=>{n.splice(n.indexOf(s),1)},i=Nr(s=>(r(s),()=>{o(s)}));return i.next=s=>{if(t!==s){t=s;for(const a of n)a.next(s)}},i.get=()=>t,i}function Zp(e){return Nr(t=>{function n(o=0,i=e.op){const s=e.links[o];if(!s)throw new Error("No more links to execute - did you forget to add an ending link?");return s({op:i,next(l){return n(o+1,l)}})}return n().subscribe(t)})}function vt(e){return!!e&&!Array.isArray(e)&&typeof e=="object"}function eh(e){return typeof e=="function"}const th=typeof Symbol=="function"&&!!Symbol.asyncIterator;function nh(e){return th&&vt(e)&&Symbol.asyncIterator in e}var rh=Object.create,Ul=Object.defineProperty,oh=Object.getOwnPropertyDescriptor,Bl=Object.getOwnPropertyNames,ih=Object.getPrototypeOf,sh=Object.prototype.hasOwnProperty,jn=(e,t)=>function(){return t||(0,e[Bl(e)[0]])((t={exports:{}}).exports,t),t.exports},ah=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=Bl(t),i=0,s=o.length,a;i<s;i++)a=o[i],!sh.call(e,a)&&a!==n&&Ul(e,a,{get:(l=>t[l]).bind(null,a),enumerable:!(r=oh(t,a))||r.enumerable});return e},Dr=(e,t,n)=>(n=e!=null?rh(ih(e)):{},ah(Ul(n,"default",{value:e,enumerable:!0}),e));const ql=()=>{},Xs=e=>{Object.freeze&&Object.freeze(e)};function Wl(e,t,n){var r;const o=t.join(".");return(r=n[o])!==null&&r!==void 0||(n[o]=new Proxy(ql,{get(i,s){if(!(typeof s!="string"||s==="then"))return Wl(e,[...t,s],n)},apply(i,s,a){const l=t[t.length-1];let c={args:a,path:t};return l==="call"?c={args:a.length>=2?[a[1]]:[],path:t.slice(0,-1)}:l==="apply"&&(c={args:a.length>=2?a[1]:[],path:t.slice(0,-1)}),Xs(c.args),Xs(c.path),e(c)}})),n[o]}const Kl=e=>Wl(e,[],Object.create(null)),lh=e=>new Proxy(ql,{get(t,n){if(n!=="then")return e(n)}});var Ql=jn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function n(r){"@babel/helpers - typeof";return t.exports=n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},t.exports.__esModule=!0,t.exports.default=t.exports,n(r)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),ch=jn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var n=Ql().default;function r(o,i){if(n(o)!="object"||!o)return o;var s=o[Symbol.toPrimitive];if(s!==void 0){var a=s.call(o,i||"default");if(n(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(o)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),uh=jn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var n=Ql().default,r=ch();function o(i){var s=r(i,"string");return n(s)=="symbol"?s:s+""}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}}),Yl=jn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var n=uh();function r(o,i,s){return(i=n(i))in o?Object.defineProperty(o,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[i]=s,o}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Fi=jn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var n=Yl();function r(i,s){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(i);s&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(i,c).enumerable})),a.push.apply(a,l)}return a}function o(i){for(var s=1;s<arguments.length;s++){var a=arguments[s]!=null?arguments[s]:{};s%2?r(Object(a),!0).forEach(function(l){n(i,l,a[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):r(Object(a)).forEach(function(l){Object.defineProperty(i,l,Object.getOwnPropertyDescriptor(a,l))})}return i}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}});Dr(Fi());var Js=Dr(Yl()),dh=class extends Error{};function fh(e){if(e instanceof Error)return e;const t=typeof e;if(!(t==="undefined"||t==="function"||e===null)){if(t!=="object")return new Error(String(e));if(vt(e))return Object.assign(new dh,e)}}var Zs=class extends Error{constructor(e){var t,n,r;const o=fh(e.cause),i=(t=(n=e.message)!==null&&n!==void 0?n:o?.message)!==null&&t!==void 0?t:e.code;super(i,{cause:o}),(0,Js.default)(this,"cause",void 0),(0,Js.default)(this,"code",void 0),this.code=e.code,this.name="TRPCError",(r=this.cause)!==null&&r!==void 0||(this.cause=o)}},Qn=Dr(Fi());function ph(e,t){if("error"in e){const r=t.deserialize(e.error);return{ok:!1,error:(0,Qn.default)((0,Qn.default)({},e),{},{error:r})}}return{ok:!0,result:(0,Qn.default)((0,Qn.default)({},e.result),(!e.result.type||e.result.type==="data")&&{type:"data",data:t.deserialize(e.result.data)})}}var po=class extends Error{constructor(){super("Unable to transform response from server")}};function hh(e,t){let n;try{n=ph(e,t)}catch{throw new po}if(!n.ok&&(!vt(n.error.error)||typeof n.error.error.code!="number"))throw new po;if(n.ok&&!vt(n.result))throw new po;return n}Dr(Fi());function gh(e){return typeof e=="function"}async function mh(e,t){const{_def:n}=e;let r=n.procedures[t];for(;!r;){const o=Object.keys(n.lazy).find(s=>t.startsWith(s));if(!o)return null;await n.lazy[o].load(),r=n.procedures[t]}return r}async function vh(e){const{type:t,path:n}=e,r=await mh(e.router,n);if(!r||!gh(r)||r._def.type!==t&&!e.allowMethodOverride)throw new Zs({code:"NOT_FOUND",message:`No "${t}"-procedure on path "${n}"`});/* istanbul ignore if -- @preserve */if(r._def.type!==t&&e.allowMethodOverride&&r._def.type==="subscription")throw new Zs({code:"METHOD_NOT_SUPPORTED",message:"Method override is not supported for subscriptions"});return r(e)}var Yn=pe(Ht()),Ut=pe(Ge());function yh(e){return e instanceof yr}function _h(e){return vt(e)&&vt(e.error)&&typeof e.error.code=="number"&&typeof e.error.message=="string"}function bh(e,t){return typeof e=="string"?e:vt(e)&&typeof e.message=="string"?e.message:t}var yr=class ur extends Error{constructor(t,n){var r,o;const i=n?.cause;super(t,{cause:i}),(0,Yn.default)(this,"cause",void 0),(0,Yn.default)(this,"shape",void 0),(0,Yn.default)(this,"data",void 0),(0,Yn.default)(this,"meta",void 0),this.meta=n?.meta,this.cause=i,this.shape=n==null||(r=n.result)===null||r===void 0?void 0:r.error,this.data=n==null||(o=n.result)===null||o===void 0?void 0:o.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,ur.prototype)}static from(t,n={}){const r=t;return yh(r)?(n.meta&&(r.meta=(0,Ut.default)((0,Ut.default)({},r.meta),n.meta)),r):_h(r)?new ur(r.error.message,(0,Ut.default)((0,Ut.default)({},n),{},{result:r})):new ur(bh(r,"Unknown error"),(0,Ut.default)((0,Ut.default)({},n),{},{cause:r}))}};function wh(e){const t=e;return t?"input"in t?t:{input:t,output:t}:{input:{serialize:n=>n,deserialize:n=>n},output:{serialize:n=>n,deserialize:n=>n}}}const ea=e=>typeof e=="function";function xh(e){if(e)return e;if(typeof window<"u"&&ea(window.fetch))return window.fetch;if(typeof globalThis<"u"&&ea(globalThis.fetch))return globalThis.fetch;throw new Error("No fetch implementation found")}var Rn=pe(Ge());function Sh(e){return{url:e.url.toString(),fetch:e.fetch,transformer:wh(e.transformer),methodOverride:e.methodOverride}}function Ch(e){const t={};for(let n=0;n<e.length;n++){const r=e[n];t[n]=r}return t}const Ph={query:"GET",mutation:"POST",subscription:"PATCH"};function Xl(e){return"input"in e?e.transformer.input.serialize(e.input):Ch(e.inputs.map(t=>e.transformer.input.serialize(t)))}const Jl=e=>{const t=e.url.split("?");let r=t[0].replace(/\/$/,"")+"/"+e.path;const o=[];if(t[1]&&o.push(t[1]),"inputs"in e&&o.push("batch=1"),e.type==="query"||e.type==="subscription"){const i=Xl(e);i!==void 0&&e.methodOverride!=="POST"&&o.push(`input=${encodeURIComponent(JSON.stringify(i))}`)}return o.length&&(r+="?"+o.join("&")),r},Rh=e=>{if(e.type==="query"&&e.methodOverride!=="POST")return;const t=Xl(e);return t!==void 0?JSON.stringify(t):void 0},Eh=e=>Ah((0,Rn.default)((0,Rn.default)({},e),{},{contentTypeHeader:"application/json",getUrl:Jl,getBody:Rh}));var Oh=class extends Error{constructor(){const e="AbortError";super(e),this.name=e,this.message=e}};const Mh=e=>{var t;if(e?.aborted)throw(t=e.throwIfAborted)===null||t===void 0||t.call(e),typeof DOMException<"u"?new DOMException("AbortError","AbortError"):new Oh};async function Ih(e){var t;Mh(e.signal);const n=e.getUrl(e),r=e.getBody(e),{type:o}=e,i=await(async()=>{const a=await e.headers();return Symbol.iterator in a?Object.fromEntries(a):a})(),s=(0,Rn.default)((0,Rn.default)((0,Rn.default)({},e.contentTypeHeader?{"content-type":e.contentTypeHeader}:{}),e.trpcAcceptHeader?{"trpc-accept":e.trpcAcceptHeader}:void 0),i);return xh(e.fetch)(n,{method:(t=e.methodOverride)!==null&&t!==void 0?t:Ph[o],signal:e.signal,body:r,headers:s})}async function Ah(e){const t={},n=await Ih(e);t.response=n;const r=await n.json();return t.responseJSON=r,{json:r,meta:t}}pe(Ge());const ta=()=>{throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function na(e){let t=null,n=null;const r=()=>{clearTimeout(n),n=null,t=null};function o(a){const l=[[]];let c=0;for(;;){const g=a[c];if(!g)break;const h=l[l.length-1];if(g.aborted){var d;(d=g.reject)===null||d===void 0||d.call(g,new Error("Aborted")),c++;continue}if(e.validate(h.concat(g).map(p=>p.key))){h.push(g),c++;continue}if(h.length===0){var u;(u=g.reject)===null||u===void 0||u.call(g,new Error("Input is too big for a single dispatch")),c++;continue}l.push([])}return l}function i(){const a=o(t);r();for(const l of a){if(!l.length)continue;const c={items:l};for(const u of l)u.batch=c;e.fetch(c.items.map(u=>u.key)).then(async u=>{await Promise.all(u.map(async(h,m)=>{const p=c.items[m];try{var v;const _=await Promise.resolve(h);(v=p.resolve)===null||v===void 0||v.call(p,_)}catch(_){var y;(y=p.reject)===null||y===void 0||y.call(p,_)}p.batch=null,p.reject=null,p.resolve=null}));for(const h of c.items){var g;(g=h.reject)===null||g===void 0||g.call(h,new Error("Missing result")),h.batch=null}}).catch(u=>{for(const h of c.items){var g;(g=h.reject)===null||g===void 0||g.call(h,u),h.batch=null}})}}function s(a){var l;const c={aborted:!1,key:a,batch:null,resolve:ta,reject:ta},d=new Promise((u,g)=>{var h;c.reject=g,c.resolve=u,(h=t)!==null&&h!==void 0||(t=[]),t.push(c)});return(l=n)!==null&&l!==void 0||(n=setTimeout(i)),d}return{load:s}}function Th(...e){const t=new AbortController,n=e.length;let r=0;const o=()=>{++r===n&&t.abort()};for(const i of e)i?.aborted?o():i?.addEventListener("abort",o,{once:!0});return t.signal}var Xn=pe(Ge());function Nh(e){var t,n;const r=Sh(e),o=(t=e.maxURLLength)!==null&&t!==void 0?t:1/0,i=(n=e.maxItems)!==null&&n!==void 0?n:1/0;return()=>{const s=d=>({validate(u){if(o===1/0&&i===1/0)return!0;if(u.length>i)return!1;const g=u.map(p=>p.path).join(","),h=u.map(p=>p.input);return Jl((0,Xn.default)((0,Xn.default)({},r),{},{type:d,path:g,inputs:h,signal:null})).length<=o},async fetch(u){const g=u.map(_=>_.path).join(","),h=u.map(_=>_.input),m=Th(...u.map(_=>_.signal)),p=await Eh((0,Xn.default)((0,Xn.default)({},r),{},{path:g,inputs:h,type:d,headers(){return e.headers?typeof e.headers=="function"?e.headers({opList:u}):e.headers:{}},signal:m}));return(Array.isArray(p.json)?p.json:u.map(()=>p.json)).map(_=>({meta:p.meta,json:_}))}}),a=na(s("query")),l=na(s("mutation")),c={query:a,mutation:l};return({op:d})=>Nr(u=>{/* istanbul ignore if -- @preserve */if(d.type==="subscription")throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");const h=c[d.type].load(d);let m;return h.then(p=>{m=p;const v=hh(p.json,r.transformer.output);if(!v.ok){u.error(yr.from(v.error,{meta:p.meta}));return}u.next({context:p.meta,result:v.result}),u.complete()}).catch(p=>{u.error(yr.from(p,{meta:m?.meta}))}),()=>{}})}}pe(Ge());const Zl=(e,...t)=>typeof e=="function"?e(...t):e;pe(Ht());function Dh(){let e,t;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}async function kh(e){const t=await Zl(e.url);if(!e.connectionParams)return t;const r=`${t.includes("?")?"&":"?"}connectionParams=1`;return t+r}async function Fh(e){const t={method:"connectionParams",data:await Zl(e)};return JSON.stringify(t)}pe(Ht());var It=pe(Ht());function $h(e){const{promise:t,resolve:n,reject:r}=Dh();return e.addEventListener("open",()=>{e.removeEventListener("error",r),n()}),e.addEventListener("error",r),t}function Lh(e,{intervalMs:t,pongTimeoutMs:n}){let r,o;function i(){r=setTimeout(()=>{e.send("PING"),o=setTimeout(()=>{e.close()},n)},t)}function s(){clearTimeout(r),i()}function a(){clearTimeout(o),s()}e.addEventListener("open",i),e.addEventListener("message",({data:l})=>{clearTimeout(r),i(),l==="PONG"&&a()}),e.addEventListener("close",()=>{clearTimeout(r),clearTimeout(o)})}var jh=class Qo{constructor(t){var n;if((0,It.default)(this,"id",++Qo.connectCount),(0,It.default)(this,"WebSocketPonyfill",void 0),(0,It.default)(this,"urlOptions",void 0),(0,It.default)(this,"keepAliveOpts",void 0),(0,It.default)(this,"wsObservable",Jp(null)),(0,It.default)(this,"openPromise",null),this.WebSocketPonyfill=(n=t.WebSocketPonyfill)!==null&&n!==void 0?n:WebSocket,!this.WebSocketPonyfill)throw new Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=t.urlOptions,this.keepAliveOpts=t.keepAlive}get ws(){return this.wsObservable.get()}set ws(t){this.wsObservable.next(t)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){var t=this;if(t.openPromise)return t.openPromise;t.id=++Qo.connectCount;const n=kh(t.urlOptions).then(r=>new t.WebSocketPonyfill(r));t.openPromise=n.then(async r=>{t.ws=r,r.addEventListener("message",function({data:o}){o==="PING"&&this.send("PONG")}),t.keepAliveOpts.enabled&&Lh(r,t.keepAliveOpts),r.addEventListener("close",()=>{t.ws===r&&(t.ws=null)}),await $h(r),t.urlOptions.connectionParams&&r.send(await Fh(t.urlOptions.connectionParams))});try{await t.openPromise}finally{t.openPromise=null}}async close(){var t=this;try{await t.openPromise}finally{var n;(n=t.ws)===null||n===void 0||n.close()}}};(0,It.default)(jh,"connectCount",0);pe(Ht());pe(Ge());var ho=pe(Ht()),ra=pe(Ge()),ec=class{constructor(e){(0,ho.default)(this,"links",void 0),(0,ho.default)(this,"runtime",void 0),(0,ho.default)(this,"requestId",void 0),this.requestId=0,this.runtime={},this.links=e.links.map(t=>t(this.runtime))}$request(e){var t;return Zp({links:this.links,op:(0,ra.default)((0,ra.default)({},e),{},{context:(t=e.context)!==null&&t!==void 0?t:{},id:++this.requestId})}).pipe(Xp())}async requestAsPromise(e){var t=this;try{const n=t.$request(e);return(await Yp(n)).result.data}catch(n){throw yr.from(n)}}query(e,t,n){return this.requestAsPromise({type:"query",path:e,input:t,context:n?.context,signal:n?.signal})}mutation(e,t,n){return this.requestAsPromise({type:"mutation",path:e,input:t,context:n?.context,signal:n?.signal})}subscription(e,t,n){return this.$request({type:"subscription",path:e,input:t,context:n.context,signal:n.signal}).subscribe({next(o){switch(o.result.type){case"state":{var i;(i=n.onConnectionStateChange)===null||i===void 0||i.call(n,o.result);break}case"started":{var s;(s=n.onStarted)===null||s===void 0||s.call(n,{context:o.context});break}case"stopped":{var a;(a=n.onStopped)===null||a===void 0||a.call(n);break}case"data":case void 0:{var l;(l=n.onData)===null||l===void 0||l.call(n,o.result.data);break}}},error(o){var i;(i=n.onError)===null||i===void 0||i.call(n,o)},complete(){var o;(o=n.onComplete)===null||o===void 0||o.call(n)}})}};const tc=Symbol.for("trpc_untypedClient"),Vh={query:"query",mutate:"mutation",subscribe:"subscription"},Hh=e=>Vh[e];function zh(e){const t=Kl(({path:n,args:r})=>{const o=[...n],i=Hh(o.pop()),s=o.join(".");return e[i](s,...r)});return lh(n=>n===tc?e:t[n])}function Gh(e){const t=new ec(e);return zh(t)}function Uh(e){return e[tc]}pe(Ge());pe(Ge());var Bh=et({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(e,t){function n(o){var i,s,a,l=2;for(typeof Symbol<"u"&&(s=Symbol.asyncIterator,a=Symbol.iterator);l--;){if(s&&(i=o[s])!=null)return i.call(o);if(a&&(i=o[a])!=null)return new r(i.call(o));s="@@asyncIterator",a="@@iterator"}throw new TypeError("Object is not async iterable")}function r(o){function i(s){if(Object(s)!==s)return Promise.reject(new TypeError(s+" is not an object."));var a=s.done;return Promise.resolve(s.value).then(function(l){return{value:l,done:a}})}return r=function(a){this.s=a,this.n=a.next},r.prototype={s:null,n:null,next:function(){return i(this.n.apply(this.s,arguments))},return:function(a){var l=this.s.return;return l===void 0?Promise.resolve({value:a,done:!0}):i(l.apply(this.s,arguments))},throw:function(a){var l=this.s.return;return l===void 0?Promise.reject(a):i(l.apply(this.s,arguments))}},new r(o)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}});pe(Bh());pe(Ge());var qh=et({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(e,t){function n(){var r=typeof SuppressedError=="function"?SuppressedError:function(a,l){var c=Error();return c.name="SuppressedError",c.error=a,c.suppressed=l,c},o={},i=[];function s(a,l){if(l!=null){if(Object(l)!==l)throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");if(a)var c=l[Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose")];if(c===void 0&&(c=l[Symbol.dispose||Symbol.for("Symbol.dispose")],a))var d=c;if(typeof c!="function")throw new TypeError("Object is not disposable.");d&&(c=function(){try{d.call(l)}catch(g){return Promise.reject(g)}}),i.push({v:l,d:c,a})}else a&&i.push({d:l,a});return l}return{e:o,u:s.bind(null,!1),a:s.bind(null,!0),d:function(){var l,c=this.e,d=0;function u(){for(;l=i.pop();)try{if(!l.a&&d===1)return d=0,i.push(l),Promise.resolve().then(u);if(l.d){var h=l.d.call(l.v);if(l.a)return d|=2,Promise.resolve(h).then(u,g)}else d|=1}catch(m){return g(m)}if(d===1)return c!==o?Promise.reject(c):Promise.resolve();if(c!==o)throw c}function g(h){return c=c!==o?new r(h,c):h,u()}return u()}}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),nc=et({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(e,t){function n(r,o){this.v=r,this.k=o}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Wh=et({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(e,t){var n=nc();function r(o){return new n(o,0)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Kh=et({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(e,t){var n=nc();function r(i){return function(){return new o(i.apply(this,arguments))}}function o(i){var s,a;function l(d,u){try{var g=i[d](u),h=g.value,m=h instanceof n;Promise.resolve(m?h.v:h).then(function(p){if(m){var v=d==="return"?"return":"next";if(!h.k||p.done)return l(v,p);p=i[v](p).value}c(g.done?"return":"normal",p)},function(p){l("throw",p)})}catch(p){c("throw",p)}}function c(d,u){switch(d){case"return":s.resolve({value:u,done:!0});break;case"throw":s.reject(u);break;default:s.resolve({value:u,done:!1})}(s=s.next)?l(s.key,s.arg):a=null}this._invoke=function(d,u){return new Promise(function(g,h){var m={key:d,arg:u,resolve:g,reject:h,next:null};a?a=a.next=m:(s=a=m,l(d,u))})},typeof i.return!="function"&&(this.return=void 0)}o.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},o.prototype.next=function(i){return this._invoke("next",i)},o.prototype.throw=function(i){return this._invoke("throw",i)},o.prototype.return=function(i){return this._invoke("return",i)},t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}});pe(qh());pe(Wh());pe(Kh());pe(Ge());var Qh=Object.create,rc=Object.defineProperty,Yh=Object.getOwnPropertyDescriptor,oc=Object.getOwnPropertyNames,Xh=Object.getPrototypeOf,Jh=Object.prototype.hasOwnProperty,xt=(e,t)=>function(){return t||(0,e[oc(e)[0]])((t={exports:{}}).exports,t),t.exports},Zh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=oc(t),i=0,s=o.length,a;i<s;i++)a=o[i],!Jh.call(e,a)&&a!==n&&rc(e,a,{get:(l=>t[l]).bind(null,a),enumerable:!(r=Yh(t,a))||r.enumerable});return e},St=(e,t,n)=>(n=e!=null?Qh(Xh(e)):{},Zh(t||!e||!e.__esModule?rc(n,"default",{value:e,enumerable:!0}):n,e)),ic=xt({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function n(r){"@babel/helpers - typeof";return t.exports=n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},t.exports.__esModule=!0,t.exports.default=t.exports,n(r)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),eg=xt({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var n=ic().default;function r(o,i){if(n(o)!="object"||!o)return o;var s=o[Symbol.toPrimitive];if(s!==void 0){var a=s.call(o,i||"default");if(n(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(o)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),tg=xt({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var n=ic().default,r=eg();function o(i){var s=r(i,"string");return n(s)=="symbol"?s:s+""}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}}),ng=xt({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var n=tg();function r(o,i,s){return(i=n(i))in o?Object.defineProperty(o,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[i]=s,o}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),dn=xt({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var n=ng();function r(i,s){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(i);s&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(i,c).enumerable})),a.push.apply(a,l)}return a}function o(i){for(var s=1;s<arguments.length;s++){var a=arguments[s]!=null?arguments[s]:{};s%2?r(Object(a),!0).forEach(function(l){n(i,l,a[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):r(Object(a)).forEach(function(l){Object.defineProperty(i,l,Object.getOwnPropertyDescriptor(a,l))})}return i}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}}),rg=xt({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(e,t){function n(o){var i,s,a,l=2;for(typeof Symbol<"u"&&(s=Symbol.asyncIterator,a=Symbol.iterator);l--;){if(s&&(i=o[s])!=null)return i.call(o);if(a&&(i=o[a])!=null)return new r(i.call(o));s="@@asyncIterator",a="@@iterator"}throw new TypeError("Object is not async iterable")}function r(o){function i(s){if(Object(s)!==s)return Promise.reject(new TypeError(s+" is not an object."));var a=s.done;return Promise.resolve(s.value).then(function(l){return{value:l,done:a}})}return r=function(a){this.s=a,this.n=a.next},r.prototype={s:null,n:null,next:function(){return i(this.n.apply(this.s,arguments))},return:function(a){var l=this.s.return;return l===void 0?Promise.resolve({value:a,done:!0}):i(l.apply(this.s,arguments))},throw:function(a){var l=this.s.return;return l===void 0?Promise.reject(a):i(l.apply(this.s,arguments))}},new r(o)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),og=xt({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js"(e,t){function n(r,o){if(r==null)return{};var i={};for(var s in r)if({}.hasOwnProperty.call(r,s)){if(o.includes(s))continue;i[s]=r[s]}return i}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),ig=xt({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js"(e,t){var n=og();function r(o,i){if(o==null)return{};var s,a,l=n(o,i);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(o);for(a=0;a<c.length;a++)s=c[a],i.includes(s)||{}.propertyIsEnumerable.call(o,s)&&(l[s]=o[s])}return l}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),En=St(dn(),1),sg=St(rg(),1),ag=St(ig(),1);const lg=["cursor","direction"];function kr(e){return{path:e.path.join(".")}}function $i(e,t,n){var r;const o=e[0];let i=(r=e[1])===null||r===void 0?void 0:r.input;if(n){var s;i=(0,En.default)((0,En.default)((0,En.default)({},(s=i)!==null&&s!==void 0?s:{}),n.pageParam!==void 0?{cursor:n.pageParam}:{}),{},{direction:n.direction})}return[o.join("."),i,t?.trpc]}async function cg(e,t,n){const o=t.getQueryCache().build(t,{queryKey:n});o.setState({data:[],status:"success"});const i=[];var s=!1,a=!1,l;try{for(var c=(0,sg.default)(e),d;s=!(d=await c.next()).done;s=!1){const u=d.value;i.push(u),o.setState({data:[...i]})}}catch(u){a=!0,l=u}finally{try{s&&c.return!=null&&await c.return()}finally{if(a)throw l}}return i}function nt(e,t,n){const r=e.flatMap(o=>o.split("."));if(!t&&(!n||n==="any"))return r.length?[r]:[];if(n==="infinite"&&vt(t)&&("direction"in t||"cursor"in t)){const{cursor:o,direction:i}=t,s=(0,ag.default)(t,lg);return[r,{input:s,type:"infinite"}]}return[r,(0,En.default)((0,En.default)({},typeof t<"u"&&t!==it&&{input:t}),n&&n!=="any"&&{type:n})]}function sc(e){const t=e.flatMap(n=>n.split("."));return t.length?[t]:[]}function Li(e){return eh(e)?e():e}var Bt=St(dn());function ug(e){var t;const{input:n,query:r,path:o,queryKey:i,opts:s}=e,a=n===it,l=async c=>{var d;const u=(0,Bt.default)((0,Bt.default)({},s),{},{trpc:(0,Bt.default)((0,Bt.default)({},s?.trpc),!(s==null||(d=s.trpc)===null||d===void 0)&&d.abortOnUnmount?{signal:c.signal}:{signal:null})});return await r(...$i(i,u,{direction:c.direction,pageParam:c.pageParam}))};return Object.assign((0,Bt.default)((0,Bt.default)({},s),{},{queryKey:i,queryFn:a?it:l,initialPageParam:(t=s?.initialCursor)!==null&&t!==void 0?t:n?.cursor}),{trpc:kr({path:o})})}var oa=St(dn());function dg(e){var t;const{mutate:n,path:r,opts:o,overrides:i}=e,s=Li(e.queryClient),a=sc(r),l=s.defaultMutationOptions(s.getMutationDefaults(a)),c=(t=i?.onSuccess)!==null&&t!==void 0?t:u=>u.originalFn(),d=async u=>await n(...$i([r,{input:u}],o));return(0,oa.default)((0,oa.default)({},o),{},{mutationKey:a,mutationFn:d,onSuccess(...u){var g,h;return c({originalFn:()=>{var p,v,y;return(p=o==null||(v=o.onSuccess)===null||v===void 0?void 0:v.call(o,...u))!==null&&p!==void 0?p:l==null||(y=l.onSuccess)===null||y===void 0?void 0:y.call(l,...u)},queryClient:s,meta:(g=(h=o?.meta)!==null&&h!==void 0?h:l?.meta)!==null&&g!==void 0?g:{}})},trpc:kr({path:r})})}var qt=St(dn());function fg(e){const{input:t,query:n,path:r,queryKey:o,opts:i}=e,s=Li(e.queryClient),a=t===it,l=async c=>{var d;const u=(0,qt.default)((0,qt.default)({},i),{},{trpc:(0,qt.default)((0,qt.default)({},i?.trpc),!(i==null||(d=i.trpc)===null||d===void 0)&&d.abortOnUnmount?{signal:c.signal}:{signal:null})}),g=c.queryKey,h=await n(...$i(g,u));return nh(h)?cg(h,s,g):h};return Object.assign((0,qt.default)((0,qt.default)({},i),{},{queryKey:o,queryFn:a?it:l}),{trpc:kr({path:r})})}var ia=St(dn(),1);const pg=e=>{var t;const{subscribe:n,path:r,queryKey:o,opts:i={}}=e,s=(t=o[1])===null||t===void 0?void 0:t.input,a="enabled"in i?!!i.enabled:s!==it,l=c=>n(r.join("."),s??void 0,c);return(0,ia.default)((0,ia.default)({},i),{},{enabled:a,subscribe:l,queryKey:o,trpc:kr({path:r})})};var Wt=St(dn(),1);function hg(e){const t=n=>(r,o,i)=>"router"in e?Promise.resolve(Li(e.ctx)).then(a=>vh({router:e.router,path:r,getRawInput:async()=>o,ctx:a,type:n,signal:void 0})):(e.client instanceof ec?e.client:Uh(e.client))[n](r,o,i);return Kl(({args:n,path:r})=>{const o=[...r],i=o.pop(),[s,a]=n;return{"~types":void 0,pathKey:()=>nt(o),pathFilter:()=>(0,Wt.default)((0,Wt.default)({},s),{},{queryKey:nt(o)}),queryOptions:()=>fg({input:s,opts:a,path:o,queryClient:e.queryClient,queryKey:nt(o,s,"query"),query:t("query")}),queryKey:()=>nt(o,s,"query"),queryFilter:()=>(0,Wt.default)((0,Wt.default)({},a),{},{queryKey:nt(o,s,"query")}),infiniteQueryOptions:()=>ug({input:s,opts:a,path:o,queryKey:nt(o,s,"infinite"),query:t("query")}),infiniteQueryKey:()=>nt(o,s,"infinite"),infiniteQueryFilter:()=>(0,Wt.default)((0,Wt.default)({},a),{},{queryKey:nt(o,s,"infinite")}),mutationOptions:()=>{var c;return dg({opts:s,path:o,queryClient:e.queryClient,mutate:t("mutation"),overrides:(c=e.overrides)===null||c===void 0?void 0:c.mutations})},mutationKey:()=>sc(o),subscriptionOptions:()=>pg({opts:a,path:o,queryKey:nt(o,s,"any"),subscribe:t("subscription")})}[i]()})}function gg(){const e=Ee(null),t=Ee(null);function n(i){const s=fe(()=>hg({client:i.trpcClient,queryClient:i.queryClient}),[i.trpcClient,i.queryClient]);return f(e.Provider,{value:i.trpcClient,children:f(t.Provider,{value:s,children:i.children})})}function r(){const i=xe(t);if(!i)throw new Error("useTRPC() can only be used inside of a <TRPCProvider>");return i}function o(){const i=xe(e);if(!i)throw new Error("useTRPCClient() can only be used inside of a <TRPCProvider>");return i}return{TRPCProvider:n,useTRPC:r,useTRPCClient:o}}const{TRPCProvider:mg,useTRPC:Vn}=gg();function vg({children:e}){const t=Vn(),n=Tr(o=>o.setServers),r=Ar(t.servers.list.queryOptions());return j(()=>{r.data&&n(r.data)},[r.data,n]),e}function ac(){return f("div",{children:"NOT FOUND"})}/**
2
+ * table-core
3
+ *
4
+ * Copyright (c) TanStack
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE.md file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */function gt(e,t){return typeof e=="function"?e(t):e}function Te(e,t){return n=>{t.setState(r=>({...r,[e]:gt(n,r[e])}))}}function Fr(e){return e instanceof Function}function yg(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function _g(e,t){const n=[],r=o=>{o.forEach(i=>{n.push(i);const s=t(i);s!=null&&s.length&&r(s)})};return r(e),n}function V(e,t,n){let r=[],o;return i=>{let s;n.key&&n.debug&&(s=Date.now());const a=e(i);if(!(a.length!==r.length||a.some((d,u)=>r[u]!==d)))return o;r=a;let c;if(n.key&&n.debug&&(c=Date.now()),o=t(...a),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const d=Math.round((Date.now()-s)*100)/100,u=Math.round((Date.now()-c)*100)/100,g=u/16,h=(m,p)=>{for(m=String(m);m.length<p;)m=" "+m;return m};console.info(`%c⏱ ${h(u,5)} /${h(d,5)} ms`,`
11
+ font-size: .6rem;
12
+ font-weight: bold;
13
+ color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,n?.key)}return o}}function H(e,t,n,r){return{debug:()=>{var o;return(o=e?.debugAll)!=null?o:e[t]},key:!1,onChange:r}}function bg(e,t,n,r){const o=()=>{var s;return(s=i.getValue())!=null?s:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:V(()=>[e,n,t,i],(s,a,l,c)=>({table:s,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),H(e.options,"debugCells"))};return e._features.forEach(s=>{s.createCell==null||s.createCell(i,n,t,e)},{}),i}function wg(e,t,n,r){var o,i;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let c=(o=(i=a.id)!=null?i:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?o:typeof a.header=="string"?a.header:void 0,d;if(a.accessorFn?d=a.accessorFn:l&&(l.includes(".")?d=g=>{let h=g;for(const p of l.split(".")){var m;h=(m=h)==null?void 0:m[p]}return h}:d=g=>g[a.accessorKey]),!c)throw new Error;let u={id:`${String(c)}`,accessorFn:d,parent:r,depth:n,columnDef:a,columns:[],getFlatColumns:V(()=>[!0],()=>{var g;return[u,...(g=u.columns)==null?void 0:g.flatMap(h=>h.getFlatColumns())]},H(e.options,"debugColumns")),getLeafColumns:V(()=>[e._getOrderColumnsFn()],g=>{var h;if((h=u.columns)!=null&&h.length){let m=u.columns.flatMap(p=>p.getLeafColumns());return g(m)}return[u]},H(e.options,"debugColumns"))};for(const g of e._features)g.createColumn==null||g.createColumn(u,e);return u}const we="debugHeaders";function sa(e,t,n){var r;let i={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const s=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),s.push(l)};return a(i),s},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(s=>{s.createHeader==null||s.createHeader(i,e)}),i}const xg={createTable:e=>{e.getHeaderGroups=V(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var i,s;const a=(i=r?.map(u=>n.find(g=>g.id===u)).filter(Boolean))!=null?i:[],l=(s=o?.map(u=>n.find(g=>g.id===u)).filter(Boolean))!=null?s:[],c=n.filter(u=>!(r!=null&&r.includes(u.id))&&!(o!=null&&o.includes(u.id)));return Jn(t,[...a,...c,...l],e)},H(e.options,we)),e.getCenterHeaderGroups=V(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(i=>!(r!=null&&r.includes(i.id))&&!(o!=null&&o.includes(i.id))),Jn(t,n,e,"center")),H(e.options,we)),e.getLeftHeaderGroups=V(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const i=(o=r?.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?o:[];return Jn(t,i,e,"left")},H(e.options,we)),e.getRightHeaderGroups=V(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const i=(o=r?.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?o:[];return Jn(t,i,e,"right")},H(e.options,we)),e.getFooterGroups=V(()=>[e.getHeaderGroups()],t=>[...t].reverse(),H(e.options,we)),e.getLeftFooterGroups=V(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),H(e.options,we)),e.getCenterFooterGroups=V(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),H(e.options,we)),e.getRightFooterGroups=V(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),H(e.options,we)),e.getFlatHeaders=V(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),H(e.options,we)),e.getLeftFlatHeaders=V(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),H(e.options,we)),e.getCenterFlatHeaders=V(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),H(e.options,we)),e.getRightFlatHeaders=V(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),H(e.options,we)),e.getCenterLeafHeaders=V(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),H(e.options,we)),e.getLeftLeafHeaders=V(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),H(e.options,we)),e.getRightLeafHeaders=V(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),H(e.options,we)),e.getLeafHeaders=V(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,i,s,a,l,c;return[...(o=(i=t[0])==null?void 0:i.headers)!=null?o:[],...(s=(a=n[0])==null?void 0:a.headers)!=null?s:[],...(l=(c=r[0])==null?void 0:c.headers)!=null?l:[]].map(d=>d.getLeafHeaders()).flat()},H(e.options,we))}};function Jn(e,t,n,r){var o,i;let s=0;const a=function(g,h){h===void 0&&(h=1),s=Math.max(s,h),g.filter(m=>m.getIsVisible()).forEach(m=>{var p;(p=m.columns)!=null&&p.length&&a(m.columns,h+1)},0)};a(e);let l=[];const c=(g,h)=>{const m={depth:h,id:[r,`${h}`].filter(Boolean).join("_"),headers:[]},p=[];g.forEach(v=>{const y=[...p].reverse()[0],_=v.column.depth===m.depth;let b,w=!1;if(_&&v.column.parent?b=v.column.parent:(b=v.column,w=!0),y&&y?.column===b)y.subHeaders.push(v);else{const S=sa(n,b,{id:[r,h,b.id,v?.id].filter(Boolean).join("_"),isPlaceholder:w,placeholderId:w?`${p.filter(O=>O.column===b).length}`:void 0,depth:h,index:p.length});S.subHeaders.push(v),p.push(S)}m.headers.push(v),v.headerGroup=m}),l.push(m),h>0&&c(p,h-1)},d=t.map((g,h)=>sa(n,g,{depth:s,index:h}));c(d,s-1),l.reverse();const u=g=>g.filter(m=>m.column.getIsVisible()).map(m=>{let p=0,v=0,y=[0];m.subHeaders&&m.subHeaders.length?(y=[],u(m.subHeaders).forEach(b=>{let{colSpan:w,rowSpan:S}=b;p+=w,y.push(S)})):p=1;const _=Math.min(...y);return v=v+_,m.colSpan=p,m.rowSpan=v,{colSpan:p,rowSpan:v}});return u((o=(i=l[0])==null?void 0:i.headers)!=null?o:[]),l}const Sg=(e,t,n,r,o,i,s)=>{let a={id:t,index:r,original:n,depth:o,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return a._valuesCache[l]=c.accessorFn(a.original,r),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=c.columnDef.getUniqueValues(a.original,r),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var c;return(c=a.getValue(l))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>_g(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],c=a;for(;;){const d=c.getParentRow();if(!d)break;l.push(d),c=d}return l.reverse()},getAllCells:V(()=>[e.getAllLeafColumns()],l=>l.map(c=>bg(e,a,c,c.id)),H(e.options,"debugRows")),_getAllCellsByColumnId:V(()=>[a.getAllCells()],l=>l.reduce((c,d)=>(c[d.column.id]=d,c),{}),H(e.options,"debugRows"))};for(let l=0;l<e._features.length;l++){const c=e._features[l];c==null||c.createRow==null||c.createRow(a,e)}return a},Cg={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},lc=(e,t,n)=>{var r,o;const i=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};lc.autoRemove=e=>Le(e);const cc=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};cc.autoRemove=e=>Le(e);const uc=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};uc.autoRemove=e=>Le(e);const dc=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};dc.autoRemove=e=>Le(e);const fc=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});fc.autoRemove=e=>Le(e)||!(e!=null&&e.length);const pc=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});pc.autoRemove=e=>Le(e)||!(e!=null&&e.length);const hc=(e,t,n)=>e.getValue(t)===n;hc.autoRemove=e=>Le(e);const gc=(e,t,n)=>e.getValue(t)==n;gc.autoRemove=e=>Le(e);const ji=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};ji.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(r)?-1/0:r,s=n===null||Number.isNaN(o)?1/0:o;if(i>s){const a=i;i=s,s=a}return[i,s]};ji.autoRemove=e=>Le(e)||Le(e[0])&&Le(e[1]);const ot={includesString:lc,includesStringSensitive:cc,equalsString:uc,arrIncludes:dc,arrIncludesAll:fc,arrIncludesSome:pc,equals:hc,weakEquals:gc,inNumberRange:ji};function Le(e){return e==null||e===""}const Pg={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Te("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?ot.includesString:typeof r=="number"?ot.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?ot.equals:Array.isArray(r)?ot.arrIncludes:ot.weakEquals},e.getFilterFn=()=>{var n,r;return Fr(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:ot[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),i=r?.find(d=>d.id===e.id),s=gt(n,i?i.value:void 0);if(aa(o,s,e)){var a;return(a=r?.filter(d=>d.id!==e.id))!=null?a:[]}const l={id:e.id,value:s};if(i){var c;return(c=r?.map(d=>d.id===e.id?l:d))!=null?c:[]}return r!=null&&r.length?[...r,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=o=>{var i;return(i=gt(t,o))==null?void 0:i.filter(s=>{const a=n.find(l=>l.id===s.id);if(a){const l=a.getFilterFn();if(aa(l,s.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function aa(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Rg=(e,t,n)=>n.reduce((r,o)=>{const i=o.getValue(e);return r+(typeof i=="number"?i:0)},0),Eg=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}),r},Og=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}),r},Mg=(e,t,n)=>{let r,o;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(r===void 0?s>=s&&(r=o=s):(r>s&&(r=s),o<s&&(o=s)))}),[r,o]},Ig=(e,t)=>{let n=0,r=0;if(t.forEach(o=>{let i=o.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},Ag=(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!yg(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((i,s)=>i-s);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},Tg=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Ng=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,Dg=(e,t)=>t.length,go={sum:Rg,min:Eg,max:Og,extent:Mg,mean:Ig,median:Ag,unique:Tg,uniqueCount:Ng,count:Dg},kg={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Te("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return go.sum;if(Object.prototype.toString.call(r)==="[object Date]")return go.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Fr(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:go[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function Fg(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(i=>!t.includes(i.id));return n==="remove"?r:[...t.map(i=>e.find(s=>s.id===i)).filter(Boolean),...r]}const $g={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Te("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=V(n=>[On(t,n)],n=>n.findIndex(r=>r.id===e.id),H(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=On(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=On(t,n);return((r=o[o.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=V(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let i=[];if(!(t!=null&&t.length))i=o;else{const s=[...t],a=[...o];for(;a.length&&s.length;){const l=s.shift(),c=a.findIndex(d=>d.id===l);c>-1&&i.push(a.splice(c,1)[0])}i=[...i,...a]}return Fg(i,n,r)},H(e.options,"debugTable"))}},mo=()=>({left:[],right:[]}),Lg={getInitialState:e=>({columnPinning:mo(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Te("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var i,s;if(n==="right"){var a,l;return{left:((a=o?.left)!=null?a:[]).filter(u=>!(r!=null&&r.includes(u))),right:[...((l=o?.right)!=null?l:[]).filter(u=>!(r!=null&&r.includes(u))),...r]}}if(n==="left"){var c,d;return{left:[...((c=o?.left)!=null?c:[]).filter(u=>!(r!=null&&r.includes(u))),...r],right:((d=o?.right)!=null?d:[]).filter(u=>!(r!=null&&r.includes(u)))}}return{left:((i=o?.left)!=null?i:[]).filter(u=>!(r!=null&&r.includes(u))),right:((s=o?.right)!=null?s:[]).filter(u=>!(r!=null&&r.includes(u)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,i,s;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((i=(s=t.options.enableColumnPinning)!=null?s:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:r,right:o}=t.getState().columnPinning,i=n.some(a=>r?.includes(a)),s=n.some(a=>o?.includes(a));return i?"left":s?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=V(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const i=[...r??[],...o??[]];return n.filter(s=>!i.includes(s.column.id))},H(t.options,"debugRows")),e.getLeftVisibleCells=V(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(i=>n.find(s=>s.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),H(t.options,"debugRows")),e.getRightVisibleCells=V(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(i=>n.find(s=>s.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),H(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?mo():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:mo())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,i;return!!((o=r.left)!=null&&o.length||(i=r.right)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=V(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),H(e.options,"debugColumns")),e.getRightLeafColumns=V(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),H(e.options,"debugColumns")),e.getCenterLeafColumns=V(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(i=>!o.includes(i.id))},H(e.options,"debugColumns"))}};function jg(e){return e||(typeof document<"u"?document:null)}const Zn={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},vo=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Vg={getDefaultColumnDef:()=>Zn,getInitialState:e=>({columnSizing:{},columnSizingInfo:vo(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Te("columnSizing",e),onColumnSizingInfoChange:Te("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Zn.minSize,(r=i??e.columnDef.size)!=null?r:Zn.size),(o=e.columnDef.maxSize)!=null?o:Zn.maxSize)},e.getStart=V(n=>[n,On(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,i)=>o+i.getSize(),0),H(t.options,"debugColumns")),e.getAfter=V(n=>[n,On(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,i)=>o+i.getSize(),0),H(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var i;n+=(i=o.column.getSize())!=null?i:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=r?.getCanResize();return i=>{if(!r||!o||(i.persist==null||i.persist(),yo(i)&&i.touches&&i.touches.length>1))return;const s=e.getSize(),a=e?e.getLeafHeaders().map(y=>[y.column.id,y.column.getSize()]):[[r.id,r.getSize()]],l=yo(i)?Math.round(i.touches[0].clientX):i.clientX,c={},d=(y,_)=>{typeof _=="number"&&(t.setColumnSizingInfo(b=>{var w,S;const O=t.options.columnResizeDirection==="rtl"?-1:1,C=(_-((w=b?.startOffset)!=null?w:0))*O,x=Math.max(C/((S=b?.startSize)!=null?S:0),-.999999);return b.columnSizingStart.forEach(I=>{let[D,$]=I;c[D]=Math.round(Math.max($+$*x,0)*100)/100}),{...b,deltaOffset:C,deltaPercentage:x}}),(t.options.columnResizeMode==="onChange"||y==="end")&&t.setColumnSizing(b=>({...b,...c})))},u=y=>d("move",y),g=y=>{d("end",y),t.setColumnSizingInfo(_=>({..._,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=jg(n),m={moveHandler:y=>u(y.clientX),upHandler:y=>{h?.removeEventListener("mousemove",m.moveHandler),h?.removeEventListener("mouseup",m.upHandler),g(y.clientX)}},p={moveHandler:y=>(y.cancelable&&(y.preventDefault(),y.stopPropagation()),u(y.touches[0].clientX),!1),upHandler:y=>{var _;h?.removeEventListener("touchmove",p.moveHandler),h?.removeEventListener("touchend",p.upHandler),y.cancelable&&(y.preventDefault(),y.stopPropagation()),g((_=y.touches[0])==null?void 0:_.clientX)}},v=Hg()?{passive:!1}:!1;yo(i)?(h?.addEventListener("touchmove",p.moveHandler,v),h?.addEventListener("touchend",p.upHandler,v)):(h?.addEventListener("mousemove",m.moveHandler,v),h?.addEventListener("mouseup",m.upHandler,v)),t.setColumnSizingInfo(y=>({...y,startOffset:l,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?vo():(n=e.initialState.columnSizingInfo)!=null?n:vo())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let er=null;function Hg(){if(typeof er=="boolean")return er;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return er=e,er}function yo(e){return e.type==="touchstart"}const zg={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Te("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const o=e.columns;return(n=o.length?o.some(i=>i.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=V(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),H(t.options,"debugRows")),e.getVisibleCells=V(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],H(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>V(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),H(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,i)=>({...o,[i.id]:n||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function On(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Gg={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Ug={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Te("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>ot.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Fr(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:ot[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Bg={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Te("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var o,i;e.setExpanded(r?{}:(o=(i=e.initialState)==null?void 0:i.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const s=i.split(".");r=Math.max(r,s.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var o;const i=r===!0?!0:!!(r!=null&&r[e.id]);let s={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{s[a]=!0}):s=r,n=(o=n)!=null?o:!i,!i&&n)return{...s,[e.id]:!0};if(i&&!n){const{[e.id]:a,...l}=s;return l}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},Yo=0,Xo=10,_o=()=>({pageIndex:Yo,pageSize:Xo}),qg={getInitialState:e=>({...e,pagination:{..._o(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Te("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=i=>gt(r,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?_o():(o=e.initialState.pagination)!=null?o:_o())},e.setPageIndex=r=>{e.setPagination(o=>{let i=gt(r,o.pageIndex);const s=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,s)),{...o,pageIndex:i}})},e.resetPageIndex=r=>{var o,i;e.setPageIndex(r?Yo:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?o:Yo)},e.resetPageSize=r=>{var o,i;e.setPageSize(r?Xo:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?o:Xo)},e.setPageSize=r=>{e.setPagination(o=>{const i=Math.max(1,gt(r,o.pageSize)),s=o.pageSize*o.pageIndex,a=Math.floor(s/i);return{...o,pageIndex:a,pageSize:i}})},e.setPageCount=r=>e.setPagination(o=>{var i;let s=gt(r,(i=e.options.pageCount)!=null?i:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...o,pageCount:s}}),e.getPageOptions=V(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((i,s)=>s)),o},H(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:r<o-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},bo=()=>({top:[],bottom:[]}),Wg={getInitialState:e=>({rowPinning:bo(),...e}),getDefaultOptions:e=>({onRowPinningChange:Te("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],s=o?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],a=new Set([...s,e.id,...i]);t.setRowPinning(l=>{var c,d;if(n==="bottom"){var u,g;return{top:((u=l?.top)!=null?u:[]).filter(p=>!(a!=null&&a.has(p))),bottom:[...((g=l?.bottom)!=null?g:[]).filter(p=>!(a!=null&&a.has(p))),...Array.from(a)]}}if(n==="top"){var h,m;return{top:[...((h=l?.top)!=null?h:[]).filter(p=>!(a!=null&&a.has(p))),...Array.from(a)],bottom:((m=l?.bottom)!=null?m:[]).filter(p=>!(a!=null&&a.has(p)))}}return{top:((c=l?.top)!=null?c:[]).filter(p=>!(a!=null&&a.has(p))),bottom:((d=l?.bottom)!=null?d:[]).filter(p=>!(a!=null&&a.has(p)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some(a=>r?.includes(a)),s=n.some(a=>o?.includes(a));return i?"top":s?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=(n=o==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(s=>{let{id:a}=s;return a});return(r=i?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?bo():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:bo())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,i;return!!((o=r.top)!=null&&o.length||(i=r.bottom)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(s=>{const a=e.getRow(s,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(s=>t.find(a=>a.id===s))).filter(Boolean).map(s=>({...s,position:r}))},e.getTopRows=V(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),H(e.options,"debugRows")),e.getBottomRows=V(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),H(e.options,"debugRows")),e.getCenterRows=V(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(i=>!o.has(i.id))},H(e.options,"debugRows"))}},Kg={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Te("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(i=>{i.getCanSelect()&&(r[i.id]=!0)}):o.forEach(i=>{delete r[i.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(i=>{Jo(o,i.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=V(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?wo(e,n):{rows:[],flatRows:[],rowsById:{}},H(e.options,"debugTable")),e.getFilteredSelectedRowModel=V(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?wo(e,n):{rows:[],flatRows:[],rowsById:{}},H(e.options,"debugTable")),e.getGroupedSelectedRowModel=V(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?wo(e,n):{rows:[],flatRows:[],rowsById:{}},H(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection(i=>{var s;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return i;const a={...i};return Jo(a,e.id,n,(s=r?.selectChildren)!=null?s:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Vi(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Zo(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Zo(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},Jo=(e,t,n,r,o)=>{var i;const s=o.getRow(t,!0);n?(s.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),s.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(i=s.subRows)!=null&&i.length&&s.getCanSelectSubRows()&&s.subRows.forEach(a=>Jo(e,a.id,n,r,o))};function wo(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(s,a){return s.map(l=>{var c;const d=Vi(l,n);if(d&&(r.push(l),o[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:i(l.subRows)}),d)return l}).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function Vi(e,t){var n;return(n=t[e.id])!=null?n:!1}function Zo(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,i=!1;return e.subRows.forEach(s=>{if(!(i&&!o)&&(s.getCanSelect()&&(Vi(s,t)?i=!0:o=!1),s.subRows&&s.subRows.length)){const a=Zo(s,t);a==="all"?i=!0:(a==="some"&&(i=!0),o=!1)}}),o?"all":i?"some":!1}const ei=/([0-9]+)/gm,Qg=(e,t,n)=>mc(yt(e.getValue(n)).toLowerCase(),yt(t.getValue(n)).toLowerCase()),Yg=(e,t,n)=>mc(yt(e.getValue(n)),yt(t.getValue(n))),Xg=(e,t,n)=>Hi(yt(e.getValue(n)).toLowerCase(),yt(t.getValue(n)).toLowerCase()),Jg=(e,t,n)=>Hi(yt(e.getValue(n)),yt(t.getValue(n))),Zg=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},em=(e,t,n)=>Hi(e.getValue(n),t.getValue(n));function Hi(e,t){return e===t?0:e>t?1:-1}function yt(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function mc(e,t){const n=e.split(ei).filter(Boolean),r=t.split(ei).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),i=r.shift(),s=parseInt(o,10),a=parseInt(i,10),l=[s,a].sort();if(isNaN(l[0])){if(o>i)return 1;if(i>o)return-1;continue}if(isNaN(l[1]))return isNaN(s)?-1:1;if(s>a)return 1;if(a>s)return-1}return n.length-r.length}const vn={alphanumeric:Qg,alphanumericCaseSensitive:Yg,text:Xg,textCaseSensitive:Jg,datetime:Zg,basic:em},tm={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Te("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const i=o?.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return vn.datetime;if(typeof i=="string"&&(r=!0,i.split(ei).length>1))return vn.alphanumeric}return r?vn.text:vn.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Fr(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:vn[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=typeof n<"u"&&n!==null;t.setSorting(s=>{const a=s?.find(h=>h.id===e.id),l=s?.findIndex(h=>h.id===e.id);let c=[],d,u=i?n:o==="desc";if(s!=null&&s.length&&e.getCanMultiSort()&&r?a?d="toggle":d="add":s!=null&&s.length&&l!==s.length-1?d="replace":a?d="toggle":d="replace",d==="toggle"&&(i||o||(d="remove")),d==="add"){var g;c=[...s,{id:e.id,desc:u}],c.splice(0,c.length-((g=t.options.maxMultiSortColCount)!=null?g:Number.MAX_SAFE_INTEGER))}else d==="toggle"?c=s.map(h=>h.id===e.id?{...h,desc:u}:h):d==="remove"?c=s.filter(h=>h.id!==e.id):c=[{id:e.id,desc:u}];return c})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const i=e.getFirstSortDir(),s=e.getIsSorted();return s?s!==i&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:s==="desc"?"asc":"desc":i},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},nm=[xg,zg,$g,Lg,Cg,Pg,Gg,Ug,tm,kg,Bg,qg,Wg,Kg,Vg];function rm(e){var t,n;const r=[...nm,...(t=e._features)!=null?t:[]];let o={_features:r};const i=o._features.reduce((g,h)=>Object.assign(g,h.getDefaultOptions==null?void 0:h.getDefaultOptions(o)),{}),s=g=>o.options.mergeOptions?o.options.mergeOptions(i,g):{...i,...g};let l={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(g=>{var h;l=(h=g.getInitialState==null?void 0:g.getInitialState(l))!=null?h:l});const c=[];let d=!1;const u={_features:r,options:{...i,...e},initialState:l,_queue:g=>{c.push(g),d||(d=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();d=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{o.setState(o.initialState)},setOptions:g=>{const h=gt(g,o.options);o.options=s(h)},getState:()=>o.options.state,setState:g=>{o.options.onStateChange==null||o.options.onStateChange(g)},_getRowId:(g,h,m)=>{var p;return(p=o.options.getRowId==null?void 0:o.options.getRowId(g,h,m))!=null?p:`${m?[m.id,h].join("."):h}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(g,h)=>{let m=(h?o.getPrePaginationRowModel():o.getRowModel()).rowsById[g];if(!m&&(m=o.getCoreRowModel().rowsById[g],!m))throw new Error;return m},_getDefaultColumnDef:V(()=>[o.options.defaultColumn],g=>{var h;return g=(h=g)!=null?h:{},{header:m=>{const p=m.header.column.columnDef;return p.accessorKey?p.accessorKey:p.accessorFn?p.id:null},cell:m=>{var p,v;return(p=(v=m.renderValue())==null||v.toString==null?void 0:v.toString())!=null?p:null},...o._features.reduce((m,p)=>Object.assign(m,p.getDefaultColumnDef==null?void 0:p.getDefaultColumnDef()),{}),...g}},H(e,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:V(()=>[o._getColumnDefs()],g=>{const h=function(m,p,v){return v===void 0&&(v=0),m.map(y=>{const _=wg(o,y,v,p),b=y;return _.columns=b.columns?h(b.columns,_,v+1):[],_})};return h(g)},H(e,"debugColumns")),getAllFlatColumns:V(()=>[o.getAllColumns()],g=>g.flatMap(h=>h.getFlatColumns()),H(e,"debugColumns")),_getAllFlatColumnsById:V(()=>[o.getAllFlatColumns()],g=>g.reduce((h,m)=>(h[m.id]=m,h),{}),H(e,"debugColumns")),getAllLeafColumns:V(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(g,h)=>{let m=g.flatMap(p=>p.getLeafColumns());return h(m)},H(e,"debugColumns")),getColumn:g=>o._getAllFlatColumnsById()[g]};Object.assign(o,u);for(let g=0;g<o._features.length;g++){const h=o._features[g];h==null||h.createTable==null||h.createTable(o)}return o}function om(){return e=>V(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,i,s){i===void 0&&(i=0);const a=[];for(let c=0;c<o.length;c++){const d=Sg(e,e._getRowId(o[c],c,s),o[c],c,i,void 0,s?.id);if(n.flatRows.push(d),n.rowsById[d.id]=d,a.push(d),e.options.getSubRows){var l;d.originalSubRows=e.options.getSubRows(o[c],c),(l=d.originalSubRows)!=null&&l.length&&(d.subRows=r(d.originalSubRows,i+1,d))}}return a};return n.rows=r(t),n},H(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}/**
14
+ * react-table
15
+ *
16
+ * Copyright (c) TanStack
17
+ *
18
+ * This source code is licensed under the MIT license found in the
19
+ * LICENSE.md file in the root directory of this source tree.
20
+ *
21
+ * @license MIT
22
+ */function la(e,t){return e?im(e)?te(e,t):e:null}function im(e){return sm(e)||typeof e=="function"||am(e)}function sm(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function am(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function lm(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=F(()=>({current:rm(t)})),[r,o]=F(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...r,...e.state},onStateChange:s=>{o(s),e.onStateChange==null||e.onStateChange(s)}})),n.current}/**
23
+ * @license lucide-react v0.539.0 - ISC
24
+ *
25
+ * This source code is licensed under the ISC license.
26
+ * See the LICENSE file in the root directory of this source tree.
27
+ */const cm=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),um=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),ca=e=>{const t=um(e);return t.charAt(0).toUpperCase()+t.slice(1)},vc=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),dm=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
28
+ * @license lucide-react v0.539.0 - ISC
29
+ *
30
+ * This source code is licensed under the ISC license.
31
+ * See the LICENSE file in the root directory of this source tree.
32
+ */var fm={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
33
+ * @license lucide-react v0.539.0 - ISC
34
+ *
35
+ * This source code is licensed under the ISC license.
36
+ * See the LICENSE file in the root directory of this source tree.
37
+ */const pm=R(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>te("svg",{ref:l,...fm,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:vc("lucide",o),...!i&&!dm(a)&&{"aria-hidden":"true"},...a},[...s.map(([c,d])=>te(c,d)),...Array.isArray(i)?i:[i]]));/**
38
+ * @license lucide-react v0.539.0 - ISC
39
+ *
40
+ * This source code is licensed under the ISC license.
41
+ * See the LICENSE file in the root directory of this source tree.
42
+ */const Oe=(e,t)=>{const n=R(({className:r,...o},i)=>te(pm,{ref:i,iconNode:t,className:vc(`lucide-${cm(ca(e))}`,`lucide-${e}`,r),...o}));return n.displayName=ca(e),n};/**
43
+ * @license lucide-react v0.539.0 - ISC
44
+ *
45
+ * This source code is licensed under the ISC license.
46
+ * See the LICENSE file in the root directory of this source tree.
47
+ */const hm=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],gm=Oe("arrow-down",hm);/**
48
+ * @license lucide-react v0.539.0 - ISC
49
+ *
50
+ * This source code is licensed under the ISC license.
51
+ * See the LICENSE file in the root directory of this source tree.
52
+ */const mm=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],vm=Oe("arrow-up-down",mm);/**
53
+ * @license lucide-react v0.539.0 - ISC
54
+ *
55
+ * This source code is licensed under the ISC license.
56
+ * See the LICENSE file in the root directory of this source tree.
57
+ */const ym=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],_m=Oe("arrow-up",ym);/**
58
+ * @license lucide-react v0.539.0 - ISC
59
+ *
60
+ * This source code is licensed under the ISC license.
61
+ * See the LICENSE file in the root directory of this source tree.
62
+ */const bm=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],yc=Oe("check",bm);/**
63
+ * @license lucide-react v0.539.0 - ISC
64
+ *
65
+ * This source code is licensed under the ISC license.
66
+ * See the LICENSE file in the root directory of this source tree.
67
+ */const wm=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],_c=Oe("chevron-down",wm);/**
68
+ * @license lucide-react v0.539.0 - ISC
69
+ *
70
+ * This source code is licensed under the ISC license.
71
+ * See the LICENSE file in the root directory of this source tree.
72
+ */const xm=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m12 8-4 4 4 4",key:"15vm53"}],["path",{d:"M16 12H8",key:"1fr5h0"}]],Sm=Oe("circle-arrow-left",xm);/**
73
+ * @license lucide-react v0.539.0 - ISC
74
+ *
75
+ * This source code is licensed under the ISC license.
76
+ * See the LICENSE file in the root directory of this source tree.
77
+ */const Cm=[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]],ua=Oe("hourglass",Cm);/**
78
+ * @license lucide-react v0.539.0 - ISC
79
+ *
80
+ * This source code is licensed under the ISC license.
81
+ * See the LICENSE file in the root directory of this source tree.
82
+ */const Pm=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Rm=Oe("info",Pm);/**
83
+ * @license lucide-react v0.539.0 - ISC
84
+ *
85
+ * This source code is licensed under the ISC license.
86
+ * See the LICENSE file in the root directory of this source tree.
87
+ */const Em=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]],Om=Oe("list-filter",Em);/**
88
+ * @license lucide-react v0.539.0 - ISC
89
+ *
90
+ * This source code is licensed under the ISC license.
91
+ * See the LICENSE file in the root directory of this source tree.
92
+ */const Mm=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],Im=Oe("pause",Mm);/**
93
+ * @license lucide-react v0.539.0 - ISC
94
+ *
95
+ * This source code is licensed under the ISC license.
96
+ * See the LICENSE file in the root directory of this source tree.
97
+ */const Am=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Tm=Oe("play",Am);/**
98
+ * @license lucide-react v0.539.0 - ISC
99
+ *
100
+ * This source code is licensed under the ISC license.
101
+ * See the LICENSE file in the root directory of this source tree.
102
+ */const Nm=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Dm=Oe("refresh-cw",Nm);/**
103
+ * @license lucide-react v0.539.0 - ISC
104
+ *
105
+ * This source code is licensed under the ISC license.
106
+ * See the LICENSE file in the root directory of this source tree.
107
+ */const km=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Fm=Oe("trash-2",km);/**
108
+ * @license lucide-react v0.539.0 - ISC
109
+ *
110
+ * This source code is licensed under the ISC license.
111
+ * See the LICENSE file in the root directory of this source tree.
112
+ */const $m=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],bc=Oe("x",$m);function da(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function $r(...e){return t=>{let n=!1;const r=e.map(o=>{const i=da(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():da(e[o],null)}}}}function ne(...e){return z($r(...e),e)}function an(e){const t=Lm(e),n=R((r,o)=>{const{children:i,...s}=r,a=Ye.toArray(i),l=a.find(Vm);if(l){const c=l.props.children,d=a.map(u=>u===l?Ye.count(c)>1?Ye.only(null):at(c)?c.props.children:null:u);return f(t,{...s,ref:o,children:at(c)?un(c,void 0,d):null})}return f(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Lm(e){const t=R((n,r)=>{const{children:o,...i}=n;if(at(o)){const s=zm(o),a=Hm(i,o.props);return o.type!==ge&&(a.ref=r?$r(r,s):s),un(o,a)}return Ye.count(o)>1?Ye.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jm=Symbol("radix.slottable");function Vm(e){return at(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===jm}function Hm(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function zm(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Gm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],W=Gm.reduce((e,t)=>{const n=an(`Primitive.${t}`),r=R((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function wc(e,t){e&&Ir(()=>e.dispatchEvent(t))}var Um="Label",xc=R((e,t)=>f(W.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));xc.displayName=Um;var Bm=xc;function Sc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Sc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Cc(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Sc(e))&&(r&&(r+=" "),r+=t);return r}const fa=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,pa=Cc,ut=(e,t)=>n=>{var r;if(t?.variants==null)return pa(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const d=n?.[c],u=i?.[c];if(d===null)return null;const g=fa(d)||fa(u);return o[c][g]}),a=n&&Object.entries(n).reduce((c,d)=>{let[u,g]=d;return g===void 0||(c[u]=g),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:u,className:g,...h}=d;return Object.entries(h).every(m=>{let[p,v]=m;return Array.isArray(v)?v.includes({...i,...a}[p]):{...i,...a}[p]===v})?[...c,u,g]:c},[]);return pa(e,s,l,n?.class,n?.className)},zi="-",qm=e=>{const t=Km(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const a=s.split(zi);return a[0]===""&&a.length!==1&&a.shift(),Pc(a,t)||Wm(s)},getConflictingClassGroupIds:(s,a)=>{const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}}},Pc=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Pc(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(zi);return t.validators.find(({validator:s})=>s(i))?.classGroupId},ha=/^\[(.+)\]$/,Wm=e=>{if(ha.test(e)){const t=ha.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Km=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)ti(n[o],r,o,t);return r},ti=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:ga(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(Qm(o)){ti(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{ti(s,ga(t,i),n,r)})})},ga=(e,t)=>{let n=e;return t.split(zi).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Qm=e=>e.isThemeGetter,Ym=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,s)=>{n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}},ni="!",ri=":",Xm=ri.length,Jm=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,l=0,c;for(let m=0;m<o.length;m++){let p=o[m];if(s===0&&a===0){if(p===ri){i.push(o.slice(l,m)),l=m+Xm;continue}if(p==="/"){c=m;continue}}p==="["?s++:p==="]"?s--:p==="("?a++:p===")"&&a--}const d=i.length===0?o:o.substring(l),u=Zm(d),g=u!==d,h=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:g,baseClassName:u,maybePostfixModifierPosition:h}};if(t){const o=t+ri,i=r;r=s=>s.startsWith(o)?i(s.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Zm=e=>e.endsWith(ni)?e.substring(0,e.length-1):e.startsWith(ni)?e.substring(1):e,ev=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let i=[];return r.forEach(s=>{s[0]==="["||t[s]?(o.push(...i.sort(),s),i=[]):i.push(s)}),o.push(...i.sort()),o}},tv=e=>({cache:Ym(e.cacheSize),parseClassName:Jm(e),sortModifiers:ev(e),...qm(e)}),nv=/\s+/,rv=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(nv);let l="";for(let c=a.length-1;c>=0;c-=1){const d=a[c],{isExternal:u,modifiers:g,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:p}=n(d);if(u){l=d+(l.length>0?" "+l:l);continue}let v=!!p,y=r(v?m.substring(0,p):m);if(!y){if(!v){l=d+(l.length>0?" "+l:l);continue}if(y=r(m),!y){l=d+(l.length>0?" "+l:l);continue}v=!1}const _=i(g).join(":"),b=h?_+ni:_,w=b+y;if(s.includes(w))continue;s.push(w);const S=o(y,v);for(let O=0;O<S.length;++O){const C=S[O];s.push(b+C)}l=d+(l.length>0?" "+l:l)}return l};function ov(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Rc(t))&&(r&&(r+=" "),r+=n);return r}const Rc=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Rc(e[r]))&&(n&&(n+=" "),n+=t);return n};function iv(e,...t){let n,r,o,i=s;function s(l){const c=t.reduce((d,u)=>u(d),e());return n=tv(c),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const d=rv(l,n);return o(l,d),d}return function(){return i(ov.apply(null,arguments))}}const me=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ec=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Oc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sv=/^\d+\/\d+$/,av=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lv=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,cv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,uv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Kt=e=>sv.test(e),K=e=>!!e&&!Number.isNaN(Number(e)),pt=e=>!!e&&Number.isInteger(Number(e)),xo=e=>e.endsWith("%")&&K(e.slice(0,-1)),rt=e=>av.test(e),fv=()=>!0,pv=e=>lv.test(e)&&!cv.test(e),Mc=()=>!1,hv=e=>uv.test(e),gv=e=>dv.test(e),mv=e=>!T(e)&&!N(e),vv=e=>fn(e,Tc,Mc),T=e=>Ec.test(e),Et=e=>fn(e,Nc,pv),So=e=>fn(e,xv,K),ma=e=>fn(e,Ic,Mc),yv=e=>fn(e,Ac,gv),tr=e=>fn(e,Dc,hv),N=e=>Oc.test(e),yn=e=>pn(e,Nc),_v=e=>pn(e,Sv),va=e=>pn(e,Ic),bv=e=>pn(e,Tc),wv=e=>pn(e,Ac),nr=e=>pn(e,Dc,!0),fn=(e,t,n)=>{const r=Ec.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},pn=(e,t,n=!1)=>{const r=Oc.exec(e);return r?r[1]?t(r[1]):n:!1},Ic=e=>e==="position"||e==="percentage",Ac=e=>e==="image"||e==="url",Tc=e=>e==="length"||e==="size"||e==="bg-size",Nc=e=>e==="length",xv=e=>e==="number",Sv=e=>e==="family-name",Dc=e=>e==="shadow",Cv=()=>{const e=me("color"),t=me("font"),n=me("text"),r=me("font-weight"),o=me("tracking"),i=me("leading"),s=me("breakpoint"),a=me("container"),l=me("spacing"),c=me("radius"),d=me("shadow"),u=me("inset-shadow"),g=me("text-shadow"),h=me("drop-shadow"),m=me("blur"),p=me("perspective"),v=me("aspect"),y=me("ease"),_=me("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...w(),N,T],O=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto","contain","none"],x=()=>[N,T,l],I=()=>[Kt,"full","auto",...x()],D=()=>[pt,"none","subgrid",N,T],$=()=>["auto",{span:["full",pt,N,T]},pt,N,T],U=()=>[pt,"auto",N,T],Y=()=>["auto","min","max","fr",N,T],B=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],X=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...x()],q=()=>[Kt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],P=()=>[e,N,T],A=()=>[...w(),va,ma,{position:[N,T]}],ce=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ye=()=>["auto","cover","contain",bv,vv,{size:[N,T]}],Se=()=>[xo,yn,Et],ae=()=>["","none","full",c,N,T],se=()=>["",K,yn,Et],Re=()=>["solid","dashed","dotted","double"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],E=()=>[K,xo,va,ma],re=()=>["","none",m,N,T],he=()=>["none",K,N,T],Z=()=>["none",K,N,T],oe=()=>[K,N,T],le=()=>[Kt,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[rt],breakpoint:[rt],color:[fv],container:[rt],"drop-shadow":[rt],ease:["in","out","in-out"],font:[mv],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[rt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[rt],shadow:[rt],spacing:["px",K],text:[rt],"text-shadow":[rt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Kt,T,N,v]}],container:["container"],columns:[{columns:[K,T,N,a]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[pt,"auto",N,T]}],basis:[{basis:[Kt,"full","auto",a,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[K,Kt,"auto","initial","none",T]}],grow:[{grow:["",K,N,T]}],shrink:[{shrink:["",K,N,T]}],order:[{order:[pt,"first","last","none",N,T]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Y()}],"auto-rows":[{"auto-rows":Y()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...B(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...B()]}],"align-items":[{items:[...X(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...X(),{baseline:["","last"]}]}],"place-content":[{"place-content":B()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],w:[{w:[a,"screen",...q()]}],"min-w":[{"min-w":[a,"screen","none",...q()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",n,yn,Et]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,N,So]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",xo,T]}],"font-family":[{font:[_v,T,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,N,T]}],"line-clamp":[{"line-clamp":[K,"none",N,So]}],leading:[{leading:[i,...x()]}],"list-image":[{"list-image":["none",N,T]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",N,T]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Re(),"wavy"]}],"text-decoration-thickness":[{decoration:[K,"from-font","auto",N,Et]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[K,"auto",N,T]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",N,T]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",N,T]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:A()}],"bg-repeat":[{bg:ce()}],"bg-size":[{bg:ye()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pt,N,T],radial:["",N,T],conic:[pt,N,T]},wv,yv]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:Se()}],"gradient-via-pos":[{via:Se()}],"gradient-to-pos":[{to:Se()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Re(),"hidden","none"]}],"divide-style":[{divide:[...Re(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...Re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[K,N,T]}],"outline-w":[{outline:["",K,yn,Et]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",d,nr,tr]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",u,nr,tr]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[K,Et]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",g,nr,tr]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[K,N,T]}],"mix-blend":[{"mix-blend":[...be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":be()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[K]}],"mask-image-linear-from-pos":[{"mask-linear-from":E()}],"mask-image-linear-to-pos":[{"mask-linear-to":E()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":E()}],"mask-image-t-to-pos":[{"mask-t-to":E()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":E()}],"mask-image-r-to-pos":[{"mask-r-to":E()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":E()}],"mask-image-b-to-pos":[{"mask-b-to":E()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":E()}],"mask-image-l-to-pos":[{"mask-l-to":E()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":E()}],"mask-image-x-to-pos":[{"mask-x-to":E()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":E()}],"mask-image-y-to-pos":[{"mask-y-to":E()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[N,T]}],"mask-image-radial-from-pos":[{"mask-radial-from":E()}],"mask-image-radial-to-pos":[{"mask-radial-to":E()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[K]}],"mask-image-conic-from-pos":[{"mask-conic-from":E()}],"mask-image-conic-to-pos":[{"mask-conic-to":E()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:A()}],"mask-repeat":[{mask:ce()}],"mask-size":[{mask:ye()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",N,T]}],filter:[{filter:["","none",N,T]}],blur:[{blur:re()}],brightness:[{brightness:[K,N,T]}],contrast:[{contrast:[K,N,T]}],"drop-shadow":[{"drop-shadow":["","none",h,nr,tr]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",K,N,T]}],"hue-rotate":[{"hue-rotate":[K,N,T]}],invert:[{invert:["",K,N,T]}],saturate:[{saturate:[K,N,T]}],sepia:[{sepia:["",K,N,T]}],"backdrop-filter":[{"backdrop-filter":["","none",N,T]}],"backdrop-blur":[{"backdrop-blur":re()}],"backdrop-brightness":[{"backdrop-brightness":[K,N,T]}],"backdrop-contrast":[{"backdrop-contrast":[K,N,T]}],"backdrop-grayscale":[{"backdrop-grayscale":["",K,N,T]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[K,N,T]}],"backdrop-invert":[{"backdrop-invert":["",K,N,T]}],"backdrop-opacity":[{"backdrop-opacity":[K,N,T]}],"backdrop-saturate":[{"backdrop-saturate":[K,N,T]}],"backdrop-sepia":[{"backdrop-sepia":["",K,N,T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",N,T]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[K,"initial",N,T]}],ease:[{ease:["linear","initial",y,N,T]}],delay:[{delay:[K,N,T]}],animate:[{animate:["none",_,N,T]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,N,T]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:oe()}],"skew-x":[{"skew-x":oe()}],"skew-y":[{"skew-y":oe()}],transform:[{transform:[N,T,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:le()}],"translate-x":[{"translate-x":le()}],"translate-y":[{"translate-y":le()}],"translate-z":[{"translate-z":le()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",N,T]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",N,T]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[K,yn,Et,So]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Pv=iv(Cv);function Q(...e){return Pv(Cc(e))}const Rv=ut("leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ev=({className:e,...t})=>f(Bm,{className:Q(Rv(),e),...t});function ya(e,[t,n]){return Math.min(n,Math.max(t,e))}function k(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Ov(e,t){const n=Ee(t),r=i=>{const{children:s,...a}=i,l=fe(()=>a,Object.values(a));return f(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(i){const s=xe(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function dt(e,t=[]){let n=[];function r(i,s){const a=Ee(s),l=n.length;n=[...n,s];const c=u=>{const{scope:g,children:h,...m}=u,p=g?.[e]?.[l]||a,v=fe(()=>m,Object.values(m));return f(p.Provider,{value:v,children:h})};c.displayName=i+"Provider";function d(u,g){const h=g?.[e]?.[l]||a,m=xe(h);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${u}\` must be used within \`${i}\``)}return[c,d]}const o=()=>{const i=n.map(s=>Ee(s));return function(a){const l=a?.[e]||i;return fe(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,Mv(o,...t)]}function Mv(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:l,scopeName:c})=>{const u=l(i)[`__scope${c}`];return{...a,...u}},{});return fe(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Lr(e){const t=e+"CollectionProvider",[n,r]=dt(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=p=>{const{scope:v,children:y}=p,_=ee.useRef(null),b=ee.useRef(new Map).current;return f(o,{scope:v,itemMap:b,collectionRef:_,children:y})};s.displayName=t;const a=e+"CollectionSlot",l=an(a),c=ee.forwardRef((p,v)=>{const{scope:y,children:_}=p,b=i(a,y),w=ne(v,b.collectionRef);return f(l,{ref:w,children:_})});c.displayName=a;const d=e+"CollectionItemSlot",u="data-radix-collection-item",g=an(d),h=ee.forwardRef((p,v)=>{const{scope:y,children:_,...b}=p,w=ee.useRef(null),S=ne(v,w),O=i(d,y);return ee.useEffect(()=>(O.itemMap.set(w,{ref:w,...b}),()=>void O.itemMap.delete(w))),f(g,{[u]:"",ref:S,children:_})});h.displayName=d;function m(p){const v=i(e+"CollectionConsumer",p);return ee.useCallback(()=>{const _=v.collectionRef.current;if(!_)return[];const b=Array.from(_.querySelectorAll(`[${u}]`));return Array.from(v.itemMap.values()).sort((O,C)=>b.indexOf(O.ref.current)-b.indexOf(C.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:c,ItemSlot:h},m,r]}var Iv=Ee(void 0);function jr(e){const t=xe(Iv);return e||t||"ltr"}function Je(e){const t=M(e);return j(()=>{t.current=e}),fe(()=>(...n)=>t.current?.(...n),[])}function Av(e,t=globalThis?.document){const n=Je(e);j(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Tv="DismissableLayer",oi="dismissableLayer.update",Nv="dismissableLayer.pointerDownOutside",Dv="dismissableLayer.focusOutside",_a,kc=Ee({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Vr=R((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,c=xe(kc),[d,u]=F(null),g=d?.ownerDocument??globalThis?.document,[,h]=F({}),m=ne(t,C=>u(C)),p=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=p.indexOf(v),_=d?p.indexOf(d):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,w=_>=y,S=$v(C=>{const x=C.target,I=[...c.branches].some(D=>D.contains(x));!w||I||(o?.(C),s?.(C),C.defaultPrevented||a?.())},g),O=Lv(C=>{const x=C.target;[...c.branches].some(D=>D.contains(x))||(i?.(C),s?.(C),C.defaultPrevented||a?.())},g);return Av(C=>{_===c.layers.size-1&&(r?.(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},g),j(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(_a=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),ba(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=_a)}},[d,g,n,c]),j(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),ba())},[d,c]),j(()=>{const C=()=>h({});return document.addEventListener(oi,C),()=>document.removeEventListener(oi,C)},[]),f(W.div,{...l,ref:m,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:k(e.onFocusCapture,O.onFocusCapture),onBlurCapture:k(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:k(e.onPointerDownCapture,S.onPointerDownCapture)})});Vr.displayName=Tv;var kv="DismissableLayerBranch",Fv=R((e,t)=>{const n=xe(kc),r=M(null),o=ne(t,r);return j(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),f(W.div,{...e,ref:o})});Fv.displayName=kv;function $v(e,t=globalThis?.document){const n=Je(e),r=M(!1),o=M(()=>{});return j(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){Fc(Nv,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Lv(e,t=globalThis?.document){const n=Je(e),r=M(!1);return j(()=>{const o=i=>{i.target&&!r.current&&Fc(Dv,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ba(){const e=new CustomEvent(oi);document.dispatchEvent(e)}function Fc(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?wc(o,i):o.dispatchEvent(i)}var Co=0;function Gi(){j(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??wa()),document.body.insertAdjacentElement("beforeend",e[1]??wa()),Co++,()=>{Co===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Co--}},[])}function wa(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Po="focusScope.autoFocusOnMount",Ro="focusScope.autoFocusOnUnmount",xa={bubbles:!1,cancelable:!0},jv="FocusScope",Hr=R((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=F(null),c=Je(o),d=Je(i),u=M(null),g=ne(t,p=>l(p)),h=M({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j(()=>{if(r){let p=function(b){if(h.paused||!a)return;const w=b.target;a.contains(w)?u.current=w:ht(u.current,{select:!0})},v=function(b){if(h.paused||!a)return;const w=b.relatedTarget;w!==null&&(a.contains(w)||ht(u.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&ht(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",v);const _=new MutationObserver(y);return a&&_.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",v),_.disconnect()}}},[r,a,h.paused]),j(()=>{if(a){Ca.add(h);const p=document.activeElement;if(!a.contains(p)){const y=new CustomEvent(Po,xa);a.addEventListener(Po,c),a.dispatchEvent(y),y.defaultPrevented||(Vv(Bv($c(a)),{select:!0}),document.activeElement===p&&ht(a))}return()=>{a.removeEventListener(Po,c),setTimeout(()=>{const y=new CustomEvent(Ro,xa);a.addEventListener(Ro,d),a.dispatchEvent(y),y.defaultPrevented||ht(p??document.body,{select:!0}),a.removeEventListener(Ro,d),Ca.remove(h)},0)}}},[a,c,d,h]);const m=z(p=>{if(!n&&!r||h.paused)return;const v=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,y=document.activeElement;if(v&&y){const _=p.currentTarget,[b,w]=Hv(_);b&&w?!p.shiftKey&&y===w?(p.preventDefault(),n&&ht(b,{select:!0})):p.shiftKey&&y===b&&(p.preventDefault(),n&&ht(w,{select:!0})):y===_&&p.preventDefault()}},[n,r,h.paused]);return f(W.div,{tabIndex:-1,...s,ref:g,onKeyDown:m})});Hr.displayName=jv;function Vv(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ht(r,{select:t}),document.activeElement!==n)return}function Hv(e){const t=$c(e),n=Sa(t,e),r=Sa(t.reverse(),e);return[n,r]}function $c(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Sa(e,t){for(const n of e)if(!zv(n,{upTo:t}))return n}function zv(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Gv(e){return e instanceof HTMLInputElement&&"select"in e}function ht(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Gv(e)&&t&&e.select()}}var Ca=Uv();function Uv(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Pa(e,t),e.unshift(t)},remove(t){e=Pa(e,t),e[0]?.resume()}}}function Pa(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Bv(e){return e.filter(t=>t.tagName!=="A")}var _e=globalThis?.document?ze:()=>{},qv=Dl[" useId ".trim().toString()]||(()=>{}),Wv=0;function je(e){const[t,n]=F(qv());return _e(()=>{n(r=>r??String(Wv++))},[e]),e||(t?`radix-${t}`:"")}const Kv=["top","right","bottom","left"],_t=Math.min,Ie=Math.max,_r=Math.round,rr=Math.floor,Xe=e=>({x:e,y:e}),Qv={left:"right",right:"left",bottom:"top",top:"bottom"},Yv={start:"end",end:"start"};function ii(e,t,n){return Ie(e,_t(t,n))}function lt(e,t){return typeof e=="function"?e(t):e}function ct(e){return e.split("-")[0]}function hn(e){return e.split("-")[1]}function Ui(e){return e==="x"?"y":"x"}function Bi(e){return e==="y"?"height":"width"}const Xv=new Set(["top","bottom"]);function Ke(e){return Xv.has(ct(e))?"y":"x"}function qi(e){return Ui(Ke(e))}function Jv(e,t,n){n===void 0&&(n=!1);const r=hn(e),o=qi(e),i=Bi(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=br(s)),[s,br(s)]}function Zv(e){const t=br(e);return[si(e),t,si(t)]}function si(e){return e.replace(/start|end/g,t=>Yv[t])}const Ra=["left","right"],Ea=["right","left"],ey=["top","bottom"],ty=["bottom","top"];function ny(e,t,n){switch(e){case"top":case"bottom":return n?t?Ea:Ra:t?Ra:Ea;case"left":case"right":return t?ey:ty;default:return[]}}function ry(e,t,n,r){const o=hn(e);let i=ny(ct(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(si)))),i}function br(e){return e.replace(/left|right|bottom|top/g,t=>Qv[t])}function oy(e){return{top:0,right:0,bottom:0,left:0,...e}}function Lc(e){return typeof e!="number"?oy(e):{top:e,right:e,bottom:e,left:e}}function wr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Oa(e,t,n){let{reference:r,floating:o}=e;const i=Ke(t),s=qi(t),a=Bi(s),l=ct(t),c=i==="y",d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,g=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:d,y:r.y-o.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:u};break;case"left":h={x:r.x-o.width,y:u};break;default:h={x:r.x,y:r.y}}switch(hn(t)){case"start":h[s]-=g*(n&&c?-1:1);break;case"end":h[s]+=g*(n&&c?-1:1);break}return h}const iy=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=Oa(c,r,l),g=r,h={},m=0;for(let p=0;p<a.length;p++){const{name:v,fn:y}=a[p],{x:_,y:b,data:w,reset:S}=await y({x:d,y:u,initialPlacement:r,placement:g,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});d=_??d,u=b??u,h={...h,[v]:{...h[v],...w}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(g=S.placement),S.rects&&(c=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:d,y:u}=Oa(c,g,l)),p=-1)}return{x:d,y:u,placement:g,strategy:o,middlewareData:h}};async function An(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:g=!1,padding:h=0}=lt(t,e),m=Lc(h),v=a[g?u==="floating"?"reference":"floating":u],y=wr(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),_=u==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),w=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},S=wr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:_,offsetParent:b,strategy:l}):_);return{top:(y.top-S.top+m.top)/w.y,bottom:(S.bottom-y.bottom+m.bottom)/w.y,left:(y.left-S.left+m.left)/w.x,right:(S.right-y.right+m.right)/w.x}}const sy=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=lt(e,t)||{};if(c==null)return{};const u=Lc(d),g={x:n,y:r},h=qi(o),m=Bi(h),p=await s.getDimensions(c),v=h==="y",y=v?"top":"left",_=v?"bottom":"right",b=v?"clientHeight":"clientWidth",w=i.reference[m]+i.reference[h]-g[h]-i.floating[m],S=g[h]-i.reference[h],O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let C=O?O[b]:0;(!C||!await(s.isElement==null?void 0:s.isElement(O)))&&(C=a.floating[b]||i.floating[m]);const x=w/2-S/2,I=C/2-p[m]/2-1,D=_t(u[y],I),$=_t(u[_],I),U=D,Y=C-p[m]-$,B=C/2-p[m]/2+x,X=ii(U,B,Y),L=!l.arrow&&hn(o)!=null&&B!==X&&i.reference[m]/2-(B<U?D:$)-p[m]/2<0,q=L?B<U?B-U:B-Y:0;return{[h]:g[h]+q,data:{[h]:X,centerOffset:B-X-q,...L&&{alignmentOffset:q}},reset:L}}}),ay=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:g,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...v}=lt(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=ct(o),_=Ke(a),b=ct(a)===a,w=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=g||(b||!p?[br(a)]:Zv(a)),O=m!=="none";!g&&O&&S.push(...ry(a,p,m,w));const C=[a,...S],x=await An(t,v),I=[];let D=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&I.push(x[y]),u){const B=Jv(o,s,w);I.push(x[B[0]],x[B[1]])}if(D=[...D,{placement:o,overflows:I}],!I.every(B=>B<=0)){var $,U;const B=((($=i.flip)==null?void 0:$.index)||0)+1,X=C[B];if(X&&(!(u==="alignment"?_!==Ke(X):!1)||D.every(P=>Ke(P.placement)===_?P.overflows[0]>0:!0)))return{data:{index:B,overflows:D},reset:{placement:X}};let L=(U=D.filter(q=>q.overflows[0]<=0).sort((q,P)=>q.overflows[1]-P.overflows[1])[0])==null?void 0:U.placement;if(!L)switch(h){case"bestFit":{var Y;const q=(Y=D.filter(P=>{if(O){const A=Ke(P.placement);return A===_||A==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(A=>A>0).reduce((A,ce)=>A+ce,0)]).sort((P,A)=>P[1]-A[1])[0])==null?void 0:Y[0];q&&(L=q);break}case"initialPlacement":L=a;break}if(o!==L)return{reset:{placement:L}}}return{}}}};function Ma(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ia(e){return Kv.some(t=>e[t]>=0)}const ly=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=lt(e,t);switch(r){case"referenceHidden":{const i=await An(t,{...o,elementContext:"reference"}),s=Ma(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Ia(s)}}}case"escaped":{const i=await An(t,{...o,altBoundary:!0}),s=Ma(i,n.floating);return{data:{escapedOffsets:s,escaped:Ia(s)}}}default:return{}}}}},jc=new Set(["left","top"]);async function cy(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=ct(n),a=hn(n),l=Ke(n)==="y",c=jc.has(s)?-1:1,d=i&&l?-1:1,u=lt(t,e);let{mainAxis:g,crossAxis:h,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),l?{x:h*d,y:g*c}:{x:g*c,y:h*d}}const uy=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await cy(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},dy=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:v=>{let{x:y,y:_}=v;return{x:y,y:_}}},...l}=lt(e,t),c={x:n,y:r},d=await An(t,l),u=Ke(ct(o)),g=Ui(u);let h=c[g],m=c[u];if(i){const v=g==="y"?"top":"left",y=g==="y"?"bottom":"right",_=h+d[v],b=h-d[y];h=ii(_,h,b)}if(s){const v=u==="y"?"top":"left",y=u==="y"?"bottom":"right",_=m+d[v],b=m-d[y];m=ii(_,m,b)}const p=a.fn({...t,[g]:h,[u]:m});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[g]:i,[u]:s}}}}}},fy=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=lt(e,t),d={x:n,y:r},u=Ke(o),g=Ui(u);let h=d[g],m=d[u];const p=lt(a,t),v=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const b=g==="y"?"height":"width",w=i.reference[g]-i.floating[b]+v.mainAxis,S=i.reference[g]+i.reference[b]-v.mainAxis;h<w?h=w:h>S&&(h=S)}if(c){var y,_;const b=g==="y"?"width":"height",w=jc.has(ct(o)),S=i.reference[u]-i.floating[b]+(w&&((y=s.offset)==null?void 0:y[u])||0)+(w?0:v.crossAxis),O=i.reference[u]+i.reference[b]+(w?0:((_=s.offset)==null?void 0:_[u])||0)-(w?v.crossAxis:0);m<S?m=S:m>O&&(m=O)}return{[g]:h,[u]:m}}}},py=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=lt(e,t),d=await An(t,c),u=ct(o),g=hn(o),h=Ke(o)==="y",{width:m,height:p}=i.floating;let v,y;u==="top"||u==="bottom"?(v=u,y=g===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=u,v=g==="end"?"top":"bottom");const _=p-d.top-d.bottom,b=m-d.left-d.right,w=_t(p-d[v],_),S=_t(m-d[y],b),O=!t.middlewareData.shift;let C=w,x=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(x=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=_),O&&!g){const D=Ie(d.left,0),$=Ie(d.right,0),U=Ie(d.top,0),Y=Ie(d.bottom,0);h?x=m-2*(D!==0||$!==0?D+$:Ie(d.left,d.right)):C=p-2*(U!==0||Y!==0?U+Y:Ie(d.top,d.bottom))}await l({...t,availableWidth:x,availableHeight:C});const I=await s.getDimensions(a.floating);return m!==I.width||p!==I.height?{reset:{rects:!0}}:{}}}};function zr(){return typeof window<"u"}function gn(e){return Vc(e)?(e.nodeName||"").toLowerCase():"#document"}function Ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function tt(e){var t;return(t=(Vc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vc(e){return zr()?e instanceof Node||e instanceof Ae(e).Node:!1}function Ve(e){return zr()?e instanceof Element||e instanceof Ae(e).Element:!1}function Ze(e){return zr()?e instanceof HTMLElement||e instanceof Ae(e).HTMLElement:!1}function Aa(e){return!zr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ae(e).ShadowRoot}const hy=new Set(["inline","contents"]);function Hn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=He(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!hy.has(o)}const gy=new Set(["table","td","th"]);function my(e){return gy.has(gn(e))}const vy=[":popover-open",":modal"];function Gr(e){return vy.some(t=>{try{return e.matches(t)}catch{return!1}})}const yy=["transform","translate","scale","rotate","perspective"],_y=["transform","translate","scale","rotate","perspective","filter"],by=["paint","layout","strict","content"];function Wi(e){const t=Ki(),n=Ve(e)?He(e):e;return yy.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||_y.some(r=>(n.willChange||"").includes(r))||by.some(r=>(n.contain||"").includes(r))}function wy(e){let t=bt(e);for(;Ze(t)&&!ln(t);){if(Wi(t))return t;if(Gr(t))return null;t=bt(t)}return null}function Ki(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const xy=new Set(["html","body","#document"]);function ln(e){return xy.has(gn(e))}function He(e){return Ae(e).getComputedStyle(e)}function Ur(e){return Ve(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bt(e){if(gn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Aa(e)&&e.host||tt(e);return Aa(t)?t.host:t}function Hc(e){const t=bt(e);return ln(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ze(t)&&Hn(t)?t:Hc(t)}function Tn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Hc(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ae(o);if(i){const a=ai(s);return t.concat(s,s.visualViewport||[],Hn(o)?o:[],a&&n?Tn(a):[])}return t.concat(o,Tn(o,[],n))}function ai(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zc(e){const t=He(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ze(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=_r(n)!==i||_r(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Qi(e){return Ve(e)?e:e.contextElement}function tn(e){const t=Qi(e);if(!Ze(t))return Xe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=zc(t);let s=(i?_r(n.width):n.width)/r,a=(i?_r(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Sy=Xe(0);function Gc(e){const t=Ae(e);return!Ki()||!t.visualViewport?Sy:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Cy(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ae(e)?!1:t}function kt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Qi(e);let s=Xe(1);t&&(r?Ve(r)&&(s=tn(r)):s=tn(e));const a=Cy(i,n,r)?Gc(i):Xe(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,d=o.width/s.x,u=o.height/s.y;if(i){const g=Ae(i),h=r&&Ve(r)?Ae(r):r;let m=g,p=ai(m);for(;p&&r&&h!==m;){const v=tn(p),y=p.getBoundingClientRect(),_=He(p),b=y.left+(p.clientLeft+parseFloat(_.paddingLeft))*v.x,w=y.top+(p.clientTop+parseFloat(_.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,u*=v.y,l+=b,c+=w,m=Ae(p),p=ai(m)}}return wr({width:d,height:u,x:l,y:c})}function Yi(e,t){const n=Ur(e).scrollLeft;return t?t.left+n:kt(tt(e)).left+n}function Uc(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Yi(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function Py(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=tt(r),a=t?Gr(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Xe(1);const d=Xe(0),u=Ze(r);if((u||!u&&!i)&&((gn(r)!=="body"||Hn(s))&&(l=Ur(r)),Ze(r))){const h=kt(r);c=tn(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const g=s&&!u&&!i?Uc(s,l,!0):Xe(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+g.x,y:n.y*c.y-l.scrollTop*c.y+d.y+g.y}}function Ry(e){return Array.from(e.getClientRects())}function Ey(e){const t=tt(e),n=Ur(e),r=e.ownerDocument.body,o=Ie(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Ie(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Yi(e);const a=-n.scrollTop;return He(r).direction==="rtl"&&(s+=Ie(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function Oy(e,t){const n=Ae(e),r=tt(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const c=Ki();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}const My=new Set(["absolute","fixed"]);function Iy(e,t){const n=kt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ze(e)?tn(e):Xe(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function Ta(e,t,n){let r;if(t==="viewport")r=Oy(e,n);else if(t==="document")r=Ey(tt(e));else if(Ve(t))r=Iy(t,n);else{const o=Gc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return wr(r)}function Bc(e,t){const n=bt(e);return n===t||!Ve(n)||ln(n)?!1:He(n).position==="fixed"||Bc(n,t)}function Ay(e,t){const n=t.get(e);if(n)return n;let r=Tn(e,[],!1).filter(a=>Ve(a)&&gn(a)!=="body"),o=null;const i=He(e).position==="fixed";let s=i?bt(e):e;for(;Ve(s)&&!ln(s);){const a=He(s),l=Wi(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&My.has(o.position)||Hn(s)&&!l&&Bc(e,s))?r=r.filter(d=>d!==s):o=a,s=bt(s)}return t.set(e,r),r}function Ty(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Gr(t)?[]:Ay(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,d)=>{const u=Ta(t,d,o);return c.top=Ie(u.top,c.top),c.right=_t(u.right,c.right),c.bottom=_t(u.bottom,c.bottom),c.left=Ie(u.left,c.left),c},Ta(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ny(e){const{width:t,height:n}=zc(e);return{width:t,height:n}}function Dy(e,t,n){const r=Ze(t),o=tt(t),i=n==="fixed",s=kt(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Xe(0);function c(){l.x=Yi(o)}if(r||!r&&!i)if((gn(t)!=="body"||Hn(o))&&(a=Ur(t)),r){const h=kt(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&c();i&&!r&&o&&c();const d=o&&!r&&!i?Uc(o,a):Xe(0),u=s.left+a.scrollLeft-l.x-d.x,g=s.top+a.scrollTop-l.y-d.y;return{x:u,y:g,width:s.width,height:s.height}}function Eo(e){return He(e).position==="static"}function Na(e,t){if(!Ze(e)||He(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return tt(e)===n&&(n=n.ownerDocument.body),n}function qc(e,t){const n=Ae(e);if(Gr(e))return n;if(!Ze(e)){let o=bt(e);for(;o&&!ln(o);){if(Ve(o)&&!Eo(o))return o;o=bt(o)}return n}let r=Na(e,t);for(;r&&my(r)&&Eo(r);)r=Na(r,t);return r&&ln(r)&&Eo(r)&&!Wi(r)?n:r||wy(e)||n}const ky=async function(e){const t=this.getOffsetParent||qc,n=this.getDimensions,r=await n(e.floating);return{reference:Dy(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Fy(e){return He(e).direction==="rtl"}const $y={convertOffsetParentRelativeRectToViewportRelativeRect:Py,getDocumentElement:tt,getClippingRect:Ty,getOffsetParent:qc,getElementRects:ky,getClientRects:Ry,getDimensions:Ny,getScale:tn,isElement:Ve,isRTL:Fy};function Wc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ly(e,t){let n=null,r;const o=tt(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:u,width:g,height:h}=c;if(a||t(),!g||!h)return;const m=rr(u),p=rr(o.clientWidth-(d+g)),v=rr(o.clientHeight-(u+h)),y=rr(d),b={rootMargin:-m+"px "+-p+"px "+-v+"px "+-y+"px",threshold:Ie(0,_t(1,l))||1};let w=!0;function S(O){const C=O[0].intersectionRatio;if(C!==l){if(!w)return s();C?s(!1,C):r=setTimeout(()=>{s(!1,1e-7)},1e3)}C===1&&!Wc(c,e.getBoundingClientRect())&&s(),w=!1}try{n=new IntersectionObserver(S,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(e)}return s(!0),i}function jy(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Qi(e),d=o||i?[...c?Tn(c):[],...Tn(t)]:[];d.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const u=c&&a?Ly(c,n):null;let g=-1,h=null;s&&(h=new ResizeObserver(y=>{let[_]=y;_&&_.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let m,p=l?kt(e):null;l&&v();function v(){const y=kt(e);p&&!Wc(p,y)&&n(),p=y,m=requestAnimationFrame(v)}return n(),()=>{var y;d.forEach(_=>{o&&_.removeEventListener("scroll",n),i&&_.removeEventListener("resize",n)}),u?.(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const Vy=uy,Hy=dy,zy=ay,Gy=py,Uy=ly,Da=sy,By=fy,qy=(e,t,n)=>{const r=new Map,o={platform:$y,...n},i={...o.platform,_c:r};return iy(e,t,{...o,platform:i})};var Wy=typeof document<"u",Ky=function(){},dr=Wy?ze:Ky;function xr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!xr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!xr(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Kc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ka(e,t){const n=Kc(e);return Math.round(t*n)/n}function Oo(e){const t=M(e);return dr(()=>{t.current=e}),t}function Qy(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,u]=F({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,h]=F(r);xr(g,r)||h(r);const[m,p]=F(null),[v,y]=F(null),_=z(P=>{P!==O.current&&(O.current=P,p(P))},[]),b=z(P=>{P!==C.current&&(C.current=P,y(P))},[]),w=i||m,S=s||v,O=M(null),C=M(null),x=M(d),I=l!=null,D=Oo(l),$=Oo(o),U=Oo(c),Y=z(()=>{if(!O.current||!C.current)return;const P={placement:t,strategy:n,middleware:g};$.current&&(P.platform=$.current),qy(O.current,C.current,P).then(A=>{const ce={...A,isPositioned:U.current!==!1};B.current&&!xr(x.current,ce)&&(x.current=ce,Ir(()=>{u(ce)}))})},[g,t,n,$,U]);dr(()=>{c===!1&&x.current.isPositioned&&(x.current.isPositioned=!1,u(P=>({...P,isPositioned:!1})))},[c]);const B=M(!1);dr(()=>(B.current=!0,()=>{B.current=!1}),[]),dr(()=>{if(w&&(O.current=w),S&&(C.current=S),w&&S){if(D.current)return D.current(w,S,Y);Y()}},[w,S,Y,D,I]);const X=fe(()=>({reference:O,floating:C,setReference:_,setFloating:b}),[_,b]),L=fe(()=>({reference:w,floating:S}),[w,S]),q=fe(()=>{const P={position:n,left:0,top:0};if(!L.floating)return P;const A=ka(L.floating,d.x),ce=ka(L.floating,d.y);return a?{...P,transform:"translate("+A+"px, "+ce+"px)",...Kc(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:ce}},[n,a,L.floating,d.x,d.y]);return fe(()=>({...d,update:Y,refs:X,elements:L,floatingStyles:q}),[d,Y,X,L,q])}const Yy=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Da({element:r.current,padding:o}).fn(n):{}:r?Da({element:r,padding:o}).fn(n):{}}}},Xy=(e,t)=>({...Vy(e),options:[e,t]}),Jy=(e,t)=>({...Hy(e),options:[e,t]}),Zy=(e,t)=>({...By(e),options:[e,t]}),e_=(e,t)=>({...zy(e),options:[e,t]}),t_=(e,t)=>({...Gy(e),options:[e,t]}),n_=(e,t)=>({...Uy(e),options:[e,t]}),r_=(e,t)=>({...Yy(e),options:[e,t]});var o_="Arrow",Qc=R((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return f(W.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f("polygon",{points:"0,0 30,0 15,10"})})});Qc.displayName=o_;var i_=Qc;function s_(e){const[t,n]=F(void 0);return _e(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,a=c.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Xi="Popper",[Yc,Br]=dt(Xi),[a_,Xc]=Yc(Xi),Jc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=F(null);return f(a_,{scope:t,anchor:r,onAnchorChange:o,children:n})};Jc.displayName=Xi;var Zc="PopperAnchor",eu=R((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Xc(Zc,n),s=M(null),a=ne(t,s),l=M(null);return j(()=>{const c=l.current;l.current=r?.current||s.current,c!==l.current&&i.onAnchorChange(l.current)}),r?null:f(W.div,{...o,ref:a})});eu.displayName=Zc;var Ji="PopperContent",[l_,c_]=Yc(Ji),tu=R((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:u="partial",hideWhenDetached:g=!1,updatePositionStrategy:h="optimized",onPlaced:m,...p}=e,v=Xc(Ji,n),[y,_]=F(null),b=ne(t,E=>_(E)),[w,S]=F(null),O=s_(w),C=O?.width??0,x=O?.height??0,I=r+(i!=="center"?"-"+i:""),D=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},$=Array.isArray(c)?c:[c],U=$.length>0,Y={padding:D,boundary:$.filter(d_),altBoundary:U},{refs:B,floatingStyles:X,placement:L,isPositioned:q,middlewareData:P}=Qy({strategy:"fixed",placement:I,whileElementsMounted:(...E)=>jy(...E,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Xy({mainAxis:o+x,alignmentAxis:s}),l&&Jy({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Zy():void 0,...Y}),l&&e_({...Y}),t_({...Y,apply:({elements:E,rects:re,availableWidth:he,availableHeight:Z})=>{const{width:oe,height:le}=re.reference,Ne=E.floating.style;Ne.setProperty("--radix-popper-available-width",`${he}px`),Ne.setProperty("--radix-popper-available-height",`${Z}px`),Ne.setProperty("--radix-popper-anchor-width",`${oe}px`),Ne.setProperty("--radix-popper-anchor-height",`${le}px`)}}),w&&r_({element:w,padding:a}),f_({arrowWidth:C,arrowHeight:x}),g&&n_({strategy:"referenceHidden",...Y})]}),[A,ce]=ou(L),ye=Je(m);_e(()=>{q&&ye?.()},[q,ye]);const Se=P.arrow?.x,ae=P.arrow?.y,se=P.arrow?.centerOffset!==0,[Re,be]=F();return _e(()=>{y&&be(window.getComputedStyle(y).zIndex)},[y]),f("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:q?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Re,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(" "),...P.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f(l_,{scope:n,placedSide:A,onArrowChange:S,arrowX:Se,arrowY:ae,shouldHideArrow:se,children:f(W.div,{"data-side":A,"data-align":ce,...p,ref:b,style:{...p.style,animation:q?void 0:"none"}})})})});tu.displayName=Ji;var nu="PopperArrow",u_={top:"bottom",right:"left",bottom:"top",left:"right"},ru=R(function(t,n){const{__scopePopper:r,...o}=t,i=c_(nu,r),s=u_[i.placedSide];return f("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:f(i_,{...o,ref:n,style:{...o.style,display:"block"}})})});ru.displayName=nu;function d_(e){return e!==null}var f_=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,s=o.arrow?.centerOffset!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[c,d]=ou(n),u={start:"0%",center:"50%",end:"100%"}[d],g=(o.arrow?.x??0)+a/2,h=(o.arrow?.y??0)+l/2;let m="",p="";return c==="bottom"?(m=s?u:`${g}px`,p=`${-l}px`):c==="top"?(m=s?u:`${g}px`,p=`${r.floating.height+l}px`):c==="right"?(m=`${-l}px`,p=s?u:`${h}px`):c==="left"&&(m=`${r.floating.width+l}px`,p=s?u:`${h}px`),{data:{x:m,y:p}}}});function ou(e){const[t,n="center"]=e.split("-");return[t,n]}var iu=Jc,su=eu,au=tu,lu=ru,p_="Portal",qr=R((e,t)=>{const{container:n,...r}=e,[o,i]=F(!1);_e(()=>i(!0),[]);const s=n||o&&globalThis?.document?.body;return s?ee.createPortal(f(W.div,{...r,ref:t}),s):null});qr.displayName=p_;var h_=Dl[" useInsertionEffect ".trim().toString()]||_e;function wt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=g_({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const d=M(e!==void 0);j(()=>{const u=d.current;u!==a&&console.warn(`${r} is changing from ${u?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const c=z(d=>{if(a){const u=m_(d)?d(e):d;u!==e&&s.current?.(u)}else i(d)},[a,e,i,s]);return[l,c]}function g_({defaultProp:e,onChange:t}){const[n,r]=F(e),o=M(n),i=M(t);return h_(()=>{i.current=t},[t]),j(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function m_(e){return typeof e=="function"}function v_(e){const t=M({value:e,previous:e});return fe(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var cu=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),y_="VisuallyHidden",uu=R((e,t)=>f(W.span,{...e,ref:t,style:{...cu,...e.style}}));uu.displayName=y_;var __=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Qt=new WeakMap,or=new WeakMap,ir={},Mo=0,du=function(e){return e&&(e.host||du(e.parentNode))},b_=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=du(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},w_=function(e,t,n,r){var o=b_(t,Array.isArray(e)?e:[e]);ir[n]||(ir[n]=new WeakMap);var i=ir[n],s=[],a=new Set,l=new Set(o),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};o.forEach(c);var d=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(g){if(a.has(g))d(g);else try{var h=g.getAttribute(r),m=h!==null&&h!=="false",p=(Qt.get(g)||0)+1,v=(i.get(g)||0)+1;Qt.set(g,p),i.set(g,v),s.push(g),p===1&&m&&or.set(g,!0),v===1&&g.setAttribute(n,"true"),m||g.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",g,y)}})};return d(t),a.clear(),Mo++,function(){s.forEach(function(u){var g=Qt.get(u)-1,h=i.get(u)-1;Qt.set(u,g),i.set(u,h),g||(or.has(u)||u.removeAttribute(r),or.delete(u)),h||u.removeAttribute(n)}),Mo--,Mo||(Qt=new WeakMap,Qt=new WeakMap,or=new WeakMap,ir={})}},Zi=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=__(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),w_(r,o,n,"aria-hidden")):function(){return null}},qe=function(){return qe=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},qe.apply(this,arguments)};function fu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function x_(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var fr="right-scroll-bar-position",pr="width-before-scroll-bar",S_="with-scroll-bars-hidden",C_="--removed-body-scroll-bar-size";function Io(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function P_(e,t){var n=F(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var R_=typeof window<"u"?ze:j,Fa=new WeakMap;function E_(e,t){var n=P_(null,function(r){return e.forEach(function(o){return Io(o,r)})});return R_(function(){var r=Fa.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||Io(a,null)}),i.forEach(function(a){o.has(a)||Io(a,s)})}Fa.set(n,e)},[e]),n}function O_(e){return e}function M_(e,t){t===void 0&&(t=O_);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var l=function(){var d=s;s=[],d.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(d){s.push(d),c()},filter:function(d){return s=s.filter(d),n}}}};return o}function I_(e){e===void 0&&(e={});var t=M_(null);return t.options=qe({async:!0,ssr:!1},e),t}var pu=function(e){var t=e.sideCar,n=fu(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return te(r,qe({},n))};pu.isSideCarExport=!0;function A_(e,t){return e.useMedium(t),pu}var hu=I_(),Ao=function(){},Wr=R(function(e,t){var n=M(null),r=F({onScrollCapture:Ao,onWheelCapture:Ao,onTouchMoveCapture:Ao}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,u=e.shards,g=e.sideCar,h=e.noRelative,m=e.noIsolation,p=e.inert,v=e.allowPinchZoom,y=e.as,_=y===void 0?"div":y,b=e.gapMode,w=fu(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=g,O=E_([n,t]),C=qe(qe({},w),o);return te(ge,null,d&&te(S,{sideCar:hu,removeScrollBar:c,shards:u,noRelative:h,noIsolation:m,inert:p,setCallbacks:i,allowPinchZoom:!!v,lockRef:n,gapMode:b}),s?un(Ye.only(a),qe(qe({},C),{ref:O})):te(_,qe({},C,{className:l,ref:O}),a))});Wr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Wr.classNames={fullWidth:pr,zeroRight:fr};var T_=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function N_(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=T_();return t&&e.setAttribute("nonce",t),e}function D_(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function k_(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var F_=function(){var e=0,t=null;return{add:function(n){e==0&&(t=N_())&&(D_(t,n),k_(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},$_=function(){var e=F_();return function(t,n){j(function(){return e.add(t),function(){e.remove()}},[t&&n])}},gu=function(){var e=$_(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},L_={left:0,top:0,right:0,gap:0},To=function(e){return parseInt(e||"",10)||0},j_=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[To(n),To(r),To(o)]},V_=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return L_;var t=j_(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},H_=gu(),nn="data-scroll-locked",z_=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
113
+ .`.concat(S_,` {
114
+ overflow: hidden `).concat(r,`;
115
+ padding-right: `).concat(a,"px ").concat(r,`;
116
+ }
117
+ body[`).concat(nn,`] {
118
+ overflow: hidden `).concat(r,`;
119
+ overscroll-behavior: contain;
120
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
121
+ padding-left: `.concat(o,`px;
122
+ padding-top: `).concat(i,`px;
123
+ padding-right: `).concat(s,`px;
124
+ margin-left:0;
125
+ margin-top:0;
126
+ margin-right: `).concat(a,"px ").concat(r,`;
127
+ `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
128
+ }
129
+
130
+ .`).concat(fr,` {
131
+ right: `).concat(a,"px ").concat(r,`;
132
+ }
133
+
134
+ .`).concat(pr,` {
135
+ margin-right: `).concat(a,"px ").concat(r,`;
136
+ }
137
+
138
+ .`).concat(fr," .").concat(fr,` {
139
+ right: 0 `).concat(r,`;
140
+ }
141
+
142
+ .`).concat(pr," .").concat(pr,` {
143
+ margin-right: 0 `).concat(r,`;
144
+ }
145
+
146
+ body[`).concat(nn,`] {
147
+ `).concat(C_,": ").concat(a,`px;
148
+ }
149
+ `)},$a=function(){var e=parseInt(document.body.getAttribute(nn)||"0",10);return isFinite(e)?e:0},G_=function(){j(function(){return document.body.setAttribute(nn,($a()+1).toString()),function(){var e=$a()-1;e<=0?document.body.removeAttribute(nn):document.body.setAttribute(nn,e.toString())}},[])},U_=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;G_();var i=fe(function(){return V_(o)},[o]);return te(H_,{styles:z_(i,!t,o,n?"":"!important")})},li=!1;if(typeof window<"u")try{var sr=Object.defineProperty({},"passive",{get:function(){return li=!0,!0}});window.addEventListener("test",sr,sr),window.removeEventListener("test",sr,sr)}catch{li=!1}var Yt=li?{passive:!1}:!1,B_=function(e){return e.tagName==="TEXTAREA"},mu=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!B_(e)&&n[t]==="visible")},q_=function(e){return mu(e,"overflowY")},W_=function(e){return mu(e,"overflowX")},La=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=vu(e,r);if(o){var i=yu(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},K_=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Q_=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},vu=function(e,t){return e==="v"?q_(t):W_(t)},yu=function(e,t){return e==="v"?K_(t):Q_(t)},Y_=function(e,t){return e==="h"&&t==="rtl"?-1:1},X_=function(e,t,n,r,o){var i=Y_(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,l=t.contains(a),c=!1,d=s>0,u=0,g=0;do{if(!a)break;var h=yu(e,a),m=h[0],p=h[1],v=h[2],y=p-v-i*m;(m||y)&&vu(e,a)&&(u+=y,g+=m);var _=a.parentNode;a=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&Math.abs(u)<1||!d&&Math.abs(g)<1)&&(c=!0),c},ar=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ja=function(e){return[e.deltaX,e.deltaY]},Va=function(e){return e&&"current"in e?e.current:e},J_=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Z_=function(e){return`
150
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
151
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
152
+ `)},eb=0,Xt=[];function tb(e){var t=M([]),n=M([0,0]),r=M(),o=F(eb++)[0],i=F(gu)[0],s=M(e);j(function(){s.current=e},[e]),j(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=x_([e.lockRef.current],(e.shards||[]).map(Va),!0).filter(Boolean);return p.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=z(function(p,v){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!s.current.allowPinchZoom;var y=ar(p),_=n.current,b="deltaX"in p?p.deltaX:_[0]-y[0],w="deltaY"in p?p.deltaY:_[1]-y[1],S,O=p.target,C=Math.abs(b)>Math.abs(w)?"h":"v";if("touches"in p&&C==="h"&&O.type==="range")return!1;var x=La(C,O);if(!x)return!0;if(x?S=C:(S=C==="v"?"h":"v",x=La(C,O)),!x)return!1;if(!r.current&&"changedTouches"in p&&(b||w)&&(r.current=S),!S)return!0;var I=r.current||S;return X_(I,v,p,I==="h"?b:w)},[]),l=z(function(p){var v=p;if(!(!Xt.length||Xt[Xt.length-1]!==i)){var y="deltaY"in v?ja(v):ar(v),_=t.current.filter(function(S){return S.name===v.type&&(S.target===v.target||v.target===S.shadowParent)&&J_(S.delta,y)})[0];if(_&&_.should){v.cancelable&&v.preventDefault();return}if(!_){var b=(s.current.shards||[]).map(Va).filter(Boolean).filter(function(S){return S.contains(v.target)}),w=b.length>0?a(v,b[0]):!s.current.noIsolation;w&&v.cancelable&&v.preventDefault()}}},[]),c=z(function(p,v,y,_){var b={name:p,delta:v,target:y,should:_,shadowParent:nb(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(w){return w!==b})},1)},[]),d=z(function(p){n.current=ar(p),r.current=void 0},[]),u=z(function(p){c(p.type,ja(p),p.target,a(p,e.lockRef.current))},[]),g=z(function(p){c(p.type,ar(p),p.target,a(p,e.lockRef.current))},[]);j(function(){return Xt.push(i),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:g}),document.addEventListener("wheel",l,Yt),document.addEventListener("touchmove",l,Yt),document.addEventListener("touchstart",d,Yt),function(){Xt=Xt.filter(function(p){return p!==i}),document.removeEventListener("wheel",l,Yt),document.removeEventListener("touchmove",l,Yt),document.removeEventListener("touchstart",d,Yt)}},[]);var h=e.removeScrollBar,m=e.inert;return te(ge,null,m?te(i,{styles:Z_(o)}):null,h?te(U_,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function nb(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const rb=A_(hu,tb);var Kr=R(function(e,t){return te(Wr,qe({},e,{ref:t,sideCar:rb}))});Kr.classNames=Wr.classNames;var ob=[" ","Enter","ArrowUp","ArrowDown"],ib=[" ","Enter"],Ft="Select",[Qr,Yr,sb]=Lr(Ft),[mn,FS]=dt(Ft,[sb,Br]),Xr=Br(),[ab,Ct]=mn(Ft),[lb,cb]=mn(Ft),_u=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:s,defaultValue:a,onValueChange:l,dir:c,name:d,autoComplete:u,disabled:g,required:h,form:m}=e,p=Xr(t),[v,y]=F(null),[_,b]=F(null),[w,S]=F(!1),O=jr(c),[C,x]=wt({prop:r,defaultProp:o??!1,onChange:i,caller:Ft}),[I,D]=wt({prop:s,defaultProp:a,onChange:l,caller:Ft}),$=M(null),U=v?m||!!v.closest("form"):!0,[Y,B]=F(new Set),X=Array.from(Y).map(L=>L.props.value).join(";");return f(iu,{...p,children:f(ab,{required:h,scope:t,trigger:v,onTriggerChange:y,valueNode:_,onValueNodeChange:b,valueNodeHasChildren:w,onValueNodeHasChildrenChange:S,contentId:je(),value:I,onValueChange:D,open:C,onOpenChange:x,dir:O,triggerPointerDownPosRef:$,disabled:g,children:[f(Qr.Provider,{scope:t,children:f(lb,{scope:e.__scopeSelect,onNativeOptionAdd:z(L=>{B(q=>new Set(q).add(L))},[]),onNativeOptionRemove:z(L=>{B(q=>{const P=new Set(q);return P.delete(L),P})},[]),children:n})}),U?f(zu,{"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:u,value:I,onChange:L=>D(L.target.value),disabled:g,form:m,children:[I===void 0?f("option",{value:""}):null,Array.from(Y)]},X):null]})})};_u.displayName=Ft;var bu="SelectTrigger",wu=R((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Xr(n),s=Ct(bu,n),a=s.disabled||r,l=ne(t,s.onTriggerChange),c=Yr(n),d=M("touch"),[u,g,h]=Uu(p=>{const v=c().filter(b=>!b.disabled),y=v.find(b=>b.value===s.value),_=Bu(v,p,y);_!==void 0&&s.onValueChange(_.value)}),m=p=>{a||(s.onOpenChange(!0),h()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return f(su,{asChild:!0,...i,children:f(W.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Gu(s.value)?"":void 0,...o,ref:l,onClick:k(o.onClick,p=>{p.currentTarget.focus(),d.current!=="mouse"&&m(p)}),onPointerDown:k(o.onPointerDown,p=>{d.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(m(p),p.preventDefault())}),onKeyDown:k(o.onKeyDown,p=>{const v=u.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&g(p.key),!(v&&p.key===" ")&&ob.includes(p.key)&&(m(),p.preventDefault())})})})});wu.displayName=bu;var xu="SelectValue",Su=R((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:s="",...a}=e,l=Ct(xu,n),{onValueNodeHasChildrenChange:c}=l,d=i!==void 0,u=ne(t,l.onValueNodeChange);return _e(()=>{c(d)},[c,d]),f(W.span,{...a,ref:u,style:{pointerEvents:"none"},children:Gu(l.value)?f(ge,{children:s}):i})});Su.displayName=xu;var ub="SelectIcon",Cu=R((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return f(W.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Cu.displayName=ub;var db="SelectPortal",Pu=e=>f(qr,{asChild:!0,...e});Pu.displayName=db;var $t="SelectContent",Ru=R((e,t)=>{const n=Ct($t,e.__scopeSelect),[r,o]=F();if(_e(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Mr(f(Eu,{scope:e.__scopeSelect,children:f(Qr.Slot,{scope:e.__scopeSelect,children:f("div",{children:e.children})})}),i):null}return f(Ou,{...e,ref:t})});Ru.displayName=$t;var Fe=10,[Eu,Pt]=mn($t),fb="SelectContentImpl",pb=an("SelectContent.RemoveScroll"),Ou=R((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:a,sideOffset:l,align:c,alignOffset:d,arrowPadding:u,collisionBoundary:g,collisionPadding:h,sticky:m,hideWhenDetached:p,avoidCollisions:v,...y}=e,_=Ct($t,n),[b,w]=F(null),[S,O]=F(null),C=ne(t,E=>w(E)),[x,I]=F(null),[D,$]=F(null),U=Yr(n),[Y,B]=F(!1),X=M(!1);j(()=>{if(b)return Zi(b)},[b]),Gi();const L=z(E=>{const[re,...he]=U().map(le=>le.ref.current),[Z]=he.slice(-1),oe=document.activeElement;for(const le of E)if(le===oe||(le?.scrollIntoView({block:"nearest"}),le===re&&S&&(S.scrollTop=0),le===Z&&S&&(S.scrollTop=S.scrollHeight),le?.focus(),document.activeElement!==oe))return},[U,S]),q=z(()=>L([x,b]),[L,x,b]);j(()=>{Y&&q()},[Y,q]);const{onOpenChange:P,triggerPointerDownPosRef:A}=_;j(()=>{if(b){let E={x:0,y:0};const re=Z=>{E={x:Math.abs(Math.round(Z.pageX)-(A.current?.x??0)),y:Math.abs(Math.round(Z.pageY)-(A.current?.y??0))}},he=Z=>{E.x<=10&&E.y<=10?Z.preventDefault():b.contains(Z.target)||P(!1),document.removeEventListener("pointermove",re),A.current=null};return A.current!==null&&(document.addEventListener("pointermove",re),document.addEventListener("pointerup",he,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",re),document.removeEventListener("pointerup",he,{capture:!0})}}},[b,P,A]),j(()=>{const E=()=>P(!1);return window.addEventListener("blur",E),window.addEventListener("resize",E),()=>{window.removeEventListener("blur",E),window.removeEventListener("resize",E)}},[P]);const[ce,ye]=Uu(E=>{const re=U().filter(oe=>!oe.disabled),he=re.find(oe=>oe.ref.current===document.activeElement),Z=Bu(re,E,he);Z&&setTimeout(()=>Z.ref.current.focus())}),Se=z((E,re,he)=>{const Z=!X.current&&!he;(_.value!==void 0&&_.value===re||Z)&&(I(E),Z&&(X.current=!0))},[_.value]),ae=z(()=>b?.focus(),[b]),se=z((E,re,he)=>{const Z=!X.current&&!he;(_.value!==void 0&&_.value===re||Z)&&$(E)},[_.value]),Re=r==="popper"?ci:Mu,be=Re===ci?{side:a,sideOffset:l,align:c,alignOffset:d,arrowPadding:u,collisionBoundary:g,collisionPadding:h,sticky:m,hideWhenDetached:p,avoidCollisions:v}:{};return f(Eu,{scope:n,content:b,viewport:S,onViewportChange:O,itemRefCallback:Se,selectedItem:x,onItemLeave:ae,itemTextRefCallback:se,focusSelectedItem:q,selectedItemText:D,position:r,isPositioned:Y,searchRef:ce,children:f(Kr,{as:pb,allowPinchZoom:!0,children:f(Hr,{asChild:!0,trapped:_.open,onMountAutoFocus:E=>{E.preventDefault()},onUnmountAutoFocus:k(o,E=>{_.trigger?.focus({preventScroll:!0}),E.preventDefault()}),children:f(Vr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:E=>E.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:f(Re,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:E=>E.preventDefault(),...y,...be,onPlaced:()=>B(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:k(y.onKeyDown,E=>{const re=E.ctrlKey||E.altKey||E.metaKey;if(E.key==="Tab"&&E.preventDefault(),!re&&E.key.length===1&&ye(E.key),["ArrowUp","ArrowDown","Home","End"].includes(E.key)){let Z=U().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);if(["ArrowUp","End"].includes(E.key)&&(Z=Z.slice().reverse()),["ArrowUp","ArrowDown"].includes(E.key)){const oe=E.target,le=Z.indexOf(oe);Z=Z.slice(le+1)}setTimeout(()=>L(Z)),E.preventDefault()}})})})})})})});Ou.displayName=fb;var hb="SelectItemAlignedPosition",Mu=R((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Ct($t,n),s=Pt($t,n),[a,l]=F(null),[c,d]=F(null),u=ne(t,C=>d(C)),g=Yr(n),h=M(!1),m=M(!0),{viewport:p,selectedItem:v,selectedItemText:y,focusSelectedItem:_}=s,b=z(()=>{if(i.trigger&&i.valueNode&&a&&c&&p&&v&&y){const C=i.trigger.getBoundingClientRect(),x=c.getBoundingClientRect(),I=i.valueNode.getBoundingClientRect(),D=y.getBoundingClientRect();if(i.dir!=="rtl"){const oe=D.left-x.left,le=I.left-oe,Ne=C.left-le,Rt=C.width+Ne,io=Math.max(Rt,x.width),so=window.innerWidth-Fe,ao=ya(le,[Fe,Math.max(Fe,so-io)]);a.style.minWidth=Rt+"px",a.style.left=ao+"px"}else{const oe=x.right-D.right,le=window.innerWidth-I.right-oe,Ne=window.innerWidth-C.right-le,Rt=C.width+Ne,io=Math.max(Rt,x.width),so=window.innerWidth-Fe,ao=ya(le,[Fe,Math.max(Fe,so-io)]);a.style.minWidth=Rt+"px",a.style.right=ao+"px"}const $=g(),U=window.innerHeight-Fe*2,Y=p.scrollHeight,B=window.getComputedStyle(c),X=parseInt(B.borderTopWidth,10),L=parseInt(B.paddingTop,10),q=parseInt(B.borderBottomWidth,10),P=parseInt(B.paddingBottom,10),A=X+L+Y+P+q,ce=Math.min(v.offsetHeight*5,A),ye=window.getComputedStyle(p),Se=parseInt(ye.paddingTop,10),ae=parseInt(ye.paddingBottom,10),se=C.top+C.height/2-Fe,Re=U-se,be=v.offsetHeight/2,E=v.offsetTop+be,re=X+L+E,he=A-re;if(re<=se){const oe=$.length>0&&v===$[$.length-1].ref.current;a.style.bottom="0px";const le=c.clientHeight-p.offsetTop-p.offsetHeight,Ne=Math.max(Re,be+(oe?ae:0)+le+q),Rt=re+Ne;a.style.height=Rt+"px"}else{const oe=$.length>0&&v===$[0].ref.current;a.style.top="0px";const Ne=Math.max(se,X+p.offsetTop+(oe?Se:0)+be)+he;a.style.height=Ne+"px",p.scrollTop=re-se+p.offsetTop}a.style.margin=`${Fe}px 0`,a.style.minHeight=ce+"px",a.style.maxHeight=U+"px",r?.(),requestAnimationFrame(()=>h.current=!0)}},[g,i.trigger,i.valueNode,a,c,p,v,y,i.dir,r]);_e(()=>b(),[b]);const[w,S]=F();_e(()=>{c&&S(window.getComputedStyle(c).zIndex)},[c]);const O=z(C=>{C&&m.current===!0&&(b(),_?.(),m.current=!1)},[b,_]);return f(mb,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:O,children:f("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:f(W.div,{...o,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Mu.displayName=hb;var gb="SelectPopperPosition",ci=R((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Fe,...i}=e,s=Xr(n);return f(au,{...s,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});ci.displayName=gb;var[mb,es]=mn($t,{}),ui="SelectViewport",Iu=R((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=Pt(ui,n),s=es(ui,n),a=ne(t,i.onViewportChange),l=M(0);return f(ge,{children:[f("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),f(Qr.Slot,{scope:n,children:f(W.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:k(o.onScroll,c=>{const d=c.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:g}=s;if(g?.current&&u){const h=Math.abs(l.current-d.scrollTop);if(h>0){const m=window.innerHeight-Fe*2,p=parseFloat(u.style.minHeight),v=parseFloat(u.style.height),y=Math.max(p,v);if(y<m){const _=y+h,b=Math.min(m,_),w=_-b;u.style.height=b+"px",u.style.bottom==="0px"&&(d.scrollTop=w>0?w:0,u.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});Iu.displayName=ui;var Au="SelectGroup",[vb,yb]=mn(Au),Tu=R((e,t)=>{const{__scopeSelect:n,...r}=e,o=je();return f(vb,{scope:n,id:o,children:f(W.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Tu.displayName=Au;var Nu="SelectLabel",Du=R((e,t)=>{const{__scopeSelect:n,...r}=e,o=yb(Nu,n);return f(W.div,{id:o.id,...r,ref:t})});Du.displayName=Nu;var Sr="SelectItem",[_b,ku]=mn(Sr),Fu=R((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...s}=e,a=Ct(Sr,n),l=Pt(Sr,n),c=a.value===r,[d,u]=F(i??""),[g,h]=F(!1),m=ne(t,_=>l.itemRefCallback?.(_,r,o)),p=je(),v=M("touch"),y=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return f(_b,{scope:n,value:r,disabled:o,textId:p,isSelected:c,onItemTextChange:z(_=>{u(b=>b||(_?.textContent??"").trim())},[]),children:f(Qr.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:f(W.div,{role:"option","aria-labelledby":p,"data-highlighted":g?"":void 0,"aria-selected":c&&g,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:m,onFocus:k(s.onFocus,()=>h(!0)),onBlur:k(s.onBlur,()=>h(!1)),onClick:k(s.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:k(s.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:k(s.onPointerDown,_=>{v.current=_.pointerType}),onPointerMove:k(s.onPointerMove,_=>{v.current=_.pointerType,o?l.onItemLeave?.():v.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:k(s.onPointerLeave,_=>{_.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:k(s.onKeyDown,_=>{l.searchRef?.current!==""&&_.key===" "||(ib.includes(_.key)&&y(),_.key===" "&&_.preventDefault())})})})})});Fu.displayName=Sr;var xn="SelectItemText",$u=R((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,s=Ct(xn,n),a=Pt(xn,n),l=ku(xn,n),c=cb(xn,n),[d,u]=F(null),g=ne(t,y=>u(y),l.onItemTextChange,y=>a.itemTextRefCallback?.(y,l.value,l.disabled)),h=d?.textContent,m=fe(()=>f("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=c;return _e(()=>(p(m),()=>v(m)),[p,v,m]),f(ge,{children:[f(W.span,{id:l.textId,...i,ref:g}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Mr(i.children,s.valueNode):null]})});$u.displayName=xn;var Lu="SelectItemIndicator",ju=R((e,t)=>{const{__scopeSelect:n,...r}=e;return ku(Lu,n).isSelected?f(W.span,{"aria-hidden":!0,...r,ref:t}):null});ju.displayName=Lu;var di="SelectScrollUpButton",bb=R((e,t)=>{const n=Pt(di,e.__scopeSelect),r=es(di,e.__scopeSelect),[o,i]=F(!1),s=ne(t,r.onScrollButtonChange);return _e(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollTop>0;i(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?f(Vu,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});bb.displayName=di;var fi="SelectScrollDownButton",wb=R((e,t)=>{const n=Pt(fi,e.__scopeSelect),r=es(fi,e.__scopeSelect),[o,i]=F(!1),s=ne(t,r.onScrollButtonChange);return _e(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<c;i(d)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?f(Vu,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});wb.displayName=fi;var Vu=R((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=Pt("SelectScrollButton",n),s=M(null),a=Yr(n),l=z(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return j(()=>()=>l(),[l]),_e(()=>{a().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),f(W.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:k(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:k(o.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:k(o.onPointerLeave,()=>{l()})})}),xb="SelectSeparator",Hu=R((e,t)=>{const{__scopeSelect:n,...r}=e;return f(W.div,{"aria-hidden":!0,...r,ref:t})});Hu.displayName=xb;var pi="SelectArrow",Sb=R((e,t)=>{const{__scopeSelect:n,...r}=e,o=Xr(n),i=Ct(pi,n),s=Pt(pi,n);return i.open&&s.position==="popper"?f(lu,{...o,...r,ref:t}):null});Sb.displayName=pi;var Cb="SelectBubbleInput",zu=R(({__scopeSelect:e,value:t,...n},r)=>{const o=M(null),i=ne(r,o),s=v_(t);return j(()=>{const a=o.current;if(!a)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&d){const u=new Event("change",{bubbles:!0});d.call(a,t),a.dispatchEvent(u)}},[s,t]),f(W.select,{...n,style:{...cu,...n.style},ref:i,defaultValue:t})});zu.displayName=Cb;function Gu(e){return e===""||e===void 0}function Uu(e){const t=Je(e),n=M(""),r=M(0),o=z(s=>{const a=n.current+s;t(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),i=z(()=>{n.current="",window.clearTimeout(r.current)},[]);return j(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function Bu(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=Pb(e,Math.max(i,0));o.length===1&&(s=s.filter(c=>c!==n));const l=s.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Pb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Rb=_u,Eb=wu,Ob=Su,qu=Cu,Mb=Pu,Ib=Ru,Ab=Iu,Tb=Tu,Nb=Du,Db=Fu,kb=$u,Fb=ju,$b=Hu;const Lb=Rb,jb=({className:e,children:t,...n})=>f(Eb,{className:Q("flex h-10 min-w-40 items-center shadow-md justify-between border-2 border-border bg-transparent px-4 py-2 ring-offset-background placeholder:text-muted-foreground focus:outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...n,children:[t,f(qu,{asChild:!0,children:f(_c,{className:"ml-2 h-4 w-4"})})]}),Vb=Ob,Hb=qu,zb=({className:e,children:t,position:n="popper",...r})=>f(Mb,{children:f(Ib,{className:Q("relative z-50 min-w-[8rem] overflow-hidden border border-border bg-background text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:f(Ab,{className:Q(n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}),Gb=Tb,Ub=({className:e,children:t,...n})=>f(Db,{className:Q("relative flex w-full cursor-default select-none items-center py-1.5 px-2 outline-hidden hover:bg-primary hover:text-primary-foreground data-disabled:pointer-events-none data-disabled:opacity-50",e),...n,children:[f(kb,{children:t}),f("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:f(Fb,{children:f(yc,{className:"h-4 w-4 text-foreground"})})})]}),Bb=Nb,qb=$b,Jt=Object.assign(Lb,{Trigger:jb,Value:Vb,Icon:Hb,Content:zb,Group:Gb,Item:Ub,Label:Bb,Separator:qb});function Wu(){const e=Tr(),t=e.servers.find(i=>i.id===e.selectedServerId),n=Or(),r=Di(),o=Ni();return f("div",{className:"w-full flex items-center justify-between",children:[f("div",{children:f("a",{className:"text-lg font-bold",href:"/",children:"beanstalkd-ts-console"})}),f("div",{className:"flex gap-2 items-center",children:[f(Ev,{htmlFor:n,className:"text-lg",children:"Server:"}),f(Jt,{value:t?.id.toString(),onValueChange:i=>{const s=e.servers.find(a=>a.id.toString()===i);s&&(e.setSelectedServer(s),r.path!=="/"&&o.route("/"))},children:[f(Jt.Trigger,{id:n,className:"min-w-60",children:f(Jt.Value,{placeholder:"Select server"})}),f(Jt.Content,{children:f(Jt.Group,{children:e.servers.map(i=>f(Jt.Item,{value:i.id.toString(),children:i.address},i.id))})})]})]})]})}const Ha="shadow-md hover:shadow-none bg-transparent border-2 transition hover:translate-y-1",ts=ut("font-head transition-all outline-hidden cursor-pointer duration-200 font-medium flex items-center",{variants:{variant:{default:"shadow-md hover:shadow-none bg-primary text-black border-2 border-black transition hover:translate-y-1 hover:bg-primary-hover",secondary:"shadow-md hover:shadow-none bg-secondary shadow-primary text-secondary-foreground border-2 border-black transition hover:translate-y-1",outline:Ha,link:"bg-transparent hover:underline",danger:`${Ha} border-red-600 text-red-600 shadow-red-900`},size:{sm:"px-3 py-1 text-sm shadow hover:shadow-none",md:"px-4 py-1.5 text-base",lg:"px-8 py-3 text-lg",icon:"p-2"}},defaultVariants:{size:"md",variant:"default"}}),Tt=ee.forwardRef(({children:e,size:t="md",className:n="",variant:r="default",...o},i)=>f("button",{ref:i,className:Q(ts({variant:r,size:t}),n),...o,children:e}));Tt.displayName="Button";function Wb(e,t){return Vt((n,r)=>t[n][r]??n,e)}var ft=e=>{const{present:t,children:n}=e,r=Kb(t),o=typeof n=="function"?n({present:r.isPresent}):Ye.only(n),i=ne(r.ref,Qb(o));return typeof n=="function"||r.isPresent?un(o,{ref:i}):null};ft.displayName="Presence";function Kb(e){const[t,n]=F(),r=M(null),o=M(e),i=M("none"),s=e?"mounted":"unmounted",[a,l]=Wb(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return j(()=>{const c=lr(r.current);i.current=a==="mounted"?c:"none"},[a]),_e(()=>{const c=r.current,d=o.current;if(d!==e){const g=i.current,h=lr(c);e?l("MOUNT"):h==="none"||c?.display==="none"?l("UNMOUNT"):l(d&&g!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),_e(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,u=h=>{const p=lr(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&p&&(l("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},g=h=>{h.target===t&&(i.current=lr(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:z(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function lr(e){return e?.animationName||"none"}function Qb(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var No="rovingFocusGroup.onEntryFocus",Yb={bubbles:!1,cancelable:!0},zn="RovingFocusGroup",[hi,Ku,Xb]=Lr(zn),[Jb,Qu]=dt(zn,[Xb]),[Zb,ew]=Jb(zn),Yu=R((e,t)=>f(hi.Provider,{scope:e.__scopeRovingFocusGroup,children:f(hi.Slot,{scope:e.__scopeRovingFocusGroup,children:f(tw,{...e,ref:t})})}));Yu.displayName=zn;var tw=R((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...u}=e,g=M(null),h=ne(t,g),m=jr(i),[p,v]=wt({prop:s,defaultProp:a??null,onChange:l,caller:zn}),[y,_]=F(!1),b=Je(c),w=Ku(n),S=M(!1),[O,C]=F(0);return j(()=>{const x=g.current;if(x)return x.addEventListener(No,b),()=>x.removeEventListener(No,b)},[b]),f(Zb,{scope:n,orientation:r,dir:m,loop:o,currentTabStopId:p,onItemFocus:z(x=>v(x),[v]),onItemShiftTab:z(()=>_(!0),[]),onFocusableItemAdd:z(()=>C(x=>x+1),[]),onFocusableItemRemove:z(()=>C(x=>x-1),[]),children:f(W.div,{tabIndex:y||O===0?-1:0,"data-orientation":r,...u,ref:h,style:{outline:"none",...e.style},onMouseDown:k(e.onMouseDown,()=>{S.current=!0}),onFocus:k(e.onFocus,x=>{const I=!S.current;if(x.target===x.currentTarget&&I&&!y){const D=new CustomEvent(No,Yb);if(x.currentTarget.dispatchEvent(D),!D.defaultPrevented){const $=w().filter(L=>L.focusable),U=$.find(L=>L.active),Y=$.find(L=>L.id===p),X=[U,Y,...$].filter(Boolean).map(L=>L.ref.current);Zu(X,d)}}S.current=!1}),onBlur:k(e.onBlur,()=>_(!1))})})}),Xu="RovingFocusGroupItem",Ju=R((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:s,...a}=e,l=je(),c=i||l,d=ew(Xu,n),u=d.currentTabStopId===c,g=Ku(n),{onFocusableItemAdd:h,onFocusableItemRemove:m,currentTabStopId:p}=d;return j(()=>{if(r)return h(),()=>m()},[r,h,m]),f(hi.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:f(W.span,{tabIndex:u?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:k(e.onMouseDown,v=>{r?d.onItemFocus(c):v.preventDefault()}),onFocus:k(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:k(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=ow(v,d.orientation,d.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let b=g().filter(w=>w.focusable).map(w=>w.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const w=b.indexOf(v.currentTarget);b=d.loop?iw(b,w+1):b.slice(w+1)}setTimeout(()=>Zu(b))}}),children:typeof s=="function"?s({isCurrentTabStop:u,hasTabStop:p!=null}):s})})});Ju.displayName=Xu;var nw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function rw(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ow(e,t,n){const r=rw(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return nw[r]}function Zu(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function iw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var sw=Yu,aw=Ju,gi=["Enter"," "],lw=["ArrowDown","PageUp","Home"],ed=["ArrowUp","PageDown","End"],cw=[...lw,...ed],uw={ltr:[...gi,"ArrowRight"],rtl:[...gi,"ArrowLeft"]},dw={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Gn="Menu",[Nn,fw,pw]=Lr(Gn),[zt,td]=dt(Gn,[pw,Br,Qu]),Jr=Br(),nd=Qu(),[hw,Gt]=zt(Gn),[gw,Un]=zt(Gn),rd=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:s=!0}=e,a=Jr(t),[l,c]=F(null),d=M(!1),u=Je(i),g=jr(o);return j(()=>{const h=()=>{d.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>d.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),f(iu,{...a,children:f(hw,{scope:t,open:n,onOpenChange:u,content:l,onContentChange:c,children:f(gw,{scope:t,onClose:z(()=>u(!1),[u]),isUsingKeyboardRef:d,dir:g,modal:s,children:r})})})};rd.displayName=Gn;var mw="MenuAnchor",ns=R((e,t)=>{const{__scopeMenu:n,...r}=e,o=Jr(n);return f(su,{...o,...r,ref:t})});ns.displayName=mw;var rs="MenuPortal",[vw,od]=zt(rs,{forceMount:void 0}),id=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=Gt(rs,t);return f(vw,{scope:t,forceMount:n,children:f(ft,{present:n||i.open,children:f(qr,{asChild:!0,container:o,children:r})})})};id.displayName=rs;var ke="MenuContent",[yw,os]=zt(ke),sd=R((e,t)=>{const n=od(ke,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Gt(ke,e.__scopeMenu),s=Un(ke,e.__scopeMenu);return f(Nn.Provider,{scope:e.__scopeMenu,children:f(ft,{present:r||i.open,children:f(Nn.Slot,{scope:e.__scopeMenu,children:s.modal?f(_w,{...o,ref:t}):f(bw,{...o,ref:t})})})})}),_w=R((e,t)=>{const n=Gt(ke,e.__scopeMenu),r=M(null),o=ne(t,r);return j(()=>{const i=r.current;if(i)return Zi(i)},[]),f(is,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:k(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),bw=R((e,t)=>{const n=Gt(ke,e.__scopeMenu);return f(is,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ww=an("MenuContent.ScrollLock"),is=R((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:g,onDismiss:h,disableOutsideScroll:m,...p}=e,v=Gt(ke,n),y=Un(ke,n),_=Jr(n),b=nd(n),w=fw(n),[S,O]=F(null),C=M(null),x=ne(t,C,v.onContentChange),I=M(0),D=M(""),$=M(0),U=M(null),Y=M("right"),B=M(0),X=m?Kr:ge,L=m?{as:ww,allowPinchZoom:!0}:void 0,q=A=>{const ce=D.current+A,ye=w().filter(E=>!E.disabled),Se=document.activeElement,ae=ye.find(E=>E.ref.current===Se)?.textValue,se=ye.map(E=>E.textValue),Re=Nw(se,ce,ae),be=ye.find(E=>E.textValue===Re)?.ref.current;(function E(re){D.current=re,window.clearTimeout(I.current),re!==""&&(I.current=window.setTimeout(()=>E(""),1e3))})(ce),be&&setTimeout(()=>be.focus())};j(()=>()=>window.clearTimeout(I.current),[]),Gi();const P=z(A=>Y.current===U.current?.side&&kw(A,U.current?.area),[]);return f(yw,{scope:n,searchRef:D,onItemEnter:z(A=>{P(A)&&A.preventDefault()},[P]),onItemLeave:z(A=>{P(A)||(C.current?.focus(),O(null))},[P]),onTriggerLeave:z(A=>{P(A)&&A.preventDefault()},[P]),pointerGraceTimerRef:$,onPointerGraceIntentChange:z(A=>{U.current=A},[]),children:f(X,{...L,children:f(Hr,{asChild:!0,trapped:o,onMountAutoFocus:k(i,A=>{A.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:f(Vr,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:g,onDismiss:h,children:f(sw,{asChild:!0,...b,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:S,onCurrentTabStopIdChange:O,onEntryFocus:k(l,A=>{y.isUsingKeyboardRef.current||A.preventDefault()}),preventScrollOnEntryFocus:!0,children:f(au,{role:"menu","aria-orientation":"vertical","data-state":xd(v.open),"data-radix-menu-content":"",dir:y.dir,..._,...p,ref:x,style:{outline:"none",...p.style},onKeyDown:k(p.onKeyDown,A=>{const ye=A.target.closest("[data-radix-menu-content]")===A.currentTarget,Se=A.ctrlKey||A.altKey||A.metaKey,ae=A.key.length===1;ye&&(A.key==="Tab"&&A.preventDefault(),!Se&&ae&&q(A.key));const se=C.current;if(A.target!==se||!cw.includes(A.key))return;A.preventDefault();const be=w().filter(E=>!E.disabled).map(E=>E.ref.current);ed.includes(A.key)&&be.reverse(),Aw(be)}),onBlur:k(e.onBlur,A=>{A.currentTarget.contains(A.target)||(window.clearTimeout(I.current),D.current="")}),onPointerMove:k(e.onPointerMove,Dn(A=>{const ce=A.target,ye=B.current!==A.clientX;if(A.currentTarget.contains(ce)&&ye){const Se=A.clientX>B.current?"right":"left";Y.current=Se,B.current=A.clientX}}))})})})})})})});sd.displayName=ke;var xw="MenuGroup",ss=R((e,t)=>{const{__scopeMenu:n,...r}=e;return f(W.div,{role:"group",...r,ref:t})});ss.displayName=xw;var Sw="MenuLabel",ad=R((e,t)=>{const{__scopeMenu:n,...r}=e;return f(W.div,{...r,ref:t})});ad.displayName=Sw;var Cr="MenuItem",za="menu.itemSelect",Zr=R((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=M(null),s=Un(Cr,e.__scopeMenu),a=os(Cr,e.__scopeMenu),l=ne(t,i),c=M(!1),d=()=>{const u=i.current;if(!n&&u){const g=new CustomEvent(za,{bubbles:!0,cancelable:!0});u.addEventListener(za,h=>r?.(h),{once:!0}),wc(u,g),g.defaultPrevented?c.current=!1:s.onClose()}};return f(ld,{...o,ref:l,disabled:n,onClick:k(e.onClick,d),onPointerDown:u=>{e.onPointerDown?.(u),c.current=!0},onPointerUp:k(e.onPointerUp,u=>{c.current||u.currentTarget?.click()}),onKeyDown:k(e.onKeyDown,u=>{const g=a.searchRef.current!=="";n||g&&u.key===" "||gi.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});Zr.displayName=Cr;var ld=R((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,s=os(Cr,n),a=nd(n),l=M(null),c=ne(t,l),[d,u]=F(!1),[g,h]=F("");return j(()=>{const m=l.current;m&&h((m.textContent??"").trim())},[i.children]),f(Nn.ItemSlot,{scope:n,disabled:r,textValue:o??g,children:f(aw,{asChild:!0,...a,focusable:!r,children:f(W.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:c,onPointerMove:k(e.onPointerMove,Dn(m=>{r?s.onItemLeave(m):(s.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:k(e.onPointerLeave,Dn(m=>s.onItemLeave(m))),onFocus:k(e.onFocus,()=>u(!0)),onBlur:k(e.onBlur,()=>u(!1))})})})}),Cw="MenuCheckboxItem",cd=R((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return f(hd,{scope:e.__scopeMenu,checked:n,children:f(Zr,{role:"menuitemcheckbox","aria-checked":Pr(n)?"mixed":n,...o,ref:t,"data-state":ls(n),onSelect:k(o.onSelect,()=>r?.(Pr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});cd.displayName=Cw;var ud="MenuRadioGroup",[Pw,Rw]=zt(ud,{value:void 0,onValueChange:()=>{}}),dd=R((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Je(r);return f(Pw,{scope:e.__scopeMenu,value:n,onValueChange:i,children:f(ss,{...o,ref:t})})});dd.displayName=ud;var fd="MenuRadioItem",pd=R((e,t)=>{const{value:n,...r}=e,o=Rw(fd,e.__scopeMenu),i=n===o.value;return f(hd,{scope:e.__scopeMenu,checked:i,children:f(Zr,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":ls(i),onSelect:k(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});pd.displayName=fd;var as="MenuItemIndicator",[hd,Ew]=zt(as,{checked:!1}),gd=R((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=Ew(as,n);return f(ft,{present:r||Pr(i.checked)||i.checked===!0,children:f(W.span,{...o,ref:t,"data-state":ls(i.checked)})})});gd.displayName=as;var Ow="MenuSeparator",md=R((e,t)=>{const{__scopeMenu:n,...r}=e;return f(W.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});md.displayName=Ow;var Mw="MenuArrow",vd=R((e,t)=>{const{__scopeMenu:n,...r}=e,o=Jr(n);return f(lu,{...o,...r,ref:t})});vd.displayName=Mw;var Iw="MenuSub",[$S,yd]=zt(Iw),Sn="MenuSubTrigger",_d=R((e,t)=>{const n=Gt(Sn,e.__scopeMenu),r=Un(Sn,e.__scopeMenu),o=yd(Sn,e.__scopeMenu),i=os(Sn,e.__scopeMenu),s=M(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=i,c={__scopeMenu:e.__scopeMenu},d=z(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return j(()=>d,[d]),j(()=>{const u=a.current;return()=>{window.clearTimeout(u),l(null)}},[a,l]),f(ns,{asChild:!0,...c,children:f(ld,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":xd(n.open),...e,ref:$r(t,o.onTriggerChange),onClick:u=>{e.onClick?.(u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:k(e.onPointerMove,Dn(u=>{i.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:k(e.onPointerLeave,Dn(u=>{d();const g=n.content?.getBoundingClientRect();if(g){const h=n.content?.dataset.side,m=h==="right",p=m?-5:5,v=g[m?"left":"right"],y=g[m?"right":"left"];i.onPointerGraceIntentChange({area:[{x:u.clientX+p,y:u.clientY},{x:v,y:g.top},{x:y,y:g.top},{x:y,y:g.bottom},{x:v,y:g.bottom}],side:h}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(u),u.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:k(e.onKeyDown,u=>{const g=i.searchRef.current!=="";e.disabled||g&&u.key===" "||uw[r.dir].includes(u.key)&&(n.onOpenChange(!0),n.content?.focus(),u.preventDefault())})})})});_d.displayName=Sn;var bd="MenuSubContent",wd=R((e,t)=>{const n=od(ke,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Gt(ke,e.__scopeMenu),s=Un(ke,e.__scopeMenu),a=yd(bd,e.__scopeMenu),l=M(null),c=ne(t,l);return f(Nn.Provider,{scope:e.__scopeMenu,children:f(ft,{present:r||i.open,children:f(Nn.Slot,{scope:e.__scopeMenu,children:f(is,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:c,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{s.isUsingKeyboardRef.current&&l.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:k(e.onFocusOutside,d=>{d.target!==a.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:k(e.onEscapeKeyDown,d=>{s.onClose(),d.preventDefault()}),onKeyDown:k(e.onKeyDown,d=>{const u=d.currentTarget.contains(d.target),g=dw[s.dir].includes(d.key);u&&g&&(i.onOpenChange(!1),a.trigger?.focus(),d.preventDefault())})})})})})});wd.displayName=bd;function xd(e){return e?"open":"closed"}function Pr(e){return e==="indeterminate"}function ls(e){return Pr(e)?"indeterminate":e?"checked":"unchecked"}function Aw(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Tw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Nw(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=Tw(e,Math.max(i,0));o.length===1&&(s=s.filter(c=>c!==n));const l=s.find(c=>c.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Dw(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],l=t[s],c=a.x,d=a.y,u=l.x,g=l.y;d>r!=g>r&&n<(u-c)*(r-d)/(g-d)+c&&(o=!o)}return o}function kw(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Dw(n,t)}function Dn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Fw=rd,$w=ns,Lw=id,jw=sd,Vw=ss,Hw=ad,zw=Zr,Gw=cd,Uw=dd,Bw=pd,qw=gd,Ww=md,Kw=vd,Qw=_d,Yw=wd,eo="DropdownMenu",[Xw,LS]=dt(eo,[td]),Pe=td(),[Jw,Sd]=Xw(eo),Cd=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,l=Pe(t),c=M(null),[d,u]=wt({prop:o,defaultProp:i??!1,onChange:s,caller:eo});return f(Jw,{scope:t,triggerId:je(),triggerRef:c,contentId:je(),open:d,onOpenChange:u,onOpenToggle:z(()=>u(g=>!g),[u]),modal:a,children:f(Fw,{...l,open:d,onOpenChange:u,dir:r,modal:a,children:n})})};Cd.displayName=eo;var Pd="DropdownMenuTrigger",Rd=R((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=Sd(Pd,n),s=Pe(n);return f($w,{asChild:!0,...s,children:f(W.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:$r(t,i.triggerRef),onPointerDown:k(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(i.onOpenToggle(),i.open||a.preventDefault())}),onKeyDown:k(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&i.onOpenToggle(),a.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});Rd.displayName=Pd;var Zw="DropdownMenuPortal",Ed=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Pe(t);return f(Lw,{...r,...n})};Ed.displayName=Zw;var Od="DropdownMenuContent",Md=R((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Sd(Od,n),i=Pe(n),s=M(!1);return f(jw,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:k(e.onCloseAutoFocus,a=>{s.current||o.triggerRef.current?.focus(),s.current=!1,a.preventDefault()}),onInteractOutside:k(e.onInteractOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,d=l.button===2||c;(!o.modal||d)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Md.displayName=Od;var ex="DropdownMenuGroup",tx=R((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pe(n);return f(Vw,{...o,...r,ref:t})});tx.displayName=ex;var nx="DropdownMenuLabel",rx=R((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pe(n);return f(Hw,{...o,...r,ref:t})});rx.displayName=nx;var ox="DropdownMenuItem",Id=R((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pe(n);return f(zw,{...o,...r,ref:t})});Id.displayName=ox;var ix="DropdownMenuCheckboxItem",sx=R((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pe(n);return f(Gw,{...o,...r,ref:t})});sx.displayName=ix;var ax="DropdownMenuRadioGroup",lx=R((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pe(n);return f(Uw,{...o,...r,ref:t})});lx.displayName=ax;var cx="DropdownMenuRadioItem",ux=R((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pe(n);return f(Bw,{...o,...r,ref:t})});ux.displayName=cx;var dx="DropdownMenuItemIndicator",fx=R((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pe(n);return f(qw,{...o,...r,ref:t})});fx.displayName=dx;var px="DropdownMenuSeparator",hx=R((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pe(n);return f(Ww,{...o,...r,ref:t})});hx.displayName=px;var gx="DropdownMenuArrow",mx=R((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pe(n);return f(Kw,{...o,...r,ref:t})});mx.displayName=gx;var vx="DropdownMenuSubTrigger",yx=R((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pe(n);return f(Qw,{...o,...r,ref:t})});yx.displayName=vx;var _x="DropdownMenuSubContent",bx=R((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pe(n);return f(Yw,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});bx.displayName=_x;var wx=Cd,xx=Rd,Sx=Ed,Cx=Md,Px=Id;const Rx=wx,Ex=xx,Ox=({className:e,...t})=>f(Sx,{children:f(Cx,{side:"bottom",align:"start",className:Q("bg-white border-2 shadow-md absolute top-2 min-w-20",e),...t})}),Ad=ee.forwardRef(({className:e,...t},n)=>f(Px,{ref:n,className:Q("relative text-black flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden transition-colors hover:bg-primary focus:bg-primary data-disabled:pointer-events-none data-disabled:opacity-50",e),...t}));Ad.displayName="MenuItem";const _n=Object.assign(Rx,{Trigger:Ex,Content:Ox,Item:Ad}),Mx=ut("font-semibold ",{variants:{variant:{default:"bg-gray-200 text-gray-700",outline:"outline-2 outline-foreground text-foreground",solid:"bg-foreground text-background",surface:"outline-2 bg-primary text-black"},size:{sm:"px-2 py-1 text-xs",md:"px-2.5 py-1.5 text-sm",lg:"px-3 py-2 text-base"}},defaultVariants:{variant:"default",size:"md"}});function J({children:e,size:t="md",variant:n="default",className:r="",...o}){return f("span",{className:Q(Mx({variant:n,size:t}),r),...o,children:e})}var to="Dialog",[Td,jS]=dt(to),[Ix,Ue]=Td(to),Nd=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=M(null),l=M(null),[c,d]=wt({prop:r,defaultProp:o??!1,onChange:i,caller:to});return f(Ix,{scope:t,triggerRef:a,contentRef:l,contentId:je(),titleId:je(),descriptionId:je(),open:c,onOpenChange:d,onOpenToggle:z(()=>d(u=>!u),[d]),modal:s,children:n})};Nd.displayName=to;var Dd="DialogTrigger",kd=R((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ue(Dd,n),i=ne(t,o.triggerRef);return f(W.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ds(o.open),...r,ref:i,onClick:k(e.onClick,o.onOpenToggle)})});kd.displayName=Dd;var cs="DialogPortal",[Ax,Fd]=Td(cs,{forceMount:void 0}),$d=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Ue(cs,t);return f(Ax,{scope:t,forceMount:n,children:Ye.map(r,s=>f(ft,{present:n||i.open,children:f(qr,{asChild:!0,container:o,children:s})}))})};$d.displayName=cs;var Rr="DialogOverlay",Ld=R((e,t)=>{const n=Fd(Rr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Ue(Rr,e.__scopeDialog);return i.modal?f(ft,{present:r||i.open,children:f(Nx,{...o,ref:t})}):null});Ld.displayName=Rr;var Tx=an("DialogOverlay.RemoveScroll"),Nx=R((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ue(Rr,n);return f(Kr,{as:Tx,allowPinchZoom:!0,shards:[o.contentRef],children:f(W.div,{"data-state":ds(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Lt="DialogContent",jd=R((e,t)=>{const n=Fd(Lt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Ue(Lt,e.__scopeDialog);return f(ft,{present:r||i.open,children:i.modal?f(Dx,{...o,ref:t}):f(kx,{...o,ref:t})})});jd.displayName=Lt;var Dx=R((e,t)=>{const n=Ue(Lt,e.__scopeDialog),r=M(null),o=ne(t,n.contentRef,r);return j(()=>{const i=r.current;if(i)return Zi(i)},[]),f(Vd,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:k(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:k(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:k(e.onFocusOutside,i=>i.preventDefault())})}),kx=R((e,t)=>{const n=Ue(Lt,e.__scopeDialog),r=M(!1),o=M(!1);return f(Vd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;n.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Vd=R((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=Ue(Lt,n),l=M(null),c=ne(t,l);return Gi(),f(ge,{children:[f(Hr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:f(Vr,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":ds(a.open),...s,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),f(ge,{children:[f($x,{titleId:a.titleId}),f(jx,{contentRef:l,descriptionId:a.descriptionId})]})]})}),us="DialogTitle",Hd=R((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ue(us,n);return f(W.h2,{id:o.titleId,...r,ref:t})});Hd.displayName=us;var zd="DialogDescription",Gd=R((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ue(zd,n);return f(W.p,{id:o.descriptionId,...r,ref:t})});Gd.displayName=zd;var Ud="DialogClose",Fx=R((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ue(Ud,n);return f(W.button,{type:"button",...r,ref:t,onClick:k(e.onClick,()=>o.onOpenChange(!1))})});Fx.displayName=Ud;function ds(e){return e?"open":"closed"}var Bd="DialogTitleWarning",[VS,qd]=Ov(Bd,{contentName:Lt,titleName:us,docsSlug:"dialog"}),$x=({titleId:e})=>{const t=qd(Bd),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
153
+
154
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
155
+
156
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return j(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Lx="DialogDescriptionWarning",jx=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qd(Lx).contentName}}.`;return j(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Vx=Nd,Hx=kd,zx=$d,Gx=Ld,Ux=jd,Bx=Hd,qx=Gd;const Wx=Vx,Wd=Hx,Kx=ut(` fixed bg-black/80 font-head
157
+ data-[state=open]:fade-in-0
158
+ data-[state=open]:animate-in
159
+ data-[state=closed]:animate-out
160
+ data-[state=closed]:fade-out-0
161
+ `,{variants:{variant:{default:"inset-0 z-50 bg-black/80",none:"fixed bg-transparent"}},defaultVariants:{variant:"default"}}),Kd=ee.forwardRef(function(t,n){const{variant:r="default",className:o,...i}=t;return f(Gx,{className:Q(Kx({variant:r}),o),ref:n,...i})});Kd.displayName="DialogBackdrop";const Qx=ut(`fixed z-50 left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2
162
+ flex flex-col border-2 shadow-md gap-4 overflow-y-auto bg-background text-foreground
163
+ w-full h-fit max-h-[80vh] max-w-[97%] duration-300
164
+ data-[state=open]:animate-in
165
+ data-[state=open]:slide-in-from-left-1/2
166
+ data-[state=open]:slide-in-from-top-[48%]
167
+ data-[state=open]:fade-in-0
168
+ data-[state=open]:zoom-in-95
169
+ data-[state=closed]:animate-out
170
+ data-[state=closed]:fade-out-0
171
+ data-[state=closed]:slide-out-to-top-[48%]
172
+ data-[state=closed]:slide-out-to-left-1/2
173
+ data-[state=closed]:zoom-out-95`,{variants:{size:{auto:"max-w-fit",sm:"lg:max-w-[30%]",md:"lg:max-w-[40%]",lg:"lg:max-w-[50%]",xl:"lg:max-w-[60%]","2xl":"lg:max-w-[70%]","3xl":"lg:max-w-[80%]","4xl":"lg:max-w-[90%]",screen:"max-w-[100%]"}},defaultVariants:{size:"auto"}}),Qd=ee.forwardRef(function(t,n){const{children:r,size:o="auto",className:i,overlay:s,...a}=t;return f(zx,{children:[f(Kd,{...s}),f(Ux,{className:Q(Qx({size:o}),i),ref:n,...a,children:[f(uu,{children:f(Bx,{})}),f("div",{className:"flex flex-col relative",children:r})]})]})});Qd.displayName="DialogContent";const Yx=({children:e,className:t,...n})=>f(qx,{className:Q(t),...n,children:e}),Xx=ut("flex items-center justify-end border-t-2 min-h-12 gap-4 px-4 py-2",{variants:{variant:{default:"bg-background text-foreground"},position:{fixed:"sticky bottom-0",static:"static"}},defaultVariants:{position:"fixed"}}),Jx=({children:e,className:t,position:n,variant:r,...o})=>f("div",{className:Q(Xx({position:n,variant:r}),t),...o,children:e}),Zx=ut("flex items-center justify-between border-b-2 px-4 min-h-12",{variants:{variant:{default:"bg-primary text-black"},position:{fixed:"sticky top-0",static:"static"}},defaultVariants:{variant:"default",position:"static"}}),eS=({children:e})=>f(ge,{children:[e,f(Wd,{title:"Close pop-up",className:"cursor-pointer",asChild:!0,children:f(bc,{})})]}),tS=({children:e,className:t,position:n,variant:r,asChild:o,...i})=>f("div",{className:Q(Zx({position:n,variant:r}),t),...i,children:o?e:f(eS,{children:e})}),bn=Object.assign(Wx,{Trigger:Wd,Header:tS,Content:Qd,Description:Yx,Footer:Jx});function Yd({serverAddress:e,serverId:t,tube:n,pause:r,pauseTimeLeft:o,onMutate:i}){const s=Ni(),a=Di(),l=Vn(),c=qs(l.tubes.pause.mutationOptions({onMutate:i})),d=qs(l.tubes.clear.mutationOptions({onMutate:()=>{a.path!=="/"&&s.route("/")}})),u=r>0&&o>0;return f("div",{className:"flex justify-end gap-3",children:[n!=="default"&&f(bn,{children:[f(bn.Trigger,{children:f(Tt,{size:"icon",variant:"danger",children:d.isPending?"Clearing...":f(Fm,{className:"w-4 h-4"})})}),f(bn.Content,{children:[f(bn.Header,{className:"bg-red-500 text-white font-bold",children:"Are you sure want to clear tube?"}),f("section",{className:"flex flex-col p-3",children:[f("section",{children:["The tube ",f(J,{children:n})," in the server"," ",f(J,{size:"sm",children:e})," will be"," ",f("span",{className:"font-bold",children:"CLEARED"}),"."]}),f("section",{className:"mb-3 text-sm",children:["This action cannot be ",f("span",{className:"font-bold",children:"UNDONE"}),"."]}),f("section",{className:"flex w-full justify-end",children:f(bn.Trigger,{asChild:!0,children:f(Tt,{variant:"danger",onClick:()=>d.mutate({serverId:t,tube:n}),children:"Confirm"})})})]})]})]}),u?f(Tt,{disabled:c.isPending,size:"icon",onClick:()=>c.mutate({serverId:t,tube:n,seconds:0}),children:c.isPending?f(ua,{className:"w-4 h-4"}):f(Tm,{className:"w-4 h-4"})}):f(Tt,{disabled:c.isPending,size:"icon",onClick:()=>c.mutate({serverId:t,tube:n,seconds:999999}),children:c.isPending?f(ua,{className:"w-4 h-4"}):f(Im,{className:"w-4 h-4"})})]})}const nS=jl(Vl(e=>({tubeListColumnVisibility:{},setVisibility:(t,n)=>e({[t]:n})}),{name:"beanstalkd-ts-console:preferences",storage:ki(()=>localStorage)}));function de({value:e}){const[t,n]=F(!1),[r,o]=F(e);return j(()=>{e!==r&&(n(!0),o(e),setTimeout(()=>n(!1),250))},[r,e]),f("span",{className:Q("transition duration-200 p-2",t?"text-primary font-bold":"text-black"),children:e})}const Xd=R(({className:e,...t},n)=>f("table",{ref:n,className:Q("w-full caption-bottom text-sm border-2 shadow-lg",e),...t}));Xd.displayName="Table";const Jd=R(({className:e,...t},n)=>f("thead",{ref:n,className:Q("[&_tr]:border-b bg-primary text-primary-foreground font-head",e),...t}));Jd.displayName="TableHeader";const Zd=R(({className:e,...t},n)=>f("tbody",{ref:n,className:Q("[&_tr:last-child]:border-0",e),...t}));Zd.displayName="TableBody";const ef=R(({className:e,...t},n)=>f("tfoot",{ref:n,className:Q("border-t bg-accent font-medium [&>tr]:last:border-b-0",e),...t}));ef.displayName="TableFooter";const tf=R(({className:e,...t},n)=>f("tr",{ref:n,className:Q("border-b transition-colors hover:bg-primary/50 hover:text-primary-foreground data-[state=selected]:bg-muted",e),...t}));tf.displayName="TableRow";const nf=R(({className:e,...t},n)=>f("th",{ref:n,className:Q("h-12 px-4 text-left align-middle font-medium text-primary-foreground [&:has([role=checkbox])]:pr-0",e),...t}));nf.displayName="TableHead";const rf=R(({className:e,...t},n)=>f("td",{ref:n,className:Q("p-3 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));rf.displayName="TableCell";const of=R(({className:e,...t},n)=>f("caption",{ref:n,className:Q("my-2 text-sm text-muted-foreground",e),...t}));of.displayName="TableCaption";const Me=Object.assign(Xd,{Header:Jd,Body:Zd,Footer:ef,Row:tf,Head:nf,Cell:rf,Caption:of});function rS({result:e,table:t}){return f(Me,{children:[f(Me.Header,{children:t.getHeaderGroups().map(n=>f(Me.Row,{children:n.headers.map(r=>{const o=r.column.getCanSort(),i=r.column.getIsSorted(),s=o?i===!1?f(vm,{className:"h-4 w-4 opacity-40 group-hover:opacity-70 transition-opacity"}):i==="asc"?f(_m,{className:"h-4 w-4 text-gray-70"}):f(gm,{className:"h-4 w-4 text-gray-70"}):null;return f(Me.Head,{children:[r.isPlaceholder?null:la(r.column.columnDef.header,r.getContext()),s]},r.id)})},n.id))}),f(Me.Body,{children:e.isLoading?f(Me.Row,{children:f(Me.Cell,{children:"Loading..."})}):e.isError?f(Me.Row,{children:f(Me.Cell,{children:"Failed to fetch."})}):!e.data||t.getRowCount()===0?f(Me.Row,{children:f(Me.Cell,{children:"No data"})}):t.getRowModel().rows.map(n=>f(Me.Row,{children:n.getVisibleCells().map(r=>f(Me.Cell,{children:la(r.column.columnDef.cell,r.getContext())},r.id))},n.id))})]})}function oS(){const e=Vn(),t=Tr(),n=t.selectedServerId,r=t.servers.find(l=>l.id===n)?.address??"-",o=Ar(e.tubes.list.queryOptions({serverId:n},{refetchInterval:400})),i=nS(),s=fe(()=>[{id:"name",header:"Tube",cell:l=>f("a",{className:Q(ts({variant:"link"}),"text-sm"),href:`/servers/${n}/tubes/${l.row.original.name}`,children:l.row.original.name})},{id:"currentJobsUrgent",cell:({row:l})=>f(de,{value:l.original.stats.currentJobsUrgent}),header:"Urgent Jobs"},{id:"currentJobsReady",cell:({row:l})=>f(de,{value:l.original.stats.currentJobsReady}),header:"Ready Jobs"},{id:"currentJobsReserved",cell:({row:l})=>f(de,{value:l.original.stats.currentJobsReserved}),header:"Reserved Jobs"},{id:"currentJobsDelayed",cell:({row:l})=>f(de,{value:l.original.stats.currentJobsDelayed}),header:"Delayed Jobs"},{id:"currentJobsBuried",cell:({row:l})=>f(de,{value:l.original.stats.currentJobsBuried}),header:"Buried Jobs"},{id:"currentUsing",cell:({row:l})=>f(de,{value:l.original.stats.currentUsing}),header:"Producers"},{id:"currentWatching",cell:({row:l})=>f(de,{value:l.original.stats.currentWatching}),header:"Consumers"},{id:"currentWaiting",cell:({row:l})=>f(de,{value:l.original.stats.currentWaiting}),header:"Consumers Waiting"},{id:"cmdDelete",cell:({row:l})=>f(de,{value:l.original.stats.cmdDelete}),header:"Deletes"},{id:"cmdPauseTube",cell:({row:l})=>f(de,{value:l.original.stats.cmdPauseTube}),header:"Pauses"},{id:"totalJobs",cell:({row:l})=>f(de,{value:l.original.stats.totalJobs}),header:"Total Jobs"},{id:"actions",header:"Actions",cell:({row:{original:{name:l,stats:c}}})=>f(Yd,{serverAddress:r,serverId:n,tube:l,pause:c.pause,pauseTimeLeft:c.pauseTimeLeft,onMutate:o.refetch})}],[o.refetch,r,n]),a=lm({columns:s,data:o.data??[],getCoreRowModel:om(),state:{columnVisibility:i.tubeListColumnVisibility}});return j(()=>{const l=i.tubeListColumnVisibility;let c=!1;s.forEach(d=>{d.id&&(d.id in l||(c=!0,l[d.id]=!0))}),c&&i.setVisibility("tubeListColumnVisibility",{...i.tubeListColumnVisibility,...l})},[s,i]),f("div",{className:"p-3",children:[f(Wu,{}),f("div",{className:"flex items-center gap-4 my-2",children:[f(_n,{children:[f(_n.Trigger,{asChild:!0,children:f(Tt,{size:"icon",children:f(Om,{className:"w-4 h-4"})})}),f(_n.Content,{className:"min-w-36",children:[a.getAllColumns().map(l=>f(_n.Item,{className:Q("flex justify-between",l.getIsVisible()?"bg-primary/40":"bg-primary/5"),onClick:()=>i.setVisibility("tubeListColumnVisibility",{...i.tubeListColumnVisibility,[l.id]:!l.getIsVisible()}),children:[f("span",{children:l.columnDef.header??l.id}),l.getIsVisible()?f(yc,{className:"w-3 h-3"}):f(bc,{className:"w-3 h-3"})]},l.id)),f(_n.Item,{})]})]}),f("span",{className:"text-xl",children:"Tubes"})]}),f(rS,{result:o,table:a})]})}var no="Collapsible",[iS,sf]=dt(no),[sS,fs]=iS(no),af=R((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:s,...a}=e,[l,c]=wt({prop:r,defaultProp:o??!1,onChange:s,caller:no});return f(sS,{scope:n,disabled:i,contentId:je(),open:l,onOpenToggle:z(()=>c(d=>!d),[c]),children:f(W.div,{"data-state":hs(l),"data-disabled":i?"":void 0,...a,ref:t})})});af.displayName=no;var lf="CollapsibleTrigger",cf=R((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=fs(lf,n);return f(W.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":hs(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:k(e.onClick,o.onOpenToggle)})});cf.displayName=lf;var ps="CollapsibleContent",uf=R((e,t)=>{const{forceMount:n,...r}=e,o=fs(ps,e.__scopeCollapsible);return f(ft,{present:n||o.open,children:({present:i})=>f(aS,{...r,ref:t,present:i})})});uf.displayName=ps;var aS=R((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,s=fs(ps,n),[a,l]=F(r),c=M(null),d=ne(t,c),u=M(0),g=u.current,h=M(0),m=h.current,p=s.open||a,v=M(p),y=M(void 0);return j(()=>{const _=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(_)},[]),_e(()=>{const _=c.current;if(_){y.current=y.current||{transitionDuration:_.style.transitionDuration,animationName:_.style.animationName},_.style.transitionDuration="0s",_.style.animationName="none";const b=_.getBoundingClientRect();u.current=b.height,h.current=b.width,v.current||(_.style.transitionDuration=y.current.transitionDuration,_.style.animationName=y.current.animationName),l(r)}},[s.open,r]),f(W.div,{"data-state":hs(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!p,...i,ref:d,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:p&&o})});function hs(e){return e?"open":"closed"}var lS=af,cS=cf,uS=uf,Be="Accordion",dS=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[gs,fS,pS]=Lr(Be),[ro,HS]=dt(Be,[pS,sf]),ms=sf(),df=ee.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return f(gs.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?f(vS,{...i,ref:t}):f(mS,{...o,ref:t})})});df.displayName=Be;var[ff,hS]=ro(Be),[pf,gS]=ro(Be,{collapsible:!1}),mS=ee.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...s}=e,[a,l]=wt({prop:n,defaultProp:r??"",onChange:o,caller:Be});return f(ff,{scope:e.__scopeAccordion,value:ee.useMemo(()=>a?[a]:[],[a]),onItemOpen:l,onItemClose:ee.useCallback(()=>i&&l(""),[i,l]),children:f(pf,{scope:e.__scopeAccordion,collapsible:i,children:f(hf,{...s,ref:t})})})}),vS=ee.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[s,a]=wt({prop:n,defaultProp:r??[],onChange:o,caller:Be}),l=ee.useCallback(d=>a((u=[])=>[...u,d]),[a]),c=ee.useCallback(d=>a((u=[])=>u.filter(g=>g!==d)),[a]);return f(ff,{scope:e.__scopeAccordion,value:s,onItemOpen:l,onItemClose:c,children:f(pf,{scope:e.__scopeAccordion,collapsible:!0,children:f(hf,{...i,ref:t})})})}),[yS,oo]=ro(Be),hf=ee.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...s}=e,a=ee.useRef(null),l=ne(a,t),c=fS(n),u=jr(o)==="ltr",g=k(e.onKeyDown,h=>{if(!dS.includes(h.key))return;const m=h.target,p=c().filter(x=>!x.ref.current?.disabled),v=p.findIndex(x=>x.ref.current===m),y=p.length;if(v===-1)return;h.preventDefault();let _=v;const b=0,w=y-1,S=()=>{_=v+1,_>w&&(_=b)},O=()=>{_=v-1,_<b&&(_=w)};switch(h.key){case"Home":_=b;break;case"End":_=w;break;case"ArrowRight":i==="horizontal"&&(u?S():O());break;case"ArrowDown":i==="vertical"&&S();break;case"ArrowLeft":i==="horizontal"&&(u?O():S());break;case"ArrowUp":i==="vertical"&&O();break}const C=_%y;p[C].ref.current?.focus()});return f(yS,{scope:n,disabled:r,direction:o,orientation:i,children:f(gs.Slot,{scope:n,children:f(W.div,{...s,"data-orientation":i,ref:l,onKeyDown:r?void 0:g})})})}),Er="AccordionItem",[_S,vs]=ro(Er),gf=ee.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=oo(Er,n),s=hS(Er,n),a=ms(n),l=je(),c=r&&s.value.includes(r)||!1,d=i.disabled||e.disabled;return f(_S,{scope:n,open:c,disabled:d,triggerId:l,children:f(lS,{"data-orientation":i.orientation,"data-state":wf(c),...a,...o,ref:t,disabled:d,open:c,onOpenChange:u=>{u?s.onItemOpen(r):s.onItemClose(r)}})})});gf.displayName=Er;var mf="AccordionHeader",vf=ee.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=oo(Be,n),i=vs(mf,n);return f(W.h3,{"data-orientation":o.orientation,"data-state":wf(i.open),"data-disabled":i.disabled?"":void 0,...r,ref:t})});vf.displayName=mf;var mi="AccordionTrigger",yf=ee.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=oo(Be,n),i=vs(mi,n),s=gS(mi,n),a=ms(n);return f(gs.ItemSlot,{scope:n,children:f(cS,{"aria-disabled":i.open&&!s.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId,...a,...r,ref:t})})});yf.displayName=mi;var _f="AccordionContent",bf=ee.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=oo(Be,n),i=vs(_f,n),s=ms(n);return f(uS,{role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation,...s,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});bf.displayName=_f;function wf(e){return e?"open":"closed"}var bS=df,xf=gf,Sf=vf,wS=yf,Cf=bf;const xS=bS,Pf=R(({className:e,...t},n)=>f(xf,{ref:n,className:Q("border-2 bg-background text-foreground shadow-md hover:shadow-sm data-[state=open]:shadow-sm transition-all overflow-hidden",e),...t}));Pf.displayName=xf.displayName;const Rf=R(({className:e,children:t,...n},r)=>f(Sf,{className:"flex",children:f(wS,{ref:r,className:Q("flex flex-1 items-start justify-between px-4 py-2 font-head cursor-pointer focus:outline-hidden [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,f(_c,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Rf.displayName=Sf.displayName;const Ef=R(({className:e,children:t,...n},r)=>f(Cf,{ref:r,className:"overflow-hidden px-4 py-2 font-body bg-white text-gray-700 transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:f("div",{className:Q("pb-4 pt-0",e),children:t})}));Ef.displayName=Cf.displayName;const Ot=Object.assign(xS,{Item:Pf,Header:Rf,Content:Ef}),SS=ut("font-head",{variants:{as:{p:"font-sans text-base",li:"font-sans text-base",a:"font-sans text-base hover:underline underline-offset-2 decoration-primary",h1:"text-4xl lg:text-5xl font-bold",h2:"text-3xl lg:text-4xl font-semibold",h3:"text-2xl font-medium",h4:"text-xl font-normal",h5:"text-lg font-normal",h6:"text-base font-normal"}},defaultVariants:{as:"p"}}),Of=e=>{const{className:t,as:n,...r}=e;return f(n||"p",{className:Q(SS({as:n}),t),...r})},CS=ut("relative w-full border-2 p-4",{variants:{variant:{default:"bg-background text-foreground",solid:"bg-black text-white"},status:{error:"bg-red-300 text-red-800 border-red-800",success:"bg-green-300 text-green-800 border-green-800",warning:"bg-yellow-300 text-yellow-800 border-yellow-800",info:"bg-blue-300 text-blue-800 border-blue-800"}},defaultVariants:{variant:"default"}}),Mf=({className:e,variant:t,status:n,...r})=>f("div",{role:"alert",className:Q(CS({variant:t,status:n}),e),...r});Mf.displayName="Alert";const If=({className:e,...t})=>f(Of,{as:"h5",className:Q(e),...t});If.displayName="AlertTitle";const Af=({className:e,...t})=>f("div",{className:Q("text-muted-foreground",e),...t});Af.displayName="AlertDescription";const vi=Object.assign(Mf,{Title:If,Description:Af}),PS=({className:e,...t})=>f("div",{className:Q("inline-block border-2 shadow-md transition-all hover:shadow-xs bg-card",e),...t}),RS=({className:e,...t})=>f("div",{className:Q("flex flex-col justify-start p-4",e),...t}),ES=({className:e,...t})=>f(Of,{as:"h3",className:Q("mb-2",e),...t}),OS=({className:e,...t})=>f("p",{className:Q("text-muted-foreground",e),...t}),MS=({className:e,...t})=>f("div",{className:Q("p-4",e),...t}),en=Object.assign(PS,{Header:RS,Title:ES,Description:OS,Content:MS});function Do({serverId:e,state:t,tube:n}){const r=Vn(),o=Ar(r.jobs[t==="buried"?"peekBuried":t==="delayed"?"peekDelayed":"peekReady"].queryOptions({serverId:e,tube:n}));return f(en,{className:"flex-1",children:[f(en.Header,{children:f(en.Title,{className:"flex justify-between items-center text-sm",children:[f("div",{children:["Next job in ",f(J,{children:t})," state"]}),f("div",{children:f(Tt,{size:"icon",onClick:()=>o.refetch(),children:f(Dm,{className:Q("w-3 h-3",o.isRefetching&&"animate-spin")})})})]})}),f(en.Content,{children:o.isPending?"Loading...":o.isError?f(vi,{children:o.error.message}):o.data?f("div",{className:"flex flex-col gap-2",children:[f("div",{children:f(J,{children:["jobId: ",o.data.job.id]})}),f(Ot,{type:"multiple",defaultValue:["payload","stats"],children:[f(Ot.Item,{value:"payload",children:[f(Ot.Header,{children:"Payload"}),f(Ot.Content,{className:"max-w-sm",children:f("pre",{className:"overflow-scroll p-4 bg-secondary/5",children:o.data.job.payload})})]}),f(Ot.Item,{value:"stats",children:[f(Ot.Header,{children:"Statistics"}),f(Ot.Content,{className:"flex flex-col gap-1",children:[f(J,{children:["delay: ",o.data.stats.delay]}),f(J,{children:["pri: ",o.data.stats.pri]}),f(J,{children:["timeLeft: ",o.data.stats.timeLeft]}),f(J,{children:["ttr: ",o.data.stats.ttr]}),f("hr",{}),f(J,{children:["age: ",o.data.stats.age]}),f(J,{children:["buries: ",o.data.stats.buries]}),f(J,{children:["kicks: ",o.data.stats.kicks]}),f(J,{children:["releases: ",o.data.stats.releases]}),f(J,{children:["reserves: ",o.data.stats.reserves]}),f(J,{children:["state: ",o.data.stats.state]}),f(J,{children:["timeouts: ",o.data.stats.timeouts]}),f("hr",{}),f(J,{children:["file: ",o.data.stats.file]}),f(J,{children:["job id: ",o.data.stats.id]}),f(J,{children:["tube: ",o.data.stats.tube]})]})]})]})]}):f(vi,{children:"no jobs found"})})]})}function IS({stats:e}){return f(en,{className:"w-full",children:f(en.Content,{className:"flex flex-col gap-2",children:[e.data&&e.data.pauseTimeLeft>0&&f(vi,{className:"flex flex-col gap-2",children:[f("span",{className:"flex items-center gap-1",children:[f(Rm,{className:"w-4 h-4"}),"Tube paused."]}),f("span",{className:"flex gap-1",children:["The tube will be resumed after",f("span",{className:"text-background bg-foreground/70 px-2",children:e.data.pauseTimeLeft}),"seconds."]})]}),f("div",{className:"flex gap-1",children:[f(J,{variant:"solid",children:"jobs"}),f(J,{children:["urgent",f(de,{value:e.data?.currentJobsUrgent??0})]}),f(J,{children:["ready",f(de,{value:e.data?.currentJobsReady??0})]}),f(J,{children:["reserved",f(de,{value:e.data?.currentJobsReserved??0})]}),f(J,{children:["delayed",f(de,{value:e.data?.currentJobsDelayed??0})]}),f(J,{children:["buried",f(de,{value:e.data?.currentJobsBuried??0})]}),f(J,{children:["total",f(de,{value:e.data?.totalJobs??0})]})]}),f("div",{className:"flex gap-1",children:[f(J,{variant:"solid",children:"commands"}),f(J,{children:["deletes",f(de,{value:e.data?.cmdDelete??0})]}),f(J,{children:["pauses",f(de,{value:e.data?.cmdPauseTube??0})]})]}),f("div",{className:"flex gap-1",children:[f(J,{variant:"solid",children:"connections"}),f(J,{children:["producers",f(de,{value:e.data?.currentUsing??0})]}),f(J,{children:["consumers",f(de,{value:e.data?.currentWatching??0})]}),f(J,{children:["consumers waiting",f(de,{value:e.data?.currentWaiting??0})]})]})]})})}function AS({serverAddress:e,serverId:t,tube:n}){const r=Vn(),o=Ar(r.tubes.tubeStats.queryOptions({serverId:t,tube:n},{refetchInterval:1e3}));return f("div",{className:"p-3",children:[f(Wu,{}),f("div",{children:f("a",{className:Q(ts({variant:"link"}),"w-fit flex gap-2 text-sm"),href:"/",children:[f(Sm,{})," Tubes"]})}),f("div",{className:"flex items-center justify-between pb-2 text-lg font-bold my-3 border-b-4 border-primary/60",children:[f("span",{children:n}),f(Yd,{serverAddress:e,serverId:t,tube:n,pause:o.data?.pause??0,pauseTimeLeft:o.data?.pauseTimeLeft??0,onMutate:()=>{}})]}),f(IS,{stats:o}),f("div",{className:"flex gap-2 mt-4 max-w-full",children:[f(Do,{serverId:Number(t),state:"ready",tube:n}),f(Do,{serverId:Number(t),state:"delayed",tube:n}),f(Do,{serverId:Number(t),state:"buried",tube:n})]})]})}function TS(){const{params:e}=Di(),{serverId:t,tube:n}=e,o=Tr(i=>i.servers).find(i=>i.id===Number(t));return!t||!o||!n?f(ac,{}):f(AS,{serverAddress:o.address,serverId:Number(t),tube:n})}const NS=Gh({links:[Nh({url:"/trpc"})]}),Ga=new Zf({defaultOptions:{queries:{staleTime:60*1e3}}});function DS(){return f(wp,{client:Ga,children:f(mg,{queryClient:Ga,trpcClient:NS,children:f(Ln,{children:f(Fp,{children:f(vg,{children:f(Ll,{children:[f(fo,{path:"/",component:oS}),f(fo,{path:"/servers/:serverId/tubes/:tube",component:TS}),f(fo,{default:!0,component:ac})]})})})})})})}on(f(DS,{}),document.getElementById("app"));