llmtap 0.1.8 → 0.1.12

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.
Files changed (42) hide show
  1. package/dist/dashboard/assets/{CommandBar-CBRbPbgc.js → CommandBar-B_DQ8GYv.js} +1 -1
  2. package/dist/dashboard/assets/Costs-dUmFKVXo.js +1 -0
  3. package/dist/dashboard/assets/Dashboard-IWWZjOTC.js +2 -0
  4. package/dist/dashboard/assets/{DataTable-p1PD-dJj.js → DataTable-D8anr2Up.js} +1 -1
  5. package/dist/dashboard/assets/{EmptyState-xDl-M9Rz.js → EmptyState-Dvek8YFy.js} +1 -1
  6. package/dist/dashboard/assets/{GettingStartedPanel-Cn46fQ1w.js → GettingStartedPanel-CsH3tON-.js} +1 -1
  7. package/dist/dashboard/assets/{Models-BpMhGVp5.js → Models-B0Q40VZD.js} +1 -1
  8. package/dist/dashboard/assets/{ProviderBadge-Cs31007s.js → ProviderBadge-BBZCNYYv.js} +1 -1
  9. package/dist/dashboard/assets/Sessions-C3P6KXfc.js +3 -0
  10. package/dist/dashboard/assets/{Settings-7wRfCPnB.js → Settings-C_38Y0pf.js} +2 -2
  11. package/dist/dashboard/assets/TraceDetail-CK0lF8m4.js +17 -0
  12. package/dist/dashboard/assets/Traces-EE_1Xnk8.js +1 -0
  13. package/dist/dashboard/assets/accordion-BvqffQGQ.js +1 -0
  14. package/dist/dashboard/assets/badge-FUUR5c9z.js +1 -0
  15. package/dist/dashboard/assets/{content-DZmxO8bn.js → content-9_8TanwE.js} +1 -1
  16. package/dist/dashboard/assets/format-BuYDUKIt.js +1 -0
  17. package/dist/dashboard/assets/icons-x20EK9lj.js +1 -0
  18. package/dist/dashboard/assets/index-9FuuW_w-.css +1 -0
  19. package/dist/dashboard/assets/index-D1QTIMAj.js +1023 -0
  20. package/dist/dashboard/assets/line-chart-recharts-iHjPE6yj.js +61 -0
  21. package/dist/dashboard/assets/llmtap-logo-CD_0qTjn.png +0 -0
  22. package/dist/dashboard/assets/{motion-CSeNjKbZ.js → motion-DMBhW-IL.js} +1 -1
  23. package/dist/dashboard/assets/{number-ticker-CjofSQ3s.js → number-ticker-tHv0tgNj.js} +1 -1
  24. package/dist/dashboard/assets/query-b9vbXHQr.js +4 -0
  25. package/dist/dashboard/assets/{select-BJEJvQo4.js → select-B7JjM23_.js} +1 -1
  26. package/dist/dashboard/assets/statistics-with-status-grid-CVBurKW6.js +1 -0
  27. package/dist/dashboard/assets/{ui-BFiKdTjl.js → ui-CaGzZKq9.js} +1 -1
  28. package/dist/dashboard/index.html +6 -6
  29. package/dist/index.js +0 -0
  30. package/package.json +14 -24
  31. package/dist/dashboard/assets/Costs-B-TMvDlI.js +0 -1
  32. package/dist/dashboard/assets/Dashboard-CFNAMjdc.js +0 -1
  33. package/dist/dashboard/assets/Sessions-CiKyTRlP.js +0 -3
  34. package/dist/dashboard/assets/TraceDetail-CKDDbbEV.js +0 -17
  35. package/dist/dashboard/assets/Traces-BYWwPP14.js +0 -1
  36. package/dist/dashboard/assets/accordion-CC_sxDZ8.js +0 -1
  37. package/dist/dashboard/assets/format-zoXqpaOb.js +0 -1
  38. package/dist/dashboard/assets/icons-BOLUIAKd.js +0 -1
  39. package/dist/dashboard/assets/index-CtlcBMi-.css +0 -1
  40. package/dist/dashboard/assets/index-DG2eF3M2.js +0 -14
  41. package/dist/dashboard/assets/query-DVWnIZNd.js +0 -4
  42. package/dist/dashboard/assets/statistics-with-status-grid-tcb9SpIY.js +0 -1
