@hot-updater/console 0.17.0 → 0.18.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.
- package/dist/assets/index-B40KfAQR.css +1 -0
- package/dist/assets/index-ClfoMSQp.js +27 -0
- package/dist/index.cjs +1997 -2048
- package/dist/index.d.cts +154 -0
- package/dist/index.d.ts +154 -0
- package/dist/index.html +2 -2
- package/dist/index.js +1906 -1911
- package/package.json +6 -5
- package/dist/assets/index-C9l9iw4B.js +0 -27
- package/dist/assets/index-paAi6YFm.css +0 -1
- package/dist/src/App.d.ts +0 -2
- package/dist/src/components/spash-screen.d.ts +0 -1
- package/dist/src/components/ui/button.d.ts +0 -15
- package/dist/src/components/ui/label.d.ts +0 -3
- package/dist/src/components/ui/layout.d.ts +0 -4
- package/dist/src/components/ui/navigation-menu.d.ts +0 -35
- package/dist/src/components/ui/pagination.d.ts +0 -27
- package/dist/src/components/ui/sheet.d.ts +0 -26
- package/dist/src/components/ui/skeleton.d.ts +0 -8
- package/dist/src/components/ui/sonner.d.ts +0 -5
- package/dist/src/components/ui/switch.d.ts +0 -20
- package/dist/src/components/ui/table.d.ts +0 -10
- package/dist/src/components/ui/text-field.d.ts +0 -26
- package/dist/src/components/ui/toast.d.ts +0 -41
- package/dist/src/hooks/useFilter.d.ts +0 -9
- package/dist/src/index.d.ts +0 -1
- package/dist/src/lib/api.d.ts +0 -157
- package/dist/src/lib/extract-timestamp-from-uuidv7.d.ts +0 -1
- package/dist/src/lib/utils.d.ts +0 -3
- package/dist/src/routes/_components/columns.d.ts +0 -3
- package/dist/src/routes/_components/data-table.d.ts +0 -8
- package/dist/src/routes/_components/edit-bundle-sheet-content.d.ts +0 -5
- package/dist/src/routes/index.d.ts +0 -1
- package/dist/src-server/index.d.ts +0 -140
- package/dist/src-server/rpc.d.ts +0 -130
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var Pf=Object.defineProperty;var La=e=>{throw TypeError(e)};var If=(e,t,n)=>t in e?Pf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Re=(e,t,n)=>If(e,typeof t!="symbol"?t+"":t,n),ko=(e,t,n)=>t.has(e)||La("Cannot "+n);var R=(e,t,n)=>(ko(e,t,"read from private field"),n?n.call(e):t.get(e)),ee=(e,t,n)=>t.has(e)?La("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),q=(e,t,n,r)=>(ko(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),fe=(e,t,n)=>(ko(e,t,"access private method"),n);var Br=(e,t,n,r)=>({set _(o){q(e,t,o,n)},get _(){return R(e,t,r)}});(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)}})();const te={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return _a(this.context.count)},getNextContextId(){return _a(this.context.count++)}};function _a(e){const t=String(e),n=t.length-1;return te.context.id+(n?String.fromCharCode(96+n):"")+t}function fr(e){te.context=e}const $f=(e,t)=>e===t,st=Symbol("solid-proxy"),ju=typeof Proxy=="function",Ri=Symbol("solid-track"),io={equals:$f};let zu=Uu;const at=1,wr=2,Bu={owned:null,cleanups:null,context:null,owner:null},Vo={};var ue=null;let G=null,Mf=null,ge=null,ke=null,Le=null,go=0;function cn(e,t){const n=ge,r=ue,o=e.length===0,i=t===void 0?r:t,s=o?Bu:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>Me(()=>Gt(s)));ue=s,ge=null;try{return Ue(a,!0)}finally{ge=n,ue=r}}function j(e,t){t=t?Object.assign({},io,t):io;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(G&&G.running&&G.sources.has(n)?o=o(n.tValue):o=o(n.value)),Gu(n,o));return[Hu.bind(n),r]}function Mt(e,t,n){const r=vo(e,t,!0,at);Wn(r)}function je(e,t,n){const r=vo(e,t,!1,at);Wn(r)}function H(e,t,n){zu=_f;const r=vo(e,t,!1,at),o=dn&&ye(dn);o&&(r.suspense=o),(!n||!n.render)&&(r.user=!0),Le?Le.push(r):Wn(r)}function V(e,t,n){n=n?Object.assign({},io,n):io;const r=vo(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Wn(r),Hu.bind(r)}function Ff(e){return e&&typeof e=="object"&&"then"in e}function Of(e,t,n){let r,o,i;arguments.length===2&&typeof t=="object"||arguments.length===1?(r=!0,o=e,i=t||{}):(r=e,o=t,i={});let s=null,a=Vo,l=null,c=!1,u=!1,d="initialValue"in i,f=typeof r=="function"&&V(r);const h=new Set,[p,g]=(i.storage||j)(i.initialValue),[y,m]=j(void 0),[v,w]=j(void 0,{equals:!1}),[S,C]=j(d?"ready":"unresolved");te.context&&(l=te.getNextContextId(),i.ssrLoadFrom==="initial"?a=i.initialValue:te.load&&te.has(l)&&(a=te.load(l)));function O(K,N,B,oe){return s===K&&(s=null,oe!==void 0&&(d=!0),(K===a||N===a)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(oe,{value:N})),a=Vo,G&&K&&c?(G.promises.delete(K),c=!1,Ue(()=>{G.running=!0,L(N,B)},!1)):L(N,B)),N}function L(K,N){Ue(()=>{N===void 0&&g(()=>K),C(N!==void 0?"errored":d?"ready":"unresolved"),m(N);for(const B of h.keys())B.decrement();h.clear()},!1)}function k(){const K=dn&&ye(dn),N=p(),B=y();if(B!==void 0&&!s)throw B;return ge&&!ge.user&&K&&Mt(()=>{v(),s&&(K.resolved&&G&&c?G.promises.add(s):h.has(K)||(K.increment(),h.add(K)))}),N}function T(K=!0){if(K!==!1&&u)return;u=!1;const N=f?f():r;if(c=G&&G.running,N==null||N===!1){O(s,Me(p));return}G&&s&&G.promises.delete(s);const B=a!==Vo?a:Me(()=>o(N,{value:p(),refetching:K}));return Ff(B)?(s=B,"value"in B?(B.status==="success"?O(s,B.value,void 0,N):O(s,void 0,Ii(B.value),N),B):(u=!0,queueMicrotask(()=>u=!1),Ue(()=>{C(d?"refreshing":"pending"),w()},!1),B.then(oe=>O(B,oe,void 0,N),oe=>O(B,void 0,Ii(oe),N)))):(O(s,B,void 0,N),B)}return Object.defineProperties(k,{state:{get:()=>S()},error:{get:()=>y()},loading:{get(){const K=S();return K==="pending"||K==="refreshing"}},latest:{get(){if(!d)return k();const K=y();if(K&&!s)throw K;return p()}}}),f?Mt(()=>T(!1)):T(!1),[k,{refetch:T,mutate:g}]}function po(e){return Ue(e,!1)}function Me(e){if(ge===null)return e();const t=ge;ge=null;try{return e()}finally{ge=t}}function Ce(e,t,n){const r=Array.isArray(e);let o,i=n&&n.defer;return s=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]()}else a=e();if(i)return i=!1,s;const l=Me(()=>t(a,o,s));return o=a,l}}function qn(e){H(()=>Me(e))}function W(e){return ue===null||(ue.cleanups===null?ue.cleanups=[e]:ue.cleanups.push(e)),e}function Pi(){return ge}function br(){return ue}function gs(e,t){const n=ue,r=ge;ue=e,ge=null;try{return Ue(t,!0)}catch(o){ps(o)}finally{ue=n,ge=r}}function Af(e){if(G&&G.running)return e(),G.done;const t=ge,n=ue;return Promise.resolve().then(()=>{ge=t,ue=n;let r;return dn&&(r=G||(G={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),r.done||(r.done=new Promise(o=>r.resolve=o)),r.running=!0),Ue(e,!1),ge=ue=null,r?r.done:void 0})}const[eS,ka]=j(!1);function Tf(e){Le.push.apply(Le,e),e.length=0}function we(e,t){const n=Symbol("context");return{id:n,Provider:kf(n),defaultValue:e}}function ye(e){let t;return ue&&ue.context&&(t=ue.context[e.id])!==void 0?t:e.defaultValue}function mo(e){const t=V(e),n=V(()=>$i(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let dn;function Df(){return dn||(dn=we())}function Hu(){const e=G&&G.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===at)Wn(this);else{const t=ke;ke=null,Ue(()=>ao(this),!1),ke=t}if(ge){const t=this.observers?this.observers.length:0;ge.sources?(ge.sources.push(this),ge.sourceSlots.push(t)):(ge.sources=[this],ge.sourceSlots=[t]),this.observers?(this.observers.push(ge),this.observerSlots.push(ge.sources.length-1)):(this.observers=[ge],this.observerSlots=[ge.sources.length-1])}return e&&G.sources.has(this)?this.tValue:this.value}function Gu(e,t,n){let r=G&&G.running&&G.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(G){const o=G.running;(o||!n&&G.sources.has(e))&&(G.sources.add(e),e.tValue=t),o||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&Ue(()=>{for(let o=0;o<e.observers.length;o+=1){const i=e.observers[o],s=G&&G.running;s&&G.disposed.has(i)||((s?!i.tState:!i.state)&&(i.pure?ke.push(i):Le.push(i),i.observers&&qu(i)),s?i.tState=at:i.state=at)}if(ke.length>1e6)throw ke=[],new Error},!1)}return t}function Wn(e){if(!e.fn)return;Gt(e);const t=go;Va(e,G&&G.running&&G.sources.has(e)?e.tValue:e.value,t),G&&!G.running&&G.sources.has(e)&&queueMicrotask(()=>{Ue(()=>{G&&(G.running=!0),ge=ue=e,Va(e,e.tValue,t),ge=ue=null},!1)})}function Va(e,t,n){let r;const o=ue,i=ge;ge=ue=e;try{r=e.fn(t)}catch(s){return e.pure&&(G&&G.running?(e.tState=at,e.tOwned&&e.tOwned.forEach(Gt),e.tOwned=void 0):(e.state=at,e.owned&&e.owned.forEach(Gt),e.owned=null)),e.updatedAt=n+1,ps(s)}finally{ge=i,ue=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Gu(e,r,!0):G&&G.running&&e.pure?(G.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function vo(e,t,n,r=at,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:ue,context:ue?ue.context:null,pure:n};return G&&G.running&&(i.state=0,i.tState=r),ue===null||ue!==Bu&&(G&&G.running&&ue.pure?ue.tOwned?ue.tOwned.push(i):ue.tOwned=[i]:ue.owned?ue.owned.push(i):ue.owned=[i]),i}function so(e){const t=G&&G.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===wr)return ao(e);if(e.suspense&&Me(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<go);){if(t&&G.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let o=e,i=n[r+1];for(;(o=o.owner)&&o!==i;)if(G.disposed.has(o))return}if((t?e.tState:e.state)===at)Wn(e);else if((t?e.tState:e.state)===wr){const o=ke;ke=null,Ue(()=>ao(e,n[0]),!1),ke=o}}}function Ue(e,t){if(ke)return e();let n=!1;t||(ke=[]),Le?n=!0:Le=[],go++;try{const r=e();return Lf(n),r}catch(r){n||(Le=null),ke=null,ps(r)}}function Lf(e){if(ke&&(Uu(ke),ke=null),e)return;let t;if(G){if(!G.promises.size&&!G.queue.size){const r=G.sources,o=G.disposed;Le.push.apply(Le,G.effects),t=G.resolve;for(const i of Le)"tState"in i&&(i.state=i.tState),delete i.tState;G=null,Ue(()=>{for(const i of o)Gt(i);for(const i of r){if(i.value=i.tValue,i.owned)for(let s=0,a=i.owned.length;s<a;s++)Gt(i.owned[s]);i.tOwned&&(i.owned=i.tOwned),delete i.tValue,delete i.tOwned,i.tState=0}ka(!1)},!1)}else if(G.running){G.running=!1,G.effects.push.apply(G.effects,Le),Le=null,ka(!0);return}}const n=Le;Le=null,n.length&&Ue(()=>zu(n),!1),t&&t()}function Uu(e){for(let t=0;t<e.length;t++)so(e[t])}function _f(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:so(r)}if(te.context){if(te.count){te.effects||(te.effects=[]),te.effects.push(...e.slice(0,n));return}fr()}for(te.effects&&(te.done||!te.count)&&(e=[...te.effects,...e],n+=te.effects.length,delete te.effects),t=0;t<n;t++)so(e[t])}function ao(e,t){const n=G&&G.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){const o=e.sources[r];if(o.sources){const i=n?o.tState:o.state;i===at?o!==t&&(!o.updatedAt||o.updatedAt<go)&&so(o):i===wr&&ao(o,t)}}}function qu(e){const t=G&&G.running;for(let n=0;n<e.observers.length;n+=1){const r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=wr:r.state=wr,r.pure?ke.push(r):Le.push(r),r.observers&&qu(r))}}function Gt(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){const i=o.pop(),s=n.observerSlots.pop();r<o.length&&(i.sourceSlots[s]=r,o[r]=i,n.observerSlots[r]=s)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Gt(e.tOwned[t]);delete e.tOwned}if(G&&G.running&&e.pure)Wu(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)Gt(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}G&&G.running?e.tState=0:e.state=0}function Wu(e,t){if(t||(e.tState=0,G.disposed.add(e)),e.owned)for(let n=0;n<e.owned.length;n++)Wu(e.owned[n])}function Ii(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function ps(e,t=ue){throw Ii(e)}function $i(e){if(typeof e=="function"&&!e.length)return $i(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=$i(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function kf(e,t){return function(r){let o;return je(()=>o=Me(()=>(ue.context={...ue.context,[e]:r.value},mo(()=>r.children))),void 0),o}}const Vf=Symbol("fallback");function Na(e){for(let t=0;t<e.length;t++)e[t]()}function Nf(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return W(()=>Na(i)),()=>{let l=e()||[],c=l.length,u,d;return l[Ri],Me(()=>{let h,p,g,y,m,v,w,S,C;if(c===0)s!==0&&(Na(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[Vf],o[0]=cn(O=>(i[0]=O,n.fallback())),s=1);else if(s===0){for(o=new Array(c),d=0;d<c;d++)r[d]=l[d],o[d]=cn(f);s=c}else{for(g=new Array(c),y=new Array(c),a&&(m=new Array(c)),v=0,w=Math.min(s,c);v<w&&r[v]===l[v];v++);for(w=s-1,S=c-1;w>=v&&S>=v&&r[w]===l[S];w--,S--)g[S]=o[w],y[S]=i[w],a&&(m[S]=a[w]);for(h=new Map,p=new Array(S+1),d=S;d>=v;d--)C=l[d],u=h.get(C),p[d]=u===void 0?-1:u,h.set(C,d);for(u=v;u<=w;u++)C=r[u],d=h.get(C),d!==void 0&&d!==-1?(g[d]=o[u],y[d]=i[u],a&&(m[d]=a[u]),d=p[d],h.set(C,d)):i[u]();for(d=v;d<c;d++)d in g?(o[d]=g[d],i[d]=y[d],a&&(a[d]=m[d],a[d](d))):o[d]=cn(f);o=o.slice(0,s=c),r=l.slice(0)}return o});function f(h){if(i[d]=h,a){const[p,g]=j(d);return a[d]=g,t(l[d],p)}return t(l[d])}}}function b(e,t){return Me(()=>e(t||{}))}function Hr(){return!0}const Mi={get(e,t,n){return t===st?n:e.get(t)},has(e,t){return t===st?!0:e.has(t)},set:Hr,deleteProperty:Hr,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Hr,deleteProperty:Hr}},ownKeys(e){return e.keys()}};function No(e){return(e=typeof e=="function"?e():e)?e:{}}function Kf(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function M(...e){let t=!1;for(let s=0;s<e.length;s++){const a=e[s];t=t||!!a&&st in a,e[s]=typeof a=="function"?(t=!0,V(a)):a}if(ju&&t)return new Proxy({get(s){for(let a=e.length-1;a>=0;a--){const l=No(e[a])[s];if(l!==void 0)return l}},has(s){for(let a=e.length-1;a>=0;a--)if(s in No(e[a]))return!0;return!1},keys(){const s=[];for(let a=0;a<e.length;a++)s.push(...Object.keys(No(e[a])));return[...new Set(s)]}},Mi);const n={},r=Object.create(null);for(let s=e.length-1;s>=0;s--){const a=e[s];if(!a)continue;const l=Object.getOwnPropertyNames(a);for(let c=l.length-1;c>=0;c--){const u=l[c];if(u==="__proto__"||u==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,u);if(!r[u])r[u]=d.get?{enumerable:!0,configurable:!0,get:Kf.bind(n[u]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const f=n[u];f&&(d.get?f.push(d.get.bind(a)):d.value!==void 0&&f.push(()=>d.value))}}}const o={},i=Object.keys(r);for(let s=i.length-1;s>=0;s--){const a=i[s],l=r[a];l&&l.get?Object.defineProperty(o,a,l):o[a]=l?l.value:void 0}return o}function _(e,...t){if(ju&&st in e){const o=new Set(t.length>1?t.flat():t[0]),i=t.map(s=>new Proxy({get(a){return s.includes(a)?e[a]:void 0},has(a){return s.includes(a)&&a in e},keys(){return s.filter(a=>a in e)}},Mi));return i.push(new Proxy({get(s){return o.has(s)?void 0:e[s]},has(s){return o.has(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!o.has(s))}},Mi)),i}const n={},r=t.map(()=>({}));for(const o of Object.getOwnPropertyNames(e)){const i=Object.getOwnPropertyDescriptor(e,o),s=!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable;let a=!1,l=0;for(const c of t)c.includes(o)&&(a=!0,s?r[l][o]=i.value:Object.defineProperty(r[l],o,i)),++l;a||(s?n[o]=i.value:Object.defineProperty(n,o,i))}return[...r,n]}let jf=0;function Ee(){return te.context?te.getNextContextId():`cl-${jf++}`}const zf=e=>`Stale read from <${e}>.`;function rt(e){const t="fallback"in e&&{fallback:()=>e.fallback};return V(Nf(()=>e.each,e.children,t||void 0))}function pe(e){const t=e.keyed,n=V(()=>e.when,void 0,{equals:(r,o)=>t?r===o:!r==!o});return V(()=>{const r=n();if(r){const o=e.children;return typeof o=="function"&&o.length>0?Me(()=>o(t?r:()=>{if(!Me(n))throw zf("Show");return e.when})):o}return e.fallback},void 0,void 0)}const Bf=we();function Hf(e){let t=0,n,r,o,i,s;const[a,l]=j(!1),c=Df(),u={increment:()=>{++t===1&&l(!0)},decrement:()=>{--t===0&&l(!1)},inFallback:a,effects:[],resolved:!1},d=br();if(te.context&&te.load){const p=te.getContextId();let g=te.load(p);if(g&&(typeof g!="object"||g.status!=="success"?o=g:te.gather(p)),o&&o!=="$$f"){const[y,m]=j(void 0,{equals:!1});i=y,o.then(()=>{if(te.done)return m();te.gather(p),fr(r),m(),fr()},v=>{s=v,m()})}}const f=ye(Bf);f&&(n=f.register(u.inFallback));let h;return W(()=>h&&h()),b(c.Provider,{value:u,get children(){return V(()=>{if(s)throw s;if(r=te.context,i)return i(),i=void 0;r&&o==="$$f"&&fr();const p=V(()=>e.children);return V(g=>{const y=u.inFallback(),{showContent:m=!0,showFallback:v=!0}=n?n():{};if((!y||o&&o!=="$$f")&&m)return u.resolved=!0,h&&h(),h=r=o=void 0,Tf(u.effects),p();if(v)return h?g:cn(w=>(h=w,r&&(fr({id:r.id+"F",count:0}),r=void 0),e.fallback),d)})})}})}const Gf=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],Uf=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...Gf]),qf=new Set(["innerHTML","textContent","innerText","children"]),Wf=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Xf=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function Qf(e,t){const n=Xf[e];return typeof n=="object"?n[t]?n.$:void 0:n}const Yf=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Zf=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),Jf={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function eh(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,l=t[o-1].nextSibling,c=null;for(;s<o||a<i;){if(t[s]===n[a]){s++,a++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){const u=i<r?a?n[a-1].nextSibling:n[i-a]:l;for(;a<i;)e.insertBefore(n[a++],u)}else if(i===a)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){const u=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],u),t[o]=n[i]}else{if(!c){c=new Map;let d=a;for(;d<i;)c.set(n[d],d++)}const u=c.get(t[s]);if(u!=null)if(a<u&&u<i){let d=s,f=1,h;for(;++d<o&&d<i&&!((h=c.get(t[d]))==null||h!==u+f);)f++;if(f>u-a){const p=t[s];for(;a<u;)e.insertBefore(n[a++],p)}else e.replaceChild(n[a++],t[s++])}else s++;else t[s++].remove()}}}const Ka="_$DX_DELEGATE";function th(e,t,n,r={}){let o;return cn(i=>{o=i,t===document?e():X(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{o(),t.textContent=""}}function ie(e,t,n){let r;const o=()=>{const s=document.createElement("template");return s.innerHTML=e,s.content.firstChild},i=()=>(r||(r=o())).cloneNode(!0);return i.cloneNode=i,i}function Xu(e,t=window.document){const n=t[Ka]||(t[Ka]=new Set);for(let r=0,o=e.length;r<o;r++){const i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,dh))}}function Bn(e,t,n){mn(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function nh(e,t,n,r){mn(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function rh(e,t,n){mn(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function Qu(e,t){mn(e)||(t==null?e.removeAttribute("class"):e.className=t)}function oh(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const o=n[0];e.addEventListener(t,n[0]=i=>o.call(e,n[1],i))}else e.addEventListener(t,n,typeof n!="function"&&n)}function ih(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,s;for(i=0,s=o.length;i<s;i++){const a=o[i];!a||a==="undefined"||t[a]||(ja(e,a,!1),delete n[a])}for(i=0,s=r.length;i<s;i++){const a=r[i],l=!!t[a];!a||a==="undefined"||n[a]===l||!l||(ja(e,a,!0),n[a]=l)}return n}function sh(e,t,n){if(!t)return n?Bn(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function Je(e,t={},n,r){const o={};return r||je(()=>o.children=Sr(e,t.children,o.children)),je(()=>typeof t.ref=="function"&&ah(t.ref,e)),je(()=>lh(e,t,n,!0,o,!0)),o}function ah(e,t,n){return Me(()=>e(t,n))}function X(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Sr(e,t,r,n);je(o=>Sr(e,t(),o,n),r)}function lh(e,t,n,r,o={},i=!1){t||(t={});for(const s in o)if(!(s in t)){if(s==="children")continue;o[s]=za(e,s,null,o[s],n,i,t)}for(const s in t){if(s==="children")continue;const a=t[s];o[s]=za(e,s,a,o[s],n,i,t)}}function uh(e){let t,n;return!mn()||!(t=te.registry.get(n=fh()))?e():(te.completed&&te.completed.add(t),te.registry.delete(n),t)}function mn(e){return!!te.context&&!te.done&&(!e||e.isConnected)}function ch(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function ja(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,i=r.length;o<i;o++)e.classList.toggle(r[o],n)}function za(e,t,n,r,o,i,s){let a,l,c,u,d;if(t==="style")return sh(e,n,r);if(t==="classList")return ih(e,n,r);if(n===r)return r;if(t==="ref")i||n(e);else if(t.slice(0,3)==="on:"){const f=t.slice(3);r&&e.removeEventListener(f,r,typeof r!="function"&&r),n&&e.addEventListener(f,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const f=t.slice(10);r&&e.removeEventListener(f,r,!0),n&&e.addEventListener(f,n,!0)}else if(t.slice(0,2)==="on"){const f=t.slice(2).toLowerCase(),h=Yf.has(f);if(!h&&r){const p=Array.isArray(r)?r[0]:r;e.removeEventListener(f,p)}(h||n)&&(oh(e,f,n,h),h&&Xu([f]))}else if(t.slice(0,5)==="attr:")Bn(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")rh(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(c=qf.has(t))||!o&&((u=Qf(t,e.tagName))||(l=Uf.has(t)))||(a=e.nodeName.includes("-")||"is"in s)){if(d)t=t.slice(5),l=!0;else if(mn(e))return n;t==="class"||t==="className"?Qu(e,n):a&&!l&&!c?e[ch(t)]=n:e[u||t]=n}else{const f=o&&t.indexOf(":")>-1&&Jf[t.split(":")[0]];f?nh(e,f,t,n):Bn(e,Wf[t]||t,n)}return n}function dh(e){if(te.registry&&te.events&&te.events.find(([l,c])=>c===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=l=>Object.defineProperty(e,"target",{configurable:!0,value:l}),s=()=>{const l=t[n];if(l&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?l.call(t,c,e):l.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},a=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),te.registry&&!te.done&&(te.done=_$HY.done=!0),e.composedPath){const l=e.composedPath();i(l[0]);for(let c=0;c<l.length-2&&(t=l[c],!!s());c++){if(t._$host){t=t._$host,a();break}if(t.parentNode===o)break}}else a();i(r)}function Sr(e,t,n,r,o){const i=mn(e);if(i){!n&&(n=[...e.childNodes]);let l=[];for(let c=0;c<n.length;c++){const u=n[c];u.nodeType===8&&u.data.slice(0,2)==="!$"?u.remove():l.push(u)}n=l}for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(i||s==="number"&&(t=t.toString(),t===n))return n;if(a){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=wn(e,n,r,l)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||s==="boolean"){if(i)return n;n=wn(e,n,r)}else{if(s==="function")return je(()=>{let l=t();for(;typeof l=="function";)l=l();n=Sr(e,l,n,r)}),()=>n;if(Array.isArray(t)){const l=[],c=n&&Array.isArray(n);if(Fi(l,t,n,o))return je(()=>n=Sr(e,l,n,r,!0)),()=>n;if(i){if(!l.length)return n;if(r===void 0)return n=[...e.childNodes];let u=l[0];if(u.parentNode!==e)return n;const d=[u];for(;(u=u.nextSibling)!==r;)d.push(u);return n=d}if(l.length===0){if(n=wn(e,n,r),a)return n}else c?n.length===0?Ba(e,l,r):eh(e,n,l):(n&&wn(e),Ba(e,l));n=l}else if(t.nodeType){if(i&&t.parentNode)return n=a?[t]:t;if(Array.isArray(n)){if(a)return n=wn(e,n,r,t);wn(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Fi(e,t,n,r){let o=!1;for(let i=0,s=t.length;i<s;i++){let a=t[i],l=n&&n[e.length],c;if(!(a==null||a===!0||a===!1))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))o=Fi(e,a,l)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=Fi(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||o}else e.push(a),o=!0;else{const u=String(a);l&&l.nodeType===3&&l.data===u?e.push(l):e.push(document.createTextNode(u))}}return o}function Ba(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function wn(e,t,n,r){if(n===void 0)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let i=!1;for(let s=t.length-1;s>=0;s--){const a=t[s];if(o!==a){const l=a.parentNode===e;!i&&!s?l?e.replaceChild(o,a):e.insertBefore(o,n):l&&a.remove()}else i=!0}}else e.insertBefore(o,n);return[o]}function fh(){return te.getNextContextId()}const Yu=!1,hh="http://www.w3.org/2000/svg";function Zu(e,t=!1){return t?document.createElementNS(hh,e):document.createElement(e)}function yo(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,o=br();let i,s=!!te.context;return H(()=>{s&&(br().user=s=!1),i||(i=gs(o,()=>V(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[l,c]=j(!1),u=()=>c(!0);cn(d=>X(a,()=>l()?d():i(),null)),W(u)}else{const l=Zu(e.isSVG?"g":"div",e.isSVG),c=t&&l.attachShadow?l.attachShadow({mode:"open"}):l;Object.defineProperty(l,"_$host",{get(){return n.parentNode},configurable:!0}),X(c,i),a.appendChild(l),e.ref&&e.ref(l),W(()=>a.removeChild(l))}},void 0,{render:!s}),n}function Ju(e){const[t,n]=_(e,["component"]),r=V(()=>t.component);return V(()=>{const o=r();switch(typeof o){case"function":return Me(()=>o(n));case"string":const i=Zf.has(o),s=te.context?uh():Zu(o,i);return Je(s,n,i),s}})}const ec=we(),gh=["title","meta"],Ha=[],Ga=["name","http-equiv","content","charset","media"].concat(["property"]),Ua=(e,t)=>{const n=Object.fromEntries(Object.entries(e.props).filter(([r])=>t.includes(r)).sort());return(Object.hasOwn(n,"name")||Object.hasOwn(n,"property"))&&(n.name=n.name||n.property,delete n.property),e.tag+JSON.stringify(n)};function ph(){if(!te.context){const n=document.head.querySelectorAll("[data-sm]");Array.prototype.forEach.call(n,r=>r.parentNode.removeChild(r))}const e=new Map;function t(n){if(n.ref)return n.ref;let r=document.querySelector(`[data-sm="${n.id}"]`);return r?(r.tagName.toLowerCase()!==n.tag&&(r.parentNode&&r.parentNode.removeChild(r),r=document.createElement(n.tag)),r.removeAttribute("data-sm")):r=document.createElement(n.tag),r}return{addTag(n){if(gh.indexOf(n.tag)!==-1){const i=n.tag==="title"?Ha:Ga,s=Ua(n,i);e.has(s)||e.set(s,[]);let a=e.get(s),l=a.length;a=[...a,n],e.set(s,a);let c=t(n);n.ref=c,Je(c,n.props);let u=null;for(var r=l-1;r>=0;r--)if(a[r]!=null){u=a[r];break}return c.parentNode!=document.head&&document.head.appendChild(c),u&&u.ref&&u.ref.parentNode&&document.head.removeChild(u.ref),l}let o=t(n);return n.ref=o,Je(o,n.props),o.parentNode!=document.head&&document.head.appendChild(o),-1},removeTag(n,r){const o=n.tag==="title"?Ha:Ga,i=Ua(n,o);if(n.ref){const s=e.get(i);if(s){if(n.ref.parentNode){n.ref.parentNode.removeChild(n.ref);for(let a=r-1;a>=0;a--)s[a]!=null&&document.head.appendChild(s[a].ref)}s[r]=null,e.set(i,s)}else n.ref.parentNode&&n.ref.parentNode.removeChild(n.ref)}}}}const mh=e=>{const t=ph();return b(ec.Provider,{value:t,get children(){return e.children}})},vh=(e,t,n)=>(yh({tag:e,props:t,setting:n,id:Ee(),get name(){return t.name||t.property}}),null);function yh(e){const t=ye(ec);if(!t)throw new Error("<MetaProvider /> should be in the tree");je(()=>{const n=t.addTag(e);W(()=>t.removeTag(e,n))})}const wh=e=>vh("title",e,{escape:!0,close:!0});function tc(){let e=new Set;function t(o){return e.add(o),()=>e.delete(o)}let n=!1;function r(o,i){if(n)return!(n=!1);const s={to:o,options:i,defaultPrevented:!1,preventDefault:()=>s.defaultPrevented=!0};for(const a of e)a.listener({...s,from:a.location,retry:l=>{l&&(n=!0),a.navigate(o,{...i,resolve:!1})}});return!s.defaultPrevented}return{subscribe:t,confirm:r}}let Oi;function ms(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),Oi=window.history.state._depth}ms();function bh(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function Sh(e,t){let n=!1;return()=>{const r=Oi;ms();const o=r==null?null:Oi-r;if(n){n=!1;return}o&&t(o)?(n=!0,window.history.go(-o)):e()}}const xh=/^(?:[a-z0-9]+:)?\/\//i,Ch=/^\/+|(\/)\/+$/g,nc="http://sr";function vr(e,t=!1){const n=e.replace(Ch,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function ro(e,t,n){if(xh.test(t))return;const r=vr(e),o=n&&vr(n);let i="";return!o||t.startsWith("/")?i=r:o.toLowerCase().indexOf(r.toLowerCase())!==0?i=r+o:i=o,(i||"/")+vr(t,!i)}function Eh(e,t){if(e==null)throw new Error(t);return e}function Rh(e,t){return vr(e).replace(/\/*(\*.*)?$/g,"")+vr(t)}function rc(e){const t={};return e.searchParams.forEach((n,r)=>{r in t?Array.isArray(t[r])?t[r].push(n):t[r]=[t[r],n]:t[r]=n}),t}function Ph(e,t,n){const[r,o]=e.split("/*",2),i=r.split("/").filter(Boolean),s=i.length;return a=>{const l=a.split("/").filter(Boolean),c=l.length-s;if(c<0||c>0&&o===void 0&&!t)return null;const u={path:s?"":"/",params:{}},d=f=>n===void 0?void 0:n[f];for(let f=0;f<s;f++){const h=i[f],p=h[0]===":",g=p?l[f]:l[f].toLowerCase(),y=p?h.slice(1):h.toLowerCase();if(p&&Ko(g,d(y)))u.params[y]=g;else if(p||!Ko(g,y))return null;u.path+=`/${g}`}if(o){const f=c?l.slice(-c).join("/"):"";if(Ko(f,d(o)))u.params[o]=f;else return null}return u}}function Ko(e,t){const n=r=>r===e;return t===void 0?!0:typeof t=="string"?n(t):typeof t=="function"?t(e):Array.isArray(t)?t.some(n):t instanceof RegExp?t.test(e):!1}function Ih(e){const[t,n]=e.pattern.split("/*",2),r=t.split("/").filter(Boolean);return r.reduce((o,i)=>o+(i.startsWith(":")?2:3),r.length-(n===void 0?0:1))}function oc(e){const t=new Map,n=br();return new Proxy({},{get(r,o){return t.has(o)||gs(n,()=>t.set(o,V(()=>e()[o]))),t.get(o)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())}})}function $h(e,t){const n=new URLSearchParams(e);Object.entries(t).forEach(([o,i])=>{i==null||i===""||i instanceof Array&&!i.length?n.delete(o):i instanceof Array?(n.delete(o),i.forEach(s=>{n.append(o,String(s))})):n.set(o,String(i))});const r=n.toString();return r?`?${r}`:""}function ic(e){let t=/(\/?\:[^\/]+)\?/.exec(e);if(!t)return[e];let n=e.slice(0,t.index),r=e.slice(t.index+t[0].length);const o=[n,n+=t[1]];for(;t=/^(\/\:[^\/]+)\?/.exec(r);)o.push(n+=t[1]),r=r.slice(t[0].length);return ic(r).reduce((i,s)=>[...i,...o.map(a=>a+s)],[])}const Mh=100,sc=we(),ac=we(),lc=()=>Eh(ye(sc),"<A> and 'use' router primitives can be only used inside a Route."),Fh=()=>lc().navigatorFactory(),Oh=()=>lc().location,Ah=()=>{const e=Oh(),t=Fh(),n=(r,o)=>{const i=Me(()=>$h(e.search,r)+e.hash);t(i,{scroll:!1,resolve:!1,...o})};return[e.query,n]};function Th(e,t=""){const{component:n,preload:r,load:o,children:i,info:s}=e,a=!i||Array.isArray(i)&&!i.length,l={key:e,component:n,preload:r||o,info:s};return uc(e.path).reduce((c,u)=>{for(const d of ic(u)){const f=Rh(t,d);let h=a?f:f.split("/*",1)[0];h=h.split("/").map(p=>p.startsWith(":")||p.startsWith("*")?p:encodeURIComponent(p)).join("/"),c.push({...l,originalPath:u,pattern:h,matcher:Ph(h,!a,e.matchFilters)})}return c},[])}function Dh(e,t=0){return{routes:e,score:Ih(e[e.length-1])*1e4-t,matcher(n){const r=[];for(let o=e.length-1;o>=0;o--){const i=e[o],s=i.matcher(n);if(!s)return null;r.unshift({...s,route:i})}return r}}}function uc(e){return Array.isArray(e)?e:[e]}function cc(e,t="",n=[],r=[]){const o=uc(e);for(let i=0,s=o.length;i<s;i++){const a=o[i];if(a&&typeof a=="object"){a.hasOwnProperty("path")||(a.path="");const l=Th(a,t);for(const c of l){n.push(c);const u=Array.isArray(a.children)&&a.children.length===0;if(a.children&&!u)cc(a.children,c.pattern,n,r);else{const d=Dh([...n],r.length);r.push(d)}n.pop()}}}return n.length?r:r.sort((i,s)=>s.score-i.score)}function jo(e,t){for(let n=0,r=e.length;n<r;n++){const o=e[n].matcher(t);if(o)return o}return[]}function Lh(e,t,n){const r=new URL(nc),o=V(u=>{const d=e();try{return new URL(d,r)}catch{return console.error(`Invalid path ${d}`),u}},r,{equals:(u,d)=>u.href===d.href}),i=V(()=>o().pathname),s=V(()=>o().search,!0),a=V(()=>o().hash),l=()=>"",c=Ce(s,()=>rc(o()));return{get pathname(){return i()},get search(){return s()},get hash(){return a()},get state(){return t()},get key(){return l()},query:n?n(c):oc(c)}}let en;function _h(){return en}function kh(e,t,n,r={}){const{signal:[o,i],utils:s={}}=e,a=s.parsePath||(P=>P),l=s.renderPath||(P=>P),c=s.beforeLeave||tc(),u=ro("",r.base||"");if(u===void 0)throw new Error(`${u} is not a valid base path`);u&&!o().value&&i({value:u,replace:!0,scroll:!1});const[d,f]=j(!1);let h;const p=(P,E)=>{E.value===g()&&E.state===m()||(h===void 0&&f(!0),en=P,h=E,Af(()=>{h===E&&(y(h.value),v(h.state),C[1]([]))}).finally(()=>{h===E&&po(()=>{en=void 0,P==="navigate"&&B(h),f(!1),h=void 0})}))},[g,y]=j(o().value),[m,v]=j(o().state),w=Lh(g,m,s.queryWrapper),S=[],C=j([]),O=V(()=>typeof r.transformUrl=="function"?jo(t(),r.transformUrl(w.pathname)):jo(t(),w.pathname)),L=()=>{const P=O(),E={};for(let x=0;x<P.length;x++)Object.assign(E,P[x].params);return E},k=s.paramsWrapper?s.paramsWrapper(L,t):oc(L),T={pattern:u,path:()=>u,outlet:()=>null,resolvePath(P){return ro(u,P)}};return je(Ce(o,P=>p("native",P),{defer:!0})),{base:T,location:w,params:k,isRouting:d,renderPath:l,parsePath:a,navigatorFactory:N,matches:O,beforeLeave:c,preloadRoute:oe,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:C};function K(P,E,x){Me(()=>{if(typeof E=="number"){E&&(s.go?s.go(E):console.warn("Router integration does not support relative routing"));return}const I=!E||E[0]==="?",{replace:$,resolve:F,scroll:D,state:z}={replace:!1,resolve:!I,scroll:!0,...x},U=F?P.resolvePath(E):ro(I&&w.pathname||"",E);if(U===void 0)throw new Error(`Path '${E}' is not a routable path`);if(S.length>=Mh)throw new Error("Too many redirects");const Y=g();(U!==Y||z!==m())&&(Yu||c.confirm(U,x)&&(S.push({value:Y,replace:$,scroll:D,state:m()}),p("navigate",{value:U,state:z})))})}function N(P){return P=P||ye(ac)||T,(E,x)=>K(P,E,x)}function B(P){const E=S[0];E&&(i({...P,replace:E.replace,scroll:E.scroll}),S.length=0)}function oe(P,E){const x=jo(t(),P.pathname),I=en;en="preload";for(let $ in x){const{route:F,params:D}=x[$];F.component&&F.component.preload&&F.component.preload();const{preload:z}=F;E&&z&&gs(n(),()=>z({params:D,location:{pathname:P.pathname,search:P.search,hash:P.hash,query:rc(P),state:null,key:""},intent:"preload"}))}en=I}}function Vh(e,t,n,r){const{base:o,location:i,params:s}=e,{pattern:a,component:l,preload:c}=r().route,u=V(()=>r().path);l&&l.preload&&l.preload();const d=c?c({params:s,location:i,intent:en||"initial"}):void 0;return{parent:t,pattern:a,path:u,outlet:()=>l?b(l,{params:s,location:i,data:d,get children(){return n()}}):n(),resolvePath(h){return ro(o.path(),h,u())}}}const Nh=e=>t=>{const{base:n}=t,r=mo(()=>t.children),o=V(()=>cc(r(),t.base||""));let i;const s=kh(e,o,()=>i,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(s),b(sc.Provider,{value:s,get children(){return b(Kh,{routerState:s,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[V(()=>(i=br())&&null),b(jh,{routerState:s,get branches(){return o()}})]}})}})};function Kh(e){const t=e.routerState.location,n=e.routerState.params,r=V(()=>e.preload&&Me(()=>{e.preload({params:n,location:t,intent:_h()||"initial"})}));return b(pe,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:o=>b(o,{params:n,location:t,get data(){return r()},get children(){return e.children}})})}function jh(e){const t=[];let n;const r=V(Ce(e.routerState.matches,(o,i,s)=>{let a=i&&o.length===i.length;const l=[];for(let c=0,u=o.length;c<u;c++){const d=i&&i[c],f=o[c];s&&d&&f.route.key===d.route.key?l[c]=s[c]:(a=!1,t[c]&&t[c](),cn(h=>{t[c]=h,l[c]=Vh(e.routerState,l[c-1]||e.routerState.base,qa(()=>r()[c+1]),()=>e.routerState.matches()[c])}))}return t.splice(o.length).forEach(c=>c()),s&&a?s:(n=l[0],l)}));return qa(()=>r()&&n)()}const qa=e=>()=>b(pe,{get when(){return e()},keyed:!0,children:t=>b(ac.Provider,{value:t,get children(){return t.outlet()}})}),zh=e=>{const t=mo(()=>e.children);return M(e,{get children(){return t()}})};function Bh([e,t],n,r){return[e,r?o=>t(r(o)):t]}function Hh(e){let t=!1;const n=o=>typeof o=="string"?{value:o}:o,r=Bh(j(n(e.get()),{equals:(o,i)=>o.value===i.value&&o.state===i.state}),void 0,o=>(!t&&e.set(o),te.registry&&!te.done&&(te.done=!0),o));return e.init&&W(e.init((o=e.get())=>{t=!0,r[1](n(o)),t=!1})),Nh({signal:r,create:e.create,utils:e.utils})}function Gh(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function Uh(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const qh=new Map;function Wh(e=!0,t=!1,n="/_server",r){return o=>{const i=o.base.path(),s=o.navigatorFactory(o.base);let a,l;function c(g){return g.namespaceURI==="http://www.w3.org/2000/svg"}function u(g){if(g.defaultPrevented||g.button!==0||g.metaKey||g.altKey||g.ctrlKey||g.shiftKey)return;const y=g.composedPath().find(O=>O instanceof Node&&O.nodeName.toUpperCase()==="A");if(!y||t&&!y.hasAttribute("link"))return;const m=c(y),v=m?y.href.baseVal:y.href;if((m?y.target.baseVal:y.target)||!v&&!y.hasAttribute("state"))return;const S=(y.getAttribute("rel")||"").split(/\s+/);if(y.hasAttribute("download")||S&&S.includes("external"))return;const C=m?new URL(v,document.baseURI):new URL(v);if(!(C.origin!==window.location.origin||i&&C.pathname&&!C.pathname.toLowerCase().startsWith(i.toLowerCase())))return[y,C]}function d(g){const y=u(g);if(!y)return;const[m,v]=y,w=o.parsePath(v.pathname+v.search+v.hash),S=m.getAttribute("state");g.preventDefault(),s(w,{resolve:!1,replace:m.hasAttribute("replace"),scroll:!m.hasAttribute("noscroll"),state:S?JSON.parse(S):void 0})}function f(g){const y=u(g);if(!y)return;const[m,v]=y;r&&(v.pathname=r(v.pathname)),o.preloadRoute(v,m.getAttribute("preload")!=="false")}function h(g){clearTimeout(a);const y=u(g);if(!y)return l=null;const[m,v]=y;l!==m&&(r&&(v.pathname=r(v.pathname)),a=setTimeout(()=>{o.preloadRoute(v,m.getAttribute("preload")!=="false"),l=m},20))}function p(g){if(g.defaultPrevented)return;let y=g.submitter&&g.submitter.hasAttribute("formaction")?g.submitter.getAttribute("formaction"):g.target.getAttribute("action");if(!y)return;if(!y.startsWith("https://action/")){const v=new URL(y,nc);if(y=o.parsePath(v.pathname+v.search),!y.startsWith(n))return}if(g.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const m=qh.get(y);if(m){g.preventDefault();const v=new FormData(g.target,g.submitter);m.call({r:o,f:g.target},g.target.enctype==="multipart/form-data"?v:new URLSearchParams(v))}}Xu(["click","submit"]),document.addEventListener("click",d),e&&(document.addEventListener("mousemove",h,{passive:!0}),document.addEventListener("focusin",f,{passive:!0}),document.addEventListener("touchstart",f,{passive:!0})),document.addEventListener("submit",p),W(()=>{document.removeEventListener("click",d),e&&(document.removeEventListener("mousemove",h),document.removeEventListener("focusin",f),document.removeEventListener("touchstart",f)),document.removeEventListener("submit",p)})}}function Xh(e){const t=()=>{const r=window.location.pathname.replace(/^\/+/,"/")+window.location.search,o=window.history.state&&window.history.state._depth&&Object.keys(window.history.state).length===1?void 0:window.history.state;return{value:r+window.location.hash,state:o}},n=tc();return Hh({get:t,set({value:r,replace:o,scroll:i,state:s}){o?window.history.replaceState(bh(s),"",r):window.history.pushState(s,"",r),Uh(decodeURIComponent(window.location.hash.slice(1)),i),ms()},init:r=>Gh(window,"popstate",Sh(r,o=>{if(o&&o<0)return!n.confirm(o);{const i=t();return!n.confirm(i.value,{state:i.state})}})),create:Wh(e.preload,e.explicitLinks,e.actionBase,e.transformUrl),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}const Ai=Symbol("store-raw"),Pn=Symbol("store-node"),Pt=Symbol("store-has"),dc=Symbol("store-self");function fc(e){let t=e[st];if(!t&&(Object.defineProperty(e,st,{value:t=new Proxy(e,Zh)}),!Array.isArray(e))){const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let o=0,i=n.length;o<i;o++){const s=n[o];r[s].get&&Object.defineProperty(e,s,{enumerable:r[s].enumerable,get:r[s].get.bind(t)})}}return t}function Ut(e){let t;return e!=null&&typeof e=="object"&&(e[st]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function fn(e,t=new Set){let n,r,o,i;if(n=e!=null&&e[Ai])return n;if(!Ut(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let s=0,a=e.length;s<a;s++)o=e[s],(r=fn(o,t))!==o&&(e[s]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const s=Object.keys(e),a=Object.getOwnPropertyDescriptors(e);for(let l=0,c=s.length;l<c;l++)i=s[l],!a[i].get&&(o=e[i],(r=fn(o,t))!==o&&(e[i]=r))}return e}function lo(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function xr(e,t,n){if(e[t])return e[t];const[r,o]=j(n,{equals:!1,internal:!0});return r.$=o,e[t]=r}function Qh(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===st||t===Pn||(delete n.value,delete n.writable,n.get=()=>e[st][t]),n}function hc(e){Pi()&&xr(lo(e,Pn),dc)()}function Yh(e){return hc(e),Reflect.ownKeys(e)}const Zh={get(e,t,n){if(t===Ai)return e;if(t===st)return n;if(t===Ri)return hc(e),n;const r=lo(e,Pn),o=r[t];let i=o?o():e[t];if(t===Pn||t===Pt||t==="__proto__")return i;if(!o){const s=Object.getOwnPropertyDescriptor(e,t);Pi()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(s&&s.get)&&(i=xr(r,t,i)())}return Ut(i)?fc(i):i},has(e,t){return t===Ai||t===st||t===Ri||t===Pn||t===Pt||t==="__proto__"?!0:(Pi()&&xr(lo(e,Pt),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Yh,getOwnPropertyDescriptor:Qh};function Ye(e,t,n,r=!1){if(!r&&e[t]===n)return;const o=e[t],i=e.length;n===void 0?(delete e[t],e[Pt]&&e[Pt][t]&&o!==void 0&&e[Pt][t].$()):(e[t]=n,e[Pt]&&e[Pt][t]&&o===void 0&&e[Pt][t].$());let s=lo(e,Pn),a;if((a=xr(s,t,o))&&a.$(()=>n),Array.isArray(e)&&e.length!==i){for(let l=e.length;l<i;l++)(a=s[l])&&a.$();(a=xr(s,"length",i))&&a.$(e.length)}(a=s[dc])&&a.$()}function gc(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];Ye(e,o,t[o])}}function Jh(e,t){if(typeof t=="function"&&(t=t(e)),t=fn(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){const o=t[n];e[n]!==o&&Ye(e,n,o)}Ye(e,"length",r)}else gc(e,t)}function hr(e,t,n=[]){let r,o=e;if(t.length>1){r=t.shift();const s=typeof r,a=Array.isArray(e);if(Array.isArray(r)){for(let l=0;l<r.length;l++)hr(e,[r[l]].concat(t),n);return}else if(a&&s==="function"){for(let l=0;l<e.length;l++)r(e[l],l)&&hr(e,[l].concat(t),n);return}else if(a&&s==="object"){const{from:l=0,to:c=e.length-1,by:u=1}=r;for(let d=l;d<=c;d+=u)hr(e,[d].concat(t),n);return}else if(t.length>1){hr(e[r],t,[r].concat(n));return}o=e[r],n=[r].concat(n)}let i=t[0];typeof i=="function"&&(i=i(o,n),i===o)||r===void 0&&i==null||(i=fn(i),r===void 0||Ut(o)&&Ut(i)&&!Array.isArray(i)?gc(o,i):Ye(e,r,i))}function wo(...[e,t]){const n=fn(e||{}),r=Array.isArray(n),o=fc(n);function i(...s){po(()=>{r&&s.length===1?Jh(n,s[0]):hr(n,s)})}return[o,i]}const Ti=Symbol("store-root");function Cn(e,t,n,r,o){const i=t[n];if(e===i)return;const s=Array.isArray(e);if(n!==Ti&&(!Ut(e)||!Ut(i)||s!==Array.isArray(i)||o&&e[o]!==i[o])){Ye(t,n,e);return}if(s){if(e.length&&i.length&&(!r||o&&e[0]&&e[0][o]!=null)){let c,u,d,f,h,p,g,y;for(d=0,f=Math.min(i.length,e.length);d<f&&(i[d]===e[d]||o&&i[d]&&e[d]&&i[d][o]===e[d][o]);d++)Cn(e[d],i,d,r,o);const m=new Array(e.length),v=new Map;for(f=i.length-1,h=e.length-1;f>=d&&h>=d&&(i[f]===e[h]||o&&i[d]&&e[d]&&i[f][o]===e[h][o]);f--,h--)m[h]=i[f];if(d>h||d>f){for(u=d;u<=h;u++)Ye(i,u,e[u]);for(;u<e.length;u++)Ye(i,u,m[u]),Cn(e[u],i,u,r,o);i.length>e.length&&Ye(i,"length",e.length);return}for(g=new Array(h+1),u=h;u>=d;u--)p=e[u],y=o&&p?p[o]:p,c=v.get(y),g[u]=c===void 0?-1:c,v.set(y,u);for(c=d;c<=f;c++)p=i[c],y=o&&p?p[o]:p,u=v.get(y),u!==void 0&&u!==-1&&(m[u]=i[c],u=g[u],v.set(y,u));for(u=d;u<e.length;u++)u in m?(Ye(i,u,m[u]),Cn(e[u],i,u,r,o)):Ye(i,u,e[u])}else for(let c=0,u=e.length;c<u;c++)Cn(e[c],i,c,r,o);i.length>e.length&&Ye(i,"length",e.length);return}const a=Object.keys(e);for(let c=0,u=a.length;c<u;c++)Cn(e[a[c]],i,a[c],r,o);const l=Object.keys(i);for(let c=0,u=l.length;c<u;c++)e[l[c]]===void 0&&Ye(i,l[c],void 0)}function pc(e,t={}){const{merge:n,key:r="id"}=t,o=fn(e);return i=>{if(!Ut(i)||!Ut(o))return o;const s=Cn(o,{[Ti]:i},Ti,n,r);return s===void 0?i:s}}const eg="/assets/logo-BYNFyja1.png";var tg=ie('<main class="w-full space-y-2.5"><div class="flex flex-row items-center gap-1"><img alt="Hot Updater Console"class="w-12 h-12"><a href=https://github.com/gronxb/hot-updater target=_blank class="text-2xl font-light"rel=noreferrer>Hot Updater Console');function ng({children:e}){return(()=>{var t=tg(),n=t.firstChild,r=n.firstChild;return Bn(r,"src",eg),X(t,e,null),t})()}var Dr=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(){}},Hn=typeof window>"u"||"Deno"in globalThis;function Ze(){}function rg(e,t){return typeof e=="function"?e(t):e}function Di(e){return typeof e=="number"&&e>=0&&e!==1/0}function mc(e,t){return Math.max(e+(t||0)-Date.now(),0)}function In(e,t){return typeof e=="function"?e(t):e}function ot(e,t){return typeof e=="function"?e(t):e}function Wa(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==vs(s,t.options))return!1}else if(!Er(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 Xa(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Cr(t.options.mutationKey)!==Cr(i))return!1}else if(!Er(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function vs(e,t){return((t==null?void 0:t.queryKeyHashFn)||Cr)(e)}function Cr(e){return JSON.stringify(e,(t,n)=>_i(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Er(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Er(e[n],t[n])):!1}function vc(e,t){if(e===t)return e;const n=Qa(e)&&Qa(t);if(n||_i(e)&&_i(t)){const r=n?e:Object.keys(e),o=r.length,i=n?t:Object.keys(t),s=i.length,a=n?[]:{};let l=0;for(let c=0;c<s;c++){const u=n?c:i[c];(!n&&r.includes(u)||n)&&e[u]===void 0&&t[u]===void 0?(a[u]=void 0,l++):(a[u]=vc(e[u],t[u]),a[u]===e[u]&&e[u]!==void 0&&l++)}return o===s&&l===o?e:a}return t}function Li(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 Qa(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function _i(e){if(!Ya(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Ya(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ya(e){return Object.prototype.toString.call(e)==="[object Object]"}function og(e){return new Promise(t=>{setTimeout(t,e)})}function ki(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?vc(e,t):t}function ig(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function sg(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ys=Symbol();function yc(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ys?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var tn,kt,Fn,Au,ag=(Au=class extends Dr{constructor(){super();ee(this,tn);ee(this,kt);ee(this,Fn);q(this,Fn,t=>{if(!Hn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){R(this,kt)||this.setEventListener(R(this,Fn))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,kt))==null||t.call(this),q(this,kt,void 0))}setEventListener(t){var n;q(this,Fn,t),(n=R(this,kt))==null||n.call(this),q(this,kt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){R(this,tn)!==t&&(q(this,tn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof R(this,tn)=="boolean"?R(this,tn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},tn=new WeakMap,kt=new WeakMap,Fn=new WeakMap,Au),ws=new ag,On,Vt,An,Tu,lg=(Tu=class extends Dr{constructor(){super();ee(this,On,!0);ee(this,Vt);ee(this,An);q(this,An,t=>{if(!Hn&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){R(this,Vt)||this.setEventListener(R(this,An))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,Vt))==null||t.call(this),q(this,Vt,void 0))}setEventListener(t){var n;q(this,An,t),(n=R(this,Vt))==null||n.call(this),q(this,Vt,t(this.setOnline.bind(this)))}setOnline(t){R(this,On)!==t&&(q(this,On,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return R(this,On)}},On=new WeakMap,Vt=new WeakMap,An=new WeakMap,Tu),uo=new lg;function Vi(){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 ug(e){return Math.min(1e3*2**e,3e4)}function wc(e){return(e??"online")==="online"?uo.isOnline():!0}var bc=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function zo(e){return e instanceof bc}function Sc(e){let t=!1,n=0,r=!1,o;const i=Vi(),s=g=>{var y;r||(f(new bc(g)),(y=e.abort)==null||y.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>ws.isFocused()&&(e.networkMode==="always"||uo.isOnline())&&e.canRun(),u=()=>wc(e.networkMode)&&e.canRun(),d=g=>{var y;r||(r=!0,(y=e.onSuccess)==null||y.call(e,g),o==null||o(),i.resolve(g))},f=g=>{var y;r||(r=!0,(y=e.onError)==null||y.call(e,g),o==null||o(),i.reject(g))},h=()=>new Promise(g=>{var y;o=m=>{(r||c())&&g(m)},(y=e.onPause)==null||y.call(e)}).then(()=>{var g;o=void 0,r||(g=e.onContinue)==null||g.call(e)}),p=()=>{if(r)return;let g;const y=n===0?e.initialPromise:void 0;try{g=y??e.fn()}catch(m){g=Promise.reject(m)}Promise.resolve(g).then(d).catch(m=>{var O;if(r)return;const v=e.retry??(Hn?0:3),w=e.retryDelay??ug,S=typeof w=="function"?w(n,m):w,C=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,m);if(t||!C){f(m);return}n++,(O=e.onFail)==null||O.call(e,n,m),og(S).then(()=>c()?void 0:h()).then(()=>{t?f(m):p()})})};return{promise:i,cancel:s,continue:()=>(o==null||o(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?p():h().then(p),i)}}function cg(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=a=>setTimeout(a,0);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 _e=cg(),nn,Du,xc=(Du=class{constructor(){ee(this,nn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Di(this.gcTime)&&q(this,nn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Hn?1/0:5*60*1e3))}clearGcTimeout(){R(this,nn)&&(clearTimeout(R(this,nn)),q(this,nn,void 0))}},nn=new WeakMap,Du),Tn,Dn,Qe,rn,Te,Fr,on,tt,Et,Lu,dg=(Lu=class extends xc{constructor(t){super();ee(this,tt);ee(this,Tn);ee(this,Dn);ee(this,Qe);ee(this,rn);ee(this,Te);ee(this,Fr);ee(this,on);q(this,on,!1),q(this,Fr,t.defaultOptions),this.setOptions(t.options),this.observers=[],q(this,rn,t.client),q(this,Qe,R(this,rn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,q(this,Tn,fg(this.options)),this.state=t.state??R(this,Tn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=R(this,Te))==null?void 0:t.promise}setOptions(t){this.options={...R(this,Fr),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,Qe).remove(this)}setData(t,n){const r=ki(this.state.data,t,this.options);return fe(this,tt,Et).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){fe(this,tt,Et).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=R(this,Te))==null?void 0:r.promise;return(o=R(this,Te))==null||o.cancel(t),n?n.then(Ze).catch(Ze):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,Tn))}isActive(){return this.observers.some(t=>ot(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ys||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!mc(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,Te))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,Te))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,Qe).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(R(this,Te)&&(R(this,on)?R(this,Te).cancel({revert:!0}):R(this,Te).cancelRetry()),this.scheduleGc()),R(this,Qe).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||fe(this,tt,Et).call(this,{type:"invalidate"})}fetch(t,n){var l,c,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(R(this,Te))return R(this,Te).continueRetry(),R(this,Te).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,o=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(q(this,on,!0),r.signal)})},i=()=>{const d=yc(this.options,n),f={client:R(this,rn),queryKey:this.queryKey,meta:this.meta};return o(f),q(this,on,!1),this.options.persister?this.options.persister(d,f,this):d(f)},s={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:R(this,rn),state:this.state,fetchFn:i};o(s),(l=this.options.behavior)==null||l.onFetch(s,this),q(this,Dn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=s.fetchOptions)==null?void 0:c.meta))&&fe(this,tt,Et).call(this,{type:"fetch",meta:(u=s.fetchOptions)==null?void 0:u.meta});const a=d=>{var f,h,p,g;zo(d)&&d.silent||fe(this,tt,Et).call(this,{type:"error",error:d}),zo(d)||((h=(f=R(this,Qe).config).onError)==null||h.call(f,d,this),(g=(p=R(this,Qe).config).onSettled)==null||g.call(p,this.state.data,d,this)),this.scheduleGc()};return q(this,Te,Sc({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var f,h,p,g;if(d===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(y){a(y);return}(h=(f=R(this,Qe).config).onSuccess)==null||h.call(f,d,this),(g=(p=R(this,Qe).config).onSettled)==null||g.call(p,d,this.state.error,this),this.scheduleGc()},onError:a,onFail:(d,f)=>{fe(this,tt,Et).call(this,{type:"failed",failureCount:d,error:f})},onPause:()=>{fe(this,tt,Et).call(this,{type:"pause"})},onContinue:()=>{fe(this,tt,Et).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),R(this,Te).start()}},Tn=new WeakMap,Dn=new WeakMap,Qe=new WeakMap,rn=new WeakMap,Te=new WeakMap,Fr=new WeakMap,on=new WeakMap,tt=new WeakSet,Et=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Cc(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return zo(o)&&o.revert&&R(this,Dn)?{...R(this,Dn),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),_e.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),R(this,Qe).notify({query:this,type:"updated",action:t})})},Lu);function Cc(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:wc(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function fg(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 ft,_u,hg=(_u=class extends Dr{constructor(t={}){super();ee(this,ft);this.config=t,q(this,ft,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??vs(o,n);let s=this.get(i);return s||(s=new dg({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(s)),s}add(t){R(this,ft).has(t.queryHash)||(R(this,ft).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=R(this,ft).get(t.queryHash);n&&(t.destroy(),n===t&&R(this,ft).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){_e.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,ft).get(t)}getAll(){return[...R(this,ft).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Wa(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Wa(t,r)):n}notify(t){_e.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){_e.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){_e.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ft=new WeakMap,_u),ht,Ve,sn,gt,_t,ku,gg=(ku=class extends xc{constructor(t){super();ee(this,gt);ee(this,ht);ee(this,Ve);ee(this,sn);this.mutationId=t.mutationId,q(this,Ve,t.mutationCache),q(this,ht,[]),this.state=t.state||pg(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,ht).includes(t)||(R(this,ht).push(t),this.clearGcTimeout(),R(this,Ve).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){q(this,ht,R(this,ht).filter(n=>n!==t)),this.scheduleGc(),R(this,Ve).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,ht).length||(this.state.status==="pending"?this.scheduleGc():R(this,Ve).remove(this))}continue(){var t;return((t=R(this,sn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,s,a,l,c,u,d,f,h,p,g,y,m,v,w,S,C,O,L;q(this,sn,Sc({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(k,T)=>{fe(this,gt,_t).call(this,{type:"failed",failureCount:k,error:T})},onPause:()=>{fe(this,gt,_t).call(this,{type:"pause"})},onContinue:()=>{fe(this,gt,_t).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,Ve).canRun(this)}));const n=this.state.status==="pending",r=!R(this,sn).canStart();try{if(!n){fe(this,gt,_t).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(o=R(this,Ve).config).onMutate)==null?void 0:i.call(o,t,this));const T=await((a=(s=this.options).onMutate)==null?void 0:a.call(s,t));T!==this.state.context&&fe(this,gt,_t).call(this,{type:"pending",context:T,variables:t,isPaused:r})}const k=await R(this,sn).start();return await((c=(l=R(this,Ve).config).onSuccess)==null?void 0:c.call(l,k,t,this.state.context,this)),await((d=(u=this.options).onSuccess)==null?void 0:d.call(u,k,t,this.state.context)),await((h=(f=R(this,Ve).config).onSettled)==null?void 0:h.call(f,k,null,this.state.variables,this.state.context,this)),await((g=(p=this.options).onSettled)==null?void 0:g.call(p,k,null,t,this.state.context)),fe(this,gt,_t).call(this,{type:"success",data:k}),k}catch(k){try{throw await((m=(y=R(this,Ve).config).onError)==null?void 0:m.call(y,k,t,this.state.context,this)),await((w=(v=this.options).onError)==null?void 0:w.call(v,k,t,this.state.context)),await((C=(S=R(this,Ve).config).onSettled)==null?void 0:C.call(S,void 0,k,this.state.variables,this.state.context,this)),await((L=(O=this.options).onSettled)==null?void 0:L.call(O,void 0,k,t,this.state.context)),k}finally{fe(this,gt,_t).call(this,{type:"error",error:k})}}finally{R(this,Ve).runNext(this)}}},ht=new WeakMap,Ve=new WeakMap,sn=new WeakMap,gt=new WeakSet,_t=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),_e.batch(()=>{R(this,ht).forEach(r=>{r.onMutationUpdate(t)}),R(this,Ve).notify({mutation:this,type:"updated",action:t})})},ku);function pg(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var $t,nt,Or,Vu,mg=(Vu=class extends Dr{constructor(t={}){super();ee(this,$t);ee(this,nt);ee(this,Or);this.config=t,q(this,$t,new Set),q(this,nt,new Map),q(this,Or,0)}build(t,n,r){const o=new gg({mutationCache:this,mutationId:++Br(this,Or)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){R(this,$t).add(t);const n=Gr(t);if(typeof n=="string"){const r=R(this,nt).get(n);r?r.push(t):R(this,nt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(R(this,$t).delete(t)){const n=Gr(t);if(typeof n=="string"){const r=R(this,nt).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&R(this,nt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Gr(t);if(typeof n=="string"){const r=R(this,nt).get(n),o=r==null?void 0:r.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=Gr(t);if(typeof n=="string"){const o=(r=R(this,nt).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){_e.batch(()=>{R(this,$t).forEach(t=>{this.notify({type:"removed",mutation:t})}),R(this,$t).clear(),R(this,nt).clear()})}getAll(){return Array.from(R(this,$t))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Xa(n,r))}findAll(t={}){return this.getAll().filter(n=>Xa(t,n))}notify(t){_e.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return _e.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ze))))}},$t=new WeakMap,nt=new WeakMap,Or=new WeakMap,Vu);function Gr(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Za(e){return{onFetch:(t,n)=>{var u,d,f,h,p;const r=t.options,o=(f=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((h=t.state.data)==null?void 0:h.pages)||[],s=((p=t.state.data)==null?void 0:p.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const y=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},m=yc(t.options,t.fetchOptions),v=async(w,S,C)=>{if(g)return Promise.reject();if(S==null&&w.pages.length)return Promise.resolve(w);const O={client:t.client,queryKey:t.queryKey,pageParam:S,direction:C?"backward":"forward",meta:t.options.meta};y(O);const L=await m(O),{maxPages:k}=t.options,T=C?sg:ig;return{pages:T(w.pages,L,k),pageParams:T(w.pageParams,S,k)}};if(o&&i.length){const w=o==="backward",S=w?vg:Ja,C={pages:i,pageParams:s},O=S(r,C);a=await v(C,O,w)}else{const w=e??i.length;do{const S=l===0?s[0]??r.initialPageParam:Ja(r,a);if(l>0&&S==null)break;a=await v(a,S),l++}while(l<w)}return a};t.options.persister?t.fetchFn=()=>{var g,y;return(y=(g=t.options).persister)==null?void 0:y.call(g,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function Ja(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 vg(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var xe,Nt,Kt,Ln,_n,jt,kn,Vn,Nu,yg=(Nu=class{constructor(t={}){ee(this,xe);ee(this,Nt);ee(this,Kt);ee(this,Ln);ee(this,_n);ee(this,jt);ee(this,kn);ee(this,Vn);q(this,xe,t.queryCache||new hg),q(this,Nt,t.mutationCache||new mg),q(this,Kt,t.defaultOptions||{}),q(this,Ln,new Map),q(this,_n,new Map),q(this,jt,0)}mount(){Br(this,jt)._++,R(this,jt)===1&&(q(this,kn,ws.subscribe(async t=>{t&&(await this.resumePausedMutations(),R(this,xe).onFocus())})),q(this,Vn,uo.subscribe(async t=>{t&&(await this.resumePausedMutations(),R(this,xe).onOnline())})))}unmount(){var t,n;Br(this,jt)._--,R(this,jt)===0&&((t=R(this,kn))==null||t.call(this),q(this,kn,void 0),(n=R(this,Vn))==null||n.call(this),q(this,Vn,void 0))}isFetching(t){return R(this,xe).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return R(this,Nt).findAll({...t,status:"pending"}).length}getQueryData(t){var r;const n=this.defaultQueryOptions({queryKey:t});return(r=R(this,xe).get(n.queryHash))==null?void 0:r.state.data}ensureQueryData(t){const n=this.defaultQueryOptions(t),r=R(this,xe).build(this,n),o=r.state.data;return o===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(In(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(o))}getQueriesData(t){return R(this,xe).findAll(t).map(({queryKey:n,state:r})=>{const o=r.data;return[n,o]})}setQueryData(t,n,r){const o=this.defaultQueryOptions({queryKey:t}),i=R(this,xe).get(o.queryHash),s=i==null?void 0:i.state.data,a=rg(n,s);if(a!==void 0)return R(this,xe).build(this,o).setData(a,{...r,manual:!0})}setQueriesData(t,n,r){return _e.batch(()=>R(this,xe).findAll(t).map(({queryKey:o})=>[o,this.setQueryData(o,n,r)]))}getQueryState(t){var r;const n=this.defaultQueryOptions({queryKey:t});return(r=R(this,xe).get(n.queryHash))==null?void 0:r.state}removeQueries(t){const n=R(this,xe);_e.batch(()=>{n.findAll(t).forEach(r=>{n.remove(r)})})}resetQueries(t,n){const r=R(this,xe),o={type:"active",...t};return _e.batch(()=>(r.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries(o,n)))}cancelQueries(t,n={}){const r={revert:!0,...n},o=_e.batch(()=>R(this,xe).findAll(t).map(i=>i.cancel(r)));return Promise.all(o).then(Ze).catch(Ze)}invalidateQueries(t,n={}){return _e.batch(()=>{if(R(this,xe).findAll(t).forEach(o=>{o.invalidate()}),(t==null?void 0:t.refetchType)==="none")return Promise.resolve();const r={...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"};return this.refetchQueries(r,n)})}refetchQueries(t,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},o=_e.batch(()=>R(this,xe).findAll(t).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,r);return r.throwOnError||(s=s.catch(Ze)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(o).then(Ze)}fetchQuery(t){const n=this.defaultQueryOptions(t);n.retry===void 0&&(n.retry=!1);const r=R(this,xe).build(this,n);return r.isStaleByTime(In(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Ze).catch(Ze)}fetchInfiniteQuery(t){return t.behavior=Za(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ze).catch(Ze)}ensureInfiniteQueryData(t){return t.behavior=Za(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return uo.isOnline()?R(this,Nt).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,xe)}getMutationCache(){return R(this,Nt)}getDefaultOptions(){return R(this,Kt)}setDefaultOptions(t){q(this,Kt,t)}setQueryDefaults(t,n){R(this,Ln).set(Cr(t),{queryKey:t,defaultOptions:n})}getQueryDefaults(t){const n=[...R(this,Ln).values()],r={};return n.forEach(o=>{Er(t,o.queryKey)&&Object.assign(r,o.defaultOptions)}),r}setMutationDefaults(t,n){R(this,_n).set(Cr(t),{mutationKey:t,defaultOptions:n})}getMutationDefaults(t){const n=[...R(this,_n).values()];let r={};return n.forEach(o=>{Er(t,o.mutationKey)&&(r={...r,...o.defaultOptions})}),r}defaultQueryOptions(t){if(t._defaulted)return t;const n={...R(this,Kt).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return n.queryHash||(n.queryHash=vs(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===ys&&(n.enabled=!1),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...R(this,Kt).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){R(this,xe).clear(),R(this,Nt).clear()}},xe=new WeakMap,Nt=new WeakMap,Kt=new WeakMap,Ln=new WeakMap,_n=new WeakMap,jt=new WeakMap,kn=new WeakMap,Vn=new WeakMap,Nu),Be,he,Ar,Ne,an,Nn,zt,pt,Tr,Kn,jn,ln,un,Bt,zn,me,gr,Ni,Ki,ji,zi,Bi,Hi,Gi,Ec,Ku,wg=(Ku=class extends Dr{constructor(t,n){super();ee(this,me);ee(this,Be);ee(this,he);ee(this,Ar);ee(this,Ne);ee(this,an);ee(this,Nn);ee(this,zt);ee(this,pt);ee(this,Tr);ee(this,Kn);ee(this,jn);ee(this,ln);ee(this,un);ee(this,Bt);ee(this,zn,new Set);this.options=n,q(this,Be,t),q(this,pt,null),q(this,zt,Vi()),this.options.experimental_prefetchInRender||R(this,zt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(R(this,he).addObserver(this),el(R(this,he),this.options)?fe(this,me,gr).call(this):this.updateResult(),fe(this,me,zi).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ui(R(this,he),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ui(R(this,he),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,fe(this,me,Bi).call(this),fe(this,me,Hi).call(this),R(this,he).removeObserver(this)}setOptions(t,n){const r=this.options,o=R(this,he);if(this.options=R(this,Be).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ot(this.options.enabled,R(this,he))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");fe(this,me,Gi).call(this),R(this,he).setOptions(this.options),r._defaulted&&!Li(this.options,r)&&R(this,Be).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,he),observer:this});const i=this.hasListeners();i&&tl(R(this,he),o,this.options,r)&&fe(this,me,gr).call(this),this.updateResult(n),i&&(R(this,he)!==o||ot(this.options.enabled,R(this,he))!==ot(r.enabled,R(this,he))||In(this.options.staleTime,R(this,he))!==In(r.staleTime,R(this,he)))&&fe(this,me,Ni).call(this);const s=fe(this,me,Ki).call(this);i&&(R(this,he)!==o||ot(this.options.enabled,R(this,he))!==ot(r.enabled,R(this,he))||s!==R(this,Bt))&&fe(this,me,ji).call(this,s)}getOptimisticResult(t){const n=R(this,Be).getQueryCache().build(R(this,Be),t),r=this.createResult(n,t);return Sg(this,r)&&(q(this,Ne,r),q(this,Nn,this.options),q(this,an,R(this,he).state)),r}getCurrentResult(){return R(this,Ne)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){R(this,zn).add(t)}getCurrentQuery(){return R(this,he)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=R(this,Be).defaultQueryOptions(t),r=R(this,Be).getQueryCache().build(R(this,Be),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return fe(this,me,gr).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,Ne)))}createResult(t,n){var k;const r=R(this,he),o=this.options,i=R(this,Ne),s=R(this,an),a=R(this,Nn),c=t!==r?t.state:R(this,Ar),{state:u}=t;let d={...u},f=!1,h;if(n._optimisticResults){const T=this.hasListeners(),K=!T&&el(t,n),N=T&&tl(t,r,n,o);(K||N)&&(d={...d,...Cc(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:p,errorUpdatedAt:g,status:y}=d;if(n.select&&d.data!==void 0)if(i&&d.data===(s==null?void 0:s.data)&&n.select===R(this,Tr))h=R(this,Kn);else try{q(this,Tr,n.select),h=n.select(d.data),h=ki(i==null?void 0:i.data,h,n),q(this,Kn,h),q(this,pt,null)}catch(T){q(this,pt,T)}else h=d.data;if(n.placeholderData!==void 0&&h===void 0&&y==="pending"){let T;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))T=i.data;else if(T=typeof n.placeholderData=="function"?n.placeholderData((k=R(this,jn))==null?void 0:k.state.data,R(this,jn)):n.placeholderData,n.select&&T!==void 0)try{T=n.select(T),q(this,pt,null)}catch(K){q(this,pt,K)}T!==void 0&&(y="success",h=ki(i==null?void 0:i.data,T,n),f=!0)}R(this,pt)&&(p=R(this,pt),h=R(this,Kn),g=Date.now(),y="error");const m=d.fetchStatus==="fetching",v=y==="pending",w=y==="error",S=v&&m,C=h!==void 0,L={status:y,fetchStatus:d.fetchStatus,isPending:v,isSuccess:y==="success",isError:w,isInitialLoading:S,isLoading:S,data:h,dataUpdatedAt:d.dataUpdatedAt,error:p,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:m,isRefetching:m&&!v,isLoadingError:w&&!C,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:w&&C,isStale:bs(t,n),refetch:this.refetch,promise:R(this,zt)};if(this.options.experimental_prefetchInRender){const T=B=>{L.status==="error"?B.reject(L.error):L.data!==void 0&&B.resolve(L.data)},K=()=>{const B=q(this,zt,L.promise=Vi());T(B)},N=R(this,zt);switch(N.status){case"pending":t.queryHash===r.queryHash&&T(N);break;case"fulfilled":(L.status==="error"||L.data!==N.value)&&K();break;case"rejected":(L.status!=="error"||L.error!==N.reason)&&K();break}}return L}updateResult(t){const n=R(this,Ne),r=this.createResult(R(this,he),this.options);if(q(this,an,R(this,he).state),q(this,Nn,this.options),R(this,an).data!==void 0&&q(this,jn,R(this,he)),Li(r,n))return;q(this,Ne,r);const o={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!R(this,zn).size)return!0;const l=new Set(a??R(this,zn));return this.options.throwOnError&&l.add("error"),Object.keys(R(this,Ne)).some(c=>{const u=c;return R(this,Ne)[u]!==n[u]&&l.has(u)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),fe(this,me,Ec).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&fe(this,me,zi).call(this)}},Be=new WeakMap,he=new WeakMap,Ar=new WeakMap,Ne=new WeakMap,an=new WeakMap,Nn=new WeakMap,zt=new WeakMap,pt=new WeakMap,Tr=new WeakMap,Kn=new WeakMap,jn=new WeakMap,ln=new WeakMap,un=new WeakMap,Bt=new WeakMap,zn=new WeakMap,me=new WeakSet,gr=function(t){fe(this,me,Gi).call(this);let n=R(this,he).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ze)),n},Ni=function(){fe(this,me,Bi).call(this);const t=In(this.options.staleTime,R(this,he));if(Hn||R(this,Ne).isStale||!Di(t))return;const r=mc(R(this,Ne).dataUpdatedAt,t)+1;q(this,ln,setTimeout(()=>{R(this,Ne).isStale||this.updateResult()},r))},Ki=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,he)):this.options.refetchInterval)??!1},ji=function(t){fe(this,me,Hi).call(this),q(this,Bt,t),!(Hn||ot(this.options.enabled,R(this,he))===!1||!Di(R(this,Bt))||R(this,Bt)===0)&&q(this,un,setInterval(()=>{(this.options.refetchIntervalInBackground||ws.isFocused())&&fe(this,me,gr).call(this)},R(this,Bt)))},zi=function(){fe(this,me,Ni).call(this),fe(this,me,ji).call(this,fe(this,me,Ki).call(this))},Bi=function(){R(this,ln)&&(clearTimeout(R(this,ln)),q(this,ln,void 0))},Hi=function(){R(this,un)&&(clearInterval(R(this,un)),q(this,un,void 0))},Gi=function(){const t=R(this,Be).getQueryCache().build(R(this,Be),this.options);if(t===R(this,he))return;const n=R(this,he);q(this,he,t),q(this,Ar,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Ec=function(t){_e.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(R(this,Ne))}),R(this,Be).getQueryCache().notify({query:R(this,he),type:"observerResultsUpdated"})})},Ku);function bg(e,t){return ot(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function el(e,t){return bg(e,t)||e.state.data!==void 0&&Ui(e,t,t.refetchOnMount)}function Ui(e,t,n){if(ot(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&bs(e,t)}return!1}function tl(e,t,n,r){return(e!==t||ot(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&bs(e,n)}function bs(e,t){return ot(t.enabled,e)!==!1&&e.isStaleByTime(In(t.staleTime,e))}function Sg(e,t){return!Li(e.getCurrentResult(),t)}function xg(e){return e}function Cg(e,t,n){var l;if(typeof t!="object"||t===null)return;const r=e.getMutationCache(),o=e.getQueryCache(),i=((l=e.getDefaultOptions().hydrate)==null?void 0:l.deserializeData)??xg,s=t.mutations||[],a=t.queries||[];s.forEach(({state:c,...u})=>{var d,f;r.build(e,{...(d=e.getDefaultOptions().hydrate)==null?void 0:d.mutations,...(f=n==null?void 0:n.defaultOptions)==null?void 0:f.mutations,...u},c)}),a.forEach(({queryKey:c,state:u,queryHash:d,meta:f,promise:h})=>{var y,m;let p=o.get(d);const g=u.data===void 0?u.data:i(u.data);if(p){if(p.state.dataUpdatedAt<u.dataUpdatedAt){const{fetchStatus:v,...w}=u;p.setState({...w,data:g})}}else p=o.build(e,{...(y=e.getDefaultOptions().hydrate)==null?void 0:y.queries,...(m=n==null?void 0:n.defaultOptions)==null?void 0:m.queries,queryKey:c,queryHash:d,meta:f},{...u,data:g,fetchStatus:"idle"});if(h){const v=Promise.resolve(h).then(i);p.fetch(void 0,{initialPromise:v})}})}var Eg=class extends yg{constructor(e={}){super(e)}},Rc=we(void 0),Pc=e=>{const t=ye(Rc);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t()},Rg=e=>(je(t=>(t==null||t(),e.client.mount(),e.client.unmount.bind(e.client))),W(()=>e.client.unmount()),b(Rc.Provider,{value:()=>e.client,get children(){return e.children}}));function Pg(e,t){return typeof e=="function"?e(...t):!!e}var Ic=we(()=>!1),Ig=()=>ye(Ic);Ic.Provider;function $g(e,t,n,r){if(n===!1)return t;if(typeof n=="function"){const s=n(e.data,t.data);return{...t,data:s}}let o=t.data;if(e.data===void 0)try{o=structuredClone(o)}catch{}const i=pc(o,{key:n})(e.data);return{...t,data:i}}var Mg=(e,t)=>t;function Fg(e,t,n){const r=V(()=>Pc()),o=Ig(),i=V(()=>{const S=r().defaultQueryOptions(e());return S._optimisticResults=o()?"isRestoring":"optimistic",S.structuralSharing=!1,S}),s=i(),[a,l]=j(new t(r(),i()));let c=a().getOptimisticResult(i());const[u,d]=wo(c),f=()=>a().subscribe(C=>{c=C,queueMicrotask(()=>{g&&v()})});function h(S){const C=a().options,O=C.reconcile;d(L=>$g(L,S,O===void 0?!1:O,C.queryHash))}function p(){return[()=>u,S=>{const C=fn(u);if(typeof S=="function"&&(S=S(C)),S!=null&&S.hydrationData){const{hydrationData:O,...L}=S;S=L}h(S)}]}let g=null,y=null;const[m,{refetch:v}]=Of(()=>{const S=a();return new Promise((C,O)=>{if(y=C,!g&&!o()&&(g=f()),S.updateResult(),c.isError&&!c.isFetching&&!o()&&Pg(S.options.throwOnError,[c.error,S.getCurrentQuery()]))return h(c),O(c.error);if(!c.isLoading)return y=null,C(Mg(S.getCurrentQuery(),c));h(c)})},{storage:p,get deferStream(){return e().deferStream},onHydrated(S,C){if(C.value&&"hydrationData"in C.value&&Cg(r(),{queries:[{...C.value.hydrationData}]}),g)return;const O={...s};(s.staleTime||!s.initialData)&&C.value&&(O.refetchOnMount=!1),a().setOptions(O),h(a().getOptimisticResult(O)),g=f()}});Mt(Ce(r,S=>{g&&g();const C=new t(S,i());g=f(),l(C)},{defer:!0})),Mt(Ce(o,S=>{S||v()},{defer:!0})),W(()=>{g&&(g(),g=null),y&&(y(c),y=null)}),Mt(Ce([a,i],([S,C])=>{S.setOptions(C),h(S.getOptimisticResult(C)),v()},{defer:!0}));const w={get(S,C){var O,L;return C==="data"?u.data!==void 0?(O=m.latest)==null?void 0:O.data:(L=m())==null?void 0:L.data:Reflect.get(S,C)}};return new Proxy(u,w)}function bo(e,t){return Fg(V(()=>e()),wg)}function Og(e){return(...t)=>{for(const n of e)n&&n(...t)}}var A=e=>typeof e=="function"&&!e.length?e():e,nl=e=>Array.isArray(e)?e:e?[e]:[];function Ag(e,...t){return typeof e=="function"?e(...t):e}var Tg=W;function Dg(e,t,n,r){return e.addEventListener(t,n,r),Tg(e.removeEventListener.bind(e,t,n,r))}function Lg(e,t,n,r){const o=()=>{nl(A(e)).forEach(i=>{i&&nl(A(t)).forEach(s=>Dg(i,s,n,r))})};typeof e=="function"?H(o):je(o)}var _g=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function rl(e){const t={};let n;for(;n=_g.exec(e);)t[n[1]]=n[2];return t}function ct(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=rl(e)}else typeof t=="string"&&(t=rl(t));return{...e,...t}}function ve(...e){return Og(e)}function kg(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function qi(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Vg(e){return typeof e=="number"}function En(e){return Object.prototype.toString.call(e)==="[object String]"}function Ss(e){return typeof e=="function"}function dt(e){return t=>`${e()}-${t}`}function Pe(e,t){return e?e===t||e.contains(t):!1}function pr(e,t=!1){const{activeElement:n}=ze(e);if(!(n!=null&&n.nodeName))return null;if($c(n)&&n.contentDocument)return pr(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=ze(n).getElementById(r);if(o)return o}}return n}function xs(e){return ze(e).defaultView||window}function ze(e){return e?e.ownerDocument||e:document}function $c(e){return e.tagName==="IFRAME"}var Cs=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(Cs||{});function Es(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)==null?void 0:t.platform)||window.navigator.platform):!1}function So(){return Es(/^Mac/i)}function Ng(){return Es(/^iPhone/i)}function Kg(){return Es(/^iPad/i)||So()&&navigator.maxTouchPoints>1}function jg(){return Ng()||Kg()}function zg(){return So()||jg()}function ne(e,t){return t&&(Ss(t)?t(e):t[0](t[1],e)),e==null?void 0:e.defaultPrevented}function Se(e){return t=>{for(const n of e)ne(t,n)}}function Bg(e){return So()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function $e(e){if(e)if(Hg())e.focus({preventScroll:!0});else{const t=Gg(e);e.focus(),Ug(t)}}var Ur=null;function Hg(){if(Ur==null){Ur=!1;try{document.createElement("div").focus({get preventScroll(){return Ur=!0,!0}})}catch{}}return Ur}function Gg(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Ug(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var Mc=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],qg=[...Mc,'[tabindex]:not([tabindex="-1"]):not([disabled])'],Rs=`${Mc.join(":not([hidden]),")},[tabindex]:not([disabled]):not([hidden])`,Wg=qg.join(':not([hidden]):not([tabindex="-1"]),');function Fc(e,t){const r=Array.from(e.querySelectorAll(Rs)).filter(ol);return t&&ol(e)&&r.unshift(e),r.forEach((o,i)=>{if($c(o)&&o.contentDocument){const s=o.contentDocument.body,a=Fc(s,!1);r.splice(i,1,...a)}}),r}function ol(e){return Oc(e)&&!Xg(e)}function Oc(e){return e.matches(Rs)&&Ps(e)}function Xg(e){return Number.parseInt(e.getAttribute("tabindex")||"0",10)<0}function Ps(e,t){return e.nodeName!=="#comment"&&Qg(e)&&Yg(e,t)&&(!e.parentElement||Ps(e.parentElement,e))}function Qg(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:o}=e.ownerDocument.defaultView,{display:i,visibility:s}=o(e);r=i!=="none"&&s!=="hidden"&&s!=="collapse"}return r}function Yg(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Zg(e,t,n){const r=t!=null&&t.tabbable?Wg:Rs,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){var s;return(s=t==null?void 0:t.from)!=null&&s.contains(i)?NodeFilter.FILTER_REJECT:i.matches(r)&&Ps(i)&&(!(t!=null&&t.accept)||t.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(o.currentNode=t.from),o}function il(e){let t=e;for(;t&&!Jg(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function Jg(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function ep(){}function tp(e){return[e.clientX,e.clientY]}function Ac(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=i,a=0,l=s-1;a<s;l=a++){const[c,u]=t[a],[d,f]=t[l],[,h]=t[l===0?s-1:l-1]||[0,0],p=(u-f)*(n-c)-(c-d)*(r-u);if(f<u){if(r>=f&&r<u){if(p===0)return!0;p>0&&(r===f?r>h&&(o=!o):o=!o)}}else if(u<f){if(r>u&&r<=f){if(p===0)return!0;p<0&&(r===f?r<h&&(o=!o):o=!o)}}else if(r===u&&(n>=d&&n<=c||n>=c&&n<=d))return!0}return o}function Q(e,t){return M(e,t)}var rr=new Map,sl=new Set;function al(){if(typeof window>"u")return;const e=n=>{if(!n.target)return;let r=rr.get(n.target);r||(r=new Set,rr.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=rr.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),rr.delete(n.target)),rr.size===0)){for(const o of sl)o();sl.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?al():document.addEventListener("DOMContentLoaded",al));function Wi(e,t){const n=ll(e,t,"left"),r=ll(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight;let s=e.scrollLeft,a=e.scrollTop;const l=s+e.offsetWidth,c=a+e.offsetHeight;n<=s?s=n:n+o>l&&(s+=n+o-l),r<=a?a=r:r+i>c&&(a+=r+i-c),e.scrollLeft=s,e.scrollTop=a}function ll(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[r];break}t=t.offsetParent}return o}function np(e,t){var n,r;if(document.contains(e)){const o=document.scrollingElement||document.documentElement;if(window.getComputedStyle(o).overflow==="hidden"){let s=il(e);for(;e&&s&&e!==o&&s!==o;)Wi(s,e),e=s,s=il(e)}else{const{left:s,top:a}=e.getBoundingClientRect();(n=e==null?void 0:e.scrollIntoView)==null||n.call(e,{block:"nearest"});const{left:l,top:c}=e.getBoundingClientRect();(Math.abs(s-l)>1||Math.abs(a-c)>1)&&((r=e.scrollIntoView)==null||r.call(e,{block:"nearest"}))}}}var Tc={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"},Rr="data-kb-top-layer",Dc,Xi=!1,Ft=[];function Pr(e){return Ft.findIndex(t=>t.node===e)}function rp(e){return Ft[Pr(e)]}function op(e){return Ft[Ft.length-1].node===e}function Lc(){return Ft.filter(e=>e.isPointerBlocking)}function ip(){return[...Lc()].slice(-1)[0]}function Is(){return Lc().length>0}function _c(e){var n;const t=Pr((n=ip())==null?void 0:n.node);return Pr(e)<t}function sp(e){Ft.push(e)}function ap(e){const t=Pr(e);t<0||Ft.splice(t,1)}function lp(){for(const{node:e}of Ft)e.style.pointerEvents=_c(e)?"none":"auto"}function up(e){if(Is()&&!Xi){const t=ze(e);Dc=document.body.style.pointerEvents,t.body.style.pointerEvents="none",Xi=!0}}function cp(e){if(Is())return;const t=ze(e);t.body.style.pointerEvents=Dc,t.body.style.length===0&&t.body.removeAttribute("style"),Xi=!1}var He={layers:Ft,isTopMostLayer:op,hasPointerBlockingLayer:Is,isBelowPointerBlockingLayer:_c,addLayer:sp,removeLayer:ap,indexOf:Pr,find:rp,assignPointerEventToLayers:lp,disableBodyPointerEvents:up,restoreBodyPointerEvents:cp};function xo(e,t){const[n,r]=j(ul(t==null?void 0:t()));return H(()=>{var o;r(((o=e())==null?void 0:o.tagName.toLowerCase())||ul(t==null?void 0:t()))}),n}function ul(e){return En(e)?e:void 0}function le(e){const[t,n]=_(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return b(Ju,M(n,{get component(){return t.as}}))}var dp=Object.defineProperty,Ot=(e,t)=>{for(var n in t)dp(e,n,{get:t[n],enumerable:!0})},fp={};Ot(fp,{Button:()=>pp,Root:()=>wt});var hp=["button","color","file","image","reset","submit"];function gp(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?hp.indexOf(e.type)!==-1:!1}function wt(e){let t;const n=Q({type:"button"},e),[r,o]=_(n,["ref","type","disabled"]),i=xo(()=>t,()=>"button"),s=V(()=>{const c=i();return c==null?!1:gp({tagName:c,type:r.type})}),a=V(()=>i()==="input"),l=V(()=>i()==="a"&&(t==null?void 0:t.getAttribute("href"))!=null);return b(le,M({as:"button",ref(c){var u=ve(d=>t=d,r.ref);typeof u=="function"&&u(c)},get type(){return s()||a()?r.type:void 0},get role(){return!s()&&!l()?"button":void 0},get tabIndex(){return!s()&&!l()&&!r.disabled?0:void 0},get disabled(){return s()||a()?r.disabled:void 0},get"aria-disabled"(){return!s()&&!a()&&r.disabled?!0:void 0},get"data-disabled"(){return r.disabled?"":void 0}},o))}var pp=wt;function Ke(e){return t=>(e(t),()=>e(void 0))}var De=e=>typeof e=="function"?e():e,mp=e=>{const t=V(()=>{const s=De(e.element);if(s)return getComputedStyle(s)}),n=()=>{var s;return((s=t())==null?void 0:s.animationName)??"none"},[r,o]=j(De(e.show)?"present":"hidden");let i="none";return H(s=>{const a=De(e.show);return Me(()=>{var u;if(s===a)return a;const l=i,c=n();a?o("present"):c==="none"||((u=t())==null?void 0:u.display)==="none"?o("hidden"):o(s===!0&&l!==c?"hiding":"hidden")}),a}),H(()=>{const s=De(e.element);if(!s)return;const a=c=>{c.target===s&&(i=n())},l=c=>{const d=n().includes(c.animationName);c.target===s&&d&&r()==="hiding"&&o("hidden")};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",l),s.addEventListener("animationend",l),W(()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",l),s.removeEventListener("animationend",l)})}),{present:()=>r()==="present"||r()==="hiding",state:r,setState:o}},vp=mp,Gn=vp,yp={};Ot(yp,{CloseButton:()=>$s,Description:()=>Ms,List:()=>Os,ProgressFill:()=>Nc,ProgressTrack:()=>Kc,Region:()=>Ts,Root:()=>Ds,Title:()=>Ls,Toast:()=>Lp,toaster:()=>_s});var kc=we();function Co(){const e=ye(kc);if(e===void 0)throw new Error("[kobalte]: `useToastContext` must be used within a `Toast.Root` component");return e}function $s(e){const t=Co(),[n,r]=_(e,["aria-label","onClick"]);return b(wt,M({get"aria-label"(){return n["aria-label"]||t.translations().close},onClick:i=>{ne(i,n.onClick),t.close()}},r))}function Ms(e){const t=Co(),n=Q({id:t.generateId("description")},e),[r,o]=_(n,["id"]);return H(()=>W(t.registerDescriptionId(r.id))),b(le,M({as:"div",get id(){return r.id}},o))}var Vc=we();function Fs(){const e=ye(Vc);if(e===void 0)throw new Error("[kobalte]: `useToastRegionContext` must be used within a `Toast.Region` component");return e}function Os(e){let t;const n=Fs(),[r,o]=_(e,["ref","onFocusIn","onFocusOut","onPointerMove","onPointerLeave"]),i=c=>{ne(c,r.onFocusIn),n.pauseOnInteraction()&&!n.isPaused()&&n.pauseAllTimer()},s=c=>{ne(c,r.onFocusOut),Pe(t,c.relatedTarget)||n.resumeAllTimer()},a=c=>{ne(c,r.onPointerMove),n.pauseOnInteraction()&&!n.isPaused()&&n.pauseAllTimer()},l=c=>{ne(c,r.onPointerLeave),Pe(t,ze(t).activeElement)||n.resumeAllTimer()};return H(Ce([()=>t,()=>n.hotkey()],([c,u])=>{if(!c)return;const d=ze(c),f=h=>{u.every(g=>h[g]||h.code===g)&&$e(c)};d.addEventListener("keydown",f),W(()=>d.removeEventListener("keydown",f))})),H(()=>{if(!n.pauseOnPageIdle())return;const c=xs(t);c.addEventListener("blur",n.pauseAllTimer),c.addEventListener("focus",n.resumeAllTimer),W(()=>{c.removeEventListener("blur",n.pauseAllTimer),c.removeEventListener("focus",n.resumeAllTimer)})}),b(le,M({as:"ol",ref(c){var u=ve(d=>t=d,r.ref);typeof u=="function"&&u(c)},tabIndex:-1,onFocusIn:i,onFocusOut:s,onPointerMove:a,onPointerLeave:l},o,{get children(){return b(rt,{get each(){return n.toasts()},children:c=>c.toastComponent({get toastId(){return c.id}})})}}))}function Nc(e){const t=Fs(),n=Co(),[r,o]=_(e,["style"]),[i,s]=j(100);let a=0;return H(()=>{if(t.isPaused()||n.isPersistent())return;const l=setInterval(()=>{const c=new Date().getTime()-n.closeTimerStartTime()+a,u=Math.trunc(100-c/n.duration()*100);s(u<0?0:u)});W(()=>{a+=new Date().getTime()-n.closeTimerStartTime(),clearInterval(l)})}),b(le,M({as:"div",get style(){return ct({"--kb-toast-progress-fill-width":`${i()}%`},r.style)}},o))}function Kc(e){return b(le,M({as:"div","aria-hidden":"true",role:"presentation"},e))}var[As,Lr]=wo({toasts:[]});function wp(e){Lr("toasts",t=>[...t,e])}function bp(e){return As.toasts.find(t=>t.id===e)}function Sp(e,t){const n=As.toasts.findIndex(r=>r.id===e);n!==-1&&Lr("toasts",r=>[...r.slice(0,n),t,...r.slice(n+1)])}function xp(e){Lr("toasts",t=>t.id===e,"dismiss",!0)}function Cp(e){Lr("toasts",t=>t.filter(n=>n.id!==e))}function Ep(){Lr("toasts",[])}var hn={toasts:()=>As.toasts,add:wp,get:bp,update:Sp,dismiss:xp,remove:Cp,clear:Ep},cl="{hotkey}",Rp={close:"Close"},Pp={notifications:e=>`Notifications (${e})`};function Ts(e){const t=Q({id:`toast-region-${Ee()}`,hotkey:["altKey","KeyT"],duration:5e3,limit:3,swipeDirection:"right",swipeThreshold:50,pauseOnInteraction:!0,pauseOnPageIdle:!0,topLayer:!0,translations:Pp},e),[n,r]=_(t,["translations","style","hotkey","duration","limit","swipeDirection","swipeThreshold","pauseOnInteraction","pauseOnPageIdle","topLayer","aria-label","regionId"]),o=V(()=>hn.toasts().filter(f=>f.region===n.regionId&&f.dismiss===!1).slice(0,n.limit)),[i,s]=j(!1),a=()=>o().length>0,l=()=>n.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,""),c=()=>(n["aria-label"]||n.translations.notifications(cl)).replace(cl,l()),u=()=>({[Rr]:n.topLayer?"":void 0}),d={isPaused:i,toasts:o,hotkey:()=>n.hotkey,duration:()=>n.duration,swipeDirection:()=>n.swipeDirection,swipeThreshold:()=>n.swipeThreshold,pauseOnInteraction:()=>n.pauseOnInteraction,pauseOnPageIdle:()=>n.pauseOnPageIdle,pauseAllTimer:()=>s(!0),resumeAllTimer:()=>s(!1),generateId:dt(()=>r.id)};return b(Vc.Provider,{value:d,get children(){return b(le,M({as:"div",role:"region",tabIndex:-1,get"aria-label"(){return c()},get style(){return ct({"pointer-events":a()?n.topLayer?"auto":void 0:"none"},n.style)}},u,r))}})}var Ip="toast.swipeStart",$p="toast.swipeMove",Mp="toast.swipeCancel",Fp="toast.swipeEnd";function Ds(e){const t=Fs(),n=Q({id:`toast-${Ee()}`,priority:"high",translations:Rp},e),[r,o]=_(n,["ref","translations","toastId","style","priority","duration","persistent","onPause","onResume","onSwipeStart","onSwipeMove","onSwipeCancel","onSwipeEnd","onEscapeKeyDown","onKeyDown","onPointerDown","onPointerMove","onPointerUp"]),[i,s]=j(!0),[a,l]=j(),[c,u]=j(),[d,f]=j(!0),[h,p]=j(),{present:g}=Gn({show:i,element:()=>h()??null}),y=V(()=>r.duration||t.duration());let m,v=0,w=y(),S=null,C=null;const O=()=>{s(!1),f(!0)},L=()=>{hn.remove(r.toastId)},k=x=>{!x||r.persistent||(window.clearTimeout(m),v=new Date().getTime(),m=window.setTimeout(O,x))},T=()=>{var x;k(w),(x=r.onResume)==null||x.call(r)},K=()=>{var I;const x=new Date().getTime()-v;w=w-x,window.clearTimeout(m),(I=r.onPause)==null||I.call(r)},N=x=>{var I;ne(x,r.onKeyDown),x.key==="Escape"&&((I=r.onEscapeKeyDown)==null||I.call(r,x),x.defaultPrevented||O())},B=x=>{ne(x,r.onPointerDown),x.button===0&&(S={x:x.clientX,y:x.clientY})},oe=x=>{if(ne(x,r.onPointerMove),!S)return;const I=x.clientX-S.x,$=x.clientY-S.y,F=!!C,D=["left","right"].includes(t.swipeDirection()),z=["left","up"].includes(t.swipeDirection())?Math.min:Math.max,U=D?z(0,I):0,Y=D?0:z(0,$),ce=x.pointerType==="touch"?10:2,se={x:U,y:Y},Oe={originalEvent:x,delta:se};if(F){C=se,qr($p,r.onSwipeMove,Oe);const{x:et,y:re}=se;x.currentTarget.setAttribute("data-swipe","move"),x.currentTarget.style.setProperty("--kb-toast-swipe-move-x",`${et}px`),x.currentTarget.style.setProperty("--kb-toast-swipe-move-y",`${re}px`)}else dl(se,t.swipeDirection(),ce)?(C=se,qr(Ip,r.onSwipeStart,Oe),x.currentTarget.setAttribute("data-swipe","start"),x.target.setPointerCapture(x.pointerId)):(Math.abs(I)>ce||Math.abs($)>ce)&&(S=null)},P=x=>{ne(x,r.onPointerUp);const I=C,$=x.target;if($.hasPointerCapture(x.pointerId)&&$.releasePointerCapture(x.pointerId),C=null,S=null,I){const F=x.currentTarget,D={originalEvent:x,delta:I};if(dl(I,t.swipeDirection(),t.swipeThreshold())){qr(Fp,r.onSwipeEnd,D);const{x:z,y:U}=I;x.currentTarget.setAttribute("data-swipe","end"),x.currentTarget.style.removeProperty("--kb-toast-swipe-move-x"),x.currentTarget.style.removeProperty("--kb-toast-swipe-move-y"),x.currentTarget.style.setProperty("--kb-toast-swipe-end-x",`${z}px`),x.currentTarget.style.setProperty("--kb-toast-swipe-end-y",`${U}px`),O()}else qr(Mp,r.onSwipeCancel,D),x.currentTarget.setAttribute("data-swipe","cancel"),x.currentTarget.style.removeProperty("--kb-toast-swipe-move-x"),x.currentTarget.style.removeProperty("--kb-toast-swipe-move-y"),x.currentTarget.style.removeProperty("--kb-toast-swipe-end-x"),x.currentTarget.style.removeProperty("--kb-toast-swipe-end-y");F.addEventListener("click",z=>z.preventDefault(),{once:!0})}};qn(()=>{t.toasts().find(x=>x.id===r.toastId&&x.update)&&f(!1)}),H(Ce(()=>t.isPaused(),x=>{x?K():T()},{defer:!0})),H(Ce([i,y],([x,I])=>{x&&!t.isPaused()&&k(I)})),H(Ce(()=>{var x;return(x=hn.get(r.toastId))==null?void 0:x.dismiss},x=>x&&O())),H(Ce(()=>g(),x=>!x&&L()));const E={translations:()=>r.translations,close:O,duration:y,isPersistent:()=>r.persistent??!1,closeTimerStartTime:()=>v,generateId:dt(()=>o.id),registerTitleId:Ke(l),registerDescriptionId:Ke(u)};return b(pe,{get when(){return g()},get children(){return b(kc.Provider,{value:E,get children(){return b(le,M({as:"li",ref(x){var I=ve(p,r.ref);typeof I=="function"&&I(x)},role:"status",tabIndex:0,get style(){return ct({animation:d()?void 0:"none","user-select":"none","touch-action":"none"},r.style)},get"aria-live"(){return r.priority==="high"?"assertive":"polite"},"aria-atomic":"true",get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-opened"(){return i()?"":void 0},get"data-closed"(){return i()?void 0:""},get"data-swipe-direction"(){return t.swipeDirection()},onKeyDown:N,onPointerDown:B,onPointerMove:oe,onPointerUp:P},o))}})}})}function dl(e,t,n=0){const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n}function qr(e,t,n){const r=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(o)}function Ls(e){const t=Co(),n=Q({id:t.generateId("title")},e),[r,o]=_(n,["id"]);return H(()=>W(t.registerTitleId(r.id))),b(le,M({as:"div",get id(){return r.id}},o))}var Op=0;function jc(e,t){const n=Op++;return hn.add({id:n,toastComponent:e,dismiss:!1,update:!1,region:t==null?void 0:t.region}),n}function Qi(e,t){hn.update(e,{id:e,toastComponent:t,dismiss:!1,update:!0})}function Ap(e,t,n){const r=jc(o=>t({get toastId(){return o.toastId},state:"pending"}),n);return(Ss(e)?e():e).then(o=>Qi(r,i=>t({get toastId(){return i.toastId},state:"fulfilled",data:o}))).catch(o=>Qi(r,i=>t({get toastId(){return i.toastId},state:"rejected",error:o}))),r}function Tp(e){return hn.dismiss(e),e}function Dp(){hn.clear()}var _s={show:jc,update:Qi,promise:Ap,dismiss:Tp,clear:Dp},Lp=Object.assign(Ds,{CloseButton:$s,Description:Ms,List:Os,ProgressFill:Nc,ProgressTrack:Kc,Region:Ts,Title:Ls,toaster:_s});function zc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=zc(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function _p(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=zc(e))&&(r&&(r+=" "),r+=t);return r}const fl=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,hl=_p,_r=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return hl(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const f=fl(u)||fl(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(p=>{let[g,y]=p;return Array.isArray(y)?y.includes({...i,...a}[g]):{...i,...a}[g]===y})?[...c,d,f]:c},[]);return hl(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)};function Bc(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=Bc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function kp(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Bc(e))&&(r&&(r+=" "),r+=t);return r}const ks="-",Vp=e=>{const t=Kp(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const a=s.split(ks);return a[0]===""&&a.length!==1&&a.shift(),Hc(a,t)||Np(s)},getConflictingClassGroupIds:(s,a)=>{const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}}},Hc=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Hc(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(ks);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId},gl=/^\[(.+)\]$/,Np=e=>{if(gl.test(e)){const t=gl.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Kp=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return zp(Object.entries(e.classGroups),n).forEach(([i,s])=>{Yi(s,r,i,t)}),r},Yi=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:pl(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(jp(o)){Yi(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{Yi(s,pl(t,i),n,r)})})},pl=(e,t)=>{let n=e;return t.split(ks).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},jp=e=>e.isThemeGetter,zp=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,o]}):e,Bp=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)}}},Gc="!",Hp=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,s=a=>{const l=[];let c=0,u=0,d;for(let y=0;y<a.length;y++){let m=a[y];if(c===0){if(m===o&&(r||a.slice(y,y+i)===t)){l.push(a.slice(u,y)),u=y+i;continue}if(m==="/"){d=y;continue}}m==="["?c++:m==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(Gc),p=h?f.substring(1):f,g=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:g}};return n?a=>n({className:a,parseClassName:s}):s},Gp=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Up=e=>({cache:Bp(e.cacheSize),parseClassName:Hp(e),...Vp(e)}),qp=/\s+/,Wp=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],s=e.trim().split(qp);let a="";for(let l=s.length-1;l>=0;l-=1){const c=s[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=n(c);let p=!!h,g=r(p?f.substring(0,h):f);if(!g){if(!p){a=c+(a.length>0?" "+a:a);continue}if(g=r(f),!g){a=c+(a.length>0?" "+a:a);continue}p=!1}const y=Gp(u).join(":"),m=d?y+Gc:y,v=m+g;if(i.includes(v))continue;i.push(v);const w=o(g,p);for(let S=0;S<w.length;++S){const C=w[S];i.push(m+C)}a=c+(a.length>0?" "+a:a)}return a};function Xp(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Uc(t))&&(r&&(r+=" "),r+=n);return r}const Uc=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Uc(e[r]))&&(n&&(n+=" "),n+=t);return n};function Qp(e,...t){let n,r,o,i=s;function s(l){const c=t.reduce((u,d)=>d(u),e());return n=Up(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 u=Wp(l,n);return o(l,u),u}return function(){return i(Xp.apply(null,arguments))}}const be=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},qc=/^\[(?:([a-z-]+):)?(.+)\]$/i,Yp=/^\d+\/\d+$/,Zp=new Set(["px","full","screen"]),Jp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,em=/\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$/,tm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,nm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,rm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xt=e=>$n(e)||Zp.has(e)||Yp.test(e),Dt=e=>Xn(e,"length",dm),$n=e=>!!e&&!Number.isNaN(Number(e)),Bo=e=>Xn(e,"number",$n),or=e=>!!e&&Number.isInteger(Number(e)),om=e=>e.endsWith("%")&&$n(e.slice(0,-1)),ae=e=>qc.test(e),Lt=e=>Jp.test(e),im=new Set(["length","size","percentage"]),sm=e=>Xn(e,im,Wc),am=e=>Xn(e,"position",Wc),lm=new Set(["image","url"]),um=e=>Xn(e,lm,hm),cm=e=>Xn(e,"",fm),ir=()=>!0,Xn=(e,t,n)=>{const r=qc.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},dm=e=>em.test(e)&&!tm.test(e),Wc=()=>!1,fm=e=>nm.test(e),hm=e=>rm.test(e),gm=()=>{const e=be("colors"),t=be("spacing"),n=be("blur"),r=be("brightness"),o=be("borderColor"),i=be("borderRadius"),s=be("borderSpacing"),a=be("borderWidth"),l=be("contrast"),c=be("grayscale"),u=be("hueRotate"),d=be("invert"),f=be("gap"),h=be("gradientColorStops"),p=be("gradientColorStopPositions"),g=be("inset"),y=be("margin"),m=be("opacity"),v=be("padding"),w=be("saturate"),S=be("scale"),C=be("sepia"),O=be("skew"),L=be("space"),k=be("translate"),T=()=>["auto","contain","none"],K=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto",ae,t],B=()=>[ae,t],oe=()=>["",xt,Dt],P=()=>["auto",$n,ae],E=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],x=()=>["solid","dashed","dotted","double","none"],I=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>["start","end","center","between","around","evenly","stretch"],F=()=>["","0",ae],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[$n,ae];return{cacheSize:500,separator:":",theme:{colors:[ir],spacing:[xt,Dt],blur:["none","",Lt,ae],brightness:z(),borderColor:[e],borderRadius:["none","","full",Lt,ae],borderSpacing:B(),borderWidth:oe(),contrast:z(),grayscale:F(),hueRotate:z(),invert:F(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[om,Dt],inset:N(),margin:N(),opacity:z(),padding:B(),saturate:z(),scale:z(),sepia:F(),skew:z(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",ae]}],container:["container"],columns:[{columns:[Lt]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"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"],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:[...E(),ae]}],overflow:[{overflow:K()}],"overflow-x":[{"overflow-x":K()}],"overflow-y":[{"overflow-y":K()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",or,ae]}],basis:[{basis:N()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ae]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:["first","last","none",or,ae]}],"grid-cols":[{"grid-cols":[ir]}],"col-start-end":[{col:["auto",{span:["full",or,ae]},ae]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[ir]}],"row-start-end":[{row:["auto",{span:[or,ae]},ae]}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ae]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ae]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...$()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...$(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...$(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[L]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[L]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ae,t]}],"min-w":[{"min-w":[ae,t,"min","max","fit"]}],"max-w":[{"max-w":[ae,t,"none","full","min","max","fit","prose",{screen:[Lt]},Lt]}],h:[{h:[ae,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ae,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ae,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ae,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Lt,Dt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Bo]}],"font-family":[{font:[ir]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ae]}],"line-clamp":[{"line-clamp":["none",$n,Bo]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",xt,ae]}],"list-image":[{"list-image":["none",ae]}],"list-style-type":[{list:["none","disc","decimal",ae]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...x(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",xt,Dt]}],"underline-offset":[{"underline-offset":["auto",xt,ae]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...E(),am]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",sm]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},um]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...x(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:x()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...x()]}],"outline-offset":[{"outline-offset":[xt,ae]}],"outline-w":[{outline:[xt,Dt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[xt,Dt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Lt,cm]}],"shadow-color":[{shadow:[ir]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...I(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":I()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Lt,ae]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ae]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",ae]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",ae]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[or,ae]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ae]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",ae]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"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",ae]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[xt,Dt,Bo]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},pm=Qp(gm);function de(...e){return pm(kp(e))}var mm=ie('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class=size-4><path d="M18 6l-12 12"></path><path d="M6 6l12 12">'),vm=ie('<div class="grid gap-1">');const ym=_r("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--kb-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--kb-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[opened]:animate-in data-[closed]:animate-out data-[swipe=end]:animate-out data-[closed]:fade-out-80 data-[closed]:slide-out-to-right-full data-[opened]:slide-in-from-top-full data-[opened]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"success border-success-foreground bg-success text-success-foreground",warning:"warning border-warning-foreground bg-warning text-warning-foreground",error:"error border-error-foreground bg-error text-error-foreground"}},defaultVariants:{variant:"default"}}),wm=e=>{const[t,n]=_(e,["class"]);return b(yo,{get children(){return b(Ts,{get children(){return b(Os,M({get class(){return de("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse gap-2 p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t.class)}},n))}})}})},bm=e=>{const[t,n]=_(e,["class","variant"]);return b(Ds,M({get class(){return de(ym({variant:t.variant}),t.class)}},n))},Sm=e=>{const[t,n]=_(e,["class"]);return b($s,M({get class(){return de("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-destructive-foreground group-[.error]:text-error-foreground group-[.success]:text-success-foreground group-[.warning]:text-warning-foreground",t.class)}},n,{get children(){return mm()}}))},xm=e=>{const[t,n]=_(e,["class"]);return b(Ls,M({get class(){return de("text-sm font-semibold",t.class)}},n))},Cm=e=>{const[t,n]=_(e,["class"]);return b(Ms,M({get class(){return de("text-sm opacity-90",t.class)}},n))};function ml(e){_s.show(t=>b(bm,{get toastId(){return t.toastId},get variant(){return e.variant},get duration(){return e.duration},get children(){return[(()=>{var n=vm();return X(n,(()=>{var r=V(()=>!!e.title);return()=>r()&&b(xm,{get children(){return e.title}})})(),null),X(n,(()=>{var r=V(()=>!!e.description);return()=>r()&&b(Cm,{get children(){return e.description}})})(),null),n})(),b(Sm,{})]}}))}var Ho="focusScope.autoFocusOnMount",Go="focusScope.autoFocusOnUnmount",vl={bubbles:!1,cancelable:!0},yl={stack:[],active(){return this.stack[0]},add(e){var t;e!==this.active()&&((t=this.active())==null||t.pause()),this.stack=qi(this.stack,e),this.stack.unshift(e)},remove(e){var t;this.stack=qi(this.stack,e),(t=this.active())==null||t.resume()}};function Xc(e,t){const[n,r]=j(!1),o={pause(){r(!0)},resume(){r(!1)}};let i=null;const s=p=>{var g;return(g=e.onMountAutoFocus)==null?void 0:g.call(e,p)},a=p=>{var g;return(g=e.onUnmountAutoFocus)==null?void 0:g.call(e,p)},l=()=>ze(t()),c=()=>{const p=l().createElement("span");return p.setAttribute("data-focus-trap",""),p.tabIndex=0,Object.assign(p.style,Tc),p},u=()=>{const p=t();return p?Fc(p,!0).filter(g=>!g.hasAttribute("data-focus-trap")):[]},d=()=>{const p=u();return p.length>0?p[0]:null},f=()=>{const p=u();return p.length>0?p[p.length-1]:null},h=()=>{const p=t();if(!p)return!1;const g=pr(p);return!g||Pe(p,g)?!1:Oc(g)};H(()=>{const p=t();if(!p)return;yl.add(o);const g=pr(p);if(!Pe(p,g)){const m=new CustomEvent(Ho,vl);p.addEventListener(Ho,s),p.dispatchEvent(m),m.defaultPrevented||setTimeout(()=>{$e(d()),pr(p)===g&&$e(p)},0)}W(()=>{p.removeEventListener(Ho,s),setTimeout(()=>{const m=new CustomEvent(Go,vl);h()&&m.preventDefault(),p.addEventListener(Go,a),p.dispatchEvent(m),m.defaultPrevented||$e(g??l().body),p.removeEventListener(Go,a),yl.remove(o)},0)})}),H(()=>{const p=t();if(!p||!A(e.trapFocus)||n())return;const g=m=>{const v=m.target;v!=null&&v.closest(`[${Rr}]`)||(Pe(p,v)?i=v:$e(i))},y=m=>{const w=m.relatedTarget??pr(p);w!=null&&w.closest(`[${Rr}]`)||Pe(p,w)||$e(i)};l().addEventListener("focusin",g),l().addEventListener("focusout",y),W(()=>{l().removeEventListener("focusin",g),l().removeEventListener("focusout",y)})}),H(()=>{const p=t();if(!p||!A(e.trapFocus)||n())return;const g=c();p.insertAdjacentElement("afterbegin",g);const y=c();p.insertAdjacentElement("beforeend",y);function m(w){const S=d(),C=f();w.relatedTarget===S?$e(C):$e(S)}g.addEventListener("focusin",m),y.addEventListener("focusin",m);const v=new MutationObserver(w=>{for(const S of w)S.previousSibling===y&&(y.remove(),p.insertAdjacentElement("beforeend",y)),S.nextSibling===g&&(g.remove(),p.insertAdjacentElement("afterbegin",g))});v.observe(p,{childList:!0,subtree:!1}),W(()=>{g.removeEventListener("focusin",m),y.removeEventListener("focusin",m),g.remove(),y.remove(),v.disconnect()})})}var Em="data-live-announcer";function Qc(e){H(()=>{A(e.isDisabled)||W(Rm(A(e.targets),A(e.root)))})}var sr=new WeakMap,Xe=[];function Rm(e,t=document.body){const n=new Set(e),r=new Set,o=l=>{for(const f of l.querySelectorAll(`[${Em}], [${Rr}]`))n.add(f);const c=f=>{if(n.has(f)||f.parentElement&&r.has(f.parentElement)&&f.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const h of n)if(f.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},u=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),d=c(l);if(d===NodeFilter.FILTER_ACCEPT&&i(l),d!==NodeFilter.FILTER_REJECT){let f=u.nextNode();for(;f!=null;)i(f),f=u.nextNode()}},i=l=>{const c=sr.get(l)??0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),r.add(l),sr.set(l,c+1))};Xe.length&&Xe[Xe.length-1].disconnect(),o(t);const s=new MutationObserver(l=>{for(const c of l)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...n,...r].some(u=>u.contains(c.target))){for(const u of c.removedNodes)u instanceof Element&&(n.delete(u),r.delete(u));for(const u of c.addedNodes)(u instanceof HTMLElement||u instanceof SVGElement)&&(u.dataset.liveAnnouncer==="true"||u.dataset.reactAriaTopLayer==="true")?n.add(u):u instanceof Element&&o(u)}});s.observe(t,{childList:!0,subtree:!0});const a={observe(){s.observe(t,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return Xe.push(a),()=>{s.disconnect();for(const l of r){const c=sr.get(l);if(c==null)return;c===1?(l.removeAttribute("aria-hidden"),sr.delete(l)):sr.set(l,c-1)}a===Xe[Xe.length-1]?(Xe.pop(),Xe.length&&Xe[Xe.length-1].observe()):Xe.splice(Xe.indexOf(a),1)}}function Pm(e){const t=n=>{var r;n.key===Cs.Escape&&((r=e.onEscapeKeyDown)==null||r.call(e,n))};H(()=>{var r;if(A(e.isDisabled))return;const n=((r=e.ownerDocument)==null?void 0:r.call(e))??ze();n.addEventListener("keydown",t),W(()=>{n.removeEventListener("keydown",t)})})}var wl="interactOutside.pointerDownOutside",bl="interactOutside.focusOutside";function Yc(e,t){let n,r=ep;const o=()=>ze(t()),i=d=>{var f;return(f=e.onPointerDownOutside)==null?void 0:f.call(e,d)},s=d=>{var f;return(f=e.onFocusOutside)==null?void 0:f.call(e,d)},a=d=>{var f;return(f=e.onInteractOutside)==null?void 0:f.call(e,d)},l=d=>{var h;const f=d.target;return!(f instanceof HTMLElement)||f.closest(`[${Rr}]`)||!Pe(o(),f)||Pe(t(),f)?!1:!((h=e.shouldExcludeElement)!=null&&h.call(e,f))},c=d=>{function f(){const h=t(),p=d.target;if(!h||!p||!l(d))return;const g=Se([i,a]);p.addEventListener(wl,g,{once:!0});const y=new CustomEvent(wl,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||Bg(d)&&d.button===0}});p.dispatchEvent(y)}d.pointerType==="touch"?(o().removeEventListener("click",f),r=f,o().addEventListener("click",f,{once:!0})):f()},u=d=>{const f=t(),h=d.target;if(!f||!h||!l(d))return;const p=Se([s,a]);h.addEventListener(bl,p,{once:!0});const g=new CustomEvent(bl,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});h.dispatchEvent(g)};H(()=>{A(e.isDisabled)||(n=window.setTimeout(()=>{o().addEventListener("pointerdown",c,!0)},0),o().addEventListener("focusin",u,!0),W(()=>{window.clearTimeout(n),o().removeEventListener("click",r),o().removeEventListener("pointerdown",c,!0),o().removeEventListener("focusin",u,!0)}))})}var Zc=we();function Im(){return ye(Zc)}function Eo(e){let t;const n=Im(),[r,o]=_(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),i=new Set([]),s=d=>{i.add(d);const f=n==null?void 0:n.registerNestedLayer(d);return()=>{i.delete(d),f==null||f()}};Yc({shouldExcludeElement:d=>{var f;return t?((f=r.excludedElements)==null?void 0:f.some(h=>Pe(h(),d)))||[...i].some(h=>Pe(h,d)):!1},onPointerDownOutside:d=>{var f,h,p;!t||He.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!He.isTopMostLayer(t)||((f=r.onPointerDownOutside)==null||f.call(r,d),(h=r.onInteractOutside)==null||h.call(r,d),d.defaultPrevented||(p=r.onDismiss)==null||p.call(r))},onFocusOutside:d=>{var f,h,p;(f=r.onFocusOutside)==null||f.call(r,d),(h=r.onInteractOutside)==null||h.call(r,d),d.defaultPrevented||(p=r.onDismiss)==null||p.call(r)}},()=>t),Pm({ownerDocument:()=>ze(t),onEscapeKeyDown:d=>{var f;!t||!He.isTopMostLayer(t)||((f=r.onEscapeKeyDown)==null||f.call(r,d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),qn(()=>{if(!t)return;He.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n==null?void 0:n.registerNestedLayer(t);He.assignPointerEventToLayers(),He.disableBodyPointerEvents(t),W(()=>{t&&(He.removeLayer(t),d==null||d(),He.assignPointerEventToLayers(),He.restoreBodyPointerEvents(t))})}),H(Ce([()=>t,()=>r.disableOutsidePointerEvents],([d,f])=>{if(!d)return;const h=He.find(d);h&&h.isPointerBlocking!==f&&(h.isPointerBlocking=f,He.assignPointerEventToLayers()),f&&He.disableBodyPointerEvents(d),W(()=>{He.restoreBodyPointerEvents(d)})},{defer:!0}));const u={registerNestedLayer:s};return b(Zc.Provider,{value:u,get children(){return b(le,M({as:"div",ref(d){var f=ve(h=>t=h,r.ref);typeof f=="function"&&f(d)}},o))}})}function vt(e){var s;const[t,n]=j((s=e.defaultValue)==null?void 0:s.call(e)),r=V(()=>{var a;return((a=e.value)==null?void 0:a.call(e))!==void 0}),o=V(()=>{var a;return r()?(a=e.value)==null?void 0:a.call(e):t()});return[o,a=>{Me(()=>{var c;const l=Ag(a,o());return Object.is(l,o())||(r()||n(l),(c=e.onChange)==null||c.call(e,l)),l})}]}function Jc(e){const[t,n]=vt(e);return[()=>t()??!1,n]}function $m(e){const[t,n]=vt(e);return[()=>t()??[],n]}function Ro(e={}){const[t,n]=Jc({value:()=>A(e.open),defaultValue:()=>!!A(e.defaultOpen),onChange:s=>{var a;return(a=e.onOpenChange)==null?void 0:a.call(e,s)}}),r=()=>{n(!0)},o=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:o,toggle:()=>{t()?o():r()}}}var Zi=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},Wr=new Map,Mm=e=>{H(()=>{const t=De(e.style)??{},n=De(e.properties)??[],r={};for(const i in t)r[i]=e.element.style[i];const o=Wr.get(e.key);o?o.activeCount++:Wr.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(i=>i.key)}),Object.assign(e.element.style,e.style);for(const i of n)e.element.style.setProperty(i.key,i.value);W(()=>{var s;const i=Wr.get(e.key);if(i){if(i.activeCount!==1){i.activeCount--;return}Wr.delete(e.key);for(const[a,l]of Object.entries(i.originalStyles))e.element.style[a]=l;for(const a of i.properties)e.element.style.removeProperty(a);e.element.style.length===0&&e.element.removeAttribute("style"),(s=e.cleanup)==null||s.call(e)}})})},Sl=Mm,Fm=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},Om=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},Am=(e,t,n)=>{const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let o=e,i=0,s=0,a=!1;do{const[l,c,u]=Fm(o,t),d=u-l-r*c;(c!==0||d!==0)&&Om(o,t)&&(i+=d,s+=c),o===(n??document.documentElement)?a=!0:o=o._$host??o.parentElement}while(o&&!a);return[i,s]},[xl,Cl]=j([]),Tm=e=>xl().indexOf(e)===xl().length-1,Dm=e=>{const t=M({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=Ee();let r=[0,0],o=null,i=null;H(()=>{De(t.enabled)&&(Cl(c=>[...c,n]),W(()=>{Cl(c=>c.filter(u=>u!==n))}))}),H(()=>{if(!De(t.enabled)||!De(t.hideScrollbar))return;const{body:c}=document,u=window.innerWidth-c.offsetWidth;if(De(t.preventScrollbarShift)){const d={overflow:"hidden"},f=[];u>0&&(De(t.preventScrollbarShiftMode)==="padding"?d.paddingRight=`calc(${window.getComputedStyle(c).paddingRight} + ${u}px)`:d.marginRight=`calc(${window.getComputedStyle(c).marginRight} + ${u}px)`,f.push({key:"--scrollbar-width",value:`${u}px`}));const h=window.scrollY,p=window.scrollX;Sl({key:"prevent-scroll",element:c,style:d,properties:f,cleanup:()=>{De(t.restoreScrollPosition)&&u>0&&window.scrollTo(p,h)}})}else Sl({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),H(()=>{!Tm(n)||!De(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",s,{passive:!1}),document.addEventListener("touchmove",l,{passive:!1}),W(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",s),document.removeEventListener("touchmove",l)}))});const s=c=>{r=El(c),o=null,i=null},a=c=>{const u=c.target,d=De(t.element),f=Lm(c),h=Math.abs(f[0])>Math.abs(f[1])?"x":"y",p=h==="x"?f[0]:f[1],g=Rl(u,h,p,d);let y;d&&Zi(d,u)?y=!g:y=!0,y&&c.cancelable&&c.preventDefault()},l=c=>{const u=De(t.element),d=c.target;let f;if(c.touches.length===2)f=!De(t.allowPinchZoom);else{if(o==null||i===null){const h=El(c).map((g,y)=>r[y]-g),p=Math.abs(h[0])>Math.abs(h[1])?"x":"y";o=p,i=p==="x"?h[0]:h[1]}if(d.type==="range")f=!1;else{const h=Rl(d,o,i,u);u&&Zi(u,d)?f=!h:f=!0}}f&&c.cancelable&&c.preventDefault()}},Lm=e=>[e.deltaX,e.deltaY],El=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],Rl=(e,t,n,r)=>{const o=r!==null&&Zi(r,e),[i,s]=Am(e,t,o?r:void 0);return!(n>0&&Math.abs(i)<=1||n<0&&Math.abs(s)<1)},_m=Dm,ed=_m,km={};Ot(km,{CloseButton:()=>Vs,Content:()=>Ns,Description:()=>Ks,Dialog:()=>Vm,Overlay:()=>js,Portal:()=>zs,Root:()=>Bs,Title:()=>Hs,Trigger:()=>nd});var td=we();function vn(){const e=ye(td);if(e===void 0)throw new Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return e}function Vs(e){const t=vn(),[n,r]=_(e,["aria-label","onClick"]);return b(wt,M({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:i=>{ne(i,n.onClick),t.close()}},r))}function Ns(e){let t;const n=vn(),r=Q({id:n.generateId("content")},e),[o,i]=_(r,["ref","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,a=!1;const l=f=>{var h;(h=o.onPointerDownOutside)==null||h.call(o,f),n.modal()&&f.detail.isContextMenu&&f.preventDefault()},c=f=>{var h;(h=o.onFocusOutside)==null||h.call(o,f),n.modal()&&f.preventDefault()},u=f=>{var h;(h=o.onInteractOutside)==null||h.call(o,f),!n.modal()&&(f.defaultPrevented||(s=!0,f.detail.originalEvent.type==="pointerdown"&&(a=!0)),Pe(n.triggerRef(),f.target)&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&a&&f.preventDefault())},d=f=>{var h;(h=o.onCloseAutoFocus)==null||h.call(o,f),n.modal()?(f.preventDefault(),$e(n.triggerRef())):(f.defaultPrevented||(s||$e(n.triggerRef()),f.preventDefault()),s=!1,a=!1)};return Qc({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>t?[t]:[]}),ed({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),Xc({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:o.onOpenAutoFocus,onUnmountAutoFocus:d},()=>t),H(()=>W(n.registerContentId(i.id))),b(pe,{get when(){return n.contentPresent()},get children(){return b(Eo,M({ref(f){var h=ve(p=>{n.setContentRef(p),t=p},o.ref);typeof h=="function"&&h(f)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return V(()=>!!n.modal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},get"data-expanded"(){return n.isOpen()?"":void 0},get"data-closed"(){return n.isOpen()?void 0:""},onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,get onDismiss(){return n.close}},i))}})}function Ks(e){const t=vn(),n=Q({id:t.generateId("description")},e),[r,o]=_(n,["id"]);return H(()=>W(t.registerDescriptionId(r.id))),b(le,M({as:"p",get id(){return r.id}},o))}function js(e){const t=vn(),[n,r]=_(e,["ref","style","onPointerDown"]),o=i=>{ne(i,n.onPointerDown),i.target===i.currentTarget&&i.preventDefault()};return b(pe,{get when(){return t.overlayPresent()},get children(){return b(le,M({as:"div",ref(i){var s=ve(t.setOverlayRef,n.ref);typeof s=="function"&&s(i)},get style(){return ct({"pointer-events":"auto"},n.style)},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onPointerDown:o},r))}})}function zs(e){const t=vn();return b(pe,{get when(){return t.contentPresent()||t.overlayPresent()},get children(){return b(yo,e)}})}var Pl={dismiss:"Dismiss"};function Bs(e){const t=`dialog-${Ee()}`,n=Q({id:t,modal:!0,translations:Pl},e),[r,o]=j(),[i,s]=j(),[a,l]=j(),[c,u]=j(),[d,f]=j(),[h,p]=j(),g=Ro({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:S=>{var C;return(C=n.onOpenChange)==null?void 0:C.call(n,S)}}),y=()=>n.forceMount||g.isOpen(),{present:m}=Gn({show:y,element:()=>c()??null}),{present:v}=Gn({show:y,element:()=>d()??null}),w={translations:()=>n.translations??Pl,isOpen:g.isOpen,modal:()=>n.modal??!0,preventScroll:()=>n.preventScroll??w.modal(),contentId:r,titleId:i,descriptionId:a,triggerRef:h,overlayRef:c,setOverlayRef:u,contentRef:d,setContentRef:f,overlayPresent:m,contentPresent:v,close:g.close,toggle:g.toggle,setTriggerRef:p,generateId:dt(()=>n.id),registerContentId:Ke(o),registerTitleId:Ke(s),registerDescriptionId:Ke(l)};return b(td.Provider,{value:w,get children(){return n.children}})}function Hs(e){const t=vn(),n=Q({id:t.generateId("title")},e),[r,o]=_(n,["id"]);return H(()=>W(t.registerTitleId(r.id))),b(le,M({as:"h2",get id(){return r.id}},o))}function nd(e){const t=vn(),[n,r]=_(e,["ref","onClick"]);return b(wt,M({ref(i){var s=ve(t.setTriggerRef,n.ref);typeof s=="function"&&s(i)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return V(()=>!!t.isOpen())()?t.contentId():void 0},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onClick:i=>{ne(i,n.onClick),t.toggle()}},r))}var Vm=Object.assign(Bs,{CloseButton:Vs,Content:Ns,Description:Ks,Overlay:js,Portal:zs,Title:Hs,Trigger:nd}),rd=ie("<div>"),Nm=ie('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class=size-4><path d="M18 6l-12 12"></path><path d="M6 6l12 12">'),Km=ie("<span class=sr-only>Close");const jm=Bs,zm=_r("fixed inset-0 z-50 flex",{variants:{position:{top:"items-start",bottom:"items-end",left:"justify-start",right:"justify-end"}},defaultVariants:{position:"right"}}),Bm=e=>{const[t,n]=_(e,["position","children"]);return b(zs,M(n,{get children(){var r=rd();return X(r,()=>t.children),je(()=>Qu(r,zm({position:t.position}))),r}}))},Hm=e=>{const[t,n]=_(e,["class"]);return b(js,M({get class(){return de("fixed inset-0 z-50 bg-black/80 data-[expanded=]:animate-in data-[closed=]:animate-out data-[closed=]:fade-out-0 data-[expanded=]:fade-in-0",t.class)}},n))},Gm=_r("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[closed=]:duration-300 data-[expanded=]:duration-500 data-[expanded=]:animate-in data-[closed=]:animate-out",{variants:{position:{top:"inset-x-0 top-0 border-b data-[closed=]:slide-out-to-top data-[expanded=]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[closed=]:slide-out-to-bottom data-[expanded=]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[closed=]:slide-out-to-left data-[expanded]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[closed=]:slide-out-to-right data-[expanded=]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{position:"right"}}),Um=e=>{const[t,n]=_(e,["position","class","children"]);return b(Bm,{get position(){return t.position},get children(){return[b(Hm,{}),b(Ns,M({get class(){return de(Gm({position:t.position}),t.class,"max-h-screen overflow-y-auto")}},n,{get children(){return[V(()=>t.children),b(Vs,{class:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",get children(){return[Nm(),Km()]}})]}}))]}})},qm=e=>{const[t,n]=_(e,["class"]);return(()=>{var r=rd();return Je(r,M({get class(){return de("flex flex-col space-y-2 text-center sm:text-left",t.class)}},n),!1,!1),r})()},Wm=e=>{const[t,n]=_(e,["class"]);return b(Hs,M({get class(){return de("text-lg font-semibold text-foreground",t.class)}},n))},Xm=e=>{const[t,n]=_(e,["class"]);return b(Ks,M({get class(){return de("text-sm text-muted-foreground",t.class)}},n))},od=()=>{const[e,t]=Ah(),n=V(()=>(e==null?void 0:e.bundleId)??null),r=V(()=>(e==null?void 0:e.channel)??null),o=V(()=>(e==null?void 0:e.platform)??null);return{bundleIdFilter:n,channelFilter:r,platformFilter:o,setBundleIdFilter:i=>{t({bundleId:i??void 0})},setChannelFilter:i=>{t({channel:i??void 0})},setPlatformFilter:i=>{t({platform:i??void 0})}}};var Qm=ie("<svg stroke-width=0>");function id(e,t){const n=M(e.a,t),[r,o]=_(n,["src"]),[i,s]=j(""),a=V(()=>t.title?`${e.c}<title>${t.title}</title>`:e.c);return H(()=>s(a())),W(()=>{s("")}),(()=>{var l=Qm();return Je(l,M({get stroke(){var c;return(c=e.a)==null?void 0:c.stroke},get color(){return t.color||"currentColor"},get fill(){return t.color||"currentColor"},get style(){return{...t.style,overflow:"visible"}}},o,{get height(){return t.size||"1em"},get width(){return t.size||"1em"},xmlns:"http://www.w3.org/2000/svg",get innerHTML(){return i()}}),!0,!0),X(l,()=>Yu),l})()}function sd(e){return id({a:{viewBox:"0 0 1024 1024"},c:'<path d="M270.1 741.7c0 23.4 19.1 42.5 42.6 42.5h48.7v120.4c0 30.5 24.5 55.4 54.6 55.4 30.2 0 54.6-24.8 54.6-55.4V784.1h85v120.4c0 30.5 24.5 55.4 54.6 55.4 30.2 0 54.6-24.8 54.6-55.4V784.1h48.7c23.5 0 42.6-19.1 42.6-42.5V346.4h-486v395.3zm357.1-600.1 44.9-65c2.6-3.8 2-8.9-1.5-11.4-3.5-2.4-8.5-1.2-11.1 2.6l-46.6 67.6c-30.7-12.1-64.9-18.8-100.8-18.8-35.9 0-70.1 6.7-100.8 18.8l-46.6-67.5c-2.6-3.8-7.6-5.1-11.1-2.6-3.5 2.4-4.1 7.4-1.5 11.4l44.9 65c-71.4 33.2-121.4 96.1-127.8 169.6h486c-6.6-73.6-56.7-136.5-128-169.7zM409.5 244.1a26.9 26.9 0 1 1 26.9-26.9 26.97 26.97 0 0 1-26.9 26.9zm208.4 0a26.9 26.9 0 1 1 26.9-26.9 26.97 26.97 0 0 1-26.9 26.9zm223.4 100.7c-30.2 0-54.6 24.8-54.6 55.4v216.4c0 30.5 24.5 55.4 54.6 55.4 30.2 0 54.6-24.8 54.6-55.4V400.1c.1-30.6-24.3-55.3-54.6-55.3zm-658.6 0c-30.2 0-54.6 24.8-54.6 55.4v216.4c0 30.5 24.5 55.4 54.6 55.4 30.2 0 54.6-24.8 54.6-55.4V400.1c0-30.6-24.5-55.3-54.6-55.3z"/>'},e)}function ad(e){return id({a:{viewBox:"0 0 1024 1024"},c:'<path d="M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-105.1-305c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z"/>'},e)}var Ym=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Zm=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Jm(e){if(Intl.Locale){const n=new Intl.Locale(e).maximize().script??"";return Ym.has(n)}const t=e.split("-")[0];return Zm.has(t)}function ev(e){return Jm(e)?"rtl":"ltr"}function ld(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:ev(e)}}var Ji=ld(),mr=new Set;function Il(){Ji=ld();for(const e of mr)e(Ji)}function tv(){const[e,t]=j(Ji),n=V(()=>e());return qn(()=>{mr.size===0&&window.addEventListener("languagechange",Il),mr.add(t),W(()=>{mr.delete(t),mr.size===0&&window.removeEventListener("languagechange",Il)})}),{locale:()=>n().locale,direction:()=>n().direction}}var nv=we();function Yt(){const e=tv();return ye(nv)||e}var Uo=new Map;function rv(e){const{locale:t}=Yt(),n=V(()=>t()+(e?Object.entries(e).sort((r,o)=>r[0]<o[0]?-1:1).join():""));return V(()=>{const r=n();let o;return Uo.has(r)&&(o=Uo.get(r)),o||(o=new Intl.Collator(t(),e),Uo.set(r,o)),o})}const ov=["top","right","bottom","left"],qt=Math.min,Ge=Math.max,co=Math.round,Xr=Math.floor,mt=e=>({x:e,y:e}),iv={left:"right",right:"left",bottom:"top",top:"bottom"},sv={start:"end",end:"start"};function es(e,t,n){return Ge(e,qt(t,n))}function yn(e,t){return typeof e=="function"?e(t):e}function Wt(e){return e.split("-")[0]}function Qn(e){return e.split("-")[1]}function ud(e){return e==="x"?"y":"x"}function Gs(e){return e==="y"?"height":"width"}function gn(e){return["top","bottom"].includes(Wt(e))?"y":"x"}function Us(e){return ud(gn(e))}function av(e,t,n){n===void 0&&(n=!1);const r=Qn(e),o=Us(e),i=Gs(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=fo(s)),[s,fo(s)]}function lv(e){const t=fo(e);return[ts(e),t,ts(t)]}function ts(e){return e.replace(/start|end/g,t=>sv[t])}function uv(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function cv(e,t,n,r){const o=Qn(e);let i=uv(Wt(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(ts)))),i}function fo(e){return e.replace(/left|right|bottom|top/g,t=>iv[t])}function dv(e){return{top:0,right:0,bottom:0,left:0,...e}}function cd(e){return typeof e!="number"?dv(e):{top:e,right:e,bottom:e,left:e}}function ho(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 $l(e,t,n){let{reference:r,floating:o}=e;const i=gn(t),s=Us(t),a=Gs(s),l=Wt(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Qn(t)){case"start":h[s]-=f*(n&&c?-1:1);break;case"end":h[s]+=f*(n&&c?-1:1);break}return h}const fv=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:u,y:d}=$l(c,r,l),f=r,h={},p=0;for(let g=0;g<a.length;g++){const{name:y,fn:m}=a[g],{x:v,y:w,data:S,reset:C}=await m({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});u=v??u,d=w??d,h={...h,[y]:{...h[y],...S}},C&&p<=50&&(p++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(c=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:u,y:d}=$l(c,f,l)),g=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function Ir(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:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=yn(t,e),p=cd(h),y=a[f?d==="floating"?"reference":"floating":d],m=ho(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),v=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},C=ho(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:w,strategy:l}):v);return{top:(m.top-C.top+p.top)/S.y,bottom:(C.bottom-m.bottom+p.bottom)/S.y,left:(m.left-C.left+p.left)/S.x,right:(C.right-m.right+p.right)/S.x}}const hv=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:u=0}=yn(e,t)||{};if(c==null)return{};const d=cd(u),f={x:n,y:r},h=Us(o),p=Gs(h),g=await s.getDimensions(c),y=h==="y",m=y?"top":"left",v=y?"bottom":"right",w=y?"clientHeight":"clientWidth",S=i.reference[p]+i.reference[h]-f[h]-i.floating[p],C=f[h]-i.reference[h],O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let L=O?O[w]:0;(!L||!await(s.isElement==null?void 0:s.isElement(O)))&&(L=a.floating[w]||i.floating[p]);const k=S/2-C/2,T=L/2-g[p]/2-1,K=qt(d[m],T),N=qt(d[v],T),B=K,oe=L-g[p]-N,P=L/2-g[p]/2+k,E=es(B,P,oe),x=!l.arrow&&Qn(o)!=null&&P!==E&&i.reference[p]/2-(P<B?K:N)-g[p]/2<0,I=x?P<B?P-B:P-oe:0;return{[h]:f[h]+I,data:{[h]:E,centerOffset:P-E-I,...x&&{alignmentOffset:I}},reset:x}}}),gv=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:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...y}=yn(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const m=Wt(o),v=gn(a),w=Wt(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=f||(w||!g?[fo(a)]:lv(a)),O=p!=="none";!f&&O&&C.push(...cv(a,g,p,S));const L=[a,...C],k=await Ir(t,y),T=[];let K=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&T.push(k[m]),d){const P=av(o,s,S);T.push(k[P[0]],k[P[1]])}if(K=[...K,{placement:o,overflows:T}],!T.every(P=>P<=0)){var N,B;const P=(((N=i.flip)==null?void 0:N.index)||0)+1,E=L[P];if(E)return{data:{index:P,overflows:K},reset:{placement:E}};let x=(B=K.filter(I=>I.overflows[0]<=0).sort((I,$)=>I.overflows[1]-$.overflows[1])[0])==null?void 0:B.placement;if(!x)switch(h){case"bestFit":{var oe;const I=(oe=K.filter($=>{if(O){const F=gn($.placement);return F===v||F==="y"}return!0}).map($=>[$.placement,$.overflows.filter(F=>F>0).reduce((F,D)=>F+D,0)]).sort(($,F)=>$[1]-F[1])[0])==null?void 0:oe[0];I&&(x=I);break}case"initialPlacement":x=a;break}if(o!==x)return{reset:{placement:x}}}return{}}}};function Ml(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Fl(e){return ov.some(t=>e[t]>=0)}const pv=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=yn(e,t);switch(r){case"referenceHidden":{const i=await Ir(t,{...o,elementContext:"reference"}),s=Ml(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Fl(s)}}}case"escaped":{const i=await Ir(t,{...o,altBoundary:!0}),s=Ml(i,n.floating);return{data:{escapedOffsets:s,escaped:Fl(s)}}}default:return{}}}}};async function mv(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Wt(n),a=Qn(n),l=gn(n)==="y",c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=yn(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const vv=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 mv(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}}}}},yv=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:y=>{let{x:m,y:v}=y;return{x:m,y:v}}},...l}=yn(e,t),c={x:n,y:r},u=await Ir(t,l),d=gn(Wt(o)),f=ud(d);let h=c[f],p=c[d];if(i){const y=f==="y"?"top":"left",m=f==="y"?"bottom":"right",v=h+u[y],w=h-u[m];h=es(v,h,w)}if(s){const y=d==="y"?"top":"left",m=d==="y"?"bottom":"right",v=p+u[y],w=p-u[m];p=es(v,p,w)}const g=a.fn({...t,[f]:h,[d]:p});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:i,[d]:s}}}}}},wv=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}=yn(e,t),u=await Ir(t,c),d=Wt(o),f=Qn(o),h=gn(o)==="y",{width:p,height:g}=i.floating;let y,m;d==="top"||d==="bottom"?(y=d,m=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(m=d,y=f==="end"?"top":"bottom");const v=g-u.top-u.bottom,w=p-u.left-u.right,S=qt(g-u[y],v),C=qt(p-u[m],w),O=!t.middlewareData.shift;let L=S,k=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(L=v),O&&!f){const K=Ge(u.left,0),N=Ge(u.right,0),B=Ge(u.top,0),oe=Ge(u.bottom,0);h?k=p-2*(K!==0||N!==0?K+N:Ge(u.left,u.right)):L=g-2*(B!==0||oe!==0?B+oe:Ge(u.top,u.bottom))}await l({...t,availableWidth:k,availableHeight:L});const T=await s.getDimensions(a.floating);return p!==T.width||g!==T.height?{reset:{rects:!0}}:{}}}};function Po(){return typeof window<"u"}function Yn(e){return dd(e)?(e.nodeName||"").toLowerCase():"#document"}function qe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function bt(e){var t;return(t=(dd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dd(e){return Po()?e instanceof Node||e instanceof qe(e).Node:!1}function lt(e){return Po()?e instanceof Element||e instanceof qe(e).Element:!1}function yt(e){return Po()?e instanceof HTMLElement||e instanceof qe(e).HTMLElement:!1}function Ol(e){return!Po()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qe(e).ShadowRoot}function kr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ut(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function bv(e){return["table","td","th"].includes(Yn(e))}function Io(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function qs(e){const t=Ws(),n=lt(e)?ut(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Sv(e){let t=Xt(e);for(;yt(t)&&!Un(t);){if(qs(t))return t;if(Io(t))return null;t=Xt(t)}return null}function Ws(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Un(e){return["html","body","#document"].includes(Yn(e))}function ut(e){return qe(e).getComputedStyle(e)}function $o(e){return lt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xt(e){if(Yn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ol(e)&&e.host||bt(e);return Ol(t)?t.host:t}function fd(e){const t=Xt(e);return Un(t)?e.ownerDocument?e.ownerDocument.body:e.body:yt(t)&&kr(t)?t:fd(t)}function $r(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=fd(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=qe(o);if(i){const a=ns(s);return t.concat(s,s.visualViewport||[],kr(o)?o:[],a&&n?$r(a):[])}return t.concat(o,$r(o,[],n))}function ns(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function hd(e){const t=ut(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=yt(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=co(n)!==i||co(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Xs(e){return lt(e)?e:e.contextElement}function Mn(e){const t=Xs(e);if(!yt(t))return mt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=hd(t);let s=(i?co(n.width):n.width)/r,a=(i?co(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const xv=mt(0);function gd(e){const t=qe(e);return!Ws()||!t.visualViewport?xv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Cv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qe(e)?!1:t}function pn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Xs(e);let s=mt(1);t&&(r?lt(r)&&(s=Mn(r)):s=Mn(e));const a=Cv(i,n,r)?gd(i):mt(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const f=qe(i),h=r&<(r)?qe(r):r;let p=f,g=ns(p);for(;g&&r&&h!==p;){const y=Mn(g),m=g.getBoundingClientRect(),v=ut(g),w=m.left+(g.clientLeft+parseFloat(v.paddingLeft))*y.x,S=m.top+(g.clientTop+parseFloat(v.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=w,c+=S,p=qe(g),g=ns(p)}}return ho({width:u,height:d,x:l,y:c})}function Qs(e,t){const n=$o(e).scrollLeft;return t?t.left+n:pn(bt(e)).left+n}function pd(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Qs(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function Ev(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=bt(r),a=t?Io(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=mt(1);const u=mt(0),d=yt(r);if((d||!d&&!i)&&((Yn(r)!=="body"||kr(s))&&(l=$o(r)),yt(r))){const h=pn(r);c=Mn(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const f=s&&!d&&!i?pd(s,l,!0):mt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function Rv(e){return Array.from(e.getClientRects())}function Pv(e){const t=bt(e),n=$o(e),r=e.ownerDocument.body,o=Ge(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Ge(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Qs(e);const a=-n.scrollTop;return ut(r).direction==="rtl"&&(s+=Ge(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function Iv(e,t){const n=qe(e),r=bt(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=Ws();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function $v(e,t){const n=pn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=yt(e)?Mn(e):mt(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 Al(e,t,n){let r;if(t==="viewport")r=Iv(e,n);else if(t==="document")r=Pv(bt(e));else if(lt(t))r=$v(t,n);else{const o=gd(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ho(r)}function md(e,t){const n=Xt(e);return n===t||!lt(n)||Un(n)?!1:ut(n).position==="fixed"||md(n,t)}function Mv(e,t){const n=t.get(e);if(n)return n;let r=$r(e,[],!1).filter(a=>lt(a)&&Yn(a)!=="body"),o=null;const i=ut(e).position==="fixed";let s=i?Xt(e):e;for(;lt(s)&&!Un(s);){const a=ut(s),l=qs(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||kr(s)&&!l&&md(e,s))?r=r.filter(u=>u!==s):o=a,s=Xt(s)}return t.set(e,r),r}function Fv(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Io(t)?[]:Mv(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=Al(t,u,o);return c.top=Ge(d.top,c.top),c.right=qt(d.right,c.right),c.bottom=qt(d.bottom,c.bottom),c.left=Ge(d.left,c.left),c},Al(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ov(e){const{width:t,height:n}=hd(e);return{width:t,height:n}}function Av(e,t,n){const r=yt(t),o=bt(t),i=n==="fixed",s=pn(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=mt(0);if(r||!r&&!i)if((Yn(t)!=="body"||kr(o))&&(a=$o(t)),r){const f=pn(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=Qs(o));const c=o&&!r&&!i?pd(o,a):mt(0),u=s.left+a.scrollLeft-l.x-c.x,d=s.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:s.width,height:s.height}}function qo(e){return ut(e).position==="static"}function Tl(e,t){if(!yt(e)||ut(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return bt(e)===n&&(n=n.ownerDocument.body),n}function vd(e,t){const n=qe(e);if(Io(e))return n;if(!yt(e)){let o=Xt(e);for(;o&&!Un(o);){if(lt(o)&&!qo(o))return o;o=Xt(o)}return n}let r=Tl(e,t);for(;r&&bv(r)&&qo(r);)r=Tl(r,t);return r&&Un(r)&&qo(r)&&!qs(r)?n:r||Sv(e)||n}const Tv=async function(e){const t=this.getOffsetParent||vd,n=this.getDimensions,r=await n(e.floating);return{reference:Av(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Dv(e){return ut(e).direction==="rtl"}const yd={convertOffsetParentRelativeRectToViewportRelativeRect:Ev,getDocumentElement:bt,getClippingRect:Fv,getOffsetParent:vd,getElementRects:Tv,getClientRects:Rv,getDimensions:Ov,getScale:Mn,isElement:lt,isRTL:Dv};function Lv(e,t){let n=null,r;const o=bt(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{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=Xr(u),p=Xr(o.clientWidth-(c+d)),g=Xr(o.clientHeight-(u+f)),y=Xr(c),v={rootMargin:-h+"px "+-p+"px "+-g+"px "+-y+"px",threshold:Ge(0,qt(1,l))||1};let w=!0;function S(C){const O=C[0].intersectionRatio;if(O!==l){if(!w)return s();O?s(!1,O):r=setTimeout(()=>{s(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(S,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(e)}return s(!0),i}function _v(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=Xs(e),u=o||i?[...c?$r(c):[],...$r(t)]:[];u.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),i&&m.addEventListener("resize",n)});const d=c&&a?Lv(c,n):null;let f=-1,h=null;s&&(h=new ResizeObserver(m=>{let[v]=m;v&&v.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,g=l?pn(e):null;l&&y();function y(){const m=pn(e);g&&(m.x!==g.x||m.y!==g.y||m.width!==g.width||m.height!==g.height)&&n(),g=m,p=requestAnimationFrame(y)}return n(),()=>{var m;u.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),d==null||d(),(m=h)==null||m.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const kv=vv,Vv=yv,Nv=gv,Kv=wv,jv=pv,zv=hv,Bv=(e,t,n)=>{const r=new Map,o={platform:yd,...n},i={...o.platform,_c:r};return fv(e,t,{...o,platform:i})};var Hv=ie('<svg display=block viewBox="0 0 30 30"style=transform:scale(1.02)><g><path fill=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z></path><path stroke=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z>'),Ys=we();function Zs(){const e=ye(Ys);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var rs=30,Dl=rs/2,Gv={top:180,right:-90,bottom:0,left:90};function Mo(e){const t=Zs(),n=Q({size:rs},e),[r,o]=_(n,["ref","style","size"]),i=()=>t.currentPlacement().split("-")[0],s=Uv(t.contentRef),a=()=>{var f;return((f=s())==null?void 0:f.getPropertyValue("background-color"))||"none"},l=()=>{var f;return((f=s())==null?void 0:f.getPropertyValue(`border-${i()}-color`))||"none"},c=()=>{var f;return((f=s())==null?void 0:f.getPropertyValue(`border-${i()}-width`))||"0px"},u=()=>Number.parseInt(c())*2*(rs/r.size),d=()=>`rotate(${Gv[i()]} ${Dl} ${Dl}) translate(0 2)`;return b(le,M({as:"div",ref(f){var h=ve(t.setArrowRef,r.ref);typeof h=="function"&&h(f)},"aria-hidden":"true",get style(){return ct({position:"absolute","font-size":`${r.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:a(),stroke:l(),"stroke-width":u()},r.style)}},o,{get children(){var f=Hv(),h=f.firstChild,p=h.firstChild;return p.nextSibling,je(()=>Bn(h,"transform",d())),f}}))}function Uv(e){const[t,n]=j();return H(()=>{const r=e();r&&n(xs(r).getComputedStyle(r))}),t}function qv(e){const t=Zs(),[n,r]=_(e,["ref","style"]);return b(le,M({as:"div",ref(o){var i=ve(t.setPositionerRef,n.ref);typeof i=="function"&&i(o)},"data-popper-positioner":"",get style(){return ct({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function Ll(e){const{x:t=0,y:n=0,width:r=0,height:o=0}=e??{};if(typeof DOMRect=="function")return new DOMRect(t,n,r,o);const i={x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:n+o,left:t};return{...i,toJSON:()=>i}}function Wv(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?Ll(r):e?e.getBoundingClientRect():Ll()}}}function Xv(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var Qv={top:"bottom",right:"left",bottom:"top",left:"right"};function Yv(e,t){const[n,r]=e.split("-"),o=Qv[n];return r?n==="left"||n==="right"?`${o} ${r==="start"?"top":"bottom"}`:r==="start"?`${o} ${t==="rtl"?"right":"left"}`:`${o} ${t==="rtl"?"left":"right"}`:`${o} center`}function Zv(e){const t=Q({getAnchorRect:f=>f==null?void 0:f.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=j(),[o,i]=j(),[s,a]=j(t.placement),l=()=>{var f;return Wv((f=t.anchorRef)==null?void 0:f.call(t),t.getAnchorRect)},{direction:c}=Yt();async function u(){var O,L;const f=l(),h=n(),p=o();if(!f||!h)return;const g=((p==null?void 0:p.clientHeight)||0)/2,y=typeof t.gutter=="number"?t.gutter+g:t.gutter??g;h.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),f.getBoundingClientRect();const m=[kv(({placement:k})=>{const T=!!k.split("-")[1];return{mainAxis:y,crossAxis:T?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const k=typeof t.flip=="string"?t.flip.split(" "):void 0;if(k!==void 0&&!k.every(Xv))throw new Error("`flip` expects a spaced-delimited list of placements");m.push(Nv({padding:t.overflowPadding,fallbackPlacements:k}))}(t.slide||t.overlap)&&m.push(Vv({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),m.push(Kv({padding:t.overflowPadding,apply({availableWidth:k,availableHeight:T,rects:K}){const N=Math.round(K.reference.width);k=Math.floor(k),T=Math.floor(T),h.style.setProperty("--kb-popper-anchor-width",`${N}px`),h.style.setProperty("--kb-popper-content-available-width",`${k}px`),h.style.setProperty("--kb-popper-content-available-height",`${T}px`),t.sameWidth&&(h.style.width=`${N}px`),t.fitViewport&&(h.style.maxWidth=`${k}px`,h.style.maxHeight=`${T}px`)}})),t.hideWhenDetached&&m.push(jv({padding:t.detachedPadding})),p&&m.push(zv({element:p,padding:t.arrowPadding}));const v=await Bv(f,h,{placement:t.placement,strategy:"absolute",middleware:m,platform:{...yd,isRTL:()=>c()==="rtl"}});if(a(v.placement),(O=t.onCurrentPlacementChange)==null||O.call(t,v.placement),!h)return;h.style.setProperty("--kb-popper-content-transform-origin",Yv(v.placement,c()));const w=Math.round(v.x),S=Math.round(v.y);let C;if(t.hideWhenDetached&&(C=(L=v.middlewareData.hide)!=null&&L.referenceHidden?"hidden":"visible"),Object.assign(h.style,{top:"0",left:"0",transform:`translate3d(${w}px, ${S}px, 0)`,visibility:C}),p&&v.middlewareData.arrow){const{x:k,y:T}=v.middlewareData.arrow,K=v.placement.split("-")[0];Object.assign(p.style,{left:k!=null?`${k}px`:"",top:T!=null?`${T}px`:"",[K]:"100%"})}}H(()=>{const f=l(),h=n();if(!f||!h)return;const p=_v(f,h,u,{elementResize:typeof ResizeObserver=="function"});W(p)}),H(()=>{var p;const f=n(),h=(p=t.contentRef)==null?void 0:p.call(t);!f||!h||queueMicrotask(()=>{f.style.zIndex=getComputedStyle(h).zIndex})});const d={currentPlacement:s,contentRef:()=>{var f;return(f=t.contentRef)==null?void 0:f.call(t)},setPositionerRef:r,setArrowRef:i};return b(Ys.Provider,{value:d,get children(){return t.children}})}var Zn=Object.assign(Zv,{Arrow:Mo,Context:Ys,usePopperContext:Zs,Positioner:qv}),Jv={};Ot(Jv,{Arrow:()=>Mo,Content:()=>ea,Portal:()=>ta,Root:()=>na,Tooltip:()=>ny,Trigger:()=>ra});var wd=we();function Js(){const e=ye(wd);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function ea(e){const t=Js(),n=Q({id:t.generateId("content")},e),[r,o]=_(n,["ref","style"]);return H(()=>W(t.registerContentId(o.id))),b(pe,{get when(){return t.contentPresent()},get children(){return b(Zn.Positioner,{get children(){return b(Eo,M({ref(i){var s=ve(a=>{t.setContentRef(a)},r.ref);typeof s=="function"&&s(i)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return ct({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onFocusOutside:i=>i.preventDefault(),onDismiss:()=>t.hideTooltip(!0)},()=>t.dataset(),o))}})}})}function ta(e){const t=Js();return b(pe,{get when(){return t.contentPresent()},get children(){return b(yo,e)}})}function ey(e,t,n){const r=e.split("-")[0],o=t.getBoundingClientRect(),i=n.getBoundingClientRect(),s=[],a=o.left+o.width/2,l=o.top+o.height/2;switch(r){case"top":s.push([o.left,l]),s.push([i.left,i.bottom]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([o.right,l]);break;case"right":s.push([a,o.top]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]),s.push([a,o.bottom]);break;case"bottom":s.push([o.left,l]),s.push([i.left,i.top]),s.push([i.left,i.bottom]),s.push([i.right,i.bottom]),s.push([i.right,i.top]),s.push([o.right,l]);break;case"left":s.push([a,o.top]),s.push([i.right,i.top]),s.push([i.left,i.top]),s.push([i.left,i.bottom]),s.push([i.right,i.bottom]),s.push([a,o.bottom]);break}return s}var Jt={},ty=0,bn=!1,Ct,ar,Sn;function na(e){const t=`tooltip-${Ee()}`,n=`${++ty}`,r=Q({id:t,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[o,i]=_(r,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount"]);let s;const[a,l]=j(),[c,u]=j(),[d,f]=j(),[h,p]=j(i.placement),g=Ro({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:P=>{var E;return(E=o.onOpenChange)==null?void 0:E.call(o,P)}}),{present:y}=Gn({show:()=>o.forceMount||g.isOpen(),element:()=>d()??null}),m=()=>{Jt[n]=w},v=()=>{for(const P in Jt)P!==n&&(Jt[P](!0),delete Jt[P])},w=(P=!1)=>{P||o.closeDelay&&o.closeDelay<=0?(window.clearTimeout(s),s=void 0,g.close()):s||(s=window.setTimeout(()=>{s=void 0,g.close()},o.closeDelay)),window.clearTimeout(Ct),Ct=void 0,o.skipDelayDuration&&o.skipDelayDuration>=0&&(Sn=window.setTimeout(()=>{window.clearTimeout(Sn),Sn=void 0},o.skipDelayDuration)),bn&&(window.clearTimeout(ar),ar=window.setTimeout(()=>{delete Jt[n],ar=void 0,bn=!1},o.closeDelay))},S=()=>{clearTimeout(s),s=void 0,v(),m(),bn=!0,g.open(),window.clearTimeout(Ct),Ct=void 0,window.clearTimeout(ar),ar=void 0,window.clearTimeout(Sn),Sn=void 0},C=()=>{v(),m(),!g.isOpen()&&!Ct&&!bn?Ct=window.setTimeout(()=>{Ct=void 0,bn=!0,S()},o.openDelay):g.isOpen()||S()},O=(P=!1)=>{!P&&o.openDelay&&o.openDelay>0&&!s&&!Sn?C():S()},L=()=>{window.clearTimeout(Ct),Ct=void 0,bn=!1},k=()=>{window.clearTimeout(s),s=void 0},T=P=>Pe(c(),P)||Pe(d(),P),K=P=>{const E=c(),x=d();if(!(!E||!x))return ey(P,E,x)},N=P=>{const E=P.target;if(T(E)){k();return}if(!o.ignoreSafeArea){const x=K(h());if(x&&Ac(tp(P),x)){k();return}}s||w()};H(()=>{if(!g.isOpen())return;const P=ze();P.addEventListener("pointermove",N,!0),W(()=>{P.removeEventListener("pointermove",N,!0)})}),H(()=>{const P=c();if(!P||!g.isOpen())return;const E=I=>{const $=I.target;Pe($,P)&&w(!0)},x=xs();x.addEventListener("scroll",E,{capture:!0}),W(()=>{x.removeEventListener("scroll",E,{capture:!0})})}),W(()=>{clearTimeout(s),Jt[n]&&delete Jt[n]});const oe={dataset:V(()=>({"data-expanded":g.isOpen()?"":void 0,"data-closed":g.isOpen()?void 0:""})),isOpen:g.isOpen,isDisabled:()=>o.disabled??!1,triggerOnFocusOnly:()=>o.triggerOnFocusOnly??!1,contentId:a,contentPresent:y,openTooltip:O,hideTooltip:w,cancelOpening:L,generateId:dt(()=>r.id),registerContentId:Ke(l),isTargetOnTooltip:T,setTriggerRef:u,setContentRef:f};return b(wd.Provider,{value:oe,get children(){return b(Zn,M({anchorRef:c,contentRef:d,onCurrentPlacementChange:p},i))}})}function ra(e){let t;const n=Js(),[r,o]=_(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]);let i=!1,s=!1,a=!1;const l=()=>{i=!1},c=()=>{!n.isOpen()&&(s||a)&&n.openTooltip(a)},u=m=>{n.isOpen()&&!s&&!a&&n.hideTooltip(m)},d=m=>{ne(m,r.onPointerEnter),!(m.pointerType==="touch"||n.triggerOnFocusOnly()||n.isDisabled()||m.defaultPrevented)&&(s=!0,c())},f=m=>{ne(m,r.onPointerLeave),m.pointerType!=="touch"&&(s=!1,a=!1,n.isOpen()?u():n.cancelOpening())},h=m=>{ne(m,r.onPointerDown),i=!0,ze(t).addEventListener("pointerup",l,{once:!0})},p=m=>{ne(m,r.onClick),s=!1,a=!1,u(!0)},g=m=>{ne(m,r.onFocus),!(n.isDisabled()||m.defaultPrevented||i)&&(a=!0,c())},y=m=>{ne(m,r.onBlur);const v=m.relatedTarget;n.isTargetOnTooltip(v)||(s=!1,a=!1,u(!0))};return W(()=>{ze(t).removeEventListener("pointerup",l)}),b(le,M({as:"button",ref(m){var v=ve(w=>{n.setTriggerRef(w),t=w},r.ref);typeof v=="function"&&v(m)},get"aria-describedby"(){return V(()=>!!n.isOpen())()?n.contentId():void 0},onPointerEnter:d,onPointerLeave:f,onPointerDown:h,onClick:p,onFocus:g,onBlur:y},()=>n.dataset(),o))}var ny=Object.assign(na,{Arrow:Mo,Content:ea,Portal:ta,Trigger:ra});const _l=ra,kl=e=>b(na,M({gutter:4},e)),Vl=e=>{const[t,n]=_(e,["class"]);return b(ta,{get children(){return b(ea,M({get class(){return de("z-50 origin-[var(--kb-popover-content-transform-origin)] overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95",t.class)}},n))}})},ry=e=>{const t=e.split("-").join("").slice(0,12);return Number.parseInt(t,16)};function bd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var oo={exports:{}},oy=oo.exports,Nl;function iy(){return Nl||(Nl=1,function(e,t){(function(n,r){e.exports=r()})(oy,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",s="second",a="minute",l="hour",c="day",u="week",d="month",f="quarter",h="year",p="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(P){var E=["th","st","nd","rd"],x=P%100;return"["+P+(E[(x-20)%10]||E[x]||E[0])+"]"}},w=function(P,E,x){var I=String(P);return!I||I.length>=E?P:""+Array(E+1-I.length).join(x)+P},S={s:w,z:function(P){var E=-P.utcOffset(),x=Math.abs(E),I=Math.floor(x/60),$=x%60;return(E<=0?"+":"-")+w(I,2,"0")+":"+w($,2,"0")},m:function P(E,x){if(E.date()<x.date())return-P(x,E);var I=12*(x.year()-E.year())+(x.month()-E.month()),$=E.clone().add(I,d),F=x-$<0,D=E.clone().add(I+(F?-1:1),d);return+(-(I+(x-$)/(F?$-D:D-$))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:d,y:h,w:u,d:c,D:p,h:l,m:a,s,ms:i,Q:f}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},C="en",O={};O[C]=v;var L="$isDayjsObject",k=function(P){return P instanceof B||!(!P||!P[L])},T=function P(E,x,I){var $;if(!E)return C;if(typeof E=="string"){var F=E.toLowerCase();O[F]&&($=F),x&&(O[F]=x,$=F);var D=E.split("-");if(!$&&D.length>1)return P(D[0])}else{var z=E.name;O[z]=E,$=z}return!I&&$&&(C=$),$||!I&&C},K=function(P,E){if(k(P))return P.clone();var x=typeof E=="object"?E:{};return x.date=P,x.args=arguments,new B(x)},N=S;N.l=T,N.i=k,N.w=function(P,E){return K(P,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var B=function(){function P(x){this.$L=T(x.locale,null,!0),this.parse(x),this.$x=this.$x||x.x||{},this[L]=!0}var E=P.prototype;return E.parse=function(x){this.$d=function(I){var $=I.date,F=I.utc;if($===null)return new Date(NaN);if(N.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var D=$.match(y);if(D){var z=D[2]-1||0,U=(D[7]||"0").substring(0,3);return F?new Date(Date.UTC(D[1],z,D[3]||1,D[4]||0,D[5]||0,D[6]||0,U)):new Date(D[1],z,D[3]||1,D[4]||0,D[5]||0,D[6]||0,U)}}return new Date($)}(x),this.init()},E.init=function(){var x=this.$d;this.$y=x.getFullYear(),this.$M=x.getMonth(),this.$D=x.getDate(),this.$W=x.getDay(),this.$H=x.getHours(),this.$m=x.getMinutes(),this.$s=x.getSeconds(),this.$ms=x.getMilliseconds()},E.$utils=function(){return N},E.isValid=function(){return this.$d.toString()!==g},E.isSame=function(x,I){var $=K(x);return this.startOf(I)<=$&&$<=this.endOf(I)},E.isAfter=function(x,I){return K(x)<this.startOf(I)},E.isBefore=function(x,I){return this.endOf(I)<K(x)},E.$g=function(x,I,$){return N.u(x)?this[I]:this.set($,x)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(x,I){var $=this,F=!!N.u(I)||I,D=N.p(x),z=function(Fe,Ie){var Tt=N.w($.$u?Date.UTC($.$y,Ie,Fe):new Date($.$y,Ie,Fe),$);return F?Tt:Tt.endOf(c)},U=function(Fe,Ie){return N.w($.toDate()[Fe].apply($.toDate("s"),(F?[0,0,0,0]:[23,59,59,999]).slice(Ie)),$)},Y=this.$W,ce=this.$M,se=this.$D,Oe="set"+(this.$u?"UTC":"");switch(D){case h:return F?z(1,0):z(31,11);case d:return F?z(1,ce):z(0,ce+1);case u:var et=this.$locale().weekStart||0,re=(Y<et?Y+7:Y)-et;return z(F?se-re:se+(6-re),ce);case c:case p:return U(Oe+"Hours",0);case l:return U(Oe+"Minutes",1);case a:return U(Oe+"Seconds",2);case s:return U(Oe+"Milliseconds",3);default:return this.clone()}},E.endOf=function(x){return this.startOf(x,!1)},E.$set=function(x,I){var $,F=N.p(x),D="set"+(this.$u?"UTC":""),z=($={},$[c]=D+"Date",$[p]=D+"Date",$[d]=D+"Month",$[h]=D+"FullYear",$[l]=D+"Hours",$[a]=D+"Minutes",$[s]=D+"Seconds",$[i]=D+"Milliseconds",$)[F],U=F===c?this.$D+(I-this.$W):I;if(F===d||F===h){var Y=this.clone().set(p,1);Y.$d[z](U),Y.init(),this.$d=Y.set(p,Math.min(this.$D,Y.daysInMonth())).$d}else z&&this.$d[z](U);return this.init(),this},E.set=function(x,I){return this.clone().$set(x,I)},E.get=function(x){return this[N.p(x)]()},E.add=function(x,I){var $,F=this;x=Number(x);var D=N.p(I),z=function(ce){var se=K(F);return N.w(se.date(se.date()+Math.round(ce*x)),F)};if(D===d)return this.set(d,this.$M+x);if(D===h)return this.set(h,this.$y+x);if(D===c)return z(1);if(D===u)return z(7);var U=($={},$[a]=r,$[l]=o,$[s]=n,$)[D]||1,Y=this.$d.getTime()+x*U;return N.w(Y,this)},E.subtract=function(x,I){return this.add(-1*x,I)},E.format=function(x){var I=this,$=this.$locale();if(!this.isValid())return $.invalidDate||g;var F=x||"YYYY-MM-DDTHH:mm:ssZ",D=N.z(this),z=this.$H,U=this.$m,Y=this.$M,ce=$.weekdays,se=$.months,Oe=$.meridiem,et=function(Ie,Tt,nr,zr){return Ie&&(Ie[Tt]||Ie(I,F))||nr[Tt].slice(0,zr)},re=function(Ie){return N.s(z%12||12,Ie,"0")},Fe=Oe||function(Ie,Tt,nr){var zr=Ie<12?"AM":"PM";return nr?zr.toLowerCase():zr};return F.replace(m,function(Ie,Tt){return Tt||function(nr){switch(nr){case"YY":return String(I.$y).slice(-2);case"YYYY":return N.s(I.$y,4,"0");case"M":return Y+1;case"MM":return N.s(Y+1,2,"0");case"MMM":return et($.monthsShort,Y,se,3);case"MMMM":return et(se,Y);case"D":return I.$D;case"DD":return N.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return et($.weekdaysMin,I.$W,ce,2);case"ddd":return et($.weekdaysShort,I.$W,ce,3);case"dddd":return ce[I.$W];case"H":return String(z);case"HH":return N.s(z,2,"0");case"h":return re(1);case"hh":return re(2);case"a":return Fe(z,U,!0);case"A":return Fe(z,U,!1);case"m":return String(U);case"mm":return N.s(U,2,"0");case"s":return String(I.$s);case"ss":return N.s(I.$s,2,"0");case"SSS":return N.s(I.$ms,3,"0");case"Z":return D}return null}(Ie)||D.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(x,I,$){var F,D=this,z=N.p(I),U=K(x),Y=(U.utcOffset()-this.utcOffset())*r,ce=this-U,se=function(){return N.m(D,U)};switch(z){case h:F=se()/12;break;case d:F=se();break;case f:F=se()/3;break;case u:F=(ce-Y)/6048e5;break;case c:F=(ce-Y)/864e5;break;case l:F=ce/o;break;case a:F=ce/r;break;case s:F=ce/n;break;default:F=ce}return $?F:N.a(F)},E.daysInMonth=function(){return this.endOf(d).$D},E.$locale=function(){return O[this.$L]},E.locale=function(x,I){if(!x)return this.$L;var $=this.clone(),F=T(x,I,!0);return F&&($.$L=F),$},E.clone=function(){return N.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},P}(),oe=B.prototype;return K.prototype=oe,[["$ms",i],["$s",s],["$m",a],["$H",l],["$W",c],["$M",d],["$y",h],["$D",p]].forEach(function(P){oe[P[1]]=function(E){return this.$g(E,P[0],P[1])}}),K.extend=function(P,E){return P.$i||(P(E,B,K),P.$i=!0),K},K.locale=T,K.isDayjs=k,K.unix=function(P){return K(1e3*P)},K.en=O[C],K.Ls=O,K.p={},K})}(oo)),oo.exports}var sy=iy();const ay=bd(sy);/**
|
|
2
|
+
* @license lucide-solid v0.454.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/var ly={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},xn=ly,uy=ie("<svg>"),cy=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),dy=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),fy=e=>{const[t,n]=_(e,["color","size","strokeWidth","children","class","name","iconNode","absoluteStrokeWidth"]);return(()=>{var r=uy();return Je(r,M(xn,{get width(){return t.size??xn.width},get height(){return t.size??xn.height},get stroke(){return t.color??xn.stroke},get"stroke-width"(){return V(()=>!!t.absoluteStrokeWidth)()?Number(t.strokeWidth??xn["stroke-width"])*24/Number(t.size):Number(t.strokeWidth??xn["stroke-width"])},get class(){return dy("lucide","lucide-icon",t.name!=null?`lucide-${cy(t==null?void 0:t.name)}`:void 0,t.class!=null?t.class:"")}},n),!0,!0),X(r,b(rt,{get each(){return t.iconNode},children:([o,i])=>b(Ju,M({component:o},i))})),r})()},Vr=fy,hy=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],gy=e=>b(Vr,M(e,{name:"Check",iconNode:hy})),Kl=gy,py=[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]],my=e=>b(Vr,M(e,{name:"Fingerprint",iconNode:py})),vy=my,yy=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],wy=e=>b(Vr,M(e,{name:"LoaderCircle",iconNode:yy})),by=wy,Sy=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],xy=e=>b(Vr,M(e,{name:"Package",iconNode:Sy})),Cy=xy,Ey=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ry=e=>b(Vr,M(e,{name:"X",iconNode:Ey})),jl=Ry,zl=ie("<p>"),Py=ie('<div class="flex flex-row items-center">iOS'),Iy=ie('<div class="flex flex-row items-center">Android'),lr=ie('<div class="flex flex-row items-center">'),$y=ie('<span class="ml-2 text-muted-foreground">(<!>)');const My=[{accessorKey:"id",header:"ID",cell:e=>b(kl,{openDelay:0,closeDelay:0,get children(){return[b(_l,{get children(){return e.row.original.id.slice(-12)}}),b(Vl,{get children(){var t=zl();return X(t,()=>e.row.original.id),t}})]}})},{accessorKey:"channel",header:"Channel",cell:e=>e.getValue()},{accessorKey:"platform",header:"Platform",cell:e=>{switch(e.getValue()){case"ios":return(()=>{var t=Py(),n=t.firstChild;return X(t,b(ad,{class:"mr-2",size:16}),n),t})();case"android":return(()=>{var t=Iy(),n=t.firstChild;return X(t,b(sd,{class:"mr-2",size:16,color:"#3DDC84"}),n),t})()}}},{header:"Target",cell:e=>e.row.original.targetAppVersion?(()=>{var t=lr();return X(t,b(Cy,{class:"mr-2",size:16}),null),X(t,()=>e.row.original.targetAppVersion,null),t})():e.row.original.fingerprintHash?b(kl,{openDelay:0,closeDelay:0,get children(){return[b(_l,{class:"flex flex-row items-center",get children(){return[b(vy,{class:"mr-2",size:16}),V(()=>e.row.original.fingerprintHash.slice(0,8)),b(pe,{get when(){var t;return(t=e.row.original.metadata)==null?void 0:t.app_version},get children(){var t=$y(),n=t.firstChild,r=n.nextSibling;return r.nextSibling,X(t,()=>{var o;return(o=e.row.original.metadata)==null?void 0:o.app_version},r),t}})]}}),b(Vl,{get children(){var t=zl();return X(t,()=>e.row.original.fingerprintHash),t}})]}}):"N/A"},{accessorKey:"enabled",header:"Enabled",cell:e=>e.getValue()?(()=>{var t=lr();return X(t,b(Kl,{class:"text-green-500"})),t})():(()=>{var t=lr();return X(t,b(jl,{class:"text-red-500"})),t})()},{accessorKey:"shouldForceUpdate",header:"Force Update",cell:e=>e.getValue()?(()=>{var t=lr();return X(t,b(Kl,{class:"text-green-500"})),t})():(()=>{var t=lr();return X(t,b(jl,{class:"text-red-500"})),t})()},{accessorKey:"message",header:"Message",cell:e=>e.getValue()},{accessorKey:"id",header:"Created At",cell:e=>ay(ry(String(e.getValue()))).format("YYYY-MM-DD HH:mm:ss")}];function Fy(e){const[t,n]=j(0),[r,o]=j(0);H(()=>{const a=e();if(!a)return;s(a);const l=new ResizeObserver(i);l.observe(a),W(()=>{l.disconnect()})});const i=a=>{for(const l of a)l.target===e()&&s(l.target)},s=a=>{o(a.offsetWidth),n(a.offsetHeight)};return{width:r,height:t}}var Sd=we();function xd(){return ye(Sd)}function Oy(){const e=xd();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function Cd(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function Ay(e,t){var o;const n=t.ref();if(!n)return-1;let r=e.length;if(!r)return-1;for(;r--;){const i=(o=e[r])==null?void 0:o.ref();if(i&&Cd(i,n))return r+1}return 0}function Ty(e){const t=e.map((r,o)=>[o,r]);let n=!1;return t.sort(([r,o],[i,s])=>{const a=o.ref(),l=s.ref();return a===l||!a||!l?0:Cd(a,l)?(r>i&&(n=!0),-1):(r<i&&(n=!0),1)}),n?t.map(([r,o])=>o):e}function Ed(e,t){const n=Ty(e);e!==n&&t(n)}function Dy(e){var o,i;const t=e[0],n=(o=e[e.length-1])==null?void 0:o.ref();let r=(i=t==null?void 0:t.ref())==null?void 0:i.parentElement;for(;r;){if(n&&r.contains(n))return r;r=r.parentElement}return ze(r).body}function Ly(e,t){H(()=>{const n=setTimeout(()=>{Ed(e(),t)});W(()=>clearTimeout(n))})}function _y(e,t){if(typeof IntersectionObserver!="function"){Ly(e,t);return}let n=[];H(()=>{const r=()=>{const s=!!n.length;n=e(),s&&Ed(e(),t)},o=Dy(e()),i=new IntersectionObserver(r,{root:o});for(const s of e()){const a=s.ref();a&&i.observe(a)}W(()=>i.disconnect())})}function ky(e={}){const[t,n]=$m({value:()=>A(e.items),onChange:i=>{var s;return(s=e.onItemsChange)==null?void 0:s.call(e,i)}});_y(t,n);const r=i=>(n(s=>{const a=Ay(s,i);return kg(s,i,a)}),()=>{n(s=>{const a=s.filter(l=>l.ref()!==i.ref());return s.length===a.length?s:a})});return{DomCollectionProvider:i=>b(Sd.Provider,{value:{registerItem:r},get children(){return i.children}})}}function Vy(e){const t=Oy(),n=Q({shouldRegisterItem:!0},e);H(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());W(r)})}function Rd(e){let t=e.startIndex??0;const n=e.startLevel??0,r=[],o=l=>{if(l==null)return"";const c=e.getKey??"key",u=En(c)?l[c]:c(l);return u!=null?String(u):""},i=l=>{if(l==null)return"";const c=e.getTextValue??"textValue",u=En(c)?l[c]:c(l);return u!=null?String(u):""},s=l=>{if(l==null)return!1;const c=e.getDisabled??"disabled";return(En(c)?l[c]:c(l))??!1},a=l=>{var c;if(l!=null)return En(e.getSectionChildren)?l[e.getSectionChildren]:(c=e.getSectionChildren)==null?void 0:c.call(e,l)};for(const l of e.dataSource){if(En(l)||Vg(l)){r.push({type:"item",rawValue:l,key:String(l),textValue:String(l),disabled:s(l),level:n,index:t}),t++;continue}if(a(l)!=null){r.push({type:"section",rawValue:l,key:"",textValue:"",disabled:!1,level:n,index:t}),t++;const c=a(l)??[];if(c.length>0){const u=Rd({dataSource:c,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});r.push(...u),t+=u.length}}else r.push({type:"item",rawValue:l,key:o(l),textValue:i(l),disabled:s(l),level:n,index:t}),t++}return r}function Ny(e,t=[]){return V(()=>{const n=Rd({dataSource:A(e.dataSource),getKey:A(e.getKey),getTextValue:A(e.getTextValue),getDisabled:A(e.getDisabled),getSectionChildren:A(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}var It=class Pd extends Set{constructor(n,r,o){super(n);Re(this,"anchorKey");Re(this,"currentKey");n instanceof Pd?(this.anchorKey=r||n.anchorKey,this.currentKey=o||n.currentKey):(this.anchorKey=r,this.currentKey=o)}};function Ky(e){const[t,n]=vt(e);return[()=>t()??new It,n]}function Id(e){return zg()?e.altKey:e.ctrlKey}function Rn(e){return So()?e.metaKey:e.ctrlKey}function Bl(e){return new It(e)}function jy(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function zy(e){const t=Q({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=j(!1),[o,i]=j(),s=V(()=>{const g=A(t.selectedKeys);return g!=null?Bl(g):g}),a=V(()=>{const g=A(t.defaultSelectedKeys);return g!=null?Bl(g):new It}),[l,c]=Ky({value:s,defaultValue:a,onChange:g=>{var y;return(y=t.onSelectionChange)==null?void 0:y.call(t,g)}}),[u,d]=j(A(t.selectionBehavior)),f=()=>A(t.selectionMode),h=()=>A(t.disallowEmptySelection)??!1,p=g=>{(A(t.allowDuplicateSelectionEvents)||!jy(g,l()))&&c(g)};return H(()=>{const g=l();A(t.selectionBehavior)==="replace"&&u()==="toggle"&&typeof g=="object"&&g.size===0&&d("replace")}),H(()=>{d(A(t.selectionBehavior)??"toggle")}),{selectionMode:f,disallowEmptySelection:h,selectionBehavior:u,setSelectionBehavior:d,isFocused:n,setFocused:r,focusedKey:o,setFocusedKey:i,selectedKeys:l,setSelectedKeys:p}}function By(e){const[t,n]=j(""),[r,o]=j(-1);return{typeSelectHandlers:{onKeyDown:s=>{var f;if(A(e.isDisabled))return;const a=A(e.keyboardDelegate),l=A(e.selectionManager);if(!a.getKeyForSearch)return;const c=Hy(s.key);if(!c||s.ctrlKey||s.metaKey)return;c===" "&&t().trim().length>0&&(s.preventDefault(),s.stopPropagation());let u=n(h=>h+c),d=a.getKeyForSearch(u,l.focusedKey())??a.getKeyForSearch(u);d==null&&Gy(u)&&(u=u[0],d=a.getKeyForSearch(u,l.focusedKey())??a.getKeyForSearch(u)),d!=null&&(l.setFocusedKey(d),(f=e.onTypeSelect)==null||f.call(e,d)),clearTimeout(r()),o(window.setTimeout(()=>n(""),500))}}}}function Hy(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function Gy(e){return e.split("").every(t=>t===e[0])}function Uy(e,t,n){const o=M({selectOnFocus:()=>A(e.selectionManager).selectionBehavior()==="replace"},e),i=()=>t(),{direction:s}=Yt();let a={top:0,left:0};Lg(()=>A(o.isVirtualized)?void 0:i(),"scroll",()=>{const y=i();y&&(a={top:y.scrollTop,left:y.scrollLeft})});const{typeSelectHandlers:l}=By({isDisabled:()=>A(o.disallowTypeAhead),keyboardDelegate:()=>A(o.keyboardDelegate),selectionManager:()=>A(o.selectionManager)}),c=()=>A(o.orientation)??"vertical",u=y=>{var k,T,K,N,B,oe,P,E;ne(y,l.onKeyDown),y.altKey&&y.key==="Tab"&&y.preventDefault();const m=t();if(!(m!=null&&m.contains(y.target)))return;const v=A(o.selectionManager),w=A(o.selectOnFocus),S=x=>{x!=null&&(v.setFocusedKey(x),y.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(x):w&&!Id(y)&&v.replaceSelection(x))},C=A(o.keyboardDelegate),O=A(o.shouldFocusWrap),L=v.focusedKey();switch(y.key){case(c()==="vertical"?"ArrowDown":"ArrowRight"):{if(C.getKeyBelow){y.preventDefault();let x;L!=null?x=C.getKeyBelow(L):x=(k=C.getFirstKey)==null?void 0:k.call(C),x==null&&O&&(x=(T=C.getFirstKey)==null?void 0:T.call(C,L)),S(x)}break}case(c()==="vertical"?"ArrowUp":"ArrowLeft"):{if(C.getKeyAbove){y.preventDefault();let x;L!=null?x=C.getKeyAbove(L):x=(K=C.getLastKey)==null?void 0:K.call(C),x==null&&O&&(x=(N=C.getLastKey)==null?void 0:N.call(C,L)),S(x)}break}case(c()==="vertical"?"ArrowLeft":"ArrowUp"):{if(C.getKeyLeftOf){y.preventDefault();const x=s()==="rtl";let I;L!=null?I=C.getKeyLeftOf(L):I=x?(B=C.getFirstKey)==null?void 0:B.call(C):(oe=C.getLastKey)==null?void 0:oe.call(C),S(I)}break}case(c()==="vertical"?"ArrowRight":"ArrowDown"):{if(C.getKeyRightOf){y.preventDefault();const x=s()==="rtl";let I;L!=null?I=C.getKeyRightOf(L):I=x?(P=C.getLastKey)==null?void 0:P.call(C):(E=C.getFirstKey)==null?void 0:E.call(C),S(I)}break}case"Home":if(C.getFirstKey){y.preventDefault();const x=C.getFirstKey(L,Rn(y));x!=null&&(v.setFocusedKey(x),Rn(y)&&y.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(x):w&&v.replaceSelection(x))}break;case"End":if(C.getLastKey){y.preventDefault();const x=C.getLastKey(L,Rn(y));x!=null&&(v.setFocusedKey(x),Rn(y)&&y.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(x):w&&v.replaceSelection(x))}break;case"PageDown":if(C.getKeyPageBelow&&L!=null){y.preventDefault();const x=C.getKeyPageBelow(L);S(x)}break;case"PageUp":if(C.getKeyPageAbove&&L!=null){y.preventDefault();const x=C.getKeyPageAbove(L);S(x)}break;case"a":Rn(y)&&v.selectionMode()==="multiple"&&A(o.disallowSelectAll)!==!0&&(y.preventDefault(),v.selectAll());break;case"Escape":y.defaultPrevented||(y.preventDefault(),A(o.disallowEmptySelection)||v.clearSelection());break;case"Tab":if(!A(o.allowsTabNavigation)){if(y.shiftKey)m.focus();else{const x=Zg(m,{tabbable:!0});let I,$;do $=x.lastChild(),$&&(I=$);while($);I&&!I.contains(document.activeElement)&&$e(I)}break}}},d=y=>{var S,C;const m=A(o.selectionManager),v=A(o.keyboardDelegate),w=A(o.selectOnFocus);if(m.isFocused()){y.currentTarget.contains(y.target)||m.setFocused(!1);return}if(y.currentTarget.contains(y.target)){if(m.setFocused(!0),m.focusedKey()==null){const O=k=>{k!=null&&(m.setFocusedKey(k),w&&m.replaceSelection(k))},L=y.relatedTarget;L&&y.currentTarget.compareDocumentPosition(L)&Node.DOCUMENT_POSITION_FOLLOWING?O(m.lastSelectedKey()??((S=v.getLastKey)==null?void 0:S.call(v))):O(m.firstSelectedKey()??((C=v.getFirstKey)==null?void 0:C.call(v)))}else if(!A(o.isVirtualized)){const O=i();if(O){O.scrollTop=a.top,O.scrollLeft=a.left;const L=O.querySelector(`[data-key="${m.focusedKey()}"]`);L&&($e(L),Wi(O,L))}}}},f=y=>{const m=A(o.selectionManager);y.currentTarget.contains(y.relatedTarget)||m.setFocused(!1)},h=y=>{i()===y.target&&y.preventDefault()},p=()=>{var O,L;const y=A(o.autoFocus);if(!y)return;const m=A(o.selectionManager),v=A(o.keyboardDelegate);let w;y==="first"&&(w=(O=v.getFirstKey)==null?void 0:O.call(v)),y==="last"&&(w=(L=v.getLastKey)==null?void 0:L.call(v));const S=m.selectedKeys();S.size&&(w=S.values().next().value),m.setFocused(!0),m.setFocusedKey(w);const C=t();C&&w==null&&!A(o.shouldUseVirtualFocus)&&$e(C)};return qn(()=>{o.deferAutoFocus?setTimeout(p,0):p()}),H(Ce([i,()=>A(o.isVirtualized),()=>A(o.selectionManager).focusedKey()],y=>{var S;const[m,v,w]=y;if(v)w&&((S=o.scrollToKey)==null||S.call(o,w));else if(w&&m){const C=m.querySelector(`[data-key="${w}"]`);C&&Wi(m,C)}})),{tabIndex:V(()=>{if(!A(o.shouldUseVirtualFocus))return A(o.selectionManager).focusedKey()==null?0:-1}),onKeyDown:u,onMouseDown:h,onFocusIn:d,onFocusOut:f}}function $d(e,t){const n=()=>A(e.selectionManager),r=()=>A(e.key),o=()=>A(e.shouldUseVirtualFocus),i=v=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):v!=null&&v.shiftKey?n().extendSelection(r()):n().selectionBehavior()==="toggle"||Rn(v)||"pointerType"in v&&v.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},s=()=>n().isSelected(r()),a=()=>A(e.disabled)||n().isDisabled(r()),l=()=>!a()&&n().canSelectItem(r());let c=null;const u=v=>{l()&&(c=v.pointerType,v.pointerType==="mouse"&&v.button===0&&!A(e.shouldSelectOnPressUp)&&i(v))},d=v=>{l()&&v.pointerType==="mouse"&&v.button===0&&A(e.shouldSelectOnPressUp)&&A(e.allowsDifferentPressOrigin)&&i(v)},f=v=>{l()&&(A(e.shouldSelectOnPressUp)&&!A(e.allowsDifferentPressOrigin)||c!=="mouse")&&i(v)},h=v=>{!l()||!["Enter"," "].includes(v.key)||(Id(v)?n().toggleSelection(r()):i(v))},p=v=>{a()&&v.preventDefault()},g=v=>{const w=t();o()||a()||!w||v.target===w&&n().setFocusedKey(r())},y=V(()=>{if(!(o()||a()))return r()===n().focusedKey()?0:-1}),m=V(()=>A(e.virtualized)?void 0:r());return H(Ce([t,r,o,()=>n().focusedKey(),()=>n().isFocused()],([v,w,S,C,O])=>{v&&w===C&&O&&!S&&document.activeElement!==v&&(e.focus?e.focus():$e(v))})),{isSelected:s,isDisabled:a,allowsSelection:l,tabIndex:y,dataKey:m,onPointerDown:u,onPointerUp:d,onClick:f,onKeyDown:h,onMouseDown:p,onFocus:g}}var qy=class{constructor(e,t){Re(this,"collection");Re(this,"state");this.collection=e,this.state=t}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}isFocused(){return this.state.isFocused()}setFocused(e){this.state.setFocused(e)}focusedKey(){return this.state.focusedKey()}setFocusedKey(e){(e==null||this.collection().getItem(e))&&this.state.setFocusedKey(e)}selectedKeys(){return this.state.selectedKeys()}isSelected(e){if(this.state.selectionMode()==="none")return!1;const t=this.getKey(e);return t==null?!1:this.state.selectedKeys().has(t)}isEmpty(){return this.state.selectedKeys().size===0}isSelectAll(){if(this.isEmpty())return!1;const e=this.state.selectedKeys();return this.getAllSelectableKeys().every(t=>e.has(t))}firstSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=(n==null?void 0:n.index)!=null&&(e==null?void 0:e.index)!=null&&n.index<e.index;(!e||r)&&(e=n)}return e==null?void 0:e.key}lastSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=(n==null?void 0:n.index)!=null&&(e==null?void 0:e.index)!=null&&n.index>e.index;(!e||r)&&(e=n)}return e==null?void 0:e.key}extendSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=this.state.selectedKeys(),r=n.anchorKey||t,o=new It(n,r,t);for(const i of this.getKeyRange(r,n.currentKey||t))o.delete(i);for(const i of this.getKeyRange(t,r))this.canSelectItem(i)&&o.add(i);this.state.setSelectedKeys(o)}getKeyRange(e,t){const n=this.collection().getItem(e),r=this.collection().getItem(t);return n&&r?n.index!=null&&r.index!=null&&n.index<=r.index?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){const n=[];let r=e;for(;r!=null;){const o=this.collection().getItem(r);if(o&&o.type==="item"&&n.push(r),r===t)return n;r=this.collection().getKeyAfter(r)}return[]}getKey(e){const t=this.collection().getItem(e);return t?!t||t.type!=="item"?null:t.key:e}toggleSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=new It(this.state.selectedKeys());n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection()&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode()==="none")return;const t=this.getKey(e);if(t==null)return;const n=this.canSelectItem(t)?new It([t],t,t):new It;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new It;for(const n of e){const r=this.getKey(n);if(r!=null&&(t.add(r),this.selectionMode()==="single"))break}this.state.setSelectedKeys(t)}selectAll(){this.selectionMode()==="multiple"&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){const e=this.state.selectedKeys();!this.disallowEmptySelection()&&e.size>0&&this.state.setSelectedKeys(new It)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode()!=="none"&&(this.selectionMode()==="single"?this.isSelected(e)&&!this.disallowEmptySelection()?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior()==="toggle"||t&&t.pointerType==="touch"?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys())return!0;const t=this.selectedKeys();if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;for(const n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode()==="none")return!1;const t=this.collection().getItem(e);return t!=null&&!t.disabled}isDisabled(e){const t=this.collection().getItem(e);return!t||t.disabled}getAllSelectableKeys(){const e=[];return(n=>{for(;n!=null;){if(this.canSelectItem(n)){const r=this.collection().getItem(n);if(!r)continue;r.type==="item"&&e.push(n)}n=this.collection().getKeyAfter(n)}})(this.collection().getFirstKey()),e}},Hl=class{constructor(e){Re(this,"keyMap",new Map);Re(this,"iterable");Re(this,"firstKey");Re(this,"lastKey");this.iterable=e;for(const r of e)this.keyMap.set(r.key,r);if(this.keyMap.size===0)return;let t,n=0;for(const[r,o]of this.keyMap)t?(t.nextKey=r,o.prevKey=t.key):(this.firstKey=r,o.prevKey=void 0),o.type==="item"&&(o.index=n++),t=o,t.nextKey=void 0;this.lastKey=t.key}*[Symbol.iterator](){yield*this.iterable}getSize(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){var t;return(t=this.keyMap.get(e))==null?void 0:t.prevKey}getKeyAfter(e){var t;return(t=this.keyMap.get(e))==null?void 0:t.nextKey}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}};function Wy(e){const t=zy(e),r=Ny({dataSource:()=>A(e.dataSource),getKey:()=>A(e.getKey),getTextValue:()=>A(e.getTextValue),getDisabled:()=>A(e.getDisabled),getSectionChildren:()=>A(e.getSectionChildren),factory:i=>e.filter?new Hl(e.filter(i)):new Hl(i)},[()=>e.filter]),o=new qy(r,t);return Mt(()=>{const i=t.focusedKey();i!=null&&!r().getItem(i)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>o}}var Xy=class{constructor(e,t,n){Re(this,"collection");Re(this,"ref");Re(this,"collator");this.collection=e,this.ref=t,this.collator=n}getKeyBelow(e){let t=this.collection().getKeyAfter(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyAfter(t)}}getKeyAbove(e){let t=this.collection().getKeyBefore(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyBefore(t)}}getFirstKey(){let e=this.collection().getFirstKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyAfter(e)}}getLastKey(){let e=this.collection().getLastKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyBefore(e)}}getItem(e){var t,n;return((n=(t=this.ref)==null?void 0:t.call(this))==null?void 0:n.querySelector(`[data-key="${e}"]`))??null}getKeyPageAbove(e){var i;const t=(i=this.ref)==null?void 0:i.call(this);let n=this.getItem(e);if(!t||!n)return;const r=Math.max(0,n.offsetTop+n.offsetHeight-t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop>r;)o=this.getKeyAbove(o),n=o!=null?this.getItem(o):null;return o}getKeyPageBelow(e){var i;const t=(i=this.ref)==null?void 0:i.call(this);let n=this.getItem(e);if(!t||!n)return;const r=Math.min(t.scrollHeight,n.offsetTop-n.offsetHeight+t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop<r;)o=this.getKeyBelow(o),n=o!=null?this.getItem(o):null;return o}getKeyForSearch(e,t){var o;const n=(o=this.collator)==null?void 0:o.call(this);if(!n)return;let r=t!=null?this.getKeyBelow(t):this.getFirstKey();for(;r!=null;){const i=this.collection().getItem(r);if(i){const s=i.textValue.slice(0,e.length);if(i.textValue&&n.compare(s,e)===0)return r}r=this.getKeyBelow(r)}}};function Qy(e,t,n){const r=rv({usage:"search",sensitivity:"base"}),o=V(()=>{const i=A(e.keyboardDelegate);return i||new Xy(e.collection,t,r)});return Uy({selectionManager:()=>A(e.selectionManager),keyboardDelegate:o,autoFocus:()=>A(e.autoFocus),deferAutoFocus:()=>A(e.deferAutoFocus),shouldFocusWrap:()=>A(e.shouldFocusWrap),disallowEmptySelection:()=>A(e.disallowEmptySelection),selectOnFocus:()=>A(e.selectOnFocus),disallowTypeAhead:()=>A(e.disallowTypeAhead),shouldUseVirtualFocus:()=>A(e.shouldUseVirtualFocus),allowsTabNavigation:()=>A(e.allowsTabNavigation),isVirtualized:()=>A(e.isVirtualized),scrollToKey:i=>{var s;return(s=A(e.scrollToKey))==null?void 0:s(i)},orientation:()=>A(e.orientation)},t)}function Md(e={}){const[t,n]=Jc({value:()=>A(e.isSelected),defaultValue:()=>!!A(e.defaultIsSelected),onChange:i=>{var s;return(s=e.onSelectedChange)==null?void 0:s.call(e,i)}});return{isSelected:t,setIsSelected:i=>{!A(e.isReadOnly)&&!A(e.isDisabled)&&n(i)},toggle:()=>{!A(e.isReadOnly)&&!A(e.isDisabled)&&n(!t())}}}var Fd=we();function Fo(){return ye(Fd)}function At(){const e=Fo();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var Od=we();function oa(){const e=ye(Od);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var Ad=we();function St(){const e=ye(Ad);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function ia(e){let t;const n=St(),r=At(),o=Q({id:n.generateId(`item-${Ee()}`)},e),[i,s]=_(o,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,l]=j(),[c,u]=j(),[d,f]=j(),h=()=>r.listState().selectionManager(),p=()=>s.id,g=()=>h().focusedKey()===p(),y=()=>{var T;(T=i.onSelect)==null||T.call(i),i.closeOnSelect&&setTimeout(()=>{r.close(!0)})};Vy({getItem:()=>{var T;return{ref:()=>t,type:"item",key:p(),textValue:i.textValue??((T=d())==null?void 0:T.textContent)??(t==null?void 0:t.textContent)??"",disabled:i.disabled??!1}}});const m=$d({key:p,selectionManager:h,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),v=T=>{ne(T,i.onPointerMove),T.pointerType==="mouse"&&(i.disabled?r.onItemLeave(T):(r.onItemEnter(T),T.defaultPrevented||($e(T.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(p()))))},w=T=>{ne(T,i.onPointerLeave),T.pointerType==="mouse"&&r.onItemLeave(T)},S=T=>{ne(T,i.onPointerUp),!i.disabled&&T.button===0&&y()},C=T=>{if(ne(T,i.onKeyDown),!T.repeat&&!i.disabled)switch(T.key){case"Enter":case" ":y();break}},O=V(()=>{if(i.indeterminate)return"mixed";if(i.checked!=null)return i.checked}),L=V(()=>({"data-indeterminate":i.indeterminate?"":void 0,"data-checked":i.checked&&!i.indeterminate?"":void 0,"data-disabled":i.disabled?"":void 0,"data-highlighted":g()?"":void 0})),k={isChecked:()=>i.checked,dataset:L,setLabelRef:f,generateId:dt(()=>s.id),registerLabel:Ke(l),registerDescription:Ke(u)};return b(Od.Provider,{value:k,get children(){return b(le,M({as:"div",ref(T){var K=ve(N=>t=N,i.ref);typeof K=="function"&&K(T)},get tabIndex(){return m.tabIndex()},get"aria-checked"(){return O()},get"aria-disabled"(){return i.disabled},get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-key"(){return m.dataKey()},get onPointerDown(){return Se([i.onPointerDown,m.onPointerDown])},get onPointerUp(){return Se([S,m.onPointerUp])},get onClick(){return Se([i.onClick,m.onClick])},get onKeyDown(){return Se([C,m.onKeyDown])},get onMouseDown(){return Se([i.onMouseDown,m.onMouseDown])},get onFocus(){return Se([i.onFocus,m.onFocus])},onPointerMove:v,onPointerLeave:w},L,s))}})}function Yy(e){const t=Q({closeOnSelect:!1},e),[n,r]=_(t,["checked","defaultChecked","onChange","onSelect"]),o=Md({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:s=>{var a;return(a=n.onChange)==null?void 0:a.call(n,s)},isDisabled:()=>r.disabled});return b(ia,M({role:"menuitemcheckbox",get checked(){return o.isSelected()},onSelect:()=>{var s;(s=n.onSelect)==null||s.call(n),o.toggle()}},r))}var Td=we();function Nr(){return ye(Td)}function Jn(){const e=Nr();if(e===void 0)throw new Error("[kobalte]: `useMenubarContext` must be used within a `Menubar` component");return e}var Mr={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>Mr.next(e==="ltr"?"rtl":"ltr",t)},Gl={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function Ul(e){const t=St(),n=At(),r=Nr(),{direction:o}=Yt(),i=Q({id:t.generateId("trigger")},e),[s,a]=_(i,["ref","id","disabled","onPointerDown","onClick","onKeyDown","onMouseOver","onFocus"]);let l=()=>t.value();r!==void 0&&(l=()=>t.value()??s.id,r.lastValue()===void 0&&r.setLastValue(l));const c=xo(()=>n.triggerRef(),()=>"button"),u=V(()=>{var m;return c()==="a"&&((m=n.triggerRef())==null?void 0:m.getAttribute("href"))!=null});H(Ce(()=>r==null?void 0:r.value(),m=>{var v;u()&&m===l()&&((v=n.triggerRef())==null||v.focus())}));const d=()=>{r!==void 0?n.isOpen()?r.value()===l()&&r.closeMenu():(r.autoFocusMenu()||r.setAutoFocusMenu(!0),n.open(!1)):n.toggle(!0)},f=m=>{ne(m,s.onPointerDown),m.currentTarget.dataset.pointerType=m.pointerType,!s.disabled&&m.pointerType!=="touch"&&m.button===0&&d()},h=m=>{ne(m,s.onClick),s.disabled||m.currentTarget.dataset.pointerType==="touch"&&d()},p=m=>{if(ne(m,s.onKeyDown),!s.disabled){if(u())switch(m.key){case"Enter":case" ":return}switch(m.key){case"Enter":case" ":case Gl.first(t.orientation()):m.stopPropagation(),m.preventDefault(),np(m.currentTarget),n.open("first"),r==null||r.setAutoFocusMenu(!0),r==null||r.setValue(l);break;case Gl.last(t.orientation()):m.stopPropagation(),m.preventDefault(),n.open("last");break;case Mr.next(o(),t.orientation()):if(r===void 0)break;m.stopPropagation(),m.preventDefault(),r.nextMenu();break;case Mr.previous(o(),t.orientation()):if(r===void 0)break;m.stopPropagation(),m.preventDefault(),r.previousMenu();break}}},g=m=>{var v;ne(m,s.onMouseOver),((v=n.triggerRef())==null?void 0:v.dataset.pointerType)!=="touch"&&!s.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(l)},y=m=>{ne(m,s.onFocus),r!==void 0&&m.currentTarget.dataset.pointerType!=="touch"&&r.setValue(l)};return H(()=>W(n.registerTriggerId(s.id))),b(wt,M({ref(m){var v=ve(n.setTriggerRef,s.ref);typeof v=="function"&&v(m)},get"data-kb-menu-value-trigger"(){return t.value()},get id(){return s.id},get disabled(){return s.disabled},"aria-haspopup":"true",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return V(()=>!!n.isOpen())()?n.contentId():void 0},get"data-highlighted"(){return l()!==void 0&&(r==null?void 0:r.value())===l()?!0:void 0},get tabIndex(){return r!==void 0?r.value()===l()||r.lastValue()===l()?0:-1:void 0},onPointerDown:f,onMouseOver:g,onClick:h,onKeyDown:p,onFocus:y,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),a))}var Dd=we();function sa(){return ye(Dd)}function Kr(){const e=sa();if(e===void 0)throw new Error("[kobalte]: `useNavigationMenuContext` must be used within a `NavigationMenu` component");return e}function Ld(e){let t;const n=St(),r=At(),o=Nr(),i=sa(),{direction:s}=Yt(),a=Q({id:n.generateId(`content-${Ee()}`)},e),[l,c]=_(a,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let u=0;const d=()=>r.parentMenuContext()==null&&o===void 0&&n.isModal(),f=Qy({selectionManager:r.listState().selectionManager,collection:r.listState().collection,autoFocus:r.autoFocus,deferAutoFocus:!0,shouldFocusWrap:!0,disallowTypeAhead:()=>!r.listState().selectionManager().isFocused(),orientation:()=>n.orientation()==="horizontal"?"vertical":"horizontal"},()=>t);Xc({trapFocus:()=>d()&&r.isOpen(),onMountAutoFocus:w=>{var S;o===void 0&&((S=l.onOpenAutoFocus)==null||S.call(l,w))},onUnmountAutoFocus:l.onCloseAutoFocus},()=>t);const h=w=>{if(Pe(w.currentTarget,w.target)&&(w.key==="Tab"&&r.isOpen()&&w.preventDefault(),o!==void 0&&w.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(w.key){case Mr.next(s(),n.orientation()):w.stopPropagation(),w.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.nextMenu();break;case Mr.previous(s(),n.orientation()):if(w.currentTarget.hasAttribute("data-closed"))break;w.stopPropagation(),w.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.previousMenu();break}},p=w=>{var S;(S=l.onEscapeKeyDown)==null||S.call(l,w),o==null||o.setAutoFocusMenu(!1),r.close(!0)},g=w=>{var S;(S=l.onFocusOutside)==null||S.call(l,w),n.isModal()&&w.preventDefault()},y=w=>{var S,C;ne(w,l.onPointerEnter),r.isOpen()&&((S=r.parentMenuContext())==null||S.listState().selectionManager().setFocused(!1),(C=r.parentMenuContext())==null||C.listState().selectionManager().setFocusedKey(void 0))},m=w=>{if(ne(w,l.onPointerMove),w.pointerType!=="mouse")return;const S=w.target,C=u!==w.clientX;Pe(w.currentTarget,S)&&C&&(r.setPointerDir(w.clientX>u?"right":"left"),u=w.clientX)};H(()=>W(r.registerContentId(l.id))),W(()=>r.setContentRef(void 0));const v={ref:ve(w=>{r.setContentRef(w),t=w},l.ref),role:"menu",get id(){return l.id},get tabIndex(){return f.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:Se([l.onKeyDown,f.onKeyDown,h]),onMouseDown:Se([l.onMouseDown,f.onMouseDown]),onFocusIn:Se([l.onFocusIn,f.onFocusIn]),onFocusOut:Se([l.onFocusOut,f.onFocusOut]),onPointerEnter:y,onPointerMove:m,get"data-orientation"(){return n.orientation()}};return b(pe,{get when(){return r.contentPresent()},get children(){return b(pe,{get when(){return i===void 0||r.parentMenuContext()!=null},get fallback(){return b(le,M({as:"div"},()=>r.dataset(),v,c))},get children(){return b(Zn.Positioner,{get children(){return b(Eo,M({get disableOutsidePointerEvents(){return V(()=>!!d())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return ct({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},l.style)},onEscapeKeyDown:p,onFocusOutside:g,get onDismiss(){return r.close}},()=>r.dataset(),v,c))}})}})}})}function Zy(e){let t;const n=St(),r=At(),[o,i]=_(e,["ref"]);return ed({element:()=>t??null,enabled:()=>r.contentPresent()&&n.preventScroll()}),b(Ld,M({ref(s){var a=ve(l=>{t=l},o.ref);typeof a=="function"&&a(s)}},i))}var _d=we();function Jy(){const e=ye(_d);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function kd(e){const t=St(),n=Q({id:t.generateId(`group-${Ee()}`)},e),[r,o]=j(),i={generateId:dt(()=>n.id),registerLabelId:Ke(o)};return b(_d.Provider,{value:i,get children(){return b(le,M({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function ew(e){const t=Jy(),n=Q({id:t.generateId("label")},e),[r,o]=_(n,["id"]);return H(()=>W(t.registerLabelId(r.id))),b(le,M({as:"span",get id(){return r.id},"aria-hidden":"true"},o))}function Vd(e){const t=At(),n=Q({children:"▼"},e);return b(le,M({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function tw(e){return b(ia,M({role:"menuitem",closeOnSelect:!0},e))}function nw(e){const t=oa(),n=Q({id:t.generateId("description")},e),[r,o]=_(n,["id"]);return H(()=>W(t.registerDescription(r.id))),b(le,M({as:"div",get id(){return r.id}},()=>t.dataset(),o))}function rw(e){const t=oa(),n=Q({id:t.generateId("indicator")},e),[r,o]=_(n,["forceMount"]);return b(pe,{get when(){return r.forceMount||t.isChecked()},get children(){return b(le,M({as:"div"},()=>t.dataset(),o))}})}function ow(e){const t=oa(),n=Q({id:t.generateId("label")},e),[r,o]=_(n,["ref","id"]);return H(()=>W(t.registerLabel(r.id))),b(le,M({as:"div",ref(i){var s=ve(t.setLabelRef,r.ref);typeof s=="function"&&s(i)},get id(){return r.id}},()=>t.dataset(),o))}function iw(e){const t=At();return b(pe,{get when(){return t.contentPresent()},get children(){return b(yo,e)}})}var Nd=we();function sw(){const e=ye(Nd);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function aw(e){const n=St().generateId(`radiogroup-${Ee()}`),r=Q({id:n},e),[o,i]=_(r,["value","defaultValue","onChange","disabled"]),[s,a]=vt({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:c=>{var u;return(u=o.onChange)==null?void 0:u.call(o,c)}}),l={isDisabled:()=>o.disabled,isSelectedValue:c=>c===s(),setSelectedValue:a};return b(Nd.Provider,{value:l,get children(){return b(kd,i)}})}function lw(e){const t=sw(),n=Q({closeOnSelect:!1},e),[r,o]=_(n,["value","onSelect"]);return b(ia,M({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{var s;(s=r.onSelect)==null||s.call(r),t.setSelectedValue(r.value)}},o))}function uw(e,t,n){const r=e.split("-")[0],o=n.getBoundingClientRect(),i=[],s=t.clientX,a=t.clientY;switch(r){case"top":i.push([s,a+5]),i.push([o.left,o.bottom]),i.push([o.left,o.top]),i.push([o.right,o.top]),i.push([o.right,o.bottom]);break;case"right":i.push([s-5,a]),i.push([o.left,o.top]),i.push([o.right,o.top]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]);break;case"bottom":i.push([s,a-5]),i.push([o.right,o.top]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]),i.push([o.left,o.top]);break;case"left":i.push([s+5,a]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]),i.push([o.left,o.top]),i.push([o.right,o.top]);break}return i}function cw(e,t){return t?Ac([e.clientX,e.clientY],t):!1}function Kd(e){const t=St(),n=xd(),r=Fo(),o=Nr(),i=sa(),s=Q({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[a,l]=_(s,["open","defaultOpen","onOpenChange"]);let c=0,u=null,d="right";const[f,h]=j(),[p,g]=j(),[y,m]=j(),[v,w]=j(),[S,C]=j(!0),[O,L]=j(l.placement),[k,T]=j([]),[K,N]=j([]),{DomCollectionProvider:B}=ky({items:K,onItemsChange:N}),oe=Ro({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:re=>{var Fe;return(Fe=a.onOpenChange)==null?void 0:Fe.call(a,re)}}),{present:P}=Gn({show:()=>t.forceMount()||oe.isOpen(),element:()=>v()??null}),E=Wy({selectionMode:"none",dataSource:K}),x=re=>{C(re),oe.open()},I=(re=!1)=>{oe.close(),re&&r&&r.close(!0)},$=re=>{C(re),oe.toggle()},F=()=>{const re=v();re&&($e(re),E.selectionManager().setFocused(!0),E.selectionManager().setFocusedKey(void 0))},D=()=>{i!=null?setTimeout(()=>F()):F()},z=re=>{T(Ie=>[...Ie,re]);const Fe=r==null?void 0:r.registerNestedMenu(re);return()=>{T(Ie=>qi(Ie,re)),Fe==null||Fe()}},U=re=>d===(u==null?void 0:u.side)&&cw(re,u==null?void 0:u.area),Y=re=>{U(re)&&re.preventDefault()},ce=re=>{U(re)||D()},se=re=>{U(re)&&re.preventDefault()};Qc({isDisabled:()=>!(r==null&&oe.isOpen()&&t.isModal()),targets:()=>[v(),...k()].filter(Boolean)}),H(()=>{const re=v();if(!re||!r)return;const Fe=r.registerNestedMenu(re);W(()=>{Fe()})}),H(()=>{r===void 0&&(o==null||o.registerMenu(t.value(),[v(),...k()]))}),H(()=>{var re;r!==void 0||o===void 0||(o.value()===t.value()?((re=y())==null||re.focus(),o.autoFocusMenu()&&x(!0)):I())}),H(()=>{r!==void 0||o===void 0||oe.isOpen()&&o.setValue(t.value())}),W(()=>{r===void 0&&(o==null||o.unregisterMenu(t.value()))});const et={dataset:V(()=>({"data-expanded":oe.isOpen()?"":void 0,"data-closed":oe.isOpen()?void 0:""})),isOpen:oe.isOpen,contentPresent:P,nestedMenus:k,currentPlacement:O,pointerGraceTimeoutId:()=>c,autoFocus:S,listState:()=>E,parentMenuContext:()=>r,triggerRef:y,contentRef:v,triggerId:f,contentId:p,setTriggerRef:m,setContentRef:w,open:x,close:I,toggle:$,focusContent:D,onItemEnter:Y,onItemLeave:ce,onTriggerLeave:se,setPointerDir:re=>d=re,setPointerGraceTimeoutId:re=>c=re,setPointerGraceIntent:re=>u=re,registerNestedMenu:z,registerItemToParentDomCollection:n==null?void 0:n.registerItem,registerTriggerId:Ke(h),registerContentId:Ke(g)};return b(B,{get children(){return b(Fd.Provider,{value:et,get children(){return b(pe,{when:i===void 0,get fallback(){return l.children},get children(){return b(Zn,M({anchorRef:y,contentRef:v,onCurrentPlacementChange:L},l))}})}})}})}function dw(e){const{direction:t}=Yt();return b(Kd,M({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var fw={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function hw(e){const t=At(),n=St(),[r,o]=_(e,["onFocusOutside","onKeyDown"]),{direction:i}=Yt();return b(Ld,M({onOpenAutoFocus:u=>{u.preventDefault()},onCloseAutoFocus:u=>{u.preventDefault()},onFocusOutside:u=>{var f;(f=r.onFocusOutside)==null||f.call(r,u);const d=u.target;Pe(t.triggerRef(),d)||t.close()},onKeyDown:u=>{ne(u,r.onKeyDown);const d=Pe(u.currentTarget,u.target),f=fw.close(i(),n.orientation()).includes(u.key),h=t.parentMenuContext()!=null;d&&f&&h&&(t.close(),$e(t.triggerRef()))}},o))}var ql=["Enter"," "],gw={open:(e,t)=>e==="ltr"?[...ql,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...ql,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function pw(e){let t;const n=St(),r=At(),o=Q({id:n.generateId(`sub-trigger-${Ee()}`)},e),[i,s]=_(o,["ref","id","textValue","disabled","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);let a=null;const l=()=>{a&&window.clearTimeout(a),a=null},{direction:c}=Yt(),u=()=>i.id,d=()=>{const w=r.parentMenuContext();if(w==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");return w.listState().selectionManager()},f=()=>r.listState().collection(),h=()=>d().focusedKey()===u(),p=$d({key:u,selectionManager:d,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),g=w=>{ne(w,i.onClick),!r.isOpen()&&!i.disabled&&r.open(!0)},y=w=>{var C;if(ne(w,i.onPointerMove),w.pointerType!=="mouse")return;const S=r.parentMenuContext();if(S==null||S.onItemEnter(w),!w.defaultPrevented){if(i.disabled){S==null||S.onItemLeave(w);return}!r.isOpen()&&!a&&((C=r.parentMenuContext())==null||C.setPointerGraceIntent(null),a=window.setTimeout(()=>{r.open(!1),l()},100)),S==null||S.onItemEnter(w),w.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),$e(w.currentTarget),S==null||S.listState().selectionManager().setFocused(!0),S==null||S.listState().selectionManager().setFocusedKey(u()))}},m=w=>{if(ne(w,i.onPointerLeave),w.pointerType!=="mouse")return;l();const S=r.parentMenuContext(),C=r.contentRef();if(C){S==null||S.setPointerGraceIntent({area:uw(r.currentPlacement(),w,C),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(S==null?void 0:S.pointerGraceTimeoutId());const O=window.setTimeout(()=>{S==null||S.setPointerGraceIntent(null)},300);S==null||S.setPointerGraceTimeoutId(O)}else{if(S==null||S.onTriggerLeave(w),w.defaultPrevented)return;S==null||S.setPointerGraceIntent(null)}S==null||S.onItemLeave(w)},v=w=>{ne(w,i.onKeyDown),!w.repeat&&(i.disabled||gw.open(c(),n.orientation()).includes(w.key)&&(w.stopPropagation(),w.preventDefault(),d().setFocused(!1),d().setFocusedKey(void 0),r.isOpen()||r.open("first"),r.focusContent(),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(f().getFirstKey())))};return H(()=>{if(r.registerItemToParentDomCollection==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");const w=r.registerItemToParentDomCollection({ref:()=>t,type:"item",key:u(),textValue:i.textValue??(t==null?void 0:t.textContent)??"",disabled:i.disabled??!1});W(w)}),H(Ce(()=>{var w;return(w=r.parentMenuContext())==null?void 0:w.pointerGraceTimeoutId()},w=>{W(()=>{var S;window.clearTimeout(w),(S=r.parentMenuContext())==null||S.setPointerGraceIntent(null)})})),H(()=>W(r.registerTriggerId(i.id))),W(()=>{l()}),b(le,M({as:"div",ref(w){var S=ve(C=>{r.setTriggerRef(C),t=C},i.ref);typeof S=="function"&&S(w)},get id(){return i.id},role:"menuitem",get tabIndex(){return p.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return V(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return i.disabled},get"data-key"(){return p.dataKey()},get"data-highlighted"(){return h()?"":void 0},get"data-disabled"(){return i.disabled?"":void 0},get onPointerDown(){return Se([i.onPointerDown,p.onPointerDown])},get onPointerUp(){return Se([i.onPointerUp,p.onPointerUp])},get onClick(){return Se([g,p.onClick])},get onKeyDown(){return Se([v,p.onKeyDown])},get onMouseDown(){return Se([i.onMouseDown,p.onMouseDown])},get onFocus(){return Se([i.onFocus,p.onFocus])},onPointerMove:y,onPointerLeave:m},()=>r.dataset(),s))}function mw(e){const t=Nr(),n=`menu-${Ee()}`,r=Q({id:n,modal:!0},e),[o,i]=_(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),s=Ro({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:l=>{var c;return(c=o.onOpenChange)==null?void 0:c.call(o,l)}}),a={isModal:()=>o.modal??!0,preventScroll:()=>o.preventScroll??a.isModal(),forceMount:()=>o.forceMount??!1,generateId:dt(()=>o.id),value:()=>o.value,orientation:()=>o.orientation??(t==null?void 0:t.orientation())??"horizontal"};return b(Ad.Provider,{value:a,get children(){return b(Kd,M({get open(){return s.isOpen()},get onOpenChange(){return s.setIsOpen}},i))}})}function jd(e){const t=Jn(),n=Q({modal:!1},e),[r,o]=_(n,["value"]),i=Ee(),s=t.generateId(`menubar-menu-${i}`),a=Q({id:s},o);return b(mw,M({get value(){return r.value??i}},a))}function vw(e){let t;const n=`menubar-${Ee()}`,r=Q({id:n,loop:!0,orientation:"horizontal"},e),[o,i]=_(r,["ref","value","defaultValue","onValueChange","loop","focusOnAlt","autoFocusMenu","onAutoFocusMenuChange","orientation"]),[s,a]=vt({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:v=>{var w;return(w=o.onValueChange)==null?void 0:w.call(o,v)}}),[l,c]=j(),[u,d]=j(new Map),[f,h]=vt({value:()=>o.autoFocusMenu,defaultValue:()=>!1,onChange:o.onAutoFocusMenuChange}),p=()=>{var v;return s()&&f()&&!((v=s())!=null&&v.includes("link-trigger-"))},y={dataset:V(()=>({"data-expanded":p()?"":void 0,"data-closed":p()?void 0:""})),value:s,setValue:a,lastValue:l,setLastValue:c,menus:()=>new Set([...u().keys()]),menuRefs:()=>[...u().values()].flat(),menuRefMap:()=>u(),registerMenu:(v,w)=>{d(S=>{const C=new Map;return S.forEach((O,L)=>C.set(L,O)),C.set(v,w),C})},unregisterMenu:v=>{d(w=>{w.delete(v);const S=new Map;return w.forEach((C,O)=>S.set(O,C)),S})},nextMenu:()=>{const v=[...u().keys()];if(s()==null){a(v[0]);return}const w=v.indexOf(s());if(w===v.length-1){o.loop&&a(v[0]);return}a(v[w+1])},previousMenu:()=>{const v=[...u().keys()];if(s()==null){a(v[0]);return}const w=v.indexOf(s());if(w===0){o.loop&&a(v[v.length-1]);return}a(v[w-1])},closeMenu:()=>{h(!1),a(void 0)},autoFocusMenu:()=>f(),setAutoFocusMenu:h,generateId:dt(()=>i.id),orientation:()=>o.orientation};H(()=>{s()==null&&h(!1)}),Yc({onInteractOutside:()=>{y.closeMenu(),setTimeout(()=>y.closeMenu())},shouldExcludeElement:v=>[t,...u().values()].flat().some(w=>Pe(w,v))},()=>t);const m=v=>{v.key==="Alt"&&(v.preventDefault(),v.stopPropagation(),y.value()===void 0?y.nextMenu():y.closeMenu())};return H(()=>{o.focusOnAlt?window.addEventListener("keydown",m):window.removeEventListener("keydown",m),W(()=>{window.removeEventListener("keydown",m)})}),H(()=>{s()!=null&&c(s())}),b(Td.Provider,{value:y,get children(){return b(le,M({as:"div",ref(v){var w=ve(S=>t=S,o.ref);typeof w=="function"&&w(v)},role:"menubar",get"data-orientation"(){return o.orientation},get"aria-orientation"(){return o.orientation}},i))}})}function yw(e){const t=Jn();if(Fo()===void 0&&Object.hasOwn(e,"href")){const r=t.generateId("link-trigger-")+Ee();return b(jd,{value:r,get children(){return b(Ul,e)}})}return Ul(e)}var ww={};Ot(ww,{Root:()=>aa,Separator:()=>bw});function aa(e){let t;const n=Q({orientation:"horizontal"},e),[r,o]=_(n,["ref","orientation"]),i=xo(()=>t,()=>"hr");return b(le,M({as:"hr",ref(s){var a=ve(l=>t=l,r.ref);typeof a=="function"&&a(s)},get role(){return i()!=="hr"?"separator":void 0},get"aria-orientation"(){return r.orientation==="vertical"?"vertical":void 0},get"data-orientation"(){return r.orientation}},o))}var bw=aa,zd=ie("<li role=presentation>"),Sw=ie("<nav>");function xw(e){let t;const n=Jn(),r=Q({size:15},e),[o,i]=_(r,["ref"]),[s,a]=j(0),l=()=>n.orientation()==="horizontal";return H(Ce(n.value,c=>{setTimeout(()=>{if(!c||c.includes("link-trigger-"))return;const u=document.querySelector(`[data-kb-menu-value-trigger="${c}"]`);if(!u||!t)return;const d=u.getBoundingClientRect()[l()?"x":"y"]+u.getBoundingClientRect()[l()?"width":"height"]/2,f=window.getComputedStyle(t),h=t.getBoundingClientRect()[l()?"x":"y"]+t.getBoundingClientRect()[l()?"width":"height"]/2-Number.parseFloat(f.transform.split(",")[l()?4:5]);a(d-h)})})),b(Mo,M({ref(c){var u=ve(d=>t=d,o.ref);typeof u=="function"&&u(c)},get style(){return{transform:`translate${l()?"X":"Y"}(${s()}px)`,color:"red"}}},i))}function Bd(e){const t=Kr(),n=Jn(),r=St(),[o,i]=j(),[s,a]=_(e,["onPointerEnter","onPointerLeave"]),l=u=>{ne(u,s.onPointerEnter),t.cancelLeaveTimer()},c=u=>{ne(u,s.onPointerLeave),t.startLeaveTimer()};return H(Ce(n.value,u=>{po(()=>{if(!u||u.includes("link-trigger-")){t.setPreviousMenu(void 0);return}if(u===r.value()){if(t.previousMenu()!=null){const p=[...n.menus()],g=p.indexOf(t.previousMenu()),y=p.indexOf(u);g<y?i("from-end"):i("from-start")}else i(void 0);t.setPreviousMenu(u);return}const d=[...n.menus()],f=d.indexOf(t.previousMenu()),h=d.indexOf(u);f>h?i("to-end"):i("to-start")})})),b(Zy,M({as:"ul",onPointerEnter:l,onPointerLeave:c,onInteractOutside:()=>{t.setAutoFocusMenu(!1)},get"data-motion"(){return o()}},a))}function Hd(e){return(()=>{var t=zd();return X(t,b(tw,M({as:"a"},e))),t})()}function Gd(e){const t=Jn(),n=Kr(),[r,o]=_(e,["value"]),i=Ee(),s=t.generateId(`navigation-menu-menu-${i}`),a=Q({id:s},o),l=()=>r.value??i,[c,u]=j(!1),d=()=>{var f,h;t.value()!==l()&&u(!1),(f=n.viewportRef())==null||f.removeEventListener("animationend",d),(h=n.viewportRef())==null||h.removeEventListener("animationcancel",d)};return H(Ce(t.value,f=>{if(f===l())u(!0);else{const h=n.viewportRef();if(!h||["","none"].includes(window.getComputedStyle(h).animationName)){u(!1);return}h.addEventListener("animationend",d)}})),b(jd,M({get forceMount(){return c()},get value(){return l()}},a))}function Ud(e){const t=Kr(),n=At(),[r,o]=_(e,["ref"]);return b(pe,{get when(){return t.viewportPresent()},get children(){return b(iw,M({ref(i){var s=ve(a=>{a&&a.setAttribute("role","presentation")},r.ref);typeof s=="function"&&s(i)},get mount(){return V(()=>n.parentMenuContext()==null)()?t.viewportRef():void 0}},o))}})}function qd(e){const t=Q({delayDuration:200,skipDelayDuration:300},e),[n,r,o]=_(t,["ref","delayDuration","skipDelayDuration","autoFocusMenu","onAutoFocusMenuChange","defaultValue","value","onValueChange","forceMount"],["getAnchorRect","placement","gutter","shift","flip","slide","overlap","sameWidth","fitViewport","hideWhenDetached","detachedPadding","arrowPadding","overflowPadding"]),[i,s]=vt({value:()=>n.value,defaultValue:()=>n.defaultValue,onChange:T=>{var K;return(K=n.onValueChange)==null?void 0:K.call(n,T)}}),[a,l]=vt({value:()=>n.autoFocusMenu,defaultValue:()=>!1,onChange:n.onAutoFocusMenuChange}),[c,u]=j(),[d,f]=j(),[h,p]=j(r.placement??o.orientation==="vertical"?"right":"bottom");H(()=>{p(o.orientation==="vertical"?"right":"bottom")});let g;const[y,m]=j(),[v,w]=j(!1),[S,C]=j(!1);H(()=>{i()&&!i().includes("link-trigger-")&&a()?po(()=>{C(!0),w(!0)}):(C(!1),w(!1))});const O=V(()=>({"data-expanded":S()?"":void 0,"data-closed":S()?void 0:""})),{present:L}=Gn({show:()=>n.forceMount||v()||S(),element:()=>c()??null});H(()=>{L()||k.setPreviousMenu(void 0)});const k={dataset:O,delayDuration:()=>n.delayDuration,skipDelayDuration:()=>n.skipDelayDuration,autoFocusMenu:a,setAutoFocusMenu:l,startLeaveTimer:()=>{g=window.setTimeout(()=>{k.setAutoFocusMenu(!1),s(void 0)},k.skipDelayDuration())},cancelLeaveTimer:()=>{g&&clearTimeout(g)},rootRef:d,setRootRef:f,viewportRef:c,setViewportRef:u,viewportPresent:L,currentPlacement:h,previousMenu:y,setPreviousMenu:m};return b(Dd.Provider,{value:k,get children(){return b(Zn,M({anchorRef:d,contentRef:c,get placement(){return h()},onCurrentPlacementChange:p},r,{get children(){var T=Sw();return X(T,b(vw,M({as:"ul",ref(K){var N=ve(k.setRootRef,n.ref);typeof N=="function"&&N(K)},get value(){return i()??null},onValueChange:s,get autoFocusMenu(){return a()},onAutoFocusMenuChange:l},o))),T}}))}})}function Wd(e){const t=Kr(),n=Fo(),[r,o]=_(e,["onPointerEnter","onPointerLeave","onClick"]);let i;const s=c=>{ne(c,r.onClick),i&&clearTimeout(i)},a=c=>{ne(c,r.onPointerEnter),c.pointerType!=="touch"&&(t.cancelLeaveTimer(),t.dataset()["data-expanded"]!==""&&(i=window.setTimeout(()=>{var u;(u=n==null?void 0:n.triggerRef())==null||u.focus(),setTimeout(()=>{t.setAutoFocusMenu(!0)})},t.delayDuration())))},l=c=>{ne(c,r.onPointerLeave),c.pointerType!=="touch"&&(t.startLeaveTimer(),i&&clearTimeout(i))};return(()=>{var c=zd();return X(c,b(yw,M({onClick:s,onPointerEnter:a,onPointerLeave:l},o))),c})()}function Xd(e){const t=Kr(),n=Jn(),[r,o]=j(),[i,s]=_(e,["ref","style","onEscapeKeyDown"]),a=()=>{n.setAutoFocusMenu(!1),n.closeMenu()},l=f=>{a()},c=Fy(r);H(Ce(()=>n.value()?n.menuRefMap().get(n.value()):void 0,f=>{f===void 0||f[0]===void 0||o(f[0])}));const u=V(f=>{if(!(r()===void 0||!t.viewportPresent()))return c.height()===0?f:c.height()}),d=V(f=>{if(!(r()===void 0||!t.viewportPresent()))return c.width()===0?f:c.width()});return b(pe,{get when(){return t.viewportPresent()},get children(){return b(Zn.Positioner,{role:"presentation",get children(){return b(Eo,M({as:"li",ref(f){var h=ve(t.setViewportRef,i.ref);typeof h=="function"&&h(f)},get excludedElements(){return[t.rootRef]},bypassTopMostLayerCheck:!0,get style(){return ct({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)","--kb-navigation-menu-viewport-height":u()?`${u()}px`:void 0,"--kb-navigation-menu-viewport-width":d()?`${d()}px`:void 0,position:"relative"},i.style)},get onEscapeKeyDown(){return Se([i.onEscapeKeyDown,l])},onDismiss:a,get"data-orientation"(){return n.orientation()}},()=>t.dataset(),s))}})}})}Object.assign(qd,{Arrow:xw,CheckboxItem:Yy,Content:Bd,Group:kd,GroupLabel:ew,Icon:Vd,Item:Hd,ItemDescription:nw,ItemIndicator:rw,ItemLabel:ow,Portal:Ud,RadioGroup:aw,RadioItem:lw,Menu:Gd,Separator:aa,Sub:dw,SubContent:hw,SubTrigger:pw,Trigger:Wd,Viewport:Xd});var Cw=ie('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class="relative top-px ml-1 size-3 transition duration-200 group-data-[expanded]/trigger:rotate-180 group-data-[orientation=vertical]/menu:-rotate-90 group-data-[orientation=vertical]/menu:group-data-[expanded]/trigger:rotate-90"><path d="M6 9l6 6l6 -6">');const Wl=Gd,Xl=e=>{const[t,n]=_(e,["class","children"]);return b(qd,M({gutter:6,get class(){return de("group/menu flex w-max flex-1 list-none items-center justify-center data-[orientation=vertical]:flex-col [&>li]:w-full",t.class)}},n,{get children(){return[V(()=>t.children),b(Ew,{})]}}))},Ql=e=>{const[t,n]=_(e,["class"]);return b(Wd,M({get class(){return de("group/trigger inline-flex h-10 w-full items-center justify-center whitespace-nowrap rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[expanded]:bg-accent/50",t.class)}},n))},Yl=()=>b(Vd,{"aria-hidden":"true",get children(){return Cw()}}),Ew=e=>{const[t,n]=_(e,["class"]);return b(Xd,M({get class(){return de("pointer-events-none z-[1000] flex h-[var(--kb-navigation-menu-viewport-height)] w-[var(--kb-navigation-menu-viewport-width)] origin-[var(--kb-menu-content-transform-origin)] items-center justify-center overflow-x-clip overflow-y-visible rounded-md border bg-popover opacity-0 shadow-lg data-[expanded]:pointer-events-auto data-[orientation=vertical]:overflow-y-clip data-[orientation=vertical]:overflow-x-visible data-[expanded]:rounded-md","animate-content-hide transition-[width,height] duration-200 ease-in data-[expanded]:animate-content-show data-[expanded]:opacity-100 data-[expanded]:ease-out",t.class)}},n))},Zl=e=>{const[t,n]=_(e,["class"]);return b(Ud,{get children(){return b(Bd,M({get class(){return de("pointer-events-none absolute left-0 top-0 box-border p-1 focus:outline-none data-[expanded]:pointer-events-auto","data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out","data-[orientation=horizontal]:data-[motion=from-start]:slide-in-from-left-52 data-[orientation=horizontal]:data-[motion=to-end]:slide-out-to-right-52","data-[orientation=horizontal]:data-[motion=from-end]:slide-in-from-right-52 data-[orientation=horizontal]:data-[motion=to-start]:slide-out-to-left-52","data-[orientation=vertical]:data-[motion=from-start]:slide-in-from-top-52 data-[orientation=vertical]:data-[motion=to-end]:slide-out-to-bottom-52","data-[orientation=vertical]:data-[motion=from-end]:slide-in-from-bottom-52 data-[orientation=vertical]:data-[motion=to-start]:slide-out-to-bottom-52",t.class)}},n))}})},Jl=e=>{const[t,n]=_(e,["class"]);return b(Hd,M({get class(){return de("text-sm block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",t.class)}},n))};/**
|
|
7
|
+
* table-core
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) TanStack
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the MIT license found in the
|
|
12
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
13
|
+
*
|
|
14
|
+
* @license MIT
|
|
15
|
+
*/function Ht(e,t){return typeof e=="function"?e(t):e}function We(e,t){return n=>{t.setState(r=>({...r,[e]:Ht(n,r[e])}))}}function Oo(e){return e instanceof Function}function Rw(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Pw(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 Z(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((u,d)=>r[d]!==u)))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 u=Math.round((Date.now()-s)*100)/100,d=Math.round((Date.now()-c)*100)/100,f=d/16,h=(p,g)=>{for(p=String(p);p.length<g;)p=" "+p;return p};console.info(`%c⏱ ${h(d,5)} /${h(u,5)} ms`,`
|
|
16
|
+
font-size: .6rem;
|
|
17
|
+
font-weight: bold;
|
|
18
|
+
color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n==null?void 0:n.key)}return o}}function J(e,t,n,r){return{debug:()=>{var o;return(o=e==null?void 0:e.debugAll)!=null?o:e[t]},key:!1,onChange:r}}function Iw(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:Z(()=>[e,n,t,i],(s,a,l,c)=>({table:s,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),J(e.options,"debugCells"))};return e._features.forEach(s=>{s.createCell==null||s.createCell(i,n,t,e)},{}),i}function $w(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,u;if(a.accessorFn?u=a.accessorFn:l&&(l.includes(".")?u=f=>{let h=f;for(const g of l.split(".")){var p;h=(p=h)==null?void 0:p[g]}return h}:u=f=>f[a.accessorKey]),!c)throw new Error;let d={id:`${String(c)}`,accessorFn:u,parent:r,depth:n,columnDef:a,columns:[],getFlatColumns:Z(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(h=>h.getFlatColumns())]},J(e.options,"debugColumns")),getLeafColumns:Z(()=>[e._getOrderColumnsFn()],f=>{var h;if((h=d.columns)!=null&&h.length){let p=d.columns.flatMap(g=>g.getLeafColumns());return f(p)}return[d]},J(e.options,"debugColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(d,e);return d}const Ae="debugHeaders";function eu(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 Mw={createTable:e=>{e.getHeaderGroups=Z(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var i,s;const a=(i=r==null?void 0:r.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?i:[],l=(s=o==null?void 0:o.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?s:[],c=n.filter(d=>!(r!=null&&r.includes(d.id))&&!(o!=null&&o.includes(d.id)));return Qr(t,[...a,...c,...l],e)},J(e.options,Ae)),e.getCenterHeaderGroups=Z(()=>[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))),Qr(t,n,e,"center")),J(e.options,Ae)),e.getLeftHeaderGroups=Z(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?o:[];return Qr(t,i,e,"left")},J(e.options,Ae)),e.getRightHeaderGroups=Z(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?o:[];return Qr(t,i,e,"right")},J(e.options,Ae)),e.getFooterGroups=Z(()=>[e.getHeaderGroups()],t=>[...t].reverse(),J(e.options,Ae)),e.getLeftFooterGroups=Z(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),J(e.options,Ae)),e.getCenterFooterGroups=Z(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),J(e.options,Ae)),e.getRightFooterGroups=Z(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),J(e.options,Ae)),e.getFlatHeaders=Z(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),J(e.options,Ae)),e.getLeftFlatHeaders=Z(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),J(e.options,Ae)),e.getCenterFlatHeaders=Z(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),J(e.options,Ae)),e.getRightFlatHeaders=Z(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),J(e.options,Ae)),e.getCenterLeafHeaders=Z(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),J(e.options,Ae)),e.getLeftLeafHeaders=Z(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),J(e.options,Ae)),e.getRightLeafHeaders=Z(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),J(e.options,Ae)),e.getLeafHeaders=Z(()=>[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(u=>u.getLeafHeaders()).flat()},J(e.options,Ae))}};function Qr(e,t,n,r){var o,i;let s=0;const a=function(f,h){h===void 0&&(h=1),s=Math.max(s,h),f.filter(p=>p.getIsVisible()).forEach(p=>{var g;(g=p.columns)!=null&&g.length&&a(p.columns,h+1)},0)};a(e);let l=[];const c=(f,h)=>{const p={depth:h,id:[r,`${h}`].filter(Boolean).join("_"),headers:[]},g=[];f.forEach(y=>{const m=[...g].reverse()[0],v=y.column.depth===p.depth;let w,S=!1;if(v&&y.column.parent?w=y.column.parent:(w=y.column,S=!0),m&&(m==null?void 0:m.column)===w)m.subHeaders.push(y);else{const C=eu(n,w,{id:[r,h,w.id,y==null?void 0:y.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${g.filter(O=>O.column===w).length}`:void 0,depth:h,index:g.length});C.subHeaders.push(y),g.push(C)}p.headers.push(y),y.headerGroup=p}),l.push(p),h>0&&c(g,h-1)},u=t.map((f,h)=>eu(n,f,{depth:s,index:h}));c(u,s-1),l.reverse();const d=f=>f.filter(p=>p.column.getIsVisible()).map(p=>{let g=0,y=0,m=[0];p.subHeaders&&p.subHeaders.length?(m=[],d(p.subHeaders).forEach(w=>{let{colSpan:S,rowSpan:C}=w;g+=S,m.push(C)})):g=1;const v=Math.min(...m);return y=y+v,p.colSpan=g,p.rowSpan=y,{colSpan:g,rowSpan:y}});return d((o=(i=l[0])==null?void 0:i.headers)!=null?o:[]),l}const la=(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:()=>Pw(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],c=a;for(;;){const u=c.getParentRow();if(!u)break;l.push(u),c=u}return l.reverse()},getAllCells:Z(()=>[e.getAllLeafColumns()],l=>l.map(c=>Iw(e,a,c,c.id)),J(e.options,"debugRows")),_getAllCellsByColumnId:Z(()=>[a.getAllCells()],l=>l.reduce((c,u)=>(c[u.column.id]=u,c),{}),J(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},Fw={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()}}},Qd=(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))};Qd.autoRemove=e=>it(e);const Yd=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};Yd.autoRemove=e=>it(e);const Zd=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};Zd.autoRemove=e=>it(e);const Jd=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};Jd.autoRemove=e=>it(e)||!(e!=null&&e.length);const ef=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});ef.autoRemove=e=>it(e)||!(e!=null&&e.length);const tf=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});tf.autoRemove=e=>it(e)||!(e!=null&&e.length);const nf=(e,t,n)=>e.getValue(t)===n;nf.autoRemove=e=>it(e);const rf=(e,t,n)=>e.getValue(t)==n;rf.autoRemove=e=>it(e);const ua=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};ua.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]};ua.autoRemove=e=>it(e)||it(e[0])&&it(e[1]);const Rt={includesString:Qd,includesStringSensitive:Yd,equalsString:Zd,arrIncludes:Jd,arrIncludesAll:ef,arrIncludesSome:tf,equals:nf,weakEquals:rf,inNumberRange:ua};function it(e){return e==null||e===""}const Ow={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:We("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?Rt.includesString:typeof r=="number"?Rt.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Rt.equals:Array.isArray(r)?Rt.arrIncludes:Rt.weakEquals},e.getFilterFn=()=>{var n,r;return Oo(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:Rt[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==null?void 0:r.find(u=>u.id===e.id),s=Ht(n,i?i.value:void 0);if(tu(o,s,e)){var a;return(a=r==null?void 0:r.filter(u=>u.id!==e.id))!=null?a:[]}const l={id:e.id,value:s};if(i){var c;return(c=r==null?void 0:r.map(u=>u.id===e.id?l:u))!=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=Ht(t,o))==null?void 0:i.filter(s=>{const a=n.find(l=>l.id===s.id);if(a){const l=a.getFilterFn();if(tu(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 tu(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Aw=(e,t,n)=>n.reduce((r,o)=>{const i=o.getValue(e);return r+(typeof i=="number"?i:0)},0),Tw=(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},Dw=(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},Lw=(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]},_w=(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},kw=(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!Rw(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},Vw=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Nw=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,Kw=(e,t)=>t.length,Wo={sum:Aw,min:Tw,max:Dw,extent:Lw,mean:_w,median:kw,unique:Vw,uniqueCount:Nw,count:Kw},jw={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:We("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==null?void 0:n.getValue(e.id);if(typeof r=="number")return Wo.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Wo.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Oo(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:Wo[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 zw(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 Bw={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:We("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Z(n=>[yr(t,n)],n=>n.findIndex(r=>r.id===e.id),J(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=yr(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=yr(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=Z(()=>[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(u=>u.id===l);c>-1&&i.push(a.splice(c,1)[0])}i=[...i,...a]}return zw(i,n,r)},J(e.options,"debugTable"))}},Xo=()=>({left:[],right:[]}),Hw={getInitialState:e=>({columnPinning:Xo(),...e}),getDefaultOptions:e=>({onColumnPinningChange:We("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==null?void 0:o.left)!=null?a:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((l=o==null?void 0:o.right)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(n==="left"){var c,u;return{left:[...((c=o==null?void 0:o.left)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((u=o==null?void 0:o.right)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((i=o==null?void 0:o.left)!=null?i:[]).filter(d=>!(r!=null&&r.includes(d))),right:((s=o==null?void 0:o.right)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d)))}})},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==null?void 0:r.includes(a)),s=n.some(a=>o==null?void 0: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=Z(()=>[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))},J(t.options,"debugRows")),e.getLeftVisibleCells=Z(()=>[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"})),J(t.options,"debugRows")),e.getRightVisibleCells=Z(()=>[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"})),J(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?Xo():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:Xo())},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=Z(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),J(e.options,"debugColumns")),e.getRightLeafColumns=Z(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),J(e.options,"debugColumns")),e.getCenterLeafColumns=Z(()=>[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))},J(e.options,"debugColumns"))}},Yr={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Qo=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Gw={getDefaultColumnDef:()=>Yr,getInitialState:e=>({columnSizing:{},columnSizingInfo:Qo(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:We("columnSizing",e),onColumnSizingInfoChange:We("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:Yr.minSize,(r=i??e.columnDef.size)!=null?r:Yr.size),(o=e.columnDef.maxSize)!=null?o:Yr.maxSize)},e.getStart=Z(n=>[n,yr(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,i)=>o+i.getSize(),0),J(t.options,"debugColumns")),e.getAfter=Z(n=>[n,yr(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,i)=>o+i.getSize(),0),J(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==null?void 0: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(m=>[m.column.id,m.column.getSize()]):[[r.id,r.getSize()]],l=Yo(i)?Math.round(i.touches[0].clientX):i.clientX,c={},u=(m,v)=>{typeof v=="number"&&(t.setColumnSizingInfo(w=>{var S,C;const O=t.options.columnResizeDirection==="rtl"?-1:1,L=(v-((S=w==null?void 0:w.startOffset)!=null?S:0))*O,k=Math.max(L/((C=w==null?void 0:w.startSize)!=null?C:0),-.999999);return w.columnSizingStart.forEach(T=>{let[K,N]=T;c[K]=Math.round(Math.max(N+N*k,0)*100)/100}),{...w,deltaOffset:L,deltaPercentage:k}}),(t.options.columnResizeMode==="onChange"||m==="end")&&t.setColumnSizing(w=>({...w,...c})))},d=m=>u("move",m),f=m=>{u("end",m),t.setColumnSizingInfo(v=>({...v,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=n||typeof document<"u"?document:null,p={moveHandler:m=>d(m.clientX),upHandler:m=>{h==null||h.removeEventListener("mousemove",p.moveHandler),h==null||h.removeEventListener("mouseup",p.upHandler),f(m.clientX)}},g={moveHandler:m=>(m.cancelable&&(m.preventDefault(),m.stopPropagation()),d(m.touches[0].clientX),!1),upHandler:m=>{var v;h==null||h.removeEventListener("touchmove",g.moveHandler),h==null||h.removeEventListener("touchend",g.upHandler),m.cancelable&&(m.preventDefault(),m.stopPropagation()),f((v=m.touches[0])==null?void 0:v.clientX)}},y=Uw()?{passive:!1}:!1;Yo(i)?(h==null||h.addEventListener("touchmove",g.moveHandler,y),h==null||h.addEventListener("touchend",g.upHandler,y)):(h==null||h.addEventListener("mousemove",p.moveHandler,y),h==null||h.addEventListener("mouseup",p.upHandler,y)),t.setColumnSizingInfo(m=>({...m,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?Qo():(n=e.initialState.columnSizingInfo)!=null?n:Qo())},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 Zr=null;function Uw(){if(typeof Zr=="boolean")return Zr;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 Zr=e,Zr}function Yo(e){return e.type==="touchstart"}const qw={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:We("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=Z(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),J(t.options,"debugRows")),e.getVisibleCells=Z(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],J(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>Z(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),J(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 yr(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Ww={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()}}},Xw={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:We("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=()=>Rt.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Oo(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Rt[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Qw={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:We("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!=null&&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()}}}},os=0,is=10,Zo=()=>({pageIndex:os,pageSize:is}),Yw={getInitialState:e=>({...e,pagination:{...Zo(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:We("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=>Ht(r,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?Zo():(o=e.initialState.pagination)!=null?o:Zo())},e.setPageIndex=r=>{e.setPagination(o=>{let i=Ht(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?os:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?o:os)},e.resetPageSize=r=>{var o,i;e.setPageSize(r?is:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?o:is)},e.setPageSize=r=>{e.setPagination(o=>{const i=Math.max(1,Ht(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=Ht(r,(i=e.options.pageCount)!=null?i:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...o,pageCount:s}}),e.getPageOptions=Z(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((i,s)=>s)),o},J(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}}},Jo=()=>({top:[],bottom:[]}),Zw={getInitialState:e=>({rowPinning:Jo(),...e}),getDefaultOptions:e=>({onRowPinningChange:We("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,u;if(n==="bottom"){var d,f;return{top:((d=l==null?void 0:l.top)!=null?d:[]).filter(g=>!(a!=null&&a.has(g))),bottom:[...((f=l==null?void 0:l.bottom)!=null?f:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)]}}if(n==="top"){var h,p;return{top:[...((h=l==null?void 0:l.top)!=null?h:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)],bottom:((p=l==null?void 0:l.bottom)!=null?p:[]).filter(g=>!(a!=null&&a.has(g)))}}return{top:((c=l==null?void 0:l.top)!=null?c:[]).filter(g=>!(a!=null&&a.has(g))),bottom:((u=l==null?void 0:l.bottom)!=null?u:[]).filter(g=>!(a!=null&&a.has(g)))}})},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==null?void 0:r.includes(a)),s=n.some(a=>o==null?void 0: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==null?void 0: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?Jo():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:Jo())},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=Z(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),J(e.options,"debugRows")),e.getBottomRows=Z(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),J(e.options,"debugRows")),e.getCenterRows=Z(()=>[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))},J(e.options,"debugRows"))}},Jw={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:We("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=>{ss(o,i.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Z(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?ei(e,n):{rows:[],flatRows:[],rowsById:{}},J(e.options,"debugTable")),e.getFilteredSelectedRowModel=Z(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?ei(e,n):{rows:[],flatRows:[],rowsById:{}},J(e.options,"debugTable")),e.getGroupedSelectedRowModel=Z(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?ei(e,n):{rows:[],flatRows:[],rowsById:{}},J(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 ss(a,e.id,n,(s=r==null?void 0:r.selectChildren)!=null?s:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return ca(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return as(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return as(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)}}}},ss=(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=>ss(e,a.id,n,r,o))};function ei(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(s,a){return s.map(l=>{var c;const u=ca(l,n);if(u&&(r.push(l),o[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:i(l.subRows)}),u)return l}).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function ca(e,t){var n;return(n=t[e.id])!=null?n:!1}function as(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()&&(ca(s,t)?i=!0:o=!1),s.subRows&&s.subRows.length)){const a=as(s,t);a==="all"?i=!0:(a==="some"&&(i=!0),o=!1)}}),o?"all":i?"some":!1}const ls=/([0-9]+)/gm,eb=(e,t,n)=>of(Qt(e.getValue(n)).toLowerCase(),Qt(t.getValue(n)).toLowerCase()),tb=(e,t,n)=>of(Qt(e.getValue(n)),Qt(t.getValue(n))),nb=(e,t,n)=>da(Qt(e.getValue(n)).toLowerCase(),Qt(t.getValue(n)).toLowerCase()),rb=(e,t,n)=>da(Qt(e.getValue(n)),Qt(t.getValue(n))),ob=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},ib=(e,t,n)=>da(e.getValue(n),t.getValue(n));function da(e,t){return e===t?0:e>t?1:-1}function Qt(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function of(e,t){const n=e.split(ls).filter(Boolean),r=t.split(ls).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 ur={alphanumeric:eb,alphanumericCaseSensitive:tb,text:nb,textCaseSensitive:rb,datetime:ob,basic:ib},sb={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:We("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==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return ur.datetime;if(typeof i=="string"&&(r=!0,i.split(ls).length>1))return ur.alphanumeric}return r?ur.text:ur.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Oo(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:ur[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=typeof n<"u"&&n!==null;t.setSorting(s=>{const a=s==null?void 0:s.find(h=>h.id===e.id),l=s==null?void 0:s.findIndex(h=>h.id===e.id);let c=[],u,d=i?n:o==="desc";if(s!=null&&s.length&&e.getCanMultiSort()&&r?a?u="toggle":u="add":s!=null&&s.length&&l!==s.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(i||o||(u="remove")),u==="add"){var f;c=[...s,{id:e.id,desc:d}],c.splice(0,c.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=s.map(h=>h.id===e.id?{...h,desc:d}:h):u==="remove"?c=s.filter(h=>h.id!==e.id):c=[{id:e.id,desc:d}];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())}},ab=[Mw,qw,Bw,Hw,Fw,Ow,Ww,Xw,sb,jw,Qw,Yw,Zw,Jw,Gw];function lb(e){var t,n;const r=[...ab,...(t=e._features)!=null?t:[]];let o={_features:r};const i=o._features.reduce((f,h)=>Object.assign(f,h.getDefaultOptions==null?void 0:h.getDefaultOptions(o)),{}),s=f=>o.options.mergeOptions?o.options.mergeOptions(i,f):{...i,...f};let l={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(f=>{var h;l=(h=f.getInitialState==null?void 0:f.getInitialState(l))!=null?h:l});const c=[];let u=!1;const d={_features:r,options:{...i,...e},initialState:l,_queue:f=>{c.push(f),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{o.setState(o.initialState)},setOptions:f=>{const h=Ht(f,o.options);o.options=s(h)},getState:()=>o.options.state,setState:f=>{o.options.onStateChange==null||o.options.onStateChange(f)},_getRowId:(f,h,p)=>{var g;return(g=o.options.getRowId==null?void 0:o.options.getRowId(f,h,p))!=null?g:`${p?[p.id,h].join("."):h}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(f,h)=>{let p=(h?o.getPrePaginationRowModel():o.getRowModel()).rowsById[f];if(!p&&(p=o.getCoreRowModel().rowsById[f],!p))throw new Error;return p},_getDefaultColumnDef:Z(()=>[o.options.defaultColumn],f=>{var h;return f=(h=f)!=null?h:{},{header:p=>{const g=p.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:p=>{var g,y;return(g=(y=p.renderValue())==null||y.toString==null?void 0:y.toString())!=null?g:null},...o._features.reduce((p,g)=>Object.assign(p,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...f}},J(e,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:Z(()=>[o._getColumnDefs()],f=>{const h=function(p,g,y){return y===void 0&&(y=0),p.map(m=>{const v=$w(o,m,y,g),w=m;return v.columns=w.columns?h(w.columns,v,y+1):[],v})};return h(f)},J(e,"debugColumns")),getAllFlatColumns:Z(()=>[o.getAllColumns()],f=>f.flatMap(h=>h.getFlatColumns()),J(e,"debugColumns")),_getAllFlatColumnsById:Z(()=>[o.getAllFlatColumns()],f=>f.reduce((h,p)=>(h[p.id]=p,h),{}),J(e,"debugColumns")),getAllLeafColumns:Z(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(f,h)=>{let p=f.flatMap(g=>g.getLeafColumns());return h(p)},J(e,"debugColumns")),getColumn:f=>o._getAllFlatColumnsById()[f]};Object.assign(o,d);for(let f=0;f<o._features.length;f++){const h=o._features[f];h==null||h.createTable==null||h.createTable(o)}return o}function ub(){return e=>Z(()=>[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 u=la(e,e._getRowId(o[c],c,s),o[c],c,i,void 0,s==null?void 0:s.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),e.options.getSubRows){var l;u.originalSubRows=e.options.getSubRows(o[c],c),(l=u.originalSubRows)!=null&&l.length&&(u.subRows=r(u.originalSubRows,i+1,u))}}return a};return n.rows=r(t),n},J(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function cb(e){const t=[],n=r=>{var o;t.push(r),(o=r.subRows)!=null&&o.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function db(e,t,n){return n.options.filterFromLeafRows?fb(e,t,n):hb(e,t,n)}function fb(e,t,n){var r;const o=[],i={},s=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,a=function(l,c){c===void 0&&(c=0);const u=[];for(let f=0;f<l.length;f++){var d;let h=l[f];const p=la(n,h.id,h.original,h.index,h.depth,void 0,h.parentId);if(p.columnFilters=h.columnFilters,(d=h.subRows)!=null&&d.length&&c<s){if(p.subRows=a(h.subRows,c+1),h=p,t(h)&&!p.subRows.length){u.push(h),i[h.id]=h,o.push(h);continue}if(t(h)||p.subRows.length){u.push(h),i[h.id]=h,o.push(h);continue}}else h=p,t(h)&&(u.push(h),i[h.id]=h,o.push(h))}return u};return{rows:a(e),flatRows:o,rowsById:i}}function hb(e,t,n){var r;const o=[],i={},s=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,a=function(l,c){c===void 0&&(c=0);const u=[];for(let f=0;f<l.length;f++){let h=l[f];if(t(h)){var d;if((d=h.subRows)!=null&&d.length&&c<s){const g=la(n,h.id,h.original,h.index,h.depth,void 0,h.parentId);g.subRows=a(h.subRows,c+1),h=g}u.push(h),o.push(h),i[h.id]=h}}return u};return{rows:a(e),flatRows:o,rowsById:i}}function gb(){return e=>Z(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let f=0;f<t.flatRows.length;f++)t.flatRows[f].columnFilters={},t.flatRows[f].columnFiltersMeta={};return t}const o=[],i=[];(n??[]).forEach(f=>{var h;const p=e.getColumn(f.id);if(!p)return;const g=p.getFilterFn();g&&o.push({id:f.id,filterFn:g,resolvedValue:(h=g.resolveFilterValue==null?void 0:g.resolveFilterValue(f.value))!=null?h:f.value})});const s=(n??[]).map(f=>f.id),a=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter(f=>f.getCanGlobalFilter());r&&a&&l.length&&(s.push("__global__"),l.forEach(f=>{var h;i.push({id:f.id,filterFn:a,resolvedValue:(h=a.resolveFilterValue==null?void 0:a.resolveFilterValue(r))!=null?h:r})}));let c,u;for(let f=0;f<t.flatRows.length;f++){const h=t.flatRows[f];if(h.columnFilters={},o.length)for(let p=0;p<o.length;p++){c=o[p];const g=c.id;h.columnFilters[g]=c.filterFn(h,g,c.resolvedValue,y=>{h.columnFiltersMeta[g]=y})}if(i.length){for(let p=0;p<i.length;p++){u=i[p];const g=u.id;if(u.filterFn(h,g,u.resolvedValue,y=>{h.columnFiltersMeta[g]=y})){h.columnFilters.__global__=!0;break}}h.columnFilters.__global__!==!0&&(h.columnFilters.__global__=!1)}}const d=f=>{for(let h=0;h<s.length;h++)if(f.columnFilters[s[h]]===!1)return!1;return!0};return db(t.rows,d,e)},J(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function pb(e){return t=>Z(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:o,pageIndex:i}=n;let{rows:s,flatRows:a,rowsById:l}=r;const c=o*i,u=c+o;s=s.slice(c,u);let d;t.options.paginateExpandedRows?d={rows:s,flatRows:a,rowsById:l}:d=cb({rows:s,flatRows:a,rowsById:l}),d.flatRows=[];const f=h=>{d.flatRows.push(h),h.subRows.length&&h.subRows.forEach(f)};return d.rows.forEach(f),d},J(t.options,"debugTable"))}/**
|
|
19
|
+
* solid-table
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) TanStack
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
25
|
+
*
|
|
26
|
+
* @license MIT
|
|
27
|
+
*/function nu(e,t){return e?typeof e=="function"?b(e,t):e:null}function mb(e){const t=M({state:{},onStateChange:()=>{},renderFallbackValue:null,mergeOptions:(i,s)=>M(i,s)},e),n=lb(t),[r,o]=wo(n.initialState);return Mt(()=>{n.setOptions(i=>M(i,e,{state:M(r,e.state||{}),onStateChange:s=>{o(s),e.onStateChange==null||e.onStateChange(s)}}))}),n}var Ao=ie("<li>"),vb=ie("<ul>"),yb={};Ot(yb,{Ellipsis:()=>fa,Item:()=>ha,Items:()=>ga,Next:()=>pa,Pagination:()=>wb,Previous:()=>ma,Root:()=>va});function fa(e){return(()=>{var t=Ao();return X(t,b(le,M({as:"div"},e))),t})()}var sf=we();function To(){const e=ye(sf);if(e===void 0)throw new Error("[kobalte]: `usePaginationContext` must be used within a `Pagination` component");return e}function ha(e){const t=To(),[n,r]=_(e,["page","onClick"]),o=()=>t.page()===n.page,i=()=>{t.setPage(n.page)};return(()=>{var s=Ao();return X(s,b(wt,M({get"aria-current"(){return o()?"page":void 0},get"data-current"(){return o()?"":void 0},get onClick(){return Se([n.onClick,i])}},r))),s})()}function ga(e){const t=To(),n=V(()=>{const{count:r,siblingCount:o,page:i,fixedItems:s,showFirst:a,showLast:l}=t,c=r()<2*o()+(s()?6:4);if(c)return{renderItemsDirectly:c};const u=a()&&i()-1>o(),d=l()&&r()-i()>o();let f=i()-(a()?2:1)>o(),h=r()-i()-(l()?1:0)>o(),p=Math.min(i()-1,o()),g=Math.min(r()-i(),o());if(s()!==!1){const y=p,m=g;p+=Math.max(o()-m,0),g+=Math.max(o()-y,0),u||g++,d||p++,s()===!0&&(f||g++,h||p++),i()-p-(a()?2:1)===1&&(f=!1,p++),r()-i()-g-(l()?1:0)===1&&(h=!1,g++)}return{showFirst:u,showLast:d,showFirstEllipsis:f,showLastEllipsis:h,previousSiblingCount:p,nextSiblingCount:g,renderItemsDirectly:c}});return b(pe,{get when(){return n().renderItemsDirectly},get fallback(){return[b(pe,{get when(){return n().showFirst},get children(){return t.renderItem(1)}}),b(pe,{get when(){return n().showFirstEllipsis},get children(){return t.renderEllipsis()}}),b(rt,{get each(){return[...Array(n().previousSiblingCount).keys()].reverse()},children:r=>V(()=>t.renderItem(t.page()-(r+1)))}),V(()=>t.renderItem(t.page())),b(rt,{get each(){return[...Array(n().nextSiblingCount).keys()]},children:r=>V(()=>t.renderItem(t.page()+(r+1)))}),b(pe,{get when(){return n().showLastEllipsis},get children(){return t.renderEllipsis()}}),b(pe,{get when(){return n().showLast},get children(){return t.renderItem(t.count())}})]},get children(){return b(rt,{get each(){return[...Array(t.count()).keys()]},children:r=>V(()=>t.renderItem(r+1))})}})}function pa(e){const t=To(),[n,r]=_(e,["onClick"]),o=()=>{t.setPage(t.page()+1)},i=()=>t.page()===t.count();return(()=>{var s=Ao();return X(s,b(wt,M({get tabIndex(){return i()||t.page()===t.count()?-1:void 0},get disabled(){return i()},get"aria-disabled"(){return i()||void 0},get"data-disabled"(){return i()?"":void 0},get onClick(){return Se([n.onClick,o])}},r))),s})()}function ma(e){const t=To(),[n,r]=_(e,["onClick"]),o=()=>{t.setPage(t.page()-1)},i=()=>t.page()===1;return(()=>{var s=Ao();return X(s,b(wt,M({get tabIndex(){return i()||t.page()===1?-1:void 0},get disabled(){return i()},get"aria-disabled"(){return i()||void 0},get"data-disabled"(){return i()?"":void 0},get onClick(){return Se([n.onClick,o])}},r))),s})()}function va(e){const t=`pagination-${Ee()}`,n=Q({id:t},e),[r,o]=_(n,["page","defaultPage","onPageChange","count","siblingCount","showFirst","showLast","fixedItems","itemComponent","ellipsisComponent","disabled","children"]),i=vt({defaultValue:()=>r.defaultPage??1,onChange:r.onPageChange,value:()=>r.page}),s={count:()=>r.count,siblingCount:()=>r.siblingCount??1,showFirst:()=>r.showFirst??!0,showLast:()=>r.showLast??!0,fixedItems:()=>r.fixedItems??!1,isDisabled:()=>r.disabled??!1,renderItem:a=>r.itemComponent({page:a}),renderEllipsis:r.ellipsisComponent,page:()=>Math.min(i[0]()??1,r.count),setPage:i[1]};return b(sf.Provider,{value:s,get children(){return b(le,M({as:"nav",get"data-disabled"(){return r.disabled?"":void 0}},o,{get children(){var a=vb();return X(a,()=>r.children),a}}))}})}var wb=Object.assign(va,{Ellipsis:fa,Item:ha,Items:ga,Next:pa,Previous:ma});const Do=_r("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"size-10"}},defaultVariants:{variant:"default",size:"default"}}),ru=e=>{const[t,n]=_(e,["variant","size","class"]);return b(wt,M({get class(){return de(Do({variant:t.variant,size:t.size}),t.class)}},n))};var bb=ie('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class=size-4><circle cx=12 cy=12 r=1></circle><circle cx=19 cy=12 r=1></circle><circle cx=5 cy=12 r=1>'),Sb=ie("<span class=sr-only>More pages"),xb=ie('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class=size-4><path d="M15 6l-6 6l6 6">'),Cb=ie("<span>Previous"),Eb=ie("<span>Next"),Rb=ie('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class=size-4><path d="M9 6l6 6l-6 6">');const Pb=ga,Ib=e=>{const[t,n]=_(e,["class"]);return b(va,M({get class(){return de("[&>*]:flex [&>*]:flex-row [&>*]:items-center [&>*]:gap-1",t.class)}},n))},$b=e=>{const[t,n]=_(e,["class"]);return b(ha,M({get class(){return de(Do({variant:"ghost"}),"size-10 data-[current]:border",t.class)}},n))},Mb=e=>{const[t,n]=_(e,["class"]);return b(fa,M({get class(){return de("flex size-10 items-center justify-center",t.class)}},n,{get children(){return[bb(),Sb()]}}))},Fb=e=>{const[t,n]=_(e,["class","children"]);return b(ma,M({get class(){return de(Do({variant:"ghost"}),"gap-1 pl-2.5",t.class)}},n,{get children(){return t.children??[xb(),Cb()]}}))},Ob=e=>{const[t,n]=_(e,["class","children"]);return b(pa,M({get class(){return de(Do({variant:"ghost"}),"gap-1 pl-2.5",t.class)}},n,{get children(){return t.children??[Eb(),Rb()]}}))};var Ab=ie('<div class="relative w-full overflow-auto"><table>'),Tb=ie("<thead>"),Db=ie("<tbody>"),Lb=ie("<tr>"),_b=ie("<th>"),kb=ie("<td>");const Vb=e=>{const[t,n]=_(e,["class"]);return(()=>{var r=Ab(),o=r.firstChild;return Je(o,M({get class(){return de("w-full caption-bottom text-sm",t.class)}},n),!1,!1),r})()},Nb=e=>{const[t,n]=_(e,["class"]);return(()=>{var r=Tb();return Je(r,M({get class(){return de("[&_tr]:border-b",t.class)}},n),!1,!1),r})()},Kb=e=>{const[t,n]=_(e,["class"]);return(()=>{var r=Db();return Je(r,M({get class(){return de(t.class)}},n),!1,!1),r})()},ti=e=>{const[t,n]=_(e,["class"]);return(()=>{var r=Lb();return Je(r,M({get class(){return de("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t.class)}},n),!1,!1),r})()},jb=e=>{const[t,n]=_(e,["class"]);return(()=>{var r=_b();return Je(r,M({get class(){return de("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t.class)}},n),!1,!1),r})()},ou=e=>{const[t,n]=_(e,["class"]);return(()=>{var r=kb();return Je(r,M({get class(){return de("p-4 align-middle [&:has([role=checkbox])]:pr-0",t.class)}},n),!1,!1),r})()};var zb=(e,t,n={})=>{let r=`${e}=${t}`;if(e.startsWith("__Secure-")&&!n.secure)throw new Error("__Secure- Cookie must have Secure attributes");if(e.startsWith("__Host-")){if(!n.secure)throw new Error("__Host- Cookie must have Secure attributes");if(n.path!=="/")throw new Error('__Host- Cookie must have Path attributes with "/"');if(n.domain)throw new Error("__Host- Cookie must not have Domain attributes")}if(n&&typeof n.maxAge=="number"&&n.maxAge>=0){if(n.maxAge>3456e4)throw new Error("Cookies Max-Age SHOULD NOT be greater than 400 days (34560000 seconds) in duration.");r+=`; Max-Age=${Math.floor(n.maxAge)}`}if(n.domain&&n.prefix!=="host"&&(r+=`; Domain=${n.domain}`),n.path&&(r+=`; Path=${n.path}`),n.expires){if(n.expires.getTime()-Date.now()>3456e7)throw new Error("Cookies Expires SHOULD NOT be greater than 400 days (34560000 seconds) in the future.");r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+="; HttpOnly"),n.secure&&(r+="; Secure"),n.sameSite&&(r+=`; SameSite=${n.sameSite.charAt(0).toUpperCase()+n.sameSite.slice(1)}`),n.partitioned){if(!n.secure)throw new Error("Partitioned Cookie must have Secure attributes");r+="; Partitioned"}return r},Bb=(e,t,n)=>(t=encodeURIComponent(t),zb(e,t,n)),Hb=(e,t)=>(e=e.replace(/\/+$/,""),e=e+"/",t=t.replace(/^\/+/,""),e+t),us=(e,t)=>{for(const[n,r]of Object.entries(t)){const o=new RegExp("/:"+n+"(?:{[^/]+})?\\??");e=e.replace(o,r?`/${r}`:"")}return e},Gb=(e,t)=>{switch(t){case"ws":return e.replace(/^http/,"ws");case"http":return e.replace(/^ws/,"http")}},Ub=e=>/^https?:\/\/[^\/]+?\/index$/.test(e)?e.replace(/\/index$/,"/"):e.replace(/\/index$/,"");function Jr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function af(e,t){if(!Jr(e)&&!Jr(t))return t;const n={...e};for(const r in t){const o=t[r];Jr(n[r])&&Jr(o)?n[r]=af(n[r],o):n[r]=o}return n}var lf=(e,t)=>new Proxy(()=>{},{get(r,o){if(!(typeof o!="string"||o==="then"))return lf(e,[...t,o])},apply(r,o,i){return e({path:t,args:i})}}),qb=class{constructor(e,t){Re(this,"url");Re(this,"method");Re(this,"queryParams");Re(this,"pathParams",{});Re(this,"rBody");Re(this,"cType");Re(this,"fetch",async(e,t)=>{if(e){if(e.query){for(const[a,l]of Object.entries(e.query))if(l!==void 0)if(this.queryParams||(this.queryParams=new URLSearchParams),Array.isArray(l))for(const c of l)this.queryParams.append(a,c);else this.queryParams.set(a,l)}if(e.form){const a=new FormData;for(const[l,c]of Object.entries(e.form))if(Array.isArray(c))for(const u of c)a.append(l,u);else a.append(l,c);this.rBody=a}e.json&&(this.rBody=JSON.stringify(e.json),this.cType="application/json"),e.param&&(this.pathParams=e.param)}let n=this.method.toUpperCase();const r={...(e==null?void 0:e.header)??{},...typeof(t==null?void 0:t.headers)=="function"?await t.headers():t!=null&&t.headers?t.headers:{}};if(e!=null&&e.cookie){const a=[];for(const[l,c]of Object.entries(e.cookie))a.push(Bb(l,c,{path:"/"}));r.Cookie=a.join(",")}this.cType&&(r["Content-Type"]=this.cType);const o=new Headers(r??void 0);let i=this.url;i=Ub(i),i=us(i,this.pathParams),this.queryParams&&(i=i+"?"+this.queryParams.toString()),n=this.method.toUpperCase();const s=!(n==="GET"||n==="HEAD");return((t==null?void 0:t.fetch)||fetch)(i,{body:s?this.rBody:void 0,method:n,headers:o,...t==null?void 0:t.init})});this.url=e,this.method=t}},Wb=(e,t)=>lf(function n(r){var c;const o=[...r.path];if(o[o.length-1]==="toString")return o[o.length-2]==="name"?o[o.length-3]||"":n.toString();if(o[o.length-1]==="valueOf")return o[o.length-2]==="name"?o[o.length-3]||"":n;let i="";if(/^\$/.test(o[o.length-1])){const u=o.pop();u&&(i=u.replace(/^\$/,""))}const s=o.join("/"),a=Hb(e,s);if(i==="url")return r.args[0]&&r.args[0].param?new URL(us(a,r.args[0].param)):new URL(a);if(i==="ws"){const u=Gb(r.args[0]&&r.args[0].param?us(a,r.args[0].param):a,"ws"),d=new URL(u),f=(c=r.args[0])==null?void 0:c.query;return f&&Object.entries(f).forEach(([p,g])=>{Array.isArray(g)?g.forEach(y=>d.searchParams.append(p,y)):d.searchParams.set(p,g)}),((...p)=>(t==null?void 0:t.webSocket)!==void 0&&typeof t.webSocket=="function"?t.webSocket(...p):new WebSocket(...p))(d.toString())}const l=new qb(a,i);if(i){t??(t={});const u=af(t,{...r.args[1]??{}});return l.fetch(r.args[0],u)}return l},[]);const jr=Wb("/rpc"),ni="production",Xb=e=>bo(()=>({queryKey:["bundles",e()],queryFn:async()=>(await jr.bundles.$get({query:e()})).json(),placeholderData:t=>t,staleTime:Number.POSITIVE_INFINITY})),Qb=e=>bo(()=>({queryKey:["bundle",e],queryFn:()=>jr.bundles[":bundleId"].$get({param:{bundleId:e}}).then(t=>t.json()),placeholderData:t=>t,staleTime:Number.POSITIVE_INFINITY})),Yb=()=>bo(()=>({queryKey:["config"],queryFn:()=>jr.config.$get().then(e=>e.json()),staleTime:Number.POSITIVE_INFINITY,retryOnMount:!1})),Zb=()=>bo(()=>({queryKey:["channels"],queryFn:()=>jr.channels.$get().then(e=>e.json()),staleTime:Number.POSITIVE_INFINITY,retryOnMount:!1,select:e=>!e||e.length===0?null:e.includes(ni)?[ni,...e.filter(t=>t!==ni)]:e}));var Jb=ie('<div class="transition-opacity duration-300"><div class="flex flex-row justify-end p-3"><div class="flex items-center gap-4"><div class="text-sm text-muted-foreground">Platform:</div><div class="text-sm text-muted-foreground">Channel:</div></div></div><div class="border rounded-md">');const e0=20,[cr,t0]=j({pageIndex:0,pageSize:e0});function n0(e){const[t]=_(e,["columns","onRowClick"]),{channelFilter:n,platformFilter:r,setPlatformFilter:o,setChannelFilter:i}=od(),s=V(()=>({channel:n()??void 0,platform:r()??void 0,limit:cr().pageSize.toString(),offset:(cr().pageIndex*cr().pageSize).toString()})),a=Xb(s),l=V(()=>a.data??[]),c=mb({get data(){return l()},columns:t.columns,getCoreRowModel:ub(),getPaginationRowModel:pb(),getFilteredRowModel:gb(),state:{get pagination(){return cr()},get globalFilter(){return r()}},onPaginationChange:t0,globalFilterFn:(f,h,p)=>p?f.original.platform.toLowerCase()===p:!0,manualPagination:!1}),u=f=>()=>{t.onRowClick(f.original)},d=Zb();return H(()=>{d.isFetched&&d.data&&n()===null&&i(d.data[0])}),(()=>{var f=Jb(),h=f.firstChild,p=h.firstChild,g=p.firstChild,y=g.nextSibling,m=h.nextSibling;return X(p,b(Xl,{get children(){return b(Wl,{get children(){return[b(Ql,{class:"w-[100px]",get children(){return[V(()=>V(()=>!!r())()?r():"All"),b(Yl,{})]}}),b(Zl,{get children(){return b(rt,{each:[{label:"All",value:null},{label:"iOS",value:"ios"},{label:"Android",value:"android"}],children:v=>b(Jl,{get classList(){return{"bg-primary text-primary-foreground":v.value===r()}},onClick:()=>o(v.value),get children(){return v.label}})})}})]}})}}),y),X(p,b(Xl,{get children(){return b(Wl,{get children(){return[b(Ql,{class:"w-[100px]",get children(){return[V(()=>n()),b(Yl,{})]}}),b(Zl,{get children(){return b(rt,{get each(){return d.data},children:v=>b(Jl,{get classList(){return{"bg-primary text-primary-foreground":v===n()}},onClick:()=>i(v),children:v})})}})]}})}}),null),X(m,b(Vb,{get children(){return[b(Nb,{get children(){return b(rt,{get each(){return c.getHeaderGroups()},children:v=>b(ti,{get children(){return b(rt,{get each(){return v.headers},children:w=>b(jb,{get children(){return V(()=>!!w.isPlaceholder)()?null:nu(w.column.columnDef.header,w.getContext())}})})}})})}}),b(Kb,{get children(){return V(()=>{var v;return!!(a.isFetched&&((v=c.getRowModel().rows)==null?void 0:v.length)===0)})()?b(ti,{get children(){return b(ou,{get colSpan(){return t.columns.length},class:"h-full text-center",children:"No results."})}}):b(rt,{get each(){return c.getRowModel().rows},children:v=>b(ti,{get"data-state"(){return v.getIsSelected()&&"selected"},class:"cursor-pointer",get onClick(){return u(v)},get children(){return b(rt,{get each(){return v.getVisibleCells()},children:w=>b(ou,{get children(){return nu(w.column.columnDef.cell,w.getContext())}})})}})})}})]}})),X(f,b(Ib,{class:"mt-2.5 w-full [&>ul]:justify-center",itemComponent:v=>b($b,{get page(){return v.page},onClick:()=>c.setPageIndex(v.page-1),get children(){return v.page}}),ellipsisComponent:()=>b(Mb,{}),get count(){var v;return Math.ceil((((v=l())==null?void 0:v.length)??0)/cr().pageSize)},get children(){return[b(Fb,{onClick:()=>c.previousPage(),get disabled(){return!c.getCanPreviousPage()}}),b(Pb,{}),b(Ob,{onClick:()=>c.nextPage(),get disabled(){return!c.getCanNextPage()}})]}}),null),je(v=>{var w=!!a.isFetching,S=!!a.isFetching;return w!==v.e&&f.classList.toggle("opacity-50",v.e=w),S!==v.t&&m.classList.toggle("min-h-[400px]",v.t=S),v},{e:void 0,t:void 0}),f})()}var r0={};Ot(r0,{Root:()=>ya,Skeleton:()=>o0});function ya(e){const t=`skeleton-${Ee()}`,n=Q({visible:!0,animate:!0,id:t},e),[r,o]=_(n,["style","radius","animate","height","width","visible","circle"]);return b(le,M({as:"div",role:"group",get"data-animate"(){return r.animate||void 0},get"data-visible"(){return r.visible||void 0},get style(){return ct({"border-radius":r.circle?"9999px":r.radius?`${r.radius}px`:void 0,width:r.circle?`${r.height}px`:r.width?`${r.width}px`:"100%",height:r.height?`${r.height}px`:"auto"},r.style)}},o))}var o0=ya;const i0=e=>{const[t,n]=_(e,["class"]);return b(ya,M({get class(){return de("bg-primary/10 data-[animate='true']:animate-pulse",t.class)}},n))};var uf=["id","name","validationState","required","disabled","readOnly"];function cf(e){const t=`form-control-${Ee()}`,n=Q({id:t},e),[r,o]=j(),[i,s]=j(),[a,l]=j(),[c,u]=j(),d=(g,y,m)=>{const v=m!=null||r()!=null;return[m,r(),v&&y!=null?g:void 0].filter(Boolean).join(" ")||void 0},f=g=>[a(),c(),g].filter(Boolean).join(" ")||void 0,h=V(()=>({"data-valid":A(n.validationState)==="valid"?"":void 0,"data-invalid":A(n.validationState)==="invalid"?"":void 0,"data-required":A(n.required)?"":void 0,"data-disabled":A(n.disabled)?"":void 0,"data-readonly":A(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>A(n.name)??A(n.id),dataset:h,validationState:()=>A(n.validationState),isRequired:()=>A(n.required),isDisabled:()=>A(n.disabled),isReadOnly:()=>A(n.readOnly),labelId:r,fieldId:i,descriptionId:a,errorMessageId:c,getAriaLabelledBy:d,getAriaDescribedBy:f,generateId:dt(()=>A(n.id)),registerLabel:Ke(o),registerField:Ke(s),registerDescription:Ke(l),registerErrorMessage:Ke(u)}}}var wa=we();function Zt(){const e=ye(wa);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function ba(e){const t=Zt(),n=Q({id:t.generateId("description")},e);return H(()=>W(t.registerDescription(n.id))),b(le,M({as:"div"},()=>t.dataset(),n))}function Sa(e){const t=Zt(),n=Q({id:t.generateId("error-message")},e),[r,o]=_(n,["forceMount"]),i=()=>t.validationState()==="invalid";return H(()=>{i()&&W(t.registerErrorMessage(o.id))}),b(pe,{get when(){return r.forceMount||i()},get children(){return b(le,M({as:"div"},()=>t.dataset(),o))}})}function Lo(e){let t;const n=Zt(),r=Q({id:n.generateId("label")},e),[o,i]=_(r,["ref"]),s=xo(()=>t,()=>"label");return H(()=>W(n.registerLabel(i.id))),b(le,M({as:"label",ref(a){var l=ve(c=>t=c,o.ref);typeof l=="function"&&l(a)},get for(){return V(()=>s()==="label")()?n.fieldId():void 0}},()=>n.dataset(),i))}var df=["id","aria-label","aria-labelledby","aria-describedby"];function ff(e){const t=Zt(),n=Q({id:t.generateId("field")},e);return H(()=>W(t.registerField(A(n.id)))),{fieldProps:{id:()=>A(n.id),ariaLabel:()=>A(n["aria-label"]),ariaLabelledBy:()=>t.getAriaLabelledBy(A(n.id),A(n["aria-label"]),A(n["aria-labelledby"])),ariaDescribedBy:()=>t.getAriaDescribedBy(A(n["aria-describedby"]))}}}function hf(e,t){H(Ce(e,n=>{if(n==null)return;const r=s0(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),W(()=>{r.removeEventListener("reset",t)}))}))}function s0(e){return a0(e)?e.form:e.closest("form")}function a0(e){return e.matches("textarea, input, select, button")}var l0={};Ot(l0,{Control:()=>xa,Description:()=>pf,ErrorMessage:()=>mf,Input:()=>Ca,Label:()=>Ea,Root:()=>Ra,Switch:()=>c0,Thumb:()=>Pa});var gf=we();function er(){const e=ye(gf);if(e===void 0)throw new Error("[kobalte]: `useSwitchContext` must be used within a `Switch` component");return e}function xa(e){const t=Zt(),n=er(),r=Q({id:n.generateId("control")},e),[o,i]=_(r,["onClick","onKeyDown"]);return b(le,M({as:"div",onClick:l=>{var c;ne(l,o.onClick),n.toggle(),(c=n.inputRef())==null||c.focus()},onKeyDown:l=>{var c;ne(l,o.onKeyDown),l.key===Cs.Space&&(n.toggle(),(c=n.inputRef())==null||c.focus())}},()=>t.dataset(),()=>n.dataset(),i))}function pf(e){const t=er();return b(ba,M(()=>t.dataset(),e))}function mf(e){const t=er();return b(Sa,M(()=>t.dataset(),e))}function Ca(e){const t=Zt(),n=er(),r=Q({id:n.generateId("input")},e),[o,i,s]=_(r,["ref","style","onChange","onFocus","onBlur"],df),{fieldProps:a}=ff(i);return b(le,M({as:"input",ref(d){var f=ve(n.setInputRef,o.ref);typeof f=="function"&&f(d)},type:"checkbox",role:"switch",get id(){return a.id()},get name(){return t.name()},get value(){return n.value()},get checked(){return n.checked()},get required(){return t.isRequired()},get disabled(){return t.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return ct({...Tc},o.style)},get"aria-checked"(){return n.checked()},get"aria-label"(){return a.ariaLabel()},get"aria-labelledby"(){return a.ariaLabelledBy()},get"aria-describedby"(){return a.ariaDescribedBy()},get"aria-invalid"(){return t.validationState()==="invalid"||void 0},get"aria-required"(){return t.isRequired()||void 0},get"aria-disabled"(){return t.isDisabled()||void 0},get"aria-readonly"(){return t.isReadOnly()||void 0},onChange:d=>{ne(d,o.onChange),d.stopPropagation();const f=d.target;n.setIsChecked(f.checked),f.checked=n.checked()},onFocus:d=>{ne(d,o.onFocus),n.setIsFocused(!0)},onBlur:d=>{ne(d,o.onBlur),n.setIsFocused(!1)}},()=>t.dataset(),()=>n.dataset(),s))}function Ea(e){const t=er();return b(Lo,M(()=>t.dataset(),e))}function Ra(e){let t;const n=`switch-${Ee()}`,r=Q({value:"on",id:n},e),[o,i,s]=_(r,["ref","children","value","checked","defaultChecked","onChange","onPointerDown"],uf),[a,l]=j(),[c,u]=j(!1),{formControlContext:d}=cf(i),f=Md({isSelected:()=>o.checked,defaultIsSelected:()=>o.defaultChecked,onSelectedChange:y=>{var m;return(m=o.onChange)==null?void 0:m.call(o,y)},isDisabled:()=>d.isDisabled(),isReadOnly:()=>d.isReadOnly()});hf(()=>t,()=>f.setIsSelected(o.defaultChecked??!1));const h=y=>{ne(y,o.onPointerDown),c()&&y.preventDefault()},p=V(()=>({"data-checked":f.isSelected()?"":void 0})),g={value:()=>o.value,dataset:p,checked:()=>f.isSelected(),inputRef:a,generateId:dt(()=>A(i.id)),toggle:()=>f.toggle(),setIsChecked:y=>f.setIsSelected(y),setIsFocused:u,setInputRef:l};return b(wa.Provider,{value:d,get children(){return b(gf.Provider,{value:g,get children(){return b(le,M({as:"div",ref(y){var m=ve(v=>t=v,o.ref);typeof m=="function"&&m(y)},role:"group",get id(){return A(i.id)},onPointerDown:h},()=>d.dataset(),p,s,{get children(){return b(u0,{state:g,get children(){return o.children}})}}))}})}})}function u0(e){const t=mo(()=>{const n=e.children;return Ss(n)?n(e.state):n});return V(t)}function Pa(e){const t=Zt(),n=er(),r=Q({id:n.generateId("thumb")},e);return b(le,M({as:"div"},()=>t.dataset(),()=>n.dataset(),r))}var c0=Object.assign(Ra,{Control:xa,Description:pf,ErrorMessage:mf,Input:Ca,Label:Ea,Thumb:Pa});const iu=Ra,su=e=>{const[t,n]=_(e,["class","children"]);return[b(Ca,{get class(){return de("[&:focus-visible+div]:outline-none [&:focus-visible+div]:ring-2 [&:focus-visible+div]:ring-ring [&:focus-visible+div]:ring-offset-2 [&:focus-visible+div]:ring-offset-background",t.class)}}),b(xa,M({get class(){return de("inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent bg-input transition-[color,background-color,box-shadow] data-[disabled]:cursor-not-allowed data-[checked]:bg-primary data-[disabled]:opacity-50",t.class)}},n,{get children(){return t.children}}))]},au=e=>{const[t,n]=_(e,["class"]);return b(Pa,M({get class(){return de("pointer-events-none block size-5 translate-x-0 rounded-full bg-background shadow-lg ring-0 transition-transform data-[checked]:translate-x-5",t.class)}},n))},lu=e=>{const[t,n]=_(e,["class"]);return b(Ea,M({get class(){return de("text-sm font-medium leading-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-70",t.class)}},n))};var d0={};Ot(d0,{Description:()=>ba,ErrorMessage:()=>Sa,Input:()=>Ia,Label:()=>Lo,Root:()=>$a,TextArea:()=>bf,TextField:()=>h0});var vf=we();function yf(){const e=ye(vf);if(e===void 0)throw new Error("[kobalte]: `useTextFieldContext` must be used within a `TextField` component");return e}function Ia(e){return b(wf,M({type:"text"},e))}function wf(e){const t=Zt(),n=yf(),r=Q({id:n.generateId("input")},e),[o,i,s]=_(r,["onInput"],df),{fieldProps:a}=ff(i);return b(le,M({as:"input",get id(){return a.id()},get name(){return t.name()},get value(){return n.value()},get required(){return t.isRequired()},get disabled(){return t.isDisabled()},get readonly(){return t.isReadOnly()},get"aria-label"(){return a.ariaLabel()},get"aria-labelledby"(){return a.ariaLabelledBy()},get"aria-describedby"(){return a.ariaDescribedBy()},get"aria-invalid"(){return t.validationState()==="invalid"||void 0},get"aria-required"(){return t.isRequired()||void 0},get"aria-disabled"(){return t.isDisabled()||void 0},get"aria-readonly"(){return t.isReadOnly()||void 0},get onInput(){return Se([o.onInput,n.onInput])}},()=>t.dataset(),s))}function $a(e){let t;const n=`textfield-${Ee()}`,r=Q({id:n},e),[o,i,s]=_(r,["ref","value","defaultValue","onChange"],uf),a=o.value,[l,c]=vt({value:()=>a===void 0?void 0:o.value??"",defaultValue:()=>o.defaultValue,onChange:h=>{var p;return(p=o.onChange)==null?void 0:p.call(o,h)}}),{formControlContext:u}=cf(i);hf(()=>t,()=>c(o.defaultValue??""));const d=h=>{if(u.isReadOnly()||u.isDisabled())return;const p=h.target;c(p.value),p.value=l()??""},f={value:l,generateId:dt(()=>A(i.id)),onInput:d};return b(wa.Provider,{value:u,get children(){return b(vf.Provider,{value:f,get children(){return b(le,M({as:"div",ref(h){var p=ve(g=>t=g,o.ref);typeof p=="function"&&p(h)},role:"group",get id(){return A(i.id)}},()=>u.dataset(),s))}})}})}function bf(e){let t;const n=yf(),r=Q({id:n.generateId("textarea")},e),[o,i]=_(r,["ref","autoResize","submitOnEnter","onKeyPress"]);H(Ce([()=>t,()=>o.autoResize,()=>n.value()],([a,l])=>{!a||!l||f0(a)}));const s=a=>{t&&o.submitOnEnter&&a.key==="Enter"&&!a.shiftKey&&t.form&&(t.form.requestSubmit(),a.preventDefault())};return b(wf,M({as:"textarea",get"aria-multiline"(){return o.submitOnEnter?"false":void 0},get onKeyPress(){return Se([o.onKeyPress,s])},ref(a){var l=ve(c=>t=c,o.ref);typeof l=="function"&&l(a)}},i))}function f0(e){const t=e.style.alignSelf,n=e.style.overflow;"MozAppearance"in e.style||(e.style.overflow="hidden"),e.style.alignSelf="start",e.style.height="auto",e.style.height=`${e.scrollHeight+(e.offsetHeight-e.clientHeight)}px`,e.style.overflow=n,e.style.alignSelf=t}var h0=Object.assign($a,{Description:ba,ErrorMessage:Sa,Input:Ia,Label:Lo,TextArea:bf});const ri=$a,oi=e=>{const[t,n]=_(e,["type","class"]);return b(Ia,M({get type(){return t.type},get class(){return de("flex h-10 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50",t.class)}},n))},g0=_r("text-sm font-medium leading-none peer-disabled:opacity-70",{variants:{variant:{label:"data-[invalid]:text-destructive",description:"text-destructive",error:"font-normal text-red-500"}},defaultVariants:{variant:"label"}}),ii=e=>{const[t,n]=_(e,["class"]);return b(Lo,M({get class(){return de(g0(),t.class)}},n))};class Sf{constructor(t,n){this.listeners=new Set,this._batching=!1,this._flushing=0,this.subscribe=r=>{var o,i;this.listeners.add(r);const s=(i=(o=this.options)==null?void 0:o.onSubscribe)==null?void 0:i.call(o,r,this);return()=>{this.listeners.delete(r),s==null||s()}},this.setState=r=>{var o,i,s;const a=this.state;this.state=(o=this.options)!=null&&o.updateFn?this.options.updateFn(a)(r):r(a),(s=(i=this.options)==null?void 0:i.onUpdate)==null||s.call(i),this._flush()},this._flush=()=>{if(this._batching)return;const r=++this._flushing;this.listeners.forEach(o=>{this._flushing===r&&o()})},this.batch=r=>{if(this._batching)return r();this._batching=!0,r(),this._batching=!1,this._flush()},this.state=t,this.options=n}}function Ma(e,t){return typeof e=="function"?e(t):e}function xf(e,t){return Fa(t).reduce((r,o)=>{if(r===null)return null;if(typeof r<"u")return r[o]},e)}function si(e,t,n){const r=Fa(t);function o(i){if(!r.length)return Ma(n,i);const s=r.shift();if(typeof s=="string")return typeof i=="object"?(i===null&&(i={}),{...i,[s]:o(i[s])}):{[s]:o()};if(Array.isArray(i)&&s!==void 0){const a=i.slice(0,s);return[...a.length?a:new Array(s),o(i[s]),...i.slice(s+1)]}return[...new Array(s),o()]}return o(e)}function p0(e,t){const n=Fa(t);function r(o){if(!o)return;if(n.length===1){const s=n[0];if(Array.isArray(o)&&typeof s=="number")return o.filter((c,u)=>u!==s);const{[s]:a,...l}=o;return l}const i=n.shift();if(typeof i=="string"&&typeof o=="object")return{...o,[i]:r(o[i])};if(typeof i=="number"&&Array.isArray(o)){if(i>=o.length)return o;const s=o.slice(0,i);return[...s.length?s:new Array(i),r(o[i]),...o.slice(i+1)]}throw new Error("It seems we have created an infinite loop in deleteBy. ")}return r(e)}const m0=/^(\d*)$/gm,v0=/\.(\d*)\./gm,y0=/^(\d*)\./gm,w0=/\.(\d*$)/gm,b0=/\.{2,}/gm,cs="__int__",eo=`${cs}$1`;function Fa(e){if(Array.isArray(e))return[...e];if(typeof e!="string")throw new Error("Path must be a string.");return e.replaceAll("[",".").replaceAll("]","").replace(m0,eo).replace(v0,`.${eo}.`).replace(y0,`${eo}.`).replace(w0,`.${eo}`).replace(b0,".").split(".").map(t=>t.indexOf(cs)===0?parseInt(t.substring(cs.length),10):t)}function S0(e){return!(Array.isArray(e)&&e.length===0)}function ds(e,t){const{asyncDebounceMs:n}=t,{onChangeAsync:r,onBlurAsync:o,onSubmitAsync:i,onBlurAsyncDebounceMs:s,onChangeAsyncDebounceMs:a}=t.validators||{},l=n??0,c={cause:"change",validate:r,debounceMs:a??l},u={cause:"blur",validate:o,debounceMs:s??l},d={cause:"submit",validate:i,debounceMs:0},f=h=>({...h,debounceMs:0});switch(e){case"submit":return[f(c),f(u),d];case"blur":return[u];case"change":return[c];case"server":default:return[]}}function fs(e,t){const{onChange:n,onBlur:r,onSubmit:o}=t.validators||{},i={cause:"change",validate:n},s={cause:"blur",validate:r},a={cause:"submit",validate:o},l={cause:"server",validate:()=>{}};switch(e){case"submit":return[i,s,a,l];case"server":return[l];case"blur":return[s,l];case"change":default:return[i,l]}}function ai(e){return{values:e.values??{},errors:e.errors??[],errorMap:e.errorMap??{},fieldMeta:e.fieldMeta??{},canSubmit:e.canSubmit??!0,isFieldsValid:e.isFieldsValid??!1,isFieldsValidating:e.isFieldsValidating??!1,isFormValid:e.isFormValid??!1,isFormValidating:e.isFormValidating??!1,isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isTouched:e.isTouched??!1,isBlurred:e.isBlurred??!1,isPristine:e.isPristine??!0,isDirty:e.isDirty??!1,isValid:e.isValid??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,validationMetaMap:e.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0}}}const x0=e=>typeof e=="object";class C0{constructor(t){var n;this.options={},this.fieldInfo={},this.prevTransformArray=[],this.mount=()=>{const{onMount:r}=this.options.validators||{};if(!r)return;const o=this.runValidator({validate:r,value:{value:this.state.values,formApi:this,validationSource:"form"},type:"validate"});o&&this.store.setState(i=>({...i,errorMap:{...i.errorMap,onMount:o}}))},this.update=r=>{if(!r)return;const o=this.options;this.options=r,this.store.batch(()=>{const i=r.defaultValues&&r.defaultValues!==o.defaultValues&&!this.state.isTouched,s=r.defaultState!==o.defaultState&&!this.state.isTouched;this.store.setState(()=>ai(Object.assign({},this.state,s?r.defaultState:{},i?{values:r.defaultValues}:{})))})},this.reset=()=>{const{fieldMeta:r}=this.state,o=this.resetFieldMeta(r);this.store.setState(()=>{var i;return ai({...this.options.defaultState,values:this.options.defaultValues??((i=this.options.defaultState)==null?void 0:i.values),fieldMeta:o})})},this.validateAllFields=async r=>{const o=[];return this.store.batch(()=>{Object.values(this.fieldInfo).forEach(s=>{if(!s.instance)return;const a=s.instance;o.push(Promise.resolve().then(()=>a.validate(r))),s.instance.state.meta.isTouched||s.instance.setMeta(l=>({...l,isTouched:!0})),s.instance.state.meta.isBlurred||s.instance.setMeta(l=>({...l,isBlurred:!0}))})}),(await Promise.all(o)).flat()},this.validateArrayFieldsStartingFrom=async(r,o,i)=>{const s=this.getFieldValue(r),a=Array.isArray(s)?Math.max(s.length-1,0):null,l=[`${r}[${o}]`];for(let f=o+1;f<=(a??0);f++)l.push(`${r}[${f}]`);const c=Object.keys(this.fieldInfo).filter(f=>l.some(h=>f.startsWith(h))),u=[];return this.store.batch(()=>{c.forEach(f=>{u.push(Promise.resolve().then(()=>this.validateField(f,i)))})}),(await Promise.all(u)).flat()},this.validateField=(r,o)=>{var i;const s=(i=this.fieldInfo[r])==null?void 0:i.instance;return s?(s.state.meta.isTouched||s.setMeta(a=>({...a,isTouched:!0})),s.state.meta.isBlurred||s.setMeta(a=>({...a,isBlurred:!0})),s.validate(o)):[]},this.validateSync=r=>{const o=fs(r,this.options);let i=!1;const s={};this.store.batch(()=>{for(const l of o){if(!l.validate)continue;const c=this.runValidator({validate:l.validate,value:{value:this.state.values,formApi:this,validationSource:"form"},type:"validate"}),{formError:u,fieldErrors:d}=hs(c),f=to(l.cause);if(d)for(const[h,p]of Object.entries(d)){const y={...s[h]||{},[f]:p};s[h]=y;const m=this.getFieldMeta(h);m&&m.errorMap[f]!==p&&this.setFieldMeta(h,v=>({...v,errorMap:{...v.errorMap,[f]:p}}))}this.state.errorMap[f]!==u&&this.store.setState(h=>({...h,errorMap:{...h.errorMap,[f]:u}})),(u||d)&&(i=!0)}});const a=to("submit");return this.state.errorMap[a]&&r!=="submit"&&!i&&this.store.setState(l=>({...l,errorMap:{...l.errorMap,[a]:void 0}})),{hasErrored:i,fieldsErrorMap:s}},this.validateAsync=async r=>{const o=ds(r,this.options);this.state.isFormValidating||this.store.setState(c=>({...c,isFormValidating:!0}));const i=[];let s;for(const c of o){if(!c.validate)continue;const u=to(c.cause),d=this.state.validationMetaMap[u];d==null||d.lastAbortController.abort();const f=new AbortController;this.state.validationMetaMap[u]={lastAbortController:f},i.push(new Promise(async h=>{let p;try{p=await new Promise((v,w)=>{setTimeout(async()=>{if(f.signal.aborted)return v(void 0);try{v(await this.runValidator({validate:c.validate,value:{value:this.state.values,formApi:this,validationSource:"form",signal:f.signal},type:"validateAsync"}))}catch(S){w(S)}},c.debounceMs)})}catch(v){p=v}const{formError:g,fieldErrors:y}=hs(p);y&&(s=s?{...s,...y}:y);const m=to(c.cause);if(s)for(const[v,w]of Object.entries(s)){const S=this.getFieldMeta(v);S&&S.errorMap[m]!==w&&this.setFieldMeta(v,C=>({...C,errorMap:{...C.errorMap,[m]:w}}))}this.store.setState(v=>({...v,errorMap:{...v.errorMap,[m]:g}})),h(s?{fieldErrors:s,errorMapKey:m}:void 0)}))}let a=[];const l={};if(i.length){a=await Promise.all(i);for(const c of a)if(c!=null&&c.fieldErrors){const{errorMapKey:u}=c;for(const[d,f]of Object.entries(c.fieldErrors)){const p={...l[d]||{},[u]:f};l[d]=p}}}return this.store.setState(c=>({...c,isFormValidating:!1})),l},this.validate=r=>{const{hasErrored:o,fieldsErrorMap:i}=this.validateSync(r);return o&&!this.options.asyncAlways?i:this.validateAsync(r)},this.handleSubmit=async()=>{var r,o,i,s,a,l;if(this.store.setState(u=>({...u,isSubmitted:!1,submissionAttempts:u.submissionAttempts+1})),!this.state.canSubmit)return;this.store.setState(u=>({...u,isSubmitting:!0}));const c=()=>{this.store.setState(u=>({...u,isSubmitting:!1}))};if(await this.validateAllFields("submit"),!this.state.isFieldsValid){c(),(o=(r=this.options).onSubmitInvalid)==null||o.call(r,{value:this.state.values,formApi:this});return}if(await this.validate("submit"),!this.state.isValid){c(),(s=(i=this.options).onSubmitInvalid)==null||s.call(i,{value:this.state.values,formApi:this});return}try{await((l=(a=this.options).onSubmit)==null?void 0:l.call(a,{value:this.state.values,formApi:this})),this.store.batch(()=>{this.store.setState(u=>({...u,isSubmitted:!0})),c()})}catch(u){throw c(),u}},this.getFieldValue=r=>xf(this.state.values,r),this.getFieldMeta=r=>this.state.fieldMeta[r],this.getFieldInfo=r=>{var o;return(o=this.fieldInfo)[r]||(o[r]={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0}})},this.setFieldMeta=(r,o)=>{this.store.setState(i=>({...i,fieldMeta:{...i.fieldMeta,[r]:Ma(o,i.fieldMeta[r])}}))},this.resetFieldMeta=r=>Object.keys(r).reduce((o,i)=>{const s=i;return o[s]={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,errors:[],errorMap:{}},o},{}),this.setFieldValue=(r,o,i)=>{const s=(i==null?void 0:i.dontUpdateMeta)??!1;this.store.batch(()=>{s||this.setFieldMeta(r,a=>({...a,isTouched:!0,isBlurred:!0,isDirty:!0})),this.store.setState(a=>({...a,values:si(a.values,r,o)}))})},this.deleteField=r=>{this.store.setState(o=>{const i={...o};return i.values=p0(i.values,r),delete i.fieldMeta[r],i}),delete this.fieldInfo[r]},this.pushFieldValue=(r,o,i)=>{this.setFieldValue(r,s=>[...Array.isArray(s)?s:[],o],i),this.validateField(r,"change")},this.insertFieldValue=async(r,o,i,s)=>{this.setFieldValue(r,a=>[...a.slice(0,o),i,...a.slice(o)],s),await this.validateField(r,"change")},this.replaceFieldValue=async(r,o,i,s)=>{this.setFieldValue(r,a=>a.map((l,c)=>c===o?i:l),s),await this.validateField(r,"change"),await this.validateArrayFieldsStartingFrom(r,o,"change")},this.removeFieldValue=async(r,o,i)=>{const s=this.getFieldValue(r),a=Array.isArray(s)?Math.max(s.length-1,0):null;if(this.setFieldValue(r,l=>l.filter((c,u)=>u!==o),i),a!==null){const l=`${r}[${a}]`;Object.keys(this.fieldInfo).filter(u=>u.startsWith(l)).forEach(u=>this.deleteField(u))}await this.validateField(r,"change"),await this.validateArrayFieldsStartingFrom(r,o,"change")},this.swapFieldValues=(r,o,i,s)=>{this.setFieldValue(r,a=>{const l=a[o],c=a[i];return si(si(a,`${o}`,c),`${i}`,l)},s),this.validateField(r,"change"),this.validateField(`${r}[${o}]`,"change"),this.validateField(`${r}[${i}]`,"change")},this.moveFieldValues=(r,o,i,s)=>{this.setFieldValue(r,a=>(a.splice(i,0,a.splice(o,1)[0]),a),s),this.validateField(r,"change"),this.validateField(`${r}[${o}]`,"change"),this.validateField(`${r}[${i}]`,"change")},this.store=new Sf(ai({...t==null?void 0:t.defaultState,values:(t==null?void 0:t.defaultValues)??((n=t==null?void 0:t.defaultState)==null?void 0:n.values),isFormValid:!0}),{onUpdate:()=>{var r,o;let{state:i}=this.store;const s=Object.values(i.fieldMeta),a=s.some(w=>w==null?void 0:w.isValidating),l=!s.some(w=>(w==null?void 0:w.errorMap)&&S0(Object.values(w.errorMap).filter(Boolean))),c=s.some(w=>w==null?void 0:w.isTouched),u=s.some(w=>w==null?void 0:w.isBlurred),d=s.some(w=>w==null?void 0:w.isDirty),f=!d,h=a||i.isFormValidating;i.errors=Object.values(i.errorMap).reduce((w,S)=>S===void 0?w:typeof S=="string"?(w.push(S),w):(S&&x0(S)&&w.push(S.form),w),[]);const p=i.errors.length===0,g=l&&p,y=i.submissionAttempts===0&&!c||!h&&!i.isSubmitting&&g;i={...i,isFieldsValidating:a,isFieldsValid:l,isFormValid:p,isValid:g,canSubmit:y,isTouched:c,isBlurred:u,isPristine:f,isDirty:d},this.state=i,this.store.state=this.state;const m=((r=this.options.transform)==null?void 0:r.deps)??[];(m.length!==this.prevTransformArray.length||m.some((w,S)=>w!==this.prevTransformArray[S]))&&((o=this.options.transform)==null||o.fn(this),this.store.state=this.state,this.prevTransformArray=m)}}),this.state=this.store.state,this.update(t||{})}runValidator(t){const n=this.options.validatorAdapter;return n&&typeof t.validate!="function"?n()[t.type](t.value,t.validate):t.validate(t.value)}setErrorMap(t){this.store.setState(n=>({...n,errorMap:{...n.errorMap,...t}}))}}function hs(e){if(e){if(typeof e=="object"){const t=hs(e.form).formError,n=e.fields;return{formError:t,fieldErrors:n}}return typeof e!="string"?{formError:"Invalid Form Values"}:{formError:e}}return{formError:void 0}}function to(e){switch(e){case"submit":return"onSubmit";case"blur":return"onBlur";case"mount":return"onMount";case"server":return"onServer";case"change":default:return"onChange"}}class E0{constructor(t){this.options={},this.mount=()=>{const n=this.getInfo();n.instance=this;const r=this.form.store.subscribe(()=>{this.store.batch(()=>{const i=this.getValue(),s=this.getMeta();i!==this.state.value&&this.store.setState(a=>({...a,value:i})),s!==this.state.meta&&this.store.setState(a=>({...a,meta:s}))})});this.update(this.options);const{onMount:o}=this.options.validators||{};if(o){const i=this.runValidator({validate:o,value:{value:this.state.value,fieldApi:this,validationSource:"field"},type:"validate"});i&&this.setMeta(s=>({...s,errorMap:{...s==null?void 0:s.errorMap,onMount:i}}))}return()=>{r()}},this.update=n=>{if(this.state.value===void 0){const r=xf(n.form.options.defaultValues,n.name);n.defaultValue!==void 0?this.setValue(n.defaultValue,{dontUpdateMeta:!0}):r!==void 0&&this.setValue(r,{dontUpdateMeta:!0})}this._getMeta()===void 0&&this.setMeta(this.state.meta),this.options=n},this.getValue=()=>this.form.getFieldValue(this.name),this.setValue=(n,r)=>{this.form.setFieldValue(this.name,n,r),this.validate("change")},this._getMeta=()=>this.form.getFieldMeta(this.name),this.getMeta=()=>this._getMeta()??{isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,errors:[],errorMap:{},...this.options.defaultMeta},this.setMeta=n=>this.form.setFieldMeta(this.name,n),this.getInfo=()=>this.form.getFieldInfo(this.name),this.pushValue=(n,r)=>this.form.pushFieldValue(this.name,n,r),this.insertValue=(n,r,o)=>this.form.insertFieldValue(this.name,n,r,o),this.replaceValue=(n,r,o)=>this.form.replaceFieldValue(this.name,n,r,o),this.removeValue=(n,r)=>this.form.removeFieldValue(this.name,n,r),this.swapValues=(n,r,o)=>this.form.swapFieldValues(this.name,n,r,o),this.moveValue=(n,r,o)=>this.form.moveFieldValues(this.name,n,r,o),this.getLinkedFields=n=>{const r=Object.values(this.form.fieldInfo),o=[];for(const i of r){if(!i.instance)continue;const{onChangeListenTo:s,onBlurListenTo:a}=i.instance.options.validators||{};n==="change"&&(s!=null&&s.includes(this.name))&&o.push(i.instance),n==="blur"&&(a!=null&&a.includes(this.name))&&o.push(i.instance)}return o},this.validateSync=(n,r)=>{const o=fs(n,this.options),s=this.getLinkedFields(n).reduce((c,u)=>{const d=fs(n,u.options);return d.forEach(f=>{f.field=u}),c.concat(d)},[]);let a=!1;this.form.store.batch(()=>{const c=(u,d)=>{const f=dr(d.cause),h=d.validate?uu(u.runValidator({validate:d.validate,value:{value:u.getValue(),validationSource:"field",fieldApi:u},type:"validate"})):r[f];u.state.meta.errorMap[f]!==h&&u.setMeta(p=>({...p,errorMap:{...p.errorMap,[dr(d.cause)]:h||r[f]}})),(h||r[f])&&(a=!0)};for(const u of o)c(this,u);for(const u of s)u.validate&&c(u.field,u)});const l=dr("submit");return this.state.meta.errorMap[l]&&n!=="submit"&&!a&&this.setMeta(c=>({...c,errorMap:{...c.errorMap,[l]:void 0}})),{hasErrored:a}},this.validateAsync=async(n,r)=>{const o=ds(n,this.options),i=await r,s=this.getLinkedFields(n),a=s.reduce((f,h)=>{const p=ds(n,h.options);return p.forEach(g=>{g.field=h}),f.concat(p)},[]);this.state.meta.isValidating||this.setMeta(f=>({...f,isValidating:!0}));for(const f of s)f.setMeta(h=>({...h,isValidating:!0}));const l=[],c=[],u=(f,h,p)=>{const g=dr(h.cause),y=f.getInfo().validationMetaMap[g];y==null||y.lastAbortController.abort();const m=new AbortController;this.getInfo().validationMetaMap[g]={lastAbortController:m},p.push(new Promise(async v=>{var w;let S;try{S=await new Promise((k,T)=>{this.timeoutIds[h.cause]&&clearTimeout(this.timeoutIds[h.cause]),this.timeoutIds[h.cause]=setTimeout(async()=>{if(m.signal.aborted)return k(void 0);try{k(await this.runValidator({validate:h.validate,value:{value:f.getValue(),fieldApi:f,signal:m.signal,validationSource:"field"},type:"validateAsync"}))}catch(K){T(K)}},h.debounceMs)})}catch(k){S=k}if(m.signal.aborted)return v(void 0);const C=uu(S),O=(w=i[this.name])==null?void 0:w[g],L=C||O;f.setMeta(k=>({...k,errorMap:{...k==null?void 0:k.errorMap,[g]:L}})),v(L)}))};for(const f of o)f.validate&&u(this,f,l);for(const f of a)f.validate&&u(f.field,f,c);let d=[];(l.length||c.length)&&(d=await Promise.all(l),await Promise.all(c)),this.setMeta(f=>({...f,isValidating:!1}));for(const f of s)f.setMeta(h=>({...h,isValidating:!1}));return d.filter(Boolean)},this.validate=n=>{var r;if(!this.state.meta.isTouched)return[];let o={},i=Promise.resolve({});try{const a=this.form.validate(n);if(a instanceof Promise)i=a;else{const l=a[this.name];l&&(o=l)}}catch{}const{hasErrored:s}=this.validateSync(n,o);return s&&!this.options.asyncAlways?((r=this.getInfo().validationMetaMap[dr(n)])==null||r.lastAbortController.abort(),this.state.meta.errors):this.validateAsync(n,i)},this.handleChange=n=>{this.setValue(n)},this.handleBlur=()=>{this.state.meta.isTouched||(this.setMeta(r=>({...r,isTouched:!0})),this.validate("change")),this.state.meta.isBlurred||this.setMeta(r=>({...r,isBlurred:!0})),this.validate("blur")},this.form=t.form,this.name=t.name,this.timeoutIds={},t.defaultValue!==void 0&&this.form.setFieldValue(this.name,t.defaultValue,{dontUpdateMeta:!0}),this.store=new Sf({value:this.getValue(),meta:this._getMeta()??{isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,errors:[],errorMap:{},...t.defaultMeta}},{onUpdate:()=>{const n=this.store.state;n.meta.errors=Object.values(n.meta.errorMap).filter(r=>r!==void 0),n.meta.isPristine=!n.meta.isDirty,this.prevState=n,this.state=n}}),this.state=this.store.state,this.prevState=this.state,this.options=t}runValidator(t){const n=[this.form.options.validatorAdapter,this.options.validatorAdapter];for(const r of n)if(r&&typeof t.validate!="function")return r()[t.type](t.value,t.validate);return t.validate(t.value)}setErrorMap(t){this.setMeta(n=>({...n,errorMap:{...n.errorMap,...t}}))}}function uu(e){if(e)return typeof e!="string"?"Invalid Form Values":e}function dr(e){switch(e){case"submit":return"onSubmit";case"blur":return"onBlur";case"mount":return"onMount";case"server":return"onServer";case"change":default:return"onChange"}}function cu(e,t=n=>n){const[n,r]=wo({value:t(e.state)}),o=e.subscribe(()=>{const i=t(e.state);r("value",pc(i))});return W(()=>{o()}),()=>n.value}function R0(e){const[t,n]=j(!1),r=V(()=>[t(),e]),o=e.store.subscribe(()=>n(i=>!i));return W(o),()=>r()[1]}function Cf(e){const t=e(),n=new E0(t),r=n;return r.Field=Ef,Mt(()=>n.update(e())),qn(()=>W(n.mount())),R0(r)}function Ef(e){const t=Cf(()=>{const{children:n,...r}=e;return r});return V(()=>b(()=>e.children(t),{}))}function P0(e){const t=e==null?void 0:e(),n=new C0(t),r=n;return r.Field=o=>b(Ef,M(o,{form:n})),r.createField=o=>Cf(()=>({...o(),form:n})),r.useStore=o=>cu(n.store,o),r.Subscribe=o=>Ma(o.children,cu(n.store,o.selector)),qn(n.mount),Mt(()=>n.update(e==null?void 0:e())),r}var li,du;function I0(){if(du)return li;du=1;class e{constructor(){this.max=1e3,this.map=new Map}get(n){const r=this.map.get(n);if(r!==void 0)return this.map.delete(n),this.map.set(n,r),r}delete(n){return this.map.delete(n)}set(n,r){if(!this.delete(n)&&r!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(n,r)}return this}}return li=e,li}var ui,fu;function Oa(){if(fu)return ui;fu=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return ui=r=>r?typeof r!="object"?e:r:t,ui}var no={exports:{}},ci,hu;function Aa(){if(hu)return ci;hu=1;const e="2.0.0",t=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,r=16,o=t-6;return ci={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:o,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},ci}var di,gu;function _o(){if(gu)return di;gu=1;var e={};return di=typeof process=="object"&&e&&e.NODE_DEBUG&&/\bsemver\b/i.test(e.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{},di}var pu;function Ta(){return pu||(pu=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:o}=Aa(),i=_o();t=e.exports={};const s=t.re=[],a=t.safeRe=[],l=t.src=[],c=t.safeSrc=[],u=t.t={};let d=0;const f="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",o],[f,r]],p=y=>{for(const[m,v]of h)y=y.split(`${m}*`).join(`${m}{0,${v}}`).split(`${m}+`).join(`${m}{1,${v}}`);return y},g=(y,m,v)=>{const w=p(m),S=d++;i(y,S,m),u[y]=S,l[S]=m,c[S]=w,s[S]=new RegExp(m,v?"g":void 0),a[S]=new RegExp(w,v?"g":void 0)};g("NUMERICIDENTIFIER","0|[1-9]\\d*"),g("NUMERICIDENTIFIERLOOSE","\\d+"),g("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),g("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),g("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASEIDENTIFIER",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIER]})`),g("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),g("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),g("BUILDIDENTIFIER",`${f}+`),g("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),g("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),g("FULL",`^${l[u.FULLPLAIN]}$`),g("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),g("LOOSE",`^${l[u.LOOSEPLAIN]}$`),g("GTLT","((?:<|>)?=?)"),g("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),g("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),g("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),g("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),g("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),g("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),g("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),g("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),g("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?(?:${l[u.BUILD]})?(?:$|[^\\d])`),g("COERCERTL",l[u.COERCE],!0),g("COERCERTLFULL",l[u.COERCEFULL],!0),g("LONETILDE","(?:~>?)"),g("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",g("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),g("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),g("LONECARET","(?:\\^)"),g("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",g("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),g("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),g("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),g("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),g("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",g("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),g("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),g("STAR","(<|>)?=?\\s*\\*"),g("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),g("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(no,no.exports)),no.exports}var fi,mu;function $0(){if(mu)return fi;mu=1;const e=/^[0-9]+$/,t=(r,o)=>{const i=e.test(r),s=e.test(o);return i&&s&&(r=+r,o=+o),r===o?0:i&&!s?-1:s&&!i?1:r<o?-1:1};return fi={compareIdentifiers:t,rcompareIdentifiers:(r,o)=>t(o,r)},fi}var hi,vu;function Da(){if(vu)return hi;vu=1;const e=_o(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=Aa(),{safeRe:r,t:o}=Ta(),i=Oa(),{compareIdentifiers:s}=$0();class a{constructor(c,u){if(u=i(u),c instanceof a){if(c.loose===!!u.loose&&c.includePrerelease===!!u.includePrerelease)return c;c=c.version}else if(typeof c!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof c}".`);if(c.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",c,u),this.options=u,this.loose=!!u.loose,this.includePrerelease=!!u.includePrerelease;const d=c.trim().match(u.loose?r[o.LOOSE]:r[o.FULL]);if(!d)throw new TypeError(`Invalid Version: ${c}`);if(this.raw=c,this.major=+d[1],this.minor=+d[2],this.patch=+d[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");d[4]?this.prerelease=d[4].split(".").map(f=>{if(/^[0-9]+$/.test(f)){const h=+f;if(h>=0&&h<n)return h}return f}):this.prerelease=[],this.build=d[5]?d[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(c){if(e("SemVer.compare",this.version,this.options,c),!(c instanceof a)){if(typeof c=="string"&&c===this.version)return 0;c=new a(c,this.options)}return c.version===this.version?0:this.compareMain(c)||this.comparePre(c)}compareMain(c){return c instanceof a||(c=new a(c,this.options)),s(this.major,c.major)||s(this.minor,c.minor)||s(this.patch,c.patch)}comparePre(c){if(c instanceof a||(c=new a(c,this.options)),this.prerelease.length&&!c.prerelease.length)return-1;if(!this.prerelease.length&&c.prerelease.length)return 1;if(!this.prerelease.length&&!c.prerelease.length)return 0;let u=0;do{const d=this.prerelease[u],f=c.prerelease[u];if(e("prerelease compare",u,d,f),d===void 0&&f===void 0)return 0;if(f===void 0)return 1;if(d===void 0)return-1;if(d===f)continue;return s(d,f)}while(++u)}compareBuild(c){c instanceof a||(c=new a(c,this.options));let u=0;do{const d=this.build[u],f=c.build[u];if(e("build compare",u,d,f),d===void 0&&f===void 0)return 0;if(f===void 0)return 1;if(d===void 0)return-1;if(d===f)continue;return s(d,f)}while(++u)}inc(c,u,d){if(c.startsWith("pre")){if(!u&&d===!1)throw new Error("invalid increment argument: identifier is empty");if(u){const f=`-${u}`.match(this.options.loose?r[o.PRERELEASELOOSE]:r[o.PRERELEASE]);if(!f||f[1]!==u)throw new Error(`invalid identifier: ${u}`)}}switch(c){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",u,d);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",u,d);break;case"prepatch":this.prerelease.length=0,this.inc("patch",u,d),this.inc("pre",u,d);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",u,d),this.inc("pre",u,d);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const f=Number(d)?1:0;if(this.prerelease.length===0)this.prerelease=[f];else{let h=this.prerelease.length;for(;--h>=0;)typeof this.prerelease[h]=="number"&&(this.prerelease[h]++,h=-2);if(h===-1){if(u===this.prerelease.join(".")&&d===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(f)}}if(u){let h=[u,f];d===!1&&(h=[u]),s(this.prerelease[0],u)===0?isNaN(this.prerelease[1])&&(this.prerelease=h):this.prerelease=h}break}default:throw new Error(`invalid increment argument: ${c}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return hi=a,hi}var gi,yu;function tr(){if(yu)return gi;yu=1;const e=Da();return gi=(n,r,o)=>new e(n,o).compare(new e(r,o)),gi}var pi,wu;function M0(){if(wu)return pi;wu=1;const e=tr();return pi=(n,r,o)=>e(n,r,o)===0,pi}var mi,bu;function F0(){if(bu)return mi;bu=1;const e=tr();return mi=(n,r,o)=>e(n,r,o)!==0,mi}var vi,Su;function O0(){if(Su)return vi;Su=1;const e=tr();return vi=(n,r,o)=>e(n,r,o)>0,vi}var yi,xu;function A0(){if(xu)return yi;xu=1;const e=tr();return yi=(n,r,o)=>e(n,r,o)>=0,yi}var wi,Cu;function T0(){if(Cu)return wi;Cu=1;const e=tr();return wi=(n,r,o)=>e(n,r,o)<0,wi}var bi,Eu;function D0(){if(Eu)return bi;Eu=1;const e=tr();return bi=(n,r,o)=>e(n,r,o)<=0,bi}var Si,Ru;function L0(){if(Ru)return Si;Ru=1;const e=M0(),t=F0(),n=O0(),r=A0(),o=T0(),i=D0();return Si=(a,l,c,u)=>{switch(l){case"===":return typeof a=="object"&&(a=a.version),typeof c=="object"&&(c=c.version),a===c;case"!==":return typeof a=="object"&&(a=a.version),typeof c=="object"&&(c=c.version),a!==c;case"":case"=":case"==":return e(a,c,u);case"!=":return t(a,c,u);case">":return n(a,c,u);case">=":return r(a,c,u);case"<":return o(a,c,u);case"<=":return i(a,c,u);default:throw new TypeError(`Invalid operator: ${l}`)}},Si}var xi,Pu;function _0(){if(Pu)return xi;Pu=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(u,d){if(d=n(d),u instanceof t){if(u.loose===!!d.loose)return u;u=u.value}u=u.trim().split(/\s+/).join(" "),s("comparator",u,d),this.options=d,this.loose=!!d.loose,this.parse(u),this.semver===e?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(u){const d=this.options.loose?r[o.COMPARATORLOOSE]:r[o.COMPARATOR],f=u.match(d);if(!f)throw new TypeError(`Invalid comparator: ${u}`);this.operator=f[1]!==void 0?f[1]:"",this.operator==="="&&(this.operator=""),f[2]?this.semver=new a(f[2],this.options.loose):this.semver=e}toString(){return this.value}test(u){if(s("Comparator.test",u,this.options.loose),this.semver===e||u===e)return!0;if(typeof u=="string")try{u=new a(u,this.options)}catch{return!1}return i(u,this.operator,this.semver,this.options)}intersects(u,d){if(!(u instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(u.value,d).test(this.value):u.operator===""?u.value===""?!0:new l(this.value,d).test(u.semver):(d=n(d),d.includePrerelease&&(this.value==="<0.0.0-0"||u.value==="<0.0.0-0")||!d.includePrerelease&&(this.value.startsWith("<0.0.0")||u.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&u.operator.startsWith(">")||this.operator.startsWith("<")&&u.operator.startsWith("<")||this.semver.version===u.semver.version&&this.operator.includes("=")&&u.operator.includes("=")||i(this.semver,"<",u.semver,d)&&this.operator.startsWith(">")&&u.operator.startsWith("<")||i(this.semver,">",u.semver,d)&&this.operator.startsWith("<")&&u.operator.startsWith(">")))}}xi=t;const n=Oa(),{safeRe:r,t:o}=Ta(),i=L0(),s=_o(),a=Da(),l=Rf();return xi}var Ci,Iu;function Rf(){if(Iu)return Ci;Iu=1;const e=/\s+/g;class t{constructor(E,x){if(x=o(x),E instanceof t)return E.loose===!!x.loose&&E.includePrerelease===!!x.includePrerelease?E:new t(E.raw,x);if(E instanceof i)return this.raw=E.value,this.set=[[E]],this.formatted=void 0,this;if(this.options=x,this.loose=!!x.loose,this.includePrerelease=!!x.includePrerelease,this.raw=E.trim().replace(e," "),this.set=this.raw.split("||").map(I=>this.parseRange(I.trim())).filter(I=>I.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const I=this.set[0];if(this.set=this.set.filter($=>!g($[0])),this.set.length===0)this.set=[I];else if(this.set.length>1){for(const $ of this.set)if($.length===1&&y($[0])){this.set=[$];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let E=0;E<this.set.length;E++){E>0&&(this.formatted+="||");const x=this.set[E];for(let I=0;I<x.length;I++)I>0&&(this.formatted+=" "),this.formatted+=x[I].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(E){const I=((this.options.includePrerelease&&h)|(this.options.loose&&p))+":"+E,$=r.get(I);if($)return $;const F=this.options.loose,D=F?l[c.HYPHENRANGELOOSE]:l[c.HYPHENRANGE];E=E.replace(D,B(this.options.includePrerelease)),s("hyphen replace",E),E=E.replace(l[c.COMPARATORTRIM],u),s("comparator trim",E),E=E.replace(l[c.TILDETRIM],d),s("tilde trim",E),E=E.replace(l[c.CARETTRIM],f),s("caret trim",E);let z=E.split(" ").map(se=>v(se,this.options)).join(" ").split(/\s+/).map(se=>N(se,this.options));F&&(z=z.filter(se=>(s("loose invalid filter",se,this.options),!!se.match(l[c.COMPARATORLOOSE])))),s("range list",z);const U=new Map,Y=z.map(se=>new i(se,this.options));for(const se of Y){if(g(se))return[se];U.set(se.value,se)}U.size>1&&U.has("")&&U.delete("");const ce=[...U.values()];return r.set(I,ce),ce}intersects(E,x){if(!(E instanceof t))throw new TypeError("a Range is required");return this.set.some(I=>m(I,x)&&E.set.some($=>m($,x)&&I.every(F=>$.every(D=>F.intersects(D,x)))))}test(E){if(!E)return!1;if(typeof E=="string")try{E=new a(E,this.options)}catch{return!1}for(let x=0;x<this.set.length;x++)if(oe(this.set[x],E,this.options))return!0;return!1}}Ci=t;const n=I0(),r=new n,o=Oa(),i=_0(),s=_o(),a=Da(),{safeRe:l,t:c,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:f}=Ta(),{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:p}=Aa(),g=P=>P.value==="<0.0.0-0",y=P=>P.value==="",m=(P,E)=>{let x=!0;const I=P.slice();let $=I.pop();for(;x&&I.length;)x=I.every(F=>$.intersects(F,E)),$=I.pop();return x},v=(P,E)=>(s("comp",P,E),P=O(P,E),s("caret",P),P=S(P,E),s("tildes",P),P=k(P,E),s("xrange",P),P=K(P,E),s("stars",P),P),w=P=>!P||P.toLowerCase()==="x"||P==="*",S=(P,E)=>P.trim().split(/\s+/).map(x=>C(x,E)).join(" "),C=(P,E)=>{const x=E.loose?l[c.TILDELOOSE]:l[c.TILDE];return P.replace(x,(I,$,F,D,z)=>{s("tilde",P,I,$,F,D,z);let U;return w($)?U="":w(F)?U=`>=${$}.0.0 <${+$+1}.0.0-0`:w(D)?U=`>=${$}.${F}.0 <${$}.${+F+1}.0-0`:z?(s("replaceTilde pr",z),U=`>=${$}.${F}.${D}-${z} <${$}.${+F+1}.0-0`):U=`>=${$}.${F}.${D} <${$}.${+F+1}.0-0`,s("tilde return",U),U})},O=(P,E)=>P.trim().split(/\s+/).map(x=>L(x,E)).join(" "),L=(P,E)=>{s("caret",P,E);const x=E.loose?l[c.CARETLOOSE]:l[c.CARET],I=E.includePrerelease?"-0":"";return P.replace(x,($,F,D,z,U)=>{s("caret",P,$,F,D,z,U);let Y;return w(F)?Y="":w(D)?Y=`>=${F}.0.0${I} <${+F+1}.0.0-0`:w(z)?F==="0"?Y=`>=${F}.${D}.0${I} <${F}.${+D+1}.0-0`:Y=`>=${F}.${D}.0${I} <${+F+1}.0.0-0`:U?(s("replaceCaret pr",U),F==="0"?D==="0"?Y=`>=${F}.${D}.${z}-${U} <${F}.${D}.${+z+1}-0`:Y=`>=${F}.${D}.${z}-${U} <${F}.${+D+1}.0-0`:Y=`>=${F}.${D}.${z}-${U} <${+F+1}.0.0-0`):(s("no pr"),F==="0"?D==="0"?Y=`>=${F}.${D}.${z}${I} <${F}.${D}.${+z+1}-0`:Y=`>=${F}.${D}.${z}${I} <${F}.${+D+1}.0-0`:Y=`>=${F}.${D}.${z} <${+F+1}.0.0-0`),s("caret return",Y),Y})},k=(P,E)=>(s("replaceXRanges",P,E),P.split(/\s+/).map(x=>T(x,E)).join(" ")),T=(P,E)=>{P=P.trim();const x=E.loose?l[c.XRANGELOOSE]:l[c.XRANGE];return P.replace(x,(I,$,F,D,z,U)=>{s("xRange",P,I,$,F,D,z,U);const Y=w(F),ce=Y||w(D),se=ce||w(z),Oe=se;return $==="="&&Oe&&($=""),U=E.includePrerelease?"-0":"",Y?$===">"||$==="<"?I="<0.0.0-0":I="*":$&&Oe?(ce&&(D=0),z=0,$===">"?($=">=",ce?(F=+F+1,D=0,z=0):(D=+D+1,z=0)):$==="<="&&($="<",ce?F=+F+1:D=+D+1),$==="<"&&(U="-0"),I=`${$+F}.${D}.${z}${U}`):ce?I=`>=${F}.0.0${U} <${+F+1}.0.0-0`:se&&(I=`>=${F}.${D}.0${U} <${F}.${+D+1}.0-0`),s("xRange return",I),I})},K=(P,E)=>(s("replaceStars",P,E),P.trim().replace(l[c.STAR],"")),N=(P,E)=>(s("replaceGTE0",P,E),P.trim().replace(l[E.includePrerelease?c.GTE0PRE:c.GTE0],"")),B=P=>(E,x,I,$,F,D,z,U,Y,ce,se,Oe)=>(w(I)?x="":w($)?x=`>=${I}.0.0${P?"-0":""}`:w(F)?x=`>=${I}.${$}.0${P?"-0":""}`:D?x=`>=${x}`:x=`>=${x}${P?"-0":""}`,w(Y)?U="":w(ce)?U=`<${+Y+1}.0.0-0`:w(se)?U=`<${Y}.${+ce+1}.0-0`:Oe?U=`<=${Y}.${ce}.${se}-${Oe}`:P?U=`<${Y}.${ce}.${+se+1}-0`:U=`<=${U}`,`${x} ${U}`.trim()),oe=(P,E,x)=>{for(let I=0;I<P.length;I++)if(!P[I].test(E))return!1;if(E.prerelease.length&&!x.includePrerelease){for(let I=0;I<P.length;I++)if(s(P[I].semver),P[I].semver!==i.ANY&&P[I].semver.prerelease.length>0){const $=P[I].semver;if($.major===E.major&&$.minor===E.minor&&$.patch===E.patch)return!0}return!1}return!0};return Ci}var Ei,$u;function k0(){if($u)return Ei;$u=1;const e=Rf();return Ei=(n,r)=>{try{return new e(n,r).range||"*"}catch{return null}},Ei}var V0=k0();const Mu=bd(V0);var Fu=ie("<div>"),N0=ie('<div class="text-sm text-muted-foreground flex flex-row items-center">Platform: <p class="ml-2 flex flex-row items-center"> iOS'),K0=ie('<div class="text-sm text-muted-foreground flex flex-row items-center">Platform: <p class="ml-2 flex flex-row items-center"> Android'),j0=ie('<form class="flex flex-col gap-3"><div></div><div><div class="flex items-center space-x-2"></div><p class="text-xs text-muted-foreground mt-[2px]">When disabled, this update will not be available to your users.</p></div><div><div class="flex items-center space-x-2"></div><p class="text-xs text-muted-foreground mt-[2px]">When enabled, this update will require users to update before continuing to use the application.</p></div><div class="mt-2 space-y-1"><h3 class="text-md text-bold font-medium">Metadata'),z0=ie('<em class="text-xs text-red-500">'),B0=ie('<em class="text-xs text-muted-foreground">'),H0=ie('<div class="text-sm text-muted-foreground flex flex-row items-center">App Version: <p class=ml-2>'),G0=ie('<div class="text-sm text-muted-foreground flex flex-row items-center">Commit Hash: '),U0=ie("<a target=_blank rel=noreferrer class=ml-2>"),q0=ie("<p class=ml-2>");const W0=({bundleId:e,onClose:t})=>{const n=Qb(e);return b(Um,{class:"flex flex-col h-full",get children(){return[b(qm,{class:"mb-4",get children(){return b(Wm,{get children(){return["Edit ",e]}})}}),b(pe,{get when(){return n.data},get fallback(){return V(()=>!!n.isFetched)()?b(Xm,{get children(){return["No update bundle found for bundle id ",e]}}):b(i0,{height:374,radius:10})},children:r=>b(X0,{get bundle(){return r()},onEditSuccess:t})})]}})},X0=({bundle:e,onEditSuccess:t})=>{const n=Pc(),r=Yb(),[o,i]=j(!1),s=V(()=>{var u,d;return((d=(u=r.data)==null?void 0:u.console)==null?void 0:d.gitUrl)??null}),a=V(()=>e.gitCommitHash),l=P0(()=>({defaultValues:{message:e.message,targetAppVersion:e.targetAppVersion,enabled:e.enabled,shouldForceUpdate:e.shouldForceUpdate},onSubmit:async({value:u})=>{i(!0);try{const d=await jr.bundles[":bundleId"].$patch({param:{bundleId:e.id},json:u});if(d.status!==200){const f=await d.json();ml({title:"Error",description:f.error,variant:"error"})}}catch(d){d instanceof Error&&ml({title:"Error",description:d.message,variant:"error"})}finally{i(!1),n.invalidateQueries({queryKey:["bundle",e.id]}),n.invalidateQueries({queryKey:["bundles"]}),t()}}})),c=l.useStore(u=>u.isValid);return(()=>{var u=j0(),d=u.firstChild,f=d.nextSibling,h=f.firstChild,p=f.nextSibling,g=p.firstChild,y=p.nextSibling;return y.firstChild,u.addEventListener("submit",m=>{m.preventDefault(),m.stopPropagation(),l.handleSubmit()}),X(d,b(ri,{class:"grid w-full max-w-sm items-center gap-1.5",get children(){return[b(ii,{for:"message",children:"Message"}),b(l.Field,{name:"message",children:m=>b(oi,{type:"text",id:"message",placeholder:"Message",get name(){return m().name},get value(){return m().state.value??""},get onBlur(){return m().handleBlur},onInput:v=>m().handleChange(v.currentTarget.value)})})]}})),X(u,b(pe,{get when(){return e.targetAppVersion},get children(){var m=Fu();return X(m,b(ri,{class:"grid w-full max-w-sm items-center gap-1.5",get children(){return[b(ii,{for:"targetAppVersion",children:"Target App Version"}),b(l.Field,{name:"targetAppVersion",validators:{onChange:({value:v})=>{if((v==null?void 0:v.length)===0||!Mu(v))return"Invalid target app version"}},children:v=>[b(oi,{type:"text",id:"targetAppVersion",get class(){return de(v().state.meta.errors.length>0&&"border-red-500 focus-visible:ring-red-500")},placeholder:"Target App Version",get name(){return v().name},get value(){return v().state.value??""},get onBlur(){return v().handleBlur},onInput:w=>v().handleChange(w.currentTarget.value)}),V(()=>V(()=>v().state.meta.errors.length>0)()?(()=>{var w=z0();return X(w,()=>v().state.meta.errors.join(", ")),w})():(()=>{var w=B0();return X(w,()=>Mu(v().state.value)),w})())]})]}})),m}}),f),X(u,b(pe,{get when(){return e.fingerprintHash},get children(){var m=Fu();return X(m,b(ri,{class:"grid w-full max-w-sm items-center gap-1.5",get children(){return[b(ii,{for:"fingerprintHash",children:"Fingerprint Hash"}),b(oi,{type:"text",id:"fingerprintHash",get value(){return e.fingerprintHash??""},disabled:!0})]}})),m}}),f),X(h,b(l.Field,{name:"enabled",children:m=>b(iu,{class:"flex items-center space-x-2",get checked(){return m().state.value},get name(){return m().name},onChange:v=>m().handleChange(v),get children(){return[b(su,{get children(){return b(au,{})}}),b(lu,{children:"Enabled"})]}})})),X(g,b(l.Field,{name:"shouldForceUpdate",children:m=>b(iu,{class:"flex items-center space-x-2",get checked(){return m().state.value},get name(){return m().name},onChange:v=>m().handleChange(v),get children(){return[b(su,{get children(){return b(au,{})}}),b(lu,{children:"Force Update"})]}})})),X(u,b(pe,{get when(){return!o()},get fallback(){return b(ru,{type:"submit",class:"mt-4",disabled:!0,get children(){return b(by,{class:"animate-spin"})}})},get children(){return b(ru,{type:"submit",class:"mt-4",get disabled(){return!c()},children:"Save"})}}),y),X(y,b(pe,{get when(){return e.platform==="ios"},get children(){var m=N0(),v=m.firstChild,w=v.nextSibling,S=w.firstChild;return X(w,b(ad,{class:"inline-block"}),S),m}}),null),X(y,b(pe,{get when(){return e.platform==="android"},get children(){var m=K0(),v=m.firstChild,w=v.nextSibling,S=w.firstChild;return X(w,b(sd,{class:"inline-block"}),S),m}}),null),X(y,b(pe,{get when(){var m;return(m=e.metadata)==null?void 0:m.app_version},children:m=>(()=>{var v=H0(),w=v.firstChild,S=w.nextSibling;return X(S,m),v})()}),null),X(y,b(pe,{get when(){return a()},children:m=>(()=>{var v=G0();return v.firstChild,X(v,(()=>{var w=V(()=>!!s());return()=>w()?(()=>{var S=U0();return X(S,()=>m().slice(0,8)),je(()=>Bn(S,"href",`${s()}/commit/${m}`)),S})():(()=>{var S=q0();return X(S,()=>m().slice(0,8)),S})()})(),null),v})()}),null),u})()};function Q0(){const{bundleIdFilter:e,setBundleIdFilter:t}=od(),n=V(()=>e()!==null),r=()=>{t(null)};return b(jm,{get open(){return n()},onOpenChange:o=>{o||t(null)},get children(){return[b(n0,{columns:My,onRowClick:o=>{t(o.id)}}),b(pe,{get when(){return e()},get children(){return b(Hf,{get children(){return b(W0,{get bundleId(){return e()},onClose:r})}})}})]}})}const Y0=new Eg;function Z0(){return b(Rg,{client:Y0,get children(){return[b(Xh,{root:e=>b(mh,{get children(){return[b(wh,{children:"HotUpdater Console"}),b(ng,{get children(){return e.children}})]}}),get children(){return b(zh,{path:"/",component:Q0})}}),b(wm,{})]}})}const Ou=document.getElementById("root");Ou&&th(()=>b(Z0,{}),Ou);
|