vendor: 25,560 bytes, line 1
1import{r as le}from"./icons-D33OLVah.js";var Q=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},nt={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},it=class{#e=nt;#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)}},T=new it;function st(e){setTimeout(e,0)}var U=typeof window>"u"||"Deno"in globalThis;function x(){}function rt(e,t){return typeof e=="function"?e(t):e}function ue(e){return typeof e=="number"&&e>=0&&e!==1/0}function Te(e,t){return Math.max(e+(t||0)-Date.now(),0)}function H(e,t){return typeof e=="function"?e(t):e}function O(e,t){return typeof e=="function"?e(t):e}function Ie(e,t){const{type:n="all",exact:i,fetchStatus:s,predicate:r,queryKey:l,stale:o}=e;if(l){if(i){if(t.queryHash!==Ce(l,t.options))return!1}else if(!B(t.queryKey,l))return!1}if(n!=="all"){const a=t.isActive();if(n==="active"&&!a||n==="inactive"&&a)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||s&&s!==t.state.fetchStatus||r&&!r(t))}function $e(e,t){const{exact:n,status:i,predicate:s,mutationKey:r}=e;if(r){if(!t.options.mutationKey)return!1;if(n){if(z(t.options.mutationKey)!==z(r))return!1}else if(!B(t.options.mutationKey,r))return!1}return!(i&&t.state.status!==i||s&&!s(t))}function Ce(e,t){return(t?.queryKeyHashFn||z)(e)}function z(e){return JSON.stringify(e,(t,n)=>ae(n)?Object.keys(n).sort().reduce((i,s)=>(i[s]=n[s],i),{}):n)}function B(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>B(e[n],t[n])):!1}var ot=Object.prototype.hasOwnProperty;function ze(e,t){if(e===t)return e;const n=xe(e)&&xe(t);if(!n&&!(ae(e)&&ae(t)))return t;const s=(n?e:Object.keys(e)).length,r=n?t:Object.keys(t),l=r.length,o=n?new Array(l):{};let a=0;for(let d=0;d<l;d++){const g=n?d:r[d],p=e[g],c=t[g];if(p===c){o[g]=p,(n?d<s:ot.call(e,g))&&a++;continue}if(p===null||c===null||typeof p!="object"||typeof c!="object"){o[g]=c;continue}const u=ze(p,c);o[g]=u,u===p&&a++}return s===l&&a===s?e:o}function J(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 xe(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ae(e){if(!Oe(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Oe(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Oe(e){return Object.prototype.toString.call(e)==="[object Object]"}function lt(e){return new Promise(t=>{T.setTimeout(t,e)})}function ce(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?ze(e,t):t}function ut(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function at(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var we=Symbol();function qe(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===we?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function pn(e,t){return typeof e=="function"?e(...t):!!e}var ct=class extends Q{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!U&&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"}},Re=new ct;function de(){let e,t;const n=new Promise((s,r)=>{e=s,t=r});n.status="pending",n.catch(()=>{});function i(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{i({status:"fulfilled",value:s}),e(s)},n.reject=s=>{i({status:"rejected",reason:s}),t(s)},n}var dt=st;function gt(){let e=[],t=0,n=o=>{o()},i=o=>{o()},s=dt;const r=o=>{t?e.push(o):s(()=>{n(o)})},l=()=>{const o=e;e=[],o.length&&s(()=>{i(()=>{o.forEach(a=>{n(a)})})})};return{batch:o=>{let a;t++;try{a=o()}finally{t--,t||l()}return a},batchCalls:o=>(...a)=>{r(()=>{o(...a)})},schedule:r,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{i=o},setScheduler:o=>{s=o}}}var _=gt(),ft=class extends Q{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!U&&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}},Z=new ft;function ht(e){return Math.min(1e3*2**e,3e4)}function Ue(e){return(e??"online")==="online"?Z.isOnline():!0}var ge=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Qe(e){let t=!1,n=0,i;const s=de(),r=()=>s.status!=="pending",l=h=>{if(!r()){const m=new ge(h);c(m),e.onCancel?.(m)}},o=()=>{t=!0},a=()=>{t=!1},d=()=>Re.isFocused()&&(e.networkMode==="always"||Z.isOnline())&&e.canRun(),g=()=>Ue(e.networkMode)&&e.canRun(),p=h=>{r()||(i?.(),s.resolve(h))},c=h=>{r()||(i?.(),s.reject(h))},u=()=>new Promise(h=>{i=m=>{(r()||d())&&h(m)},e.onPause?.()}).then(()=>{i=void 0,r()||e.onContinue?.()}),f=()=>{if(r())return;let h;const m=n===0?e.initialPromise:void 0;try{h=m??e.fn()}catch(v){h=Promise.reject(v)}Promise.resolve(h).then(p).catch(v=>{if(r())return;const w=e.retry??(U?0:3),R=e.retryDelay??ht,F=typeof R=="function"?R(n,v):R,y=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,v);if(t||!y){c(v);return}n++,e.onFail?.(n,v),lt(F).then(()=>d()?void 0:u()).then(()=>{t?c(v):f()})})};return{promise:s,status:()=>s.status,cancel:l,continue:()=>(i?.(),s),cancelRetry:o,continueRetry:a,canStart:g,start:()=>(g()?f():u().then(f),s)}}var je=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ue(this.gcTime)&&(this.#e=T.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(U?1/0:300*1e3))}clearGcTimeout(){this.#e&&(T.clearTimeout(this.#e),this.#e=void 0)}},pt=class extends je{#e;#t;#n;#s;#i;#o;#l;constructor(e){super(),this.#l=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#n=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=De(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=De(this.options);t.data!==void 0&&(this.setState(Ve(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=ce(this.state.data,e,this.options);return this.#r({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#r({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(x).catch(x):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>O(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===we||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>H(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:!Te(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.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.#i&&(this.#l?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#r({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){const o=this.observers.find(a=>a.options.queryFn);o&&this.setOptions(o.options)}const n=new AbortController,i=o=>{Object.defineProperty(o,"signal",{enumerable:!0,get:()=>(this.#l=!0,n.signal)})},s=()=>{const o=qe(this.options,t),d=(()=>{const g={client:this.#s,queryKey:this.queryKey,meta:this.meta};return i(g),g})();return this.#l=!1,this.options.persister?this.options.persister(o,d,this):o(d)},l=(()=>{const o={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:s};return i(o),o})();this.options.behavior?.onFetch(l,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#r({type:"fetch",meta:l.fetchOptions?.meta}),this.#i=Qe({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:o=>{o instanceof ge&&o.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(o,a)=>{this.#r({type:"failed",failureCount:o,error:a})},onPause:()=>{this.#r({type:"pause"})},onContinue:()=>{this.#r({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const o=await this.#i.start();if(o===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(o),this.#n.config.onSuccess?.(o,this),this.#n.config.onSettled?.(o,this.state.error,this),o}catch(o){if(o instanceof ge){if(o.silent)return this.#i.promise;if(o.revert){if(this.state.data===void 0)throw o;return this.state.data}}throw this.#r({type:"error",error:o}),this.#n.config.onError?.(o,this),this.#n.config.onSettled?.(this.state.data,o,this),o}finally{this.scheduleGc()}}#r(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,...ke(n.data,this.options),fetchMeta:e.meta??null};case"success":const i={...n,...Ve(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?i:void 0,i;case"error":const s=e.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),_.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function ke(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ue(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ve(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function De(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var mn=class extends Q{constructor(e,t){super(),this.options=t,this.#e=e,this.#r=null,this.#l=de(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#s=void 0;#i;#o;#l;#r;#p;#g;#f;#a;#c;#u;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Ee(this.#t,this.options)?this.#d():this.updateResult(),this.#C())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return fe(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return fe(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),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 O(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#y(),this.#t.setOptions(this.options),t._defaulted&&!J(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&Ae(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),i&&(this.#t!==n||O(this.options.enabled,this.#t)!==O(t.enabled,this.#t)||H(this.options.staleTime,this.#t)!==H(t.staleTime,this.#t))&&this.#m();const s=this.#v();i&&(this.#t!==n||O(this.options.enabled,this.#t)!==O(t.enabled,this.#t)||s!==this.#u)&&this.#S(s)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return vt(this,n)&&(this.#s=n,this.#o=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#s}trackResult(e,t){return new Proxy(e,{get:(n,i)=>(this.trackProp(i),t?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#l.status==="pending"&&this.#l.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}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.#s))}#d(e){this.#y();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(x)),t}#m(){this.#w();const e=H(this.options.staleTime,this.#t);if(U||this.#s.isStale||!ue(e))return;const n=Te(this.#s.dataUpdatedAt,e)+1;this.#a=T.setTimeout(()=>{this.#s.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.#u=e,!(U||O(this.options.enabled,this.#t)===!1||!ue(this.#u)||this.#u===0)&&(this.#c=T.setInterval(()=>{(this.options.refetchIntervalInBackground||Re.isFocused())&&this.#d()},this.#u))}#C(){this.#m(),this.#S(this.#v())}#w(){this.#a&&(T.clearTimeout(this.#a),this.#a=void 0)}#R(){this.#c&&(T.clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const n=this.#t,i=this.options,s=this.#s,r=this.#i,l=this.#o,a=e!==n?e.state:this.#n,{state:d}=e;let g={...d},p=!1,c;if(t._optimisticResults){const M=this.hasListeners(),q=!M&&Ee(e,t),A=M&&Ae(e,n,t,i);(q||A)&&(g={...g,...ke(d.data,e.options)}),t._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:u,errorUpdatedAt:f,status:h}=g;c=g.data;let m=!1;if(t.placeholderData!==void 0&&c===void 0&&h==="pending"){let M;s?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(M=s.data,m=!0):M=typeof t.placeholderData=="function"?t.placeholderData(this.#f?.state.data,this.#f):t.placeholderData,M!==void 0&&(h="success",c=ce(s?.data,M,t),p=!0)}if(t.select&&c!==void 0&&!m)if(s&&c===r?.data&&t.select===this.#p)c=this.#g;else try{this.#p=t.select,c=t.select(c),c=ce(s?.data,c,t),this.#g=c,this.#r=null}catch(M){this.#r=M}this.#r&&(u=this.#r,c=this.#g,f=Date.now(),h="error");const v=g.fetchStatus==="fetching",w=h==="pending",R=h==="error",F=w&&v,y=c!==void 0,I={status:h,fetchStatus:g.fetchStatus,isPending:w,isSuccess:h==="success",isError:R,isInitialLoading:F,isLoading:F,data:c,dataUpdatedAt:g.dataUpdatedAt,error:u,errorUpdatedAt:f,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>a.dataUpdateCount||g.errorUpdateCount>a.errorUpdateCount,isFetching:v,isRefetching:v&&!w,isLoadingError:R&&!y,isPaused:g.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:R&&y,isStale:ye(e,t),refetch:this.refetch,promise:this.#l,isEnabled:O(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const M=b=>{I.status==="error"?b.reject(I.error):I.data!==void 0&&b.resolve(I.data)},q=()=>{const b=this.#l=I.promise=de();M(b)},A=this.#l;switch(A.status){case"pending":e.queryHash===n.queryHash&&M(A);break;case"fulfilled":(I.status==="error"||I.data!==A.value)&&q();break;case"rejected":(I.status!=="error"||I.error!==A.reason)&&q();break}}return I}updateResult(){const e=this.#s,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#o=this.options,this.#i.data!==void 0&&(this.#f=this.#t),J(t,e))return;this.#s=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!this.#h.size)return!0;const r=new Set(s??this.#h);return this.options.throwOnError&&r.add("error"),Object.keys(this.#s).some(l=>{const o=l;return this.#s[o]!==e[o]&&r.has(o)})};this.#F({listeners:n()})}#y(){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()}#F(e){_.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#s)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function mt(e,t){return O(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ee(e,t){return mt(e,t)||e.state.data!==void 0&&fe(e,t,t.refetchOnMount)}function fe(e,t,n){if(O(t.enabled,e)!==!1&&H(t.staleTime,e)!=="static"){const i=typeof n=="function"?n(e):n;return i==="always"||i!==!1&&ye(e,t)}return!1}function Ae(e,t,n,i){return(e!==t||O(i.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ye(e,n)}function ye(e,t){return O(t.enabled,e)!==!1&&e.isStaleByTime(H(t.staleTime,e))}function vt(e,t){return!J(e.getCurrentResult(),t)}function Le(e){return{onFetch:(t,n)=>{const i=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,r=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let o={pages:[],pageParams:[]},a=0;const d=async()=>{let g=!1;const p=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},c=qe(t.options,t.fetchOptions),u=async(f,h,m)=>{if(g)return Promise.reject();if(h==null&&f.pages.length)return Promise.resolve(f);const w=(()=>{const D={client:t.client,queryKey:t.queryKey,pageParam:h,direction:m?"backward":"forward",meta:t.options.meta};return p(D),D})(),R=await c(w),{maxPages:F}=t.options,y=m?at:ut;return{pages:y(f.pages,R,F),pageParams:y(f.pageParams,h,F)}};if(s&&r.length){const f=s==="backward",h=f?St:He,m={pages:r,pageParams:l},v=h(i,m);o=await u(m,v,f)}else{const f=e??r.length;do{const h=a===0?l[0]??i.initialPageParam:He(i,o);if(a>0&&h==null)break;o=await u(o,h),a++}while(a<f)}return o};t.options.persister?t.fetchFn=()=>t.options.persister?.(d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=d}}}function He(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function St(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Ct=class extends je{#e;#t;#n;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Be(),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.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#i({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=Qe({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(r,l)=>{this.#i({type:"failed",failureCount:r,error:l})},onPause:()=>{this.#i({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",s=!this.#s.canStart();try{if(i)t();else{this.#i({type:"pending",variables:e,isPaused:s}),await this.#n.config.onMutate?.(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#i({type:"pending",context:l,variables:e,isPaused:s})}const r=await this.#s.start();return await this.#n.config.onSuccess?.(r,e,this.state.context,this,n),await this.options.onSuccess?.(r,e,this.state.context,n),await this.#n.config.onSettled?.(r,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(r,null,e,this.state.context,n),this.#i({type:"success",data:r}),r}catch(r){try{throw await this.#n.config.onError?.(r,e,this.state.context,this,n),await this.options.onError?.(r,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,r,e,this.state.context,n),r}finally{this.#i({type:"error",error:r})}}finally{this.#n.runNext(this)}}#i(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),_.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Be(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var wt=class extends Q{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 i=new Ct({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(i),i}add(e){this.#e.add(e);const t=K(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=K(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const i=n.indexOf(e);i!==-1&&n.splice(i,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=K(e);if(typeof t=="string"){const i=this.#t.get(t)?.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){const t=K(e);return typeof t=="string"?this.#t.get(t)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){_.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=>$e(t,n))}findAll(e={}){return this.getAll().filter(t=>$e(e,t))}notify(e){_.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>
vendor: 4,224 bytes, line 1
1t.state.isPaused);return _.batch(()=>Promise.all(e.map(t=>t.continue().catch(x))))}};function K(e){return e.options.scope?.id}var vn=class extends Q{#e;#t=void 0;#n;#s;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#e.defaultMutationOptions(e),J(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&z(t.mutationKey)!==z(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#o(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#o()}mutate(e,t){return this.#s=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){const e=this.#n?.state??Be();this.#t={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#o(e){_.batch(()=>{if(this.#s&&this.hasListeners()){const t=this.#t.variables,n=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};e?.type==="success"?(this.#s.onSuccess?.(e.data,t,n,i),this.#s.onSettled?.(e.data,null,t,n,i)):e?.type==="error"&&(this.#s.onError?.(e.error,t,n,i),this.#s.onSettled?.(void 0,e.error,t,n,i))}this.listeners.forEach(t=>{t(this.#t)})})}},Rt=class extends Q{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const i=t.queryKey,s=t.queryHash??Ce(i,t);let r=this.get(s);return r||(r=new pt({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(r)),r}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(){_.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=>Ie(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Ie(e,n)):t}notify(e){_.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){_.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){_.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Sn=class{#e;#t;#n;#s;#i;#o;#l;#r;constructor(e={}){this.#e=e.queryCache||new Rt,this.#t=e.mutationCache||new wt,this.#n=e.defaultOptions||{},this.#s=new Map,this.#i=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#l=Re.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#r=Z.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#l?.(),this.#l=void 0,this.#r?.(),this.#r=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),i=n.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(H(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),r=this.#e.get(i.queryHash)?.state.data,l=rt(t,r);if(l!==void 0)return this.#e.build(this,i).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return _.batch(()=>this.#e.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;_.batch(()=>
1{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return _.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=_.batch(()=>this.#e.findAll(e).map(s=>s.cancel(n)));return Promise.all(i).then(x).catch(x)}invalidateQueries(e,t={}){return _.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},i=_.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let r=s.fetch(void 0,n);return n.throwOnError||(r=r.catch(x)),s.state.fetchStatus==="paused"?Promise.resolve():r}));return Promise.all(i).then(x)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(H(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(x).catch(x)}fetchInfiniteQuery(e){return e.behavior=Le(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(x).catch(x)}ensureInfiniteQueryData(e){return e.behavior=Le(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Z.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.#s.set(z(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(i=>{B(e,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(z(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(i=>{B(e,i.mutationKey)&&Object.assign(n,i.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=Ce(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===we&&(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()}};function Cn(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function L(e,t){return typeof e=="function"?e(t):e}function $(e,t){return n=>{t.setState(i=>({...i,[e]:L(n,i[e])}))}}function Y(e){return e instanceof Function}function yt(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Ft(e,t){const n=[],i=s=>{s.forEach(r=>{n.push(r);const l=t(r);l!=null&&l.length&&i(l)})};return i(e),n}function S(e,t,n){let i=[],s;return r=>{let l;n.key&&n.debug&&(l=Date.now());const o=e(r);if(!(o.length!==i.length||o.some((g,p)=>i[p]!==g)))return s;i=o;let d;if(n.key&&n.debug&&(d=Date.now()),s=t(...o),n==null||n.onChange==null||n.onChange(s),n.key&&n.debug&&n!=null&&n.debug()){const g=Math.round((Date.now()-l)*100)/100,p=Math.round((Date.now()-d)*100)/100,c=p/16,u=(f,h)=>{for(f=String(f);f.length<h;)f=" "+f;return f};console.info(`%câ± ${u(p,5)} /${u(g,5)} ms`,` 2 font-size: .6rem; 3 font-weight: bold; 4 color: hsl(${Math.max(0,Math.min(120-120*c,120))}deg 100% 31%);`,n?.key)}return s}}function C(e,t,n,i){return{debug:()=>{var s;return(s=e?.debugAll)!=null?s:e[t]},key:!1,onChange:i}}function _t(e,t,n,i){const s=()=>{var l;return(l=r.getValue())!=null?l:e.options.renderFallbackValue},r={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(i),renderValue:s,getContext:S(()=>[e,n,t,r],(l,o,a,d)=>({table:l,column:o,row:a,cell:d,getValue:d.getValue,renderValue:d.renderValue}),C(e.options,"debugCells"))};
vendor: 50,986 bytes, line 4
4return e._features.forEach(l=>{l.createCell==null||l.createCell(r,n,t,e)},{}),r}function Pt(e,t,n,i){var s,r;const o={...e._getDefaultColumnDef(),...t},a=o.accessorKey;let d=(s=(r=o.id)!=null?r:a?typeof String.prototype.replaceAll=="function"?a.replaceAll(".","_"):a.replace(/\./g,"_"):void 0)!=null?s:typeof o.header=="string"?o.header:void 0,g;if(o.accessorFn?g=o.accessorFn:a&&(a.includes(".")?g=c=>{let u=c;for(const h of a.split(".")){var f;u=(f=u)==null?void 0:f[h]}return u}:g=c=>c[o.accessorKey]),!d)throw new Error;let p={id:`${String(d)}`,accessorFn:g,parent:i,depth:n,columnDef:o,columns:[],getFlatColumns:S(()=>[!0],()=>{var c;return[p,...(c=p.columns)==null?void 0:c.flatMap(u=>u.getFlatColumns())]},C(e.options,"debugColumns")),getLeafColumns:S(()=>[e._getOrderColumnsFn()],c=>{var u;if((u=p.columns)!=null&&u.length){let f=p.columns.flatMap(h=>h.getLeafColumns());return c(f)}return[p]},C(e.options,"debugColumns"))};for(const c of e._features)c.createColumn==null||c.createColumn(p,e);return p}const P="debugHeaders";function Ge(e,t,n){var i;let r={id:(i=n.id)!=null?i: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 l=[],o=a=>{a.subHeaders&&a.subHeaders.length&&a.subHeaders.map(o),l.push(a)};return o(r),l},getContext:()=>({table:e,header:r,column:t})};return e._features.forEach(l=>{l.createHeader==null||l.createHeader(r,e)}),r}const Mt={createTable:e=>{e.getHeaderGroups=S(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,s)=>{var r,l;const o=(r=i?.map(p=>n.find(c=>c.id===p)).filter(Boolean))!=null?r:[],a=(l=s?.map(p=>n.find(c=>c.id===p)).filter(Boolean))!=null?l:[],d=n.filter(p=>!(i!=null&&i.includes(p.id))&&!(s!=null&&s.includes(p.id)));return N(t,[...o,...d,...a],e)},C(e.options,P)),e.getCenterHeaderGroups=S(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,s)=>(n=n.filter(r=>!(i!=null&&i.includes(r.id))&&!(s!=null&&s.includes(r.id))),N(t,n,e,"center")),C(e.options,P)),e.getLeftHeaderGroups=S(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,i)=>{var s;const r=(s=i?.map(l=>n.find(o=>o.id===l)).filter(Boolean))!=null?s:[];return N(t,r,e,"left")},C(e.options,P)),e.getRightHeaderGroups=S(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,i)=>{var s;const r=(s=i?.map(l=>n.find(o=>o.id===l)).filter(Boolean))!=null?s:[];return N(t,r,e,"right")},C(e.options,P)),e.getFooterGroups=S(()=>[e.getHeaderGroups()],t=>[...t].reverse(),C(e.options,P)),e.getLeftFooterGroups=S(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),C(e.options,P)),e.getCenterFooterGroups=S(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),C(e.options,P)),e.getRightFooterGroups=S(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),C(e.options,P)),e.getFlatHeaders=S(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),C(e.options,P)),e.getLeftFlatHeaders=S(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),C(e.options,P)),e.getCenterFlatHeaders=S(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),C(e.options,P)),e.getRightFlatHeaders=S(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),C(e.options,P)),e.getCenterLeafHeaders=S(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),C(e.options,P)),e.getLeftLeafHeaders=S(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),C(e.options,P)),e.getRightLeafHeaders=S(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),C(e.options,P)),e.getLeafHeaders=S(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,i)=>{var s,r,l,o,a,d;return[...(s=(r=t[0])==null?void 0:r.headers)!=null?s:[],...(l=(o=n[0])==null?void 0:o.headers)!=null?l:[],...(a=(d=i[0])==null?void 0:d.headers)!=null?a:[]].map(g=>g.getLeafHeaders()).flat()},C(e.options,P))}};function N(e,t,n,i){var s,r;let l=0;const o=function(c,u){u===void 0&&(u=1),l=Math.max(l,u),c.filter(f=>f.getIsVisible()).forEach(f=>{var h;(h=f.columns)!=null&&h.length&&o(f.columns,u+1)},0)};o(e);let a=[];const d=(c,u)=>{const f={depth:u,id:[i,`${u}`].filter(Boolean).join("_"),headers:[]},h=[];c.forEach(m=>{const v=[...h].reverse()[0],w=m.column.depth===f.depth;let R,F=!1;if(w&&m.column.parent?R=m.column.parent:(R=m.column,F=!0),v&&v?.column===R)v.subHeaders.push(m);else{const y=Ge(n,R,{id:[i,u,R.id,m?.id].filter(Boolean).join("_"),isPlaceholder:F,placeholderId:F?`${h.filter(D=>D.column===R).length}`:void 0,depth:u,index:h.length});y.subHeaders.push(m),h.push(y)}f.headers.push(m),m.headerGroup=f}),a.push(f),u>0&&d(h,u-1)},g=t.map((c,u)=>Ge(n,c,{depth:l,index:u}));d(g,l-1),a.reverse();const p=c=>c.filter(f=>f.column.getIsVisible()).map(f=>{let h=0,m=0,v=[0];f.subHeaders&&f.subHeaders.length?(v=[],p(f.subHeaders).forEach(R=>{let{colSpan:F,rowSpan:y}=R;h+=F,v.push(y)})):h=1;const w=Math.min(...v);return m=m+w,f.colSpan=h,f.rowSpan=m,{colSpan:h,rowSpan:m}});return p((s=(r=a[0])==null?void 0:r.headers)!=null?s:[]),a}const Fe=(e,t,n,i,s,r,l)=>{let o={id:t,index:i,original:n,depth:s,parentId:l,_valuesCache:{},_uniqueValuesCache:{},getValue:a=>{if(o._valuesCache.hasOwnProperty(a))return o._valuesCache[a];const d=e.getColumn(a);if(d!=null&&d.accessorFn)return o._valuesCache[a]=d.accessorFn(o.original,i),o._valuesCache[a]},getUniqueValues:a=>{if(o._uniqueValuesCache.hasOwnProperty(a))return o._uniqueValuesCache[a];const d=e.getColumn(a);if(d!=null&&d.accessorFn)return d.columnDef.getUniqueValues?(o._uniqueValuesCache[a]=d.columnDef.getUniqueValues(o.original,i),o._uniqueValuesCache[a]):(o._uniqueValuesCache[a]=[o.getValue(a)],o._uniqueValuesCache[a])},renderValue:a=>{var d;return(d=o.getValue(a))!=null?d:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Ft(o.subRows,a=>a.subRows),getParentRow:()=>o.parentId?e.getRow(o.parentId,!0):void 0,getParentRows:()=>{let a=[],d=o;for(;;){const g=d.getParentRow();if(!g)break;a.push(g),d=g}return a.reverse()},getAllCells:S(()=>[e.getAllLeafColumns()],a=>a.map(d=>_t(e,o,d,d.id)),C(e.options,"debugRows")),_getAllCellsByColumnId:S(()=>[o.getAllCells()],a=>a.reduce((d,g)=>(d[g.column.id]=g,d),{}),C(e.options,"debugRows"))};for(let a=0;a<e._features.length;a++){const d=e._features[a];d==null||d.createRow==null||d.createRow(o,e)}return o},It={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()}}},Ke=(e,t,n)=>{var i,s;const r=n==null||(i=n.toString())==null?void 0:i.toLowerCase();return!!(!((s=e.getValue(t))==null||(s=s.toString())==null||(s=s.toLowerCase())==null)&&s.includes(r))};Ke.autoRemove=e=>V(e);const Ne=(e,t,n)=>{var i;return!!(!((i=e.getValue(t))==null||(i=i.toString())==null)&&i.includes(n))};Ne.autoRemove=e=>V(e);const Xe=(e,t,n)=>{var i;return((i=e.getValue(t))==null||(i=i.toString())==null?void 0:i.toLowerCase())===n?.toLowerCase()};Xe.autoRemove=e=>V(e);const We=(e,t,n)=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(n)};We.autoRemove=e=>V(e);const Je=(e,t,n)=>!n.some(i=>{var s;return!((s=e.getValue(t))!=null&&s.includes(i))});Je.autoRemove=e=>V(e)||!(e!=null&&e.length);const Ze=(e,t,n)=>n.some(i=>{var s;return(s=e.getValue(t))==null?void 0:s.includes(i)});Ze.autoRemove=e=>V(e)||!(e!=null&&e.length);const Ye=(e,t,n)=>e.getValue(t)===n;Ye.autoRemove=e=>V(e);const et=(e,t,n)=>e.getValue(t)==n;et.autoRemove=e=>V(e);const _e=(e,t,n)=>{let[i,s]=n;const r=e.getValue(t);return r>=i&&r<=s};_e.resolveFilterValue=e=>{let[t,n]=e,i=typeof t!="number"?parseFloat(t):t,s=typeof n!="number"?parseFloat(n):n,r=t===null||Number.isNaN(i)?-1/0:i,l=n===null||Number.isNaN(s)?1/0:s;if(r>l){const o=r;r=l,l=o}return[r,l]};_e.autoRemove=e=>V(e)||V(e[0])&&V(e[1]);const E={includesString:Ke,includesStringSensitive:Ne,equalsString:Xe,arrIncludes:We,arrIncludesAll:Je,arrIncludesSome:Ze,equals:Ye,weakEquals:et,inNumberRange:_e};function V(e){return e==null||e===""}const $t={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:$("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n?.getValue(e.id);return typeof i=="string"?E.includesString:typeof i=="number"?E.inNumberRange:typeof i=="boolean"||i!==null&&typeof i=="object"?E.equals:Array.isArray(i)?E.arrIncludes:E.weakEquals},e.getFilterFn=()=>{var n,i;return Y(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(i=t.options.filterFns)==null?void 0:i[e.columnDef.filterFn])!=null?n:E[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,i,s;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((i=t.options.enableColumnFilters)!=null?i:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(i=>i.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,i;return(n=(i=t.getState().columnFilters)==null?void 0:i.findIndex(s=>s.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(i=>{const s=e.getFilterFn(),r=i?.find(g=>g.id===e.id),l=L(n,r?r.value:void 0);if(be(s,l,e)){var o;return(o=i?.filter(g=>g.id!==e.id))!=null?o:[]}const a={id:e.id,value:l};if(r){var d;return(d=i?.map(g=>g.id===e.id?a:g))!=null?d:[]}return i!=null&&i.length?[...i,a]:[a]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),i=s=>{var r;return(r=L(t,s))==null?void 0:r.filter(l=>{const o=n.find(a=>a.id===l.id);if(o){const a=o.getFilterFn();if(be(a,l.value,o))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(i)},e.resetColumnFilters=t=>{var n,i;e.setColumnFilters(t?[]:(n=(i=e.initialState)==null?void 0:i.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 be(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const xt=(e,t,n)=>n.reduce((i,s)=>{const r=s.getValue(e);return i+(typeof r=="number"?r:0)},0),Ot=(e,t,n)=>{let i;return n.forEach(s=>{const r=s.getValue(e);r!=null&&(i>r||i===void 0&&r>=r)&&(i=r)}),i},Vt=(e,t,n)=>{let i;return n.forEach(s=>{const r=s.getValue(e);r!=null&&(i<r||i===void 0&&r>=r)&&(i=r)}),i},Dt=(e,t,n)=>{let i,s;return n.forEach(r=>{const l=r.getValue(e);l!=null&&(i===void 0?l>=l&&(i=s=l):(i>l&&(i=l),s<l&&(s=l)))}),[i,s]},Et=(e,t)=>{let n=0,i=0;if(t.forEach(s=>{let r=s.getValue(e);r!=null&&(r=+r)>=r&&(++n,i+=r)}),n)return i/n},At=(e,t)=>{if(!t.length)return;const n=t.map(r=>r.getValue(e));if(!yt(n))return;if(n.length===1)return n[0];const i=Math.floor(n.length/2),s=n.sort((r,l)=>r-l);return n.length%2!==0?s[i]:(s[i-1]+s[i])/2},Lt=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Ht=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,Gt=(e,t)=>t.length,ee={sum:xt,min:Ot,max:Vt,extent:Dt,mean:Et,median:At,unique:Lt,uniqueCount:Ht,count:Gt},bt={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:$("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(i=>i!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,i;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((i=t.options.enableGrouping)!=null?i:!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],i=n?.getValue(e.id);if(typeof i=="number")return ee.sum;if(Object.prototype.toString.call(i)==="[object Date]")return ee.extent},e.getAggregationFn=()=>{var n,i;if(!e)throw new Error;return Y(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(i=t.options.aggregationFns)==null?void 0:i[e.columnDef.aggregationFn])!=null?n:ee[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,i;e.setGrouping(t?[]:(n=(i=e.initialState)==null?void 0:i.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 i=t.getColumn(n);return i!=null&&i.columnDef.getGroupingValue?(e._groupingValuesCache[n]=i.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,i)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var s;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((s=n.subRows)!=null&&s.length)}}};function Tt(e,t,n){if(!(t!=null&&t.length)||!n)return e;const i=e.filter(r=>!t.includes(r.id));return n==="remove"?i:[...t.map(r=>e.find(l=>l.id===r)).filter(Boolean),...i]}const zt={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:$("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=S(n=>[k(t,n)],n=>n.findIndex(i=>i.id===e.id),C(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var i;return((i=k(t,n)[0])==null?void 0:i.id)===e.id},e.getIsLastColumn=n=>{var i;const s=k(t,n);return((i=s[s.length-1])==null?void 0:i.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=S(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,i)=>s=>{let r=[];if(!(t!=null&&t.length))r=s;else{const l=[...t],o=[...s];for(;o.length&&l.length;){const a=l.shift(),d=o.findIndex(g=>g.id===a);d>-1&&r.push(o.splice(d,1)[0])}r=[...r,...o]}return Tt(r,n,i)},C(e.options,"debugTable"))}},te=()=>({left:[],right:[]}),qt={getInitialState:e=>({columnPinning:te(),...e}),getDefaultOptions:e=>({onColumnPinningChange:$("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const i=e.getLeafColumns().map(s=>s.id).filter(Boolean);t.setColumnPinning(s=>{var r,l;if(n==="right"){var o,a;return{left:((o=s?.left)!=null?o:[]).filter(p=>!(i!=null&&i.includes(p))),right:[...((a=s?.right)!=null?a:[]).filter(p=>!(i!=null&&i.includes(p))),...i]}}if(n==="left"){var d,g;return{left:[...((d=s?.left)!=null?d:[]).filter(p=>!(i!=null&&i.includes(p))),...i],right:((g=s?.right)!=null?g:[]).filter(p=>!(i!=null&&i.includes(p)))}}return{left:((r=s?.left)!=null?r:[]).filter(p=>!(i!=null&&i.includes(p))),right:((l=s?.right)!=null?l:[]).filter(p=>!(i!=null&&i.includes(p)))}})},e.getCanPin=()=>e.getLeafColumns().some(i=>{var s,r,l;return((s=i.columnDef.enablePinning)!=null?s:!0)&&((r=(l=t.options.enableColumnPinning)!=null?l:t.options.enablePinning)!=null?r:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(o=>o.id),{left:i,right:s}=t.getState().columnPinning,r=n.some(o=>i?.includes(o)),l=n.some(o=>s?.includes(o));return r?"left":l?"right":!1},e.getPinnedIndex=()=>{var n,i;const s=e.getIsPinned();return s?(n=(i=t.getState().columnPinning)==null||(i=i[s])==null?void 0:i.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=S(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,i,s)=>{const r=[...i??[],...s??[]];return n.filter(l=>!r.includes(l.column.id))},C(t.options,"debugRows")),e.getLeftVisibleCells=S(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,i)=>(i??[]).map(r=>n.find(l=>l.column.id===r)).filter(Boolean).map(r=>({...r,position:"left"})),C(t.options,"debugRows")),e.getRightVisibleCells=S(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,i)=>(i??[]).map(r=>n.find(l=>l.column.id===r)).filter(Boolean).map(r=>({...r,position:"right"})),C(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,i;return e.setColumnPinning(t?te():(n=(i=e.initialState)==null?void 0:i.columnPinning)!=null?n:te())},e.getIsSomeColumnsPinned=t=>{var n;const i=e.getState().columnPinning;if(!t){var s,r;return!!((s=i.left)!=null&&s.length||(r=i.right)!=null&&r.length)}return!!((n=i[t])!=null&&n.length)},e.getLeftLeafColumns=S(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(i=>t.find(s=>s.id===i)).filter(Boolean),C(e.options,"debugColumns")),e.getRightLeafColumns=S(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(i=>t.find(s=>s.id===i)).filter(Boolean),C(e.options,"debugColumns")),e.getCenterLeafColumns=S(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i)=>{const s=[...n??[],...i??[]];return t.filter(r=>!s.includes(r.id))},C(e.options,"debugColumns"))}};function Ut(e){return e||(typeof document<"u"?document:null)}const X={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},ne=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Qt={getDefaultColumnDef:()=>X,getInitialState:e=>({columnSizing:{},columnSizingInfo:ne(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:$("columnSizing",e),onColumnSizingInfoChange:$("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,i,s;const r=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:X.minSize,(i=r??e.columnDef.size)!=null?i:X.size),(s=e.columnDef.maxSize)!=null?s:X.maxSize)},e.getStart=S(n=>[n,k(t,n),t.getState().columnSizing],(n,i)=>i.slice(0,e.getIndex(n)).reduce((s,r)=>s+r.getSize(),0),C(t.options,"debugColumns")),e.getAfter=S(n=>[n,k(t,n),t.getState().columnSizing],(n,i)=>i.slice(e.getIndex(n)+1).reduce((s,r)=>s+r.getSize(),0),C(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:i,...s}=n;return s})},e.getCanResize=()=>{var n,i;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((i=t.options.enableColumnResizing)!=null?i:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const i=s=>{if(s.subHeaders.length)s.subHeaders.forEach(i);else{var r;n+=(r=s.column.getSize())!=null?r:0}};return i(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 i=t.getColumn(e.column.id),s=i?.getCanResize();return r=>{if(!i||!s||(r.persist==null||r.persist(),ie(r)&&r.touches&&r.touches.length>1))return;const l=e.getSize(),o=e?e.getLeafHeaders().map(v=>[v.column.id,v.column.getSize()]):[[i.id,i.getSize()]],a=ie(r)?Math.round(r.touches[0].clientX):r.clientX,d={},g=(v,w)=>{typeof w=="number"&&(t.setColumnSizingInfo(R=>{var F,y;const D=t.options.columnResizeDirection==="rtl"?-1:1,I=(w-((F=R?.startOffset)!=null?F:0))*D,M=Math.max(I/((y=R?.startSize)!=null?y:0),-.999999);return R.columnSizingStart.forEach(q=>{let[A,b]=q;d[A]=Math.round(Math.max(b+b*M,0)*100)/100}),{...R,deltaOffset:I,deltaPercentage:M}}),(t.options.columnResizeMode==="onChange"||v==="end")&&t.setColumnSizing(R=>({...R,...d})))},p=v=>g("move",v),c=v=>{g("end",v),t.setColumnSizingInfo(w=>({...w,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},u=Ut(n),f={moveHandler:v=>p(v.clientX),upHandler:v=>{u?.removeEventListener("mousemove",f.moveHandler),u?.removeEventListener("mouseup",f.upHandler),c(v.clientX)}},h={moveHandler:v=>(v.cancelable&&(v.preventDefault(),v.stopPropagation()),p(v.touches[0].clientX),!1),upHandler:v=>{var w;u?.removeEventListener("touchmove",h.moveHandler),u?.removeEventListener("touchend",h.upHandler),v.cancelable&&(v.preventDefault(),v.stopPropagation()),c((w=v.touches[0])==null?void 0:w.clientX)}},m=jt()?{passive:!1}:!1;ie(r)?(u?.addEventListener("touchmove",h.moveHandler,m),u?.addEventListener("touchend",h.upHandler,m)):(u?.addEventListener("mousemove",f.moveHandler,m),u?.addEventListener("mouseup",f.upHandler,m)),t.setColumnSizingInfo(v=>({...v,startOffset:a,startSize:l,deltaOffset:0,deltaPercentage:0,columnSizingStart:o,isResizingColumn:i.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?ne():(n=e.initialState.columnSizingInfo)!=null?n:ne())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0}}};let W=null;function jt(){if(typeof W=="boolean")return W;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 W=e,W}function ie(e){return e.type==="touchstart"}const kt={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:$("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(i=>({...i,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,i;const s=e.columns;return(n=s.length?s.some(r=>r.getIsVisible()):(i=t.getState().columnVisibility)==null?void 0:i[e.id])!=null?n:!0},e.getCanHide=()=>{var n,i;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((i=t.options.enableHiding)!=null?i:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=S(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(i=>i.column.getIsVisible()),C(t.options,"debugRows")),e.getVisibleCells=S(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,i,s)=>[...n,...i,...s],C(t.options,"debugRows"))},createTable:e=>{const t=(n,i)=>S(()=>[i(),i().filter(s=>s.getIsVisible()).map(s=>s.id).join("_")],s=>s.filter(r=>r.getIsVisible==null?void 0:r.getIsVisible()),C(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 i;e.setColumnVisibility(n?{}:(i=e.initialState.columnVisibility)!=null?i:{})},e.toggleAllColumnsVisible=n=>{var i;n=(i=n)!=null?i:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((s,r)=>({...s,[r.id]:n||!(r.getCanHide!=null&&r.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 i;e.toggleAllColumnsVisible((i=n.target)==null?void 0:i.checked)}}};function k(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Bt={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()}}},Kt={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:$("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const i=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof i=="string"||typeof i=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,i,s,r;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((i=t.options.enableGlobalFilter)!=null?i:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&((r=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?r:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>E.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:i}=e.options;return Y(i)?i:i==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[i])!=null?t:E[i]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Nt={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:$("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var i,s;if(!t){e._queue(()=>{t=!0});return}if((i=(s=e.options.autoResetAll)!=null?s:e.options.autoResetExpanded)!=null?i:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=i=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(i),e.toggleAllRowsExpanded=i=>{i??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=i=>{var s,r;e.setExpanded(i?{}:(s=(r=e.initialState)==null?void 0:r.expanded)!=null?s:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(i=>i.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>i=>{i.persist==null||i.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const i=e.getState().expanded;return i===!0||Object.values(i).some(Boolean)},e.getIsAllRowsExpanded=()=>{const i=e.getState().expanded;return typeof i=="boolean"?i===!0:!(!Object.keys(i).length||e.getRowModel().flatRows.some(s=>!s.getIsExpanded()))},e.getExpandedDepth=()=>{let i=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(r=>{const l=r.split(".");i=Math.max(i,l.length)}),i},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(i=>{var s;const r=i===!0?!0:!!(i!=null&&i[e.id]);let l={};if(i===!0?Object.keys(t.getRowModel().rowsById).forEach(o=>{l[o]=!0}):l=i,n=(s=n)!=null?s:!r,!r&&n)return{...l,[e.id]:!0};if(r&&!n){const{[e.id]:o,...a}=l;return a}return i})},e.getIsExpanded=()=>{var n;const i=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:i===!0||i?.[e.id])},e.getCanExpand=()=>{var n,i,s;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((i=t.options.enableExpanding)!=null?i:!0)&&!!((s=e.subRows)!=null&&s.length)},e.getIsAllParentsExpanded=()=>{let n=!0,i=e;for(;n&&i.parentId;)i=t.getRow(i.parentId,!0),n=i.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},he=0,pe=10,se=()=>({pageIndex:he,pageSize:pe}),Xt={getInitialState:e=>({...e,pagination:{...se(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:$("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var i,s;if(!t){e._queue(()=>{t=!0});return}if((i=(s=e.options.autoResetAll)!=null?s:e.options.autoResetPageIndex)!=null?i:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=i=>{const s=r=>L(i,r);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(s)},e.resetPagination=i=>{var s;e.setPagination(i?se():(s=e.initialState.pagination)!=null?s:se())},e.setPageIndex=i=>{e.setPagination(s=>{let r=L(i,s.pageIndex);const l=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,l)),{...s,pageIndex:r}})},e.resetPageIndex=i=>{var s,r;e.setPageIndex(i?he:(s=(r=e.initialState)==null||(r=r.pagination)==null?void 0:r.pageIndex)!=null?s:he)},e.resetPageSize=i=>{var s,r;e.setPageSize(i?pe:(s=(r=e.initialState)==null||(r=r.pagination)==null?void 0:r.pageSize)!=null?s:pe)},e.setPageSize=i=>{e.setPagination(s=>{const r=Math.max(1,L(i,s.pageSize)),l=s.pageSize*s.pageIndex,o=Math.floor(l/r);return{...s,pageIndex:o,pageSize:r}})},e.setPageCount=i=>e.setPagination(s=>{var r;let l=L(i,(r=e.options.pageCount)!=null?r:-1);return typeof l=="number"&&(l=Math.max(-1,l)),{...s,pageCount:l}}),e.getPageOptions=S(()=>[e.getPageCount()],i=>{let s=[];return i&&i>0&&(s=[...new Array(i)].fill(null).map((r,l)=>l)),s},C(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:i}=e.getState().pagination,s=e.getPageCount();return s===-1?!0:s===0?!1:i<s-1},e.previousPage=()=>e.setPageIndex(i=>i-1),e.nextPage=()=>e.setPageIndex(i=>i+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 i;return(i=e.options.pageCount)!=null?i:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var i;return(i=e.options.rowCount)!=null?i:e.getPrePaginationRowModel().rows.length}}},re=()=>({top:[],bottom:[]}),Wt={getInitialState:e=>({rowPinning:re(),...e}),getDefaultOptions:e=>({onRowPinningChange:$("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,i,s)=>{const r=i?e.getLeafRows().map(a=>{let{id:d}=a;return d}):[],l=s?e.getParentRows().map(a=>{let{id:d}=a;return d}):[],o=new Set([...l,e.id,...r]);t.setRowPinning(a=>{var d,g;if(n==="bottom"){var p,c;return{top:((p=a?.top)!=null?p:[]).filter(h=>!(o!=null&&o.has(h))),bottom:[...((c=a?.bottom)!=null?c:[]).filter(h=>!(o!=null&&o.has(h))),...Array.from(o)]}}if(n==="top"){var u,f;return{top:[...((u=a?.top)!=null?u:[]).filter(h=>!(o!=null&&o.has(h))),...Array.from(o)],bottom:((f=a?.bottom)!=null?f:[]).filter(h=>!(o!=null&&o.has(h)))}}return{top:((d=a?.top)!=null?d:[]).filter(h=>!(o!=null&&o.has(h))),bottom:((g=a?.bottom)!=null?g:[]).filter(h=>!(o!=null&&o.has(h)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:i,enablePinning:s}=t.options;return typeof i=="function"?i(e):(n=i??s)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:i,bottom:s}=t.getState().rowPinning,r=n.some(o=>i?.includes(o)),l=n.some(o=>s?.includes(o));return r?"top":l?"bottom":!1},e.getPinnedIndex=()=>{var n,i;const s=e.getIsPinned();if(!s)return-1;const r=(n=s==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(l=>{let{id:o}=l;return o});return(i=r?.indexOf(e.id))!=null?i:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,i;return e.setRowPinning(t?re():(n=(i=e.initialState)==null?void 0:i.rowPinning)!=null?n:re())},e.getIsSomeRowsPinned=t=>{var n;const i=e.getState().rowPinning;if(!t){var s,r;return!!((s=i.top)!=null&&s.length||(r=i.bottom)!=null&&r.length)}return!!((n=i[t])!=null&&n.length)},e._getPinnedRows=(t,n,i)=>{var s;return((s=e.options.keepPinnedRows)==null||s?(n??[]).map(l=>{const o=e.getRow(l,!0);return o.getIsAllParentsExpanded()?o:null}):(n??[]).map(l=>t.find(o=>o.id===l))).filter(Boolean).map(l=>({...l,position:i}))},e.getTopRows=S(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),C(e.options,"debugRows")),e.getBottomRows=S(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),C(e.options,"debugRows")),e.getCenterRows=S(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,i)=>{const s=new Set([...n??[],...i??[]]);return t.filter(r=>!s.has(r.id))},C(e.options,"debugRows"))}},Jt={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:$("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 i={...n},s=e.getPreGroupedRowModel().flatRows;return t?s.forEach(r=>{r.getCanSelect()&&(i[r.id]=!0)}):s.forEach(r=>{delete i[r.id]}),i})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const i=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),s={...n};return e.getRowModel().rows.forEach(r=>{me(s,r.id,i,!0,e)}),s}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=S(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?oe(e,n):{rows:[],flatRows:[],rowsById:{}},C(e.options,"debugTable")),e.getFilteredSelectedRowModel=S(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?oe(e,n):{rows:[],flatRows:[],rowsById:{}},C(e.options,"debugTable")),e.getGroupedSelectedRowModel=S(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?oe(e,n):{rows:[],flatRows:[],rowsById:{}},C(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let i=!!(t.length&&Object.keys(n).length);return i&&t.some(s=>s.getCanSelect()&&!n[s.id])&&(i=!1),i},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(s=>s.getCanSelect()),{rowSelection:n}=e.getState();let i=!!t.length;return i&&t.some(s=>!n[s.id])&&(i=!1),i},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,i)=>{const s=e.getIsSelected();t.setRowSelection(r=>{var l;if(n=typeof n<"u"?n:!s,e.getCanSelect()&&s===n)return r;const o={...r};return me(o,e.id,n,(l=i?.selectChildren)!=null?l:!0,t),o})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Pe(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return ve(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return ve(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 i=>{var s;n&&e.toggleSelected((s=i.target)==null?void 0:s.checked)}}}},me=(e,t,n,i,s)=>{var r;const l=s.getRow(t,!0);n?(l.getCanMultiSelect()||Object.keys(e).forEach(o=>delete e[o]),l.getCanSelect()&&(e[t]=!0)):delete e[t],i&&(r=l.subRows)!=null&&r.length&&l.getCanSelectSubRows()&&l.subRows.forEach(o=>me(e,o.id,n,i,s))};function oe(e,t){const n=e.getState().rowSelection,i=[],s={},r=function(l,o){return l.map(a=>{var d;const g=Pe(a,n);if(g&&(i.push(a),s[a.id]=a),(d=a.subRows)!=null&&d.length&&(a={...a,subRows:r(a.subRows)}),g)return a}).filter(Boolean)};return{rows:r(t.rows),flatRows:i,rowsById:s}}function Pe(e,t){var n;return(n=t[e.id])!=null?n:!1}function ve(e,t,n){var i;if(!((i=e.subRows)!=null&&i.length))return!1;let s=!0,r=!1;return e.subRows.forEach(l=>{if(!(r&&!s)&&(l.getCanSelect()&&(Pe(l,t)?r=!0:s=!1),l.subRows&&l.subRows.length)){const o=ve(l,t);o==="all"?r=!0:(o==="some"&&(r=!0),s=!1)}}),s?"all":r?"some":!1}const Se=/([0-9]+)/gm,Zt=(e,t,n)=>tt(G(e.getValue(n)).toLowerCase(),G(t.getValue(n)).toLowerCase()),Yt=(e,t,n)=>tt(G(e.getValue(n)),G(t.getValue(n))),en=(e,t,n)=>Me(G(e.getValue(n)).toLowerCase(),G(t.getValue(n)).toLowerCase()),tn=(e,t,n)=>Me(G(e.getValue(n)),G(t.getValue(n))),nn=(e,t,n)=>{const i=e.getValue(n),s=t.getValue(n);return i>s?1:i<s?-1:0},sn=(e,t,n)=>Me(e.getValue(n),t.getValue(n));function Me(e,t){return e===t?0:e>t?1:-1}function G(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function tt(e,t){const n=e.split(Se).filter(Boolean),i=t.split(Se).filter(Boolean);for(;n.length&&i.length;){const s=n.shift(),r=i.shift(),l=parseInt(s,10),o=parseInt(r,10),a=[l,o].sort();if(isNaN(a[0])){if(s>r)return 1;if(r>s)return-1;continue}if(isNaN(a[1]))return isNaN(l)?-1:1;if(l>o)return 1;if(o>l)return-1}return n.length-i.length}const j={alphanumeric:Zt,alphanumericCaseSensitive:Yt,text:en,textCaseSensitive:tn,datetime:nn,basic:sn},rn={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:$("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let i=!1;for(const s of n){const r=s?.getValue(e.id);if(Object.prototype.toString.call(r)==="[object Date]")return j.datetime;if(typeof r=="string"&&(i=!0,r.split(Se).length>1))return j.alphanumeric}return i?j.text:j.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,i;if(!e)throw new Error;return Y(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(i=t.options.sortingFns)==null?void 0:i[e.columnDef.sortingFn])!=null?n:j[e.columnDef.sortingFn]},e.toggleSorting=(n,i)=>{const s=e.getNextSortingOrder(),r=typeof n<"u"&&n!==null;t.setSorting(l=>{const o=l?.find(u=>u.id===e.id),a=l?.findIndex(u=>u.id===e.id);let d=[],g,p=r?n:s==="desc";if(l!=null&&l.length&&e.getCanMultiSort()&&i?o?g="toggle":g="add":l!=null&&l.length&&a!==l.length-1?g="replace":o?g="toggle":g="replace",g==="toggle"&&(r||s||(g="remove")),g==="add"){var c;d=[...l,{id:e.id,desc:p}],d.splice(0,d.length-((c=t.options.maxMultiSortColCount)!=null?c:Number.MAX_SAFE_INTEGER))}else g==="toggle"?d=l.map(u=>u.id===e.id?{...u,desc:p}:u):g==="remove"?d=l.filter(u=>u.id!==e.id):d=[{id:e.id,desc:p}];return d})},e.getFirstSortDir=()=>{var n,i;return((n=(i=e.columnDef.sortDescFirst)!=null?i:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var i,s;const r=e.getFirstSortDir(),l=e.getIsSorted();return l?l!==r&&((i=t.options.enableSortingRemoval)==null||i)&&(!(n&&(s=t.options.enableMultiRemove)!=null)||s)?!1:l==="desc"?"asc":"desc":r},e.getCanSort=()=>{var n,i;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((i=t.options.enableSorting)!=null?i:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,i;return(n=(i=e.columnDef.enableMultiSort)!=null?i:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const i=(n=t.getState().sorting)==null?void 0:n.find(s=>s.id===e.id);return i?i.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,i;return(n=(i=t.getState().sorting)==null?void 0:i.findIndex(s=>s.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(i=>i.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return i=>{n&&(i.persist==null||i.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(i):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,i;e.setSorting(t?[]:(n=(i=e.initialState)==null?void 0:i.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())}},on=[Mt,kt,zt,qt,It,$t,Bt,Kt,rn,bt,Nt,Xt,Wt,Jt,Qt];function ln(e){var t,n;const i=[...on,...(t=e._features)!=null?t:[]];let s={_features:i};const r=s._features.reduce((c,u)=>Object.assign(c,u.getDefaultOptions==null?void 0:u.getDefaultOptions(s)),{}),l=c=>s.options.mergeOptions?s.options.mergeOptions(r,c):{...r,...c};let a={...{},...(n=e.initialState)!=null?n:{}};s._features.forEach(c=>{var u;a=(u=c.getInitialState==null?void 0:c.getInitialState(a))!=null?u:a});const d=[];let g=!1;const p={_features:i,options:{...r,...e},initialState:a,_queue:c=>{d.push(c),g||(g=!0,Promise.resolve().then(()=>{for(;d.length;)d.shift()();g=!1}).catch(u=>setTimeout(()=>{throw u})))},reset:()=>{s.setState(s.initialState)},setOptions:c=>{const u=L(c,s.options);s.options=l(u)},getState:()=>s.options.state,setState:c=>{s.options.onStateChange==null||s.options.onStateChange(c)},_getRowId:(c,u,f)=>{var h;return(h=s.options.getRowId==null?void 0:s.options.getRowId(c,u,f))!=null?h:`${f?[f.id,u].join("."):u}`},getCoreRowModel:()=>(s._getCoreRowModel||(s._getCoreRowModel=s.options.getCoreRowModel(s)),s._getCoreRowModel()),getRowModel:()=>s.getPaginationRowModel(),getRow:(c,u)=>{let f=(u?s.getPrePaginationRowModel():s.getRowModel()).rowsById[c];if(!f&&(f=s.getCoreRowModel().rowsById[c],!f))throw new Error;return f},_getDefaultColumnDef:S(()=>[s.options.defaultColumn],c=>{var u;return c=(u=c)!=null?u:{},{header:f=>{const h=f.header.column.columnDef;return h.accessorKey?h.accessorKey:h.accessorFn?h.id:null},cell:f=>{var h,m;return(h=(m=f.renderValue())==null||m.toString==null?void 0:m.toString())!=null?h:null},...s._features.reduce((f,h)=>Object.assign(f,h.getDefaultColumnDef==null?void 0:h.getDefaultColumnDef()),{}),...c}},C(e,"debugColumns")),_getColumnDefs:()=>s.options.columns,getAllColumns:S(()=>[s._getColumnDefs()],c=>{const u=function(f,h,m){return m===void 0&&(m=0),f.map(v=>{const w=Pt(s,v,m,h),R=v;return w.columns=R.columns?u(R.columns,w,m+1):[],w})};return u(c)},C(e,"debugColumns")),getAllFlatColumns:S(()=>[s.getAllColumns()],c=>c.flatMap(u=>u.getFlatColumns()),C(e,"debugColumns")),_getAllFlatColumnsById:S(()=>[s.getAllFlatColumns()],c=>c.reduce((u,f)=>(u[f.id]=f,u),{}),C(e,"debugColumns")),getAllLeafColumns:S(()=>[s.getAllColumns(),s._getOrderColumnsFn()],(c,u)=>{let f=c.flatMap(h=>h.getLeafColumns());return u(f)},C(e,"debugColumns")),getColumn:c=>s._getAllFlatColumnsById()[c]};Object.assign(s,p);for(let c=0;c<s._features.length;c++){const u=s._features[c];u==null||u.createTable==null||u.createTable(s)}return s}function wn(){return e=>S(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},i=function(s,r,l){r===void 0&&(r=0);const o=[];for(let d=0;d<s.length;d++){const g=Fe(e,e._getRowId(s[d],d,l),s[d],d,r,void 0,l?.id);if(n.flatRows.push(g),n.rowsById[g.id]=g,o.push(g),e.options.getSubRows){var a;g.originalSubRows=e.options.getSubRows(s[d],d),(a=g.originalSubRows)!=null&&a.length&&(g.subRows=i(g.originalSubRows,r+1,g))}}return o};return n.rows=i(t),n},C(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function un(e,t,n){return n.options.filterFromLeafRows?an(e,t,n):cn(e,t,n)}function an(e,t,n){var i;const s=[],r={},l=(i=n.options.maxLeafRowFilterDepth)!=null?i:100,o=function(a,d){d===void 0&&(d=0);const g=[];for(let c=0;c<a.length;c++){var p;let u=a[c];const f=Fe(n,u.id,u.original,u.index,u.depth,void 0,u.parentId);if(f.columnFilters=u.columnFilters,(p=u.subRows)!=null&&p.length&&d<l){if(f.subRows=o(u.subRows,d+1),u=f,t(u)&&!f.subRows.length){g.push(u),r[u.id]=u,s.push(u);continue}if(t(u)||f.subRows.length){g.push(u),r[u.id]=u,s.push(u);continue}}else u=f,t(u)&&(g.push(u),r[u.id]=u,s.push(u))}return g};return{rows:o(e),flatRows:s,rowsById:r}}function cn(e,t,n){var i;const s=[],r={},l=(i=n.options.maxLeafRowFilterDepth)!=null?i:100,o=function(a,d){d===void 0&&(d=0);const g=[];for(let c=0;c<a.length;c++){let u=a[c];if(t(u)){var p;if((p=u.subRows)!=null&&p.length&&d<l){const h=Fe(n,u.id,u.original,u.index,u.depth,void 0,u.parentId);h.subRows=o(u.subRows,d+1),u=h}g.push(u),s.push(u),r[u.id]=u}}return g};return{rows:o(e),flatRows:s,rowsById:r}}function Rn(){return e=>S(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,i)=>{if(!t.rows.length||!(n!=null&&n.length)&&!i){for(let c=0;c<t.flatRows.length;c++)t.flatRows[c].columnFilters={},t.flatRows[c].columnFiltersMeta={};return t}const s=[],r=[];(n??[]).forEach(c=>{var u;const f=e.getColumn(c.id);if(!f)return;const h=f.getFilterFn();h&&s.push({id:c.id,filterFn:h,resolvedValue:(u=h.resolveFilterValue==null?void 0:h.resolveFilterValue(c.value))!=null?u:c.value})});const l=(n??[]).map(c=>c.id),o=e.getGlobalFilterFn(),a=e.getAllLeafColumns().filter(c=>c.getCanGlobalFilter());i&&o&&a.length&&(l.push("__global__"),a.forEach(c=>{var u;r.push({id:c.id,filterFn:o,resolvedValue:(u=o.resolveFilterValue==null?void 0:o.resolveFilterValue(i))!=null?u:i})}));let d,g;for(let c=0;c<t.flatRows.length;c++){const u=t.flatRows[c];if(u.columnFilters={},s.length)for(let f=0;f<s.length;f++){d=s[f];const h=d.id;u.columnFilters[h]=d.filterFn(u,h,d.resolvedValue,m=>{u.columnFiltersMeta[h]=m})}if(r.length){for(let f=0;f<r.length;f++){g=r[f];const h=g.id;if(g.filterFn(u,h,g.resolvedValue,m=>{u.columnFiltersMeta[h]=m})){u.columnFilters.__global__=!0;break}}u.columnFilters.__global__!==!0&&(u.columnFilters.__global__=!1)}}const p=c=>{for(let u=0;u<l.length;u++)if(c.columnFilters[l[u]]===!1)return!1;return!0};return un(t.rows,p,e)},C(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function yn(){return e=>S(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const i=e.getState().sorting,s=[],r=i.filter(a=>{var d;return(d=e.getColumn(a.id))==null?void 0:d.getCanSort()}),l={};r.forEach(a=>{const d=e.getColumn(a.id);d&&(l[a.id]={sortUndefined:d.columnDef.sortUndefined,invertSorting:d.columnDef.invertSorting,sortingFn:d.getSortingFn()})});const o=a=>{const d=a.map(g=>({...g}));return d.sort((g,p)=>{for(let u=0;u<r.length;u+=1){var c;const f=r[u],h=l[f.id],m=h.sortUndefined,v=(c=f?.desc)!=null?c:!1;let w=0;if(m){const R=g.getValue(f.id),F=p.getValue(f.id),y=R===void 0,D=F===void 0;if(y||D){if(m==="first")return y?-1:1;if(m==="last")return y?1:-1;w=y&&D?0:y?m:-m}}if(w===0&&(w=h.sortingFn(g,p,f.id)),w!==0)return v&&(w*=-1),h.invertSorting&&(w*=-1),w}return g.index-p.index}),d.forEach(g=>{var p;s.push(g),(p=g.subRows)!=null&&p.length&&(g.subRows=o(g.subRows))}),d};return{rows:o(n.rows),flatRows:s,rowsById:n.rowsById}},C(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function Fn(e,t){return e?dn(e)?le.createElement(e,t):e:null}function dn(e){return gn(e)||typeof e=="function"||fn(e)}function gn(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function fn(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function _n(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=le.useState(()=>({current:ln(t)})),[i,s]=le.useState(()=>n.current.initialState);return n.current.setOptions(r=>({...r,...e,state:{...i,...e.state},onStateChange:l=>{s(l),e.onStateChange==null||e.onStateChange(l)}})),n.current}export{vn as M,mn as Q,x as a,Sn as b,Cn as c,yn as d,wn as e,Fn as f,Rn as g,U as i,_ as n,pn as s,_n as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.