@@ -0,0 +1,4 @@
1
+ function Ot(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var dr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var me={exports:{}},ne={};var Qe;function At(){if(Qe)return ne;Qe=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,s){var o=null;if(s!==void 0&&(o=""+s),i.key!==void 0&&(o=""+i.key),"key"in i){s={};for(var u in i)u!=="key"&&(s[u]=i[u])}else s=i;return i=s.ref,{$$typeof:e,type:r,key:o,ref:i!==void 0?i:null,props:s}}return ne.Fragment=t,ne.jsx=n,ne.jsxs=n,ne}var Ne;function Vt(){return Ne||(Ne=1,me.exports=At()),me.exports}var Tt=Vt(),ve={exports:{}},w={};var Be;function Ht(){if(Be)return w;Be=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),a=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),g=Symbol.iterator;function f(l){return l===null||typeof l!="object"?null:(l=g&&l[g]||l["@@iterator"],typeof l=="function"?l:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},p=Object.assign,C={};function S(l,m,P){this.props=l,this.context=m,this.refs=C,this.updater=P||h}S.prototype.isReactComponent={},S.prototype.setState=function(l,m){if(typeof l!="object"&&typeof l!="function"&&l!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,l,m,"setState")},S.prototype.forceUpdate=function(l){this.updater.enqueueForceUpdate(this,l,"forceUpdate")};function F(){}F.prototype=S.prototype;function M(l,m,P){this.props=l,this.context=m,this.refs=C,this.updater=P||h}var D=M.prototype=new F;D.constructor=M,p(D,S.prototype),D.isPureReactComponent=!0;var O=Array.isArray;function L(){}var E={H:null,A:null,T:null,S:null},A=Object.prototype.hasOwnProperty;function q(l,m,P){var _=P.ref;return{$$typeof:e,type:l,key:m,ref:_!==void 0?_:null,props:P}}function B(l,m){return q(l.type,m,l.props)}function Q(l){return typeof l=="object"&&l!==null&&l.$$typeof===e}function ee(l){var m={"=":"=0",":":"=2"};return"$"+l.replace(/[=:]/g,function(P){return m[P]})}var W=/\/+/g;function pe(l,m){return typeof l=="object"&&l!==null&&l.key!=null?ee(""+l.key):m.toString(36)}function Mt(l){switch(l.status){case"fulfilled":return l.value;case"rejected":throw l.reason;default:switch(typeof l.status=="string"?l.then(L,L):(l.status="pending",l.then(function(m){l.status==="pending"&&(l.status="fulfilled",l.value=m)},function(m){l.status==="pending"&&(l.status="rejected",l.reason=m)})),l.status){case"fulfilled":return l.value;case"rejected":throw l.reason}}throw l}function te(l,m,P,_,I){var x=typeof l;(x==="undefined"||x==="boolean")&&(l=null);var $=!1;if(l===null)$=!0;else switch(x){case"bigint":case"string":case"number":$=!0;break;case"object":switch(l.$$typeof){case e:case t:$=!0;break;case d:return $=l._init,te($(l._payload),m,P,_,I)}}if($)return I=I(l),$=_===""?"."+pe(l,0):_,O(I)?(P="",$!=null&&(P=$.replace(W,"$&/")+"/"),te(I,m,P,"",function($t){return $t})):I!=null&&(Q(I)&&(I=B(I,P+(I.key==null||l&&l.key===I.key?"":(""+I.key).replace(W,"$&/")+"/")+$)),m.push(I)),1;$=0;var k=_===""?".":_+":";if(O(l))for(var G=0;G<l.length;G++)_=l[G],x=k+pe(_,G),$+=te(_,m,P,x,I);else if(G=f(l),typeof G=="function")for(l=G.call(l),G=0;!(_=l.next()).done;)_=_.value,x=k+pe(_,G++),$+=te(_,m,P,x,I);else if(x==="object"){if(typeof l.then=="function")return te(Mt(l),m,P,_,I);throw m=String(l),Error("Objects are not valid as a React child (found: "+(m==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":m)+"). If you meant to render a collection of children, use an array instead.")}return $}function le(l,m,P){if(l==null)return l;var _=[],I=0;return te(l,_,"","",function(x){return m.call(P,x,I++)}),_}function It(l){if(l._status===-1){var m=l._result;m=m(),m.then(function(P){(l._status===0||l._status===-1)&&(l._status=1,l._result=P)},function(P){(l._status===0||l._status===-1)&&(l._status=2,l._result=P)}),l._status===-1&&(l._status=0,l._result=m)}if(l._status===1)return l._result.default;throw l._result}var ke=typeof reportError=="function"?reportError:function(l){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var m=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof l=="object"&&l!==null&&typeof l.message=="string"?String(l.message):String(l),error:l});if(!window.dispatchEvent(m))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",l);return}console.error(l)},xt={map:le,forEach:function(l,m,P){le(l,function(){m.apply(this,arguments)},P)},count:function(l){var m=0;return le(l,function(){m++}),m},toArray:function(l){return le(l,function(m){return m})||[]},only:function(l){if(!Q(l))throw Error("React.Children.only expected to receive a single React element child.");return l}};return w.Activity=v,w.Children=xt,w.Component=S,w.Fragment=n,w.Profiler=i,w.PureComponent=M,w.StrictMode=r,w.Suspense=a,w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,w.__COMPILER_RUNTIME={__proto__:null,c:function(l){return E.H.useMemoCache(l)}},w.cache=function(l){return function(){return l.apply(null,arguments)}},w.cacheSignal=function(){return null},w.cloneElement=function(l,m,P){if(l==null)throw Error("The argument must be a React element, but you passed "+l+".");var _=p({},l.props),I=l.key;if(m!=null)for(x in m.key!==void 0&&(I=""+m.key),m)!A.call(m,x)||x==="key"||x==="__self"||x==="__source"||x==="ref"&&m.ref===void 0||(_[x]=m[x]);var x=arguments.length-2;if(x===1)_.children=P;else if(1<x){for(var $=Array(x),k=0;k<x;k++)$[k]=arguments[k+2];_.children=$}return q(l.type,I,_)},w.createContext=function(l){return l={$$typeof:o,_currentValue:l,_currentValue2:l,_threadCount:0,Provider:null,Consumer:null},l.Provider=l,l.Consumer={$$typeof:s,_context:l},l},w.createElement=function(l,m,P){var _,I={},x=null;if(m!=null)for(_ in m.key!==void 0&&(x=""+m.key),m)A.call(m,_)&&_!=="key"&&_!=="__self"&&_!=="__source"&&(I[_]=m[_]);var $=arguments.length-2;if($===1)I.children=P;else if(1<$){for(var k=Array($),G=0;G<$;G++)k[G]=arguments[G+2];I.children=k}if(l&&l.defaultProps)for(_ in $=l.defaultProps,$)I[_]===void 0&&(I[_]=$[_]);return q(l,x,I)},w.createRef=function(){return{current:null}},w.forwardRef=function(l){return{$$typeof:u,render:l}},w.isValidElement=Q,w.lazy=function(l){return{$$typeof:d,_payload:{_status:-1,_result:l},_init:It}},w.memo=function(l,m){return{$$typeof:c,type:l,compare:m===void 0?null:m}},w.startTransition=function(l){var m=E.T,P={};E.T=P;try{var _=l(),I=E.S;I!==null&&I(P,_),typeof _=="object"&&_!==null&&typeof _.then=="function"&&_.then(L,ke)}catch(x){ke(x)}finally{m!==null&&P.types!==null&&(m.types=P.types),E.T=m}},w.unstable_useCacheRefresh=function(){return E.H.useCacheRefresh()},w.use=function(l){return E.H.use(l)},w.useActionState=function(l,m,P){return E.H.useActionState(l,m,P)},w.useCallback=function(l,m){return E.H.useCallback(l,m)},w.useContext=function(l){return E.H.useContext(l)},w.useDebugValue=function(){},w.useDeferredValue=function(l,m){return E.H.useDeferredValue(l,m)},w.useEffect=function(l,m){return E.H.useEffect(l,m)},w.useEffectEvent=function(l){return E.H.useEffectEvent(l)},w.useId=function(){return E.H.useId()},w.useImperativeHandle=function(l,m,P){return E.H.useImperativeHandle(l,m,P)},w.useInsertionEffect=function(l,m){return E.H.useInsertionEffect(l,m)},w.useLayoutEffect=function(l,m){return E.H.useLayoutEffect(l,m)},w.useMemo=function(l,m){return E.H.useMemo(l,m)},w.useOptimistic=function(l,m){return E.H.useOptimistic(l,m)},w.useReducer=function(l,m,P){return E.H.useReducer(l,m,P)},w.useRef=function(l){return E.H.useRef(l)},w.useState=function(l){return E.H.useState(l)},w.useSyncExternalStore=function(l,m,P){return E.H.useSyncExternalStore(l,m,P)},w.useTransition=function(){return E.H.useTransition()},w.version="19.2.4",w}var Ke;function Lt(){return Ke||(Ke=1,ve.exports=Ht()),ve.exports}var T=Lt();const Gt=Dt(T),fr=Ot({__proto__:null,default:Gt},[T]);var ue=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(){}},bt={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},zt=class{#e=bt;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},J=new zt;function jt(e){setTimeout(e,0)}var Z=typeof window>"u"||"Deno"in globalThis;function b(){}function qt(e,t){return typeof e=="function"?e(t):e}function Fe(e){return typeof e=="number"&&e>=0&&e!==1/0}function lt(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Y(e,t){return typeof e=="function"?e(t):e}function j(e,t){return typeof e=="function"?e(t):e}function Ye(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:u}=e;if(o){if(r){if(t.queryHash!==Le(o,t.options))return!1}else if(!oe(t.queryKey,o))return!1}if(n!=="all"){const a=t.isActive();if(n==="active"&&!a||n==="inactive"&&a)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||i&&i!==t.state.fetchStatus||s&&!s(t))}function Xe(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(se(t.options.mutationKey)!==se(s))return!1}else if(!oe(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Le(e,t){return(t?.queryKeyHashFn||se)(e)}function se(e){return JSON.stringify(e,(t,n)=>Me(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function oe(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>oe(e[n],t[n])):!1}var Ut=Object.prototype.hasOwnProperty;function at(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=We(e)&&We(t);if(!r&&!(Me(e)&&Me(t)))return t;const s=(r?e:Object.keys(e)).length,o=r?t:Object.keys(t),u=o.length,a=r?new Array(u):{};let c=0;for(let d=0;d<u;d++){const v=r?d:o[d],g=e[v],f=t[v];if(g===f){a[v]=g,(r?d<s:Ut.call(e,v))&&c++;continue}if(g===null||f===null||typeof g!="object"||typeof f!="object"){a[v]=f;continue}const h=at(g,f,n+1);a[v]=h,h===g&&c++}return s===u&&c===s?e:a}function Ee(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 We(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Me(e){if(!Je(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Je(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Je(e){return Object.prototype.toString.call(e)==="[object Object]"}function kt(e){return new Promise(t=>{J.setTimeout(t,e)})}function Ie(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?at(e,t):t}function Qt(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Nt(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ge=Symbol();function ct(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ge?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function dt(e,t){return typeof e=="function"?e(...t):!!e}function Bt(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var Kt=class extends ue{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Z&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},be=new Kt;function xe(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var Yt=jt;function Xt(){let e=[],t=0,n=u=>{u()},r=u=>{u()},i=Yt;const s=u=>{t?e.push(u):i(()=>{n(u)})},o=()=>{const u=e;e=[],u.length&&i(()=>{r(()=>{u.forEach(a=>{n(a)})})})};return{batch:u=>{let a;t++;try{a=u()}finally{t--,t||o()}return a},batchCalls:u=>(...a)=>{s(()=>{u(...a)})},schedule:s,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}var V=Xt(),Wt=class extends ue{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Z&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},ge=new Wt;function Jt(e){return Math.min(1e3*2**e,3e4)}function ft(e){return(e??"online")==="online"?ge.isOnline():!0}var $e=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function gt(e){let t=!1,n=0,r;const i=xe(),s=()=>i.status!=="pending",o=p=>{if(!s()){const C=new $e(p);g(C),e.onCancel?.(C)}},u=()=>{t=!0},a=()=>{t=!1},c=()=>be.isFocused()&&(e.networkMode==="always"||ge.isOnline())&&e.canRun(),d=()=>ft(e.networkMode)&&e.canRun(),v=p=>{s()||(r?.(),i.resolve(p))},g=p=>{s()||(r?.(),i.reject(p))},f=()=>new Promise(p=>{r=C=>{(s()||c())&&p(C)},e.onPause?.()}).then(()=>{r=void 0,s()||e.onContinue?.()}),h=()=>{if(s())return;let p;const C=n===0?e.initialPromise:void 0;try{p=C??e.fn()}catch(S){p=Promise.reject(S)}Promise.resolve(p).then(v).catch(S=>{if(s())return;const F=e.retry??(Z?0:3),M=e.retryDelay??Jt,D=typeof M=="function"?M(n,S):M,O=F===!0||typeof F=="number"&&n<F||typeof F=="function"&&F(n,S);if(t||!O){g(S);return}n++,e.onFail?.(n,S),kt(D).then(()=>c()?void 0:f()).then(()=>{t?g(S):h()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:u,continueRetry:a,canStart:d,start:()=>(d()?h():f().then(h),i)}}var ht=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Fe(this.gcTime)&&(this.#e=J.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Z?1/0:300*1e3))}clearGcTimeout(){this.#e&&(J.clearTimeout(this.#e),this.#e=void 0)}},Zt=class extends ht{#e;#t;#n;#i;#r;#u;#o;constructor(e){super(),this.#o=!1,this.#u=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=et(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#u,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=et(this.options);t.data!==void 0&&(this.setState(Ze(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=Ie(this.state.data,e,this.options);return this.#s({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(b).catch(b):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>j(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ge||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Y(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!lt(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(a=>a.options.queryFn);u&&this.setOptions(u.options)}const n=new AbortController,r=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{const u=ct(this.options,t),c=(()=>{const d={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(d),d})();return this.#o=!1,this.options.persister?this.options.persister(u,c,this):u(c)},o=(()=>{const u={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(u),u})();this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#s({type:"fetch",meta:o.fetchOptions?.meta}),this.#r=gt({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:u=>{u instanceof $e&&u.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(u,a)=>{this.#s({type:"failed",failureCount:u,error:a})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const u=await this.#r.start();if(u===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(u),this.#n.config.onSuccess?.(u,this),this.#n.config.onSettled?.(u,this.state.error,this),u}catch(u){if(u instanceof $e){if(u.silent)return this.#r.promise;if(u.revert){if(this.state.data===void 0)throw u;return this.state.data}}throw this.#s({type:"error",error:u}),this.#n.config.onError?.(u,this),this.#n.config.onSettled?.(this.state.data,u,this),u}finally{this.scheduleGc()}}#s(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...pt(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...Ze(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),V.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function pt(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ft(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ze(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function et(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 en=class extends ue{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=xe(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#u;#o;#s;#p;#f;#g;#a;#c;#l;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),tt(this.#t,this.options)?this.#d():this.updateResult(),this.#C())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Oe(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Oe(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#y(),this.#R(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof j(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),t._defaulted&&!Ee(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&nt(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#t!==n||j(this.options.enabled,this.#t)!==j(t.enabled,this.#t)||Y(this.options.staleTime,this.#t)!==Y(t.staleTime,this.#t))&&this.#m();const i=this.#v();r&&(this.#t!==n||j(this.options.enabled,this.#t)!==j(t.enabled,this.#t)||i!==this.#l)&&this.#S(i)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return nn(this,n)&&(this.#i=n,this.#u=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#h.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#d(e){this.#w();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(b)),t}#m(){this.#y();const e=Y(this.options.staleTime,this.#t);if(Z||this.#i.isStale||!Fe(e))return;const n=lt(this.#i.dataUpdatedAt,e)+1;this.#a=J.setTimeout(()=>{this.#i.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#S(e){this.#R(),this.#l=e,!(Z||j(this.options.enabled,this.#t)===!1||!Fe(this.#l)||this.#l===0)&&(this.#c=J.setInterval(()=>{(this.options.refetchIntervalInBackground||be.isFocused())&&this.#d()},this.#l))}#C(){this.#m(),this.#S(this.#v())}#y(){this.#a&&(J.clearTimeout(this.#a),this.#a=void 0)}#R(){this.#c&&(J.clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const n=this.#t,r=this.options,i=this.#i,s=this.#r,o=this.#u,a=e!==n?e.state:this.#n,{state:c}=e;let d={...c},v=!1,g;if(t._optimisticResults){const A=this.hasListeners(),q=!A&&tt(e,t),B=A&&nt(e,n,t,r);(q||B)&&(d={...d,...pt(c.data,e.options)}),t._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:f,errorUpdatedAt:h,status:p}=d;g=d.data;let C=!1;if(t.placeholderData!==void 0&&g===void 0&&p==="pending"){let A;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(A=i.data,C=!0):A=typeof t.placeholderData=="function"?t.placeholderData(this.#g?.state.data,this.#g):t.placeholderData,A!==void 0&&(p="success",g=Ie(i?.data,A,t),v=!0)}if(t.select&&g!==void 0&&!C)if(i&&g===s?.data&&t.select===this.#p)g=this.#f;else try{this.#p=t.select,g=t.select(g),g=Ie(i?.data,g,t),this.#f=g,this.#s=null}catch(A){this.#s=A}this.#s&&(f=this.#s,g=this.#f,h=Date.now(),p="error");const S=d.fetchStatus==="fetching",F=p==="pending",M=p==="error",D=F&&S,O=g!==void 0,E={status:p,fetchStatus:d.fetchStatus,isPending:F,isSuccess:p==="success",isError:M,isInitialLoading:D,isLoading:D,data:g,dataUpdatedAt:d.dataUpdatedAt,error:f,errorUpdatedAt:h,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>a.dataUpdateCount||d.errorUpdateCount>a.errorUpdateCount,isFetching:S,isRefetching:S&&!F,isLoadingError:M&&!O,isPaused:d.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:M&&O,isStale:ze(e,t),refetch:this.refetch,promise:this.#o,isEnabled:j(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const A=E.data!==void 0,q=E.status==="error"&&!A,B=W=>{q?W.reject(E.error):A&&W.resolve(E.data)},Q=()=>{const W=this.#o=E.promise=xe();B(W)},ee=this.#o;switch(ee.status){case"pending":e.queryHash===n.queryHash&&B(ee);break;case"fulfilled":(q||E.data!==ee.value)&&Q();break;case"rejected":(!q||E.error!==ee.reason)&&Q();break}}return E}updateResult(){const e=this.#i,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#u=this.options,this.#r.data!==void 0&&(this.#g=this.#t),Ee(t,e))return;this.#i=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#h.size)return!0;const s=new Set(i??this.#h);return this.options.throwOnError&&s.add("error"),Object.keys(this.#i).some(o=>{const u=o;return this.#i[u]!==e[u]&&s.has(u)})};this.#_({listeners:n()})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#C()}#_(e){V.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function tn(e,t){return j(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function tt(e,t){return tn(e,t)||e.state.data!==void 0&&Oe(e,t,t.refetchOnMount)}function Oe(e,t,n){if(j(t.enabled,e)!==!1&&Y(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&ze(e,t)}return!1}function nt(e,t,n,r){return(e!==t||j(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ze(e,n)}function ze(e,t){return j(t.enabled,e)!==!1&&e.isStaleByTime(Y(t.staleTime,e))}function nn(e,t){return!Ee(e.getCurrentResult(),t)}function rt(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let u={pages:[],pageParams:[]},a=0;const c=async()=>{let d=!1;const v=h=>{Bt(h,()=>t.signal,()=>d=!0)},g=ct(t.options,t.fetchOptions),f=async(h,p,C)=>{if(d)return Promise.reject();if(p==null&&h.pages.length)return Promise.resolve(h);const F=(()=>{const L={client:t.client,queryKey:t.queryKey,pageParam:p,direction:C?"backward":"forward",meta:t.options.meta};return v(L),L})(),M=await g(F),{maxPages:D}=t.options,O=C?Nt:Qt;return{pages:O(h.pages,M,D),pageParams:O(h.pageParams,p,D)}};if(i&&s.length){const h=i==="backward",p=h?rn:it,C={pages:s,pageParams:o},S=p(r,C);u=await f(C,S,h)}else{const h=e??s.length;do{const p=a===0?o[0]??r.initialPageParam:it(r,u);if(a>0&&p==null)break;u=await f(u,p),a++}while(a<h)}return u};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=c}}}function it(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 rn(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var sn=class extends ht{#e;#t;#n;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||on(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=gt({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(s,o)=>{this.#r({type:"failed",failureCount:s,error:o})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",i=!this.#i.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const o=await this.options.onMutate?.(e,n);o!==this.state.context&&this.#r({type:"pending",context:o,variables:e,isPaused:i})}const s=await this.#i.start();return await this.#n.config.onSuccess?.(s,e,this.state.context,this,n),await this.options.onSuccess?.(s,e,this.state.context,n),await this.#n.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(s,null,e,this.state.context,n),this.#r({type:"success",data:s}),s}catch(s){try{await this.#n.config.onError?.(s,e,this.state.context,this,n)}catch(o){Promise.reject(o)}try{await this.options.onError?.(s,e,this.state.context,n)}catch(o){Promise.reject(o)}try{await this.#n.config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,n)}catch(o){Promise.reject(o)}try{await this.options.onSettled?.(void 0,s,e,this.state.context,n)}catch(o){Promise.reject(o)}throw this.#r({type:"error",error:s}),s}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),V.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function on(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var un=class extends ue{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new sn({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=ae(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=ae(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=ae(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(i=>i.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=ae(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){V.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Xe(t,n))}findAll(e={}){return this.getAll().filter(t=>Xe(e,t))}notify(e){V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return V.batch(()=>Promise.all(e.map(t=>t.continue().catch(b))))}};function ae(e){return e.options.scope?.id}var ln=class extends ue{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??Le(r,t);let s=this.get(i);return s||(s=new Zt({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(s)),s}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){V.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Ye(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Ye(e,n)):t}notify(e){V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){V.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){V.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},gr=class{#e;#t;#n;#i;#r;#u;#o;#s;constructor(e={}){this.#e=e.queryCache||new ln,this.#t=e.mutationCache||new un,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#u=0}mount(){this.#u++,this.#u===1&&(this.#o=be.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=ge.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#u--,this.#u===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Y(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=this.#e.get(r.queryHash)?.state.data,o=qt(t,s);if(o!==void 0)return this.#e.build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return V.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;V.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return V.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=V.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(b).catch(b)}invalidateQueries(e,t={}){return V.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=V.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(b)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(b)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Y(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(b).catch(b)}fetchInfiniteQuery(e){return e.behavior=rt(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(b).catch(b)}ensureInfiniteQueryData(e){return e.behavior=rt(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ge.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#i.set(se(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(r=>{oe(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(se(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{oe(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Le(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ge&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},mt=T.createContext(void 0),an=e=>{const t=T.useContext(mt);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},hr=({client:e,children:t})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),Tt.jsx(mt.Provider,{value:e,children:t})),vt=T.createContext(!1),cn=()=>T.useContext(vt);vt.Provider;function dn(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var fn=T.createContext(dn()),gn=()=>T.useContext(fn),hn=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?dt(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},pn=e=>{T.useEffect(()=>{e.clearReset()},[e])},mn=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||dt(n,[e.error,r])),vn=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Sn=(e,t)=>e.isLoading&&e.isFetching&&!t,Cn=(e,t)=>e?.suspense&&t.isPending,st=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function yn(e,t,n){const r=cn(),i=gn(),s=an(),o=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(o);const u=s.getQueryCache().get(o.queryHash);o._optimisticResults=r?"isRestoring":"optimistic",vn(o),hn(o,i,u),pn(i);const a=!s.getQueryCache().get(o.queryHash),[c]=T.useState(()=>new t(s,o)),d=c.getOptimisticResult(o),v=!r&&e.subscribed!==!1;if(T.useSyncExternalStore(T.useCallback(g=>{const f=v?c.subscribe(V.batchCalls(g)):b;return c.updateResult(),f},[c,v]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),T.useEffect(()=>{c.setOptions(o)},[o,c]),Cn(o,d))throw st(o,c,i);if(mn({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:u,suspense:o.suspense}))throw d.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!Z&&Sn(d,r)&&(a?st(o,c,i):u?.promise)?.catch(b).finally(()=>{c.updateResult()}),o.notifyOnChangeProps?d:c.trackResult(d)}function pr(e,t){return yn(e,en)}function K(e,t){return typeof e=="function"?e(t):e}function z(e,t){return n=>{t.setState(r=>({...r,[e]:K(n,r[e])}))}}function he(e){return e instanceof Function}function Rn(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function wn(e,t){const n=[],r=i=>{i.forEach(s=>{n.push(s);const o=t(s);o!=null&&o.length&&r(o)})};return r(e),n}function y(e,t,n){let r=[],i;return s=>{let o;n.key&&n.debug&&(o=Date.now());const u=e(s);if(!(u.length!==r.length||u.some((d,v)=>r[v]!==d)))return i;r=u;let c;if(n.key&&n.debug&&(c=Date.now()),i=t(...u),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const d=Math.round((Date.now()-o)*100)/100,v=Math.round((Date.now()-c)*100)/100,g=v/16,f=(h,p)=>{for(h=String(h);h.length<p;)h=" "+h;return h};console.info(`%c⏱ ${f(v,5)} /${f(d,5)} ms`,`
2
+ font-size: .6rem;
3
+ font-weight: bold;
4
+ color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,n?.key)}return i}}function R(e,t,n,r){return{debug:()=>{var i;return(i=e?.debugAll)!=null?i:e[t]},key:!1,onChange:r}}function _n(e,t,n,r){const i=()=>{var o;return(o=s.getValue())!=null?o:e.options.renderFallbackValue},s={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:y(()=>[e,n,t,s],(o,u,a,c)=>({table:o,column:u,row:a,cell:c,getValue:c.getValue,renderValue:c.renderValue}),R(e.options,"debugCells"))};return e._features.forEach(o=>{o.createCell==null||o.createCell(s,n,t,e)},{}),s}function Pn(e,t,n,r){var i,s;const u={...e._getDefaultColumnDef(),...t},a=u.accessorKey;let c=(i=(s=u.id)!=null?s:a?typeof String.prototype.replaceAll=="function"?a.replaceAll(".","_"):a.replace(/\./g,"_"):void 0)!=null?i:typeof u.header=="string"?u.header:void 0,d;if(u.accessorFn?d=u.accessorFn:a&&(a.includes(".")?d=g=>{let f=g;for(const p of a.split(".")){var h;f=(h=f)==null?void 0:h[p]}return f}:d=g=>g[u.accessorKey]),!c)throw new Error;let v={id:`${String(c)}`,accessorFn:d,parent:r,depth:n,columnDef:u,columns:[],getFlatColumns:y(()=>[!0],()=>{var g;return[v,...(g=v.columns)==null?void 0:g.flatMap(f=>f.getFlatColumns())]},R(e.options,"debugColumns")),getLeafColumns:y(()=>[e._getOrderColumnsFn()],g=>{var f;if((f=v.columns)!=null&&f.length){let h=v.columns.flatMap(p=>p.getLeafColumns());return g(h)}return[v]},R(e.options,"debugColumns"))};for(const g of e._features)g.createColumn==null||g.createColumn(v,e);return v}const H="debugHeaders";function ot(e,t,n){var r;let s={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 o=[],u=a=>{a.subHeaders&&a.subHeaders.length&&a.subHeaders.map(u),o.push(a)};return u(s),o},getContext:()=>({table:e,header:s,column:t})};return e._features.forEach(o=>{o.createHeader==null||o.createHeader(s,e)}),s}const Fn={createTable:e=>{e.getHeaderGroups=y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var s,o;const u=(s=r?.map(v=>n.find(g=>g.id===v)).filter(Boolean))!=null?s:[],a=(o=i?.map(v=>n.find(g=>g.id===v)).filter(Boolean))!=null?o:[],c=n.filter(v=>!(r!=null&&r.includes(v.id))&&!(i!=null&&i.includes(v.id)));return ce(t,[...u,...c,...a],e)},R(e.options,H)),e.getCenterHeaderGroups=y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(s=>!(r!=null&&r.includes(s.id))&&!(i!=null&&i.includes(s.id))),ce(t,n,e,"center")),R(e.options,H)),e.getLeftHeaderGroups=y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const s=(i=r?.map(o=>n.find(u=>u.id===o)).filter(Boolean))!=null?i:[];return ce(t,s,e,"left")},R(e.options,H)),e.getRightHeaderGroups=y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const s=(i=r?.map(o=>n.find(u=>u.id===o)).filter(Boolean))!=null?i:[];return ce(t,s,e,"right")},R(e.options,H)),e.getFooterGroups=y(()=>[e.getHeaderGroups()],t=>[...t].reverse(),R(e.options,H)),e.getLeftFooterGroups=y(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),R(e.options,H)),e.getCenterFooterGroups=y(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),R(e.options,H)),e.getRightFooterGroups=y(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),R(e.options,H)),e.getFlatHeaders=y(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),R(e.options,H)),e.getLeftFlatHeaders=y(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),R(e.options,H)),e.getCenterFlatHeaders=y(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),R(e.options,H)),e.getRightFlatHeaders=y(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),R(e.options,H)),e.getCenterLeafHeaders=y(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),R(e.options,H)),e.getLeftLeafHeaders=y(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),R(e.options,H)),e.getRightLeafHeaders=y(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),R(e.options,H)),e.getLeafHeaders=y(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,s,o,u,a,c;return[...(i=(s=t[0])==null?void 0:s.headers)!=null?i:[],...(o=(u=n[0])==null?void 0:u.headers)!=null?o:[],...(a=(c=r[0])==null?void 0:c.headers)!=null?a:[]].map(d=>d.getLeafHeaders()).flat()},R(e.options,H))}};function ce(e,t,n,r){var i,s;let o=0;const u=function(g,f){f===void 0&&(f=1),o=Math.max(o,f),g.filter(h=>h.getIsVisible()).forEach(h=>{var p;(p=h.columns)!=null&&p.length&&u(h.columns,f+1)},0)};u(e);let a=[];const c=(g,f)=>{const h={depth:f,id:[r,`${f}`].filter(Boolean).join("_"),headers:[]},p=[];g.forEach(C=>{const S=[...p].reverse()[0],F=C.column.depth===h.depth;let M,D=!1;if(F&&C.column.parent?M=C.column.parent:(M=C.column,D=!0),S&&S?.column===M)S.subHeaders.push(C);else{const O=ot(n,M,{id:[r,f,M.id,C?.id].filter(Boolean).join("_"),isPlaceholder:D,placeholderId:D?`${p.filter(L=>L.column===M).length}`:void 0,depth:f,index:p.length});O.subHeaders.push(C),p.push(O)}h.headers.push(C),C.headerGroup=h}),a.push(h),f>0&&c(p,f-1)},d=t.map((g,f)=>ot(n,g,{depth:o,index:f}));c(d,o-1),a.reverse();const v=g=>g.filter(h=>h.column.getIsVisible()).map(h=>{let p=0,C=0,S=[0];h.subHeaders&&h.subHeaders.length?(S=[],v(h.subHeaders).forEach(M=>{let{colSpan:D,rowSpan:O}=M;p+=D,S.push(O)})):p=1;const F=Math.min(...S);return C=C+F,h.colSpan=p,h.rowSpan=C,{colSpan:p,rowSpan:C}});return v((i=(s=a[0])==null?void 0:s.headers)!=null?i:[]),a}const En=(e,t,n,r,i,s,o)=>{let u={id:t,index:r,original:n,depth:i,parentId:o,_valuesCache:{},_uniqueValuesCache:{},getValue:a=>{if(u._valuesCache.hasOwnProperty(a))return u._valuesCache[a];const c=e.getColumn(a);if(c!=null&&c.accessorFn)return u._valuesCache[a]=c.accessorFn(u.original,r),u._valuesCache[a]},getUniqueValues:a=>{if(u._uniqueValuesCache.hasOwnProperty(a))return u._uniqueValuesCache[a];const c=e.getColumn(a);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(u._uniqueValuesCache[a]=c.columnDef.getUniqueValues(u.original,r),u._uniqueValuesCache[a]):(u._uniqueValuesCache[a]=[u.getValue(a)],u._uniqueValuesCache[a])},renderValue:a=>{var c;return(c=u.getValue(a))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>wn(u.subRows,a=>a.subRows),getParentRow:()=>u.parentId?e.getRow(u.parentId,!0):void 0,getParentRows:()=>{let a=[],c=u;for(;;){const d=c.getParentRow();if(!d)break;a.push(d),c=d}return a.reverse()},getAllCells:y(()=>[e.getAllLeafColumns()],a=>a.map(c=>_n(e,u,c,c.id)),R(e.options,"debugRows")),_getAllCellsByColumnId:y(()=>[u.getAllCells()],a=>a.reduce((c,d)=>(c[d.column.id]=d,c),{}),R(e.options,"debugRows"))};for(let a=0;a<e._features.length;a++){const c=e._features[a];c==null||c.createRow==null||c.createRow(u,e)}return u},Mn={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()}}},St=(e,t,n)=>{var r,i;const s=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(s))};St.autoRemove=e=>U(e);const Ct=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};Ct.autoRemove=e=>U(e);const yt=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};yt.autoRemove=e=>U(e);const Rt=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};Rt.autoRemove=e=>U(e);const wt=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});wt.autoRemove=e=>U(e)||!(e!=null&&e.length);const _t=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});_t.autoRemove=e=>U(e)||!(e!=null&&e.length);const Pt=(e,t,n)=>e.getValue(t)===n;Pt.autoRemove=e=>U(e);const Ft=(e,t,n)=>e.getValue(t)==n;Ft.autoRemove=e=>U(e);const je=(e,t,n)=>{let[r,i]=n;const s=e.getValue(t);return s>=r&&s<=i};je.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,s=t===null||Number.isNaN(r)?-1/0:r,o=n===null||Number.isNaN(i)?1/0:i;if(s>o){const u=s;s=o,o=u}return[s,o]};je.autoRemove=e=>U(e)||U(e[0])&&U(e[1]);const N={includesString:St,includesStringSensitive:Ct,equalsString:yt,arrIncludes:Rt,arrIncludesAll:wt,arrIncludesSome:_t,equals:Pt,weakEquals:Ft,inNumberRange:je};function U(e){return e==null||e===""}const In={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:z("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?N.includesString:typeof r=="number"?N.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?N.equals:Array.isArray(r)?N.arrIncludes:N.weakEquals},e.getFilterFn=()=>{var n,r;return he(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:N[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!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(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),s=r?.find(d=>d.id===e.id),o=K(n,s?s.value:void 0);if(ut(i,o,e)){var u;return(u=r?.filter(d=>d.id!==e.id))!=null?u:[]}const a={id:e.id,value:o};if(s){var c;return(c=r?.map(d=>d.id===e.id?a:d))!=null?c:[]}return r!=null&&r.length?[...r,a]:[a]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var s;return(s=K(t,i))==null?void 0:s.filter(o=>{const u=n.find(a=>a.id===o.id);if(u){const a=u.getFilterFn();if(ut(a,o.value,u))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 ut(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const xn=(e,t,n)=>n.reduce((r,i)=>{const s=i.getValue(e);return r+(typeof s=="number"?s:0)},0),$n=(e,t,n)=>{let r;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(r>s||r===void 0&&s>=s)&&(r=s)}),r},On=(e,t,n)=>{let r;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(r<s||r===void 0&&s>=s)&&(r=s)}),r},Dn=(e,t,n)=>{let r,i;return n.forEach(s=>{const o=s.getValue(e);o!=null&&(r===void 0?o>=o&&(r=i=o):(r>o&&(r=o),i<o&&(i=o)))}),[r,i]},An=(e,t)=>{let n=0,r=0;if(t.forEach(i=>{let s=i.getValue(e);s!=null&&(s=+s)>=s&&(++n,r+=s)}),n)return r/n},Vn=(e,t)=>{if(!t.length)return;const n=t.map(s=>s.getValue(e));if(!Rn(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((s,o)=>s-o);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},Tn=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Hn=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,Ln=(e,t)=>t.length,Se={sum:xn,min:$n,max:On,extent:Dn,mean:An,median:Vn,unique:Tn,uniqueCount:Hn,count:Ln},Gn={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:z("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return Se.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Se.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return he(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:Se[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 i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function bn(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(s=>!t.includes(s.id));return n==="remove"?r:[...t.map(s=>e.find(o=>o.id===s)).filter(Boolean),...r]}const zn={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:z("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=y(n=>[ie(t,n)],n=>n.findIndex(r=>r.id===e.id),R(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=ie(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=ie(t,n);return((r=i[i.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=y(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let s=[];if(!(t!=null&&t.length))s=i;else{const o=[...t],u=[...i];for(;u.length&&o.length;){const a=o.shift(),c=u.findIndex(d=>d.id===a);c>-1&&s.push(u.splice(c,1)[0])}s=[...s,...u]}return bn(s,n,r)},R(e.options,"debugTable"))}},Ce=()=>({left:[],right:[]}),jn={getInitialState:e=>({columnPinning:Ce(),...e}),getDefaultOptions:e=>({onColumnPinningChange:z("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var s,o;if(n==="right"){var u,a;return{left:((u=i?.left)!=null?u:[]).filter(v=>!(r!=null&&r.includes(v))),right:[...((a=i?.right)!=null?a:[]).filter(v=>!(r!=null&&r.includes(v))),...r]}}if(n==="left"){var c,d;return{left:[...((c=i?.left)!=null?c:[]).filter(v=>!(r!=null&&r.includes(v))),...r],right:((d=i?.right)!=null?d:[]).filter(v=>!(r!=null&&r.includes(v)))}}return{left:((s=i?.left)!=null?s:[]).filter(v=>!(r!=null&&r.includes(v))),right:((o=i?.right)!=null?o:[]).filter(v=>!(r!=null&&r.includes(v)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,s,o;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((s=(o=t.options.enableColumnPinning)!=null?o:t.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(u=>u.id),{left:r,right:i}=t.getState().columnPinning,s=n.some(u=>r?.includes(u)),o=n.some(u=>i?.includes(u));return s?"left":o?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=y(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const s=[...r??[],...i??[]];return n.filter(o=>!s.includes(o.column.id))},R(t.options,"debugRows")),e.getLeftVisibleCells=y(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(s=>n.find(o=>o.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),R(t.options,"debugRows")),e.getRightVisibleCells=y(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(s=>n.find(o=>o.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),R(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?Ce():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:Ce())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,s;return!!((i=r.left)!=null&&i.length||(s=r.right)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),R(e.options,"debugColumns")),e.getRightLeafColumns=y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),R(e.options,"debugColumns")),e.getCenterLeafColumns=y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(s=>!i.includes(s.id))},R(e.options,"debugColumns"))}};function qn(e){return e||(typeof document<"u"?document:null)}const de={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},ye=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Un={getDefaultColumnDef:()=>de,getInitialState:e=>({columnSizing:{},columnSizingInfo:ye(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:z("columnSizing",e),onColumnSizingInfoChange:z("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const s=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:de.minSize,(r=s??e.columnDef.size)!=null?r:de.size),(i=e.columnDef.maxSize)!=null?i:de.maxSize)},e.getStart=y(n=>[n,ie(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,s)=>i+s.getSize(),0),R(t.options,"debugColumns")),e.getAfter=y(n=>[n,ie(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,s)=>i+s.getSize(),0),R(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},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=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var s;n+=(s=i.column.getSize())!=null?s: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),i=r?.getCanResize();return s=>{if(!r||!i||(s.persist==null||s.persist(),Re(s)&&s.touches&&s.touches.length>1))return;const o=e.getSize(),u=e?e.getLeafHeaders().map(S=>[S.column.id,S.column.getSize()]):[[r.id,r.getSize()]],a=Re(s)?Math.round(s.touches[0].clientX):s.clientX,c={},d=(S,F)=>{typeof F=="number"&&(t.setColumnSizingInfo(M=>{var D,O;const L=t.options.columnResizeDirection==="rtl"?-1:1,E=(F-((D=M?.startOffset)!=null?D:0))*L,A=Math.max(E/((O=M?.startSize)!=null?O:0),-.999999);return M.columnSizingStart.forEach(q=>{let[B,Q]=q;c[B]=Math.round(Math.max(Q+Q*A,0)*100)/100}),{...M,deltaOffset:E,deltaPercentage:A}}),(t.options.columnResizeMode==="onChange"||S==="end")&&t.setColumnSizing(M=>({...M,...c})))},v=S=>d("move",S),g=S=>{d("end",S),t.setColumnSizingInfo(F=>({...F,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},f=qn(n),h={moveHandler:S=>v(S.clientX),upHandler:S=>{f?.removeEventListener("mousemove",h.moveHandler),f?.removeEventListener("mouseup",h.upHandler),g(S.clientX)}},p={moveHandler:S=>(S.cancelable&&(S.preventDefault(),S.stopPropagation()),v(S.touches[0].clientX),!1),upHandler:S=>{var F;f?.removeEventListener("touchmove",p.moveHandler),f?.removeEventListener("touchend",p.upHandler),S.cancelable&&(S.preventDefault(),S.stopPropagation()),g((F=S.touches[0])==null?void 0:F.clientX)}},C=kn()?{passive:!1}:!1;Re(s)?(f?.addEventListener("touchmove",p.moveHandler,C),f?.addEventListener("touchend",p.upHandler,C)):(f?.addEventListener("mousemove",h.moveHandler,C),f?.addEventListener("mouseup",h.upHandler,C)),t.setColumnSizingInfo(S=>({...S,startOffset:a,startSize:o,deltaOffset:0,deltaPercentage:0,columnSizingStart:u,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?ye():(n=e.initialState.columnSizingInfo)!=null?n:ye())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let fe=null;function kn(){if(typeof fe=="boolean")return fe;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 fe=e,fe}function Re(e){return e.type==="touchstart"}const Qn={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:z("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 i=e.columns;return(n=i.length?i.some(s=>s.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=y(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),R(t.options,"debugRows")),e.getVisibleCells=y(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],R(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>y(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),R(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((i,s)=>({...i,[s.id]:n||!(s.getCanHide!=null&&s.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 ie(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Nn={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()}}},Bn={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:z("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,i,s;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((s=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?s:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>N.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return he(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:N[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Kn={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:z("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i: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 i,s;e.setExpanded(r?{}:(i=(s=e.initialState)==null?void 0:s.expanded)!=null?i:{})},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(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{const o=s.split(".");r=Math.max(r,o.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 i;const s=r===!0?!0:!!(r!=null&&r[e.id]);let o={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(u=>{o[u]=!0}):o=r,n=(i=n)!=null?i:!s,!s&&n)return{...o,[e.id]:!0};if(s&&!n){const{[e.id]:u,...a}=o;return a}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.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()}}}},De=0,Ae=10,we=()=>({pageIndex:De,pageSize:Ae}),Yn={getInitialState:e=>({...e,pagination:{...we(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:z("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=s=>K(r,s);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?we():(i=e.initialState.pagination)!=null?i:we())},e.setPageIndex=r=>{e.setPagination(i=>{let s=K(r,i.pageIndex);const o=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return s=Math.max(0,Math.min(s,o)),{...i,pageIndex:s}})},e.resetPageIndex=r=>{var i,s;e.setPageIndex(r?De:(i=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?i:De)},e.resetPageSize=r=>{var i,s;e.setPageSize(r?Ae:(i=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?i:Ae)},e.setPageSize=r=>{e.setPagination(i=>{const s=Math.max(1,K(r,i.pageSize)),o=i.pageSize*i.pageIndex,u=Math.floor(o/s);return{...i,pageIndex:u,pageSize:s}})},e.setPageCount=r=>e.setPagination(i=>{var s;let o=K(r,(s=e.options.pageCount)!=null?s:-1);return typeof o=="number"&&(o=Math.max(-1,o)),{...i,pageCount:o}}),e.getPageOptions=y(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((s,o)=>o)),i},R(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:r<i-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}}},_e=()=>({top:[],bottom:[]}),Xn={getInitialState:e=>({rowPinning:_e(),...e}),getDefaultOptions:e=>({onRowPinningChange:z("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const s=r?e.getLeafRows().map(a=>{let{id:c}=a;return c}):[],o=i?e.getParentRows().map(a=>{let{id:c}=a;return c}):[],u=new Set([...o,e.id,...s]);t.setRowPinning(a=>{var c,d;if(n==="bottom"){var v,g;return{top:((v=a?.top)!=null?v:[]).filter(p=>!(u!=null&&u.has(p))),bottom:[...((g=a?.bottom)!=null?g:[]).filter(p=>!(u!=null&&u.has(p))),...Array.from(u)]}}if(n==="top"){var f,h;return{top:[...((f=a?.top)!=null?f:[]).filter(p=>!(u!=null&&u.has(p))),...Array.from(u)],bottom:((h=a?.bottom)!=null?h:[]).filter(p=>!(u!=null&&u.has(p)))}}return{top:((c=a?.top)!=null?c:[]).filter(p=>!(u!=null&&u.has(p))),bottom:((d=a?.bottom)!=null?d:[]).filter(p=>!(u!=null&&u.has(p)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,s=n.some(u=>r?.includes(u)),o=n.some(u=>i?.includes(u));return s?"top":o?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const s=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(o=>{let{id:u}=o;return u});return(r=s?.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?_e():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:_e())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,s;return!!((i=r.top)!=null&&i.length||(s=r.bottom)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(o=>{const u=e.getRow(o,!0);return u.getIsAllParentsExpanded()?u:null}):(n??[]).map(o=>t.find(u=>u.id===o))).filter(Boolean).map(o=>({...o,position:r}))},e.getTopRows=y(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),R(e.options,"debugRows")),e.getBottomRows=y(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),R(e.options,"debugRows")),e.getCenterRows=y(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(s=>!i.has(s.id))},R(e.options,"debugRows"))}},Wn={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:z("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},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(s=>{s.getCanSelect()&&(r[s.id]=!0)}):i.forEach(s=>{delete r[s.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(s=>{Ve(i,s.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=y(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Pe(e,n):{rows:[],flatRows:[],rowsById:{}},R(e.options,"debugTable")),e.getFilteredSelectedRowModel=y(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Pe(e,n):{rows:[],flatRows:[],rowsById:{}},R(e.options,"debugTable")),e.getGroupedSelectedRowModel=y(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Pe(e,n):{rows:[],flatRows:[],rowsById:{}},R(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(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.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 i=e.getIsSelected();t.setRowSelection(s=>{var o;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return s;const u={...s};return Ve(u,e.id,n,(o=r?.selectChildren)!=null?o:!0,t),u})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return qe(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Te(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Te(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 i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},Ve=(e,t,n,r,i)=>{var s;const o=i.getRow(t,!0);n?(o.getCanMultiSelect()||Object.keys(e).forEach(u=>delete e[u]),o.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(s=o.subRows)!=null&&s.length&&o.getCanSelectSubRows()&&o.subRows.forEach(u=>Ve(e,u.id,n,r,i))};function Pe(e,t){const n=e.getState().rowSelection,r=[],i={},s=function(o,u){return o.map(a=>{var c;const d=qe(a,n);if(d&&(r.push(a),i[a.id]=a),(c=a.subRows)!=null&&c.length&&(a={...a,subRows:s(a.subRows)}),d)return a}).filter(Boolean)};return{rows:s(t.rows),flatRows:r,rowsById:i}}function qe(e,t){var n;return(n=t[e.id])!=null?n:!1}function Te(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,s=!1;return e.subRows.forEach(o=>{if(!(s&&!i)&&(o.getCanSelect()&&(qe(o,t)?s=!0:i=!1),o.subRows&&o.subRows.length)){const u=Te(o,t);u==="all"?s=!0:(u==="some"&&(s=!0),i=!1)}}),i?"all":s?"some":!1}const He=/([0-9]+)/gm,Jn=(e,t,n)=>Et(X(e.getValue(n)).toLowerCase(),X(t.getValue(n)).toLowerCase()),Zn=(e,t,n)=>Et(X(e.getValue(n)),X(t.getValue(n))),er=(e,t,n)=>Ue(X(e.getValue(n)).toLowerCase(),X(t.getValue(n)).toLowerCase()),tr=(e,t,n)=>Ue(X(e.getValue(n)),X(t.getValue(n))),nr=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},rr=(e,t,n)=>Ue(e.getValue(n),t.getValue(n));function Ue(e,t){return e===t?0:e>t?1:-1}function X(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Et(e,t){const n=e.split(He).filter(Boolean),r=t.split(He).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),s=r.shift(),o=parseInt(i,10),u=parseInt(s,10),a=[o,u].sort();if(isNaN(a[0])){if(i>s)return 1;if(s>i)return-1;continue}if(isNaN(a[1]))return isNaN(o)?-1:1;if(o>u)return 1;if(u>o)return-1}return n.length-r.length}const re={alphanumeric:Jn,alphanumericCaseSensitive:Zn,text:er,textCaseSensitive:tr,datetime:nr,basic:rr},ir={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:z("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const s=i?.getValue(e.id);if(Object.prototype.toString.call(s)==="[object Date]")return re.datetime;if(typeof s=="string"&&(r=!0,s.split(He).length>1))return re.alphanumeric}return r?re.text:re.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return he(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:re[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),s=typeof n<"u"&&n!==null;t.setSorting(o=>{const u=o?.find(f=>f.id===e.id),a=o?.findIndex(f=>f.id===e.id);let c=[],d,v=s?n:i==="desc";if(o!=null&&o.length&&e.getCanMultiSort()&&r?u?d="toggle":d="add":o!=null&&o.length&&a!==o.length-1?d="replace":u?d="toggle":d="replace",d==="toggle"&&(s||i||(d="remove")),d==="add"){var g;c=[...o,{id:e.id,desc:v}],c.splice(0,c.length-((g=t.options.maxMultiSortColCount)!=null?g:Number.MAX_SAFE_INTEGER))}else d==="toggle"?c=o.map(f=>f.id===e.id?{...f,desc:v}:f):d==="remove"?c=o.filter(f=>f.id!==e.id):c=[{id:e.id,desc:v}];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,i;const s=e.getFirstSortDir(),o=e.getIsSorted();return o?o!==s&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:o==="desc"?"asc":"desc":s},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(i=>i.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(i=>i.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())}},sr=[Fn,Qn,zn,jn,Mn,In,Nn,Bn,ir,Gn,Kn,Yn,Xn,Wn,Un];function or(e){var t,n;const r=[...sr,...(t=e._features)!=null?t:[]];let i={_features:r};const s=i._features.reduce((g,f)=>Object.assign(g,f.getDefaultOptions==null?void 0:f.getDefaultOptions(i)),{}),o=g=>i.options.mergeOptions?i.options.mergeOptions(s,g):{...s,...g};let a={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(g=>{var f;a=(f=g.getInitialState==null?void 0:g.getInitialState(a))!=null?f:a});const c=[];let d=!1;const v={_features:r,options:{...s,...e},initialState:a,_queue:g=>{c.push(g),d||(d=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();d=!1}).catch(f=>setTimeout(()=>{throw f})))},reset:()=>{i.setState(i.initialState)},setOptions:g=>{const f=K(g,i.options);i.options=o(f)},getState:()=>i.options.state,setState:g=>{i.options.onStateChange==null||i.options.onStateChange(g)},_getRowId:(g,f,h)=>{var p;return(p=i.options.getRowId==null?void 0:i.options.getRowId(g,f,h))!=null?p:`${h?[h.id,f].join("."):f}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(g,f)=>{let h=(f?i.getPrePaginationRowModel():i.getRowModel()).rowsById[g];if(!h&&(h=i.getCoreRowModel().rowsById[g],!h))throw new Error;return h},_getDefaultColumnDef:y(()=>[i.options.defaultColumn],g=>{var f;return g=(f=g)!=null?f:{},{header:h=>{const p=h.header.column.columnDef;return p.accessorKey?p.accessorKey:p.accessorFn?p.id:null},cell:h=>{var p,C;return(p=(C=h.renderValue())==null||C.toString==null?void 0:C.toString())!=null?p:null},...i._features.reduce((h,p)=>Object.assign(h,p.getDefaultColumnDef==null?void 0:p.getDefaultColumnDef()),{}),...g}},R(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:y(()=>[i._getColumnDefs()],g=>{const f=function(h,p,C){return C===void 0&&(C=0),h.map(S=>{const F=Pn(i,S,C,p),M=S;return F.columns=M.columns?f(M.columns,F,C+1):[],F})};return f(g)},R(e,"debugColumns")),getAllFlatColumns:y(()=>[i.getAllColumns()],g=>g.flatMap(f=>f.getFlatColumns()),R(e,"debugColumns")),_getAllFlatColumnsById:y(()=>[i.getAllFlatColumns()],g=>g.reduce((f,h)=>(f[h.id]=h,f),{}),R(e,"debugColumns")),getAllLeafColumns:y(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(g,f)=>{let h=g.flatMap(p=>p.getLeafColumns());return f(h)},R(e,"debugColumns")),getColumn:g=>i._getAllFlatColumnsById()[g]};Object.assign(i,v);for(let g=0;g<i._features.length;g++){const f=i._features[g];f==null||f.createTable==null||f.createTable(i)}return i}function mr(){return e=>y(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,s,o){s===void 0&&(s=0);const u=[];for(let c=0;c<i.length;c++){const d=En(e,e._getRowId(i[c],c,o),i[c],c,s,void 0,o?.id);if(n.flatRows.push(d),n.rowsById[d.id]=d,u.push(d),e.options.getSubRows){var a;d.originalSubRows=e.options.getSubRows(i[c],c),(a=d.originalSubRows)!=null&&a.length&&(d.subRows=r(d.originalSubRows,s+1,d))}}return u};return n.rows=r(t),n},R(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function ur(e){const t=[],n=r=>{var i;t.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function vr(e){return t=>y(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:i,pageIndex:s}=n;let{rows:o,flatRows:u,rowsById:a}=r;const c=i*s,d=c+i;o=o.slice(c,d);let v;t.options.paginateExpandedRows?v={rows:o,flatRows:u,rowsById:a}:v=ur({rows:o,flatRows:u,rowsById:a}),v.flatRows=[];const g=f=>{v.flatRows.push(f),f.subRows.length&&f.subRows.forEach(g)};return v.rows.forEach(g),v},R(t.options,"debugTable"))}function Sr(){return e=>y(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,i=[],s=r.filter(a=>{var c;return(c=e.getColumn(a.id))==null?void 0:c.getCanSort()}),o={};s.forEach(a=>{const c=e.getColumn(a.id);c&&(o[a.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const u=a=>{const c=a.map(d=>({...d}));return c.sort((d,v)=>{for(let f=0;f<s.length;f+=1){var g;const h=s[f],p=o[h.id],C=p.sortUndefined,S=(g=h?.desc)!=null?g:!1;let F=0;if(C){const M=d.getValue(h.id),D=v.getValue(h.id),O=M===void 0,L=D===void 0;if(O||L){if(C==="first")return O?-1:1;if(C==="last")return O?1:-1;F=O&&L?0:O?C:-C}}if(F===0&&(F=p.sortingFn(d,v,h.id)),F!==0)return S&&(F*=-1),p.invertSorting&&(F*=-1),F}return d.index-v.index}),c.forEach(d=>{var v;i.push(d),(v=d.subRows)!=null&&v.length&&(d.subRows=u(d.subRows))}),c};return{rows:u(n.rows),flatRows:i,rowsById:n.rowsById}},R(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function Cr(e,t){return e?lr(e)?T.createElement(e,t):e:null}function lr(e){return ar(e)||typeof e=="function"||cr(e)}function ar(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function cr(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function yr(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=T.useState(()=>({current:or(t)})),[r,i]=T.useState(()=>n.current.initialState);return n.current.setOptions(s=>({...s,...e,state:{...r,...e.state},onStateChange:o=>{i(o),e.onStateChange==null||e.onStateChange(o)}})),n.current}export{gr as Q,fr as R,Lt as a,Gt as b,pr as c,hr as d,yr as e,Cr as f,Dt as g,vr as h,Sr as i,Tt as j,mr as k,dr as l,T as r,an as u};
@@ -1 +1 @@
1
- import{r as o,j as e}from"./query-DVWnIZNd.js";import{s as y,V as g,t as d,I as v,u as w,v as i,w as N,x as c,y as j,z as S,B as n,E as m,L as p,F as x}from"./ui-BFiKdTjl.js";import{c as s}from"./index-DG2eF3M2.js";import{t as f,z as R,s as I}from"./icons-BOLUIAKd.js";const _=y,k=g,C=o.forwardRef(({className:t,children:r,...a},l)=>e.jsxs(d,{ref:l,className:s("flex h-9 w-full items-center justify-between gap-2 rounded-xl border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.04)] px-3 py-2 text-sm text-[var(--color-text-secondary)] transition-colors placeholder:text-[var(--color-text-tertiary)] hover:border-[var(--border-default)] hover:bg-[rgba(var(--ch-text-primary),0.06)] focus:outline-none focus:ring-2 focus:ring-[var(--color-accent)]/45 focus:ring-offset-2 focus:ring-offset-[var(--color-bg-base)] disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer [&>span]:line-clamp-1",t),...a,children:[r,e.jsx(v,{asChild:!0,children:e.jsx(f,{className:"h-4 w-4 opacity-50"})})]}));C.displayName=d.displayName;const u=o.forwardRef(({className:t,...r},a)=>e.jsx(n,{ref:a,className:s("flex cursor-default items-center justify-center py-1",t),...r,children:e.jsx(I,{className:"h-4 w-4"})}));u.displayName=n.displayName;const b=o.forwardRef(({className:t,...r},a)=>e.jsx(m,{ref:a,className:s("flex cursor-default items-center justify-center py-1",t),...r,children:e.jsx(f,{className:"h-4 w-4"})}));b.displayName=m.displayName;const z=o.forwardRef(({className:t,children:r,position:a="popper",...l},h)=>e.jsx(w,{children:e.jsxs(i,{ref:h,className:s("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-xl border border-[var(--border-dim)] bg-[linear-gradient(180deg,rgba(var(--ch-bg-panel),0.96),rgba(var(--ch-bg-base),0.99))] shadow-[0_16px_40px_rgba(0,0,0,0.5)] backdrop-blur-xl data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,...l,children:[e.jsx(u,{}),e.jsx(N,{className:s("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),e.jsx(b,{})]})}));z.displayName=i.displayName;const B=o.forwardRef(({className:t,...r},a)=>e.jsx(p,{ref:a,className:s("px-2 py-1.5 text-xs font-medium text-[var(--color-text-tertiary)]",t),...r}));B.displayName=p.displayName;const V=o.forwardRef(({className:t,children:r,...a},l)=>e.jsxs(c,{ref:l,className:s("relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 pl-8 pr-2 text-sm text-[var(--color-text-secondary)] outline-none transition-colors hover:bg-[rgba(var(--ch-text-primary),0.06)] hover:text-[var(--color-text-primary)] focus:bg-[rgba(var(--ch-text-primary),0.06)] focus:text-[var(--color-text-primary)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(j,{children:e.jsx(R,{className:"h-4 w-4 text-[var(--color-accent)]"})})}),e.jsx(S,{children:r})]}));V.displayName=c.displayName;const D=o.forwardRef(({className:t,...r},a)=>e.jsx(x,{ref:a,className:s("-mx-1 my-1 h-px bg-[var(--border-dim)]",t),...r}));D.displayName=x.displayName;export{_ as S,C as a,k as b,z as c,V as d};
1
+ import{r as o,j as e}from"./query-b9vbXHQr.js";import{s as y,V as g,t as d,I as v,u as w,v as i,w as N,x as c,y as j,z as S,B as n,E as m,L as p,F as x}from"./ui-CaGzZKq9.js";import{c as s}from"./index-D1QTIMAj.js";import{t as f,z as R,s as I}from"./icons-x20EK9lj.js";const _=y,k=g,C=o.forwardRef(({className:t,children:r,...a},l)=>e.jsxs(d,{ref:l,className:s("flex h-9 w-full items-center justify-between gap-2 rounded-xl border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.04)] px-3 py-2 text-sm text-[var(--color-text-secondary)] transition-colors placeholder:text-[var(--color-text-tertiary)] hover:border-[var(--border-default)] hover:bg-[rgba(var(--ch-text-primary),0.06)] focus:outline-none focus:ring-2 focus:ring-[var(--color-accent)]/45 focus:ring-offset-2 focus:ring-offset-[var(--color-bg-base)] disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer [&>span]:line-clamp-1",t),...a,children:[r,e.jsx(v,{asChild:!0,children:e.jsx(f,{className:"h-4 w-4 opacity-50"})})]}));C.displayName=d.displayName;const u=o.forwardRef(({className:t,...r},a)=>e.jsx(n,{ref:a,className:s("flex cursor-default items-center justify-center py-1",t),...r,children:e.jsx(I,{className:"h-4 w-4"})}));u.displayName=n.displayName;const b=o.forwardRef(({className:t,...r},a)=>e.jsx(m,{ref:a,className:s("flex cursor-default items-center justify-center py-1",t),...r,children:e.jsx(f,{className:"h-4 w-4"})}));b.displayName=m.displayName;const z=o.forwardRef(({className:t,children:r,position:a="popper",...l},h)=>e.jsx(w,{children:e.jsxs(i,{ref:h,className:s("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-xl border border-[var(--border-dim)] bg-[linear-gradient(180deg,rgba(var(--ch-bg-panel),0.96),rgba(var(--ch-bg-base),0.99))] shadow-[0_16px_40px_rgba(0,0,0,0.5)] backdrop-blur-xl data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,...l,children:[e.jsx(u,{}),e.jsx(N,{className:s("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),e.jsx(b,{})]})}));z.displayName=i.displayName;const B=o.forwardRef(({className:t,...r},a)=>e.jsx(p,{ref:a,className:s("px-2 py-1.5 text-xs font-medium text-[var(--color-text-tertiary)]",t),...r}));B.displayName=p.displayName;const V=o.forwardRef(({className:t,children:r,...a},l)=>e.jsxs(c,{ref:l,className:s("relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 pl-8 pr-2 text-sm text-[var(--color-text-secondary)] outline-none transition-colors hover:bg-[rgba(var(--ch-text-primary),0.06)] hover:text-[var(--color-text-primary)] focus:bg-[rgba(var(--ch-text-primary),0.06)] focus:text-[var(--color-text-primary)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(j,{children:e.jsx(R,{className:"h-4 w-4 text-[var(--color-accent)]"})})}),e.jsx(S,{children:r})]}));V.displayName=c.displayName;const D=o.forwardRef(({className:t,...r},a)=>e.jsx(x,{ref:a,className:s("-mx-1 my-1 h-px bg-[var(--border-dim)]",t),...r}));D.displayName=x.displayName;export{_ as S,C as a,k as b,z as c,V as d};
@@ -0,0 +1 @@
1
+ import{r as x,j as e}from"./query-b9vbXHQr.js";import{c as l}from"./index-D1QTIMAj.js";function v({label:a,value:n,subtext:r,trend:t,icon:s,glowing:o=!1,size:c="md",className:p}){const[u,d]=x.useState(!1);x.useEffect(()=>{d(!0);const m=window.setTimeout(()=>d(!1),360);return()=>window.clearTimeout(m)},[n]);const i=t?.direction==="up"?{color:"var(--color-accent)",glow:"0 0 14px rgba(var(--ch-accent), 0.18)",rotation:"-45deg"}:t?.direction==="down"?{color:"var(--color-error)",glow:"0 0 14px rgba(var(--ch-error), 0.18)",rotation:"45deg"}:{color:"var(--color-text-secondary)",glow:"none",rotation:"0deg"};return e.jsxs("div",{className:l("group card relative overflow-hidden px-4 py-3.5",c==="sm"?"min-h-[96px]":"min-h-[112px]",p),children:[e.jsx("div",{className:"pointer-events-none absolute inset-0 opacity-[0.04] [background-image:linear-gradient(rgba(var(--ch-accent),0.9)_1px,transparent_1px),linear-gradient(90deg,rgba(var(--ch-accent),0.9)_1px,transparent_1px)] [background-size:36px_36px]"}),e.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-6 top-0 h-px opacity-30 transition-opacity duration-[var(--duration-base)] ease-[var(--ease-out)] group-hover:opacity-60",style:{background:"linear-gradient(90deg, transparent, var(--color-accent), transparent)"}}),o?e.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute -right-7 -top-7 h-24 w-24 rounded-full",style:{background:"var(--bloom-soft)"}}):null,e.jsxs("div",{className:"relative flex h-full flex-col justify-between gap-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsx("span",{className:"mono-label",children:a}),e.jsxs("div",{className:"flex items-center gap-2",children:[t?e.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-medium uppercase tracking-[0.12em]",style:{color:i.color,textShadow:i.glow},children:[e.jsx("svg",{viewBox:"0 0 12 12","aria-hidden":"true",className:"h-3 w-3 shrink-0",style:{transform:`rotate(${i.rotation})`},children:e.jsx("path",{d:"M6 1.5 10.5 6H7.4v4H4.6V6H1.5Z",fill:"currentColor"})}),e.jsx("span",{children:t.value})]}):null,s?e.jsx("span",{className:"flex h-8 w-8 items-center justify-center rounded-[var(--radius-sm)] border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.03)] text-[var(--color-text-secondary)]",children:s}):null]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("div",{className:l("display-num leading-none text-[34px]",c==="sm"&&"text-[22px]",!o&&"text-[var(--color-text-primary)] [text-shadow:none]",u&&"animate-[count-pop_var(--duration-slow)_var(--ease-spring)]"),children:n}),r?e.jsx("div",{className:"text-[12px] leading-5 text-[var(--color-text-secondary)]",children:r}):null]})]})]})}const g={within:{direction:"up",value:"Live"},observe:{direction:"neutral",value:"Watch"},exceed:{direction:"down",value:"Alert"},unknown:void 0};function h({status:a,value:n,title:r,className:t,range:s,icon:o}){return e.jsx(v,{label:r,value:n,subtext:s,icon:o,glowing:a==="within",trend:g[a],className:t})}function j({cards:a,className:n}){return e.jsx("div",{className:l("mx-auto grid w-full max-w-7xl grid-cols-1 gap-4 px-4 sm:grid-cols-2 sm:px-6 lg:px-8 xl:grid-cols-4",n),children:a.map((r,t)=>e.jsx(h,{...r},`${r.title}-${t}`))})}export{j as S};
@@ -1,4 +1,4 @@
1
- import{a as qo,g as Zo,r as l,j as v,R as en,b as xe}from"./query-DVWnIZNd.js";var _t={exports:{}},K={};var wn;function Qo(){if(wn)return K;wn=1;var e=qo();function t(u){var a="https://react.dev/errors/"+u;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)a+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+u+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function i(u,a,f){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:p==null?null:""+p,children:u,containerInfo:a,implementation:f}}var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(u,a){if(u==="font")return"";if(typeof a=="string")return a==="use-credentials"?a:""}return K.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,K.createPortal=function(u,a){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)throw Error(t(299));return i(u,a,null,f)},K.flushSync=function(u){var a=s.T,f=r.p;try{if(s.T=null,r.p=2,u)return u()}finally{s.T=a,r.p=f,r.d.f()}},K.preconnect=function(u,a){typeof u=="string"&&(a?(a=a.crossOrigin,a=typeof a=="string"?a==="use-credentials"?a:"":void 0):a=null,r.d.C(u,a))},K.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u)},K.preinit=function(u,a){if(typeof u=="string"&&a&&typeof a.as=="string"){var f=a.as,p=c(f,a.crossOrigin),h=typeof a.integrity=="string"?a.integrity:void 0,m=typeof a.fetchPriority=="string"?a.fetchPriority:void 0;f==="style"?r.d.S(u,typeof a.precedence=="string"?a.precedence:void 0,{crossOrigin:p,integrity:h,fetchPriority:m}):f==="script"&&r.d.X(u,{crossOrigin:p,integrity:h,fetchPriority:m,nonce:typeof a.nonce=="string"?a.nonce:void 0})}},K.preinitModule=function(u,a){if(typeof u=="string")if(typeof a=="object"&&a!==null){if(a.as==null||a.as==="script"){var f=c(a.as,a.crossOrigin);r.d.M(u,{crossOrigin:f,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0})}}else a==null&&r.d.M(u)},K.preload=function(u,a){if(typeof u=="string"&&typeof a=="object"&&a!==null&&typeof a.as=="string"){var f=a.as,p=c(f,a.crossOrigin);r.d.L(u,f,{crossOrigin:p,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0,type:typeof a.type=="string"?a.type:void 0,fetchPriority:typeof a.fetchPriority=="string"?a.fetchPriority:void 0,referrerPolicy:typeof a.referrerPolicy=="string"?a.referrerPolicy:void 0,imageSrcSet:typeof a.imageSrcSet=="string"?a.imageSrcSet:void 0,imageSizes:typeof a.imageSizes=="string"?a.imageSizes:void 0,media:typeof a.media=="string"?a.media:void 0})}},K.preloadModule=function(u,a){if(typeof u=="string")if(a){var f=c(a.as,a.crossOrigin);r.d.m(u,{as:typeof a.as=="string"&&a.as!=="script"?a.as:void 0,crossOrigin:f,integrity:typeof a.integrity=="string"?a.integrity:void 0})}else r.d.m(u)},K.requestFormReset=function(u){r.d.r(u)},K.unstable_batchedUpdates=function(u,a){return u(a)},K.useFormState=function(u,a,f){return s.H.useFormState(u,a,f)},K.useFormStatus=function(){return s.H.useHostTransitionStatus()},K.version="19.2.4",K}var xn;function Jo(){if(xn)return _t.exports;xn=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),_t.exports=Qo(),_t.exports}var Ge=Jo();const ei=Zo(Ge);function _(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Sn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function tn(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Sn(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Sn(e[o],null)}}}}function B(...e){return l.useCallback(tn(...e),e)}function ti(e,t){const n=l.createContext(t),r=i=>{const{children:s,...c}=i,u=l.useMemo(()=>c,Object.values(c));return v.jsx(n.Provider,{value:u,children:s})};r.displayName=e+"Provider";function o(i){const s=l.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function je(e,t=[]){let n=[];function r(i,s){const c=l.createContext(s),u=n.length;n=[...n,s];const a=p=>{const{scope:h,children:m,...y}=p,d=h?.[e]?.[u]||c,g=l.useMemo(()=>y,Object.values(y));return v.jsx(d.Provider,{value:g,children:m})};a.displayName=i+"Provider";function f(p,h){const m=h?.[e]?.[u]||c,y=l.useContext(m);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[a,f]}const o=()=>{const i=n.map(s=>l.createContext(s));return function(c){const u=c?.[e]||i;return l.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return o.scopeName=e,[r,ni(o,...t)]}function ni(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((c,{useScope:u,scopeName:a})=>{const p=u(i)[`__scope${a}`];return{...c,...p}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var Y=globalThis?.document?l.useLayoutEffect:()=>{},ri=en[" useId ".trim().toString()]||(()=>{}),oi=0;function Ce(e){const[t,n]=l.useState(ri());return Y(()=>{n(r=>r??String(oi++))},[e]),e||(t?`radix-${t}`:"")}var ii=en[" useInsertionEffect ".trim().toString()]||Y;function st({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=si({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:o;{const f=l.useRef(e!==void 0);l.useEffect(()=>{const p=f.current;p!==c&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=c},[c,r])}const a=l.useCallback(f=>{if(c){const p=ci(f)?f(e):f;p!==e&&s.current?.(p)}else i(f)},[c,e,i,s]);return[u,a]}function si({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),o=l.useRef(n),i=l.useRef(t);return ii(()=>{i.current=t},[t]),l.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function ci(e){return typeof e=="function"}function ze(e){const t=ai(e),n=l.forwardRef((r,o)=>{const{children:i,...s}=r,c=l.Children.toArray(i),u=c.find(li);if(u){const a=u.props.children,f=c.map(p=>p===u?l.Children.count(a)>1?l.Children.only(null):l.isValidElement(a)?a.props.children:null:p);return v.jsx(t,{...s,ref:o,children:l.isValidElement(a)?l.cloneElement(a,void 0,f):null})}return v.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function ai(e){const t=l.forwardRef((n,r)=>{const{children:o,...i}=n;if(l.isValidElement(o)){const s=fi(o),c=ui(i,o.props);return o.type!==l.Fragment&&(c.ref=r?tn(r,s):s),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Kn=Symbol("radix.slottable");function Yn(e){const t=({children:n})=>v.jsx(v.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Kn,t}function li(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Kn}function ui(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const u=i(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function fi(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var di=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],F=di.reduce((e,t)=>{const n=ze(`Primitive.${t}`),r=l.forwardRef((o,i)=>{const{asChild:s,...c}=o,u=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(u,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function pi(e,t){e&&Ge.flushSync(()=>e.dispatchEvent(t))}function be(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>t.current?.(...n),[])}function mi(e,t=globalThis?.document){const n=be(e);l.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var hi="DismissableLayer",Ht="dismissableLayer.update",gi="dismissableLayer.pointerDownOutside",vi="dismissableLayer.focusOutside",Cn,Gn=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mt=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:c,...u}=e,a=l.useContext(Gn),[f,p]=l.useState(null),h=f?.ownerDocument??globalThis?.document,[,m]=l.useState({}),y=B(t,E=>p(E)),d=Array.from(a.layers),[g]=[...a.layersWithOutsidePointerEventsDisabled].slice(-1),x=d.indexOf(g),w=f?d.indexOf(f):-1,S=a.layersWithOutsidePointerEventsDisabled.size>0,C=w>=x,b=xi(E=>{const T=E.target,I=[...a.branches].some(D=>D.contains(T));!C||I||(o?.(E),s?.(E),E.defaultPrevented||c?.())},h),R=Si(E=>{const T=E.target;[...a.branches].some(D=>D.contains(T))||(i?.(E),s?.(E),E.defaultPrevented||c?.())},h);return mi(E=>{w===a.layers.size-1&&(r?.(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},h),l.useEffect(()=>{if(f)return n&&(a.layersWithOutsidePointerEventsDisabled.size===0&&(Cn=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),a.layersWithOutsidePointerEventsDisabled.add(f)),a.layers.add(f),bn(),()=>{n&&a.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Cn)}},[f,h,n,a]),l.useEffect(()=>()=>{f&&(a.layers.delete(f),a.layersWithOutsidePointerEventsDisabled.delete(f),bn())},[f,a]),l.useEffect(()=>{const E=()=>m({});return document.addEventListener(Ht,E),()=>document.removeEventListener(Ht,E)},[]),v.jsx(F.div,{...u,ref:y,style:{pointerEvents:S?C?"auto":"none":void 0,...e.style},onFocusCapture:_(e.onFocusCapture,R.onFocusCapture),onBlurCapture:_(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:_(e.onPointerDownCapture,b.onPointerDownCapture)})});mt.displayName=hi;var yi="DismissableLayerBranch",wi=l.forwardRef((e,t)=>{const n=l.useContext(Gn),r=l.useRef(null),o=B(t,r);return l.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),v.jsx(F.div,{...e,ref:o})});wi.displayName=yi;function xi(e,t=globalThis?.document){const n=be(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const i=c=>{if(c.target&&!r.current){let u=function(){Xn(gi,n,a,{discrete:!0})};const a={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Si(e,t=globalThis?.document){const n=be(e),r=l.useRef(!1);return l.useEffect(()=>{const o=i=>{i.target&&!r.current&&Xn(vi,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bn(){const e=new CustomEvent(Ht);document.dispatchEvent(e)}function Xn(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?pi(o,i):o.dispatchEvent(i)}var Nt="focusScope.autoFocusOnMount",It="focusScope.autoFocusOnUnmount",En={bubbles:!1,cancelable:!0},Ci="FocusScope",nn=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[c,u]=l.useState(null),a=be(o),f=be(i),p=l.useRef(null),h=B(t,d=>u(d)),m=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let d=function(S){if(m.paused||!c)return;const C=S.target;c.contains(C)?p.current=C:de(p.current,{select:!0})},g=function(S){if(m.paused||!c)return;const C=S.relatedTarget;C!==null&&(c.contains(C)||de(p.current,{select:!0}))},x=function(S){if(document.activeElement===document.body)for(const b of S)b.removedNodes.length>0&&de(c)};document.addEventListener("focusin",d),document.addEventListener("focusout",g);const w=new MutationObserver(x);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",g),w.disconnect()}}},[r,c,m.paused]),l.useEffect(()=>{if(c){Pn.add(m);const d=document.activeElement;if(!c.contains(d)){const x=new CustomEvent(Nt,En);c.addEventListener(Nt,a),c.dispatchEvent(x),x.defaultPrevented||(bi(Ti(qn(c)),{select:!0}),document.activeElement===d&&de(c))}return()=>{c.removeEventListener(Nt,a),setTimeout(()=>{const x=new CustomEvent(It,En);c.addEventListener(It,f),c.dispatchEvent(x),x.defaultPrevented||de(d??document.body,{select:!0}),c.removeEventListener(It,f),Pn.remove(m)},0)}}},[c,a,f,m]);const y=l.useCallback(d=>{if(!n&&!r||m.paused)return;const g=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,x=document.activeElement;if(g&&x){const w=d.currentTarget,[S,C]=Ei(w);S&&C?!d.shiftKey&&x===C?(d.preventDefault(),n&&de(S,{select:!0})):d.shiftKey&&x===S&&(d.preventDefault(),n&&de(C,{select:!0})):x===w&&d.preventDefault()}},[n,r,m.paused]);return v.jsx(F.div,{tabIndex:-1,...s,ref:h,onKeyDown:y})});nn.displayName=Ci;function bi(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(de(r,{select:t}),document.activeElement!==n)return}function Ei(e){const t=qn(e),n=Rn(t,e),r=Rn(t.reverse(),e);return[n,r]}function qn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Rn(e,t){for(const n of e)if(!Ri(n,{upTo:t}))return n}function Ri(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Pi(e){return e instanceof HTMLInputElement&&"select"in e}function de(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Pi(e)&&t&&e.select()}}var Pn=Ai();function Ai(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=An(e,t),e.unshift(t)},remove(t){e=An(e,t),e[0]?.resume()}}}function An(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ti(e){return e.filter(t=>t.tagName!=="A")}var Oi="Portal",ht=l.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=l.useState(!1);Y(()=>i(!0),[]);const s=n||o&&globalThis?.document?.body;return s?ei.createPortal(v.jsx(F.div,{...r,ref:t}),s):null});ht.displayName=Oi;function Di(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Fe=e=>{const{present:t,children:n}=e,r=_i(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),i=B(r.ref,Ni(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:i}):null};Fe.displayName="Presence";function _i(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),i=l.useRef("none"),s=e?"mounted":"unmounted",[c,u]=Di(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const a=Ze(r.current);i.current=c==="mounted"?a:"none"},[c]),Y(()=>{const a=r.current,f=o.current;if(f!==e){const h=i.current,m=Ze(a);e?u("MOUNT"):m==="none"||a?.display==="none"?u("UNMOUNT"):u(f&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Y(()=>{if(t){let a;const f=t.ownerDocument.defaultView??window,p=m=>{const d=Ze(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&d&&(u("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",a=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=m=>{m.target===t&&(i.current=Ze(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(a),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:l.useCallback(a=>{r.current=a?getComputedStyle(a):null,n(a)},[])}}function Ze(e){return e?.animationName||"none"}function Ni(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Mt=0;function Zn(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Tn()),document.body.insertAdjacentElement("beforeend",e[1]??Tn()),Mt++,()=>{Mt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Mt--}},[])}function Tn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var re=function(){return re=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},re.apply(this,arguments)};function Qn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Ii(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var rt="right-scroll-bar-position",ot="width-before-scroll-bar",Mi="with-scroll-bars-hidden",Li="--removed-body-scroll-bar-size";function Lt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ki(e,t){var n=l.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var ji=typeof window<"u"?l.useLayoutEffect:l.useEffect,On=new WeakMap;function Fi(e,t){var n=ki(null,function(r){return e.forEach(function(o){return Lt(o,r)})});return ji(function(){var r=On.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(c){i.has(c)||Lt(c,null)}),i.forEach(function(c){o.has(c)||Lt(c,s)})}On.set(n,e)},[e]),n}function $i(e){return e}function Wi(e,t){t===void 0&&(t=$i);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(c){return c!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(c){return i(c)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var c=n;n=[],c.forEach(i),s=n}var u=function(){var f=s;s=[],f.forEach(i)},a=function(){return Promise.resolve().then(u)};a(),n={push:function(f){s.push(f),a()},filter:function(f){return s=s.filter(f),n}}}};return o}function Bi(e){e===void 0&&(e={});var t=Wi(null);return t.options=re({async:!0,ssr:!1},e),t}var Jn=function(e){var t=e.sideCar,n=Qn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return l.createElement(r,re({},n))};Jn.isSideCarExport=!0;function Hi(e,t){return e.useMedium(t),Jn}var er=Bi(),kt=function(){},gt=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:kt,onWheelCapture:kt,onTouchMoveCapture:kt}),o=r[0],i=r[1],s=e.forwardProps,c=e.children,u=e.className,a=e.removeScrollBar,f=e.enabled,p=e.shards,h=e.sideCar,m=e.noRelative,y=e.noIsolation,d=e.inert,g=e.allowPinchZoom,x=e.as,w=x===void 0?"div":x,S=e.gapMode,C=Qn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=h,R=Fi([n,t]),E=re(re({},C),o);return l.createElement(l.Fragment,null,f&&l.createElement(b,{sideCar:er,removeScrollBar:a,shards:p,noRelative:m,noIsolation:y,inert:d,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:S}),s?l.cloneElement(l.Children.only(c),re(re({},E),{ref:R})):l.createElement(w,re({},E,{className:u,ref:R}),c))});gt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};gt.classNames={fullWidth:ot,zeroRight:rt};var Vi=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ui(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Vi();return t&&e.setAttribute("nonce",t),e}function zi(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ki(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Yi=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Ui())&&(zi(t,n),Ki(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Gi=function(){var e=Yi();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},tr=function(){var e=Gi(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Xi={left:0,top:0,right:0,gap:0},jt=function(e){return parseInt(e||"",10)||0},qi=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[jt(n),jt(r),jt(o)]},Zi=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Xi;var t=qi(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Qi=tr(),Ne="data-scroll-locked",Ji=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,c=e.gap;return n===void 0&&(n="margin"),`
1
+ import{a as qo,g as Zo,r as l,j as v,R as en,b as xe}from"./query-b9vbXHQr.js";var _t={exports:{}},K={};var wn;function Qo(){if(wn)return K;wn=1;var e=qo();function t(u){var a="https://react.dev/errors/"+u;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)a+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+u+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function i(u,a,f){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:p==null?null:""+p,children:u,containerInfo:a,implementation:f}}var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(u,a){if(u==="font")return"";if(typeof a=="string")return a==="use-credentials"?a:""}return K.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,K.createPortal=function(u,a){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)throw Error(t(299));return i(u,a,null,f)},K.flushSync=function(u){var a=s.T,f=r.p;try{if(s.T=null,r.p=2,u)return u()}finally{s.T=a,r.p=f,r.d.f()}},K.preconnect=function(u,a){typeof u=="string"&&(a?(a=a.crossOrigin,a=typeof a=="string"?a==="use-credentials"?a:"":void 0):a=null,r.d.C(u,a))},K.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u)},K.preinit=function(u,a){if(typeof u=="string"&&a&&typeof a.as=="string"){var f=a.as,p=c(f,a.crossOrigin),h=typeof a.integrity=="string"?a.integrity:void 0,m=typeof a.fetchPriority=="string"?a.fetchPriority:void 0;f==="style"?r.d.S(u,typeof a.precedence=="string"?a.precedence:void 0,{crossOrigin:p,integrity:h,fetchPriority:m}):f==="script"&&r.d.X(u,{crossOrigin:p,integrity:h,fetchPriority:m,nonce:typeof a.nonce=="string"?a.nonce:void 0})}},K.preinitModule=function(u,a){if(typeof u=="string")if(typeof a=="object"&&a!==null){if(a.as==null||a.as==="script"){var f=c(a.as,a.crossOrigin);r.d.M(u,{crossOrigin:f,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0})}}else a==null&&r.d.M(u)},K.preload=function(u,a){if(typeof u=="string"&&typeof a=="object"&&a!==null&&typeof a.as=="string"){var f=a.as,p=c(f,a.crossOrigin);r.d.L(u,f,{crossOrigin:p,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0,type:typeof a.type=="string"?a.type:void 0,fetchPriority:typeof a.fetchPriority=="string"?a.fetchPriority:void 0,referrerPolicy:typeof a.referrerPolicy=="string"?a.referrerPolicy:void 0,imageSrcSet:typeof a.imageSrcSet=="string"?a.imageSrcSet:void 0,imageSizes:typeof a.imageSizes=="string"?a.imageSizes:void 0,media:typeof a.media=="string"?a.media:void 0})}},K.preloadModule=function(u,a){if(typeof u=="string")if(a){var f=c(a.as,a.crossOrigin);r.d.m(u,{as:typeof a.as=="string"&&a.as!=="script"?a.as:void 0,crossOrigin:f,integrity:typeof a.integrity=="string"?a.integrity:void 0})}else r.d.m(u)},K.requestFormReset=function(u){r.d.r(u)},K.unstable_batchedUpdates=function(u,a){return u(a)},K.useFormState=function(u,a,f){return s.H.useFormState(u,a,f)},K.useFormStatus=function(){return s.H.useHostTransitionStatus()},K.version="19.2.4",K}var xn;function Jo(){if(xn)return _t.exports;xn=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),_t.exports=Qo(),_t.exports}var Ge=Jo();const ei=Zo(Ge);function _(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Sn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function tn(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Sn(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Sn(e[o],null)}}}}function B(...e){return l.useCallback(tn(...e),e)}function ti(e,t){const n=l.createContext(t),r=i=>{const{children:s,...c}=i,u=l.useMemo(()=>c,Object.values(c));return v.jsx(n.Provider,{value:u,children:s})};r.displayName=e+"Provider";function o(i){const s=l.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function je(e,t=[]){let n=[];function r(i,s){const c=l.createContext(s),u=n.length;n=[...n,s];const a=p=>{const{scope:h,children:m,...y}=p,d=h?.[e]?.[u]||c,g=l.useMemo(()=>y,Object.values(y));return v.jsx(d.Provider,{value:g,children:m})};a.displayName=i+"Provider";function f(p,h){const m=h?.[e]?.[u]||c,y=l.useContext(m);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[a,f]}const o=()=>{const i=n.map(s=>l.createContext(s));return function(c){const u=c?.[e]||i;return l.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return o.scopeName=e,[r,ni(o,...t)]}function ni(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((c,{useScope:u,scopeName:a})=>{const p=u(i)[`__scope${a}`];return{...c,...p}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var Y=globalThis?.document?l.useLayoutEffect:()=>{},ri=en[" useId ".trim().toString()]||(()=>{}),oi=0;function Ce(e){const[t,n]=l.useState(ri());return Y(()=>{n(r=>r??String(oi++))},[e]),e||(t?`radix-${t}`:"")}var ii=en[" useInsertionEffect ".trim().toString()]||Y;function st({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=si({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:o;{const f=l.useRef(e!==void 0);l.useEffect(()=>{const p=f.current;p!==c&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=c},[c,r])}const a=l.useCallback(f=>{if(c){const p=ci(f)?f(e):f;p!==e&&s.current?.(p)}else i(f)},[c,e,i,s]);return[u,a]}function si({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),o=l.useRef(n),i=l.useRef(t);return ii(()=>{i.current=t},[t]),l.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function ci(e){return typeof e=="function"}function ze(e){const t=ai(e),n=l.forwardRef((r,o)=>{const{children:i,...s}=r,c=l.Children.toArray(i),u=c.find(li);if(u){const a=u.props.children,f=c.map(p=>p===u?l.Children.count(a)>1?l.Children.only(null):l.isValidElement(a)?a.props.children:null:p);return v.jsx(t,{...s,ref:o,children:l.isValidElement(a)?l.cloneElement(a,void 0,f):null})}return v.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function ai(e){const t=l.forwardRef((n,r)=>{const{children:o,...i}=n;if(l.isValidElement(o)){const s=fi(o),c=ui(i,o.props);return o.type!==l.Fragment&&(c.ref=r?tn(r,s):s),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Kn=Symbol("radix.slottable");function Yn(e){const t=({children:n})=>v.jsx(v.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Kn,t}function li(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Kn}function ui(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const u=i(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function fi(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var di=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],F=di.reduce((e,t)=>{const n=ze(`Primitive.${t}`),r=l.forwardRef((o,i)=>{const{asChild:s,...c}=o,u=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(u,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function pi(e,t){e&&Ge.flushSync(()=>e.dispatchEvent(t))}function be(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>t.current?.(...n),[])}function mi(e,t=globalThis?.document){const n=be(e);l.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var hi="DismissableLayer",Ht="dismissableLayer.update",gi="dismissableLayer.pointerDownOutside",vi="dismissableLayer.focusOutside",Cn,Gn=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mt=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:c,...u}=e,a=l.useContext(Gn),[f,p]=l.useState(null),h=f?.ownerDocument??globalThis?.document,[,m]=l.useState({}),y=B(t,E=>p(E)),d=Array.from(a.layers),[g]=[...a.layersWithOutsidePointerEventsDisabled].slice(-1),x=d.indexOf(g),w=f?d.indexOf(f):-1,S=a.layersWithOutsidePointerEventsDisabled.size>0,C=w>=x,b=xi(E=>{const T=E.target,I=[...a.branches].some(D=>D.contains(T));!C||I||(o?.(E),s?.(E),E.defaultPrevented||c?.())},h),R=Si(E=>{const T=E.target;[...a.branches].some(D=>D.contains(T))||(i?.(E),s?.(E),E.defaultPrevented||c?.())},h);return mi(E=>{w===a.layers.size-1&&(r?.(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},h),l.useEffect(()=>{if(f)return n&&(a.layersWithOutsidePointerEventsDisabled.size===0&&(Cn=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),a.layersWithOutsidePointerEventsDisabled.add(f)),a.layers.add(f),bn(),()=>{n&&a.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Cn)}},[f,h,n,a]),l.useEffect(()=>()=>{f&&(a.layers.delete(f),a.layersWithOutsidePointerEventsDisabled.delete(f),bn())},[f,a]),l.useEffect(()=>{const E=()=>m({});return document.addEventListener(Ht,E),()=>document.removeEventListener(Ht,E)},[]),v.jsx(F.div,{...u,ref:y,style:{pointerEvents:S?C?"auto":"none":void 0,...e.style},onFocusCapture:_(e.onFocusCapture,R.onFocusCapture),onBlurCapture:_(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:_(e.onPointerDownCapture,b.onPointerDownCapture)})});mt.displayName=hi;var yi="DismissableLayerBranch",wi=l.forwardRef((e,t)=>{const n=l.useContext(Gn),r=l.useRef(null),o=B(t,r);return l.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),v.jsx(F.div,{...e,ref:o})});wi.displayName=yi;function xi(e,t=globalThis?.document){const n=be(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const i=c=>{if(c.target&&!r.current){let u=function(){Xn(gi,n,a,{discrete:!0})};const a={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Si(e,t=globalThis?.document){const n=be(e),r=l.useRef(!1);return l.useEffect(()=>{const o=i=>{i.target&&!r.current&&Xn(vi,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bn(){const e=new CustomEvent(Ht);document.dispatchEvent(e)}function Xn(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?pi(o,i):o.dispatchEvent(i)}var Nt="focusScope.autoFocusOnMount",It="focusScope.autoFocusOnUnmount",En={bubbles:!1,cancelable:!0},Ci="FocusScope",nn=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[c,u]=l.useState(null),a=be(o),f=be(i),p=l.useRef(null),h=B(t,d=>u(d)),m=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let d=function(S){if(m.paused||!c)return;const C=S.target;c.contains(C)?p.current=C:de(p.current,{select:!0})},g=function(S){if(m.paused||!c)return;const C=S.relatedTarget;C!==null&&(c.contains(C)||de(p.current,{select:!0}))},x=function(S){if(document.activeElement===document.body)for(const b of S)b.removedNodes.length>0&&de(c)};document.addEventListener("focusin",d),document.addEventListener("focusout",g);const w=new MutationObserver(x);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",g),w.disconnect()}}},[r,c,m.paused]),l.useEffect(()=>{if(c){Pn.add(m);const d=document.activeElement;if(!c.contains(d)){const x=new CustomEvent(Nt,En);c.addEventListener(Nt,a),c.dispatchEvent(x),x.defaultPrevented||(bi(Ti(qn(c)),{select:!0}),document.activeElement===d&&de(c))}return()=>{c.removeEventListener(Nt,a),setTimeout(()=>{const x=new CustomEvent(It,En);c.addEventListener(It,f),c.dispatchEvent(x),x.defaultPrevented||de(d??document.body,{select:!0}),c.removeEventListener(It,f),Pn.remove(m)},0)}}},[c,a,f,m]);const y=l.useCallback(d=>{if(!n&&!r||m.paused)return;const g=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,x=document.activeElement;if(g&&x){const w=d.currentTarget,[S,C]=Ei(w);S&&C?!d.shiftKey&&x===C?(d.preventDefault(),n&&de(S,{select:!0})):d.shiftKey&&x===S&&(d.preventDefault(),n&&de(C,{select:!0})):x===w&&d.preventDefault()}},[n,r,m.paused]);return v.jsx(F.div,{tabIndex:-1,...s,ref:h,onKeyDown:y})});nn.displayName=Ci;function bi(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(de(r,{select:t}),document.activeElement!==n)return}function Ei(e){const t=qn(e),n=Rn(t,e),r=Rn(t.reverse(),e);return[n,r]}function qn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Rn(e,t){for(const n of e)if(!Ri(n,{upTo:t}))return n}function Ri(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Pi(e){return e instanceof HTMLInputElement&&"select"in e}function de(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Pi(e)&&t&&e.select()}}var Pn=Ai();function Ai(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=An(e,t),e.unshift(t)},remove(t){e=An(e,t),e[0]?.resume()}}}function An(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ti(e){return e.filter(t=>t.tagName!=="A")}var Oi="Portal",ht=l.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=l.useState(!1);Y(()=>i(!0),[]);const s=n||o&&globalThis?.document?.body;return s?ei.createPortal(v.jsx(F.div,{...r,ref:t}),s):null});ht.displayName=Oi;function Di(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Fe=e=>{const{present:t,children:n}=e,r=_i(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),i=B(r.ref,Ni(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:i}):null};Fe.displayName="Presence";function _i(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),i=l.useRef("none"),s=e?"mounted":"unmounted",[c,u]=Di(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const a=Ze(r.current);i.current=c==="mounted"?a:"none"},[c]),Y(()=>{const a=r.current,f=o.current;if(f!==e){const h=i.current,m=Ze(a);e?u("MOUNT"):m==="none"||a?.display==="none"?u("UNMOUNT"):u(f&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Y(()=>{if(t){let a;const f=t.ownerDocument.defaultView??window,p=m=>{const d=Ze(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&d&&(u("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",a=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=m=>{m.target===t&&(i.current=Ze(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(a),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:l.useCallback(a=>{r.current=a?getComputedStyle(a):null,n(a)},[])}}function Ze(e){return e?.animationName||"none"}function Ni(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Mt=0;function Zn(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Tn()),document.body.insertAdjacentElement("beforeend",e[1]??Tn()),Mt++,()=>{Mt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Mt--}},[])}function Tn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var re=function(){return re=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},re.apply(this,arguments)};function Qn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Ii(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var rt="right-scroll-bar-position",ot="width-before-scroll-bar",Mi="with-scroll-bars-hidden",Li="--removed-body-scroll-bar-size";function Lt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ki(e,t){var n=l.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var ji=typeof window<"u"?l.useLayoutEffect:l.useEffect,On=new WeakMap;function Fi(e,t){var n=ki(null,function(r){return e.forEach(function(o){return Lt(o,r)})});return ji(function(){var r=On.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(c){i.has(c)||Lt(c,null)}),i.forEach(function(c){o.has(c)||Lt(c,s)})}On.set(n,e)},[e]),n}function $i(e){return e}function Wi(e,t){t===void 0&&(t=$i);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(c){return c!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(c){return i(c)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var c=n;n=[],c.forEach(i),s=n}var u=function(){var f=s;s=[],f.forEach(i)},a=function(){return Promise.resolve().then(u)};a(),n={push:function(f){s.push(f),a()},filter:function(f){return s=s.filter(f),n}}}};return o}function Bi(e){e===void 0&&(e={});var t=Wi(null);return t.options=re({async:!0,ssr:!1},e),t}var Jn=function(e){var t=e.sideCar,n=Qn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return l.createElement(r,re({},n))};Jn.isSideCarExport=!0;function Hi(e,t){return e.useMedium(t),Jn}var er=Bi(),kt=function(){},gt=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:kt,onWheelCapture:kt,onTouchMoveCapture:kt}),o=r[0],i=r[1],s=e.forwardProps,c=e.children,u=e.className,a=e.removeScrollBar,f=e.enabled,p=e.shards,h=e.sideCar,m=e.noRelative,y=e.noIsolation,d=e.inert,g=e.allowPinchZoom,x=e.as,w=x===void 0?"div":x,S=e.gapMode,C=Qn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=h,R=Fi([n,t]),E=re(re({},C),o);return l.createElement(l.Fragment,null,f&&l.createElement(b,{sideCar:er,removeScrollBar:a,shards:p,noRelative:m,noIsolation:y,inert:d,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:S}),s?l.cloneElement(l.Children.only(c),re(re({},E),{ref:R})):l.createElement(w,re({},E,{className:u,ref:R}),c))});gt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};gt.classNames={fullWidth:ot,zeroRight:rt};var Vi=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ui(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Vi();return t&&e.setAttribute("nonce",t),e}function zi(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ki(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Yi=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Ui())&&(zi(t,n),Ki(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Gi=function(){var e=Yi();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},tr=function(){var e=Gi(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Xi={left:0,top:0,right:0,gap:0},jt=function(e){return parseInt(e||"",10)||0},qi=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[jt(n),jt(r),jt(o)]},Zi=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Xi;var t=qi(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Qi=tr(),Ne="data-scroll-locked",Ji=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,c=e.gap;return n===void 0&&(n="margin"),`
2
2
  .`.concat(Mi,` {
3
3
  overflow: hidden `).concat(r,`;
4
4
  padding-right: `).concat(c,"px ").concat(r,`;
@@ -4,12 +4,12 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>LLMTap — LLM Observability</title>
7
- <script type="module" crossorigin src="/assets/index-DG2eF3M2.js"></script>
8
- <link rel="modulepreload" crossorigin href="/assets/query-DVWnIZNd.js">
9
- <link rel="modulepreload" crossorigin href="/assets/ui-BFiKdTjl.js">
10
- <link rel="modulepreload" crossorigin href="/assets/motion-CSeNjKbZ.js">
11
- <link rel="modulepreload" crossorigin href="/assets/icons-BOLUIAKd.js">
12
- <link rel="stylesheet" crossorigin href="/assets/index-CtlcBMi-.css">
7
+ <script type="module" crossorigin src="/assets/index-D1QTIMAj.js"></script>
8
+ <link rel="modulepreload" crossorigin href="/assets/query-b9vbXHQr.js">
9
+ <link rel="modulepreload" crossorigin href="/assets/ui-CaGzZKq9.js">
10
+ <link rel="modulepreload" crossorigin href="/assets/icons-x20EK9lj.js">
11
+ <link rel="modulepreload" crossorigin href="/assets/motion-DMBhW-IL.js">
12
+ <link rel="stylesheet" crossorigin href="/assets/index-9FuuW_w-.css">
13
13
  </head>
14
14
  <body>
15
15
  <div id="root"></div>
package/dist/index.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,16 +1,22 @@
1
1
  {
2
2
  "name": "llmtap",
3
- "version": "0.1.8",
3
+ "version": "0.1.12",
4
4
  "description": "DevTools for AI Agents - See every LLM call, trace agent workflows, track costs",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "llmtap": "./dist/index.js"
8
8
  },
9
- "files": [
10
- "dist"
11
- ],
9
+ "files": ["dist"],
10
+ "scripts": {
11
+ "prepack": "node ../../scripts/verify-publish-manifests.mjs .",
12
+ "prebuild": "node -e \"\"",
13
+ "build": "tsup",
14
+ "test": "vitest run",
15
+ "postbuild": "node -e \"const fs=require('fs');const path=require('path');const src=path.resolve(__dirname,'..','dashboard','dist');const dst=path.resolve(__dirname,'dist','dashboard');if(fs.existsSync(src)){fs.cpSync(src,dst,{recursive:true});console.log('Dashboard bundled into CLI dist')}else{console.log('Dashboard dist not found at',src)}\"",
16
+ "clean": "rimraf dist"
17
+ },
12
18
  "dependencies": {
13
- "@llmtap/collector": "^0.1.5",
19
+ "@llmtap/collector": "^0.1.7",
14
20
  "@llmtap/shared": "^0.1.5",
15
21
  "chalk": "^5.4.0",
16
22
  "commander": "^13.0.0",
@@ -24,17 +30,8 @@
24
30
  "vitest": "^3.0.0"
25
31
  },
26
32
  "keywords": [
27
- "llm",
28
- "ai",
29
- "agent",
30
- "observability",
31
- "devtools",
32
- "openai",
33
- "anthropic",
34
- "gemini",
35
- "groq",
36
- "tracing",
37
- "debugging"
33
+ "llm", "ai", "agent", "observability", "devtools",
34
+ "openai", "anthropic", "gemini", "groq", "tracing", "debugging"
38
35
  ],
39
36
  "engines": {
40
37
  "node": ">=18"
@@ -44,12 +41,5 @@
44
41
  "type": "git",
45
42
  "url": "https://github.com/DivyaanshuXD/LLMTap",
46
43
  "directory": "packages/cli"
47
- },
48
- "scripts": {
49
- "prebuild": "node -e \"\"",
50
- "build": "tsup",
51
- "test": "vitest run",
52
- "postbuild": "node -e \"const fs=require('fs');const path=require('path');const src=path.resolve(__dirname,'..','dashboard','dist');const dst=path.resolve(__dirname,'dist','dashboard');if(fs.existsSync(src)){fs.cpSync(src,dst,{recursive:true});console.log('Dashboard bundled into CLI dist')}else{console.log('Dashboard dist not found at',src)}\"",
53
- "clean": "rimraf dist"
54
44
  }
55
- }
45
+ }
@@ -1 +0,0 @@
1
- import{j as e,r as v,d as k}from"./query-DVWnIZNd.js";import{b as C,f as w}from"./index-DG2eF3M2.js";import{B as S,S as T}from"./statistics-with-status-grid-tcb9SpIY.js";import{S as $,a as M,b as D,c as P,d as g}from"./select-BJEJvQo4.js";import{f as u,b as y,a as d,P as L}from"./format-zoXqpaOb.js";import{h as R,I as V,Z as E,a0 as K,a1 as A,O as B,a2 as W}from"./icons-BOLUIAKd.js";import{D as q}from"./DataTable-p1PD-dJj.js";import{E as j}from"./EmptyState-xDl-M9Rz.js";import{p as b}from"./provider-colors-CTiHNYHs.js";import{c as x}from"./motion-CSeNjKbZ.js";import"./ui-BFiKdTjl.js";function I({segments:t,totalLabel:n,totalValue:l}){const a=2*Math.PI*66,i=Math.max(t.reduce((r,o)=>r+o.value,0),1);let c=0;return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[280px_minmax(0,1fr)] lg:items-center",children:[e.jsxs("div",{className:"relative mx-auto h-[220px] w-[220px]",children:[e.jsxs("svg",{viewBox:"0 0 180 180",className:"h-full w-full -rotate-90",role:"img","aria-label":"Provider budget distribution",children:[e.jsx("circle",{cx:"90",cy:"90",r:66,fill:"none",stroke:"rgba(var(--ch-text-primary),0.12)",strokeWidth:"18"}),t.map(r=>{const o=r.value/i*a,m=-c;return c+=o,e.jsx("circle",{cx:"90",cy:"90",r:66,fill:"none",stroke:r.color,strokeWidth:"18",strokeLinecap:"round",strokeDasharray:`${o} ${a-o}`,strokeDashoffset:m,style:{filter:`drop-shadow(0 0 10px ${r.color}40)`}},r.label)})]}),e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center rounded-full",children:[e.jsx("div",{className:"hud-label",children:n}),e.jsx("div",{className:"mt-2 text-2xl font-semibold tracking-[-0.04em] text-[var(--color-text-primary)]",children:l}),e.jsxs("div",{className:"mt-1 text-xs text-[var(--color-text-tertiary)]",children:[t.length," providers active"]})]})]}),e.jsx("div",{className:"space-y-3",children:t.map(r=>{const o=r.value/i*100;return e.jsxs("div",{className:"rounded-[var(--radius-panel)] border border-[var(--border-dim)] bg-[linear-gradient(180deg,rgba(var(--ch-bg-panel),0.72),rgba(var(--ch-bg-base),0.9))] p-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"h-3 w-3 rounded-full",style:{backgroundColor:r.color,boxShadow:`0 0 12px ${r.color}50`}}),e.jsx("span",{className:"flex-1 text-sm font-medium capitalize text-[var(--color-text-primary)]",children:r.label}),e.jsxs("span",{className:"font-mono text-xs text-[var(--color-text-tertiary)]",children:[o.toFixed(0),"%"]})]}),e.jsx("div",{className:"mt-3 h-2 overflow-hidden rounded-full bg-[rgba(var(--ch-bg-base),0.84)]",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${Math.max(o,6)}%`,background:`linear-gradient(90deg, ${r.color}, rgba(var(--ch-text-primary),0.72))`}})}),r.detail?e.jsx("div",{className:"mt-2 text-xs text-[var(--color-text-tertiary)]",children:r.detail}):null]},r.label)})})]})}const N={cost:{label:"Cost ranking",barClassName:"bg-[linear-gradient(90deg,rgba(var(--ch-accent-2), 0.95),rgba(var(--ch-accent), 0.92))]",value:t=>t.totalCost,formatter:t=>d(t)},latency:{label:"Latency ranking",barClassName:"bg-[linear-gradient(90deg,rgba(var(--ch-text-primary), 0.9),rgba(var(--ch-accent), 0.78))]",value:t=>t.avgDuration,formatter:t=>y(t)},tokens:{label:"Token ranking",barClassName:"bg-[linear-gradient(90deg,rgba(var(--ch-accent), 0.96),rgba(var(--ch-accent-2), 0.86))]",value:t=>t.totalTokens,formatter:t=>u(t)}};function _({rows:t}){const[n,l]=v.useState("cost"),h=v.useMemo(()=>{const a=N[n].value;return[...t].sort((i,c)=>a(c)-a(i)).map((i,c,r)=>{const o=Math.max(a(r[0]??i),1),m=a(i);return{...i,rank:c+1,metricValue:m,progress:Math.max(m/o*100,6)}})},[n,t]);return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs(S,{variant:"info",className:"border-[var(--color-accent)]/18 bg-[var(--color-accent)]/12 text-[var(--color-accent)]",children:[e.jsx(R,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"ranking live"})]}),e.jsxs($,{value:n,onValueChange:a=>l(a),children:[e.jsx(M,{className:"h-8 w-[170px] text-xs",children:e.jsx(D,{placeholder:"Select metric"})}),e.jsxs(P,{align:"end",children:[e.jsx(g,{value:"cost",children:"Cost ranking"}),e.jsx(g,{value:"latency",children:"Latency ranking"}),e.jsx(g,{value:"tokens",children:"Token ranking"})]})]})]}),e.jsx("div",{className:"space-y-3",children:h.map(a=>e.jsxs("div",{className:"rounded-[22px] border border-[var(--border-dim)] bg-[linear-gradient(180deg,rgba(var(--ch-bg-panel),0.78),rgba(var(--ch-bg-base),0.94))] p-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"rounded-full border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.04)] px-2 py-0.5 font-mono text-[10px] uppercase tracking-[0.18em] text-[var(--color-text-tertiary)]",children:["#",a.rank]}),e.jsx("div",{className:"truncate text-sm font-semibold text-[var(--color-text-primary)]",children:a.label})]}),e.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-2 text-xs text-[var(--color-text-secondary)]",children:[e.jsx("span",{className:"rounded-full border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.04)] px-2 py-0.5 uppercase tracking-[0.16em] text-[10px] text-[var(--color-text-secondary)]",children:a.provider}),e.jsxs("span",{children:[a.spanCount," calls"]}),e.jsxs("span",{children:[u(a.totalTokens)," tokens"]})]})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"font-mono text-sm text-[var(--color-text-primary)]",children:N[n].formatter(a.metricValue)}),e.jsx("div",{className:"mt-1 text-[11px] text-[var(--color-text-tertiary)]",children:n==="cost"?y(a.avgDuration):d(a.totalCost)})]})]}),e.jsx("div",{className:"mt-3 h-2.5 overflow-hidden rounded-full bg-[rgba(var(--ch-bg-base),0.82)]",children:e.jsx("div",{className:`h-full rounded-full ${N[n].barClassName}`,style:{width:`${a.progress}%`}})})]},`${a.provider}-${a.label}`))})]})}const p="dashboard-shell rounded-[var(--radius-card)]",F={item:{hidden:{opacity:0,y:20,scale:.97},show:{opacity:1,y:0,scale:1,transition:{duration:.4,ease:[.22,1,.36,1]}}}};function ae(){const[t,n]=v.useState([{id:"totalCost",desc:!0}]),{data:l,isLoading:h}=k({queryKey:["stats"],queryFn:()=>w(24)}),a=l?.byModel??[],i=l?.byProvider??[],c=a.slice(0,8).map(s=>({label:s.model,provider:s.provider,totalCost:s.totalCost,totalTokens:s.totalTokens,avgDuration:s.avgDuration??0,spanCount:s.spanCount})),r=i.map(s=>({label:s.provider,value:s.totalCost,color:b[s.provider]??"var(--color-accent)",detail:`${s.spanCount} calls · ${u(s.totalTokens)} tokens`})),o=[{title:"Total Cost",value:d(l?.totalCost??0),status:(l?.totalCost??0)>0?"observe":"unknown",range:"Accumulated over the last 24 hours",icon:e.jsx(V,{className:"h-4 w-4"})},{title:"Token Volume",value:u(l?.totalTokens??0),status:(l?.totalTokens??0)>0?"within":"unknown",range:`${l?.totalSpans??0} model calls observed`,icon:e.jsx(E,{className:"h-4 w-4"})},{title:"Models in Rotation",value:String(a.length),status:a.length>0?"within":"unknown",range:`${i.length} providers contributing to spend`,icon:e.jsx(K,{className:"h-4 w-4"})}],m=v.useMemo(()=>[{accessorKey:"model",header:"Model",cell:({row:s})=>e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate font-mono text-sm font-semibold text-[var(--color-text-primary)]",children:s.original.model}),e.jsxs("div",{className:"mt-1 text-xs text-[var(--color-text-secondary)]",children:[s.original.spanCount," calls in the current window"]})]})},{accessorKey:"provider",header:"Provider",cell:({row:s})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"h-2.5 w-2.5 rounded-full",style:{backgroundColor:b[s.original.provider]??"var(--color-accent)",boxShadow:`0 0 10px ${b[s.original.provider]??"var(--color-accent)"}`}}),e.jsx("span",{className:"rounded-full border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.04)] px-2 py-0.5 text-xs font-semibold uppercase tracking-wider text-[var(--color-text-secondary)]",children:s.original.provider})]})},{accessorKey:"spanCount",header:"Calls",cell:({row:s})=>e.jsx("span",{className:"inline-flex items-center justify-center rounded-full border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.04)] px-2.5 py-0.5 font-mono text-xs text-[var(--color-text-secondary)]",children:s.original.spanCount}),meta:{className:"text-right",cellClassName:"text-right"}},{accessorKey:"totalTokens",header:"Tokens",cell:({row:s})=>e.jsx("span",{className:"font-mono text-sm text-[var(--color-text-secondary)]",children:s.original.totalTokens.toLocaleString()}),meta:{className:"text-right",cellClassName:"text-right"}},{accessorKey:"totalCost",header:"Cost",cell:({row:s})=>e.jsx("span",{className:"font-mono text-sm font-semibold text-[var(--color-text-primary)]",children:d(s.original.totalCost)}),meta:{className:"text-right",cellClassName:"text-right"}},{accessorKey:"avgDuration",header:"Avg Duration",cell:({row:s})=>e.jsx("span",{className:"font-mono text-sm text-[var(--color-text-tertiary)]",children:s.original.avgDuration?y(s.original.avgDuration):"-"}),meta:{className:"text-right",cellClassName:"text-right"}}],[a]);return h?e.jsxs("div",{className:"mx-auto max-w-[1760px] space-y-8",children:[e.jsx("div",{className:"skeleton-panel h-44 rounded-[28px]"}),e.jsx("div",{className:"grid grid-cols-1 gap-5 md:grid-cols-3",children:[...Array(3)].map((s,f)=>e.jsxs("div",{className:"metric-card",children:[e.jsx("div",{className:"skeleton-panel h-12 w-12 rounded-2xl"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"skeleton-panel h-3 w-20 rounded-full"}),e.jsx("div",{className:"skeleton-panel h-8 w-28 rounded-full"})]})]},f))})]}):e.jsxs(L,{eyebrow:"Economic Layer",title:"Understand where every token is converting into spend.",description:"This surface should answer two questions immediately: which models are burning budget, and which providers are quietly dominating the bill.",aside:e.jsxs("div",{className:"insight-panel",children:[e.jsx(C,{}),e.jsxs("div",{className:"mt-5 space-y-4",children:[e.jsxs("div",{className:"deck-card deck-card--accent",children:[e.jsx("div",{className:"hud-label",children:"Highest model spend"}),e.jsx("div",{className:"mt-2 text-lg font-medium text-[var(--color-text-primary)]",children:a[0]?.model??"Awaiting traffic"}),e.jsx("div",{className:"mt-2 text-sm text-[var(--color-text-secondary)]",children:a[0]?`${d(a[0].totalCost)} across ${a[0].spanCount} calls`:"No model cost data yet"})]}),e.jsxs("div",{className:"deck-card",children:[e.jsx("div",{className:"hud-label",children:"Provider spread"}),e.jsxs("div",{className:"mt-2 text-lg font-medium text-[var(--color-text-primary)]",children:[i.length," active providers"]}),e.jsx("div",{className:"mt-2 text-sm text-[var(--color-text-secondary)]",children:"Cost dominance becomes obvious here before it becomes expensive."})]})]})]}),children:[e.jsxs("div",{className:"pill-strip w-fit max-w-full overflow-x-auto",children:[e.jsxs("span",{className:"pill-item",children:["window ",e.jsx("strong",{children:"24h"})]}),e.jsxs("span",{className:"pill-item",children:["models ",e.jsx("strong",{children:a.length})]}),e.jsxs("span",{className:"pill-item",children:["providers ",e.jsx("strong",{children:i.length})]}),e.jsxs("span",{className:"pill-item",children:["spend ",e.jsx("strong",{children:d(l?.totalCost??0)})]})]}),e.jsx(x.div,{variants:F.item,initial:"hidden",animate:"show",children:e.jsx(T,{cards:o,className:"max-w-none px-0 sm:px-0 lg:px-0 md:grid-cols-3 xl:grid-cols-3"})}),e.jsxs("div",{className:"grid gap-5 xl:grid-cols-[minmax(0,1.1fr)_minmax(360px,0.9fr)]",children:[e.jsxs(x.div,{className:`${p} p-5`,initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{delay:.15,duration:.35},children:[e.jsxs("div",{className:"mb-5 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"hud-label",children:"Model ranking"}),e.jsx("h2",{className:"page-section-title mt-1",children:"Cost by model"})]}),e.jsxs("span",{className:"status-chip",children:[e.jsx(A,{className:"h-3.5 w-3.5 text-[var(--color-accent)]"}),e.jsx("span",{children:"Spend concentration"})]})]}),c.length>0?e.jsx(_,{rows:c}):e.jsx(j,{title:"No cost data yet",description:"Model spend will stack up here as soon as traffic hits the collector.",className:"h-[320px]"})]}),e.jsxs(x.div,{className:`${p} p-5`,initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{delay:.2,duration:.35},children:[e.jsxs("div",{className:"mb-5 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"hud-label",children:"Provider mix"}),e.jsx("h2",{className:"page-section-title mt-1",children:"Who is taking the budget"})]}),e.jsx(B,{className:"h-4 w-4 text-[var(--color-accent)]"})]}),r.length>0?e.jsx(I,{segments:r,totalLabel:"24h spend",totalValue:d(l?.totalCost??0)}):e.jsx(j,{title:"No providers yet",description:"Provider allocation appears here as soon as at least one model call is captured.",className:"h-[260px]"})]})]}),a.length>0?e.jsxs(x.div,{className:`${p} overflow-hidden p-5`,initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{delay:.25,duration:.35},children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between gap-3 px-1",children:[e.jsxs("div",{children:[e.jsx("div",{className:"hud-label",children:"Detailed ledger"}),e.jsx("h2",{className:"page-section-title mt-1",children:"Breakdown by model"})]}),e.jsxs("span",{className:"status-chip",children:[e.jsx(W,{className:"h-3.5 w-3.5 text-[var(--color-accent)]"}),e.jsxs("span",{children:[a.length," models"]})]})]}),e.jsx(q,{columns:m,data:a,sorting:t,onSortingChange:n})]}):e.jsx(x.div,{className:`${p} p-16`,initial:{opacity:0},animate:{opacity:1},children:e.jsx(j,{title:"No cost data yet",description:"Start making traced model calls and the economic layer will fill in automatically."})})]})}export{ae as default};