PageSourceSearch

https://app.guardianpro.cloud/assets/ui-B_QsM55A.js

js guardianpro.cloud collected 2026-10-03 21:15:44 UTC 61,354 bytes, 4 lines download raw bytes

1var He=s=>{throw TypeError(s)};var ce=(s,t,e)=>t.has(s)||He("Cannot "+e);var r=(s,t,e)=>(ce(s,t,"read from private field"),e?e.call(s):t.get(s)),p=(s,t,e)=>t.has(s)?He("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,e),u=(s,t,e,i)=>(ce(s,t,"write to private field"),i?i.call(s,e):t.set(s,e),e),b=(s,t,e)=>(ce(s,t,"access private method"),e);var ae=(s,t,e,i)=>({set _(n){u(s,t,n,e)},get _(){return r(s,t,i)}});import{r as P,j as js,a as _s}from"./vendor-BFXU7DOE.js";const Us="modulepreload",Ls=function(s){return"/"+s},Ne={},Fi=function(t,e,i){let n=Promise.resolve();if(e&&e.length>0){let h=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(l=>({status:"fulfilled",value:l}),l=>({status:"rejected",reason:l}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),d=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));n=h(e.map(f=>{if(f=Ls(f),f in Ne)return;Ne[f]=!0;const m=f.endsWith(".css"),l=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${l}`))return;const c=document.createElement("link");if(c.rel=m?"stylesheet":Us,m||(c.as="script"),c.crossOrigin="",c.href=f,d&&c.setAttribute("nonce",d),document.head.appendChild(c),m)return new Promise((g,w)=>{c.addEventListener("load",g),c.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(h){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=h,window.dispatchEvent(a),!a.defaultPrevented)throw h}return n.then(h=>{for(const a of h||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})};var Pt=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(s){return this.listeners.add(s),this.onSubscribe(),()=>{this.listeners.delete(s),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},vt,ot,It,as,qs=(as=class extends Pt{constructor(){super();p(this,vt);p(this,ot);p(this,It);u(this,It,t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}})}onSubscribe(){r(this,ot)||this.setEventListener(r(this,It))}onUnsubscribe(){var t;this.hasListeners()||((t=r(this,ot))==null||t.call(this),u(this,ot,void 0))}setEventListener(t){var e;u(this,It,t),(e=r(this,ot))==null||e.call(this),u(this,ot,t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(t){r(this,vt)!==t&&(u(this,vt,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){var t;return typeof r(this,vt)=="boolean"?r(this,vt):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},vt=new WeakMap,ot=new WeakMap,It=new WeakMap,as),De=new qs,Ks={setTimeout:(s,t)=>setTimeout(s,t),clearTimeout:s=>clearTimeout(s),setInterval:(s,t)=>setInterval(s,t),clearInterval:s=>clearInterval(s)},at,Ae,hs,Hs=(hs=class{constructor(){p(this,at,Ks);p(this,Ae,!1)}setTimeoutProvider(s){u(this,at,s)}setTimeout(s,t){return r(this,at).setTimeout(s,t)}clearTimeout(s){r(this,at).clearTimeout(s)}setInterval(s,t){return r(this,at).setInterval(s,t)}clearInterval(s){r(this,at).clearInterval(s)}},at=new WeakMap,Ae=new WeakMap,hs),gt=new Hs;function Ns(s){setTimeout(s,0)}var Ws=typeof window>"u"||"Deno"in globalThis;function k(){}function Bs(s,t){return typeof s=="function"?s(t):s}function de(s){return typeof s=="number"&&s>=0&&s!==1/0}function bs(s,t){return Math.max(s+(t||0)-Date.now(),0)}function yt(s,t){return typeof s=="function"?s(t):s}function B(s,t){return typeof s=="function"?s(t):s}function We(s,t){const{type:e="all",exact:i,fetchStatus:n,predicate:o,queryKey:h,stale:a}=s;if(h){if(i){if(t.queryHash!==ze(h,t.options))return!1}else if(!Bt(t.queryKey,h))return!1}if(e!=="all"){const d=t.isActive();if(e==="active"&&!d||e==="inactive"&&d)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||n&&n!==t.state.fetchStatus||o&&!o(t))}function Be(s,t){const{exact:e,status:i,predicate:n,mutationKey:o}=s;if(o){if(!t.options.mutationKey)return!1;if(e){if(xt(t.options.mutationKey)!==xt(o))return!1}else if(!Bt(t.options.mutationKey,o))return!1}
1return!(i&&t.state.status!==i||n&&!n(t))}function ze(s,t){return((t==null?void 0:t.queryKeyHashFn)||xt)(s)}function xt(s){return JSON.stringify(s,(t,e)=>fe(e)?Object.keys(e).sort().reduce((i,n)=>(i[n]=e[n],i),{}):e)}function Bt(s,t){return s===t?!0:typeof s!=typeof t?!1:s&&t&&typeof s=="object"&&typeof t=="object"?Object.keys(t).every(e=>Bt(s[e],t[e])):!1}var Gs=Object.prototype.hasOwnProperty;function ke(s,t,e=0){if(s===t)return s;if(e>500)return t;const i=Ge(s)&&Ge(t);if(!i&&!(fe(s)&&fe(t)))return t;const o=(i?s:Object.keys(s)).length,h=i?t:Object.keys(t),a=h.length,d=i?new Array(a):{};let f=0;for(let m=0;m<a;m++){const l=i?m:h[m],c=s[l],g=t[l];if(c===g){d[l]=c,(i?m<o:Gs.call(s,l))&&f++;continue}if(c===null||g===null||typeof c!="object"||typeof g!="object"){d[l]=g;continue}const w=ke(c,g,e+1);d[l]=w,w===c&&f++}return o===a&&f===o?s:d}function Gt(s,t){if(!t||Object.keys(s).length!==Object.keys(t).length)return!1;for(const e in s)if(s[e]!==t[e])return!1;return!0}function Ge(s){return Array.isArray(s)&&s.length===Object.keys(s).length}function fe(s){if(!$e(s))return!1;const t=s.constructor;if(t===void 0)return!0;const e=t.prototype;return!(!$e(e)||!e.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(s)!==Object.prototype)}function $e(s){return Object.prototype.toString.call(s)==="[object Object]"}function $s(s){return new Promise(t=>{gt.setTimeout(t,s)})}function me(s,t,e){return typeof e.structuralSharing=="function"?e.structuralSharing(s,t):e.structuralSharing!==!1?ke(s,t):t}function Vs(s,t,e=0){const i=[...s,t];return e&&i.length>e?i.slice(1):i}function Js(s,t,e=0){const i=[t,...s];return e&&i.length>e?i.slice(0,-1):i}var je=Symbol();function Ss(s,t){return!s.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!s.queryFn||s.queryFn===je?()=>Promise.reject(new Error(`Missing queryFn: '${s.queryHash}'`)):s.queryFn}function _e(s,t){return typeof s=="function"?s(...t):!!s}function Zs(s,t,e){let i=!1,n;return Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(n??(n=t()),i||(i=!0,n.aborted?e():n.addEventListener("abort",e,{once:!0})),n)}),s}var $t=(()=>{let s=()=>Ws;return{isServer(){return s()},setIsServer(t){s=t}}})();function pe(){let s,t;const e=new Promise((n,o)=>{s=n,t=o});e.status="pending",e.catch(()=>{});function i(n){Object.assign(e,n),delete e.resolve,delete e.reject}return e.resolve=n=>{i({status:"fulfilled",value:n}),s(n)},e.reject=n=>{i({status:"rejected",reason:n}),t(n)},e}var Xs=Ns;function Ys(){let s=[],t=0,e=a=>{a()},i=a=>{a()},n=Xs;const o=a=>{t?s.push(a):n(()=>{e(a)})},h=()=>{const a=s;s=[],a.length&&n(()=>{i(()=>{a.forEach(d=>{e(d)})})})};return{batch:a=>{let d;t++;try{d=a()}finally{t--,t||h()}return d},batchCalls:a=>(...d)=>{o(()=>{a(...d)})},schedule:o,setNotifyFunction:a=>{e=a},setBatchNotifyFunction:a=>{i=a},setScheduler:a=>{n=a}}}var I=Ys(),Qt,ht,Tt,us,ti=(us=class extends Pt{constructor(){super();p(this,Qt,!0);p(this,ht);p(this,Tt);u(this,Tt,t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",i)}}})}onSubscribe(){r(this,ht)||this.setEventListener(r(this,Tt))}onUnsubscribe(){var t;this.hasListeners()||((t=r(this,ht))==null||t.call(this),u(this,ht,void 0))}setEventListener(t){var e;u(this,Tt,t),(e=r(this,ht))==null||e.call(this),u(this,ht,t(this.setOnline.bind(this)))}setOnline(t){r(this,Qt)!==t&&(u(this,Qt,t),this.listeners.forEach(i=>{i(t)}))}isOnline(){return r(this,Qt)}},Qt=new WeakMap,ht=new WeakMap,Tt=new WeakMap,us),le=new ti;function ei(s){return Math.min(1e3*2**s,3e4)}function ws(s){return(s??"online")==="online"?le.isOnline():!0}var ye=class extends Error{constructor(s){super("CancelledError"),this.revert=s==null?void 0:s.revert,this.silent=s==null?void 0:s.silent}};function Os(s){let t=!1,e=0,i;const n=pe(),o=()=>n.status!=="pending",h=y=>{var S;if(!o()){const O=new ye(y);c(O),(S=s.onCancel)==null||S.call(s,O)}},a=()=>{t=!0},d=()=>{t=!1},f=()=>De.isFocused()&&(s.networkMode==="always"||le.isOnline())&&s.canRun(),m=()=>ws(s.networkMode)&&s.canRun(),l=y=>{o()||(i==null||i(),n.resolve(y))},c=y=>{o()||(i==null||i(),n.reject(y))},g=()=>new Promise(y=>{var S;i=O=>{(o()||f())&&y(O)},(S=s.onPause)==null||S.call(s)}).then(()=>{var y;i=void 0,o()||(y=s.onContinue)==null||y.call(s)}),w=()=>
1{if(o())return;let y;const S=e===0?s.initialPromise:void 0;try{y=S??s.fn()}catch(O){y=Promise.reject(O)}Promise.resolve(y).then(l).catch(O=>{var U;if(o())return;const E=s.retry??($t.isServer()?0:3),M=s.retryDelay??ei,v=typeof M=="function"?M(e,O):M,Q=E===!0||typeof E=="number"&&e<E||typeof E=="function"&&E(e,O);if(t||!Q){c(O);return}e++,(U=s.onFail)==null||U.call(s,e,O),$s(v).then(()=>f()?void 0:g()).then(()=>{t?c(O):w()})})};return{promise:n,status:()=>n.status,cancel:h,continue:()=>(i==null||i(),n),cancelRetry:a,continueRetry:d,canStart:m,start:()=>(m()?w():g().then(w),n)}}var bt,ls,Cs=(ls=class{constructor(){p(this,bt)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),de(this.gcTime)&&u(this,bt,gt.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(s){this.gcTime=Math.max(this.gcTime||0,s??($t.isServer()?1/0:300*1e3))}clearGcTimeout(){r(this,bt)!==void 0&&(gt.clearTimeout(r(this,bt)),u(this,bt,void 0))}},bt=new WeakMap,ls),St,At,N,wt,A,Vt,Ot,H,Es,Z,cs,si=(cs=class extends Cs{constructor(t){super();p(this,H);p(this,St);p(this,At);p(this,N);p(this,wt);p(this,A);p(this,Vt);p(this,Ot);u(this,Ot,!1),u(this,Vt,t.defaultOptions),this.setOptions(t.options),this.observers=[],u(this,wt,t.client),u(this,N,r(this,wt).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,u(this,St,Je(this.options)),this.state=t.state??r(this,St),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=r(this,A))==null?void 0:t.promise}setOptions(t){if(this.options={...r(this,Vt),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=Je(this.options);e.data!==void 0&&(this.setState(Ve(e.data,e.dataUpdatedAt)),u(this,St,e))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&r(this,N).remove(this)}setData(t,e){const i=me(this.state.data,t,this.options);return b(this,H,Z).call(this,{data:i,type:"success",dataUpdatedAt:e==null?void 0:e.updatedAt,manual:e==null?void 0:e.manual}),i}setState(t,e){b(this,H,Z).call(this,{type:"setState",state:t,setStateOptions:e})}cancel(t){var i,n;const e=(i=r(this,A))==null?void 0:i.promise;return(n=r(this,A))==null||n.cancel(t),e?e.then(k).catch(k):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return r(this,St)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>B(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===je||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>yt(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!bs(this.state.dataUpdatedAt,t)}onFocus(){var e;const t=this.observers.find(i=>i.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(e=r(this,A))==null||e.continue()}onOnline(){var e;const t=this.observers.find(i=>i.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(e=r(this,A))==null||e.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),r(this,N).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(r(this,A)&&(r(this,Ot)||b(this,H,Es).call(this)?r(this,A).cancel({revert:!0}):r(this,A).cancelRetry()),this.scheduleGc()),r(this,N).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||b(this,H,Z).call(this,{type:"invalidate"})}async fetch(t,e){var d,f,m,l,c,g,w,y,S,O,E,M;if(this.state.fetchStatus!=="idle"&&((d=r(this,A))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(e!=null&&e.cancelRefetch))this.cancel({silent:!0});else if(r(this,A))return r(this,A).continueRetry(),r(this,A).promise}if(t&&this.setOptions(t),!this.options.queryFn){const v=this.observers.find(Q=>Q.options.queryFn);v&&this.setOptions(v.options)}const i=new AbortController,n=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(u(this,Ot,!0),i.signal)}
1)},o=()=>{const v=Ss(this.options,e),U=(()=>{const it={client:r(this,wt),queryKey:this.queryKey,meta:this.meta};return n(it),it})();return u(this,Ot,!1),this.options.persister?this.options.persister(v,U,this):v(U)},a=(()=>{const v={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:r(this,wt),state:this.state,fetchFn:o};return n(v),v})();(f=this.options.behavior)==null||f.onFetch(a,this),u(this,At,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=a.fetchOptions)==null?void 0:m.meta))&&b(this,H,Z).call(this,{type:"fetch",meta:(l=a.fetchOptions)==null?void 0:l.meta}),u(this,A,Os({initialPromise:e==null?void 0:e.initialPromise,fn:a.fetchFn,onCancel:v=>{v instanceof ye&&v.revert&&this.setState({...r(this,At),fetchStatus:"idle"}),i.abort()},onFail:(v,Q)=>{b(this,H,Z).call(this,{type:"failed",failureCount:v,error:Q})},onPause:()=>{b(this,H,Z).call(this,{type:"pause"})},onContinue:()=>{b(this,H,Z).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const v=await r(this,A).start();if(v===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(v),(g=(c=r(this,N).config).onSuccess)==null||g.call(c,v,this),(y=(w=r(this,N).config).onSettled)==null||y.call(w,v,this.state.error,this),v}catch(v){if(v instanceof ye){if(v.silent)return r(this,A).promise;if(v.revert){if(this.state.data===void 0)throw v;return this.state.data}}throw b(this,H,Z).call(this,{type:"error",error:v}),(O=(S=r(this,N).config).onError)==null||O.call(S,v,this),(M=(E=r(this,N).config).onSettled)==null||M.call(E,this.state.data,v,this),v}finally{this.scheduleGc()}}},St=new WeakMap,At=new WeakMap,N=new WeakMap,wt=new WeakMap,A=new WeakMap,Vt=new WeakMap,Ot=new WeakMap,H=new WeakSet,Es=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Z=function(t){const e=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...Rs(i.data,this.options),fetchMeta:t.meta??null};case"success":const n={...i,...Ve(t.data,t.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return u(this,At,t.manual?n:void 0),n;case"error":const o=t.error;return{...i,error:o,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=e(this.state),I.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),r(this,N).notify({query:this,type:"updated",action:t})})},cs);function Rs(s,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ws(t.networkMode)?"fetching":"paused",...s===void 0&&{error:null,status:"pending"}}}function Ve(s,t){return{data:s,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Je(s){const t=typeof s.initialData=="function"?s.initialData():s.initialData,e=t!==void 0,i=e?typeof s.initialDataUpdatedAt=="function"?s.initialDataUpdatedAt():s.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:e?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:e?"success":"pending",fetchStatus:"idle"}}var L,C,Jt,_,Ct,Dt,X,ut,Zt,zt,kt,Et,Rt,lt,jt,R,Wt,ge,ve,be,Se,we,Oe,Ce,Ms,ds,Ue=(ds=class extends Pt{constructor(t,e){super();p(this,R);p(this,L);p(this,C);p(this,Jt);p(this,_);p(this,Ct);p(this,Dt);p(this,X);p(this,ut);p(this,Zt);p(this,zt);p(this,kt);p(this,Et);p(this,Rt);p(this,lt);p(this,jt,new Set);this.options=e,u(this,L,t),u(this,ut,null),u(this,X,pe()),this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(r(this,C).addObserver(this),Ze(r(this,C),this.options)?b(this,R,Wt).call(this):this.updateResult(),b(this,R,Se).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ee(r(this,C),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ee(r(this,C),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,b(this,R,we).call(this),b(this,R,Oe).call(this),r(this,C).removeObserver(this)}setOptions(t){const e=this.options,i=r(this,C);if(this.options=r(this,L).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof B(this.options.enabled,r(this,C))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");b(this,R,Ce).call(this),r(this,C).setOptions(this.options),e._defaulted&&!Gt(this.options,e)&&r(this,L).getQueryCache().notify({type:"observerOptionsUpdated",query:r(this,C),observer:this});const n=this.hasListeners();n&&Xe(r(this,C),i,this.options,e)&&b(this,R,Wt).call(this),this.updateResult(),n&&(r(this,C)!==i||B(this.options.enabled,r(this,C))!==B(e.enabled,r(this,C))||yt(this.options.staleTime,r(this,C))!==yt(e.staleTime,r(this,C)))&&b(this,R,ge).call(this);const o=b(this,R,ve).call(this);n&&(r(this,C)!==i||B(this.options.enabled,r(this,C))!==B(e.enabled,r(this,C))||o!==r(this,lt))&&b(this,R,be).call(this,o)}getOptimisticResult(t){const e=r(this,L).getQueryCache().build(r(this,L),t),i=this.createResult(e,t);return ni(this,i)&&(u(this,_,i),u(this,Dt,this.options),u(this,Ct,r(this,C).state)),i}getCurrentResult(){return r(this,_)}trackResult(t,e){return new Proxy(t,{get:(i,n)=>(this.trackProp(n),e==null||e(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&r(this,X).status==="pending"&&r(this,X).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,n))})}trackProp(t){r(this,jt).add(t)}getCurrentQuery(){return r(this,C)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=r(this,L).defaultQueryOptions(t),i=r(this,L).getQueryCache().build(r(this,L),e);return i.fetch().then(()=>this.createResult(i,e))}fetch(t){return b(this,R,Wt).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),r(this,_)))}createResult(t,e){var T;
1const i=r(this,C),n=this.options,o=r(this,_),h=r(this,Ct),a=r(this,Dt),f=t!==i?t.state:r(this,Jt),{state:m}=t;let l={...m},c=!1,g;if(e._optimisticResults){const j=this.hasListeners(),nt=!j&&Ze(t,e),ne=j&&Xe(t,i,e,n);(nt||ne)&&(l={...l,...Rs(m.data,t.options)}),e._optimisticResults==="isRestoring"&&(l.fetchStatus="idle")}let{error:w,errorUpdatedAt:y,status:S}=l;g=l.data;let O=!1;if(e.placeholderData!==void 0&&g===void 0&&S==="pending"){let j;o!=null&&o.isPlaceholderData&&e.placeholderData===(a==null?void 0:a.placeholderData)?(j=o.data,O=!0):j=typeof e.placeholderData=="function"?e.placeholderData((T=r(this,kt))==null?void 0:T.state.data,r(this,kt)):e.placeholderData,j!==void 0&&(S="success",g=me(o==null?void 0:o.data,j,e),c=!0)}if(e.select&&g!==void 0&&!O)if(o&&g===(h==null?void 0:h.data)&&e.select===r(this,Zt))g=r(this,zt);else try{u(this,Zt,e.select),g=e.select(g),g=me(o==null?void 0:o.data,g,e),u(this,zt,g),u(this,ut,null)}catch(j){u(this,ut,j)}r(this,ut)&&(w=r(this,ut),g=r(this,zt),y=Date.now(),S="error");const E=l.fetchStatus==="fetching",M=S==="pending",v=S==="error",Q=M&&E,U=g!==void 0,x={status:S,fetchStatus:l.fetchStatus,isPending:M,isSuccess:S==="success",isError:v,isInitialLoading:Q,isLoading:Q,data:g,dataUpdatedAt:l.dataUpdatedAt,error:w,errorUpdatedAt:y,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:l.dataUpdateCount>f.dataUpdateCount||l.errorUpdateCount>f.errorUpdateCount,isFetching:E,isRefetching:E&&!M,isLoadingError:v&&!U,isPaused:l.fetchStatus==="paused",isPlaceholderData:c,isRefetchError:v&&U,isStale:Le(t,e),refetch:this.refetch,promise:r(this,X),isEnabled:B(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const j=x.data!==void 0,nt=x.status==="error"&&!j,ne=oe=>{nt?oe.reject(x.error):j&&oe.resolve(x.data)},Ke=()=>{const oe=u(this,X,x.promise=pe());ne(oe)},re=r(this,X);switch(re.status){case"pending":t.queryHash===i.queryHash&&ne(re);break;case"fulfilled":(nt||x.data!==re.value)&&Ke();break;case"rejected":(!nt||x.error!==re.reason)&&Ke();break}}return x}updateResult(){const t=r(this,_),e=this.createResult(r(this,C),this.options);if(u(this,Ct,r(this,C).state),u(this,Dt,this.options),r(this,Ct).data!==void 0&&u(this,kt,r(this,C)),Gt(e,t))return;u(this,_,e);const i=()=>{if(!t)return!0;const{notifyOnChangeProps:n}=this.options,o=typeof n=="function"?n():n;if(o==="all"||!o&&!r(this,jt).size)return!0;const h=new Set(o??r(this,jt));return this.options.throwOnError&&h.add("error"),Object.keys(r(this,_)).some(a=>{const d=a;return r(this,_)[d]!==t[d]&&h.has(d)})};b(this,R,Ms).call(this,{listeners:i()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&b(this,R,Se).call(this)}},L=new WeakMap,C=new WeakMap,Jt=new WeakMap,_=new WeakMap,Ct=new WeakMap,Dt=new WeakMap,X=new WeakMap,ut=new WeakMap,Zt=new WeakMap,zt=new WeakMap,kt=new WeakMap,Et=new WeakMap,Rt=new WeakMap,lt=new WeakMap,jt=new WeakMap,R=new WeakSet,Wt=function(t){b(this,R,Ce).call(this);let e=r(this,C).fetch(this.options,t);return t!=null&&t.throwOnError||(e=e.catch(k)),e},ge=function(){b(this,R,we).call(this);const t=yt(this.options.staleTime,r(this,C));if($t.isServer()||r(this,_).isStale||!de(t))return;const i=bs(r(this,_).dataUpdatedAt,t)+1;u(this,Et,gt.setTimeout(()=>{r(this,_).isStale||this.updateResult()},i))},ve=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(r(this,C)):this.options.refetchInterval)??!1},be=function(t){b(this,R,Oe).call(this),u(this,lt,t),!($t.isServer()||B(this.options.enabled,r(this,C))===!1||!de(r(this,lt))||r(this,lt)===0)&&u(this,Rt,gt.setInterval(()=>{(this.options.refetchIntervalInBackground||De.isFocused())&&b(this,R,Wt).call(this)},r(this,lt)))},Se=function(){b(this,R,ge).call(this),b(this,R,be).call(this,b(this,R,ve).call(this))},we=function(){r(this,Et)!==void 0&&(gt.clearTimeout(r(this,Et)),u(this,Et,void 0))},Oe=function(){r(this,Rt)!==void 0&&(gt.clearInterval(r(this,Rt)),u(this,Rt,void 0))},Ce=function(){const t=r(this,L).getQueryCache().build(r(this,L),this.options);if(t===r(this,C))return;const e=r(this,C);u(this,C,t),u(this,Jt,t.state),this.hasListeners()&&(e==null||e.removeObserver(this),t.addObserver(this))},Ms=function(t){I.batch(()=>
1{t.listeners&&this.listeners.forEach(e=>{e(r(this,_))}),r(this,L).getQueryCache().notify({query:r(this,C),type:"observerResultsUpdated"})})},ds);function ii(s,t){return B(t.enabled,s)!==!1&&s.state.data===void 0&&!(s.state.status==="error"&&t.retryOnMount===!1)}function Ze(s,t){return ii(s,t)||s.state.data!==void 0&&Ee(s,t,t.refetchOnMount)}function Ee(s,t,e){if(B(t.enabled,s)!==!1&&yt(t.staleTime,s)!=="static"){const i=typeof e=="function"?e(s):e;return i==="always"||i!==!1&&Le(s,t)}return!1}function Xe(s,t,e,i){return(s!==t||B(i.enabled,s)===!1)&&(!e.suspense||s.state.status!=="error")&&Le(s,e)}function Le(s,t){return B(t.enabled,s)!==!1&&s.isStaleByTime(yt(t.staleTime,s))}function ni(s,t){return!Gt(s.getCurrentResult(),t)}function Ye(s){return{onFetch:(t,e)=>{var m,l,c,g,w;const i=t.options,n=(c=(l=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:l.fetchMore)==null?void 0:c.direction,o=((g=t.state.data)==null?void 0:g.pages)||[],h=((w=t.state.data)==null?void 0:w.pageParams)||[];let a={pages:[],pageParams:[]},d=0;const f=async()=>{let y=!1;const S=M=>{Zs(M,()=>t.signal,()=>y=!0)},O=Ss(t.options,t.fetchOptions),E=async(M,v,Q)=>{if(y)return Promise.reject();if(v==null&&M.pages.length)return Promise.resolve(M);const it=(()=>{const nt={client:t.client,queryKey:t.queryKey,pageParam:v,direction:Q?"backward":"forward",meta:t.options.meta};return S(nt),nt})(),x=await O(it),{maxPages:T}=t.options,j=Q?Js:Vs;return{pages:j(M.pages,x,T),pageParams:j(M.pageParams,v,T)}};if(n&&o.length){const M=n==="backward",v=M?ri:ts,Q={pages:o,pageParams:h},U=v(i,Q);a=await E(Q,U,M)}else{const M=s??o.length;do{const v=d===0?h[0]??i.initialPageParam:ts(i,a);if(d>0&&v==null)break;a=await E(a,v),d++}while(d<M)}return a};t.options.persister?t.fetchFn=()=>{var y,S;return(S=(y=t.options).persister)==null?void 0:S.call(y,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},e)}:t.fetchFn=f}}}function ts(s,{pages:t,pageParams:e}){const i=t.length-1;return t.length>0?s.getNextPageParam(t[i],t,e[i],e):void 0}function ri(s,{pages:t,pageParams:e}){var i;return t.length>0?(i=s.getPreviousPageParam)==null?void 0:i.call(s,t[0],t,e[0],e):void 0}var Xt,$,z,Mt,V,rt,fs,oi=(fs=class extends Cs{constructor(t){super();p(this,V);p(this,Xt);p(this,$);p(this,z);p(this,Mt);u(this,Xt,t.client),this.mutationId=t.mutationId,u(this,z,t.mutationCache),u(this,$,[]),this.state=t.state||xs(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){r(this,$).includes(t)||(r(this,$).push(t),this.clearGcTimeout(),r(this,z).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){u(this,$,r(this,$).filter(e=>e!==t)),this.scheduleGc(),r(this,z).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){r(this,$).length||(this.state.status==="pending"?this.scheduleGc():r(this,z).remove(this))}continue(){var t;return((t=r(this,Mt))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var h,a,d,f,m,l,c,g,w,y,S,O,E,M,v,Q,U,it;const e=()=>{b(this,V,rt).call(this,{type:"continue"})},i={client:r(this,Xt),meta:this.options.meta,mutationKey:this.options.mutationKey};u(this,Mt,Os({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(new Error("No mutationFn found")),onFail:(x,T)=>{b(this,V,rt).call(this,{type:"failed",failureCount:x,error:T})},onPause:()=>{b(this,V,rt).call(this,{type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>r(this,z).canRun(this)}));const n=this.state.status==="pending",o=!r(this,Mt).canStart();try{if(n)e();else{b(this,V,rt).call(this,{type:"pending",variables:t,isPaused:o}),r(this,z).config.onMutate&&await r(this,z).config.onMutate(t,this,i);const T=await((a=(h=this.options).onMutate)==null?void 0:a.call(h,t,i));T!==this.state.context&&b(this,V,rt).call(this,{type:"pending",context:T,variables:t,isPaused:o})}const x=await r(this,Mt).start();return await((f=(d=r(this,z).config).onSuccess)==null?void 0:f.call(d,x,t,this.state.context,this,i)),await((l=(m=this.options).onSuccess)==null?void 0:l.call(m,x,t,this.state.context,i)),await((g=(c=r(this,z).config).onSettled)==null?void 0:g.call(c,x,null,this.state.variables,this.state.context,this,i)),await((y=(w=this.options).onSettled)==null?void 0:y.call(w,x,null,t,this.state.context,i)),b(this,V,rt).call(this,{type:"success",data:x}),x}catch(x){try{await((O=(S=r(this,z).config).onError)==null?void 0:O.call(S,x,t,this.state.context,this,i))}catch(T){Promise.reject(T)}try{await((M=(E=this.options).onError)==null?void 0:M.call(E,x,t,this.state.context,i))}catch(T){Promise.reject(T)}try{await((Q=(v=r(this,z).config).onSettled)==null?void 0:Q.call(v,void 0,x,this.state.variables,this.state.context,this,i))}catch(T){Promise.reject(T)}try{await((it=(U=this.options).onSettled)==null?void 0:it.call(U,void 0,x,t,this.state.context,i))}catch(T){Promise.reject(T)}throw b(this,V,rt).call(this,{type:"error",error:x}),x}finally{r(this,z).runNext(this)}}},Xt=new WeakMap,$=new WeakMap,z=new WeakMap,Mt=new WeakMap,V=new WeakSet,rt=function(t){const e=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};
1case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),I.batch(()=>{r(this,$).forEach(i=>{i.onMutationUpdate(t)}),r(this,z).notify({mutation:this,type:"updated",action:t})})},fs);function xs(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Y,G,Yt,ms,ai=(ms=class extends Pt{constructor(t={}){super();p(this,Y);p(this,G);p(this,Yt);this.config=t,u(this,Y,new Set),u(this,G,new Map),u(this,Yt,0)}build(t,e,i){const n=new oi({client:t,mutationCache:this,mutationId:++ae(this,Yt)._,options:t.defaultMutationOptions(e),state:i});return this.add(n),n}add(t){r(this,Y).add(t);const e=he(t);if(typeof e=="string"){const i=r(this,G).get(e);i?i.push(t):r(this,G).set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(r(this,Y).delete(t)){const e=he(t);if(typeof e=="string"){const i=r(this,G).get(e);if(i)if(i.length>1){const n=i.indexOf(t);n!==-1&&i.splice(n,1)}else i[0]===t&&r(this,G).delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=he(t);if(typeof e=="string"){const i=r(this,G).get(e),n=i==null?void 0:i.find(o=>o.state.status==="pending");return!n||n===t}else return!0}runNext(t){var i;const e=he(t);if(typeof e=="string"){const n=(i=r(this,G).get(e))==null?void 0:i.find(o=>o!==t&&o.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}else return Promise.resolve()}clear(){I.batch(()=>{r(this,Y).forEach(t=>{this.notify({type:"removed",mutation:t})}),r(this,Y).clear(),r(this,G).clear()})}getAll(){return Array.from(r(this,Y))}find(t){const e={exact:!0,...t};return this.getAll().find(i=>Be(e,i))}findAll(t={}){return this.getAll().filter(e=>Be(t,e))}notify(t){I.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>
1e.state.isPaused);return I.batch(()=>Promise.all(t.map(e=>e.continue().catch(k))))}},Y=new WeakMap,G=new WeakMap,Yt=new WeakMap,ms);function he(s){var t;return(t=s.options.scope)==null?void 0:t.id}var tt,ct,q,et,st,ue,Re,ps,hi=(ps=class extends Pt{constructor(e,i){super();p(this,st);p(this,tt);p(this,ct);p(this,q);p(this,et);u(this,tt,e),this.setOptions(i),this.bindMethods(),b(this,st,ue).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var n;const i=this.options;this.options=r(this,tt).defaultMutationOptions(e),Gt(this.options,i)||r(this,tt).getMutationCache().notify({type:"observerOptionsUpdated",mutation:r(this,q),observer:this}),i!=null&&i.mutationKey&&this.options.mutationKey&&xt(i.mutationKey)!==xt(this.options.mutationKey)?this.reset():((n=r(this,q))==null?void 0:n.state.status)==="pending"&&r(this,q).setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||(e=r(this,q))==null||e.removeObserver(this)}onMutationUpdate(e){b(this,st,ue).call(this),b(this,st,Re).call(this,e)}getCurrentResult(){return r(this,ct)}reset(){var e;(e=r(this,q))==null||e.removeObserver(this),u(this,q,void 0),b(this,st,ue).call(this),b(this,st,Re).call(this)}mutate(e,i){var n;return u(this,et,i),(n=r(this,q))==null||n.removeObserver(this),u(this,q,r(this,tt).getMutationCache().build(r(this,tt),this.options)),r(this,q).addObserver(this),r(this,q).execute(e)}},tt=new WeakMap,ct=new WeakMap,q=new WeakMap,et=new WeakMap,st=new WeakSet,ue=function(){var i;const e=((i=r(this,q))==null?void 0:i.state)??xs();u(this,ct,{...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset})},Re=function(e){I.batch(()=>{var i,n,o,h,a,d,f,m;if(r(this,et)&&this.hasListeners()){const l=r(this,ct).variables,c=r(this,ct).context,g={client:r(this,tt),meta:this.options.meta,mutationKey:this.options.mutationKey};if((e==null?void 0:e.type)==="success"){try{(n=(i=r(this,et)).onSuccess)==null||n.call(i,e.data,l,c,g)}catch(w){Promise.reject(w)}try{(h=(o=r(this,et)).onSettled)==null||h.call(o,e.data,null,l,c,g)}catch(w){Promise.reject(w)}}else if((e==null?void 0:e.type)==="error"){try{(d=(a=r(this,et)).onError)==null||d.call(a,e.error,l,c,g)}catch(w){Promise.reject(w)}try{(m=(f=r(this,et)).onSettled)==null||m.call(f,void 0,e.error,l,c,g)}catch(w){Promise.reject(w)}}}this.listeners.forEach(l=>{l(r(this,ct))})})},ps);function es(s,t){const e=new Set(t);return s.filter(i=>!e.has(i))}function ui(s,t,e){const i=s.slice(0);return i[t]=e,i}var _t,K,Ut,Lt,W,dt,te,ee,se,ie,D,Me,xe,Pe,Fe,Ie,ys,li=(ys=class extends Pt{constructor(t,e,i){super();p(this,D);p(this,_t);p(this,K);p(this,Ut);p(this,Lt);p(this,W);p(this,dt);p(this,te);p(this,ee);p(this,se);p(this,ie,[]);u(this,_t,t),u(this,Lt,i),u(this,Ut,[]),u(this,W,[]),u(this,K,[]),this.setQueries(e)}onSubscribe(){this.listeners.size===1&&r(this,W).forEach(t=>{t.subscribe(e=>{b(this,D,Fe).call(this,t,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,r(this,W).forEach(t=>{t.destroy()})}setQueries(t,e){u(this,Ut,t),u(this,Lt,e),I.batch(()=>{const i=r(this,W),n=b(this,D,Pe).call(this,r(this,Ut));n.forEach(l=>l.observer.setOptions(l.defaultedQueryOptions));const o=n.map(l=>l.observer),h=o.map(l=>l.getCurrentResult()),a=i.length!==o.length,d=o.some((l,c)=>l!==i[c]),f=a||d,m=f?!0:h.some((l,c)=>{const g=r(this,K)[c];return!g||!Gt(l,g)});!f&&!m||(f&&(u(this,ie,n),u(this,W,o)),u(this,K,h),this.hasListeners()&&(f&&(es(i,o).forEach(l=>{l.destroy()}),es(o,i).forEach(l=>{l.subscribe(c=>{b(this,D,Fe).call(this,l,c)})})),b(this,D,Ie).call(this)))})}getCurrentResult(){return r(this,K)}getQueries(){return r(this,W).map(t=>t.getCurrentQuery())}getObservers(){return r(this,W)}getOptimisticResult(t,e){const i=b(this,D,Pe).call(this,t),n=i.map(h=>h.observer.getOptimisticResult(h.defaultedQueryOptions)),o=i.map(h=>h.defaultedQueryOptions.queryHash);return[n,h=>b(this,D,xe).call(this,h??n,e,o),()=>b(this,D,Me).call(this,n,i)]}}
1,_t=new WeakMap,K=new WeakMap,Ut=new WeakMap,Lt=new WeakMap,W=new WeakMap,dt=new WeakMap,te=new WeakMap,ee=new WeakMap,se=new WeakMap,ie=new WeakMap,D=new WeakSet,Me=function(t,e){return e.map((i,n)=>{const o=t[n];return i.defaultedQueryOptions.notifyOnChangeProps?o:i.observer.trackResult(o,h=>{e.forEach(a=>{a.observer.trackProp(h)})})})},xe=function(t,e,i){if(e){const n=r(this,se),o=i!==void 0&&n!==void 0&&(n.length!==i.length||i.some((h,a)=>h!==n[a]));return(!r(this,dt)||r(this,K)!==r(this,ee)||o||e!==r(this,te))&&(u(this,te,e),u(this,ee,r(this,K)),i!==void 0&&u(this,se,i),u(this,dt,ke(r(this,dt),e(t)))),r(this,dt)}return t},Pe=function(t){const e=new Map;r(this,W).forEach(n=>{const o=n.options.queryHash;if(!o)return;const h=e.get(o);h?h.push(n):e.set(o,[n])});const i=[];return t.forEach(n=>{var d;const o=r(this,_t).defaultQueryOptions(n),a=((d=e.get(o.queryHash))==null?void 0:d.shift())??new Ue(r(this,_t),o);i.push({defaultedQueryOptions:o,observer:a})}),i},Fe=function(t,e){const i=r(this,W).indexOf(t);i!==-1&&(u(this,K,ui(r(this,K),i,e)),b(this,D,Ie).call(this))},Ie=function(){var t;if(this.hasListeners()){const e=r(this,dt),i=b(this,D,Me).call(this,r(this,K),r(this,ie)),n=b(this,D,xe).call(this,i,(t=r(this,Lt))==null?void 0:t.combine);e!==n&&I.batch(()=>{this.listeners.forEach(o=>{o(r(this,K))})})}},ys),J,gs,ci=(gs=class extends Pt{constructor(t={}){super();p(this,J);this.config=t,u(this,J,new Map)}build(t,e,i){const n=e.queryKey,o=e.queryHash??ze(n,e);let h=this.get(o);return h||(h=new si({client:t,queryKey:n,queryHash:o,options:t.defaultQueryOptions(e),state:i,defaultOptions:t.getQueryDefaults(n)}),this.add(h)),h}add(t){r(this,J).has(t.queryHash)||(r(this,J).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=r(this,J).get(t.queryHash);
1e&&(t.destroy(),e===t&&r(this,J).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){I.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return r(this,J).get(t)}getAll(){return[...r(this,J).values()]}find(t){const e={exact:!0,...t};return this.getAll().find(i=>We(e,i))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(i=>We(t,i)):e}notify(t){I.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){I.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){I.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},J=new WeakMap,gs),F,ft,mt,qt,Kt,pt,Ht,Nt,vs,Qi=(vs=class{constructor(s={}){p(this,F);p(this,ft);p(this,mt);p(this,qt);p(this,Kt);p(this,pt);p(this,Ht);p(this,Nt);u(this,F,s.queryCache||new ci),u(this,ft,s.mutationCache||new ai),u(this,mt,s.defaultOptions||{}),u(this,qt,new Map),u(this,Kt,new Map),u(this,pt,0)}mount(){ae(this,pt)._++,r(this,pt)===1&&(u(this,Ht,De.subscribe(async s=>{s&&(await this.resumePausedMutations(),r(this,F).onFocus())})),u(this,Nt,le.subscribe(async s=>{s&&(await this.resumePausedMutations(),r(this,F).onOnline())})))}unmount(){var s,t;ae(this,pt)._--,r(this,pt)===0&&((s=r(this,Ht))==null||s.call(this),u(this,Ht,void 0),(t=r(this,Nt))==null||t.call(this),u(this,Nt,void 0))}isFetching(s){return r(this,F).findAll({...s,fetchStatus:"fetching"}).length}isMutating(s){return r(this,ft).findAll({...s,status:"pending"}).length}getQueryData(s){var e;const t=this.defaultQueryOptions({queryKey:s});return(e=r(this,F).get(t.queryHash))==null?void 0:e.state.data}ensureQueryData(s){const t=this.defaultQueryOptions(s),e=r(this,F).build(this,t),i=e.state.data;return i===void 0?this.fetchQuery(s):(s.revalidateIfStale&&e.isStaleByTime(yt(t.staleTime,e))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(s){return r(this,F).findAll(s).map(({queryKey:t,state:e})=>{const i=e.data;return[t,i]})}setQueryData(s,t,e){const i=this.defaultQueryOptions({queryKey:s}),n=r(this,F).get(i.queryHash),o=n==null?void 0:n.state.data,h=Bs(t,o);if(h!==void 0)return r(this,F).build(this,i).setData(h,{...e,manual:!0})}setQueriesData(s,t,e){return I.batch(()=>r(this,F).findAll(s).map(({queryKey:i})=>[i,this.setQueryData(i,t,e)]))}getQueryState(s){var e;const t=this.defaultQueryOptions({queryKey:s});return(e=r(this,F).get(t.queryHash))==null?void 0:e.state}removeQueries(s){const t=r(this,F);I.batch(()=>{t.findAll(s).forEach(e=>{t.remove(e)})})}resetQueries(s,t){const e=r(this,F);return I.batch(()=>(e.findAll(s).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...s},t)))}cancelQueries(s,t={}){const e={revert:!0,...t},i=I.batch(()=>r(this,F).findAll(s).map(n=>n.cancel(e)));return Promise.all(i).then(k).catch(k)}invalidateQueries(s,t={}){return I.batch(()=>(r(this,F).findAll(s).forEach(e=>{e.invalidate()}),(s==null?void 0:s.refetchType)==="none"?Promise.resolve():this.refetchQueries({...s,type:(s==null?void 0:s.refetchType)??(s==null?void 0:s.type)??"active"},t)))}refetchQueries(s,t={}){const e={...t,cancelRefetch:t.cancelRefetch??!0},i=I.batch(()=>r(this,F).findAll(s).filter(n=>!n.isDisabled()&&!n.isStatic()).map(n=>{let o=n.fetch(void 0,e);return e.throwOnError||(o=o.catch(k)),n.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(i).then(k)}fetchQuery(s){const t=this.defaultQueryOptions(s);t.retry===void 0&&(t.retry=!1);const e=r(this,F).build(this,t);return e.isStaleByTime(yt(t.staleTime,e))?e.fetch(t):Promise.resolve(e.state.data)}prefetchQuery(s){return this.fetchQuery(s).then(k).catch(k)}fetchInfiniteQuery(s){return s.behavior=Ye(s.pages),this.fetchQuery(s)}prefetchInfiniteQuery(s){return this.fetchInfiniteQuery(s).then(k).catch(k)}ensureInfiniteQueryData(s){return s.behavior=Ye(s.pages),this.ensureQueryData(s)}resumePausedMutations(){return le.isOnline()?r(this,ft).resumePausedMutations():Promise.resolve()}getQueryCache(){return r(this,F)}getMutationCache(){return r(this,ft)}getDefaultOptions(){return r(this,mt)}setDefaultOptions(s){u(this,mt,s)}setQueryDefaults(s,t){r(this,qt).set(xt(s),{queryKey:s,defaultOptions:t})}getQueryDefaults(s){const t=[...r(this,qt).values()],e={};return t.forEach(i=>
1{Bt(s,i.queryKey)&&Object.assign(e,i.defaultOptions)}),e}setMutationDefaults(s,t){r(this,Kt).set(xt(s),{mutationKey:s,defaultOptions:t})}getMutationDefaults(s){const t=[...r(this,Kt).values()],e={};return t.forEach(i=>{Bt(s,i.mutationKey)&&Object.assign(e,i.defaultOptions)}),e}defaultQueryOptions(s){if(s._defaulted)return s;const t={...r(this,mt).queries,...this.getQueryDefaults(s.queryKey),...s,_defaulted:!0};return t.queryHash||(t.queryHash=ze(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===je&&(t.enabled=!1),t}defaultMutationOptions(s){return s!=null&&s._defaulted?s:{...r(this,mt).mutations,...(s==null?void 0:s.mutationKey)&&this.getMutationDefaults(s.mutationKey),...s,_defaulted:!0}}clear(){r(this,F).clear(),r(this,ft).clear()}},F=new WeakMap,ft=new WeakMap,mt=new WeakMap,qt=new WeakMap,Kt=new WeakMap,pt=new WeakMap,Ht=new WeakMap,Nt=new WeakMap,vs),Ps=P.createContext(void 0),qe=s=>{const t=P.useContext(Ps);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Ti=({client:s,children:t})=>(P.useEffect(()=>(s.mount(),()=>{s.unmount()}),[s]),js.jsx(Ps.Provider,{value:s,children:t})),Fs=P.createContext(!1),Is=()=>P.useContext(Fs);Fs.Provider;function di(){let s=!1;return{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s}}var fi=P.createContext(di()),Qs=()=>P.useContext(fi),Ts=(s,t,e)=>{const i=e!=null&&e.state.error&&typeof s.throwOnError=="function"?_e(s.throwOnError,[e.state.error,e]):s.throwOnError;(s.suspense||s.experimental_prefetchInRender||i)&&(t.isReset()||(s.retryOnMount=!1))},As=s=>{P.useEffect(()=>{s.clearReset()},[s])},Ds=({result:s,errorResetBoundary:t,throwOnError:e,query:i,suspense:n})=>s.isError&&!t.isReset()&&!s.isFetching&&i&&(n&&s.data===void 0||_e(e,[s.error,i])),zs=s=>{if(s.suspense){const e=n=>n==="static"?n:Math.max(n??1e3,1e3),i=s.staleTime;s.staleTime=typeof i=="function"?(...n)=>e(i(...n)):e(i),typeof s.gcTime=="number"&&(s.gcTime=Math.max(s.gcTime,1e3))}},mi=(s,t)=>s.isLoading&&s.isFetching&&!t,Qe=(s,t)=>(s==null?void 0:s.suspense)&&t.isPending,Te=(s,t,e)=>t.fetchOptimistic(s).catch(()=>{e.clearReset()});function Ai({queries:s,...t},e){const i=qe(),n=Is(),o=Qs(),h=P.useMemo(()=>s.map(y=>{const S=i.defaultQueryOptions(y);return S._optimisticResults=n?"isRestoring":"optimistic",S}),[s,i,n]);h.forEach(y=>{zs(y);const S=i.getQueryCache().get(y.queryHash);Ts(y,o,S)}),As(o);const[a]=P.useState(()=>new li(i,h,t)),[d,f,m]=a.getOptimisticResult(h,t.combine),l=!n&&t.subscribed!==!1;P.useSyncExternalStore(P.useCallback(y=>l?a.subscribe(I.batchCalls(y)):k,[a,l]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),P.useEffect(()=>{a.setQueries(h,t)},[h,t,a]);const g=d.some((y,S)=>Qe(h[S],y))?d.flatMap((y,S)=>{const O=h[S];if(O&&Qe(O,y)){const E=new Ue(i,O);return Te(O,E,o)}return[]}):[];if(g.length>0)throw Promise.all(g);const w=d.find((y,S)=>{const O=h[S];return O&&Ds({result:y,errorResetBoundary:o,throwOnError:O.throwOnError,query:i.getQueryCache().get(O.queryHash),suspense:O.suspense})});if(w!=null&&w.error)throw w.error;return f(m())}function pi(s,t,e){var c,g,w,y;const i=Is(),n=Qs(),o=qe(),h=o.defaultQueryOptions(s);(g=(c=o.getDefaultOptions().queries)==null?void 0:c._experimental_beforeQuery)==null||g.call(c,h);const a=o.getQueryCache().get(h.queryHash);h._optimisticResults=i?"isRestoring":"optimistic",zs(h),Ts(h,n,a),As(n);const d=!o.getQueryCache().get(h.queryHash),[f]=P.useState(()=>new t(o,h)),m=f.getOptimisticResult(h),l=!i&&s.subscribed!==!1;if(P.useSyncExternalStore(P.useCallback(S=>{const O=l?f.subscribe(I.batchCalls(S)):k;return f.updateResult(),O},[f,l]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),P.useEffect(()=>{f.setOptions(h)},[h,f]),Qe(h,m))throw Te(h,f,n);if(Ds({result:m,errorResetBoundary:n,throwOnError:h.throwOnError,query:a,suspense:h.suspense}))throw m.error;if((y=(w=o.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||y.call(w,h,m),h.experimental_prefetchInRender&&!$t.isServer()&&mi(m,i)){const S=d?Te(h,f,n):a==null?void 0:a.promise;S==null||S.catch(k).finally(()=>{f.updateResult()})}return h.notifyOnChangeProps?m:f.trackResult(m)}function Di(s,t){return pi(s,Ue)}function zi(s){return s}function ki(s,t){const e=qe(),[i]=P.useState(()=>new hi(e,s));P.useEffect(()=>{i.setOptions(s)},[i,s]);const n=P.useSyncExternalStore(P.useCallback(h=>i.subscribe(I.batchCalls(h)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),o=P.useCallback((h,a)=>{i.mutate(h,a).catch(k)},[i]);if(n.error&&_e(i.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:o,mutateAsync:n.mutate}}function Ft(s,t,e){let i=e.initialDeps??[],n,o=!0;function h(){var a,d,f;let m;e.key&&((a=e.debug)!=null&&a.call(e))&&(m=Date.now());const l=s();if(!(l.length!==i.length||l.some((w,y)=>i[y]!==w)))return n;i=l;let g;if(e.key&&((d=e.debug)!=null&&d.call(e))&&(g=Date.now()),n=t(...l),e.key&&((f=e.debug)!=null&&f.call(e))){const w=Math.round((Date.now()-m)*100)/100,y=Math.round((Date.now()-g)*100)/100,S=y/16,O=(E,M)=>{for(E=String(E);E.length<M;)E=" "+E;return E};console.info(`%c⏱ ${O(y,5)} /${O(w,5)} ms`,`
2            font-size: .6rem;
3            font-weight: bold;
4            color: hsl(${Math.max(0,Math.min(120-120*S,120))}deg 100% 31%);`,e==null?void 0:e.key)}return e!=null&&e.onChange&&!(o&&e.skipInitialOnChange)&&e.onChange(n),o=!1,n}return h.updateDeps=a=>{i=a},h}function ss(s,t){if(s===void 0)throw new Error("Unexpected undefined");return s}const yi=(s,t)=>Math.abs(s-t)<1.01,gi=(s,t,e)=>{let i;return function(...n){s.clearTimeout(i),i=s.setTimeout(()=>t.apply(this,n),e)}},is=s=>{const{offsetWidth:t,offsetHeight:e}=s;return{width:t,height:e}},vi=s=>s,bi=s=>{const t=Math.max(s.startIndex-s.overscan,0),e=Math.min(s.endIndex+s.overscan,s.c
vendor: 4,193 bytes, line 4
4ount-1),i=[];for(let n=t;n<=e;n++)i.push(n);return i},Si=(s,t)=>{const e=s.scrollElement;if(!e)return;const i=s.targetWindow;if(!i)return;const n=h=>{const{width:a,height:d}=h;t({width:Math.round(a),height:Math.round(d)})};if(n(is(e)),!i.ResizeObserver)return()=>{};const o=new i.ResizeObserver(h=>{const a=()=>{const d=h[0];if(d!=null&&d.borderBoxSize){const f=d.borderBoxSize[0];if(f){n({width:f.inlineSize,height:f.blockSize});return}}n(is(e))};s.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return o.observe(e,{box:"border-box"}),()=>{o.unobserve(e)}},ns={passive:!0},rs=typeof window>"u"?!0:"onscrollend"in window,wi=(s,t)=>{const e=s.scrollElement;if(!e)return;const i=s.targetWindow;if(!i)return;let n=0;const o=s.options.useScrollendEvent&&rs?()=>{}:gi(i,()=>{t(n,!1)},s.options.isScrollingResetDelay),h=m=>()=>{const{horizontal:l,isRtl:c}=s.options;n=l?e.scrollLeft*(c&&-1||1):e.scrollTop,o(),t(n,m)},a=h(!0),d=h(!1);e.addEventListener("scroll",a,ns);const f=s.options.useScrollendEvent&&rs;return f&&e.addEventListener("scrollend",d,ns),()=>{e.removeEventListener("scroll",a),f&&e.removeEventListener("scrollend",d)}},Oi=(s,t,e)=>{if(t!=null&&t.borderBoxSize){const i=t.borderBoxSize[0];if(i)return Math.round(i[e.options.horizontal?"inlineSize":"blockSize"])}return s[e.options.horizontal?"offsetWidth":"offsetHeight"]},Ci=(s,{adjustments:t=0,behavior:e},i)=>{var n,o;const h=s+t;(o=(n=i.scrollElement)==null?void 0:n.scrollTo)==null||o.call(n,{[i.options.horizontal?"left":"top"]:h,behavior:e})};class Ei{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const i=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(n=>{n.forEach(o=>{const h=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(h):h()})}));return{disconnect:()=>{var n;(n=i())==null||n.disconnect(),e=null},observe:n=>{var o;return(o=i())==null?void 0:o.observe(n,{box:"border-box"})},unobserve:n=>{var o;return(o=i())==null?void 0:o.unobserve(n)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([i,n])=>{typeof n>"u"&&delete e[i]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:vi,rangeExtractor:bi,onChange:()=>{},measureElement:Oi,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var i,n;(n=(i=this.options).onChange)==null||n.call(i,this,e)},this.maybeNotify=Ft(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const i=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==i){if(this.cleanup(),!i){this.maybeNotify();return}this.scrollElement=i,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((e=this.scrollElement)==null?void 0:e.window)??null,this.elementsCache.forEach(n=>{this.observer.observe(n)}),this.unsubs.push(this.options.observeElementRect(this,n=>{this.scrollRect=n,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(n,o)=>
4{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<n?"forward":"backward":null,this.scrollOffset=n,this.isScrolling=o,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,i)=>{const n=new Map,o=new Map;for(let h=i-1;h>=0;h--){const a=e[h];if(n.has(a.lane))continue;const d=o.get(a.lane);if(d==null||a.end>d.end?o.set(a.lane,a):a.end<d.end&&n.set(a.lane,!0),n.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((h,a)=>h.end===a.end?h.index-a.index:h.end-a.end)[0]:void 0},this.getMeasurementOptions=Ft(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(e,i,n,o,h,a)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:i,scrollMargin:n,getItemKey:o,enabled:h,lanes:a}),{key:!1}),this.getMeasurements=Ft(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:i,scrollMargin:n,getItemKey:o,enabled:h,lanes:a},d)=>{if(!h)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(const c of this.laneAssignments.keys())c>=e&&this.laneAssignments.delete(c);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const f=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);const m=this.measurementsCache.slice(0,f),l=new Array(a).fill(void 0);for(let c=0;c<f;c++){const g=m[c];g&&(l[g.lane]=c)}for(let c=f;c<e;c++){const g=o(c),w=this.laneAssignments.get(c);let y,S;if(w!==void 0&&this.options.lanes>1){y=w;const v=l[y],Q=v!==void 0?m[v]:void 0;S=Q?Q.end+this.options.gap:i+n}else{const v=this.options.lanes===1?m[c-1]:this.getFurthestMeasurement(m,c);S=v?v.end+this.options.gap:i+n,y=v?v.lane:c%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(c,y)}const O=d.get(g),E=typeof O=="number"?O:this.options.estimateSize(c),M=S+E;m[c]={index:c,start:S,size:E,end:M,key:g,lane:y},l[y]=c}return this.measurementsCache=m,m},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Ft(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,i,n,o)=>this.range=e.length>0&&i>0?Ri({measurements:e,outerSize:i,scrollOffset:n,lanes:o}):null,{key:!1,debug:()=>this.options.debug}
vendor: 1,605 bytes, line 4
4),this.getVirtualIndexes=Ft(()=>{let e=null,i=null;const n=this.calculateRange();return n&&(e=n.startIndex,i=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,i]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,i]},(e,i,n,o,h)=>o===null||h===null?[]:e({startIndex:o,endIndex:h,overscan:i,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const i=this.options.indexAttribute,n=e.getAttribute(i);return n?parseInt(n,10):(console.warn(`Missing attribute name '${i}={index}' on measured element.`),-1)},this._measureElement=(e,i)=>{const n=this.indexFromElement(e),o=this.measurementsCache[n];if(!o)return;const h=o.key,a=this.elementsCache.get(h);a!==e&&(a&&this.observer.unobserve(a),this.observer.observe(e),this.elementsCache.set(h,e)),e.isConnected&&this.resizeItem(n,this.options.measureElement(e,i,this))},this.resizeItem=(e,i)=>{const n=this.measurementsCache[e];if(!n)return;const o=this.itemSizeCache.get(n.key)??n.size,h=i-o;h!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(n,h,this):n.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=h,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,i)),this.notify(!1))},this.measureElement=e=>{if(!e){this.elementsCache.forEach((i,n)=>{i.isConnected||(this.observer.unobserve(i),this.elementsCache.delete(n))});return}this._measureElement(e,void 0)},this.getVirtualItems=Ft(()=>
4[this.getVirtualIndexes(),this.getMeasurements()],(e,i)=>{const n=[];for(let o=0,h=e.length;o<h;o++){const a=e[o],d=i[a];n.push(d)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const i=this.getMeasurements();if(i.length!==0)return ss(i[ks(0,i.length-1,n=>ss(i[n]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,i,n=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),h=this.getScrollOffset();i==="auto"&&(i=e>=h+o?"end":"start"),i==="center"?e+=(n-o)/2:i==="end"&&(e-=o);const a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,i="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const n=this.measurementsCache[e];if(!n)return;const o=this.getSize(),h=this.getScrollOffset();if(i==="auto")if(n.end>=h+o-this.options.scrollPaddingEnd)i="end";else if(n.start<=h+this.options.scrollPaddingStart)i="start";else return[h,i];if(i==="end"&&e===this.options.count-1)return[this.getMaxScrollOffset(),i];const a=i==="end"?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,i,n.size),i]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(e,{align:i="start",behavior:n}={})=>{n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,i),{adjustments:void 0,behavior:n})},this.scrollToIndex=(e,{align:i="auto",behavior:n}={})=>{n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,this.options.count-1)),this.currentScrollToIndex=e;let o=0;const h=10,a=f=>{if(!this.targetWindow)return;const m=this.getOffsetForIndex(e,f);if(!m){console.warn("Failed to get offset for index:",e);return}const[l,c]=m;this._scrollToOffset(l,{adjustments:void 0,behavior:n}),this.targetWindow.requestAnimationFrame(()=>{const g=()=>{if(this.currentScrollToIndex!==e)return;const w=this.getScrollOffset(),y=this.getOffsetForIndex(e,c);if(!y){console.warn("Failed to get offset for index:",e);return}yi(y[0],w)||d(c)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(g):g()})},d=f=>{this.targetWindow&&this.currentScrollToIndex===e&&(o++,o<h?this.targetWindow.requestAnimationFrame(()=>a(f)):console.warn(`Failed to scroll to index ${e} after ${h} attempts.`))};a(i)},this.scrollBy=(e,{behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adju
4stments:void 0,behavior:i})},this.getTotalSize=()=>{var e;const i=this.getMeasurements();let n;if(i.length===0)n=this.options.paddingStart;else if(this.options.lanes===1)n=((e=i[i.length-1])==null?void 0:e.end)??0;else{const o=Array(this.options.lanes).fill(null);let h=i.length-1;for(;h>=0&&o.some(a=>a===null);){const a=i[h];o[a.lane]===null&&(o[a.lane]=a.end),h--}n=Math.max(...o.filter(a=>a!==null))}return Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:i,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:i},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}}const ks=(s,t,e,i)=>{for(;s<=t;){const n=(s+t)/2|0,o=e(n);if(o<i)s=n+1;else if(o>i)t=n-1;else return n}return s>0?s-1:0};function Ri({measurements:s,outerSize:t,scrollOffset:e,lanes:i}){const n=s.length-1,o=d=>s[d].start;if(s.length<=i)return{startIndex:0,endIndex:n};let h=ks(0,n,o,e),a=h;if(i===1)for(;a<n&&s[a].end<e+t;)a++;else if(i>1){const d=Array(i).fill(0);for(;a<n&&d.some(m=>m<e+t);){const m=s[a];d[m.lane]=m.end,a++}const f=Array(i).fill(e+t);for(;h>=0&&f.some(m=>m>=e);){const m=s[h];f[m.lane]=m.start,h--}h=Math.max(0,h-h%i),a=Math.min(n,a+(i-1-a%i))}return{startIndex:h,endIndex:a}}const os=typeof document<"u"?P.useLayoutEffect:P.useEffect;function Mi({useFlushSync:s=!0,...t}){const e=P.useReducer(()=>({}),{})[1],i={...t,onChange:(o,h)=>{var a;s&&h?_s.flushSync(e):e(),(a=t.onChange)==null||a.call(t,o,h)}},[n]=P.useState(()=>new Ei(i));return n.setOptions(i),os(()=>n._didMount(),[]),os(()=>n._willUpdate()),n}function ji(s){return Mi({observeElementRect:Si,observeElementOffset:wi,scrollToFn:Ci,...s})}export{ai as M,Qi as Q,Fi as _,Di as a,Ti as b,ki as c,ji as d,Ai as e,zi as q,qe 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.